Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-ctk-date-time-picker

Package Overview
Dependencies
Maintainers
3
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-ctk-date-time-picker - npm Package Compare versions

Comparing version 1.3.5 to 1.3.6

3

dist/vue-ctk-date-time-picker.min.js

@@ -1,2 +0,1 @@

module.exports=function(t){function e(i){if(a[i])return a[i].exports;var n=a[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var a={};return e.m=t,e.c=a,e.d=function(t,a,i){e.o(t,a)||Object.defineProperty(t,a,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(a,"a",a),a},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=12)}([function(t,e){t.exports=function(t,e,a,i,n,s){var r,o=t=t||{},l=typeof t.default;"object"!==l&&"function"!==l||(r=t,o=t.default);var c="function"==typeof o?o.options:o;e&&(c.render=e.render,c.staticRenderFns=e.staticRenderFns,c._compiled=!0),a&&(c.functional=!0),n&&(c._scopeId=n);var u;if(s?(u=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=u):i&&(u=i),u){var d=c.functional,h=d?c.render:c.beforeCreate;d?(c._injectStyles=u,c.render=function(t,e){return u.call(e),h(t,e)}):c.beforeCreate=h?[].concat(h,u):[u]}return{esModule:r,exports:o,options:c}}},function(t,e){t.exports=require("moment")},function(t,e,a){"use strict";a.d(e,"b",function(){return f});var i=a(25),n=a.n(i),s=a(26),r=a.n(s),o=a(27),l=a.n(o),c=a(1),u=a.n(c),d=a(28),h=(a.n(d),Object(d.extendMoment)(u.a)),m=function(){function t(e,a){r()(this,t),this.start=h([a,e]),this.end=this.start.clone().endOf("month"),this.month=e,this.year=a}return l()(t,[{key:"getWeekStart",value:function(){return this.start.weekday()}},{key:"getDays",value:function(){return n()(h.range(this.start,this.end).by("days"))}},{key:"getFormatted",value:function(){return this.start.format("MMMM YYYY")}},{key:"getWeeks",value:function(){return this.end.week()-this.start.week()+1}},{key:"getMonthDays",value:function(){var t=h.range(this.start,this.end).by("days");return n()(t)}}]),t}();e.a=m;var f=function(t){var e=h.localeData(t).firstDayOfWeek();return h.weekdaysShort(1===e)}},function(t,e,a){"use strict";var i=a(15),n=a.n(i),s=a(16),r=a(33),o=function(t,e,a){var i=Math.ceil(e.minute()/t)*t;return a(e.clone().minute(i).second(0))};e.a={name:"VueCtkDateTimePicker",components:{CtkDatePickerAgenda:s.a,CtkDateRangePicker:r.a},props:{label:{type:String,default:"Select date & time"},hint:{type:String,default:String},errorHint:{type:Boolean,default:Boolean},value:{type:[String,Object],required:!1,default:null},formatted:{type:String,default:"llll"},format:{type:String,default:String},locale:{type:String,default:function(){return(window.navigator.userLanguage||window.navigator.language||"en").substr(0,2)}()},timeZone:{type:String,default:function(){return n.a.tz.guess()||"America/Los_Angeles"}()},disableTime:{type:Boolean,default:!1},disableDate:{type:Boolean,default:!1},minuteInterval:{type:Number,default:1},color:{type:String,default:String},timeFormat:{type:String,default:"h:mm a"},withoutHeader:{type:Boolean,default:!1},id:{type:String,default:"CtkDateTimePicker"},minDate:{type:String,default:String},maxDate:{type:String,default:String},withoutInput:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},noWeekendsDays:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},enableButtonValidate:{type:Boolean,default:!1},disabledDates:{type:Array,default:Array},rangeMode:{type:Boolean,default:!1},overlayBackground:{type:Boolean,default:!1},withoutRangeShortcut:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},shortcutsTranslation:{type:Object,default:Object}},data:function(){return{isVisible:!1,isFocus:!1,agendaPosition:"top",oldValue:this.value,clientWidth:null}},computed:{isInline:function(){return this.withoutInput||this.inline},getColorStyle:function(){return this.isFocus||this.isVisible?{color:this.color}:null},getBorderStyle:function(){return this.isFocus&&!this.errorHint||this.isVisible?{borderColor:this.color}:null},dateTime:function(){return this.rangeMode?this.getRangeDatesTime():this.getDateTime()},dateFormatted:function(){return this.rangeMode?this.getRangeDatesFormatted():this.getDateFormatted()},hasDisabledTime:function(){return this.disableTime||this.rangeMode}},created:function(){if(this.value){var t=this.rangeMode?this.value:this.disableDate?n()(n()().format("YYYY-MM-DD")+" "+this.value):n()(this.value).tz(this.timeZone);this.$emit("input",this.rangeMode?this.getRangeDatesTimeFormat(t):this.getDateTimeFormat(t))}else this.rangeMode&&this.$emit("input",this.getRangeDatesTimeFormat({}));n.a.tz(this.timeZone).locale(this.locale)},methods:{getDateTime:function(){var t=this.disableDate?this.value?n()(n()().tz(this.timeZone).format("YYYY-MM-DD")+" "+this.value).tz(this.timeZone):n()().tz(this.timeZone):this.value?n()(this.value).tz(this.timeZone):n()().tz(this.timeZone);return o(this.minuteInterval,t,n.a)},getDateTimeFormat:function(t){return o(this.minuteInterval,t,n.a).tz(this.timeZone).format(this.format)},getDateFormatted:function(){var t=this.value?this.disableDate?n()(n()().tz(this.timeZone).format("YYYY-MM-DD")+" "+this.value).tz(this.timeZone):n()(this.value).tz(this.timeZone):null;return t?o(this.minuteInterval,t,n.a).locale(this.locale).tz(this.timeZone).format(this.formatted):null},getRangeDatesTime:function(){var t=this.value&&this.value.start,e=this.value&&this.value.end;return{start:t?n()(this.value.start).tz(this.timeZone):null,end:e?n()(this.value.end).tz(this.timeZone):null}},getRangeDatesTimeFormat:function(t){var e=t.start,a=t.end;return{start:e?n()(e).tz(this.timeZone).format(this.format):null,end:a?n()(a).tz(this.timeZone).format(this.format):null}},getRangeDatesFormatted:function(){var t=this.value&&this.value.start,e=this.value&&this.value.end;if(t||e){var a=t?""+n()(this.value.start).tz(this.timeZone).locale(this.locale).format(this.formatted):"...";return e?a+" - "+n()(this.value.end).tz(this.timeZone).locale(this.locale).format(this.formatted):a+" - ..."}return null},changeDate:function(t){this.$emit("input",this.rangeMode?this.getRangeDatesTimeFormat(t):this.getDateTimeFormat(t)),this.autoClose&&this.rangeMode&&t.end&&t.start?this.hideDatePicker():this.autoClose&&!this.rangeMode&&this.hideDatePicker()},showDatePicker:function(){if(!this.disabled){this.setBodyOverflow(!0);var t=this.$refs.parent.getBoundingClientRect(),e=window.innerHeight,a=428;a=this.enableButtonValidate?a:382,a=this.withoutHeader?363:a;var i=e-(t.top+t.height)>a||e-t.top>e/2+t.height;this.agendaPosition=i?"top":"bottom",this.isVisible=!0}},hideDatePicker:function(){this.setBodyOverflow(),this.isVisible=!1},setBodyOverflow:function(t){if(window.innerWidth<412){document.getElementsByTagName("body")[0].style.overflow=t?"hidden":null}},onFocus:function(){this.isFocus=!0,this.showDatePicker()},unFocus:function(){this.hideDatePicker(),this.isFocus=!1},validate:function(){this.unFocus()}}}},function(t,e,a){"use strict";var i=a(18),n=a(6),s=a(8),r=a(2),o=a(1),l=a.n(o);e.a={name:"CtkDatePickerAgenda",components:{CtkTimePicker:i.a,CtkDatePicker:n.a,CtkButtonValidate:s.a},props:{dateTime:{type:Object,default:Object},visible:{type:Boolean,required:!0,default:!0},disableTime:{type:Boolean,default:Boolean},disableDate:{type:Boolean,default:Boolean},minuteInterval:{type:Number,default:Number},color:{type:String,default:String},timeFormat:{type:String,default:String},withoutHeader:{type:Boolean,default:Boolean},locale:{type:String,default:String},maxDate:{type:String,default:String},minDate:{type:String,default:String},inline:{type:Boolean,default:Boolean},agendaPosition:{type:String,default:String},noWeekendsDays:{type:Boolean,default:Boolean},autoClose:{type:Boolean,default:Boolean},enableButtonValidate:{type:Boolean,default:Boolean},value:{type:[String,Object],default:String},disabledDates:{type:Array,default:Array},dark:{type:Boolean,default:Boolean}},data:function(){return{month:this.getMonth(),transitionDayName:"slidevnext",timeWidth:this.disableTime?null:this.getTimePickerWidth()}},computed:{position:function(){return window.innerWidth<412?null:"top"===this.agendaPosition?{top:"100%",marginBottom:"10px"}:{bottom:"100%",marginTop:"10px"}},isFormatTwelve:function(){return!!this.timeFormat&&(this.timeFormat.indexOf("a")>-1||this.timeFormat.indexOf("A")>-1)},bgStyle:function(){return{backgroundColor:this.color,padding:this.disableDate?"10px 0":"10px 0 10px 10px"}},year:function(){return this.dateTime.format("YYYY")}},watch:{dateTime:{handler:function(){this.month=this.getMonth(),this.getDateFormatted()},deep:!0},locale:function(){this.month=this.getMonth(),this.getDateFormatted()},visible:function(t){var e=this;t&&!this.disableTime&&this.$nextTick(function(){e.timeWidth=e.getTimePickerWidth()})}},methods:{getMonth:function(){var t=this.dateTime;return new r.a(t.month(),t.year())},getDateFormatted:function(){return l()(this.dateTime).locale(this.locale).format("ddd D MMM")},selectTime:function(t){var e=t>this.dateTime;this.transitionDayName=e?"slidevnext":"slidevprev",this.$emit("change-date",t)},selectDate:function(t){var e=t.isBefore(this.dateTime);this.transitionDayName=e?"slidevprev":"slidevnext";var a=this.dateTime;t.add(a.hour(),"hours"),t.add(a.minute(),"minutes"),this.$emit("change-date",t)},changeMonth:function(t){var e=this.month.month+("prev"===t?-1:1),a=this.month.year;(e>11||e<0)&&(a+="prev"===t?-1:1,e="prev"===t?11:0),this.month=new r.a(e,a)},validate:function(){this.$emit("validate")},getTimePickerWidth:function(){var t=this.$refs.timePickerComponent&&this.$refs.timePickerComponent.$el.clientWidth,e=t?this.$refs.timePickerComponent.$el.clientWidth:160;return{flex:"0 0 "+e+"px",width:e+"px",minWidth:e+"px",maxWidth:e+"px"}}}}},function(t,e,a){"use strict";var i=a(20),n=a.n(i),s=a(21),r=a.n(s),o=a(1),l=a.n(o),c={HOUR_TOKENS:["HH","H","hh","h","kk","k"],MINUTE_TOKENS:["mm","m"],APM_TOKENS:["A","a"]};e.a={name:"CtkTimePicker",props:{format:{type:String,default:String},minuteInterval:{type:Number,default:Number},month:{type:Object,default:Object},dateTime:{type:Object,default:Object},color:{type:String,default:String},inline:{type:Boolean,default:Boolean},visible:{type:Boolean,default:Boolean},value:{type:String,default:String},disableDate:{type:Boolean,default:Boolean},dark:{type:Boolean,default:Boolean}},data:function(){return{hours:[],minutes:[],apms:[],muteWatch:!1,hourType:"HH",minuteType:"mm",apmType:"",hour:"",minute:"",apm:"",fullValues:void 0}},computed:{styleColor:function(){return{backgroundColor:this.color}},monthDays:function(){return this.month.getMonthDays()},weekDay:function(){return this.month.getWeekStart()},getHeight:function(){return{height:this.disableDate?"200px":this.month?this.monthDays.length+this.weekDay>35?"347px":"307px":"180px"}}},watch:{format:"renderFormat",minuteInterval:function(t){this.renderList("minute",t)},displayTime:"fillValues",visible:function(t){var e=this;t&&this.$nextTick(function(){["hours","minutes"].forEach(function(t){var a=e.$refs[""+t],i=e.$refs[""+t].querySelector(".item.active");if(i){a.scrollTop=0;var n=i.getBoundingClientRect(),s=a.getBoundingClientRect();a&&n&&s&&(a.scrollTop=n.top-s.top-40)}})})}},mounted:function(){this.renderFormat()},methods:{formatValue:function(t,e){switch(t){case"H":case"m":return String(e);case"HH":case"mm":return e<10?"0"+e:String(e);case"h":case"k":return String(e+1);case"hh":case"kk":return e+1<10?"0"+(e+1):String(e+1);default:return""}},checkAcceptingType:function(t,e,a){if(!t||!e||!e.length)return"";for(var i=0;i<t.length;i++)if(e.indexOf(t[i])>-1)return t[i];return a||""},renderFormat:function(t){t=t||this.format,this.hourType=this.checkAcceptingType(c.HOUR_TOKENS,t,"HH"),this.minuteType=this.checkAcceptingType(c.MINUTE_TOKENS,t,"mm"),this.apmType=this.checkAcceptingType(c.APM_TOKENS,t),this.renderHoursList(),this.renderList("minute"),this.apmType&&this.renderApmList();var e=this;this.$nextTick(function(){e.readValues()})},renderHoursList:function(){var t="h"===this.hourType||"hh"===this.hourType?12:24;this.hours=[];for(var e=0;e<t;e++)this.hours.push(this.formatValue(this.hourType,e))},renderList:function(t,e){if("minute"===t){e=e||this.minuteInterval,0===e?e=60:e>60?(window.console.warn("`"+t+"-interval` should be less than 60. Current value is",e),e=1):e<1?(window.console.warn("`"+t+"-interval` should be NO less than 1. Current value is",e),e=1):e||(e=1),this.minutes=[];for(var a=0;a<60;a+=e)this.minutes.push(this.formatValue(this.minuteType,a))}},renderApmList:function(){this.apms=[],this.apmType&&(this.apms="A"===this.apmType?["AM","PM"]:["am","pm"])},readValues:function(){this.hour=this.dateTime.format(this.hourType),this.minute=this.dateTime.format(this.minuteType),this.apmType&&(this.apm=this.dateTime.format("HH")>=12?this.apms[1]:this.apms[0]),this.fillValues()},fillValues:function(){var t={},e=this.hour,a=this.hourType,i=e||0===e?Number(e):"",n=this.isTwelveHours(a),s=!(!n||!this.apm)&&String(this.apm).toLowerCase();if(c.HOUR_TOKENS.forEach(function(r){if(r===a)return void(t[r]=e);var o=void 0,l=void 0;switch(r){case"H":case"HH":if(!String(i).length)return void(t[r]="");o=n?"pm"===s?i<12?i+12:i:i%12:i%24,t[r]="HH"===r&&o<10?"0"+o:String(o);break;case"k":case"kk":if(!String(i).length)return void(t[r]="");o=n?"pm"===s?i<12?i+12:i:12===i?24:i:0===i?24:i,t[r]="kk"===r&&o<10?"0"+o:String(o);break;case"h":case"hh":if(s)o=i,l=s||"am";else{if(!String(i).length)return t[r]="",t.a="",void(t.A="");i>11?(l="pm",o=12===i?12:i%12):(l=n?"":"am",o=i%12==0?12:i)}t[r]="hh"===r&&o<10?"0"+o:String(o),t.a=l,t.A=l.toUpperCase()}}),this.minute||0===this.minute){var r=Number(this.minute);t.m=String(r),t.mm=r<10?"0"+r:String(r)}else t.m="",t.mm="";this.fullValues=t,this.updateTimeValue(t),this.$emit("change",{data:t})},updateTimeValue:function(t){this.muteWatch=!0;var e=this,a=JSON.parse(r()(this.value||{})),i={};n()(a).forEach(function(e){i[e]=t[e]}),this.$emit("input",i),this.$nextTick(function(){e.muteWatch=!1})},isTwelveHours:function(t){return"h"===t||"hh"===t},select:function(t,e){"hour"===t?this.hour=e:"minute"===t?this.minute=e:"apm"===t&&(this.apm=e);var a=void 0;a=this.apm?l()(this.hour+":"+this.minute+(this.apm?this.apm:""),"HH:mm A").format("HH:mm"):l()(this.hour+":"+this.minute+(this.apm?this.apm:""),"HH:mm").format("HH:mm");var i=l()(this.dateTime.format("YYYY-MM-DD")+" "+a);this.$emit("change-time",i)}}}},function(t,e,a){"use strict";function i(t){a(23)}var n=a(7),s=a(29),r=a(0),o=i,l=r(n.a,s.a,!1,o,"data-v-26cd3b6e",null);e.a=l.exports},function(t,e,a){"use strict";var i=a(24),n=a.n(i),s=a(1),r=a.n(s),o=a(2);e.a={name:"CtkDatePicker",props:{month:{type:Object,default:Object},dateTime:{type:Object,default:Object},color:{type:String,default:String},minDate:{type:String,default:String},maxDate:{type:String,default:String},locale:{type:String,default:String},inline:{type:Boolean,default:Boolean},noWeekendsDays:{type:Boolean,default:Boolean},rangeMode:{type:Boolean,default:!1},disabledDates:{type:Array,default:Array},dark:{type:Boolean,default:!1}},data:function(){return{transitionDaysName:"slidenext",transitionLabelName:"slidevnext",weekDays:Object(o.b)(this.locale)}},computed:{bgStyle:function(){return{backgroundColor:this.color}},endEmptyDays:function(){return(this.monthDays.length+this.weekDay>35?42:35)-this.monthDays.length-this.weekDay},monthDays:function(){return this.month.getMonthDays()},weekDay:function(){return this.month.getWeekStart()}},methods:{getMonthFormatted:function(){return this.month.getFormatted()},isToday:function(t){return r()(t.format("YYYY-MM-DD")).isSame(r()().format("YYYY-MM-DD"))},isDisabled:function(t){return this.isDateDisabled(t)||this.isBeforeMinDate(t)||this.isAfterEndDate(t)},isDateDisabled:function(t){return this.disabledDates.indexOf(t.format("YYYY-MM-DD"))>-1},isBeforeMinDate:function(t){return r()(t).isBefore(this.minDate)},isAfterEndDate:function(t){return r()(t).isAfter(this.maxDate)},isSelected:function(t){return[].concat(n()(this.dateTime.start?[this.dateTime.start.format("YYYY-MM-DD")]:this.rangeMode?[]:[this.dateTime.format("YYYY-MM-DD")]),n()(this.dateTime.end?[this.dateTime.end.format("YYYY-MM-DD")]:this.rangeMode?[]:[this.dateTime.format("YYYY-MM-DD")])).indexOf(t.format("YYYY-MM-DD"))>-1},isBetween:function(t){return!!this.dateTime.end&&r.a.range(this.dateTime.start,this.dateTime.end).contains(t)},firstInRange:function(t){return!!this.dateTime.start&&r()(this.dateTime.start.format("YYYY-MM-DD")).isSame(t.format("YYYY-MM-DD"))},lastInRange:function(t){return!!this.dateTime.end&&r()(this.dateTime.end.format("YYYY-MM-DD")).isSame(t.format("YYYY-MM-DD"))},isWeekEndDay:function(t){var e=r()(t).day(),a=[6,0];return!!this.noWeekendsDays&&a.indexOf(e)>-1},selectDate:function(t){this.rangeMode?(!this.dateTime.start||this.dateTime.end||t.isBefore(this.dateTime.start)?(this.dateTime.start=t,this.dateTime.end=null):this.dateTime.end=t,this.$emit("change-date",this.dateTime)):this.$emit("change-date",t)},changeMonth:function(t){this.transitionDaysName="slide"+t,this.transitionLabelName="slidev"+t,this.$emit("change-month",t)}}}},function(t,e,a){"use strict";function i(t){a(30)}var n=a(9),s=a(31),r=a(0),o=i,l=r(n.a,s.a,!1,o,"data-v-4bd5b1c0",null);e.a=l.exports},function(t,e,a){"use strict";e.a={name:"CtkButtonValidate",props:{dark:{type:Boolean,default:!1}}}},function(t,e,a){"use strict";var i=a(6),n=a(8),s=a(35),r=a(2),o=a(1),l=a.n(o);e.a={name:"CtkDateRangePicker",components:{CtkDatePicker:i.a,CtkButtonValidate:n.a,CtkCalendarShortcut:s.a},props:{disabledDates:{type:Array,default:Array},dateTime:{type:Object,default:Object},visible:{type:Boolean,required:!0,default:!0},color:{type:String,default:String},withoutHeader:{type:Boolean,default:Boolean},locale:{type:String,default:String},maxDate:{type:String,default:String},minDate:{type:String,default:String},inline:{type:Boolean,default:Boolean},agendaPosition:{type:String,default:String},noWeekendsDays:{type:Boolean,default:Boolean},autoClose:{type:Boolean,default:Boolean},enableButtonValidate:{type:Boolean,default:Boolean},value:{type:[String,Object],default:String},withoutRangeShortcut:{type:Boolean,default:!1},dark:{type:Boolean,default:Boolean},shortcutsTranslation:{type:Object,default:Object}},data:function(){return{month:this.getMonth()}},computed:{position:function(){return window.innerWidth<412?null:"top"===this.agendaPosition?{top:"100%",marginBottom:"10px"}:{bottom:"100%",marginTop:"10px"}},bgStyle:function(){return{backgroundColor:this.color,padding:"10px 0 10px 10px"}},year:function(){return(this.dateTime.start||this.dateTime.end?this.dateTime.end?this.dateTime.end:this.dateTime.start:l()()).format("YYYY")},getRangeDatesFormatted:function(){var t=this.value&&this.value.start,e=this.value&&this.value.end;if(t||e){if(t||e){var a=t?""+l()(this.dateTime.start).locale(this.locale).format("ddd D MMM"):"...";return e?a+" - "+l()(this.dateTime.end).locale(this.locale).format("ddd D MMM"):a+" - ..."}return null}return"... - ..."}},watch:{dateTime:{handler:function(){this.month=this.getMonth()},deep:!0},locale:function(){this.month=this.getMonth()}},methods:{getMonth:function(){var t=this.dateTime.start||this.dateTime.end?this.dateTime.end?this.dateTime.end:this.dateTime.start:l()();return new r.a(t.month(),t.year())},selectDate:function(t){this.$emit("change-date",t),this.$refs["calendar-shortcut"].unSelectAllShortcuts()},selectShortcut:function(t){this.$emit("change-date",t)},changeMonth:function(t){var e=this.month.month+("prev"===t?-1:1),a=this.month.year;(e>11||e<0)&&(a+="prev"===t?-1:1,e="prev"===t?11:0),this.month=new r.a(e,a)},validate:function(){this.$emit("validate")}}}},function(t,e,a){"use strict";var i=a(1),n=a.n(i),s=a(37),r=a.n(s);e.a={name:"CtkCalendarShortcur",props:{color:{type:String,default:String},locale:{type:String,default:String},dark:{type:Boolean,default:!1},dateTime:{type:Object,default:Object},shortcutsTranslation:{type:Object,default:Object}},data:function(){return{shortcuts:[{key:"this_week",value:"isoWeek",isHover:!1,isSelected:!1},{key:"last_7_days",value:7,isHover:!1,isSelected:!1},{key:"last_30_days",value:30,isHover:!1,isSelected:!1},{key:"this_month",value:"month",isHover:!1,isSelected:!1},{key:"last_month",value:"-month",isHover:!1,isSelected:!1},{key:"this_year",value:"year",isHover:!1,isSelected:!1},{key:"last_year",value:"-year",isHover:!1,isSelected:!1}]}},computed:{getStyle:function(){return{color:this.color}},getSelectedStyle:function(){return{backgroundColor:this.color,color:"#FFF"}},getEffectStyle:function(){return{backgroundColor:this.color}}},methods:{getTranslation:function(t){return this.shortcutsTranslation[t]||r.a[t]},unSelectAllShortcuts:function(){this.shortcuts.forEach(function(t){t.isSelected=!1})},select:function(t){var e=t.value,a={start:null,end:null};switch(this.unSelectAllShortcuts(),t.isSelected=!0,e){case"isoWeek":case"month":case"year":a.start=n()().locale(this.locale).startOf(e),a.end=n()().locale(this.locale).endOf(e);break;case 7:case 30:a.end=n()().locale(this.locale).subtract(1,"d"),a.start=n()().locale(this.locale).subtract(e,"d");break;case"-month":a.start=n()().locale(this.locale).subtract(1,"months").startOf("month"),a.end=n()().locale(this.locale).subtract(1,"months").endOf("month");break;case"-year":a.start=n()().locale(this.locale).subtract(1,"years").startOf("year"),a.end=n()().locale(this.locale).subtract(1,"years").endOf("year")}this.$emit("change-range",a)}}}},function(t,e,a){t.exports=a(13)},function(t,e,a){"use strict";function i(t){a(14)}Object.defineProperty(e,"__esModule",{value:!0});var n=a(3),s=a(40),r=a(0),o=i,l=r(n.a,s.a,!1,o,null,null);e.default=l.exports},function(t,e){},function(t,e){t.exports=require("moment-timezone")},function(t,e,a){"use strict";function i(t){a(17)}var n=a(4),s=a(32),r=a(0),o=i,l=r(n.a,s.a,!1,o,"data-v-0a6eee56",null);e.a=l.exports},function(t,e){},function(t,e,a){"use strict";function i(t){a(19)}var n=a(5),s=a(22),r=a(0),o=i,l=r(n.a,s.a,!1,o,"data-v-3eb0d5a7",null);e.a=l.exports},function(t,e){},function(t,e){t.exports=require("babel-runtime/core-js/object/keys")},function(t,e){t.exports=require("babel-runtime/core-js/json/stringify")},function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"timepicker-container flex",class:{inline:t.inline,"is-dark":t.dark,"only-time":t.disableDate},style:[t.getHeight]},[a("div",{staticClass:"time-container hours-container flex flex-1 flex-direction-column"},[a("div",{staticClass:"flex align-center justify-content-center time-label text-muted"},[t._v(t._s(t.hourType))]),t._v(" "),a("div",{ref:"hours",staticClass:"h-100 mh-100 numbers-container"},t._l(t.hours,function(e){return a("button",{key:e,staticClass:"item flex align-center justify-content-center",class:[{active:t.hour===e&&t.value},e],attrs:{type:"button",tabindex:"-1"},on:{click:function(a){a.stopPropagation(),t.select("hour",e)}}},[a("span",{staticClass:"timepicker-day-effect",style:t.styleColor}),t._v(" "),a("span",{staticClass:"timepicker-day-text"},[t._v(t._s(e))])])}))]),t._v(" "),a("div",{staticClass:"time-container minutes-container flex-1 flex flex-direction-column"},[a("div",{staticClass:"flex align-center justify-content-center time-label text-muted"},[t._v(t._s(t.minuteType))]),t._v(" "),a("div",{ref:"minutes",staticClass:"h-100 mh-100 numbers-container"},t._l(t.minutes,function(e){return a("button",{key:e,staticClass:"item flex align-center justify-content-center",class:[{active:t.minute===e&&t.value},e],attrs:{type:"button",tabindex:"-1"},on:{click:function(a){a.stopPropagation(),t.select("minute",e)}}},[a("span",{staticClass:"timepicker-day-effect",style:t.styleColor}),t._v(" "),a("span",{staticClass:"timepicker-day-text"},[t._v(t._s(e))])])}))]),t._v(" "),t.apmType?a("div",{staticClass:"time-container apms-container flex flex-1 flex-direction-column"},[a("div",{staticClass:"flex align-center justify-content-center time-label text-muted"},[t._v(t._s(t.apmType))]),t._v(" "),a("div",{staticClass:"h-100 mh-100 numbers-container"},t._l(t.apms,function(e){return a("button",{key:e,staticClass:"item flex align-center justify-content-center",class:[{active:t.apm===e&&t.value},e],attrs:{type:"button",tabindex:"-1"},on:{click:function(a){a.stopPropagation(),t.select("apm",e)}}},[a("span",{staticClass:"timepicker-day-effect",style:t.styleColor}),t._v(" "),a("span",{staticClass:"timepicker-day-text"},[t._v(t._s(e))])])}))]):t._e()])},n=[],s={render:i,staticRenderFns:n};e.a=s},function(t,e){},function(t,e){t.exports=require("babel-runtime/helpers/toConsumableArray")},function(t,e){t.exports=require("babel-runtime/core-js/array/from")},function(t,e){t.exports=require("babel-runtime/helpers/classCallCheck")},function(t,e){t.exports=require("babel-runtime/helpers/createClass")},function(t,e){t.exports=require("moment-range")},function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"datepicker-container",class:{"flex-1 inline":t.inline,"p-0":t.rangeMode,"is-dark":t.dark},attrs:{id:"CtkDatePicker"}},[a("div",{staticClass:"datepicker-controls flex align-center justify-content-center"},[a("div",{staticClass:"arrow-month h-100"},[a("button",{staticClass:"datepicker-button datepicker-prev text-center h-100 flex align-center",attrs:{type:"button",tabindex:"-1"},on:{click:function(e){t.changeMonth("prev")}}},[a("svg",{attrs:{viewBox:"0 0 1000 1000"}},[a("path",{attrs:{d:"M336.2 274.5l-210.1 210h805.4c13 0 23 10 23 23s-10 23-23 23H126.1l210.1 210.1c11 11 11 21 0 32-5 5-10 7-16 7s-11-2-16-7l-249.1-249c-11-11-11-21 0-32l249.1-249.1c21-21.1 53 10.9 32 32z"}})])])]),t._v(" "),a("div",{staticClass:"datepicker-container-label flex-1"},[a("transition-group",{staticClass:"h-100 flex align-center justify-content-center",attrs:{name:t.transitionLabelName}},t._l([t.month],function(e){return a("div",{key:e.month,staticClass:"datepicker-label fs-16",domProps:{textContent:t._s(t.getMonthFormatted())}})}))],1),t._v(" "),a("div",{staticClass:"arrow-month h-100 text-right"},[a("button",{staticClass:"datepicker-button datepicker-next text-center h-100 flex align-center justify-content-right",attrs:{type:"button",tabindex:"-1"},on:{click:function(e){t.changeMonth("next")}}},[a("svg",{attrs:{viewBox:"0 0 1000 1000"}},[a("path",{attrs:{d:"M694.4 242.4l249.1 249.1c11 11 11 21 0 32L694.4 772.7c-5 5-10 7-16 7s-11-2-16-7c-11-11-11-21 0-32l210.1-210.1H67.1c-13 0-23-10-23-23s10-23 23-23h805.4L662.4 274.5c-21-21.1 11-53.1 32-32.1z"}})])])])]),t._v(" "),a("div",{staticClass:"datepicker-week flex"},t._l(t.weekDays,function(e,i){return a("div",{key:i,staticClass:"flex-1 text-muted fs-12 flex justify-content-center align-center"},[t._v("\n "+t._s(e)+"\n ")])})),t._v(" "),a("div",{staticClass:"month-container",style:{height:t.monthDays.length+t.weekDay>35?"250px":"210px"}},[a("transition-group",{attrs:{name:t.transitionDaysName}},t._l([t.month],function(e){return a("div",{key:e.month,staticClass:"datepicker-days flex"},[t._l(t.weekDay,function(t){return a("button",{key:t+"startEmptyDay",staticClass:"datepicker-day align-center justify-content-center"})}),t._v(" "),t._l(t.monthDays,function(e){return a("button",{key:e.format("D"),staticClass:"datepicker-day flex align-center justify-content-center",class:{selected:t.isSelected(e)&&!t.isDisabled(e),disabled:t.isDisabled(e)||t.isWeekEndDay(e),enable:!(t.isDisabled(e)||t.isWeekEndDay(e)),between:t.isBetween(e)&&t.rangeMode,first:t.firstInRange(e)&&t.rangeMode,last:t.lastInRange(e)&&!!t.dateTime.end&&t.rangeMode},attrs:{type:"button",tabindex:"-1"},on:{click:function(a){t.isDisabled(e)||t.isWeekEndDay(e)||t.selectDate(e)}}},[t.isToday(e)?a("span",{staticClass:"datepicker-today"}):t._e(),t._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:!t.isDisabled(e)||t.isSelected(e),expression:"!isDisabled(day) || isSelected(day)"}],staticClass:"datepicker-day-effect",style:t.bgStyle}),t._v(" "),a("span",{staticClass:"datepicker-day-text"},[t._v(t._s(e.format("D")))])])}),t._v(" "),t._l(t.endEmptyDays,function(t){return a("div",{key:t+"endEmptyDay",staticClass:"datepicker-day flex align-center justify-content-center"})})],2)}))],1)])},n=[],s={render:i,staticRenderFns:n};e.a=s},function(t,e){},function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"datepicker-buttons-container flex justify-content-right",class:{"is-dark":t.dark}},[a("button",{staticClass:"datepicker-button flex align-center justify-content-center",attrs:{type:"button",tabindex:"-1"},on:{click:function(e){t.$emit("validate")}}},[a("span",{staticClass:"datepicker-button-effect"}),t._v(" "),a("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"}},[a("path",{attrs:{d:"M0 0h24v24H0z",fill:"none"}}),t._v(" "),a("path",{attrs:{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}})])])])},n=[],s={render:i,staticRenderFns:n};e.a=s},function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("transition",{attrs:{name:"top"===t.agendaPosition?"slide":"slideinvert"}},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.visible||t.inline,expression:"visible || inline"}],staticClass:"datetimepicker flex",class:{inline:t.inline,"is-dark":t.dark,"has-validate-button":t.enableButtonValidate},style:t.position,on:{click:function(t){t.stopPropagation()}}},[a("div",{staticClass:"datepicker flex flex-direction-column",style:t.position},[t.withoutHeader?a("div",{staticClass:"datepicker-header",style:t.bgStyle},[t.disableDate?t._e():a("div",{staticClass:"datepicker-year"},[a("transition-group",{attrs:{name:t.transitionDayName}},t._l([t.year],function(e){return a("div",{key:e},[t._v(t._s(e))])}))],1),t._v(" "),a("div",{staticClass:"flex justify-content-between"},[t.disableDate?t._e():a("transition-group",{staticClass:"datepicker-date dots-text flex-1",attrs:{name:t.transitionDayName}},t._l([t.getDateFormatted()],function(e){return a("span",{key:e},[t._v(t._s(t.getDateFormatted()))])})),t._v(" "),t.disableTime||t.isFormatTwelve?t.disableTime?t._e():a("div",{staticClass:"datepicker-time flex",style:t.timeWidth},[a("transition-group",{staticClass:"dots-text datepicker-hour flex-1 flex",class:{"justify-content-center":t.disableDate},attrs:{name:t.transitionDayName}},t._l([t.dateTime.format(t.timeFormat)],function(e){return a("span",{key:e},[t._v(t._s(e))])}))],1):a("div",{staticClass:"datepicker-time flex justify-content-center",style:t.timeWidth},[a("transition-group",{staticClass:"dots-text datepicker-hour flex-1 flex justify-content-right",attrs:{name:t.transitionDayName}},t._l([t.dateTime.format("HH")],function(e){return a("span",{key:e},[t._v(t._s(e))])})),t._v(" "),a("span",[t._v(":")]),t._v(" "),a("transition-group",{staticClass:"dots-text datepicker-minute flex-1 flex justify-content-left",attrs:{name:t.transitionDayName}},t._l([t.dateTime.format("mm")],function(e){return a("span",{key:e},[t._v(t._s(e))])}))],1)],1)]):t._e(),t._v(" "),a("div",{staticClass:"datetimepicker-container flex"},[t.disableDate?t._e():a("ctk-date-picker",{attrs:{inline:t.inline,"no-weekends-days":t.noWeekendsDays,month:t.month,"date-time":t.dateTime,locale:t.locale,color:t.color,"min-date":t.minDate,"max-date":t.maxDate,"disabled-dates":t.disabledDates,dark:t.dark},on:{"change-date":t.selectDate,"change-month":t.changeMonth}}),t._v(" "),t.disableTime?t._e():a("ctk-time-picker",{ref:"timePickerComponent",attrs:{month:t.month,"date-time":t.dateTime,color:t.color,format:t.timeFormat,"disable-date":t.disableDate,"minute-interval":t.minuteInterval,visible:t.visible,value:t.value,dark:t.dark},on:{"change-time":t.selectTime}})],1),t._v(" "),a("ctk-button-validate",{directives:[{name:"show",rawName:"v-show",value:t.enableButtonValidate&&!t.inline&&!t.autoClose,expression:"enableButtonValidate && !inline && !autoClose"}],staticClass:"button-validate flex-fixed",attrs:{dark:t.dark},on:{validate:t.validate}})],1)])])},n=[],s={render:i,staticRenderFns:n};e.a=s},function(t,e,a){"use strict";function i(t){a(34)}var n=a(10),s=a(39),r=a(0),o=i,l=r(n.a,s.a,!1,o,"data-v-c3b37798",null);e.a=l.exports},function(t,e){},function(t,e,a){"use strict";function i(t){a(36)}var n=a(11),s=a(38),r=a(0),o=i,l=r(n.a,s.a,!1,o,"data-v-b8e9fb16",null);e.a=l.exports},function(t,e){},function(t,e){t.exports={this_week:"This week",last_7_days:"Last 7 days",last_30_days:"Last 30 days",this_month:"This month",last_month:"Last month",this_year:"This year",last_year:"Last year"}},function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"shortcuts-container",class:{"is-dark":t.dark}},t._l(t.shortcuts,function(e){return a("button",{key:e.value,staticClass:"shortcut-button",class:{"is-selected":e.isSelected},style:[e.isSelected?t.getSelectedStyle:t.getStyle],attrs:{tabindex:"-1"},on:{mouseover:function(t){e.isHover=!0},mouseleave:function(t){e.isHover=!1},click:function(a){t.select(e)}}},[a("span",{staticClass:"datepicker-button-effect",style:[t.getEffectStyle]}),t._v(" "),a("span",{staticClass:"shortcut-button-content"},[t._v("\n "+t._s(t.getTranslation(e.key))+"\n ")])])}))},n=[],s={render:i,staticRenderFns:n};e.a=s},function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("transition",{attrs:{name:"top"===t.agendaPosition?"slide":"slideinvert"}},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.visible||t.inline,expression:"visible || inline"}],staticClass:"datetimepicker flex",class:{inline:t.inline,"is-dark":t.dark,"has-validate-button":t.enableButtonValidate},style:t.position,on:{click:function(t){t.stopPropagation()}}},[a("div",{staticClass:"datepicker flex flex-direction-column",style:t.position},[t.withoutHeader?a("div",{staticClass:"datepicker-header",style:t.bgStyle},[a("div",{staticClass:"datepicker-year"},[a("div",[t._v(t._s(t.year))])]),t._v(" "),a("div",{staticClass:"flex justify-content-between"},[a("span",{staticClass:"datepicker-date dots-text flex-1"},[t._v(t._s(t.getRangeDatesFormatted))])])]):t._e(),t._v(" "),a("div",{staticClass:"datetimepicker-container flex"},[t.withoutRangeShortcut?t._e():a("ctk-calendar-shortcut",{ref:"calendar-shortcut",attrs:{color:t.color,locale:t.locale,dark:t.dark,"date-time":t.dateTime,"shortcuts-translation":t.shortcutsTranslation},on:{"change-range":t.selectShortcut}}),t._v(" "),a("ctk-date-picker",{staticClass:"date-range-picker",attrs:{inline:t.inline,"no-weekends-days":t.noWeekendsDays,month:t.month,"date-time":t.dateTime,locale:t.locale,color:t.color,"min-date":t.minDate,"max-date":t.maxDate,value:t.value,"disabled-dates":t.disabledDates,dark:t.dark,"range-mode":""},on:{"change-date":t.selectDate,"change-month":t.changeMonth}})],1),t._v(" "),!t.enableButtonValidate||t.inline||t.autoClose?t._e():a("ctk-button-validate",{attrs:{dark:t.dark},on:{validate:t.validate}})],1)])])},n=[],s={render:i,staticRenderFns:n};e.a=s},function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"ctk-date-time-picker",class:{inline:t.inline,"is-dark":t.dark},attrs:{id:t.id}},[t.inline?t._e():a("div",{ref:"parent",staticClass:"field",class:{"is-focused":t.isFocus||t.isVisible,"has-value":t.dateFormatted,"has-error":t.errorHint,"is-disabled":t.disabled},on:{click:t.showDatePicker}},[a("input",{ref:"CtkDateTimePicker",staticClass:"field-input",style:[t.getBorderStyle],attrs:{id:t.id,placeholder:t.label,disabled:t.disabled,type:"text",readonly:""},domProps:{value:t.dateFormatted},on:{focus:t.onFocus}}),t._v(" "),a("label",{ref:"label",staticClass:"field-label",class:t.hint?t.errorHint?"text-danger":"text-primary":"",style:[t.getColorStyle],attrs:{for:t.id}},[t._v("\n "+t._s(t.hint||t.label)+"\n ")])]),t._v(" "),t.overlay&&t.isVisible&&!t.inline?a("div",{staticClass:"time-picker-overlay",class:{"has-background":t.overlayBackground},on:{click:function(e){return e.stopPropagation(),t.unFocus(e)}}}):t._e(),t._v(" "),t.rangeMode?a("ctk-date-range-picker",{ref:"range",attrs:{"date-time":t.dateTime,color:t.color,visible:t.isVisible,"without-header":!t.withoutHeader,"disable-time":t.hasDisabledTime,"disable-date":t.disableDate,"minute-interval":t.minuteInterval,"time-format":t.timeFormat,locale:t.locale,"min-date":t.minDate,"max-date":t.maxDate,"agenda-position":t.agendaPosition,inline:t.isInline,"no-weekends-days":t.noWeekendsDays,"enable-button-validate":t.enableButtonValidate,"auto-close":t.autoClose,"range-mode":t.rangeMode,"disabled-dates":t.disabledDates,"without-range-shortcut":t.withoutRangeShortcut,dark:t.dark,"shortcuts-translation":t.shortcutsTranslation},on:{"change-date":t.changeDate,validate:t.validate},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}}):a("ctk-date-picker-agenda",{ref:"agenda",attrs:{"date-time":t.dateTime,color:t.color,visible:t.isVisible,"without-header":!t.withoutHeader,"disable-time":t.hasDisabledTime,"disable-date":t.disableDate,"minute-interval":t.minuteInterval,"time-format":t.timeFormat,locale:t.locale,"min-date":t.minDate,"max-date":t.maxDate,"agenda-position":t.agendaPosition,inline:t.inline,"no-weekends-days":t.noWeekendsDays,"enable-button-validate":t.enableButtonValidate,"auto-close":t.autoClose,"range-mode":t.rangeMode,"disabled-dates":t.disabledDates,dark:t.dark},on:{"change-date":t.changeDate,validate:t.validate},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)},n=[],s={render:i,staticRenderFns:n};e.a=s}]);
//# sourceMappingURL=vue-ctk-date-time-picker.min.js.map
module.exports=function(t){var e={};function a(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,a),n.l=!0,n.exports}return a.m=t,a.c=e,a.d=function(t,e,i){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(a.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)a.d(i,n,function(e){return t[e]}.bind(null,n));return i},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="/",a(a.s=14)}([function(t,e){t.exports=require("moment")},function(t,e){t.exports=require("moment-timezone")},function(t,e,a){},function(t,e,a){},function(t,e,a){},function(t,e,a){},function(t,e,a){},function(t,e,a){},function(t,e,a){},function(t,e){t.exports=require("@babel/runtime/helpers/toConsumableArray")},function(t,e){t.exports=require("@babel/runtime/helpers/classCallCheck")},function(t,e){t.exports=require("@babel/runtime/helpers/createClass")},function(t,e){t.exports=require("moment-range")},function(t){t.exports={this_week:"This week",last_7_days:"Last 7 days",last_30_days:"Last 30 days",this_month:"This month",last_month:"Last month",this_year:"This year",last_year:"Last year"}},function(t,e,a){t.exports=a(22)},function(t,e,a){"use strict";var i=a(2);a.n(i).a},function(t,e,a){"use strict";var i=a(3);a.n(i).a},function(t,e,a){"use strict";var i=a(4);a.n(i).a},function(t,e,a){"use strict";var i=a(5);a.n(i).a},function(t,e,a){"use strict";var i=a(6);a.n(i).a},function(t,e,a){"use strict";var i=a(7);a.n(i).a},function(t,e,a){"use strict";var i=a(8);a.n(i).a},function(t,e,a){"use strict";a.r(e);var i=a(1),n=a.n(i),s=a(0),o=a.n(s),r={HOUR_TOKENS:["HH","H","hh","h","kk","k"],MINUTE_TOKENS:["mm","m"],APM_TOKENS:["A","a"]},l={name:"CtkTimePicker",props:{format:{type:String,default:String},minuteInterval:{type:Number,default:Number},month:{type:Object,default:Object},dateTime:{type:Object,default:Object},color:{type:String,default:String},inline:{type:Boolean,default:Boolean},visible:{type:Boolean,default:Boolean},value:{type:String,default:String},disableDate:{type:Boolean,default:Boolean},dark:{type:Boolean,default:Boolean}},data:function(){return{hours:[],minutes:[],apms:[],muteWatch:!1,hourType:"HH",minuteType:"mm",apmType:"",hour:"",minute:"",apm:"",fullValues:void 0}},computed:{styleColor:function(){return{backgroundColor:this.color}},monthDays:function(){return this.month.getMonthDays()},weekDay:function(){return this.month.getWeekStart()},getHeight:function(){return{height:this.disableDate?"200px":this.month?this.monthDays.length+this.weekDay>35?"347px":"307px":"180px"}}},watch:{format:"renderFormat",minuteInterval:function(t){this.renderList("minute",t)},displayTime:"fillValues",visible:function(t){var e=this;t&&this.$nextTick(function(){["hours","minutes"].forEach(function(t){var a=e.$refs["".concat(t)],i=e.$refs["".concat(t)].querySelector(".item.active");if(i){a.scrollTop=0;var n=i.getBoundingClientRect(),s=a.getBoundingClientRect();a&&n&&s&&(a.scrollTop=n.top-s.top-40)}})})}},mounted:function(){this.renderFormat()},methods:{formatValue:function(t,e){switch(t){case"H":case"m":return String(e);case"HH":case"mm":return e<10?"0".concat(e):String(e);case"h":case"k":return String(e+1);case"hh":case"kk":return e+1<10?"0".concat(e+1):String(e+1);default:return""}},checkAcceptingType:function(t,e,a){if(!t||!e||!e.length)return"";for(var i=0;i<t.length;i++)if(e.indexOf(t[i])>-1)return t[i];return a||""},renderFormat:function(t){t=t||this.format,this.hourType=this.checkAcceptingType(r.HOUR_TOKENS,t,"HH"),this.minuteType=this.checkAcceptingType(r.MINUTE_TOKENS,t,"mm"),this.apmType=this.checkAcceptingType(r.APM_TOKENS,t),this.renderHoursList(),this.renderList("minute"),this.apmType&&this.renderApmList();var e=this;this.$nextTick(function(){e.readValues()})},renderHoursList:function(){var t="h"===this.hourType||"hh"===this.hourType?12:24;this.hours=[];for(var e=0;e<t;e++)this.hours.push(this.formatValue(this.hourType,e))},renderList:function(t,e){if("minute"===t){0===(e=e||this.minuteInterval)?e=60:e>60?(window.console.warn("`"+t+"-interval` should be less than 60. Current value is",e),e=1):e<1?(window.console.warn("`"+t+"-interval` should be NO less than 1. Current value is",e),e=1):e||(e=1),this.minutes=[];for(var a=0;a<60;a+=e)this.minutes.push(this.formatValue(this.minuteType,a))}},renderApmList:function(){this.apms=[],this.apmType&&(this.apms="A"===this.apmType?["AM","PM"]:["am","pm"])},readValues:function(){this.hour=this.dateTime.format(this.hourType),this.minute=this.dateTime.format(this.minuteType),this.apmType&&(this.apm=this.dateTime.format("HH")>=12?this.apms[1]:this.apms[0]),this.fillValues()},fillValues:function(){var t={},e=this.hour,a=this.hourType,i=e||0===e?Number(e):"",n=this.isTwelveHours(a),s=!(!n||!this.apm)&&String(this.apm).toLowerCase();if(r.HOUR_TOKENS.forEach(function(o){var r,l;if(o!==a)switch(o){case"H":case"HH":if(!String(i).length)return void(t[o]="");r=n?"pm"===s?i<12?i+12:i:i%12:i%24,t[o]="HH"===o&&r<10?"0".concat(r):String(r);break;case"k":case"kk":if(!String(i).length)return void(t[o]="");r=n?"pm"===s?i<12?i+12:i:12===i?24:i:0===i?24:i,t[o]="kk"===o&&r<10?"0".concat(r):String(r);break;case"h":case"hh":if(s)r=i,l=s||"am";else{if(!String(i).length)return t[o]="",t.a="",void(t.A="");i>11?(l="pm",r=12===i?12:i%12):(l=n?"":"am",r=i%12==0?12:i)}t[o]="hh"===o&&r<10?"0".concat(r):String(r),t.a=l,t.A=l.toUpperCase()}else t[o]=e}),this.minute||0===this.minute){var o=Number(this.minute);t.m=String(o),t.mm=o<10?"0".concat(o):String(o)}else t.m="",t.mm="";this.fullValues=t,this.updateTimeValue(t),this.$emit("change",{data:t})},updateTimeValue:function(t){this.muteWatch=!0;var e=this,a=JSON.parse(JSON.stringify(this.value||{})),i={};Object.keys(a).forEach(function(e){i[e]=t[e]}),this.$emit("input",i),this.$nextTick(function(){e.muteWatch=!1})},isTwelveHours:function(t){return"h"===t||"hh"===t},select:function(t,e){var a;"hour"===t?this.hour=e:"minute"===t?this.minute=e:"apm"===t&&(this.apm=e),a=this.apm?o()(this.hour+":"+this.minute+(this.apm?this.apm:""),"HH:mm A").format("HH:mm"):o()(this.hour+":"+this.minute+(this.apm?this.apm:""),"HH:mm").format("HH:mm");var i=o()("".concat(this.dateTime.format("YYYY-MM-DD")," ").concat(a));this.$emit("change-time",i)}}};a(15);function c(t,e,a,i,n,s,o,r){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=a,c._compiled=!0),i&&(c.functional=!0),s&&(c._scopeId="data-v-"+s),o?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=l):n&&(l=r?function(){n.call(this,this.$root.$options.shadowRoot)}:n),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}var u=c(l,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"timepicker-container flex",class:{inline:t.inline,"is-dark":t.dark,"only-time":t.disableDate},style:[t.getHeight]},[a("div",{staticClass:"time-container hours-container flex flex-1 flex-direction-column"},[a("div",{staticClass:"flex align-center justify-content-center time-label text-muted"},[t._v(t._s(t.hourType))]),t._v(" "),a("div",{ref:"hours",staticClass:"h-100 mh-100 numbers-container"},t._l(t.hours,function(e){return a("button",{key:e,staticClass:"item flex align-center justify-content-center",class:[{active:t.hour===e&&t.value},e],attrs:{type:"button",tabindex:"-1"},on:{click:function(a){a.stopPropagation(),t.select("hour",e)}}},[a("span",{staticClass:"timepicker-day-effect",style:t.styleColor}),t._v(" "),a("span",{staticClass:"timepicker-day-text"},[t._v(t._s(e))])])}))]),t._v(" "),a("div",{staticClass:"time-container minutes-container flex-1 flex flex-direction-column"},[a("div",{staticClass:"flex align-center justify-content-center time-label text-muted"},[t._v(t._s(t.minuteType))]),t._v(" "),a("div",{ref:"minutes",staticClass:"h-100 mh-100 numbers-container"},t._l(t.minutes,function(e){return a("button",{key:e,staticClass:"item flex align-center justify-content-center",class:[{active:t.minute===e&&t.value},e],attrs:{type:"button",tabindex:"-1"},on:{click:function(a){a.stopPropagation(),t.select("minute",e)}}},[a("span",{staticClass:"timepicker-day-effect",style:t.styleColor}),t._v(" "),a("span",{staticClass:"timepicker-day-text"},[t._v(t._s(e))])])}))]),t._v(" "),t.apmType?a("div",{staticClass:"time-container apms-container flex flex-1 flex-direction-column"},[a("div",{staticClass:"flex align-center justify-content-center time-label text-muted"},[t._v(t._s(t.apmType))]),t._v(" "),a("div",{staticClass:"h-100 mh-100 numbers-container"},t._l(t.apms,function(e){return a("button",{key:e,staticClass:"item flex align-center justify-content-center",class:[{active:t.apm===e&&t.value},e],attrs:{type:"button",tabindex:"-1"},on:{click:function(a){a.stopPropagation(),t.select("apm",e)}}},[a("span",{staticClass:"timepicker-day-effect",style:t.styleColor}),t._v(" "),a("span",{staticClass:"timepicker-day-text"},[t._v(t._s(e))])])}))]):t._e()])},[],!1,null,"3eb0d5a7",null);u.options.__file="CtkTimePicker.vue";var d=u.exports,h=a(9),m=a.n(h),f=a(10),p=a.n(f),y=a(11),v=a.n(y),g=a(12),k=Object(g.extendMoment)(o.a),b=function(){function t(e,a){p()(this,t),this.start=k([a,e]),this.end=this.start.clone().endOf("month"),this.month=e,this.year=a}return v()(t,[{key:"getWeekStart",value:function(){return this.start.weekday()}},{key:"getDays",value:function(){return Array.from(k.range(this.start,this.end).by("days"))}},{key:"getFormatted",value:function(){return this.start.format("MMMM YYYY")}},{key:"getWeeks",value:function(){return this.end.week()-this.start.week()+1}},{key:"getMonthDays",value:function(){var t=k.range(this.start,this.end).by("days");return Array.from(t)}}]),t}(),D={name:"CtkDatePicker",props:{month:{type:Object,default:Object},dateTime:{type:Object,default:Object},color:{type:String,default:String},minDate:{type:String,default:String},maxDate:{type:String,default:String},locale:{type:String,default:String},inline:{type:Boolean,default:Boolean},noWeekendsDays:{type:Boolean,default:Boolean},rangeMode:{type:Boolean,default:!1},disabledDates:{type:Array,default:Array},dark:{type:Boolean,default:!1}},data:function(){return{transitionDaysName:"slidenext",transitionLabelName:"slidevnext",weekDays:function(t){var e=k.localeData(t).firstDayOfWeek();return k.weekdaysShort(1===e)}(this.locale)}},computed:{bgStyle:function(){return{backgroundColor:this.color}},endEmptyDays:function(){return(this.monthDays.length+this.weekDay>35?42:35)-this.monthDays.length-this.weekDay},monthDays:function(){return this.month.getMonthDays()},weekDay:function(){return this.month.getWeekStart()}},methods:{getMonthFormatted:function(){return this.month.getFormatted()},isToday:function(t){return o()(t.format("YYYY-MM-DD")).isSame(o()().format("YYYY-MM-DD"))},isDisabled:function(t){return this.isDateDisabled(t)||this.isBeforeMinDate(t)||this.isAfterEndDate(t)},isDateDisabled:function(t){return this.disabledDates.indexOf(t.format("YYYY-MM-DD"))>-1},isBeforeMinDate:function(t){return o()(t).isBefore(this.minDate)},isAfterEndDate:function(t){return o()(t).isAfter(this.maxDate)},isSelected:function(t){return m()(this.dateTime.start?[this.dateTime.start.format("YYYY-MM-DD")]:this.rangeMode?[]:[this.dateTime.format("YYYY-MM-DD")]).concat(m()(this.dateTime.end?[this.dateTime.end.format("YYYY-MM-DD")]:this.rangeMode?[]:[this.dateTime.format("YYYY-MM-DD")])).indexOf(t.format("YYYY-MM-DD"))>-1},isBetween:function(t){return!!this.dateTime.end&&o.a.range(this.dateTime.start,this.dateTime.end).contains(t)},firstInRange:function(t){return!!this.dateTime.start&&o()(this.dateTime.start.format("YYYY-MM-DD")).isSame(t.format("YYYY-MM-DD"))},lastInRange:function(t){return!!this.dateTime.end&&o()(this.dateTime.end.format("YYYY-MM-DD")).isSame(t.format("YYYY-MM-DD"))},isWeekEndDay:function(t){var e=o()(t).day();return!!this.noWeekendsDays&&[6,0].indexOf(e)>-1},selectDate:function(t){this.rangeMode?(!this.dateTime.start||this.dateTime.end||t.isBefore(this.dateTime.start)?(this.dateTime.start=t,this.dateTime.end=null):this.dateTime.end=t,this.$emit("change-date",this.dateTime)):this.$emit("change-date",t)},changeMonth:function(t){this.transitionDaysName="slide".concat(t),this.transitionLabelName="slidev".concat(t),this.$emit("change-month",t)}}},_=(a(16),c(D,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"datepicker-container",class:{"flex-1 inline":t.inline,"p-0":t.rangeMode,"is-dark":t.dark},attrs:{id:"CtkDatePicker"}},[a("div",{staticClass:"datepicker-controls flex align-center justify-content-center"},[a("div",{staticClass:"arrow-month h-100"},[a("button",{staticClass:"datepicker-button datepicker-prev text-center h-100 flex align-center",attrs:{type:"button",tabindex:"-1"},on:{click:function(e){t.changeMonth("prev")}}},[a("svg",{attrs:{viewBox:"0 0 1000 1000"}},[a("path",{attrs:{d:"M336.2 274.5l-210.1 210h805.4c13 0 23 10 23 23s-10 23-23 23H126.1l210.1 210.1c11 11 11 21 0 32-5 5-10 7-16 7s-11-2-16-7l-249.1-249c-11-11-11-21 0-32l249.1-249.1c21-21.1 53 10.9 32 32z"}})])])]),t._v(" "),a("div",{staticClass:"datepicker-container-label flex-1"},[a("transition-group",{staticClass:"h-100 flex align-center justify-content-center",attrs:{name:t.transitionLabelName}},t._l([t.month],function(e){return a("div",{key:e.month,staticClass:"datepicker-label fs-16",domProps:{textContent:t._s(t.getMonthFormatted())}})}))],1),t._v(" "),a("div",{staticClass:"arrow-month h-100 text-right"},[a("button",{staticClass:"datepicker-button datepicker-next text-center h-100 flex align-center justify-content-right",attrs:{type:"button",tabindex:"-1"},on:{click:function(e){t.changeMonth("next")}}},[a("svg",{attrs:{viewBox:"0 0 1000 1000"}},[a("path",{attrs:{d:"M694.4 242.4l249.1 249.1c11 11 11 21 0 32L694.4 772.7c-5 5-10 7-16 7s-11-2-16-7c-11-11-11-21 0-32l210.1-210.1H67.1c-13 0-23-10-23-23s10-23 23-23h805.4L662.4 274.5c-21-21.1 11-53.1 32-32.1z"}})])])])]),t._v(" "),a("div",{staticClass:"datepicker-week flex"},t._l(t.weekDays,function(e,i){return a("div",{key:i,staticClass:"flex-1 text-muted fs-12 flex justify-content-center align-center"},[t._v("\n "+t._s(e)+"\n ")])})),t._v(" "),a("div",{staticClass:"month-container",style:{height:t.monthDays.length+t.weekDay>35?"250px":"210px"}},[a("transition-group",{attrs:{name:t.transitionDaysName}},t._l([t.month],function(e){return a("div",{key:e.month,staticClass:"datepicker-days flex"},[t._l(t.weekDay,function(t){return a("button",{key:t+"startEmptyDay",staticClass:"datepicker-day align-center justify-content-center"})}),t._v(" "),t._l(t.monthDays,function(e){return a("button",{key:e.format("D"),staticClass:"datepicker-day flex align-center justify-content-center",class:{selected:t.isSelected(e)&&!t.isDisabled(e),disabled:t.isDisabled(e)||t.isWeekEndDay(e),enable:!(t.isDisabled(e)||t.isWeekEndDay(e)),between:t.isBetween(e)&&t.rangeMode,first:t.firstInRange(e)&&t.rangeMode,last:t.lastInRange(e)&&!!t.dateTime.end&&t.rangeMode},attrs:{type:"button",tabindex:"-1"},on:{click:function(a){!t.isDisabled(e)&&!t.isWeekEndDay(e)&&t.selectDate(e)}}},[t.isToday(e)?a("span",{staticClass:"datepicker-today"}):t._e(),t._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:!t.isDisabled(e)||t.isSelected(e),expression:"!isDisabled(day) || isSelected(day)"}],staticClass:"datepicker-day-effect",style:t.bgStyle}),t._v(" "),a("span",{staticClass:"datepicker-day-text"},[t._v(t._s(e.format("D")))])])}),t._v(" "),t._l(t.endEmptyDays,function(t){return a("div",{key:t+"endEmptyDay",staticClass:"datepicker-day flex align-center justify-content-center"})})],2)}))],1)])},[],!1,null,"26cd3b6e",null));_.options.__file="CtkDatePicker.vue";var x=_.exports,T={name:"CtkButtonValidate",props:{dark:{type:Boolean,default:!1}}},S=(a(17),c(T,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"datepicker-buttons-container flex justify-content-right",class:{"is-dark":t.dark}},[a("button",{staticClass:"datepicker-button flex align-center justify-content-center",attrs:{type:"button",tabindex:"-1"},on:{click:function(e){t.$emit("validate")}}},[a("span",{staticClass:"datepicker-button-effect"}),t._v(" "),a("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"}},[a("path",{attrs:{d:"M0 0h24v24H0z",fill:"none"}}),t._v(" "),a("path",{attrs:{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}})])])])},[],!1,null,"4bd5b1c0",null));S.options.__file="CtkButtonValidate.vue";var C=S.exports,w={name:"CtkDatePickerAgenda",components:{CtkTimePicker:d,CtkDatePicker:x,CtkButtonValidate:C},props:{dateTime:{type:Object,default:Object},visible:{type:Boolean,required:!0,default:!0},disableTime:{type:Boolean,default:Boolean},disableDate:{type:Boolean,default:Boolean},minuteInterval:{type:Number,default:Number},color:{type:String,default:String},timeFormat:{type:String,default:String},withoutHeader:{type:Boolean,default:Boolean},locale:{type:String,default:String},maxDate:{type:String,default:String},minDate:{type:String,default:String},inline:{type:Boolean,default:Boolean},agendaPosition:{type:String,default:String},noWeekendsDays:{type:Boolean,default:Boolean},autoClose:{type:Boolean,default:Boolean},enableButtonValidate:{type:Boolean,default:Boolean},value:{type:[String,Object],default:String},disabledDates:{type:Array,default:Array},dark:{type:Boolean,default:Boolean}},data:function(){return{month:this.getMonth(),transitionDayName:"slidevnext",timeWidth:this.disableTime?null:this.getTimePickerWidth()}},computed:{position:function(){return window.innerWidth<412?null:"top"===this.agendaPosition?{top:"100%",marginBottom:"10px"}:{bottom:"100%",marginTop:"10px"}},isFormatTwelve:function(){return!!this.timeFormat&&(this.timeFormat.indexOf("a")>-1||this.timeFormat.indexOf("A")>-1)},bgStyle:function(){return{backgroundColor:this.color,padding:this.disableDate?"10px 0":"10px 0 10px 10px"}},year:function(){return this.dateTime.format("YYYY")}},watch:{dateTime:{handler:function(){this.month=this.getMonth(),this.getDateFormatted()},deep:!0},locale:function(){this.month=this.getMonth(),this.getDateFormatted()},visible:function(t){var e=this;t&&!this.disableTime&&this.$nextTick(function(){e.timeWidth=e.getTimePickerWidth()})}},methods:{getMonth:function(){var t=this.dateTime;return new b(t.month(),t.year())},getDateFormatted:function(){return o()(this.dateTime).locale(this.locale).format("ddd D MMM")},selectTime:function(t){var e=t>this.dateTime;this.transitionDayName=e?"slidevnext":"slidevprev",this.$emit("change-date",t)},selectDate:function(t){var e=t.isBefore(this.dateTime);this.transitionDayName=e?"slidevprev":"slidevnext";var a=this.dateTime;t.add(a.hour(),"hours"),t.add(a.minute(),"minutes"),this.$emit("change-date",t)},changeMonth:function(t){var e=this.month.month+("prev"===t?-1:1),a=this.month.year;(e>11||e<0)&&(a+="prev"===t?-1:1,e="prev"===t?11:0),this.month=new b(e,a)},validate:function(){this.$emit("validate")},getTimePickerWidth:function(){var t=this.$refs.timePickerComponent&&this.$refs.timePickerComponent.$el.clientWidth?this.$refs.timePickerComponent.$el.clientWidth:160;return{flex:"0 0 ".concat(t,"px"),width:"".concat(t,"px"),minWidth:"".concat(t,"px"),maxWidth:"".concat(t,"px")}}}},M=(a(18),c(w,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("transition",{attrs:{name:"top"===t.agendaPosition?"slide":"slideinvert"}},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.visible||t.inline,expression:"visible || inline"}],staticClass:"datetimepicker flex",class:{inline:t.inline,"is-dark":t.dark,"has-validate-button":t.enableButtonValidate},style:t.position,on:{click:function(t){t.stopPropagation()}}},[a("div",{staticClass:"datepicker flex flex-direction-column",style:t.position},[t.withoutHeader?a("div",{staticClass:"datepicker-header",style:t.bgStyle},[t.disableDate?t._e():a("div",{staticClass:"datepicker-year"},[a("transition-group",{attrs:{name:t.transitionDayName}},t._l([t.year],function(e){return a("div",{key:e},[t._v(t._s(e))])}))],1),t._v(" "),a("div",{staticClass:"flex justify-content-between"},[t.disableDate?t._e():a("transition-group",{staticClass:"datepicker-date dots-text flex-1",attrs:{name:t.transitionDayName}},t._l([t.getDateFormatted()],function(e){return a("span",{key:e},[t._v(t._s(t.getDateFormatted()))])})),t._v(" "),t.disableTime||t.isFormatTwelve?t.disableTime?t._e():a("div",{staticClass:"datepicker-time flex",style:t.timeWidth},[a("transition-group",{staticClass:"dots-text datepicker-hour flex-1 flex",class:{"justify-content-center":t.disableDate},attrs:{name:t.transitionDayName}},t._l([t.dateTime.format(t.timeFormat)],function(e){return a("span",{key:e},[t._v(t._s(e))])}))],1):a("div",{staticClass:"datepicker-time flex justify-content-center",style:t.timeWidth},[a("transition-group",{staticClass:"dots-text datepicker-hour flex-1 flex justify-content-right",attrs:{name:t.transitionDayName}},t._l([t.dateTime.format("HH")],function(e){return a("span",{key:e},[t._v(t._s(e))])})),t._v(" "),a("span",[t._v(":")]),t._v(" "),a("transition-group",{staticClass:"dots-text datepicker-minute flex-1 flex justify-content-left",attrs:{name:t.transitionDayName}},t._l([t.dateTime.format("mm")],function(e){return a("span",{key:e},[t._v(t._s(e))])}))],1)],1)]):t._e(),t._v(" "),a("div",{staticClass:"datetimepicker-container flex"},[t.disableDate?t._e():a("ctk-date-picker",{attrs:{inline:t.inline,"no-weekends-days":t.noWeekendsDays,month:t.month,"date-time":t.dateTime,locale:t.locale,color:t.color,"min-date":t.minDate,"max-date":t.maxDate,"disabled-dates":t.disabledDates,dark:t.dark},on:{"change-date":t.selectDate,"change-month":t.changeMonth}}),t._v(" "),t.disableTime?t._e():a("ctk-time-picker",{ref:"timePickerComponent",attrs:{month:t.month,"date-time":t.dateTime,color:t.color,format:t.timeFormat,"disable-date":t.disableDate,"minute-interval":t.minuteInterval,visible:t.visible,value:t.value,dark:t.dark},on:{"change-time":t.selectTime}})],1),t._v(" "),a("ctk-button-validate",{directives:[{name:"show",rawName:"v-show",value:t.enableButtonValidate&&!t.inline&&!t.autoClose,expression:"enableButtonValidate && !inline && !autoClose"}],staticClass:"button-validate flex-fixed",attrs:{dark:t.dark},on:{validate:t.validate}})],1)])])},[],!1,null,"0a6eee56",null));M.options.__file="CtkDatePickerAgenda.vue";var B=M.exports,Y=a(13),O={name:"CtkCalendarShortcur",props:{color:{type:String,default:String},locale:{type:String,default:String},dark:{type:Boolean,default:!1},dateTime:{type:Object,default:Object},shortcutsTranslation:{type:Object,default:Object}},data:function(){return{shortcuts:[{key:"this_week",value:"isoWeek",isHover:!1,isSelected:!1},{key:"last_7_days",value:7,isHover:!1,isSelected:!1},{key:"last_30_days",value:30,isHover:!1,isSelected:!1},{key:"this_month",value:"month",isHover:!1,isSelected:!1},{key:"last_month",value:"-month",isHover:!1,isSelected:!1},{key:"this_year",value:"year",isHover:!1,isSelected:!1},{key:"last_year",value:"-year",isHover:!1,isSelected:!1}]}},computed:{getStyle:function(){return{color:this.color}},getSelectedStyle:function(){return{backgroundColor:this.color,color:"#FFF"}},getEffectStyle:function(){return{backgroundColor:this.color}}},methods:{getTranslation:function(t){return this.shortcutsTranslation[t]||Y[t]},unSelectAllShortcuts:function(){this.shortcuts.forEach(function(t){t.isSelected=!1})},select:function(t){var e=t.value,a={start:null,end:null};switch(this.unSelectAllShortcuts(),t.isSelected=!0,e){case"isoWeek":case"month":case"year":a.start=o()().locale(this.locale).startOf(e),a.end=o()().locale(this.locale).endOf(e);break;case 7:case 30:a.end=o()().locale(this.locale).subtract(1,"d"),a.start=o()().locale(this.locale).subtract(e,"d");break;case"-month":a.start=o()().locale(this.locale).subtract(1,"months").startOf("month"),a.end=o()().locale(this.locale).subtract(1,"months").endOf("month");break;case"-year":a.start=o()().locale(this.locale).subtract(1,"years").startOf("year"),a.end=o()().locale(this.locale).subtract(1,"years").endOf("year")}this.$emit("change-range",a)}}},H=(a(19),c(O,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"shortcuts-container",class:{"is-dark":t.dark}},t._l(t.shortcuts,function(e){return a("button",{key:e.value,staticClass:"shortcut-button",class:{"is-selected":e.isSelected},style:[e.isSelected?t.getSelectedStyle:t.getStyle],attrs:{tabindex:"-1"},on:{mouseover:function(t){e.isHover=!0},mouseleave:function(t){e.isHover=!1},click:function(a){t.select(e)}}},[a("span",{staticClass:"datepicker-button-effect",style:[t.getEffectStyle]}),t._v(" "),a("span",{staticClass:"shortcut-button-content"},[t._v("\n "+t._s(t.getTranslation(e.key))+"\n ")])])}))},[],!1,null,"b8e9fb16",null));H.options.__file="index.vue";var P={name:"CtkDateRangePicker",components:{CtkDatePicker:x,CtkButtonValidate:C,CtkCalendarShortcut:H.exports},props:{disabledDates:{type:Array,default:Array},dateTime:{type:Object,default:Object},visible:{type:Boolean,required:!0,default:!0},color:{type:String,default:String},withoutHeader:{type:Boolean,default:Boolean},locale:{type:String,default:String},maxDate:{type:String,default:String},minDate:{type:String,default:String},inline:{type:Boolean,default:Boolean},agendaPosition:{type:String,default:String},noWeekendsDays:{type:Boolean,default:Boolean},autoClose:{type:Boolean,default:Boolean},enableButtonValidate:{type:Boolean,default:Boolean},value:{type:[String,Object],default:String},withoutRangeShortcut:{type:Boolean,default:!1},dark:{type:Boolean,default:Boolean},shortcutsTranslation:{type:Object,default:Object}},data:function(){return{month:this.getMonth()}},computed:{position:function(){return window.innerWidth<412?null:"top"===this.agendaPosition?{top:"100%",marginBottom:"10px"}:{bottom:"100%",marginTop:"10px"}},bgStyle:function(){return{backgroundColor:this.color,padding:"10px 0 10px 10px"}},year:function(){return(this.dateTime.start||this.dateTime.end?this.dateTime.end?this.dateTime.end:this.dateTime.start:o()()).format("YYYY")},getRangeDatesFormatted:function(){var t=this.value&&this.value.start,e=this.value&&this.value.end;if(t||e){if(t||e){var a=t?"".concat(o()(this.dateTime.start).locale(this.locale).format("ddd D MMM")):"...";return e?"".concat(a," - ").concat(o()(this.dateTime.end).locale(this.locale).format("ddd D MMM")):"".concat(a," - ...")}return null}return"... - ..."}},watch:{dateTime:{handler:function(){this.month=this.getMonth()},deep:!0},locale:function(){this.month=this.getMonth()}},methods:{getMonth:function(){var t=this.dateTime.start||this.dateTime.end?this.dateTime.end?this.dateTime.end:this.dateTime.start:o()();return new b(t.month(),t.year())},selectDate:function(t){this.$emit("change-date",t),this.$refs["calendar-shortcut"].unSelectAllShortcuts()},selectShortcut:function(t){this.$emit("change-date",t)},changeMonth:function(t){var e=this.month.month+("prev"===t?-1:1),a=this.month.year;(e>11||e<0)&&(a+="prev"===t?-1:1,e="prev"===t?11:0),this.month=new b(e,a)},validate:function(){this.$emit("validate")}}},j=(a(20),c(P,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("transition",{attrs:{name:"top"===t.agendaPosition?"slide":"slideinvert"}},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.visible||t.inline,expression:"visible || inline"}],staticClass:"datetimepicker flex",class:{inline:t.inline,"is-dark":t.dark,"has-validate-button":t.enableButtonValidate},style:t.position,on:{click:function(t){t.stopPropagation()}}},[a("div",{staticClass:"datepicker flex flex-direction-column",style:t.position},[t.withoutHeader?a("div",{staticClass:"datepicker-header",style:t.bgStyle},[a("div",{staticClass:"datepicker-year"},[a("div",[t._v(t._s(t.year))])]),t._v(" "),a("div",{staticClass:"flex justify-content-between"},[a("span",{staticClass:"datepicker-date dots-text flex-1"},[t._v(t._s(t.getRangeDatesFormatted))])])]):t._e(),t._v(" "),a("div",{staticClass:"datetimepicker-container flex"},[t.withoutRangeShortcut?t._e():a("ctk-calendar-shortcut",{ref:"calendar-shortcut",attrs:{color:t.color,locale:t.locale,dark:t.dark,"date-time":t.dateTime,"shortcuts-translation":t.shortcutsTranslation},on:{"change-range":t.selectShortcut}}),t._v(" "),a("ctk-date-picker",{staticClass:"date-range-picker",attrs:{inline:t.inline,"no-weekends-days":t.noWeekendsDays,month:t.month,"date-time":t.dateTime,locale:t.locale,color:t.color,"min-date":t.minDate,"max-date":t.maxDate,value:t.value,"disabled-dates":t.disabledDates,dark:t.dark,"range-mode":""},on:{"change-date":t.selectDate,"change-month":t.changeMonth}})],1),t._v(" "),!t.enableButtonValidate||t.inline||t.autoClose?t._e():a("ctk-button-validate",{attrs:{dark:t.dark},on:{validate:t.validate}})],1)])])},[],!1,null,"c3b37798",null));j.options.__file="CtkDateRangePicker.vue";var F=function(t,e,a){var i=Math.ceil(e.minute()/t)*t;return a(e.clone().minute(i).second(0))},$={name:"VueCtkDateTimePicker",components:{CtkDatePickerAgenda:B,CtkDateRangePicker:j.exports},props:{label:{type:String,default:"Select date & time"},hint:{type:String,default:String},errorHint:{type:Boolean,default:Boolean},value:{type:[String,Object],required:!1,default:null},formatted:{type:String,default:"llll"},format:{type:String,default:String},locale:{type:String,default:(window.navigator.userLanguage||window.navigator.language||"en").substr(0,2)},timeZone:{type:String,default:n.a.tz.guess()||"America/Los_Angeles"},disableTime:{type:Boolean,default:!1},disableDate:{type:Boolean,default:!1},minuteInterval:{type:Number,default:1},color:{type:String,default:String},timeFormat:{type:String,default:"h:mm a"},withoutHeader:{type:Boolean,default:!1},id:{type:String,default:"CtkDateTimePicker"},minDate:{type:String,default:String},maxDate:{type:String,default:String},withoutInput:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},noWeekendsDays:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},enableButtonValidate:{type:Boolean,default:!1},disabledDates:{type:Array,default:Array},rangeMode:{type:Boolean,default:!1},overlayBackground:{type:Boolean,default:!1},withoutRangeShortcut:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},shortcutsTranslation:{type:Object,default:Object}},data:function(){return{isVisible:!1,isFocus:!1,agendaPosition:"top",oldValue:this.value,clientWidth:null}},computed:{isInline:function(){return this.withoutInput||this.inline},getColorStyle:function(){return this.isFocus||this.isVisible?{color:this.color}:null},getBorderStyle:function(){return this.isFocus&&!this.errorHint||this.isVisible?{borderColor:this.color}:null},dateTime:function(){return this.rangeMode?this.getRangeDatesTime():this.getDateTime()},dateFormatted:function(){return this.rangeMode?this.getRangeDatesFormatted():this.getDateFormatted()},hasDisabledTime:function(){return this.disableTime||this.rangeMode}},created:function(){if(this.value){var t=this.rangeMode?this.value:this.disableDate?n()("".concat(n()().format("YYYY-MM-DD")," ").concat(this.value)):n()(this.value).tz(this.timeZone);this.$emit("input",this.rangeMode?this.getRangeDatesTimeFormat(t):this.getDateTimeFormat(t))}else this.rangeMode&&this.$emit("input",this.getRangeDatesTimeFormat({}));n.a.tz(this.timeZone).locale(this.locale)},methods:{getDateTime:function(){var t=this.disableDate?this.value?n()("".concat(n()().tz(this.timeZone).format("YYYY-MM-DD")," ").concat(this.value)).tz(this.timeZone):n()().tz(this.timeZone):this.value?n()(this.value).tz(this.timeZone):n()().tz(this.timeZone);return F(this.minuteInterval,t,n.a)},getDateTimeFormat:function(t){return F(this.minuteInterval,t,n.a).tz(this.timeZone).format(this.format)},getDateFormatted:function(){var t=this.value?this.disableDate?n()("".concat(n()().tz(this.timeZone).format("YYYY-MM-DD")," ").concat(this.value)).tz(this.timeZone):n()(this.value).tz(this.timeZone):null;return t?F(this.minuteInterval,t,n.a).locale(this.locale).tz(this.timeZone).format(this.formatted):null},getRangeDatesTime:function(){var t=this.value&&this.value.start,e=this.value&&this.value.end;return{start:t?n()(this.value.start).tz(this.timeZone):null,end:e?n()(this.value.end).tz(this.timeZone):null}},getRangeDatesTimeFormat:function(t){var e=t.start,a=t.end;return{start:e?n()(e).tz(this.timeZone).format(this.format):null,end:a?n()(a).tz(this.timeZone).format(this.format):null}},getRangeDatesFormatted:function(){var t=this.value&&this.value.start,e=this.value&&this.value.end;if(t||e){var a=t?"".concat(n()(this.value.start).tz(this.timeZone).locale(this.locale).format(this.formatted)):"...";return e?"".concat(a," - ").concat(n()(this.value.end).tz(this.timeZone).locale(this.locale).format(this.formatted)):"".concat(a," - ...")}return null},changeDate:function(t){this.$emit("input",this.rangeMode?this.getRangeDatesTimeFormat(t):this.getDateTimeFormat(t)),this.autoClose&&this.rangeMode&&t.end&&t.start?this.hideDatePicker():this.autoClose&&!this.rangeMode&&this.hideDatePicker()},showDatePicker:function(){if(!this.disabled){this.setBodyOverflow(!0);var t=this.$refs.parent.getBoundingClientRect(),e=window.innerHeight,a=428;a=this.enableButtonValidate?a:382,a=this.withoutHeader?363:a;var i=e-(t.top+t.height)>a||e-t.top>e/2+t.height;this.agendaPosition=i?"top":"bottom",this.isVisible=!0}},hideDatePicker:function(){this.setBodyOverflow(),this.isVisible=!1},setBodyOverflow:function(t){window.innerWidth<412&&(document.getElementsByTagName("body")[0].style.overflow=t?"hidden":null)},onFocus:function(){this.isFocus=!0,this.showDatePicker()},unFocus:function(){this.hideDatePicker(),this.isFocus=!1},validate:function(){this.unFocus()}}},N=(a(21),c($,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"ctk-date-time-picker",class:{inline:t.inline,"is-dark":t.dark},attrs:{id:t.id}},[t.inline?t._e():a("div",{ref:"parent",staticClass:"field",class:{"is-focused":t.isFocus||t.isVisible,"has-value":t.dateFormatted,"has-error":t.errorHint,"is-disabled":t.disabled},on:{click:t.showDatePicker}},[a("input",{ref:"CtkDateTimePicker",staticClass:"field-input",style:[t.getBorderStyle],attrs:{id:t.id,placeholder:t.label,disabled:t.disabled,type:"text",readonly:""},domProps:{value:t.dateFormatted},on:{focus:t.onFocus}}),t._v(" "),a("label",{ref:"label",staticClass:"field-label",class:t.hint?t.errorHint?"text-danger":"text-primary":"",style:[t.getColorStyle],attrs:{for:t.id}},[t._v("\n "+t._s(t.hint||t.label)+"\n ")])]),t._v(" "),t.overlay&&t.isVisible&&!t.inline?a("div",{staticClass:"time-picker-overlay",class:{"has-background":t.overlayBackground},on:{click:function(e){return e.stopPropagation(),t.unFocus(e)}}}):t._e(),t._v(" "),t.rangeMode?a("ctk-date-range-picker",{ref:"range",attrs:{"date-time":t.dateTime,color:t.color,visible:t.isVisible,"without-header":!t.withoutHeader,"disable-time":t.hasDisabledTime,"disable-date":t.disableDate,"minute-interval":t.minuteInterval,"time-format":t.timeFormat,locale:t.locale,"min-date":t.minDate,"max-date":t.maxDate,"agenda-position":t.agendaPosition,inline:t.isInline,"no-weekends-days":t.noWeekendsDays,"enable-button-validate":t.enableButtonValidate,"auto-close":t.autoClose,"range-mode":t.rangeMode,"disabled-dates":t.disabledDates,"without-range-shortcut":t.withoutRangeShortcut,dark:t.dark,"shortcuts-translation":t.shortcutsTranslation},on:{"change-date":t.changeDate,validate:t.validate},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}}):a("ctk-date-picker-agenda",{ref:"agenda",attrs:{"date-time":t.dateTime,color:t.color,visible:t.isVisible,"without-header":!t.withoutHeader,"disable-time":t.hasDisabledTime,"disable-date":t.disableDate,"minute-interval":t.minuteInterval,"time-format":t.timeFormat,locale:t.locale,"min-date":t.minDate,"max-date":t.maxDate,"agenda-position":t.agendaPosition,inline:t.inline,"no-weekends-days":t.noWeekendsDays,"enable-button-validate":t.enableButtonValidate,"auto-close":t.autoClose,"range-mode":t.rangeMode,"disabled-dates":t.disabledDates,dark:t.dark},on:{"change-date":t.changeDate,validate:t.validate},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)},[],!1,null,null,null));N.options.__file="vue-ctk-date-time-picker.vue";e.default=N.exports}]);
{
"name": "vue-ctk-date-time-picker",
"version": "1.3.5",
"version": "1.3.6",
"description": "A vue component for select date & time (by Chronotruck)",

@@ -12,4 +12,4 @@ "author": "Louis Mazel <loic.mazuel@chronotruck.com>",

"build": "npm run lint && npm run build:cjs && npm run build:umd && npm run build:demo",
"build:cjs": "poi build --format cjs --dist dist",
"build:umd": "poi build --format umd --dist dist/umd",
"build:cjs": "poi build --format cjs --out-dir dist",
"build:umd": "poi build --format umd --out-dir dist/umd",
"build:demo": "node build-config/build.js",

@@ -19,4 +19,4 @@ "test": "poi test",

"test:cov": "poi test --coverage",
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
"before-publish": "npm run lint && npm run build && npm i && yarn"
"dev": "cross-env webpack-dev-server --open --hot --config build-config/webpack.dev.conf.js",
"before-publish": "npm run lint && npm run build && npm i"
},

