Skip to content

Commit 41b8aa6

Browse files
committed
main - 32c25ae refactor(multiple): expose private APIs for internal migration (#30947)
1 parent fb933c7 commit 41b8aa6

26 files changed

+38
-24
lines changed

autocomplete/index.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ declare class MatAutocompleteTrigger implements ControlValueAccessor, AfterViewI
264264
private _pendingAutoselectedOption;
265265
/** Stream of keyboard events that can close the panel. */
266266
private readonly _closeKeyEventStream;
267+
/** Classes to apply to the panel. Exposed as a public property for internal usage. */
268+
readonly _overlayPanelClass: string[];
267269
/**
268270
* Event handler for when the window is blurred. Needs to be an
269271
* arrow function in order to preserve the context.

fesm2022/autocomplete.mjs

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ import { Directionality } from '@angular/cdk/bidi';
1212
import { hasModifierKey, ESCAPE, ENTER, TAB, UP_ARROW, DOWN_ARROW } from '@angular/cdk/keycodes';
1313
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
1414
import { TemplatePortal } from '@angular/cdk/portal';
15+
import { coerceArray } from '@angular/cdk/coercion';
1516
import { NG_VALUE_ACCESSOR } from '@angular/forms';
1617
import { filter, map, startWith, switchMap, tap, delay, take } from 'rxjs/operators';
1718
import { h as MAT_FORM_FIELD } from './form-field-DpN-CJrJ.mjs';
1819
import { M as MatOptionModule } from './index-BHJ4tVIe.mjs';
1920
import { M as MatCommonModule } from './common-module-DZl8g1kc.mjs';
2021
import './ripple-CuyVtN3V.mjs';
21-
import '@angular/cdk/coercion';
2222
import '@angular/cdk/private';
2323
import './pseudo-checkbox-BFGIaGxz.mjs';
2424
import './structural-styles-CasigI3l.mjs';
@@ -413,6 +413,8 @@ class MatAutocompleteTrigger {
413413
_pendingAutoselectedOption;
414414
/** Stream of keyboard events that can close the panel. */
415415
_closeKeyEventStream = new Subject();
416+
/** Classes to apply to the panel. Exposed as a public property for internal usage. */
417+
_overlayPanelClass = coerceArray(this._defaults?.overlayPanelClass || []);
416418
/**
417419
* Event handler for when the window is blurred. Needs to be an
418420
* arrow function in order to preserve the context.
@@ -1000,7 +1002,7 @@ class MatAutocompleteTrigger {
10001002
direction: this._dir ?? undefined,
10011003
hasBackdrop: this._defaults?.hasBackdrop,
10021004
backdropClass: this._defaults?.backdropClass,
1003-
panelClass: this._defaults?.overlayPanelClass,
1005+
panelClass: this._overlayPanelClass,
10041006
disableAnimations: this._animationsDisabled,
10051007
});
10061008
}

fesm2022/autocomplete.mjs.map

+1-1
Large diffs are not rendered by default.

fesm2022/module-B8kY0JtB.mjs.map

-1
This file was deleted.

fesm2022/module-B8kY0JtB.mjs renamed to fesm2022/module-STLEAA6d.mjs

+4-2
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ class MatTooltip {
102102
});
103103
_overlayRef;
104104
_tooltipInstance;
105+
_overlayPanelClass; // Used for styling internally.
105106
_portal;
106107
_position = 'below';
107108
_positionAtOrigin = false;
@@ -348,6 +349,7 @@ class MatTooltip {
348349
.get(ScrollDispatcher)
349350
.getAncestorScrollContainers(this._elementRef);
350351
const overlay = this._injector.get(Overlay);
352+
const panelClass = `${this._cssClassPrefix}-${PANEL_CLASS}`;
351353
// Create connected position strategy that listens for scroll events to reposition.
352354
const strategy = overlay
353355
.position()
@@ -369,7 +371,7 @@ class MatTooltip {
369371
this._overlayRef = overlay.create({
370372
direction: this._dir,
371373
positionStrategy: strategy,
372-
panelClass: `${this._cssClassPrefix}-${PANEL_CLASS}`,
374+
panelClass: this._overlayPanelClass ? [...this._overlayPanelClass, panelClass] : panelClass,
373375
scrollStrategy: this._injector.get(MAT_TOOLTIP_SCROLL_STRATEGY)(),
374376
disableAnimations: this._animationsDisabled,
375377
});
@@ -967,4 +969,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.5",
967969
}] });
968970

969971
export { MAT_TOOLTIP_SCROLL_STRATEGY as M, SCROLL_THROTTLE_MS as S, TOOLTIP_PANEL_CLASS as T, MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY as a, MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER as b, MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY as c, MAT_TOOLTIP_DEFAULT_OPTIONS as d, MatTooltip as e, TooltipComponent as f, getMatTooltipInvalidPositionError as g, MatTooltipModule as h };
970-
//# sourceMappingURL=module-B8kY0JtB.mjs.map
972+
//# sourceMappingURL=module-STLEAA6d.mjs.map

fesm2022/module-STLEAA6d.mjs.map

+1
Large diffs are not rendered by default.

fesm2022/paginator.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Subject, ReplaySubject } from 'rxjs';
44
import { _IdGenerator } from '@angular/cdk/a11y';
55
import { j as MatFormField } from './form-field-DpN-CJrJ.mjs';
66
import { g as MatSelect, M as MatSelectModule } from './module-lnq6GRbC.mjs';
7-
import { e as MatTooltip, h as MatTooltipModule } from './module-B8kY0JtB.mjs';
7+
import { e as MatTooltip, h as MatTooltipModule } from './module-STLEAA6d.mjs';
88
import { M as MatOption } from './option-MOeehkAg.mjs';
99
import { M as MatIconButton } from './icon-button-4VvBKIK4.mjs';
1010
import { MatButtonModule } from './button.mjs';

fesm2022/snack-bar.mjs.map

+1-1
Large diffs are not rendered by default.

fesm2022/tooltip.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export { d as MAT_TOOLTIP_DEFAULT_OPTIONS, c as MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY, M as MAT_TOOLTIP_SCROLL_STRATEGY, a as MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY, b as MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER, e as MatTooltip, h as MatTooltipModule, S as SCROLL_THROTTLE_MS, T as TOOLTIP_PANEL_CLASS, f as TooltipComponent, g as getMatTooltipInvalidPositionError } from './module-B8kY0JtB.mjs';
1+
export { d as MAT_TOOLTIP_DEFAULT_OPTIONS, c as MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY, M as MAT_TOOLTIP_SCROLL_STRATEGY, a as MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY, b as MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER, e as MatTooltip, h as MatTooltipModule, S as SCROLL_THROTTLE_MS, T as TOOLTIP_PANEL_CLASS, f as TooltipComponent, g as getMatTooltipInvalidPositionError } from './module-STLEAA6d.mjs';
22
import '@angular/core';
33
import '@angular/cdk/a11y';
44
import '@angular/cdk/overlay';

npm_package/module.d-DNyZKZPJ.d.ts renamed to module.d-Dcjv2DGH.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ declare class MatTooltip implements OnDestroy, AfterViewInit {
103103
private _defaultOptions;
104104
_overlayRef: OverlayRef | null;
105105
_tooltipInstance: TooltipComponent | null;
106+
_overlayPanelClass: string[] | undefined;
106107
private _portal;
107108
private _position;
108109
private _positionAtOrigin;

npm_package/autocomplete/index.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ declare class MatAutocompleteTrigger implements ControlValueAccessor, AfterViewI
264264
private _pendingAutoselectedOption;
265265
/** Stream of keyboard events that can close the panel. */
266266
private readonly _closeKeyEventStream;
267+
/** Classes to apply to the panel. Exposed as a public property for internal usage. */
268+
readonly _overlayPanelClass: string[];
267269
/**
268270
* Event handler for when the window is blurred. Needs to be an
269271
* arrow function in order to preserve the context.

npm_package/fesm2022/autocomplete.mjs

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ import { Directionality } from '@angular/cdk/bidi';
1212
import { hasModifierKey, ESCAPE, ENTER, TAB, UP_ARROW, DOWN_ARROW } from '@angular/cdk/keycodes';
1313
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
1414
import { TemplatePortal } from '@angular/cdk/portal';
15+
import { coerceArray } from '@angular/cdk/coercion';
1516
import { NG_VALUE_ACCESSOR } from '@angular/forms';
1617
import { filter, map, startWith, switchMap, tap, delay, take } from 'rxjs/operators';
1718
import { h as MAT_FORM_FIELD } from './form-field-DpN-CJrJ.mjs';
1819
import { M as MatOptionModule } from './index-BHJ4tVIe.mjs';
1920
import { M as MatCommonModule } from './common-module-DZl8g1kc.mjs';
2021
import './ripple-CuyVtN3V.mjs';
21-
import '@angular/cdk/coercion';
2222
import '@angular/cdk/private';
2323
import './pseudo-checkbox-BFGIaGxz.mjs';
2424
import './structural-styles-CasigI3l.mjs';
@@ -413,6 +413,8 @@ class MatAutocompleteTrigger {
413413
_pendingAutoselectedOption;
414414
/** Stream of keyboard events that can close the panel. */
415415
_closeKeyEventStream = new Subject();
416+
/** Classes to apply to the panel. Exposed as a public property for internal usage. */
417+
_overlayPanelClass = coerceArray(this._defaults?.overlayPanelClass || []);
416418
/**
417419
* Event handler for when the window is blurred. Needs to be an
418420
* arrow function in order to preserve the context.
@@ -1000,7 +1002,7 @@ class MatAutocompleteTrigger {
10001002
direction: this._dir ?? undefined,
10011003
hasBackdrop: this._defaults?.hasBackdrop,
10021004
backdropClass: this._defaults?.backdropClass,
1003-
panelClass: this._defaults?.overlayPanelClass,
1005+
panelClass: this._overlayPanelClass,
10041006
disableAnimations: this._animationsDisabled,
10051007
});
10061008
}

npm_package/fesm2022/autocomplete.mjs.map

+1-1
Large diffs are not rendered by default.

npm_package/fesm2022/module-B8kY0JtB.mjs.map

-1
This file was deleted.

npm_package/fesm2022/module-B8kY0JtB.mjs renamed to npm_package/fesm2022/module-STLEAA6d.mjs

+4-2
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ class MatTooltip {
102102
});
103103
_overlayRef;
104104
_tooltipInstance;
105+
_overlayPanelClass; // Used for styling internally.
105106
_portal;
106107
_position = 'below';
107108
_positionAtOrigin = false;
@@ -348,6 +349,7 @@ class MatTooltip {
348349
.get(ScrollDispatcher)
349350
.getAncestorScrollContainers(this._elementRef);
350351
const overlay = this._injector.get(Overlay);
352+
const panelClass = `${this._cssClassPrefix}-${PANEL_CLASS}`;
351353
// Create connected position strategy that listens for scroll events to reposition.
352354
const strategy = overlay
353355
.position()
@@ -369,7 +371,7 @@ class MatTooltip {
369371
this._overlayRef = overlay.create({
370372
direction: this._dir,
371373
positionStrategy: strategy,
372-
panelClass: `${this._cssClassPrefix}-${PANEL_CLASS}`,
374+
panelClass: this._overlayPanelClass ? [...this._overlayPanelClass, panelClass] : panelClass,
373375
scrollStrategy: this._injector.get(MAT_TOOLTIP_SCROLL_STRATEGY)(),
374376
disableAnimations: this._animationsDisabled,
375377
});
@@ -967,4 +969,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.5",
967969
}] });
968970

969971
export { MAT_TOOLTIP_SCROLL_STRATEGY as M, SCROLL_THROTTLE_MS as S, TOOLTIP_PANEL_CLASS as T, MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY as a, MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER as b, MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY as c, MAT_TOOLTIP_DEFAULT_OPTIONS as d, MatTooltip as e, TooltipComponent as f, getMatTooltipInvalidPositionError as g, MatTooltipModule as h };
970-
//# sourceMappingURL=module-B8kY0JtB.mjs.map
972+
//# sourceMappingURL=module-STLEAA6d.mjs.map

npm_package/fesm2022/module-STLEAA6d.mjs.map

+1
Large diffs are not rendered by default.

npm_package/fesm2022/paginator.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Subject, ReplaySubject } from 'rxjs';
44
import { _IdGenerator } from '@angular/cdk/a11y';
55
import { j as MatFormField } from './form-field-DpN-CJrJ.mjs';
66
import { g as MatSelect, M as MatSelectModule } from './module-lnq6GRbC.mjs';
7-
import { e as MatTooltip, h as MatTooltipModule } from './module-B8kY0JtB.mjs';
7+
import { e as MatTooltip, h as MatTooltipModule } from './module-STLEAA6d.mjs';
88
import { M as MatOption } from './option-MOeehkAg.mjs';
99
import { M as MatIconButton } from './icon-button-4VvBKIK4.mjs';
1010
import { MatButtonModule } from './button.mjs';

npm_package/fesm2022/snack-bar.mjs.map

+1-1
Large diffs are not rendered by default.

npm_package/fesm2022/tooltip.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export { d as MAT_TOOLTIP_DEFAULT_OPTIONS, c as MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY, M as MAT_TOOLTIP_SCROLL_STRATEGY, a as MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY, b as MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER, e as MatTooltip, h as MatTooltipModule, S as SCROLL_THROTTLE_MS, T as TOOLTIP_PANEL_CLASS, f as TooltipComponent, g as getMatTooltipInvalidPositionError } from './module-B8kY0JtB.mjs';
1+
export { d as MAT_TOOLTIP_DEFAULT_OPTIONS, c as MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY, M as MAT_TOOLTIP_SCROLL_STRATEGY, a as MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY, b as MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER, e as MatTooltip, h as MatTooltipModule, S as SCROLL_THROTTLE_MS, T as TOOLTIP_PANEL_CLASS, f as TooltipComponent, g as getMatTooltipInvalidPositionError } from './module-STLEAA6d.mjs';
22
import '@angular/core';
33
import '@angular/cdk/a11y';
44
import '@angular/cdk/overlay';

module.d-DNyZKZPJ.d.ts renamed to npm_package/module.d-Dcjv2DGH.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ declare class MatTooltip implements OnDestroy, AfterViewInit {
103103
private _defaultOptions;
104104
_overlayRef: OverlayRef | null;
105105
_tooltipInstance: TooltipComponent | null;
106+
_overlayPanelClass: string[] | undefined;
106107
private _portal;
107108
private _position;
108109
private _positionAtOrigin;

npm_package/paginator/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as i0 from '@angular/core';
22
import { MatButtonModule } from '../button/index.js';
33
import { M as MatSelectModule } from '../module.d-Rmph6oa6.js';
4-
import { M as MatTooltipModule } from '../module.d-DNyZKZPJ.js';
4+
import { M as MatTooltipModule } from '../module.d-Dcjv2DGH.js';
55
import { M as MatPaginator } from '../paginator.d-BZDt8chT.js';
66
export { c as MAT_PAGINATOR_DEFAULT_OPTIONS, f as MAT_PAGINATOR_INTL_PROVIDER, e as MAT_PAGINATOR_INTL_PROVIDER_FACTORY, b as MatPaginatorDefaultOptions, d as MatPaginatorIntl, a as MatPaginatorSelectConfig, P as PageEvent } from '../paginator.d-BZDt8chT.js';
77
import '@angular/cdk/a11y';

npm_package/snack-bar/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ declare class MatSnackBarConfig<D = any> {
5757
*/
5858
declare class MatSnackBarContainer extends BasePortalOutlet implements OnDestroy {
5959
private _ngZone;
60-
private _elementRef;
60+
readonly _elementRef: ElementRef<HTMLElement>;
6161
private _changeDetectorRef;
6262
private _platform;
6363
protected _animationsDisabled: boolean;

npm_package/tooltip/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export { h as MAT_TOOLTIP_DEFAULT_OPTIONS, f as MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY, c as MAT_TOOLTIP_SCROLL_STRATEGY, d as MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY, e as MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER, k as MatTooltip, i as MatTooltipDefaultOptions, M as MatTooltipModule, S as SCROLL_THROTTLE_MS, j as TOOLTIP_PANEL_CLASS, l as TooltipComponent, T as TooltipPosition, a as TooltipTouchGestures, b as TooltipVisibility, g as getMatTooltipInvalidPositionError } from '../module.d-DNyZKZPJ.js';
1+
export { h as MAT_TOOLTIP_DEFAULT_OPTIONS, f as MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY, c as MAT_TOOLTIP_SCROLL_STRATEGY, d as MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY, e as MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER, k as MatTooltip, i as MatTooltipDefaultOptions, M as MatTooltipModule, S as SCROLL_THROTTLE_MS, j as TOOLTIP_PANEL_CLASS, l as TooltipComponent, T as TooltipPosition, a as TooltipTouchGestures, b as TooltipVisibility, g as getMatTooltipInvalidPositionError } from '../module.d-Dcjv2DGH.js';
22
import '@angular/core';
33
import '@angular/cdk/a11y';
44
import '@angular/cdk/overlay';

paginator/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as i0 from '@angular/core';
22
import { MatButtonModule } from '../button/index.js';
33
import { M as MatSelectModule } from '../module.d-Rmph6oa6.js';
4-
import { M as MatTooltipModule } from '../module.d-DNyZKZPJ.js';
4+
import { M as MatTooltipModule } from '../module.d-Dcjv2DGH.js';
55
import { M as MatPaginator } from '../paginator.d-BZDt8chT.js';
66
export { c as MAT_PAGINATOR_DEFAULT_OPTIONS, f as MAT_PAGINATOR_INTL_PROVIDER, e as MAT_PAGINATOR_INTL_PROVIDER_FACTORY, b as MatPaginatorDefaultOptions, d as MatPaginatorIntl, a as MatPaginatorSelectConfig, P as PageEvent } from '../paginator.d-BZDt8chT.js';
77
import '@angular/cdk/a11y';

snack-bar/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ declare class MatSnackBarConfig<D = any> {
5757
*/
5858
declare class MatSnackBarContainer extends BasePortalOutlet implements OnDestroy {
5959
private _ngZone;
60-
private _elementRef;
60+
readonly _elementRef: ElementRef<HTMLElement>;
6161
private _changeDetectorRef;
6262
private _platform;
6363
protected _animationsDisabled: boolean;

tooltip/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export { h as MAT_TOOLTIP_DEFAULT_OPTIONS, f as MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY, c as MAT_TOOLTIP_SCROLL_STRATEGY, d as MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY, e as MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER, k as MatTooltip, i as MatTooltipDefaultOptions, M as MatTooltipModule, S as SCROLL_THROTTLE_MS, j as TOOLTIP_PANEL_CLASS, l as TooltipComponent, T as TooltipPosition, a as TooltipTouchGestures, b as TooltipVisibility, g as getMatTooltipInvalidPositionError } from '../module.d-DNyZKZPJ.js';
1+
export { h as MAT_TOOLTIP_DEFAULT_OPTIONS, f as MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY, c as MAT_TOOLTIP_SCROLL_STRATEGY, d as MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY, e as MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER, k as MatTooltip, i as MatTooltipDefaultOptions, M as MatTooltipModule, S as SCROLL_THROTTLE_MS, j as TOOLTIP_PANEL_CLASS, l as TooltipComponent, T as TooltipPosition, a as TooltipTouchGestures, b as TooltipVisibility, g as getMatTooltipInvalidPositionError } from '../module.d-Dcjv2DGH.js';
22
import '@angular/core';
33
import '@angular/cdk/a11y';
44
import '@angular/cdk/overlay';

0 commit comments

Comments
 (0)