Skip to content

Commit bd76f1a

Browse files
crisbetommalerba
authored andcommitted
refactor: remove internal usages of deprecated apis (#12316)
Removes a handful of internal usages of APIs that have been deprecated.
1 parent f0a0ab1 commit bd76f1a

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/cdk-experimental/drag-drop/drag.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
ContentChildren,
2424
QueryList,
2525
} from '@angular/core';
26-
import {DOCUMENT} from '@angular/platform-browser';
26+
import {DOCUMENT} from '@angular/common';
2727
import {Directionality} from '@angular/cdk/bidi';
2828
import {CdkDragHandle} from './drag-handle';
2929
import {CdkDropContainer, CDK_DROP_CONTAINER} from './drop-container';

src/lib/datepicker/datepicker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ export class MatDatepicker<D> implements OnDestroy, CanColor {
442442
/** Create the popup PositionStrategy. */
443443
private _createPopupPositionStrategy(): PositionStrategy {
444444
return this._overlay.position()
445-
.flexibleConnectedTo(this._datepickerInput.getPopupConnectionElementRef())
445+
.flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin())
446446
.withTransformOriginOn('.mat-datepicker-content')
447447
.withFlexibleDimensions(false)
448448
.withViewportMargin(8)

src/lib/list/selection-list.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ describe('MatSelectionList without forms', () => {
455455
}));
456456

457457
it('should set its initial selected state in the selectedOptions', () => {
458-
let optionEl = listItemEl.injector.get(MatListOption);
458+
let optionEl = listItemEl.injector.get<MatListOption>(MatListOption);
459459
let selectedOptions = selectionList.componentInstance.selectedOptions;
460460
expect(selectedOptions.isSelected(optionEl)).toBeTruthy();
461461
});
@@ -633,7 +633,8 @@ describe('MatSelectionList without forms', () => {
633633
// property of the selection list has been updated, the ripple directive can be used.
634634
// Inspecting the host classes of the options doesn't work because those update as part
635635
// of the parent template (of the selection-list).
636-
const listOptionRipple = listOption[2].query(By.directive(MatRipple)).injector.get(MatRipple);
636+
const listOptionRipple = listOption[2].query(By.directive(MatRipple))
637+
.injector.get<MatRipple>(MatRipple);
637638

638639
expect(listOptionRipple.disabled)
639640
.toBe(true, 'Expected ripples of list option to be disabled');

0 commit comments

Comments
 (0)