gumga-date-ng
Version:
Gumga Date
1 lines • 26.4 kB
JavaScript
!function(e){function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var t={};n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:a})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=3)}([function(e,n,t){"use strict";!function(){function e(e){function n(e){return e===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(e.type||e.href||~e.tabIndex)}return{priority:100,require:"ngModel",restrict:"A",scope:!1,compile:function(){var t={maskDefinitions:{9:/\d/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},clearOnBlur:!0,eventsToHandle:["input","keyup","click","focus"]};return function(a,o,i,r){function u(e){return angular.isDefined(e)?(w(e),Z?(d(),f(),!0):c()):c()}function g(e){e&&(H=e,Z&&o.val(y(h(o.val()))))}function l(e){return Z?(A=h(e||""),S=p(A),r.$setValidity("mask",S),S&&A.length?y(A):void 0):e}function s(e){return Z?(A=h(e||""),S=p(A),r.$viewValue=A.length?y(A):"",r.$setValidity("mask",S),""===A&&i.required&&r.$setValidity("required",!r.$error.required),S?A:void 0):e}function c(){return Z=!1,m(),angular.isDefined(I)?o.attr("placeholder",I):o.removeAttr("placeholder"),angular.isDefined(U)?o.attr("maxlength",U):o.removeAttr("maxlength"),o.val(r.$modelValue),r.$viewValue=r.$modelValue,!1}function d(){A=R=h(r.$modelValue||""),_=z=y(A),S=p(A);var e=S&&A.length?_:"";i.maxlength&&o.attr("maxlength",2*E[E.length-1]),I||o.attr("placeholder",H),o.val(e),r.$viewValue=e,r.$setValidity("mask",S)}function f(){G||(o.bind("blur",b),o.bind("mousedown mouseup",x),o.bind(j.eventsToHandle.join(" "),V),o.bind("paste",k),G=!0)}function m(){G&&(o.unbind("blur",b),o.unbind("mousedown",x),o.unbind("mouseup",x),o.unbind("input",V),o.unbind("keyup",V),o.unbind("click",V),o.unbind("focus",V),o.unbind("paste",k),G=!1)}function p(e){return!e.length||e.length>=Y}function h(e){var n="",t=$.slice();return e=e.toString(),angular.forEach(P,function(n){e=e.replace(n,"")}),angular.forEach(e.split(""),function(e){t.length&&t[0].test(e)&&(n+=e,t.shift())}),n}function y(e){var n="",t=E.slice();return angular.forEach(H.split(""),function(a,o){e.length&&o===t[0]?(n+=e.charAt(0)||"_",e=e.substr(1),t.shift()):n+=a}),n}function D(e){var n=angular.isDefined(i.gumgaDateMaskPlaceholder)?i.gumgaDateMaskPlaceholder:i.placeholder;return void 0!==n&&n[e]?n[e]:"_"}function v(){return H.replace(/[_]+/g,"_").replace(/([^_]+)([a-zA-Z0-9])([^_])/g,"$1$2_$3").split("_")}function w(e){var n=0;if(E=[],$=[],H="","string"==typeof e){Y=0;var t=!1,a=0,o=e.split("");angular.forEach(o,function(e,o){j.maskDefinitions[e]?(E.push(n),H+=D(o-a),$.push(j.maskDefinitions[e]),n++,t||Y++):"?"===e?(t=!0,a++):(H+=e,n++)})}E.push(E.slice().pop()+1),P=v(),Z=E.length>1}function b(){j.clearOnBlur&&(L=0,N=0,S&&0!==A.length||(_="",o.val(""),a.$apply(function(){r.$setViewValue("")})))}function x(e){"mousedown"===e.type?o.bind("mouseout",M):o.unbind("mouseout",M)}function M(){N=F(this),o.unbind("mouseout",M)}function k(){T(this,o.val().length)}function V(e){e=e||{};var n=e.which,t=e.type;if(16!==n&&91!==n){var a,i=o.val(),u=z,g=h(i),l=R,s=O(this)||0,c=L||0,d=s-c,f=E[0],m=E[g.length]||E.slice().shift(),p=N||0,D=F(this)>0,v=p>0,w=i.length>u.length||p&&i.length>u.length-p,b=i.length<u.length||p&&i.length===u.length-p,x=n>=37&&n<=40&&e.shiftKey,M=37===n,k=8===n||"keyup"!==t&&b&&-1===d,V=46===n||"keyup"!==t&&b&&0===d&&!v,$=(M||k||"click"===t)&&s>f;if(N=F(this),!x&&(!D||"click"!==t&&"keyup"!==t)){if("input"===t&&b&&!v&&g===l){for(;k&&s>f&&!C(s);)s--;for(;V&&s<m&&-1===E.indexOf(s);)s++;var H=E.indexOf(s);g=g.substring(0,H)+g.substring(H+1)}for(a=y(g),z=a,R=g,o.val(a),r.$setViewValue(g),w&&s<=f&&(s=f+1),$&&s--,s=s>m?m:s<f?f:s;!C(s)&&s>f&&s<m;)s+=$?-1:1;($&&s<m||w&&!C(c))&&s++,L=s,T(this,s)}}}function C(e){return E.indexOf(e)>-1}function O(e){if(!e)return 0;if(void 0!==e.selectionStart)return e.selectionStart;if(document.selection&&n(o[0])){e.focus();var t=document.selection.createRange();return t.moveStart("character",e.value?-e.value.length:0),t.text.length}return 0}function T(e,t){if(!e)return 0;if(0!==e.offsetWidth&&0!==e.offsetHeight)if(e.setSelectionRange)n(o[0])&&(e.focus(),e.setSelectionRange(t,t));else if(e.createTextRange){var a=e.createTextRange();a.collapse(!0),a.moveEnd("character",t),a.moveStart("character",t),a.select()}}function F(e){return e?void 0!==e.selectionStart?e.selectionEnd-e.selectionStart:document.selection?document.selection.createRange().text.length:0:0}var E,$,H,P,Y,A,_,S,z,R,L,N,Z=!1,G=!1,I=i.placeholder,U=i.maxlength,j=t;i.gumgaDateMaskOptions?(j=a.$eval(i.gumgaDateMaskOptions),angular.isObject(j)&&(j=function(e,n){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(void 0===n[t]?n[t]=angular.copy(e[t]):angular.extend(n[t],e[t]));return n}(t,j))):j=t,i.$observe("gumgaDateMask",u),angular.isDefined(i.gumgaDateMaskPlaceholder)?i.$observe("gumgaDateMaskPlaceholder",g):i.$observe("placeholder",g);var B=!1;i.$observe("modelViewValue",function(e){"true"===e&&(B=!0)}),a.$watch(i.ngModel,function(n){if(B&&n){e(i.ngModel).assign(a,r.$viewValue)}}),r.$formatters.push(l),r.$parsers.push(s),o.bind("mousedown mouseup",x)}}}}e.$inject=["$parse"],angular.module("gumga.date.mask",[]).directive("gumgaDateMask",e)}()},function(e,n,t){"use strict";!function(){var e=function(){var e={background:"#1abc9c",primaryColor:"#1abc9c",fontColor:"#fff",format:"dd/MM/yyyy",minYear:1700,timeZone:"America/Sao_Paulo",maxYear:2050,position:"BOTTOM_LEFT",changeDateOnTab:!1,showCalendar:!0,closeOnChange:!1,inputProperties:{class:"form-control gmd"}},n=function(){return e},t=function(n){Object.keys(n).forEach(function(t){return e[t]=n[t]})};return{getDefaultConfiguration:n,setDefaultConfiguration:t,$get:function(){return{getDefaultConfiguration:n,setDefaultConfiguration:t}}}};angular.module("gumga.date.service",[]).provider("GumgaDateService",e)}()},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=t(4),o=function(e){return e&&e.__esModule?e:{default:e}}(a),i=function(){try{return!!angular.module("gumga.layout")}catch(e){return!1}}()?'\n <div style="{{label ? \'height: 34px;\' : \'\'}}">\n <input ng-focus="config.open();inputFocused = true;"\n ng-blur="inputFocused = false;"\n ng-model="value"\n gumga-date-mask="{{mask}}"\n ng-disabled="ngDisabled"\n class="gumga-date-input {{inputProperties.class}}"\n placeholder="{{inputProperties.placeholder}} "/>\n <span class="bar"></span>\n <label for="email" class="control-label" ng-if="label">{{label}}</label>\n </div>\n ':'\n <input ng-focus="config.open();inputFocused = true;"\n ng-blur="inputFocused = false;"\n ng-model="value"\n gumga-date-mask="{{mask}}"\n ng-disabled="ngDisabled"\n class="gumga-date-input {{inputProperties.class}}"\n placeholder="{{inputProperties.placeholder}} "/>\n ';n.default="\n <style>"+o.default+"</style>\n\n "+i+'\n\n <div class="gumga-date" ng-show="opened" id="gumga-date-{{uid}}" style="{{getPosition()}}">\n <div class="month" style="background:{{config.background ? config.background : getDefaultConfiguration().background}}">\n <ul>\n <span data-ng-click="alterView(\'hours\')"\n ng-hide="type == \'DATE\'" ng-show="view != \'hours\' || type == \'HOUR\'"\n class="hours">\n {{gumgaDateValue.getHours() < 10 ? "0"+gumgaDateValue.getHours() : gumgaDateValue.getHours()}}\n :\n {{gumgaDateValue.getMinutes() < 10 ? "0"+gumgaDateValue.getMinutes() : gumgaDateValue.getMinutes()}}\n </span><br>\n\n <span data-ng-click="alterView(\'days\')"\n ng-show="view == \'hours\' && (type == \'DATE\' || type == \'DATE_HOUR\') || type == \'DATE\'"\n class="hours">{{value}}</span>\n\n <br>\n <li ng-show="view != \'hours\' && (type == \'DATE\' || type == \'DATE_HOUR\')" class="prev" ng-click="handlingMonths(gumgaDateValue, -1)">❮</li>\n <li ng-show="view != \'hours\' && (type == \'DATE\' || type == \'DATE_HOUR\')" class="next" ng-click="handlingMonths(gumgaDateValue, +1)">❯</li>\n <li ng-show="view != \'hours\' && (type == \'DATE\' || type == \'DATE_HOUR\')" style="text-align:center">\n <span style="padding: 10px;" data-ng-click="alterView(\'months\')">{{getMonth()}}</span><br>\n <span data-ng-click="alterView(\'months\')" style="font-size:18px">{{getYear()}}</span>\n </li>\n\n <div class="gumga-date-hour" ng-show="view == \'hours\'">\n <span class="glyphicon glyphicon-chevron-up" ng-click="handlingHours(1)"></span>\n <li>{{gumgaDateValue.getHours() < 10 ? "0"+gumgaDateValue.getHours() : gumgaDateValue.getHours()}}</li>\n <span class="glyphicon glyphicon-chevron-down" ng-click="handlingHours(-1)"></span>\n </div>\n <div ng-show="view == \'hours\'" class="gumga-date-separator">\n <span>:</span>\n </div>\n <div class="gumga-date-minutes" ng-show="view == \'hours\'">\n <span class="glyphicon glyphicon-chevron-up" ng-click="handlingMinutes(1)"></span>\n <li >{{gumgaDateValue.getMinutes() < 10 ? "0"+gumgaDateValue.getMinutes() : gumgaDateValue.getMinutes()}}</li>\n <span class="glyphicon glyphicon-chevron-down" ng-click="handlingMinutes(-1)"></span>\n </div>\n\n </ul>\n </div>\n\n <div class="year-and-month" id="year-and-month-{{uid}}">\n <ul class="change-month" ng-show="view == \'months\'" ng-repeat="year in years">\n <span class="year">{{year}}</span>\n\n <div style="width: 170px;float: right;">\n <li data-ng-repeat="month in getGumgaMonths(true)" data-ng-click="setYearAndMonth(year, month)">\n <span ng-class="{\'active\' : isThatMonth(year, month)}">{{month}}</span>\n </li>\n </div>\n\n </ul>\n </div>\n\n <ul class="weekdays" ng-show="view == \'days\'">\n <li ng-repeat="weekday in getWeekDays()">{{weekday}}</li>\n </ul>\n <ul class="days" ng-show="view == \'days\'">\n <li data-ng-click="setDay(row)" data-ng-repeat="row in rows track by $index">\n <span ng-class="{\'active\' : isToday(row)}" style="{{row.style}}">{{row.value}}</span>\n </li>\n </ul>\n </div>\n\n'},function(e,n,t){"use strict";!function(){t(1),t(0);var e=t(2).default,n=function(n,t,a,o){return{restrict:"E",template:e,scope:{config:"=?configuration",ngModel:"=",ngDisabled:"=?"},require:"^ngModel",link:function(e,i,r){function u(e,n){g.inputFormat=g.config.format?g.config.format:g.getDefaultConfiguration().format;var t=g.getMinYear(),a=g.getMaxYear(),o=g.config.timeZone?g.config.timeZone:g.getDefaultConfiguration().timeZone,i=moment(e,g.inputFormat.toUpperCase().replace("HH:MM","hh:mm")).tz(o).toDate();e&&"Invalid Date"!=i&&i.getFullYear()>=t&&i.getFullYear()<=a?(g.gumgaDateValue=i,n||g.setNgModel(g.gumgaDateValue),g.config.change&&g.config.change(g.ngModel)):g.value=null}var g=e;g.uid=Math.floor(99999999*Math.random()),g.config=g.config||{},g.label=r.label,g.getDefaultConfiguration=function(){return o.getDefaultConfiguration()},g.range=function(e,n,t){if(!g.opened)return[];t=t||1;for(var a=[],o=e;o<=n;o+=t)a.push(o);return a},g.getScrollSize=function(){if(g.gumgaDateValue){return 92*(g.gumgaDateValue.getFullYear()-g.getMinYear())-50}},g.getWeekDays=function(){return a.DATETIME_FORMATS.SHORTDAY.map(function(e){return e.substring(0,3)})},g.getGumgaMonths=function(e){return a.DATETIME_FORMATS.STANDALONEMONTH.map(function(n){return e?n.substring(0,3):n})};var l=function(e,n){return t("date")(e,n)},s=function(){g.type=-1!=g.inputFormat.toLowerCase().indexOf("hh:mm")&&-1==g.inputFormat.toLowerCase().indexOf("dd")?"HOUR":g.type,g.type=-1!=g.inputFormat.toLowerCase().indexOf("hh:mm")&&-1!=g.inputFormat.toLowerCase().indexOf("dd")?"DATE_HOUR":g.type,g.type=-1==g.inputFormat.toLowerCase().indexOf("hh:mm")&&-1!=g.inputFormat.toLowerCase().indexOf("dd")?"DATE":g.type,"HOUR"==g.type?g.alterView("hours"):g.alterView("days")},c=function(){if(g.inputFormat=g.config.format?g.config.format:g.getDefaultConfiguration().format,s(),g.mask=g.inputFormat.replace(/[a-zA-Z\d]/g,"9"),g.inputProperties={class:g.config.inputProperties&&g.config.inputProperties.class?g.config.inputProperties.class:g.getDefaultConfiguration().inputProperties.class,placeholder:g.config.inputProperties&&g.config.inputProperties.placeholder?g.config.inputProperties.placeholder:angular.noop()},g.style={fontColor:g.config.fontColor||g.getDefaultConfiguration().fontColor,background:g.config.background||g.getDefaultConfiguration().background},g.ngModel&&g.ngModel instanceof Date)g.gumgaDateValue=g.ngModel,g.setNgModel(g.gumgaDateValue);else if(g.ngModel&&"string"==typeof g.ngModel){var e=moment(g.ngModel).toDate();g.gumgaDateValue=e,g.setNgModel(g.gumgaDateValue)}else g.gumgaDateValue=new Date};g.alterView=function(e){n(function(){g.view=e,"months"==e&&(g.years||(g.years=g.range(g.getMinYear(),g.getMaxYear())),m())})};var d=void 0,f=function(e,n){angular.element(d).animate({scrollTop:e},400)};n(function(){d=document.getElementById("year-and-month-"+g.uid)},1e3);var m=function(){n(function(){var e=g.getScrollSize();f(e,d.scrollTop)})};g.handlingHours=function(e){g.gumgaDateValue.setHours(g.gumgaDateValue.getHours()+e),g.setNgModel(g.gumgaDateValue)},g.handlingMinutes=function(e){g.gumgaDateValue.setMinutes(g.gumgaDateValue.getMinutes()+e),g.setNgModel(g.gumgaDateValue)},g.getFormatLength=function(){return g.inputFormat?g.inputFormat.replace(/[^a-zA-Z0-9]/g,"").length:0},g.setGumgaDateValue=function(e,n){e&&u(e)},g.getMinYear=function(){return g.config.minYear?g.config.minYear:g.getDefaultConfiguration().minYear},g.getMaxYear=function(){return g.config.maxYear?g.config.maxYear:g.getDefaultConfiguration().maxYear},g.getMonth=function(){if(g.gumgaDateValue&&g.gumgaDateValue instanceof Date)return g.getGumgaMonths()[g.gumgaDateValue.getMonth()]},g.setDay=function(e){if(g.gumgaDateValue&&g.gumgaDateValue instanceof Date){var n=new Date;n.setYear(e.year),n.setMonth(e.mouth),n.setDate(e.value),n.setHours(g.gumgaDateValue.getHours()),n.setMinutes(g.gumgaDateValue.getMinutes()),n.setSeconds(g.gumgaDateValue.getSeconds()),g.gumgaDateValue=n,g.setNgModel(g.gumgaDateValue),g.config.change&&g.config.change(g.ngModel),(g.config.hasOwnProperty("closeOnChange")?g.config.closeOnChange:g.getDefaultConfiguration().closeOnChange)&&g.config.close()}},g.setYearAndMonth=function(e,n){g.gumgaDateValue&&g.gumgaDateValue instanceof Date&&g.getGumgaMonths(!0).forEach(function(t,a){if(t==n){var o=new Date;o.setYear(e),o.setMonth(a),o.setDate(g.gumgaDateValue.getDate()),o.setHours(g.gumgaDateValue.getHours()),o.setMinutes(g.gumgaDateValue.getMinutes()),o.setSeconds(g.gumgaDateValue.getSeconds()),g.gumgaDateValue=o,g.setNgModel(g.gumgaDateValue),g.alterView("days")}})},g.getYear=function(){if(g.gumgaDateValue)return g.gumgaDateValue.getFullYear()},g.isToday=function(e){return e.value==g.gumgaDateValue.getDate()&&e.mouth==g.gumgaDateValue.getMonth()},g.isThatMonth=function(e,n){return g.getGumgaMonths(!0)[g.gumgaDateValue.getMonth()]==n&&g.gumgaDateValue.getFullYear()==e},g.config.open=function(e){e&&e.stopPropagation(),(g.config.hasOwnProperty("showCalendar")?g.config.showCalendar:g.getDefaultConfiguration().showCalendar)&&(g.opened=!0,s(),v(g.gumgaDateValue.getMonth(),g.gumgaDateValue.getFullYear()))},g.config.close=function(){g.opened=!1,g.alterView("days")};g.handlingMonths=function(e,n){g.gumgaDateValue=moment(e).add(n,"months").toDate(),g.setNgModel(g.gumgaDateValue),"months"==g.view&&m()},g.$watch("config",function(){c()},!0),g.$watch("ngModel",function(e){n(function(){if(g.ngModel&&g.ngModel instanceof Date&&(g.gumgaDateValue=g.ngModel,v(e.getMonth(),e.getFullYear()),g.value=l(angular.copy(e),g.inputFormat)),g.ngModel&&"string"==typeof g.ngModel){var n=moment(g.ngModel).toDate();g.gumgaDateValue=n,v(n.getMonth(),n.getFullYear());var t=g.config.timeZone?g.config.timeZone:g.getDefaultConfiguration().timeZone,a=moment(g.value,g.inputFormat.toUpperCase().replace("HH:MM","hh:mm")).tz(t).toDate();g.value!=l(angular.copy(n),g.inputFormat)&&a.getMinutes()!=n.getMinutes()+1&&u(l(angular.copy(n),g.inputFormat),!0)}e||g.inputFocused||(g.gumgaDateValue=new Date,v(g.gumgaDateValue.getMonth(),g.gumgaDateValue.getFullYear()),g.value=null)})},!0),g.$watch("value",function(e){return e?g.setGumgaDateValue(e):g.ngModel=null}),g.setNgModel=function(e){var n=g.config.timeZone?g.config.timeZone:g.getDefaultConfiguration().timeZone;g.ngModel=moment.tz(e,n).format(),v(e.getMonth(),e.getFullYear()),g.value=l(angular.copy(e),g.inputFormat)},i.bind("click",function(e){e.stopPropagation()});var p=function(e){var t=void 0;switch(e.keyCode){case 38:t=moment(g.gumgaDateValue).add(-7,"days").toDate();break;case 40:t=moment(g.gumgaDateValue).add(7,"days").toDate();break;case 37:t=moment(g.gumgaDateValue).add(-1,"days").toDate();break;case 39:t=moment(g.gumgaDateValue).add(1,"days").toDate();break;case 13:g.setNgModel(g.gumgaDateValue),g.config.close();break;case 9:var a=g.config.hasOwnProperty("changeDateOnTab")?g.config.changeDateOnTab:g.getDefaultConfiguration().changeDateOnTab;g.inputFocused&&!g.ngModel&&a?(g.gumgaDateValue=new Date,g.setNgModel(g.gumgaDateValue)):g.inputFocused||g.config.close()}n(function(){g.opened&&t&&(e.stopPropagation(),g.gumgaDateValue=t,g.setNgModel(g.gumgaDateValue))})},h=function(e){var t=0;switch(e.keyCode){case 38:t=moment(g.gumgaDateValue).add(1,"minutes").toDate();break;case 40:t=moment(g.gumgaDateValue).add(-1,"minutes").toDate()}n(function(){0!=t&&g.opened&&(e.stopPropagation(),g.gumgaDateValue=t,g.setNgModel(g.gumgaDateValue))})},y=document.addEventListener("click",function(e){n(g.config.close)}),D=document.addEventListener("keyup",function(e){g.opened&&"days"==g.view?p(e):angular.noop(),g.opened&&"hours"==g.view?h(e):angular.noop()});g.$on("$destroy",function(){document.removeEventListener("click",y),document.removeEventListener("keyup",D)});var v=function(e,n){if(g.opened){for(var t=new Date(n,e,1),a=1,o=new Array(42),i=0;i<o.length;i++)o[i]="";for(var r=t.getDay();r<o.length;r++){var u=new Date(n,e,a);o[r]={value:u.getDate()},o[r].style=u.getMonth()!=e?"color: #b7aaaa !important;":"",o[r].style+=o[r].value<10?"padding-left: 9.75px;padding-right: 9.75px;":"",o[r].mouth=u.getMonth(),o[r].year=u.getFullYear(),a++}for(var l=moment(new Date(n,e,1)).add(-1,"months"),s=0;s<t.getDay();s++)o[t.getDay()-1-s]={value:l.daysInMonth()-s,style:"color: #b7aaaa !important;",mouth:l.toDate().getMonth(),year:l.toDate().getFullYear()};g.rows=o}};g.getPosition=function(){switch((g.config.position?g.config.position:g.getDefaultConfiguration().position).toUpperCase()){case"LEFT_BOTTOM":return"top: 25px;left: -235px;";case"LEFT_TOP":if("days"==g.view||"months"==g.view)return"top: -290px;left: -235px;";if("hours"==g.view)return"top: -130px;left: -235px;";break;case"BOTTOM_LEFT":return"left: 15px;";case"BOTTOM_RIGHT":return"right: 15px;";case"RIGHT_BOTTOM":return"right: -235px;";case"RIGHT_TOP":if("days"==g.view||"months"==g.view)return"top: -290px;right: -235px;";if("hours"==g.view)return"top: -130px;right: -235px;";break;case"TOP_LEFT":if("days"==g.view||"months"==g.view)return"top: -325px;left: 15px;";if("hours"==g.view)return"top: -165px; left: 15px;";break;case"TOP_RIGHT":if("days"==g.view||"months"==g.view)return"top: -325px;right: 15px;";if("hours"==g.view)return"top: -165px; right: 15px;"}}}}};n.$inject=["$timeout","$filter","$locale","GumgaDateService"],angular.module("gumga.date",["gumga.date.service","gumga.date.mask"]).directive("gumgaDate",n)}()},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default='\n\n scrollbar[orient="vertical"] scrollbarbutton,\n scrollbar[orient="vertical"] slider,\n scrollbar[orient="horizontal"] scrollbarbutton,\n scrollbar[orient="horizontal"] slider{\n display:none;\n }\n\n .gumga-date-input{\n width: 100%;\n }\n\n .year-and-month::-webkit-scrollbar {\n width: 10px;\n }\n\n .year-and-month::-webkit-scrollbar-track{\n -webkit-box-shadow: inset 0 0 6px #f5f5f5;\n }\n\n .year-and-month::-webkit-scrollbar-thumb {\n background-color: #ccc;\n outline: 1px solid slategrey;\n }\n\n .gumga-date-hour::-webkit-scrollbar, .gumga-date-minutes::-webkit-scrollbar {\n display: none;\n width: 1px;\n }\n\n .gumga-date-hour::-webkit-scrollbar-track, .gumga-date-minutes::-webkit-scrollbar-track {\n display: none;\n }\n\n .gumga-date-hour::-webkit-scrollbar-thumb, .gumga-date-minutes::-webkit-scrollbar-thumb {\n display: none;\n }\n\n .gumga-date {\n font-family: Verdana,sans-serif;\n box-sizing:border-box;\n width: 250px;\n position: absolute;\n z-index: 999999999;\n display: inline-block;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n -khtml-user-select: none; /* Konqueror HTML */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none;\n }\n\n .gumga-date-hour{\n width: 93px;\n float: left;\n text-align: center;\n height: 100px;\n overflow: hidden;\n overflow-y: scroll;\n }\n\n #gumga-date-{{uid}} .gumga-date-hour > span, #gumga-date-{{uid}} .gumga-date-minutes > span {\n color: {{config.fontColor ? config.fontColor : getDefaultConfiguration().fontColor}} !important;\n cursor: pointer;\n }\n\n #gumga-date-{{uid}} .gumga-date-separator{\n float: left;\n width: 13px;\n height: 100%;\n font-size: 25px;\n color: {{config.fontColor ? config.fontColor : getDefaultConfiguration().fontColor}} !important;\n padding-top: 35px;\n }\n\n .gumga-date-minutes{\n width: 93px;\n text-align: center;\n height: 100px;\n overflow: hidden;\n overflow-y: scroll;\n }\n\n .gumga-date-hour > li, .gumga-date-minutes > li{\n font-size: 40px !important;\n }\n\n #gumga-date-{{uid}} > .month > ul .hours {\n width: 100%;\n position: absolute;\n left: 0;\n top: 0;\n padding: 6px;\n font-size: 14px;\n cursor : pointer;\n text-align: center;\n color: {{style.fontColor ? style.fontColor : \'#fff\'}} !important;\n background: rgba(43, 38, 38, 0.21);\n height: 32px;\n }\n\n .gumga-date > .month > ul .hours:hover {\n font-size: 15px;\n transition: all 1s;\n }\n\n .gumga-date > .month {\n padding: 25px 25px;\n width: 100%;\n }\n\n .gumga-date > .month ul {\n margin: 0;\n list-style: none;\n padding: 0;\n }\n\n .gumga-date > .month ul li {\n color: white;\n font-size: 18px;\n text-transform: uppercase;\n cursor: pointer;\n letter-spacing: 3px;\n }\n\n .gumga-date > .month .prev {\n float: left;\n padding-top: 10px;\n outline: none;\n cursor: pointer;\n }\n\n .gumga-date > .month .next {\n float: right;\n padding-top: 10px;\n cursor: pointer;\n outline: none;\n }\n\n .gumga-date > .year-and-month {\n background-color: #eee;\n max-height: 204px;\n text-align: center;\n overflow-x: auto;\n transition-property: all;\n transition-duration: .5s;\n }\n\n .gumga-date > .weekdays, .gumga-date > .year-and-month > .change-month{\n margin: 0;\n padding: 10px 0;\n background-color: #ddd;\n padding-left: 3px;\n list-style: none;\n }\n\n .gumga-date > .year-and-month > .change-month {\n background-color: #eee;\n max-height: 210px;\n text-align: center;\n overflow: auto;\n }\n\n .gumga-date > .year-and-month > .change-month li {\n cursor: pointer;\n padding: 5px;\n width: 40px;\n text-align: center;\n float: left;\n font-size: 10px;\n }\n\n .gumga-date > .year-and-month > .change-month > .year{\n display: block;\n text-align: left;\n font-weight: 800;\n padding-left: 15px;\n margin-top: 27px;\n float: left;\n width: 60px;\n }\n\n .gumga-date > .weekdays li {\n display: inline-block;\n width: 35px;\n color: #666;\n text-align: center;\n }\n\n .gumga-date > .days {\n padding: 10px 0;\n background: #eee;\n margin: 0;\n padding-left: 3px;\n }\n\n .gumga-date > .days li {\n list-style-type: none;\n display: inline-block;\n width: 35px;\n text-align: center;\n margin-bottom: 5px;\n font-size:12px;\n color: #777;\n cursor: pointer;\n }\n\n .gumga-date > .days li .active {\n padding: 5px;\n color: white !important\n }\n\n @media screen and (max-width:720px) {\n .gumga-date > .weekdays li, .days li {width: 13.1%;}\n }\n\n @media screen and (max-width: 420px) {\n .gumga-date > .weekdays li, .days li {\n width: 12.5%;\n }\n .gumga-date > .days li .active {\n padding: 2px;\n }\n }\n\n @media screen and (max-width: 290px) {\n .gumga-date > .weekdays li, .days li {\n width: 12.2%;\n }\n }\n #gumga-date-{{uid}} > .month ul li {\n color: {{config.fontColor ? config.fontColor : getDefaultConfiguration().fontColor}};\n }\n #gumga-date-{{uid}} > .days li .active{\n background: {{config.primaryColor ? config.primaryColor : getDefaultConfiguration().primaryColor}} !important;\n border-radius: 50%;\n }\n #gumga-date-{{uid}} > .days li:hover{\n color: {{config.primaryColor ? config.primaryColor : getDefaultConfiguration().primaryColor}};\n }\n #gumga-date-{{uid}} > .year-and-month > .change-month li:hover{\n color: {{config.primaryColor ? config.primaryColor : getDefaultConfiguration().primaryColor}} !important;\n }\n #gumga-date-{{uid}} > .year-and-month > .change-month li .active{\n background: {{config.primaryColor ? config.primaryColor : getDefaultConfiguration().primaryColor}} !important;\n color: {{config.fontColor ? config.fontColor : getDefaultConfiguration().fontColor}} !important;\n padding: 5px;\n border-radius: 10px;\n }\n\n'}]);