ng-easycommerce 0.0.596 → 0.0.597
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 +23 -5
- 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/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.js +14 -4
- package/esm2015/lib/ec-component/sidebar-ec/sidebar-ec.component.js +13 -3
- package/esm5/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.js +14 -4
- package/esm5/lib/ec-component/sidebar-ec/sidebar-ec.component.js +13 -3
- package/fesm2015/ng-easycommerce.js +23 -5
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +23 -5
- 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 +5 -1
- package/lib/ec-component/sidebar-ec/sidebar-ec.component.d.ts +5 -1
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# version 0.0.597
|
|
2
|
+
- Se integran los parámetros `hideDiscounts` y `hideTaxes` del servicio `channel-config.service.ts` en el componente `sidebar-ec.component.ts` y `detail-checkout-block-ec.component.ts`
|
|
1
3
|
# version 0.0.596
|
|
2
4
|
- Se integran los parámetros `hidePrices`, `hideDiscounts` y `hideTaxes` del servicio `channel-config.service.ts` en los siguientes componentes:
|
|
3
5
|
- `product-detail-ec.component` y `product-ec.component`: Se ocultan los precios si `hidePrices` está activado.
|
|
@@ -14118,15 +14118,18 @@
|
|
|
14118
14118
|
};
|
|
14119
14119
|
var DetailCheckoutBlockEcComponent = /** @class */ (function (_super) {
|
|
14120
14120
|
__extends$V(DetailCheckoutBlockEcComponent, _super);
|
|
14121
|
-
function DetailCheckoutBlockEcComponent(checkoutService, cartService) {
|
|
14121
|
+
function DetailCheckoutBlockEcComponent(checkoutService, cartService, channelConfigService) {
|
|
14122
14122
|
var _this = _super.call(this) || this;
|
|
14123
14123
|
_this.checkoutService = checkoutService;
|
|
14124
14124
|
_this.cartService = cartService;
|
|
14125
|
+
_this.channelConfigService = channelConfigService;
|
|
14125
14126
|
_this.data = null;
|
|
14126
14127
|
_this.discountTotal = 0;
|
|
14127
14128
|
_this.couponTotal = 0;
|
|
14128
14129
|
_this.showPrice = false;
|
|
14129
14130
|
_this.creditAmountConfigured = false;
|
|
14131
|
+
_this.hideDiscounts = false;
|
|
14132
|
+
_this.hideTaxes = false;
|
|
14130
14133
|
_this.getIcon = function (data_item) {
|
|
14131
14134
|
switch (data_item.type) {
|
|
14132
14135
|
case 'coupon': return 'fas fa-ticket-alt fa-3x';
|
|
@@ -14159,6 +14162,11 @@
|
|
|
14159
14162
|
this.cartService.creditAmount$.subscribe(function (creditAmount) {
|
|
14160
14163
|
_this.creditAmountConfigured = creditAmount !== null;
|
|
14161
14164
|
});
|
|
14165
|
+
this.channelConfigService.channelConfig$.subscribe(function (channel) {
|
|
14166
|
+
var _a, _b, _c, _d;
|
|
14167
|
+
_this.hideDiscounts = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hideDiscounts, (_b !== null && _b !== void 0 ? _b : false));
|
|
14168
|
+
_this.hideTaxes = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideTaxes, (_d !== null && _d !== void 0 ? _d : false));
|
|
14169
|
+
});
|
|
14162
14170
|
};
|
|
14163
14171
|
DetailCheckoutBlockEcComponent.prototype.calcularTotales = function () {
|
|
14164
14172
|
if (this.data) {
|
|
@@ -14172,7 +14180,8 @@
|
|
|
14172
14180
|
};
|
|
14173
14181
|
DetailCheckoutBlockEcComponent.ctorParameters = function () { return [
|
|
14174
14182
|
{ type: CheckoutService },
|
|
14175
|
-
{ type: CartService }
|
|
14183
|
+
{ type: CartService },
|
|
14184
|
+
{ type: ChannelConfigService }
|
|
14176
14185
|
]; };
|
|
14177
14186
|
__decorate$1u([
|
|
14178
14187
|
core.Input()
|
|
@@ -14180,7 +14189,7 @@
|
|
|
14180
14189
|
DetailCheckoutBlockEcComponent = __decorate$1u([
|
|
14181
14190
|
core.Component({
|
|
14182
14191
|
selector: 'app-detail-checkout-block-ec',
|
|
14183
|
-
template: "<div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\"\n *ngIf=\"data && (creditAmountConfigured ? showPrice : true)\">\n <ng-container *ngFor=\"let item of data; let i = index\">\n <ng-container *ngIf=\"item.type != 'discount' && item.type != 'coupon'\">\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\">{{ item.type | translate }}</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=\"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=\"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>",
|
|
14192
|
+
template: "<div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\"\n *ngIf=\"data && (creditAmountConfigured ? showPrice : true)\">\n <ng-container *ngFor=\"let item of data; let i = index\">\n <ng-container *ngIf=\"item.type != 'discount' && item.type != 'coupon'\">\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\">{{ item.type | translate }}</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>",
|
|
14184
14193
|
styles: [""]
|
|
14185
14194
|
})
|
|
14186
14195
|
], DetailCheckoutBlockEcComponent);
|
|
@@ -18501,16 +18510,19 @@
|
|
|
18501
18510
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
18502
18511
|
};
|
|
18503
18512
|
var SidebarEcComponent = /** @class */ (function () {
|
|
18504
|
-
function SidebarEcComponent(cartService, consts, authService, router, toastrService) {
|
|
18513
|
+
function SidebarEcComponent(cartService, consts, authService, router, toastrService, channelConfigService) {
|
|
18505
18514
|
var _this = this;
|
|
18506
18515
|
this.cartService = cartService;
|
|
18507
18516
|
this.consts = consts;
|
|
18508
18517
|
this.authService = authService;
|
|
18509
18518
|
this.router = router;
|
|
18510
18519
|
this.toastrService = toastrService;
|
|
18520
|
+
this.channelConfigService = channelConfigService;
|
|
18511
18521
|
this.user = null;
|
|
18512
18522
|
this.promotions = [];
|
|
18513
18523
|
this.variantsToShow = ['TALLE', 'COLOR'];
|
|
18524
|
+
this.hideDiscounts = false;
|
|
18525
|
+
this.hideTaxes = false;
|
|
18514
18526
|
this.actualizarCantidad = function (item, cantidad, stock, id) {
|
|
18515
18527
|
if (id) {
|
|
18516
18528
|
var elem_1 = document.getElementById(id);
|
|
@@ -18574,6 +18586,11 @@
|
|
|
18574
18586
|
this.authService.getUserProfile().subscribe(function (u) {
|
|
18575
18587
|
_this.user = u;
|
|
18576
18588
|
});
|
|
18589
|
+
this.channelConfigService.channelConfig$.subscribe(function (channel) {
|
|
18590
|
+
var _a, _b, _c, _d;
|
|
18591
|
+
_this.hideDiscounts = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hideDiscounts, (_b !== null && _b !== void 0 ? _b : false));
|
|
18592
|
+
_this.hideTaxes = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideTaxes, (_d !== null && _d !== void 0 ? _d : false));
|
|
18593
|
+
});
|
|
18577
18594
|
};
|
|
18578
18595
|
SidebarEcComponent.prototype.redirectDetailProduct = function (product) {
|
|
18579
18596
|
var variant = product.variants[0];
|
|
@@ -18595,7 +18612,8 @@
|
|
|
18595
18612
|
{ type: Constants },
|
|
18596
18613
|
{ type: AuthService },
|
|
18597
18614
|
{ type: router.Router },
|
|
18598
|
-
{ type: ToastService }
|
|
18615
|
+
{ type: ToastService },
|
|
18616
|
+
{ type: ChannelConfigService }
|
|
18599
18617
|
]; };
|
|
18600
18618
|
SidebarEcComponent = __decorate$1$([
|
|
18601
18619
|
core.Component({
|