From b8ddbf7d74708695a2063b918fa63e070a86da78 Mon Sep 17 00:00:00 2001 From: Dzulqarnain Nasir Date: Sun, 23 Nov 2014 21:16:58 +0200 Subject: [PATCH 1/2] Issue #24 * Updated bower.json to specify angular version as 1.x. * Updated unit test for directive as it was faulty. * Removed jQuery as dev dependency because it is now irrelevant. --- bower.json | 7 +++---- dist/angular-dateparser.js | 4 +++- dist/angular-dateparser.min.js | 2 +- dist/angular-dateparser.min.js.map | 2 +- karma.conf.js | 1 - test/dateparser.directive.spec.js | 3 ++- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/bower.json b/bower.json index 4e7582a..7c9aa1e 100644 --- a/bower.json +++ b/bower.json @@ -15,11 +15,10 @@ "tests" ], "dependencies": { - "angular": "1.0.6", - "angular-i18n": "1.0.6" + "angular": "1.x", + "angular-i18n": "1.x" }, "devDependencies": { - "jquery": "1.8.2", - "angular-mocks": "1.0.6" + "angular-mocks": "1.x" } } diff --git a/dist/angular-dateparser.js b/dist/angular-dateparser.js index bafa52f..28c8b56 100644 --- a/dist/angular-dateparser.js +++ b/dist/angular-dateparser.js @@ -7,6 +7,7 @@ (function(angular) { angular.module("dateParser", []).factory("dateParserHelpers", [ function() { + "use strict"; var cache = {}; return { getInteger: function(string, startPoint, minLength, maxLength) { @@ -24,6 +25,7 @@ } }; } ]).factory("$dateParser", [ "$locale", "dateParserHelpers", function($locale, dateParserHelpers) { + "use strict"; var datetimeFormats = $locale.DATETIME_FORMATS; var monthNames = datetimeFormats.MONTH.concat(datetimeFormats.SHORTMONTH); var dayNames = datetimeFormats.DAY.concat(datetimeFormats.SHORTDAY); @@ -228,7 +230,7 @@ } }; } ]); - angular.module("dateParser").directive("dateParser", [ "dateFilter", "$dateParser", function(dateFilter, $dateParser) { + angular.module("dateParserDirective", [ "dateParser" ]).directive("dateParser", [ "dateFilter", "$dateParser", function(dateFilter, $dateParser) { return { restrict: "A", require: "ngModel", diff --git a/dist/angular-dateparser.min.js b/dist/angular-dateparser.min.js index a878ec8..4117d86 100644 --- a/dist/angular-dateparser.min.js +++ b/dist/angular-dateparser.min.js @@ -1,3 +1,3 @@ /*! angular-dateParser 1.0.10 | (c) 2014, Dzulqarnain Nasir | MIT (http://www.opensource.org/licenses/MIT) */ -!function(a){a.module("dateParser",[]).factory("dateParserHelpers",[function(){var a={};return{getInteger:function(b,c,d,e){var f=b.substring(c),g=a[d+"_"+e];g||(g=new RegExp("^(\\d{"+d+","+e+"})"),a[d+"_"+e]=g);var h=g.exec(f);return h?h[1]:null}}}]).factory("$dateParser",["$locale","dateParserHelpers",function(b,c){var d=b.DATETIME_FORMATS,e=d.MONTH.concat(d.SHORTMONTH),f=d.DAY.concat(d.SHORTDAY);return function(b,g){if(a.isDate(b))return b;try{if(b+="",g+="",!g.length)return new Date(b);d[g]&&(g=d[g]);for(var h=new Date,i=0,j=0,k="",l=h.getFullYear(),m=h.getMonth()+1,n=h.getDate(),o=0,p=0,q=0,r=0,s="am",t=0,u=!1;j70?1900+(l-0):2e3+(l-0))}else if("MMMM"===v||"MMM"==v){m=0;for(var y=0;y12&&(m-=12),i+=z.length;break}}if(1>m||m>12)throw"Invalid month"}else if("EEEE"==v||"EEE"==v)for(var A=0;Am||m>12)throw"Invalid month";i+=m.length}else if("dd"==v||"d"==v){if(n=c.getInteger(b,i,v.length,2),null===n||1>n||n>31)throw"Invalid date";i+=n.length}else if("HH"==v||"H"==v){if(o=c.getInteger(b,i,v.length,2),null===o||0>o||o>23)throw"Invalid hours";i+=o.length}else if("hh"==v||"h"==v){if(o=c.getInteger(b,i,v.length,2),null===o||1>o||o>12)throw"Invalid hours";i+=o.length}else if("mm"==v||"m"==v){if(p=c.getInteger(b,i,v.length,2),null===p||0>p||p>59)throw"Invalid minutes";i+=p.length}else if("ss"==v||"s"==v){if(q=c.getInteger(b,i,v.length,2),null===q||0>q||q>59)throw"Invalid seconds";i+=q.length}else if("sss"===v){if(r=c.getInteger(b,i,3,3),null===r||0>r||r>999)throw"Invalid milliseconds";i+=3}else if("a"==v){if("am"==b.substring(i,i+2).toLowerCase())s="AM";else{if("pm"!=b.substring(i,i+2).toLowerCase())throw"Invalid AM/PM";s="PM"}i+=2}else if("Z"==v){if(u=!0,"Z"===b[i])t=0,i+=1;else if(":"===b[i+3]){var C=b.substring(i,i+6);t=60*parseInt(C.substr(0,3),10)+parseInt(C.substr(4,2),10),i+=6}else{var C=b.substring(i,i+5);t=60*parseInt(C.substr(0,3),10)+parseInt(C.substr(3,2),10),i+=5}if(t>720||-720>t)throw"Invalid timezone"}else{if(b.substring(i,i+v.length)!=v)throw"Pattern value mismatch";i+=v.length}}else{for(;"'"!=g.charAt(++j)&&j29)throw"Invalid date"}else if(n>28)throw"Invalid date";if((4==m||6==m||9==m||11==m)&&n>30)throw"Invalid date";12>o&&"PM"==s?o+=12:o>11&&"AM"==s&&(o-=12);var D=new Date(l,m-1,n,o,p,q,r);return u?new Date(D.getTime()-6e4*(t+D.getTimezoneOffset())):D}catch(E){return void 0}}}]),a.module("dateParser").directive("dateParser",["dateFilter","$dateParser",function(a,b){return{restrict:"A",require:"ngModel",link:function(c,d,e,f){var g;e.$observe("dateParser",function(a){g=a,f.$render()}),f.$parsers.unshift(function(a){var c=b(a,g);return isNaN(c)?f.$setValidity("date",!1):f.$setValidity("date",!0),c}),f.$render=function(){d.val(f.$modelValue?a(f.$modelValue,g):void 0),c.ngModel=f.$modelValue},f.$formatters.push(function(b){return b?a(b,g):""})}}}])}(angular); +!function(a){a.module("dateParser",[]).factory("dateParserHelpers",[function(){"use strict";var a={};return{getInteger:function(b,c,d,e){var f=b.substring(c),g=a[d+"_"+e];g||(g=new RegExp("^(\\d{"+d+","+e+"})"),a[d+"_"+e]=g);var h=g.exec(f);return h?h[1]:null}}}]).factory("$dateParser",["$locale","dateParserHelpers",function(b,c){"use strict";var d=b.DATETIME_FORMATS,e=d.MONTH.concat(d.SHORTMONTH),f=d.DAY.concat(d.SHORTDAY);return function(b,g){if(a.isDate(b))return b;try{if(b+="",g+="",!g.length)return new Date(b);d[g]&&(g=d[g]);for(var h=new Date,i=0,j=0,k="",l=h.getFullYear(),m=h.getMonth()+1,n=h.getDate(),o=0,p=0,q=0,r=0,s="am",t=0,u=!1;j70?1900+(l-0):2e3+(l-0))}else if("MMMM"===v||"MMM"==v){m=0;for(var y=0;y12&&(m-=12),i+=z.length;break}}if(1>m||m>12)throw"Invalid month"}else if("EEEE"==v||"EEE"==v)for(var A=0;Am||m>12)throw"Invalid month";i+=m.length}else if("dd"==v||"d"==v){if(n=c.getInteger(b,i,v.length,2),null===n||1>n||n>31)throw"Invalid date";i+=n.length}else if("HH"==v||"H"==v){if(o=c.getInteger(b,i,v.length,2),null===o||0>o||o>23)throw"Invalid hours";i+=o.length}else if("hh"==v||"h"==v){if(o=c.getInteger(b,i,v.length,2),null===o||1>o||o>12)throw"Invalid hours";i+=o.length}else if("mm"==v||"m"==v){if(p=c.getInteger(b,i,v.length,2),null===p||0>p||p>59)throw"Invalid minutes";i+=p.length}else if("ss"==v||"s"==v){if(q=c.getInteger(b,i,v.length,2),null===q||0>q||q>59)throw"Invalid seconds";i+=q.length}else if("sss"===v){if(r=c.getInteger(b,i,3,3),null===r||0>r||r>999)throw"Invalid milliseconds";i+=3}else if("a"==v){if("am"==b.substring(i,i+2).toLowerCase())s="AM";else{if("pm"!=b.substring(i,i+2).toLowerCase())throw"Invalid AM/PM";s="PM"}i+=2}else if("Z"==v){if(u=!0,"Z"===b[i])t=0,i+=1;else if(":"===b[i+3]){var C=b.substring(i,i+6);t=60*parseInt(C.substr(0,3),10)+parseInt(C.substr(4,2),10),i+=6}else{var C=b.substring(i,i+5);t=60*parseInt(C.substr(0,3),10)+parseInt(C.substr(3,2),10),i+=5}if(t>720||-720>t)throw"Invalid timezone"}else{if(b.substring(i,i+v.length)!=v)throw"Pattern value mismatch";i+=v.length}}else{for(;"'"!=g.charAt(++j)&&j29)throw"Invalid date"}else if(n>28)throw"Invalid date";if((4==m||6==m||9==m||11==m)&&n>30)throw"Invalid date";12>o&&"PM"==s?o+=12:o>11&&"AM"==s&&(o-=12);var D=new Date(l,m-1,n,o,p,q,r);return u?new Date(D.getTime()-6e4*(t+D.getTimezoneOffset())):D}catch(E){return void 0}}}]),a.module("dateParserDirective",["dateParser"]).directive("dateParser",["dateFilter","$dateParser",function(a,b){return{restrict:"A",require:"ngModel",link:function(c,d,e,f){var g;e.$observe("dateParser",function(a){g=a,f.$render()}),f.$parsers.unshift(function(a){var c=b(a,g);return isNaN(c)?f.$setValidity("date",!1):f.$setValidity("date",!0),c}),f.$render=function(){d.val(f.$modelValue?a(f.$modelValue,g):void 0),c.ngModel=f.$modelValue},f.$formatters.push(function(b){return b?a(b,g):""})}}}])}(angular); //# sourceMappingURL=angular-dateparser.min.js.map \ No newline at end of file diff --git a/dist/angular-dateparser.min.js.map b/dist/angular-dateparser.min.js.map index c44eb18..8bd0efa 100644 --- a/dist/angular-dateparser.min.js.map +++ b/dist/angular-dateparser.min.js.map @@ -1 +1 @@ -{"version":3,"file":"angular-dateparser.min.js","sources":["angular-dateparser.js"],"names":["angular","module","factory","cache","getInteger","string","startPoint","minLength","maxLength","val","substring","matcher","RegExp","match","exec","$locale","dateParserHelpers","datetimeFormats","DATETIME_FORMATS","monthNames","MONTH","concat","SHORTMONTH","dayNames","DAY","SHORTDAY","format","isDate","length","Date","now","i_val","i_format","format_token","year","getFullYear","month","getMonth","date","getDate","hh","mm","ss","sss","ampm","z","parsedZ","charAt","token","i","month_name","toLowerCase","j","day_name","tzStr","parseInt","substr","localDate","getTime","getTimezoneOffset","e","undefined","directive","dateFilter","$dateParser","restrict","require","link","scope","element","attrs","ngModel","dateFormat","$observe","value","$render","$parsers","unshift","viewValue","isNaN","$setValidity","$modelValue","$formatters","push","modelValue"],"mappings":";CAOA,SAAUA,GACNA,EAAQC,OAAO,iBAAkBC,QAAQ,qBAAuB,WAC5D,GAAIC,KACJ,QACIC,WAAY,SAASC,EAAQC,EAAYC,EAAWC,GAChD,GAAIC,GAAMJ,EAAOK,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,KAArCb,EAAIY,EAAUE,sBAElDF,EACT,MAAOG,GACL,MAAOC,aAInB7D,EAAQC,OAAO,cAAc6D,UAAU,cAAgB,aAAc,cAAe,SAASC,EAAYC,GACrG,OACIC,SAAU,IACVC,QAAS,UACTC,KAAM,SAASC,EAAOC,EAASC,EAAOC,GAClC,GAAIC,EACJF,GAAMG,SAAS,aAAc,SAASC,GAClCF,EAAaE,EACbH,EAAQI,YAEZJ,EAAQK,SAASC,QAAQ,SAASC,GAC9B,GAAIxC,GAAO0B,EAAYc,EAAWN,EAMlC,OALIO,OAAMzC,GACNiC,EAAQS,aAAa,QAAQ,GAE7BT,EAAQS,aAAa,QAAQ,GAE1B1C,IAEXiC,EAAQI,QAAU,WACdN,EAAQ5D,IAAI8D,EAAQU,YAAclB,EAAWQ,EAAQU,YAAaT,GAAcX,QAChFO,EAAMG,QAAUA,EAAQU,aAE5BV,EAAQW,YAAYC,KAAK,SAASC,GAC9B,MAAOA,GAAarB,EAAWqB,EAAYZ,GAAc,WAK1ExE"} \ No newline at end of file +{"version":3,"file":"angular-dateparser.min.js","sources":["angular-dateparser.js"],"names":["angular","module","factory","cache","getInteger","string","startPoint","minLength","maxLength","val","substring","matcher","RegExp","match","exec","$locale","dateParserHelpers","datetimeFormats","DATETIME_FORMATS","monthNames","MONTH","concat","SHORTMONTH","dayNames","DAY","SHORTDAY","format","isDate","length","Date","now","i_val","i_format","format_token","year","getFullYear","month","getMonth","date","getDate","hh","mm","ss","sss","ampm","z","parsedZ","charAt","token","i","month_name","toLowerCase","j","day_name","tzStr","parseInt","substr","localDate","getTime","getTimezoneOffset","e","undefined","directive","dateFilter","$dateParser","restrict","require","link","scope","element","attrs","ngModel","dateFormat","$observe","value","$render","$parsers","unshift","viewValue","isNaN","$setValidity","$modelValue","$formatters","push","modelValue"],"mappings":";CAOA,SAAUA,GACNA,EAAQC,OAAO,iBAAkBC,QAAQ,qBAAuB,WAC5D,YACA,IAAIC,KACJ,QACIC,WAAY,SAASC,EAAQ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,EAC5D,OAAIG,GACO,GAAIjB,MAAK4B,EAAUC,UAAkD,KAArCb,EAAIY,EAAUE,sBAElDF,EACT,MAAOG,GACL,MAAOC,aAInB7D,EAAQC,OAAO,uBAAyB,eAAgB6D,UAAU,cAAgB,aAAc,cAAe,SAASC,EAAYC,GAChI,OACIC,SAAU,IACVC,QAAS,UACTC,KAAM,SAASC,EAAOC,EAASC,EAAOC,GAClC,GAAIC,EACJF,GAAMG,SAAS,aAAc,SAASC,GAClCF,EAAaE,EACbH,EAAQI,YAEZJ,EAAQK,SAASC,QAAQ,SAASC,GAC9B,GAAIxC,GAAO0B,EAAYc,EAAWN,EAMlC,OALIO,OAAMzC,GACNiC,EAAQS,aAAa,QAAQ,GAE7BT,EAAQS,aAAa,QAAQ,GAE1B1C,IAEXiC,EAAQI,QAAU,WACdN,EAAQ5D,IAAI8D,EAAQU,YAAclB,EAAWQ,EAAQU,YAAaT,GAAcX,QAChFO,EAAMG,QAAUA,EAAQU,aAE5BV,EAAQW,YAAYC,KAAK,SAASC,GAC9B,MAAOA,GAAarB,EAAWqB,EAAYZ,GAAc,WAK1ExE"} \ No newline at end of file diff --git a/karma.conf.js b/karma.conf.js index d09f654..14f60a7 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -14,7 +14,6 @@ module.exports = function(config) { // list of files / patterns to load in the browser files: [ - 'bower_components/jquery/jquery.js', 'bower_components/angular/angular.js', 'bower_components/angular-mocks/angular-mocks.js', './dateparser.js', diff --git a/test/dateparser.directive.spec.js b/test/dateparser.directive.spec.js index d85c037..c36ec37 100644 --- a/test/dateparser.directive.spec.js +++ b/test/dateparser.directive.spec.js @@ -2,6 +2,7 @@ describe('dateParser directive', function() { var $scope, $compile; beforeEach(module('dateParser')); + beforeEach(module('dateParserDirective')); beforeEach(inject(function(_$rootScope_, _$compile_) { $scope = _$rootScope_; @@ -26,7 +27,7 @@ describe('dateParser directive', function() { changeInputValueTo = function (el, value) { el.val(value); - el.trigger($sniffer.hasEvent('input') ? 'input' : 'change'); + el.triggerHandler($sniffer.hasEvent('input') ? 'input' : 'change'); $scope.$digest(); }; })); From c04b47afb0c43c06eb89f13781e80cc3dd62b0a8 Mon Sep 17 00:00:00 2001 From: Dzulqarnain Nasir Date: Sun, 23 Nov 2014 21:43:22 +0200 Subject: [PATCH 2/2] Issue #24 [Revised] * Updated bower.json to specify angular version as 1.x. * Updated unit test for directive as it was faulty. * Removed jQuery as dev dependency because it is now irrelevant. --- bower.json | 9 ++++----- dateparser.directive.js | 5 ++++- dist/angular-dateparser.js | 5 ++++- dist/angular-dateparser.min.js | 4 ++-- dist/angular-dateparser.min.js.map | 2 +- package.json | 2 +- test/dateparser.directive.spec.js | 2 +- 7 files changed, 17 insertions(+), 12 deletions(-) diff --git a/bower.json b/bower.json index 4e7582a..fafa44c 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angular-dateParser", - "version": "1.0.10", + "version": "1.0.11", "homepage": "https://github.com/dnasir/angular-dateParser", "authors": [ "Dzulqarnain Nasir" @@ -15,11 +15,10 @@ "tests" ], "dependencies": { - "angular": "1.0.6", - "angular-i18n": "1.0.6" + "angular": "1.x", + "angular-i18n": "1.x" }, "devDependencies": { - "jquery": "1.8.2", - "angular-mocks": "1.0.6" + "angular-mocks": "1.x" } } diff --git a/dateparser.directive.js b/dateparser.directive.js index c33328b..73e51a3 100644 --- a/dateparser.directive.js +++ b/dateparser.directive.js @@ -1,5 +1,8 @@ -angular.module('dateParserDirective', ['dateParser']) +angular.module('dateParser') .directive('dateParser', ['dateFilter', '$dateParser', function(dateFilter, $dateParser) { + + 'use strict'; + return { restrict: 'A', require: 'ngModel', diff --git a/dist/angular-dateparser.js b/dist/angular-dateparser.js index bafa52f..18ffdb8 100644 --- a/dist/angular-dateparser.js +++ b/dist/angular-dateparser.js @@ -1,5 +1,5 @@ /*! - * angular-dateParser 1.0.10 + * angular-dateParser 1.0.11 * https://github.com/dnasir/angular-dateParser * Copyright 2014, Dzulqarnain Nasir * Licensed under: MIT (http://www.opensource.org/licenses/MIT) @@ -7,6 +7,7 @@ (function(angular) { angular.module("dateParser", []).factory("dateParserHelpers", [ function() { + "use strict"; var cache = {}; return { getInteger: function(string, startPoint, minLength, maxLength) { @@ -24,6 +25,7 @@ } }; } ]).factory("$dateParser", [ "$locale", "dateParserHelpers", function($locale, dateParserHelpers) { + "use strict"; var datetimeFormats = $locale.DATETIME_FORMATS; var monthNames = datetimeFormats.MONTH.concat(datetimeFormats.SHORTMONTH); var dayNames = datetimeFormats.DAY.concat(datetimeFormats.SHORTDAY); @@ -229,6 +231,7 @@ }; } ]); angular.module("dateParser").directive("dateParser", [ "dateFilter", "$dateParser", function(dateFilter, $dateParser) { + "use strict"; return { restrict: "A", require: "ngModel", diff --git a/dist/angular-dateparser.min.js b/dist/angular-dateparser.min.js index a878ec8..e5c9b71 100644 --- a/dist/angular-dateparser.min.js +++ b/dist/angular-dateparser.min.js @@ -1,3 +1,3 @@ -/*! angular-dateParser 1.0.10 | (c) 2014, Dzulqarnain Nasir | MIT (http://www.opensource.org/licenses/MIT) */ -!function(a){a.module("dateParser",[]).factory("dateParserHelpers",[function(){var a={};return{getInteger:function(b,c,d,e){var f=b.substring(c),g=a[d+"_"+e];g||(g=new RegExp("^(\\d{"+d+","+e+"})"),a[d+"_"+e]=g);var h=g.exec(f);return h?h[1]:null}}}]).factory("$dateParser",["$locale","dateParserHelpers",function(b,c){var d=b.DATETIME_FORMATS,e=d.MONTH.concat(d.SHORTMONTH),f=d.DAY.concat(d.SHORTDAY);return function(b,g){if(a.isDate(b))return b;try{if(b+="",g+="",!g.length)return new Date(b);d[g]&&(g=d[g]);for(var h=new Date,i=0,j=0,k="",l=h.getFullYear(),m=h.getMonth()+1,n=h.getDate(),o=0,p=0,q=0,r=0,s="am",t=0,u=!1;j70?1900+(l-0):2e3+(l-0))}else if("MMMM"===v||"MMM"==v){m=0;for(var y=0;y12&&(m-=12),i+=z.length;break}}if(1>m||m>12)throw"Invalid month"}else if("EEEE"==v||"EEE"==v)for(var A=0;Am||m>12)throw"Invalid month";i+=m.length}else if("dd"==v||"d"==v){if(n=c.getInteger(b,i,v.length,2),null===n||1>n||n>31)throw"Invalid date";i+=n.length}else if("HH"==v||"H"==v){if(o=c.getInteger(b,i,v.length,2),null===o||0>o||o>23)throw"Invalid hours";i+=o.length}else if("hh"==v||"h"==v){if(o=c.getInteger(b,i,v.length,2),null===o||1>o||o>12)throw"Invalid hours";i+=o.length}else if("mm"==v||"m"==v){if(p=c.getInteger(b,i,v.length,2),null===p||0>p||p>59)throw"Invalid minutes";i+=p.length}else if("ss"==v||"s"==v){if(q=c.getInteger(b,i,v.length,2),null===q||0>q||q>59)throw"Invalid seconds";i+=q.length}else if("sss"===v){if(r=c.getInteger(b,i,3,3),null===r||0>r||r>999)throw"Invalid milliseconds";i+=3}else if("a"==v){if("am"==b.substring(i,i+2).toLowerCase())s="AM";else{if("pm"!=b.substring(i,i+2).toLowerCase())throw"Invalid AM/PM";s="PM"}i+=2}else if("Z"==v){if(u=!0,"Z"===b[i])t=0,i+=1;else if(":"===b[i+3]){var C=b.substring(i,i+6);t=60*parseInt(C.substr(0,3),10)+parseInt(C.substr(4,2),10),i+=6}else{var C=b.substring(i,i+5);t=60*parseInt(C.substr(0,3),10)+parseInt(C.substr(3,2),10),i+=5}if(t>720||-720>t)throw"Invalid timezone"}else{if(b.substring(i,i+v.length)!=v)throw"Pattern value mismatch";i+=v.length}}else{for(;"'"!=g.charAt(++j)&&j29)throw"Invalid date"}else if(n>28)throw"Invalid date";if((4==m||6==m||9==m||11==m)&&n>30)throw"Invalid date";12>o&&"PM"==s?o+=12:o>11&&"AM"==s&&(o-=12);var D=new Date(l,m-1,n,o,p,q,r);return u?new Date(D.getTime()-6e4*(t+D.getTimezoneOffset())):D}catch(E){return void 0}}}]),a.module("dateParser").directive("dateParser",["dateFilter","$dateParser",function(a,b){return{restrict:"A",require:"ngModel",link:function(c,d,e,f){var g;e.$observe("dateParser",function(a){g=a,f.$render()}),f.$parsers.unshift(function(a){var c=b(a,g);return isNaN(c)?f.$setValidity("date",!1):f.$setValidity("date",!0),c}),f.$render=function(){d.val(f.$modelValue?a(f.$modelValue,g):void 0),c.ngModel=f.$modelValue},f.$formatters.push(function(b){return b?a(b,g):""})}}}])}(angular); +/*! angular-dateParser 1.0.11 | (c) 2014, Dzulqarnain Nasir | MIT (http://www.opensource.org/licenses/MIT) */ +!function(a){a.module("dateParser",[]).factory("dateParserHelpers",[function(){"use strict";var a={};return{getInteger:function(b,c,d,e){var f=b.substring(c),g=a[d+"_"+e];g||(g=new RegExp("^(\\d{"+d+","+e+"})"),a[d+"_"+e]=g);var h=g.exec(f);return h?h[1]:null}}}]).factory("$dateParser",["$locale","dateParserHelpers",function(b,c){"use strict";var d=b.DATETIME_FORMATS,e=d.MONTH.concat(d.SHORTMONTH),f=d.DAY.concat(d.SHORTDAY);return function(b,g){if(a.isDate(b))return b;try{if(b+="",g+="",!g.length)return new Date(b);d[g]&&(g=d[g]);for(var h=new Date,i=0,j=0,k="",l=h.getFullYear(),m=h.getMonth()+1,n=h.getDate(),o=0,p=0,q=0,r=0,s="am",t=0,u=!1;j70?1900+(l-0):2e3+(l-0))}else if("MMMM"===v||"MMM"==v){m=0;for(var y=0;y12&&(m-=12),i+=z.length;break}}if(1>m||m>12)throw"Invalid month"}else if("EEEE"==v||"EEE"==v)for(var A=0;Am||m>12)throw"Invalid month";i+=m.length}else if("dd"==v||"d"==v){if(n=c.getInteger(b,i,v.length,2),null===n||1>n||n>31)throw"Invalid date";i+=n.length}else if("HH"==v||"H"==v){if(o=c.getInteger(b,i,v.length,2),null===o||0>o||o>23)throw"Invalid hours";i+=o.length}else if("hh"==v||"h"==v){if(o=c.getInteger(b,i,v.length,2),null===o||1>o||o>12)throw"Invalid hours";i+=o.length}else if("mm"==v||"m"==v){if(p=c.getInteger(b,i,v.length,2),null===p||0>p||p>59)throw"Invalid minutes";i+=p.length}else if("ss"==v||"s"==v){if(q=c.getInteger(b,i,v.length,2),null===q||0>q||q>59)throw"Invalid seconds";i+=q.length}else if("sss"===v){if(r=c.getInteger(b,i,3,3),null===r||0>r||r>999)throw"Invalid milliseconds";i+=3}else if("a"==v){if("am"==b.substring(i,i+2).toLowerCase())s="AM";else{if("pm"!=b.substring(i,i+2).toLowerCase())throw"Invalid AM/PM";s="PM"}i+=2}else if("Z"==v){if(u=!0,"Z"===b[i])t=0,i+=1;else if(":"===b[i+3]){var C=b.substring(i,i+6);t=60*parseInt(C.substr(0,3),10)+parseInt(C.substr(4,2),10),i+=6}else{var C=b.substring(i,i+5);t=60*parseInt(C.substr(0,3),10)+parseInt(C.substr(3,2),10),i+=5}if(t>720||-720>t)throw"Invalid timezone"}else{if(b.substring(i,i+v.length)!=v)throw"Pattern value mismatch";i+=v.length}}else{for(;"'"!=g.charAt(++j)&&j29)throw"Invalid date"}else if(n>28)throw"Invalid date";if((4==m||6==m||9==m||11==m)&&n>30)throw"Invalid date";12>o&&"PM"==s?o+=12:o>11&&"AM"==s&&(o-=12);var D=new Date(l,m-1,n,o,p,q,r);return u?new Date(D.getTime()-6e4*(t+D.getTimezoneOffset())):D}catch(E){return void 0}}}]),a.module("dateParser").directive("dateParser",["dateFilter","$dateParser",function(a,b){"use strict";return{restrict:"A",require:"ngModel",link:function(c,d,e,f){var g;e.$observe("dateParser",function(a){g=a,f.$render()}),f.$parsers.unshift(function(a){var c=b(a,g);return isNaN(c)?f.$setValidity("date",!1):f.$setValidity("date",!0),c}),f.$render=function(){d.val(f.$modelValue?a(f.$modelValue,g):void 0),c.ngModel=f.$modelValue},f.$formatters.push(function(b){return b?a(b,g):""})}}}])}(angular); //# sourceMappingURL=angular-dateparser.min.js.map \ No newline at end of file diff --git a/dist/angular-dateparser.min.js.map b/dist/angular-dateparser.min.js.map index c44eb18..861fc75 100644 --- a/dist/angular-dateparser.min.js.map +++ b/dist/angular-dateparser.min.js.map @@ -1 +1 @@ -{"version":3,"file":"angular-dateparser.min.js","sources":["angular-dateparser.js"],"names":["angular","module","factory","cache","getInteger","string","startPoint","minLength","maxLength","val","substring","matcher","RegExp","match","exec","$locale","dateParserHelpers","datetimeFormats","DATETIME_FORMATS","monthNames","MONTH","concat","SHORTMONTH","dayNames","DAY","SHORTDAY","format","isDate","length","Date","now","i_val","i_format","format_token","year","getFullYear","month","getMonth","date","getDate","hh","mm","ss","sss","ampm","z","parsedZ","charAt","token","i","month_name","toLowerCase","j","day_name","tzStr","parseInt","substr","localDate","getTime","getTimezoneOffset","e","undefined","directive","dateFilter","$dateParser","restrict","require","link","scope","element","attrs","ngModel","dateFormat","$observe","value","$render","$parsers","unshift","viewValue","isNaN","$setValidity","$modelValue","$formatters","push","modelValue"],"mappings":";CAOA,SAAUA,GACNA,EAAQC,OAAO,iBAAkBC,QAAQ,qBAAuB,WAC5D,GAAIC,KACJ,QACIC,WAAY,SAASC,EAAQC,EAAYC,EAAWC,GAChD,GAAIC,GAAMJ,EAAOK,UAAUJ,GACvBK,EAAUR,EAAMI,EAAY,IAAMC,EACjCG,KACDA,EAAU,GAAIC,QAAO,SAAWL,EAAY,IAAMC,EAAY,MAC9DL,EAAMI,EAAY,IAAMC,GAAaG,EAEzC,IAAIE,GAAQF,EAAQG,KAAKL,EACzB,OAAII,GACOA,EAAM,GAEV,UAGdX,QAAQ,eAAiB,UAAW,oBAAqB,SAASa,EAASC,GAC5E,GAAIC,GAAkBF,EAAQG,iBAC1BC,EAAaF,EAAgBG,MAAMC,OAAOJ,EAAgBK,YAC1DC,EAAWN,EAAgBO,IAAIH,OAAOJ,EAAgBQ,SAC1D,OAAO,UAAShB,EAAKiB,GACjB,GAAI1B,EAAQ2B,OAAOlB,GACf,MAAOA,EAEX,KAGI,GAFAA,GAAY,GACZiB,GAAkB,IACbA,EAAOE,OACR,MAAO,IAAIC,MAAKpB,EAEhBQ,GAAgBS,KAChBA,EAAST,EAAgBS,GAG7B,KADA,GAAII,GAAM,GAAID,MAAQE,EAAQ,EAAGC,EAAW,EAAGC,EAAe,GAAIC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":3,"file":"angular-dateparser.min.js","sources":["angular-dateparser.js"],"names":["angular","module","factory","cache","getInteger","string","startPoint","minLength","maxLength","val","substring","matcher","RegExp","match","exec","$locale","dateParserHelpers","datetimeFormats","DATETIME_FORMATS","monthNames","MONTH","concat","SHORTMONTH","dayNames","DAY","SHORTDAY","format","isDate","length","Date","now","i_val","i_format","format_token","year","getFullYear","month","getMonth","date","getDate","hh","mm","ss","sss","ampm","z","parsedZ","charAt","token","i","month_name","toLowerCase","j","day_name","tzStr","parseInt","substr","localDate","getTime","getTimezoneOffset","e","undefined","directive","dateFilter","$dateParser","restrict","require","link","scope","element","attrs","ngModel","dateFormat","$observe","value","$render","$parsers","unshift","viewValue","isNaN","$setValidity","$modelValue","$formatters","push","modelValue"],"mappings":";CAOA,SAAUA,GACNA,EAAQC,OAAO,iBAAkBC,QAAQ,qBAAuB,WAC5D,YACA,IAAIC,KACJ,QACIC,WAAY,SAASC,EAAQC,EAAYC,EAAWC,GAChD,GAAIC,GAAMJ,EAAOK,UAAUJ,GACvBK,EAAUR,EAAMI,EAAY,IAAMC,EACjCG,KACDA,EAAU,GAAIC,QAAO,SAAWL,EAAY,IAAMC,EAAY,MAC9DL,EAAMI,EAAY,IAAMC,GAAaG,EAEzC,IAAIE,GAAQF,EAAQG,KAAKL,EACzB,OAAII,GACOA,EAAM,GAEV,UAGdX,QAAQ,eAAiB,UAAW,oBAAqB,SAASa,EAASC,GAC5E,YACA,IAAIC,GAAkBF,EAAQG,iBAC1BC,EAAaF,EAAgBG,MAAMC,OAAOJ,EAAgBK,YAC1DC,EAAWN,EAAgBO,IAAIH,OAAOJ,EAAgBQ,SAC1D,OAAO,UAAShB,EAAKiB,GACjB,GAAI1B,EAAQ2B,OAAOlB,GACf,MAAOA,EAEX,KAGI,GAFAA,GAAY,GACZiB,GAAkB,IACbA,EAAOE,OACR,MAAO,IAAIC,MAAKpB,EAEhBQ,GAAgBS,KAChBA,EAAST,EAAgBS,GAG7B,KADA,GAAII,GAAM,GA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AAarB,EAAWqB,EAAYZ,GAAc,WAK1ExE"} \ No newline at end of file diff --git a/package.json b/package.json index 3a9af89..5c5f435 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "author": "Dzulqarnain Nasir", "name": "angular-dateParser", - "version": "1.0.10", + "version": "1.0.11", "homepage": "https://github.com/dnasir/angular-dateParser", "licenses": { "type": "MIT", diff --git a/test/dateparser.directive.spec.js b/test/dateparser.directive.spec.js index d85c037..0dcc93e 100644 --- a/test/dateparser.directive.spec.js +++ b/test/dateparser.directive.spec.js @@ -26,7 +26,7 @@ describe('dateParser directive', function() { changeInputValueTo = function (el, value) { el.val(value); - el.trigger($sniffer.hasEvent('input') ? 'input' : 'change'); + el.triggerHandler($sniffer.hasEvent('input') ? 'input' : 'change'); $scope.$digest(); }; }));