@wizishop/img-manager 15.1.2 → 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.
- package/README.md +1 -0
- package/esm2020/lib/components/images-view/images-actions-handler.mjs +8 -8
- package/esm2020/lib/components/images-view/images-view.component.mjs +13 -10
- package/esm2020/lib/components/images-view/mosaic-view/img-card/img-card.component.mjs +7 -7
- package/esm2020/lib/components/images-view/mosaic-view/mosaic-view.component.mjs +7 -7
- package/esm2020/lib/components/images-view/table-view/table-view.component.mjs +7 -7
- package/esm2020/lib/components/img-editor/img-editor.component.mjs +52 -37
- package/esm2020/lib/components/img-upload/img-upload.component.mjs +16 -17
- package/esm2020/lib/components/pexels-lib/pexels-lib.component.mjs +12 -12
- package/esm2020/lib/components/upload-list/upload-list.component.mjs +2 -2
- package/esm2020/lib/dto/config/image-cdn/image-cdn-config.dto.mjs +2 -10
- package/esm2020/lib/services/alert.service.mjs +2 -2
- package/esm2020/lib/services/api.service.mjs +10 -0
- package/esm2020/lib/services/canva.service.mjs +36 -33
- package/esm2020/lib/services/config/img-cdn.service.mjs +5 -7
- package/esm2020/lib/services/img-manager.service.mjs +39 -51
- package/esm2020/lib/services/img-selection.service.mjs +20 -7
- package/esm2020/lib/services/pexels.service.mjs +15 -12
- package/esm2020/lib/services/rename-picture.service.mjs +12 -23
- package/esm2020/lib/services/upload.service.mjs +22 -0
- package/esm2020/lib/wz-img-manager.component.mjs +21 -21
- package/esm2020/lib/wz-img-manager.module.mjs +9 -1
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/wizishop-img-manager.mjs +283 -291
- package/fesm2015/wizishop-img-manager.mjs.map +1 -1
- package/fesm2020/wizishop-img-manager.mjs +383 -391
- package/fesm2020/wizishop-img-manager.mjs.map +1 -1
- package/lib/components/images-view/images-actions-handler.d.ts +3 -3
- package/lib/components/images-view/mosaic-view/img-card/img-card.component.d.ts +2 -2
- package/lib/components/images-view/mosaic-view/mosaic-view.component.d.ts +2 -2
- package/lib/components/images-view/table-view/table-view.component.d.ts +2 -2
- package/lib/components/img-editor/img-editor.component.d.ts +4 -2
- package/lib/components/img-upload/img-upload.component.d.ts +5 -5
- package/lib/components/pexels-lib/pexels-lib.component.d.ts +3 -3
- package/lib/dto/config/image-cdn/image-cdn-config.dto.d.ts +1 -1
- package/lib/services/alert.service.d.ts +1 -1
- package/lib/services/api.service.d.ts +27 -0
- package/lib/services/canva.service.d.ts +7 -9
- package/lib/services/config/img-cdn.service.d.ts +0 -2
- package/lib/services/img-manager.service.d.ts +14 -14
- package/lib/services/img-selection.service.d.ts +6 -0
- package/lib/services/pexels.service.d.ts +5 -5
- package/lib/services/rename-picture.service.d.ts +5 -7
- package/lib/services/upload.service.d.ts +10 -0
- package/lib/wz-img-manager.component.d.ts +2 -6
- package/lib/wz-img-manager.module.d.ts +2 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/wizishop-img-manager-15.2.1.tgz +0 -0
- package/wz-img-manager.scss +58 -58
- package/esm2020/lib/services/config/external-config.service.mjs +0 -49
- package/lib/services/config/external-config.service.d.ts +0 -24
- package/wizishop-img-manager-15.1.2.tgz +0 -0
|
@@ -5,12 +5,12 @@ import { stateDisplayed } from "../../dto/export-dtos.api";
|
|
|
5
5
|
import { PictureNameUpdate } from "../../dto/picture-name-update.dto";
|
|
6
6
|
import { ImgPictureDTO } from "../../dto/img-manager.dto";
|
|
7
7
|
import { AlertService } from "../../services/alert.service";
|
|
8
|
-
import { ImgManagerConfigService } from "../../services/config/external-config.service";
|
|
9
8
|
import { ImgCDNService } from "../../services/config/img-cdn.service";
|
|
10
9
|
import { ImgEventService } from "../../services/img-event.service";
|
|
11
10
|
import { ImgManagerService } from "../../services/img-manager.service";
|
|
12
11
|
import { ImgSelectionService } from "../../services/img-selection.service";
|
|
13
12
|
import { TableFilters } from "../../services/table/filters-table.service";
|
|
13
|
+
import { ApiService } from "../../services/api.service";
|
|
14
14
|
import * as i0 from "@angular/core";
|
|
15
15
|
export declare abstract class ImagesActionHandler {
|
|
16
16
|
protected imgManager: ImgManagerService;
|
|
@@ -20,7 +20,7 @@ export declare abstract class ImagesActionHandler {
|
|
|
20
20
|
protected imgEventCardService: ImgEventService;
|
|
21
21
|
protected alertService: AlertService;
|
|
22
22
|
protected translateService: TranslateService;
|
|
23
|
-
|
|
23
|
+
private apiService;
|
|
24
24
|
picturesList: ImgPictureDTO[];
|
|
25
25
|
picturesListChange: EventEmitter<void>;
|
|
26
26
|
tableFilters: TableFilters;
|
|
@@ -36,7 +36,7 @@ export declare abstract class ImagesActionHandler {
|
|
|
36
36
|
private getDataAPISub;
|
|
37
37
|
private errorRemoveImg;
|
|
38
38
|
private errorAlreadyUsedImg;
|
|
39
|
-
constructor(imgManager: ImgManagerService, imgSelectionService: ImgSelectionService, http: HttpClient, imgCDNService: ImgCDNService, imgEventCardService: ImgEventService, alertService: AlertService, translateService: TranslateService,
|
|
39
|
+
constructor(imgManager: ImgManagerService, imgSelectionService: ImgSelectionService, http: HttpClient, imgCDNService: ImgCDNService, imgEventCardService: ImgEventService, alertService: AlertService, translateService: TranslateService, apiService: ApiService);
|
|
40
40
|
/** Event emit when the header checkbox is checked */
|
|
41
41
|
onToggleAllCheckBoxRow(event: any): void;
|
|
42
42
|
onToggleDelSelection(index: number): void;
|
|
@@ -5,11 +5,11 @@ import { HttpClient } from '@angular/common/http';
|
|
|
5
5
|
import { ImgManagerService } from '../../../../services/img-manager.service';
|
|
6
6
|
import { ImgSelectionService } from '../../../../services/img-selection.service';
|
|
7
7
|
import { ImgCDNService } from '../../../../services/config/img-cdn.service';
|
|
8
|
-
import { ImgManagerConfigService } from '../../../../services/config/external-config.service';
|
|
9
8
|
import { TranslateService } from '@ngx-translate/core';
|
|
10
9
|
import { ImagesActionHandler } from '../../images-actions-handler';
|
|
11
10
|
import { tabDisplayed } from '../../../../dto/export-dtos.api';
|
|
12
11
|
import { AlertService } from '../../../../services/alert.service';
|
|
12
|
+
import { ApiService } from '../../../../services/api.service';
|
|
13
13
|
import * as i0 from "@angular/core";
|
|
14
14
|
export declare class ImgCardComponent extends ImagesActionHandler implements OnInit {
|
|
15
15
|
tabDisplayed: tabDisplayed;
|
|
@@ -21,7 +21,7 @@ export declare class ImgCardComponent extends ImagesActionHandler implements OnI
|
|
|
21
21
|
switchDisplayWindow: EventEmitter<boolean>;
|
|
22
22
|
isUploadSection: boolean;
|
|
23
23
|
activeConfirmDelete: boolean;
|
|
24
|
-
constructor(imgManager: ImgManagerService, imgSelectionService: ImgSelectionService, http: HttpClient, imgCDNService: ImgCDNService, imgEventCardService: ImgEventService, alertService: AlertService, translateService: TranslateService,
|
|
24
|
+
constructor(imgManager: ImgManagerService, imgSelectionService: ImgSelectionService, http: HttpClient, imgCDNService: ImgCDNService, imgEventCardService: ImgEventService, alertService: AlertService, translateService: TranslateService, apiService: ApiService);
|
|
25
25
|
ngOnInit(): void;
|
|
26
26
|
displayLargeWindow(): void;
|
|
27
27
|
onToggleImgSelected(): void;
|
|
@@ -3,19 +3,19 @@ import { EventEmitter, OnInit } from '@angular/core';
|
|
|
3
3
|
import { TranslateService } from '@ngx-translate/core';
|
|
4
4
|
import { PictureNameUpdate, tabDisplayed } from '../../../dto/export-dtos.api';
|
|
5
5
|
import { AlertService } from '../../../services/alert.service';
|
|
6
|
-
import { ImgManagerConfigService } from '../../../services/config/external-config.service';
|
|
7
6
|
import { ImgCDNService } from '../../../services/config/img-cdn.service';
|
|
8
7
|
import { ImgEventService } from '../../../services/img-event.service';
|
|
9
8
|
import { ImgManagerService } from '../../../services/img-manager.service';
|
|
10
9
|
import { ImgSelectionService } from '../../../services/img-selection.service';
|
|
11
10
|
import { ImagesActionHandler } from '../images-actions-handler';
|
|
11
|
+
import { ApiService } from '../../../services/api.service';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
13
13
|
export declare class MosaicViewComponent extends ImagesActionHandler implements OnInit {
|
|
14
14
|
tabDisplayed: tabDisplayed;
|
|
15
15
|
fullSize: boolean;
|
|
16
16
|
nbFakeImg: number;
|
|
17
17
|
switchDisplayWindow: EventEmitter<boolean>;
|
|
18
|
-
constructor(imgManager: ImgManagerService, imgSelectionService: ImgSelectionService, http: HttpClient, imgCDNService: ImgCDNService, imgEventCardService: ImgEventService, alertService: AlertService, translateService: TranslateService,
|
|
18
|
+
constructor(imgManager: ImgManagerService, imgSelectionService: ImgSelectionService, http: HttpClient, imgCDNService: ImgCDNService, imgEventCardService: ImgEventService, alertService: AlertService, translateService: TranslateService, apiService: ApiService);
|
|
19
19
|
ngOnInit(): void;
|
|
20
20
|
onSearchChange(event: string): void;
|
|
21
21
|
onCardRenamePicture(pictureRenamed: PictureNameUpdate): void;
|
|
@@ -2,16 +2,16 @@ import { HttpClient } from '@angular/common/http';
|
|
|
2
2
|
import { OnInit } from '@angular/core';
|
|
3
3
|
import { TranslateService } from '@ngx-translate/core';
|
|
4
4
|
import { AlertService } from '../../../services/alert.service';
|
|
5
|
-
import { ImgManagerConfigService } from '../../../services/config/external-config.service';
|
|
6
5
|
import { ImgCDNService } from '../../../services/config/img-cdn.service';
|
|
7
6
|
import { ImgEventService } from '../../../services/img-event.service';
|
|
8
7
|
import { ImgManagerService } from '../../../services/img-manager.service';
|
|
9
8
|
import { ImgSelectionService } from '../../../services/img-selection.service';
|
|
10
9
|
import { ImagesActionHandler } from '../images-actions-handler';
|
|
10
|
+
import { ApiService } from '../../../services/api.service';
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
12
12
|
export declare class TableViewComponent extends ImagesActionHandler implements OnInit {
|
|
13
13
|
dataTableName: string;
|
|
14
|
-
constructor(imgManager: ImgManagerService, imgSelectionService: ImgSelectionService, http: HttpClient, imgCDNService: ImgCDNService, imgEventCardService: ImgEventService, alertService: AlertService, translateService: TranslateService,
|
|
14
|
+
constructor(imgManager: ImgManagerService, imgSelectionService: ImgSelectionService, http: HttpClient, imgCDNService: ImgCDNService, imgEventCardService: ImgEventService, alertService: AlertService, translateService: TranslateService, apiService: ApiService);
|
|
15
15
|
ngOnInit(): void;
|
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableViewComponent, never>;
|
|
17
17
|
static ɵcmp: i0.ɵɵComponentDeclaration<TableViewComponent, "table-view", never, {}, {}, never, never, false, never>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { OnInit, EventEmitter } from '@angular/core';
|
|
2
2
|
import { ImgPictureDTO } from '../../dto/img-manager.dto';
|
|
3
3
|
import { ImgManagerService } from '../../services/img-manager.service';
|
|
4
|
+
import { RenamePictureService } from '../../services/rename-picture.service';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class ImgEditorComponent implements OnInit {
|
|
6
7
|
private imgManagerService;
|
|
8
|
+
private renamePictureService;
|
|
7
9
|
stateDisplayed: any;
|
|
8
10
|
imgToEdit: ImgPictureDTO;
|
|
9
11
|
editClosed: EventEmitter<any>;
|
|
@@ -15,14 +17,14 @@ export declare class ImgEditorComponent implements OnInit {
|
|
|
15
17
|
msgFailSave: string;
|
|
16
18
|
msgFailLoad: string;
|
|
17
19
|
msgSuccessEdit: string;
|
|
18
|
-
constructor(imgManagerService: ImgManagerService);
|
|
20
|
+
constructor(imgManagerService: ImgManagerService, renamePictureService: RenamePictureService);
|
|
19
21
|
ngOnInit(): void;
|
|
20
22
|
onSave(): void;
|
|
21
23
|
onEditClosed(msgKey?: string): void;
|
|
22
24
|
onRestartEdit(): void;
|
|
23
25
|
onCancel(): void;
|
|
24
26
|
onImgCropped(imgBase64: string): void;
|
|
25
|
-
private
|
|
27
|
+
private renameAndReplaceImg;
|
|
26
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<ImgEditorComponent, never>;
|
|
27
29
|
static ɵcmp: i0.ɵɵComponentDeclaration<ImgEditorComponent, "img-editor", never, { "stateDisplayed": "stateDisplayed"; "imgToEdit": "imgToEdit"; }, { "editClosed": "editClosed"; }, never, never, false, never>;
|
|
28
30
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { OnInit, EventEmitter, ElementRef } from '@angular/core';
|
|
2
|
-
import { ImgManagerService } from '../../services/img-manager.service';
|
|
3
2
|
import { ImgPictureDTO } from '../../dto/img-manager.dto';
|
|
4
|
-
import { ImgManagerConfigService } from "../../services/config/external-config.service";
|
|
5
3
|
import { stateDisplayed } from '../../dto/export-dtos.api';
|
|
6
4
|
import { AlertService } from '../../services/alert.service';
|
|
7
5
|
import { TranslateService } from '@ngx-translate/core';
|
|
6
|
+
import { UploadService } from '../../services/upload.service';
|
|
7
|
+
import { ApiService } from '../../services/api.service';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export declare class ImgUploadComponent implements OnInit {
|
|
10
|
-
private imgManager;
|
|
11
10
|
private alertService;
|
|
12
|
-
private
|
|
11
|
+
private apiService;
|
|
13
12
|
private translateService;
|
|
13
|
+
private uploadService;
|
|
14
14
|
files: any;
|
|
15
15
|
isLoading: boolean;
|
|
16
16
|
assetsIcon: string;
|
|
@@ -21,7 +21,7 @@ export declare class ImgUploadComponent implements OnInit {
|
|
|
21
21
|
errorUploadingImg: string;
|
|
22
22
|
errorNotImg: string;
|
|
23
23
|
MAX_IMAGE_SIZE: number;
|
|
24
|
-
constructor(
|
|
24
|
+
constructor(alertService: AlertService, apiService: ApiService, translateService: TranslateService, uploadService: UploadService);
|
|
25
25
|
ngOnInit(): void;
|
|
26
26
|
filesChangeByClick(event: any): void;
|
|
27
27
|
getAssets(): string;
|
|
@@ -2,16 +2,16 @@ import { AfterViewInit, ElementRef, OnInit, EventEmitter } from '@angular/core';
|
|
|
2
2
|
import { PexelsService } from '../../services/pexels.service';
|
|
3
3
|
import { Subject } from 'rxjs';
|
|
4
4
|
import { WzImgLibDto, PhotosColumns, WzImgLibPhotoDto } from '../../dto/pexels-img.dto';
|
|
5
|
-
import { ImgManagerService } from '../../services/img-manager.service';
|
|
6
5
|
import { TranslateService } from '@ngx-translate/core';
|
|
7
6
|
import { stateDisplayed } from '../../dto/export-dtos.api';
|
|
8
7
|
import { AlertService } from '../../services/alert.service';
|
|
8
|
+
import { UploadService } from '../../services/upload.service';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
export declare class PexelLibComponent implements OnInit, AfterViewInit {
|
|
11
11
|
private wzImgLibService;
|
|
12
|
-
private imgManager;
|
|
13
12
|
private alertService;
|
|
14
13
|
private translateService;
|
|
14
|
+
private uploadService;
|
|
15
15
|
stateDisplayed: stateDisplayed;
|
|
16
16
|
searchValue: string;
|
|
17
17
|
/** Pass to true to hide search input */
|
|
@@ -36,7 +36,7 @@ export declare class PexelLibComponent implements OnInit, AfterViewInit {
|
|
|
36
36
|
errorRetrievePhotos: string;
|
|
37
37
|
private subs;
|
|
38
38
|
set content(control: ElementRef);
|
|
39
|
-
constructor(wzImgLibService: PexelsService,
|
|
39
|
+
constructor(wzImgLibService: PexelsService, alertService: AlertService, translateService: TranslateService, uploadService: UploadService);
|
|
40
40
|
ngOnInit(): void;
|
|
41
41
|
ngAfterViewInit(): void;
|
|
42
42
|
setNbColumnsToDisplayPhoto(): void;
|
|
@@ -10,7 +10,7 @@ export declare class AlertService {
|
|
|
10
10
|
private alertRefComponent;
|
|
11
11
|
constructor(nwbAlertService: NwbAlertService, translateService: TranslateService);
|
|
12
12
|
openAlert(msgKey: string): void;
|
|
13
|
-
|
|
13
|
+
openAlertWithBackendResponse(msgKey: string, msgBackend: string): void;
|
|
14
14
|
private closePreviousAlert;
|
|
15
15
|
private setAlertColor;
|
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<AlertService, never>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ImgPictureDTO, ImgPicturesDTO, ParamsImgManagerDTO } from '../dto/img-manager.dto';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ImgCDNConfigDTO } from '../dto/export-dtos.api';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare abstract class ApiService {
|
|
6
|
+
abstract CONFIG: {
|
|
7
|
+
image_manager_route: string;
|
|
8
|
+
canva_token: string;
|
|
9
|
+
canva_url: string;
|
|
10
|
+
pexels_token: string;
|
|
11
|
+
pexels_route: string;
|
|
12
|
+
shop_category: string;
|
|
13
|
+
assets_route: string;
|
|
14
|
+
};
|
|
15
|
+
abstract IMG_SIZE: ImgCDNConfigDTO;
|
|
16
|
+
abstract getShopImgList(params?: ParamsImgManagerDTO): Observable<ImgPicturesDTO>;
|
|
17
|
+
abstract getShopTotalImgList(params?: ParamsImgManagerDTO): Observable<ImgPicturesDTO>;
|
|
18
|
+
abstract getShopImg(idFile: string): Observable<ImgPictureDTO>;
|
|
19
|
+
abstract uploadFile(formData: FormData): any;
|
|
20
|
+
abstract uploadFileByUrl(url: string, fileName?: string): any;
|
|
21
|
+
abstract replaceImg(imageBase64: string, id_file: string): any;
|
|
22
|
+
abstract changeImgName(fileName: string, id_file: string): any;
|
|
23
|
+
abstract removeImg(id_file: string): any;
|
|
24
|
+
abstract removeMultipleImg(id_array: string[]): any;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ApiService, never>;
|
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ApiService>;
|
|
27
|
+
}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { CanvaButtonApi } from '../dto/canva.dto';
|
|
3
|
-
import { ImgManagerConfigService } from './config/external-config.service';
|
|
4
3
|
import { WiziBlockMediaDto } from '../dto/wizi-block-media.dto';
|
|
5
4
|
import { AlertService } from './alert.service';
|
|
6
|
-
import { ImgManagerService } from './img-manager.service';
|
|
7
5
|
import { ImgEventService } from './img-event.service';
|
|
8
6
|
import { TranslateService } from '@ngx-translate/core';
|
|
7
|
+
import { UploadService } from './upload.service';
|
|
8
|
+
import { ApiService } from './api.service';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
export declare class CanvaService {
|
|
11
|
-
private externalConfigService;
|
|
12
|
-
private imgManager;
|
|
13
11
|
private wzImgEventService;
|
|
14
12
|
private alertService;
|
|
15
13
|
private translateService;
|
|
14
|
+
private uploadService;
|
|
15
|
+
private apiService;
|
|
16
16
|
canvaApi: any;
|
|
17
|
-
canvaApiURL: string;
|
|
18
|
-
canvaApiKey: string;
|
|
19
|
-
canvaLogoRoute: string;
|
|
17
|
+
get canvaApiURL(): string;
|
|
18
|
+
get canvaApiKey(): string;
|
|
20
19
|
imgLoading: boolean;
|
|
21
20
|
uploadingImg: string;
|
|
22
21
|
successUploadPhoto: string;
|
|
@@ -25,8 +24,7 @@ export declare class CanvaService {
|
|
|
25
24
|
forceToOpenCanva: boolean;
|
|
26
25
|
private bindExpectedImgSizeEvent;
|
|
27
26
|
private bindExpectedSizeDone;
|
|
28
|
-
constructor(
|
|
29
|
-
private setCanvaApiConfig;
|
|
27
|
+
constructor(wzImgEventService: ImgEventService, alertService: AlertService, translateService: TranslateService, uploadService: UploadService, apiService: ApiService);
|
|
30
28
|
getCanvaLogo(): string;
|
|
31
29
|
bindEventExepectedImgSizeChange(): Observable<WiziBlockMediaDto>;
|
|
32
30
|
expectedImgSizesChange(mediaDTO: WiziBlockMediaDto): void;
|
|
@@ -2,8 +2,6 @@ import { ImgCDNConfigDTO } from '../../dto/config/image-cdn/image-cdn-config.dto
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class ImgCDNService {
|
|
4
4
|
imgCDNConfig: ImgCDNConfigDTO;
|
|
5
|
-
constructor();
|
|
6
|
-
setImgCDNConfig(imgCDNConfig: ImgCDNConfigDTO): void;
|
|
7
5
|
getUrlImg(size: '100' | '200' | '400' | '800' | 'raw' | string): any;
|
|
8
6
|
getAllSize(): string[];
|
|
9
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<ImgCDNService, never>;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Optional } from '@angular/core';
|
|
2
|
+
import { HttpParams } from '@angular/common/http';
|
|
2
3
|
import { Observable } from "rxjs";
|
|
3
4
|
import { ImgPictureDTO, ImgPicturesDTO, ParamsImgManagerDTO } from '../dto/img-manager.dto';
|
|
4
5
|
import { ImgManagerDisplayConfig } from '../dto/export-dtos.api';
|
|
5
6
|
import { ImgManagerConfig } from '../dto/config/img-manager';
|
|
7
|
+
import { ApiService } from './api.service';
|
|
6
8
|
import * as i0 from "@angular/core";
|
|
7
9
|
export declare class ImgManagerService {
|
|
8
|
-
private
|
|
9
|
-
imgManagerRoute: string;
|
|
10
|
-
shopToken: string;
|
|
10
|
+
private apiService;
|
|
11
11
|
params: HttpParams;
|
|
12
12
|
private pageFicheProductConfig;
|
|
13
13
|
private angularFicheProductConfig;
|
|
14
14
|
private wiziblockConfig;
|
|
15
15
|
private simpleWithButtonOpenerConfig;
|
|
16
16
|
private fullWindowConfig;
|
|
17
|
-
constructor(
|
|
18
|
-
setApiConfig(img_manager_route: string, shop_token: string): void;
|
|
19
|
-
private getOptionsHeaders;
|
|
17
|
+
constructor(apiService: ApiService);
|
|
20
18
|
shopImgList: ImgPicturesDTO;
|
|
21
19
|
previousParams: ParamsImgManagerDTO;
|
|
22
20
|
getShopImgList(params?: ParamsImgManagerDTO): Observable<ImgPicturesDTO>;
|
|
23
21
|
getShopTotalImgList(params?: ParamsImgManagerDTO): Observable<any>;
|
|
24
|
-
getShopImg(idFile: string): Observable<
|
|
22
|
+
getShopImg(idFile: string): Observable<ImgPictureDTO>;
|
|
25
23
|
resetParams(params: ParamsImgManagerDTO): void;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
changeImgName(fileName: string, id_file: string): Observable<Object>;
|
|
30
|
-
removeImg(id_file: string): Observable<Object>;
|
|
31
|
-
removeMultipleImg(id_array: string[]): Observable<Object>;
|
|
24
|
+
replaceImg(imageBase64: string, id_file: string): any;
|
|
25
|
+
removeImg(id_file: string): any;
|
|
26
|
+
removeMultipleImg(id_array: string[]): any;
|
|
32
27
|
getImgManagerDisplayConfig(displayName: ImgManagerConfig): ImgManagerDisplayConfig;
|
|
33
28
|
getAllImgManagerDisplayConfig(): ImgManagerDisplayConfig[];
|
|
34
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<ImgManagerService, never>;
|
|
35
30
|
static ɵprov: i0.ɵɵInjectableDeclaration<ImgManagerService>;
|
|
36
31
|
}
|
|
32
|
+
export declare const ImgManagerServiceProvider: {
|
|
33
|
+
provide: typeof ImgManagerService;
|
|
34
|
+
useFactory: (parentService: ImgManagerService, apiService: ApiService) => ImgManagerService;
|
|
35
|
+
deps: (Optional[] | typeof ApiService)[];
|
|
36
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Optional } from '@angular/core';
|
|
1
2
|
import { ImgPictureDTO } from '../dto/img-manager.dto';
|
|
2
3
|
import { BehaviorSubject } from 'rxjs';
|
|
3
4
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
@@ -25,3 +26,8 @@ export declare class ImgSelectionService {
|
|
|
25
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<ImgSelectionService, never>;
|
|
26
27
|
static ɵprov: i0.ɵɵInjectableDeclaration<ImgSelectionService>;
|
|
27
28
|
}
|
|
29
|
+
export declare const ImgSelectionServiceProvider: {
|
|
30
|
+
provide: typeof ImgSelectionService;
|
|
31
|
+
useFactory: (parentService: ImgSelectionService) => ImgSelectionService;
|
|
32
|
+
deps: Optional[][];
|
|
33
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
3
|
import { WzImgLibDto } from "../dto/pexels-img.dto";
|
|
4
|
-
import { ImgManagerConfigService } from './config/external-config.service';
|
|
5
4
|
import { TranslateService } from '@ngx-translate/core';
|
|
5
|
+
import { ApiService } from './api.service';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class PexelsService {
|
|
8
8
|
private http;
|
|
9
|
-
private
|
|
9
|
+
private apiService;
|
|
10
10
|
private translateService;
|
|
11
|
-
apiBaseUrl:
|
|
12
|
-
apiKey:
|
|
11
|
+
get apiBaseUrl(): string;
|
|
12
|
+
get apiKey(): string;
|
|
13
13
|
lang: string;
|
|
14
14
|
languages: {
|
|
15
15
|
fr: string;
|
|
@@ -17,7 +17,7 @@ export declare class PexelsService {
|
|
|
17
17
|
it: string;
|
|
18
18
|
es: string;
|
|
19
19
|
};
|
|
20
|
-
constructor(http: HttpClient,
|
|
20
|
+
constructor(http: HttpClient, apiService: ApiService, translateService: TranslateService);
|
|
21
21
|
setLang(lang: string): void;
|
|
22
22
|
searchOnPexels(toSearch: string, perPage: number, page: number): Observable<WzImgLibDto>;
|
|
23
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<PexelsService, never>;
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import { ImgManagerService } from './img-manager.service';
|
|
2
1
|
import { AlertService } from './alert.service';
|
|
3
2
|
import { ImgPictureDTO } from '../dto/img-manager.dto';
|
|
4
3
|
import { PictureNameUpdate } from '../dto/picture-name-update.dto';
|
|
4
|
+
import { ApiService } from './api.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class RenamePictureService {
|
|
7
|
-
private
|
|
7
|
+
private apiService;
|
|
8
8
|
private alertService;
|
|
9
9
|
private picturesList;
|
|
10
|
-
private pictureNameChanged;
|
|
11
10
|
private errorRenameImg;
|
|
12
11
|
private msgSavingImgName;
|
|
13
12
|
private msgImgNameSaved;
|
|
14
|
-
constructor(
|
|
13
|
+
constructor(apiService: ApiService, alertService: AlertService);
|
|
15
14
|
setPicturesList(picturesList: ImgPictureDTO[]): void;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
private renamePicture;
|
|
15
|
+
renamePicture(pictureNameUpdate: PictureNameUpdate): void;
|
|
16
|
+
changeImageName(name: string, idFile: string): any;
|
|
19
17
|
private getPictureById;
|
|
20
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<RenamePictureService, never>;
|
|
21
19
|
static ɵprov: i0.ɵɵInjectableDeclaration<RenamePictureService>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ApiService } from './api.service';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class UploadService {
|
|
4
|
+
private apiService;
|
|
5
|
+
constructor(apiService: ApiService);
|
|
6
|
+
uploadFile(formData: FormData): any;
|
|
7
|
+
uploadFileByUrl(url: string, fileName?: string): any;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UploadService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UploadService>;
|
|
10
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { OnInit, EventEmitter } from '@angular/core';
|
|
2
2
|
import { ImgSelectionService } from './services/img-selection.service';
|
|
3
|
-
import { ImgManagerConfigDto } from './dto/config/external/external-config.dto';
|
|
4
|
-
import { ImgManagerConfigService } from './services/config/external-config.service';
|
|
5
3
|
import { Subscription } from 'rxjs';
|
|
6
4
|
import { UserSettingsService } from './services/user-settings.service';
|
|
7
5
|
import { CanvaService } from './services/canva.service';
|
|
@@ -12,14 +10,12 @@ import { WiziBlockMediaDto } from './dto/wizi-block-media.dto';
|
|
|
12
10
|
import * as i0 from "@angular/core";
|
|
13
11
|
export declare class WzImgManagerComponent implements OnInit {
|
|
14
12
|
private imgSelectionService;
|
|
15
|
-
private externalConfigService;
|
|
16
13
|
private userSettingsService;
|
|
17
14
|
private canvaService;
|
|
18
15
|
private imgEventService;
|
|
19
16
|
private domService;
|
|
20
17
|
stateDisplayed: stateDisplayed;
|
|
21
18
|
showSelection: boolean;
|
|
22
|
-
externalConfig: ImgManagerConfigDto;
|
|
23
19
|
set forceToOpenCanva(forceToOpenCanva: boolean | WiziBlockMediaDto);
|
|
24
20
|
imgManagerClosed: EventEmitter<any>;
|
|
25
21
|
private _multipleImgMode;
|
|
@@ -37,7 +33,7 @@ export declare class WzImgManagerComponent implements OnInit {
|
|
|
37
33
|
hideTab: boolean;
|
|
38
34
|
private overflowHTML;
|
|
39
35
|
private bodyPadding;
|
|
40
|
-
constructor(imgSelectionService: ImgSelectionService,
|
|
36
|
+
constructor(imgSelectionService: ImgSelectionService, userSettingsService: UserSettingsService, canvaService: CanvaService, imgEventService: ImgEventService, domService: DomService);
|
|
41
37
|
ngOnInit(): void;
|
|
42
38
|
checkUserDisplayPreference(): void;
|
|
43
39
|
setCurrentTab(event: any): void;
|
|
@@ -57,5 +53,5 @@ export declare class WzImgManagerComponent implements OnInit {
|
|
|
57
53
|
changeDisplayTab(): void;
|
|
58
54
|
ngOnDestroy(): void;
|
|
59
55
|
static ɵfac: i0.ɵɵFactoryDeclaration<WzImgManagerComponent, never>;
|
|
60
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<WzImgManagerComponent, "wz-img-manager", never, { "stateDisplayed": "stateDisplayed"; "showSelection": "showSelection"; "
|
|
56
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WzImgManagerComponent, "wz-img-manager", never, { "stateDisplayed": "stateDisplayed"; "showSelection": "showSelection"; "forceToOpenCanva": "forceToOpenCanva"; "multipleImgMode": "multipleImgMode"; "showImgManagerModule": "showImgManagerModule"; }, { "imgManagerClosed": "imgManagerClosed"; "imgSelectionChange": "imgSelectionChange"; }, never, never, false, never>;
|
|
61
57
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ModuleWithProviders, Provider } from '@angular/core';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
import * as i1 from "./wz-img-manager.component";
|
|
3
4
|
import * as i2 from "./components/img-tabs/img-tabs.component";
|
|
@@ -51,6 +52,7 @@ import * as i49 from "@angular/cdk/table";
|
|
|
51
52
|
import * as i50 from "@angular/cdk/drag-drop";
|
|
52
53
|
import * as i51 from "@ngx-translate/core";
|
|
53
54
|
export declare class WzImgManagerModule {
|
|
55
|
+
static withConfig(ApiService: Provider): ModuleWithProviders<WzImgManagerModule>;
|
|
54
56
|
static ɵfac: i0.ɵɵFactoryDeclaration<WzImgManagerModule, never>;
|
|
55
57
|
static ɵmod: i0.ɵɵNgModuleDeclaration<WzImgManagerModule, [typeof i1.WzImgManagerComponent, typeof i2.ImgTabsComponent, typeof i3.ImgUploadComponent, typeof i4.PexelLibComponent, typeof i5.ImgCardComponent, typeof i6.UploadListComponent, typeof i7.ImgEditorComponent, typeof i8.EditorInfoSectionComponent, typeof i9.CanvaBtnComponent, typeof i10.ImgSelectionComponent, typeof i11.LoaderComponent, typeof i12.DropdownComponent, typeof i13.CropperComponent, typeof i14.ImagesViewComponent, typeof i15.MosaicViewComponent, typeof i16.TableViewComponent, typeof i17.TableComponent, typeof i18.InputSearchComponent, typeof i19.PaginationComponent, typeof i20.CheckboxComponent, typeof i21.AlertComponent, typeof i22.PageSelectorComponent, typeof i23.SelectComponent, typeof i24.DragDropDirective, typeof i25.LoadingDirective, typeof i26.AutoHideDirective, typeof i27.CopyClipboardDirective, typeof i28.TableColumn, typeof i29.CheckBoxRow, typeof i30.TableColumnHeader, typeof i31.TableRow, typeof i32.AbstractDebounceDirective, typeof i33.DebounceKeyupDirective, typeof i34.ZindexToggleDirective, typeof i35.PagniationArrayTotalPages, typeof i36.PagniationIsLastPage, typeof i37.PagniationText, typeof i38.ImageSrcPipe, typeof i39.NumberToArray, typeof i40.LargeNumberOfPagePipe, typeof i41.SelectFiltersPipe], [typeof i42.CommonModule, typeof i43.HttpClientModule, typeof i44.FormsModule, typeof i45.NgScrollbarModule, typeof i46.NgScrollbarReachedModule, typeof i47.NwbAllModule, typeof i48.ImageCropperModule, typeof i49.CdkTableModule, typeof i50.DragDropModule, typeof i51.TranslateModule], [typeof i1.WzImgManagerComponent]>;
|
|
56
58
|
static ɵinj: i0.ɵɵInjectorDeclaration<WzImgManagerModule>;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { WzImgManagerComponent } from './lib/wz-img-manager.component';
|
|
|
3
3
|
export { ImgSelectionService } from './lib/services/img-selection.service';
|
|
4
4
|
export { ImgManagerService } from './lib/services/img-manager.service';
|
|
5
5
|
export { RenamePictureService } from './lib/services/rename-picture.service';
|
|
6
|
+
export { ApiService } from './lib/services/api.service';
|
|
6
7
|
export { CanvaService } from './lib/services/canva.service';
|
|
7
8
|
export * from './lib/dto/ImgManagerDisplayConfig.dto';
|
|
8
9
|
export * from './lib/dto/export-dtos.api';
|
|
Binary file
|
package/wz-img-manager.scss
CHANGED
|
@@ -2941,64 +2941,7 @@ $green-color: #2ecc71;
|
|
|
2941
2941
|
|
|
2942
2942
|
.dropdownWizi:not(.is-hoverable) {
|
|
2943
2943
|
cursor: not-allowed;
|
|
2944
|
-
}.wz-img-manager .
|
|
2945
|
-
padding: 10px 20px;
|
|
2946
|
-
background-color: $gray-background;
|
|
2947
|
-
@include media('<tablet') {
|
|
2948
|
-
padding: 0!important;
|
|
2949
|
-
background-color: $white;
|
|
2950
|
-
}
|
|
2951
|
-
&.small-padding {
|
|
2952
|
-
padding: 10px 20px;
|
|
2953
|
-
}
|
|
2954
|
-
.input,
|
|
2955
|
-
.input:focus,
|
|
2956
|
-
.input.is-focused,
|
|
2957
|
-
.input:active,
|
|
2958
|
-
.input.is-active {
|
|
2959
|
-
font-size: rem(14);
|
|
2960
|
-
color: $main-text;
|
|
2961
|
-
border: rem(1) solid $input-border-search;
|
|
2962
|
-
box-shadow: none;
|
|
2963
|
-
padding: rem(13.5) rem(20) rem(13.5) rem(48);
|
|
2964
|
-
border-radius: rem(3);
|
|
2965
|
-
margin: 0;
|
|
2966
|
-
height: auto;
|
|
2967
|
-
min-height: unset;
|
|
2968
|
-
|
|
2969
|
-
&::placeholder {
|
|
2970
|
-
color: $placeholder-color;
|
|
2971
|
-
font-weight: normal;
|
|
2972
|
-
}
|
|
2973
|
-
}
|
|
2974
|
-
|
|
2975
|
-
.input:focus,
|
|
2976
|
-
.input.is-focused,
|
|
2977
|
-
.input:active,
|
|
2978
|
-
.input.is-active {
|
|
2979
|
-
border-color: $wizishop-blue;
|
|
2980
|
-
}
|
|
2981
|
-
|
|
2982
|
-
.icon {
|
|
2983
|
-
position: absolute;
|
|
2984
|
-
top: 50%;
|
|
2985
|
-
left: 20px;
|
|
2986
|
-
font-size: rem(18);
|
|
2987
|
-
transform: translateY(-50%);
|
|
2988
|
-
pointer-events: none;
|
|
2989
|
-
font-weight: 400;
|
|
2990
|
-
color: $placeholder-color;
|
|
2991
|
-
margin: 0;
|
|
2992
|
-
width: rem(18);
|
|
2993
|
-
height: rem(18);
|
|
2994
|
-
}
|
|
2995
|
-
}
|
|
2996
|
-
|
|
2997
|
-
.wz-img-manager .wz-img-manager__module:not(.wz-img-manager__module--window) .pexels-lib__search .input-search.field {
|
|
2998
|
-
padding: 0;
|
|
2999
|
-
background-color: transparent;
|
|
3000
|
-
}
|
|
3001
|
-
.wz-img-manager .wz-pagination {
|
|
2944
|
+
}.wz-img-manager .wz-pagination {
|
|
3002
2945
|
width: 100%;
|
|
3003
2946
|
padding: 0;
|
|
3004
2947
|
|
|
@@ -3110,6 +3053,63 @@ $green-color: #2ecc71;
|
|
|
3110
3053
|
}
|
|
3111
3054
|
}
|
|
3112
3055
|
}
|
|
3056
|
+
.wz-img-manager .input-search.field {
|
|
3057
|
+
padding: 10px 20px;
|
|
3058
|
+
background-color: $gray-background;
|
|
3059
|
+
@include media('<tablet') {
|
|
3060
|
+
padding: 0!important;
|
|
3061
|
+
background-color: $white;
|
|
3062
|
+
}
|
|
3063
|
+
&.small-padding {
|
|
3064
|
+
padding: 10px 20px;
|
|
3065
|
+
}
|
|
3066
|
+
.input,
|
|
3067
|
+
.input:focus,
|
|
3068
|
+
.input.is-focused,
|
|
3069
|
+
.input:active,
|
|
3070
|
+
.input.is-active {
|
|
3071
|
+
font-size: rem(14);
|
|
3072
|
+
color: $main-text;
|
|
3073
|
+
border: rem(1) solid $input-border-search;
|
|
3074
|
+
box-shadow: none;
|
|
3075
|
+
padding: rem(13.5) rem(20) rem(13.5) rem(48);
|
|
3076
|
+
border-radius: rem(3);
|
|
3077
|
+
margin: 0;
|
|
3078
|
+
height: auto;
|
|
3079
|
+
min-height: unset;
|
|
3080
|
+
|
|
3081
|
+
&::placeholder {
|
|
3082
|
+
color: $placeholder-color;
|
|
3083
|
+
font-weight: normal;
|
|
3084
|
+
}
|
|
3085
|
+
}
|
|
3086
|
+
|
|
3087
|
+
.input:focus,
|
|
3088
|
+
.input.is-focused,
|
|
3089
|
+
.input:active,
|
|
3090
|
+
.input.is-active {
|
|
3091
|
+
border-color: $wizishop-blue;
|
|
3092
|
+
}
|
|
3093
|
+
|
|
3094
|
+
.icon {
|
|
3095
|
+
position: absolute;
|
|
3096
|
+
top: 50%;
|
|
3097
|
+
left: 20px;
|
|
3098
|
+
font-size: rem(18);
|
|
3099
|
+
transform: translateY(-50%);
|
|
3100
|
+
pointer-events: none;
|
|
3101
|
+
font-weight: 400;
|
|
3102
|
+
color: $placeholder-color;
|
|
3103
|
+
margin: 0;
|
|
3104
|
+
width: rem(18);
|
|
3105
|
+
height: rem(18);
|
|
3106
|
+
}
|
|
3107
|
+
}
|
|
3108
|
+
|
|
3109
|
+
.wz-img-manager .wz-img-manager__module:not(.wz-img-manager__module--window) .pexels-lib__search .input-search.field {
|
|
3110
|
+
padding: 0;
|
|
3111
|
+
background-color: transparent;
|
|
3112
|
+
}
|
|
3113
3113
|
|
|
3114
3114
|
|
|
3115
3115
|
.wac {
|