ng-easycommerce 0.0.610 → 0.0.612
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 +4 -0
- package/bundles/ng-easycommerce.umd.js +29 -6
- 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/cart-ec/cart-ec.component.js +2 -2
- package/esm2015/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.js +10 -3
- package/esm2015/lib/ec-component/sidebar-ec/sidebar-ec.component.js +4 -2
- package/esm2015/lib/ec-component/widgets-ec/price-ec/price-ec.component.js +13 -3
- package/esm5/lib/ec-component/cart-ec/cart-ec.component.js +2 -2
- package/esm5/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.js +10 -3
- package/esm5/lib/ec-component/sidebar-ec/sidebar-ec.component.js +4 -2
- package/esm5/lib/ec-component/widgets-ec/price-ec/price-ec.component.js +17 -3
- package/fesm2015/ng-easycommerce.js +25 -6
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +29 -6
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.d.ts +1 -0
- package/lib/ec-component/sidebar-ec/sidebar-ec.component.d.ts +1 -0
- package/lib/ec-component/widgets-ec/price-ec/price-ec.component.d.ts +2 -0
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -6316,7 +6316,7 @@ let CartEcComponent = class CartEcComponent extends ComponentHelper {
|
|
|
6316
6316
|
this.hidePrices = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hidePrices, (_b !== null && _b !== void 0 ? _b : false));
|
|
6317
6317
|
this.hideDiscounts = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideDiscounts, (_d !== null && _d !== void 0 ? _d : false));
|
|
6318
6318
|
this.hideTaxes = (_f = (_e = channel) === null || _e === void 0 ? void 0 : _e.hideTaxes, (_f !== null && _f !== void 0 ? _f : false));
|
|
6319
|
-
this.showPriceWithoutTaxes = (_h = (_g = channel) === null || _g === void 0 ? void 0 : _g.showPriceWithoutTaxes, (_h !== null && _h !== void 0 ? _h :
|
|
6319
|
+
this.showPriceWithoutTaxes = (_h = (_g = channel) === null || _g === void 0 ? void 0 : _g.showPriceWithoutTaxes, (_h !== null && _h !== void 0 ? _h : true));
|
|
6320
6320
|
if (this.hidePrices) {
|
|
6321
6321
|
this.router.navigate(['/']);
|
|
6322
6322
|
}
|
|
@@ -10252,15 +10252,25 @@ let PriceEcComponent = class PriceEcComponent extends ComponentHelper {
|
|
|
10252
10252
|
this.showTaxLegendOnly = false;
|
|
10253
10253
|
this.disableTaxInfo = false;
|
|
10254
10254
|
this.showPriceWithoutTaxes = true;
|
|
10255
|
+
this.hideTaxes = false;
|
|
10255
10256
|
this.ecOnConstruct();
|
|
10256
10257
|
}
|
|
10257
10258
|
ngOnInit() {
|
|
10258
10259
|
this.channelConfigService.channelConfig$.subscribe(channel => {
|
|
10259
|
-
var _a;
|
|
10260
|
+
var _a, _b, _c;
|
|
10260
10261
|
this.showPriceWithoutTaxes = (_a = channel) === null || _a === void 0 ? void 0 : _a.showPriceWithoutTaxes;
|
|
10262
|
+
this.hideTaxes = (_c = (_b = channel) === null || _b === void 0 ? void 0 : _b.hideTaxes, (_c !== null && _c !== void 0 ? _c : false));
|
|
10261
10263
|
});
|
|
10262
10264
|
this.ecOnInit();
|
|
10263
10265
|
}
|
|
10266
|
+
get shouldShowTaxes() {
|
|
10267
|
+
console.log('shouldShowTaxes', this.disableTaxInfo, this.showPriceWithoutTaxes, this.hideTaxes, this.basePrice, this.taxeAmount);
|
|
10268
|
+
return !this.disableTaxInfo &&
|
|
10269
|
+
!this.showPriceWithoutTaxes &&
|
|
10270
|
+
!this.hideTaxes &&
|
|
10271
|
+
!!this.basePrice &&
|
|
10272
|
+
!!this.taxeAmount;
|
|
10273
|
+
}
|
|
10264
10274
|
};
|
|
10265
10275
|
PriceEcComponent.ctorParameters = () => [
|
|
10266
10276
|
{ type: ProductsService },
|
|
@@ -10314,7 +10324,7 @@ __decorate$1f([
|
|
|
10314
10324
|
PriceEcComponent = __decorate$1f([
|
|
10315
10325
|
Component({
|
|
10316
10326
|
selector: 'app-price-ec',
|
|
10317
|
-
template: "<!-- Si hay templates personalizados, se proyectan -->\n<ng-container *ngIf=\"customSalePriceTemplate || customPriceTemplate; else defaultPriceBlock\">\n <ng-container *ngTemplateOutlet=\"customPriceTemplate || defaultPriceBlock\"></ng-container>\n</ng-container>\n\n<ng-template #defaultPriceBlock>\n <div *ngIf=\"saleprice; else onlyprice\" class=\"line-height-custom\">\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\n *ngIf=\"price && price.split(' - ').length > 1; else simplePriceDel\">\n <del class=\"tachado\">\n {{ price.split(' - ')[0] | ecCurrencySymbol }}\n {{ price.split(' - ')[1] | ecCurrencySymbol }}\n </del>\n </div>\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\n *ngIf=\"saleprice && saleprice.split(' - ').length > 1; else simpleSalePrice\">\n {{ saleprice.split(' - ')[0] | ecCurrencySymbol }}\n {{ saleprice.split(' - ')[1] | ecCurrencySymbol }}\n </div>\n </div>\n\n <ng-template #onlyprice>\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\n *ngIf=\"price && price.split(' - ').length > 1; else simplePrice\">\n {{ price.split(' - ')[0] | ecCurrencySymbol }} -\n {{ price.split(' - ')[1] | ecCurrencySymbol }}\n </div>\n </ng-template>\n\n <ng-template #simplePrice>\n <ng-container *ngIf=\"customSimplePriceTemplate; else fallbackSimplePrice\">\n <ng-container *ngTemplateOutlet=\"customSimplePriceTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n\n <ng-template #fallbackSimplePrice>\n <div [class]=\"'uno line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\n {{ price | ecCurrencySymbol }}\n </div>\n </ng-template>\n\n <ng-template #simplePriceDel>\n <div [class]=\"'dos line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\n <span class=\"lnth\">{{ price | ecCurrencySymbol }}</span>\n </div>\n </ng-template>\n\n <ng-template #simpleSalePrice>\n <ng-container *ngIf=\"customSimpleSalePriceTemplate; else fallbackSimpleSalePrice\">\n <ng-container *ngTemplateOutlet=\"customSimpleSalePriceTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n\n <ng-template #fallbackSimpleSalePrice>\n <div [class]=\"'tres line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\n {{ saleprice | ecCurrencySymbol }}\n </div>\n </ng-template>\n</ng-template>\n\n<!-- Secci\u00F3n de impuestos -->\n<ng-container *ngIf=\"
|
|
10327
|
+
template: "<!-- Si hay templates personalizados, se proyectan -->\n<ng-container *ngIf=\"customSalePriceTemplate || customPriceTemplate; else defaultPriceBlock\">\n <ng-container *ngTemplateOutlet=\"customPriceTemplate || defaultPriceBlock\"></ng-container>\n</ng-container>\n\n<ng-template #defaultPriceBlock>\n <div *ngIf=\"saleprice; else onlyprice\" class=\"line-height-custom\">\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\n *ngIf=\"price && price.split(' - ').length > 1; else simplePriceDel\">\n <del class=\"tachado\">\n {{ price.split(' - ')[0] | ecCurrencySymbol }}\n {{ price.split(' - ')[1] | ecCurrencySymbol }}\n </del>\n </div>\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\n *ngIf=\"saleprice && saleprice.split(' - ').length > 1; else simpleSalePrice\">\n {{ saleprice.split(' - ')[0] | ecCurrencySymbol }}\n {{ saleprice.split(' - ')[1] | ecCurrencySymbol }}\n </div>\n </div>\n\n <ng-template #onlyprice>\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\n *ngIf=\"price && price.split(' - ').length > 1; else simplePrice\">\n {{ price.split(' - ')[0] | ecCurrencySymbol }} -\n {{ price.split(' - ')[1] | ecCurrencySymbol }}\n </div>\n </ng-template>\n\n <ng-template #simplePrice>\n <ng-container *ngIf=\"customSimplePriceTemplate; else fallbackSimplePrice\">\n <ng-container *ngTemplateOutlet=\"customSimplePriceTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n\n <ng-template #fallbackSimplePrice>\n <div [class]=\"'uno line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\n {{ price | ecCurrencySymbol }}\n </div>\n </ng-template>\n\n <ng-template #simplePriceDel>\n <div [class]=\"'dos line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\n <span class=\"lnth\">{{ price | ecCurrencySymbol }}</span>\n </div>\n </ng-template>\n\n <ng-template #simpleSalePrice>\n <ng-container *ngIf=\"customSimpleSalePriceTemplate; else fallbackSimpleSalePrice\">\n <ng-container *ngTemplateOutlet=\"customSimpleSalePriceTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n\n <ng-template #fallbackSimpleSalePrice>\n <div [class]=\"'tres line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\n {{ saleprice | ecCurrencySymbol }}\n </div>\n </ng-template>\n</ng-template>\n\n<!-- Secci\u00F3n de impuestos -->\n<ng-container *ngIf=\"shouldShowTaxes\">\n <ng-container *ngIf=\"showTaxLegendOnly; else detailedTaxBlock\">\n <ng-container *ngIf=\"customOnlyTaxLabelTemplate; else defaultOnlyTaxLabelBlock\">\n <ng-container *ngTemplateOutlet=\"customOnlyTaxLabelTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultOnlyTaxLabelBlock>\n <p class=\"taxes-title\">{{'price-without-national-taxes' | translate }}: {{ basePrice | ecCurrencySymbol }}\n </p>\n </ng-template>\n </ng-container>\n\n <ng-template #detailedTaxBlock>\n <ng-container *ngIf=\"customTaxTemplate; else defaultTaxBlock\">\n <ng-container *ngTemplateOutlet=\"customTaxTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n</ng-container>\n\n<ng-template #defaultTaxBlock>\n <div class=\"taxes-section\">\n <p class=\"taxes-title\">{{'price-without-national-taxes' | translate }}: {{ basePrice | ecCurrencySymbol }}</p>\n <ul class=\"taxes-list\">\n <li>\n {{ taxes.Name }}: {{ taxeAmount | ecCurrencySymbol }}\n </li>\n </ul>\n </div>\n</ng-template>",
|
|
10318
10328
|
styles: [".price-sm{font-size:13px}.price{font-size:18px}.lnth{text-decoration:line-through;color:gray}.taxes-section{margin-top:.5rem;border-radius:.5rem;font-size:.95rem;color:#333;line-height:1.4;max-width:400px}.taxes-title{font-weight:500;margin-bottom:.2rem;font-size:.7rem;color:#222}.taxes-list{list-style-type:none;padding-left:0;margin:0}.taxes-list li{margin-bottom:.05rem;font-size:.65rem;display:flex;justify-content:space-between}"]
|
|
10319
10329
|
})
|
|
10320
10330
|
], PriceEcComponent);
|
|
@@ -11968,7 +11978,7 @@ let DetailCheckoutBlockEcComponent = class DetailCheckoutBlockEcComponent extend
|
|
|
11968
11978
|
var _a, _b, _c, _d, _e, _f;
|
|
11969
11979
|
this.hideDiscounts = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hideDiscounts, (_b !== null && _b !== void 0 ? _b : false));
|
|
11970
11980
|
this.hideTaxes = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideTaxes, (_d !== null && _d !== void 0 ? _d : false));
|
|
11971
|
-
this.showPriceWithoutTaxes = (_f = (_e = channel) === null || _e === void 0 ? void 0 : _e.showPriceWithoutTaxes, (_f !== null && _f !== void 0 ? _f :
|
|
11981
|
+
this.showPriceWithoutTaxes = (_f = (_e = channel) === null || _e === void 0 ? void 0 : _e.showPriceWithoutTaxes, (_f !== null && _f !== void 0 ? _f : true));
|
|
11972
11982
|
});
|
|
11973
11983
|
}
|
|
11974
11984
|
calcularTotales() {
|
|
@@ -11987,6 +11997,13 @@ let DetailCheckoutBlockEcComponent = class DetailCheckoutBlockEcComponent extend
|
|
|
11987
11997
|
}
|
|
11988
11998
|
return type;
|
|
11989
11999
|
}
|
|
12000
|
+
shouldShowItem(type) {
|
|
12001
|
+
if (type === 'discount' || type === 'coupon')
|
|
12002
|
+
return false;
|
|
12003
|
+
if (type === 'taxes')
|
|
12004
|
+
return !this.hideTaxes;
|
|
12005
|
+
return true;
|
|
12006
|
+
}
|
|
11990
12007
|
};
|
|
11991
12008
|
DetailCheckoutBlockEcComponent.ctorParameters = () => [
|
|
11992
12009
|
{ type: CheckoutService },
|
|
@@ -11999,7 +12016,7 @@ __decorate$1u([
|
|
|
11999
12016
|
DetailCheckoutBlockEcComponent = __decorate$1u([
|
|
12000
12017
|
Component({
|
|
12001
12018
|
selector: 'app-detail-checkout-block-ec',
|
|
12002
|
-
template: "<div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\"\n *ngIf=\"data && (creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <ng-container *ngFor=\"let item of data; let i = index\">\n <ng-container *ngIf=\"item.type
|
|
12019
|
+
template: "<div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\"\n *ngIf=\"data && (creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <ng-container *ngFor=\"let item of data; let i = index\">\n <ng-container *ngIf=\"shouldShowItem(item.type)\">\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon(item)\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">\n {{ getTypeLabel(item.type) | translate }}\n </strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (item.amount != 0 ) ? (item.amount |\n ecCurrencySymbol) : ('free' | translate) }}</span>\n </div>\n </ng-container>\n\n\n <!-- Mostrar total de descuentos -->\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\n *ngIf=\"!hideDiscounts && this.discountTotal != 0 && i === 1\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('discount')\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">Descuento</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (this.discountTotal | ecCurrencySymbol)\n }}</span>\n </div>\n\n <!-- Mostrar total de cupones -->\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\n *ngIf=\"!hideDiscounts && this.couponTotal != 0 && i === 1\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('coupon')\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">Cupon</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{(this.couponTotal| ecCurrencySymbol)\n }}</span>\n </div>\n </ng-container>\n</div>",
|
|
12003
12020
|
styles: [""]
|
|
12004
12021
|
})
|
|
12005
12022
|
], DetailCheckoutBlockEcComponent);
|
|
@@ -15799,6 +15816,7 @@ let SidebarEcComponent = class SidebarEcComponent {
|
|
|
15799
15816
|
this.hideDiscounts = false;
|
|
15800
15817
|
this.hideTaxes = false;
|
|
15801
15818
|
this.creditAccountShowPrices = null;
|
|
15819
|
+
this.showPriceWithoutTaxes = true;
|
|
15802
15820
|
this.actualizarCantidad = (item, cantidad, stock, id) => {
|
|
15803
15821
|
if (id) {
|
|
15804
15822
|
const elem = document.getElementById(id);
|
|
@@ -15862,9 +15880,10 @@ let SidebarEcComponent = class SidebarEcComponent {
|
|
|
15862
15880
|
this.user = u;
|
|
15863
15881
|
});
|
|
15864
15882
|
this.channelConfigService.channelConfig$.subscribe(channel => {
|
|
15865
|
-
var _a, _b, _c, _d;
|
|
15883
|
+
var _a, _b, _c, _d, _e, _f;
|
|
15866
15884
|
this.hideDiscounts = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hideDiscounts, (_b !== null && _b !== void 0 ? _b : false));
|
|
15867
15885
|
this.hideTaxes = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideTaxes, (_d !== null && _d !== void 0 ? _d : false));
|
|
15886
|
+
this.showPriceWithoutTaxes = (_f = (_e = channel) === null || _e === void 0 ? void 0 : _e.showPriceWithoutTaxes, (_f !== null && _f !== void 0 ? _f : true));
|
|
15868
15887
|
});
|
|
15869
15888
|
this.cartService.showPrice$.subscribe((showPrice) => {
|
|
15870
15889
|
this.creditAccountShowPrices = showPrice;
|