@gem-sdk/components 2.0.0-dev.700 → 2.0.0-dev.701
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/button/components/Button.js +4 -1
- package/dist/cjs/carousel/carousel-item/common/getClass.js +1 -1
- package/dist/cjs/grid/row/commons/getClass.js +1 -1
- package/dist/cjs/grid/row/commons/getStyle.js +2 -1
- package/dist/cjs/grid/row/setting/configs/settings.js +21 -0
- package/dist/cjs/grid/row/setting/configs/uiV2.js +10 -4
- package/dist/cjs/helpers.js +31 -1
- package/dist/cjs/icon-list-v2/components/IconList.liquid.js +1 -0
- package/dist/cjs/image/components/Image.js +1 -1
- package/dist/cjs/image/components/Image.liquid.js +1 -1
- package/dist/cjs/image/components/common/classes.js +3 -1
- package/dist/cjs/image/helpers/getSrcSet.js +2 -1
- package/dist/cjs/image/setting/configs/settings.js +9 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/post-purchase/product/components/product-offer/common/classes.js +5 -1
- package/dist/cjs/product/components/ProductBundle/common/styles.js +2 -2
- package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +1 -1
- package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.liquid.js +1 -1
- package/dist/cjs/product/components/ProductBundle/setting/ProductBundleDiscount.js +2 -8
- package/dist/cjs/product/components/ProductImagesV2/common/common.js +1 -1
- package/dist/cjs/product/components/ProductVariants/index.liquid.js +8 -3
- package/dist/cjs/product/setting/constant/bundle-layout/horizontalThree.js +4 -6
- package/dist/cjs/product/setting/constant/bundle-layout/horizontalTwo.js +3 -5
- package/dist/cjs/product/setting/constant/bundle-layout/verticalThree.js +2 -1
- package/dist/cjs/product/setting/constant/bundle-layout/verticalTwo.js +2 -1
- package/dist/cjs/stock-counter/components/common/getContent.js +1 -1
- package/dist/cjs/text/components/Text.liquid.js +1 -0
- package/dist/cjs/text/components/common/getDisplayText.js +11 -20
- package/dist/cjs/third-party/components/EcomsendBackInStockAlert.liquid.js +8 -8
- package/dist/cjs/third-party/components/ProductOptionsVariantOption.js +2 -2
- package/dist/cjs/third-party/components/ProductOptionsVariantOption.liquid.js +2 -2
- package/dist/cjs/third-party/components/UnlimitedBundlesDiscounts.liquid.js +1 -1
- package/dist/cjs/third-party/configs/EcoboostifyShoppableReelUgc.js +1 -1
- package/dist/cjs/third-party/configs/NotifyBackInStockPreOrder.js +1 -1
- package/dist/cjs/third-party/setting/EcoboostifyShoppableReelUgc/index.js +2 -2
- package/dist/cjs/third-party/setting/EcomsendBackInStockAlert/index.js +5 -0
- package/dist/cjs/third-party/setting/EcomsendBackInStockAlert/uiV1.js +14 -0
- package/dist/cjs/third-party/setting/EcomsendBackInStockAlert/uiV2.js +31 -0
- package/dist/cjs/third-party/setting/FlyBundlesUpsellsFbt/uiV1.js +5 -0
- package/dist/cjs/third-party/setting/NotifyBackInStockPreOrder/index.js +2 -2
- package/dist/cjs/third-party/setting/ProductOptionsVariantOption/index.js +1 -7
- package/dist/cjs/third-party/setting/ProductOptionsVariantOption/uiV1.js +0 -9
- package/dist/cjs/third-party/setting/ProductOptionsVariantOption/uiV2.js +0 -30
- package/dist/cjs/third-party/setting/RequestQuoteHidePrice/index.js +2 -1
- package/dist/cjs/third-party/setting/UnlimitedBundlesDiscounts/index.js +5 -1
- package/dist/cjs/third-party/setting/UnlimitedBundlesDiscounts/uiV1.js +9 -0
- package/dist/cjs/third-party/setting/UnlimitedBundlesDiscounts/uiV2.js +12 -0
- package/dist/esm/button/components/Button.js +4 -1
- package/dist/esm/carousel/carousel-item/common/getClass.js +1 -1
- package/dist/esm/grid/row/commons/getClass.js +1 -1
- package/dist/esm/grid/row/commons/getStyle.js +2 -1
- package/dist/esm/grid/row/setting/configs/settings.js +21 -0
- package/dist/esm/grid/row/setting/configs/uiV2.js +10 -4
- package/dist/esm/helpers.js +30 -2
- package/dist/esm/icon-list-v2/components/IconList.liquid.js +1 -0
- package/dist/esm/image/components/Image.js +1 -1
- package/dist/esm/image/components/Image.liquid.js +1 -1
- package/dist/esm/image/components/common/classes.js +4 -2
- package/dist/esm/image/helpers/getSrcSet.js +2 -1
- package/dist/esm/image/setting/configs/settings.js +9 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/common/classes.js +5 -1
- package/dist/esm/product/components/ProductBundle/common/styles.js +2 -2
- package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +1 -1
- package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.liquid.js +1 -1
- package/dist/esm/product/components/ProductBundle/setting/ProductBundleDiscount.js +2 -8
- package/dist/esm/product/components/ProductImagesV2/common/common.js +1 -1
- package/dist/esm/product/components/ProductVariants/index.liquid.js +8 -3
- package/dist/esm/product/setting/constant/bundle-layout/horizontalThree.js +4 -6
- package/dist/esm/product/setting/constant/bundle-layout/horizontalTwo.js +3 -5
- package/dist/esm/product/setting/constant/bundle-layout/verticalThree.js +2 -1
- package/dist/esm/product/setting/constant/bundle-layout/verticalTwo.js +2 -1
- package/dist/esm/stock-counter/components/common/getContent.js +1 -1
- package/dist/esm/text/components/Text.liquid.js +1 -0
- package/dist/esm/text/components/common/getDisplayText.js +12 -21
- package/dist/esm/third-party/components/EcomsendBackInStockAlert.liquid.js +8 -8
- package/dist/esm/third-party/components/ProductOptionsVariantOption.js +2 -2
- package/dist/esm/third-party/components/ProductOptionsVariantOption.liquid.js +2 -2
- package/dist/esm/third-party/components/UnlimitedBundlesDiscounts.liquid.js +1 -1
- package/dist/esm/third-party/configs/EcoboostifyShoppableReelUgc.js +1 -1
- package/dist/esm/third-party/configs/NotifyBackInStockPreOrder.js +1 -1
- package/dist/esm/third-party/setting/EcoboostifyShoppableReelUgc/index.js +2 -2
- package/dist/esm/third-party/setting/EcomsendBackInStockAlert/index.js +5 -0
- package/dist/esm/third-party/setting/EcomsendBackInStockAlert/uiV1.js +14 -0
- package/dist/esm/third-party/setting/EcomsendBackInStockAlert/uiV2.js +31 -0
- package/dist/esm/third-party/setting/FlyBundlesUpsellsFbt/uiV1.js +5 -0
- package/dist/esm/third-party/setting/NotifyBackInStockPreOrder/index.js +2 -2
- package/dist/esm/third-party/setting/ProductOptionsVariantOption/index.js +1 -7
- package/dist/esm/third-party/setting/ProductOptionsVariantOption/uiV1.js +0 -9
- package/dist/esm/third-party/setting/ProductOptionsVariantOption/uiV2.js +0 -30
- package/dist/esm/third-party/setting/RequestQuoteHidePrice/index.js +2 -1
- package/dist/esm/third-party/setting/UnlimitedBundlesDiscounts/index.js +5 -1
- package/dist/esm/third-party/setting/UnlimitedBundlesDiscounts/uiV1.js +9 -0
- package/dist/esm/third-party/setting/UnlimitedBundlesDiscounts/uiV2.js +12 -0
- package/dist/types/index.d.ts +5 -1
- package/package.json +2 -2
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var AppConfig = {
|
|
6
6
|
id: 'ecoboostify-shoppable-reel-ugc',
|
|
7
7
|
label: 'EcoBoostify Shoppable Reel UGC',
|
|
8
|
-
logoUrl: 'https://cdn.shopify.com/app-store/listing_images/cdbdfc53291cf8d2908e72deae77f94e/icon/
|
|
8
|
+
logoUrl: 'https://cdn.shopify.com/app-store/listing_images/cdbdfc53291cf8d2908e72deae77f94e/icon/COuT9MaKvosDEAE=.png?width=22&height=22',
|
|
9
9
|
tag: 'EcoboostifyShoppableReelUgc'
|
|
10
10
|
};
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var AppConfig = {
|
|
6
6
|
id: 'notify-back-in-stockpreorder',
|
|
7
7
|
label: 'Notify! Back in Stock|PreOrder',
|
|
8
|
-
logoUrl: 'https://cdn.shopify.com/
|
|
8
|
+
logoUrl: 'https://cdn.shopify.com/s/files/1/0643/0497/1949/files/Notify_Me_Logo.png?v=1736234550',
|
|
9
9
|
tag: 'NotifyBackInStockPreOrder'
|
|
10
10
|
};
|
|
11
11
|
|
|
@@ -9,7 +9,7 @@ var uiV2 = require('./uiV2.js');
|
|
|
9
9
|
const config = {
|
|
10
10
|
tag: EcoboostifyShoppableReelUgc.default.tag,
|
|
11
11
|
label: EcoboostifyShoppableReelUgc.default.label,
|
|
12
|
-
icon: '<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="https://cdn.shopify.com/app-store/listing_images/cdbdfc53291cf8d2908e72deae77f94e/icon/
|
|
12
|
+
icon: '<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="https://cdn.shopify.com/app-store/listing_images/cdbdfc53291cf8d2908e72deae77f94e/icon/COuT9MaKvosDEAE=.png?width=22&height=22">',
|
|
13
13
|
editorConfigs: {
|
|
14
14
|
component: {
|
|
15
15
|
isThirdParty: true
|
|
@@ -24,7 +24,7 @@ const config = {
|
|
|
24
24
|
hideTextContent: true,
|
|
25
25
|
icon: {
|
|
26
26
|
desktop: `<div class="w-full flex flex-col items-center">
|
|
27
|
-
<img class="w-24 border border-dark-200 rounded-medium" src="https://cdn.shopify.com/app-store/listing_images/cdbdfc53291cf8d2908e72deae77f94e/icon/
|
|
27
|
+
<img class="w-24 border border-dark-200 rounded-medium" src="https://cdn.shopify.com/app-store/listing_images/cdbdfc53291cf8d2908e72deae77f94e/icon/COuT9MaKvosDEAE=.png?width=22&height=22">
|
|
28
28
|
<span class="preset-item-title">EcoBoostify Shoppable Reel UGC</span>
|
|
29
29
|
</div>`
|
|
30
30
|
},
|
|
@@ -15,6 +15,20 @@ const SettingUIV1 = [
|
|
|
15
15
|
id: 'openApp'
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
+
{
|
|
19
|
+
type: 'control',
|
|
20
|
+
setting: {
|
|
21
|
+
id: 'productId'
|
|
22
|
+
},
|
|
23
|
+
label: {
|
|
24
|
+
en: 'Product ID'
|
|
25
|
+
},
|
|
26
|
+
options: {
|
|
27
|
+
hideOnPages: [
|
|
28
|
+
'GP_PRODUCT'
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
18
32
|
{
|
|
19
33
|
type: 'control',
|
|
20
34
|
label: {
|
|
@@ -23,6 +23,37 @@ const SettingUIV2 = [
|
|
|
23
23
|
}
|
|
24
24
|
]
|
|
25
25
|
},
|
|
26
|
+
{
|
|
27
|
+
controls: [
|
|
28
|
+
{
|
|
29
|
+
type: 'combo',
|
|
30
|
+
label: {
|
|
31
|
+
en: 'Product ID'
|
|
32
|
+
},
|
|
33
|
+
conditionDisplay: 'pageType != "GP_PRODUCT"',
|
|
34
|
+
iconName: 'polaris-text-block',
|
|
35
|
+
getValueFromSettingID: 'productId',
|
|
36
|
+
isHideClear: true,
|
|
37
|
+
popoverLabel: {
|
|
38
|
+
en: 'Product ID'
|
|
39
|
+
},
|
|
40
|
+
controls: [
|
|
41
|
+
{
|
|
42
|
+
label: {
|
|
43
|
+
en: 'Content'
|
|
44
|
+
},
|
|
45
|
+
options: {
|
|
46
|
+
fullWidth: true
|
|
47
|
+
},
|
|
48
|
+
layout: 'vertical',
|
|
49
|
+
setting: {
|
|
50
|
+
id: 'productId'
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
26
57
|
{
|
|
27
58
|
controls: [
|
|
28
59
|
{
|
|
@@ -9,7 +9,7 @@ var uiV1 = require('./uiV1.js');
|
|
|
9
9
|
const config = {
|
|
10
10
|
tag: NotifyBackInStockPreOrder.default.tag,
|
|
11
11
|
label: NotifyBackInStockPreOrder.default.label,
|
|
12
|
-
icon:
|
|
12
|
+
icon: `<img class="gp-w-[24px] gp-border gp-border-[#494949] gp-rounded-[3px]" src="${NotifyBackInStockPreOrder.default.logoUrl}">`,
|
|
13
13
|
editorConfigs: {
|
|
14
14
|
placeholder: {
|
|
15
15
|
flowTag: [
|
|
@@ -29,7 +29,7 @@ const config = {
|
|
|
29
29
|
hideTextContent: true,
|
|
30
30
|
icon: {
|
|
31
31
|
desktop: `<div class="w-full flex flex-col items-center">
|
|
32
|
-
<img class="w-24 border border-dark-200 rounded-medium" src="
|
|
32
|
+
<img class="w-24 border border-dark-200 rounded-medium" src="${NotifyBackInStockPreOrder.default.logoUrl}">
|
|
33
33
|
<span class="preset-item-title">Notify! Back in Stock|PreOrder</span>
|
|
34
34
|
</div>`
|
|
35
35
|
},
|
|
@@ -30,7 +30,7 @@ const config = {
|
|
|
30
30
|
icon: {
|
|
31
31
|
desktop: `<div class="w-full flex flex-col items-center">
|
|
32
32
|
<img class="w-24 border border-dark-200 rounded-medium" src="https://cdn.shopify.com/app-store/listing_images/5ee1f244b087cfbec9b19c8b3f62c8f6/icon/CMCq1s7J5vQCEAE=.png?width=22&height=22">
|
|
33
|
-
<span class="preset-item-title">Product Options
|
|
33
|
+
<span class="preset-item-title">Avis Product Options, Variants</span>
|
|
34
34
|
</div>`
|
|
35
35
|
},
|
|
36
36
|
components: [
|
|
@@ -52,12 +52,6 @@ const config = {
|
|
|
52
52
|
href: 'https://apps.shopify.com/avisplus-product-options?utm_source=gempages',
|
|
53
53
|
appName: ProductOptionsVariantOption.AppConfig.label
|
|
54
54
|
},
|
|
55
|
-
{
|
|
56
|
-
id: 'idTrigger',
|
|
57
|
-
type: 'input',
|
|
58
|
-
label: '',
|
|
59
|
-
placeholder: 'eg: .product-form__buttons'
|
|
60
|
-
},
|
|
61
55
|
{
|
|
62
56
|
id: 'openApp',
|
|
63
57
|
type: 'open-link',
|
|
@@ -23,36 +23,6 @@ const SettingUIV2 = [
|
|
|
23
23
|
}
|
|
24
24
|
]
|
|
25
25
|
},
|
|
26
|
-
{
|
|
27
|
-
controls: [
|
|
28
|
-
{
|
|
29
|
-
type: 'combo',
|
|
30
|
-
label: {
|
|
31
|
-
en: 'Trigger ID'
|
|
32
|
-
},
|
|
33
|
-
iconName: 'polaris-text-block',
|
|
34
|
-
getValueFromSettingID: 'idTrigger',
|
|
35
|
-
isHideClear: true,
|
|
36
|
-
popoverLabel: {
|
|
37
|
-
en: 'Trigger ID'
|
|
38
|
-
},
|
|
39
|
-
controls: [
|
|
40
|
-
{
|
|
41
|
-
label: {
|
|
42
|
-
en: 'Content'
|
|
43
|
-
},
|
|
44
|
-
options: {
|
|
45
|
-
fullWidth: true
|
|
46
|
-
},
|
|
47
|
-
layout: 'vertical',
|
|
48
|
-
setting: {
|
|
49
|
-
id: 'idTrigger'
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
]
|
|
55
|
-
},
|
|
56
26
|
{
|
|
57
27
|
controls: [
|
|
58
28
|
{
|
|
@@ -55,8 +55,12 @@ const config = {
|
|
|
55
55
|
type: 'select',
|
|
56
56
|
options: [
|
|
57
57
|
{
|
|
58
|
-
label: '
|
|
58
|
+
label: 'All Bundles',
|
|
59
59
|
value: 'embed-all'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: 'Revy Bundle Placeholder',
|
|
63
|
+
value: 'product-page-placeholder'
|
|
60
64
|
}
|
|
61
65
|
],
|
|
62
66
|
default: 'embed-all'
|
|
@@ -82,7 +82,10 @@ const Button = (props)=>{
|
|
|
82
82
|
className: buttonWrapperClasses,
|
|
83
83
|
children: [
|
|
84
84
|
/*#__PURE__*/ jsx("style", {
|
|
85
|
-
|
|
85
|
+
type: "text/css",
|
|
86
|
+
dangerouslySetInnerHTML: {
|
|
87
|
+
__html: customCss
|
|
88
|
+
}
|
|
86
89
|
}),
|
|
87
90
|
If(isScrollToElement, // eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
88
91
|
/*#__PURE__*/ jsx("a", {
|
|
@@ -15,7 +15,7 @@ const getClass = (props)=>{
|
|
|
15
15
|
...builderProps?.uid && {
|
|
16
16
|
[builderProps.uid]: true
|
|
17
17
|
},
|
|
18
|
-
'gp-relative gp-mx-auto gp-mb-0 gp-grid gp-max-w-full gp-transition-colors gp-duration-200 gp-ease-in-out [&_*]:gp-max-w-full': true,
|
|
18
|
+
'gp-relative gp-mx-auto gp-mb-0 gp-grid gp-max-w-full gp-transition-colors gp-duration-200 gp-ease-in-out [&_*]:gp-max-w-full gp-grid-rows-[1fr]': true,
|
|
19
19
|
...advanced?.cssClass && {
|
|
20
20
|
[advanced?.cssClass]: true
|
|
21
21
|
}
|
|
@@ -8,7 +8,7 @@ import { postPurchaseViewSpacing } from '../../../post-purchase/utils/helper.js'
|
|
|
8
8
|
const getRowStyle = (rowProps)=>{
|
|
9
9
|
const { children, setting, builderProps, styles, style, advanced, isNotFullWidth, parentStyle } = rowProps;
|
|
10
10
|
const { isSection, layout, horizontalAlign, responsive, inlineAlignment } = setting ?? {};
|
|
11
|
-
const { width, columnGap, rowGap, fullWidth, background, verticalGutter, verticalGutterMobile, enablePagePadding } = styles ?? {};
|
|
11
|
+
const { width, columnGap, rowGap, fullWidth, background, verticalGutter, verticalGutterMobile, enablePagePadding, height } = styles ?? {};
|
|
12
12
|
const innerRadius = getInnerRadiusExcludeBorder(advanced?.border, advanced?.rounded);
|
|
13
13
|
const checkHasRadius = (corner)=>{
|
|
14
14
|
const cornerNormal = corner?.normal;
|
|
@@ -49,6 +49,7 @@ const getRowStyle = (rowProps)=>{
|
|
|
49
49
|
...makeStyleResponsive('rg', verticalGutterMobile),
|
|
50
50
|
...layout ? composeGridLayout(layout) : makeStyleResponsive('gtc', responsive),
|
|
51
51
|
...makeStyleResponsive('w', sizeStyles.content),
|
|
52
|
+
...makeStyleResponsive('h', height),
|
|
52
53
|
...isSection ? {} : overFlowStyle
|
|
53
54
|
};
|
|
54
55
|
};
|
|
@@ -185,6 +185,27 @@ const RowSettings = [
|
|
|
185
185
|
}
|
|
186
186
|
]
|
|
187
187
|
},
|
|
188
|
+
{
|
|
189
|
+
id: 'height',
|
|
190
|
+
type: 'option:value',
|
|
191
|
+
devices: {
|
|
192
|
+
desktop: {
|
|
193
|
+
default: 'auto'
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
options: [
|
|
197
|
+
{
|
|
198
|
+
label: 'Full',
|
|
199
|
+
value: '100%',
|
|
200
|
+
tooltip: 'Stretch to fill <br> vertical space'
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
label: 'Fit',
|
|
204
|
+
value: 'auto',
|
|
205
|
+
tooltip: 'Adjust size <br> based on content'
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
},
|
|
188
209
|
{
|
|
189
210
|
id: 'verticalGutter',
|
|
190
211
|
type: 'input:slider',
|
|
@@ -106,8 +106,15 @@ const SettingUIV2 = [
|
|
|
106
106
|
en: 'Width',
|
|
107
107
|
es: 'Ancho',
|
|
108
108
|
cn: '宽度'
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
setting: {
|
|
113
|
+
id: 'height'
|
|
109
114
|
},
|
|
110
|
-
|
|
115
|
+
label: {
|
|
116
|
+
en: 'Height'
|
|
117
|
+
}
|
|
111
118
|
},
|
|
112
119
|
{
|
|
113
120
|
label: {
|
|
@@ -258,7 +265,6 @@ const SettingUIV2 = [
|
|
|
258
265
|
label: {
|
|
259
266
|
en: 'Align column'
|
|
260
267
|
},
|
|
261
|
-
conditionDisplay: `pageType != "POST_PURCHASE" && (layout.display !== 'fill' || (!!layout.cols && layout.cols.length > 1))`,
|
|
262
268
|
controls: [
|
|
263
269
|
{
|
|
264
270
|
id: 'verticalAlign',
|
|
@@ -268,7 +274,7 @@ const SettingUIV2 = [
|
|
|
268
274
|
setting: {
|
|
269
275
|
id: 'verticalAlign'
|
|
270
276
|
},
|
|
271
|
-
conditionDisplay:
|
|
277
|
+
conditionDisplay: `((!!layout.cols && layout.cols.length > 1) || (!!layout.cols && layout.cols.length == 1 && height == '100%')) && pageType != "POST_PURCHASE"`
|
|
272
278
|
},
|
|
273
279
|
{
|
|
274
280
|
id: 'horizontalAlign',
|
|
@@ -278,7 +284,7 @@ const SettingUIV2 = [
|
|
|
278
284
|
setting: {
|
|
279
285
|
id: 'horizontalAlign'
|
|
280
286
|
},
|
|
281
|
-
conditionDisplay: `layout.display !== 'fill'`,
|
|
287
|
+
conditionDisplay: `layout.display !== 'fill' && pageType != "POST_PURCHASE"`,
|
|
282
288
|
options: {
|
|
283
289
|
disableMessage: `Horizontal Align is available when layout is "Fit to content"`
|
|
284
290
|
}
|
package/dist/esm/helpers.js
CHANGED
|
@@ -64,6 +64,10 @@ const getStaticLocale = (tag, key)=>{
|
|
|
64
64
|
const getSettingPreloadData = (disabledValue, enabledValue)=>{
|
|
65
65
|
return `{% if section.settings.section_preload == "false" %}${disabledValue} ${enabledValue ? `{% else %}${enabledValue}` : ''}{% endif %}`;
|
|
66
66
|
};
|
|
67
|
+
const getHttpUrl = (link)=>{
|
|
68
|
+
if (!link) return '';
|
|
69
|
+
return link.match(/^https?:\/\//i) ? link : `http://${link}`;
|
|
70
|
+
};
|
|
67
71
|
const getInsertLinkData = (defaultWrap, setting, htmlType)=>{
|
|
68
72
|
const URL_START_WITH = [
|
|
69
73
|
'#',
|
|
@@ -76,7 +80,7 @@ const getInsertLinkData = (defaultWrap, setting, htmlType)=>{
|
|
|
76
80
|
const isHyperlink = setting?.link !== undefined && setting.link !== '';
|
|
77
81
|
let urlHref = setting?.link ?? '';
|
|
78
82
|
const isHomePageHref = urlHref === '/';
|
|
79
|
-
const regexHttp = new RegExp(/^https
|
|
83
|
+
const regexHttp = new RegExp(/^(?:https?:\/\/)?[\w.-]+\.[a-z]{2,}/i);
|
|
80
84
|
const regexPageType = new RegExp(/^\/?(?:collections|pages|products|blogs|checkout|cart)\/?/i);
|
|
81
85
|
const isShopifyDomain = isHyperlink && !regexHttp.test(urlHref) && regexPageType.test(urlHref);
|
|
82
86
|
const isDomain = isHyperlink && regexHttp.test(urlHref);
|
|
@@ -87,6 +91,7 @@ const getInsertLinkData = (defaultWrap, setting, htmlType)=>{
|
|
|
87
91
|
urlHref = "{{ request.origin }}{{ routes.root_url | split: '/' | join: '/' }}" + urlHref;
|
|
88
92
|
}
|
|
89
93
|
}
|
|
94
|
+
if (isDomain) urlHref = getHttpUrl(urlHref);
|
|
90
95
|
const isLink = ()=>{
|
|
91
96
|
if (URL_START_WITH.find((el)=>urlHref.startsWith(el))) return true;
|
|
92
97
|
if (URL_INCLUDES.find((el)=>urlHref.includes(el))) return true;
|
|
@@ -212,5 +217,28 @@ const convertUnitToNumber = (value, defaultValue)=>{
|
|
|
212
217
|
const data = typeof value === 'string' ? value.replaceAll('px', '').replaceAll('%', '').replaceAll('rem', '').replaceAll('em', '') : defaultValue;
|
|
213
218
|
return !isNaN(Number(data)) ? Number(data) : defaultValue;
|
|
214
219
|
};
|
|
220
|
+
const getAllHrefFromString = (htmlString)=>{
|
|
221
|
+
if (!htmlString) return [];
|
|
222
|
+
const regex = /href="([^"]*)"/g;
|
|
223
|
+
const hrefs = [];
|
|
224
|
+
let match;
|
|
225
|
+
while((match = regex.exec(htmlString)) !== null){
|
|
226
|
+
match[1] && hrefs.push(match[1]);
|
|
227
|
+
}
|
|
228
|
+
return hrefs;
|
|
229
|
+
};
|
|
230
|
+
const replaceAllHrefFromString = (htmlString, hrefs)=>{
|
|
231
|
+
if (!htmlString) return '';
|
|
232
|
+
const regex = /href="([^"]*)"/g;
|
|
233
|
+
let match;
|
|
234
|
+
let i = 0;
|
|
235
|
+
while((match = regex.exec(htmlString)) !== null){
|
|
236
|
+
if (match[1]) {
|
|
237
|
+
htmlString = htmlString.replace(match[1], hrefs[i] ?? '');
|
|
238
|
+
i++;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return htmlString;
|
|
242
|
+
};
|
|
215
243
|
|
|
216
|
-
export { convertUnitToNumber, filterTruthyObject, filterTruthyStyles, getDisplayStyle, getDynamicSourceLocales, getInsertLinkData, getLinkArticle, getLinkData, getSettingPreloadData, getStaticLocale, isHexTransparent, isLinkedToSalesPage, isTransparentColor, isTransparentRGBA, replaceLinkData, youtubeShortsRegex };
|
|
244
|
+
export { convertUnitToNumber, filterTruthyObject, filterTruthyStyles, getAllHrefFromString, getDisplayStyle, getDynamicSourceLocales, getInsertLinkData, getLinkArticle, getLinkData, getSettingPreloadData, getStaticLocale, isHexTransparent, isLinkedToSalesPage, isTransparentColor, isTransparentRGBA, replaceAllHrefFromString, replaceLinkData, youtubeShortsRegex };
|
|
@@ -24,7 +24,7 @@ const Image = ({ style, styles, setting, children, advanced, className, builderA
|
|
|
24
24
|
const containerStyles = createStyle(getContainerStyles(style, styles));
|
|
25
25
|
const wrapperClasses = createClass(getWrapperClasses());
|
|
26
26
|
const imageClasses = createClass(getImageClasses(className, styles));
|
|
27
|
-
const containerClasses = createClass(getContainerClasses(builderProps?.uid, advanced?.cssClass));
|
|
27
|
+
const containerClasses = createClass(getContainerClasses(builderProps?.uid, advanced?.cssClass, styles?.shape));
|
|
28
28
|
const containerAttrs = createAttr(getContainerAttrs(builderAttrs, builderProps?.uid));
|
|
29
29
|
const linkWrapperAttrs = getLinkWrapperAttrs({
|
|
30
30
|
urlData,
|
|
@@ -21,7 +21,7 @@ const Image = ({ style, styles, setting, advanced, className, pageContext, build
|
|
|
21
21
|
const containerStyles = createStyle(getContainerStyles(style, styles));
|
|
22
22
|
const wrapperClasses = createClass(getWrapperClasses());
|
|
23
23
|
const imageClasses = createClass(getImageClasses(className, styles));
|
|
24
|
-
const containerClasses = createClass(getContainerClasses(builderProps?.uid, advanced?.cssClass));
|
|
24
|
+
const containerClasses = createClass(getContainerClasses(builderProps?.uid, advanced?.cssClass, styles?.shape));
|
|
25
25
|
const containerAttrs = createAttr(getContainerAttrs(builderAttrs, builderProps?.uid));
|
|
26
26
|
const linkWrapperAttrs = getLinkWrapperAttrs({
|
|
27
27
|
urlData,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { handleConvertClassColor } from '@gem-sdk/core';
|
|
1
|
+
import { getFlexGrowClassByShapeGlobalSize, handleConvertClassColor } from '@gem-sdk/core';
|
|
2
2
|
|
|
3
|
-
const getContainerClasses = (uid, cssClass)=>{
|
|
3
|
+
const getContainerClasses = (uid, cssClass, shape)=>{
|
|
4
|
+
const imageFlexGrowClass = getFlexGrowClassByShapeGlobalSize(shape);
|
|
4
5
|
return {
|
|
5
6
|
'gp-group/image gp-relative': true,
|
|
6
7
|
[`force-publish-${new Date().getTime()}`]: true,
|
|
8
|
+
...imageFlexGrowClass,
|
|
7
9
|
...uid && {
|
|
8
10
|
[uid]: true
|
|
9
11
|
},
|
|
@@ -28,7 +28,8 @@ const getSrcSetLiquid = (liquid, storage)=>{
|
|
|
28
28
|
return `{{ '${liquid}' | asset_img_url: '768x' }} 768w, {{ '${liquid}' | asset_img_url: '1024x' }} 1024w, {{ '${liquid}' | asset_img_url: 'master' }} 1440w`;
|
|
29
29
|
};
|
|
30
30
|
const getSrcSetLink = (link)=>{
|
|
31
|
-
return
|
|
31
|
+
return link;
|
|
32
|
+
// return `${link} 768w,${link} 1024w,${link} 1440w`; // Since image src didn't change in size so this line of code is pointless
|
|
32
33
|
};
|
|
33
34
|
const getImageSrc = (image, currentDevice, isNotLiquid)=>{
|
|
34
35
|
if (image?.metafieldDefinitionKey) {
|
package/dist/esm/index.js
CHANGED
|
@@ -64,7 +64,7 @@ import 'react/jsx-runtime';
|
|
|
64
64
|
import 'react';
|
|
65
65
|
import '@gem-sdk/core';
|
|
66
66
|
export { ELEMENT_Z_INDEX } from './common/const.js';
|
|
67
|
-
export { convertUnitToNumber, filterTruthyObject, filterTruthyStyles, getDisplayStyle, getDynamicSourceLocales, getInsertLinkData, getLinkArticle, getLinkData, getSettingPreloadData, getStaticLocale, isHexTransparent, isLinkedToSalesPage, isTransparentColor, isTransparentRGBA, replaceLinkData, youtubeShortsRegex } from './helpers.js';
|
|
67
|
+
export { convertUnitToNumber, filterTruthyObject, filterTruthyStyles, getAllHrefFromString, getDisplayStyle, getDynamicSourceLocales, getInsertLinkData, getLinkArticle, getLinkData, getSettingPreloadData, getStaticLocale, isHexTransparent, isLinkedToSalesPage, isTransparentColor, isTransparentRGBA, replaceAllHrefFromString, replaceLinkData, youtubeShortsRegex } from './helpers.js';
|
|
68
68
|
export { default as Accordion } from './accordion/components/Accordion.js';
|
|
69
69
|
export { default as AccordionItem } from './accordion/components/AccordionItem.js';
|
|
70
70
|
export { default as ArticleList } from './article/components/ArticleList.js';
|
|
@@ -13,8 +13,12 @@ const getProductOfferWrapperClasses = ()=>{
|
|
|
13
13
|
const getProductOfferItemClasses = (index, setting, totalProduct)=>{
|
|
14
14
|
const { productOfferLayout } = setting ?? {};
|
|
15
15
|
let className = '';
|
|
16
|
-
DEVICES.
|
|
16
|
+
DEVICES.forEach((device)=>{
|
|
17
17
|
const key = device === 'desktop' ? '' : `${device}:`;
|
|
18
|
+
if (device === 'mobile') {
|
|
19
|
+
className += ` mobile:gp-col-span-2`;
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
18
22
|
if (productOfferLayout?.[device] === '1col' && index % 3 === 0 || (totalProduct || 0) <= 1) {
|
|
19
23
|
className += ` ${key}gp-col-span-2`;
|
|
20
24
|
}
|
|
@@ -59,11 +59,11 @@ const getSvgActiveStyles = (styles)=>{
|
|
|
59
59
|
})
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
|
-
const getSvgStyles = (
|
|
62
|
+
const getSvgStyles = (styles)=>{
|
|
63
63
|
return {
|
|
64
64
|
...getGlobalColorStateStyle('c', {
|
|
65
65
|
...styles?.iconColor,
|
|
66
|
-
normal:
|
|
66
|
+
normal: styles?.iconColor?.normal
|
|
67
67
|
})
|
|
68
68
|
};
|
|
69
69
|
};
|
package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js
CHANGED
|
@@ -11,7 +11,7 @@ const ProductBundleDiscountChildrenItem = (props)=>{
|
|
|
11
11
|
const composeLayoutClasses = createClass(getLayoutClasses(setting));
|
|
12
12
|
const composeIconStyles = createStyle(getIconStyles(setting));
|
|
13
13
|
const composeSvgActiveStyles = createStyle(getSvgActiveStyles(styles));
|
|
14
|
-
const composeSvgStyles = createStyle(getSvgStyles(
|
|
14
|
+
const composeSvgStyles = createStyle(getSvgStyles(styles));
|
|
15
15
|
const composeIconSectionClasses = createClass(getIconSectionClasses);
|
|
16
16
|
const composeItemClasses = createClass(getItemClasses);
|
|
17
17
|
const composeFlexChildren = createClass(getFlexChildren);
|
|
@@ -9,7 +9,7 @@ const ProductBundleDiscountChildrenItemLiquid = (props)=>{
|
|
|
9
9
|
const composeLayoutClasses = createClass(getLayoutClasses(setting));
|
|
10
10
|
const composeIconStyles = createStyle(getIconStyles(setting));
|
|
11
11
|
const composeSvgActiveStyles = createStyle(getSvgActiveStyles(styles));
|
|
12
|
-
const composeSvgStyles = createStyle(getSvgStyles(
|
|
12
|
+
const composeSvgStyles = createStyle(getSvgStyles(styles));
|
|
13
13
|
const composeIconSectionClasses = createClass(getIconSectionClasses);
|
|
14
14
|
const composeItemClasses = createClass(getItemClasses);
|
|
15
15
|
const composeFlexChildren = createClass(getFlexChildren);
|
|
@@ -430,10 +430,7 @@ const config = {
|
|
|
430
430
|
childItem: [],
|
|
431
431
|
layout: 'vertical-layout'
|
|
432
432
|
},
|
|
433
|
-
childrens: []
|
|
434
|
-
advanced: {
|
|
435
|
-
of: 'hidden'
|
|
436
|
-
}
|
|
433
|
+
childrens: []
|
|
437
434
|
}
|
|
438
435
|
]
|
|
439
436
|
},
|
|
@@ -463,10 +460,7 @@ const config = {
|
|
|
463
460
|
layout: 'horizontal-layout',
|
|
464
461
|
enableIcon: false
|
|
465
462
|
},
|
|
466
|
-
childrens: []
|
|
467
|
-
advanced: {
|
|
468
|
-
of: 'hidden'
|
|
469
|
-
}
|
|
463
|
+
childrens: []
|
|
470
464
|
}
|
|
471
465
|
]
|
|
472
466
|
}
|
|
@@ -333,7 +333,7 @@ const getPaddingBottomByShapeSetting = (shapeSetting)=>{
|
|
|
333
333
|
};
|
|
334
334
|
return;
|
|
335
335
|
}
|
|
336
|
-
const value = aspectRatio?.[device] !== 'auto' && !!aspectRatio?.[device] ? aspectRatio?.[device]?.split('').reverse().join('') : '{%if media.height%} {{media.height}} / {{media.width}} {%else%} 100 / 100 {%endif%}';
|
|
336
|
+
const value = aspectRatio?.[device] !== 'auto' && !!aspectRatio?.[device] ? aspectRatio?.[device]?.split('/').reverse().join('') : '{%if media.height%} {{media.height}} / {{media.width}} {%else%} 100 / 100 {%endif%}';
|
|
337
337
|
result = {
|
|
338
338
|
...result,
|
|
339
339
|
[device]: `calc((${value})*100%)`
|