@wizishop/img-manager-webelement 15.0.11 → 15.2.5

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,12 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, Component, NgModule } from '@angular/core';
3
+ import { fromEvent, Observable, forkJoin, Subject, tap, from } from 'rxjs';
3
4
  import * as i2 from '@wizishop/img-manager';
4
- import { ImgApiDto, ImgCDNConfigDTO, ImgManagerConfigDto, WzImgManagerModule } from '@wizishop/img-manager';
5
- import { fromEvent, Observable, forkJoin, Subject, from } from 'rxjs';
6
- import * as i1 from '@angular/common/http';
7
- import { HttpHeaders, HttpClientModule } from '@angular/common/http';
5
+ import { ImgSelectionService, WzImgManagerModule, ApiService } from '@wizishop/img-manager';
8
6
  import * as i1$1 from '@ngx-translate/core';
9
7
  import { TranslateModule } from '@ngx-translate/core';
8
+ import * as i1 from '@angular/common/http';
9
+ import { HttpHeaders, HttpClientModule } from '@angular/common/http';
10
10
  import { take } from 'rxjs/operators';
11
11
  import * as i7 from '@angular/common';
12
12
  import { CommonModule } from '@angular/common';
@@ -213,13 +213,13 @@ class FicheProductService {
213
213
  }
214
214
  initProductImgSelection() {
215
215
  // Display the loader in img list selection
216
- this.imgSelectionService.emitImgListLoading(true);
216
+ this.imgSelectionService.imgSelectedListLoading$.next(true);
217
217
  // retrieve img selection
218
218
  const retrieveImgSelectionSub = this.retrieveImgSelection().subscribe(data => {
219
219
  // No imgage selected
220
220
  if (!data || !data["photos"] || !data["photos"]["infos"] || !data["photos"]["infos"]["files"] || !data["photos"]["infos"]["files"].length) {
221
221
  this.loadProductImgSelection = false;
222
- this.imgSelectionService.emitImgListLoading(false);
222
+ this.imgSelectionService.imgSelectedListLoading$.next(false);
223
223
  return;
224
224
  }
225
225
  const idImgSelectionList = data["photos"]["infos"]["files"];
@@ -233,7 +233,7 @@ class FicheProductService {
233
233
  }, error => {
234
234
  // Hide the loader in img list selection
235
235
  this.loadProductImgSelection = false;
236
- this.imgSelectionService.emitImgListLoading(false);
236
+ this.imgSelectionService.imgSelectedListLoading$.next(false);
237
237
  });
238
238
  this.subscriptions.push(allImgSub);
239
239
  });
@@ -260,7 +260,7 @@ class FicheProductService {
260
260
  }
