ngx-moment
Advanced tools
Comparing version 3.4.0 to 3.5.0
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("moment")):"function"==typeof define&&define.amd?define("ngx-moment",["exports","@angular/core","moment"],t):t(e["ngx-moment"]={},e.ng.core,e.moment)}(this,function(e,r,u){"use strict";var n=u,t=function(){function e(){}return e.prototype.transform=function(e,t,r){if(void 0===t||"number"==typeof t&&void 0===r)throw new Error("AddPipe: missing required arguments");return n(e).add(t,r)},e.decorators=[{type:r.Pipe,args:[{name:"amAdd"}]}],e}(),s=u,o=function(){function n(e,t){var r=this;this.cdRef=e,this.ngZone=t,n.initTimer(t),n.refs++,this.midnightSub=n.midnight.subscribe(function(){r.ngZone.run(function(){return r.cdRef.markForCheck()})})}return n.prototype.transform=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=null,o=null,i=0,a=t.length;i<a;i++)null!==t[i]&&("object"!=typeof t[i]||u.isMoment(t[i])?o=s(t[i]):n=t[i]);return s(e).calendar(o,n)},n.prototype.ngOnDestroy=function(){0<n.refs&&n.refs--,0===n.refs&&n.removeTimer(),this.midnightSub.unsubscribe()},n.initTimer=function(e){if(!n.midnight&&(n.midnight=new r.EventEmitter,"undefined"!=typeof window)){var t=n._getMillisecondsUntilUpdate();n.timer=e.runOutsideAngular(function(){return window.setTimeout(function(){n.midnight.emit(new Date),n.removeTimer(),n.initTimer(e)},t)})}},n.removeTimer=function(){n.timer&&(window.clearTimeout(n.timer),n.timer=null,n.midnight=null)},n._getMillisecondsUntilUpdate=function(){var e=s();return s().startOf("day").add(1,"days").valueOf()-e.valueOf()+1e3},n.refs=0,n.timer=null,n.midnight=null,n.decorators=[{type:r.Pipe,args:[{name:"amCalendar",pure:!1}]}],n.ctorParameters=function(){return[{type:r.ChangeDetectorRef},{type:r.NgZone}]},n}(),i=u,a=function(){function e(){}return e.prototype.transform=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return e?i(e).format(t[0]):""},e.decorators=[{type:r.Pipe,args:[{name:"amDateFormat"}]}],e}(),f=u,c=function(){function e(){}return e.prototype.transform=function(e,t,r,n){var o=f(e),i=null!==t?f(t):f();return o.diff(i,r,n)},e.decorators=[{type:r.Pipe,args:[{name:"amDifference"}]}],e}(),m=new r.InjectionToken("NGX_MOMENT_OPTIONS"),p=function(){function e(e){this.allowedUnits=["ss","s","m","h","d","M"],this._applyOptions(e)}return e.prototype.transform=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(void 0===t||1!==t.length)throw new Error("DurationPipe: missing required time unit argument");return u.duration(e,t[0]).humanize()},e.prototype._applyOptions=function(t){var r=this;t&&(t.relativeTimeThresholdOptions&&Object.keys(t.relativeTimeThresholdOptions).filter(function(e){return-1!==r.allowedUnits.indexOf(e)}).forEach(function(e){u.relativeTimeThreshold(e,t.relativeTimeThresholdOptions[e])}))},e.decorators=[{type:r.Pipe,args:[{name:"amDuration"}]}],e.ctorParameters=function(){return[{type:undefined,decorators:[{type:r.Optional},{type:r.Inject,args:[m]}]}]},e}(),l=function(){function e(){}return e.prototype.transform=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return"string"==typeof e&&(e=+e),u.unix(e)},e.decorators=[{type:r.Pipe,args:[{name:"amFromUnix"}]}],e}(),d=u,h=function(){function e(){}return e.prototype.transform=function(e,t){return d(e,t)},e.decorators=[{type:r.Pipe,args:[{name:"amParse"}]}],e}(),g=Object.assign||function g(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},y=function(){function e(){}return e.prototype.transform=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return u.utc(e)},e.decorators=[{type:r.Pipe,args:[{name:"amFromUtc"}]}],e}(),T=u,P=function(){function e(){}return e.prototype.transform=function(e,t,r){return T(e).isAfter(T(t),r)},e.decorators=[{type:r.Pipe,args:[{name:"amIsAfter"}]}],e}(),v=u,O=function(){function e(){}return e.prototype.transform=function(e,t,r){return v(e).isBefore(v(t),r)},e.decorators=[{type:r.Pipe,args:[{name:"amIsBefore"}]}],e}(),w=u,b=function(){function e(){}return e.prototype.transform=function(e){return w(e).local()},e.decorators=[{type:r.Pipe,args:[{name:"amLocal"}]}],e}(),x=u,M=function(){function e(){}return e.prototype.transform=function(e,t){return x(e).locale(t)},e.decorators=[{type:r.Pipe,args:[{name:"amLocale"}]}],e}(),U=function(){function e(){}return e.prototype.transform=function(e){return u.parseZone(e)},e.decorators=[{type:r.Pipe,args:[{name:"amParseZone"}]}],e}(),D=u,S=function(){function e(){}return e.prototype.transform=function(e,t,r){if(void 0===t||"number"==typeof t&&void 0===r)throw new Error("SubtractPipe: missing required arguments");return D(e).subtract(t,r)},e.decorators=[{type:r.Pipe,args:[{name:"amSubtract"}]}],e}(),A=u,Z=function(){function e(e,t){this.cdRef=e,this.ngZone=t}return e.prototype.transform=function(e,t){return this.hasChanged(e,t)?(this.lastTime=this.getTime(e),this.lastValue=e,this.lastOmitSuffix=t,this.lastLocale=this.getLocale(e),this.removeTimer(),this.createTimer(),this.lastText=A(e).from(A(),t)):this.createTimer(),this.lastText},e.prototype.ngOnDestroy=function(){this.removeTimer()},e.prototype.createTimer=function(){var e=this;if(!this.currentTimer){var t=A(this.lastValue),r=1e3*this.getSecondsUntilUpdate(t);this.currentTimer=this.ngZone.runOutsideAngular(function(){return"undefined"!=typeof window?window.setTimeout(function(){e.lastText=A(e.lastValue).from(A(),e.lastOmitSuffix),e.currentTimer=null,e.ngZone.run(function(){return e.cdRef.markForCheck()})},r):null})}},e.prototype.removeTimer=function(){this.currentTimer&&(window.clearTimeout(this.currentTimer),this.currentTimer=null)},e.prototype.getSecondsUntilUpdate=function(e){var t=Math.abs(A().diff(e,"minute"));return t<1?1:t<60?30:t<180?300:3600},e.prototype.hasChanged=function(e,t){return this.getTime(e)!==this.lastTime||this.getLocale(e)!==this.lastLocale||t!==this.lastOmitSuffix},e.prototype.getTime=function(e){return u.isDate(e)?e.getTime():u.isMoment(e)?e.valueOf():A(e).valueOf()},e.prototype.getLocale=function(e){return u.isMoment(e)?e.locale():u.locale()},e.decorators=[{type:r.Pipe,args:[{name:"amTimeAgo",pure:!1}]}],e.ctorParameters=function(){return[{type:r.ChangeDetectorRef},{type:r.NgZone}]},e}(),_=u,L=function(){function e(){}return e.prototype.transform=function(e){return _(e).utc()},e.decorators=[{type:r.Pipe,args:[{name:"amUtc"}]}],e}(),N=[t,o,a,c,p,l,h,S,Z,L,y,b,M,U,O,P],j=function(){function t(){}return t.forRoot=function(e){return{ngModule:t,providers:[{provide:m,useValue:g({},e)}]}},t.decorators=[{type:r.NgModule,args:[{declarations:N,exports:N}]}],t}();e.AddPipe=t,e.CalendarPipe=o,e.DateFormatPipe=a,e.DifferencePipe=c,e.DurationPipe=p,e.FromUnixPipe=l,e.ParsePipe=h,e.MomentModule=j,e.SubtractPipe=S,e.TimeAgoPipe=Z,e.UtcPipe=L,e.FromUtcPipe=y,e.LocalTimePipe=b,e.LocalePipe=M,e.ParseZonePipe=U,e.IsBeforePipe=O,e.IsAfterPipe=P,e.NGX_MOMENT_OPTIONS=m,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("moment")):"function"==typeof define&&define.amd?define("ngx-moment",["exports","@angular/core","moment"],e):e(t["ngx-moment"]={},t.ng.core,t.moment)}(this,function(t,r,u){"use strict";var n=u,e=function(){function t(){}return t.prototype.transform=function(t,e,r){if(void 0===e||"number"==typeof e&&void 0===r)throw new Error("AddPipe: missing required arguments");return n(t).add(e,r)},t.decorators=[{type:r.Pipe,args:[{name:"amAdd"}]}],t}(),s=u,o=function(){function n(t,e){var r=this;this.cdRef=t,this.ngZone=e,n.initTimer(e),n.refs++,this.midnightSub=n.midnight.subscribe(function(){r.ngZone.run(function(){return r.cdRef.markForCheck()})})}return n.prototype.transform=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];for(var n=null,o=null,i=0,a=e.length;i<a;i++)null!==e[i]&&("object"!=typeof e[i]||u.isMoment(e[i])?o=s(e[i]):n=e[i]);return s(t).calendar(o,n)},n.prototype.ngOnDestroy=function(){0<n.refs&&n.refs--,0===n.refs&&n.removeTimer(),this.midnightSub.unsubscribe()},n.initTimer=function(t){if(!n.midnight&&(n.midnight=new r.EventEmitter,"undefined"!=typeof window)){var e=n._getMillisecondsUntilUpdate();n.timer=t.runOutsideAngular(function(){return window.setTimeout(function(){n.midnight.emit(new Date),n.removeTimer(),n.initTimer(t)},e)})}},n.removeTimer=function(){n.timer&&(window.clearTimeout(n.timer),n.timer=null,n.midnight=null)},n._getMillisecondsUntilUpdate=function(){var t=s();return s().startOf("day").add(1,"days").valueOf()-t.valueOf()+1e3},n.refs=0,n.timer=null,n.midnight=null,n.decorators=[{type:r.Pipe,args:[{name:"amCalendar",pure:!1}]}],n.ctorParameters=function(){return[{type:r.ChangeDetectorRef},{type:r.NgZone}]},n}(),i=u,a=function(){function t(){}return t.prototype.transform=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return t?i(t).format(e[0]):""},t.decorators=[{type:r.Pipe,args:[{name:"amDateFormat"}]}],t}(),f=u,c=function(){function t(){}return t.prototype.transform=function(t,e,r,n){var o=f(t),i=null!==e?f(e):f();return o.diff(i,r,n)},t.decorators=[{type:r.Pipe,args:[{name:"amDifference"}]}],t}(),m=new r.InjectionToken("NGX_MOMENT_OPTIONS"),p=function(){function t(t){this.allowedUnits=["ss","s","m","h","d","M"],this._applyOptions(t)}return t.prototype.transform=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(void 0===e||1!==e.length)throw new Error("DurationPipe: missing required time unit argument");return u.duration(t,e[0]).humanize()},t.prototype._applyOptions=function(e){var r=this;e&&(e.relativeTimeThresholdOptions&&Object.keys(e.relativeTimeThresholdOptions).filter(function(t){return-1!==r.allowedUnits.indexOf(t)}).forEach(function(t){u.relativeTimeThreshold(t,e.relativeTimeThresholdOptions[t])}))},t.decorators=[{type:r.Pipe,args:[{name:"amDuration"}]}],t.ctorParameters=function(){return[{type:undefined,decorators:[{type:r.Optional},{type:r.Inject,args:[m]}]}]},t}(),l=function(){function t(){}return t.prototype.transform=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return"string"==typeof t&&(t=+t),u.unix(t)},t.decorators=[{type:r.Pipe,args:[{name:"amFromUnix"}]}],t}(),d=u,h=function(){function t(){}return t.prototype.transform=function(t,e){return d(t,e)},t.decorators=[{type:r.Pipe,args:[{name:"amParse"}]}],t}(),g=Object.assign||function g(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},y=function(){function t(){}return t.prototype.transform=function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return e?u.utc(t,e):u.utc(t)},t.decorators=[{type:r.Pipe,args:[{name:"amFromUtc"}]}],t}(),T=u,P=function(){function t(){}return t.prototype.transform=function(t,e,r){return T(t).isAfter(T(e),r)},t.decorators=[{type:r.Pipe,args:[{name:"amIsAfter"}]}],t}(),v=u,O=function(){function t(){}return t.prototype.transform=function(t,e,r){return v(t).isBefore(v(e),r)},t.decorators=[{type:r.Pipe,args:[{name:"amIsBefore"}]}],t}(),w=u,b=function(){function t(){}return t.prototype.transform=function(t){return w(t).local()},t.decorators=[{type:r.Pipe,args:[{name:"amLocal"}]}],t}(),x=u,M=function(){function t(){}return t.prototype.transform=function(t,e){return x(t).locale(e)},t.decorators=[{type:r.Pipe,args:[{name:"amLocale"}]}],t}(),U=function(){function t(){}return t.prototype.transform=function(t){return u.parseZone(t)},t.decorators=[{type:r.Pipe,args:[{name:"amParseZone"}]}],t}(),D=u,S=function(){function t(){}return t.prototype.transform=function(t,e,r){if(void 0===e||"number"==typeof e&&void 0===r)throw new Error("SubtractPipe: missing required arguments");return D(t).subtract(e,r)},t.decorators=[{type:r.Pipe,args:[{name:"amSubtract"}]}],t}(),F=u,A=function(){function t(t,e){this.cdRef=t,this.ngZone=e}return t.prototype.format=function(t){return t.from(F(),this.lastOmitSuffix)},t.prototype.transform=function(t,e,r){return this.hasChanged(t,e)?(this.lastTime=this.getTime(t),this.lastValue=t,this.lastOmitSuffix=e,this.lastLocale=this.getLocale(t),this.formatFn=r||this.format.bind(this),this.removeTimer(),this.createTimer(),this.lastText=this.formatFn(F(t))):this.createTimer(),this.lastText},t.prototype.ngOnDestroy=function(){this.removeTimer()},t.prototype.createTimer=function(){var t=this;if(!this.currentTimer){var e=F(this.lastValue),r=1e3*this.getSecondsUntilUpdate(e);this.currentTimer=this.ngZone.runOutsideAngular(function(){return"undefined"!=typeof window?window.setTimeout(function(){t.lastText=t.formatFn(F(t.lastValue)),t.currentTimer=null,t.ngZone.run(function(){return t.cdRef.markForCheck()})},r):null})}},t.prototype.removeTimer=function(){this.currentTimer&&(window.clearTimeout(this.currentTimer),this.currentTimer=null)},t.prototype.getSecondsUntilUpdate=function(t){var e=Math.abs(F().diff(t,"minute"));return e<1?1:e<60?30:e<180?300:3600},t.prototype.hasChanged=function(t,e){return this.getTime(t)!==this.lastTime||this.getLocale(t)!==this.lastLocale||e!==this.lastOmitSuffix},t.prototype.getTime=function(t){return u.isDate(t)?t.getTime():u.isMoment(t)?t.valueOf():F(t).valueOf()},t.prototype.getLocale=function(t){return u.isMoment(t)?t.locale():u.locale()},t.decorators=[{type:r.Pipe,args:[{name:"amTimeAgo",pure:!1}]}],t.ctorParameters=function(){return[{type:r.ChangeDetectorRef},{type:r.NgZone}]},t}(),Z=u,_=function(){function t(){}return t.prototype.transform=function(t){return Z(t).utc()},t.decorators=[{type:r.Pipe,args:[{name:"amUtc"}]}],t}(),L=[e,o,a,c,p,l,h,S,A,_,y,b,M,U,O,P],N=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:m,useValue:g({},t)}]}},e.decorators=[{type:r.NgModule,args:[{declarations:L,exports:L}]}],e}();t.AddPipe=e,t.CalendarPipe=o,t.DateFormatPipe=a,t.DifferencePipe=c,t.DurationPipe=p,t.FromUnixPipe=l,t.ParsePipe=h,t.MomentModule=N,t.SubtractPipe=S,t.TimeAgoPipe=A,t.UtcPipe=_,t.FromUtcPipe=y,t.LocalTimePipe=b,t.LocalePipe=M,t.ParseZonePipe=U,t.IsBeforePipe=O,t.IsAfterPipe=P,t.NGX_MOMENT_OPTIONS=m,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ngx-moment.umd.min.js.map |
@@ -11,7 +11,8 @@ /** | ||
* @param {?} value | ||
* @param {?=} formats | ||
* @param {...?} args | ||
* @return {?} | ||
*/ | ||
transform(value, ...args) { | ||
return moment.utc(value); | ||
transform(value, formats, ...args) { | ||
return formats ? moment.utc(value, formats) : moment.utc(value); | ||
} | ||
@@ -22,2 +23,2 @@ } | ||
]; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbS11dGMucGlwZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1tb21lbnQvIiwic291cmNlcyI6WyJmcm9tLXV0Yy5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBRUEsT0FBTyxFQUFDLElBQUksRUFBZ0IsTUFBTSxlQUFlLENBQUM7QUFDbEQsT0FBTyxLQUFLLE1BQU0sTUFBTSxRQUFRLENBQUM7QUFHakMsTUFBTSxPQUFPLFdBQVc7Ozs7OztJQUN0QixTQUFTLENBQUMsS0FBVSxFQUFFLEdBQUcsSUFBYztRQUNyQyxPQUFPLE1BQU0sQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUM7SUFDM0IsQ0FBQzs7O1lBSkYsSUFBSSxTQUFDLEVBQUUsSUFBSSxFQUFFLFdBQVcsRUFBRS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QUFNLE1BQU0sUUFBUSxDQUFDOzs7TUFHM0IsaUJBQWlCLEdBQUcsTUFBTTtBQUdoQyxNQUFNLE9BQU8sVUFBVTs7Ozs7O0lBQ3JCLFNBQVMsQ0FBQyxLQUFvQixFQUFFLE1BQWM7UUFDNUMsT0FBTyxpQkFBaUIsQ0FBQyxLQUFLLENBQUMsQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUM7SUFDakQsQ0FBQzs7O1lBSkYsSUFBSSxTQUFDLEVBQUUsSUFBSSxFQUFFLFVBQVUsRUFBRSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFBpcGUsIFBpcGVUcmFuc2Zvcm0gfSBmcm9tICdAYW5ndWxhci9jb3JlJztcclxuaW1wb3J0ICogYXMgbW9tZW50IGZyb20gJ21vbWVudCc7XHJcblxyXG4vLyB1bmRlciBzeXN0ZW1qcywgbW9tZW50IGlzIGFjdHVhbGx5IGV4cG9ydGVkIGFzIHRoZSBkZWZhdWx0IGV4cG9ydCwgc28gd2UgYWNjb3VudCBmb3IgdGhhdFxyXG5jb25zdCBtb21lbnRDb25zdHJ1Y3RvciA9IG1vbWVudDtcclxuXHJcbkBQaXBlKHsgbmFtZTogJ2FtTG9jYWxlJyB9KVxyXG5leHBvcnQgY2xhc3MgTG9jYWxlUGlwZSBpbXBsZW1lbnRzIFBpcGVUcmFuc2Zvcm0ge1xyXG4gIHRyYW5zZm9ybSh2YWx1ZTogc3RyaW5nIHwgRGF0ZSwgbG9jYWxlOiBzdHJpbmcpOiBtb21lbnQuTW9tZW50IHtcclxuICAgIHJldHVybiBtb21lbnRDb25zdHJ1Y3Rvcih2YWx1ZSkubG9jYWxlKGxvY2FsZSk7XHJcbiAgfVxyXG59XHJcbiJdfQ== |
@@ -12,7 +12,7 @@ /** | ||
* @param {?} value | ||
* @param {?} format | ||
* @param {?} formats | ||
* @return {?} | ||
*/ | ||
transform(value, format) { | ||
return momentConstructor(value, format); | ||
transform(value, formats) { | ||
return mom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15 @@ /** | ||
/** | ||
* @param {?} m | ||
* @return {?} | ||
*/ | ||
format(m) { | ||
return m.from(momentConstructor(), this.lastOmitSuffix); | ||
} | ||
/** | ||
* @param {?} value | ||
* @param {?=} omitSuffix | ||
* @param {?=} formatFn | ||
* @return {?} | ||
*/ | ||
transform(value, omitSuffix) { | ||
transform(value, omitSuffix, formatFn) { | ||
if (this.hasChanged(value, omitSuffix)) { | ||
@@ -31,5 +39,6 @@ this.lastTime = this.getTime(value); | ||
this.lastLocale = this.getLocale(value); | ||
this.formatFn = formatFn || this.format.bind(this); | ||
this.removeTimer(); | ||
this.createTimer(); | ||
this.lastText = momentConstructor(value).from(momentConstructor(), omitSuffix); | ||
this.lastText = this.formatFn(momentConstructor(value)); | ||
} | ||
@@ -61,3 +70,3 @@ else { | ||
return window.setTimeout(() => { | ||
this.lastText = momentConstructor(this.lastValue).from(momentConstructor(), this.lastOmitSuffix); | ||
this.lastText = this.formatFn(momentConstructor(this.lastValue)); | ||
this.currentTimer = null; | ||
@@ -156,2 +165,4 @@ this.ngZone.run(() => this.cdRef.markForCheck()); | ||
/** @type {?} */ | ||
TimeAgoPipe.prototype.formatFn; | ||
/** @type {?} */ | ||
TimeAgoPipe.prototype.cdRef; | ||
@@ -161,2 +172,2 @@ /** @type {?} */ | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZS1hZ28ucGlwZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1tb21lbnQvIiwic291cmNlcyI6WyJ0aW1lLWFnby5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBRUEsT0FBTyxFQUFDLElBQUksRUFBRSxpQkFBaUIsRUFBNEIsTUFBTSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ3hGLE9BQU8sS0FBSyxNQUFNLE1BQU0sUUFBUSxDQUFDOztNQUUzQixpQkFBaUIsR0FBRyxNQUFNO0FBR2hD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mlzRGF0ZSh2YWx1ZSkpIHtcclxuICAgICAgcmV0dXJuIHZhbHVlLmdldFRpbWUoKTtcclxuICAgIH0gZWxzZSBpZiAobW9tZW50LmlzTW9tZW50KHZhbHVlKSkge1xyXG4gICAgICByZXR1cm4gdmFsdWUudmFsdWVPZigpO1xyXG4gICAgfSBlbHNlIHtcclxuICAgICAgcmV0dXJuIG1vbWVudENvbnN0cnVjdG9yKHZhbHVlKS52YWx1ZU9mKCk7XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICBwcml2YXRlIGdldExvY2FsZSh2YWx1ZTogbW9tZW50Lk1vbWVudElucHV0KTogc3RyaW5nIHwgbnVsbCB7XHJcbiAgICByZXR1cm4gbW9tZW50LmlzTW9tZW50KHZhbHVlKSA/IHZhbHVlLmxvY2FsZSgpIDogbW9tZW50LmxvY2FsZSgpO1xyXG4gIH1cclxufVxyXG4iXX0= |
@@ -13,2 +13,3 @@ /** | ||
* @param {?} value | ||
* @param {?=} formats | ||
* @param {...?} args | ||
@@ -19,11 +20,12 @@ * @return {?} | ||
* @param {?} value | ||
* @param {?=} formats | ||
* @param {...?} args | ||
* @return {?} | ||
*/ | ||
function (value) { | ||
function (value, formats) { | ||
var args = []; | ||
for (var _i = 1; _i < arguments.length; _i++) { | ||
args[_i - 1] = arguments[_i]; | ||
for (var _i = 2; _i < arguments.length; _i++) { | ||
args[_i - 2] = arguments[_i]; | ||
} | ||
return moment.utc(value); | ||
return formats ? moment.utc(value, formats) : moment.utc(value); | ||
}; | ||
@@ -36,2 +38,2 @@ FromUtcPipe.decorators = [ | ||
export { FromUtcPipe }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbS11dGMucGlwZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1tb21lbnQvIiwic291cmNlcyI6WyJmcm9tLXV0Yy5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBRUEsT0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Zyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5pbXBvcnQgKiBhcyBtb21lbnQgZnJvbSAnbW9tZW50JztcclxuXHJcbi8vIHVuZGVyIHN5c3RlbWpzLCBtb21lbnQgaXMgYWN0dWFsbHkgZXhwb3J0ZWQgYXMgdGhlIGRlZmF1bHQgZXhwb3J0LCBzbyB3ZSBhY2NvdW50IGZvciB0aGF0XHJcbmNvbnN0IG1vbWVudENvbnN0cnVjdG9yID0gbW9tZW50O1xyXG5cclxuQFBpcGUoeyBuYW1lOiAnYW1Mb2NhbGUnIH0pXHJcbmV4cG9ydCBjbGFzcyBMb2NhbGVQaXBlIGltcGxlbWVudHMgUGlwZVRyYW5zZm9ybSB7XHJcbiAgdHJhbnNmb3JtKHZhbHVlOiBzdHJpbmcgfCBEYXRlLCBsb2NhbGU6IHN0cmluZyk6IG1vbWVudC5Nb21lbnQge1xyXG4gICAgcmV0dXJuIG1vbWVudENvbnN0cnVjdG9yKHZhbHVlKS5sb2NhbGUobG9jYWxlKTtcclxuICB9XHJcbn1cclxuIl19 |
@@ -14,3 +14,3 @@ /** | ||
* @param {?} value | ||
* @param {?} format | ||
* @param {?} formats | ||
* @return {?} | ||
@@ -20,7 +20,7 @@ */ | ||
* @param {?} value | ||
* @param {?} format | ||
* @param {?} formats | ||
* @return {?} | ||
*/ | ||
function (value, format) { | ||
return momentConstructor(value, format); | ||
function (value, formats) { | ||
return momentConstructor(value, formats); | ||
}; | ||
@@ -33,2 +33,2 @@ ParsePipe.decorators = [ | ||
export { ParsePipe }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyc2UucGlwZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1tb21lbnQvIiwic291cmNlcyI6WyJwYXJzZS5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFpQixNQUFNLGVBQWUsQ0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QUFpQixNQUFNLGVBQWUsQ0FBQztBQUNwRCxPQUFPLEtBQUssTUFBTSxNQUFNLFFBQVEsQ0FBQzs7SUFFM0IsaUJBQWlCLEdBQUcsTUFBTTtBQUVoQztJQUFBO0lBS0EsQ0FBQzs7Ozs7O0lBSEMsNkJBQVM7Ozs7O0lBQVQsVUFBVSxLQUFhLEVBQUUsT0FBd0I7UUFDL0MsT0FBTyxpQkFBaUIsQ0FBQyxLQUFLLEVBQUUsT0FBTyxDQUFDLENBQUM7SUFDM0MsQ0FBQzs7Z0JBSkYsSUFBSSxTQUFDLEVBQUUsSUFBSSxFQUFFLFNBQVMsRUFBRTs7SUFLekIsZ0JBQUM7Q0FBQSxBQUxELElBS0M7U0FKWSxTQUFTIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUGlwZSwgUGlwZVRyYW5zZm9ybSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5pbXBvcnQgKiBhcyBtb21lbnQgZnJvbSAnbW9tZW50JztcclxuXHJcbmNvbnN0IG1vbWVudENvbnN0cnVjdG9yID0gbW9tZW50O1xyXG5cclxuQFBpcGUoeyBuYW1lOiAnYW1QYXJzZScgfSlcclxuZXhwb3J0IGNsYXNzIFBhcnNlUGlwZSBpbXBsZW1lbnRzIFBpcGVUcmFuc2Zvcm0ge1xyXG4gIHRyYW5zZm9ybSh2YWx1ZTogc3RyaW5nLCBmb3JtYXRzOiBzdHJpbmd8c3RyaW5nW10pOiBtb21lbnQuTW9tZW50IHtcclxuICAgIHJldHVybiBtb21lbnRDb25zdHJ1Y3Rvcih2YWx1ZSwgZm9ybWF0cyk7XHJcbiAgfVxyXG59XHJcbiJdfQ== |
@@ -16,4 +16,16 @@ /** | ||
/** | ||
* @param {?} m | ||
* @return {?} | ||
*/ | ||
TimeAgoPipe.prototype.format = /** | ||
* @param {?} m | ||
* @return {?} | ||
*/ | ||
function (m) { | ||
return m.from(momentConstructor(), this.lastOmitSuffix); | ||
}; | ||
/** | ||
* @param {?} value | ||
* @param {?=} omitSuffix | ||
* @param {?=} formatFn | ||
* @return {?} | ||
@@ -24,5 +36,6 @@ */ | ||
* @param {?=} omitSuffix | ||
* @param {?=} formatFn | ||
* @return {?} | ||
*/ | ||
function (value, omitSuffix) { | ||
function (value, omitSuffix, formatFn) { | ||
if (this.hasChanged(value, omitSuffix)) { | ||
@@ -33,5 +46,6 @@ this.lastTime = this.getTime(value); | ||
this.lastLocale = this.getLocale(value); | ||
this.formatFn = formatFn || this.format.bind(this); | ||
this.removeTimer(); | ||
this.createTimer(); | ||
this.lastText = momentConstructor(value).from(momentConstructor(), omitSuffix); | ||
this.lastText = this.formatFn(momentConstructor(value)); | ||
} | ||
@@ -70,3 +84,3 @@ else { | ||
return window.setTimeout(function () { | ||
_this.lastText = momentConstructor(_this.lastValue).from(momentConstructor(), _this.lastOmitSuffix); | ||
_this.lastText = _this.formatFn(momentConstructor(_this.lastValue)); | ||
_this.currentTimer = null; | ||
@@ -187,2 +201,4 @@ _this.ngZone.run(function () { return _this.cdRef.markForCheck(); }); | ||
/** @type {?} */ | ||
TimeAgoPipe.prototype.formatFn; | ||
/** @type {?} */ | ||
TimeAgoPipe.prototype.cdRef; | ||
@@ -192,2 +208,2 @@ /** @type {?} */ | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZS1hZ28ucGlwZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1tb21lbnQvIiwic291cmNlcyI6WyJ0aW1lLWFnby5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBRUEsT0FBTyxFQUFDLElBQUksRUFBRSxpQkFBaUIsRUFBNEIsTUFBTSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ3hGLE9BQU8sS0FBSyxNQUFNLE1BQU0sUUFBUSxDQUFDOztJQUUzQixpQkFBaUIsR0FBRyxNQUFNO0FBRWhDO0lBVUUscUJBQW9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lzLmxhc3RUaW1lXHJcbiAgICAgIHx8IHRoaXMuZ2V0TG9jYWxlKHZhbHVlKSAhPT0gdGhpcy5sYXN0TG9jYWxlXHJcbiAgICAgIHx8IG9taXRTdWZmaXggIT09IHRoaXMubGFzdE9taXRTdWZmaXg7XHJcbiAgfVxyXG5cclxuICBwcml2YXRlIGdldFRpbWUodmFsdWU6IG1vbWVudC5Nb21lbnRJbnB1dCk6IG51bWJlciB7XHJcbiAgICBpZiAobW9tZW50LmlzRGF0ZSh2YWx1ZSkpIHtcclxuICAgICAgcmV0dXJuIHZhbHVlLmdldFRpbWUoKTtcclxuICAgIH0gZWxzZSBpZiAobW9tZW50LmlzTW9tZW50KHZhbHVlKSkge1xyXG4gICAgICByZXR1cm4gdmFsdWUudmFsdWVPZigpO1xyXG4gICAgfSBlbHNlIHtcclxuICAgICAgcmV0dXJuIG1vbWVudENvbnN0cnVjdG9yKHZhbHVlKS52YWx1ZU9mKCk7XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICBwcml2YXRlIGdldExvY2FsZSh2YWx1ZTogbW9tZW50Lk1vbWVudElucHV0KTogc3RyaW5nIHwgbnVsbCB7XHJcbiAgICByZXR1cm4gbW9tZW50LmlzTW9tZW50KHZhbHVlKSA/IHZhbHVlLmxvY2FsZSgpIDogbW9tZW50LmxvY2FsZSgpO1xyXG4gIH1cclxufVxyXG4iXX0= |
import { Pipe, ChangeDetectorRef, EventEmitter, NgZone, InjectionToken, Inject, Optional, NgModule } from '@angular/core'; | ||
import * as moment from 'moment'; | ||
import { duration, relativeTimeThreshold, isMoment, unix, isDate, locale, utc, parseZone } from 'moment'; | ||
import { duration, relativeTimeThreshold, unix, utc, parseZone, isMoment, isDate, locale } from 'moment'; | ||
@@ -283,7 +283,7 @@ /** | ||
* @param {?} value | ||
* @param {?} format | ||
* @param {?} formats | ||
* @return {?} | ||
*/ | ||
transform(value, format) { | ||
return momentConstructor$4(value, format); | ||
transform(value, formats) { | ||
return momentConstructor$4(value, formats); | ||
} | ||
@@ -302,7 +302,8 @@ } | ||
* @param {?} value | ||
* @param {?=} formats | ||
* @param {...?} args | ||
* @return {?} | ||
*/ | ||
transform(value, ...args) { | ||
return utc(value); | ||
transform(value, formats, ...args) { | ||
return formats ? utc(value, formats) : utc(value); | ||
} | ||
@@ -457,7 +458,15 @@ } | ||
/** | ||
* @param {?} m | ||
* @return {?} | ||
*/ | ||
format(m) { | ||
return m.from(momentConstructor$a(), this.lastOmitSuffix); | ||
} | ||
/** | ||
* @param {?} value | ||
* @param {?=} omitSuffix | ||
* @param {?=} formatFn | ||
* @return {?} | ||
*/ | ||
transform(value, omitSuffix) { | ||
transform(value, omitSuffix, formatFn) { | ||
if (this.hasChanged(value, omitSuffix)) { | ||
@@ -468,5 +477,6 @@ this.lastTime = this.getTime(value); | ||
this.lastLocale = this.getLocale(value); | ||
this.formatFn = formatFn || this.format.bind(this); | ||
this.removeTimer(); | ||
this.createTimer(); | ||
this.lastText = momentConstructor$a(value).from(momentConstructor$a(), omitSuffix); | ||
this.lastText = this.formatFn(momentConstructor$a(value)); | ||
} | ||
@@ -498,3 +508,3 @@ else { | ||
return window.setTimeout(() => { | ||
this.lastText = momentConstructor$a(this.lastValue).from(momentConstructor$a(), this.lastOmitSuffix); | ||
this.lastText = this.formatFn(momentConstructor$a(this.lastValue)); | ||
this.currentTimer = null; | ||
@@ -657,2 +667,2 @@ this.ngZone.run(() => this.cdRef.markForCheck()); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LW1vbWVudC5qcy5tYXAiLCJzb3VyY2VzIjpbIm5nOi8vbmd4LW1vbWVudC9hZGQucGlwZS50cyIsIm5nOi8vbmd4LW1vbWVudC9jYWxlbmRhci5waXBlLnRzIiwibmc6Ly9uZ3gtbW9tZW50L2RhdGUtZm9ybWF0LnBpcGUudHMiLCJuZzovL25neC1tb21lbnQvZGlmZmVyZW5jZS5waXBlLnRzIiwibmc6Ly9uZ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FBYztJQUNkLGNBQWM7SUFDZCxZQUFZO0lBQ1osWUFBWTtJQUNaLFNBQVM7SUFDVCxZQUFZO0lBQ1osV0FBVztJQUNYLE9BQU87SUFDUCxXQUFXO0lBQ1gsYUFBYTtJQUNiLFVBQVU7SUFDVixhQUFhO0lBQ2IsWUFBWTtJQUNaLFdBQVc7Q0FDWjtBQU1ELE1BQWEsWUFBWTs7Ozs7SUFDdkIsT0FBTyxPQUFPLENBQUMsT0FBMEI7UUFDdkMsT0FBTztZQUNMLFFBQVEsRUFBRSxZQUFZO1lBQ3RCLFNBQVMsRUFBRTtnQkFDVDtvQkFDRSxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsUUFBUSxvQkFDaEMsT0FBTyxDQUNYO2lCQUNGO2FBQ0Y7U0FDRixDQUFDO0tBQ0g7OztZQWhCRixRQUFRLFNBQUM7Z0JBQ1IsWUFBWSxFQUFFLG9CQUFvQjtnQkFDbEMsT0FBTyxFQUFFLG9CQUFvQjthQUM5Qjs7Ozs7Ozs7Ozs7Ozs7OyJ9 |
import { Pipe, ChangeDetectorRef, EventEmitter, NgZone, InjectionToken, Inject, Optional, NgModule } from '@angular/core'; | ||
import * as moment from 'moment'; | ||
import { isMoment, duration, relativeTimeThreshold, unix, utc, isDate, locale, parseZone } from 'moment'; | ||
import { unix, duration, relativeTimeThreshold, utc, parseZone, isMoment, isDate, locale } from 'moment'; | ||
import { __assign } from 'tslib'; | ||
@@ -361,3 +361,3 @@ | ||
* @param {?} value | ||
* @param {?} format | ||
* @param {?} formats | ||
* @return {?} | ||
@@ -367,7 +367,7 @@ */ | ||
* @param {?} value | ||
* @param {?} format | ||
* @param {?} formats | ||
* @return {?} | ||
*/ | ||
function (value, format) { | ||
return momentConstructor$4(value, format); | ||
function (value, formats) { | ||
return momentConstructor$4(value, formats); | ||
}; | ||
@@ -389,2 +389,3 @@ ParsePipe.decorators = [ | ||
* @param {?} value | ||
* @param {?=} formats | ||
* @param {...?} args | ||
@@ -395,11 +396,12 @@ * @return {?} | ||
* @param {?} value | ||
* @param {?=} formats | ||
* @param {...?} args | ||
* @return {?} | ||
*/ | ||
function (value) { | ||
function (value, formats) { | ||
var args = []; | ||
for (var _i = 1; _i < arguments.length; _i++) { | ||
args[_i - 1] = arguments[_i]; | ||
for (var _i = 2; _i < arguments.length; _i++) { | ||
args[_i - 2] = arguments[_i]; | ||
} | ||
return utc(value); | ||
return formats ? utc(value, formats) : utc(value); | ||
}; | ||
@@ -600,4 +602,16 @@ FromUtcPipe.decorators = [ | ||
/** | ||
* @param {?} m | ||
* @return {?} | ||
*/ | ||
TimeAgoPipe.prototype.format = /** | ||
* @param {?} m | ||
* @return {?} | ||
*/ | ||
function (m) { | ||
return m.from(momentConstructor$a(), this.lastOmitSuffix); | ||
}; | ||
/** | ||
* @param {?} value | ||
* @param {?=} omitSuffix | ||
* @param {?=} formatFn | ||
* @return {?} | ||
@@ -608,5 +622,6 @@ */ | ||
* @param {?=} omitSuffix | ||
* @param {?=} formatFn | ||
* @return {?} | ||
*/ | ||
function (value, omitSuffix) { | ||
function (value, omitSuffix, formatFn) { | ||
if (this.hasChanged(value, omitSuffix)) { | ||
@@ -617,5 +632,6 @@ this.lastTime = this.getTime(value); | ||
this.lastLocale = this.getLocale(value); | ||
this.formatFn = formatFn || this.format.bind(this); | ||
this.removeTimer(); | ||
this.createTimer(); | ||
this.lastText = momentConstructor$a(value).from(momentConstructor$a(), omitSuffix); | ||
this.lastText = this.formatFn(momentConstructor$a(value)); | ||
} | ||
@@ -654,3 +670,3 @@ else { | ||
return window.setTimeout(function () { | ||
_this.lastText = momentConstructor$a(_this.lastValue).from(momentConstructor$a(), _this.lastOmitSuffix); | ||
_this.lastText = _this.formatFn(momentConstructor$a(_this.lastValue)); | ||
_this.currentTimer = null; | ||
@@ -848,2 +864,2 @@ _this.ngZone.run(function () { return _this.cdRef.markForCheck(); }); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjo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M7Q0FqQkQ7Ozs7Ozs7Ozs7Ozs7OyJ9 | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LW1vbWVudC5qcy5tYXAiLCJzb3VyY2VzIjpbIm5nOi8vbmd4LW1vbWVudC9hZGQucGlwZS50cyIsIm5nOi8vbmd4LW1vbWVudC9jYWxlbmRhci5waXBlLnRzIiwibmc6Ly9uZ3gtbW9tZW50L2RhdGUtZm9ybWF0LnBpcGUudHMiLCJuZzovL25neC1tb21lbnQvZGlmZmVyZW5jZS5waXBlLnRzIiwibmc6Ly9uZ3gtbW9tZW50L21vbWVudC1vcHRpb25zLnRzIiwibmc6Ly9uZ3gtbW9tZW50L2R1cmF0aW9uLnBpcGUudHMiLCJuZzovL25neC1tb21lbnQvZnJvbS11bml4LnBpcGUudHMiLCJuZzovL25neC1tb21lbnQvcGFyc2UucGlwZS50cyIsIm5nOi8vbmd4LW1vbWVudC9mcm9tLXV0Yy5waXBlLnRzIiwibmc6Ly9uZ3gtbW9tZW50L2lzLWFmdGVyLnBpcGUudHMiLCJuZzovL25neC1tb21lbnQvaXMtYmVmb3JlLnBpcGUudHMiLCJuZzovL25neC1tb21lbnQvbG9jYWwucGlwZS50cyIsIm5nOi8vbmd4LW1vbWVudC9sb2NhbGUucGlwZS50cyIsIm5nOi8vbmd4LW1vbWVudC9wYXJzZS16b25lLnBpcGUudHMiLCJuZzovL25neC1tb21lbnQvc3VidHJhY3QucGlwZS50cyIsIm5nOi8vbmd4LW1vbWVudC90aW1lLWFnby5waXBlLnRzIiwibmc6Ly9uZ3gtbW9tZW50L3V0Yy5waXBlLnRzIiwibmc6Ly9uZ3gtbW9tZW50L21vbWVudC5tb2R1bGUudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogbmd4LW1vbWVudCAoYykgMjAxNSwgMjAxNiBVcmkgU2hha2VkIC8gTUlUIExpY2VuY2UgKi9cclxuXHJcbmltcG9ydCB7UGlwZSwg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DO1FBQ3JELE9BQU9BLG1CQUFpQixDQUFDLEtBQUssQ0FBQyxDQUFDLEdBQUcsRUFBRSxDQUFDO0tBQ3ZDOztnQkFKRixJQUFJLFNBQUMsRUFBRSxJQUFJLEVBQUUsT0FBTyxFQUFFOztJQUt2QixjQUFDO0NBTEQ7Ozs7Ozs7SUNlTSxvQkFBb0IsR0FBRztJQUMzQixPQUFPO0lBQ1AsWUFBWTtJQUNaLGNBQWM7SUFDZCxjQUFjO0lBQ2QsWUFBWTtJQUNaLFlBQVk7SUFDWixTQUFTO0lBQ1QsWUFBWTtJQUNaLFdBQVc7SUFDWCxPQUFPO0lBQ1AsV0FBVztJQUNYLGFBQWE7SUFDYixVQUFVO0lBQ1YsYUFBYTtJQUNiLFlBQVk7SUFDWixXQUFXO0NBQ1o7QUFFRDtJQUFBO0tBaUJDOzs7OztJQVpRLG9CQUFPOzs7O0lBQWQsVUFBZSxPQUEwQjtRQUN2QyxPQUFPO1lBQ0wsUUFBUSxFQUFFLFlBQVk7WUFDdEIsU0FBUyxFQUFFO2dCQUNUO29CQUNFLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxRQUFRLGVBQ2hDLE9BQU8sQ0FDWDtpQkFDRjthQUNGO1NBQ0YsQ0FBQztLQUNIOztnQkFoQkYsUUFBUSxTQUFDO29CQUNSLFlBQVksRUFBRSxvQkFBb0I7b0JBQ2xDLE9BQU8sRUFBRSxvQkFBb0I7aUJBQzlCOztJQWNELG1CQUFDO0NBakJEOzs7Ozs7Ozs7Ozs7OzsifQ== |
import { PipeTransform } from '@angular/core'; | ||
export declare class FromUtcPipe implements PipeTransform { | ||
transform(value: any, ...args: string[]): any; | ||
transform(value: any, formats?: string | string[], ...args: string[]): any; | ||
} |
import { PipeTransform } from '@angular/core'; | ||
import * as moment from 'moment'; | ||
export declare class LocalePipe implements PipeTransform { | ||
transform(value: string, locale: string): moment.Moment; | ||
transform(value: string | Date, locale: string): moment.Moment; | ||
} |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"AddPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":7,"character":1},"arguments":[{"name":"amAdd"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"CalendarPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":8,"character":1},"arguments":[{"name":"amCalendar","pure":false}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":21,"character":29},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":21,"character":64}]}],"transform":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]},"statics":{"refs":0,"timer":null,"midnight":null}},"DateFormatPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":7,"character":1},"arguments":[{"name":"amDateFormat"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"DifferencePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":7,"character":1},"arguments":[{"name":"amDifference"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"DurationPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":5,"character":1},"arguments":[{"name":"amDuration"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":10,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":10,"character":27},"arguments":[{"__symbolic":"reference","name":"NGX_MOMENT_OPTIONS"}]}]],"parameters":[{"__symbolic":"reference","name":"NgxMomentOptions"}]}],"transform":[{"__symbolic":"method"}],"_applyOptions":[{"__symbolic":"method"}]}},"FromUnixPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":5,"character":1},"arguments":[{"name":"amFromUnix"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"ParsePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":5,"character":1},"arguments":[{"name":"amParse"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"MomentModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":39,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"AddPipe"},{"__symbolic":"reference","name":"CalendarPipe"},{"__symbolic":"reference","name":"DateFormatPipe"},{"__symbolic":"reference","name":"DifferencePipe"},{"__symbolic":"reference","name":"DurationPipe"},{"__symbolic":"reference","name":"FromUnixPipe"},{"__symbolic":"reference","name":"ParsePipe"},{"__symbolic":"reference","name":"SubtractPipe"},{"__symbolic":"reference","name":"TimeAgoPipe"},{"__symbolic":"reference","name":"UtcPipe"},{"__symbolic":"reference","name":"FromUtcPipe"},{"__symbolic":"reference","name":"LocalTimePipe"},{"__symbolic":"reference","name":"LocalePipe"},{"__symbolic":"reference","name":"ParseZonePipe"},{"__symbolic":"reference","name":"IsBeforePipe"},{"__symbolic":"reference","name":"IsAfterPipe"}],"exports":[{"__symbolic":"reference","name":"AddPipe"},{"__symbolic":"reference","name":"CalendarPipe"},{"__symbolic":"reference","name":"DateFormatPipe"},{"__symbolic":"reference","name":"DifferencePipe"},{"__symbolic":"reference","name":"DurationPipe"},{"__symbolic":"reference","name":"FromUnixPipe"},{"__symbolic":"reference","name":"ParsePipe"},{"__symbolic":"reference","name":"SubtractPipe"},{"__symbolic":"reference","name":"TimeAgoPipe"},{"__symbolic":"reference","name":"UtcPipe"},{"__symbolic":"reference","name":"FromUtcPipe"},{"__symbolic":"reference","name":"LocalTimePipe"},{"__symbolic":"reference","name":"LocalePipe"},{"__symbolic":"reference","name":"ParseZonePipe"},{"__symbolic":"reference","name":"IsBeforePipe"},{"__symbolic":"reference","name":"IsAfterPipe"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["options"],"value":{"ngModule":{"__symbolic":"reference","name":"MomentModule"},"providers":[{"provide":{"__symbolic":"reference","name":"NGX_MOMENT_OPTIONS"},"useValue":{}}]}}}},"SubtractPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":7,"character":1},"arguments":[{"name":"amSubtract"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"TimeAgoPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":7,"character":1},"arguments":[{"name":"amTimeAgo","pure":false}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":17,"character":29},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":17,"character":64}]}],"transform":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"createTimer":[{"__symbolic":"method"}],"removeTimer":[{"__symbolic":"method"}],"getSecondsUntilUpdate":[{"__symbolic":"method"}],"hasChanged":[{"__symbolic":"method"}],"getTime":[{"__symbolic":"method"}],"getLocale":[{"__symbolic":"method"}]}},"UtcPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":5,"character":1},"arguments":[{"name":"amUtc"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"FromUtcPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":5,"character":1},"arguments":[{"name":"amFromUtc"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"LocalTimePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":5,"character":1},"arguments":[{"name":"amLocal"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"LocalePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":6,"character":1},"arguments":[{"name":"amLocale"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"ParseZonePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":3,"character":1},"arguments":[{"name":"amParseZone"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"IsBeforePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":6,"character":1},"arguments":[{"name":"amIsBefore"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"IsAfterPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":6,"character":1},"arguments":[{"name":"amIsAfter"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"NgxMomentOptions":{"__symbolic":"interface"},"NGX_MOMENT_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":72},"arguments":["NGX_MOMENT_OPTIONS"]}},"origins":{"AddPipe":"./add.pipe","CalendarPipe":"./calendar.pipe","DateFormatPipe":"./date-format.pipe","DifferencePipe":"./difference.pipe","DurationPipe":"./duration.pipe","FromUnixPipe":"./from-unix.pipe","ParsePipe":"./parse.pipe","MomentModule":"./moment.module","SubtractPipe":"./subtract.pipe","TimeAgoPipe":"./time-ago.pipe","UtcPipe":"./utc.pipe","FromUtcPipe":"./from-utc.pipe","LocalTimePipe":"./local.pipe","LocalePipe":"./locale.pipe","ParseZonePipe":"./parse-zone.pipe","IsBeforePipe":"./is-before.pipe","IsAfterPipe":"./is-after.pipe","NgxMomentOptions":"./moment-options","NGX_MOMENT_OPTIONS":"./moment-options"},"importAs":"ngx-moment"} | ||
{"__symbolic":"module","version":4,"metadata":{"AddPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":7,"character":1},"arguments":[{"name":"amAdd"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"CalendarPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":8,"character":1},"arguments":[{"name":"amCalendar","pure":false}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":21,"character":29},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":21,"character":64}]}],"transform":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]},"statics":{"refs":0,"timer":null,"midnight":null}},"DateFormatPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":7,"character":1},"arguments":[{"name":"amDateFormat"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"DifferencePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":7,"character":1},"arguments":[{"name":"amDifference"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"DurationPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":5,"character":1},"arguments":[{"name":"amDuration"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":10,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":10,"character":27},"arguments":[{"__symbolic":"reference","name":"NGX_MOMENT_OPTIONS"}]}]],"parameters":[{"__symbolic":"reference","name":"NgxMomentOptions"}]}],"transform":[{"__symbolic":"method"}],"_applyOptions":[{"__symbolic":"method"}]}},"FromUnixPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":5,"character":1},"arguments":[{"name":"amFromUnix"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"ParsePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":5,"character":1},"arguments":[{"name":"amParse"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"MomentModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":39,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"AddPipe"},{"__symbolic":"reference","name":"CalendarPipe"},{"__symbolic":"reference","name":"DateFormatPipe"},{"__symbolic":"reference","name":"DifferencePipe"},{"__symbolic":"reference","name":"DurationPipe"},{"__symbolic":"reference","name":"FromUnixPipe"},{"__symbolic":"reference","name":"ParsePipe"},{"__symbolic":"reference","name":"SubtractPipe"},{"__symbolic":"reference","name":"TimeAgoPipe"},{"__symbolic":"reference","name":"UtcPipe"},{"__symbolic":"reference","name":"FromUtcPipe"},{"__symbolic":"reference","name":"LocalTimePipe"},{"__symbolic":"reference","name":"LocalePipe"},{"__symbolic":"reference","name":"ParseZonePipe"},{"__symbolic":"reference","name":"IsBeforePipe"},{"__symbolic":"reference","name":"IsAfterPipe"}],"exports":[{"__symbolic":"reference","name":"AddPipe"},{"__symbolic":"reference","name":"CalendarPipe"},{"__symbolic":"reference","name":"DateFormatPipe"},{"__symbolic":"reference","name":"DifferencePipe"},{"__symbolic":"reference","name":"DurationPipe"},{"__symbolic":"reference","name":"FromUnixPipe"},{"__symbolic":"reference","name":"ParsePipe"},{"__symbolic":"reference","name":"SubtractPipe"},{"__symbolic":"reference","name":"TimeAgoPipe"},{"__symbolic":"reference","name":"UtcPipe"},{"__symbolic":"reference","name":"FromUtcPipe"},{"__symbolic":"reference","name":"LocalTimePipe"},{"__symbolic":"reference","name":"LocalePipe"},{"__symbolic":"reference","name":"ParseZonePipe"},{"__symbolic":"reference","name":"IsBeforePipe"},{"__symbolic":"reference","name":"IsAfterPipe"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["options"],"value":{"ngModule":{"__symbolic":"reference","name":"MomentModule"},"providers":[{"provide":{"__symbolic":"reference","name":"NGX_MOMENT_OPTIONS"},"useValue":{}}]}}}},"SubtractPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":7,"character":1},"arguments":[{"name":"amSubtract"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"TimeAgoPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":7,"character":1},"arguments":[{"name":"amTimeAgo","pure":false}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":18,"character":29},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":18,"character":64}]}],"format":[{"__symbolic":"method"}],"transform":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"createTimer":[{"__symbolic":"method"}],"removeTimer":[{"__symbolic":"method"}],"getSecondsUntilUpdate":[{"__symbolic":"method"}],"hasChanged":[{"__symbolic":"method"}],"getTime":[{"__symbolic":"method"}],"getLocale":[{"__symbolic":"method"}]}},"UtcPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":5,"character":1},"arguments":[{"name":"amUtc"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"FromUtcPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":5,"character":1},"arguments":[{"name":"amFromUtc"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"LocalTimePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":5,"character":1},"arguments":[{"name":"amLocal"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"LocalePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":6,"character":1},"arguments":[{"name":"amLocale"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"ParseZonePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":3,"character":1},"arguments":[{"name":"amParseZone"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"IsBeforePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":6,"character":1},"arguments":[{"name":"amIsBefore"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"IsAfterPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":6,"character":1},"arguments":[{"name":"amIsAfter"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"NgxMomentOptions":{"__symbolic":"interface"},"NGX_MOMENT_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":72},"arguments":["NGX_MOMENT_OPTIONS"]}},"origins":{"AddPipe":"./add.pipe","CalendarPipe":"./calendar.pipe","DateFormatPipe":"./date-format.pipe","DifferencePipe":"./difference.pipe","DurationPipe":"./duration.pipe","FromUnixPipe":"./from-unix.pipe","ParsePipe":"./parse.pipe","MomentModule":"./moment.module","SubtractPipe":"./subtract.pipe","TimeAgoPipe":"./time-ago.pipe","UtcPipe":"./utc.pipe","FromUtcPipe":"./from-utc.pipe","LocalTimePipe":"./local.pipe","LocalePipe":"./locale.pipe","ParseZonePipe":"./parse-zone.pipe","IsBeforePipe":"./is-before.pipe","IsAfterPipe":"./is-after.pipe","NgxMomentOptions":"./moment-options","NGX_MOMENT_OPTIONS":"./moment-options"},"importAs":"ngx-moment"} |
{ | ||
"name": "ngx-moment", | ||
"version": "3.4.0", | ||
"version": "3.5.0", | ||
"description": "Moment.JS pipes for Angular (timeago and more)", | ||
@@ -5,0 +5,0 @@ "repository": { |
import { PipeTransform } from '@angular/core'; | ||
import * as moment from 'moment'; | ||
export declare class ParsePipe implements PipeTransform { | ||
transform(value: string, format: string): moment.Moment; | ||
transform(value: string, formats: string | string[]): moment.Moment; | ||
} |
@@ -83,3 +83,3 @@ # ngx-moment | ||
## amTimeAgo pipe | ||
Takes an optional `omitSuffix` argument that defaults to `false`. | ||
Takes an optional `omitSuffix` argument that defaults to `false` and another optional `formatFn` function which can be used to customise the format of the time ago text. | ||
@@ -182,2 +182,22 @@ ``` typescript | ||
The pipe can also accept an array of formats as parameter. | ||
``` typescript | ||
@Component({ | ||
selector: 'app', | ||
template: ` | ||
Last updated: {{'24/01/2014 22:00' | amParse: formats | amDateFormat:'LL'}} | ||
` | ||
}) | ||
export class App { | ||
formats: string[] = ['DD/MM/YYYY HH:mm:ss', 'DD/MM/YYYY HH:mm']; | ||
constructor() { } | ||
} | ||
``` | ||
Prints `Last updated: January 24, 2016` | ||
## amLocal pipe | ||
@@ -296,2 +316,33 @@ | ||
It's also possible to specify a different format than the standard ISO8601. | ||
``` typescript | ||
@Component({ | ||
selector: 'app', | ||
template: ` | ||
Last updated: {{ '31/12/2016 23:00-01:00' | amFromUtc: 'DD/MM/YYYY HH:mmZZ' | amDateFormat: 'YYYY-MM-DD' }} | ||
` | ||
}) | ||
``` | ||
Or even an array of formats: | ||
``` typescript | ||
@Component({ | ||
selector: 'app', | ||
template: ` | ||
Last updated: {{ '31/12/2016 23:00-01:00' | amFromUtc: formats | amDateFormat: 'YYYY-MM-DD' }} | ||
` | ||
}) | ||
export class App { | ||
formats: string[] = ['DD/MM/YYYY HH:mm:ss', 'DD/MM/YYYY HH:mmZZ']; | ||
constructor() { } | ||
} | ||
``` | ||
Both examples above will print `Last updated: 2017-01-01` | ||
## amUtc pipe | ||
@@ -298,0 +349,0 @@ |
@@ -12,4 +12,6 @@ import { ChangeDetectorRef, PipeTransform, OnDestroy, NgZone } from '@angular/core'; | ||
private lastText; | ||
private formatFn; | ||
constructor(cdRef: ChangeDetectorRef, ngZone: NgZone); | ||
transform(value: moment.MomentInput, omitSuffix?: boolean): string; | ||
format(m: moment.Moment): string; | ||
transform(value: moment.MomentInput, omitSuffix?: boolean, formatFn?: (m: moment.Moment) => string): string; | ||
ngOnDestroy(): void; | ||
@@ -16,0 +18,0 @@ private createTimer; |
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
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
507049
4297
449