@salla.sa/twilight-components 1.6.6 → 1.6.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.
@@ -20138,14 +20138,14 @@ const SallaOfferModal = class {
20138
20138
  async open(product_id) {
20139
20139
  //TODO:: make sure there is only one offer
20140
20140
  this.modal.open();
20141
- return salla.api.withoutNotifier(salla.product.offers(product_id))
20141
+ return salla.api.withoutNotifier(() => salla.product.offers(product_id)
20142
20142
  .then(response => this.showOffer(response.data[0]))
20143
20143
  .catch(e => {
20144
20144
  var _a, _b, _c, _d;
20145
20145
  this.hasError = true;
20146
20146
  this.errorMessage = ((_c = (_b = (_a = e.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.message) || ((_d = e.response) === null || _d === void 0 ? void 0 : _d.data);
20147
20147
  })
20148
- .finally(() => setTimeout(() => { this.modal.stopLoading(); }, 1000));
20148
+ .finally(() => setTimeout(() => this.modal.stopLoading(), 1000)));
20149
20149
  }
20150
20150
  /**
20151
20151
  * Show offer details
@@ -41,14 +41,14 @@ export class SallaOfferModal {
41
41
  async open(product_id) {
42
42
  //TODO:: make sure there is only one offer
43
43
  this.modal.open();
44
- return salla.api.withoutNotifier(salla.product.offers(product_id))
44
+ return salla.api.withoutNotifier(() => salla.product.offers(product_id)
45
45
  .then(response => this.showOffer(response.data[0]))
46
46
  .catch(e => {
47
47
  var _a, _b, _c, _d;
48
48
  this.hasError = true;
49
49
  this.errorMessage = ((_c = (_b = (_a = e.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.message) || ((_d = e.response) === null || _d === void 0 ? void 0 : _d.data);
50
50
  })
51
- .finally(() => setTimeout(() => { this.modal.stopLoading(); }, 1000));
51
+ .finally(() => setTimeout(() => this.modal.stopLoading(), 1000)));
52
52
  }
53
53
  /**
54
54
  * Show offer details
@@ -69,14 +69,14 @@ const SallaOfferModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
69
69
  async open(product_id) {
70
70
  //TODO:: make sure there is only one offer
71
71
  this.modal.open();
72
- return salla.api.withoutNotifier(salla.product.offers(product_id))
72
+ return salla.api.withoutNotifier(() => salla.product.offers(product_id)
73
73
  .then(response => this.showOffer(response.data[0]))
74
74
  .catch(e => {
75
75
  var _a, _b, _c, _d;
76
76
  this.hasError = true;
77
77
  this.errorMessage = ((_c = (_b = (_a = e.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.message) || ((_d = e.response) === null || _d === void 0 ? void 0 : _d.data);
78
78
  })
79
- .finally(() => setTimeout(() => { this.modal.stopLoading(); }, 1000));
79
+ .finally(() => setTimeout(() => this.modal.stopLoading(), 1000)));
80
80
  }
81
81
  /**
82
82
  * Show offer details
@@ -20134,14 +20134,14 @@ const SallaOfferModal = class {
20134
20134
  async open(product_id) {
20135
20135
  //TODO:: make sure there is only one offer
20136
20136
  this.modal.open();
20137
- return salla.api.withoutNotifier(salla.product.offers(product_id))
20137
+ return salla.api.withoutNotifier(() => salla.product.offers(product_id)
20138
20138
  .then(response => this.showOffer(response.data[0]))
20139
20139
  .catch(e => {
20140
20140
  var _a, _b, _c, _d;
20141
20141
  this.hasError = true;
20142
20142
  this.errorMessage = ((_c = (_b = (_a = e.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.message) || ((_d = e.response) === null || _d === void 0 ? void 0 : _d.data);
20143
20143
  })
20144
- .finally(() => setTimeout(() => { this.modal.stopLoading(); }, 1000));
20144
+ .finally(() => setTimeout(() => this.modal.stopLoading(), 1000)));
20145
20145
  }
20146
20146
  /**
20147
20147
  * Show offer details