buefy 0.8.1 → 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 +10 -0
- package/dist/buefy.css +40 -1
- package/dist/buefy.js +131 -40
- package/dist/buefy.min.css +1 -1
- package/dist/buefy.min.js +2 -1
- package/dist/cjs/datepicker.js +126 -23
- package/dist/cjs/slider.js +3 -15
- package/dist/components/autocomplete/index.js +2 -2
- package/dist/components/autocomplete/index.min.js +2 -1
- package/dist/components/button/index.js +2 -2
- package/dist/components/button/index.min.js +2 -1
- package/dist/components/checkbox/index.js +2 -2
- package/dist/components/checkbox/index.min.js +2 -1
- package/dist/components/clockpicker/index.js +2 -2
- package/dist/components/clockpicker/index.min.js +2 -1
- package/dist/components/collapse/index.js +2 -2
- package/dist/components/collapse/index.min.js +2 -1
- package/dist/components/datepicker/index.js +128 -25
- package/dist/components/datepicker/index.min.js +2 -1
- package/dist/components/dialog/index.js +2 -2
- package/dist/components/dialog/index.min.js +2 -1
- package/dist/components/dropdown/index.js +2 -2
- package/dist/components/dropdown/index.min.js +2 -1
- package/dist/components/field/index.js +2 -2
- package/dist/components/field/index.min.js +2 -1
- package/dist/components/icon/index.js +2 -2
- package/dist/components/icon/index.min.js +2 -1
- package/dist/components/input/index.js +2 -2
- package/dist/components/input/index.min.js +2 -1
- package/dist/components/loading/index.js +2 -2
- package/dist/components/loading/index.min.js +2 -1
- package/dist/components/menu/index.js +2 -2
- package/dist/components/menu/index.min.js +2 -1
- package/dist/components/message/index.js +2 -2
- package/dist/components/message/index.min.js +2 -1
- package/dist/components/modal/index.js +2 -2
- package/dist/components/modal/index.min.js +2 -1
- package/dist/components/navbar/index.js +2 -2
- package/dist/components/navbar/index.min.js +2 -1
- package/dist/components/notification/index.js +2 -2
- package/dist/components/notification/index.min.js +2 -1
- package/dist/components/numberinput/index.js +2 -2
- package/dist/components/numberinput/index.min.js +2 -1
- package/dist/components/pagination/index.js +2 -2
- package/dist/components/pagination/index.min.js +2 -1
- package/dist/components/progress/index.js +2 -2
- package/dist/components/progress/index.min.js +2 -1
- package/dist/components/radio/index.js +2 -2
- package/dist/components/radio/index.min.js +2 -1
- package/dist/components/select/index.js +2 -2
- package/dist/components/select/index.min.js +2 -1
- package/dist/components/slider/index.js +5 -17
- package/dist/components/slider/index.min.js +2 -1
- package/dist/components/snackbar/index.js +2 -2
- package/dist/components/snackbar/index.min.js +2 -1
- package/dist/components/steps/index.js +2 -2
- package/dist/components/steps/index.min.js +2 -1
- package/dist/components/switch/index.js +2 -2
- package/dist/components/switch/index.min.js +2 -1
- package/dist/components/table/index.js +2 -2
- package/dist/components/table/index.min.js +2 -1
- package/dist/components/tabs/index.js +2 -2
- package/dist/components/tabs/index.min.js +2 -1
- package/dist/components/tag/index.js +2 -2
- package/dist/components/tag/index.min.js +2 -1
- package/dist/components/taginput/index.js +2 -2
- package/dist/components/taginput/index.min.js +2 -1
- package/dist/components/timepicker/index.js +2 -2
- package/dist/components/timepicker/index.min.js +2 -1
- package/dist/components/toast/index.js +2 -2
- package/dist/components/toast/index.min.js +2 -1
- package/dist/components/tooltip/index.js +2 -2
- package/dist/components/tooltip/index.min.js +2 -1
- package/dist/components/upload/index.js +2 -2
- package/dist/components/upload/index.min.js +2 -1
- package/dist/esm/datepicker.js +126 -23
- package/dist/esm/slider.js +3 -15
- package/package.json +5 -2
- package/src/components/datepicker/Datepicker.spec.js +60 -0
- package/src/components/datepicker/Datepicker.vue +29 -15
- package/src/components/datepicker/DatepickerTable.spec.js +89 -1
- package/src/components/datepicker/DatepickerTable.vue +60 -3
- package/src/components/datepicker/DatepickerTableRow.spec.js +127 -17
- package/src/components/datepicker/DatepickerTableRow.vue +46 -3
- package/src/components/slider/Slider.vue +3 -14
- package/src/scss/components/_datepicker.scss +37 -1
|
@@ -1 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).clockpicker={})}(this,function(e){"use strict";function t(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}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,defaultTooltipDelay:0,defaultInputAutocomplete:"on",defaultDateFormatter:null,defaultDateParser:null,defaultDateCreator:null,defaultDayNames:null,defaultMonthNames:null,defaultFirstDayOfWeek:null,defaultUnselectableDaysOfWeek:null,defaultTimeFormatter:null,defaultTimeParser:null,defaultModalCanCancel:["escape","x","outside","button"],defaultModalScroll:null,defaultDatepickerMobileNative:!0,defaultTimepickerMobileNative:!0,defaultNoticeQueue:!0,defaultInputHasCounter:!0,defaultTaginputHasCounter:!0,defaultUseHtml5Validation:!0,defaultDropdownMobileModal:!0,defaultFieldLabelPosition:null,defaultDatepickerYearsRange:[-100,3],defaultDatepickerNearbyMonthDays:!0,defaultDatepickerNearbySelectableMonthDays:!1,defaultDatepickerShowWeekNumber:!1},n={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.defaultUseHtml5Validation}},validationMessage:String},data:function(){return{isValid:!0,isFocused:!1,newIconPack:this.iconPack||i.defaultIconPack}},computed:{parentField:function(){for(var e=this.$parent,t=0;t<3;t++)e&&!e.$data._isField&&(e=e.$parent);return e},statusType:function(){if(this.parentField&&this.parentField.newType){if("string"==typeof this.parentField.newType)return this.parentField.newType;for(var e in this.parentField.newType)if(this.parentField.newType[e])return e}},statusMessage:function(){if(this.parentField)return this.parentField.newMessage},iconSize:function(){switch(this.size){case"is-small":return this.size;case"is-medium":return;case"is-large":return"mdi"===this.newIconPack?"is-medium":""}}},methods:{focus:function(){var e=this;void 0!==this.$data._elementRef&&this.$nextTick(function(){var t=e.$el.querySelector(e.$data._elementRef);t&&t.focus()})},onBlur:function(e){this.isFocused=!1,this.$emit("blur",e),this.checkHtml5Validity()},onFocus:function(e){this.isFocused=!0,this.$emit("focus",e)},checkHtml5Validity:function(){var e=this;if(this.useHtml5Validation&&void 0!==this.$refs[this.$data._elementRef]){var t=this.$el.querySelector(this.$data._elementRef),i=null,n=null,s=!0;return t.checkValidity()||(i="is-danger",n=this.validationMessage||t.validationMessage,s=!1),this.isValid=s,this.$nextTick(function(){e.parentField&&(e.parentField.type||(e.parentField.newType=i),e.parentField.message||(e.parentField.newMessage=n))}),this.isValid}}}},s={Android:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/Android/i)},BlackBerry:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/IEMobile/i)},any:function(){return s.Android()||s.BlackBerry()||s.iOS()||s.Opera()||s.Windows()}},a="AM",o="PM",r={mixins:[n],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 i.defaultTimeFormatter?i.defaultTimeFormatter(e):function(e,t){var i=e.getHours(),n=e.getMinutes(),s=e.getSeconds(),r="";return"12"===t.hourFormat&&(r=" "+(i<12?a:o),i>12?i-=12:0===i&&(i=12)),t.pad(i)+":"+t.pad(n)+(t.enableSeconds?":"+t.pad(s):"")+r}(e,t)}},timeParser:{type:Function,default:function(e,t){return"function"==typeof i.defaultTimeParser?i.defaultTimeParser(e):function(e,t){if(e){var i=!1;if("12"===t.hourFormat){var n=e.split(" ");e=n[0],i=n[1]===a}var s=e.split(":"),o=parseInt(s[0],10),r=parseInt(s[1],10),l=t.enableSeconds?parseInt(s[2],10):0;if(isNaN(o)||o<0||o>23||"12"===t.hourFormat&&(o<1||o>12)||isNaN(r)||r<0||r>59)return null;var u=null;return t.computedValue&&!isNaN(t.computedValue)?u=new Date(t.computedValue):(u=new Date).setMilliseconds(0),u.setSeconds(l),u.setMinutes(r),"12"===t.hourFormat&&(i&&12===o?o=0:i||12===o||(o+=12)),u.setHours(o),new Date(u.getTime())}return null}(e,t)}},mobileNative:{type:Boolean,default:function(){return i.defaultTimepickerMobileNative}},position:String,unselectableTimes:Array,openOnFocus:Boolean,enableSeconds:Boolean,defaultMinutes:Number,defaultSeconds:Number},data:function(){return{dateSelected:this.value,hoursSelected:null,minutesSelected:null,secondsSelected:null,meridienSelected:null,_elementRef:"input",AM:a,PM:o,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,i=0;i<t;i++){var n=i,s=n;this.isHourFormat24||(s=n=i+1,this.meridienSelected===this.AM?12===n&&(n=0):this.meridienSelected===this.PM&&12!==n&&(n+=12)),e.push({label:this.formatNumber(s),value:n})}return e},minutes:function(){for(var e=[],t=0;t<60;t+=this.incrementMinutes)e.push({label:this.formatNumber(t,!0),value:t});return e},seconds:function(){for(var e=[],t=0;t<60;t+=this.incrementSeconds)e.push({label:this.formatNumber(t,!0),value:t});return e},meridiens:function(){return[a,o]},isMobile:function(){return this.mobileNative&&s.any()},isHourFormat24:function(){return"24"===this.hourFormat}},watch:{hourFormat:function(){null!==this.hoursSelected&&(this.meridienSelected=this.hoursSelected>=12?o:a)},value:{handler:function(e){this.updateInternalState(e),!this.isValid&&this.$refs.input.checkHtml5Validity()},immediate:!0}},methods:{onMeridienChange:function(e){null!==this.hoursSelected&&(e===o?this.hoursSelected+=12:e===a&&(this.hoursSelected-=12)),this.updateDateSelected(this.hoursSelected,this.minutesSelected,this.enableSeconds?this.secondsSelected:0,e)},onHoursChange:function(e){!this.minutesSelected&&this.defaultMinutes&&(this.minutesSelected=this.defaultMinutes),!this.secondsSelected&&this.defaultSeconds&&(this.secondsSelected=this.defaultSeconds),this.updateDateSelected(parseInt(e,10),this.minutesSelected,this.enableSeconds?this.secondsSelected:0,this.meridienSelected)},onMinutesChange:function(e){!this.secondsSelected&&this.defaultSeconds&&(this.secondsSelected=this.defaultSeconds),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,i,n){if(null!=e&&null!=t&&(!this.isHourFormat24&&null!==n||this.isHourFormat24)){var s=null;this.computedValue&&!isNaN(this.computedValue)?s=new Date(this.computedValue):(s=new Date).setMilliseconds(0),s.setHours(e),s.setMinutes(t),s.setSeconds(i),this.computedValue=new Date(s.getTime())}},updateInternalState:function(e){e?(this.hoursSelected=e.getHours(),this.minutesSelected=e.getMinutes(),this.secondsSelected=e.getSeconds(),this.meridienSelected=e.getHours()>=12?o:a):(this.hoursSelected=null,this.minutesSelected=null,this.secondsSelected=null,this.meridienSelected=a),this.dateSelected=e},isHourDisabled:function(e){var t=this,i=!1;if(this.minTime){var n=this.minTime.getHours();i=e<n}if(this.maxTime&&!i){var s=this.maxTime.getHours();i=e>s}this.unselectableTimes&&(i||(i=this.unselectableTimes.filter(function(i){return t.enableSeconds&&null!==t.secondsSelected?i.getHours()===e&&i.getMinutes()===t.minutesSelected&&i.getSeconds()===t.secondsSelected:null!==t.minutesSelected?i.getHours()===e&&i.getMinutes()===t.minutesSelected:i.getHours()===e}).length>0));return i},isMinuteDisabled:function(e){var t=this,i=!1;if(null!==this.hoursSelected){if(this.isHourDisabled(this.hoursSelected))i=!0;else{if(this.minTime){var n=this.minTime.getHours(),s=this.minTime.getMinutes();i=this.hoursSelected===n&&e<s}if(this.maxTime&&!i){var a=this.maxTime.getHours(),o=this.maxTime.getMinutes();i=this.hoursSelected===a&&e>o}}if(this.unselectableTimes)if(!i)i=this.unselectableTimes.filter(function(i){return t.enableSeconds&&null!==t.secondsSelected?i.getHours()===t.hoursSelected&&i.getMinutes()===e&&i.getSeconds()===t.secondsSelected:i.getHours()===t.hoursSelected&&i.getMinutes()===e}).length>0}return i},isSecondDisabled:function(e){var t=this,i=!1;if(null!==this.minutesSelected){if(this.isMinuteDisabled(this.minutesSelected))i=!0;else{if(this.minTime){var n=this.minTime.getHours(),s=this.minTime.getMinutes(),a=this.minTime.getSeconds();i=this.hoursSelected===n&&this.minutesSelected===s&&e<a}if(this.maxTime&&!i){var o=this.maxTime.getHours(),r=this.maxTime.getMinutes(),l=this.maxTime.getSeconds();i=this.hoursSelected===o&&this.minutesSelected===r&&e>l}}if(this.unselectableTimes)if(!i)i=this.unselectableTimes.filter(function(i){return i.getHours()===t.hoursSelected&&i.getMinutes()===t.minutesSelected&&i.getSeconds()===e}).length>0}return i},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 i=t.getHours(),n=t.getMinutes(),s=t.getSeconds();return this.formatNumber(i,!0)+":"+this.formatNumber(n,!0)+":"+this.formatNumber(s,!0)}return""},onChangeNativePicker:function(e){var t=e.target.value;if(t){var i=null;this.computedValue&&!isNaN(this.computedValue)?i=new Date(this.computedValue):(i=new Date).setMilliseconds(0);var n=t.split(":");i.setHours(parseInt(n[0],10)),i.setMinutes(parseInt(n[1],10)),i.setSeconds(n[2]?parseInt(n[2],10):0),this.computedValue=new Date(i.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)}};var l=function(e,t,i,n,s,a,o,r,l,u){"boolean"!=typeof o&&(l=r,r=o,o=!1);var c,d="function"==typeof i?i.options:i;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,s&&(d.functional=!0)),n&&(d._scopeId=n),a?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(a)},d._ssrRegister=c):t&&(c=o?function(){t.call(this,u(this.$root.$options.shadowRoot))}:function(e){t.call(this,r(e))}),c)if(d.functional){var h=d.render;d.render=function(e,t){return c.call(t),h(e,t)}}else{var f=d.beforeCreate;d.beforeCreate=f?[].concat(f,c):[c]}return i};var u=l({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"dropdown",class:e.rootClasses},[e.inline?e._e():i("div",{ref:"trigger",staticClass:"dropdown-trigger",attrs:{role:"button","aria-haspopup":"true"},on:{click:e.toggle}},[e._t("trigger")],2),e._v(" "),i("transition",{attrs:{name:e.animation}},[e.isMobileModal?i("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"background",attrs:{"aria-hidden":!e.isActive}}):e._e()]),e._v(" "),i("transition",{attrs:{name:e.animation}},[i("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}},[i("div",{staticClass:"dropdown-content",attrs:{role:e.ariaRoleMenu}},[e._t("default")],2)])])],1)},staticRenderFns:[]},void 0,{name:"BDropdown",props:{value:{type:[String,Number,Boolean,Object,Array,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 i.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){var t=this;if(this.multiple){if(this.selected){var i=this.selected.indexOf(e);-1===i?this.selected.push(e):this.selected.splice(i,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,this.hoverable&&this.closeOnClick&&(this.isHoverable=!1,setTimeout(function(){t.isHoverable=!0},250)))},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("*"),i=!0,n=!1,s=void 0;try{for(var a,o=t[Symbol.iterator]();!(i=(a=o.next()).done);i=!0){if(e===a.value)return!0}}catch(e){n=!0,s=e}finally{try{i||null==o.return||o.return()}finally{if(n)throw s}}}if(void 0!==this.$refs.trigger){var r=this.$refs.trigger.querySelectorAll("*"),l=!0,u=!1,c=void 0;try{for(var d,h=r[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){if(e===d.value)return!0}}catch(e){u=!0,c=e}finally{try{l||null==h.return||h.return()}finally{if(u)throw c}}}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)}},void 0,!1,void 0,void 0,void 0);var c=l({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.separator?i("hr",{staticClass:"dropdown-divider"}):e.custom||e.hasLink?i("div",{class:e.itemClasses,attrs:{role:e.ariaRoleItem,tabindex:e.focusable?0:null},on:{click:e.selectItem}},[e._t("default")],2):i("a",{staticClass:"dropdown-item",class:e.anchorClasses,attrs:{role:e.ariaRoleItem,tabindex:e.focusable?0:null},on:{click:e.selectItem}},[e._t("default")],2)},staticRenderFns:[]},void 0,{name:"BDropdownItem",props:{value:{type:[String,Number,Boolean,Object,Array,Function],default:null},separator:Boolean,disabled:Boolean,custom:Boolean,focusable:{type:Boolean,default:!0},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")}},void 0,!1,void 0,void 0,void 0);var d=l({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",{staticClass:"icon",class:[e.newType,e.size]},[e.useIconComponent?i(e.useIconComponent,{tag:"component",class:[e.customClass],attrs:{icon:[e.newPack,e.newIcon],size:e.newCustomSize}}):i("i",{class:[e.newPack,e.newIcon,e.newCustomSize,e.customClass]})],1)},staticRenderFns:[]},void 0,{name:"BIcon",props:{type:[String,Object],pack:String,icon:String,size:String,customSize:String,customClass:String,both:Boolean},computed:{newIcon:function(){return"mdi"===this.newPack?"".concat(this.newPack,"-").concat(this.icon):this.addFAPrefix(this.getEquivalentIconOf(this.icon))},newPack:function(){return this.pack||i.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-".concat(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"),i="mdi"===this.newPack?"mdi-48px":this.addFAPrefix("3x");switch(this.size){case"is-small":return;case"is-medium":return t;case"is-large":return i;default:return e}},useIconComponent:function(){return i.defaultIconComponent}},methods:{addFAPrefix:function(e){return this.useIconComponent?e:"fa-".concat(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}}}},void 0,!1,void 0,void 0,void 0);var h=l({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"control",class:e.rootClasses},["textarea"!==e.type?i("input",e._b({ref:"input",staticClass:"input",class:[e.inputClasses,e.customClass],attrs:{type:e.newType,autocomplete:e.newAutocomplete,maxlength:e.maxlength},domProps:{value:e.computedValue},on:{input:e.onInput,blur:e.onBlur,focus:e.onFocus}},"input",e.$attrs,!1)):i("textarea",e._b({ref:"textarea",staticClass:"textarea",class:[e.inputClasses,e.customClass],attrs:{maxlength:e.maxlength},domProps:{value:e.computedValue},on:{input:e.onInput,blur:e.onBlur,focus:e.onFocus}},"textarea",e.$attrs,!1)),e._v(" "),e.icon?i("b-icon",{staticClass:"is-left",attrs:{icon:e.icon,pack:e.iconPack,size:e.iconSize}}):e._e(),e._v(" "),e.loading||!e.passwordReveal&&!e.statusTypeIcon?e._e():i("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?i("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:[]},void 0,{name:"BInput",components:t({},d.name,d),mixins:[n],inheritAttrs:!1,props:{value:[Number,String],type:{type:String,default:"text"},passwordReveal:Boolean,hasCounter:{type:Boolean,default:function(){return i.defaultInputHasCounter}},customClass:{type:String,default:""}},data:function(){return{newValue:this.value,newType:this.type,newAutocomplete:this.autocomplete||i.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.statusTypeIcon},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)})}}},void 0,!1,void 0,void 0,void 0);var f=l({},void 0,{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(i){return i.tag?t.message?e("b-field",{attrs:{message:t.message,type:t.type}},[i]):e("b-field",{attrs:{type:t.type}},[i]):i}))}},void 0,void 0,void 0,void 0,void 0);var p=l({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"field",class:[e.rootClasses,e.fieldType()]},[e.horizontal?i("div",{staticClass:"field-label",class:[e.customClass,e.fieldLabelSize]},[e.hasLabel?i("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?i("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?i("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?i("p",{staticClass:"help",class:e.newType,domProps:{innerHTML:e._s(e.formattedMessage)}}):e._e()],2)},staticRenderFns:[]},void 0,{name:"BField",components:t({},f.name,f),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 i.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},this.numberInputClasses]},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 i in t)t[i]&&e.push(i)});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},numberInputClasses:function(){if(this.$slots.default){var e=this.$slots.default.filter(function(e){return e.tag&&e.tag.toLowerCase().indexOf("numberinput")>=0})[0];if(e){var t=["has-numberinput"],i=e.componentOptions.propsData.controlsPosition,n=e.componentOptions.propsData.size;return i&&t.push("has-numberinput-".concat(i)),n&&t.push("has-numberinput-".concat(n)),t}}return null}},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(){this.horizontal&&(this.$el.querySelectorAll(".input, .select, .button, .textarea, .b-slider").length>0&&(this.fieldLabelSize="is-normal"))}},void 0,!1,void 0,void 0,void 0);var m,g=l({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"b-clockpicker-face",on:{mousedown:e.onMouseDown,mouseup:e.onMouseUp,mousemove:e.onDragMove,touchstart:e.onMouseDown,touchend:e.onMouseUp,touchmove:e.onDragMove}},[i("div",{ref:"clock",staticClass:"b-clockpicker-face-outer-ring"},[i("div",{staticClass:"b-clockpicker-face-hand",style:e.handStyle}),e._v(" "),e._l(e.faceNumbers,function(t,n){return i("span",{key:n,staticClass:"b-clockpicker-face-number",class:e.getFaceNumberClasses(t),style:{transform:e.getNumberTranslate(t.value)}},[i("span",[e._v(e._s(t.label))])])})],2)])},staticRenderFns:[]},void 0,{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),i=this.shortestDistanceDegrees(e,t);return this.prevAngle+i},handScale:function(){return this.calcHandScale(this.displayedValue)},handStyle:function(){return{transform:"rotate(".concat(this.handRotateAngle,"deg) scaleY(").concat(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 i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)},shortestDistanceDegrees:function(e,t){var i=(t-e)%360,n=180-Math.abs(Math.abs(i)-180);return(i+360)%360<180?1*n:-1*n},coordToAngle:function(e,t){var i=2*Math.atan2(t.y-e.y-this.euclidean(e,t),t.x-e.x);return Math.abs(180*i/Math.PI)},getNumberTranslate:function(e){var t=this.getNumberCoords(e),i=t.x,n=t.y;return"translate(".concat(i,"px, ").concat(n,"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(),i=t.width,n=t.top,s=t.left,a="touches"in e?e.touches[0]:e,o={x:i/2,y:-i/2},r={x:a.clientX-s,y:n-a.clientY},l=Math.round(this.coordToAngle(o,r)+360)%360,u=this.double&&this.euclidean(o,r)<(this.outerRadius+this.innerRadius)/2-16,c=Math.round(l/this.degreesPerUnit)+this.min+(u?this.countPerRing:0);l>=360-this.degreesPerUnit/2&&(c=u?this.max:this.min),this.update(c)}},update:function(e){this.inputValue===e||this.isDisabled(e)||(this.prevAngle=this.handRotateAngle,this.inputValue=e,this.$emit("input",e))}}},void 0,!1,void 0,void 0,void 0);var v,b=l({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"b-clockpicker control",class:[e.size,e.type,{"is-expanded":e.expanded}]},[!e.isMobile||e.inline?i("b-dropdown",{ref:"dropdown",attrs:{position:e.position,disabled:e.disabled,inline:e.inline}},[e.inline?e._e():i("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(" "),i("div",{staticClass:"card",attrs:{disabled:e.disabled,custom:""}},[e.inline?i("header",{staticClass:"card-header"},[i("div",{staticClass:"b-clockpicker-header card-header-title"},[i("div",{staticClass:"b-clockpicker-time"},[i("span",{staticClass:"b-clockpicker-btn",class:{active:e.isSelectingHour},on:{click:function(t){e.isSelectingHour=!0}}},[e._v(e._s(e.hoursDisplay))]),e._v(" "),i("span",[e._v(":")]),e._v(" "),i("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():i("div",{staticClass:"b-clockpicker-period"},[i("div",{staticClass:"b-clockpicker-btn",class:{active:e.meridienSelected==e.AM},on:{click:function(t){e.onMeridienClick(e.AM)}}},[e._v("am")]),e._v(" "),i("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(" "),i("div",{staticClass:"card-content"},[i("div",{staticClass:"b-clockpicker-body",style:{width:e.faceSize+"px",height:e.faceSize+"px"}},[e.inline?e._e():i("div",{staticClass:"b-clockpicker-time"},[i("div",{staticClass:"b-clockpicker-btn",class:{active:e.isSelectingHour},on:{click:function(t){e.isSelectingHour=!0}}},[e._v("Hours")]),e._v(" "),i("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():i("div",{staticClass:"b-clockpicker-period"},[i("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(" "),i("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(" "),i("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?i("footer",{staticClass:"b-clockpicker-footer card-footer"},[e._t("default")],2):e._e()])],1):i("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:[]},void 0,{name:"BClockpicker",components:(m={},t(m,g.name,g),t(m,h.name,h),t(m,p.name,p),t(m,d.name,d),t(m,u.name,u),t(m,c.name,c),m),mixins:[r],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},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))}}},void 0,!1,void 0,void 0,void 0),S={install:function(e){!function(e,t){e.component(t.name,t)}(e,b)}};v=S,"undefined"!=typeof window&&window.Vue&&window.Vue.use(v),e.Clockpicker=b,e.default=S,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
1
|
+
/*! Buefy v0.8.2 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Clockpicker={})}(this,function(e){"use strict";function t(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}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,defaultTooltipDelay:0,defaultInputAutocomplete:"on",defaultDateFormatter:null,defaultDateParser:null,defaultDateCreator:null,defaultDayNames:null,defaultMonthNames:null,defaultFirstDayOfWeek:null,defaultUnselectableDaysOfWeek:null,defaultTimeFormatter:null,defaultTimeParser:null,defaultModalCanCancel:["escape","x","outside","button"],defaultModalScroll:null,defaultDatepickerMobileNative:!0,defaultTimepickerMobileNative:!0,defaultNoticeQueue:!0,defaultInputHasCounter:!0,defaultTaginputHasCounter:!0,defaultUseHtml5Validation:!0,defaultDropdownMobileModal:!0,defaultFieldLabelPosition:null,defaultDatepickerYearsRange:[-100,3],defaultDatepickerNearbyMonthDays:!0,defaultDatepickerNearbySelectableMonthDays:!1,defaultDatepickerShowWeekNumber:!1},n={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.defaultUseHtml5Validation}},validationMessage:String},data:function(){return{isValid:!0,isFocused:!1,newIconPack:this.iconPack||i.defaultIconPack}},computed:{parentField:function(){for(var e=this.$parent,t=0;t<3;t++)e&&!e.$data._isField&&(e=e.$parent);return e},statusType:function(){if(this.parentField&&this.parentField.newType){if("string"==typeof this.parentField.newType)return this.parentField.newType;for(var e in this.parentField.newType)if(this.parentField.newType[e])return e}},statusMessage:function(){if(this.parentField)return this.parentField.newMessage},iconSize:function(){switch(this.size){case"is-small":return this.size;case"is-medium":return;case"is-large":return"mdi"===this.newIconPack?"is-medium":""}}},methods:{focus:function(){var e=this;void 0!==this.$data._elementRef&&this.$nextTick(function(){var t=e.$el.querySelector(e.$data._elementRef);t&&t.focus()})},onBlur:function(e){this.isFocused=!1,this.$emit("blur",e),this.checkHtml5Validity()},onFocus:function(e){this.isFocused=!0,this.$emit("focus",e)},checkHtml5Validity:function(){var e=this;if(this.useHtml5Validation&&void 0!==this.$refs[this.$data._elementRef]){var t=this.$el.querySelector(this.$data._elementRef),i=null,n=null,s=!0;return t.checkValidity()||(i="is-danger",n=this.validationMessage||t.validationMessage,s=!1),this.isValid=s,this.$nextTick(function(){e.parentField&&(e.parentField.type||(e.parentField.newType=i),e.parentField.message||(e.parentField.newMessage=n))}),this.isValid}}}},s={Android:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/Android/i)},BlackBerry:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/IEMobile/i)},any:function(){return s.Android()||s.BlackBerry()||s.iOS()||s.Opera()||s.Windows()}},a="AM",o="PM",r={mixins:[n],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 i.defaultTimeFormatter?i.defaultTimeFormatter(e):function(e,t){var i=e.getHours(),n=e.getMinutes(),s=e.getSeconds(),r="";return"12"===t.hourFormat&&(r=" "+(i<12?a:o),i>12?i-=12:0===i&&(i=12)),t.pad(i)+":"+t.pad(n)+(t.enableSeconds?":"+t.pad(s):"")+r}(e,t)}},timeParser:{type:Function,default:function(e,t){return"function"==typeof i.defaultTimeParser?i.defaultTimeParser(e):function(e,t){if(e){var i=!1;if("12"===t.hourFormat){var n=e.split(" ");e=n[0],i=n[1]===a}var s=e.split(":"),o=parseInt(s[0],10),r=parseInt(s[1],10),l=t.enableSeconds?parseInt(s[2],10):0;if(isNaN(o)||o<0||o>23||"12"===t.hourFormat&&(o<1||o>12)||isNaN(r)||r<0||r>59)return null;var u=null;return t.computedValue&&!isNaN(t.computedValue)?u=new Date(t.computedValue):(u=new Date).setMilliseconds(0),u.setSeconds(l),u.setMinutes(r),"12"===t.hourFormat&&(i&&12===o?o=0:i||12===o||(o+=12)),u.setHours(o),new Date(u.getTime())}return null}(e,t)}},mobileNative:{type:Boolean,default:function(){return i.defaultTimepickerMobileNative}},position:String,unselectableTimes:Array,openOnFocus:Boolean,enableSeconds:Boolean,defaultMinutes:Number,defaultSeconds:Number},data:function(){return{dateSelected:this.value,hoursSelected:null,minutesSelected:null,secondsSelected:null,meridienSelected:null,_elementRef:"input",AM:a,PM:o,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,i=0;i<t;i++){var n=i,s=n;this.isHourFormat24||(s=n=i+1,this.meridienSelected===this.AM?12===n&&(n=0):this.meridienSelected===this.PM&&12!==n&&(n+=12)),e.push({label:this.formatNumber(s),value:n})}return e},minutes:function(){for(var e=[],t=0;t<60;t+=this.incrementMinutes)e.push({label:this.formatNumber(t,!0),value:t});return e},seconds:function(){for(var e=[],t=0;t<60;t+=this.incrementSeconds)e.push({label:this.formatNumber(t,!0),value:t});return e},meridiens:function(){return[a,o]},isMobile:function(){return this.mobileNative&&s.any()},isHourFormat24:function(){return"24"===this.hourFormat}},watch:{hourFormat:function(){null!==this.hoursSelected&&(this.meridienSelected=this.hoursSelected>=12?o:a)},value:{handler:function(e){this.updateInternalState(e),!this.isValid&&this.$refs.input.checkHtml5Validity()},immediate:!0}},methods:{onMeridienChange:function(e){null!==this.hoursSelected&&(e===o?this.hoursSelected+=12:e===a&&(this.hoursSelected-=12)),this.updateDateSelected(this.hoursSelected,this.minutesSelected,this.enableSeconds?this.secondsSelected:0,e)},onHoursChange:function(e){!this.minutesSelected&&this.defaultMinutes&&(this.minutesSelected=this.defaultMinutes),!this.secondsSelected&&this.defaultSeconds&&(this.secondsSelected=this.defaultSeconds),this.updateDateSelected(parseInt(e,10),this.minutesSelected,this.enableSeconds?this.secondsSelected:0,this.meridienSelected)},onMinutesChange:function(e){!this.secondsSelected&&this.defaultSeconds&&(this.secondsSelected=this.defaultSeconds),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,i,n){if(null!=e&&null!=t&&(!this.isHourFormat24&&null!==n||this.isHourFormat24)){var s=null;this.computedValue&&!isNaN(this.computedValue)?s=new Date(this.computedValue):(s=new Date).setMilliseconds(0),s.setHours(e),s.setMinutes(t),s.setSeconds(i),this.computedValue=new Date(s.getTime())}},updateInternalState:function(e){e?(this.hoursSelected=e.getHours(),this.minutesSelected=e.getMinutes(),this.secondsSelected=e.getSeconds(),this.meridienSelected=e.getHours()>=12?o:a):(this.hoursSelected=null,this.minutesSelected=null,this.secondsSelected=null,this.meridienSelected=a),this.dateSelected=e},isHourDisabled:function(e){var t=this,i=!1;if(this.minTime){var n=this.minTime.getHours();i=e<n}if(this.maxTime&&!i){var s=this.maxTime.getHours();i=e>s}this.unselectableTimes&&(i||(i=this.unselectableTimes.filter(function(i){return t.enableSeconds&&null!==t.secondsSelected?i.getHours()===e&&i.getMinutes()===t.minutesSelected&&i.getSeconds()===t.secondsSelected:null!==t.minutesSelected?i.getHours()===e&&i.getMinutes()===t.minutesSelected:i.getHours()===e}).length>0));return i},isMinuteDisabled:function(e){var t=this,i=!1;if(null!==this.hoursSelected){if(this.isHourDisabled(this.hoursSelected))i=!0;else{if(this.minTime){var n=this.minTime.getHours(),s=this.minTime.getMinutes();i=this.hoursSelected===n&&e<s}if(this.maxTime&&!i){var a=this.maxTime.getHours(),o=this.maxTime.getMinutes();i=this.hoursSelected===a&&e>o}}if(this.unselectableTimes)if(!i)i=this.unselectableTimes.filter(function(i){return t.enableSeconds&&null!==t.secondsSelected?i.getHours()===t.hoursSelected&&i.getMinutes()===e&&i.getSeconds()===t.secondsSelected:i.getHours()===t.hoursSelected&&i.getMinutes()===e}).length>0}return i},isSecondDisabled:function(e){var t=this,i=!1;if(null!==this.minutesSelected){if(this.isMinuteDisabled(this.minutesSelected))i=!0;else{if(this.minTime){var n=this.minTime.getHours(),s=this.minTime.getMinutes(),a=this.minTime.getSeconds();i=this.hoursSelected===n&&this.minutesSelected===s&&e<a}if(this.maxTime&&!i){var o=this.maxTime.getHours(),r=this.maxTime.getMinutes(),l=this.maxTime.getSeconds();i=this.hoursSelected===o&&this.minutesSelected===r&&e>l}}if(this.unselectableTimes)if(!i)i=this.unselectableTimes.filter(function(i){return i.getHours()===t.hoursSelected&&i.getMinutes()===t.minutesSelected&&i.getSeconds()===e}).length>0}return i},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 i=t.getHours(),n=t.getMinutes(),s=t.getSeconds();return this.formatNumber(i,!0)+":"+this.formatNumber(n,!0)+":"+this.formatNumber(s,!0)}return""},onChangeNativePicker:function(e){var t=e.target.value;if(t){var i=null;this.computedValue&&!isNaN(this.computedValue)?i=new Date(this.computedValue):(i=new Date).setMilliseconds(0);var n=t.split(":");i.setHours(parseInt(n[0],10)),i.setMinutes(parseInt(n[1],10)),i.setSeconds(n[2]?parseInt(n[2],10):0),this.computedValue=new Date(i.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)}};var l=function(e,t,i,n,s,a,o,r,l,u){"boolean"!=typeof o&&(l=r,r=o,o=!1);var c,d="function"==typeof i?i.options:i;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,s&&(d.functional=!0)),n&&(d._scopeId=n),a?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(a)},d._ssrRegister=c):t&&(c=o?function(){t.call(this,u(this.$root.$options.shadowRoot))}:function(e){t.call(this,r(e))}),c)if(d.functional){var h=d.render;d.render=function(e,t){return c.call(t),h(e,t)}}else{var f=d.beforeCreate;d.beforeCreate=f?[].concat(f,c):[c]}return i};var u=l({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"dropdown",class:e.rootClasses},[e.inline?e._e():i("div",{ref:"trigger",staticClass:"dropdown-trigger",attrs:{role:"button","aria-haspopup":"true"},on:{click:e.toggle}},[e._t("trigger")],2),e._v(" "),i("transition",{attrs:{name:e.animation}},[e.isMobileModal?i("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"background",attrs:{"aria-hidden":!e.isActive}}):e._e()]),e._v(" "),i("transition",{attrs:{name:e.animation}},[i("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}},[i("div",{staticClass:"dropdown-content",attrs:{role:e.ariaRoleMenu}},[e._t("default")],2)])])],1)},staticRenderFns:[]},void 0,{name:"BDropdown",props:{value:{type:[String,Number,Boolean,Object,Array,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 i.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){var t=this;if(this.multiple){if(this.selected){var i=this.selected.indexOf(e);-1===i?this.selected.push(e):this.selected.splice(i,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,this.hoverable&&this.closeOnClick&&(this.isHoverable=!1,setTimeout(function(){t.isHoverable=!0},250)))},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("*"),i=!0,n=!1,s=void 0;try{for(var a,o=t[Symbol.iterator]();!(i=(a=o.next()).done);i=!0){if(e===a.value)return!0}}catch(e){n=!0,s=e}finally{try{i||null==o.return||o.return()}finally{if(n)throw s}}}if(void 0!==this.$refs.trigger){var r=this.$refs.trigger.querySelectorAll("*"),l=!0,u=!1,c=void 0;try{for(var d,h=r[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){if(e===d.value)return!0}}catch(e){u=!0,c=e}finally{try{l||null==h.return||h.return()}finally{if(u)throw c}}}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)}},void 0,!1,void 0,void 0,void 0);var c=l({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.separator?i("hr",{staticClass:"dropdown-divider"}):e.custom||e.hasLink?i("div",{class:e.itemClasses,attrs:{role:e.ariaRoleItem,tabindex:e.focusable?0:null},on:{click:e.selectItem}},[e._t("default")],2):i("a",{staticClass:"dropdown-item",class:e.anchorClasses,attrs:{role:e.ariaRoleItem,tabindex:e.focusable?0:null},on:{click:e.selectItem}},[e._t("default")],2)},staticRenderFns:[]},void 0,{name:"BDropdownItem",props:{value:{type:[String,Number,Boolean,Object,Array,Function],default:null},separator:Boolean,disabled:Boolean,custom:Boolean,focusable:{type:Boolean,default:!0},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")}},void 0,!1,void 0,void 0,void 0);var d=l({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",{staticClass:"icon",class:[e.newType,e.size]},[e.useIconComponent?i(e.useIconComponent,{tag:"component",class:[e.customClass],attrs:{icon:[e.newPack,e.newIcon],size:e.newCustomSize}}):i("i",{class:[e.newPack,e.newIcon,e.newCustomSize,e.customClass]})],1)},staticRenderFns:[]},void 0,{name:"BIcon",props:{type:[String,Object],pack:String,icon:String,size:String,customSize:String,customClass:String,both:Boolean},computed:{newIcon:function(){return"mdi"===this.newPack?"".concat(this.newPack,"-").concat(this.icon):this.addFAPrefix(this.getEquivalentIconOf(this.icon))},newPack:function(){return this.pack||i.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-".concat(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"),i="mdi"===this.newPack?"mdi-48px":this.addFAPrefix("3x");switch(this.size){case"is-small":return;case"is-medium":return t;case"is-large":return i;default:return e}},useIconComponent:function(){return i.defaultIconComponent}},methods:{addFAPrefix:function(e){return this.useIconComponent?e:"fa-".concat(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}}}},void 0,!1,void 0,void 0,void 0);var h=l({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"control",class:e.rootClasses},["textarea"!==e.type?i("input",e._b({ref:"input",staticClass:"input",class:[e.inputClasses,e.customClass],attrs:{type:e.newType,autocomplete:e.newAutocomplete,maxlength:e.maxlength},domProps:{value:e.computedValue},on:{input:e.onInput,blur:e.onBlur,focus:e.onFocus}},"input",e.$attrs,!1)):i("textarea",e._b({ref:"textarea",staticClass:"textarea",class:[e.inputClasses,e.customClass],attrs:{maxlength:e.maxlength},domProps:{value:e.computedValue},on:{input:e.onInput,blur:e.onBlur,focus:e.onFocus}},"textarea",e.$attrs,!1)),e._v(" "),e.icon?i("b-icon",{staticClass:"is-left",attrs:{icon:e.icon,pack:e.iconPack,size:e.iconSize}}):e._e(),e._v(" "),e.loading||!e.passwordReveal&&!e.statusTypeIcon?e._e():i("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?i("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:[]},void 0,{name:"BInput",components:t({},d.name,d),mixins:[n],inheritAttrs:!1,props:{value:[Number,String],type:{type:String,default:"text"},passwordReveal:Boolean,hasCounter:{type:Boolean,default:function(){return i.defaultInputHasCounter}},customClass:{type:String,default:""}},data:function(){return{newValue:this.value,newType:this.type,newAutocomplete:this.autocomplete||i.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.statusTypeIcon},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)})}}},void 0,!1,void 0,void 0,void 0);var f=l({},void 0,{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(i){return i.tag?t.message?e("b-field",{attrs:{message:t.message,type:t.type}},[i]):e("b-field",{attrs:{type:t.type}},[i]):i}))}},void 0,void 0,void 0,void 0,void 0);var p=l({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"field",class:[e.rootClasses,e.fieldType()]},[e.horizontal?i("div",{staticClass:"field-label",class:[e.customClass,e.fieldLabelSize]},[e.hasLabel?i("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?i("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?i("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?i("p",{staticClass:"help",class:e.newType,domProps:{innerHTML:e._s(e.formattedMessage)}}):e._e()],2)},staticRenderFns:[]},void 0,{name:"BField",components:t({},f.name,f),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 i.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},this.numberInputClasses]},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 i in t)t[i]&&e.push(i)});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},numberInputClasses:function(){if(this.$slots.default){var e=this.$slots.default.filter(function(e){return e.tag&&e.tag.toLowerCase().indexOf("numberinput")>=0})[0];if(e){var t=["has-numberinput"],i=e.componentOptions.propsData.controlsPosition,n=e.componentOptions.propsData.size;return i&&t.push("has-numberinput-".concat(i)),n&&t.push("has-numberinput-".concat(n)),t}}return null}},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(){this.horizontal&&(this.$el.querySelectorAll(".input, .select, .button, .textarea, .b-slider").length>0&&(this.fieldLabelSize="is-normal"))}},void 0,!1,void 0,void 0,void 0);var m,g=l({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"b-clockpicker-face",on:{mousedown:e.onMouseDown,mouseup:e.onMouseUp,mousemove:e.onDragMove,touchstart:e.onMouseDown,touchend:e.onMouseUp,touchmove:e.onDragMove}},[i("div",{ref:"clock",staticClass:"b-clockpicker-face-outer-ring"},[i("div",{staticClass:"b-clockpicker-face-hand",style:e.handStyle}),e._v(" "),e._l(e.faceNumbers,function(t,n){return i("span",{key:n,staticClass:"b-clockpicker-face-number",class:e.getFaceNumberClasses(t),style:{transform:e.getNumberTranslate(t.value)}},[i("span",[e._v(e._s(t.label))])])})],2)])},staticRenderFns:[]},void 0,{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),i=this.shortestDistanceDegrees(e,t);return this.prevAngle+i},handScale:function(){return this.calcHandScale(this.displayedValue)},handStyle:function(){return{transform:"rotate(".concat(this.handRotateAngle,"deg) scaleY(").concat(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 i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)},shortestDistanceDegrees:function(e,t){var i=(t-e)%360,n=180-Math.abs(Math.abs(i)-180);return(i+360)%360<180?1*n:-1*n},coordToAngle:function(e,t){var i=2*Math.atan2(t.y-e.y-this.euclidean(e,t),t.x-e.x);return Math.abs(180*i/Math.PI)},getNumberTranslate:function(e){var t=this.getNumberCoords(e),i=t.x,n=t.y;return"translate(".concat(i,"px, ").concat(n,"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(),i=t.width,n=t.top,s=t.left,a="touches"in e?e.touches[0]:e,o={x:i/2,y:-i/2},r={x:a.clientX-s,y:n-a.clientY},l=Math.round(this.coordToAngle(o,r)+360)%360,u=this.double&&this.euclidean(o,r)<(this.outerRadius+this.innerRadius)/2-16,c=Math.round(l/this.degreesPerUnit)+this.min+(u?this.countPerRing:0);l>=360-this.degreesPerUnit/2&&(c=u?this.max:this.min),this.update(c)}},update:function(e){this.inputValue===e||this.isDisabled(e)||(this.prevAngle=this.handRotateAngle,this.inputValue=e,this.$emit("input",e))}}},void 0,!1,void 0,void 0,void 0);var v,b=l({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"b-clockpicker control",class:[e.size,e.type,{"is-expanded":e.expanded}]},[!e.isMobile||e.inline?i("b-dropdown",{ref:"dropdown",attrs:{position:e.position,disabled:e.disabled,inline:e.inline}},[e.inline?e._e():i("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(" "),i("div",{staticClass:"card",attrs:{disabled:e.disabled,custom:""}},[e.inline?i("header",{staticClass:"card-header"},[i("div",{staticClass:"b-clockpicker-header card-header-title"},[i("div",{staticClass:"b-clockpicker-time"},[i("span",{staticClass:"b-clockpicker-btn",class:{active:e.isSelectingHour},on:{click:function(t){e.isSelectingHour=!0}}},[e._v(e._s(e.hoursDisplay))]),e._v(" "),i("span",[e._v(":")]),e._v(" "),i("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():i("div",{staticClass:"b-clockpicker-period"},[i("div",{staticClass:"b-clockpicker-btn",class:{active:e.meridienSelected==e.AM},on:{click:function(t){e.onMeridienClick(e.AM)}}},[e._v("am")]),e._v(" "),i("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(" "),i("div",{staticClass:"card-content"},[i("div",{staticClass:"b-clockpicker-body",style:{width:e.faceSize+"px",height:e.faceSize+"px"}},[e.inline?e._e():i("div",{staticClass:"b-clockpicker-time"},[i("div",{staticClass:"b-clockpicker-btn",class:{active:e.isSelectingHour},on:{click:function(t){e.isSelectingHour=!0}}},[e._v("Hours")]),e._v(" "),i("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():i("div",{staticClass:"b-clockpicker-period"},[i("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(" "),i("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(" "),i("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?i("footer",{staticClass:"b-clockpicker-footer card-footer"},[e._t("default")],2):e._e()])],1):i("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:[]},void 0,{name:"BClockpicker",components:(m={},t(m,g.name,g),t(m,h.name,h),t(m,p.name,p),t(m,d.name,d),t(m,u.name,u),t(m,c.name,c),m),mixins:[r],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},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))}}},void 0,!1,void 0,void 0,void 0),S={install:function(e){!function(e,t){e.component(t.name,t)}(e,b)}};v=S,"undefined"!=typeof window&&window.Vue&&window.Vue.use(v),e.Clockpicker=b,e.default=S,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! Buefy v0.8.
|
|
1
|
+
/*! Buefy v0.8.2 | MIT License | github.com/buefy/buefy */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
5
|
-
(global = global || self, factory(global.
|
|
5
|
+
(global = global || self, factory(global.Collapse = {}));
|
|
6
6
|
}(this, function (exports) { 'use strict';
|
|
7
7
|
|
|
8
8
|
//
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/*! Buefy v0.8.2 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Collapse={})}(this,function(e){"use strict";var t,n=function(e,t,n,i,o,s,a,r,d,p){"boolean"!=typeof a&&(d=r,r=a,a=!1);var l,c="function"==typeof n?n.options:n;if(e&&e.render&&(c.render=e.render,c.staticRenderFns=e.staticRenderFns,c._compiled=!0,o&&(c.functional=!0)),i&&(c._scopeId=i),s?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,d(e)),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):t&&(l=a?function(){t.call(this,p(this.$root.$options.shadowRoot))}:function(e){t.call(this,r(e))}),l)if(c.functional){var f=c.render;c.render=function(e,t){return l.call(t),f(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return n}({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"collapse"},[n("div",{staticClass:"collapse-trigger",on:{click:e.toggle}},[e._t("trigger",null,{open:e.isOpen})],2),e._v(" "),n("transition",{attrs:{name:e.animation}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isOpen,expression:"isOpen"}],staticClass:"collapse-content",attrs:{id:e.ariaId,"aria-expanded":e.isOpen}},[e._t("default")],2)])],1)},staticRenderFns:[]},void 0,{name:"BCollapse",props:{open:{type:Boolean,default:!0},animation:{type:String,default:"fade"},ariaId:{type:String,default:""}},data:function(){return{isOpen:this.open}},watch:{open:function(e){this.isOpen=e}},methods:{toggle:function(){this.isOpen=!this.isOpen,this.$emit("update:open",this.isOpen),this.$emit(this.isOpen?"open":"close")}}},void 0,!1,void 0,void 0,void 0),i={install:function(e){!function(e,t){e.component(t.name,t)}(e,n)}};t=i,"undefined"!=typeof window&&window.Vue&&window.Vue.use(t),e.Collapse=n,e.default=i,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! Buefy v0.8.
|
|
1
|
+
/*! Buefy v0.8.2 | MIT License | github.com/buefy/buefy */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
5
|
-
(global = global || self, factory(global.
|
|
5
|
+
(global = global || self, factory(global.Datepicker = {}));
|
|
6
6
|
}(this, function (exports) { 'use strict';
|
|
7
7
|
|
|
8
8
|
function _defineProperty(obj, key, value) {
|
|
@@ -1476,10 +1476,14 @@
|
|
|
1476
1476
|
//
|
|
1477
1477
|
//
|
|
1478
1478
|
//
|
|
1479
|
+
//
|
|
1479
1480
|
var script$7 = {
|
|
1480
1481
|
name: 'BDatepickerTableRow',
|
|
1481
1482
|
props: {
|
|
1482
|
-
selectedDate:
|
|
1483
|
+
selectedDate: {
|
|
1484
|
+
type: [Date, Array]
|
|
1485
|
+
},
|
|
1486
|
+
hoveredDateRange: Array,
|
|
1483
1487
|
week: {
|
|
1484
1488
|
type: Array,
|
|
1485
1489
|
required: true
|
|
@@ -1646,17 +1650,45 @@
|
|
|
1646
1650
|
return false;
|
|
1647
1651
|
}
|
|
1648
1652
|
|
|
1653
|
+
if (Array.isArray(dateTwo)) {
|
|
1654
|
+
return dateTwo.some(function (date) {
|
|
1655
|
+
return dateOne.getDate() === date.getDate() && dateOne.getFullYear() === date.getFullYear() && dateOne.getMonth() === date.getMonth();
|
|
1656
|
+
});
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1649
1659
|
return dateOne.getDate() === dateTwo.getDate() && dateOne.getFullYear() === dateTwo.getFullYear() && dateOne.getMonth() === dateTwo.getMonth();
|
|
1650
1660
|
}
|
|
1651
1661
|
|
|
1662
|
+
function dateWithin(dateOne, dates) {
|
|
1663
|
+
if (!Array.isArray(dates)) {
|
|
1664
|
+
return false;
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
return dateOne > dates[0] && dateOne < dates[1];
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1652
1670
|
return {
|
|
1653
|
-
'is-selected': dateMatch(day, this.selectedDate),
|
|
1671
|
+
'is-selected': dateMatch(day, this.selectedDate) || dateWithin(day, this.selectedDate),
|
|
1672
|
+
'is-first-selected': dateMatch(day, Array.isArray(this.selectedDate) && this.selectedDate[0]),
|
|
1673
|
+
'is-within-selected': dateWithin(day, this.selectedDate),
|
|
1674
|
+
'is-last-selected': dateMatch(day, Array.isArray(this.selectedDate) && this.selectedDate[1]),
|
|
1675
|
+
'is-within-hovered-range': this.hoveredDateRange && this.hoveredDateRange.length === 2 && (dateMatch(day, this.hoveredDateRange) || dateWithin(day, this.hoveredDateRange)),
|
|
1676
|
+
'is-first-hovered': dateMatch(day, Array.isArray(this.hoveredDateRange) && this.hoveredDateRange[0]),
|
|
1677
|
+
'is-within-hovered': dateWithin(day, this.hoveredDateRange),
|
|
1678
|
+
'is-last-hovered': dateMatch(day, Array.isArray(this.hoveredDateRange) && this.hoveredDateRange[1]),
|
|
1654
1679
|
'is-today': dateMatch(day, this.dateCreator()),
|
|
1655
1680
|
'is-selectable': this.selectableDate(day) && !this.disabled,
|
|
1656
1681
|
'is-unselectable': !this.selectableDate(day) || this.disabled,
|
|
1657
1682
|
'is-invisible': !this.nearbyMonthDays && day.getMonth() !== this.month,
|
|
1658
1683
|
'is-nearby': this.nearbySelectableMonthDays && day.getMonth() !== this.month
|
|
1659
1684
|
};
|
|
1685
|
+
},
|
|
1686
|
+
setRangeHoverEndDate: function setRangeHoverEndDate(day) {
|
|
1687
|
+
var isRangeInput = Array.isArray(this.selectedDate);
|
|
1688
|
+
|
|
1689
|
+
if (isRangeInput) {
|
|
1690
|
+
this.$emit('rangeHoverEndDate', day);
|
|
1691
|
+
}
|
|
1660
1692
|
}
|
|
1661
1693
|
}
|
|
1662
1694
|
};
|
|
@@ -1665,7 +1697,7 @@
|
|
|
1665
1697
|
const __vue_script__$7 = script$7;
|
|
1666
1698
|
|
|
1667
1699
|
/* template */
|
|
1668
|
-
var __vue_render__$6 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"datepicker-row"},[(_vm.showWeekNumber)?_c('a',{staticClass:"datepicker-cell is-week-number"},[_vm._v("\n "+_vm._s(_vm.getWeekNumber(_vm.week[6]))+"\n ")]):_vm._e(),_vm._v(" "),_vm._l((_vm.week),function(day,index){return [(_vm.selectableDate(day) && !_vm.disabled)?_c('a',{key:index,staticClass:"datepicker-cell",class:[_vm.classObject(day), {'has-event': _vm.eventsDateMatch(day)}, _vm.indicators],attrs:{"role":"button","href":"#","disabled":_vm.disabled},on:{"click":function($event){$event.preventDefault();_vm.emitChosenDate(day);},"keydown":[function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }$event.preventDefault();_vm.emitChosenDate(day);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"space",32,$event.key)){ return null; }$event.preventDefault();_vm.emitChosenDate(day);}]}},[_vm._v("\n "+_vm._s(day.getDate())+"\n "),(_vm.eventsDateMatch(day))?_c('div',{staticClass:"events"},_vm._l((_vm.eventsDateMatch(day)),function(event,index){return _c('div',{key:index,staticClass:"event",class:event.type})})):_vm._e()]):_c('div',{key:index,staticClass:"datepicker-cell",class:_vm.classObject(day)},[_vm._v("\n "+_vm._s(day.getDate())+"\n ")])]})],2)};
|
|
1700
|
+
var __vue_render__$6 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"datepicker-row"},[(_vm.showWeekNumber)?_c('a',{staticClass:"datepicker-cell is-week-number"},[_vm._v("\n "+_vm._s(_vm.getWeekNumber(_vm.week[6]))+"\n ")]):_vm._e(),_vm._v(" "),_vm._l((_vm.week),function(day,index){return [(_vm.selectableDate(day) && !_vm.disabled)?_c('a',{key:index,staticClass:"datepicker-cell",class:[_vm.classObject(day), {'has-event': _vm.eventsDateMatch(day)}, _vm.indicators],attrs:{"role":"button","href":"#","disabled":_vm.disabled},on:{"click":function($event){$event.preventDefault();_vm.emitChosenDate(day);},"keydown":[function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }$event.preventDefault();_vm.emitChosenDate(day);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"space",32,$event.key)){ return null; }$event.preventDefault();_vm.emitChosenDate(day);}],"mouseenter":function($event){_vm.setRangeHoverEndDate(day);}}},[_vm._v("\n "+_vm._s(day.getDate())+"\n "),(_vm.eventsDateMatch(day))?_c('div',{staticClass:"events"},_vm._l((_vm.eventsDateMatch(day)),function(event,index){return _c('div',{key:index,staticClass:"event",class:event.type})})):_vm._e()]):_c('div',{key:index,staticClass:"datepicker-cell",class:_vm.classObject(day)},[_vm._v("\n "+_vm._s(day.getDate())+"\n ")])]})],2)};
|
|
1669
1701
|
var __vue_staticRenderFns__$6 = [];
|
|
1670
1702
|
|
|
1671
1703
|
/* style */
|
|
@@ -1693,11 +1725,17 @@
|
|
|
1693
1725
|
undefined
|
|
1694
1726
|
);
|
|
1695
1727
|
|
|
1728
|
+
var isDefined = function isDefined(d) {
|
|
1729
|
+
return d !== undefined;
|
|
1730
|
+
};
|
|
1731
|
+
|
|
1696
1732
|
var script$8 = {
|
|
1697
1733
|
name: 'BDatepickerTable',
|
|
1698
1734
|
components: _defineProperty({}, DatepickerTableRow.name, DatepickerTableRow),
|
|
1699
1735
|
props: {
|
|
1700
|
-
value:
|
|
1736
|
+
value: {
|
|
1737
|
+
type: [Date, Array]
|
|
1738
|
+
},
|
|
1701
1739
|
dayNames: Array,
|
|
1702
1740
|
monthNames: Array,
|
|
1703
1741
|
firstDayOfWeek: Number,
|
|
@@ -1724,7 +1762,15 @@
|
|
|
1724
1762
|
default: function _default() {
|
|
1725
1763
|
return 4;
|
|
1726
1764
|
}
|
|
1727
|
-
}
|
|
1765
|
+
},
|
|
1766
|
+
range: Boolean
|
|
1767
|
+
},
|
|
1768
|
+
data: function data() {
|
|
1769
|
+
return {
|
|
1770
|
+
selectedBeginDate: undefined,
|
|
1771
|
+
selectedEndDate: undefined,
|
|
1772
|
+
hoveredEndDate: undefined
|
|
1773
|
+
};
|
|
1728
1774
|
},
|
|
1729
1775
|
computed: {
|
|
1730
1776
|
visibleDayNames: function visibleDayNames() {
|
|
@@ -1799,6 +1845,21 @@
|
|
|
1799
1845
|
}
|
|
1800
1846
|
|
|
1801
1847
|
return weeksInThisMonth;
|
|
1848
|
+
},
|
|
1849
|
+
hoveredDateRange: function hoveredDateRange() {
|
|
1850
|
+
if (!this.range) {
|
|
1851
|
+
return [];
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
if (!isNaN(this.selectedEndDate)) {
|
|
1855
|
+
return [];
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
if (this.hoveredEndDate < this.selectedBeginDate) {
|
|
1859
|
+
return [this.hoveredEndDate, this.selectedBeginDate].filter(isDefined);
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
return [this.selectedBeginDate, this.hoveredEndDate].filter(isDefined);
|
|
1802
1863
|
}
|
|
1803
1864
|
},
|
|
1804
1865
|
methods: {
|
|
@@ -1806,7 +1867,34 @@
|
|
|
1806
1867
|
* Emit input event with selected date as payload for v-model in parent
|
|
1807
1868
|
*/
|
|
1808
1869
|
updateSelectedDate: function updateSelectedDate(date) {
|
|
1809
|
-
this
|
|
1870
|
+
if (!this.range) {
|
|
1871
|
+
this.$emit('input', date);
|
|
1872
|
+
} else {
|
|
1873
|
+
this.handleSelectRangeDate(date);
|
|
1874
|
+
}
|
|
1875
|
+
},
|
|
1876
|
+
|
|
1877
|
+
/*
|
|
1878
|
+
* If both begin and end dates are set, reset the end date and set the begin date.
|
|
1879
|
+
* If only begin date is selected, emit an array of the begin date and the new date.
|
|
1880
|
+
* If not set, only set the begin date.
|
|
1881
|
+
*/
|
|
1882
|
+
handleSelectRangeDate: function handleSelectRangeDate(date) {
|
|
1883
|
+
if (this.selectedBeginDate && this.selectedEndDate) {
|
|
1884
|
+
this.selectedBeginDate = date;
|
|
1885
|
+
this.selectedEndDate = undefined;
|
|
1886
|
+
} else if (this.selectedBeginDate && !this.selectedEndDate) {
|
|
1887
|
+
if (this.selectedBeginDate > date) {
|
|
1888
|
+
this.selectedEndDate = this.selectedBeginDate;
|
|
1889
|
+
this.selectedBeginDate = date;
|
|
1890
|
+
} else {
|
|
1891
|
+
this.selectedEndDate = date;
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
this.$emit('input', [this.selectedBeginDate, this.selectedEndDate]);
|
|
1895
|
+
} else {
|
|
1896
|
+
this.selectedBeginDate = date;
|
|
1897
|
+
}
|
|
1810
1898
|
},
|
|
1811
1899
|
|
|
1812
1900
|
/*
|
|
@@ -1846,6 +1934,9 @@
|
|
|
1846
1934
|
return weekDate.getTime() === timed;
|
|
1847
1935
|
});
|
|
1848
1936
|
});
|
|
1937
|
+
},
|
|
1938
|
+
setRangeHoverEndDate: function setRangeHoverEndDate(day) {
|
|
1939
|
+
this.hoveredEndDate = day;
|
|
1849
1940
|
}
|
|
1850
1941
|
}
|
|
1851
1942
|
};
|
|
@@ -1854,7 +1945,7 @@
|
|
|
1854
1945
|
const __vue_script__$8 = script$8;
|
|
1855
1946
|
|
|
1856
1947
|
/* template */
|
|
1857
|
-
var __vue_render__$7 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:"datepicker-table"},[_c('header',{staticClass:"datepicker-header"},_vm._l((_vm.visibleDayNames),function(day,index){return _c('div',{key:index,staticClass:"datepicker-cell"},[_vm._v("\n "+_vm._s(day)+"\n ")])})),_vm._v(" "),_c('div',{staticClass:"datepicker-body",class:{'has-events':_vm.hasEvents}},_vm._l((_vm.weeksInThisMonth),function(week,index){return _c('b-datepicker-table-row',{key:index,attrs:{"selected-date":_vm.value,"week":week,"month":_vm.focused.month,"min-date":_vm.minDate,"max-date":_vm.maxDate,"disabled":_vm.disabled,"unselectable-dates":_vm.unselectableDates,"unselectable-days-of-week":_vm.unselectableDaysOfWeek,"selectable-dates":_vm.selectableDates,"events":_vm.eventsInThisWeek(week),"indicators":_vm.indicators,"date-creator":_vm.dateCreator,"nearby-month-days":_vm.nearbyMonthDays,"nearby-selectable-month-days":_vm.nearbySelectableMonthDays,"show-week-number":_vm.showWeekNumber,"first-day-of-week":_vm.firstDayOfWeek,"rules-for-first-week":_vm.rulesForFirstWeek},on:{"select":_vm.updateSelectedDate}})}))])};
|
|
1948
|
+
var __vue_render__$7 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:"datepicker-table"},[_c('header',{staticClass:"datepicker-header"},_vm._l((_vm.visibleDayNames),function(day,index){return _c('div',{key:index,staticClass:"datepicker-cell"},[_vm._v("\n "+_vm._s(day)+"\n ")])})),_vm._v(" "),_c('div',{staticClass:"datepicker-body",class:{'has-events':_vm.hasEvents}},_vm._l((_vm.weeksInThisMonth),function(week,index){return _c('b-datepicker-table-row',{key:index,attrs:{"selected-date":_vm.value,"week":week,"month":_vm.focused.month,"min-date":_vm.minDate,"max-date":_vm.maxDate,"disabled":_vm.disabled,"unselectable-dates":_vm.unselectableDates,"unselectable-days-of-week":_vm.unselectableDaysOfWeek,"selectable-dates":_vm.selectableDates,"events":_vm.eventsInThisWeek(week),"indicators":_vm.indicators,"date-creator":_vm.dateCreator,"nearby-month-days":_vm.nearbyMonthDays,"nearby-selectable-month-days":_vm.nearbySelectableMonthDays,"show-week-number":_vm.showWeekNumber,"first-day-of-week":_vm.firstDayOfWeek,"rules-for-first-week":_vm.rulesForFirstWeek,"range":_vm.range,"hovered-date-range":_vm.hoveredDateRange},on:{"select":_vm.updateSelectedDate,"rangeHoverEndDate":_vm.setRangeHoverEndDate}})}))])};
|
|
1858
1949
|
var __vue_staticRenderFns__$7 = [];
|
|
1859
1950
|
|
|
1860
1951
|
/* style */
|
|
@@ -2117,12 +2208,15 @@
|
|
|
2117
2208
|
var _components;
|
|
2118
2209
|
|
|
2119
2210
|
var defaultDateFormatter = function defaultDateFormatter(date, vm) {
|
|
2120
|
-
var
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2211
|
+
var targetDates = Array.isArray(date) ? date : [date];
|
|
2212
|
+
return targetDates.map(function (date) {
|
|
2213
|
+
var yyyyMMdd = date.getFullYear() + '/' + (date.getMonth() + 1) + '/' + date.getDate();
|
|
2214
|
+
var d = new Date(yyyyMMdd);
|
|
2215
|
+
return !vm.isTypeMonth ? d.toLocaleDateString() : d.toLocaleDateString(undefined, {
|
|
2216
|
+
year: 'numeric',
|
|
2217
|
+
month: '2-digit'
|
|
2218
|
+
});
|
|
2219
|
+
}).join(' - ');
|
|
2126
2220
|
};
|
|
2127
2221
|
|
|
2128
2222
|
var defaultDateParser = function defaultDateParser(date, vm) {
|
|
@@ -2147,7 +2241,9 @@
|
|
|
2147
2241
|
mixins: [FormElementMixin],
|
|
2148
2242
|
inheritAttrs: false,
|
|
2149
2243
|
props: {
|
|
2150
|
-
value:
|
|
2244
|
+
value: {
|
|
2245
|
+
type: [Date, Array]
|
|
2246
|
+
},
|
|
2151
2247
|
dayNames: {
|
|
2152
2248
|
type: Array,
|
|
2153
2249
|
default: function _default() {
|
|
@@ -2271,10 +2367,14 @@
|
|
|
2271
2367
|
default: function _default() {
|
|
2272
2368
|
return 4;
|
|
2273
2369
|
}
|
|
2370
|
+
},
|
|
2371
|
+
range: {
|
|
2372
|
+
type: Boolean,
|
|
2373
|
+
default: false
|
|
2274
2374
|
}
|
|
2275
2375
|
},
|
|
2276
2376
|
data: function data() {
|
|
2277
|
-
var focusedDate = this.value || this.focusedDate || this.dateCreator();
|
|
2377
|
+
var focusedDate = Array.isArray(this.value) ? this.value[0] : this.value || this.focusedDate || this.dateCreator();
|
|
2278
2378
|
return {
|
|
2279
2379
|
dateSelected: this.value,
|
|
2280
2380
|
focusedDateData: {
|
|
@@ -2401,11 +2501,14 @@
|
|
|
2401
2501
|
* Format date into string
|
|
2402
2502
|
*/
|
|
2403
2503
|
formatValue: function formatValue(value) {
|
|
2404
|
-
if (
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2504
|
+
if (Array.isArray(value)) {
|
|
2505
|
+
var isArrayWithValidDates = Array.isArray(value) && value.every(function (v) {
|
|
2506
|
+
return !isNaN(v);
|
|
2507
|
+
});
|
|
2508
|
+
return isArrayWithValidDates ? this.dateFormatter(value, this) : null;
|
|
2408
2509
|
}
|
|
2510
|
+
|
|
2511
|
+
return value && !isNaN(value) ? this.dateFormatter(value, this) : null;
|
|
2409
2512
|
},
|
|
2410
2513
|
|
|
2411
2514
|
/*
|
|
@@ -2488,7 +2591,7 @@
|
|
|
2488
2591
|
this.computedValue = date ? new Date(date + ' 00:00:00') : null;
|
|
2489
2592
|
},
|
|
2490
2593
|
updateInternalState: function updateInternalState(value) {
|
|
2491
|
-
var currentDate = !value ? this.dateCreator() : value;
|
|
2594
|
+
var currentDate = Array.isArray(value) ? value[0] : !value ? this.dateCreator() : value;
|
|
2492
2595
|
this.focusedDateData = {
|
|
2493
2596
|
month: currentDate.getMonth(),
|
|
2494
2597
|
year: currentDate.getFullYear()
|
|
@@ -2540,8 +2643,8 @@
|
|
|
2540
2643
|
},
|
|
2541
2644
|
|
|
2542
2645
|
/**
|
|
2543
|
-
|
|
2544
|
-
|
|
2646
|
+
* Keypress event that is bound to the document.
|
|
2647
|
+
*/
|
|
2545
2648
|
keyPress: function keyPress(event) {
|
|
2546
2649
|
// Esc key
|
|
2547
2650
|
if (this.$refs.dropdown && this.$refs.dropdown.isActive && event.keyCode === 27) {
|
|
@@ -2565,7 +2668,7 @@
|
|
|
2565
2668
|
const __vue_script__$a = script$a;
|
|
2566
2669
|
|
|
2567
2670
|
/* template */
|
|
2568
|
-
var __vue_render__$9 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"datepicker control",class:[_vm.size, {'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,"rounded":_vm.rounded,"loading":_vm.loading,"disabled":_vm.disabled,"readonly":!_vm.editable,"use-html5-validation":_vm.useHtml5Validation},on:{"focus":_vm.handleOnFocus,"blur":_vm.onBlur},nativeOn:{"click":function($event){_vm.onInputClick($event);},"keyup":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }_vm.togglePicker(true);},"change":function($event){_vm.onChange($event.target.value);}},slot:"trigger"},'b-input',_vm.$attrs,false)):_vm._e(),_vm._v(" "),_c('b-dropdown-item',{attrs:{"disabled":_vm.disabled,"custom":""}},[_c('header',{staticClass:"datepicker-header"},[(_vm.$slots.header !== undefined && _vm.$slots.header.length)?[_vm._t("header")]:_c('div',{staticClass:"pagination field is-centered",class:_vm.size},[_c('a',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showPrev && !_vm.disabled),expression:"!showPrev && !disabled"}],staticClass:"pagination-previous",attrs:{"role":"button","href":"#","disabled":_vm.disabled},on:{"click":function($event){$event.preventDefault();_vm.prev($event);},"keydown":[function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }$event.preventDefault();_vm.prev($event);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"space",32,$event.key)){ return null; }$event.preventDefault();_vm.prev($event);}]}},[_c('b-icon',{attrs:{"icon":"chevron-left","pack":_vm.iconPack,"both":"","type":"is-primary is-clickable"}})],1),_vm._v(" "),_c('a',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showNext && !_vm.disabled),expression:"!showNext && !disabled"}],staticClass:"pagination-next",attrs:{"role":"button","href":"#","disabled":_vm.disabled},on:{"click":function($event){$event.preventDefault();_vm.next($event);},"keydown":[function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }$event.preventDefault();_vm.next($event);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"space",32,$event.key)){ return null; }$event.preventDefault();_vm.next($event);}]}},[_c('b-icon',{attrs:{"icon":"chevron-right","pack":_vm.iconPack,"both":"","type":"is-primary is-clickable"}})],1),_vm._v(" "),_c('div',{staticClass:"pagination-list"},[_c('b-field',[(!_vm.isTypeMonth)?_c('b-select',{attrs:{"disabled":_vm.disabled,"size":_vm.size},model:{value:(_vm.focusedDateData.month),callback:function ($$v) {_vm.$set(_vm.focusedDateData, "month", $$v);},expression:"focusedDateData.month"}},_vm._l((_vm.monthNames),function(month,index){return _c('option',{key:month,domProps:{"value":index}},[_vm._v("\n "+_vm._s(month)+"\n ")])})):_vm._e(),_vm._v(" "),_c('b-select',{attrs:{"disabled":_vm.disabled,"size":_vm.size},model:{value:(_vm.focusedDateData.year),callback:function ($$v) {_vm.$set(_vm.focusedDateData, "year", $$v);},expression:"focusedDateData.year"}},_vm._l((_vm.listOfYears),function(year){return _c('option',{key:year,domProps:{"value":year}},[_vm._v("\n "+_vm._s(year)+"\n ")])}))],1)],1)])],2),_vm._v(" "),(!_vm.isTypeMonth)?_c('div',{staticClass:"datepicker-content"},[_c('b-datepicker-table',{attrs:{"day-names":_vm.dayNames,"month-names":_vm.monthNames,"first-day-of-week":_vm.firstDayOfWeek,"rules-for-first-week":_vm.rulesForFirstWeek,"min-date":_vm.minDate,"max-date":_vm.maxDate,"focused":_vm.focusedDateData,"disabled":_vm.disabled,"unselectable-dates":_vm.unselectableDates,"unselectable-days-of-week":_vm.unselectableDaysOfWeek,"selectable-dates":_vm.selectableDates,"events":_vm.events,"indicators":_vm.indicators,"date-creator":_vm.dateCreator,"type-month":_vm.isTypeMonth,"nearby-month-days":_vm.nearbyMonthDays,"nearby-selectable-month-days":_vm.nearbySelectableMonthDays,"show-week-number":_vm.showWeekNumber},on:{"close":function($event){_vm.togglePicker(false);}},model:{value:(_vm.computedValue),callback:function ($$v) {_vm.computedValue=$$v;},expression:"computedValue"}})],1):_c('div',[_c('b-datepicker-month',{attrs:{"month-names":_vm.monthNames,"min-date":_vm.minDate,"max-date":_vm.maxDate,"focused":_vm.focusedDateData,"disabled":_vm.disabled,"unselectable-dates":_vm.unselectableDates,"unselectable-days-of-week":_vm.unselectableDaysOfWeek,"selectable-dates":_vm.selectableDates,"events":_vm.events,"indicators":_vm.indicators,"date-creator":_vm.dateCreator},on:{"close":function($event){_vm.togglePicker(false);}},model:{value:(_vm.computedValue),callback:function ($$v) {_vm.computedValue=$$v;},expression:"computedValue"}})],1),_vm._v(" "),(_vm.$slots.default !== undefined && _vm.$slots.default.length)?_c('footer',{staticClass:"datepicker-footer"},[_vm._t("default")],2):_vm._e()])],1):_c('b-input',_vm._b({ref:"input",attrs:{"type":!_vm.isTypeMonth ? 'date' : 'month',"autocomplete":"off","value":_vm.formatNative(_vm.computedValue),"placeholder":_vm.placeholder,"size":_vm.size,"icon":_vm.icon,"icon-pack":_vm.iconPack,"loading":_vm.loading,"max":_vm.formatNative(_vm.maxDate),"min":_vm.formatNative(_vm.minDate),"disabled":_vm.disabled,"readonly":false,"show-week-number":_vm.showWeekNumber,"use-html5-validation":_vm.useHtml5Validation},on:{"focus":_vm.handleOnFocus,"blur":_vm.onBlur},nativeOn:{"change":function($event){_vm.onChangeNativePicker($event);}}},'b-input',_vm.$attrs,false))],1)};
|
|
2671
|
+
var __vue_render__$9 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"datepicker control",class:[_vm.size, {'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,"rounded":_vm.rounded,"loading":_vm.loading,"disabled":_vm.disabled,"readonly":!_vm.editable,"use-html5-validation":_vm.useHtml5Validation},on:{"focus":_vm.handleOnFocus,"blur":_vm.onBlur},nativeOn:{"click":function($event){_vm.onInputClick($event);},"keyup":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }_vm.togglePicker(true);},"change":function($event){_vm.onChange($event.target.value);}},slot:"trigger"},'b-input',_vm.$attrs,false)):_vm._e(),_vm._v(" "),_c('b-dropdown-item',{attrs:{"disabled":_vm.disabled,"custom":""}},[_c('header',{staticClass:"datepicker-header"},[(_vm.$slots.header !== undefined && _vm.$slots.header.length)?[_vm._t("header")]:_c('div',{staticClass:"pagination field is-centered",class:_vm.size},[_c('a',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showPrev && !_vm.disabled),expression:"!showPrev && !disabled"}],staticClass:"pagination-previous",attrs:{"role":"button","href":"#","disabled":_vm.disabled},on:{"click":function($event){$event.preventDefault();_vm.prev($event);},"keydown":[function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }$event.preventDefault();_vm.prev($event);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"space",32,$event.key)){ return null; }$event.preventDefault();_vm.prev($event);}]}},[_c('b-icon',{attrs:{"icon":"chevron-left","pack":_vm.iconPack,"both":"","type":"is-primary is-clickable"}})],1),_vm._v(" "),_c('a',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showNext && !_vm.disabled),expression:"!showNext && !disabled"}],staticClass:"pagination-next",attrs:{"role":"button","href":"#","disabled":_vm.disabled},on:{"click":function($event){$event.preventDefault();_vm.next($event);},"keydown":[function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }$event.preventDefault();_vm.next($event);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"space",32,$event.key)){ return null; }$event.preventDefault();_vm.next($event);}]}},[_c('b-icon',{attrs:{"icon":"chevron-right","pack":_vm.iconPack,"both":"","type":"is-primary is-clickable"}})],1),_vm._v(" "),_c('div',{staticClass:"pagination-list"},[_c('b-field',[(!_vm.isTypeMonth)?_c('b-select',{attrs:{"disabled":_vm.disabled,"size":_vm.size},model:{value:(_vm.focusedDateData.month),callback:function ($$v) {_vm.$set(_vm.focusedDateData, "month", $$v);},expression:"focusedDateData.month"}},_vm._l((_vm.monthNames),function(month,index){return _c('option',{key:month,domProps:{"value":index}},[_vm._v("\n "+_vm._s(month)+"\n ")])})):_vm._e(),_vm._v(" "),_c('b-select',{attrs:{"disabled":_vm.disabled,"size":_vm.size},model:{value:(_vm.focusedDateData.year),callback:function ($$v) {_vm.$set(_vm.focusedDateData, "year", $$v);},expression:"focusedDateData.year"}},_vm._l((_vm.listOfYears),function(year){return _c('option',{key:year,domProps:{"value":year}},[_vm._v("\n "+_vm._s(year)+"\n ")])}))],1)],1)])],2),_vm._v(" "),(!_vm.isTypeMonth)?_c('div',{staticClass:"datepicker-content"},[_c('b-datepicker-table',{attrs:{"day-names":_vm.dayNames,"month-names":_vm.monthNames,"first-day-of-week":_vm.firstDayOfWeek,"rules-for-first-week":_vm.rulesForFirstWeek,"min-date":_vm.minDate,"max-date":_vm.maxDate,"focused":_vm.focusedDateData,"disabled":_vm.disabled,"unselectable-dates":_vm.unselectableDates,"unselectable-days-of-week":_vm.unselectableDaysOfWeek,"selectable-dates":_vm.selectableDates,"events":_vm.events,"indicators":_vm.indicators,"date-creator":_vm.dateCreator,"type-month":_vm.isTypeMonth,"nearby-month-days":_vm.nearbyMonthDays,"nearby-selectable-month-days":_vm.nearbySelectableMonthDays,"show-week-number":_vm.showWeekNumber,"range":_vm.range},on:{"close":function($event){_vm.togglePicker(false);}},model:{value:(_vm.computedValue),callback:function ($$v) {_vm.computedValue=$$v;},expression:"computedValue"}})],1):_c('div',[_c('b-datepicker-month',{attrs:{"month-names":_vm.monthNames,"min-date":_vm.minDate,"max-date":_vm.maxDate,"focused":_vm.focusedDateData,"disabled":_vm.disabled,"unselectable-dates":_vm.unselectableDates,"unselectable-days-of-week":_vm.unselectableDaysOfWeek,"selectable-dates":_vm.selectableDates,"events":_vm.events,"indicators":_vm.indicators,"date-creator":_vm.dateCreator},on:{"close":function($event){_vm.togglePicker(false);}},model:{value:(_vm.computedValue),callback:function ($$v) {_vm.computedValue=$$v;},expression:"computedValue"}})],1),_vm._v(" "),(_vm.$slots.default !== undefined && _vm.$slots.default.length)?_c('footer',{staticClass:"datepicker-footer"},[_vm._t("default")],2):_vm._e()])],1):_c('b-input',_vm._b({ref:"input",attrs:{"type":!_vm.isTypeMonth ? 'date' : 'month',"autocomplete":"off","value":_vm.formatNative(_vm.computedValue),"placeholder":_vm.placeholder,"size":_vm.size,"icon":_vm.icon,"icon-pack":_vm.iconPack,"loading":_vm.loading,"max":_vm.formatNative(_vm.maxDate),"min":_vm.formatNative(_vm.minDate),"disabled":_vm.disabled,"readonly":false,"show-week-number":_vm.showWeekNumber,"use-html5-validation":_vm.useHtml5Validation},on:{"focus":_vm.handleOnFocus,"blur":_vm.onBlur},nativeOn:{"change":function($event){_vm.onChangeNativePicker($event);}}},'b-input',_vm.$attrs,false))],1)};
|
|
2569
2672
|
var __vue_staticRenderFns__$9 = [];
|
|
2570
2673
|
|
|
2571
2674
|
/* style */
|