@sitecore-jss/sitecore-jss-react 21.6.3-canary.2 → 21.6.3-canary.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.
|
@@ -24,14 +24,6 @@ const FEaaSComponent_1 = require("./FEaaSComponent");
|
|
|
24
24
|
const FEaaSWrapper_1 = require("./FEaaSWrapper");
|
|
25
25
|
const BYOCComponent_1 = require("./BYOCComponent");
|
|
26
26
|
const BYOCWrapper_1 = require("./BYOCWrapper");
|
|
27
|
-
/**
|
|
28
|
-
* These patterns need for right rendering Dynamic placeholders.
|
|
29
|
-
* Must be distinguished Splitter components and another placeholders(containers)
|
|
30
|
-
*/
|
|
31
|
-
const EXCLUDE_PLACEHOLDERS_RENDER = [
|
|
32
|
-
new RegExp(/column-(\d{1})-\{\*\}/i),
|
|
33
|
-
new RegExp(/row-(\d{1})-\{\*\}/i),
|
|
34
|
-
];
|
|
35
27
|
class PlaceholderCommon extends react_1.default.Component {
|
|
36
28
|
constructor(props) {
|
|
37
29
|
super(props);
|
|
@@ -47,9 +39,10 @@ class PlaceholderCommon extends react_1.default.Component {
|
|
|
47
39
|
from backend side we get common name of placeholder is called 'nameOfContainer-{*}' where '{*}' marker for replacing **/
|
|
48
40
|
if (rendering === null || rendering === void 0 ? void 0 : rendering.placeholders) {
|
|
49
41
|
Object.keys(rendering.placeholders).forEach((placeholder) => {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
42
|
+
const patternPlaceholder = placeholder.indexOf('{*}') !== -1
|
|
43
|
+
? new RegExp(`^${placeholder.replace(/\{\*\}+/i, '\\d+')}$`)
|
|
44
|
+
: null;
|
|
45
|
+
if (patternPlaceholder && patternPlaceholder.test(name)) {
|
|
53
46
|
rendering.placeholders[name] = rendering.placeholders[placeholder];
|
|
54
47
|
delete rendering.placeholders[placeholder];
|
|
55
48
|
}
|
|
@@ -18,14 +18,6 @@ import { FEaaSComponent, FEAAS_COMPONENT_RENDERING_NAME } from './FEaaSComponent
|
|
|
18
18
|
import { FEaaSWrapper, FEAAS_WRAPPER_RENDERING_NAME } from './FEaaSWrapper';
|
|
19
19
|
import { BYOCComponent, BYOC_COMPONENT_RENDERING_NAME } from './BYOCComponent';
|
|
20
20
|
import { BYOCWrapper, BYOC_WRAPPER_RENDERING_NAME } from './BYOCWrapper';
|
|
21
|
-
/**
|
|
22
|
-
* These patterns need for right rendering Dynamic placeholders.
|
|
23
|
-
* Must be distinguished Splitter components and another placeholders(containers)
|
|
24
|
-
*/
|
|
25
|
-
const EXCLUDE_PLACEHOLDERS_RENDER = [
|
|
26
|
-
new RegExp(/column-(\d{1})-\{\*\}/i),
|
|
27
|
-
new RegExp(/row-(\d{1})-\{\*\}/i),
|
|
28
|
-
];
|
|
29
21
|
export class PlaceholderCommon extends React.Component {
|
|
30
22
|
constructor(props) {
|
|
31
23
|
super(props);
|
|
@@ -41,9 +33,10 @@ export class PlaceholderCommon extends React.Component {
|
|
|
41
33
|
from backend side we get common name of placeholder is called 'nameOfContainer-{*}' where '{*}' marker for replacing **/
|
|
42
34
|
if (rendering === null || rendering === void 0 ? void 0 : rendering.placeholders) {
|
|
43
35
|
Object.keys(rendering.placeholders).forEach((placeholder) => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
36
|
+
const patternPlaceholder = placeholder.indexOf('{*}') !== -1
|
|
37
|
+
? new RegExp(`^${placeholder.replace(/\{\*\}+/i, '\\d+')}$`)
|
|
38
|
+
: null;
|
|
39
|
+
if (patternPlaceholder && patternPlaceholder.test(name)) {
|
|
47
40
|
rendering.placeholders[name] = rendering.placeholders[placeholder];
|
|
48
41
|
delete rendering.placeholders[placeholder];
|
|
49
42
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitecore-jss/sitecore-jss-react",
|
|
3
|
-
"version": "21.6.3-canary.
|
|
3
|
+
"version": "21.6.3-canary.3",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -62,14 +62,14 @@
|
|
|
62
62
|
"react-dom": "^18.2.0"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@sitecore-jss/sitecore-jss": "^21.6.3-canary.
|
|
65
|
+
"@sitecore-jss/sitecore-jss": "^21.6.3-canary.3",
|
|
66
66
|
"deep-equal": "^2.1.0",
|
|
67
67
|
"prop-types": "^15.8.1",
|
|
68
68
|
"style-attr": "^1.3.0"
|
|
69
69
|
},
|
|
70
70
|
"description": "",
|
|
71
71
|
"types": "types/index.d.ts",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "5ec4d3d4d59618139ead26776c562554a9d40f22",
|
|
73
73
|
"files": [
|
|
74
74
|
"dist",
|
|
75
75
|
"types"
|