@sitecore-jss/sitecore-jss-react 20.0.0 → 20.0.3

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.
package/README.md CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  This module is provided as a part of Sitecore JavaScript Rendering SDK (JSS). It contains React components and integration for JSS.
4
4
 
5
- <!---
6
- @TODO: Update to version 20.0.0 docs before release
7
- -->
8
- [Documentation](https://doc.sitecore.com/xp/en/developers/hd/190/sitecore-headless-development/sitecore-javascript-rendering-sdk--jss--for-react.html)
5
+
6
+ [Documentation](https://doc.sitecore.com/xp/en/developers/hd/200/sitecore-headless-development/sitecore-javascript-rendering-sdk--jss--for-react.html)
9
7
 
10
8
  [API reference documentation](/ref-docs/sitecore-jss-react/).
@@ -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 = ({ sitecoreContext }) => {
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 = withSitecoreContext_1.withSitecoreContext()(VIComponent);
28
+ exports.VisitorIdentification = VIComponent;
@@ -1,6 +1,7 @@
1
- import { withSitecoreContext } from '../enhancers/withSitecoreContext';
1
+ import { useSitecoreContext } from '../enhancers/withSitecoreContext';
2
2
  let emittedVI = false;
3
- const VIComponent = ({ sitecoreContext }) => {
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 = withSitecoreContext()(VIComponent);
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.0",
3
+ "version": "20.0.3",
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.0",
64
+ "@sitecore-jss/sitecore-jss": "^20.0.3",
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": "75f5eeb58228c441cd8b82c1c708ca058a533802"
71
+ "gitHead": "63752bb2971d9f9d0c77839436f92685490d9f53"
72
72
  }
@@ -1,7 +1,2 @@
1
- /// <reference types="react" />
2
- import { SitecoreContextValue } from './SitecoreContext';
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<{}>;