@wizishop/angular-components 0.0.167 → 0.0.168
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 +5725 -5725
- package/assets/i18n/en.json +1 -1
- package/assets/i18n/fr.json +1 -1
- package/bundles/wizishop-angular-components.umd.js +34 -24
- 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 +31 -25
- package/fesm2015/wizishop-angular-components.js +29 -23
- package/fesm2015/wizishop-angular-components.js.map +1 -1
- package/lib/components/mosaic/mosaic.component.d.ts +18 -12
- package/package.json +1 -1
- package/wizishop-angular-components-0.0.168.tgz +0 -0
- package/wizishop-angular-components.metadata.json +1 -1
- package/wizishop-angular-components-0.0.167.tgz +0 -0
package/assets/i18n/en.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"wac.datatable.noresult":"There are no results for this search","wac.input.progressbar.information.good":"Very good","wac.input.progressbar.information.too.long":"Too long","wac.input.progressbar.information.too.short":"Too short","wac.PaginationComponent.on":"{{low}}-{{high}} of {{total}}","wac.PaginationComponent.page":"Go to page","wac.simpleSearchComponent.error":"The search field is compulsory"}
|
|
1
|
+
{"wac.datatable.noresult":"There are no results for this search","wac.input.progressbar.information.good":"Very good","wac.input.progressbar.information.too.long":"Too long","wac.input.progressbar.information.too.short":"Too short","wac.MosaicComponent.import":"Import","wac.PaginationComponent.on":"{{low}}-{{high}} of {{total}}","wac.PaginationComponent.page":"Go to page","wac.simpleSearchComponent.error":"The search field is compulsory"}
|
package/assets/i18n/fr.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"wac.datatable.noresult":"Il n'y a aucun résultat pour cette recherche","wac.input.progressbar.information.good":"Très bien","wac.input.progressbar.information.too.long":"Trop long","wac.input.progressbar.information.too.short":"Trop court","wac.PaginationComponent.on":"{{low}}-{{high}} sur {{total}}","wac.PaginationComponent.page":"Aller à la page","wac.simpleSearchComponent.error":"Le champ de recherche est obligatoire"}
|
|
1
|
+
{"wac.datatable.noresult":"Il n'y a aucun résultat pour cette recherche","wac.input.progressbar.information.good":"Très bien","wac.input.progressbar.information.too.long":"Trop long","wac.input.progressbar.information.too.short":"Trop court","wac.MosaicComponent.import":"Importer","wac.PaginationComponent.on":"{{low}}-{{high}} sur {{total}}","wac.PaginationComponent.page":"Aller à la page","wac.simpleSearchComponent.error":"Le champ de recherche est obligatoire"}
|
|
@@ -4389,43 +4389,53 @@
|
|
|
4389
4389
|
|
|
4390
4390
|
var MosaicComponent = /** @class */ (function () {
|
|
4391
4391
|
function MosaicComponent() {
|
|
4392
|
-
this.
|
|
4393
|
-
this.
|
|
4392
|
+
this._imagesList = [];
|
|
4393
|
+
this.isLoading = false;
|
|
4394
|
+
this.numberOfColumn = 3;
|
|
4395
|
+
this.importImageSrc = new i0.EventEmitter();
|
|
4394
4396
|
}
|
|
4395
|
-
MosaicComponent.prototype
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
this.
|
|
4397
|
+
Object.defineProperty(MosaicComponent.prototype, "imagesList", {
|
|
4398
|
+
get: function () {
|
|
4399
|
+
return this._imagesList;
|
|
4400
|
+
},
|
|
4401
|
+
set: function (imagesList) {
|
|
4402
|
+
this._imagesList = imagesList;
|
|
4403
|
+
this.generateColumns();
|
|
4404
|
+
},
|
|
4405
|
+
enumerable: false,
|
|
4406
|
+
configurable: true
|
|
4407
|
+
});
|
|
4408
|
+
MosaicComponent.prototype.generateColumns = function () {
|
|
4409
|
+
this.columns = this.sliceIntoChunks();
|
|
4410
|
+
};
|
|
4411
|
+
MosaicComponent.prototype.sliceIntoChunks = function () {
|
|
4412
|
+
var columns = [];
|
|
4413
|
+
var numberOfImagePerColumn = this.imagesList.length / this.numberOfColumn;
|
|
4414
|
+
for (var i = 0; i < this.imagesList.length; i += numberOfImagePerColumn) {
|
|
4415
|
+
var chunk = this.imagesList.slice(i, i + numberOfImagePerColumn);
|
|
4416
|
+
columns.push(chunk);
|
|
4401
4417
|
}
|
|
4402
|
-
|
|
4418
|
+
return columns;
|
|
4403
4419
|
};
|
|
4404
|
-
MosaicComponent.prototype.
|
|
4405
|
-
this.
|
|
4406
|
-
};
|
|
4407
|
-
MosaicComponent.prototype.sliceIntoChunks = function (arr, chunkSize) {
|
|
4408
|
-
var res = [];
|
|
4409
|
-
for (var i = 0; i < arr.length; i += chunkSize) {
|
|
4410
|
-
var chunk = arr.slice(i, i + chunkSize);
|
|
4411
|
-
res.push(chunk);
|
|
4412
|
-
}
|
|
4413
|
-
return res;
|
|
4420
|
+
MosaicComponent.prototype.onImportImage = function (src) {
|
|
4421
|
+
this.importImageSrc.emit(src);
|
|
4414
4422
|
};
|
|
4415
4423
|
return MosaicComponent;
|
|
4416
4424
|
}());
|
|
4417
4425
|
MosaicComponent.decorators = [
|
|
4418
4426
|
{ type: i0.Component, args: [{
|
|
4419
4427
|
selector: 'wac-mosaic',
|
|
4420
|
-
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\" *
|
|
4428
|
+
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\" *ngFor=\"let column of columns\">\n <div class=\"wac-mosaic__wrapper__column__image\" *ngFor=\"let image of column; let i = index;\">\n <img [src]=\"image.src\" [alt]=\"image.alt\"/>\n <div class=\"hover\">\n <ng-container\n [ngTemplateOutlet]=\"importButtonTemplate || defaultImportButton\"\n [ngTemplateOutletContext]=\"{ $implicit: image }\"\n >\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #defaultImportButton let-image>\n <wac-button [icon]=\"'fa-solid fa-image'\" [label]=\"'wac.MosaicComponent.import' | translate\" [extraClasses]=\"'is-success'\" (click)=\"onImportImage(image.src)\"></wac-button>\n</ng-template>\n",
|
|
4429
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
4421
4430
|
},] }
|
|
4422
4431
|
];
|
|
4423
4432
|
MosaicComponent.ctorParameters = function () { return []; };
|
|
4424
4433
|
MosaicComponent.propDecorators = {
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4434
|
+
imagesList: [{ type: i0.Input }],
|
|
4435
|
+
isLoading: [{ type: i0.Input }],
|
|
4436
|
+
numberOfColumn: [{ type: i0.Input }],
|
|
4437
|
+
importButtonTemplate: [{ type: i0.Input }],
|
|
4438
|
+
importImageSrc: [{ type: i0.Output }]
|
|
4429
4439
|
};
|
|
4430
4440
|
|
|
4431
4441
|
var components = [
|