@sitecore-jss/sitecore-jss-react 20.0.1 → 20.0.2
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.
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VisitorIdentification = void 0;
|
|
4
4
|
const withSitecoreContext_1 = require("../enhancers/withSitecoreContext");
|
|
5
5
|
let emittedVI = false;
|
|
6
|
-
const VIComponent = (
|
|
6
|
+
const VIComponent = () => {
|
|
7
|
+
const { sitecoreContext } = withSitecoreContext_1.useSitecoreContext();
|
|
7
8
|
if (emittedVI ||
|
|
8
9
|
typeof document === 'undefined' ||
|
|
9
10
|
!sitecoreContext.visitorIdentificationTimestamp) {
|
|
@@ -24,4 +25,4 @@ const VIComponent = ({ sitecoreContext }) => {
|
|
|
24
25
|
return null;
|
|
25
26
|
};
|
|
26
27
|
VIComponent.displayName = 'VisitorIdentification';
|
|
27
|
-
exports.VisitorIdentification =
|
|
28
|
+
exports.VisitorIdentification = VIComponent;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useSitecoreContext } from '../enhancers/withSitecoreContext';
|
|
2
2
|
let emittedVI = false;
|
|
3
|
-
const VIComponent = (
|
|
3
|
+
const VIComponent = () => {
|
|
4
|
+
const { sitecoreContext } = useSitecoreContext();
|
|
4
5
|
if (emittedVI ||
|
|
5
6
|
typeof document === 'undefined' ||
|
|
6
7
|
!sitecoreContext.visitorIdentificationTimestamp) {
|
|
@@ -21,4 +22,4 @@ const VIComponent = ({ sitecoreContext }) => {
|
|
|
21
22
|
return null;
|
|
22
23
|
};
|
|
23
24
|
VIComponent.displayName = 'VisitorIdentification';
|
|
24
|
-
export const VisitorIdentification =
|
|
25
|
+
export const VisitorIdentification = VIComponent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitecore-jss/sitecore-jss-react",
|
|
3
|
-
"version": "20.0.
|
|
3
|
+
"version": "20.0.2",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
"react-dom": "^17.0.2"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@sitecore-jss/sitecore-jss": "^20.0.
|
|
64
|
+
"@sitecore-jss/sitecore-jss": "^20.0.2",
|
|
65
65
|
"deep-equal": "^2.0.5",
|
|
66
66
|
"prop-types": "^15.7.2",
|
|
67
67
|
"style-attr": "^1.3.0"
|
|
68
68
|
},
|
|
69
69
|
"description": "",
|
|
70
70
|
"types": "types/index.d.ts",
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "4101e08d574129bcf190bbd79bda5ff7c9337122"
|
|
72
72
|
}
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
interface VIProps {
|
|
4
|
-
sitecoreContext: SitecoreContextValue;
|
|
5
|
-
}
|
|
6
|
-
export declare const VisitorIdentification: (props: import("../enhancers/withSitecoreContext").WithSitecoreContextHocProps<VIProps>) => JSX.Element;
|
|
7
|
-
export {};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const VisitorIdentification: React.FC<{}>;
|