@angular/material-moment-adapter 21.0.0-next.9 → 21.0.0-rc.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.
@@ -5,267 +5,338 @@ import * as _rollupMoment from 'moment';
5
5
  import _rollupMoment__default from 'moment';
6
6
 
7
7
  const moment = _rollupMoment__default || _rollupMoment;
8
- /** InjectionToken for moment date adapter to configure options. */
9
8
  const MAT_MOMENT_DATE_ADAPTER_OPTIONS = new InjectionToken('MAT_MOMENT_DATE_ADAPTER_OPTIONS', {
10
- providedIn: 'root',
11
- factory: () => ({ useUtc: false }),
9
+ providedIn: 'root',
10
+ factory: () => ({
11
+ useUtc: false
12
+ })
12
13
  });
13
- /** Creates an array and fills it with values. */
14
14
  function range(length, valueFunction) {
15
- const valuesArray = Array(length);
16
- for (let i = 0; i < length; i++) {
17
- valuesArray[i] = valueFunction(i);
18
- }
19
- return valuesArray;
15
+ const valuesArray = Array(length);
16
+ for (let i = 0; i < length; i++) {
17
+ valuesArray[i] = valueFunction(i);
18
+ }
19
+ return valuesArray;
20
20
  }
21
- /** Adapts Moment.js Dates for use with Angular Material. */
22
21
  class MomentDateAdapter extends DateAdapter {
23
- _options = inject(MAT_MOMENT_DATE_ADAPTER_OPTIONS, {
24
- optional: true,
22
+ _options = inject(MAT_MOMENT_DATE_ADAPTER_OPTIONS, {
23
+ optional: true
24
+ });
25
+ _localeData;
26
+ constructor() {
27
+ super();
28
+ const dateLocale = inject(MAT_DATE_LOCALE, {
29
+ optional: true
25
30
  });
26
- // Note: all of the methods that accept a `Moment` input parameter immediately call `this.clone`
27
- // on it. This is to ensure that we're working with a `Moment` that has the correct locale setting
28
- // while avoiding mutating the original object passed to us. Just calling `.locale(...)` on the
29
- // input would mutate the object.
30
- _localeData;
31
- constructor() {
32
- super();
33
- const dateLocale = inject(MAT_DATE_LOCALE, { optional: true });
34
- this.setLocale(dateLocale || moment.locale());
35
- }
36
- setLocale(locale) {
37
- super.setLocale(locale);
38
- let momentLocaleData = moment.localeData(locale);
39
- this._localeData = {
40
- firstDayOfWeek: momentLocaleData.firstDayOfWeek(),
41
- longMonths: momentLocaleData.months(),
42
- shortMonths: momentLocaleData.monthsShort(),
43
- dates: range(31, i => this.createDate(2017, 0, i + 1).format('D')),
44
- longDaysOfWeek: momentLocaleData.weekdays(),
45
- shortDaysOfWeek: momentLocaleData.weekdaysShort(),
46
- narrowDaysOfWeek: momentLocaleData.weekdaysMin(),
47
- };
48
- }
49
- getYear(date) {
50
- return this.clone(date).year();
51
- }
52
- getMonth(date) {
53
- return this.clone(date).month();
54
- }
55
- getDate(date) {
56
- return this.clone(date).date();
57
- }
58
- getDayOfWeek(date) {
59
- return this.clone(date).day();
60
- }
61
- getMonthNames(style) {
62
- // Moment.js doesn't support narrow month names, so we just use short if narrow is requested.
63
- return style == 'long' ? this._localeData.longMonths : this._localeData.shortMonths;
64
- }
65
- getDateNames() {
66
- return this._localeData.dates;
67
- }
68
- getDayOfWeekNames(style) {
69
- if (style == 'long') {
70
- return this._localeData.longDaysOfWeek;
71
- }
72
- if (style == 'short') {
73
- return this._localeData.shortDaysOfWeek;
74
- }
75
- return this._localeData.narrowDaysOfWeek;
76
- }
77
- getYearName(date) {
78
- return this.clone(date).format('YYYY');
79
- }
80
- getFirstDayOfWeek() {
81
- return this._localeData.firstDayOfWeek;
82
- }
83
- getNumDaysInMonth(date) {
84
- return this.clone(date).daysInMonth();
85
- }
86
- clone(date) {
87
- return date.clone().locale(this.locale);
88
- }
89
- createDate(year, month, date) {
90
- // Moment.js will create an invalid date if any of the components are out of bounds, but we
91
- // explicitly check each case so we can throw more descriptive errors.
92
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
93
- if (month < 0 || month > 11) {
94
- throw Error(`Invalid month index "${month}". Month index has to be between 0 and 11.`);
95
- }
96
- if (date < 1) {
97
- throw Error(`Invalid date "${date}". Date has to be greater than 0.`);
98
- }
99
- }
100
- const result = this._createMoment({ year, month, date }).locale(this.locale);
101
- // If the result isn't valid, the date must have been out of bounds for this month.
102
- if (!result.isValid() && (typeof ngDevMode === 'undefined' || ngDevMode)) {
103
- throw Error(`Invalid date "${date}" for month with index "${month}".`);
104
- }
105
- return result;
106
- }
107
- today() {
108
- return this._createMoment().locale(this.locale);
109
- }
110
- parse(value, parseFormat) {
111
- if (value && typeof value == 'string') {
112
- return this._createMoment(value, parseFormat, this.locale);
113
- }
114
- return value ? this._createMoment(value).locale(this.locale) : null;
115
- }
116
- format(date, displayFormat) {
117
- date = this.clone(date);
118
- if (!this.isValid(date) && (typeof ngDevMode === 'undefined' || ngDevMode)) {
119
- throw Error('MomentDateAdapter: Cannot format invalid date.');
120
- }
121
- return date.format(displayFormat);
122
- }
123
- addCalendarYears(date, years) {
124
- return this.clone(date).add({ years });
125
- }
126
- addCalendarMonths(date, months) {
127
- return this.clone(date).add({ months });
128
- }
129
- addCalendarDays(date, days) {
130
- return this.clone(date).add({ days });
131
- }
132
- toIso8601(date) {
133
- return this.clone(date).format();
134
- }
135
- /**
136
- * Returns the given value if given a valid Moment or null. Deserializes valid ISO 8601 strings
137
- * (https://www.ietf.org/rfc/rfc3339.txt) and valid Date objects into valid Moments and empty
138
- * string into null. Returns an invalid date for all other values.
139
- */
140
- deserialize(value) {
141
- let date;
142
- if (value instanceof Date) {
143
- date = this._createMoment(value).locale(this.locale);
144
- }
145
- else if (this.isDateInstance(value)) {
146
- // Note: assumes that cloning also sets the correct locale.
147
- return this.clone(value);
148
- }
149
- if (typeof value === 'string') {
150
- if (!value) {
151
- return null;
152
- }
153
- date = this._createMoment(value, moment.ISO_8601).locale(this.locale);
154
- }
155
- if (date && this.isValid(date)) {
156
- return this._createMoment(date).locale(this.locale);
157
- }
158
- return super.deserialize(value);
159
- }
160
- isDateInstance(obj) {
161
- return moment.isMoment(obj);
162
- }
163
- isValid(date) {
164
- return this.clone(date).isValid();
165
- }
166
- invalid() {
167
- return moment.invalid();
168
- }
169
- setTime(target, hours, minutes, seconds) {
170
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
171
- if (hours < 0 || hours > 23) {
172
- throw Error(`Invalid hours "${hours}". Hours value must be between 0 and 23.`);
173
- }
174
- if (minutes < 0 || minutes > 59) {
175
- throw Error(`Invalid minutes "${minutes}". Minutes value must be between 0 and 59.`);
176
- }
177
- if (seconds < 0 || seconds > 59) {
178
- throw Error(`Invalid seconds "${seconds}". Seconds value must be between 0 and 59.`);
179
- }
180
- }
181
- return this.clone(target).set({ hours, minutes, seconds, milliseconds: 0 });
182
- }
183
- getHours(date) {
184
- return date.hours();
185
- }
186
- getMinutes(date) {
187
- return date.minutes();
188
- }
189
- getSeconds(date) {
190
- return date.seconds();
191
- }
192
- parseTime(value, parseFormat) {
193
- return this.parse(value, parseFormat);
194
- }
195
- addSeconds(date, amount) {
196
- return this.clone(date).add({ seconds: amount });
197
- }
198
- /** Creates a Moment instance while respecting the current UTC settings. */
199
- _createMoment(date, format, locale) {
200
- const { strict, useUtc } = this._options || {};
201
- return useUtc ? moment.utc(date, format, locale, strict) : moment(date, format, locale, strict);
202
- }
203
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MomentDateAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
204
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MomentDateAdapter });
31
+ this.setLocale(dateLocale || moment.locale());
32
+ }
33
+ setLocale(locale) {
34
+ super.setLocale(locale);
35
+ let momentLocaleData = moment.localeData(locale);
36
+ this._localeData = {
37
+ firstDayOfWeek: momentLocaleData.firstDayOfWeek(),
38
+ longMonths: momentLocaleData.months(),
39
+ shortMonths: momentLocaleData.monthsShort(),
40
+ dates: range(31, i => this.createDate(2017, 0, i + 1).format('D')),
41
+ longDaysOfWeek: momentLocaleData.weekdays(),
42
+ shortDaysOfWeek: momentLocaleData.weekdaysShort(),
43
+ narrowDaysOfWeek: momentLocaleData.weekdaysMin()
44
+ };
45
+ }
46
+ getYear(date) {
47
+ return this.clone(date).year();
48
+ }
49
+ getMonth(date) {
50
+ return this.clone(date).month();
51
+ }
52
+ getDate(date) {
53
+ return this.clone(date).date();
54
+ }
55
+ getDayOfWeek(date) {
56
+ return this.clone(date).day();
57
+ }
58
+ getMonthNames(style) {
59
+ return style == 'long' ? this._localeData.longMonths : this._localeData.shortMonths;
60
+ }
61
+ getDateNames() {
62
+ return this._localeData.dates;
63
+ }
64
+ getDayOfWeekNames(style) {
65
+ if (style == 'long') {
66
+ return this._localeData.longDaysOfWeek;
67
+ }
68
+ if (style == 'short') {
69
+ return this._localeData.shortDaysOfWeek;
70
+ }
71
+ return this._localeData.narrowDaysOfWeek;
72
+ }
73
+ getYearName(date) {
74
+ return this.clone(date).format('YYYY');
75
+ }
76
+ getFirstDayOfWeek() {
77
+ return this._localeData.firstDayOfWeek;
78
+ }
79
+ getNumDaysInMonth(date) {
80
+ return this.clone(date).daysInMonth();
81
+ }
82
+ clone(date) {
83
+ return date.clone().locale(this.locale);
84
+ }
85
+ createDate(year, month, date) {
86
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
87
+ if (month < 0 || month > 11) {
88
+ throw Error(`Invalid month index "${month}". Month index has to be between 0 and 11.`);
89
+ }
90
+ if (date < 1) {
91
+ throw Error(`Invalid date "${date}". Date has to be greater than 0.`);
92
+ }
93
+ }
94
+ const result = this._createMoment({
95
+ year,
96
+ month,
97
+ date
98
+ }).locale(this.locale);
99
+ if (!result.isValid() && (typeof ngDevMode === 'undefined' || ngDevMode)) {
100
+ throw Error(`Invalid date "${date}" for month with index "${month}".`);
101
+ }
102
+ return result;
103
+ }
104
+ today() {
105
+ return this._createMoment().locale(this.locale);
106
+ }
107
+ parse(value, parseFormat) {
108
+ if (value && typeof value == 'string') {
109
+ return this._createMoment(value, parseFormat, this.locale);
110
+ }
111
+ return value ? this._createMoment(value).locale(this.locale) : null;
112
+ }
113
+ format(date, displayFormat) {
114
+ date = this.clone(date);
115
+ if (!this.isValid(date) && (typeof ngDevMode === 'undefined' || ngDevMode)) {
116
+ throw Error('MomentDateAdapter: Cannot format invalid date.');
117
+ }
118
+ return date.format(displayFormat);
119
+ }
120
+ addCalendarYears(date, years) {
121
+ return this.clone(date).add({
122
+ years
123
+ });
124
+ }
125
+ addCalendarMonths(date, months) {
126
+ return this.clone(date).add({
127
+ months
128
+ });
129
+ }
130
+ addCalendarDays(date, days) {
131
+ return this.clone(date).add({
132
+ days
133
+ });
134
+ }
135
+ toIso8601(date) {
136
+ return this.clone(date).format();
137
+ }
138
+ deserialize(value) {
139
+ let date;
140
+ if (value instanceof Date) {
141
+ date = this._createMoment(value).locale(this.locale);
142
+ } else if (this.isDateInstance(value)) {
143
+ return this.clone(value);
144
+ }
145
+ if (typeof value === 'string') {
146
+ if (!value) {
147
+ return null;
148
+ }
149
+ date = this._createMoment(value, moment.ISO_8601).locale(this.locale);
150
+ }
151
+ if (date && this.isValid(date)) {
152
+ return this._createMoment(date).locale(this.locale);
153
+ }
154
+ return super.deserialize(value);
155
+ }
156
+ isDateInstance(obj) {
157
+ return moment.isMoment(obj);
158
+ }
159
+ isValid(date) {
160
+ return this.clone(date).isValid();
161
+ }
162
+ invalid() {
163
+ return moment.invalid();
164
+ }
165
+ setTime(target, hours, minutes, seconds) {
166
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
167
+ if (hours < 0 || hours > 23) {
168
+ throw Error(`Invalid hours "${hours}". Hours value must be between 0 and 23.`);
169
+ }
170
+ if (minutes < 0 || minutes > 59) {
171
+ throw Error(`Invalid minutes "${minutes}". Minutes value must be between 0 and 59.`);
172
+ }
173
+ if (seconds < 0 || seconds > 59) {
174
+ throw Error(`Invalid seconds "${seconds}". Seconds value must be between 0 and 59.`);
175
+ }
176
+ }
177
+ return this.clone(target).set({
178
+ hours,
179
+ minutes,
180
+ seconds,
181
+ milliseconds: 0
182
+ });
183
+ }
184
+ getHours(date) {
185
+ return date.hours();
186
+ }
187
+ getMinutes(date) {
188
+ return date.minutes();
189
+ }
190
+ getSeconds(date) {
191
+ return date.seconds();
192
+ }
193
+ parseTime(value, parseFormat) {
194
+ return this.parse(value, parseFormat);
195
+ }
196
+ addSeconds(date, amount) {
197
+ return this.clone(date).add({
198
+ seconds: amount
199
+ });
200
+ }
201
+ _createMoment(date, format, locale) {
202
+ const {
203
+ strict,
204
+ useUtc
205
+ } = this._options || {};
206
+ return useUtc ? moment.utc(date, format, locale, strict) : moment(date, format, locale, strict);
207
+ }
208
+ static ɵfac = i0.ɵɵngDeclareFactory({
209
+ minVersion: "12.0.0",
210
+ version: "20.2.0-next.2",
211
+ ngImport: i0,
212
+ type: MomentDateAdapter,
213
+ deps: [],
214
+ target: i0.ɵɵFactoryTarget.Injectable
215
+ });
216
+ static ɵprov = i0.ɵɵngDeclareInjectable({
217
+ minVersion: "12.0.0",
218
+ version: "20.2.0-next.2",
219
+ ngImport: i0,
220
+ type: MomentDateAdapter
221
+ });
205
222
  }
