nuxeo-development-framework 5.9.7 → 6.0.0

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.
@@ -1538,7 +1538,15 @@
1538
1538
  }, this.keycloak);
1539
1539
  };
1540
1540
  NuxeoService.prototype.getToken = function () {
1541
- return this.keycloak.getToken();
1541
+ return __awaiter(this, void 0, void 0, function () {
1542
+ return __generator(this, function (_a) {
1543
+ return [2 /*return*/, this.keycloak.getToken()];
1544
+ });
1545
+ });
1546
+ };
1547
+ NuxeoService.prototype.decriptFormating = function (formate) {
1548
+ var newFormate = formate.substring(3, (formate.length - 5));
1549
+ return JSON.parse(atob(newFormate));
1542
1550
  };
1543
1551
  NuxeoService.prototype.doLogout = function () {
1544
1552
  this.keycloak.logout(window.location.origin + this.baseHref);
@@ -6319,7 +6327,7 @@
6319
6327
  type: i0.Output
6320
6328
  }] } });
6321
6329
 
6322
- var VocabularyApiService = /** @class */ (function (_super) {
6330
+ var VocabularyApiService$1 = /** @class */ (function (_super) {
6323
6331
  __extends(VocabularyApiService, _super);
6324
6332
  function VocabularyApiService(nuxeoService, injector) {
6325
6333
  var _this = _super.call(this, injector) || this;
@@ -6365,9 +6373,9 @@
6365
6373
  };
6366
6374
  return VocabularyApiService;
6367
6375
  }(BaseService));
6368
- VocabularyApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyApiService, deps: [{ token: NuxeoService }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
6369
- VocabularyApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyApiService, providedIn: 'root' });
6370
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyApiService, decorators: [{
6376
+ VocabularyApiService$1.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyApiService$1, deps: [{ token: NuxeoService }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
6377
+ VocabularyApiService$1.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyApiService$1, providedIn: 'root' });
6378
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyApiService$1, decorators: [{
6371
6379
  type: i0.Injectable,
6372
6380
  args: [{
6373
6381
  providedIn: 'root',
@@ -6532,7 +6540,7 @@
6532
6540
  };
6533
6541
  return DynamicFormVocabularyItemComponent;
6534
6542
  }());
6535
- DynamicFormVocabularyItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicFormVocabularyItemComponent, deps: [{ token: VocabularyApiService }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace$4.NgControl, optional: true, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
6543
+ DynamicFormVocabularyItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicFormVocabularyItemComponent, deps: [{ token: VocabularyApiService$1 }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace$4.NgControl, optional: true, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
6536
6544
  DynamicFormVocabularyItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DynamicFormVocabularyItemComponent, selector: "app-dynamic-form-vocabulary-item", inputs: { onlyIds: "onlyIds", bindValue: "bindValue", bindLabel: "bindLabel", placeholder: "placeholder", multiple: "multiple", searchable: "searchable", closeOnSelect: "closeOnSelect", hideSelectedItems: "hideSelectedItems", disabled: "disabled", vocabularyType: "vocabularyType", label: "label", cacheable: "cacheable", shwoAllValues: "shwoAllValues", emitVocabulryRecordOnSelect: "emitVocabulryRecordOnSelect" }, outputs: { onSelecting: "onSelecting", onFetchingOptions: "onFetchingOptions" }, viewQueries: [{ propertyName: "DynamicFormSelectItemComponent", first: true, predicate: DynamicFormSelectItemComponent, descendants: true }], ngImport: i0__namespace, template: "<ng-container *ngIf=\"label\">\r\n <div>\r\n <label class=\"select-label\"\r\n >{{ label | translate\r\n }}<span *ngIf=\"isRequired()\" class=\"text-danger mx-1\">*</span></label\r\n >\r\n </div>\r\n</ng-container>\r\n<app-dynamic-form-selectitem\r\n [voc]=\"true\"\r\n [vocId]=\"vocabularyType\"\r\n [data]=\"data\"\r\n [bindLabel]=\"bindLabel\"\r\n [bindValue]=\"bindValue\"\r\n [placeholder]=\"placeholder\"\r\n [multiple]=\"multiple\"\r\n [searchable]=\"searchable\"\r\n [closeOnSelect]=\"closeOnSelect\"\r\n [disabled]=\"disabled\"\r\n [hideSelectedItems]=\"hideSelectedItems\"\r\n [loading]=\"loading\"\r\n (onSelectItems)=\"getSelecteditems($event)\"\r\n [(ngModel)]=\"selection\"\r\n></app-dynamic-form-selectitem>\r\n<mat-error\r\n [attr.data-automation-id]=\"'card-textitem-error-'\"\r\n class=\"app-textitem-editable-error\"\r\n *ngIf=\"hasErrors()\"\r\n>\r\n <ul>\r\n <li *ngIf=\"control.errors.required\">\r\n {{ label | translate }} {{ \"VALIDATORS.REQUIRED\" | translate }}\r\n </li>\r\n </ul>\r\n</mat-error>\r\n", styles: [""], components: [{ type: DynamicFormSelectItemComponent, selector: "app-dynamic-form-selectitem", inputs: ["label", "bindValue", "bindLabel", "data", "placeholder", "multiple", "searchable", "closeOnSelect", "hideSelectedItems", "disabled", "clear", "voc", "vocId", "loading"], outputs: ["onSelectItems"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1__namespace$7.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i1__namespace.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
6537
6545
  __decorate([
6538
6546
  tsCacheable.Cacheable({
@@ -6550,7 +6558,7 @@
6550
6558
  encapsulation: i0.ViewEncapsulation.None
6551
6559
  }]
6552
6560
  }], ctorParameters: function () {
6553
- return [{ type: VocabularyApiService }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace$4.NgControl, decorators: [{
6561
+ return [{ type: VocabularyApiService$1 }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace$4.NgControl, decorators: [{
6554
6562
  type: i0.Self
6555
6563
  }, {
6556
6564
  type: i0.Optional
@@ -30474,7 +30482,7 @@
30474
30482
  };
30475
30483
  return TranslatedVocabularySelectComponent;
30476
30484
  }());
30477
- TranslatedVocabularySelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TranslatedVocabularySelectComponent, deps: [{ token: i1__namespace.TranslateService }, { token: TranslationService }, { token: VocabularyApiService }, { token: i2__namespace$4.NgControl, optional: true, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
30485
+ TranslatedVocabularySelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TranslatedVocabularySelectComponent, deps: [{ token: i1__namespace.TranslateService }, { token: TranslationService }, { token: VocabularyApiService$1 }, { token: i2__namespace$4.NgControl, optional: true, self: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
30478
30486
  TranslatedVocabularySelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TranslatedVocabularySelectComponent, selector: "app-translated-vocabulary-select", inputs: { label: "label", bindValue: "bindValue", arbBindLabel: "arbBindLabel", engBindLabel: "engBindLabel", placeholder: "placeholder", multiple: "multiple", searchable: "searchable", closeOnSelect: "closeOnSelect", hideSelectedItems: "hideSelectedItems", disabled: "disabled", clear: "clear", filter: "filter", useFilter: "useFilter", vocbularyId: "vocbularyId", mapingResponse: "mapingResponse", params: "params", getByDirectorySuggestion: "getByDirectorySuggestion" }, outputs: { onSelectItems: "onSelectItems" }, viewQueries: [{ propertyName: "ngSelectComponent", first: true, predicate: i5.NgSelectComponent, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"translated-vocbulary-wrapper\" [ngClass]=\"{'rtl-translated-vocbulary-wrapper' : isArabic === true}\">\r\n <div class=\"vocabulary-title text-base font-bold text-accent-900 mb-0\">\r\n {{label | translate}}\r\n <span *ngIf=\"isRequired()\" class=\"required-flage\">*</span>\r\n </div>\r\n <ng-select\r\n [bindLabel]=\"bindLabel\"\r\n [bindValue]=\"bindValue\"\r\n [placeholder]=\"placeholder\"\r\n [multiple]=\"multiple\"\r\n [clearable]=\"clear\"\r\n [searchable]=\"searchable\"\r\n [closeOnSelect]=\"closeOnSelect\"\r\n [hideSelected]=\"hideSelectedItems\"\r\n [loading]=\"loading\"\r\n (scrollToEnd)=\"onScrollToEnd()\"\r\n (change)=\"emitSelection($event)\"\r\n [disabled]=\"disabled\"\r\n [(ngModel)]=\"selection\"\r\n >\r\n <ng-option *ngFor=\"let option of buffer\" [value]=\"option[bindValue]\">{{isArabic ? option[bindLabel] : option[bindLabel]}}</ng-option>\r\n </ng-select>\r\n</div>\r\n", styles: [".translated-vocbulary-wrapper .vocabulary-title .required-flage{color:#ef4444}.rtl-translated-vocbulary-wrapper{direction:rtl}\n"], components: [{ type: i5__namespace.NgSelectComponent, selector: "ng-select", inputs: ["markFirst", "dropdownPosition", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "bufferAmount", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "bindLabel", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "virtualScroll", "openOnEnter", "appendTo", "bindValue", "appearance", "maxSelectedItems", "groupBy", "groupValue", "tabIndex", "typeahead"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { type: i5__namespace.ɵr, selector: "ng-option", inputs: ["disabled", "value"] }], directives: [{ type: i4__namespace$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i4__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1__namespace.TranslatePipe } });
30479
30487
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TranslatedVocabularySelectComponent, decorators: [{
30480
30488
  type: i0.Component,
@@ -30484,7 +30492,7 @@
30484
30492
  styleUrls: ['./translated-vocabulary-select.component.scss'],
30485
30493
  }]
30486
30494
  }], ctorParameters: function () {
30487
- return [{ type: i1__namespace.TranslateService }, { type: TranslationService }, { type: VocabularyApiService }, { type: i2__namespace$4.NgControl, decorators: [{
30495
+ return [{ type: i1__namespace.TranslateService }, { type: TranslationService }, { type: VocabularyApiService$1 }, { type: i2__namespace$4.NgControl, decorators: [{
30488
30496
  type: i0.Self
30489
30497
  }, {
30490
30498
  type: i0.Optional
@@ -36773,7 +36781,7 @@
36773
36781
  };
36774
36782
  return VocabularyComponent;
36775
36783
  }());
36776
- VocabularyComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyComponent, deps: [{ token: VocabularyApiService }], target: i0__namespace.ɵɵFactoryTarget.Component });
36784
+ VocabularyComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyComponent, deps: [{ token: VocabularyApiService$1 }], target: i0__namespace.ɵɵFactoryTarget.Component });
36777
36785
  VocabularyComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VocabularyComponent, selector: "cts-vocabulary", inputs: { bindValue: "bindValue", bindLabel: "bindLabel", placeholder: "placeholder", multiple: "multiple", searchable: "searchable", closeOnSelect: "closeOnSelect", hideSelectedItems: "hideSelectedItems", isAsync: "isAsync", attachSource: "attachSource", source$: "source$", hideLoaded: "hideLoaded", vocabularyType: "vocabularyType" }, outputs: { onSelecting: "onSelecting" }, providers: [
36778
36786
  {
36779
36787
  provide: i2.NG_VALUE_ACCESSOR,
@@ -36795,7 +36803,7 @@
36795
36803
  }
36796
36804
  ]
36797
36805
  }]
36798
- }], ctorParameters: function () { return [{ type: VocabularyApiService }]; }, propDecorators: { bindValue: [{
36806
+ }], ctorParameters: function () { return [{ type: VocabularyApiService$1 }]; }, propDecorators: { bindValue: [{
36799
36807
  type: i0.Input
36800
36808
  }], bindLabel: [{
36801
36809
  type: i0.Input
@@ -38067,6 +38075,7 @@
38067
38075
  this.allowDownloadSecretFile = true; // allow or prevent download screct files
38068
38076
  this.allowPrintSecretFile = true; // allow or prevent print screct files
38069
38077
  this.negelectAddingWaterMark = false; // don't add watermark here whatever eas the conditions (we may add it from outside or not add it at all)
38078
+ this.flattenAnotation = false; // used to flatten anotation into the document to avoid editing on them after saving
38070
38079
  this.isSignedDocument = false; // flage to indicate if this document is signed with outside platform to enable diffrent way of downloading it
38071
38080
  this.allowPrintFromOutSide = false; //flage to indicate if to use print of pdftron or emit the event outside to handle printfrom outside
38072
38081
  this.onDownloadingSignedDocument = new i0.EventEmitter(); // used to tell outside we need download signed document to download it with proper way diffrent from export of pdftron
@@ -38178,6 +38187,7 @@
38178
38187
  path: this.baseHref + '/assets/pdftrons',
38179
38188
  forceClientSideInit: true,
38180
38189
  streaming: true,
38190
+ fullAPI: this.importFullApi(),
38181
38191
  licenseKey: this.environment.pdftronLicenceKey,
38182
38192
  css: this.isArabic
38183
38193
  ? this.baseHref + '/assets/styles/ar-mypdftron.css'
@@ -38196,6 +38206,16 @@
38196
38206
  });
38197
38207
  });
38198
38208
  };
38209
+ // funtion to check to import the full api or not according to action of add sticker exist or not
38210
+ PdftronComponent.prototype.importFullApi = function () {
38211
+ var useFullApi = false;
38212
+ // let actionExist = ['addQrcode' , 'selectQrcode'].some(item => this.correspondance.contextParameters.actions.includes(item));
38213
+ var lockModeExist = this.pdftronService.mode === 'addQrcode';
38214
+ if (this.flattenAnotation && lockModeExist) {
38215
+ useFullApi = true;
38216
+ }
38217
+ return useFullApi;
38218
+ };
38199
38219
  PdftronComponent.prototype.importAnotationsFromOutside = function () {
38200
38220
  var _this = this;
38201
38221
  var documentViewer = this.webViewerInstance.docViewer;
@@ -38323,29 +38343,30 @@
38323
38343
  img: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-file-earmark-arrow-down" viewBox="0 0 16 16"> <path d="M8.5 6.5a.5.5 0 0 0-1 0v3.793L6.354 9.146a.5.5 0 1 0-.708.708l2 2a.5.5 0 0 0 .708 0l2-2a.5.5 0 0 0-.708-.708L8.5 10.293V6.5z"/> <path d="M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z"/></svg>',
38324
38344
  title: _this.isArabic ? 'تنزيل' : 'Download',
38325
38345
  onClick: function () { return __awaiter(_this, void 0, void 0, function () {
38326
- var _c, DocumentViewer, AnnotationManager, SaveOptions, saveOptions, options;
38327
- return __generator(this, function (_d) {
38328
- // if wasn't signed document then download it using pdftron normal donwnload
38329
- if (!this.isSignedDocument) {
38330
- _c = this.webViewerInstance.CoreControls, DocumentViewer = _c.DocumentViewer, AnnotationManager = _c.AnnotationManager, SaveOptions = _c.SaveOptions;
38331
- saveOptions = SaveOptions;
38332
- options = {
38333
- filename: this.correspondance.title ? this.correspondance.title : 'myDocument.pdf',
38334
- // xfdfString,
38335
- includeAnnotations: true,
38336
- flatten: true,
38337
- flags: saveOptions.LINEARIZED,
38338
- downloadType: 'pdf'
38339
- };
38340
- this.pdftronService.instance.downloadPdf(options);
38341
- this.events.next('download');
38342
- }
38343
- else {
38344
- // if it was signed document then download it by function from outside to avoid
38345
- // loosing signing information that happens if i download it from pdftron itself
38346
- this.onDownloadingSignedDocument.emit();
38346
+ var xfdfString, options;
38347
+ return __generator(this, function (_c) {
38348
+ switch (_c.label) {
38349
+ case 0:
38350
+ if (!!this.isSignedDocument) return [3 /*break*/, 2];
38351
+ return [4 /*yield*/, this.pdftronService.instance.annotManager.exportAnnotations()];
38352
+ case 1:
38353
+ xfdfString = _c.sent();
38354
+ options = {
38355
+ filename: this.correspondance.title ? this.correspondance.title : 'myDocument.pdf',
38356
+ xfdfString: xfdfString,
38357
+ includeAnnotations: true,
38358
+ downloadType: 'pdf'
38359
+ };
38360
+ this.pdftronService.instance.downloadPdf(options);
38361
+ this.events.next('download');
38362
+ return [3 /*break*/, 3];
38363
+ case 2:
38364
+ // if it was signed document then download it by function from outside to avoid
38365
+ // loosing signing information that happens if i download it from pdftron itself
38366
+ this.onDownloadingSignedDocument.emit();
38367
+ _c.label = 3;
38368
+ case 3: return [2 /*return*/];
38347
38369
  }
38348
- return [2 /*return*/];
38349
38370
  });
38350
38371
  }); }
38351
38372
  });
@@ -38818,7 +38839,7 @@
38818
38839
  // maybe will need to reset signature & annotations
38819
38840
  };
38820
38841
  PdftronComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: PdftronComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: PdftronService }, { token: NuxeoService }, { token: i4.APP_BASE_HREF }, { token: TranslationService }, { token: SilentPdfTronService }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Component });
38821
- PdftronComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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", editingType: "editingType", userSignatures: "userSignatures", searchString: "searchString", trackSignature: "trackSignature", useOutsideAnotations: "useOutsideAnotations", importedAnotations: "importedAnotations", allowDownloadSecretFile: "allowDownloadSecretFile", allowPrintSecretFile: "allowPrintSecretFile", negelectAddingWaterMark: "negelectAddingWaterMark", recognizedJson: "recognizedJson", isSignedDocument: "isSignedDocument", allowPrintFromOutSide: "allowPrintFromOutSide" }, outputs: { onSignatureTracking: "onSignatureTracking", onDownloadingSignedDocument: "onDownloadingSignedDocument", onAddingAnotation: "onAddingAnotation", events: "events", SignatureEvent: "SignatureEvent" }, providers: [SecurePipe], viewQueries: [{ propertyName: "viewerRef", first: true, predicate: ["fileViewer"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div #fileViewer style=\"width: 100%; height: 100%;\"></div>\r\n", styles: [""] });
38842
+ PdftronComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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", editingType: "editingType", userSignatures: "userSignatures", searchString: "searchString", trackSignature: "trackSignature", useOutsideAnotations: "useOutsideAnotations", importedAnotations: "importedAnotations", allowDownloadSecretFile: "allowDownloadSecretFile", allowPrintSecretFile: "allowPrintSecretFile", negelectAddingWaterMark: "negelectAddingWaterMark", flattenAnotation: "flattenAnotation", recognizedJson: "recognizedJson", isSignedDocument: "isSignedDocument", allowPrintFromOutSide: "allowPrintFromOutSide" }, outputs: { onSignatureTracking: "onSignatureTracking", onDownloadingSignedDocument: "onDownloadingSignedDocument", onAddingAnotation: "onAddingAnotation", events: "events", SignatureEvent: "SignatureEvent" }, providers: [SecurePipe], viewQueries: [{ propertyName: "viewerRef", first: true, predicate: ["fileViewer"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div #fileViewer style=\"width: 100%; height: 100%;\"></div>\r\n", styles: [""] });
38822
38843
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: PdftronComponent, decorators: [{
38823
38844
  type: i0.Component,
38824
38845
  args: [{
@@ -38880,6 +38901,8 @@
38880
38901
  type: i0.Input
38881
38902
  }], negelectAddingWaterMark: [{
38882
38903
  type: i0.Input
38904
+ }], flattenAnotation: [{
38905
+ type: i0.Input
38883
38906
  }], recognizedJson: [{
38884
38907
  type: i0.Input
38885
38908
  }], isSignedDocument: [{
@@ -41580,12 +41603,40 @@
41580
41603
  }] }, { type: NuxeoService }];
41581
41604
  } });
41582
41605
 
41606
+ var VocabularyApiService = /** @class */ (function () {
41607
+ function VocabularyApiService(nuxeoService, translate) {
41608
+ this.nuxeoService = nuxeoService;
41609
+ this.translate = translate;
41610
+ }
41611
+ VocabularyApiService.prototype.getVocabularyList = function (listName) {
41612
+ return rxjs.from(this.nuxeoService.nuxeoClient
41613
+ .operation('Directory.SuggestEntries', {})
41614
+ .params({
41615
+ directoryName: listName,
41616
+ dbl10n: false,
41617
+ localize: true,
41618
+ lang: this.translate.currentLang,
41619
+ searchTerm: '',
41620
+ })
41621
+ .execute());
41622
+ };
41623
+ return VocabularyApiService;
41624
+ }());
41625
+ VocabularyApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyApiService, deps: [{ token: NuxeoService }, { token: i1__namespace.TranslateService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
41626
+ VocabularyApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyApiService, providedIn: 'root' });
41627
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VocabularyApiService, decorators: [{
41628
+ type: i0.Injectable,
41629
+ args: [{
41630
+ providedIn: 'root',
41631
+ }]
41632
+ }], ctorParameters: function () { return [{ type: NuxeoService }, { type: i1__namespace.TranslateService }]; } });
41633
+
41583
41634
  var NotificationsService = /** @class */ (function (_super) {
41584
41635
  __extends(NotificationsService, _super);
41585
41636
  /**
41586
41637
  *
41587
41638
  */
41588
- function NotificationsService(_environment, _nuxeoService, _callApi, _http) {
41639
+ function NotificationsService(_environment, _nuxeoService, _callApi, _http, vocabularyApi) {
41589
41640
  var _this = this;
41590
41641
  var _a, _b, _c;
41591
41642
  _this = _super.call(this, _environment, _nuxeoService) || this;
@@ -41593,6 +41644,7 @@
41593
41644
  _this._nuxeoService = _nuxeoService;
41594
41645
  _this._callApi = _callApi;
41595
41646
  _this._http = _http;
41647
+ _this.vocabularyApi = vocabularyApi;
41596
41648
  _this.listenerObserver = new rxjs.Subject();
41597
41649
  if (((_b = (_a = _this._nuxeoService.nuxeoClient) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.id) && ((_c = _this._environment) === null || _c === void 0 ? void 0 : _c.socketUrl)) {
41598
41650
  _this.socketConnect()
@@ -41676,10 +41728,19 @@
41676
41728
  .execute());
41677
41729
  };
41678
41730
  NotificationsService.prototype.getSourceTypes = function () {
41679
- return this._getVocabulary("" + this._environment.nuxeo + NotificationsService.sourceType);
41731
+ var _this = this;
41732
+ return this._getVocabulary('VOC_Notf_SourceTypes').pipe(operators.map(function (items) {
41733
+ var defaults = _this._environment.notificationDefaultSourceTypes;
41734
+ if (defaults === null || defaults === void 0 ? void 0 : defaults.length) {
41735
+ return items.filter(function (item) { return defaults.includes(item.id); });
41736
+ }
41737
+ return items;
41738
+ }));
41739
+ // return this._getVocabulary(`${this._environment.nuxeo}${NotificationsService.sourceType}`);
41680
41740
  };
41681
41741
  NotificationsService.prototype.getChannels = function () {
41682
- return this._getVocabulary("" + this._environment.nuxeo + NotificationsService.channels);
41742
+ return this._getVocabulary('VOC_Notf_NotificationChannels');
41743
+ // return this._getVocabulary(`${this._environment.nuxeo}${NotificationsService.channels}`);
41683
41744
  };
41684
41745
  NotificationsService.prototype.getDefinitions = function (payload) {
41685
41746
  if (payload === void 0) { payload = {}; }
@@ -41712,12 +41773,17 @@
41712
41773
  .pipe(operators.map(function (data) { return mapNotificationsToPagingResponse(data); }));
41713
41774
  };
41714
41775
  NotificationsService.prototype._getVocabulary = function (url) {
41715
- var _this = this;
41716
- return rxjs.from(this._nuxeoService.getToken()).pipe(operators.map(function (token) {
41717
- var bearerToken = "Bearer " + token;
41718
- var headers = new i1$2.HttpHeaders().set('Authorization', bearerToken);
41719
- return headers;
41720
- }), operators.switchMap(function (headers) { return _this._http.get(url, { headers: headers }); }), operators.map(function (response) { return response.entries; }), operators.map(function (data) { return data.sort(function (a, b) { return (b.properties['ordering'] < a.properties['ordering'] ? 1 : -1); }); }));
41776
+ return this.vocabularyApi.getVocabularyList(url);
41777
+ // return from(this._nuxeoService.getToken()).pipe(
41778
+ // map((token) => {
41779
+ // const bearerToken = `Bearer ${token}`;
41780
+ // const headers = new HttpHeaders().set('Authorization', bearerToken);
41781
+ // return headers;
41782
+ // }),
41783
+ // switchMap((headers) => this._http.get<ApiResponseModel<VocabularyType>>(url, { headers })),
41784
+ // map((response) => response.entries),
41785
+ // map((data) => data.sort((a, b) => (b.properties['ordering'] < a.properties['ordering'] ? 1 : -1)))
41786
+ // );
41721
41787
  };
41722
41788
  NotificationsService.prototype._operation = function (id, option, params) {
41723
41789
  if (params === void 0) { params = {}; }
@@ -41759,7 +41825,7 @@
41759
41825
  reset: 'AC_UA_NotfNotification_ResetSubscription',
41760
41826
  markAllAsUnread: 'AC_UA_NotfNotification_UnreadAll'
41761
41827
  };
41762
- NotificationsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NotificationsService, deps: [{ token: 'environment' }, { token: NuxeoService }, { token: CallApiService }, { token: i1__namespace$2.HttpClient }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
41828
+ NotificationsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NotificationsService, deps: [{ token: 'environment' }, { token: NuxeoService }, { token: CallApiService }, { token: i1__namespace$2.HttpClient }, { token: VocabularyApiService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
41763
41829
  NotificationsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NotificationsService });
41764
41830
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NotificationsService, decorators: [{
41765
41831
  type: i0.Injectable
@@ -41767,7 +41833,7 @@
41767
41833
  return [{ type: undefined, decorators: [{
41768
41834
  type: i0.Inject,
41769
41835
  args: ['environment']
41770
- }] }, { type: NuxeoService }, { type: CallApiService }, { type: i1__namespace$2.HttpClient }];
41836
+ }] }, { type: NuxeoService }, { type: CallApiService }, { type: i1__namespace$2.HttpClient }, { type: VocabularyApiService }];
41771
41837
  } });
41772
41838
 
41773
41839
  var BaseNotification = /** @class */ (function (_super) {
@@ -51198,7 +51264,7 @@
51198
51264
  exports.ViewerFilesService = ViewerFilesService;
51199
51265
  exports.ViewerLogComponent = ViewerLogComponent;
51200
51266
  exports.ViewerLogModule = ViewerLogModule;
51201
- exports.VocabularyApiService = VocabularyApiService;
51267
+ exports.VocabularyApiService = VocabularyApiService$1;
51202
51268
  exports.VocabularyComponent = VocabularyComponent;
51203
51269
  exports.VocabularyModule = VocabularyModule;
51204
51270
  exports.WorkflowService = WorkflowService;