nuxeo-development-framework 4.0.9 → 4.1.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 +253 -213
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/correspondence-relation/components/correspondence-relation-list/correspondence-relation-list.component.js +2 -2
- package/esm2015/lib/components/documents/components/attachments-list/attachments-list.component.js +6 -3
- package/esm2015/lib/components/file-manger/components/create-modal/create-modal.component.js +238 -200
- package/esm2015/lib/components/file-manger/file-manger.module.js +10 -6
- package/esm2015/lib/shared/components/nuxeo-dialog/nuxeo.dialog.js +2 -2
- package/fesm2015/nuxeo-development-framework.js +231 -187
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/components/documents/components/attachments-list/attachments-list.component.d.ts +2 -1
- package/lib/components/file-manger/components/create-modal/create-modal.component.d.ts +13 -19
- package/lib/components/file-manger/file-manger.module.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1814,7 +1814,7 @@ class NdfNuxeoDialog extends BaseComponent {
|
|
|
1814
1814
|
}
|
|
1815
1815
|
}
|
|
1816
1816
|
NdfNuxeoDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfNuxeoDialog, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1817
|
-
NdfNuxeoDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: { dialogTitle: "dialogTitle", subTitle: "subTitle", loaderMode: "loaderMode" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true }, { propertyName: "actionsTemplate", first: true, predicate: ["actionsTemplate"], descendants: true }], viewQueries: [{ propertyName: "dialogBody", first: true, predicate: ["dialogBody"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div SetDirRtl class=\"ndf-dialog-wrapper flex flex-col\">\r\n\t<div\r\n\t\tclass=\"dialog-header flex h-20 p-6 justify-between items-center w-full bg-vapor text-blue-munsell text-xl not-italic font-bold leading-7\"\r\n\t>\r\n\t\t<div class=\"flex flex-col\">\r\n\t\t\t<span>{{ data?.dialogConfig?.title || dialogTitle }}</span>\r\n\t\t\t<span class=\"text-base font-normal\"\r\n\t\t\t\t>{{ data?.dialogConfig?.subTitle || subTitle }}</span\r\n\t\t\t>\r\n\t\t</div>\r\n\t\t<button\r\n\t\t\tclass=\"flex items-center justify-center rounded-full bg-anti-flash-white w-10 h-10\"\r\n\t\t\t(click)=\"executeAction()\"\r\n\t\t\tmatTooltip=\"{{'BUTTONS.CLOSE' | translate}}\"\r\n\t\t>\r\n\t\t\t<mat-icon class=\"icon-size-3.5\" [svgIcon]=\"'icons:cancel-icon'\">\r\n\t\t\t</mat-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<div\r\n\t\t#dialogBody\r\n\t\tclass=\"dialog-body flex flex-col gap-y-4 p-6 overflow-y-auto relative z-99\"\r\n\t\t[ngClass]=\"{'overflow-hidden': loading}\"\r\n\t>\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"data?.dialogConfig?.contentTemplate || contentTemplate\"\r\n\t\t></ng-container>\r\n\t\t<ng-container *ngIf=\"loading\">\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay flex w-full h-full items-center justify-center absolute left-0 bottom-0 right-0 bg-gray-300 opacity-40 z-999\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t></div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay flex w-full h-full items-center justify-center absolute left-0 bottom-0 right-0 z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'spinner'\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t>\r\n\t\t\t\t<mat-spinner\r\n\t\t\t\t\t[value]=\"90\"\r\n\t\t\t\t\t[strokeWidth]=\"4\"\r\n\t\t\t\t\toverlay=\"true\"\r\n\t\t\t\t\t[diameter]=\"40\"\r\n\t\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t>\r\n\t\t\t\t</mat-spinner>\r\n\t\t\t</div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"block w-full h-px absolute inset-0 z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'progressBar'\"\r\n\t\t\t>\r\n\t\t\t\t<mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t</div>\r\n\t<div class=\"flex w-full justify-end p-6 pt-0 gap-x-4\">\r\n\t\t<button class=\"cancelation-button\" (click)=\"executeAction()\">\r\n\t\t\t{{\"BUTTONS.CANCEL\" | translate}}\r\n\t\t</button>\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"(data?.dialogConfig?.actionsTemplate || actionsTemplate); context: { dialog: this }\"\r\n\t\t></ng-container>\r\n\t</div>\r\n</div>\r\n", styles: ["::ng-deep .ndf-dialog .mat-dialog-container{overflow:hidden!important;border-radius:8px!important}.ndf-dialog-wrapper .dialog-body{height:
|
|
1817
|
+
NdfNuxeoDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: { dialogTitle: "dialogTitle", subTitle: "subTitle", loaderMode: "loaderMode" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true }, { propertyName: "actionsTemplate", first: true, predicate: ["actionsTemplate"], descendants: true }], viewQueries: [{ propertyName: "dialogBody", first: true, predicate: ["dialogBody"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div SetDirRtl class=\"ndf-dialog-wrapper flex flex-col h-full\">\r\n\t<div\r\n\t\tclass=\"dialog-header flex h-20 p-6 justify-between items-center w-full bg-vapor text-blue-munsell text-xl not-italic font-bold leading-7\"\r\n\t>\r\n\t\t<div class=\"flex flex-col\">\r\n\t\t\t<span>{{ data?.dialogConfig?.title || dialogTitle }}</span>\r\n\t\t\t<span class=\"text-base font-normal\"\r\n\t\t\t\t>{{ data?.dialogConfig?.subTitle || subTitle }}</span\r\n\t\t\t>\r\n\t\t</div>\r\n\t\t<button\r\n\t\t\tclass=\"flex items-center justify-center rounded-full bg-anti-flash-white w-10 h-10\"\r\n\t\t\t(click)=\"executeAction()\"\r\n\t\t\tmatTooltip=\"{{'BUTTONS.CLOSE' | translate}}\"\r\n\t\t>\r\n\t\t\t<mat-icon class=\"icon-size-3.5\" [svgIcon]=\"'icons:cancel-icon'\">\r\n\t\t\t</mat-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<div\r\n\t\t#dialogBody\r\n\t\tclass=\"dialog-body flex flex-col gap-y-4 p-6 overflow-y-auto relative z-99\"\r\n\t\t[ngClass]=\"{'overflow-hidden': loading}\"\r\n\t>\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"data?.dialogConfig?.contentTemplate || contentTemplate\"\r\n\t\t></ng-container>\r\n\t\t<ng-container *ngIf=\"loading\">\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay flex w-full h-full items-center justify-center absolute left-0 bottom-0 right-0 bg-gray-300 opacity-40 z-999\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t></div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay flex w-full h-full items-center justify-center absolute left-0 bottom-0 right-0 z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'spinner'\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t>\r\n\t\t\t\t<mat-spinner\r\n\t\t\t\t\t[value]=\"90\"\r\n\t\t\t\t\t[strokeWidth]=\"4\"\r\n\t\t\t\t\toverlay=\"true\"\r\n\t\t\t\t\t[diameter]=\"40\"\r\n\t\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t>\r\n\t\t\t\t</mat-spinner>\r\n\t\t\t</div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"block w-full h-px absolute inset-0 z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'progressBar'\"\r\n\t\t\t>\r\n\t\t\t\t<mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t</div>\r\n\t<div class=\"flex w-full justify-end p-6 pt-0 gap-x-4\">\r\n\t\t<button class=\"cancelation-button\" (click)=\"executeAction()\">\r\n\t\t\t{{\"BUTTONS.CANCEL\" | translate}}\r\n\t\t</button>\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"(data?.dialogConfig?.actionsTemplate || actionsTemplate); context: { dialog: this }\"\r\n\t\t></ng-container>\r\n\t</div>\r\n</div>\r\n", styles: ["::ng-deep .ndf-dialog .mat-dialog-container{overflow:hidden!important;border-radius:8px!important}.ndf-dialog-wrapper .dialog-body{height:100%;max-height:calc(100vh - 208px)}:host{height:100%;display:block}\n"], components: [{ type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: SetDirRtlDirective, selector: "[SetDirRtl]" }, { type: i2$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "translate": i1.TranslatePipe } });
|
|
1818
1818
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfNuxeoDialog, decorators: [{
|
|
1819
1819
|
type: Component,
|
|
1820
1820
|
args: [{
|
|
@@ -5657,7 +5657,7 @@ class CorrespondenceRelationListComponent {
|
|
|
5657
5657
|
}
|
|
5658
5658
|
}
|
|
5659
5659
|
CorrespondenceRelationListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CorrespondenceRelationListComponent, deps: [{ token: CorrespondenceRelationService }, { token: i1$3.MatDialog }, { token: ViewerFilesService }, { token: DocumentsService }, { token: AdapterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5660
|
-
CorrespondenceRelationListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CorrespondenceRelationListComponent, selector: "cts-correspondence-relation-list", inputs: { correspondence_id: "correspondence_id", reload: "reload" }, ngImport: i0, template: "<div class=\"relations-list\" *ngIf=\"relateddoc.length > 0\">\r\n <ng-container>\r\n <div *ngFor=\"let group of relateddoc; first as isFirst\">\r\n <mat-accordion class=\"example-headers-align\" multi>\r\n <mat-expansion-panel [expanded]=\"isFirst\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n {{ group[0] }}\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <mat-list>\r\n <div class=\"mat-list-items\" *ngFor=\"let item of group[1]\">\r\n <cts-item-list\r\n [item]=\"item\"\r\n [title]=\"item.title\"\r\n [iconname]=\"'link'\"\r\n [actions]=\"menu_actions\"\r\n (actionclicked)=\"handleMenuItemClicked($event)\"\r\n (itemClicked)=\"showCorrespondenceInViewer(item)\"\r\n [moreclasses]=\"'link-relation'\"\r\n ></cts-item-list>\r\n </div>\r\n </mat-list>\r\n </ng-template>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n </div>\r\n </ng-container>\r\n</div>\r\n<div class=\"nocontent\" *ngIf=\"relateddoc.length === 0\">\r\n <p>{{ \"correspondence-relation.nocontent\" | translate }}</p>\r\n</div>\r\n", styles: [".relations-list{border:1px solid #eee}.relations-list .mat-expansion-panel{box-shadow:none!important}.relations-list .mat-expansion-panel-header{border-bottom:1px solid #d9dce2;background-color:#f5f6f8;height:50px!important}.relations-list .mat-expansion-panel-header:hover{background-color:#f5f6f8!important}.relations-list .mat-expansion-panel-header:focus{background-color:#f5f6f8!important}.relations-list .mat-expansion-panel-header-title{font-weight:500}.relations-list .mat-accordion .mat-expansion-panel{border-radius:0!important}.relations-list .mat-expansion-panel-body{padding:0!important}.nocontent{color:gray;padding:10px;font-size:14px;border:1px solid #d9dce2}.nocontent p{margin:0;text-align:center}\n"], components: [{ type: i6$3.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { type: i6$3.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight"] }, { type: i2$4.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { type: ItemListComponent, selector: "cts-item-list", inputs: ["item", "iconname", "title", "actions", "isselected", "moreclasses"], outputs: ["itemClicked", "actionclicked"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6$3.MatAccordion, selector: "mat-accordion", inputs: ["multi", "displayMode", "togglePosition", "hideToggle"], exportAs: ["matAccordion"] }, { type: i6$3.MatExpansionPanelTitle, selector: "mat-panel-title" }, { type: i6$3.MatExpansionPanelContent, selector: "ng-template[matExpansionPanelContent]" }], pipes: { "translate": i1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
5660
|
+
CorrespondenceRelationListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CorrespondenceRelationListComponent, selector: "cts-correspondence-relation-list", inputs: { correspondence_id: "correspondence_id", reload: "reload" }, ngImport: i0, template: "<div class=\"relations-list\" *ngIf=\"relateddoc.length > 0\">\r\n <ng-container>\r\n <div *ngFor=\"let group of relateddoc; first as isFirst\">\r\n <mat-accordion class=\"example-headers-align\" multi>\r\n <mat-expansion-panel [expanded]=\"isFirst\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n {{('vocabulary.VOC_CorrespondenceRelationsNames.' + group[0]) | translate }}\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <mat-list>\r\n <div class=\"mat-list-items\" *ngFor=\"let item of group[1]\">\r\n <cts-item-list\r\n [item]=\"item\"\r\n [title]=\"item.title\"\r\n [iconname]=\"'link'\"\r\n [actions]=\"menu_actions\"\r\n (actionclicked)=\"handleMenuItemClicked($event)\"\r\n (itemClicked)=\"showCorrespondenceInViewer(item)\"\r\n [moreclasses]=\"'link-relation'\"\r\n ></cts-item-list>\r\n </div>\r\n </mat-list>\r\n </ng-template>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n </div>\r\n </ng-container>\r\n</div>\r\n<div class=\"nocontent\" *ngIf=\"relateddoc.length === 0\">\r\n <p>{{ \"correspondence-relation.nocontent\" | translate }}</p>\r\n</div>\r\n", styles: [".relations-list{border:1px solid #eee}.relations-list .mat-expansion-panel{box-shadow:none!important}.relations-list .mat-expansion-panel-header{border-bottom:1px solid #d9dce2;background-color:#f5f6f8;height:50px!important}.relations-list .mat-expansion-panel-header:hover{background-color:#f5f6f8!important}.relations-list .mat-expansion-panel-header:focus{background-color:#f5f6f8!important}.relations-list .mat-expansion-panel-header-title{font-weight:500}.relations-list .mat-accordion .mat-expansion-panel{border-radius:0!important}.relations-list .mat-expansion-panel-body{padding:0!important}.nocontent{color:gray;padding:10px;font-size:14px;border:1px solid #d9dce2}.nocontent p{margin:0;text-align:center}\n"], components: [{ type: i6$3.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { type: i6$3.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight"] }, { type: i2$4.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { type: ItemListComponent, selector: "cts-item-list", inputs: ["item", "iconname", "title", "actions", "isselected", "moreclasses"], outputs: ["itemClicked", "actionclicked"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6$3.MatAccordion, selector: "mat-accordion", inputs: ["multi", "displayMode", "togglePosition", "hideToggle"], exportAs: ["matAccordion"] }, { type: i6$3.MatExpansionPanelTitle, selector: "mat-panel-title" }, { type: i6$3.MatExpansionPanelContent, selector: "ng-template[matExpansionPanelContent]" }], pipes: { "translate": i1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
5661
5661
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CorrespondenceRelationListComponent, decorators: [{
|
|
5662
5662
|
type: Component,
|
|
5663
5663
|
args: [{
|
|
@@ -14557,6 +14557,7 @@ class AttachmentsListComponent {
|
|
|
14557
14557
|
this.batchList = false;
|
|
14558
14558
|
this.dontDelete = false;
|
|
14559
14559
|
this.canDelete = true;
|
|
14560
|
+
this.keepFileExtension = false;
|
|
14560
14561
|
this.deleteSuccess = new EventEmitter();
|
|
14561
14562
|
this.documentsCount = new EventEmitter();
|
|
14562
14563
|
this.onDestroy$ = new Subject();
|
|
@@ -14616,7 +14617,7 @@ class AttachmentsListComponent {
|
|
|
14616
14617
|
classification: new FormControl(null),
|
|
14617
14618
|
category: new FormControl(null),
|
|
14618
14619
|
type: new FormControl('PDF'),
|
|
14619
|
-
title: new FormControl(item.title.split('.').slice(0, -1).join('.')),
|
|
14620
|
+
title: new FormControl(this.keepFileExtension ? item.title : item.title.split('.').slice(0, -1).join('.')),
|
|
14620
14621
|
remarks: new FormControl(null),
|
|
14621
14622
|
// isObject: new FormControl(false),
|
|
14622
14623
|
extension: new FormControl(item.title.split('.').pop()),
|
|
@@ -14645,7 +14646,7 @@ class AttachmentsListComponent {
|
|
|
14645
14646
|
}
|
|
14646
14647
|
}
|
|
14647
14648
|
AttachmentsListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: AttachmentsListComponent, deps: [{ token: NuxeoService }], target: i0.ɵɵFactoryTarget.Component });
|
|
14648
|
-
AttachmentsListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: AttachmentsListComponent, selector: "cts-attachments-list", inputs: { ancestorId: "ancestorId", provider: "provider", items: "items", batchList: "batchList", dontDelete: "dontDelete", canDelete: "canDelete", item: "item" }, outputs: { deleteSuccess: "deleteSuccess", documentsCount: "documentsCount", documentSelect: "documentSelect" }, usesOnChanges: true, ngImport: i0, template: "<ng-container>\r\n <div class=\"doc-list\">\r\n <ng-container>\r\n <form [formGroup]=\"attachmentForm\">\r\n <div formArrayName=\"attachmentCard\">\r\n <div\r\n class=\"doc-item\"\r\n *ngFor=\"\r\n let attachmentCardControl of attachmentForm.get('attachmentCard')[\r\n 'controls'\r\n ];\r\n let i = index\r\n \"\r\n >\r\n <!-- (click)=\"preview(item.uid)\" -->\r\n <div class=\"file-icon\">\r\n <mat-icon>file_copy</mat-icon>\r\n </div>\r\n <div\r\n [formGroupName]=\"i\"\r\n class=\"attachmentForm-container row no-gutters\"\r\n >\r\n <div class=\"formControl-wrapper col-12 col-xl-6\">\r\n <app-dynamic-form-textitem\r\n placeholder=\"{{ 'Title' | translate }}\"\r\n class=\"textitem\"\r\n formControlName=\"title\"\r\n \r\n >\r\n </app-dynamic-form-textitem>\r\n <app-dynamic-form-textitem\r\n placeholder=\"{{\r\n 'CREATE.ATTACHMENTS.REMARKS_PLACE_HOLDER' | translate\r\n }}\"\r\n class=\"textitem\"\r\n formControlName=\"remarks\"\r\n >\r\n </app-dynamic-form-textitem>\r\n </div>\r\n <div class=\"formControl-wrapper col-12 col-xl-6\">\r\n <app-dynamic-form-vocabulary-item\r\n class=\"voc-form-control\"\r\n [bindLabel]=\"'label'\"\r\n [bindValue]=\"'id'\"\r\n placeholder=\"{{ 'VOCABULARY.TYPE' | translate }}\"\r\n [multiple]=\"false\"\r\n [searchable]=\"false\"\r\n [closeOnSelect]=\"true\"\r\n [hideSelectedItems]=\"false\"\r\n [vocabularyType]=\"'VOC_CorrespondenceAttachmentType'\"\r\n formControlName=\"category\"\r\n >\r\n </app-dynamic-form-vocabulary-item>\r\n <app-dynamic-form-vocabulary-item\r\n class=\"voc-form-control\"\r\n [bindLabel]=\"'label'\"\r\n [bindValue]=\"'id'\"\r\n placeholder=\"{{ 'VOCABULARY.CLASSIFICATION' | translate }}\"\r\n [multiple]=\"false\"\r\n [searchable]=\"false\"\r\n [closeOnSelect]=\"true\"\r\n [hideSelectedItems]=\"false\"\r\n [vocabularyType]=\"'VOC_CorrespondenceAttachClassification'\"\r\n formControlName=\"classification\"\r\n >\r\n </app-dynamic-form-vocabulary-item>\r\n </div>\r\n <!-- <div class=\"formControl-toggleitem col-2 col-xl-2\">\r\n <cts-dynamic-form-slide-toggleitem\r\n label=\"{{ 'CREATE.ATTACHMENTS.ISOBJECT' | translate }}\"\r\n formControlName=\"isObject\"\r\n ></cts-dynamic-form-slide-toggleitem>\r\n </div> -->\r\n </div>\r\n <div class=\"btn-wrapper\">\r\n <button\r\n (click)=\"delInput(i)\"\r\n class=\"btn btn-outline-danger btn-no-border\"\r\n >\r\n <!-- deleteDocument($event, attachmentCardControl.value.item) -->\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </ng-container>\r\n </div>\r\n</ng-container>\r\n<ng-template #spinner>\r\n <mat-spinner class=\"centered-spinner\"></mat-spinner>\r\n</ng-template>\r\n", styles: [".bi{margin:0!important}.memo-sorting-wrapper{width:265px;margin:0 10px;height:100%;display:flex}.memo-sorting-wrapper .sorting-direction{width:65px;height:40px;background-color:#465573;color:#fff;font-size:20px;display:flex;justify-content:center;align-items:center;cursor:pointer}.memo-sorting-wrapper .memo-sorting-trigger{width:calc(100% - 65px);height:100%;background-color:transparent;border:1px solid lightgrey;display:flex;justify-content:space-between;align-items:center;padding:0 15px;font-size:14px}.memo-sorting-wrapper .memo-sorting-trigger i{font-size:16px;color:gray}.memo-sorting-menu{width:200px}.my-button{border:1px solid #465573;color:#465573;border-radius:5px;background-color:transparent;font-weight:bold;min-width:80px;height:40px}.my-button.reset{border:none}.my-button:hover{color:#fff;background-color:#465573}.my-button:hover.reset{color:#465573;border:1px solid #465573;background-color:#fff}.app-property-value .app-input-wrapper label{color:#646f85;font-size:13px;margin-bottom:5px}.app-property-value .app-input-wrapper label .text-danger{font-size:16px;line-height:14px;margin:0 5px!important}.app-property-value .app-input-wrapper .form-control{border:1px solid #ccc;border-radius:5px;background-color:#8f98aa1a;height:40px}.app-property-value .app-input-wrapper .form-control:disabled{background-color:#e9ecef!important}.app-property-value .app-input-wrapper .form-control:focus{border:1px solid #1a96c6;box-shadow:0 0 4px #79c3c26b!important}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers{list-style:none;padding:0;margin:0;font-size:14px}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers .error{margin-top:5px}.autocomplete-container .input-container input:focus,hijri-gregorian-datepicker .form-group .input-group .form-control:focus,.ng-select.ng-select-focused .ng-select-container{border:1px solid #1a96c6!important;box-shadow:0 0 4px #79c3c26b!important}input::placeholder{font-size:12px}.form-control:focus{box-shadow:none!important}.mat-stepper-horizontal{margin-top:-25px}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header.cdk-program-focused{background-color:transparent}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-icon-selected{background-color:transparent;color:#fff;background-image:linear-gradient(to right,#0dbab5,#1a96c6)}@media only screen and (max-width: 576px){.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-label .mat-step-text-label{white-space:pre-wrap;overflow:visible}}.mat-stepper-horizontal .mat-horizontal-content-container{overflow:visible}@media only screen and (max-width: 768px){.mat-stepper-horizontal .mat-horizontal-content-container{padding:0 0 24px}}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:after,.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:before{display:none}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:before{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);left:0}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:after{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);right:0}.form-wrapper{padding:30px 15px;border:1px solid #dde0e2}.form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.form-wrapper .buttons-wrapper button:hover{opacity:.7}.form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.form-wrapper .upload-wrapper button span{margin:0 10px}.renameFileComponent .form-wrapper{padding:30px 15px;border:none!important}.renameFileComponent .form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.renameFileComponent .form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.renameFileComponent .form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.renameFileComponent .form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.renameFileComponent .form-wrapper .buttons-wrapper button:hover{opacity:.7}.renameFileComponent .form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.renameFileComponent .form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.renameFileComponent .form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.renameFileComponent .form-wrapper .upload-wrapper button span{margin:0 10px}.my-dynamic-viewer{display:flex;align-items:center;font-size:12px;min-height:30px}.my-dynamic-viewer .my-label{font-size:12px;font-weight:500;width:150px;word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-label{width:50%}}.my-dynamic-viewer .my-value{width:calc(100% - 150px);word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-value{width:50%}}.my-dynamic-viewer .direction-img{font-size:14px}.my-dynamic-viewer .direction-img .incoming{display:none}.my-dynamic-viewer .direction-img .outgoing{display:none}.my-dynamic-viewer .direction-img .internal{display:none}.my-dynamic-viewer.draft .my-value{color:#596973}.my-dynamic-viewer.inProgress .my-value{color:#3c3cf0}.my-dynamic-viewer.registered .my-value{color:#4f008c}.my-dynamic-viewer.archived .my-value{color:#fbb62c}.my-dynamic-viewer.closed .my-value{color:#00dca5}.my-dynamic-viewer.approved .my-value{color:#06a57e}.my-dynamic-viewer.assigned .my-value{color:#fd6670}.my-dynamic-viewer.sent .my-value{color:#3c3cf0}.my-dynamic-viewer.published .my-value{color:#00dca5}.my-dynamic-viewer.Outgoing .my-value{display:flex}.my-dynamic-viewer.Outgoing .my-value .direction-img .outgoing{color:#fbb62c;margin:1px 5px;display:flex}.my-dynamic-viewer.Outgoing .my-value .text{margin:0 5px}.my-dynamic-viewer.Internal .my-value{display:flex}.my-dynamic-viewer.Internal .my-value .direction-img .internal{color:#3c3cf0;margin:1px 5px;display:flex}.my-dynamic-viewer.Internal .my-value .text{margin:0 5px}.my-dynamic-viewer.Incoming .my-value{display:flex}.my-dynamic-viewer.Incoming .my-value .direction-img .incoming{color:#00dca5;display:flex}.my-dynamic-viewer.Incoming .my-value .text{margin:-3px 5px 0}.my-dynamic-viewer.vertical{display:block}.my-dynamic-viewer.vertical .my-label{width:auto}.my-dynamic-viewer.vertical .my-value{width:auto}.my-dynamic-viewer.with-out-label{width:100%!important}.doc-item{display:flex;flex:1;padding-top:6px;padding-bottom:6px;justify-content:space-between;align-items:center;padding-inline-end:4px;cursor:pointer;border:1px solid;border-color:#d9dce2}.doc-item .item-content{display:flex;align-items:center;justify-content:space-between}.doc-item .file-icon{margin:4px;color:#465573;display:flex;align-items:center}.attachmentForm-container{width:100%;grid-row-gap:6px;row-gap:6px}.attachmentForm-container .formControl-wrapper{display:flex;align-items:center;justify-content:space-between;grid-column-gap:10px;column-gap:10px;padding-inline-end:5px;padding-inline-start:5px}.attachmentForm-container .formControl-wrapper .voc-form-control{width:50%}.attachmentForm-container .formControl-wrapper .textitem{width:100%}.attachmentForm-container .formControl-toggleitem{display:flex;align-items:center;justify-content:center}.btn-wrapper{display:flex;justify-content:flex-end}\n"], components: [{ type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: DynamicFormTextItemComponent, selector: "app-dynamic-form-textitem", inputs: ["autoComplete", "nativeAutoComplete", "autoComplete_pageProvider", "autoComplete_propertyName", "autoComplete_propertyKey", "autoCompleteValueKey", "autoCompleteType", "tenantId", "emitFullObject", "outsideParams", "type", "property", "label", "editable", "placeholder", "disabled", "displayEmpty", "preventSpace", "id", "maxCharsNum"] }, { type: DynamicFormVocabularyItemComponent, selector: "app-dynamic-form-vocabulary-item", inputs: ["bindValue", "bindLabel", "placeholder", "multiple", "searchable", "closeOnSelect", "hideSelectedItems", "disabled", "vocabularyType", "label", "cacheable", "shwoAllValues"], outputs: ["onSelecting"] }, { type: i8.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i6.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1.TranslatePipe } });
|
|
14649
|
+
AttachmentsListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: AttachmentsListComponent, selector: "cts-attachments-list", inputs: { ancestorId: "ancestorId", provider: "provider", items: "items", batchList: "batchList", dontDelete: "dontDelete", canDelete: "canDelete", item: "item", keepFileExtension: "keepFileExtension" }, outputs: { deleteSuccess: "deleteSuccess", documentsCount: "documentsCount", documentSelect: "documentSelect" }, usesOnChanges: true, ngImport: i0, template: "<ng-container>\r\n <div class=\"doc-list\">\r\n <ng-container>\r\n <form [formGroup]=\"attachmentForm\">\r\n <div formArrayName=\"attachmentCard\">\r\n <div\r\n class=\"doc-item\"\r\n *ngFor=\"\r\n let attachmentCardControl of attachmentForm.get('attachmentCard')[\r\n 'controls'\r\n ];\r\n let i = index\r\n \"\r\n >\r\n <!-- (click)=\"preview(item.uid)\" -->\r\n <div class=\"file-icon\">\r\n <mat-icon>file_copy</mat-icon>\r\n </div>\r\n <div\r\n [formGroupName]=\"i\"\r\n class=\"attachmentForm-container row no-gutters\"\r\n >\r\n <div class=\"formControl-wrapper col-12 col-xl-6\">\r\n <app-dynamic-form-textitem\r\n placeholder=\"{{ 'Title' | translate }}\"\r\n class=\"textitem\"\r\n formControlName=\"title\"\r\n \r\n >\r\n </app-dynamic-form-textitem>\r\n <app-dynamic-form-textitem\r\n placeholder=\"{{\r\n 'CREATE.ATTACHMENTS.REMARKS_PLACE_HOLDER' | translate\r\n }}\"\r\n class=\"textitem\"\r\n formControlName=\"remarks\"\r\n >\r\n </app-dynamic-form-textitem>\r\n </div>\r\n <div class=\"formControl-wrapper col-12 col-xl-6\">\r\n <app-dynamic-form-vocabulary-item\r\n class=\"voc-form-control\"\r\n [bindLabel]=\"'label'\"\r\n [bindValue]=\"'id'\"\r\n placeholder=\"{{ 'VOCABULARY.TYPE' | translate }}\"\r\n [multiple]=\"false\"\r\n [searchable]=\"false\"\r\n [closeOnSelect]=\"true\"\r\n [hideSelectedItems]=\"false\"\r\n [vocabularyType]=\"'VOC_CorrespondenceAttachmentType'\"\r\n formControlName=\"category\"\r\n >\r\n </app-dynamic-form-vocabulary-item>\r\n <app-dynamic-form-vocabulary-item\r\n class=\"voc-form-control\"\r\n [bindLabel]=\"'label'\"\r\n [bindValue]=\"'id'\"\r\n placeholder=\"{{ 'VOCABULARY.CLASSIFICATION' | translate }}\"\r\n [multiple]=\"false\"\r\n [searchable]=\"false\"\r\n [closeOnSelect]=\"true\"\r\n [hideSelectedItems]=\"false\"\r\n [vocabularyType]=\"'VOC_CorrespondenceAttachClassification'\"\r\n formControlName=\"classification\"\r\n >\r\n </app-dynamic-form-vocabulary-item>\r\n </div>\r\n <!-- <div class=\"formControl-toggleitem col-2 col-xl-2\">\r\n <cts-dynamic-form-slide-toggleitem\r\n label=\"{{ 'CREATE.ATTACHMENTS.ISOBJECT' | translate }}\"\r\n formControlName=\"isObject\"\r\n ></cts-dynamic-form-slide-toggleitem>\r\n </div> -->\r\n </div>\r\n <div class=\"btn-wrapper\">\r\n <button\r\n (click)=\"delInput(i)\"\r\n class=\"btn btn-outline-danger btn-no-border\"\r\n >\r\n <!-- deleteDocument($event, attachmentCardControl.value.item) -->\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </ng-container>\r\n </div>\r\n</ng-container>\r\n<ng-template #spinner>\r\n <mat-spinner class=\"centered-spinner\"></mat-spinner>\r\n</ng-template>\r\n", styles: [".bi{margin:0!important}.memo-sorting-wrapper{width:265px;margin:0 10px;height:100%;display:flex}.memo-sorting-wrapper .sorting-direction{width:65px;height:40px;background-color:#465573;color:#fff;font-size:20px;display:flex;justify-content:center;align-items:center;cursor:pointer}.memo-sorting-wrapper .memo-sorting-trigger{width:calc(100% - 65px);height:100%;background-color:transparent;border:1px solid lightgrey;display:flex;justify-content:space-between;align-items:center;padding:0 15px;font-size:14px}.memo-sorting-wrapper .memo-sorting-trigger i{font-size:16px;color:gray}.memo-sorting-menu{width:200px}.my-button{border:1px solid #465573;color:#465573;border-radius:5px;background-color:transparent;font-weight:bold;min-width:80px;height:40px}.my-button.reset{border:none}.my-button:hover{color:#fff;background-color:#465573}.my-button:hover.reset{color:#465573;border:1px solid #465573;background-color:#fff}.app-property-value .app-input-wrapper label{color:#646f85;font-size:13px;margin-bottom:5px}.app-property-value .app-input-wrapper label .text-danger{font-size:16px;line-height:14px;margin:0 5px!important}.app-property-value .app-input-wrapper .form-control{border:1px solid #ccc;border-radius:5px;background-color:#8f98aa1a;height:40px}.app-property-value .app-input-wrapper .form-control:disabled{background-color:#e9ecef!important}.app-property-value .app-input-wrapper .form-control:focus{border:1px solid #1a96c6;box-shadow:0 0 4px #79c3c26b!important}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers{list-style:none;padding:0;margin:0;font-size:14px}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers .error{margin-top:5px}.autocomplete-container .input-container input:focus,hijri-gregorian-datepicker .form-group .input-group .form-control:focus,.ng-select.ng-select-focused .ng-select-container{border:1px solid #1a96c6!important;box-shadow:0 0 4px #79c3c26b!important}input::placeholder{font-size:12px}.form-control:focus{box-shadow:none!important}.mat-stepper-horizontal{margin-top:-25px}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header.cdk-program-focused{background-color:transparent}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-icon-selected{background-color:transparent;color:#fff;background-image:linear-gradient(to right,#0dbab5,#1a96c6)}@media only screen and (max-width: 576px){.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-label .mat-step-text-label{white-space:pre-wrap;overflow:visible}}.mat-stepper-horizontal .mat-horizontal-content-container{overflow:visible}@media only screen and (max-width: 768px){.mat-stepper-horizontal .mat-horizontal-content-container{padding:0 0 24px}}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:after,.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:before{display:none}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:before{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);left:0}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:after{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);right:0}.form-wrapper{padding:30px 15px;border:1px solid #dde0e2}.form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.form-wrapper .buttons-wrapper button:hover{opacity:.7}.form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.form-wrapper .upload-wrapper button span{margin:0 10px}.renameFileComponent .form-wrapper{padding:30px 15px;border:none!important}.renameFileComponent .form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.renameFileComponent .form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.renameFileComponent .form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.renameFileComponent .form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.renameFileComponent .form-wrapper .buttons-wrapper button:hover{opacity:.7}.renameFileComponent .form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.renameFileComponent .form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.renameFileComponent .form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.renameFileComponent .form-wrapper .upload-wrapper button span{margin:0 10px}.my-dynamic-viewer{display:flex;align-items:center;font-size:12px;min-height:30px}.my-dynamic-viewer .my-label{font-size:12px;font-weight:500;width:150px;word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-label{width:50%}}.my-dynamic-viewer .my-value{width:calc(100% - 150px);word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-value{width:50%}}.my-dynamic-viewer .direction-img{font-size:14px}.my-dynamic-viewer .direction-img .incoming{display:none}.my-dynamic-viewer .direction-img .outgoing{display:none}.my-dynamic-viewer .direction-img .internal{display:none}.my-dynamic-viewer.draft .my-value{color:#596973}.my-dynamic-viewer.inProgress .my-value{color:#3c3cf0}.my-dynamic-viewer.registered .my-value{color:#4f008c}.my-dynamic-viewer.archived .my-value{color:#fbb62c}.my-dynamic-viewer.closed .my-value{color:#00dca5}.my-dynamic-viewer.approved .my-value{color:#06a57e}.my-dynamic-viewer.assigned .my-value{color:#fd6670}.my-dynamic-viewer.sent .my-value{color:#3c3cf0}.my-dynamic-viewer.published .my-value{color:#00dca5}.my-dynamic-viewer.Outgoing .my-value{display:flex}.my-dynamic-viewer.Outgoing .my-value .direction-img .outgoing{color:#fbb62c;margin:1px 5px;display:flex}.my-dynamic-viewer.Outgoing .my-value .text{margin:0 5px}.my-dynamic-viewer.Internal .my-value{display:flex}.my-dynamic-viewer.Internal .my-value .direction-img .internal{color:#3c3cf0;margin:1px 5px;display:flex}.my-dynamic-viewer.Internal .my-value .text{margin:0 5px}.my-dynamic-viewer.Incoming .my-value{display:flex}.my-dynamic-viewer.Incoming .my-value .direction-img .incoming{color:#00dca5;display:flex}.my-dynamic-viewer.Incoming .my-value .text{margin:-3px 5px 0}.my-dynamic-viewer.vertical{display:block}.my-dynamic-viewer.vertical .my-label{width:auto}.my-dynamic-viewer.vertical .my-value{width:auto}.my-dynamic-viewer.with-out-label{width:100%!important}.doc-item{display:flex;flex:1;padding-top:6px;padding-bottom:6px;justify-content:space-between;align-items:center;padding-inline-end:4px;cursor:pointer;border:1px solid;border-color:#d9dce2}.doc-item .item-content{display:flex;align-items:center;justify-content:space-between}.doc-item .file-icon{margin:4px;color:#465573;display:flex;align-items:center}.attachmentForm-container{width:100%;grid-row-gap:6px;row-gap:6px}.attachmentForm-container .formControl-wrapper{display:flex;align-items:center;justify-content:space-between;grid-column-gap:10px;column-gap:10px;padding-inline-end:5px;padding-inline-start:5px}.attachmentForm-container .formControl-wrapper .voc-form-control{width:50%}.attachmentForm-container .formControl-wrapper .textitem{width:100%}.attachmentForm-container .formControl-toggleitem{display:flex;align-items:center;justify-content:center}.btn-wrapper{display:flex;justify-content:flex-end}\n"], components: [{ type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: DynamicFormTextItemComponent, selector: "app-dynamic-form-textitem", inputs: ["autoComplete", "nativeAutoComplete", "autoComplete_pageProvider", "autoComplete_propertyName", "autoComplete_propertyKey", "autoCompleteValueKey", "autoCompleteType", "tenantId", "emitFullObject", "outsideParams", "type", "property", "label", "editable", "placeholder", "disabled", "displayEmpty", "preventSpace", "id", "maxCharsNum"] }, { type: DynamicFormVocabularyItemComponent, selector: "app-dynamic-form-vocabulary-item", inputs: ["bindValue", "bindLabel", "placeholder", "multiple", "searchable", "closeOnSelect", "hideSelectedItems", "disabled", "vocabularyType", "label", "cacheable", "shwoAllValues"], outputs: ["onSelecting"] }, { type: i8.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i6.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1.TranslatePipe } });
|
|
14649
14650
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: AttachmentsListComponent, decorators: [{
|
|
14650
14651
|
type: Component,
|
|
14651
14652
|
args: [{
|
|
@@ -14667,6 +14668,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
14667
14668
|
type: Input
|
|
14668
14669
|
}], item: [{
|
|
14669
14670
|
type: Input
|
|
14671
|
+
}], keepFileExtension: [{
|
|
14672
|
+
type: Input
|
|
14670
14673
|
}], deleteSuccess: [{
|
|
14671
14674
|
type: Output
|
|
14672
14675
|
}], documentsCount: [{
|
|
@@ -20732,10 +20735,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
20732
20735
|
args: ['fileInput']
|
|
20733
20736
|
}] } });
|
|
20734
20737
|
|
|
20735
|
-
class CreateModalComponent {
|
|
20736
|
-
constructor(data,
|
|
20738
|
+
class CreateModalComponent extends BaseDialogComponent {
|
|
20739
|
+
constructor(data, uploadMangmentService, dialogMangmentService, fileMangerService, tosterService, formBuilder, adapeter, fileManagerService, appConfService, dateHelperService, userService, environment, injector, dynamicFormService) {
|
|
20740
|
+
super(injector);
|
|
20737
20741
|
this.data = data;
|
|
20738
|
-
this.dialogRef = dialogRef;
|
|
20739
20742
|
this.uploadMangmentService = uploadMangmentService;
|
|
20740
20743
|
this.dialogMangmentService = dialogMangmentService;
|
|
20741
20744
|
this.fileMangerService = fileMangerService;
|
|
@@ -20745,9 +20748,7 @@ class CreateModalComponent {
|
|
|
20745
20748
|
this.fileManagerService = fileManagerService;
|
|
20746
20749
|
this.appConfService = appConfService;
|
|
20747
20750
|
this.dateHelperService = dateHelperService;
|
|
20748
|
-
this.translationService = translationService;
|
|
20749
20751
|
this.userService = userService;
|
|
20750
|
-
this.nuxeoService = nuxeoService;
|
|
20751
20752
|
this.environment = environment;
|
|
20752
20753
|
this.dynamicFormService = dynamicFormService;
|
|
20753
20754
|
this.addingProperties = false;
|
|
@@ -20756,37 +20757,149 @@ class CreateModalComponent {
|
|
|
20756
20757
|
this.showRenderer = false; // used to force renderer to feel changes in forms and value when changing files
|
|
20757
20758
|
// uploadFinishSubscription: Subscription;
|
|
20758
20759
|
this.usingExtraFields = false; // flage to switch between static form types
|
|
20759
|
-
this.isArabic = false;
|
|
20760
20760
|
this.showStaticForm = false;
|
|
20761
20761
|
this.disableCreateWhenFinishBtn = true;
|
|
20762
20762
|
this.creating = false;
|
|
20763
20763
|
this.displayNoteMessage = true;
|
|
20764
|
+
this.createWhenFinish = () => {
|
|
20765
|
+
this.createWhenFinishMode = true;
|
|
20766
|
+
return this.minimizDialog();
|
|
20767
|
+
};
|
|
20768
|
+
this.startAddingProperties = () => {
|
|
20769
|
+
//if starting from filemnager then i have fixed file type for all attachmetn and single dynaimc form type
|
|
20770
|
+
if (this.source === 'fileManger') {
|
|
20771
|
+
// this.dynamicFormService.getDynamicForm(this.fileType).subscribe(res => {
|
|
20772
|
+
this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.forEach((file) => {
|
|
20773
|
+
file['fileType'] = this.source === 'fileManger' ? this.fileType : {};
|
|
20774
|
+
file['dynamicForm'] = this.dialogMangmentService.storedDynamicForm;
|
|
20775
|
+
file['dynamicData'] = {};
|
|
20776
|
+
file['staticFormValid'] = this.usingExtraFields ? false : true;
|
|
20777
|
+
file['staticData'] = this.setStaticData(file.title ? file.title : file.name);
|
|
20778
|
+
file['generalValidationValid'] = true;
|
|
20779
|
+
});
|
|
20780
|
+
this.uploadMangmentService.uploadedFilesStatus.allfiles.forEach((file) => {
|
|
20781
|
+
file['fileType'] = this.source === 'fileManger' ? this.fileType : {};
|
|
20782
|
+
file['dynamicForm'] = this.dialogMangmentService.storedDynamicForm;
|
|
20783
|
+
file['dynamicData'] = {};
|
|
20784
|
+
file['staticFormValid'] = this.usingExtraFields ? false : true;
|
|
20785
|
+
file['staticData'] = this.setStaticData(file.title ? file.title : file.name);
|
|
20786
|
+
file['generalValidationValid'] = true;
|
|
20787
|
+
});
|
|
20788
|
+
}
|
|
20789
|
+
this.addingProperties = true;
|
|
20790
|
+
this.uploadMangmentService.addingPropertiesMode = true;
|
|
20791
|
+
};
|
|
20792
|
+
this.createDocument = () => {
|
|
20793
|
+
var _a, _b;
|
|
20794
|
+
this.creating = true;
|
|
20795
|
+
this.uploadMangmentService.failedFiles = [];
|
|
20796
|
+
this.uploadMangmentService.GeneralFormValidation = this.checkValidation();
|
|
20797
|
+
if (this.uploadMangmentService.GeneralFormValidation) {
|
|
20798
|
+
let apiCalls = [];
|
|
20799
|
+
if (((_a = this.data) === null || _a === void 0 ? void 0 : _a.path.includes('/default-domain/workspaces/DMSWorkspaces')) ||
|
|
20800
|
+
((_b = this.data) === null || _b === void 0 ? void 0 : _b.path.includes('/default-domain/UserWorkspaces/'))) {
|
|
20801
|
+
this.constructPayLoadToWorkSpace(this.uploadMangmentService.uploadedFilesStatus.uploadedFiles);
|
|
20802
|
+
this.payloadList.forEach((payload) => {
|
|
20803
|
+
apiCalls.push(this.fileMangerService.createFile(payload, this.fileManagerService.selectedFolderId, 'DMS.CreateDocumentFromBlob'));
|
|
20804
|
+
});
|
|
20805
|
+
}
|
|
20806
|
+
else {
|
|
20807
|
+
this.constructPayLoad(this.uploadMangmentService.uploadedFilesStatus.uploadedFiles);
|
|
20808
|
+
this.payloadList.forEach((payload) => {
|
|
20809
|
+
apiCalls.push(this.fileMangerService.createFile(payload, this.fileManagerService.selectedFolderId));
|
|
20810
|
+
});
|
|
20811
|
+
}
|
|
20812
|
+
return forkJoin(apiCalls).pipe(tap((response) => {
|
|
20813
|
+
this.creating = false;
|
|
20814
|
+
response.forEach((singleRes) => {
|
|
20815
|
+
if (singleRes['status'] && singleRes['status'] === 'failed') {
|
|
20816
|
+
this.uploadMangmentService.failedFiles.push(singleRes['originFile']);
|
|
20817
|
+
}
|
|
20818
|
+
});
|
|
20819
|
+
if (this.uploadMangmentService.failedFiles.length > 0) {
|
|
20820
|
+
this.tosterService.show('error', 'TOASTER.ERROR', 'TOASTER.UPLOAD_ERROR');
|
|
20821
|
+
this.uploadMangmentService.uploadedFilesStatus.uploadedFiles = [];
|
|
20822
|
+
this.selectedFile = null;
|
|
20823
|
+
this.uploadMangmentService.uploadedFilesStatus.allfiles = [
|
|
20824
|
+
...this.uploadMangmentService.failedFiles
|
|
20825
|
+
];
|
|
20826
|
+
}
|
|
20827
|
+
else {
|
|
20828
|
+
this.fileMangerService.onRefreshingFileManger.next();
|
|
20829
|
+
this.tosterService.show('success', 'TOASTER.SUCCESS', 'TOASTER.FILE_CREATED_SUCCE');
|
|
20830
|
+
super.close(false);
|
|
20831
|
+
this.uploadMangmentService.resetStatus();
|
|
20832
|
+
}
|
|
20833
|
+
}, (error) => {
|
|
20834
|
+
this.creating = false;
|
|
20835
|
+
}));
|
|
20836
|
+
}
|
|
20837
|
+
else {
|
|
20838
|
+
this.creating = false;
|
|
20839
|
+
return of(null);
|
|
20840
|
+
}
|
|
20841
|
+
};
|
|
20842
|
+
this.tryAgainCreateDocument = () => {
|
|
20843
|
+
this.uploadMangmentService.uploadFilesMangment(this.uploadMangmentService.failedFiles);
|
|
20844
|
+
return of(null);
|
|
20845
|
+
};
|
|
20846
|
+
this.minimizDialog = () => {
|
|
20847
|
+
super.close(true);
|
|
20848
|
+
return of(null);
|
|
20849
|
+
};
|
|
20850
|
+
this.ApplyChangesToAll = () => {
|
|
20851
|
+
this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.forEach((file) => {
|
|
20852
|
+
let title = file['staticData']
|
|
20853
|
+
? file['staticData']['title']
|
|
20854
|
+
: file.name;
|
|
20855
|
+
file['fileType'] = this.selectedFile.fileType;
|
|
20856
|
+
file['dynamicForm'] = this.selectedFile.dynamicForm;
|
|
20857
|
+
file['dynamicData'] = this.selectedFile.dynamicData;
|
|
20858
|
+
file['staticFormValid'] = this.selectedFile.staticFormValid;
|
|
20859
|
+
file['staticData'] = Object.assign({}, this.fileForm.value);
|
|
20860
|
+
file['staticData']['title'] = title;
|
|
20861
|
+
});
|
|
20862
|
+
this.uploadMangmentService.uploadedFilesStatus.allfiles.forEach((file) => {
|
|
20863
|
+
let title = file['staticData'] ? file['staticData']['title'] : file.name;
|
|
20864
|
+
file['fileType'] = this.selectedFile.fileType;
|
|
20865
|
+
file['dynamicForm'] = this.selectedFile.dynamicForm;
|
|
20866
|
+
file['dynamicData'] = this.selectedFile.dynamicData;
|
|
20867
|
+
file['staticFormValid'] = this.selectedFile.staticFormValid;
|
|
20868
|
+
file['staticData'] = Object.assign({}, this.fileForm.value);
|
|
20869
|
+
file['staticData']['title'] = title;
|
|
20870
|
+
});
|
|
20871
|
+
return of(null);
|
|
20872
|
+
};
|
|
20764
20873
|
this.myEnvironment = this.environment;
|
|
20765
20874
|
this.createWhenFinishMode = false;
|
|
20766
20875
|
this.addingProperties = this.uploadMangmentService.addingPropertiesMode;
|
|
20767
20876
|
this.fileType = this.dialogMangmentService.fileType; // object that was constructed inside subtypes service
|
|
20768
20877
|
this.source = this.dialogMangmentService.addingFrom;
|
|
20769
|
-
this.fileManagerService
|
|
20770
|
-
|
|
20771
|
-
|
|
20878
|
+
this.fileManagerService
|
|
20879
|
+
.getFileSchemas(this.fileType.type)
|
|
20880
|
+
.subscribe((schemas) => {
|
|
20881
|
+
schemas.map((item) => {
|
|
20882
|
+
if (item.name === 'generaldocument') {
|
|
20772
20883
|
this.usingExtraFields = true;
|
|
20773
20884
|
}
|
|
20774
20885
|
});
|
|
20775
20886
|
this.initiatfileForm();
|
|
20776
20887
|
this.uploadMangmentService.gettingPropFromModal({
|
|
20777
|
-
|
|
20778
|
-
|
|
20779
|
-
|
|
20780
|
-
|
|
20781
|
-
|
|
20782
|
-
|
|
20783
|
-
|
|
20888
|
+
fileType: this.source === 'fileManger' ? this.fileType : {},
|
|
20889
|
+
dynamicForm: this.dialogMangmentService.storedDynamicForm,
|
|
20890
|
+
dynamicData: {},
|
|
20891
|
+
staticFormValid: this.usingExtraFields ? false : true,
|
|
20892
|
+
generalValidationValid: true,
|
|
20893
|
+
usingExtraFields: this.usingExtraFields,
|
|
20894
|
+
path: this.data.path
|
|
20784
20895
|
});
|
|
20785
20896
|
});
|
|
20786
20897
|
}
|
|
20787
20898
|
KeyUpEvent(event) {
|
|
20788
|
-
if (this.addingProperties &&
|
|
20789
|
-
|
|
20899
|
+
if (this.addingProperties &&
|
|
20900
|
+
this.uploadMangmentService.failedFiles.length === 0) {
|
|
20901
|
+
if (this.uploadMangmentService.uploadedFilesStatus.uploadInProgress &&
|
|
20902
|
+
!this.disableCreateWhenFinishBtn) {
|
|
20790
20903
|
this.createWhenFinish();
|
|
20791
20904
|
}
|
|
20792
20905
|
else {
|
|
@@ -20795,17 +20908,16 @@ class CreateModalComponent {
|
|
|
20795
20908
|
}
|
|
20796
20909
|
}
|
|
20797
20910
|
ngOnInit() {
|
|
20798
|
-
this.langSubscription = this.translationService.isArabic.subscribe(res => {
|
|
20799
|
-
this.isArabic = res;
|
|
20800
|
-
});
|
|
20801
20911
|
if (this.uploadMangmentService.uploadFinishSubscription) {
|
|
20802
20912
|
this.uploadMangmentService.uploadFinishSubscription.unsubscribe();
|
|
20803
20913
|
}
|
|
20804
|
-
this.uploadMangmentService.uploadFinishSubscription =
|
|
20805
|
-
|
|
20806
|
-
this.
|
|
20807
|
-
|
|
20808
|
-
|
|
20914
|
+
this.uploadMangmentService.uploadFinishSubscription =
|
|
20915
|
+
this.uploadMangmentService.onUploadFinish.subscribe((res) => {
|
|
20916
|
+
if (this.createWhenFinishMode ||
|
|
20917
|
+
this.uploadMangmentService.failedFiles.length > 0) {
|
|
20918
|
+
this.createDocument();
|
|
20919
|
+
}
|
|
20920
|
+
});
|
|
20809
20921
|
}
|
|
20810
20922
|
initiatfileForm() {
|
|
20811
20923
|
if (this.usingExtraFields) {
|
|
@@ -20831,43 +20943,16 @@ class CreateModalComponent {
|
|
|
20831
20943
|
description: ['']
|
|
20832
20944
|
});
|
|
20833
20945
|
}
|
|
20834
|
-
this.staticFormFields =
|
|
20835
|
-
|
|
20836
|
-
createWhenFinish() {
|
|
20837
|
-
this.createWhenFinishMode = true;
|
|
20838
|
-
this.minimizDialog();
|
|
20946
|
+
this.staticFormFields =
|
|
20947
|
+
this.appConfService.myConfiguration.staticFormFields;
|
|
20839
20948
|
}
|
|
20840
|
-
|
|
20949
|
+
close() {
|
|
20841
20950
|
this.uploadMangmentService.GeneralFormValidation = true;
|
|
20842
20951
|
this.fileFormSubscription ? this.fileFormSubscription.unsubscribe() : '';
|
|
20843
20952
|
this.addingProperties = false;
|
|
20844
20953
|
this.uploadMangmentService.resetStatus();
|
|
20845
|
-
|
|
20846
|
-
|
|
20847
|
-
startAddingProperties() {
|
|
20848
|
-
//if starting from filemnager then i have fixed file type for all attachmetn and single dynaimc form type
|
|
20849
|
-
if (this.source === 'fileManger') {
|
|
20850
|
-
// this.dynamicFormService.getDynamicForm(this.fileType).subscribe(res => {
|
|
20851
|
-
this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.map(file => {
|
|
20852
|
-
file['fileType'] = this.source === 'fileManger' ? this.fileType : {};
|
|
20853
|
-
file['dynamicForm'] = this.dialogMangmentService.storedDynamicForm;
|
|
20854
|
-
file['dynamicData'] = {};
|
|
20855
|
-
file['staticFormValid'] = this.usingExtraFields ? false : true;
|
|
20856
|
-
file['staticData'] = this.setStaticData(file.title ? file.title : file.name);
|
|
20857
|
-
file['generalValidationValid'] = true;
|
|
20858
|
-
});
|
|
20859
|
-
this.uploadMangmentService.uploadedFilesStatus.allfiles.map(file => {
|
|
20860
|
-
file['fileType'] = this.source === 'fileManger' ? this.fileType : {};
|
|
20861
|
-
file['dynamicForm'] = this.dialogMangmentService.storedDynamicForm;
|
|
20862
|
-
file['dynamicData'] = {};
|
|
20863
|
-
file['staticFormValid'] = this.usingExtraFields ? false : true;
|
|
20864
|
-
file['staticData'] = this.setStaticData(file.title ? file.title : file.name);
|
|
20865
|
-
file['generalValidationValid'] = true;
|
|
20866
|
-
});
|
|
20867
|
-
// })
|
|
20868
|
-
}
|
|
20869
|
-
this.addingProperties = true;
|
|
20870
|
-
this.uploadMangmentService.addingPropertiesMode = true;
|
|
20954
|
+
super.close();
|
|
20955
|
+
return of(null);
|
|
20871
20956
|
}
|
|
20872
20957
|
setStaticData(title) {
|
|
20873
20958
|
if (this.usingExtraFields) {
|
|
@@ -20894,89 +20979,36 @@ class CreateModalComponent {
|
|
|
20894
20979
|
};
|
|
20895
20980
|
}
|
|
20896
20981
|
}
|
|
20897
|
-
createDocument() {
|
|
20898
|
-
var _a, _b;
|
|
20899
|
-
this.creating = true;
|
|
20900
|
-
this.uploadMangmentService.failedFiles = [];
|
|
20901
|
-
this.uploadMangmentService.GeneralFormValidation = this.checkValidation();
|
|
20902
|
-
if (this.uploadMangmentService.GeneralFormValidation) {
|
|
20903
|
-
let apiCalls = [];
|
|
20904
|
-
if (((_a = this.data) === null || _a === void 0 ? void 0 : _a.path.includes('/default-domain/workspaces/DMSWorkspaces')) || ((_b = this.data) === null || _b === void 0 ? void 0 : _b.path.includes('/default-domain/UserWorkspaces/'))) {
|
|
20905
|
-
this.constructPayLoadToWorkSpace(this.uploadMangmentService.uploadedFilesStatus.uploadedFiles);
|
|
20906
|
-
this.payloadList.map(payload => {
|
|
20907
|
-
apiCalls.push(this.fileMangerService.createFile(payload, this.fileManagerService.selectedFolderId, 'DMS.CreateDocumentFromBlob'));
|
|
20908
|
-
});
|
|
20909
|
-
}
|
|
20910
|
-
else {
|
|
20911
|
-
this.constructPayLoad(this.uploadMangmentService.uploadedFilesStatus.uploadedFiles);
|
|
20912
|
-
this.payloadList.map(payload => {
|
|
20913
|
-
apiCalls.push(this.fileMangerService.createFile(payload, this.fileManagerService.selectedFolderId));
|
|
20914
|
-
});
|
|
20915
|
-
}
|
|
20916
|
-
forkJoin(apiCalls).subscribe(response => {
|
|
20917
|
-
//console.log(res);
|
|
20918
|
-
this.creating = false;
|
|
20919
|
-
response.map(singleRes => {
|
|
20920
|
-
if (singleRes['status'] && singleRes['status'] === 'failed') {
|
|
20921
|
-
this.uploadMangmentService.failedFiles.push(singleRes['originFile']);
|
|
20922
|
-
}
|
|
20923
|
-
});
|
|
20924
|
-
if (this.uploadMangmentService.failedFiles.length > 0) {
|
|
20925
|
-
this.tosterService.show('error', 'TOASTER.ERROR', 'TOASTER.UPLOAD_ERROR');
|
|
20926
|
-
this.uploadMangmentService.uploadedFilesStatus.uploadedFiles = [];
|
|
20927
|
-
this.selectedFile = null;
|
|
20928
|
-
this.uploadMangmentService.uploadedFilesStatus.allfiles = [...this.uploadMangmentService.failedFiles];
|
|
20929
|
-
}
|
|
20930
|
-
else {
|
|
20931
|
-
this.fileMangerService.onRefreshingFileManger.next();
|
|
20932
|
-
this.tosterService.show('success', 'TOASTER.SUCCESS', "TOASTER.FILE_CREATED_SUCCE");
|
|
20933
|
-
this.dialogRef.close(false);
|
|
20934
|
-
this.uploadMangmentService.resetStatus();
|
|
20935
|
-
}
|
|
20936
|
-
}, error => {
|
|
20937
|
-
this.creating = false;
|
|
20938
|
-
// console.log(error);
|
|
20939
|
-
// this.tosterService.show('error' , 'TOASTER.ERROR' , 'TOASTER.UPLOAD_ERROR');
|
|
20940
|
-
// this.closeDialog();
|
|
20941
|
-
});
|
|
20942
|
-
}
|
|
20943
|
-
else {
|
|
20944
|
-
this.creating = false;
|
|
20945
|
-
}
|
|
20946
|
-
}
|
|
20947
20982
|
constructPayLoadToWorkSpace(files) {
|
|
20948
20983
|
this.payloadList = [];
|
|
20949
|
-
files.map(file => {
|
|
20984
|
+
files.map((file) => {
|
|
20950
20985
|
let param = {
|
|
20951
|
-
|
|
20952
|
-
|
|
20953
|
-
|
|
20954
|
-
|
|
20986
|
+
fileindex: 0,
|
|
20987
|
+
fileName: file.staticData.title,
|
|
20988
|
+
batchid: file.batch.blob['upload-batch'],
|
|
20989
|
+
description: this.fileForm.controls.description.value
|
|
20955
20990
|
};
|
|
20956
20991
|
this.payloadList.push({ params: param, originFile: file });
|
|
20957
20992
|
});
|
|
20958
20993
|
}
|
|
20959
|
-
tryAgainCreateDocument() {
|
|
20960
|
-
this.uploadMangmentService.uploadFilesMangment(this.uploadMangmentService.failedFiles);
|
|
20961
|
-
}
|
|
20962
20994
|
constructPayLoad(files) {
|
|
20963
20995
|
this.payloadList = [];
|
|
20964
|
-
files.map(file => {
|
|
20996
|
+
files.map((file) => {
|
|
20965
20997
|
let props = this.dynamicFormService.constructDynamicFormPayload(file.dynamicData.data ? file.dynamicData.data : {}, file.dynamicForm);
|
|
20966
20998
|
let staticFormData = this.mappingStaticData(file.staticData);
|
|
20967
20999
|
let param = {
|
|
20968
|
-
|
|
20969
|
-
|
|
20970
|
-
|
|
20971
|
-
|
|
20972
|
-
|
|
20973
|
-
|
|
20974
|
-
|
|
21000
|
+
document: {
|
|
21001
|
+
type: file.fileType.type,
|
|
21002
|
+
name: file.staticData.title,
|
|
21003
|
+
properties: Object.assign(Object.assign(Object.assign({}, props), staticFormData), { 'file:content': {
|
|
21004
|
+
'upload-batch': file.batch.blob['upload-batch'],
|
|
21005
|
+
'upload-fileId': file.batch.blob['upload-fileId'],
|
|
21006
|
+
'mime-type': file.type
|
|
20975
21007
|
} })
|
|
20976
21008
|
}
|
|
20977
21009
|
};
|
|
20978
21010
|
if (file.fileType.documentCode) {
|
|
20979
|
-
param[
|
|
21011
|
+
param['documentTypeCode'] = file.fileType.documentCode;
|
|
20980
21012
|
}
|
|
20981
21013
|
this.payloadList.push({ params: param, originFile: file });
|
|
20982
21014
|
});
|
|
@@ -20985,12 +21017,13 @@ class CreateModalComponent {
|
|
|
20985
21017
|
if (data.gdocumentDate && data.gdocumentDate !== null) {
|
|
20986
21018
|
moment$4.locale('en');
|
|
20987
21019
|
data['hdocumentDate'] = this.dateHelperService.gregorianToHijri(data.gdocumentDate, 'iYYYY-iMM-iDD');
|
|
20988
|
-
data.gdocumentDate =
|
|
21020
|
+
data.gdocumentDate =
|
|
21021
|
+
moment$4(data.gdocumentDate).format('YYYY-MM-DDT00:00:00.000') + 'Z';
|
|
20989
21022
|
}
|
|
20990
21023
|
return this.adapeter.adaptOut(data, this.staticFormFields);
|
|
20991
21024
|
}
|
|
20992
21025
|
selectFile(file) {
|
|
20993
|
-
console.log(
|
|
21026
|
+
console.log('file in select', file);
|
|
20994
21027
|
this.showStaticForm = false;
|
|
20995
21028
|
this.agencyNameFilter = undefined;
|
|
20996
21029
|
this.countryNameFilter = undefined;
|
|
@@ -21002,8 +21035,13 @@ class CreateModalComponent {
|
|
|
21002
21035
|
this.showRenderer = false;
|
|
21003
21036
|
// check if file has properties of adding properties or not then add it to him
|
|
21004
21037
|
if (!file.hasOwnProperty('fileType')) {
|
|
21005
|
-
this.dynamicFormService
|
|
21006
|
-
|
|
21038
|
+
this.dynamicFormService
|
|
21039
|
+
.getDynamicForm(this.fileType.documentCode
|
|
21040
|
+
? this.fileType.documentCode
|
|
21041
|
+
: this.fileType.type)
|
|
21042
|
+
.subscribe((res) => {
|
|
21043
|
+
file['fileType'] =
|
|
21044
|
+
this.source === 'fileManger' ? this.fileType : {};
|
|
21007
21045
|
file['dynamicForm'] = res;
|
|
21008
21046
|
file['dynamicData'] = {};
|
|
21009
21047
|
file['staticFormValid'] = this.usingExtraFields ? false : true;
|
|
@@ -21015,7 +21053,8 @@ class CreateModalComponent {
|
|
|
21015
21053
|
}
|
|
21016
21054
|
this.fileForm.patchValue(this.selectedFile['staticData']);
|
|
21017
21055
|
this.temporaryDyanmicData = {};
|
|
21018
|
-
this.temporaryDyanmicData = this.selectedFile.dynamicData.data
|
|
21056
|
+
this.temporaryDyanmicData = this.selectedFile.dynamicData.data
|
|
21057
|
+
? Object.assign({}, this.selectedFile.dynamicData.data) : {};
|
|
21019
21058
|
setTimeout(() => {
|
|
21020
21059
|
this.showRenderer = true;
|
|
21021
21060
|
this.showStaticForm = true;
|
|
@@ -21023,12 +21062,19 @@ class CreateModalComponent {
|
|
|
21023
21062
|
//console.log(file);
|
|
21024
21063
|
if (!this.fileFormSubscription) {
|
|
21025
21064
|
setTimeout(() => {
|
|
21026
|
-
this.fileFormSubscription =
|
|
21027
|
-
this.
|
|
21028
|
-
|
|
21029
|
-
|
|
21065
|
+
this.fileFormSubscription =
|
|
21066
|
+
this.fileForm.valueChanges.subscribe((res) => {
|
|
21067
|
+
this.selectedFile.staticFormValid = this.fileForm
|
|
21068
|
+
? this.fileForm.valid
|
|
21069
|
+
: false;
|
|
21070
|
+
this.selectedFile.staticData = this.fileForm
|
|
21071
|
+
? this.fileForm.value
|
|
21072
|
+
: {};
|
|
21073
|
+
});
|
|
21030
21074
|
if (this.fileForm.get('agencyCategoryCode')) {
|
|
21031
|
-
this.agencyCategCodeSubscription = this.fileForm
|
|
21075
|
+
this.agencyCategCodeSubscription = this.fileForm
|
|
21076
|
+
.get('agencyCategoryCode')
|
|
21077
|
+
.valueChanges.subscribe((res) => {
|
|
21032
21078
|
this.fileForm.get('agencyName').setValue(null);
|
|
21033
21079
|
this.agencyNameFilter = {
|
|
21034
21080
|
category: res
|
|
@@ -21036,7 +21082,9 @@ class CreateModalComponent {
|
|
|
21036
21082
|
});
|
|
21037
21083
|
}
|
|
21038
21084
|
if (this.fileForm.get('countryCategoryCode')) {
|
|
21039
|
-
this.countryCategCodeSubscription = this.fileForm
|
|
21085
|
+
this.countryCategCodeSubscription = this.fileForm
|
|
21086
|
+
.get('countryCategoryCode')
|
|
21087
|
+
.valueChanges.subscribe((res) => {
|
|
21040
21088
|
this.fileForm.get('countryName').setValue(null);
|
|
21041
21089
|
this.countryNameFilter = {
|
|
21042
21090
|
category: res
|
|
@@ -21064,19 +21112,27 @@ class CreateModalComponent {
|
|
|
21064
21112
|
};
|
|
21065
21113
|
}
|
|
21066
21114
|
this.temporaryDyanmicData = {};
|
|
21067
|
-
this.temporaryDyanmicData = this.selectedFile.dynamicData.data
|
|
21115
|
+
this.temporaryDyanmicData = this.selectedFile.dynamicData.data
|
|
21116
|
+
? this.selectedFile.dynamicData.data
|
|
21117
|
+
: {};
|
|
21068
21118
|
setTimeout(() => {
|
|
21069
21119
|
this.showRenderer = true;
|
|
21070
21120
|
this.showStaticForm = true;
|
|
21071
21121
|
}, 200);
|
|
21072
21122
|
if (!this.fileFormSubscription) {
|
|
21073
21123
|
setTimeout(() => {
|
|
21074
|
-
this.fileFormSubscription = this.fileForm.valueChanges.subscribe(res => {
|
|
21075
|
-
this.selectedFile.staticFormValid = this.fileForm
|
|
21076
|
-
|
|
21124
|
+
this.fileFormSubscription = this.fileForm.valueChanges.subscribe((res) => {
|
|
21125
|
+
this.selectedFile.staticFormValid = this.fileForm
|
|
21126
|
+
? this.fileForm.valid
|
|
21127
|
+
: false;
|
|
21128
|
+
this.selectedFile.staticData = this.fileForm
|
|
21129
|
+
? this.fileForm.value
|
|
21130
|
+
: {};
|
|
21077
21131
|
});
|
|
21078
21132
|
if (this.fileForm.get('agencyCategoryCode')) {
|
|
21079
|
-
this.agencyCategCodeSubscription = this.fileForm
|
|
21133
|
+
this.agencyCategCodeSubscription = this.fileForm
|
|
21134
|
+
.get('agencyCategoryCode')
|
|
21135
|
+
.valueChanges.subscribe((res) => {
|
|
21080
21136
|
this.fileForm.get('agencyName').setValue(null);
|
|
21081
21137
|
this.agencyNameFilter = {
|
|
21082
21138
|
category: res
|
|
@@ -21084,7 +21140,9 @@ class CreateModalComponent {
|
|
|
21084
21140
|
});
|
|
21085
21141
|
}
|
|
21086
21142
|
if (this.fileForm.get('countryCategoryCode')) {
|
|
21087
|
-
this.countryCategCodeSubscription = this.fileForm
|
|
21143
|
+
this.countryCategCodeSubscription = this.fileForm
|
|
21144
|
+
.get('countryCategoryCode')
|
|
21145
|
+
.valueChanges.subscribe((res) => {
|
|
21088
21146
|
this.fileForm.get('countryName').setValue(null);
|
|
21089
21147
|
this.countryNameFilter = {
|
|
21090
21148
|
category: res
|
|
@@ -21106,11 +21164,8 @@ class CreateModalComponent {
|
|
|
21106
21164
|
this.selectedFile.dynamicData = Object.assign({}, dynamicData);
|
|
21107
21165
|
}
|
|
21108
21166
|
}
|
|
21109
|
-
minimizDialog() {
|
|
21110
|
-
this.dialogRef.close(true);
|
|
21111
|
-
}
|
|
21112
21167
|
removeItem(item, listofFiles) {
|
|
21113
|
-
const removeIndex = listofFiles.findIndex(file => file.name === item.name);
|
|
21168
|
+
const removeIndex = listofFiles.findIndex((file) => file.name === item.name);
|
|
21114
21169
|
listofFiles.splice(removeIndex, 1);
|
|
21115
21170
|
if (item.name === this.selectedFile.name) {
|
|
21116
21171
|
if (this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.length > 0) {
|
|
@@ -21122,32 +21177,14 @@ class CreateModalComponent {
|
|
|
21122
21177
|
// this.selectedFile = null;
|
|
21123
21178
|
}
|
|
21124
21179
|
}
|
|
21125
|
-
ApplyChangesToAll() {
|
|
21126
|
-
this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.map(file => {
|
|
21127
|
-
let title = file['staticData'] ? file['staticData']['title'] : file.name;
|
|
21128
|
-
file['fileType'] = this.selectedFile.fileType;
|
|
21129
|
-
file['dynamicForm'] = this.selectedFile.dynamicForm;
|
|
21130
|
-
file['dynamicData'] = this.selectedFile.dynamicData;
|
|
21131
|
-
file['staticFormValid'] = this.selectedFile.staticFormValid;
|
|
21132
|
-
file['staticData'] = Object.assign({}, this.fileForm.value);
|
|
21133
|
-
file['staticData']['title'] = title;
|
|
21134
|
-
});
|
|
21135
|
-
this.uploadMangmentService.uploadedFilesStatus.allfiles.map(file => {
|
|
21136
|
-
let title = file['staticData'] ? file['staticData']['title'] : file.name;
|
|
21137
|
-
file['fileType'] = this.selectedFile.fileType;
|
|
21138
|
-
file['dynamicForm'] = this.selectedFile.dynamicForm;
|
|
21139
|
-
file['dynamicData'] = this.selectedFile.dynamicData;
|
|
21140
|
-
file['staticFormValid'] = this.selectedFile.staticFormValid;
|
|
21141
|
-
file['staticData'] = Object.assign({}, this.fileForm.value);
|
|
21142
|
-
file['staticData']['title'] = title;
|
|
21143
|
-
});
|
|
21144
|
-
}
|
|
21145
21180
|
checkValidation() {
|
|
21146
21181
|
let validation = true;
|
|
21147
|
-
this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.
|
|
21182
|
+
this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.forEach((file) => {
|
|
21148
21183
|
var _a, _b;
|
|
21149
|
-
console.log(
|
|
21150
|
-
if (!file.hasOwnProperty('fileType') ||
|
|
21184
|
+
console.log('file', file);
|
|
21185
|
+
if (!file.hasOwnProperty('fileType') ||
|
|
21186
|
+
file['staticFormValid'] === false ||
|
|
21187
|
+
((_b = (_a = file.dynamicData) === null || _a === void 0 ? void 0 : _a.originalEvent) === null || _b === void 0 ? void 0 : _b.isValid) === false) {
|
|
21151
21188
|
file['generalValidationValid'] = false;
|
|
21152
21189
|
validation = false;
|
|
21153
21190
|
}
|
|
@@ -21155,9 +21192,10 @@ class CreateModalComponent {
|
|
|
21155
21192
|
file['generalValidationValid'] = true;
|
|
21156
21193
|
}
|
|
21157
21194
|
});
|
|
21158
|
-
this.uploadMangmentService.uploadedFilesStatus.allfiles.map(file => {
|
|
21195
|
+
this.uploadMangmentService.uploadedFilesStatus.allfiles.map((file) => {
|
|
21159
21196
|
var _a, _b;
|
|
21160
|
-
if (file['staticFormValid'] === false ||
|
|
21197
|
+
if (file['staticFormValid'] === false ||
|
|
21198
|
+
((_b = (_a = file.dynamicData) === null || _a === void 0 ? void 0 : _a.originalEvent) === null || _b === void 0 ? void 0 : _b.isValid) === false) {
|
|
21161
21199
|
file['generalValidationValid'] = false;
|
|
21162
21200
|
validation = false;
|
|
21163
21201
|
}
|
|
@@ -21169,13 +21207,16 @@ class CreateModalComponent {
|
|
|
21169
21207
|
}
|
|
21170
21208
|
ngOnDestroy() {
|
|
21171
21209
|
this.fileFormSubscription ? this.fileFormSubscription.unsubscribe() : '';
|
|
21172
|
-
this.
|
|
21173
|
-
|
|
21174
|
-
|
|
21210
|
+
this.countryCategCodeSubscription
|
|
21211
|
+
? this.countryCategCodeSubscription.unsubscribe()
|
|
21212
|
+
: '';
|
|
21213
|
+
this.agencyCategCodeSubscription
|
|
21214
|
+
? this.agencyCategCodeSubscription.unsubscribe()
|
|
21215
|
+
: '';
|
|
21175
21216
|
}
|
|
21176
21217
|
}
|
|
21177
|
-
CreateModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CreateModalComponent, deps: [{ token: MAT_DIALOG_DATA }, { token:
|
|
21178
|
-
CreateModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CreateModalComponent, selector: "app-create-modal", host: { listeners: { "document:keyup.enter": "KeyUpEvent($event)" } }, ngImport: i0, template: "<div class=\"relative w-full h-full\">\r\n <div class=\"iner-wrapper\" [ngClass]=\"{ 'd-flex': addingProperties }\">\r\n <div *ngIf=\"addingProperties\" class=\"properties-section p-3 overflow-x-hidden overflow-y-auto\">\r\n <div class=\"\" *ngIf=\"selectedFile && source === 'fileManger' && showStaticForm\">\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\">{{ 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\">\r\n <!-- -----------------old static form ---------------------- -->\r\n <div>\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 class=\"\r\n field-style\r\n \" formControlName=\"title\" placeholder=\" {{ 'CREATE.TITLE' | translate}}\" />\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 class=\"field-style\" formControlName=\"description\"\r\n placeholder=\" {{ 'CREATE.DESCRIPTION' | translate}}\" />\r\n </div>\r\n </div>\r\n <!-- ---------------------------------- -->\r\n\r\n <!------------------ new statis form ---------------------------->\r\n <div *ngIf=\"usingExtraFields\">\r\n <app-dynamic-fields-renderer [form]=\"fileForm\" [agencyNameFilter]=\"agencyNameFilter\"\r\n [countryNameFilter]=\"countryNameFilter\"></app-dynamic-fields-renderer>\r\n </div>\r\n </form>\r\n\r\n <div class=\"dynamic-part\" *ngIf=\"showRenderer\">\r\n <app-dynamic-form [form]=\"selectedFile.dynamicForm\" [data]=\"temporaryDyanmicData\"\r\n (change)=\"ondynamicFormChange($event)\"></app-dynamic-form>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"\r\n w-full\r\n h-full\r\n p-3\r\n flex\r\n justify-center\r\n items-center\r\n text-lg text-gray-900\"\r\n *ngIf=\"!selectedFile\">\r\n {{ \"CREATE.SELECT_TOSTART_ADDING\" | translate }}\r\n </div>\r\n \r\n </div>\r\n <div class=\"attachment-tab-body overflow-hidden\" [ngClass]=\"{ 'attachment-iner-small-body': addingProperties }\">\r\n <app-attachments [multiple]=\"true\" (onSelectingItem)=\"selectFile($event)\"></app-attachments>\r\n </div>\r\n </div>\r\n <div class=\"w-full text-red-500 text-base text-start px-3\" *ngIf=\"!uploadMangmentService.GeneralFormValidation\">\r\n\r\n {{ \"CREATE.FILL_REQUIRED_FIELD\" | translate }}\r\n </div>\r\n <div class=\"actions-iner-wrapper w-full flex justify-between items-center absolute bottom-0\">\r\n <div class=\"flex\">\r\n <button *ngIf=\"\r\n (uploadMangmentService.uploadedFilesStatus\r\n .uploadInProgress ||\r\n uploadMangmentService.uploadedFilesStatus.uploadedFiles\r\n .length > 0) &&\r\n !addingProperties\r\n \" (click)=\"startAddingProperties()\" class=\"submission-button\">\r\n {{ \"BUTTONS.ADD_PROPERTIES\" | translate }}\r\n </button>\r\n <button *ngIf=\"\r\n addingProperties &&\r\n uploadMangmentService.uploadedFilesStatus.uploadedFiles\r\n .length +\r\n uploadMangmentService.uploadedFilesStatus.allfiles\r\n .length >\r\n 1\r\n \" (click)=\"ApplyChangesToAll()\" [disabled]=\"!selectedFile || !selectedFile.staticFormValid\" [ngClass]=\"{\r\n 'opacity-30 cursor-not-allowed':\r\n !selectedFile || !selectedFile.staticFormValid,\r\n 'cursor-pointer hover:text-white hover:bg-gray-900': !(\r\n !selectedFile || !selectedFile.staticFormValid\r\n )\r\n }\" class=\"submission-button mx-2\">\r\n {{ \"BUTTONS.APPLY_TO_ALL\" | translate }}\r\n </button>\r\n\r\n <ng-container *ngIf=\"\r\n addingProperties &&\r\n !uploadMangmentService.uploadedFilesStatus.uploadInProgress &&\r\n uploadMangmentService.failedFiles.length === 0\r\n \">\r\n <button (click)=\"createDocument()\" class=\"submission-button relative\" [disabled]=\"creating\">\r\n <span *ngIf=\"!creating; else loader\">{{ \"BUTTONS.CREATE\" | translate }}</span>\r\n </button>\r\n <ng-template #loader>\r\n <mat-spinner [value]=\"90\" [strokeWidth]=\"3\" overlay=\"true\" [diameter]=\"25\" color=\"warn\">\r\n </mat-spinner>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <button *ngIf=\"\r\n addingProperties &&\r\n !uploadMangmentService.uploadedFilesStatus.uploadInProgress &&\r\n uploadMangmentService.failedFiles.length > 0\r\n \" (click)=\"tryAgainCreateDocument()\" class=\"submission-button\">\r\n {{ \"BUTTONS.TRY_AGAIN\" | translate }}\r\n </button>\r\n\r\n <button [disabled]=\"!fileForm?.valid || disableCreateWhenFinishBtn\" *ngIf=\"\r\n addingProperties &&\r\n uploadMangmentService.uploadedFilesStatus.uploadInProgress\r\n \" (click)=\"createWhenFinish()\" class=\"submission-button w-44\">\r\n {{ \"BUTTONS.CREATE_WHEN_FINSH\" | translate }}\r\n </button>\r\n </div>\r\n <div class=\"flex\">\r\n <button class=\"cancelation-button mx-2\" (click)=\"minimizDialog()\" *ngIf=\"\r\n uploadMangmentService.uploadedFilesStatus\r\n .uploadInProgress ||\r\n uploadMangmentService.uploadedFilesStatus\r\n .numberOfUploadedFiles !== 0 ||\r\n addingProperties\r\n \">\r\n {{ \"BUTTONS.MINIMIZED\" | translate }}\r\n </button>\r\n <button class=\"cancelation-button\" (click)=\"closeDialog()\">\r\n {{ \"BUTTONS.CANCEL\" | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>", styles: [".dynamic-part{margin-left:-15px;margin-right:-15px}.iner-wrapper{height:calc(100% - 70px)}.iner-wrapper .properties-section{width:calc(100% - 270px);height:calc(100% - 15px)}.iner-wrapper .attachment-tab-body{height:calc(100% - -20px);overflow-y:auto;overflow-x:hidden}.iner-wrapper .attachment-iner-small-body{width:350px}.rtl .actions-iner-wrapper{direction:ltr}.actions-iner-wrapper{direction:rtl}\n"], components: [{ type: DynamicFieldsRendererComponent, selector: "app-dynamic-fields-renderer", inputs: ["form", "agencyNameFilter", "countryNameFilter", "mode", "fields"] }, { type: DynamicFormComponent, selector: "app-dynamic-form", inputs: ["form", "data", "readOnly"], outputs: ["change"] }, { type: AttachmentsComponent, selector: "app-attachments", inputs: ["allowedTypes", "params", "path", "maxSize", "docParams", "multiple", "createDocument", "allowedMaxNumberOfFiles", "source"], outputs: ["uploadSuccess", "uploadError", "onSelectingItem", "itemRemoved"] }, { type: i8.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: SetRtlDirective, selector: "[SetRtl]" }, { type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i6.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1.TranslatePipe } });
|
|
21218
|
+
CreateModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CreateModalComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: UploadManagmentService }, { token: DialogMangmentService }, { token: FileManagerService }, { token: CustomToastrService }, { token: i6.FormBuilder }, { token: AdapterService }, { token: FileManagerService }, { token: AppConfigService }, { token: DateHelperService }, { token: UserService }, { token: 'environment' }, { token: i0.Injector }, { token: DynamicFormService }], target: i0.ɵɵFactoryTarget.Component });
|
|
21219
|
+
CreateModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CreateModalComponent, selector: "app-create-modal", host: { listeners: { "document:keyup.enter": "KeyUpEvent($event)" } }, usesInheritance: true, ngImport: i0, template: "<ndf-nuxeo-dialog dialogTitle=\"{{ 'CREATE.createFile' | translate }}\">\r\n\t<ng-template #contentTemplate>\r\n\t\t<div class=\"relative w-full h-full\">\r\n\t\t\t<div class=\"iner-wrapper\" [ngClass]=\"{ 'd-flex': addingProperties }\">\r\n\t\t\t\t<div\r\n\t\t\t\t\t*ngIf=\"addingProperties\"\r\n\t\t\t\t\tclass=\"properties-section p-3 overflow-x-hidden overflow-y-auto\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\tclass=\"\"\r\n\t\t\t\t\t\t*ngIf=\"selectedFile && source === 'fileManger' && showStaticForm\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<div class=\"mb-5\">\r\n\t\t\t\t\t\t\t<div class=\"label-style\">\r\n\t\t\t\t\t\t\t\t{{ 'CREATE.FILE_TYPE' | translate }}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div class=\"text-base text-gray-900\">\r\n\t\t\t\t\t\t\t\t{{ isArabic ? fileType.arabicText : fileType.englishText }}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"file-fields mt-3\" SetRtl>\r\n\t\t\t\t\t\t\t<form [formGroup]=\"fileForm\">\r\n\t\t\t\t\t\t\t\t<!-- -----------------old static form ---------------------- -->\r\n\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"single-field mb-3\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"label-style\">\r\n\t\t\t\t\t\t\t\t\t\t\t{{ 'CREATE.TITLE' | translate\r\n\t\t\t\t\t\t\t\t\t\t\t}}<span class=\"text-red-500\">*</span>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t\t\t\tclass=\"field-style\"\r\n\t\t\t\t\t\t\t\t\t\t\tformControlName=\"title\"\r\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\" {{ 'CREATE.TITLE' | translate }}\"\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"single-field mb-3\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"label-style\">\r\n\t\t\t\t\t\t\t\t\t\t\t{{ 'CREATE.DESCRIPTION' | translate }}\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t\t\t\tclass=\"field-style\"\r\n\t\t\t\t\t\t\t\t\t\t\tformControlName=\"description\"\r\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\" {{ 'CREATE.DESCRIPTION' | translate }}\"\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<!-- ---------------------------------- -->\r\n\r\n\t\t\t\t\t\t\t\t<!------------------ new statis form ---------------------------->\r\n\t\t\t\t\t\t\t\t<div *ngIf=\"usingExtraFields\">\r\n\t\t\t\t\t\t\t\t\t<app-dynamic-fields-renderer\r\n\t\t\t\t\t\t\t\t\t\t[form]=\"fileForm\"\r\n\t\t\t\t\t\t\t\t\t\t[agencyNameFilter]=\"agencyNameFilter\"\r\n\t\t\t\t\t\t\t\t\t\t[countryNameFilter]=\"countryNameFilter\"\r\n\t\t\t\t\t\t\t\t\t></app-dynamic-fields-renderer>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</form>\r\n\r\n\t\t\t\t\t\t\t<div class=\"dynamic-part\" *ngIf=\"showRenderer\">\r\n\t\t\t\t\t\t\t\t<app-dynamic-form\r\n\t\t\t\t\t\t\t\t\t[form]=\"selectedFile.dynamicForm\"\r\n\t\t\t\t\t\t\t\t\t[data]=\"temporaryDyanmicData\"\r\n\t\t\t\t\t\t\t\t\t(change)=\"ondynamicFormChange($event)\"\r\n\t\t\t\t\t\t\t\t></app-dynamic-form>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\tclass=\"w-full h-full p-3 flex justify-center items-center text-lg text-gray-900\"\r\n\t\t\t\t\t\t*ngIf=\"!selectedFile\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{{ 'CREATE.SELECT_TOSTART_ADDING' | translate }}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div\r\n\t\t\t\t\tclass=\"attachment-tab-body overflow-hidden\"\r\n\t\t\t\t\t[ngClass]=\"{ 'attachment-iner-small-body': addingProperties }\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<app-attachments\r\n\t\t\t\t\t\t[multiple]=\"true\"\r\n\t\t\t\t\t\t(onSelectingItem)=\"selectFile($event)\"\r\n\t\t\t\t\t></app-attachments>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"w-full text-red-500 text-base text-start px-3\"\r\n\t\t\t\t*ngIf=\"!uploadMangmentService.GeneralFormValidation\"\r\n\t\t\t>\r\n\t\t\t\t{{ 'CREATE.FILL_REQUIRED_FIELD' | translate }}\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t<ng-template #actionsTemplate let-dialog=\"dialog\">\r\n\t\t<!-- WAS_IN_FLEX_DIV -->\r\n\t\t<button\r\n\t\t\t*ngIf=\"\r\n\t\t\t\t(uploadMangmentService.uploadedFilesStatus.uploadInProgress ||\r\n\t\t\t\t\tuploadMangmentService.uploadedFilesStatus.uploadedFiles.length > 0) &&\r\n\t\t\t\t!addingProperties\r\n\t\t\t\"\r\n\t\t\t(click)=\"dialog.executeAction(startAddingProperties)\"\r\n\t\t\tclass=\"submission-button\"\r\n\t\t>\r\n\t\t\t{{ 'BUTTONS.ADD_PROPERTIES' | translate }}\r\n\t\t</button>\r\n\t\t<button\r\n\t\t\t*ngIf=\"\r\n\t\t\t\taddingProperties &&\r\n\t\t\t\tuploadMangmentService.uploadedFilesStatus.uploadedFiles.length +\r\n\t\t\t\t\tuploadMangmentService.uploadedFilesStatus.allfiles.length >\r\n\t\t\t\t\t1\r\n\t\t\t\"\r\n\t\t\t(click)=\"dialog.executeAction(ApplyChangesToAll)\"\r\n\t\t\t[disabled]=\"!selectedFile || !selectedFile.staticFormValid\"\r\n\t\t\t[ngClass]=\"{\r\n\t\t\t\t'opacity-30 cursor-not-allowed':\r\n\t\t\t\t\t!selectedFile || !selectedFile.staticFormValid,\r\n\t\t\t\t'cursor-pointer hover:text-white hover:bg-gray-900': !(\r\n\t\t\t\t\t!selectedFile || !selectedFile.staticFormValid\r\n\t\t\t\t)\r\n\t\t\t}\"\r\n\t\t\tclass=\"submission-button mx-2\"\r\n\t\t>\r\n\t\t\t{{ 'BUTTONS.APPLY_TO_ALL' | translate }}\r\n\t\t</button>\r\n\t\t<!-- WAS_IN_FLEX_DIV -->\r\n\r\n\t\t<ng-container\r\n\t\t\t*ngIf=\"\r\n\t\t\t\taddingProperties &&\r\n\t\t\t\t!uploadMangmentService.uploadedFilesStatus.uploadInProgress &&\r\n\t\t\t\tuploadMangmentService.failedFiles.length === 0\r\n\t\t\t\"\r\n\t\t>\r\n\t\t\t<button\r\n\t\t\t\t(click)=\"dialog.executeAction(createDocument)\"\r\n\t\t\t\tclass=\"submission-button relative\"\r\n\t\t\t\t[disabled]=\"creating\"\r\n\t\t\t>\r\n\t\t\t\t<span *ngIf=\"!creating; else loader\">{{\r\n\t\t\t\t\t'BUTTONS.CREATE' | translate\r\n\t\t\t\t}}</span>\r\n\t\t\t</button>\r\n\t\t\t<ng-template #loader>\r\n\t\t\t\t<mat-spinner\r\n\t\t\t\t\t[value]=\"90\"\r\n\t\t\t\t\t[strokeWidth]=\"3\"\r\n\t\t\t\t\toverlay=\"true\"\r\n\t\t\t\t\t[diameter]=\"25\"\r\n\t\t\t\t\tcolor=\"warn\"\r\n\t\t\t\t>\r\n\t\t\t\t</mat-spinner>\r\n\t\t\t</ng-template>\r\n\t\t</ng-container>\r\n\r\n\t\t<button\r\n\t\t\t*ngIf=\"\r\n\t\t\t\taddingProperties &&\r\n\t\t\t\t!uploadMangmentService.uploadedFilesStatus.uploadInProgress &&\r\n\t\t\t\tuploadMangmentService.failedFiles.length > 0\r\n\t\t\t\"\r\n\t\t\t(click)=\"dialog.executeAction(tryAgainCreateDocument)\"\r\n\t\t\tclass=\"submission-button\"\r\n\t\t>\r\n\t\t\t{{ 'BUTTONS.TRY_AGAIN' | translate }}\r\n\t\t</button>\r\n\r\n\t\t<button\r\n\t\t\t[disabled]=\"!fileForm?.valid || disableCreateWhenFinishBtn\"\r\n\t\t\t*ngIf=\"\r\n\t\t\t\taddingProperties &&\r\n\t\t\t\tuploadMangmentService.uploadedFilesStatus.uploadInProgress\r\n\t\t\t\"\r\n\t\t\t(click)=\"dialog.executeAction(createWhenFinish)\"\r\n\t\t\tclass=\"submission-button w-44\"\r\n\t\t>\r\n\t\t\t{{ 'BUTTONS.CREATE_WHEN_FINSH' | translate }}\r\n\t\t</button>\r\n\r\n\t\t<!-- WAS_IN_FLEX_DIV -->\r\n\t\t<button\r\n\t\t\tclass=\"cancelation-button mx-2\"\r\n\t\t\t(click)=\"dialog.executeAction(minimizDialog)\"\r\n\t\t\t*ngIf=\"\r\n\t\t\t\tuploadMangmentService.uploadedFilesStatus.uploadInProgress ||\r\n\t\t\t\tuploadMangmentService.uploadedFilesStatus.numberOfUploadedFiles !== 0 ||\r\n\t\t\t\taddingProperties\r\n\t\t\t\"\r\n\t\t>\r\n\t\t\t{{ 'BUTTONS.MINIMIZED' | translate }}\r\n\t\t</button>\r\n\t\t<!-- <button class=\"cancelation-button\" (click)=\" dialog.executeAction(closeDialog)\">\r\n{{ 'BUTTONS.CANCEL' | translate }}\r\n</button> -->\r\n\t</ng-template>\r\n</ndf-nuxeo-dialog>\r\n", styles: [".dynamic-part{margin-left:-15px;margin-right:-15px}.iner-wrapper{height:calc(100% - 70px)}.iner-wrapper .properties-section{width:calc(100% - 270px);height:calc(100% - 15px)}.iner-wrapper .attachment-tab-body{height:calc(100% - -20px);overflow-y:auto;overflow-x:hidden}.iner-wrapper .attachment-iner-small-body{width:350px}.rtl .actions-iner-wrapper{direction:ltr}.actions-iner-wrapper{direction:rtl}:host{height:100%;display:block}\n"], components: [{ type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: ["dialogTitle", "subTitle", "loaderMode"] }, { type: DynamicFieldsRendererComponent, selector: "app-dynamic-fields-renderer", inputs: ["form", "agencyNameFilter", "countryNameFilter", "mode", "fields"] }, { type: DynamicFormComponent, selector: "app-dynamic-form", inputs: ["form", "data", "readOnly"], outputs: ["change"] }, { type: AttachmentsComponent, selector: "app-attachments", inputs: ["allowedTypes", "params", "path", "maxSize", "docParams", "multiple", "createDocument", "allowedMaxNumberOfFiles", "source"], outputs: ["uploadSuccess", "uploadError", "onSelectingItem", "itemRemoved"] }, { type: i8.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: SetRtlDirective, selector: "[SetRtl]" }, { type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i6.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1.TranslatePipe } });
|
|
21179
21220
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CreateModalComponent, decorators: [{
|
|
21180
21221
|
type: Component,
|
|
21181
21222
|
args: [{
|
|
@@ -21186,10 +21227,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
21186
21227
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
21187
21228
|
type: Inject,
|
|
21188
21229
|
args: [MAT_DIALOG_DATA]
|
|
21189
|
-
}] }, { type:
|
|
21230
|
+
}] }, { type: UploadManagmentService }, { type: DialogMangmentService }, { type: FileManagerService }, { type: CustomToastrService }, { type: i6.FormBuilder }, { type: AdapterService }, { type: FileManagerService }, { type: AppConfigService }, { type: DateHelperService }, { type: UserService }, { type: undefined, decorators: [{
|
|
21190
21231
|
type: Inject,
|
|
21191
21232
|
args: ['environment']
|
|
21192
|
-
}] }, { type: DynamicFormService }]; }, propDecorators: { KeyUpEvent: [{
|
|
21233
|
+
}] }, { type: i0.Injector }, { type: DynamicFormService }]; }, propDecorators: { KeyUpEvent: [{
|
|
21193
21234
|
type: HostListener,
|
|
21194
21235
|
args: ['document:keyup.enter', ['$event']]
|
|
21195
21236
|
}] } });
|
|
@@ -26607,7 +26648,8 @@ FileMangerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
26607
26648
|
FormsModule,
|
|
26608
26649
|
DisplaySuitableIconModule,
|
|
26609
26650
|
MatProgressBarModule,
|
|
26610
|
-
MatCheckboxModule
|
|
26651
|
+
MatCheckboxModule,
|
|
26652
|
+
NuxeoDialogModule], exports: [SidepanelComponent,
|
|
26611
26653
|
CopyComponent,
|
|
26612
26654
|
DeleteComponent,
|
|
26613
26655
|
MoveComponent,
|
|
@@ -26677,7 +26719,8 @@ FileMangerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versio
|
|
|
26677
26719
|
FormsModule,
|
|
26678
26720
|
DisplaySuitableIconModule,
|
|
26679
26721
|
MatProgressBarModule,
|
|
26680
|
-
MatCheckboxModule
|
|
26722
|
+
MatCheckboxModule,
|
|
26723
|
+
NuxeoDialogModule
|
|
26681
26724
|
], DxPopupModule,
|
|
26682
26725
|
DxScrollViewModule,
|
|
26683
26726
|
DxiToolbarItemModule,
|
|
@@ -26708,7 +26751,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
26708
26751
|
TemplateModalComponent,
|
|
26709
26752
|
UpdateModalComponent,
|
|
26710
26753
|
ClipboardComponent,
|
|
26711
|
-
FileGridInfiniteScrollDirective
|
|
26754
|
+
FileGridInfiniteScrollDirective
|
|
26712
26755
|
],
|
|
26713
26756
|
imports: [
|
|
26714
26757
|
CommonModule,
|
|
@@ -26753,7 +26796,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
26753
26796
|
FormsModule,
|
|
26754
26797
|
DisplaySuitableIconModule,
|
|
26755
26798
|
MatProgressBarModule,
|
|
26756
|
-
MatCheckboxModule
|
|
26799
|
+
MatCheckboxModule,
|
|
26800
|
+
NuxeoDialogModule
|
|
26757
26801
|
],
|
|
26758
26802
|
exports: [
|
|
26759
26803
|
SidepanelComponent,
|
|
@@ -26782,7 +26826,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
26782
26826
|
DxFormModule,
|
|
26783
26827
|
DxTreeViewModule,
|
|
26784
26828
|
ClipboardComponent,
|
|
26785
|
-
FileGridInfiniteScrollDirective
|
|
26829
|
+
FileGridInfiniteScrollDirective
|
|
26786
26830
|
]
|
|
26787
26831
|
}]
|
|
26788
26832
|
}] });
|