@wizishop/img-manager 0.2.81 → 0.2.86
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/en.json +1 -1
- package/assets/i18n/fr.json +1 -1
- package/bundles/wizishop-img-manager.umd.js +276 -30
- package/bundles/wizishop-img-manager.umd.js.map +1 -1
- package/bundles/wizishop-img-manager.umd.min.js +2 -2
- package/bundles/wizishop-img-manager.umd.min.js.map +1 -1
- package/esm2015/lib/components/img-tabs/img-tabs.component.js +40 -9
- package/esm2015/lib/components/shared/select/call-to-action.model.js +1 -0
- package/esm2015/lib/components/shared/select/select-items.dto.js +1 -0
- package/esm2015/lib/components/shared/select/select.component.js +133 -0
- package/esm2015/lib/directives/zindex-toggle.directive.js +49 -0
- package/esm2015/lib/pipes/select/select-filters.pipe.js +17 -0
- package/esm2015/lib/services/img-manager.service.js +11 -1
- package/esm2015/lib/wz-img-manager.module.js +11 -3
- package/esm2015/wizishop-img-manager.js +20 -17
- package/esm5/lib/components/img-tabs/img-tabs.component.js +40 -9
- package/esm5/lib/components/shared/select/call-to-action.model.js +1 -0
- package/esm5/lib/components/shared/select/select-items.dto.js +1 -0
- package/esm5/lib/components/shared/select/select.component.js +136 -0
- package/esm5/lib/directives/zindex-toggle.directive.js +54 -0
- package/esm5/lib/pipes/select/select-filters.pipe.js +20 -0
- package/esm5/lib/services/img-manager.service.js +11 -1
- package/esm5/lib/wz-img-manager.module.js +11 -3
- package/esm5/wizishop-img-manager.js +20 -17
- package/fesm2015/wizishop-img-manager.js +245 -11
- package/fesm2015/wizishop-img-manager.js.map +1 -1
- package/fesm5/wizishop-img-manager.js +256 -11
- package/fesm5/wizishop-img-manager.js.map +1 -1
- package/lib/components/img-tabs/img-tabs.component.d.ts +8 -4
- package/lib/components/shared/select/call-to-action.model.d.ts +6 -0
- package/lib/components/shared/select/select-items.dto.d.ts +8 -0
- package/lib/components/shared/select/select.component.d.ts +38 -0
- package/lib/directives/zindex-toggle.directive.d.ts +13 -0
- package/lib/pipes/select/select-filters.pipe.d.ts +5 -0
- package/lib/services/img-manager.service.d.ts +2 -1
- package/package.json +2 -1
- package/wizishop-img-manager-0.2.86.tgz +0 -0
- package/wizishop-img-manager.d.ts +19 -16
- package/wizishop-img-manager.metadata.json +1 -1
- package/wz-img-manager.scss +1927 -1489
- package/wizishop-img-manager-0.2.81.tgz +0 -0
|
@@ -6,6 +6,7 @@ import { trigger, state, style, transition, animate, query, stagger } from '@ang
|
|
|
6
6
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
7
7
|
import { NwbAlertService, NwbFilterRoutingBuilder, NwbAllModule } from '@wizishop/ng-wizi-bulma';
|
|
8
8
|
import { debounceTime, map, take, takeUntil, distinctUntilChanged, tap } from 'rxjs/operators';
|
|
9
|
+
import { Router } from '@angular/router';
|
|
9
10
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
10
11
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
11
12
|
import { NgScrollbarModule } from 'ngx-scrollbar';
|
|
@@ -14,6 +15,7 @@ import { ImageCropperModule } from 'ngx-image-cropper';
|
|
|
14
15
|
import { CdkTableModule } from '@angular/cdk/table';
|
|
15
16
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
16
17
|
import { v4 } from 'uuid';
|
|
18
|
+
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
|
|
17
19
|
|
|
18
20
|
var ImgSelectionService = /** @class */ (function () {
|
|
19
21
|
function ImgSelectionService() {
|
|
@@ -172,6 +174,14 @@ var ImgManagerService = /** @class */ (function () {
|
|
|
172
174
|
displayBtn: true,
|
|
173
175
|
pageficheProduct: true
|
|
174
176
|
};
|
|
177
|
+
this.angularFicheProductConfig = {
|
|
178
|
+
stateDisplayed: 'closed',
|
|
179
|
+
multipleImgMode: true,
|
|
180
|
+
showImgManagerModule: true,
|
|
181
|
+
showSelection: true,
|
|
182
|
+
displayBtn: false,
|
|
183
|
+
pageficheProduct: true
|
|
184
|
+
};
|
|
175
185
|
this.wiziblockConfig = {
|
|
176
186
|
stateDisplayed: 'closed',
|
|
177
187
|
multipleImgMode: false,
|
|
@@ -261,6 +271,8 @@ var ImgManagerService = /** @class */ (function () {
|
|
|
261
271
|
return this.pageFicheProductConfig;
|
|
262
272
|
case "simple-with-button":
|
|
263
273
|
return this.simpleWithButtonOpenerConfig;
|
|
274
|
+
case 'angular-fiche-product':
|
|
275
|
+
return this.angularFicheProductConfig;
|
|
264
276
|
default:
|
|
265
277
|
return;
|
|
266
278
|
}
|
|
@@ -1093,16 +1105,42 @@ var UploadListComponent = /** @class */ (function () {
|
|
|
1093
1105
|
}());
|
|
1094
1106
|
|
|
1095
1107
|
var ImgTabsComponent = /** @class */ (function () {
|
|
1096
|
-
function ImgTabsComponent(imgEventEditService, alertService) {
|
|
1108
|
+
function ImgTabsComponent(imgEventEditService, alertService, route) {
|
|
1097
1109
|
this.imgEventEditService = imgEventEditService;
|
|
1098
1110
|
this.alertService = alertService;
|
|
1111
|
+
this.route = route;
|
|
1099
1112
|
this.multipleImgMode = false;
|
|
1100
1113
|
this.listDisplayed = false;
|
|
1101
1114
|
this.imgManagerClosed = new EventEmitter();
|
|
1102
1115
|
this.currentTab = new EventEmitter();
|
|
1103
1116
|
this.switchDisplayWindow = new EventEmitter();
|
|
1104
|
-
this.
|
|
1105
|
-
|
|
1117
|
+
this.tabs = [
|
|
1118
|
+
{
|
|
1119
|
+
name: 'ImgManager.Tabs.addImg',
|
|
1120
|
+
value: 'img-upload',
|
|
1121
|
+
id: 0
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
name: 'ImgManager.Tabs.imgLib',
|
|
1125
|
+
value: 'images-view',
|
|
1126
|
+
selected: true,
|
|
1127
|
+
id: 1
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
name: 'ImgManager.Tabs.freeImgLib',
|
|
1131
|
+
value: 'pexels-lib',
|
|
1132
|
+
id: 2
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
name: 'ImgManager.Tabs.Editor',
|
|
1136
|
+
value: 'img-edition',
|
|
1137
|
+
hide: true,
|
|
1138
|
+
id: 3
|
|
1139
|
+
}
|
|
1140
|
+
];
|
|
1141
|
+
this.tabActive = this.tabs[1];
|
|
1142
|
+
/* tabActive = 'images-view';
|
|
1143
|
+
tabs: string[] = ['img-upload', 'images-view', 'pexels-lib', 'img-edition']; */
|
|
1106
1144
|
this.editTab = false;
|
|
1107
1145
|
this.imgUpload = false;
|
|
1108
1146
|
this.snackBarNewVersionConfig = {
|
|
@@ -1119,10 +1157,10 @@ var ImgTabsComponent = /** @class */ (function () {
|
|
|
1119
1157
|
_this.currentTab.emit(_this.tabs[3]);
|
|
1120
1158
|
});
|
|
1121
1159
|
};
|
|
1122
|
-
ImgTabsComponent.prototype.toggleTabs = function (
|
|
1160
|
+
ImgTabsComponent.prototype.toggleTabs = function (item) {
|
|
1123
1161
|
this.imgUpload = false;
|
|
1124
1162
|
this.editTab = false;
|
|
1125
|
-
this.tabActive =
|
|
1163
|
+
this.tabActive = item;
|
|
1126
1164
|
};
|
|
1127
1165
|
ImgTabsComponent.prototype.onImgUploaded = function (img) {
|
|
1128
1166
|
this.imgUpload = true;
|
|
@@ -1142,12 +1180,15 @@ var ImgTabsComponent = /** @class */ (function () {
|
|
|
1142
1180
|
ImgTabsComponent.prototype.switchDisplayWindowImgView = function () {
|
|
1143
1181
|
this.switchDisplayWindow.emit(true);
|
|
1144
1182
|
};
|
|
1183
|
+
ImgTabsComponent.prototype.switchRouterLink = function (event) {
|
|
1184
|
+
};
|
|
1145
1185
|
ImgTabsComponent.prototype.onImgManagerClosed = function () {
|
|
1146
1186
|
this.imgManagerClosed.emit();
|
|
1147
1187
|
};
|
|
1148
1188
|
ImgTabsComponent.ctorParameters = function () { return [
|
|
1149
1189
|
{ type: ImgEventService },
|
|
1150
|
-
{ type: AlertService }
|
|
1190
|
+
{ type: AlertService },
|
|
1191
|
+
{ type: Router }
|
|
1151
1192
|
]; };
|
|
1152
1193
|
__decorate([
|
|
1153
1194
|
Input(),
|
|
@@ -1180,10 +1221,11 @@ var ImgTabsComponent = /** @class */ (function () {
|
|
|
1180
1221
|
ImgTabsComponent = __decorate([
|
|
1181
1222
|
Component({
|
|
1182
1223
|
selector: 'img-tabs',
|
|
1183
|
-
template: "<div\n class=\"img-tabs\" [ngClass]=\"{'small': stateDisplayed === 'small'}\">\n <div class=\"wrapper-tabs\">\n <div\n class=\"tabs\"\n [ngClass]=\"\n {\n 'tabs--notWindow': stateDisplayed !== 'window',\n 'tabs--notDisplayed': stateDisplayed === 'window' && tabActive === tabs[3]\n }\">\n\n <ul>\n <li class=\"is-active\" [ngClass]=\"{'is-active': tabActive === tabs[0]}\" (click)=\"toggleTabs(tabs[0])\"><a>{{
|
|
1224
|
+
template: "<div\n class=\"img-tabs\" [ngClass]=\"{'small': stateDisplayed === 'small'}\">\n <div class=\"wrapper-tabs\">\n <div\n class=\"tabs\"\n [ngClass]=\"\n {\n 'tabs--notWindow': stateDisplayed !== 'window',\n 'tabs--notDisplayed': stateDisplayed === 'window' && tabActive.value === tabs[3].value\n }\">\n\n <ul>\n <li class=\"is-active\" [ngClass]=\"{'is-active': tabActive.value === tabs[0].value}\" (click)=\"toggleTabs(tabs[0])\"><a>{{ tabs[0].name | translate }}</a></li>\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[1].value}\" (click)=\"toggleTabs(tabs[1])\"><a>{{ tabs[1].name | translate }}</a></li>\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[2].value}\" (click)=\"toggleTabs(tabs[2])\"><a>{{ tabs[2].name | translate }}</a></li>\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[3].value}\" *ngIf=\"editTab\"><a>{{ tabs[3].name | translate }}</a></li>\n </ul>\n <div\n class=\"img-tabs__canva\"\n [ngClass]=\"{'img-tabs__canva--window': stateDisplayed === 'window'}\">\n <canva-btn\n (showImgUploaded)=\"onShowImgUploaded()\"\n [stateDisplayed]=\"stateDisplayed\">\n </canva-btn>\n </div>\n </div>\n <div class=\"select-mobile-page\">\n <wac-select\n [(ngModel)]=\"tabActive\"\n name=\"tabs\"\n [items]=\"tabs\"\n ></wac-select>\n </div>\n </div>\n\n <!-- Upload section -->\n <div\n class=\"columns img-tabs__tabsFirst\"\n [ngClass]=\"{\n 'img-tabs__tabsFirst--small': stateDisplayed === 'small',\n 'img-tabs__tabsFirst--window': stateDisplayed === 'window'\n }\"\n *ngIf=\"tabActive.value === tabs[0].value\">\n <div class=\"column img-tabs__tabsFirst__upload\">\n <img-upload\n [stateDisplayed]=\"stateDisplayed\"\n (imgUploaded)=\"onImgUploaded($event)\"\n ></img-upload>\n </div>\n <div class=\"column img-tabs__tabsFirst__list\" [ngClass]=\"{\n 'img-tabs__tabsFirst__list--upload': imgUpload\n }\">\n <images-view\n *ngIf=\"!imgUpload\"\n [stateDisplayed]=\"stateDisplayed\"\n [listDisplayed]=\"false\"\n [multipleImgMode]=\"multipleImgMode\"\n [tabDisplayed]=\"tabActive.value\"\n [maxLengthCardShow]=\"stateDisplayed === 'small' ? 16 : 8\"\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\n [fullSize]=\"false\">\n </images-view>\n\n\n <div [hidden]=\"!imgUpload\">\n <upload-list\n #imgUploadedImg\n [stateDisplayed]=\"stateDisplayed\"\n [tabDisplayed]=\"tabActive.value\"\n [multipleImgMode]=\"multipleImgMode\"\n >\n </upload-list>\n </div>\n </div>\n </div>\n\n <!-- Images section -->\n <div class=\"columns img-tabs__tabsSecond\" *ngIf=\"tabActive.value === tabs[1].value\">\n <div class=\"column\">\n\n <images-view\n [stateDisplayed]=\"stateDisplayed\"\n [listDisplayed]=\"listDisplayed\"\n [multipleImgMode]=\"multipleImgMode\"\n [tabDisplayed]=\"tabActive.value\"\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\n [fullSize]=\"true\">\n </images-view>\n\n </div>\n </div>\n\n <!-- Pexel img section -->\n <div class=\"columns img-tabs__tabsThird\" *ngIf=\"tabActive.value === tabs[2].value\">\n <div class=\"column\">\n <pexels-lib\n [stateDisplayed]=\"stateDisplayed\"\n (showImgUploaded)=\"onShowImgUploaded()\">\n </pexels-lib>\n </div>\n </div>\n\n <!--Edition section -->\n <div class=\"columns img-tabs__tabsEdit\" *ngIf=\"tabActive.value === tabs[3].value\">\n <div class=\"column\">\n <img-editor\n [stateDisplayed]=\"stateDisplayed\"\n [imgToEdit]=\"imgToEdit\"\n (editClosed)=\"onEditClosed($event)\">\n </img-editor>\n </div>\n </div>\n\n</div>\n"
|
|
1184
1225
|
}),
|
|
1185
1226
|
__metadata("design:paramtypes", [ImgEventService,
|
|
1186
|
-
AlertService
|
|
1227
|
+
AlertService,
|
|
1228
|
+
Router])
|
|
1187
1229
|
], ImgTabsComponent);
|
|
1188
1230
|
return ImgTabsComponent;
|
|
1189
1231
|
}());
|
|
@@ -4376,6 +4418,205 @@ var LargeNumberOfPagePipe = /** @class */ (function () {
|
|
|
4376
4418
|
return LargeNumberOfPagePipe;
|
|
4377
4419
|
}());
|
|
4378
4420
|
|
|
4421
|
+
var SelectComponent = /** @class */ (function () {
|
|
4422
|
+
function SelectComponent(translateService) {
|
|
4423
|
+
this.translateService = translateService;
|
|
4424
|
+
this.search = false;
|
|
4425
|
+
this.type = 'default';
|
|
4426
|
+
this.maxWidth = '100%';
|
|
4427
|
+
this.disabled = false;
|
|
4428
|
+
this.selectValue = new EventEmitter();
|
|
4429
|
+
this.clickOnCallToAction = new EventEmitter();
|
|
4430
|
+
this.openCategories = false;
|
|
4431
|
+
this.searchValue = '';
|
|
4432
|
+
this.indexItemSelected = -1;
|
|
4433
|
+
// ControlValueAccessor methods
|
|
4434
|
+
this.onChange = function () { };
|
|
4435
|
+
this.onTouch = function () { };
|
|
4436
|
+
}
|
|
4437
|
+
SelectComponent_1 = SelectComponent;
|
|
4438
|
+
SelectComponent.prototype.ngOnInit = function () {
|
|
4439
|
+
this.indexItemSelected = this.items.findIndex(function (item) { return item.selected; });
|
|
4440
|
+
};
|
|
4441
|
+
SelectComponent.prototype.onClose = function () {
|
|
4442
|
+
this.openCategories = false;
|
|
4443
|
+
};
|
|
4444
|
+
SelectComponent.prototype.customTB = function (item, index) {
|
|
4445
|
+
return item.id + "-" + index;
|
|
4446
|
+
};
|
|
4447
|
+
SelectComponent.prototype.onSelectItem = function (id) {
|
|
4448
|
+
this.unselectAll();
|
|
4449
|
+
this.setIndexItemSelected(id);
|
|
4450
|
+
var itemSelected = this.getItemSelected();
|
|
4451
|
+
itemSelected.selected = true;
|
|
4452
|
+
this.selectValue.emit(this.indexItemSelected);
|
|
4453
|
+
this.onChange(itemSelected);
|
|
4454
|
+
};
|
|
4455
|
+
SelectComponent.prototype.onClickCallToAction = function () {
|
|
4456
|
+
this.onClose();
|
|
4457
|
+
this.clickOnCallToAction.emit(this.callToAction.value);
|
|
4458
|
+
};
|
|
4459
|
+
SelectComponent.prototype.getItemSelected = function () {
|
|
4460
|
+
return this.items[this.indexItemSelected];
|
|
4461
|
+
};
|
|
4462
|
+
SelectComponent.prototype.showCategories = function () {
|
|
4463
|
+
var _this = this;
|
|
4464
|
+
this.openCategories = true;
|
|
4465
|
+
setTimeout(function () {
|
|
4466
|
+
_this.searchElement.nativeElement.focus();
|
|
4467
|
+
}, 0);
|
|
4468
|
+
};
|
|
4469
|
+
SelectComponent.prototype.unselectAll = function () {
|
|
4470
|
+
this.items.forEach(function (item) { return item.selected = false; });
|
|
4471
|
+
};
|
|
4472
|
+
SelectComponent.prototype.setIndexItemSelected = function (id) {
|
|
4473
|
+
this.indexItemSelected = this.items.findIndex(function (item) { return item.id === id; });
|
|
4474
|
+
};
|
|
4475
|
+
SelectComponent.prototype.writeValue = function (selectItem) {
|
|
4476
|
+
if (!selectItem) {
|
|
4477
|
+
return;
|
|
4478
|
+
}
|
|
4479
|
+
this.unselectAll();
|
|
4480
|
+
selectItem.selected = true;
|
|
4481
|
+
this.setIndexItemSelected(selectItem.id);
|
|
4482
|
+
};
|
|
4483
|
+
SelectComponent.prototype.registerOnChange = function (fn) {
|
|
4484
|
+
this.onChange = fn;
|
|
4485
|
+
};
|
|
4486
|
+
SelectComponent.prototype.registerOnTouched = function (fn) {
|
|
4487
|
+
this.onTouch = fn;
|
|
4488
|
+
};
|
|
4489
|
+
var SelectComponent_1;
|
|
4490
|
+
SelectComponent.ctorParameters = function () { return [
|
|
4491
|
+
{ type: TranslateService }
|
|
4492
|
+
]; };
|
|
4493
|
+
__decorate([
|
|
4494
|
+
Input(),
|
|
4495
|
+
__metadata("design:type", Array)
|
|
4496
|
+
], SelectComponent.prototype, "items", void 0);
|
|
4497
|
+
__decorate([
|
|
4498
|
+
Input(),
|
|
4499
|
+
__metadata("design:type", String)
|
|
4500
|
+
], SelectComponent.prototype, "placeholder", void 0);
|
|
4501
|
+
__decorate([
|
|
4502
|
+
Input(),
|
|
4503
|
+
__metadata("design:type", String)
|
|
4504
|
+
], SelectComponent.prototype, "label", void 0);
|
|
4505
|
+
__decorate([
|
|
4506
|
+
Input(),
|
|
4507
|
+
__metadata("design:type", String)
|
|
4508
|
+
], SelectComponent.prototype, "maxWidthItems", void 0);
|
|
4509
|
+
__decorate([
|
|
4510
|
+
Input(),
|
|
4511
|
+
__metadata("design:type", Object)
|
|
4512
|
+
], SelectComponent.prototype, "search", void 0);
|
|
4513
|
+
__decorate([
|
|
4514
|
+
Input(),
|
|
4515
|
+
__metadata("design:type", Object)
|
|
4516
|
+
], SelectComponent.prototype, "type", void 0);
|
|
4517
|
+
__decorate([
|
|
4518
|
+
Input(),
|
|
4519
|
+
__metadata("design:type", Object)
|
|
4520
|
+
], SelectComponent.prototype, "callToAction", void 0);
|
|
4521
|
+
__decorate([
|
|
4522
|
+
Input(),
|
|
4523
|
+
__metadata("design:type", Object)
|
|
4524
|
+
], SelectComponent.prototype, "maxWidth", void 0);
|
|
4525
|
+
__decorate([
|
|
4526
|
+
Input(),
|
|
4527
|
+
__metadata("design:type", Object)
|
|
4528
|
+
], SelectComponent.prototype, "disabled", void 0);
|
|
4529
|
+
__decorate([
|
|
4530
|
+
Output(),
|
|
4531
|
+
__metadata("design:type", Object)
|
|
4532
|
+
], SelectComponent.prototype, "selectValue", void 0);
|
|
4533
|
+
__decorate([
|
|
4534
|
+
Output(),
|
|
4535
|
+
__metadata("design:type", Object)
|
|
4536
|
+
], SelectComponent.prototype, "clickOnCallToAction", void 0);
|
|
4537
|
+
__decorate([
|
|
4538
|
+
ViewChild('search'),
|
|
4539
|
+
__metadata("design:type", ElementRef)
|
|
4540
|
+
], SelectComponent.prototype, "searchElement", void 0);
|
|
4541
|
+
SelectComponent = SelectComponent_1 = __decorate([
|
|
4542
|
+
Component({
|
|
4543
|
+
selector: 'wac-select',
|
|
4544
|
+
template: "<p *ngIf=\"label\" [innerHTML]=\"label\" class=\"wac-select__label\"></p>\n\n<div class=\"wac-select\" wzAutoHide (clickOutside)=\"onClose()\" [ngStyle]=\"{ 'max-width': maxWidth }\" [zIndexToggle]=\"openCategories\">\n\n <div class=\"wac-select__current\" [ngClass]=\"{ 'select-disabled' : disabled }\" (click)=\"!disabled && openCategories = !openCategories\" *ngIf=\"!search\">\n <span *ngIf=\"indexItemSelected !== -1\" class=\"icon\" [innerHTML]=\"items[indexItemSelected].icon\"></span>\n <span [innerHTML]=\"(indexItemSelected !== -1 ? items[indexItemSelected].name : placeholder) | translate\"></span><span><i class=\"fas fa-chevron-down\"></i></span>\n </div>\n\n <div class=\"wac-select__current wac-select__current--withSearch\" [ngClass]=\"{ 'select-disabled' : disabled, 'open-search': openCategories }\" *ngIf=\"search\">\n <div class=\"wac-select__current__search\" *ngIf=\"openCategories && !disabled\">\n <i class=\"far fa-search\"></i>\n <input #search type=\"text\" [(ngModel)]=\"searchValue\" />\n </div>\n <span (click)=\"openCategories = !openCategories;\" *ngIf=\"items[indexItemSelected]?.icon && !openCategories\" class=\"icon\" [innerHTML]=\"items[indexItemSelected].icon\"></span>\n <span (click)=\"showCategories()\" [innerHTML]=\"items[indexItemSelected]?.name ? items[indexItemSelected].name : placeholder\"></span>\n <span (click)=\"openCategories = !openCategories;\"><i class=\"fas fa-chevron-down\"></i></span>\n </div>\n\n <div class=\"wac-select__content\" *ngIf=\"!disabled\" [ngClass]=\"{ hidden: !openCategories, open: type === 'open' }\" [ngStyle]=\"{ 'max-width': maxWidthItems }\">\n <div [perfectScrollbar]=\"{ suppressScrollX: true }\" *ngIf=\"items.length\">\n\n <div *ngIf=\"callToAction\" class=\"wac-select__content__cta\">\n <div (click)=\"onClickCallToAction()\">\n <i *ngIf=\"callToAction.icon\" [classList]=\"callToAction.icon\"></i><strong *ngIf=\"callToAction.boldText\">{{ callToAction.boldText }}</strong\n ><span>{{ callToAction?.name }}</span>\n </div>\n </div>\n\n <div\n *ngFor=\"let item of items | selectFilters: searchValue; let index = index;\"\n (click)=\"onClose()\"\n class=\"wac-select__content__item\"\n >\n <div *ngIf=\"!item.hide\" [ngClass]=\"{ selected: item.selected }\" (click)=\"onSelectItem(item.id)\">\n <span class=\"icon\" [innerHTML]=\"item.icon\" *ngIf=\"item.icon\"></span>{{ item.name | translate }}\n </div>\n </div>\n\n </div>\n\n <div *ngIf=\"!(items | selectFilters: searchValue)?.length\" class=\"wac-select__content__empty\">\n <span>{{'wac.datatable.noresult' | translate}}</span>\n </div>\n\n </div>\n</div>",
|
|
4545
|
+
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent_1, multi: true }]
|
|
4546
|
+
}),
|
|
4547
|
+
__metadata("design:paramtypes", [TranslateService])
|
|
4548
|
+
], SelectComponent);
|
|
4549
|
+
return SelectComponent;
|
|
4550
|
+
}());
|
|
4551
|
+
|
|
4552
|
+
var SelectFiltersPipe = /** @class */ (function () {
|
|
4553
|
+
function SelectFiltersPipe() {
|
|
4554
|
+
}
|
|
4555
|
+
SelectFiltersPipe.prototype.transform = function (items, filterName) {
|
|
4556
|
+
return items.filter(function (item) {
|
|
4557
|
+
var regexp = new RegExp(filterName, 'i');
|
|
4558
|
+
return regexp.test(item.name);
|
|
4559
|
+
});
|
|
4560
|
+
};
|
|
4561
|
+
SelectFiltersPipe = __decorate([
|
|
4562
|
+
Pipe({
|
|
4563
|
+
name: 'selectFilters'
|
|
4564
|
+
})
|
|
4565
|
+
], SelectFiltersPipe);
|
|
4566
|
+
return SelectFiltersPipe;
|
|
4567
|
+
}());
|
|
4568
|
+
|
|
4569
|
+
var ZindexToggleDirective = /** @class */ (function () {
|
|
4570
|
+
function ZindexToggleDirective(currentElement, renderer) {
|
|
4571
|
+
this.currentElement = currentElement;
|
|
4572
|
+
this.renderer = renderer;
|
|
4573
|
+
this.isActived = false;
|
|
4574
|
+
}
|
|
4575
|
+
Object.defineProperty(ZindexToggleDirective.prototype, "isActive", {
|
|
4576
|
+
get: function () {
|
|
4577
|
+
return this.isActived;
|
|
4578
|
+
},
|
|
4579
|
+
set: function (value) {
|
|
4580
|
+
this.isActived = value;
|
|
4581
|
+
this.switchToggle();
|
|
4582
|
+
},
|
|
4583
|
+
enumerable: true,
|
|
4584
|
+
configurable: true
|
|
4585
|
+
});
|
|
4586
|
+
ZindexToggleDirective.prototype.ngOnInit = function () {
|
|
4587
|
+
};
|
|
4588
|
+
ZindexToggleDirective.prototype.switchToggle = function () {
|
|
4589
|
+
if (this.isActived) {
|
|
4590
|
+
this.renderer.addClass(this.currentElement.nativeElement.parentElement.parentNode, 'zindexToggle');
|
|
4591
|
+
}
|
|
4592
|
+
else {
|
|
4593
|
+
this.renderer.removeClass(this.currentElement.nativeElement.parentElement.parentNode, 'zindexToggle');
|
|
4594
|
+
}
|
|
4595
|
+
};
|
|
4596
|
+
ZindexToggleDirective.prototype.ngOnDestroy = function () {
|
|
4597
|
+
};
|
|
4598
|
+
ZindexToggleDirective.ctorParameters = function () { return [
|
|
4599
|
+
{ type: ElementRef },
|
|
4600
|
+
{ type: Renderer2 }
|
|
4601
|
+
]; };
|
|
4602
|
+
__decorate([
|
|
4603
|
+
Output(),
|
|
4604
|
+
__metadata("design:type", EventEmitter)
|
|
4605
|
+
], ZindexToggleDirective.prototype, "onEventChange", void 0);
|
|
4606
|
+
__decorate([
|
|
4607
|
+
Input('zIndexToggle'),
|
|
4608
|
+
__metadata("design:type", Boolean),
|
|
4609
|
+
__metadata("design:paramtypes", [Boolean])
|
|
4610
|
+
], ZindexToggleDirective.prototype, "isActive", null);
|
|
4611
|
+
ZindexToggleDirective = __decorate([
|
|
4612
|
+
Directive({
|
|
4613
|
+
selector: '[zIndexToggle]'
|
|
4614
|
+
}),
|
|
4615
|
+
__metadata("design:paramtypes", [ElementRef, Renderer2])
|
|
4616
|
+
], ZindexToggleDirective);
|
|
4617
|
+
return ZindexToggleDirective;
|
|
4618
|
+
}());
|
|
4619
|
+
|
|
4379
4620
|
;
|
|
4380
4621
|
var components = [
|
|
4381
4622
|
WzImgManagerComponent,
|
|
@@ -4400,6 +4641,7 @@ var components = [
|
|
|
4400
4641
|
CheckboxComponent,
|
|
4401
4642
|
AlertComponent,
|
|
4402
4643
|
PageSelectorComponent,
|
|
4644
|
+
SelectComponent
|
|
4403
4645
|
];
|
|
4404
4646
|
var directives = [
|
|
4405
4647
|
DragDropDirective,
|
|
@@ -4412,6 +4654,7 @@ var directives = [
|
|
|
4412
4654
|
TableRow,
|
|
4413
4655
|
AbstractDebounceDirective,
|
|
4414
4656
|
DebounceKeyupDirective,
|
|
4657
|
+
ZindexToggleDirective
|
|
4415
4658
|
];
|
|
4416
4659
|
var pipes = [
|
|
4417
4660
|
PagniationArrayTotalPages,
|
|
@@ -4419,7 +4662,8 @@ var pipes = [
|
|
|
4419
4662
|
PagniationText,
|
|
4420
4663
|
ImageSrcPipe,
|
|
4421
4664
|
NumberToArray,
|
|
4422
|
-
LargeNumberOfPagePipe
|
|
4665
|
+
LargeNumberOfPagePipe,
|
|
4666
|
+
SelectFiltersPipe
|
|
4423
4667
|
];
|
|
4424
4668
|
var WzImgManagerModule = /** @class */ (function () {
|
|
4425
4669
|
function WzImgManagerModule() {
|
|
@@ -4437,7 +4681,8 @@ var WzImgManagerModule = /** @class */ (function () {
|
|
|
4437
4681
|
ImageCropperModule,
|
|
4438
4682
|
CdkTableModule,
|
|
4439
4683
|
DragDropModule,
|
|
4440
|
-
TranslateModule
|
|
4684
|
+
TranslateModule,
|
|
4685
|
+
PerfectScrollbarModule
|
|
4441
4686
|
],
|
|
4442
4687
|
providers: [],
|
|
4443
4688
|
exports: [
|
|
@@ -4484,5 +4729,5 @@ var ImgCDNConfigDTO = /** @class */ (function () {
|
|
|
4484
4729
|
* Generated bundle index. Do not edit.
|
|
4485
4730
|
*/
|
|
4486
4731
|
|
|
4487
|
-
export { CanvaButtonApi, CanvaService, ImgApiDto, ImgCDNConfigDTO, ImgManagerConfigDto, ImgManagerService, ImgSelectionService, RenamePictureService, WzImgManagerComponent, WzImgManagerModule, ImgManagerConfigService as ɵa, ImgCDNService as ɵb, TableComponent as ɵba, FiltersTableService as ɵbb, InputSearchComponent as ɵbc, PaginationComponent as ɵbd, CheckboxComponent as ɵbe, AlertComponent as ɵbf, PageSelectorComponent as ɵbg,
|
|
4732
|
+
export { CanvaButtonApi, CanvaService, ImgApiDto, ImgCDNConfigDTO, ImgManagerConfigDto, ImgManagerService, ImgSelectionService, RenamePictureService, WzImgManagerComponent, WzImgManagerModule, ImgManagerConfigService as ɵa, ImgCDNService as ɵb, TableComponent as ɵba, FiltersTableService as ɵbb, InputSearchComponent as ɵbc, PaginationComponent as ɵbd, CheckboxComponent as ɵbe, AlertComponent as ɵbf, PageSelectorComponent as ɵbg, SelectComponent as ɵbh, DragDropDirective as ɵbi, LoadingDirective as ɵbj, AutoHideDirective as ɵbk, CopyClipboardDirective as ɵbl, TableColumn as ɵbm, CheckBoxRow as ɵbn, TableColumnHeader as ɵbo, TableRow as ɵbp, AbstractDebounceDirective as ɵbq, DebounceKeyupDirective as ɵbr, ZindexToggleDirective as ɵbs, PagniationArrayTotalPages as ɵbt, PagniationIsLastPage as ɵbu, PagniationText as ɵbv, ImageSrcPipe as ɵbw, NumberToArray as ɵbx, LargeNumberOfPagePipe as ɵby, SelectFiltersPipe as ɵbz, UserSettingsService as ɵc, ImgEventService as ɵd, DomService as ɵe, ImgTabsComponent as ɵf, AlertService as ɵg, ImgUploadComponent as ɵh, easeInOut as ɵi, PexelLibComponent as ɵj, listAnnimation as ɵk, PexelsService as ɵl, ImgCardComponent as ɵm, ImagesActionHandler as ɵn, UploadListComponent as ɵo, ImgEditorComponent as ɵp, EditorInfoSectionComponent as ɵq, CanvaBtnComponent as ɵr, ImgSelectionComponent as ɵs, LoaderComponent as ɵt, DropdownComponent as ɵu, CropperComponent as ɵv, insertRemove as ɵw, ImagesViewComponent as ɵx, MosaicViewComponent as ɵy, TableViewComponent as ɵz };
|
|
4488
4733
|
//# sourceMappingURL=wizishop-img-manager.js.map
|