diff --git a/components/lib/utils/DomHandler.js b/components/lib/utils/DomHandler.js index ed172c018..5f35d1c18 100755 --- a/components/lib/utils/DomHandler.js +++ b/components/lib/utils/DomHandler.js @@ -705,6 +705,28 @@ export default { return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0; }, + hasCSSAnimation(element) { + if (element) { + const style = getComputedStyle(element); + const animationDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); + + return animationDuration > 0; + } + + return false; + }, + + hasCSSTransition(element) { + if (element) { + const style = getComputedStyle(element); + const transitionDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); + + return transitionDuration > 0; + } + + return false; + }, + exportCSV(csv, filename) { let blob = new Blob([csv], { type: 'application/csv;charset=utf-8;' diff --git a/components/lib/utils/Utils.d.ts b/components/lib/utils/Utils.d.ts index 3158229bf..fcff75af3 100644 --- a/components/lib/utils/Utils.d.ts +++ b/components/lib/utils/Utils.d.ts @@ -60,6 +60,8 @@ export declare class DomHandler { static isIOS(): boolean; static isAndroid(): boolean; static isTouchDevice(): boolean; + static hasCSSAnimation(el: HTMLElement): boolean; + static hasCSSTransition(el: HTMLElement): boolean; static exportCSV(csv: any, filename: string): void; }