@wizishop/img-manager 15.2.39 → 15.2.41

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.
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, inject, Component, ViewEncapsulation, Input, EventEmitter, Directive, Output, HostBinding, HostListener, ViewChild, Pipe, Inject, NgModule } from '@angular/core';
3
- import { BehaviorSubject, Subject, tap, Observable, forkJoin, of, delay, combineLatest } from 'rxjs';
4
- import { take, map, takeUntil, debounceTime, distinctUntilChanged, tap as tap$1 } from 'rxjs/operators';
3
+ import { BehaviorSubject, Subject, tap, Observable, forkJoin, merge, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, switchMap, map as map$1, take as take$1, startWith, shareReplay, combineLatest } from 'rxjs';
4
+ import { take, map, takeUntil, debounceTime, distinctUntilChanged, tap as tap$1, filter } from 'rxjs/operators';
5
5
  import * as i1 from '@wizishop/ng-wizi-bulma';
6
6
  import { NwbAllModule } from '@wizishop/ng-wizi-bulma';
7
7
  import * as i3 from '@ngx-translate/core';
@@ -835,7 +835,6 @@ class PexelLibComponent {
835
835
  this.searchValue = '';
836
836
  /** Pass to true to hide search input */
837
837
  this.disableSearch = false;
838
- this.showImgUploaded = new EventEmitter();
839
838
  this.perPage = 30;
840
839
  this.searchUpdated = new Subject();
841
840
  this.nbResult = 0;
@@ -984,7 +983,7 @@ class PexelLibComponent {
984
983
  }
985
984
  }
986
985
  PexelLibComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PexelLibComponent, deps: [{ token: PexelsService }, { token: AlertService }, { token: i3.TranslateService }, { token: UploadService }], target: i0.ɵɵFactoryTarget.Component });
987
- PexelLibComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: PexelLibComponent, selector: "pexels-lib", inputs: { stateDisplayed: "stateDisplayed", searchValue: "searchValue", disableSearch: "disableSearch" }, outputs: { showImgUploaded: "showImgUploaded" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["outerElement"], descendants: true }], ngImport: i0, template: "<div class=\"pexels-lib\" #outerElement [@easeInOut]=\"'in'\">\n\n <ng-scrollbar\n [reachedOffset]=\"300\"\n class=\"pexels-lib__scroll\"\n [ngClass]=\"{\n 'pexels-lib__scroll--smallDisplay': stateDisplayed === 'small',\n 'pexels-lib__scroll--noResult': !nbResult,\n 'pexels-lib__scroll--hide': (!nbResult && disableSearch)\n }\"\n (reachedBottom)=\"onBottomReached()\"\n >\n <div\n *ngIf=\"!disableSearch\"\n class=\"pexels-lib__search\"\n [ngClass]=\"{'pexels-lib__search--smallDisplay': stateDisplayed === 'small'}\"\n >\n <wz-input-search\n [(ngModel)]=\"searchValue\"\n [placeholder]=\"'ImgManager.SearchBar.placeholder' | translate\"\n (changeDebounced)=\"onSearchNameChanged()\"\n [smallPadding]=\"stateDisplayed === 'small'\">\n </wz-input-search>\n </div>\n\n <div *ngIf=\"!initComponent\" class=\"pexels-lib__wrapper\">\n <p *ngIf=\"nbResult\" class=\"pexels-lib__wrapper__result-nb\">{{ 'ImgManager.PexelLib.nbImgFound' | translate }} : {{ nbResult }}</p>\n\n <div class=\"pexels-lib__wrapper__result\">\n\n <div *ngFor=\"let photosColumn of photosColumns; let indexCol = index;\" class=\"pexels-lib__wrapper__result__column\" [@listAnimation]=\"photosColumn.photos.length\">\n <div *ngFor=\"let photo of photosColumn.photos; let indexPhoto = index;\" class=\"pexels-lib__wrapper__result__column__element\">\n\n <img [alt]=\"photo.src.medium\" [src]=\"photo.src.medium\"\n class=\"pexels-lib__wrapper__result__column__element__img\"/>\n\n <div class=\"pexels-lib__wrapper__result__column__element__wrapper\">\n <span class=\"pexels-lib__wrapper__result__column__element__wrapper__infos\">\n {{ photo.width }} x {{ photo.height}}\n </span>\n\n <div class=\"dropdown is-up\" [ngClass]=\"{'is-hoverable': !photo.uploading}\">\n <div class=\"dropdown-trigger\">\n <button\n type=\"button\"\n class=\"button pexels-lib__wrapper__result__column__element__wrapper__button\"\n aria-haspopup=\"true\"\n aria-controls=\"dropdown-menu\">\n\n <div *ngIf=\"!photo.uploading\" (click)=\"uploadPhoto(photo, photo.src.large2x)\">\n <span>{{ 'ImgManager.PexelLib.import' | translate }}</span>\n <span class=\"icon is-small\">\n <i class=\"fas fa-angle-up\" aria-hidden=\"true\"></i>\n </span>\n <ng-container *ngIf=\"photo.uploaded\">\n &nbsp;<i class=\"fal fa-check\"></i>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"photo.uploading\">\n {{ 'ImgManager.PexelLib.importation' | translate }}\n <span btnLoadingAnim class=\"btnLoadingAnnimation\"></span>\n </ng-container>\n\n </button>\n </div>\n <div class=\"dropdown-menu pexels-lib__wrapper__result__column__element__wrapper__dropdown\" id=\"dropdown-menu\" role=\"menu\">\n <div class=\"dropdown-content\">\n <div class=\"dropdown-content__wrapper\">\n <div class=\"dropdown-item\" (click)=\"uploadPhoto(photo, photo.src.portrait)\">\n <p>{{ 'ImgManager.PexelLib.portrait' | translate }}</p>\n <i class=\"fal fa-check iPortrait\"></i>\n </div>\n <div class=\"dropdown-item\" (click)=\"uploadPhoto(photo, photo.src.landscape)\">\n <p>{{ 'ImgManager.PexelLib.landscape' | translate }}</p>\n <i class=\"fal fa-check iLandscape\"></i>\n </div>\n <div class=\"dropdown-item\" (click)=\"uploadPhoto(photo, photo.src.large2x)\">\n <p>{{ 'ImgManager.PexelLib.original' | translate }}</p>\n <i class=\"fal fa-check iOriginal\"></i>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n </div>\n </div>\n </div>\n\n </ng-scrollbar>\n\n <ng-container *ngIf=\"isLoading\">\n <wz-loader></wz-loader>\n </ng-container>\n <div\n *ngIf=\"!isLoading && !nbResult\"\n class=\"pexels-lib__alert\"\n [@easeInOut]=\"'in'\">\n <wz-alert [warning]=\"true\">\n {{ 'ImgManager.PexelLib.noResult' | translate }}\n </wz-alert>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.NgScrollbar, selector: "ng-scrollbar", inputs: ["disabled", "sensorDisabled", "pointerEventsDisabled", "viewportPropagateMouseMove", "autoHeightDisabled", "autoWidthDisabled", "viewClass", "trackClass", "thumbClass", "minThumbSize", "trackClickScrollDuration", "pointerEventsMethod", "track", "visibility", "appearance", "position", "sensorDebounce", "scrollAuditTime"], outputs: ["updated"], exportAs: ["ngScrollbar"] }, { kind: "directive", type: i8.NgScrollbarReachedBottom, selector: "[reachedBottom], [reached-bottom]", outputs: ["reachedBottom"] }, { kind: "component", type: LoaderComponent, selector: "wz-loader", inputs: ["text", "small", "position"] }, { kind: "component", type: InputSearchComponent, selector: "wz-input-search", inputs: ["placeholder", "smallPadding", "id"], outputs: ["changeDebounced"] }, { kind: "component", type: AlertComponent, selector: "wz-alert", inputs: ["icon", "warning", "success", "iconClass"] }, { kind: "directive", type: LoadingDirective, selector: "[btnLoadingAnim]" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], animations: [
986
+ PexelLibComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: PexelLibComponent, selector: "pexels-lib", inputs: { stateDisplayed: "stateDisplayed", searchValue: "searchValue", disableSearch: "disableSearch" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["outerElement"], descendants: true }], ngImport: i0, template: "<div class=\"pexels-lib\" #outerElement [@easeInOut]=\"'in'\">\n\n <ng-scrollbar\n [reachedOffset]=\"300\"\n class=\"pexels-lib__scroll\"\n [ngClass]=\"{\n 'pexels-lib__scroll--smallDisplay': stateDisplayed === 'small',\n 'pexels-lib__scroll--noResult': !nbResult,\n 'pexels-lib__scroll--hide': (!nbResult && disableSearch)\n }\"\n (reachedBottom)=\"onBottomReached()\"\n >\n <div\n *ngIf=\"!disableSearch\"\n class=\"pexels-lib__search\"\n [ngClass]=\"{'pexels-lib__search--smallDisplay': stateDisplayed === 'small'}\"\n >\n <wz-input-search\n [(ngModel)]=\"searchValue\"\n [placeholder]=\"'ImgManager.SearchBar.placeholder' | translate\"\n (changeDebounced)=\"onSearchNameChanged()\"\n [smallPadding]=\"stateDisplayed === 'small'\">\n </wz-input-search>\n </div>\n\n <div *ngIf=\"!initComponent\" class=\"pexels-lib__wrapper\">\n <p *ngIf=\"nbResult\" class=\"pexels-lib__wrapper__result-nb\">{{ 'ImgManager.PexelLib.nbImgFound' | translate }} : {{ nbResult }}</p>\n\n <div class=\"pexels-lib__wrapper__result\">\n\n <div *ngFor=\"let photosColumn of photosColumns; let indexCol = index;\" class=\"pexels-lib__wrapper__result__column\" [@listAnimation]=\"photosColumn.photos.length\">\n <div *ngFor=\"let photo of photosColumn.photos; let indexPhoto = index;\" class=\"pexels-lib__wrapper__result__column__element\">\n\n <img [alt]=\"photo.src.medium\" [src]=\"photo.src.medium\"\n class=\"pexels-lib__wrapper__result__column__element__img\"/>\n\n <div class=\"pexels-lib__wrapper__result__column__element__wrapper\">\n <span class=\"pexels-lib__wrapper__result__column__element__wrapper__infos\">\n {{ photo.width }} x {{ photo.height}}\n </span>\n\n <div class=\"dropdown is-up\" [ngClass]=\"{'is-hoverable': !photo.uploading}\">\n <div class=\"dropdown-trigger\">\n <button\n type=\"button\"\n class=\"button pexels-lib__wrapper__result__column__element__wrapper__button\"\n aria-haspopup=\"true\"\n aria-controls=\"dropdown-menu\">\n\n <div *ngIf=\"!photo.uploading\" (click)=\"uploadPhoto(photo, photo.src.large2x)\">\n <span>{{ 'ImgManager.PexelLib.import' | translate }}</span>\n <span class=\"icon is-small\">\n <i class=\"fas fa-angle-up\" aria-hidden=\"true\"></i>\n </span>\n <ng-container *ngIf=\"photo.uploaded\">\n &nbsp;<i class=\"fal fa-check\"></i>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"photo.uploading\">\n {{ 'ImgManager.PexelLib.importation' | translate }}\n <span btnLoadingAnim class=\"btnLoadingAnnimation\"></span>\n </ng-container>\n\n </button>\n </div>\n <div class=\"dropdown-menu pexels-lib__wrapper__result__column__element__wrapper__dropdown\" id=\"dropdown-menu\" role=\"menu\">\n <div class=\"dropdown-content\">\n <div class=\"dropdown-content__wrapper\">\n <div class=\"dropdown-item\" (click)=\"uploadPhoto(photo, photo.src.portrait)\">\n <p>{{ 'ImgManager.PexelLib.portrait' | translate }}</p>\n <i class=\"fal fa-check iPortrait\"></i>\n </div>\n <div class=\"dropdown-item\" (click)=\"uploadPhoto(photo, photo.src.landscape)\">\n <p>{{ 'ImgManager.PexelLib.landscape' | translate }}</p>\n <i class=\"fal fa-check iLandscape\"></i>\n </div>\n <div class=\"dropdown-item\" (click)=\"uploadPhoto(photo, photo.src.large2x)\">\n <p>{{ 'ImgManager.PexelLib.original' | translate }}</p>\n <i class=\"fal fa-check iOriginal\"></i>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n </div>\n </div>\n </div>\n\n </ng-scrollbar>\n\n <ng-container *ngIf=\"isLoading\">\n <wz-loader></wz-loader>\n </ng-container>\n <div\n *ngIf=\"!isLoading && !nbResult\"\n class=\"pexels-lib__alert\"\n [@easeInOut]=\"'in'\">\n <wz-alert [warning]=\"true\">\n {{ 'ImgManager.PexelLib.noResult' | translate }}\n </wz-alert>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.NgScrollbar, selector: "ng-scrollbar", inputs: ["disabled", "sensorDisabled", "pointerEventsDisabled", "viewportPropagateMouseMove", "autoHeightDisabled", "autoWidthDisabled", "viewClass", "trackClass", "thumbClass", "minThumbSize", "trackClickScrollDuration", "pointerEventsMethod", "track", "visibility", "appearance", "position", "sensorDebounce", "scrollAuditTime"], outputs: ["updated"], exportAs: ["ngScrollbar"] }, { kind: "directive", type: i8.NgScrollbarReachedBottom, selector: "[reachedBottom], [reached-bottom]", outputs: ["reachedBottom"] }, { kind: "component", type: LoaderComponent, selector: "wz-loader", inputs: ["text", "small", "position"] }, { kind: "component", type: InputSearchComponent, selector: "wz-input-search", inputs: ["placeholder", "smallPadding", "id"], outputs: ["changeDebounced"] }, { kind: "component", type: AlertComponent, selector: "wz-alert", inputs: ["icon", "warning", "success", "iconClass"] }, { kind: "directive", type: LoadingDirective, selector: "[btnLoadingAnim]" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], animations: [
988
987
  easeInOut,
