@ikas/storefront 0.1.12 → 0.1.13
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.
- package/build/index.es.js +7 -5
- package/build/index.js +7 -5
- package/package.json +2 -2
package/build/index.es.js
CHANGED
|
@@ -24209,7 +24209,8 @@ var CheckoutViewModel = /** @class */ (function () {
|
|
|
24209
24209
|
switch (_b.label) {
|
|
24210
24210
|
case 0:
|
|
24211
24211
|
localStorage.removeItem(USE_DIFFERENT_ADDRESS_KEY);
|
|
24212
|
-
if (!(!this.checkout.hasCustomer && ((_a = this.checkout.customer) === null || _a === void 0 ? void 0 : _a.email)
|
|
24212
|
+
if (!(!this.checkout.hasCustomer && ((_a = this.checkout.customer) === null || _a === void 0 ? void 0 : _a.email) &&
|
|
24213
|
+
this.customerConsentGranted)) return [3 /*break*/, 2];
|
|
24213
24214
|
return [4 /*yield*/, this.store.customerStore.createEmailSubscription(this.checkout.customer.email)];
|
|
24214
24215
|
case 1:
|
|
24215
24216
|
_b.sent();
|
|
@@ -33720,9 +33721,6 @@ var IkasCustomerStore = /** @class */ (function () {
|
|
|
33720
33721
|
orders = _a.sent();
|
|
33721
33722
|
if (!Array.isArray(orders) || !orders.length)
|
|
33722
33723
|
return [2 /*return*/, null];
|
|
33723
|
-
return [4 /*yield*/, this.getOrderRefundSettings()];
|
|
33724
|
-
case 2:
|
|
33725
|
-
_a.sent();
|
|
33726
33724
|
order = orders[0];
|
|
33727
33725
|
//@ts-ignore
|
|
33728
33726
|
order._refundSettings = this._refundSettings;
|
|
@@ -33934,6 +33932,9 @@ var IkasCustomerStore = /** @class */ (function () {
|
|
|
33934
33932
|
_a.sent();
|
|
33935
33933
|
return [4 /*yield*/, this.getCustomer()];
|
|
33936
33934
|
case 2:
|
|
33935
|
+
_a.sent();
|
|
33936
|
+
return [4 /*yield*/, this.getOrderRefundSettings()];
|
|
33937
|
+
case 3:
|
|
33937
33938
|
_a.sent();
|
|
33938
33939
|
this._initialized = true;
|
|
33939
33940
|
if (this.customer)
|
|
@@ -34227,7 +34228,8 @@ var IkasOrder = /** @class */ (function () {
|
|
|
34227
34228
|
Object.defineProperty(IkasOrder.prototype, "refundableItems", {
|
|
34228
34229
|
get: function () {
|
|
34229
34230
|
var _this = this;
|
|
34230
|
-
if (this._refundSettings
|
|
34231
|
+
if (!this._refundSettings ||
|
|
34232
|
+
(this._refundSettings && !this._refundSettings.isActiveRefundSection))
|
|
34231
34233
|
return [];
|
|
34232
34234
|
return this.orderLineItems.filter(function (item) {
|
|
34233
34235
|
var _a;
|
package/build/index.js
CHANGED
|
@@ -24224,7 +24224,8 @@ var CheckoutViewModel = /** @class */ (function () {
|
|
|
24224
24224
|
switch (_b.label) {
|
|
24225
24225
|
case 0:
|
|
24226
24226
|
localStorage.removeItem(USE_DIFFERENT_ADDRESS_KEY);
|
|
24227
|
-
if (!(!this.checkout.hasCustomer && ((_a = this.checkout.customer) === null || _a === void 0 ? void 0 : _a.email)
|
|
24227
|
+
if (!(!this.checkout.hasCustomer && ((_a = this.checkout.customer) === null || _a === void 0 ? void 0 : _a.email) &&
|
|
24228
|
+
this.customerConsentGranted)) return [3 /*break*/, 2];
|
|
24228
24229
|
return [4 /*yield*/, this.store.customerStore.createEmailSubscription(this.checkout.customer.email)];
|
|
24229
24230
|
case 1:
|
|
24230
24231
|
_b.sent();
|
|
@@ -33735,9 +33736,6 @@ var IkasCustomerStore = /** @class */ (function () {
|
|
|
33735
33736
|
orders = _a.sent();
|
|
33736
33737
|
if (!Array.isArray(orders) || !orders.length)
|
|
33737
33738
|
return [2 /*return*/, null];
|
|
33738
|
-
return [4 /*yield*/, this.getOrderRefundSettings()];
|
|
33739
|
-
case 2:
|
|
33740
|
-
_a.sent();
|
|
33741
33739
|
order = orders[0];
|
|
33742
33740
|
//@ts-ignore
|
|
33743
33741
|
order._refundSettings = this._refundSettings;
|
|
@@ -33949,6 +33947,9 @@ var IkasCustomerStore = /** @class */ (function () {
|
|
|
33949
33947
|
_a.sent();
|
|
33950
33948
|
return [4 /*yield*/, this.getCustomer()];
|
|
33951
33949
|
case 2:
|
|
33950
|
+
_a.sent();
|
|
33951
|
+
return [4 /*yield*/, this.getOrderRefundSettings()];
|
|
33952
|
+
case 3:
|
|
33952
33953
|
_a.sent();
|
|
33953
33954
|
this._initialized = true;
|
|
33954
33955
|
if (this.customer)
|
|
@@ -34242,7 +34243,8 @@ var IkasOrder = /** @class */ (function () {
|
|
|
34242
34243
|
Object.defineProperty(IkasOrder.prototype, "refundableItems", {
|
|
34243
34244
|
get: function () {
|
|
34244
34245
|
var _this = this;
|
|
34245
|
-
if (this._refundSettings
|
|
34246
|
+
if (!this._refundSettings ||
|
|
34247
|
+
(this._refundSettings && !this._refundSettings.isActiveRefundSection))
|
|
34246
34248
|
return [];
|
|
34247
34249
|
return this.orderLineItems.filter(function (item) {
|
|
34248
34250
|
var _a;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"main": "./build/index.js",
|
|
5
5
|
"module": "./build/index.es.js",
|
|
6
6
|
"author": "Umut Ozan Yıldırım",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"next": "11.1.2",
|
|
22
22
|
"react": "17.0.2",
|
|
23
23
|
"react-dom": "17.0.2",
|
|
24
|
-
"archiver": "^5.3.0",
|
|
24
|
+
"archiver": "^5.3.0",
|
|
25
25
|
"axios": "^0.21.0",
|
|
26
26
|
"cors": "^2.8.5"
|
|
27
27
|
},
|