nuxeo-development-framework 4.1.0 → 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 +248 -211
- 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/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 +226 -185
- package/fesm2015/nuxeo-development-framework.js.map +1 -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: [{
|
|
@@ -20735,10 +20735,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
20735
20735
|
args: ['fileInput']
|
|
20736
20736
|
}] } });
|
|
20737
20737
|
|
|
20738
|
-
class CreateModalComponent {
|
|
20739
|
-
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);
|
|
20740
20741
|
this.data = data;
|
|
20741
|
-
this.dialogRef = dialogRef;
|
|
20742
20742
|
this.uploadMangmentService = uploadMangmentService;
|
|
20743
20743
|
this.dialogMangmentService = dialogMangmentService;
|
|
20744
20744
|
this.fileMangerService = fileMangerService;
|
|
@@ -20748,9 +20748,7 @@ class CreateModalComponent {
|
|
|
20748
20748
|
this.fileManagerService = fileManagerService;
|
|
20749
20749
|
this.appConfService = appConfService;
|
|
20750
20750
|
this.dateHelperService = dateHelperService;
|
|
20751
|
-
this.translationService = translationService;
|
|
20752
20751
|
this.userService = userService;
|
|
20753
|
-
this.nuxeoService = nuxeoService;
|
|
20754
20752
|
this.environment = environment;
|
|
20755
20753
|
this.dynamicFormService = dynamicFormService;
|
|
20756
20754
|
this.addingProperties = false;
|
|
@@ -20759,37 +20757,149 @@ class CreateModalComponent {
|
|
|
20759
20757
|
this.showRenderer = false; // used to force renderer to feel changes in forms and value when changing files
|
|
20760
20758
|
// uploadFinishSubscription: Subscription;
|
|
20761
20759
|
this.usingExtraFields = false; // flage to switch between static form types
|
|
20762
|
-
this.isArabic = false;
|
|
20763
20760
|
this.showStaticForm = false;
|
|
20764
20761
|
this.disableCreateWhenFinishBtn = true;
|
|
20765
20762
|
this.creating = false;
|
|
20766
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
|
+
};
|
|
20767
20873
|
this.myEnvironment = this.environment;
|
|
20768
20874
|
this.createWhenFinishMode = false;
|
|
20769
20875
|
this.addingProperties = this.uploadMangmentService.addingPropertiesMode;
|
|
20770
20876
|
this.fileType = this.dialogMangmentService.fileType; // object that was constructed inside subtypes service
|
|
20771
20877
|
this.source = this.dialogMangmentService.addingFrom;
|
|
20772
|
-
this.fileManagerService
|
|
20773
|
-
|
|
20774
|
-
|
|
20878
|
+
this.fileManagerService
|
|
20879
|
+
.getFileSchemas(this.fileType.type)
|
|
20880
|
+
.subscribe((schemas) => {
|
|
20881
|
+
schemas.map((item) => {
|
|
20882
|
+
if (item.name === 'generaldocument') {
|
|
20775
20883
|
this.usingExtraFields = true;
|
|
20776
20884
|
}
|
|
20777
20885
|
});
|
|
20778
20886
|
this.initiatfileForm();
|
|
20779
20887
|
this.uploadMangmentService.gettingPropFromModal({
|
|
20780
|
-
|
|
20781
|
-
|
|
20782
|
-
|
|
20783
|
-
|
|
20784
|
-
|
|
20785
|
-
|
|
20786
|
-
|
|
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
|
|
20787
20895
|
});
|
|
20788
20896
|
});
|
|
20789
20897
|
}
|
|
20790
20898
|
KeyUpEvent(event) {
|
|
20791
|
-
if (this.addingProperties &&
|
|
20792
|
-
|
|
20899
|
+
if (this.addingProperties &&
|
|
20900
|
+
this.uploadMangmentService.failedFiles.length === 0) {
|
|
20901
|
+
if (this.uploadMangmentService.uploadedFilesStatus.uploadInProgress &&
|
|
20902
|
+
!this.disableCreateWhenFinishBtn) {
|
|
20793
20903
|
this.createWhenFinish();
|
|
20794
20904
|
}
|
|
20795
20905
|
else {
|
|
@@ -20798,17 +20908,16 @@ class CreateModalComponent {
|
|
|
20798
20908
|
}
|
|
20799
20909
|
}
|
|
20800
20910
|
ngOnInit() {
|
|
20801
|
-
this.langSubscription = this.translationService.isArabic.subscribe(res => {
|
|
20802
|
-
this.isArabic = res;
|
|
20803
|
-
});
|
|
20804
20911
|
if (this.uploadMangmentService.uploadFinishSubscription) {
|
|
20805
20912
|
this.uploadMangmentService.uploadFinishSubscription.unsubscribe();
|
|
20806
20913
|
}
|
|
20807
|
-
this.uploadMangmentService.uploadFinishSubscription =
|
|
20808
|
-
|
|
20809
|
-
this.
|
|
20810
|
-
|
|
20811
|
-
|
|
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
|
+
});
|
|
20812
20921
|
}
|
|
20813
20922
|
initiatfileForm() {
|
|
20814
20923
|
if (this.usingExtraFields) {
|
|
@@ -20834,43 +20943,16 @@ class CreateModalComponent {
|
|
|
20834
20943
|
description: ['']
|
|
20835
20944
|
});
|
|
20836
20945
|
}
|
|
20837
|
-
this.staticFormFields =
|
|
20838
|
-
|
|
20839
|
-
createWhenFinish() {
|
|
20840
|
-
this.createWhenFinishMode = true;
|
|
20841
|
-
this.minimizDialog();
|
|
20946
|
+
this.staticFormFields =
|
|
20947
|
+
this.appConfService.myConfiguration.staticFormFields;
|
|
20842
20948
|
}
|
|
20843
|
-
|
|
20949
|
+
close() {
|
|
20844
20950
|
this.uploadMangmentService.GeneralFormValidation = true;
|
|
20845
20951
|
this.fileFormSubscription ? this.fileFormSubscription.unsubscribe() : '';
|
|
20846
20952
|
this.addingProperties = false;
|
|
20847
20953
|
this.uploadMangmentService.resetStatus();
|
|
20848
|
-
|
|
20849
|
-
|
|
20850
|
-
startAddingProperties() {
|
|
20851
|
-
//if starting from filemnager then i have fixed file type for all attachmetn and single dynaimc form type
|
|
20852
|
-
if (this.source === 'fileManger') {
|
|
20853
|
-
// this.dynamicFormService.getDynamicForm(this.fileType).subscribe(res => {
|
|
20854
|
-
this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.map(file => {
|
|
20855
|
-
file['fileType'] = this.source === 'fileManger' ? this.fileType : {};
|
|
20856
|
-
file['dynamicForm'] = this.dialogMangmentService.storedDynamicForm;
|
|
20857
|
-
file['dynamicData'] = {};
|
|
20858
|
-
file['staticFormValid'] = this.usingExtraFields ? false : true;
|
|
20859
|
-
file['staticData'] = this.setStaticData(file.title ? file.title : file.name);
|
|
20860
|
-
file['generalValidationValid'] = true;
|
|
20861
|
-
});
|
|
20862
|
-
this.uploadMangmentService.uploadedFilesStatus.allfiles.map(file => {
|
|
20863
|
-
file['fileType'] = this.source === 'fileManger' ? this.fileType : {};
|
|
20864
|
-
file['dynamicForm'] = this.dialogMangmentService.storedDynamicForm;
|
|
20865
|
-
file['dynamicData'] = {};
|
|
20866
|
-
file['staticFormValid'] = this.usingExtraFields ? false : true;
|
|
20867
|
-
file['staticData'] = this.setStaticData(file.title ? file.title : file.name);
|
|
20868
|
-
file['generalValidationValid'] = true;
|
|
20869
|
-
});
|
|
20870
|
-
// })
|
|
20871
|
-
}
|
|
20872
|
-
this.addingProperties = true;
|
|
20873
|
-
this.uploadMangmentService.addingPropertiesMode = true;
|
|
20954
|
+
super.close();
|
|
20955
|
+
return of(null);
|
|
20874
20956
|
}
|
|
20875
20957
|
setStaticData(title) {
|
|
20876
20958
|
if (this.usingExtraFields) {
|
|
@@ -20897,89 +20979,36 @@ class CreateModalComponent {
|
|
|
20897
20979
|
};
|
|
20898
20980
|
}
|
|
20899
20981
|
}
|
|
20900
|
-
createDocument() {
|
|
20901
|
-
var _a, _b;
|
|
20902
|
-
this.creating = true;
|
|
20903
|
-
this.uploadMangmentService.failedFiles = [];
|
|
20904
|
-
this.uploadMangmentService.GeneralFormValidation = this.checkValidation();
|
|
20905
|
-
if (this.uploadMangmentService.GeneralFormValidation) {
|
|
20906
|
-
let apiCalls = [];
|
|
20907
|
-
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/'))) {
|
|
20908
|
-
this.constructPayLoadToWorkSpace(this.uploadMangmentService.uploadedFilesStatus.uploadedFiles);
|
|
20909
|
-
this.payloadList.map(payload => {
|
|
20910
|
-
apiCalls.push(this.fileMangerService.createFile(payload, this.fileManagerService.selectedFolderId, 'DMS.CreateDocumentFromBlob'));
|
|
20911
|
-
});
|
|
20912
|
-
}
|
|
20913
|
-
else {
|
|
20914
|
-
this.constructPayLoad(this.uploadMangmentService.uploadedFilesStatus.uploadedFiles);
|
|
20915
|
-
this.payloadList.map(payload => {
|
|
20916
|
-
apiCalls.push(this.fileMangerService.createFile(payload, this.fileManagerService.selectedFolderId));
|
|
20917
|
-
});
|
|
20918
|
-
}
|
|
20919
|
-
forkJoin(apiCalls).subscribe(response => {
|
|
20920
|
-
//console.log(res);
|
|
20921
|
-
this.creating = false;
|
|
20922
|
-
response.map(singleRes => {
|
|
20923
|
-
if (singleRes['status'] && singleRes['status'] === 'failed') {
|
|
20924
|
-
this.uploadMangmentService.failedFiles.push(singleRes['originFile']);
|
|
20925
|
-
}
|
|
20926
|
-
});
|
|
20927
|
-
if (this.uploadMangmentService.failedFiles.length > 0) {
|
|
20928
|
-
this.tosterService.show('error', 'TOASTER.ERROR', 'TOASTER.UPLOAD_ERROR');
|
|
20929
|
-
this.uploadMangmentService.uploadedFilesStatus.uploadedFiles = [];
|
|
20930
|
-
this.selectedFile = null;
|
|
20931
|
-
this.uploadMangmentService.uploadedFilesStatus.allfiles = [...this.uploadMangmentService.failedFiles];
|
|
20932
|
-
}
|
|
20933
|
-
else {
|
|
20934
|
-
this.fileMangerService.onRefreshingFileManger.next();
|
|
20935
|
-
this.tosterService.show('success', 'TOASTER.SUCCESS', "TOASTER.FILE_CREATED_SUCCE");
|
|
20936
|
-
this.dialogRef.close(false);
|
|
20937
|
-
this.uploadMangmentService.resetStatus();
|
|
20938
|
-
}
|
|
20939
|
-
}, error => {
|
|
20940
|
-
this.creating = false;
|
|
20941
|
-
// console.log(error);
|
|
20942
|
-
// this.tosterService.show('error' , 'TOASTER.ERROR' , 'TOASTER.UPLOAD_ERROR');
|
|
20943
|
-
// this.closeDialog();
|
|
20944
|
-
});
|
|
20945
|
-
}
|
|
20946
|
-
else {
|
|
20947
|
-
this.creating = false;
|
|
20948
|
-
}
|
|
20949
|
-
}
|
|
20950
20982
|
constructPayLoadToWorkSpace(files) {
|
|
20951
20983
|
this.payloadList = [];
|
|
20952
|
-
files.map(file => {
|
|
20984
|
+
files.map((file) => {
|
|
20953
20985
|
let param = {
|
|
20954
|
-
|
|
20955
|
-
|
|
20956
|
-
|
|
20957
|
-
|
|
20986
|
+
fileindex: 0,
|
|
20987
|
+
fileName: file.staticData.title,
|
|
20988
|
+
batchid: file.batch.blob['upload-batch'],
|
|
20989
|
+
description: this.fileForm.controls.description.value
|
|
20958
20990
|
};
|
|
20959
20991
|
this.payloadList.push({ params: param, originFile: file });
|
|
20960
20992
|
});
|
|
20961
20993
|
}
|
|
20962
|
-
tryAgainCreateDocument() {
|
|
20963
|
-
this.uploadMangmentService.uploadFilesMangment(this.uploadMangmentService.failedFiles);
|
|
20964
|
-
}
|
|
20965
20994
|
constructPayLoad(files) {
|
|
20966
20995
|
this.payloadList = [];
|
|
20967
|
-
files.map(file => {
|
|
20996
|
+
files.map((file) => {
|
|
20968
20997
|
let props = this.dynamicFormService.constructDynamicFormPayload(file.dynamicData.data ? file.dynamicData.data : {}, file.dynamicForm);
|
|
20969
20998
|
let staticFormData = this.mappingStaticData(file.staticData);
|
|
20970
20999
|
let param = {
|
|
20971
|
-
|
|
20972
|
-
|
|
20973
|
-
|
|
20974
|
-
|
|
20975
|
-
|
|
20976
|
-
|
|
20977
|
-
|
|
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
|
|
20978
21007
|
} })
|
|
20979
21008
|
}
|
|
20980
21009
|
};
|
|
20981
21010
|
if (file.fileType.documentCode) {
|
|
20982
|
-
param[
|
|
21011
|
+
param['documentTypeCode'] = file.fileType.documentCode;
|
|
20983
21012
|
}
|
|
20984
21013
|
this.payloadList.push({ params: param, originFile: file });
|
|
20985
21014
|
});
|
|
@@ -20988,12 +21017,13 @@ class CreateModalComponent {
|
|
|
20988
21017
|
if (data.gdocumentDate && data.gdocumentDate !== null) {
|
|
20989
21018
|
moment$4.locale('en');
|
|
20990
21019
|
data['hdocumentDate'] = this.dateHelperService.gregorianToHijri(data.gdocumentDate, 'iYYYY-iMM-iDD');
|
|
20991
|
-
data.gdocumentDate =
|
|
21020
|
+
data.gdocumentDate =
|
|
21021
|
+
moment$4(data.gdocumentDate).format('YYYY-MM-DDT00:00:00.000') + 'Z';
|
|
20992
21022
|
}
|
|
20993
21023
|
return this.adapeter.adaptOut(data, this.staticFormFields);
|
|
20994
21024
|
}
|
|
20995
21025
|
selectFile(file) {
|
|
20996
|
-
console.log(
|
|
21026
|
+
console.log('file in select', file);
|
|
20997
21027
|
this.showStaticForm = false;
|
|
20998
21028
|
this.agencyNameFilter = undefined;
|
|
20999
21029
|
this.countryNameFilter = undefined;
|
|
@@ -21005,8 +21035,13 @@ class CreateModalComponent {
|
|
|
21005
21035
|
this.showRenderer = false;
|
|
21006
21036
|
// check if file has properties of adding properties or not then add it to him
|
|
21007
21037
|
if (!file.hasOwnProperty('fileType')) {
|
|
21008
|
-
this.dynamicFormService
|
|
21009
|
-
|
|
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 : {};
|
|
21010
21045
|
file['dynamicForm'] = res;
|
|
21011
21046
|
file['dynamicData'] = {};
|
|
21012
21047
|
file['staticFormValid'] = this.usingExtraFields ? false : true;
|
|
@@ -21018,7 +21053,8 @@ class CreateModalComponent {
|
|
|
21018
21053
|
}
|
|
21019
21054
|
this.fileForm.patchValue(this.selectedFile['staticData']);
|
|
21020
21055
|
this.temporaryDyanmicData = {};
|
|
21021
|
-
this.temporaryDyanmicData = this.selectedFile.dynamicData.data
|
|
21056
|
+
this.temporaryDyanmicData = this.selectedFile.dynamicData.data
|
|
21057
|
+
? Object.assign({}, this.selectedFile.dynamicData.data) : {};
|
|
21022
21058
|
setTimeout(() => {
|
|
21023
21059
|
this.showRenderer = true;
|
|
21024
21060
|
this.showStaticForm = true;
|
|
@@ -21026,12 +21062,19 @@ class CreateModalComponent {
|
|
|
21026
21062
|
//console.log(file);
|
|
21027
21063
|
if (!this.fileFormSubscription) {
|
|
21028
21064
|
setTimeout(() => {
|
|
21029
|
-
this.fileFormSubscription =
|
|
21030
|
-
this.
|
|
21031
|
-
|
|
21032
|
-
|
|
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
|
+
});
|
|
21033
21074
|
if (this.fileForm.get('agencyCategoryCode')) {
|
|
21034
|
-
this.agencyCategCodeSubscription = this.fileForm
|
|
21075
|
+
this.agencyCategCodeSubscription = this.fileForm
|
|
21076
|
+
.get('agencyCategoryCode')
|
|
21077
|
+
.valueChanges.subscribe((res) => {
|
|
21035
21078
|
this.fileForm.get('agencyName').setValue(null);
|
|
21036
21079
|
this.agencyNameFilter = {
|
|
21037
21080
|
category: res
|
|
@@ -21039,7 +21082,9 @@ class CreateModalComponent {
|
|
|
21039
21082
|
});
|
|
21040
21083
|
}
|
|
21041
21084
|
if (this.fileForm.get('countryCategoryCode')) {
|
|
21042
|
-
this.countryCategCodeSubscription = this.fileForm
|
|
21085
|
+
this.countryCategCodeSubscription = this.fileForm
|
|
21086
|
+
.get('countryCategoryCode')
|
|
21087
|
+
.valueChanges.subscribe((res) => {
|
|
21043
21088
|
this.fileForm.get('countryName').setValue(null);
|
|
21044
21089
|
this.countryNameFilter = {
|
|
21045
21090
|
category: res
|
|
@@ -21067,19 +21112,27 @@ class CreateModalComponent {
|
|
|
21067
21112
|
};
|
|
21068
21113
|
}
|
|
21069
21114
|
this.temporaryDyanmicData = {};
|
|
21070
|
-
this.temporaryDyanmicData = this.selectedFile.dynamicData.data
|
|
21115
|
+
this.temporaryDyanmicData = this.selectedFile.dynamicData.data
|
|
21116
|
+
? this.selectedFile.dynamicData.data
|
|
21117
|
+
: {};
|
|
21071
21118
|
setTimeout(() => {
|
|
21072
21119
|
this.showRenderer = true;
|
|
21073
21120
|
this.showStaticForm = true;
|
|
21074
21121
|
}, 200);
|
|
21075
21122
|
if (!this.fileFormSubscription) {
|
|
21076
21123
|
setTimeout(() => {
|
|
21077
|
-
this.fileFormSubscription = this.fileForm.valueChanges.subscribe(res => {
|
|
21078
|
-
this.selectedFile.staticFormValid = this.fileForm
|
|
21079
|
-
|
|
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
|
+
: {};
|
|
21080
21131
|
});
|
|
21081
21132
|
if (this.fileForm.get('agencyCategoryCode')) {
|
|
21082
|
-
this.agencyCategCodeSubscription = this.fileForm
|
|
21133
|
+
this.agencyCategCodeSubscription = this.fileForm
|
|
21134
|
+
.get('agencyCategoryCode')
|
|
21135
|
+
.valueChanges.subscribe((res) => {
|
|
21083
21136
|
this.fileForm.get('agencyName').setValue(null);
|
|
21084
21137
|
this.agencyNameFilter = {
|
|
21085
21138
|
category: res
|
|
@@ -21087,7 +21140,9 @@ class CreateModalComponent {
|
|
|
21087
21140
|
});
|
|
21088
21141
|
}
|
|
21089
21142
|
if (this.fileForm.get('countryCategoryCode')) {
|
|
21090
|
-
this.countryCategCodeSubscription = this.fileForm
|
|
21143
|
+
this.countryCategCodeSubscription = this.fileForm
|
|
21144
|
+
.get('countryCategoryCode')
|
|
21145
|
+
.valueChanges.subscribe((res) => {
|
|
21091
21146
|
this.fileForm.get('countryName').setValue(null);
|
|
21092
21147
|
this.countryNameFilter = {
|
|
21093
21148
|
category: res
|
|
@@ -21109,11 +21164,8 @@ class CreateModalComponent {
|
|
|
21109
21164
|
this.selectedFile.dynamicData = Object.assign({}, dynamicData);
|
|
21110
21165
|
}
|
|
21111
21166
|
}
|
|
21112
|
-
minimizDialog() {
|
|
21113
|
-
this.dialogRef.close(true);
|
|
21114
|
-
}
|
|
21115
21167
|
removeItem(item, listofFiles) {
|
|
21116
|
-
const removeIndex = listofFiles.findIndex(file => file.name === item.name);
|
|
21168
|
+
const removeIndex = listofFiles.findIndex((file) => file.name === item.name);
|
|
21117
21169
|
listofFiles.splice(removeIndex, 1);
|
|
21118
21170
|
if (item.name === this.selectedFile.name) {
|
|
21119
21171
|
if (this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.length > 0) {
|
|
@@ -21125,32 +21177,14 @@ class CreateModalComponent {
|
|
|
21125
21177
|
// this.selectedFile = null;
|
|
21126
21178
|
}
|
|
21127
21179
|
}
|
|
21128
|
-
ApplyChangesToAll() {
|
|
21129
|
-
this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.map(file => {
|
|
21130
|
-
let title = file['staticData'] ? file['staticData']['title'] : file.name;
|
|
21131
|
-
file['fileType'] = this.selectedFile.fileType;
|
|
21132
|
-
file['dynamicForm'] = this.selectedFile.dynamicForm;
|
|
21133
|
-
file['dynamicData'] = this.selectedFile.dynamicData;
|
|
21134
|
-
file['staticFormValid'] = this.selectedFile.staticFormValid;
|
|
21135
|
-
file['staticData'] = Object.assign({}, this.fileForm.value);
|
|
21136
|
-
file['staticData']['title'] = title;
|
|
21137
|
-
});
|
|
21138
|
-
this.uploadMangmentService.uploadedFilesStatus.allfiles.map(file => {
|
|
21139
|
-
let title = file['staticData'] ? file['staticData']['title'] : file.name;
|
|
21140
|
-
file['fileType'] = this.selectedFile.fileType;
|
|
21141
|
-
file['dynamicForm'] = this.selectedFile.dynamicForm;
|
|
21142
|
-
file['dynamicData'] = this.selectedFile.dynamicData;
|
|
21143
|
-
file['staticFormValid'] = this.selectedFile.staticFormValid;
|
|
21144
|
-
file['staticData'] = Object.assign({}, this.fileForm.value);
|
|
21145
|
-
file['staticData']['title'] = title;
|
|
21146
|
-
});
|
|
21147
|
-
}
|
|
21148
21180
|
checkValidation() {
|
|
21149
21181
|
let validation = true;
|
|
21150
|
-
this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.
|
|
21182
|
+
this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.forEach((file) => {
|
|
21151
21183
|
var _a, _b;
|
|
21152
|
-
console.log(
|
|
21153
|
-
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) {
|
|
21154
21188
|
file['generalValidationValid'] = false;
|
|
21155
21189
|
validation = false;
|
|
21156
21190
|
}
|
|
@@ -21158,9 +21192,10 @@ class CreateModalComponent {
|
|
|
21158
21192
|
file['generalValidationValid'] = true;
|
|
21159
21193
|
}
|
|
21160
21194
|
});
|
|
21161
|
-
this.uploadMangmentService.uploadedFilesStatus.allfiles.map(file => {
|
|
21195
|
+
this.uploadMangmentService.uploadedFilesStatus.allfiles.map((file) => {
|
|
21162
21196
|
var _a, _b;
|
|
21163
|
-
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) {
|
|
21164
21199
|
file['generalValidationValid'] = false;
|
|
21165
21200
|
validation = false;
|
|
21166
21201
|
}
|
|
@@ -21172,13 +21207,16 @@ class CreateModalComponent {
|
|
|
21172
21207
|
}
|
|
21173
21208
|
ngOnDestroy() {
|
|
21174
21209
|
this.fileFormSubscription ? this.fileFormSubscription.unsubscribe() : '';
|
|
21175
|
-
this.
|
|
21176
|
-
|
|
21177
|
-
|
|
21210
|
+
this.countryCategCodeSubscription
|
|
21211
|
+
? this.countryCategCodeSubscription.unsubscribe()
|
|
21212
|
+
: '';
|
|
21213
|
+
this.agencyCategCodeSubscription
|
|
21214
|
+
? this.agencyCategCodeSubscription.unsubscribe()
|
|
21215
|
+
: '';
|
|
21178
21216
|
}
|
|
21179
21217
|
}
|
|
21180
|
-
CreateModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CreateModalComponent, deps: [{ token: MAT_DIALOG_DATA }, { token:
|
|
21181
|
-
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 } });
|
|
21182
21220
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CreateModalComponent, decorators: [{
|
|
21183
21221
|
type: Component,
|
|
21184
21222
|
args: [{
|
|
@@ -21189,10 +21227,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
21189
21227
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
21190
21228
|
type: Inject,
|
|
21191
21229
|
args: [MAT_DIALOG_DATA]
|
|
21192
|
-
}] }, { 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: [{
|
|
21193
21231
|
type: Inject,
|
|
21194
21232
|
args: ['environment']
|
|
21195
|
-
}] }, { type: DynamicFormService }]; }, propDecorators: { KeyUpEvent: [{
|
|
21233
|
+
}] }, { type: i0.Injector }, { type: DynamicFormService }]; }, propDecorators: { KeyUpEvent: [{
|
|
21196
21234
|
type: HostListener,
|
|
21197
21235
|
args: ['document:keyup.enter', ['$event']]
|
|
21198
21236
|
}] } });
|
|
@@ -26610,7 +26648,8 @@ FileMangerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
26610
26648
|
FormsModule,
|
|
26611
26649
|
DisplaySuitableIconModule,
|
|
26612
26650
|
MatProgressBarModule,
|
|
26613
|
-
MatCheckboxModule
|
|
26651
|
+
MatCheckboxModule,
|
|
26652
|
+
NuxeoDialogModule], exports: [SidepanelComponent,
|
|
26614
26653
|
CopyComponent,
|
|
26615
26654
|
DeleteComponent,
|
|
26616
26655
|
MoveComponent,
|
|
@@ -26680,7 +26719,8 @@ FileMangerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versio
|
|
|
26680
26719
|
FormsModule,
|
|
26681
26720
|
DisplaySuitableIconModule,
|
|
26682
26721
|
MatProgressBarModule,
|
|
26683
|
-
MatCheckboxModule
|
|
26722
|
+
MatCheckboxModule,
|
|
26723
|
+
NuxeoDialogModule
|
|
26684
26724
|
], DxPopupModule,
|
|
26685
26725
|
DxScrollViewModule,
|
|
26686
26726
|
DxiToolbarItemModule,
|
|
@@ -26711,7 +26751,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
26711
26751
|
TemplateModalComponent,
|
|
26712
26752
|
UpdateModalComponent,
|
|
26713
26753
|
ClipboardComponent,
|
|
26714
|
-
FileGridInfiniteScrollDirective
|
|
26754
|
+
FileGridInfiniteScrollDirective
|
|
26715
26755
|
],
|
|
26716
26756
|
imports: [
|
|
26717
26757
|
CommonModule,
|
|
@@ -26756,7 +26796,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
26756
26796
|
FormsModule,
|
|
26757
26797
|
DisplaySuitableIconModule,
|
|
26758
26798
|
MatProgressBarModule,
|
|
26759
|
-
MatCheckboxModule
|
|
26799
|
+
MatCheckboxModule,
|
|
26800
|
+
NuxeoDialogModule
|
|
26760
26801
|
],
|
|
26761
26802
|
exports: [
|
|
26762
26803
|
SidepanelComponent,
|
|
@@ -26785,7 +26826,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
26785
26826
|
DxFormModule,
|
|
26786
26827
|
DxTreeViewModule,
|
|
26787
26828
|
ClipboardComponent,
|
|
26788
|
-
FileGridInfiniteScrollDirective
|
|
26829
|
+
FileGridInfiniteScrollDirective
|
|
26789
26830
|
]
|
|
26790
26831
|
}]
|
|
26791
26832
|
}] });
|