react-gldn-kit 0.1.129 → 0.1.131

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,14 +40,12 @@ var react_1 = require("react");
40
40
  var ui_1 = require("types/ui");
41
41
  var store_1 = require("zustandStore/settings/store");
42
42
  var selectors_1 = require("zustandStore/settings/selectors");
43
- var useHotJar_1 = require("hooks/useHotJar");
44
43
  var styles = __importStar(require("./HOCKitConfigure.module.css"));
45
44
  var HOCKitConfigure = function (props) {
46
- var children = props.children, appType = props.appType, hotjarKey = props.hotjarKey;
45
+ var children = props.children, appType = props.appType;
47
46
  var setImageSettings = (0, store_1.useZustandKitSettings)(selectors_1.setKitSettingImageAction);
48
47
  var setDevState = (0, store_1.useZustandKitSettings)(selectors_1.setKitSettingDevAction);
49
48
  var setAppType = (0, store_1.useZustandKitSettings)(selectors_1.setKitSettingAppTypeAction);
50
- var hotjar = (0, useHotJar_1.useHotJarAnalytics)({ hotjarKey: hotjarKey });
51
49
  (0, react_1.useEffect)(function () {
52
50
  var appType = props.appType, isDev = props.isDev, imgSettings = props.imgSettings;
53
51
  setDevState(isDev);
@@ -6,5 +6,4 @@ export type PropsConfigure = {
6
6
  appType: EAppType;
7
7
  isDev: boolean;
8
8
  imgSettings: ImageSettingsProps;
9
- hotjarKey?: string;
10
9
  };
@@ -52,7 +52,7 @@ var Presets = function (props) {
52
52
  var value = _a.value, bonusPercent = _a.bonusPercent;
53
53
  return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: (0, classnames_1.default)(styles.preset, (_b = {},
54
54
  _b[styles.active] = +activeAmount === value,
55
- _b)), onClick: handleApply(value) }, { children: [value, bonusPercent && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.promoValuePercent }, { children: [(0, jsx_runtime_1.jsx)(FireSvg_1.FireSvg, {}), (0, jsx_runtime_1.jsxs)("div", { children: ["+", bonusPercent, "%"] })] })))] }), "".concat(value, "_").concat(inx)));
55
+ _b)), onClick: handleApply(value) }, { children: [value, !!bonusPercent && ((0, jsx_runtime_1.jsxs)("div", __assign({ className: styles.promoValuePercent }, { children: [(0, jsx_runtime_1.jsx)(FireSvg_1.FireSvg, {}), (0, jsx_runtime_1.jsxs)("div", { children: ["+", bonusPercent, "%"] })] })))] }), "".concat(value, "_").concat(inx)));
56
56
  }) })));
57
57
  };
58
58
  exports.Presets = Presets;
@@ -1,6 +1 @@
1
- type Props = {
2
- hotjarKey?: string;
3
- version?: number;
4
- };
5
- export declare const useHotJarAnalytics: ({ hotjarKey, version }: Props) => void;
6
- export {};
1
+ export declare const useHotJarAnalytics: (hotjarKey?: string) => void;
@@ -2,8 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useHotJarAnalytics = void 0;
4
4
  var react_1 = require("react");
5
- var useHotJarAnalytics = function (_a) {
6
- var hotjarKey = _a.hotjarKey, _b = _a.version, version = _b === void 0 ? 6 : _b;
5
+ var useHotJarAnalytics = function (hotjarKey) {
7
6
  (0, react_1.useEffect)(function () {
8
7
  if (!hotjarKey) {
9
8
  return;
@@ -11,21 +10,25 @@ var useHotJarAnalytics = function (_a) {
11
10
  if (document.getElementById('hotjar-script')) {
12
11
  return;
13
12
  }
14
- (function (h, o, t, j, a, r) {
13
+ // Initialize Hotjar
14
+ (function (h, o, t, j) {
15
15
  h.hj =
16
16
  h.hj ||
17
17
  function () {
18
- (h.hj.q = h.hj.q || []).push(arguments);
18
+ var args = [];
19
+ for (var _i = 0; _i < arguments.length; _i++) {
20
+ args[_i] = arguments[_i];
21
+ }
22
+ (h.hj.q = h.hj.q || []).push(args);
19
23
  };
20
- h._hjSettings = { hjid: hotjarKey, hjsv: version };
21
- a = o.getElementsByTagName('head')[0];
22
- r = o.createElement('script');
24
+ h._hjSettings = { hjid: hotjarKey, hjsv: 6 };
25
+ var a = o.getElementsByTagName('head')[0];
26
+ var r = o.createElement('script');
23
27
  r.id = 'hotjar-script';
24
28
  r.async = true;
25
- r.src = "".concat(t).concat(h._hjSettings.hjid).concat(j).concat(h._hjSettings.hjsv);
26
- a.appendChild(r);
29
+ r.src = t + h._hjSettings.hjid + j + h._hjSettings.hjsv;
30
+ a === null || a === void 0 ? void 0 : a.appendChild(r);
27
31
  })(window, document, 'https://static.hotjar.com/c/hotjar-', '.js?sv=');
28
- }, [hotjarKey, version]);
29
- return null;
32
+ }, [hotjarKey]);
30
33
  };
31
34
  exports.useHotJarAnalytics = useHotJarAnalytics;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-gldn-kit",
3
- "version": "0.1.129",
3
+ "version": "0.1.131",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "keywords": [],
@@ -45,7 +45,7 @@
45
45
  "postcss-loader": "^8.1.1",
46
46
  "postcss-preset-env": "^10.1.2",
47
47
  "prettier": "^2.8.8",
48
- "react-render-hooks": "^0.0.91",
48
+ "react-render-hooks": "^0.0.99",
49
49
  "rimraf": "^6.0.1",
50
50
  "scheduler": "^0.25.0",
51
51
  "style-loader": "^4.0.0",