@angular/material-experimental 14.0.0-rc.1 → 14.0.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.
Files changed (51) hide show
  1. package/esm2020/mdc-chips/chip-action.mjs +42 -76
  2. package/esm2020/mdc-chips/chip-grid.mjs +58 -69
  3. package/esm2020/mdc-chips/chip-icons.mjs +18 -32
  4. package/esm2020/mdc-chips/chip-input.mjs +2 -5
  5. package/esm2020/mdc-chips/chip-listbox.mjs +21 -63
  6. package/esm2020/mdc-chips/chip-option.mjs +36 -81
  7. package/esm2020/mdc-chips/chip-row.mjs +50 -74
  8. package/esm2020/mdc-chips/chip-set.mjs +116 -117
  9. package/esm2020/mdc-chips/chip.mjs +80 -165
  10. package/esm2020/mdc-chips/module.mjs +2 -2
  11. package/esm2020/mdc-chips/public-api.mjs +2 -2
  12. package/esm2020/mdc-chips/tokens.mjs +33 -0
  13. package/esm2020/mdc-list/list-base.mjs +1 -9
  14. package/esm2020/mdc-list/list-option.mjs +37 -19
  15. package/esm2020/mdc-list/selection-list.mjs +121 -121
  16. package/esm2020/mdc-progress-bar/progress-bar.mjs +38 -102
  17. package/esm2020/mdc-radio/radio.mjs +2 -2
  18. package/esm2020/mdc-snack-bar/snack-bar-container.mjs +23 -205
  19. package/esm2020/version.mjs +1 -1
  20. package/fesm2015/material-experimental.mjs +1 -1
  21. package/fesm2015/material-experimental.mjs.map +1 -1
  22. package/fesm2015/mdc-chips.mjs +510 -766
  23. package/fesm2015/mdc-chips.mjs.map +1 -1
  24. package/fesm2015/mdc-list.mjs +158 -344
  25. package/fesm2015/mdc-list.mjs.map +1 -1
  26. package/fesm2015/mdc-progress-bar.mjs +36 -100
  27. package/fesm2015/mdc-progress-bar.mjs.map +1 -1
  28. package/fesm2015/mdc-radio.mjs +2 -2
  29. package/fesm2015/mdc-radio.mjs.map +1 -1
  30. package/fesm2015/mdc-snack-bar.mjs +27 -208
  31. package/fesm2015/mdc-snack-bar.mjs.map +1 -1
  32. package/fesm2020/material-experimental.mjs +1 -1
  33. package/fesm2020/material-experimental.mjs.map +1 -1
  34. package/fesm2020/mdc-chips.mjs +413 -672
  35. package/fesm2020/mdc-chips.mjs.map +1 -1
  36. package/fesm2020/mdc-list.mjs +157 -333
  37. package/fesm2020/mdc-list.mjs.map +1 -1
  38. package/fesm2020/mdc-progress-bar.mjs +36 -99
  39. package/fesm2020/mdc-progress-bar.mjs.map +1 -1
  40. package/fesm2020/mdc-radio.mjs +2 -2
  41. package/fesm2020/mdc-radio.mjs.map +1 -1
  42. package/fesm2020/mdc-snack-bar.mjs +27 -206
  43. package/fesm2020/mdc-snack-bar.mjs.map +1 -1
  44. package/mdc-chips/index.d.ts +102 -162
  45. package/mdc-list/index.d.ts +42 -66
  46. package/mdc-progress-bar/index.d.ts +14 -17
  47. package/mdc-snack-bar/index.d.ts +4 -68
  48. package/package.json +8 -8
  49. package/esm2020/mdc-chips/chip-default-options.mjs +0 -11
  50. package/esm2020/mdc-chips/emit-event.mjs +0 -27
  51. package/esm2020/mdc-list/interactive-list-base.mjs +0 -196
@@ -13,8 +13,6 @@ import { InjectionToken } from '@angular/core';
13
13
  import { MAT_LIST } from '@angular/material/list';
14
14
  import { MAT_NAV_LIST } from '@angular/material/list';
15
15
  import { MAT_SELECTION_LIST_VALUE_ACCESSOR } from '@angular/material/list';
16
- import { MDCListAdapter } from '@material/list';
17
- import { MDCListFoundation } from '@material/list';
18
16
  import { NgZone } from '@angular/core';
19
17
  import { OnChanges } from '@angular/core';
