monkey-front-components 0.0.311 → 0.0.314
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/esm2020/lib/components/shared/products/products.component.mjs +5 -3
- package/fesm2015/monkey-front-components.mjs +4 -2
- package/fesm2015/monkey-front-components.mjs.map +1 -1
- package/fesm2020/monkey-front-components.mjs +4 -2
- package/fesm2020/monkey-front-components.mjs.map +1 -1
- package/lib/components/shared/products/products.component.d.ts +1 -0
- package/monkey-front-components-0.0.314.tgz +0 -0
- package/package.json +3 -3
- package/monkey-front-components-0.0.311.tgz +0 -0
|
@@ -2675,6 +2675,7 @@ class MECXProductsComponent extends BaseComponent {
|
|
|
2675
2675
|
this.tokenStorage = tokenStorage;
|
|
2676
2676
|
this.onAccess = new EventEmitter();
|
|
2677
2677
|
this._filter = '';
|
|
2678
|
+
this._hasMoreProducts = false;
|
|
2678
2679
|
}
|
|
2679
2680
|
onImgError(img) {
|
|
2680
2681
|
const index = Math.floor(Math.random() * (6 - 1 + 1)) + 1;
|
|
@@ -2708,6 +2709,7 @@ class MECXProductsComponent extends BaseComponent {
|
|
|
2708
2709
|
const products = programs.map(({ product }) => {
|
|
2709
2710
|
return product;
|
|
2710
2711
|
}).filter(onlyUnique);
|
|
2712
|
+
this._hasMoreProducts = (products?.length || 0) > 1;
|
|
2711
2713
|
this._products = Object.entries(products).map(([key, value]) => {
|
|
2712
2714
|
const found = programs.filter(({ product }) => {
|
|
2713
2715
|
return `${product}` === `${value}`;
|
|
@@ -2741,10 +2743,10 @@ class MECXProductsComponent extends BaseComponent {
|
|
|
2741
2743
|
}
|
|
2742
2744
|
}
|
|
2743
2745
|
MECXProductsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MECXProductsComponent, deps: [{ token: i1$4.MonkeyEcxTokenStorageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2744
|
-
MECXProductsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: MECXProductsComponent, selector: "mecx-products", outputs: { onAccess: "onAccess" }, usesInheritance: true, ngImport: i0, template: "<mecx-products-filter (onChangeFilter)=\"onHandleChangeFilter($event)\"></mecx-products-filter>\r\n<div class=\"products-list\">\r\n <div *ngFor=\"let product of _filteredProducts\" class=\"product\">\r\n <span class=\"title\">{{ 'PRODUCTS.'+product.name | translate }}</span>\r\n <div class=\"items\">\r\n <div *ngFor=\"let item of product.items\" class=\"item\"\r\n (click)=\"onAccess.next(item)\">\r\n <div class=\"icon\">\r\n <img [src]=\"item.logo\" #img (error)=\"onImgError(img)\">\r\n </div>\r\n <span class=\"name\">{{ item.name }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{display:flex;flex-direction:column;overflow:hidden}:host .products-list{display:flex;flex-direction:column;overflow:auto}:host .product{display:flex;flex-direction:column}:host .product .title{font-style:normal;font-weight:600;font-size:24px;line-height:32px;letter-spacing:.04em;color:#4b4a53;margin:32px 0}:host .product .items{display:grid;grid-template-columns:repeat(2,1fr);grid-column-gap:10px;grid-row-gap:10px}:host .product .items .item{cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100px;padding:12px}:host .product .items .item .icon{margin:12px 0}:host .product .items .item .icon img{width:100%;max-width:140px}:host .product .items .item .icon .no-image{width:52px;height:52px}:host .product .items .item .name{font-style:normal;font-weight:400;font-size:18px;line-height:24px;color:#72717e;margin-top:8px}:host .product .items .item:hover{box-shadow:0 25px 52px 8px #eaeaeae0}\n"], components: [{ type: MECXProductsFilterComponent, selector: "mecx-products-filter", inputs: ["isLoading"], outputs: ["onChangeFilter"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1$3.TranslatePipe } });
|
|
2746
|
+
MECXProductsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: MECXProductsComponent, selector: "mecx-products", outputs: { onAccess: "onAccess" }, usesInheritance: true, ngImport: i0, template: "<mecx-products-filter (onChangeFilter)=\"onHandleChangeFilter($event)\"></mecx-products-filter>\r\n<div class=\"products-list\">\r\n <div *ngFor=\"let product of _filteredProducts\" class=\"product\">\r\n <span class=\"title\" *ngIf=\"_hasMoreProducts\">{{ 'PRODUCTS.'+product.name | translate }}</span>\r\n <div class=\"items\">\r\n <div *ngFor=\"let item of product.items\" class=\"item\"\r\n (click)=\"onAccess.next(item)\">\r\n <div class=\"icon\">\r\n <img [src]=\"item.logo\" #img (error)=\"onImgError(img)\">\r\n </div>\r\n <span class=\"name\">{{ item.name }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{display:flex;flex-direction:column;overflow:hidden}:host .products-list{display:flex;flex-direction:column;overflow:auto}:host .product{display:flex;flex-direction:column}:host .product .title{font-style:normal;font-weight:600;font-size:24px;line-height:32px;letter-spacing:.04em;color:#4b4a53;margin:32px 0}:host .product .items{display:grid;grid-template-columns:repeat(2,1fr);grid-column-gap:10px;grid-row-gap:10px}:host .product .items .item{cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100px;padding:12px}:host .product .items .item .icon{margin:12px 0}:host .product .items .item .icon img{width:100%;max-width:140px}:host .product .items .item .icon .no-image{width:52px;height:52px}:host .product .items .item .name{font-style:normal;font-weight:400;font-size:18px;line-height:24px;color:#72717e;margin-top:8px}:host .product .items .item:hover{box-shadow:0 25px 52px 8px #eaeaeae0}\n"], components: [{ type: MECXProductsFilterComponent, selector: "mecx-products-filter", inputs: ["isLoading"], outputs: ["onChangeFilter"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1$3.TranslatePipe } });
|
|
2745
2747
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MECXProductsComponent, decorators: [{
|
|
2746
2748
|
type: Component,
|
|
2747
|
-
args: [{ selector: 'mecx-products', template: "<mecx-products-filter (onChangeFilter)=\"onHandleChangeFilter($event)\"></mecx-products-filter>\r\n<div class=\"products-list\">\r\n <div *ngFor=\"let product of _filteredProducts\" class=\"product\">\r\n <span class=\"title\">{{ 'PRODUCTS.'+product.name | translate }}</span>\r\n <div class=\"items\">\r\n <div *ngFor=\"let item of product.items\" class=\"item\"\r\n (click)=\"onAccess.next(item)\">\r\n <div class=\"icon\">\r\n <img [src]=\"item.logo\" #img (error)=\"onImgError(img)\">\r\n </div>\r\n <span class=\"name\">{{ item.name }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{display:flex;flex-direction:column;overflow:hidden}:host .products-list{display:flex;flex-direction:column;overflow:auto}:host .product{display:flex;flex-direction:column}:host .product .title{font-style:normal;font-weight:600;font-size:24px;line-height:32px;letter-spacing:.04em;color:#4b4a53;margin:32px 0}:host .product .items{display:grid;grid-template-columns:repeat(2,1fr);grid-column-gap:10px;grid-row-gap:10px}:host .product .items .item{cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100px;padding:12px}:host .product .items .item .icon{margin:12px 0}:host .product .items .item .icon img{width:100%;max-width:140px}:host .product .items .item .icon .no-image{width:52px;height:52px}:host .product .items .item .name{font-style:normal;font-weight:400;font-size:18px;line-height:24px;color:#72717e;margin-top:8px}:host .product .items .item:hover{box-shadow:0 25px 52px 8px #eaeaeae0}\n"] }]
|
|
2749
|
+
args: [{ selector: 'mecx-products', template: "<mecx-products-filter (onChangeFilter)=\"onHandleChangeFilter($event)\"></mecx-products-filter>\r\n<div class=\"products-list\">\r\n <div *ngFor=\"let product of _filteredProducts\" class=\"product\">\r\n <span class=\"title\" *ngIf=\"_hasMoreProducts\">{{ 'PRODUCTS.'+product.name | translate }}</span>\r\n <div class=\"items\">\r\n <div *ngFor=\"let item of product.items\" class=\"item\"\r\n (click)=\"onAccess.next(item)\">\r\n <div class=\"icon\">\r\n <img [src]=\"item.logo\" #img (error)=\"onImgError(img)\">\r\n </div>\r\n <span class=\"name\">{{ item.name }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{display:flex;flex-direction:column;overflow:hidden}:host .products-list{display:flex;flex-direction:column;overflow:auto}:host .product{display:flex;flex-direction:column}:host .product .title{font-style:normal;font-weight:600;font-size:24px;line-height:32px;letter-spacing:.04em;color:#4b4a53;margin:32px 0}:host .product .items{display:grid;grid-template-columns:repeat(2,1fr);grid-column-gap:10px;grid-row-gap:10px}:host .product .items .item{cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100px;padding:12px}:host .product .items .item .icon{margin:12px 0}:host .product .items .item .icon img{width:100%;max-width:140px}:host .product .items .item .icon .no-image{width:52px;height:52px}:host .product .items .item .name{font-style:normal;font-weight:400;font-size:18px;line-height:24px;color:#72717e;margin-top:8px}:host .product .items .item:hover{box-shadow:0 25px 52px 8px #eaeaeae0}\n"] }]
|
|
2748
2750
|
}], ctorParameters: function () { return [{ type: i1$4.MonkeyEcxTokenStorageService }]; }, propDecorators: { onAccess: [{
|
|
2749
2751
|
type: Output
|
|
2750
2752
|
}] } });
|