261
261
  updateImgSelectionOnChange() {
262
262
  // listen to the img manager change
263
- const imgSelectionSub = this.imgSelectionService.getImgSelectionChange().subscribe(imgSelectionList => {
263
+ const imgSelectionSub = this.imgSelectionService.imgSelection$.subscribe(imgSelectionList => {
264
264
  if (!imgSelectionList) {
265
265
  return;
266
266
  }
@@ -345,7 +345,7 @@ class FicheProductService {
345
345
  applyCurrentImgSelection() {
346
346
  this.imgSelectionService.setImgSelection(this.currentProductImgSelection);
347
347
  // Hide the loader in img list selection
348
- this.imgSelectionService.emitImgListLoading(false);
348
+ this.imgSelectionService.imgSelectedListLoading$.next(false);
349
349
  }
350
350
  getOptionsHeaders() {
351
351
  const header = { headers: new HttpHeaders({
@@ -460,26 +460,105 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
460
460
  }], ctorParameters: function () { return [{ type: StorageService }]; } });
461
461
  ;
462
462
 
463
+ class WebelementImageManagerApiService {
464
+ constructor(http) {
465
+ this.http = http;
466
+ this.shopId = null;
467
+ this.CONFIG = {
468
+ image_manager_route: environment.wizi_api + "/image-manager/shops/" + this.shopId,
469
+ canva_token: 'wdByHayF5v57nj2ZSLvu055O',
470
+ canva_url: 'https://sdk.canva.com/designbutton/v2/api.js',
471
+ pexels_token: '563492ad6f91700001000001e39215727d8b42c1b08498a9ce1e6b94',
472
+ pexels_route: 'https://api.pexels.com/v1',
473
+ shop_category: 'other',
474
+ assets_route: environment.assets_route,
475
+ };
476
+ this.IMG_SIZE = {
477
+ url_raw_image: `${environment.CDN_URL}${this.shopId}/RAW-`,
478
+ url_100_image: `${environment.CDN_URL}${this.shopId}/m100-`,
479
+ url_200_image: `${environment.CDN_URL}${this.shopId}/cs200-`,
480
+ url_400_image: `${environment.CDN_URL}${this.shopId}/cs400-`,
481
+ url_800_image: `${environment.CDN_URL}${this.shopId}/cs800-`
482
+ };
483
+ }
484
+ getOptionsHeaders(params) {
485
+ const header = { headers: new HttpHeaders({
486
+ Authorization: 'Bearer ' + this.shopToken
487
+ })
488
+ };
489
+ if (params) {
490
+ header['params'] = params;
491
+ }
492
+ return header;
493
+ }
494
+ getShopCategory() {
495
+ return 'other';
496
+ }
497
+ getShopImgList(params) {
498
+ return this.http.get(`${this.CONFIG.image_manager_route}/images`, this.getOptionsHeaders(params));
499
+ }
500
+ getShopTotalImgList(params) {
501
+ return this.http.get(`${this.CONFIG.image_manager_route}/total/images`, this.getOptionsHeaders(params));
502
+ }
503
+ getShopImg(idFile) {
504
+ return this.http.get(`${this.CONFIG.image_manager_route}/images/${idFile}`, this.getOptionsHeaders());
505
+ }
506
+ uploadFile(formData) {
507
+ return this.http.post(`${this.CONFIG.image_manager_route}/images/template`, formData, this.getOptionsHeaders());
508
+ }
509
+ uploadFileByUrl(url, fileName) {
510
+ return this.http.post(`${this.CONFIG.image_manager_route}/images/template`, { url, fileName }, this.getOptionsHeaders());
511
+ }
512
+ replaceImg(imageBase64, id_file) {
513
+ const body = {
514
+ imageBase64,
515
+ type: "RAW"
516
+ };
517
+ return this.http.put(`${this.CONFIG.image_manager_route}/images/${id_file}/replace`, body, this.getOptionsHeaders());
518
+ }
519
+ changeImgName(fileName, id_file) {
520
+ return this.http.put(`${this.CONFIG.image_manager_route}/images/${id_file}?file_name=${fileName}`, null, this.getOptionsHeaders());
521
+ }
522
+ removeImg(id_file) {
523
+ return this.http.delete(`${this.CONFIG.image_manager_route}/images/${id_file}`, this.getOptionsHeaders());
524
+ }
525
+ removeMultipleImg(id_array) {
526
+ return this.http.post(`${this.CONFIG.image_manager_route}/images-multiple-delete`, { id_array }, this.getOptionsHeaders());
527
+ }
528
+ setShopCategory(shopId) {
529
+ return this.http.get(`${environment.wizi_api}/shops/${shopId}`, this.getOptionsHeaders()).pipe(tap((shop => {
530
+ if (shop && shop['category']) {
531
+ this.CONFIG.shop_category = shop['category'];
532
+ }
533
+ })));
534
+ }
535
+ }
536
+ WebelementImageManagerApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WebelementImageManagerApiService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
537
+ WebelementImageManagerApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WebelementImageManagerApiService });
538
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WebelementImageManagerApiService, decorators: [{
539
+ type: Injectable
540
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
541
+
463
542
  class ImgManagerWebElementComponent {
464
- constructor(translateService, imgSelectionService, canvaService, ficheProductService, authCredentialsService, http, eventService, imgManagerService) {
543
+ constructor(translateService, canvaService, ficheProductService, authCredentialsService, eventService, imgManagerService, imgSelectionService, webelementImageManagerApiService) {
465
544
  this.translateService = translateService;
466
- this.imgSelectionService = imgSelectionService;
467
545
  this.canvaService = canvaService;
468
546
  this.ficheProductService = ficheProductService;
469
547
  this.authCredentialsService = authCredentialsService;
470
- this.http = http;
471
548
  this.eventService = eventService;
472
549
  this.imgManagerService = imgManagerService;
550
+ this.imgSelectionService = imgSelectionService;
551
+ this.webelementImageManagerApiService = webelementImageManagerApiService;
473
552
  // img manger config
474
553
  this.openImgManager = false;
475
554
  this.loading = true;
476
- // fiche roduct config
555
+ // fiche product config
477
556
  this.isPhotosTab = !!environment.isPhotosTab;
478
557
  this.subscriptions = [];
479
558
  }
480
559
  ngOnInit() {
481
560
  this.loading = true;
482
- this.pageficheProductConfig = this.imgManagerService.getImgManagerDisplayConfig("fiche-product");
561
+ this.pageFicheProductConfig = this.imgManagerService.getImgManagerDisplayConfig("fiche-product");
483
562
  this.pageEventConfig = this.imgManagerService.getImgManagerDisplayConfig("wizi-block");
484
563
  this.setCurrentLanguage();
485
564
  // Search on which page is display the img manger
@@ -503,13 +582,11 @@ class ImgManagerWebElementComponent {
503
582
  return;
504
583
  }
505
584
  // Run on local Server
506
- this.setAppVars(null, environment.local.shopId, null, environment.local.token);
507
- this.setImgManagerExtraConfig();
508
- this.imgManagerDisplayConfig = this.pageficheProductConfig;
585
+ this.setAppVars(environment.local.shopId, environment.local.token);
586
+ this.imgManagerDisplayConfig = this.pageFicheProductConfig;
509
587
  return;
510
588
  }
511
- this.setAppVars(authCredentials.user_id, authCredentials.shop_id, authCredentials.account_id, authCredentials.token);
512
- this.setImgManagerExtraConfig();
589
+ this.setAppVars(authCredentials.shop_id, authCredentials.token);
513
590
  }
514
591
  setFicheProductPage() {
515
592
  this.ficheProductService.setApiConfig(this.id_shop, this.token_shop);
@@ -521,7 +598,7 @@ class ImgManagerWebElementComponent {
521
598
  setPageWithEvents() {
522
599
  this.subscribePageAskForImg();
523
600
  // Send img selected
524
- const subImgSelection = this.imgSelectionService.getImgSelectionChange().subscribe(imgSelectionList => {
601
+ const subImgSelection = this.imgSelectionService.imgSelection$.subscribe(imgSelectionList => {
525
602
  if (imgSelectionList && imgSelectionList.length) {
526
603
  this.eventService.sendImgSelectedToPage(imgSelectionList[0]);
527
604
  }
@@ -552,11 +629,11 @@ class ImgManagerWebElementComponent {
552
629
  }
553
630
  setDisplayedPageConfig() {
554
631
  const isFicheProductPage = /\/products\/(\d+\/edit|create)/.test(window.location.pathname);
555
- this.imgManagerDisplayConfig = isFicheProductPage ? this.pageficheProductConfig : this.pageEventConfig;
632
+ this.imgManagerDisplayConfig = isFicheProductPage ? this.pageFicheProductConfig : this.pageEventConfig;
556
633
  }
557
634
  handleFicheProductTab() {
558
635
  const tabsSub = this.ficheProductService.handleTabs().subscribe(isPhotosTab => {
559
- this.imgManagerDisplayConfig = isPhotosTab ? this.pageficheProductConfig : this.pageEventConfig;
636
+ this.imgManagerDisplayConfig = isPhotosTab ? this.pageFicheProductConfig : this.pageEventConfig;
560
637
  this.isPhotosTab = isPhotosTab;
561
638
  });
562
639
  this.subscriptions.push(tabsSub);
@@ -570,74 +647,48 @@ class ImgManagerWebElementComponent {
570
647
  getCredentials() {
571
648
  return from(this.authCredentialsService.get());
572
649
  }
573
- setAppVars(userId, shopId, accountId, token) {
574
- this.userId = userId;
575
- this.id_shop = shopId;
576
- this.accountId = accountId;
577
- this.token_shop = token;
578
- }
579
- setImgManagerExtraConfig() {
580
- const apiDto = new ImgApiDto();
581
- apiDto.shop_token = this.token_shop;
582
- apiDto.image_manager_route = environment.wizi_api + "/image-manager/shops/" + this.id_shop;
583
- apiDto.canva_token = 'wdByHayF5v57nj2ZSLvu055O';
584
- apiDto.canva_url = 'https://sdk.canva.com/designbutton/v2/api.js';
585
- apiDto.pexels_token = '563492ad6f91700001000001e39215727d8b42c1b08498a9ce1e6b94';
586
- apiDto.pexels_route = 'https://api.pexels.com/v1';
587
- apiDto.shop_category = 'other'; // The shop categorie is retrieve later with the getShopCategory methode
588
- apiDto.assets_route = environment.assets_route;
589
- const imgCDNConfigDTO = new ImgCDNConfigDTO();
590
- imgCDNConfigDTO.url_raw_image = `${environment.CDN_URL}${this.id_shop}/RAW-`;
591
- imgCDNConfigDTO.url_100_image = `${environment.CDN_URL}${this.id_shop}/m100-`;
592
- imgCDNConfigDTO.url_200_image = `${environment.CDN_URL}${this.id_shop}/cs200-`;
593
- imgCDNConfigDTO.url_400_image = `${environment.CDN_URL}${this.id_shop}/cs400-`;
594
- imgCDNConfigDTO.url_800_image = `${environment.CDN_URL}${this.id_shop}/cs800-`;
595
- this.imgExternalConfig = new ImgManagerConfigDto();
596
- this.imgExternalConfig.api = apiDto;
597
- this.imgExternalConfig.imgCDNConfig = imgCDNConfigDTO;
598
- const subShopCategory = this.getShopCategory().subscribe(shop => {
599
- if (shop && shop['category']) {
600
- this.imgExternalConfig.api.shop_category = shop['category'];
601
- }
602
- });
603
- this.subscriptions.push(subShopCategory);
604
- }
605
- getShopCategory() {
606
- return this.http.get(`${environment.wizi_api}/shops/${this.id_shop}`, this.getOptionsHeadersWithBearer());
607
- }
608
- getOptionsHeadersWithBearer() {
609
- const header = { headers: new HttpHeaders({
610
- Authorization: 'Bearer ' + this.token_shop
611
- })
612
- };
613
- return header;
650
+ setAppVars(shopId, token) {
651
+ this.webelementImageManagerApiService.shopToken = token;
652
+ this.webelementImageManagerApiService.shopId = shopId;
653
+ if (shopId) {
654
+ this.webelementImageManagerApiService.setShopCategory(shopId).subscribe();
655
+ }
614
656
  }
615
657
  ngOnDestroy() {
616
658
  this.subscriptions.forEach(sub => sub.unsubscribe());
617
659
  }
618
660
  }
619
- ImgManagerWebElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImgManagerWebElementComponent, deps: [{ token: i1$1.TranslateService }, { token: i2.ImgSelectionService }, { token: i2.CanvaService }, { token: FicheProductService }, { token: AuthCredentialsService }, { token: i1.HttpClient }, { token: EventService }, { token: i2.ImgManagerService }], target: i0.ɵɵFactoryTarget.Component });
620
- ImgManagerWebElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ImgManagerWebElementComponent, selector: "img-manager-webelement", ngImport: i0, template: "<div class=\"info-bulle\">\n <p class=\"info-bulle-content\" [innerHTML]=\"'ImgManager.webElement.infoBulle' | translate\"></p>\n\n <ng-container *ngIf=\"imgManagerDisplayConfig.pageficheProduct && isPhotosTab\">\n <h3 class=\"wizicss-sous-titre\">{{'ImgManager.webElement.photosTitle' | translate }}</h3>\n </ng-container>\n\n <ng-container *ngIf=\"!loading && id_shop && imgManagerDisplayConfig\">\n\n <p class=\"img-manager-open\" *ngIf=\"imgManagerDisplayConfig.displayBtn && isPhotosTab\">\n <a (click)=\"open()\">{{'ImgManager.webElement.OpenBtn' | translate }}</a>\n </p>\n\n <div class=\"imgManagerBox\">\n <wz-img-manager\n #wzImgManager\n [stateDisplayed]=\"imgManagerDisplayConfig.stateDisplayed\"\n [multipleImgMode]=\"imgManagerDisplayConfig.multipleImgMode\"\n [showImgManagerModule]=\"imgManagerDisplayConfig.showImgManagerModule && openImgManager\"\n [showSelection]=\"imgManagerDisplayConfig.showSelection\"\n [externalConfig]=\"imgExternalConfig\"\n (imgManagerClosed)=\"onImgManagerClosed()\">\n </wz-img-manager>\n </div>\n </ng-container>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.WzImgManagerComponent, selector: "wz-img-manager", inputs: ["stateDisplayed", "showSelection", "externalConfig", "forceToOpenCanva", "multipleImgMode", "showImgManagerModule"], outputs: ["imgManagerClosed"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
661
+ ImgManagerWebElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImgManagerWebElementComponent, deps: [{ token: i1$1.TranslateService }, { token: i2.CanvaService }, { token: FicheProductService }, { token: AuthCredentialsService }, { token: EventService }, { token: i2.ImgManagerService }, { token: i2.ImgSelectionService }, { token: WebelementImageManagerApiService }], target: i0.ɵɵFactoryTarget.Component });
662
+ ImgManagerWebElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ImgManagerWebElementComponent, selector: "img-manager-webelement", providers: [
663
+ ImgSelectionService
664
+ ], ngImport: i0, template: "<div class=\"info-bulle\">\n <p class=\"info-bulle-content\" [innerHTML]=\"'ImgManager.webElement.infoBulle' | translate\"></p>\n\n <ng-container *ngIf=\"imgManagerDisplayConfig.pageficheProduct && isPhotosTab\">\n <h3 class=\"wizicss-sous-titre\">{{'ImgManager.webElement.photosTitle' | translate }}</h3>\n </ng-container>\n\n <ng-container *ngIf=\"!loading && id_shop && imgManagerDisplayConfig\">\n\n <p class=\"img-manager-open\" *ngIf=\"imgManagerDisplayConfig.displayBtn && isPhotosTab\">\n <a (click)=\"open()\">{{'ImgManager.webElement.OpenBtn' | translate }}</a>\n </p>\n\n <div class=\"imgManagerBox\">\n <wz-img-manager\n #wzImgManager\n [stateDisplayed]=\"imgManagerDisplayConfig.stateDisplayed\"\n [multipleImgMode]=\"imgManagerDisplayConfig.multipleImgMode\"\n [showImgManagerModule]=\"imgManagerDisplayConfig.showImgManagerModule && openImgManager\"\n [showSelection]=\"imgManagerDisplayConfig.showSelection\"\n (imgManagerClosed)=\"onImgManagerClosed()\">\n </wz-img-manager>\n </div>\n </ng-container>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.WzImgManagerComponent, selector: "wz-img-manager", inputs: ["stateDisplayed", "showSelection", "forceToOpenCanva", "multipleImgMode", "showImgManagerModule"], outputs: ["imgManagerClosed", "imgSelectionChange"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
621
665
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImgManagerWebElementComponent, decorators: [{
622
666
  type: Component,
623
- args: [{ selector: 'img-manager-webelement', template: "<div class=\"info-bulle\">\n <p class=\"info-bulle-content\" [innerHTML]=\"'ImgManager.webElement.infoBulle' | translate\"></p>\n\n <ng-container *ngIf=\"imgManagerDisplayConfig.pageficheProduct && isPhotosTab\">\n <h3 class=\"wizicss-sous-titre\">{{'ImgManager.webElement.photosTitle' | translate }}</h3>\n </ng-container>\n\n <ng-container *ngIf=\"!loading && id_shop && imgManagerDisplayConfig\">\n\n <p class=\"img-manager-open\" *ngIf=\"imgManagerDisplayConfig.displayBtn && isPhotosTab\">\n <a (click)=\"open()\">{{'ImgManager.webElement.OpenBtn' | translate }}</a>\n </p>\n\n <div class=\"imgManagerBox\">\n <wz-img-manager\n #wzImgManager\n [stateDisplayed]=\"imgManagerDisplayConfig.stateDisplayed\"\n [multipleImgMode]=\"imgManagerDisplayConfig.multipleImgMode\"\n [showImgManagerModule]=\"imgManagerDisplayConfig.showImgManagerModule && openImgManager\"\n [showSelection]=\"imgManagerDisplayConfig.showSelection\"\n [externalConfig]=\"imgExternalConfig\"\n (imgManagerClosed)=\"onImgManagerClosed()\">\n </wz-img-manager>\n </div>\n </ng-container>\n</div>" }]
624
- }], ctorParameters: function () { return [{ type: i1$1.TranslateService }, { type: i2.ImgSelectionService }, { type: i2.CanvaService }, { type: FicheProductService }, { type: AuthCredentialsService }, { type: i1.HttpClient }, { type: EventService }, { type: i2.ImgManagerService }]; } });
667
+ args: [{ selector: 'img-manager-webelement', providers: [
668
+ ImgSelectionService
669
+ ], template: "<div class=\"info-bulle\">\n <p class=\"info-bulle-content\" [innerHTML]=\"'ImgManager.webElement.infoBulle' | translate\"></p>\n\n <ng-container *ngIf=\"imgManagerDisplayConfig.pageficheProduct && isPhotosTab\">\n <h3 class=\"wizicss-sous-titre\">{{'ImgManager.webElement.photosTitle' | translate }}</h3>\n </ng-container>\n\n <ng-container *ngIf=\"!loading && id_shop && imgManagerDisplayConfig\">\n\n <p class=\"img-manager-open\" *ngIf=\"imgManagerDisplayConfig.displayBtn && isPhotosTab\">\n <a (click)=\"open()\">{{'ImgManager.webElement.OpenBtn' | translate }}</a>\n </p>\n\n <div class=\"imgManagerBox\">\n <wz-img-manager\n #wzImgManager\n [stateDisplayed]=\"imgManagerDisplayConfig.stateDisplayed\"\n [multipleImgMode]=\"imgManagerDisplayConfig.multipleImgMode\"\n [showImgManagerModule]=\"imgManagerDisplayConfig.showImgManagerModule && openImgManager\"\n [showSelection]=\"imgManagerDisplayConfig.showSelection\"\n (imgManagerClosed)=\"onImgManagerClosed()\">\n </wz-img-manager>\n </div>\n </ng-container>\n</div>" }]
670
+ }], ctorParameters: function () { return [{ type: i1$1.TranslateService }, { type: i2.CanvaService }, { type: FicheProductService }, { type: AuthCredentialsService }, { type: EventService }, { type: i2.ImgManagerService }, { type: i2.ImgSelectionService }, { type: WebelementImageManagerApiService }]; } });
625
671
 
626
672
  class ImgManagerWebElementModule {
627
673
  }
628
674
  ImgManagerWebElementModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImgManagerWebElementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
629
675
  ImgManagerWebElementModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: ImgManagerWebElementModule, declarations: [ImgManagerWebElementComponent], imports: [CommonModule,
630
- HttpClientModule,
631
- WzImgManagerModule,
632
- TranslateModule], exports: [ImgManagerWebElementComponent] });
676
+ HttpClientModule, i2.WzImgManagerModule, TranslateModule], exports: [ImgManagerWebElementComponent] });
633
677
  ImgManagerWebElementModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImgManagerWebElementModule, providers: [
678
+ {
679
+ provide: WebelementImageManagerApiService,
680
+ useClass: WebelementImageManagerApiService,
681
+ },
634
682
  StorageService,
635
683
  FicheProductService,
636
684
  EventService,
637
685
  AuthCredentialsService
638
686
  ], imports: [CommonModule,
639
687
  HttpClientModule,
640
- WzImgManagerModule,
688
+ WzImgManagerModule.withConfig({
689
+ provide: ApiService,
690
+ useExisting: WebelementImageManagerApiService,
691
+ }),
641
692
  TranslateModule] });
642
693
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImgManagerWebElementModule, decorators: [{
643
694
  type: NgModule,
@@ -646,11 +697,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
646
697
  imports: [
647
698
  CommonModule,
648
699
  HttpClientModule,
649
- WzImgManagerModule,
700
+ WzImgManagerModule.withConfig({
701
+ provide: ApiService,
702
+ useExisting: WebelementImageManagerApiService,
703
+ }),
650
704
  TranslateModule,
651
705
  ],
652
706
  exports: [ImgManagerWebElementComponent],
653
707
  providers: [
708
+ {
709
+ provide: WebelementImageManagerApiService,
710
+ useClass: WebelementImageManagerApiService,
711
+ },
654
712
  StorageService,
655
713
  FicheProductService,
656
714
  EventService,
@@ -669,4 +727,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
669
727
 
670
728
  export { ImgManagerWebElementComponent, ImgManagerWebElementModule };
671
729
  //# sourceMappingURL=wizishop-img-manager-webelement.mjs.map
672
- //# sourceMappingURL=wizishop-img-manager-webelement.mjs.map