@angular/material-date-fns-adapter 16.0.0-next.4 → 16.0.0-next.5

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.
@@ -182,10 +182,10 @@ class DateFnsAdapter extends DateAdapter {
182
182
  return new Date(NaN);
183
183
  }
184
184
  }
185
- DateFnsAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsAdapter, deps: [{ token: MAT_DATE_LOCALE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
186
- DateFnsAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsAdapter });
185
+ DateFnsAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsAdapter, deps: [{ token: MAT_DATE_LOCALE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
186
+ DateFnsAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsAdapter });
187
187
  export { DateFnsAdapter };
188
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsAdapter, decorators: [{
188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsAdapter, decorators: [{
189
189
  type: Injectable
190
190
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
191
191
  type: Optional
@@ -14,9 +14,9 @@ export * from './date-fns-adapter';
14
14
  export * from './date-fns-formats';
15
15
  class DateFnsModule {
16
16
  }
17
- DateFnsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
18
- DateFnsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsModule });
19
- DateFnsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsModule, providers: [
17
+ DateFnsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
18
+ DateFnsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsModule });
19
+ DateFnsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsModule, providers: [
20
20
  {
21
21
  provide: DateAdapter,
22
22
  useClass: DateFnsAdapter,
@@ -24,7 +24,7 @@ DateFnsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
24
24
  },
25
25
  ] });
26
26
  export { DateFnsModule };
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsModule, decorators: [{
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsModule, decorators: [{
28
28
  type: NgModule,
29
29
  args: [{
30
30
  providers: [
@@ -38,11 +38,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2",
38
38
  }] });
39
39
  class MatDateFnsModule {
40
40
  }
41
- MatDateFnsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MatDateFnsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
42
- MatDateFnsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.2", ngImport: i0, type: MatDateFnsModule, imports: [DateFnsModule] });
43
- MatDateFnsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MatDateFnsModule, providers: [{ provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_FORMATS }], imports: [DateFnsModule] });
41
+ MatDateFnsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: MatDateFnsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
42
+ MatDateFnsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.7", ngImport: i0, type: MatDateFnsModule, imports: [DateFnsModule] });
43
+ MatDateFnsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: MatDateFnsModule, providers: [{ provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_FORMATS }], imports: [DateFnsModule] });
44
44
  export { MatDateFnsModule };
