react-use-hotjar
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -5,2 +5,10 @@ # Changelog | ||
### [1.2.1](https://github.com/olavoparno/react-use-hotjar/compare/v1.2.0...v1.2.1) (2022-02-17) | ||
### Bug Fixes | ||
* **project:** remove sourcemap as a paliative ([75da78b](https://github.com/olavoparno/react-use-hotjar/commit/75da78b4fb50a415c90d878117df8d2c1d27feda)) | ||
* upgrade @material-ui/core from 4.12.1 to 4.12.3 ([6760c3c](https://github.com/olavoparno/react-use-hotjar/commit/6760c3c387e0f12718bfcdc7ef32b93850fedea8)) | ||
## [1.2.0](https://github.com/olavoparno/react-use-hotjar/compare/v1.1.2...v1.2.0) (2021-07-20) | ||
@@ -7,0 +15,0 @@ |
@@ -1,2 +0,1 @@ | ||
import*as t from"react";function r(t,r,e){var n="undefined"!=typeof window;if(!n)throw Error("Hotjar depends on window. Window is undefined.");if(function(t,r){try{var e=document.getElementById(r)||document.createElement("script");return e.id=r,e.innerText=t,e.crossOrigin="anonymous",document.head.appendChild(e),!0}catch(t){return!1}}("(function(h,o,t,j,a,r){h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};h._hjSettings={hjid:"+t+",hjsv:"+r+",hjdebug:"+e+"};a=o.getElementsByTagName('head')[0];r=o.createElement('script');r.async=1;r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;a.appendChild(r);})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');","hotjar-init-script")&&n&&window.hj)return!0;throw Error("Hotjar initialization failed!")}function e(){var e=!("undefined"==typeof window||!window.hj),n=t.useState(t.useMemo((function(){return e}),[e])),o=n[0],i=n[1],a=t.useCallback((function(t,e,n,o){try{return r(t,e,!!n),i(!0),o&&"function"==typeof o&&o("Hotjar ready: true"),!0}catch(t){return console.error("Hotjar error: "+t.message),!1}}),[]),d=t.useCallback((function(t,r,e){try{return function(t,r){if("undefined"!=typeof window&&window.hj)return window.hj("identify",t,r);throw Error("Hotjar is not available! Is Hotjar initialized?")}(t,r),e&&"function"==typeof e&&e("Hotjar identified"),!0}catch(t){return console.error("Hotjar error: "+t.message),!1}}),[]),u=t.useCallback((function(t,r){try{return function(t){if("undefined"!=typeof window&&window.hj)return window.hj("stateChange",t);throw Error("Hotjar is not available! Is Hotjar initialized?")}(t),r&&"function"==typeof r&&r("Hotjar stateChanged"),!0}catch(t){return console.error("Hotjar error: "+t.message),!1}}),[]),c=t.useCallback((function(t,r){try{return function(t){if("undefined"!=typeof window&&window.hj)return window.hj("tagRecording",t);throw Error("Hotjar is not available! Is Hotjar initialized?")}(t),r&&"function"==typeof r&&r("Hotjar tagRecording"),!0}catch(t){return console.error("Hotjar error: "+t.message),!1}}),[]);return t.useMemo((function(){return{readyState:o,stateChange:u,tagRecording:c,initHotjar:a,identifyHotjar:d}}),[o,u,c,a,d])}export default e; | ||
//# sourceMappingURL=index.es.js.map | ||
import*as t from"react";function n(t,n,r){var e="undefined"!=typeof window;if(!e)throw Error("Hotjar depends on window. Window is undefined.");if(function(t,n){try{var r=document.getElementById(n)||document.createElement("script");return r.id=n,r.innerText=t,r.crossOrigin="anonymous",document.head.appendChild(r),!0}catch(t){return!1}}("(function(h,o,t,j,a,r){h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};h._hjSettings={hjid:".concat(t,",hjsv:").concat(n,",hjdebug:").concat(r,"};a=o.getElementsByTagName('head')[0];r=o.createElement('script');r.async=1;r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;a.appendChild(r);})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');"),"hotjar-init-script")&&e&&window.hj)return!0;throw Error("Hotjar initialization failed!")}function r(){var r=!("undefined"==typeof window||!window.hj),e=t.useState(t.useMemo((function(){return r}),[r])),o=e[0],i=e[1],a=t.useCallback((function(t,r,e,o){try{return n(t,r,!!e),i(!0),o&&"function"==typeof o&&o("Hotjar ready: true"),!0}catch(t){return console.error("Hotjar error: ".concat(t.message)),!1}}),[]),c=t.useCallback((function(t,n,r){try{return function(t,n){if("undefined"!=typeof window&&window.hj)return window.hj("identify",t,n);throw Error("Hotjar is not available! Is Hotjar initialized?")}(t,n),r&&"function"==typeof r&&r("Hotjar identified"),!0}catch(t){return console.error("Hotjar error: ".concat(t.message)),!1}}),[]),d=t.useCallback((function(t,n){try{return function(t){if("undefined"!=typeof window&&window.hj)return window.hj("stateChange",t);throw Error("Hotjar is not available! Is Hotjar initialized?")}(t),n&&"function"==typeof n&&n("Hotjar stateChanged"),!0}catch(t){return console.error("Hotjar error: ".concat(t.message)),!1}}),[]),u=t.useCallback((function(t,n){try{return function(t){if("undefined"!=typeof window&&window.hj)return window.hj("tagRecording",t);throw Error("Hotjar is not available! Is Hotjar initialized?")}(t),n&&"function"==typeof n&&n("Hotjar tagRecording"),!0}catch(t){return console.error("Hotjar error: ".concat(t.message)),!1}}),[]);return t.useMemo((function(){return{readyState:o,stateChange:d,tagRecording:u,initHotjar:a,identifyHotjar:c}}),[o,d,u,a,c])}export{r as default}; |
@@ -1,2 +0,1 @@ | ||
"use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react"));function r(e,t,r){var n="undefined"!=typeof window;if(!n)throw Error("Hotjar depends on window. Window is undefined.");if(function(e,t){try{var r=document.getElementById(t)||document.createElement("script");return r.id=t,r.innerText=e,r.crossOrigin="anonymous",document.head.appendChild(r),!0}catch(e){return!1}}("(function(h,o,t,j,a,r){h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};h._hjSettings={hjid:"+e+",hjsv:"+t+",hjdebug:"+r+"};a=o.getElementsByTagName('head')[0];r=o.createElement('script');r.async=1;r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;a.appendChild(r);})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');","hotjar-init-script")&&n&&window.hj)return!0;throw Error("Hotjar initialization failed!")}exports.default=function(){var e=!("undefined"==typeof window||!window.hj),n=t.useState(t.useMemo((function(){return e}),[e])),o=n[0],i=n[1],a=t.useCallback((function(e,t,n,o){try{return r(e,t,!!n),i(!0),o&&"function"==typeof o&&o("Hotjar ready: true"),!0}catch(e){return console.error("Hotjar error: "+e.message),!1}}),[]),u=t.useCallback((function(e,t,r){try{return function(e,t){if("undefined"!=typeof window&&window.hj)return window.hj("identify",e,t);throw Error("Hotjar is not available! Is Hotjar initialized?")}(e,t),r&&"function"==typeof r&&r("Hotjar identified"),!0}catch(e){return console.error("Hotjar error: "+e.message),!1}}),[]),c=t.useCallback((function(e,t){try{return function(e){if("undefined"!=typeof window&&window.hj)return window.hj("stateChange",e);throw Error("Hotjar is not available! Is Hotjar initialized?")}(e),t&&"function"==typeof t&&t("Hotjar stateChanged"),!0}catch(e){return console.error("Hotjar error: "+e.message),!1}}),[]),d=t.useCallback((function(e,t){try{return function(e){if("undefined"!=typeof window&&window.hj)return window.hj("tagRecording",e);throw Error("Hotjar is not available! Is Hotjar initialized?")}(e),t&&"function"==typeof t&&t("Hotjar tagRecording"),!0}catch(e){return console.error("Hotjar error: "+e.message),!1}}),[]);return t.useMemo((function(){return{readyState:o,stateChange:c,tagRecording:d,initHotjar:a,identifyHotjar:u}}),[o,c,d,a,u])}; | ||
//# sourceMappingURL=index.js.map | ||
"use strict";function t(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}})),e.default=t,Object.freeze(e)}Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("react"));function r(t,e,r){var n="undefined"!=typeof window;if(!n)throw Error("Hotjar depends on window. Window is undefined.");if(function(t,e){try{var r=document.getElementById(e)||document.createElement("script");return r.id=e,r.innerText=t,r.crossOrigin="anonymous",document.head.appendChild(r),!0}catch(t){return!1}}("(function(h,o,t,j,a,r){h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};h._hjSettings={hjid:".concat(t,",hjsv:").concat(e,",hjdebug:").concat(r,"};a=o.getElementsByTagName('head')[0];r=o.createElement('script');r.async=1;r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;a.appendChild(r);})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');"),"hotjar-init-script")&&n&&window.hj)return!0;throw Error("Hotjar initialization failed!")}exports.default=function(){var t=!("undefined"==typeof window||!window.hj),n=e.useState(e.useMemo((function(){return t}),[t])),o=n[0],i=n[1],a=e.useCallback((function(t,e,n,o){try{return r(t,e,!!n),i(!0),o&&"function"==typeof o&&o("Hotjar ready: true"),!0}catch(t){return console.error("Hotjar error: ".concat(t.message)),!1}}),[]),c=e.useCallback((function(t,e,r){try{return function(t,e){if("undefined"!=typeof window&&window.hj)return window.hj("identify",t,e);throw Error("Hotjar is not available! Is Hotjar initialized?")}(t,e),r&&"function"==typeof r&&r("Hotjar identified"),!0}catch(t){return console.error("Hotjar error: ".concat(t.message)),!1}}),[]),u=e.useCallback((function(t,e){try{return function(t){if("undefined"!=typeof window&&window.hj)return window.hj("stateChange",t);throw Error("Hotjar is not available! Is Hotjar initialized?")}(t),e&&"function"==typeof e&&e("Hotjar stateChanged"),!0}catch(t){return console.error("Hotjar error: ".concat(t.message)),!1}}),[]),d=e.useCallback((function(t,e){try{return function(t){if("undefined"!=typeof window&&window.hj)return window.hj("tagRecording",t);throw Error("Hotjar is not available! Is Hotjar initialized?")}(t),e&&"function"==typeof e&&e("Hotjar tagRecording"),!0}catch(t){return console.error("Hotjar error: ".concat(t.message)),!1}}),[]);return e.useMemo((function(){return{readyState:o,stateChange:u,tagRecording:d,initHotjar:a,identifyHotjar:c}}),[o,u,d,a,c])}; |
{ | ||
"name": "react-use-hotjar", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Adds Hotjar capabilities as custom hooks", | ||
@@ -22,3 +22,3 @@ "author": "Olavo Parno", | ||
"README.md", | ||
"dist/" | ||
"dist" | ||
], | ||
@@ -55,38 +55,37 @@ "lint-staged": { | ||
"devDependencies": { | ||
"@babel/core": "^7.14.6", | ||
"@babel/runtime": "^7.14.6", | ||
"@babel/core": "^7.17.4", | ||
"@babel/runtime": "^7.17.2", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^19.0.0", | ||
"@rollup/plugin-node-resolve": "^13.0.0", | ||
"@rollup/plugin-typescript": "^8.2.1", | ||
"@rollup/plugin-url": "^6.0.0", | ||
"@testing-library/react-hooks": "^7.0.1", | ||
"@types/jest": "^26.0.24", | ||
"@types/react": "^17.0.14", | ||
"@typescript-eslint/eslint-plugin": "^4.28.3", | ||
"@typescript-eslint/parser": "^4.28.3", | ||
"@rollup/plugin-commonjs": "^21.0.1", | ||
"@rollup/plugin-node-resolve": "^13.1.3", | ||
"@rollup/plugin-typescript": "^8.3.0", | ||
"@testing-library/react-hooks": "^7.0.2", | ||
"@types/jest": "^27.4.0", | ||
"@types/react": "^17.0.39", | ||
"@typescript-eslint/eslint-plugin": "^5.12.0", | ||
"@typescript-eslint/parser": "^5.12.0", | ||
"cross-env": "^7.0.3", | ||
"eslint": "^7.30.0", | ||
"eslint-config-airbnb": "^18.2.1", | ||
"eslint-plugin-import": "^2.23.4", | ||
"eslint-plugin-jsx-a11y": "^6.4.1", | ||
"eslint-plugin-react": "^7.24.0", | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
"eslint-config-airbnb-typescript-prettier": "^4.2.0", | ||
"eslint": "^8.9.0", | ||
"eslint-config-airbnb": "^19.0.4", | ||
"eslint-config-airbnb-typescript-prettier": "^5.0.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-prettier": "^3.4.0", | ||
"husky": "^7.0.1", | ||
"istanbul-badges-readme": "^1.4.0", | ||
"prettier": "^2.3.2", | ||
"eslint-plugin-import": "^2.25.4", | ||
"eslint-plugin-jsx-a11y": "^6.5.1", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-react": "^7.28.0", | ||
"eslint-plugin-react-hooks": "^4.3.0", | ||
"gh-pages": "^3.2.3", | ||
"husky": "^7.0.4", | ||
"istanbul-badges-readme": "^1.8.1", | ||
"prettier": "^2.5.1", | ||
"react": "^17.0.2", | ||
"react-scripts": "^4.0.3", | ||
"react-scripts": "^5.0.0", | ||
"react-test-renderer": "^17.0.2", | ||
"rollup": "^2.53.1", | ||
"rollup": "^2.67.2", | ||
"rollup-plugin-peer-deps-external": "^2.2.4", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"tslib": "^2.3.0", | ||
"standard-version": "^9.3.0", | ||
"typescript": "^4.3.5" | ||
"standard-version": "^9.3.2", | ||
"tslib": "^2.3.1", | ||
"typescript": "^4.5.5" | ||
} | ||
} |
@@ -13,3 +13,3 @@ <img align="right" alt="traffic" src="https://pv-badge.herokuapp.com/total.svg?repo_id=olavoparno-react-use-hotjar"/> | ||
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ | | ||
| ![Statements](https://img.shields.io/badge/statements-100%25-brightgreen.svg) | ![Branches](https://img.shields.io/badge/branches-100%25-brightgreen.svg) | ![Functions](https://img.shields.io/badge/functions-100%25-brightgreen.svg) | ![Lines](https://img.shields.io/badge/lines-100%25-brightgreen.svg) | | ||
| ![Statements](https://img.shields.io/badge/statements-100%25-brightgreen.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-100%25-brightgreen.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-100%25-brightgreen.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-100%25-brightgreen.svg?style=flat) | | ||
@@ -159,2 +159,3 @@ ## Table of Contents | ||
<td align="center"><a href="https://github.com/honicole"><img src="https://avatars.githubusercontent.com/u/11463889?v=4?s=70" width="70px;" alt=""/><br /><sub><b>honicole</b></sub></a><br /><a href="#tool-honicole" title="Tools">🔧</a> <a href="https://github.com/olavoparno/react-use-hotjar/commits?author=honicole" title="Code">💻</a> <a href="#ideas-honicole" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/olavoparno/react-use-hotjar/commits?author=honicole" title="Documentation">📖</a></td> | ||
<td align="center"><a href="https://github.com/georgibakken"><img src="https://avatars.githubusercontent.com/u/16558100?v=4?s=70" width="70px;" alt=""/><br /><sub><b>Georg Bakken Idland</b></sub></a><br /><a href="https://github.com/olavoparno/react-use-hotjar/commits?author=georgibakken" title="Documentation">📖</a> <a href="#ideas-georgibakken" title="Ideas, Planning, & Feedback">🤔</a></td> | ||
</tr> | ||
@@ -161,0 +162,0 @@ </table> |
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
34
178
22324
9
39