20
18
  import { OnDestroy } from '@angular/core';
@@ -100,42 +98,6 @@ export declare class MatActionList extends MatListBase {
100
98
  static ɵcmp: i0.ɵɵComponentDeclaration<MatActionList, "mat-action-list", ["matActionList"], {}, {}, never, ["*"], false>;
101
99
  }
102
100
 
103
- declare abstract class MatInteractiveListBase<T extends MatListItemBase> extends MatListBase implements AfterViewInit, OnDestroy {
104
- _element: ElementRef<HTMLElement>;
105
- _handleKeydown(event: KeyboardEvent): void;
106
- _handleClick(event: MouseEvent): void;
107
- _handleFocusin(event: FocusEvent): void;
108
- _handleFocusout(event: FocusEvent): void;
109
- /** Items in the interactive list. */
110
- abstract _items: QueryList<T>;
111
- _itemsArr: T[];
112
- _document: Document;
113
- protected _foundation: MDCListFoundation;
114
- protected _adapter: MDCListAdapter;
115
- private _subscriptions;
116
- protected constructor(_element: ElementRef<HTMLElement>, document: any);
117
- protected _initWithAdapter(adapter: MDCListAdapter): void;
118
- ngAfterViewInit(): void;
119
- ngOnDestroy(): void;
120
- protected _watchListItems(): void;
121
- /**
122
- * Clears the tabindex of all items so that no items are reachable through tab key.
123
- * MDC intends to always have only one tabbable item that will receive focus first.
124
- * This first item is selected by MDC automatically on blur or by manually invoking
125
- * the `setTabindexToFirstSelectedOrFocusedItem` method.
126
- */
127
- private _clearTabindexForAllItems;
128
- /**
129
- * Resets tabindex for all options and sets tabindex for the first selected option or
130
- * previously focused item so that an item can be reached when users tab into the list.
131
- */
132
- protected _resetTabindexToFirstSelectedOrFocusedItem(): void;
133
- _elementAtIndex(index: number): HTMLElement | undefined;
134
- _indexForElement(element: Element | null): number;
135
- static ɵfac: i0.ɵɵFactoryDeclaration<MatInteractiveListBase<any>, never>;
136
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatInteractiveListBase<any>, never, never, {}, {}, never, never, false>;
137
- }
138
-
139
101
  export declare class MatList extends MatListBase {
140
102
  static ɵfac: i0.ɵɵFactoryDeclaration<MatList, never>;
141
103
  static ɵcmp: i0.ɵɵComponentDeclaration<MatList, "mat-list", ["matList"], {}, {}, never, ["*"], false>;
@@ -235,11 +197,9 @@ declare abstract class MatListItemBase implements AfterViewInit, OnDestroy, Ripp
235
197
  * @docs-private
236
198
  */
237
199
  get rippleDisabled(): boolean;
238
- protected constructor(_elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, _listBase: MatListBase, _platform: Platform, globalRippleOptions?: RippleGlobalOptions, animationMode?: string);
200
+ constructor(_elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, _listBase: MatListBase, _platform: Platform, globalRippleOptions?: RippleGlobalOptions, animationMode?: string);
239
201
  ngAfterViewInit(): void;
240
202
  ngOnDestroy(): void;
241
- /** Gets the label for the list item. This is used for the typeahead. */
242
- _getItemLabel(): string;
243
203
  /** Whether the list item has icons or avatars. */
244
204
  _hasIconOrAvatar(): boolean;
245
205
  private _initInteractiveListItem;
@@ -345,12 +305,11 @@ export declare class MatListModule {
345
305
  }
346
306
 
347
307
  export declare class MatListOption extends MatListItemBase implements ListOption, OnInit, OnDestroy {
348
- _selectionList: SelectionList;
308
+ private _selectionList;
349
309
  private _changeDetectorRef;
350
310
  _lines: QueryList<MatListItemLine>;
351
311
  _titles: QueryList<MatListItemTitle>;
352
312
  _unscopedContent: ElementRef<HTMLSpanElement>;
353
- _itemText: ElementRef<HTMLElement>;
354
313
  /**
355
314
  * Emits when the selected state of the option has changed.
356
315
  * Use to facilitate two-data binding to the `selected` property.
@@ -376,13 +335,15 @@ export declare class MatListOption extends MatListItemBase implements ListOption
376
335
  * clear the value of `selected` in the first cycle.
377
336
  */
378
337
  private _inputsInitialized;
379
- constructor(element: ElementRef, ngZone: NgZone, platform: Platform, _selectionList: SelectionList, _changeDetectorRef: ChangeDetectorRef, globalRippleOptions?: RippleGlobalOptions, animationMode?: string);
338
+ constructor(elementRef: ElementRef<HTMLElement>, ngZone: NgZone, _selectionList: SelectionList, platform: Platform, _changeDetectorRef: ChangeDetectorRef, globalRippleOptions?: RippleGlobalOptions, animationMode?: string);
380
339
  ngOnInit(): void;
381
340
  ngOnDestroy(): void;
382
341
  /** Toggles the selection state of the option. */
383
342
  toggle(): void;
384
343
  /** Allows for programmatic focusing of the option. */
385
344
  focus(): void;
345
+ /** Gets the text label of the list option. Used for the typeahead functionality in the list. */
346
+ getLabel(): string;
386
347
  /** Whether a checkbox is shown at the given position. */
387
348
  _hasCheckboxAt(position: MatListOptionCheckboxPosition): boolean;
388
349
  /** Whether icons or avatars are shown at the given position. */
@@ -403,6 +364,10 @@ export declare class MatListOption extends MatListItemBase implements ListOption
403
364
  * list changed.
404
365
  */
405
366
  _markForCheck(): void;
367
+ /** Toggles the option's value based on a user interacion. */
368
+ _toggleOnInteraction(): void;
369
+ /** Sets the tabindex of the list option. */
370
+ _setTabindex(value: number): void;
406
371
  static ɵfac: i0.ɵɵFactoryDeclaration<MatListOption, [null, null, null, null, null, { optional: true; }, { optional: true; }]>;
407
372
  static ɵcmp: i0.ɵɵComponentDeclaration<MatListOption, "mat-list-option", ["matListOption"], { "checkboxPosition": "checkboxPosition"; "color": "color"; "value": "value"; "selected": "selected"; }, { "selectedChange": "selectedChange"; }, ["_lines", "_titles"], ["[matListItemAvatar],[matListItemIcon]", "[matListItemTitle]", "[matListItemLine]", "*", "mat-divider"], false>;
408
373
  }
@@ -428,9 +393,17 @@ export declare class MatNavList extends MatListBase {
428
393
  static ɵcmp: i0.ɵɵComponentDeclaration<MatNavList, "mat-nav-list", ["matNavList"], {}, {}, never, ["*"], false>;
429
394
  }
430
395
 
431
- export declare class MatSelectionList extends MatInteractiveListBase<MatListOption> implements SelectionList, ControlValueAccessor, AfterViewInit, OnChanges, OnDestroy {
432
- private _multiple;
396
+ export declare class MatSelectionList extends MatListBase implements SelectionList, ControlValueAccessor, AfterViewInit, OnChanges, OnDestroy {
397
+ _element: ElementRef<HTMLElement>;
398
+ private _ngZone;
433
399
  private _initialized;
400
+ private _keyManager;
401
+ /** Emits when the list has been destroyed. */
402
+ private _destroyed;
403
+ /** Whether the list has been destroyed. */
404
+ private _isDestroyed;
405
+ /** View to model callback that should be called whenever the selected options change. */
406
+ private _onChange;
434
407
  _items: QueryList<MatListOption>;
435
408
  /** Emits a change event whenever the selected state of an option changes. */
436
409
  readonly selectionChange: EventEmitter<MatSelectionListChange>;
@@ -445,19 +418,14 @@ export declare class MatSelectionList extends MatInteractiveListBase<MatListOpti
445
418
  /** Whether selection is limited to one or multiple items (default multiple). */
446
419
  get multiple(): boolean;
447
420
  set multiple(value: BooleanInput);
421
+ private _multiple;
448
422
  /** The currently selected options. */
449
423
  selectedOptions: SelectionModel<MatListOption>;
450
- /** View to model callback that should be called whenever the selected options change. */
451
- private _onChange;
452
424
  /** Keeps track of the currently-selected value. */
453
425
  _value: string[] | null;
454
- /** Emits when the list has been destroyed. */
455
- private _destroyed;
456
426
  /** View to model callback that should be called if the list or its options lost focus. */
457
427
  _onTouched: () => void;
458
- /** Whether the list has been destroyed. */
459
- private _isDestroyed;
460
- constructor(element: ElementRef<HTMLElement>, document: any);
428
+ constructor(_element: ElementRef<HTMLElement>, _ngZone: NgZone);
461
429
  ngAfterViewInit(): void;
462
430
  ngOnChanges(changes: SimpleChanges): void;
463
431
  ngOnDestroy(): void;
@@ -479,18 +447,8 @@ export declare class MatSelectionList extends MatInteractiveListBase<MatListOpti
479
447
  registerOnChange(fn: (value: any) => void): void;
480
448
  /** Implemented as part of ControlValueAccessor. */
481
449
  registerOnTouched(fn: () => void): void;
482
- /**
483
- * Resets tabindex for all options and sets tabindex for the first selected option so that
484
- * it will become active when users tab into the selection-list. This will be a noop if the
485
- * list is currently focused as otherwise multiple options might become reachable through tab.
486
- * e.g. A user currently already focused an option. We set tabindex to a new option but the
487
- * focus on the current option does persist. Pressing `TAB` then might go to the other option
488
- * that received a tabindex. We can skip the reset here as the MDC foundation resets the
489
- * tabindex to the first selected option automatically once the current item is blurred.
490
- */
491
- private _resetTabindexForItemsIfBlurred;
450
+ /** Watches for changes in the selected state of the options and updates the list accordingly. */
492
451
  private _watchForSelectionChange;
493
- private _syncSelectedOptionsWithFoundation;
494
452
  /** Sets the selected options based on the specified values. */
495
453
  private _setOptionsFromValues;
496
454
  /** Returns the values of the selected options. */
@@ -504,6 +462,23 @@ export declare class MatSelectionList extends MatInteractiveListBase<MatListOpti
504
462
  private _setAllOptionsSelected;
505
463
  /** The option components contained within this selection-list. */
506
464
  get options(): QueryList<MatListOption>;
465
+ /** Handles keydown events within the list. */
466
+ _handleKeydown(event: KeyboardEvent): void;
467
+ /** Handles focusout events within the list. */
468
+ private _handleFocusout;
469
+ /** Handles focusin events within the list. */
470
+ private _handleFocusin;
471
+ /** Sets up the logic for maintaining the roving tabindex. */
472
+ private _setupRovingTabindex;
473
+ /**
474
+ * Sets an option as active.
475
+ * @param index Index of the active option. If set to -1, no option will be active.
476
+ */
477
+ private _setActiveOption;
478
+ /** Resets the active option to the first selected option. */
479
+ private _resetActiveOption;
480
+ /** Returns whether the focus is currently within the list. */
481
+ private _containsFocus;
507
482
  static ɵfac: i0.ɵɵFactoryDeclaration<MatSelectionList, never>;
508
483
  static ɵcmp: i0.ɵɵComponentDeclaration<MatSelectionList, "mat-selection-list", ["matSelectionList"], { "color": "color"; "compareWith": "compareWith"; "multiple": "multiple"; }, { "selectionChange": "selectionChange"; }, ["_items"], ["*"], false>;
509
484
  }
@@ -551,8 +526,9 @@ export declare interface SelectionList extends MatListBase {
551
526
  selectedOptions: SelectionModel<MatListOption>;
552
527
  compareWith: (o1: any, o2: any) => boolean;
553
528
  _value: string[] | null;
554
- _reportValueChange: () => void;
555
- _onTouched: () => void;
529
+ _reportValueChange(): void;
530
+ _emitChangeEvent(options: MatListOption[]): void;
531
+ _onTouched(): void;
556
532
  }
557
533
 
558
534
  export { }
@@ -1,8 +1,8 @@
1
1
  import { _AbstractConstructor } from '@angular/material-experimental/mdc-core';
2
2
  import { AfterViewInit } from '@angular/core';
3
3
  import { CanColor } from '@angular/material-experimental/mdc-core';
4
+ import { ChangeDetectorRef } from '@angular/core';
4
5
  import { _Constructor } from '@angular/material-experimental/mdc-core';
5
- import { Directionality } from '@angular/cdk/bidi';
6
6
  import { ElementRef } from '@angular/core';
7
7
  import { EventEmitter } from '@angular/core';
8
8
  import * as i0 from '@angular/core';
@@ -31,12 +31,9 @@ export { MAT_PROGRESS_BAR_LOCATION_FACTORY }
31
31
 
32
32
  export declare class MatProgressBar extends _MatProgressBarBase implements AfterViewInit, OnDestroy, CanColor {
33
33
  private _ngZone;
34
+ private _changeDetectorRef;
34
35
  _animationMode?: string | undefined;
35
- constructor(elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, dir?: Directionality, _animationMode?: string | undefined, defaults?: MatProgressBarDefaultOptions);
36
- /** Implements all of the logic of the MDC progress bar. */
37
- private _foundation;
38
- /** Adapter used by MDC to interact with the DOM. */
39
- private _adapter;
36
+ constructor(elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, _changeDetectorRef: ChangeDetectorRef, _animationMode?: string | undefined, defaults?: MatProgressBarDefaultOptions);
40
37
  /** Flag that indicates whether NoopAnimations mode is set to true. */
41
38
  _isNoopAnimation: boolean;
42
39
  /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */
@@ -47,18 +44,12 @@ export declare class MatProgressBar extends _MatProgressBarBase implements After
47
44
  get bufferValue(): number;
48
45
  set bufferValue(v: number);
49
46
  private _bufferValue;
50
- private _primaryBar;
51
- private _bufferBar;
52
47
  /**
53
48
  * Event emitted when animation of the primary progress bar completes. This event will not
54
49
  * be emitted when animations are disabled, nor will it be emitted for modes with continuous
55
50
  * animations (indeterminate and query).
56
51
  */
57
52
  readonly animationEnd: EventEmitter<ProgressAnimationEnd>;
58
- /** Reference to animation end subscription to be unsubscribed on destroy. */
59
- private _animationEndSubscription;
60
- /** Subscription to when the layout direction changes. */
61
- private _dirChangeSubscription;
62
53
  /**
63
54
  * Mode of the progress bar.
64
55
  *
@@ -71,16 +62,22 @@ export declare class MatProgressBar extends _MatProgressBarBase implements After
71
62
  private _mode;
72
63
  ngAfterViewInit(): void;
73
64
  ngOnDestroy(): void;
74
- /** Syncs the state of the progress bar with the MDC foundation. */
75
- private _syncFoundation;
76
- static ɵfac: i0.ɵɵFactoryDeclaration<MatProgressBar, [null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
65
+ /** Gets the transform style that should be applied to the primary bar. */
66
+ _getPrimaryBarTransform(): string;
67
+ /** Gets the `flex-basis` value that should be applied to the buffer bar. */
68
+ _getBufferBarFlexBasis(): string;
69
+ /** Returns whether the progress bar is indeterminate. */
70
+ _isIndeterminate(): boolean;
71
+ /** Event handler for `transitionend` events. */
72
+ private _transitionendHandler;
73
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatProgressBar, [null, null, null, { optional: true; }, { optional: true; }]>;
77
74
  static ɵcmp: i0.ɵɵComponentDeclaration<MatProgressBar, "mat-progress-bar", ["matProgressBar"], { "color": "color"; "value": "value"; "bufferValue": "bufferValue"; "mode": "mode"; }, { "animationEnd": "animationEnd"; }, never, never, false>;
78
75
  }
79
76
 
80
77
  /** @docs-private */
81
78
  declare const _MatProgressBarBase: _Constructor<CanColor> & _AbstractConstructor<CanColor> & {
82
- new (_elementRef: ElementRef): {
83
- _elementRef: ElementRef;
79
+ new (_elementRef: ElementRef<HTMLElement>): {
80
+ _elementRef: ElementRef<HTMLElement>;
84
81
  };
85
82
  };
86
83
 
@@ -1,11 +1,5 @@
1
- import { AriaLivePoliteness } from '@angular/cdk/a11y';
2
- import { BasePortalOutlet } from '@angular/cdk/portal';
3
1
  import { BreakpointObserver } from '@angular/cdk/layout';
4
- import { CdkPortalOutlet } from '@angular/cdk/portal';
5
- import { ComponentPortal } from '@angular/cdk/portal';
6
- import { ComponentRef } from '@angular/core';
7
2
  import { ElementRef } from '@angular/core';
8
- import { EmbeddedViewRef } from '@angular/core';
9
3
  import * as i0 from '@angular/core';
10
4
  import * as i4 from '@angular/cdk/overlay';
11
5
  import * as i5 from '@angular/cdk/portal';
@@ -20,19 +14,12 @@ import { MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY } from '@angular/material/snack-b
20
14
  import { matSnackBarAnimations } from '@angular/material/snack-bar';
21
15
  import { _MatSnackBarBase } from '@angular/material/snack-bar';
22
16
  import { MatSnackBarConfig } from '@angular/material/snack-bar';
17
+ import { _MatSnackBarContainerBase } from '@angular/material/snack-bar';
23
18
  import { MatSnackBarDismiss } from '@angular/material/snack-bar';
24
19
  import { MatSnackBarHorizontalPosition } from '@angular/material/snack-bar';
25
20
  import { MatSnackBarRef } from '@angular/material/snack-bar';
26
21
  import { MatSnackBarVerticalPosition } from '@angular/material/snack-bar';
27
- import { MDCSnackbarFoundation } from '@material/snackbar';
28
- import { NgZone } from '@angular/core';
29
- import { Observable } from 'rxjs';
30
- import { OnDestroy } from '@angular/core';
31
22
  import { Overlay } from '@angular/cdk/overlay';
32
- import { Platform } from '@angular/cdk/platform';
33
- import { _SnackBarContainer } from '@angular/material/snack-bar';
34
- import { Subject } from 'rxjs';
35
- import { TemplatePortal } from '@angular/cdk/portal';
36
23
  import { TextOnlySnackBar } from '@angular/material/snack-bar';
37
24
 
38
25
  declare namespace i1 {
@@ -93,67 +80,16 @@ export { MatSnackBarConfig }
93
80
  * Internal component that wraps user-provided snack bar content.
94
81
  * @docs-private
95
82
  */
96
- export declare class MatSnackBarContainer extends BasePortalOutlet implements _SnackBarContainer, OnDestroy {
97
- private _elementRef;
98
- snackBarConfig: MatSnackBarConfig;
99
- private _platform;
100
- private _ngZone;
101
- _animationMode?: string | undefined;
102
- /** The number of milliseconds to wait before announcing the snack bar's content. */
103
- private readonly _announceDelay;
104
- /** The timeout for announcing the snack bar's content. */
105
- private _announceTimeoutId;
106
- /** Subject for notifying that the snack bar has announced to screen readers. */
107
- readonly _onAnnounce: Subject<void>;
108
- /** Subject for notifying that the snack bar has exited from view. */
109
- readonly _onExit: Subject<void>;
110
- /** Subject for notifying that the snack bar has finished entering the view. */
111
- readonly _onEnter: Subject<void>;
112
- /** aria-live value for the live region. */
113
- _live: AriaLivePoliteness;
114
- /** Whether the snack bar is currently exiting. */
115
- _exiting: boolean;
116
- /**
117
- * Role of the live region. This is only for Firefox as there is a known issue where Firefox +
118
- * JAWS does not read out aria-live message.
119
- */
120
- _role?: 'status' | 'alert';
121
- private _mdcAdapter;
122
- _mdcFoundation: MDCSnackbarFoundation;
123
- /** The portal outlet inside of this container into which the snack bar content will be loaded. */
124
- _portalOutlet: CdkPortalOutlet;
125
- /** Element that acts as the MDC surface container which should contain the label and actions. */
126
- _surface: ElementRef;
83
+ export declare class MatSnackBarContainer extends _MatSnackBarContainerBase {
127
84
  /**
128
85
  * Element that will have the `mdc-snackbar__label` class applied if the attached component
129
86
  * or template does not have it. This ensures that the appropriate structure, typography, and
130
87
  * color is applied to the attached view.
131
88
  */
132
89
  _label: ElementRef;
133
- constructor(_elementRef: ElementRef<HTMLElement>, snackBarConfig: MatSnackBarConfig, _platform: Platform, _ngZone: NgZone, _animationMode?: string | undefined);
134
- /** Makes sure the exit callbacks have been invoked when the element is destroyed. */
135
- ngOnDestroy(): void;
136
- enter(): void;
137
- exit(): Observable<void>;
138
- /** Attach a component portal as content to this snack bar container. */
139
- attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
140
- /** Attach a template portal as content to this snack bar container. */
141
- attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
142
- private _setClass;
143
- /** Applies the user-configured CSS classes to the snack bar. */
144
- private _applySnackBarClasses;
145
- /** Asserts that no content is already attached to the container. */
146
- private _assertNotAttached;
147
- /** Finishes the exit sequence of the container. */
148
- private _finishExit;
149
- /**
150
- * Starts a timeout to move the snack bar content to the live region so screen readers will
151
- * announce it.
152
- */
153
- private _screenReaderAnnounce;
154
90
  /** Applies the correct CSS class to the label based on its content. */
155
- private _applyLabelClass;
156
- static ɵfac: i0.ɵɵFactoryDeclaration<MatSnackBarContainer, [null, null, null, null, { optional: true; }]>;
91
+ protected _afterPortalAttached(): void;
92
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatSnackBarContainer, never>;
157
93
  static ɵcmp: i0.ɵɵComponentDeclaration<MatSnackBarContainer, "mat-snack-bar-container", never, {}, {}, never, never, false>;
158
94
  }
159
95
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/material-experimental",
3
- "version": "14.0.0-rc.1",
3
+ "version": "14.0.1",
4
4
  "description": "Experimental components for Angular Material",
5
5
  "repository": {
6
6
  "type": "git",
@@ -425,13 +425,13 @@
425
425
  }
426
426
  },
427
427
  "peerDependencies": {
428
- "@angular/animations": "^14.0.0-0 || ^15.0.0",
429
- "@angular/cdk": "14.0.0-rc.1",
430
- "@angular/core": "^14.0.0-0 || ^15.0.0",
431
- "@angular/common": "^14.0.0-0 || ^15.0.0",
432
- "@angular/forms": "^14.0.0-0 || ^15.0.0",
433
- "@angular/platform-browser": "^14.0.0-0 || ^15.0.0",
434
- "@angular/material": "14.0.0-rc.1"
428
+ "@angular/animations": "^14.0.0 || ^15.0.0",
429
+ "@angular/cdk": "14.0.1",
430
+ "@angular/core": "^14.0.0 || ^15.0.0",
431
+ "@angular/common": "^14.0.0 || ^15.0.0",
432
+ "@angular/forms": "^14.0.0 || ^15.0.0",
433
+ "@angular/platform-browser": "^14.0.0 || ^15.0.0",
434
+ "@angular/material": "14.0.1"
435
435
  },
436
436
  "dependencies": {
437
437
  "tslib": "^2.3.0",
@@ -1,11 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { InjectionToken } from '@angular/core';
9
- /** Injection token to be used to override the default options for the chips module. */
10
- export const MAT_CHIPS_DEFAULT_OPTIONS = new InjectionToken('mat-chips-default-options');
11
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hpcC1kZWZhdWx0LW9wdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWF0ZXJpYWwtZXhwZXJpbWVudGFsL21kYy1jaGlwcy9jaGlwLWRlZmF1bHQtb3B0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSCxPQUFPLEVBQUMsY0FBYyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBUTdDLHVGQUF1RjtBQUN2Rix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4iXX0=
@@ -1,27 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- /**
9
- * Emits a custom event from an element.
10
- * @param element Element from which to emit the event.
11
- * @param _document Document that the element is placed in.
12
- * @param eventName Name of the event.
13
- * @param data Data attached to the event.
14
- * @param shouldBubble Whether the event should bubble.
15
- */
16
- export function emitCustomEvent(element, _document, eventName, data, shouldBubble) {
17
- let event;
18
- if (typeof CustomEvent === 'function') {
19
- event = new CustomEvent(eventName, { bubbles: shouldBubble, detail: data });
20
- }
21
- else {
22
- event = _document.createEvent('CustomEvent');
23
- event.initCustomEvent(eventName, shouldBubble, false, data);
24
- }
25
- element.dispatchEvent(event);
26
- }
27
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1pdC1ldmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYXRlcmlhbC1leHBlcmltZW50YWwvbWRjLWNoaXBzL2VtaXQtZXZlbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUg7Ozs7Ozs7R0FPRztBQUNILE1BQU0sVUFBVSxlQUFlLENBQzdCLE9BQW9CLEVBQ3BCLFNBQW1CLEVBQ25CLFNBQWlCLEVBQ2pCLElBQU8sRUFDUCxZQUFxQjtJQUVyQixJQUFJLEtBQXFCLENBQUM7SUFDMUIsSUFBSSxPQUFPLFdBQVcsS0FBSyxVQUFVLEVBQUU7UUFDckMsS0FBSyxHQUFHLElBQUksV0FBVyxDQUFJLFNBQVMsRUFBRSxFQUFDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxFQUFFLElBQUksRUFBQyxDQUFDLENBQUM7S0FDOUU7U0FBTTtRQUNMLEtBQUssR0FBRyxT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