@gem-sdk/components 2.1.12 → 2.1.13-staging.1
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/builder.js +5 -1
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/index.liquid.js +4 -0
- package/dist/cjs/post-purchase/product/components/ProductDiscountTag.js +5 -2
- package/dist/cjs/post-purchase/product/components/ProductOffer.js +16 -3
- package/dist/cjs/post-purchase/product/components/ProductPrice.js +3 -1
- package/dist/cjs/post-purchase/product/components/ProductPriceBreakdown.js +9 -21
- package/dist/cjs/post-purchase/product/constants/ProductOfferPlaceholder.js +127 -0
- package/dist/cjs/post-purchase/product/hooks/useDynamicProduct.js +28 -0
- package/dist/cjs/post-purchase/product/settings/ProductOffer.js +26 -0
- package/dist/cjs/third-party/components/HextomCountdownTimerBar.js +32 -0
- package/dist/cjs/third-party/components/HextomCountdownTimerBar.liquid.js +12 -0
- package/dist/cjs/third-party/components/TrustBadgesBear.js +32 -0
- package/dist/cjs/third-party/components/TrustBadgesBear.liquid.js +12 -0
- package/dist/cjs/third-party/configs/HextomCountdownTimerBar.js +12 -0
- package/dist/cjs/third-party/configs/TrustBadgesBear.js +12 -0
- package/dist/cjs/third-party/next.js +11 -1
- package/dist/cjs/third-party/setting/HextomCountdownTimerBar.js +128 -0
- package/dist/cjs/third-party/setting/TrustBadgesBear.js +128 -0
- package/dist/cjs/third-party/setting/index.js +5 -1
- package/dist/esm/builder.js +5 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.liquid.js +2 -0
- package/dist/esm/post-purchase/product/components/ProductDiscountTag.js +5 -2
- package/dist/esm/post-purchase/product/components/ProductOffer.js +16 -3
- package/dist/esm/post-purchase/product/components/ProductPrice.js +3 -1
- package/dist/esm/post-purchase/product/components/ProductPriceBreakdown.js +9 -21
- package/dist/esm/post-purchase/product/constants/ProductOfferPlaceholder.js +125 -0
- package/dist/esm/post-purchase/product/hooks/useDynamicProduct.js +26 -0
- package/dist/esm/post-purchase/product/settings/ProductOffer.js +26 -0
- package/dist/esm/third-party/components/HextomCountdownTimerBar.js +28 -0
- package/dist/esm/third-party/components/HextomCountdownTimerBar.liquid.js +8 -0
- package/dist/esm/third-party/components/TrustBadgesBear.js +28 -0
- package/dist/esm/third-party/components/TrustBadgesBear.liquid.js +8 -0
- package/dist/esm/third-party/configs/HextomCountdownTimerBar.js +8 -0
- package/dist/esm/third-party/configs/TrustBadgesBear.js +8 -0
- package/dist/esm/third-party/next.js +11 -1
- package/dist/esm/third-party/setting/HextomCountdownTimerBar.js +124 -0
- package/dist/esm/third-party/setting/TrustBadgesBear.js +124 -0
- package/dist/esm/third-party/setting/index.js +206 -202
- package/dist/types/index.d.ts +34 -1
- package/package.json +2 -2
package/dist/cjs/builder.js
CHANGED
|
@@ -111,6 +111,8 @@ var TrustreviewsProductReviews = require('./third-party/components/TrustreviewsP
|
|
|
111
111
|
var MyappgurusProductReviews = require('./third-party/components/MyappgurusProductReviews.js');
|
|
112
112
|
var HulkProductOptions = require('./third-party/components/HulkProductOptions.js');
|
|
113
113
|
var TrustshopProductReviews = require('./third-party/components/TrustshopProductReviews.js');
|
|
114
|
+
var HextomCountdownTimerBar = require('./third-party/components/HextomCountdownTimerBar.js');
|
|
115
|
+
var TrustBadgesBear = require('./third-party/components/TrustBadgesBear.js');
|
|
114
116
|
var CartLineVariant = require('./cart/components/CartLineVariant.js');
|
|
115
117
|
var Cart = require('./cart/components/Cart.js');
|
|
116
118
|
var CartList = require('./cart/components/CartList.js');
|
|
@@ -479,7 +481,9 @@ var builder = {
|
|
|
479
481
|
ArticleReadMore: ArticleReadMore.default,
|
|
480
482
|
Marquee: Marquee.default,
|
|
481
483
|
MarqueeItem: MarqueeItem.default,
|
|
482
|
-
ProductBadge: index$8.default
|
|
484
|
+
ProductBadge: index$8.default,
|
|
485
|
+
HextomCountdownTimerBar: HextomCountdownTimerBar.default,
|
|
486
|
+
TrustBadgesBear: TrustBadgesBear.default
|
|
483
487
|
};
|
|
484
488
|
|
|
485
489
|
exports.default = builder;
|
package/dist/cjs/index.js
CHANGED
|
@@ -207,6 +207,8 @@ var TrustreviewsProductReviews = require('./third-party/components/TrustreviewsP
|
|
|
207
207
|
var MyappgurusProductReviews = require('./third-party/components/MyappgurusProductReviews.js');
|
|
208
208
|
var HulkProductOptions = require('./third-party/components/HulkProductOptions.js');
|
|
209
209
|
var TrustshopProductReviews = require('./third-party/components/TrustshopProductReviews.js');
|
|
210
|
+
var HextomCountdownTimerBar = require('./third-party/components/HextomCountdownTimerBar.js');
|
|
211
|
+
var TrustBadgesBear = require('./third-party/components/TrustBadgesBear.js');
|
|
210
212
|
var index$x = require('./third-party-instant/setting/index.js');
|
|
211
213
|
var InstantJudgemeReviews = require('./third-party-instant/components/InstantJudgemeReviews.js');
|
|
212
214
|
var InstantLooxReviews = require('./third-party-instant/components/InstantLooxReviews.js');
|
|
@@ -509,6 +511,8 @@ exports.TrustreviewsProductReviews = TrustreviewsProductReviews.default;
|
|
|
509
511
|
exports.MyappgurusProductReviews = MyappgurusProductReviews.default;
|
|
510
512
|
exports.HulkProductOptions = HulkProductOptions.default;
|
|
511
513
|
exports.TrustshopProductReviews = TrustshopProductReviews.default;
|
|
514
|
+
exports.HextomCountdownTimerBar = HextomCountdownTimerBar.default;
|
|
515
|
+
exports.TrustBadgesBear = TrustBadgesBear.default;
|
|
512
516
|
exports.thirdPartyInstantSetting = index$x.default;
|
|
513
517
|
exports.InstantJudgemeReviews = InstantJudgemeReviews.default;
|
|
514
518
|
exports.InstantLooxReviews = InstantLooxReviews.default;
|
package/dist/cjs/index.liquid.js
CHANGED
|
@@ -161,6 +161,8 @@ var SeoantTrustBadgesIcon_liquid = require('./third-party/components/SeoantTrust
|
|
|
161
161
|
var TrustreviewsProductReviews_liquid = require('./third-party/components/TrustreviewsProductReviews.liquid.js');
|
|
162
162
|
var MyappgurusProductReviews_liquid = require('./third-party/components/MyappgurusProductReviews.liquid.js');
|
|
163
163
|
var HulkProductOptions_liquid = require('./third-party/components/HulkProductOptions.liquid.js');
|
|
164
|
+
var HextomCountdownTimerBar_liquid = require('./third-party/components/HextomCountdownTimerBar.liquid.js');
|
|
165
|
+
var TrustBadgesBear_liquid = require('./third-party/components/TrustBadgesBear.liquid.js');
|
|
164
166
|
var TrustshopProductReviews_liquid = require('./third-party/components/TrustshopProductReviews.liquid.js');
|
|
165
167
|
var ImageComparison_liquid = require('./image-comparison/components/ImageComparison.liquid.js');
|
|
166
168
|
var ThirdPartySlot_liquid = require('./third-party-slot/components/ThirdPartySlot.liquid.js');
|
|
@@ -345,6 +347,8 @@ exports.SeoantTrustBadgesIcon = SeoantTrustBadgesIcon_liquid.default;
|
|
|
345
347
|
exports.TrustreviewsProductReviews = TrustreviewsProductReviews_liquid.default;
|
|
346
348
|
exports.MyappgurusProductReviews = MyappgurusProductReviews_liquid.default;
|
|
347
349
|
exports.HulkProductOptions = HulkProductOptions_liquid.default;
|
|
350
|
+
exports.HextomCountdownTimerBar = HextomCountdownTimerBar_liquid.default;
|
|
351
|
+
exports.TrustBadgesBear = TrustBadgesBear_liquid.default;
|
|
348
352
|
exports.TrustshopProductReviews = TrustshopProductReviews_liquid.default;
|
|
349
353
|
exports.ImageComparison = ImageComparison_liquid.default;
|
|
350
354
|
exports.ThirdPartySlot = ThirdPartySlot_liquid.default;
|
|
@@ -5,26 +5,29 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var core = require('@gem-sdk/core');
|
|
7
7
|
var Text = require('../../text/Text.js');
|
|
8
|
+
var useDynamicProduct = require('../hooks/useDynamicProduct.js');
|
|
8
9
|
|
|
9
10
|
const PostPurchaseProductDiscountTag = ({ setting = {}, styles = {}, style, builderAttrs, builderProps, children })=>{
|
|
10
11
|
const currentProduct = core.useProduct();
|
|
11
12
|
const currentProductId = currentProduct?.baseID?.replace('gid://shopify/Product/', '');
|
|
12
13
|
const currentOfferDiscount = core.useProductOfferDiscount();
|
|
14
|
+
const { isDynamicProduct, isEnableDynamicDiscount } = useDynamicProduct.useDynamicProduct();
|
|
13
15
|
const { typo } = styles;
|
|
14
16
|
const { message } = setting;
|
|
17
|
+
const hasDiscount = !!currentOfferDiscount || isDynamicProduct && isEnableDynamicDiscount;
|
|
15
18
|
return /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
16
19
|
...builderAttrs,
|
|
17
20
|
className: core.cls(builderProps?.uid, 'gp-flex gp-w-full'),
|
|
18
21
|
style: {
|
|
19
22
|
...style,
|
|
20
|
-
opacity:
|
|
23
|
+
opacity: hasDiscount ? 1 : 0.2
|
|
21
24
|
},
|
|
22
25
|
id: `shopify-text-element-${builderProps?.uid}`,
|
|
23
26
|
"data-product-id": currentProductId,
|
|
24
27
|
children: [
|
|
25
28
|
/*#__PURE__*/ jsxRuntime.jsx(Text.default, {
|
|
26
29
|
setting: {
|
|
27
|
-
text:
|
|
30
|
+
text: hasDiscount ? message : message?.replace(new RegExp(/\{\{Discount\}\}/, 'gi'), '0%')
|
|
28
31
|
},
|
|
29
32
|
styles: {
|
|
30
33
|
typo
|
|
@@ -11,14 +11,20 @@ var Loading = require('../../../common/components/Loading.js');
|
|
|
11
11
|
var ProductVariant = require('./ProductVariant.js');
|
|
12
12
|
var helper = require('../../utils/helper.js');
|
|
13
13
|
var index = require('../helpers/index.js');
|
|
14
|
+
var ProductOfferPlaceholder = require('../constants/ProductOfferPlaceholder.js');
|
|
15
|
+
var useDynamicProduct = require('../hooks/useDynamicProduct.js');
|
|
14
16
|
|
|
15
17
|
const PostPurchaseProductOffer = ({ styles, builderAttrs, builderProps, children, setting })=>{
|
|
16
18
|
const mode = core.useEditorMode();
|
|
17
|
-
const { productSetting, productOfferLayout, inlineAlignment, ...rowSetting } = setting || {};
|
|
19
|
+
const { productSetting, productOfferLayout, inlineAlignment, discountAndShippingFee, ...rowSetting } = setting || {};
|
|
18
20
|
const { productOfferColumnGap, productOfferVerticalGutter, productOfferWidth, ...rowStyles } = styles || {};
|
|
19
21
|
const productOffers = core.usePageStore((s)=>s.productOffers);
|
|
20
22
|
const publicStoreFrontData = core.usePageStore((s)=>s.publicStoreFrontData);
|
|
21
|
-
const
|
|
23
|
+
const { isDynamicProduct } = useDynamicProduct.useDynamicProduct();
|
|
24
|
+
const dynamicDiscountOffer = core.usePageStore((s)=>s.dynamicDiscountOffer);
|
|
25
|
+
const totalProduct = React.useMemo(()=>isDynamicProduct ? dynamicDiscountOffer?.appliedProductCount : productOffers?.length, [
|
|
26
|
+
dynamicDiscountOffer?.appliedProductCount,
|
|
27
|
+
isDynamicProduct,
|
|
22
28
|
productOffers?.length
|
|
23
29
|
]);
|
|
24
30
|
const sortedProductBaseIDs = React.useMemo(()=>{
|
|
@@ -44,7 +50,14 @@ const PostPurchaseProductOffer = ({ styles, builderAttrs, builderProps, children
|
|
|
44
50
|
const products = React.useMemo(()=>core.flattenConnection(productData.data?.products), [
|
|
45
51
|
productData.data?.products
|
|
46
52
|
]);
|
|
47
|
-
const productSortedById =
|
|
53
|
+
const productSortedById = React.useMemo(()=>{
|
|
54
|
+
return isDynamicProduct && dynamicDiscountOffer?.appliedProductCount ? Array(dynamicDiscountOffer.appliedProductCount).fill(ProductOfferPlaceholder.productOfferPlaceholder) : sortedProductBaseIDs?.map((id)=>products?.find((el)=>el?.baseID === id)).filter(Boolean);
|
|
55
|
+
}, [
|
|
56
|
+
isDynamicProduct,
|
|
57
|
+
dynamicDiscountOffer?.appliedProductCount,
|
|
58
|
+
sortedProductBaseIDs,
|
|
59
|
+
products
|
|
60
|
+
]);
|
|
48
61
|
const getStyles = ()=>{
|
|
49
62
|
return {
|
|
50
63
|
...core.makeStyleResponsive('cg', productOfferColumnGap),
|
|
@@ -6,6 +6,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var core = require('@gem-sdk/core');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var Text = require('../../text/Text.js');
|
|
9
|
+
var useDynamicProduct = require('../hooks/useDynamicProduct.js');
|
|
9
10
|
|
|
10
11
|
const PostPurchaseProductPrice = ({ styles, style, builderAttrs, builderProps, children })=>{
|
|
11
12
|
const currentVariant = core.useCurrentVariant();
|
|
@@ -13,6 +14,7 @@ const PostPurchaseProductPrice = ({ styles, style, builderAttrs, builderProps, c
|
|
|
13
14
|
const price = currentVariant?.price ?? 0;
|
|
14
15
|
const salePrice = currentVariant?.salePrice ?? 0;
|
|
15
16
|
const discount = parseFloat(core.shopifyPriceRounding(core.useProductOfferDiscount(), 2));
|
|
17
|
+
const { isDynamicProduct } = useDynamicProduct.useDynamicProduct();
|
|
16
18
|
const priceShow = React.useMemo(()=>{
|
|
17
19
|
if (!discount) {
|
|
18
20
|
if (styles?.priceType === 'compare') {
|
|
@@ -53,7 +55,7 @@ const PostPurchaseProductPrice = ({ styles, style, builderAttrs, builderProps, c
|
|
|
53
55
|
/*#__PURE__*/ jsxRuntime.jsx(Text.default, {
|
|
54
56
|
styles: styles,
|
|
55
57
|
setting: {
|
|
56
|
-
text: moneyFormatted
|
|
58
|
+
text: isDynamicProduct ? '$???' : moneyFormatted
|
|
57
59
|
},
|
|
58
60
|
className: core.cls({
|
|
59
61
|
'gp-money': styles?.priceType === 'regular',
|
|
@@ -7,6 +7,7 @@ var core = require('@gem-sdk/core');
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var helper = require('../../utils/helper.js');
|
|
9
9
|
var MoneyLine = require('./priceBreakdown/MoneyLine.js');
|
|
10
|
+
var useDynamicProduct = require('../hooks/useDynamicProduct.js');
|
|
10
11
|
|
|
11
12
|
const PostPurchaseProductPriceBreakdown = ({ setting = {}, styles = {}, style, builderAttrs, builderProps, children })=>{
|
|
12
13
|
const currentVariant = core.useCurrentVariant();
|
|
@@ -21,6 +22,7 @@ const PostPurchaseProductPriceBreakdown = ({ setting = {}, styles = {}, style, b
|
|
|
21
22
|
const discountShopifyFormat = core.shopifyPriceRounding(discountWithQuantity, 2);
|
|
22
23
|
const totalMoneyFormatted = core.useFormatMoney(subTotal - parseFloat(discountShopifyFormat), false);
|
|
23
24
|
const currentProductId = currentProduct?.baseID?.replace('gid://shopify/Product/', '');
|
|
25
|
+
const { isDynamicProduct, dynamicPrice, dynamicDiscount, isEnableDynamicDiscount } = useDynamicProduct.useDynamicProduct();
|
|
24
26
|
const { labelStyle, moneyStyle, spacing, width, align, isShowPrice } = styles;
|
|
25
27
|
const itemGap = React.useMemo(()=>{
|
|
26
28
|
return helper.postPurchaseSpacing[spacing || 'none'];
|
|
@@ -33,19 +35,19 @@ const PostPurchaseProductPriceBreakdown = ({ setting = {}, styles = {}, style, b
|
|
|
33
35
|
}, [
|
|
34
36
|
isShowPrice
|
|
35
37
|
]);
|
|
36
|
-
const
|
|
38
|
+
const getMoneyLines = ()=>{
|
|
37
39
|
const data = [];
|
|
38
40
|
if (styles.isShowSubTotalLabel !== false) {
|
|
39
41
|
data.push({
|
|
40
42
|
title: setting.subTotalLabel,
|
|
41
|
-
money: subTotalMoneyFormatted,
|
|
43
|
+
money: isDynamicProduct ? dynamicPrice : subTotalMoneyFormatted,
|
|
42
44
|
uniqueId: 'subTotalLabel'
|
|
43
45
|
});
|
|
44
46
|
}
|
|
45
47
|
if (styles.isShowDiscountLabel !== false) {
|
|
46
48
|
data.push({
|
|
47
49
|
title: setting.discountLabel,
|
|
48
|
-
money: discount > 0 ? discountMoneyFormatted : 'No discount',
|
|
50
|
+
money: isDynamicProduct && dynamicDiscount && isEnableDynamicDiscount ? dynamicPrice : discount > 0 ? discountMoneyFormatted : 'No discount',
|
|
49
51
|
uniqueId: 'discountLabel'
|
|
50
52
|
});
|
|
51
53
|
}
|
|
@@ -71,25 +73,11 @@ const PostPurchaseProductPriceBreakdown = ({ setting = {}, styles = {}, style, b
|
|
|
71
73
|
}
|
|
72
74
|
data.push({
|
|
73
75
|
title: setting.totalLabel,
|
|
74
|
-
money: totalMoneyFormatted,
|
|
76
|
+
money: isDynamicProduct ? dynamicPrice : totalMoneyFormatted,
|
|
75
77
|
uniqueId: 'totalLabel'
|
|
76
78
|
});
|
|
77
79
|
return data;
|
|
78
|
-
}
|
|
79
|
-
discount,
|
|
80
|
-
discountMoneyFormatted,
|
|
81
|
-
setting.discountLabel,
|
|
82
|
-
setting.shippingLabel,
|
|
83
|
-
setting.subTotalLabel,
|
|
84
|
-
setting.taxesLabel,
|
|
85
|
-
setting.totalLabel,
|
|
86
|
-
styles.isShowSubTotalLabel,
|
|
87
|
-
styles.isShowDiscountLabel,
|
|
88
|
-
styles.isShowShippingLabel,
|
|
89
|
-
styles.isShowTaxesLabel,
|
|
90
|
-
subTotalMoneyFormatted,
|
|
91
|
-
totalMoneyFormatted
|
|
92
|
-
]);
|
|
80
|
+
};
|
|
93
81
|
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
94
82
|
children: [
|
|
95
83
|
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
@@ -140,9 +128,9 @@ const PostPurchaseProductPriceBreakdown = ({ setting = {}, styles = {}, style, b
|
|
|
140
128
|
...core.makeStyleResponsive('w', width),
|
|
141
129
|
gap: itemGap
|
|
142
130
|
},
|
|
143
|
-
children:
|
|
131
|
+
children: getMoneyLines().map((item)=>/*#__PURE__*/ jsxRuntime.jsxs(React.Fragment, {
|
|
144
132
|
children: [
|
|
145
|
-
item.uniqueId === 'totalLabel' &&
|
|
133
|
+
item.uniqueId === 'totalLabel' && getMoneyLines().length > 1 && /*#__PURE__*/ jsxRuntime.jsx("hr", {}),
|
|
146
134
|
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
147
135
|
children: /*#__PURE__*/ jsxRuntime.jsx(MoneyLine.default, {
|
|
148
136
|
uniqueId: item.uniqueId,
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const productOfferPlaceholder = {
|
|
4
|
+
id: '',
|
|
5
|
+
title: 'Dynamic product',
|
|
6
|
+
description: 'This is a dynamic product. The actual product will appear here based on your setup',
|
|
7
|
+
descriptionHtml: '<p class="QN2lPu">This is a dynamic product. The actual product will</p>\n<p class="QN2lPu">appear here based on your setup</p>',
|
|
8
|
+
createdAt: '2024-07-01T04:19:51.286753Z',
|
|
9
|
+
handle: 'dynamic-product',
|
|
10
|
+
averageRating: 0,
|
|
11
|
+
isStorefront: true,
|
|
12
|
+
isSample: false,
|
|
13
|
+
baseID: '',
|
|
14
|
+
sku: '',
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
id: '1',
|
|
18
|
+
name: 'Variant',
|
|
19
|
+
optionType: '',
|
|
20
|
+
values: [
|
|
21
|
+
{
|
|
22
|
+
id: '1',
|
|
23
|
+
label: 'Variant option',
|
|
24
|
+
isDefault: true,
|
|
25
|
+
baseID: '1'
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
vendor: '',
|
|
31
|
+
featuredImage: {
|
|
32
|
+
id: '542178560626918105',
|
|
33
|
+
contentType: 'IMAGE',
|
|
34
|
+
previewImage: '',
|
|
35
|
+
src: 'https://cdn.shopify.com/s/files/1/0858/3168/0279/files/gempages_502328832959710176-312cf60c-d923-4913-9873-66545effe9cc.png',
|
|
36
|
+
width: 449,
|
|
37
|
+
height: 449,
|
|
38
|
+
alt: ''
|
|
39
|
+
},
|
|
40
|
+
collections: {
|
|
41
|
+
edges: [
|
|
42
|
+
{
|
|
43
|
+
node: {
|
|
44
|
+
id: '502321959132988135',
|
|
45
|
+
title: 'Home page'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
node: {
|
|
50
|
+
id: '539286505089204764',
|
|
51
|
+
title: 'b'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
node: {
|
|
56
|
+
id: '539286505089401372',
|
|
57
|
+
title: 'e'
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
tags: [],
|
|
63
|
+
medias: {
|
|
64
|
+
edges: [
|
|
65
|
+
{
|
|
66
|
+
cursor: 'gqFpzweGNIc/AALZoXYB',
|
|
67
|
+
node: {
|
|
68
|
+
id: '542178560626918105',
|
|
69
|
+
contentType: 'IMAGE',
|
|
70
|
+
previewImage: '',
|
|
71
|
+
src: 'https://cdn.shopify.com/s/files/1/0858/3168/0279/files/gempages_502328832959710176-312cf60c-d923-4913-9873-66545effe9cc.png',
|
|
72
|
+
width: 449,
|
|
73
|
+
height: 449,
|
|
74
|
+
alt: ''
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
pageInfo: {
|
|
79
|
+
endCursor: 'gqFpzweGNIc/AALZoXYB',
|
|
80
|
+
hasNextPage: true
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
variants: {
|
|
84
|
+
edges: [
|
|
85
|
+
{
|
|
86
|
+
cursor: 'gqFpzwc5ZqRtDAMIoXYC',
|
|
87
|
+
node: {
|
|
88
|
+
id: '520560088328176392',
|
|
89
|
+
title: 'Default Title',
|
|
90
|
+
barcode: '',
|
|
91
|
+
baseID: 'gid://shopify/ProductVariant/49298248925463',
|
|
92
|
+
costPrice: 88,
|
|
93
|
+
height: 0,
|
|
94
|
+
inventoryPolicy: 'DENY',
|
|
95
|
+
inventoryQuantity: 211,
|
|
96
|
+
inventoryStatus: '',
|
|
97
|
+
isDigital: true,
|
|
98
|
+
length: 0,
|
|
99
|
+
lowInventoryAmount: 0,
|
|
100
|
+
manageInventory: false,
|
|
101
|
+
mediaId: '0',
|
|
102
|
+
platform: 'SHOPIFY',
|
|
103
|
+
price: 88,
|
|
104
|
+
salePrice: 88,
|
|
105
|
+
sku: '',
|
|
106
|
+
soldIndividually: false,
|
|
107
|
+
weight: 0,
|
|
108
|
+
width: 0,
|
|
109
|
+
selectedOptions: [
|
|
110
|
+
{
|
|
111
|
+
name: 'Variant',
|
|
112
|
+
value: 'Variant option',
|
|
113
|
+
optionType: ''
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
media: undefined
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
pageInfo: {
|
|
121
|
+
hasNextPage: false,
|
|
122
|
+
endCursor: 'gaFpzwc5ZqRtDAMI'
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
exports.productOfferPlaceholder = productOfferPlaceholder;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@gem-sdk/core');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
|
|
6
|
+
const useDynamicProduct = ()=>{
|
|
7
|
+
const dynamicDiscountOffer = core.usePageStore((s)=>s.dynamicDiscountOffer);
|
|
8
|
+
const isDynamicProduct = React.useMemo(()=>{
|
|
9
|
+
return !!dynamicDiscountOffer;
|
|
10
|
+
}, [
|
|
11
|
+
dynamicDiscountOffer
|
|
12
|
+
]);
|
|
13
|
+
// false = No discount
|
|
14
|
+
const isEnableDynamicDiscount = React.useMemo(()=>{
|
|
15
|
+
return dynamicDiscountOffer?.isEnabled;
|
|
16
|
+
}, [
|
|
17
|
+
dynamicDiscountOffer
|
|
18
|
+
]);
|
|
19
|
+
const dynamicPrice = '$???';
|
|
20
|
+
return {
|
|
21
|
+
isDynamicProduct,
|
|
22
|
+
dynamicPrice,
|
|
23
|
+
dynamicDiscount: dynamicDiscountOffer,
|
|
24
|
+
isEnableDynamicDiscount
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.useDynamicProduct = useDynamicProduct;
|
|
@@ -184,6 +184,14 @@ const config = {
|
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
},
|
|
187
|
+
{
|
|
188
|
+
id: 'dynamicOfferQuantity',
|
|
189
|
+
type: 'dynamic-offer-quantity',
|
|
190
|
+
min: 1,
|
|
191
|
+
max: 4,
|
|
192
|
+
default: 2,
|
|
193
|
+
isOnlyAcceptInteger: true
|
|
194
|
+
},
|
|
187
195
|
{
|
|
188
196
|
id: 'discountAndShippingFee',
|
|
189
197
|
type: 'discount-and-shipping-fee-product-offer',
|
|
@@ -377,6 +385,24 @@ const config = {
|
|
|
377
385
|
},
|
|
378
386
|
layout: 'vertical'
|
|
379
387
|
},
|
|
388
|
+
{
|
|
389
|
+
type: 'group',
|
|
390
|
+
label: {
|
|
391
|
+
en: 'Product offers'
|
|
392
|
+
},
|
|
393
|
+
controls: [
|
|
394
|
+
{
|
|
395
|
+
type: 'control',
|
|
396
|
+
label: {
|
|
397
|
+
en: 'Quantity'
|
|
398
|
+
},
|
|
399
|
+
setting: {
|
|
400
|
+
id: 'dynamicOfferQuantity'
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
],
|
|
404
|
+
condition: 'false'
|
|
405
|
+
},
|
|
380
406
|
{
|
|
381
407
|
type: 'control',
|
|
382
408
|
label: {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var core = require('@gem-sdk/core');
|
|
7
|
+
var ThirdPartyPreview = require('./ThirdPartyPreview.js');
|
|
8
|
+
var HextomCountdownTimerBar$1 = require('../configs/HextomCountdownTimerBar.js');
|
|
9
|
+
|
|
10
|
+
const HextomCountdownTimerBarContent = ()=>{
|
|
11
|
+
return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
12
|
+
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
13
|
+
className: "gp-p-2",
|
|
14
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(ThirdPartyPreview.default, {
|
|
15
|
+
setting: {
|
|
16
|
+
label: 'Hextom: Countdown Timer Bar',
|
|
17
|
+
iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${HextomCountdownTimerBar$1.default.logoUrl}">`
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
const HextomCountdownTimerBar = ({ setting })=>{
|
|
24
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
25
|
+
style: {
|
|
26
|
+
...core.makeStyleResponsive('ta', setting?.align)
|
|
27
|
+
},
|
|
28
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(HextomCountdownTimerBarContent, {})
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
exports.default = HextomCountdownTimerBar;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var thirdParty = require('../helpers/thirdParty.js');
|
|
6
|
+
|
|
7
|
+
const HextomCountdownTimerBar = ({ setting, advanced })=>{
|
|
8
|
+
const { align, appBlockId } = setting ?? {};
|
|
9
|
+
return thirdParty.getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block`);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
exports.default = HextomCountdownTimerBar;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var core = require('@gem-sdk/core');
|
|
7
|
+
var ThirdPartyPreview = require('./ThirdPartyPreview.js');
|
|
8
|
+
var TrustBadgesBear$1 = require('../configs/TrustBadgesBear.js');
|
|
9
|
+
|
|
10
|
+
const TrustBadgesBearContent = ()=>{
|
|
11
|
+
return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
12
|
+
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
13
|
+
className: "gp-p-2",
|
|
14
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(ThirdPartyPreview.default, {
|
|
15
|
+
setting: {
|
|
16
|
+
label: 'Trust Badges Bear',
|
|
17
|
+
iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${TrustBadgesBear$1.default.logoUrl}">`
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
const TrustBadgesBear = ({ setting })=>{
|
|
24
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
25
|
+
style: {
|
|
26
|
+
...core.makeStyleResponsive('ta', setting?.align)
|
|
27
|
+
},
|
|
28
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(TrustBadgesBearContent, {})
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
exports.default = TrustBadgesBear;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var thirdParty = require('../helpers/thirdParty.js');
|
|
6
|
+
|
|
7
|
+
const TrustBadgesBear = ({ setting, advanced })=>{
|
|
8
|
+
const { align, appBlockId } = setting ?? {};
|
|
9
|
+
return thirdParty.getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block`);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
exports.default = TrustBadgesBear;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var AppConfig = {
|
|
6
|
+
id: 'hextom-countdown-timer-bar',
|
|
7
|
+
label: 'Hextom: Countdown Timer Bar',
|
|
8
|
+
logoUrl: 'https://cdn.shopify.com/app-store/listing_images/904be13e4bba460880341eba1a5579e1/icon/CKCYtc2d5oYDEAE=.png',
|
|
9
|
+
tag: 'HextomCountdownTimerBar'
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
exports.default = AppConfig;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var AppConfig = {
|
|
6
|
+
id: 'trust-badges-bear',
|
|
7
|
+
label: 'Trust Badges Bear',
|
|
8
|
+
logoUrl: 'https://cdn.shopify.com/app-store/listing_images/c9141bfba8db18a258f290a5a639986e/icon/CLDR_q6erfwCEAE=.png',
|
|
9
|
+
tag: 'TrustBadgesBear'
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
exports.default = AppConfig;
|
|
@@ -410,6 +410,14 @@ const Selleasy = dynamic(()=>Promise.resolve().then(function () { return require
|
|
|
410
410
|
ssr: false,
|
|
411
411
|
loading: Loading.default
|
|
412
412
|
});
|
|
413
|
+
const HextomCountdownTimerBar = dynamic(()=>Promise.resolve().then(function () { return require('./components/HextomCountdownTimerBar.js'); }), {
|
|
414
|
+
ssr: false,
|
|
415
|
+
loading: Loading.default
|
|
416
|
+
});
|
|
417
|
+
const TrustBadgesBear = dynamic(()=>Promise.resolve().then(function () { return require('./components/TrustBadgesBear.js'); }), {
|
|
418
|
+
ssr: false,
|
|
419
|
+
loading: Loading.default
|
|
420
|
+
});
|
|
413
421
|
var thirdParty = {
|
|
414
422
|
TrustshopProductReviews,
|
|
415
423
|
HulkProductOptions,
|
|
@@ -511,7 +519,9 @@ var thirdParty = {
|
|
|
511
519
|
Releasit,
|
|
512
520
|
RequestQuoteHidePrice,
|
|
513
521
|
BirdChime,
|
|
514
|
-
FordeerProductLabels
|
|
522
|
+
FordeerProductLabels,
|
|
523
|
+
HextomCountdownTimerBar,
|
|
524
|
+
TrustBadgesBear
|
|
515
525
|
};
|
|
516
526
|
|
|
517
527
|
exports.default = thirdParty;
|