Skip to content

Commit 936a1fd

Browse files
authored
fix(angular/tooltip): remove deprecated factory functions (#2810)
BREAKING CHANGE: * `SBB_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER` has been removed. * `SBB_TOOLTIP_SCROLL_STRATEGY_FACTORY` has been removed.
1 parent 33e4f51 commit 936a1fd

2 files changed

Lines changed: 1 addition & 26 deletions

File tree

src/angular/tooltip/tooltip.module.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ import { NgModule } from '@angular/core';
66
import { SbbCommonModule } from '@sbb-esta/angular/core';
77
import { SbbIconModule } from '@sbb-esta/angular/icon';
88

9-
import {
10-
SbbTooltip,
11-
SBB_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER,
12-
TooltipComponent,
13-
} from './tooltip';
9+
import { SbbTooltip, TooltipComponent } from './tooltip';
1410
import { SbbTooltipWrapper } from './tooltip-wrapper';
1511

1612
@NgModule({
@@ -25,6 +21,5 @@ import { SbbTooltipWrapper } from './tooltip-wrapper';
2521
SbbTooltipWrapper,
2622
],
2723
exports: [SbbTooltip, TooltipComponent, SbbTooltipWrapper, CdkScrollableModule],
28-
providers: [SBB_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER],
2924
})
3025
export class SbbTooltipModule {}

src/angular/tooltip/tooltip.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -105,26 +105,6 @@ export const SBB_TOOLTIP_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrate
105105
},
106106
);
107107

108-
/**
109-
* @docs-private
110-
* @deprecated Will be removed in 22.0.0.
111-
* @breaking-change 22.0.0
112-
*/
113-
export function SBB_TOOLTIP_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {
114-
return () => overlay.scrollStrategies.reposition({ scrollThrottle: SCROLL_THROTTLE_MS });
115-
}
116-
117-
/**
118-
* @docs-private
119-
* @deprecated Will be removed in 22.0.0.
120-
* @breaking-change 22.0.0
121-
*/
122-
export const SBB_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER = {
123-
provide: SBB_TOOLTIP_SCROLL_STRATEGY,
124-
deps: [Overlay],
125-
useFactory: SBB_TOOLTIP_SCROLL_STRATEGY_FACTORY,
126-
};
127-
128108
/** Default `sbbTooltip` options that can be overridden. */
129109
export interface SbbTooltipDefaultOptions {
130110
/** Default delay when the tooltip is shown. */

0 commit comments

Comments
 (0)