@gem-sdk/components 2.1.16 → 2.1.17

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.
Files changed (116) hide show
  1. package/dist/cjs/builder.js +25 -1
  2. package/dist/cjs/collection/components/CollectionDescription.js +101 -7
  3. package/dist/cjs/collection/components/CollectionDescription.liquid.js +102 -9
  4. package/dist/cjs/collection/setting/CollectionDescription.js +128 -0
  5. package/dist/cjs/index.js +24 -0
  6. package/dist/cjs/index.liquid.js +24 -0
  7. package/dist/cjs/third-party/components/AlsoBoughtCbb.js +32 -0
  8. package/dist/cjs/third-party/components/AlsoBoughtCbb.liquid.js +21 -0
  9. package/dist/cjs/third-party/components/BfSizeChartSizeGuide.js +32 -0
  10. package/dist/cjs/third-party/components/BfSizeChartSizeGuide.liquid.js +12 -0
  11. package/dist/cjs/third-party/components/EssentialAnnouncementBar.js +32 -0
  12. package/dist/cjs/third-party/components/EssentialAnnouncementBar.liquid.js +12 -0
  13. package/dist/cjs/third-party/components/EssentialCountdownTimerBar.js +32 -0
  14. package/dist/cjs/third-party/components/EssentialCountdownTimerBar.liquid.js +12 -0
  15. package/dist/cjs/third-party/components/EstimatedDeliveryDatePlus.js +32 -0
  16. package/dist/cjs/third-party/components/EstimatedDeliveryDatePlus.liquid.js +12 -0
  17. package/dist/cjs/third-party/components/GloColorSwatchvariantImage.js +32 -0
  18. package/dist/cjs/third-party/components/GloColorSwatchvariantImage.liquid.js +12 -0
  19. package/dist/cjs/third-party/components/HextomCountdownTimerBar.js +32 -0
  20. package/dist/cjs/third-party/components/HextomCountdownTimerBar.liquid.js +12 -0
  21. package/dist/cjs/third-party/components/HextomFreeShippingBar.js +32 -0
  22. package/dist/cjs/third-party/components/HextomFreeShippingBar.liquid.js +12 -0
  23. package/dist/cjs/third-party/components/OkendoReviewsLoyalty.js +32 -0
  24. package/dist/cjs/third-party/components/OkendoReviewsLoyalty.liquid.js +12 -0
  25. package/dist/cjs/third-party/components/StellarDeliveryDatePickup.js +32 -0
  26. package/dist/cjs/third-party/components/StellarDeliveryDatePickup.liquid.js +21 -0
  27. package/dist/cjs/third-party/components/TrustBadgesBear.js +32 -0
  28. package/dist/cjs/third-party/components/TrustBadgesBear.liquid.js +12 -0
  29. package/dist/cjs/third-party/components/TrustedsiteTrustBadges.js +32 -0
  30. package/dist/cjs/third-party/components/TrustedsiteTrustBadges.liquid.js +12 -0
  31. package/dist/cjs/third-party/configs/AlsoBoughtCbb.js +12 -0
  32. package/dist/cjs/third-party/configs/BfSizeChartSizeGuide.js +12 -0
  33. package/dist/cjs/third-party/configs/EssentialAnnouncementBar.js +12 -0
  34. package/dist/cjs/third-party/configs/EssentialCountdownTimerBar.js +12 -0
  35. package/dist/cjs/third-party/configs/EstimatedDeliveryDatePlus.js +12 -0
  36. package/dist/cjs/third-party/configs/GloColorSwatchvariantImage.js +12 -0
  37. package/dist/cjs/third-party/configs/HextomCountdownTimerBar.js +12 -0
  38. package/dist/cjs/third-party/configs/HextomFreeShippingBar.js +12 -0
  39. package/dist/cjs/third-party/configs/OkendoReviewsLoyalty.js +12 -0
  40. package/dist/cjs/third-party/configs/StellarDeliveryDatePickup.js +12 -0
  41. package/dist/cjs/third-party/configs/TrustBadgesBear.js +12 -0
  42. package/dist/cjs/third-party/configs/TrustedsiteTrustBadges.js +12 -0
  43. package/dist/cjs/third-party/helpers/thirdParty.js +1 -1
  44. package/dist/cjs/third-party/next.js +61 -1
  45. package/dist/cjs/third-party/setting/AlsoBoughtCbb.js +127 -0
  46. package/dist/cjs/third-party/setting/BfSizeChartSizeGuide.js +131 -0
  47. package/dist/cjs/third-party/setting/EssentialAnnouncementBar.js +142 -0
  48. package/dist/cjs/third-party/setting/EssentialCountdownTimerBar.js +142 -0
  49. package/dist/cjs/third-party/setting/EstimatedDeliveryDatePlus.js +128 -0
  50. package/dist/cjs/third-party/setting/GloColorSwatchvariantImage.js +152 -0
  51. package/dist/cjs/third-party/setting/HextomCountdownTimerBar.js +128 -0
  52. package/dist/cjs/third-party/setting/HextomFreeShippingBar.js +128 -0
  53. package/dist/cjs/third-party/setting/OkendoReviewsLoyalty.js +171 -0
  54. package/dist/cjs/third-party/setting/StellarDeliveryDatePickup.js +127 -0
  55. package/dist/cjs/third-party/setting/TrustBadgesBear.js +128 -0
  56. package/dist/cjs/third-party/setting/TrustedsiteTrustBadges.js +177 -0
  57. package/dist/cjs/third-party/setting/index.js +25 -1
  58. package/dist/esm/builder.js +25 -1
  59. package/dist/esm/collection/components/CollectionDescription.js +103 -9
  60. package/dist/esm/collection/components/CollectionDescription.liquid.js +103 -10
  61. package/dist/esm/collection/setting/CollectionDescription.js +128 -0
  62. package/dist/esm/index.js +12 -0
  63. package/dist/esm/index.liquid.js +12 -0
  64. package/dist/esm/third-party/components/AlsoBoughtCbb.js +28 -0
  65. package/dist/esm/third-party/components/AlsoBoughtCbb.liquid.js +17 -0
  66. package/dist/esm/third-party/components/BfSizeChartSizeGuide.js +28 -0
  67. package/dist/esm/third-party/components/BfSizeChartSizeGuide.liquid.js +8 -0
  68. package/dist/esm/third-party/components/EssentialAnnouncementBar.js +28 -0
  69. package/dist/esm/third-party/components/EssentialAnnouncementBar.liquid.js +8 -0
  70. package/dist/esm/third-party/components/EssentialCountdownTimerBar.js +28 -0
  71. package/dist/esm/third-party/components/EssentialCountdownTimerBar.liquid.js +8 -0
  72. package/dist/esm/third-party/components/EstimatedDeliveryDatePlus.js +28 -0
  73. package/dist/esm/third-party/components/EstimatedDeliveryDatePlus.liquid.js +8 -0
  74. package/dist/esm/third-party/components/GloColorSwatchvariantImage.js +28 -0
  75. package/dist/esm/third-party/components/GloColorSwatchvariantImage.liquid.js +8 -0
  76. package/dist/esm/third-party/components/HextomCountdownTimerBar.js +28 -0
  77. package/dist/esm/third-party/components/HextomCountdownTimerBar.liquid.js +8 -0
  78. package/dist/esm/third-party/components/HextomFreeShippingBar.js +28 -0
  79. package/dist/esm/third-party/components/HextomFreeShippingBar.liquid.js +8 -0
  80. package/dist/esm/third-party/components/OkendoReviewsLoyalty.js +28 -0
  81. package/dist/esm/third-party/components/OkendoReviewsLoyalty.liquid.js +8 -0
  82. package/dist/esm/third-party/components/StellarDeliveryDatePickup.js +28 -0
  83. package/dist/esm/third-party/components/StellarDeliveryDatePickup.liquid.js +17 -0
  84. package/dist/esm/third-party/components/TrustBadgesBear.js +28 -0
  85. package/dist/esm/third-party/components/TrustBadgesBear.liquid.js +8 -0
  86. package/dist/esm/third-party/components/TrustedsiteTrustBadges.js +28 -0
  87. package/dist/esm/third-party/components/TrustedsiteTrustBadges.liquid.js +8 -0
  88. package/dist/esm/third-party/configs/AlsoBoughtCbb.js +8 -0
  89. package/dist/esm/third-party/configs/BfSizeChartSizeGuide.js +8 -0
  90. package/dist/esm/third-party/configs/EssentialAnnouncementBar.js +8 -0
  91. package/dist/esm/third-party/configs/EssentialCountdownTimerBar.js +8 -0
  92. package/dist/esm/third-party/configs/EstimatedDeliveryDatePlus.js +8 -0
  93. package/dist/esm/third-party/configs/GloColorSwatchvariantImage.js +8 -0
  94. package/dist/esm/third-party/configs/HextomCountdownTimerBar.js +8 -0
  95. package/dist/esm/third-party/configs/HextomFreeShippingBar.js +8 -0
  96. package/dist/esm/third-party/configs/OkendoReviewsLoyalty.js +8 -0
  97. package/dist/esm/third-party/configs/StellarDeliveryDatePickup.js +8 -0
  98. package/dist/esm/third-party/configs/TrustBadgesBear.js +8 -0
  99. package/dist/esm/third-party/configs/TrustedsiteTrustBadges.js +8 -0
  100. package/dist/esm/third-party/helpers/thirdParty.js +1 -1
  101. package/dist/esm/third-party/next.js +61 -1
  102. package/dist/esm/third-party/setting/AlsoBoughtCbb.js +123 -0
  103. package/dist/esm/third-party/setting/BfSizeChartSizeGuide.js +127 -0
  104. package/dist/esm/third-party/setting/EssentialAnnouncementBar.js +138 -0
  105. package/dist/esm/third-party/setting/EssentialCountdownTimerBar.js +138 -0
  106. package/dist/esm/third-party/setting/EstimatedDeliveryDatePlus.js +124 -0
  107. package/dist/esm/third-party/setting/GloColorSwatchvariantImage.js +148 -0
  108. package/dist/esm/third-party/setting/HextomCountdownTimerBar.js +124 -0
  109. package/dist/esm/third-party/setting/HextomFreeShippingBar.js +124 -0
  110. package/dist/esm/third-party/setting/OkendoReviewsLoyalty.js +167 -0
  111. package/dist/esm/third-party/setting/StellarDeliveryDatePickup.js +123 -0
  112. package/dist/esm/third-party/setting/TrustBadgesBear.js +124 -0
  113. package/dist/esm/third-party/setting/TrustedsiteTrustBadges.js +173 -0
  114. package/dist/esm/third-party/setting/index.js +226 -202
  115. package/dist/types/index.d.ts +204 -2
  116. package/package.json +2 -2
