-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
69 additions
and
63 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
import {tuiIsApple} from './is-apple'; | ||
import {isIos} from '@ng-web-apis/platform'; | ||
|
||
const IOS_REG_EXP = /ipad|iphone|ipod/; | ||
|
||
export function tuiIsIos(navigator: Navigator): boolean { | ||
return ( | ||
IOS_REG_EXP.test(navigator.userAgent.toLowerCase()) || | ||
(tuiIsApple(navigator) && navigator.maxTouchPoints > 1) | ||
); | ||
} | ||
/** | ||
* @deprecated: drop in v5, use import {isApple} from '@ng-web-apis/platform'; | ||
* @param navigator | ||
*/ | ||
export const tuiIsIos = isIos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import {inject} from '@angular/core'; | ||
import {WA_NAVIGATOR} from '@ng-web-apis/common'; | ||
import {isApple} from '@ng-web-apis/platform'; | ||
import {tuiCreateTokenFromFactory} from '@taiga-ui/cdk/utils/miscellaneous'; | ||
import {tuiIsApple} from '@taiga-ui/legacy/utils'; | ||
|
||
/** | ||
* @deprecated: drop in v5.0 | ||
* Apple(safari/webkit) detection | ||
*/ | ||
export const TUI_IS_APPLE = tuiCreateTokenFromFactory(() => | ||
tuiIsApple(inject(WA_NAVIGATOR)), | ||
isApple(inject(WA_NAVIGATOR)), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
import {tuiIsIos} from '@taiga-ui/cdk/utils/browser'; | ||
|
||
const SAFARI_REG_EXP = /^((?!chrome|android).)*safari/i; | ||
import {isApple} from '@ng-web-apis/platform'; | ||
|
||
/** | ||
* @deprecated: drop in v5.0 | ||
*/ | ||
export function tuiIsApple(navigator: Navigator): boolean { | ||
return tuiIsIos(navigator) || SAFARI_REG_EXP.test(navigator.userAgent.toLowerCase()); | ||
} | ||
export const tuiIsApple = isApple; |