nuxeo-development-framework 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/nuxeo-development-framework.umd.js +430 -75
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/display-suitable-icon/display-suitable-icon/icon.service.js +3 -3
- package/esm2015/lib/components/file-manger/components/clipboard/clipboard.component.js +264 -0
- package/esm2015/lib/components/file-manger/components/scan-modal/scan-modal.component.js +9 -8
- package/esm2015/lib/components/file-manger/components/sidepanel/sidepanel.component.js +18 -17
- package/esm2015/lib/components/file-manger/file-manager.abstract.js +30 -3
- package/esm2015/lib/components/file-manger/file-manger.module.js +28 -8
- package/esm2015/lib/shared-services/file-manager.service.js +62 -10
- package/esm2015/lib/shared-services/mainfolder.service.js +17 -14
- package/esm2015/public-api.js +2 -1
- package/fesm2015/nuxeo-development-framework.js +422 -75
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/components/file-manger/components/clipboard/clipboard.component.d.ts +41 -0
- package/lib/components/file-manger/file-manager.abstract.d.ts +4 -0
- package/lib/components/file-manger/file-manger.module.d.ts +37 -33
- package/lib/shared-services/file-manager.service.d.ts +6 -1
- package/lib/shared-services/mainfolder.service.d.ts +7 -4
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -20743,7 +20743,7 @@
|
|
|
20743
20743
|
function IconService() {
|
|
20744
20744
|
}
|
|
20745
20745
|
IconService.prototype.getFileIcon = function (document, dataType) {
|
|
20746
|
-
var _a;
|
|
20746
|
+
var _a, _b, _c, _d;
|
|
20747
20747
|
var thumb = 'assets/drive-icons/genericfile.png';
|
|
20748
20748
|
if (dataType === 'document') {
|
|
20749
20749
|
try {
|
|
@@ -20775,7 +20775,7 @@
|
|
|
20775
20775
|
//(document.contextParameters.thumbnail.url) ? document.contextParameters.thumbnail.url : 'assets/drive-icons/video.png';
|
|
20776
20776
|
}
|
|
20777
20777
|
else if ((document.properties.file || document.properties['file:content'])['mime-type'].includes('image')) {
|
|
20778
|
-
thumb = (document.contextParameters.thumbnail) ? document.contextParameters.thumbnail.url : 'assets/drive-icons/photo.png';
|
|
20778
|
+
thumb = ((_b = document === null || document === void 0 ? void 0 : document.contextParameters) === null || _b === void 0 ? void 0 : _b.thumbnail) ? (_d = (_c = document === null || document === void 0 ? void 0 : document.contextParameters) === null || _c === void 0 ? void 0 : _c.thumbnail) === null || _d === void 0 ? void 0 : _d.url : 'assets/drive-icons/photo.png';
|
|
20779
20779
|
}
|
|
20780
20780
|
else if ((document.properties.file || document.properties['file:content'])['mime-type'].includes('zip')) {
|
|
20781
20781
|
thumb = 'assets/drive-icons/zip.png';
|
|
@@ -20954,13 +20954,15 @@
|
|
|
20954
20954
|
}], ctorParameters: function () { return [{ type: i3__namespace.DatePipe }, { type: IconService }]; } });
|
|
20955
20955
|
|
|
20956
20956
|
var MainfolderService = /** @class */ (function () {
|
|
20957
|
-
function MainfolderService(nuxeoService, userPreference) {
|
|
20957
|
+
function MainfolderService(nuxeoService, appConfigService, userPreference) {
|
|
20958
20958
|
this.nuxeoService = nuxeoService;
|
|
20959
|
+
this.appConfigService = appConfigService;
|
|
20959
20960
|
this.userPreference = userPreference;
|
|
20961
|
+
this.localStoragKeys = this.appConfigService.myConfiguration.localStorageKey;
|
|
20960
20962
|
}
|
|
20961
|
-
MainfolderService.prototype.fetchfileManager_mainFolderId = function () {
|
|
20963
|
+
MainfolderService.prototype.fetchfileManager_mainFolderId = function (apiName) {
|
|
20962
20964
|
return rxjs.from(this.nuxeoService.nuxeoClient
|
|
20963
|
-
.operation('AC_UA_GetFileManagerID')
|
|
20965
|
+
.operation(apiName ? apiName : 'AC_UA_GetFileManagerID')
|
|
20964
20966
|
.execute({
|
|
20965
20967
|
headers: {
|
|
20966
20968
|
properties: 'file, dublincore, creator, driveroot, departmentspace',
|
|
@@ -21010,12 +21012,12 @@
|
|
|
21010
21012
|
return rxjs.of(false);
|
|
21011
21013
|
}));
|
|
21012
21014
|
};
|
|
21013
|
-
MainfolderService.prototype.save_fileManagerObj_ToLocalStorage = function (
|
|
21015
|
+
MainfolderService.prototype.save_fileManagerObj_ToLocalStorage = function (apiName) {
|
|
21014
21016
|
var _this = this;
|
|
21015
|
-
if (
|
|
21017
|
+
if (apiName === void 0) { apiName = 'AC_UA_GetFileManagerID'; }
|
|
21016
21018
|
/*return this.userPreference.hasItem('fileManagerObj') && !reset
|
|
21017
21019
|
? of(true):*/
|
|
21018
|
-
return this.fetchfileManager_mainFolderId().pipe(operators.tap(function (res) {
|
|
21020
|
+
return this.fetchfileManager_mainFolderId(apiName).pipe(operators.tap(function (res) {
|
|
21019
21021
|
console.log('res: ', res);
|
|
21020
21022
|
if (res) {
|
|
21021
21023
|
_this.fileManagerObj = {
|
|
@@ -21027,9 +21029,9 @@
|
|
|
21027
21029
|
return item;
|
|
21028
21030
|
}),
|
|
21029
21031
|
};
|
|
21030
|
-
_this.userPreference.set('fileManagerObj', JSON.stringify(_this.fileManagerObj));
|
|
21032
|
+
_this.userPreference.set(apiName ? _this.localStoragKeys[apiName] : 'fileManagerObj', JSON.stringify(_this.fileManagerObj));
|
|
21031
21033
|
}
|
|
21032
|
-
}), operators.switchMap(function (value) { return rxjs.of(_this.get_fileManagerObj_FromLocalStorage()); }));
|
|
21034
|
+
}), operators.switchMap(function (value) { return rxjs.of(_this.get_fileManagerObj_FromLocalStorage(apiName ? _this.localStoragKeys[apiName] : 'fileManagerObj')); }));
|
|
21033
21035
|
};
|
|
21034
21036
|
MainfolderService.prototype.save_myfilesManagerObj_ToLocalStorage = function () {
|
|
21035
21037
|
var _this = this;
|
|
@@ -21075,9 +21077,9 @@
|
|
|
21075
21077
|
}
|
|
21076
21078
|
}));
|
|
21077
21079
|
};
|
|
21078
|
-
MainfolderService.prototype.get_fileManagerObj_FromLocalStorage = function () {
|
|
21079
|
-
if (this.userPreference.hasItem('fileManagerObj')) {
|
|
21080
|
-
return JSON.parse(this.userPreference.get('fileManagerObj'));
|
|
21080
|
+
MainfolderService.prototype.get_fileManagerObj_FromLocalStorage = function (key) {
|
|
21081
|
+
if (this.userPreference.hasItem(key ? key : 'fileManagerObj')) {
|
|
21082
|
+
return JSON.parse(this.userPreference.get(key ? key : 'fileManagerObj'));
|
|
21081
21083
|
}
|
|
21082
21084
|
return null;
|
|
21083
21085
|
};
|
|
@@ -21101,14 +21103,14 @@
|
|
|
21101
21103
|
};
|
|
21102
21104
|
return MainfolderService;
|
|
21103
21105
|
}());
|
|
21104
|
-
MainfolderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: MainfolderService, deps: [{ token: NuxeoService$1 }, { token: UserPreferencesService$1 }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
21106
|
+
MainfolderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: MainfolderService, deps: [{ token: NuxeoService$1 }, { token: AppConfigService }, { token: UserPreferencesService$1 }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
21105
21107
|
MainfolderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: MainfolderService, providedIn: 'root' });
|
|
21106
21108
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: MainfolderService, decorators: [{
|
|
21107
21109
|
type: i0.Injectable,
|
|
21108
21110
|
args: [{
|
|
21109
21111
|
providedIn: 'root',
|
|
21110
21112
|
}]
|
|
21111
|
-
}], ctorParameters: function () { return [{ type: NuxeoService$1 }, { type: UserPreferencesService$1 }]; } });
|
|
21113
|
+
}], ctorParameters: function () { return [{ type: NuxeoService$1 }, { type: AppConfigService }, { type: UserPreferencesService$1 }]; } });
|
|
21112
21114
|
|
|
21113
21115
|
var RecentlyViewedService = /** @class */ (function () {
|
|
21114
21116
|
function RecentlyViewedService(userPreference, callApiService) {
|
|
@@ -21183,12 +21185,14 @@
|
|
|
21183
21185
|
this.router = router;
|
|
21184
21186
|
this.recentlyViewedService = recentlyViewedService;
|
|
21185
21187
|
this.onRefreshingFileManger = new rxjs.Subject();
|
|
21188
|
+
this.onRefreshClipboard = new i0.EventEmitter();
|
|
21186
21189
|
this.permissionsList = ['canDelete', 'canCreate', 'canDownload', 'canUpdate', 'canPublish', 'canPublishFolders', 'canGet', 'canCopy', 'canCopyFile', 'canDeleteFromSourceParent',
|
|
21187
21190
|
'canRenameToSourceParent', 'setSynchronize', 'setUnSynchronize', 'canAddToQuickAccess', 'canShare', 'canRename', 'canMove', 'canMoveFile', 'lockOwnerIfLocked', 'notSecretFile', 'isUserSubscriberToFile', 'canSubscribe'];
|
|
21188
21191
|
this.userPermittedTypes = [];
|
|
21189
21192
|
this.userPermittedTypesTotalSize = -1;
|
|
21190
21193
|
this.userPermittedFilesOnly = [];
|
|
21191
21194
|
this.isArabic = false;
|
|
21195
|
+
this.clipboardPermissionList = ['canCopy', 'canMove'];
|
|
21192
21196
|
// getTreeNodeChildren = (parent) => {
|
|
21193
21197
|
// let params = {
|
|
21194
21198
|
// queryParams: parent ? parent : '',
|
|
@@ -21226,6 +21230,7 @@
|
|
|
21226
21230
|
.toPromise();
|
|
21227
21231
|
};
|
|
21228
21232
|
this.setMyTableConfiguration();
|
|
21233
|
+
this.myPagesRootNames = this.appConfService.myConfiguration.myPagesRootsNames;
|
|
21229
21234
|
this.langSubscription = this.translationService.isArabic$.subscribe(function (res) {
|
|
21230
21235
|
_this.isArabic = res;
|
|
21231
21236
|
_this.userPermittedTypes = _this.sortingTypes(_this.userPermittedTypes);
|
|
@@ -21241,6 +21246,54 @@
|
|
|
21241
21246
|
this.fields = this.allFilesConfig.fields;
|
|
21242
21247
|
this.pageProvider = this.allFilesConfig.pageProvider;
|
|
21243
21248
|
};
|
|
21249
|
+
// return accepted types for certain id
|
|
21250
|
+
FileManagerService.prototype.getClipboardAcceptedTypes = function (id) {
|
|
21251
|
+
return rxjs.from(this.nuxeoService.nuxeoClient
|
|
21252
|
+
.repository()
|
|
21253
|
+
.headers({
|
|
21254
|
+
"properties": "*",
|
|
21255
|
+
'X-NXenrichers-document': 'accepted_children',
|
|
21256
|
+
})
|
|
21257
|
+
.fetch(id)).pipe(operators.map(function (data) {
|
|
21258
|
+
delete data._nuxeo;
|
|
21259
|
+
delete data._repository;
|
|
21260
|
+
return data;
|
|
21261
|
+
}), operators.catchError(function (err) {
|
|
21262
|
+
throw err;
|
|
21263
|
+
}));
|
|
21264
|
+
};
|
|
21265
|
+
FileManagerService.prototype.getClipboardDocuments = function (docIds, sortObj) {
|
|
21266
|
+
var _this = this;
|
|
21267
|
+
return this.callApi.query({
|
|
21268
|
+
pageProvider: 'Documents_InList_PP',
|
|
21269
|
+
currentPageIndex: 0,
|
|
21270
|
+
offset: 0,
|
|
21271
|
+
pageSize: 15,
|
|
21272
|
+
system_uuid: JSON.stringify(docIds),
|
|
21273
|
+
sortBy: (sortObj) ? sortObj.sortBy : '',
|
|
21274
|
+
sortOrder: (sortObj) ? sortObj.sortOrder : ''
|
|
21275
|
+
}, {
|
|
21276
|
+
headers: {
|
|
21277
|
+
"X-NXproperties": "dublincore,file,dmsfolder,generaldocument",
|
|
21278
|
+
"enrichers-document": "thumbnail,permissions"
|
|
21279
|
+
}
|
|
21280
|
+
}).pipe(operators.mergeMap(function (data) { return rxjs.from(data.entries).pipe(operators.mergeMap(
|
|
21281
|
+
// this updates related to clipboard feature
|
|
21282
|
+
function (item) {
|
|
21283
|
+
item['isFile'] = _this.checkIfDocumentIsFile(item);
|
|
21284
|
+
item['isSelected'] = false;
|
|
21285
|
+
var permissionsCalls = _this.clipboardPermissionList.map(function (permission) {
|
|
21286
|
+
return _this.permissionEvaluatorService.evaluateRule(permission, { entity: item });
|
|
21287
|
+
});
|
|
21288
|
+
return rxjs.combineLatest(permissionsCalls);
|
|
21289
|
+
}, function (original, detail) {
|
|
21290
|
+
_this.clipboardPermissionList.forEach(function (value, index) {
|
|
21291
|
+
original[value] = detail[index];
|
|
21292
|
+
});
|
|
21293
|
+
}), operators.toArray(), operators.map(function (entry) { return (__spreadArray([], __read(data.entries))); })); }), operators.catchError(function (err) {
|
|
21294
|
+
throw err;
|
|
21295
|
+
}));
|
|
21296
|
+
};
|
|
21244
21297
|
FileManagerService.prototype.sortingTypes = function (types) {
|
|
21245
21298
|
if (this.isArabic) {
|
|
21246
21299
|
types = types.sort(function (item1, item2) {
|
|
@@ -21463,10 +21516,11 @@
|
|
|
21463
21516
|
system_isTrashed: false,
|
|
21464
21517
|
pageSize: 500
|
|
21465
21518
|
};
|
|
21466
|
-
return (id == 'root' ? rxjs.of(this.mainFolderService.get_fileManagerObj_FromLocalStorage()) :
|
|
21467
|
-
.
|
|
21468
|
-
|
|
21469
|
-
|
|
21519
|
+
return (id == 'root' ? rxjs.of(this.mainFolderService.get_fileManagerObj_FromLocalStorage('fileManagerObj')) :
|
|
21520
|
+
id === 'workSpaceRoot' ? rxjs.of(this.mainFolderService.get_fileManagerObj_FromLocalStorage('workSpaceFileMangerObj')) : this.callApi
|
|
21521
|
+
.query(Object.assign({ pageProvider: this.pageProvider }, params), {
|
|
21522
|
+
headers: this.headers,
|
|
21523
|
+
}))
|
|
21470
21524
|
.pipe(operators.map(function (data) { return data.entries.map(function (item) { return _this.adapter.adaptIn(item, _this.fields); }); }), operators.map(function (entries) { return entries.map(function (item) { return _this.fileManagerAdapter.adapt(item); }); }), operators.mergeMap(function (entries) { return rxjs.from(entries).pipe(operators.mergeMap(function (item) {
|
|
21471
21525
|
var permissionsCalls = _this.permissionsList.map(function (permission) {
|
|
21472
21526
|
return _this.permissionEvaluatorService.evaluateRule(permission, { entity: item.entity });
|
|
@@ -21528,10 +21582,11 @@
|
|
|
21528
21582
|
currentPageIndex: 0,
|
|
21529
21583
|
pageSize: 500,
|
|
21530
21584
|
};
|
|
21531
|
-
return (id == 'root' ? this.mainFolderService.save_fileManagerObj_ToLocalStorage(
|
|
21532
|
-
|
|
21533
|
-
|
|
21534
|
-
|
|
21585
|
+
return (id == 'root' ? this.mainFolderService.save_fileManagerObj_ToLocalStorage('AC_UA_GetFileManagerID') :
|
|
21586
|
+
id == 'workSpaceRoot' ? this.mainFolderService.save_fileManagerObj_ToLocalStorage('AC_UA_GetSpaceID') : this.callApi
|
|
21587
|
+
.query(Object.assign({ pageProvider: 'PP_Document_Content_DB' }, params), {
|
|
21588
|
+
headers: this.headers,
|
|
21589
|
+
}))
|
|
21535
21590
|
.pipe(operators.map(function (data) { return data.entries.map(function (item) { return _this.adapter.adaptIn(item, _this.fields); }); }), operators.map(function (entries) { return entries.map(function (item) { return _this.fileManagerAdapter.adapt(item); }); }), operators.mergeMap(function (entries) { return rxjs.from(entries).pipe(operators.mergeMap(function (item) {
|
|
21536
21591
|
var permissionsCalls = _this.permissionsList.map(function (permission) {
|
|
21537
21592
|
return _this.permissionEvaluatorService.evaluateRule(permission, { entity: item.entity });
|
|
@@ -23265,6 +23320,48 @@
|
|
|
23265
23320
|
}]
|
|
23266
23321
|
}], ctorParameters: function () { return [{ type: NuxeoService$1 }, { type: i1__namespace$6.MatDialog }, { type: AdapterService }]; } });
|
|
23267
23322
|
|
|
23323
|
+
var DisplaySuitableIconComponent = /** @class */ (function () {
|
|
23324
|
+
function DisplaySuitableIconComponent(iconService) {
|
|
23325
|
+
this.iconService = iconService;
|
|
23326
|
+
this.dataType = 'document';
|
|
23327
|
+
this.archive = false;
|
|
23328
|
+
}
|
|
23329
|
+
DisplaySuitableIconComponent.prototype.ngOnInit = function () {
|
|
23330
|
+
this.image = this.getFileIcon(this.data);
|
|
23331
|
+
};
|
|
23332
|
+
DisplaySuitableIconComponent.prototype.getFileIcon = function (document) {
|
|
23333
|
+
if (!this.archive)
|
|
23334
|
+
return this.iconService.getFileIcon(document, this.dataType);
|
|
23335
|
+
else
|
|
23336
|
+
return this.iconService.getArchivedDocumentIcon(document, this.dataType);
|
|
23337
|
+
};
|
|
23338
|
+
// used to recalculate icon when sorting in table ( when sorting component not rendered again so onint won't excuted )
|
|
23339
|
+
DisplaySuitableIconComponent.prototype.ngOnChanges = function () {
|
|
23340
|
+
this.image = this.getFileIcon(this.data);
|
|
23341
|
+
};
|
|
23342
|
+
return DisplaySuitableIconComponent;
|
|
23343
|
+
}());
|
|
23344
|
+
DisplaySuitableIconComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: DisplaySuitableIconComponent, deps: [{ token: IconService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
23345
|
+
DisplaySuitableIconComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: DisplaySuitableIconComponent, selector: "app-display-suitable-icon", inputs: { data: "data", size: "size", dataType: "dataType", archive: "archive" }, usesOnChanges: true, ngImport: i0__namespace, template: "<!-- <div *ngIf=\" data.type == 'Folder';else notFolder\">\r\n <div [style.width]=\"size\">\r\n <img class=\"w-full\" [src]=\"'assets/drive-icons/folder.png'\" />\r\n </div>\r\n</div>\r\n<ng-template #notFolder>\r\n <div *ngIf=\"!data.properties.file; else file\">\r\n <img class=\"w-full\" [src]=\"'assets/drive-icons/generic.png'\" />\r\n </div>\r\n <ng-template #file>\r\n <div *ngIf=\"data.properties.file['mime-type'].includes('image');else noImage\" [style.width]=\"size\">\r\n <img class=\"w-full\" [src]=\"data.contextParameters.thumbnail.url | secure | async\" />\r\n <ng-template #noImage>\r\n <mat-icon svgIcon=\"iconsmind:photo\" class=\"icon-size-6\"></mat-icon>\r\n </ng-template> \r\n </div>\r\n <div *ngIf=\" data.properties.file['mime-type'].includes('video');else noVideo\" [style.width]=\"size\">\r\n <figure class=\"hover-video w-full\">\r\n <img class=\"w-full\" [src]=\"data.contextParameters.thumbnail.url | secure | async\" />\r\n <figcaption>\r\n <mat-icon svgIcon=\"iconsmind:play_music\" class=\"icon-size-4\"></mat-icon>\r\n </figcaption>\r\n </figure>\r\n <ng-template #noVideo>\r\n <mat-icon svgIcon=\"iconsmind:video_2\" class=\"icon-size-6\"></mat-icon>\r\n </ng-template> \r\n </div>\r\n <div *ngIf=\" data.properties.file['mime-type'].includes('application')\">\r\n <mat-icon svgIcon=\"iconsmind:file\" class=\"icon-size-6\"></mat-icon>\r\n </div>\r\n </ng-template>\r\n</ng-template> -->\r\n\r\n\r\n<div [style.width]=\"size\">\r\n <img class=\"w-full\" [src]=\"image\" />\r\n</div>", styles: [".hover-video{display:inline-block;margin:8px;max-width:100%;min-width:100%;overflow:hidden;position:relative;text-align:center}.hover-video *{box-sizing:border-box;transition:all .45s ease}.hover-video:before,.hover-video:after{position:absolute;top:0;bottom:0;left:0;right:0;content:\"\";transition:all .3s ease;z-index:1;opacity:0;transform:scaleY(2)}.hover-video video{vertical-align:top;max-width:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden}.hover-video figcaption{position:absolute;top:0;bottom:0;left:0;right:0;align-items:center;z-index:1;display:flex;flex-direction:column;justify-content:center;line-height:1.1em;opacity:0;z-index:2;transition-delay:.1s;font-size:24px;font-family:sans-serif;font-weight:400;letter-spacing:1px;text-transform:uppercase}.hover-video{transform:scale(1);opacity:1}.hover-video>video{opacity:.7}.hover-video figcaption{opacity:1}.hover-video:hover figcaption:hover{opacity:.5;background-color:#eaecee}\n"] });
|
|
23346
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: DisplaySuitableIconComponent, decorators: [{
|
|
23347
|
+
type: i0.Component,
|
|
23348
|
+
args: [{
|
|
23349
|
+
selector: 'app-display-suitable-icon',
|
|
23350
|
+
templateUrl: './display-suitable-icon.component.html',
|
|
23351
|
+
styleUrls: ['./display-suitable-icon.component.scss']
|
|
23352
|
+
}]
|
|
23353
|
+
}], ctorParameters: function () { return [{ type: IconService }]; }, propDecorators: { data: [{
|
|
23354
|
+
type: i0.Input,
|
|
23355
|
+
args: ['data']
|
|
23356
|
+
}], size: [{
|
|
23357
|
+
type: i0.Input,
|
|
23358
|
+
args: ['size']
|
|
23359
|
+
}], dataType: [{
|
|
23360
|
+
type: i0.Input
|
|
23361
|
+
}], archive: [{
|
|
23362
|
+
type: i0.Input
|
|
23363
|
+
}] } });
|
|
23364
|
+
|
|
23268
23365
|
var DynamicTabsComponent = /** @class */ (function () {
|
|
23269
23366
|
function DynamicTabsComponent() {
|
|
23270
23367
|
this.tabs = [];
|
|
@@ -24357,7 +24454,7 @@
|
|
|
24357
24454
|
return SidepanelComponent;
|
|
24358
24455
|
}());
|
|
24359
24456
|
SidepanelComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: SidepanelComponent, deps: [{ token: i3__namespace.DatePipe }, { token: UserPreferencesService$1 }, { token: DialogMangmentService }, { token: DynamicFormService }, { token: DocumentsService }, { token: TagsApiService }, { token: TranslationService$1 }, { token: i1__namespace$6.MatDialog }, { token: SharedDocsService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
24360
|
-
SidepanelComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: SidepanelComponent, selector: "app-sidepanel", inputs: { selectedItem: "selectedItem", menuOpen: "menuOpen", sourcePage: "sourcePage", allowAddAndBlock: "allowAddAndBlock" }, outputs: { onCloseSideMenu: "onCloseSideMenu" }, viewQueries: [{ propertyName: "detailsTemplate", first: true, predicate: ["detailsTemplate"], descendants: true, static: true }, { propertyName: "commentsTemplate", first: true, predicate: ["commentsTemplate"], descendants: true, static: true }, { propertyName: "activityTemplate", first: true, predicate: ["activityTemplate"], descendants: true, static: true }, { propertyName: "permissionsTemplate", first: true, predicate: ["permissionsTemplate"], descendants: true, static: true }, { propertyName: "filesTemplate", first: true, predicate: ["filesTemplate"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"side-menu-details\" SetRtl>\r\n <div class=\"h-full\" *ngIf=\"selectedItem && showDetails && !sideMenuLoading\">\r\n <div class=\"\">\r\n <div class=\"mb-3 px-5 py-1 w-100 flex border-b-2 items-center\">\r\n <title-with-icon class=\"-my-1.5\" [context]=\"selectedItem.entity\" [showTitle]=\"false\"></title-with-icon>\r\n\r\n <div class=\"justify-center flex flex-col flex-1 flex-grow-0 w-7/12\" *ngIf=\"!selectedItem.isDirectory\">\r\n <div class=\"text-base text-gray-500 font-bold truncate\"\r\n [title]=\"selectedItem.entity?.properties?.['file:content']?.['name']\"\r\n [alt]=\"selectedItem.entity?.properties?.['file:content']?.['name']\">\r\n {{selectedItem.entity?.properties?.['file:content']?.['name']}}\r\n </div>\r\n <div class=\"text-gray-500 text-sm\">\r\n {{((selectedItem.entity?.properties?.['file:content']?.['length']) / (1024 *\r\n 1024)).toFixed(2) }}\r\n MB\r\n </div>\r\n </div>\r\n <div class=\"\r\n d-flex\r\n items-center\r\n text-base text-gray-500\r\n font-bold\r\n \" *ngIf=\"selectedItem.isDirectory\">\r\n {{ selectedItem?.name }}\r\n </div>\r\n <ng-container *permission=\"{name: 'lockOwnerIfLocked', entity: selectedItem.entity}\">\r\n <mat-icon class=\"text-gray-500 cursor-pointer mx-3\"\r\n *permission=\"{name: 'canUpdate', entity: selectedItem.entity}\"\r\n matTooltip=\"{{ 'FOLDERS.UPDATE_DETAILS' | translate }}\"\r\n (click)=\"openUpdateFromSideMenu()\">edit</mat-icon>\r\n </ng-container>\r\n </div>\r\n <mat-icon class=\"close-icon text-gray-500\" (click)=\"closeDetailsMenu()\"\r\n [matTooltip]=\"'BUTTONS.CLOSE' | translate\">close</mat-icon>\r\n </div>\r\n <div class=\"dynamic-section\">\r\n <div class=\"mx-2 h-full\">\r\n <app-dynamic-tabs [tabs]=\"myTabs\"></app-dynamic-tabs>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"h-full font-bold d-flex justify-center items-center\" *ngIf=\"sideMenuLoading\">\r\n {{ \"loading\" | translate }}\r\n </div>\r\n</div>\r\n\r\n<!-- Comments -->\r\n<ng-template #commentsTemplate>\r\n <div class=\"overflow-auto h-full\">\r\n <app-comments-dashlet [correspondence]=\"sideMenuFileDetails\" [entityId]=\"selectedItem.entity.uid\"\r\n [showaddcomment]=\"true\" [row]=\"false\">\r\n </app-comments-dashlet>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- myLogFile -->\r\n<ng-template #activityTemplate>\r\n <!-- <cts-viewer-log [correspondence]=\"selectedItem.entity\"></cts-viewer-log> -->\r\n <div class=\"h-full mt-3\">\r\n <app-activities-log [documentId]=\"selectedItem.entity.uid\" [documentTitle]=\"selectedItem.entity.title\"\r\n [file]=\"sideMenuFileDetails\"></app-activities-log>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #permissionsTemplate>\r\n <div class=\"h-full overflow-auto px-2 mt-3\">\r\n <app-permissions [sourcePage]=\"sourcePage\"\r\n [allowAddAndBlock]=\"allowAddAndBlock\" [document]=\"sideMenuFileDetails\"\r\n [documentId]=\"selectedItem.entity.uid\"></app-permissions>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Files Tab -->\r\n<ng-template #filesTemplate>\r\n <div class=\"h-full overflow-auto px-2 mt-3\">\r\n <cts-versions [file]=\"selectedItem.entity\"></cts-versions>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Details -->\r\n<ng-template #detailsTemplate>\r\n <div class=\"pb-2 mt-3 h-full px-2 overflow-auto\">\r\n <div class=\"static-data\">\r\n <div class=\"mt-5\">\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"FOLDERS.TITLE_ONLY\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"dc:title\"] }}\r\n </div>\r\n </div>\r\n <div class=\"mt-3\">\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"FOLDERS.DESCRIPTION_ONLY\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"dc:description\"] }}\r\n </div>\r\n </div>\r\n <div class=\"mt-3\">\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"FOLDERS.CREATED_AT\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{\r\n dynamicFormData[\"dc:created\"]\r\n | localizedDate: \"dd MMMM yyyy\":(isArabic? 'ar-AR' : 'en-US')\r\n }}\r\n </div>\r\n </div>\r\n <div class=\"mt-3\">\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"FOLDERS.LAST_MODIFIED\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{\r\n dynamicFormData[\"dc:modified\"]\r\n | localizedDate: \"dd MMMM yyyy\":(isArabic? 'ar-AR' : 'en-US')\r\n }}\r\n </div>\r\n </div>\r\n\r\n <div class=\"super-document-fields\">\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:documentSubject\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.DOCUMENT_SUBJECT\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"gdoc:documentSubject\"] ? dynamicFormData[\"gdoc:documentSubject\"] : '--'}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:documentNumber\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.DOCUMENT_NUMBER\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"gdoc:documentNumber\"] ? dynamicFormData[\"gdoc:documentNumber\"] : '--'}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:documentReferenceNumber\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.DOCUMENT_REF_NUMBER\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\" dir=\"ltr\">\r\n {{ dynamicFormData[\"gdoc:documentReferenceNumber\"] ?\r\n dynamicFormData[\"gdoc:documentReferenceNumber\"] : '--'}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:gDocumentDate\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.DOCUMENT_DATE\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"gdoc:gDocumentDate\"] ? (dynamicFormData[\"gdoc:gDocumentDate\"] |\r\n localizedDate: \"dd MMMM yyyy\":(isArabic? 'ar-AR' : 'en-US')) : '--'}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='(selectedItem.entity.category && selectedItem.entity.category !== {})'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.CATEGORY\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ (selectedItem.entity.category && selectedItem.entity.category !== {}) ?\r\n (isArabic ? selectedItem.entity.category.arabicName : selectedItem.entity.category.englishName)\r\n : '--'}}\r\n </div>\r\n </div>\r\n <div class=\"mt-3\"\r\n *ngIf='(selectedItem.entity.categoryType && selectedItem.entity.categoryType.arabicName)'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.CATEGORY_TYPE\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ (selectedItem.entity.categoryType && selectedItem.entity.categoryType.arabicName) ?\r\n (isArabic ? selectedItem.entity.categoryType.arabicName :\r\n selectedItem.entity.categoryType.englishName)\r\n : '--'}}\r\n </div>\r\n </div>\r\n <div class=\"mt-3\" *ngIf='(selectedItem.entity.mainTopic && selectedItem.entity.mainTopic.arabicName)'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.MAIN_TOPIC\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ (selectedItem.entity.mainTopic && selectedItem.entity.mainTopic.arabicName) ?\r\n (isArabic ? selectedItem.entity.mainTopic.arabicName :\r\n selectedItem.entity.mainTopic.englishName)\r\n : '--'}}\r\n </div>\r\n </div>\r\n <div class=\"mt-3\"\r\n *ngIf='(selectedItem.entity.documentType && selectedItem.entity.documentType.arabicName)'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.DOCUMENT_TYPE\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ (selectedItem.entity.documentType && selectedItem.entity.documentType.arabicName) ?\r\n (isArabic ? selectedItem.entity.documentType.arabicName :\r\n selectedItem.entity.documentType.englishTitle)\r\n : '--'}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:secrecyLevel\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.SCRECY_LEVEL\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ 'vocabulary.VOC_SecrecyLevel.' + dynamicFormData[\"gdoc:secrecyLevel\"] | translate}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:importance\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.IMPORTANCE_LEVEL\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ 'vocabulary.VOC_Importance.' + dynamicFormData[\"gdoc:importance\"] | translate}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='selectedItem.entity.department'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.DEPARTMENT_NAME\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ selectedItem.entity.department ?\r\n (isArabic ? selectedItem.entity.department.arabicName :\r\n selectedItem.entity.department.englishName)\r\n : '--'}}\r\n </div>\r\n </div>\r\n\r\n <!-- <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:departmentCode\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.DEPARTMENT_CODE\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"gdoc:departmentCode\"] ? dynamicFormData[\"gdoc:departmentCode\"] : '--'}}\r\n </div>\r\n </div> -->\r\n\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:agencyCategoryCode\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.AGENCY_CATEGORY_CODE\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"gdoc:agencyCategoryCode\"] ?\r\n (isArabic ? dynamicFormData[\"gdoc:agencyCategoryCode\"]['properties']['label_ar']\r\n : dynamicFormData[\"gdoc:agencyCategoryCode\"]['properties']['label_en'])\r\n : '--'}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:agencyNameCode\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.AGENCY_NAME\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"gdoc:agencyNameCode\"] ?\r\n (isArabic ? dynamicFormData[\"gdoc:agencyNameCode\"]['properties']['label_ar']\r\n : dynamicFormData[\"gdoc:agencyNameCode\"]['properties']['label_en'])\r\n : '--'}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:countryCategoryCode\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.COUNTRY_CATEGORY_CODE\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"gdoc:countryCategoryCode\"] ?\r\n (isArabic ? dynamicFormData[\"gdoc:countryCategoryCode\"]['properties']['label_ar']\r\n : dynamicFormData[\"gdoc:countryCategoryCode\"]['properties']['label_en'])\r\n : '--'}}\r\n\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:countryCode\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.COUNTRY_NAME\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"gdoc:countryCode\"] ?\r\n (isArabic ? dynamicFormData[\"gdoc:countryCode\"]['properties']['label_ar']\r\n : dynamicFormData[\"gdoc:countryCode\"]['properties']['label_en'])\r\n : '--'}}\r\n </div>\r\n </div>\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:remarks\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.REMARKS\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"gdoc:remarks\"] ? dynamicFormData[\"gdoc:remarks\"] : '--'}}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\">\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"FOLDERS.BY\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm d-flex\">\r\n <div class=\"d-flex items-center bg-gray-100 rounded-xl\">\r\n <app-user [user]=\"dynamicFormData['dc:creator']\"></app-user>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"mt-3\" *ngIf=\"dynamicFormData['dc:contributors'].length > 0\">\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"FOLDERS.CONTRUBITORS\" | translate }}\r\n </div>\r\n <div class=\"d-flex flex-wrap\">\r\n <div class=\"d-flex items-center bg-gray-100 rounded-xl mb-2\"\r\n *ngFor=\"let user of dynamicFormData['dc:contributors']\">\r\n <app-user [user]=\"user\"></app-user>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"mt-3\" *ngIf=\"sharedListUser.length > 0\">\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{\"share.shareWith\" | translate}}\r\n </div>\r\n <div class=\"d-flex flex-wrap\">\r\n <div class=\"d-flex items-center bg-gray-100 rounded-xl mb-2\" *ngFor=\"let user of sharedListUser\">\r\n <app-user [user]=\"user\"></app-user>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"mt-5\" *ngIf=\"dynamicForm && dynamicFormData\">\r\n <app-multiple-dynamic-form-viewer [form]=\"dynamicForm\"\r\n [data]=\"dynamicFormData\"></app-multiple-dynamic-form-viewer>\r\n </div>\r\n <div class=\"tags-wrappers relative px-0 py-3\">\r\n <cts-correspondence-tags [correspondence]=\"sideMenuFileDetails\" [customClass]=\"'tags-dms-wrapper'\"\r\n [useParams]=\"true\" [addCustomApiName]=\"'Services.TagDocument'\"\r\n [deleteCustomApiName]=\"'Services.UntagDocument'\">\r\n </cts-correspondence-tags>\r\n </div>\r\n </div>\r\n</ng-template>", styles: [""], components: [{ type: i2__namespace$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: DynamicTabsComponent, selector: "app-dynamic-tabs", inputs: ["tabs", "selectedIndex"] }, { type: CommentsDashletComponent, selector: "app-comments-dashlet", inputs: ["entityId", "correspondence", "row", "showaddcomment", "showCommentActions"] }, { type: ActivitiesLogComponent, selector: "app-activities-log", inputs: ["documentId", "file", "documentTitle"], outputs: ["success"] }, { type: PermissionsComponent, selector: "app-permissions", inputs: ["documentId", "document", "allowAddAndBlock", "sourcePage"] }, { type: VersionsComponent, selector: "cts-versions", inputs: ["selectedVersion", "file", "actions"], outputs: ["handleActions"] }, { type: UserComponent, selector: "app-user", inputs: ["user", "type"] }, { type: MultipleDynamicFormViewerComponent, selector: "app-multiple-dynamic-form-viewer", inputs: ["form", "data"] }, { type: CorrespondenceTagsComponent, selector: "cts-correspondence-tags", inputs: ["correspondence", "customClass", "addCustomApiName", "deleteCustomApiName", "useParams", "accordionMode", "systemTags", "accordionOpen", "title"] }], directives: [{ type: SetRtlDirective, selector: "[SetRtl]" }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: PermissionsDirective, selector: "[permission]", inputs: ["permission"] }, { type: i8__namespace.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i3__namespace$3.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1__namespace$1.TranslatePipe, "localizedDate": LocalizedDatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
24457
|
+
SidepanelComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: SidepanelComponent, selector: "app-sidepanel", inputs: { selectedItem: "selectedItem", menuOpen: "menuOpen", sourcePage: "sourcePage", allowAddAndBlock: "allowAddAndBlock" }, outputs: { onCloseSideMenu: "onCloseSideMenu" }, viewQueries: [{ propertyName: "detailsTemplate", first: true, predicate: ["detailsTemplate"], descendants: true, static: true }, { propertyName: "commentsTemplate", first: true, predicate: ["commentsTemplate"], descendants: true, static: true }, { propertyName: "activityTemplate", first: true, predicate: ["activityTemplate"], descendants: true, static: true }, { propertyName: "permissionsTemplate", first: true, predicate: ["permissionsTemplate"], descendants: true, static: true }, { propertyName: "filesTemplate", first: true, predicate: ["filesTemplate"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"side-menu-details\" SetRtl>\r\n <div class=\"h-full\" *ngIf=\"selectedItem && showDetails && !sideMenuLoading\">\r\n <div class=\"\">\r\n <div class=\"mb-3 px-5 py-1 w-100 flex border-b-2 items-center\">\r\n <!-- <title-with-icon class=\"-my-1.5\" [context]=\"selectedItem.entity\" [showTitle]=\"false\"></title-with-icon> -->\r\n <app-display-suitable-icon [data]=\"selectedItem\" [size]=\"'40px'\"></app-display-suitable-icon>\r\n\r\n <div class=\"justify-center flex flex-col flex-1 flex-grow-0 w-7/12\" *ngIf=\"!selectedItem.isDirectory\">\r\n <div class=\"text-base text-gray-500 font-bold truncate\"\r\n [title]=\"selectedItem.entity?.properties?.['file:content']?.['name']\"\r\n [alt]=\"selectedItem.entity?.properties?.['file:content']?.['name']\">\r\n {{selectedItem.entity?.properties?.['file:content']?.['name']}}\r\n </div>\r\n <div class=\"text-gray-500 text-sm\">\r\n {{((selectedItem.entity?.properties?.['file:content']?.['length']) / (1024 *\r\n 1024)).toFixed(2) }}\r\n MB\r\n </div>\r\n </div>\r\n <div class=\"\r\n d-flex\r\n items-center\r\n text-base text-gray-500\r\n font-bold\r\n \" *ngIf=\"selectedItem.isDirectory\">\r\n {{ selectedItem?.name }}\r\n </div>\r\n <ng-container *permission=\"{name: 'lockOwnerIfLocked', entity: selectedItem.entity}\">\r\n <mat-icon class=\"text-gray-500 cursor-pointer mx-3\"\r\n *permission=\"{name: 'canUpdate', entity: selectedItem.entity}\"\r\n matTooltip=\"{{ 'FOLDERS.UPDATE_DETAILS' | translate }}\"\r\n (click)=\"openUpdateFromSideMenu()\">edit</mat-icon>\r\n </ng-container>\r\n </div>\r\n <mat-icon class=\"close-icon text-gray-500\" (click)=\"closeDetailsMenu()\"\r\n [matTooltip]=\"'BUTTONS.CLOSE' | translate\">close</mat-icon>\r\n </div>\r\n <div class=\"dynamic-section\">\r\n <div class=\"mx-2 h-full\">\r\n <app-dynamic-tabs [tabs]=\"myTabs\"></app-dynamic-tabs>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"h-full font-bold d-flex justify-center items-center\" *ngIf=\"sideMenuLoading\">\r\n {{ \"loading\" | translate }}\r\n </div>\r\n</div>\r\n\r\n<!-- Comments -->\r\n<ng-template #commentsTemplate>\r\n <div class=\"overflow-auto h-full\">\r\n <app-comments-dashlet [correspondence]=\"sideMenuFileDetails\" [entityId]=\"selectedItem.entity.uid\"\r\n [showaddcomment]=\"true\" [row]=\"false\">\r\n </app-comments-dashlet>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- myLogFile -->\r\n<ng-template #activityTemplate>\r\n <!-- <cts-viewer-log [correspondence]=\"selectedItem.entity\"></cts-viewer-log> -->\r\n <div class=\"h-full mt-3\">\r\n <app-activities-log [documentId]=\"selectedItem.entity.uid\" [documentTitle]=\"selectedItem.entity.title\"\r\n [file]=\"sideMenuFileDetails\"></app-activities-log>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #permissionsTemplate>\r\n <div class=\"h-full overflow-auto px-2 mt-3\">\r\n <app-permissions [sourcePage]=\"sourcePage\"\r\n [allowAddAndBlock]=\"allowAddAndBlock\" [document]=\"sideMenuFileDetails\"\r\n [documentId]=\"selectedItem.entity.uid\"></app-permissions>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Files Tab -->\r\n<ng-template #filesTemplate>\r\n <div class=\"h-full overflow-auto px-2 mt-3\">\r\n <cts-versions [file]=\"selectedItem.entity\"></cts-versions>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Details -->\r\n<ng-template #detailsTemplate>\r\n <div class=\"pb-2 mt-3 h-full px-2 overflow-auto\">\r\n <div class=\"static-data\">\r\n <div class=\"mt-5\">\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"FOLDERS.TITLE_ONLY\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"dc:title\"] }}\r\n </div>\r\n </div>\r\n <div class=\"mt-3\">\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"FOLDERS.DESCRIPTION_ONLY\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"dc:description\"] }}\r\n </div>\r\n </div>\r\n <div class=\"mt-3\">\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"FOLDERS.CREATED_AT\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{\r\n dynamicFormData[\"dc:created\"]\r\n | localizedDate: \"dd MMMM yyyy\":(isArabic? 'ar-AR' : 'en-US')\r\n }}\r\n </div>\r\n </div>\r\n <div class=\"mt-3\">\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"FOLDERS.LAST_MODIFIED\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{\r\n dynamicFormData[\"dc:modified\"]\r\n | localizedDate: \"dd MMMM yyyy\":(isArabic? 'ar-AR' : 'en-US')\r\n }}\r\n </div>\r\n </div>\r\n\r\n <div class=\"super-document-fields\">\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:documentSubject\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.DOCUMENT_SUBJECT\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"gdoc:documentSubject\"] ? dynamicFormData[\"gdoc:documentSubject\"] : '--'}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:documentNumber\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.DOCUMENT_NUMBER\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"gdoc:documentNumber\"] ? dynamicFormData[\"gdoc:documentNumber\"] : '--'}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:documentReferenceNumber\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.DOCUMENT_REF_NUMBER\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\" dir=\"ltr\">\r\n {{ dynamicFormData[\"gdoc:documentReferenceNumber\"] ?\r\n dynamicFormData[\"gdoc:documentReferenceNumber\"] : '--'}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:gDocumentDate\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.DOCUMENT_DATE\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"gdoc:gDocumentDate\"] ? (dynamicFormData[\"gdoc:gDocumentDate\"] |\r\n localizedDate: \"dd MMMM yyyy\":(isArabic? 'ar-AR' : 'en-US')) : '--'}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='(selectedItem.entity.category && selectedItem.entity.category !== {})'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.CATEGORY\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ (selectedItem.entity.category && selectedItem.entity.category !== {}) ?\r\n (isArabic ? selectedItem.entity.category.arabicName : selectedItem.entity.category.englishName)\r\n : '--'}}\r\n </div>\r\n </div>\r\n <div class=\"mt-3\"\r\n *ngIf='(selectedItem.entity.categoryType && selectedItem.entity.categoryType.arabicName)'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.CATEGORY_TYPE\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ (selectedItem.entity.categoryType && selectedItem.entity.categoryType.arabicName) ?\r\n (isArabic ? selectedItem.entity.categoryType.arabicName :\r\n selectedItem.entity.categoryType.englishName)\r\n : '--'}}\r\n </div>\r\n </div>\r\n <div class=\"mt-3\" *ngIf='(selectedItem.entity.mainTopic && selectedItem.entity.mainTopic.arabicName)'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.MAIN_TOPIC\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ (selectedItem.entity.mainTopic && selectedItem.entity.mainTopic.arabicName) ?\r\n (isArabic ? selectedItem.entity.mainTopic.arabicName :\r\n selectedItem.entity.mainTopic.englishName)\r\n : '--'}}\r\n </div>\r\n </div>\r\n <div class=\"mt-3\"\r\n *ngIf='(selectedItem.entity.documentType && selectedItem.entity.documentType.arabicName)'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.DOCUMENT_TYPE\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ (selectedItem.entity.documentType && selectedItem.entity.documentType.arabicName) ?\r\n (isArabic ? selectedItem.entity.documentType.arabicName :\r\n selectedItem.entity.documentType.englishTitle)\r\n : '--'}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:secrecyLevel\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.SCRECY_LEVEL\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ 'vocabulary.VOC_SecrecyLevel.' + dynamicFormData[\"gdoc:secrecyLevel\"] | translate}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:importance\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.IMPORTANCE_LEVEL\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ 'vocabulary.VOC_Importance.' + dynamicFormData[\"gdoc:importance\"] | translate}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='selectedItem.entity.department'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.DEPARTMENT_NAME\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ selectedItem.entity.department ?\r\n (isArabic ? selectedItem.entity.department.arabicName :\r\n selectedItem.entity.department.englishName)\r\n : '--'}}\r\n </div>\r\n </div>\r\n\r\n <!-- <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:departmentCode\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.DEPARTMENT_CODE\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"gdoc:departmentCode\"] ? dynamicFormData[\"gdoc:departmentCode\"] : '--'}}\r\n </div>\r\n </div> -->\r\n\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:agencyCategoryCode\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.AGENCY_CATEGORY_CODE\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"gdoc:agencyCategoryCode\"] ?\r\n (isArabic ? dynamicFormData[\"gdoc:agencyCategoryCode\"]['properties']['label_ar']\r\n : dynamicFormData[\"gdoc:agencyCategoryCode\"]['properties']['label_en'])\r\n : '--'}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:agencyNameCode\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.AGENCY_NAME\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"gdoc:agencyNameCode\"] ?\r\n (isArabic ? dynamicFormData[\"gdoc:agencyNameCode\"]['properties']['label_ar']\r\n : dynamicFormData[\"gdoc:agencyNameCode\"]['properties']['label_en'])\r\n : '--'}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:countryCategoryCode\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.COUNTRY_CATEGORY_CODE\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"gdoc:countryCategoryCode\"] ?\r\n (isArabic ? dynamicFormData[\"gdoc:countryCategoryCode\"]['properties']['label_ar']\r\n : dynamicFormData[\"gdoc:countryCategoryCode\"]['properties']['label_en'])\r\n : '--'}}\r\n\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:countryCode\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.COUNTRY_NAME\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"gdoc:countryCode\"] ?\r\n (isArabic ? dynamicFormData[\"gdoc:countryCode\"]['properties']['label_ar']\r\n : dynamicFormData[\"gdoc:countryCode\"]['properties']['label_en'])\r\n : '--'}}\r\n </div>\r\n </div>\r\n <div class=\"mt-3\" *ngIf='dynamicFormData[\"gdoc:remarks\"]'>\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"CREATE.REMARKS\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm\">\r\n {{ dynamicFormData[\"gdoc:remarks\"] ? dynamicFormData[\"gdoc:remarks\"] : '--'}}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-3\">\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"FOLDERS.BY\" | translate }}\r\n </div>\r\n <div class=\"text-gray-900 text-sm d-flex\">\r\n <div class=\"d-flex items-center bg-gray-100 rounded-xl\">\r\n <app-user [user]=\"dynamicFormData['dc:creator']\"></app-user>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"mt-3\" *ngIf=\"dynamicFormData['dc:contributors'].length > 0\">\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{ \"FOLDERS.CONTRUBITORS\" | translate }}\r\n </div>\r\n <div class=\"d-flex flex-wrap\">\r\n <div class=\"d-flex items-center bg-gray-100 rounded-xl mb-2\"\r\n *ngFor=\"let user of dynamicFormData['dc:contributors']\">\r\n <app-user [user]=\"user\"></app-user>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"mt-3\" *ngIf=\"sharedListUser.length > 0\">\r\n <div class=\"text-gray-500 font-bold text-base\">\r\n {{\"share.shareWith\" | translate}}\r\n </div>\r\n <div class=\"d-flex flex-wrap\">\r\n <div class=\"d-flex items-center bg-gray-100 rounded-xl mb-2\" *ngFor=\"let user of sharedListUser\">\r\n <app-user [user]=\"user\"></app-user>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"mt-5\" *ngIf=\"dynamicForm && dynamicFormData\">\r\n <app-multiple-dynamic-form-viewer [form]=\"dynamicForm\"\r\n [data]=\"dynamicFormData\"></app-multiple-dynamic-form-viewer>\r\n </div>\r\n <div class=\"tags-wrappers relative px-0 py-3\">\r\n <cts-correspondence-tags [correspondence]=\"sideMenuFileDetails\" [customClass]=\"'tags-dms-wrapper'\"\r\n [useParams]=\"true\" [addCustomApiName]=\"'Services.TagDocument'\"\r\n [deleteCustomApiName]=\"'Services.UntagDocument'\">\r\n </cts-correspondence-tags>\r\n </div>\r\n </div>\r\n</ng-template>", styles: [""], components: [{ type: DisplaySuitableIconComponent, selector: "app-display-suitable-icon", inputs: ["data", "size", "dataType", "archive"] }, { type: i2__namespace$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: DynamicTabsComponent, selector: "app-dynamic-tabs", inputs: ["tabs", "selectedIndex"] }, { type: CommentsDashletComponent, selector: "app-comments-dashlet", inputs: ["entityId", "correspondence", "row", "showaddcomment", "showCommentActions"] }, { type: ActivitiesLogComponent, selector: "app-activities-log", inputs: ["documentId", "file", "documentTitle"], outputs: ["success"] }, { type: PermissionsComponent, selector: "app-permissions", inputs: ["documentId", "document", "allowAddAndBlock", "sourcePage"] }, { type: VersionsComponent, selector: "cts-versions", inputs: ["selectedVersion", "file", "actions"], outputs: ["handleActions"] }, { type: UserComponent, selector: "app-user", inputs: ["user", "type"] }, { type: MultipleDynamicFormViewerComponent, selector: "app-multiple-dynamic-form-viewer", inputs: ["form", "data"] }, { type: CorrespondenceTagsComponent, selector: "cts-correspondence-tags", inputs: ["correspondence", "customClass", "addCustomApiName", "deleteCustomApiName", "useParams", "accordionMode", "systemTags", "accordionOpen", "title"] }], directives: [{ type: SetRtlDirective, selector: "[SetRtl]" }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: PermissionsDirective, selector: "[permission]", inputs: ["permission"] }, { type: i8__namespace.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i3__namespace$3.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1__namespace$1.TranslatePipe, "localizedDate": LocalizedDatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
24361
24458
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: SidepanelComponent, decorators: [{
|
|
24362
24459
|
type: i0.Component,
|
|
24363
24460
|
args: [{
|
|
@@ -25360,48 +25457,6 @@
|
|
|
25360
25457
|
}] }, { type: NuxeoService$1 }, { type: DialogMangmentService }, { type: GlobalPdfTron }];
|
|
25361
25458
|
} });
|
|
25362
25459
|
|
|
25363
|
-
var DisplaySuitableIconComponent = /** @class */ (function () {
|
|
25364
|
-
function DisplaySuitableIconComponent(iconService) {
|
|
25365
|
-
this.iconService = iconService;
|
|
25366
|
-
this.dataType = 'document';
|
|
25367
|
-
this.archive = false;
|
|
25368
|
-
}
|
|
25369
|
-
DisplaySuitableIconComponent.prototype.ngOnInit = function () {
|
|
25370
|
-
this.image = this.getFileIcon(this.data);
|
|
25371
|
-
};
|
|
25372
|
-
DisplaySuitableIconComponent.prototype.getFileIcon = function (document) {
|
|
25373
|
-
if (!this.archive)
|
|
25374
|
-
return this.iconService.getFileIcon(document, this.dataType);
|
|
25375
|
-
else
|
|
25376
|
-
return this.iconService.getArchivedDocumentIcon(document, this.dataType);
|
|
25377
|
-
};
|
|
25378
|
-
// used to recalculate icon when sorting in table ( when sorting component not rendered again so onint won't excuted )
|
|
25379
|
-
DisplaySuitableIconComponent.prototype.ngOnChanges = function () {
|
|
25380
|
-
this.image = this.getFileIcon(this.data);
|
|
25381
|
-
};
|
|
25382
|
-
return DisplaySuitableIconComponent;
|
|
25383
|
-
}());
|
|
25384
|
-
DisplaySuitableIconComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: DisplaySuitableIconComponent, deps: [{ token: IconService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
25385
|
-
DisplaySuitableIconComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: DisplaySuitableIconComponent, selector: "app-display-suitable-icon", inputs: { data: "data", size: "size", dataType: "dataType", archive: "archive" }, usesOnChanges: true, ngImport: i0__namespace, template: "<!-- <div *ngIf=\" data.type == 'Folder';else notFolder\">\r\n <div [style.width]=\"size\">\r\n <img class=\"w-full\" [src]=\"'assets/drive-icons/folder.png'\" />\r\n </div>\r\n</div>\r\n<ng-template #notFolder>\r\n <div *ngIf=\"!data.properties.file; else file\">\r\n <img class=\"w-full\" [src]=\"'assets/drive-icons/generic.png'\" />\r\n </div>\r\n <ng-template #file>\r\n <div *ngIf=\"data.properties.file['mime-type'].includes('image');else noImage\" [style.width]=\"size\">\r\n <img class=\"w-full\" [src]=\"data.contextParameters.thumbnail.url | secure | async\" />\r\n <ng-template #noImage>\r\n <mat-icon svgIcon=\"iconsmind:photo\" class=\"icon-size-6\"></mat-icon>\r\n </ng-template> \r\n </div>\r\n <div *ngIf=\" data.properties.file['mime-type'].includes('video');else noVideo\" [style.width]=\"size\">\r\n <figure class=\"hover-video w-full\">\r\n <img class=\"w-full\" [src]=\"data.contextParameters.thumbnail.url | secure | async\" />\r\n <figcaption>\r\n <mat-icon svgIcon=\"iconsmind:play_music\" class=\"icon-size-4\"></mat-icon>\r\n </figcaption>\r\n </figure>\r\n <ng-template #noVideo>\r\n <mat-icon svgIcon=\"iconsmind:video_2\" class=\"icon-size-6\"></mat-icon>\r\n </ng-template> \r\n </div>\r\n <div *ngIf=\" data.properties.file['mime-type'].includes('application')\">\r\n <mat-icon svgIcon=\"iconsmind:file\" class=\"icon-size-6\"></mat-icon>\r\n </div>\r\n </ng-template>\r\n</ng-template> -->\r\n\r\n\r\n<div [style.width]=\"size\">\r\n <img class=\"w-full\" [src]=\"image\" />\r\n</div>", styles: [".hover-video{display:inline-block;margin:8px;max-width:100%;min-width:100%;overflow:hidden;position:relative;text-align:center}.hover-video *{box-sizing:border-box;transition:all .45s ease}.hover-video:before,.hover-video:after{position:absolute;top:0;bottom:0;left:0;right:0;content:\"\";transition:all .3s ease;z-index:1;opacity:0;transform:scaleY(2)}.hover-video video{vertical-align:top;max-width:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden}.hover-video figcaption{position:absolute;top:0;bottom:0;left:0;right:0;align-items:center;z-index:1;display:flex;flex-direction:column;justify-content:center;line-height:1.1em;opacity:0;z-index:2;transition-delay:.1s;font-size:24px;font-family:sans-serif;font-weight:400;letter-spacing:1px;text-transform:uppercase}.hover-video{transform:scale(1);opacity:1}.hover-video>video{opacity:.7}.hover-video figcaption{opacity:1}.hover-video:hover figcaption:hover{opacity:.5;background-color:#eaecee}\n"] });
|
|
25386
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: DisplaySuitableIconComponent, decorators: [{
|
|
25387
|
-
type: i0.Component,
|
|
25388
|
-
args: [{
|
|
25389
|
-
selector: 'app-display-suitable-icon',
|
|
25390
|
-
templateUrl: './display-suitable-icon.component.html',
|
|
25391
|
-
styleUrls: ['./display-suitable-icon.component.scss']
|
|
25392
|
-
}]
|
|
25393
|
-
}], ctorParameters: function () { return [{ type: IconService }]; }, propDecorators: { data: [{
|
|
25394
|
-
type: i0.Input,
|
|
25395
|
-
args: ['data']
|
|
25396
|
-
}], size: [{
|
|
25397
|
-
type: i0.Input,
|
|
25398
|
-
args: ['size']
|
|
25399
|
-
}], dataType: [{
|
|
25400
|
-
type: i0.Input
|
|
25401
|
-
}], archive: [{
|
|
25402
|
-
type: i0.Input
|
|
25403
|
-
}] } });
|
|
25404
|
-
|
|
25405
25460
|
var AttachmentItemComponent = /** @class */ (function () {
|
|
25406
25461
|
function AttachmentItemComponent(translationService) {
|
|
25407
25462
|
this.translationService = translationService;
|
|
@@ -26744,7 +26799,7 @@
|
|
|
26744
26799
|
return ScanModalComponent;
|
|
26745
26800
|
}());
|
|
26746
26801
|
ScanModalComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: ScanModalComponent, deps: [{ token: i1$6.MAT_DIALOG_DATA }, { token: i1__namespace$6.MatDialogRef }, { token: UploadManagmentService }, { token: DialogMangmentService }, { token: FileManagerService }, { token: CustomToastrService }, { token: i6__namespace.FormBuilder }, { token: DynamicFormService }, { token: DateHelperService }, { token: AdapterService }, { token: TranslationService$1 }, { token: NuxeoService$1 }, { token: UserService }, { token: AppConfigService }, { token: 'environment' }, { token: DocumentScanService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
26747
|
-
ScanModalComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: ScanModalComponent, selector: "app-scan-modal", ngImport: i0__namespace, template: "<div class=\"scanner-modal-body relative h-full\">\r\n <!-- -->\r\n <!-- tabs -->\r\n <div\r\n class=\"scanner-tabs d-flex justify-around items-center border-b-2 border-gray-200 mb-5 text-gray-900 text-lg\"\r\n >\r\n <div\r\n class=\"scanner-single-tab cursor-pointer w-1/2 text-center py-2 border-gray-900 hover:bg-gray-100\"\r\n (click)=\"changTabTo('scan')\"\r\n [ngClass]=\"{ 'font-bold border-b-4': activeTab === 'scan' }\"\r\n >\r\n {{\"CREATE.SCAN\" | translate}}\r\n </div>\r\n <div\r\n class=\"scanner-single-tab cursor-pointer w-1/2 text-center py-2 border-gray-900 hover:bg-gray-100\"\r\n (click)=\"changTabTo('form')\"\r\n [ngClass]=\"{ 'font-bold border-b-4': activeTab === 'form' }\"\r\n >\r\n {{\"CREATE.DETAILS\" | translate}}\r\n </div>\r\n </div>\r\n <div class=\"tabs-body-wrapper\">\r\n <!-- uploader indicator loading -->\r\n <div\r\n class=\"upload-loader mx-2\"\r\n *ngIf=\"uploadMangmentService.uploadedFilesStatus.uploadInProgress\"\r\n >\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n </div>\r\n\r\n <!-- scanner -->\r\n <div class=\"\" [ngClass]=\"{ 'd-none': activeTab === 'form' }\">\r\n <app-document-scan\r\n [hideUploadButton]=\"true\"\r\n [useStoredFile]=\"true\"\r\n ></app-document-scan>\r\n </div>\r\n\r\n <!-- forms and properties -->\r\n <div\r\n class=\"forms-section\"\r\n [ngClass]=\"{ 'd-none': activeTab === 'scan' }\"\r\n >\r\n <div class=\"w-2/3\">\r\n <div class=\"mb-5\">\r\n <div class=\"label-style\">\r\n {{ \"CREATE.FILE_TYPE\" | translate }}\r\n </div>\r\n <div class=\"text-base text-gray-900\">\r\n {{ isArabic ? fileType.arabicText : fileType.englishText }}\r\n </div>\r\n </div>\r\n <div class=\"file-fields mt-3\" SetRtl>\r\n <form [formGroup]=\"fileForm\" *ngIf=\"fileForm\">\r\n <div class=\"single-field mb-3\">\r\n <div class=\"label-style\">\r\n {{ \"CREATE.TITLE\" | translate\r\n }}<span class=\"text-red-500\">*</span>\r\n </div>\r\n <input\r\n class=\"field-style\"\r\n formControlName=\"title\"\r\n placeholder=\" {{ 'CREATE.TITLE' | translate }}\"\r\n />\r\n </div>\r\n <div class=\"single-field mb-3\">\r\n <div class=\"label-style\">\r\n {{ \"CREATE.DESCRIPTION\" | translate }}\r\n </div>\r\n <input\r\n class=\"field-style\"\r\n formControlName=\"description\"\r\n placeholder=\" {{\r\n 'CREATE.DESCRIPTION' | translate\r\n }}\"\r\n />\r\n </div>\r\n\r\n <!------------------ new statis form ---------------------------->\r\n <div *ngIf=\"usingExtraFields\">\r\n \r\n <app-dynamic-fields-renderer [form]=\"fileForm\" [agencyNameFilter]=\"agencyNameFilter\" [countryNameFilter]=\"countryNameFilter\"></app-dynamic-fields-renderer>\r\n\r\n <!-- <div class=\"single-field mb-3\">\r\n <div class=\"label-style\">\r\n {{ \"CREATE.DOCUMENT_SUBJECT\" | translate\r\n }}<span class=\"text-red-500\">*</span>\r\n </div>\r\n <input\r\n class=\"field-style\"\r\n formControlName=\"subject\"\r\n placeholder=\" {{\r\n 'CREATE.DOCUMENT_SUBJECT' | translate\r\n }}\"\r\n />\r\n </div>\r\n <div class=\"single-field mb-3\">\r\n <div class=\"label-style\">\r\n {{ \"CREATE.DOCUMENT_NUMBER\" | translate }}\r\n </div>\r\n <input\r\n class=\"field-style\"\r\n formControlName=\"documentNumber\"\r\n placeholder=\" {{\r\n 'CREATE.DOCUMENT_NUMBER' | translate\r\n }}\"\r\n />\r\n </div>\r\n <div class=\"single-field mb-3\">\r\n <cts-dynamic-form-hijri-dateitem\r\n formControlName=\"gdocumentDate\"\r\n label=\"CREATE.DOCUMENT_DATE\"\r\n >\r\n </cts-dynamic-form-hijri-dateitem>\r\n </div>\r\n <div class=\"single-field mb-3\">\r\n <app-dynamic-form-vocabulary-item\r\n [label]=\"'CREATE.SCRECY_LEVEL'\"\r\n [bindLabel]=\"'label'\"\r\n [bindValue]=\"'id'\"\r\n placeholder=\"{{\r\n 'VOCABULARY.SELECT_ITEM' | translate\r\n }}\"\r\n [multiple]=\"false\"\r\n [searchable]=\"false\"\r\n [closeOnSelect]=\"true\"\r\n [hideSelectedItems]=\"false\"\r\n [vocabularyType]=\"'VOC_SecrecyLevel'\"\r\n formControlName=\"secrecyLevel\"\r\n >\r\n </app-dynamic-form-vocabulary-item>\r\n </div>\r\n <div class=\"single-field mb-3\">\r\n <app-dynamic-form-vocabulary-item\r\n [label]=\"'CREATE.IMPORTANCE_LEVEL'\"\r\n [bindLabel]=\"'label'\"\r\n [bindValue]=\"'id'\"\r\n placeholder=\"{{\r\n 'VOCABULARY.SELECT_ITEM' | translate\r\n }}\"\r\n [multiple]=\"false\"\r\n [searchable]=\"false\"\r\n [closeOnSelect]=\"true\"\r\n [hideSelectedItems]=\"false\"\r\n [vocabularyType]=\"'VOC_Importance'\"\r\n formControlName=\"importanceLevel\"\r\n >\r\n </app-dynamic-form-vocabulary-item>\r\n </div>\r\n\r\n <div class=\"single-field mb-3\">\r\n <div class=\"label-style\">\r\n {{ \"CREATE.DEPARTMENT_CODE\" | translate }}\r\n </div>\r\n <app-dynamic-form-department\r\n formControlName=\"departmentCode\"\r\n [placeholder]=\"'please select department'\"\r\n [pp_departmentNestedTree]=\"\r\n 'PP_OS_Departments'\r\n \"\r\n [pp_departmentTree]=\"'PP_OS_Departments'\"\r\n [customPrefix]=\"'osdept'\"\r\n [customParentProperty]=\"\r\n 'osdepartment_parentDepartmentCode'\r\n \"\r\n [useCustomAddEditAction]=\"true\"\r\n >\r\n </app-dynamic-form-department>\r\n </div>\r\n\r\n <div class=\"single-field mb-3\">\r\n <app-translated-vocabulary-select\r\n [label]=\"'CREATE.AGENCY_CATEGORY_CODE'\"\r\n [arbBindLabel]=\"'label_ar'\"\r\n [engBindLabel]=\"'label_en'\"\r\n [bindValue]=\"'id'\"\r\n placeholder=\"{{\r\n 'VOCABULARY.SELECT_ITEM' | translate\r\n }}\"\r\n [multiple]=\"false\"\r\n [searchable]=\"true\"\r\n [closeOnSelect]=\"true\"\r\n [hideSelectedItems]=\"false\"\r\n formControlName=\"agencyCategoryCode\"\r\n [vocbularyId]=\"'VOC_AgencyCategory'\"\r\n [useFilter]=\"false\"\r\n >\r\n </app-translated-vocabulary-select>\r\n </div>\r\n\r\n <div class=\"single-field mb-3\">\r\n <app-translated-vocabulary-select\r\n [label]=\"'CREATE.AGENCY_NAME'\"\r\n [arbBindLabel]=\"'label_ar'\"\r\n [engBindLabel]=\"'label_en'\"\r\n [bindValue]=\"'id'\"\r\n placeholder=\"{{\r\n 'VOCABULARY.SELECT_ITEM' | translate\r\n }}\"\r\n [multiple]=\"false\"\r\n [searchable]=\"true\"\r\n [closeOnSelect]=\"true\"\r\n [hideSelectedItems]=\"false\"\r\n formControlName=\"agencyName\"\r\n [vocbularyId]=\"'VOC_Agency'\"\r\n [filter]=\"agencyNameFilter\"\r\n [useFilter]=\"true\"\r\n >\r\n </app-translated-vocabulary-select>\r\n </div>\r\n\r\n <div class=\"single-field mb-3\">\r\n <app-translated-vocabulary-select\r\n [label]=\"'CREATE.COUNTRY_CATEGORY_CODE'\"\r\n [arbBindLabel]=\"'label_ar'\"\r\n [engBindLabel]=\"'label_en'\"\r\n [bindValue]=\"'id'\"\r\n placeholder=\"{{\r\n 'VOCABULARY.SELECT_ITEM' | translate\r\n }}\"\r\n [multiple]=\"false\"\r\n [searchable]=\"true\"\r\n [closeOnSelect]=\"true\"\r\n [hideSelectedItems]=\"false\"\r\n formControlName=\"countryCategoryCode\"\r\n [vocbularyId]=\"'VOC_CountryCategory'\"\r\n [useFilter]=\"false\"\r\n >\r\n </app-translated-vocabulary-select>\r\n </div>\r\n\r\n <div class=\"single-field mb-3\">\r\n <app-translated-vocabulary-select\r\n [label]=\"'CREATE.COUNTRY_NAME'\"\r\n [arbBindLabel]=\"'label_ar'\"\r\n [engBindLabel]=\"'label_en'\"\r\n [bindValue]=\"'id'\"\r\n placeholder=\"{{\r\n 'VOCABULARY.SELECT_ITEM' | translate\r\n }}\"\r\n [multiple]=\"false\"\r\n [searchable]=\"true\"\r\n [closeOnSelect]=\"true\"\r\n [hideSelectedItems]=\"false\"\r\n formControlName=\"countryName\"\r\n [vocbularyId]=\"'VOC_Country'\"\r\n [filter]=\"countryNameFilter\"\r\n [useFilter]=\"true\"\r\n >\r\n </app-translated-vocabulary-select>\r\n </div>\r\n\r\n <div class=\"single-field mb-3\">\r\n <div class=\"label-style\">\r\n {{ \"CREATE.REMARKS\" | translate }}\r\n </div>\r\n <input\r\n class=\"field-style\"\r\n formControlName=\"remarks\"\r\n placeholder=\" {{\r\n 'CREATE.REMARKS' | translate\r\n }}\"\r\n />\r\n </div> -->\r\n </div>\r\n\r\n <!-- ----------------------------------------------------------- -->\r\n </form>\r\n <!-- *ngIf=\"\" -->\r\n <div\r\n class=\"dynamic-part -mx-4\"\r\n *ngIf=\"selectedFile.dynamicForm && showRenderer\"\r\n >\r\n <app-dynamic-form\r\n [form]=\"selectedFile.dynamicForm\"\r\n [data]=\"temporaryDyanmicData\"\r\n (change)=\"ondynamicFormChange($event)\"\r\n ></app-dynamic-form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- actions and buttons -->\r\n <div\r\n class=\"w-full d-flex justify-between scanner-actions-wrapper absolute bottom-0\"\r\n >\r\n <div class=\"flex\">\r\n <button class=\"cancelation-button\" (click)=\"closeDialog()\">\r\n {{ \"BUTTONS.CANCEL\" | translate }}\r\n </button>\r\n <button class=\"cancelation-button mx-2\" (click)=\"minimizDialog()\">\r\n {{ \"BUTTONS.MINIMIZED\" | translate }}\r\n </button>\r\n </div>\r\n\r\n <!-- -->\r\n <div class=\"d-flex\">\r\n <!-- <button\r\n *ngIf=\"creationFailed\"\r\n [disabled]=\"\r\n scannerUploadButton.disabled ||\r\n !selectedFile.dynamicData.valid ||\r\n fileForm.invalid\r\n \"\r\n [ngClass]=\"{\r\n 'opacity-30 cursor-not-allowed':\r\n scannerUploadButton.disabled ||\r\n !selectedFile.dynamicData.valid ||\r\n fileForm.invalid\r\n }\"\r\n (click)=\"createDocument()\"\r\n class=\"submission-button\"\r\n >\r\n {{ \"BUTTONS.TRY_AGAIN\" | translate }}\r\n </button> -->\r\n <button\r\n (click)=\"createDocument()\"\r\n [disabled]=\"\r\n scannerUploadButton.disabled ||\r\n !selectedFile.dynamicData.valid ||\r\n fileForm.invalid\r\n \"\r\n [ngClass]=\"{\r\n 'opacity-30 cursor-not-allowed':\r\n scannerUploadButton.disabled ||\r\n !selectedFile.dynamicData.valid ||\r\n fileForm.invalid\r\n }\"\r\n class=\"submission-button\"\r\n >\r\n {{ uploadMangmentService.scanCreationFailed ? (\"BUTTONS.TRY_AGAIN\" | translate) : (\"BUTTONS.CREATE\" | translate) }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".forms-section{display:flex;justify-content:center}.tabs-body-wrapper{height:calc(100% - 125px);overflow-y:auto;overflow-x:hidden}\n"], components: [{ type: ScanComponent, selector: "app-document-scan", inputs: ["useStoredFile", "hideUploadButton"], outputs: ["file"] }, { type: DynamicFieldsRendererComponent, selector: "app-dynamic-fields-renderer", inputs: ["form", "agencyNameFilter", "countryNameFilter", "fields"] }, { type: DynamicFormComponent, selector: "app-dynamic-form", inputs: ["form", "data", "readOnly"], outputs: ["change"] }], directives: [{ type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: SetRtlDirective, selector: "[SetRtl]" }, { type: i6__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i6__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1__namespace$1.TranslatePipe } });
|
|
26802
|
+
ScanModalComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: ScanModalComponent, selector: "app-scan-modal", ngImport: i0__namespace, template: "<div class=\"scanner-modal-body relative h-full\">\r\n <!-- -->\r\n <!-- tabs -->\r\n <div\r\n class=\"scanner-tabs d-flex justify-around items-center border-b-2 border-gray-200 mb-5 text-gray-900 text-lg\"\r\n >\r\n <div\r\n class=\"scanner-single-tab cursor-pointer w-1/2 text-center py-2 border-gray-900 hover:bg-gray-100\"\r\n (click)=\"changTabTo('scan')\"\r\n [ngClass]=\"{ 'font-bold border-b-4': activeTab === 'scan' }\"\r\n >\r\n {{\"CREATE.SCAN\" | translate}}\r\n </div>\r\n <div\r\n class=\"scanner-single-tab cursor-pointer w-1/2 text-center py-2 border-gray-900 hover:bg-gray-100\"\r\n (click)=\"changTabTo('form')\"\r\n [ngClass]=\"{ 'font-bold border-b-4': activeTab === 'form' }\"\r\n >\r\n {{\"CREATE.DETAILS\" | translate}}\r\n </div>\r\n </div>\r\n <div class=\"tabs-body-wrapper\">\r\n <!-- uploader indicator loading -->\r\n <div\r\n class=\"upload-loader mx-2\"\r\n *ngIf=\"uploadMangmentService.uploadedFilesStatus.uploadInProgress\"\r\n >\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n </div>\r\n\r\n <!-- scanner -->\r\n <div class=\"\" [ngClass]=\"{ 'd-none': activeTab === 'form' }\">\r\n <app-document-scan\r\n [hideUploadButton]=\"true\"\r\n [useStoredFile]=\"true\"\r\n ></app-document-scan>\r\n </div>\r\n\r\n <!-- forms and properties -->\r\n <div\r\n class=\"forms-section\"\r\n [ngClass]=\"{ 'd-none': activeTab === 'scan' }\"\r\n >\r\n <div class=\"w-2/3\">\r\n <div class=\"mb-5\">\r\n <div class=\"label-style\">\r\n {{ \"CREATE.FILE_TYPE\" | translate }}\r\n </div>\r\n <div class=\"text-base text-gray-900\">\r\n {{ isArabic ? fileType.arabicText : fileType.englishText }}\r\n </div>\r\n </div>\r\n <div class=\"file-fields mt-3\" SetRtl>\r\n <form [formGroup]=\"fileForm\" *ngIf=\"fileForm\">\r\n <div class=\"single-field mb-3\">\r\n <div class=\"label-style\">\r\n {{ \"CREATE.TITLE\" | translate\r\n }}<span class=\"text-red-500\">*</span>\r\n </div>\r\n <input\r\n class=\"field-style\"\r\n formControlName=\"title\"\r\n placeholder=\" {{ 'CREATE.TITLE' | translate }}\"\r\n />\r\n </div>\r\n <div class=\"single-field mb-3\">\r\n <div class=\"label-style\">\r\n {{ \"CREATE.DESCRIPTION\" | translate }}\r\n </div>\r\n <input\r\n class=\"field-style\"\r\n formControlName=\"description\"\r\n placeholder=\" {{\r\n 'CREATE.DESCRIPTION' | translate\r\n }}\"\r\n />\r\n </div>\r\n\r\n <!------------------ new statis form ---------------------------->\r\n <div *ngIf=\"usingExtraFields\">\r\n \r\n <app-dynamic-fields-renderer [form]=\"fileForm\" [agencyNameFilter]=\"agencyNameFilter\" [countryNameFilter]=\"countryNameFilter\"></app-dynamic-fields-renderer>\r\n\r\n <!-- <div class=\"single-field mb-3\">\r\n <div class=\"label-style\">\r\n {{ \"CREATE.DOCUMENT_SUBJECT\" | translate\r\n }}<span class=\"text-red-500\">*</span>\r\n </div>\r\n <input\r\n class=\"field-style\"\r\n formControlName=\"subject\"\r\n placeholder=\" {{\r\n 'CREATE.DOCUMENT_SUBJECT' | translate\r\n }}\"\r\n />\r\n </div>\r\n <div class=\"single-field mb-3\">\r\n <div class=\"label-style\">\r\n {{ \"CREATE.DOCUMENT_NUMBER\" | translate }}\r\n </div>\r\n <input\r\n class=\"field-style\"\r\n formControlName=\"documentNumber\"\r\n placeholder=\" {{\r\n 'CREATE.DOCUMENT_NUMBER' | translate\r\n }}\"\r\n />\r\n </div>\r\n <div class=\"single-field mb-3\">\r\n <cts-dynamic-form-hijri-dateitem\r\n formControlName=\"gdocumentDate\"\r\n label=\"CREATE.DOCUMENT_DATE\"\r\n >\r\n </cts-dynamic-form-hijri-dateitem>\r\n </div>\r\n <div class=\"single-field mb-3\">\r\n <app-dynamic-form-vocabulary-item\r\n [label]=\"'CREATE.SCRECY_LEVEL'\"\r\n [bindLabel]=\"'label'\"\r\n [bindValue]=\"'id'\"\r\n placeholder=\"{{\r\n 'VOCABULARY.SELECT_ITEM' | translate\r\n }}\"\r\n [multiple]=\"false\"\r\n [searchable]=\"false\"\r\n [closeOnSelect]=\"true\"\r\n [hideSelectedItems]=\"false\"\r\n [vocabularyType]=\"'VOC_SecrecyLevel'\"\r\n formControlName=\"secrecyLevel\"\r\n >\r\n </app-dynamic-form-vocabulary-item>\r\n </div>\r\n <div class=\"single-field mb-3\">\r\n <app-dynamic-form-vocabulary-item\r\n [label]=\"'CREATE.IMPORTANCE_LEVEL'\"\r\n [bindLabel]=\"'label'\"\r\n [bindValue]=\"'id'\"\r\n placeholder=\"{{\r\n 'VOCABULARY.SELECT_ITEM' | translate\r\n }}\"\r\n [multiple]=\"false\"\r\n [searchable]=\"false\"\r\n [closeOnSelect]=\"true\"\r\n [hideSelectedItems]=\"false\"\r\n [vocabularyType]=\"'VOC_Importance'\"\r\n formControlName=\"importanceLevel\"\r\n >\r\n </app-dynamic-form-vocabulary-item>\r\n </div>\r\n\r\n <div class=\"single-field mb-3\">\r\n <div class=\"label-style\">\r\n {{ \"CREATE.DEPARTMENT_CODE\" | translate }}\r\n </div>\r\n <app-dynamic-form-department\r\n formControlName=\"departmentCode\"\r\n [placeholder]=\"'please select department'\"\r\n [pp_departmentNestedTree]=\"\r\n 'PP_OS_Departments'\r\n \"\r\n [pp_departmentTree]=\"'PP_OS_Departments'\"\r\n [customPrefix]=\"'osdept'\"\r\n [customParentProperty]=\"\r\n 'osdepartment_parentDepartmentCode'\r\n \"\r\n [useCustomAddEditAction]=\"true\"\r\n >\r\n </app-dynamic-form-department>\r\n </div>\r\n\r\n <div class=\"single-field mb-3\">\r\n <app-translated-vocabulary-select\r\n [label]=\"'CREATE.AGENCY_CATEGORY_CODE'\"\r\n [arbBindLabel]=\"'label_ar'\"\r\n [engBindLabel]=\"'label_en'\"\r\n [bindValue]=\"'id'\"\r\n placeholder=\"{{\r\n 'VOCABULARY.SELECT_ITEM' | translate\r\n }}\"\r\n [multiple]=\"false\"\r\n [searchable]=\"true\"\r\n [closeOnSelect]=\"true\"\r\n [hideSelectedItems]=\"false\"\r\n formControlName=\"agencyCategoryCode\"\r\n [vocbularyId]=\"'VOC_AgencyCategory'\"\r\n [useFilter]=\"false\"\r\n >\r\n </app-translated-vocabulary-select>\r\n </div>\r\n\r\n <div class=\"single-field mb-3\">\r\n <app-translated-vocabulary-select\r\n [label]=\"'CREATE.AGENCY_NAME'\"\r\n [arbBindLabel]=\"'label_ar'\"\r\n [engBindLabel]=\"'label_en'\"\r\n [bindValue]=\"'id'\"\r\n placeholder=\"{{\r\n 'VOCABULARY.SELECT_ITEM' | translate\r\n }}\"\r\n [multiple]=\"false\"\r\n [searchable]=\"true\"\r\n [closeOnSelect]=\"true\"\r\n [hideSelectedItems]=\"false\"\r\n formControlName=\"agencyName\"\r\n [vocbularyId]=\"'VOC_Agency'\"\r\n [filter]=\"agencyNameFilter\"\r\n [useFilter]=\"true\"\r\n >\r\n </app-translated-vocabulary-select>\r\n </div>\r\n\r\n <div class=\"single-field mb-3\">\r\n <app-translated-vocabulary-select\r\n [label]=\"'CREATE.COUNTRY_CATEGORY_CODE'\"\r\n [arbBindLabel]=\"'label_ar'\"\r\n [engBindLabel]=\"'label_en'\"\r\n [bindValue]=\"'id'\"\r\n placeholder=\"{{\r\n 'VOCABULARY.SELECT_ITEM' | translate\r\n }}\"\r\n [multiple]=\"false\"\r\n [searchable]=\"true\"\r\n [closeOnSelect]=\"true\"\r\n [hideSelectedItems]=\"false\"\r\n formControlName=\"countryCategoryCode\"\r\n [vocbularyId]=\"'VOC_CountryCategory'\"\r\n [useFilter]=\"false\"\r\n >\r\n </app-translated-vocabulary-select>\r\n </div>\r\n\r\n <div class=\"single-field mb-3\">\r\n <app-translated-vocabulary-select\r\n [label]=\"'CREATE.COUNTRY_NAME'\"\r\n [arbBindLabel]=\"'label_ar'\"\r\n [engBindLabel]=\"'label_en'\"\r\n [bindValue]=\"'id'\"\r\n placeholder=\"{{\r\n 'VOCABULARY.SELECT_ITEM' | translate\r\n }}\"\r\n [multiple]=\"false\"\r\n [searchable]=\"true\"\r\n [closeOnSelect]=\"true\"\r\n [hideSelectedItems]=\"false\"\r\n formControlName=\"countryName\"\r\n [vocbularyId]=\"'VOC_Country'\"\r\n [filter]=\"countryNameFilter\"\r\n [useFilter]=\"true\"\r\n >\r\n </app-translated-vocabulary-select>\r\n </div>\r\n\r\n <div class=\"single-field mb-3\">\r\n <div class=\"label-style\">\r\n {{ \"CREATE.REMARKS\" | translate }}\r\n </div>\r\n <input\r\n class=\"field-style\"\r\n formControlName=\"remarks\"\r\n placeholder=\" {{\r\n 'CREATE.REMARKS' | translate\r\n }}\"\r\n />\r\n </div> -->\r\n </div>\r\n\r\n <!-- ----------------------------------------------------------- -->\r\n </form>\r\n <!-- *ngIf=\"\" -->\r\n <div\r\n class=\"dynamic-part -mx-4\"\r\n *ngIf=\"selectedFile.dynamicForm && showRenderer\"\r\n >\r\n <app-dynamic-form\r\n [form]=\"selectedFile.dynamicForm\"\r\n [data]=\"temporaryDyanmicData\"\r\n (change)=\"ondynamicFormChange($event)\"\r\n ></app-dynamic-form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- actions and buttons -->\r\n <div\r\n class=\"w-full d-flex justify-between scanner-actions-wrapper absolute bottom-0\"\r\n >\r\n <div class=\"flex\">\r\n <button class=\"cancelation-button\" (click)=\"closeDialog()\">\r\n {{ \"BUTTONS.CANCEL\" | translate }}\r\n </button>\r\n <button class=\"cancelation-button mx-2\" (click)=\"minimizDialog()\">\r\n {{ \"BUTTONS.MINIMIZED\" | translate }}\r\n </button>\r\n </div>\r\n\r\n <!-- -->\r\n <div class=\"d-flex\">\r\n <!-- <button\r\n *ngIf=\"creationFailed\"\r\n [disabled]=\"\r\n scannerUploadButton.disabled ||\r\n !selectedFile.dynamicData.valid ||\r\n fileForm.invalid\r\n \"\r\n [ngClass]=\"{\r\n 'opacity-30 cursor-not-allowed':\r\n scannerUploadButton.disabled ||\r\n !selectedFile.dynamicData.valid ||\r\n fileForm.invalid\r\n }\"\r\n (click)=\"createDocument()\"\r\n class=\"submission-button\"\r\n >\r\n {{ \"BUTTONS.TRY_AGAIN\" | translate }}\r\n </button> -->\r\n <button\r\n (click)=\"createDocument()\"\r\n [disabled]=\"\r\n scannerUploadButton.disabled ||\r\n !selectedFile.dynamicData.valid ||\r\n fileForm.invalid\r\n \"\r\n [ngClass]=\"{\r\n 'opacity-30 cursor-not-allowed':\r\n scannerUploadButton.disabled ||\r\n !selectedFile.dynamicData.valid ||\r\n fileForm.invalid\r\n }\"\r\n class=\"submission-button\"\r\n >\r\n {{ uploadMangmentService.scanCreationFailed ? (\"BUTTONS.TRY_AGAIN\" | translate) : (\"BUTTONS.CREATE\" | translate) }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".forms-section{display:flex;justify-content:center}.tabs-body-wrapper{height:calc(100% - 125px);overflow-y:auto;overflow-x:hidden}\n"], components: [{ type: i4__namespace$2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "mode", "value", "bufferValue"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { type: ScanComponent, selector: "app-document-scan", inputs: ["useStoredFile", "hideUploadButton"], outputs: ["file"] }, { type: DynamicFieldsRendererComponent, selector: "app-dynamic-fields-renderer", inputs: ["form", "agencyNameFilter", "countryNameFilter", "fields"] }, { type: DynamicFormComponent, selector: "app-dynamic-form", inputs: ["form", "data", "readOnly"], outputs: ["change"] }], directives: [{ type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: SetRtlDirective, selector: "[SetRtl]" }, { type: i6__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i6__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1__namespace$1.TranslatePipe } });
|
|
26748
26803
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: ScanModalComponent, decorators: [{
|
|
26749
26804
|
type: i0.Component,
|
|
26750
26805
|
args: [{
|
|
@@ -27208,6 +27263,262 @@
|
|
|
27208
27263
|
}]
|
|
27209
27264
|
}] });
|
|
27210
27265
|
|
|
27266
|
+
var ClipboardComponent = /** @class */ (function () {
|
|
27267
|
+
function ClipboardComponent(fileManagerService, userService, customToastrService, userPreferenceService) {
|
|
27268
|
+
this.fileManagerService = fileManagerService;
|
|
27269
|
+
this.userService = userService;
|
|
27270
|
+
this.customToastrService = customToastrService;
|
|
27271
|
+
this.userPreferenceService = userPreferenceService;
|
|
27272
|
+
this.onClipboardClose = new i0.EventEmitter();
|
|
27273
|
+
this.onRefreshFolderTree = new i0.EventEmitter();
|
|
27274
|
+
this.clipboardItems = []; // array of id to items in clipboard
|
|
27275
|
+
this.preventedGroups = [];
|
|
27276
|
+
this.clipboardDocments = []; // array of documents with full details of items in clipboard
|
|
27277
|
+
this.enableCopy = false;
|
|
27278
|
+
this.enableMove = false;
|
|
27279
|
+
this.clipboardLoading = false;
|
|
27280
|
+
this.documentSelectedInClipboard = [];
|
|
27281
|
+
}
|
|
27282
|
+
ClipboardComponent.prototype.ngOnInit = function () {
|
|
27283
|
+
var _this = this;
|
|
27284
|
+
this.refreshClipSubscription = this.fileManagerService.onRefreshClipboard.subscribe(function (res) {
|
|
27285
|
+
_this.openClipboard();
|
|
27286
|
+
});
|
|
27287
|
+
this.openClipboard();
|
|
27288
|
+
};
|
|
27289
|
+
ClipboardComponent.prototype.ngOnDestroy = function () {
|
|
27290
|
+
this.refreshClipSubscription ? this.refreshClipSubscription.unsubscribe() : null;
|
|
27291
|
+
};
|
|
27292
|
+
ClipboardComponent.prototype.closeClipboard = function () {
|
|
27293
|
+
this.onClipboardClose.emit();
|
|
27294
|
+
this.clipboardDocments = [];
|
|
27295
|
+
};
|
|
27296
|
+
ClipboardComponent.prototype.openClipboard = function () {
|
|
27297
|
+
var _this = this;
|
|
27298
|
+
this.enableCopy = false;
|
|
27299
|
+
this.enableMove = false;
|
|
27300
|
+
this.clipboardLoading = true;
|
|
27301
|
+
if (this.myCurrecntFolderData.entity.properties['dmsfolder:documentTypeCode'] && this.myCurrecntFolderData.entity.properties['dmsfolder:documentTypeCode'] !== '08112021') {
|
|
27302
|
+
// get accepted childerns for my current folder
|
|
27303
|
+
// if (this.subtypesService.storedSubtypes[this.myCurrecntFolderData.entity.uid]) {
|
|
27304
|
+
// this.myTargetFolderAcceptedChildrens = this.subtypesService.storedSubtypes[this.myCurrecntFolderData.entity.uid];
|
|
27305
|
+
// } else {
|
|
27306
|
+
this.fileManagerService.getClipboardAcceptedTypes(this.myCurrecntFolderData.entity.uid).subscribe(function (res) {
|
|
27307
|
+
_this.myTargetFolderAcceptedChildrens = res;
|
|
27308
|
+
}, function (error) {
|
|
27309
|
+
_this.clipboardLoading = false;
|
|
27310
|
+
_this.clipboardDocments = [];
|
|
27311
|
+
});
|
|
27312
|
+
// }
|
|
27313
|
+
}
|
|
27314
|
+
if (this.clipboardItems.length > 0) {
|
|
27315
|
+
this.fileManagerService.getClipboardDocuments(this.clipboardItems).subscribe(function (res) {
|
|
27316
|
+
res.map(function (document) {
|
|
27317
|
+
document['canCopyToTarget'] = (_this.canPerformActionInsideTarget(document) && _this.checkIfNotTheSameParent(document) && document.canCopy);
|
|
27318
|
+
document['canMoveToTarget'] = (_this.canPerformActionInsideTarget(document) && _this.checkIfNotTheSameParent(document) && document.canMove);
|
|
27319
|
+
});
|
|
27320
|
+
_this.clipboardDocments = res;
|
|
27321
|
+
console.log(_this.clipboardDocments);
|
|
27322
|
+
_this.clipboardLoading = false;
|
|
27323
|
+
});
|
|
27324
|
+
}
|
|
27325
|
+
else {
|
|
27326
|
+
this.clipboardDocments = [];
|
|
27327
|
+
this.clipboardLoading = false;
|
|
27328
|
+
}
|
|
27329
|
+
};
|
|
27330
|
+
// prevent copying or moving the file to its same place since it is prevented
|
|
27331
|
+
// prevent copying or moving the folder inside it self
|
|
27332
|
+
ClipboardComponent.prototype.checkIfNotTheSameParent = function (document) {
|
|
27333
|
+
// let directory = this.getCurrentDirectory();
|
|
27334
|
+
if (document.parentRef !== this.directory.dataItem.id && document.uid !== this.directory.dataItem.id) {
|
|
27335
|
+
return true;
|
|
27336
|
+
}
|
|
27337
|
+
else {
|
|
27338
|
+
return false;
|
|
27339
|
+
}
|
|
27340
|
+
};
|
|
27341
|
+
ClipboardComponent.prototype.deletefromClipboard = function (document) {
|
|
27342
|
+
var myindex = -1;
|
|
27343
|
+
this.clipboardItems.map(function (id, index) {
|
|
27344
|
+
if (document.uid === id) {
|
|
27345
|
+
myindex = index;
|
|
27346
|
+
}
|
|
27347
|
+
});
|
|
27348
|
+
this.clipboardItems.splice(myindex, 1);
|
|
27349
|
+
this.customToastrService.show('success', 'TOASTER.SUCCESS', "TOASTER.removed_from_clipboard");
|
|
27350
|
+
// let directory = this.getCurrentDirectory();
|
|
27351
|
+
// let id =
|
|
27352
|
+
// directory.dataItem === undefined
|
|
27353
|
+
// ? this.mainFolder
|
|
27354
|
+
// : this.getCurrentFolderId(directory);
|
|
27355
|
+
// this.reinitializeFolderTree(id, directory);
|
|
27356
|
+
this.onRefreshFolderTree.emit();
|
|
27357
|
+
this.openClipboard();
|
|
27358
|
+
this.userPreferenceService.set('clipboardItems', JSON.stringify(this.clipboardItems));
|
|
27359
|
+
};
|
|
27360
|
+
// function to check if i can perform action on that target folder or not
|
|
27361
|
+
ClipboardComponent.prototype.canPerformActionInsideTarget = function (document) {
|
|
27362
|
+
var _a;
|
|
27363
|
+
//check if target is 'other' type folder or dms folder
|
|
27364
|
+
if (this.myCurrecntFolderData.entity.properties['dmsfolder:documentTypeCode'] === '08112021' && !this.checkIfInPreventedGroups(this.myCurrecntFolderData.entity.path)) {
|
|
27365
|
+
// if my folder is from type others and not in prevented groups
|
|
27366
|
+
return true;
|
|
27367
|
+
}
|
|
27368
|
+
else if (this.myCurrecntFolderData.entity.properties['dmsfolder:documentTypeCode'] && this.myCurrecntFolderData.entity.properties['dmsfolder:documentTypeCode'] !== '08112021') {
|
|
27369
|
+
//if my folder has code and was not other type folder then check for accepted chilrdrn for that folder to contain this file type
|
|
27370
|
+
if (document.isFile === 'File') {
|
|
27371
|
+
if (this.myTargetFolderAcceptedChildrens.contextParameters &&
|
|
27372
|
+
this.myTargetFolderAcceptedChildrens.contextParameters.accepted_children && Array.isArray(this.myTargetFolderAcceptedChildrens.contextParameters.accepted_children) &&
|
|
27373
|
+
this.myTargetFolderAcceptedChildrens.contextParameters.accepted_children.indexOf(document.properties['gdoc:documentTypeCode']) > -1) {
|
|
27374
|
+
return true;
|
|
27375
|
+
}
|
|
27376
|
+
else {
|
|
27377
|
+
return false;
|
|
27378
|
+
}
|
|
27379
|
+
}
|
|
27380
|
+
else {
|
|
27381
|
+
if (this.myTargetFolderAcceptedChildrens.contextParameters &&
|
|
27382
|
+
this.myTargetFolderAcceptedChildrens.contextParameters.accepted_children && Array.isArray(this.myTargetFolderAcceptedChildrens.contextParameters.accepted_children) &&
|
|
27383
|
+
((_a = this.myTargetFolderAcceptedChildrens.contextParameters) === null || _a === void 0 ? void 0 : _a.accepted_children.indexOf(document.properties['dmsfolder:documentTypeCode'])) > -1) {
|
|
27384
|
+
return true;
|
|
27385
|
+
}
|
|
27386
|
+
else {
|
|
27387
|
+
return false;
|
|
27388
|
+
}
|
|
27389
|
+
}
|
|
27390
|
+
}
|
|
27391
|
+
else {
|
|
27392
|
+
// prevent action to this target
|
|
27393
|
+
return false;
|
|
27394
|
+
}
|
|
27395
|
+
};
|
|
27396
|
+
// function to check if this path not belong to group that is prevented from creating folder of type others
|
|
27397
|
+
ClipboardComponent.prototype.checkIfInPreventedGroups = function (path) {
|
|
27398
|
+
// if in prevented froup rturn true else return false
|
|
27399
|
+
console.log(path);
|
|
27400
|
+
var myDepartment = this.userService.getUserDepartmentFromPath(path);
|
|
27401
|
+
var exist = this.preventedGroups.indexOf(myDepartment) > -1 ? true : false;
|
|
27402
|
+
return exist;
|
|
27403
|
+
};
|
|
27404
|
+
ClipboardComponent.prototype.copyFromInsideClipboard = function () {
|
|
27405
|
+
var _this = this;
|
|
27406
|
+
var clipboardSelectedItems = [];
|
|
27407
|
+
var clipboardSelectedItemsLength = 0;
|
|
27408
|
+
// seperate selected items in seperate array
|
|
27409
|
+
this.clipboardDocments.map(function (doc, index) {
|
|
27410
|
+
// can't copy file in the same place it exist and can't copy folder inside it self
|
|
27411
|
+
if (doc.isSelected && doc.parentRef !== _this.directory.dataItem.id && doc.uid !== _this.directory.dataItem.id) {
|
|
27412
|
+
clipboardSelectedItems.push(doc.uid);
|
|
27413
|
+
}
|
|
27414
|
+
});
|
|
27415
|
+
if (clipboardSelectedItems.length > 0) {
|
|
27416
|
+
this.clipboardLoading = true;
|
|
27417
|
+
// this.currentPath = '';
|
|
27418
|
+
this.fileManagerService
|
|
27419
|
+
.copyTo({ id: this.directory.dataItem.id, name: this.directory.dataItem.name }, clipboardSelectedItems.toString())
|
|
27420
|
+
.subscribe(function (res) {
|
|
27421
|
+
// remove selected items from clipboard after action is done
|
|
27422
|
+
_this.removeItemsAfterActionDone(clipboardSelectedItems);
|
|
27423
|
+
_this.clipboardLoading = false;
|
|
27424
|
+
_this.onClipboardClose.emit();
|
|
27425
|
+
_this.onRefreshFolderTree.emit();
|
|
27426
|
+
_this.customToastrService.show('success', 'TOASTER.SUCCESS', 'TOASTER.DOCUMENT_COPIED');
|
|
27427
|
+
}, function (err) {
|
|
27428
|
+
_this.clipboardLoading = false;
|
|
27429
|
+
_this.customToastrService.show('error', 'TOASTER.ERROR', 'TOASTER.DOCUMENT_COPIED_ERROR');
|
|
27430
|
+
});
|
|
27431
|
+
}
|
|
27432
|
+
else {
|
|
27433
|
+
this.customToastrService.show('error', 'TOASTER.ERROR', 'TOASTER.DOCUMENT_COPIED_DESTINATION_ERROR');
|
|
27434
|
+
}
|
|
27435
|
+
};
|
|
27436
|
+
ClipboardComponent.prototype.moveFromInsideClipboard = function () {
|
|
27437
|
+
var _this = this;
|
|
27438
|
+
var clipboardSelectedItems = [];
|
|
27439
|
+
var clipboardSelectedItemsLength = 0;
|
|
27440
|
+
// seperate selected items in seperate array
|
|
27441
|
+
this.clipboardDocments.map(function (doc, index) {
|
|
27442
|
+
// can't move file in the same place it exist and can't move folder inside it self
|
|
27443
|
+
if (doc.isSelected && doc.parentRef !== _this.directory.dataItem.id && doc.uid !== _this.directory.dataItem.id) {
|
|
27444
|
+
clipboardSelectedItems.push(doc.uid);
|
|
27445
|
+
}
|
|
27446
|
+
});
|
|
27447
|
+
if (clipboardSelectedItems.length > 0) {
|
|
27448
|
+
this.clipboardLoading = true;
|
|
27449
|
+
this.fileManagerService
|
|
27450
|
+
.moveTo({ id: this.directory.dataItem.id, name: this.directory.dataItem.name }, clipboardSelectedItems.toString())
|
|
27451
|
+
.subscribe(function (res) {
|
|
27452
|
+
// remove selected items from clipboard after action is done
|
|
27453
|
+
_this.removeItemsAfterActionDone(clipboardSelectedItems);
|
|
27454
|
+
_this.clipboardLoading = false;
|
|
27455
|
+
_this.onClipboardClose.emit();
|
|
27456
|
+
_this.onRefreshFolderTree.emit();
|
|
27457
|
+
_this.customToastrService.show('success', 'TOASTER.SUCCESS', 'TOASTER.DOCUMENT_MOVED');
|
|
27458
|
+
}, function (err) {
|
|
27459
|
+
_this.clipboardLoading = false;
|
|
27460
|
+
_this.customToastrService.show('error', 'TOASTER.ERROR', 'TOASTER.DOCUMENT_MOVED_ERROR');
|
|
27461
|
+
});
|
|
27462
|
+
}
|
|
27463
|
+
else
|
|
27464
|
+
this.customToastrService.show('error', 'TOASTER.ERROR', 'TOASTER.DOCUMENT_MOVED_DESTINATION_ERROR');
|
|
27465
|
+
};
|
|
27466
|
+
ClipboardComponent.prototype.removeItemsAfterActionDone = function (selectedItems) {
|
|
27467
|
+
this.clipboardItems = this.clipboardItems.filter(function (el) {
|
|
27468
|
+
return !selectedItems.includes(el);
|
|
27469
|
+
});
|
|
27470
|
+
this.userPreferenceService.set('clipboardItems', JSON.stringify(this.clipboardItems));
|
|
27471
|
+
};
|
|
27472
|
+
ClipboardComponent.prototype.checking = function () {
|
|
27473
|
+
var _this = this;
|
|
27474
|
+
this.enableCopy = false;
|
|
27475
|
+
this.enableMove = false;
|
|
27476
|
+
this.documentSelectedInClipboard = [];
|
|
27477
|
+
// console.log(this.clipboardDocments);
|
|
27478
|
+
this.clipboardDocments.map(function (document) {
|
|
27479
|
+
// wokring with only selected documents
|
|
27480
|
+
if (document.isSelected === true) {
|
|
27481
|
+
// document['canCopyToTarget'] = (this.canPerformActionInsideTarget(document) && document.canCopy);
|
|
27482
|
+
// document['canMoveToTarget'] = (this.canPerformActionInsideTarget(document) && document.canMove)
|
|
27483
|
+
_this.documentSelectedInClipboard.push(document);
|
|
27484
|
+
}
|
|
27485
|
+
});
|
|
27486
|
+
if (this.documentSelectedInClipboard.length > 0) {
|
|
27487
|
+
this.enableCopy = this.documentSelectedInClipboard.every(function (item) {
|
|
27488
|
+
return item.canCopyToTarget === true;
|
|
27489
|
+
});
|
|
27490
|
+
this.enableMove = this.documentSelectedInClipboard.every(function (item) {
|
|
27491
|
+
return item.canMoveToTarget === true;
|
|
27492
|
+
});
|
|
27493
|
+
}
|
|
27494
|
+
console.log(this.documentSelectedInClipboard);
|
|
27495
|
+
};
|
|
27496
|
+
return ClipboardComponent;
|
|
27497
|
+
}());
|
|
27498
|
+
ClipboardComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: ClipboardComponent, deps: [{ token: FileManagerService }, { token: UserService }, { token: CustomToastrService }, { token: UserPreferencesService$1 }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
27499
|
+
ClipboardComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: ClipboardComponent, selector: "lib-clipboard", inputs: { clipboardItems: "clipboardItems", myCurrecntFolderData: "myCurrecntFolderData", preventedGroups: "preventedGroups", directory: "directory" }, outputs: { onClipboardClose: "onClipboardClose", onRefreshFolderTree: "onRefreshFolderTree" }, ngImport: i0__namespace, template: "<div class=\"clipboard-side-section relative\">\n\n <div class=\"p-3 h-full\">\n <div class=\"clipboard-header flex justify-between items-center border-b-2\">\n <span class=\"flex text-gray-500 font-bold items-center\">\n <span class=\"text-4xl bi bi-clipboard\"></span>\n <span class=\"mx-2 text-xl\">{{'clipboard' | translate}}</span>\n </span>\n <mat-icon class=\"close-icon text-gray-500 cursor-pointer\" (click)=\"closeClipboard()\"\n [matTooltip]=\"'BUTTONS.CLOSE' | translate\">close</mat-icon>\n </div>\n <!-- <div class=\"h-full font-bold d-flex justify-center items-center\" *ngIf=\"clipboardLoading\">\n {{ \"loading\" | translate }}\n </div> -->\n <div class=\"w-full h-px bg-gray-200 mb-3\" *ngIf=\"clipboardLoading\">\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n </div>\n <div class=\"clipboard-content flex flex-col justify-between items-between\">\n <div class=\"h-full flex justify-center items-center text-gray-500\"\n *ngIf=\"clipboardDocments.length === 0\">{{'no_clipboard_items' | translate}}</div>\n\n <div class=\"px-2 h-5/6 overflow-y-auto\" *ngIf=\"clipboardDocments.length > 0\">\n <div class=\"border-b-2\" *ngFor=\"let document of clipboardDocments\">\n <div class=\"py-1 w-82 flex items-center justify-between\">\n <div class=\"flex items-center w-5/6\">\n <mat-checkbox [(ngModel)]=\"document.isSelected\" (change)=\"checking()\"> </mat-checkbox>\n <div class=\"flex w-full\">\n <!-- <title-with-icon class=\"w-1/6 -my-1.5\" [context]=\"document\"\n [showTitle]=\"false\"></title-with-icon> -->\n <app-display-suitable-icon class=\"mx-1\" [data]=\"document\" [size]=\"'40px'\"></app-display-suitable-icon>\n\n <!-- -->\n <div *ngIf=\"document.isFile === 'File'\"\n class=\"justify-center flex flex-col flex-1 flex-grow-0 w-5/6\">\n <div class=\"text-base text-gray-500 font-bold truncate\"\n [title]=\"document.properties?.['file:content']?.['name']\"\n [alt]=\"document.properties?.['file:content']?.['name']\">\n {{document['title']}}\n </div>\n <div class=\"text-gray-500 text-sm text-nowrap\">\n {{((document.properties?.['file:content']?.['length']) / (1024 *\n 1024)).toFixed(2) }}\n MB\n </div>\n </div>\n <div class=\"\n d-flex\n items-center\n text-base text-gray-500\n font-bold\n \" *ngIf=\"document.isFile === 'Folder'\">\n {{ document?.title }}\n </div>\n </div>\n </div>\n <span [matTooltip]=\"'BUTTONS.REMOVE_CLIPBOARD' | translate\"\n class=\"cursor-pointer w-5 h-5 rounded-full border-2 flex justify-center items-center border-gray-500 \"\n (click)=\"deletefromClipboard(document)\">\n <span class=\"text-gray-500 bi bi-x text-lg flex items-center\"></span>\n </span>\n </div>\n <div class=\"text-md text-gray-500 text-center my-2\">\n <span *ngIf=\"document.canCopyToTarget && !document.canMoveToTarget\">{{'can_copy_only' |\n translate}}</span>\n <span *ngIf=\"!document.canCopyToTarget && document.canMoveToTarget\">{{'can_move_only' |\n translate}}</span>\n <span *ngIf=\"document.canCopyToTarget && document.canMoveToTarget\">{{'can_copy_and_move' |\n translate}}</span>\n <span\n *ngIf=\"!document.canCopyToTarget && !document.canMoveToTarget\">{{'can_not_copy_and_move'\n | translate}}</span>\n </div>\n </div>\n\n </div>\n <div class=\"h-1/6 flex w-full justify-center items-center\">\n <button class=\"submission-button mx-2\" [disabled]=\"!enableCopy\"\n (click)=\"copyFromInsideClipboard()\">{{'BUTTONS.COPY' | translate}}</button>\n <button class=\"submission-button mx-2\" [disabled]=\"!enableMove\"\n (click)=\"moveFromInsideClipboard()\">{{'BUTTONS.MOVE' | translate}}</button>\n </div>\n </div>\n </div>\n\n <div class=\"bg-transparent absolute top-0 bottom-0 left-0 right-0 \" *ngIf=\"clipboardLoading\">\n\n </div>\n</div>", styles: [".clipboard-side-section{width:0px;overflow-x:hidden;height:91vh;background-color:#fff;overflow:hidden;border:1px solid lightgray;z-index:999;transition:.1s ease-in-out;border-bottom:none}.clipboard-side-section .clipboard-header{height:60px}.clipboard-side-section .clipboard-content{height:calc(100% - 60px)}\n"], components: [{ type: i2__namespace$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4__namespace$2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "mode", "value", "bufferValue"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { type: i7__namespace.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: DisplaySuitableIconComponent, selector: "app-display-suitable-icon", inputs: ["data", "size", "dataType", "archive"] }], directives: [{ type: i8__namespace.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i1__namespace$1.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
27500
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: ClipboardComponent, decorators: [{
|
|
27501
|
+
type: i0.Component,
|
|
27502
|
+
args: [{
|
|
27503
|
+
selector: 'lib-clipboard',
|
|
27504
|
+
templateUrl: './clipboard.component.html',
|
|
27505
|
+
styleUrls: ['./clipboard.component.scss'],
|
|
27506
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
27507
|
+
}]
|
|
27508
|
+
}], ctorParameters: function () { return [{ type: FileManagerService }, { type: UserService }, { type: CustomToastrService }, { type: UserPreferencesService$1 }]; }, propDecorators: { onClipboardClose: [{
|
|
27509
|
+
type: i0.Output
|
|
27510
|
+
}], onRefreshFolderTree: [{
|
|
27511
|
+
type: i0.Output
|
|
27512
|
+
}], clipboardItems: [{
|
|
27513
|
+
type: i0.Input
|
|
27514
|
+
}], myCurrecntFolderData: [{
|
|
27515
|
+
type: i0.Input
|
|
27516
|
+
}], preventedGroups: [{
|
|
27517
|
+
type: i0.Input
|
|
27518
|
+
}], directory: [{
|
|
27519
|
+
type: i0.Input
|
|
27520
|
+
}] } });
|
|
27521
|
+
|
|
27211
27522
|
var FileMangerModule = /** @class */ (function () {
|
|
27212
27523
|
function FileMangerModule() {
|
|
27213
27524
|
}
|
|
@@ -27230,7 +27541,8 @@
|
|
|
27230
27541
|
ScanModalComponent,
|
|
27231
27542
|
ShareDialogComponent,
|
|
27232
27543
|
TemplateModalComponent,
|
|
27233
|
-
UpdateModalComponent
|
|
27544
|
+
UpdateModalComponent,
|
|
27545
|
+
ClipboardComponent], imports: [i3.CommonModule,
|
|
27234
27546
|
i2$4.MatIconModule,
|
|
27235
27547
|
DynamicFormModule,
|
|
27236
27548
|
i6.FormsModule,
|
|
@@ -27268,7 +27580,11 @@
|
|
|
27268
27580
|
UserModule,
|
|
27269
27581
|
MutipleDynamicFormViewerModule,
|
|
27270
27582
|
i2$1.BrowserTransferStateModule,
|
|
27271
|
-
AttachmentModalModule
|
|
27583
|
+
AttachmentModalModule,
|
|
27584
|
+
i6.FormsModule,
|
|
27585
|
+
DisplaySuitableIconModule,
|
|
27586
|
+
i4$2.MatProgressBarModule,
|
|
27587
|
+
i7.MatCheckboxModule], exports: [SidepanelComponent,
|
|
27272
27588
|
CopyComponent,
|
|
27273
27589
|
DeleteComponent,
|
|
27274
27590
|
MoveComponent,
|
|
@@ -27292,7 +27608,8 @@
|
|
|
27292
27608
|
i3$4.DxTemplateModule,
|
|
27293
27609
|
i3$4.DxTextBoxModule,
|
|
27294
27610
|
i3$4.DxFormModule,
|
|
27295
|
-
i3$4.DxTreeViewModule
|
|
27611
|
+
i3$4.DxTreeViewModule,
|
|
27612
|
+
ClipboardComponent] });
|
|
27296
27613
|
FileMangerModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FileMangerModule, imports: [[
|
|
27297
27614
|
i3.CommonModule,
|
|
27298
27615
|
i2$4.MatIconModule,
|
|
@@ -27332,7 +27649,11 @@
|
|
|
27332
27649
|
UserModule,
|
|
27333
27650
|
MutipleDynamicFormViewerModule,
|
|
27334
27651
|
i2$1.BrowserTransferStateModule,
|
|
27335
|
-
AttachmentModalModule
|
|
27652
|
+
AttachmentModalModule,
|
|
27653
|
+
i6.FormsModule,
|
|
27654
|
+
DisplaySuitableIconModule,
|
|
27655
|
+
i4$2.MatProgressBarModule,
|
|
27656
|
+
i7.MatCheckboxModule
|
|
27336
27657
|
], i3$4.DxPopupModule,
|
|
27337
27658
|
i3$4.DxScrollViewModule,
|
|
27338
27659
|
i4$5.DxiToolbarItemModule,
|
|
@@ -27361,7 +27682,8 @@
|
|
|
27361
27682
|
ScanModalComponent,
|
|
27362
27683
|
ShareDialogComponent,
|
|
27363
27684
|
TemplateModalComponent,
|
|
27364
|
-
UpdateModalComponent
|
|
27685
|
+
UpdateModalComponent,
|
|
27686
|
+
ClipboardComponent
|
|
27365
27687
|
],
|
|
27366
27688
|
imports: [
|
|
27367
27689
|
i3.CommonModule,
|
|
@@ -27402,7 +27724,11 @@
|
|
|
27402
27724
|
UserModule,
|
|
27403
27725
|
MutipleDynamicFormViewerModule,
|
|
27404
27726
|
i2$1.BrowserTransferStateModule,
|
|
27405
|
-
AttachmentModalModule
|
|
27727
|
+
AttachmentModalModule,
|
|
27728
|
+
i6.FormsModule,
|
|
27729
|
+
DisplaySuitableIconModule,
|
|
27730
|
+
i4$2.MatProgressBarModule,
|
|
27731
|
+
i7.MatCheckboxModule
|
|
27406
27732
|
],
|
|
27407
27733
|
exports: [
|
|
27408
27734
|
SidepanelComponent,
|
|
@@ -27429,7 +27755,8 @@
|
|
|
27429
27755
|
i3$4.DxTemplateModule,
|
|
27430
27756
|
i3$4.DxTextBoxModule,
|
|
27431
27757
|
i3$4.DxFormModule,
|
|
27432
|
-
i3$4.DxTreeViewModule
|
|
27758
|
+
i3$4.DxTreeViewModule,
|
|
27759
|
+
ClipboardComponent
|
|
27433
27760
|
]
|
|
27434
27761
|
}]
|
|
27435
27762
|
}] });
|
|
@@ -27471,6 +27798,9 @@
|
|
|
27471
27798
|
this.lastFolderTrackId = null;
|
|
27472
27799
|
this.itemToDisplay = {};
|
|
27473
27800
|
this.tempSave = null;
|
|
27801
|
+
this.clipboardItems = []; // array of id to items in clipboard
|
|
27802
|
+
this.showClipboard = false;
|
|
27803
|
+
this.showDgdaClipboard = false; // flage related to dgda clipboard
|
|
27474
27804
|
this.cancelButton = {
|
|
27475
27805
|
text: this.isArabic ? 'إلغاء' : 'Cancel',
|
|
27476
27806
|
onClick: function () {
|
|
@@ -27663,6 +27993,25 @@
|
|
|
27663
27993
|
disableClose: true,
|
|
27664
27994
|
});
|
|
27665
27995
|
};
|
|
27996
|
+
this.addToClipboard = function () {
|
|
27997
|
+
var selectedItemsIds = _this.selectedItems.split(',');
|
|
27998
|
+
var directory = _this.getCurrentDirectory();
|
|
27999
|
+
var id = directory.dataItem === undefined
|
|
28000
|
+
? _this.mainFolder
|
|
28001
|
+
: _this.getCurrentFolderId(directory);
|
|
28002
|
+
if (selectedItemsIds.length === 1 && _this.clipboardItems.length > 0 && _this.clipboardItems.indexOf(selectedItemsIds[0]) > -1) {
|
|
28003
|
+
_this.customToastrService.show('error', 'TOASTER.ERROR', "TOASTER.item_already_added");
|
|
28004
|
+
}
|
|
28005
|
+
else {
|
|
28006
|
+
_this.clipboardItems = _.union(_this.clipboardItems, selectedItemsIds);
|
|
28007
|
+
_this.userPreferenceService.set('clipboardItems', JSON.stringify(_this.clipboardItems));
|
|
28008
|
+
_this.customToastrService.show('success', 'TOASTER.SUCCESS', "TOASTER.added_to_clipboard");
|
|
28009
|
+
_this.reinitializeFolderTree(id, directory);
|
|
28010
|
+
_this.fileManagerService.onRefreshClipboard.emit();
|
|
28011
|
+
_this.showClipboard = true;
|
|
28012
|
+
console.log(_this.clipboardItems);
|
|
28013
|
+
}
|
|
28014
|
+
};
|
|
27666
28015
|
// -------------------------------------------------------------------------------------------------------------------------------------
|
|
27667
28016
|
this.customizeIcon = function (fileSystemItem) {
|
|
27668
28017
|
var _a, _b, _c;
|
|
@@ -28055,6 +28404,8 @@
|
|
|
28055
28404
|
// if (this.showDetails) {
|
|
28056
28405
|
// this.sideMenuLoading = true;
|
|
28057
28406
|
// }
|
|
28407
|
+
this.showClipboard = false;
|
|
28408
|
+
this.showDgdaClipboard = false;
|
|
28058
28409
|
this.myFileMangerInstance = e.component;
|
|
28059
28410
|
this.currentDirectory = this.getCurrentDirectory();
|
|
28060
28411
|
var selectedItem = this.fileManager.instance.getSelectedItems();
|
|
@@ -28154,6 +28505,8 @@
|
|
|
28154
28505
|
return __generator(this, function (_q) {
|
|
28155
28506
|
switch (_q.label) {
|
|
28156
28507
|
case 0:
|
|
28508
|
+
this.showClipboard = false; // close clipboard if navigated to any place
|
|
28509
|
+
this.showDgdaClipboard = false;
|
|
28157
28510
|
this.selectedFolderPath = (_a = e.directory.dataItem) === null || _a === void 0 ? void 0 : _a.entity.path;
|
|
28158
28511
|
if (e.directory.dataItem === undefined) {
|
|
28159
28512
|
if (this.mainFolder === 'sharedDocumentsRoot') {
|
|
@@ -28427,7 +28780,8 @@
|
|
|
28427
28780
|
};
|
|
28428
28781
|
FileManagerAbstract.prototype.openSideMenuDetails = function () {
|
|
28429
28782
|
this.showDetails = true;
|
|
28430
|
-
|
|
28783
|
+
this.showClipboard = false;
|
|
28784
|
+
this.showDgdaClipboard = false;
|
|
28431
28785
|
};
|
|
28432
28786
|
FileManagerAbstract.prototype.closeSideMenu = function () {
|
|
28433
28787
|
this.showDetails = false;
|
|
@@ -28735,6 +29089,7 @@
|
|
|
28735
29089
|
exports.CardModule = CardModule;
|
|
28736
29090
|
exports.ChartDataService = ChartDataService;
|
|
28737
29091
|
exports.ClickOutsideDirective = ClickOutsideDirective;
|
|
29092
|
+
exports.ClipboardComponent = ClipboardComponent;
|
|
28738
29093
|
exports.CommentsDashletComponent = CommentsDashletComponent;
|
|
28739
29094
|
exports.CommentsModule = CommentsModule;
|
|
28740
29095
|
exports.ComponentRegisterService = ComponentRegisterService;
|