206
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MomentDateAdapter, decorators: [{
207
- type: Injectable
208
- }], ctorParameters: () => [] });
223
+ i0.ɵɵngDeclareClassMetadata({
224
+ minVersion: "12.0.0",
225
+ version: "20.2.0-next.2",
226
+ ngImport: i0,
227
+ type: MomentDateAdapter,
228
+ decorators: [{
229
+ type: Injectable
230
+ }],
231
+ ctorParameters: () => []
232
+ });
209
233
 
210
234
  const MAT_MOMENT_DATE_FORMATS = {
211
- parse: {
212
- dateInput: 'l',
213
- timeInput: 'LT',
214
- },
215
- display: {
216
- dateInput: 'l',
217
- timeInput: 'LT',
218
- monthYearLabel: 'MMM YYYY',
219
- dateA11yLabel: 'LL',
220
- monthYearA11yLabel: 'MMMM YYYY',
221
- timeOptionLabel: 'LT',
222
- },
235
+ parse: {
236
+ dateInput: 'l',
237
+ timeInput: 'LT'
238
+ },
239
+ display: {
240
+ dateInput: 'l',
241
+ timeInput: 'LT',
242
+ monthYearLabel: 'MMM YYYY',
243
+ dateA11yLabel: 'LL',
244
+ monthYearA11yLabel: 'MMMM YYYY',
245
+ timeOptionLabel: 'LT'
246
+ }
223
247
  };
