@sitecore-jss/sitecore-jss-react 22.3.0-canary.3 → 22.3.0-canary.5

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.
@@ -100,7 +100,7 @@ class BYOCComponent extends react_1.default.Component {
100
100
  // apply props from item datasource
101
101
  const dataSourcesData = Object.assign(Object.assign({}, props.fetchedData), { _: (0, utils_1.getDataFromFields)((_c = props.fields) !== null && _c !== void 0 ? _c : {}) });
102
102
  // we render fallback on client to avoid problems with client-only components
103
- return (react_1.default.createElement(FEAAS.ExternalComponent, Object.assign({ componentName: componentName, clientFallback: fallbackComponent, datasources: dataSourcesData }, componentProps)));
103
+ return (react_1.default.createElement(FEAAS.ExternalComponent, Object.assign({}, props.rendering, { componentName: componentName, clientFallback: fallbackComponent, datasources: dataSourcesData }, componentProps)));
104
104
  }
105
105
  }
106
106
  exports.BYOCComponent = BYOCComponent;
@@ -71,7 +71,7 @@ export class BYOCComponent extends React.Component {
71
71
  // apply props from item datasource
72
72
  const dataSourcesData = Object.assign(Object.assign({}, props.fetchedData), { _: getDataFromFields((_c = props.fields) !== null && _c !== void 0 ? _c : {}) });
73
73
  // we render fallback on client to avoid problems with client-only components
74
- return (React.createElement(FEAAS.ExternalComponent, Object.assign({ componentName: componentName, clientFallback: fallbackComponent, datasources: dataSourcesData }, componentProps)));
74
+ return (React.createElement(FEAAS.ExternalComponent, Object.assign({}, props.rendering, { componentName: componentName, clientFallback: fallbackComponent, datasources: dataSourcesData }, componentProps)));
75
75
  }
76
76
  }
77
77
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-jss/sitecore-jss-react",
3
- "version": "22.3.0-canary.3",
3
+ "version": "22.3.0-canary.5",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "sideEffects": false,
@@ -26,7 +26,7 @@
26
26
  "url": "https://github.com/sitecore/jss/issues"
27
27
  },
28
28
  "devDependencies": {
29
- "@sitecore-feaas/clientside": "^0.5.6",
29
+ "@sitecore-feaas/clientside": "^0.5.19",
30
30
  "@types/chai": "^4.3.4",
31
31
  "@types/chai-string": "^1.4.2",
32
32
  "@types/enzyme": "^3.10.12",
@@ -56,19 +56,19 @@
56
56
  "typescript": "~4.9.3"
57
57
  },
58
58
  "peerDependencies": {
59
- "@sitecore-feaas/clientside": "^0.5.6",
59
+ "@sitecore-feaas/clientside": "^0.5.19",
60
60
  "react": "^18.2.0",
61
61
  "react-dom": "^18.2.0"
62
62
  },
63
63
  "dependencies": {
64
- "@sitecore-jss/sitecore-jss": "^22.3.0-canary.3",
64
+ "@sitecore-jss/sitecore-jss": "^22.3.0-canary.5",
65
65
  "fast-deep-equal": "^3.1.3",
66
66
  "prop-types": "^15.8.1",
67
67
  "style-attr": "^1.3.0"
68
68
  },
69
69
  "description": "",
70
70
  "types": "types/index.d.ts",
71
- "gitHead": "3de00d81185a1676b639f8f4b955268a62a44ac6",
71
+ "gitHead": "a6348ad3d69b950639e99aabd0c01d8448252b09",
72
72
  "files": [
73
73
  "dist",
74
74
  "types"
@@ -1,6 +1,6 @@
1
1
  /// <reference types="@types/react" />
2
2
  import React from 'react';
3
- import { ComponentFields } from '@sitecore-jss/sitecore-jss/layout';
3
+ import { ComponentFields, ComponentRendering } from '@sitecore-jss/sitecore-jss/layout';
4
4
  import { MissingComponentProps } from './MissingComponent';
5
5
  import * as FEAAS from '@sitecore-feaas/clientside/react';
6
6
  export declare const BYOC_COMPONENT_RENDERING_NAME = "BYOCComponent";
@@ -39,6 +39,10 @@ export type BYOCComponentParams = {
39
39
  * Props for BYOCComponent. Includes components list to load external components from.
40
40
  */
41
41
  export type BYOCComponentClientProps = {
42
+ /**
43
+ * rendering data
44
+ */
45
+ rendering: ComponentRendering;
42
46
  /**
43
47
  * rendering params
44
48
  */
@@ -83,5 +87,5 @@ export declare class BYOCComponent extends React.Component<BYOCComponentProps> {
83
87
  * Fetches server component props required for server rendering, based on rendering params.
84
88
  * @param {BYOCComponentParams} params component params
85
89
  */
86
- export declare function fetchBYOCComponentServerProps(params: BYOCComponentParams): Promise<BYOCComponentProps>;
90
+ export declare function fetchBYOCComponentServerProps(params: BYOCComponentParams): Promise<BYOCServerProps>;
87
91
  export {};