1
1
import { FocusMonitor } from '@angular/cdk/a11y' ;
2
2
import { Direction , Directionality } from '@angular/cdk/bidi' ;
3
3
import { ESCAPE } from '@angular/cdk/keycodes' ;
4
- import { CdkScrollable , OverlayContainer , OverlayModule } from '@angular/cdk/overlay' ;
4
+ import {
5
+ CdkScrollable ,
6
+ ConnectedPosition ,
7
+ FlexibleConnectedPositionStrategy ,
8
+ OverlayContainer ,
9
+ OverlayModule ,
10
+ } from '@angular/cdk/overlay' ;
5
11
import { Platform } from '@angular/cdk/platform' ;
6
12
import {
7
13
createFakeEvent ,
@@ -1423,7 +1429,7 @@ describe('MatTooltip', () => {
1423
1429
fixture . detectChanges ( ) ;
1424
1430
1425
1431
const styles = fixture . nativeElement . querySelector ( 'button' ) . style ;
1426
- expect ( styles . touchAction || ( styles as any ) . webkitUserDrag ) . toBe ( 'none' ) ;
1432
+ expect ( styles . touchAction || styles . webkitUserDrag ) . toBe ( 'none' ) ;
1427
1433
} ) ;
1428
1434
1429
1435
it ( 'should allow native touch interactions if touch gestures are turned off' , ( ) => {
@@ -1432,7 +1438,7 @@ describe('MatTooltip', () => {
1432
1438
fixture . detectChanges ( ) ;
1433
1439
1434
1440
const styles = fixture . nativeElement . querySelector ( 'button' ) . style ;
1435
- expect ( styles . touchAction || ( styles as any ) . webkitUserDrag ) . toBeFalsy ( ) ;
1441
+ expect ( styles . touchAction || styles . webkitUserDrag ) . toBeFalsy ( ) ;
1436
1442
} ) ;
1437
1443
1438
1444
it ( 'should allow text selection on inputs when gestures are set to auto' , ( ) => {
@@ -1444,13 +1450,13 @@ describe('MatTooltip', () => {
1444
1450
1445
1451
expect ( inputStyle . userSelect ) . toBeFalsy ( ) ;
1446
1452
expect ( inputStyle . webkitUserSelect ) . toBeFalsy ( ) ;
1447
- expect ( ( inputStyle as any ) . msUserSelect ) . toBeFalsy ( ) ;
1448
- expect ( ( inputStyle as any ) . MozUserSelect ) . toBeFalsy ( ) ;
1453
+ expect ( inputStyle . msUserSelect ) . toBeFalsy ( ) ;
1454
+ expect ( inputStyle . MozUserSelect ) . toBeFalsy ( ) ;
1449
1455
1450
1456
expect ( textareaStyle . userSelect ) . toBeFalsy ( ) ;
1451
1457
expect ( textareaStyle . webkitUserSelect ) . toBeFalsy ( ) ;
1452
- expect ( ( textareaStyle as any ) . msUserSelect ) . toBeFalsy ( ) ;
1453
- expect ( ( textareaStyle as any ) . MozUserSelect ) . toBeFalsy ( ) ;
1458
+ expect ( textareaStyle . msUserSelect ) . toBeFalsy ( ) ;
1459
+ expect ( textareaStyle . MozUserSelect ) . toBeFalsy ( ) ;
1454
1460
} ) ;
1455
1461
1456
1462
it ( 'should disable text selection on inputs when gestures are set to on' , ( ) => {
@@ -1462,14 +1468,14 @@ describe('MatTooltip', () => {
1462
1468
const inputUserSelect =
1463
1469
inputStyle . userSelect ||
1464
1470
inputStyle . webkitUserSelect ||
1465
- ( inputStyle as any ) . msUserSelect ||
1466
- ( inputStyle as any ) . MozUserSelect ;
1471
+ inputStyle . msUserSelect ||
1472
+ inputStyle . MozUserSelect ;
1467
1473
const textareaStyle = fixture . componentInstance . textarea . nativeElement . style ;
1468
1474
const textareaUserSelect =
1469
1475
textareaStyle . userSelect ||
1470
1476
textareaStyle . webkitUserSelect ||
1471
- ( textareaStyle as any ) . msUserSelect ||
1472
- ( textareaStyle as any ) . MozUserSelect ;
1477
+ textareaStyle . msUserSelect ||
1478
+ textareaStyle . MozUserSelect ;
1473
1479
1474
1480
expect ( inputUserSelect ) . toBe ( 'none' ) ;
1475
1481
expect ( textareaUserSelect ) . toBe ( 'none' ) ;
@@ -1608,7 +1614,7 @@ describe('MatTooltip', () => {
1608
1614
} )
1609
1615
class BasicTooltipDemo {
1610
1616
position = 'below' ;
1611
- message : any = initialTooltipMessage ;
1617
+ message : string | number = initialTooltipMessage ;
1612
1618
showButton = true ;
1613
1619
showTooltipClass = false ;
1614
1620
tooltipDisabled = false ;
@@ -1725,7 +1731,7 @@ class TooltipOnDraggableElement {
1725
1731
standalone : false ,
1726
1732
} )
1727
1733
class TooltipDemoWithoutPositionBinding {
1728
- message : any = initialTooltipMessage ;
1734
+ message : string = initialTooltipMessage ;
1729
1735
@ViewChild ( MatTooltip ) tooltip : MatTooltip ;
1730
1736
@ViewChild ( 'button' ) button : ElementRef < HTMLButtonElement > ;
1731
1737
}
@@ -1749,7 +1755,7 @@ class TooltipDemoWithoutTooltipClassBinding {
1749
1755
standalone : false ,
1750
1756
} )
1751
1757
class TooltipDemoWithTooltipClassBinding {
1752
- message : any = initialTooltipMessage ;
1758
+ message : string = initialTooltipMessage ;
1753
1759
@ViewChild ( MatTooltip ) tooltip : MatTooltip ;
1754
1760
@ViewChild ( 'button' ) button : ElementRef < HTMLButtonElement > ;
1755
1761
}
0 commit comments