@sentecacommerce-theme/lib 0.14.7 → 0.14.8

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.
@@ -2,17 +2,19 @@ Object.defineProperty(exports, "__esModule", {
2
2
  value: true
3
3
  });
4
4
  exports.getUniCreditProductOffersKey = exports.getBnpProductOffersKey = void 0;
5
- var getBnpProductOffersKey = function(sku) {
5
+ var getBnpProductOffersKey = function(sku, downPaymentCentAmount) {
6
6
  return [
7
7
  'product-bnp-offers',
8
- sku
8
+ sku,
9
+ downPaymentCentAmount
9
10
  ];
10
11
  };
11
12
  exports.getBnpProductOffersKey = getBnpProductOffersKey;
12
- var getUniCreditProductOffersKey = function(sku) {
13
+ var getUniCreditProductOffersKey = function(sku, downPaymentCentAmount) {
13
14
  return [
14
15
  'product-unicredit-offers',
15
- sku
16
+ sku,
17
+ downPaymentCentAmount
16
18
  ];
17
19
  };
18
20
  exports.getUniCreditProductOffersKey = getUniCreditProductOffersKey;
@@ -43,7 +43,7 @@ function _interopRequireDefault(obj) {
43
43
  }
44
44
  var useBnpOffersQuery = function(param) {
45
45
  var sku = param.sku, _preferredInstallmentCentAmount = param.preferredInstallmentCentAmount, preferredInstallmentCentAmount = _preferredInstallmentCentAmount === void 0 ? 0 : _preferredInstallmentCentAmount, _downPaymentCentAmount = param.downPaymentCentAmount, downPaymentCentAmount = _downPaymentCentAmount === void 0 ? 0 : _downPaymentCentAmount;
46
- return (0, _reactQuery).useQuery((0, _keys).getBnpProductOffersKey(sku), _asyncToGenerator(_regeneratorRuntime.default.mark(function _callee() {
46
+ return (0, _reactQuery).useQuery((0, _keys).getBnpProductOffersKey(sku, downPaymentCentAmount), _asyncToGenerator(_regeneratorRuntime.default.mark(function _callee() {
47
47
  return _regeneratorRuntime.default.wrap(function _callee$(_ctx) {
48
48
  while(1)switch(_ctx.prev = _ctx.next){
49
49
  case 0:
@@ -43,7 +43,7 @@ function _interopRequireDefault(obj) {
43
43
  }
44
44
  var useUniCreditOffersQuery = function(param) {
45
45
  var sku = param.sku, _downPaymentCentAmount = param.downPaymentCentAmount, downPaymentCentAmount = _downPaymentCentAmount === void 0 ? 0 : _downPaymentCentAmount;
46
- return (0, _reactQuery).useQuery((0, _keys).getUniCreditProductOffersKey(sku), _asyncToGenerator(_regeneratorRuntime.default.mark(function _callee() {
46
+ return (0, _reactQuery).useQuery((0, _keys).getUniCreditProductOffersKey(sku, downPaymentCentAmount), _asyncToGenerator(_regeneratorRuntime.default.mark(function _callee() {
47
47
  return _regeneratorRuntime.default.wrap(function _callee$(_ctx) {
48
48
  while(1)switch(_ctx.prev = _ctx.next){
49
49
  case 0:
@@ -1,12 +1,14 @@
1
- export var getBnpProductOffersKey = function(sku) {
1
+ export var getBnpProductOffersKey = function(sku, downPaymentCentAmount) {
2
2
  return [
3
3
  'product-bnp-offers',
4
- sku
4
+ sku,
5
+ downPaymentCentAmount
5
6
  ];
6
7
  };
7
- export var getUniCreditProductOffersKey = function(sku) {
8
+ export var getUniCreditProductOffersKey = function(sku, downPaymentCentAmount) {
8
9
  return [
9
10
  'product-unicredit-offers',
10
- sku
11
+ sku,
12
+ downPaymentCentAmount
11
13
  ];
12
14
  };
@@ -34,7 +34,7 @@ function _asyncToGenerator(fn) {
34
34
  }
35
35
  export var useBnpOffersQuery = function(param) {
36
36
  var sku = param.sku, _preferredInstallmentCentAmount = param.preferredInstallmentCentAmount, preferredInstallmentCentAmount = _preferredInstallmentCentAmount === void 0 ? 0 : _preferredInstallmentCentAmount, _downPaymentCentAmount = param.downPaymentCentAmount, downPaymentCentAmount = _downPaymentCentAmount === void 0 ? 0 : _downPaymentCentAmount;
37
- return useQuery(getBnpProductOffersKey(sku), _asyncToGenerator(regeneratorRuntime.mark(function _callee() {
37
+ return useQuery(getBnpProductOffersKey(sku, downPaymentCentAmount), _asyncToGenerator(regeneratorRuntime.mark(function _callee() {
38
38
  return regeneratorRuntime.wrap(function _callee$(_ctx) {
39
39
  while(1)switch(_ctx.prev = _ctx.next){
40
40
  case 0:
@@ -34,7 +34,7 @@ function _asyncToGenerator(fn) {
34
34
  }
35
35
  export var useUniCreditOffersQuery = function(param) {
36
36
  var sku = param.sku, _downPaymentCentAmount = param.downPaymentCentAmount, downPaymentCentAmount = _downPaymentCentAmount === void 0 ? 0 : _downPaymentCentAmount;
37
- return useQuery(getUniCreditProductOffersKey(sku), _asyncToGenerator(regeneratorRuntime.mark(function _callee() {
37
+ return useQuery(getUniCreditProductOffersKey(sku, downPaymentCentAmount), _asyncToGenerator(regeneratorRuntime.mark(function _callee() {
38
38
  return regeneratorRuntime.wrap(function _callee$(_ctx) {
39
39
  while(1)switch(_ctx.prev = _ctx.next){
40
40
  case 0:
@@ -1,2 +1,2 @@
1
- export declare const getBnpProductOffersKey: (sku: string) => string[];
2
- export declare const getUniCreditProductOffersKey: (sku: string) => string[];
1
+ export declare const getBnpProductOffersKey: (sku: string, downPaymentCentAmount?: number | undefined) => (string | number | undefined)[];
2
+ export declare const getUniCreditProductOffersKey: (sku: string, downPaymentCentAmount?: number | undefined) => (string | number | undefined)[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sentecacommerce-theme/lib",
3
3
  "sideEffects": false,
4
- "version": "0.14.7",
4
+ "version": "0.14.8",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/types/index.d.ts",
@@ -31,13 +31,13 @@
31
31
  "watch:cjs": "swc src --out-dir dist/cjs -w",
32
32
  "watch:esm": "swc src --out-dir dist/esm --no-swcrc -w"
33
33
  },
34
- "gitHead": "3a3ca6dce2d1b35de64812bd10698268c03dccf5",
34
+ "gitHead": "556a26ab90b2169a12b698de7a8117efa6069664",
35
35
  "peerDependencies": {
36
36
  "react-query": "^2.26.2"
37
37
  },
38
38
  "dependencies": {
39
- "@sentecacommerce-theme/base": "^0.14.7",
40
- "@sentecacommerce-theme/cms": "^0.14.7",
39
+ "@sentecacommerce-theme/base": "^0.14.8",
40
+ "@sentecacommerce-theme/cms": "^0.14.8",
41
41
  "@sentecacommerce/sdk": "2.0.175",
42
42
  "body-scroll-lock": "^3.1.5",
43
43
  "copy-to-clipboard": "^3.3.1",