@gem-sdk/components 2.1.27-staging.12 → 2.1.27-staging.15

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.
@@ -7,7 +7,7 @@ var helpers = require('../../helpers.js');
7
7
 
8
8
  const CollectionPaginator = ({ setting, builderProps, pageContext })=>{
9
9
  const { layout, previousText, nextText, typographyPaginator, normalColor, activeColor, align, typo, translate } = setting ?? {};
10
- const numberOfProductOfProductList = pageContext?.numberOfProductOfProductList || 0;
10
+ const numberOfProductOfProductList = setting?.numberOfProducts || pageContext?.numberOfProductOfProductList || 0;
11
11
  const limit = numberOfProductOfProductList > 0 ? numberOfProductOfProductList : 4;
12
12
  const appendTypoClass = core.composeTypographyClassName(typo, typographyPaginator);
13
13
  const appendTypoStyle = core.composeTypographyStyle(typo, typographyPaginator);
@@ -158,6 +158,11 @@ const config = {
158
158
  tooltip: 'Align right'
159
159
  }
160
160
  ]
161
+ },
162
+ {
163
+ id: 'numberOfProducts',
164
+ type: 'input:number',
165
+ default: 0
161
166
  }
162
167
  ]
163
168
  }
@@ -30,7 +30,8 @@ const getSrcSetLiquid = (liquid, storage)=>{
30
30
  return `{{ '${liquid}' | asset_img_url: '768x' }} 768w, {{ '${liquid}' | asset_img_url: '1024x' }} 1024w, {{ '${liquid}' | asset_img_url: 'master' }} 1440w`;
31
31
  };
32
32
  const getSrcSetLink = (link)=>{
33
- return `${link} 768w,${link} 1024w,${link} 1440w`;
33
+ return link; // Since image src didn't change in size so this line of code is pointless
34
+ // return `${link} 768w,${link} 1024w,${link} 1440w`;
34
35
  };
35
36
  const getImageSrc = (image, currentDevice)=>{
36
37
  let src = image?.backupFilePath;
@@ -3,7 +3,7 @@ import { getDynamicSourceLocales, getSettingPreloadData } from '../../helpers.js
3
3
 
4
4
  const CollectionPaginator = ({ setting, builderProps, pageContext })=>{
5
5
  const { layout, previousText, nextText, typographyPaginator, normalColor, activeColor, align, typo, translate } = setting ?? {};
6
- const numberOfProductOfProductList = pageContext?.numberOfProductOfProductList || 0;
6
+ const numberOfProductOfProductList = setting?.numberOfProducts || pageContext?.numberOfProductOfProductList || 0;
7
7
  const limit = numberOfProductOfProductList > 0 ? numberOfProductOfProductList : 4;
8
8
  const appendTypoClass = composeTypographyClassName(typo, typographyPaginator);
9
9
  const appendTypoStyle = composeTypographyStyle(typo, typographyPaginator);
@@ -154,6 +154,11 @@ const config = {
154
154
  tooltip: 'Align right'
155
155
  }
156
156
  ]
157
+ },
158
+ {
159
+ id: 'numberOfProducts',
160
+ type: 'input:number',
161
+ default: 0
157
162
  }
158
163
  ]
159
164
  }
@@ -28,7 +28,8 @@ const getSrcSetLiquid = (liquid, storage)=>{
28
28
  return `{{ '${liquid}' | asset_img_url: '768x' }} 768w, {{ '${liquid}' | asset_img_url: '1024x' }} 1024w, {{ '${liquid}' | asset_img_url: 'master' }} 1440w`;
29
29
  };
30
30
  const getSrcSetLink = (link)=>{
31
- return `${link} 768w,${link} 1024w,${link} 1440w`;
31
+ return link; // Since image src didn't change in size so this line of code is pointless
32
+ // return `${link} 768w,${link} 1024w,${link} 1440w`;
32
33
  };
33
34
  const getImageSrc = (image, currentDevice)=>{
34
35
  let src = image?.backupFilePath;
@@ -767,6 +767,7 @@ type CollectionPaginatorProps = BasePropsWrap<{
767
767
  normalColor?: ColorValueType;
768
768
  activeColor?: ColorValueType;
769
769
  align?: ObjectDevices<AlignProp>;
770
+ numberOfProducts?: number;
770
771
  }> & {
771
772
  pageContext?: PageContext;
772
773
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.1.27-staging.12",
3
+ "version": "2.1.27-staging.15",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -21,8 +21,8 @@
21
21
  "format": "prettier --write \"./src/**/*.{ts,tsx}\""
22
22
  },
23
23
  "devDependencies": {
24
- "@gem-sdk/core": "2.1.27-staging.9",
25
- "@gem-sdk/styles": "2.1.27-staging.0",
24
+ "@gem-sdk/core": "2.1.27-staging.14",
25
+ "@gem-sdk/styles": "2.1.27-staging.13",
26
26
  "@types/react-transition-group": "^4.4.5"
27
27
  },
28
28
  "dependencies": {