@angular/material-moment-adapter 20.0.0-next.0 → 20.0.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,11 @@ const MAT_MOMENT_DATE_ADAPTER_OPTIONS = new InjectionToken('MAT_MOMENT_DATE_ADAP
10
10
  providedIn: 'root',
11
11
  factory: MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY,
12
12
  });
13
- /** @docs-private */
13
+ /**
14
+ * @docs-private
15
+ * @deprecated No longer used, will be removed.
16
+ * @breaking-change 21.0.0
17
+ */
14
18
  function MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY() {
15
19
  return {
16
20
  useUtc: false,
@@ -206,10 +210,10 @@ class MomentDateAdapter extends DateAdapter {
206
210
  const { strict, useUtc } = this._options || {};
207
211
  return useUtc ? moment.utc(date, format, locale, strict) : moment(date, format, locale, strict);
208
212
  }
209
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MomentDateAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
210
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MomentDateAdapter });
213
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MomentDateAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
214
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MomentDateAdapter });
211
215
  }
212
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MomentDateAdapter, decorators: [{
216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MomentDateAdapter, decorators: [{
213
217
  type: Injectable
214
218
  }], ctorParameters: () => [] });
215
219
 
@@ -229,9 +233,9 @@ const MAT_MOMENT_DATE_FORMATS = {
229
233
  };
230
234
 
231
235
  class MomentDateModule {
232
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MomentDateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
233
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.0", ngImport: i0, type: MomentDateModule });
234
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MomentDateModule, providers: [
236
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MomentDateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
237
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.1", ngImport: i0, type: MomentDateModule });
238
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MomentDateModule, providers: [
235
239
  {
236
240
  provide: DateAdapter,
237
241
  useClass: MomentDateAdapter,
@@ -239,7 +243,7 @@ class MomentDateModule {
239
243
  },
240
244
  ] });
241
245
  }
242
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MomentDateModule, decorators: [{
246
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MomentDateModule, decorators: [{
243
247
  type: NgModule,
244
248
  args: [{
245
249
  providers: [
@@ -252,11 +256,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
252
256
  }]
253
257
  }] });
254
258
  class MatMomentDateModule {
255
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatMomentDateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
256
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.0", ngImport: i0, type: MatMomentDateModule });
257
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatMomentDateModule, providers: [provideMomentDateAdapter()] });
259
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MatMomentDateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
260
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.1", ngImport: i0, type: MatMomentDateModule });
261
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MatMomentDateModule, providers: [provideMomentDateAdapter()] });
258
262
  }
