@gem-sdk/components 2.0.0-dev.619 → 2.0.0-dev.620
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/HeroBanner.js +3 -1
- package/dist/cjs/banner/components/HeroBanner.liquid.js +2 -1
- package/dist/cjs/banner/components/common/common.js +12 -0
- package/dist/cjs/banner/setting/presets/heroBanner1ColPreSalesPage.js +1 -3
- package/dist/cjs/banner/setting/presets/heroBannerContentLeftPreSalesPage.js +1 -3
- package/dist/cjs/banner/setting/presets/heroBannerContentRightPreSalesPage.js +1 -3
- package/dist/cjs/banner/setting/presets/heroBannerParallaxPreSalesPage.js +1 -3
- package/dist/cjs/banner/setting/presets/heroBannerVideoPreSalesPage.js +1 -3
- package/dist/cjs/button/components/common/helpers.js +9 -2
- package/dist/cjs/button/setting/Button.js +2 -6
- package/dist/cjs/image/components/common/attributes.js +9 -0
- package/dist/cjs/image/setting/configs/presets.js +2 -6
- package/dist/esm/banner/components/HeroBanner.js +3 -1
- package/dist/esm/banner/components/HeroBanner.liquid.js +3 -2
- package/dist/esm/banner/components/common/common.js +12 -1
- package/dist/esm/banner/setting/presets/heroBanner1ColPreSalesPage.js +1 -3
- package/dist/esm/banner/setting/presets/heroBannerContentLeftPreSalesPage.js +1 -3
- package/dist/esm/banner/setting/presets/heroBannerContentRightPreSalesPage.js +1 -3
- package/dist/esm/banner/setting/presets/heroBannerParallaxPreSalesPage.js +1 -3
- package/dist/esm/banner/setting/presets/heroBannerVideoPreSalesPage.js +1 -3
- package/dist/esm/button/components/common/helpers.js +9 -2
- package/dist/esm/button/setting/Button.js +2 -6
- package/dist/esm/image/components/common/attributes.js +9 -0
- package/dist/esm/image/setting/configs/presets.js +2 -6
- package/package.json +1 -1
|
@@ -11,11 +11,13 @@ var getClasses = require('./common/getClasses.js');
|
|
|
11
11
|
var system = require('@gem-sdk/system');
|
|
12
12
|
var core = require('@gem-sdk/core');
|
|
13
13
|
var useHeroBanner = require('./hooks/useHeroBanner.js');
|
|
14
|
+
var common = require('./common/common.js');
|
|
14
15
|
|
|
15
16
|
const HeroBanner = (props)=>{
|
|
16
17
|
const { builderAttrs, builderProps, setting, styles, style, children, advanced, enableLazyloadImage = true } = props;
|
|
17
18
|
const mode = core.useEditorMode();
|
|
18
|
-
const {
|
|
19
|
+
const { enableLink } = setting ?? {};
|
|
20
|
+
const link = common.getBannerLink(setting);
|
|
19
21
|
const { cssClass } = advanced ?? {};
|
|
20
22
|
const currentDevice = core.useCurrentDevice();
|
|
21
23
|
const { elementRef, transform, onMouseEnterParallax, onMouseLeaveParallax, dataVideo, bgRef, isShowVideoHtml5, openLinkBanner, layoutResponsive } = useHeroBanner.useHeroBanner(styles, setting, currentDevice);
|
|
@@ -13,7 +13,8 @@ var common = require('./common/common.js');
|
|
|
13
13
|
|
|
14
14
|
const HeroBanner = (props)=>{
|
|
15
15
|
const { builderAttrs, builderProps, setting, styles, style, children, advanced, enableLazyloadImage = true } = props;
|
|
16
|
-
const {
|
|
16
|
+
const { enableLink } = setting ?? {};
|
|
17
|
+
const link = common.getBannerLink(setting);
|
|
17
18
|
const { cssClass } = advanced ?? {};
|
|
18
19
|
const { urlData } = helpers.getInsertLinkData('', link);
|
|
19
20
|
const stateDataHeroBanner = system.createStateOrContext({
|
|
@@ -456,6 +456,17 @@ function debounce(func, wait) {
|
|
|
456
456
|
};
|
|
457
457
|
}
|
|
458
458
|
const fallbackImg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+';
|
|
459
|
+
const getBannerLink = (setting)=>{
|
|
460
|
+
const link = setting?.link;
|
|
461
|
+
if (link?.type === 'go-to-sales-page') {
|
|
462
|
+
return {
|
|
463
|
+
type: 'go-to-sales-page',
|
|
464
|
+
link: '{{ page.metafields.sales_funnel.sales_page_url }}',
|
|
465
|
+
target: '_self'
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
return link;
|
|
469
|
+
};
|
|
459
470
|
|
|
460
471
|
exports.bgiEnableByDevice = bgiEnableByDevice;
|
|
461
472
|
exports.debounce = debounce;
|
|
@@ -463,6 +474,7 @@ exports.fallbackImg = fallbackImg;
|
|
|
463
474
|
exports.getAspectRatioSettings = getAspectRatioSettings;
|
|
464
475
|
exports.getAttachmentDevice = getAttachmentDevice;
|
|
465
476
|
exports.getBackgroundImageHeroBanner = getBackgroundImageHeroBanner;
|
|
477
|
+
exports.getBannerLink = getBannerLink;
|
|
466
478
|
exports.getBgImage = getBgImage;
|
|
467
479
|
exports.getClassAlignBanner = getClassAlignBanner;
|
|
468
480
|
exports.getClassContentPosition = getClassContentPosition;
|
|
@@ -38,9 +38,7 @@ const heroBannerParallaxPreSalesPage = {
|
|
|
38
38
|
enableParallax: true,
|
|
39
39
|
speedParallax: 0.6,
|
|
40
40
|
link: {
|
|
41
|
-
type: 'go-to-sales-page'
|
|
42
|
-
link: '{{ page.metafields.sales_funnel.sales_page_url }}',
|
|
43
|
-
target: '_self'
|
|
41
|
+
type: 'go-to-sales-page'
|
|
44
42
|
}
|
|
45
43
|
},
|
|
46
44
|
styles: {
|
|
@@ -88,7 +88,8 @@ const getInsertLinkData = ({ setting, htmlType, defaultTag, enableBtnLink, isLiq
|
|
|
88
88
|
if (URL_START_WITH.find((el)=>urlHref.startsWith(el))) return true;
|
|
89
89
|
return false;
|
|
90
90
|
};
|
|
91
|
-
const
|
|
91
|
+
const linkedToSalesPage = helpers.isLinkedToSalesPage(setting?.type);
|
|
92
|
+
const shouldRenderLink = enableBtnLink ? isDomain || isShopifyDomain || isLink() || isHomePageHref || linkedToSalesPage : false;
|
|
92
93
|
let transformedUrl = urlHref;
|
|
93
94
|
if (isLiquid && (isShopifyDomain || isHomePageHref)) {
|
|
94
95
|
transformedUrl = setting?.isTranslate ? '$locationOrigin' + urlHref : "{{ request.origin }}{{ routes.root_url | split: '/' | join: '/' }}" + urlHref;
|
|
@@ -101,12 +102,18 @@ const getInsertLinkData = ({ setting, htmlType, defaultTag, enableBtnLink, isLiq
|
|
|
101
102
|
rel: 'nofollow'
|
|
102
103
|
}
|
|
103
104
|
};
|
|
104
|
-
|
|
105
|
+
let urlData = shouldRenderLink ? baseUrlData : isHyperlink ? {
|
|
105
106
|
...baseUrlData,
|
|
106
107
|
type: htmlType
|
|
107
108
|
} : {
|
|
108
109
|
type: htmlType
|
|
109
110
|
};
|
|
111
|
+
if (linkedToSalesPage) {
|
|
112
|
+
urlData = {
|
|
113
|
+
href: '{{ page.metafields.sales_funnel.sales_page_url }}',
|
|
114
|
+
target: '_self'
|
|
115
|
+
};
|
|
116
|
+
}
|
|
110
117
|
return {
|
|
111
118
|
HTMLTag,
|
|
112
119
|
urlData,
|
|
@@ -121,9 +121,7 @@ const config = {
|
|
|
121
121
|
},
|
|
122
122
|
settings: {
|
|
123
123
|
btnLink: {
|
|
124
|
-
type: 'go-to-sales-page'
|
|
125
|
-
link: '{{ page.metafields.sales_funnel.sales_page_url }}',
|
|
126
|
-
target: '_self'
|
|
124
|
+
type: 'go-to-sales-page'
|
|
127
125
|
},
|
|
128
126
|
enableBtnLink: true
|
|
129
127
|
}
|
|
@@ -152,9 +150,7 @@ const config = {
|
|
|
152
150
|
iconAlign: 'left',
|
|
153
151
|
iconSvg: '<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" className="w-6 h-6" viewBox="0 0 512 512" fill="currentColor"> <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M115.584 494.176c-12.352 6.336 -26.368 -4.768 -23.872 -18.944l26.56 -151.36L5.536 216.48c-10.528 -10.048 -5.056 -28.416 9.056 -30.4l156.736 -22.272L241.216 25.344c6.304 -12.48 23.36 -12.48 29.664 0l69.888 138.464 156.736 22.272c14.112 1.984 19.584 20.352 9.024 30.4l-112.704 107.392 26.56 151.36c2.496 14.176 -11.52 25.28 -23.872 18.944L256 421.984l-140.448 72.192z" /></svg>',
|
|
154
152
|
btnLink: {
|
|
155
|
-
type: 'go-to-sales-page'
|
|
156
|
-
link: '{{ page.metafields.sales_funnel.sales_page_url }}',
|
|
157
|
-
target: '_self'
|
|
153
|
+
type: 'go-to-sales-page'
|
|
158
154
|
},
|
|
159
155
|
enableBtnLink: true
|
|
160
156
|
},
|
|
@@ -22,6 +22,15 @@ const getLinkWrapperAttrs = ({ urlData, imageLink, title, isLiquid = false })=>{
|
|
|
22
22
|
setting: urlData,
|
|
23
23
|
title
|
|
24
24
|
};
|
|
25
|
+
if (imageLink?.type === 'go-to-sales-page') {
|
|
26
|
+
return {
|
|
27
|
+
...attributes,
|
|
28
|
+
setting: {
|
|
29
|
+
href: '{{ page.metafields.sales_funnel.sales_page_url }}',
|
|
30
|
+
target: '_self'
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
25
34
|
return imageLink?.link ? attributes : {};
|
|
26
35
|
};
|
|
27
36
|
const getImageLiquidAttrs = ({ pageContext, enableLazyLoadImage = false })=>{
|
|
@@ -185,9 +185,7 @@ const ImagePreset = [
|
|
|
185
185
|
},
|
|
186
186
|
settings: {
|
|
187
187
|
imageLink: {
|
|
188
|
-
type: 'go-to-sales-page'
|
|
189
|
-
link: '{{ page.metafields.sales_funnel.sales_page_url }}',
|
|
190
|
-
target: '_self'
|
|
188
|
+
type: 'go-to-sales-page'
|
|
191
189
|
}
|
|
192
190
|
}
|
|
193
191
|
}
|
|
@@ -245,9 +243,7 @@ const ImagePreset = [
|
|
|
245
243
|
settings: {
|
|
246
244
|
imageStyle: 'circle',
|
|
247
245
|
imageLink: {
|
|
248
|
-
type: 'go-to-sales-page'
|
|
249
|
-
link: '{{ page.metafields.sales_funnel.sales_page_url }}',
|
|
250
|
-
target: '_self'
|
|
246
|
+
type: 'go-to-sales-page'
|
|
251
247
|
}
|
|
252
248
|
},
|
|
253
249
|
styles: {
|
|
@@ -7,11 +7,13 @@ import { getClasses, getLinkClasses } from './common/getClasses.js';
|
|
|
7
7
|
import { createAttr, createStyle, createClass, If } from '@gem-sdk/system';
|
|
8
8
|
import { useEditorMode, useCurrentDevice, filterToolbarPreview } from '@gem-sdk/core';
|
|
9
9
|
import { useHeroBanner } from './hooks/useHeroBanner.js';
|
|
10
|
+
import { getBannerLink } from './common/common.js';
|
|
10
11
|
|
|
11
12
|
const HeroBanner = (props)=>{
|
|
12
13
|
const { builderAttrs, builderProps, setting, styles, style, children, advanced, enableLazyloadImage = true } = props;
|
|
13
14
|
const mode = useEditorMode();
|
|
14
|
-
const {
|
|
15
|
+
const { enableLink } = setting ?? {};
|
|
16
|
+
const link = getBannerLink(setting);
|
|
15
17
|
const { cssClass } = advanced ?? {};
|
|
16
18
|
const currentDevice = useCurrentDevice();
|
|
17
19
|
const { elementRef, transform, onMouseEnterParallax, onMouseLeaveParallax, dataVideo, bgRef, isShowVideoHtml5, openLinkBanner, layoutResponsive } = useHeroBanner(styles, setting, currentDevice);
|
|
@@ -5,11 +5,12 @@ import { getClasses, getLinkClasses } from './common/getClasses.js';
|
|
|
5
5
|
import { createStateOrContext, createAttr, createStyle, createClass, If } from '@gem-sdk/system';
|
|
6
6
|
import { template, dataStringify, RenderIf, isLocalEnv, baseAssetURL } from '@gem-sdk/core';
|
|
7
7
|
import { getInsertLinkData, getSettingPreloadData } from '../../helpers.js';
|
|
8
|
-
import { getResponsiveSetting } from './common/common.js';
|
|
8
|
+
import { getResponsiveSetting, getBannerLink } from './common/common.js';
|
|
9
9
|
|
|
10
10
|
const HeroBanner = (props)=>{
|
|
11
11
|
const { builderAttrs, builderProps, setting, styles, style, children, advanced, enableLazyloadImage = true } = props;
|
|
12
|
-
const {
|
|
12
|
+
const { enableLink } = setting ?? {};
|
|
13
|
+
const link = getBannerLink(setting);
|
|
13
14
|
const { cssClass } = advanced ?? {};
|
|
14
15
|
const { urlData } = getInsertLinkData('', link);
|
|
15
16
|
const stateDataHeroBanner = createStateOrContext({
|
|
@@ -454,5 +454,16 @@ function debounce(func, wait) {
|
|
|
454
454
|
};
|
|
455
455
|
}
|
|
456
456
|
const fallbackImg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+';
|
|
457
|
+
const getBannerLink = (setting)=>{
|
|
458
|
+
const link = setting?.link;
|
|
459
|
+
if (link?.type === 'go-to-sales-page') {
|
|
460
|
+
return {
|
|
461
|
+
type: 'go-to-sales-page',
|
|
462
|
+
link: '{{ page.metafields.sales_funnel.sales_page_url }}',
|
|
463
|
+
target: '_self'
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
return link;
|
|
467
|
+
};
|
|
457
468
|
|
|
458
|
-
export { bgiEnableByDevice, debounce, fallbackImg, getAspectRatioSettings, getAttachmentDevice, getBackgroundImageHeroBanner, getBgImage, getClassAlignBanner, getClassContentPosition, getClassForContentByFitContent, getClassForStretchContent, getClassSpaceBetween, getClipPath, getContentPosition, getDataVideoHeroBannerResponsive, getDisplayStyleByFitContent, getEnableBgImageByDevice, getPercentageVisible, getResponsiveSetting, getStyleAspectRatioHeroBannerCustom, getStyleHeroBannerBg, getVisibilityStyle, getWidth, horizontalAlign, imagePlaceholder, isScaleImage, mapContentPositionToHorizontal, scrollToContentBanner, showVideoType };
|
|
469
|
+
export { bgiEnableByDevice, debounce, fallbackImg, getAspectRatioSettings, getAttachmentDevice, getBackgroundImageHeroBanner, getBannerLink, getBgImage, getClassAlignBanner, getClassContentPosition, getClassForContentByFitContent, getClassForStretchContent, getClassSpaceBetween, getClipPath, getContentPosition, getDataVideoHeroBannerResponsive, getDisplayStyleByFitContent, getEnableBgImageByDevice, getPercentageVisible, getResponsiveSetting, getStyleAspectRatioHeroBannerCustom, getStyleHeroBannerBg, getVisibilityStyle, getWidth, horizontalAlign, imagePlaceholder, isScaleImage, mapContentPositionToHorizontal, scrollToContentBanner, showVideoType };
|
|
@@ -36,9 +36,7 @@ const heroBannerParallaxPreSalesPage = {
|
|
|
36
36
|
enableParallax: true,
|
|
37
37
|
speedParallax: 0.6,
|
|
38
38
|
link: {
|
|
39
|
-
type: 'go-to-sales-page'
|
|
40
|
-
link: '{{ page.metafields.sales_funnel.sales_page_url }}',
|
|
41
|
-
target: '_self'
|
|
39
|
+
type: 'go-to-sales-page'
|
|
42
40
|
}
|
|
43
41
|
},
|
|
44
42
|
styles: {
|
|
@@ -86,7 +86,8 @@ const getInsertLinkData = ({ setting, htmlType, defaultTag, enableBtnLink, isLiq
|
|
|
86
86
|
if (URL_START_WITH.find((el)=>urlHref.startsWith(el))) return true;
|
|
87
87
|
return false;
|
|
88
88
|
};
|
|
89
|
-
const
|
|
89
|
+
const linkedToSalesPage = isLinkedToSalesPage(setting?.type);
|
|
90
|
+
const shouldRenderLink = enableBtnLink ? isDomain || isShopifyDomain || isLink() || isHomePageHref || linkedToSalesPage : false;
|
|
90
91
|
let transformedUrl = urlHref;
|
|
91
92
|
if (isLiquid && (isShopifyDomain || isHomePageHref)) {
|
|
92
93
|
transformedUrl = setting?.isTranslate ? '$locationOrigin' + urlHref : "{{ request.origin }}{{ routes.root_url | split: '/' | join: '/' }}" + urlHref;
|
|
@@ -99,12 +100,18 @@ const getInsertLinkData = ({ setting, htmlType, defaultTag, enableBtnLink, isLiq
|
|
|
99
100
|
rel: 'nofollow'
|
|
100
101
|
}
|
|
101
102
|
};
|
|
102
|
-
|
|
103
|
+
let urlData = shouldRenderLink ? baseUrlData : isHyperlink ? {
|
|
103
104
|
...baseUrlData,
|
|
104
105
|
type: htmlType
|
|
105
106
|
} : {
|
|
106
107
|
type: htmlType
|
|
107
108
|
};
|
|
109
|
+
if (linkedToSalesPage) {
|
|
110
|
+
urlData = {
|
|
111
|
+
href: '{{ page.metafields.sales_funnel.sales_page_url }}',
|
|
112
|
+
target: '_self'
|
|
113
|
+
};
|
|
114
|
+
}
|
|
108
115
|
return {
|
|
109
116
|
HTMLTag,
|
|
110
117
|
urlData,
|
|
@@ -117,9 +117,7 @@ const config = {
|
|
|
117
117
|
},
|
|
118
118
|
settings: {
|
|
119
119
|
btnLink: {
|
|
120
|
-
type: 'go-to-sales-page'
|
|
121
|
-
link: '{{ page.metafields.sales_funnel.sales_page_url }}',
|
|
122
|
-
target: '_self'
|
|
120
|
+
type: 'go-to-sales-page'
|
|
123
121
|
},
|
|
124
122
|
enableBtnLink: true
|
|
125
123
|
}
|
|
@@ -148,9 +146,7 @@ const config = {
|
|
|
148
146
|
iconAlign: 'left',
|
|
149
147
|
iconSvg: '<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" className="w-6 h-6" viewBox="0 0 512 512" fill="currentColor"> <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M115.584 494.176c-12.352 6.336 -26.368 -4.768 -23.872 -18.944l26.56 -151.36L5.536 216.48c-10.528 -10.048 -5.056 -28.416 9.056 -30.4l156.736 -22.272L241.216 25.344c6.304 -12.48 23.36 -12.48 29.664 0l69.888 138.464 156.736 22.272c14.112 1.984 19.584 20.352 9.024 30.4l-112.704 107.392 26.56 151.36c2.496 14.176 -11.52 25.28 -23.872 18.944L256 421.984l-140.448 72.192z" /></svg>',
|
|
150
148
|
btnLink: {
|
|
151
|
-
type: 'go-to-sales-page'
|
|
152
|
-
link: '{{ page.metafields.sales_funnel.sales_page_url }}',
|
|
153
|
-
target: '_self'
|
|
149
|
+
type: 'go-to-sales-page'
|
|
154
150
|
},
|
|
155
151
|
enableBtnLink: true
|
|
156
152
|
},
|
|
@@ -20,6 +20,15 @@ const getLinkWrapperAttrs = ({ urlData, imageLink, title, isLiquid = false })=>{
|
|
|
20
20
|
setting: urlData,
|
|
21
21
|
title
|
|
22
22
|
};
|
|
23
|
+
if (imageLink?.type === 'go-to-sales-page') {
|
|
24
|
+
return {
|
|
25
|
+
...attributes,
|
|
26
|
+
setting: {
|
|
27
|
+
href: '{{ page.metafields.sales_funnel.sales_page_url }}',
|
|
28
|
+
target: '_self'
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
23
32
|
return imageLink?.link ? attributes : {};
|
|
24
33
|
};
|
|
25
34
|
const getImageLiquidAttrs = ({ pageContext, enableLazyLoadImage = false })=>{
|
|
@@ -183,9 +183,7 @@ const ImagePreset = [
|
|
|
183
183
|
},
|
|
184
184
|
settings: {
|
|
185
185
|
imageLink: {
|
|
186
|
-
type: 'go-to-sales-page'
|
|
187
|
-
link: '{{ page.metafields.sales_funnel.sales_page_url }}',
|
|
188
|
-
target: '_self'
|
|
186
|
+
type: 'go-to-sales-page'
|
|
189
187
|
}
|
|
190
188
|
}
|
|
191
189
|
}
|
|
@@ -243,9 +241,7 @@ const ImagePreset = [
|
|
|
243
241
|
settings: {
|
|
244
242
|
imageStyle: 'circle',
|
|
245
243
|
imageLink: {
|
|
246
|
-
type: 'go-to-sales-page'
|
|
247
|
-
link: '{{ page.metafields.sales_funnel.sales_page_url }}',
|
|
248
|
-
target: '_self'
|
|
244
|
+
type: 'go-to-sales-page'
|
|
249
245
|
}
|
|
250
246
|
},
|
|
251
247
|
styles: {
|