@gem-sdk/core 1.5.0 → 1.5.4
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.
|
@@ -30,6 +30,9 @@ const Render = ({ uid, builder, components, ...passProps }) => {
|
|
|
30
30
|
setting: item.settings,
|
|
31
31
|
style,
|
|
32
32
|
...passProps,
|
|
33
|
+
rawChildren: item.childrens.map((id) => {
|
|
34
|
+
return { ...builder[id], uid: id, builder, components };
|
|
35
|
+
}),
|
|
33
36
|
children: item.childrens
|
|
34
37
|
.map((id) => Render({ uid: id, builder, components }))
|
|
35
38
|
.join(''),
|
|
@@ -48,6 +51,9 @@ const Render = ({ uid, builder, components, ...passProps }) => {
|
|
|
48
51
|
styles: item.styles,
|
|
49
52
|
setting: item.settings,
|
|
50
53
|
...passProps,
|
|
54
|
+
rawChildren: item.childrens.map((id) => {
|
|
55
|
+
return { ...builder[id], uid: id, builder, components };
|
|
56
|
+
}),
|
|
51
57
|
children: item.childrens
|
|
52
58
|
.map((id) => Render({ uid: id, builder, components }))
|
|
53
59
|
.join(''),
|
|
@@ -13,11 +13,13 @@ const props = (strings, ...keys) => {
|
|
|
13
13
|
for (const attr in props) {
|
|
14
14
|
if (Object.hasOwnProperty.call(props, attr)) {
|
|
15
15
|
const val = props[attr];
|
|
16
|
-
if (val) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
if (typeof val === 'string') {
|
|
17
|
+
if (val) {
|
|
18
|
+
propsArr.push(`${attr}="${val}"`);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
propsArr.push(`${attr}`);
|
|
22
|
+
}
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
25
|
}
|
|
@@ -26,6 +26,9 @@ const Render = ({ uid, builder, components, ...passProps }) => {
|
|
|
26
26
|
setting: item.settings,
|
|
27
27
|
style,
|
|
28
28
|
...passProps,
|
|
29
|
+
rawChildren: item.childrens.map((id) => {
|
|
30
|
+
return { ...builder[id], uid: id, builder, components };
|
|
31
|
+
}),
|
|
29
32
|
children: item.childrens
|
|
30
33
|
.map((id) => Render({ uid: id, builder, components }))
|
|
31
34
|
.join(''),
|
|
@@ -44,6 +47,9 @@ const Render = ({ uid, builder, components, ...passProps }) => {
|
|
|
44
47
|
styles: item.styles,
|
|
45
48
|
setting: item.settings,
|
|
46
49
|
...passProps,
|
|
50
|
+
rawChildren: item.childrens.map((id) => {
|
|
51
|
+
return { ...builder[id], uid: id, builder, components };
|
|
52
|
+
}),
|
|
47
53
|
children: item.childrens
|
|
48
54
|
.map((id) => Render({ uid: id, builder, components }))
|
|
49
55
|
.join(''),
|
|
@@ -11,11 +11,13 @@ const props = (strings, ...keys) => {
|
|
|
11
11
|
for (const attr in props) {
|
|
12
12
|
if (Object.hasOwnProperty.call(props, attr)) {
|
|
13
13
|
const val = props[attr];
|
|
14
|
-
if (val) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
if (typeof val === 'string') {
|
|
15
|
+
if (val) {
|
|
16
|
+
propsArr.push(`${attr}="${val}"`);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
propsArr.push(`${attr}`);
|
|
20
|
+
}
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7402,11 +7402,11 @@ declare const useSelectedOption: () => {
|
|
|
7402
7402
|
[key: string]: any;
|
|
7403
7403
|
} | undefined) => void;
|
|
7404
7404
|
};
|
|
7405
|
-
declare const useVariants: () => Maybe<Pick<ProductVariant, "title" | "width" | "length" | "
|
|
7405
|
+
declare const useVariants: () => Maybe<Pick<ProductVariant, "title" | "width" | "length" | "weight" | "height" | "id" | "barcode" | "baseID" | "costPrice" | "inventoryPolicy" | "inventoryQuantity" | "inventoryStatus" | "isDigital" | "lowInventoryAmount" | "manageInventory" | "mediaId" | "platform" | "price" | "salePrice" | "sku" | "soldIndividually"> & {
|
|
7406
7406
|
selectedOptions: Pick<SelectedOption, "value" | "name" | "optionType">[];
|
|
7407
7407
|
media?: Maybe<Pick<Media, "width" | "height" | "id" | "contentType" | "src" | "alt">>;
|
|
7408
7408
|
}>[];
|
|
7409
|
-
declare const useVariant: (id: string) => Maybe<Pick<ProductVariant, "title" | "width" | "length" | "
|
|
7409
|
+
declare const useVariant: (id: string) => Maybe<Pick<ProductVariant, "title" | "width" | "length" | "weight" | "height" | "id" | "barcode" | "baseID" | "costPrice" | "inventoryPolicy" | "inventoryQuantity" | "inventoryStatus" | "isDigital" | "lowInventoryAmount" | "manageInventory" | "mediaId" | "platform" | "price" | "salePrice" | "sku" | "soldIndividually"> & {
|
|
7410
7410
|
selectedOptions: Pick<SelectedOption, "value" | "name" | "optionType">[];
|
|
7411
7411
|
media?: Maybe<Pick<Media, "width" | "height" | "id" | "contentType" | "src" | "alt">>;
|
|
7412
7412
|
}>;
|