45
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MatDateFnsModule, decorators: [{
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: MatDateFnsModule, decorators: [{
46
46
  type: NgModule,
47
47
  args: [{
48
48
  imports: [DateFnsModule],
@@ -3,13 +3,6 @@ import { Injectable, Optional, Inject, NgModule } from '@angular/core';
3
3
  import { DateAdapter, MAT_DATE_LOCALE, MAT_DATE_FORMATS } from '@angular/material/core';
4
4
  import { getYear, getMonth, getDate, getDay, getDaysInMonth, parseISO, parse, format, addYears, addMonths, addDays, formatISO, isDate, isValid } from 'date-fns';
5
5
 
6
- /**
7
- * @license
8
- * Copyright Google LLC All Rights Reserved.
9
- *
10
- * Use of this source code is governed by an MIT-style license that can be
11
- * found in the LICENSE file at https://angular.io/license
12
- */
13
6
  /** Creates an array and fills it with values. */
14
7
  function range(length, valueFunction) {
15
8
  const valuesArray = Array(length);
@@ -184,9 +177,9 @@ class DateFnsAdapter extends DateAdapter {
184
177
  return new Date(NaN);
185
178
  }
186
179
  }
187
- DateFnsAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsAdapter, deps: [{ token: MAT_DATE_LOCALE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
188
- DateFnsAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsAdapter });
189
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsAdapter, decorators: [{
180
+ DateFnsAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsAdapter, deps: [{ token: MAT_DATE_LOCALE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
181
+ DateFnsAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsAdapter });
182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsAdapter, decorators: [{
190
183
  type: Injectable
191
184
  }], ctorParameters: function () {
192
185
  return [{ type: undefined, decorators: [{
@@ -197,13 +190,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2",
197
190
  }] }];
198
191
  } });
199
192
 
200
- /**
201
- * @license
202
- * Copyright Google LLC All Rights Reserved.
203
- *
204
- * Use of this source code is governed by an MIT-style license that can be
205
- * found in the LICENSE file at https://angular.io/license
206
- */
207
193
  const MAT_DATE_FNS_FORMATS = {
208
194
  parse: {
209
195
  dateInput: 'P',
@@ -216,25 +202,18 @@ const MAT_DATE_FNS_FORMATS = {
216
202
  },
217
203
  };
218
204
 
219
- /**
220
- * @license
221
- * Copyright Google LLC All Rights Reserved.
222
- *
223
- * Use of this source code is governed by an MIT-style license that can be
224
- * found in the LICENSE file at https://angular.io/license
225
- */
226
205
  class DateFnsModule {
227
206
  }
228
- DateFnsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
229
- DateFnsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsModule });
230
- DateFnsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsModule, providers: [
207
+ DateFnsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
208
+ DateFnsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsModule });
209
+ DateFnsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsModule, providers: [
231
210
  {
232
211
  provide: DateAdapter,
233
212
  useClass: DateFnsAdapter,
234
213
  deps: [MAT_DATE_LOCALE],
235
214
  },
236
215
  ] });
237
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsModule, decorators: [{
216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsModule, decorators: [{
238
217
  type: NgModule,
239
218
  args: [{
240
219
  providers: [
@@ -248,10 +227,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2",
248
227
  }] });
249
228
  class MatDateFnsModule {
250
229
  }
251
- MatDateFnsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MatDateFnsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
252
- MatDateFnsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.2", ngImport: i0, type: MatDateFnsModule, imports: [DateFnsModule] });
253
- MatDateFnsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MatDateFnsModule, providers: [{ provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_FORMATS }], imports: [DateFnsModule] });
254
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MatDateFnsModule, decorators: [{
230
+ MatDateFnsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: MatDateFnsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
231
+ MatDateFnsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.7", ngImport: i0, type: MatDateFnsModule, imports: [DateFnsModule] });
232
+ MatDateFnsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: MatDateFnsModule, providers: [{ provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_FORMATS }], imports: [DateFnsModule] });
233
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: MatDateFnsModule, decorators: [{
255
234
  type: NgModule,
256
235
  args: [{
257
236
  imports: [DateFnsModule],
@@ -259,22 +238,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2",
259
238
  }]
260
239
  }] });
261
240
 
262
- /**
263
- * @license
264
- * Copyright Google LLC All Rights Reserved.
265
- *
266
- * Use of this source code is governed by an MIT-style license that can be
267
- * found in the LICENSE file at https://angular.io/license
268
- */
269
-
270
- /**
271
- * @license
272
- * Copyright Google LLC All Rights Reserved.
273
- *
274
- * Use of this source code is governed by an MIT-style license that can be
275
- * found in the LICENSE file at https://angular.io/license
276
- */
277
-
278
241
  /**
279
242
  * Generated bundle index. Do not edit.
280
243
  */
@@ -1 +1 @@
1
- {"version":3,"file":"material-date-fns-adapter.mjs","sources":["../../../../../../src/material-date-fns-adapter/adapter/date-fns-adapter.ts","../../../../../../src/material-date-fns-adapter/adapter/date-fns-formats.ts","../../../../../../src/material-date-fns-adapter/adapter/index.ts","../../../../../../src/material-date-fns-adapter/public-api.ts","../../../../../../src/material-date-fns-adapter/index.ts","../../../../../../src/material-date-fns-adapter/material-date-fns-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.io/license\n */\n\nimport {Inject, Injectable, Optional} from '@angular/core';\nimport {DateAdapter, MAT_DATE_LOCALE} from '@angular/material/core';\nimport {\n Locale,\n getMonth,\n getYear,\n getDate,\n getDay,\n getDaysInMonth,\n formatISO,\n addYears,\n addMonths,\n addDays,\n isValid,\n isDate,\n format,\n parseISO,\n parse,\n} from 'date-fns';\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// date-fns doesn't have a way to read/print month names or days of the week directly,\n// so we get them by formatting a date with a format that produces the desired month/day.\nconst MONTH_FORMATS = {\n long: 'LLLL',\n short: 'LLL',\n narrow: 'LLLLL',\n};\n\nconst DAY_OF_WEEK_FORMATS = {\n long: 'EEEE',\n short: 'EEE',\n narrow: 'EEEEE',\n};\n\n/** Adds date-fns support to Angular Material. */\n@Injectable()\nexport class DateFnsAdapter extends DateAdapter<Date, Locale> {\n constructor(@Optional() @Inject(MAT_DATE_LOCALE) matDateLocale: {}) {\n super();\n this.setLocale(matDateLocale);\n }\n\n getYear(date: Date): number {\n return getYear(date);\n }\n\n getMonth(date: Date): number {\n return getMonth(date);\n }\n\n getDate(date: Date): number {\n return getDate(date);\n }\n\n getDayOfWeek(date: Date): number {\n return getDay(date);\n }\n\n getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\n const pattern = MONTH_FORMATS[style];\n return range(12, i => this.format(new Date(2017, i, 1), pattern));\n }\n\n getDateNames(): string[] {\n const dtf =\n typeof Intl !== 'undefined'\n ? new Intl.DateTimeFormat(this.locale.code, {\n day: 'numeric',\n timeZone: 'utc',\n })\n : null;\n\n return range(31, i => {\n if (dtf) {\n // date-fns doesn't appear to support this functionality.\n // Fall back to `Intl` on supported browsers.\n const date = new Date();\n date.setUTCFullYear(2017, 0, i + 1);\n date.setUTCHours(0, 0, 0, 0);\n return dtf.format(date).replace(/[\\u200e\\u200f]/g, '');\n }\n\n return i + '';\n });\n }\n\n getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\n const pattern = DAY_OF_WEEK_FORMATS[style];\n return range(7, i => this.format(new Date(2017, 0, i + 1), pattern));\n }\n\n getYearName(date: Date): string {\n return this.format(date, 'y');\n }\n\n getFirstDayOfWeek(): number {\n return this.locale.options?.weekStartsOn ?? 0;\n }\n\n getNumDaysInMonth(date: Date): number {\n return getDaysInMonth(date);\n }\n\n clone(date: Date): Date {\n return new Date(date.getTime());\n }\n\n createDate(year: number, month: number, date: number): Date {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Check for invalid month and date (except upper bound on date which we have to check after\n // creating the Date).\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 // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setFullYear` and `setHours` instead.\n const result = new Date();\n result.setFullYear(year, month, date);\n result.setHours(0, 0, 0, 0);\n\n // Check that the date wasn't above the upper bound for the month, causing the month to overflow\n if (result.getMonth() != month && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\n }\n\n return result;\n }\n\n today(): Date {\n return new Date();\n }\n\n parse(value: any, parseFormat: string | string[]): Date | null {\n if (typeof value == 'string' && value.length > 0) {\n const iso8601Date = parseISO(value);\n\n if (this.isValid(iso8601Date)) {\n return iso8601Date;\n }\n\n const formats = Array.isArray(parseFormat) ? parseFormat : [parseFormat];\n\n if (!parseFormat.length) {\n throw Error('Formats array must not be empty.');\n }\n\n for (const currentFormat of formats) {\n const fromFormat = parse(value, currentFormat, new Date(), {locale: this.locale});\n\n if (this.isValid(fromFormat)) {\n return fromFormat;\n }\n }\n\n return this.invalid();\n } else if (typeof value === 'number') {\n return new Date(value);\n } else if (value instanceof Date) {\n return this.clone(value);\n }\n\n return null;\n }\n\n format(date: Date, displayFormat: string): string {\n if (!this.isValid(date)) {\n throw Error('DateFnsAdapter: Cannot format invalid date.');\n }\n\n return format(date, displayFormat, {locale: this.locale});\n }\n\n addCalendarYears(date: Date, years: number): Date {\n return addYears(date, years);\n }\n\n addCalendarMonths(date: Date, months: number): Date {\n return addMonths(date, months);\n }\n\n addCalendarDays(date: Date, days: number): Date {\n return addDays(date, days);\n }\n\n toIso8601(date: Date): string {\n return formatISO(date, {representation: 'date'});\n }\n\n /**\n * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings\n * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an\n * invalid date for all other values.\n */\n override deserialize(value: any): Date | null {\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n const date = parseISO(value);\n if (this.isValid(date)) {\n return date;\n }\n }\n return super.deserialize(value);\n }\n\n isDateInstance(obj: any): boolean {\n return isDate(obj);\n }\n\n isValid(date: Date): boolean {\n return isValid(date);\n }\n\n invalid(): Date {\n return new Date(NaN);\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.io/license\n */\n\nimport {MatDateFormats} from '@angular/material/core';\n\nexport const MAT_DATE_FNS_FORMATS: MatDateFormats = {\n parse: {\n dateInput: 'P',\n },\n display: {\n dateInput: 'P',\n monthYearLabel: 'LLL uuuu',\n dateA11yLabel: 'PP',\n monthYearA11yLabel: 'LLLL uuuu',\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.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core';\nimport {DateFnsAdapter} from './date-fns-adapter';\nimport {MAT_DATE_FNS_FORMATS} from './date-fns-formats';\n\nexport * from './date-fns-adapter';\nexport * from './date-fns-formats';\n\n@NgModule({\n providers: [\n {\n provide: DateAdapter,\n useClass: DateFnsAdapter,\n deps: [MAT_DATE_LOCALE],\n },\n ],\n})\nexport class DateFnsModule {}\n\n@NgModule({\n imports: [DateFnsModule],\n providers: [{provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_FORMATS}],\n})\nexport class MatDateFnsModule {}\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.io/license\n */\n\nexport * from './adapter/index';\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.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;AAMG;AAsBH;AACA,SAAS,KAAK,CAAI,MAAc,EAAE,aAAmC,EA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oBAAoB,EAAC,CAAC;iBACzE,CAAA;;;AC9BD;;;;;;AAMG;;ACNH;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"material-date-fns-adapter.mjs","sources":["../../../../../../src/material-date-fns-adapter/adapter/date-fns-adapter.ts","../../../../../../src/material-date-fns-adapter/adapter/date-fns-formats.ts","../../../../../../src/material-date-fns-adapter/adapter/index.ts","../../../../../../src/material-date-fns-adapter/material-date-fns-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.io/license\n */\n\nimport {Inject, Injectable, Optional} from '@angular/core';\nimport {DateAdapter, MAT_DATE_LOCALE} from '@angular/material/core';\nimport {\n Locale,\n getMonth,\n getYear,\n getDate,\n getDay,\n getDaysInMonth,\n formatISO,\n addYears,\n addMonths,\n addDays,\n isValid,\n isDate,\n format,\n parseISO,\n parse,\n} from 'date-fns';\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// date-fns doesn't have a way to read/print month names or days of the week directly,\n// so we get them by formatting a date with a format that produces the desired month/day.\nconst MONTH_FORMATS = {\n long: 'LLLL',\n short: 'LLL',\n narrow: 'LLLLL',\n};\n\nconst DAY_OF_WEEK_FORMATS = {\n long: 'EEEE',\n short: 'EEE',\n narrow: 'EEEEE',\n};\n\n/** Adds date-fns support to Angular Material. */\n@Injectable()\nexport class DateFnsAdapter extends DateAdapter<Date, Locale> {\n constructor(@Optional() @Inject(MAT_DATE_LOCALE) matDateLocale: {}) {\n super();\n this.setLocale(matDateLocale);\n }\n\n getYear(date: Date): number {\n return getYear(date);\n }\n\n getMonth(date: Date): number {\n return getMonth(date);\n }\n\n getDate(date: Date): number {\n return getDate(date);\n }\n\n getDayOfWeek(date: Date): number {\n return getDay(date);\n }\n\n getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\n const pattern = MONTH_FORMATS[style];\n return range(12, i => this.format(new Date(2017, i, 1), pattern));\n }\n\n getDateNames(): string[] {\n const dtf =\n typeof Intl !== 'undefined'\n ? new Intl.DateTimeFormat(this.locale.code, {\n day: 'numeric',\n timeZone: 'utc',\n })\n : null;\n\n return range(31, i => {\n if (dtf) {\n // date-fns doesn't appear to support this functionality.\n // Fall back to `Intl` on supported browsers.\n const date = new Date();\n date.setUTCFullYear(2017, 0, i + 1);\n date.setUTCHours(0, 0, 0, 0);\n return dtf.format(date).replace(/[\\u200e\\u200f]/g, '');\n }\n\n return i + '';\n });\n }\n\n getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\n const pattern = DAY_OF_WEEK_FORMATS[style];\n return range(7, i => this.format(new Date(2017, 0, i + 1), pattern));\n }\n\n getYearName(date: Date): string {\n return this.format(date, 'y');\n }\n\n getFirstDayOfWeek(): number {\n return this.locale.options?.weekStartsOn ?? 0;\n }\n\n getNumDaysInMonth(date: Date): number {\n return getDaysInMonth(date);\n }\n\n clone(date: Date): Date {\n return new Date(date.getTime());\n }\n\n createDate(year: number, month: number, date: number): Date {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Check for invalid month and date (except upper bound on date which we have to check after\n // creating the Date).\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 // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setFullYear` and `setHours` instead.\n const result = new Date();\n result.setFullYear(year, month, date);\n result.setHours(0, 0, 0, 0);\n\n // Check that the date wasn't above the upper bound for the month, causing the month to overflow\n if (result.getMonth() != month && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\n }\n\n return result;\n }\n\n today(): Date {\n return new Date();\n }\n\n parse(value: any, parseFormat: string | string[]): Date | null {\n if (typeof value == 'string' && value.length > 0) {\n const iso8601Date = parseISO(value);\n\n if (this.isValid(iso8601Date)) {\n return iso8601Date;\n }\n\n const formats = Array.isArray(parseFormat) ? parseFormat : [parseFormat];\n\n if (!parseFormat.length) {\n throw Error('Formats array must not be empty.');\n }\n\n for (const currentFormat of formats) {\n const fromFormat = parse(value, currentFormat, new Date(), {locale: this.locale});\n\n if (this.isValid(fromFormat)) {\n return fromFormat;\n }\n }\n\n return this.invalid();\n } else if (typeof value === 'number') {\n return new Date(value);\n } else if (value instanceof Date) {\n return this.clone(value);\n }\n\n return null;\n }\n\n format(date: Date, displayFormat: string): string {\n if (!this.isValid(date)) {\n throw Error('DateFnsAdapter: Cannot format invalid date.');\n }\n\n return format(date, displayFormat, {locale: this.locale});\n }\n\n addCalendarYears(date: Date, years: number): Date {\n return addYears(date, years);\n }\n\n addCalendarMonths(date: Date, months: number): Date {\n return addMonths(date, months);\n }\n\n addCalendarDays(date: Date, days: number): Date {\n return addDays(date, days);\n }\n\n toIso8601(date: Date): string {\n return formatISO(date, {representation: 'date'});\n }\n\n /**\n * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings\n * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an\n * invalid date for all other values.\n */\n override deserialize(value: any): Date | null {\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n const date = parseISO(value);\n if (this.isValid(date)) {\n return date;\n }\n }\n return super.deserialize(value);\n }\n\n isDateInstance(obj: any): boolean {\n return isDate(obj);\n }\n\n isValid(date: Date): boolean {\n return isValid(date);\n }\n\n invalid(): Date {\n return new Date(NaN);\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.io/license\n */\n\nimport {MatDateFormats} from '@angular/material/core';\n\nexport const MAT_DATE_FNS_FORMATS: MatDateFormats = {\n parse: {\n dateInput: 'P',\n },\n display: {\n dateInput: 'P',\n monthYearLabel: 'LLL uuuu',\n dateA11yLabel: 'PP',\n monthYearA11yLabel: 'LLLL uuuu',\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.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core';\nimport {DateFnsAdapter} from './date-fns-adapter';\nimport {MAT_DATE_FNS_FORMATS} from './date-fns-formats';\n\nexport * from './date-fns-adapter';\nexport * from './date-fns-formats';\n\n@NgModule({\n providers: [\n {\n provide: DateAdapter,\n useClass: DateFnsAdapter,\n deps: [MAT_DATE_LOCALE],\n },\n ],\n})\nexport class DateFnsModule {}\n\n@NgModule({\n imports: [DateFnsModule],\n providers: [{provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_FORMATS}],\n})\nexport class MatDateFnsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AA4BA;AACA,SAAS,KAAK,CAAI,MAAc,EAAE,aAAmC,EAAA;AACnE,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,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;AACnC,KAAA;AACD,IAAA,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;AACA;AACA,MAAM,aAAa,GAAG;AACpB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE,OAAO;CAChB,CAAC;AAEF,MAAM,mBAAmB,GAAG;AAC1B,IAAA,IAAI,EAAE,MAAM;AACZ,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A,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAhB,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YANhB,aAAa,CAAA,EAAA,CAAA,CAAA;AAMb,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,EAFhB,SAAA,EAAA,CAAC,EAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,EAAC,CAAC,YAD9D,aAAa,CAAA,EAAA,CAAA,CAAA;kGAGZ,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,SAAS,EAAE,CAAC,EAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,EAAC,CAAC;iBACzE,CAAA;;;AC9BD;;AAEG;;;;"}
@@ -3,13 +3,6 @@ import { Injectable, Optional, Inject, NgModule } from '@angular/core';
3
3
  import { DateAdapter, MAT_DATE_LOCALE, MAT_DATE_FORMATS } from '@angular/material/core';
4
4
  import { getYear, getMonth, getDate, getDay, getDaysInMonth, parseISO, parse, format, addYears, addMonths, addDays, formatISO, isDate, isValid } from 'date-fns';
5
5
 
6
- /**
7
- * @license
8
- * Copyright Google LLC All Rights Reserved.
9
- *
10
- * Use of this source code is governed by an MIT-style license that can be
11
- * found in the LICENSE file at https://angular.io/license
12
- */
13
6
  /** Creates an array and fills it with values. */
14
7
  function range(length, valueFunction) {
15
8
  const valuesArray = Array(length);
@@ -183,9 +176,9 @@ class DateFnsAdapter extends DateAdapter {
183
176
  return new Date(NaN);
184
177
  }
185
178
  }
186
- DateFnsAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsAdapter, deps: [{ token: MAT_DATE_LOCALE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
187
- DateFnsAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsAdapter });
188
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsAdapter, decorators: [{
179
+ DateFnsAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsAdapter, deps: [{ token: MAT_DATE_LOCALE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
180
+ DateFnsAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsAdapter });
181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsAdapter, decorators: [{
189
182
  type: Injectable
190
183
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
191
184
  type: Optional
@@ -194,13 +187,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2",
194
187
  args: [MAT_DATE_LOCALE]
195
188
  }] }]; } });
