ng-easycommerce 0.0.591 → 0.0.592
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/README.md +2 -0
- package/bundles/ng-easycommerce.umd.js +139 -118
- package/bundles/ng-easycommerce.umd.js.map +1 -1
- package/bundles/ng-easycommerce.umd.min.js +1 -1
- package/bundles/ng-easycommerce.umd.min.js.map +1 -1
- package/esm2015/lib/ec-component/auth-ec/register-form-ec/register-form-ec.component.js +6 -3
- package/esm2015/lib/utils/toast.service.js +5 -1
- package/esm5/lib/ec-component/auth-ec/register-form-ec/register-form-ec.component.js +6 -3
- package/esm5/lib/utils/toast.service.js +19 -1
- package/fesm2015/ng-easycommerce.js +9 -2
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +139 -118
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/auth-ec/register-form-ec/register-form-ec.component.d.ts +1 -0
- package/lib/utils/toast.service.d.ts +1 -0
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
package/fesm5/ng-easycommerce.js
CHANGED
|
@@ -3294,6 +3294,17 @@ var ErrorHandlerService = /** @class */ (function () {
|
|
|
3294
3294
|
return ErrorHandlerService;
|
|
3295
3295
|
}());
|
|
3296
3296
|
|
|
3297
|
+
var __assign$6 = (this && this.__assign) || function () {
|
|
3298
|
+
__assign$6 = Object.assign || function(t) {
|
|
3299
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3300
|
+
s = arguments[i];
|
|
3301
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
3302
|
+
t[p] = s[p];
|
|
3303
|
+
}
|
|
3304
|
+
return t;
|
|
3305
|
+
};
|
|
3306
|
+
return __assign$6.apply(this, arguments);
|
|
3307
|
+
};
|
|
3297
3308
|
var __decorate$h = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3298
3309
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3299
3310
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -3320,6 +3331,13 @@ var ToastService = /** @class */ (function () {
|
|
|
3320
3331
|
if (configToastr === void 0) { configToastr = _this.configToast; }
|
|
3321
3332
|
_this.translation.get(message, interpolateParams).pipe(take(1)).subscribe(function (res) { return _this.toastrService.show((res ? res : message), title, configToastr); });
|
|
3322
3333
|
};
|
|
3334
|
+
this.showPersistent = function (message, interpolateParams, title, configToastr) {
|
|
3335
|
+
if (interpolateParams === void 0) { interpolateParams = {}; }
|
|
3336
|
+
if (title === void 0) { title = ''; }
|
|
3337
|
+
if (configToastr === void 0) { configToastr = _this.configToast; }
|
|
3338
|
+
var persistentConfig = __assign$6(__assign$6({}, configToastr), { closeButton: true, timeOut: 0, extendedTimeOut: 0 });
|
|
3339
|
+
_this.translation.get(message, interpolateParams).pipe(take(1)).subscribe(function (res) { return _this.toastrService.show((res ? res : message), title, persistentConfig); });
|
|
3340
|
+
};
|
|
3323
3341
|
this.configToast = {};
|
|
3324
3342
|
}
|
|
3325
3343
|
ToastService.ctorParameters = function () { return [
|
|
@@ -3362,8 +3380,8 @@ var IpService = /** @class */ (function () {
|
|
|
3362
3380
|
return IpService;
|
|
3363
3381
|
}());
|
|
3364
3382
|
|
|
3365
|
-
var __assign$
|
|
3366
|
-
__assign$
|
|
3383
|
+
var __assign$7 = (this && this.__assign) || function () {
|
|
3384
|
+
__assign$7 = Object.assign || function(t) {
|
|
3367
3385
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3368
3386
|
s = arguments[i];
|
|
3369
3387
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -3371,7 +3389,7 @@ var __assign$6 = (this && this.__assign) || function () {
|
|
|
3371
3389
|
}
|
|
3372
3390
|
return t;
|
|
3373
3391
|
};
|
|
3374
|
-
return __assign$
|
|
3392
|
+
return __assign$7.apply(this, arguments);
|
|
3375
3393
|
};
|
|
3376
3394
|
var __decorate$j = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3377
3395
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -3492,7 +3510,7 @@ var CheckoutService = /** @class */ (function () {
|
|
|
3492
3510
|
var urlWithParams = _this.getHasPurchaseConditions() + "?" + queryString;
|
|
3493
3511
|
_this.connection.getErrorNotHandler(urlWithParams).toPromise().then(function (res) {
|
|
3494
3512
|
var _a, _b;
|
|
3495
|
-
_this.analyticsService.callEvent('checkout_init', __assign$
|
|
3513
|
+
_this.analyticsService.callEvent('checkout_init', __assign$7(__assign$7({}, _this.cartLocal), { currency: (_a = _this.cartLocal) === null || _a === void 0 ? void 0 : _a.currency, value: (_b = _this.cartLocal) === null || _b === void 0 ? void 0 : _b.total }));
|
|
3496
3514
|
});
|
|
3497
3515
|
});
|
|
3498
3516
|
};
|
|
@@ -3579,7 +3597,7 @@ var CheckoutService = /** @class */ (function () {
|
|
|
3579
3597
|
return [2 /*return*/, ({ ok: false, require_login: true, message: 'not-completed' })];
|
|
3580
3598
|
}
|
|
3581
3599
|
this.setOrder(result);
|
|
3582
|
-
this.analyticsService.callEvent('purchase', __assign$
|
|
3600
|
+
this.analyticsService.callEvent('purchase', __assign$7(__assign$7({}, result), { currency: result.currency, value: result.total }));
|
|
3583
3601
|
this.cartService.clearAndResetCart();
|
|
3584
3602
|
this.canCheckoutSubject.next(false);
|
|
3585
3603
|
this.onReadySubject.next(false);
|
|
@@ -3592,7 +3610,7 @@ var CheckoutService = /** @class */ (function () {
|
|
|
3592
3610
|
var _a, _b, _c;
|
|
3593
3611
|
var result = _this.orderUtils.getPromotions(cart);
|
|
3594
3612
|
if (((_a = _this.authService.getUserProfileAsUser()) === null || _a === void 0 ? void 0 : _a.isWholesaler()) && cart.totals.taxes != 0) {
|
|
3595
|
-
var total = __assign$
|
|
3613
|
+
var total = __assign$7({}, result[result.length - 1]);
|
|
3596
3614
|
result[result.length - 1] = {
|
|
3597
3615
|
type: 'taxes',
|
|
3598
3616
|
name: 'taxes',
|
|
@@ -3603,7 +3621,7 @@ var CheckoutService = /** @class */ (function () {
|
|
|
3603
3621
|
var shipment = (_b = result) === null || _b === void 0 ? void 0 : _b.find(function (promotion) { return promotion.type == "shipment"; });
|
|
3604
3622
|
if (!shipment && cart.totals.shipping != 0) {
|
|
3605
3623
|
if (((_c = result) === null || _c === void 0 ? void 0 : _c.length) && !result.find(function (item) { return item.type === "shipment"; })) {
|
|
3606
|
-
var total = __assign$
|
|
3624
|
+
var total = __assign$7({}, result[result.length - 1]);
|
|
3607
3625
|
result[result.length - 1] = {
|
|
3608
3626
|
type: 'shipment',
|
|
3609
3627
|
name: 'shipment',
|
|
@@ -3745,8 +3763,8 @@ var __extends$6 = (this && this.__extends) || (function () {
|
|
|
3745
3763
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3746
3764
|
};
|
|
3747
3765
|
})();
|
|
3748
|
-
var __assign$
|
|
3749
|
-
__assign$
|
|
3766
|
+
var __assign$8 = (this && this.__assign) || function () {
|
|
3767
|
+
__assign$8 = Object.assign || function(t) {
|
|
3750
3768
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3751
3769
|
s = arguments[i];
|
|
3752
3770
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -3754,7 +3772,7 @@ var __assign$7 = (this && this.__assign) || function () {
|
|
|
3754
3772
|
}
|
|
3755
3773
|
return t;
|
|
3756
3774
|
};
|
|
3757
|
-
return __assign$
|
|
3775
|
+
return __assign$8.apply(this, arguments);
|
|
3758
3776
|
};
|
|
3759
3777
|
var __decorate$k = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3760
3778
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -3823,7 +3841,7 @@ var AddressingService = /** @class */ (function (_super) {
|
|
|
3823
3841
|
return [2 /*return*/, this.connection.get(this.countriesApi()).pipe(map(function (res) { var _a, _b; return (_b = (_a = res) === null || _a === void 0 ? void 0 : _a._embedded) === null || _b === void 0 ? void 0 : _b.items; })).toPromise()];
|
|
3824
3842
|
}); }); };
|
|
3825
3843
|
_this.getAddressBook = function () { return __awaiter$3(_this, void 0, void 0, function () { return __generator$3(this, function (_a) {
|
|
3826
|
-
return [2 /*return*/, this.connection.get(this.addressBookApi()).pipe(map(function (res) { var _a; return ((_a = res) === null || _a === void 0 ? void 0 : _a.length) && res.map(function (addres) { return addres && __assign$
|
|
3844
|
+
return [2 /*return*/, this.connection.get(this.addressBookApi()).pipe(map(function (res) { var _a; return ((_a = res) === null || _a === void 0 ? void 0 : _a.length) && res.map(function (addres) { return addres && __assign$8(__assign$8({}, addres), { selected: addres.default }); }) || null; })).toPromise()];
|
|
3827
3845
|
}); }); };
|
|
3828
3846
|
_this.setHeadquarter = function (sede) {
|
|
3829
3847
|
return _this.connection.put(_this.headquarterApi(), sede.selected)
|
|
@@ -3857,7 +3875,7 @@ var AddressingService = /** @class */ (function (_super) {
|
|
|
3857
3875
|
};
|
|
3858
3876
|
_this.putAddressAndHandle = function (user_data, next, onError) {
|
|
3859
3877
|
user_data.locale = _this.consts.getLocale();
|
|
3860
|
-
var data = { shippingAddress: __assign$
|
|
3878
|
+
var data = { shippingAddress: __assign$8({}, user_data.data) };
|
|
3861
3879
|
_this.connection.put(_this.putAddressApi(), data).toPromise().then(function (res) {
|
|
3862
3880
|
_this.setStepReady(user_data, res);
|
|
3863
3881
|
_this.analyticsService.callEvent('payment_info', res);
|
|
@@ -4099,8 +4117,8 @@ var ChannelConfigService = /** @class */ (function () {
|
|
|
4099
4117
|
return ChannelConfigService$1;
|
|
4100
4118
|
}());
|
|
4101
4119
|
|
|
4102
|
-
var __assign$
|
|
4103
|
-
__assign$
|
|
4120
|
+
var __assign$9 = (this && this.__assign) || function () {
|
|
4121
|
+
__assign$9 = Object.assign || function(t) {
|
|
4104
4122
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4105
4123
|
s = arguments[i];
|
|
4106
4124
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -4108,7 +4126,7 @@ var __assign$8 = (this && this.__assign) || function () {
|
|
|
4108
4126
|
}
|
|
4109
4127
|
return t;
|
|
4110
4128
|
};
|
|
4111
|
-
return __assign$
|
|
4129
|
+
return __assign$9.apply(this, arguments);
|
|
4112
4130
|
};
|
|
4113
4131
|
var __decorate$m = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
4114
4132
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -4261,7 +4279,7 @@ var AuthService = /** @class */ (function () {
|
|
|
4261
4279
|
*/
|
|
4262
4280
|
this.doLogin = function (user) {
|
|
4263
4281
|
_this.loggingInSubject.next(true);
|
|
4264
|
-
user = __assign$
|
|
4282
|
+
user = __assign$9(__assign$9({}, user), _this.constants.loginExtraData());
|
|
4265
4283
|
return _this.connection.post(_this.tokenApi(), user).pipe(map(function (res) { return _this.doLoginUser(res); }), mapTo('ok'), catchError(function (err) {
|
|
4266
4284
|
_this.loggingInSubject.next(false);
|
|
4267
4285
|
return of(err.toString());
|
|
@@ -4388,10 +4406,10 @@ var AuthService = /** @class */ (function () {
|
|
|
4388
4406
|
this.injector.get(ChannelConfigService).channelConfig$.subscribe(function (ch) { return _this.channel = ch; });
|
|
4389
4407
|
this.injector.get(ChannelConfigService).channels.subscribe(function (ch) { return _this.channels = ch; });
|
|
4390
4408
|
this.loggingInSubject.next(true);
|
|
4391
|
-
user = __assign$
|
|
4409
|
+
user = __assign$9(__assign$9({}, user), this.constants.loginExtraData());
|
|
4392
4410
|
var result = this.connection.post(this.tokenApi(), user).pipe(map(function (res) {
|
|
4393
|
-
if (_this.channelAccessPermission(__assign$
|
|
4394
|
-
_this.doLoginUser(__assign$
|
|
4411
|
+
if (_this.channelAccessPermission(__assign$9(__assign$9({}, user), res)) && _this.isAllowedRole(withRoles, res.type)) {
|
|
4412
|
+
_this.doLoginUser(__assign$9(__assign$9({}, user), res));
|
|
4395
4413
|
return 'ok';
|
|
4396
4414
|
}
|
|
4397
4415
|
return 'error';
|
|
@@ -4443,7 +4461,7 @@ var AuthService = /** @class */ (function () {
|
|
|
4443
4461
|
};
|
|
4444
4462
|
AuthService$1.prototype.refreshToken = function () {
|
|
4445
4463
|
var _this = this;
|
|
4446
|
-
var data = __assign$
|
|
4464
|
+
var data = __assign$9(__assign$9({}, this.constants.loginExtraData()), { refresh_token: this.getRefreshToken() });
|
|
4447
4465
|
return this.connection.post(this.tokenApi(), data).pipe(map(function (res) { return _this.doLoginUser(res); }));
|
|
4448
4466
|
};
|
|
4449
4467
|
AuthService$1.prototype.getToken = function () {
|
|
@@ -4497,8 +4515,8 @@ var AuthService = /** @class */ (function () {
|
|
|
4497
4515
|
return AuthService$1;
|
|
4498
4516
|
}());
|
|
4499
4517
|
|
|
4500
|
-
var __assign$
|
|
4501
|
-
__assign$
|
|
4518
|
+
var __assign$a = (this && this.__assign) || function () {
|
|
4519
|
+
__assign$a = Object.assign || function(t) {
|
|
4502
4520
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4503
4521
|
s = arguments[i];
|
|
4504
4522
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -4506,7 +4524,7 @@ var __assign$9 = (this && this.__assign) || function () {
|
|
|
4506
4524
|
}
|
|
4507
4525
|
return t;
|
|
4508
4526
|
};
|
|
4509
|
-
return __assign$
|
|
4527
|
+
return __assign$a.apply(this, arguments);
|
|
4510
4528
|
};
|
|
4511
4529
|
var __decorate$n = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
4512
4530
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -4624,7 +4642,7 @@ var CartService = /** @class */ (function () {
|
|
|
4624
4642
|
this.showMax$ = this.balanceCustomer$.pipe(map(function (data) { return data.showMax; }));
|
|
4625
4643
|
this.showPrice$ = this.balanceCustomer$.pipe(map(function (data) { return data.showPrice; }));
|
|
4626
4644
|
this.getAddressBook = function () { return __awaiter$5(_this, void 0, void 0, function () { return __generator$5(this, function (_a) {
|
|
4627
|
-
return [2 /*return*/, this.connection.get(this.addressBookApi()).pipe(map(function (res) { var _a; return ((_a = res) === null || _a === void 0 ? void 0 : _a.length) && res.map(function (addres) { return addres && __assign$
|
|
4645
|
+
return [2 /*return*/, this.connection.get(this.addressBookApi()).pipe(map(function (res) { var _a; return ((_a = res) === null || _a === void 0 ? void 0 : _a.length) && res.map(function (addres) { return addres && __assign$a(__assign$a({}, addres), { selected: addres.default }); }) || null; })).toPromise()];
|
|
4628
4646
|
}); }); };
|
|
4629
4647
|
this.getTaxes = function () { return __awaiter$5(_this, void 0, void 0, function () { return __generator$5(this, function (_a) {
|
|
4630
4648
|
return [2 /*return*/, this.connection.post(this.taxesApi(), { token: this.cart_token }).subscribe(function (res) { return res; })];
|
|
@@ -4714,7 +4732,7 @@ var CartService = /** @class */ (function () {
|
|
|
4714
4732
|
toast && _this.toastrService.show('product-removed');
|
|
4715
4733
|
_this.updateLocalCart();
|
|
4716
4734
|
// this.googleAnalytics.removeFromCart(product);
|
|
4717
|
-
_this.analyticsService.callEvent('remove_from_cart', __assign$
|
|
4735
|
+
_this.analyticsService.callEvent('remove_from_cart', __assign$a(__assign$a({}, product), { currency: _this.consts.currency.code }));
|
|
4718
4736
|
};
|
|
4719
4737
|
this.addIfAllreadyExists = function (product, variant_id, quantityAdd) {
|
|
4720
4738
|
if (quantityAdd === void 0) { quantityAdd = 1; }
|
|
@@ -4974,7 +4992,7 @@ var CartService = /** @class */ (function () {
|
|
|
4974
4992
|
var coupon = { code: cart.couponCode };
|
|
4975
4993
|
try {
|
|
4976
4994
|
var key = Object.keys(cart.cartDiscounts)[0];
|
|
4977
|
-
coupon = __assign$
|
|
4995
|
+
coupon = __assign$a(__assign$a({}, coupon), { amount: (cart.cartDiscounts && cart.cartDiscounts[key].amount.current) || 0, name: (cart.cartDiscounts && cart.cartDiscounts[key].name) || 'no-name' });
|
|
4978
4996
|
}
|
|
4979
4997
|
catch (e) { }
|
|
4980
4998
|
(coupon != current_coupon) && _this.couponSubject.next(coupon);
|
|
@@ -5171,8 +5189,8 @@ var CartService = /** @class */ (function () {
|
|
|
5171
5189
|
return CartService$1;
|
|
5172
5190
|
}());
|
|
5173
5191
|
|
|
5174
|
-
var __assign$
|
|
5175
|
-
__assign$
|
|
5192
|
+
var __assign$b = (this && this.__assign) || function () {
|
|
5193
|
+
__assign$b = Object.assign || function(t) {
|
|
5176
5194
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5177
5195
|
s = arguments[i];
|
|
5178
5196
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -5180,7 +5198,7 @@ var __assign$a = (this && this.__assign) || function () {
|
|
|
5180
5198
|
}
|
|
5181
5199
|
return t;
|
|
5182
5200
|
};
|
|
5183
|
-
return __assign$
|
|
5201
|
+
return __assign$b.apply(this, arguments);
|
|
5184
5202
|
};
|
|
5185
5203
|
var __decorate$o = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
5186
5204
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -5262,7 +5280,7 @@ var OrdersService = /** @class */ (function () {
|
|
|
5262
5280
|
product.price = product.variants[0].price;
|
|
5263
5281
|
product.saleprice = (product.price - (product.price * parseFloat(percentaje)));
|
|
5264
5282
|
product.options = {};
|
|
5265
|
-
product.variants[0].options.forEach(function (option) { return product.options = __assign$
|
|
5283
|
+
product.variants[0].options.forEach(function (option) { return product.options = __assign$b(__assign$b({}, product.options), option); });
|
|
5266
5284
|
return product;
|
|
5267
5285
|
};
|
|
5268
5286
|
OrdersService$1.ctorParameters = function () { return [
|
|
@@ -5280,8 +5298,8 @@ var OrdersService = /** @class */ (function () {
|
|
|
5280
5298
|
return OrdersService$1;
|
|
5281
5299
|
}());
|
|
5282
5300
|
|
|
5283
|
-
var __assign$
|
|
5284
|
-
__assign$
|
|
5301
|
+
var __assign$c = (this && this.__assign) || function () {
|
|
5302
|
+
__assign$c = Object.assign || function(t) {
|
|
5285
5303
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5286
5304
|
s = arguments[i];
|
|
5287
5305
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -5289,7 +5307,7 @@ var __assign$b = (this && this.__assign) || function () {
|
|
|
5289
5307
|
}
|
|
5290
5308
|
return t;
|
|
5291
5309
|
};
|
|
5292
|
-
return __assign$
|
|
5310
|
+
return __assign$c.apply(this, arguments);
|
|
5293
5311
|
};
|
|
5294
5312
|
var __decorate$p = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
5295
5313
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -5315,13 +5333,13 @@ var ShipmentDataTransformer = /** @class */ (function () {
|
|
|
5315
5333
|
var result = {};
|
|
5316
5334
|
switch (contract) {
|
|
5317
5335
|
case 'domicilio':
|
|
5318
|
-
result = __assign$
|
|
5336
|
+
result = __assign$c({}, data);
|
|
5319
5337
|
break;
|
|
5320
5338
|
// case 'sucursal': result = { ...data, codigo_sucursal: data. }; break;
|
|
5321
5339
|
// case 'local': result = { ...data, codigo_local: data. }
|
|
5322
5340
|
}
|
|
5323
5341
|
if (contract == 'domicilio') {
|
|
5324
|
-
result = __assign$
|
|
5342
|
+
result = __assign$c({}, data);
|
|
5325
5343
|
}
|
|
5326
5344
|
else {
|
|
5327
5345
|
result = { codigo_sucursal: data.id };
|
|
@@ -5401,8 +5419,8 @@ var __extends$7 = (this && this.__extends) || (function () {
|
|
|
5401
5419
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
5402
5420
|
};
|
|
5403
5421
|
})();
|
|
5404
|
-
var __assign$
|
|
5405
|
-
__assign$
|
|
5422
|
+
var __assign$d = (this && this.__assign) || function () {
|
|
5423
|
+
__assign$d = Object.assign || function(t) {
|
|
5406
5424
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5407
5425
|
s = arguments[i];
|
|
5408
5426
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -5410,7 +5428,7 @@ var __assign$c = (this && this.__assign) || function () {
|
|
|
5410
5428
|
}
|
|
5411
5429
|
return t;
|
|
5412
5430
|
};
|
|
5413
|
-
return __assign$
|
|
5431
|
+
return __assign$d.apply(this, arguments);
|
|
5414
5432
|
};
|
|
5415
5433
|
var __decorate$r = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
5416
5434
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -5532,7 +5550,7 @@ var ShipmentService = /** @class */ (function (_super) {
|
|
|
5532
5550
|
return __generator$6(this, function (_a) {
|
|
5533
5551
|
switch (_a.label) {
|
|
5534
5552
|
case 0:
|
|
5535
|
-
data = __assign$
|
|
5553
|
+
data = __assign$d(__assign$d({}, contract), this.otherParamsForContract(contract));
|
|
5536
5554
|
return [4 /*yield*/, this.connection.put(this.putContractApi(), data)
|
|
5537
5555
|
.toPromise().then(function (order) {
|
|
5538
5556
|
// this.analyticsService.callEvent('shipping_info', order);
|
|
@@ -5560,7 +5578,7 @@ var ShipmentService = /** @class */ (function (_super) {
|
|
|
5560
5578
|
response[branch_delivery].contracts = response[branch_delivery].contracts.map(function (contract) {
|
|
5561
5579
|
var branch_property = contract.branch_property || {};
|
|
5562
5580
|
var address_data = branch_property.address || {};
|
|
5563
|
-
return __assign$
|
|
5581
|
+
return __assign$d(__assign$d(__assign$d({ contract: 'branch_delivery', name: contract.name, price: contract.price }, address_data), branch_property), { computed: (address_data.street || '') + ' N° ' + (address_data.number || '') });
|
|
5564
5582
|
});
|
|
5565
5583
|
this.costsSubject.next(response);
|
|
5566
5584
|
}
|
|
@@ -6402,8 +6420,8 @@ var __extends$9 = (this && this.__extends) || (function () {
|
|
|
6402
6420
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
6403
6421
|
};
|
|
6404
6422
|
})();
|
|
6405
|
-
var __assign$
|
|
6406
|
-
__assign$
|
|
6423
|
+
var __assign$e = (this && this.__assign) || function () {
|
|
6424
|
+
__assign$e = Object.assign || function(t) {
|
|
6407
6425
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6408
6426
|
s = arguments[i];
|
|
6409
6427
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -6411,7 +6429,7 @@ var __assign$d = (this && this.__assign) || function () {
|
|
|
6411
6429
|
}
|
|
6412
6430
|
return t;
|
|
6413
6431
|
};
|
|
6414
|
-
return __assign$
|
|
6432
|
+
return __assign$e.apply(this, arguments);
|
|
6415
6433
|
};
|
|
6416
6434
|
var __decorate$H = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
6417
6435
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -6479,8 +6497,8 @@ var BlockBannerBoxesEcComponent = /** @class */ (function (_super) {
|
|
|
6479
6497
|
var _this = this;
|
|
6480
6498
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
6481
6499
|
this.paramsService.parameters.subscribe(function (res) { return _this.params = res; });
|
|
6482
|
-
this.banners = this.banners.map(function (banner) { return __assign$
|
|
6483
|
-
this.meta = __assign$
|
|
6500
|
+
this.banners = this.banners.map(function (banner) { return __assign$e(__assign$e({}, banner), banner.translations[_this.consts.getLocale()]); });
|
|
6501
|
+
this.meta = __assign$e(__assign$e({}, this.meta), this.meta.translations[this.consts.getLocale()]);
|
|
6484
6502
|
this.ecOnInit();
|
|
6485
6503
|
this.options = {
|
|
6486
6504
|
loop: this.loop,
|
|
@@ -6561,8 +6579,8 @@ var __extends$a = (this && this.__extends) || (function () {
|
|
|
6561
6579
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
6562
6580
|
};
|
|
6563
6581
|
})();
|
|
6564
|
-
var __assign$
|
|
6565
|
-
__assign$
|
|
6582
|
+
var __assign$f = (this && this.__assign) || function () {
|
|
6583
|
+
__assign$f = Object.assign || function(t) {
|
|
6566
6584
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6567
6585
|
s = arguments[i];
|
|
6568
6586
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -6570,7 +6588,7 @@ var __assign$e = (this && this.__assign) || function () {
|
|
|
6570
6588
|
}
|
|
6571
6589
|
return t;
|
|
6572
6590
|
};
|
|
6573
|
-
return __assign$
|
|
6591
|
+
return __assign$f.apply(this, arguments);
|
|
6574
6592
|
};
|
|
6575
6593
|
var __decorate$I = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
6576
6594
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -6616,7 +6634,7 @@ var BlockBannerFullEcComponent = /** @class */ (function (_super) {
|
|
|
6616
6634
|
}
|
|
6617
6635
|
BlockBannerFullEcComponent.prototype.ngOnInit = function () {
|
|
6618
6636
|
var _this = this;
|
|
6619
|
-
this.banners = this.banners.map(function (banner) { return __assign$
|
|
6637
|
+
this.banners = this.banners.map(function (banner) { return __assign$f(__assign$f({}, banner), banner.translations[_this.consts.getLocale()]); });
|
|
6620
6638
|
this.ecOnInit();
|
|
6621
6639
|
// this.options = {
|
|
6622
6640
|
// loop: this.loop,
|
|
@@ -6692,8 +6710,8 @@ var __extends$b = (this && this.__extends) || (function () {
|
|
|
6692
6710
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
6693
6711
|
};
|
|
6694
6712
|
})();
|
|
6695
|
-
var __assign$
|
|
6696
|
-
__assign$
|
|
6713
|
+
var __assign$g = (this && this.__assign) || function () {
|
|
6714
|
+
__assign$g = Object.assign || function(t) {
|
|
6697
6715
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6698
6716
|
s = arguments[i];
|
|
6699
6717
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -6701,7 +6719,7 @@ var __assign$f = (this && this.__assign) || function () {
|
|
|
6701
6719
|
}
|
|
6702
6720
|
return t;
|
|
6703
6721
|
};
|
|
6704
|
-
return __assign$
|
|
6722
|
+
return __assign$g.apply(this, arguments);
|
|
6705
6723
|
};
|
|
6706
6724
|
var __decorate$J = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
6707
6725
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -6748,7 +6766,7 @@ var BlockFormContactEcComponent = /** @class */ (function (_super) {
|
|
|
6748
6766
|
}
|
|
6749
6767
|
};
|
|
6750
6768
|
_this.setSubject = function () {
|
|
6751
|
-
_this.contact_form.setValue(__assign$
|
|
6769
|
+
_this.contact_form.setValue(__assign$g(__assign$g({}, _this.contact_form.value), { subject: _this.subject }));
|
|
6752
6770
|
};
|
|
6753
6771
|
_this.subscribe = function () {
|
|
6754
6772
|
// PEDIR AL SERVICIO SE LO SUBSCRIBA, Y RESPONDA SI LO SUBSCRIBIÓ O YA ESTABA SUBSCRIPTO
|
|
@@ -6799,7 +6817,7 @@ var BlockFormContactEcComponent = /** @class */ (function (_super) {
|
|
|
6799
6817
|
};
|
|
6800
6818
|
BlockFormContactEcComponent.prototype.ngOnChanges = function () { };
|
|
6801
6819
|
BlockFormContactEcComponent.prototype.ngOnInit = function () {
|
|
6802
|
-
this.block = __assign$
|
|
6820
|
+
this.block = __assign$g(__assign$g({}, this.block), this.block.translations[this.consts.getLocale()]);
|
|
6803
6821
|
this.subject && this.setSubject();
|
|
6804
6822
|
this.ecOnInit();
|
|
6805
6823
|
};
|
|
@@ -6898,8 +6916,8 @@ var __extends$d = (this && this.__extends) || (function () {
|
|
|
6898
6916
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
6899
6917
|
};
|
|
6900
6918
|
})();
|
|
6901
|
-
var __assign$
|
|
6902
|
-
__assign$
|
|
6919
|
+
var __assign$h = (this && this.__assign) || function () {
|
|
6920
|
+
__assign$h = Object.assign || function(t) {
|
|
6903
6921
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6904
6922
|
s = arguments[i];
|
|
6905
6923
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -6907,7 +6925,7 @@ var __assign$g = (this && this.__assign) || function () {
|
|
|
6907
6925
|
}
|
|
6908
6926
|
return t;
|
|
6909
6927
|
};
|
|
6910
|
-
return __assign$
|
|
6928
|
+
return __assign$h.apply(this, arguments);
|
|
6911
6929
|
};
|
|
6912
6930
|
var __decorate$L = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
6913
6931
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -6959,7 +6977,7 @@ var ContactFormNewsEcComponent = /** @class */ (function (_super) {
|
|
|
6959
6977
|
_this.subscribeBlockNews = function (block) {
|
|
6960
6978
|
};
|
|
6961
6979
|
_this.setSubject = function () {
|
|
6962
|
-
_this.contact_form.setValue(__assign$
|
|
6980
|
+
_this.contact_form.setValue(__assign$h(__assign$h({}, _this.contact_form.value), { subject: _this.subject }));
|
|
6963
6981
|
};
|
|
6964
6982
|
_this.subscribe = function () {
|
|
6965
6983
|
// PEDIR AL SERVICIO SE LO SUBSCRIBA, Y RESPONDA SI LO SUBSCRIBIÓ O YA ESTABA SUBSCRIPTO
|
|
@@ -7001,12 +7019,12 @@ var ContactFormNewsEcComponent = /** @class */ (function (_super) {
|
|
|
7001
7019
|
if (_this.block.contactForm) {
|
|
7002
7020
|
_this.block = _this.block.contactForm;
|
|
7003
7021
|
}
|
|
7004
|
-
_this.block = __assign$
|
|
7022
|
+
_this.block = __assign$h(__assign$h({}, _this.block), _this.block.translations[_this.consts.getLocale()]);
|
|
7005
7023
|
_this.subscribeBlockNews(_this.block);
|
|
7006
7024
|
});
|
|
7007
7025
|
}
|
|
7008
7026
|
else {
|
|
7009
|
-
this.block = __assign$
|
|
7027
|
+
this.block = __assign$h(__assign$h({}, this.block), this.block.translations[this.consts.getLocale()]);
|
|
7010
7028
|
}
|
|
7011
7029
|
this.subject && this.setSubject();
|
|
7012
7030
|
this.ecOnInit();
|
|
@@ -7066,8 +7084,8 @@ var __extends$e = (this && this.__extends) || (function () {
|
|
|
7066
7084
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
7067
7085
|
};
|
|
7068
7086
|
})();
|
|
7069
|
-
var __assign$
|
|
7070
|
-
__assign$
|
|
7087
|
+
var __assign$i = (this && this.__assign) || function () {
|
|
7088
|
+
__assign$i = Object.assign || function(t) {
|
|
7071
7089
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7072
7090
|
s = arguments[i];
|
|
7073
7091
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -7075,7 +7093,7 @@ var __assign$h = (this && this.__assign) || function () {
|
|
|
7075
7093
|
}
|
|
7076
7094
|
return t;
|
|
7077
7095
|
};
|
|
7078
|
-
return __assign$
|
|
7096
|
+
return __assign$i.apply(this, arguments);
|
|
7079
7097
|
};
|
|
7080
7098
|
var __decorate$M = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
7081
7099
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -7121,7 +7139,7 @@ var BlockProductsEcComponent = /** @class */ (function (_super) {
|
|
|
7121
7139
|
}
|
|
7122
7140
|
BlockProductsEcComponent.prototype.ngOnInit = function () {
|
|
7123
7141
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
7124
|
-
this.meta = __assign$
|
|
7142
|
+
this.meta = __assign$i(__assign$i({}, this.meta), (this.meta.translations ? this.meta.translations[this.consts.getLocale()] : { name: null }));
|
|
7125
7143
|
this.analyticsService.callEvent('view_item_list', { products: this.products, item_list_name: this.meta.name || 'Block Products', item_list_id: ((_b = (_a = this.meta.name) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.replace(' ', '-')) || 'block-products' });
|
|
7126
7144
|
this.optionsOwl = {
|
|
7127
7145
|
loop: this.loop,
|
|
@@ -7898,8 +7916,8 @@ var __extends$i = (this && this.__extends) || (function () {
|
|
|
7898
7916
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
7899
7917
|
};
|
|
7900
7918
|
})();
|
|
7901
|
-
var __assign$
|
|
7902
|
-
__assign$
|
|
7919
|
+
var __assign$j = (this && this.__assign) || function () {
|
|
7920
|
+
__assign$j = Object.assign || function(t) {
|
|
7903
7921
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7904
7922
|
s = arguments[i];
|
|
7905
7923
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -7907,7 +7925,7 @@ var __assign$i = (this && this.__assign) || function () {
|
|
|
7907
7925
|
}
|
|
7908
7926
|
return t;
|
|
7909
7927
|
};
|
|
7910
|
-
return __assign$
|
|
7928
|
+
return __assign$j.apply(this, arguments);
|
|
7911
7929
|
};
|
|
7912
7930
|
var __decorate$Q = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
7913
7931
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -8107,9 +8125,9 @@ var DataFormEcComponent = /** @class */ (function (_super) {
|
|
|
8107
8125
|
switch (_a.label) {
|
|
8108
8126
|
case 0:
|
|
8109
8127
|
this.loading = true;
|
|
8110
|
-
data = { shippingAddress: __assign$
|
|
8128
|
+
data = { shippingAddress: __assign$j(__assign$j({}, this.checkoutForm.getRawValue()), { phoneNumber: this.checkoutForm.value.phoneNumber.toString() }), notes: (this.checkoutForm.getRawValue()).notes };
|
|
8111
8129
|
if (!this.viewDataFacturacion && this.checkoutFormFacturacion.valid)
|
|
8112
|
-
data = __assign$
|
|
8130
|
+
data = __assign$j(__assign$j({}, data), { notes: data.notes, billingAddress: this.checkoutFormFacturacion.getRawValue() });
|
|
8113
8131
|
_a.label = 1;
|
|
8114
8132
|
case 1:
|
|
8115
8133
|
_a.trys.push([1, 3, , 4]);
|
|
@@ -8216,12 +8234,12 @@ var DataFormEcComponent = /** @class */ (function (_super) {
|
|
|
8216
8234
|
_this.getLabelNotesParam = function () { return _this.hasParams(_this.params, 'label_notes_' + _this.consts.getChannel() + '_' + _this.consts.getLocale().split('_')[0]); };
|
|
8217
8235
|
_this.getParamByChannelAndLanguage = function (nameParam) { return _this.hasParams(_this.params, nameParam + _this.consts.getChannel() + '_' + _this.consts.getLocale().split('_')[0]); };
|
|
8218
8236
|
_this.ecOnConstruct();
|
|
8219
|
-
_this.checkoutForm = _this.fb.group(__assign$
|
|
8237
|
+
_this.checkoutForm = _this.fb.group(__assign$j(__assign$j({}, _this.addressingService.getTypeForm().configForm.formAddres), { postcode: ['', [Validators.required, Validators.pattern(_this.postalCodePattern)]] // Se agrega para que sólo acepte códigos postales mayores que cero
|
|
8220
8238
|
}));
|
|
8221
8239
|
_this.checkoutForm.statusChanges
|
|
8222
8240
|
.pipe(filter(function () { _this.onFormChange(); return _this.checkoutForm.valid; }))
|
|
8223
8241
|
.subscribe(function () { return _this.onFormValid(); });
|
|
8224
|
-
_this.checkoutFormFacturacion = _this.fb.group(__assign$
|
|
8242
|
+
_this.checkoutFormFacturacion = _this.fb.group(__assign$j(__assign$j({}, _this.addressingService.getTypeForm().configForm.formBilling), { postcode: ['', [Validators.required, Validators.pattern(_this.postalCodePattern)]] // Se agrega para que sólo acepte códigos postales mayores que cero
|
|
8225
8243
|
}));
|
|
8226
8244
|
_this.checkoutFormFacturacion.statusChanges
|
|
8227
8245
|
.pipe(filter(function () { _this.onFormChange(); return _this.checkoutFormFacturacion.valid; }))
|
|
@@ -8437,8 +8455,8 @@ var __extends$k = (this && this.__extends) || (function () {
|
|
|
8437
8455
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
8438
8456
|
};
|
|
8439
8457
|
})();
|
|
8440
|
-
var __assign$
|
|
8441
|
-
__assign$
|
|
8458
|
+
var __assign$k = (this && this.__assign) || function () {
|
|
8459
|
+
__assign$k = Object.assign || function(t) {
|
|
8442
8460
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8443
8461
|
s = arguments[i];
|
|
8444
8462
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -8446,7 +8464,7 @@ var __assign$j = (this && this.__assign) || function () {
|
|
|
8446
8464
|
}
|
|
8447
8465
|
return t;
|
|
8448
8466
|
};
|
|
8449
|
-
return __assign$
|
|
8467
|
+
return __assign$k.apply(this, arguments);
|
|
8450
8468
|
};
|
|
8451
8469
|
var __decorate$S = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
8452
8470
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -8516,7 +8534,7 @@ var PaymentEcComponent = /** @class */ (function (_super) {
|
|
|
8516
8534
|
_this.loading_internal_mp = false;
|
|
8517
8535
|
_this.method_data$ = _this.methodDataSubject.asObservable();
|
|
8518
8536
|
_this.loading$ = _this.loadingSubject.asObservable();
|
|
8519
|
-
_this.allData = function () { return (__assign$
|
|
8537
|
+
_this.allData = function () { return (__assign$k(__assign$k({}, _this.paymentService.getUserData().shippingAddress), _this.paymentService.getShipmentData())); };
|
|
8520
8538
|
_this.setError = function (message) {
|
|
8521
8539
|
_this.error = message;
|
|
8522
8540
|
};
|
|
@@ -8647,8 +8665,8 @@ var __extends$l = (this && this.__extends) || (function () {
|
|
|
8647
8665
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
8648
8666
|
};
|
|
8649
8667
|
})();
|
|
8650
|
-
var __assign$
|
|
8651
|
-
__assign$
|
|
8668
|
+
var __assign$l = (this && this.__assign) || function () {
|
|
8669
|
+
__assign$l = Object.assign || function(t) {
|
|
8652
8670
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8653
8671
|
s = arguments[i];
|
|
8654
8672
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -8656,7 +8674,7 @@ var __assign$k = (this && this.__assign) || function () {
|
|
|
8656
8674
|
}
|
|
8657
8675
|
return t;
|
|
8658
8676
|
};
|
|
8659
|
-
return __assign$
|
|
8677
|
+
return __assign$l.apply(this, arguments);
|
|
8660
8678
|
};
|
|
8661
8679
|
var __decorate$T = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
8662
8680
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -8690,7 +8708,7 @@ var ShipmentEcComponent = /** @class */ (function (_super) {
|
|
|
8690
8708
|
_this.buttonsDisabled = false;
|
|
8691
8709
|
_this.contracts = [];
|
|
8692
8710
|
_this.emitResult = function (method_name, contract_data) {
|
|
8693
|
-
contract_data = __assign$
|
|
8711
|
+
contract_data = __assign$l(__assign$l({}, contract_data), { shipping_method_contract: method_name + '_' + contract_data.name, shipping_method_branch_code: method_name == "branch_delivery" ? contract_data.sucursal_id : contract_data.name });
|
|
8694
8712
|
_this.shipmentService.setContract(contract_data);
|
|
8695
8713
|
};
|
|
8696
8714
|
_this.verifyValidate = function (contract, data) {
|
|
@@ -8738,7 +8756,7 @@ var ShipmentEcComponent = /** @class */ (function (_super) {
|
|
|
8738
8756
|
});
|
|
8739
8757
|
this.shipmentService.costs.subscribe(function (cos) {
|
|
8740
8758
|
var _a, _b;
|
|
8741
|
-
_this.costs = cos.map(function (cost) { return __assign$
|
|
8759
|
+
_this.costs = cos.map(function (cost) { return __assign$l(__assign$l({}, cost), { contracts: cost.contracts.map(function (co) { return __assign$l(__assign$l({}, co), { selected: false }); }) }); });
|
|
8742
8760
|
if (_this.costs.length && ((_a = _this.costs[0]) === null || _a === void 0 ? void 0 : _a.name) && ((_b = _this.costs[0]) === null || _b === void 0 ? void 0 : _b.contracts[0])) {
|
|
8743
8761
|
_this.verifyValidate(_this.costs[0].name, _this.costs[0].contracts[0]);
|
|
8744
8762
|
}
|
|
@@ -9524,8 +9542,8 @@ var __extends$s = (this && this.__extends) || (function () {
|
|
|
9524
9542
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
9525
9543
|
};
|
|
9526
9544
|
})();
|
|
9527
|
-
var __assign$
|
|
9528
|
-
__assign$
|
|
9545
|
+
var __assign$m = (this && this.__assign) || function () {
|
|
9546
|
+
__assign$m = Object.assign || function(t) {
|
|
9529
9547
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9530
9548
|
s = arguments[i];
|
|
9531
9549
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -9533,7 +9551,7 @@ var __assign$l = (this && this.__assign) || function () {
|
|
|
9533
9551
|
}
|
|
9534
9552
|
return t;
|
|
9535
9553
|
};
|
|
9536
|
-
return __assign$
|
|
9554
|
+
return __assign$m.apply(this, arguments);
|
|
9537
9555
|
};
|
|
9538
9556
|
var __decorate$_ = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
9539
9557
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -9576,7 +9594,7 @@ var FooterEcComponent = /** @class */ (function (_super) {
|
|
|
9576
9594
|
if (stackPlace === void 0) { stackPlace = 'end'; }
|
|
9577
9595
|
var _a, _b;
|
|
9578
9596
|
(stackPlace == 'start')
|
|
9579
|
-
? (_a = menuItems.find(function (item) { var _a; return (_a = item.code) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(code); })) === null || _a === void 0 ? void 0 : _a.children.unshift(__assign$
|
|
9597
|
+
? (_a = menuItems.find(function (item) { var _a; return (_a = item.code) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(code); })) === null || _a === void 0 ? void 0 : _a.children.unshift(__assign$m({ code: 'sd', name: 'sd', path: '/home', title: 'sd' }, item)) : (_b = menuItems.find(function (item) { var _a; return (_a = item.code) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(code); })) === null || _b === void 0 ? void 0 : _b.children.push(__assign$m({ code: 'sd', name: 'sd', path: '/home', title: 'sd' }, item));
|
|
9580
9598
|
};
|
|
9581
9599
|
_this.ecUpdateMenuItemSection = function (menuItems) {
|
|
9582
9600
|
return menuItems;
|
|
@@ -9627,8 +9645,8 @@ var __extends$t = (this && this.__extends) || (function () {
|
|
|
9627
9645
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
9628
9646
|
};
|
|
9629
9647
|
})();
|
|
9630
|
-
var __assign$
|
|
9631
|
-
__assign$
|
|
9648
|
+
var __assign$n = (this && this.__assign) || function () {
|
|
9649
|
+
__assign$n = Object.assign || function(t) {
|
|
9632
9650
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9633
9651
|
s = arguments[i];
|
|
9634
9652
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -9636,7 +9654,7 @@ var __assign$m = (this && this.__assign) || function () {
|
|
|
9636
9654
|
}
|
|
9637
9655
|
return t;
|
|
9638
9656
|
};
|
|
9639
|
-
return __assign$
|
|
9657
|
+
return __assign$n.apply(this, arguments);
|
|
9640
9658
|
};
|
|
9641
9659
|
var __decorate$$ = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
9642
9660
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -9774,7 +9792,7 @@ var HeaderEcComponent = /** @class */ (function (_super) {
|
|
|
9774
9792
|
if (stackPlace === void 0) { stackPlace = 'end'; }
|
|
9775
9793
|
var _a, _b;
|
|
9776
9794
|
(stackPlace == 'start')
|
|
9777
|
-
? (_a = menuItems.find(function (item) { var _a; return (_a = item.code) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(code); })) === null || _a === void 0 ? void 0 : _a.children.unshift(__assign$
|
|
9795
|
+
? (_a = menuItems.find(function (item) { var _a; return (_a = item.code) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(code); })) === null || _a === void 0 ? void 0 : _a.children.unshift(__assign$n({ code: 'sd', name: 'sd', path: '/home', title: 'sd' }, item)) : (_b = menuItems.find(function (item) { var _a; return (_a = item.code) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(code); })) === null || _b === void 0 ? void 0 : _b.children.push(__assign$n({ code: 'sd', name: 'sd', path: '/home', title: 'sd' }, item));
|
|
9778
9796
|
};
|
|
9779
9797
|
_this.hasParams = function (params, searched) { return params && params.find(function (param) { return param.code.toLowerCase().includes(searched); }); };
|
|
9780
9798
|
_this.envetUrlTransparent = _this.changeUrlTransparent(_this.envetUrlTransparent);
|
|
@@ -10201,8 +10219,8 @@ var CurrencyService = /** @class */ (function () {
|
|
|
10201
10219
|
return CurrencyService$1;
|
|
10202
10220
|
}());
|
|
10203
10221
|
|
|
10204
|
-
var __assign$
|
|
10205
|
-
__assign$
|
|
10222
|
+
var __assign$o = (this && this.__assign) || function () {
|
|
10223
|
+
__assign$o = Object.assign || function(t) {
|
|
10206
10224
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
10207
10225
|
s = arguments[i];
|
|
10208
10226
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -10210,7 +10228,7 @@ var __assign$n = (this && this.__assign) || function () {
|
|
|
10210
10228
|
}
|
|
10211
10229
|
return t;
|
|
10212
10230
|
};
|
|
10213
|
-
return __assign$
|
|
10231
|
+
return __assign$o.apply(this, arguments);
|
|
10214
10232
|
};
|
|
10215
10233
|
var __decorate$13 = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
10216
10234
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -10612,7 +10630,7 @@ var ProductDetailService = /** @class */ (function () {
|
|
|
10612
10630
|
product_selected.price = parseFloat(this.asociatedDataSubject.value.price);
|
|
10613
10631
|
product_selected.saleprice = parseFloat(this.asociatedDataSubject.value.price);
|
|
10614
10632
|
product_selected.options = {};
|
|
10615
|
-
this.variants[0].options.forEach(function (option) { return product_selected.options = __assign$
|
|
10633
|
+
this.variants[0].options.forEach(function (option) { return product_selected.options = __assign$o(__assign$o({}, product_selected.options), option); });
|
|
10616
10634
|
return product_selected;
|
|
10617
10635
|
};
|
|
10618
10636
|
/**
|
|
@@ -10654,7 +10672,7 @@ var ProductDetailService = /** @class */ (function () {
|
|
|
10654
10672
|
}
|
|
10655
10673
|
variantsAvailable.push(aux);
|
|
10656
10674
|
});
|
|
10657
|
-
return variantsAvailable.filter(function (va) { return _this.constants.containsAll(__assign$
|
|
10675
|
+
return variantsAvailable.filter(function (va) { return _this.constants.containsAll(__assign$o({}, variantsSelected), va); });
|
|
10658
10676
|
};
|
|
10659
10677
|
/**
|
|
10660
10678
|
*
|
|
@@ -10698,8 +10716,8 @@ var __extends$w = (this && this.__extends) || (function () {
|
|
|
10698
10716
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
10699
10717
|
};
|
|
10700
10718
|
})();
|
|
10701
|
-
var __assign$
|
|
10702
|
-
__assign$
|
|
10719
|
+
var __assign$p = (this && this.__assign) || function () {
|
|
10720
|
+
__assign$p = Object.assign || function(t) {
|
|
10703
10721
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
10704
10722
|
s = arguments[i];
|
|
10705
10723
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -10707,7 +10725,7 @@ var __assign$o = (this && this.__assign) || function () {
|
|
|
10707
10725
|
}
|
|
10708
10726
|
return t;
|
|
10709
10727
|
};
|
|
10710
|
-
return __assign$
|
|
10728
|
+
return __assign$p.apply(this, arguments);
|
|
10711
10729
|
};
|
|
10712
10730
|
var __decorate$14 = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
10713
10731
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -10813,7 +10831,7 @@ var ProductDetailEcComponent = /** @class */ (function (_super) {
|
|
|
10813
10831
|
}
|
|
10814
10832
|
});
|
|
10815
10833
|
_this.productService.product$.pipe(filter(function (data) { return data && data.id && data.id != 0; })).subscribe(function (productParam) {
|
|
10816
|
-
_this.analyticsService.callEvent('view_item', __assign$
|
|
10834
|
+
_this.analyticsService.callEvent('view_item', __assign$p(__assign$p({}, productParam), { currency: _this.consts.currency.code }));
|
|
10817
10835
|
_this.changeImgFocus(productParam.picturesdefault[0]);
|
|
10818
10836
|
});
|
|
10819
10837
|
_this.injector.get(ChannelConfigService).channelConfig$.subscribe(function (channel) {
|
|
@@ -11723,8 +11741,8 @@ var __extends$F = (this && this.__extends) || (function () {
|
|
|
11723
11741
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
11724
11742
|
};
|
|
11725
11743
|
})();
|
|
11726
|
-
var __assign$
|
|
11727
|
-
__assign$
|
|
11744
|
+
var __assign$q = (this && this.__assign) || function () {
|
|
11745
|
+
__assign$q = Object.assign || function(t) {
|
|
11728
11746
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
11729
11747
|
s = arguments[i];
|
|
11730
11748
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -11732,7 +11750,7 @@ var __assign$p = (this && this.__assign) || function () {
|
|
|
11732
11750
|
}
|
|
11733
11751
|
return t;
|
|
11734
11752
|
};
|
|
11735
|
-
return __assign$
|
|
11753
|
+
return __assign$q.apply(this, arguments);
|
|
11736
11754
|
};
|
|
11737
11755
|
var __decorate$1e = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
11738
11756
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -11825,7 +11843,7 @@ var MPCreditEcComponent = /** @class */ (function (_super) {
|
|
|
11825
11843
|
_this.payment_method = payment_data.id;
|
|
11826
11844
|
_this.issuer_id = payment_data.issuer.id;
|
|
11827
11845
|
payment_data.payer_costs.forEach(function (payerCost) {
|
|
11828
|
-
_this.installments.push(__assign$
|
|
11846
|
+
_this.installments.push(__assign$q(__assign$q({}, payerCost), { name: ('Cuotas: ' + payerCost.installments + ' - Total: ' + _this.calculateTotal(payerCost)), value: payerCost.installments }));
|
|
11829
11847
|
});
|
|
11830
11848
|
_this.installment_data = payment_data;
|
|
11831
11849
|
}
|
|
@@ -11912,7 +11930,7 @@ var MPCreditEcComponent = /** @class */ (function (_super) {
|
|
|
11912
11930
|
if (status == 200 && response.length) {
|
|
11913
11931
|
_this.installments = [];
|
|
11914
11932
|
response[0].payer_costs.forEach(function (payerCost) {
|
|
11915
|
-
_this.installments.push(__assign$
|
|
11933
|
+
_this.installments.push(__assign$q(__assign$q({}, payerCost), { name: payerCost.recommended_message, value: payerCost.installments }));
|
|
11916
11934
|
});
|
|
11917
11935
|
_this.installment_data = response[0];
|
|
11918
11936
|
}
|
|
@@ -13254,7 +13272,7 @@ var RegisterFormEcComponent = /** @class */ (function (_super) {
|
|
|
13254
13272
|
default:
|
|
13255
13273
|
messageKey = 'register-success';
|
|
13256
13274
|
}
|
|
13257
|
-
_this.toastr.
|
|
13275
|
+
_this.toastr.showPersistent(messageKey);
|
|
13258
13276
|
_this.analyticsService.callEvent('sign_up', {
|
|
13259
13277
|
firstName: _this.registerForm.value.firstName,
|
|
13260
13278
|
lastName: _this.registerForm.value.lastName,
|
|
@@ -13271,7 +13289,7 @@ var RegisterFormEcComponent = /** @class */ (function (_super) {
|
|
|
13271
13289
|
}, function (error) {
|
|
13272
13290
|
_this.register_loading = false;
|
|
13273
13291
|
if (error.status == 400) {
|
|
13274
|
-
_this.toastr.
|
|
13292
|
+
_this.toastr.showPersistent('El email ingresado ya se encuentra registrado.');
|
|
13275
13293
|
}
|
|
13276
13294
|
else {
|
|
13277
13295
|
_this.toastr.show('Error en el registro. Vuelva a intentarlo más tarde.');
|
|
@@ -13313,6 +13331,9 @@ var RegisterFormEcComponent = /** @class */ (function (_super) {
|
|
|
13313
13331
|
});
|
|
13314
13332
|
this.ecOnInit();
|
|
13315
13333
|
};
|
|
13334
|
+
RegisterFormEcComponent.prototype.prueba = function () {
|
|
13335
|
+
this.toastr.showPersistent('hola');
|
|
13336
|
+
};
|
|
13316
13337
|
RegisterFormEcComponent.ctorParameters = function () { return [
|
|
13317
13338
|
{ type: AuthService },
|
|
13318
13339
|
{ type: ToastService },
|
|
@@ -15230,8 +15251,8 @@ var __extends$11 = (this && this.__extends) || (function () {
|
|
|
15230
15251
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15231
15252
|
};
|
|
15232
15253
|
})();
|
|
15233
|
-
var __assign$
|
|
15234
|
-
__assign$
|
|
15254
|
+
var __assign$r = (this && this.__assign) || function () {
|
|
15255
|
+
__assign$r = Object.assign || function(t) {
|
|
15235
15256
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
15236
15257
|
s = arguments[i];
|
|
15237
15258
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -15239,7 +15260,7 @@ var __assign$q = (this && this.__assign) || function () {
|
|
|
15239
15260
|
}
|
|
15240
15261
|
return t;
|
|
15241
15262
|
};
|
|
15242
|
-
return __assign$
|
|
15263
|
+
return __assign$r.apply(this, arguments);
|
|
15243
15264
|
};
|
|
15244
15265
|
var __decorate$1C = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15245
15266
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -15286,7 +15307,7 @@ var SelectChannelEcComponent = /** @class */ (function (_super) {
|
|
|
15286
15307
|
var _this = this;
|
|
15287
15308
|
this.subs = this.authService.channelsUser.pipe(filter(function (res) { return res != null && res.length > 0; })).subscribe(function (res) {
|
|
15288
15309
|
_this.channels = res.map(function (item) {
|
|
15289
|
-
return __assign$
|
|
15310
|
+
return __assign$r(__assign$r({}, item), { selected: false });
|
|
15290
15311
|
});
|
|
15291
15312
|
_this.initializeTemplate();
|
|
15292
15313
|
});
|
|
@@ -16505,8 +16526,8 @@ var __extends$16 = (this && this.__extends) || (function () {
|
|
|
16505
16526
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16506
16527
|
};
|
|
16507
16528
|
})();
|
|
16508
|
-
var __assign$
|
|
16509
|
-
__assign$
|
|
16529
|
+
var __assign$s = (this && this.__assign) || function () {
|
|
16530
|
+
__assign$s = Object.assign || function(t) {
|
|
16510
16531
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
16511
16532
|
s = arguments[i];
|
|
16512
16533
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -16514,7 +16535,7 @@ var __assign$r = (this && this.__assign) || function () {
|
|
|
16514
16535
|
}
|
|
16515
16536
|
return t;
|
|
16516
16537
|
};
|
|
16517
|
-
return __assign$
|
|
16538
|
+
return __assign$s.apply(this, arguments);
|
|
16518
16539
|
};
|
|
16519
16540
|
var __decorate$1L = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
16520
16541
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -16558,7 +16579,7 @@ var ProductFoundEcComponent = /** @class */ (function (_super) {
|
|
|
16558
16579
|
window.scroll(0, 0);
|
|
16559
16580
|
});
|
|
16560
16581
|
_this.productService.product$.pipe(filter(function (data) { return data && data.id && data.id != 0; })).subscribe(function (productParam) {
|
|
16561
|
-
_this.analyticsService.callEvent('view_item', __assign$
|
|
16582
|
+
_this.analyticsService.callEvent('view_item', __assign$s(__assign$s({}, productParam), { currency: _this.consts.currency.code }));
|
|
16562
16583
|
});
|
|
16563
16584
|
_this.ecOnConstruct();
|
|
16564
16585
|
return _this;
|
|
@@ -17741,8 +17762,8 @@ var BancardCatastroEcComponent = /** @class */ (function (_super) {
|
|
|
17741
17762
|
return BancardCatastroEcComponent;
|
|
17742
17763
|
}(ComponentHelper));
|
|
17743
17764
|
|
|
17744
|
-
var __assign$
|
|
17745
|
-
__assign$
|
|
17765
|
+
var __assign$t = (this && this.__assign) || function () {
|
|
17766
|
+
__assign$t = Object.assign || function(t) {
|
|
17746
17767
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
17747
17768
|
s = arguments[i];
|
|
17748
17769
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -17750,7 +17771,7 @@ var __assign$s = (this && this.__assign) || function () {
|
|
|
17750
17771
|
}
|
|
17751
17772
|
return t;
|
|
17752
17773
|
};
|
|
17753
|
-
return __assign$
|
|
17774
|
+
return __assign$t.apply(this, arguments);
|
|
17754
17775
|
};
|
|
17755
17776
|
var __decorate$1U = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
17756
17777
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -17817,7 +17838,7 @@ var CookiesService = /** @class */ (function () {
|
|
|
17817
17838
|
* @description realiza un merge con los valores por defecto para rellenar el objeto de cookies
|
|
17818
17839
|
*/
|
|
17819
17840
|
this.setDefaultParameters = function () {
|
|
17820
|
-
_this.cookies = __assign$
|
|
17841
|
+
_this.cookies = __assign$t(__assign$t({}, _this.defaultValues), _this.cookies);
|
|
17821
17842
|
};
|
|
17822
17843
|
/**
|
|
17823
17844
|
* @description procesa el parametro ingresado, para transformarlo en un atributo del objeto de cookies.
|
|
@@ -17838,7 +17859,7 @@ var CookiesService = /** @class */ (function () {
|
|
|
17838
17859
|
break;
|
|
17839
17860
|
case 'others':
|
|
17840
17861
|
!_this.cookies[attrName] ? _this.cookies[attrName] = {} : null;
|
|
17841
|
-
_this.cookies[attrName] = __assign$
|
|
17862
|
+
_this.cookies[attrName] = __assign$t(__assign$t({}, _this.cookies[attrName]), _this.othersAttrProcessing(element));
|
|
17842
17863
|
break;
|
|
17843
17864
|
case 'message':
|
|
17844
17865
|
_this.cookies[attrName] = _this.messageAttrProcessing(element);
|
|
@@ -17890,7 +17911,7 @@ var CookiesService = /** @class */ (function () {
|
|
|
17890
17911
|
break;
|
|
17891
17912
|
default:
|
|
17892
17913
|
//console.log(value)
|
|
17893
|
-
objReturn = __assign$
|
|
17914
|
+
objReturn = __assign$t(__assign$t({}, objReturn), _this.getObjByFormatType(objReturn.type, value));
|
|
17894
17915
|
break;
|
|
17895
17916
|
}
|
|
17896
17917
|
}
|