@wizishop/img-manager 0.2.38 → 0.2.42
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/assets/i18n/fr.json +1 -1
- package/bundles/wizishop-img-manager.umd.js +55 -46
- package/bundles/wizishop-img-manager.umd.js.map +1 -1
- package/bundles/wizishop-img-manager.umd.min.js +1 -1
- package/bundles/wizishop-img-manager.umd.min.js.map +1 -1
- package/esm2015/lib/components/canva-btn/canva-btn.component.js +2 -2
- package/esm2015/lib/components/images-view/images-actions-handler.js +28 -12
- package/esm2015/lib/components/images-view/mosaic-view/img-card/img-card.component.js +9 -6
- package/esm2015/lib/components/images-view/mosaic-view/mosaic-view.component.js +9 -6
- package/esm2015/lib/components/images-view/table-view/table-view.component.js +9 -6
- package/esm2015/lib/components/img-tabs/img-tabs.component.js +2 -17
- package/esm2015/lib/components/pexels-lib/pexels-lib.component.js +4 -1
- package/esm2015/lib/components/shared/pagination/pagination.component.js +2 -2
- package/esm2015/lib/wz-img-manager.component.js +3 -3
- package/esm5/lib/components/canva-btn/canva-btn.component.js +2 -2
- package/esm5/lib/components/images-view/images-actions-handler.js +28 -12
- package/esm5/lib/components/images-view/mosaic-view/img-card/img-card.component.js +9 -6
- package/esm5/lib/components/images-view/mosaic-view/mosaic-view.component.js +9 -6
- package/esm5/lib/components/images-view/table-view/table-view.component.js +9 -6
- package/esm5/lib/components/img-tabs/img-tabs.component.js +2 -17
- package/esm5/lib/components/pexels-lib/pexels-lib.component.js +4 -1
- package/esm5/lib/components/shared/pagination/pagination.component.js +2 -2
- package/esm5/lib/wz-img-manager.component.js +3 -3
- package/fesm2015/wizishop-img-manager.js +56 -47
- package/fesm2015/wizishop-img-manager.js.map +1 -1
- package/fesm5/wizishop-img-manager.js +56 -47
- package/fesm5/wizishop-img-manager.js.map +1 -1
- package/lib/components/images-view/images-actions-handler.d.ts +4 -1
- package/lib/components/images-view/mosaic-view/img-card/img-card.component.d.ts +2 -1
- package/lib/components/images-view/mosaic-view/mosaic-view.component.d.ts +2 -1
- package/lib/components/images-view/table-view/table-view.component.d.ts +2 -1
- package/lib/components/img-tabs/img-tabs.component.d.ts +0 -16
- package/package.json +1 -1
- package/wizishop-img-manager-0.2.42.tgz +0 -0
- package/wizishop-img-manager.metadata.json +1 -1
- package/wz-img-manager.scss +297 -211
- package/wizishop-img-manager-0.2.38.tgz +0 -0
|
@@ -4,7 +4,7 @@ import { ReplaySubject, Observable, BehaviorSubject, Subject, forkJoin } from 'r
|
|
|
4
4
|
import { HttpParams, HttpHeaders, HttpClient, HttpClientModule } from '@angular/common/http';
|
|
5
5
|
import { trigger, state, style, transition, animate, query, stagger } from '@angular/animations';
|
|
6
6
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
7
|
-
import { NwbAlertService, NwbFilterRoutingBuilder, NwbAllModule } from '@wizishop/ng-wizi-bulma';
|
|
7
|
+
import { NwbAlertService, NwbDialogService, NwbFilterRoutingBuilder, NwbAllModule } from '@wizishop/ng-wizi-bulma';
|
|
8
8
|
import { debounceTime, map, takeUntil, distinctUntilChanged, tap } from 'rxjs/operators';
|
|
9
9
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
10
10
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
@@ -570,6 +570,7 @@ let WzImgManagerComponent = class WzImgManagerComponent {
|
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
572
|
setCurrentTab(event) {
|
|
573
|
+
console.log(event);
|
|
573
574
|
if (event === 'img-edition') {
|
|
574
575
|
this.hideTab = true;
|
|
575
576
|
return;
|
|
@@ -577,7 +578,6 @@ let WzImgManagerComponent = class WzImgManagerComponent {
|
|
|
577
578
|
this.hideTab = false;
|
|
578
579
|
}
|
|
579
580
|
displaySmall() {
|
|
580
|
-
//Use for open annimation display
|
|
581
581
|
if (this.stateDisplayed !== 'window') {
|
|
582
582
|
setTimeout(() => {
|
|
583
583
|
this.stateDisplayed = 'small';
|
|
@@ -685,7 +685,7 @@ __decorate([
|
|
|
685
685
|
WzImgManagerComponent = __decorate([
|
|
686
686
|
Component({
|
|
687
687
|
selector: 'wz-img-manager',
|
|
688
|
-
template: "<div class=\"wz-img-manager\">\n <!-- Img slection handler -->\n <div class=\"wz-img-manager__selectionHandler\" *ngIf=\"showSelection\">\n <img-selection></img-selection>\n </div>\n\n <!-- Img manager module -->\n <div\n *ngIf=\"_showImgManagerModule\"\n class=\"wz-img-manager__module\"\n [ngClass]=\"{\n 'wz-img-manager__module--small': stateDisplayed === 'small',\n 'wz-img-manager__module--full': stateDisplayed === 'full',\n 'wz-img-manager__module--window': stateDisplayed === 'window',\n 'wz-img-manager__module--edit': hideTab}\"\n >\n\n <div class=\"wz-img-manager__module__header\" *ngIf=\"stateDisplayed !== 'window'\">\n <button (click)=\"openSmall()\" *ngIf=\"stateDisplayed === 'full'
|
|
688
|
+
template: "<div class=\"wz-img-manager\">\n <!-- Img slection handler -->\n <div class=\"wz-img-manager__selectionHandler\" *ngIf=\"showSelection\">\n <img-selection></img-selection>\n </div>\n\n <!-- Img manager module -->\n <div\n *ngIf=\"_showImgManagerModule\"\n class=\"wz-img-manager__module\"\n [ngClass]=\"{\n 'wz-img-manager__module--small': stateDisplayed === 'small',\n 'wz-img-manager__module--full': stateDisplayed === 'full',\n 'wz-img-manager__module--window': stateDisplayed === 'window',\n 'wz-img-manager__module--edit': hideTab}\"\n >\n\n <div class=\"wz-img-manager__module__header\" *ngIf=\"stateDisplayed !== 'window'\">\n <button (click)=\"openSmall()\" *ngIf=\"stateDisplayed === 'full'\"><span>Expand</span><i class=\"fal fa-compress-alt\"></i></button>\n <button (click)=\"openSmall()\" *ngIf=\"stateDisplayed === 'closed'\"><span>Expand</span><i class=\"fal fa-expand-alt\"></i></button>\n <button (click)=\"openFull()\" *ngIf=\"stateDisplayed === 'small'\"><span>Expand</span><i class=\"fal fa-expand-alt\"></i></button>\n <button (click)=\"onClose()\" *ngIf=\"stateDisplayed !== 'closed'\"><span>Close</span><i class=\"fal fa-times\"></i></button>\n </div>\n\n <div\n class=\"wz-img-manager__module__content wz-block\"\n [ngClass]=\"{'wz-block--window': stateDisplayed === 'window'}\">\n <img-tabs\n [stateDisplayed]=\"stateDisplayed\"\n [multipleImgMode]=\"multipleImgMode\"\n [listDisplayed]=\"listDisplayed\"\n (imgManagerClosed)=\"onImgManagerClosed()\"\n (currentTab)=\"setCurrentTab($event)\">\n </img-tabs>\n </div>\n </div>\n\n</div>\n"
|
|
689
689
|
}),
|
|
690
690
|
__metadata("design:paramtypes", [ImgSelectionService,
|
|
691
691
|
ImgManagerConfigService,
|
|
@@ -1008,22 +1008,6 @@ let ImgTabsComponent = class ImgTabsComponent {
|
|
|
1008
1008
|
message: '',
|
|
1009
1009
|
duration: 3000
|
|
1010
1010
|
};
|
|
1011
|
-
this.fakeEditImg = {
|
|
1012
|
-
big_miniature: "501",
|
|
1013
|
-
category: "produits",
|
|
1014
|
-
cropped: "0",
|
|
1015
|
-
date: "2020-12-03",
|
|
1016
|
-
display_name: "Nordique-maison-d-coration-accessoires-fleur-vase-d-coration-maison-Terrarium-verre-Vases-tubes-essai-pour",
|
|
1017
|
-
file_name: "5942/3261/46/nordique-maison-d-coration-accessoires-fleur-vase-d-coration-maison-terrarium-verre-vases-tubes-essai-pour.jpeg",
|
|
1018
|
-
g_id: "10",
|
|
1019
|
-
id_file: "5942",
|
|
1020
|
-
id_shop: "131",
|
|
1021
|
-
nb_used: "1",
|
|
1022
|
-
old_file_name: "",
|
|
1023
|
-
raw_height: "800",
|
|
1024
|
-
raw_width: "800",
|
|
1025
|
-
size: "64062",
|
|
1026
|
-
};
|
|
1027
1011
|
}
|
|
1028
1012
|
ngOnInit() {
|
|
1029
1013
|
this.imgEventEditService.getImgToEditEventListner().subscribe(imgToEdit => {
|
|
@@ -1048,6 +1032,7 @@ let ImgTabsComponent = class ImgTabsComponent {
|
|
|
1048
1032
|
if (msgKey) {
|
|
1049
1033
|
this.alertService.openAlert(msgKey);
|
|
1050
1034
|
}
|
|
1035
|
+
this.currentTab.emit('close');
|
|
1051
1036
|
}
|
|
1052
1037
|
onShowImgUploaded() {
|
|
1053
1038
|
this.tabActive = this.tabs[1];
|
|
@@ -1271,6 +1256,9 @@ let PexelLibComponent = class PexelLibComponent {
|
|
|
1271
1256
|
}
|
|
1272
1257
|
setNbColumnsToDisplayPhoto() {
|
|
1273
1258
|
const width = this.outerElement.nativeElement.offsetWidth;
|
|
1259
|
+
if (this.stateDisplayed !== 'window') {
|
|
1260
|
+
this.nbColumuns = 8;
|
|
1261
|
+
}
|
|
1274
1262
|
this.responsiveColumns.forEach(value => {
|
|
1275
1263
|
if (width < value) {
|
|
1276
1264
|
this.nbColumuns--;
|
|
@@ -1426,7 +1414,7 @@ PexelLibComponent = __decorate([
|
|
|
1426
1414
|
], PexelLibComponent);
|
|
1427
1415
|
|
|
1428
1416
|
let ImagesActionHandler = class ImagesActionHandler {
|
|
1429
|
-
constructor(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, externalService) {
|
|
1417
|
+
constructor(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, externalService, nwbDialog) {
|
|
1430
1418
|
this.imgManager = imgManager;
|
|
1431
1419
|
this.imgSelectionService = imgSelectionService;
|
|
1432
1420
|
this.http = http;
|
|
@@ -1435,6 +1423,7 @@ let ImagesActionHandler = class ImagesActionHandler {
|
|
|
1435
1423
|
this.alertService = alertService;
|
|
1436
1424
|
this.translateService = translateService;
|
|
1437
1425
|
this.externalService = externalService;
|
|
1426
|
+
this.nwbDialog = nwbDialog;
|
|
1438
1427
|
this.picturesList = [];
|
|
1439
1428
|
this.picturesListChange = new EventEmitter();
|
|
1440
1429
|
this.tableFilters = {
|
|
@@ -1453,6 +1442,13 @@ let ImagesActionHandler = class ImagesActionHandler {
|
|
|
1453
1442
|
this.isLoading = false;
|
|
1454
1443
|
this.errorRemoveImg = 'ImgManager.ImgList.errorRemoveImg';
|
|
1455
1444
|
this.errorAlreadyUsedImg = 'ImgManager.ImgList.errorAlreadyUsed';
|
|
1445
|
+
this.dialogConfig = {
|
|
1446
|
+
title: 'ImgManager.ImgList.deleteImg',
|
|
1447
|
+
message: 'ImgManager.ImgList.areYouSureDeleteImg',
|
|
1448
|
+
okButtonText: 'ImgManager.ImgList.confirmDelete',
|
|
1449
|
+
cancelButtonText: 'ImgManager.ImgList.cancelDelete',
|
|
1450
|
+
loading: false
|
|
1451
|
+
};
|
|
1456
1452
|
this.fakeImgRoute = this.externalService.getRouteAssets() + 'img/fake.png';
|
|
1457
1453
|
}
|
|
1458
1454
|
/** Event emit when the header checkbox is checked */
|
|
@@ -1490,14 +1486,19 @@ let ImagesActionHandler = class ImagesActionHandler {
|
|
|
1490
1486
|
}
|
|
1491
1487
|
}
|
|
1492
1488
|
onRemoveImg(picture) {
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1489
|
+
const dialog = this.nwbDialog.open(this.dialogConfig);
|
|
1490
|
+
dialog.afterClosed().subscribe(ok => {
|
|
1491
|
+
if (ok) {
|
|
1492
|
+
picture.deleted = true;
|
|
1493
|
+
this.imgManager.removeImg(picture.id_file).subscribe(data => {
|
|
1494
|
+
this.imgEventCardService.emitImgRemoved(picture.id_file);
|
|
1495
|
+
this.imgSelectionService.removeImgSelectedById(picture.id_file);
|
|
1496
|
+
}, error => {
|
|
1497
|
+
const msg = error.status === 409 ? this.errorAlreadyUsedImg : this.errorRemoveImg;
|
|
1498
|
+
picture.deleted = false;
|
|
1499
|
+
this.alertService.openAlert(msg);
|
|
1500
|
+
});
|
|
1501
|
+
}
|
|
1501
1502
|
});
|
|
1502
1503
|
}
|
|
1503
1504
|
onPictureNotLoading(event) {
|
|
@@ -1539,7 +1540,8 @@ ImagesActionHandler.ctorParameters = () => [
|
|
|
1539
1540
|
{ type: ImgEventService },
|
|
1540
1541
|
{ type: AlertService },
|
|
1541
1542
|
{ type: TranslateService },
|
|
1542
|
-
{ type: ImgManagerConfigService }
|
|
1543
|
+
{ type: ImgManagerConfigService },
|
|
1544
|
+
{ type: NwbDialogService }
|
|
1543
1545
|
];
|
|
1544
1546
|
__decorate([
|
|
1545
1547
|
Input(),
|
|
@@ -1590,12 +1592,13 @@ ImagesActionHandler = __decorate([
|
|
|
1590
1592
|
ImgEventService,
|
|
1591
1593
|
AlertService,
|
|
1592
1594
|
TranslateService,
|
|
1593
|
-
ImgManagerConfigService
|
|
1595
|
+
ImgManagerConfigService,
|
|
1596
|
+
NwbDialogService])
|
|
1594
1597
|
], ImagesActionHandler);
|
|
1595
1598
|
|
|
1596
1599
|
let ImgCardComponent = class ImgCardComponent extends ImagesActionHandler {
|
|
1597
|
-
constructor(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, externalService) {
|
|
1598
|
-
super(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, externalService);
|
|
1600
|
+
constructor(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, externalService, nwbDialogService) {
|
|
1601
|
+
super(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, externalService, nwbDialogService);
|
|
1599
1602
|
this.focusInput = false;
|
|
1600
1603
|
this.toggleImgSelected = new EventEmitter();
|
|
1601
1604
|
this.isUploadSection = false;
|
|
@@ -1615,7 +1618,8 @@ ImgCardComponent.ctorParameters = () => [
|
|
|
1615
1618
|
{ type: ImgEventService },
|
|
1616
1619
|
{ type: AlertService },
|
|
1617
1620
|
{ type: TranslateService },
|
|
1618
|
-
{ type: ImgManagerConfigService }
|
|
1621
|
+
{ type: ImgManagerConfigService },
|
|
1622
|
+
{ type: NwbDialogService }
|
|
1619
1623
|
];
|
|
1620
1624
|
__decorate([
|
|
1621
1625
|
Input(),
|
|
@@ -1640,7 +1644,7 @@ __decorate([
|
|
|
1640
1644
|
ImgCardComponent = __decorate([
|
|
1641
1645
|
Component({
|
|
1642
1646
|
selector: 'img-card',
|
|
1643
|
-
template: "<div class=\"addCssPriority\" [@easeInOut]=\"'in'\" [ngClass]=\"{ 'fullSize': fullSize }\">\n <div class=\"img-card\">\n <div class=\"img-card__container\"\n [ngClass]=\"{\n 'smallDisplay': stateDisplayed === 'small' || isUploadSection,\n 'imgSelected': picture.selected,\n 'deletion': picture.deleted}\">\n <img\n class=\"img-card__container__img\"\n [src]=\"picture.file_name | imgSrc : '400'\"\n [alt]=\"picture.display_name\"\n (click)=\"onToggleImgSelected()\"\n (error)=\"picture.imgNotLoaded=true;onPictureNotLoading($event);\"\n />\n <div\n class=\"img-card__container__config\"\n *ngIf=\"!picture.deleted && stateDisplayed !== 'small'\"\n >\n <button class=\"size\"><i class=\"fal fa-image-polaroid\"></i><span>{{picture.raw_height}}x{{picture.raw_width}}</span></button>\n <button class=\"dl\" (click)=\"onDownloadImg(picture.display_name, picture.file_name)\"><i class=\"fal fa-download\"></i><span>{{ 'ImgManager.ImgCard.download' | translate }}</span></button>\n <button class=\"edit\" (click)=\"onEdit(picture)\"><i class=\"far fa-crop-alt\"></i><span>{{ 'ImgManager.ImgCard.edit' | translate }}</span></button>\n <button class=\"deleted\" (click)=\"onRemoveImg(picture)\"><i class=\"fal fa-times\"></i><span>{{ 'ImgManager.ImgCard.del' | translate }}</span></button>\n <button class=\"selected\" (click)=\"onToggleImgSelected()\" *ngIf=\"stateDisplayed !== 'window'\">\n <i *ngIf=\"!picture.selected\" class=\"fal fa-square\"></i>\n <i *ngIf=\"picture.selected\" class=\"fas fa-check-square checked\"></i>\n <span>{{ 'ImgManager.ImgCard.select' | translate }}</span>\n </button>\n </div>\n <div\n *ngIf=\"picture.imgNotLoaded\"\n class=\"img-card__container__overlay\"\n [ngClass]=\"{'img-card__container__overlay--smallDisplay': stateDisplayed === 'small' || isUploadSection}\">\n <i (click)=\"onToggleImgSelected()\" class=\"fad fa-folder-times\"></i>\n </div>\n <span btnLoadingAnim class=\"btnLoadingAnnimation\" *ngIf=\"picture.deleted\"></span>\n\n </div>\n <div\n class=\"img-card__nameContainer\"\n [ngClass]=\"{'smallNameDisplay': stateDisplayed === 'small' || isUploadSection, 'focus': focusInput}\">\n <input\n type=\"text\"\n class=\"wzImgMngInput img-card__nameContainer__name\"\n [(ngModel)]=\"picture.display_name\"\n (ngModelChange)=\"onNameChange(picture.id_file)\"\n (focus)=\"previousName=picture.display_name;focusInput = true;\"\n (blur)=\"focusInput = false;\"\n >\n <span>{{picture.display_name}}</span>\n </div>\n\n </div>\n</div>\n",
|
|
1647
|
+
template: "<div class=\"addCssPriority\" [@easeInOut]=\"'in'\" [ngClass]=\"{ 'fullSize': fullSize }\">\n <div class=\"img-card\">\n <div class=\"img-card__container\"\n [ngClass]=\"{\n 'smallDisplay': stateDisplayed === 'small' || isUploadSection,\n 'imgSelected': picture.selected,\n 'deletion': picture.deleted}\">\n <img\n class=\"img-card__container__img\"\n [src]=\"picture.file_name | imgSrc : '400'\"\n [alt]=\"picture.display_name\"\n (click)=\"onToggleImgSelected()\"\n (error)=\"picture.imgNotLoaded=true;onPictureNotLoading($event);\"\n />\n <div\n class=\"img-card__container__config\"\n *ngIf=\"!picture.deleted && stateDisplayed !== 'small'\"\n >\n <button class=\"size\"><i class=\"fal fa-image-polaroid\"></i><span>{{picture.raw_height}}x{{picture.raw_width}}</span></button>\n <button class=\"dl\" (click)=\"onDownloadImg(picture.display_name, picture.file_name)\"><i class=\"fal fa-download\"></i><span>{{ 'ImgManager.ImgCard.download' | translate }}</span></button>\n <button class=\"edit\" (click)=\"onEdit(picture)\"><i class=\"far fa-crop-alt\"></i><span>{{ 'ImgManager.ImgCard.edit' | translate }}</span></button>\n <button class=\"deleted\" (click)=\"onRemoveImg(picture)\"><i class=\"fal fa-times\"></i><span>{{ 'ImgManager.ImgCard.del' | translate }}</span></button>\n <button class=\"selected\" (click)=\"onToggleImgSelected()\" *ngIf=\"stateDisplayed !== 'window'\">\n <i *ngIf=\"!picture.selected\" class=\"fal fa-square\"></i>\n <i *ngIf=\"picture.selected\" class=\"fas fa-check-square checked\"></i>\n <span>{{ 'ImgManager.ImgCard.select' | translate }}</span>\n </button>\n </div>\n <div class=\"img-card__container__valid\" *ngIf=\"stateDisplayed === 'small' && tabDisplayed == 'img-upload'\">\n <i class=\"far fa-check\"></i>\n <span>{{ 'ImgManager.ImgCard.validImgSmall' | translate }}</span>\n </div>\n <div\n *ngIf=\"picture.imgNotLoaded\"\n class=\"img-card__container__overlay\"\n [ngClass]=\"{'img-card__container__overlay--smallDisplay': stateDisplayed === 'small' || isUploadSection}\">\n <i (click)=\"onToggleImgSelected()\" class=\"fad fa-folder-times\"></i>\n </div>\n <span btnLoadingAnim class=\"btnLoadingAnnimation\" *ngIf=\"picture.deleted\"></span>\n\n </div>\n <div\n class=\"img-card__nameContainer\"\n [ngClass]=\"{'smallNameDisplay': stateDisplayed === 'small' || isUploadSection, 'focus': focusInput}\">\n <input\n type=\"text\"\n class=\"wzImgMngInput img-card__nameContainer__name\"\n [(ngModel)]=\"picture.display_name\"\n (ngModelChange)=\"onNameChange(picture.id_file)\"\n (focus)=\"previousName=picture.display_name;focusInput = true;\"\n (blur)=\"focusInput = false;\"\n >\n <span>{{picture.display_name}}</span>\n </div>\n\n </div>\n</div>\n",
|
|
1644
1648
|
animations: [
|
|
1645
1649
|
easeInOut
|
|
1646
1650
|
]
|
|
@@ -1652,7 +1656,8 @@ ImgCardComponent = __decorate([
|
|
|
1652
1656
|
ImgEventService,
|
|
1653
1657
|
AlertService,
|
|
1654
1658
|
TranslateService,
|
|
1655
|
-
ImgManagerConfigService
|
|
1659
|
+
ImgManagerConfigService,
|
|
1660
|
+
NwbDialogService])
|
|
1656
1661
|
], ImgCardComponent);
|
|
1657
1662
|
|
|
1658
1663
|
let ImgEditorComponent = class ImgEditorComponent {
|
|
@@ -1889,7 +1894,7 @@ __decorate([
|
|
|
1889
1894
|
CanvaBtnComponent = __decorate([
|
|
1890
1895
|
Component({
|
|
1891
1896
|
selector: 'canva-btn',
|
|
1892
|
-
template: "<div class=\"canva dropdown is-right\"\n [ngClass]=\"{'is-up': stateDisplayed === 'small', 'is-hoverable noTooltip': stateDisplayed !== 'small'}\"\n >\n <div class=\"dropdown-trigger\">\n <button\n class=\"button canva-btn\"\n aria-
|
|
1897
|
+
template: "<div class=\"canva dropdown is-right\"\n [ngClass]=\"{'is-up': stateDisplayed === 'small', 'is-hoverable noTooltip': stateDisplayed !== 'small'}\"\n >\n <div class=\"dropdown-trigger\">\n <button\n class=\"button canva-btn\"\n aria-controls=\"dropdown-menuCanva\"\n (click)=\"openDropDownMenu = true\"\n >\n <span>{{'ImgManager.CanvaBtn.createImg' | translate}}</span>\n <img [src]=\"canvaLogoRouteAssets\" class=\"canva-btn__logo\">\n\n <span btnLoadingAnim class=\"btnLoadingAnnimation\" *ngIf=\"imgLoading\"></span>\n </button>\n </div>\n <div\n wzAutoHide (clickOutside)=\"openDropDownMenu = false;\" [triggerElement]=\"'canva-btn'\"\n class=\"dropdown-menu dropDownShadow\"\n [ngClass]=\"{'displayDropDownMenu': openDropDownMenu }\"\n id=\"dropdown-menuCanva\"\n role=\"menu\">\n <ng-scrollbar\n #scrollable\n [visibility]=\"'hover'\"\n class=\"smallScroll\"\n >\n <div class=\"dropdown-content\">\n <div class=\"dropdownTitle\">\n <p>{{'ImgManager.CanvaBtn.createImg.title' | translate}}</p>\n </div>\n\n <div class=\"infoItem\">\n <p>{{'ImgManager.CanvaBtn.info' | translate}}</p>\n </div>\n\n <ng-container >\n <div\n *ngIf=\"expectedWidth && expectedHeight\"\n class=\"dropdown-item-wrapper\"\n >\n <div class=\"dropdown-item expectedSizes\" (click)=\"onOpenCanva(expectedWidth, expectedHeight)\">\n <p>{{'ImgManager.CanvaBtn.recommanded' | translate}}</p><p>{{expectedWidth}}*{{expectedHeight}}</p>\n </div>\n </div>\n </ng-container>\n\n <div\n *ngFor=\"let format of availableFormat| keyvalue\"\n class=\"dropdown-item-wrapper\">\n <div\n (click)=\"onOpenCanva(format.value.width, format.value.height)\"\n class=\"dropdown-item\">\n <p>{{format.key | translate}}</p><p>{{format.value.width}}*{{format.value.height}}</p>\n </div>\n </div>\n </div>\n </ng-scrollbar>\n </div>\n</div>\n"
|
|
1893
1898
|
}),
|
|
1894
1899
|
__metadata("design:paramtypes", [CanvaService,
|
|
1895
1900
|
ImgManagerService,
|
|
@@ -2888,8 +2893,8 @@ ImagesViewComponent = __decorate([
|
|
|
2888
2893
|
], ImagesViewComponent);
|
|
2889
2894
|
|
|
2890
2895
|
let MosaicViewComponent = class MosaicViewComponent extends ImagesActionHandler {
|
|
2891
|
-
constructor(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, externalService) {
|
|
2892
|
-
super(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, externalService);
|
|
2896
|
+
constructor(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, externalService, nwbDialogService) {
|
|
2897
|
+
super(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, externalService, nwbDialogService);
|
|
2893
2898
|
this.nbFakeImg = 0;
|
|
2894
2899
|
}
|
|
2895
2900
|
ngOnInit() {
|
|
@@ -2913,7 +2918,8 @@ MosaicViewComponent.ctorParameters = () => [
|
|
|
2913
2918
|
{ type: ImgEventService },
|
|
2914
2919
|
{ type: AlertService },
|
|
2915
2920
|
{ type: TranslateService },
|
|
2916
|
-
{ type: ImgManagerConfigService }
|
|
2921
|
+
{ type: ImgManagerConfigService },
|
|
2922
|
+
{ type: NwbDialogService }
|
|
2917
2923
|
];
|
|
2918
2924
|
__decorate([
|
|
2919
2925
|
Input(),
|
|
@@ -2930,7 +2936,7 @@ __decorate([
|
|
|
2930
2936
|
MosaicViewComponent = __decorate([
|
|
2931
2937
|
Component({
|
|
2932
2938
|
selector: 'mosaic-view',
|
|
2933
|
-
template: "<div class=\"mosaic\" [ngClass]=\"{'fullSize': fullSize, 'small': stateDisplayed === 'small', 'mosaic--displayPexelsImg': displayPexelsResults}\">\n <!-- Search section -->\n <div\n class=\"mosaic__search\"\n [ngClass]=\"{'mosaic__search--small': stateDisplayed === 'small'}\"\n *ngIf=\"tabDisplayed !== 'img-upload'\">\n <wz-input-search\n [(ngModel)]=\"tableFilters.searchValue\"\n (changeDebounced)=\"onSearchChange($event)\"\n [placeholder]=\"'ImgManager.SearchBar.placeholder' | translate\"\n [smallPadding]=\"stateDisplayed === 'small'\"\n ></wz-input-search>\n </div>\n\n <!-- Cards section -->\n <div\n class=\"mosaic__container__cards\"\n [@listAnimation]=\"picturesList.length\"\n *ngIf=\"!isLoading && !displayPexelsResults\"\n >\n <img-card\n *ngFor=\"let picture of picturesList; let index = index;\"\n [picture]=\"picture\"\n [stateDisplayed]=\"stateDisplayed\"\n [tabDisplayed]=\"tabDisplayed\"\n [disable]=\"disable\"\n (toggleImgSelected)=\"onToggleSelectImg(index)\"\n (pictureNameChange)=\"onCardRenamePicture($event)\"\n [fullSize]=\"fullSize\"\n ></img-card>\n <div\n *ngFor=\"let fakeImg of nbFakeImg | numberToArray\"\n class=\"mosaic__container__cards__fakeImg\"\n [ngClass]=\"{'mosaic__container__cards__fakeImg--smallFakeImg': stateDisplayed === 'small' || tabDisplayed === 'img-upload'}\">\n </div>\n </div>\n <!-- Loader section -->\n <div class=\"mosaic__container__loader\" *ngIf=\"isLoading\">\n <wz-loader [small]=\"true\"></wz-loader>\n </div>\n\n <!-- Pagination section -->\n <div class=\"mosaic__pagination\" *ngIf=\"picturesList.length && tabDisplayed !== 'img-upload' && !displayPexelsResults\" >\n <wz-pagination\n [pagination]=\"tableFilters\"\n (pageChange)=\"onFiltersChange()\"\n >\n </wz-pagination>\n </div>\n\n</div>\n",
|
|
2939
|
+
template: "<div class=\"mosaic\" [ngClass]=\"{'fullSize': fullSize, 'small': stateDisplayed === 'small', 'mosaic--displayPexelsImg': displayPexelsResults}\">\n <!-- Search section -->\n <div\n class=\"mosaic__search\"\n [ngClass]=\"{'mosaic__search--small': stateDisplayed === 'small'}\"\n *ngIf=\"tabDisplayed !== 'img-upload'\">\n <wz-input-search\n [(ngModel)]=\"tableFilters.searchValue\"\n (changeDebounced)=\"onSearchChange($event)\"\n [placeholder]=\"'ImgManager.SearchBar.placeholder' | translate\"\n [smallPadding]=\"stateDisplayed === 'small'\"\n ></wz-input-search>\n </div>\n\n <!-- Cards section -->\n <div\n class=\"mosaic__container__cards\"\n [ngClass]=\"{'mosaic__container__cards--padding': stateDisplayed !== 'window'}\"\n [@listAnimation]=\"picturesList.length\"\n *ngIf=\"!isLoading && !displayPexelsResults\"\n >\n <img-card\n *ngFor=\"let picture of picturesList; let index = index;\"\n [picture]=\"picture\"\n [stateDisplayed]=\"stateDisplayed\"\n [tabDisplayed]=\"tabDisplayed\"\n [disable]=\"disable\"\n (toggleImgSelected)=\"onToggleSelectImg(index)\"\n (pictureNameChange)=\"onCardRenamePicture($event)\"\n [fullSize]=\"fullSize\"\n ></img-card>\n <div\n *ngFor=\"let fakeImg of nbFakeImg | numberToArray\"\n class=\"mosaic__container__cards__fakeImg\"\n [ngClass]=\"{'mosaic__container__cards__fakeImg--smallFakeImg': stateDisplayed === 'small' || tabDisplayed === 'img-upload'}\">\n </div>\n </div>\n <!-- Loader section -->\n <div class=\"mosaic__container__loader\" *ngIf=\"isLoading\">\n <wz-loader [small]=\"true\"></wz-loader>\n </div>\n\n <!-- Pagination section -->\n <div class=\"mosaic__pagination\" *ngIf=\"picturesList.length && tabDisplayed !== 'img-upload' && !displayPexelsResults\" >\n <wz-pagination\n [pagination]=\"tableFilters\"\n (pageChange)=\"onFiltersChange()\"\n >\n </wz-pagination>\n </div>\n\n</div>\n",
|
|
2934
2940
|
animations: [
|
|
2935
2941
|
listAnnimation
|
|
2936
2942
|
]
|
|
@@ -2942,12 +2948,13 @@ MosaicViewComponent = __decorate([
|
|
|
2942
2948
|
ImgEventService,
|
|
2943
2949
|
AlertService,
|
|
2944
2950
|
TranslateService,
|
|
2945
|
-
ImgManagerConfigService
|
|
2951
|
+
ImgManagerConfigService,
|
|
2952
|
+
NwbDialogService])
|
|
2946
2953
|
], MosaicViewComponent);
|
|
2947
2954
|
|
|
2948
2955
|
let TableViewComponent = class TableViewComponent extends ImagesActionHandler {
|
|
2949
|
-
constructor(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, externalService) {
|
|
2950
|
-
super(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, externalService);
|
|
2956
|
+
constructor(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, externalService, nwbDialogService) {
|
|
2957
|
+
super(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, externalService, nwbDialogService);
|
|
2951
2958
|
this.dataTableName = 'imgagesView'; // Name of your table
|
|
2952
2959
|
}
|
|
2953
2960
|
ngOnInit() {
|
|
@@ -2961,12 +2968,13 @@ TableViewComponent.ctorParameters = () => [
|
|
|
2961
2968
|
{ type: ImgEventService },
|
|
2962
2969
|
{ type: AlertService },
|
|
2963
2970
|
{ type: TranslateService },
|
|
2964
|
-
{ type: ImgManagerConfigService }
|
|
2971
|
+
{ type: ImgManagerConfigService },
|
|
2972
|
+
{ type: NwbDialogService }
|
|
2965
2973
|
];
|
|
2966
2974
|
TableViewComponent = __decorate([
|
|
2967
2975
|
Component({
|
|
2968
2976
|
selector: 'table-view',
|
|
2969
|
-
template: "<div class=\"table-view\" [@listAnimation]=\"picturesList.length\">\n <wz-table\n [checkbox]=\"true\"\n (toggleAllCheckBox)=\"onToggleAllCheckBoxRow($event)\"\n [(tableFilters)]=\"tableFilters\"\n (tableFiltersChange)=\"onFiltersChange()\"\n [placeholder]=\"'ImgManager.SearchBar.placeholder' | translate\"\n [disablePagniation]=\"displayPexelsResults\"\n [isLoading]=\"isLoading\"\n >\n <!-- Header Section -->\n <div\n headerCell\n [headerName]=\"'ImgManager.ImgList.titleImgName' | translate\"\n columnSize=\"2\"\n sortName=\"name\"\n ></div>\n <div\n headerCell\n centerCell=\"center\"\n [headerName]=\"'ImgManager.ImgList.titleResolution' | translate\"\n ></div>\n <div headerCell columnSize=\"0\"></div>\n\n <!-- Body Section -->\n <div\n tableRow\n checkBoxRow\n [checkBoxValue]=\"picture.delSelected\"\n (checkBoxValueChange)=\"onToggleDelSelection(index)\"\n *ngFor=\"let picture of picturesList; let index = index\"\n >\n\n <div tableColumn columnSize=\"2\">\n <div class=\"table-view__row__container\">\n <div\n class=\"table-view__row__container__imgContainer\"\n [ngClass]=\"{'imgSelected': picture.selected}\"\n (click)=\"onToggleSelectImg(index)\">\n <img\n class=\"table-view__row__container__imgContainer__img\"\n [src]=\"picture.file_name | imgSrc : '100'\"\n alt=\"picture.display_name\"\n [ngClass]=\"{'pictureDeletion': picture.deleted}\"\n (error)=\"picture.imgNotLoaded=true;onPictureNotLoading($event);\"\n />\n <!-- If the img is not loaded, or the link is broken, an icon is displayed -->\n <div\n *ngIf=\"picture.imgNotLoaded\"\n class=\"table-view__row__container__imgContainer__overlay\"\n >\n <i class=\"fad fa-folder-times\"></i>\n </div>\n </div>\n <input\n type=\"text\"\n class=\"wzImgMngInput table-view__row__container__name\"\n [(ngModel)]=\"picture.display_name\"\n (focus)=\"previousName=picture.display_name\"\n (
|
|
2977
|
+
template: "<div class=\"table-view\" [@listAnimation]=\"picturesList.length\">\n <wz-table\n [checkbox]=\"true\"\n (toggleAllCheckBox)=\"onToggleAllCheckBoxRow($event)\"\n [(tableFilters)]=\"tableFilters\"\n (tableFiltersChange)=\"onFiltersChange()\"\n [placeholder]=\"'ImgManager.SearchBar.placeholder' | translate\"\n [disablePagniation]=\"displayPexelsResults\"\n [isLoading]=\"isLoading\"\n >\n <!-- Header Section -->\n <div\n headerCell\n [headerName]=\"'ImgManager.ImgList.titleImgName' | translate\"\n columnSize=\"2\"\n sortName=\"name\"\n ></div>\n <div\n headerCell\n centerCell=\"center\"\n [headerName]=\"'ImgManager.ImgList.titleResolution' | translate\"\n ></div>\n <div headerCell columnSize=\"0\"></div>\n\n <!-- Body Section -->\n <div\n tableRow\n checkBoxRow\n [checkBoxValue]=\"picture.delSelected\"\n (checkBoxValueChange)=\"onToggleDelSelection(index)\"\n *ngFor=\"let picture of picturesList; let index = index\"\n >\n\n <div tableColumn columnSize=\"2\">\n <div class=\"table-view__row__container\">\n <div\n class=\"table-view__row__container__imgContainer\"\n [ngClass]=\"{'imgSelected': picture.selected}\"\n (click)=\"onToggleSelectImg(index)\">\n <img\n class=\"table-view__row__container__imgContainer__img\"\n [src]=\"picture.file_name | imgSrc : '100'\"\n alt=\"picture.display_name\"\n [ngClass]=\"{'pictureDeletion': picture.deleted}\"\n (error)=\"picture.imgNotLoaded=true;onPictureNotLoading($event);\"\n />\n <!-- If the img is not loaded, or the link is broken, an icon is displayed -->\n <div\n *ngIf=\"picture.imgNotLoaded\"\n class=\"table-view__row__container__imgContainer__overlay\"\n >\n <i class=\"fad fa-folder-times\"></i>\n </div>\n </div>\n <input\n type=\"text\"\n class=\"wzImgMngInput table-view__row__container__name\"\n [(ngModel)]=\"picture.display_name\"\n (focus)=\"previousName=picture.display_name\"\n (blur)=\"onNameChange(picture.id_file)\"\n (click)=\"onToggleDelSelection(index)\"\n [ngClass]=\"{'desabled': picture.deleted}\"\n [disabled]=\"picture.deleted\"\n >\n </div>\n </div>\n\n <div\n tableColumn\n centerCell=\"center\"\n (click)=\"onToggleDelSelection(index)\"\n >\n <p class=\"grey\">{{picture.raw_height}}x{{picture.raw_width}}</p>\n </div>\n\n <div tableColumn centerCell=\"center\" columnSize=\"0\" class=\"table-view__dropdown-options\">\n <!-- Dropdown -->\n <dropdown dropdownId=\"dropdown-options\" [disable]=\"picture.deleted\">\n <ng-container label>\n <div class=\"table-view__dropdown-options__label rotate\">\n <span> <i class=\"far fa-ellipsis-h is-size-4\" aria-haspopup=\"true\" aria-controls=\"dropdown-menu\"> </i> </span>\n </div>\n </ng-container>\n <ng-container item>\n <div\n class=\"dropdown-item\"\n (click)=\"onDownloadImg(picture.display_name, picture.file_name)\"\n >\n <i class=\"far fa-download download\"></i> \n <p>{{ 'ImgManager.ImgList.download' | translate }}</p>\n </div>\n </ng-container>\n <ng-container item>\n <div\n class=\"dropdown-item\"\n (click)=\"onEdit(picture)\"\n >\n <i class=\"far fa-crop-alt edit\"></i> \n <p>{{ 'ImgManager.ImgList.edit' | translate }}</p>\n </div>\n </ng-container>\n <ng-container item>\n <div\n class=\"dropdown-item\"\n (click)=\"onRemoveImg(picture)\"\n >\n <i class=\"fal fa-times deleted\"></i> \n <p>{{ 'ImgManager.ImgList.remove' | translate }}</p>\n </div>\n </ng-container>\n </dropdown>\n </div>\n </div>\n </wz-table>\n</div>\n",
|
|
2970
2978
|
animations: [
|
|
2971
2979
|
listAnnimation
|
|
2972
2980
|
]
|
|
@@ -2978,7 +2986,8 @@ TableViewComponent = __decorate([
|
|
|
2978
2986
|
ImgEventService,
|
|
2979
2987
|
AlertService,
|
|
2980
2988
|
TranslateService,
|
|
2981
|
-
ImgManagerConfigService
|
|
2989
|
+
ImgManagerConfigService,
|
|
2990
|
+
NwbDialogService])
|
|
2982
2991
|
], TableViewComponent);
|
|
2983
2992
|
|
|
2984
2993
|
let FiltersTableService = class FiltersTableService {
|
|
@@ -3289,7 +3298,7 @@ __decorate([
|
|
|
3289
3298
|
PaginationComponent = __decorate([
|
|
3290
3299
|
Component({
|
|
3291
3300
|
selector: 'wz-pagination',
|
|
3292
|
-
template: "<div class=\"wz-pagination\" *ngIf=\"pagination && pagination.itemsPerPage\">\n <div class=\"wz-pagination__wrapper\">\n <div class=\"wz-pagination__wrapper__page\">\n <p>{{ 'PaginationComponent.page' | translate }}</p>\n\n <select name=\"page\" (change)=\"onGotoPageChange($event)\">\n <ng-container *ngFor=\"let pageIndex of pagination.totalItems | ArrayTotalPages: pagination.itemsPerPage\">\n <option [selected]=\"pageIndex === pagination.currentPage\" [value]=\"pageIndex\">\n {{ pageIndex }}\n </option>\n </ng-container>\n </select>\n </div>\n\n <div class=\"wz-pagination__wrapper__elements\">\n <p>{{ pagination.currentPage | customPagniationText: pagination.totalItems:pagination.itemsPerPage }}</p>\n </div>\n\n <div class=\"wz-pagination__wrapper__arrows\">\n <div\n (click)=\"decrementPage()\"\n class=\"wz-pagination__wrapper__arrows__arrow wz-pagination__wrapper__arrows__arrow--left\"\n [ngClass]=\"{ 'wz-pagination__wrapper__arrows__arrow--disabled': pagination.currentPage === 1 }\"\n >\n <span class=\"wz-pagination__wrapper__arrows__arrow__icon\"></span>\n </div>\n <div\n (click)=\"incrementPage()\"\n class=\"wz-pagination__wrapper__arrows__arrow wz-pagination__wrapper__arrows__arrow--right\"\n [ngClass]=\"{\n 'wz-pagination__wrapper__arrows__arrow--disabled':\n pagination.currentPage | IsLastPage: pagination.totalItems:pagination.itemsPerPage\n }\"\n >\n <span class=\"wz-pagination__wrapper__arrows__arrow__icon\"></span>\n </div>\n </div>\n </div>\n</div>\n"
|
|
3301
|
+
template: "<div class=\"wz-pagination\" *ngIf=\"pagination && pagination.itemsPerPage\">\n <div class=\"wz-pagination__wrapper\">\n <div class=\"wz-pagination__wrapper__page\">\n <p>{{ 'PaginationComponent.page' | translate }}</p>\n\n <select name=\"page\" (change)=\"onGotoPageChange($event)\" [ngStyle]=\"{'width': 40 + (10*pagination.currentPage.toString().length) + 'px'}\">\n <ng-container *ngFor=\"let pageIndex of pagination.totalItems | ArrayTotalPages: pagination.itemsPerPage\">\n <option [selected]=\"pageIndex === pagination.currentPage\" [value]=\"pageIndex\">\n {{ pageIndex }}\n </option>\n </ng-container>\n </select>\n </div>\n\n <div class=\"wz-pagination__wrapper__elements\">\n <p>{{ pagination.currentPage | customPagniationText: pagination.totalItems:pagination.itemsPerPage }}</p>\n </div>\n\n <div class=\"wz-pagination__wrapper__arrows\">\n <div\n (click)=\"decrementPage()\"\n class=\"wz-pagination__wrapper__arrows__arrow wz-pagination__wrapper__arrows__arrow--left\"\n [ngClass]=\"{ 'wz-pagination__wrapper__arrows__arrow--disabled': pagination.currentPage === 1 }\"\n >\n <span class=\"wz-pagination__wrapper__arrows__arrow__icon\"></span>\n </div>\n <div\n (click)=\"incrementPage()\"\n class=\"wz-pagination__wrapper__arrows__arrow wz-pagination__wrapper__arrows__arrow--right\"\n [ngClass]=\"{\n 'wz-pagination__wrapper__arrows__arrow--disabled':\n pagination.currentPage | IsLastPage: pagination.totalItems:pagination.itemsPerPage\n }\"\n >\n <span class=\"wz-pagination__wrapper__arrows__arrow__icon\"></span>\n </div>\n </div>\n </div>\n</div>\n"
|
|
3293
3302
|
}),
|
|
3294
3303
|
__metadata("design:paramtypes", [])
|
|
3295
3304
|
], PaginationComponent);
|