@@ -34,17 +34,22 @@ "files": [

"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/plugin-proposal-function-sent": "^7.1.0",
"@babel/plugin-proposal-json-strings": "^7.0.0",
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/plugin-syntax-jsx": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"autoprefixer": "^8.0.0",
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1",
"babel-plugin-istanbul": "^4.1.1",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"babel-eslint": "^9.0.0",
"babel-loader": "^8.0.4",
"chai": "^4.1.2",
"chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1",
"cross-env": "^5.0.5",
"cross-env": "^5.2.0",
"css-loader": "^0.28.0",

@@ -55,3 +60,3 @@ "cssnano-cli": "^1.0.4",

"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
"eslint-loader": "^2.1.1",
"eslint-plugin-import": "^2.7.0",

@@ -62,6 +67,6 @@ "eslint-plugin-node": "^5.2.0",

"eslint-plugin-vue": "^4.0.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"file-loader": "^1.1.11",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"html-webpack-plugin": "^3.2.0",
"karma-chai": "^0.1.0",

@@ -76,4 +81,4 @@ "karma-phantomjs-launcher": "^1.0.4",

"ora": "^1.2.0",
"poi": "^9.5.2",
"poi-preset-karma": "^9.2.1",
"poi": "^10.2.10",
"poi-preset-karma": "^9.2.4",
"portfinder": "^1.0.13",

@@ -91,9 +96,10 @@ "postcss-cli": "^5.0.0",

"url-loader": "^1.1.1",
"vue-loader": "^13.3.0",
"vue-loader": "^15.4.2",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2",
"vue-webpack-loaders": "^1.0.6",
"webpack": "^3.6.0",
"webpack": "^4.25.1",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.7",
"webpack-merge": "^4.1.0"

@@ -100,0 +106,0 @@ },

@@ -55,2 +55,4 @@ ![vue-ctk-date-time-picker](./assets/logo_sticky.png)

```
Here is an example of UMD implementation: https://codepen.io/louismazel/pen/jQWNzQ
## Props API

@@ -86,2 +88,3 @@

| dark | Boolean | no | false |
| withoutRangeShortcut | Boolean | no | false |
| shortcuts-translation (8) | Object | no | - |

@@ -88,0 +91,0 @@

@@ -5,2 +5,4 @@

import '@/../assets/main.css'
Vue.config.productionTip = false

@@ -7,0 +9,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc