@lion/core
Advanced tools
Comparing version 0.12.0 to 0.13.0
# Change Log | ||
## 0.13.0 | ||
### Minor Changes | ||
- 01a798e5: Combobox package | ||
## Features | ||
- combobox: new combobox package | ||
- core: expanded browsers detection utils | ||
- core: closest() polyfill for IE | ||
- overlays: allow OverlayMixin to specify reference node (when invokerNode should not be positioned against) | ||
- form-core: add `_onLabelClick` to FormControlMixin. Subclassers should override this | ||
## Patches | ||
- form-core: make ChoiceGroupMixin a suite | ||
- listbox: move generic tests from combobox to listbox | ||
- select-rich: enhance tests | ||
## 0.12.0 | ||
@@ -4,0 +24,0 @@ |
{ | ||
"name": "@lion/core", | ||
"version": "0.12.0", | ||
"version": "0.13.0", | ||
"description": "Core functionality that is shared across all Lion Web Components", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
export namespace browserDetection { | ||
export { isIE11 }; | ||
export const isIE11: boolean; | ||
export const isChrome: any; | ||
export const isIOSChrome: any; | ||
export const isChromium: any; | ||
export const isMac: boolean; | ||
} | ||
declare const isIE11: boolean; | ||
export {}; |
@@ -1,5 +0,41 @@ | ||
const isIE11 = /Trident/.test(window.navigator.userAgent); | ||
/** | ||
* From https://stackoverflow.com/questions/4565112/javascript-how-to-find-out-if-the-user-browser-is-chrome | ||
* @param {string} [flavor] | ||
*/ | ||
function checkChrome(flavor = 'google-chrome') { | ||
// @ts-ignore | ||
const isChromium = window.chrome; | ||
if (flavor === 'chromium') { | ||
return isChromium; | ||
} | ||
const winNav = window.navigator; | ||
const vendorName = winNav.vendor; | ||
// @ts-ignore | ||
const isOpera = typeof window.opr !== 'undefined'; | ||
const isIEedge = winNav.userAgent.indexOf('Edge') > -1; | ||
const isIOSChrome = winNav.userAgent.match('CriOS'); | ||
if (flavor === 'ios') { | ||
return isIOSChrome; | ||
} | ||
if (flavor === 'google-chrome') { | ||
return ( | ||
isChromium !== null && | ||
typeof isChromium !== 'undefined' && | ||
vendorName === 'Google Inc.' && | ||
isOpera === false && | ||
isIEedge === false | ||
); | ||
} | ||
return undefined; | ||
} | ||
export const browserDetection = { | ||
isIE11, | ||
isIE11: /Trident/.test(window.navigator.userAgent), | ||
isChrome: checkChrome(), | ||
isIOSChrome: checkChrome('ios'), | ||
isChromium: checkChrome('chromium'), | ||
isMac: navigator.appVersion.indexOf('Mac') !== -1, | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91310
46
1694