Skip to content

Commit a5a7c12

Browse files
committed
fix(material/tabs): remove deprecated factory functions
Removes factory functions that we had marked as deprecated for v21. These functions aren't necessary since we switched to standalone. BREAKING CHANGE: * `_MAT_INK_BAR_POSITIONER_FACTORY` has been removed.
1 parent ac840a8 commit a5a7c12

File tree

3 files changed

+9
-25
lines changed

3 files changed

+9
-25
lines changed

goldens/material/tabs/index.api.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ import { TemplateRef } from '@angular/core';
3232
// @public
3333
export const _MAT_INK_BAR_POSITIONER: InjectionToken<_MatInkBarPositioner>;
3434

35-
// @public @deprecated
36-
export function _MAT_INK_BAR_POSITIONER_FACTORY(): _MatInkBarPositioner;
37-
3835
// @public
3936
export const MAT_TAB: InjectionToken<any>;
4037

src/material/tabs/ink-bar.ts

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -189,26 +189,18 @@ export interface _MatInkBarPositioner {
189189
(element: HTMLElement): {left: string; width: string};
190190
}
191191

192-
/**
193-
* The default positioner function for the MatInkBar.
194-
* @docs-private
195-
* @deprecated No longer used, will be removed.
196-
* @breaking-change 21.0.0
197-
*/
198-
export function _MAT_INK_BAR_POSITIONER_FACTORY(): _MatInkBarPositioner {
199-
const method = (element: HTMLElement) => ({
200-
left: element ? (element.offsetLeft || 0) + 'px' : '0',
201-
width: element ? (element.offsetWidth || 0) + 'px' : '0',
202-
});
203-
204-
return method;
205-
}
206-
207192
/** Injection token for the MatInkBar's Positioner. */
208193
export const _MAT_INK_BAR_POSITIONER = new InjectionToken<_MatInkBarPositioner>(
209194
'MatInkBarPositioner',
210195
{
211196
providedIn: 'root',
212-
factory: _MAT_INK_BAR_POSITIONER_FACTORY,
197+
factory: () => {
198+
const method = (element: HTMLElement) => ({
199+
left: element ? (element.offsetLeft || 0) + 'px' : '0',
200+
width: element ? (element.offsetWidth || 0) + 'px' : '0',
201+
});
202+
203+
return method;
204+
},
213205
},
214206
);

src/material/tabs/public-api.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@ export {MatTabsConfig, MAT_TABS_CONFIG} from './tab-config';
1818
export {MatTabContent, MAT_TAB_CONTENT} from './tab-content';
1919
export {MatTabLabel, MAT_TAB, MAT_TAB_LABEL} from './tab-label';
2020
export {MatTab, MAT_TAB_GROUP} from './tab';
21-
export {
22-
MatInkBar,
23-
_MatInkBarPositioner,
24-
_MAT_INK_BAR_POSITIONER_FACTORY,
25-
_MAT_INK_BAR_POSITIONER,
26-
} from './ink-bar';
21+
export {MatInkBar, _MatInkBarPositioner, _MAT_INK_BAR_POSITIONER} from './ink-bar';
2722
export {MatTabHeader} from './tab-header';
2823
export {
2924
MatTabGroup,

0 commit comments

Comments
 (0)