@gem-sdk/components 2.1.30 → 2.1.31

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
  }
@@ -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
  }
@@ -766,6 +766,7 @@ type CollectionPaginatorProps = BasePropsWrap<{
766
766
  normalColor?: ColorValueType;
767
767
  activeColor?: ColorValueType;
768
768
  align?: ObjectDevices<AlignProp>;
769
+ numberOfProducts?: number;
769
770
  }> & {
770
771
  pageContext?: PageContext;
771
772
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.1.30",
3
+ "version": "2.1.31",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "devDependencies": {
24
24
  "@gem-sdk/core": "2.1.30",
25
- "@gem-sdk/styles": "2.1.27",
25
+ "@gem-sdk/styles": "2.1.31",
26
26
  "@types/react-transition-group": "^4.4.5"
27
27
  },
28
28
  "dependencies": {