angular-clock
Advanced tools
Comparing version 0.6.0 to 0.7.0
@@ -6,3 +6,3 @@ (function() { | ||
* Usage pattern | ||
* <ds-widget-clock data-gmt-offset="0"></ds-widget-clock> | ||
* <ds-widget-clock data-gmt-offset="0"></ds-widget-clock> | ||
*/ | ||
@@ -70,3 +70,3 @@ var days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; | ||
scope.$watch('gmtOffset', function(value, old) { | ||
gmtOffset = value; | ||
@@ -77,3 +77,3 @@ o.gmtOffset = (gmtOffset != null) ? getGMTbase100(gmtOffset) : false; | ||
} | ||
tick(); | ||
@@ -86,2 +86,7 @@ }); | ||
}); | ||
scope.$watch('startTime', function(value, old) { | ||
if(value != old){ | ||
o.startTime = parseInt(value, 10); | ||
} | ||
}); | ||
scope.$watch('showDigital', function(value, old) { | ||
@@ -88,0 +93,0 @@ if(value != old){ |
{ | ||
"name": "angular-ui-clock", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"main": [ | ||
@@ -5,0 +5,0 @@ "./dist/angular-clock.js", |
@@ -6,3 +6,3 @@ (function() { | ||
* Usage pattern | ||
* <ds-widget-clock data-gmt-offset="0"></ds-widget-clock> | ||
* <ds-widget-clock data-gmt-offset="0"></ds-widget-clock> | ||
*/ | ||
@@ -70,3 +70,3 @@ var days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; | ||
scope.$watch('gmtOffset', function(value, old) { | ||
gmtOffset = value; | ||
@@ -77,3 +77,3 @@ o.gmtOffset = (gmtOffset != null) ? getGMTbase100(gmtOffset) : false; | ||
} | ||
tick(); | ||
@@ -86,2 +86,7 @@ }); | ||
}); | ||
scope.$watch('startTime', function(value, old) { | ||
if(value != old){ | ||
o.startTime = parseInt(value, 10); | ||
} | ||
}); | ||
scope.$watch('showDigital', function(value, old) { | ||
@@ -88,0 +93,0 @@ if(value != old){ |
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";function t(t,s){return{restrict:"EA",scope:{gmtOffset:"=gmtOffset",digitalFormat:"=digitalFormat",showDigital:"=showDigital",showAnalog:"=showAnalog",startTime:"=startTime",theme:"=theme",majorsTotal:"=majorsTotal"},template:'<div class="widget-clock" ng-class="themeClass" ng-if="date"><div class="digital" ng-if="digital"><span class="time"><span class="hours">{{digital}}</span></span></div><div class="analog" ng-if="analog"><div class="square"><svg viewBox="0 0 100 100"><g transform="translate(50,50)"><circle class="clock-face" r="48" /><line ng-repeat="minor in minors track by $index" class="minor" y1="42" y2="45" ng-attr-transform="rotate({{360 * $index / minors.length}})" /><line ng-repeat="major in majors track by $index" class="major" y1="35" y2="46" ng-attr-transform="rotate({{360 * $index / majors.length}})" /><line class="hour" y1="2" y2="-20" ng-attr-transform="rotate({{30 * date.hrs + date.mins / 2}})" /><line class="minute" y1="4" y2="-30" ng-attr-transform="rotate({{6 * date.mins + date.secs / 10}})" /><g ng-attr-transform="rotate({{6 * date.secs}})"><line class="second" y1="10" y2="-38" /><line class="second-counterweight" y1="10" y2="2" /></g></g></svg></div></div><div ng-if="gmtInfo" class="gmt-info">{{gmtInfo}}</div></div>',link:function(n,r,l){var g,m={},c=n.gmtOffset,f=n.digitalFormat?n.digitalFormat:"HH:mm:ss";m.showDigital=null!=n.showDigital?n.showDigital:void 0!==l.showDigital?!0:!1,m.showAnalog=null!=n.showAnalog?n.showAnalog:void 0!==l.showAnalog?!0:!1,m.showGmtInfo=void 0!==l.showGmtInfo?!0:!1,m.startTime=parseInt(n.startTime,10),n.themeClass=n.theme?n.theme:l.theme?l.theme:"light",m.showDigital||m.showAnalog||(m.showAnalog=!0,m.showDigital=!0),n.gmtInfo=!1,n.date=i(m),n.digital=m.showDigital?"Loading..":!1,n.analog=m.showAnalog,n.majors=l.majorsTotal?new Array(parseInt(l.majorsTotal)):new Array(12),n.minors=new Array(60);var h=null,d=function(){isNaN(m.startTime)||(m.startTime=m.startTime+1e3),h=i(m),n.date=h,m.showDigital&&(n.digital=o(h,f,s))};g=t(d,1e3),n.$watch("gmtOffset",function(t){c=t,m.gmtOffset=null!=c?a(c):!1,m.showGmtInfo&&m.gmtOffset!==!1&&(n.gmtInfo=e(m.gmtOffset)),d()}),n.$watch("digitalFormat",function(t,a){t!=a&&(f=t)}),n.$watch("showDigital",function(t,a){t!=a&&(m.showDigital=t,n.digital=m.showDigital?"Loading..":!1)}),n.$watch("showAnalog",function(t,a){t!=a&&(m.showAnalog=t,n.analog=t)}),n.$watch("theme",function(t,a){t!=a&&(n.themeClass=t?t:l.theme?l.theme:"light")}),r.on("$destroy",function(){t.cancel(g),g=null})}}}function a(t){t=parseFloat(t);var a=t>0?Math.floor(t):Math.ceil(t),e=t%1/.6;return a+e}function e(t){var a=t>0?Math.floor(t):Math.ceil(t),e=Math.round((t>0?t:-1*t)%1*60);return"GMT"+(0===t?"":(t>0?" +":" ")+s(a)+"."+n(e).substring(0,2))}function s(t){return 0>t?(t>-10?"-0":"-")+-1*t:(10>t?"0":"")+t}function n(t){return t+(10>t?"0":"")}function i(t){var a=isNaN(t.startTime)?new Date:new Date(t.startTime);if(null!==t.gmtOffset&&t.gmtOffset!==!1){var e=a.getTime()+6e4*a.getTimezoneOffset(),s=new Date(e+36e5*t.gmtOffset);return{hrs:s.getHours(),mins:s.getMinutes(),secs:s.getSeconds(),date:s}}return{hrs:a.getHours(),mins:a.getMinutes(),secs:a.getSeconds(),date:a}}function o(t,a,e){return e("date")(t.date,a)}angular.module("ds.clock",[]).directive("dsWidgetClock",["$interval","$filter",function(a,e){return t(a,e)}])}(); | ||
!function(){"use strict";function t(t,s){return{restrict:"EA",scope:{gmtOffset:"=gmtOffset",digitalFormat:"=digitalFormat",showDigital:"=showDigital",showAnalog:"=showAnalog",startTime:"=startTime",theme:"=theme",majorsTotal:"=majorsTotal"},template:'<div class="widget-clock" ng-class="themeClass" ng-if="date"><div class="digital" ng-if="digital"><span class="time"><span class="hours">{{digital}}</span></span></div><div class="analog" ng-if="analog"><div class="square"><svg viewBox="0 0 100 100"><g transform="translate(50,50)"><circle class="clock-face" r="48" /><line ng-repeat="minor in minors track by $index" class="minor" y1="42" y2="45" ng-attr-transform="rotate({{360 * $index / minors.length}})" /><line ng-repeat="major in majors track by $index" class="major" y1="35" y2="46" ng-attr-transform="rotate({{360 * $index / majors.length}})" /><line class="hour" y1="2" y2="-20" ng-attr-transform="rotate({{30 * date.hrs + date.mins / 2}})" /><line class="minute" y1="4" y2="-30" ng-attr-transform="rotate({{6 * date.mins + date.secs / 10}})" /><g ng-attr-transform="rotate({{6 * date.secs}})"><line class="second" y1="10" y2="-38" /><line class="second-counterweight" y1="10" y2="2" /></g></g></svg></div></div><div ng-if="gmtInfo" class="gmt-info">{{gmtInfo}}</div></div>',link:function(n,r,l){var g,m={},c=n.gmtOffset,f=n.digitalFormat?n.digitalFormat:"HH:mm:ss";m.showDigital=null!=n.showDigital?n.showDigital:void 0!==l.showDigital?!0:!1,m.showAnalog=null!=n.showAnalog?n.showAnalog:void 0!==l.showAnalog?!0:!1,m.showGmtInfo=void 0!==l.showGmtInfo?!0:!1,m.startTime=parseInt(n.startTime,10),n.themeClass=n.theme?n.theme:l.theme?l.theme:"light",m.showDigital||m.showAnalog||(m.showAnalog=!0,m.showDigital=!0),n.gmtInfo=!1,n.date=i(m),n.digital=m.showDigital?"Loading..":!1,n.analog=m.showAnalog,n.majors=l.majorsTotal?new Array(parseInt(l.majorsTotal)):new Array(12),n.minors=new Array(60);var h=null,d=function(){isNaN(m.startTime)||(m.startTime=m.startTime+1e3),h=i(m),n.date=h,m.showDigital&&(n.digital=o(h,f,s))};g=t(d,1e3),n.$watch("gmtOffset",function(t){c=t,m.gmtOffset=null!=c?a(c):!1,m.showGmtInfo&&m.gmtOffset!==!1&&(n.gmtInfo=e(m.gmtOffset)),d()}),n.$watch("digitalFormat",function(t,a){t!=a&&(f=t)}),n.$watch("startTime",function(t,a){t!=a&&(m.startTime=parseInt(t,10))}),n.$watch("showDigital",function(t,a){t!=a&&(m.showDigital=t,n.digital=m.showDigital?"Loading..":!1)}),n.$watch("showAnalog",function(t,a){t!=a&&(m.showAnalog=t,n.analog=t)}),n.$watch("theme",function(t,a){t!=a&&(n.themeClass=t?t:l.theme?l.theme:"light")}),r.on("$destroy",function(){t.cancel(g),g=null})}}}function a(t){t=parseFloat(t);var a=t>0?Math.floor(t):Math.ceil(t),e=t%1/.6;return a+e}function e(t){var a=t>0?Math.floor(t):Math.ceil(t),e=Math.round((t>0?t:-1*t)%1*60);return"GMT"+(0===t?"":(t>0?" +":" ")+s(a)+"."+n(e).substring(0,2))}function s(t){return 0>t?(t>-10?"-0":"-")+-1*t:(10>t?"0":"")+t}function n(t){return t+(10>t?"0":"")}function i(t){var a=isNaN(t.startTime)?new Date:new Date(t.startTime);if(null!==t.gmtOffset&&t.gmtOffset!==!1){var e=a.getTime()+6e4*a.getTimezoneOffset(),s=new Date(e+36e5*t.gmtOffset);return{hrs:s.getHours(),mins:s.getMinutes(),secs:s.getSeconds(),date:s}}return{hrs:a.getHours(),mins:a.getMinutes(),secs:a.getSeconds(),date:a}}function o(t,a,e){return e("date")(t.date,a)}angular.module("ds.clock",[]).directive("dsWidgetClock",["$interval","$filter",function(a,e){return t(a,e)}])}(); | ||
//# sourceMappingURL=angular-clock.min.js.map |
@@ -54,3 +54,3 @@ (function() { | ||
gulp.task('js', ['lint', 'bower'], function() { | ||
gulp.task('js', ['bower'], function() { | ||
return gulp.src('./angular-clock.js') | ||
@@ -172,6 +172,6 @@ .pipe(rename('angular-clock.min.js')) | ||
gulp.task('check', sequence(['lint' /*, 'style'*/ ], 'test')); | ||
gulp.task('deploy-patch', sequence('default', 'bump-patch', 'update', 'git-commit', 'git-push', 'npm')); | ||
gulp.task('deploy-minor', sequence('default', 'bump-minor', 'update', 'git-commit', 'git-push', 'npm')); | ||
gulp.task('deploy-major', sequence('default', 'bump-major', 'update', 'git-commit', 'git-push', 'npm')); | ||
gulp.task('deploy-patch', sequence('default', 'bump-patch', 'demo', 'git-commit', 'git-push', 'npm')); | ||
gulp.task('deploy-minor', sequence('default', 'bump-minor', 'demo', 'git-commit', 'git-push', 'npm')); | ||
gulp.task('deploy-major', sequence('default', 'bump-major', 'demo', 'git-commit', 'git-push', 'npm')); | ||
})(); |
{ | ||
"name": "angular-clock", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "An angular.js clock widget", | ||
@@ -5,0 +5,0 @@ "main": "angular-clock.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1072626
44
9562
2