@sentecacommerce-theme/lib 0.13.18 → 0.13.19

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.
@@ -55,56 +55,60 @@ function _objectSpread(target) {
55
55
  return target;
56
56
  }
57
57
  var useBnpCalculateForCart = function(props) {
58
- var ref8, ref1, ref2, ref3;
58
+ var ref5, ref1, ref2, ref3;
59
59
  var ref4 = props !== null && props !== void 0 ? props : {}, _preferredInstallmentCentAmount = ref4.preferredInstallmentCentAmount, preferredInstallmentCentAmount = _preferredInstallmentCentAmount === void 0 ? 0 : _preferredInstallmentCentAmount, _downPaymentCentAmount = ref4.downPaymentCentAmount, downPaymentCentAmount = _downPaymentCentAmount === void 0 ? 0 : _downPaymentCentAmount;
60
60
  var response = (0, _api).useBnpCalculateForCartQuery({
61
61
  preferredInstallmentCentAmount: preferredInstallmentCentAmount,
62
62
  downPaymentCentAmount: downPaymentCentAmount
63
63
  });
64
- var configLocale = ((ref8 = (0, _index).useConfigState()) === null || ref8 === void 0 ? void 0 : (ref1 = ref8.price) === null || ref1 === void 0 ? void 0 : ref1.locale) || '';
64
+ var configLocale = ((ref5 = (0, _index).useConfigState()) === null || ref5 === void 0 ? void 0 : (ref1 = ref5.price) === null || ref1 === void 0 ? void 0 : ref1.locale) || '';
65
65
  return (0, _react).useMemo(function() {
66
- var ref, ref5, ref6, ref7;
66
+ var ref6;
67
67
  return _objectSpread({}, response, {
68
- data: _objectSpread({}, response === null || response === void 0 ? void 0 : (ref = response.data) === null || ref === void 0 ? void 0 : ref[0], {
69
- offers: response === null || response === void 0 ? void 0 : (ref5 = response.data) === null || ref5 === void 0 ? void 0 : (ref6 = ref5[0]) === null || ref6 === void 0 ? void 0 : (ref7 = ref6.offers) === null || ref7 === void 0 ? void 0 : ref7.map(function(offer) {
70
- var _totalRepaymentAmount = (0, _index).decodePrice(offer.totalRepaymentAmount);
71
- var _correctDownPaymentAmount = (0, _index).decodePrice(offer.correctDownPaymentAmount);
72
- var _installmentAmount = (0, _index).decodePrice(offer.installmentAmount);
73
- var _processingFeeAmount = (0, _index).decodePrice(offer.processingFeeAmount);
74
- var totalRepaymentAmount = (0, _index).formatAsCurrency({
75
- price: _totalRepaymentAmount,
76
- precision: offer.totalRepaymentAmount.fractionDigits,
77
- currency: offer.totalRepaymentAmount.currencyCode,
78
- locale: configLocale || 'en'
79
- });
80
- var correctDownPaymentAmount = (0, _index).formatAsCurrency({
81
- price: _correctDownPaymentAmount,
82
- precision: offer.correctDownPaymentAmount.fractionDigits,
83
- currency: offer.correctDownPaymentAmount.currencyCode,
84
- locale: configLocale || 'en'
85
- });
86
- var installmentAmount = (0, _index).formatAsCurrency({
87
- price: _installmentAmount,
88
- precision: offer.installmentAmount.fractionDigits,
89
- currency: offer.installmentAmount.currencyCode,
90
- locale: configLocale || 'en'
91
- });
92
- var processingFeeAmount = (0, _index).formatAsCurrency({
93
- price: _processingFeeAmount,
94
- precision: offer.processingFeeAmount.fractionDigits,
95
- currency: offer.processingFeeAmount.currencyCode,
96
- locale: configLocale || 'en'
97
- });
98
- return _objectSpread({}, offer, {
99
- offerRaw: offer,
100
- totalRepaymentAmount: totalRepaymentAmount,
101
- correctDownPaymentAmount: correctDownPaymentAmount,
102
- installmentAmount: installmentAmount,
103
- processingFeeAmount: processingFeeAmount
104
- });
105
- }).sort(function(offer, offer2) {
106
- return Number(offer.maturity) - Number(offer2.maturity);
107
- })
68
+ data: (ref6 = response.data) === null || ref6 === void 0 ? void 0 : ref6.map(function(options) {
69
+ var ref;
70
+ return {
71
+ name: options.scheme.name,
72
+ offers: (ref = options.offers) === null || ref === void 0 ? void 0 : ref.map(function(offer) {
73
+ var _totalRepaymentAmount = (0, _index).decodePrice(offer.totalRepaymentAmount);
74
+ var _correctDownPaymentAmount = (0, _index).decodePrice(offer.correctDownPaymentAmount);
75
+ var _installmentAmount = (0, _index).decodePrice(offer.installmentAmount);
76
+ var _processingFeeAmount = (0, _index).decodePrice(offer.processingFeeAmount);
77
+ var totalRepaymentAmount = (0, _index).formatAsCurrency({
78
+ price: _totalRepaymentAmount,
79
+ precision: offer.totalRepaymentAmount.fractionDigits,
80
+ currency: offer.totalRepaymentAmount.currencyCode,
81
+ locale: configLocale || 'en'
82
+ });
83
+ var correctDownPaymentAmount = (0, _index).formatAsCurrency({
84
+ price: _correctDownPaymentAmount,
85
+ precision: offer.correctDownPaymentAmount.fractionDigits,
86
+ currency: offer.correctDownPaymentAmount.currencyCode,
87
+ locale: configLocale || 'en'
88
+ });
89
+ var installmentAmount = (0, _index).formatAsCurrency({
90
+ price: _installmentAmount,
91
+ precision: offer.installmentAmount.fractionDigits,
92
+ currency: offer.installmentAmount.currencyCode,
93
+ locale: configLocale || 'en'
94
+ });
95
+ var processingFeeAmount = (0, _index).formatAsCurrency({
96
+ price: _processingFeeAmount,
97
+ precision: offer.processingFeeAmount.fractionDigits,
98
+ currency: offer.processingFeeAmount.currencyCode,
99
+ locale: configLocale || 'en'
100
+ });
101
+ return _objectSpread({}, offer, {
102
+ offerRaw: offer,
103
+ totalRepaymentAmount: totalRepaymentAmount,
104
+ correctDownPaymentAmount: correctDownPaymentAmount,
105
+ installmentAmount: installmentAmount,
106
+ processingFeeAmount: processingFeeAmount
107
+ });
108
+ }).sort(function(offer, offer2) {
109
+ return Number(offer.maturity) - Number(offer2.maturity);
110
+ })
111
+ };
108
112
  })
109
113
  });
110
114
  }, [
@@ -34,49 +34,55 @@ function _objectSpread(target) {
34
34
  return target;
35
35
  }
36
36
  var useBnpOffers = function(props) {
37
- var ref6, ref1, ref2, ref3;
38
- var configLocale = ((ref6 = (0, _index).useConfigState()) === null || ref6 === void 0 ? void 0 : (ref1 = ref6.price) === null || ref1 === void 0 ? void 0 : ref1.locale) || '';
37
+ var ref4, ref1, ref2, ref3;
38
+ var configLocale = ((ref4 = (0, _index).useConfigState()) === null || ref4 === void 0 ? void 0 : (ref1 = ref4.price) === null || ref1 === void 0 ? void 0 : ref1.locale) || '';
39
39
  var response = (0, _queries).useBnpOffersQuery(props);
40
40
  return (0, _react).useMemo(function() {
41
- var ref, ref4, ref5;
41
+ var ref5;
42
42
  return _objectSpread({}, response, {
43
- data: response === null || response === void 0 ? void 0 : (ref = response.data) === null || ref === void 0 ? void 0 : (ref4 = ref[0]) === null || ref4 === void 0 ? void 0 : (ref5 = ref4.offers) === null || ref5 === void 0 ? void 0 : ref5.map(function(offer) {
44
- var _totalRepaymentAmount = (0, _index).decodePrice(offer.totalRepaymentAmount);
45
- var _correctDownPaymentAmount = (0, _index).decodePrice(offer.correctDownPaymentAmount);
46
- var _installmentAmount = (0, _index).decodePrice(offer.installmentAmount);
47
- var _processingFeeAmount = (0, _index).decodePrice(offer.processingFeeAmount);
48
- var totalRepaymentAmount = (0, _index).formatAsCurrency({
49
- price: _totalRepaymentAmount,
50
- precision: offer.totalRepaymentAmount.fractionDigits,
51
- currency: offer.totalRepaymentAmount.currencyCode,
52
- locale: configLocale || 'en'
53
- });
54
- var correctDownPaymentAmount = (0, _index).formatAsCurrency({
55
- price: _correctDownPaymentAmount,
56
- precision: offer.correctDownPaymentAmount.fractionDigits,
57
- currency: offer.correctDownPaymentAmount.currencyCode,
58
- locale: configLocale || 'en'
59
- });
60
- var installmentAmount = (0, _index).formatAsCurrency({
61
- price: _installmentAmount,
62
- precision: offer.installmentAmount.fractionDigits,
63
- currency: offer.installmentAmount.currencyCode,
64
- locale: configLocale || 'en'
65
- });
66
- var processingFeeAmount = (0, _index).formatAsCurrency({
67
- price: _processingFeeAmount,
68
- precision: offer.processingFeeAmount.fractionDigits,
69
- currency: offer.processingFeeAmount.currencyCode,
70
- locale: configLocale || 'en'
71
- });
72
- return _objectSpread({}, offer, {
73
- totalRepaymentAmount: totalRepaymentAmount,
74
- correctDownPaymentAmount: correctDownPaymentAmount,
75
- installmentAmount: installmentAmount,
76
- processingFeeAmount: processingFeeAmount
77
- });
78
- }).sort(function(offer, offer2) {
79
- return Number(offer.maturity) - Number(offer2.maturity);
43
+ data: response === null || response === void 0 ? void 0 : (ref5 = response.data) === null || ref5 === void 0 ? void 0 : ref5.map(function(result) {
44
+ var ref;
45
+ return {
46
+ name: result.scheme.name,
47
+ offers: (ref = result.offers) === null || ref === void 0 ? void 0 : ref.map(function(offer) {
48
+ var _totalRepaymentAmount = (0, _index).decodePrice(offer.totalRepaymentAmount);
49
+ var _correctDownPaymentAmount = (0, _index).decodePrice(offer.correctDownPaymentAmount);
50
+ var _installmentAmount = (0, _index).decodePrice(offer.installmentAmount);
51
+ var _processingFeeAmount = (0, _index).decodePrice(offer.processingFeeAmount);
52
+ var totalRepaymentAmount = (0, _index).formatAsCurrency({
53
+ price: _totalRepaymentAmount,
54
+ precision: offer.totalRepaymentAmount.fractionDigits,
55
+ currency: offer.totalRepaymentAmount.currencyCode,
56
+ locale: configLocale || 'en'
57
+ });
58
+ var correctDownPaymentAmount = (0, _index).formatAsCurrency({
59
+ price: _correctDownPaymentAmount,
60
+ precision: offer.correctDownPaymentAmount.fractionDigits,
61
+ currency: offer.correctDownPaymentAmount.currencyCode,
62
+ locale: configLocale || 'en'
63
+ });
64
+ var installmentAmount = (0, _index).formatAsCurrency({
65
+ price: _installmentAmount,
66
+ precision: offer.installmentAmount.fractionDigits,
67
+ currency: offer.installmentAmount.currencyCode,
68
+ locale: configLocale || 'en'
69
+ });
70
+ var processingFeeAmount = (0, _index).formatAsCurrency({
71
+ price: _processingFeeAmount,
72
+ precision: offer.processingFeeAmount.fractionDigits,
73
+ currency: offer.processingFeeAmount.currencyCode,
74
+ locale: configLocale || 'en'
75
+ });
76
+ return _objectSpread({}, offer, {
77
+ totalRepaymentAmount: totalRepaymentAmount,
78
+ correctDownPaymentAmount: correctDownPaymentAmount,
79
+ installmentAmount: installmentAmount,
80
+ processingFeeAmount: processingFeeAmount
81
+ });
82
+ }).sort(function(offer, offer2) {
83
+ return Number(offer.maturity) - Number(offer2.maturity);
84
+ })
85
+ };
80
86
  })
81
87
  });
82
88
  }, [
@@ -40,14 +40,17 @@ function _interopRequireDefault(obj) {
40
40
  }
41
41
  var fetchRedirectByFrom = function() {
42
42
  var _ref = _asyncToGenerator(_regeneratorRuntime.default.mark(function _callee(from) {
43
+ var redirectUrl;
43
44
  return _regeneratorRuntime.default.wrap(function _callee$(_ctx) {
44
45
  while(1)switch(_ctx.prev = _ctx.next){
45
46
  case 0:
46
47
  _ctx.next = 2;
47
48
  return (0, _sdk).RedirectsGetByFrom(from);
48
49
  case 2:
49
- return _ctx.abrupt("return", _ctx.sent);
50
- case 3:
50
+ redirectUrl = _ctx.sent;
51
+ redirectUrl.to = encodeURI(redirectUrl.to);
52
+ return _ctx.abrupt("return", redirectUrl);
53
+ case 5:
51
54
  case "end":
52
55
  return _ctx.stop();
53
56
  }
@@ -30,56 +30,60 @@ function _objectSpread(target) {
30
30
  return target;
31
31
  }
32
32
  export var useBnpCalculateForCart = function(props) {
33
- var ref8, ref1, ref2, ref3;
33
+ var ref5, ref1, ref2, ref3;
34
34
  var ref4 = props !== null && props !== void 0 ? props : {}, _preferredInstallmentCentAmount = ref4.preferredInstallmentCentAmount, preferredInstallmentCentAmount = _preferredInstallmentCentAmount === void 0 ? 0 : _preferredInstallmentCentAmount, _downPaymentCentAmount = ref4.downPaymentCentAmount, downPaymentCentAmount = _downPaymentCentAmount === void 0 ? 0 : _downPaymentCentAmount;
35
35
  var response = useBnpCalculateForCartQuery({
36
36
  preferredInstallmentCentAmount: preferredInstallmentCentAmount,
37
37
  downPaymentCentAmount: downPaymentCentAmount
38
38
  });
39
- var configLocale = ((ref8 = useConfigState()) === null || ref8 === void 0 ? void 0 : (ref1 = ref8.price) === null || ref1 === void 0 ? void 0 : ref1.locale) || '';
39
+ var configLocale = ((ref5 = useConfigState()) === null || ref5 === void 0 ? void 0 : (ref1 = ref5.price) === null || ref1 === void 0 ? void 0 : ref1.locale) || '';
40
40
  return useMemo(function() {
41
- var ref, ref5, ref6, ref7;
41
+ var ref6;
42
42
  return _objectSpread({}, response, {
43
- data: _objectSpread({}, response === null || response === void 0 ? void 0 : (ref = response.data) === null || ref === void 0 ? void 0 : ref[0], {
44
- offers: response === null || response === void 0 ? void 0 : (ref5 = response.data) === null || ref5 === void 0 ? void 0 : (ref6 = ref5[0]) === null || ref6 === void 0 ? void 0 : (ref7 = ref6.offers) === null || ref7 === void 0 ? void 0 : ref7.map(function(offer) {
45
- var _totalRepaymentAmount = decodePrice(offer.totalRepaymentAmount);
46
- var _correctDownPaymentAmount = decodePrice(offer.correctDownPaymentAmount);
47
- var _installmentAmount = decodePrice(offer.installmentAmount);
48
- var _processingFeeAmount = decodePrice(offer.processingFeeAmount);
49
- var totalRepaymentAmount = formatAsCurrency({
50
- price: _totalRepaymentAmount,
51
- precision: offer.totalRepaymentAmount.fractionDigits,
52
- currency: offer.totalRepaymentAmount.currencyCode,
53
- locale: configLocale || 'en'
54
- });
55
- var correctDownPaymentAmount = formatAsCurrency({
56
- price: _correctDownPaymentAmount,
57
- precision: offer.correctDownPaymentAmount.fractionDigits,
58
- currency: offer.correctDownPaymentAmount.currencyCode,
59
- locale: configLocale || 'en'
60
- });
61
- var installmentAmount = formatAsCurrency({
62
- price: _installmentAmount,
63
- precision: offer.installmentAmount.fractionDigits,
64
- currency: offer.installmentAmount.currencyCode,
65
- locale: configLocale || 'en'
66
- });
67
- var processingFeeAmount = formatAsCurrency({
68
- price: _processingFeeAmount,
69
- precision: offer.processingFeeAmount.fractionDigits,
70
- currency: offer.processingFeeAmount.currencyCode,
71
- locale: configLocale || 'en'
72
- });
73
- return _objectSpread({}, offer, {
74
- offerRaw: offer,
75
- totalRepaymentAmount: totalRepaymentAmount,
76
- correctDownPaymentAmount: correctDownPaymentAmount,
77
- installmentAmount: installmentAmount,
78
- processingFeeAmount: processingFeeAmount
79
- });
80
- }).sort(function(offer, offer2) {
81
- return Number(offer.maturity) - Number(offer2.maturity);
82
- })
43
+ data: (ref6 = response.data) === null || ref6 === void 0 ? void 0 : ref6.map(function(options) {
44
+ var ref;
45
+ return {
46
+ name: options.scheme.name,
47
+ offers: (ref = options.offers) === null || ref === void 0 ? void 0 : ref.map(function(offer) {
48
+ var _totalRepaymentAmount = decodePrice(offer.totalRepaymentAmount);
49
+ var _correctDownPaymentAmount = decodePrice(offer.correctDownPaymentAmount);
50
+ var _installmentAmount = decodePrice(offer.installmentAmount);
51
+ var _processingFeeAmount = decodePrice(offer.processingFeeAmount);
52
+ var totalRepaymentAmount = formatAsCurrency({
53
+ price: _totalRepaymentAmount,
54
+ precision: offer.totalRepaymentAmount.fractionDigits,
55
+ currency: offer.totalRepaymentAmount.currencyCode,
56
+ locale: configLocale || 'en'
57
+ });
58
+ var correctDownPaymentAmount = formatAsCurrency({
59
+ price: _correctDownPaymentAmount,
60
+ precision: offer.correctDownPaymentAmount.fractionDigits,
61
+ currency: offer.correctDownPaymentAmount.currencyCode,
62
+ locale: configLocale || 'en'
63
+ });
64
+ var installmentAmount = formatAsCurrency({
65
+ price: _installmentAmount,
66
+ precision: offer.installmentAmount.fractionDigits,
67
+ currency: offer.installmentAmount.currencyCode,
68
+ locale: configLocale || 'en'
69
+ });
70
+ var processingFeeAmount = formatAsCurrency({
71
+ price: _processingFeeAmount,
72
+ precision: offer.processingFeeAmount.fractionDigits,
73
+ currency: offer.processingFeeAmount.currencyCode,
74
+ locale: configLocale || 'en'
75
+ });
76
+ return _objectSpread({}, offer, {
77
+ offerRaw: offer,
78
+ totalRepaymentAmount: totalRepaymentAmount,
79
+ correctDownPaymentAmount: correctDownPaymentAmount,
80
+ installmentAmount: installmentAmount,
81
+ processingFeeAmount: processingFeeAmount
82
+ });
83
+ }).sort(function(offer, offer2) {
84
+ return Number(offer.maturity) - Number(offer2.maturity);
85
+ })
86
+ };
83
87
  })
84
88
  });
85
89
  }, [
@@ -30,49 +30,55 @@ function _objectSpread(target) {
30
30
  return target;
31
31
  }
32
32
  export var useBnpOffers = function(props) {
33
- var ref6, ref1, ref2, ref3;
34
- var configLocale = ((ref6 = useConfigState()) === null || ref6 === void 0 ? void 0 : (ref1 = ref6.price) === null || ref1 === void 0 ? void 0 : ref1.locale) || '';
33
+ var ref4, ref1, ref2, ref3;
34
+ var configLocale = ((ref4 = useConfigState()) === null || ref4 === void 0 ? void 0 : (ref1 = ref4.price) === null || ref1 === void 0 ? void 0 : ref1.locale) || '';
35
35
  var response = useBnpOffersQuery(props);
36
36
  return useMemo(function() {
37
- var ref, ref4, ref5;
37
+ var ref5;
38
38
  return _objectSpread({}, response, {
39
- data: response === null || response === void 0 ? void 0 : (ref = response.data) === null || ref === void 0 ? void 0 : (ref4 = ref[0]) === null || ref4 === void 0 ? void 0 : (ref5 = ref4.offers) === null || ref5 === void 0 ? void 0 : ref5.map(function(offer) {
40
- var _totalRepaymentAmount = decodePrice(offer.totalRepaymentAmount);
41
- var _correctDownPaymentAmount = decodePrice(offer.correctDownPaymentAmount);
42
- var _installmentAmount = decodePrice(offer.installmentAmount);
43
- var _processingFeeAmount = decodePrice(offer.processingFeeAmount);
44
- var totalRepaymentAmount = formatAsCurrency({
45
- price: _totalRepaymentAmount,
46
- precision: offer.totalRepaymentAmount.fractionDigits,
47
- currency: offer.totalRepaymentAmount.currencyCode,
48
- locale: configLocale || 'en'
49
- });
50
- var correctDownPaymentAmount = formatAsCurrency({
51
- price: _correctDownPaymentAmount,
52
- precision: offer.correctDownPaymentAmount.fractionDigits,
53
- currency: offer.correctDownPaymentAmount.currencyCode,
54
- locale: configLocale || 'en'
55
- });
56
- var installmentAmount = formatAsCurrency({
57
- price: _installmentAmount,
58
- precision: offer.installmentAmount.fractionDigits,
59
- currency: offer.installmentAmount.currencyCode,
60
- locale: configLocale || 'en'
61
- });
62
- var processingFeeAmount = formatAsCurrency({
63
- price: _processingFeeAmount,
64
- precision: offer.processingFeeAmount.fractionDigits,
65
- currency: offer.processingFeeAmount.currencyCode,
66
- locale: configLocale || 'en'
67
- });
68
- return _objectSpread({}, offer, {
69
- totalRepaymentAmount: totalRepaymentAmount,
70
- correctDownPaymentAmount: correctDownPaymentAmount,
71
- installmentAmount: installmentAmount,
72
- processingFeeAmount: processingFeeAmount
73
- });
74
- }).sort(function(offer, offer2) {
75
- return Number(offer.maturity) - Number(offer2.maturity);
39
+ data: response === null || response === void 0 ? void 0 : (ref5 = response.data) === null || ref5 === void 0 ? void 0 : ref5.map(function(result) {
40
+ var ref;
41
+ return {
42
+ name: result.scheme.name,
43
+ offers: (ref = result.offers) === null || ref === void 0 ? void 0 : ref.map(function(offer) {
44
+ var _totalRepaymentAmount = decodePrice(offer.totalRepaymentAmount);
45
+ var _correctDownPaymentAmount = decodePrice(offer.correctDownPaymentAmount);
46
+ var _installmentAmount = decodePrice(offer.installmentAmount);
47
+ var _processingFeeAmount = decodePrice(offer.processingFeeAmount);
48
+ var totalRepaymentAmount = formatAsCurrency({
49
+ price: _totalRepaymentAmount,
50
+ precision: offer.totalRepaymentAmount.fractionDigits,
51
+ currency: offer.totalRepaymentAmount.currencyCode,
52
+ locale: configLocale || 'en'
53
+ });
54
+ var correctDownPaymentAmount = formatAsCurrency({
55
+ price: _correctDownPaymentAmount,
56
+ precision: offer.correctDownPaymentAmount.fractionDigits,
57
+ currency: offer.correctDownPaymentAmount.currencyCode,
58
+ locale: configLocale || 'en'
59
+ });
60
+ var installmentAmount = formatAsCurrency({
61
+ price: _installmentAmount,
62
+ precision: offer.installmentAmount.fractionDigits,
63
+ currency: offer.installmentAmount.currencyCode,
64
+ locale: configLocale || 'en'
65
+ });
66
+ var processingFeeAmount = formatAsCurrency({
67
+ price: _processingFeeAmount,
68
+ precision: offer.processingFeeAmount.fractionDigits,
69
+ currency: offer.processingFeeAmount.currencyCode,
70
+ locale: configLocale || 'en'
71
+ });
72
+ return _objectSpread({}, offer, {
73
+ totalRepaymentAmount: totalRepaymentAmount,
74
+ correctDownPaymentAmount: correctDownPaymentAmount,
75
+ installmentAmount: installmentAmount,
76
+ processingFeeAmount: processingFeeAmount
77
+ });
78
+ }).sort(function(offer, offer2) {
79
+ return Number(offer.maturity) - Number(offer2.maturity);
80
+ })
81
+ };
76
82
  })
77
83
  });
78
84
  }, [
@@ -31,14 +31,17 @@ function _asyncToGenerator(fn) {
31
31
  }
32
32
  export var fetchRedirectByFrom = function() {
33
33
  var _ref = _asyncToGenerator(regeneratorRuntime.mark(function _callee(from) {
34
+ var redirectUrl;
34
35
  return regeneratorRuntime.wrap(function _callee$(_ctx) {
35
36
  while(1)switch(_ctx.prev = _ctx.next){
36
37
  case 0:
37
38
  _ctx.next = 2;
38
39
  return RedirectsGetByFrom(from);
39
40
  case 2:
40
- return _ctx.abrupt("return", _ctx.sent);
41
- case 3:
41
+ redirectUrl = _ctx.sent;
42
+ redirectUrl.to = encodeURI(redirectUrl.to);
43
+ return _ctx.abrupt("return", redirectUrl);
44
+ case 5:
42
45
  case "end":
43
46
  return _ctx.stop();
44
47
  }
@@ -3,6 +3,7 @@ export declare const useBnpCalculateForCart: (props?: {
3
3
  downPaymentCentAmount?: number | undefined;
4
4
  } | undefined) => {
5
5
  data: {
6
+ name: string;
6
7
  offers: {
7
8
  offerRaw: import("@sentecacommerce/sdk").LoanVariantDTO;
8
9
  totalRepaymentAmount: import("../../index").FormattedPriceType;
@@ -13,9 +14,8 @@ export declare const useBnpCalculateForCart: (props?: {
13
14
  maturity: string;
14
15
  nir: string;
15
16
  variantId: string;
16
- }[] | undefined;
17
- scheme?: import("@sentecacommerce/sdk").PricingSchemesDTO | undefined;
18
- };
17
+ }[];
18
+ }[] | undefined;
19
19
  canFetchMore: boolean | undefined;
20
20
  clear: () => void;
21
21
  error: unknown;
@@ -4,14 +4,17 @@ export declare const useBnpOffers: (props: {
4
4
  downPaymentCentAmount?: number;
5
5
  }) => {
6
6
  data: {
7
- totalRepaymentAmount: import("../../index").FormattedPriceType;
8
- correctDownPaymentAmount: import("../../index").FormattedPriceType;
9
- installmentAmount: import("../../index").FormattedPriceType;
10
- processingFeeAmount: import("../../index").FormattedPriceType;
11
- apr: string;
12
- maturity: string;
13
- nir: string;
14
- variantId: string;
7
+ name: string;
8
+ offers: {
9
+ totalRepaymentAmount: import("../../index").FormattedPriceType;
10
+ correctDownPaymentAmount: import("../../index").FormattedPriceType;
11
+ installmentAmount: import("../../index").FormattedPriceType;
12
+ processingFeeAmount: import("../../index").FormattedPriceType;
13
+ apr: string;
14
+ maturity: string;
15
+ nir: string;
16
+ variantId: string;
17
+ }[];
15
18
  }[] | undefined;
16
19
  canFetchMore: boolean | undefined;
17
20
  clear: () => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sentecacommerce-theme/lib",
3
3
  "sideEffects": false,
4
- "version": "0.13.18",
4
+ "version": "0.13.19",
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": "d03d8560515b6806d5fa33ff85088cfd4012801a",
34
+ "gitHead": "04825b34afeb1587842e6a1ade199bc0ed9e1d59",
35
35
  "peerDependencies": {
36
36
  "react-query": "^2.26.2"
37
37
  },
38
38
  "dependencies": {
39
- "@sentecacommerce-theme/base": "^0.13.18",
40
- "@sentecacommerce-theme/cms": "^0.13.18",
39
+ "@sentecacommerce-theme/base": "^0.13.19",
40
+ "@sentecacommerce-theme/cms": "^0.13.19",
41
41
  "@sentecacommerce/sdk": "2.0.175",
42
42
  "body-scroll-lock": "^3.1.5",
43
43
  "copy-to-clipboard": "^3.3.1",