259
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatMomentDateModule, decorators: [{
263
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MatMomentDateModule, decorators: [{
260
264
  type: NgModule,
261
265
  args: [{
262
266
  providers: [provideMomentDateAdapter()],
@@ -277,9 +281,5 @@ function provideMomentDateAdapter(formats = MAT_MOMENT_DATE_FORMATS, options) {
277
281
  return providers;
278
282
  }
279
283
 
280
- /**
281
- * Generated bundle index. Do not edit.
282
- */
283
-
284
284
  export { MAT_MOMENT_DATE_ADAPTER_OPTIONS, MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY, MAT_MOMENT_DATE_FORMATS, MatMomentDateModule, MomentDateAdapter, MomentDateModule, provideMomentDateAdapter };
285
285
  //# sourceMappingURL=material-moment-adapter.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"material-moment-adapter.mjs","sources":["../../../../../../src/material-moment-adapter/adapter/moment-date-adapter.ts","../../../../../../src/material-moment-adapter/adapter/moment-date-formats.ts","../../../../../../src/material-moment-adapter/adapter/index.ts","../../../../../../src/material-moment-adapter/material-moment-adapter_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injectable, InjectionToken, inject} from '@angular/core';\nimport {DateAdapter, MAT_DATE_LOCALE} from '@angular/material/core';\n// Depending on whether rollup is used, moment needs to be imported differently.\n// Since Moment.js doesn't have a default export, we normally need to import using the `* as`\n// syntax. However, rollup creates a synthetic default module and we thus need to import it using\n// the `default as` syntax.\n// TODO(mmalerba): See if we can clean this up at some point.\nimport * as _moment from 'moment';\n// tslint:disable-next-line:no-duplicate-imports\nimport {default as _rollupMoment, Moment, MomentFormatSpecification, MomentInput} from 'moment';\n\nconst moment = _rollupMoment || _moment;\n\n/** Configurable options for MomentDateAdapter. */\nexport interface MatMomentDateAdapterOptions {\n /**\n * When enabled, the dates have to match the format exactly.\n * See https://momentjs.com/guides/#/parsing/strict-mode/.\n */\n strict?: boolean;\n\n /**\n * Turns the use of utc dates on or off.\n * Changing this will change how Angular Material components like DatePicker output dates.\n * Defaults to `false`.\n */\n useUtc?: boolean;\n}\n\n/** InjectionToken for moment date adapter to configure options. */\nexport const MAT_MOMENT_DATE_ADAPTER_OPTIONS = new InjectionToken<MatMomentDateAdapterOptions>(\n 'MAT_MOMENT_DATE_ADAPTER_OPTIONS',\n {\n providedIn: 'root',\n factory: MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY,\n },\n);\n\n/** @docs-private */\nexport function MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY(): MatMomentDateAdapterOptions {\n return {\n useUtc: false,\n };\n}\n\n/** Creates an array and fills it with values. */\nfunction range<T>(length: number, valueFunction: (index: number) => T): T[] {\n const valuesArray = Array(length);\n for (let i = 0; i < length; i++) {\n valuesArray[i] = valueFunction(i);\n }\n return valuesArray;\n}\n\n/** Adapts Moment.js Dates for use with Angular Material. */\n@Injectable()\nexport class MomentDateAdapter extends DateAdapter<Moment> {\n private _options = inject<MatMomentDateAdapterOptions>(MAT_MOMENT_DATE_ADAPTER_OPTIONS, {\n optional: true,\n });\n\n // Note: all of the methods that accept a `Moment` input parameter immediately call `this.clone`\n // on it. This is to ensure that we're working with a `Moment` that has the correct locale setting\n // while avoiding mutating the original object passed to us. Just calling `.locale(...)` on the\n // input would mutate the object.\n\n private _localeData: {\n firstDayOfWeek: number;\n longMonths: string[];\n shortMonths: string[];\n dates: string[];\n longDaysOfWeek: string[];\n shortDaysOfWeek: string[];\n narrowDaysOfWeek: string[];\n };\n\n constructor(...args: unknown[]);\n\n constructor() {\n super();\n const dateLocale = inject<string>(MAT_DATE_LOCALE, {optional: true});\n this.setLocale(dateLocale || moment.locale());\n }\n\n override setLocale(locale: string) {\n super.setLocale(locale);\n\n let momentLocaleData = moment.localeData(locale);\n this._localeData = {\n firstDayOfWeek: momentLocaleData.firstDayOfWeek(),\n longMonths: momentLocaleData.months(),\n shortMonths: momentLocaleData.monthsShort(),\n dates: range(31, i => this.createDate(2017, 0, i + 1).format('D')),\n longDaysOfWeek: momentLocaleData.weekdays(),\n shortDaysOfWeek: momentLocaleData.weekdaysShort(),\n narrowDaysOfWeek: momentLocaleData.weekdaysMin(),\n };\n }\n\n getYear(date: Moment): number {\n return this.clone(date).year();\n }\n\n getMonth(date: Moment): number {\n return this.clone(date).month();\n }\n\n getDate(date: Moment): number {\n return this.clone(date).date();\n }\n\n getDayOfWeek(date: Moment): number {\n return this.clone(date).day();\n }\n\n getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\n // Moment.js doesn't support narrow month names, so we just use short if narrow is requested.\n return style == 'long' ? this._localeData.longMonths : this._localeData.shortMonths;\n }\n\n getDateNames(): string[] {\n return this._localeData.dates;\n }\n\n getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\n if (style == 'long') {\n return this._localeData.longDaysOfWeek;\n }\n if (style == 'short') {\n return this._localeData.shortDaysOfWeek;\n }\n return this._localeData.narrowDaysOfWeek;\n }\n\n getYearName(date: Moment): string {\n return this.clone(date).format('YYYY');\n }\n\n getFirstDayOfWeek(): number {\n return this._localeData.firstDayOfWeek;\n }\n\n getNumDaysInMonth(date: Moment): number {\n return this.clone(date).daysInMonth();\n }\n\n clone(date: Moment): Moment {\n return date.clone().locale(this.locale);\n }\n\n createDate(year: number, month: number, date: number): Moment {\n // Moment.js will create an invalid date if any of the components are out of bounds, but we\n // explicitly check each case so we can throw more descriptive errors.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (month < 0 || month > 11) {\n throw Error(`Invalid month index \"${month}\". Month index has to be between 0 and 11.`);\n }\n\n if (date < 1) {\n throw Error(`Invalid date \"${date}\". Date has to be greater than 0.`);\n }\n }\n\n const result = this._createMoment({year, month, date}).locale(this.locale);\n\n // If the result isn't valid, the date must have been out of bounds for this month.\n if (!result.isValid() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\n }\n\n return result;\n }\n\n today(): Moment {\n return this._createMoment().locale(this.locale);\n }\n\n parse(value: any, parseFormat: string | string[]): Moment | null {\n if (value && typeof value == 'string') {\n return this._createMoment(value, parseFormat, this.locale);\n }\n return value ? this._createMoment(value).locale(this.locale) : null;\n }\n\n format(date: Moment, displayFormat: string): string {\n date = this.clone(date);\n if (!this.isValid(date) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('MomentDateAdapter: Cannot format invalid date.');\n }\n return date.format(displayFormat);\n }\n\n addCalendarYears(date: Moment, years: number): Moment {\n return this.clone(date).add({years});\n }\n\n addCalendarMonths(date: Moment, months: number): Moment {\n return this.clone(date).add({months});\n }\n\n addCalendarDays(date: Moment, days: number): Moment {\n return this.clone(date).add({days});\n }\n\n toIso8601(date: Moment): string {\n return this.clone(date).format();\n }\n\n /**\n * Returns the given value if given a valid Moment or null. Deserializes valid ISO 8601 strings\n * (https://www.ietf.org/rfc/rfc3339.txt) and valid Date objects into valid Moments and empty\n * string into null. Returns an invalid date for all other values.\n */\n override deserialize(value: any): Moment | null {\n let date;\n if (value instanceof Date) {\n date = this._createMoment(value).locale(this.locale);\n } else if (this.isDateInstance(value)) {\n // Note: assumes that cloning also sets the correct locale.\n return this.clone(value);\n }\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n date = this._createMoment(value, moment.ISO_8601).locale(this.locale);\n }\n if (date && this.isValid(date)) {\n return this._createMoment(date).locale(this.locale);\n }\n return super.deserialize(value);\n }\n\n isDateInstance(obj: any): boolean {\n return moment.isMoment(obj);\n }\n\n isValid(date: Moment): boolean {\n return this.clone(date).isValid();\n }\n\n invalid(): Moment {\n return moment.invalid();\n }\n\n override setTime(target: Moment, hours: number, minutes: number, seconds: number): Moment {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (hours < 0 || hours > 23) {\n throw Error(`Invalid hours \"${hours}\". Hours value must be between 0 and 23.`);\n }\n\n if (minutes < 0 || minutes > 59) {\n throw Error(`Invalid minutes \"${minutes}\". Minutes value must be between 0 and 59.`);\n }\n\n if (seconds < 0 || seconds > 59) {\n throw Error(`Invalid seconds \"${seconds}\". Seconds value must be between 0 and 59.`);\n }\n }\n\n return this.clone(target).set({hours, minutes, seconds, milliseconds: 0});\n }\n\n override getHours(date: Moment): number {\n return date.hours();\n }\n\n override getMinutes(date: Moment): number {\n return date.minutes();\n }\n\n override getSeconds(date: Moment): number {\n return date.seconds();\n }\n\n override parseTime(value: any, parseFormat: string | string[]): Moment | null {\n return this.parse(value, parseFormat);\n }\n\n override addSeconds(date: Moment, amount: number): Moment {\n return this.clone(date).add({seconds: amount});\n }\n\n /** Creates a Moment instance while respecting the current UTC settings. */\n private _createMoment(\n date?: MomentInput,\n format?: MomentFormatSpecification,\n locale?: string,\n ): Moment {\n const {strict, useUtc}: MatMomentDateAdapterOptions = this._options || {};\n\n return useUtc ? moment.utc(date, format, locale, strict) : moment(date, format, locale, strict);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {MatDateFormats} from '@angular/material/core';\n\nexport const MAT_MOMENT_DATE_FORMATS: MatDateFormats = {\n parse: {\n dateInput: 'l',\n timeInput: 'LT',\n },\n display: {\n dateInput: 'l',\n timeInput: 'LT',\n monthYearLabel: 'MMM YYYY',\n dateA11yLabel: 'LL',\n monthYearA11yLabel: 'MMMM YYYY',\n timeOptionLabel: 'LT',\n },\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule, Provider} from '@angular/core';\nimport {\n DateAdapter,\n MAT_DATE_FORMATS,\n MAT_DATE_LOCALE,\n MatDateFormats,\n} from '@angular/material/core';\nimport {\n MAT_MOMENT_DATE_ADAPTER_OPTIONS,\n MatMomentDateAdapterOptions,\n MomentDateAdapter,\n} from './moment-date-adapter';\nimport {MAT_MOMENT_DATE_FORMATS} from './moment-date-formats';\n\nexport * from './moment-date-adapter';\nexport * from './moment-date-formats';\n\n@NgModule({\n providers: [\n {\n provide: DateAdapter,\n useClass: MomentDateAdapter,\n deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS],\n },\n ],\n})\nexport class MomentDateModule {}\n\n@NgModule({\n providers: [provideMomentDateAdapter()],\n})\nexport class MatMomentDateModule {}\n\nexport function provideMomentDateAdapter(\n formats: MatDateFormats = MAT_MOMENT_DATE_FORMATS,\n options?: MatMomentDateAdapterOptions,\n): Provider[] {\n const providers: Provider[] = [\n {\n provide: DateAdapter,\n useClass: MomentDateAdapter,\n deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS],\n },\n {provide: MAT_DATE_FORMATS, useValue: formats},\n ];\n\n if (options) {\n providers.push({provide: MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: options});\n }\n\n return providers;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["_rollupMoment","_moment"],"mappings":";;;;;;AAmBA,MAAM,MAAM,GAAGA,sBAAa,IAAIC,aAAO,CAAC;AAkBxC;MACa,+BAA+B,GAAG,IAAI,cAAc,CAC/D,iCAAiC,EACjC;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,uCAAuC;AACjD,CAAA,EACD;AAEF;SACgB,uCAAuC,GAAA;IACrD,OAAO;AACL,QAAA,MAAM,EAAE,KAAK;KACd,CAAC;AACJ,CAAC;AAED;AACA,SAAS,KAAK,CAAI,MAAc,EAAE,aAAmC,EAAA;AACnE,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAClC,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;QAC/B,WAAW,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;KACnC;AACD,IAAA,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;AAEM,MAAO,iBAAkB,SAAQ,WAAmB,CAAA;AAChD,IAAA,QAAQ,GAAG,MAAM,CAA8B,+BAA+B,EAAE;AACtF,QAAA,QAAQ,EAAE,IAAI;AACf,KAAA,CAAC,CAAC;;;;;AAOK,IAAA,WAAW,CAQjB;AAIF,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE,CAAC;AACR,QAAA,MAAM,UAAU,GAAG,MAAM,CAAS,eAAe,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC;QACrE,IAAI,CAAC,SAAS,CAAC,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;KAC/C;AAEQ,IAAA,SAAS,CAAC,MAAc,EAAA;AAC/B,QAAA,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAExB,IAAI,gBAAgB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EAFnB,SAAA,EAAA,CAAC,wBAAwB,EAAE,CAAC,EAAA,CAAA,CAAA;;2FAE5B,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE,CAAC,wBAAwB,EAAE,CAAC;AACxC,iBAAA,CAAA;;SAGe,wBAAwB,CACtC,OAA0B,GAAA,uBAAuB,EACjD,OAAqC,EAAA;AAErC,IAAA,MAAM,SAAS,GAAe;AAC5B,QAAA;AACE,YAAA,OAAO,EAAE,WAAW;AACpB,YAAA,QAAQ,EAAE,iBAAiB;AAC3B,YAAA,IAAI,EAAE,CAAC,eAAe,EAAE,+BAA+B,CAAC;AACzD,SAAA;AACD,QAAA,EAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,EAAC;KAC/C,CAAC;IAEF,IAAI,OAAO,EAAE;AACX,QAAA,SAAS,CAAC,IAAI,CAAC,EAAC,OAAO,EAAE,+BAA+B,EAAE,QAAQ,EAAE,OAAO,EAAC,CAAC,CAAC;KAC/E;AAED,IAAA,OAAO,SAAS,CAAC;AACnB;;AC3DA;;AAEG;;;;"}
1
+ {"version":3,"file":"material-moment-adapter.mjs","sources":["../../../../../../src/material-moment-adapter/adapter/moment-date-adapter.ts","../../../../../../src/material-moment-adapter/adapter/moment-date-formats.ts","../../../../../../src/material-moment-adapter/adapter/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injectable, InjectionToken, inject} from '@angular/core';\nimport {DateAdapter, MAT_DATE_LOCALE} from '@angular/material/core';\n// Depending on whether rollup is used, moment needs to be imported differently.\n// Since Moment.js doesn't have a default export, we normally need to import using the `* as`\n// syntax. However, rollup creates a synthetic default module and we thus need to import it using\n// the `default as` syntax.\n// TODO(mmalerba): See if we can clean this up at some point.\nimport * as _moment from 'moment';\n// tslint:disable-next-line:no-duplicate-imports\nimport {default as _rollupMoment, Moment, MomentFormatSpecification, MomentInput} from 'moment';\n\nconst moment = _rollupMoment || _moment;\n\n/** Configurable options for MomentDateAdapter. */\nexport interface MatMomentDateAdapterOptions {\n /**\n * When enabled, the dates have to match the format exactly.\n * See https://momentjs.com/guides/#/parsing/strict-mode/.\n */\n strict?: boolean;\n\n /**\n * Turns the use of utc dates on or off.\n * Changing this will change how Angular Material components like DatePicker output dates.\n * Defaults to `false`.\n */\n useUtc?: boolean;\n}\n\n/** InjectionToken for moment date adapter to configure options. */\nexport const MAT_MOMENT_DATE_ADAPTER_OPTIONS = new InjectionToken<MatMomentDateAdapterOptions>(\n 'MAT_MOMENT_DATE_ADAPTER_OPTIONS',\n {\n providedIn: 'root',\n factory: MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY,\n },\n);\n\n/**\n * @docs-private\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n */\nexport function MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY(): MatMomentDateAdapterOptions {\n return {\n useUtc: false,\n };\n}\n\n/** Creates an array and fills it with values. */\nfunction range<T>(length: number, valueFunction: (index: number) => T): T[] {\n const valuesArray = Array(length);\n for (let i = 0; i < length; i++) {\n valuesArray[i] = valueFunction(i);\n }\n return valuesArray;\n}\n\n/** Adapts Moment.js Dates for use with Angular Material. */\n@Injectable()\nexport class MomentDateAdapter extends DateAdapter<Moment> {\n private _options = inject<MatMomentDateAdapterOptions>(MAT_MOMENT_DATE_ADAPTER_OPTIONS, {\n optional: true,\n });\n\n // Note: all of the methods that accept a `Moment` input parameter immediately call `this.clone`\n // on it. This is to ensure that we're working with a `Moment` that has the correct locale setting\n // while avoiding mutating the original object passed to us. Just calling `.locale(...)` on the\n // input would mutate the object.\n\n private _localeData: {\n firstDayOfWeek: number;\n longMonths: string[];\n shortMonths: string[];\n dates: string[];\n longDaysOfWeek: string[];\n shortDaysOfWeek: string[];\n narrowDaysOfWeek: string[];\n };\n\n constructor(...args: unknown[]);\n\n constructor() {\n super();\n const dateLocale = inject<string>(MAT_DATE_LOCALE, {optional: true});\n this.setLocale(dateLocale || moment.locale());\n }\n\n override setLocale(locale: string) {\n super.setLocale(locale);\n\n let momentLocaleData = moment.localeData(locale);\n this._localeData = {\n firstDayOfWeek: momentLocaleData.firstDayOfWeek(),\n longMonths: momentLocaleData.months(),\n shortMonths: momentLocaleData.monthsShort(),\n dates: range(31, i => this.createDate(2017, 0, i + 1).format('D')),\n longDaysOfWeek: momentLocaleData.weekdays(),\n shortDaysOfWeek: momentLocaleData.weekdaysShort(),\n narrowDaysOfWeek: momentLocaleData.weekdaysMin(),\n };\n }\n\n getYear(date: Moment): number {\n return this.clone(date).year();\n }\n\n getMonth(date: Moment): number {\n return this.clone(date).month();\n }\n\n getDate(date: Moment): number {\n return this.clone(date).date();\n }\n\n getDayOfWeek(date: Moment): number {\n return this.clone(date).day();\n }\n\n getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\n // Moment.js doesn't support narrow month names, so we just use short if narrow is requested.\n return style == 'long' ? this._localeData.longMonths : this._localeData.shortMonths;\n }\n\n getDateNames(): string[] {\n return this._localeData.dates;\n }\n\n getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\n if (style == 'long') {\n return this._localeData.longDaysOfWeek;\n }\n if (style == 'short') {\n return this._localeData.shortDaysOfWeek;\n }\n return this._localeData.narrowDaysOfWeek;\n }\n\n getYearName(date: Moment): string {\n return this.clone(date).format('YYYY');\n }\n\n getFirstDayOfWeek(): number {\n return this._localeData.firstDayOfWeek;\n }\n\n getNumDaysInMonth(date: Moment): number {\n return this.clone(date).daysInMonth();\n }\n\n clone(date: Moment): Moment {\n return date.clone().locale(this.locale);\n }\n\n createDate(year: number, month: number, date: number): Moment {\n // Moment.js will create an invalid date if any of the components are out of bounds, but we\n // explicitly check each case so we can throw more descriptive errors.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (month < 0 || month > 11) {\n throw Error(`Invalid month index \"${month}\". Month index has to be between 0 and 11.`);\n }\n\n if (date < 1) {\n throw Error(`Invalid date \"${date}\". Date has to be greater than 0.`);\n }\n }\n\n const result = this._createMoment({year, month, date}).locale(this.locale);\n\n // If the result isn't valid, the date must have been out of bounds for this month.\n if (!result.isValid() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\n }\n\n return result;\n }\n\n today(): Moment {\n return this._createMoment().locale(this.locale);\n }\n\n parse(value: any, parseFormat: string | string[]): Moment | null {\n if (value && typeof value == 'string') {\n return this._createMoment(value, parseFormat, this.locale);\n }\n return value ? this._createMoment(value).locale(this.locale) : null;\n }\n\n format(date: Moment, displayFormat: string): string {\n date = this.clone(date);\n if (!this.isValid(date) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('MomentDateAdapter: Cannot format invalid date.');\n }\n return date.format(displayFormat);\n }\n\n addCalendarYears(date: Moment, years: number): Moment {\n return this.clone(date).add({years});\n }\n\n addCalendarMonths(date: Moment, months: number): Moment {\n return this.clone(date).add({months});\n }\n\n addCalendarDays(date: Moment, days: number): Moment {\n return this.clone(date).add({days});\n }\n\n toIso8601(date: Moment): string {\n return this.clone(date).format();\n }\n\n /**\n * Returns the given value if given a valid Moment or null. Deserializes valid ISO 8601 strings\n * (https://www.ietf.org/rfc/rfc3339.txt) and valid Date objects into valid Moments and empty\n * string into null. Returns an invalid date for all other values.\n */\n override deserialize(value: any): Moment | null {\n let date;\n if (value instanceof Date) {\n date = this._createMoment(value).locale(this.locale);\n } else if (this.isDateInstance(value)) {\n // Note: assumes that cloning also sets the correct locale.\n return this.clone(value);\n }\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n date = this._createMoment(value, moment.ISO_8601).locale(this.locale);\n }\n if (date && this.isValid(date)) {\n return this._createMoment(date).locale(this.locale);\n }\n return super.deserialize(value);\n }\n\n isDateInstance(obj: any): boolean {\n return moment.isMoment(obj);\n }\n\n isValid(date: Moment): boolean {\n return this.clone(date).isValid();\n }\n\n invalid(): Moment {\n return moment.invalid();\n }\n\n override setTime(target: Moment, hours: number, minutes: number, seconds: number): Moment {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (hours < 0 || hours > 23) {\n throw Error(`Invalid hours \"${hours}\". Hours value must be between 0 and 23.`);\n }\n\n if (minutes < 0 || minutes > 59) {\n throw Error(`Invalid minutes \"${minutes}\". Minutes value must be between 0 and 59.`);\n }\n\n if (seconds < 0 || seconds > 59) {\n throw Error(`Invalid seconds \"${seconds}\". Seconds value must be between 0 and 59.`);\n }\n }\n\n return this.clone(target).set({hours, minutes, seconds, milliseconds: 0});\n }\n\n override getHours(date: Moment): number {\n return date.hours();\n }\n\n override getMinutes(date: Moment): number {\n return date.minutes();\n }\n\n override getSeconds(date: Moment): number {\n return date.seconds();\n }\n\n override parseTime(value: any, parseFormat: string | string[]): Moment | null {\n return this.parse(value, parseFormat);\n }\n\n override addSeconds(date: Moment, amount: number): Moment {\n return this.clone(date).add({seconds: amount});\n }\n\n /** Creates a Moment instance while respecting the current UTC settings. */\n private _createMoment(\n date?: MomentInput,\n format?: MomentFormatSpecification,\n locale?: string,\n ): Moment {\n const {strict, useUtc}: MatMomentDateAdapterOptions = this._options || {};\n\n return useUtc ? moment.utc(date, format, locale, strict) : moment(date, format, locale, strict);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {MatDateFormats} from '@angular/material/core';\n\nexport const MAT_MOMENT_DATE_FORMATS: MatDateFormats = {\n parse: {\n dateInput: 'l',\n timeInput: 'LT',\n },\n display: {\n dateInput: 'l',\n timeInput: 'LT',\n monthYearLabel: 'MMM YYYY',\n dateA11yLabel: 'LL',\n monthYearA11yLabel: 'MMMM YYYY',\n timeOptionLabel: 'LT',\n },\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule, Provider} from '@angular/core';\nimport {\n DateAdapter,\n MAT_DATE_FORMATS,\n MAT_DATE_LOCALE,\n MatDateFormats,\n} from '@angular/material/core';\nimport {\n MAT_MOMENT_DATE_ADAPTER_OPTIONS,\n MatMomentDateAdapterOptions,\n MomentDateAdapter,\n} from './moment-date-adapter';\nimport {MAT_MOMENT_DATE_FORMATS} from './moment-date-formats';\n\nexport * from './moment-date-adapter';\nexport * from './moment-date-formats';\n\n@NgModule({\n providers: [\n {\n provide: DateAdapter,\n useClass: MomentDateAdapter,\n deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS],\n },\n ],\n})\nexport class MomentDateModule {}\n\n@NgModule({\n providers: [provideMomentDateAdapter()],\n})\nexport class MatMomentDateModule {}\n\nexport function provideMomentDateAdapter(\n formats: MatDateFormats = MAT_MOMENT_DATE_FORMATS,\n options?: MatMomentDateAdapterOptions,\n): Provider[] {\n const providers: Provider[] = [\n {\n provide: DateAdapter,\n useClass: MomentDateAdapter,\n deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS],\n },\n {provide: MAT_DATE_FORMATS, useValue: formats},\n ];\n\n if (options) {\n providers.push({provide: MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: options});\n }\n\n return providers;\n}\n"],"names":["_rollupMoment","_moment"],"mappings":";;;;;;AAmBA,MAAM,MAAM,GAAGA,sBAAa,IAAIC,aAAO,CAAA;AAkBvC;MACa,+BAA+B,GAAG,IAAI,cAAc,CAC/D,iCAAiC,EACjC;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,uCAAuC;AACjD,CAAA,EACF;AAED;;;;AAIG;SACa,uCAAuC,GAAA;IACrD,OAAO;AACL,QAAA,MAAM,EAAE,KAAK;KACd,CAAA;AACH,CAAA;AAEA;AACA,SAAS,KAA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BAAiB;AAC3B,YAAA,IAAI,EAAE,CAAC,eAAe,EAAE,+BAA+B,CAAC;AACzD,SAAA;AACD,QAAA,EAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,EAAC;KAC/C,CAAA;IAED,IAAI,OAAO,EAAE;AACX,QAAA,SAAS,CAAC,IAAI,CAAC,EAAC,OAAO,EAAE,+BAA+B,EAAE,QAAQ,EAAE,OAAO,EAAC,CAAC,CAAA;KAC/E;AAEA,IAAA,OAAO,SAAS,CAAA;AAClB;;;;"}
package/index.d.ts CHANGED
@@ -1,20 +1,10 @@
1
- import { DateAdapter } from '@angular/material/core';
2
1
  import * as i0 from '@angular/core';
3
- import { InjectionToken } from '@angular/core';
4
- import { MatDateFormats } from '@angular/material/core';
2
+ import { InjectionToken, Provider } from '@angular/core';
3
+ import { DateAdapter, MatDateFormats } from '@angular/material/core';
5
4
  import { Moment } from 'moment';
6
- import { Provider } from '@angular/core';
7
-
8
- /** InjectionToken for moment date adapter to configure options. */
9
- export declare const MAT_MOMENT_DATE_ADAPTER_OPTIONS: InjectionToken<MatMomentDateAdapterOptions>;
10
-
11
- /** @docs-private */
12
- export declare function MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY(): MatMomentDateAdapterOptions;
13
-
14
- export declare const MAT_MOMENT_DATE_FORMATS: MatDateFormats;
15
5
 
16
6
  /** Configurable options for MomentDateAdapter. */
17
- export declare interface MatMomentDateAdapterOptions {
7
+ interface MatMomentDateAdapterOptions {
18
8
  /**
19
9
  * When enabled, the dates have to match the format exactly.
20
10
  * See https://momentjs.com/guides/#/parsing/strict-mode/.
@@ -27,15 +17,16 @@ export declare interface MatMomentDateAdapterOptions {
27
17
  */
28
18
  useUtc?: boolean;
29
19
  }
30
-
31
- export declare class MatMomentDateModule {
32
- static ɵfac: i0.ɵɵFactoryDeclaration<MatMomentDateModule, never>;
33
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatMomentDateModule, never, never, never>;
34
- static ɵinj: i0.ɵɵInjectorDeclaration<MatMomentDateModule>;
35
- }
36
-
20
+ /** InjectionToken for moment date adapter to configure options. */
21
+ declare const MAT_MOMENT_DATE_ADAPTER_OPTIONS: InjectionToken<MatMomentDateAdapterOptions>;
22
+ /**
23
+ * @docs-private
24
+ * @deprecated No longer used, will be removed.
25
+ * @breaking-change 21.0.0
26
+ */
27
+ declare function MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY(): MatMomentDateAdapterOptions;
37
28
  /** Adapts Moment.js Dates for use with Angular Material. */
38
- export declare class MomentDateAdapter extends DateAdapter<Moment> {
29
+ declare class MomentDateAdapter extends DateAdapter<Moment> {
39
30
  private _options;
40
31
  private _localeData;
41
32
  constructor(...args: unknown[]);
@@ -80,12 +71,18 @@ export declare class MomentDateAdapter extends DateAdapter<Moment> {
80
71
  static ɵprov: i0.ɵɵInjectableDeclaration<MomentDateAdapter>;
81
72
  }
82
73
 
83
- export declare class MomentDateModule {
74
+ declare const MAT_MOMENT_DATE_FORMATS: MatDateFormats;
75
+
76
+ declare class MomentDateModule {
84
77
  static ɵfac: i0.ɵɵFactoryDeclaration<MomentDateModule, never>;
85
78
  static ɵmod: i0.ɵɵNgModuleDeclaration<MomentDateModule, never, never, never>;
86
79
  static ɵinj: i0.ɵɵInjectorDeclaration<MomentDateModule>;
87
80
  }
81
+ declare class MatMomentDateModule {
82
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatMomentDateModule, never>;
83
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatMomentDateModule, never, never, never>;
84
+ static ɵinj: i0.ɵɵInjectorDeclaration<MatMomentDateModule>;
85
+ }
86
+ declare function provideMomentDateAdapter(formats?: MatDateFormats, options?: MatMomentDateAdapterOptions): Provider[];
88
87
 
89
- export declare function provideMomentDateAdapter(formats?: MatDateFormats, options?: MatMomentDateAdapterOptions): Provider[];
90
-
91
- export { }
88
+ export { MAT_MOMENT_DATE_ADAPTER_OPTIONS, MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY, MAT_MOMENT_DATE_FORMATS, type MatMomentDateAdapterOptions, MatMomentDateModule, MomentDateAdapter, MomentDateModule, provideMomentDateAdapter };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/material-moment-adapter",
3
- "version": "20.0.0-next.0",
3
+ "version": "20.0.0-next.1",
4
4
  "description": "Angular Material Moment Adapter",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "homepage": "https://github.com/angular/components#readme",
14
14
  "peerDependencies": {
15
- "@angular/material": "20.0.0-next.0",
15
+ "@angular/material": "20.0.0-next.1",
16
16
  "@angular/core": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
17
17
  "moment": "^2.18.1"
18
18
  },