ng-easycommerce 0.0.632 → 0.0.634
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 +5 -0
- package/assets/ec-i18n/ct.json +3 -1
- package/assets/ec-i18n/en.json +3 -1
- package/assets/ec-i18n/es.json +6 -4
- package/assets/ec-i18n/fr.json +3 -1
- package/assets/ec-i18n/gl.json +3 -1
- package/assets/ec-i18n/pr.json +3 -1
- package/bundles/ng-easycommerce.umd.js +21 -16
- 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 +3 -3
- package/esm2015/lib/ec-component/auth-ec/register-wholesaler-form-ec/register-wholesaler-form-ec.component.js +3 -3
- package/esm2015/lib/ec-component/checkout-ec/success-ec/success-ec.component.js +15 -3
- package/esm2015/lib/ec-component/product-detail-ec/product-detail-ec.component.js +4 -3
- package/esm2015/lib/services/channel-config.service.js +1 -9
- package/esm2015/lib/services/options.service.js +1 -1
- package/esm5/lib/ec-component/auth-ec/register-form-ec/register-form-ec.component.js +3 -3
- package/esm5/lib/ec-component/auth-ec/register-wholesaler-form-ec/register-wholesaler-form-ec.component.js +3 -3
- package/esm5/lib/ec-component/checkout-ec/success-ec/success-ec.component.js +15 -3
- package/esm5/lib/ec-component/product-detail-ec/product-detail-ec.component.js +4 -3
- package/esm5/lib/services/channel-config.service.js +1 -9
- package/esm5/lib/services/options.service.js +1 -1
- package/fesm2015/ng-easycommerce.js +21 -16
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +21 -16
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/checkout-ec/success-ec/success-ec.component.d.ts +3 -0
- package/lib/services/channel-config.service.d.ts +0 -5
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
package/fesm5/ng-easycommerce.js
CHANGED
|
@@ -4122,14 +4122,6 @@ var ChannelConfigService = /** @class */ (function () {
|
|
|
4122
4122
|
this.getChannels();
|
|
4123
4123
|
this.getLocales();
|
|
4124
4124
|
}
|
|
4125
|
-
/**
|
|
4126
|
-
* @description Devuelve si se deben mostrar precios con impuestos durante la navegación.
|
|
4127
|
-
* @returns {boolean | null} true/false si está definido, null si aún no hay configuración
|
|
4128
|
-
*/
|
|
4129
|
-
ChannelConfigService$1.prototype.getShowPricesWithTaxes = function () {
|
|
4130
|
-
var _a, _b;
|
|
4131
|
-
return _b = (_a = this.channel) === null || _a === void 0 ? void 0 : _a.showPriceWithTaxesWhileBrowsing, (_b !== null && _b !== void 0 ? _b : null);
|
|
4132
|
-
};
|
|
4133
4125
|
ChannelConfigService$1.ctorParameters = function () { return [
|
|
4134
4126
|
{ type: Constants },
|
|
4135
4127
|
{ type: undefined, decorators: [{ type: Inject, args: ['env',] }] },
|
|
@@ -9076,6 +9068,8 @@ var SuccessEcComponent = /** @class */ (function (_super) {
|
|
|
9076
9068
|
_this.orderDetails = {};
|
|
9077
9069
|
_this.params = {};
|
|
9078
9070
|
_this.from_mp = true;
|
|
9071
|
+
_this.totalAmount = null;
|
|
9072
|
+
_this.paymentDate = null;
|
|
9079
9073
|
/**
|
|
9080
9074
|
* @description Chequea si existe un bloque recibido por parametro.
|
|
9081
9075
|
* @param codeBlock codigo del bloque.
|
|
@@ -9083,19 +9077,29 @@ var SuccessEcComponent = /** @class */ (function (_super) {
|
|
|
9083
9077
|
*/
|
|
9084
9078
|
_this.containsBlock = function (codeBlock) { return _this.blocks.find(function (block) { return block.code == codeBlock; }); };
|
|
9085
9079
|
_this.isBalanceInAccount = function (code) { return code && code.toLocaleLowerCase().includes('balance_in_account'); };
|
|
9080
|
+
_this.isPlaceToPay = function (code) { return code && code.toLocaleLowerCase().includes('place_to_pay'); };
|
|
9086
9081
|
_this.ecOnConstruct();
|
|
9087
9082
|
return _this;
|
|
9088
9083
|
}
|
|
9089
9084
|
SuccessEcComponent.prototype.ngOnInit = function () {
|
|
9090
9085
|
var _this = this;
|
|
9091
9086
|
this.checkoutService.order$.subscribe(function (res) {
|
|
9092
|
-
var _a, _b;
|
|
9087
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
9093
9088
|
//console.log('LO QUE LLEGA EN ORDEN', res);
|
|
9094
9089
|
((_a = res) === null || _a === void 0 ? void 0 : _a.number) ? _this.params = {
|
|
9095
9090
|
external_reference: res.number,
|
|
9096
9091
|
} : null;
|
|
9097
9092
|
//this.payments = [{method:{code:'bank_transsfer'}}]
|
|
9098
9093
|
_this.payments = ((_b = res) === null || _b === void 0 ? void 0 : _b.payments) ? res.payments : null;
|
|
9094
|
+
if (((_e = (_d = (_c = _this.payments) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.method) === null || _e === void 0 ? void 0 : _e.code) && _this.isPlaceToPay(_this.payments[0].method.code)) {
|
|
9095
|
+
_this.totalAmount = (_h = (_g = (_f = res) === null || _f === void 0 ? void 0 : _f.totals) === null || _g === void 0 ? void 0 : _g.total, (_h !== null && _h !== void 0 ? _h : null));
|
|
9096
|
+
var now = new Date();
|
|
9097
|
+
_this.paymentDate = now.toLocaleDateString('es-AR', {
|
|
9098
|
+
day: '2-digit',
|
|
9099
|
+
month: '2-digit',
|
|
9100
|
+
year: 'numeric',
|
|
9101
|
+
});
|
|
9102
|
+
}
|
|
9099
9103
|
});
|
|
9100
9104
|
this.blocksService.getBlocks('info_metodo_pago');
|
|
9101
9105
|
this.blocksService.blocks.subscribe(function (res) { return _this.blocks = res; });
|
|
@@ -9112,7 +9116,7 @@ var SuccessEcComponent = /** @class */ (function (_super) {
|
|
|
9112
9116
|
SuccessEcComponent = __decorate$U([
|
|
9113
9117
|
Component({
|
|
9114
9118
|
selector: 'app-order-success-ec',
|
|
9115
|
-
template: "<div id=\"container\" class=\"flex-center generalContainer container-xl\">\n <div class=\"Main card my-2\" *ngIf=\"this.payments && this.payments[0].method.code; else loading\">\n <ng-container *ngIf=\"this.blocks && this.blocks.length > 0; else notInfoToMethod\">\n <ng-container *ngIf=\"containsBlock(this.payments[0].method.code) as bloque; else notInfoToMethod\">\n <div class=\"wrap my-4 card-body\" [id]=\"bloque.code\">\n <div class=\"row\">\n <div class=\"col-md-12 col-12\">\n <h5 [class]=\"bloque.code+'-title'\">{{ (bloque?.translations[consts.getLocale()]?.name ?\n bloque.translations[consts.getLocale()].name :\n 'thanks-for-buying') | translate\n | uppercase }}</h5>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-12 col-12 text-start\">\n <app-blocks-ec [section]=\"'info_metodo_pago'\" [blockFilters]=\"this.payments[0].method.code\">\n </app-blocks-ec>\n <div class=\"d-flex flex-column details\">\n <p class=\"card-text\">{{ ('number' | translate) + ': ' + params.external_reference }}</p>\n <p class=\"card-text\">\n {{ isBalanceInAccount(payments[0].method.code) ?\n ('balance-in-account-message' | translate) :\n ((params.payment_status || 'pending') | translate) }}\n </p>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <ng-template #notInfoToMethod>\n <ng-template #defaultMessage>\n <div class=\"wrap my-4 card-body\">\n <div class=\"row\">\n <div class=\"col-md-12 col-12\">\n <h5 class=\"card-title titpage center-block text-center\">\n {{ 'thanks-for-buying' | translate | uppercase }}\n </h5>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-12 col-12 text-center py-3\">\n <h4 class=\"thanks-details\">{{ 'thanks-details' | translate }}</h4>\n <h5 class=\"number\">{{ ('number' | translate) + ': ' + params.external_reference }}</h5>\n <h5 class=\"pending\">\n {{ isBalanceInAccount(payments[0].method.code) ?\n ('balance-in-account-message' | translate) :\n ((params.payment_status || 'pending') | translate) }}\n </h5>\n <!-- <h5 *ngIf=\"!from_mp\">{{ ('will_contact' | translate) }}</h5> -->\n\n <!-- <a routerLink=\"/collection\"><button class=\"comprar\">{{ 'continue-shopping' | translate }}</button></a> -->\n </div>\n </div>\n </div>\n </ng-template>\n <ng-container [ngTemplateOutlet]=\"notInfoToMethodTemplate ? notInfoToMethodTemplate : defaultMessage\"\n [ngTemplateOutletContext]=\"{params:params}\">\n </ng-container>\n </ng-template>\n </div>\n</div>\n\n<ng-template #loading>\n <app-loading-full-ec></app-loading-full-ec>\n</ng-template>",
|
|
9119
|
+
template: "<div id=\"container\" class=\"flex-center generalContainer container-xl\">\n <div class=\"Main card my-2\" *ngIf=\"this.payments && this.payments[0].method.code; else loading\">\n <ng-container *ngIf=\"this.blocks && this.blocks.length > 0; else notInfoToMethod\">\n <ng-container *ngIf=\"containsBlock(this.payments[0].method.code) as bloque; else notInfoToMethod\">\n <div class=\"wrap my-4 card-body\" [id]=\"bloque.code\">\n <div class=\"row\">\n <div class=\"col-md-12 col-12\">\n <h5 [class]=\"bloque.code+'-title'\">{{ (bloque?.translations[consts.getLocale()]?.name ?\n bloque.translations[consts.getLocale()].name :\n 'thanks-for-buying') | translate\n | uppercase }}</h5>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-12 col-12 text-start\">\n <app-blocks-ec [section]=\"'info_metodo_pago'\" [blockFilters]=\"this.payments[0].method.code\">\n </app-blocks-ec>\n <div class=\"d-flex flex-column details\">\n <p class=\"card-text\">{{ ('number' | translate) + ': ' + params.external_reference }}</p>\n <p class=\"card-text\">\n {{ isBalanceInAccount(payments[0].method.code) ?\n ('balance-in-account-message' | translate) :\n ((params.payment_status || 'pending') | translate) }}\n </p>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <ng-template #notInfoToMethod>\n <ng-template #defaultMessage>\n <div class=\"wrap my-4 card-body\">\n <div class=\"row\">\n <div class=\"col-md-12 col-12\">\n <h5 class=\"card-title titpage center-block text-center\">\n {{ 'thanks-for-buying' | translate | uppercase }}\n </h5>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-12 col-12 text-center py-3\">\n <h4 class=\"thanks-details\">{{ 'thanks-details' | translate }}</h4>\n <h5 class=\"number order-info-line\" [ngClass]=\"{ 'compact': paymentDate && totalAmount }\">{{ ('number' | translate) + ': ' + params.external_reference }}</h5>\n <h5 class=\"order-info-line\" *ngIf=\"paymentDate && totalAmount\">\n {{'payment-date' | translate }}: {{ paymentDate }}\n </h5>\n <h5 class=\"order-info-line\" *ngIf=\"paymentDate && totalAmount\">\n {{'total-paid' | translate }}: {{ totalAmount | ecCurrencySymbol }}\n </h5>\n <h5 class=\"pending\">\n {{ isBalanceInAccount(payments[0].method.code) ?\n ('balance-in-account-message' | translate) :\n ((params.payment_status || 'pending') | translate) }}\n </h5>\n <!-- <h5 *ngIf=\"!from_mp\">{{ ('will_contact' | translate) }}</h5> -->\n\n <!-- <a routerLink=\"/collection\"><button class=\"comprar\">{{ 'continue-shopping' | translate }}</button></a> -->\n </div>\n </div>\n </div>\n </ng-template>\n <ng-container [ngTemplateOutlet]=\"notInfoToMethodTemplate ? notInfoToMethodTemplate : defaultMessage\"\n [ngTemplateOutletContext]=\"{params:params}\">\n </ng-container>\n </ng-template>\n </div>\n</div>\n\n<ng-template #loading>\n <app-loading-full-ec></app-loading-full-ec>\n</ng-template>",
|
|
9116
9120
|
styles: [""]
|
|
9117
9121
|
})
|
|
9118
9122
|
], SuccessEcComponent);
|
|
@@ -11115,9 +11119,10 @@ var ProductDetailEcComponent = /** @class */ (function (_super) {
|
|
|
11115
11119
|
_this.plus = function (stock, changeAmount, forceMultiple) {
|
|
11116
11120
|
if (changeAmount === void 0) { changeAmount = 1; }
|
|
11117
11121
|
if (forceMultiple === void 0) { forceMultiple = false; }
|
|
11118
|
-
var
|
|
11122
|
+
var currentQuantity = Number(_this.quantity);
|
|
11123
|
+
var newQuantity = currentQuantity + changeAmount;
|
|
11119
11124
|
if (forceMultiple && changeAmount > 0) {
|
|
11120
|
-
if (
|
|
11125
|
+
if (currentQuantity < changeAmount) {
|
|
11121
11126
|
newQuantity = changeAmount;
|
|
11122
11127
|
}
|
|
11123
11128
|
else {
|
|
@@ -13791,8 +13796,8 @@ var RegisterFormEcComponent = /** @class */ (function (_super) {
|
|
|
13791
13796
|
RegisterFormEcComponent.prototype.ngOnInit = function () {
|
|
13792
13797
|
var _this = this;
|
|
13793
13798
|
this.registerForm = this.formBuilder.group({
|
|
13794
|
-
firstName: ['', Validators.required],
|
|
13795
|
-
lastName: ['', Validators.required],
|
|
13799
|
+
firstName: ['', [Validators.required, Validators.pattern(/^[A-Za-zÁÉÍÓÚáéíóúÑñ\s]+$/)]],
|
|
13800
|
+
lastName: ['', [Validators.required, Validators.pattern(/^[A-Za-zÁÉÍÓÚáéíóúÑñ\s]+$/)]],
|
|
13796
13801
|
email: ['', Validators.required],
|
|
13797
13802
|
plainPassword: ['', Validators.required],
|
|
13798
13803
|
plainPassword2: ['', Validators.required],
|
|
@@ -14388,8 +14393,8 @@ var RegisterWholesalerFormEcComponent = /** @class */ (function (_super) {
|
|
|
14388
14393
|
var _this = this;
|
|
14389
14394
|
this.paramsService.parameters.subscribe(function (res) { return _this.params = res; });
|
|
14390
14395
|
this.registerForm = this.formBuilder.group({
|
|
14391
|
-
firstName: ['', [Validators.required]],
|
|
14392
|
-
lastName: ['', [Validators.required]],
|
|
14396
|
+
firstName: ['', [Validators.required, Validators.pattern(/^[A-Za-zÁÉÍÓÚáéíóúÑñ\s]+$/)]],
|
|
14397
|
+
lastName: ['', [Validators.required, Validators.pattern(/^[A-Za-zÁÉÍÓÚáéíóúÑñ\s]+$/)]],
|
|
14393
14398
|
documentType: [null, [Validators.required]],
|
|
14394
14399
|
documentNumber: ['', [Validators.required]],
|
|
14395
14400
|
email: ['', [Validators.required, Validators.email]],
|