224
248
 
225
249
  class MomentDateModule {
226
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MomentDateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
227
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.2", ngImport: i0, type: MomentDateModule });
228
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MomentDateModule, providers: [
229
- {
230
- provide: DateAdapter,
231
- useClass: MomentDateAdapter,
232
- },
233
- ] });
250
+ static ɵfac = i0.ɵɵngDeclareFactory({
251
+ minVersion: "12.0.0",
252
+ version: "20.2.0-next.2",
253
+ ngImport: i0,
254
+ type: MomentDateModule,
255
+ deps: [],
256
+ target: i0.ɵɵFactoryTarget.NgModule
257
+ });
258
+ static ɵmod = i0.ɵɵngDeclareNgModule({
259
+ minVersion: "14.0.0",
260
+ version: "20.2.0-next.2",
261
+ ngImport: i0,
262
+ type: MomentDateModule
263
+ });
264
+ static ɵinj = i0.ɵɵngDeclareInjector({
265
+ minVersion: "12.0.0",
266
+ version: "20.2.0-next.2",
267
+ ngImport: i0,
268
+ type: MomentDateModule,
269
+ providers: [{
270
+ provide: DateAdapter,
271
+ useClass: MomentDateAdapter
272
+ }]
273
+ });
234
274
  }
235
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MomentDateModule, decorators: [{
236
- type: NgModule,
237
- args: [{
238
- providers: [
239
- {
240
- provide: DateAdapter,
241
- useClass: MomentDateAdapter,
242
- },
243
- ],
244
- }]
245
- }] });
275
+ i0.ɵɵngDeclareClassMetadata({
276
+ minVersion: "12.0.0",
277
+ version: "20.2.0-next.2",
278
+ ngImport: i0,
279
+ type: MomentDateModule,
280
+ decorators: [{
281
+ type: NgModule,
282
+ args: [{
283
+ providers: [{
284
+ provide: DateAdapter,
285
+ useClass: MomentDateAdapter
286
+ }]
287
+ }]
288
+ }]
289
+ });
246
290
  class MatMomentDateModule {
247
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatMomentDateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
248
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatMomentDateModule });
249
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatMomentDateModule, providers: [provideMomentDateAdapter()] });
291
+ static ɵfac = i0.ɵɵngDeclareFactory({
292
+ minVersion: "12.0.0",
293
+ version: "20.2.0-next.2",
294
+ ngImport: i0,
295
+ type: MatMomentDateModule,
296
+ deps: [],
297
+ target: i0.ɵɵFactoryTarget.NgModule
298
+ });
299
+ static ɵmod = i0.ɵɵngDeclareNgModule({
300
+ minVersion: "14.0.0",
301
+ version: "20.2.0-next.2",
302
+ ngImport: i0,
303
+ type: MatMomentDateModule
304
+ });
305
+ static ɵinj = i0.ɵɵngDeclareInjector({
306
+ minVersion: "12.0.0",
307
+ version: "20.2.0-next.2",
308
+ ngImport: i0,
309
+ type: MatMomentDateModule,
310
+ providers: [provideMomentDateAdapter()]
311
+ });
250
312
  }