196
189
 
197
- /**
198
- * @license
199
- * Copyright Google LLC All Rights Reserved.
200
- *
201
- * Use of this source code is governed by an MIT-style license that can be
202
- * found in the LICENSE file at https://angular.io/license
203
- */
204
190
  const MAT_DATE_FNS_FORMATS = {
205
191
  parse: {
206
192
  dateInput: 'P',
@@ -213,25 +199,18 @@ const MAT_DATE_FNS_FORMATS = {
213
199
  },
214
200
  };
215
201
 
216
- /**
217
- * @license
218
- * Copyright Google LLC All Rights Reserved.
219
- *
220
- * Use of this source code is governed by an MIT-style license that can be
221
- * found in the LICENSE file at https://angular.io/license
222
- */
223
202
  class DateFnsModule {
224
203
  }
225
- DateFnsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
226
- DateFnsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsModule });
227
- DateFnsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsModule, providers: [
204
+ DateFnsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
205
+ DateFnsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsModule });
206
+ DateFnsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsModule, providers: [
228
207
  {
229
208
  provide: DateAdapter,
230
209
  useClass: DateFnsAdapter,
231
210
  deps: [MAT_DATE_LOCALE],
232
211
  },
233
212
  ] });
234
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: DateFnsModule, decorators: [{
213
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: DateFnsModule, decorators: [{
235
214
  type: NgModule,
236
215
  args: [{
237
216
  providers: [
@@ -245,10 +224,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2",
245
224
  }] });
246
225
  class MatDateFnsModule {
247
226
  }
248
- MatDateFnsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MatDateFnsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
249
- MatDateFnsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.2", ngImport: i0, type: MatDateFnsModule, imports: [DateFnsModule] });
250
- MatDateFnsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MatDateFnsModule, providers: [{ provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_FORMATS }], imports: [DateFnsModule] });
251
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MatDateFnsModule, decorators: [{
227
+ MatDateFnsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: MatDateFnsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
228
+ MatDateFnsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.7", ngImport: i0, type: MatDateFnsModule, imports: [DateFnsModule] });
229
+ MatDateFnsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: MatDateFnsModule, providers: [{ provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_FORMATS }], imports: [DateFnsModule] });
230
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: MatDateFnsModule, decorators: [{
252
231
  type: NgModule,
253
232
  args: [{
254
233
  imports: [DateFnsModule],
@@ -256,22 +235,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2",
256
235
  }]
257
236
  }] });
