@angular/material 20.2.7 → 20.2.9
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.
- package/datepicker/index.d.ts +34 -34
- package/fesm2022/animation.mjs.map +1 -1
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge/testing.mjs.map +1 -1
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +2 -2
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card/testing.mjs.map +1 -1
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox/testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +2 -2
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/common-module.mjs.map +1 -1
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/date-formats.mjs.map +1 -1
- package/fesm2022/date-range-input-harness.mjs.map +1 -1
- package/fesm2022/datepicker/testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +71 -72
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog-module.mjs.map +1 -1
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider/testing.mjs.map +1 -1
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/error-options.mjs.map +1 -1
- package/fesm2022/error-state.mjs.map +1 -1
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field/testing/control.mjs.map +1 -1
- package/fesm2022/form-field/testing.mjs.map +1 -1
- package/fesm2022/form-field-module.mjs.map +1 -1
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/form-field2.mjs.map +1 -1
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon-button.mjs.map +1 -1
- package/fesm2022/icon-registry.mjs.map +1 -1
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/input-harness.mjs.map +1 -1
- package/fesm2022/input-value-accessor.mjs.map +1 -1
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/internal-form-field.mjs.map +1 -1
- package/fesm2022/line.mjs.map +1 -1
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs +2 -2
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/material.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/option-harness.mjs.map +1 -1
- package/fesm2022/option-module.mjs.map +1 -1
- package/fesm2022/option.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/pseudo-checkbox-module.mjs.map +1 -1
- package/fesm2022/pseudo-checkbox.mjs.map +1 -1
- package/fesm2022/public-api.mjs.map +1 -1
- package/fesm2022/radio/testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +2 -2
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/ripple-loader.mjs.map +1 -1
- package/fesm2022/ripple-module.mjs.map +1 -1
- package/fesm2022/ripple.mjs.map +1 -1
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/select-module.mjs.map +1 -1
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +2 -2
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +2 -2
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/structural-styles.mjs.map +1 -1
- package/fesm2022/table/testing.mjs.map +1 -1
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +15 -9
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar/testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip/testing.mjs.map +1 -1
- package/fesm2022/tooltip-module.mjs.map +1 -1
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tooltip2.mjs.map +1 -1
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/timepicker/index.d.ts +2 -0
package/datepicker/index.d.ts
CHANGED
|
@@ -403,7 +403,7 @@ declare class MatMonthView<D> implements AfterContentInit, OnChanges, OnDestroy
|
|
|
403
403
|
set maxDate(value: D | null);
|
|
404
404
|
private _maxDate;
|
|
405
405
|
/** Function used to filter which dates are selectable. */
|
|
406
|
-
dateFilter: (date: D) => boolean;
|
|
406
|
+
dateFilter: ((date: D) => boolean) | null | undefined;
|
|
407
407
|
/** Function that can be used to add custom CSS classes to dates. */
|
|
408
408
|
dateClass: MatCalendarCellClassFunction<D>;
|
|
409
409
|
/** Start of the comparison range. */
|
|
@@ -432,33 +432,33 @@ declare class MatMonthView<D> implements AfterContentInit, OnChanges, OnDestroy
|
|
|
432
432
|
/** The body of calendar table */
|
|
433
433
|
_matCalendarBody: MatCalendarBody;
|
|
434
434
|
/** The label for this month (e.g. "January 2017"). */
|
|
435
|
-
_monthLabel: string
|
|
435
|
+
_monthLabel: i0.WritableSignal<string>;
|
|
436
436
|
/** Grid of calendar cells representing the dates of the month. */
|
|
437
|
-
_weeks: MatCalendarCell[][]
|
|
437
|
+
_weeks: i0.WritableSignal<MatCalendarCell<any>[][]>;
|
|
438
438
|
/** The number of blank cells in the first row before the 1st of the month. */
|
|
439
|
-
_firstWeekOffset: number
|
|
439
|
+
_firstWeekOffset: i0.WritableSignal<number>;
|
|
440
440
|
/** Start value of the currently-shown date range. */
|
|
441
|
-
_rangeStart: number | null
|
|
441
|
+
_rangeStart: i0.WritableSignal<number | null>;
|
|
442
442
|
/** End value of the currently-shown date range. */
|
|
443
|
-
_rangeEnd: number | null
|
|
443
|
+
_rangeEnd: i0.WritableSignal<number | null>;
|
|
444
444
|
/** Start value of the currently-shown comparison date range. */
|
|
445
|
-
_comparisonRangeStart: number | null
|
|
445
|
+
_comparisonRangeStart: i0.WritableSignal<number | null>;
|
|
446
446
|
/** End value of the currently-shown comparison date range. */
|
|
447
|
-
_comparisonRangeEnd: number | null
|
|
447
|
+
_comparisonRangeEnd: i0.WritableSignal<number | null>;
|
|
448
448
|
/** Start of the preview range. */
|
|
449
|
-
_previewStart: number | null
|
|
449
|
+
_previewStart: i0.WritableSignal<number | null>;
|
|
450
450
|
/** End of the preview range. */
|
|
451
|
-
_previewEnd: number | null
|
|
451
|
+
_previewEnd: i0.WritableSignal<number | null>;
|
|
452
452
|
/** Whether the user is currently selecting a range of dates. */
|
|
453
|
-
_isRange: boolean
|
|
453
|
+
_isRange: i0.WritableSignal<boolean>;
|
|
454
454
|
/** The date of the month that today falls on. Null if today is in another month. */
|
|
455
|
-
_todayDate: number | null
|
|
455
|
+
_todayDate: i0.WritableSignal<number | null>;
|
|
456
456
|
/** The names of the weekdays. */
|
|
457
|
-
_weekdays: {
|
|
457
|
+
_weekdays: i0.WritableSignal<{
|
|
458
458
|
long: string;
|
|
459
459
|
narrow: string;
|
|
460
460
|
id: number;
|
|
461
|
-
}[]
|
|
461
|
+
}[]>;
|
|
462
462
|
constructor(...args: unknown[]);
|
|
463
463
|
ngAfterContentInit(): void;
|
|
464
464
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -555,7 +555,7 @@ declare class MatMultiYearView<D> implements AfterContentInit, OnDestroy {
|
|
|
555
555
|
set maxDate(value: D | null);
|
|
556
556
|
private _maxDate;
|
|
557
557
|
/** A function used to filter which dates are selectable. */
|
|
558
|
-
dateFilter: (date: D) => boolean;
|
|
558
|
+
dateFilter: ((date: D) => boolean) | null | undefined;
|
|
559
559
|
/** Function that can be used to add custom CSS classes to date cells. */
|
|
560
560
|
dateClass: MatCalendarCellClassFunction<D>;
|
|
561
561
|
/** Emits when a new year is selected. */
|
|
@@ -567,11 +567,11 @@ declare class MatMultiYearView<D> implements AfterContentInit, OnDestroy {
|
|
|
567
567
|
/** The body of calendar table */
|
|
568
568
|
_matCalendarBody: MatCalendarBody;
|
|
569
569
|
/** Grid of calendar cells representing the currently displayed years. */
|
|
570
|
-
_years: MatCalendarCell[][]
|
|
570
|
+
_years: i0.WritableSignal<MatCalendarCell<any>[][]>;
|
|
571
571
|
/** The year that today falls on. */
|
|
572
|
-
_todayYear: number
|
|
572
|
+
_todayYear: i0.WritableSignal<number>;
|
|
573
573
|
/** The year of the selected date. Null if the selected date is null. */
|
|
574
|
-
_selectedYear: number | null
|
|
574
|
+
_selectedYear: i0.WritableSignal<number | null>;
|
|
575
575
|
constructor(...args: unknown[]);
|
|
576
576
|
ngAfterContentInit(): void;
|
|
577
577
|
ngOnDestroy(): void;
|
|
@@ -645,7 +645,7 @@ declare class MatYearView<D> implements AfterContentInit, OnDestroy {
|
|
|
645
645
|
set maxDate(value: D | null);
|
|
646
646
|
private _maxDate;
|
|
647
647
|
/** A function used to filter which dates are selectable. */
|
|
648
|
-
dateFilter: (date: D) => boolean;
|
|
648
|
+
dateFilter: ((date: D) => boolean) | null | undefined;
|
|
649
649
|
/** Function that can be used to add custom CSS classes to date cells. */
|
|
650
650
|
dateClass: MatCalendarCellClassFunction<D>;
|
|
651
651
|
/** Emits when a new month is selected. */
|
|
@@ -657,16 +657,16 @@ declare class MatYearView<D> implements AfterContentInit, OnDestroy {
|
|
|
657
657
|
/** The body of calendar table */
|
|
658
658
|
_matCalendarBody: MatCalendarBody;
|
|
659
659
|
/** Grid of calendar cells representing the months of the year. */
|
|
660
|
-
_months: MatCalendarCell[][]
|
|
660
|
+
_months: i0.WritableSignal<MatCalendarCell<any>[][]>;
|
|
661
661
|
/** The label for this year (e.g. "2017"). */
|
|
662
|
-
_yearLabel: string
|
|
662
|
+
_yearLabel: i0.WritableSignal<string>;
|
|
663
663
|
/** The month in this year that today falls on. Null if today is in a different year. */
|
|
664
|
-
_todayMonth: number | null
|
|
664
|
+
_todayMonth: i0.WritableSignal<number | null>;
|
|
665
665
|
/**
|
|
666
666
|
* The month in this year that the selected Date falls on.
|
|
667
667
|
* Null if the selected Date is in a different year.
|
|
668
668
|
*/
|
|
669
|
-
_selectedMonth: number | null
|
|
669
|
+
_selectedMonth: i0.WritableSignal<number | null>;
|
|
670
670
|
constructor(...args: unknown[]);
|
|
671
671
|
ngAfterContentInit(): void;
|
|
672
672
|
ngOnDestroy(): void;
|
|
@@ -812,7 +812,7 @@ declare class MatCalendar<D> implements AfterContentInit, AfterViewChecked, OnDe
|
|
|
812
812
|
set maxDate(value: D | null);
|
|
813
813
|
private _maxDate;
|
|
814
814
|
/** Function used to filter which dates are selectable. */
|
|
815
|
-
dateFilter
|
|
815
|
+
dateFilter?: ((date: D) => boolean) | null;
|
|
816
816
|
/** Function that can be used to add custom CSS classes to dates. */
|
|
817
817
|
dateClass: MatCalendarCellClassFunction<D>;
|
|
818
818
|
/** Start of the comparison range. */
|
|
@@ -967,7 +967,7 @@ declare abstract class MatDatepickerInputBase<S, D = ExtractDateTypeFromSelectio
|
|
|
967
967
|
/** Gets the maximum date for the input. Used for validation. */
|
|
968
968
|
abstract _getMaxDate(): D | null;
|
|
969
969
|
/** Gets the date filter function. Used for validation. */
|
|
970
|
-
protected abstract _getDateFilter(): DateFilterFn<D> | undefined;
|
|
970
|
+
protected abstract _getDateFilter(): DateFilterFn<D> | null | undefined;
|
|
971
971
|
/** Registers a date selection model with the input. */
|
|
972
972
|
_registerModel(model: MatDateSelectionModel<S, D>): void;
|
|
973
973
|
/** Opens the popup associated with the input. */
|
|
@@ -1122,7 +1122,7 @@ interface MatDatepickerControl<D> {
|
|
|
1122
1122
|
min: D | null;
|
|
1123
1123
|
max: D | null;
|
|
1124
1124
|
disabled: boolean;
|
|
1125
|
-
dateFilter: DateFilterFn<D
|
|
1125
|
+
dateFilter: DateFilterFn<D> | null | undefined;
|
|
1126
1126
|
getConnectedOverlayOrigin(): ElementRef;
|
|
1127
1127
|
getOverlayLabelId(): string | null;
|
|
1128
1128
|
stateChanges: Observable<void>;
|
|
@@ -1238,7 +1238,7 @@ declare abstract class MatDatepickerBase<C extends MatDatepickerControl<D>, S, D
|
|
|
1238
1238
|
_getMinDate(): D | null;
|
|
1239
1239
|
/** The maximum selectable date. */
|
|
1240
1240
|
_getMaxDate(): D | null;
|
|
1241
|
-
_getDateFilter(): DateFilterFn<D
|
|
1241
|
+
_getDateFilter(): DateFilterFn<D> | null | undefined;
|
|
1242
1242
|
/** A reference to the overlay into which we've rendered the calendar. */
|
|
1243
1243
|
private _overlayRef;
|
|
1244
1244
|
/** Reference to the component instance rendered in the overlay. */
|
|
@@ -1338,8 +1338,8 @@ declare class MatDatepickerInput<D> extends MatDatepickerInputBase<D | null, D>
|
|
|
1338
1338
|
set max(value: D | null);
|
|
1339
1339
|
private _max;
|
|
1340
1340
|
/** Function that can be used to filter out dates within the datepicker. */
|
|
1341
|
-
get dateFilter(): DateFilterFn<D | null
|
|
1342
|
-
set dateFilter(value: DateFilterFn<D | null>);
|
|
1341
|
+
get dateFilter(): DateFilterFn<D | null> | null | undefined;
|
|
1342
|
+
set dateFilter(value: DateFilterFn<D | null> | null | undefined);
|
|
1343
1343
|
private _dateFilter;
|
|
1344
1344
|
/** The combined form control validator for this input. */
|
|
1345
1345
|
protected _validator: ValidatorFn | null;
|
|
@@ -1365,7 +1365,7 @@ declare class MatDatepickerInput<D> extends MatDatepickerInputBase<D | null, D>
|
|
|
1365
1365
|
/** Gets the input's maximum date. */
|
|
1366
1366
|
_getMaxDate(): D | null;
|
|
1367
1367
|
/** Gets the input's date filtering function. */
|
|
1368
|
-
protected _getDateFilter(): DateFilterFn<D | null
|
|
1368
|
+
protected _getDateFilter(): DateFilterFn<D | null> | null | undefined;
|
|
1369
1369
|
protected _shouldHandleChangeEvent(event: DateSelectionModelChange<D>): boolean;
|
|
1370
1370
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerInput<any>, never>;
|
|
1371
1371
|
static ɵdir: i0.ɵɵDirectiveDeclaration<MatDatepickerInput<any>, "input[matDatepicker]", ["matDatepickerInput"], { "matDatepicker": { "alias": "matDatepicker"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "dateFilter": { "alias": "matDatepickerFilter"; "required": false; }; }, {}, never, never, true, never>;
|
|
@@ -1511,7 +1511,7 @@ declare abstract class MatDateRangeInputPartBase<D> extends MatDatepickerInputBa
|
|
|
1511
1511
|
/** Gets the maximum date from the range input. */
|
|
1512
1512
|
_getMaxDate(): D | null;
|
|
1513
1513
|
/** Gets the date filter function from the range input. */
|
|
1514
|
-
protected _getDateFilter(): DateFilterFn<D
|
|
1514
|
+
protected _getDateFilter(): DateFilterFn<D> | null | undefined;
|
|
1515
1515
|
protected _parentDisabled(): boolean;
|
|
1516
1516
|
protected _shouldHandleChangeEvent({ source }: DateSelectionModelChange<DateRange<D>>): boolean;
|
|
1517
1517
|
protected _assignValueProgrammatically(value: D | null): void;
|
|
@@ -1602,9 +1602,9 @@ declare class MatDateRangeInput<D> implements MatFormFieldControl<DateRange<D>>,
|
|
|
1602
1602
|
set required(value: boolean);
|
|
1603
1603
|
private _required;
|
|
1604
1604
|
/** Function that can be used to filter out dates within the date range picker. */
|
|
1605
|
-
get dateFilter(): DateFilterFn<D
|
|
1606
|
-
set dateFilter(value: DateFilterFn<D>);
|
|
1607
|
-
private _dateFilter
|
|
1605
|
+
get dateFilter(): DateFilterFn<D> | null | undefined;
|
|
1606
|
+
set dateFilter(value: DateFilterFn<D> | null | undefined);
|
|
1607
|
+
private _dateFilter?;
|
|
1608
1608
|
/** The minimum valid date. */
|
|
1609
1609
|
get min(): D | null;
|
|
1610
1610
|
set min(value: D | null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"animation.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/core/animation/animation.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 {MediaMatcher} from '@angular/cdk/layout';\nimport {ANIMATION_MODULE_TYPE, inject, InjectionToken} from '@angular/core';\n\n/** Object used to configure the animation in Angular Material. */\nexport interface AnimationsConfig {\n /** Whether all animations should be disabled. */\n animationsDisabled?: boolean;\n}\n\n/** Injection token used to configure the animations in Angular Material. */\nexport const MATERIAL_ANIMATIONS = new InjectionToken<AnimationsConfig>('MATERIAL_ANIMATIONS');\n\n/**\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n * @docs-private\n */\nexport class AnimationCurves {\n static STANDARD_CURVE = 'cubic-bezier(0.4,0.0,0.2,1)';\n static DECELERATION_CURVE = 'cubic-bezier(0.0,0.0,0.2,1)';\n static ACCELERATION_CURVE = 'cubic-bezier(0.4,0.0,1,1)';\n static SHARP_CURVE = 'cubic-bezier(0.4,0.0,0.6,1)';\n}\n\n/**\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n * @docs-private\n */\nexport class AnimationDurations {\n static COMPLEX = '375ms';\n static ENTERING = '225ms';\n static EXITING = '195ms';\n}\n\nlet reducedMotion: boolean | null = null;\n\n/**\n * Gets the the configured animations state.\n * @docs-private\n */\nexport function _getAnimationsState(): 'enabled' | 'di-disabled' | 'reduced-motion' {\n if (\n inject(MATERIAL_ANIMATIONS, {optional: true})?.animationsDisabled ||\n inject(ANIMATION_MODULE_TYPE, {optional: true}) === 'NoopAnimations'\n ) {\n return 'di-disabled';\n }\n\n reducedMotion ??= inject(MediaMatcher).matchMedia('(prefers-reduced-motion)').matches;\n return reducedMotion ? 'reduced-motion' : 'enabled';\n}\n\n/**\n * Returns whether animations have been disabled by DI. Must be called in a DI context.\n * @docs-private\n */\nexport function _animationsDisabled(): boolean {\n return _getAnimationsState() !== 'enabled';\n}\n"],"names":[],"mappings":";;;AAiBA;MACa,mBAAmB,GAAG,IAAI,cAAc,CAAmB,qBAAqB;AAE7F;;;;AAIG;MACU,eAAe,CAAA;AAC1B,IAAA,OAAO,cAAc,GAAG,6BAA6B;AACrD,IAAA,OAAO,kBAAkB,GAAG,6BAA6B;AACzD,IAAA,OAAO,kBAAkB,GAAG,2BAA2B;AACvD,IAAA,OAAO,WAAW,GAAG,6BAA6B;;AAGpD;;;;AAIG;MACU,kBAAkB,CAAA;AAC7B,IAAA,OAAO,OAAO,GAAG,OAAO;AACxB,IAAA,OAAO,QAAQ,GAAG,OAAO;AACzB,IAAA,OAAO,OAAO,GAAG,OAAO;;AAG1B,IAAI,aAAa,GAAmB,IAAI;AAExC;;;AAGG;SACa,mBAAmB,GAAA;IACjC,IACE,MAAM,CAAC,mBAAmB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,EAAE,kBAAkB;AACjE,QAAA,MAAM,CAAC,qBAAqB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,KAAK,gBAAgB,EACpE;AACA,QAAA,OAAO,aAAa;;AAGtB,IAAA,aAAa,KAAK,MAAM,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC,OAAO;IACrF,OAAO,aAAa,GAAG,gBAAgB,GAAG,SAAS;AACrD;AAEA;;;AAGG;SACa,mBAAmB,GAAA;AACjC,IAAA,OAAO,mBAAmB,EAAE,KAAK,SAAS;AAC5C;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.mjs","sources":["../../../../../../
|
|
1
|
+
{"version":3,"file":"testing.mjs","sources":["../../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/autocomplete/testing/autocomplete-harness.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 {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n TestElement,\n} from '@angular/cdk/testing';\nimport {\n MatOptgroupHarness,\n MatOptionHarness,\n OptgroupHarnessFilters,\n OptionHarnessFilters,\n} from '../../core/testing';\nimport {AutocompleteHarnessFilters} from './autocomplete-harness-filters';\n\nexport class MatAutocompleteHarness extends ComponentHarness {\n private _documentRootLocator = this.documentRootLocatorFactory();\n\n /** The selector for the host element of a `MatAutocomplete` instance. */\n static hostSelector = '.mat-mdc-autocomplete-trigger';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for an autocomplete with specific\n * attributes.\n * @param options Options for filtering which autocomplete instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatAutocompleteHarness>(\n this: ComponentHarnessConstructor<T>,\n options: AutocompleteHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options)\n .addOption('value', options.value, (harness, value) =>\n HarnessPredicate.stringMatches(harness.getValue(), value),\n )\n .addOption('disabled', options.disabled, async (harness, disabled) => {\n return (await harness.isDisabled()) === disabled;\n });\n }\n\n /** Gets the value of the autocomplete input. */\n async getValue(): Promise<string> {\n return (await this.host()).getProperty<string>('value');\n }\n\n /** Whether the autocomplete input is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this.host()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Focuses the autocomplete input. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the autocomplete input. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the autocomplete input is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /** Enters text into the autocomplete. */\n async enterText(value: string): Promise<void> {\n return (await this.host()).sendKeys(value);\n }\n\n /** Clears the input value. */\n async clear(): Promise<void> {\n return (await this.host()).clear();\n }\n\n /** Gets the options inside the autocomplete panel. */\n async getOptions(filters?: Omit<OptionHarnessFilters, 'ancestor'>): Promise<MatOptionHarness[]> {\n if (!(await this.isOpen())) {\n throw new Error('Unable to retrieve options for autocomplete. Autocomplete panel is closed.');\n }\n\n return this._documentRootLocator.locatorForAll(\n MatOptionHarness.with({\n ...(filters || {}),\n ancestor: await this._getPanelSelector(),\n } as OptionHarnessFilters),\n )();\n }\n\n /** Gets the option groups inside the autocomplete panel. */\n async getOptionGroups(\n filters?: Omit<OptgroupHarnessFilters, 'ancestor'>,\n ): Promise<MatOptgroupHarness[]> {\n if (!(await this.isOpen())) {\n throw new Error(\n 'Unable to retrieve option groups for autocomplete. Autocomplete panel is closed.',\n );\n }\n\n return this._documentRootLocator.locatorForAll(\n MatOptgroupHarness.with({\n ...(filters || {}),\n ancestor: await this._getPanelSelector(),\n } as OptgroupHarnessFilters),\n )();\n }\n\n /** Selects the first option matching the given filters. */\n async selectOption(filters: OptionHarnessFilters): Promise<void> {\n await this.focus(); // Focus the input to make sure the autocomplete panel is shown.\n const options = await this.getOptions(filters);\n if (!options.length) {\n throw Error(`Could not find a mat-option matching ${JSON.stringify(filters)}`);\n }\n await options[0].click();\n }\n\n /** Whether the autocomplete is open. */\n async isOpen(): Promise<boolean> {\n const panel = await this._getPanel();\n return !!panel && (await panel.hasClass(`mat-mdc-autocomplete-visible`));\n }\n\n /** Gets the panel associated with this autocomplete trigger. */\n private async _getPanel(): Promise<TestElement | null> {\n // Technically this is static, but it needs to be in a\n // function, because the autocomplete's panel ID can changed.\n return this._documentRootLocator.locatorForOptional(await this._getPanelSelector())();\n }\n\n /** Gets the selector that can be used to find the autocomplete trigger's panel. */\n protected async _getPanelSelector(): Promise<string> {\n return `#${await (await this.host()).getAttribute('aria-controls')}`;\n }\n}\n"],"names":[],"mappings":";;;;;AAuBM,MAAO,sBAAuB,SAAQ,gBAAgB,CAAA;AAClD,IAAA,oBAAoB,GAAG,IAAI,CAAC,0BAA0B,EAAE;;AAGhE,IAAA,OAAO,YAAY,GAAG,+BAA+B;AAErD;;;;;AAKG;AACH,IAAA,OAAO,IAAI,CAET,OAAA,GAAsC,EAAE,EAAA;AAExC,QAAA,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAE,OAAO;aACtC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,KAChD,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC;AAE1D,aAAA,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,OAAO,EAAE,QAAQ,KAAI;YACnE,O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