@wizishop/img-manager 18.2.0 → 18.2.1-beta
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/esm2022/lib/components/canva-btn/canva-btn.component.mjs +73 -0
- package/esm2022/lib/components/images-view/images-actions-handler.mjs +168 -0
- package/esm2022/lib/components/images-view/images-view.component.mjs +391 -0
- package/esm2022/lib/components/images-view/mosaic-view/img-card/img-card.component.mjs +70 -0
- package/esm2022/lib/components/images-view/mosaic-view/mosaic-view.component.mjs +73 -0
- package/esm2022/lib/components/images-view/table-view/table-view.component.mjs +48 -0
- package/esm2022/lib/components/img-editor/cropper/cropper.component.mjs +313 -0
- package/esm2022/lib/components/img-editor/img-editor.component.mjs +129 -0
- package/esm2022/lib/components/img-editor/info-section/info-section.component.mjs +58 -0
- package/esm2022/lib/components/img-selection/img-selection.component.mjs +58 -0
- package/esm2022/lib/components/img-tabs/img-tabs.component.mjs +128 -0
- package/esm2022/lib/components/img-upload/img-upload.component.mjs +133 -0
- package/esm2022/lib/components/loader/loader.component.mjs +21 -0
- package/esm2022/lib/components/pexels-lib/pexels-lib.component.mjs +211 -0
- package/esm2022/lib/components/shared/alert/alert.component.mjs +26 -0
- package/esm2022/lib/components/shared/checkbox/checkbox.component.mjs +56 -0
- package/esm2022/lib/components/shared/dropdown/dropdown.component.mjs +21 -0
- package/esm2022/lib/components/shared/input-search/input-search.component.mjs +53 -0
- package/esm2022/lib/components/shared/pagination/page-selector/page-selector.component.mjs +50 -0
- package/esm2022/lib/components/shared/pagination/pagination.component.mjs +49 -0
- package/esm2022/lib/components/shared/select/select.component.mjs +117 -0
- package/esm2022/lib/components/shared/table/table.component.mjs +124 -0
- package/esm2022/lib/components/upload-list/upload-list.component.mjs +85 -0
- package/esm2022/lib/directives/abstract-debounce/abstract-debounce.directive.mjs +41 -0
- package/{esm2020 → esm2022}/lib/directives/abstract-debounce/debounce-keyup.directive.mjs +5 -5
- package/esm2022/lib/directives/auto-hide.directive.mjs +51 -0
- package/esm2022/lib/directives/copy-to-clipboard.directive.mjs +36 -0
- package/esm2022/lib/directives/drag-drop.directive.mjs +55 -0
- package/esm2022/lib/directives/loading.directive.mjs +43 -0
- package/esm2022/lib/directives/table/checkBoxRow.directive.mjs +130 -0
- package/esm2022/lib/directives/table/column.directive.mjs +50 -0
- package/esm2022/lib/directives/table/columnHeader.directive.mjs +215 -0
- package/esm2022/lib/directives/table/raw.directive.mjs +34 -0
- package/esm2022/lib/directives/zindex-toggle.directive.mjs +45 -0
- package/esm2022/lib/dto/canva-create-design.dto.mjs +9 -0
- package/esm2022/lib/dto/canva.dto.mjs +6 -0
- package/esm2022/lib/dto/config/apis/api.dto.mjs +11 -0
- package/esm2022/lib/dto/config/external/external-config.dto.mjs +5 -0
- package/esm2022/lib/dto/wizi-block-media.dto.mjs +7 -0
- package/esm2022/lib/pipes/images/img-src.pipe.mjs +29 -0
- package/{esm2020 → esm2022}/lib/pipes/number-to-array.pipe.mjs +4 -4
- package/esm2022/lib/pipes/pagination/array-total-pages/array-pages.pipe.mjs +28 -0
- package/esm2022/lib/pipes/pagination/large-number-of-page/large-number-of-page.pipe.mjs +53 -0
- package/esm2022/lib/pipes/pagination/text/custom-text.pipe.mjs +36 -0
- package/esm2022/lib/pipes/pagination/total-pages/is-last-page.pipe.mjs +25 -0
- package/{esm2020 → esm2022}/lib/pipes/select/select-filters.pipe.mjs +4 -4
- package/esm2022/lib/services/alert.service.mjs +53 -0
- package/{esm2020 → esm2022}/lib/services/api.service.mjs +4 -4
- package/esm2022/lib/services/canva.service.mjs +165 -0
- package/esm2022/lib/services/config/img-cdn.service.mjs +21 -0
- package/esm2022/lib/services/dom.service.mjs +31 -0
- package/{esm2020 → esm2022}/lib/services/icon.service.mjs +4 -4
- package/{esm2020 → esm2022}/lib/services/image-not-found.service.mjs +4 -4
- package/esm2022/lib/services/img-event.service.mjs +33 -0
- package/esm2022/lib/services/img-manager.service.mjs +134 -0
- package/esm2022/lib/services/img-selection.service.mjs +75 -0
- package/esm2022/lib/services/pexels.service.mjs +66 -0
- package/esm2022/lib/services/rename-picture.service.mjs +66 -0
- package/esm2022/lib/services/snackbar.service.mjs +67 -0
- package/esm2022/lib/services/table/filters-table.service.mjs +61 -0
- package/esm2022/lib/services/upload.service.mjs +20 -0
- package/esm2022/lib/services/user-settings.service.mjs +23 -0
- package/esm2022/lib/wz-img-manager.component.mjs +209 -0
- package/{esm2020 → esm2022}/lib/wz-img-manager.module.mjs +61 -61
- package/{fesm2020 → fesm2022}/wizishop-img-manager.mjs +1018 -830
- package/fesm2022/wizishop-img-manager.mjs.map +1 -0
- package/lib/components/canva-btn/canva-btn.component.d.ts +1 -1
- package/lib/components/images-view/images-actions-handler.d.ts +2 -1
- package/lib/components/images-view/images-view.component.d.ts +4 -9
- package/lib/components/images-view/mosaic-view/img-card/img-card.component.d.ts +1 -1
- package/lib/components/images-view/mosaic-view/mosaic-view.component.d.ts +1 -1
- package/lib/components/img-editor/cropper/cropper.component.d.ts +1 -1
- package/lib/components/img-editor/img-editor.component.d.ts +1 -1
- package/lib/components/img-editor/info-section/info-section.component.d.ts +1 -1
- package/lib/components/img-selection/img-selection.component.d.ts +4 -5
- package/lib/components/img-tabs/img-tabs.component.d.ts +1 -1
- package/lib/components/img-upload/img-upload.component.d.ts +1 -1
- package/lib/components/loader/loader.component.d.ts +1 -1
- package/lib/components/pexels-lib/pexels-lib.component.d.ts +1 -1
- package/lib/components/shared/alert/alert.component.d.ts +1 -1
- package/lib/components/shared/checkbox/checkbox.component.d.ts +1 -1
- package/lib/components/shared/dropdown/dropdown.component.d.ts +1 -1
- package/lib/components/shared/input-search/input-search.component.d.ts +1 -1
- package/lib/components/shared/pagination/page-selector/page-selector.component.d.ts +1 -1
- package/lib/components/shared/pagination/pagination.component.d.ts +1 -1
- package/lib/components/shared/select/select.component.d.ts +1 -1
- package/lib/components/shared/table/table.component.d.ts +1 -1
- package/lib/components/upload-list/upload-list.component.d.ts +1 -1
- package/lib/directives/abstract-debounce/abstract-debounce.directive.d.ts +1 -1
- package/lib/directives/auto-hide.directive.d.ts +1 -1
- package/lib/directives/copy-to-clipboard.directive.d.ts +1 -1
- package/lib/directives/table/checkBoxRow.directive.d.ts +1 -1
- package/lib/directives/table/column.directive.d.ts +1 -1
- package/lib/directives/table/columnHeader.directive.d.ts +1 -1
- package/lib/directives/zindex-toggle.directive.d.ts +1 -1
- package/lib/wz-img-manager.component.d.ts +3 -3
- package/package.json +6 -12
- package/wizishop-img-manager-18.2.1-beta.tgz +0 -0
- package/wz-img-manager.scss +77 -60
- package/esm2020/lib/components/canva-btn/canva-btn.component.mjs +0 -67
- package/esm2020/lib/components/images-view/images-actions-handler.mjs +0 -154
- package/esm2020/lib/components/images-view/images-view.component.mjs +0 -369
- package/esm2020/lib/components/images-view/mosaic-view/img-card/img-card.component.mjs +0 -66
- package/esm2020/lib/components/images-view/mosaic-view/mosaic-view.component.mjs +0 -71
- package/esm2020/lib/components/images-view/table-view/table-view.component.mjs +0 -48
- package/esm2020/lib/components/img-editor/cropper/cropper.component.mjs +0 -307
- package/esm2020/lib/components/img-editor/img-editor.component.mjs +0 -124
- package/esm2020/lib/components/img-editor/info-section/info-section.component.mjs +0 -54
- package/esm2020/lib/components/img-selection/img-selection.component.mjs +0 -53
- package/esm2020/lib/components/img-tabs/img-tabs.component.mjs +0 -122
- package/esm2020/lib/components/img-upload/img-upload.component.mjs +0 -126
- package/esm2020/lib/components/loader/loader.component.mjs +0 -21
- package/esm2020/lib/components/pexels-lib/pexels-lib.component.mjs +0 -203
- package/esm2020/lib/components/shared/alert/alert.component.mjs +0 -27
- package/esm2020/lib/components/shared/checkbox/checkbox.component.mjs +0 -52
- package/esm2020/lib/components/shared/dropdown/dropdown.component.mjs +0 -21
- package/esm2020/lib/components/shared/input-search/input-search.component.mjs +0 -54
- package/esm2020/lib/components/shared/pagination/page-selector/page-selector.component.mjs +0 -49
- package/esm2020/lib/components/shared/pagination/pagination.component.mjs +0 -49
- package/esm2020/lib/components/shared/select/select.component.mjs +0 -110
- package/esm2020/lib/components/shared/table/table.component.mjs +0 -116
- package/esm2020/lib/components/upload-list/upload-list.component.mjs +0 -79
- package/esm2020/lib/directives/abstract-debounce/abstract-debounce.directive.mjs +0 -37
- package/esm2020/lib/directives/auto-hide.directive.mjs +0 -48
- package/esm2020/lib/directives/copy-to-clipboard.directive.mjs +0 -37
- package/esm2020/lib/directives/drag-drop.directive.mjs +0 -57
- package/esm2020/lib/directives/loading.directive.mjs +0 -42
- package/esm2020/lib/directives/table/checkBoxRow.directive.mjs +0 -114
- package/esm2020/lib/directives/table/column.directive.mjs +0 -45
- package/esm2020/lib/directives/table/columnHeader.directive.mjs +0 -204
- package/esm2020/lib/directives/table/raw.directive.mjs +0 -31
- package/esm2020/lib/directives/zindex-toggle.directive.mjs +0 -42
- package/esm2020/lib/dto/canva-create-design.dto.mjs +0 -4
- package/esm2020/lib/dto/canva.dto.mjs +0 -4
- package/esm2020/lib/dto/config/apis/api.dto.mjs +0 -9
- package/esm2020/lib/dto/config/external/external-config.dto.mjs +0 -3
- package/esm2020/lib/dto/wizi-block-media.dto.mjs +0 -3
- package/esm2020/lib/pipes/images/img-src.pipe.mjs +0 -28
- package/esm2020/lib/pipes/pagination/array-total-pages/array-pages.pipe.mjs +0 -28
- package/esm2020/lib/pipes/pagination/large-number-of-page/large-number-of-page.pipe.mjs +0 -53
- package/esm2020/lib/pipes/pagination/text/custom-text.pipe.mjs +0 -35
- package/esm2020/lib/pipes/pagination/total-pages/is-last-page.pipe.mjs +0 -25
- package/esm2020/lib/services/alert.service.mjs +0 -50
- package/esm2020/lib/services/canva.service.mjs +0 -159
- package/esm2020/lib/services/config/img-cdn.service.mjs +0 -23
- package/esm2020/lib/services/dom.service.mjs +0 -33
- package/esm2020/lib/services/img-event.service.mjs +0 -35
- package/esm2020/lib/services/img-manager.service.mjs +0 -136
- package/esm2020/lib/services/img-selection.service.mjs +0 -76
- package/esm2020/lib/services/pexels.service.mjs +0 -62
- package/esm2020/lib/services/rename-picture.service.mjs +0 -63
- package/esm2020/lib/services/snackbar.service.mjs +0 -64
- package/esm2020/lib/services/table/filters-table.service.mjs +0 -60
- package/esm2020/lib/services/upload.service.mjs +0 -22
- package/esm2020/lib/services/user-settings.service.mjs +0 -25
- package/esm2020/lib/wz-img-manager.component.mjs +0 -192
- package/fesm2015/wizishop-img-manager.mjs +0 -4035
- package/fesm2015/wizishop-img-manager.mjs.map +0 -1
- package/fesm2020/wizishop-img-manager.mjs.map +0 -1
- package/wizishop-img-manager-18.2.0.tgz +0 -0
- /package/{esm2020 → esm2022}/lib/animations/easeInOut/ease-in-out.animation.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/animations/insertRemove/insert-remove.animation.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/animations/listAnnimation/list.animation.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/components/shared/select/call-to-action.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/components/shared/select/select-items.dto.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/dto/ImgManagerDisplayConfig.dto.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/dto/config/image-cdn/image-cdn-config.dto.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/dto/config/img-manager.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/dto/export-dtos.api.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/dto/img-editor-config.dto.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/dto/img-manager.dto.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/dto/pexels-img.dto.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/dto/picture-name-update.dto.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/dto/stateDisplayed.dto.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/dto/tabDisplayed.dto.mjs +0 -0
- /package/{esm2020 → esm2022}/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/wizishop-img-manager.mjs +0 -0
|
@@ -26,11 +26,10 @@ import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
|
26
26
|
import { CdkTableModule } from '@angular/cdk/table';
|
|
27
27
|
|
|
28
28
|
class ImgSelectionService {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
29
|
+
multipleImgMode = false;
|
|
30
|
+
imgSelection$ = new BehaviorSubject([]);
|
|
31
|
+
imgSelectedListLoading$ = new BehaviorSubject(false);
|
|
32
|
+
constructor() { }
|
|
34
33
|
getImgSelection() {
|
|
35
34
|
return this.imgSelection$.getValue();
|
|
36
35
|
}
|
|
@@ -91,17 +90,15 @@ class ImgSelectionService {
|
|
|
91
90
|
imgSelectedList.splice(toIndex, 0, imgSelectedList.splice(fromIndex, 1)[0]);
|
|
92
91
|
this.imgSelection$.next(imgSelectedList);
|
|
93
92
|
}
|
|
93
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgSelectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
94
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgSelectionService });
|
|
94
95
|
}
|
|
95
|
-
|
|
96
|
-
ImgSelectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImgSelectionService });
|
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImgSelectionService, decorators: [{
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgSelectionService, decorators: [{
|
|
98
97
|
type: Injectable
|
|
99
|
-
}], ctorParameters:
|
|
98
|
+
}], ctorParameters: () => [] });
|
|
100
99
|
|
|
101
100
|
class UserSettingsService {
|
|
102
|
-
|
|
103
|
-
this.userdisplayPreference = 'WzImgManagerListDisplayed';
|
|
104
|
-
}
|
|
101
|
+
userdisplayPreference = 'WzImgManagerListDisplayed';
|
|
105
102
|
/**
|
|
106
103
|
* true : display list
|
|
107
104
|
* false : display mosaic
|
|
@@ -114,22 +111,25 @@ class UserSettingsService {
|
|
|
114
111
|
const value = localStorage.getItem(this.userdisplayPreference);
|
|
115
112
|
return value == 'true';
|
|
116
113
|
}
|
|
114
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: UserSettingsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
115
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: UserSettingsService });
|
|
117
116
|
}
|
|
118
|
-
|
|
119
|
-
UserSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserSettingsService });
|
|
120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserSettingsService, decorators: [{
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: UserSettingsService, decorators: [{
|
|
121
118
|
type: Injectable
|
|
122
119
|
}] });
|
|
123
120
|
|
|
124
121
|
class AlertService {
|
|
122
|
+
nwbAlertService;
|
|
123
|
+
translateService;
|
|
124
|
+
actionMsg = 'ImgManager.alert.action';
|
|
125
|
+
alertConfig = {
|
|
126
|
+
message: '',
|
|
127
|
+
duration: 5000
|
|
128
|
+
};
|
|
129
|
+
alertRefComponent;
|
|
125
130
|
constructor(nwbAlertService, translateService) {
|
|
126
131
|
this.nwbAlertService = nwbAlertService;
|
|
127
132
|
this.translateService = translateService;
|
|
128
|
-
this.actionMsg = 'ImgManager.alert.action';
|
|
129
|
-
this.alertConfig = {
|
|
130
|
-
message: '',
|
|
131
|
-
duration: 5000
|
|
132
|
-
};
|
|
133
133
|
}
|
|
134
134
|
openAlert(msgKey) {
|
|
135
135
|
this.closePreviousAlert();
|
|
@@ -158,20 +158,18 @@ class AlertService {
|
|
|
158
158
|
const isErrorMsg = /error/i.test(msgKey);
|
|
159
159
|
this.alertConfig.color = isErrorMsg ? 'is-danger' : 'is-success';
|
|
160
160
|
}
|
|
161
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AlertService, deps: [{ token: i1.NwbAlertService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
162
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AlertService });
|
|
161
163
|
}
|
|
162
|
-
|
|
163
|
-
AlertService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AlertService });
|
|
164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AlertService, decorators: [{
|
|
164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AlertService, decorators: [{
|
|
165
165
|
type: Injectable
|
|
166
|
-
}], ctorParameters:
|
|
166
|
+
}], ctorParameters: () => [{ type: i1.NwbAlertService }, { type: i3.TranslateService }] });
|
|
167
167
|
|
|
168
168
|
class ImgEventService {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
this.listDisplayedChange = new Subject();
|
|
174
|
-
}
|
|
169
|
+
imgRemoved$ = new BehaviorSubject(undefined);
|
|
170
|
+
imgToEditEvent = new Subject();
|
|
171
|
+
imgAdded = new Subject();
|
|
172
|
+
listDisplayedChange = new Subject();
|
|
175
173
|
emitImgToEdit(imgToEdit) {
|
|
176
174
|
this.imgToEditEvent.next(imgToEdit);
|
|
177
175
|
}
|
|
@@ -190,40 +188,44 @@ class ImgEventService {
|
|
|
190
188
|
getlistDisplayedChange() {
|
|
191
189
|
return this.listDisplayedChange.asObservable();
|
|
192
190
|
}
|
|
191
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
192
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgEventService });
|
|
193
193
|
}
|
|
194
|
-
|
|
195
|
-
ImgEventService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImgEventService });
|
|
196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImgEventService, decorators: [{
|
|
194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgEventService, decorators: [{
|
|
197
195
|
type: Injectable
|
|
198
196
|
}] });
|
|
199
197
|
|
|
200
198
|
class ApiService {
|
|
199
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
200
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ApiService });
|
|
201
201
|
}
|
|
202
|
-
|
|
203
|
-
ApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ApiService });
|
|
204
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ApiService, decorators: [{
|
|
202
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ApiService, decorators: [{
|
|
205
203
|
type: Injectable
|
|
206
204
|
}] });
|
|
207
205
|
|
|
208
206
|
class UploadService {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
this.apiService = inject(ApiService);
|
|
212
|
-
}
|
|
207
|
+
imageUploaded$ = new Subject();
|
|
208
|
+
apiService = inject(ApiService);
|
|
213
209
|
uploadFile(formData) {
|
|
214
210
|
return this.apiService.uploadFile(formData).pipe(tap((img) => this.imageUploaded$.next(img)));
|
|
215
211
|
}
|
|
216
212
|
uploadFileByUrl(url, fileName) {
|
|
217
213
|
return this.apiService.uploadFileByUrl(url, fileName).pipe(tap((img) => this.imageUploaded$.next(img)));
|
|
218
214
|
}
|
|
215
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: UploadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
216
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: UploadService });
|
|
219
217
|
}
|
|
220
|
-
|
|
221
|
-
UploadService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadService });
|
|
222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadService, decorators: [{
|
|
218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: UploadService, decorators: [{
|
|
223
219
|
type: Injectable
|
|
224
220
|
}] });
|
|
225
221
|
|
|
226
222
|
class CanvaService {
|
|
223
|
+
wzImgEventService;
|
|
224
|
+
alertService;
|
|
225
|
+
translateService;
|
|
226
|
+
uploadService;
|
|
227
|
+
apiService;
|
|
228
|
+
canvaApi; // Object use to manage the canva api
|
|
227
229
|
get canvaApiURL() {
|
|
228
230
|
return this.apiService.CONFIG.canva_url;
|
|
229
231
|
}
|
|
@@ -231,20 +233,20 @@ class CanvaService {
|
|
|
231
233
|
get canvaApiKey() {
|
|
232
234
|
return this.apiService.CONFIG.canva_token;
|
|
233
235
|
}
|
|
236
|
+
imgLoading = false;
|
|
237
|
+
uploadingImg = 'ImgManager.CanvaBtn.uploadingImg';
|
|
238
|
+
successUploadPhoto = 'ImgManager.CanvaBtn.successImport';
|
|
239
|
+
errorUploadCanvaImg = 'ImgManager.CanvaBtn.errorUploadCanvaImg';
|
|
240
|
+
errorRenameCanvaImg = 'ImgManager.CanvaBtn.errorRenameCanvaImg';
|
|
241
|
+
forceToOpenCanva = false;
|
|
242
|
+
bindExpectedImgSizeEvent = new BehaviorSubject(null);
|
|
243
|
+
bindExpectedSizeDone = this.bindExpectedImgSizeEvent.asObservable();
|
|
234
244
|
constructor(wzImgEventService, alertService, translateService, uploadService, apiService) {
|
|
235
245
|
this.wzImgEventService = wzImgEventService;
|
|
236
246
|
this.alertService = alertService;
|
|
237
247
|
this.translateService = translateService;
|
|
238
248
|
this.uploadService = uploadService;
|
|
239
249
|
this.apiService = apiService;
|
|
240
|
-
this.imgLoading = false;
|
|
241
|
-
this.uploadingImg = 'ImgManager.CanvaBtn.uploadingImg';
|
|
242
|
-
this.successUploadPhoto = 'ImgManager.CanvaBtn.successImport';
|
|
243
|
-
this.errorUploadCanvaImg = 'ImgManager.CanvaBtn.errorUploadCanvaImg';
|
|
244
|
-
this.errorRenameCanvaImg = 'ImgManager.CanvaBtn.errorRenameCanvaImg';
|
|
245
|
-
this.forceToOpenCanva = false;
|
|
246
|
-
this.bindExpectedImgSizeEvent = new BehaviorSubject(null);
|
|
247
|
-
this.bindExpectedSizeDone = this.bindExpectedImgSizeEvent.asObservable();
|
|
248
250
|
}
|
|
249
251
|
getCanvaLogo() {
|
|
250
252
|
return this.apiService.CONFIG.assets_route + "canva/icon_canva.svg";
|
|
@@ -361,20 +363,18 @@ class CanvaService {
|
|
|
361
363
|
}
|
|
362
364
|
});
|
|
363
365
|
}
|
|
366
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: CanvaService, deps: [{ token: ImgEventService }, { token: AlertService }, { token: i3.TranslateService }, { token: UploadService }, { token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
367
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: CanvaService });
|
|
364
368
|
}
|
|
365
|
-
|
|
366
|
-
CanvaService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CanvaService });
|
|
367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CanvaService, decorators: [{
|
|
369
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: CanvaService, decorators: [{
|
|
368
370
|
type: Injectable
|
|
369
|
-
}], ctorParameters:
|
|
371
|
+
}], ctorParameters: () => [{ type: ImgEventService }, { type: AlertService }, { type: i3.TranslateService }, { type: UploadService }, { type: ApiService }] });
|
|
370
372
|
|
|
371
373
|
class DomService {
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
this.documentScrollDone = this.documentScrollSource.asObservable();
|
|
377
|
-
}
|
|
374
|
+
documentEventSource = new Subject();
|
|
375
|
+
documentEventDone = this.documentEventSource.asObservable();
|
|
376
|
+
documentScrollSource = new Subject();
|
|
377
|
+
documentScrollDone = this.documentScrollSource.asObservable();
|
|
378
378
|
documentEvent() {
|
|
379
379
|
return this.documentEventDone;
|
|
380
380
|
}
|
|
@@ -391,10 +391,10 @@ class DomService {
|
|
|
391
391
|
this.documentScrollSource.next(window);
|
|
392
392
|
};
|
|
393
393
|
}
|
|
394
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DomService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
395
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DomService });
|
|
394
396
|
}
|
|
395
|
-
|
|
396
|
-
DomService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DomService });
|
|
397
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DomService, decorators: [{
|
|
397
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DomService, decorators: [{
|
|
398
398
|
type: Injectable
|
|
399
399
|
}] });
|
|
400
400
|
|
|
@@ -406,10 +406,10 @@ class IconService {
|
|
|
406
406
|
link.crossOrigin = "anonymous";
|
|
407
407
|
document.getElementsByTagName('head')[0].appendChild(link);
|
|
408
408
|
}
|
|
409
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: IconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
410
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: IconService, providedIn: 'root' });
|
|
409
411
|
}
|
|
410
|
-
|
|
411
|
-
IconService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IconService, providedIn: 'root' });
|
|
412
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IconService, decorators: [{
|
|
412
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: IconService, decorators: [{
|
|
413
413
|
type: Injectable,
|
|
414
414
|
args: [{ providedIn: 'root' }]
|
|
415
415
|
}] });
|
|
@@ -426,59 +426,48 @@ const easeInOut = // the fade-in/fade-out animation.
|
|
|
426
426
|
]);
|
|
427
427
|
|
|
428
428
|
class ImgManagerService {
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
this.destroy$ = new Subject();
|
|
472
|
-
this.searchImagesParameters$ = new BehaviorSubject(this.DEFAULT_SEARCH_PARAMS);
|
|
473
|
-
this.refreshImageList$ = new Subject();
|
|
474
|
-
this.resetImageList$ = merge(this.uploadService.imageUploaded$);
|
|
475
|
-
this.isLoading$ = new BehaviorSubject(true);
|
|
476
|
-
this.fetchImagesList$ = merge(this.searchImagesParameters$.pipe(debounceTime(800), distinctUntilChanged()), this.refreshImageList$.pipe(switchMap(() => this.searchImagesParameters$))).pipe(map((params) => this.getHttpParameters(params)), tap(() => this.isLoading$.next(true)), switchMap((params) => forkJoin({
|
|
477
|
-
imageList: this.apiService.getShopImgList(params).pipe(take$1(1)),
|
|
478
|
-
imageTotal: this.apiService.getShopTotalImgList(params).pipe(take$1(1))
|
|
479
|
-
})), tap(() => this.isLoading$.next(false)));
|
|
480
|
-
this.imageList$ = merge(this.fetchImagesList$, this.resetImageList$.pipe(tap(() => this.isLoading$.next(true)), tap(() => this.searchImagesParameters$.next(this.DEFAULT_SEARCH_PARAMS)), map(() => this.DEFAULT_DATA_LIST))).pipe(startWith(this.DEFAULT_DATA_LIST), shareReplay(1));
|
|
481
|
-
}
|
|
429
|
+
uploadService = inject(UploadService);
|
|
430
|
+
params = new HttpParams().set("limit", "20").set("page", "1");
|
|
431
|
+
// Display the img selection
|
|
432
|
+
pageFicheProductConfig = {
|
|
433
|
+
stateDisplayed: 'closed',
|
|
434
|
+
multipleImgMode: true,
|
|
435
|
+
showImgManagerModule: true,
|
|
436
|
+
showSelection: true,
|
|
437
|
+
displayBtn: true,
|
|
438
|
+
pageficheProduct: true
|
|
439
|
+
};
|
|
440
|
+
angularFicheProductConfig = {
|
|
441
|
+
stateDisplayed: 'closed',
|
|
442
|
+
multipleImgMode: true,
|
|
443
|
+
showImgManagerModule: true,
|
|
444
|
+
showSelection: true,
|
|
445
|
+
displayBtn: false,
|
|
446
|
+
pageficheProduct: true
|
|
447
|
+
};
|
|
448
|
+
wiziblockConfig = {
|
|
449
|
+
stateDisplayed: 'closed',
|
|
450
|
+
multipleImgMode: false,
|
|
451
|
+
showImgManagerModule: true,
|
|
452
|
+
showSelection: false,
|
|
453
|
+
displayBtn: false
|
|
454
|
+
};
|
|
455
|
+
simpleWithButtonOpenerConfig = {
|
|
456
|
+
stateDisplayed: 'closed',
|
|
457
|
+
multipleImgMode: false,
|
|
458
|
+
showImgManagerModule: true,
|
|
459
|
+
showSelection: false,
|
|
460
|
+
displayBtn: true
|
|
461
|
+
};
|
|
462
|
+
fullWindowConfig = {
|
|
463
|
+
stateDisplayed: 'window',
|
|
464
|
+
multipleImgMode: false,
|
|
465
|
+
showImgManagerModule: true,
|
|
466
|
+
showSelection: false,
|
|
467
|
+
displayBtn: false
|
|
468
|
+
};
|
|
469
|
+
apiService = inject(ApiService);
|
|
470
|
+
destroy$ = new Subject();
|
|
482
471
|
get DEFAULT_SEARCH_PARAMS() {
|
|
483
472
|
return {
|
|
484
473
|
limit: '30',
|
|
@@ -497,6 +486,15 @@ class ImgManagerService {
|
|
|
497
486
|
imageTotal: 0
|
|
498
487
|
};
|
|
499
488
|
}
|
|
489
|
+
searchImagesParameters$ = new BehaviorSubject(this.DEFAULT_SEARCH_PARAMS);
|
|
490
|
+
refreshImageList$ = new Subject();
|
|
491
|
+
resetImageList$ = merge(this.uploadService.imageUploaded$);
|
|
492
|
+
isLoading$ = new BehaviorSubject(true);
|
|
493
|
+
fetchImagesList$ = merge(this.searchImagesParameters$.pipe(debounceTime(800), distinctUntilChanged()), this.refreshImageList$.pipe(switchMap(() => this.searchImagesParameters$))).pipe(map((params) => this.getHttpParameters(params)), tap(() => this.isLoading$.next(true)), switchMap((params) => forkJoin({
|
|
494
|
+
imageList: this.apiService.getShopImgList(params).pipe(take$1(1)),
|
|
495
|
+
imageTotal: this.apiService.getShopTotalImgList(params).pipe(take$1(1))
|
|
496
|
+
})), tap(() => this.isLoading$.next(false)));
|
|
497
|
+
imageList$ = merge(this.fetchImagesList$, this.resetImageList$.pipe(tap(() => this.isLoading$.next(true)), tap(() => this.searchImagesParameters$.next(this.DEFAULT_SEARCH_PARAMS)), map(() => this.DEFAULT_DATA_LIST))).pipe(startWith(this.DEFAULT_DATA_LIST), shareReplay(1));
|
|
500
498
|
getHttpParameters(params) {
|
|
501
499
|
let parameters = new HttpParams();
|
|
502
500
|
parameters = parameters.set('id_file:sort', 'desc');
|
|
@@ -548,22 +546,25 @@ class ImgManagerService {
|
|
|
548
546
|
this.destroy$.next();
|
|
549
547
|
this.destroy$.complete();
|
|
550
548
|
}
|
|
549
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
550
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgManagerService });
|
|
551
551
|
}
|
|
552
|
-
|
|
553
|
-
ImgManagerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImgManagerService });
|
|
554
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImgManagerService, decorators: [{
|
|
552
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgManagerService, decorators: [{
|
|
555
553
|
type: Injectable
|
|
556
554
|
}] });
|
|
557
555
|
|
|
558
556
|
class RenamePictureService {
|
|
557
|
+
apiService;
|
|
558
|
+
alertService;
|
|
559
|
+
imgManagerService;
|
|
560
|
+
picturesList = [];
|
|
561
|
+
errorRenameImg = 'ImgManager.ImgList.errorRenameImg';
|
|
562
|
+
msgSavingImgName = 'ImgManager.ImgLib.savingImgName';
|
|
563
|
+
msgImgNameSaved = 'ImgManager.ImgLib.imgNameSaved';
|
|
559
564
|
constructor(apiService, alertService, imgManagerService) {
|
|
560
565
|
this.apiService = apiService;
|
|
561
566
|
this.alertService = alertService;
|
|
562
567
|
this.imgManagerService = imgManagerService;
|
|
563
|
-
this.picturesList = [];
|
|
564
|
-
this.errorRenameImg = 'ImgManager.ImgList.errorRenameImg';
|
|
565
|
-
this.msgSavingImgName = 'ImgManager.ImgLib.savingImgName';
|
|
566
|
-
this.msgImgNameSaved = 'ImgManager.ImgLib.imgNameSaved';
|
|
567
568
|
}
|
|
568
569
|
setPicturesList(picturesList) {
|
|
569
570
|
this.picturesList = picturesList;
|
|
@@ -602,17 +603,15 @@ class RenamePictureService {
|
|
|
602
603
|
}
|
|
603
604
|
return null;
|
|
604
605
|
}
|
|
606
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: RenamePictureService, deps: [{ token: ApiService }, { token: AlertService }, { token: ImgManagerService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
607
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: RenamePictureService });
|
|
605
608
|
}
|
|
606
|
-
|
|
607
|
-
RenamePictureService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RenamePictureService });
|
|
608
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RenamePictureService, decorators: [{
|
|
609
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: RenamePictureService, decorators: [{
|
|
609
610
|
type: Injectable
|
|
610
|
-
}], ctorParameters:
|
|
611
|
+
}], ctorParameters: () => [{ type: ApiService }, { type: AlertService }, { type: ImgManagerService }] });
|
|
611
612
|
|
|
612
613
|
class ImgCDNService {
|
|
613
|
-
|
|
614
|
-
this.imgCDNConfig = inject(ApiService).IMG_SIZE;
|
|
615
|
-
}
|
|
614
|
+
imgCDNConfig = inject(ApiService).IMG_SIZE;
|
|
616
615
|
getUrlImg(size) {
|
|
617
616
|
const urlProperty = Object.keys(this.imgCDNConfig)
|
|
618
617
|
.filter(url => new RegExp(size, 'i').test(url))[0];
|
|
@@ -622,10 +621,10 @@ class ImgCDNService {
|
|
|
622
621
|
return Object.keys(this.imgCDNConfig)
|
|
623
622
|
.map(elem => elem.match(/_(\w+)_/)[1]);
|
|
624
623
|
}
|
|
624
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgCDNService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
625
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgCDNService });
|
|
625
626
|
}
|
|
626
|
-
|
|
627
|
-
ImgCDNService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImgCDNService });
|
|
628
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImgCDNService, decorators: [{
|
|
627
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgCDNService, decorators: [{
|
|
629
628
|
type: Injectable
|
|
630
629
|
}] });
|
|
631
630
|
|
|
@@ -633,14 +632,45 @@ class ImageNotFoundService {
|
|
|
633
632
|
imageNotFound($url) {
|
|
634
633
|
return;
|
|
635
634
|
}
|
|
635
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImageNotFoundService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
636
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImageNotFoundService });
|
|
636
637
|
}
|
|
637
|
-
|
|
638
|
-
ImageNotFoundService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImageNotFoundService });
|
|
639
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImageNotFoundService, decorators: [{
|
|
638
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImageNotFoundService, decorators: [{
|
|
640
639
|
type: Injectable
|
|
641
640
|
}] });
|
|
642
641
|
|
|
643
642
|
class ImagesActionHandler {
|
|
643
|
+
imgManager;
|
|
644
|
+
imgSelectionService;
|
|
645
|
+
http;
|
|
646
|
+
imgCDNService;
|
|
647
|
+
imgEventCardService;
|
|
648
|
+
alertService;
|
|
649
|
+
translateService;
|
|
650
|
+
apiService;
|
|
651
|
+
picturesList = [];
|
|
652
|
+
picturesListChange = new EventEmitter();
|
|
653
|
+
tableFilters = {
|
|
654
|
+
sort: undefined,
|
|
655
|
+
order: undefined,
|
|
656
|
+
searchValue: '',
|
|
657
|
+
totalItems: 0,
|
|
658
|
+
itemsPerPage: 30,
|
|
659
|
+
currentPage: 1
|
|
660
|
+
};
|
|
661
|
+
displayPexelsResults = false;
|
|
662
|
+
disable = false;
|
|
663
|
+
disableChange = new EventEmitter();
|
|
664
|
+
filtersChange = new EventEmitter();
|
|
665
|
+
pictureNameChange = new EventEmitter();
|
|
666
|
+
isLoading = false;
|
|
667
|
+
stateDisplayed;
|
|
668
|
+
previousName; // Use to save the previous picture name, when a user change his name
|
|
669
|
+
fakeImgRoute;
|
|
670
|
+
getDataAPISub;
|
|
671
|
+
errorRemoveImg = 'ImgManager.ImgList.errorRemoveImg';
|
|
672
|
+
errorAlreadyUsedImg = 'ImgManager.ImgList.errorAlreadyUsed';
|
|
673
|
+
imageNotFoundService = inject(ImageNotFoundService);
|
|
644
674
|
constructor(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, apiService) {
|
|
645
675
|
this.imgManager = imgManager;
|
|
646
676
|
this.imgSelectionService = imgSelectionService;
|
|
@@ -650,26 +680,9 @@ class ImagesActionHandler {
|
|
|
650
680
|
this.alertService = alertService;
|
|
651
681
|
this.translateService = translateService;
|
|
652
682
|
this.apiService = apiService;
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
this.tableFilters = {
|
|
656
|
-
sort: undefined,
|
|
657
|
-
order: undefined,
|
|
658
|
-
searchValue: '',
|
|
659
|
-
totalItems: 0,
|
|
660
|
-
itemsPerPage: 30,
|
|
661
|
-
currentPage: 1
|
|
662
|
-
};
|
|
663
|
-
this.displayPexelsResults = false;
|
|
664
|
-
this.disable = false;
|
|
665
|
-
this.disableChange = new EventEmitter();
|
|
666
|
-
this.filtersChange = new EventEmitter();
|
|
667
|
-
this.pictureNameChange = new EventEmitter();
|
|
668
|
-
this.isLoading = false;
|
|
683
|
+
}
|
|
684
|
+
ngOnInit() {
|
|
669
685
|
this.fakeImgRoute = this.apiService.CONFIG.assets_route + 'img/fake.png';
|
|
670
|
-
this.errorRemoveImg = 'ImgManager.ImgList.errorRemoveImg';
|
|
671
|
-
this.errorAlreadyUsedImg = 'ImgManager.ImgList.errorAlreadyUsed';
|
|
672
|
-
this.imageNotFoundService = inject(ImageNotFoundService);
|
|
673
686
|
}
|
|
674
687
|
/** Event emit when the header checkbox is checked */
|
|
675
688
|
onToggleAllCheckBoxRow(event) {
|
|
@@ -747,12 +760,12 @@ class ImagesActionHandler {
|
|
|
747
760
|
this.getDataAPISub.unsubscribe();
|
|
748
761
|
}
|
|
749
762
|
}
|
|
763
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImagesActionHandler, deps: [{ token: ImgManagerService }, { token: ImgSelectionService }, { token: i3$1.HttpClient }, { token: ImgCDNService }, { token: ImgEventService }, { token: AlertService }, { token: i3.TranslateService }, { token: ApiService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
764
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: ImagesActionHandler, inputs: { picturesList: "picturesList", tableFilters: "tableFilters", displayPexelsResults: "displayPexelsResults", disable: "disable", isLoading: "isLoading", stateDisplayed: "stateDisplayed" }, outputs: { picturesListChange: "picturesListChange", disableChange: "disableChange", filtersChange: "filtersChange", pictureNameChange: "pictureNameChange" }, ngImport: i0 });
|
|
750
765
|
}
|
|
751
|
-
|
|
752
|
-
ImagesActionHandler.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ImagesActionHandler, inputs: { picturesList: "picturesList", tableFilters: "tableFilters", displayPexelsResults: "displayPexelsResults", disable: "disable", isLoading: "isLoading", stateDisplayed: "stateDisplayed" }, outputs: { picturesListChange: "picturesListChange", disableChange: "disableChange", filtersChange: "filtersChange", pictureNameChange: "pictureNameChange" }, ngImport: i0 });
|
|
753
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImagesActionHandler, decorators: [{
|
|
766
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImagesActionHandler, decorators: [{
|
|
754
767
|
type: Directive
|
|
755
|
-
}], ctorParameters:
|
|
768
|
+
}], ctorParameters: () => [{ type: ImgManagerService }, { type: ImgSelectionService }, { type: i3$1.HttpClient }, { type: ImgCDNService }, { type: ImgEventService }, { type: AlertService }, { type: i3.TranslateService }, { type: ApiService }], propDecorators: { picturesList: [{
|
|
756
769
|
type: Input
|
|
757
770
|
}], picturesListChange: [{
|
|
758
771
|
type: Output
|
|
@@ -775,9 +788,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
775
788
|
}] } });
|
|
776
789
|
|
|
777
790
|
class LoadingDirective {
|
|
791
|
+
element;
|
|
792
|
+
currentLoading = 0;
|
|
793
|
+
interval = null;
|
|
778
794
|
constructor(el) {
|
|
779
|
-
this.currentLoading = 0;
|
|
780
|
-
this.interval = null;
|
|
781
795
|
this.element = el;
|
|
782
796
|
this.launchLoading();
|
|
783
797
|
}
|
|
@@ -804,17 +818,18 @@ class LoadingDirective {
|
|
|
804
818
|
this.interval = null;
|
|
805
819
|
}
|
|
806
820
|
}
|
|
821
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: LoadingDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
822
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: LoadingDirective, selector: "[btnLoadingAnim]", ngImport: i0 });
|
|
807
823
|
}
|
|
808
|
-
|
|
809
|
-
LoadingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LoadingDirective, selector: "[btnLoadingAnim]", ngImport: i0 });
|
|
810
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoadingDirective, decorators: [{
|
|
824
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: LoadingDirective, decorators: [{
|
|
811
825
|
type: Directive,
|
|
812
826
|
args: [{
|
|
813
827
|
selector: '[btnLoadingAnim]'
|
|
814
828
|
}]
|
|
815
|
-
}], ctorParameters:
|
|
829
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
816
830
|
|
|
817
831
|
class ImageSrcPipe {
|
|
832
|
+
imgCDNService;
|
|
818
833
|
constructor(imgCDNService) {
|
|
819
834
|
this.imgCDNService = imgCDNService;
|
|
820
835
|
}
|
|
@@ -828,24 +843,28 @@ class ImageSrcPipe {
|
|
|
828
843
|
}
|
|
829
844
|
return route + pictureName;
|
|
830
845
|
}
|
|
846
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImageSrcPipe, deps: [{ token: ImgCDNService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
847
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: ImageSrcPipe, name: "imgSrc" });
|
|
831
848
|
}
|
|
832
|
-
|
|
833
|
-
ImageSrcPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: ImageSrcPipe, name: "imgSrc" });
|
|
834
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImageSrcPipe, decorators: [{
|
|
849
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImageSrcPipe, decorators: [{
|
|
835
850
|
type: Pipe,
|
|
836
851
|
args: [{
|
|
837
852
|
name: 'imgSrc'
|
|
838
853
|
}]
|
|
839
|
-
}], ctorParameters:
|
|
854
|
+
}], ctorParameters: () => [{ type: ImgCDNService }] });
|
|
840
855
|
|
|
841
856
|
class ImgCardComponent extends ImagesActionHandler {
|
|
857
|
+
tabDisplayed;
|
|
858
|
+
fullSize;
|
|
859
|
+
picture;
|
|
860
|
+
index;
|
|
861
|
+
focusInput = false;
|
|
862
|
+
toggleImgSelected = new EventEmitter();
|
|
863
|
+
switchDisplayWindow = new EventEmitter();
|
|
864
|
+
isUploadSection = false;
|
|
865
|
+
activeConfirmDelete = false;
|
|
842
866
|
constructor(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, apiService) {
|
|
843
867
|
super(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, apiService);
|
|
844
|
-
this.focusInput = false;
|
|
845
|
-
this.toggleImgSelected = new EventEmitter();
|
|
846
|
-
this.switchDisplayWindow = new EventEmitter();
|
|
847
|
-
this.isUploadSection = false;
|
|
848
|
-
this.activeConfirmDelete = false;
|
|
849
868
|
}
|
|
850
869
|
ngOnInit() {
|
|
851
870
|
this.isUploadSection = this.tabDisplayed === 'img-upload';
|
|
@@ -856,17 +875,17 @@ class ImgCardComponent extends ImagesActionHandler {
|
|
|
856
875
|
onToggleImgSelected() {
|
|
857
876
|
this.toggleImgSelected.next();
|
|
858
877
|
}
|
|
878
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgCardComponent, deps: [{ token: ImgManagerService }, { token: ImgSelectionService }, { token: i3$1.HttpClient }, { token: ImgCDNService }, { token: ImgEventService }, { token: AlertService }, { token: i3.TranslateService }, { token: ApiService }], target: i0.ɵɵFactoryTarget.Component });
|
|
879
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: ImgCardComponent, selector: "img-card", inputs: { tabDisplayed: "tabDisplayed", fullSize: "fullSize", picture: "picture", index: "index" }, outputs: { toggleImgSelected: "toggleImgSelected", switchDisplayWindow: "switchDisplayWindow" }, usesInheritance: true, ngImport: i0, template: "<div class=\"addCssPriority\" [@easeInOut]=\"'in'\" [ngClass]=\"{ 'fullSize': fullSize }\">\r\n <div class=\"img-card\">\r\n <div class=\"img-card__container\"\r\n [ngClass]=\"{\r\n 'smallDisplay': stateDisplayed === 'small' || isUploadSection,\r\n 'imgSelected': picture.selected,\r\n 'deletion': picture.deleted}\">\r\n <img\r\n class=\"img-card__container__img\"\r\n [src]=\"picture.file_name | imgSrc : '400'\"\r\n [alt]=\"picture.display_name\"\r\n (click)=\"onToggleImgSelected()\"\r\n (error)=\"picture.imgNotLoaded=true;onPictureNotLoading($event);\"\r\n />\r\n <div\r\n class=\"img-card__container__config\"\r\n *ngIf=\"!picture.deleted && stateDisplayed !== 'small'\"\r\n >\r\n <button type=\"button\" class=\"size\"><i class=\"fal fa-image-polaroid\"></i><span>{{picture.raw_height}}x{{picture.raw_width}}</span></button>\r\n <button type=\"button\" class=\"dl\" (click)=\"onDownloadImg(picture.display_name, picture.file_name)\"><i class=\"fal fa-download\"></i><span>{{ 'ImgManager.ImgCard.download' | translate }}</span></button>\r\n <button type=\"button\" class=\"edit\" (click)=\"onEdit(picture)\"><i class=\"far fa-crop-alt\"></i><span>{{ 'ImgManager.ImgCard.edit' | translate }}</span></button>\r\n <button type=\"button\" class=\"deleted\" (click)=\"activeConfirmDelete = true;\"><i class=\"fal fa-times\"></i><span>{{ 'ImgManager.ImgCard.del' | translate }}</span></button>\r\n <button type=\"button\" class=\"selected\" (click)=\"onToggleImgSelected()\" *ngIf=\"stateDisplayed !== 'window'\">\r\n <i *ngIf=\"!picture.selected\" class=\"fal fa-square\"></i>\r\n <i *ngIf=\"picture.selected\" class=\"fa-solid fa-check-square checked\"></i>\r\n <span>{{ 'ImgManager.ImgCard.select' | translate }}</span>\r\n </button>\r\n </div>\r\n <div\r\n class=\"img-card__container__config img-card__container__config--small\"\r\n *ngIf=\"!picture.deleted && stateDisplayed === 'small'\"\r\n >\r\n <button class=\"show-edit\" (click)=\"displayLargeWindow()\"><i class=\"fa-solid fa-edit\"></i></button>\r\n </div>\r\n <div class=\"img-card__container__delete\" [ngClass]=\"{ 'show' : activeConfirmDelete}\">\r\n <span>{{ 'ImgManager.ImgCard.confirmDeleteImg' | translate }}</span>\r\n <div>\r\n <button (click)=\"activeConfirmDelete = false;\">{{ 'no' | translate }}</button>\r\n <button (click)=\"onRemoveImg(picture);activeConfirmDelete = false;\">{{ 'yes' | translate }}</button>\r\n </div>\r\n </div>\r\n <div class=\"img-card__container__valid\" *ngIf=\"stateDisplayed === 'small' && tabDisplayed == 'img-upload'\">\r\n <i class=\"far fa-check\"></i>\r\n <span>{{ 'ImgManager.ImgCard.validImgSmall' | translate }}</span>\r\n </div>\r\n <div\r\n *ngIf=\"picture.imgNotLoaded\"\r\n class=\"img-card__container__overlay\"\r\n [ngClass]=\"{'img-card__container__overlay--smallDisplay': stateDisplayed === 'small' || isUploadSection}\">\r\n <i (click)=\"onToggleImgSelected()\" class=\"fad fa-folder-times\"></i>\r\n </div>\r\n <span btnLoadingAnim class=\"btnLoadingAnnimation\" *ngIf=\"picture.deleted\"></span>\r\n\r\n </div>\r\n <div\r\n class=\"img-card__nameContainer\"\r\n [ngClass]=\"{'smallNameDisplay': stateDisplayed === 'small' || isUploadSection, 'focus': focusInput}\">\r\n <input\r\n type=\"text\"\r\n class=\"wzImgMngInput img-card__nameContainer__name\"\r\n [(ngModel)]=\"picture.display_name\"\r\n (ngModelChange)=\"onNameChange(picture.id_file)\"\r\n [ngModelOptions]=\"{standalone: true, updateOn: 'blur'}\"\r\n (focus)=\"previousName=picture.display_name;focusInput = true;\"\r\n (blur)=\"focusInput = false;\"\r\n >\r\n <span>{{picture.display_name}}</span>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: LoadingDirective, selector: "[btnLoadingAnim]" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: ImageSrcPipe, name: "imgSrc" }], animations: [
|
|
880
|
+
easeInOut
|
|
881
|
+
] });
|
|
859
882
|
}
|
|
860
|
-
|
|
861
|
-
ImgCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ImgCardComponent, selector: "img-card", inputs: { tabDisplayed: "tabDisplayed", fullSize: "fullSize", picture: "picture", index: "index" }, outputs: { toggleImgSelected: "toggleImgSelected", switchDisplayWindow: "switchDisplayWindow" }, usesInheritance: true, ngImport: i0, template: "<div class=\"addCssPriority\" [@easeInOut]=\"'in'\" [ngClass]=\"{ 'fullSize': fullSize }\">\r\n <div class=\"img-card\">\r\n <div class=\"img-card__container\"\r\n [ngClass]=\"{\r\n 'smallDisplay': stateDisplayed === 'small' || isUploadSection,\r\n 'imgSelected': picture.selected,\r\n 'deletion': picture.deleted}\">\r\n <img\r\n class=\"img-card__container__img\"\r\n [src]=\"picture.file_name | imgSrc : '400'\"\r\n [alt]=\"picture.display_name\"\r\n (click)=\"onToggleImgSelected()\"\r\n (error)=\"picture.imgNotLoaded=true;onPictureNotLoading($event);\"\r\n />\r\n <div\r\n class=\"img-card__container__config\"\r\n *ngIf=\"!picture.deleted && stateDisplayed !== 'small'\"\r\n >\r\n <button type=\"button\" class=\"size\"><i class=\"fal fa-image-polaroid\"></i><span>{{picture.raw_height}}x{{picture.raw_width}}</span></button>\r\n <button type=\"button\" class=\"dl\" (click)=\"onDownloadImg(picture.display_name, picture.file_name)\"><i class=\"fal fa-download\"></i><span>{{ 'ImgManager.ImgCard.download' | translate }}</span></button>\r\n <button type=\"button\" class=\"edit\" (click)=\"onEdit(picture)\"><i class=\"far fa-crop-alt\"></i><span>{{ 'ImgManager.ImgCard.edit' | translate }}</span></button>\r\n <button type=\"button\" class=\"deleted\" (click)=\"activeConfirmDelete = true;\"><i class=\"fal fa-times\"></i><span>{{ 'ImgManager.ImgCard.del' | translate }}</span></button>\r\n <button type=\"button\" class=\"selected\" (click)=\"onToggleImgSelected()\" *ngIf=\"stateDisplayed !== 'window'\">\r\n <i *ngIf=\"!picture.selected\" class=\"fal fa-square\"></i>\r\n <i *ngIf=\"picture.selected\" class=\"fa-solid fa-check-square checked\"></i>\r\n <span>{{ 'ImgManager.ImgCard.select' | translate }}</span>\r\n </button>\r\n </div>\r\n <div\r\n class=\"img-card__container__config img-card__container__config--small\"\r\n *ngIf=\"!picture.deleted && stateDisplayed === 'small'\"\r\n >\r\n <button class=\"show-edit\" (click)=\"displayLargeWindow()\"><i class=\"fa-solid fa-edit\"></i></button>\r\n </div>\r\n <div class=\"img-card__container__delete\" [ngClass]=\"{ 'show' : activeConfirmDelete}\">\r\n <span>{{ 'ImgManager.ImgCard.confirmDeleteImg' | translate }}</span>\r\n <div>\r\n <button (click)=\"activeConfirmDelete = false;\">{{ 'no' | translate }}</button>\r\n <button (click)=\"onRemoveImg(picture);activeConfirmDelete = false;\">{{ 'yes' | translate }}</button>\r\n </div>\r\n </div>\r\n <div class=\"img-card__container__valid\" *ngIf=\"stateDisplayed === 'small' && tabDisplayed == 'img-upload'\">\r\n <i class=\"far fa-check\"></i>\r\n <span>{{ 'ImgManager.ImgCard.validImgSmall' | translate }}</span>\r\n </div>\r\n <div\r\n *ngIf=\"picture.imgNotLoaded\"\r\n class=\"img-card__container__overlay\"\r\n [ngClass]=\"{'img-card__container__overlay--smallDisplay': stateDisplayed === 'small' || isUploadSection}\">\r\n <i (click)=\"onToggleImgSelected()\" class=\"fad fa-folder-times\"></i>\r\n </div>\r\n <span btnLoadingAnim class=\"btnLoadingAnnimation\" *ngIf=\"picture.deleted\"></span>\r\n\r\n </div>\r\n <div\r\n class=\"img-card__nameContainer\"\r\n [ngClass]=\"{'smallNameDisplay': stateDisplayed === 'small' || isUploadSection, 'focus': focusInput}\">\r\n <input\r\n type=\"text\"\r\n class=\"wzImgMngInput img-card__nameContainer__name\"\r\n [(ngModel)]=\"picture.display_name\"\r\n (ngModelChange)=\"onNameChange(picture.id_file)\"\r\n [ngModelOptions]=\"{standalone: true, updateOn: 'blur'}\"\r\n (focus)=\"previousName=picture.display_name;focusInput = true;\"\r\n (blur)=\"focusInput = false;\"\r\n >\r\n <span>{{picture.display_name}}</span>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: LoadingDirective, selector: "[btnLoadingAnim]" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: ImageSrcPipe, name: "imgSrc" }], animations: [
|
|
862
|
-
easeInOut
|
|
863
|
-
] });
|
|
864
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImgCardComponent, decorators: [{
|
|
883
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgCardComponent, decorators: [{
|
|
865
884
|
type: Component,
|
|
866
885
|
args: [{ selector: 'img-card', animations: [
|
|
867
886
|
easeInOut
|
|
868
887
|
], template: "<div class=\"addCssPriority\" [@easeInOut]=\"'in'\" [ngClass]=\"{ 'fullSize': fullSize }\">\r\n <div class=\"img-card\">\r\n <div class=\"img-card__container\"\r\n [ngClass]=\"{\r\n 'smallDisplay': stateDisplayed === 'small' || isUploadSection,\r\n 'imgSelected': picture.selected,\r\n 'deletion': picture.deleted}\">\r\n <img\r\n class=\"img-card__container__img\"\r\n [src]=\"picture.file_name | imgSrc : '400'\"\r\n [alt]=\"picture.display_name\"\r\n (click)=\"onToggleImgSelected()\"\r\n (error)=\"picture.imgNotLoaded=true;onPictureNotLoading($event);\"\r\n />\r\n <div\r\n class=\"img-card__container__config\"\r\n *ngIf=\"!picture.deleted && stateDisplayed !== 'small'\"\r\n >\r\n <button type=\"button\" class=\"size\"><i class=\"fal fa-image-polaroid\"></i><span>{{picture.raw_height}}x{{picture.raw_width}}</span></button>\r\n <button type=\"button\" class=\"dl\" (click)=\"onDownloadImg(picture.display_name, picture.file_name)\"><i class=\"fal fa-download\"></i><span>{{ 'ImgManager.ImgCard.download' | translate }}</span></button>\r\n <button type=\"button\" class=\"edit\" (click)=\"onEdit(picture)\"><i class=\"far fa-crop-alt\"></i><span>{{ 'ImgManager.ImgCard.edit' | translate }}</span></button>\r\n <button type=\"button\" class=\"deleted\" (click)=\"activeConfirmDelete = true;\"><i class=\"fal fa-times\"></i><span>{{ 'ImgManager.ImgCard.del' | translate }}</span></button>\r\n <button type=\"button\" class=\"selected\" (click)=\"onToggleImgSelected()\" *ngIf=\"stateDisplayed !== 'window'\">\r\n <i *ngIf=\"!picture.selected\" class=\"fal fa-square\"></i>\r\n <i *ngIf=\"picture.selected\" class=\"fa-solid fa-check-square checked\"></i>\r\n <span>{{ 'ImgManager.ImgCard.select' | translate }}</span>\r\n </button>\r\n </div>\r\n <div\r\n class=\"img-card__container__config img-card__container__config--small\"\r\n *ngIf=\"!picture.deleted && stateDisplayed === 'small'\"\r\n >\r\n <button class=\"show-edit\" (click)=\"displayLargeWindow()\"><i class=\"fa-solid fa-edit\"></i></button>\r\n </div>\r\n <div class=\"img-card__container__delete\" [ngClass]=\"{ 'show' : activeConfirmDelete}\">\r\n <span>{{ 'ImgManager.ImgCard.confirmDeleteImg' | translate }}</span>\r\n <div>\r\n <button (click)=\"activeConfirmDelete = false;\">{{ 'no' | translate }}</button>\r\n <button (click)=\"onRemoveImg(picture);activeConfirmDelete = false;\">{{ 'yes' | translate }}</button>\r\n </div>\r\n </div>\r\n <div class=\"img-card__container__valid\" *ngIf=\"stateDisplayed === 'small' && tabDisplayed == 'img-upload'\">\r\n <i class=\"far fa-check\"></i>\r\n <span>{{ 'ImgManager.ImgCard.validImgSmall' | translate }}</span>\r\n </div>\r\n <div\r\n *ngIf=\"picture.imgNotLoaded\"\r\n class=\"img-card__container__overlay\"\r\n [ngClass]=\"{'img-card__container__overlay--smallDisplay': stateDisplayed === 'small' || isUploadSection}\">\r\n <i (click)=\"onToggleImgSelected()\" class=\"fad fa-folder-times\"></i>\r\n </div>\r\n <span btnLoadingAnim class=\"btnLoadingAnnimation\" *ngIf=\"picture.deleted\"></span>\r\n\r\n </div>\r\n <div\r\n class=\"img-card__nameContainer\"\r\n [ngClass]=\"{'smallNameDisplay': stateDisplayed === 'small' || isUploadSection, 'focus': focusInput}\">\r\n <input\r\n type=\"text\"\r\n class=\"wzImgMngInput img-card__nameContainer__name\"\r\n [(ngModel)]=\"picture.display_name\"\r\n (ngModelChange)=\"onNameChange(picture.id_file)\"\r\n [ngModelOptions]=\"{standalone: true, updateOn: 'blur'}\"\r\n (focus)=\"previousName=picture.display_name;focusInput = true;\"\r\n (blur)=\"focusInput = false;\"\r\n >\r\n <span>{{picture.display_name}}</span>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n" }]
|
|
869
|
-
}], ctorParameters:
|
|
888
|
+
}], ctorParameters: () => [{ type: ImgManagerService }, { type: ImgSelectionService }, { type: i3$1.HttpClient }, { type: ImgCDNService }, { type: ImgEventService }, { type: AlertService }, { type: i3.TranslateService }, { type: ApiService }], propDecorators: { tabDisplayed: [{
|
|
870
889
|
type: Input
|
|
871
890
|
}], fullSize: [{
|
|
872
891
|
type: Input
|
|
@@ -881,12 +900,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
881
900
|
}] } });
|
|
882
901
|
|
|
883
902
|
class UploadListComponent {
|
|
903
|
+
imgSelectionService;
|
|
904
|
+
renamePictureService;
|
|
905
|
+
picturesList = [];
|
|
906
|
+
imgSelectionChange;
|
|
907
|
+
selectImgEvent;
|
|
908
|
+
stateDisplayed;
|
|
909
|
+
tabDisplayed;
|
|
910
|
+
multipleImgMode = false;
|
|
911
|
+
switchDisplayWindow = new EventEmitter();
|
|
884
912
|
constructor(imgSelectionService, renamePictureService) {
|
|
885
913
|
this.imgSelectionService = imgSelectionService;
|
|
886
914
|
this.renamePictureService = renamePictureService;
|
|
887
|
-
this.picturesList = [];
|
|
888
|
-
this.multipleImgMode = false;
|
|
889
|
-
this.switchDisplayWindow = new EventEmitter();
|
|
890
915
|
}
|
|
891
916
|
ngOnInit() {
|
|
892
917
|
this.setEvents();
|
|
@@ -928,17 +953,17 @@ class UploadListComponent {
|
|
|
928
953
|
ngOnDestroy() {
|
|
929
954
|
this.imgSelectionChange.unsubscribe();
|
|
930
955
|
}
|
|
956
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: UploadListComponent, deps: [{ token: ImgSelectionService }, { token: RenamePictureService }], target: i0.ɵɵFactoryTarget.Component });
|
|
957
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: UploadListComponent, selector: "upload-list", inputs: { stateDisplayed: "stateDisplayed", tabDisplayed: "tabDisplayed", multipleImgMode: "multipleImgMode" }, outputs: { switchDisplayWindow: "switchDisplayWindow" }, ngImport: i0, template: "<div class=\"upload-list\" [ngClass]=\"{'smallDisplay': stateDisplayed === 'small'}\" [@easeInOut]=\"'in'\">\r\n\r\n <ng-scrollbar\r\n class=\"upload-list__scroll\"\r\n [ngClass]=\"{\r\n 'upload-list__scroll--smallDisplay': stateDisplayed === 'small',\r\n 'upload-list__scroll--window': stateDisplayed === 'window'}\"\r\n >\r\n <div class=\"upload-list__box\">\r\n <div class=\"upload-list__box__container\">\r\n <div>\r\n <p class=\"mainColor\">\r\n {{ picturesList? picturesList.length : '' }}\r\n <ng-container *ngIf=\"picturesList && picturesList.length > 1\">{{ 'ImgManager.UploadList.imgSuccessImport' | translate }}</ng-container>\r\n <ng-container *ngIf=\"picturesList && picturesList.length === 1\">{{ 'ImgManager.UploadList.imgSuccessImportOne' | translate }}</ng-container>\r\n </p>\r\n <div class=\"dropdown is-hoverable\">\r\n <div class=\"dropdown-trigger\">\r\n <i\r\n aria-haspopup=\"true\" aria-controls=\"dropdown-menuInfoSeo\"\r\n class=\"fa-solid fa-info-circle\">\r\n </i>\r\n </div>\r\n <div class=\"dropdown-menu dropDownShadow\" id=\"dropdown-menuInfoSeo\" role=\"menu\">\r\n <div class=\"dropdown-content\">\r\n <div class=\"dropdown-item\">\r\n <p>{{ 'ImgManager.UploadList.seo.rezise' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n </div>\r\n <div class=\"dropdown-item\">\r\n <p>{{ 'ImgManager.UploadList.seo.webp' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n </div>\r\n <div class=\"dropdown-item\">\r\n <p>{{ 'ImgManager.UploadList.seo.cdn' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n </div>\r\n <div class=\"dropdown-item\">\r\n <p>{{ 'ImgManager.UploadList.seo.lazyloading' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"upload-list__box__cards\">\r\n <div class=\"upload-list__box__cards__card\" *ngFor=\"let picture of picturesList; let index = index;\">\r\n <img-card\r\n [picture]=\"picture\"\r\n [stateDisplayed]=\"stateDisplayed\"\r\n (toggleImgSelected)=\"onToggleSelectImg(index)\"\r\n (switchDisplayWindow)=\"switchDisplayWindowCard()\"\r\n (pictureNameChange)=\"onRenamePicture($event)\"\r\n ></img-card>\r\n <div class=\"upload-list__box__cards__card__btnBox\">\r\n <button type=\"button\" class=\"button success upload-list__box__cards__card__btnBox__btn\"><i class=\"fal fa-check\"></i></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-scrollbar>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.NgScrollbar, selector: "ng-scrollbar", inputs: ["disabled", "sensorDisabled", "pointerEventsDisabled", "viewportPropagateMouseMove", "autoHeightDisabled", "autoWidthDisabled", "viewClass", "trackClass", "thumbClass", "minThumbSize", "trackClickScrollDuration", "pointerEventsMethod", "track", "visibility", "appearance", "position", "sensorDebounce", "scrollAuditTime"], outputs: ["updated"], exportAs: ["ngScrollbar"] }, { kind: "component", type: ImgCardComponent, selector: "img-card", inputs: ["tabDisplayed", "fullSize", "picture", "index"], outputs: ["toggleImgSelected", "switchDisplayWindow"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], animations: [
|
|
958
|
+
easeInOut
|
|
959
|
+
] });
|
|
931
960
|
}
|
|
932
|
-
|
|
933
|
-
UploadListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UploadListComponent, selector: "upload-list", inputs: { stateDisplayed: "stateDisplayed", tabDisplayed: "tabDisplayed", multipleImgMode: "multipleImgMode" }, outputs: { switchDisplayWindow: "switchDisplayWindow" }, ngImport: i0, template: "<div class=\"upload-list\" [ngClass]=\"{'smallDisplay': stateDisplayed === 'small'}\" [@easeInOut]=\"'in'\">\r\n\r\n <ng-scrollbar\r\n class=\"upload-list__scroll\"\r\n [ngClass]=\"{\r\n 'upload-list__scroll--smallDisplay': stateDisplayed === 'small',\r\n 'upload-list__scroll--window': stateDisplayed === 'window'}\"\r\n >\r\n <div class=\"upload-list__box\">\r\n <div class=\"upload-list__box__container\">\r\n <div>\r\n <p class=\"mainColor\">\r\n {{ picturesList? picturesList.length : '' }}\r\n <ng-container *ngIf=\"picturesList && picturesList.length > 1\">{{ 'ImgManager.UploadList.imgSuccessImport' | translate }}</ng-container>\r\n <ng-container *ngIf=\"picturesList && picturesList.length === 1\">{{ 'ImgManager.UploadList.imgSuccessImportOne' | translate }}</ng-container>\r\n </p>\r\n <div class=\"dropdown is-hoverable\">\r\n <div class=\"dropdown-trigger\">\r\n <i\r\n aria-haspopup=\"true\" aria-controls=\"dropdown-menuInfoSeo\"\r\n class=\"fa-solid fa-info-circle\">\r\n </i>\r\n </div>\r\n <div class=\"dropdown-menu dropDownShadow\" id=\"dropdown-menuInfoSeo\" role=\"menu\">\r\n <div class=\"dropdown-content\">\r\n <div class=\"dropdown-item\">\r\n <p>{{ 'ImgManager.UploadList.seo.rezise' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n </div>\r\n <div class=\"dropdown-item\">\r\n <p>{{ 'ImgManager.UploadList.seo.webp' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n </div>\r\n <div class=\"dropdown-item\">\r\n <p>{{ 'ImgManager.UploadList.seo.cdn' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n </div>\r\n <div class=\"dropdown-item\">\r\n <p>{{ 'ImgManager.UploadList.seo.lazyloading' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"upload-list__box__cards\">\r\n <div class=\"upload-list__box__cards__card\" *ngFor=\"let picture of picturesList; let index = index;\">\r\n <img-card\r\n [picture]=\"picture\"\r\n [stateDisplayed]=\"stateDisplayed\"\r\n (toggleImgSelected)=\"onToggleSelectImg(index)\"\r\n (switchDisplayWindow)=\"switchDisplayWindowCard()\"\r\n (pictureNameChange)=\"onRenamePicture($event)\"\r\n ></img-card>\r\n <div class=\"upload-list__box__cards__card__btnBox\">\r\n <button type=\"button\" class=\"button success upload-list__box__cards__card__btnBox__btn\"><i class=\"fal fa-check\"></i></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-scrollbar>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.NgScrollbar, selector: "ng-scrollbar", inputs: ["disabled", "sensorDisabled", "pointerEventsDisabled", "viewportPropagateMouseMove", "autoHeightDisabled", "autoWidthDisabled", "viewClass", "trackClass", "thumbClass", "minThumbSize", "trackClickScrollDuration", "pointerEventsMethod", "track", "visibility", "appearance", "position", "sensorDebounce", "scrollAuditTime"], outputs: ["updated"], exportAs: ["ngScrollbar"] }, { kind: "component", type: ImgCardComponent, selector: "img-card", inputs: ["tabDisplayed", "fullSize", "picture", "index"], outputs: ["toggleImgSelected", "switchDisplayWindow"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], animations: [
|
|
934
|
-
easeInOut
|
|
935
|
-
] });
|
|
936
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadListComponent, decorators: [{
|
|
961
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: UploadListComponent, decorators: [{
|
|
937
962
|
type: Component,
|
|
938
963
|
args: [{ selector: 'upload-list', animations: [
|
|
939
964
|
easeInOut
|
|
940
965
|
], template: "<div class=\"upload-list\" [ngClass]=\"{'smallDisplay': stateDisplayed === 'small'}\" [@easeInOut]=\"'in'\">\r\n\r\n <ng-scrollbar\r\n class=\"upload-list__scroll\"\r\n [ngClass]=\"{\r\n 'upload-list__scroll--smallDisplay': stateDisplayed === 'small',\r\n 'upload-list__scroll--window': stateDisplayed === 'window'}\"\r\n >\r\n <div class=\"upload-list__box\">\r\n <div class=\"upload-list__box__container\">\r\n <div>\r\n <p class=\"mainColor\">\r\n {{ picturesList? picturesList.length : '' }}\r\n <ng-container *ngIf=\"picturesList && picturesList.length > 1\">{{ 'ImgManager.UploadList.imgSuccessImport' | translate }}</ng-container>\r\n <ng-container *ngIf=\"picturesList && picturesList.length === 1\">{{ 'ImgManager.UploadList.imgSuccessImportOne' | translate }}</ng-container>\r\n </p>\r\n <div class=\"dropdown is-hoverable\">\r\n <div class=\"dropdown-trigger\">\r\n <i\r\n aria-haspopup=\"true\" aria-controls=\"dropdown-menuInfoSeo\"\r\n class=\"fa-solid fa-info-circle\">\r\n </i>\r\n </div>\r\n <div class=\"dropdown-menu dropDownShadow\" id=\"dropdown-menuInfoSeo\" role=\"menu\">\r\n <div class=\"dropdown-content\">\r\n <div class=\"dropdown-item\">\r\n <p>{{ 'ImgManager.UploadList.seo.rezise' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n </div>\r\n <div class=\"dropdown-item\">\r\n <p>{{ 'ImgManager.UploadList.seo.webp' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n </div>\r\n <div class=\"dropdown-item\">\r\n <p>{{ 'ImgManager.UploadList.seo.cdn' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n </div>\r\n <div class=\"dropdown-item\">\r\n <p>{{ 'ImgManager.UploadList.seo.lazyloading' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"upload-list__box__cards\">\r\n <div class=\"upload-list__box__cards__card\" *ngFor=\"let picture of picturesList; let index = index;\">\r\n <img-card\r\n [picture]=\"picture\"\r\n [stateDisplayed]=\"stateDisplayed\"\r\n (toggleImgSelected)=\"onToggleSelectImg(index)\"\r\n (switchDisplayWindow)=\"switchDisplayWindowCard()\"\r\n (pictureNameChange)=\"onRenamePicture($event)\"\r\n ></img-card>\r\n <div class=\"upload-list__box__cards__card__btnBox\">\r\n <button type=\"button\" class=\"button success upload-list__box__cards__card__btnBox__btn\"><i class=\"fal fa-check\"></i></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-scrollbar>\r\n</div>\r\n" }]
|
|
941
|
-
}], ctorParameters:
|
|
966
|
+
}], ctorParameters: () => [{ type: ImgSelectionService }, { type: RenamePictureService }], propDecorators: { stateDisplayed: [{
|
|
942
967
|
type: Input
|
|
943
968
|
}], tabDisplayed: [{
|
|
944
969
|
type: Input
|
|
@@ -949,13 +974,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
949
974
|
}] } });
|
|
950
975
|
|
|
951
976
|
class LoaderComponent {
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
977
|
+
text;
|
|
978
|
+
small = false;
|
|
979
|
+
position;
|
|
980
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
981
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: LoaderComponent, selector: "wz-loader", inputs: { text: "text", small: "small", position: "position" }, ngImport: i0, template: "<div class=\"wz-loader\" [ngClass]=\"{'is-small': small}\" [ngStyle]=\"{'position': position}\">\n <div class='loader loader1'>\n <div>\n <div>\n <div>\n <div>\n <div>\n <div></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <p class=\"is-textcentered\" *ngIf=\"text\" [innerHTML]=\"text\"></p>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
955
982
|
}
|
|
956
|
-
|
|
957
|
-
LoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: LoaderComponent, selector: "wz-loader", inputs: { text: "text", small: "small", position: "position" }, ngImport: i0, template: "<div class=\"wz-loader\" [ngClass]=\"{'is-small': small}\" [ngStyle]=\"{'position': position}\">\n <div class='loader loader1'>\n <div>\n <div>\n <div>\n <div>\n <div>\n <div></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <p class=\"is-textcentered\" *ngIf=\"text\" [innerHTML]=\"text\"></p>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
958
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoaderComponent, decorators: [{
|
|
983
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: LoaderComponent, decorators: [{
|
|
959
984
|
type: Component,
|
|
960
985
|
args: [{ selector: 'wz-loader', encapsulation: ViewEncapsulation.None, template: "<div class=\"wz-loader\" [ngClass]=\"{'is-small': small}\" [ngStyle]=\"{'position': position}\">\n <div class='loader loader1'>\n <div>\n <div>\n <div>\n <div>\n <div>\n <div></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <p class=\"is-textcentered\" *ngIf=\"text\" [innerHTML]=\"text\"></p>\n</div>\n" }]
|
|
961
986
|
}], propDecorators: { text: [{
|
|
@@ -967,11 +992,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
967
992
|
}] } });
|
|
968
993
|
|
|
969
994
|
class DragDropDirective {
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
this.opacity = '1';
|
|
974
|
-
}
|
|
995
|
+
onFileDropped = new EventEmitter();
|
|
996
|
+
background = '#fff';
|
|
997
|
+
opacity = '1';
|
|
975
998
|
onDragOver(evt) {
|
|
976
999
|
evt.preventDefault();
|
|
977
1000
|
evt.stopPropagation();
|
|
@@ -994,10 +1017,10 @@ class DragDropDirective {
|
|
|
994
1017
|
this.onFileDropped.emit(files);
|
|
995
1018
|
}
|
|
996
1019
|
}
|
|
1020
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DragDropDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1021
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: DragDropDirective, selector: "[appDragDrop]", outputs: { onFileDropped: "onFileDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "ondrop($event)" }, properties: { "style.background-color": "this.background", "style.opacity": "this.opacity" } }, ngImport: i0 });
|
|
997
1022
|
}
|
|
998
|
-
|
|
999
|
-
DragDropDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DragDropDirective, selector: "[appDragDrop]", outputs: { onFileDropped: "onFileDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "ondrop($event)" }, properties: { "style.background-color": "this.background", "style.opacity": "this.opacity" } }, ngImport: i0 });
|
|
1000
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragDropDirective, decorators: [{
|
|
1023
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DragDropDirective, decorators: [{
|
|
1001
1024
|
type: Directive,
|
|
1002
1025
|
args: [{
|
|
1003
1026
|
selector: '[appDragDrop]'
|
|
@@ -1022,18 +1045,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1022
1045
|
}] } });
|
|
1023
1046
|
|
|
1024
1047
|
class ImgUploadComponent {
|
|
1048
|
+
alertService;
|
|
1049
|
+
apiService;
|
|
1050
|
+
translateService;
|
|
1051
|
+
uploadService;
|
|
1052
|
+
files = [];
|
|
1053
|
+
isLoading = false;
|
|
1054
|
+
assetsIcon;
|
|
1055
|
+
stateDisplayed;
|
|
1056
|
+
imgUploaded = new EventEmitter();
|
|
1057
|
+
dragAndDropBox;
|
|
1058
|
+
loadingText = 'ImgManager.ImgUpload.loading';
|
|
1059
|
+
errorUploadingImg = 'ImgManager.ImgUpload.errorUploadingImg';
|
|
1060
|
+
errorNotImg = 'ImgManager.ImgUpload.errorNotImg';
|
|
1061
|
+
MAX_IMAGE_SIZE = 10000000; // In bytes
|
|
1025
1062
|
constructor(alertService, apiService, translateService, uploadService) {
|
|
1026
1063
|
this.alertService = alertService;
|
|
1027
1064
|
this.apiService = apiService;
|
|
1028
1065
|
this.translateService = translateService;
|
|
1029
1066
|
this.uploadService = uploadService;
|
|
1030
|
-
this.files = [];
|
|
1031
|
-
this.isLoading = false;
|
|
1032
|
-
this.imgUploaded = new EventEmitter();
|
|
1033
|
-
this.loadingText = 'ImgManager.ImgUpload.loading';
|
|
1034
|
-
this.errorUploadingImg = 'ImgManager.ImgUpload.errorUploadingImg';
|
|
1035
|
-
this.errorNotImg = 'ImgManager.ImgUpload.errorNotImg';
|
|
1036
|
-
this.MAX_IMAGE_SIZE = 10000000; // In bytes
|
|
1037
1067
|
}
|
|
1038
1068
|
ngOnInit() {
|
|
1039
1069
|
this.assetsIcon = this.getAssets();
|
|
@@ -1113,17 +1143,17 @@ class ImgUploadComponent {
|
|
|
1113
1143
|
removeDragAndDropStyle() {
|
|
1114
1144
|
this.dragAndDropBox.nativeElement.style = '';
|
|
1115
1145
|
}
|
|
1146
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgUploadComponent, deps: [{ token: AlertService }, { token: ApiService }, { token: i3.TranslateService }, { token: UploadService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1147
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: ImgUploadComponent, selector: "img-upload", inputs: { stateDisplayed: "stateDisplayed" }, outputs: { imgUploaded: "imgUploaded" }, viewQueries: [{ propertyName: "dragAndDropBox", first: true, predicate: ["dragAndDropBox"], descendants: true }], ngImport: i0, template: "<div\r\n class=\"img-upload has-text-centered\"\r\n [ngClass]=\"{'img-upload--small': stateDisplayed === 'small'}\"\r\n (click)=\"fileInput.click()\"\r\n appDragDrop\r\n (onFileDropped)=\"filesChangeByDragAndDrop($any($event))\"\r\n #dragAndDropBox\r\n [@easeInOut]=\"'in'\"\r\n>\r\n <input hidden type=\"file\" #fileInput (change)=\"filesChangeByClick($event)\" accept=\"image/*\" multiple >\r\n <div class=\"img-upload__container\" [ngClass]=\"{'img-upload__container--small': stateDisplayed === 'small'}\">\r\n\r\n <div class=\"img-upload__container__wrapper\">\r\n\r\n <div class=\"img-upload__container__loader\" *ngIf=\"isLoading\">\r\n <wz-loader [small]=\"true\" [position]=\"'relative'\"></wz-loader>\r\n </div>\r\n\r\n <ng-container *ngIf=\"!isLoading\">\r\n <div class=\"blueColor img-upload__container__dropImgIconDiv\">\r\n <img *ngIf=\"assetsIcon\" [src]=\"assetsIcon\" alt=\"icon picture\" />\r\n <p>{{ 'ImgManager.ImgUpload.dropImg' | translate }}</p>\r\n </div>\r\n\r\n <p class=\"img-upload__container__or\">{{ 'ImgManager.ImgUpload.or' | translate }}</p>\r\n\r\n <div class=\"img-upload__container__text\">\r\n <i class=\"fal fa-file-upload\"></i>{{ 'ImgManager.ImgUpload.selectImg' | translate }}\r\n </div>\r\n </ng-container>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LoaderComponent, selector: "wz-loader", inputs: ["text", "small", "position"] }, { kind: "directive", type: DragDropDirective, selector: "[appDragDrop]", outputs: ["onFileDropped"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], animations: [
|
|
1148
|
+
easeInOut
|
|
1149
|
+
] });
|
|
1116
1150
|
}
|
|
1117
|
-
|
|
1118
|
-
ImgUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ImgUploadComponent, selector: "img-upload", inputs: { stateDisplayed: "stateDisplayed" }, outputs: { imgUploaded: "imgUploaded" }, viewQueries: [{ propertyName: "dragAndDropBox", first: true, predicate: ["dragAndDropBox"], descendants: true }], ngImport: i0, template: "<div\r\n class=\"img-upload has-text-centered\"\r\n [ngClass]=\"{'img-upload--small': stateDisplayed === 'small'}\"\r\n (click)=\"fileInput.click()\"\r\n appDragDrop\r\n (onFileDropped)=\"filesChangeByDragAndDrop($any($event))\"\r\n #dragAndDropBox\r\n [@easeInOut]=\"'in'\"\r\n>\r\n <input hidden type=\"file\" #fileInput (change)=\"filesChangeByClick($event)\" accept=\"image/*\" multiple >\r\n <div class=\"img-upload__container\" [ngClass]=\"{'img-upload__container--small': stateDisplayed === 'small'}\">\r\n\r\n <div class=\"img-upload__container__wrapper\">\r\n\r\n <div class=\"img-upload__container__loader\" *ngIf=\"isLoading\">\r\n <wz-loader [small]=\"true\" [position]=\"'relative'\"></wz-loader>\r\n </div>\r\n\r\n <ng-container *ngIf=\"!isLoading\">\r\n <div class=\"blueColor img-upload__container__dropImgIconDiv\">\r\n <img *ngIf=\"assetsIcon\" [src]=\"assetsIcon\" alt=\"icon picture\" />\r\n <p>{{ 'ImgManager.ImgUpload.dropImg' | translate }}</p>\r\n </div>\r\n\r\n <p class=\"img-upload__container__or\">{{ 'ImgManager.ImgUpload.or' | translate }}</p>\r\n\r\n <div class=\"img-upload__container__text\">\r\n <i class=\"fal fa-file-upload\"></i>{{ 'ImgManager.ImgUpload.selectImg' | translate }}\r\n </div>\r\n </ng-container>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LoaderComponent, selector: "wz-loader", inputs: ["text", "small", "position"] }, { kind: "directive", type: DragDropDirective, selector: "[appDragDrop]", outputs: ["onFileDropped"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], animations: [
|
|
1119
|
-
easeInOut
|
|
1120
|
-
] });
|
|
1121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImgUploadComponent, decorators: [{
|
|
1151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgUploadComponent, decorators: [{
|
|
1122
1152
|
type: Component,
|
|
1123
1153
|
args: [{ selector: 'img-upload', animations: [
|
|
1124
1154
|
easeInOut
|
|
1125
1155
|
], template: "<div\r\n class=\"img-upload has-text-centered\"\r\n [ngClass]=\"{'img-upload--small': stateDisplayed === 'small'}\"\r\n (click)=\"fileInput.click()\"\r\n appDragDrop\r\n (onFileDropped)=\"filesChangeByDragAndDrop($any($event))\"\r\n #dragAndDropBox\r\n [@easeInOut]=\"'in'\"\r\n>\r\n <input hidden type=\"file\" #fileInput (change)=\"filesChangeByClick($event)\" accept=\"image/*\" multiple >\r\n <div class=\"img-upload__container\" [ngClass]=\"{'img-upload__container--small': stateDisplayed === 'small'}\">\r\n\r\n <div class=\"img-upload__container__wrapper\">\r\n\r\n <div class=\"img-upload__container__loader\" *ngIf=\"isLoading\">\r\n <wz-loader [small]=\"true\" [position]=\"'relative'\"></wz-loader>\r\n </div>\r\n\r\n <ng-container *ngIf=\"!isLoading\">\r\n <div class=\"blueColor img-upload__container__dropImgIconDiv\">\r\n <img *ngIf=\"assetsIcon\" [src]=\"assetsIcon\" alt=\"icon picture\" />\r\n <p>{{ 'ImgManager.ImgUpload.dropImg' | translate }}</p>\r\n </div>\r\n\r\n <p class=\"img-upload__container__or\">{{ 'ImgManager.ImgUpload.or' | translate }}</p>\r\n\r\n <div class=\"img-upload__container__text\">\r\n <i class=\"fal fa-file-upload\"></i>{{ 'ImgManager.ImgUpload.selectImg' | translate }}\r\n </div>\r\n </ng-container>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n" }]
|
|
1126
|
-
}], ctorParameters:
|
|
1156
|
+
}], ctorParameters: () => [{ type: AlertService }, { type: ApiService }, { type: i3.TranslateService }, { type: UploadService }], propDecorators: { stateDisplayed: [{
|
|
1127
1157
|
type: Input
|
|
1128
1158
|
}], imgUploaded: [{
|
|
1129
1159
|
type: Output
|
|
@@ -1133,6 +1163,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1133
1163
|
}] } });
|
|
1134
1164
|
|
|
1135
1165
|
class PexelsService {
|
|
1166
|
+
http;
|
|
1167
|
+
apiService;
|
|
1168
|
+
translateService;
|
|
1136
1169
|
get apiBaseUrl() {
|
|
1137
1170
|
return this.apiService.CONFIG.pexels_route;
|
|
1138
1171
|
}
|
|
@@ -1140,11 +1173,12 @@ class PexelsService {
|
|
|
1140
1173
|
get apiKey() {
|
|
1141
1174
|
return this.apiService.CONFIG.pexels_token;
|
|
1142
1175
|
}
|
|
1176
|
+
lang;
|
|
1177
|
+
languages = { 'fr': 'fr-FR', 'en': 'en-US', 'it': 'it-IT', 'es': 'es-ES' };
|
|
1143
1178
|
constructor(http, apiService, translateService) {
|
|
1144
1179
|
this.http = http;
|
|
1145
1180
|
this.apiService = apiService;
|
|
1146
1181
|
this.translateService = translateService;
|
|
1147
|
-
this.languages = { 'fr': 'fr-FR', 'en': 'en-US', 'it': 'it-IT', 'es': 'es-ES' };
|
|
1148
1182
|
this.setLang(this.translateService.currentLang);
|
|
1149
1183
|
this.translateService.onLangChange.subscribe(langData => {
|
|
1150
1184
|
this.setLang(langData.lang);
|
|
@@ -1178,12 +1212,12 @@ class PexelsService {
|
|
|
1178
1212
|
return data;
|
|
1179
1213
|
}));
|
|
1180
1214
|
}
|
|
1215
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: PexelsService, deps: [{ token: i3$1.HttpClient }, { token: ApiService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1216
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: PexelsService });
|
|
1181
1217
|
}
|
|
1182
|
-
|
|
1183
|
-
PexelsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PexelsService });
|
|
1184
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PexelsService, decorators: [{
|
|
1218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: PexelsService, decorators: [{
|
|
1185
1219
|
type: Injectable
|
|
1186
|
-
}], ctorParameters:
|
|
1220
|
+
}], ctorParameters: () => [{ type: i3$1.HttpClient }, { type: ApiService }, { type: i3.TranslateService }] });
|
|
1187
1221
|
|
|
1188
1222
|
const listAnnimation = // the fade-in/fade-out animation.
|
|
1189
1223
|
trigger('listAnimation', [
|
|
@@ -1199,6 +1233,10 @@ const listAnnimation = // the fade-in/fade-out animation.
|
|
|
1199
1233
|
]);
|
|
1200
1234
|
|
|
1201
1235
|
class AbstractDebounceDirective {
|
|
1236
|
+
debounceTime;
|
|
1237
|
+
onEventChange;
|
|
1238
|
+
emitEvent$;
|
|
1239
|
+
subscription$;
|
|
1202
1240
|
constructor() {
|
|
1203
1241
|
this.debounceTime = 500;
|
|
1204
1242
|
this.onEventChange = new EventEmitter();
|
|
@@ -1217,15 +1255,15 @@ class AbstractDebounceDirective {
|
|
|
1217
1255
|
this.subscription$.next();
|
|
1218
1256
|
this.subscription$.complete();
|
|
1219
1257
|
}
|
|
1258
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AbstractDebounceDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1259
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: AbstractDebounceDirective, selector: "AbstractDebounceDirective", inputs: { debounceTime: "debounceTime" }, outputs: { onEventChange: "onEventChange" }, ngImport: i0 });
|
|
1220
1260
|
}
|
|
1221
|
-
|
|
1222
|
-
AbstractDebounceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AbstractDebounceDirective, selector: "AbstractDebounceDirective", inputs: { debounceTime: "debounceTime" }, outputs: { onEventChange: "onEventChange" }, ngImport: i0 });
|
|
1223
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AbstractDebounceDirective, decorators: [{
|
|
1261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AbstractDebounceDirective, decorators: [{
|
|
1224
1262
|
type: Directive,
|
|
1225
1263
|
args: [{
|
|
1226
1264
|
selector: 'AbstractDebounceDirective'
|
|
1227
1265
|
}]
|
|
1228
|
-
}], ctorParameters:
|
|
1266
|
+
}], ctorParameters: () => [], propDecorators: { debounceTime: [{
|
|
1229
1267
|
type: Input
|
|
1230
1268
|
}], onEventChange: [{
|
|
1231
1269
|
type: Output
|
|
@@ -1239,28 +1277,27 @@ class DebounceKeyupDirective extends AbstractDebounceDirective {
|
|
|
1239
1277
|
event.preventDefault();
|
|
1240
1278
|
this.emitEvent$.next(event);
|
|
1241
1279
|
}
|
|
1280
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DebounceKeyupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1281
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: DebounceKeyupDirective, selector: "input[debounceKeyUp]", host: { listeners: { "keyup": "onKeyUp($event)" } }, usesInheritance: true, ngImport: i0 });
|
|
1242
1282
|
}
|
|
1243
|
-
|
|
1244
|
-
DebounceKeyupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DebounceKeyupDirective, selector: "input[debounceKeyUp]", host: { listeners: { "keyup": "onKeyUp($event)" } }, usesInheritance: true, ngImport: i0 });
|
|
1245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DebounceKeyupDirective, decorators: [{
|
|
1283
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DebounceKeyupDirective, decorators: [{
|
|
1246
1284
|
type: Directive,
|
|
1247
1285
|
args: [{
|
|
1248
1286
|
selector: 'input[debounceKeyUp]'
|
|
1249
1287
|
}]
|
|
1250
|
-
}], ctorParameters:
|
|
1288
|
+
}], ctorParameters: () => [], propDecorators: { onKeyUp: [{
|
|
1251
1289
|
type: HostListener,
|
|
1252
1290
|
args: ['keyup', ['$event']]
|
|
1253
1291
|
}] } });
|
|
1254
1292
|
|
|
1255
1293
|
class InputSearchComponent {
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
}
|
|
1294
|
+
placeholder = '';
|
|
1295
|
+
smallPadding = false;
|
|
1296
|
+
id;
|
|
1297
|
+
innerValue = '';
|
|
1298
|
+
changeDebounced = new EventEmitter(); // debounced
|
|
1299
|
+
onTouchedCallback = () => { };
|
|
1300
|
+
onChangeCallback = () => { };
|
|
1264
1301
|
get value() {
|
|
1265
1302
|
return this.innerValue;
|
|
1266
1303
|
}
|
|
@@ -1284,10 +1321,10 @@ class InputSearchComponent {
|
|
|
1284
1321
|
handleDebouncedKeyUp(event) {
|
|
1285
1322
|
this.changeDebounced.emit(event.target.value);
|
|
1286
1323
|
}
|
|
1324
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: InputSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1325
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: InputSearchComponent, selector: "wz-input-search", inputs: { placeholder: "placeholder", smallPadding: "smallPadding", id: "id" }, outputs: { changeDebounced: "changeDebounced" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: InputSearchComponent, multi: true }], ngImport: i0, template: "<div class=\"input-search field\" [ngClass]=\"smallPadding ? 'small-padding' : ''\">\n <p class=\"control has-icons-left has-icons-right\">\n <input\n [placeholder]=\"placeholder\"\n value=\"\"\n class=\"input\"\n type=\"text\"\n [attr.id]=\"id\"\n [(ngModel)]=\"value\"\n debounceKeyUp\n [debounceTime]=\"1000\"\n (onEventChange)=\"handleDebouncedKeyUp($event)\"\n />\n <i class=\"icon fal fa-search\"></i>\n </p>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: DebounceKeyupDirective, selector: "input[debounceKeyUp]" }] });
|
|
1287
1326
|
}
|
|
1288
|
-
|
|
1289
|
-
InputSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: InputSearchComponent, selector: "wz-input-search", inputs: { placeholder: "placeholder", smallPadding: "smallPadding", id: "id" }, outputs: { changeDebounced: "changeDebounced" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: InputSearchComponent, multi: true }], ngImport: i0, template: "<div class=\"input-search field\" [ngClass]=\"smallPadding ? 'small-padding' : ''\">\n <p class=\"control has-icons-left has-icons-right\">\n <input\n [placeholder]=\"placeholder\"\n value=\"\"\n class=\"input\"\n type=\"text\"\n [attr.id]=\"id\"\n [(ngModel)]=\"value\"\n debounceKeyUp\n [debounceTime]=\"1000\"\n (onEventChange)=\"handleDebouncedKeyUp($event)\"\n />\n <i class=\"icon fal fa-search\"></i>\n </p>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: DebounceKeyupDirective, selector: "input[debounceKeyUp]" }] });
|
|
1290
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InputSearchComponent, decorators: [{
|
|
1327
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: InputSearchComponent, decorators: [{
|
|
1291
1328
|
type: Component,
|
|
1292
1329
|
args: [{ selector: 'wz-input-search', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: InputSearchComponent, multi: true }], template: "<div class=\"input-search field\" [ngClass]=\"smallPadding ? 'small-padding' : ''\">\n <p class=\"control has-icons-left has-icons-right\">\n <input\n [placeholder]=\"placeholder\"\n value=\"\"\n class=\"input\"\n type=\"text\"\n [attr.id]=\"id\"\n [(ngModel)]=\"value\"\n debounceKeyUp\n [debounceTime]=\"1000\"\n (onEventChange)=\"handleDebouncedKeyUp($event)\"\n />\n <i class=\"icon fal fa-search\"></i>\n </p>\n</div>\n" }]
|
|
1293
1330
|
}], propDecorators: { placeholder: [{
|
|
@@ -1301,20 +1338,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1301
1338
|
}] } });
|
|
1302
1339
|
|
|
1303
1340
|
class AlertComponent {
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
}
|
|
1341
|
+
icon = true;
|
|
1342
|
+
warning = false;
|
|
1343
|
+
success = false;
|
|
1344
|
+
iconClass = 'fa-solid fa-info';
|
|
1345
|
+
constructor() { }
|
|
1310
1346
|
ngOnInit() { }
|
|
1347
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1348
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: AlertComponent, selector: "wz-alert", inputs: { icon: "icon", warning: "warning", success: "success", iconClass: "iconClass" }, ngImport: i0, template: "<div class=\"wz-alert\" [ngClass]=\"{ success: success, warning: warning }\">\n <i *ngIf=\"icon\" [ngClass]=\"iconClass\"></i>\n <p><ng-content></ng-content></p>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1311
1349
|
}
|
|
1312
|
-
|
|
1313
|
-
AlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AlertComponent, selector: "wz-alert", inputs: { icon: "icon", warning: "warning", success: "success", iconClass: "iconClass" }, ngImport: i0, template: "<div class=\"wz-alert\" [ngClass]=\"{ success: success, warning: warning }\">\n <i *ngIf=\"icon\" [ngClass]=\"iconClass\"></i>\n <p><ng-content></ng-content></p>\n</div>\n", styles: [".wz-alert{width:100%;background-color:#52aecd26;color:#52aecd;border-radius:3px;display:flex;flex-wrap:nowrap;justify-content:space-between;padding:20px}.wz-alert.success{background-color:#2ecc7126}.wz-alert.success p{color:#11552e}.wz-alert.success p>*{color:#11552e}.wz-alert.success i{color:#2ecc71}.wz-alert.warning{background-color:#e9565626}.wz-alert.warning p{color:#3a0505}.wz-alert.warning p>*{color:#3a0505}.wz-alert.warning i{color:#e95656}.wz-alert p{width:100%;font-size:rem(14);line-height:rem(25);margin:0;padding:0;color:#1e5568}.wz-alert p>*{color:#1e5568}.wz-alert i{width:auto;margin:0 10px 0 0;color:inherit;font-size:rem(14);line-height:rem(25)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1314
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AlertComponent, decorators: [{
|
|
1350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AlertComponent, decorators: [{
|
|
1315
1351
|
type: Component,
|
|
1316
|
-
args: [{ selector: 'wz-alert', template: "<div class=\"wz-alert\" [ngClass]=\"{ success: success, warning: warning }\">\n <i *ngIf=\"icon\" [ngClass]=\"iconClass\"></i>\n <p><ng-content></ng-content></p>\n</div>\n"
|
|
1317
|
-
}], ctorParameters:
|
|
1352
|
+
args: [{ selector: 'wz-alert', template: "<div class=\"wz-alert\" [ngClass]=\"{ success: success, warning: warning }\">\n <i *ngIf=\"icon\" [ngClass]=\"iconClass\"></i>\n <p><ng-content></ng-content></p>\n</div>\n" }]
|
|
1353
|
+
}], ctorParameters: () => [], propDecorators: { icon: [{
|
|
1318
1354
|
type: Input
|
|
1319
1355
|
}], warning: [{
|
|
1320
1356
|
type: Input
|
|
@@ -1325,6 +1361,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1325
1361
|
}] } });
|
|
1326
1362
|
|
|
1327
1363
|
class PexelLibComponent {
|
|
1364
|
+
wzImgLibService;
|
|
1365
|
+
alertService;
|
|
1366
|
+
translateService;
|
|
1367
|
+
uploadService;
|
|
1368
|
+
changeDetectorRef;
|
|
1369
|
+
stateDisplayed;
|
|
1370
|
+
searchValue = '';
|
|
1371
|
+
/** Pass to true to hide search input */
|
|
1372
|
+
disableSearch = false;
|
|
1373
|
+
perPage = 30;
|
|
1374
|
+
searchUpdated = new Subject();
|
|
1375
|
+
oldSearchValue;
|
|
1376
|
+
nbResult = 0;
|
|
1377
|
+
wzImgLibDto;
|
|
1378
|
+
currentPage = 1;
|
|
1379
|
+
isLoading = true;
|
|
1380
|
+
initComponent = true;
|
|
1381
|
+
photosColumns = [];
|
|
1382
|
+
nbColumns = 6;
|
|
1383
|
+
responsiveColumns = [1250, 1050, 750, 500];
|
|
1384
|
+
outerElement = null;
|
|
1385
|
+
uploadingImg = 'ImgManager.PexelLib.uploadingImg';
|
|
1386
|
+
untitled = 'ImgManager.PexelLib.untitled';
|
|
1387
|
+
successUploadPhoto = 'ImgManager.PexelLib.successImport';
|
|
1388
|
+
errorUploadPhoto = 'ImgManager.PexelLib.errorUploadPhoto';
|
|
1389
|
+
errorRetrievePhotos = 'ImgManager.PexelLib.errorRetrievePhotos';
|
|
1390
|
+
subs = [];
|
|
1328
1391
|
set content(control) {
|
|
1329
1392
|
this.outerElement = control;
|
|
1330
1393
|
}
|
|
@@ -1334,25 +1397,6 @@ class PexelLibComponent {
|
|
|
1334
1397
|
this.translateService = translateService;
|
|
1335
1398
|
this.uploadService = uploadService;
|
|
1336
1399
|
this.changeDetectorRef = changeDetectorRef;
|
|
1337
|
-
this.searchValue = '';
|
|
1338
|
-
/** Pass to true to hide search input */
|
|
1339
|
-
this.disableSearch = false;
|
|
1340
|
-
this.perPage = 30;
|
|
1341
|
-
this.searchUpdated = new Subject();
|
|
1342
|
-
this.nbResult = 0;
|
|
1343
|
-
this.currentPage = 1;
|
|
1344
|
-
this.isLoading = true;
|
|
1345
|
-
this.initComponent = true;
|
|
1346
|
-
this.photosColumns = [];
|
|
1347
|
-
this.nbColumns = 6;
|
|
1348
|
-
this.responsiveColumns = [1250, 1050, 750, 500];
|
|
1349
|
-
this.outerElement = null;
|
|
1350
|
-
this.uploadingImg = 'ImgManager.PexelLib.uploadingImg';
|
|
1351
|
-
this.untitled = 'ImgManager.PexelLib.untitled';
|
|
1352
|
-
this.successUploadPhoto = 'ImgManager.PexelLib.successImport';
|
|
1353
|
-
this.errorUploadPhoto = 'ImgManager.PexelLib.errorUploadPhoto';
|
|
1354
|
-
this.errorRetrievePhotos = 'ImgManager.PexelLib.errorRetrievePhotos';
|
|
1355
|
-
this.subs = [];
|
|
1356
1400
|
}
|
|
1357
1401
|
ngAfterViewInit() {
|
|
1358
1402
|
this.oldSearchValue = this.searchValue;
|
|
@@ -1483,19 +1527,19 @@ class PexelLibComponent {
|
|
|
1483
1527
|
ngOnDestroy() {
|
|
1484
1528
|
this.subs.forEach(sub => sub.unsubscribe());
|
|
1485
1529
|
}
|
|
1530
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: PexelLibComponent, deps: [{ token: PexelsService }, { token: AlertService }, { token: i3.TranslateService }, { token: UploadService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1531
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: PexelLibComponent, selector: "pexels-lib", inputs: { stateDisplayed: "stateDisplayed", searchValue: "searchValue", disableSearch: "disableSearch" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["outerElement"], descendants: true }], ngImport: i0, template: "<div class=\"pexels-lib\" #outerElement [@easeInOut]=\"'in'\">\r\n\r\n <ng-scrollbar\r\n [reachedOffset]=\"300\"\r\n class=\"pexels-lib__scroll\"\r\n [ngClass]=\"{\r\n 'pexels-lib__scroll--smallDisplay': stateDisplayed === 'small',\r\n 'pexels-lib__scroll--noResult': !nbResult,\r\n 'pexels-lib__scroll--hide': (!nbResult && disableSearch)\r\n }\"\r\n (reachedBottom)=\"onBottomReached()\"\r\n >\r\n <div\r\n *ngIf=\"!disableSearch\"\r\n class=\"pexels-lib__search\"\r\n [ngClass]=\"{'pexels-lib__search--smallDisplay': stateDisplayed === 'small'}\"\r\n >\r\n <wz-input-search\r\n [(ngModel)]=\"searchValue\"\r\n [placeholder]=\"'ImgManager.SearchBar.placeholder' | translate\"\r\n (changeDebounced)=\"onSearchNameChanged()\"\r\n [smallPadding]=\"stateDisplayed === 'small'\">\r\n </wz-input-search>\r\n </div>\r\n\r\n <div *ngIf=\"!initComponent\" class=\"pexels-lib__wrapper\">\r\n <p *ngIf=\"nbResult\" class=\"pexels-lib__wrapper__result-nb\">{{ 'ImgManager.PexelLib.nbImgFound' | translate }} : {{ nbResult }}</p>\r\n\r\n <div class=\"pexels-lib__wrapper__result\">\r\n\r\n <div *ngFor=\"let photosColumn of photosColumns; let indexCol = index;\" class=\"pexels-lib__wrapper__result__column\" [@listAnimation]=\"photosColumn.photos.length\">\r\n <div *ngFor=\"let photo of photosColumn.photos; let indexPhoto = index;\" class=\"pexels-lib__wrapper__result__column__element\">\r\n\r\n <img [alt]=\"photo.src.medium\" [src]=\"photo.src.medium\"\r\n class=\"pexels-lib__wrapper__result__column__element__img\"/>\r\n\r\n <div class=\"pexels-lib__wrapper__result__column__element__wrapper\">\r\n <span class=\"pexels-lib__wrapper__result__column__element__wrapper__infos\">\r\n {{ photo.width }} x {{ photo.height}}\r\n </span>\r\n\r\n <div class=\"dropdown is-up\" [ngClass]=\"{'is-hoverable': !photo.uploading}\">\r\n <div class=\"dropdown-trigger\">\r\n <button\r\n type=\"button\"\r\n class=\"button pexels-lib__wrapper__result__column__element__wrapper__button\"\r\n aria-haspopup=\"true\"\r\n aria-controls=\"dropdown-menu\">\r\n\r\n <div *ngIf=\"!photo.uploading\" (click)=\"uploadPhoto(photo, photo.src.large2x)\">\r\n <span>{{ 'ImgManager.PexelLib.import' | translate }}</span>\r\n <span class=\"icon is-small\">\r\n <i class=\"fa-solid fa-angle-up\" aria-hidden=\"true\"></i>\r\n </span>\r\n <ng-container *ngIf=\"photo.uploaded\">\r\n <i class=\"fal fa-check\"></i>\r\n </ng-container>\r\n </div>\r\n\r\n <ng-container *ngIf=\"photo.uploading\">\r\n {{ 'ImgManager.PexelLib.importation' | translate }}\r\n <span btnLoadingAnim class=\"btnLoadingAnnimation\"></span>\r\n </ng-container>\r\n\r\n </button>\r\n </div>\r\n <div class=\"dropdown-menu pexels-lib__wrapper__result__column__element__wrapper__dropdown\" id=\"dropdown-menu\" role=\"menu\">\r\n <div class=\"dropdown-content\">\r\n <div class=\"dropdown-content__wrapper\">\r\n <div class=\"dropdown-item\" (click)=\"uploadPhoto(photo, photo.src.portrait)\">\r\n <p>{{ 'ImgManager.PexelLib.portrait' | translate }}</p>\r\n <i class=\"fal fa-check iPortrait\"></i>\r\n </div>\r\n <div class=\"dropdown-item\" (click)=\"uploadPhoto(photo, photo.src.landscape)\">\r\n <p>{{ 'ImgManager.PexelLib.landscape' | translate }}</p>\r\n <i class=\"fal fa-check iLandscape\"></i>\r\n </div>\r\n <div class=\"dropdown-item\" (click)=\"uploadPhoto(photo, photo.src.large2x)\">\r\n <p>{{ 'ImgManager.PexelLib.original' | translate }}</p>\r\n <i class=\"fal fa-check iOriginal\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </ng-scrollbar>\r\n\r\n <ng-container *ngIf=\"isLoading\">\r\n <wz-loader></wz-loader>\r\n </ng-container>\r\n <div\r\n *ngIf=\"!isLoading && !nbResult\"\r\n class=\"pexels-lib__alert\"\r\n [@easeInOut]=\"'in'\">\r\n <wz-alert [warning]=\"true\">\r\n {{ 'ImgManager.PexelLib.noResult' | translate }}\r\n </wz-alert>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.NgScrollbar, selector: "ng-scrollbar", inputs: ["disabled", "sensorDisabled", "pointerEventsDisabled", "viewportPropagateMouseMove", "autoHeightDisabled", "autoWidthDisabled", "viewClass", "trackClass", "thumbClass", "minThumbSize", "trackClickScrollDuration", "pointerEventsMethod", "track", "visibility", "appearance", "position", "sensorDebounce", "scrollAuditTime"], outputs: ["updated"], exportAs: ["ngScrollbar"] }, { kind: "directive", type: i8.NgScrollbarReachedBottom, selector: "[reachedBottom], [reached-bottom]", outputs: ["reachedBottom"] }, { kind: "component", type: LoaderComponent, selector: "wz-loader", inputs: ["text", "small", "position"] }, { kind: "component", type: InputSearchComponent, selector: "wz-input-search", inputs: ["placeholder", "smallPadding", "id"], outputs: ["changeDebounced"] }, { kind: "component", type: AlertComponent, selector: "wz-alert", inputs: ["icon", "warning", "success", "iconClass"] }, { kind: "directive", type: LoadingDirective, selector: "[btnLoadingAnim]" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], animations: [
|
|
1532
|
+
easeInOut,
|
|
1533
|
+
listAnnimation
|
|
1534
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1486
1535
|
}
|
|
1487
|
-
|
|
1488
|
-
PexelLibComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PexelLibComponent, selector: "pexels-lib", inputs: { stateDisplayed: "stateDisplayed", searchValue: "searchValue", disableSearch: "disableSearch" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["outerElement"], descendants: true }], ngImport: i0, template: "<div class=\"pexels-lib\" #outerElement [@easeInOut]=\"'in'\">\r\n\r\n <ng-scrollbar\r\n [reachedOffset]=\"300\"\r\n class=\"pexels-lib__scroll\"\r\n [ngClass]=\"{\r\n 'pexels-lib__scroll--smallDisplay': stateDisplayed === 'small',\r\n 'pexels-lib__scroll--noResult': !nbResult,\r\n 'pexels-lib__scroll--hide': (!nbResult && disableSearch)\r\n }\"\r\n (reachedBottom)=\"onBottomReached()\"\r\n >\r\n <div\r\n *ngIf=\"!disableSearch\"\r\n class=\"pexels-lib__search\"\r\n [ngClass]=\"{'pexels-lib__search--smallDisplay': stateDisplayed === 'small'}\"\r\n >\r\n <wz-input-search\r\n [(ngModel)]=\"searchValue\"\r\n [placeholder]=\"'ImgManager.SearchBar.placeholder' | translate\"\r\n (changeDebounced)=\"onSearchNameChanged()\"\r\n [smallPadding]=\"stateDisplayed === 'small'\">\r\n </wz-input-search>\r\n </div>\r\n\r\n <div *ngIf=\"!initComponent\" class=\"pexels-lib__wrapper\">\r\n <p *ngIf=\"nbResult\" class=\"pexels-lib__wrapper__result-nb\">{{ 'ImgManager.PexelLib.nbImgFound' | translate }} : {{ nbResult }}</p>\r\n\r\n <div class=\"pexels-lib__wrapper__result\">\r\n\r\n <div *ngFor=\"let photosColumn of photosColumns; let indexCol = index;\" class=\"pexels-lib__wrapper__result__column\" [@listAnimation]=\"photosColumn.photos.length\">\r\n <div *ngFor=\"let photo of photosColumn.photos; let indexPhoto = index;\" class=\"pexels-lib__wrapper__result__column__element\">\r\n\r\n <img [alt]=\"photo.src.medium\" [src]=\"photo.src.medium\"\r\n class=\"pexels-lib__wrapper__result__column__element__img\"/>\r\n\r\n <div class=\"pexels-lib__wrapper__result__column__element__wrapper\">\r\n <span class=\"pexels-lib__wrapper__result__column__element__wrapper__infos\">\r\n {{ photo.width }} x {{ photo.height}}\r\n </span>\r\n\r\n <div class=\"dropdown is-up\" [ngClass]=\"{'is-hoverable': !photo.uploading}\">\r\n <div class=\"dropdown-trigger\">\r\n <button\r\n type=\"button\"\r\n class=\"button pexels-lib__wrapper__result__column__element__wrapper__button\"\r\n aria-haspopup=\"true\"\r\n aria-controls=\"dropdown-menu\">\r\n\r\n <div *ngIf=\"!photo.uploading\" (click)=\"uploadPhoto(photo, photo.src.large2x)\">\r\n <span>{{ 'ImgManager.PexelLib.import' | translate }}</span>\r\n <span class=\"icon is-small\">\r\n <i class=\"fa-solid fa-angle-up\" aria-hidden=\"true\"></i>\r\n </span>\r\n <ng-container *ngIf=\"photo.uploaded\">\r\n <i class=\"fal fa-check\"></i>\r\n </ng-container>\r\n </div>\r\n\r\n <ng-container *ngIf=\"photo.uploading\">\r\n {{ 'ImgManager.PexelLib.importation' | translate }}\r\n <span btnLoadingAnim class=\"btnLoadingAnnimation\"></span>\r\n </ng-container>\r\n\r\n </button>\r\n </div>\r\n <div class=\"dropdown-menu pexels-lib__wrapper__result__column__element__wrapper__dropdown\" id=\"dropdown-menu\" role=\"menu\">\r\n <div class=\"dropdown-content\">\r\n <div class=\"dropdown-content__wrapper\">\r\n <div class=\"dropdown-item\" (click)=\"uploadPhoto(photo, photo.src.portrait)\">\r\n <p>{{ 'ImgManager.PexelLib.portrait' | translate }}</p>\r\n <i class=\"fal fa-check iPortrait\"></i>\r\n </div>\r\n <div class=\"dropdown-item\" (click)=\"uploadPhoto(photo, photo.src.landscape)\">\r\n <p>{{ 'ImgManager.PexelLib.landscape' | translate }}</p>\r\n <i class=\"fal fa-check iLandscape\"></i>\r\n </div>\r\n <div class=\"dropdown-item\" (click)=\"uploadPhoto(photo, photo.src.large2x)\">\r\n <p>{{ 'ImgManager.PexelLib.original' | translate }}</p>\r\n <i class=\"fal fa-check iOriginal\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </ng-scrollbar>\r\n\r\n <ng-container *ngIf=\"isLoading\">\r\n <wz-loader></wz-loader>\r\n </ng-container>\r\n <div\r\n *ngIf=\"!isLoading && !nbResult\"\r\n class=\"pexels-lib__alert\"\r\n [@easeInOut]=\"'in'\">\r\n <wz-alert [warning]=\"true\">\r\n {{ 'ImgManager.PexelLib.noResult' | translate }}\r\n </wz-alert>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.NgScrollbar, selector: "ng-scrollbar", inputs: ["disabled", "sensorDisabled", "pointerEventsDisabled", "viewportPropagateMouseMove", "autoHeightDisabled", "autoWidthDisabled", "viewClass", "trackClass", "thumbClass", "minThumbSize", "trackClickScrollDuration", "pointerEventsMethod", "track", "visibility", "appearance", "position", "sensorDebounce", "scrollAuditTime"], outputs: ["updated"], exportAs: ["ngScrollbar"] }, { kind: "directive", type: i8.NgScrollbarReachedBottom, selector: "[reachedBottom], [reached-bottom]", outputs: ["reachedBottom"] }, { kind: "component", type: LoaderComponent, selector: "wz-loader", inputs: ["text", "small", "position"] }, { kind: "component", type: InputSearchComponent, selector: "wz-input-search", inputs: ["placeholder", "smallPadding", "id"], outputs: ["changeDebounced"] }, { kind: "component", type: AlertComponent, selector: "wz-alert", inputs: ["icon", "warning", "success", "iconClass"] }, { kind: "directive", type: LoadingDirective, selector: "[btnLoadingAnim]" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], animations: [
|
|
1489
|
-
easeInOut,
|
|
1490
|
-
listAnnimation
|
|
1491
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1492
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PexelLibComponent, decorators: [{
|
|
1536
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: PexelLibComponent, decorators: [{
|
|
1493
1537
|
type: Component,
|
|
1494
1538
|
args: [{ selector: 'pexels-lib', animations: [
|
|
1495
1539
|
easeInOut,
|
|
1496
1540
|
listAnnimation
|
|
1497
1541
|
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"pexels-lib\" #outerElement [@easeInOut]=\"'in'\">\r\n\r\n <ng-scrollbar\r\n [reachedOffset]=\"300\"\r\n class=\"pexels-lib__scroll\"\r\n [ngClass]=\"{\r\n 'pexels-lib__scroll--smallDisplay': stateDisplayed === 'small',\r\n 'pexels-lib__scroll--noResult': !nbResult,\r\n 'pexels-lib__scroll--hide': (!nbResult && disableSearch)\r\n }\"\r\n (reachedBottom)=\"onBottomReached()\"\r\n >\r\n <div\r\n *ngIf=\"!disableSearch\"\r\n class=\"pexels-lib__search\"\r\n [ngClass]=\"{'pexels-lib__search--smallDisplay': stateDisplayed === 'small'}\"\r\n >\r\n <wz-input-search\r\n [(ngModel)]=\"searchValue\"\r\n [placeholder]=\"'ImgManager.SearchBar.placeholder' | translate\"\r\n (changeDebounced)=\"onSearchNameChanged()\"\r\n [smallPadding]=\"stateDisplayed === 'small'\">\r\n </wz-input-search>\r\n </div>\r\n\r\n <div *ngIf=\"!initComponent\" class=\"pexels-lib__wrapper\">\r\n <p *ngIf=\"nbResult\" class=\"pexels-lib__wrapper__result-nb\">{{ 'ImgManager.PexelLib.nbImgFound' | translate }} : {{ nbResult }}</p>\r\n\r\n <div class=\"pexels-lib__wrapper__result\">\r\n\r\n <div *ngFor=\"let photosColumn of photosColumns; let indexCol = index;\" class=\"pexels-lib__wrapper__result__column\" [@listAnimation]=\"photosColumn.photos.length\">\r\n <div *ngFor=\"let photo of photosColumn.photos; let indexPhoto = index;\" class=\"pexels-lib__wrapper__result__column__element\">\r\n\r\n <img [alt]=\"photo.src.medium\" [src]=\"photo.src.medium\"\r\n class=\"pexels-lib__wrapper__result__column__element__img\"/>\r\n\r\n <div class=\"pexels-lib__wrapper__result__column__element__wrapper\">\r\n <span class=\"pexels-lib__wrapper__result__column__element__wrapper__infos\">\r\n {{ photo.width }} x {{ photo.height}}\r\n </span>\r\n\r\n <div class=\"dropdown is-up\" [ngClass]=\"{'is-hoverable': !photo.uploading}\">\r\n <div class=\"dropdown-trigger\">\r\n <button\r\n type=\"button\"\r\n class=\"button pexels-lib__wrapper__result__column__element__wrapper__button\"\r\n aria-haspopup=\"true\"\r\n aria-controls=\"dropdown-menu\">\r\n\r\n <div *ngIf=\"!photo.uploading\" (click)=\"uploadPhoto(photo, photo.src.large2x)\">\r\n <span>{{ 'ImgManager.PexelLib.import' | translate }}</span>\r\n <span class=\"icon is-small\">\r\n <i class=\"fa-solid fa-angle-up\" aria-hidden=\"true\"></i>\r\n </span>\r\n <ng-container *ngIf=\"photo.uploaded\">\r\n <i class=\"fal fa-check\"></i>\r\n </ng-container>\r\n </div>\r\n\r\n <ng-container *ngIf=\"photo.uploading\">\r\n {{ 'ImgManager.PexelLib.importation' | translate }}\r\n <span btnLoadingAnim class=\"btnLoadingAnnimation\"></span>\r\n </ng-container>\r\n\r\n </button>\r\n </div>\r\n <div class=\"dropdown-menu pexels-lib__wrapper__result__column__element__wrapper__dropdown\" id=\"dropdown-menu\" role=\"menu\">\r\n <div class=\"dropdown-content\">\r\n <div class=\"dropdown-content__wrapper\">\r\n <div class=\"dropdown-item\" (click)=\"uploadPhoto(photo, photo.src.portrait)\">\r\n <p>{{ 'ImgManager.PexelLib.portrait' | translate }}</p>\r\n <i class=\"fal fa-check iPortrait\"></i>\r\n </div>\r\n <div class=\"dropdown-item\" (click)=\"uploadPhoto(photo, photo.src.landscape)\">\r\n <p>{{ 'ImgManager.PexelLib.landscape' | translate }}</p>\r\n <i class=\"fal fa-check iLandscape\"></i>\r\n </div>\r\n <div class=\"dropdown-item\" (click)=\"uploadPhoto(photo, photo.src.large2x)\">\r\n <p>{{ 'ImgManager.PexelLib.original' | translate }}</p>\r\n <i class=\"fal fa-check iOriginal\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </ng-scrollbar>\r\n\r\n <ng-container *ngIf=\"isLoading\">\r\n <wz-loader></wz-loader>\r\n </ng-container>\r\n <div\r\n *ngIf=\"!isLoading && !nbResult\"\r\n class=\"pexels-lib__alert\"\r\n [@easeInOut]=\"'in'\">\r\n <wz-alert [warning]=\"true\">\r\n {{ 'ImgManager.PexelLib.noResult' | translate }}\r\n </wz-alert>\r\n </div>\r\n</div>\r\n" }]
|
|
1498
|
-
}], ctorParameters:
|
|
1542
|
+
}], ctorParameters: () => [{ type: PexelsService }, { type: AlertService }, { type: i3.TranslateService }, { type: UploadService }, { type: i0.ChangeDetectorRef }], propDecorators: { stateDisplayed: [{
|
|
1499
1543
|
type: Input
|
|
1500
1544
|
}], searchValue: [{
|
|
1501
1545
|
type: Input
|
|
@@ -1507,9 +1551,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1507
1551
|
}] } });
|
|
1508
1552
|
|
|
1509
1553
|
class CopyClipboardDirective {
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
}
|
|
1554
|
+
payload;
|
|
1555
|
+
copied = new EventEmitter();
|
|
1513
1556
|
onClick(event) {
|
|
1514
1557
|
event.preventDefault();
|
|
1515
1558
|
if (!this.payload)
|
|
@@ -1524,10 +1567,10 @@ class CopyClipboardDirective {
|
|
|
1524
1567
|
document.execCommand("copy");
|
|
1525
1568
|
document.removeEventListener("copy", listener, false);
|
|
1526
1569
|
}
|
|
1570
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: CopyClipboardDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1571
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: CopyClipboardDirective, selector: "[copy-clipboard]", inputs: { payload: ["copy-clipboard", "payload"] }, outputs: { copied: "copied" }, host: { listeners: { "click": "onClick($event)" } }, ngImport: i0 });
|
|
1527
1572
|
}
|
|
1528
|
-
|
|
1529
|
-
CopyClipboardDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CopyClipboardDirective, selector: "[copy-clipboard]", inputs: { payload: ["copy-clipboard", "payload"] }, outputs: { copied: "copied" }, host: { listeners: { "click": "onClick($event)" } }, ngImport: i0 });
|
|
1530
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CopyClipboardDirective, decorators: [{
|
|
1573
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: CopyClipboardDirective, decorators: [{
|
|
1531
1574
|
type: Directive,
|
|
1532
1575
|
args: [{ selector: '[copy-clipboard]' }]
|
|
1533
1576
|
}], propDecorators: { payload: [{
|
|
@@ -1542,17 +1585,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1542
1585
|
}] } });
|
|
1543
1586
|
|
|
1544
1587
|
class EditorInfoSectionComponent {
|
|
1588
|
+
alertService;
|
|
1589
|
+
imgToEdit;
|
|
1545
1590
|
set isNameModified(isNameModified) {
|
|
1546
1591
|
this._isNameModified = isNameModified;
|
|
1547
1592
|
}
|
|
1548
1593
|
get isNameModified() {
|
|
1549
1594
|
return this._isNameModified;
|
|
1550
1595
|
}
|
|
1596
|
+
_isNameModified = false;
|
|
1597
|
+
isNameModifiedChange = new EventEmitter();
|
|
1598
|
+
imgName;
|
|
1599
|
+
imgRoute;
|
|
1600
|
+
msgCopyToClipBoard = 'ImgManager.ImgEditor.copytoClipBoard';
|
|
1551
1601
|
constructor(alertService) {
|
|
1552
1602
|
this.alertService = alertService;
|
|
1553
|
-
this._isNameModified = false;
|
|
1554
|
-
this.isNameModifiedChange = new EventEmitter();
|
|
1555
|
-
this.msgCopyToClipBoard = 'ImgManager.ImgEditor.copytoClipBoard';
|
|
1556
1603
|
}
|
|
1557
1604
|
ngOnInit() {
|
|
1558
1605
|
this.init();
|
|
@@ -1569,13 +1616,13 @@ class EditorInfoSectionComponent {
|
|
|
1569
1616
|
onNameChange() {
|
|
1570
1617
|
this.isNameModifiedChange.emit(true);
|
|
1571
1618
|
}
|
|
1619
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: EditorInfoSectionComponent, deps: [{ token: AlertService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1620
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: EditorInfoSectionComponent, selector: "info-section", inputs: { imgToEdit: "imgToEdit", isNameModified: "isNameModified" }, outputs: { isNameModifiedChange: "isNameModifiedChange" }, ngImport: i0, template: "\r\n<!-- Img properties -->\r\n<div class=\"img-editor__infoSection__propertyEditable\">\r\n <p class=\"mainColor\">\r\n {{ 'ImgManager.UploadList.properties.imgName' | translate }}\r\n <span class=\"img-editor__infoSection__propertyEditable__tooltips\" [nwbToolTip]=\"'ImgManager.ImgEditor.NameInfo' | translate\" [nwbToolTipIsMultiline]=\"true\" nwbToolTipPosition=\"right\"><i class=\"fa-solid fa-info-circle\"></i></span>\r\n </p>\r\n <input\r\n type=\"text\"\r\n class=\"img-editor__infoSection__propertyEditable__input\"\r\n placeholder=\"{{'ImgManager.ImgEditor.nameEx' | translate}} \"\r\n [(ngModel)]=\"imgToEdit.display_name\"\r\n debounceKeyUp\r\n [debounceTime]=\"500\"\r\n (onEventChange)=\"onNameChange()\">\r\n</div>\r\n<div class=\"img-editor__infoSection__propertyEditable\">\r\n <p class=\"mainColor\">\r\n {{ 'ImgManager.UploadList.properties.imgURL' | translate }}\r\n <span class=\"img-editor__infoSection__propertyEditable__tooltips\" [nwbToolTip]=\"'ImgManager.editImg.changeName' | translate\" [nwbToolTipIsMultiline]=\"true\" nwbToolTipPosition=\"right\"><i class=\"fa-solid fa-info-circle\"></i></span>\r\n </p>\r\n <button type=\"button\" [copy-clipboard]=\"imgToEdit.file_name | imgSrc : 'raw'\" (copied)=\"copyToClipBoard($event)\" ><span class=\"img-editor__infoSection__propertyEditable__span\">{{imgToEdit.file_name}}</span> <i class=\"far fa-copy\"></i></button>\r\n</div>\r\n<div class=\"img-editor__infoSection__property\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.properties.imgSize' | translate }} :</p>\r\n <p>{{imgToEdit.raw_height}}*{{imgToEdit.raw_width}}px</p>\r\n</div>\r\n<div class=\"img-editor__infoSection__property\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.properties.imgWeight' | translate }} :</p>\r\n <p >{{getFileSize()}} ko</p>\r\n</div>\r\n\r\n<!-- SEO info -->\r\n\r\n<span class=\"img-editor__infoSection__divider\"></span>\r\n\r\n<div class=\"img-editor__infoSection__titleSEO\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.seo.title' | translate }}</p>\r\n</div>\r\n\r\n<div class=\"img-editor__infoSection__propertySEO\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.seo.rezise' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n <p class=\"img-editor__infoSection__propertySEO__tooltips\" [nwbToolTip]=\"'ImgManager.UploadList.seo.reziseTooltips' | translate\" [nwbToolTipIsMultiline]=\"true\" nwbToolTipPosition=\"right\"><i class=\"fa-solid fa-info-circle\"></i></p>\r\n</div>\r\n<div class=\"img-editor__infoSection__propertySEO\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.seo.webp' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n <p class=\"img-editor__infoSection__propertySEO__tooltips\" [nwbToolTip]=\"'ImgManager.UploadList.seo.webpTooltips' | translate\" [nwbToolTipIsMultiline]=\"true\" nwbToolTipPosition=\"right\"><i class=\"fa-solid fa-info-circle\"></i></p>\r\n</div>\r\n<div class=\"img-editor__infoSection__propertySEO\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.seo.cdn' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n <p class=\"img-editor__infoSection__propertySEO__tooltips\" [nwbToolTip]=\"'ImgManager.UploadList.seo.cdnTooltips' | translate\" [nwbToolTipIsMultiline]=\"true\" nwbToolTipPosition=\"right\"><i class=\"fa-solid fa-info-circle\"></i></p>\r\n\r\n</div>\r\n<div class=\"img-editor__infoSection__propertySEO\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.seo.lazyloading' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n <p class=\"img-editor__infoSection__propertySEO__tooltips\" [nwbToolTip]=\"'ImgManager.UploadList.seo.lazyloadingTooltips' | translate\" [nwbToolTipIsMultiline]=\"true\" nwbToolTipPosition=\"right\"><i class=\"fa-solid fa-info-circle\"></i></p>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NwbToolTipDirective, selector: "[nwbToolTip]", inputs: ["nwbToolTip", "nwbToolTipPosition", "nwbToolTipIsMultiline"] }, { kind: "directive", type: CopyClipboardDirective, selector: "[copy-clipboard]", inputs: ["copy-clipboard"], outputs: ["copied"] }, { kind: "directive", type: DebounceKeyupDirective, selector: "input[debounceKeyUp]" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: ImageSrcPipe, name: "imgSrc" }] });
|
|
1572
1621
|
}
|
|
1573
|
-
|
|
1574
|
-
EditorInfoSectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EditorInfoSectionComponent, selector: "info-section", inputs: { imgToEdit: "imgToEdit", isNameModified: "isNameModified" }, outputs: { isNameModifiedChange: "isNameModifiedChange" }, ngImport: i0, template: "\r\n<!-- Img properties -->\r\n<div class=\"img-editor__infoSection__propertyEditable\">\r\n <p class=\"mainColor\">\r\n {{ 'ImgManager.UploadList.properties.imgName' | translate }}\r\n <span class=\"img-editor__infoSection__propertyEditable__tooltips\" [nwbToolTip]=\"'ImgManager.ImgEditor.NameInfo' | translate\" [nwbToolTipIsMultiline]=\"true\" nwbToolTipPosition=\"right\"><i class=\"fa-solid fa-info-circle\"></i></span>\r\n </p>\r\n <input\r\n type=\"text\"\r\n class=\"img-editor__infoSection__propertyEditable__input\"\r\n placeholder=\"{{'ImgManager.ImgEditor.nameEx' | translate}} \"\r\n [(ngModel)]=\"imgToEdit.display_name\"\r\n debounceKeyUp\r\n [debounceTime]=\"500\"\r\n (onEventChange)=\"onNameChange()\">\r\n</div>\r\n<div class=\"img-editor__infoSection__propertyEditable\">\r\n <p class=\"mainColor\">\r\n {{ 'ImgManager.UploadList.properties.imgURL' | translate }}\r\n <span class=\"img-editor__infoSection__propertyEditable__tooltips\" [nwbToolTip]=\"'ImgManager.editImg.changeName' | translate\" [nwbToolTipIsMultiline]=\"true\" nwbToolTipPosition=\"right\"><i class=\"fa-solid fa-info-circle\"></i></span>\r\n </p>\r\n <button type=\"button\" [copy-clipboard]=\"imgToEdit.file_name | imgSrc : 'raw'\" (copied)=\"copyToClipBoard($event)\" ><span class=\"img-editor__infoSection__propertyEditable__span\">{{imgToEdit.file_name}}</span> <i class=\"far fa-copy\"></i></button>\r\n</div>\r\n<div class=\"img-editor__infoSection__property\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.properties.imgSize' | translate }} :</p>\r\n <p>{{imgToEdit.raw_height}}*{{imgToEdit.raw_width}}px</p>\r\n</div>\r\n<div class=\"img-editor__infoSection__property\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.properties.imgWeight' | translate }} :</p>\r\n <p >{{getFileSize()}} ko</p>\r\n</div>\r\n\r\n<!-- SEO info -->\r\n\r\n<span class=\"img-editor__infoSection__divider\"></span>\r\n\r\n<div class=\"img-editor__infoSection__titleSEO\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.seo.title' | translate }}</p>\r\n</div>\r\n\r\n<div class=\"img-editor__infoSection__propertySEO\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.seo.rezise' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n <p class=\"img-editor__infoSection__propertySEO__tooltips\" [nwbToolTip]=\"'ImgManager.UploadList.seo.reziseTooltips' | translate\" [nwbToolTipIsMultiline]=\"true\" nwbToolTipPosition=\"right\"><i class=\"fa-solid fa-info-circle\"></i></p>\r\n</div>\r\n<div class=\"img-editor__infoSection__propertySEO\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.seo.webp' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n <p class=\"img-editor__infoSection__propertySEO__tooltips\" [nwbToolTip]=\"'ImgManager.UploadList.seo.webpTooltips' | translate\" [nwbToolTipIsMultiline]=\"true\" nwbToolTipPosition=\"right\"><i class=\"fa-solid fa-info-circle\"></i></p>\r\n</div>\r\n<div class=\"img-editor__infoSection__propertySEO\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.seo.cdn' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n <p class=\"img-editor__infoSection__propertySEO__tooltips\" [nwbToolTip]=\"'ImgManager.UploadList.seo.cdnTooltips' | translate\" [nwbToolTipIsMultiline]=\"true\" nwbToolTipPosition=\"right\"><i class=\"fa-solid fa-info-circle\"></i></p>\r\n\r\n</div>\r\n<div class=\"img-editor__infoSection__propertySEO\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.seo.lazyloading' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n <p class=\"img-editor__infoSection__propertySEO__tooltips\" [nwbToolTip]=\"'ImgManager.UploadList.seo.lazyloadingTooltips' | translate\" [nwbToolTipIsMultiline]=\"true\" nwbToolTipPosition=\"right\"><i class=\"fa-solid fa-info-circle\"></i></p>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NwbToolTipDirective, selector: "[nwbToolTip]", inputs: ["nwbToolTip", "nwbToolTipPosition", "nwbToolTipIsMultiline"] }, { kind: "directive", type: CopyClipboardDirective, selector: "[copy-clipboard]", inputs: ["copy-clipboard"], outputs: ["copied"] }, { kind: "directive", type: DebounceKeyupDirective, selector: "input[debounceKeyUp]" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: ImageSrcPipe, name: "imgSrc" }] });
|
|
1575
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EditorInfoSectionComponent, decorators: [{
|
|
1622
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: EditorInfoSectionComponent, decorators: [{
|
|
1576
1623
|
type: Component,
|
|
1577
1624
|
args: [{ selector: 'info-section', template: "\r\n<!-- Img properties -->\r\n<div class=\"img-editor__infoSection__propertyEditable\">\r\n <p class=\"mainColor\">\r\n {{ 'ImgManager.UploadList.properties.imgName' | translate }}\r\n <span class=\"img-editor__infoSection__propertyEditable__tooltips\" [nwbToolTip]=\"'ImgManager.ImgEditor.NameInfo' | translate\" [nwbToolTipIsMultiline]=\"true\" nwbToolTipPosition=\"right\"><i class=\"fa-solid fa-info-circle\"></i></span>\r\n </p>\r\n <input\r\n type=\"text\"\r\n class=\"img-editor__infoSection__propertyEditable__input\"\r\n placeholder=\"{{'ImgManager.ImgEditor.nameEx' | translate}} \"\r\n [(ngModel)]=\"imgToEdit.display_name\"\r\n debounceKeyUp\r\n [debounceTime]=\"500\"\r\n (onEventChange)=\"onNameChange()\">\r\n</div>\r\n<div class=\"img-editor__infoSection__propertyEditable\">\r\n <p class=\"mainColor\">\r\n {{ 'ImgManager.UploadList.properties.imgURL' | translate }}\r\n <span class=\"img-editor__infoSection__propertyEditable__tooltips\" [nwbToolTip]=\"'ImgManager.editImg.changeName' | translate\" [nwbToolTipIsMultiline]=\"true\" nwbToolTipPosition=\"right\"><i class=\"fa-solid fa-info-circle\"></i></span>\r\n </p>\r\n <button type=\"button\" [copy-clipboard]=\"imgToEdit.file_name | imgSrc : 'raw'\" (copied)=\"copyToClipBoard($event)\" ><span class=\"img-editor__infoSection__propertyEditable__span\">{{imgToEdit.file_name}}</span> <i class=\"far fa-copy\"></i></button>\r\n</div>\r\n<div class=\"img-editor__infoSection__property\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.properties.imgSize' | translate }} :</p>\r\n <p>{{imgToEdit.raw_height}}*{{imgToEdit.raw_width}}px</p>\r\n</div>\r\n<div class=\"img-editor__infoSection__property\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.properties.imgWeight' | translate }} :</p>\r\n <p >{{getFileSize()}} ko</p>\r\n</div>\r\n\r\n<!-- SEO info -->\r\n\r\n<span class=\"img-editor__infoSection__divider\"></span>\r\n\r\n<div class=\"img-editor__infoSection__titleSEO\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.seo.title' | translate }}</p>\r\n</div>\r\n\r\n<div class=\"img-editor__infoSection__propertySEO\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.seo.rezise' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n <p class=\"img-editor__infoSection__propertySEO__tooltips\" [nwbToolTip]=\"'ImgManager.UploadList.seo.reziseTooltips' | translate\" [nwbToolTipIsMultiline]=\"true\" nwbToolTipPosition=\"right\"><i class=\"fa-solid fa-info-circle\"></i></p>\r\n</div>\r\n<div class=\"img-editor__infoSection__propertySEO\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.seo.webp' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n <p class=\"img-editor__infoSection__propertySEO__tooltips\" [nwbToolTip]=\"'ImgManager.UploadList.seo.webpTooltips' | translate\" [nwbToolTipIsMultiline]=\"true\" nwbToolTipPosition=\"right\"><i class=\"fa-solid fa-info-circle\"></i></p>\r\n</div>\r\n<div class=\"img-editor__infoSection__propertySEO\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.seo.cdn' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n <p class=\"img-editor__infoSection__propertySEO__tooltips\" [nwbToolTip]=\"'ImgManager.UploadList.seo.cdnTooltips' | translate\" [nwbToolTipIsMultiline]=\"true\" nwbToolTipPosition=\"right\"><i class=\"fa-solid fa-info-circle\"></i></p>\r\n\r\n</div>\r\n<div class=\"img-editor__infoSection__propertySEO\">\r\n <p class=\"mainColor\">{{ 'ImgManager.UploadList.seo.lazyloading' | translate }}</p>\r\n <p><i class=\"fal fa-check\"></i> 100%</p>\r\n <p class=\"img-editor__infoSection__propertySEO__tooltips\" [nwbToolTip]=\"'ImgManager.UploadList.seo.lazyloadingTooltips' | translate\" [nwbToolTipIsMultiline]=\"true\" nwbToolTipPosition=\"right\"><i class=\"fa-solid fa-info-circle\"></i></p>\r\n</div>\r\n" }]
|
|
1578
|
-
}], ctorParameters:
|
|
1625
|
+
}], ctorParameters: () => [{ type: AlertService }], propDecorators: { imgToEdit: [{
|
|
1579
1626
|
type: Input
|
|
1580
1627
|
}], isNameModified: [{
|
|
1581
1628
|
type: Input
|
|
@@ -1592,24 +1639,26 @@ const insertRemove = // the fade-in/fade-out animation.
|
|
|
1592
1639
|
]);
|
|
1593
1640
|
|
|
1594
1641
|
class DropdownComponent {
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
}
|
|
1642
|
+
dropDownMenuClass;
|
|
1643
|
+
disable = false;
|
|
1644
|
+
constructor() { }
|
|
1598
1645
|
ngOnInit() {
|
|
1599
1646
|
}
|
|
1647
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1648
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: DropdownComponent, selector: "dropdown", inputs: { dropDownMenuClass: "dropDownMenuClass", disable: "disable" }, ngImport: i0, template: "<div class=\"dropdown dropdownWizi\" [ngClass]=\"{'is-hoverable': !disable}\">\n <div class=\"dropdown-trigger\">\n\n <!-- Label -->\n <ng-content select=\"[label]\"></ng-content>\n\n </div>\n <div class=\"dropdown-menu\" [ngClass]=\"dropDownMenuClass\" role=\"menu\">\n <div class=\"dropdown-content\">\n\n <!-- Content -->\n <ng-content select=\"[item]\"></ng-content>\n\n </div>\n </div>\n</div>", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1600
1649
|
}
|
|
1601
|
-
|
|
1602
|
-
DropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DropdownComponent, selector: "dropdown", inputs: { dropDownMenuClass: "dropDownMenuClass", disable: "disable" }, ngImport: i0, template: "<div class=\"dropdown dropdownWizi\" [ngClass]=\"{'is-hoverable': !disable}\">\n <div class=\"dropdown-trigger\">\n\n <!-- Label -->\n <ng-content select=\"[label]\"></ng-content>\n\n </div>\n <div class=\"dropdown-menu\" [ngClass]=\"dropDownMenuClass\" role=\"menu\">\n <div class=\"dropdown-content\">\n\n <!-- Content -->\n <ng-content select=\"[item]\"></ng-content>\n\n </div>\n </div>\n</div>", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1603
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
1650
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
1604
1651
|
type: Component,
|
|
1605
1652
|
args: [{ selector: 'dropdown', template: "<div class=\"dropdown dropdownWizi\" [ngClass]=\"{'is-hoverable': !disable}\">\n <div class=\"dropdown-trigger\">\n\n <!-- Label -->\n <ng-content select=\"[label]\"></ng-content>\n\n </div>\n <div class=\"dropdown-menu\" [ngClass]=\"dropDownMenuClass\" role=\"menu\">\n <div class=\"dropdown-content\">\n\n <!-- Content -->\n <ng-content select=\"[item]\"></ng-content>\n\n </div>\n </div>\n</div>" }]
|
|
1606
|
-
}], ctorParameters:
|
|
1653
|
+
}], ctorParameters: () => [], propDecorators: { dropDownMenuClass: [{
|
|
1607
1654
|
type: Input
|
|
1608
1655
|
}], disable: [{
|
|
1609
1656
|
type: Input
|
|
1610
1657
|
}] } });
|
|
1611
1658
|
|
|
1612
1659
|
class CropperComponent {
|
|
1660
|
+
imgCDNService;
|
|
1661
|
+
imgToEdit;
|
|
1613
1662
|
set isImgModified(isImgModified) {
|
|
1614
1663
|
this._isImgModified = isImgModified;
|
|
1615
1664
|
if (!isImgModified) {
|
|
@@ -1619,6 +1668,17 @@ class CropperComponent {
|
|
|
1619
1668
|
get isImgModified() {
|
|
1620
1669
|
return this._isImgModified;
|
|
1621
1670
|
}
|
|
1671
|
+
_isImgModified = false;
|
|
1672
|
+
isImgModifiedChange = new EventEmitter();
|
|
1673
|
+
editClosed = new EventEmitter();
|
|
1674
|
+
currentCroppedImageChange = new EventEmitter();
|
|
1675
|
+
msgFailLoad = 'ImgManager.ImgEditor.msgFailLoad';
|
|
1676
|
+
isNameModified = false;
|
|
1677
|
+
isCropperReady = false; // Use to not display the crop validation btn, after the img is loaded or changed
|
|
1678
|
+
currentCroppedImage = ''; // Img modified return in base64
|
|
1679
|
+
isCropped = false;
|
|
1680
|
+
isLoading = false;
|
|
1681
|
+
_isImgCropped = false;
|
|
1622
1682
|
set isImgCropped(isImgCropped) {
|
|
1623
1683
|
setTimeout(() => {
|
|
1624
1684
|
this._isImgCropped = isImgCropped;
|
|
@@ -1627,107 +1687,100 @@ class CropperComponent {
|
|
|
1627
1687
|
get isImgCropped() {
|
|
1628
1688
|
return this._isImgCropped;
|
|
1629
1689
|
}
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
this.showCropper = false;
|
|
1651
|
-
this.containWithinAspectRatio = false;
|
|
1652
|
-
this.transform = {};
|
|
1653
|
-
// dropdown list
|
|
1654
|
-
this.resolutionConfig = [
|
|
1655
|
-
{
|
|
1656
|
-
label: 'ImgManager.ImgEditor.config.origin',
|
|
1657
|
-
config: {
|
|
1658
|
-
maintainAspectRatio: true
|
|
1659
|
-
},
|
|
1690
|
+
imgCropperChange = new Subject();
|
|
1691
|
+
skipNextImgCropped = 1;
|
|
1692
|
+
// Image Cropper properties
|
|
1693
|
+
imgType;
|
|
1694
|
+
imgRoute;
|
|
1695
|
+
imageChangedEvent = '';
|
|
1696
|
+
croppedImage = '';
|
|
1697
|
+
canvasRotation = 0;
|
|
1698
|
+
rotation = 0;
|
|
1699
|
+
scale = 1;
|
|
1700
|
+
showCropper = false;
|
|
1701
|
+
containWithinAspectRatio = false;
|
|
1702
|
+
transform = {};
|
|
1703
|
+
defaultAspectRatio;
|
|
1704
|
+
// dropdown list
|
|
1705
|
+
resolutionConfig = [
|
|
1706
|
+
{
|
|
1707
|
+
label: 'ImgManager.ImgEditor.config.origin',
|
|
1708
|
+
config: {
|
|
1709
|
+
maintainAspectRatio: true
|
|
1660
1710
|
},
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
active: true
|
|
1711
|
+
},
|
|
1712
|
+
{
|
|
1713
|
+
label: 'ImgManager.ImgEditor.config.free',
|
|
1714
|
+
config: {
|
|
1715
|
+
maintainAspectRatio: false
|
|
1667
1716
|
},
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
{
|
|
1676
|
-
label: 'ImgManager.ImgEditor.config.Portrait',
|
|
1677
|
-
config: {
|
|
1678
|
-
maintainAspectRatio: true,
|
|
1679
|
-
aspectRatio: 3 / 4
|
|
1680
|
-
}
|
|
1681
|
-
},
|
|
1682
|
-
{
|
|
1683
|
-
label: 'ImgManager.ImgEditor.config.landscape',
|
|
1684
|
-
config: {
|
|
1685
|
-
maintainAspectRatio: true,
|
|
1686
|
-
aspectRatio: 5 / 3
|
|
1687
|
-
}
|
|
1717
|
+
active: true
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
label: 'ImgManager.ImgEditor.config.square',
|
|
1721
|
+
config: {
|
|
1722
|
+
maintainAspectRatio: true,
|
|
1723
|
+
aspectRatio: 1 / 1
|
|
1688
1724
|
}
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
active: true
|
|
1696
|
-
},
|
|
1697
|
-
{
|
|
1698
|
-
label: 'ImgManager.ImgEditor.config.AntiSchedule',
|
|
1699
|
-
icon: "fal fa-undo-alt",
|
|
1700
|
-
method: "rotateLeft"
|
|
1701
|
-
},
|
|
1702
|
-
{
|
|
1703
|
-
label: 'ImgManager.ImgEditor.config.flipVert',
|
|
1704
|
-
icon: "fal fa-sort-alt",
|
|
1705
|
-
method: "flipVertical"
|
|
1706
|
-
},
|
|
1707
|
-
{
|
|
1708
|
-
label: 'ImgManager.ImgEditor.config.flipHoriz',
|
|
1709
|
-
icon: "fal fa-exchange-alt",
|
|
1710
|
-
method: "flipHorizontal"
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
label: 'ImgManager.ImgEditor.config.Portrait',
|
|
1728
|
+
config: {
|
|
1729
|
+
maintainAspectRatio: true,
|
|
1730
|
+
aspectRatio: 3 / 4
|
|
1711
1731
|
}
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
active: true
|
|
1719
|
-
},
|
|
1720
|
-
{
|
|
1721
|
-
label: 'ImgManager.ImgEditor.config.dezoom',
|
|
1722
|
-
icon: "fal fa-search-minus",
|
|
1723
|
-
method: "zoomOut"
|
|
1732
|
+
},
|
|
1733
|
+
{
|
|
1734
|
+
label: 'ImgManager.ImgEditor.config.landscape',
|
|
1735
|
+
config: {
|
|
1736
|
+
maintainAspectRatio: true,
|
|
1737
|
+
aspectRatio: 5 / 3
|
|
1724
1738
|
}
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1739
|
+
}
|
|
1740
|
+
];
|
|
1741
|
+
rotationConfig = [
|
|
1742
|
+
{
|
|
1743
|
+
label: 'ImgManager.ImgEditor.config.schedule',
|
|
1744
|
+
icon: "fal fa-redo-alt",
|
|
1745
|
+
method: "rotateRight",
|
|
1746
|
+
active: true
|
|
1747
|
+
},
|
|
1748
|
+
{
|
|
1749
|
+
label: 'ImgManager.ImgEditor.config.AntiSchedule',
|
|
1750
|
+
icon: "fal fa-undo-alt",
|
|
1751
|
+
method: "rotateLeft"
|
|
1752
|
+
},
|
|
1753
|
+
{
|
|
1754
|
+
label: 'ImgManager.ImgEditor.config.flipVert',
|
|
1755
|
+
icon: "fal fa-sort-alt",
|
|
1756
|
+
method: "flipVertical"
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
label: 'ImgManager.ImgEditor.config.flipHoriz',
|
|
1760
|
+
icon: "fal fa-exchange-alt",
|
|
1761
|
+
method: "flipHorizontal"
|
|
1762
|
+
}
|
|
1763
|
+
];
|
|
1764
|
+
zoomConfig = [
|
|
1765
|
+
{
|
|
1766
|
+
label: 'ImgManager.ImgEditor.config.zoom',
|
|
1767
|
+
icon: "fal fa-search-plus",
|
|
1768
|
+
method: "zoomIn",
|
|
1769
|
+
active: true
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
label: 'ImgManager.ImgEditor.config.dezoom',
|
|
1773
|
+
icon: "fal fa-search-minus",
|
|
1774
|
+
method: "zoomOut"
|
|
1775
|
+
}
|
|
1776
|
+
];
|
|
1777
|
+
// Img cropper variables
|
|
1778
|
+
imgCropperConfig = {
|
|
1779
|
+
maintainAspectRatio: false,
|
|
1780
|
+
aspectRatio: undefined
|
|
1781
|
+
};
|
|
1782
|
+
constructor(imgCDNService) {
|
|
1783
|
+
this.imgCDNService = imgCDNService;
|
|
1731
1784
|
}
|
|
1732
1785
|
ngOnInit() {
|
|
1733
1786
|
this.init();
|
|
@@ -1883,17 +1936,17 @@ class CropperComponent {
|
|
|
1883
1936
|
applyMethod(method) {
|
|
1884
1937
|
this[method](); // call the method contains in zoomConfig or rotationConfig
|
|
1885
1938
|
}
|
|
1939
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: CropperComponent, deps: [{ token: ImgCDNService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1940
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: CropperComponent, selector: "cropper", inputs: { imgToEdit: "imgToEdit", isImgModified: "isImgModified" }, outputs: { isImgModifiedChange: "isImgModifiedChange", editClosed: "editClosed", currentCroppedImageChange: "currentCroppedImageChange" }, ngImport: i0, template: "<div class=\"img-editor__container__toolsContainer\">\r\n\r\n <div *ngIf=\"isImgCropped\">\r\n <div\r\n class=\"img-editor__container__toolsContainer__tool img-editor__container__toolsContainer__tool--button\"\r\n (click)=\"confirmCrop()\"\r\n [nwbToolTip]=\"'ImgManager.ImgEditor.ValidtToolTip' | translate\"\r\n nwbToolTipPosition=\"left\"\r\n >\r\n <i class=\"far fa-check\"></i>\r\n <p>{{ 'ImgManager.ImgEditor.Valid' | translate }}</p>\r\n </div>\r\n </div>\r\n\r\n <!-- Resolution -->\r\n <dropdown dropdownId=\"dropdown-resolution\">\r\n <ng-container label>\r\n <div\r\n class=\"img-editor__container__toolsContainer__tool\"\r\n >\r\n <i class=\"far fa-crop\"></i>\r\n <p>{{ 'ImgManager.ImgEditor.crop' | translate }}</p>\r\n </div>\r\n </ng-container>\r\n <ng-container item *ngFor=\"let item of resolutionConfig; let index = index;\">\r\n <div\r\n class=\"dropdown-item\"\r\n [ngClass]=\"{'active-item': item.active}\"\r\n (click)=\"changeResolutionSize(index)\">\r\n <p>{{item.label | translate}}</p>\r\n </div>\r\n </ng-container>\r\n </dropdown>\r\n\r\n <!-- Zoom -->\r\n <dropdown dropdownId=\"dropdown-rotation\">\r\n <ng-container label>\r\n <div class=\"img-editor__container__toolsContainer__tool\" (click)=\"zoomIn()\">\r\n <i class=\"far fa-expand-arrows-alt\"></i>\r\n <p>{{ 'ImgManager.ImgEditor.display' | translate }}</p>\r\n </div>\r\n </ng-container>\r\n <ng-container item *ngFor=\"let item of zoomConfig; let index = index;\">\r\n <div\r\n class=\"dropdown-item\"\r\n [ngClass]=\"{'active-item': item.active}\"\r\n (click)=\"applyMethod(item.method)\">\r\n <i *ngIf=\"item.icon\" [ngClass]=\"item.icon\"></i>\r\n <p>{{item.label | translate}}</p>\r\n </div>\r\n </ng-container>\r\n </dropdown>\r\n\r\n <!-- Rotation -->\r\n <dropdown dropdownId=\"dropdown-rotation\" dropDownMenuClass=\"img-editor__container__toolsContainer__RotationDropdown\">\r\n <ng-container label>\r\n <div class=\"img-editor__container__toolsContainer__tool\" (click)=\"rotateRight()\">\r\n <i class=\"far fa-redo\"></i>\r\n <p>{{ 'ImgManager.ImgEditor.rotation' | translate }}</p>\r\n </div>\r\n </ng-container>\r\n <ng-container item *ngFor=\"let item of rotationConfig; let index = index;\">\r\n <div\r\n class=\"dropdown-item\"\r\n [ngClass]=\"{'active-item': item.active}\"\r\n (click)=\"applyMethod(item.method)\">\r\n <i *ngIf=\"item.icon\" [ngClass]=\"item.icon\"></i>\r\n <p>{{item.label | translate}}</p>\r\n </div>\r\n </ng-container>\r\n </dropdown>\r\n\r\n <div\r\n class=\"img-editor__container__toolsContainer__tool\"\r\n (click)=\"onRestart()\"\r\n @insertRemoveAnnim\r\n >\r\n <i class=\"far fa-retweet-alt\"></i>\r\n <p>{{ 'ImgManager.ImgEditor.restart' | translate }}</p>\r\n </div>\r\n</div>\r\n\r\n<div class=\"img-editor__image-cropper\" >\r\n <image-cropper\r\n [imageURL]=\"imgRoute\"\r\n [imageBase64]=\"croppedImage\"\r\n [maintainAspectRatio]=\"imgCropperConfig.maintainAspectRatio\"\r\n [containWithinAspectRatio]=\"containWithinAspectRatio\"\r\n [aspectRatio]=\"imgCropperConfig.aspectRatio\"\r\n [onlyScaleDown]=\"true\"\r\n [roundCropper]=\"false\"\r\n [canvasRotation]=\"canvasRotation\"\r\n [transform]=\"transform\"\r\n [alignImage]=\"'center'\"\r\n [style.display]=\"showCropper ? null : 'none'\"\r\n [format]=\"imgType\"\r\n [backgroundColor]=\"'white'\"\r\n (imageCropped)=\"imageCropped($event)\"\r\n (imageLoaded)=\"imageLoaded()\"\r\n (cropperReady)=\"cropperReady()\"\r\n (loadImageFailed)=\"loadImageFailed()\"\r\n ></image-cropper>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NwbToolTipDirective, selector: "[nwbToolTip]", inputs: ["nwbToolTip", "nwbToolTipPosition", "nwbToolTipIsMultiline"] }, { kind: "component", type: i4$1.ImageCropperComponent, selector: "image-cropper", inputs: ["imageChangedEvent", "imageURL", "imageBase64", "imageFile", "imageAltText", "format", "transform", "maintainAspectRatio", "aspectRatio", "resetCropOnAspectRatioChange", "resizeToWidth", "resizeToHeight", "cropperMinWidth", "cropperMinHeight", "cropperMaxHeight", "cropperMaxWidth", "cropperStaticWidth", "cropperStaticHeight", "canvasRotation", "initialStepSize", "roundCropper", "onlyScaleDown", "imageQuality", "autoCrop", "backgroundColor", "containWithinAspectRatio", "hideResizeSquares", "allowMoveImage", "cropper", "alignImage", "disabled", "hidden"], outputs: ["imageCropped", "startCropImage", "imageLoaded", "cropperReady", "loadImageFailed", "transformChange"] }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["dropDownMenuClass", "disable"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], animations: [
|
|
1941
|
+
insertRemove
|
|
1942
|
+
] });
|
|
1886
1943
|
}
|
|
1887
|
-
|
|
1888
|
-
CropperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CropperComponent, selector: "cropper", inputs: { imgToEdit: "imgToEdit", isImgModified: "isImgModified" }, outputs: { isImgModifiedChange: "isImgModifiedChange", editClosed: "editClosed", currentCroppedImageChange: "currentCroppedImageChange" }, ngImport: i0, template: "<div class=\"img-editor__container__toolsContainer\">\r\n\r\n <div *ngIf=\"isImgCropped\">\r\n <div\r\n class=\"img-editor__container__toolsContainer__tool img-editor__container__toolsContainer__tool--button\"\r\n (click)=\"confirmCrop()\"\r\n [nwbToolTip]=\"'ImgManager.ImgEditor.ValidtToolTip' | translate\"\r\n nwbToolTipPosition=\"left\"\r\n >\r\n <i class=\"far fa-check\"></i>\r\n <p>{{ 'ImgManager.ImgEditor.Valid' | translate }}</p>\r\n </div>\r\n </div>\r\n\r\n <!-- Resolution -->\r\n <dropdown dropdownId=\"dropdown-resolution\">\r\n <ng-container label>\r\n <div\r\n class=\"img-editor__container__toolsContainer__tool\"\r\n >\r\n <i class=\"far fa-crop\"></i>\r\n <p>{{ 'ImgManager.ImgEditor.crop' | translate }}</p>\r\n </div>\r\n </ng-container>\r\n <ng-container item *ngFor=\"let item of resolutionConfig; let index = index;\">\r\n <div\r\n class=\"dropdown-item\"\r\n [ngClass]=\"{'active-item': item.active}\"\r\n (click)=\"changeResolutionSize(index)\">\r\n <p>{{item.label | translate}}</p>\r\n </div>\r\n </ng-container>\r\n </dropdown>\r\n\r\n <!-- Zoom -->\r\n <dropdown dropdownId=\"dropdown-rotation\">\r\n <ng-container label>\r\n <div class=\"img-editor__container__toolsContainer__tool\" (click)=\"zoomIn()\">\r\n <i class=\"far fa-expand-arrows-alt\"></i>\r\n <p>{{ 'ImgManager.ImgEditor.display' | translate }}</p>\r\n </div>\r\n </ng-container>\r\n <ng-container item *ngFor=\"let item of zoomConfig; let index = index;\">\r\n <div\r\n class=\"dropdown-item\"\r\n [ngClass]=\"{'active-item': item.active}\"\r\n (click)=\"applyMethod(item.method)\">\r\n <i *ngIf=\"item.icon\" [ngClass]=\"item.icon\"></i>\r\n <p>{{item.label | translate}}</p>\r\n </div>\r\n </ng-container>\r\n </dropdown>\r\n\r\n <!-- Rotation -->\r\n <dropdown dropdownId=\"dropdown-rotation\" dropDownMenuClass=\"img-editor__container__toolsContainer__RotationDropdown\">\r\n <ng-container label>\r\n <div class=\"img-editor__container__toolsContainer__tool\" (click)=\"rotateRight()\">\r\n <i class=\"far fa-redo\"></i>\r\n <p>{{ 'ImgManager.ImgEditor.rotation' | translate }}</p>\r\n </div>\r\n </ng-container>\r\n <ng-container item *ngFor=\"let item of rotationConfig; let index = index;\">\r\n <div\r\n class=\"dropdown-item\"\r\n [ngClass]=\"{'active-item': item.active}\"\r\n (click)=\"applyMethod(item.method)\">\r\n <i *ngIf=\"item.icon\" [ngClass]=\"item.icon\"></i>\r\n <p>{{item.label | translate}}</p>\r\n </div>\r\n </ng-container>\r\n </dropdown>\r\n\r\n <div\r\n class=\"img-editor__container__toolsContainer__tool\"\r\n (click)=\"onRestart()\"\r\n @insertRemoveAnnim\r\n >\r\n <i class=\"far fa-retweet-alt\"></i>\r\n <p>{{ 'ImgManager.ImgEditor.restart' | translate }}</p>\r\n </div>\r\n</div>\r\n\r\n<div class=\"img-editor__image-cropper\" >\r\n <image-cropper\r\n [imageURL]=\"imgRoute\"\r\n [imageBase64]=\"croppedImage\"\r\n [maintainAspectRatio]=\"imgCropperConfig.maintainAspectRatio\"\r\n [containWithinAspectRatio]=\"containWithinAspectRatio\"\r\n [aspectRatio]=\"imgCropperConfig.aspectRatio\"\r\n [onlyScaleDown]=\"true\"\r\n [roundCropper]=\"false\"\r\n [canvasRotation]=\"canvasRotation\"\r\n [transform]=\"transform\"\r\n [alignImage]=\"'center'\"\r\n [style.display]=\"showCropper ? null : 'none'\"\r\n [format]=\"imgType\"\r\n [backgroundColor]=\"'white'\"\r\n (imageCropped)=\"imageCropped($event)\"\r\n (imageLoaded)=\"imageLoaded()\"\r\n (cropperReady)=\"cropperReady()\"\r\n (loadImageFailed)=\"loadImageFailed()\"\r\n ></image-cropper>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NwbToolTipDirective, selector: "[nwbToolTip]", inputs: ["nwbToolTip", "nwbToolTipPosition", "nwbToolTipIsMultiline"] }, { kind: "component", type: i4$1.ImageCropperComponent, selector: "image-cropper", inputs: ["imageChangedEvent", "imageURL", "imageBase64", "imageFile", "imageAltText", "format", "transform", "maintainAspectRatio", "aspectRatio", "resetCropOnAspectRatioChange", "resizeToWidth", "resizeToHeight", "cropperMinWidth", "cropperMinHeight", "cropperMaxHeight", "cropperMaxWidth", "cropperStaticWidth", "cropperStaticHeight", "canvasRotation", "initialStepSize", "roundCropper", "onlyScaleDown", "imageQuality", "autoCrop", "backgroundColor", "containWithinAspectRatio", "hideResizeSquares", "allowMoveImage", "cropper", "alignImage", "disabled", "hidden"], outputs: ["imageCropped", "startCropImage", "imageLoaded", "cropperReady", "loadImageFailed", "transformChange"] }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["dropDownMenuClass", "disable"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], animations: [
|
|
1889
|
-
insertRemove
|
|
1890
|
-
] });
|
|
1891
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CropperComponent, decorators: [{
|
|
1944
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: CropperComponent, decorators: [{
|
|
1892
1945
|
type: Component,
|
|
1893
1946
|
args: [{ selector: 'cropper', animations: [
|
|
1894
1947
|
insertRemove
|
|
1895
1948
|
], template: "<div class=\"img-editor__container__toolsContainer\">\r\n\r\n <div *ngIf=\"isImgCropped\">\r\n <div\r\n class=\"img-editor__container__toolsContainer__tool img-editor__container__toolsContainer__tool--button\"\r\n (click)=\"confirmCrop()\"\r\n [nwbToolTip]=\"'ImgManager.ImgEditor.ValidtToolTip' | translate\"\r\n nwbToolTipPosition=\"left\"\r\n >\r\n <i class=\"far fa-check\"></i>\r\n <p>{{ 'ImgManager.ImgEditor.Valid' | translate }}</p>\r\n </div>\r\n </div>\r\n\r\n <!-- Resolution -->\r\n <dropdown dropdownId=\"dropdown-resolution\">\r\n <ng-container label>\r\n <div\r\n class=\"img-editor__container__toolsContainer__tool\"\r\n >\r\n <i class=\"far fa-crop\"></i>\r\n <p>{{ 'ImgManager.ImgEditor.crop' | translate }}</p>\r\n </div>\r\n </ng-container>\r\n <ng-container item *ngFor=\"let item of resolutionConfig; let index = index;\">\r\n <div\r\n class=\"dropdown-item\"\r\n [ngClass]=\"{'active-item': item.active}\"\r\n (click)=\"changeResolutionSize(index)\">\r\n <p>{{item.label | translate}}</p>\r\n </div>\r\n </ng-container>\r\n </dropdown>\r\n\r\n <!-- Zoom -->\r\n <dropdown dropdownId=\"dropdown-rotation\">\r\n <ng-container label>\r\n <div class=\"img-editor__container__toolsContainer__tool\" (click)=\"zoomIn()\">\r\n <i class=\"far fa-expand-arrows-alt\"></i>\r\n <p>{{ 'ImgManager.ImgEditor.display' | translate }}</p>\r\n </div>\r\n </ng-container>\r\n <ng-container item *ngFor=\"let item of zoomConfig; let index = index;\">\r\n <div\r\n class=\"dropdown-item\"\r\n [ngClass]=\"{'active-item': item.active}\"\r\n (click)=\"applyMethod(item.method)\">\r\n <i *ngIf=\"item.icon\" [ngClass]=\"item.icon\"></i>\r\n <p>{{item.label | translate}}</p>\r\n </div>\r\n </ng-container>\r\n </dropdown>\r\n\r\n <!-- Rotation -->\r\n <dropdown dropdownId=\"dropdown-rotation\" dropDownMenuClass=\"img-editor__container__toolsContainer__RotationDropdown\">\r\n <ng-container label>\r\n <div class=\"img-editor__container__toolsContainer__tool\" (click)=\"rotateRight()\">\r\n <i class=\"far fa-redo\"></i>\r\n <p>{{ 'ImgManager.ImgEditor.rotation' | translate }}</p>\r\n </div>\r\n </ng-container>\r\n <ng-container item *ngFor=\"let item of rotationConfig; let index = index;\">\r\n <div\r\n class=\"dropdown-item\"\r\n [ngClass]=\"{'active-item': item.active}\"\r\n (click)=\"applyMethod(item.method)\">\r\n <i *ngIf=\"item.icon\" [ngClass]=\"item.icon\"></i>\r\n <p>{{item.label | translate}}</p>\r\n </div>\r\n </ng-container>\r\n </dropdown>\r\n\r\n <div\r\n class=\"img-editor__container__toolsContainer__tool\"\r\n (click)=\"onRestart()\"\r\n @insertRemoveAnnim\r\n >\r\n <i class=\"far fa-retweet-alt\"></i>\r\n <p>{{ 'ImgManager.ImgEditor.restart' | translate }}</p>\r\n </div>\r\n</div>\r\n\r\n<div class=\"img-editor__image-cropper\" >\r\n <image-cropper\r\n [imageURL]=\"imgRoute\"\r\n [imageBase64]=\"croppedImage\"\r\n [maintainAspectRatio]=\"imgCropperConfig.maintainAspectRatio\"\r\n [containWithinAspectRatio]=\"containWithinAspectRatio\"\r\n [aspectRatio]=\"imgCropperConfig.aspectRatio\"\r\n [onlyScaleDown]=\"true\"\r\n [roundCropper]=\"false\"\r\n [canvasRotation]=\"canvasRotation\"\r\n [transform]=\"transform\"\r\n [alignImage]=\"'center'\"\r\n [style.display]=\"showCropper ? null : 'none'\"\r\n [format]=\"imgType\"\r\n [backgroundColor]=\"'white'\"\r\n (imageCropped)=\"imageCropped($event)\"\r\n (imageLoaded)=\"imageLoaded()\"\r\n (cropperReady)=\"cropperReady()\"\r\n (loadImageFailed)=\"loadImageFailed()\"\r\n ></image-cropper>\r\n</div>\r\n" }]
|
|
1896
|
-
}], ctorParameters:
|
|
1949
|
+
}], ctorParameters: () => [{ type: ImgCDNService }], propDecorators: { imgToEdit: [{
|
|
1897
1950
|
type: Input
|
|
1898
1951
|
}], isImgModified: [{
|
|
1899
1952
|
type: Input
|
|
@@ -1906,17 +1959,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1906
1959
|
}] } });
|
|
1907
1960
|
|
|
1908
1961
|
class ImgEditorComponent {
|
|
1962
|
+
imgManagerService;
|
|
1963
|
+
renamePictureService;
|
|
1964
|
+
stateDisplayed;
|
|
1965
|
+
imgToEdit;
|
|
1966
|
+
editClosed = new EventEmitter();
|
|
1967
|
+
isLoading = false;
|
|
1968
|
+
isImgModified = false;
|
|
1969
|
+
isNameModified = false;
|
|
1970
|
+
currentCroppedImage = ''; // Img modified return in base64 by the cropper
|
|
1971
|
+
previousName;
|
|
1972
|
+
msgFailSave = 'ImgManager.ImgEditor.msgFailSave';
|
|
1973
|
+
msgFailLoad = 'ImgManager.ImgEditor.msgFailLoad';
|
|
1974
|
+
msgSuccessEdit = "Les modifications de l'image ont bien été enregistrées.";
|
|
1909
1975
|
constructor(imgManagerService, renamePictureService) {
|
|
1910
1976
|
this.imgManagerService = imgManagerService;
|
|
1911
1977
|
this.renamePictureService = renamePictureService;
|
|
1912
|
-
this.editClosed = new EventEmitter();
|
|
1913
|
-
this.isLoading = false;
|
|
1914
|
-
this.isImgModified = false;
|
|
1915
|
-
this.isNameModified = false;
|
|
1916
|
-
this.currentCroppedImage = ''; // Img modified return in base64 by the cropper
|
|
1917
|
-
this.msgFailSave = 'ImgManager.ImgEditor.msgFailSave';
|
|
1918
|
-
this.msgFailLoad = 'ImgManager.ImgEditor.msgFailLoad';
|
|
1919
|
-
this.msgSuccessEdit = "Les modifications de l'image ont bien été enregistrées.";
|
|
1920
1978
|
}
|
|
1921
1979
|
ngOnInit() {
|
|
1922
1980
|
this.previousName = this.imgToEdit.display_name;
|
|
@@ -1998,17 +2056,17 @@ class ImgEditorComponent {
|
|
|
1998
2056
|
}
|
|
1999
2057
|
});
|
|
2000
2058
|
}
|
|
2059
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgEditorComponent, deps: [{ token: ImgManagerService }, { token: RenamePictureService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2060
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: ImgEditorComponent, selector: "img-editor", inputs: { stateDisplayed: "stateDisplayed", imgToEdit: "imgToEdit" }, outputs: { editClosed: "editClosed" }, ngImport: i0, template: "<div class=\"img-editor\" [@easeInOut]=\"'in'\">\r\n\r\n <!-- Button Action Section -->\r\n\r\n <div class=\"img-editor__infoSection__actions\">\r\n <div>\r\n <button\r\n type=\"button\"\r\n class=\"button img-editor__infoSection__actions__cancel\"\r\n (click)=\"onCancel()\"\r\n [disabled]=\"isLoading || (!isImgModified && !isNameModified)\"\r\n >\r\n {{ 'ImgManager.ImgLib.cancel' | translate }}\r\n </button>\r\n <div\r\n class=\"button danger button img-editor__infoSection__actions__save\"\r\n [ngClass]=\"{'img-editor__infoSection__actions__save--disable': isLoading}\"\r\n (click)=\"onSave()\"\r\n >\r\n {{ 'ImgManager.ImgEditor.saveBtn' | translate }}\r\n <span btnLoadingAnim *ngIf=\"isLoading\" class=\"btnLoadingAnnimation\"></span>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <ng-scrollbar\r\n class=\"img-editor__scroll\"\r\n [ngClass]=\"{\r\n 'img-editor__scroll--full': stateDisplayed === 'full',\r\n 'img-editor__scroll--smallDisplay': stateDisplayed === 'small',\r\n 'img-editor__scroll--window': stateDisplayed === 'window'\r\n }\"\r\n >\r\n <div class=\"columns\">\r\n <!-- Left section -->\r\n <div class=\"column is-one-third img-editor__infoSection\">\r\n\r\n <info-section\r\n [imgToEdit]=\"imgToEdit\"\r\n [(isNameModified)]=\"isNameModified\"\r\n >\r\n </info-section>\r\n </div>\r\n\r\n\r\n <!-- Right section -->\r\n <div class=\"column img-editor__container\">\r\n <cropper\r\n [imgToEdit]=\"imgToEdit\"\r\n [(isImgModified)]=\"isImgModified\"\r\n (currentCroppedImageChange)=\"onImgCropped($event)\"\r\n (editClosed)=\"onEditClosed($event)\">\r\n </cropper>\r\n </div>\r\n </div>\r\n </ng-scrollbar>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.NgScrollbar, selector: "ng-scrollbar", inputs: ["disabled", "sensorDisabled", "pointerEventsDisabled", "viewportPropagateMouseMove", "autoHeightDisabled", "autoWidthDisabled", "viewClass", "trackClass", "thumbClass", "minThumbSize", "trackClickScrollDuration", "pointerEventsMethod", "track", "visibility", "appearance", "position", "sensorDebounce", "scrollAuditTime"], outputs: ["updated"], exportAs: ["ngScrollbar"] }, { kind: "component", type: EditorInfoSectionComponent, selector: "info-section", inputs: ["imgToEdit", "isNameModified"], outputs: ["isNameModifiedChange"] }, { kind: "component", type: CropperComponent, selector: "cropper", inputs: ["imgToEdit", "isImgModified"], outputs: ["isImgModifiedChange", "editClosed", "currentCroppedImageChange"] }, { kind: "directive", type: LoadingDirective, selector: "[btnLoadingAnim]" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], animations: [
|
|
2061
|
+
easeInOut
|
|
2062
|
+
] });
|
|
2001
2063
|
}
|
|
2002
|
-
|
|
2003
|
-
ImgEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ImgEditorComponent, selector: "img-editor", inputs: { stateDisplayed: "stateDisplayed", imgToEdit: "imgToEdit" }, outputs: { editClosed: "editClosed" }, ngImport: i0, template: "<div class=\"img-editor\" [@easeInOut]=\"'in'\">\r\n\r\n <!-- Button Action Section -->\r\n\r\n <div class=\"img-editor__infoSection__actions\">\r\n <div>\r\n <button\r\n type=\"button\"\r\n class=\"button img-editor__infoSection__actions__cancel\"\r\n (click)=\"onCancel()\"\r\n [disabled]=\"isLoading || (!isImgModified && !isNameModified)\"\r\n >\r\n {{ 'ImgManager.ImgLib.cancel' | translate }}\r\n </button>\r\n <div\r\n class=\"button danger button img-editor__infoSection__actions__save\"\r\n [ngClass]=\"{'img-editor__infoSection__actions__save--disable': isLoading}\"\r\n (click)=\"onSave()\"\r\n >\r\n {{ 'ImgManager.ImgEditor.saveBtn' | translate }}\r\n <span btnLoadingAnim *ngIf=\"isLoading\" class=\"btnLoadingAnnimation\"></span>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <ng-scrollbar\r\n class=\"img-editor__scroll\"\r\n [ngClass]=\"{\r\n 'img-editor__scroll--full': stateDisplayed === 'full',\r\n 'img-editor__scroll--smallDisplay': stateDisplayed === 'small',\r\n 'img-editor__scroll--window': stateDisplayed === 'window'\r\n }\"\r\n >\r\n <div class=\"columns\">\r\n <!-- Left section -->\r\n <div class=\"column is-one-third img-editor__infoSection\">\r\n\r\n <info-section\r\n [imgToEdit]=\"imgToEdit\"\r\n [(isNameModified)]=\"isNameModified\"\r\n >\r\n </info-section>\r\n </div>\r\n\r\n\r\n <!-- Right section -->\r\n <div class=\"column img-editor__container\">\r\n <cropper\r\n [imgToEdit]=\"imgToEdit\"\r\n [(isImgModified)]=\"isImgModified\"\r\n (currentCroppedImageChange)=\"onImgCropped($event)\"\r\n (editClosed)=\"onEditClosed($event)\">\r\n </cropper>\r\n </div>\r\n </div>\r\n </ng-scrollbar>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.NgScrollbar, selector: "ng-scrollbar", inputs: ["disabled", "sensorDisabled", "pointerEventsDisabled", "viewportPropagateMouseMove", "autoHeightDisabled", "autoWidthDisabled", "viewClass", "trackClass", "thumbClass", "minThumbSize", "trackClickScrollDuration", "pointerEventsMethod", "track", "visibility", "appearance", "position", "sensorDebounce", "scrollAuditTime"], outputs: ["updated"], exportAs: ["ngScrollbar"] }, { kind: "component", type: EditorInfoSectionComponent, selector: "info-section", inputs: ["imgToEdit", "isNameModified"], outputs: ["isNameModifiedChange"] }, { kind: "component", type: CropperComponent, selector: "cropper", inputs: ["imgToEdit", "isImgModified"], outputs: ["isImgModifiedChange", "editClosed", "currentCroppedImageChange"] }, { kind: "directive", type: LoadingDirective, selector: "[btnLoadingAnim]" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], animations: [
|
|
2004
|
-
easeInOut
|
|
2005
|
-
] });
|
|
2006
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImgEditorComponent, decorators: [{
|
|
2064
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgEditorComponent, decorators: [{
|
|
2007
2065
|
type: Component,
|
|
2008
2066
|
args: [{ selector: 'img-editor', animations: [
|
|
2009
2067
|
easeInOut
|
|
2010
2068
|
], template: "<div class=\"img-editor\" [@easeInOut]=\"'in'\">\r\n\r\n <!-- Button Action Section -->\r\n\r\n <div class=\"img-editor__infoSection__actions\">\r\n <div>\r\n <button\r\n type=\"button\"\r\n class=\"button img-editor__infoSection__actions__cancel\"\r\n (click)=\"onCancel()\"\r\n [disabled]=\"isLoading || (!isImgModified && !isNameModified)\"\r\n >\r\n {{ 'ImgManager.ImgLib.cancel' | translate }}\r\n </button>\r\n <div\r\n class=\"button danger button img-editor__infoSection__actions__save\"\r\n [ngClass]=\"{'img-editor__infoSection__actions__save--disable': isLoading}\"\r\n (click)=\"onSave()\"\r\n >\r\n {{ 'ImgManager.ImgEditor.saveBtn' | translate }}\r\n <span btnLoadingAnim *ngIf=\"isLoading\" class=\"btnLoadingAnnimation\"></span>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <ng-scrollbar\r\n class=\"img-editor__scroll\"\r\n [ngClass]=\"{\r\n 'img-editor__scroll--full': stateDisplayed === 'full',\r\n 'img-editor__scroll--smallDisplay': stateDisplayed === 'small',\r\n 'img-editor__scroll--window': stateDisplayed === 'window'\r\n }\"\r\n >\r\n <div class=\"columns\">\r\n <!-- Left section -->\r\n <div class=\"column is-one-third img-editor__infoSection\">\r\n\r\n <info-section\r\n [imgToEdit]=\"imgToEdit\"\r\n [(isNameModified)]=\"isNameModified\"\r\n >\r\n </info-section>\r\n </div>\r\n\r\n\r\n <!-- Right section -->\r\n <div class=\"column img-editor__container\">\r\n <cropper\r\n [imgToEdit]=\"imgToEdit\"\r\n [(isImgModified)]=\"isImgModified\"\r\n (currentCroppedImageChange)=\"onImgCropped($event)\"\r\n (editClosed)=\"onEditClosed($event)\">\r\n </cropper>\r\n </div>\r\n </div>\r\n </ng-scrollbar>\r\n</div>\r\n" }]
|
|
2011
|
-
}], ctorParameters:
|
|
2069
|
+
}], ctorParameters: () => [{ type: ImgManagerService }, { type: RenamePictureService }], propDecorators: { stateDisplayed: [{
|
|
2012
2070
|
type: Input
|
|
2013
2071
|
}], imgToEdit: [{
|
|
2014
2072
|
type: Input
|
|
@@ -2017,12 +2075,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2017
2075
|
}] } });
|
|
2018
2076
|
|
|
2019
2077
|
class AutoHideDirective {
|
|
2078
|
+
_elementRef;
|
|
2079
|
+
domService;
|
|
2080
|
+
triggerElement;
|
|
2081
|
+
forceOn = null;
|
|
2020
2082
|
constructor(_elementRef, domService) {
|
|
2021
2083
|
this._elementRef = _elementRef;
|
|
2022
2084
|
this.domService = domService;
|
|
2023
|
-
this.forceOn = null;
|
|
2024
|
-
this.clickOutside = new EventEmitter();
|
|
2025
2085
|
}
|
|
2086
|
+
clickOutside = new EventEmitter();
|
|
2026
2087
|
ngAfterViewInit() {
|
|
2027
2088
|
this.domService.documentEvent().subscribe((targetElement) => {
|
|
2028
2089
|
const clickedInside = this._elementRef.nativeElement.contains(targetElement);
|
|
@@ -2043,15 +2104,15 @@ class AutoHideDirective {
|
|
|
2043
2104
|
}
|
|
2044
2105
|
});
|
|
2045
2106
|
}
|
|
2107
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AutoHideDirective, deps: [{ token: i0.ElementRef }, { token: DomService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2108
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: { triggerElement: "triggerElement", forceOn: "forceOn" }, outputs: { clickOutside: "clickOutside" }, ngImport: i0 });
|
|
2046
2109
|
}
|
|
2047
|
-
|
|
2048
|
-
AutoHideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: { triggerElement: "triggerElement", forceOn: "forceOn" }, outputs: { clickOutside: "clickOutside" }, ngImport: i0 });
|
|
2049
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AutoHideDirective, decorators: [{
|
|
2110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: AutoHideDirective, decorators: [{
|
|
2050
2111
|
type: Directive,
|
|
2051
2112
|
args: [{
|
|
2052
2113
|
selector: '[wzAutoHide]'
|
|
2053
2114
|
}]
|
|
2054
|
-
}], ctorParameters:
|
|
2115
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: DomService }], propDecorators: { triggerElement: [{
|
|
2055
2116
|
type: Input
|
|
2056
2117
|
}], forceOn: [{
|
|
2057
2118
|
type: Input
|
|
@@ -2061,26 +2122,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2061
2122
|
}] } });
|
|
2062
2123
|
|
|
2063
2124
|
class CanvaBtnComponent {
|
|
2125
|
+
canvaService;
|
|
2126
|
+
stateDisplayed;
|
|
2127
|
+
showImgUploaded = new EventEmitter();
|
|
2128
|
+
canvaApi;
|
|
2129
|
+
canvaLogoRouteAssets;
|
|
2130
|
+
imgLoading = false;
|
|
2131
|
+
availableFormat = {
|
|
2132
|
+
'ImgManager.CanvaBtn.smallSquare': {
|
|
2133
|
+
'width': 500,
|
|
2134
|
+
'height': 500
|
|
2135
|
+
},
|
|
2136
|
+
'ImgManager.CanvaBtn.mediumSquare': {
|
|
2137
|
+
'width': 1000,
|
|
2138
|
+
'height': 1000
|
|
2139
|
+
},
|
|
2140
|
+
'ImgManager.CanvaBtn.bigSquare': {
|
|
2141
|
+
'width': 2500,
|
|
2142
|
+
'height': 2500
|
|
2143
|
+
}
|
|
2144
|
+
};
|
|
2145
|
+
openDropDownMenu = false;
|
|
2146
|
+
expectedHeight;
|
|
2147
|
+
expectedWidth;
|
|
2148
|
+
subs = [];
|
|
2064
2149
|
constructor(canvaService) {
|
|
2065
2150
|
this.canvaService = canvaService;
|
|
2066
|
-
this.showImgUploaded = new EventEmitter();
|
|
2067
|
-
this.imgLoading = false;
|
|
2068
|
-
this.availableFormat = {
|
|
2069
|
-
'ImgManager.CanvaBtn.smallSquare': {
|
|
2070
|
-
'width': 500,
|
|
2071
|
-
'height': 500
|
|
2072
|
-
},
|
|
2073
|
-
'ImgManager.CanvaBtn.mediumSquare': {
|
|
2074
|
-
'width': 1000,
|
|
2075
|
-
'height': 1000
|
|
2076
|
-
},
|
|
2077
|
-
'ImgManager.CanvaBtn.bigSquare': {
|
|
2078
|
-
'width': 2500,
|
|
2079
|
-
'height': 2500
|
|
2080
|
-
}
|
|
2081
|
-
};
|
|
2082
|
-
this.openDropDownMenu = false;
|
|
2083
|
-
this.subs = [];
|
|
2084
2151
|
}
|
|
2085
2152
|
ngOnInit() {
|
|
2086
2153
|
this.canvaLogoRouteAssets = this.canvaService.getCanvaLogo();
|
|
@@ -2106,13 +2173,13 @@ class CanvaBtnComponent {
|
|
|
2106
2173
|
ngOnDestroy() {
|
|
2107
2174
|
this.subs.forEach(sub => sub.unsubscribe());
|
|
2108
2175
|
}
|
|
2176
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: CanvaBtnComponent, deps: [{ token: CanvaService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2177
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: CanvaBtnComponent, selector: "canva-btn", inputs: { stateDisplayed: "stateDisplayed" }, outputs: { showImgUploaded: "showImgUploaded" }, ngImport: i0, template: "<div class=\"canva dropdown is-right is-hoverable\"\r\n wzAutoHide (clickOutside)=\"openDropDownMenu = false;\"\r\n [ngClass]=\"{'is-up': stateDisplayed === 'small', 'noTooltip': stateDisplayed !== 'small'}\"\r\n >\r\n <div class=\"dropdown-trigger\">\r\n <div\r\n class=\"button canva-btn\"\r\n aria-controls=\"dropdown-menuCanva\"\r\n (click)=\"openDropDownMenu = true;\"\r\n >\r\n <span>{{'ImgManager.CanvaBtn.createImg' | translate}}</span>\r\n <img [src]=\"canvaLogoRouteAssets\" class=\"canva-btn__logo\">\r\n\r\n <span btnLoadingAnim class=\"btnLoadingAnnimation\" *ngIf=\"imgLoading\"></span>\r\n </div>\r\n </div>\r\n <div\r\n class=\"dropdown-menu dropDownShadow\"\r\n [ngClass]=\"{'displayDropDownMenu': openDropDownMenu }\"\r\n id=\"dropdown-menuCanva\"\r\n role=\"menu\">\r\n <ng-scrollbar\r\n class=\"smallScroll\"\r\n >\r\n <div class=\"dropdown-content\">\r\n <div class=\"dropdownTitle\">\r\n <p>{{'ImgManager.CanvaBtn.createImg.title' | translate}}</p>\r\n </div>\r\n\r\n <div class=\"infoItem\">\r\n <p>{{'ImgManager.CanvaBtn.info' | translate}}</p>\r\n </div>\r\n\r\n <ng-container >\r\n <div\r\n *ngIf=\"expectedWidth && expectedHeight\"\r\n class=\"dropdown-item-wrapper\"\r\n >\r\n <div class=\"dropdown-item expectedSizes\" (click)=\"onOpenCanva(expectedWidth, expectedHeight)\">\r\n <p>{{'ImgManager.CanvaBtn.recommanded' | translate}}</p><p>{{expectedWidth}}*{{expectedHeight}}</p>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <div\r\n *ngFor=\"let format of availableFormat| keyvalue\"\r\n class=\"dropdown-item-wrapper\">\r\n <div\r\n (click)=\"onOpenCanva(format.value.width, format.value.height)\"\r\n class=\"dropdown-item\">\r\n <p>{{format.key | translate}}</p><p>{{format.value.width}}*{{format.value.height}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-scrollbar>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.NgScrollbar, selector: "ng-scrollbar", inputs: ["disabled", "sensorDisabled", "pointerEventsDisabled", "viewportPropagateMouseMove", "autoHeightDisabled", "autoWidthDisabled", "viewClass", "trackClass", "thumbClass", "minThumbSize", "trackClickScrollDuration", "pointerEventsMethod", "track", "visibility", "appearance", "position", "sensorDebounce", "scrollAuditTime"], outputs: ["updated"], exportAs: ["ngScrollbar"] }, { kind: "directive", type: LoadingDirective, selector: "[btnLoadingAnim]" }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }, { kind: "pipe", type: i2.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
|
|
2109
2178
|
}
|
|
2110
|
-
|
|
2111
|
-
CanvaBtnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CanvaBtnComponent, selector: "canva-btn", inputs: { stateDisplayed: "stateDisplayed" }, outputs: { showImgUploaded: "showImgUploaded" }, ngImport: i0, template: "<div class=\"canva dropdown is-right is-hoverable\"\r\n wzAutoHide (clickOutside)=\"openDropDownMenu = false;\"\r\n [ngClass]=\"{'is-up': stateDisplayed === 'small', 'noTooltip': stateDisplayed !== 'small'}\"\r\n >\r\n <div class=\"dropdown-trigger\">\r\n <div\r\n class=\"button canva-btn\"\r\n aria-controls=\"dropdown-menuCanva\"\r\n (click)=\"openDropDownMenu = true;\"\r\n >\r\n <span>{{'ImgManager.CanvaBtn.createImg' | translate}}</span>\r\n <img [src]=\"canvaLogoRouteAssets\" class=\"canva-btn__logo\">\r\n\r\n <span btnLoadingAnim class=\"btnLoadingAnnimation\" *ngIf=\"imgLoading\"></span>\r\n </div>\r\n </div>\r\n <div\r\n class=\"dropdown-menu dropDownShadow\"\r\n [ngClass]=\"{'displayDropDownMenu': openDropDownMenu }\"\r\n id=\"dropdown-menuCanva\"\r\n role=\"menu\">\r\n <ng-scrollbar\r\n class=\"smallScroll\"\r\n >\r\n <div class=\"dropdown-content\">\r\n <div class=\"dropdownTitle\">\r\n <p>{{'ImgManager.CanvaBtn.createImg.title' | translate}}</p>\r\n </div>\r\n\r\n <div class=\"infoItem\">\r\n <p>{{'ImgManager.CanvaBtn.info' | translate}}</p>\r\n </div>\r\n\r\n <ng-container >\r\n <div\r\n *ngIf=\"expectedWidth && expectedHeight\"\r\n class=\"dropdown-item-wrapper\"\r\n >\r\n <div class=\"dropdown-item expectedSizes\" (click)=\"onOpenCanva(expectedWidth, expectedHeight)\">\r\n <p>{{'ImgManager.CanvaBtn.recommanded' | translate}}</p><p>{{expectedWidth}}*{{expectedHeight}}</p>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <div\r\n *ngFor=\"let format of availableFormat| keyvalue\"\r\n class=\"dropdown-item-wrapper\">\r\n <div\r\n (click)=\"onOpenCanva(format.value.width, format.value.height)\"\r\n class=\"dropdown-item\">\r\n <p>{{format.key | translate}}</p><p>{{format.value.width}}*{{format.value.height}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-scrollbar>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.NgScrollbar, selector: "ng-scrollbar", inputs: ["disabled", "sensorDisabled", "pointerEventsDisabled", "viewportPropagateMouseMove", "autoHeightDisabled", "autoWidthDisabled", "viewClass", "trackClass", "thumbClass", "minThumbSize", "trackClickScrollDuration", "pointerEventsMethod", "track", "visibility", "appearance", "position", "sensorDebounce", "scrollAuditTime"], outputs: ["updated"], exportAs: ["ngScrollbar"] }, { kind: "directive", type: LoadingDirective, selector: "[btnLoadingAnim]" }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }, { kind: "pipe", type: i2.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
|
|
2112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CanvaBtnComponent, decorators: [{
|
|
2179
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: CanvaBtnComponent, decorators: [{
|
|
2113
2180
|
type: Component,
|
|
2114
2181
|
args: [{ selector: 'canva-btn', template: "<div class=\"canva dropdown is-right is-hoverable\"\r\n wzAutoHide (clickOutside)=\"openDropDownMenu = false;\"\r\n [ngClass]=\"{'is-up': stateDisplayed === 'small', 'noTooltip': stateDisplayed !== 'small'}\"\r\n >\r\n <div class=\"dropdown-trigger\">\r\n <div\r\n class=\"button canva-btn\"\r\n aria-controls=\"dropdown-menuCanva\"\r\n (click)=\"openDropDownMenu = true;\"\r\n >\r\n <span>{{'ImgManager.CanvaBtn.createImg' | translate}}</span>\r\n <img [src]=\"canvaLogoRouteAssets\" class=\"canva-btn__logo\">\r\n\r\n <span btnLoadingAnim class=\"btnLoadingAnnimation\" *ngIf=\"imgLoading\"></span>\r\n </div>\r\n </div>\r\n <div\r\n class=\"dropdown-menu dropDownShadow\"\r\n [ngClass]=\"{'displayDropDownMenu': openDropDownMenu }\"\r\n id=\"dropdown-menuCanva\"\r\n role=\"menu\">\r\n <ng-scrollbar\r\n class=\"smallScroll\"\r\n >\r\n <div class=\"dropdown-content\">\r\n <div class=\"dropdownTitle\">\r\n <p>{{'ImgManager.CanvaBtn.createImg.title' | translate}}</p>\r\n </div>\r\n\r\n <div class=\"infoItem\">\r\n <p>{{'ImgManager.CanvaBtn.info' | translate}}</p>\r\n </div>\r\n\r\n <ng-container >\r\n <div\r\n *ngIf=\"expectedWidth && expectedHeight\"\r\n class=\"dropdown-item-wrapper\"\r\n >\r\n <div class=\"dropdown-item expectedSizes\" (click)=\"onOpenCanva(expectedWidth, expectedHeight)\">\r\n <p>{{'ImgManager.CanvaBtn.recommanded' | translate}}</p><p>{{expectedWidth}}*{{expectedHeight}}</p>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <div\r\n *ngFor=\"let format of availableFormat| keyvalue\"\r\n class=\"dropdown-item-wrapper\">\r\n <div\r\n (click)=\"onOpenCanva(format.value.width, format.value.height)\"\r\n class=\"dropdown-item\">\r\n <p>{{format.key | translate}}</p><p>{{format.value.width}}*{{format.value.height}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-scrollbar>\r\n </div>\r\n</div>\r\n" }]
|
|
2115
|
-
}], ctorParameters:
|
|
2182
|
+
}], ctorParameters: () => [{ type: CanvaService }], propDecorators: { stateDisplayed: [{
|
|
2116
2183
|
type: Input
|
|
2117
2184
|
}], showImgUploaded: [{
|
|
2118
2185
|
type: Output
|
|
@@ -2131,10 +2198,10 @@ class PagniationIsLastPage {
|
|
|
2131
2198
|
}
|
|
2132
2199
|
return currentPage === Math.ceil(totalItems / itemsPerPage);
|
|
2133
2200
|
}
|
|
2201
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: PagniationIsLastPage, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2202
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: PagniationIsLastPage, name: "IsLastPage" });
|
|
2134
2203
|
}
|
|
2135
|
-
|
|
2136
|
-
PagniationIsLastPage.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: PagniationIsLastPage, name: "IsLastPage" });
|
|
2137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PagniationIsLastPage, decorators: [{
|
|
2204
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: PagniationIsLastPage, decorators: [{
|
|
2138
2205
|
type: Pipe,
|
|
2139
2206
|
args: [{
|
|
2140
2207
|
name: 'IsLastPage'
|
|
@@ -2157,10 +2224,10 @@ class PagniationArrayTotalPages {
|
|
|
2157
2224
|
.map(Number.call, Number)
|
|
2158
2225
|
.map((x) => x + 1);
|
|
2159
2226
|
}
|
|
2227
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: PagniationArrayTotalPages, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2228
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: PagniationArrayTotalPages, name: "ArrayTotalPages" });
|
|
2160
2229
|
}
|
|
2161
|
-
|
|
2162
|
-
PagniationArrayTotalPages.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: PagniationArrayTotalPages, name: "ArrayTotalPages" });
|
|
2163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PagniationArrayTotalPages, decorators: [{
|
|
2230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: PagniationArrayTotalPages, decorators: [{
|
|
2164
2231
|
type: Pipe,
|
|
2165
2232
|
args: [{
|
|
2166
2233
|
name: 'ArrayTotalPages'
|
|
@@ -2208,10 +2275,10 @@ class LargeNumberOfPagePipe {
|
|
|
2208
2275
|
}
|
|
2209
2276
|
return arrayWithPageNumber;
|
|
2210
2277
|
}
|
|
2278
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: LargeNumberOfPagePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2279
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: LargeNumberOfPagePipe, name: "LargeNumberOfPage" });
|
|
2211
2280
|
}
|
|
2212
|
-
|
|
2213
|
-
LargeNumberOfPagePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: LargeNumberOfPagePipe, name: "LargeNumberOfPage" });
|
|
2214
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LargeNumberOfPagePipe, decorators: [{
|
|
2281
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: LargeNumberOfPagePipe, decorators: [{
|
|
2215
2282
|
type: Pipe,
|
|
2216
2283
|
args: [{
|
|
2217
2284
|
name: 'LargeNumberOfPage'
|
|
@@ -2225,6 +2292,7 @@ class PageSelectorComponent {
|
|
|
2225
2292
|
get pagination() {
|
|
2226
2293
|
return this._pagination;
|
|
2227
2294
|
}
|
|
2295
|
+
_pagination;
|
|
2228
2296
|
set totalItems(totalItems) {
|
|
2229
2297
|
this.numberOfPage = Math.ceil(totalItems / this.pagination.itemsPerPage);
|
|
2230
2298
|
this.largeNumberOfPage = this.numberOfPage > 30;
|
|
@@ -2232,12 +2300,12 @@ class PageSelectorComponent {
|
|
|
2232
2300
|
get totalItems() {
|
|
2233
2301
|
return this._totalItems;
|
|
2234
2302
|
}
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
}
|
|
2303
|
+
_totalItems;
|
|
2304
|
+
openAbsoluteSelect = false;
|
|
2305
|
+
largeNumberOfPage = false;
|
|
2306
|
+
numberOfPage = 0;
|
|
2307
|
+
pageChange = new EventEmitter();
|
|
2308
|
+
constructor() { }
|
|
2241
2309
|
onGotoPageChange(event, directValue) {
|
|
2242
2310
|
if (directValue) {
|
|
2243
2311
|
this.pageChange.emit(event);
|
|
@@ -2247,13 +2315,13 @@ class PageSelectorComponent {
|
|
|
2247
2315
|
this.pageChange.emit(parseInt(event.target.value));
|
|
2248
2316
|
}
|
|
2249
2317
|
}
|
|
2318
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: PageSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2319
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: PageSelectorComponent, selector: "wz-page-selector", inputs: { pagination: "pagination", totalItems: "totalItems" }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<div class=\"wz-selector\">\r\n\r\n <div class=\"wz-selector__default\" [ngStyle]=\"{'width': 40 + (10*pagination.currentPage.toString().length) + 'px'}\">\r\n <div class=\"wz-selector__default__base\" *ngIf=\"largeNumberOfPage;\" (click)=\"openAbsoluteSelect = !openAbsoluteSelect\">\r\n <input name=\"page-input\" [value]=\"pagination.currentPage\" (change)=\"onGotoPageChange($event, false);openAbsoluteSelect = false;\" [ngStyle]=\"{'width': 40 + (10*pagination.currentPage.toString().length) + 'px'}\" />\r\n <i class=\"fa-solid fa-sort-down\"></i>\r\n </div>\r\n <div class=\"wz-selector__default__absolute\" *ngIf=\"openAbsoluteSelect\">\r\n <div class=\"wz-selector__default__absolute__wrapper\" *ngFor=\"let pageIndex of (pagination.totalItems | LargeNumberOfPage: pagination.itemsPerPage : pagination.currentPage).slice().reverse() as result\">\r\n <div class=\"wz-selector__default__absolute__wrapper__item\" [ngClass]=\"{'selected': pageIndex.value === pagination.currentPage}\" (click)=\"onGotoPageChange(pageIndex.value, true)\">\r\n <span>{{ pageIndex.display }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-container *ngIf=\"!largeNumberOfPage\">\r\n <select name=\"page\" (change)=\"onGotoPageChange($event, false)\" [ngStyle]=\"{'width': 40 + (10*pagination.currentPage.toString().length) + 'px'}\">\r\n <ng-container *ngFor=\"let pageIndex of pagination.totalItems | ArrayTotalPages: pagination.itemsPerPage\">\r\n <option [selected]=\"pageIndex === pagination.currentPage\" [value]=\"pageIndex\">\r\n {{ pageIndex }}\r\n </option>\r\n </ng-container>\r\n </select>\r\n </ng-container>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "pipe", type: PagniationArrayTotalPages, name: "ArrayTotalPages" }, { kind: "pipe", type: LargeNumberOfPagePipe, name: "LargeNumberOfPage" }] });
|
|
2250
2320
|
}
|
|
2251
|
-
|
|
2252
|
-
PageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PageSelectorComponent, selector: "wz-page-selector", inputs: { pagination: "pagination", totalItems: "totalItems" }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<div class=\"wz-selector\">\r\n\r\n <div class=\"wz-selector__default\" [ngStyle]=\"{'width': 40 + (10*pagination.currentPage.toString().length) + 'px'}\">\r\n <div class=\"wz-selector__default__base\" *ngIf=\"largeNumberOfPage;\" (click)=\"openAbsoluteSelect = !openAbsoluteSelect\">\r\n <input name=\"page-input\" [value]=\"pagination.currentPage\" (change)=\"onGotoPageChange($event, false);openAbsoluteSelect = false;\" [ngStyle]=\"{'width': 40 + (10*pagination.currentPage.toString().length) + 'px'}\" />\r\n <i class=\"fa-solid fa-sort-down\"></i>\r\n </div>\r\n <div class=\"wz-selector__default__absolute\" *ngIf=\"openAbsoluteSelect\">\r\n <div class=\"wz-selector__default__absolute__wrapper\" *ngFor=\"let pageIndex of (pagination.totalItems | LargeNumberOfPage: pagination.itemsPerPage : pagination.currentPage).slice().reverse() as result\">\r\n <div class=\"wz-selector__default__absolute__wrapper__item\" [ngClass]=\"{'selected': pageIndex.value === pagination.currentPage}\" (click)=\"onGotoPageChange(pageIndex.value, true)\">\r\n <span>{{ pageIndex.display }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-container *ngIf=\"!largeNumberOfPage\">\r\n <select name=\"page\" (change)=\"onGotoPageChange($event, false)\" [ngStyle]=\"{'width': 40 + (10*pagination.currentPage.toString().length) + 'px'}\">\r\n <ng-container *ngFor=\"let pageIndex of pagination.totalItems | ArrayTotalPages: pagination.itemsPerPage\">\r\n <option [selected]=\"pageIndex === pagination.currentPage\" [value]=\"pageIndex\">\r\n {{ pageIndex }}\r\n </option>\r\n </ng-container>\r\n </select>\r\n </ng-container>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "pipe", type: PagniationArrayTotalPages, name: "ArrayTotalPages" }, { kind: "pipe", type: LargeNumberOfPagePipe, name: "LargeNumberOfPage" }] });
|
|
2253
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PageSelectorComponent, decorators: [{
|
|
2321
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: PageSelectorComponent, decorators: [{
|
|
2254
2322
|
type: Component,
|
|
2255
2323
|
args: [{ selector: 'wz-page-selector', template: "<div class=\"wz-selector\">\r\n\r\n <div class=\"wz-selector__default\" [ngStyle]=\"{'width': 40 + (10*pagination.currentPage.toString().length) + 'px'}\">\r\n <div class=\"wz-selector__default__base\" *ngIf=\"largeNumberOfPage;\" (click)=\"openAbsoluteSelect = !openAbsoluteSelect\">\r\n <input name=\"page-input\" [value]=\"pagination.currentPage\" (change)=\"onGotoPageChange($event, false);openAbsoluteSelect = false;\" [ngStyle]=\"{'width': 40 + (10*pagination.currentPage.toString().length) + 'px'}\" />\r\n <i class=\"fa-solid fa-sort-down\"></i>\r\n </div>\r\n <div class=\"wz-selector__default__absolute\" *ngIf=\"openAbsoluteSelect\">\r\n <div class=\"wz-selector__default__absolute__wrapper\" *ngFor=\"let pageIndex of (pagination.totalItems | LargeNumberOfPage: pagination.itemsPerPage : pagination.currentPage).slice().reverse() as result\">\r\n <div class=\"wz-selector__default__absolute__wrapper__item\" [ngClass]=\"{'selected': pageIndex.value === pagination.currentPage}\" (click)=\"onGotoPageChange(pageIndex.value, true)\">\r\n <span>{{ pageIndex.display }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-container *ngIf=\"!largeNumberOfPage\">\r\n <select name=\"page\" (change)=\"onGotoPageChange($event, false)\" [ngStyle]=\"{'width': 40 + (10*pagination.currentPage.toString().length) + 'px'}\">\r\n <ng-container *ngFor=\"let pageIndex of pagination.totalItems | ArrayTotalPages: pagination.itemsPerPage\">\r\n <option [selected]=\"pageIndex === pagination.currentPage\" [value]=\"pageIndex\">\r\n {{ pageIndex }}\r\n </option>\r\n </ng-container>\r\n </select>\r\n </ng-container>\r\n</div>\r\n" }]
|
|
2256
|
-
}], ctorParameters:
|
|
2324
|
+
}], ctorParameters: () => [], propDecorators: { pagination: [{
|
|
2257
2325
|
type: Input
|
|
2258
2326
|
}], totalItems: [{
|
|
2259
2327
|
type: Input
|
|
@@ -2262,6 +2330,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2262
2330
|
}] } });
|
|
2263
2331
|
|
|
2264
2332
|
class PagniationText {
|
|
2333
|
+
translateService;
|
|
2265
2334
|
constructor(translateService) {
|
|
2266
2335
|
this.translateService = translateService;
|
|
2267
2336
|
}
|
|
@@ -2282,15 +2351,15 @@ class PagniationText {
|
|
|
2282
2351
|
}
|
|
2283
2352
|
return this.translateService.instant('PaginationComponent.on', { low: currentItemsLow, high: currentItemsHigh, total: totalItems });
|
|
2284
2353
|
}
|
|
2354
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: PagniationText, deps: [{ token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2355
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: PagniationText, name: "customPagniationText" });
|
|
2285
2356
|
}
|
|
2286
|
-
|
|
2287
|
-
PagniationText.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: PagniationText, name: "customPagniationText" });
|
|
2288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PagniationText, decorators: [{
|
|
2357
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: PagniationText, decorators: [{
|
|
2289
2358
|
type: Pipe,
|
|
2290
2359
|
args: [{
|
|
2291
2360
|
name: 'customPagniationText'
|
|
2292
2361
|
}]
|
|
2293
|
-
}], ctorParameters:
|
|
2362
|
+
}], ctorParameters: () => [{ type: i3.TranslateService }] });
|
|
2294
2363
|
|
|
2295
2364
|
class PaginationComponent {
|
|
2296
2365
|
set pagination(pagination) {
|
|
@@ -2299,9 +2368,9 @@ class PaginationComponent {
|
|
|
2299
2368
|
get pagination() {
|
|
2300
2369
|
return this._pagination;
|
|
2301
2370
|
}
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
}
|
|
2371
|
+
_pagination;
|
|
2372
|
+
pageChange = new EventEmitter();
|
|
2373
|
+
constructor() { }
|
|
2305
2374
|
decrementPage() {
|
|
2306
2375
|
if (this.pagination.currentPage <= 1) {
|
|
2307
2376
|
return;
|
|
@@ -2321,13 +2390,13 @@ class PaginationComponent {
|
|
|
2321
2390
|
this.pagination.currentPage = parseInt(pageNumber);
|
|
2322
2391
|
this.pageChange.emit(this.pagination);
|
|
2323
2392
|
}
|
|
2393
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2394
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: PaginationComponent, selector: "wz-pagination", inputs: { pagination: "pagination" }, outputs: { pageChange: "pageChange" }, ngImport: i0, 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 <wz-page-selector [pagination]=\"pagination\" [totalItems]=\"pagination.totalItems\" (pageChange)=\"onGotoPageChange($event)\"></wz-page-selector>\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", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PageSelectorComponent, selector: "wz-page-selector", inputs: ["pagination", "totalItems"], outputs: ["pageChange"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: PagniationIsLastPage, name: "IsLastPage" }, { kind: "pipe", type: PagniationText, name: "customPagniationText" }] });
|
|
2324
2395
|
}
|
|
2325
|
-
|
|
2326
|
-
PaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PaginationComponent, selector: "wz-pagination", inputs: { pagination: "pagination" }, outputs: { pageChange: "pageChange" }, ngImport: i0, 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 <wz-page-selector [pagination]=\"pagination\" [totalItems]=\"pagination.totalItems\" (pageChange)=\"onGotoPageChange($event)\"></wz-page-selector>\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", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PageSelectorComponent, selector: "wz-page-selector", inputs: ["pagination", "totalItems"], outputs: ["pageChange"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: PagniationIsLastPage, name: "IsLastPage" }, { kind: "pipe", type: PagniationText, name: "customPagniationText" }] });
|
|
2327
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
2396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
2328
2397
|
type: Component,
|
|
2329
2398
|
args: [{ selector: 'wz-pagination', 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 <wz-page-selector [pagination]=\"pagination\" [totalItems]=\"pagination.totalItems\" (pageChange)=\"onGotoPageChange($event)\"></wz-page-selector>\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" }]
|
|
2330
|
-
}], ctorParameters:
|
|
2399
|
+
}], ctorParameters: () => [], propDecorators: { pagination: [{
|
|
2331
2400
|
type: Input
|
|
2332
2401
|
}], pageChange: [{
|
|
2333
2402
|
type: Output
|
|
@@ -2337,10 +2406,10 @@ class NumberToArray {
|
|
|
2337
2406
|
transform(number) {
|
|
2338
2407
|
return Array.from('x'.repeat(number));
|
|
2339
2408
|
}
|
|
2409
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: NumberToArray, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2410
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: NumberToArray, name: "numberToArray" });
|
|
2340
2411
|
}
|
|
2341
|
-
|
|
2342
|
-
NumberToArray.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: NumberToArray, name: "numberToArray" });
|
|
2343
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NumberToArray, decorators: [{
|
|
2412
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: NumberToArray, decorators: [{
|
|
2344
2413
|
type: Pipe,
|
|
2345
2414
|
args: [{
|
|
2346
2415
|
name: 'numberToArray'
|
|
@@ -2348,10 +2417,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2348
2417
|
}] });
|
|
2349
2418
|
|
|
2350
2419
|
class MosaicViewComponent extends ImagesActionHandler {
|
|
2420
|
+
tabDisplayed;
|
|
2421
|
+
fullSize;
|
|
2422
|
+
nbFakeImg = 0;
|
|
2423
|
+
switchDisplayWindow = new EventEmitter();
|
|
2351
2424
|
constructor(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, apiService) {
|
|
2352
2425
|
super(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, apiService);
|
|
2353
|
-
this.nbFakeImg = 0;
|
|
2354
|
-
this.switchDisplayWindow = new EventEmitter();
|
|
2355
2426
|
}
|
|
2356
2427
|
ngOnInit() {
|
|
2357
2428
|
}
|
|
@@ -2371,17 +2442,17 @@ class MosaicViewComponent extends ImagesActionHandler {
|
|
|
2371
2442
|
trackById(index, picture) {
|
|
2372
2443
|
return picture.id;
|
|
2373
2444
|
}
|
|
2445
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: MosaicViewComponent, deps: [{ token: ImgManagerService }, { token: ImgSelectionService }, { token: i3$1.HttpClient }, { token: ImgCDNService }, { token: ImgEventService }, { token: AlertService }, { token: i3.TranslateService }, { token: ApiService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2446
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: MosaicViewComponent, selector: "mosaic-view", inputs: { tabDisplayed: "tabDisplayed", fullSize: "fullSize", nbFakeImg: "nbFakeImg" }, outputs: { switchDisplayWindow: "switchDisplayWindow" }, usesInheritance: true, ngImport: i0, template: "<div class=\"mosaic\" [ngClass]=\"{'fullSize': fullSize, 'small': stateDisplayed === 'small', 'mosaic--displayPexelsImg': displayPexelsResults}\">\r\n <!-- Search section -->\r\n <div\r\n class=\"mosaic__search\"\r\n [ngClass]=\"{'mosaic__search--small': stateDisplayed === 'small'}\"\r\n *ngIf=\"tabDisplayed !== 'img-upload'\">\r\n <wz-input-search\r\n [(ngModel)]=\"tableFilters.searchValue\"\r\n (changeDebounced)=\"onSearchChange($event)\"\r\n [placeholder]=\"'ImgManager.SearchBar.placeholder' | translate\"\r\n [smallPadding]=\"stateDisplayed === 'small'\"\r\n ></wz-input-search>\r\n </div>\r\n\r\n <!-- Cards section -->\r\n <div\r\n class=\"mosaic__container__cards\"\r\n [ngClass]=\"{'mosaic__container__cards--padding': stateDisplayed !== 'window'}\"\r\n [@listAnimation]=\"picturesList.length\"\r\n *ngIf=\"!isLoading && !displayPexelsResults\"\r\n >\r\n <img-card\r\n *ngFor=\"let picture of picturesList; let index = index; trackBy: trackById \"\r\n [picture]=\"picture\"\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [tabDisplayed]=\"tabDisplayed\"\r\n [disable]=\"disable\"\r\n (toggleImgSelected)=\"onToggleSelectImg(index)\"\r\n (pictureNameChange)=\"onCardRenamePicture($event)\"\r\n (switchDisplayWindow)=\"switchDisplayWindowCard()\"\r\n [fullSize]=\"fullSize\"\r\n ></img-card>\r\n <div\r\n *ngFor=\"let fakeImg of nbFakeImg | numberToArray\"\r\n class=\"mosaic__container__cards__fakeImg\"\r\n [ngClass]=\"{'mosaic__container__cards__fakeImg--smallFakeImg': stateDisplayed === 'small' || tabDisplayed === 'img-upload'}\">\r\n </div>\r\n </div>\r\n\r\n <!-- Loader section -->\r\n <div class=\"mosaic__container__loader\" *ngIf=\"isLoading\">\r\n <wz-loader [small]=\"true\"></wz-loader>\r\n </div>\r\n\r\n <!-- Pagination section -->\r\n <div class=\"mosaic__pagination\" *ngIf=\"picturesList.length && tabDisplayed !== 'img-upload' && !displayPexelsResults\" >\r\n <wz-pagination\r\n [pagination]=\"tableFilters\"\r\n (pageChange)=\"onFiltersChange()\"\r\n >\r\n </wz-pagination>\r\n </div>\r\n\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ImgCardComponent, selector: "img-card", inputs: ["tabDisplayed", "fullSize", "picture", "index"], outputs: ["toggleImgSelected", "switchDisplayWindow"] }, { kind: "component", type: LoaderComponent, selector: "wz-loader", inputs: ["text", "small", "position"] }, { kind: "component", type: InputSearchComponent, selector: "wz-input-search", inputs: ["placeholder", "smallPadding", "id"], outputs: ["changeDebounced"] }, { kind: "component", type: PaginationComponent, selector: "wz-pagination", inputs: ["pagination"], outputs: ["pageChange"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: NumberToArray, name: "numberToArray" }], animations: [
|
|
2447
|
+
listAnnimation
|
|
2448
|
+
] });
|
|
2374
2449
|
}
|
|
2375
|
-
|
|
2376
|
-
MosaicViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MosaicViewComponent, selector: "mosaic-view", inputs: { tabDisplayed: "tabDisplayed", fullSize: "fullSize", nbFakeImg: "nbFakeImg" }, outputs: { switchDisplayWindow: "switchDisplayWindow" }, usesInheritance: true, ngImport: i0, template: "<div class=\"mosaic\" [ngClass]=\"{'fullSize': fullSize, 'small': stateDisplayed === 'small', 'mosaic--displayPexelsImg': displayPexelsResults}\">\r\n <!-- Search section -->\r\n <div\r\n class=\"mosaic__search\"\r\n [ngClass]=\"{'mosaic__search--small': stateDisplayed === 'small'}\"\r\n *ngIf=\"tabDisplayed !== 'img-upload'\">\r\n <wz-input-search\r\n [(ngModel)]=\"tableFilters.searchValue\"\r\n (changeDebounced)=\"onSearchChange($event)\"\r\n [placeholder]=\"'ImgManager.SearchBar.placeholder' | translate\"\r\n [smallPadding]=\"stateDisplayed === 'small'\"\r\n ></wz-input-search>\r\n </div>\r\n\r\n <!-- Cards section -->\r\n <div\r\n class=\"mosaic__container__cards\"\r\n [ngClass]=\"{'mosaic__container__cards--padding': stateDisplayed !== 'window'}\"\r\n [@listAnimation]=\"picturesList.length\"\r\n *ngIf=\"!isLoading && !displayPexelsResults\"\r\n >\r\n <img-card\r\n *ngFor=\"let picture of picturesList; let index = index; trackBy: trackById \"\r\n [picture]=\"picture\"\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [tabDisplayed]=\"tabDisplayed\"\r\n [disable]=\"disable\"\r\n (toggleImgSelected)=\"onToggleSelectImg(index)\"\r\n (pictureNameChange)=\"onCardRenamePicture($event)\"\r\n (switchDisplayWindow)=\"switchDisplayWindowCard()\"\r\n [fullSize]=\"fullSize\"\r\n ></img-card>\r\n <div\r\n *ngFor=\"let fakeImg of nbFakeImg | numberToArray\"\r\n class=\"mosaic__container__cards__fakeImg\"\r\n [ngClass]=\"{'mosaic__container__cards__fakeImg--smallFakeImg': stateDisplayed === 'small' || tabDisplayed === 'img-upload'}\">\r\n </div>\r\n </div>\r\n\r\n <!-- Loader section -->\r\n <div class=\"mosaic__container__loader\" *ngIf=\"isLoading\">\r\n <wz-loader [small]=\"true\"></wz-loader>\r\n </div>\r\n\r\n <!-- Pagination section -->\r\n <div class=\"mosaic__pagination\" *ngIf=\"picturesList.length && tabDisplayed !== 'img-upload' && !displayPexelsResults\" >\r\n <wz-pagination\r\n [pagination]=\"tableFilters\"\r\n (pageChange)=\"onFiltersChange()\"\r\n >\r\n </wz-pagination>\r\n </div>\r\n\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ImgCardComponent, selector: "img-card", inputs: ["tabDisplayed", "fullSize", "picture", "index"], outputs: ["toggleImgSelected", "switchDisplayWindow"] }, { kind: "component", type: LoaderComponent, selector: "wz-loader", inputs: ["text", "small", "position"] }, { kind: "component", type: InputSearchComponent, selector: "wz-input-search", inputs: ["placeholder", "smallPadding", "id"], outputs: ["changeDebounced"] }, { kind: "component", type: PaginationComponent, selector: "wz-pagination", inputs: ["pagination"], outputs: ["pageChange"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: NumberToArray, name: "numberToArray" }], animations: [
|
|
2377
|
-
listAnnimation
|
|
2378
|
-
] });
|
|
2379
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MosaicViewComponent, decorators: [{
|
|
2450
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: MosaicViewComponent, decorators: [{
|
|
2380
2451
|
type: Component,
|
|
2381
2452
|
args: [{ selector: 'mosaic-view', animations: [
|
|
2382
2453
|
listAnnimation
|
|
2383
2454
|
], template: "<div class=\"mosaic\" [ngClass]=\"{'fullSize': fullSize, 'small': stateDisplayed === 'small', 'mosaic--displayPexelsImg': displayPexelsResults}\">\r\n <!-- Search section -->\r\n <div\r\n class=\"mosaic__search\"\r\n [ngClass]=\"{'mosaic__search--small': stateDisplayed === 'small'}\"\r\n *ngIf=\"tabDisplayed !== 'img-upload'\">\r\n <wz-input-search\r\n [(ngModel)]=\"tableFilters.searchValue\"\r\n (changeDebounced)=\"onSearchChange($event)\"\r\n [placeholder]=\"'ImgManager.SearchBar.placeholder' | translate\"\r\n [smallPadding]=\"stateDisplayed === 'small'\"\r\n ></wz-input-search>\r\n </div>\r\n\r\n <!-- Cards section -->\r\n <div\r\n class=\"mosaic__container__cards\"\r\n [ngClass]=\"{'mosaic__container__cards--padding': stateDisplayed !== 'window'}\"\r\n [@listAnimation]=\"picturesList.length\"\r\n *ngIf=\"!isLoading && !displayPexelsResults\"\r\n >\r\n <img-card\r\n *ngFor=\"let picture of picturesList; let index = index; trackBy: trackById \"\r\n [picture]=\"picture\"\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [tabDisplayed]=\"tabDisplayed\"\r\n [disable]=\"disable\"\r\n (toggleImgSelected)=\"onToggleSelectImg(index)\"\r\n (pictureNameChange)=\"onCardRenamePicture($event)\"\r\n (switchDisplayWindow)=\"switchDisplayWindowCard()\"\r\n [fullSize]=\"fullSize\"\r\n ></img-card>\r\n <div\r\n *ngFor=\"let fakeImg of nbFakeImg | numberToArray\"\r\n class=\"mosaic__container__cards__fakeImg\"\r\n [ngClass]=\"{'mosaic__container__cards__fakeImg--smallFakeImg': stateDisplayed === 'small' || tabDisplayed === 'img-upload'}\">\r\n </div>\r\n </div>\r\n\r\n <!-- Loader section -->\r\n <div class=\"mosaic__container__loader\" *ngIf=\"isLoading\">\r\n <wz-loader [small]=\"true\"></wz-loader>\r\n </div>\r\n\r\n <!-- Pagination section -->\r\n <div class=\"mosaic__pagination\" *ngIf=\"picturesList.length && tabDisplayed !== 'img-upload' && !displayPexelsResults\" >\r\n <wz-pagination\r\n [pagination]=\"tableFilters\"\r\n (pageChange)=\"onFiltersChange()\"\r\n >\r\n </wz-pagination>\r\n </div>\r\n\r\n</div>\r\n" }]
|
|
2384
|
-
}], ctorParameters:
|
|
2455
|
+
}], ctorParameters: () => [{ type: ImgManagerService }, { type: ImgSelectionService }, { type: i3$1.HttpClient }, { type: ImgCDNService }, { type: ImgEventService }, { type: AlertService }, { type: i3.TranslateService }, { type: ApiService }], propDecorators: { tabDisplayed: [{
|
|
2385
2456
|
type: Input
|
|
2386
2457
|
}], fullSize: [{
|
|
2387
2458
|
type: Input
|
|
@@ -2392,18 +2463,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2392
2463
|
}] } });
|
|
2393
2464
|
|
|
2394
2465
|
class FiltersTableService {
|
|
2466
|
+
filterRoutingBuilder;
|
|
2467
|
+
filterGroups = new Map();
|
|
2468
|
+
dataTableFilters = {
|
|
2469
|
+
sort: undefined,
|
|
2470
|
+
order: undefined,
|
|
2471
|
+
searchValue: undefined,
|
|
2472
|
+
totalItems: 0,
|
|
2473
|
+
itemsPerPage: 0,
|
|
2474
|
+
currentPage: 0
|
|
2475
|
+
};
|
|
2476
|
+
sortSubject = new Subject();
|
|
2395
2477
|
constructor(filterRoutingBuilder) {
|
|
2396
2478
|
this.filterRoutingBuilder = filterRoutingBuilder;
|
|
2397
|
-
this.filterGroups = new Map();
|
|
2398
|
-
this.dataTableFilters = {
|
|
2399
|
-
sort: undefined,
|
|
2400
|
-
order: undefined,
|
|
2401
|
-
searchValue: undefined,
|
|
2402
|
-
totalItems: 0,
|
|
2403
|
-
itemsPerPage: 0,
|
|
2404
|
-
currentPage: 0
|
|
2405
|
-
};
|
|
2406
|
-
this.sortSubject = new Subject();
|
|
2407
2479
|
}
|
|
2408
2480
|
getTableFilterGroup(dataTableName) {
|
|
2409
2481
|
if (this.filterGroups.has(dataTableName)) {
|
|
@@ -2439,21 +2511,25 @@ class FiltersTableService {
|
|
|
2439
2511
|
currentPage: filterGroup.get('currentPage') ? parseInt(filterGroup.get('currentPage')) : currentPage
|
|
2440
2512
|
});
|
|
2441
2513
|
}
|
|
2514
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: FiltersTableService, deps: [{ token: i1.NwbFilterRoutingBuilder }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2515
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: FiltersTableService });
|
|
2442
2516
|
}
|
|
2443
|
-
|
|
2444
|
-
FiltersTableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FiltersTableService });
|
|
2445
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FiltersTableService, decorators: [{
|
|
2517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: FiltersTableService, decorators: [{
|
|
2446
2518
|
type: Injectable
|
|
2447
|
-
}], ctorParameters:
|
|
2519
|
+
}], ctorParameters: () => [{ type: i1.NwbFilterRoutingBuilder }] });
|
|
2448
2520
|
|
|
2449
2521
|
class CheckboxComponent {
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2522
|
+
label = '';
|
|
2523
|
+
value;
|
|
2524
|
+
type;
|
|
2525
|
+
alone = false;
|
|
2526
|
+
checked = false;
|
|
2527
|
+
id = '';
|
|
2528
|
+
name;
|
|
2529
|
+
disabled = false;
|
|
2530
|
+
constructor() { }
|
|
2531
|
+
_onChange;
|
|
2532
|
+
_onTouched;
|
|
2457
2533
|
registerOnChange(fn) {
|
|
2458
2534
|
this._onChange = fn;
|
|
2459
2535
|
}
|
|
@@ -2471,13 +2547,13 @@ class CheckboxComponent {
|
|
|
2471
2547
|
this._onChange(value);
|
|
2472
2548
|
}
|
|
2473
2549
|
}
|
|
2550
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2551
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: CheckboxComponent, selector: "wz-checkbox", inputs: { label: "label", value: "value", type: "type", alone: "alone", checked: "checked", id: "id", name: "name" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }], ngImport: i0, template: "<div class=\"checkBoxField field\" [ngClass]=\"{ 'field--nowrap': type === 'column', alone: alone }\">\n <div class=\"field__row\">\n <input\n type=\"checkbox\"\n [id]=\"id\"\n class=\"is-checkradio\"\n [name]=\"name\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n [checked]=\"checked\"\n (ngModelChange)=\"onChange($event)\"\n />\n <label [attr.for]=\"id\">{{ label }}</label>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
2474
2552
|
}
|
|
2475
|
-
|
|
2476
|
-
CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CheckboxComponent, selector: "wz-checkbox", inputs: { label: "label", value: "value", type: "type", alone: "alone", checked: "checked", id: "id", name: "name" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }], ngImport: i0, template: "<div class=\"checkBoxField field\" [ngClass]=\"{ 'field--nowrap': type === 'column', alone: alone }\">\n <div class=\"field__row\">\n <input\n type=\"checkbox\"\n [id]=\"id\"\n class=\"is-checkradio\"\n [name]=\"name\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n [checked]=\"checked\"\n (ngModelChange)=\"onChange($event)\"\n />\n <label [attr.for]=\"id\">{{ label }}</label>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
2477
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
2553
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
2478
2554
|
type: Component,
|
|
2479
2555
|
args: [{ selector: 'wz-checkbox', encapsulation: ViewEncapsulation.None, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }], template: "<div class=\"checkBoxField field\" [ngClass]=\"{ 'field--nowrap': type === 'column', alone: alone }\">\n <div class=\"field__row\">\n <input\n type=\"checkbox\"\n [id]=\"id\"\n class=\"is-checkradio\"\n [name]=\"name\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n [checked]=\"checked\"\n (ngModelChange)=\"onChange($event)\"\n />\n <label [attr.for]=\"id\">{{ label }}</label>\n </div>\n</div>\n" }]
|
|
2480
|
-
}], ctorParameters:
|
|
2556
|
+
}], ctorParameters: () => [], propDecorators: { label: [{
|
|
2481
2557
|
type: Input
|
|
2482
2558
|
}], value: [{
|
|
2483
2559
|
type: Input
|
|
@@ -2494,22 +2570,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2494
2570
|
}] } });
|
|
2495
2571
|
|
|
2496
2572
|
class TableComponent {
|
|
2573
|
+
filtersTableService;
|
|
2574
|
+
/// Input/Output of table filters ///
|
|
2575
|
+
tableFilters;
|
|
2576
|
+
tableFiltersChange = new EventEmitter();
|
|
2577
|
+
tableRoutingName; // Name of the table
|
|
2578
|
+
placeholder = '';
|
|
2579
|
+
_filterGroup;
|
|
2580
|
+
/// Input/Output of checkbox ///
|
|
2581
|
+
/** Pass to true to display checkbox in the header table */
|
|
2582
|
+
checkbox = false;
|
|
2583
|
+
/** Emit new header checboxValue */
|
|
2584
|
+
toggleAllCheckBox = new EventEmitter();
|
|
2585
|
+
/// Input to disable section ///
|
|
2586
|
+
/** Pass to true to hide search input */
|
|
2587
|
+
disableSearch = false;
|
|
2588
|
+
/** Pass to true to hide the pagniator */
|
|
2589
|
+
disablePagniation = false;
|
|
2590
|
+
/// Input for loader on table body ///
|
|
2591
|
+
isLoading = false;
|
|
2592
|
+
/// Private variables ///
|
|
2593
|
+
headerCheckBoxId;
|
|
2594
|
+
filterGroupChangeSub;
|
|
2497
2595
|
constructor(filtersTableService) {
|
|
2498
2596
|
this.filtersTableService = filtersTableService;
|
|
2499
|
-
this.tableFiltersChange = new EventEmitter();
|
|
2500
|
-
this.placeholder = '';
|
|
2501
|
-
/// Input/Output of checkbox ///
|
|
2502
|
-
/** Pass to true to display checkbox in the header table */
|
|
2503
|
-
this.checkbox = false;
|
|
2504
|
-
/** Emit new header checboxValue */
|
|
2505
|
-
this.toggleAllCheckBox = new EventEmitter();
|
|
2506
|
-
/// Input to disable section ///
|
|
2507
|
-
/** Pass to true to hide search input */
|
|
2508
|
-
this.disableSearch = false;
|
|
2509
|
-
/** Pass to true to hide the pagniator */
|
|
2510
|
-
this.disablePagniation = false;
|
|
2511
|
-
/// Input for loader on table body ///
|
|
2512
|
-
this.isLoading = false;
|
|
2513
2597
|
}
|
|
2514
2598
|
ngOnInit() {
|
|
2515
2599
|
this.headerCheckBoxId = v4(); // Create checkbox unique id
|
|
@@ -2572,13 +2656,13 @@ class TableComponent {
|
|
|
2572
2656
|
this.filterGroupChangeSub.unsubscribe();
|
|
2573
2657
|
}
|
|
2574
2658
|
}
|
|
2659
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: TableComponent, deps: [{ token: FiltersTableService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2660
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: TableComponent, selector: "wz-table", inputs: { tableFilters: "tableFilters", tableRoutingName: "tableRoutingName", placeholder: "placeholder", checkbox: "checkbox", disableSearch: "disableSearch", disablePagniation: "disablePagniation", isLoading: "isLoading" }, outputs: { tableFiltersChange: "tableFiltersChange", toggleAllCheckBox: "toggleAllCheckBox" }, ngImport: i0, template: "<div class=\"wz-table\">\n <!-- Header section -->\n <div class=\"wz-table__head\" id=\"headerTable\">\n <div *ngIf=\"checkbox\" class=\"wz-table__head__cell wz-table__head__cell--checkbox\">\n <wz-checkbox [id]=\"headerCheckBoxId\" (change)=\"onToggleAllCheckBox($event)\" [alone]=\"true\"></wz-checkbox>\n </div>\n\n <!-- Header contents are added with the headerCell directive -->\n <ng-content select=\"[headerCell]\"></ng-content>\n </div>\n\n <!-- Search section -->\n <div *ngIf=\"!disableSearch\" class=\"wz-table__search\">\n <wz-input-search\n [(ngModel)]=\"tableFilters.searchValue\"\n (changeDebounced)=\"searchChange($event)\"\n [placeholder]=\"placeholder\"\n [smallPadding]=\"true\"\n ></wz-input-search>\n </div>\n\n <!-- Body section -->\n <div class=\"wz-table__body\">\n <!-- Loader on body -->\n <div class=\"wz-table__body__loader\" *ngIf=\"isLoading\">\n <wz-loader [small]=\"true\"></wz-loader>\n </div>\n <!-- Body contents are added with the tableRow directive -->\n <ng-content select=\"[tableRow]\" *ngIf=\"!isLoading\"></ng-content>\n </div>\n\n <!-- Pagination section -->\n <wz-pagination *ngIf=\"!disablePagniation\" [pagination]=\"tableFilters\" (pageChange)=\"pageChange()\"></wz-pagination>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: LoaderComponent, selector: "wz-loader", inputs: ["text", "small", "position"] }, { kind: "component", type: InputSearchComponent, selector: "wz-input-search", inputs: ["placeholder", "smallPadding", "id"], outputs: ["changeDebounced"] }, { kind: "component", type: PaginationComponent, selector: "wz-pagination", inputs: ["pagination"], outputs: ["pageChange"] }, { kind: "component", type: CheckboxComponent, selector: "wz-checkbox", inputs: ["label", "value", "type", "alone", "checked", "id", "name"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
2575
2661
|
}
|
|
2576
|
-
|
|
2577
|
-
TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TableComponent, selector: "wz-table", inputs: { tableFilters: "tableFilters", tableRoutingName: "tableRoutingName", placeholder: "placeholder", checkbox: "checkbox", disableSearch: "disableSearch", disablePagniation: "disablePagniation", isLoading: "isLoading" }, outputs: { tableFiltersChange: "tableFiltersChange", toggleAllCheckBox: "toggleAllCheckBox" }, ngImport: i0, template: "<div class=\"wz-table\">\n <!-- Header section -->\n <div class=\"wz-table__head\" id=\"headerTable\">\n <div *ngIf=\"checkbox\" class=\"wz-table__head__cell wz-table__head__cell--checkbox\">\n <wz-checkbox [id]=\"headerCheckBoxId\" (change)=\"onToggleAllCheckBox($event)\" [alone]=\"true\"></wz-checkbox>\n </div>\n\n <!-- Header contents are added with the headerCell directive -->\n <ng-content select=\"[headerCell]\"></ng-content>\n </div>\n\n <!-- Search section -->\n <div *ngIf=\"!disableSearch\" class=\"wz-table__search\">\n <wz-input-search\n [(ngModel)]=\"tableFilters.searchValue\"\n (changeDebounced)=\"searchChange($event)\"\n [placeholder]=\"placeholder\"\n [smallPadding]=\"true\"\n ></wz-input-search>\n </div>\n\n <!-- Body section -->\n <div class=\"wz-table__body\">\n <!-- Loader on body -->\n <div class=\"wz-table__body__loader\" *ngIf=\"isLoading\">\n <wz-loader [small]=\"true\"></wz-loader>\n </div>\n <!-- Body contents are added with the tableRow directive -->\n <ng-content select=\"[tableRow]\" *ngIf=\"!isLoading\"></ng-content>\n </div>\n\n <!-- Pagination section -->\n <wz-pagination *ngIf=\"!disablePagniation\" [pagination]=\"tableFilters\" (pageChange)=\"pageChange()\"></wz-pagination>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: LoaderComponent, selector: "wz-loader", inputs: ["text", "small", "position"] }, { kind: "component", type: InputSearchComponent, selector: "wz-input-search", inputs: ["placeholder", "smallPadding", "id"], outputs: ["changeDebounced"] }, { kind: "component", type: PaginationComponent, selector: "wz-pagination", inputs: ["pagination"], outputs: ["pageChange"] }, { kind: "component", type: CheckboxComponent, selector: "wz-checkbox", inputs: ["label", "value", "type", "alone", "checked", "id", "name"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
2578
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TableComponent, decorators: [{
|
|
2662
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: TableComponent, decorators: [{
|
|
2579
2663
|
type: Component,
|
|
2580
2664
|
args: [{ selector: 'wz-table', encapsulation: ViewEncapsulation.None, template: "<div class=\"wz-table\">\n <!-- Header section -->\n <div class=\"wz-table__head\" id=\"headerTable\">\n <div *ngIf=\"checkbox\" class=\"wz-table__head__cell wz-table__head__cell--checkbox\">\n <wz-checkbox [id]=\"headerCheckBoxId\" (change)=\"onToggleAllCheckBox($event)\" [alone]=\"true\"></wz-checkbox>\n </div>\n\n <!-- Header contents are added with the headerCell directive -->\n <ng-content select=\"[headerCell]\"></ng-content>\n </div>\n\n <!-- Search section -->\n <div *ngIf=\"!disableSearch\" class=\"wz-table__search\">\n <wz-input-search\n [(ngModel)]=\"tableFilters.searchValue\"\n (changeDebounced)=\"searchChange($event)\"\n [placeholder]=\"placeholder\"\n [smallPadding]=\"true\"\n ></wz-input-search>\n </div>\n\n <!-- Body section -->\n <div class=\"wz-table__body\">\n <!-- Loader on body -->\n <div class=\"wz-table__body__loader\" *ngIf=\"isLoading\">\n <wz-loader [small]=\"true\"></wz-loader>\n </div>\n <!-- Body contents are added with the tableRow directive -->\n <ng-content select=\"[tableRow]\" *ngIf=\"!isLoading\"></ng-content>\n </div>\n\n <!-- Pagination section -->\n <wz-pagination *ngIf=\"!disablePagniation\" [pagination]=\"tableFilters\" (pageChange)=\"pageChange()\"></wz-pagination>\n</div>\n" }]
|
|
2581
|
-
}], ctorParameters:
|
|
2665
|
+
}], ctorParameters: () => [{ type: FiltersTableService }], propDecorators: { tableFilters: [{
|
|
2582
2666
|
type: Input
|
|
2583
2667
|
}], tableFiltersChange: [{
|
|
2584
2668
|
type: Output
|
|
@@ -2599,11 +2683,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2599
2683
|
}] } });
|
|
2600
2684
|
|
|
2601
2685
|
class TableColumn {
|
|
2686
|
+
currentCell;
|
|
2687
|
+
renderer;
|
|
2688
|
+
document;
|
|
2689
|
+
columnSize; // Optional.
|
|
2690
|
+
centerCell; // Optional. left|center|right
|
|
2691
|
+
centerCellValue = ['left', 'center', 'right'];
|
|
2602
2692
|
constructor(currentCell, renderer, document) {
|
|
2603
2693
|
this.currentCell = currentCell;
|
|
2604
2694
|
this.renderer = renderer;
|
|
2605
2695
|
this.document = document;
|
|
2606
|
-
this.centerCellValue = ['left', 'center', 'right'];
|
|
2607
2696
|
}
|
|
2608
2697
|
ngAfterViewInit() {
|
|
2609
2698
|
this.applyCustomStylesOnCell();
|
|
@@ -2619,18 +2708,18 @@ class TableColumn {
|
|
|
2619
2708
|
this.renderer.addClass(this.currentCell.nativeElement, className);
|
|
2620
2709
|
}
|
|
2621
2710
|
}
|
|
2711
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: TableColumn, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2712
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: TableColumn, selector: "[tableColumn]", inputs: { columnSize: "columnSize", centerCell: "centerCell" }, ngImport: i0 });
|
|
2622
2713
|
}
|
|
2623
|
-
|
|
2624
|
-
TableColumn.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: TableColumn, selector: "[tableColumn]", inputs: { columnSize: "columnSize", centerCell: "centerCell" }, ngImport: i0 });
|
|
2625
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TableColumn, decorators: [{
|
|
2714
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: TableColumn, decorators: [{
|
|
2626
2715
|
type: Directive,
|
|
2627
2716
|
args: [{
|
|
2628
2717
|
selector: '[tableColumn]'
|
|
2629
2718
|
}]
|
|
2630
|
-
}], ctorParameters:
|
|
2719
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
|
|
2631
2720
|
type: Inject,
|
|
2632
2721
|
args: [DOCUMENT]
|
|
2633
|
-
}] }]
|
|
2722
|
+
}] }], propDecorators: { columnSize: [{
|
|
2634
2723
|
type: Input,
|
|
2635
2724
|
args: ['columnSize']
|
|
2636
2725
|
}], centerCell: [{
|
|
@@ -2639,15 +2728,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2639
2728
|
}] } });
|
|
2640
2729
|
|
|
2641
2730
|
class CheckBoxRow {
|
|
2731
|
+
currentRow;
|
|
2732
|
+
appRef;
|
|
2733
|
+
renderer;
|
|
2734
|
+
document;
|
|
2735
|
+
resolver;
|
|
2736
|
+
injector;
|
|
2737
|
+
checkBoxId;
|
|
2738
|
+
checkBoxName;
|
|
2642
2739
|
set checkBoxValue(value) {
|
|
2643
2740
|
this._value = value;
|
|
2644
2741
|
if (this.checkboxComponentRef) {
|
|
2645
2742
|
this.setCheckBoxValue();
|
|
2646
2743
|
}
|
|
2647
2744
|
}
|
|
2745
|
+
_value;
|
|
2648
2746
|
get checkBoxValue() {
|
|
2649
2747
|
return this._value;
|
|
2650
2748
|
}
|
|
2749
|
+
checkBoxValueChange = new EventEmitter();
|
|
2750
|
+
checkboxComponentRef;
|
|
2751
|
+
htmlContainer;
|
|
2651
2752
|
constructor(currentRow, appRef, renderer, document, resolver, injector) {
|
|
2652
2753
|
this.currentRow = currentRow;
|
|
2653
2754
|
this.appRef = appRef;
|
|
@@ -2655,7 +2756,6 @@ class CheckBoxRow {
|
|
|
2655
2756
|
this.document = document;
|
|
2656
2757
|
this.resolver = resolver;
|
|
2657
2758
|
this.injector = injector;
|
|
2658
|
-
this.checkBoxValueChange = new EventEmitter();
|
|
2659
2759
|
}
|
|
2660
2760
|
ngOnInit() {
|
|
2661
2761
|
this.createCheckBoxComponent();
|
|
@@ -2694,18 +2794,18 @@ class CheckBoxRow {
|
|
|
2694
2794
|
ngOnDestroy() {
|
|
2695
2795
|
this.htmlContainer.dispose();
|
|
2696
2796
|
}
|
|
2797
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: CheckBoxRow, deps: [{ token: i0.ElementRef }, { token: i0.ApplicationRef }, { token: i0.Renderer2 }, { token: DOCUMENT }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2798
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: CheckBoxRow, selector: "[checkBoxRow]", inputs: { checkBoxId: "checkBoxId", checkBoxName: "checkBoxName", checkBoxValue: "checkBoxValue" }, outputs: { checkBoxValueChange: "checkBoxValueChange" }, ngImport: i0 });
|
|
2697
2799
|
}
|
|
2698
|
-
|
|
2699
|
-
CheckBoxRow.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CheckBoxRow, selector: "[checkBoxRow]", inputs: { checkBoxId: "checkBoxId", checkBoxName: "checkBoxName", checkBoxValue: "checkBoxValue" }, outputs: { checkBoxValueChange: "checkBoxValueChange" }, ngImport: i0 });
|
|
2700
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CheckBoxRow, decorators: [{
|
|
2800
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: CheckBoxRow, decorators: [{
|
|
2701
2801
|
type: Directive,
|
|
2702
2802
|
args: [{
|
|
2703
2803
|
selector: '[checkBoxRow]'
|
|
2704
2804
|
}]
|
|
2705
|
-
}], ctorParameters:
|
|
2805
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ApplicationRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
|
|
2706
2806
|
type: Inject,
|
|
2707
2807
|
args: [DOCUMENT]
|
|
2708
|
-
}] }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }]
|
|
2808
|
+
}] }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }], propDecorators: { checkBoxId: [{
|
|
2709
2809
|
type: Input,
|
|
2710
2810
|
args: ['checkBoxId']
|
|
2711
2811
|
}], checkBoxName: [{
|
|
@@ -2718,12 +2818,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2718
2818
|
type: Output
|
|
2719
2819
|
}] } });
|
|
2720
2820
|
class HtmlContainer {
|
|
2821
|
+
hostElement;
|
|
2822
|
+
appRef;
|
|
2823
|
+
componentFactoryResolver;
|
|
2824
|
+
injector;
|
|
2825
|
+
attached = false;
|
|
2826
|
+
disposeFn;
|
|
2721
2827
|
constructor(hostElement, appRef, componentFactoryResolver, injector) {
|
|
2722
2828
|
this.hostElement = hostElement;
|
|
2723
2829
|
this.appRef = appRef;
|
|
2724
2830
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
2725
2831
|
this.injector = injector;
|
|
2726
|
-
this.attached = false;
|
|
2727
2832
|
}
|
|
2728
2833
|
attach(component) {
|
|
2729
2834
|
if (this.attached) {
|
|
@@ -2748,24 +2853,35 @@ class HtmlContainer {
|
|
|
2748
2853
|
}
|
|
2749
2854
|
|
|
2750
2855
|
class TableColumnHeader {
|
|
2856
|
+
currentCell;
|
|
2857
|
+
renderer;
|
|
2858
|
+
document;
|
|
2859
|
+
filtersTableService;
|
|
2751
2860
|
set headerName(value) {
|
|
2752
2861
|
this._headerName = value;
|
|
2753
2862
|
this.setHeaderName();
|
|
2754
2863
|
}
|
|
2864
|
+
_headerName = '';
|
|
2755
2865
|
get headerName() {
|
|
2756
2866
|
return this._headerName;
|
|
2757
2867
|
}
|
|
2868
|
+
columnSize; // Optional.
|
|
2869
|
+
filterRouting = false; // Optional. Set to true to use Filter Routing.
|
|
2870
|
+
tableName; // Optional, but mandatory to handle sorting
|
|
2871
|
+
sortName; // Optional, but mandatory to handle sorting
|
|
2872
|
+
centerCell; // Optional. left|center|right
|
|
2873
|
+
onSortChange = new EventEmitter(); // Emit the sort value (true, false, undefuned) of the current sort icon when clicking
|
|
2874
|
+
tableFilters;
|
|
2875
|
+
tableFiltersChange = new EventEmitter();
|
|
2876
|
+
centerCellValue = ['left', 'center', 'right'];
|
|
2877
|
+
contentHeader;
|
|
2878
|
+
filterGroup;
|
|
2879
|
+
subscriptions = [];
|
|
2758
2880
|
constructor(currentCell, renderer, document, filtersTableService) {
|
|
2759
2881
|
this.currentCell = currentCell;
|
|
2760
2882
|
this.renderer = renderer;
|
|
2761
2883
|
this.document = document;
|
|
2762
2884
|
this.filtersTableService = filtersTableService;
|
|
2763
|
-
this._headerName = '';
|
|
2764
|
-
this.filterRouting = false; // Optional. Set to true to use Filter Routing.
|
|
2765
|
-
this.onSortChange = new EventEmitter(); // Emit the sort value (true, false, undefuned) of the current sort icon when clicking
|
|
2766
|
-
this.tableFiltersChange = new EventEmitter();
|
|
2767
|
-
this.centerCellValue = ['left', 'center', 'right'];
|
|
2768
|
-
this.subscriptions = [];
|
|
2769
2885
|
}
|
|
2770
2886
|
ngOnInit() {
|
|
2771
2887
|
if (this.tableName && this.sortName) {
|
|
@@ -2906,19 +3022,19 @@ class TableColumnHeader {
|
|
|
2906
3022
|
subscription.unsubscribe();
|
|
2907
3023
|
});
|
|
2908
3024
|
}
|
|
3025
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: TableColumnHeader, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DOCUMENT }, { token: FiltersTableService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3026
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: TableColumnHeader, selector: "[headerCell]", inputs: { headerName: "headerName", columnSize: "columnSize", filterRouting: "filterRouting", tableName: "tableName", sortName: "sortName", centerCell: "centerCell", tableFilters: "tableFilters" }, outputs: { onSortChange: "onSortChange", tableFiltersChange: "tableFiltersChange" }, ngImport: i0 });
|
|
2909
3027
|
}
|
|
2910
|
-
|
|
2911
|
-
TableColumnHeader.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: TableColumnHeader, selector: "[headerCell]", inputs: { headerName: "headerName", columnSize: "columnSize", filterRouting: "filterRouting", tableName: "tableName", sortName: "sortName", centerCell: "centerCell", tableFilters: "tableFilters" }, outputs: { onSortChange: "onSortChange", tableFiltersChange: "tableFiltersChange" }, ngImport: i0 });
|
|
2912
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TableColumnHeader, decorators: [{
|
|
3028
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: TableColumnHeader, decorators: [{
|
|
2913
3029
|
type: Directive,
|
|
2914
3030
|
args: [{
|
|
2915
3031
|
// The selector has the same name as the headerCell selector in table.component.html
|
|
2916
3032
|
selector: '[headerCell]'
|
|
2917
3033
|
}]
|
|
2918
|
-
}], ctorParameters:
|
|
3034
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
|
|
2919
3035
|
type: Inject,
|
|
2920
3036
|
args: [DOCUMENT]
|
|
2921
|
-
}] }, { type: FiltersTableService }]
|
|
3037
|
+
}] }, { type: FiltersTableService }], propDecorators: { headerName: [{
|
|
2922
3038
|
type: Input,
|
|
2923
3039
|
args: ['headerName']
|
|
2924
3040
|
}], columnSize: [{
|
|
@@ -2945,6 +3061,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2945
3061
|
}] } });
|
|
2946
3062
|
|
|
2947
3063
|
class TableRow {
|
|
3064
|
+
currentCell;
|
|
3065
|
+
renderer;
|
|
3066
|
+
document;
|
|
2948
3067
|
constructor(currentCell, renderer, document) {
|
|
2949
3068
|
this.currentCell = currentCell;
|
|
2950
3069
|
this.renderer = renderer;
|
|
@@ -2956,43 +3075,145 @@ class TableRow {
|
|
|
2956
3075
|
applyCustomStylesOnCell() {
|
|
2957
3076
|
this.renderer.addClass(this.currentCell.nativeElement, 'wz-table__body__line');
|
|
2958
3077
|
}
|
|
3078
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: TableRow, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3079
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: TableRow, selector: "[tableRow]", ngImport: i0 });
|
|
2959
3080
|
}
|
|
2960
|
-
|
|
2961
|
-
TableRow.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: TableRow, selector: "[tableRow]", ngImport: i0 });
|
|
2962
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TableRow, decorators: [{
|
|
3081
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: TableRow, decorators: [{
|
|
2963
3082
|
type: Directive,
|
|
2964
3083
|
args: [{
|
|
2965
3084
|
// The selector has the same name as the tableRaw selector in table.component.html
|
|
2966
3085
|
selector: '[tableRow]',
|
|
2967
3086
|
}]
|
|
2968
|
-
}], ctorParameters:
|
|
3087
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
|
|
2969
3088
|
type: Inject,
|
|
2970
3089
|
args: [DOCUMENT]
|
|
2971
|
-
}] }]
|
|
3090
|
+
}] }] });
|
|
2972
3091
|
|
|
2973
3092
|
class TableViewComponent extends ImagesActionHandler {
|
|
3093
|
+
dataTableName = 'imgagesView'; // Name of your table
|
|
2974
3094
|
constructor(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, apiService) {
|
|
2975
3095
|
super(imgManager, imgSelectionService, http, imgCDNService, imgEventCardService, alertService, translateService, apiService);
|
|
2976
|
-
this.dataTableName = 'imgagesView'; // Name of your table
|
|
2977
3096
|
}
|
|
2978
3097
|
ngOnInit() {
|
|
2979
3098
|
}
|
|
3099
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: TableViewComponent, deps: [{ token: ImgManagerService }, { token: ImgSelectionService }, { token: i3$1.HttpClient }, { token: ImgCDNService }, { token: ImgEventService }, { token: AlertService }, { token: i3.TranslateService }, { token: ApiService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3100
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: TableViewComponent, selector: "table-view", usesInheritance: true, ngImport: i0, 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", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["dropDownMenuClass", "disable"] }, { kind: "component", type: TableComponent, selector: "wz-table", inputs: ["tableFilters", "tableRoutingName", "placeholder", "checkbox", "disableSearch", "disablePagniation", "isLoading"], outputs: ["tableFiltersChange", "toggleAllCheckBox"] }, { kind: "directive", type: TableColumn, selector: "[tableColumn]", inputs: ["columnSize", "centerCell"] }, { kind: "directive", type: CheckBoxRow, selector: "[checkBoxRow]", inputs: ["checkBoxId", "checkBoxName", "checkBoxValue"], outputs: ["checkBoxValueChange"] }, { kind: "directive", type: TableColumnHeader, selector: "[headerCell]", inputs: ["headerName", "columnSize", "filterRouting", "tableName", "sortName", "centerCell", "tableFilters"], outputs: ["onSortChange", "tableFiltersChange"] }, { kind: "directive", type: TableRow, selector: "[tableRow]" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: ImageSrcPipe, name: "imgSrc" }], animations: [
|
|
3101
|
+
listAnnimation
|
|
3102
|
+
] });
|
|
2980
3103
|
}
|
|
2981
|
-
|
|
2982
|
-
TableViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TableViewComponent, selector: "table-view", usesInheritance: true, ngImport: i0, 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", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["dropDownMenuClass", "disable"] }, { kind: "component", type: TableComponent, selector: "wz-table", inputs: ["tableFilters", "tableRoutingName", "placeholder", "checkbox", "disableSearch", "disablePagniation", "isLoading"], outputs: ["tableFiltersChange", "toggleAllCheckBox"] }, { kind: "directive", type: TableColumn, selector: "[tableColumn]", inputs: ["columnSize", "centerCell"] }, { kind: "directive", type: CheckBoxRow, selector: "[checkBoxRow]", inputs: ["checkBoxId", "checkBoxName", "checkBoxValue"], outputs: ["checkBoxValueChange"] }, { kind: "directive", type: TableColumnHeader, selector: "[headerCell]", inputs: ["headerName", "columnSize", "filterRouting", "tableName", "sortName", "centerCell", "tableFilters"], outputs: ["onSortChange", "tableFiltersChange"] }, { kind: "directive", type: TableRow, selector: "[tableRow]" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: ImageSrcPipe, name: "imgSrc" }], animations: [
|
|
2983
|
-
listAnnimation
|
|
2984
|
-
] });
|
|
2985
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TableViewComponent, decorators: [{
|
|
3104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: TableViewComponent, decorators: [{
|
|
2986
3105
|
type: Component,
|
|
2987
3106
|
args: [{ selector: 'table-view', animations: [
|
|
2988
3107
|
listAnnimation
|
|
2989
3108
|
], 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" }]
|
|
2990
|
-
}], ctorParameters:
|
|
3109
|
+
}], ctorParameters: () => [{ type: ImgManagerService }, { type: ImgSelectionService }, { type: i3$1.HttpClient }, { type: ImgCDNService }, { type: ImgEventService }, { type: AlertService }, { type: i3.TranslateService }, { type: ApiService }] });
|
|
2991
3110
|
|
|
2992
3111
|
class ImagesViewComponent {
|
|
3112
|
+
imgManager;
|
|
3113
|
+
imgEventService;
|
|
3114
|
+
imgSelectionService;
|
|
3115
|
+
alertService;
|
|
3116
|
+
userSettingsService;
|
|
3117
|
+
renamePictureService;
|
|
3118
|
+
changeDetectorRef;
|
|
3119
|
+
stateDisplayed;
|
|
3120
|
+
tabDisplayed;
|
|
3121
|
+
fullSize;
|
|
3122
|
+
nbRowToShow;
|
|
3123
|
+
listDisplayed = false; // Display format list or mosaic
|
|
3124
|
+
multipleImgMode = false;
|
|
3125
|
+
switchDisplayWindow = new EventEmitter();
|
|
3126
|
+
imgLibContainer;
|
|
3127
|
+
widthLargeCard = 219; // Default value of a card width 199 + margin 20
|
|
3128
|
+
widthSmallCard = 160; // Default value of a card width 140 + margin 20
|
|
3129
|
+
nbMinImgPerLine;
|
|
3130
|
+
nbMaxImgPerLine;
|
|
3131
|
+
nbFakeImg = 0;
|
|
3132
|
+
imgFullWidthConfig = [
|
|
3133
|
+
{
|
|
3134
|
+
max: 419,
|
|
3135
|
+
largeImgWidthFactor: 1,
|
|
3136
|
+
smallImgWidthFactor: 0.5
|
|
3137
|
+
},
|
|
3138
|
+
{
|
|
3139
|
+
max: 499,
|
|
3140
|
+
largeImgWidthFactor: 1,
|
|
3141
|
+
smallImgWidthFactor: 0.5
|
|
3142
|
+
},
|
|
3143
|
+
{
|
|
3144
|
+
max: 719, // tablet
|
|
3145
|
+
largeImgWidthFactor: 0.5,
|
|
3146
|
+
smallImgWidthFactor: 0.3333
|
|
3147
|
+
},
|
|
3148
|
+
{
|
|
3149
|
+
max: 1023, // deskop
|
|
3150
|
+
largeImgWidthFactor: 0.3333,
|
|
3151
|
+
smallImgWidthFactor: 0.2
|
|
3152
|
+
},
|
|
3153
|
+
{
|
|
3154
|
+
max: 1399,
|
|
3155
|
+
largeImgWidthFactor: 0.25,
|
|
3156
|
+
smallImgWidthFactor: 0.125
|
|
3157
|
+
},
|
|
3158
|
+
{
|
|
3159
|
+
max: 1599,
|
|
3160
|
+
largeImgWidthFactor: 0.2,
|
|
3161
|
+
smallImgWidthFactor: 0.1111
|
|
3162
|
+
},
|
|
3163
|
+
{
|
|
3164
|
+
largeImgWidthFactor: 0.1666,
|
|
3165
|
+
smallImgWidthFactor: 0.1
|
|
3166
|
+
}
|
|
3167
|
+
];
|
|
3168
|
+
imgWidthConfig = [
|
|
3169
|
+
{
|
|
3170
|
+
max: 1024,
|
|
3171
|
+
largeImgWidthFactor: 0.25,
|
|
3172
|
+
smallImgWidthFactor: 0.125
|
|
3173
|
+
},
|
|
3174
|
+
{
|
|
3175
|
+
max: 1199,
|
|
3176
|
+
largeImgWidthFactor: 0.3333,
|
|
3177
|
+
smallImgWidthFactor: 0.2
|
|
3178
|
+
},
|
|
3179
|
+
{
|
|
3180
|
+
max: 1299,
|
|
3181
|
+
largeImgWidthFactor: 0.3333,
|
|
3182
|
+
smallImgWidthFactor: 0.1666
|
|
3183
|
+
},
|
|
3184
|
+
{
|
|
3185
|
+
max: 1399,
|
|
3186
|
+
largeImgWidthFactor: 0.25,
|
|
3187
|
+
smallImgWidthFactor: 0.1666
|
|
3188
|
+
},
|
|
3189
|
+
{
|
|
3190
|
+
max: 1599,
|
|
3191
|
+
largeImgWidthFactor: 0.25,
|
|
3192
|
+
smallImgWidthFactor: 0.14
|
|
3193
|
+
},
|
|
3194
|
+
{
|
|
3195
|
+
largeImgWidthFactor: 0.25,
|
|
3196
|
+
smallImgWidthFactor: 0.125
|
|
3197
|
+
}
|
|
3198
|
+
];
|
|
3199
|
+
nbImgToDelSelected = 0;
|
|
3200
|
+
disable = false; // Use to disable action during server request
|
|
3201
|
+
delListImgLoader = false;
|
|
3202
|
+
initComponent = true;
|
|
3203
|
+
failLoaded = false;
|
|
3204
|
+
confirmImgSup = false;
|
|
3205
|
+
previousSearchValue;
|
|
2993
3206
|
get searchImagesParameters$() {
|
|
2994
3207
|
return this.imgManager.searchImagesParameters$;
|
|
2995
3208
|
}
|
|
3209
|
+
// Api Img manager Params
|
|
3210
|
+
params;
|
|
3211
|
+
errorGetAllImg = 'ImgManager.ImgLib.errorGetAllImg';
|
|
3212
|
+
errorGetTotalImg = 'ImgManager.ImgLib.errorGetTotalImg';
|
|
3213
|
+
errorGetImg = 'ImgManager.ImgLib.errorGetCanvaImg';
|
|
3214
|
+
errorRemoveImg = 'ImgManager.ImgList.errorRemoveImg';
|
|
3215
|
+
destroy$ = new Subject();
|
|
3216
|
+
vm$;
|
|
2996
3217
|
constructor(imgManager, imgEventService, imgSelectionService, alertService, userSettingsService, renamePictureService, changeDetectorRef) {
|
|
2997
3218
|
this.imgManager = imgManager;
|
|
2998
3219
|
this.imgEventService = imgEventService;
|
|
@@ -3001,106 +3222,26 @@ class ImagesViewComponent {
|
|
|
3001
3222
|
this.userSettingsService = userSettingsService;
|
|
3002
3223
|
this.renamePictureService = renamePictureService;
|
|
3003
3224
|
this.changeDetectorRef = changeDetectorRef;
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
this.switchDisplayWindow = new EventEmitter();
|
|
3007
|
-
this.widthLargeCard = 219; // Default value of a card width 199 + margin 20
|
|
3008
|
-
this.widthSmallCard = 160; // Default value of a card width 140 + margin 20
|
|
3009
|
-
this.nbFakeImg = 0;
|
|
3010
|
-
this.imgFullWidthConfig = [
|
|
3011
|
-
{
|
|
3012
|
-
max: 419,
|
|
3013
|
-
largeImgWidthFactor: 1,
|
|
3014
|
-
smallImgWidthFactor: 0.5
|
|
3015
|
-
},
|
|
3016
|
-
{
|
|
3017
|
-
max: 499,
|
|
3018
|
-
largeImgWidthFactor: 1,
|
|
3019
|
-
smallImgWidthFactor: 0.5
|
|
3020
|
-
},
|
|
3021
|
-
{
|
|
3022
|
-
max: 719,
|
|
3023
|
-
largeImgWidthFactor: 0.5,
|
|
3024
|
-
smallImgWidthFactor: 0.3333
|
|
3025
|
-
},
|
|
3026
|
-
{
|
|
3027
|
-
max: 1023,
|
|
3028
|
-
largeImgWidthFactor: 0.3333,
|
|
3029
|
-
smallImgWidthFactor: 0.2
|
|
3030
|
-
},
|
|
3031
|
-
{
|
|
3032
|
-
max: 1399,
|
|
3033
|
-
largeImgWidthFactor: 0.25,
|
|
3034
|
-
smallImgWidthFactor: 0.125
|
|
3035
|
-
},
|
|
3036
|
-
{
|
|
3037
|
-
max: 1599,
|
|
3038
|
-
largeImgWidthFactor: 0.2,
|
|
3039
|
-
smallImgWidthFactor: 0.1111
|
|
3040
|
-
},
|
|
3041
|
-
{
|
|
3042
|
-
largeImgWidthFactor: 0.1666,
|
|
3043
|
-
smallImgWidthFactor: 0.1
|
|
3044
|
-
}
|
|
3045
|
-
];
|
|
3046
|
-
this.imgWidthConfig = [
|
|
3047
|
-
{
|
|
3048
|
-
max: 1024,
|
|
3049
|
-
largeImgWidthFactor: 0.25,
|
|
3050
|
-
smallImgWidthFactor: 0.125
|
|
3051
|
-
},
|
|
3052
|
-
{
|
|
3053
|
-
max: 1199,
|
|
3054
|
-
largeImgWidthFactor: 0.3333,
|
|
3055
|
-
smallImgWidthFactor: 0.2
|
|
3056
|
-
},
|
|
3057
|
-
{
|
|
3058
|
-
max: 1299,
|
|
3059
|
-
largeImgWidthFactor: 0.3333,
|
|
3060
|
-
smallImgWidthFactor: 0.1666
|
|
3061
|
-
},
|
|
3062
|
-
{
|
|
3063
|
-
max: 1399,
|
|
3064
|
-
largeImgWidthFactor: 0.25,
|
|
3065
|
-
smallImgWidthFactor: 0.1666
|
|
3066
|
-
},
|
|
3067
|
-
{
|
|
3068
|
-
max: 1599,
|
|
3069
|
-
largeImgWidthFactor: 0.25,
|
|
3070
|
-
smallImgWidthFactor: 0.14
|
|
3071
|
-
},
|
|
3072
|
-
{
|
|
3073
|
-
largeImgWidthFactor: 0.25,
|
|
3074
|
-
smallImgWidthFactor: 0.125
|
|
3075
|
-
}
|
|
3076
|
-
];
|
|
3077
|
-
this.nbImgToDelSelected = 0;
|
|
3078
|
-
this.disable = false; // Use to disable action during server request
|
|
3079
|
-
this.delListImgLoader = false;
|
|
3080
|
-
this.initComponent = true;
|
|
3081
|
-
this.failLoaded = false;
|
|
3082
|
-
this.confirmImgSup = false;
|
|
3083
|
-
this.errorGetAllImg = 'ImgManager.ImgLib.errorGetAllImg';
|
|
3084
|
-
this.errorGetTotalImg = 'ImgManager.ImgLib.errorGetTotalImg';
|
|
3085
|
-
this.errorGetImg = 'ImgManager.ImgLib.errorGetCanvaImg';
|
|
3086
|
-
this.errorRemoveImg = 'ImgManager.ImgList.errorRemoveImg';
|
|
3087
|
-
this.destroy$ = new Subject();
|
|
3225
|
+
}
|
|
3226
|
+
ngOnInit() {
|
|
3088
3227
|
this.vm$ = combineLatest({
|
|
3089
3228
|
imageSelection: this.imgSelectionService.imgSelection$,
|
|
3090
3229
|
imageListData: this.imgManager.imageList$,
|
|
3091
3230
|
isLoading: this.imgManager.isLoading$,
|
|
3092
3231
|
searchImagesParameters: this.imgManager.searchImagesParameters$,
|
|
3093
3232
|
}).pipe(map$1(({ imageSelection, imageListData: { imageList, imageTotal }, isLoading, searchImagesParameters }) => {
|
|
3094
|
-
this.initVariables(true);
|
|
3095
|
-
this.calculateNbImgFake(imageList.data.length);
|
|
3233
|
+
this.initVariables(true); // Si cette méthode est nécessaire à l'initialisation
|
|
3234
|
+
this.calculateNbImgFake(imageList.data.length); // Même chose ici
|
|
3096
3235
|
const picturesList = this.setSelectedProperty(imageSelection, imageList.data);
|
|
3097
3236
|
this.renamePictureService.setPicturesList(picturesList);
|
|
3098
3237
|
const tableFilters = this.getTableFilters(searchImagesParameters, imageTotal);
|
|
3099
|
-
const keepImagesDisplayed = (this.tabDisplayed === 'img-upload' && searchImagesParameters.page === '1') ||
|
|
3238
|
+
const keepImagesDisplayed = (this.tabDisplayed === 'img-upload' && searchImagesParameters.page === '1') ||
|
|
3239
|
+
(this.tabDisplayed === 'images-view' && imageList.data.length && searchImagesParameters.page === '1');
|
|
3100
3240
|
const skipSetImagesToDisplay = !!picturesList?.length && this.tabDisplayed === 'img-upload' && searchImagesParameters.page === '1';
|
|
3101
|
-
const hideUntilFetchedFirstPageImagesForTabUpload = this.tabDisplayed === 'img-upload' &&
|
|
3241
|
+
const hideUntilFetchedFirstPageImagesForTabUpload = this.tabDisplayed === 'img-upload' &&
|
|
3242
|
+
(searchImagesParameters.page !== '1' || imageList?.page !== 1);
|
|
3102
3243
|
return {
|
|
3103
|
-
isLoading: hideUntilFetchedFirstPageImagesForTabUpload || !keepImagesDisplayed && isLoading,
|
|
3244
|
+
isLoading: hideUntilFetchedFirstPageImagesForTabUpload || (!keepImagesDisplayed && isLoading),
|
|
3104
3245
|
displayPexelsResults: !isLoading && imageTotal === 0,
|
|
3105
3246
|
picturesList,
|
|
3106
3247
|
imageTotal,
|
|
@@ -3302,19 +3443,19 @@ class ImagesViewComponent {
|
|
|
3302
3443
|
this.destroy$.next();
|
|
3303
3444
|
this.destroy$.complete();
|
|
3304
3445
|
}
|
|
3446
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImagesViewComponent, deps: [{ token: ImgManagerService }, { token: ImgEventService }, { token: ImgSelectionService }, { token: AlertService }, { token: UserSettingsService }, { token: RenamePictureService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3447
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: ImagesViewComponent, selector: "images-view", inputs: { stateDisplayed: "stateDisplayed", tabDisplayed: "tabDisplayed", fullSize: "fullSize", nbRowToShow: "nbRowToShow", listDisplayed: "listDisplayed", multipleImgMode: "multipleImgMode" }, outputs: { switchDisplayWindow: "switchDisplayWindow" }, viewQueries: [{ propertyName: "imgLibContainer", first: true, predicate: ["imgLibContainer"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"vm$ | async as vm\">\r\n\r\n <div class=\"images-view\" [ngClass]=\"{'fullSize': fullSize, 'small': stateDisplayed === 'small'}\" [@easeInOut]=\"'in'\">\r\n <!-- Subheader : Img number and actions btn (sup img list, switch forma display) -->\r\n <div\r\n *ngIf=\"(stateDisplayed !== 'small' || tabDisplayed === 'img-upload')\"\r\n class=\"images-view__container\"\r\n [ngClass]=\"{'images-view__container--uploadTab': tabDisplayed === 'img-upload', 'images-view__container--window': stateDisplayed === 'window'}\"\r\n >\r\n\r\n <div *ngIf=\"tabDisplayed !== 'img-upload'\">\r\n <p class=\"mainColor\" [ngClass]=\"{'images-view__container__total--hide': vm.displayPexelsResults}\">{{ 'ImgManager.ImgLib.nbImg' | translate }} : {{vm.imageTotal}}</p>\r\n </div>\r\n <div *ngIf=\"tabDisplayed === 'img-upload'\">\r\n <p class=\"mainColor\">{{ 'ImgManager.ImgLib.lastImgs' | translate }}</p>\r\n </div>\r\n\r\n <div class=\"field has-addons subHeaderActions\" *ngIf=\"tabDisplayed !== 'img-upload'\">\r\n\r\n <!-- For listforma : Display btn del multiple img & Confirm action -->\r\n <div class=\"images-view__container__boxAction\">\r\n\r\n\r\n <!-- Select -->\r\n <button\r\n class=\"button success images-view__container__boxAction__import\"\r\n @insertRemoveAnnim\r\n *ngIf=\"listDisplayed && nbImgToDelSelected && !confirmImgSup && !delListImgLoader && multipleImgMode\"\r\n (click)=\"selectImgChosen(vm.picturesList)\"\r\n type=\"button\"\r\n >\r\n <i class=\"fal fa-check\"></i>\r\n {{ 'ImgManager.ImgLib.select' | translate }} ({{nbImgToDelSelected}})\r\n </button>\r\n\r\n <!-- Display btn del multiple img -->\r\n <button\r\n *ngIf=\"listDisplayed && nbImgToDelSelected && !confirmImgSup\"\r\n (click)=\"displayConfirmImgSup()\"\r\n class=\"button images-view__container__boxAction__delBtn danger\"\r\n @insertRemoveAnnim\r\n type=\"button\"\r\n >\r\n <i class=\"fal fa-times\"></i>{{ 'ImgManager.ImgLib.delMlt' | translate }} ({{nbImgToDelSelected}})\r\n <span btnLoadingAnim *ngIf=\"delListImgLoader\" class=\"btnLoadingAnnimation\"></span>\r\n </button>\r\n\r\n <!-- Confirm action -->\r\n <div\r\n class=\"images-view__container__boxAction__confirmSup\"\r\n [ngClass]=\"{'images-view__container__boxAction__confirmSup--visible': confirmImgSup}\">\r\n <p *ngIf=\"nbImgToDelSelected > 1\" class=\"images-view__container__boxAction__confirmSup__text\">{{ 'ImgManager.ImgLib.confirmSupQuestions' | translate:{nbImage: nbImgToDelSelected} }}</p>\r\n <p *ngIf=\"nbImgToDelSelected === 1\" class=\"images-view__container__boxAction__confirmSup__text\">{{ 'ImgManager.ImgLib.confirmSupQuestion' | translate:{nbImage: nbImgToDelSelected} }}</p>\r\n <div>\r\n <button\r\n class=\"button images-view__container__boxAction__confirmSup__cancel\"\r\n (click)=\"cancelSup()\"\r\n type=\"button\"\r\n >\r\n {{ 'ImgManager.ImgLib.cancel' | translate }}\r\n </button>\r\n <button\r\n (click)=\"removeListImg(vm.picturesList)\"\r\n class=\"button images-view__container__delBtn danger\"\r\n type=\"button\"\r\n >\r\n {{ 'ImgManager.ImgLib.confirm' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <!-- Swith mosaic/list forma -->\r\n <div class=\"field has-addons images-view__container__buttonBox\">\r\n <div class=\"control\">\r\n <div\r\n class=\"button is-lighted images-view__container__buttonBox__btn\"\r\n [ngClass]=\"{'actifDisplayed': !listDisplayed}\"\r\n (click)=\"onSwitchFormatDisplayed(false)\"\r\n >\r\n <span class=\"icon is-small\">\r\n <i class=\"fa-solid fa-th\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"control\">\r\n <div class=\"button is-lighted images-view__container__buttonBox__btn\"\r\n [ngClass]=\"{'actifDisplayed': listDisplayed}\"\r\n (click)=\"onSwitchFormatDisplayed(true)\"\r\n >\r\n <span class=\"icon is-small\">\r\n <i class=\"fa-solid fa-bars\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- Images section -->\r\n <ng-scrollbar\r\n class=\"images-view__scroll\"\r\n [ngClass]=\"{\r\n 'images-view__scroll--hide--mosaic': vm.displayPexelsResults && !listDisplayed,\r\n 'images-view__scroll--hide--table': vm.displayPexelsResults && listDisplayed,\r\n 'images-view__scroll--full': stateDisplayed === 'full',\r\n 'images-view__scroll--smallDisplay' : stateDisplayed === 'small' && tabDisplayed !== 'img-upload',\r\n 'images-view__scroll--smallUploadDisplay' : stateDisplayed === 'small' && tabDisplayed === 'img-upload',\r\n 'images-view__scroll--window': stateDisplayed === 'window'\r\n }\"\r\n >\r\n <div #imgLibContainer class=\"images-view__wrapper\">\r\n\r\n <div *ngIf=\"!listDisplayed || stateDisplayed === 'small'\" [@easeInOut]=\"'in'\">\r\n <mosaic-view\r\n [picturesList]=\"vm.picturesList\"\r\n (picturesListChange)=\"onPicturesListChange(vm.picturesList)\"\r\n [tableFilters]=\"vm.tableFilters\"\r\n (filtersChange)=\"searchImagesParameters$.next(getParams(vm.tableFilters));\"\r\n [(disable)]=\"disable\"\r\n (pictureNameChange)=\"onRenamePicture($event)\"\r\n (switchDisplayWindow)=\"switchDisplayWindowMosaic()\"\r\n [nbFakeImg]=\"nbFakeImg\"\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [tabDisplayed]=\"tabDisplayed\"\r\n [displayPexelsResults]=\"vm.displayPexelsResults\"\r\n [isLoading]=\"vm.isLoading\"\r\n [fullSize]=\"fullSize\"\r\n >\r\n </mosaic-view>\r\n </div>\r\n\r\n <div *ngIf=\"listDisplayed && stateDisplayed !== 'small'\" [@easeInOut]=\"'in'\">\r\n <table-view\r\n [picturesList]=\"vm.picturesList\"\r\n (picturesListChange)=\"onPicturesListChange(vm.picturesList)\"\r\n [tableFilters]=\"vm.tableFilters\"\r\n (filtersChange)=\"searchImagesParameters$.next(getParams(vm.tableFilters));\"\r\n [(disable)]=\"disable\"\r\n (pictureNameChange)=\"onRenamePicture($event)\"\r\n [displayPexelsResults]=\"vm.displayPexelsResults\"\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [isLoading]=\"vm.isLoading\"\r\n >\r\n </table-view>\r\n </div>\r\n </div>\r\n </ng-scrollbar>\r\n\r\n <!-- Pexels Section - When no img found -->\r\n <div\r\n *ngIf=\"vm.displayPexelsResults\"\r\n class=\"images-view--pexels\"\r\n [@easeInOut]=\"'in'\">\r\n <pexels-lib\r\n [searchValue]=\"vm.tableFilters.searchValue\"\r\n [disableSearch]=\"true\"\r\n >\r\n </pexels-lib>\r\n </div>\r\n</ng-container>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.NgScrollbar, selector: "ng-scrollbar", inputs: ["disabled", "sensorDisabled", "pointerEventsDisabled", "viewportPropagateMouseMove", "autoHeightDisabled", "autoWidthDisabled", "viewClass", "trackClass", "thumbClass", "minThumbSize", "trackClickScrollDuration", "pointerEventsMethod", "track", "visibility", "appearance", "position", "sensorDebounce", "scrollAuditTime"], outputs: ["updated"], exportAs: ["ngScrollbar"] }, { kind: "component", type: PexelLibComponent, selector: "pexels-lib", inputs: ["stateDisplayed", "searchValue", "disableSearch"] }, { kind: "component", type: MosaicViewComponent, selector: "mosaic-view", inputs: ["tabDisplayed", "fullSize", "nbFakeImg"], outputs: ["switchDisplayWindow"] }, { kind: "component", type: TableViewComponent, selector: "table-view" }, { kind: "directive", type: LoadingDirective, selector: "[btnLoadingAnim]" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], animations: [
|
|
3448
|
+
easeInOut,
|
|
3449
|
+
insertRemove
|
|
3450
|
+
] });
|
|
3305
3451
|
}
|
|
3306
|
-
|
|
3307
|
-
ImagesViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ImagesViewComponent, selector: "images-view", inputs: { stateDisplayed: "stateDisplayed", tabDisplayed: "tabDisplayed", fullSize: "fullSize", nbRowToShow: "nbRowToShow", listDisplayed: "listDisplayed", multipleImgMode: "multipleImgMode" }, outputs: { switchDisplayWindow: "switchDisplayWindow" }, viewQueries: [{ propertyName: "imgLibContainer", first: true, predicate: ["imgLibContainer"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"vm$ | async as vm\">\r\n\r\n <div class=\"images-view\" [ngClass]=\"{'fullSize': fullSize, 'small': stateDisplayed === 'small'}\" [@easeInOut]=\"'in'\">\r\n <!-- Subheader : Img number and actions btn (sup img list, switch forma display) -->\r\n <div\r\n *ngIf=\"(stateDisplayed !== 'small' || tabDisplayed === 'img-upload')\"\r\n class=\"images-view__container\"\r\n [ngClass]=\"{'images-view__container--uploadTab': tabDisplayed === 'img-upload', 'images-view__container--window': stateDisplayed === 'window'}\"\r\n >\r\n\r\n <div *ngIf=\"tabDisplayed !== 'img-upload'\">\r\n <p class=\"mainColor\" [ngClass]=\"{'images-view__container__total--hide': vm.displayPexelsResults}\">{{ 'ImgManager.ImgLib.nbImg' | translate }} : {{vm.imageTotal}}</p>\r\n </div>\r\n <div *ngIf=\"tabDisplayed === 'img-upload'\">\r\n <p class=\"mainColor\">{{ 'ImgManager.ImgLib.lastImgs' | translate }}</p>\r\n </div>\r\n\r\n <div class=\"field has-addons subHeaderActions\" *ngIf=\"tabDisplayed !== 'img-upload'\">\r\n\r\n <!-- For listforma : Display btn del multiple img & Confirm action -->\r\n <div class=\"images-view__container__boxAction\">\r\n\r\n\r\n <!-- Select -->\r\n <button\r\n class=\"button success images-view__container__boxAction__import\"\r\n @insertRemoveAnnim\r\n *ngIf=\"listDisplayed && nbImgToDelSelected && !confirmImgSup && !delListImgLoader && multipleImgMode\"\r\n (click)=\"selectImgChosen(vm.picturesList)\"\r\n type=\"button\"\r\n >\r\n <i class=\"fal fa-check\"></i>\r\n {{ 'ImgManager.ImgLib.select' | translate }} ({{nbImgToDelSelected}})\r\n </button>\r\n\r\n <!-- Display btn del multiple img -->\r\n <button\r\n *ngIf=\"listDisplayed && nbImgToDelSelected && !confirmImgSup\"\r\n (click)=\"displayConfirmImgSup()\"\r\n class=\"button images-view__container__boxAction__delBtn danger\"\r\n @insertRemoveAnnim\r\n type=\"button\"\r\n >\r\n <i class=\"fal fa-times\"></i>{{ 'ImgManager.ImgLib.delMlt' | translate }} ({{nbImgToDelSelected}})\r\n <span btnLoadingAnim *ngIf=\"delListImgLoader\" class=\"btnLoadingAnnimation\"></span>\r\n </button>\r\n\r\n <!-- Confirm action -->\r\n <div\r\n class=\"images-view__container__boxAction__confirmSup\"\r\n [ngClass]=\"{'images-view__container__boxAction__confirmSup--visible': confirmImgSup}\">\r\n <p *ngIf=\"nbImgToDelSelected > 1\" class=\"images-view__container__boxAction__confirmSup__text\">{{ 'ImgManager.ImgLib.confirmSupQuestions' | translate:{nbImage: nbImgToDelSelected} }}</p>\r\n <p *ngIf=\"nbImgToDelSelected === 1\" class=\"images-view__container__boxAction__confirmSup__text\">{{ 'ImgManager.ImgLib.confirmSupQuestion' | translate:{nbImage: nbImgToDelSelected} }}</p>\r\n <div>\r\n <button\r\n class=\"button images-view__container__boxAction__confirmSup__cancel\"\r\n (click)=\"cancelSup()\"\r\n type=\"button\"\r\n >\r\n {{ 'ImgManager.ImgLib.cancel' | translate }}\r\n </button>\r\n <button\r\n (click)=\"removeListImg(vm.picturesList)\"\r\n class=\"button images-view__container__delBtn danger\"\r\n type=\"button\"\r\n >\r\n {{ 'ImgManager.ImgLib.confirm' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <!-- Swith mosaic/list forma -->\r\n <div class=\"field has-addons images-view__container__buttonBox\">\r\n <div class=\"control\">\r\n <div\r\n class=\"button is-lighted images-view__container__buttonBox__btn\"\r\n [ngClass]=\"{'actifDisplayed': !listDisplayed}\"\r\n (click)=\"onSwitchFormatDisplayed(false)\"\r\n >\r\n <span class=\"icon is-small\">\r\n <i class=\"fa-solid fa-th\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"control\">\r\n <div class=\"button is-lighted images-view__container__buttonBox__btn\"\r\n [ngClass]=\"{'actifDisplayed': listDisplayed}\"\r\n (click)=\"onSwitchFormatDisplayed(true)\"\r\n >\r\n <span class=\"icon is-small\">\r\n <i class=\"fa-solid fa-bars\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- Images section -->\r\n <ng-scrollbar\r\n class=\"images-view__scroll\"\r\n [ngClass]=\"{\r\n 'images-view__scroll--hide--mosaic': vm.displayPexelsResults && !listDisplayed,\r\n 'images-view__scroll--hide--table': vm.displayPexelsResults && listDisplayed,\r\n 'images-view__scroll--full': stateDisplayed === 'full',\r\n 'images-view__scroll--smallDisplay' : stateDisplayed === 'small' && tabDisplayed !== 'img-upload',\r\n 'images-view__scroll--smallUploadDisplay' : stateDisplayed === 'small' && tabDisplayed === 'img-upload',\r\n 'images-view__scroll--window': stateDisplayed === 'window'\r\n }\"\r\n >\r\n <div #imgLibContainer class=\"images-view__wrapper\">\r\n\r\n <div *ngIf=\"!listDisplayed || stateDisplayed === 'small'\" [@easeInOut]=\"'in'\">\r\n <mosaic-view\r\n [picturesList]=\"vm.picturesList\"\r\n (picturesListChange)=\"onPicturesListChange(vm.picturesList)\"\r\n [tableFilters]=\"vm.tableFilters\"\r\n (filtersChange)=\"searchImagesParameters$.next(getParams(vm.tableFilters));\"\r\n [(disable)]=\"disable\"\r\n (pictureNameChange)=\"onRenamePicture($event)\"\r\n (switchDisplayWindow)=\"switchDisplayWindowMosaic()\"\r\n [nbFakeImg]=\"nbFakeImg\"\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [tabDisplayed]=\"tabDisplayed\"\r\n [displayPexelsResults]=\"vm.displayPexelsResults\"\r\n [isLoading]=\"vm.isLoading\"\r\n [fullSize]=\"fullSize\"\r\n >\r\n </mosaic-view>\r\n </div>\r\n\r\n <div *ngIf=\"listDisplayed && stateDisplayed !== 'small'\" [@easeInOut]=\"'in'\">\r\n <table-view\r\n [picturesList]=\"vm.picturesList\"\r\n (picturesListChange)=\"onPicturesListChange(vm.picturesList)\"\r\n [tableFilters]=\"vm.tableFilters\"\r\n (filtersChange)=\"searchImagesParameters$.next(getParams(vm.tableFilters));\"\r\n [(disable)]=\"disable\"\r\n (pictureNameChange)=\"onRenamePicture($event)\"\r\n [displayPexelsResults]=\"vm.displayPexelsResults\"\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [isLoading]=\"vm.isLoading\"\r\n >\r\n </table-view>\r\n </div>\r\n </div>\r\n </ng-scrollbar>\r\n\r\n <!-- Pexels Section - When no img found -->\r\n <div\r\n *ngIf=\"vm.displayPexelsResults\"\r\n class=\"images-view--pexels\"\r\n [@easeInOut]=\"'in'\">\r\n <pexels-lib\r\n [searchValue]=\"vm.tableFilters.searchValue\"\r\n [disableSearch]=\"true\"\r\n >\r\n </pexels-lib>\r\n </div>\r\n</ng-container>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.NgScrollbar, selector: "ng-scrollbar", inputs: ["disabled", "sensorDisabled", "pointerEventsDisabled", "viewportPropagateMouseMove", "autoHeightDisabled", "autoWidthDisabled", "viewClass", "trackClass", "thumbClass", "minThumbSize", "trackClickScrollDuration", "pointerEventsMethod", "track", "visibility", "appearance", "position", "sensorDebounce", "scrollAuditTime"], outputs: ["updated"], exportAs: ["ngScrollbar"] }, { kind: "component", type: PexelLibComponent, selector: "pexels-lib", inputs: ["stateDisplayed", "searchValue", "disableSearch"] }, { kind: "component", type: MosaicViewComponent, selector: "mosaic-view", inputs: ["tabDisplayed", "fullSize", "nbFakeImg"], outputs: ["switchDisplayWindow"] }, { kind: "component", type: TableViewComponent, selector: "table-view" }, { kind: "directive", type: LoadingDirective, selector: "[btnLoadingAnim]" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], animations: [
|
|
3308
|
-
easeInOut,
|
|
3309
|
-
insertRemove
|
|
3310
|
-
] });
|
|
3311
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImagesViewComponent, decorators: [{
|
|
3452
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImagesViewComponent, decorators: [{
|
|
3312
3453
|
type: Component,
|
|
3313
3454
|
args: [{ selector: 'images-view', animations: [
|
|
3314
3455
|
easeInOut,
|
|
3315
3456
|
insertRemove
|
|
3316
3457
|
], template: "<ng-container *ngIf=\"vm$ | async as vm\">\r\n\r\n <div class=\"images-view\" [ngClass]=\"{'fullSize': fullSize, 'small': stateDisplayed === 'small'}\" [@easeInOut]=\"'in'\">\r\n <!-- Subheader : Img number and actions btn (sup img list, switch forma display) -->\r\n <div\r\n *ngIf=\"(stateDisplayed !== 'small' || tabDisplayed === 'img-upload')\"\r\n class=\"images-view__container\"\r\n [ngClass]=\"{'images-view__container--uploadTab': tabDisplayed === 'img-upload', 'images-view__container--window': stateDisplayed === 'window'}\"\r\n >\r\n\r\n <div *ngIf=\"tabDisplayed !== 'img-upload'\">\r\n <p class=\"mainColor\" [ngClass]=\"{'images-view__container__total--hide': vm.displayPexelsResults}\">{{ 'ImgManager.ImgLib.nbImg' | translate }} : {{vm.imageTotal}}</p>\r\n </div>\r\n <div *ngIf=\"tabDisplayed === 'img-upload'\">\r\n <p class=\"mainColor\">{{ 'ImgManager.ImgLib.lastImgs' | translate }}</p>\r\n </div>\r\n\r\n <div class=\"field has-addons subHeaderActions\" *ngIf=\"tabDisplayed !== 'img-upload'\">\r\n\r\n <!-- For listforma : Display btn del multiple img & Confirm action -->\r\n <div class=\"images-view__container__boxAction\">\r\n\r\n\r\n <!-- Select -->\r\n <button\r\n class=\"button success images-view__container__boxAction__import\"\r\n @insertRemoveAnnim\r\n *ngIf=\"listDisplayed && nbImgToDelSelected && !confirmImgSup && !delListImgLoader && multipleImgMode\"\r\n (click)=\"selectImgChosen(vm.picturesList)\"\r\n type=\"button\"\r\n >\r\n <i class=\"fal fa-check\"></i>\r\n {{ 'ImgManager.ImgLib.select' | translate }} ({{nbImgToDelSelected}})\r\n </button>\r\n\r\n <!-- Display btn del multiple img -->\r\n <button\r\n *ngIf=\"listDisplayed && nbImgToDelSelected && !confirmImgSup\"\r\n (click)=\"displayConfirmImgSup()\"\r\n class=\"button images-view__container__boxAction__delBtn danger\"\r\n @insertRemoveAnnim\r\n type=\"button\"\r\n >\r\n <i class=\"fal fa-times\"></i>{{ 'ImgManager.ImgLib.delMlt' | translate }} ({{nbImgToDelSelected}})\r\n <span btnLoadingAnim *ngIf=\"delListImgLoader\" class=\"btnLoadingAnnimation\"></span>\r\n </button>\r\n\r\n <!-- Confirm action -->\r\n <div\r\n class=\"images-view__container__boxAction__confirmSup\"\r\n [ngClass]=\"{'images-view__container__boxAction__confirmSup--visible': confirmImgSup}\">\r\n <p *ngIf=\"nbImgToDelSelected > 1\" class=\"images-view__container__boxAction__confirmSup__text\">{{ 'ImgManager.ImgLib.confirmSupQuestions' | translate:{nbImage: nbImgToDelSelected} }}</p>\r\n <p *ngIf=\"nbImgToDelSelected === 1\" class=\"images-view__container__boxAction__confirmSup__text\">{{ 'ImgManager.ImgLib.confirmSupQuestion' | translate:{nbImage: nbImgToDelSelected} }}</p>\r\n <div>\r\n <button\r\n class=\"button images-view__container__boxAction__confirmSup__cancel\"\r\n (click)=\"cancelSup()\"\r\n type=\"button\"\r\n >\r\n {{ 'ImgManager.ImgLib.cancel' | translate }}\r\n </button>\r\n <button\r\n (click)=\"removeListImg(vm.picturesList)\"\r\n class=\"button images-view__container__delBtn danger\"\r\n type=\"button\"\r\n >\r\n {{ 'ImgManager.ImgLib.confirm' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <!-- Swith mosaic/list forma -->\r\n <div class=\"field has-addons images-view__container__buttonBox\">\r\n <div class=\"control\">\r\n <div\r\n class=\"button is-lighted images-view__container__buttonBox__btn\"\r\n [ngClass]=\"{'actifDisplayed': !listDisplayed}\"\r\n (click)=\"onSwitchFormatDisplayed(false)\"\r\n >\r\n <span class=\"icon is-small\">\r\n <i class=\"fa-solid fa-th\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"control\">\r\n <div class=\"button is-lighted images-view__container__buttonBox__btn\"\r\n [ngClass]=\"{'actifDisplayed': listDisplayed}\"\r\n (click)=\"onSwitchFormatDisplayed(true)\"\r\n >\r\n <span class=\"icon is-small\">\r\n <i class=\"fa-solid fa-bars\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- Images section -->\r\n <ng-scrollbar\r\n class=\"images-view__scroll\"\r\n [ngClass]=\"{\r\n 'images-view__scroll--hide--mosaic': vm.displayPexelsResults && !listDisplayed,\r\n 'images-view__scroll--hide--table': vm.displayPexelsResults && listDisplayed,\r\n 'images-view__scroll--full': stateDisplayed === 'full',\r\n 'images-view__scroll--smallDisplay' : stateDisplayed === 'small' && tabDisplayed !== 'img-upload',\r\n 'images-view__scroll--smallUploadDisplay' : stateDisplayed === 'small' && tabDisplayed === 'img-upload',\r\n 'images-view__scroll--window': stateDisplayed === 'window'\r\n }\"\r\n >\r\n <div #imgLibContainer class=\"images-view__wrapper\">\r\n\r\n <div *ngIf=\"!listDisplayed || stateDisplayed === 'small'\" [@easeInOut]=\"'in'\">\r\n <mosaic-view\r\n [picturesList]=\"vm.picturesList\"\r\n (picturesListChange)=\"onPicturesListChange(vm.picturesList)\"\r\n [tableFilters]=\"vm.tableFilters\"\r\n (filtersChange)=\"searchImagesParameters$.next(getParams(vm.tableFilters));\"\r\n [(disable)]=\"disable\"\r\n (pictureNameChange)=\"onRenamePicture($event)\"\r\n (switchDisplayWindow)=\"switchDisplayWindowMosaic()\"\r\n [nbFakeImg]=\"nbFakeImg\"\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [tabDisplayed]=\"tabDisplayed\"\r\n [displayPexelsResults]=\"vm.displayPexelsResults\"\r\n [isLoading]=\"vm.isLoading\"\r\n [fullSize]=\"fullSize\"\r\n >\r\n </mosaic-view>\r\n </div>\r\n\r\n <div *ngIf=\"listDisplayed && stateDisplayed !== 'small'\" [@easeInOut]=\"'in'\">\r\n <table-view\r\n [picturesList]=\"vm.picturesList\"\r\n (picturesListChange)=\"onPicturesListChange(vm.picturesList)\"\r\n [tableFilters]=\"vm.tableFilters\"\r\n (filtersChange)=\"searchImagesParameters$.next(getParams(vm.tableFilters));\"\r\n [(disable)]=\"disable\"\r\n (pictureNameChange)=\"onRenamePicture($event)\"\r\n [displayPexelsResults]=\"vm.displayPexelsResults\"\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [isLoading]=\"vm.isLoading\"\r\n >\r\n </table-view>\r\n </div>\r\n </div>\r\n </ng-scrollbar>\r\n\r\n <!-- Pexels Section - When no img found -->\r\n <div\r\n *ngIf=\"vm.displayPexelsResults\"\r\n class=\"images-view--pexels\"\r\n [@easeInOut]=\"'in'\">\r\n <pexels-lib\r\n [searchValue]=\"vm.tableFilters.searchValue\"\r\n [disableSearch]=\"true\"\r\n >\r\n </pexels-lib>\r\n </div>\r\n</ng-container>\r\n" }]
|
|
3317
|
-
}], ctorParameters:
|
|
3458
|
+
}], ctorParameters: () => [{ type: ImgManagerService }, { type: ImgEventService }, { type: ImgSelectionService }, { type: AlertService }, { type: UserSettingsService }, { type: RenamePictureService }, { type: i0.ChangeDetectorRef }], propDecorators: { stateDisplayed: [{
|
|
3318
3459
|
type: Input
|
|
3319
3460
|
}], tabDisplayed: [{
|
|
3320
3461
|
type: Input
|
|
@@ -3334,6 +3475,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3334
3475
|
}] } });
|
|
3335
3476
|
|
|
3336
3477
|
class ZindexToggleDirective {
|
|
3478
|
+
currentElement;
|
|
3479
|
+
renderer;
|
|
3480
|
+
isActived = false;
|
|
3481
|
+
onEventChange;
|
|
3337
3482
|
set isActive(value) {
|
|
3338
3483
|
this.isActived = value;
|
|
3339
3484
|
this.switchToggle();
|
|
@@ -3344,7 +3489,6 @@ class ZindexToggleDirective {
|
|
|
3344
3489
|
constructor(currentElement, renderer) {
|
|
3345
3490
|
this.currentElement = currentElement;
|
|
3346
3491
|
this.renderer = renderer;
|
|
3347
|
-
this.isActived = false;
|
|
3348
3492
|
}
|
|
3349
3493
|
ngOnInit() {
|
|
3350
3494
|
}
|
|
@@ -3358,15 +3502,15 @@ class ZindexToggleDirective {
|
|
|
3358
3502
|
}
|
|
3359
3503
|
ngOnDestroy() {
|
|
3360
3504
|
}
|
|
3505
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ZindexToggleDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3506
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: ZindexToggleDirective, selector: "[zIndexToggle]", inputs: { isActive: ["zIndexToggle", "isActive"] }, outputs: { onEventChange: "onEventChange" }, ngImport: i0 });
|
|
3361
3507
|
}
|
|
3362
|
-
|
|
3363
|
-
ZindexToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ZindexToggleDirective, selector: "[zIndexToggle]", inputs: { isActive: ["zIndexToggle", "isActive"] }, outputs: { onEventChange: "onEventChange" }, ngImport: i0 });
|
|
3364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ZindexToggleDirective, decorators: [{
|
|
3508
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ZindexToggleDirective, decorators: [{
|
|
3365
3509
|
type: Directive,
|
|
3366
3510
|
args: [{
|
|
3367
3511
|
selector: '[zIndexToggle]'
|
|
3368
3512
|
}]
|
|
3369
|
-
}], ctorParameters:
|
|
3513
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { onEventChange: [{
|
|
3370
3514
|
type: Output
|
|
3371
3515
|
}], isActive: [{
|
|
3372
3516
|
type: Input,
|
|
@@ -3380,10 +3524,10 @@ class SelectFiltersPipe {
|
|
|
3380
3524
|
return regexp.test(item.name);
|
|
3381
3525
|
});
|
|
3382
3526
|
}
|
|
3527
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SelectFiltersPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3528
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: SelectFiltersPipe, name: "selectFilters" });
|
|
3383
3529
|
}
|
|
3384
|
-
|
|
3385
|
-
SelectFiltersPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: SelectFiltersPipe, name: "selectFilters" });
|
|
3386
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SelectFiltersPipe, decorators: [{
|
|
3530
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SelectFiltersPipe, decorators: [{
|
|
3387
3531
|
type: Pipe,
|
|
3388
3532
|
args: [{
|
|
3389
3533
|
name: 'selectFilters'
|
|
@@ -3391,20 +3535,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3391
3535
|
}] });
|
|
3392
3536
|
|
|
3393
3537
|
class SelectComponent {
|
|
3538
|
+
translateService;
|
|
3539
|
+
items;
|
|
3540
|
+
placeholder;
|
|
3541
|
+
label;
|
|
3542
|
+
maxWidthItems;
|
|
3543
|
+
search = false;
|
|
3544
|
+
type = 'default';
|
|
3545
|
+
callToAction;
|
|
3546
|
+
maxWidth = '100%';
|
|
3547
|
+
disabled = false;
|
|
3548
|
+
selectValue = new EventEmitter();
|
|
3549
|
+
clickOnCallToAction = new EventEmitter();
|
|
3550
|
+
searchElement;
|
|
3551
|
+
openCategories = false;
|
|
3552
|
+
searchValue = '';
|
|
3553
|
+
indexItemSelected = -1;
|
|
3394
3554
|
constructor(translateService) {
|
|
3395
3555
|
this.translateService = translateService;
|
|
3396
|
-
this.search = false;
|
|
3397
|
-
this.type = 'default';
|
|
3398
|
-
this.maxWidth = '100%';
|
|
3399
|
-
this.disabled = false;
|
|
3400
|
-
this.selectValue = new EventEmitter();
|
|
3401
|
-
this.clickOnCallToAction = new EventEmitter();
|
|
3402
|
-
this.openCategories = false;
|
|
3403
|
-
this.searchValue = '';
|
|
3404
|
-
this.indexItemSelected = -1;
|
|
3405
|
-
// ControlValueAccessor methods
|
|
3406
|
-
this.onChange = () => { };
|
|
3407
|
-
this.onTouch = () => { };
|
|
3408
3556
|
}
|
|
3409
3557
|
ngOnInit() {
|
|
3410
3558
|
this.indexItemSelected = this.items.findIndex(item => item.selected);
|
|
@@ -3442,6 +3590,9 @@ class SelectComponent {
|
|
|
3442
3590
|
setIndexItemSelected(id) {
|
|
3443
3591
|
this.indexItemSelected = this.items.findIndex(item => item.id === id);
|
|
3444
3592
|
}
|
|
3593
|
+
// ControlValueAccessor methods
|
|
3594
|
+
onChange = () => { };
|
|
3595
|
+
onTouch = () => { };
|
|
3445
3596
|
writeValue(selectItem) {
|
|
3446
3597
|
if (!selectItem) {
|
|
3447
3598
|
return;
|
|
@@ -3456,13 +3607,13 @@ class SelectComponent {
|
|
|
3456
3607
|
registerOnTouched(fn) {
|
|
3457
3608
|
this.onTouch = fn;
|
|
3458
3609
|
}
|
|
3610
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SelectComponent, deps: [{ token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3611
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: SelectComponent, selector: "wac-select", inputs: { items: "items", placeholder: "placeholder", label: "label", maxWidthItems: "maxWidthItems", search: "search", type: "type", callToAction: "callToAction", maxWidth: "maxWidth", disabled: "disabled" }, outputs: { selectValue: "selectValue", clickOnCallToAction: "clickOnCallToAction" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true }], viewQueries: [{ propertyName: "searchElement", first: true, predicate: ["search"], descendants: true }], ngImport: i0, template: "<p *ngIf=\"label\" [innerHTML]=\"label\" class=\"wac-select__label\"></p>\r\n\r\n<div class=\"wac-select\" wzAutoHide (clickOutside)=\"onClose()\" [ngStyle]=\"{ 'max-width': maxWidth }\" [zIndexToggle]=\"openCategories\">\r\n\r\n <div class=\"wac-select__current\" [ngClass]=\"{ 'select-disabled' : disabled }\" (click)=\"!disabled && openCategories = !openCategories\" *ngIf=\"!search\">\r\n <span *ngIf=\"indexItemSelected !== -1\" class=\"icon\" [innerHTML]=\"items[indexItemSelected].icon\"></span>\r\n <span [innerHTML]=\"(indexItemSelected !== -1 ? items[indexItemSelected].name : placeholder) | translate\"></span><span><i class=\"fa-solid fa-chevron-down\"></i></span>\r\n </div>\r\n\r\n <div class=\"wac-select__current wac-select__current--withSearch\" [ngClass]=\"{ 'select-disabled' : disabled, 'open-search': openCategories }\" *ngIf=\"search\">\r\n <div class=\"wac-select__current__search\" *ngIf=\"openCategories && !disabled\">\r\n <i class=\"far fa-search\"></i>\r\n <input #search type=\"text\" [(ngModel)]=\"searchValue\" />\r\n </div>\r\n <span (click)=\"openCategories = !openCategories;\" *ngIf=\"items[indexItemSelected]?.icon && !openCategories\" class=\"icon\" [innerHTML]=\"items[indexItemSelected].icon\"></span>\r\n <span (click)=\"showCategories()\" [innerHTML]=\"items[indexItemSelected]?.name ? items[indexItemSelected].name : placeholder\"></span>\r\n <span (click)=\"openCategories = !openCategories;\"><i class=\"fa-solid fa-chevron-down\"></i></span>\r\n </div>\r\n\r\n <div class=\"wac-select__content\" *ngIf=\"!disabled\" [ngClass]=\"{ hidden: !openCategories, open: type === 'open' }\" [ngStyle]=\"{ 'max-width': maxWidthItems }\">\r\n <ng-scrollbar *ngIf=\"items.length\" style=\"height: 110px; width: 100%;\">\r\n\r\n <div *ngIf=\"callToAction\" class=\"wac-select__content__cta\">\r\n <div (click)=\"onClickCallToAction()\">\r\n <i *ngIf=\"callToAction.icon\" [classList]=\"callToAction.icon\"></i><strong *ngIf=\"callToAction.boldText\">{{ callToAction.boldText }}</strong\r\n ><span>{{ callToAction?.name }}</span>\r\n </div>\r\n </div>\r\n\r\n <div\r\n *ngFor=\"let item of items | selectFilters: searchValue; let index = index;\"\r\n (click)=\"onClose()\"\r\n class=\"wac-select__content__item\"\r\n >\r\n <div *ngIf=\"!item.hide\" [ngClass]=\"{ selected: item.selected }\" (click)=\"onSelectItem(item.id)\">\r\n <span class=\"icon\" [innerHTML]=\"item.icon\" *ngIf=\"item.icon\"></span>{{ item.name | translate }}\r\n </div>\r\n </div>\r\n\r\n </ng-scrollbar>\r\n\r\n <div *ngIf=\"!(items | selectFilters: searchValue)?.length\" class=\"wac-select__content__empty\">\r\n <span>{{'wac.datatable.noresult' | translate}}</span>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.NgScrollbar, selector: "ng-scrollbar", inputs: ["disabled", "sensorDisabled", "pointerEventsDisabled", "viewportPropagateMouseMove", "autoHeightDisabled", "autoWidthDisabled", "viewClass", "trackClass", "thumbClass", "minThumbSize", "trackClickScrollDuration", "pointerEventsMethod", "track", "visibility", "appearance", "position", "sensorDebounce", "scrollAuditTime"], outputs: ["updated"], exportAs: ["ngScrollbar"] }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }, { kind: "directive", type: ZindexToggleDirective, selector: "[zIndexToggle]", inputs: ["zIndexToggle"], outputs: ["onEventChange"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: SelectFiltersPipe, name: "selectFilters" }] });
|
|
3459
3612
|
}
|
|
3460
|
-
|
|
3461
|
-
SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SelectComponent, selector: "wac-select", inputs: { items: "items", placeholder: "placeholder", label: "label", maxWidthItems: "maxWidthItems", search: "search", type: "type", callToAction: "callToAction", maxWidth: "maxWidth", disabled: "disabled" }, outputs: { selectValue: "selectValue", clickOnCallToAction: "clickOnCallToAction" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true }], viewQueries: [{ propertyName: "searchElement", first: true, predicate: ["search"], descendants: true }], ngImport: i0, template: "<p *ngIf=\"label\" [innerHTML]=\"label\" class=\"wac-select__label\"></p>\r\n\r\n<div class=\"wac-select\" wzAutoHide (clickOutside)=\"onClose()\" [ngStyle]=\"{ 'max-width': maxWidth }\" [zIndexToggle]=\"openCategories\">\r\n\r\n <div class=\"wac-select__current\" [ngClass]=\"{ 'select-disabled' : disabled }\" (click)=\"!disabled && openCategories = !openCategories\" *ngIf=\"!search\">\r\n <span *ngIf=\"indexItemSelected !== -1\" class=\"icon\" [innerHTML]=\"items[indexItemSelected].icon\"></span>\r\n <span [innerHTML]=\"(indexItemSelected !== -1 ? items[indexItemSelected].name : placeholder) | translate\"></span><span><i class=\"fa-solid fa-chevron-down\"></i></span>\r\n </div>\r\n\r\n <div class=\"wac-select__current wac-select__current--withSearch\" [ngClass]=\"{ 'select-disabled' : disabled, 'open-search': openCategories }\" *ngIf=\"search\">\r\n <div class=\"wac-select__current__search\" *ngIf=\"openCategories && !disabled\">\r\n <i class=\"far fa-search\"></i>\r\n <input #search type=\"text\" [(ngModel)]=\"searchValue\" />\r\n </div>\r\n <span (click)=\"openCategories = !openCategories;\" *ngIf=\"items[indexItemSelected]?.icon && !openCategories\" class=\"icon\" [innerHTML]=\"items[indexItemSelected].icon\"></span>\r\n <span (click)=\"showCategories()\" [innerHTML]=\"items[indexItemSelected]?.name ? items[indexItemSelected].name : placeholder\"></span>\r\n <span (click)=\"openCategories = !openCategories;\"><i class=\"fa-solid fa-chevron-down\"></i></span>\r\n </div>\r\n\r\n <div class=\"wac-select__content\" *ngIf=\"!disabled\" [ngClass]=\"{ hidden: !openCategories, open: type === 'open' }\" [ngStyle]=\"{ 'max-width': maxWidthItems }\">\r\n <ng-scrollbar *ngIf=\"items.length\" style=\"height: 110px; width: 100%;\">\r\n\r\n <div *ngIf=\"callToAction\" class=\"wac-select__content__cta\">\r\n <div (click)=\"onClickCallToAction()\">\r\n <i *ngIf=\"callToAction.icon\" [classList]=\"callToAction.icon\"></i><strong *ngIf=\"callToAction.boldText\">{{ callToAction.boldText }}</strong\r\n ><span>{{ callToAction?.name }}</span>\r\n </div>\r\n </div>\r\n\r\n <div\r\n *ngFor=\"let item of items | selectFilters: searchValue; let index = index;\"\r\n (click)=\"onClose()\"\r\n class=\"wac-select__content__item\"\r\n >\r\n <div *ngIf=\"!item.hide\" [ngClass]=\"{ selected: item.selected }\" (click)=\"onSelectItem(item.id)\">\r\n <span class=\"icon\" [innerHTML]=\"item.icon\" *ngIf=\"item.icon\"></span>{{ item.name | translate }}\r\n </div>\r\n </div>\r\n\r\n </ng-scrollbar>\r\n\r\n <div *ngIf=\"!(items | selectFilters: searchValue)?.length\" class=\"wac-select__content__empty\">\r\n <span>{{'wac.datatable.noresult' | translate}}</span>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.NgScrollbar, selector: "ng-scrollbar", inputs: ["disabled", "sensorDisabled", "pointerEventsDisabled", "viewportPropagateMouseMove", "autoHeightDisabled", "autoWidthDisabled", "viewClass", "trackClass", "thumbClass", "minThumbSize", "trackClickScrollDuration", "pointerEventsMethod", "track", "visibility", "appearance", "position", "sensorDebounce", "scrollAuditTime"], outputs: ["updated"], exportAs: ["ngScrollbar"] }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }, { kind: "directive", type: ZindexToggleDirective, selector: "[zIndexToggle]", inputs: ["zIndexToggle"], outputs: ["onEventChange"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: SelectFiltersPipe, name: "selectFilters" }] });
|
|
3462
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SelectComponent, decorators: [{
|
|
3613
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SelectComponent, decorators: [{
|
|
3463
3614
|
type: Component,
|
|
3464
3615
|
args: [{ selector: 'wac-select', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true }], template: "<p *ngIf=\"label\" [innerHTML]=\"label\" class=\"wac-select__label\"></p>\r\n\r\n<div class=\"wac-select\" wzAutoHide (clickOutside)=\"onClose()\" [ngStyle]=\"{ 'max-width': maxWidth }\" [zIndexToggle]=\"openCategories\">\r\n\r\n <div class=\"wac-select__current\" [ngClass]=\"{ 'select-disabled' : disabled }\" (click)=\"!disabled && openCategories = !openCategories\" *ngIf=\"!search\">\r\n <span *ngIf=\"indexItemSelected !== -1\" class=\"icon\" [innerHTML]=\"items[indexItemSelected].icon\"></span>\r\n <span [innerHTML]=\"(indexItemSelected !== -1 ? items[indexItemSelected].name : placeholder) | translate\"></span><span><i class=\"fa-solid fa-chevron-down\"></i></span>\r\n </div>\r\n\r\n <div class=\"wac-select__current wac-select__current--withSearch\" [ngClass]=\"{ 'select-disabled' : disabled, 'open-search': openCategories }\" *ngIf=\"search\">\r\n <div class=\"wac-select__current__search\" *ngIf=\"openCategories && !disabled\">\r\n <i class=\"far fa-search\"></i>\r\n <input #search type=\"text\" [(ngModel)]=\"searchValue\" />\r\n </div>\r\n <span (click)=\"openCategories = !openCategories;\" *ngIf=\"items[indexItemSelected]?.icon && !openCategories\" class=\"icon\" [innerHTML]=\"items[indexItemSelected].icon\"></span>\r\n <span (click)=\"showCategories()\" [innerHTML]=\"items[indexItemSelected]?.name ? items[indexItemSelected].name : placeholder\"></span>\r\n <span (click)=\"openCategories = !openCategories;\"><i class=\"fa-solid fa-chevron-down\"></i></span>\r\n </div>\r\n\r\n <div class=\"wac-select__content\" *ngIf=\"!disabled\" [ngClass]=\"{ hidden: !openCategories, open: type === 'open' }\" [ngStyle]=\"{ 'max-width': maxWidthItems }\">\r\n <ng-scrollbar *ngIf=\"items.length\" style=\"height: 110px; width: 100%;\">\r\n\r\n <div *ngIf=\"callToAction\" class=\"wac-select__content__cta\">\r\n <div (click)=\"onClickCallToAction()\">\r\n <i *ngIf=\"callToAction.icon\" [classList]=\"callToAction.icon\"></i><strong *ngIf=\"callToAction.boldText\">{{ callToAction.boldText }}</strong\r\n ><span>{{ callToAction?.name }}</span>\r\n </div>\r\n </div>\r\n\r\n <div\r\n *ngFor=\"let item of items | selectFilters: searchValue; let index = index;\"\r\n (click)=\"onClose()\"\r\n class=\"wac-select__content__item\"\r\n >\r\n <div *ngIf=\"!item.hide\" [ngClass]=\"{ selected: item.selected }\" (click)=\"onSelectItem(item.id)\">\r\n <span class=\"icon\" [innerHTML]=\"item.icon\" *ngIf=\"item.icon\"></span>{{ item.name | translate }}\r\n </div>\r\n </div>\r\n\r\n </ng-scrollbar>\r\n\r\n <div *ngIf=\"!(items | selectFilters: searchValue)?.length\" class=\"wac-select__content__empty\">\r\n <span>{{'wac.datatable.noresult' | translate}}</span>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n" }]
|
|
3465
|
-
}], ctorParameters:
|
|
3616
|
+
}], ctorParameters: () => [{ type: i3.TranslateService }], propDecorators: { items: [{
|
|
3466
3617
|
type: Input
|
|
3467
3618
|
}], placeholder: [{
|
|
3468
3619
|
type: Input
|
|
@@ -3490,48 +3641,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3490
3641
|
}] } });
|
|
3491
3642
|
|
|
3492
3643
|
class ImgTabsComponent {
|
|
3644
|
+
imgEventEditService;
|
|
3645
|
+
alertService;
|
|
3646
|
+
route;
|
|
3647
|
+
multipleImgMode = false;
|
|
3648
|
+
stateDisplayed;
|
|
3649
|
+
listDisplayed = false;
|
|
3650
|
+
imgManagerClosed = new EventEmitter();
|
|
3651
|
+
currentTab = new EventEmitter();
|
|
3652
|
+
switchDisplayWindow = new EventEmitter();
|
|
3653
|
+
tabs = [
|
|
3654
|
+
{
|
|
3655
|
+
name: 'ImgManager.Tabs.addImg',
|
|
3656
|
+
value: 'img-upload',
|
|
3657
|
+
selected: true,
|
|
3658
|
+
id: 0
|
|
3659
|
+
},
|
|
3660
|
+
{
|
|
3661
|
+
name: 'ImgManager.Tabs.imgLib',
|
|
3662
|
+
value: 'images-view',
|
|
3663
|
+
id: 1
|
|
3664
|
+
},
|
|
3665
|
+
{
|
|
3666
|
+
name: 'ImgManager.Tabs.freeImgLib',
|
|
3667
|
+
value: 'pexels-lib',
|
|
3668
|
+
id: 2
|
|
3669
|
+
},
|
|
3670
|
+
{
|
|
3671
|
+
name: 'ImgManager.Tabs.Editor',
|
|
3672
|
+
value: 'img-edition',
|
|
3673
|
+
hide: true,
|
|
3674
|
+
id: 3
|
|
3675
|
+
}
|
|
3676
|
+
];
|
|
3677
|
+
tabActive = this.tabs[0];
|
|
3678
|
+
/* tabActive = 'images-view';
|
|
3679
|
+
tabs: string[] = ['img-upload', 'images-view', 'pexels-lib', 'img-edition']; */
|
|
3680
|
+
editTab = false;
|
|
3681
|
+
imgToEdit;
|
|
3682
|
+
imgUpload = false;
|
|
3683
|
+
imgUploadedComponent;
|
|
3684
|
+
snackBarNewVersionConfig = {
|
|
3685
|
+
message: '',
|
|
3686
|
+
duration: 3000
|
|
3687
|
+
};
|
|
3493
3688
|
constructor(imgEventEditService, alertService, route) {
|
|
3494
3689
|
this.imgEventEditService = imgEventEditService;
|
|
3495
3690
|
this.alertService = alertService;
|
|
3496
3691
|
this.route = route;
|
|
3497
|
-
this.multipleImgMode = false;
|
|
3498
|
-
this.listDisplayed = false;
|
|
3499
|
-
this.imgManagerClosed = new EventEmitter();
|
|
3500
|
-
this.currentTab = new EventEmitter();
|
|
3501
|
-
this.switchDisplayWindow = new EventEmitter();
|
|
3502
|
-
this.tabs = [
|
|
3503
|
-
{
|
|
3504
|
-
name: 'ImgManager.Tabs.addImg',
|
|
3505
|
-
value: 'img-upload',
|
|
3506
|
-
selected: true,
|
|
3507
|
-
id: 0
|
|
3508
|
-
},
|
|
3509
|
-
{
|
|
3510
|
-
name: 'ImgManager.Tabs.imgLib',
|
|
3511
|
-
value: 'images-view',
|
|
3512
|
-
id: 1
|
|
3513
|
-
},
|
|
3514
|
-
{
|
|
3515
|
-
name: 'ImgManager.Tabs.freeImgLib',
|
|
3516
|
-
value: 'pexels-lib',
|
|
3517
|
-
id: 2
|
|
3518
|
-
},
|
|
3519
|
-
{
|
|
3520
|
-
name: 'ImgManager.Tabs.Editor',
|
|
3521
|
-
value: 'img-edition',
|
|
3522
|
-
hide: true,
|
|
3523
|
-
id: 3
|
|
3524
|
-
}
|
|
3525
|
-
];
|
|
3526
|
-
this.tabActive = this.tabs[0];
|
|
3527
|
-
/* tabActive = 'images-view';
|
|
3528
|
-
tabs: string[] = ['img-upload', 'images-view', 'pexels-lib', 'img-edition']; */
|
|
3529
|
-
this.editTab = false;
|
|
3530
|
-
this.imgUpload = false;
|
|
3531
|
-
this.snackBarNewVersionConfig = {
|
|
3532
|
-
message: '',
|
|
3533
|
-
duration: 3000
|
|
3534
|
-
};
|
|
3535
3692
|
}
|
|
3536
3693
|
ngOnInit() {
|
|
3537
3694
|
this.imgEventEditService.getImgToEditEventListener().subscribe(imgToEdit => {
|
|
@@ -3569,13 +3726,13 @@ class ImgTabsComponent {
|
|
|
3569
3726
|
onImgManagerClosed() {
|
|
3570
3727
|
this.imgManagerClosed.emit();
|
|
3571
3728
|
}
|
|
3729
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgTabsComponent, deps: [{ token: ImgEventService }, { token: AlertService }, { token: i3$2.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
3730
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: ImgTabsComponent, selector: "img-tabs", inputs: { multipleImgMode: "multipleImgMode", stateDisplayed: "stateDisplayed", listDisplayed: "listDisplayed" }, outputs: { imgManagerClosed: "imgManagerClosed", currentTab: "currentTab", switchDisplayWindow: "switchDisplayWindow" }, viewQueries: [{ propertyName: "imgUploadedComponent", first: true, predicate: ["imgUploadedImg"], descendants: true }], ngImport: i0, template: "<div\r\n class=\"img-tabs\" [ngClass]=\"{'small': stateDisplayed === 'small'}\">\r\n <div class=\"wrapper-tabs\">\r\n <div\r\n class=\"tabs\"\r\n [ngClass]=\"\r\n {\r\n 'tabs--notWindow': stateDisplayed !== 'window',\r\n 'tabs--notDisplayed': stateDisplayed === 'window' && tabActive.value === tabs[3].value\r\n }\">\r\n\r\n <ul>\r\n <li class=\"is-active\" [ngClass]=\"{'is-active': tabActive.value === tabs[0].value}\" (click)=\"toggleTabs(tabs[0])\"><a>{{ tabs[0].name | translate }}</a></li>\r\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[1].value}\" (click)=\"toggleTabs(tabs[1])\"><a>{{ tabs[1].name | translate }}</a></li>\r\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[2].value}\" (click)=\"toggleTabs(tabs[2])\"><a>{{ tabs[2].name | translate }}</a></li>\r\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[3].value}\" *ngIf=\"editTab\"><a>{{ tabs[3].name | translate }}</a></li>\r\n </ul>\r\n <div\r\n class=\"img-tabs__canva\"\r\n [ngClass]=\"{'img-tabs__canva--window': stateDisplayed === 'window'}\">\r\n <canva-btn\r\n (showImgUploaded)=\"onShowImgUploaded()\"\r\n [stateDisplayed]=\"stateDisplayed\">\r\n </canva-btn>\r\n </div>\r\n </div>\r\n <div class=\"select-mobile-page\">\r\n <wac-select\r\n [(ngModel)]=\"tabActive\"\r\n name=\"tabs\"\r\n [items]=\"tabs\"\r\n ></wac-select>\r\n </div>\r\n </div>\r\n\r\n <!-- Upload section -->\r\n <div\r\n class=\"columns img-tabs__tabsFirst\"\r\n [ngClass]=\"{\r\n 'img-tabs__tabsFirst--small': stateDisplayed === 'small',\r\n 'img-tabs__tabsFirst--window': stateDisplayed === 'window'\r\n }\"\r\n *ngIf=\"tabActive.value === tabs[0].value\">\r\n <div class=\"column img-tabs__tabsFirst__upload\">\r\n <img-upload\r\n [stateDisplayed]=\"stateDisplayed\"\r\n (imgUploaded)=\"onImgUploaded($event)\"\r\n ></img-upload>\r\n </div>\r\n <div class=\"column img-tabs__tabsFirst__list\" [ngClass]=\"{\r\n 'img-tabs__tabsFirst__list--upload': imgUpload\r\n }\">\r\n <images-view\r\n *ngIf=\"!imgUpload\"\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [listDisplayed]=\"false\"\r\n [multipleImgMode]=\"multipleImgMode\"\r\n [tabDisplayed]=\"tabActive.value\"\r\n [nbRowToShow]=\"2\"\r\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\r\n [fullSize]=\"false\">\r\n </images-view>\r\n\r\n\r\n <div [hidden]=\"!imgUpload\">\r\n <upload-list\r\n #imgUploadedImg\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [tabDisplayed]=\"tabActive.value\"\r\n [multipleImgMode]=\"multipleImgMode\"\r\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\r\n >\r\n </upload-list>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Images section -->\r\n <div class=\"columns img-tabs__tabsSecond\" *ngIf=\"tabActive.value === tabs[1].value\">\r\n <div class=\"column\">\r\n\r\n <images-view\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [listDisplayed]=\"listDisplayed\"\r\n [multipleImgMode]=\"multipleImgMode\"\r\n [tabDisplayed]=\"tabActive.value\"\r\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\r\n [fullSize]=\"true\">\r\n </images-view>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Pexels img section -->\r\n <div class=\"columns img-tabs__tabsThird\" *ngIf=\"tabActive.value === tabs[2].value\">\r\n <div class=\"column\">\r\n <pexels-lib\r\n [stateDisplayed]=\"stateDisplayed\"\r\n (showImgUploaded)=\"onShowImgUploaded()\">\r\n </pexels-lib>\r\n </div>\r\n </div>\r\n\r\n <!--Edition section -->\r\n <div class=\"columns img-tabs__tabsEdit\" *ngIf=\"tabActive.value === tabs[3].value\">\r\n <div class=\"column\">\r\n <img-editor\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [imgToEdit]=\"imgToEdit\"\r\n (editClosed)=\"onEditClosed($event)\">\r\n </img-editor>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ImgUploadComponent, selector: "img-upload", inputs: ["stateDisplayed"], outputs: ["imgUploaded"] }, { kind: "component", type: PexelLibComponent, selector: "pexels-lib", inputs: ["stateDisplayed", "searchValue", "disableSearch"] }, { kind: "component", type: UploadListComponent, selector: "upload-list", inputs: ["stateDisplayed", "tabDisplayed", "multipleImgMode"], outputs: ["switchDisplayWindow"] }, { kind: "component", type: ImgEditorComponent, selector: "img-editor", inputs: ["stateDisplayed", "imgToEdit"], outputs: ["editClosed"] }, { kind: "component", type: CanvaBtnComponent, selector: "canva-btn", inputs: ["stateDisplayed"], outputs: ["showImgUploaded"] }, { kind: "component", type: ImagesViewComponent, selector: "images-view", inputs: ["stateDisplayed", "tabDisplayed", "fullSize", "nbRowToShow", "listDisplayed", "multipleImgMode"], outputs: ["switchDisplayWindow"] }, { kind: "component", type: SelectComponent, selector: "wac-select", inputs: ["items", "placeholder", "label", "maxWidthItems", "search", "type", "callToAction", "maxWidth", "disabled"], outputs: ["selectValue", "clickOnCallToAction"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
|
|
3572
3731
|
}
|
|
3573
|
-
|
|
3574
|
-
ImgTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ImgTabsComponent, selector: "img-tabs", inputs: { multipleImgMode: "multipleImgMode", stateDisplayed: "stateDisplayed", listDisplayed: "listDisplayed" }, outputs: { imgManagerClosed: "imgManagerClosed", currentTab: "currentTab", switchDisplayWindow: "switchDisplayWindow" }, viewQueries: [{ propertyName: "imgUploadedComponent", first: true, predicate: ["imgUploadedImg"], descendants: true }], ngImport: i0, template: "<div\r\n class=\"img-tabs\" [ngClass]=\"{'small': stateDisplayed === 'small'}\">\r\n <div class=\"wrapper-tabs\">\r\n <div\r\n class=\"tabs\"\r\n [ngClass]=\"\r\n {\r\n 'tabs--notWindow': stateDisplayed !== 'window',\r\n 'tabs--notDisplayed': stateDisplayed === 'window' && tabActive.value === tabs[3].value\r\n }\">\r\n\r\n <ul>\r\n <li class=\"is-active\" [ngClass]=\"{'is-active': tabActive.value === tabs[0].value}\" (click)=\"toggleTabs(tabs[0])\"><a>{{ tabs[0].name | translate }}</a></li>\r\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[1].value}\" (click)=\"toggleTabs(tabs[1])\"><a>{{ tabs[1].name | translate }}</a></li>\r\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[2].value}\" (click)=\"toggleTabs(tabs[2])\"><a>{{ tabs[2].name | translate }}</a></li>\r\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[3].value}\" *ngIf=\"editTab\"><a>{{ tabs[3].name | translate }}</a></li>\r\n </ul>\r\n <div\r\n class=\"img-tabs__canva\"\r\n [ngClass]=\"{'img-tabs__canva--window': stateDisplayed === 'window'}\">\r\n <canva-btn\r\n (showImgUploaded)=\"onShowImgUploaded()\"\r\n [stateDisplayed]=\"stateDisplayed\">\r\n </canva-btn>\r\n </div>\r\n </div>\r\n <div class=\"select-mobile-page\">\r\n <wac-select\r\n [(ngModel)]=\"tabActive\"\r\n name=\"tabs\"\r\n [items]=\"tabs\"\r\n ></wac-select>\r\n </div>\r\n </div>\r\n\r\n <!-- Upload section -->\r\n <div\r\n class=\"columns img-tabs__tabsFirst\"\r\n [ngClass]=\"{\r\n 'img-tabs__tabsFirst--small': stateDisplayed === 'small',\r\n 'img-tabs__tabsFirst--window': stateDisplayed === 'window'\r\n }\"\r\n *ngIf=\"tabActive.value === tabs[0].value\">\r\n <div class=\"column img-tabs__tabsFirst__upload\">\r\n <img-upload\r\n [stateDisplayed]=\"stateDisplayed\"\r\n (imgUploaded)=\"onImgUploaded($event)\"\r\n ></img-upload>\r\n </div>\r\n <div class=\"column img-tabs__tabsFirst__list\" [ngClass]=\"{\r\n 'img-tabs__tabsFirst__list--upload': imgUpload\r\n }\">\r\n <images-view\r\n *ngIf=\"!imgUpload\"\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [listDisplayed]=\"false\"\r\n [multipleImgMode]=\"multipleImgMode\"\r\n [tabDisplayed]=\"tabActive.value\"\r\n [nbRowToShow]=\"2\"\r\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\r\n [fullSize]=\"false\">\r\n </images-view>\r\n\r\n\r\n <div [hidden]=\"!imgUpload\">\r\n <upload-list\r\n #imgUploadedImg\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [tabDisplayed]=\"tabActive.value\"\r\n [multipleImgMode]=\"multipleImgMode\"\r\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\r\n >\r\n </upload-list>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Images section -->\r\n <div class=\"columns img-tabs__tabsSecond\" *ngIf=\"tabActive.value === tabs[1].value\">\r\n <div class=\"column\">\r\n\r\n <images-view\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [listDisplayed]=\"listDisplayed\"\r\n [multipleImgMode]=\"multipleImgMode\"\r\n [tabDisplayed]=\"tabActive.value\"\r\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\r\n [fullSize]=\"true\">\r\n </images-view>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Pexels img section -->\r\n <div class=\"columns img-tabs__tabsThird\" *ngIf=\"tabActive.value === tabs[2].value\">\r\n <div class=\"column\">\r\n <pexels-lib\r\n [stateDisplayed]=\"stateDisplayed\"\r\n (showImgUploaded)=\"onShowImgUploaded()\">\r\n </pexels-lib>\r\n </div>\r\n </div>\r\n\r\n <!--Edition section -->\r\n <div class=\"columns img-tabs__tabsEdit\" *ngIf=\"tabActive.value === tabs[3].value\">\r\n <div class=\"column\">\r\n <img-editor\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [imgToEdit]=\"imgToEdit\"\r\n (editClosed)=\"onEditClosed($event)\">\r\n </img-editor>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ImgUploadComponent, selector: "img-upload", inputs: ["stateDisplayed"], outputs: ["imgUploaded"] }, { kind: "component", type: PexelLibComponent, selector: "pexels-lib", inputs: ["stateDisplayed", "searchValue", "disableSearch"] }, { kind: "component", type: UploadListComponent, selector: "upload-list", inputs: ["stateDisplayed", "tabDisplayed", "multipleImgMode"], outputs: ["switchDisplayWindow"] }, { kind: "component", type: ImgEditorComponent, selector: "img-editor", inputs: ["stateDisplayed", "imgToEdit"], outputs: ["editClosed"] }, { kind: "component", type: CanvaBtnComponent, selector: "canva-btn", inputs: ["stateDisplayed"], outputs: ["showImgUploaded"] }, { kind: "component", type: ImagesViewComponent, selector: "images-view", inputs: ["stateDisplayed", "tabDisplayed", "fullSize", "nbRowToShow", "listDisplayed", "multipleImgMode"], outputs: ["switchDisplayWindow"] }, { kind: "component", type: SelectComponent, selector: "wac-select", inputs: ["items", "placeholder", "label", "maxWidthItems", "search", "type", "callToAction", "maxWidth", "disabled"], outputs: ["selectValue", "clickOnCallToAction"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
|
|
3575
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImgTabsComponent, decorators: [{
|
|
3732
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgTabsComponent, decorators: [{
|
|
3576
3733
|
type: Component,
|
|
3577
3734
|
args: [{ selector: 'img-tabs', template: "<div\r\n class=\"img-tabs\" [ngClass]=\"{'small': stateDisplayed === 'small'}\">\r\n <div class=\"wrapper-tabs\">\r\n <div\r\n class=\"tabs\"\r\n [ngClass]=\"\r\n {\r\n 'tabs--notWindow': stateDisplayed !== 'window',\r\n 'tabs--notDisplayed': stateDisplayed === 'window' && tabActive.value === tabs[3].value\r\n }\">\r\n\r\n <ul>\r\n <li class=\"is-active\" [ngClass]=\"{'is-active': tabActive.value === tabs[0].value}\" (click)=\"toggleTabs(tabs[0])\"><a>{{ tabs[0].name | translate }}</a></li>\r\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[1].value}\" (click)=\"toggleTabs(tabs[1])\"><a>{{ tabs[1].name | translate }}</a></li>\r\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[2].value}\" (click)=\"toggleTabs(tabs[2])\"><a>{{ tabs[2].name | translate }}</a></li>\r\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[3].value}\" *ngIf=\"editTab\"><a>{{ tabs[3].name | translate }}</a></li>\r\n </ul>\r\n <div\r\n class=\"img-tabs__canva\"\r\n [ngClass]=\"{'img-tabs__canva--window': stateDisplayed === 'window'}\">\r\n <canva-btn\r\n (showImgUploaded)=\"onShowImgUploaded()\"\r\n [stateDisplayed]=\"stateDisplayed\">\r\n </canva-btn>\r\n </div>\r\n </div>\r\n <div class=\"select-mobile-page\">\r\n <wac-select\r\n [(ngModel)]=\"tabActive\"\r\n name=\"tabs\"\r\n [items]=\"tabs\"\r\n ></wac-select>\r\n </div>\r\n </div>\r\n\r\n <!-- Upload section -->\r\n <div\r\n class=\"columns img-tabs__tabsFirst\"\r\n [ngClass]=\"{\r\n 'img-tabs__tabsFirst--small': stateDisplayed === 'small',\r\n 'img-tabs__tabsFirst--window': stateDisplayed === 'window'\r\n }\"\r\n *ngIf=\"tabActive.value === tabs[0].value\">\r\n <div class=\"column img-tabs__tabsFirst__upload\">\r\n <img-upload\r\n [stateDisplayed]=\"stateDisplayed\"\r\n (imgUploaded)=\"onImgUploaded($event)\"\r\n ></img-upload>\r\n </div>\r\n <div class=\"column img-tabs__tabsFirst__list\" [ngClass]=\"{\r\n 'img-tabs__tabsFirst__list--upload': imgUpload\r\n }\">\r\n <images-view\r\n *ngIf=\"!imgUpload\"\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [listDisplayed]=\"false\"\r\n [multipleImgMode]=\"multipleImgMode\"\r\n [tabDisplayed]=\"tabActive.value\"\r\n [nbRowToShow]=\"2\"\r\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\r\n [fullSize]=\"false\">\r\n </images-view>\r\n\r\n\r\n <div [hidden]=\"!imgUpload\">\r\n <upload-list\r\n #imgUploadedImg\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [tabDisplayed]=\"tabActive.value\"\r\n [multipleImgMode]=\"multipleImgMode\"\r\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\r\n >\r\n </upload-list>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Images section -->\r\n <div class=\"columns img-tabs__tabsSecond\" *ngIf=\"tabActive.value === tabs[1].value\">\r\n <div class=\"column\">\r\n\r\n <images-view\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [listDisplayed]=\"listDisplayed\"\r\n [multipleImgMode]=\"multipleImgMode\"\r\n [tabDisplayed]=\"tabActive.value\"\r\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\r\n [fullSize]=\"true\">\r\n </images-view>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Pexels img section -->\r\n <div class=\"columns img-tabs__tabsThird\" *ngIf=\"tabActive.value === tabs[2].value\">\r\n <div class=\"column\">\r\n <pexels-lib\r\n [stateDisplayed]=\"stateDisplayed\"\r\n (showImgUploaded)=\"onShowImgUploaded()\">\r\n </pexels-lib>\r\n </div>\r\n </div>\r\n\r\n <!--Edition section -->\r\n <div class=\"columns img-tabs__tabsEdit\" *ngIf=\"tabActive.value === tabs[3].value\">\r\n <div class=\"column\">\r\n <img-editor\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [imgToEdit]=\"imgToEdit\"\r\n (editClosed)=\"onEditClosed($event)\">\r\n </img-editor>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n" }]
|
|
3578
|
-
}], ctorParameters:
|
|
3735
|
+
}], ctorParameters: () => [{ type: ImgEventService }, { type: AlertService }, { type: i3$2.Router }], propDecorators: { multipleImgMode: [{
|
|
3579
3736
|
type: Input
|
|
3580
3737
|
}], stateDisplayed: [{
|
|
3581
3738
|
type: Input
|
|
@@ -3593,19 +3750,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3593
3750
|
}] } });
|
|
3594
3751
|
|
|
3595
3752
|
class ImgSelectionComponent {
|
|
3753
|
+
imgSelectionService;
|
|
3754
|
+
tabDisplayed;
|
|
3755
|
+
imgManagerClosed = new EventEmitter();
|
|
3756
|
+
removingAll = false;
|
|
3757
|
+
cancellingAll = false;
|
|
3758
|
+
importingAll = false;
|
|
3759
|
+
dragStart = false;
|
|
3760
|
+
vm$;
|
|
3761
|
+
trashPositionIndex = 0;
|
|
3762
|
+
trashPositionLeft = '-5px';
|
|
3596
3763
|
constructor(imgSelectionService) {
|
|
3597
3764
|
this.imgSelectionService = imgSelectionService;
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
this.cancellingAll = false;
|
|
3601
|
-
this.importingAll = false;
|
|
3602
|
-
this.dragStart = false;
|
|
3765
|
+
}
|
|
3766
|
+
ngOnInit() {
|
|
3603
3767
|
this.vm$ = combineLatest({
|
|
3604
3768
|
imgSelectedList: this.imgSelectionService.imgSelection$,
|
|
3605
3769
|
isLoading: this.imgSelectionService.imgSelectedListLoading$
|
|
3606
3770
|
});
|
|
3607
|
-
this.trashPositionIndex = 0;
|
|
3608
|
-
this.trashPositionLeft = '-5px';
|
|
3609
3771
|
}
|
|
3610
3772
|
init() {
|
|
3611
3773
|
this.removingAll = false;
|
|
@@ -3623,19 +3785,28 @@ class ImgSelectionComponent {
|
|
|
3623
3785
|
removeImgFromSelection(event) {
|
|
3624
3786
|
this.imgSelectionService.removeImgSelectedByIndex(event.previousIndex);
|
|
3625
3787
|
}
|
|
3788
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgSelectionComponent, deps: [{ token: ImgSelectionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3789
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: ImgSelectionComponent, selector: "img-selection", inputs: { tabDisplayed: "tabDisplayed" }, outputs: { imgManagerClosed: "imgManagerClosed" }, ngImport: i0, template: "<div\r\n class=\"trash\"\r\n cdkDropList\r\n #unSelectList=\"cdkDropList\"\r\n (cdkDropListDropped)=\"removeImgFromSelection($event)\">\r\n <p>{{'ImgManager.ImgSelection.unselect' | translate}}</p>\r\n</div>\r\n\r\n<ng-container *ngIf=\"vm$ | async as vm\">\r\n\r\n <div\r\n class=\"img-selection\"\r\n *ngIf=\"!vm.isLoading; else Loading\"\r\n [ngClass]=\"{'img-selection--visible' : vm.imgSelectedList && vm.imgSelectedList.length}\"\r\n >\r\n\r\n <div\r\n cdkDropList\r\n #selectionList=\"cdkDropList\"\r\n cdkDropListOrientation=\"horizontal\"\r\n class=\"list_img_selection\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n [cdkDropListConnectedTo]=\"[unSelectList]\"\r\n >\r\n\r\n <div\r\n class=\"img_box\"\r\n *ngFor=\"let picture of vm.imgSelectedList; let index = index\"\r\n cdkDrag\r\n (cdkDragStarted)=\"dragStart = true;\"\r\n (cdkDragEnded)=\"dragStart = false;\"\r\n >\r\n\r\n <img\r\n *ngIf=\"index < 1\"\r\n class=\"drag__img\"\r\n [src]=\"picture.file_name | imgSrc : '400'\"\r\n [title]=\"picture.display_name\"\r\n />\r\n\r\n <img\r\n *ngIf=\"index > 0\"\r\n class=\"drag__img\"\r\n [src]=\"picture.file_name | imgSrc : '200'\"\r\n [title]=\"picture.display_name\"\r\n />\r\n\r\n <div class=\"delete-btn\" (click)=\"removeImg(index)\">{{'ImgManager.ImgSelection.deleteImg' | translate}}</div>\r\n\r\n <span class=\"drag__tooltips\">{{'ImgManager.ImgSelection.tooltips' | translate}}</span>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n</ng-container>\r\n<!-- Loader -->\r\n<ng-template #Loading>\r\n <wz-loader></wz-loader>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: LoaderComponent, selector: "wz-loader", inputs: ["text", "small", "position"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: ImageSrcPipe, name: "imgSrc" }] });
|
|
3626
3790
|
}
|
|
3627
|
-
|
|
3628
|
-
ImgSelectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ImgSelectionComponent, selector: "img-selection", inputs: { tabDisplayed: "tabDisplayed" }, outputs: { imgManagerClosed: "imgManagerClosed" }, ngImport: i0, template: "<div\r\n class=\"trash\"\r\n cdkDropList\r\n #unSelectList=\"cdkDropList\"\r\n (cdkDropListDropped)=\"removeImgFromSelection($event)\">\r\n <p>{{'ImgManager.ImgSelection.unselect' | translate}}</p>\r\n</div>\r\n\r\n<ng-container *ngIf=\"vm$ | async as vm\">\r\n\r\n <div\r\n class=\"img-selection\"\r\n *ngIf=\"!vm.isLoading; else Loading\"\r\n [ngClass]=\"{'img-selection--visible' : vm.imgSelectedList && vm.imgSelectedList.length}\"\r\n >\r\n\r\n <div\r\n cdkDropList\r\n #selectionList=\"cdkDropList\"\r\n cdkDropListOrientation=\"horizontal\"\r\n class=\"list_img_selection\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n [cdkDropListConnectedTo]=\"[unSelectList]\"\r\n >\r\n\r\n <div\r\n class=\"img_box\"\r\n *ngFor=\"let picture of vm.imgSelectedList; let index = index\"\r\n cdkDrag\r\n (cdkDragStarted)=\"dragStart = true;\"\r\n (cdkDragEnded)=\"dragStart = false;\"\r\n >\r\n\r\n <img\r\n *ngIf=\"index < 1\"\r\n class=\"drag__img\"\r\n [src]=\"picture.file_name | imgSrc : '400'\"\r\n [title]=\"picture.display_name\"\r\n />\r\n\r\n <img\r\n *ngIf=\"index > 0\"\r\n class=\"drag__img\"\r\n [src]=\"picture.file_name | imgSrc : '200'\"\r\n [title]=\"picture.display_name\"\r\n />\r\n\r\n <div class=\"delete-btn\" (click)=\"removeImg(index)\">{{'ImgManager.ImgSelection.deleteImg' | translate}}</div>\r\n\r\n <span class=\"drag__tooltips\">{{'ImgManager.ImgSelection.tooltips' | translate}}</span>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n</ng-container>\r\n<!-- Loader -->\r\n<ng-template #Loading>\r\n <wz-loader></wz-loader>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: LoaderComponent, selector: "wz-loader", inputs: ["text", "small", "position"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: ImageSrcPipe, name: "imgSrc" }] });
|
|
3629
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImgSelectionComponent, decorators: [{
|
|
3791
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: ImgSelectionComponent, decorators: [{
|
|
3630
3792
|
type: Component,
|
|
3631
3793
|
args: [{ selector: 'img-selection', template: "<div\r\n class=\"trash\"\r\n cdkDropList\r\n #unSelectList=\"cdkDropList\"\r\n (cdkDropListDropped)=\"removeImgFromSelection($event)\">\r\n <p>{{'ImgManager.ImgSelection.unselect' | translate}}</p>\r\n</div>\r\n\r\n<ng-container *ngIf=\"vm$ | async as vm\">\r\n\r\n <div\r\n class=\"img-selection\"\r\n *ngIf=\"!vm.isLoading; else Loading\"\r\n [ngClass]=\"{'img-selection--visible' : vm.imgSelectedList && vm.imgSelectedList.length}\"\r\n >\r\n\r\n <div\r\n cdkDropList\r\n #selectionList=\"cdkDropList\"\r\n cdkDropListOrientation=\"horizontal\"\r\n class=\"list_img_selection\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n [cdkDropListConnectedTo]=\"[unSelectList]\"\r\n >\r\n\r\n <div\r\n class=\"img_box\"\r\n *ngFor=\"let picture of vm.imgSelectedList; let index = index\"\r\n cdkDrag\r\n (cdkDragStarted)=\"dragStart = true;\"\r\n (cdkDragEnded)=\"dragStart = false;\"\r\n >\r\n\r\n <img\r\n *ngIf=\"index < 1\"\r\n class=\"drag__img\"\r\n [src]=\"picture.file_name | imgSrc : '400'\"\r\n [title]=\"picture.display_name\"\r\n />\r\n\r\n <img\r\n *ngIf=\"index > 0\"\r\n class=\"drag__img\"\r\n [src]=\"picture.file_name | imgSrc : '200'\"\r\n [title]=\"picture.display_name\"\r\n />\r\n\r\n <div class=\"delete-btn\" (click)=\"removeImg(index)\">{{'ImgManager.ImgSelection.deleteImg' | translate}}</div>\r\n\r\n <span class=\"drag__tooltips\">{{'ImgManager.ImgSelection.tooltips' | translate}}</span>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n</ng-container>\r\n<!-- Loader -->\r\n<ng-template #Loading>\r\n <wz-loader></wz-loader>\r\n</ng-template>\r\n" }]
|
|
3632
|
-
}], ctorParameters:
|
|
3794
|
+
}], ctorParameters: () => [{ type: ImgSelectionService }], propDecorators: { tabDisplayed: [{
|
|
3633
3795
|
type: Input
|
|
3634
3796
|
}], imgManagerClosed: [{
|
|
3635
3797
|
type: Output
|
|
3636
3798
|
}] } });
|
|
3637
3799
|
|
|
3638
3800
|
class WzImgManagerComponent {
|
|
3801
|
+
imgSelectionService;
|
|
3802
|
+
userSettingsService;
|
|
3803
|
+
canvaService;
|
|
3804
|
+
imgEventService;
|
|
3805
|
+
domService;
|
|
3806
|
+
uploadService;
|
|
3807
|
+
iconService;
|
|
3808
|
+
stateDisplayed;
|
|
3809
|
+
showSelection = false;
|
|
3639
3810
|
// If forceToOpenCanva is true : Canva will open with the canvaService.expectedImgSizesChange
|
|
3640
3811
|
// If forceToOpenCanva is a WiziBlockMediaDto, Canva open immediatly
|
|
3641
3812
|
set forceToOpenCanva(forceToOpenCanva) {
|
|
@@ -3645,6 +3816,8 @@ class WzImgManagerComponent {
|
|
|
3645
3816
|
}
|
|
3646
3817
|
this.canvaService.expectedImgSizesChange(forceToOpenCanva);
|
|
3647
3818
|
}
|
|
3819
|
+
imgManagerClosed = new EventEmitter();
|
|
3820
|
+
_multipleImgMode = false;
|
|
3648
3821
|
set multipleImgMode(activate) {
|
|
3649
3822
|
this._multipleImgMode = activate;
|
|
3650
3823
|
this.imgSelectionService.setMultipleImgMode(this._multipleImgMode);
|
|
@@ -3652,6 +3825,7 @@ class WzImgManagerComponent {
|
|
|
3652
3825
|
get multipleImgMode() {
|
|
3653
3826
|
return this._multipleImgMode;
|
|
3654
3827
|
}
|
|
3828
|
+
_showImgManagerModule = false;
|
|
3655
3829
|
set showImgManagerModule(activate) {
|
|
3656
3830
|
this._showImgManagerModule = activate;
|
|
3657
3831
|
if (activate) {
|
|
@@ -3666,6 +3840,16 @@ class WzImgManagerComponent {
|
|
|
3666
3840
|
this.onClose();
|
|
3667
3841
|
}
|
|
3668
3842
|
}
|
|
3843
|
+
imgSelectionChange = new EventEmitter();
|
|
3844
|
+
imageUploaded = new EventEmitter();
|
|
3845
|
+
close = false;
|
|
3846
|
+
selectImgEvent;
|
|
3847
|
+
listDisplayed = false;
|
|
3848
|
+
listDisplayedEvent;
|
|
3849
|
+
hideTab = false;
|
|
3850
|
+
// Save the default overflow apply to html tag, when the module is full open
|
|
3851
|
+
overflowHTML;
|
|
3852
|
+
bodyPadding;
|
|
3669
3853
|
constructor(imgSelectionService, userSettingsService, canvaService, imgEventService, domService, uploadService, iconService) {
|
|
3670
3854
|
this.imgSelectionService = imgSelectionService;
|
|
3671
3855
|
this.userSettingsService = userSettingsService;
|
|
@@ -3674,26 +3858,21 @@ class WzImgManagerComponent {
|
|
|
3674
3858
|
this.domService = domService;
|
|
3675
3859
|
this.uploadService = uploadService;
|
|
3676
3860
|
this.iconService = iconService;
|
|
3677
|
-
this.showSelection = false;
|
|
3678
|
-
this.imgManagerClosed = new EventEmitter();
|
|
3679
|
-
this._multipleImgMode = false;
|
|
3680
|
-
this._showImgManagerModule = false;
|
|
3681
|
-
this.imgSelectionChange = this.imgSelectionService.imgSelection$;
|
|
3682
|
-
this.imageUploaded = this.uploadService.imageUploaded$;
|
|
3683
|
-
this.close = false;
|
|
3684
|
-
this.listDisplayed = false;
|
|
3685
|
-
this.hideTab = false;
|
|
3686
3861
|
this.iconService.loadIconLib();
|
|
3687
3862
|
}
|
|
3688
3863
|
ngOnInit() {
|
|
3689
3864
|
this.imgSelectionService.setMultipleImgMode(this._multipleImgMode);
|
|
3690
3865
|
this.imgSelectionService.initImgSelectedList(null);
|
|
3691
3866
|
this.selectImgEvent = this.imgSelectionService.imgSelection$.subscribe(imgSelection => {
|
|
3867
|
+
this.imgSelectionChange.emit(imgSelection);
|
|
3692
3868
|
if (imgSelection && imgSelection.length && this.checkCloseImgManager()) {
|
|
3693
3869
|
// Close the img manager
|
|
3694
3870
|
this.onClose();
|
|
3695
3871
|
}
|
|
3696
3872
|
});
|
|
3873
|
+
this.uploadService.imageUploaded$.subscribe(uploadedImage => {
|
|
3874
|
+
this.imageUploaded.emit(uploadedImage);
|
|
3875
|
+
});
|
|
3697
3876
|
this.checkUserDisplayPreference();
|
|
3698
3877
|
// Use when the img manager is full open or open in page. This display the user preference display, mosaic or list.
|
|
3699
3878
|
this.listDisplayedEvent = this.imgEventService.getlistDisplayedChange().subscribe(value => this.listDisplayed = value);
|
|
@@ -3780,13 +3959,13 @@ class WzImgManagerComponent {
|
|
|
3780
3959
|
this.canvaService.expectedImgSizesChange(null);
|
|
3781
3960
|
this.listDisplayedEvent.unsubscribe();
|
|
3782
3961
|
}
|
|
3962
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: WzImgManagerComponent, deps: [{ token: ImgSelectionService }, { token: UserSettingsService }, { token: CanvaService }, { token: ImgEventService }, { token: DomService }, { token: UploadService }, { token: IconService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3963
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: WzImgManagerComponent, selector: "wz-img-manager", inputs: { stateDisplayed: "stateDisplayed", showSelection: "showSelection", forceToOpenCanva: "forceToOpenCanva", multipleImgMode: "multipleImgMode", showImgManagerModule: "showImgManagerModule" }, outputs: { imgManagerClosed: "imgManagerClosed", imgSelectionChange: "imgSelectionChange", imageUploaded: "imageUploaded" }, host: { listeners: { "document:keydown.escape": "onKeydownHandler($event)" } }, ngImport: i0, template: "<div class=\"wz-img-manager\">\r\n <!-- Img selection handler -->\r\n <div class=\"wz-img-manager__selectionHandler\" *ngIf=\"showSelection\">\r\n <img-selection></img-selection>\r\n </div>\r\n\r\n <!-- Img manager module -->\r\n <div\r\n *ngIf=\"_showImgManagerModule\"\r\n class=\"wz-img-manager__module\"\r\n [ngClass]=\"{\r\n 'wz-img-manager__module--small': stateDisplayed === 'small',\r\n 'wz-img-manager__module--full': stateDisplayed === 'full',\r\n 'wz-img-manager__module--window': stateDisplayed === 'window',\r\n 'wz-img-manager__module--edit': hideTab}\"\r\n >\r\n\r\n <div class=\"wz-img-manager__module__header\" *ngIf=\"stateDisplayed !== 'window'\">\r\n <button (click)=\"openSmall()\" *ngIf=\"stateDisplayed === 'full'\" type=\"button\"><span>Expand</span><i class=\"fal fa-compress-alt\"></i></button>\r\n <button (click)=\"openSmall()\" *ngIf=\"stateDisplayed === 'closed'\" type=\"button\"><span>Expand</span><i class=\"fal fa-expand-alt\"></i></button>\r\n <button (click)=\"openFull()\" *ngIf=\"stateDisplayed === 'small'\" type=\"button\"><span>Expand</span><i class=\"fal fa-expand-alt\"></i></button>\r\n <button (click)=\"onClose()\" *ngIf=\"stateDisplayed !== 'closed'\" type=\"button\"><span>Close</span><i class=\"fal fa-times\"></i></button>\r\n </div>\r\n\r\n <div\r\n class=\"wz-img-manager__module__content wz-block\"\r\n [ngClass]=\"{'wz-block--window': stateDisplayed === 'window'}\">\r\n <img-tabs\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [multipleImgMode]=\"multipleImgMode\"\r\n [listDisplayed]=\"listDisplayed\"\r\n (imgManagerClosed)=\"onImgManagerClosed()\"\r\n (switchDisplayWindow)=\"changeDisplayTab()\"\r\n (currentTab)=\"setCurrentTab($event)\">\r\n </img-tabs>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ImgTabsComponent, selector: "img-tabs", inputs: ["multipleImgMode", "stateDisplayed", "listDisplayed"], outputs: ["imgManagerClosed", "currentTab", "switchDisplayWindow"] }, { kind: "component", type: ImgSelectionComponent, selector: "img-selection", inputs: ["tabDisplayed"], outputs: ["imgManagerClosed"] }] });
|
|
3783
3964
|
}
|
|
3784
|
-
|
|
3785
|
-
WzImgManagerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: WzImgManagerComponent, selector: "wz-img-manager", inputs: { stateDisplayed: "stateDisplayed", showSelection: "showSelection", forceToOpenCanva: "forceToOpenCanva", multipleImgMode: "multipleImgMode", showImgManagerModule: "showImgManagerModule" }, outputs: { imgManagerClosed: "imgManagerClosed", imgSelectionChange: "imgSelectionChange", imageUploaded: "imageUploaded" }, host: { listeners: { "document:keydown.escape": "onKeydownHandler($event)" } }, ngImport: i0, template: "<div class=\"wz-img-manager\">\r\n <!-- Img selection handler -->\r\n <div class=\"wz-img-manager__selectionHandler\" *ngIf=\"showSelection\">\r\n <img-selection></img-selection>\r\n </div>\r\n\r\n <!-- Img manager module -->\r\n <div\r\n *ngIf=\"_showImgManagerModule\"\r\n class=\"wz-img-manager__module\"\r\n [ngClass]=\"{\r\n 'wz-img-manager__module--small': stateDisplayed === 'small',\r\n 'wz-img-manager__module--full': stateDisplayed === 'full',\r\n 'wz-img-manager__module--window': stateDisplayed === 'window',\r\n 'wz-img-manager__module--edit': hideTab}\"\r\n >\r\n\r\n <div class=\"wz-img-manager__module__header\" *ngIf=\"stateDisplayed !== 'window'\">\r\n <button (click)=\"openSmall()\" *ngIf=\"stateDisplayed === 'full'\" type=\"button\"><span>Expand</span><i class=\"fal fa-compress-alt\"></i></button>\r\n <button (click)=\"openSmall()\" *ngIf=\"stateDisplayed === 'closed'\" type=\"button\"><span>Expand</span><i class=\"fal fa-expand-alt\"></i></button>\r\n <button (click)=\"openFull()\" *ngIf=\"stateDisplayed === 'small'\" type=\"button\"><span>Expand</span><i class=\"fal fa-expand-alt\"></i></button>\r\n <button (click)=\"onClose()\" *ngIf=\"stateDisplayed !== 'closed'\" type=\"button\"><span>Close</span><i class=\"fal fa-times\"></i></button>\r\n </div>\r\n\r\n <div\r\n class=\"wz-img-manager__module__content wz-block\"\r\n [ngClass]=\"{'wz-block--window': stateDisplayed === 'window'}\">\r\n <img-tabs\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [multipleImgMode]=\"multipleImgMode\"\r\n [listDisplayed]=\"listDisplayed\"\r\n (imgManagerClosed)=\"onImgManagerClosed()\"\r\n (switchDisplayWindow)=\"changeDisplayTab()\"\r\n (currentTab)=\"setCurrentTab($event)\">\r\n </img-tabs>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ImgTabsComponent, selector: "img-tabs", inputs: ["multipleImgMode", "stateDisplayed", "listDisplayed"], outputs: ["imgManagerClosed", "currentTab", "switchDisplayWindow"] }, { kind: "component", type: ImgSelectionComponent, selector: "img-selection", inputs: ["tabDisplayed"], outputs: ["imgManagerClosed"] }] });
|
|
3786
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WzImgManagerComponent, decorators: [{
|
|
3965
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: WzImgManagerComponent, decorators: [{
|
|
3787
3966
|
type: Component,
|
|
3788
3967
|
args: [{ selector: 'wz-img-manager', template: "<div class=\"wz-img-manager\">\r\n <!-- Img selection handler -->\r\n <div class=\"wz-img-manager__selectionHandler\" *ngIf=\"showSelection\">\r\n <img-selection></img-selection>\r\n </div>\r\n\r\n <!-- Img manager module -->\r\n <div\r\n *ngIf=\"_showImgManagerModule\"\r\n class=\"wz-img-manager__module\"\r\n [ngClass]=\"{\r\n 'wz-img-manager__module--small': stateDisplayed === 'small',\r\n 'wz-img-manager__module--full': stateDisplayed === 'full',\r\n 'wz-img-manager__module--window': stateDisplayed === 'window',\r\n 'wz-img-manager__module--edit': hideTab}\"\r\n >\r\n\r\n <div class=\"wz-img-manager__module__header\" *ngIf=\"stateDisplayed !== 'window'\">\r\n <button (click)=\"openSmall()\" *ngIf=\"stateDisplayed === 'full'\" type=\"button\"><span>Expand</span><i class=\"fal fa-compress-alt\"></i></button>\r\n <button (click)=\"openSmall()\" *ngIf=\"stateDisplayed === 'closed'\" type=\"button\"><span>Expand</span><i class=\"fal fa-expand-alt\"></i></button>\r\n <button (click)=\"openFull()\" *ngIf=\"stateDisplayed === 'small'\" type=\"button\"><span>Expand</span><i class=\"fal fa-expand-alt\"></i></button>\r\n <button (click)=\"onClose()\" *ngIf=\"stateDisplayed !== 'closed'\" type=\"button\"><span>Close</span><i class=\"fal fa-times\"></i></button>\r\n </div>\r\n\r\n <div\r\n class=\"wz-img-manager__module__content wz-block\"\r\n [ngClass]=\"{'wz-block--window': stateDisplayed === 'window'}\">\r\n <img-tabs\r\n [stateDisplayed]=\"stateDisplayed\"\r\n [multipleImgMode]=\"multipleImgMode\"\r\n [listDisplayed]=\"listDisplayed\"\r\n (imgManagerClosed)=\"onImgManagerClosed()\"\r\n (switchDisplayWindow)=\"changeDisplayTab()\"\r\n (currentTab)=\"setCurrentTab($event)\">\r\n </img-tabs>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n" }]
|
|
3789
|
-
}], ctorParameters:
|
|
3968
|
+
}], ctorParameters: () => [{ type: ImgSelectionService }, { type: UserSettingsService }, { type: CanvaService }, { type: ImgEventService }, { type: DomService }, { type: UploadService }, { type: IconService }], propDecorators: { stateDisplayed: [{
|
|
3790
3969
|
type: Input
|
|
3791
3970
|
}], showSelection: [{
|
|
3792
3971
|
type: Input
|
|
@@ -3808,18 +3987,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3808
3987
|
}] } });
|
|
3809
3988
|
|
|
3810
3989
|
class SnackBarService {
|
|
3990
|
+
nwbSnackbar;
|
|
3991
|
+
translateService;
|
|
3992
|
+
actionMsg = 'ImgManager.snackBar.action';
|
|
3993
|
+
snackBarConfigAction = {
|
|
3994
|
+
message: '',
|
|
3995
|
+
duration: 5000
|
|
3996
|
+
};
|
|
3997
|
+
snackBarConfig = {
|
|
3998
|
+
message: '',
|
|
3999
|
+
duration: 5000
|
|
4000
|
+
};
|
|
4001
|
+
snackBarRefComponent;
|
|
3811
4002
|
constructor(nwbSnackbar, translateService) {
|
|
3812
4003
|
this.nwbSnackbar = nwbSnackbar;
|
|
3813
4004
|
this.translateService = translateService;
|
|
3814
|
-
this.actionMsg = 'ImgManager.snackBar.action';
|
|
3815
|
-
this.snackBarConfigAction = {
|
|
3816
|
-
message: '',
|
|
3817
|
-
duration: 5000
|
|
3818
|
-
};
|
|
3819
|
-
this.snackBarConfig = {
|
|
3820
|
-
message: '',
|
|
3821
|
-
duration: 5000
|
|
3822
|
-
};
|
|
3823
4005
|
}
|
|
3824
4006
|
openSnackBar(msgKey) {
|
|
3825
4007
|
this.closePreviousSnackbar();
|
|
@@ -3857,12 +4039,12 @@ class SnackBarService {
|
|
|
3857
4039
|
this.snackBarRefComponent.dismiss(false);
|
|
3858
4040
|
}
|
|
3859
4041
|
}
|
|
4042
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SnackBarService, deps: [{ token: i1.NwbSnackbarService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4043
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SnackBarService });
|
|
3860
4044
|
}
|
|
3861
|
-
|
|
3862
|
-
SnackBarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SnackBarService });
|
|
3863
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SnackBarService, decorators: [{
|
|
4045
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: SnackBarService, decorators: [{
|
|
3864
4046
|
type: Injectable
|
|
3865
|
-
}], ctorParameters:
|
|
4047
|
+
}], ctorParameters: () => [{ type: i1.NwbSnackbarService }, { type: i3.TranslateService }] });
|
|
3866
4048
|
|
|
3867
4049
|
;
|
|
3868
4050
|
const components = [
|
|
@@ -3935,67 +4117,67 @@ class WzImgManagerModule {
|
|
|
3935
4117
|
]
|
|
3936
4118
|
};
|
|
3937
4119
|
}
|
|
4120
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: WzImgManagerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4121
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: WzImgManagerModule, declarations: [WzImgManagerComponent,
|
|
4122
|
+
ImgTabsComponent,
|
|
4123
|
+
ImgUploadComponent,
|
|
4124
|
+
PexelLibComponent,
|
|
4125
|
+
ImgCardComponent,
|
|
4126
|
+
UploadListComponent,
|
|
4127
|
+
ImgEditorComponent,
|
|
4128
|
+
EditorInfoSectionComponent,
|
|
4129
|
+
CanvaBtnComponent,
|
|
4130
|
+
ImgSelectionComponent,
|
|
4131
|
+
LoaderComponent,
|
|
4132
|
+
DropdownComponent,
|
|
4133
|
+
CropperComponent,
|
|
4134
|
+
ImagesViewComponent,
|
|
4135
|
+
MosaicViewComponent,
|
|
4136
|
+
TableViewComponent,
|
|
4137
|
+
TableComponent,
|
|
4138
|
+
InputSearchComponent,
|
|
4139
|
+
PaginationComponent,
|
|
4140
|
+
CheckboxComponent,
|
|
4141
|
+
AlertComponent,
|
|
4142
|
+
PageSelectorComponent,
|
|
4143
|
+
SelectComponent, DragDropDirective,
|
|
4144
|
+
LoadingDirective,
|
|
4145
|
+
AutoHideDirective,
|
|
4146
|
+
CopyClipboardDirective,
|
|
4147
|
+
TableColumn,
|
|
4148
|
+
CheckBoxRow,
|
|
4149
|
+
TableColumnHeader,
|
|
4150
|
+
TableRow,
|
|
4151
|
+
AbstractDebounceDirective,
|
|
4152
|
+
DebounceKeyupDirective,
|
|
4153
|
+
ZindexToggleDirective, PagniationArrayTotalPages,
|
|
4154
|
+
PagniationIsLastPage,
|
|
4155
|
+
PagniationText,
|
|
4156
|
+
ImageSrcPipe,
|
|
4157
|
+
NumberToArray,
|
|
4158
|
+
LargeNumberOfPagePipe,
|
|
4159
|
+
SelectFiltersPipe], imports: [CommonModule,
|
|
4160
|
+
HttpClientModule,
|
|
4161
|
+
FormsModule,
|
|
4162
|
+
NgScrollbarModule,
|
|
4163
|
+
NgScrollbarReachedModule,
|
|
4164
|
+
NwbAllModule,
|
|
4165
|
+
ImageCropperModule,
|
|
4166
|
+
CdkTableModule,
|
|
4167
|
+
DragDropModule,
|
|
4168
|
+
TranslateModule], exports: [WzImgManagerComponent] });
|
|
4169
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: WzImgManagerModule, imports: [CommonModule,
|
|
4170
|
+
HttpClientModule,
|
|
4171
|
+
FormsModule,
|
|
4172
|
+
NgScrollbarModule,
|
|
4173
|
+
NgScrollbarReachedModule,
|
|
4174
|
+
NwbAllModule,
|
|
4175
|
+
ImageCropperModule,
|
|
4176
|
+
CdkTableModule,
|
|
4177
|
+
DragDropModule,
|
|
4178
|
+
TranslateModule] });
|
|
3938
4179
|
}
|
|
3939
|
-
|
|
3940
|
-
WzImgManagerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: WzImgManagerModule, declarations: [WzImgManagerComponent,
|
|
3941
|
-
ImgTabsComponent,
|
|
3942
|
-
ImgUploadComponent,
|
|
3943
|
-
PexelLibComponent,
|
|
3944
|
-
ImgCardComponent,
|
|
3945
|
-
UploadListComponent,
|
|
3946
|
-
ImgEditorComponent,
|
|
3947
|
-
EditorInfoSectionComponent,
|
|
3948
|
-
CanvaBtnComponent,
|
|
3949
|
-
ImgSelectionComponent,
|
|
3950
|
-
LoaderComponent,
|
|
3951
|
-
DropdownComponent,
|
|
3952
|
-
CropperComponent,
|
|
3953
|
-
ImagesViewComponent,
|
|
3954
|
-
MosaicViewComponent,
|
|
3955
|
-
TableViewComponent,
|
|
3956
|
-
TableComponent,
|
|
3957
|
-
InputSearchComponent,
|
|
3958
|
-
PaginationComponent,
|
|
3959
|
-
CheckboxComponent,
|
|
3960
|
-
AlertComponent,
|
|
3961
|
-
PageSelectorComponent,
|
|
3962
|
-
SelectComponent, DragDropDirective,
|
|
3963
|
-
LoadingDirective,
|
|
3964
|
-
AutoHideDirective,
|
|
3965
|
-
CopyClipboardDirective,
|
|
3966
|
-
TableColumn,
|
|
3967
|
-
CheckBoxRow,
|
|
3968
|
-
TableColumnHeader,
|
|
3969
|
-
TableRow,
|
|
3970
|
-
AbstractDebounceDirective,
|
|
3971
|
-
DebounceKeyupDirective,
|
|
3972
|
-
ZindexToggleDirective, PagniationArrayTotalPages,
|
|
3973
|
-
PagniationIsLastPage,
|
|
3974
|
-
PagniationText,
|
|
3975
|
-
ImageSrcPipe,
|
|
3976
|
-
NumberToArray,
|
|
3977
|
-
LargeNumberOfPagePipe,
|
|
3978
|
-
SelectFiltersPipe], imports: [CommonModule,
|
|
3979
|
-
HttpClientModule,
|
|
3980
|
-
FormsModule,
|
|
3981
|
-
NgScrollbarModule,
|
|
3982
|
-
NgScrollbarReachedModule,
|
|
3983
|
-
NwbAllModule,
|
|
3984
|
-
ImageCropperModule,
|
|
3985
|
-
CdkTableModule,
|
|
3986
|
-
DragDropModule,
|
|
3987
|
-
TranslateModule], exports: [WzImgManagerComponent] });
|
|
3988
|
-
WzImgManagerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WzImgManagerModule, imports: [CommonModule,
|
|
3989
|
-
HttpClientModule,
|
|
3990
|
-
FormsModule,
|
|
3991
|
-
NgScrollbarModule,
|
|
3992
|
-
NgScrollbarReachedModule,
|
|
3993
|
-
NwbAllModule,
|
|
3994
|
-
ImageCropperModule,
|
|
3995
|
-
CdkTableModule,
|
|
3996
|
-
DragDropModule,
|
|
3997
|
-
TranslateModule] });
|
|
3998
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WzImgManagerModule, decorators: [{
|
|
4180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: WzImgManagerModule, decorators: [{
|
|
3999
4181
|
type: NgModule,
|
|
4000
4182
|
args: [{
|
|
4001
4183
|
declarations: [
|
|
@@ -4023,19 +4205,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4023
4205
|
}] });
|
|
4024
4206
|
|
|
4025
4207
|
class CanvaButtonApi {
|
|
4208
|
+
createDesign;
|
|
4209
|
+
editDesign;
|
|
4026
4210
|
}
|
|
4027
4211
|
;
|
|
4028
4212
|
|
|
4029
4213
|
class ImgApiDto {
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4214
|
+
shop_token;
|
|
4215
|
+
image_manager_route = '';
|
|
4216
|
+
pexels_token;
|
|
4217
|
+
pexels_route = '';
|
|
4218
|
+
shop_category;
|
|
4219
|
+
canva_token;
|
|
4220
|
+
canva_url = '';
|
|
4221
|
+
assets_route = 'assets/img-manager/';
|
|
4036
4222
|
}
|
|
4037
4223
|
|
|
4038
4224
|
class ImgManagerConfigDto {
|
|
4225
|
+
api;
|
|
4226
|
+
imgCDNConfig;
|
|
4039
4227
|
}
|
|
4040
4228
|
|
|
4041
4229
|
/*
|