@gem-sdk/core 1.7.12 → 1.7.13
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.
|
@@ -9,7 +9,10 @@ var render = require('../helpers/render.js');
|
|
|
9
9
|
require('../helpers/convert.js');
|
|
10
10
|
var constant = require('./constant.js');
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const componentsRenderWithParentId = [
|
|
13
|
+
'CarouselItem'
|
|
14
|
+
];
|
|
15
|
+
const Render = ({ uid , builder , components , parentId , ...passProps })=>{
|
|
13
16
|
const item = builder[uid];
|
|
14
17
|
const Component = components[item?.tag];
|
|
15
18
|
if (!Component) {
|
|
@@ -32,6 +35,7 @@ const Render = ({ uid , builder , components , ...passProps })=>{
|
|
|
32
35
|
setting: item.settings,
|
|
33
36
|
style,
|
|
34
37
|
advanced: item.advanced,
|
|
38
|
+
parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
|
|
35
39
|
...passProps,
|
|
36
40
|
rawChildren: item.childrens.map((id)=>{
|
|
37
41
|
return {
|
|
@@ -57,6 +61,7 @@ const Render = ({ uid , builder , components , ...passProps })=>{
|
|
|
57
61
|
setting: item.settings,
|
|
58
62
|
advanced: item.advanced,
|
|
59
63
|
style,
|
|
64
|
+
parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
|
|
60
65
|
...passProps
|
|
61
66
|
}));
|
|
62
67
|
}
|
|
@@ -5,7 +5,10 @@ import { RenderIf, template } from '../helpers/render.js';
|
|
|
5
5
|
import '../helpers/convert.js';
|
|
6
6
|
import { disableWrap } from './constant.js';
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const componentsRenderWithParentId = [
|
|
9
|
+
'CarouselItem'
|
|
10
|
+
];
|
|
11
|
+
const Render = ({ uid , builder , components , parentId , ...passProps })=>{
|
|
9
12
|
const item = builder[uid];
|
|
10
13
|
const Component = components[item?.tag];
|
|
11
14
|
if (!Component) {
|
|
@@ -28,6 +31,7 @@ const Render = ({ uid , builder , components , ...passProps })=>{
|
|
|
28
31
|
setting: item.settings,
|
|
29
32
|
style,
|
|
30
33
|
advanced: item.advanced,
|
|
34
|
+
parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
|
|
31
35
|
...passProps,
|
|
32
36
|
rawChildren: item.childrens.map((id)=>{
|
|
33
37
|
return {
|
|
@@ -53,6 +57,7 @@ const Render = ({ uid , builder , components , ...passProps })=>{
|
|
|
53
57
|
setting: item.settings,
|
|
54
58
|
advanced: item.advanced,
|
|
55
59
|
style,
|
|
60
|
+
parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
|
|
56
61
|
...passProps
|
|
57
62
|
}));
|
|
58
63
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ type Props = {
|
|
|
31
31
|
components: Record<string, any>;
|
|
32
32
|
[key: string]: any;
|
|
33
33
|
};
|
|
34
|
-
declare const Render: ({ uid, builder, components, ...passProps }: Props) => string | null;
|
|
34
|
+
declare const Render: ({ uid, builder, components, parentId, ...passProps }: Props) => string | null;
|
|
35
35
|
|
|
36
36
|
type AddonContextProps = {
|
|
37
37
|
components: Record<string, React.ComponentType<any>>;
|