258
237
 
259
- /**
260
- * @license
261
- * Copyright Google LLC All Rights Reserved.
262
- *
263
- * Use of this source code is governed by an MIT-style license that can be
264
- * found in the LICENSE file at https://angular.io/license
265
- */
266
-
267
- /**
268
- * @license
269
- * Copyright Google LLC All Rights Reserved.
270
- *
271
- * Use of this source code is governed by an MIT-style license that can be
272
- * found in the LICENSE file at https://angular.io/license
273
- */
274
-
275
238
  /**
276
239
  * Generated bundle index. Do not edit.
277
240
  */
@@ -1 +1 @@
1
- {"version":3,"file":"material-date-fns-adapter.mjs","sources":["../../../../../../src/material-date-fns-adapter/adapter/date-fns-adapter.ts","../../../../../../src/material-date-fns-adapter/adapter/date-fns-formats.ts","../../../../../../src/material-date-fns-adapter/adapter/index.ts","../../../../../../src/material-date-fns-adapter/public-api.ts","../../../../../../src/material-date-fns-adapter/index.ts","../../../../../../src/material-date-fns-adapter/material-date-fns-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.io/license\n */\n\nimport {Inject, Injectable, Optional} from '@angular/core';\nimport {DateAdapter, MAT_DATE_LOCALE} from '@angular/material/core';\nimport {\n Locale,\n getMonth,\n getYear,\n getDate,\n getDay,\n getDaysInMonth,\n formatISO,\n addYears,\n addMonths,\n addDays,\n isValid,\n isDate,\n format,\n parseISO,\n parse,\n} from 'date-fns';\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// date-fns doesn't have a way to read/print month names or days of the week directly,\n// so we get them by formatting a date with a format that produces the desired month/day.\nconst MONTH_FORMATS = {\n long: 'LLLL',\n short: 'LLL',\n narrow: 'LLLLL',\n};\n\nconst DAY_OF_WEEK_FORMATS = {\n long: 'EEEE',\n short: 'EEE',\n narrow: 'EEEEE',\n};\n\n/** Adds date-fns support to Angular Material. */\n@Injectable()\nexport class DateFnsAdapter extends DateAdapter<Date, Locale> {\n constructor(@Optional() @Inject(MAT_DATE_LOCALE) matDateLocale: {}) {\n super();\n this.setLocale(matDateLocale);\n }\n\n getYear(date: Date): number {\n return getYear(date);\n }\n\n getMonth(date: Date): number {\n return getMonth(date);\n }\n\n getDate(date: Date): number {\n return getDate(date);\n }\n\n getDayOfWeek(date: Date): number {\n return getDay(date);\n }\n\n getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\n const pattern = MONTH_FORMATS[style];\n return range(12, i => this.format(new Date(2017, i, 1), pattern));\n }\n\n getDateNames(): string[] {\n const dtf =\n typeof Intl !== 'undefined'\n ? new Intl.DateTimeFormat(this.locale.code, {\n day: 'numeric',\n timeZone: 'utc',\n })\n : null;\n\n return range(31, i => {\n if (dtf) {\n // date-fns doesn't appear to support this functionality.\n // Fall back to `Intl` on supported browsers.\n const date = new Date();\n date.setUTCFullYear(2017, 0, i + 1);\n date.setUTCHours(0, 0, 0, 0);\n return dtf.format(date).replace(/[\\u200e\\u200f]/g, '');\n }\n\n return i + '';\n });\n }\n\n getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\n const pattern = DAY_OF_WEEK_FORMATS[style];\n return range(7, i => this.format(new Date(2017, 0, i + 1), pattern));\n }\n\n getYearName(date: Date): string {\n return this.format(date, 'y');\n }\n\n getFirstDayOfWeek(): number {\n return this.locale.options?.weekStartsOn ?? 0;\n }\n\n getNumDaysInMonth(date: Date): number {\n return getDaysInMonth(date);\n }\n\n clone(date: Date): Date {\n return new Date(date.getTime());\n }\n\n createDate(year: number, month: number, date: number): Date {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Check for invalid month and date (except upper bound on date which we have to check after\n // creating the Date).\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 // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setFullYear` and `setHours` instead.\n const result = new Date();\n result.setFullYear(year, month, date);\n result.setHours(0, 0, 0, 0);\n\n // Check that the date wasn't above the upper bound for the month, causing the month to overflow\n if (result.getMonth() != month && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\n }\n\n return result;\n }\n\n today(): Date {\n return new Date();\n }\n\n parse(value: any, parseFormat: string | string[]): Date | null {\n if (typeof value == 'string' && value.length > 0) {\n const iso8601Date = parseISO(value);\n\n if (this.isValid(iso8601Date)) {\n return iso8601Date;\n }\n\n const formats = Array.isArray(parseFormat) ? parseFormat : [parseFormat];\n\n if (!parseFormat.length) {\n throw Error('Formats array must not be empty.');\n }\n\n for (const currentFormat of formats) {\n const fromFormat = parse(value, currentFormat, new Date(), {locale: this.locale});\n\n if (this.isValid(fromFormat)) {\n return fromFormat;\n }\n }\n\n return this.invalid();\n } else if (typeof value === 'number') {\n return new Date(value);\n } else if (value instanceof Date) {\n return this.clone(value);\n }\n\n return null;\n }\n\n format(date: Date, displayFormat: string): string {\n if (!this.isValid(date)) {\n throw Error('DateFnsAdapter: Cannot format invalid date.');\n }\n\n return format(date, displayFormat, {locale: this.locale});\n }\n\n addCalendarYears(date: Date, years: number): Date {\n return addYears(date, years);\n }\n\n addCalendarMonths(date: Date, months: number): Date {\n return addMonths(date, months);\n }\n\n addCalendarDays(date: Date, days: number): Date {\n return addDays(date, days);\n }\n\n toIso8601(date: Date): string {\n return formatISO(date, {representation: 'date'});\n }\n\n /**\n * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings\n * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an\n * invalid date for all other values.\n */\n override deserialize(value: any): Date | null {\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n const date = parseISO(value);\n if (this.isValid(date)) {\n return date;\n }\n }\n return super.deserialize(value);\n }\n\n isDateInstance(obj: any): boolean {\n return isDate(obj);\n }\n\n isValid(date: Date): boolean {\n return isValid(date);\n }\n\n invalid(): Date {\n return new Date(NaN);\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.io/license\n */\n\nimport {MatDateFormats} from '@angular/material/core';\n\nexport const MAT_DATE_FNS_FORMATS: MatDateFormats = {\n parse: {\n dateInput: 'P',\n },\n display: {\n dateInput: 'P',\n monthYearLabel: 'LLL uuuu',\n dateA11yLabel: 'PP',\n monthYearA11yLabel: 'LLLL uuuu',\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.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core';\nimport {DateFnsAdapter} from './date-fns-adapter';\nimport {MAT_DATE_FNS_FORMATS} from './date-fns-formats';\n\nexport * from './date-fns-adapter';\nexport * from './date-fns-formats';\n\n@NgModule({\n providers: [\n {\n provide: DateAdapter,\n useClass: DateFnsAdapter,\n deps: [MAT_DATE_LOCALE],\n },\n ],\n})\nexport class DateFnsModule {}\n\n@NgModule({\n imports: [DateFnsModule],\n providers: [{provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_FORMATS}],\n})\nexport class MatDateFnsModule {}\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.io/license\n */\n\nexport * from './adapter/index';\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.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;AAMG;AAsBH;AACA,SAAS,KAAK,CAAI,MAAc,EAAE,aAAmC,EAAA;AACnE,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC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AA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,WAAW;AACpB,4BAAA,QAAQ,EAAE,cAAc;4BACxB,IAAI,EAAE,CAAC,eAAe,CAAC;AACxB,yBAAA;AACF,qBAAA;AACF,iBAAA,CAAA;;AAGD,MAIa,gBAAgB,CAAA;;oHAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAhB,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YANhB,aAAa,CAAA,EAAA,CAAA,CAAA;AAMb,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,EAFhB,SAAA,EAAA,CAAC,EAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,EAAC,CAAC,YAD9D,aAAa,CAAA,EAAA,CAAA,CAAA;kGAGZ,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,SAAS,EAAE,CAAC,EAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,EAAC,CAAC;AACzE,iBAAA,CAAA;;;AC9BD;;;;;;AAMG;;ACNH;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"material-date-fns-adapter.mjs","sources":["../../../../../../src/material-date-fns-adapter/adapter/date-fns-adapter.ts","../../../../../../src/material-date-fns-adapter/adapter/date-fns-formats.ts","../../../../../../src/material-date-fns-adapter/adapter/index.ts","../../../../../../src/material-date-fns-adapter/material-date-fns-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.io/license\n */\n\nimport {Inject, Injectable, Optional} from '@angular/core';\nimport {DateAdapter, MAT_DATE_LOCALE} from '@angular/material/core';\nimport {\n Locale,\n getMonth,\n getYear,\n getDate,\n getDay,\n getDaysInMonth,\n formatISO,\n addYears,\n addMonths,\n addDays,\n isValid,\n isDate,\n format,\n parseISO,\n parse,\n} from 'date-fns';\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// date-fns doesn't have a way to read/print month names or days of the week directly,\n// so we get them by formatting a date with a format that produces the desired month/day.\nconst MONTH_FORMATS = {\n long: 'LLLL',\n short: 'LLL',\n narrow: 'LLLLL',\n};\n\nconst DAY_OF_WEEK_FORMATS = {\n long: 'EEEE',\n short: 'EEE',\n narrow: 'EEEEE',\n};\n\n/** Adds date-fns support to Angular Material. */\n@Injectable()\nexport class DateFnsAdapter extends DateAdapter<Date, Locale> {\n constructor(@Optional() @Inject(MAT_DATE_LOCALE) matDateLocale: {}) {\n super();\n this.setLocale(matDateLocale);\n }\n\n getYear(date: Date): number {\n return getYear(date);\n }\n\n getMonth(date: Date): number {\n return getMonth(date);\n }\n\n getDate(date: Date): number {\n return getDate(date);\n }\n\n getDayOfWeek(date: Date): number {\n return getDay(date);\n }\n\n getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\n const pattern = MONTH_FORMATS[style];\n return range(12, i => this.format(new Date(2017, i, 1), pattern));\n }\n\n getDateNames(): string[] {\n const dtf =\n typeof Intl !== 'undefined'\n ? new Intl.DateTimeFormat(this.locale.code, {\n day: 'numeric',\n timeZone: 'utc',\n })\n : null;\n\n return range(31, i => {\n if (dtf) {\n // date-fns doesn't appear to support this functionality.\n // Fall back to `Intl` on supported browsers.\n const date = new Date();\n date.setUTCFullYear(2017, 0, i + 1);\n date.setUTCHours(0, 0, 0, 0);\n return dtf.format(date).replace(/[\\u200e\\u200f]/g, '');\n }\n\n return i + '';\n });\n }\n\n getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\n const pattern = DAY_OF_WEEK_FORMATS[style];\n return range(7, i => this.format(new Date(2017, 0, i + 1), pattern));\n }\n\n getYearName(date: Date): string {\n return this.format(date, 'y');\n }\n\n getFirstDayOfWeek(): number {\n return this.locale.options?.weekStartsOn ?? 0;\n }\n\n getNumDaysInMonth(date: Date): number {\n return getDaysInMonth(date);\n }\n\n clone(date: Date): Date {\n return new Date(date.getTime());\n }\n\n createDate(year: number, month: number, date: number): Date {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Check for invalid month and date (except upper bound on date which we have to check after\n // creating the Date).\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 // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setFullYear` and `setHours` instead.\n const result = new Date();\n result.setFullYear(year, month, date);\n result.setHours(0, 0, 0, 0);\n\n // Check that the date wasn't above the upper bound for the month, causing the month to overflow\n if (result.getMonth() != month && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\n }\n\n return result;\n }\n\n today(): Date {\n return new Date();\n }\n\n parse(value: any, parseFormat: string | string[]): Date | null {\n if (typeof value == 'string' && value.length > 0) {\n const iso8601Date = parseISO(value);\n\n if (this.isValid(iso8601Date)) {\n return iso8601Date;\n }\n\n const formats = Array.isArray(parseFormat) ? parseFormat : [parseFormat];\n\n if (!parseFormat.length) {\n throw Error('Formats array must not be empty.');\n }\n\n for (const currentFormat of formats) {\n const fromFormat = parse(value, currentFormat, new Date(), {locale: this.locale});\n\n if (this.isValid(fromFormat)) {\n return fromFormat;\n }\n }\n\n return this.invalid();\n } else if (typeof value === 'number') {\n return new Date(value);\n } else if (value instanceof Date) {\n return this.clone(value);\n }\n\n return null;\n }\n\n format(date: Date, displayFormat: string): string {\n if (!this.isValid(date)) {\n throw Error('DateFnsAdapter: Cannot format invalid date.');\n }\n\n return format(date, displayFormat, {locale: this.locale});\n }\n\n addCalendarYears(date: Date, years: number): Date {\n return addYears(date, years);\n }\n\n addCalendarMonths(date: Date, months: number): Date {\n return addMonths(date, months);\n }\n\n addCalendarDays(date: Date, days: number): Date {\n return addDays(date, days);\n }\n\n toIso8601(date: Date): string {\n return formatISO(date, {representation: 'date'});\n }\n\n /**\n * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings\n * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an\n * invalid date for all other values.\n */\n override deserialize(value: any): Date | null {\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n const date = parseISO(value);\n if (this.isValid(date)) {\n return date;\n }\n }\n return super.deserialize(value);\n }\n\n isDateInstance(obj: any): boolean {\n return isDate(obj);\n }\n\n isValid(date: Date): boolean {\n return isValid(date);\n }\n\n invalid(): Date {\n return new Date(NaN);\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.io/license\n */\n\nimport {MatDateFormats} from '@angular/material/core';\n\nexport const MAT_DATE_FNS_FORMATS: MatDateFormats = {\n parse: {\n dateInput: 'P',\n },\n display: {\n dateInput: 'P',\n monthYearLabel: 'LLL uuuu',\n dateA11yLabel: 'PP',\n monthYearA11yLabel: 'LLLL uuuu',\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.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core';\nimport {DateFnsAdapter} from './date-fns-adapter';\nimport {MAT_DATE_FNS_FORMATS} from './date-fns-formats';\n\nexport * from './date-fns-adapter';\nexport * from './date-fns-formats';\n\n@NgModule({\n providers: [\n {\n provide: DateAdapter,\n useClass: DateFnsAdapter,\n deps: [MAT_DATE_LOCALE],\n },\n ],\n})\nexport class DateFnsModule {}\n\n@NgModule({\n imports: [DateFnsModule],\n providers: [{provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_FORMATS}],\n})\nexport class MatDateFnsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AA4BA;AACA,SAAS,KAAK,CAAI,MAAc,EAAE,aAAmC,EAAA;AACnE,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,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;AACnC,KAAA;AACD,IAAA,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;AACA;AACA,MAAM,aAAa,GAAG;AACpB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE,OAAO;CAChB,CAAC;AAEF,MAAM,mBAAmB,GAAG;AAC1B,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE,OAAO;CAChB,CAAC;AAEF;AACA,MACa,cAAe,SAAQ,WAAyB,CAAA;AAC3D,IAAA,WAAA,CAAiD,aAAiB,EAAA;AAChE,QAAA,KAAK,EAAE,CAAC;AACR,QAAA,IAAI,CAAC,SAAS,CAAC,aAAa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AAA,EAAA,IAAA,EAAA,gBAAgB,EAFhB,SAAA,EAAA,CAAC,EAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,EAAC,CAAC,YAD9D,aAAa,CAAA,EAAA,CAAA,CAAA;kGAGZ,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,SAAS,EAAE,CAAC,EAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,EAAC,CAAC;AACzE,iBAAA,CAAA;;;AC9BD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/material-date-fns-adapter",
3
- "version": "16.0.0-next.4",
3
+ "version": "16.0.0-next.5",
4
4
  "description": "Angular Material date-fns 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": "16.0.0-next.4",
15
+ "@angular/material": "16.0.0-next.5",
16
16
  "@angular/core": "^16.0.0-0 || ^16.1.0-0 || ^16.2.0-0 || ^16.3.0-0 || ^17.0.0-0",
17
17
  "date-fns": "^2.23.0"
18
18
  },