ngx-moment
Version:
Moment.JS pipes for Angular (timeago and more)
1 lines • 25.8 kB
Source Map (JSON)
{"version":3,"file":"ngx-moment.mjs","sources":["../../../src/add.pipe.ts","../../../src/calendar.pipe.ts","../../../src/date-format.pipe.ts","../../../src/difference.pipe.ts","../../../src/moment-options.ts","../../../src/duration.pipe.ts","../../../src/from-unix.pipe.ts","../../../src/parse.pipe.ts","../../../src/from-utc.pipe.ts","../../../src/is-after.pipe.ts","../../../src/is-before.pipe.ts","../../../src/local.pipe.ts","../../../src/locale.pipe.ts","../../../src/parse-zone.pipe.ts","../../../src/subtract.pipe.ts","../../../src/time-ago.pipe.ts","../../../src/utc.pipe.ts","../../../src/moment.module.ts","../../../src/ngx-moment.ts"],"sourcesContent":["/* ngx-moment (c) 2015, 2016 Uri Shaked / MIT Licence */\n\nimport { Pipe, PipeTransform } from '@angular/core';\nimport moment from 'moment';\n\n@Pipe({ name: 'amAdd' })\nexport class AddPipe implements PipeTransform {\n transform(\n value: moment.MomentInput,\n amount: moment.DurationInputArg1,\n unit?: moment.DurationInputArg2,\n ): any {\n if (\n typeof amount === 'undefined' ||\n (typeof amount === 'number' && typeof unit === 'undefined')\n ) {\n throw new Error('AddPipe: missing required arguments');\n }\n return moment(value).add(amount, unit);\n }\n}\n","/* ngx-moment (c) 2015, 2016 Uri Shaked / MIT Licence */\n\nimport {\n Pipe,\n ChangeDetectorRef,\n PipeTransform,\n EventEmitter,\n OnDestroy,\n NgZone,\n} from '@angular/core';\nimport moment from 'moment';\nimport { Subscription } from 'rxjs';\n\n@Pipe({ name: 'amCalendar', pure: false })\nexport class CalendarPipe implements PipeTransform, OnDestroy {\n /**\n * Internal reference counter, so we can clean up when no instances are in use\n */\n private static refs = 0;\n\n private static timer: number | null = null;\n private static midnight: EventEmitter<Date> | null = null;\n\n private midnightSub: Subscription;\n\n constructor(private cdRef: ChangeDetectorRef, private ngZone: NgZone) {\n // using a single static timer for all instances of this pipe for performance reasons\n CalendarPipe.initTimer(ngZone);\n\n CalendarPipe.refs++;\n\n // values such as Today will need to be replaced with Yesterday after midnight,\n // so make sure we subscribe to an EventEmitter that we set up to emit at midnight\n this.midnightSub = CalendarPipe.midnight.subscribe(() => {\n this.ngZone.run(() => this.cdRef.markForCheck());\n });\n }\n\n transform(value: moment.MomentInput, ...args: any[]): any {\n let formats: any = null;\n let referenceTime: any = null;\n\n for (let i = 0, len = args.length; i < len; i++) {\n if (args[i] !== null) {\n if (typeof args[i] === 'object' && !moment.isMoment(args[i])) {\n formats = args[i];\n } else {\n referenceTime = moment(args[i]);\n }\n }\n }\n\n return moment(value).calendar(referenceTime, formats);\n }\n\n ngOnDestroy(): void {\n if (CalendarPipe.refs > 0) {\n CalendarPipe.refs--;\n }\n\n if (CalendarPipe.refs === 0) {\n CalendarPipe.removeTimer();\n }\n\n this.midnightSub.unsubscribe();\n }\n\n private static initTimer(ngZone: NgZone) {\n // initialize the timer\n if (!CalendarPipe.midnight) {\n CalendarPipe.midnight = new EventEmitter<Date>();\n if (typeof window !== 'undefined') {\n const timeToUpdate = CalendarPipe._getMillisecondsUntilUpdate();\n CalendarPipe.timer = ngZone.runOutsideAngular(() => {\n return window.setTimeout(() => {\n // emit the current date\n CalendarPipe.midnight.emit(new Date());\n\n // refresh the timer\n CalendarPipe.removeTimer();\n CalendarPipe.initTimer(ngZone);\n }, timeToUpdate);\n });\n }\n }\n }\n\n private static removeTimer() {\n if (CalendarPipe.timer) {\n window.clearTimeout(CalendarPipe.timer);\n CalendarPipe.timer = null;\n CalendarPipe.midnight = null;\n }\n }\n\n private static _getMillisecondsUntilUpdate() {\n const now = moment();\n const tomorrow = moment().startOf('day').add(1, 'days');\n const timeToMidnight = tomorrow.valueOf() - now.valueOf();\n return timeToMidnight + 1000; // 1 second after midnight\n }\n}\n","/* ngx-moment (c) 2015, 2016 Uri Shaked / MIT Licence */\n\nimport { Pipe, PipeTransform } from '@angular/core';\nimport moment from 'moment';\n\n@Pipe({ name: 'amDateFormat' })\nexport class DateFormatPipe implements PipeTransform {\n transform(value: moment.MomentInput, ...args: any[]): string {\n if (!value) {\n return '';\n }\n return moment(value).format(args[0]);\n }\n}\n","/* ngx-moment (c) 2015, 2016 Uri Shaked / MIT Licence */\n\nimport { Pipe, PipeTransform } from '@angular/core';\nimport moment from 'moment';\n\n@Pipe({ name: 'amDifference' })\nexport class DifferencePipe implements PipeTransform {\n transform(\n value: moment.MomentInput,\n otherValue: moment.MomentInput,\n unit?: moment.unitOfTime.Diff,\n precision?: boolean,\n ): number {\n const date = moment(value);\n const date2 = otherValue !== null ? moment(otherValue) : moment();\n\n return date.diff(date2, unit, precision);\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const NGX_MOMENT_OPTIONS: InjectionToken<NgxMomentOptions> = new InjectionToken<\n NgxMomentOptions\n>('NGX_MOMENT_OPTIONS');\n\nexport interface NgxMomentOptions {\n /**\n * relativeTimeThresholdOptions\n * @description Provides the `relativeTimeThreshold` units allowing a pipe to set the `moment.relativeTimeThreshold` values.\n * The `key` is a unit defined as one of `ss`, `s`, `m`, `h`, `d`, `M`.\n * @see https://momentjs.com/docs/#/customization/relative-time-threshold/\n * @example by default more than 45 seconds is considered a minute, more than 22 hours is considered a day and so on.\n * So settings the unit 'm' to `59` will adjust the `relativeTimeThreshold` and consider more than 59 minutes\n * to be an hour (default is `45 minutes`)\n */\n relativeTimeThresholdOptions: { [key: string]: number };\n}\n","import moment from 'moment';\n\nimport { Inject, Optional, Pipe, PipeTransform } from '@angular/core';\nimport { NGX_MOMENT_OPTIONS, NgxMomentOptions } from './moment-options';\n\n@Pipe({ name: 'amDuration' })\nexport class DurationPipe implements PipeTransform {\n allowedUnits: Array<string> = ['ss', 's', 'm', 'h', 'd', 'M'];\n\n constructor(@Optional() @Inject(NGX_MOMENT_OPTIONS) momentOptions?: NgxMomentOptions) {\n this._applyOptions(momentOptions);\n }\n\n transform(value: moment.DurationInputArg1, ...args: string[]): string {\n if (typeof args === 'undefined' || args.length !== 1) {\n throw new Error('DurationPipe: missing required time unit argument');\n }\n return moment.duration(value, args[0] as moment.unitOfTime.DurationConstructor).humanize();\n }\n\n private _applyOptions(momentOptions: NgxMomentOptions): void {\n if (!momentOptions) {\n return;\n }\n\n if (!!momentOptions.relativeTimeThresholdOptions) {\n const units: Array<string> = Object.keys(momentOptions.relativeTimeThresholdOptions);\n const filteredUnits: Array<string> = units.filter(\n (unit) => this.allowedUnits.indexOf(unit) !== -1,\n );\n filteredUnits.forEach((unit) => {\n moment.relativeTimeThreshold(unit, momentOptions.relativeTimeThresholdOptions[unit]);\n });\n }\n }\n}\n","/* ngx-moment (c) 2015, 2016 Uri Shaked / MIT Licence */\n\nimport { Pipe, PipeTransform } from '@angular/core';\nimport moment from 'moment';\n\n@Pipe({ name: 'amFromUnix' })\nexport class FromUnixPipe implements PipeTransform {\n transform(value: number | string, ...args: string[]): any {\n return typeof value === 'string' ? moment.unix(parseInt(value, 10)) : moment.unix(value);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport moment from 'moment';\n\n@Pipe({ name: 'amParse' })\nexport class ParsePipe implements PipeTransform {\n transform(value: moment.MomentInput, formats: string | string[]): moment.Moment {\n return moment(value, formats);\n }\n}\n","/* ngx-moment (c) 2015, 2016 Uri Shaked / MIT Licence */\n\nimport { Pipe, PipeTransform } from '@angular/core';\nimport moment from 'moment';\n\n@Pipe({ name: 'amFromUtc' })\nexport class FromUtcPipe implements PipeTransform {\n transform(value: moment.MomentInput, formats?: string | string[], ...args: string[]): any {\n return formats ? moment.utc(value, formats) : moment.utc(value);\n }\n}\n","import moment from 'moment';\n\nimport { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'amIsAfter',\n})\nexport class IsAfterPipe implements PipeTransform {\n transform(\n value: moment.MomentInput,\n otherValue: moment.MomentInput,\n unit?: moment.unitOfTime.StartOf,\n ): boolean {\n return moment(value).isAfter(moment(otherValue), unit);\n }\n}\n","import moment from 'moment';\n\nimport { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'amIsBefore',\n})\nexport class IsBeforePipe implements PipeTransform {\n transform(\n value: moment.MomentInput,\n otherValue: moment.MomentInput,\n unit?: moment.unitOfTime.StartOf,\n ): boolean {\n return moment(value).isBefore(moment(otherValue), unit);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport moment from 'moment';\n\n@Pipe({ name: 'amLocal' })\nexport class LocalTimePipe implements PipeTransform {\n transform(value: moment.MomentInput): moment.Moment {\n return moment(value).local();\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport moment from 'moment';\n\n@Pipe({ name: 'amLocale' })\nexport class LocalePipe implements PipeTransform {\n transform(value: moment.MomentInput, locale: string): moment.Moment {\n return moment(value).locale(locale);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport moment from 'moment';\n\n@Pipe({ name: 'amParseZone' })\nexport class ParseZonePipe implements PipeTransform {\n transform(value: moment.MomentInput): moment.Moment {\n return moment.parseZone(value);\n }\n}\n","/* ngx-moment (c) 2015, 2016 Uri Shaked / MIT Licence */\n\nimport { Pipe, PipeTransform } from '@angular/core';\nimport moment from 'moment';\n\n@Pipe({ name: 'amSubtract' })\nexport class SubtractPipe implements PipeTransform {\n transform(\n value: moment.MomentInput,\n amount: moment.DurationInputArg1,\n unit?: moment.DurationInputArg2,\n ): any {\n if (\n typeof amount === 'undefined' ||\n (typeof amount === 'number' && typeof unit === 'undefined')\n ) {\n throw new Error('SubtractPipe: missing required arguments');\n }\n return moment(value).subtract(amount, unit);\n }\n}\n","/* ngx-moment (c) 2015, 2016 Uri Shaked / MIT Licence */\n\nimport { Pipe, ChangeDetectorRef, PipeTransform, OnDestroy, NgZone } from '@angular/core';\nimport moment from 'moment';\n\n@Pipe({ name: 'amTimeAgo', pure: false })\nexport class TimeAgoPipe implements PipeTransform, OnDestroy {\n private currentTimer: number | null;\n\n private lastTime: Number;\n private lastValue: moment.MomentInput;\n private lastOmitSuffix: boolean;\n private lastLocale?: string;\n private lastText: string;\n private formatFn: (m: moment.Moment) => string;\n\n constructor(private cdRef: ChangeDetectorRef, private ngZone: NgZone) {}\n\n format(m: moment.Moment) {\n return m.from(moment(), this.lastOmitSuffix);\n }\n\n transform(\n value: moment.MomentInput,\n omitSuffix?: boolean,\n formatFn?: (m: moment.Moment) => string,\n ): string {\n if (this.hasChanged(value, omitSuffix)) {\n this.lastTime = this.getTime(value);\n this.lastValue = value;\n this.lastOmitSuffix = omitSuffix;\n this.lastLocale = this.getLocale(value);\n this.formatFn = formatFn || this.format.bind(this);\n this.removeTimer();\n this.createTimer();\n this.lastText = this.formatFn(moment(value));\n } else {\n this.createTimer();\n }\n\n return this.lastText;\n }\n\n ngOnDestroy(): void {\n this.removeTimer();\n }\n\n private createTimer() {\n if (this.currentTimer) {\n return;\n }\n\n const momentInstance = moment(this.lastValue);\n const timeToUpdate = this.getSecondsUntilUpdate(momentInstance) * 1000;\n\n this.currentTimer = this.ngZone.runOutsideAngular(() => {\n if (typeof window !== 'undefined') {\n return window.setTimeout(() => {\n this.lastText = this.formatFn(moment(this.lastValue));\n\n this.currentTimer = null;\n this.ngZone.run(() => this.cdRef.markForCheck());\n }, timeToUpdate);\n } else {\n return null;\n }\n });\n }\n\n private removeTimer() {\n if (this.currentTimer) {\n window.clearTimeout(this.currentTimer);\n this.currentTimer = null;\n }\n }\n\n private getSecondsUntilUpdate(momentInstance: moment.Moment) {\n const howOld = Math.abs(moment().diff(momentInstance, 'minute'));\n if (howOld < 1) {\n return 1;\n } else if (howOld < 60) {\n return 30;\n } else if (howOld < 180) {\n return 300;\n } else {\n return 3600;\n }\n }\n\n private hasChanged(value: moment.MomentInput, omitSuffix?: boolean): boolean {\n return (\n this.getTime(value) !== this.lastTime ||\n this.getLocale(value) !== this.lastLocale ||\n omitSuffix !== this.lastOmitSuffix\n );\n }\n\n private getTime(value: moment.MomentInput): number {\n if (moment.isDate(value)) {\n return value.getTime();\n } else if (moment.isMoment(value)) {\n return value.valueOf();\n } else {\n return moment(value).valueOf();\n }\n }\n\n private getLocale(value: moment.MomentInput): string | null {\n return moment.isMoment(value) ? value.locale() : moment.locale();\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport moment from 'moment';\n\n@Pipe({ name: 'amUtc' })\nexport class UtcPipe implements PipeTransform {\n transform(value: moment.MomentInput): moment.Moment {\n return moment(value).utc();\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { NGX_MOMENT_OPTIONS, NgxMomentOptions } from './moment-options';\n\nimport { AddPipe } from './add.pipe';\nimport { CalendarPipe } from './calendar.pipe';\nimport { DateFormatPipe } from './date-format.pipe';\nimport { DifferencePipe } from './difference.pipe';\nimport { DurationPipe } from './duration.pipe';\nimport { FromUnixPipe } from './from-unix.pipe';\nimport { FromUtcPipe } from './from-utc.pipe';\nimport { IsAfterPipe } from './is-after.pipe';\nimport { IsBeforePipe } from './is-before.pipe';\nimport { LocalTimePipe } from './local.pipe';\nimport { LocalePipe } from './locale.pipe';\nimport { ParsePipe } from './parse.pipe';\nimport { ParseZonePipe } from './parse-zone.pipe';\nimport { SubtractPipe } from './subtract.pipe';\nimport { TimeAgoPipe } from './time-ago.pipe';\nimport { UtcPipe } from './utc.pipe';\n\nconst ANGULAR_MOMENT_PIPES = [\n AddPipe,\n CalendarPipe,\n DateFormatPipe,\n DifferencePipe,\n DurationPipe,\n FromUnixPipe,\n ParsePipe,\n SubtractPipe,\n TimeAgoPipe,\n UtcPipe,\n FromUtcPipe,\n LocalTimePipe,\n LocalePipe,\n ParseZonePipe,\n IsBeforePipe,\n IsAfterPipe,\n];\n\n@NgModule({\n declarations: ANGULAR_MOMENT_PIPES,\n exports: ANGULAR_MOMENT_PIPES,\n})\nexport class MomentModule {\n static forRoot(options?: NgxMomentOptions): ModuleWithProviders<MomentModule> {\n return {\n ngModule: MomentModule,\n providers: [\n {\n provide: NGX_MOMENT_OPTIONS,\n useValue: {\n ...options,\n },\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\n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