@wizishop/angular-components 0.0.162 → 0.0.164
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/angular-components.scss +4581 -4554
- package/bundles/wizishop-angular-components.umd.js +16 -2
- package/bundles/wizishop-angular-components.umd.js.map +1 -1
- package/bundles/wizishop-angular-components.umd.min.js +1 -1
- package/bundles/wizishop-angular-components.umd.min.js.map +1 -1
- package/esm2015/lib/components/mosaic/mosaic.component.js +17 -3
- package/fesm2015/wizishop-angular-components.js +16 -2
- package/fesm2015/wizishop-angular-components.js.map +1 -1
- package/lib/components/mosaic/mosaic.component.d.ts +4 -0
- package/package.json +1 -1
- package/wizishop-angular-components-0.0.164.tgz +0 -0
- package/wizishop-angular-components.metadata.json +1 -1
- package/wizishop-angular-components-0.0.162.tgz +0 -0
|
@@ -4381,14 +4381,28 @@
|
|
|
4381
4381
|
this.isLoading = true;
|
|
4382
4382
|
}
|
|
4383
4383
|
MosaicComponent.prototype.ngOnInit = function () {
|
|
4384
|
+
if (this.items) {
|
|
4385
|
+
var splitItems = this.sliceIntoChunks(this.items, (this.items.length / 3));
|
|
4386
|
+
this.columnLeft = splitItems[0];
|
|
4387
|
+
this.columnCenter = splitItems[1];
|
|
4388
|
+
this.columnRight = splitItems[2];
|
|
4389
|
+
}
|
|
4390
|
+
this.isLoading = false;
|
|
4391
|
+
};
|
|
4392
|
+
MosaicComponent.prototype.sliceIntoChunks = function (arr, chunkSize) {
|
|
4393
|
+
var res = [];
|
|
4394
|
+
for (var i = 0; i < arr.length; i += chunkSize) {
|
|
4395
|
+
var chunk = arr.slice(i, i + chunkSize);
|
|
4396
|
+
res.push(chunk);
|
|
4397
|
+
}
|
|
4398
|
+
return res;
|
|
4384
4399
|
};
|
|
4385
4400
|
return MosaicComponent;
|
|
4386
4401
|
}());
|
|
4387
4402
|
MosaicComponent.decorators = [
|
|
4388
4403
|
{ type: i0.Component, args: [{
|
|
4389
4404
|
selector: 'wac-mosaic',
|
|
4390
|
-
template: "<div class=\"wac-mosaic__loader\" *ngIf=\"isLoading\">\n <wac-loader></wac-loader>\n</div>\n<div class=\"wac-mosaic\" *ngIf=\"!isLoading\">\n <div class=\"wac-mosaic__wrapper\">\n <div class=\"wac-mosaic__wrapper__column\"
|
|
4391
|
-
styles: [".wac-mosaic__loader{min-height:400px;width:100%;display:flex;justify-content:center;align-items:center}"]
|
|
4405
|
+
template: "<div class=\"wac-mosaic__loader\" *ngIf=\"isLoading\">\n <wac-loader></wac-loader>\n</div>\n<div class=\"wac-mosaic\" *ngIf=\"!isLoading\">\n <div class=\"wac-mosaic__wrapper\">\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"columnLeft\">\n <div class=\"wac-mosaic__wrapper__column__item\" *ngFor=\"let img of columnLeft; let i = index;\">\n <img [src]=\"img\" />\n </div>\n </div>\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"columnCenter\" >\n <div class=\"wac-mosaic__wrapper__column__item\" *ngFor=\"let img of columnCenter; let i = index;\">\n <img [src]=\"img\" />\n </div>\n </div>\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"columnRight\">\n <div class=\"wac-mosaic__wrapper__column__item\" *ngFor=\"let img of columnRight; let i = index;\">\n <img [src]=\"img\" />\n </div>\n </div>\n </div>\n</div>\n"
|
|
4392
4406
|
},] }
|
|
4393
4407
|
];
|
|
4394
4408
|
MosaicComponent.ctorParameters = function () { return []; };
|