@gem-sdk/components 2.0.0-dev.394 → 2.0.0-dev.396
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/common/getStyle.js +3 -1
- package/dist/cjs/banner/setting/setting.js +12 -16
- package/dist/cjs/banner/setting/uiV2.js +0 -26
- package/dist/cjs/product/components/ProductBundle/common/styles.js +17 -6
- 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 +47 -415
- package/dist/cjs/product/components/ProductBundle/setting/uiV1.js +404 -0
- package/dist/cjs/product/components/ProductBundle/setting/uiV2.js +728 -0
- package/dist/cjs/product/setting/product-badge/configs/settings.js +1 -1
- package/dist/cjs/product/setting/product-badge/configs/uiV2.js +2 -5
- package/dist/esm/banner/components/common/getStyle.js +4 -2
- package/dist/esm/banner/setting/setting.js +12 -16
- package/dist/esm/banner/setting/uiV2.js +0 -26
- package/dist/esm/product/components/ProductBundle/common/styles.js +17 -6
- 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 +47 -415
- package/dist/esm/product/components/ProductBundle/setting/uiV1.js +400 -0
- package/dist/esm/product/components/ProductBundle/setting/uiV2.js +724 -0
- package/dist/esm/product/setting/product-badge/configs/settings.js +1 -1
- package/dist/esm/product/setting/product-badge/configs/uiV2.js +2 -5
- package/dist/types/index.d.ts +3 -1
- package/package.json +2 -2
|
@@ -105,9 +105,9 @@ const ProductBadgeSettings = [
|
|
|
105
105
|
default: 'Sale {percent_discount} off',
|
|
106
106
|
minHeight: 72,
|
|
107
107
|
inputClass: '!pr-36',
|
|
108
|
-
isFallback: true,
|
|
109
108
|
autoHeight: true,
|
|
110
109
|
showPlusBtn: true,
|
|
110
|
+
isFocusToBottom: true,
|
|
111
111
|
defaultRows: 1,
|
|
112
112
|
suggestContents: [
|
|
113
113
|
{
|
|
@@ -72,7 +72,7 @@ const SettingUIV2 = [
|
|
|
72
72
|
{
|
|
73
73
|
id: 'content-badge',
|
|
74
74
|
type: 'combo',
|
|
75
|
-
iconName: 'polaris-
|
|
75
|
+
iconName: 'polaris-plus',
|
|
76
76
|
isHideClear: true,
|
|
77
77
|
fixedValue: 'Add...',
|
|
78
78
|
popoverLabel: {
|
|
@@ -81,9 +81,6 @@ const SettingUIV2 = [
|
|
|
81
81
|
label: {
|
|
82
82
|
en: 'Content'
|
|
83
83
|
},
|
|
84
|
-
setting: {
|
|
85
|
-
id: 'displayContent'
|
|
86
|
-
},
|
|
87
84
|
layout: 'vertical',
|
|
88
85
|
conditionDisplay: 'contentType == "text"',
|
|
89
86
|
controls: [
|
|
@@ -104,7 +101,7 @@ const SettingUIV2 = [
|
|
|
104
101
|
setting: {
|
|
105
102
|
id: 'contentBanner'
|
|
106
103
|
},
|
|
107
|
-
conditionDisplay: 'displayContent
|
|
104
|
+
conditionDisplay: 'displayContent?.includes("{inventory_quantity}")'
|
|
108
105
|
}
|
|
109
106
|
]
|
|
110
107
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { makeStyleResponsive, getHeightByShapeGlobalSize, makeStyleWithDefault, getWidthByShapeGlobalSize, makeStyle, getSingleColorVariable, getRadiusStyleActiveState, getStyleShadow, getGlobalColorStateStyle, makeStyleState,
|
|
1
|
+
import { makeStyleResponsive, getHeightByShapeGlobalSize, makeStyleWithDefault, getWidthByShapeGlobalSize, makeStyle, getSingleColorVariable, getRadiusStyleActiveState, getStyleShadow, getGlobalColorStateStyle, makeStyleState, getResponsiveStylePadding, getStyleBackgroundByDevice, getGradientBgrStyleByDevice } from '@gem-sdk/core';
|
|
2
2
|
import { getVisibilityStyle, getStyleAspectRatioHeroBannerCustom, getAspectRatioSettings, getDisplayStyleByFitContent, getStyleHeroBannerBg, bgiEnableByDevice, getAttachmentDevice, getClipPath, getResponsiveSetting } from './common.js';
|
|
3
3
|
|
|
4
4
|
function filterTruthyStyles(styles) {
|
|
@@ -58,7 +58,9 @@ const getOverlayStyle = (styles)=>{
|
|
|
58
58
|
};
|
|
59
59
|
const getRowStyle = (styles)=>{
|
|
60
60
|
const { contentPadding } = styles ?? {};
|
|
61
|
-
const composeStyles =
|
|
61
|
+
const composeStyles = {
|
|
62
|
+
...getResponsiveStylePadding(contentPadding)
|
|
63
|
+
};
|
|
62
64
|
return filterTruthyStyles(composeStyles);
|
|
63
65
|
};
|
|
64
66
|
const getAdaptiveStyle = (styles)=>{
|
|
@@ -444,7 +444,7 @@ const SettingsV2 = [
|
|
|
444
444
|
type: 'image',
|
|
445
445
|
color: 'bg-2',
|
|
446
446
|
image: {
|
|
447
|
-
src: 'https://
|
|
447
|
+
src: 'https://ucarecdn.com/40daf457-10f5-4a0f-a7c4-d73d28ffd60c/willianjustendevasconcellosjOF2TFSNxQIunsplash11min.png',
|
|
448
448
|
width: 1920,
|
|
449
449
|
height: 900
|
|
450
450
|
},
|
|
@@ -455,7 +455,7 @@ const SettingsV2 = [
|
|
|
455
455
|
},
|
|
456
456
|
repeat: 'no-repeat',
|
|
457
457
|
attachment: 'scroll',
|
|
458
|
-
video: 'https://
|
|
458
|
+
video: 'https://youtu.be/KOxfzBp72uk',
|
|
459
459
|
videoHtml5: 'https://media.w3.org/2010/05/sintel/trailer.mp4',
|
|
460
460
|
videoType: 'youtube',
|
|
461
461
|
loop: true,
|
|
@@ -714,26 +714,22 @@ const SettingsV2 = [
|
|
|
714
714
|
devices: {
|
|
715
715
|
desktop: {
|
|
716
716
|
default: {
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
right: '0px'
|
|
723
|
-
}
|
|
717
|
+
top: '4px',
|
|
718
|
+
left: '16px',
|
|
719
|
+
bottom: '4px',
|
|
720
|
+
right: '16px',
|
|
721
|
+
linked: false
|
|
724
722
|
}
|
|
725
723
|
}
|
|
726
724
|
},
|
|
727
725
|
compoDefaultValue: {
|
|
728
726
|
desktop: {
|
|
729
727
|
default: {
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
right: '0px'
|
|
736
|
-
}
|
|
728
|
+
top: '4px',
|
|
729
|
+
left: '16px',
|
|
730
|
+
bottom: '4px',
|
|
731
|
+
right: '16px',
|
|
732
|
+
linked: false
|
|
737
733
|
}
|
|
738
734
|
}
|
|
739
735
|
}
|
|
@@ -113,32 +113,6 @@ const SettingUIV2 = [
|
|
|
113
113
|
},
|
|
114
114
|
setting: {
|
|
115
115
|
id: 'contentPadding'
|
|
116
|
-
},
|
|
117
|
-
controlConfig: {
|
|
118
|
-
id: 'contentPadding',
|
|
119
|
-
type: 'padding-v2',
|
|
120
|
-
compoDefaultValue: {
|
|
121
|
-
desktop: {
|
|
122
|
-
padding: {
|
|
123
|
-
top: '32px',
|
|
124
|
-
right: '0px',
|
|
125
|
-
bottom: '32px',
|
|
126
|
-
left: '0px',
|
|
127
|
-
linked: false
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
compoDefaultValue: {
|
|
133
|
-
desktop: {
|
|
134
|
-
padding: {
|
|
135
|
-
top: '32px',
|
|
136
|
-
right: '0px',
|
|
137
|
-
bottom: '32px',
|
|
138
|
-
left: '0px',
|
|
139
|
-
linked: false
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
116
|
}
|
|
143
117
|
},
|
|
144
118
|
{
|
|
@@ -10,16 +10,20 @@ const getItemWrapStyles = (styles, isSelected)=>{
|
|
|
10
10
|
bg: isSelected ? styles?.backgroundColor?.active : styles?.backgroundColor?.normal
|
|
11
11
|
}),
|
|
12
12
|
...composeRadius(styles?.roundedBundle),
|
|
13
|
-
...getStyleShadowState(styles?.boxShadowBundle, 'box-shadow',
|
|
13
|
+
...getStyleShadowState(styles?.boxShadowBundle, 'box-shadow', {
|
|
14
|
+
normal: true,
|
|
15
|
+
active: true,
|
|
16
|
+
hover: true
|
|
17
|
+
}),
|
|
14
18
|
...isSelected ? getStyleShadow({
|
|
15
19
|
value: styles?.boxShadowBundle?.active,
|
|
16
20
|
styleAppliedFor: 'box-shadow',
|
|
17
|
-
isEnableShadow:
|
|
21
|
+
isEnableShadow: true
|
|
18
22
|
}) : {
|
|
19
23
|
...getStyleShadow({
|
|
20
24
|
value: styles?.boxShadowBundle?.normal,
|
|
21
25
|
styleAppliedFor: 'box-shadow',
|
|
22
|
-
isEnableShadow:
|
|
26
|
+
isEnableShadow: true
|
|
23
27
|
})
|
|
24
28
|
},
|
|
25
29
|
...isSelected ? getBorderStyle(styles?.borderBundle?.active) : {
|
|
@@ -55,9 +59,12 @@ const getSvgActiveStyles = (styles)=>{
|
|
|
55
59
|
})
|
|
56
60
|
};
|
|
57
61
|
};
|
|
58
|
-
const getSvgStyles = (styles)=>{
|
|
62
|
+
const getSvgStyles = (settings, styles)=>{
|
|
59
63
|
return {
|
|
60
|
-
...getGlobalColorStateStyle('c',
|
|
64
|
+
...getGlobalColorStateStyle('c', {
|
|
65
|
+
...styles?.iconColor,
|
|
66
|
+
normal: settings?.iconItemColor ? settings?.iconItemColor : styles?.iconColor?.normal
|
|
67
|
+
})
|
|
61
68
|
};
|
|
62
69
|
};
|
|
63
70
|
const getAlignStyle = (styles)=>{
|
|
@@ -71,7 +78,11 @@ const getAlignStyle = (styles)=>{
|
|
|
71
78
|
const getFlexChildren = composeClasses('gp-flex-1');
|
|
72
79
|
const getContainerStyles = (composeSizeStyles, styles, style)=>{
|
|
73
80
|
return {
|
|
74
|
-
...
|
|
81
|
+
...styles?.itemSpacing ? {
|
|
82
|
+
...makeStyle({
|
|
83
|
+
gg: styles?.itemSpacing
|
|
84
|
+
})
|
|
85
|
+
} : composeSizeStyles,
|
|
75
86
|
...getAlignStyle(styles),
|
|
76
87
|
...style
|
|
77
88
|
};
|
package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js
CHANGED
|
@@ -10,7 +10,7 @@ const ProductBundleDiscountChildrenItem = (props)=>{
|
|
|
10
10
|
const composeLayoutClasses = createClass(getLayoutClasses(setting));
|
|
11
11
|
const composeIconStyles = createStyle(getIconStyles(setting));
|
|
12
12
|
const composeSvgActiveStyles = createStyle(getSvgActiveStyles(styles));
|
|
13
|
-
const composeSvgStyles = createStyle(getSvgStyles(styles));
|
|
13
|
+
const composeSvgStyles = createStyle(getSvgStyles(setting, styles));
|
|
14
14
|
const composeIconSectionClasses = createClass(getIconSectionClasses);
|
|
15
15
|
const composeItemClasses = createClass(getItemClasses);
|
|
16
16
|
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(styles));
|
|
12
|
+
const composeSvgStyles = createStyle(getSvgStyles(setting, styles));
|
|
13
13
|
const composeIconSectionClasses = createClass(getIconSectionClasses);
|
|
14
14
|
const composeItemClasses = createClass(getItemClasses);
|
|
15
15
|
const composeFlexChildren = createClass(getFlexChildren);
|