@gem-sdk/components 2.0.0-dev.473 → 2.0.0-dev.475
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/carousel/setting/configs/settingV2.js +732 -728
- package/dist/cjs/carousel/setting/configs/uiV2.js +304 -298
- package/dist/cjs/product/components/ProductDiscountTag/index.liquid.js +1 -10
- package/dist/cjs/product/components/ProductList/ProductListGridLayout.js +11 -6
- package/dist/cjs/product/components/ProductList/ProductListItem.liquid.js +3 -0
- package/dist/cjs/product/components/ProductList/common/getStyle.js +33 -1
- package/dist/cjs/product/components/ProductList/common/index.js +2 -25
- package/dist/cjs/product/components/ProductProperties/ProductProperties.js +16 -0
- package/dist/cjs/product/components/ProductVariants/common/base/classes.js +3 -3
- package/dist/cjs/product/components/ProductVariants/components/base/base.liquid.js +4 -1
- package/dist/cjs/product/components/ProductVariants/components/variants/index.liquid.js +4 -1
- package/dist/cjs/product/components/ProductVariants/index.liquid.js +1 -1
- package/dist/cjs/product/setting/ProductList.js +1 -3
- package/dist/cjs/product/setting/product-list/configs/settingsV2.js +17 -203
- package/dist/cjs/product/setting/product-list/configs/uiV2.js +100 -137
- package/dist/cjs/product/setting/product-variant/configs/uiV2.js +17 -0
- package/dist/cjs/text/components/Text.liquid.js +4 -1
- package/dist/esm/carousel/setting/configs/settingV2.js +731 -729
- package/dist/esm/carousel/setting/configs/uiV2.js +302 -299
- package/dist/esm/product/components/ProductDiscountTag/index.liquid.js +3 -12
- package/dist/esm/product/components/ProductList/ProductListGridLayout.js +11 -6
- package/dist/esm/product/components/ProductList/ProductListItem.liquid.js +3 -0
- package/dist/esm/product/components/ProductList/common/getStyle.js +34 -2
- package/dist/esm/product/components/ProductList/common/index.js +2 -25
- package/dist/esm/product/components/ProductProperties/ProductProperties.js +16 -0
- package/dist/esm/product/components/ProductVariants/common/base/classes.js +3 -3
- package/dist/esm/product/components/ProductVariants/components/base/base.liquid.js +4 -1
- package/dist/esm/product/components/ProductVariants/components/variants/index.liquid.js +4 -1
- package/dist/esm/product/components/ProductVariants/index.liquid.js +1 -1
- package/dist/esm/product/setting/ProductList.js +1 -3
- package/dist/esm/product/setting/product-list/configs/settingsV2.js +17 -203
- package/dist/esm/product/setting/product-list/configs/uiV2.js +100 -137
- package/dist/esm/product/setting/product-variant/configs/uiV2.js +17 -0
- package/dist/esm/text/components/Text.liquid.js +4 -1
- package/dist/types/index.d.ts +3 -6
- package/package.json +2 -2
- package/dist/cjs/product/setting/product-list/configs/settings.js +0 -496
- package/dist/esm/product/setting/product-list/configs/settings.js +0 -494
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { carouselNavigationSettings, carouselDotsSettings, carouselEffectsSettings } from '../../../../carousel/setting/configs/uiV2.js';
|
|
2
|
+
|
|
1
3
|
const SettingUIV2 = [
|
|
2
4
|
{
|
|
3
5
|
controls: [
|
|
@@ -6,6 +8,7 @@ const SettingUIV2 = [
|
|
|
6
8
|
label: {
|
|
7
9
|
en: 'Layout'
|
|
8
10
|
},
|
|
11
|
+
layout: 'vertical',
|
|
9
12
|
options: {
|
|
10
13
|
labelVariant: 'primary'
|
|
11
14
|
},
|
|
@@ -35,7 +38,7 @@ const SettingUIV2 = [
|
|
|
35
38
|
controls: [
|
|
36
39
|
{
|
|
37
40
|
label: {
|
|
38
|
-
en: '
|
|
41
|
+
en: 'Products'
|
|
39
42
|
},
|
|
40
43
|
conditionDisplay: "productSetting.productSrc === 'RelatedProduct' || !!productSetting && productSetting.productSrc !== 'PickProduct'",
|
|
41
44
|
setting: {
|
|
@@ -92,166 +95,126 @@ const SettingUIV2 = [
|
|
|
92
95
|
},
|
|
93
96
|
controls: [
|
|
94
97
|
{
|
|
98
|
+
conditionDisplay: "layout !== 'slider'",
|
|
95
99
|
label: {
|
|
96
100
|
en: 'Height'
|
|
97
101
|
},
|
|
98
102
|
setting: {
|
|
99
103
|
id: 'sameHeight'
|
|
100
104
|
}
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
conditionDisplay: "layout === 'slider'",
|
|
106
|
-
controls: [
|
|
107
|
-
{
|
|
108
|
-
label: {
|
|
109
|
-
en: 'Navigation'
|
|
110
|
-
},
|
|
111
|
-
setting: {
|
|
112
|
-
id: 'arrow'
|
|
113
|
-
},
|
|
114
|
-
options: {
|
|
115
|
-
labelVariant: 'primary',
|
|
116
|
-
toggleStyle: 'switch'
|
|
117
|
-
}
|
|
118
105
|
},
|
|
119
106
|
{
|
|
120
107
|
label: {
|
|
121
|
-
en: '
|
|
108
|
+
en: 'Padding'
|
|
122
109
|
},
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
110
|
+
controlConfig: {
|
|
111
|
+
id: 'itemPadding',
|
|
112
|
+
type: 'padding-v2',
|
|
113
|
+
linkWithSetting: {
|
|
114
|
+
name: 'itemPadding',
|
|
115
|
+
field: 'padding'
|
|
116
|
+
},
|
|
117
|
+
compoDefaultValue: {
|
|
118
|
+
desktop: {
|
|
119
|
+
default: {
|
|
120
|
+
type: 'custom',
|
|
121
|
+
top: '16px',
|
|
122
|
+
bottom: '16px',
|
|
123
|
+
left: '16px',
|
|
124
|
+
right: '16px'
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
126
128
|
}
|
|
127
129
|
},
|
|
128
130
|
{
|
|
129
|
-
conditionDisplay: 'arrow === true',
|
|
130
131
|
label: {
|
|
131
|
-
en: '
|
|
132
|
+
en: 'Background'
|
|
132
133
|
},
|
|
133
134
|
setting: {
|
|
134
|
-
id: '
|
|
135
|
+
id: 'background'
|
|
135
136
|
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
moreSettings: {
|
|
140
|
+
controls: [
|
|
141
|
+
{
|
|
142
|
+
label: {
|
|
143
|
+
en: 'Border'
|
|
144
|
+
},
|
|
145
|
+
setting: {
|
|
146
|
+
id: 'borderContent'
|
|
147
|
+
}
|
|
141
148
|
},
|
|
142
|
-
|
|
143
|
-
|
|
149
|
+
{
|
|
150
|
+
label: {
|
|
151
|
+
en: 'Corner'
|
|
152
|
+
},
|
|
153
|
+
setting: {
|
|
154
|
+
id: 'roundedContent'
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
label: {
|
|
159
|
+
en: 'Shadow'
|
|
160
|
+
},
|
|
161
|
+
setting: {
|
|
162
|
+
id: 'carouselShadow'
|
|
163
|
+
},
|
|
164
|
+
options: {
|
|
165
|
+
updateFields: [
|
|
166
|
+
{
|
|
167
|
+
field: 'enable',
|
|
168
|
+
settingId: 'hasActiveShadow'
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
controlChangeTrigger: {
|
|
173
|
+
settings: [
|
|
174
|
+
{
|
|
175
|
+
condition: `carouselShadow.enable === true`,
|
|
176
|
+
source: [
|
|
177
|
+
'carouselShadow'
|
|
178
|
+
],
|
|
179
|
+
action: {
|
|
180
|
+
controlId: 'hasActiveShadow',
|
|
181
|
+
groupType: 'style',
|
|
182
|
+
controlType: 'style',
|
|
183
|
+
newValue: true
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
condition: `carouselShadow.enable === false`,
|
|
188
|
+
source: [
|
|
189
|
+
'carouselShadow'
|
|
190
|
+
],
|
|
191
|
+
action: {
|
|
192
|
+
controlId: 'hasActiveShadow',
|
|
193
|
+
groupType: 'style',
|
|
194
|
+
controlType: 'style',
|
|
195
|
+
newValue: false
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
options: {
|
|
200
|
+
noRecordHistory: true
|
|
201
|
+
}
|
|
202
|
+
}
|
|
144
203
|
}
|
|
145
|
-
|
|
146
|
-
|
|
204
|
+
]
|
|
205
|
+
}
|
|
147
206
|
},
|
|
148
207
|
{
|
|
149
208
|
conditionDisplay: "layout === 'slider'",
|
|
150
|
-
|
|
151
|
-
{
|
|
152
|
-
label: {
|
|
153
|
-
en: 'Dots'
|
|
154
|
-
},
|
|
155
|
-
setting: {
|
|
156
|
-
id: 'dot'
|
|
157
|
-
},
|
|
158
|
-
options: {
|
|
159
|
-
labelVariant: 'primary',
|
|
160
|
-
toggleStyle: 'switch'
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
conditionDisplay: 'dot == true',
|
|
165
|
-
label: {
|
|
166
|
-
en: 'Layout'
|
|
167
|
-
},
|
|
168
|
-
setting: {
|
|
169
|
-
id: 'dotStyle'
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
conditionDisplay: 'dot == true',
|
|
174
|
-
label: {
|
|
175
|
-
en: 'Active color'
|
|
176
|
-
},
|
|
177
|
-
setting: {
|
|
178
|
-
id: 'dotActiveColor'
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
conditionDisplay: 'dot == true',
|
|
183
|
-
label: {
|
|
184
|
-
en: 'Inactive color'
|
|
185
|
-
},
|
|
186
|
-
setting: {
|
|
187
|
-
id: 'dotColor'
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
conditionDisplay: 'dot == true',
|
|
192
|
-
label: {
|
|
193
|
-
en: 'Dots size'
|
|
194
|
-
},
|
|
195
|
-
setting: {
|
|
196
|
-
id: 'dotSize'
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
]
|
|
209
|
+
...carouselNavigationSettings
|
|
200
210
|
},
|
|
201
211
|
{
|
|
202
|
-
label: {
|
|
203
|
-
en: 'Slider effect'
|
|
204
|
-
},
|
|
205
212
|
conditionDisplay: "layout === 'slider'",
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
},
|
|
212
|
-
setting: {
|
|
213
|
-
id: 'dragToScroll'
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
type: 'control',
|
|
218
|
-
label: {
|
|
219
|
-
en: 'Infinity loop'
|
|
220
|
-
},
|
|
221
|
-
setting: {
|
|
222
|
-
id: 'loop'
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
type: 'control',
|
|
227
|
-
label: {
|
|
228
|
-
en: 'Autoplay'
|
|
229
|
-
},
|
|
230
|
-
setting: {
|
|
231
|
-
id: 'autoplay'
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
type: 'control',
|
|
236
|
-
label: {
|
|
237
|
-
en: 'Pause On Hover'
|
|
238
|
-
},
|
|
239
|
-
setting: {
|
|
240
|
-
id: 'pauseOnHover'
|
|
241
|
-
},
|
|
242
|
-
conditionDisplay: 'autoplay == true'
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
type: 'control',
|
|
246
|
-
label: {
|
|
247
|
-
en: 'Timeout(s)'
|
|
248
|
-
},
|
|
249
|
-
setting: {
|
|
250
|
-
id: 'autoplayTimeout'
|
|
251
|
-
},
|
|
252
|
-
conditionDisplay: 'autoplay == true'
|
|
253
|
-
}
|
|
254
|
-
]
|
|
213
|
+
...carouselDotsSettings
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
conditionDisplay: "layout === 'slider'",
|
|
217
|
+
...carouselEffectsSettings
|
|
255
218
|
},
|
|
256
219
|
{
|
|
257
220
|
label: {
|
|
@@ -378,7 +341,7 @@ const SettingUIV2 = [
|
|
|
378
341
|
label: {
|
|
379
342
|
en: 'Align'
|
|
380
343
|
},
|
|
381
|
-
conditionEnable: '!(
|
|
344
|
+
conditionEnable: '!(parseInt(width) >= 100 && width?.includes("%"))',
|
|
382
345
|
setting: {
|
|
383
346
|
id: 'align'
|
|
384
347
|
},
|
|
@@ -14,6 +14,23 @@ const SettingUIV2 = [
|
|
|
14
14
|
}
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
|
+
{
|
|
18
|
+
controls: [
|
|
19
|
+
{
|
|
20
|
+
label: {
|
|
21
|
+
en: 'Product source'
|
|
22
|
+
},
|
|
23
|
+
controlConfig: {
|
|
24
|
+
id: 'gp-to-product',
|
|
25
|
+
type: 'product-source'
|
|
26
|
+
},
|
|
27
|
+
layout: 'vertical',
|
|
28
|
+
options: {
|
|
29
|
+
labelVariant: 'primary'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
17
34
|
{
|
|
18
35
|
label: {
|
|
19
36
|
en: 'Option gap'
|
|
@@ -5,9 +5,12 @@ import { getStyle, getContainerStyle, getTextStyle } from './common/getStyle.js'
|
|
|
5
5
|
import { getDisplayText } from './common/getDisplayText.js';
|
|
6
6
|
import { getClasses, getTextClasses } from './common/getClasses.js';
|
|
7
7
|
|
|
8
|
-
const Text = ({ styles, builderAttrs, style, setting, advanced, builderProps, className, isText, pageContext, elementAttrs })=>{
|
|
8
|
+
const Text = ({ id, styles, builderAttrs, style, setting, advanced, builderProps, className, isText, pageContext, elementAttrs })=>{
|
|
9
9
|
const { htmlTag: Element = 'div', excludeFlex } = setting ?? {};
|
|
10
10
|
const attrs = createAttr({
|
|
11
|
+
...id && {
|
|
12
|
+
id
|
|
13
|
+
},
|
|
11
14
|
...getAttr({
|
|
12
15
|
uid: builderProps?.uidInteraction ?? builderProps?.uid ?? ''
|
|
13
16
|
}),
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3691,14 +3691,13 @@ type ProductListSettingStyles = {
|
|
|
3691
3691
|
verticalGutter?: ObjectDevices$1<string>;
|
|
3692
3692
|
fullWidth?: ObjectDevices$1<boolean>;
|
|
3693
3693
|
adaptiveHeight?: ObjectDevices$1<boolean>;
|
|
3694
|
-
spacing?: ObjectDevices$1<number>;
|
|
3695
3694
|
width?: ObjectDevices$1<string>;
|
|
3696
3695
|
height?: ObjectDevices$1<string>;
|
|
3697
3696
|
backgroundColor?: ObjectDevices$1<ColorValueType$1>;
|
|
3698
3697
|
backgroundImage?: ObjectDevices$1<BackgroundImageValue>;
|
|
3699
3698
|
preloadBgImage?: boolean;
|
|
3700
3699
|
align?: ObjectDevices$1<AlignProp>;
|
|
3701
|
-
};
|
|
3700
|
+
} & CarouselProps['styles'];
|
|
3702
3701
|
type ProductListSetting = {
|
|
3703
3702
|
productSetting?: {
|
|
3704
3703
|
productSrc?: ProductSource;
|
|
@@ -3718,12 +3717,10 @@ type ProductListSetting = {
|
|
|
3718
3717
|
randomizeOrder?: boolean;
|
|
3719
3718
|
numberOfProducts?: number;
|
|
3720
3719
|
col?: number;
|
|
3721
|
-
loop?: ObjectDevices$1<boolean>;
|
|
3722
3720
|
scrollMode?: ObjectDevices$1<'snap' | 'free' | 'free-snap'>;
|
|
3723
3721
|
orderBy?: ProductSortedByOrderType;
|
|
3724
|
-
dragToScroll?: boolean;
|
|
3725
3722
|
sameHeight?: boolean;
|
|
3726
|
-
} &
|
|
3723
|
+
} & CarouselProps['setting'];
|
|
3727
3724
|
type ProductListProps = BasePropsWrap<ProductListSetting, ProductListSettingStyles> & {
|
|
3728
3725
|
style?: React.CSSProperties;
|
|
3729
3726
|
className?: string;
|
|
@@ -6293,7 +6290,7 @@ declare const MarqueeItem: ({ builderProps, itemBackgroundColor, itemBorderStyle
|
|
|
6293
6290
|
|
|
6294
6291
|
declare const Marquee: ({ children, style, builderAttrs, rawChildren, advanced, ...props }: MarqueeProps) => string;
|
|
6295
6292
|
|
|
6296
|
-
declare const Text: ({ styles, builderAttrs, style, setting, advanced, builderProps, className, isText, pageContext, elementAttrs, }: _gem_sdk_core.BaseProps<{
|
|
6293
|
+
declare const Text: ({ id, styles, builderAttrs, style, setting, advanced, builderProps, className, isText, pageContext, elementAttrs, }: _gem_sdk_core.BaseProps<{
|
|
6297
6294
|
text?: string | number | undefined;
|
|
6298
6295
|
translate?: string | undefined;
|
|
6299
6296
|
htmlTag?: React.ElementType<any> | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.475",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"update-img-src-3rd": "node ./scripts/update-img-src-3rd.js"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@gem-sdk/core": "2.0.0-dev.
|
|
26
|
+
"@gem-sdk/core": "2.0.0-dev.474",
|
|
27
27
|
"@gem-sdk/styles": "2.0.0-dev.464",
|
|
28
28
|
"@gem-sdk/system": "2.0.0-dev.464",
|
|
29
29
|
"@types/react-transition-group": "^4.4.5"
|