251
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatMomentDateModule, decorators: [{
252
- type: NgModule,
253
- args: [{
254
- providers: [provideMomentDateAdapter()],
255
- }]
256
- }] });
313
+ i0.ɵɵngDeclareClassMetadata({
314
+ minVersion: "12.0.0",
315
+ version: "20.2.0-next.2",
316
+ ngImport: i0,
317
+ type: MatMomentDateModule,
318
+ decorators: [{
319
+ type: NgModule,
320
+ args: [{
321
+ providers: [provideMomentDateAdapter()]
322
+ }]
323
+ }]
324
+ });
257
325
  function provideMomentDateAdapter(formats = MAT_MOMENT_DATE_FORMATS, options) {
258
- const providers = [
259
- {
260
- provide: DateAdapter,
261
- useClass: MomentDateAdapter,
262
- },
263
- { provide: MAT_DATE_FORMATS, useValue: formats },
264
- ];
265
- if (options) {
266
- providers.push({ provide: MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: options });
267
- }
268
- return providers;
326
+ const providers = [{
327
+ provide: DateAdapter,
328
+ useClass: MomentDateAdapter
329
+ }, {
330
+ provide: MAT_DATE_FORMATS,
331
+ useValue: formats
332
+ }];
333
+ if (options) {
334
+ providers.push({
335
+ provide: MAT_MOMENT_DATE_ADAPTER_OPTIONS,
336
+ useValue: options
337
+ });
338
+ }
339
+ return providers;
269
340
  }
