@gem-sdk/components 2.0.0-dev.353 → 2.0.0-dev.355
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/article/components/ArticleAuthor.liquid.js +27 -0
- package/dist/cjs/article/components/ArticleCategory.liquid.js +27 -0
- package/dist/cjs/article/components/ArticleContent.liquid.js +42 -0
- package/dist/cjs/article/components/ArticleDate.liquid.js +35 -0
- package/dist/cjs/article/components/ArticleExcerpt.liquid.js +26 -0
- package/dist/cjs/article/components/ArticleImage.liquid.js +67 -0
- package/dist/cjs/article/components/ArticlePagination.liquid.js +17 -0
- package/dist/cjs/article/components/ArticleReadMore.liquid.js +58 -0
- package/dist/cjs/article/components/ArticleTag.liquid.js +27 -0
- package/dist/cjs/article/components/ArticleTitle.liquid.js +46 -0
- package/dist/cjs/form/setting/newsletter/configs/settings.js +2 -2
- package/dist/cjs/form/setting/newsletter/configs/uiV2.js +0 -44
- package/dist/cjs/index.liquid.js +20 -0
- package/dist/cjs/post-purchase/image/common/getClasses.js +1 -4
- package/dist/cjs/post-purchase/product/common/getClasses.js +4 -5
- package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/CarouselPostPurchase.js +3 -2
- package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +2 -1
- package/dist/cjs/post-purchase/product/hooks/product-image/useListCarousel.js +6 -2
- package/dist/cjs/post-purchase/product/settings/product-image/setting-v2.js +5 -5
- package/dist/cjs/post-purchase/product/settings/product-image/uiV2.js +2 -1
- package/dist/esm/article/components/ArticleAuthor.liquid.js +23 -0
- package/dist/esm/article/components/ArticleCategory.liquid.js +23 -0
- package/dist/esm/article/components/ArticleContent.liquid.js +38 -0
- package/dist/esm/article/components/ArticleDate.liquid.js +31 -0
- package/dist/esm/article/components/ArticleExcerpt.liquid.js +22 -0
- package/dist/esm/article/components/ArticleImage.liquid.js +63 -0
- package/dist/esm/article/components/ArticlePagination.liquid.js +13 -0
- package/dist/esm/article/components/ArticleReadMore.liquid.js +54 -0
- package/dist/esm/article/components/ArticleTag.liquid.js +23 -0
- package/dist/esm/article/components/ArticleTitle.liquid.js +42 -0
- package/dist/esm/form/setting/newsletter/configs/settings.js +2 -2
- package/dist/esm/form/setting/newsletter/configs/uiV2.js +0 -44
- package/dist/esm/index.liquid.js +10 -0
- package/dist/esm/post-purchase/image/common/getClasses.js +1 -4
- package/dist/esm/post-purchase/product/common/getClasses.js +4 -5
- package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/CarouselPostPurchase.js +3 -2
- package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +2 -1
- package/dist/esm/post-purchase/product/hooks/product-image/useListCarousel.js +6 -2
- package/dist/esm/post-purchase/product/settings/product-image/setting-v2.js +5 -5
- package/dist/esm/post-purchase/product/settings/product-image/uiV2.js +2 -1
- package/dist/types/index.d.ts +51 -11
- package/package.json +2 -2
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var core = require('@gem-sdk/core');
|
|
7
|
+
var Text_liquid = require('../../text/components/Text.liquid.js');
|
|
8
|
+
|
|
9
|
+
const ArticleAuthor = ({ setting, styles, advanced, builderProps })=>{
|
|
10
|
+
const { prefix } = setting ?? {};
|
|
11
|
+
return core.template`
|
|
12
|
+
${Text_liquid.default({
|
|
13
|
+
styles: styles,
|
|
14
|
+
setting: {
|
|
15
|
+
...setting,
|
|
16
|
+
text: `${prefix} {{ article.author }}`,
|
|
17
|
+
excludeFlex: true
|
|
18
|
+
},
|
|
19
|
+
advanced: advanced,
|
|
20
|
+
builderAttrs: {
|
|
21
|
+
'data-id': builderProps?.uid
|
|
22
|
+
}
|
|
23
|
+
})}
|
|
24
|
+
`;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.default = ArticleAuthor;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var core = require('@gem-sdk/core');
|
|
7
|
+
var Text_liquid = require('../../text/components/Text.liquid.js');
|
|
8
|
+
|
|
9
|
+
const ArticleCategory = ({ setting, styles, advanced, builderProps })=>{
|
|
10
|
+
return core.template`
|
|
11
|
+
|
|
12
|
+
${Text_liquid.default({
|
|
13
|
+
styles: styles,
|
|
14
|
+
setting: {
|
|
15
|
+
...setting,
|
|
16
|
+
text: '{{blogTitle}}',
|
|
17
|
+
excludeFlex: true
|
|
18
|
+
},
|
|
19
|
+
advanced: advanced,
|
|
20
|
+
builderAttrs: {
|
|
21
|
+
'data-id': builderProps?.uid
|
|
22
|
+
}
|
|
23
|
+
})}
|
|
24
|
+
`;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.default = ArticleCategory;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var core = require('@gem-sdk/core');
|
|
7
|
+
var helpers = require('../../helpers.js');
|
|
8
|
+
|
|
9
|
+
const ArticleContent = ({ styles, builderProps })=>{
|
|
10
|
+
const appendTypoClass = core.composeTypographyClassName(styles?.typo, styles?.typography);
|
|
11
|
+
const appendTypoStyle = core.composeTypographyStyle(styles?.typo, styles?.typography);
|
|
12
|
+
const defaultStyle = {
|
|
13
|
+
...core.makeStyleResponsive('ta', styles?.textAlign),
|
|
14
|
+
...core.getGlobalColorStateStyle('c', styles?.color),
|
|
15
|
+
...core.makeStyle({
|
|
16
|
+
tt: styles?.transform
|
|
17
|
+
}),
|
|
18
|
+
...appendTypoStyle
|
|
19
|
+
};
|
|
20
|
+
const collapseStyle = {
|
|
21
|
+
...defaultStyle,
|
|
22
|
+
...core.makeStyleResponsive('line-clamp', core.makeLineClamp(styles?.lineClamp, styles?.hasLineClamp))
|
|
23
|
+
};
|
|
24
|
+
return core.template`
|
|
25
|
+
<gp-article-content data-id="${builderProps?.uid}" >
|
|
26
|
+
<div
|
|
27
|
+
class="${core.cls('gp-relative gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre', appendTypoClass, core.getGlobalColorStateClass('text', styles?.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")}"
|
|
28
|
+
style="${collapseStyle}"
|
|
29
|
+
>
|
|
30
|
+
{{article.content}}
|
|
31
|
+
</div>
|
|
32
|
+
{% style %}
|
|
33
|
+
.gp-p-description-text * {
|
|
34
|
+
color: inherit
|
|
35
|
+
}
|
|
36
|
+
{% endstyle %}
|
|
37
|
+
</gp-article-content>
|
|
38
|
+
${core.RenderIf(core.isLocalEnv, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-article-content.js' | asset_url }}" defer="defer"></script>`, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="${core.baseAssetURL}/assets-v2/gp-article-content.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
39
|
+
`;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
exports.default = ArticleContent;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var core = require('@gem-sdk/core');
|
|
7
|
+
var Text_liquid = require('../../text/components/Text.liquid.js');
|
|
8
|
+
|
|
9
|
+
const FORMAT_MAP = {
|
|
10
|
+
'{"locales":"en-US","options":{"month":"short","day":"2-digit","year":"numeric"}}': '%b %d, %Y',
|
|
11
|
+
'{"locales":"en-US","options":{"month":"long","day":"2-digit","year":"numeric"}}': '%B %d, %Y',
|
|
12
|
+
'{"locales":"en-GB","options":{"month":"long","day":"2-digit","year":"numeric"}}': '%d %B %Y',
|
|
13
|
+
'{"locales":"en-GB","options":{"month":"2-digit","day":"2-digit","year":"numeric"}}': '%d/%m/%Y',
|
|
14
|
+
'{"locales":"en-US","options":{"month":"2-digit","day":"2-digit","year":"numeric"}}': '%m/%d/%Y',
|
|
15
|
+
'{"locales":"ja-JP","options":{"month":"2-digit","day":"2-digit","year":"numeric"}}': '%Y/%m/%d'
|
|
16
|
+
};
|
|
17
|
+
const ArticleDate = ({ setting, styles, advanced, builderProps })=>{
|
|
18
|
+
const { dateFormat } = setting ?? {};
|
|
19
|
+
return core.template`
|
|
20
|
+
${Text_liquid.default({
|
|
21
|
+
styles: styles,
|
|
22
|
+
setting: {
|
|
23
|
+
...setting,
|
|
24
|
+
text: `{{ article.published_at | date: '${FORMAT_MAP[dateFormat ?? '{"locales":"en-US","options":{"month":"short","day":"2-digit","year":"numeric"}}']}' }}`,
|
|
25
|
+
excludeFlex: true
|
|
26
|
+
},
|
|
27
|
+
advanced: advanced,
|
|
28
|
+
builderAttrs: {
|
|
29
|
+
'data-id': builderProps?.uid
|
|
30
|
+
}
|
|
31
|
+
})}
|
|
32
|
+
`;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
exports.default = ArticleDate;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var core = require('@gem-sdk/core');
|
|
7
|
+
var Text_liquid = require('../../text/components/Text.liquid.js');
|
|
8
|
+
|
|
9
|
+
const ArticleExcerpt = ({ setting, styles, advanced, builderProps })=>{
|
|
10
|
+
return core.template`
|
|
11
|
+
${Text_liquid.default({
|
|
12
|
+
styles: styles,
|
|
13
|
+
setting: {
|
|
14
|
+
...setting,
|
|
15
|
+
text: '{{article.excerpt}}',
|
|
16
|
+
excludeFlex: true
|
|
17
|
+
},
|
|
18
|
+
advanced: advanced,
|
|
19
|
+
builderAttrs: {
|
|
20
|
+
'data-id': builderProps?.uid
|
|
21
|
+
}
|
|
22
|
+
})}
|
|
23
|
+
`;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.default = ArticleExcerpt;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var core = require('@gem-sdk/core');
|
|
7
|
+
var Image_liquid = require('../../image/components/Image.liquid.js');
|
|
8
|
+
|
|
9
|
+
const ArticleImage = (props)=>{
|
|
10
|
+
const setting = props?.setting ?? {};
|
|
11
|
+
const { builderProps } = props;
|
|
12
|
+
return core.template`
|
|
13
|
+
<div class="${core.cls('gp-text-center gp-overflow-hidden', props?.className)}" style="border-radius: inherit">
|
|
14
|
+
${setting?.linkArticle ? `
|
|
15
|
+
<a href="{{article.url}}" title="{{article.title}}">
|
|
16
|
+
${Image_liquid.default({
|
|
17
|
+
...props,
|
|
18
|
+
styles: props.styles,
|
|
19
|
+
setting: {
|
|
20
|
+
...props.setting,
|
|
21
|
+
alt: '{{article.image.alt}}',
|
|
22
|
+
image: {
|
|
23
|
+
src: `{{article.image.src | img_url: '1024x1024'}}`,
|
|
24
|
+
alt: '{{article.image.alt}}'
|
|
25
|
+
},
|
|
26
|
+
srcSet: {
|
|
27
|
+
desktop: {
|
|
28
|
+
src: `{{article.image.src | img_url: '1024x1024'}}`
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
disableNoDataState: true
|
|
32
|
+
},
|
|
33
|
+
advanced: props.advanced,
|
|
34
|
+
builderAttrs: {
|
|
35
|
+
'data-id': builderProps?.uid
|
|
36
|
+
}
|
|
37
|
+
})}
|
|
38
|
+
</a>
|
|
39
|
+
` : `
|
|
40
|
+
${Image_liquid.default({
|
|
41
|
+
...props,
|
|
42
|
+
styles: props.styles,
|
|
43
|
+
setting: {
|
|
44
|
+
...props.setting,
|
|
45
|
+
alt: '{{article.image.alt}}',
|
|
46
|
+
image: {
|
|
47
|
+
src: `{{article.image.src | img_url: '1024x1024'}}`,
|
|
48
|
+
alt: '{{article.image.alt}}'
|
|
49
|
+
},
|
|
50
|
+
srcSet: {
|
|
51
|
+
desktop: {
|
|
52
|
+
src: `{{article.image.src | img_url: '1024x1024'}}`
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
disableNoDataState: true
|
|
56
|
+
},
|
|
57
|
+
advanced: props.advanced,
|
|
58
|
+
builderAttrs: {
|
|
59
|
+
'data-id': builderProps?.uid
|
|
60
|
+
}
|
|
61
|
+
})}
|
|
62
|
+
`}
|
|
63
|
+
</div>
|
|
64
|
+
`;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
exports.default = ArticleImage;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
require('@gem-sdk/core');
|
|
7
|
+
require('react/jsx-runtime');
|
|
8
|
+
require('react');
|
|
9
|
+
require('next/link');
|
|
10
|
+
require('@gem-sdk/system');
|
|
11
|
+
var CollectionPaginator_liquid = require('../../collection/components/collection-paginator/components/CollectionPaginator.liquid.js');
|
|
12
|
+
|
|
13
|
+
const ArticlePagination = (props)=>{
|
|
14
|
+
return CollectionPaginator_liquid.default(props);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.default = ArticlePagination;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var core = require('@gem-sdk/core');
|
|
7
|
+
var Text_liquid = require('../../text/components/Text.liquid.js');
|
|
8
|
+
var Button_liquid = require('../../button/components/Button.liquid.js');
|
|
9
|
+
|
|
10
|
+
const ArticleReadMore = ({ setting, styles, builderAttrs, builderProps, advanced, style })=>{
|
|
11
|
+
const { readMoreType, label } = setting ?? {};
|
|
12
|
+
const { typoBtn, typoText, globalSizeText, globalSizeBtn, textColorTextState, textColorBtnState, alignBtn, alignText } = styles ?? {};
|
|
13
|
+
return core.template /* liquid */ `
|
|
14
|
+
<a href="{{article.url}}" target="_blank">
|
|
15
|
+
${core.RenderIf(readMoreType === 'text', Text_liquid.default({
|
|
16
|
+
builderAttrs,
|
|
17
|
+
builderProps,
|
|
18
|
+
advanced,
|
|
19
|
+
styles: {
|
|
20
|
+
...styles,
|
|
21
|
+
color: textColorTextState,
|
|
22
|
+
typo: typoText,
|
|
23
|
+
spacing: '0px',
|
|
24
|
+
align: alignText
|
|
25
|
+
},
|
|
26
|
+
style: style ?? {},
|
|
27
|
+
setting: {
|
|
28
|
+
...setting,
|
|
29
|
+
text: label,
|
|
30
|
+
globalSize: globalSizeText,
|
|
31
|
+
excludeFlex: true,
|
|
32
|
+
translate: undefined
|
|
33
|
+
}
|
|
34
|
+
}))}
|
|
35
|
+
${core.RenderIf(readMoreType === 'button', Button_liquid.default({
|
|
36
|
+
builderAttrs,
|
|
37
|
+
builderProps,
|
|
38
|
+
advanced,
|
|
39
|
+
styles: {
|
|
40
|
+
...styles,
|
|
41
|
+
typo: typoBtn,
|
|
42
|
+
globalSize: globalSizeBtn,
|
|
43
|
+
textColor: textColorBtnState,
|
|
44
|
+
align: alignBtn
|
|
45
|
+
},
|
|
46
|
+
style: style ?? {},
|
|
47
|
+
setting: {
|
|
48
|
+
...setting,
|
|
49
|
+
label: label,
|
|
50
|
+
htmlType: 'button',
|
|
51
|
+
translate: undefined
|
|
52
|
+
}
|
|
53
|
+
}))}
|
|
54
|
+
</a>
|
|
55
|
+
`;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
exports.default = ArticleReadMore;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var core = require('@gem-sdk/core');
|
|
7
|
+
var Text_liquid = require('../../text/components/Text.liquid.js');
|
|
8
|
+
|
|
9
|
+
const ArticleTag = ({ setting, styles, advanced, builderProps })=>{
|
|
10
|
+
return core.template`
|
|
11
|
+
{%- assign tagsString = article.tags | join: ', ' -%}
|
|
12
|
+
${Text_liquid.default({
|
|
13
|
+
styles: styles,
|
|
14
|
+
setting: {
|
|
15
|
+
...setting,
|
|
16
|
+
text: '{{tagsString}}',
|
|
17
|
+
excludeFlex: true
|
|
18
|
+
},
|
|
19
|
+
advanced,
|
|
20
|
+
builderAttrs: {
|
|
21
|
+
'data-id': builderProps?.uid
|
|
22
|
+
}
|
|
23
|
+
})}
|
|
24
|
+
`;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.default = ArticleTag;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var core = require('@gem-sdk/core');
|
|
7
|
+
var Text_liquid = require('../../text/components/Text.liquid.js');
|
|
8
|
+
|
|
9
|
+
const ArticleTitle = ({ setting, styles, advanced, builderProps })=>{
|
|
10
|
+
const target = setting?.openNewTab ? '_blank' : '_self';
|
|
11
|
+
return core.template`
|
|
12
|
+
${setting?.enableLink && setting?.linkArticle ? `
|
|
13
|
+
<a href="{{article.url}}" target="${{
|
|
14
|
+
target
|
|
15
|
+
}}" title="{{article.title}}">
|
|
16
|
+
${Text_liquid.default({
|
|
17
|
+
styles: styles,
|
|
18
|
+
setting: {
|
|
19
|
+
...setting,
|
|
20
|
+
text: '{{article.title}}',
|
|
21
|
+
excludeFlex: true
|
|
22
|
+
},
|
|
23
|
+
advanced: advanced,
|
|
24
|
+
builderAttrs: {
|
|
25
|
+
'data-id': builderProps?.uid
|
|
26
|
+
}
|
|
27
|
+
})}
|
|
28
|
+
</a>
|
|
29
|
+
` : `
|
|
30
|
+
${Text_liquid.default({
|
|
31
|
+
styles: styles,
|
|
32
|
+
setting: {
|
|
33
|
+
...setting,
|
|
34
|
+
text: '{{article.title}}',
|
|
35
|
+
excludeFlex: true
|
|
36
|
+
},
|
|
37
|
+
advanced: advanced,
|
|
38
|
+
builderAttrs: {
|
|
39
|
+
'data-id': builderProps?.uid
|
|
40
|
+
}
|
|
41
|
+
})}
|
|
42
|
+
`}
|
|
43
|
+
`;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
exports.default = ArticleTitle;
|
|
@@ -90,7 +90,7 @@ const NewsletterSettings = [
|
|
|
90
90
|
desktop: {
|
|
91
91
|
default: {
|
|
92
92
|
type: 'color',
|
|
93
|
-
color: '#
|
|
93
|
+
color: '#E2E2E2',
|
|
94
94
|
image: {
|
|
95
95
|
src: 'https://ucarecdn.com/5e27d43d-eb1e-4e71-b7e1-4158f3071bb6/-/format/auto/',
|
|
96
96
|
width: 1200,
|
|
@@ -121,7 +121,7 @@ const NewsletterSettings = [
|
|
|
121
121
|
hide: true,
|
|
122
122
|
devices: {
|
|
123
123
|
desktop: {
|
|
124
|
-
default: '
|
|
124
|
+
default: '480px'
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
},
|
|
@@ -92,54 +92,10 @@ const SettingUIV2 = [
|
|
|
92
92
|
label: 'Fit content',
|
|
93
93
|
value: 'Auto',
|
|
94
94
|
showValue: true
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
label: 'Full',
|
|
98
|
-
value: '100%',
|
|
99
|
-
showValue: true
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
label: 'Small',
|
|
103
|
-
value: '100px',
|
|
104
|
-
showValue: true
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
label: 'Medium',
|
|
108
|
-
value: '116px',
|
|
109
|
-
showValue: true
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
label: 'Large',
|
|
113
|
-
value: '132px',
|
|
114
|
-
showValue: true
|
|
115
95
|
}
|
|
116
96
|
]
|
|
117
97
|
},
|
|
118
98
|
layout: 'horizontal'
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
label: {
|
|
122
|
-
en: 'Padding'
|
|
123
|
-
},
|
|
124
|
-
controlConfig: {
|
|
125
|
-
id: 'padding',
|
|
126
|
-
type: 'padding-v2',
|
|
127
|
-
linkWithSetting: {
|
|
128
|
-
name: 'globalSize',
|
|
129
|
-
field: 'padding'
|
|
130
|
-
},
|
|
131
|
-
compoDefaultValue: {
|
|
132
|
-
desktop: {
|
|
133
|
-
default: {
|
|
134
|
-
type: 'medium',
|
|
135
|
-
top: '12px',
|
|
136
|
-
bottom: '12px',
|
|
137
|
-
left: '24px',
|
|
138
|
-
right: '24px'
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
99
|
}
|
|
144
100
|
]
|
|
145
101
|
},
|
package/dist/cjs/index.liquid.js
CHANGED
|
@@ -4,6 +4,16 @@
|
|
|
4
4
|
var Accordion_liquid = require('./accordion/components/Accordion.liquid.js');
|
|
5
5
|
var AccordionItem_liquid = require('./accordion/components/AccordionItem.liquid.js');
|
|
6
6
|
var ArticleList_liquid = require('./article/components/ArticleList.liquid.js');
|
|
7
|
+
var ArticleTitle_liquid = require('./article/components/ArticleTitle.liquid.js');
|
|
8
|
+
var ArticleExcerpt_liquid = require('./article/components/ArticleExcerpt.liquid.js');
|
|
9
|
+
var ArticleContent_liquid = require('./article/components/ArticleContent.liquid.js');
|
|
10
|
+
var ArticleImage_liquid = require('./article/components/ArticleImage.liquid.js');
|
|
11
|
+
var ArticlePagination_liquid = require('./article/components/ArticlePagination.liquid.js');
|
|
12
|
+
var ArticleAuthor_liquid = require('./article/components/ArticleAuthor.liquid.js');
|
|
13
|
+
var ArticleTag_liquid = require('./article/components/ArticleTag.liquid.js');
|
|
14
|
+
var ArticleCategory_liquid = require('./article/components/ArticleCategory.liquid.js');
|
|
15
|
+
var ArticleDate_liquid = require('./article/components/ArticleDate.liquid.js');
|
|
16
|
+
var ArticleReadMore_liquid = require('./article/components/ArticleReadMore.liquid.js');
|
|
7
17
|
var HeroBanner_liquid = require('./banner/components/HeroBanner.liquid.js');
|
|
8
18
|
var Breadcrumb_liquid = require('./breadcrumb/components/Breadcrumb.liquid.js');
|
|
9
19
|
var Button_liquid = require('./button/components/Button.liquid.js');
|
|
@@ -195,6 +205,16 @@ var Sticky_liquid = require('./sticky/components/Sticky.liquid.js');
|
|
|
195
205
|
exports.Accordion = Accordion_liquid.default;
|
|
196
206
|
exports.AccordionItem = AccordionItem_liquid.default;
|
|
197
207
|
exports.ArticleList = ArticleList_liquid.default;
|
|
208
|
+
exports.ArticleTitle = ArticleTitle_liquid.default;
|
|
209
|
+
exports.ArticleExcerpt = ArticleExcerpt_liquid.default;
|
|
210
|
+
exports.ArticleContent = ArticleContent_liquid.default;
|
|
211
|
+
exports.ArticleImage = ArticleImage_liquid.default;
|
|
212
|
+
exports.ArticlePagination = ArticlePagination_liquid.default;
|
|
213
|
+
exports.ArticleAuthor = ArticleAuthor_liquid.default;
|
|
214
|
+
exports.ArticleTag = ArticleTag_liquid.default;
|
|
215
|
+
exports.ArticleCategory = ArticleCategory_liquid.default;
|
|
216
|
+
exports.ArticleDate = ArticleDate_liquid.default;
|
|
217
|
+
exports.ArticleReadMore = ArticleReadMore_liquid.default;
|
|
198
218
|
exports.HeroBanner = HeroBanner_liquid.default;
|
|
199
219
|
exports.Breadcrumb = Breadcrumb_liquid.default;
|
|
200
220
|
exports.Button = Button_liquid.default;
|
|
@@ -15,11 +15,8 @@ const getImageClass = ()=>{
|
|
|
15
15
|
return core.composeClasses(classList);
|
|
16
16
|
};
|
|
17
17
|
const getImageWrapperClass = (settings)=>{
|
|
18
|
-
const classList = 'gp-border';
|
|
19
18
|
return {
|
|
20
|
-
|
|
21
|
-
'gp-border-[#d9d9d9]': settings?.enableBorder !== 'none',
|
|
22
|
-
'gp-border-transparent': settings?.enableBorder === 'none'
|
|
19
|
+
'gp-border-[#d9d9d9] gp-border': settings?.enableBorder !== 'none'
|
|
23
20
|
};
|
|
24
21
|
};
|
|
25
22
|
|
|
@@ -13,11 +13,10 @@ const getNavigationClass = ()=>{
|
|
|
13
13
|
return core.composeClasses('gp-w-[24px] gp-h-[24px] gp-shrink-0 gp-flex gp-items-center gp-justify-center');
|
|
14
14
|
};
|
|
15
15
|
const getItemCarouselPostPurchaseClass = (settings)=>{
|
|
16
|
-
const classList = 'gp-w-full
|
|
16
|
+
const classList = 'gp-w-full';
|
|
17
17
|
return {
|
|
18
18
|
...core.composeClasses(classList),
|
|
19
|
-
'!gp-border-[#d9d9d9]': settings?.border
|
|
20
|
-
'gp-border-transparent': !settings?.border
|
|
19
|
+
'!gp-border-[#d9d9d9] !gp-border': settings?.border
|
|
21
20
|
};
|
|
22
21
|
};
|
|
23
22
|
const getItemCarouseEmptyPostPurchaseClass = ()=>{
|
|
@@ -31,7 +30,7 @@ const getImageGridClass = ()=>{
|
|
|
31
30
|
};
|
|
32
31
|
const getProductImageClass = (settings)=>{
|
|
33
32
|
return {
|
|
34
|
-
...core.composeClasses('gp-flex'),
|
|
33
|
+
...core.composeClasses('gp-flex gp-w-full'),
|
|
35
34
|
[index.getPostPurchaseAlignClasses(settings?.align)]: true
|
|
36
35
|
};
|
|
37
36
|
};
|
|
@@ -42,7 +41,7 @@ const getFeatureImageClass = ()=>{
|
|
|
42
41
|
return core.composeClasses('gp-flex gp-justify-center gp-h-fit gp-w-full');
|
|
43
42
|
};
|
|
44
43
|
const getOnlyFeatureLayoutClass = ()=>{
|
|
45
|
-
return core.composeClasses('gp-flex gp-h-fit gp-max-w-full');
|
|
44
|
+
return core.composeClasses('gp-flex gp-h-fit gp-max-w-full gp-w-full');
|
|
46
45
|
};
|
|
47
46
|
|
|
48
47
|
exports.getContainerClasses = getContainerClasses;
|
|
@@ -9,10 +9,11 @@ require('@gem-sdk/core');
|
|
|
9
9
|
var useListCarousel = require('../../../hooks/product-image/useListCarousel.js');
|
|
10
10
|
|
|
11
11
|
const CarouselPostPurchase = (props)=>{
|
|
12
|
-
const { productImages, itemPerRow, border, aspectRatio, objectFit } = props;
|
|
12
|
+
const { productImages, itemPerRow, border, aspectRatio, objectFit, vertical } = props;
|
|
13
13
|
const { listRender } = useListCarousel.useListCarousel({
|
|
14
14
|
productImages,
|
|
15
|
-
itemPerRow
|
|
15
|
+
itemPerRow,
|
|
16
|
+
vertical
|
|
16
17
|
});
|
|
17
18
|
const itemEmptyClass = system.createClass(getClasses.getItemCarouseEmptyPostPurchaseClass());
|
|
18
19
|
return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
@@ -58,7 +58,8 @@ const CarouselWrapperPostPurchase = ({ styles, setting, productImages, objectFit
|
|
|
58
58
|
itemPerRow: itemPerSlide,
|
|
59
59
|
border: border,
|
|
60
60
|
aspectRatio: aspectRatio,
|
|
61
|
-
objectFit: objectFit
|
|
61
|
+
objectFit: objectFit,
|
|
62
|
+
vertical: vertical
|
|
62
63
|
}),
|
|
63
64
|
/*#__PURE__*/ jsxRuntime.jsx(Arrow.ArrowPostPurchase, {
|
|
64
65
|
type: "next",
|
|
@@ -4,7 +4,7 @@ var React = require('react');
|
|
|
4
4
|
var useCarousel = require('./useCarousel.js');
|
|
5
5
|
|
|
6
6
|
const useListCarousel = (props)=>{
|
|
7
|
-
const { productImages, itemPerRow } = props;
|
|
7
|
+
const { productImages, itemPerRow, vertical } = props;
|
|
8
8
|
const { moveToIdx } = useCarousel.useCarousel();
|
|
9
9
|
const list = React.useCallback(()=>{
|
|
10
10
|
const temp = [
|
|
@@ -18,6 +18,9 @@ const useListCarousel = (props)=>{
|
|
|
18
18
|
]);
|
|
19
19
|
const listRender = React.useMemo(()=>{
|
|
20
20
|
const listItem = list();
|
|
21
|
+
if (vertical) return [
|
|
22
|
+
...productImages
|
|
23
|
+
];
|
|
21
24
|
if (listItem.length < itemPerRow) {
|
|
22
25
|
const temp = [
|
|
23
26
|
...productImages
|
|
@@ -33,7 +36,8 @@ const useListCarousel = (props)=>{
|
|
|
33
36
|
}, [
|
|
34
37
|
list,
|
|
35
38
|
itemPerRow,
|
|
36
|
-
productImages
|
|
39
|
+
productImages,
|
|
40
|
+
vertical
|
|
37
41
|
]);
|
|
38
42
|
return {
|
|
39
43
|
listRender
|
|
@@ -34,25 +34,25 @@ const SettingV2 = [
|
|
|
34
34
|
itemSpacing: 'large',
|
|
35
35
|
options: [
|
|
36
36
|
{
|
|
37
|
-
label: '
|
|
37
|
+
label: 'Featured top',
|
|
38
38
|
value: 'bottom-center',
|
|
39
39
|
type: 'p-image-layout',
|
|
40
40
|
iconName: 'gp-product-image-layout-bottom'
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
|
-
label: '
|
|
43
|
+
label: 'Featured left',
|
|
44
44
|
value: 'left',
|
|
45
45
|
type: 'p-image-layout',
|
|
46
46
|
iconName: 'gp-product-image-layout-left'
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
|
-
label: '
|
|
49
|
+
label: 'Featured right',
|
|
50
50
|
value: 'right',
|
|
51
51
|
type: 'p-image-layout',
|
|
52
52
|
iconName: 'gp-product-image-layout-right'
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
|
-
label: 'Featured
|
|
55
|
+
label: 'Featured only',
|
|
56
56
|
value: 'only-feature',
|
|
57
57
|
type: 'p-image-layout',
|
|
58
58
|
iconName: 'gp-product-image-layout-featured-only'
|
|
@@ -351,7 +351,7 @@ const SettingV2 = [
|
|
|
351
351
|
label: 'Spacing',
|
|
352
352
|
id: 'ilSpacing',
|
|
353
353
|
options: constants.postPurchaseSpacing,
|
|
354
|
-
default: '
|
|
354
|
+
default: 'xtight'
|
|
355
355
|
},
|
|
356
356
|
{
|
|
357
357
|
id: 'ilItemPerSlide',
|
|
@@ -170,7 +170,7 @@ const SettingUIV2 = [
|
|
|
170
170
|
},
|
|
171
171
|
{
|
|
172
172
|
label: {
|
|
173
|
-
en: '
|
|
173
|
+
en: 'Item spacing'
|
|
174
174
|
},
|
|
175
175
|
controls: [
|
|
176
176
|
{
|
|
@@ -234,6 +234,7 @@ const SettingUIV2 = [
|
|
|
234
234
|
fullWidth: true,
|
|
235
235
|
disableMessage: `Horizontal alignment is disabled when the width is set to 100% or greater`
|
|
236
236
|
},
|
|
237
|
+
conditionDisplay: "['bottom-center', 'left', 'right', 'only-feature'].includes(layoutType)",
|
|
237
238
|
conditionEnable: '!(parseInt(ftWidth) >= 100 && ftWidth?.includes("%"))'
|
|
238
239
|
}
|
|
239
240
|
]
|