@gem-sdk/components 2.0.0-staging.151 → 2.0.0-staging.159
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/banner/components/hero-banner/index.liquid.js +1 -1
- package/dist/cjs/builder.js +4 -0
- 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 +149 -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/product/components/ProductBundleDiscountItem.liquid.js +3 -3
- package/dist/cjs/product/components/ProductDescription/common.js +28 -0
- package/dist/cjs/product/components/ProductDescription/const.js +5 -0
- package/dist/cjs/product/components/ProductDescription.js +37 -10
- package/dist/cjs/product/components/ProductDescription.liquid.js +3 -1
- package/dist/cjs/third-party/components/EssentialAnnouncementBar.js +33 -0
- package/dist/cjs/third-party/components/EssentialAnnouncementBar.liquid.js +12 -0
- package/dist/cjs/third-party/components/EssentialCountdownTimerBar.js +33 -0
- package/dist/cjs/third-party/components/EssentialCountdownTimerBar.liquid.js +12 -0
- package/dist/cjs/third-party/configs/EssentialAnnouncementBar.js +12 -0
- package/dist/cjs/third-party/configs/EssentialCountdownTimerBar.js +12 -0
- package/dist/cjs/third-party/helpers/thirdParty.js +1 -1
- package/dist/cjs/third-party/next.js +10 -0
- package/dist/cjs/third-party/setting/EssentialAnnouncementBar.js +142 -0
- package/dist/cjs/third-party/setting/EssentialCountdownTimerBar.js +142 -0
- package/dist/cjs/third-party/setting/index.js +4 -0
- package/dist/esm/banner/components/hero-banner/index.liquid.js +1 -1
- package/dist/esm/builder.js +4 -0
- 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 +147 -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/product/components/ProductBundleDiscountItem.liquid.js +3 -3
- package/dist/esm/product/components/ProductDescription/common.js +26 -0
- package/dist/esm/product/components/ProductDescription/const.js +3 -0
- package/dist/esm/product/components/ProductDescription.js +37 -10
- package/dist/esm/product/components/ProductDescription.liquid.js +3 -1
- package/dist/esm/third-party/components/EssentialAnnouncementBar.js +29 -0
- package/dist/esm/third-party/components/EssentialAnnouncementBar.liquid.js +8 -0
- package/dist/esm/third-party/components/EssentialCountdownTimerBar.js +29 -0
- package/dist/esm/third-party/components/EssentialCountdownTimerBar.liquid.js +8 -0
- package/dist/esm/third-party/configs/EssentialAnnouncementBar.js +8 -0
- package/dist/esm/third-party/configs/EssentialCountdownTimerBar.js +8 -0
- package/dist/esm/third-party/helpers/thirdParty.js +1 -1
- package/dist/esm/third-party/next.js +10 -0
- package/dist/esm/third-party/setting/EssentialAnnouncementBar.js +138 -0
- package/dist/esm/third-party/setting/EssentialCountdownTimerBar.js +138 -0
- package/dist/esm/third-party/setting/index.js +206 -202
- package/dist/types/index.d.ts +38 -1
- package/package.json +3 -3
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var core = require('@gem-sdk/core');
|
|
8
|
+
var ThirdPartyPreview = require('./ThirdPartyPreview.js');
|
|
9
|
+
var EssentialAnnouncementBar$1 = require('../configs/EssentialAnnouncementBar.js');
|
|
10
|
+
|
|
11
|
+
const EssentialAnnouncementBarContent = ()=>{
|
|
12
|
+
return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
13
|
+
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
14
|
+
className: "gp-p-2",
|
|
15
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(ThirdPartyPreview.default, {
|
|
16
|
+
setting: {
|
|
17
|
+
label: 'Essential Announcement Bar',
|
|
18
|
+
iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${EssentialAnnouncementBar$1.default.logoUrl}">`
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
const EssentialAnnouncementBar = ({ setting })=>{
|
|
25
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
26
|
+
style: {
|
|
27
|
+
...core.makeStyleResponsive('ta', setting?.align)
|
|
28
|
+
},
|
|
29
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(EssentialAnnouncementBarContent, {})
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
exports.default = EssentialAnnouncementBar;
|
|
@@ -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 EssentialAnnouncementBar = ({ setting, advanced })=>{
|
|
8
|
+
const { align, appBlockId } = setting ?? {};
|
|
9
|
+
return thirdParty.getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block `);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
exports.default = EssentialAnnouncementBar;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var core = require('@gem-sdk/core');
|
|
8
|
+
var ThirdPartyPreview = require('./ThirdPartyPreview.js');
|
|
9
|
+
var EssentialCountdownTimerBar$1 = require('../configs/EssentialCountdownTimerBar.js');
|
|
10
|
+
|
|
11
|
+
const EssentialCountdownTimerBarContent = ()=>{
|
|
12
|
+
return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
13
|
+
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
14
|
+
className: "gp-p-2",
|
|
15
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(ThirdPartyPreview.default, {
|
|
16
|
+
setting: {
|
|
17
|
+
label: 'Essential Countdown Timer Bar',
|
|
18
|
+
iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${EssentialCountdownTimerBar$1.default.logoUrl}">`
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
const EssentialCountdownTimerBar = ({ setting })=>{
|
|
25
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
26
|
+
style: {
|
|
27
|
+
...core.makeStyleResponsive('ta', setting?.align)
|
|
28
|
+
},
|
|
29
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(EssentialCountdownTimerBarContent, {})
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
exports.default = EssentialCountdownTimerBar;
|
|
@@ -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 EssentialCountdownTimerBar = ({ setting, advanced })=>{
|
|
8
|
+
const { align, appBlockId } = setting ?? {};
|
|
9
|
+
return thirdParty.getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block `);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
exports.default = EssentialCountdownTimerBar;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var AppConfig = {
|
|
6
|
+
id: 'essential-announcement-bar',
|
|
7
|
+
label: 'Essential Announcement Bar',
|
|
8
|
+
logoUrl: 'https://cdn.shopify.com/app-store/listing_images/15e8255158a042a1eab34a4c45c72aa5/icon/CMK1jPv9uoADEAE=.png',
|
|
9
|
+
tag: 'EssentialAnnouncementBar'
|
|
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: 'essential-countdown-timer-bar',
|
|
7
|
+
label: 'Essential Countdown Timer Bar',
|
|
8
|
+
logoUrl: 'https://cdn.shopify.com/app-store/listing_images/f84bf9e49eca8bd84c2af7488461363b/icon/CPzKxLTD4_UCEAE=.png',
|
|
9
|
+
tag: 'EssentialCountdownTimerBar'
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
exports.default = AppConfig;
|
|
@@ -39,7 +39,7 @@ const getLiquidForAppBlock = (appBlockId, align, cssClass)=>{
|
|
|
39
39
|
<div
|
|
40
40
|
class="gp-flex gp-w-full gp-items-center ${cssClass}"
|
|
41
41
|
style="${{
|
|
42
|
-
...core.makeStyleResponsive('
|
|
42
|
+
...core.makeStyleResponsive('jc', align)
|
|
43
43
|
}}"
|
|
44
44
|
>
|
|
45
45
|
{% for block in app_blocks %}
|
|
@@ -8,6 +8,14 @@ require('react/jsx-runtime');
|
|
|
8
8
|
require('react');
|
|
9
9
|
require('@gem-sdk/core');
|
|
10
10
|
|
|
11
|
+
const EssentialAnnouncementBar = dynamic(()=>Promise.resolve().then(function () { return require('./components/EssentialAnnouncementBar.js'); }), {
|
|
12
|
+
ssr: false,
|
|
13
|
+
loading: Loading.default
|
|
14
|
+
});
|
|
15
|
+
const EssentialCountdownTimerBar = dynamic(()=>Promise.resolve().then(function () { return require('./components/EssentialCountdownTimerBar.js'); }), {
|
|
16
|
+
ssr: false,
|
|
17
|
+
loading: Loading.default
|
|
18
|
+
});
|
|
11
19
|
const StellarDeliveryDatePickup = dynamic(()=>Promise.resolve().then(function () { return require('./components/StellarDeliveryDatePickup.js'); }), {
|
|
12
20
|
ssr: false,
|
|
13
21
|
loading: Loading.default
|
|
@@ -413,6 +421,8 @@ const Selleasy = dynamic(()=>Promise.resolve().then(function () { return require
|
|
|
413
421
|
loading: Loading.default
|
|
414
422
|
});
|
|
415
423
|
var thirdParty = {
|
|
424
|
+
EssentialAnnouncementBar,
|
|
425
|
+
EssentialCountdownTimerBar,
|
|
416
426
|
StellarDeliveryDatePickup,
|
|
417
427
|
TrustshopProductReviews,
|
|
418
428
|
HulkProductOptions,
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var EssentialAnnouncementBar = require('../configs/EssentialAnnouncementBar.js');
|
|
6
|
+
|
|
7
|
+
const config = {
|
|
8
|
+
tag: EssentialAnnouncementBar.default.tag,
|
|
9
|
+
label: EssentialAnnouncementBar.default.label,
|
|
10
|
+
icon: '<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="https://cdn.shopify.com/app-store/listing_images/15e8255158a042a1eab34a4c45c72aa5/icon/CMK1jPv9uoADEAE=.png">',
|
|
11
|
+
editorConfigs: {
|
|
12
|
+
component: {
|
|
13
|
+
isThirdParty: true
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
presets: [
|
|
17
|
+
{
|
|
18
|
+
id: EssentialAnnouncementBar.default.id,
|
|
19
|
+
name: {
|
|
20
|
+
en: EssentialAnnouncementBar.default.label
|
|
21
|
+
},
|
|
22
|
+
hideTextContent: true,
|
|
23
|
+
icon: {
|
|
24
|
+
desktop: `<div class="w-full flex flex-col items-center">
|
|
25
|
+
<img class="w-24 border border-dark-200 rounded-medium" src="https://cdn.shopify.com/app-store/listing_images/15e8255158a042a1eab34a4c45c72aa5/icon/CMK1jPv9uoADEAE=.png">
|
|
26
|
+
<span class="preset-item-title">Essential Announcement Bar</span>
|
|
27
|
+
</div>`
|
|
28
|
+
},
|
|
29
|
+
components: [
|
|
30
|
+
{
|
|
31
|
+
tag: EssentialAnnouncementBar.default.tag
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
settings: [
|
|
37
|
+
{
|
|
38
|
+
id: 'setting',
|
|
39
|
+
controls: [
|
|
40
|
+
{
|
|
41
|
+
id: 'appBlockId',
|
|
42
|
+
type: 'input',
|
|
43
|
+
default: ''
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: 'widgetType',
|
|
47
|
+
label: 'Choose widget',
|
|
48
|
+
type: 'select',
|
|
49
|
+
options: [
|
|
50
|
+
{
|
|
51
|
+
label: 'App Block',
|
|
52
|
+
value: 'app-block'
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
default: 'app-block'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: 'install',
|
|
59
|
+
type: 'open-link',
|
|
60
|
+
target: '_blank',
|
|
61
|
+
linkType: 'install',
|
|
62
|
+
href: 'https://apps.shopify.com/essential-announcement-bar?utm_source=gempages',
|
|
63
|
+
appName: EssentialAnnouncementBar.default.label
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 'announcementId',
|
|
67
|
+
type: 'input',
|
|
68
|
+
default: ''
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 'openApp',
|
|
72
|
+
type: 'open-link',
|
|
73
|
+
target: '_blank',
|
|
74
|
+
linkType: 'openApp',
|
|
75
|
+
href: 'https://admin.shopify.com/?redirect=/apps/essential-announcement-bar',
|
|
76
|
+
appName: EssentialAnnouncementBar.default.label
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: 'align',
|
|
80
|
+
label: 'Alignment',
|
|
81
|
+
type: 'segment',
|
|
82
|
+
options: [
|
|
83
|
+
{
|
|
84
|
+
label: 'Left',
|
|
85
|
+
value: 'left',
|
|
86
|
+
type: 'align'
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: 'Center',
|
|
90
|
+
value: 'center',
|
|
91
|
+
type: 'align'
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
label: 'Right',
|
|
95
|
+
value: 'right',
|
|
96
|
+
type: 'align'
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
devices: {
|
|
100
|
+
desktop: {
|
|
101
|
+
default: 'left'
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
ui: [
|
|
109
|
+
{
|
|
110
|
+
type: 'control',
|
|
111
|
+
setting: {
|
|
112
|
+
id: 'install'
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
type: 'control',
|
|
117
|
+
label: {
|
|
118
|
+
en: 'Announcement id'
|
|
119
|
+
},
|
|
120
|
+
setting: {
|
|
121
|
+
id: 'announcementId'
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: 'control',
|
|
126
|
+
setting: {
|
|
127
|
+
id: 'openApp'
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
type: 'control',
|
|
132
|
+
label: {
|
|
133
|
+
en: 'Align'
|
|
134
|
+
},
|
|
135
|
+
setting: {
|
|
136
|
+
id: 'align'
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
exports.default = config;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var EssentialCountdownTimerBar = require('../configs/EssentialCountdownTimerBar.js');
|
|
6
|
+
|
|
7
|
+
const config = {
|
|
8
|
+
tag: EssentialCountdownTimerBar.default.tag,
|
|
9
|
+
label: EssentialCountdownTimerBar.default.label,
|
|
10
|
+
icon: '<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="https://cdn.shopify.com/app-store/listing_images/f84bf9e49eca8bd84c2af7488461363b/icon/CPzKxLTD4_UCEAE=.png">',
|
|
11
|
+
editorConfigs: {
|
|
12
|
+
component: {
|
|
13
|
+
isThirdParty: true
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
presets: [
|
|
17
|
+
{
|
|
18
|
+
id: EssentialCountdownTimerBar.default.id,
|
|
19
|
+
name: {
|
|
20
|
+
en: EssentialCountdownTimerBar.default.label
|
|
21
|
+
},
|
|
22
|
+
hideTextContent: true,
|
|
23
|
+
icon: {
|
|
24
|
+
desktop: `<div class="w-full flex flex-col items-center">
|
|
25
|
+
<img class="w-24 border border-dark-200 rounded-medium" src="https://cdn.shopify.com/app-store/listing_images/f84bf9e49eca8bd84c2af7488461363b/icon/CPzKxLTD4_UCEAE=.png">
|
|
26
|
+
<span class="preset-item-title">Essential Countdown Timer Bar</span>
|
|
27
|
+
</div>`
|
|
28
|
+
},
|
|
29
|
+
components: [
|
|
30
|
+
{
|
|
31
|
+
tag: EssentialCountdownTimerBar.default.tag
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
settings: [
|
|
37
|
+
{
|
|
38
|
+
id: 'setting',
|
|
39
|
+
controls: [
|
|
40
|
+
{
|
|
41
|
+
id: 'appBlockId',
|
|
42
|
+
type: 'input',
|
|
43
|
+
default: ''
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: 'widgetType',
|
|
47
|
+
label: 'Choose widget',
|
|
48
|
+
type: 'select',
|
|
49
|
+
options: [
|
|
50
|
+
{
|
|
51
|
+
label: 'App Block',
|
|
52
|
+
value: 'app-block'
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
default: 'app-block'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: 'install',
|
|
59
|
+
type: 'open-link',
|
|
60
|
+
target: '_blank',
|
|
61
|
+
linkType: 'install',
|
|
62
|
+
href: 'https://apps.shopify.com/essential-countdown-timer?utm_source=gempages',
|
|
63
|
+
appName: EssentialCountdownTimerBar.default.label
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 'timerId',
|
|
67
|
+
type: 'input',
|
|
68
|
+
default: ''
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 'openApp',
|
|
72
|
+
type: 'open-link',
|
|
73
|
+
target: '_blank',
|
|
74
|
+
linkType: 'openApp',
|
|
75
|
+
href: 'https://admin.shopify.com/?redirect=/apps/countdown-timer-30',
|
|
76
|
+
appName: EssentialCountdownTimerBar.default.label
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: 'align',
|
|
80
|
+
label: 'Alignment',
|
|
81
|
+
type: 'segment',
|
|
82
|
+
options: [
|
|
83
|
+
{
|
|
84
|
+
label: 'Left',
|
|
85
|
+
value: 'left',
|
|
86
|
+
type: 'align'
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: 'Center',
|
|
90
|
+
value: 'center',
|
|
91
|
+
type: 'align'
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
label: 'Right',
|
|
95
|
+
value: 'right',
|
|
96
|
+
type: 'align'
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
devices: {
|
|
100
|
+
desktop: {
|
|
101
|
+
default: 'left'
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
ui: [
|
|
109
|
+
{
|
|
110
|
+
type: 'control',
|
|
111
|
+
setting: {
|
|
112
|
+
id: 'install'
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
type: 'control',
|
|
117
|
+
label: {
|
|
118
|
+
en: 'Timer id'
|
|
119
|
+
},
|
|
120
|
+
setting: {
|
|
121
|
+
id: 'timerId'
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: 'control',
|
|
126
|
+
setting: {
|
|
127
|
+
id: 'openApp'
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
type: 'control',
|
|
132
|
+
label: {
|
|
133
|
+
en: 'Align'
|
|
134
|
+
},
|
|
135
|
+
setting: {
|
|
136
|
+
id: 'align'
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
exports.default = config;
|
|
@@ -103,8 +103,12 @@ var MyappgurusProductReviews = require('./MyappgurusProductReviews.js');
|
|
|
103
103
|
var HulkProductOptions = require('./HulkProductOptions.js');
|
|
104
104
|
var TrustshopProductReviews = require('./TrustshopProductReviews.js');
|
|
105
105
|
var StellarDeliveryDatePickup = require('./StellarDeliveryDatePickup.js');
|
|
106
|
+
var EssentialCountdownTimerBar = require('./EssentialCountdownTimerBar.js');
|
|
107
|
+
var EssentialAnnouncementBar = require('./EssentialAnnouncementBar.js');
|
|
106
108
|
|
|
107
109
|
var thirdPartySetting = {
|
|
110
|
+
EssentialAnnouncementBar: EssentialAnnouncementBar.default,
|
|
111
|
+
EssentialCountdownTimerBar: EssentialCountdownTimerBar.default,
|
|
108
112
|
StellarDeliveryDatePickup: StellarDeliveryDatePickup.default,
|
|
109
113
|
TrustshopProductReviews: TrustshopProductReviews.default,
|
|
110
114
|
HulkProductOptions: HulkProductOptions.default,
|
|
@@ -262,7 +262,6 @@ const HeroBanner = ({ builderAttrs, builderProps, setting, styles, style, childr
|
|
|
262
262
|
}}">
|
|
263
263
|
<gp-hero-banner
|
|
264
264
|
gp-data='${dataStringify({
|
|
265
|
-
href: urlData?.href ?? '',
|
|
266
265
|
target: urlData?.target ?? '_blank',
|
|
267
266
|
background: backgroundResponsive,
|
|
268
267
|
uid: builderProps?.uid,
|
|
@@ -275,6 +274,7 @@ const HeroBanner = ({ builderAttrs, builderProps, setting, styles, style, childr
|
|
|
275
274
|
contentPosition2Col: styles?.contentPosition2Col,
|
|
276
275
|
aspectRatio: setting?.aspectRatio
|
|
277
276
|
}).replaceAll("'", ''')}'
|
|
277
|
+
gp-href="${urlData.href}"
|
|
278
278
|
${{
|
|
279
279
|
...builderAttrs
|
|
280
280
|
}}
|
package/dist/esm/builder.js
CHANGED
|
@@ -108,6 +108,8 @@ import MyappgurusProductReviews from './third-party/components/MyappgurusProduct
|
|
|
108
108
|
import HulkProductOptions from './third-party/components/HulkProductOptions.js';
|
|
109
109
|
import TrustshopProductReviews from './third-party/components/TrustshopProductReviews.js';
|
|
110
110
|
import StellarDeliveryDatePickup from './third-party/components/StellarDeliveryDatePickup.js';
|
|
111
|
+
import EssentialCountdownTimerBar from './third-party/components/EssentialCountdownTimerBar.js';
|
|
112
|
+
import EssentialAnnouncementBar from './third-party/components/EssentialAnnouncementBar.js';
|
|
111
113
|
import CartLineVariant from './cart/components/CartLineVariant.js';
|
|
112
114
|
import Cart from './cart/components/Cart.js';
|
|
113
115
|
import CartList from './cart/components/CartList.js';
|
|
@@ -244,6 +246,8 @@ import Link$1 from './post-purchase/link/components/PostPurchaseLink.js';
|
|
|
244
246
|
import Text$1 from './post-purchase/text/Text.js';
|
|
245
247
|
|
|
246
248
|
var builder = {
|
|
249
|
+
EssentialAnnouncementBar,
|
|
250
|
+
EssentialCountdownTimerBar,
|
|
247
251
|
StellarDeliveryDatePickup,
|
|
248
252
|
TrustshopProductReviews,
|
|
249
253
|
HulkProductOptions,
|
package/dist/esm/index.js
CHANGED
|
@@ -205,6 +205,8 @@ export { default as MyappgurusProductReviews } from './third-party/components/My
|
|
|
205
205
|
export { default as HulkProductOptions } from './third-party/components/HulkProductOptions.js';
|
|
206
206
|
export { default as TrustshopProductReviews } from './third-party/components/TrustshopProductReviews.js';
|
|
207
207
|
export { default as StellarDeliveryDatePickup } from './third-party/components/StellarDeliveryDatePickup.js';
|
|
208
|
+
export { default as EssentialCountdownTimerBar } from './third-party/components/EssentialCountdownTimerBar.js';
|
|
209
|
+
export { default as EssentialAnnouncementBar } from './third-party/components/EssentialAnnouncementBar.js';
|
|
208
210
|
export { default as thirdPartyInstantSetting } from './third-party-instant/setting/index.js';
|
|
209
211
|
export { default as InstantJudgemeReviews } from './third-party-instant/components/InstantJudgemeReviews.js';
|
|
210
212
|
export { default as InstantLooxReviews } from './third-party-instant/components/InstantLooxReviews.js';
|
package/dist/esm/index.liquid.js
CHANGED
|
@@ -159,6 +159,8 @@ export { default as DiscountyBulkDiscountSales } from './third-party/components/
|
|
|
159
159
|
export { default as TrustreviewsProductReviews } from './third-party/components/TrustreviewsProductReviews.liquid.js';
|
|
160
160
|
export { default as MyappgurusProductReviews } from './third-party/components/MyappgurusProductReviews.liquid.js';
|
|
161
161
|
export { default as HulkProductOptions } from './third-party/components/HulkProductOptions.liquid.js';
|
|
162
|
+
export { default as EssentialCountdownTimerBar } from './third-party/components/EssentialCountdownTimerBar.liquid.js';
|
|
163
|
+
export { default as EssentialAnnouncementBar } from './third-party/components/EssentialAnnouncementBar.liquid.js';
|
|
162
164
|
export { default as TrustshopProductReviews } from './third-party/components/TrustshopProductReviews.liquid.js';
|
|
163
165
|
export { default as StellarDeliveryDatePickup } from './third-party/components/StellarDeliveryDatePickup.liquid.js';
|
|
164
166
|
export { default as ImageComparison } from './image-comparison/components/ImageComparison.liquid.js';
|
|
@@ -2,26 +2,29 @@
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useProduct, useProductOfferDiscount, cls } from '@gem-sdk/core';
|
|
4
4
|
import Text from '../../text/Text.js';
|
|
5
|
+
import { useDynamicProduct } from '../hooks/useDynamicProduct.js';
|
|
5
6
|
|
|
6
7
|
const PostPurchaseProductDiscountTag = ({ setting = {}, styles = {}, style, builderAttrs, builderProps, children })=>{
|
|
7
8
|
const currentProduct = useProduct();
|
|
8
9
|
const currentProductId = currentProduct?.baseID?.replace('gid://shopify/Product/', '');
|
|
9
10
|
const currentOfferDiscount = useProductOfferDiscount();
|
|
11
|
+
const { isDynamicProduct, isEnableDynamicDiscount } = useDynamicProduct();
|
|
10
12
|
const { typo } = styles;
|
|
11
13
|
const { message } = setting;
|
|
14
|
+
const hasDiscount = !!currentOfferDiscount || isDynamicProduct && isEnableDynamicDiscount;
|
|
12
15
|
return /*#__PURE__*/ jsxs("div", {
|
|
13
16
|
...builderAttrs,
|
|
14
17
|
className: cls(builderProps?.uid, 'gp-flex gp-w-full'),
|
|
15
18
|
style: {
|
|
16
19
|
...style,
|
|
17
|
-
opacity:
|
|
20
|
+
opacity: hasDiscount ? 1 : 0.2
|
|
18
21
|
},
|
|
19
22
|
id: `shopify-text-element-${builderProps?.uid}`,
|
|
20
23
|
"data-product-id": currentProductId,
|
|
21
24
|
children: [
|
|
22
25
|
/*#__PURE__*/ jsx(Text, {
|
|
23
26
|
setting: {
|
|
24
|
-
text:
|
|
27
|
+
text: hasDiscount ? message : message?.replace(new RegExp(/\{\{Discount\}\}/, 'gi'), '0%')
|
|
25
28
|
},
|
|
26
29
|
styles: {
|
|
27
30
|
typo
|
|
@@ -8,14 +8,20 @@ import Loading from '../../../common/components/Loading.js';
|
|
|
8
8
|
import { DEVICES } from './ProductVariant.js';
|
|
9
9
|
import { postPurchaseViewSpacing } from '../../utils/helper.js';
|
|
10
10
|
import { hasPublicStoreFrontData, createStoreFrontFetcher } from '../helpers/index.js';
|
|
11
|
+
import { productOfferPlaceholder } from '../constants/ProductOfferPlaceholder.js';
|
|
12
|
+
import { useDynamicProduct } from '../hooks/useDynamicProduct.js';
|
|
11
13
|
|
|
12
14
|
const PostPurchaseProductOffer = ({ styles, builderAttrs, builderProps, children, setting })=>{
|
|
13
15
|
const mode = useEditorMode();
|
|
14
|
-
const { productSetting, productOfferLayout, inlineAlignment, variantSelected, ...rowSetting } = setting || {};
|
|
16
|
+
const { productSetting, productOfferLayout, inlineAlignment, variantSelected, discountAndShippingFee, ...rowSetting } = setting || {};
|
|
15
17
|
const { productOfferColumnGap, productOfferVerticalGutter, productOfferWidth, ...rowStyles } = styles || {};
|
|
16
18
|
const productOffers = usePageStore((s)=>s.productOffers);
|
|
17
19
|
const publicStoreFrontData = usePageStore((s)=>s.publicStoreFrontData);
|
|
18
|
-
const
|
|
20
|
+
const { isDynamicProduct } = useDynamicProduct();
|
|
21
|
+
const dynamicDiscountOffer = usePageStore((s)=>s.dynamicDiscountOffer);
|
|
22
|
+
const totalProduct = useMemo(()=>isDynamicProduct ? dynamicDiscountOffer?.appliedProductCount : productOffers?.length, [
|
|
23
|
+
dynamicDiscountOffer?.appliedProductCount,
|
|
24
|
+
isDynamicProduct,
|
|
19
25
|
productOffers?.length
|
|
20
26
|
]);
|
|
21
27
|
const sortedProductBaseIDs = useMemo(()=>{
|
|
@@ -41,7 +47,14 @@ const PostPurchaseProductOffer = ({ styles, builderAttrs, builderProps, children
|
|
|
41
47
|
const products = useMemo(()=>flattenConnection(productData.data?.products), [
|
|
42
48
|
productData.data?.products
|
|
43
49
|
]);
|
|
44
|
-
const productSortedById =
|
|
50
|
+
const productSortedById = useMemo(()=>{
|
|
51
|
+
return isDynamicProduct && dynamicDiscountOffer?.appliedProductCount ? Array(dynamicDiscountOffer.appliedProductCount).fill(productOfferPlaceholder) : sortedProductBaseIDs?.map((id)=>products?.find((el)=>el?.baseID === id)).filter(Boolean);
|
|
52
|
+
}, [
|
|
53
|
+
isDynamicProduct,
|
|
54
|
+
dynamicDiscountOffer?.appliedProductCount,
|
|
55
|
+
sortedProductBaseIDs,
|
|
56
|
+
products
|
|
57
|
+
]);
|
|
45
58
|
const getStyles = ()=>{
|
|
46
59
|
return {
|
|
47
60
|
...makeStyleResponsive('cg', productOfferColumnGap),
|
|
@@ -3,6 +3,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useCurrentVariant, useProduct, shopifyPriceRounding, useProductOfferDiscount, useFormatMoney, cls } from '@gem-sdk/core';
|
|
4
4
|
import { useMemo } from 'react';
|
|
5
5
|
import Text from '../../text/Text.js';
|
|
6
|
+
import { useDynamicProduct } from '../hooks/useDynamicProduct.js';
|
|
6
7
|
|
|
7
8
|
const PostPurchaseProductPrice = ({ styles, style, builderAttrs, builderProps, children })=>{
|
|
8
9
|
const currentVariant = useCurrentVariant();
|
|
@@ -10,6 +11,7 @@ const PostPurchaseProductPrice = ({ styles, style, builderAttrs, builderProps, c
|
|
|
10
11
|
const price = currentVariant?.price ?? 0;
|
|
11
12
|
const salePrice = currentVariant?.salePrice ?? 0;
|
|
12
13
|
const discount = parseFloat(shopifyPriceRounding(useProductOfferDiscount(), 2));
|
|
14
|
+
const { isDynamicProduct } = useDynamicProduct();
|
|
13
15
|
const priceShow = useMemo(()=>{
|
|
14
16
|
if (!discount) {
|
|
15
17
|
if (styles?.priceType === 'compare') {
|
|
@@ -50,7 +52,7 @@ const PostPurchaseProductPrice = ({ styles, style, builderAttrs, builderProps, c
|
|
|
50
52
|
/*#__PURE__*/ jsx(Text, {
|
|
51
53
|
styles: styles,
|
|
52
54
|
setting: {
|
|
53
|
-
text: moneyFormatted
|
|
55
|
+
text: isDynamicProduct ? '$???' : moneyFormatted
|
|
54
56
|
},
|
|
55
57
|
className: cls({
|
|
56
58
|
'gp-money': styles?.priceType === 'regular',
|