@gem-sdk/components 2.1.13-staging.3 → 2.1.14
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/article/components/ArticleList.liquid.js +4 -4
- package/dist/cjs/builder.js +1 -5
- package/dist/cjs/common/const.js +1 -1
- package/dist/cjs/image/components/Image.js +2 -22
- package/dist/cjs/index.js +0 -4
- package/dist/cjs/index.liquid.js +0 -4
- package/dist/cjs/text/components/Text.js +1 -0
- package/dist/cjs/third-party/components/BoostAISearchDiscovery.liquid.js +3 -1
- package/dist/cjs/third-party/next.js +1 -11
- package/dist/cjs/third-party/setting/BoostAISearchDiscovery.js +56 -3
- package/dist/cjs/third-party/setting/index.js +1 -5
- package/dist/esm/article/components/ArticleList.liquid.js +4 -4
- package/dist/esm/builder.js +1 -5
- package/dist/esm/common/const.js +1 -1
- package/dist/esm/image/components/Image.js +3 -23
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.liquid.js +0 -2
- package/dist/esm/text/components/Text.js +1 -0
- package/dist/esm/third-party/components/BoostAISearchDiscovery.liquid.js +3 -1
- package/dist/esm/third-party/next.js +1 -11
- package/dist/esm/third-party/setting/BoostAISearchDiscovery.js +56 -3
- package/dist/esm/third-party/setting/index.js +202 -206
- package/dist/types/index.d.ts +4 -35
- package/package.json +2 -2
- package/dist/cjs/image/components/NoDataImage.js +0 -133
- package/dist/cjs/third-party/components/HextomCountdownTimerBar.js +0 -32
- package/dist/cjs/third-party/components/HextomCountdownTimerBar.liquid.js +0 -12
- package/dist/cjs/third-party/components/TrustBadgesBear.js +0 -32
- package/dist/cjs/third-party/components/TrustBadgesBear.liquid.js +0 -12
- package/dist/cjs/third-party/configs/HextomCountdownTimerBar.js +0 -12
- package/dist/cjs/third-party/configs/TrustBadgesBear.js +0 -12
- package/dist/cjs/third-party/setting/HextomCountdownTimerBar.js +0 -128
- package/dist/cjs/third-party/setting/TrustBadgesBear.js +0 -128
- package/dist/esm/image/components/NoDataImage.js +0 -129
- package/dist/esm/third-party/components/HextomCountdownTimerBar.js +0 -28
- package/dist/esm/third-party/components/HextomCountdownTimerBar.liquid.js +0 -8
- package/dist/esm/third-party/components/TrustBadgesBear.js +0 -28
- package/dist/esm/third-party/components/TrustBadgesBear.liquid.js +0 -8
- package/dist/esm/third-party/configs/HextomCountdownTimerBar.js +0 -8
- package/dist/esm/third-party/configs/TrustBadgesBear.js +0 -8
- package/dist/esm/third-party/setting/HextomCountdownTimerBar.js +0 -124
- package/dist/esm/third-party/setting/TrustBadgesBear.js +0 -124
|
@@ -56,12 +56,12 @@ const ArticleList = ({ setting, styles, className, children, advanced, builderPr
|
|
|
56
56
|
assign all_articles = all_articles | concat: articleByHandle
|
|
57
57
|
endfor
|
|
58
58
|
else
|
|
59
|
-
assign
|
|
59
|
+
assign current_blog = blogs['${blogHandle}']
|
|
60
60
|
if gp_enable_custom_dynamic_blog == true
|
|
61
|
-
assign
|
|
61
|
+
assign current_blog = blog
|
|
62
62
|
endif
|
|
63
|
-
assign all_articles =
|
|
64
|
-
assign blogTitle =
|
|
63
|
+
assign all_articles = current_blog.articles | limit: limit | sort: "${articleOrderBy.replace('_REVERSE', '').toLowerCase()}" ${articleOrderBy.includes('_REVERSE') ? '| reverse' : ''}
|
|
64
|
+
assign blogTitle = current_blog.title
|
|
65
65
|
endif
|
|
66
66
|
|
|
67
67
|
%}
|
package/dist/cjs/builder.js
CHANGED
|
@@ -111,8 +111,6 @@ 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');
|
|
116
114
|
var CartLineVariant = require('./cart/components/CartLineVariant.js');
|
|
117
115
|
var Cart = require('./cart/components/Cart.js');
|
|
118
116
|
var CartList = require('./cart/components/CartList.js');
|
|
@@ -481,9 +479,7 @@ var builder = {
|
|
|
481
479
|
ArticleReadMore: ArticleReadMore.default,
|
|
482
480
|
Marquee: Marquee.default,
|
|
483
481
|
MarqueeItem: MarqueeItem.default,
|
|
484
|
-
ProductBadge: index$8.default
|
|
485
|
-
HextomCountdownTimerBar: HextomCountdownTimerBar.default,
|
|
486
|
-
TrustBadgesBear: TrustBadgesBear.default
|
|
482
|
+
ProductBadge: index$8.default
|
|
487
483
|
};
|
|
488
484
|
|
|
489
485
|
exports.default = builder;
|
package/dist/cjs/common/const.js
CHANGED
|
@@ -8,13 +8,10 @@ var Link = require('../../link/components/Link.js');
|
|
|
8
8
|
var AdaptiveImage = require('./AdaptiveImage.js');
|
|
9
9
|
var NextImage = require('./NextImage.js');
|
|
10
10
|
var helpers = require('./helpers.js');
|
|
11
|
-
var NoDataImage = require('./NoDataImage.js');
|
|
12
|
-
var React = require('react');
|
|
13
11
|
|
|
14
12
|
const Image = ({ styles, className, setting, builderAttrs, builderProps, style, children, onClick, onLoad })=>{
|
|
15
13
|
const { image, imageLink, srcSet, isNotLazyload } = setting ?? {};
|
|
16
14
|
const { customAspectRadio } = styles ?? {};
|
|
17
|
-
const currentDevice = core.useCurrentDevice();
|
|
18
15
|
const { shape } = styles ?? {};
|
|
19
16
|
const WrapLink = imageLink?.link ? Link.default : 'div';
|
|
20
17
|
const opacity = {
|
|
@@ -59,18 +56,6 @@ const Image = ({ styles, className, setting, builderAttrs, builderProps, style,
|
|
|
59
56
|
custom: customAspectRadio
|
|
60
57
|
})
|
|
61
58
|
};
|
|
62
|
-
const isShowNoDataState = React.useMemo(()=>{
|
|
63
|
-
if (setting?.disableNoDataState) return false;
|
|
64
|
-
if (currentDevice === 'mobile') return !setting?.srcSet?.mobile?.src && !setting?.srcSet?.tablet?.src && !setting?.srcSet?.desktop?.src;
|
|
65
|
-
if (currentDevice === 'tablet') return !setting?.srcSet?.tablet?.src && !setting?.srcSet?.desktop?.src;
|
|
66
|
-
return !setting?.srcSet?.desktop?.src;
|
|
67
|
-
}, [
|
|
68
|
-
currentDevice,
|
|
69
|
-
setting?.disableNoDataState,
|
|
70
|
-
setting?.srcSet?.desktop?.src,
|
|
71
|
-
setting?.srcSet?.mobile?.src,
|
|
72
|
-
setting?.srcSet?.tablet?.src
|
|
73
|
-
]);
|
|
74
59
|
return /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
75
60
|
...builderAttrs,
|
|
76
61
|
"data-id": builderProps?.uid,
|
|
@@ -99,15 +84,10 @@ const Image = ({ styles, className, setting, builderAttrs, builderProps, style,
|
|
|
99
84
|
...core.makeStyleResponsive('jc', styles?.align)
|
|
100
85
|
},
|
|
101
86
|
children: [
|
|
102
|
-
|
|
103
|
-
style: {
|
|
104
|
-
...imageWidth,
|
|
105
|
-
...imageHeight
|
|
106
|
-
}
|
|
107
|
-
}) : setting?.isAdaptive ? /*#__PURE__*/ jsxRuntime.jsx(AdaptiveImage.default, {
|
|
87
|
+
setting?.isAdaptive ? /*#__PURE__*/ jsxRuntime.jsx(AdaptiveImage.default, {
|
|
108
88
|
srcSet: setting.srcSet,
|
|
109
89
|
pictureClass: "gp-contents",
|
|
110
|
-
className: core.cls(className, 'gp-
|
|
90
|
+
className: core.cls(className, 'gp-w-full gp-max-w-full', core.handleConvertClassColor(styles?.borderImg)),
|
|
111
91
|
alt: setting.alt,
|
|
112
92
|
style: {
|
|
113
93
|
...imageWidth,
|
package/dist/cjs/index.js
CHANGED
|
@@ -207,8 +207,6 @@ 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');
|
|
212
210
|
var index$x = require('./third-party-instant/setting/index.js');
|
|
213
211
|
var InstantJudgemeReviews = require('./third-party-instant/components/InstantJudgemeReviews.js');
|
|
214
212
|
var InstantLooxReviews = require('./third-party-instant/components/InstantLooxReviews.js');
|
|
@@ -511,8 +509,6 @@ exports.TrustreviewsProductReviews = TrustreviewsProductReviews.default;
|
|
|
511
509
|
exports.MyappgurusProductReviews = MyappgurusProductReviews.default;
|
|
512
510
|
exports.HulkProductOptions = HulkProductOptions.default;
|
|
513
511
|
exports.TrustshopProductReviews = TrustshopProductReviews.default;
|
|
514
|
-
exports.HextomCountdownTimerBar = HextomCountdownTimerBar.default;
|
|
515
|
-
exports.TrustBadgesBear = TrustBadgesBear.default;
|
|
516
512
|
exports.thirdPartyInstantSetting = index$x.default;
|
|
517
513
|
exports.InstantJudgemeReviews = InstantJudgemeReviews.default;
|
|
518
514
|
exports.InstantLooxReviews = InstantLooxReviews.default;
|
package/dist/cjs/index.liquid.js
CHANGED
|
@@ -161,8 +161,6 @@ 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');
|
|
166
164
|
var TrustshopProductReviews_liquid = require('./third-party/components/TrustshopProductReviews.liquid.js');
|
|
167
165
|
var ImageComparison_liquid = require('./image-comparison/components/ImageComparison.liquid.js');
|
|
168
166
|
var ThirdPartySlot_liquid = require('./third-party-slot/components/ThirdPartySlot.liquid.js');
|
|
@@ -347,8 +345,6 @@ exports.SeoantTrustBadgesIcon = SeoantTrustBadgesIcon_liquid.default;
|
|
|
347
345
|
exports.TrustreviewsProductReviews = TrustreviewsProductReviews_liquid.default;
|
|
348
346
|
exports.MyappgurusProductReviews = MyappgurusProductReviews_liquid.default;
|
|
349
347
|
exports.HulkProductOptions = HulkProductOptions_liquid.default;
|
|
350
|
-
exports.HextomCountdownTimerBar = HextomCountdownTimerBar_liquid.default;
|
|
351
|
-
exports.TrustBadgesBear = TrustBadgesBear_liquid.default;
|
|
352
348
|
exports.TrustshopProductReviews = TrustshopProductReviews_liquid.default;
|
|
353
349
|
exports.ImageComparison = ImageComparison_liquid.default;
|
|
354
350
|
exports.ThirdPartySlot = ThirdPartySlot_liquid.default;
|
|
@@ -9,6 +9,7 @@ var React = require('react');
|
|
|
9
9
|
const Text = /*#__PURE__*/ React.forwardRef(({ styles, builderAttrs, style, setting, advanced, builderProps, className, children, ...props }, ref)=>{
|
|
10
10
|
const { text, htmlTag: Element = 'div', options, tagWidth, excludeFlex } = setting ?? {};
|
|
11
11
|
const composeGlobalSize = core.makeGlobalSize(setting?.globalSize);
|
|
12
|
+
console.log('Text: ', text);
|
|
12
13
|
const mode = core.useEditorMode();
|
|
13
14
|
const getPlaceHolderWhenContentNone = ()=>{
|
|
14
15
|
let classList = '';
|
|
@@ -4,9 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var core = require('@gem-sdk/core');
|
|
6
6
|
var helpers = require('../../helpers.js');
|
|
7
|
+
var thirdParty = require('../helpers/thirdParty.js');
|
|
7
8
|
|
|
8
9
|
const BoostAISearchDiscovery = ({ setting, advanced })=>{
|
|
9
|
-
|
|
10
|
+
const { appBlockId, widgetType, align } = setting ?? {};
|
|
11
|
+
return widgetType ? thirdParty.getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block [&_*]:gp-max-w-none`) : core.template`
|
|
10
12
|
<div
|
|
11
13
|
class="${advanced?.cssClass}"
|
|
12
14
|
style="${{
|
|
@@ -410,14 +410,6 @@ 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
|
-
});
|
|
421
413
|
var thirdParty = {
|
|
422
414
|
TrustshopProductReviews,
|
|
423
415
|
HulkProductOptions,
|
|
@@ -519,9 +511,7 @@ var thirdParty = {
|
|
|
519
511
|
Releasit,
|
|
520
512
|
RequestQuoteHidePrice,
|
|
521
513
|
BirdChime,
|
|
522
|
-
FordeerProductLabels
|
|
523
|
-
HextomCountdownTimerBar,
|
|
524
|
-
TrustBadgesBear
|
|
514
|
+
FordeerProductLabels
|
|
525
515
|
};
|
|
526
516
|
|
|
527
517
|
exports.default = thirdParty;
|
|
@@ -11,9 +11,6 @@ const config = {
|
|
|
11
11
|
editorConfigs: {
|
|
12
12
|
component: {
|
|
13
13
|
isThirdParty: true
|
|
14
|
-
},
|
|
15
|
-
placeholder: {
|
|
16
|
-
flowPage: 'GP_COLLECTION'
|
|
17
14
|
}
|
|
18
15
|
},
|
|
19
16
|
presets: [
|
|
@@ -42,6 +39,11 @@ const config = {
|
|
|
42
39
|
{
|
|
43
40
|
id: 'setting',
|
|
44
41
|
controls: [
|
|
42
|
+
{
|
|
43
|
+
id: 'appBlockId',
|
|
44
|
+
type: 'input',
|
|
45
|
+
default: ''
|
|
46
|
+
},
|
|
45
47
|
{
|
|
46
48
|
id: 'install',
|
|
47
49
|
type: 'open-link',
|
|
@@ -50,6 +52,33 @@ const config = {
|
|
|
50
52
|
href: 'https://apps.shopify.com/product-filter-search?utm_source=gempages',
|
|
51
53
|
appName: BoostAISearchDiscovery.default.label
|
|
52
54
|
},
|
|
55
|
+
{
|
|
56
|
+
id: 'widgetType',
|
|
57
|
+
label: 'Choose widget',
|
|
58
|
+
type: 'select',
|
|
59
|
+
default: 'filter-product-list-ssr',
|
|
60
|
+
options: [
|
|
61
|
+
{
|
|
62
|
+
label: 'Product & Filter',
|
|
63
|
+
value: 'filter-product-list-ssr',
|
|
64
|
+
hideOnPage: [
|
|
65
|
+
'ARTICLE',
|
|
66
|
+
'BLOG',
|
|
67
|
+
'COLLECTION',
|
|
68
|
+
'GP_ARTICLE',
|
|
69
|
+
'GP_BLOG',
|
|
70
|
+
'GP_PRODUCT',
|
|
71
|
+
'GP_INDEX',
|
|
72
|
+
'GP_STATIC',
|
|
73
|
+
'STATIC'
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: 'Recommendation',
|
|
78
|
+
value: 'recommendation-ssr'
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
53
82
|
{
|
|
54
83
|
id: 'openApp',
|
|
55
84
|
type: 'open-link',
|
|
@@ -58,6 +87,11 @@ const config = {
|
|
|
58
87
|
href: 'https://admin.shopify.com/?redirect=/apps/product-filter-search',
|
|
59
88
|
appName: BoostAISearchDiscovery.default.label
|
|
60
89
|
},
|
|
90
|
+
{
|
|
91
|
+
id: 'widgetID',
|
|
92
|
+
type: 'input',
|
|
93
|
+
default: ''
|
|
94
|
+
},
|
|
61
95
|
{
|
|
62
96
|
id: 'align',
|
|
63
97
|
label: 'Alignment',
|
|
@@ -95,6 +129,25 @@ const config = {
|
|
|
95
129
|
id: 'install'
|
|
96
130
|
}
|
|
97
131
|
},
|
|
132
|
+
{
|
|
133
|
+
type: 'control',
|
|
134
|
+
label: {
|
|
135
|
+
en: 'Choose widget'
|
|
136
|
+
},
|
|
137
|
+
setting: {
|
|
138
|
+
id: 'widgetType'
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
type: 'control',
|
|
143
|
+
label: {
|
|
144
|
+
en: 'Widget ID'
|
|
145
|
+
},
|
|
146
|
+
setting: {
|
|
147
|
+
id: 'widgetID'
|
|
148
|
+
},
|
|
149
|
+
condition: 'widgetType === "recommendation-ssr"'
|
|
150
|
+
},
|
|
98
151
|
{
|
|
99
152
|
type: 'control',
|
|
100
153
|
setting: {
|
|
@@ -103,11 +103,8 @@ var TrustreviewsProductReviews = require('./TrustreviewsProductReviews.js');
|
|
|
103
103
|
var MyappgurusProductReviews = require('./MyappgurusProductReviews.js');
|
|
104
104
|
var HulkProductOptions = require('./HulkProductOptions.js');
|
|
105
105
|
var TrustshopProductReviews = require('./TrustshopProductReviews.js');
|
|
106
|
-
var HextomCountdownTimerBar = require('./HextomCountdownTimerBar.js');
|
|
107
|
-
var TrustBadgesBear = require('./TrustBadgesBear.js');
|
|
108
106
|
|
|
109
107
|
var index = {
|
|
110
|
-
HextomCountdownTimerBar: HextomCountdownTimerBar.default,
|
|
111
108
|
TrustshopProductReviews: TrustshopProductReviews.default,
|
|
112
109
|
HulkProductOptions: HulkProductOptions.default,
|
|
113
110
|
TrustreviewsProductReviews: TrustreviewsProductReviews.default,
|
|
@@ -208,8 +205,7 @@ var index = {
|
|
|
208
205
|
KingProductOptions: KingProductOptions.default,
|
|
209
206
|
RequestQuoteHidePrice: RequestQuoteHidePrice.default,
|
|
210
207
|
BirdChime: BirdChime.default,
|
|
211
|
-
FordeerProductLabels: FordeerProductLabels.default
|
|
212
|
-
TrustBadgesBear: TrustBadgesBear.default
|
|
208
|
+
FordeerProductLabels: FordeerProductLabels.default
|
|
213
209
|
};
|
|
214
210
|
|
|
215
211
|
exports.default = index;
|
|
@@ -52,12 +52,12 @@ const ArticleList = ({ setting, styles, className, children, advanced, builderPr
|
|
|
52
52
|
assign all_articles = all_articles | concat: articleByHandle
|
|
53
53
|
endfor
|
|
54
54
|
else
|
|
55
|
-
assign
|
|
55
|
+
assign current_blog = blogs['${blogHandle}']
|
|
56
56
|
if gp_enable_custom_dynamic_blog == true
|
|
57
|
-
assign
|
|
57
|
+
assign current_blog = blog
|
|
58
58
|
endif
|
|
59
|
-
assign all_articles =
|
|
60
|
-
assign blogTitle =
|
|
59
|
+
assign all_articles = current_blog.articles | limit: limit | sort: "${articleOrderBy.replace('_REVERSE', '').toLowerCase()}" ${articleOrderBy.includes('_REVERSE') ? '| reverse' : ''}
|
|
60
|
+
assign blogTitle = current_blog.title
|
|
61
61
|
endif
|
|
62
62
|
|
|
63
63
|
%}
|
package/dist/esm/builder.js
CHANGED
|
@@ -107,8 +107,6 @@ import TrustreviewsProductReviews from './third-party/components/TrustreviewsPro
|
|
|
107
107
|
import MyappgurusProductReviews from './third-party/components/MyappgurusProductReviews.js';
|
|
108
108
|
import HulkProductOptions from './third-party/components/HulkProductOptions.js';
|
|
109
109
|
import TrustshopProductReviews from './third-party/components/TrustshopProductReviews.js';
|
|
110
|
-
import HextomCountdownTimerBar from './third-party/components/HextomCountdownTimerBar.js';
|
|
111
|
-
import TrustBadgesBear from './third-party/components/TrustBadgesBear.js';
|
|
112
110
|
import CartLineVariant from './cart/components/CartLineVariant.js';
|
|
113
111
|
import Cart from './cart/components/Cart.js';
|
|
114
112
|
import CartList from './cart/components/CartList.js';
|
|
@@ -477,9 +475,7 @@ var builder = {
|
|
|
477
475
|
ArticleReadMore,
|
|
478
476
|
Marquee,
|
|
479
477
|
MarqueeItem,
|
|
480
|
-
ProductBadge
|
|
481
|
-
HextomCountdownTimerBar,
|
|
482
|
-
TrustBadgesBear
|
|
478
|
+
ProductBadge
|
|
483
479
|
};
|
|
484
480
|
|
|
485
481
|
export { builder as default };
|
package/dist/esm/common/const.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { makeStyleResponsive, getWidthByShapeGlobalSize, makeWidth, getHeightByShapeGlobalSize, cls, getStyleShadowState, handleConvertClassColor, getBorderStyle, getBorderRadiusStyle, getStyleShadow, getAspectRatioGlobalSize, getGlobalColorStateClass, getGlobalColorStateStyle, makeStyleState, getCornerCSSFromGlobal } from '@gem-sdk/core';
|
|
3
3
|
import Link from '../../link/components/Link.js';
|
|
4
4
|
import AdaptiveImage from './AdaptiveImage.js';
|
|
5
5
|
import NextImage from './NextImage.js';
|
|
6
6
|
import { composeAspectRatio } from './helpers.js';
|
|
7
|
-
import NoDataImage from './NoDataImage.js';
|
|
8
|
-
import { useMemo } from 'react';
|
|
9
7
|
|
|
10
8
|
const Image = ({ styles, className, setting, builderAttrs, builderProps, style, children, onClick, onLoad })=>{
|
|
11
9
|
const { image, imageLink, srcSet, isNotLazyload } = setting ?? {};
|
|
12
10
|
const { customAspectRadio } = styles ?? {};
|
|
13
|
-
const currentDevice = useCurrentDevice();
|
|
14
11
|
const { shape } = styles ?? {};
|
|
15
12
|
const WrapLink = imageLink?.link ? Link : 'div';
|
|
16
13
|
const opacity = {
|
|
@@ -55,18 +52,6 @@ const Image = ({ styles, className, setting, builderAttrs, builderProps, style,
|
|
|
55
52
|
custom: customAspectRadio
|
|
56
53
|
})
|
|
57
54
|
};
|
|
58
|
-
const isShowNoDataState = useMemo(()=>{
|
|
59
|
-
if (setting?.disableNoDataState) return false;
|
|
60
|
-
if (currentDevice === 'mobile') return !setting?.srcSet?.mobile?.src && !setting?.srcSet?.tablet?.src && !setting?.srcSet?.desktop?.src;
|
|
61
|
-
if (currentDevice === 'tablet') return !setting?.srcSet?.tablet?.src && !setting?.srcSet?.desktop?.src;
|
|
62
|
-
return !setting?.srcSet?.desktop?.src;
|
|
63
|
-
}, [
|
|
64
|
-
currentDevice,
|
|
65
|
-
setting?.disableNoDataState,
|
|
66
|
-
setting?.srcSet?.desktop?.src,
|
|
67
|
-
setting?.srcSet?.mobile?.src,
|
|
68
|
-
setting?.srcSet?.tablet?.src
|
|
69
|
-
]);
|
|
70
55
|
return /*#__PURE__*/ jsxs("div", {
|
|
71
56
|
...builderAttrs,
|
|
72
57
|
"data-id": builderProps?.uid,
|
|
@@ -95,15 +80,10 @@ const Image = ({ styles, className, setting, builderAttrs, builderProps, style,
|
|
|
95
80
|
...makeStyleResponsive('jc', styles?.align)
|
|
96
81
|
},
|
|
97
82
|
children: [
|
|
98
|
-
|
|
99
|
-
style: {
|
|
100
|
-
...imageWidth,
|
|
101
|
-
...imageHeight
|
|
102
|
-
}
|
|
103
|
-
}) : setting?.isAdaptive ? /*#__PURE__*/ jsx(AdaptiveImage, {
|
|
83
|
+
setting?.isAdaptive ? /*#__PURE__*/ jsx(AdaptiveImage, {
|
|
104
84
|
srcSet: setting.srcSet,
|
|
105
85
|
pictureClass: "gp-contents",
|
|
106
|
-
className: cls(className, 'gp-
|
|
86
|
+
className: cls(className, 'gp-w-full gp-max-w-full', handleConvertClassColor(styles?.borderImg)),
|
|
107
87
|
alt: setting.alt,
|
|
108
88
|
style: {
|
|
109
89
|
...imageWidth,
|
package/dist/esm/index.js
CHANGED
|
@@ -205,8 +205,6 @@ export { default as TrustreviewsProductReviews } from './third-party/components/
|
|
|
205
205
|
export { default as MyappgurusProductReviews } from './third-party/components/MyappgurusProductReviews.js';
|
|
206
206
|
export { default as HulkProductOptions } from './third-party/components/HulkProductOptions.js';
|
|
207
207
|
export { default as TrustshopProductReviews } from './third-party/components/TrustshopProductReviews.js';
|
|
208
|
-
export { default as HextomCountdownTimerBar } from './third-party/components/HextomCountdownTimerBar.js';
|
|
209
|
-
export { default as TrustBadgesBear } from './third-party/components/TrustBadgesBear.js';
|
|
210
208
|
export { default as thirdPartyInstantSetting } from './third-party-instant/setting/index.js';
|
|
211
209
|
export { default as InstantJudgemeReviews } from './third-party-instant/components/InstantJudgemeReviews.js';
|
|
212
210
|
export { default as InstantLooxReviews } from './third-party-instant/components/InstantLooxReviews.js';
|
package/dist/esm/index.liquid.js
CHANGED
|
@@ -159,8 +159,6 @@ export { default as SeoantTrustBadgesIcon } from './third-party/components/Seoan
|
|
|
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 HextomCountdownTimerBar } from './third-party/components/HextomCountdownTimerBar.liquid.js';
|
|
163
|
-
export { default as TrustBadgesBear } from './third-party/components/TrustBadgesBear.liquid.js';
|
|
164
162
|
export { default as TrustshopProductReviews } from './third-party/components/TrustshopProductReviews.liquid.js';
|
|
165
163
|
export { default as ImageComparison } from './image-comparison/components/ImageComparison.liquid.js';
|
|
166
164
|
export { default as ThirdPartySlot } from './third-party-slot/components/ThirdPartySlot.liquid.js';
|
|
@@ -5,6 +5,7 @@ import { forwardRef, useMemo } from 'react';
|
|
|
5
5
|
const Text = /*#__PURE__*/ forwardRef(({ styles, builderAttrs, style, setting, advanced, builderProps, className, children, ...props }, ref)=>{
|
|
6
6
|
const { text, htmlTag: Element = 'div', options, tagWidth, excludeFlex } = setting ?? {};
|
|
7
7
|
const composeGlobalSize = makeGlobalSize(setting?.globalSize);
|
|
8
|
+
console.log('Text: ', text);
|
|
8
9
|
const mode = useEditorMode();
|
|
9
10
|
const getPlaceHolderWhenContentNone = ()=>{
|
|
10
11
|
let classList = '';
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { template, makeStyleResponsive, RenderIf, isLocalEnv, baseAssetURL } from '@gem-sdk/core';
|
|
2
2
|
import { getSettingPreloadData } from '../../helpers.js';
|
|
3
|
+
import { getLiquidForAppBlock } from '../helpers/thirdParty.js';
|
|
3
4
|
|
|
4
5
|
const BoostAISearchDiscovery = ({ setting, advanced })=>{
|
|
5
|
-
|
|
6
|
+
const { appBlockId, widgetType, align } = setting ?? {};
|
|
7
|
+
return widgetType ? getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block [&_*]:gp-max-w-none`) : template`
|
|
6
8
|
<div
|
|
7
9
|
class="${advanced?.cssClass}"
|
|
8
10
|
style="${{
|
|
@@ -406,14 +406,6 @@ const Selleasy = dynamic(()=>import('./components/Selleasy.js'), {
|
|
|
406
406
|
ssr: false,
|
|
407
407
|
loading: Loading
|
|
408
408
|
});
|
|
409
|
-
const HextomCountdownTimerBar = dynamic(()=>import('./components/HextomCountdownTimerBar.js'), {
|
|
410
|
-
ssr: false,
|
|
411
|
-
loading: Loading
|
|
412
|
-
});
|
|
413
|
-
const TrustBadgesBear = dynamic(()=>import('./components/TrustBadgesBear.js'), {
|
|
414
|
-
ssr: false,
|
|
415
|
-
loading: Loading
|
|
416
|
-
});
|
|
417
409
|
var thirdParty = {
|
|
418
410
|
TrustshopProductReviews,
|
|
419
411
|
HulkProductOptions,
|
|
@@ -515,9 +507,7 @@ var thirdParty = {
|
|
|
515
507
|
Releasit,
|
|
516
508
|
RequestQuoteHidePrice,
|
|
517
509
|
BirdChime,
|
|
518
|
-
FordeerProductLabels
|
|
519
|
-
HextomCountdownTimerBar,
|
|
520
|
-
TrustBadgesBear
|
|
510
|
+
FordeerProductLabels
|
|
521
511
|
};
|
|
522
512
|
|
|
523
513
|
export { thirdParty as default };
|
|
@@ -7,9 +7,6 @@ const config = {
|
|
|
7
7
|
editorConfigs: {
|
|
8
8
|
component: {
|
|
9
9
|
isThirdParty: true
|
|
10
|
-
},
|
|
11
|
-
placeholder: {
|
|
12
|
-
flowPage: 'GP_COLLECTION'
|
|
13
10
|
}
|
|
14
11
|
},
|
|
15
12
|
presets: [
|
|
@@ -38,6 +35,11 @@ const config = {
|
|
|
38
35
|
{
|
|
39
36
|
id: 'setting',
|
|
40
37
|
controls: [
|
|
38
|
+
{
|
|
39
|
+
id: 'appBlockId',
|
|
40
|
+
type: 'input',
|
|
41
|
+
default: ''
|
|
42
|
+
},
|
|
41
43
|
{
|
|
42
44
|
id: 'install',
|
|
43
45
|
type: 'open-link',
|
|
@@ -46,6 +48,33 @@ const config = {
|
|
|
46
48
|
href: 'https://apps.shopify.com/product-filter-search?utm_source=gempages',
|
|
47
49
|
appName: BoostAISearchDiscovery.label
|
|
48
50
|
},
|
|
51
|
+
{
|
|
52
|
+
id: 'widgetType',
|
|
53
|
+
label: 'Choose widget',
|
|
54
|
+
type: 'select',
|
|
55
|
+
default: 'filter-product-list-ssr',
|
|
56
|
+
options: [
|
|
57
|
+
{
|
|
58
|
+
label: 'Product & Filter',
|
|
59
|
+
value: 'filter-product-list-ssr',
|
|
60
|
+
hideOnPage: [
|
|
61
|
+
'ARTICLE',
|
|
62
|
+
'BLOG',
|
|
63
|
+
'COLLECTION',
|
|
64
|
+
'GP_ARTICLE',
|
|
65
|
+
'GP_BLOG',
|
|
66
|
+
'GP_PRODUCT',
|
|
67
|
+
'GP_INDEX',
|
|
68
|
+
'GP_STATIC',
|
|
69
|
+
'STATIC'
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: 'Recommendation',
|
|
74
|
+
value: 'recommendation-ssr'
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
49
78
|
{
|
|
50
79
|
id: 'openApp',
|
|
51
80
|
type: 'open-link',
|
|
@@ -54,6 +83,11 @@ const config = {
|
|
|
54
83
|
href: 'https://admin.shopify.com/?redirect=/apps/product-filter-search',
|
|
55
84
|
appName: BoostAISearchDiscovery.label
|
|
56
85
|
},
|
|
86
|
+
{
|
|
87
|
+
id: 'widgetID',
|
|
88
|
+
type: 'input',
|
|
89
|
+
default: ''
|
|
90
|
+
},
|
|
57
91
|
{
|
|
58
92
|
id: 'align',
|
|
59
93
|
label: 'Alignment',
|
|
@@ -91,6 +125,25 @@ const config = {
|
|
|
91
125
|
id: 'install'
|
|
92
126
|
}
|
|
93
127
|
},
|
|
128
|
+
{
|
|
129
|
+
type: 'control',
|
|
130
|
+
label: {
|
|
131
|
+
en: 'Choose widget'
|
|
132
|
+
},
|
|
133
|
+
setting: {
|
|
134
|
+
id: 'widgetType'
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
type: 'control',
|
|
139
|
+
label: {
|
|
140
|
+
en: 'Widget ID'
|
|
141
|
+
},
|
|
142
|
+
setting: {
|
|
143
|
+
id: 'widgetID'
|
|
144
|
+
},
|
|
145
|
+
condition: 'widgetType === "recommendation-ssr"'
|
|
146
|
+
},
|
|
94
147
|
{
|
|
95
148
|
type: 'control',
|
|
96
149
|
setting: {
|