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/README.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
# version 0.0.634
|
|
2
|
+
- Se volvio para atras el cambio de generación de breadcrumbs
|
|
3
|
+
# version 0.0.633
|
|
4
|
+
- mejorar la lógica de actualización de cantidad en el carrito
|
|
5
|
+
- optimizar la generación de breadcrumbs
|
|
1
6
|
# version 0.0.632
|
|
2
7
|
- mejorar la validación de cantidad y stock en el carrito
|
|
3
8
|
# version 0.0.631
|
package/assets/ec-i18n/ct.json
CHANGED
|
@@ -295,5 +295,7 @@
|
|
|
295
295
|
"taxes": "Impostos",
|
|
296
296
|
"price-without-national-taxes": "Preu sense impostos nacionals",
|
|
297
297
|
"this-payment-method-cannot-be-used": "Aquest mètode de pagament no es pot utilitzar",
|
|
298
|
-
"must-be-multiple": "La quantitat total ha de ser un múltiple de {{quantity}}"
|
|
298
|
+
"must-be-multiple": "La quantitat total ha de ser un múltiple de {{quantity}}",
|
|
299
|
+
"payment-date": "Data de pagament",
|
|
300
|
+
"total-paid": "Total abonado"
|
|
299
301
|
}
|
package/assets/ec-i18n/en.json
CHANGED
|
@@ -406,5 +406,7 @@
|
|
|
406
406
|
"email_already_registered": "The email entered is already registered.",
|
|
407
407
|
"mail-enter": "Mail",
|
|
408
408
|
"this-payment-method-cannot-be-used": "This payment method cannot be used",
|
|
409
|
-
"must-be-multiple": "The total quantity must be a multiple of {{quantity}}"
|
|
409
|
+
"must-be-multiple": "The total quantity must be a multiple of {{quantity}}",
|
|
410
|
+
"payment-date": "Payment date",
|
|
411
|
+
"total-paid": "Total paid"
|
|
410
412
|
}
|
package/assets/ec-i18n/es.json
CHANGED
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
"payment-error": "Hubo un error al procesar el pago. Vuelva a intentarlo más tarde.",
|
|
221
221
|
"payment-preferences-error": "Hubo un problema al intentar obtener las preferencias del pago. Vuelva a intentarlo más tarde",
|
|
222
222
|
"payment-state": "Estado de compra",
|
|
223
|
-
"pending": "Tu
|
|
223
|
+
"pending": "Tu compra está siendo procesado, una vez verificado el pago, recibirás un mail con información adicional del mismo",
|
|
224
224
|
"balance-in-account-message": "El pago ha sido completado automáticamente con el método seleccionado. Su pedido está siendo procesado y pronto recibirá más información.",
|
|
225
225
|
"phone": "Teléfono",
|
|
226
226
|
"phone-cases": "Fundas de teléfono",
|
|
@@ -317,8 +317,8 @@
|
|
|
317
317
|
"national-taxes": "Impuestos nacionales",
|
|
318
318
|
"price-without-national-taxes": "Precio sin impuestos nacionales",
|
|
319
319
|
"taxon": "Categoría",
|
|
320
|
-
"thanks-details": "
|
|
321
|
-
"thanks-for-buying": "Gracias por
|
|
320
|
+
"thanks-details": "Tu compra se ha realizado con éxito. A continuación recibirás un mail con los detalles",
|
|
321
|
+
"thanks-for-buying": "Gracias por tu compra",
|
|
322
322
|
"thanks-for-register": "Gracias por registrarse",
|
|
323
323
|
"thanks-for-register-detail": "Ahora ya puede iniciar sesión. A continuación le dejamos el acceso al inicio de sesión",
|
|
324
324
|
"thumbnail-below": "miniatura",
|
|
@@ -413,6 +413,8 @@
|
|
|
413
413
|
"email_already_registered": "El email ingresado ya se encuentra registrado.",
|
|
414
414
|
"quantity-not-exceeded": "Debe realizar un pedido con un monto mínimo de {{ amount }} para finalizar su compra.",
|
|
415
415
|
"mail-enter": "Correo electronico",
|
|
416
|
-
"this-payment-method-cannot-be-used": "Este método de pago no puede ser utilizado"
|
|
416
|
+
"this-payment-method-cannot-be-used": "Este método de pago no puede ser utilizado",
|
|
417
|
+
"payment-date": "Fecha de pago",
|
|
418
|
+
"total-paid": "Total abonado"
|
|
417
419
|
|
|
418
420
|
}
|
package/assets/ec-i18n/fr.json
CHANGED
|
@@ -287,5 +287,7 @@
|
|
|
287
287
|
"taxes": "Taxes",
|
|
288
288
|
"price-without-national-taxes": "Prix sans taxes nationales",
|
|
289
289
|
"this-payment-method-cannot-be-used": "Ce mode de paiement ne peut pas être utilisé",
|
|
290
|
-
"must-be-multiple": "La quantité totale doit être un multiple de {{quantity}}"
|
|
290
|
+
"must-be-multiple": "La quantité totale doit être un multiple de {{quantity}}",
|
|
291
|
+
"payment-date": "Date de paiement",
|
|
292
|
+
"total-paid": "Total payé"
|
|
291
293
|
}
|
package/assets/ec-i18n/gl.json
CHANGED
|
@@ -295,5 +295,7 @@
|
|
|
295
295
|
"taxes": "Impostos",
|
|
296
296
|
"price-without-national-taxes": "Prezo sen impostos nacionais",
|
|
297
297
|
"this-payment-method-cannot-be-used": "Este método de pago non pode ser usado",
|
|
298
|
-
"must-be-multiple": "A cantidade total debe ser múltiplo de {{quantity}}"
|
|
298
|
+
"must-be-multiple": "A cantidade total debe ser múltiplo de {{quantity}}",
|
|
299
|
+
"payment-date": "Data de pago",
|
|
300
|
+
"total-paid": "Total abonado"
|
|
299
301
|
}
|
package/assets/ec-i18n/pr.json
CHANGED
|
@@ -295,5 +295,7 @@
|
|
|
295
295
|
"taxes": "Impostos",
|
|
296
296
|
"price-without-national-taxes": "Preço sem impostos nacionais",
|
|
297
297
|
"this-payment-method-cannot-be-used": "Este método de pagamento não pode ser utilizado",
|
|
298
|
-
"must-be-multiple": "A quantidade total deve ser um múltiplo de {{quantity}}"
|
|
298
|
+
"must-be-multiple": "A quantidade total deve ser um múltiplo de {{quantity}}",
|
|
299
|
+
"payment-date": "Data de pagamento",
|
|
300
|
+
"total-paid": "Total pago"
|
|
299
301
|
}
|
|
@@ -4108,14 +4108,6 @@
|
|
|
4108
4108
|
this.getChannels();
|
|
4109
4109
|
this.getLocales();
|
|
4110
4110
|
}
|
|
4111
|
-
/**
|
|
4112
|
-
* @description Devuelve si se deben mostrar precios con impuestos durante la navegación.
|
|
4113
|
-
* @returns {boolean | null} true/false si está definido, null si aún no hay configuración
|
|
4114
|
-
*/
|
|
4115
|
-
ChannelConfigService$1.prototype.getShowPricesWithTaxes = function () {
|
|
4116
|
-
var _a, _b;
|
|
4117
|
-
return _b = (_a = this.channel) === null || _a === void 0 ? void 0 : _a.showPriceWithTaxesWhileBrowsing, (_b !== null && _b !== void 0 ? _b : null);
|
|
4118
|
-
};
|
|
4119
4111
|
ChannelConfigService$1.ctorParameters = function () { return [
|
|
4120
4112
|
{ type: Constants },
|
|
4121
4113
|
{ type: undefined, decorators: [{ type: core.Inject, args: ['env',] }] },
|
|
@@ -9062,6 +9054,8 @@
|
|
|
9062
9054
|
_this.orderDetails = {};
|
|
9063
9055
|
_this.params = {};
|
|
9064
9056
|
_this.from_mp = true;
|
|
9057
|
+
_this.totalAmount = null;
|
|
9058
|
+
_this.paymentDate = null;
|
|
9065
9059
|
/**
|
|
9066
9060
|
* @description Chequea si existe un bloque recibido por parametro.
|
|
9067
9061
|
* @param codeBlock codigo del bloque.
|
|
@@ -9069,19 +9063,29 @@
|
|
|
9069
9063
|
*/
|
|
9070
9064
|
_this.containsBlock = function (codeBlock) { return _this.blocks.find(function (block) { return block.code == codeBlock; }); };
|
|
9071
9065
|
_this.isBalanceInAccount = function (code) { return code && code.toLocaleLowerCase().includes('balance_in_account'); };
|
|
9066
|
+
_this.isPlaceToPay = function (code) { return code && code.toLocaleLowerCase().includes('place_to_pay'); };
|
|
9072
9067
|
_this.ecOnConstruct();
|
|
9073
9068
|
return _this;
|
|
9074
9069
|
}
|
|
9075
9070
|
SuccessEcComponent.prototype.ngOnInit = function () {
|
|
9076
9071
|
var _this = this;
|
|
9077
9072
|
this.checkoutService.order$.subscribe(function (res) {
|
|
9078
|
-
var _a, _b;
|
|
9073
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
9079
9074
|
//console.log('LO QUE LLEGA EN ORDEN', res);
|
|
9080
9075
|
((_a = res) === null || _a === void 0 ? void 0 : _a.number) ? _this.params = {
|
|
9081
9076
|
external_reference: res.number,
|
|
9082
9077
|
} : null;
|
|
9083
9078
|
//this.payments = [{method:{code:'bank_transsfer'}}]
|
|
9084
9079
|
_this.payments = ((_b = res) === null || _b === void 0 ? void 0 : _b.payments) ? res.payments : null;
|
|
9080
|
+
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)) {
|
|
9081
|
+
_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));
|
|
9082
|
+
var now = new Date();
|
|
9083
|
+
_this.paymentDate = now.toLocaleDateString('es-AR', {
|
|
9084
|
+
day: '2-digit',
|
|
9085
|
+
month: '2-digit',
|
|
9086
|
+
year: 'numeric',
|
|
9087
|
+
});
|
|
9088
|
+
}
|
|
9085
9089
|
});
|
|
9086
9090
|
this.blocksService.getBlocks('info_metodo_pago');
|
|
9087
9091
|
this.blocksService.blocks.subscribe(function (res) { return _this.blocks = res; });
|
|
@@ -9098,7 +9102,7 @@
|
|
|
9098
9102
|
SuccessEcComponent = __decorate$U([
|
|
9099
9103
|
core.Component({
|
|
9100
9104
|
selector: 'app-order-success-ec',
|
|
9101
|
-
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>",
|
|
9105
|
+
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>",
|
|
9102
9106
|
styles: [""]
|
|
9103
9107
|
})
|
|
9104
9108
|
], SuccessEcComponent);
|
|
@@ -11101,9 +11105,10 @@
|
|
|
11101
11105
|
_this.plus = function (stock, changeAmount, forceMultiple) {
|
|
11102
11106
|
if (changeAmount === void 0) { changeAmount = 1; }
|
|
11103
11107
|
if (forceMultiple === void 0) { forceMultiple = false; }
|
|
11104
|
-
var
|
|
11108
|
+
var currentQuantity = Number(_this.quantity);
|
|
11109
|
+
var newQuantity = currentQuantity + changeAmount;
|
|
11105
11110
|
if (forceMultiple && changeAmount > 0) {
|
|
11106
|
-
if (
|
|
11111
|
+
if (currentQuantity < changeAmount) {
|
|
11107
11112
|
newQuantity = changeAmount;
|
|
11108
11113
|
}
|
|
11109
11114
|
else {
|
|
@@ -13777,8 +13782,8 @@
|
|
|
13777
13782
|
RegisterFormEcComponent.prototype.ngOnInit = function () {
|
|
13778
13783
|
var _this = this;
|
|
13779
13784
|
this.registerForm = this.formBuilder.group({
|
|
13780
|
-
firstName: ['', forms.Validators.required],
|
|
13781
|
-
lastName: ['', forms.Validators.required],
|
|
13785
|
+
firstName: ['', [forms.Validators.required, forms.Validators.pattern(/^[A-Za-zÁÉÍÓÚáéíóúÑñ\s]+$/)]],
|
|
13786
|
+
lastName: ['', [forms.Validators.required, forms.Validators.pattern(/^[A-Za-zÁÉÍÓÚáéíóúÑñ\s]+$/)]],
|
|
13782
13787
|
email: ['', forms.Validators.required],
|
|
13783
13788
|
plainPassword: ['', forms.Validators.required],
|
|
13784
13789
|
plainPassword2: ['', forms.Validators.required],
|
|
@@ -14374,8 +14379,8 @@
|
|
|
14374
14379
|
var _this = this;
|
|
14375
14380
|
this.paramsService.parameters.subscribe(function (res) { return _this.params = res; });
|
|
14376
14381
|
this.registerForm = this.formBuilder.group({
|
|
14377
|
-
firstName: ['', [forms.Validators.required]],
|
|
14378
|
-
lastName: ['', [forms.Validators.required]],
|
|
14382
|
+
firstName: ['', [forms.Validators.required, forms.Validators.pattern(/^[A-Za-zÁÉÍÓÚáéíóúÑñ\s]+$/)]],
|
|
14383
|
+
lastName: ['', [forms.Validators.required, forms.Validators.pattern(/^[A-Za-zÁÉÍÓÚáéíóúÑñ\s]+$/)]],
|
|
14379
14384
|
documentType: [null, [forms.Validators.required]],
|
|
14380
14385
|
documentNumber: ['', [forms.Validators.required]],
|
|
14381
14386
|
email: ['', [forms.Validators.required, forms.Validators.email]],
|