270
341
 
271
342
  export { MAT_MOMENT_DATE_ADAPTER_OPTIONS, MAT_MOMENT_DATE_FORMATS, MatMomentDateModule, MomentDateAdapter, MomentDateModule, provideMomentDateAdapter };
@@ -1 +1 @@
1
- {"version":3,"file":"material-moment-adapter.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material-moment-adapter/adapter/moment-date-adapter.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material-moment-adapter/adapter/moment-date-formats.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/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: () => ({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: unknown, 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: unknown): 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: unknown): obj is Moment {\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: unknown, 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 {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} 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 },\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 },\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;AAkBvC;MACa,+BAA+B,GAAG,IAAI,cAAc,CAC/D,iCAAiC,EACjC;AACE,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,OAAO,EAAC,MAAM,EAAE,KAAK,EAAC,CAAC;AACjC,CAAA;AAGH;AACA,SAAS,KAAK,CAAI,MAAc,EAAE,aAAmC,EAAA;AACnE,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;AACjC,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;;AAEnC,IAAA,OAAO,WAAW;AACpB;AAEA;AAEM,MAAO,iBAAkB,SAAQ,WAAmB,CAAA;AAChD,IAAA,QAAQ,G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A;;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;AAC5B,SAAA;AACD,QAAA,EAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,EAAC;KAC/C;IAED,IAAI,OAAO,EAAE;AACX,QAAA,SAAS,CAAC,IAAI,CAAC,EAAC,OAAO,EAAE,+BAA+B,EAAE,QAAQ,EAAE,OAAO,EAAC,CAAC;;AAG/E,IAAA,OAAO,SAAS;AAClB;;;;"}
1
+ {"version":3,"file":"material-moment-adapter.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material-moment-adapter/adapter/moment-date-adapter.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material-moment-adapter/adapter/moment-date-formats.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/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: () => ({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: unknown, 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: unknown): 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: unknown): obj is Moment {\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: unknown, 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 {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} 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 },\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 },\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":["moment","_rollupMoment","_moment","MAT_MOMENT_DATE_ADAPTER_OPTIONS","InjectionToken","providedIn","factory","useUtc","range","length","valueFunction","valuesArray","Array","i","MomentDateAdapter","DateAdapter","_options","inject","optional","_localeData","constructor","dateLocale","MAT_DATE_LOCALE","setLocale","locale","momentLocaleData","localeData","firstDayOfWeek","longMonths","months","shortMonths","monthsShort","dates","createDate","format","longDaysOfWeek","weekdays","shortDaysOfWeek","weekdaysShort","narrowDaysOfWeek","weekdaysMin","getYear","date","clone","year","getMonth","month","getDate","getDayOfWeek","day","getMonthNames","style","getDateNames","getDayOfWeekNames","getYearName","getFirstDayOfWeek","getNumDaysInMonth","daysInMonth","ngDevMode","Error","result","_createMoment","isValid","today","parse","value","parseFormat","displayFormat","addCalendarYears","years","add","addCalendarMonths","addCalendarDays","days","toIso8601","deserialize","Date","isDateInstance","ISO_8601","obj","isMoment","invalid","setTime","target","hours","minutes","seconds","set","milliseconds","getHours","getMinutes","getSeconds","parseTime","addSeconds","amount","strict","utc","deps","i0","ɵɵFactoryTarget","Injectable","decorators","MAT_MOMENT_DATE_FORMATS","dateInput","timeInput","display","monthYearLabel","dateA11yLabel","monthYearA11yLabel","timeOptionLabel","MomentDateModule","NgModule","ɵinj","ɵɵngDeclareInjector","minVersion","version","ngImport","type","providers","provide","useClass","args","MatMomentDateModule","provideMomentDateAdapter","formats","options","MAT_DATE_FORMATS","useValue","push"],"mappings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CAACK,wBAAwB,EAAE;KACvC;;;SAGeA,wBAAwBA,CACtCC,OAA0B,GAAAtB,uBAAuB,EACjDuB,OAAqC,EAAA;EAErC,MAAMP,SAAS,GAAe,CAC5B;AACEC,IAAAA,OAAO,EAAExG,WAAW;AACpByG,IAAAA,QAAQ,EAAE1G;AACX,GAAA,EACD;AAACyG,IAAAA,OAAO,EAAEO,gBAAgB;AAAEC,IAAAA,QAAQ,EAAEH;AAAQ,GAAA,CAC/C;AAED,EAAA,IAAIC,OAAO,EAAE;IACXP,SAAS,CAACU,IAAI,CAAC;AAACT,MAAAA,OAAO,EAAEpH,+BAA+B;AAAE4H,MAAAA,QAAQ,EAAEF;AAAO,KAAC,CAAC;AAC/E;AAEA,EAAA,OAAOP,SAAS;AAClB;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/material-moment-adapter",
3
- "version": "21.0.0-next.9",
3
+ "version": "21.0.0-rc.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": "21.0.0-next.9",
15
+ "@angular/material": "21.0.0-rc.1",
16
16
  "@angular/core": "^21.0.0-0 || ^21.1.0-0 || ^21.2.0-0 || ^21.3.0-0 || ^22.0.0-0",
17
17
  "moment": "^2.18.1"
18
18
  },