@gem-sdk/components 2.0.0-staging.163 → 2.0.0-staging.164
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/dist/cjs/form/components/form-email/FormEmail.js +1 -1
- package/dist/cjs/image-comparison/components/CompareImage.js +2 -1
- package/dist/cjs/post-purchase/product/constants/ProductOfferPlaceholder.js +8 -30
- package/dist/cjs/product/components/ProductBadge/index.js +1 -0
- package/dist/cjs/product/components/ProductImagesV2/jsx/components/ProductGalleryGrid.js +1 -0
- package/dist/cjs/product/components/ProductList.js +1 -0
- package/dist/cjs/product/components/ProductTag.js +1 -0
- package/dist/cjs/product/components/ProductVariants/variants/index.js +2 -0
- package/dist/cjs/product/setting/ProductButton.js +1 -1
- package/dist/cjs/third-party/components/Bogos/BogosSampleContent.js +2 -1
- package/dist/esm/form/components/form-email/FormEmail.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.js +2 -1
- package/dist/esm/post-purchase/product/constants/ProductOfferPlaceholder.js +8 -30
- package/dist/esm/product/components/ProductBadge/index.js +1 -0
- package/dist/esm/product/components/ProductImagesV2/jsx/components/ProductGalleryGrid.js +1 -0
- package/dist/esm/product/components/ProductList.js +1 -0
- package/dist/esm/product/components/ProductTag.js +1 -0
- package/dist/esm/product/components/ProductVariants/variants/index.js +2 -0
- package/dist/esm/product/setting/ProductButton.js +1 -1
- package/dist/esm/third-party/components/Bogos/BogosSampleContent.js +2 -1
- package/package.json +1 -1
|
@@ -35,7 +35,7 @@ const FormEmail = ({ builderProps, builderAttrs, setting, advanced, children })=
|
|
|
35
35
|
const appendTypoStyle = core.composeTypographyStyle(setting?.typo, typography);
|
|
36
36
|
return /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
37
37
|
...builderAttrs,
|
|
38
|
-
"
|
|
38
|
+
"data-id": builderProps?.uid,
|
|
39
39
|
className: core.cls(builderProps?.uid),
|
|
40
40
|
style: {
|
|
41
41
|
...wrapStyle,
|
|
@@ -39,9 +39,10 @@ const CompareImage = (props)=>{
|
|
|
39
39
|
setSliderPosition(Number(data));
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
saveToElementInteractionData(ref.current, uniqueStorageKey, sliderPosition);
|
|
42
|
+
saveToElementInteractionData(ref.current, uniqueStorageKey, sliderPosition.toString());
|
|
43
43
|
setSliderPosition(Number(data) / 100);
|
|
44
44
|
});
|
|
45
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
45
46
|
}, []);
|
|
46
47
|
const defaultRatio = React.useMemo(()=>{
|
|
47
48
|
const leftRatio = (leftImage?.width ?? 0) / (leftImage?.height ?? 1);
|
|
@@ -22,7 +22,7 @@ const productOfferPlaceholder = {
|
|
|
22
22
|
id: '1',
|
|
23
23
|
label: 'Variant option',
|
|
24
24
|
isDefault: true,
|
|
25
|
-
baseID: ''
|
|
25
|
+
baseID: '1'
|
|
26
26
|
}
|
|
27
27
|
]
|
|
28
28
|
}
|
|
@@ -106,35 +106,13 @@ const productOfferPlaceholder = {
|
|
|
106
106
|
soldIndividually: false,
|
|
107
107
|
weight: 0,
|
|
108
108
|
width: 0,
|
|
109
|
-
selectedOptions: [
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
id: '520560088328176392',
|
|
117
|
-
title: 'Default Title',
|
|
118
|
-
barcode: '',
|
|
119
|
-
baseID: 'gid://shopify/ProductVariant/49298248925463',
|
|
120
|
-
costPrice: 88,
|
|
121
|
-
height: 0,
|
|
122
|
-
inventoryPolicy: 'DENY',
|
|
123
|
-
inventoryQuantity: 211,
|
|
124
|
-
inventoryStatus: '',
|
|
125
|
-
isDigital: true,
|
|
126
|
-
length: 0,
|
|
127
|
-
lowInventoryAmount: 0,
|
|
128
|
-
manageInventory: false,
|
|
129
|
-
mediaId: '0',
|
|
130
|
-
platform: 'SHOPIFY',
|
|
131
|
-
price: 88,
|
|
132
|
-
salePrice: 88,
|
|
133
|
-
sku: '',
|
|
134
|
-
soldIndividually: false,
|
|
135
|
-
weight: 0,
|
|
136
|
-
width: 0,
|
|
137
|
-
selectedOptions: [],
|
|
109
|
+
selectedOptions: [
|
|
110
|
+
{
|
|
111
|
+
name: 'Variant',
|
|
112
|
+
value: 'Variant option',
|
|
113
|
+
optionType: ''
|
|
114
|
+
}
|
|
115
|
+
],
|
|
138
116
|
media: undefined
|
|
139
117
|
}
|
|
140
118
|
}
|
|
@@ -158,6 +158,7 @@ const ProductBadge = ({ builderAttrs, builderProps, isInsideProductImage, settin
|
|
|
158
158
|
} : {}, style)
|
|
159
159
|
},
|
|
160
160
|
className: core.cls(conditionClass, builderProps?.builderData?.advanced?.cssClass || '', builderProps?.uid, 'gp-shrink-0', 'product-badge', isInsideProductImage ? 'inside-image' : ''),
|
|
161
|
+
// eslint-disable-next-line react/no-unknown-property
|
|
161
162
|
"gp-data-hidden": "false",
|
|
162
163
|
children: [
|
|
163
164
|
mode === 'edit' && isNoDiscountState ? /*#__PURE__*/ jsxRuntime.jsx(TooltipHover.default, {
|
|
@@ -121,6 +121,7 @@ const ProductGalleryGrid = ({ builderPropUID, productImages, onHandleClick, acti
|
|
|
121
121
|
...core.makeStyleResponsive('rg', setting?.itemSpacing),
|
|
122
122
|
...core.makeStyleResponsive('jc', setting?.align)
|
|
123
123
|
},
|
|
124
|
+
// eslint-disable-next-line react/no-unknown-property
|
|
124
125
|
"gp-data-hidden": `${isHiddenInteraction}`,
|
|
125
126
|
children: [
|
|
126
127
|
productImages?.map((image, index)=>{
|
|
@@ -321,6 +321,7 @@ const ProductList = ({ children, className, setting, styles, builderProps })=>{
|
|
|
321
321
|
})
|
|
322
322
|
},
|
|
323
323
|
className: core.cls(className, 'gp-m-auto gp-grid gp-w-full', setting?.sameHeight ? ' gp-grid-flow-row' : ''),
|
|
324
|
+
// eslint-disable-next-line react/no-unknown-property
|
|
324
325
|
"items-repeat": "true",
|
|
325
326
|
"data-id": builderProps?.uid,
|
|
326
327
|
children: !productSortedById?.length ? null : productSortedById?.map((product, index)=>/*#__PURE__*/ jsxRuntime.jsx(core.ProductProvider, {
|
|
@@ -115,6 +115,7 @@ const ProductTag = ({ setting, styles, builderProps, ...passProps })=>{
|
|
|
115
115
|
id: `shopify-text-element-${builderProps?.uid}`,
|
|
116
116
|
"data-id": builderProps?.uid,
|
|
117
117
|
"data-product-id": currentProductId,
|
|
118
|
+
// eslint-disable-next-line react/no-unknown-property
|
|
118
119
|
"gp-data-hidden": "false",
|
|
119
120
|
children: !product ? null : /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
120
121
|
className: core.cls('gp-inline-flex gp-flex-wrap gp-items-end gp-gap-3'),
|
|
@@ -115,7 +115,9 @@ const VariantItem = ({ name, variantKey, optionName, optionValue, ...props })=>{
|
|
|
115
115
|
children: props.value?.label
|
|
116
116
|
}),
|
|
117
117
|
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
118
|
+
// eslint-disable-next-line react/no-unknown-property
|
|
118
119
|
"option-name": optionName,
|
|
120
|
+
// eslint-disable-next-line react/no-unknown-property
|
|
119
121
|
"option-name-value": optionValue,
|
|
120
122
|
className: "option-item-inner gp-w-auto gp-h-auto",
|
|
121
123
|
children: /*#__PURE__*/ jsxRuntime.jsx(Component, {
|
|
@@ -14,7 +14,8 @@ const mapWidgetLabel = {
|
|
|
14
14
|
slider: 'Gift slider',
|
|
15
15
|
message: 'Cart message',
|
|
16
16
|
['classic-bundle']: 'Classic bundle',
|
|
17
|
-
['quantity-break']: 'Quantity break'
|
|
17
|
+
['quantity-break']: 'Quantity break',
|
|
18
|
+
['mix-match']: 'Mix and match'
|
|
18
19
|
};
|
|
19
20
|
const BogosSampleContent = ({ setting })=>{
|
|
20
21
|
const widgetLabel = setting?.widgetType && mapWidgetLabel[setting.widgetType];
|
|
@@ -31,7 +31,7 @@ const FormEmail = ({ builderProps, builderAttrs, setting, advanced, children })=
|
|
|
31
31
|
const appendTypoStyle = composeTypographyStyle(setting?.typo, typography);
|
|
32
32
|
return /*#__PURE__*/ jsxs("div", {
|
|
33
33
|
...builderAttrs,
|
|
34
|
-
"
|
|
34
|
+
"data-id": builderProps?.uid,
|
|
35
35
|
className: cls(builderProps?.uid),
|
|
36
36
|
style: {
|
|
37
37
|
...wrapStyle,
|
|
@@ -35,9 +35,10 @@ const CompareImage = (props)=>{
|
|
|
35
35
|
setSliderPosition(Number(data));
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
saveToElementInteractionData(ref.current, uniqueStorageKey, sliderPosition);
|
|
38
|
+
saveToElementInteractionData(ref.current, uniqueStorageKey, sliderPosition.toString());
|
|
39
39
|
setSliderPosition(Number(data) / 100);
|
|
40
40
|
});
|
|
41
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
41
42
|
}, []);
|
|
42
43
|
const defaultRatio = useMemo(()=>{
|
|
43
44
|
const leftRatio = (leftImage?.width ?? 0) / (leftImage?.height ?? 1);
|
|
@@ -20,7 +20,7 @@ const productOfferPlaceholder = {
|
|
|
20
20
|
id: '1',
|
|
21
21
|
label: 'Variant option',
|
|
22
22
|
isDefault: true,
|
|
23
|
-
baseID: ''
|
|
23
|
+
baseID: '1'
|
|
24
24
|
}
|
|
25
25
|
]
|
|
26
26
|
}
|
|
@@ -104,35 +104,13 @@ const productOfferPlaceholder = {
|
|
|
104
104
|
soldIndividually: false,
|
|
105
105
|
weight: 0,
|
|
106
106
|
width: 0,
|
|
107
|
-
selectedOptions: [
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
id: '520560088328176392',
|
|
115
|
-
title: 'Default Title',
|
|
116
|
-
barcode: '',
|
|
117
|
-
baseID: 'gid://shopify/ProductVariant/49298248925463',
|
|
118
|
-
costPrice: 88,
|
|
119
|
-
height: 0,
|
|
120
|
-
inventoryPolicy: 'DENY',
|
|
121
|
-
inventoryQuantity: 211,
|
|
122
|
-
inventoryStatus: '',
|
|
123
|
-
isDigital: true,
|
|
124
|
-
length: 0,
|
|
125
|
-
lowInventoryAmount: 0,
|
|
126
|
-
manageInventory: false,
|
|
127
|
-
mediaId: '0',
|
|
128
|
-
platform: 'SHOPIFY',
|
|
129
|
-
price: 88,
|
|
130
|
-
salePrice: 88,
|
|
131
|
-
sku: '',
|
|
132
|
-
soldIndividually: false,
|
|
133
|
-
weight: 0,
|
|
134
|
-
width: 0,
|
|
135
|
-
selectedOptions: [],
|
|
107
|
+
selectedOptions: [
|
|
108
|
+
{
|
|
109
|
+
name: 'Variant',
|
|
110
|
+
value: 'Variant option',
|
|
111
|
+
optionType: ''
|
|
112
|
+
}
|
|
113
|
+
],
|
|
136
114
|
media: undefined
|
|
137
115
|
}
|
|
138
116
|
}
|
|
@@ -154,6 +154,7 @@ const ProductBadge = ({ builderAttrs, builderProps, isInsideProductImage, settin
|
|
|
154
154
|
} : {}, style)
|
|
155
155
|
},
|
|
156
156
|
className: cls(conditionClass, builderProps?.builderData?.advanced?.cssClass || '', builderProps?.uid, 'gp-shrink-0', 'product-badge', isInsideProductImage ? 'inside-image' : ''),
|
|
157
|
+
// eslint-disable-next-line react/no-unknown-property
|
|
157
158
|
"gp-data-hidden": "false",
|
|
158
159
|
children: [
|
|
159
160
|
mode === 'edit' && isNoDiscountState ? /*#__PURE__*/ jsx(TooltipHover, {
|
|
@@ -117,6 +117,7 @@ const ProductGalleryGrid = ({ builderPropUID, productImages, onHandleClick, acti
|
|
|
117
117
|
...makeStyleResponsive('rg', setting?.itemSpacing),
|
|
118
118
|
...makeStyleResponsive('jc', setting?.align)
|
|
119
119
|
},
|
|
120
|
+
// eslint-disable-next-line react/no-unknown-property
|
|
120
121
|
"gp-data-hidden": `${isHiddenInteraction}`,
|
|
121
122
|
children: [
|
|
122
123
|
productImages?.map((image, index)=>{
|
|
@@ -317,6 +317,7 @@ const ProductList = ({ children, className, setting, styles, builderProps })=>{
|
|
|
317
317
|
})
|
|
318
318
|
},
|
|
319
319
|
className: cls(className, 'gp-m-auto gp-grid gp-w-full', setting?.sameHeight ? ' gp-grid-flow-row' : ''),
|
|
320
|
+
// eslint-disable-next-line react/no-unknown-property
|
|
320
321
|
"items-repeat": "true",
|
|
321
322
|
"data-id": builderProps?.uid,
|
|
322
323
|
children: !productSortedById?.length ? null : productSortedById?.map((product, index)=>/*#__PURE__*/ jsx(ProductProvider, {
|
|
@@ -111,6 +111,7 @@ const ProductTag = ({ setting, styles, builderProps, ...passProps })=>{
|
|
|
111
111
|
id: `shopify-text-element-${builderProps?.uid}`,
|
|
112
112
|
"data-id": builderProps?.uid,
|
|
113
113
|
"data-product-id": currentProductId,
|
|
114
|
+
// eslint-disable-next-line react/no-unknown-property
|
|
114
115
|
"gp-data-hidden": "false",
|
|
115
116
|
children: !product ? null : /*#__PURE__*/ jsx("div", {
|
|
116
117
|
className: cls('gp-inline-flex gp-flex-wrap gp-items-end gp-gap-3'),
|
|
@@ -111,7 +111,9 @@ const VariantItem = ({ name, variantKey, optionName, optionValue, ...props })=>{
|
|
|
111
111
|
children: props.value?.label
|
|
112
112
|
}),
|
|
113
113
|
/*#__PURE__*/ jsx("div", {
|
|
114
|
+
// eslint-disable-next-line react/no-unknown-property
|
|
114
115
|
"option-name": optionName,
|
|
116
|
+
// eslint-disable-next-line react/no-unknown-property
|
|
115
117
|
"option-name-value": optionValue,
|
|
116
118
|
className: "option-item-inner gp-w-auto gp-h-auto",
|
|
117
119
|
children: /*#__PURE__*/ jsx(Component, {
|
|
@@ -10,7 +10,8 @@ const mapWidgetLabel = {
|
|
|
10
10
|
slider: 'Gift slider',
|
|
11
11
|
message: 'Cart message',
|
|
12
12
|
['classic-bundle']: 'Classic bundle',
|
|
13
|
-
['quantity-break']: 'Quantity break'
|
|
13
|
+
['quantity-break']: 'Quantity break',
|
|
14
|
+
['mix-match']: 'Mix and match'
|
|
14
15
|
};
|
|
15
16
|
const BogosSampleContent = ({ setting })=>{
|
|
16
17
|
const widgetLabel = setting?.widgetType && mapWidgetLabel[setting.widgetType];
|