@gem-sdk/components 2.0.0-dev.255 → 2.0.0-dev.258

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 (102) hide show
  1. package/dist/cjs/banner/components/HeroBannerItem.js +2 -2
  2. package/dist/cjs/banner/components/HeroBannerItem.liquid.js +1 -1
  3. package/dist/cjs/builder.js +3 -3
  4. package/dist/cjs/cart/components/CartList.js +2 -2
  5. package/dist/cjs/collection/components/CollectionBanner.js +2 -1
  6. package/dist/cjs/collection/components/CollectionBanner.liquid.js +2 -1
  7. package/dist/cjs/estimate-delivery/components/EstimateDate.liquid.js +1 -1
  8. package/dist/cjs/grid/col/Col.js +29 -0
  9. package/dist/cjs/grid/col/Col.liquid.js +25 -0
  10. package/dist/cjs/grid/col/common/getAttr.js +15 -0
  11. package/dist/cjs/grid/col/common/getClass.js +25 -0
  12. package/dist/cjs/grid/{components/Col.liquid.js → col/common/getStyles.js} +22 -16
  13. package/dist/cjs/grid/next.js +3 -3
  14. package/dist/cjs/grid/{components → row}/Row.js +44 -55
  15. package/dist/cjs/grid/row/Row.liquid.js +122 -0
  16. package/dist/cjs/grid/row/commons/common.js +35 -0
  17. package/dist/cjs/grid/row/commons/getAttr.js +20 -0
  18. package/dist/cjs/grid/row/commons/getClass.js +44 -0
  19. package/dist/cjs/grid/row/commons/getData.js +17 -0
  20. package/dist/cjs/grid/row/commons/getStyle.js +102 -0
  21. package/dist/cjs/grid/{components → row/commons}/helpers.js +4 -4
  22. package/dist/cjs/grid/row/hooks/useRowSetting.js +78 -0
  23. package/dist/cjs/grid/{setting/row → row/setting}/configs/uiV2.js +1 -1
  24. package/dist/cjs/grid/{components → section}/Section.js +1 -1
  25. package/dist/cjs/grid/{components → section}/Section.liquid.js +1 -1
  26. package/dist/cjs/grid/{setting → section/setting}/Section.js +4 -4
  27. package/dist/cjs/grid/setting/index.js +3 -3
  28. package/dist/cjs/index.js +3 -3
  29. package/dist/cjs/index.liquid.js +3 -3
  30. package/dist/cjs/post-purchase/callout-banner/components/CalloutBox.js +1 -1
  31. package/dist/cjs/post-purchase/product/components/ProductOffer.js +3 -2
  32. package/dist/cjs/post-purchase/product/settings/product-quantity/configs/uiV2.js +5 -2
  33. package/dist/cjs/product/components/Product.js +2 -1
  34. package/dist/cjs/product/components/Product.liquid.js +2 -1
  35. package/dist/cjs/product/components/ProductList.js +1 -1
  36. package/dist/cjs/product/components/ProductList.liquid.js +1 -1
  37. package/dist/cjs/product/components/ProductQuickView/ProductQuickView.js +2 -2
  38. package/dist/cjs/sticky/components/Sticky.js +1 -1
  39. package/dist/esm/banner/components/HeroBannerItem.js +2 -2
  40. package/dist/esm/banner/components/HeroBannerItem.liquid.js +1 -1
  41. package/dist/esm/builder.js +3 -3
  42. package/dist/esm/cart/components/CartList.js +2 -2
  43. package/dist/esm/collection/components/CollectionBanner.js +2 -1
  44. package/dist/esm/collection/components/CollectionBanner.liquid.js +2 -1
  45. package/dist/esm/estimate-delivery/components/EstimateDate.liquid.js +1 -1
  46. package/dist/esm/grid/col/Col.js +25 -0
  47. package/dist/esm/grid/col/Col.liquid.js +21 -0
  48. package/dist/esm/grid/col/common/getAttr.js +13 -0
  49. package/dist/esm/grid/col/common/getClass.js +23 -0
  50. package/dist/esm/grid/{components/Col.liquid.js → col/common/getStyles.js} +23 -15
  51. package/dist/esm/grid/next.js +3 -3
  52. package/dist/esm/grid/{components → row}/Row.js +41 -52
  53. package/dist/esm/grid/row/Row.liquid.js +118 -0
  54. package/dist/esm/grid/row/commons/common.js +31 -0
  55. package/dist/esm/grid/row/commons/getAttr.js +18 -0
  56. package/dist/esm/grid/row/commons/getClass.js +42 -0
  57. package/dist/esm/grid/row/commons/getData.js +15 -0
  58. package/dist/esm/grid/row/commons/getStyle.js +100 -0
  59. package/dist/esm/grid/{components → row/commons}/helpers.js +4 -4
  60. package/dist/esm/grid/row/hooks/useRowSetting.js +76 -0
  61. package/dist/esm/grid/{setting/row → row/setting}/configs/uiV2.js +1 -1
  62. package/dist/esm/grid/{components → section}/Section.js +1 -1
  63. package/dist/esm/grid/{components → section}/Section.liquid.js +1 -1
  64. package/dist/esm/grid/{setting → section/setting}/Section.js +4 -4
  65. package/dist/esm/grid/setting/index.js +3 -3
  66. package/dist/esm/index.js +3 -3
  67. package/dist/esm/index.liquid.js +3 -3
  68. package/dist/esm/post-purchase/callout-banner/components/CalloutBox.js +1 -1
  69. package/dist/esm/post-purchase/product/components/ProductOffer.js +3 -2
  70. package/dist/esm/post-purchase/product/settings/product-quantity/configs/uiV2.js +5 -2
  71. package/dist/esm/product/components/Product.js +2 -1
  72. package/dist/esm/product/components/Product.liquid.js +2 -1
  73. package/dist/esm/product/components/ProductList.js +1 -1
  74. package/dist/esm/product/components/ProductList.liquid.js +1 -1
  75. package/dist/esm/product/components/ProductQuickView/ProductQuickView.js +2 -2
  76. package/dist/esm/sticky/components/Sticky.js +1 -1
  77. package/dist/types/index.d.ts +23 -38
  78. package/package.json +2 -2
  79. package/dist/cjs/grid/components/Col.js +0 -44
  80. package/dist/cjs/grid/components/Row.liquid.js +0 -141
  81. package/dist/cjs/grid/hooks/useRowStyles.js +0 -153
  82. package/dist/esm/grid/components/Col.js +0 -40
  83. package/dist/esm/grid/components/Row.liquid.js +0 -137
  84. package/dist/esm/grid/hooks/useRowStyles.js +0 -151
  85. /package/dist/cjs/grid/{setting → col/setting}/Col.js +0 -0
  86. /package/dist/cjs/grid/{hooks → row/commons}/getInnerRadius.js +0 -0
  87. /package/dist/cjs/grid/{setting/row → row/setting}/Row.js +0 -0
  88. /package/dist/cjs/grid/{setting/row → row/setting}/configs/presets.js +0 -0
  89. /package/dist/cjs/grid/{setting/row → row/setting}/configs/settings.js +0 -0
  90. /package/dist/cjs/grid/{setting/row → row/setting}/configs/uiV1.js +0 -0
  91. /package/dist/cjs/grid/{setting/section → section/setting}/configs/settings.js +0 -0
  92. /package/dist/cjs/grid/{setting/section → section/setting}/configs/uiV1.js +0 -0
  93. /package/dist/cjs/grid/{setting/section → section/setting}/configs/uiV2.js +0 -0
  94. /package/dist/esm/grid/{setting → col/setting}/Col.js +0 -0
  95. /package/dist/esm/grid/{hooks → row/commons}/getInnerRadius.js +0 -0
  96. /package/dist/esm/grid/{setting/row → row/setting}/Row.js +0 -0
  97. /package/dist/esm/grid/{setting/row → row/setting}/configs/presets.js +0 -0
  98. /package/dist/esm/grid/{setting/row → row/setting}/configs/settings.js +0 -0
  99. /package/dist/esm/grid/{setting/row → row/setting}/configs/uiV1.js +0 -0
  100. /package/dist/esm/grid/{setting/section → section/setting}/configs/settings.js +0 -0
  101. /package/dist/esm/grid/{setting/section → section/setting}/configs/uiV1.js +0 -0
  102. /package/dist/esm/grid/{setting/section → section/setting}/configs/uiV2.js +0 -0
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var system = require('@gem-sdk/system');
4
+ var core = require('@gem-sdk/core');
5
+
6
+ const getData = (props)=>{
7
+ const { styles, builderProps } = props;
8
+ const stateData = system.createStateOrContext({
9
+ background: styles?.background,
10
+ uid: builderProps?.uid
11
+ });
12
+ return {
13
+ stateData: core.dataStringify(stateData).replaceAll("'", ''')
14
+ };
15
+ };
16
+
17
+ exports.getData = getData;
@@ -0,0 +1,102 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ var core = require('@gem-sdk/core');
5
+ var getInnerRadius = require('./getInnerRadius.js');
6
+ var system = require('@gem-sdk/system');
7
+ var helpers = require('./helpers.js');
8
+
9
+ const getRowStyle = (rowProps)=>{
10
+ const { children, setting, builderProps, styles, style, advanced, isNotFullWidth } = rowProps;
11
+ const { isSection, layout, horizontalAlign, responsive, inlineAlignment } = setting ?? {};
12
+ const { width, columnGap, fullWidth, background, verticalGutter, verticalGutterMobile } = styles ?? {};
13
+ const innerRadius = getInnerRadius.getInnerRadiusExcludeBorder(advanced?.border, advanced?.rounded);
14
+ const childHasChildren = builderProps?.builderData?.childrens?.length;
15
+ const bgVideoAspectRatioStyle = {
16
+ ...core.makeStyleResponsive('aspect', {
17
+ desktop: '16/9'
18
+ })
19
+ };
20
+ const isRowEmpty = core.isEmptyChildren(children) || !childHasChildren;
21
+ const sizeStyles = helpers.createStyleObject(width, fullWidth);
22
+ const [wrapStyle, restStyle] = core.splitStyle([
23
+ 'pos',
24
+ 'top',
25
+ 'left',
26
+ 'bottom',
27
+ 'right',
28
+ 'z'
29
+ ], style);
30
+ const getGlobalStyles = ()=>{
31
+ return {
32
+ ...isSection ? restStyle : style,
33
+ ...core.makeStyleResponsive('cg', verticalGutter),
34
+ ...core.makeStyleResponsive('rg', verticalGutterMobile),
35
+ ...layout ? core.composeGridLayout(layout) : core.makeStyleResponsive('gtc', responsive),
36
+ ...core.makeStyleResponsive('w', sizeStyles.content)
37
+ };
38
+ };
39
+ const getPostPurchaseStyle = ()=>{
40
+ return {
41
+ '--mb': '0px',
42
+ '--mt': '0px',
43
+ ...core.makeStyleResponsive('cg', columnGap),
44
+ ...core.makeStyle({
45
+ pc: inlineAlignment
46
+ })
47
+ };
48
+ };
49
+ const getRowNormalStyle = (options)=>{
50
+ return {
51
+ ...core.getStyleBackgroundByDevice(background, options),
52
+ ...core.getGradientBgrStyleByDevice(background, {
53
+ desktop: true,
54
+ tablet: true,
55
+ mobile: true
56
+ }),
57
+ ...core.makeStyleResponsive('pc', horizontalAlign)
58
+ };
59
+ };
60
+ const getMarginByWidth = ()=>{
61
+ const isCustomizeMargin = isNotFullWidth && !isRowEmpty;
62
+ if (!isCustomizeMargin) return {};
63
+ return {
64
+ marginLeft: '0px',
65
+ marginRight: '0px'
66
+ };
67
+ };
68
+ const getRadiusStyleInner = ()=>{
69
+ return {
70
+ ...core.composeRadius(innerRadius)
71
+ };
72
+ };
73
+ const rowStyle = system.createStyle({
74
+ ...getGlobalStyles(),
75
+ ...getRowNormalStyle(),
76
+ ...getMarginByWidth(),
77
+ ...getPostPurchaseStyle()
78
+ });
79
+ const backgroundBoxStyle = system.createStyle({
80
+ ...getRadiusStyleInner()
81
+ });
82
+ const embedVideoStyle = system.createStyle({
83
+ ...bgVideoAspectRatioStyle,
84
+ pointerEvents: 'none',
85
+ transform: 'translateY(-50%)',
86
+ top: '50%'
87
+ });
88
+ const sectionStyle = system.createStyle({
89
+ ...wrapStyle,
90
+ ...core.makeStyleResponsive('w', sizeStyles.wrapper),
91
+ ...core.makeStyleResponsive('pl', sizeStyles.padding),
92
+ ...core.makeStyleResponsive('pr', sizeStyles.padding)
93
+ });
94
+ return {
95
+ embedVideoStyle,
96
+ backgroundBoxStyle,
97
+ rowStyle,
98
+ sectionStyle
99
+ };
100
+ };
101
+
102
+ exports.getRowStyle = getRowStyle;
@@ -32,7 +32,7 @@ const getStyleByDevice = (device, fullWidth, width)=>{
32
32
  };
33
33
  } else {
34
34
  return {
35
- contentWidth: `var(--g-ct-w, ${defaultWidth[device]})`,
35
+ contentWidth: undefined,
36
36
  wrapperWidth: `calc(var(--g-ct-w, ${defaultWidth[device]}) + 2 * var(--g-ct-p, 15px))`,
37
37
  wrapperPadding: 'var(--g-ct-p, 15px)'
38
38
  };
@@ -44,9 +44,9 @@ const createStyleObject = (width, fullWidth)=>{
44
44
  const mobileStyle = getStyleByDevice('mobile', fullWidth, width);
45
45
  return {
46
46
  content: {
47
- desktop: desktopStyle.contentWidth || '100%',
48
- tablet: tabletStyle.contentWidth || '100%',
49
- mobile: mobileStyle.contentWidth || '100%'
47
+ desktop: desktopStyle.contentWidth,
48
+ tablet: tabletStyle.contentWidth,
49
+ mobile: mobileStyle.contentWidth
50
50
  },
51
51
  wrapper: {
52
52
  desktop: desktopStyle.wrapperWidth,
@@ -0,0 +1,78 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var core = require('@gem-sdk/core');
5
+ var system = require('@gem-sdk/system');
6
+ var useInView = require('../../../intersection-observer/useInView.js');
7
+
8
+ const useRowSettings = (rowProps)=>{
9
+ const { setting, styles, children, maxWidthWithEmptyChildren, builderAttrs } = rowProps;
10
+ const { isSection, lazy, layout, blockAlignment } = setting ?? {};
11
+ const { background } = styles ?? {};
12
+ const currentDevice = core.useCurrentDevice();
13
+ const [cacheHeightOutViewport, setCacheHeightOutViewport] = React.useState(500);
14
+ const mode = core.useEditorMode();
15
+ const pageType = core.usePageType();
16
+ const bgVideo = core.getValueByDevice(background, currentDevice);
17
+ const isRowEmpty = React.useMemo(()=>{
18
+ return core.isEmptyChildren(children);
19
+ }, [
20
+ children
21
+ ]);
22
+ const [ref, inView] = useInView.useInView({
23
+ initialInView: !lazy,
24
+ triggerOnce: true,
25
+ skip: !isSection,
26
+ onChange: (inView, node)=>{
27
+ if (mode == 'edit' && !inView && node) {
28
+ const computedStyle = getComputedStyle(node);
29
+ let height = node?.getBoundingClientRect().height;
30
+ height -= parseFloat(computedStyle.paddingTop) + parseFloat(computedStyle.paddingBottom);
31
+ setCacheHeightOutViewport(height ?? 500);
32
+ }
33
+ }
34
+ });
35
+ const isRenderPlaceholderViewBox = React.useMemo(()=>!inView && mode == 'edit', [
36
+ inView,
37
+ mode
38
+ ]);
39
+ const isVisibilityContent = React.useMemo(()=>mode !== 'edit' && lazy && !inView, [
40
+ inView,
41
+ lazy,
42
+ mode
43
+ ]);
44
+ const getWidthForEmptyChildren = ()=>{
45
+ const isCustomizeWidth = maxWidthWithEmptyChildren && isRowEmpty && mode === 'edit';
46
+ if (!isCustomizeWidth) return {};
47
+ const display = core.getResponsiveValue(layout, 'display');
48
+ const displayByDevice = display[currentDevice];
49
+ return {
50
+ width: displayByDevice === 'fit' ? 'fit-content' : '400px'
51
+ };
52
+ };
53
+ const rowClassEditorOnly = system.createClass({
54
+ ...getWidthForEmptyChildren,
55
+ 'gp-content-visibility-hidden': isVisibilityContent
56
+ });
57
+ const postPurchaseVerticalAlign = ()=>{
58
+ return {
59
+ desktop: blockAlignment,
60
+ tablet: blockAlignment,
61
+ mobile: blockAlignment
62
+ };
63
+ };
64
+ return {
65
+ ref,
66
+ isRowEmpty,
67
+ cacheHeightOutViewport,
68
+ bgVideo,
69
+ rowClassEditorOnly,
70
+ isRenderPlaceholderViewBox,
71
+ builderAttrs,
72
+ children,
73
+ isPostPurchase: pageType === 'POST_PURCHASE',
74
+ postPurchaseVerticalAlign
75
+ };
76
+ };
77
+
78
+ exports.useRowSettings = useRowSettings;
@@ -29,7 +29,7 @@ const SettingUIV2 = [
29
29
  },
30
30
  {
31
31
  label: {
32
- en: 'Column Spacing'
32
+ en: 'Column spacing'
33
33
  },
34
34
  conditionDisplay: `pageType !== "POST_PURCHASE" && childrens > 1`,
35
35
  controls: [
@@ -4,7 +4,7 @@
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
- var Row = require('./Row.js');
7
+ var Row = require('../row/Row.js');
8
8
  var Loading = require('../../common/components/Loading.js');
9
9
  var React = require('react');
10
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Row_liquid = require('./Row.liquid.js');
5
+ var Row_liquid = require('../row/Row.liquid.js');
6
6
 
7
7
  const Section = (props)=>{
8
8
  return Row_liquid.default({
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Row = require('./row/Row.js');
6
- var settings = require('./section/configs/settings.js');
7
- var uiV1 = require('./section/configs/uiV1.js');
8
- var uiV2 = require('./section/configs/uiV2.js');
5
+ var Row = require('../../row/setting/Row.js');
6
+ var settings = require('./configs/settings.js');
7
+ var uiV1 = require('./configs/uiV1.js');
8
+ var uiV2 = require('./configs/uiV2.js');
9
9
 
10
10
  const config = {
11
11
  ...Row.default,
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var Root = require('./Root.js');
6
- var Section = require('./Section.js');
7
- var Col = require('./Col.js');
8
- var Row = require('./row/Row.js');
6
+ var Section = require('../section/setting/Section.js');
7
+ var Row = require('../row/setting/Row.js');
8
+ var Col = require('../col/setting/Col.js');
9
9
 
10
10
  var gridSetting = {
11
11
  Root: Root.default,
package/dist/cjs/index.js CHANGED
@@ -38,9 +38,9 @@ var CollectionPaginator = require('./collection/components/CollectionPaginator.j
38
38
  var index$8 = require('./countdown-timer/setting/index.js');
39
39
  var Countdown = require('./countdown-timer/components/Countdown.js');
40
40
  var index$9 = require('./grid/setting/index.js');
41
- var Col = require('./grid/components/Col.js');
42
- var Row = require('./grid/components/Row.js');
43
- var Section = require('./grid/components/Section.js');
41
+ var Col = require('./grid/col/Col.js');
42
+ var Row = require('./grid/row/Row.js');
43
+ var Section = require('./grid/section/Section.js');
44
44
  var Root = require('./grid/components/Root.js');
45
45
  var index$a = require('./heading/setting/index.js');
46
46
  var Heading = require('./heading/Heading.js');
@@ -4,9 +4,9 @@
4
4
  var Button_liquid = require('./button/components/Button.liquid.js');
5
5
  var ButtonV2_liquid = require('./button/components/v2/ButtonV2.liquid.js');
6
6
  var Coupon_liquid = require('./coupon/components/Coupon.liquid.js');
7
- var Col_liquid = require('./grid/components/Col.liquid.js');
8
- var Row_liquid = require('./grid/components/Row.liquid.js');
9
- var Section_liquid = require('./grid/components/Section.liquid.js');
7
+ var Col_liquid = require('./grid/col/Col.liquid.js');
8
+ var Row_liquid = require('./grid/row/Row.liquid.js');
9
+ var Section_liquid = require('./grid/section/Section.liquid.js');
10
10
  var Root_liquid = require('./grid/components/Root.liquid.js');
11
11
  var Icon_liquid = require('./icon/components/Icon.liquid.js');
12
12
  var Text_liquid = require('./text/components/Text.liquid.js');
@@ -7,7 +7,7 @@ var jsxRuntime = require('react/jsx-runtime');
7
7
  var system = require('@gem-sdk/system');
8
8
  require('@gem-sdk/core');
9
9
  require('react');
10
- var Row = require('../../../grid/components/Row.js');
10
+ var Row = require('../../../grid/row/Row.js');
11
11
  var getClasses = require('./common/getClasses.js');
12
12
  var getStyles = require('./common/getStyles.js');
13
13
 
@@ -6,9 +6,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var core = require('@gem-sdk/core');
8
8
  var ChildrenDroppable = require('../../../grid/components/ChildrenDroppable.js');
9
- var React = require('react');
10
- var Row = require('../../../grid/components/Row.js');
9
+ require('@gem-sdk/system');
10
+ var Row = require('../../../grid/row/Row.js');
11
11
  var Loading = require('../../../common/components/Loading.js');
12
+ var React = require('react');
12
13
  var helper = require('../../utils/helper.js');
13
14
  var index = require('../helpers/index.js');
14
15
  var ProductOfferPlaceholder = require('../constants/ProductOfferPlaceholder.js');
@@ -22,16 +22,19 @@ const SettingUIV2 = [
22
22
  },
23
23
  iconName: 'polaris-text-block',
24
24
  getValueFromSettingID: 'title',
25
+ disableClearMessage: `This label title is needed for customers <br> to adjust the product's quantity`,
25
26
  controls: [
26
27
  {
27
28
  label: {
28
29
  en: 'Content'
29
30
  },
30
- isHideClear: true,
31
31
  setting: {
32
32
  id: 'title'
33
33
  },
34
- layout: 'vertical'
34
+ layout: 'vertical',
35
+ options: {
36
+ clearButton: false
37
+ }
35
38
  }
36
39
  ]
37
40
  }
@@ -8,7 +8,8 @@ var core = require('@gem-sdk/core');
8
8
  var ChildrenDroppable = require('../../grid/components/ChildrenDroppable.js');
9
9
  var Loading = require('../../common/components/Loading.js');
10
10
  var React = require('react');
11
- var Row = require('../../grid/components/Row.js');
11
+ require('@gem-sdk/system');
12
+ var Row = require('../../grid/row/Row.js');
12
13
  var dynamic = require('next/dynamic');
13
14
  var index = require('../../post-purchase/product/helpers/index.js');
14
15
 
@@ -3,7 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var core = require('@gem-sdk/core');
6
- var Row_liquid = require('../../grid/components/Row.liquid.js');
6
+ require('@gem-sdk/system');
7
+ var Row_liquid = require('../../grid/row/Row.liquid.js');
7
8
  var helpers = require('../../helpers.js');
8
9
 
9
10
  const PRODUCT_ID_LATEST = 'latest';
@@ -18,7 +18,7 @@ var product = require('../helpers/product.js');
18
18
  var SalePageProductListWarning = require('./SalePageProductListWarning.js');
19
19
  var common = require('../../dialog/helpers/common.js');
20
20
  var Head = require('next/head');
21
- var helpers = require('../../grid/components/helpers.js');
21
+ var helpers = require('../../grid/row/commons/helpers.js');
22
22
 
23
23
  const ProductNotFound = dynamic(()=>Promise.resolve().then(function () { return require('./ProductNotFound.js'); }), {
24
24
  loading: Loading.default
@@ -11,7 +11,7 @@ var arrow = require('../../carousel/components/common/arrow.js');
11
11
  var dots = require('../../carousel/components/common/dots.js');
12
12
  var productFeaturedImage = require('./ProductImages/common/productFeaturedImage.js');
13
13
  var helpers = require('../../helpers.js');
14
- var helpers$1 = require('../../grid/components/helpers.js');
14
+ var helpers$1 = require('../../grid/row/commons/helpers.js');
15
15
 
16
16
  const ProductList = ({ setting, builderProps, styles, className, children, advanced, pageContext, style })=>{
17
17
  const PREFIX_COLLECTION_ID = 'gid://shopify/Collection/';
@@ -4,8 +4,8 @@
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
- var Col = require('../../../grid/components/Col.js');
8
- var Row = require('../../../grid/components/Row.js');
7
+ var Col = require('../../../grid/col/Col.js');
8
+ var Row = require('../../../grid/row/Row.js');
9
9
  var React = require('react');
10
10
  require('../../../modal/components/confirm.js');
11
11
  var Modal = require('../../../modal/components/Modal.js');
@@ -8,8 +8,8 @@ var core = require('@gem-sdk/core');
8
8
  var Head = require('next/head');
9
9
  var ChildrenDroppable = require('../../grid/components/ChildrenDroppable.js');
10
10
  var React = require('react');
11
- var helpers = require('../../grid/components/helpers.js');
12
11
  var _const = require('../../common/const.js');
12
+ var helpers = require('../../grid/row/commons/helpers.js');
13
13
 
14
14
  const Sticky = ({ children, builderAttrs, setting, style, builderProps })=>{
15
15
  const { width, fullWidth, position, minimize, background, preloadBgImage } = setting ?? {};
@@ -2,10 +2,10 @@
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { useEditorMode, filterToolbarPreview, getAspectRatioGlobalSize } from '@gem-sdk/core';
4
4
  import { useMemo } from 'react';
5
- import Row from '../../grid/components/Row.js';
5
+ import { createStyle, createClass } from '@gem-sdk/system';
6
+ import Row from '../../grid/row/Row.js';
6
7
  import AdaptiveImage from '../../image/components/AdaptiveImage.js';
7
8
  import HTML5Embed from '../../video/components/HTML5Embed.js';
8
- import { createStyle, createClass } from '@gem-sdk/system';
9
9
  import { getContainerStyle, getOverlayStyle, getRowStyle, getAdaptiveStyle, getBackgroundStyle, getContainBackgroundStyle, getYoutubeIframeStyle, getHtml5VideoStyle } from './common/getStyle.js';
10
10
  import { getContainerClasses, getOverlayClasses, getRowClasses, getAdaptivePictureClasses, getAdaptiveClasses, getBackgroundClasses, getContainBackgroundClasses, getHtml5VideoClasses, getWrapperYoutubeClasses, getIframeYoutubeClasses } from './common/getClasses.js';
11
11
  import { getAspectRatioSettings, getBackgroundImageHeroBanner, showVideoType, horizontalAlign, getWidth, scrollToContentBanner, getBgImage } from './common/common.js';
@@ -1,6 +1,6 @@
1
1
  import { template, getAspectRatioGlobalSize, getResponsiveValueByScreen } from '@gem-sdk/core';
2
- import Row from '../../grid/components/Row.liquid.js';
3
2
  import { createStyle, createClass, If } from '@gem-sdk/system';
3
+ import Row from '../../grid/row/Row.liquid.js';
4
4
  import NextImage from '../../image/components/NextImage.liquid.js';
5
5
  import HTML5Embed from '../../video/components/HTML5Embed.liquid.js';
6
6
  import 'react';
@@ -145,9 +145,9 @@ import CollectionToolbar from './collection/components/CollectionToolbar.js';
145
145
  import CollectionPaginator from './collection/components/CollectionPaginator.js';
146
146
  import './countdown-timer/setting/configs/settings.js';
147
147
  import Countdown from './countdown-timer/components/Countdown.js';
148
- import Column from './grid/components/Col.js';
149
- import Row from './grid/components/Row.js';
150
- import Section from './grid/components/Section.js';
148
+ import Column from './grid/col/Col.js';
149
+ import Row from './grid/row/Row.js';
150
+ import Section from './grid/section/Section.js';
151
151
  import Root from './grid/components/Root.js';
152
152
  import Heading from './heading/Heading.js';
153
153
  import Header from './header/components/Header.js';
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
- import Column from '../../grid/components/Col.js';
3
+ import Column from '../../grid/col/Col.js';
4
4
  import 'react';
5
- import { useCartData, CartLineProvider, isEmptyChildren } from '@gem-sdk/core';
6
5
  import 'next/head';
7
6
  import ChildrenDroppable from '../../grid/components/ChildrenDroppable.js';
7
+ import { useCartData, CartLineProvider, isEmptyChildren } from '@gem-sdk/core';
8
8
  import 'next/image';
9
9
  import '@gem-sdk/system';
10
10
  import 'react-youtube';
@@ -2,7 +2,8 @@
2
2
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
3
3
  import { useCollection, useEditorMode, makeStyleResponsive, cls, getStyleBackgroundByDevice, getGlobalColorStateClass, getGlobalColorStateStyle, makeStyleState } from '@gem-sdk/core';
4
4
  import 'react';
5
- import Row from '../../grid/components/Row.js';
5
+ import '@gem-sdk/system';
6
+ import Row from '../../grid/row/Row.js';
6
7
  import Link from '../../link/components/Link.js';
7
8
 
8
9
  const composeAspect = (input)=>{
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
  import { makeStyleResponsive, template, cls, getStyleBackgroundByDevice, getGlobalColorStateClass, getGlobalColorStateStyle, makeStyleState, RenderIf } from '@gem-sdk/core';
3
- import Row from '../../grid/components/Row.liquid.js';
3
+ import '@gem-sdk/system';
4
+ import Row from '../../grid/row/Row.liquid.js';
4
5
 
5
6
  const composeAspect = (input)=>{
6
7
  if (!input || !input.width || !input.height || !input.src) return undefined;
@@ -1,8 +1,8 @@
1
1
  import { RenderIf, isLocalEnv, baseAssetURL } from '@gem-sdk/core';
2
2
  import { getDynamicSourceLocales, getSettingPreloadData } from '../../helpers.js';
3
+ import '@gem-sdk/system';
3
4
  import 'react/jsx-runtime';
4
5
  import 'react';
5
- import '@gem-sdk/system';
6
6
  import '../../product/components/ProductVariants/variants/index.js';
7
7
  import Text from '../../text/components/Text.liquid.js';
8
8
  import '../../product/components/ProductBadge/constants.js';
@@ -0,0 +1,25 @@
1
+ 'use client';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { usePageType, isEmptyChildren } from '@gem-sdk/core';
4
+ import ChildrenDroppable from '../components/ChildrenDroppable.js';
5
+ import { getStyles } from './common/getStyles.js';
6
+ import { getClass } from './common/getClass.js';
7
+ import { getAttr } from './common/getAttr.js';
8
+
9
+ const Column = (props)=>{
10
+ const { builderAttrs, children } = props;
11
+ const pageType = usePageType();
12
+ const isPostPurchase = pageType === 'POST_PURCHASE';
13
+ const { colStyle } = getStyles(props, isPostPurchase);
14
+ const { colClass } = getClass(props);
15
+ const { colAttr } = getAttr(props);
16
+ return /*#__PURE__*/ jsx("div", {
17
+ ...builderAttrs,
18
+ ...colAttr,
19
+ style: colStyle,
20
+ className: colClass,
21
+ children: isEmptyChildren(children) ? /*#__PURE__*/ jsx(ChildrenDroppable, {}) : children
22
+ });
23
+ };
24
+
25
+ export { Column as default };
@@ -0,0 +1,21 @@
1
+ import { template } from '@gem-sdk/core';
2
+ import { getStyles } from './common/getStyles.js';
3
+ import { getClass } from './common/getClass.js';
4
+ import { getAttr } from './common/getAttr.js';
5
+
6
+ const Column = ({ children, className, style, builderAttrs, builderProps, advanced, setting, styles, justifyContent, order, ...props })=>{
7
+ const { colStyle } = getStyles(props);
8
+ const { colClass } = getClass(props);
9
+ const { colAttr } = getAttr(props);
10
+ return template`<div
11
+ ${{
12
+ ...colAttr
13
+ }}
14
+ style="${colStyle}"
15
+ class="${colClass}"
16
+ >
17
+ ${children ?? ''}
18
+ </div>`;
19
+ };
20
+
21
+ export { Column as default };
@@ -0,0 +1,13 @@
1
+ import { createAttr } from '@gem-sdk/system';
2
+
3
+ const getAttr = (props)=>{
4
+ const { setting } = props;
5
+ const colAttr = createAttr({
6
+ 'data-same-height-display-contents': !!setting?.allowSameHeight
7
+ });
8
+ return {
9
+ colAttr
10
+ };
11
+ };
12
+
13
+ export { getAttr };
@@ -0,0 +1,23 @@
1
+ import { createClass } from '@gem-sdk/system';
2
+
3
+ const getClass = (props)=>{
4
+ const { className, builderProps, styles, advanced } = props;
5
+ const colClass = createClass({
6
+ ...className && {
7
+ [className]: true
8
+ },
9
+ ...builderProps?.uid && {
10
+ [builderProps.uid]: true
11
+ },
12
+ ...advanced?.cssClass && {
13
+ [advanced?.cssClass]: true
14
+ },
15
+ 'gp-relative gp-flex gp-flex-col': true,
16
+ 'gp-w-full': styles?.fullWidth
17
+ });
18
+ return {
19
+ colClass
20
+ };
21
+ };
22
+
23
+ export { getClass };