@gem-sdk/components 2.0.0-dev.267 → 2.0.0-dev.271
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/breadcrumb/components/common/style.js +2 -2
- package/dist/cjs/builder.js +14 -14
- package/dist/cjs/collection/setting/collection-banner/configs/uiV2.js +1 -1
- package/dist/cjs/grid/col/Col.liquid.js +2 -2
- package/dist/cjs/grid/row/Row.js +2 -2
- package/dist/cjs/grid/row/Row.liquid.js +1 -2
- package/dist/cjs/grid/row/commons/getStyle.js +6 -6
- package/dist/cjs/grid/row/setting/configs/uiV2.js +1 -1
- package/dist/cjs/grid/section/setting/configs/uiV2.js +1 -1
- package/dist/cjs/index.js +84 -84
- package/dist/cjs/index.liquid.js +8 -8
- package/dist/cjs/post-purchase/callout-banner/components/common/getStyles.js +2 -0
- package/dist/cjs/post-purchase/callout-banner/setting/config/callout-box/setting.js +10 -10
- package/dist/cjs/post-purchase/callout-banner/setting/config/callout-text/setting.js +1 -5
- package/dist/cjs/post-purchase/product/components/ProductPriceBreakdown.js +14 -5
- package/dist/cjs/post-purchase/product/components/priceBreakdown/MoneyLine.js +9 -4
- package/dist/cjs/post-purchase/product/helpers/product-price-breakdown/getClasses.js +29 -1
- package/dist/cjs/post-purchase/product/settings/product-price/uiV2.js +3 -0
- package/dist/cjs/post-purchase/product/settings/product-price-breakdown/configs/uiV2.js +3 -3
- package/dist/cjs/post-purchase/utils/constants.js +1 -1
- package/dist/cjs/product/components/ProductQuickView/ProductQuickView.js +4 -4
- package/dist/cjs/product/components/ProductTitle/common/gpCommon.js +17 -0
- package/dist/cjs/product/components/ProductTitle/index.js +49 -0
- package/dist/cjs/product/components/ProductTitle/index.liquid.js +30 -0
- package/dist/cjs/product/next.js +1 -1
- package/dist/cjs/product/setting/product/configs/uiV2.js +1 -1
- package/dist/esm/breadcrumb/components/common/style.js +2 -2
- package/dist/esm/builder.js +1 -1
- package/dist/esm/collection/setting/collection-banner/configs/uiV2.js +1 -1
- package/dist/esm/grid/col/Col.liquid.js +2 -2
- package/dist/esm/grid/row/Row.js +2 -2
- package/dist/esm/grid/row/Row.liquid.js +1 -2
- package/dist/esm/grid/row/commons/getStyle.js +7 -7
- package/dist/esm/grid/row/setting/configs/uiV2.js +1 -1
- package/dist/esm/grid/section/setting/configs/uiV2.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.liquid.js +1 -1
- package/dist/esm/post-purchase/callout-banner/components/common/getStyles.js +2 -0
- package/dist/esm/post-purchase/callout-banner/setting/config/callout-box/setting.js +10 -10
- package/dist/esm/post-purchase/callout-banner/setting/config/callout-text/setting.js +1 -5
- package/dist/esm/post-purchase/product/components/ProductPriceBreakdown.js +14 -5
- package/dist/esm/post-purchase/product/components/priceBreakdown/MoneyLine.js +9 -4
- package/dist/esm/post-purchase/product/helpers/product-price-breakdown/getClasses.js +27 -2
- package/dist/esm/post-purchase/product/settings/product-price/uiV2.js +3 -0
- package/dist/esm/post-purchase/product/settings/product-price-breakdown/configs/uiV2.js +3 -3
- package/dist/esm/post-purchase/utils/constants.js +1 -1
- package/dist/esm/product/components/ProductQuickView/ProductQuickView.js +1 -1
- package/dist/esm/product/components/ProductTitle/common/gpCommon.js +15 -0
- package/dist/esm/product/components/ProductTitle/index.js +45 -0
- package/dist/esm/product/components/ProductTitle/index.liquid.js +26 -0
- package/dist/esm/product/next.js +1 -1
- package/dist/esm/product/setting/product/configs/uiV2.js +1 -1
- package/dist/types/index.d.ts +8 -3
- package/package.json +1 -1
- package/dist/cjs/product/components/ProductTitle.js +0 -43
- package/dist/cjs/product/components/ProductTitle.liquid.js +0 -44
- package/dist/esm/product/components/ProductTitle.js +0 -39
- package/dist/esm/product/components/ProductTitle.liquid.js +0 -40
package/dist/cjs/index.liquid.js
CHANGED
|
@@ -11,14 +11,14 @@ var Root_liquid = require('./grid/components/Root.liquid.js');
|
|
|
11
11
|
var Icon_liquid = require('./icon/components/Icon.liquid.js');
|
|
12
12
|
var Text_liquid = require('./text/components/Text.liquid.js');
|
|
13
13
|
var Product_liquid = require('./product/components/Product.liquid.js');
|
|
14
|
-
var
|
|
14
|
+
var index_liquid = require('./product/components/ProductTitle/index.liquid.js');
|
|
15
15
|
var ProductPrice_liquid = require('./product/components/ProductPrice.liquid.js');
|
|
16
16
|
var ProductButton_liquid = require('./product/components/ProductButton.liquid.js');
|
|
17
17
|
var ProductDescription_liquid = require('./product/components/ProductDescription.liquid.js');
|
|
18
18
|
var ProductImages_liquid = require('./product/components/ProductImages.liquid.js');
|
|
19
19
|
var ProductImages_liquid$1 = require('./product/components/ProductImagesV2/liquid/ProductImages.liquid.js');
|
|
20
20
|
var ProductQuantity_liquid = require('./product/components/ProductQuantity.liquid.js');
|
|
21
|
-
var index_liquid = require('./product/components/ProductVariants/index.liquid.js');
|
|
21
|
+
var index_liquid$1 = require('./product/components/ProductVariants/index.liquid.js');
|
|
22
22
|
var ProductTag_liquid = require('./product/components/ProductTag.liquid.js');
|
|
23
23
|
var ProductProperties_liquid = require('./product/components/ProductProperties.liquid.js');
|
|
24
24
|
var ProductList_liquid = require('./product/components/ProductList.liquid.js');
|
|
@@ -27,7 +27,7 @@ var Vendor_liquid = require('./product/components/Vendor.liquid.js');
|
|
|
27
27
|
var ProductBundleDiscount_liquid = require('./product/components/ProductBundleDiscount.liquid.js');
|
|
28
28
|
var ProductBundleDiscountItem_liquid = require('./product/components/ProductBundleDiscountItem.liquid.js');
|
|
29
29
|
var ProductViewMore_liquid = require('./product/components/ProductViewMore.liquid.js');
|
|
30
|
-
var index_liquid$
|
|
30
|
+
var index_liquid$2 = require('./product/components/ProductBadge/index.liquid.js');
|
|
31
31
|
var Sku_liquid = require('./product/components/Sku.liquid.js');
|
|
32
32
|
var UploadFile_liquid = require('./product/components/FileUpload/components/UploadFile.liquid.js');
|
|
33
33
|
var Heading_liquid = require('./heading/Heading.liquid.js');
|
|
@@ -49,7 +49,7 @@ var TabItem_liquid = require('./tab/components/TabItem.liquid.js');
|
|
|
49
49
|
var HeroBanner_liquid = require('./banner/components/HeroBanner.liquid.js');
|
|
50
50
|
var CSSCode_liquid = require('./code/components/CSSCode.liquid.js');
|
|
51
51
|
var StockCounter_liquid = require('./stock-counter/components/StockCounter.liquid.js');
|
|
52
|
-
var index_liquid$
|
|
52
|
+
var index_liquid$3 = require('./cart/components/ShopPayButton/index.liquid.js');
|
|
53
53
|
var Newsletter_liquid = require('./form/components/newsletter/Newsletter.liquid.js');
|
|
54
54
|
var Contact_liquid = require('./form/components/contact/Contact.liquid.js');
|
|
55
55
|
var FormEmail_liquid = require('./form/components/form-email/FormEmail.liquid.js');
|
|
@@ -208,14 +208,14 @@ exports.Root = Root_liquid.default;
|
|
|
208
208
|
exports.Icon = Icon_liquid.default;
|
|
209
209
|
exports.Text = Text_liquid.default;
|
|
210
210
|
exports.Product = Product_liquid.default;
|
|
211
|
-
exports.ProductTitle =
|
|
211
|
+
exports.ProductTitle = index_liquid.default;
|
|
212
212
|
exports.ProductPrice = ProductPrice_liquid.ProductPrice;
|
|
213
213
|
exports.ProductButton = ProductButton_liquid.default;
|
|
214
214
|
exports.ProductDescription = ProductDescription_liquid.default;
|
|
215
215
|
exports.ProductImages = ProductImages_liquid.default;
|
|
216
216
|
exports.ProductImagesV2 = ProductImages_liquid$1.default;
|
|
217
217
|
exports.ProductQuantity = ProductQuantity_liquid.default;
|
|
218
|
-
exports.ProductVariants = index_liquid.default;
|
|
218
|
+
exports.ProductVariants = index_liquid$1.default;
|
|
219
219
|
exports.ProductTag = ProductTag_liquid.default;
|
|
220
220
|
exports.ProductProperties = ProductProperties_liquid.default;
|
|
221
221
|
exports.ProductList = ProductList_liquid.default;
|
|
@@ -224,7 +224,7 @@ exports.ProductVendor = Vendor_liquid.default;
|
|
|
224
224
|
exports.ProductBundleDiscount = ProductBundleDiscount_liquid.default;
|
|
225
225
|
exports.ProductBundleDiscountItem = ProductBundleDiscountItem_liquid.default;
|
|
226
226
|
exports.ProductViewMore = ProductViewMore_liquid.default;
|
|
227
|
-
exports.ProductBadge = index_liquid$
|
|
227
|
+
exports.ProductBadge = index_liquid$2.default;
|
|
228
228
|
exports.ProductSku = Sku_liquid.default;
|
|
229
229
|
exports.FileUpload = UploadFile_liquid.default;
|
|
230
230
|
exports.Heading = Heading_liquid.default;
|
|
@@ -246,7 +246,7 @@ exports.TabItem = TabItem_liquid.default;
|
|
|
246
246
|
exports.HeroBanner = HeroBanner_liquid.default;
|
|
247
247
|
exports.CSSCode = CSSCode_liquid.default;
|
|
248
248
|
exports.StockCounter = StockCounter_liquid.default;
|
|
249
|
-
exports.ShopPayButton = index_liquid$
|
|
249
|
+
exports.ShopPayButton = index_liquid$3.default;
|
|
250
250
|
exports.Newsletter = Newsletter_liquid.default;
|
|
251
251
|
exports.ContactForm = Contact_liquid.default;
|
|
252
252
|
exports.FormEmail = FormEmail_liquid.default;
|
|
@@ -21,6 +21,7 @@ var CalloutBgColorEnum;
|
|
|
21
21
|
CalloutBgColorEnum["success"] = '#E8F8EB';
|
|
22
22
|
CalloutBgColorEnum["warning"] = '#FFF8E0';
|
|
23
23
|
CalloutBgColorEnum["critical"] = '#FFEBEB';
|
|
24
|
+
CalloutBgColorEnum["none"] = '#FAFAFA';
|
|
24
25
|
})(CalloutBgColorEnum || (CalloutBgColorEnum = {}));
|
|
25
26
|
var CalloutBorderColorEnum;
|
|
26
27
|
(function(CalloutBorderColorEnum) {
|
|
@@ -28,6 +29,7 @@ var CalloutBorderColorEnum;
|
|
|
28
29
|
CalloutBorderColorEnum["success"] = '#d0ecd3';
|
|
29
30
|
CalloutBorderColorEnum["warning"] = '#f0e4bc';
|
|
30
31
|
CalloutBorderColorEnum["critical"] = '#facccc';
|
|
32
|
+
CalloutBorderColorEnum["none"] = '#D9D9D9';
|
|
31
33
|
})(CalloutBorderColorEnum || (CalloutBorderColorEnum = {}));
|
|
32
34
|
const getCalloutBoxContainerStyles = (styles)=>{
|
|
33
35
|
return helpers.filterTruthyStyles({
|
|
@@ -200,32 +200,32 @@ const CalloutBoxSettings = [
|
|
|
200
200
|
label: 'Background Color',
|
|
201
201
|
options: [
|
|
202
202
|
{
|
|
203
|
-
label: '
|
|
204
|
-
value: '',
|
|
205
|
-
|
|
203
|
+
label: 'Transparent',
|
|
204
|
+
value: 'none',
|
|
205
|
+
icon: 'gp-bg-transparent'
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
label: 'Red',
|
|
209
209
|
value: 'critical',
|
|
210
|
-
|
|
210
|
+
icon: 'gp-bg-red'
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
213
|
label: 'Blue',
|
|
214
214
|
value: 'info',
|
|
215
|
-
|
|
215
|
+
icon: 'gp-bg-blue'
|
|
216
216
|
},
|
|
217
217
|
{
|
|
218
218
|
label: 'Green',
|
|
219
219
|
value: 'success',
|
|
220
|
-
|
|
220
|
+
icon: 'gp-bg-green'
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
223
|
label: 'Yellow',
|
|
224
224
|
value: 'warning',
|
|
225
|
-
|
|
225
|
+
icon: 'gp-bg-yellow'
|
|
226
226
|
}
|
|
227
227
|
],
|
|
228
|
-
default: ''
|
|
228
|
+
default: 'none'
|
|
229
229
|
},
|
|
230
230
|
{
|
|
231
231
|
id: 'width',
|
|
@@ -239,7 +239,7 @@ const CalloutBoxSettings = [
|
|
|
239
239
|
hideUnit: false,
|
|
240
240
|
devices: {
|
|
241
241
|
desktop: {
|
|
242
|
-
default: '
|
|
242
|
+
default: 'default'
|
|
243
243
|
},
|
|
244
244
|
tablet: {
|
|
245
245
|
default: '100%'
|
|
@@ -281,7 +281,7 @@ const CalloutBoxSettings = [
|
|
|
281
281
|
},
|
|
282
282
|
{
|
|
283
283
|
id: 'columnGap',
|
|
284
|
-
type: '
|
|
284
|
+
type: 'input:slider',
|
|
285
285
|
min: 0,
|
|
286
286
|
max: 100,
|
|
287
287
|
step: 1,
|
|
@@ -11,12 +11,8 @@ const CalloutTextSettings = [
|
|
|
11
11
|
defaultRows: 4,
|
|
12
12
|
showPlusBtn: true,
|
|
13
13
|
autoHeight: true,
|
|
14
|
-
default: 'We couldn’t just let you leave with
|
|
14
|
+
default: 'We couldn’t just let you leave with only one offer! Grab another for {{Discount}} OFF',
|
|
15
15
|
suggestContents: [
|
|
16
|
-
{
|
|
17
|
-
message: '{Buyer_First_Name}',
|
|
18
|
-
eg: 'Jane'
|
|
19
|
-
},
|
|
20
16
|
{
|
|
21
17
|
message: '{Product_Name}',
|
|
22
18
|
eg: 'Desk Lamp'
|
|
@@ -13,6 +13,7 @@ var useGetItemGapPriceBreakdown = require('../hooks/product-price-breakdown/useG
|
|
|
13
13
|
var useSetCollapsePrice = require('../hooks/product-price-breakdown/useSetCollapsePrice.js');
|
|
14
14
|
var MoneyLine = require('./priceBreakdown/MoneyLine.js');
|
|
15
15
|
var useGetMoneyLines = require('../hooks/product-price-breakdown/useGetMoneyLines.js');
|
|
16
|
+
var Text = require('../../text/components/Text.js');
|
|
16
17
|
|
|
17
18
|
const PostPurchaseProductPriceBreakdown = ({ setting = {}, styles = {}, style, builderAttrs, builderProps, children })=>{
|
|
18
19
|
const { labelStyle, moneyStyle, spacing, width, align, isShowPrice, direction } = styles;
|
|
@@ -29,7 +30,7 @@ const PostPurchaseProductPriceBreakdown = ({ setting = {}, styles = {}, style, b
|
|
|
29
30
|
});
|
|
30
31
|
const iconCollapseClasses = system.createClass(getClasses.getIconCollapseClassesRotate(isCollapsePrice));
|
|
31
32
|
const containerPriceBreakdownClasses = system.createClass(getClasses.getContainerPriceBreakdownClasses(align, builderProps?.uid));
|
|
32
|
-
const wrapperLabelClasses = system.createClass(getClasses.getWrapperLabelClasses());
|
|
33
|
+
const wrapperLabelClasses = system.createClass(getClasses.getWrapperLabelClasses(direction));
|
|
33
34
|
const labelClasses = system.createClass(getClasses.getLabelClasses());
|
|
34
35
|
const dividerClasses = system.createClass(getClasses.getDividerClasses());
|
|
35
36
|
const wrapperMoneyLinesClasses = system.createClass(getClasses.getWrapperMoneyLinesClasses());
|
|
@@ -46,9 +47,17 @@ const PostPurchaseProductPriceBreakdown = ({ setting = {}, styles = {}, style, b
|
|
|
46
47
|
tabIndex: 0,
|
|
47
48
|
"aria-hidden": "true",
|
|
48
49
|
children: [
|
|
49
|
-
/*#__PURE__*/ jsxRuntime.jsx(
|
|
50
|
+
/*#__PURE__*/ jsxRuntime.jsx(Text.default, {
|
|
50
51
|
className: labelClasses,
|
|
51
|
-
|
|
52
|
+
styles: {
|
|
53
|
+
direction
|
|
54
|
+
},
|
|
55
|
+
setting: {
|
|
56
|
+
text: isCollapsePrice ? setting.contentHide || 'Hide price breakdown' : setting.contentShow || 'Show price breakdown',
|
|
57
|
+
options: {
|
|
58
|
+
isCannotEditing: true
|
|
59
|
+
}
|
|
60
|
+
}
|
|
52
61
|
}),
|
|
53
62
|
/*#__PURE__*/ jsxRuntime.jsx("svg", {
|
|
54
63
|
width: "17",
|
|
@@ -87,6 +96,7 @@ const PostPurchaseProductPriceBreakdown = ({ setting = {}, styles = {}, style, b
|
|
|
87
96
|
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
88
97
|
children: /*#__PURE__*/ jsxRuntime.jsx(MoneyLine.default, {
|
|
89
98
|
uniqueId: item.uniqueId,
|
|
99
|
+
direction: direction,
|
|
90
100
|
builderPropsUID: builderProps?.uid,
|
|
91
101
|
title: item.uniqueId === 'totalLabel' ? `<b>${item.title}</b>` : item.title,
|
|
92
102
|
money: item.money,
|
|
@@ -98,8 +108,7 @@ const PostPurchaseProductPriceBreakdown = ({ setting = {}, styles = {}, style, b
|
|
|
98
108
|
direction
|
|
99
109
|
},
|
|
100
110
|
moneyTextStyles: {
|
|
101
|
-
typo: moneyStyle
|
|
102
|
-
direction
|
|
111
|
+
typo: moneyStyle
|
|
103
112
|
}
|
|
104
113
|
})
|
|
105
114
|
}, item.uniqueId)
|
|
@@ -7,15 +7,20 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
7
7
|
var core = require('@gem-sdk/core');
|
|
8
8
|
var Tooltip = require('../../../../common/components/Tooltip.js');
|
|
9
9
|
var Text = require('../../../text/components/Text.js');
|
|
10
|
+
var system = require('@gem-sdk/system');
|
|
11
|
+
var getClasses = require('../../helpers/product-price-breakdown/getClasses.js');
|
|
10
12
|
|
|
11
|
-
const MoneyLine = ({ uniqueId, title, money, labelTextStyles, moneyTextStyles, builderPropsUID, tooltipData })=>{
|
|
13
|
+
const MoneyLine = ({ uniqueId, title, money, labelTextStyles, moneyTextStyles, builderPropsUID, tooltipData, direction })=>{
|
|
12
14
|
const currentProduct = core.useProduct();
|
|
13
15
|
const currentProductId = currentProduct?.baseID?.replace('gid://shopify/Product/', '');
|
|
16
|
+
const moneyRowClasses = system.createClass(getClasses.getMoneyRowClasses(direction));
|
|
17
|
+
const textLabelMoneyClasses = system.createClass(getClasses.getTextLabelMoneyClasses(direction));
|
|
18
|
+
const textValueMoneyClasses = system.createClass(getClasses.getTextValueMoneyClasses(direction));
|
|
14
19
|
return /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
15
|
-
className:
|
|
20
|
+
className: moneyRowClasses,
|
|
16
21
|
children: [
|
|
17
22
|
/*#__PURE__*/ jsxRuntime.jsx(Text.default, {
|
|
18
|
-
className:
|
|
23
|
+
className: textLabelMoneyClasses,
|
|
19
24
|
setting: {
|
|
20
25
|
text: title,
|
|
21
26
|
options: {
|
|
@@ -27,7 +32,7 @@ const MoneyLine = ({ uniqueId, title, money, labelTextStyles, moneyTextStyles, b
|
|
|
27
32
|
styles: labelTextStyles
|
|
28
33
|
}),
|
|
29
34
|
!tooltipData ? /*#__PURE__*/ jsxRuntime.jsx(Text.default, {
|
|
30
|
-
className:
|
|
35
|
+
className: textValueMoneyClasses,
|
|
31
36
|
setting: {
|
|
32
37
|
text: money,
|
|
33
38
|
options: {
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
var core = require('@gem-sdk/core');
|
|
4
4
|
|
|
5
|
-
const getWrapperLabelClasses = ()=>
|
|
5
|
+
const getWrapperLabelClasses = (direction)=>({
|
|
6
|
+
...core.composeClasses('gp-flex gp-text-[#1879B9] gp-h-4.5 gp-cursor-pointer'),
|
|
7
|
+
'gp-justify-end': direction === 'rtl'
|
|
8
|
+
});
|
|
6
9
|
const getIconCollapseClassesRotate = (isCollapsePrice)=>{
|
|
7
10
|
return core.composeClasses(!isCollapsePrice ? 'gp-rotate-180' : '');
|
|
8
11
|
};
|
|
@@ -22,11 +25,36 @@ const getContainerPriceBreakdownClasses = (align, uid)=>{
|
|
|
22
25
|
};
|
|
23
26
|
};
|
|
24
27
|
const getWrapperBreakdownClasses = ()=>core.composeClasses('gp-col-[1] gp-row-[1]');
|
|
28
|
+
const getMoneyRowClasses = (direction)=>{
|
|
29
|
+
const classList = 'gp-flex gp-w-full gp-justify-between';
|
|
30
|
+
return {
|
|
31
|
+
...core.composeClasses(classList),
|
|
32
|
+
'gp-flex-row-reverse': direction === 'rtl'
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
const getTextLabelMoneyClasses = (direction)=>{
|
|
36
|
+
const classList = 'gp-w-3/5';
|
|
37
|
+
return {
|
|
38
|
+
...core.composeClasses(classList),
|
|
39
|
+
'gp-text-end': direction === 'rtl'
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
const getTextValueMoneyClasses = (direction)=>{
|
|
43
|
+
const classList = 'gp-w-2/5';
|
|
44
|
+
return {
|
|
45
|
+
...core.composeClasses(classList),
|
|
46
|
+
'gp-text-start': direction === 'rtl',
|
|
47
|
+
'gp-text-end': direction !== 'rtl'
|
|
48
|
+
};
|
|
49
|
+
};
|
|
25
50
|
|
|
26
51
|
exports.getContainerPriceBreakdownClasses = getContainerPriceBreakdownClasses;
|
|
27
52
|
exports.getDividerClasses = getDividerClasses;
|
|
28
53
|
exports.getIconCollapseClassesRotate = getIconCollapseClassesRotate;
|
|
29
54
|
exports.getLabelClasses = getLabelClasses;
|
|
55
|
+
exports.getMoneyRowClasses = getMoneyRowClasses;
|
|
56
|
+
exports.getTextLabelMoneyClasses = getTextLabelMoneyClasses;
|
|
57
|
+
exports.getTextValueMoneyClasses = getTextValueMoneyClasses;
|
|
30
58
|
exports.getWrapperBreakdownClasses = getWrapperBreakdownClasses;
|
|
31
59
|
exports.getWrapperLabelClasses = getWrapperLabelClasses;
|
|
32
60
|
exports.getWrapperMoneyLinesClasses = getWrapperMoneyLinesClasses;
|
|
@@ -28,7 +28,7 @@ const SettingUIV2 = [
|
|
|
28
28
|
iconName: 'polaris-text-block',
|
|
29
29
|
compoDefaultValue: 'Show',
|
|
30
30
|
getValueFromSettingID: 'contentShow',
|
|
31
|
-
disableClearMessage: `This
|
|
31
|
+
disableClearMessage: `This content is needed for customers <br> to show the price breakdown`,
|
|
32
32
|
layout: 'horizontal',
|
|
33
33
|
controls: [
|
|
34
34
|
{
|
|
@@ -53,7 +53,7 @@ const SettingUIV2 = [
|
|
|
53
53
|
type: 'combo',
|
|
54
54
|
iconName: 'polaris-text-block',
|
|
55
55
|
getValueFromSettingID: 'contentHide',
|
|
56
|
-
disableClearMessage: `This
|
|
56
|
+
disableClearMessage: `This content is needed for customers <br> to hide the price breakdown`,
|
|
57
57
|
layout: 'horizontal',
|
|
58
58
|
controls: [
|
|
59
59
|
{
|
|
@@ -212,7 +212,7 @@ const SettingUIV2 = [
|
|
|
212
212
|
setting: {
|
|
213
213
|
id: 'align'
|
|
214
214
|
},
|
|
215
|
-
conditionEnable: '!(parseInt(width)
|
|
215
|
+
conditionEnable: '!(parseInt(width) >= 100 && width?.includes("%"))',
|
|
216
216
|
options: {
|
|
217
217
|
labelVariant: 'primary',
|
|
218
218
|
fullWidth: true,
|
|
@@ -13,9 +13,9 @@ var core = require('@gem-sdk/core');
|
|
|
13
13
|
var ProductButton = require('../ProductButton.js');
|
|
14
14
|
var ProductPrice = require('../ProductPrice.js');
|
|
15
15
|
var ProductQuantity = require('../ProductQuantity.js');
|
|
16
|
-
var index = require('../ProductVariants/index.js');
|
|
16
|
+
var index$1 = require('../ProductVariants/index.js');
|
|
17
17
|
var ProductImages = require('../ProductImages.js');
|
|
18
|
-
var
|
|
18
|
+
var index = require('../ProductTitle/index.js');
|
|
19
19
|
|
|
20
20
|
const ModalContent = ()=>{
|
|
21
21
|
const product = core.useProduct();
|
|
@@ -72,7 +72,7 @@ const ModalContent = ()=>{
|
|
|
72
72
|
}),
|
|
73
73
|
/*#__PURE__*/ jsxRuntime.jsxs(Col.default, {
|
|
74
74
|
children: [
|
|
75
|
-
/*#__PURE__*/ jsxRuntime.jsx(
|
|
75
|
+
/*#__PURE__*/ jsxRuntime.jsx(index.default, {
|
|
76
76
|
setting: {
|
|
77
77
|
htmlTag: 'p'
|
|
78
78
|
},
|
|
@@ -117,7 +117,7 @@ const ModalContent = ()=>{
|
|
|
117
117
|
})
|
|
118
118
|
]
|
|
119
119
|
}),
|
|
120
|
-
/*#__PURE__*/ jsxRuntime.jsx(index.default, {}),
|
|
120
|
+
/*#__PURE__*/ jsxRuntime.jsx(index$1.default, {}),
|
|
121
121
|
/*#__PURE__*/ jsxRuntime.jsx(ProductQuantity.default, {}),
|
|
122
122
|
/*#__PURE__*/ jsxRuntime.jsx(ProductButton.default, {})
|
|
123
123
|
]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const getTextProps = (props, productTitle)=>{
|
|
4
|
+
const { setting, builderProps, styles, advanced } = props;
|
|
5
|
+
return {
|
|
6
|
+
builderProps,
|
|
7
|
+
styles,
|
|
8
|
+
setting: {
|
|
9
|
+
...setting,
|
|
10
|
+
text: productTitle ? productTitle : '{{ product.title }}',
|
|
11
|
+
excludeFlex: true
|
|
12
|
+
},
|
|
13
|
+
advanced
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.getTextProps = getTextProps;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var Link = require('next/link');
|
|
8
|
+
var core = require('@gem-sdk/core');
|
|
9
|
+
var urlJoin = require('../../../link/helpers/url-join.js');
|
|
10
|
+
var Text = require('../../../text/components/Text.js');
|
|
11
|
+
var system = require('@gem-sdk/system');
|
|
12
|
+
var gpCommon = require('./common/gpCommon.js');
|
|
13
|
+
|
|
14
|
+
const ProductTitle = (props)=>{
|
|
15
|
+
const { setting, builderProps } = props;
|
|
16
|
+
const product = core.useProduct();
|
|
17
|
+
const destination = product?.handle ? urlJoin.urlJoin('/products', product.handle) : '#';
|
|
18
|
+
const currentProductId = product?.baseID?.replace('gid://shopify/Product/', '');
|
|
19
|
+
const mode = core.useEditorMode();
|
|
20
|
+
const renderText = ()=>{
|
|
21
|
+
return /*#__PURE__*/ jsxRuntime.jsx(Text.default, {
|
|
22
|
+
...gpCommon.getTextProps(props, product?.title)
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
const linkAttrs = {
|
|
26
|
+
href: destination,
|
|
27
|
+
title: product?.title
|
|
28
|
+
};
|
|
29
|
+
const isEnableLink = setting?.linkProduct;
|
|
30
|
+
const linkClassName = system.createClass({
|
|
31
|
+
'gp-product-title-link-wrapper': true
|
|
32
|
+
});
|
|
33
|
+
const editorAttrs = system.createAttr({
|
|
34
|
+
id: `shopify-text-element-${builderProps?.uid}`,
|
|
35
|
+
...currentProductId && {
|
|
36
|
+
'data-product-id': currentProductId
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
40
|
+
...mode === 'edit' && editorAttrs,
|
|
41
|
+
children: system.Unless(!!product, '', system.If(isEnableLink, /*#__PURE__*/ jsxRuntime.jsx(Link, {
|
|
42
|
+
...linkAttrs,
|
|
43
|
+
className: linkClassName,
|
|
44
|
+
children: renderText()
|
|
45
|
+
}), renderText()))
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
exports.default = ProductTitle;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var core = require('@gem-sdk/core');
|
|
6
|
+
var helpers = require('../../../helpers.js');
|
|
7
|
+
var Text_liquid = require('../../../text/components/Text.liquid.js');
|
|
8
|
+
var system = require('@gem-sdk/system');
|
|
9
|
+
var gpCommon = require('./common/gpCommon.js');
|
|
10
|
+
|
|
11
|
+
const ProductTitle = (props)=>{
|
|
12
|
+
const { setting } = props;
|
|
13
|
+
const noProduct = `<p>${helpers.getStaticLocale('ProductTitle', 'product_not_found')}</p>`;
|
|
14
|
+
const renderText = ()=>{
|
|
15
|
+
return Text_liquid.default(gpCommon.getTextProps(props));
|
|
16
|
+
};
|
|
17
|
+
const linkAttrs = {
|
|
18
|
+
href: '{{ product.url }}',
|
|
19
|
+
title: '{{ product.title }}'
|
|
20
|
+
};
|
|
21
|
+
const isEnableLink = setting?.linkProduct;
|
|
22
|
+
const linkClassName = system.createClass({
|
|
23
|
+
'gp-product-title-link-wrapper': true
|
|
24
|
+
});
|
|
25
|
+
return system.LiquidUnless('product', `${noProduct}`, system.If(isEnableLink, core.template`<a ${linkAttrs} class="${linkClassName}">
|
|
26
|
+
${renderText()}
|
|
27
|
+
</a>`, `${renderText()}`));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
exports.default = ProductTitle;
|
package/dist/cjs/product/next.js
CHANGED
|
@@ -11,7 +11,7 @@ require('@gem-sdk/core');
|
|
|
11
11
|
const Product = dynamic(()=>Promise.resolve().then(function () { return require('./components/Product.js'); }), {
|
|
12
12
|
loading: Loading.default
|
|
13
13
|
});
|
|
14
|
-
const ProductTitle = dynamic(()=>Promise.resolve().then(function () { return require('./components/ProductTitle.js'); }), {
|
|
14
|
+
const ProductTitle = dynamic(()=>Promise.resolve().then(function () { return require('./components/ProductTitle/index.js'); }), {
|
|
15
15
|
loading: Loading.default
|
|
16
16
|
});
|
|
17
17
|
const ProductQuantity = dynamic(()=>Promise.resolve().then(function () { return require('./components/ProductQuantity.js'); }), {
|
|
@@ -17,10 +17,10 @@ const getBreadcrumbChildItemStyles = (args)=>{
|
|
|
17
17
|
...makeStyle({
|
|
18
18
|
c: getSingleColorVariable(breadcrumbItemIndex + 1 === lengthOfBreadcrumb ? labelColor?.active : labelColor?.normal)
|
|
19
19
|
}),
|
|
20
|
+
...appendTypoStyle,
|
|
20
21
|
...removeNullUndefined({
|
|
21
22
|
...makeStyleStateConditionActive('weight', fontWeight, breadcrumbItemIndex + 1 === lengthOfBreadcrumb)
|
|
22
|
-
})
|
|
23
|
-
...appendTypoStyle
|
|
23
|
+
})
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
const generateBreadcrumbChildIconStyles = (iconWidth, color)=>{
|
package/dist/esm/builder.js
CHANGED
|
@@ -178,7 +178,7 @@ import PostPurchaseProductDiscountTag from './post-purchase/product/components/P
|
|
|
178
178
|
import PostPurchaseProductImages from './post-purchase/product/components/product-image/index.js';
|
|
179
179
|
import PostPurchaseProductVariants from './post-purchase/product/components/product-variant/components/ProductVariant.js';
|
|
180
180
|
import Product from './product/components/Product.js';
|
|
181
|
-
import ProductTitle from './product/components/ProductTitle.js';
|
|
181
|
+
import ProductTitle from './product/components/ProductTitle/index.js';
|
|
182
182
|
import ProductQuantity from './product/components/ProductQuantity.js';
|
|
183
183
|
import ProductDescription from './product/components/ProductDescription.js';
|
|
184
184
|
import ProductPrice from './product/components/ProductPrice.js';
|
|
@@ -3,7 +3,7 @@ import { getStyles } from './common/getStyles.js';
|
|
|
3
3
|
import { getClass } from './common/getClass.js';
|
|
4
4
|
import { getAttr } from './common/getAttr.js';
|
|
5
5
|
|
|
6
|
-
const Column = (
|
|
6
|
+
const Column = (props)=>{
|
|
7
7
|
const { colStyle } = getStyles(props);
|
|
8
8
|
const { colClass } = getClass(props);
|
|
9
9
|
const { colAttr } = getAttr(props);
|
|
@@ -14,7 +14,7 @@ const Column = ({ children, className, style, builderAttrs, builderProps, advanc
|
|
|
14
14
|
style="${colStyle}"
|
|
15
15
|
class="${colClass}"
|
|
16
16
|
>
|
|
17
|
-
${children ?? ''}
|
|
17
|
+
${props.children ?? ''}
|
|
18
18
|
</div>`;
|
|
19
19
|
};
|
|
20
20
|
|
package/dist/esm/grid/row/Row.js
CHANGED
|
@@ -46,7 +46,6 @@ const Row = (props)=>{
|
|
|
46
46
|
const params = `&loop=${bgVideo?.loop ? 1 : 0}&playlist=${videoId}&showinfo=0&rel=0&fs=0&enablejsapi=1`;
|
|
47
47
|
return /*#__PURE__*/ jsx(LiteYouTubeEmbed, {
|
|
48
48
|
id: videoId,
|
|
49
|
-
isHeroBanner: true,
|
|
50
49
|
autoplay: true,
|
|
51
50
|
title: "",
|
|
52
51
|
controls: false,
|
|
@@ -67,7 +66,7 @@ const Row = (props)=>{
|
|
|
67
66
|
ref: ref,
|
|
68
67
|
...builderAttrs,
|
|
69
68
|
...rowAttr,
|
|
70
|
-
style: rowStyle,
|
|
69
|
+
style: rowStyle(isPostPurchase),
|
|
71
70
|
className: className,
|
|
72
71
|
children: [
|
|
73
72
|
!!embed && /*#__PURE__*/ jsx("div", {
|
|
@@ -88,6 +87,7 @@ const Row = (props)=>{
|
|
|
88
87
|
...el.props,
|
|
89
88
|
key: el.key,
|
|
90
89
|
order: setting?.order,
|
|
90
|
+
layout: setting?.layout,
|
|
91
91
|
justifyContent: isPostPurchase ? postPurchaseVerticalAlign : setting?.verticalAlign
|
|
92
92
|
});
|
|
93
93
|
return null;
|
|
@@ -47,7 +47,6 @@ const Row = (props)=>{
|
|
|
47
47
|
return LiteYouTubeEmbed({
|
|
48
48
|
uid: builderProps?.uid,
|
|
49
49
|
id: videoId,
|
|
50
|
-
isHeroBanner: true,
|
|
51
50
|
autoplay: true,
|
|
52
51
|
title: 'Video',
|
|
53
52
|
controls: false,
|
|
@@ -72,7 +71,7 @@ const Row = (props)=>{
|
|
|
72
71
|
const element = template`
|
|
73
72
|
<gp-row gp-data='${stateData}' ${{
|
|
74
73
|
...rowAttr
|
|
75
|
-
}} class="${className}" style="${rowStyle}">
|
|
74
|
+
}} class="${className}" style="${rowStyle()}">
|
|
76
75
|
${If(!!embed(), template /* liquid */ `
|
|
77
76
|
<div class="${backgroundBoxClass}" style="${backgroundBoxStyle}">
|
|
78
77
|
<div class="${backgroundBoxInnerClass}">${embed()}</div>
|