@gem-sdk/components 2.0.0-dev.533 → 2.0.0-dev.535
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/collection/components/collection-description/common/index.js +0 -2
- package/dist/cjs/collection/components/collection-description/common/styles.js +4 -4
- package/dist/cjs/collection/components/collection-description/components/CollectionDescription.js +5 -5
- package/dist/cjs/collection/components/collection-description/components/CollectionDescription.liquid.js +6 -9
- package/dist/cjs/collection/components/collection-paginator/common/index.js +2 -1
- package/dist/cjs/collection/components/collection-paginator/components/CollectionPaginator.liquid.js +4 -9
- package/dist/cjs/collection/setting/collection-banner/configs/settings.js +38 -35
- package/dist/cjs/collection/setting/collection-banner/configs/uiV2.js +47 -43
- package/dist/cjs/collection/setting/collection-description/configs/uiV2.js +38 -4
- package/dist/cjs/collection/setting/collection-paginator/configs/settings.js +7 -3
- package/dist/cjs/collection/setting/collection-paginator/configs/uiV2.js +64 -31
- package/dist/cjs/collection/setting/collection-toolbar/configs/settings.js +2 -2
- package/dist/cjs/collection/setting/collection-toolbar/configs/uiV2.js +1 -1
- package/dist/cjs/estimate-delivery/components/EstimateDate.js +23 -58
- package/dist/cjs/estimate-delivery/components/common/getAdvanced.js +10 -0
- package/dist/cjs/estimate-delivery/components/common/getNewSetting.js +86 -0
- package/dist/cjs/estimate-delivery/components/common/getStyle.js +10 -0
- package/dist/cjs/estimate-delivery/index.js +1 -1
- package/dist/cjs/estimate-delivery/setting/configs/settings.js +1 -1
- package/dist/cjs/estimate-delivery/setting/configs/uiV1.js +1 -1
- package/dist/cjs/estimate-delivery/setting/configs/uiV2.js +1 -1
- package/dist/cjs/index.liquid.js +6 -5
- package/dist/cjs/tab/components/Tabs.js +0 -4
- package/dist/cjs/tab/components/common/getStyle.js +4 -11
- package/dist/cjs/tab/setting/Tabs.js +2 -1
- package/dist/cjs/tab/setting/configs/settings.js +62 -14
- package/dist/cjs/tab/setting/configs/uiV2.js +15 -2
- package/dist/cjs/text/components/TextInline.js +10 -11
- package/dist/cjs/text/components/common/getClasses.js +8 -4
- package/dist/cjs/text/components/common/getStyle.js +9 -0
- package/dist/esm/collection/components/collection-description/common/index.js +1 -2
- package/dist/esm/collection/components/collection-description/common/styles.js +5 -5
- package/dist/esm/collection/components/collection-description/components/CollectionDescription.js +7 -7
- package/dist/esm/collection/components/collection-description/components/CollectionDescription.liquid.js +7 -10
- package/dist/esm/collection/components/collection-paginator/common/index.js +2 -1
- package/dist/esm/collection/components/collection-paginator/components/CollectionPaginator.liquid.js +4 -9
- package/dist/esm/collection/setting/collection-banner/configs/settings.js +38 -35
- package/dist/esm/collection/setting/collection-banner/configs/uiV2.js +47 -43
- package/dist/esm/collection/setting/collection-description/configs/uiV2.js +38 -4
- package/dist/esm/collection/setting/collection-paginator/configs/settings.js +7 -3
- package/dist/esm/collection/setting/collection-paginator/configs/uiV2.js +64 -31
- package/dist/esm/collection/setting/collection-toolbar/configs/settings.js +2 -2
- package/dist/esm/collection/setting/collection-toolbar/configs/uiV2.js +1 -1
- package/dist/esm/estimate-delivery/components/EstimateDate.js +23 -58
- package/dist/esm/estimate-delivery/components/common/getAdvanced.js +8 -0
- package/dist/esm/estimate-delivery/components/common/getNewSetting.js +84 -0
- package/dist/esm/estimate-delivery/components/common/getStyle.js +8 -0
- package/dist/esm/estimate-delivery/index.js +1 -1
- package/dist/esm/estimate-delivery/setting/configs/settings.js +1 -1
- package/dist/esm/estimate-delivery/setting/configs/uiV1.js +1 -1
- package/dist/esm/estimate-delivery/setting/configs/uiV2.js +1 -1
- package/dist/esm/index.liquid.js +5 -4
- package/dist/esm/tab/components/Tabs.js +1 -5
- package/dist/esm/tab/components/common/getStyle.js +5 -11
- package/dist/esm/tab/setting/Tabs.js +2 -1
- package/dist/esm/tab/setting/configs/settings.js +62 -14
- package/dist/esm/tab/setting/configs/uiV2.js +15 -2
- package/dist/esm/text/components/TextInline.js +11 -12
- package/dist/esm/text/components/common/getClasses.js +8 -5
- package/dist/esm/text/components/common/getStyle.js +9 -1
- package/dist/types/index.d.ts +43 -7
- package/package.json +2 -2
- /package/dist/cjs/estimate-delivery/{const.js → components/common/const.js} +0 -0
- /package/dist/esm/estimate-delivery/{const.js → components/common/const.js} +0 -0
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
require('@gem-sdk/core');
|
|
4
4
|
var helpers = require('../../../../helpers.js');
|
|
5
5
|
|
|
6
|
-
const getTag = (htmlTag)=>htmlTag === 'html' ? 'div' : 'p';
|
|
7
6
|
const getViewMoreText = ({ setting, builderProps, pageContext, type })=>{
|
|
8
7
|
if (type === 'liquid') {
|
|
9
8
|
return helpers.getDynamicSourceLocales({
|
|
@@ -31,6 +30,5 @@ const getViewLessText = ({ setting, builderProps, pageContext, type })=>{
|
|
|
31
30
|
return setting?.viewLessText;
|
|
32
31
|
};
|
|
33
32
|
|
|
34
|
-
exports.getTag = getTag;
|
|
35
33
|
exports.getViewLessText = getViewLessText;
|
|
36
34
|
exports.getViewMoreText = getViewMoreText;
|
|
@@ -25,9 +25,9 @@ const getMaxHeightStyleDefault = (setting)=>{
|
|
|
25
25
|
const style = core.makeStyleResponsive('maxh', result);
|
|
26
26
|
return style;
|
|
27
27
|
};
|
|
28
|
-
const getDefaultStyleCollectionDes = (setting)=>{
|
|
28
|
+
const getDefaultStyleCollectionDes = ({ setting, renderMaxHeight })=>{
|
|
29
29
|
const appendTypoStyle = core.composeTypographyStyle(setting?.typo, setting?.typography);
|
|
30
|
-
return {
|
|
30
|
+
return core.filterTruthyStyles({
|
|
31
31
|
...core.getStyleShadow({
|
|
32
32
|
value: setting?.typo?.custom?.textShadow,
|
|
33
33
|
styleAppliedFor: 'text-shadow',
|
|
@@ -38,8 +38,8 @@ const getDefaultStyleCollectionDes = (setting)=>{
|
|
|
38
38
|
tt: setting?.transform
|
|
39
39
|
}),
|
|
40
40
|
...appendTypoStyle,
|
|
41
|
-
...getMaxHeightStyleDefault(setting)
|
|
42
|
-
};
|
|
41
|
+
...renderMaxHeight && getMaxHeightStyleDefault(setting)
|
|
42
|
+
});
|
|
43
43
|
};
|
|
44
44
|
const getStyleDefaultViewMore = (setting)=>{
|
|
45
45
|
const appendTypoStyle = core.composeTypographyStyle(setting?.typo, setting?.typography);
|
package/dist/cjs/collection/components/collection-description/components/CollectionDescription.js
CHANGED
|
@@ -14,8 +14,6 @@ var constant = require('../common/constant.js');
|
|
|
14
14
|
|
|
15
15
|
const CollectionDescription = ({ setting, builderProps, pageContext, advanced })=>{
|
|
16
16
|
const collection = core.useCollection();
|
|
17
|
-
const { htmlTag } = setting ?? {};
|
|
18
|
-
const Tag = index.getTag(htmlTag);
|
|
19
17
|
const { ref, open, isShowViewMore, handleToggleShowMore, hasLineClamp } = useDescription.useGpDescription(setting);
|
|
20
18
|
const hasDescriptionHtml = collection?.descriptionHtml;
|
|
21
19
|
const classContainerCollectionDes = system.createClass(classes.getClassContainerCollectionDes({
|
|
@@ -35,8 +33,10 @@ const CollectionDescription = ({ setting, builderProps, pageContext, advanced })
|
|
|
35
33
|
} : {}
|
|
36
34
|
});
|
|
37
35
|
const collapseStyle = system.createStyle({
|
|
38
|
-
...styles.getDefaultStyleCollectionDes(
|
|
39
|
-
|
|
36
|
+
...styles.getDefaultStyleCollectionDes({
|
|
37
|
+
setting
|
|
38
|
+
}),
|
|
39
|
+
...!open ? core.makeStyleResponsive('line-clamp', core.makeLineClamp(setting?.lineClamp, setting?.hasLineClamp)) : {}
|
|
40
40
|
});
|
|
41
41
|
const styleViewMore = system.createStyle({
|
|
42
42
|
...styles.getStyleDefaultViewMore(setting)
|
|
@@ -71,7 +71,7 @@ const CollectionDescription = ({ setting, builderProps, pageContext, advanced })
|
|
|
71
71
|
system.If(!core.isSafari(), /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
72
72
|
children: gpDescriptionCss
|
|
73
73
|
}), ''),
|
|
74
|
-
/*#__PURE__*/ jsxRuntime.jsx(
|
|
74
|
+
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
75
75
|
ref: ref,
|
|
76
76
|
className: classContainerCollectionDes,
|
|
77
77
|
style: collapseStyle,
|
|
@@ -11,8 +11,6 @@ var index = require('../common/index.js');
|
|
|
11
11
|
var constant = require('../common/constant.js');
|
|
12
12
|
|
|
13
13
|
const CollectionDescription = ({ setting, advanced, builderProps, pageContext })=>{
|
|
14
|
-
const { htmlTag } = setting ?? {};
|
|
15
|
-
const Tag = index.getTag(htmlTag);
|
|
16
14
|
const hasDescriptionHtml = 'collection.description != blank';
|
|
17
15
|
const classContainerCollectionDes = system.createClass(classes.getClassContainerCollectionDes({
|
|
18
16
|
setting
|
|
@@ -28,12 +26,12 @@ const CollectionDescription = ({ setting, advanced, builderProps, pageContext })
|
|
|
28
26
|
'gp-show-more-icon gp-ml-1': true
|
|
29
27
|
});
|
|
30
28
|
const collapseStyle = system.createStyle({
|
|
31
|
-
...styles.getDefaultStyleCollectionDes(
|
|
29
|
+
...styles.getDefaultStyleCollectionDes({
|
|
30
|
+
setting,
|
|
31
|
+
renderMaxHeight: true
|
|
32
|
+
}),
|
|
32
33
|
...core.makeStyleResponsive('line-clamp', core.makeLineClamp(setting?.lineClamp, setting?.hasLineClamp))
|
|
33
34
|
});
|
|
34
|
-
const defaultStyle = system.createStyle({
|
|
35
|
-
...styles.getDefaultStyleCollectionDes(setting)
|
|
36
|
-
});
|
|
37
35
|
const styleViewMore = system.createStyle({
|
|
38
36
|
...styles.getStyleDefaultViewMore(setting),
|
|
39
37
|
...styles.getDisplayCollapse(setting),
|
|
@@ -69,7 +67,6 @@ const CollectionDescription = ({ setting, advanced, builderProps, pageContext })
|
|
|
69
67
|
viewLessText: viewLessText,
|
|
70
68
|
enableViewMoreIcon: setting?.enableViewMoreIcon
|
|
71
69
|
},
|
|
72
|
-
defaultStyle,
|
|
73
70
|
collapseStyle
|
|
74
71
|
});
|
|
75
72
|
const renderScript = ()=>{
|
|
@@ -84,9 +81,9 @@ const CollectionDescription = ({ setting, advanced, builderProps, pageContext })
|
|
|
84
81
|
>
|
|
85
82
|
<style>${textDescriptionCss}</style>
|
|
86
83
|
${system.If(!core.isSafari(), `<style>${gpDescriptionCss}</style>`, ' ')}
|
|
87
|
-
${system.LiquidUnless('collection', `<p>Collection not found</p>`, core.template
|
|
84
|
+
${system.LiquidUnless('collection', `<p>Collection not found</p>`, core.template`<div ${textAttr} class="${classContainerCollectionDes}" style="${collapseStyle}">
|
|
88
85
|
{{collection.description}}
|
|
89
|
-
|
|
86
|
+
</div>
|
|
90
87
|
${system.LiquidIf(hasDescriptionHtml, core.template`<button type="button" class="${classButtonViewMore}" style="${styleViewMore}">
|
|
91
88
|
${system.If(pageContext?.isPreviewing, viewMoreText?.toString() || '', `{{${viewMoreText}}}`)}
|
|
92
89
|
${system.If(setting?.enableViewMoreIcon, core.template`<span class="${showMoreIconClasses}">${constant.ICON_SVG}</span>`, ' ')}
|
|
@@ -43,8 +43,9 @@ const renderPaginatorLive = ({ setting, builderProps, pageContext })=>{
|
|
|
43
43
|
`;
|
|
44
44
|
};
|
|
45
45
|
const renderPaginatorEditor = ({ setting, builderProps, pageContext })=>{
|
|
46
|
-
const { pageQuantity, typo,
|
|
46
|
+
const { pageQuantity, typo, activeColor } = setting ?? {};
|
|
47
47
|
const paginatorItems = [];
|
|
48
|
+
const normalColor = typo?.attrs?.color;
|
|
48
49
|
const pageCount = parseInt(pageQuantity ?? '0');
|
|
49
50
|
let displayPage = 6;
|
|
50
51
|
if (displayPage > pageCount) {
|
package/dist/cjs/collection/components/collection-paginator/components/CollectionPaginator.liquid.js
CHANGED
|
@@ -9,14 +9,14 @@ var classes = require('../common/classes.js');
|
|
|
9
9
|
var system = require('@gem-sdk/system');
|
|
10
10
|
|
|
11
11
|
const CollectionPaginator = ({ setting, builderProps, pageContext })=>{
|
|
12
|
-
const { typographyPaginator,
|
|
12
|
+
const { typographyPaginator, activeColor, align, typo } = setting ?? {};
|
|
13
13
|
const appendTypoStyle = system.createStyle({
|
|
14
14
|
...core.composeTypographyStyle(typo, typographyPaginator)
|
|
15
15
|
});
|
|
16
16
|
const globalColorStyle = system.createStyle({
|
|
17
|
-
normalColorClass: core.getGlobalColorClass('text',
|
|
17
|
+
normalColorClass: core.getGlobalColorClass('text', typo?.attrs?.color),
|
|
18
18
|
activeColorClass: core.getGlobalColorClass('text', activeColor),
|
|
19
|
-
normalColorStyle: core.getGlobalColorCSSProp(
|
|
19
|
+
normalColorStyle: core.getGlobalColorCSSProp(typo?.attrs?.color) ?? '',
|
|
20
20
|
activeColorStyle: core.getGlobalColorCSSProp(activeColor) ?? ''
|
|
21
21
|
});
|
|
22
22
|
const addedClass = system.createClass({
|
|
@@ -47,12 +47,7 @@ const CollectionPaginator = ({ setting, builderProps, pageContext })=>{
|
|
|
47
47
|
uid: builderProps?.uid
|
|
48
48
|
});
|
|
49
49
|
return core.template`
|
|
50
|
-
<gp-collection-paginator
|
|
51
|
-
gp-data='${JSON.stringify(stateData).replaceAll("'", ''')}'
|
|
52
|
-
id="${builderProps?.uid}"
|
|
53
|
-
class="${classPaginator}"
|
|
54
|
-
style="${stylePaginator}"
|
|
55
|
-
>
|
|
50
|
+
<gp-collection-paginator gp-data='${JSON.stringify(stateData).replaceAll("'", ''')}' id="${builderProps?.uid}" class="${classPaginator}" style="${stylePaginator}" >
|
|
56
51
|
<div class="${classPaginatorWrapper}">${paginatorItem}</div>
|
|
57
52
|
</gp-collection-paginator>
|
|
58
53
|
${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>`)}
|
|
@@ -67,45 +67,26 @@ const CollectionBannerSettings = [
|
|
|
67
67
|
{
|
|
68
68
|
label: 'Start',
|
|
69
69
|
value: 'start',
|
|
70
|
-
|
|
71
|
-
<path d="M15.5 2.25C15.5 2.52614 15.2761 2.75 15 2.75L2 2.75C1.72386 2.75 1.5 2.52614 1.5 2.25C1.5 1.97386 1.72386 1.75 2 1.75L15 1.75C15.2761 1.75 15.5 1.97386 15.5 2.25Z" fill="currentColor"/>
|
|
72
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.5 3.25C12.3284 3.25 13 3.92157 13 4.75L13 9.75C13 10.5784 12.3284 11.25 11.5 11.25L10.5 11.25C9.67157 11.25 9 10.5784 9 9.75L9 4.75C9 3.92157 9.67157 3.25 10.5 3.25L11.5 3.25ZM12 4.75C12 4.47386 11.7761 4.25 11.5 4.25L10.5 4.25C10.2239 4.25 10 4.47386 10 4.75L10 9.75C10 10.0261 10.2239 10.25 10.5 10.25L11.5 10.25C11.7761 10.25 12 10.0261 12 9.75L12 4.75Z" fill="currentColor"/>
|
|
73
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 4.75C8 3.92157 7.32843 3.25 6.5 3.25L5.5 3.25C4.67157 3.25 4 3.92157 4 4.75L4 12.75C4 13.5784 4.67157 14.25 5.5 14.25L6.5 14.25C7.32843 14.25 8 13.5784 8 12.75L8 4.75ZM6.5 4.25C6.77614 4.25 7 4.47386 7 4.75L7 12.75C7 13.0261 6.77614 13.25 6.5 13.25L5.5 13.25C5.22386 13.25 5 13.0261 5 12.75L5 4.75C5 4.47386 5.22386 4.25 5.5 4.25L6.5 4.25Z" fill="currentColor"/>
|
|
74
|
-
</svg>
|
|
75
|
-
`,
|
|
70
|
+
iconName: 'gp-align-top',
|
|
76
71
|
tooltip: 'Align top'
|
|
77
72
|
},
|
|
78
73
|
{
|
|
79
74
|
label: 'Center',
|
|
80
75
|
value: 'center',
|
|
81
|
-
|
|
82
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.5 8.5C14.5 8.77614 14.2921 9 14.0357 9L12.1786 9L12.1786 11C12.1786 11.8284 11.555 12.5 10.7857 12.5L9.85714 12.5C9.08789 12.5 8.46429 11.8284 8.46429 11L8.46429 9L7.53571 9L7.53571 12.5C7.53571 13.3284 6.91211 14 6.14286 14L5.21429 14C4.44503 14 3.82143 13.3284 3.82143 12.5L3.82143 9L1.96429 9C1.70787 9 1.5 8.77614 1.5 8.5C1.5 8.22386 1.70787 8 1.96429 8L3.82143 8L3.82143 4.5C3.82143 3.67157 4.44503 3 5.21429 3L6.14286 3C6.91211 3 7.53572 3.67157 7.53572 4.5L7.53571 8L8.46429 8L8.46429 6C8.46429 5.17157 9.08789 4.5 9.85714 4.5L10.7857 4.5C11.555 4.5 12.1786 5.17157 12.1786 6L12.1786 8L14.0357 8C14.2921 8 14.5 8.22386 14.5 8.5ZM4.75 12.5C4.75 12.7761 4.95787 13 5.21429 13L6.14286 13C6.39928 13 6.60714 12.7761 6.60714 12.5L6.60714 4.5C6.60714 4.22386 6.39928 4 6.14286 4L5.21429 4C4.95787 4 4.75 4.22386 4.75 4.5L4.75 12.5ZM9.39286 11L9.39286 6C9.39286 5.72386 9.60073 5.5 9.85714 5.5L10.7857 5.5C11.0421 5.5 11.25 5.72386 11.25 6L11.25 11C11.25 11.2761 11.0421 11.5 10.7857 11.5L9.85714 11.5C9.60073 11.5 9.39286 11.2761 9.39286 11Z" fill="currentColor"/>
|
|
83
|
-
</svg>
|
|
84
|
-
`,
|
|
76
|
+
iconName: 'gp-align-center-vertical',
|
|
85
77
|
tooltip: 'Align center'
|
|
86
78
|
},
|
|
87
79
|
{
|
|
88
80
|
label: 'End',
|
|
89
81
|
value: 'end',
|
|
90
|
-
|
|
91
|
-
<path d="M1.5 14.5C1.5 14.2239 1.72386 14 2 14L15 14C15.2761 14 15.5 14.2239 15.5 14.5C15.5 14.7761 15.2761 15 15 15L2 15C1.72386 15 1.5 14.7761 1.5 14.5Z" fill="currentColor"/>
|
|
92
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 13.5C4.67157 13.5 4 12.8284 4 12L4 7C4 6.17157 4.67157 5.5 5.5 5.5L6.5 5.5C7.32843 5.5 8 6.17157 8 7L8 12C8 12.8284 7.32843 13.5 6.5 13.5L5.5 13.5ZM5 12C5 12.2761 5.22386 12.5 5.5 12.5L6.5 12.5C6.77614 12.5 7 12.2761 7 12L7 7C7 6.72386 6.77614 6.5 6.5 6.5L5.5 6.5C5.22386 6.5 5 6.72386 5 7L5 12Z" fill="currentColor"/>
|
|
93
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M9 12C9 12.8284 9.67157 13.5 10.5 13.5L11.5 13.5C12.3284 13.5 13 12.8284 13 12L13 4C13 3.17157 12.3284 2.5 11.5 2.5L10.5 2.5C9.67157 2.5 9 3.17157 9 4L9 12ZM10.5 12.5C10.2239 12.5 10 12.2761 10 12L10 4C10 3.72386 10.2239 3.5 10.5 3.5L11.5 3.5C11.7761 3.5 12 3.72386 12 4L12 12C12 12.2761 11.7761 12.5 11.5 12.5L10.5 12.5Z" fill="currentColor"/>
|
|
94
|
-
</svg>
|
|
95
|
-
`,
|
|
82
|
+
iconName: 'gp-align-bottom',
|
|
96
83
|
tooltip: 'Align bottom'
|
|
97
84
|
},
|
|
98
85
|
{
|
|
99
86
|
label: 'Between',
|
|
100
87
|
value: 'space-between',
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
<path d="M2.00293 1.49805L15.0037 1.49805" stroke="currentColor" stroke-linecap="round"/>
|
|
104
|
-
<rect x="2.5" y="6" width="3" height="12" rx="1" transform="rotate(-90 2.5 6)" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
105
|
-
<rect x="2.5" y="13" width="3" height="12" rx="1" transform="rotate(-90 2.5 13)" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
106
|
-
</svg>
|
|
107
|
-
`,
|
|
108
|
-
tooltip: 'Distribute vertical spacing'
|
|
88
|
+
tooltip: 'Distribute vertical spacing',
|
|
89
|
+
iconName: 'gp-justify-content-space-between'
|
|
109
90
|
}
|
|
110
91
|
],
|
|
111
92
|
devices: {
|
|
@@ -145,22 +126,25 @@ const CollectionBannerSettings = [
|
|
|
145
126
|
type: 'option:value',
|
|
146
127
|
options: [
|
|
147
128
|
{
|
|
148
|
-
label: '
|
|
149
|
-
value: '
|
|
150
|
-
|
|
129
|
+
label: 'Start',
|
|
130
|
+
value: 'start',
|
|
131
|
+
tooltip: 'Align top',
|
|
132
|
+
iconName: 'gp-align-top'
|
|
151
133
|
},
|
|
152
134
|
{
|
|
153
135
|
label: 'Center',
|
|
154
136
|
value: 'center',
|
|
155
|
-
|
|
137
|
+
tooltip: 'Align vertical center',
|
|
138
|
+
iconName: 'gp-align-center-vertical'
|
|
156
139
|
},
|
|
157
140
|
{
|
|
158
|
-
label: '
|
|
159
|
-
value: '
|
|
160
|
-
|
|
141
|
+
label: 'End',
|
|
142
|
+
value: 'end',
|
|
143
|
+
tooltip: 'Align bottom',
|
|
144
|
+
iconName: 'gp-align-bottom'
|
|
161
145
|
}
|
|
162
146
|
],
|
|
163
|
-
default: '
|
|
147
|
+
default: 'start'
|
|
164
148
|
},
|
|
165
149
|
{
|
|
166
150
|
id: 'fullWidth',
|
|
@@ -195,7 +179,7 @@ const CollectionBannerSettings = [
|
|
|
195
179
|
},
|
|
196
180
|
{
|
|
197
181
|
id: 'verticalGutter',
|
|
198
|
-
type: 'input:
|
|
182
|
+
type: 'input:slider',
|
|
199
183
|
units: [
|
|
200
184
|
'px'
|
|
201
185
|
],
|
|
@@ -216,8 +200,8 @@ const CollectionBannerSettings = [
|
|
|
216
200
|
controls: [
|
|
217
201
|
{
|
|
218
202
|
id: 'background',
|
|
219
|
-
type: '
|
|
220
|
-
|
|
203
|
+
type: 'background-image',
|
|
204
|
+
ignoreReRender: true,
|
|
221
205
|
devices: {
|
|
222
206
|
desktop: {
|
|
223
207
|
default: {
|
|
@@ -236,6 +220,25 @@ const CollectionBannerSettings = [
|
|
|
236
220
|
attachment: 'scroll'
|
|
237
221
|
}
|
|
238
222
|
}
|
|
223
|
+
},
|
|
224
|
+
compoDefaultValue: {
|
|
225
|
+
desktop: {
|
|
226
|
+
default: {
|
|
227
|
+
type: 'image',
|
|
228
|
+
image: {
|
|
229
|
+
src: 'https://cdn.shopify.com/s/files/1/0533/2089/files/placeholder-images-lifestyle-2_large.png',
|
|
230
|
+
width: 1920,
|
|
231
|
+
height: 900
|
|
232
|
+
},
|
|
233
|
+
size: 'cover',
|
|
234
|
+
position: {
|
|
235
|
+
x: 50,
|
|
236
|
+
y: 50
|
|
237
|
+
},
|
|
238
|
+
repeat: 'no-repeat',
|
|
239
|
+
attachment: 'scroll'
|
|
240
|
+
}
|
|
241
|
+
}
|
|
239
242
|
}
|
|
240
243
|
},
|
|
241
244
|
{
|
|
@@ -39,28 +39,43 @@ const SettingUIV2 = [
|
|
|
39
39
|
label: {
|
|
40
40
|
en: 'Image'
|
|
41
41
|
},
|
|
42
|
-
layout: '
|
|
42
|
+
layout: 'horizontal',
|
|
43
43
|
setting: {
|
|
44
44
|
id: 'background'
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
|
+
type: 'combo',
|
|
49
|
+
comboType: 'color',
|
|
48
50
|
label: {
|
|
49
|
-
en: 'Overlay
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
51
|
+
en: 'Overlay'
|
|
52
|
+
},
|
|
53
|
+
getValueFromSettingID: 'overlayColor.normal',
|
|
54
|
+
disableScrollbar: true,
|
|
55
|
+
compoDefaultValue: '#121212',
|
|
56
|
+
popoverLabel: {
|
|
57
|
+
en: 'Overlay'
|
|
58
|
+
},
|
|
59
|
+
controls: [
|
|
60
|
+
{
|
|
61
|
+
label: {
|
|
62
|
+
en: 'Overlay color'
|
|
63
|
+
},
|
|
64
|
+
setting: {
|
|
65
|
+
id: 'overlayColor',
|
|
66
|
+
state: 'normal'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
label: {
|
|
71
|
+
en: 'Overlay opacity'
|
|
72
|
+
},
|
|
73
|
+
setting: {
|
|
74
|
+
id: 'overlayOpacity',
|
|
75
|
+
state: 'normal'
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
]
|
|
64
79
|
}
|
|
65
80
|
]
|
|
66
81
|
},
|
|
@@ -101,15 +116,6 @@ const SettingUIV2 = [
|
|
|
101
116
|
id: 'width'
|
|
102
117
|
}
|
|
103
118
|
},
|
|
104
|
-
{
|
|
105
|
-
label: {
|
|
106
|
-
en: 'Column gap'
|
|
107
|
-
},
|
|
108
|
-
setting: {
|
|
109
|
-
id: 'verticalGutter'
|
|
110
|
-
},
|
|
111
|
-
conditionDisplay: `!!layout.cols && layout.cols.length > 1`
|
|
112
|
-
},
|
|
113
119
|
{
|
|
114
120
|
label: {
|
|
115
121
|
en: 'Content align'
|
|
@@ -117,24 +123,6 @@ const SettingUIV2 = [
|
|
|
117
123
|
setting: {
|
|
118
124
|
id: 'contentPosition'
|
|
119
125
|
}
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
label: {
|
|
123
|
-
en: 'Align X'
|
|
124
|
-
},
|
|
125
|
-
conditionDisplay: `layout.display !== 'fill'`,
|
|
126
|
-
setting: {
|
|
127
|
-
id: 'horizontalAlign'
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
label: {
|
|
132
|
-
en: 'Align Y'
|
|
133
|
-
},
|
|
134
|
-
setting: {
|
|
135
|
-
id: 'verticalAlign'
|
|
136
|
-
},
|
|
137
|
-
conditionDisplay: `!!layout.cols && layout.cols.length > 1`
|
|
138
126
|
}
|
|
139
127
|
]
|
|
140
128
|
},
|
|
@@ -170,6 +158,22 @@ const SettingUIV2 = [
|
|
|
170
158
|
}
|
|
171
159
|
}
|
|
172
160
|
]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
label: {
|
|
164
|
+
en: 'Align column'
|
|
165
|
+
},
|
|
166
|
+
controls: [
|
|
167
|
+
{
|
|
168
|
+
label: {
|
|
169
|
+
en: 'Vertical'
|
|
170
|
+
},
|
|
171
|
+
setting: {
|
|
172
|
+
id: 'verticalAlign'
|
|
173
|
+
},
|
|
174
|
+
conditionDisplay: `!!layout.cols && layout.cols.length > 1`
|
|
175
|
+
}
|
|
176
|
+
]
|
|
173
177
|
}
|
|
174
178
|
];
|
|
175
179
|
|
|
@@ -76,21 +76,55 @@ const SettingUIV2 = [
|
|
|
76
76
|
conditionDisplay: 'hasLineClamp == true'
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
|
+
type: 'combo',
|
|
79
80
|
label: {
|
|
80
81
|
en: 'Show more label'
|
|
81
82
|
},
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
iconName: 'polaris-text-block',
|
|
84
|
+
getValueFromSettingID: 'viewMoreText',
|
|
85
|
+
isHideClear: true,
|
|
86
|
+
disableScrollbar: true,
|
|
87
|
+
compoDefaultValue: 'Show more',
|
|
88
|
+
popoverLabel: {
|
|
89
|
+
en: 'Show more label'
|
|
84
90
|
},
|
|
91
|
+
controls: [
|
|
92
|
+
{
|
|
93
|
+
layout: 'vertical',
|
|
94
|
+
label: {
|
|
95
|
+
en: 'Content'
|
|
96
|
+
},
|
|
97
|
+
setting: {
|
|
98
|
+
id: 'viewMoreText'
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
],
|
|
85
102
|
conditionDisplay: 'hasLineClamp == true'
|
|
86
103
|
},
|
|
87
104
|
{
|
|
105
|
+
type: 'combo',
|
|
88
106
|
label: {
|
|
89
107
|
en: 'Show less label'
|
|
90
108
|
},
|
|
91
|
-
|
|
92
|
-
|
|
109
|
+
iconName: 'polaris-text-block',
|
|
110
|
+
getValueFromSettingID: 'viewLessText',
|
|
111
|
+
isHideClear: true,
|
|
112
|
+
disableScrollbar: true,
|
|
113
|
+
compoDefaultValue: 'Show more',
|
|
114
|
+
popoverLabel: {
|
|
115
|
+
en: 'Show less label'
|
|
93
116
|
},
|
|
117
|
+
controls: [
|
|
118
|
+
{
|
|
119
|
+
layout: 'vertical',
|
|
120
|
+
label: {
|
|
121
|
+
en: 'Content'
|
|
122
|
+
},
|
|
123
|
+
setting: {
|
|
124
|
+
id: 'viewLessText'
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
],
|
|
94
128
|
conditionDisplay: 'hasLineClamp == true'
|
|
95
129
|
},
|
|
96
130
|
{
|
|
@@ -11,7 +11,7 @@ const CollectionPaginatorSettings = [
|
|
|
11
11
|
controls: [
|
|
12
12
|
{
|
|
13
13
|
id: 'pageQuantity',
|
|
14
|
-
type: 'input',
|
|
14
|
+
type: 'input:stepper',
|
|
15
15
|
label: 'Page quantity',
|
|
16
16
|
default: '10'
|
|
17
17
|
}
|
|
@@ -99,10 +99,14 @@ const CollectionPaginatorSettings = [
|
|
|
99
99
|
type: 'typography-v2',
|
|
100
100
|
label: 'Text styles',
|
|
101
101
|
default: {
|
|
102
|
-
type: 'paragraph-1'
|
|
102
|
+
type: 'paragraph-1',
|
|
103
|
+
attrs: {
|
|
104
|
+
color: '#4D4D4D'
|
|
105
|
+
}
|
|
103
106
|
},
|
|
104
107
|
hiddenSetting: {
|
|
105
|
-
|
|
108
|
+
textAlign: true,
|
|
109
|
+
textShadow: true
|
|
106
110
|
},
|
|
107
111
|
ignoreReRender: true
|
|
108
112
|
},
|
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const SettingUIV2 = [
|
|
4
|
-
{
|
|
5
|
-
label: {
|
|
6
|
-
en: 'Preview mode'
|
|
7
|
-
},
|
|
8
|
-
controls: [
|
|
9
|
-
{
|
|
10
|
-
label: {
|
|
11
|
-
en: 'Page quantity'
|
|
12
|
-
},
|
|
13
|
-
setting: {
|
|
14
|
-
id: 'pageQuantity'
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
},
|
|
19
4
|
{
|
|
20
5
|
label: {
|
|
21
6
|
en: 'Display'
|
|
@@ -59,24 +44,73 @@ const SettingUIV2 = [
|
|
|
59
44
|
},
|
|
60
45
|
{
|
|
61
46
|
label: {
|
|
62
|
-
en: '
|
|
47
|
+
en: 'Preview mode'
|
|
63
48
|
},
|
|
64
49
|
controls: [
|
|
65
50
|
{
|
|
66
51
|
label: {
|
|
67
|
-
en: '
|
|
52
|
+
en: 'Page quantity'
|
|
68
53
|
},
|
|
69
54
|
setting: {
|
|
70
|
-
id: '
|
|
55
|
+
id: 'pageQuantity'
|
|
71
56
|
}
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: {
|
|
62
|
+
en: 'Text'
|
|
63
|
+
},
|
|
64
|
+
controls: [
|
|
65
|
+
{
|
|
66
|
+
type: 'combo',
|
|
67
|
+
label: {
|
|
68
|
+
en: 'Previous'
|
|
69
|
+
},
|
|
70
|
+
iconName: 'polaris-text-block',
|
|
71
|
+
getValueFromSettingID: 'previousText',
|
|
72
|
+
isHideClear: true,
|
|
73
|
+
disableScrollbar: true,
|
|
74
|
+
compoDefaultValue: 'PREVIOUS',
|
|
75
|
+
popoverLabel: {
|
|
76
|
+
en: 'Previous'
|
|
77
|
+
},
|
|
78
|
+
controls: [
|
|
79
|
+
{
|
|
80
|
+
layout: 'vertical',
|
|
81
|
+
label: {
|
|
82
|
+
en: 'Content'
|
|
83
|
+
},
|
|
84
|
+
setting: {
|
|
85
|
+
id: 'previousText'
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
]
|
|
72
89
|
},
|
|
73
90
|
{
|
|
91
|
+
type: 'combo',
|
|
74
92
|
label: {
|
|
75
93
|
en: 'Next'
|
|
76
94
|
},
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
95
|
+
iconName: 'polaris-text-block',
|
|
96
|
+
getValueFromSettingID: 'nextText',
|
|
97
|
+
isHideClear: true,
|
|
98
|
+
disableScrollbar: true,
|
|
99
|
+
compoDefaultValue: 'NEXT',
|
|
100
|
+
popoverLabel: {
|
|
101
|
+
en: 'Next'
|
|
102
|
+
},
|
|
103
|
+
controls: [
|
|
104
|
+
{
|
|
105
|
+
layout: 'vertical',
|
|
106
|
+
label: {
|
|
107
|
+
en: 'Content'
|
|
108
|
+
},
|
|
109
|
+
setting: {
|
|
110
|
+
id: 'nextText'
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
]
|
|
80
114
|
}
|
|
81
115
|
]
|
|
82
116
|
},
|
|
@@ -90,18 +124,17 @@ const SettingUIV2 = [
|
|
|
90
124
|
id: 'typo'
|
|
91
125
|
},
|
|
92
126
|
layout: 'vertical'
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
},
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
label: {
|
|
132
|
+
en: 'Active effect'
|
|
133
|
+
},
|
|
134
|
+
controls: [
|
|
102
135
|
{
|
|
103
136
|
label: {
|
|
104
|
-
en: '
|
|
137
|
+
en: 'Text color'
|
|
105
138
|
},
|
|
106
139
|
setting: {
|
|
107
140
|
id: 'activeColor'
|
|
@@ -30,7 +30,7 @@ const CollectionToolbarSettings = [
|
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
id: 'sortingText',
|
|
33
|
-
label: '
|
|
33
|
+
label: 'Option text',
|
|
34
34
|
type: 'group',
|
|
35
35
|
controls: [
|
|
36
36
|
{
|
|
@@ -114,7 +114,7 @@ const CollectionToolbarSettings = [
|
|
|
114
114
|
type: 'option:value',
|
|
115
115
|
devices: {
|
|
116
116
|
desktop: {
|
|
117
|
-
default: '
|
|
117
|
+
default: 'center'
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
120
|
options: [
|