989
988
  listAnnimation
990
989
  ] });
@@ -1000,8 +999,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
1000
999
  type: Input
1001
1000
  }], disableSearch: [{
1002
1001
  type: Input
1003
- }], showImgUploaded: [{
1004
- type: Output
1005
1002
  }], content: [{
1006
1003
  type: ViewChild,
1007
1004
  args: ['outerElement']
@@ -1070,6 +1067,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
1070
1067
 
1071
1068
  class ImgManagerService {
1072
1069
  constructor() {
1070
+ this.uploadService = inject(UploadService);
1073
1071
  this.params = new HttpParams().set("limit", "20").set("page", "1");
1074
1072
  // Display the img selection
1075
1073
  this.pageFicheProductConfig = {
@@ -1110,47 +1108,57 @@ class ImgManagerService {
1110
1108
  displayBtn: false
1111
1109
  };
1112
1110
  this.apiService = inject(ApiService);
1111
+ this.destroy$ = new Subject();
1112
+ this.searchImagesParameters$ = new BehaviorSubject(this.DEFAULT_SEARCH_PARAMS);
1113
+ this.refreshImageList$ = new Subject();
1114
+ this.resetImageList$ = merge(this.uploadService.imageUploaded$);
1115
+ this.isLoading$ = new BehaviorSubject(true);
1116
+ this.fetchImagesList$ = merge(this.searchImagesParameters$.pipe(debounceTime$1(800), distinctUntilChanged$1()), this.refreshImageList$.pipe(switchMap(() => this.searchImagesParameters$))).pipe(map$1((params) => this.getHttpParameters(params)), tap(() => this.isLoading$.next(true)), switchMap((params) => forkJoin({
1117
+ imageList: this.apiService.getShopImgList(params).pipe(take$1(1)),
1118
+ imageTotal: this.apiService.getShopTotalImgList(params).pipe(take$1(1))
1119
+ })), tap(() => this.isLoading$.next(false)));
1120
+ this.imageList$ = merge(this.fetchImagesList$, this.resetImageList$.pipe(tap(() => this.isLoading$.next(true)), tap(() => this.searchImagesParameters$.next(this.DEFAULT_SEARCH_PARAMS)), map$1(() => this.DEFAULT_DATA_LIST))).pipe(startWith(this.DEFAULT_DATA_LIST), shareReplay(1));
1121
+ }
1122
+ get DEFAULT_SEARCH_PARAMS() {
1123
+ return {
1124
+ limit: '30',
1125
+ page: '1',
1126
+ };
1113
1127
  }
1114
- getShopImgList(params, forceToUpdate = false) {
1115
- if (!forceToUpdate &&
1116
- params && this.previousParams && this.previousParams.limit === params.limit
1117
- && this.previousParams.page === params.page && this.shopImgList
1118
- && this.previousParams.search === params.search) {
1119
- return of(this.shopImgList).pipe(delay(0));
1120
- }
1121
- const httpParams = params ? this.resetParams(params) : undefined;
1122
- return this.apiService.getShopImgList(httpParams).pipe(tap((shopImgList) => {
1123
- this.shopImgList = shopImgList;
1124
- this.previousParams = params;
1125
- }));
1126
- ;
1127
- }
1128
- getShopTotalImgList(params) {
1129
- const httpParams = params ? this.resetParams(params) : undefined;
1130
- return this.apiService.getShopTotalImgList(httpParams);
1131
- }
1132
- getShopImg(idFile) {
1133
- return this.apiService.getShopImg(idFile);
1128
+ get DEFAULT_DATA_LIST() {
1129
+ return {
1130
+ imageList: {
1131
+ data: [],
1132
+ filter: [],
1133
+ limit: 0,
1134
+ page: 0,
1135
+ totalRecords: 0
1136
+ },
1137
+ imageTotal: 0
1138
+ };
1134
1139
  }
1135
- resetParams(params) {
1136
- this.params = new HttpParams();
1137
- this.params = this.params.set('id_file:sort', 'desc');
1140
+ getHttpParameters(params) {
1141
+ let parameters = new HttpParams();
1142
+ parameters = parameters.set('id_file:sort', 'desc');
1138
1143
  for (const param in params) {
1139
- this.params = this.params.set(param, params[param]);
1144
+ parameters = parameters.set(param, params[param]);
1140
1145
  }
1141
- if (params.search) {
1142
- this.params = this.params.set('display_name:contains', params.search);
1146
+ if (params === null || params === void 0 ? void 0 : params.search) {
1147
+ parameters = parameters.set('display_name:contains', params.search);
1143
1148
  }
1144
- return this.params;
1149
+ return parameters;
1150
+ }
1151
+ getShopImg(idFile) {
1152
+ return this.apiService.getShopImg(idFile).pipe(tap(() => this.refreshImageList$.next()));
1145
1153
  }
1146
1154
  replaceImg(imageBase64, id_file) {
1147
- return this.apiService.replaceImg(imageBase64, id_file);
1155
+ return this.apiService.replaceImg(imageBase64, id_file).pipe(tap(() => this.refreshImageList$.next()));
1148
1156
  }
1149
1157
  removeImg(id_file) {
1150
- return this.apiService.removeImg(id_file);
1158
+ return this.apiService.removeImg(id_file).pipe(tap(() => this.refreshImageList$.next()));
1151
1159
  }
1152
1160
  removeMultipleImg(id_array) {
1153
- return this.apiService.removeMultipleImg(id_array);
1161
+ return this.apiService.removeMultipleImg(id_array).pipe(tap(() => this.refreshImageList$.next()));
1154
1162
  }
1155
1163
  getImgManagerDisplayConfig(displayName) {
1156
1164
  switch (displayName) {
@@ -1176,6 +1184,10 @@ class ImgManagerService {
1176
1184
  this.simpleWithButtonOpenerConfig,
1177
1185
  ];
1178
1186
  }
1187
+ ngOnDestroy() {
1188
+ this.destroy$.next();
1189
+ this.destroy$.complete();
1190
+ }
1179
1191
  }
1180
1192
  ImgManagerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImgManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1181
1193
  ImgManagerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImgManagerService });
@@ -2075,9 +2087,6 @@ class PagniationIsLastPage {
2075
2087
  * @param itemsPerPage
2076
2088
  */
2077
2089
  transform(currentPage, totalItems, itemsPerPage) {
2078
- console.log('currentPage', currentPage);
2079
- console.log('totalItems', totalItems);
2080
- console.log('itemsPerPage', itemsPerPage);
2081
2090
  if (!(currentPage >= 0 && totalItems >= 0 && itemsPerPage >= 0)) {
2082
2091
  throw new Error('currentPage or totalItems or itemsPerPage is/are missing in PagniationIsLastPage pipe.');
2083
2092
  }
@@ -2921,7 +2930,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
2921
2930
  type: Directive,
2922
2931
  args: [{
2923
2932
  // The selector has the same name as the tableRaw selector in table.component.html
2924
- selector: '[tableRow]'
2933
+ selector: '[tableRow]',
2925
2934
  }]
2926
2935
  }], ctorParameters: function () {
2927
2936
  return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
@@ -2961,15 +2970,6 @@ class ImagesViewComponent {
2961
2970
  this.listDisplayed = false; // Display format list or mosaic
2962
2971
  this.multipleImgMode = false;
2963
2972
  this.switchDisplayWindow = new EventEmitter();
2964
- // Data filters
2965
- this.tableFilters = {
2966
- sort: undefined,
2967
- order: undefined,
2968
- searchValue: '',
2969
- totalItems: 0,
2970
- itemsPerPage: 0,
2971
- currentPage: 1
2972
- };
2973
2973
  this.widthLargeCard = 219; // Default value of a card width 199 + margin 20
2974
2974
  this.widthSmallCard = 160; // Default value of a card width 140 + margin 20
2975
2975
  this.nbFakeImg = 0;
@@ -3040,46 +3040,58 @@ class ImagesViewComponent {
3040
3040
  smallImgWidthFactor: 0.125
3041
3041
  }
3042
3042
  ];
3043
- this.searchQueryChanged = new Subject();
3044
- this.filtersChanged = new Subject();
3045
- this.picturesList = [];
3046
- this.savePictureList = [];
3047
3043
  this.nbImgToDelSelected = 0;
3048
3044
  this.disable = false; // Use to disable action during server request
3049
- this.isLoading = true;
3050
- this.isTotalRetrieved = false;
3051
3045
  this.delListImgLoader = false;
3052
3046
  this.initComponent = true;
3053
3047
  this.failLoaded = false;
3054
- this.displayPexelsResults = false; // Use when no img find by name, display img from Pexels
3055
3048
  this.confirmImgSup = false;
3056
- // Paginator Params
3057
- this.pageIndex = 0;
3058
- this.length = 0;
3059
- this.pageSize = 30; // Default value
3060
- this.pageSizeOptions = [25, 50, 100, 250];
3061
3049
  this.errorGetAllImg = 'ImgManager.ImgLib.errorGetAllImg';
3062
3050
  this.errorGetTotalImg = 'ImgManager.ImgLib.errorGetTotalImg';
3063
3051
  this.errorGetImg = 'ImgManager.ImgLib.errorGetCanvaImg';
3064
- this.msgNoImgFound = 'ImgManager.ImgLib.noImgFound';
3065
3052
  this.errorRemoveImg = 'ImgManager.ImgList.errorRemoveImg';
3053
+ this.destroy$ = new Subject();
3054
+ this.vm$ = combineLatest({
3055
+ imageSelection: this.imgSelectionService.imgSelection$,
3056
+ imageListData: this.imgManager.imageList$,
3057
+ isLoading: this.imgManager.isLoading$,
3058
+ searchImagesParameters: this.imgManager.searchImagesParameters$,
3059
+ }).pipe(map(({ imageSelection, imageListData: { imageList, imageTotal }, isLoading, searchImagesParameters }) => {
3060
+ this.initVariables(true);
3061
+ this.calculateNbImgFake(imageList.data.length);
3062
+ const picturesList = this.setSelectedProperty(imageSelection, imageList.data);
3063
+ this.renamePictureService.setPicturesList(picturesList);
3064
+ const tableFilters = this.getTableFilters(searchImagesParameters, imageTotal);
3065
+ const keepImagesDisplayed = (this.tabDisplayed === 'img-upload' && searchImagesParameters.page === '1') || (this.tabDisplayed === 'images-view' && imageList.data.length && searchImagesParameters.page === '1');
3066
+ const skipSetImagesToDisplay = !!(picturesList === null || picturesList === void 0 ? void 0 : picturesList.length) && this.tabDisplayed === 'img-upload' && searchImagesParameters.page === '1';
3067
+ const hideUntilFetchedFirstPageImagesForTabUpload = this.tabDisplayed === 'img-upload' && (searchImagesParameters.page !== '1' || (imageList === null || imageList === void 0 ? void 0 : imageList.page) !== 1);
3068
+ return {
3069
+ isLoading: hideUntilFetchedFirstPageImagesForTabUpload || !keepImagesDisplayed && isLoading,
3070
+ displayPexelsResults: !isLoading && imageTotal === 0,
3071
+ picturesList,
3072
+ imageTotal,
3073
+ tableFilters,
3074
+ skipSetImagesToDisplay
3075
+ };
3076
+ }));
3066
3077
  }
3067
- ngOnInit() {
3068
- /* if (this.maxLengthCardShow) {
3069
- this.reducePictureListMaxLength();
3070
- } */
3071
- this.setEvents();
3072
- this.imgSelectedList = this.imgSelectionService.getImgSelection();
3078
+ get searchImagesParameters$() {
3079
+ return this.imgManager.searchImagesParameters$;
3073
3080
  }
3074
- ngAfterViewInit() {
3075
- this.setNbImgToDisplay();
3076
- this._getImgList();
3077
- if (!this.savePictureList) {
3078
- this.savePictureList = this.picturesList;
3079
- }
3081
+ getTableFilters(searchImagesParameters, imageTotal) {
3082
+ return {
3083
+ sort: undefined,
3084
+ order: undefined,
3085
+ searchValue: searchImagesParameters.search,
3086
+ totalItems: imageTotal,
3087
+ itemsPerPage: parseInt(searchImagesParameters.limit),
3088
+ currentPage: parseInt(searchImagesParameters.page)
3089
+ };
3080
3090
  }
3081
- getImgList() {
3082
- this.filtersChanged.next();
3091
+ ngAfterViewInit() {
3092
+ this.vm$.pipe(take(1), filter(({ skipSetImagesToDisplay }) => !skipSetImagesToDisplay)).subscribe(({ tableFilters }) => {
3093
+ this.setNbImgToDisplay(tableFilters);
3094
+ });
3083
3095
  }
3084
3096
  /**
3085
3097
  * true : go to list display
@@ -3094,19 +3106,14 @@ class ImagesViewComponent {
3094
3106
  /**
3095
3107
  * Calcul the number of img selected for masse deletion
3096
3108
  */
3097
- onImgSelected() {
3098
- this.setNbImgToDelSelected();
3099
- }
3100
- onShowImgUploaded() {
3101
- this.searchText = null;
3102
- this.searchedValue = null;
3103
- this.getImgList();
3109
+ onImgSelected(picturesList) {
3110
+ this.setNbImgToDelSelected(picturesList);
3104
3111
  }
3105
3112
  onRenamePicture(pictureRenamed) {
3106
3113
  console.log('onRenamePicture pictureRenamed', pictureRenamed);
3107
3114
  this.renamePictureService.renamePicture(pictureRenamed);
3108
3115
  }
3109
- removeListImg() {
3116
+ removeListImg(picturesList) {
3110
3117
  if (this.disable) {
3111
3118
  return;
3112
3119
  }
@@ -3116,26 +3123,28 @@ class ImagesViewComponent {
3116
3123
  // Get the id of the img to remove
3117
3124
  // And add deleted property
3118
3125
  const idImgToRemove = [];
3119
- this.picturesList.forEach(img => {
3126
+ picturesList.forEach(img => {
3120
3127
  if (img.delSelected) {
3121
3128
  img.deleted = true;
3122
3129
  idImgToRemove.push(img.id_file);
3123
3130
  }
3124
3131
  });
3125
- this.imgManager.removeMultipleImg(idImgToRemove).subscribe(() => {
3126
- this.getImgList();
3127
- this.imgSelectionService.removeImgSelectionByIds(idImgToRemove);
3128
- }, error => {
3129
- this.getImgList();
3130
- this.alertService.openAlert(this.errorRemoveImg);
3132
+ this.imgManager.removeMultipleImg(idImgToRemove).subscribe({
3133
+ next: () => {
3134
+ this.imgSelectionService.removeImgSelectionByIds(idImgToRemove);
3135
+ },
3136
+ error: error => {
3137
+ this.imgManager.refreshImageList$.next();
3138
+ this.alertService.openAlert(this.errorRemoveImg);
3139
+ }
3131
3140
  });
3132
3141
  }
3133
- selectImgChosen() {
3142
+ selectImgChosen(picturesList) {
3134
3143
  if (this.disable) {
3135
3144
  return;
3136
3145
  }
3137
3146
  const picturesListSelected = [];
3138
- this.picturesList.map(img => {
3147
+ picturesList.map(img => {
3139
3148
  if (img.delSelected) {
3140
3149
  img.delSelected = false;
3141
3150
  img.selected = true;
@@ -3144,7 +3153,7 @@ class ImagesViewComponent {
3144
3153
  picturesListSelected.push(img);
3145
3154
  }
3146
3155
  });
3147
- this.setNbImgToDelSelected();
3156
+ this.setNbImgToDelSelected(picturesList);
3148
3157
  this.imgSelectionService.setImgSelection(picturesListSelected);
3149
3158
  }
3150
3159
  displayConfirmImgSup() {
@@ -3159,17 +3168,14 @@ class ImagesViewComponent {
3159
3168
  /**
3160
3169
  * Event emit when a img selected in order to delete
3161
3170
  */
3162
- onPicturesListChange() {
3163
- this.setNbImgToDelSelected();
3164
- }
3165
- onFiltersChange() {
3166
- this.getImgList();
3171
+ onPicturesListChange(picturesList) {
3172
+ this.setNbImgToDelSelected(picturesList);
3167
3173
  }
3168
3174
  /**
3169
3175
  * Set default number of img per page to display at the initialisation
3170
3176
  * This number is between 30 and 50
3171
3177
  */
3172
- setNbImgToDisplay() {
3178
+ setNbImgToDisplay(tableFilters) {
3173
3179
  const containerWidth = this.imgLibContainer.nativeElement.offsetWidth + 30; // + 30px -> left + right margin
3174
3180
  const scrollWidth = window.innerWidth - document.body.offsetWidth;
3175
3181
  const [maxImgWidthFactor, minImgWidthFactor] = this.getImgWidthFactors();
@@ -3177,7 +3183,7 @@ class ImagesViewComponent {
3177
3183
  const maxImgWidth = Math.ceil((containerWidth + scrollWidth) * maxImgWidthFactor);
3178
3184
  this.nbMaxImgPerLine = Math.floor(containerWidth / minImgWidth);
3179
3185
  this.nbMinImgPerLine = Math.floor((containerWidth + scrollWidth) / maxImgWidth);
3180
- this.pageSize = this.getTotalImgPerPage();
3186
+ this.searchImagesParameters$.next(this.getParams(Object.assign(Object.assign({}, tableFilters), { itemsPerPage: this.getTotalImgPerPage(), currentPage: 1 })));
3181
3187
  }
3182
3188
  getImgWidthFactors() {
3183
3189
  const screenWidth = window.innerWidth;
@@ -3208,41 +3214,26 @@ class ImagesViewComponent {
3208
3214
  }
3209
3215
  return total;
3210
3216
  }
3211
- setParams() {
3212
- var _a;
3213
- this.params = {
3214
- limit: ((_a = this.maxLengthCardShow) === null || _a === void 0 ? void 0 : _a.toString()) || (this.tableFilters.itemsPerPage ? this.tableFilters.itemsPerPage.toString() : this.pageSize.toString()),
3215
- page: this.tableFilters.currentPage.toString()
3216
- };
3217
- if (this.tableFilters.searchValue) {
3218
- this.params.search = this.tableFilters.searchValue.toString();
3219
- }
3217
+ getParams(tableFilters) {
3218
+ return Object.assign({ limit: tableFilters.itemsPerPage.toString(), page: tableFilters.currentPage.toString() }, (tableFilters.searchValue && { search: tableFilters.searchValue.toString() }));
3220
3219
  }
3221
3220
  initVariables(loadingSuccess) {
3222
3221
  this.nbImgToDelSelected = 0;
3223
3222
  this.disable = false;
3224
- this.isLoading = false;
3225
3223
  this.delListImgLoader = false;
3226
3224
  this.initComponent = false;
3227
- this.displayPexelsResults = false;
3228
3225
  this.failLoaded = !loadingSuccess;
3229
3226
  this.nbFakeImg = 0;
3230
3227
  }
3231
- selectImgSelected() {
3232
- if (!this.imgSelectedList || !this.imgSelectedList.length) {
3233
- return;
3234
- }
3235
- const idImgSlectedList = [];
3236
- this.imgSelectedList.forEach(img => idImgSlectedList.push(img.id_file));
3237
- this.picturesList.forEach(picture => {
3238
- if (idImgSlectedList.indexOf(picture.id_file) !== -1) {
3239
- picture.selected = true;
3228
+ setSelectedProperty(imgSelectedList, picturesList) {
3229
+ const picturesListSelected = JSON.parse(JSON.stringify(picturesList));
3230
+ imgSelectedList.forEach(img => {
3231
+ const selectedImg = picturesListSelected.find(picture => picture.id_file === img.id_file);
3232
+ if (selectedImg) {
3233
+ selectedImg.selected = true;
3240
3234
  }
3241
3235
  });
3242
- }
3243
- displayPexelsLib() {
3244
- this.displayPexelsResults = true;
3245
- this.alertService.openAlert(this.msgNoImgFound);
3236
+ return picturesListSelected;
3246
3237
  }
3247
3238
  /**
3248
3239
  * Set a img list in order to fill properly all the line of images displayed in mosaic.
@@ -3250,139 +3241,32 @@ class ImagesViewComponent {
3250
3241
  */
3251
3242
  calculateNbImgFake(nbImgDisplayed) {
3252
3243
  const nbImgPerLine = this.stateDisplayed === 'small' || this.tabDisplayed === 'img-upload' ? this.nbMaxImgPerLine : this.nbMinImgPerLine;
3253
- if (nbImgDisplayed % nbImgPerLine !== 0) {
3254
- this.nbFakeImg = nbImgPerLine - nbImgDisplayed % nbImgPerLine;
3244
+ if (isNaN(nbImgDisplayed % nbImgPerLine)) {
3245
+ this.nbFakeImg = 0;
3246
+ return;
3255
3247
  }
3256
- }
3257
- getImg(id_file) {
3258
- this.imgManager.getShopImg(id_file).pipe(take(1)).subscribe({
3259
- next: (picture) => {
3260
- if (!this.imgAlreadyExist(picture.id_file)) {
3261
- // check the img is not already present
3262
- this.picturesList.unshift(picture);
3263
- this.length += 1;
3264
- }
3265
- },
3266
- error: () => {
3267
- this.alertService.openAlert(this.errorGetImg);
3268
- }
3269
- });
3270
- }
3271
- imgAlreadyExist(id_file) {
3272
- for (const img of this.picturesList) {
3273
- if (img.id_file === id_file) {
3274
- return true;
3275
- }
3248
+ if (nbImgDisplayed % nbImgPerLine !== 0) {
3249
+ setTimeout(() => {
3250
+ this.nbFakeImg = nbImgPerLine - nbImgDisplayed % nbImgPerLine;
3251
+ }, 0);
3276
3252
  }
3277
- return false;
3278
3253
  }
3279
- setNbImgToDelSelected() {
3280
- this.nbImgToDelSelected = this.picturesList.filter(img => img.delSelected).length;
3254
+ setNbImgToDelSelected(picturesList) {
3255
+ this.nbImgToDelSelected = picturesList.filter(img => img.delSelected).length;
3281
3256
  if (!this.nbImgToDelSelected) {
3282
3257
  this.confirmImgSup = false;
3283
3258
  }
3284
3259
  }
3285
- setEvents() {
3286
- // Add a timer to retrieve img when the search bar or the paginator are used
3287
- this.searchQueryChanged
3288
- .pipe(debounceTime(400)) // wait 0.5 sec after the last event before emitting last event
3289
- .subscribe(data => {
3290
- this.getImgList();
3291
- });
3292
- this.filtersChanged
3293
- .pipe(debounceTime(800)) // wait 0.8 sec after the last event before emitting last event
3294
- .subscribe(data => {
3295
- this._getImgList();
3296
- });
3297
- // Reload img when img is/are removed
3298
- this.imgRemovedEvent = this.imgEventService.imgRemoved$.subscribe(id_file => {
3299
- this.getImgList();
3300
- });
3301
- // Create img from Canva
3302
- this.imgAddedEvent = this.imgEventService.getImgAddedEventListner().subscribe(id_file => {
3303
- if (id_file && !this.imgAlreadyExist(id_file)) {
3304
- this.getImg(id_file);
3305
- }
3306
- });
3307
- this.imgSelectionChange = this.imgSelectionService.imgSelection$.subscribe(imgSelection => {
3308
- if (this.listDisplayed) {
3309
- return;
3310
- }
3311
- const idFileList = [];
3312
- imgSelection.map(img => idFileList.push(img.id_file));
3313
- for (const picture of this.picturesList) {
3314
- if (idFileList.indexOf(picture.id_file) === -1) {
3315
- picture.selected = false;
3316
- }
3317
- }
3318
- });
3319
- }
3320
- _getImgList() {
3321
- this.isLoading = true;
3322
- this.displayPexelsResults = false;
3323
- this.setParams();
3324
- this.refreshTotalImgList();
3325
- const forceToUpdate = this.isLastImgRemovedInList();
3326
- this.imgManager.getShopImgList(this.params, forceToUpdate).pipe(take(1)).subscribe({
3327
- next: (data) => {
3328
- this.initVariables(true);
3329
- const nbImgDisplayed = data.data.length;
3330
- this.calculateNbImgFake(nbImgDisplayed);
3331
- this.picturesList = data.data;
3332
- this.renamePictureService.setPicturesList(this.picturesList);
3333
- this.selectImgSelected();
3334
- this.length = this.isTotalRetrieved ? this.length : data.totalRecords;
3335
- this.tableFilters.totalItems = this.isTotalRetrieved ? this.tableFilters.totalItems : data.totalRecords;
3336
- console.log('this.tableFilters.totalItems 1', this.tableFilters.totalItems);
3337
- this.tableFilters.itemsPerPage = this.tableFilters.itemsPerPage ? this.tableFilters.itemsPerPage : this.pageSize;
3338
- // Display Pexels if no result
3339
- if (data.totalRecords === 0) {
3340
- this.displayPexelsLib();
3341
- }
3342
- this.changeDetectorRef.markForCheck(); // In wizi-admin, the change detection is not working properly
3343
- },
3344
- error: error => {
3345
- this.alertService.openAlert(this.errorGetAllImg);
3346
- this.initVariables(false);
3347
- }
3348
- });
3349
- }
3350
- refreshTotalImgList() {
3351
- const searchValue = this.tableFilters.searchValue;
3352
- if (this.isTotalRetrieved && searchValue === this.previousSearchValue) {
3353
- // Keep current total result
3354
- return;
3355
- }
3356
- this.isTotalRetrieved = false;
3357
- this.imgManager.getShopTotalImgList(this.params).pipe(take(1)).subscribe({
3358
- next: total => {
3359
- this.previousSearchValue = searchValue;
3360
- this.isTotalRetrieved = true;
3361
- this.length = total;
3362
- this.tableFilters.totalItems = total;
3363
- console.log('this.tableFilters.totalItems 1', this.tableFilters.totalItems);
3364
- },
3365
- error: error => {
3366
- //this.alertService.openAlert(this.errorGetTotalImg);
3367
- this.initVariables(false);
3368
- }
3369
- });
3370
- }
3371
3260
  switchDisplayWindowMosaic() {
3372
3261
  this.switchDisplayWindow.emit(true);
3373
3262
  }
3374
- isLastImgRemovedInList() {
3375
- return this.picturesList.some(picture => picture.id_file === this.imgEventService.imgRemoved$.getValue());
3376
- }
3377
3263
  ngOnDestroy() {
3378
- this.searchQueryChanged.unsubscribe();
3379
- this.imgRemovedEvent.unsubscribe();
3380
- this.imgAddedEvent.unsubscribe();
3381
- this.imgSelectionChange.unsubscribe();
3264
+ this.destroy$.next();
3265
+ this.destroy$.complete();
3382
3266
  }
3383
3267
  }
3384
3268
  ImagesViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImagesViewComponent, deps: [{ token: ImgManagerService }, { token: ImgEventService }, { token: ImgSelectionService }, { token: AlertService }, { token: UserSettingsService }, { token: RenamePictureService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
3385
- ImagesViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ImagesViewComponent, selector: "images-view", inputs: { stateDisplayed: "stateDisplayed", tabDisplayed: "tabDisplayed", fullSize: "fullSize", maxLengthCardShow: "maxLengthCardShow", nbRowToShow: "nbRowToShow", listDisplayed: "listDisplayed", multipleImgMode: "multipleImgMode" }, outputs: { switchDisplayWindow: "switchDisplayWindow" }, viewQueries: [{ propertyName: "imgLibContainer", first: true, predicate: ["imgLibContainer"], descendants: true }], ngImport: i0, template: "<div class=\"images-view\" [ngClass]=\"{'fullSize': fullSize, 'small': stateDisplayed === 'small'}\" [@easeInOut]=\"'in'\">\n <!-- Subheader : Img number and actions btn (sup img list, switch forma display) -->\n <div\n *ngIf=\"(stateDisplayed !== 'small' || tabDisplayed === 'img-upload')\"\n class=\"images-view__container\"\n [ngClass]=\"{'images-view__container--uploadTab': tabDisplayed === 'img-upload', 'images-view__container--window': stateDisplayed === 'window'}\"\n >\n\n <div *ngIf=\"tabDisplayed !== 'img-upload'\">\n <p class=\"mainColor\" [ngClass]=\"{'images-view__container__total--hide': displayPexelsResults}\">{{ 'ImgManager.ImgLib.nbImg' | translate }} : {{length}}</p>\n </div>\n <div *ngIf=\"tabDisplayed === 'img-upload'\">\n <p class=\"mainColor\">{{ 'ImgManager.ImgLib.lastImgs' | translate }}</p>\n </div>\n\n <div class=\"field has-addons subHeaderActions\" *ngIf=\"tabDisplayed !== 'img-upload'\">\n\n <!-- For listforma : Display btn del multiple img & Confirm action -->\n <div class=\"images-view__container__boxAction\">\n\n\n <!-- Select -->\n <button\n class=\"button success images-view__container__boxAction__import\"\n @insertRemoveAnnim\n *ngIf=\"listDisplayed && nbImgToDelSelected && !confirmImgSup && !delListImgLoader && multipleImgMode\"\n (click)=\"selectImgChosen()\"\n type=\"button\"\n >\n <i class=\"fal fa-check\"></i>\n {{ 'ImgManager.ImgLib.select' | translate }} ({{nbImgToDelSelected}})\n </button>\n\n <!-- Display btn del multiple img -->\n <button\n *ngIf=\"listDisplayed && nbImgToDelSelected && !confirmImgSup\"\n (click)=\"displayConfirmImgSup()\"\n class=\"button images-view__container__boxAction__delBtn danger\"\n @insertRemoveAnnim\n type=\"button\"\n >\n <i class=\"fal fa-times\"></i>{{ 'ImgManager.ImgLib.delMlt' | translate }} ({{nbImgToDelSelected}})\n <span btnLoadingAnim *ngIf=\"delListImgLoader\" class=\"btnLoadingAnnimation\"></span>\n </button>\n\n <!-- Confirm action -->\n <div\n class=\"images-view__container__boxAction__confirmSup\"\n [ngClass]=\"{'images-view__container__boxAction__confirmSup--visible': confirmImgSup}\">\n <p *ngIf=\"nbImgToDelSelected > 1\" class=\"images-view__container__boxAction__confirmSup__text\">{{ 'ImgManager.ImgLib.confirmSupQuestions' | translate:{nbImage: nbImgToDelSelected} }}</p>\n <p *ngIf=\"nbImgToDelSelected === 1\" class=\"images-view__container__boxAction__confirmSup__text\">{{ 'ImgManager.ImgLib.confirmSupQuestion' | translate:{nbImage: nbImgToDelSelected} }}</p>\n <div>\n <button\n class=\"button images-view__container__boxAction__confirmSup__cancel\"\n (click)=\"cancelSup()\"\n type=\"button\"\n >\n {{ 'ImgManager.ImgLib.cancel' | translate }}\n </button>\n <button\n (click)=\"removeListImg()\"\n class=\"button images-view__container__delBtn danger\"\n type=\"button\"\n >\n {{ 'ImgManager.ImgLib.confirm' | translate }}\n </button>\n </div>\n </div>\n\n </div>\n\n\n <!-- Swith mosaic/list forma -->\n <div class=\"field has-addons images-view__container__buttonBox\">\n <div class=\"control\">\n <div\n class=\"button is-lighted images-view__container__buttonBox__btn\"\n [ngClass]=\"{'actifDisplayed': !listDisplayed}\"\n (click)=\"onSwitchFormatDisplayed(false)\"\n >\n <span class=\"icon is-small\">\n <i class=\"far fa-th\"></i>\n </span>\n </div>\n </div>\n\n <div class=\"control\">\n <div class=\"button is-lighted images-view__container__buttonBox__btn\"\n [ngClass]=\"{'actifDisplayed': listDisplayed}\"\n (click)=\"onSwitchFormatDisplayed(true)\"\n >\n <span class=\"icon is-small\">\n <i class=\"fas fa-bars\"></i>\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n\n <!-- Images section -->\n<ng-scrollbar\n class=\"images-view__scroll\"\n [ngClass]=\"{\n 'images-view__scroll--hide--mosaic': displayPexelsResults && !listDisplayed,\n 'images-view__scroll--hide--table': displayPexelsResults && listDisplayed,\n 'images-view__scroll--full': stateDisplayed === 'full',\n 'images-view__scroll--smallDisplay' : stateDisplayed === 'small' && tabDisplayed !== 'img-upload',\n 'images-view__scroll--smallUploadDisplay' : stateDisplayed === 'small' && tabDisplayed === 'img-upload',\n 'images-view__scroll--window': stateDisplayed === 'window'\n}\"\n>\n <div #imgLibContainer class=\"images-view__wrapper\">\n <div *ngIf=\"!listDisplayed || stateDisplayed === 'small'\" [@easeInOut]=\"'in'\">\n <mosaic-view\n [picturesList]=\"picturesList\"\n (picturesListChange)=\"onPicturesListChange()\"\n [tableFilters]=\"tableFilters\"\n (filtersChange)=\"onFiltersChange()\"\n [(disable)]=\"disable\"\n (pictureNameChange)=\"onRenamePicture($event)\"\n (switchDisplayWindow)=\"switchDisplayWindowMosaic()\"\n [nbFakeImg]=\"nbFakeImg\"\n [stateDisplayed]=\"stateDisplayed\"\n [tabDisplayed]=\"tabDisplayed\"\n [displayPexelsResults]=\"displayPexelsResults\"\n [isLoading]=\"isLoading\"\n [fullSize]=\"fullSize\"\n >\n </mosaic-view>\n </div>\n\n <div *ngIf=\"listDisplayed && stateDisplayed !== 'small'\" [@easeInOut]=\"'in'\">\n <table-view\n [picturesList]=\"picturesList\"\n (picturesListChange)=\"onPicturesListChange()\"\n [tableFilters]=\"tableFilters\"\n (filtersChange)=\"onFiltersChange()\"\n [(disable)]=\"disable\"\n (pictureNameChange)=\"onRenamePicture($event)\"\n [displayPexelsResults]=\"displayPexelsResults\"\n [stateDisplayed]=\"stateDisplayed\"\n [isLoading]=\"isLoading\"\n >\n </table-view>\n </div>\n\n </div>\n</ng-scrollbar>\n\n<!-- Pexels Section - When no img found -->\n<div\n *ngIf=\"displayPexelsResults\"\n class=\"images-view--pexels\"\n [@easeInOut]=\"'in'\">\n <pexels-lib\n [searchValue]=\"tableFilters.searchValue\"\n (showImgUploaded)=\"onShowImgUploaded()\"\n [disableSearch]=\"true\"\n >\n </pexels-lib>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.NgScrollbar, selector: "ng-scrollbar", inputs: ["disabled", "sensorDisabled", "pointerEventsDisabled", "viewportPropagateMouseMove", "autoHeightDisabled", "autoWidthDisabled", "viewClass", "trackClass", "thumbClass", "minThumbSize", "trackClickScrollDuration", "pointerEventsMethod", "track", "visibility", "appearance", "position", "sensorDebounce", "scrollAuditTime"], outputs: ["updated"], exportAs: ["ngScrollbar"] }, { kind: "component", type: PexelLibComponent, selector: "pexels-lib", inputs: ["stateDisplayed", "searchValue", "disableSearch"], outputs: ["showImgUploaded"] }, { kind: "component", type: MosaicViewComponent, selector: "mosaic-view", inputs: ["tabDisplayed", "fullSize", "nbFakeImg"], outputs: ["switchDisplayWindow"] }, { kind: "component", type: TableViewComponent, selector: "table-view" }, { kind: "directive", type: LoadingDirective, selector: "[btnLoadingAnim]" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], animations: [
3269
+ ImagesViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ImagesViewComponent, selector: "images-view", inputs: { stateDisplayed: "stateDisplayed", tabDisplayed: "tabDisplayed", fullSize: "fullSize", nbRowToShow: "nbRowToShow", listDisplayed: "listDisplayed", multipleImgMode: "multipleImgMode" }, outputs: { switchDisplayWindow: "switchDisplayWindow" }, viewQueries: [{ propertyName: "imgLibContainer", first: true, predicate: ["imgLibContainer"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"vm$ | async as vm\">\n\n <div class=\"images-view\" [ngClass]=\"{'fullSize': fullSize, 'small': stateDisplayed === 'small'}\" [@easeInOut]=\"'in'\">\n <!-- Subheader : Img number and actions btn (sup img list, switch forma display) -->\n <div\n *ngIf=\"(stateDisplayed !== 'small' || tabDisplayed === 'img-upload')\"\n class=\"images-view__container\"\n [ngClass]=\"{'images-view__container--uploadTab': tabDisplayed === 'img-upload', 'images-view__container--window': stateDisplayed === 'window'}\"\n >\n\n <div *ngIf=\"tabDisplayed !== 'img-upload'\">\n <p class=\"mainColor\" [ngClass]=\"{'images-view__container__total--hide': vm.displayPexelsResults}\">{{ 'ImgManager.ImgLib.nbImg' | translate }} : {{vm.imageTotal}}</p>\n </div>\n <div *ngIf=\"tabDisplayed === 'img-upload'\">\n <p class=\"mainColor\">{{ 'ImgManager.ImgLib.lastImgs' | translate }}</p>\n </div>\n\n <div class=\"field has-addons subHeaderActions\" *ngIf=\"tabDisplayed !== 'img-upload'\">\n\n <!-- For listforma : Display btn del multiple img & Confirm action -->\n <div class=\"images-view__container__boxAction\">\n\n\n <!-- Select -->\n <button\n class=\"button success images-view__container__boxAction__import\"\n @insertRemoveAnnim\n *ngIf=\"listDisplayed && nbImgToDelSelected && !confirmImgSup && !delListImgLoader && multipleImgMode\"\n (click)=\"selectImgChosen(vm.picturesList)\"\n type=\"button\"\n >\n <i class=\"fal fa-check\"></i>\n {{ 'ImgManager.ImgLib.select' | translate }} ({{nbImgToDelSelected}})\n </button>\n\n <!-- Display btn del multiple img -->\n <button\n *ngIf=\"listDisplayed && nbImgToDelSelected && !confirmImgSup\"\n (click)=\"displayConfirmImgSup()\"\n class=\"button images-view__container__boxAction__delBtn danger\"\n @insertRemoveAnnim\n type=\"button\"\n >\n <i class=\"fal fa-times\"></i>{{ 'ImgManager.ImgLib.delMlt' | translate }} ({{nbImgToDelSelected}})\n <span btnLoadingAnim *ngIf=\"delListImgLoader\" class=\"btnLoadingAnnimation\"></span>\n </button>\n\n <!-- Confirm action -->\n <div\n class=\"images-view__container__boxAction__confirmSup\"\n [ngClass]=\"{'images-view__container__boxAction__confirmSup--visible': confirmImgSup}\">\n <p *ngIf=\"nbImgToDelSelected > 1\" class=\"images-view__container__boxAction__confirmSup__text\">{{ 'ImgManager.ImgLib.confirmSupQuestions' | translate:{nbImage: nbImgToDelSelected} }}</p>\n <p *ngIf=\"nbImgToDelSelected === 1\" class=\"images-view__container__boxAction__confirmSup__text\">{{ 'ImgManager.ImgLib.confirmSupQuestion' | translate:{nbImage: nbImgToDelSelected} }}</p>\n <div>\n <button\n class=\"button images-view__container__boxAction__confirmSup__cancel\"\n (click)=\"cancelSup()\"\n type=\"button\"\n >\n {{ 'ImgManager.ImgLib.cancel' | translate }}\n </button>\n <button\n (click)=\"removeListImg(vm.picturesList)\"\n class=\"button images-view__container__delBtn danger\"\n type=\"button\"\n >\n {{ 'ImgManager.ImgLib.confirm' | translate }}\n </button>\n </div>\n </div>\n\n </div>\n\n\n <!-- Swith mosaic/list forma -->\n <div class=\"field has-addons images-view__container__buttonBox\">\n <div class=\"control\">\n <div\n class=\"button is-lighted images-view__container__buttonBox__btn\"\n [ngClass]=\"{'actifDisplayed': !listDisplayed}\"\n (click)=\"onSwitchFormatDisplayed(false)\"\n >\n <span class=\"icon is-small\">\n <i class=\"far fa-th\"></i>\n </span>\n </div>\n </div>\n\n <div class=\"control\">\n <div class=\"button is-lighted images-view__container__buttonBox__btn\"\n [ngClass]=\"{'actifDisplayed': listDisplayed}\"\n (click)=\"onSwitchFormatDisplayed(true)\"\n >\n <span class=\"icon is-small\">\n <i class=\"fas fa-bars\"></i>\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n\n <!-- Images section -->\n <ng-scrollbar\n class=\"images-view__scroll\"\n [ngClass]=\"{\n 'images-view__scroll--hide--mosaic': vm.displayPexelsResults && !listDisplayed,\n 'images-view__scroll--hide--table': vm.displayPexelsResults && listDisplayed,\n 'images-view__scroll--full': stateDisplayed === 'full',\n 'images-view__scroll--smallDisplay' : stateDisplayed === 'small' && tabDisplayed !== 'img-upload',\n 'images-view__scroll--smallUploadDisplay' : stateDisplayed === 'small' && tabDisplayed === 'img-upload',\n 'images-view__scroll--window': stateDisplayed === 'window'\n }\"\n >\n <div #imgLibContainer class=\"images-view__wrapper\">\n\n <div *ngIf=\"!listDisplayed || stateDisplayed === 'small'\" [@easeInOut]=\"'in'\">\n <mosaic-view\n [picturesList]=\"vm.picturesList\"\n (picturesListChange)=\"onPicturesListChange(vm.picturesList)\"\n [tableFilters]=\"vm.tableFilters\"\n (filtersChange)=\"searchImagesParameters$.next(getParams(vm.tableFilters));\"\n [(disable)]=\"disable\"\n (pictureNameChange)=\"onRenamePicture($event)\"\n (switchDisplayWindow)=\"switchDisplayWindowMosaic()\"\n [nbFakeImg]=\"nbFakeImg\"\n [stateDisplayed]=\"stateDisplayed\"\n [tabDisplayed]=\"tabDisplayed\"\n [displayPexelsResults]=\"vm.displayPexelsResults\"\n [isLoading]=\"vm.isLoading\"\n [fullSize]=\"fullSize\"\n >\n </mosaic-view>\n </div>\n\n <div *ngIf=\"listDisplayed && stateDisplayed !== 'small'\" [@easeInOut]=\"'in'\">\n <table-view\n [picturesList]=\"vm.picturesList\"\n (picturesListChange)=\"onPicturesListChange(vm.picturesList)\"\n [tableFilters]=\"vm.tableFilters\"\n (filtersChange)=\"searchImagesParameters$.next(getParams(vm.tableFilters));\"\n [(disable)]=\"disable\"\n (pictureNameChange)=\"onRenamePicture($event)\"\n [displayPexelsResults]=\"vm.displayPexelsResults\"\n [stateDisplayed]=\"stateDisplayed\"\n [isLoading]=\"vm.isLoading\"\n >\n </table-view>\n </div>\n </div>\n </ng-scrollbar>\n\n <!-- Pexels Section - When no img found -->\n <div\n *ngIf=\"vm.displayPexelsResults\"\n class=\"images-view--pexels\"\n [@easeInOut]=\"'in'\">\n <pexels-lib\n [searchValue]=\"vm.tableFilters.searchValue\"\n [disableSearch]=\"true\"\n >\n </pexels-lib>\n </div>\n</ng-container>", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.NgScrollbar, selector: "ng-scrollbar", inputs: ["disabled", "sensorDisabled", "pointerEventsDisabled", "viewportPropagateMouseMove", "autoHeightDisabled", "autoWidthDisabled", "viewClass", "trackClass", "thumbClass", "minThumbSize", "trackClickScrollDuration", "pointerEventsMethod", "track", "visibility", "appearance", "position", "sensorDebounce", "scrollAuditTime"], outputs: ["updated"], exportAs: ["ngScrollbar"] }, { kind: "component", type: PexelLibComponent, selector: "pexels-lib", inputs: ["stateDisplayed", "searchValue", "disableSearch"] }, { kind: "component", type: MosaicViewComponent, selector: "mosaic-view", inputs: ["tabDisplayed", "fullSize", "nbFakeImg"], outputs: ["switchDisplayWindow"] }, { kind: "component", type: TableViewComponent, selector: "table-view" }, { kind: "directive", type: LoadingDirective, selector: "[btnLoadingAnim]" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], animations: [
3386
3270
  easeInOut,
3387
3271
  insertRemove
3388
3272
  ] });
@@ -3391,15 +3275,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
3391
3275
  args: [{ selector: 'images-view', animations: [
3392
3276
  easeInOut,
3393
3277
  insertRemove
3394
- ], template: "<div class=\"images-view\" [ngClass]=\"{'fullSize': fullSize, 'small': stateDisplayed === 'small'}\" [@easeInOut]=\"'in'\">\n <!-- Subheader : Img number and actions btn (sup img list, switch forma display) -->\n <div\n *ngIf=\"(stateDisplayed !== 'small' || tabDisplayed === 'img-upload')\"\n class=\"images-view__container\"\n [ngClass]=\"{'images-view__container--uploadTab': tabDisplayed === 'img-upload', 'images-view__container--window': stateDisplayed === 'window'}\"\n >\n\n <div *ngIf=\"tabDisplayed !== 'img-upload'\">\n <p class=\"mainColor\" [ngClass]=\"{'images-view__container__total--hide': displayPexelsResults}\">{{ 'ImgManager.ImgLib.nbImg' | translate }} : {{length}}</p>\n </div>\n <div *ngIf=\"tabDisplayed === 'img-upload'\">\n <p class=\"mainColor\">{{ 'ImgManager.ImgLib.lastImgs' | translate }}</p>\n </div>\n\n <div class=\"field has-addons subHeaderActions\" *ngIf=\"tabDisplayed !== 'img-upload'\">\n\n <!-- For listforma : Display btn del multiple img & Confirm action -->\n <div class=\"images-view__container__boxAction\">\n\n\n <!-- Select -->\n <button\n class=\"button success images-view__container__boxAction__import\"\n @insertRemoveAnnim\n *ngIf=\"listDisplayed && nbImgToDelSelected && !confirmImgSup && !delListImgLoader && multipleImgMode\"\n (click)=\"selectImgChosen()\"\n type=\"button\"\n >\n <i class=\"fal fa-check\"></i>\n {{ 'ImgManager.ImgLib.select' | translate }} ({{nbImgToDelSelected}})\n </button>\n\n <!-- Display btn del multiple img -->\n <button\n *ngIf=\"listDisplayed && nbImgToDelSelected && !confirmImgSup\"\n (click)=\"displayConfirmImgSup()\"\n class=\"button images-view__container__boxAction__delBtn danger\"\n @insertRemoveAnnim\n type=\"button\"\n >\n <i class=\"fal fa-times\"></i>{{ 'ImgManager.ImgLib.delMlt' | translate }} ({{nbImgToDelSelected}})\n <span btnLoadingAnim *ngIf=\"delListImgLoader\" class=\"btnLoadingAnnimation\"></span>\n </button>\n\n <!-- Confirm action -->\n <div\n class=\"images-view__container__boxAction__confirmSup\"\n [ngClass]=\"{'images-view__container__boxAction__confirmSup--visible': confirmImgSup}\">\n <p *ngIf=\"nbImgToDelSelected > 1\" class=\"images-view__container__boxAction__confirmSup__text\">{{ 'ImgManager.ImgLib.confirmSupQuestions' | translate:{nbImage: nbImgToDelSelected} }}</p>\n <p *ngIf=\"nbImgToDelSelected === 1\" class=\"images-view__container__boxAction__confirmSup__text\">{{ 'ImgManager.ImgLib.confirmSupQuestion' | translate:{nbImage: nbImgToDelSelected} }}</p>\n <div>\n <button\n class=\"button images-view__container__boxAction__confirmSup__cancel\"\n (click)=\"cancelSup()\"\n type=\"button\"\n >\n {{ 'ImgManager.ImgLib.cancel' | translate }}\n </button>\n <button\n (click)=\"removeListImg()\"\n class=\"button images-view__container__delBtn danger\"\n type=\"button\"\n >\n {{ 'ImgManager.ImgLib.confirm' | translate }}\n </button>\n </div>\n </div>\n\n </div>\n\n\n <!-- Swith mosaic/list forma -->\n <div class=\"field has-addons images-view__container__buttonBox\">\n <div class=\"control\">\n <div\n class=\"button is-lighted images-view__container__buttonBox__btn\"\n [ngClass]=\"{'actifDisplayed': !listDisplayed}\"\n (click)=\"onSwitchFormatDisplayed(false)\"\n >\n <span class=\"icon is-small\">\n <i class=\"far fa-th\"></i>\n </span>\n </div>\n </div>\n\n <div class=\"control\">\n <div class=\"button is-lighted images-view__container__buttonBox__btn\"\n [ngClass]=\"{'actifDisplayed': listDisplayed}\"\n (click)=\"onSwitchFormatDisplayed(true)\"\n >\n <span class=\"icon is-small\">\n <i class=\"fas fa-bars\"></i>\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n\n <!-- Images section -->\n<ng-scrollbar\n class=\"images-view__scroll\"\n [ngClass]=\"{\n 'images-view__scroll--hide--mosaic': displayPexelsResults && !listDisplayed,\n 'images-view__scroll--hide--table': displayPexelsResults && listDisplayed,\n 'images-view__scroll--full': stateDisplayed === 'full',\n 'images-view__scroll--smallDisplay' : stateDisplayed === 'small' && tabDisplayed !== 'img-upload',\n 'images-view__scroll--smallUploadDisplay' : stateDisplayed === 'small' && tabDisplayed === 'img-upload',\n 'images-view__scroll--window': stateDisplayed === 'window'\n}\"\n>\n <div #imgLibContainer class=\"images-view__wrapper\">\n <div *ngIf=\"!listDisplayed || stateDisplayed === 'small'\" [@easeInOut]=\"'in'\">\n <mosaic-view\n [picturesList]=\"picturesList\"\n (picturesListChange)=\"onPicturesListChange()\"\n [tableFilters]=\"tableFilters\"\n (filtersChange)=\"onFiltersChange()\"\n [(disable)]=\"disable\"\n (pictureNameChange)=\"onRenamePicture($event)\"\n (switchDisplayWindow)=\"switchDisplayWindowMosaic()\"\n [nbFakeImg]=\"nbFakeImg\"\n [stateDisplayed]=\"stateDisplayed\"\n [tabDisplayed]=\"tabDisplayed\"\n [displayPexelsResults]=\"displayPexelsResults\"\n [isLoading]=\"isLoading\"\n [fullSize]=\"fullSize\"\n >\n </mosaic-view>\n </div>\n\n <div *ngIf=\"listDisplayed && stateDisplayed !== 'small'\" [@easeInOut]=\"'in'\">\n <table-view\n [picturesList]=\"picturesList\"\n (picturesListChange)=\"onPicturesListChange()\"\n [tableFilters]=\"tableFilters\"\n (filtersChange)=\"onFiltersChange()\"\n [(disable)]=\"disable\"\n (pictureNameChange)=\"onRenamePicture($event)\"\n [displayPexelsResults]=\"displayPexelsResults\"\n [stateDisplayed]=\"stateDisplayed\"\n [isLoading]=\"isLoading\"\n >\n </table-view>\n </div>\n\n </div>\n</ng-scrollbar>\n\n<!-- Pexels Section - When no img found -->\n<div\n *ngIf=\"displayPexelsResults\"\n class=\"images-view--pexels\"\n [@easeInOut]=\"'in'\">\n <pexels-lib\n [searchValue]=\"tableFilters.searchValue\"\n (showImgUploaded)=\"onShowImgUploaded()\"\n [disableSearch]=\"true\"\n >\n </pexels-lib>\n</div>\n" }]
3278
+ ], template: "<ng-container *ngIf=\"vm$ | async as vm\">\n\n <div class=\"images-view\" [ngClass]=\"{'fullSize': fullSize, 'small': stateDisplayed === 'small'}\" [@easeInOut]=\"'in'\">\n <!-- Subheader : Img number and actions btn (sup img list, switch forma display) -->\n <div\n *ngIf=\"(stateDisplayed !== 'small' || tabDisplayed === 'img-upload')\"\n class=\"images-view__container\"\n [ngClass]=\"{'images-view__container--uploadTab': tabDisplayed === 'img-upload', 'images-view__container--window': stateDisplayed === 'window'}\"\n >\n\n <div *ngIf=\"tabDisplayed !== 'img-upload'\">\n <p class=\"mainColor\" [ngClass]=\"{'images-view__container__total--hide': vm.displayPexelsResults}\">{{ 'ImgManager.ImgLib.nbImg' | translate }} : {{vm.imageTotal}}</p>\n </div>\n <div *ngIf=\"tabDisplayed === 'img-upload'\">\n <p class=\"mainColor\">{{ 'ImgManager.ImgLib.lastImgs' | translate }}</p>\n </div>\n\n <div class=\"field has-addons subHeaderActions\" *ngIf=\"tabDisplayed !== 'img-upload'\">\n\n <!-- For listforma : Display btn del multiple img & Confirm action -->\n <div class=\"images-view__container__boxAction\">\n\n\n <!-- Select -->\n <button\n class=\"button success images-view__container__boxAction__import\"\n @insertRemoveAnnim\n *ngIf=\"listDisplayed && nbImgToDelSelected && !confirmImgSup && !delListImgLoader && multipleImgMode\"\n (click)=\"selectImgChosen(vm.picturesList)\"\n type=\"button\"\n >\n <i class=\"fal fa-check\"></i>\n {{ 'ImgManager.ImgLib.select' | translate }} ({{nbImgToDelSelected}})\n </button>\n\n <!-- Display btn del multiple img -->\n <button\n *ngIf=\"listDisplayed && nbImgToDelSelected && !confirmImgSup\"\n (click)=\"displayConfirmImgSup()\"\n class=\"button images-view__container__boxAction__delBtn danger\"\n @insertRemoveAnnim\n type=\"button\"\n >\n <i class=\"fal fa-times\"></i>{{ 'ImgManager.ImgLib.delMlt' | translate }} ({{nbImgToDelSelected}})\n <span btnLoadingAnim *ngIf=\"delListImgLoader\" class=\"btnLoadingAnnimation\"></span>\n </button>\n\n <!-- Confirm action -->\n <div\n class=\"images-view__container__boxAction__confirmSup\"\n [ngClass]=\"{'images-view__container__boxAction__confirmSup--visible': confirmImgSup}\">\n <p *ngIf=\"nbImgToDelSelected > 1\" class=\"images-view__container__boxAction__confirmSup__text\">{{ 'ImgManager.ImgLib.confirmSupQuestions' | translate:{nbImage: nbImgToDelSelected} }}</p>\n <p *ngIf=\"nbImgToDelSelected === 1\" class=\"images-view__container__boxAction__confirmSup__text\">{{ 'ImgManager.ImgLib.confirmSupQuestion' | translate:{nbImage: nbImgToDelSelected} }}</p>\n <div>\n <button\n class=\"button images-view__container__boxAction__confirmSup__cancel\"\n (click)=\"cancelSup()\"\n type=\"button\"\n >\n {{ 'ImgManager.ImgLib.cancel' | translate }}\n </button>\n <button\n (click)=\"removeListImg(vm.picturesList)\"\n class=\"button images-view__container__delBtn danger\"\n type=\"button\"\n >\n {{ 'ImgManager.ImgLib.confirm' | translate }}\n </button>\n </div>\n </div>\n\n </div>\n\n\n <!-- Swith mosaic/list forma -->\n <div class=\"field has-addons images-view__container__buttonBox\">\n <div class=\"control\">\n <div\n class=\"button is-lighted images-view__container__buttonBox__btn\"\n [ngClass]=\"{'actifDisplayed': !listDisplayed}\"\n (click)=\"onSwitchFormatDisplayed(false)\"\n >\n <span class=\"icon is-small\">\n <i class=\"far fa-th\"></i>\n </span>\n </div>\n </div>\n\n <div class=\"control\">\n <div class=\"button is-lighted images-view__container__buttonBox__btn\"\n [ngClass]=\"{'actifDisplayed': listDisplayed}\"\n (click)=\"onSwitchFormatDisplayed(true)\"\n >\n <span class=\"icon is-small\">\n <i class=\"fas fa-bars\"></i>\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n\n <!-- Images section -->\n <ng-scrollbar\n class=\"images-view__scroll\"\n [ngClass]=\"{\n 'images-view__scroll--hide--mosaic': vm.displayPexelsResults && !listDisplayed,\n 'images-view__scroll--hide--table': vm.displayPexelsResults && listDisplayed,\n 'images-view__scroll--full': stateDisplayed === 'full',\n 'images-view__scroll--smallDisplay' : stateDisplayed === 'small' && tabDisplayed !== 'img-upload',\n 'images-view__scroll--smallUploadDisplay' : stateDisplayed === 'small' && tabDisplayed === 'img-upload',\n 'images-view__scroll--window': stateDisplayed === 'window'\n }\"\n >\n <div #imgLibContainer class=\"images-view__wrapper\">\n\n <div *ngIf=\"!listDisplayed || stateDisplayed === 'small'\" [@easeInOut]=\"'in'\">\n <mosaic-view\n [picturesList]=\"vm.picturesList\"\n (picturesListChange)=\"onPicturesListChange(vm.picturesList)\"\n [tableFilters]=\"vm.tableFilters\"\n (filtersChange)=\"searchImagesParameters$.next(getParams(vm.tableFilters));\"\n [(disable)]=\"disable\"\n (pictureNameChange)=\"onRenamePicture($event)\"\n (switchDisplayWindow)=\"switchDisplayWindowMosaic()\"\n [nbFakeImg]=\"nbFakeImg\"\n [stateDisplayed]=\"stateDisplayed\"\n [tabDisplayed]=\"tabDisplayed\"\n [displayPexelsResults]=\"vm.displayPexelsResults\"\n [isLoading]=\"vm.isLoading\"\n [fullSize]=\"fullSize\"\n >\n </mosaic-view>\n </div>\n\n <div *ngIf=\"listDisplayed && stateDisplayed !== 'small'\" [@easeInOut]=\"'in'\">\n <table-view\n [picturesList]=\"vm.picturesList\"\n (picturesListChange)=\"onPicturesListChange(vm.picturesList)\"\n [tableFilters]=\"vm.tableFilters\"\n (filtersChange)=\"searchImagesParameters$.next(getParams(vm.tableFilters));\"\n [(disable)]=\"disable\"\n (pictureNameChange)=\"onRenamePicture($event)\"\n [displayPexelsResults]=\"vm.displayPexelsResults\"\n [stateDisplayed]=\"stateDisplayed\"\n [isLoading]=\"vm.isLoading\"\n >\n </table-view>\n </div>\n </div>\n </ng-scrollbar>\n\n <!-- Pexels Section - When no img found -->\n <div\n *ngIf=\"vm.displayPexelsResults\"\n class=\"images-view--pexels\"\n [@easeInOut]=\"'in'\">\n <pexels-lib\n [searchValue]=\"vm.tableFilters.searchValue\"\n [disableSearch]=\"true\"\n >\n </pexels-lib>\n </div>\n</ng-container>" }]
3395
3279
  }], ctorParameters: function () { return [{ type: ImgManagerService }, { type: ImgEventService }, { type: ImgSelectionService }, { type: AlertService }, { type: UserSettingsService }, { type: RenamePictureService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { stateDisplayed: [{
3396
3280
  type: Input
3397
3281
  }], tabDisplayed: [{
3398
3282
  type: Input
3399
3283
  }], fullSize: [{
3400
3284
  type: Input
3401
- }], maxLengthCardShow: [{
3402
- type: Input
3403
3285
  }], nbRowToShow: [{
3404
3286
  type: Input
3405
3287
  }], listDisplayed: [{
@@ -3651,7 +3533,7 @@ class ImgTabsComponent {
3651
3533
  }
3652
3534
  }
3653
3535
  ImgTabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImgTabsComponent, deps: [{ token: ImgEventService }, { token: AlertService }, { token: i3$2.Router }], target: i0.ɵɵFactoryTarget.Component });
3654
- ImgTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ImgTabsComponent, selector: "img-tabs", inputs: { multipleImgMode: "multipleImgMode", stateDisplayed: "stateDisplayed", listDisplayed: "listDisplayed" }, outputs: { imgManagerClosed: "imgManagerClosed", currentTab: "currentTab", switchDisplayWindow: "switchDisplayWindow" }, viewQueries: [{ propertyName: "imgUploadedComponent", first: true, predicate: ["imgUploadedImg"], descendants: true }], ngImport: i0, template: "<div\n class=\"img-tabs\" [ngClass]=\"{'small': stateDisplayed === 'small'}\">\n <div class=\"wrapper-tabs\">\n <div\n class=\"tabs\"\n [ngClass]=\"\n {\n 'tabs--notWindow': stateDisplayed !== 'window',\n 'tabs--notDisplayed': stateDisplayed === 'window' && tabActive.value === tabs[3].value\n }\">\n\n <ul>\n <li class=\"is-active\" [ngClass]=\"{'is-active': tabActive.value === tabs[0].value}\" (click)=\"toggleTabs(tabs[0])\"><a>{{ tabs[0].name | translate }}</a></li>\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[1].value}\" (click)=\"toggleTabs(tabs[1])\"><a>{{ tabs[1].name | translate }}</a></li>\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[2].value}\" (click)=\"toggleTabs(tabs[2])\"><a>{{ tabs[2].name | translate }}</a></li>\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[3].value}\" *ngIf=\"editTab\"><a>{{ tabs[3].name | translate }}</a></li>\n </ul>\n <div\n class=\"img-tabs__canva\"\n [ngClass]=\"{'img-tabs__canva--window': stateDisplayed === 'window'}\">\n <canva-btn\n (showImgUploaded)=\"onShowImgUploaded()\"\n [stateDisplayed]=\"stateDisplayed\">\n </canva-btn>\n </div>\n </div>\n <div class=\"select-mobile-page\">\n <wac-select\n [(ngModel)]=\"tabActive\"\n name=\"tabs\"\n [items]=\"tabs\"\n ></wac-select>\n </div>\n </div>\n\n <!-- Upload section -->\n <div\n class=\"columns img-tabs__tabsFirst\"\n [ngClass]=\"{\n 'img-tabs__tabsFirst--small': stateDisplayed === 'small',\n 'img-tabs__tabsFirst--window': stateDisplayed === 'window'\n }\"\n *ngIf=\"tabActive.value === tabs[0].value\">\n <div class=\"column img-tabs__tabsFirst__upload\">\n <img-upload\n [stateDisplayed]=\"stateDisplayed\"\n (imgUploaded)=\"onImgUploaded($event)\"\n ></img-upload>\n </div>\n <div class=\"column img-tabs__tabsFirst__list\" [ngClass]=\"{\n 'img-tabs__tabsFirst__list--upload': imgUpload\n }\">\n <images-view\n *ngIf=\"!imgUpload\"\n [stateDisplayed]=\"stateDisplayed\"\n [listDisplayed]=\"false\"\n [multipleImgMode]=\"multipleImgMode\"\n [tabDisplayed]=\"tabActive.value\"\n [nbRowToShow]=\"2\"\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\n [fullSize]=\"false\">\n </images-view>\n\n\n <div [hidden]=\"!imgUpload\">\n <upload-list\n #imgUploadedImg\n [stateDisplayed]=\"stateDisplayed\"\n [tabDisplayed]=\"tabActive.value\"\n [multipleImgMode]=\"multipleImgMode\"\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\n >\n </upload-list>\n </div>\n </div>\n </div>\n\n <!-- Images section -->\n <div class=\"columns img-tabs__tabsSecond\" *ngIf=\"tabActive.value === tabs[1].value\">\n <div class=\"column\">\n\n <images-view\n [stateDisplayed]=\"stateDisplayed\"\n [listDisplayed]=\"listDisplayed\"\n [multipleImgMode]=\"multipleImgMode\"\n [tabDisplayed]=\"tabActive.value\"\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\n [fullSize]=\"true\">\n </images-view>\n\n </div>\n </div>\n\n <!-- Pexels img section -->\n <div class=\"columns img-tabs__tabsThird\" *ngIf=\"tabActive.value === tabs[2].value\">\n <div class=\"column\">\n <pexels-lib\n [stateDisplayed]=\"stateDisplayed\"\n (showImgUploaded)=\"onShowImgUploaded()\">\n </pexels-lib>\n </div>\n </div>\n\n <!--Edition section -->\n <div class=\"columns img-tabs__tabsEdit\" *ngIf=\"tabActive.value === tabs[3].value\">\n <div class=\"column\">\n <img-editor\n [stateDisplayed]=\"stateDisplayed\"\n [imgToEdit]=\"imgToEdit\"\n (editClosed)=\"onEditClosed($event)\">\n </img-editor>\n </div>\n </div>\n\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ImgUploadComponent, selector: "img-upload", inputs: ["stateDisplayed"], outputs: ["imgUploaded"] }, { kind: "component", type: PexelLibComponent, selector: "pexels-lib", inputs: ["stateDisplayed", "searchValue", "disableSearch"], outputs: ["showImgUploaded"] }, { kind: "component", type: UploadListComponent, selector: "upload-list", inputs: ["stateDisplayed", "tabDisplayed", "multipleImgMode"], outputs: ["switchDisplayWindow"] }, { kind: "component", type: ImgEditorComponent, selector: "img-editor", inputs: ["stateDisplayed", "imgToEdit"], outputs: ["editClosed"] }, { kind: "component", type: CanvaBtnComponent, selector: "canva-btn", inputs: ["stateDisplayed"], outputs: ["showImgUploaded"] }, { kind: "component", type: ImagesViewComponent, selector: "images-view", inputs: ["stateDisplayed", "tabDisplayed", "fullSize", "maxLengthCardShow", "nbRowToShow", "listDisplayed", "multipleImgMode"], outputs: ["switchDisplayWindow"] }, { kind: "component", type: SelectComponent, selector: "wac-select", inputs: ["items", "placeholder", "label", "maxWidthItems", "search", "type", "callToAction", "maxWidth", "disabled"], outputs: ["selectValue", "clickOnCallToAction"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
3536
+ ImgTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ImgTabsComponent, selector: "img-tabs", inputs: { multipleImgMode: "multipleImgMode", stateDisplayed: "stateDisplayed", listDisplayed: "listDisplayed" }, outputs: { imgManagerClosed: "imgManagerClosed", currentTab: "currentTab", switchDisplayWindow: "switchDisplayWindow" }, viewQueries: [{ propertyName: "imgUploadedComponent", first: true, predicate: ["imgUploadedImg"], descendants: true }], ngImport: i0, template: "<div\n class=\"img-tabs\" [ngClass]=\"{'small': stateDisplayed === 'small'}\">\n <div class=\"wrapper-tabs\">\n <div\n class=\"tabs\"\n [ngClass]=\"\n {\n 'tabs--notWindow': stateDisplayed !== 'window',\n 'tabs--notDisplayed': stateDisplayed === 'window' && tabActive.value === tabs[3].value\n }\">\n\n <ul>\n <li class=\"is-active\" [ngClass]=\"{'is-active': tabActive.value === tabs[0].value}\" (click)=\"toggleTabs(tabs[0])\"><a>{{ tabs[0].name | translate }}</a></li>\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[1].value}\" (click)=\"toggleTabs(tabs[1])\"><a>{{ tabs[1].name | translate }}</a></li>\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[2].value}\" (click)=\"toggleTabs(tabs[2])\"><a>{{ tabs[2].name | translate }}</a></li>\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[3].value}\" *ngIf=\"editTab\"><a>{{ tabs[3].name | translate }}</a></li>\n </ul>\n <div\n class=\"img-tabs__canva\"\n [ngClass]=\"{'img-tabs__canva--window': stateDisplayed === 'window'}\">\n <canva-btn\n (showImgUploaded)=\"onShowImgUploaded()\"\n [stateDisplayed]=\"stateDisplayed\">\n </canva-btn>\n </div>\n </div>\n <div class=\"select-mobile-page\">\n <wac-select\n [(ngModel)]=\"tabActive\"\n name=\"tabs\"\n [items]=\"tabs\"\n ></wac-select>\n </div>\n </div>\n\n <!-- Upload section -->\n <div\n class=\"columns img-tabs__tabsFirst\"\n [ngClass]=\"{\n 'img-tabs__tabsFirst--small': stateDisplayed === 'small',\n 'img-tabs__tabsFirst--window': stateDisplayed === 'window'\n }\"\n *ngIf=\"tabActive.value === tabs[0].value\">\n <div class=\"column img-tabs__tabsFirst__upload\">\n <img-upload\n [stateDisplayed]=\"stateDisplayed\"\n (imgUploaded)=\"onImgUploaded($event)\"\n ></img-upload>\n </div>\n <div class=\"column img-tabs__tabsFirst__list\" [ngClass]=\"{\n 'img-tabs__tabsFirst__list--upload': imgUpload\n }\">\n <images-view\n *ngIf=\"!imgUpload\"\n [stateDisplayed]=\"stateDisplayed\"\n [listDisplayed]=\"false\"\n [multipleImgMode]=\"multipleImgMode\"\n [tabDisplayed]=\"tabActive.value\"\n [nbRowToShow]=\"2\"\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\n [fullSize]=\"false\">\n </images-view>\n\n\n <div [hidden]=\"!imgUpload\">\n <upload-list\n #imgUploadedImg\n [stateDisplayed]=\"stateDisplayed\"\n [tabDisplayed]=\"tabActive.value\"\n [multipleImgMode]=\"multipleImgMode\"\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\n >\n </upload-list>\n </div>\n </div>\n </div>\n\n <!-- Images section -->\n <div class=\"columns img-tabs__tabsSecond\" *ngIf=\"tabActive.value === tabs[1].value\">\n <div class=\"column\">\n\n <images-view\n [stateDisplayed]=\"stateDisplayed\"\n [listDisplayed]=\"listDisplayed\"\n [multipleImgMode]=\"multipleImgMode\"\n [tabDisplayed]=\"tabActive.value\"\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\n [fullSize]=\"true\">\n </images-view>\n\n </div>\n </div>\n\n <!-- Pexels img section -->\n <div class=\"columns img-tabs__tabsThird\" *ngIf=\"tabActive.value === tabs[2].value\">\n <div class=\"column\">\n <pexels-lib\n [stateDisplayed]=\"stateDisplayed\"\n (showImgUploaded)=\"onShowImgUploaded()\">\n </pexels-lib>\n </div>\n </div>\n\n <!--Edition section -->\n <div class=\"columns img-tabs__tabsEdit\" *ngIf=\"tabActive.value === tabs[3].value\">\n <div class=\"column\">\n <img-editor\n [stateDisplayed]=\"stateDisplayed\"\n [imgToEdit]=\"imgToEdit\"\n (editClosed)=\"onEditClosed($event)\">\n </img-editor>\n </div>\n </div>\n\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ImgUploadComponent, selector: "img-upload", inputs: ["stateDisplayed"], outputs: ["imgUploaded"] }, { kind: "component", type: PexelLibComponent, selector: "pexels-lib", inputs: ["stateDisplayed", "searchValue", "disableSearch"] }, { kind: "component", type: UploadListComponent, selector: "upload-list", inputs: ["stateDisplayed", "tabDisplayed", "multipleImgMode"], outputs: ["switchDisplayWindow"] }, { kind: "component", type: ImgEditorComponent, selector: "img-editor", inputs: ["stateDisplayed", "imgToEdit"], outputs: ["editClosed"] }, { kind: "component", type: CanvaBtnComponent, selector: "canva-btn", inputs: ["stateDisplayed"], outputs: ["showImgUploaded"] }, { kind: "component", type: ImagesViewComponent, selector: "images-view", inputs: ["stateDisplayed", "tabDisplayed", "fullSize", "nbRowToShow", "listDisplayed", "multipleImgMode"], outputs: ["switchDisplayWindow"] }, { kind: "component", type: SelectComponent, selector: "wac-select", inputs: ["items", "placeholder", "label", "maxWidthItems", "search", "type", "callToAction", "maxWidth", "disabled"], outputs: ["selectValue", "clickOnCallToAction"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
3655
3537
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImgTabsComponent, decorators: [{
3656
3538
  type: Component,
3657
3539
  args: [{ selector: 'img-tabs', template: "<div\n class=\"img-tabs\" [ngClass]=\"{'small': stateDisplayed === 'small'}\">\n <div class=\"wrapper-tabs\">\n <div\n class=\"tabs\"\n [ngClass]=\"\n {\n 'tabs--notWindow': stateDisplayed !== 'window',\n 'tabs--notDisplayed': stateDisplayed === 'window' && tabActive.value === tabs[3].value\n }\">\n\n <ul>\n <li class=\"is-active\" [ngClass]=\"{'is-active': tabActive.value === tabs[0].value}\" (click)=\"toggleTabs(tabs[0])\"><a>{{ tabs[0].name | translate }}</a></li>\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[1].value}\" (click)=\"toggleTabs(tabs[1])\"><a>{{ tabs[1].name | translate }}</a></li>\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[2].value}\" (click)=\"toggleTabs(tabs[2])\"><a>{{ tabs[2].name | translate }}</a></li>\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[3].value}\" *ngIf=\"editTab\"><a>{{ tabs[3].name | translate }}</a></li>\n </ul>\n <div\n class=\"img-tabs__canva\"\n [ngClass]=\"{'img-tabs__canva--window': stateDisplayed === 'window'}\">\n <canva-btn\n (showImgUploaded)=\"onShowImgUploaded()\"\n [stateDisplayed]=\"stateDisplayed\">\n </canva-btn>\n </div>\n </div>\n <div class=\"select-mobile-page\">\n <wac-select\n [(ngModel)]=\"tabActive\"\n name=\"tabs\"\n [items]=\"tabs\"\n ></wac-select>\n </div>\n </div>\n\n <!-- Upload section -->\n <div\n class=\"columns img-tabs__tabsFirst\"\n [ngClass]=\"{\n 'img-tabs__tabsFirst--small': stateDisplayed === 'small',\n 'img-tabs__tabsFirst--window': stateDisplayed === 'window'\n }\"\n *ngIf=\"tabActive.value === tabs[0].value\">\n <div class=\"column img-tabs__tabsFirst__upload\">\n <img-upload\n [stateDisplayed]=\"stateDisplayed\"\n (imgUploaded)=\"onImgUploaded($event)\"\n ></img-upload>\n </div>\n <div class=\"column img-tabs__tabsFirst__list\" [ngClass]=\"{\n 'img-tabs__tabsFirst__list--upload': imgUpload\n }\">\n <images-view\n *ngIf=\"!imgUpload\"\n [stateDisplayed]=\"stateDisplayed\"\n [listDisplayed]=\"false\"\n [multipleImgMode]=\"multipleImgMode\"\n [tabDisplayed]=\"tabActive.value\"\n [nbRowToShow]=\"2\"\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\n [fullSize]=\"false\">\n </images-view>\n\n\n <div [hidden]=\"!imgUpload\">\n <upload-list\n #imgUploadedImg\n [stateDisplayed]=\"stateDisplayed\"\n [tabDisplayed]=\"tabActive.value\"\n [multipleImgMode]=\"multipleImgMode\"\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\n >\n </upload-list>\n </div>\n </div>\n </div>\n\n <!-- Images section -->\n <div class=\"columns img-tabs__tabsSecond\" *ngIf=\"tabActive.value === tabs[1].value\">\n <div class=\"column\">\n\n <images-view\n [stateDisplayed]=\"stateDisplayed\"\n [listDisplayed]=\"listDisplayed\"\n [multipleImgMode]=\"multipleImgMode\"\n [tabDisplayed]=\"tabActive.value\"\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\n [fullSize]=\"true\">\n </images-view>\n\n </div>\n </div>\n\n <!-- Pexels img section -->\n <div class=\"columns img-tabs__tabsThird\" *ngIf=\"tabActive.value === tabs[2].value\">\n <div class=\"column\">\n <pexels-lib\n [stateDisplayed]=\"stateDisplayed\"\n (showImgUploaded)=\"onShowImgUploaded()\">\n </pexels-lib>\n </div>\n </div>\n\n <!--Edition section -->\n <div class=\"columns img-tabs__tabsEdit\" *ngIf=\"tabActive.value === tabs[3].value\">\n <div class=\"column\">\n <img-editor\n [stateDisplayed]=\"stateDisplayed\"\n [imgToEdit]=\"imgToEdit\"\n (editClosed)=\"onEditClosed($event)\">\n </img-editor>\n </div>\n </div>\n\n</div>\n" }]