@wizishop/img-manager-webelement 15.0.10 → 15.2.1

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,102 @@ 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
+ getShopImgList(params) {
495
+ return this.http.get(`${this.CONFIG.image_manager_route}/images`, this.getOptionsHeaders(params));
496
+ }
497
+ getShopTotalImgList(params) {
498
+ return this.http.get(`${this.CONFIG.image_manager_route}/images`, this.getOptionsHeaders(params));
499
+ }
500
+ getShopImg(idFile) {
501
+ return this.http.get(`${this.CONFIG.image_manager_route}/images/${idFile}`, this.getOptionsHeaders());
502
+ }
503
+ uploadFile(formData) {
504
+ return this.http.post(`${this.CONFIG.image_manager_route}/images/template`, formData, this.getOptionsHeaders());
505
+ }
506
+ uploadFileByUrl(url, fileName) {
507
+ return this.http.post(`${this.CONFIG.image_manager_route}/images/template`, { url, fileName }, this.getOptionsHeaders());
508
+ }
509
+ replaceImg(imageBase64, id_file) {
510
+ const body = {
511
+ imageBase64,
512
+ type: "RAW"
513
+ };
514
+ return this.http.put(`${this.CONFIG.image_manager_route}/images/${id_file}/replace`, body, this.getOptionsHeaders());
515
+ }
516
+ changeImgName(fileName, id_file) {
517
+ return this.http.put(`${this.CONFIG.image_manager_route}/images/${id_file}?file_name=${fileName}`, null, this.getOptionsHeaders());
518
+ }
519
+ removeImg(id_file) {
520
+ return this.http.delete(`${this.CONFIG.image_manager_route}/images/${id_file}`, this.getOptionsHeaders());
521
+ }
522
+ removeMultipleImg(id_array) {
523
+ return this.http.post(`${this.CONFIG.image_manager_route}/images-multiple-delete`, { id_array }, this.getOptionsHeaders());
524
+ }
525
+ setShopCategory(shopId) {
526
+ return this.http.get(`${environment.wizi_api}/shops/${shopId}`, this.getOptionsHeaders()).pipe(tap((shop => {
527
+ if (shop && shop['category']) {
528
+ this.CONFIG.shop_category = shop['category'];
529
+ }
530
+ })));
531
+ }
532
+ }
533
+ WebelementImageManagerApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WebelementImageManagerApiService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
534
+ WebelementImageManagerApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WebelementImageManagerApiService });
535
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WebelementImageManagerApiService, decorators: [{
536
+ type: Injectable
537
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
538
+
463
539
  class ImgManagerWebElementComponent {
464
- constructor(translateService, imgSelectionService, canvaService, ficheProductService, authCredentialsService, http, eventService, imgManagerService) {
540
+ constructor(translateService, canvaService, ficheProductService, authCredentialsService, eventService, imgManagerService, imgSelectionService, webelementImageManagerApiService) {
465
541
  this.translateService = translateService;
466
- this.imgSelectionService = imgSelectionService;
467
542
  this.canvaService = canvaService;
468
543
  this.ficheProductService = ficheProductService;
469
544
  this.authCredentialsService = authCredentialsService;
470
- this.http = http;
471
545
  this.eventService = eventService;
472
546
  this.imgManagerService = imgManagerService;
547
+ this.imgSelectionService = imgSelectionService;
548
+ this.webelementImageManagerApiService = webelementImageManagerApiService;
473
549
  // img manger config
474
550
  this.openImgManager = false;
475
551
  this.loading = true;
476
- // fiche roduct config
552
+ // fiche product config
477
553
  this.isPhotosTab = !!environment.isPhotosTab;
478
554
  this.subscriptions = [];
479
555
  }
480
556
  ngOnInit() {
481
557
  this.loading = true;
482
- this.pageficheProductConfig = this.imgManagerService.getImgManagerDisplayConfig("fiche-product");
558
+ this.pageFicheProductConfig = this.imgManagerService.getImgManagerDisplayConfig("fiche-product");
483
559
  this.pageEventConfig = this.imgManagerService.getImgManagerDisplayConfig("wizi-block");
484
560
  this.setCurrentLanguage();
485
561
  // Search on which page is display the img manger
@@ -503,13 +579,11 @@ class ImgManagerWebElementComponent {
503
579
  return;
504
580
  }
505
581
  // Run on local Server
506
- this.setAppVars(null, environment.local.shopId, null, environment.local.token);
507
- this.setImgManagerExtraConfig();
508
- this.imgManagerDisplayConfig = this.pageficheProductConfig;
582
+ this.setAppVars(environment.local.shopId, environment.local.token);
583
+ this.imgManagerDisplayConfig = this.pageFicheProductConfig;
509
584
  return;
510
585
  }
511
- this.setAppVars(authCredentials.user_id, authCredentials.shop_id, authCredentials.account_id, authCredentials.token);
512
- this.setImgManagerExtraConfig();
586
+ this.setAppVars(authCredentials.shop_id, authCredentials.token);
513
587
  }
514
588
  setFicheProductPage() {
515
589
  this.ficheProductService.setApiConfig(this.id_shop, this.token_shop);
@@ -521,7 +595,7 @@ class ImgManagerWebElementComponent {
521
595
  setPageWithEvents() {
522
596
  this.subscribePageAskForImg();
523
597
  // Send img selected
524
- const subImgSelection = this.imgSelectionService.getImgSelectionChange().subscribe(imgSelectionList => {
598
+ const subImgSelection = this.imgSelectionService.imgSelection$.subscribe(imgSelectionList => {
525
599
  if (imgSelectionList && imgSelectionList.length) {
526
600
  this.eventService.sendImgSelectedToPage(imgSelectionList[0]);
527
601
  }
@@ -552,11 +626,11 @@ class ImgManagerWebElementComponent {
552
626
  }
553
627
  setDisplayedPageConfig() {
554
628
  const isFicheProductPage = /\/products\/(\d+\/edit|create)/.test(window.location.pathname);
555
- this.imgManagerDisplayConfig = isFicheProductPage ? this.pageficheProductConfig : this.pageEventConfig;
629
+ this.imgManagerDisplayConfig = isFicheProductPage ? this.pageFicheProductConfig : this.pageEventConfig;
556
630
  }
557
631
  handleFicheProductTab() {
558
632
  const tabsSub = this.ficheProductService.handleTabs().subscribe(isPhotosTab => {
559
- this.imgManagerDisplayConfig = isPhotosTab ? this.pageficheProductConfig : this.pageEventConfig;
633
+ this.imgManagerDisplayConfig = isPhotosTab ? this.pageFicheProductConfig : this.pageEventConfig;
560
634
  this.isPhotosTab = isPhotosTab;
561
635
  });
562
636
  this.subscriptions.push(tabsSub);
@@ -570,74 +644,48 @@ class ImgManagerWebElementComponent {
570
644
  getCredentials() {
571
645
  return from(this.authCredentialsService.get());
572
646
  }
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;
647
+ setAppVars(shopId, token) {
648
+ this.webelementImageManagerApiService.shopToken = token;
649
+ this.webelementImageManagerApiService.shopId = shopId;
650
+ if (shopId) {
651
+ this.webelementImageManagerApiService.setShopCategory(shopId).subscribe();
652
+ }
614
653
  }
615
654
  ngOnDestroy() {
616
655
  this.subscriptions.forEach(sub => sub.unsubscribe());
617
656
  }
618
657
  }
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" }] });
658
+ 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 });
659
+ ImgManagerWebElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ImgManagerWebElementComponent, selector: "img-manager-webelement", providers: [
660
+ ImgSelectionService
661
+ ], 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
662
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImgManagerWebElementComponent, decorators: [{
622
663
  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 }]; } });
664
+ args: [{ selector: 'img-manager-webelement', providers: [
665
+ ImgSelectionService
666
+ ], 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>" }]
667
+ }], 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
668
 
626
669
  class ImgManagerWebElementModule {
627
670
  }
628
671
  ImgManagerWebElementModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImgManagerWebElementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
629
672
  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] });
673
+ HttpClientModule, i2.WzImgManagerModule, TranslateModule], exports: [ImgManagerWebElementComponent] });
633
674
  ImgManagerWebElementModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImgManagerWebElementModule, providers: [
675
+ {
676
+ provide: WebelementImageManagerApiService,
677
+ useClass: WebelementImageManagerApiService,
678
+ },
634
679
  StorageService,
635
680
  FicheProductService,
636
681
  EventService,
637
682
  AuthCredentialsService
638
683
  ], imports: [CommonModule,
639
684
  HttpClientModule,
640
- WzImgManagerModule,
685
+ WzImgManagerModule.withConfig({
686
+ provide: ApiService,
687
+ useExisting: WebelementImageManagerApiService,
688
+ }),
641
689
  TranslateModule] });
642
690
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ImgManagerWebElementModule, decorators: [{
643
691
  type: NgModule,
@@ -646,11 +694,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
646
694
  imports: [
647
695
  CommonModule,
648
696
  HttpClientModule,
649
- WzImgManagerModule,
697
+ WzImgManagerModule.withConfig({
698
+ provide: ApiService,
699
+ useExisting: WebelementImageManagerApiService,
700
+ }),
650
701
  TranslateModule,
651
702
  ],
652
703
  exports: [ImgManagerWebElementComponent],
653
704
  providers: [
705
+ {
706
+ provide: WebelementImageManagerApiService,
707
+ useClass: WebelementImageManagerApiService,
708
+ },
654
709
  StorageService,
655
710
  FicheProductService,
656
711
  EventService,
@@ -669,4 +724,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
669
724
 
670
725
  export { ImgManagerWebElementComponent, ImgManagerWebElementModule };
671
726
  //# sourceMappingURL=wizishop-img-manager-webelement.mjs.map
672
- //# sourceMappingURL=wizishop-img-manager-webelement.mjs.map