vue-ctk-date-time-picker
Advanced tools
Comparing version 1.1.14 to 1.1.15
@@ -1,2 +0,2 @@ | ||
module.exports=function(t){function e(n){if(i[n])return i[n].exports;var a=i[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var i={};return e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=7)}([function(t,e){t.exports=require("moment")},function(t,e){t.exports=function(t,e,i,n,a,s){var r,o=t=t||{},c=typeof t.default;"object"!==c&&"function"!==c||(r=t,o=t.default);var l="function"==typeof o?o.options:o;e&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0),i&&(l.functional=!0),a&&(l._scopeId=a);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__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},l._ssrRegister=u):n&&(u=n),u){var d=l.functional,m=d?l.render:l.beforeCreate;d?(l._injectStyles=u,l.render=function(t,e){return u.call(e),m(t,e)}):l.beforeCreate=m?[].concat(m,u):[u]}return{esModule:r,exports:o,options:l}}},function(t,e,i){"use strict";function n(t,e,i){var n=Math.ceil(e.minute()/t)*t;return i(e.clone().minute(n).second(0))}var a=i(0),s=i.n(a),r=i(10),o=i(25);e.a={name:"ctk-date-time-picker",components:{CtkDatePickerAgenda:r.a},directives:{"click-outside":o.a},props:{label:{type:String,default:"Select date & time"},hint:{type:String},errorHint:{type:Boolean},value:{required:!1},formatted:{type:String,default:"llll"},format:{type:String},locale:{type:String,default:"en"},disableTime:{type:Boolean,default:!1},disableDate:{type:Boolean,default:!1},minuteInterval:{type:Number,default:1},color:{type:String},timeFormat:{type:String,default:"H:mm a"},withoutHeader:{type:Boolean,default:!1},id:{type:String,default:"CtkDateTimePicker"},minDate:{type:String},maxDate:{type:String},withoutInput:{type:Boolean,default:!1},noWeekendsDays:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},data:function(){return{isVisible:!1,isFocus:!1,agendaPosition:"top",oldValue:this.value}},computed:{colorStyle:function(){return{color:this.color}},borderStyle:function(){return{borderColor:this.color}},dateTime:{get:function(){if(this.disableDate){if(this.value){var t=void 0;return t=this.disableDate?s()(s()().format("YYYY-MM-DD")+" "+this.value):s()(this.value),n(this.minuteInterval,t,s.a)}return n(this.minuteInterval,s()().clone(),s.a)}return n(this.minuteInterval,this.value?s()(this.value).clone():s()().clone(),s.a)}},dateFormatted:{get:function(){var t=void 0;return t=this.value?this.disableDate?s()(s()().format("YYYY-MM-DD")+" "+this.value):s()(this.value):null,t&&!this.disableTime?n(this.minuteInterval,t,s.a).locale(this.locale).format(this.formatted):null}}},created:function(){this.value&&this.$emit("input",this.dateTime.format(this.format)),s.a.locale(this.locale)},methods:{changeDate:function(t){this.$emit("input",s()(t).format(this.format)),this.autoClose&&this.hideDatePicker()},showDatePicker:function(){if(!this.disabled){var t=this.$refs.parent.getBoundingClientRect(),e=window.innerHeight;e-(t.top+t.height)>300||e-t.top>e/2+t.height?this.agendaPosition="top":this.agendaPosition="bottom",this.isVisible=!0}},hideDatePicker:function(){this.isVisible=!1},onFocus:function(){this.isFocus=!0,this.showDatePicker()},unFocus:function(){this.hideDatePicker(),this.isFocus=!1}}}},function(t,e,i){"use strict";var n=i(12),a=i(17),s=i(6),r=i(0),o=i.n(r);e.a={name:"CtkDatePickerAgenda",components:{CtkTimePicker:n.a,CtkDatePicker:a.a},props:{dateTime:{},visible:{type:Boolean,required:!0,default:!0},disableTime:{type:Boolean},disableDate:{type:Boolean},minuteInterval:{type:Number},color:{type:String},timeFormat:{type:String},withoutHeader:{},locale:{},maxDate:{},minDate:{},withoutInput:{},agendaPosition:{},noWeekendsDays:{},autoClose:{}},data:function(){return{month:this.disableDate?"":new s.a(this.dateTime.month(),this.dateTime.year()),transitionDayName:"slidevnext",timeWidth:this.disableTime?null:this.dateTimeWidth()}},computed:{position:function(){return"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")}},methods:{getDateFormatted:function(){return o()(this.dateTime).locale(this.locale).format("ddd D MMM")},selectTime:function(t){this.transitionDayName="slidevprev",t>this.dateTime&&(this.transitionDayName="slidevnext"),this.$emit("change-date",t)},selectDate:function(t){this.transitionDayName="slidevnext",t.isBefore(this.dateTime)&&(this.transitionDayName="slidevprev"),t.add(this.dateTime.hour(),"hours"),t.add(this.dateTime.minute(),"minutes"),this.$emit("change-date",t)},changeMonth:function(t){var e=this.month.month+("prev"===t?-1:1),i=this.month.year;(e>11||e<0)&&(i+="prev"===t?-1:1,e="prev"===t?11:0),this.month=new s.a(e,i)},validate:function(){this.$emit("validate")},dateTimeWidth:function(){var t=void 0;return t=this.$refs.timePickerComponent&&this.$refs.timePickerComponent.$el.clientWidth?this.$refs.timePickerComponent.$el.clientWidth:160,{flex:"0 0 "+t+"px",width:t+"px",minWidth:t+"px",maxWidth:t+"px"}}},watch:{dateTime:{handler:function(){this.month=this.disableDate?"":new s.a(this.dateTime.month(),this.dateTime.year()),this.getDateFormatted()},deep:!0},locale:function(){this.month=this.disableDate?"":new s.a(this.dateTime.month(),this.dateTime.year()),this.getDateFormatted()},visible:function(t){var e=this;t&&!this.disableTime&&this.$nextTick(function(){e.timeWidth=e.dateTimeWidth()})}}}},function(t,e,i){"use strict";var n=i(14),a=i.n(n),s=i(15),r=i.n(s),o=i(0),c=i.n(o),l={HOUR_TOKENS:["HH","H","hh","h","kk","k"],MINUTE_TOKENS:["mm","m"],APM_TOKENS:["A","a"]};e.a={name:"CtkTimePicker",props:{format:{type:String},minuteInterval:{type:Number},month:{},dateTime:{type:Object},color:{type:String}},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()}},watch:{format:"renderFormat",minuteInterval:function(t){this.renderList("minute",t)},displayTime:"fillValues"},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,i){if(!t||!e||!e.length)return"";for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return t[n];return i||""},renderFormat:function(t){t=t||this.format,this.hourType=this.checkAcceptingType(l.HOUR_TOKENS,t,"HH"),this.minuteType=this.checkAcceptingType(l.MINUTE_TOKENS,t,"mm"),this.apmType=this.checkAcceptingType(l.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 i=0;i<60;i+=e)this.minutes.push(this.formatValue(this.minuteType,i))}},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,i=this.hourType,n=e||0===e?Number(e):"",a=this.isTwelveHours(i),s=!(!a||!this.apm)&&String(this.apm).toLowerCase();if(l.HOUR_TOKENS.forEach(function(r){if(r===i)return void(t[r]=e);var o=void 0,c=void 0;switch(r){case"H":case"HH":if(!String(n).length)return void(t[r]="");o=a?"pm"===s?n<12?n+12:n:n%12:n%24,t[r]="HH"===r&&o<10?"0"+o:String(o);break;case"k":case"kk":if(!String(n).length)return void(t[r]="");o=a?"pm"===s?n<12?n+12:n:12===n?24:n:0===n?24:n,t[r]="kk"===r&&o<10?"0"+o:String(o);break;case"h":case"hh":if(s)o=n,c=s||"am";else{if(!String(n).length)return t[r]="",t.a="",void(t.A="");n>11?(c="pm",o=12===n?12:n%12):(c=a?"":"am",o=n%12==0?12:n)}t[r]="hh"===r&&o<10?"0"+o:String(o),t.a=c,t.A=c.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,i=JSON.parse(r()(this.value||{})),n={};a()(i).forEach(function(e){n[e]=t[e]}),this.$emit("input",n),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 i=void 0;i=this.apm?c()(this.hour+":"+this.minute+(this.apm?this.apm:""),"HH:mm A").format("HH:mm"):c()(this.hour+":"+this.minute+(this.apm?this.apm:""),"HH:mm").format("HH:mm");var n=c()(this.dateTime.format("YYYY-MM-DD")+"T"+i);this.$emit("change-time",n)}},mounted:function(){this.renderFormat()}}},function(t,e,i){"use strict";var n=i(0),a=i.n(n),s=i(6);e.a={name:"CtkDatePicker",props:["month","dateTime","color","minDate","maxDate","locale","withoutInput","noWeekendsDays"],data:function(){return{transitionDaysName:"slidenext",transitionLabelName:"slidevnext",weekDays:Object(s.b)(this.locale)}},computed:{bgStyle:function(){return{backgroundColor:this.color}},endEmptyDays:function(){return this.monthDays.length+this.weekDay>35?42-this.monthDays.length-this.weekDay: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()},isDisabled:function(t){return this.minDate&&this.maxDate?!a()(t).isBetween(this.minDate,this.maxDate):this.minDate?a()(t).isBefore(this.minDate):!!this.maxDate&&a()(t).isAfter(this.maxDate)},isSelected:function(t){return a()(a()(this.dateTime).format("YYYY-MM-DD")).isSame(t.format("YYYY-MM-DD"))},isWeekEndDay:function(t){var e=a()(t).day(),i=[6,0];return!!this.noWeekendsDays&&i.indexOf(e)>-1},selectDate:function(t){this.$emit("change-date",t)},changeMonth:function(t){this.transitionDaysName="slide"+t,this.transitionLabelName="slidev"+t,this.$emit("change-month",t)}}}},function(t,e,i){"use strict";i.d(e,"b",function(){return f});var n=i(19),a=i.n(n),s=i(20),r=i.n(s),o=i(21),c=i.n(o),l=i(0),u=i.n(l),d=i(22),m=(i.n(d),Object(d.extendMoment)(u.a)),h=function(){function t(e,i){r()(this,t),this.start=m([i,e]),this.end=this.start.clone().endOf("month"),this.month=e,this.year=i}return c()(t,[{key:"getWeekStart",value:function(){return this.start.weekday()}},{key:"getDays",value:function(){return a()(m.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=m.range(this.start,this.end).by("days");return a()(t)}}]),t}();e.a=h;var f=function(t){var e=m.localeData(t).firstDayOfWeek();return m.weekdaysShort(1===e)}},function(t,e,i){t.exports=i(8)},function(t,e,i){"use strict";function n(t){i(9)}Object.defineProperty(e,"__esModule",{value:!0});var a=i(2),s=i(26),r=i(1),o=n,c=r(a.a,s.a,!1,o,null,null);e.default=c.exports},function(t,e){},function(t,e,i){"use strict";function n(t){i(11)}var a=i(3),s=i(24),r=i(1),o=n,c=r(a.a,s.a,!1,o,"data-v-b4324576",null);e.a=c.exports},function(t,e){},function(t,e,i){"use strict";function n(t){i(13)}var a=i(4),s=i(16),r=i(1),o=n,c=r(a.a,s.a,!1,o,"data-v-e3452eb2",null);e.a=c.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,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"timepicker-container flex",style:[{height:this.month?t.monthDays.length+t.weekDay>35?"347px":"307px":"180px"}]},[i("div",{staticClass:"time-container hours-container flex flex-1 flex-direction-column h-100 mh-100 w-100"},[i("div",{staticClass:"flex align-center justify-content-center time-label text-muted"},[t._v(t._s(t.hourType))]),t._v(" "),i("div",{staticClass:"h-100 mh-100 numbers-container"},t._l(t.hours,function(e){return i("div",{key:e,staticClass:"item flex align-center justify-content-center",class:[{active:t.hour===e},e],on:{click:function(i){i.stopPropagation(),t.select("hour",e)}}},[i("span",{staticClass:"timepicker-day-effect",style:t.styleColor}),t._v(" "),i("span",{staticClass:"timepicker-day-text"},[t._v(t._s(e))])])}))]),t._v(" "),i("div",{staticClass:"time-container minutes-container flex-1 flex flex-direction-column h-100 mh-100 w-100"},[i("div",{staticClass:"flex align-center justify-content-center time-label text-muted"},[t._v(t._s(t.minuteType))]),t._v(" "),i("div",{staticClass:"h-100 mh-100 numbers-container"},t._l(t.minutes,function(e){return i("div",{key:e,staticClass:"item flex align-center justify-content-center",class:[{active:t.minute===e},e],on:{click:function(i){i.stopPropagation(),t.select("minute",e)}}},[i("span",{staticClass:"timepicker-day-effect",style:t.styleColor}),t._v(" "),i("span",{staticClass:"timepicker-day-text"},[t._v(t._s(e))])])}))]),t._v(" "),t.apmType?i("div",{staticClass:"time-container apms-container flex flex-1 flex-direction-column h-100 mh-100 w-100"},[i("div",{staticClass:"flex align-center justify-content-center time-label text-muted"},[t._v(t._s(t.apmType))]),t._v(" "),i("div",{staticClass:"h-100 mh-100 numbers-container"},t._l(t.apms,function(e){return i("div",{key:e,staticClass:"item flex align-center justify-content-center",class:[{active:t.apm===e},e],on:{click:function(i){i.stopPropagation(),t.select("apm",e)}}},[i("span",{staticClass:"timepicker-day-effect",style:t.styleColor}),t._v(" "),i("span",{staticClass:"timepicker-day-text"},[t._v(t._s(e))])])}))]):t._e()])},a=[],s={render:n,staticRenderFns:a};e.a=s},function(t,e,i){"use strict";function n(t){i(18)}var a=i(5),s=i(23),r=i(1),o=n,c=r(a.a,s.a,!1,o,"data-v-1de90cae",null);e.a=c.exports},function(t,e){},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,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"datepicker-container",class:{"flex-1":t.withoutInput},attrs:{id:"CtkDatePicker"}},[i("div",{staticClass:"datepicker-controls flex align-center justify-content-center"},[i("div",{staticClass:"arrow-month h-100"},[i("div",{staticClass:"datepicker-button datepicker-prev text-center h-100 flex align-center",on:{click:function(e){t.changeMonth("prev")}}},[i("svg",{attrs:{viewBox:"0 0 1000 1000"}},[i("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(" "),i("div",{staticClass:"datepicker-container-label flex-1"},[i("transition-group",{staticClass:"h-100 flex align-center justify-content-center",attrs:{name:t.transitionLabelName}},t._l([t.month],function(e){return i("div",{key:e.month,staticClass:"datepicker-label fs-16",domProps:{textContent:t._s(t.getMonthFormatted())}})}))],1),t._v(" "),i("div",{staticClass:"arrow-month h-100 text-right"},[i("div",{staticClass:"datepicker-button datepicker-next text-center h-100 flex align-center justify-content-right",on:{click:function(e){t.changeMonth("next")}}},[i("svg",{attrs:{viewBox:"0 0 1000 1000"}},[i("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(" "),i("div",{staticClass:"datepicker-week flex"},t._l(t.weekDays,function(e,n){return i("div",{key:n,staticClass:"flex-1 text-muted fs-12 flex justify-content-center align-center"},[t._v("\n "+t._s(e)+"\n ")])})),t._v(" "),i("div",{staticClass:"month-container",style:{height:t.monthDays.length+t.weekDay>35?"250px":"210px"}},[i("transition-group",{attrs:{name:t.transitionDaysName}},t._l([t.month],function(e){return i("div",{key:e.month,staticClass:"datepicker-days flex"},[t._l(t.weekDay,function(t){return i("div",{key:t+"startEmptyDay",staticClass:"datepicker-day align-center justify-content-center"})}),t._v(" "),t._l(t.monthDays,function(e){return i("div",{key:e.format("D"),staticClass:"datepicker-day flex align-center justify-content-center",class:{selected:t.isSelected(e),disabled:t.isDisabled(e)||t.isWeekEndDay(e),enable:!(t.isDisabled(e)||t.isWeekEndDay(e))},on:{click:function(i){t.isDisabled(e)||t.isWeekEndDay(e)||t.selectDate(e)}}},[i("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(" "),i("span",{staticClass:"datepicker-day-text"},[t._v(t._s(e.format("D")))])])}),t._v(" "),t._l(t.endEmptyDays,function(e){return t.endEmptyDays?i("div",{key:e+"endEmptyDay",staticClass:"datepicker-day flex align-center justify-content-center"}):t._e()})],2)}))],1)])},a=[],s={render:n,staticRenderFns:a};e.a=s},function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"top"===this.agendaPosition?"slide":"slideinvert"}},[t.visible||t.withoutInput?i("div",{staticClass:"datetimepicker flex",class:{"without-input":t.withoutInput},style:t.position,on:{click:function(t){t.stopPropagation()}}},[i("div",{staticClass:"datepicker",style:t.position},[t.withoutHeader?i("div",{staticClass:"datepicker-header",style:t.bgStyle},[t.disableDate?t._e():i("div",{staticClass:"datepicker-year"},[i("transition-group",{attrs:{name:t.transitionDayName}},t._l([t.year],function(e){return i("div",{key:e},[t._v(t._s(e))])}))],1),t._v(" "),i("div",{staticClass:"flex justify-content-between"},[t.disableDate?t._e():i("transition-group",{staticClass:"datepicker-date dots-text flex-1",attrs:{name:t.transitionDayName}},t._l([t.getDateFormatted()],function(e){return i("span",{key:e},[t._v(t._s(t.getDateFormatted()))])})),t._v(" "),t.disableTime||t.isFormatTwelve?t.disableTime?t._e():i("div",{staticClass:"datepicker-time flex justify-content-center",style:t.timeWidth},[i("transition-group",{staticClass:"dots-text datepicker-hour flex-1 flex justify-content-center",attrs:{name:t.transitionDayName}},t._l([t.dateTime.format(t.timeFormat)],function(e){return i("span",{key:e},[t._v(t._s(e))])}))],1):i("div",{staticClass:"datepicker-time flex justify-content-center",style:t.timeWidth},[i("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 i("span",{key:e},[t._v(t._s(e))])})),t._v(" "),i("span",[t._v(":")]),t._v(" "),i("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 i("span",{key:e},[t._v(t._s(e))])}))],1)],1)]):t._e(),t._v(" "),i("div",{staticClass:"datetimepicker-container flex"},[t.disableDate?t._e():i("ctk-date-picker",{attrs:{"without-input":t.withoutInput,"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},on:{"change-date":t.selectDate,"change-month":t.changeMonth}}),t._v(" "),t.disableTime?t._e():i("ctk-time-picker",{ref:"timePickerComponent",attrs:{month:t.month,"date-time":t.dateTime,color:t.color,format:t.timeFormat,"minute-interval":t.minuteInterval},on:{"change-time":t.selectTime}})],1)])]):t._e()])},a=[],s={render:n,staticRenderFns:a};e.a=s},function(t,e,i){"use strict";var n="ontouchstart"in window||navigator.msMaxTouchPoints>0,a={instances:[],events:n?["touchstart","click"]:["click"]};a.onEvent=function(t){a.instances.forEach(function(e){var i=e.el,n=e.fn;t.target===i||i.contains(t.target)||n&&n(t)})},a.bind=function(t,e){a.instances.push({el:t,fn:e.value}),1===a.instances.length&&a.events.forEach(function(t){return document.addEventListener(t,a.onEvent)})},a.update=function(t,e){if("function"!=typeof e.value)throw new Error("Argument must be a function");a.instances.find(function(e){return e.el===t}).fn=e.value},a.unbind=function(t){var e=a.instances.findIndex(function(e){return e.el===t});e>=0&&a.instances.splice(e,1),0===a.instances.length&&a.events.forEach(function(t){return document.removeEventListener(t,a.onEvent)})},e.a="undefined"!=typeof window?a:{}},function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"bigParent",staticClass:"ctk-date-time-picker",attrs:{id:t.id}},[i("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.unFocus,expression:"unFocus"}],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}},[t.withoutInput?t._e():i("div",[i("input",{ref:"CtkDateTimePicker",staticClass:"field-input",style:t.isFocus&&!t.errorHint||t.isVisible?t.borderStyle:"",attrs:{type:"text",id:t.id,placeholder:t.label,disabled:t.disabled,readonly:""},domProps:{value:t.dateFormatted},on:{focus:t.onFocus}}),t._v(" "),i("label",{staticClass:"field-label",class:t.hint?t.errorHint?"text-danger":"text-primary":"",style:t.isFocus||t.isVisible?t.colorStyle:"",attrs:{for:t.id}},[t._v("\n "+t._s(t.hint||t.label)+"\n ")]),t._v(" "),t.isVisible?i("div",{staticClass:"time-picker-overlay",on:{click:function(e){return e.stopPropagation(),t.unFocus(e)}}}):t._e()]),t._v(" "),i("ctk-date-picker-agenda",{ref:"agenda",attrs:{"date-time":t.dateTime,color:t.color,visible:t.isVisible,"without-header":!t.withoutHeader,"disable-time":t.disableTime,"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,"without-input":t.withoutInput,"no-weekends-days":t.noWeekendsDays,"auto-close":t.autoClose},on:{"change-date":t.changeDate}})],1)])},a=[],s={render:n,staticRenderFns:a};e.a=s}]); | ||
module.exports=function(t){function e(n){if(i[n])return i[n].exports;var a=i[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var i={};return e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=7)}([function(t,e){t.exports=require("moment")},function(t,e){t.exports=function(t,e,i,n,a,s){var r,o=t=t||{},c=typeof t.default;"object"!==c&&"function"!==c||(r=t,o=t.default);var l="function"==typeof o?o.options:o;e&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0),i&&(l.functional=!0),a&&(l._scopeId=a);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__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},l._ssrRegister=u):n&&(u=n),u){var d=l.functional,m=d?l.render:l.beforeCreate;d?(l._injectStyles=u,l.render=function(t,e){return u.call(e),m(t,e)}):l.beforeCreate=m?[].concat(m,u):[u]}return{esModule:r,exports:o,options:l}}},function(t,e,i){"use strict";function n(t,e,i){var n=Math.ceil(e.minute()/t)*t;return i(e.clone().minute(n).second(0))}var a=i(0),s=i.n(a),r=i(10),o=i(25);e.a={name:"vue-ctk-date-time-picker",components:{CtkDatePickerAgenda:r.a},directives:{"click-outside":o.a},props:{label:{type:String,default:"Select date & time"},hint:{type:String},errorHint:{type:Boolean},value:{required:!1},formatted:{type:String,default:"llll"},format:{type:String},locale:{type:String,default:"en"},disableTime:{type:Boolean,default:!1},disableDate:{type:Boolean,default:!1},minuteInterval:{type:Number,default:1},color:{type:String},timeFormat:{type:String,default:"H:mm a"},withoutHeader:{type:Boolean,default:!1},id:{type:String,default:"CtkDateTimePicker"},minDate:{type:String},maxDate:{type:String},withoutInput:{type:Boolean,default:!1},noWeekendsDays:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},data:function(){return{isVisible:!1,isFocus:!1,agendaPosition:"top",oldValue:this.value}},computed:{colorStyle:function(){return{color:this.color}},borderStyle:function(){return{borderColor:this.color}},dateTime:{get:function(){if(this.disableDate){if(this.value){var t=void 0;return t=this.disableDate?s()(s()().format("YYYY-MM-DD")+" "+this.value):s()(this.value),n(this.minuteInterval,t,s.a)}return n(this.minuteInterval,s()(),s.a)}return n(this.minuteInterval,this.value?s()(this.value):s()(),s.a)}},dateFormatted:{get:function(){var t=void 0;return t=this.value?this.disableDate?s()(s()().format("YYYY-MM-DD")+" "+this.value):s()(this.value):null,t?n(this.minuteInterval,t,s.a).locale(this.locale).format(this.formatted):null}}},created:function(){this.value&&this.$emit("input",this.dateTime.format(this.format)),s.a.locale(this.locale)},methods:{changeDate:function(t){this.$emit("input",s()(t).format(this.format)),this.autoClose&&this.hideDatePicker()},showDatePicker:function(){if(!this.disabled){var t=this.$refs.parent.getBoundingClientRect(),e=window.innerHeight;e-(t.top+t.height)>300||e-t.top>e/2+t.height?this.agendaPosition="top":this.agendaPosition="bottom",this.isVisible=!0}},hideDatePicker:function(){this.isVisible=!1},onFocus:function(){this.isFocus=!0,this.showDatePicker()},unFocus:function(){this.hideDatePicker(),this.isFocus=!1}}}},function(t,e,i){"use strict";var n=i(12),a=i(17),s=i(6),r=i(0),o=i.n(r);e.a={name:"CtkDatePickerAgenda",components:{CtkTimePicker:n.a,CtkDatePicker:a.a},props:{dateTime:{},visible:{type:Boolean,required:!0,default:!0},disableTime:{type:Boolean},disableDate:{type:Boolean},minuteInterval:{type:Number},color:{type:String},timeFormat:{type:String},withoutHeader:{},locale:{},maxDate:{},minDate:{},withoutInput:{},agendaPosition:{},noWeekendsDays:{},autoClose:{}},data:function(){return{month:this.disableDate?"":new s.a(this.dateTime.month(),this.dateTime.year()),transitionDayName:"slidevnext",timeWidth:this.disableTime?null:this.dateTimeWidth()}},computed:{position:function(){return"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")}},methods:{getDateFormatted:function(){return o()(this.dateTime).locale(this.locale).format("ddd D MMM")},selectTime:function(t){this.transitionDayName="slidevprev",t>this.dateTime&&(this.transitionDayName="slidevnext"),this.$emit("change-date",t)},selectDate:function(t){this.transitionDayName="slidevnext",t.isBefore(this.dateTime)&&(this.transitionDayName="slidevprev"),t.add(this.dateTime.hour(),"hours"),t.add(this.dateTime.minute(),"minutes"),this.$emit("change-date",t)},changeMonth:function(t){var e=this.month.month+("prev"===t?-1:1),i=this.month.year;(e>11||e<0)&&(i+="prev"===t?-1:1,e="prev"===t?11:0),this.month=new s.a(e,i)},validate:function(){this.$emit("validate")},dateTimeWidth:function(){var t=void 0;return t=this.$refs.timePickerComponent&&this.$refs.timePickerComponent.$el.clientWidth?this.$refs.timePickerComponent.$el.clientWidth:160,{flex:"0 0 "+t+"px",width:t+"px",minWidth:t+"px",maxWidth:t+"px"}}},watch:{dateTime:{handler:function(){this.month=this.disableDate?"":new s.a(this.dateTime.month(),this.dateTime.year()),this.getDateFormatted()},deep:!0},locale:function(){this.month=this.disableDate?"":new s.a(this.dateTime.month(),this.dateTime.year()),this.getDateFormatted()},visible:function(t){var e=this;t&&!this.disableTime&&this.$nextTick(function(){e.timeWidth=e.dateTimeWidth()})}}}},function(t,e,i){"use strict";var n=i(14),a=i.n(n),s=i(15),r=i.n(s),o=i(0),c=i.n(o),l={HOUR_TOKENS:["HH","H","hh","h","kk","k"],MINUTE_TOKENS:["mm","m"],APM_TOKENS:["A","a"]};e.a={name:"CtkTimePicker",props:{format:{type:String},minuteInterval:{type:Number},month:{},dateTime:{type:Object},color:{type:String}},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()}},watch:{format:"renderFormat",minuteInterval:function(t){this.renderList("minute",t)},displayTime:"fillValues"},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,i){if(!t||!e||!e.length)return"";for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return t[n];return i||""},renderFormat:function(t){t=t||this.format,this.hourType=this.checkAcceptingType(l.HOUR_TOKENS,t,"HH"),this.minuteType=this.checkAcceptingType(l.MINUTE_TOKENS,t,"mm"),this.apmType=this.checkAcceptingType(l.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 i=0;i<60;i+=e)this.minutes.push(this.formatValue(this.minuteType,i))}},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,i=this.hourType,n=e||0===e?Number(e):"",a=this.isTwelveHours(i),s=!(!a||!this.apm)&&String(this.apm).toLowerCase();if(l.HOUR_TOKENS.forEach(function(r){if(r===i)return void(t[r]=e);var o=void 0,c=void 0;switch(r){case"H":case"HH":if(!String(n).length)return void(t[r]="");o=a?"pm"===s?n<12?n+12:n:n%12:n%24,t[r]="HH"===r&&o<10?"0"+o:String(o);break;case"k":case"kk":if(!String(n).length)return void(t[r]="");o=a?"pm"===s?n<12?n+12:n:12===n?24:n:0===n?24:n,t[r]="kk"===r&&o<10?"0"+o:String(o);break;case"h":case"hh":if(s)o=n,c=s||"am";else{if(!String(n).length)return t[r]="",t.a="",void(t.A="");n>11?(c="pm",o=12===n?12:n%12):(c=a?"":"am",o=n%12==0?12:n)}t[r]="hh"===r&&o<10?"0"+o:String(o),t.a=c,t.A=c.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,i=JSON.parse(r()(this.value||{})),n={};a()(i).forEach(function(e){n[e]=t[e]}),this.$emit("input",n),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 i=void 0;i=this.apm?c()(this.hour+":"+this.minute+(this.apm?this.apm:""),"HH:mm A").format("HH:mm"):c()(this.hour+":"+this.minute+(this.apm?this.apm:""),"HH:mm").format("HH:mm");var n=c()(this.dateTime.format("YYYY-MM-DD")+"T"+i);this.$emit("change-time",n)}},mounted:function(){this.renderFormat()}}},function(t,e,i){"use strict";var n=i(0),a=i.n(n),s=i(6);e.a={name:"CtkDatePicker",props:["month","dateTime","color","minDate","maxDate","locale","withoutInput","noWeekendsDays"],data:function(){return{transitionDaysName:"slidenext",transitionLabelName:"slidevnext",weekDays:Object(s.b)(this.locale)}},computed:{bgStyle:function(){return{backgroundColor:this.color}},endEmptyDays:function(){return this.monthDays.length+this.weekDay>35?42-this.monthDays.length-this.weekDay: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()},isDisabled:function(t){return this.minDate&&this.maxDate?!a()(t).isBetween(this.minDate,this.maxDate):this.minDate?a()(t).isBefore(this.minDate):!!this.maxDate&&a()(t).isAfter(this.maxDate)},isSelected:function(t){return a()(a()(this.dateTime).format("YYYY-MM-DD")).isSame(t.format("YYYY-MM-DD"))},isWeekEndDay:function(t){var e=a()(t).day(),i=[6,0];return!!this.noWeekendsDays&&i.indexOf(e)>-1},selectDate:function(t){this.$emit("change-date",t)},changeMonth:function(t){this.transitionDaysName="slide"+t,this.transitionLabelName="slidev"+t,this.$emit("change-month",t)}}}},function(t,e,i){"use strict";i.d(e,"b",function(){return f});var n=i(19),a=i.n(n),s=i(20),r=i.n(s),o=i(21),c=i.n(o),l=i(0),u=i.n(l),d=i(22),m=(i.n(d),Object(d.extendMoment)(u.a)),h=function(){function t(e,i){r()(this,t),this.start=m([i,e]),this.end=this.start.clone().endOf("month"),this.month=e,this.year=i}return c()(t,[{key:"getWeekStart",value:function(){return this.start.weekday()}},{key:"getDays",value:function(){return a()(m.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=m.range(this.start,this.end).by("days");return a()(t)}}]),t}();e.a=h;var f=function(t){var e=m.localeData(t).firstDayOfWeek();return m.weekdaysShort(1===e)}},function(t,e,i){t.exports=i(8)},function(t,e,i){"use strict";function n(t){i(9)}Object.defineProperty(e,"__esModule",{value:!0});var a=i(2),s=i(26),r=i(1),o=n,c=r(a.a,s.a,!1,o,null,null);e.default=c.exports},function(t,e){},function(t,e,i){"use strict";function n(t){i(11)}var a=i(3),s=i(24),r=i(1),o=n,c=r(a.a,s.a,!1,o,"data-v-b4324576",null);e.a=c.exports},function(t,e){},function(t,e,i){"use strict";function n(t){i(13)}var a=i(4),s=i(16),r=i(1),o=n,c=r(a.a,s.a,!1,o,"data-v-e3452eb2",null);e.a=c.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,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"timepicker-container flex",style:[{height:this.month?t.monthDays.length+t.weekDay>35?"347px":"307px":"180px"}]},[i("div",{staticClass:"time-container hours-container flex flex-1 flex-direction-column h-100 mh-100 w-100"},[i("div",{staticClass:"flex align-center justify-content-center time-label text-muted"},[t._v(t._s(t.hourType))]),t._v(" "),i("div",{staticClass:"h-100 mh-100 numbers-container"},t._l(t.hours,function(e){return i("div",{key:e,staticClass:"item flex align-center justify-content-center",class:[{active:t.hour===e},e],on:{click:function(i){i.stopPropagation(),t.select("hour",e)}}},[i("span",{staticClass:"timepicker-day-effect",style:t.styleColor}),t._v(" "),i("span",{staticClass:"timepicker-day-text"},[t._v(t._s(e))])])}))]),t._v(" "),i("div",{staticClass:"time-container minutes-container flex-1 flex flex-direction-column h-100 mh-100 w-100"},[i("div",{staticClass:"flex align-center justify-content-center time-label text-muted"},[t._v(t._s(t.minuteType))]),t._v(" "),i("div",{staticClass:"h-100 mh-100 numbers-container"},t._l(t.minutes,function(e){return i("div",{key:e,staticClass:"item flex align-center justify-content-center",class:[{active:t.minute===e},e],on:{click:function(i){i.stopPropagation(),t.select("minute",e)}}},[i("span",{staticClass:"timepicker-day-effect",style:t.styleColor}),t._v(" "),i("span",{staticClass:"timepicker-day-text"},[t._v(t._s(e))])])}))]),t._v(" "),t.apmType?i("div",{staticClass:"time-container apms-container flex flex-1 flex-direction-column h-100 mh-100 w-100"},[i("div",{staticClass:"flex align-center justify-content-center time-label text-muted"},[t._v(t._s(t.apmType))]),t._v(" "),i("div",{staticClass:"h-100 mh-100 numbers-container"},t._l(t.apms,function(e){return i("div",{key:e,staticClass:"item flex align-center justify-content-center",class:[{active:t.apm===e},e],on:{click:function(i){i.stopPropagation(),t.select("apm",e)}}},[i("span",{staticClass:"timepicker-day-effect",style:t.styleColor}),t._v(" "),i("span",{staticClass:"timepicker-day-text"},[t._v(t._s(e))])])}))]):t._e()])},a=[],s={render:n,staticRenderFns:a};e.a=s},function(t,e,i){"use strict";function n(t){i(18)}var a=i(5),s=i(23),r=i(1),o=n,c=r(a.a,s.a,!1,o,"data-v-18523e9c",null);e.a=c.exports},function(t,e){},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,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"datepicker-container",class:{"flex-1":t.withoutInput},attrs:{id:"CtkDatePicker"}},[i("div",{staticClass:"datepicker-controls flex align-center justify-content-center"},[i("div",{staticClass:"arrow-month h-100"},[i("div",{staticClass:"datepicker-button datepicker-prev text-center h-100 flex align-center",on:{click:function(e){t.changeMonth("prev")}}},[i("svg",{attrs:{viewBox:"0 0 1000 1000"}},[i("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(" "),i("div",{staticClass:"datepicker-container-label flex-1"},[i("transition-group",{staticClass:"h-100 flex align-center justify-content-center",attrs:{name:t.transitionLabelName}},t._l([t.month],function(e){return i("div",{key:e.month,staticClass:"datepicker-label fs-16",domProps:{textContent:t._s(t.getMonthFormatted())}})}))],1),t._v(" "),i("div",{staticClass:"arrow-month h-100 text-right"},[i("div",{staticClass:"datepicker-button datepicker-next text-center h-100 flex align-center justify-content-right",on:{click:function(e){t.changeMonth("next")}}},[i("svg",{attrs:{viewBox:"0 0 1000 1000"}},[i("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(" "),i("div",{staticClass:"datepicker-week flex"},t._l(t.weekDays,function(e,n){return i("div",{key:n,staticClass:"flex-1 text-muted fs-12 flex justify-content-center align-center"},[t._v("\n "+t._s(e)+"\n ")])})),t._v(" "),i("div",{staticClass:"month-container",style:{height:t.monthDays.length+t.weekDay>35?"250px":"210px"}},[i("transition-group",{attrs:{name:t.transitionDaysName}},t._l([t.month],function(e){return i("div",{key:e.month,staticClass:"datepicker-days flex"},[t._l(t.weekDay,function(t){return i("div",{key:t+"startEmptyDay",staticClass:"datepicker-day align-center justify-content-center"})}),t._v(" "),t._l(t.monthDays,function(e){return i("div",{key:e.format("D"),staticClass:"datepicker-day flex align-center justify-content-center",class:{selected:t.isSelected(e),disabled:t.isDisabled(e)||t.isWeekEndDay(e),enable:!(t.isDisabled(e)||t.isWeekEndDay(e))},on:{click:function(i){t.isDisabled(e)||t.isWeekEndDay(e)||t.selectDate(e)}}},[i("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(" "),i("span",{staticClass:"datepicker-day-text"},[t._v(t._s(e.format("D")))])])}),t._v(" "),t._l(t.endEmptyDays,function(e){return t.endEmptyDays?i("div",{key:e+"endEmptyDay",staticClass:"datepicker-day flex align-center justify-content-center"}):t._e()})],2)}))],1)])},a=[],s={render:n,staticRenderFns:a};e.a=s},function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"top"===this.agendaPosition?"slide":"slideinvert"}},[t.visible||t.withoutInput?i("div",{staticClass:"datetimepicker flex",class:{"without-input":t.withoutInput},style:t.position,on:{click:function(t){t.stopPropagation()}}},[i("div",{staticClass:"datepicker",style:t.position},[t.withoutHeader?i("div",{staticClass:"datepicker-header",style:t.bgStyle},[t.disableDate?t._e():i("div",{staticClass:"datepicker-year"},[i("transition-group",{attrs:{name:t.transitionDayName}},t._l([t.year],function(e){return i("div",{key:e},[t._v(t._s(e))])}))],1),t._v(" "),i("div",{staticClass:"flex justify-content-between"},[t.disableDate?t._e():i("transition-group",{staticClass:"datepicker-date dots-text flex-1",attrs:{name:t.transitionDayName}},t._l([t.getDateFormatted()],function(e){return i("span",{key:e},[t._v(t._s(t.getDateFormatted()))])})),t._v(" "),t.disableTime||t.isFormatTwelve?t.disableTime?t._e():i("div",{staticClass:"datepicker-time flex justify-content-center",style:t.timeWidth},[i("transition-group",{staticClass:"dots-text datepicker-hour flex-1 flex justify-content-center",attrs:{name:t.transitionDayName}},t._l([t.dateTime.format(t.timeFormat)],function(e){return i("span",{key:e},[t._v(t._s(e))])}))],1):i("div",{staticClass:"datepicker-time flex justify-content-center",style:t.timeWidth},[i("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 i("span",{key:e},[t._v(t._s(e))])})),t._v(" "),i("span",[t._v(":")]),t._v(" "),i("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 i("span",{key:e},[t._v(t._s(e))])}))],1)],1)]):t._e(),t._v(" "),i("div",{staticClass:"datetimepicker-container flex"},[t.disableDate?t._e():i("ctk-date-picker",{attrs:{"without-input":t.withoutInput,"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},on:{"change-date":t.selectDate,"change-month":t.changeMonth}}),t._v(" "),t.disableTime?t._e():i("ctk-time-picker",{ref:"timePickerComponent",attrs:{month:t.month,"date-time":t.dateTime,color:t.color,format:t.timeFormat,"minute-interval":t.minuteInterval},on:{"change-time":t.selectTime}})],1)])]):t._e()])},a=[],s={render:n,staticRenderFns:a};e.a=s},function(t,e,i){"use strict";var n="ontouchstart"in window||navigator.msMaxTouchPoints>0,a={instances:[],events:n?["touchstart","click"]:["click"]};a.onEvent=function(t){a.instances.forEach(function(e){var i=e.el,n=e.fn;t.target===i||i.contains(t.target)||n&&n(t)})},a.bind=function(t,e){a.instances.push({el:t,fn:e.value}),1===a.instances.length&&a.events.forEach(function(t){return document.addEventListener(t,a.onEvent)})},a.update=function(t,e){if("function"!=typeof e.value)throw new Error("Argument must be a function");a.instances.find(function(e){return e.el===t}).fn=e.value},a.unbind=function(t){var e=a.instances.findIndex(function(e){return e.el===t});e>=0&&a.instances.splice(e,1),0===a.instances.length&&a.events.forEach(function(t){return document.removeEventListener(t,a.onEvent)})},e.a="undefined"!=typeof window?a:{}},function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"bigParent",staticClass:"ctk-date-time-picker",attrs:{id:t.id}},[i("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.unFocus,expression:"unFocus"}],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}},[t.withoutInput?t._e():i("div",[i("input",{ref:"CtkDateTimePicker",staticClass:"field-input",style:t.isFocus&&!t.errorHint||t.isVisible?t.borderStyle:"",attrs:{type:"text",id:t.id,placeholder:t.label,disabled:t.disabled,readonly:""},domProps:{value:t.dateFormatted},on:{focus:t.onFocus}}),t._v(" "),i("label",{ref:"label",staticClass:"field-label",class:t.hint?t.errorHint?"text-danger":"text-primary":"",style:t.isFocus||t.isVisible?t.colorStyle:"",attrs:{for:t.id}},[t._v("\n "+t._s(t.hint||t.label)+"\n ")]),t._v(" "),t.isVisible?i("div",{staticClass:"time-picker-overlay",on:{click:function(e){return e.stopPropagation(),t.unFocus(e)}}}):t._e()]),t._v(" "),i("ctk-date-picker-agenda",{ref:"agenda",attrs:{"date-time":t.dateTime,color:t.color,visible:t.isVisible,"without-header":!t.withoutHeader,"disable-time":t.disableTime,"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,"without-input":t.withoutInput,"no-weekends-days":t.noWeekendsDays,"auto-close":t.autoClose},on:{"change-date":t.changeDate}})],1)])},a=[],s={render:n,staticRenderFns:a};e.a=s}]); | ||
//# sourceMappingURL=vue-ctk-date-time-picker.min.js.map |
{ | ||
"name": "vue-ctk-date-time-picker", | ||
"version": "1.1.14", | ||
"version": "1.1.15", | ||
"description": "A vue component for select date & time (by Chronotruck)", | ||
@@ -20,3 +20,3 @@ "author": "Louis Mazel <loic.mazuel@chronotruck.com>", | ||
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot", | ||
"before-publish": "npm run lint && npm run build && npm run build:demo" | ||
"before-publish": "npm run lint && npm run build" | ||
}, | ||
@@ -23,0 +23,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2424144