@@ -1,15 +1,109 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import { useCollection } from '@gem-sdk/core';
3
- import Text from '../../text/components/Text.js';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { useCurrentDevice, useCollection, getResponsiveValueByScreen, composeTypographyClassName, composeTypographyStyle, isSafari, cls, getGlobalColorClass, getStyleShadow, makeStyleResponsive, makeStyle, getGlobalColorStyle } from '@gem-sdk/core';
3
+ import { useState, useRef, useEffect } from 'react';
4
4
 
5
- const CollectionDescription = ({ setting })=>{
5
+ const CollectionDescription = ({ setting, builderProps })=>{
6
+ const [open, setOpen] = useState(false);
7
+ const [isShowViewMore, allowShowViewMore] = useState(false);
8
+ const ref = useRef(null);
9
+ const currentDevice = useCurrentDevice();
6
10
  const collection = useCollection();
7
- return /*#__PURE__*/ jsx(Text, {
8
- styles: setting,
9
- setting: {
10
- text: collection?.descriptionHtml ?? 'Collection description',
11
- excludeFlex: true
11
+ const hasLineClamp = getResponsiveValueByScreen(setting?.hasLineClamp, currentDevice);
12
+ const lineClamp = getResponsiveValueByScreen(setting?.lineClamp, currentDevice);
13
+ const appendTypoClass = composeTypographyClassName(setting?.typo, setting?.typography);
14
+ const appendTypoStyle = composeTypographyStyle(setting?.typo, setting?.typography);
15
+ useEffect(()=>{
16
+ const dom = ref.current;
17
+ setOpen(false);
18
+ if (dom && hasLineClamp && collection?.description) {
19
+ const value = lineClamp;
20
+ setTimeout(()=>{
21
+ const scrollHeight = dom?.scrollHeight ?? 0;
22
+ const clientHeight = dom?.clientHeight ?? 0;
23
+ const lineHeight = window.getComputedStyle(dom).getPropertyValue('line-height');
24
+ const lineText = Math.round((scrollHeight ?? 0) / parseInt(lineHeight));
25
+ const conditionCheckLine = isSafari() ? value && value < lineText : clientHeight < scrollHeight;
26
+ if (value && conditionCheckLine) {
27
+ allowShowViewMore(()=>true);
28
+ } else {
29
+ allowShowViewMore(()=>false);
30
+ }
31
+ }, 100);
12
32
  }
33
+ }, [
34
+ hasLineClamp,
35
+ lineClamp,
36
+ collection?.description
37
+ ]);
38
+ const css = `
39
+ .gp-p-description-text > *:not(ol):not(ul):not(table):not(div) {
40
+ display: inline !important;
41
+ }
42
+ .gp-p-description-text > *:not(ol):not(ul):not(table):not(div)::after {
43
+ content: "\\A";
44
+ white-space: pre;
45
+ }
46
+ .gp-p-description-text > table {
47
+ box-shadow: none;
48
+ }
49
+ `;
50
+ const hasDescription = collection?.description && collection.description?.trim() != '';
51
+ return /*#__PURE__*/ jsxs("div", {
52
+ "data-id": builderProps?.uid,
53
+ children: [
54
+ !isSafari() && /*#__PURE__*/ jsx("style", {
55
+ children: css
56
+ }),
57
+ /*#__PURE__*/ jsx("div", {
58
+ ref: ref,
59
+ "data-gp-text": true,
60
+ className: cls('gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre', appendTypoClass, !hasDescription ? 'gp-p-2 gp-text-center gp-text-sm gp-font-semibold gp-text-gray-500 gp-py-2 !gp-text-center' : '', getGlobalColorClass('text', setting?.color)),
61
+ style: {
62
+ ...getStyleShadow({
63
+ styleAppliedFor: 'text-shadow'
64
+ }),
65
+ ...makeStyleResponsive('ta', setting?.textAlign),
66
+ ...hasLineClamp && !open ? makeStyleResponsive('line-clamp', setting?.lineClamp) : {},
67
+ ...makeStyle({
68
+ tt: setting?.transform
69
+ }),
70
+ ...appendTypoStyle
71
+ },
72
+ dangerouslySetInnerHTML: {
73
+ __html: collection?.descriptionHtml && hasDescription ? collection.descriptionHtml : ``
74
+ }
75
+ }),
76
+ hasLineClamp && isShowViewMore && /*#__PURE__*/ jsxs("button", {
77
+ className: cls(appendTypoClass, getGlobalColorClass('text', setting?.showMoreColor), 'gp-mt-4 gp-w-full gp-transition-all hover:gp-opacity-80'),
78
+ style: {
79
+ ...makeStyleResponsive('ta', setting?.textAlign),
80
+ ...makeStyle({
81
+ tt: setting?.transform
82
+ }),
83
+ ...appendTypoStyle,
84
+ ...getGlobalColorStyle(setting?.showMoreColor)
85
+ },
86
+ onClick: ()=>setOpen((prev)=>!prev),
87
+ children: [
88
+ !open ? setting?.viewMoreText : setting?.viewLessText,
89
+ setting?.enableViewMoreIcon && /*#__PURE__*/ jsx("svg", {
90
+ className: "gp-ml-1 gp-inline-block",
91
+ height: "1em",
92
+ width: "1em",
93
+ viewBox: "0 0 22 12",
94
+ fill: "none",
95
+ xmlns: "http://www.w3.org/2000/svg",
96
+ children: !open ? /*#__PURE__*/ jsx("path", {
97
+ d: "M1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L1.70711 0.292893ZM11 11L10.2929 11.7071C10.6834 12.0976 11.3166 12.0976 11.7071 11.7071L11 11ZM21.7071 1.70711C22.0976 1.31658 22.0976 0.683417 21.7071 0.292893C21.3166 -0.0976311 20.6834 -0.0976311 20.2929 0.292893L21.7071 1.70711ZM0.292893 1.70711L10.2929 11.7071L11.7071 10.2929L1.70711 0.292893L0.292893 1.70711ZM11.7071 11.7071L21.7071 1.70711L20.2929 0.292893L10.2929 10.2929L11.7071 11.7071Z",
98
+ fill: "currentColor"
99
+ }) : /*#__PURE__*/ jsx("path", {
100
+ d: "M0.292893 10.2929C-0.0976311 10.6834 -0.0976311 11.3166 0.292893 11.7071C0.683417 12.0976 1.31658 12.0976 1.70711 11.7071L0.292893 10.2929ZM11 1L11.7071 0.292893C11.3166 -0.0976311 10.6834 -0.0976311 10.2929 0.292893L11 1ZM20.2929 11.7071C20.6834 12.0976 21.3166 12.0976 21.7071 11.7071C22.0976 11.3166 22.0976 10.6834 21.7071 10.2929L20.2929 11.7071ZM1.70711 11.7071L11.7071 1.70711L10.2929 0.292893L0.292893 10.2929L1.70711 11.7071ZM10.2929 1.70711L20.2929 11.7071L21.7071 10.2929L11.7071 0.292893L10.2929 1.70711Z",
101
+ fill: "currentColor"
102
+ })
103
+ })
104
+ ]
105
+ })
106
+ ]
13
107
  });
14
108
  };
15
109
 
@@ -1,16 +1,109 @@
1
- import { template } from '@gem-sdk/core';
2
- import Text from '../../text/components/Text.liquid.js';
1
+ import { composeTypographyStyle, composeTypographyClassName, getStyleShadow, makeStyleResponsive, getGlobalColorStyle, makeStyle, makeLineClamp, template, cls, getGlobalColorClass, RenderIf, isLocalEnv, baseAssetURL } from '@gem-sdk/core';
2
+ import { getDynamicSourceLocales, getSettingPreloadData } from '../../helpers.js';
3
+ import { getDisplayStyle } from '../../product/components/ProductImages/common/common.js';
3
4
 
4
- const CollectionDescription = ({ setting })=>{
5
+ const CollectionDescription = ({ setting, advanced, builderProps, pageContext })=>{
6
+ const appendTypoStyle = composeTypographyStyle(setting?.typo, setting?.typography);
7
+ const appendTypoClass = composeTypographyClassName(setting?.typo, setting?.typography);
8
+ const defaultStyle = {
9
+ ...getStyleShadow({
10
+ styleAppliedFor: 'text-shadow'
11
+ }),
12
+ ...makeStyleResponsive('ta', setting?.textAlign),
13
+ ...getGlobalColorStyle(setting?.color),
14
+ ...makeStyle({
15
+ tt: setting?.transform
16
+ }),
17
+ ...appendTypoStyle
18
+ };
19
+ const collapseStyle = {
20
+ ...defaultStyle,
21
+ ...makeStyleResponsive('line-clamp', makeLineClamp(setting?.lineClamp, setting?.hasLineClamp))
22
+ };
23
+ const getDisplayCollapse = ()=>{
24
+ return getDisplayStyle((device)=>!!setting?.hasLineClamp && setting.hasLineClamp[device] !== undefined && !setting.hasLineClamp[device], 'block');
25
+ };
26
+ const moreIcon = `<svg
27
+ class="gp-ml-1 gp-inline-block"
28
+ style="display: inline-block; margin-left: 1px;"
29
+ height="1em"
30
+ width="1em"
31
+ viewBox="0 0 22 12"
32
+ fill="none"
33
+ xmlns="http://www.w3.org/2000/svg"
34
+ >
35
+ <path
36
+ d="M1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L1.70711 0.292893ZM11 11L10.2929 11.7071C10.6834 12.0976 11.3166 12.0976 11.7071 11.7071L11 11ZM21.7071 1.70711C22.0976 1.31658 22.0976 0.683417 21.7071 0.292893C21.3166 -0.0976311 20.6834 -0.0976311 20.2929 0.292893L21.7071 1.70711ZM0.292893 1.70711L10.2929 11.7071L11.7071 10.2929L1.70711 0.292893L0.292893 1.70711ZM11.7071 11.7071L21.7071 1.70711L20.2929 0.292893L10.2929 10.2929L11.7071 11.7071Z"
37
+ fill="currentColor"
38
+ />
39
+ </svg>`;
40
+ const viewMoreTextTranslate = getDynamicSourceLocales({
41
+ val: setting?.viewMoreText,
42
+ uid: builderProps?.uid,
43
+ settingId: 'viewMoreText',
44
+ isLiquid: true,
45
+ pageContext,
46
+ translate: setting?.translate
47
+ });
48
+ const viewLessTextTranslate = getDynamicSourceLocales({
49
+ val: setting?.viewLessText,
50
+ uid: builderProps?.uid,
51
+ settingId: 'viewLessText',
52
+ isLiquid: true,
53
+ pageContext,
54
+ translate: setting?.translate
55
+ });
5
56
  return template`
6
- ${Text({
7
- styles: setting,
57
+ <gp-collection-description data-id="${builderProps?.uid}" class="${advanced?.cssClass} gp-collection-description" gp-data='${JSON.stringify({
8
58
  setting: {
9
- ...setting,
10
- text: '{{ collection.description }}',
11
- excludeFlex: true
12
- }
13
- })}
59
+ lineClamp: setting?.lineClamp,
60
+ hasLineClamp: setting?.hasLineClamp,
61
+ viewMoreText: viewMoreTextTranslate,
62
+ viewLessText: viewLessTextTranslate,
63
+ enableViewMoreIcon: setting?.enableViewMoreIcon
64
+ },
65
+ defaultStyle,
66
+ collapseStyle
67
+ }).replaceAll("'", '&#039;')}'
68
+ view-more-text="${pageContext?.isPreviewing ? viewMoreTextTranslate : `{{${viewMoreTextTranslate}}}`}"
69
+ view-less-text="${pageContext?.isPreviewing ? viewLessTextTranslate : `{{${viewLessTextTranslate}}}`}"
70
+ >
71
+ <div></div>
72
+ <div
73
+ data-gp-text
74
+ class="${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")}"
75
+ data-gp-text
76
+ style="${collapseStyle}"
77
+ >
78
+ {{collection.description}}
79
+ </div>
80
+ {% if collection.description != blank -%}
81
+ <button
82
+ type="button"
83
+ class="p-description-show-more ${cls(appendTypoClass, getGlobalColorClass('text', setting?.showMoreColor), 'gp-mt-4 hover:gp-opacity-80 gp-transition-all gp-w-full')}"
84
+ style="${{
85
+ ...makeStyle({
86
+ tt: setting?.transform
87
+ }),
88
+ ...makeStyleResponsive('ta', setting?.textAlign),
89
+ ...appendTypoStyle,
90
+ ...getGlobalColorStyle(setting?.showMoreColor),
91
+ ...getDisplayCollapse(),
92
+ position: 'absolute',
93
+ visibility: 'hidden'
94
+ }}"
95
+ >
96
+ ${pageContext?.isPreviewing ? viewMoreTextTranslate : `{{${viewMoreTextTranslate}}}`}
97
+ ${setting?.enableViewMoreIcon ? moreIcon : ''}
98
+ </button>
99
+ {%- endif -%}
100
+ {% style %}
101
+ .p-description-wrapper.gp-p-description-text * {
102
+ color: inherit
103
+ }
104
+ {% endstyle %}
105
+ </gp-collection-description>
106
+ ${RenderIf(isLocalEnv, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-collection-description.js' | asset_url }}" defer="defer"></script>`, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="${baseAssetURL}/assets-v2/gp-collection-description.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
14
107
  `;
15
108
  };
16
109
 
@@ -35,6 +35,59 @@ const config = {
35
35
  }
36
36
  ]
37
37
  },
38
+ {
39
+ id: 'hasLineClamp',
40
+ label: 'Enable View More',
41
+ type: 'toggle',
42
+ devices: {
43
+ desktop: {
44
+ default: true
45
+ }
46
+ }
47
+ },
48
+ {
49
+ id: 'lineClamp',
50
+ label: 'Maximum Row(s) To Show',
51
+ type: 'input:number',
52
+ min: 1,
53
+ hide: true,
54
+ devices: {
55
+ desktop: {
56
+ default: 12
57
+ }
58
+ }
59
+ },
60
+ {
61
+ id: 'viewMoreText',
62
+ label: 'View More Text',
63
+ type: 'input',
64
+ default: 'Show more',
65
+ hide: true
66
+ },
67
+ {
68
+ id: 'showMoreColor',
69
+ type: 'colorpicker',
70
+ default: 'text-1'
71
+ },
72
+ {
73
+ id: 'viewLessText',
74
+ label: 'View Less Text',
75
+ type: 'input',
76
+ default: 'Show less',
77
+ hide: true
78
+ },
79
+ {
80
+ id: 'enableViewMoreIcon',
81
+ label: 'Enable Icon',
82
+ type: 'toggle',
83
+ default: true,
84
+ hide: true
85
+ },
86
+ {
87
+ id: 'translate',
88
+ type: 'input',
89
+ default: 'viewLessText,viewMoreText'
90
+ },
38
91
  {
39
92
  id: 'textAlign',
40
93
  label: 'Align',
@@ -70,11 +123,86 @@ const config = {
70
123
  default: 'center'
71
124
  }
72
125
  }
126
+ },
127
+ {
128
+ id: 'color',
129
+ type: 'colorpicker',
130
+ default: 'text-1'
73
131
  }
74
132
  ]
75
133
  }
76
134
  ],
77
135
  ui: [
136
+ {
137
+ type: 'group',
138
+ label: {
139
+ en: ''
140
+ },
141
+ controls: [
142
+ {
143
+ type: 'control',
144
+ label: {
145
+ en: 'Show more'
146
+ },
147
+ options: {
148
+ label: 'large'
149
+ },
150
+ setting: {
151
+ id: 'hasLineClamp'
152
+ }
153
+ },
154
+ {
155
+ type: 'control',
156
+ label: {
157
+ en: 'Text color'
158
+ },
159
+ setting: {
160
+ id: 'showMoreColor'
161
+ },
162
+ condition: 'hasLineClamp == true'
163
+ },
164
+ {
165
+ type: 'control',
166
+ label: {
167
+ en: 'Max lines'
168
+ },
169
+ setting: {
170
+ id: 'lineClamp'
171
+ },
172
+ condition: 'hasLineClamp == true'
173
+ },
174
+ {
175
+ type: 'control',
176
+ label: {
177
+ en: 'Show more label'
178
+ },
179
+ setting: {
180
+ id: 'viewMoreText'
181
+ },
182
+ condition: 'hasLineClamp == true'
183
+ },
184
+ {
185
+ type: 'control',
186
+ label: {
187
+ en: 'Show less label'
188
+ },
189
+ setting: {
190
+ id: 'viewLessText'
191
+ },
192
+ condition: 'hasLineClamp == true'
193
+ },
194
+ {
195
+ type: 'control',
196
+ label: {
197
+ en: 'Icon'
198
+ },
199
+ setting: {
200
+ id: 'enableViewMoreIcon'
201
+ },
202
+ condition: 'hasLineClamp == true'
203
+ }
204
+ ]
205
+ },
78
206
  {
79
207
  label: {
80
208
  en: 'Text'
package/dist/esm/index.js CHANGED
@@ -205,6 +205,18 @@ export { default as TrustreviewsProductReviews } from './third-party/components/
205
205
  export { default as MyappgurusProductReviews } from './third-party/components/MyappgurusProductReviews.js';
206
206
  export { default as HulkProductOptions } from './third-party/components/HulkProductOptions.js';
207
207
  export { default as TrustshopProductReviews } from './third-party/components/TrustshopProductReviews.js';
208
+ export { default as StellarDeliveryDatePickup } from './third-party/components/StellarDeliveryDatePickup.js';
209
+ export { default as EssentialCountdownTimerBar } from './third-party/components/EssentialCountdownTimerBar.js';
210
+ export { default as EssentialAnnouncementBar } from './third-party/components/EssentialAnnouncementBar.js';
211
+ export { default as OkendoReviewsLoyalty } from './third-party/components/OkendoReviewsLoyalty.js';
212
+ export { default as EstimatedDeliveryDatePlus } from './third-party/components/EstimatedDeliveryDatePlus.js';
213
+ export { default as HextomCountdownTimerBar } from './third-party/components/HextomCountdownTimerBar.js';
214
+ export { default as TrustBadgesBear } from './third-party/components/TrustBadgesBear.js';
215
+ export { default as TrustedsiteTrustBadges } from './third-party/components/TrustedsiteTrustBadges.js';
216
+ export { default as GloColorSwatchvariantImage } from './third-party/components/GloColorSwatchvariantImage.js';
217
+ export { default as BfSizeChartSizeGuide } from './third-party/components/BfSizeChartSizeGuide.js';
218
+ export { default as AlsoBoughtCbb } from './third-party/components/AlsoBoughtCbb.js';
219
+ export { default as HextomFreeShippingBar } from './third-party/components/HextomFreeShippingBar.js';
208
220
  export { default as thirdPartyInstantSetting } from './third-party-instant/setting/index.js';
209
221
  export { default as InstantJudgemeReviews } from './third-party-instant/components/InstantJudgemeReviews.js';
210
222
  export { default as InstantLooxReviews } from './third-party-instant/components/InstantLooxReviews.js';
@@ -160,6 +160,18 @@ export { default as TrustreviewsProductReviews } from './third-party/components/
160
160
  export { default as MyappgurusProductReviews } from './third-party/components/MyappgurusProductReviews.liquid.js';
161
161
  export { default as HulkProductOptions } from './third-party/components/HulkProductOptions.liquid.js';
162
162
  export { default as TrustshopProductReviews } from './third-party/components/TrustshopProductReviews.liquid.js';
163
+ export { default as StellarDeliveryDatePickup } from './third-party/components/StellarDeliveryDatePickup.liquid.js';
164
+ export { default as EssentialCountdownTimerBar } from './third-party/components/EssentialCountdownTimerBar.liquid.js';
165
+ export { default as EssentialAnnouncementBar } from './third-party/components/EssentialAnnouncementBar.liquid.js';
166
+ export { default as OkendoReviewsLoyalty } from './third-party/components/OkendoReviewsLoyalty.liquid.js';
167
+ export { default as EstimatedDeliveryDatePlus } from './third-party/components/EstimatedDeliveryDatePlus.liquid.js';
168
+ export { default as HextomCountdownTimerBar } from './third-party/components/HextomCountdownTimerBar.liquid.js';
169
+ export { default as TrustBadgesBear } from './third-party/components/TrustBadgesBear.liquid.js';
170
+ export { default as TrustedsiteTrustBadges } from './third-party/components/TrustedsiteTrustBadges.liquid.js';
171
+ export { default as GloColorSwatchvariantImage } from './third-party/components/GloColorSwatchvariantImage.liquid.js';
172
+ export { default as BfSizeChartSizeGuide } from './third-party/components/BfSizeChartSizeGuide.liquid.js';
173
+ export { default as AlsoBoughtCbb } from './third-party/components/AlsoBoughtCbb.liquid.js';
174
+ export { default as HextomFreeShippingBar } from './third-party/components/HextomFreeShippingBar.liquid.js';
163
175
  export { default as ImageComparison } from './image-comparison/components/ImageComparison.liquid.js';
164
176
  export { default as ThirdPartySlot } from './third-party-slot/components/ThirdPartySlot.liquid.js';
165
177
  export { default as Sticky } from './sticky/components/Sticky.liquid.js';
@@ -0,0 +1,28 @@
1
+ import { jsx, Fragment } from 'react/jsx-runtime';
2
+ import { makeStyleResponsive } from '@gem-sdk/core';
3
+ import ThirdPartyPreview from './ThirdPartyPreview.js';
4
+ import AppConfig from '../configs/AlsoBoughtCbb.js';
5
+
6
+ const AlsoBoughtCbbContent = ()=>{
7
+ return /*#__PURE__*/ jsx(Fragment, {
8
+ children: /*#__PURE__*/ jsx("div", {
9
+ className: "gp-p-2",
10
+ children: /*#__PURE__*/ jsx(ThirdPartyPreview, {
11
+ setting: {
12
+ label: 'Also Bought • CBB',
13
+ iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${AppConfig.logoUrl}">`
14
+ }
15
+ })
16
+ })
17
+ });
18
+ };
19
+ const AlsoBoughtCbb = ({ setting })=>{
20
+ return /*#__PURE__*/ jsx("div", {
21
+ style: {
22
+ ...makeStyleResponsive('ta', setting?.align)
23
+ },
24
+ children: /*#__PURE__*/ jsx(AlsoBoughtCbbContent, {})
25
+ });
26
+ };
27
+
28
+ export { AlsoBoughtCbb as default };
@@ -0,0 +1,17 @@
1
+ import { template, makeStyleResponsive } from '@gem-sdk/core';
2
+
3
+ const AlsoBoughtCbb = ({ setting, advanced })=>{
4
+ const { align } = setting ?? {};
5
+ return template`
6
+ <div
7
+ class="${advanced?.cssClass}"
8
+ style="${{
9
+ ...makeStyleResponsive('ta', align)
10
+ }}"
11
+ >
12
+ <div class="gp-integration-also-bought__position" />
13
+ </div>
14
+ `;
15
+ };
16
+
17
+ export { AlsoBoughtCbb as default };
@@ -0,0 +1,28 @@
1
+ import { jsx, Fragment } from 'react/jsx-runtime';
2
+ import { makeStyleResponsive } from '@gem-sdk/core';
3
+ import ThirdPartyPreview from './ThirdPartyPreview.js';
4
+ import AppConfig from '../configs/BfSizeChartSizeGuide.js';
5
+
6
+ const BfSizeChartSizeGuideContent = ()=>{
7
+ return /*#__PURE__*/ jsx(Fragment, {
8
+ children: /*#__PURE__*/ jsx("div", {
9
+ className: "gp-p-2",
10
+ children: /*#__PURE__*/ jsx(ThirdPartyPreview, {
11
+ setting: {
12
+ label: 'BF Size Chart & Size Guide',
13
+ iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${AppConfig.logoUrl}">`
14
+ }
15
+ })
16
+ })
17
+ });
18
+ };
19
+ const BfSizeChartSizeGuide = ({ setting })=>{
20
+ return /*#__PURE__*/ jsx("div", {
21
+ style: {
22
+ ...makeStyleResponsive('ta', setting?.align)
23
+ },
24
+ children: /*#__PURE__*/ jsx(BfSizeChartSizeGuideContent, {})
25
+ });
26
+ };
27
+
28
+ export { BfSizeChartSizeGuide as default };
@@ -0,0 +1,8 @@
1
+ import { getLiquidForAppBlock } from '../helpers/thirdParty.js';
2
+
3
+ const BfSizeChartSizeGuide = ({ setting, advanced })=>{
4
+ const { align, appBlockId } = setting ?? {};
5
+ return getLiquidForAppBlock(appBlockId, align, advanced?.cssClass);
6
+ };
7
+
8
+ export { BfSizeChartSizeGuide as default };
@@ -0,0 +1,28 @@
1
+ import { jsx, Fragment } from 'react/jsx-runtime';
2
+ import { makeStyleResponsive } from '@gem-sdk/core';
3
+ import ThirdPartyPreview from './ThirdPartyPreview.js';
4
+ import AppConfig from '../configs/EssentialAnnouncementBar.js';
5
+
6
+ const EssentialAnnouncementBarContent = ()=>{
7
+ return /*#__PURE__*/ jsx(Fragment, {
8
+ children: /*#__PURE__*/ jsx("div", {
9
+ className: "gp-p-2",
10
+ children: /*#__PURE__*/ jsx(ThirdPartyPreview, {
11
+ setting: {
12
+ label: 'Essential Announcement Bar',
13
+ iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${AppConfig.logoUrl}">`
14
+ }
15
+ })
16
+ })
17
+ });
18
+ };
19
+ const EssentialAnnouncementBar = ({ setting })=>{
20
+ return /*#__PURE__*/ jsx("div", {
21
+ style: {
22
+ ...makeStyleResponsive('ta', setting?.align)
23
+ },
24
+ children: /*#__PURE__*/ jsx(EssentialAnnouncementBarContent, {})
25
+ });
26
+ };
27
+
28
+ export { EssentialAnnouncementBar as default };
@@ -0,0 +1,8 @@
1
+ import { getLiquidForAppBlock } from '../helpers/thirdParty.js';
2
+
3
+ const EssentialAnnouncementBar = ({ setting, advanced })=>{
4
+ const { align, appBlockId } = setting ?? {};
5
+ return getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block `);
6
+ };
7
+
8
+ export { EssentialAnnouncementBar as default };
@@ -0,0 +1,28 @@
1
+ import { jsx, Fragment } from 'react/jsx-runtime';
2
+ import { makeStyleResponsive } from '@gem-sdk/core';
3
+ import ThirdPartyPreview from './ThirdPartyPreview.js';
4
+ import AppConfig from '../configs/EssentialCountdownTimerBar.js';
5
+
6
+ const EssentialCountdownTimerBarContent = ()=>{
7
+ return /*#__PURE__*/ jsx(Fragment, {
8
+ children: /*#__PURE__*/ jsx("div", {
9
+ className: "gp-p-2",
10
+ children: /*#__PURE__*/ jsx(ThirdPartyPreview, {
11
+ setting: {
12
+ label: 'Essential Countdown Timer Bar',
13
+ iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${AppConfig.logoUrl}">`
14
+ }
15
+ })
16
+ })
17
+ });
18
+ };
19
+ const EssentialCountdownTimerBar = ({ setting })=>{
20
+ return /*#__PURE__*/ jsx("div", {
21
+ style: {
22
+ ...makeStyleResponsive('ta', setting?.align)
23
+ },
24
+ children: /*#__PURE__*/ jsx(EssentialCountdownTimerBarContent, {})
25
+ });
26
+ };
27
+
28
+ export { EssentialCountdownTimerBar as default };
@@ -0,0 +1,8 @@
1
+ import { getLiquidForAppBlock } from '../helpers/thirdParty.js';
2
+
3
+ const EssentialCountdownTimerBar = ({ setting, advanced })=>{
4
+ const { align, appBlockId } = setting ?? {};
5
+ return getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block `);
6
+ };
7
+
8
+ export { EssentialCountdownTimerBar as default };
@@ -0,0 +1,28 @@
1
+ import { jsx, Fragment } from 'react/jsx-runtime';
2
+ import { makeStyleResponsive } from '@gem-sdk/core';
3
+ import ThirdPartyPreview from './ThirdPartyPreview.js';
4
+ import AppConfig from '../configs/EstimatedDeliveryDatePlus.js';
5
+
6
+ const EstimatedDeliveryDatePlusContent = ()=>{
7
+ return /*#__PURE__*/ jsx(Fragment, {
8
+ children: /*#__PURE__*/ jsx("div", {
9
+ className: "gp-p-2",
10
+ children: /*#__PURE__*/ jsx(ThirdPartyPreview, {
11
+ setting: {
12
+ label: 'Estimated Delivery Date ‑ Plus',
13
+ iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${AppConfig.logoUrl}">`
14
+ }
15
+ })
16
+ })
17
+ });
18
+ };
19
+ const EstimatedDeliveryDatePlus = ({ setting })=>{
20
+ return /*#__PURE__*/ jsx("div", {
21
+ style: {
22
+ ...makeStyleResponsive('ta', setting?.align)
23
+ },
24
+ children: /*#__PURE__*/ jsx(EstimatedDeliveryDatePlusContent, {})
25
+ });
26
+ };
27
+
28
+ export { EstimatedDeliveryDatePlus as default };
@@ -0,0 +1,8 @@
1
+ import { getLiquidForAppBlock } from '../helpers/thirdParty.js';
2
+
3
+ const EstimatedDeliveryDatePlus = ({ setting, advanced })=>{
4
+ const { align, appBlockId } = setting ?? {};
5
+ return getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block`);
6
+ };
7
+
8
+ export { EstimatedDeliveryDatePlus as default };
@@ -0,0 +1,28 @@
1
+ import { jsx, Fragment } from 'react/jsx-runtime';
2
+ import { makeStyleResponsive } from '@gem-sdk/core';
3
+ import ThirdPartyPreview from './ThirdPartyPreview.js';
4
+ import AppConfig from '../configs/GloColorSwatchvariantImage.js';
5
+
6
+ const GloColorSwatchvariantImageContent = ()=>{
7
+ return /*#__PURE__*/ jsx(Fragment, {
8
+ children: /*#__PURE__*/ jsx("div", {
9
+ className: "gp-p-2",
10
+ children: /*#__PURE__*/ jsx(ThirdPartyPreview, {
11
+ setting: {
12
+ label: 'GLO Color Swatch,Variant Image',
13
+ iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${AppConfig.logoUrl}">`
14
+ }
15
+ })
16
+ })
17
+ });
18
+ };
19
+ const GloColorSwatchvariantImage = ({ setting })=>{
20
+ return /*#__PURE__*/ jsx("div", {
21
+ style: {
22
+ ...makeStyleResponsive('ta', setting?.align)
23
+ },
24
+ children: /*#__PURE__*/ jsx(GloColorSwatchvariantImageContent, {})
25
+ });
26
+ };
27
+
28
+ export { GloColorSwatchvariantImage as default };