nuxeo-development-framework 0.6.6 → 0.7.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.
@@ -7717,6 +7717,21 @@ class TagsApiService {
7717
7717
  throw err;
7718
7718
  }));
7719
7719
  }
7720
+ // adding tags and sending data in params not in body
7721
+ addingTagsWithParams(documentId, tags, apiName) {
7722
+ let params = {
7723
+ tags: tags.toString(),
7724
+ };
7725
+ return from(this.nuxeoService.nuxeoClient
7726
+ .operation(apiName, {
7727
+ url: `${this.environment.nuxeo}${this.environment.customAutomation}`,
7728
+ })
7729
+ .params(Object.assign({}, params))
7730
+ .input(documentId)
7731
+ .execute()).pipe(catchError((err) => {
7732
+ throw err;
7733
+ }));
7734
+ }
7720
7735
  deleteTagsToCorrespondence(correspondenceId, tag) {
7721
7736
  return from(this.nuxeoService.nuxeoClient
7722
7737
  .operation('AC_UA_Correspondence_Tag_Delete', {
@@ -7730,6 +7745,20 @@ class TagsApiService {
7730
7745
  throw err;
7731
7746
  }));
7732
7747
  }
7748
+ deleteTagWithParams(correspondenceId, tag, apiName) {
7749
+ let params = {
7750
+ tags: tag,
7751
+ };
7752
+ return from(this.nuxeoService.nuxeoClient
7753
+ .operation(apiName, {
7754
+ url: `${this.environment.nuxeo}${this.environment.customAutomation}`,
7755
+ })
7756
+ .input(correspondenceId)
7757
+ .params(Object.assign({}, params))
7758
+ .execute()).pipe(catchError((err) => {
7759
+ throw err;
7760
+ }));
7761
+ }
7733
7762
  tagsSuggestion(term) {
7734
7763
  return from(this.nuxeoService.nuxeoClient
7735
7764
  .operation('Tag.Suggestion', {
@@ -10245,11 +10274,7 @@ class DocumentsListComponent {
10245
10274
  }
10246
10275
  else {
10247
10276
  this.documentsApi.getDocument(docId).subscribe((file) => {
10248
- this.documentSelect.emit({
10249
- urlFileContent: file.properties.content.data,
10250
- docId: '' + docId,
10251
- title: file.title,
10252
- });
10277
+ this.documentSelect.emit(file);
10253
10278
  }, (error) => {
10254
10279
  console.error(error);
10255
10280
  this.toastr
@@ -16354,6 +16379,7 @@ class CorrespondenceTagsComponent {
16354
16379
  this.nuxeoService = nuxeoService;
16355
16380
  this.removable = false;
16356
16381
  this.loading = false;
16382
+ this.useParams = false;
16357
16383
  this.tagsFrom = new FormGroup({
16358
16384
  tag: new FormControl(null, Validators.required),
16359
16385
  });
@@ -16368,27 +16394,49 @@ class CorrespondenceTagsComponent {
16368
16394
  addTag() {
16369
16395
  this.loading = true;
16370
16396
  if (this.tagsFrom.valid) {
16371
- this.tagsApiService
16372
- .addTagsToCorrespondence(this.correspondenceId, this.tagsFrom.value.tag)
16373
- .subscribe((res) => {
16374
- this.loading = false;
16375
- this.tagsApiService.getUpdatedFile.next(); // add > service -> vwer sub updae
16376
- this.removable = !this.removable;
16377
- }, (err) => {
16378
- this.loading = false;
16379
- });
16397
+ if (this.useParams) {
16398
+ this.tagsApiService
16399
+ .addingTagsWithParams(this.correspondenceId, this.tagsFrom.value.tag, this.addCustomApiName)
16400
+ .subscribe((res) => {
16401
+ this.loading = false;
16402
+ this.tagsApiService.getUpdatedFile.next(); // add > service -> vwer sub updae
16403
+ this.removable = !this.removable;
16404
+ }, (err) => {
16405
+ this.loading = false;
16406
+ });
16407
+ }
16408
+ else {
16409
+ this.tagsApiService
16410
+ .addTagsToCorrespondence(this.correspondenceId, this.tagsFrom.value.tag)
16411
+ .subscribe((res) => {
16412
+ this.loading = false;
16413
+ this.tagsApiService.getUpdatedFile.next(); // add > service -> vwer sub updae
16414
+ this.removable = !this.removable;
16415
+ }, (err) => {
16416
+ this.loading = false;
16417
+ });
16418
+ }
16380
16419
  }
16381
16420
  }
16382
16421
  deleteTag(tagId) {
16383
- this.tagsApiService
16384
- .deleteTagsToCorrespondence(this.correspondenceId, tagId)
16385
- .subscribe((res) => {
16386
- this.tagsApiService.getUpdatedFile.next();
16387
- }, (err) => { });
16422
+ if (this.useParams) {
16423
+ this.tagsApiService
16424
+ .deleteTagWithParams(this.correspondenceId, tagId, this.deleteCustomApiName)
16425
+ .subscribe((res) => {
16426
+ this.tagsApiService.getUpdatedFile.next();
16427
+ }, (err) => { });
16428
+ }
16429
+ else {
16430
+ this.tagsApiService
16431
+ .deleteTagsToCorrespondence(this.correspondenceId, tagId)
16432
+ .subscribe((res) => {
16433
+ this.tagsApiService.getUpdatedFile.next();
16434
+ }, (err) => { });
16435
+ }
16388
16436
  }
16389
16437
  }
16390
16438
  CorrespondenceTagsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: CorrespondenceTagsComponent, deps: [{ token: TagsApiService }, { token: NuxeoService$1 }], target: i0.ɵɵFactoryTarget.Component });
16391
- CorrespondenceTagsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: CorrespondenceTagsComponent, selector: "cts-correspondence-tags", inputs: { correspondence: "correspondence", customClass: "customClass" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"{{customClass}}\">\r\n <div class=\"tags-header\">\r\n <div class=\"tag-header-title\">{{ \"Tags.tags\" | translate }}</div>\r\n <div\r\n \r\n class=\"allowEdit-tag-btn\"\r\n *permission=\"{ name: 'addTag', entity: correspondence, user: nuxeoService.nuxeoClient.user }\"\r\n (click)=\"removable = !removable\"\r\n >\r\n <span class=\"bi bi-plus-lg detailed-menu\" [matTooltip]=\"'Tags.toolTip' | translate\" *ngIf=\"!removable\"></span>\r\n <span class=\"tags-close-icon bi bi-x detailed-menu\" [matTooltip]=\"'Tags.Close' | translate\" *ngIf=\"removable\"></span>\r\n </div>\r\n </div>\r\n <div class=\"tags-wrapper\">\r\n <ng-container *ngIf=\"removable\">\r\n <div class=\"add-tag-container\">\r\n <div class=\"tag-form-container\">\r\n <form [formGroup]=\"tagsFrom\">\r\n <cts-dynamic-form-select-tag formControlName=\"tag\">\r\n </cts-dynamic-form-select-tag>\r\n </form>\r\n </div>\r\n <div class=\"add-tag-btn\">\r\n <cts-button\r\n [disabled]=\"this.tagsFrom.invalid\"\r\n [loading]=\"loading\"\r\n (onClick)=\"addTag()\"\r\n class=\"detailed-menu\"\r\n >{{ \"BUTTONS.ADD\" | translate }}</cts-button\r\n >\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"tagsList.length > 0; else noEntry\">\r\n <div class=\"tags-list-container row\">\r\n <mat-chip-list *ngFor=\"let tag of tagsList\">\r\n <mat-chip [removable]=\"removable\" (removed)=\"deleteTag(tag)\"\r\n >{{ tag }} <mat-icon matChipRemove *ngIf=\"removable\">cancel</mat-icon>\r\n </mat-chip>\r\n </mat-chip-list>\r\n </div>\r\n </ng-container>\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #noEntry>\r\n <cts-no-data [message]=\"'Tags.noEntry'\" [border]=\"false\"></cts-no-data>\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}.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.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.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}.tags-header{display:flex;justify-content:space-between;align-items:center;font-weight:bold;font-size:14px}.tags-header .allowEdit-tag-btn{cursor:pointer}.tags-header .allowEdit-tag-btn span{color:#1a96c6;font-size:18px}.tags-header .allowEdit-tag-btn .tags-close-icon{display:flex;font-size:30px}.tags-wrapper{padding:5px 16px;border:1px solid #d9dce2;display:flex;flex-direction:column;grid-row-gap:8px;row-gap:8px}.tags-wrapper .add-tag-container{display:flex;justify-content:space-between;grid-column-gap:6px;column-gap:6px}.tags-wrapper .add-tag-container .tag-form-container{width:80%}.tags-wrapper .add-tag-container .add-tag-btn{width:20%}.tags-wrapper .tags-list-container{display:flex;grid-column-gap:4px;column-gap:4px;grid-row-gap:8px;row-gap:8px;margin:0}\n"], components: [{ type: DynamicFormSelectTagComponent, selector: "cts-dynamic-form-select-tag", inputs: ["label"] }, { type: ButtonComponent, selector: "cts-button", inputs: ["disabled", "loading", "size", "theme"], outputs: ["onClick"] }, { type: i5$1.MatChipList, selector: "mat-chip-list", inputs: ["aria-orientation", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "selectable", "tabIndex", "errorStateMatcher"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i3$3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: NoDataComponent, selector: "cts-no-data", inputs: ["message", "border"] }], directives: [{ type: PermissionsDirective, selector: "[permission]", inputs: ["permission"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$1.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i5$1.MatChipRemove, selector: "[matChipRemove]" }], pipes: { "translate": i1$1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
16439
+ CorrespondenceTagsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: CorrespondenceTagsComponent, selector: "cts-correspondence-tags", inputs: { correspondence: "correspondence", customClass: "customClass", addCustomApiName: "addCustomApiName", deleteCustomApiName: "deleteCustomApiName", useParams: "useParams" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"{{customClass}}\">\r\n <div class=\"tags-header\">\r\n <div class=\"tag-header-title\">{{ \"Tags.tags\" | translate }}</div>\r\n <div\r\n \r\n class=\"allowEdit-tag-btn\"\r\n *permission=\"{ name: 'addTag', entity: correspondence, user: nuxeoService.nuxeoClient.user }\"\r\n (click)=\"removable = !removable\"\r\n >\r\n <span class=\"bi bi-plus-lg detailed-menu\" [matTooltip]=\"'Tags.toolTip' | translate\" *ngIf=\"!removable\"></span>\r\n <span class=\"tags-close-icon bi bi-x detailed-menu\" [matTooltip]=\"'Tags.Close' | translate\" *ngIf=\"removable\"></span>\r\n </div>\r\n </div>\r\n <div class=\"tags-wrapper\">\r\n <ng-container *ngIf=\"removable\">\r\n <div class=\"add-tag-container\">\r\n <div class=\"tag-form-container\">\r\n <form [formGroup]=\"tagsFrom\">\r\n <cts-dynamic-form-select-tag formControlName=\"tag\">\r\n </cts-dynamic-form-select-tag>\r\n </form>\r\n </div>\r\n <div class=\"add-tag-btn\">\r\n <cts-button\r\n [disabled]=\"this.tagsFrom.invalid\"\r\n [loading]=\"loading\"\r\n (onClick)=\"addTag()\"\r\n class=\"detailed-menu\"\r\n >{{ \"BUTTONS.ADD\" | translate }}</cts-button\r\n >\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"tagsList.length > 0; else noEntry\">\r\n <div class=\"tags-list-container row\">\r\n <mat-chip-list *ngFor=\"let tag of tagsList\">\r\n <mat-chip [removable]=\"removable\" (removed)=\"deleteTag(tag)\"\r\n >{{ tag }} <mat-icon matChipRemove *ngIf=\"removable\">cancel</mat-icon>\r\n </mat-chip>\r\n </mat-chip-list>\r\n </div>\r\n </ng-container>\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #noEntry>\r\n <cts-no-data [message]=\"'Tags.noEntry'\" [border]=\"false\"></cts-no-data>\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}.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.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.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}.tags-header{display:flex;justify-content:space-between;align-items:center;font-weight:bold;font-size:14px}.tags-header .allowEdit-tag-btn{cursor:pointer}.tags-header .allowEdit-tag-btn span{color:#1a96c6;font-size:18px}.tags-header .allowEdit-tag-btn .tags-close-icon{display:flex;font-size:30px}.tags-wrapper{padding:5px 16px;border:1px solid #d9dce2;display:flex;flex-direction:column;grid-row-gap:8px;row-gap:8px}.tags-wrapper .add-tag-container{display:flex;justify-content:space-between;grid-column-gap:6px;column-gap:6px}.tags-wrapper .add-tag-container .tag-form-container{width:80%}.tags-wrapper .add-tag-container .add-tag-btn{width:20%}.tags-wrapper .tags-list-container{display:flex;grid-column-gap:4px;column-gap:4px;grid-row-gap:8px;row-gap:8px;margin:0}\n"], components: [{ type: DynamicFormSelectTagComponent, selector: "cts-dynamic-form-select-tag", inputs: ["label"] }, { type: ButtonComponent, selector: "cts-button", inputs: ["disabled", "loading", "size", "theme"], outputs: ["onClick"] }, { type: i5$1.MatChipList, selector: "mat-chip-list", inputs: ["aria-orientation", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "selectable", "tabIndex", "errorStateMatcher"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i3$3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: NoDataComponent, selector: "cts-no-data", inputs: ["message", "border"] }], directives: [{ type: PermissionsDirective, selector: "[permission]", inputs: ["permission"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$1.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i5$1.MatChipRemove, selector: "[matChipRemove]" }], pipes: { "translate": i1$1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
16392
16440
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: CorrespondenceTagsComponent, decorators: [{
16393
16441
  type: Component,
16394
16442
  args: [{
@@ -16401,6 +16449,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImpor
16401
16449
  type: Input
16402
16450
  }], customClass: [{
16403
16451
  type: Input
16452
+ }], addCustomApiName: [{
16453
+ type: Input
16454
+ }], deleteCustomApiName: [{
16455
+ type: Input
16456
+ }], useParams: [{
16457
+ type: Input
16404
16458
  }] } });
16405
16459
 
16406
16460
  /**
@@ -17577,6 +17631,7 @@ class PdftronComponent {
17577
17631
  this.actionClicked = false; // used to know if there is action clicked outside to start edit mode or not
17578
17632
  this.DOCUMENT_TYPE = 'application/pdf';
17579
17633
  this.fitMode = 'FitWidth';
17634
+ this.events = new EventEmitter();
17580
17635
  }
17581
17636
  ngOnInit() {
17582
17637
  return __awaiter(this, void 0, void 0, function* () { });
@@ -17602,9 +17657,10 @@ class PdftronComponent {
17602
17657
  forceClientSideInit: true,
17603
17658
  streaming: true,
17604
17659
  licenseKey: this.environment.pdftronLicenceKey,
17605
- disabledElements: ['downloadButton'],
17660
+ disabledElements: ['downloadButton', 'printButton'],
17606
17661
  }, this.viewerRef.nativeElement).then((instance) => __awaiter(this, void 0, void 0, function* () {
17607
17662
  this.pdftronService.instance = this.webViewerInstance = instance;
17663
+ this.addPrintButton();
17608
17664
  this.addDownloadButton();
17609
17665
  this.loadDocument();
17610
17666
  }));
@@ -17629,12 +17685,26 @@ class PdftronComponent {
17629
17685
  document.body.appendChild(link);
17630
17686
  link.click();
17631
17687
  document.body.removeChild(link);
17688
+ this.events.next('download');
17632
17689
  });
17633
17690
  }
17634
17691
  },
17635
17692
  });
17636
17693
  });
17637
17694
  }
17695
+ addPrintButton() {
17696
+ this.webViewerInstance.setHeaderItems((header) => {
17697
+ header.push({
17698
+ type: 'actionButton',
17699
+ img: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><defs><style>.cls-1{fill:#abb0c4;}</style></defs><title>icon - header - print - line</title><path class="cls-1" d="M20,6H18V2H6V6H4A2,2,0,0,0,2,8v9a2,2,0,0,0,2,2H6v3H18V19h2a2,2,0,0,0,2-2V8A2,2,0,0,0,20,6ZM8,4h8V6H8Zm8,16H8V16h8Zm4-3H18V14H6v3H4V8H20Zm-4-7h2v2H16Zm-3,0h2v2H13Z"></path></svg>',
17700
+ title: 'Print',
17701
+ onClick: () => {
17702
+ this.pdftronService.instance.print();
17703
+ this.events.next('print');
17704
+ },
17705
+ });
17706
+ });
17707
+ }
17638
17708
  addWatermark() {
17639
17709
  const userinfo = this.nuxeo.nuxeoClient.user.properties;
17640
17710
  this.pdftronService.addWatermark(`${userinfo.username} `
@@ -17677,7 +17747,14 @@ class PdftronComponent {
17677
17747
  });
17678
17748
  }
17679
17749
  this.isFetching = false;
17680
- if (this.environment.enableViewerWaterMark) {
17750
+ // if we need to check on secrecy level for adding water mark or not
17751
+ if (this.environment.enableViewerWaterMark && this.secrecyProperty) {
17752
+ // check for secrecy level befor adding watermark
17753
+ if (this.correspondance.properties[this.secrecyProperty] !== 'Normal') {
17754
+ this.addWatermark();
17755
+ }
17756
+ }
17757
+ else if (this.environment.enableViewerWaterMark && !this.secrecyProperty) {
17681
17758
  this.addWatermark();
17682
17759
  }
17683
17760
  this.cdr.detectChanges();
@@ -17747,7 +17824,7 @@ class PdftronComponent {
17747
17824
  }
17748
17825
  }
17749
17826
  PdftronComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: PdftronComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: PdftronService }, { token: NuxeoService$1 }, { token: APP_BASE_HREF }, { token: SecurePipe }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Component });
17750
- PdftronComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: PdftronComponent, selector: "app-pdftron", inputs: { editMode: "editMode", actionClicked: "actionClicked", fileTitle: "fileTitle", docId: "docId", DOCUMENT_TYPE: "DOCUMENT_TYPE", fileData: "fileData", fitMode: "fitMode", authHeader: "authHeader", fileURL: "fileURL", correspondance: "correspondance" }, providers: [SecurePipe], viewQueries: [{ propertyName: "viewerRef", first: true, predicate: ["fileViewer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #fileViewer style=\"width: 100%; height: 100%;\"></div>\r\n", styles: [""] });
17827
+ PdftronComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: PdftronComponent, selector: "app-pdftron", inputs: { editMode: "editMode", actionClicked: "actionClicked", fileTitle: "fileTitle", docId: "docId", DOCUMENT_TYPE: "DOCUMENT_TYPE", fileData: "fileData", fitMode: "fitMode", authHeader: "authHeader", fileURL: "fileURL", correspondance: "correspondance", secrecyProperty: "secrecyProperty" }, outputs: { events: "events" }, providers: [SecurePipe], viewQueries: [{ propertyName: "viewerRef", first: true, predicate: ["fileViewer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #fileViewer style=\"width: 100%; height: 100%;\"></div>\r\n", styles: [""] });
17751
17828
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: PdftronComponent, decorators: [{
17752
17829
  type: Component,
17753
17830
  args: [{
@@ -17785,6 +17862,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImpor
17785
17862
  type: Input
17786
17863
  }], correspondance: [{
17787
17864
  type: Input
17865
+ }], secrecyProperty: [{
17866
+ type: Input
17867
+ }], events: [{
17868
+ type: Output
17788
17869
  }] } });
17789
17870
 
17790
17871
  class PdfTronModule {