@gem-sdk/components 2.0.0-dev.560 → 2.0.0-dev.562
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/accordion/setting/Accordion.js +4 -12
- package/dist/cjs/accordion/setting/configs/settings.js +1 -1
- package/dist/cjs/article/components/ArticleList.js +1 -1
- package/dist/cjs/article/setting/ArticleList.js +1 -1
- package/dist/cjs/article/setting/configs/ArticleImage/settings.js +4 -2
- package/dist/cjs/article/setting/configs/ArticleImage/uiV2.js +32 -10
- package/dist/cjs/article/setting/configs/ArticleList/settings.js +1 -4
- package/dist/cjs/article/setting/configs/ArticleList/uiV2.js +26 -23
- package/dist/cjs/collection/components/collection-description/common/classes.js +5 -1
- package/dist/cjs/collection/components/collection-description/common/styles.js +0 -4
- package/dist/cjs/collection/components/collection-description/components/CollectionDescription.js +10 -1
- package/dist/cjs/collection/components/collection-description/components/CollectionDescription.liquid.js +3 -4
- package/dist/cjs/collection/components/collection-paginator/common/index.js +2 -2
- package/dist/cjs/collection/components/collection-paginator/common/styles.js +2 -1
- package/dist/cjs/collection/components/collection-paginator/components/CollectionPaginator.js +6 -4
- package/dist/cjs/collection/components/collection-paginator/components/CollectionPaginator.liquid.js +4 -2
- package/dist/cjs/collection/setting/collection-toolbar/configs/uiV2.js +2 -0
- package/dist/cjs/product/components/ProductDescription/common/getClasses.js +4 -0
- package/dist/cjs/product/components/ProductDescription/index.js +4 -0
- package/dist/cjs/product/components/ProductDescription/index.liquid.js +2 -0
- package/dist/esm/accordion/setting/Accordion.js +4 -12
- package/dist/esm/accordion/setting/configs/settings.js +1 -1
- package/dist/esm/article/components/ArticleList.js +1 -1
- package/dist/esm/article/setting/ArticleList.js +1 -1
- package/dist/esm/article/setting/configs/ArticleImage/settings.js +4 -2
- package/dist/esm/article/setting/configs/ArticleImage/uiV2.js +32 -10
- package/dist/esm/article/setting/configs/ArticleList/settings.js +1 -4
- package/dist/esm/article/setting/configs/ArticleList/uiV2.js +26 -23
- package/dist/esm/collection/components/collection-description/common/classes.js +5 -2
- package/dist/esm/collection/components/collection-description/common/styles.js +1 -4
- package/dist/esm/collection/components/collection-description/components/CollectionDescription.js +11 -2
- package/dist/esm/collection/components/collection-description/components/CollectionDescription.liquid.js +5 -6
- package/dist/esm/collection/components/collection-paginator/common/index.js +2 -2
- package/dist/esm/collection/components/collection-paginator/common/styles.js +2 -1
- package/dist/esm/collection/components/collection-paginator/components/CollectionPaginator.js +6 -4
- package/dist/esm/collection/components/collection-paginator/components/CollectionPaginator.liquid.js +4 -2
- package/dist/esm/collection/setting/collection-toolbar/configs/uiV2.js +2 -0
- package/dist/esm/product/components/ProductDescription/common/getClasses.js +5 -2
- package/dist/esm/product/components/ProductDescription/index.js +5 -1
- package/dist/esm/product/components/ProductDescription/index.liquid.js +3 -1
- package/package.json +2 -2
|
@@ -181,24 +181,16 @@ const config = {
|
|
|
181
181
|
},
|
|
182
182
|
styles: {
|
|
183
183
|
bgColor: {
|
|
184
|
-
normal: '#333333'
|
|
185
|
-
active: '#333333',
|
|
186
|
-
hover: '#333333'
|
|
184
|
+
normal: '#333333'
|
|
187
185
|
},
|
|
188
186
|
iconColor: {
|
|
189
|
-
normal: '#EAEAEA'
|
|
190
|
-
active: '#EAEAEA',
|
|
191
|
-
hover: '#EAEAEA'
|
|
187
|
+
normal: '#EAEAEA'
|
|
192
188
|
},
|
|
193
189
|
textColor: {
|
|
194
|
-
normal: '#EAEAEA'
|
|
195
|
-
active: '#EAEAEA',
|
|
196
|
-
hover: '#EAEAEA'
|
|
190
|
+
normal: '#EAEAEA'
|
|
197
191
|
},
|
|
198
192
|
color: {
|
|
199
|
-
normal: '#EAEAEA'
|
|
200
|
-
active: '#EAEAEA',
|
|
201
|
-
hover: '#EAEAEA'
|
|
193
|
+
normal: '#EAEAEA'
|
|
202
194
|
},
|
|
203
195
|
itemGap: '16px'
|
|
204
196
|
},
|
|
@@ -13,7 +13,7 @@ const ArticleImageSettings = [
|
|
|
13
13
|
id: 'alt',
|
|
14
14
|
label: 'Alt Text',
|
|
15
15
|
type: 'textarea',
|
|
16
|
-
minHeight:
|
|
16
|
+
minHeight: 56,
|
|
17
17
|
autoHeight: true,
|
|
18
18
|
placeholder: 'E.g: This is a very long value for text area field'
|
|
19
19
|
},
|
|
@@ -21,7 +21,9 @@ const ArticleImageSettings = [
|
|
|
21
21
|
id: 'title',
|
|
22
22
|
label: 'Image title',
|
|
23
23
|
info: 'Show title when hover to image',
|
|
24
|
-
type: '
|
|
24
|
+
type: 'textarea',
|
|
25
|
+
minHeight: 56,
|
|
26
|
+
autoHeight: true,
|
|
25
27
|
placeholder: 'E.g: White t-shirt'
|
|
26
28
|
}
|
|
27
29
|
]
|
|
@@ -159,22 +159,44 @@ const uiV2 = [
|
|
|
159
159
|
},
|
|
160
160
|
controls: [
|
|
161
161
|
{
|
|
162
|
-
type: '
|
|
163
|
-
setting: {
|
|
164
|
-
id: 'alt'
|
|
165
|
-
},
|
|
162
|
+
type: 'combo',
|
|
166
163
|
label: {
|
|
167
164
|
en: 'Alt text'
|
|
168
|
-
}
|
|
165
|
+
},
|
|
166
|
+
iconName: 'polaris-text-block',
|
|
167
|
+
getValueFromSettingID: 'alt',
|
|
168
|
+
isHideClear: true,
|
|
169
|
+
controls: [
|
|
170
|
+
{
|
|
171
|
+
label: {
|
|
172
|
+
en: 'Content'
|
|
173
|
+
},
|
|
174
|
+
setting: {
|
|
175
|
+
id: 'alt'
|
|
176
|
+
},
|
|
177
|
+
layout: 'vertical'
|
|
178
|
+
}
|
|
179
|
+
]
|
|
169
180
|
},
|
|
170
181
|
{
|
|
171
|
-
type: '
|
|
172
|
-
setting: {
|
|
173
|
-
id: 'title'
|
|
174
|
-
},
|
|
182
|
+
type: 'combo',
|
|
175
183
|
label: {
|
|
176
184
|
en: 'Image title'
|
|
177
|
-
}
|
|
185
|
+
},
|
|
186
|
+
iconName: 'polaris-text-block',
|
|
187
|
+
getValueFromSettingID: 'title',
|
|
188
|
+
isHideClear: true,
|
|
189
|
+
controls: [
|
|
190
|
+
{
|
|
191
|
+
label: {
|
|
192
|
+
en: 'Content'
|
|
193
|
+
},
|
|
194
|
+
setting: {
|
|
195
|
+
id: 'title'
|
|
196
|
+
},
|
|
197
|
+
layout: 'vertical'
|
|
198
|
+
}
|
|
199
|
+
]
|
|
178
200
|
}
|
|
179
201
|
]
|
|
180
202
|
},
|
|
@@ -26,6 +26,15 @@ const uiV2 = [
|
|
|
26
26
|
setting: {
|
|
27
27
|
id: 'slideToShow'
|
|
28
28
|
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: {
|
|
32
|
+
en: 'Sort by'
|
|
33
|
+
},
|
|
34
|
+
conditionDisplay: 'articleSetting && articleSetting.articlePickType !== "manually"',
|
|
35
|
+
setting: {
|
|
36
|
+
id: 'articleOrderBy'
|
|
37
|
+
}
|
|
29
38
|
}
|
|
30
39
|
]
|
|
31
40
|
},
|
|
@@ -144,8 +153,7 @@ const uiV2 = [
|
|
|
144
153
|
en: 'Border'
|
|
145
154
|
},
|
|
146
155
|
setting: {
|
|
147
|
-
id: 'wrapperBorder'
|
|
148
|
-
state: 'normal'
|
|
156
|
+
id: 'wrapperBorder'
|
|
149
157
|
}
|
|
150
158
|
},
|
|
151
159
|
{
|
|
@@ -153,8 +161,7 @@ const uiV2 = [
|
|
|
153
161
|
en: 'Corner'
|
|
154
162
|
},
|
|
155
163
|
setting: {
|
|
156
|
-
id: 'borderRadius'
|
|
157
|
-
state: 'normal'
|
|
164
|
+
id: 'borderRadius'
|
|
158
165
|
}
|
|
159
166
|
},
|
|
160
167
|
{
|
|
@@ -162,45 +169,41 @@ const uiV2 = [
|
|
|
162
169
|
en: 'Shadow'
|
|
163
170
|
},
|
|
164
171
|
setting: {
|
|
165
|
-
id: '
|
|
166
|
-
state: 'normal'
|
|
172
|
+
id: 'shadow'
|
|
167
173
|
},
|
|
168
174
|
options: {
|
|
169
175
|
updateFields: [
|
|
170
176
|
{
|
|
171
|
-
field: '
|
|
172
|
-
settingId: '
|
|
173
|
-
state: 'normal'
|
|
177
|
+
field: 'enable',
|
|
178
|
+
settingId: 'hasActiveShadow'
|
|
174
179
|
}
|
|
175
180
|
]
|
|
176
181
|
},
|
|
177
182
|
controlChangeTrigger: {
|
|
178
183
|
settings: [
|
|
179
184
|
{
|
|
180
|
-
condition: `
|
|
185
|
+
condition: `shadow.enable === true`,
|
|
181
186
|
source: [
|
|
182
|
-
'
|
|
183
|
-
'
|
|
187
|
+
'shadow',
|
|
188
|
+
'hasActiveShadow'
|
|
184
189
|
],
|
|
185
190
|
action: {
|
|
186
|
-
controlId: '
|
|
187
|
-
groupType: '
|
|
188
|
-
controlType: '
|
|
189
|
-
state: 'normal',
|
|
191
|
+
controlId: 'hasActiveShadow',
|
|
192
|
+
groupType: 'style',
|
|
193
|
+
controlType: 'style',
|
|
190
194
|
newValue: true
|
|
191
195
|
}
|
|
192
196
|
},
|
|
193
197
|
{
|
|
194
|
-
condition: `
|
|
198
|
+
condition: `shadow.enable === false`,
|
|
195
199
|
source: [
|
|
196
|
-
'
|
|
197
|
-
'
|
|
200
|
+
'shadow',
|
|
201
|
+
'hasActiveShadow'
|
|
198
202
|
],
|
|
199
203
|
action: {
|
|
200
|
-
controlId: '
|
|
201
|
-
groupType: '
|
|
202
|
-
controlType: '
|
|
203
|
-
state: 'normal',
|
|
204
|
+
controlId: 'hasActiveShadow',
|
|
205
|
+
groupType: 'style',
|
|
206
|
+
controlType: 'style',
|
|
204
207
|
newValue: false
|
|
205
208
|
}
|
|
206
209
|
}
|
|
@@ -4,7 +4,7 @@ var core = require('@gem-sdk/core');
|
|
|
4
4
|
|
|
5
5
|
const getClassContainerCollectionDes = ({ setting })=>{
|
|
6
6
|
const appendTypoClass = core.composeTypographyClassName(setting?.typo, setting?.typography);
|
|
7
|
-
return composeClasses(core.cls('gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre', appendTypoClass, core.getGlobalColorClass('text', setting?.color), "data-[browser=safari]:after:gp-content-[' '] data-[browser=safari]:after:gp-absolute data-[browser=safari]:after:gp-left-0 data-[browser=safari]:after:gp-right-0 data-[browser=safari]:after:gp-bottom-0 data-[browser=safari]:after:gp-w-full data-[browser=safari]:after:gp-h-1/2 data-[browser=safari]:after:gp-bg-gradient-to-t data-[browser=safari]:after:gp-from-white"));
|
|
7
|
+
return composeClasses(core.cls('gp-relative p-description-wrapper gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre', appendTypoClass, core.getGlobalColorClass('text', setting?.color), "data-[browser=safari]:after:gp-content-[' '] data-[browser=safari]:after:gp-absolute data-[browser=safari]:after:gp-left-0 data-[browser=safari]:after:gp-right-0 data-[browser=safari]:after:gp-bottom-0 data-[browser=safari]:after:gp-w-full data-[browser=safari]:after:gp-h-1/2 data-[browser=safari]:after:gp-bg-gradient-to-t data-[browser=safari]:after:gp-from-white"));
|
|
8
8
|
};
|
|
9
9
|
const getClassButtonViewMore = ({ setting })=>{
|
|
10
10
|
const appendTypoClass = core.composeTypographyClassName(setting?.typo, setting?.typography);
|
|
@@ -19,6 +19,9 @@ const getShowMoreIconClasses = ()=>{
|
|
|
19
19
|
const getShowMoreTextClasses = ()=>{
|
|
20
20
|
return composeClasses(core.cls('gp-show-more-text'));
|
|
21
21
|
};
|
|
22
|
+
const getClassPreBuilt = ()=>{
|
|
23
|
+
return composeClasses(core.cls('gp-rotate-180 gp-hidden'));
|
|
24
|
+
};
|
|
22
25
|
const composeClasses = (classes)=>{
|
|
23
26
|
return classes.trim().split(/\s+/).reduce((acc, className)=>{
|
|
24
27
|
acc[className] = true;
|
|
@@ -28,6 +31,7 @@ const composeClasses = (classes)=>{
|
|
|
28
31
|
|
|
29
32
|
exports.getClassButtonViewMore = getClassButtonViewMore;
|
|
30
33
|
exports.getClassContainerCollectionDes = getClassContainerCollectionDes;
|
|
34
|
+
exports.getClassPreBuilt = getClassPreBuilt;
|
|
31
35
|
exports.getDescriptionClasses = getDescriptionClasses;
|
|
32
36
|
exports.getShowMoreIconClasses = getShowMoreIconClasses;
|
|
33
37
|
exports.getShowMoreTextClasses = getShowMoreTextClasses;
|
|
@@ -59,9 +59,6 @@ const getStyleDefaultViewMore = (setting)=>{
|
|
|
59
59
|
...getDisplayCollapse()
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
|
-
const getDisplayCollapse = (setting)=>{
|
|
63
|
-
return helpers.getDisplayStyle((device)=>!!setting?.hasLineClamp && setting.hasLineClamp[device] !== undefined && !setting.hasLineClamp[device], 'block');
|
|
64
|
-
};
|
|
65
62
|
const getStaticCss = ()=>{
|
|
66
63
|
const gpDescriptionCss = `
|
|
67
64
|
.gp-p-description-text > *:not(ol):not(ul):not(table):not(div):not(style):not(script) {
|
|
@@ -87,7 +84,6 @@ const getStaticCss = ()=>{
|
|
|
87
84
|
};
|
|
88
85
|
|
|
89
86
|
exports.getDefaultStyleCollectionDes = getDefaultStyleCollectionDes;
|
|
90
|
-
exports.getDisplayCollapse = getDisplayCollapse;
|
|
91
87
|
exports.getMaxHeightStyleDefault = getMaxHeightStyleDefault;
|
|
92
88
|
exports.getStaticCss = getStaticCss;
|
|
93
89
|
exports.getStyleDefaultViewMore = getStyleDefaultViewMore;
|
package/dist/cjs/collection/components/collection-description/components/CollectionDescription.js
CHANGED
|
@@ -25,8 +25,14 @@ const CollectionDescription = ({ setting, builderProps, pageContext, advanced })
|
|
|
25
25
|
const gpDescriptionClasses = system.createClass(classes.getDescriptionClasses({
|
|
26
26
|
advanced
|
|
27
27
|
}));
|
|
28
|
-
const showMoreIconClasses = system.createClass(
|
|
28
|
+
const showMoreIconClasses = system.createClass({
|
|
29
|
+
...classes.getShowMoreIconClasses(),
|
|
30
|
+
...open ? {
|
|
31
|
+
'gp-rotate-180': true
|
|
32
|
+
} : {}
|
|
33
|
+
});
|
|
29
34
|
const showMoreTextClasses = system.createClass(classes.getShowMoreTextClasses());
|
|
35
|
+
const classPreBuilt = system.createClass(classes.getClassPreBuilt());
|
|
30
36
|
const textStyle = system.createStyle({
|
|
31
37
|
...styles.getDefaultStyleCollectionDes({
|
|
32
38
|
setting
|
|
@@ -66,6 +72,9 @@ const CollectionDescription = ({ setting, builderProps, pageContext, advanced })
|
|
|
66
72
|
system.If(!core.isSafari(), /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
67
73
|
children: gpDescriptionCss
|
|
68
74
|
}), ''),
|
|
75
|
+
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
76
|
+
className: classPreBuilt
|
|
77
|
+
}),
|
|
69
78
|
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
70
79
|
ref: ref,
|
|
71
80
|
className: classContainerCollectionDes,
|
|
@@ -23,6 +23,7 @@ const CollectionDescription = ({ setting, advanced, builderProps, pageContext })
|
|
|
23
23
|
}));
|
|
24
24
|
const showMoreIconClasses = system.createClass(classes.getShowMoreIconClasses());
|
|
25
25
|
const showMoreTextClasses = system.createClass(classes.getShowMoreTextClasses());
|
|
26
|
+
const classPreBuilt = system.createClass(classes.getClassPreBuilt());
|
|
26
27
|
const textStyle = system.createStyle({
|
|
27
28
|
...styles.getDefaultStyleCollectionDes({
|
|
28
29
|
setting,
|
|
@@ -31,10 +32,7 @@ const CollectionDescription = ({ setting, advanced, builderProps, pageContext })
|
|
|
31
32
|
...core.makeStyleResponsive('line-clamp', core.makeLineClamp(setting?.lineClamp, setting?.hasLineClamp))
|
|
32
33
|
});
|
|
33
34
|
const styleViewMore = system.createStyle({
|
|
34
|
-
...styles.getStyleDefaultViewMore(setting)
|
|
35
|
-
...styles.getDisplayCollapse(setting),
|
|
36
|
-
position: 'absolute',
|
|
37
|
-
visibility: 'hidden'
|
|
35
|
+
...styles.getStyleDefaultViewMore(setting)
|
|
38
36
|
});
|
|
39
37
|
const viewLessText = index.getViewLessText({
|
|
40
38
|
setting,
|
|
@@ -79,6 +77,7 @@ const CollectionDescription = ({ setting, advanced, builderProps, pageContext })
|
|
|
79
77
|
>
|
|
80
78
|
<style>${textDescriptionCss}</style>
|
|
81
79
|
${system.If(!core.isSafari(), `<style>${gpDescriptionCss}</style>`, ' ')}
|
|
80
|
+
<div class="${classPreBuilt}" ></div>
|
|
82
81
|
${system.LiquidUnless('collection', `<p>Collection not found</p>`, core.template`<div ${textAttr} class="${classContainerCollectionDes}" style="${textStyle}">
|
|
83
82
|
{{collection.description}}
|
|
84
83
|
</div>
|
|
@@ -36,8 +36,8 @@ const renderPaginatorLive = ({ setting, builderProps, pageContext })=>{
|
|
|
36
36
|
const limit = numberOfProductOfProductList > 0 ? numberOfProductOfProductList : 4;
|
|
37
37
|
return `
|
|
38
38
|
{% paginate collection.products by ${limit} %}
|
|
39
|
-
{% assign previousText = ${pageContext?.isPreviewing ? `${previousTextVal}` : previousTextVal} %}
|
|
40
|
-
{% assign nextText = ${pageContext?.isPreviewing ? `${nextTextVal}` : nextTextVal} %}
|
|
39
|
+
{% assign previousText = ${pageContext?.isPreviewing ? `${previousTextVal}` : previousTextVal || `""`} %}
|
|
40
|
+
{% assign nextText = ${pageContext?.isPreviewing ? `${nextTextVal}` : nextTextVal || `""`} %}
|
|
41
41
|
{{ paginate | default_pagination: previous: previousText, next: nextText }}
|
|
42
42
|
{% endpaginate %}
|
|
43
43
|
`;
|
|
@@ -12,8 +12,9 @@ const getPaginatorStyle = (isActive, customStyle, activeColor)=>({
|
|
|
12
12
|
} : {}
|
|
13
13
|
});
|
|
14
14
|
const getCustomStyle = (setting)=>{
|
|
15
|
-
const { typo,
|
|
15
|
+
const { typo, layout, typographyPaginator, itemSpacing, buttonSizeNumber, buttonShape } = setting ?? {};
|
|
16
16
|
const appendTypoStyle = core.composeTypographyStyle(typo, typographyPaginator);
|
|
17
|
+
const normalColor = typo?.attrs?.color;
|
|
17
18
|
let customStyle = core.composeMemo(()=>{
|
|
18
19
|
return core.removeNullUndefined({
|
|
19
20
|
...appendTypoStyle,
|
package/dist/cjs/collection/components/collection-paginator/components/CollectionPaginator.js
CHANGED
|
@@ -30,11 +30,13 @@ const CollectionPaginator = ({ setting, builderProps })=>{
|
|
|
30
30
|
});
|
|
31
31
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
32
32
|
id: builderProps?.uid,
|
|
33
|
-
className: classPaginator,
|
|
34
|
-
style: stylePaginator,
|
|
35
33
|
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
36
|
-
className:
|
|
37
|
-
|
|
34
|
+
className: classPaginator,
|
|
35
|
+
style: stylePaginator,
|
|
36
|
+
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
37
|
+
className: classPaginatorWrapper,
|
|
38
|
+
children: paginatorItems
|
|
39
|
+
})
|
|
38
40
|
})
|
|
39
41
|
});
|
|
40
42
|
};
|
package/dist/cjs/collection/components/collection-paginator/components/CollectionPaginator.liquid.js
CHANGED
|
@@ -47,8 +47,10 @@ const CollectionPaginator = ({ setting, builderProps, pageContext })=>{
|
|
|
47
47
|
uid: builderProps?.uid
|
|
48
48
|
});
|
|
49
49
|
return core.template`
|
|
50
|
-
<gp-collection-paginator gp-data='${JSON.stringify(stateData).replaceAll("'", ''')}' id="${builderProps?.uid}"
|
|
51
|
-
<div class="${
|
|
50
|
+
<gp-collection-paginator gp-data='${JSON.stringify(stateData).replaceAll("'", ''')}' id="${builderProps?.uid}" >
|
|
51
|
+
<div class="${classPaginator}" style="${stylePaginator}">
|
|
52
|
+
<div class="${classPaginatorWrapper}">${paginatorItem}</div>
|
|
53
|
+
</div>
|
|
52
54
|
</gp-collection-paginator>
|
|
53
55
|
${core.RenderIf(core.isLocalEnv, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-collection-paginator.js' | asset_url }}" defer="defer"></script>`, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="${core.baseAssetURL}/assets-v2/gp-collection-paginator.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
54
56
|
`;
|
|
@@ -13,6 +13,7 @@ const SettingUIV2 = [
|
|
|
13
13
|
},
|
|
14
14
|
iconName: 'polaris-text-block',
|
|
15
15
|
getValueFromSettingID: 'sortingTextDisplay',
|
|
16
|
+
isHideClear: true,
|
|
16
17
|
controls: [
|
|
17
18
|
{
|
|
18
19
|
label: {
|
|
@@ -53,6 +54,7 @@ const SettingUIV2 = [
|
|
|
53
54
|
},
|
|
54
55
|
iconName: 'polaris-text-block',
|
|
55
56
|
getValueFromSettingID: 'quantityTextDisplay',
|
|
57
|
+
isHideClear: true,
|
|
56
58
|
controls: [
|
|
57
59
|
{
|
|
58
60
|
label: {
|
|
@@ -25,6 +25,10 @@ const getButtonClasses = ({ setting })=>{
|
|
|
25
25
|
[globalColorClass]: true
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
+
const getClassPreBuilt = ()=>{
|
|
29
|
+
return core.composeClasses(core.cls('gp-rotate-180 gp-hidden'));
|
|
30
|
+
};
|
|
28
31
|
|
|
29
32
|
exports.getButtonClasses = getButtonClasses;
|
|
33
|
+
exports.getClassPreBuilt = getClassPreBuilt;
|
|
30
34
|
exports.getClasses = getClasses;
|
|
@@ -39,6 +39,7 @@ const ProductDescription = (props)=>{
|
|
|
39
39
|
'gp-rotate-180': true
|
|
40
40
|
} : {}
|
|
41
41
|
});
|
|
42
|
+
const classPreBuilt = system.createClass(getClasses.getClassPreBuilt());
|
|
42
43
|
const textStyle = system.createStyle({
|
|
43
44
|
...getStyle.getTextStyle({
|
|
44
45
|
setting
|
|
@@ -83,6 +84,9 @@ const ProductDescription = (props)=>{
|
|
|
83
84
|
system.If(!core.isSafari(), /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
84
85
|
children: gpDescriptionCss
|
|
85
86
|
}), ' '),
|
|
87
|
+
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
88
|
+
className: classPreBuilt
|
|
89
|
+
}),
|
|
86
90
|
/*#__PURE__*/ jsxRuntime.jsx(Tag, {
|
|
87
91
|
ref: ref,
|
|
88
92
|
...textAttr,
|
|
@@ -36,6 +36,7 @@ const ProductDescription = (props)=>{
|
|
|
36
36
|
}),
|
|
37
37
|
...core.makeStyleResponsive('line-clamp', core.makeLineClamp(setting?.lineClamp, setting?.hasLineClamp))
|
|
38
38
|
});
|
|
39
|
+
const classPreBuilt = system.createClass(getClasses.getClassPreBuilt());
|
|
39
40
|
const buttonStyle = system.createStyle(getStyle.getButtonStyle({
|
|
40
41
|
setting
|
|
41
42
|
}));
|
|
@@ -67,6 +68,7 @@ const ProductDescription = (props)=>{
|
|
|
67
68
|
class="${gpDescriptionClasses}"
|
|
68
69
|
gp-data='${core.dataStringify(stateData).replaceAll("'", ''')}'>
|
|
69
70
|
<style>${textDescriptionCss}</style>
|
|
71
|
+
<div class="${classPreBuilt}" ></div>
|
|
70
72
|
${system.LiquidUnless('product', `<p>Product not found</p>`, core.template`<${Tag} ${textAttr} class="${textClasses}" style="${textStyle}">
|
|
71
73
|
{{product.description}}
|
|
72
74
|
</${Tag}>
|
|
@@ -177,24 +177,16 @@ const config = {
|
|
|
177
177
|
},
|
|
178
178
|
styles: {
|
|
179
179
|
bgColor: {
|
|
180
|
-
normal: '#333333'
|
|
181
|
-
active: '#333333',
|
|
182
|
-
hover: '#333333'
|
|
180
|
+
normal: '#333333'
|
|
183
181
|
},
|
|
184
182
|
iconColor: {
|
|
185
|
-
normal: '#EAEAEA'
|
|
186
|
-
active: '#EAEAEA',
|
|
187
|
-
hover: '#EAEAEA'
|
|
183
|
+
normal: '#EAEAEA'
|
|
188
184
|
},
|
|
189
185
|
textColor: {
|
|
190
|
-
normal: '#EAEAEA'
|
|
191
|
-
active: '#EAEAEA',
|
|
192
|
-
hover: '#EAEAEA'
|
|
186
|
+
normal: '#EAEAEA'
|
|
193
187
|
},
|
|
194
188
|
color: {
|
|
195
|
-
normal: '#EAEAEA'
|
|
196
|
-
active: '#EAEAEA',
|
|
197
|
-
hover: '#EAEAEA'
|
|
189
|
+
normal: '#EAEAEA'
|
|
198
190
|
},
|
|
199
191
|
itemGap: '16px'
|
|
200
192
|
},
|
|
@@ -11,7 +11,7 @@ const ArticleImageSettings = [
|
|
|
11
11
|
id: 'alt',
|
|
12
12
|
label: 'Alt Text',
|
|
13
13
|
type: 'textarea',
|
|
14
|
-
minHeight:
|
|
14
|
+
minHeight: 56,
|
|
15
15
|
autoHeight: true,
|
|
16
16
|
placeholder: 'E.g: This is a very long value for text area field'
|
|
17
17
|
},
|
|
@@ -19,7 +19,9 @@ const ArticleImageSettings = [
|
|
|
19
19
|
id: 'title',
|
|
20
20
|
label: 'Image title',
|
|
21
21
|
info: 'Show title when hover to image',
|
|
22
|
-
type: '
|
|
22
|
+
type: 'textarea',
|
|
23
|
+
minHeight: 56,
|
|
24
|
+
autoHeight: true,
|
|
23
25
|
placeholder: 'E.g: White t-shirt'
|
|
24
26
|
}
|
|
25
27
|
]
|
|
@@ -157,22 +157,44 @@ const uiV2 = [
|
|
|
157
157
|
},
|
|
158
158
|
controls: [
|
|
159
159
|
{
|
|
160
|
-
type: '
|
|
161
|
-
setting: {
|
|
162
|
-
id: 'alt'
|
|
163
|
-
},
|
|
160
|
+
type: 'combo',
|
|
164
161
|
label: {
|
|
165
162
|
en: 'Alt text'
|
|
166
|
-
}
|
|
163
|
+
},
|
|
164
|
+
iconName: 'polaris-text-block',
|
|
165
|
+
getValueFromSettingID: 'alt',
|
|
166
|
+
isHideClear: true,
|
|
167
|
+
controls: [
|
|
168
|
+
{
|
|
169
|
+
label: {
|
|
170
|
+
en: 'Content'
|
|
171
|
+
},
|
|
172
|
+
setting: {
|
|
173
|
+
id: 'alt'
|
|
174
|
+
},
|
|
175
|
+
layout: 'vertical'
|
|
176
|
+
}
|
|
177
|
+
]
|
|
167
178
|
},
|
|
168
179
|
{
|
|
169
|
-
type: '
|
|
170
|
-
setting: {
|
|
171
|
-
id: 'title'
|
|
172
|
-
},
|
|
180
|
+
type: 'combo',
|
|
173
181
|
label: {
|
|
174
182
|
en: 'Image title'
|
|
175
|
-
}
|
|
183
|
+
},
|
|
184
|
+
iconName: 'polaris-text-block',
|
|
185
|
+
getValueFromSettingID: 'title',
|
|
186
|
+
isHideClear: true,
|
|
187
|
+
controls: [
|
|
188
|
+
{
|
|
189
|
+
label: {
|
|
190
|
+
en: 'Content'
|
|
191
|
+
},
|
|
192
|
+
setting: {
|
|
193
|
+
id: 'title'
|
|
194
|
+
},
|
|
195
|
+
layout: 'vertical'
|
|
196
|
+
}
|
|
197
|
+
]
|
|
176
198
|
}
|
|
177
199
|
]
|
|
178
200
|
},
|
|
@@ -24,6 +24,15 @@ const uiV2 = [
|
|
|
24
24
|
setting: {
|
|
25
25
|
id: 'slideToShow'
|
|
26
26
|
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: {
|
|
30
|
+
en: 'Sort by'
|
|
31
|
+
},
|
|
32
|
+
conditionDisplay: 'articleSetting && articleSetting.articlePickType !== "manually"',
|
|
33
|
+
setting: {
|
|
34
|
+
id: 'articleOrderBy'
|
|
35
|
+
}
|
|
27
36
|
}
|
|
28
37
|
]
|
|
29
38
|
},
|
|
@@ -142,8 +151,7 @@ const uiV2 = [
|
|
|
142
151
|
en: 'Border'
|
|
143
152
|
},
|
|
144
153
|
setting: {
|
|
145
|
-
id: 'wrapperBorder'
|
|
146
|
-
state: 'normal'
|
|
154
|
+
id: 'wrapperBorder'
|
|
147
155
|
}
|
|
148
156
|
},
|
|
149
157
|
{
|
|
@@ -151,8 +159,7 @@ const uiV2 = [
|
|
|
151
159
|
en: 'Corner'
|
|
152
160
|
},
|
|
153
161
|
setting: {
|
|
154
|
-
id: 'borderRadius'
|
|
155
|
-
state: 'normal'
|
|
162
|
+
id: 'borderRadius'
|
|
156
163
|
}
|
|
157
164
|
},
|
|
158
165
|
{
|
|
@@ -160,45 +167,41 @@ const uiV2 = [
|
|
|
160
167
|
en: 'Shadow'
|
|
161
168
|
},
|
|
162
169
|
setting: {
|
|
163
|
-
id: '
|
|
164
|
-
state: 'normal'
|
|
170
|
+
id: 'shadow'
|
|
165
171
|
},
|
|
166
172
|
options: {
|
|
167
173
|
updateFields: [
|
|
168
174
|
{
|
|
169
|
-
field: '
|
|
170
|
-
settingId: '
|
|
171
|
-
state: 'normal'
|
|
175
|
+
field: 'enable',
|
|
176
|
+
settingId: 'hasActiveShadow'
|
|
172
177
|
}
|
|
173
178
|
]
|
|
174
179
|
},
|
|
175
180
|
controlChangeTrigger: {
|
|
176
181
|
settings: [
|
|
177
182
|
{
|
|
178
|
-
condition: `
|
|
183
|
+
condition: `shadow.enable === true`,
|
|
179
184
|
source: [
|
|
180
|
-
'
|
|
181
|
-
'
|
|
185
|
+
'shadow',
|
|
186
|
+
'hasActiveShadow'
|
|
182
187
|
],
|
|
183
188
|
action: {
|
|
184
|
-
controlId: '
|
|
185
|
-
groupType: '
|
|
186
|
-
controlType: '
|
|
187
|
-
state: 'normal',
|
|
189
|
+
controlId: 'hasActiveShadow',
|
|
190
|
+
groupType: 'style',
|
|
191
|
+
controlType: 'style',
|
|
188
192
|
newValue: true
|
|
189
193
|
}
|
|
190
194
|
},
|
|
191
195
|
{
|
|
192
|
-
condition: `
|
|
196
|
+
condition: `shadow.enable === false`,
|
|
193
197
|
source: [
|
|
194
|
-
'
|
|
195
|
-
'
|
|
198
|
+
'shadow',
|
|
199
|
+
'hasActiveShadow'
|
|
196
200
|
],
|
|
197
201
|
action: {
|
|
198
|
-
controlId: '
|
|
199
|
-
groupType: '
|
|
200
|
-
controlType: '
|
|
201
|
-
state: 'normal',
|
|
202
|
+
controlId: 'hasActiveShadow',
|
|
203
|
+
groupType: 'style',
|
|
204
|
+
controlType: 'style',
|
|
202
205
|
newValue: false
|
|
203
206
|
}
|
|
204
207
|
}
|
|
@@ -2,7 +2,7 @@ import { composeTypographyClassName, cls, getGlobalColorClass } from '@gem-sdk/c
|
|
|
2
2
|
|
|
3
3
|
const getClassContainerCollectionDes = ({ setting })=>{
|
|
4
4
|
const appendTypoClass = composeTypographyClassName(setting?.typo, setting?.typography);
|
|
5
|
-
return composeClasses(cls('gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre', appendTypoClass, getGlobalColorClass('text', setting?.color), "data-[browser=safari]:after:gp-content-[' '] data-[browser=safari]:after:gp-absolute data-[browser=safari]:after:gp-left-0 data-[browser=safari]:after:gp-right-0 data-[browser=safari]:after:gp-bottom-0 data-[browser=safari]:after:gp-w-full data-[browser=safari]:after:gp-h-1/2 data-[browser=safari]:after:gp-bg-gradient-to-t data-[browser=safari]:after:gp-from-white"));
|
|
5
|
+
return composeClasses(cls('gp-relative p-description-wrapper gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre', appendTypoClass, getGlobalColorClass('text', setting?.color), "data-[browser=safari]:after:gp-content-[' '] data-[browser=safari]:after:gp-absolute data-[browser=safari]:after:gp-left-0 data-[browser=safari]:after:gp-right-0 data-[browser=safari]:after:gp-bottom-0 data-[browser=safari]:after:gp-w-full data-[browser=safari]:after:gp-h-1/2 data-[browser=safari]:after:gp-bg-gradient-to-t data-[browser=safari]:after:gp-from-white"));
|
|
6
6
|
};
|
|
7
7
|
const getClassButtonViewMore = ({ setting })=>{
|
|
8
8
|
const appendTypoClass = composeTypographyClassName(setting?.typo, setting?.typography);
|
|
@@ -17,6 +17,9 @@ const getShowMoreIconClasses = ()=>{
|
|
|
17
17
|
const getShowMoreTextClasses = ()=>{
|
|
18
18
|
return composeClasses(cls('gp-show-more-text'));
|
|
19
19
|
};
|
|
20
|
+
const getClassPreBuilt = ()=>{
|
|
21
|
+
return composeClasses(cls('gp-rotate-180 gp-hidden'));
|
|
22
|
+
};
|
|
20
23
|
const composeClasses = (classes)=>{
|
|
21
24
|
return classes.trim().split(/\s+/).reduce((acc, className)=>{
|
|
22
25
|
acc[className] = true;
|
|
@@ -24,4 +27,4 @@ const composeClasses = (classes)=>{
|
|
|
24
27
|
}, {});
|
|
25
28
|
};
|
|
26
29
|
|
|
27
|
-
export { getClassButtonViewMore, getClassContainerCollectionDes, getDescriptionClasses, getShowMoreIconClasses, getShowMoreTextClasses };
|
|
30
|
+
export { getClassButtonViewMore, getClassContainerCollectionDes, getClassPreBuilt, getDescriptionClasses, getShowMoreIconClasses, getShowMoreTextClasses };
|
|
@@ -57,9 +57,6 @@ const getStyleDefaultViewMore = (setting)=>{
|
|
|
57
57
|
...getDisplayCollapse()
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
|
-
const getDisplayCollapse = (setting)=>{
|
|
61
|
-
return getDisplayStyle((device)=>!!setting?.hasLineClamp && setting.hasLineClamp[device] !== undefined && !setting.hasLineClamp[device], 'block');
|
|
62
|
-
};
|
|
63
60
|
const getStaticCss = ()=>{
|
|
64
61
|
const gpDescriptionCss = `
|
|
65
62
|
.gp-p-description-text > *:not(ol):not(ul):not(table):not(div):not(style):not(script) {
|
|
@@ -84,4 +81,4 @@ const getStaticCss = ()=>{
|
|
|
84
81
|
};
|
|
85
82
|
};
|
|
86
83
|
|
|
87
|
-
export { getDefaultStyleCollectionDes,
|
|
84
|
+
export { getDefaultStyleCollectionDes, getMaxHeightStyleDefault, getStaticCss, getStyleDefaultViewMore };
|
package/dist/esm/collection/components/collection-description/components/CollectionDescription.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useCollection, makeStyleResponsive, makeLineClamp, isSafari } from '@gem-sdk/core';
|
|
4
4
|
import { getDefaultStyleCollectionDes, getStyleDefaultViewMore, getStaticCss } from '../common/styles.js';
|
|
5
|
-
import { getClassContainerCollectionDes, getClassButtonViewMore, getDescriptionClasses, getShowMoreIconClasses, getShowMoreTextClasses } from '../common/classes.js';
|
|
5
|
+
import { getClassContainerCollectionDes, getClassButtonViewMore, getDescriptionClasses, getShowMoreIconClasses, getShowMoreTextClasses, getClassPreBuilt } from '../common/classes.js';
|
|
6
6
|
import { createClass, createStyle, createAttr, If } from '@gem-sdk/system';
|
|
7
7
|
import { getViewLessText, getViewMoreText } from '../common/index.js';
|
|
8
8
|
import { useGpDescription } from '../hook/useDescription.js';
|
|
@@ -21,8 +21,14 @@ const CollectionDescription = ({ setting, builderProps, pageContext, advanced })
|
|
|
21
21
|
const gpDescriptionClasses = createClass(getDescriptionClasses({
|
|
22
22
|
advanced
|
|
23
23
|
}));
|
|
24
|
-
const showMoreIconClasses = createClass(
|
|
24
|
+
const showMoreIconClasses = createClass({
|
|
25
|
+
...getShowMoreIconClasses(),
|
|
26
|
+
...open ? {
|
|
27
|
+
'gp-rotate-180': true
|
|
28
|
+
} : {}
|
|
29
|
+
});
|
|
25
30
|
const showMoreTextClasses = createClass(getShowMoreTextClasses());
|
|
31
|
+
const classPreBuilt = createClass(getClassPreBuilt());
|
|
26
32
|
const textStyle = createStyle({
|
|
27
33
|
...getDefaultStyleCollectionDes({
|
|
28
34
|
setting
|
|
@@ -62,6 +68,9 @@ const CollectionDescription = ({ setting, builderProps, pageContext, advanced })
|
|
|
62
68
|
If(!isSafari(), /*#__PURE__*/ jsx("style", {
|
|
63
69
|
children: gpDescriptionCss
|
|
64
70
|
}), ''),
|
|
71
|
+
/*#__PURE__*/ jsx("div", {
|
|
72
|
+
className: classPreBuilt
|
|
73
|
+
}),
|
|
65
74
|
/*#__PURE__*/ jsx("div", {
|
|
66
75
|
ref: ref,
|
|
67
76
|
className: classContainerCollectionDes,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { makeStyleResponsive, makeLineClamp, template, isSafari, isLocalEnv, baseAssetURL } from '@gem-sdk/core';
|
|
2
2
|
import { getSettingPreloadData } from '../../../../helpers.js';
|
|
3
|
-
import { getDefaultStyleCollectionDes, getStyleDefaultViewMore,
|
|
3
|
+
import { getDefaultStyleCollectionDes, getStyleDefaultViewMore, getStaticCss } from '../common/styles.js';
|
|
4
4
|
import { createClass, createStyle, createAttr, createStateOrContext, If, Liquid, LiquidUnless, LiquidIf } from '@gem-sdk/system';
|
|
5
|
-
import { getClassContainerCollectionDes, getClassButtonViewMore, getDescriptionClasses, getShowMoreIconClasses, getShowMoreTextClasses } from '../common/classes.js';
|
|
5
|
+
import { getClassContainerCollectionDes, getClassButtonViewMore, getDescriptionClasses, getShowMoreIconClasses, getShowMoreTextClasses, getClassPreBuilt } from '../common/classes.js';
|
|
6
6
|
import { getViewLessText, getViewMoreText } from '../common/index.js';
|
|
7
7
|
import { ICON_SVG } from '../common/constant.js';
|
|
8
8
|
|
|
@@ -19,6 +19,7 @@ const CollectionDescription = ({ setting, advanced, builderProps, pageContext })
|
|
|
19
19
|
}));
|
|
20
20
|
const showMoreIconClasses = createClass(getShowMoreIconClasses());
|
|
21
21
|
const showMoreTextClasses = createClass(getShowMoreTextClasses());
|
|
22
|
+
const classPreBuilt = createClass(getClassPreBuilt());
|
|
22
23
|
const textStyle = createStyle({
|
|
23
24
|
...getDefaultStyleCollectionDes({
|
|
24
25
|
setting,
|
|
@@ -27,10 +28,7 @@ const CollectionDescription = ({ setting, advanced, builderProps, pageContext })
|
|
|
27
28
|
...makeStyleResponsive('line-clamp', makeLineClamp(setting?.lineClamp, setting?.hasLineClamp))
|
|
28
29
|
});
|
|
29
30
|
const styleViewMore = createStyle({
|
|
30
|
-
...getStyleDefaultViewMore(setting)
|
|
31
|
-
...getDisplayCollapse(setting),
|
|
32
|
-
position: 'absolute',
|
|
33
|
-
visibility: 'hidden'
|
|
31
|
+
...getStyleDefaultViewMore(setting)
|
|
34
32
|
});
|
|
35
33
|
const viewLessText = getViewLessText({
|
|
36
34
|
setting,
|
|
@@ -75,6 +73,7 @@ const CollectionDescription = ({ setting, advanced, builderProps, pageContext })
|
|
|
75
73
|
>
|
|
76
74
|
<style>${textDescriptionCss}</style>
|
|
77
75
|
${If(!isSafari(), `<style>${gpDescriptionCss}</style>`, ' ')}
|
|
76
|
+
<div class="${classPreBuilt}" ></div>
|
|
78
77
|
${LiquidUnless('collection', `<p>Collection not found</p>`, template`<div ${textAttr} class="${classContainerCollectionDes}" style="${textStyle}">
|
|
79
78
|
{{collection.description}}
|
|
80
79
|
</div>
|
|
@@ -34,8 +34,8 @@ const renderPaginatorLive = ({ setting, builderProps, pageContext })=>{
|
|
|
34
34
|
const limit = numberOfProductOfProductList > 0 ? numberOfProductOfProductList : 4;
|
|
35
35
|
return `
|
|
36
36
|
{% paginate collection.products by ${limit} %}
|
|
37
|
-
{% assign previousText = ${pageContext?.isPreviewing ? `${previousTextVal}` : previousTextVal} %}
|
|
38
|
-
{% assign nextText = ${pageContext?.isPreviewing ? `${nextTextVal}` : nextTextVal} %}
|
|
37
|
+
{% assign previousText = ${pageContext?.isPreviewing ? `${previousTextVal}` : previousTextVal || `""`} %}
|
|
38
|
+
{% assign nextText = ${pageContext?.isPreviewing ? `${nextTextVal}` : nextTextVal || `""`} %}
|
|
39
39
|
{{ paginate | default_pagination: previous: previousText, next: nextText }}
|
|
40
40
|
{% endpaginate %}
|
|
41
41
|
`;
|
|
@@ -10,8 +10,9 @@ const getPaginatorStyle = (isActive, customStyle, activeColor)=>({
|
|
|
10
10
|
} : {}
|
|
11
11
|
});
|
|
12
12
|
const getCustomStyle = (setting)=>{
|
|
13
|
-
const { typo,
|
|
13
|
+
const { typo, layout, typographyPaginator, itemSpacing, buttonSizeNumber, buttonShape } = setting ?? {};
|
|
14
14
|
const appendTypoStyle = composeTypographyStyle(typo, typographyPaginator);
|
|
15
|
+
const normalColor = typo?.attrs?.color;
|
|
15
16
|
let customStyle = composeMemo(()=>{
|
|
16
17
|
return removeNullUndefined({
|
|
17
18
|
...appendTypoStyle,
|
package/dist/esm/collection/components/collection-paginator/components/CollectionPaginator.js
CHANGED
|
@@ -26,11 +26,13 @@ const CollectionPaginator = ({ setting, builderProps })=>{
|
|
|
26
26
|
});
|
|
27
27
|
return /*#__PURE__*/ jsx("div", {
|
|
28
28
|
id: builderProps?.uid,
|
|
29
|
-
className: classPaginator,
|
|
30
|
-
style: stylePaginator,
|
|
31
29
|
children: /*#__PURE__*/ jsx("div", {
|
|
32
|
-
className:
|
|
33
|
-
|
|
30
|
+
className: classPaginator,
|
|
31
|
+
style: stylePaginator,
|
|
32
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
33
|
+
className: classPaginatorWrapper,
|
|
34
|
+
children: paginatorItems
|
|
35
|
+
})
|
|
34
36
|
})
|
|
35
37
|
});
|
|
36
38
|
};
|
package/dist/esm/collection/components/collection-paginator/components/CollectionPaginator.liquid.js
CHANGED
|
@@ -43,8 +43,10 @@ const CollectionPaginator = ({ setting, builderProps, pageContext })=>{
|
|
|
43
43
|
uid: builderProps?.uid
|
|
44
44
|
});
|
|
45
45
|
return template`
|
|
46
|
-
<gp-collection-paginator gp-data='${JSON.stringify(stateData).replaceAll("'", ''')}' id="${builderProps?.uid}"
|
|
47
|
-
<div class="${
|
|
46
|
+
<gp-collection-paginator gp-data='${JSON.stringify(stateData).replaceAll("'", ''')}' id="${builderProps?.uid}" >
|
|
47
|
+
<div class="${classPaginator}" style="${stylePaginator}">
|
|
48
|
+
<div class="${classPaginatorWrapper}">${paginatorItem}</div>
|
|
49
|
+
</div>
|
|
48
50
|
</gp-collection-paginator>
|
|
49
51
|
${RenderIf(isLocalEnv, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-collection-paginator.js' | asset_url }}" defer="defer"></script>`, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="${baseAssetURL}/assets-v2/gp-collection-paginator.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
50
52
|
`;
|
|
@@ -11,6 +11,7 @@ const SettingUIV2 = [
|
|
|
11
11
|
},
|
|
12
12
|
iconName: 'polaris-text-block',
|
|
13
13
|
getValueFromSettingID: 'sortingTextDisplay',
|
|
14
|
+
isHideClear: true,
|
|
14
15
|
controls: [
|
|
15
16
|
{
|
|
16
17
|
label: {
|
|
@@ -51,6 +52,7 @@ const SettingUIV2 = [
|
|
|
51
52
|
},
|
|
52
53
|
iconName: 'polaris-text-block',
|
|
53
54
|
getValueFromSettingID: 'quantityTextDisplay',
|
|
55
|
+
isHideClear: true,
|
|
54
56
|
controls: [
|
|
55
57
|
{
|
|
56
58
|
label: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { composeTypographyClassName, getGlobalColorClass } from '@gem-sdk/core';
|
|
1
|
+
import { composeTypographyClassName, getGlobalColorClass, composeClasses, cls } from '@gem-sdk/core';
|
|
2
2
|
|
|
3
3
|
const getClasses = ({ setting })=>{
|
|
4
4
|
const appendTypoClass = composeTypographyClassName(setting?.typo, setting?.typography);
|
|
@@ -23,5 +23,8 @@ const getButtonClasses = ({ setting })=>{
|
|
|
23
23
|
[globalColorClass]: true
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
+
const getClassPreBuilt = ()=>{
|
|
27
|
+
return composeClasses(cls('gp-rotate-180 gp-hidden'));
|
|
28
|
+
};
|
|
26
29
|
|
|
27
|
-
export { getButtonClasses, getClasses };
|
|
30
|
+
export { getButtonClasses, getClassPreBuilt, getClasses };
|
|
@@ -4,7 +4,7 @@ import { useProduct, useCurrentDevice, getResponsiveValueByScreen, makeStyleResp
|
|
|
4
4
|
import NoDataState from '../../../common/components/NoDataState.js';
|
|
5
5
|
import { ICON_SVG } from './common/const.js';
|
|
6
6
|
import { createClass, createStyle, createAttr, If } from '@gem-sdk/system';
|
|
7
|
-
import { getClasses, getButtonClasses } from './common/getClasses.js';
|
|
7
|
+
import { getClasses, getButtonClasses, getClassPreBuilt } from './common/getClasses.js';
|
|
8
8
|
import { getTextStyle, getButtonStyle, getStaticCss } from './common/getStyle.js';
|
|
9
9
|
import { useGpDescription } from './hooks/useGpDescription.js';
|
|
10
10
|
|
|
@@ -35,6 +35,7 @@ const ProductDescription = (props)=>{
|
|
|
35
35
|
'gp-rotate-180': true
|
|
36
36
|
} : {}
|
|
37
37
|
});
|
|
38
|
+
const classPreBuilt = createClass(getClassPreBuilt());
|
|
38
39
|
const textStyle = createStyle({
|
|
39
40
|
...getTextStyle({
|
|
40
41
|
setting
|
|
@@ -79,6 +80,9 @@ const ProductDescription = (props)=>{
|
|
|
79
80
|
If(!isSafari(), /*#__PURE__*/ jsx("style", {
|
|
80
81
|
children: gpDescriptionCss
|
|
81
82
|
}), ' '),
|
|
83
|
+
/*#__PURE__*/ jsx("div", {
|
|
84
|
+
className: classPreBuilt
|
|
85
|
+
}),
|
|
82
86
|
/*#__PURE__*/ jsx(Tag, {
|
|
83
87
|
ref: ref,
|
|
84
88
|
...textAttr,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { makeStyleResponsive, makeLineClamp, template, dataStringify, isLocalEnv, baseAssetURL } from '@gem-sdk/core';
|
|
2
2
|
import { getSettingPreloadData } from '../../../helpers.js';
|
|
3
3
|
import { createClass, createStyle, createAttr, createStateOrContext, LiquidIf, Liquid, LiquidUnless, If } from '@gem-sdk/system';
|
|
4
|
-
import { getClasses, getButtonClasses } from './common/getClasses.js';
|
|
4
|
+
import { getClasses, getButtonClasses, getClassPreBuilt } from './common/getClasses.js';
|
|
5
5
|
import { getTextStyle, getButtonStyle, getStaticCss } from './common/getStyle.js';
|
|
6
6
|
import { ICON_SVG } from './common/const.js';
|
|
7
7
|
|
|
@@ -32,6 +32,7 @@ const ProductDescription = (props)=>{
|
|
|
32
32
|
}),
|
|
33
33
|
...makeStyleResponsive('line-clamp', makeLineClamp(setting?.lineClamp, setting?.hasLineClamp))
|
|
34
34
|
});
|
|
35
|
+
const classPreBuilt = createClass(getClassPreBuilt());
|
|
35
36
|
const buttonStyle = createStyle(getButtonStyle({
|
|
36
37
|
setting
|
|
37
38
|
}));
|
|
@@ -63,6 +64,7 @@ const ProductDescription = (props)=>{
|
|
|
63
64
|
class="${gpDescriptionClasses}"
|
|
64
65
|
gp-data='${dataStringify(stateData).replaceAll("'", ''')}'>
|
|
65
66
|
<style>${textDescriptionCss}</style>
|
|
67
|
+
<div class="${classPreBuilt}" ></div>
|
|
66
68
|
${LiquidUnless('product', `<p>Product not found</p>`, template`<${Tag} ${textAttr} class="${textClasses}" style="${textStyle}">
|
|
67
69
|
{{product.description}}
|
|
68
70
|
</${Tag}>
|
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.562",
|
|
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.561",
|
|
27
27
|
"@gem-sdk/styles": "2.0.0-dev.535",
|
|
28
28
|
"@gem-sdk/system": "2.0.0-dev.504",
|
|
29
29
|
"@types/react-transition-group": "^4.4.5"
|