nuxeo-development-framework 0.6.7 → 0.7.2

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.
@@ -10154,7 +10154,7 @@
10154
10154
  return UserSelectorWrapperComponent;
10155
10155
  }());
10156
10156
  UserSelectorWrapperComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: UserSelectorWrapperComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
10157
- UserSelectorWrapperComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: UserSelectorWrapperComponent, selector: "lib-user-selector-wrapper", inputs: { value: "value", multipleMode: "multipleMode", customOptions: "customOptions" }, outputs: { valueChange: "valueChange" }, ngImport: i0__namespace, template: "<cts-dynamic-form-select-users placeholder=\"{{ 'CREATE.PLACE_HOLDER' | translate }} {{'CREATE.USER' | translate}}\"\n [multiple]=\"multipleMode\"\n [searchable]=\"true\"\n [bindLabel]=\"'fullName'\"\n [closeOnSelect]=\"!multipleMode\"\n [searchable]=\"true\"\n [deptTitle]=\"'all'\"\n [preSelectedValues]=\"[]\"\n [usePreSelectedValue]=\"true\"\n (onSelectItems)=\"executeFunction($event)\"\n (ngModelChange)=\"checkChange($event)\"\n [(ngModel)]=\"bindedValue\" >\n</cts-dynamic-form-select-users>\n <!-- -->\n\n<!-- <div>{{customOptions | json}}</div>\n<div>{{multipleMode}}</div> -->", styles: [""], components: [{ type: DynamicFormSelectUsersComponent, selector: "cts-dynamic-form-select-users", inputs: ["deptTitle", "label", "bindValue", "bindLabel", "placeholder", "multiple", "searchable", "closeOnSelect", "hideSelectedItems", "preSelectedValues", "usePreSelectedValue", "disabled", "filter"], outputs: ["onSelectItems"] }], directives: [{ type: i3__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i1__namespace$1.TranslatePipe } });
10157
+ UserSelectorWrapperComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: UserSelectorWrapperComponent, selector: "lib-user-selector-wrapper", inputs: { value: "value", multipleMode: "multipleMode", customOptions: "customOptions" }, outputs: { valueChange: "valueChange" }, ngImport: i0__namespace, template: "<cts-dynamic-form-select-users placeholder=\"{{ 'CREATE.PLACE_HOLDER' | translate }} {{'CREATE.USER' | translate}}\"\r\n [multiple]=\"multipleMode\"\r\n [searchable]=\"true\"\r\n [bindLabel]=\"'fullName'\"\r\n [closeOnSelect]=\"!multipleMode\"\r\n [searchable]=\"true\"\r\n [deptTitle]=\"'all'\"\r\n [preSelectedValues]=\"[]\"\r\n [usePreSelectedValue]=\"true\"\r\n (onSelectItems)=\"executeFunction($event)\"\r\n (ngModelChange)=\"checkChange($event)\"\r\n [(ngModel)]=\"bindedValue\" >\r\n</cts-dynamic-form-select-users>\r\n <!-- -->\r\n\r\n<!-- <div>{{customOptions | json}}</div>\r\n<div>{{multipleMode}}</div> -->", styles: [""], components: [{ type: DynamicFormSelectUsersComponent, selector: "cts-dynamic-form-select-users", inputs: ["deptTitle", "label", "bindValue", "bindLabel", "placeholder", "multiple", "searchable", "closeOnSelect", "hideSelectedItems", "preSelectedValues", "usePreSelectedValue", "disabled", "filter"], outputs: ["onSelectItems"] }], directives: [{ type: i3__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i1__namespace$1.TranslatePipe } });
10158
10158
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: UserSelectorWrapperComponent, decorators: [{
10159
10159
  type: i0.Component,
10160
10160
  args: [{
@@ -11297,11 +11297,7 @@
11297
11297
  }
11298
11298
  else {
11299
11299
  this.documentsApi.getDocument(docId).subscribe(function (file) {
11300
- _this.documentSelect.emit({
11301
- urlFileContent: file.properties.content.data,
11302
- docId: '' + docId,
11303
- title: file.title,
11304
- });
11300
+ _this.documentSelect.emit(file);
11305
11301
  }, function (error) {
11306
11302
  console.error(error);
11307
11303
  _this.toastr
@@ -13027,15 +13023,21 @@
13027
13023
  }] } });
13028
13024
 
13029
13025
  var DateViewerComponent = /** @class */ (function () {
13030
- function DateViewerComponent(appConfig) {
13026
+ function DateViewerComponent(appConfig, translation) {
13027
+ var _this = this;
13031
13028
  this.appConfig = appConfig;
13029
+ this.translation = translation;
13032
13030
  this.label = '';
13033
13031
  this.value = '';
13034
13032
  this.vertical = false;
13035
13033
  this.formate = "EEEE, MMMM d, y";
13036
13034
  this.hijri = false;
13037
13035
  this.withOutLabel = false;
13036
+ this.isArabic = false;
13038
13037
  this.formate = this.appConfig.myConfiguration['dateFormate'];
13038
+ this.langSubscription = this.translation.isArabic.subscribe(function (res) {
13039
+ _this.isArabic = res;
13040
+ });
13039
13041
  }
13040
13042
  DateViewerComponent.prototype.ngOnInit = function () {
13041
13043
  // if(this.hijri){
@@ -13046,8 +13048,8 @@
13046
13048
  };
13047
13049
  return DateViewerComponent;
13048
13050
  }());
13049
- DateViewerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: DateViewerComponent, deps: [{ token: AppConfigService }], target: i0__namespace.ɵɵFactoryTarget.Component });
13050
- DateViewerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: DateViewerComponent, selector: "cts-date-viewer", inputs: { label: "label", value: "value", vertical: "vertical", formate: "formate", hijri: "hijri", withOutLabel: "withOutLabel" }, ngImport: i0__namespace, template: "<div class=\"my-dynamic-viewer\" [ngClass]=\"{'vertical' : vertical === true , 'with-out-label': withOutLabel}\">\r\n <div class=\"my-label\" *ngIf=\"!withOutLabel\">{{label | translate}}</div>\r\n <div class=\"my-value\" *ngIf=\"!hijri\"> {{value | localizedDate : formate}}</div>\r\n <div class=\"my-value\" *ngIf=\"hijri\">{{value | hijriDate}}</div>\r\n</div>", styles: [""], directives: [{ type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1__namespace$1.TranslatePipe, "localizedDate": LocalizedDatePipe, "hijriDate": HijriDatePipe } });
13051
+ DateViewerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: DateViewerComponent, deps: [{ token: AppConfigService }, { token: TranslationService$1 }], target: i0__namespace.ɵɵFactoryTarget.Component });
13052
+ DateViewerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: DateViewerComponent, selector: "cts-date-viewer", inputs: { label: "label", value: "value", vertical: "vertical", formate: "formate", hijri: "hijri", withOutLabel: "withOutLabel" }, ngImport: i0__namespace, template: "<div class=\"my-dynamic-viewer\" [ngClass]=\"{'vertical' : vertical === true , 'with-out-label': withOutLabel}\">\r\n <div class=\"my-label\" *ngIf=\"!withOutLabel\">{{label | translate}}</div>\r\n <div class=\"my-value\" *ngIf=\"!hijri\"> {{value | localizedDate:format:(isArabic? 'ar-AR' : 'en-US')}}</div>\r\n <div class=\"my-value\" *ngIf=\"hijri\">{{value | hijriDate}}</div>\r\n</div>", styles: [""], directives: [{ type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1__namespace$1.TranslatePipe, "localizedDate": LocalizedDatePipe, "hijriDate": HijriDatePipe } });
13051
13053
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: DateViewerComponent, decorators: [{
13052
13054
  type: i0.Component,
13053
13055
  args: [{
@@ -13055,7 +13057,7 @@
13055
13057
  templateUrl: './date-viewer.component.html',
13056
13058
  styleUrls: ['./date-viewer.component.scss']
13057
13059
  }]
13058
- }], ctorParameters: function () { return [{ type: AppConfigService }]; }, propDecorators: { label: [{
13060
+ }], ctorParameters: function () { return [{ type: AppConfigService }, { type: TranslationService$1 }]; }, propDecorators: { label: [{
13059
13061
  type: i0.Input
13060
13062
  }], value: [{
13061
13063
  type: i0.Input
@@ -13187,7 +13189,7 @@
13187
13189
  return CutomeVocViewerComponent;
13188
13190
  }());
13189
13191
  CutomeVocViewerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: CutomeVocViewerComponent, deps: [{ token: TranslationService$1 }], target: i0__namespace.ɵɵFactoryTarget.Component });
13190
- CutomeVocViewerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: CutomeVocViewerComponent, selector: "lib-cutome-voc-viewer", inputs: { type: "type", group: "group" }, ngImport: i0__namespace, template: "<span *ngIf=\"group\">\n <span *ngIf=\"type === 'vocabulary'\">\n {{\n \"vocabulary.\" + group.fetchedKey.directoryName + \".\" + group.key | translate\n }}\n </span>\n <span *ngIf=\"type === 'custom-voc'\">\n {{\n isArabic\n ? group.fetchedKey.properties.label_ar\n : group.fetchedKey.properties.label_en\n }}\n </span>\n</span>\n", styles: [""], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1__namespace$1.TranslatePipe } });
13192
+ CutomeVocViewerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: CutomeVocViewerComponent, selector: "lib-cutome-voc-viewer", inputs: { type: "type", group: "group" }, ngImport: i0__namespace, template: "<span *ngIf=\"group\">\r\n <span *ngIf=\"type === 'vocabulary'\">\r\n {{\r\n \"vocabulary.\" + group.fetchedKey.directoryName + \".\" + group.key | translate\r\n }}\r\n </span>\r\n <span *ngIf=\"type === 'custom-voc'\">\r\n {{\r\n isArabic\r\n ? group.fetchedKey.properties.label_ar\r\n : group.fetchedKey.properties.label_en\r\n }}\r\n </span>\r\n</span>\r\n", styles: [""], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1__namespace$1.TranslatePipe } });
13191
13193
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: CutomeVocViewerComponent, decorators: [{
13192
13194
  type: i0.Component,
13193
13195
  args: [{
@@ -13234,7 +13236,7 @@
13234
13236
  return CustomPpViewerComponent;
13235
13237
  }());
13236
13238
  CustomPpViewerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: CustomPpViewerComponent, deps: [{ token: CallApiService }, { token: TranslationService$1 }], target: i0__namespace.ɵɵFactoryTarget.Component });
13237
- CustomPpViewerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: CustomPpViewerComponent, selector: "lib-custom-pp-viewer", inputs: { pageProvider: "pageProvider", group: "group" }, ngImport: i0__namespace, template: "<span *ngIf=\"data\">\n {{isArabic ? data['category:arabicTitle'] : data['dc:title']}}\n</span>", styles: [""], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
13239
+ CustomPpViewerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: CustomPpViewerComponent, selector: "lib-custom-pp-viewer", inputs: { pageProvider: "pageProvider", group: "group" }, ngImport: i0__namespace, template: "<span *ngIf=\"data\">\r\n {{isArabic ? data['category:arabicTitle'] : data['dc:title']}}\r\n</span>", styles: [""], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
13238
13240
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: CustomPpViewerComponent, decorators: [{
13239
13241
  type: i0.Component,
13240
13242
  args: [{
@@ -13281,7 +13283,7 @@
13281
13283
  return CustomDocumentViewerComponent;
13282
13284
  }());
13283
13285
  CustomDocumentViewerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: CustomDocumentViewerComponent, deps: [{ token: CallApiService }, { token: TranslationService$1 }], target: i0__namespace.ɵɵFactoryTarget.Component });
13284
- CustomDocumentViewerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: CustomDocumentViewerComponent, selector: "lib-custom-document-viewer", inputs: { pageProvider: "pageProvider", group: "group" }, ngImport: i0__namespace, template: "<span *ngIf=\"data\">\n {{isArabic ? data['documenttypee:arabicTitle'] : data['dc:title']}}\n</span>", styles: [""], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
13286
+ CustomDocumentViewerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: CustomDocumentViewerComponent, selector: "lib-custom-document-viewer", inputs: { pageProvider: "pageProvider", group: "group" }, ngImport: i0__namespace, template: "<span *ngIf=\"data\">\r\n {{isArabic ? data['documenttypee:arabicTitle'] : data['dc:title']}}\r\n</span>", styles: [""], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
13285
13287
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: CustomDocumentViewerComponent, decorators: [{
13286
13288
  type: i0.Component,
13287
13289
  args: [{
@@ -18990,6 +18992,7 @@
18990
18992
  this.actionClicked = false; // used to know if there is action clicked outside to start edit mode or not
18991
18993
  this.DOCUMENT_TYPE = 'application/pdf';
18992
18994
  this.fitMode = 'FitWidth';
18995
+ this.events = new i0.EventEmitter();
18993
18996
  }
18994
18997
  PdftronComponent.prototype.ngOnInit = function () {
18995
18998
  return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) {
@@ -19019,10 +19022,11 @@
19019
19022
  forceClientSideInit: true,
19020
19023
  streaming: true,
19021
19024
  licenseKey: this.environment.pdftronLicenceKey,
19022
- disabledElements: ['downloadButton'],
19025
+ disabledElements: ['downloadButton', 'printButton'],
19023
19026
  }, this.viewerRef.nativeElement).then(function (instance) { return __awaiter(_this, void 0, void 0, function () {
19024
19027
  return __generator(this, function (_a) {
19025
19028
  this.pdftronService.instance = this.webViewerInstance = instance;
19029
+ this.addPrintButton();
19026
19030
  this.addDownloadButton();
19027
19031
  this.loadDocument();
19028
19032
  return [2 /*return*/];
@@ -19052,12 +19056,27 @@
19052
19056
  document.body.appendChild(link);
19053
19057
  link.click();
19054
19058
  document.body.removeChild(link);
19059
+ _this.events.next('download');
19055
19060
  });
19056
19061
  }
19057
19062
  },
19058
19063
  });
19059
19064
  });
19060
19065
  };
19066
+ PdftronComponent.prototype.addPrintButton = function () {
19067
+ var _this = this;
19068
+ this.webViewerInstance.setHeaderItems(function (header) {
19069
+ header.push({
19070
+ type: 'actionButton',
19071
+ 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>',
19072
+ title: 'Print',
19073
+ onClick: function () {
19074
+ _this.pdftronService.instance.print();
19075
+ _this.events.next('print');
19076
+ },
19077
+ });
19078
+ });
19079
+ };
19061
19080
  PdftronComponent.prototype.addWatermark = function () {
19062
19081
  var userinfo = this.nuxeo.nuxeoClient.user.properties;
19063
19082
  this.pdftronService.addWatermark(userinfo.username + " "
@@ -19101,7 +19120,14 @@
19101
19120
  });
19102
19121
  }
19103
19122
  this.isFetching = false;
19104
- if (this.environment.enableViewerWaterMark) {
19123
+ // if we need to check on secrecy level for adding water mark or not
19124
+ if (this.environment.enableViewerWaterMark && this.secrecyProperty) {
19125
+ // check for secrecy level befor adding watermark
19126
+ if (this.correspondance.properties[this.secrecyProperty] !== 'Normal') {
19127
+ this.addWatermark();
19128
+ }
19129
+ }
19130
+ else if (this.environment.enableViewerWaterMark && !this.secrecyProperty) {
19105
19131
  this.addWatermark();
19106
19132
  }
19107
19133
  this.cdr.detectChanges();
@@ -19182,7 +19208,7 @@
19182
19208
  return PdftronComponent;
19183
19209
  }());
19184
19210
  PdftronComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: PdftronComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: PdftronService }, { token: NuxeoService$1 }, { token: i3.APP_BASE_HREF }, { token: SecurePipe }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Component });
19185
- PdftronComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "<div #fileViewer style=\"width: 100%; height: 100%;\"></div>\r\n", styles: [""] });
19211
+ PdftronComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "<div #fileViewer style=\"width: 100%; height: 100%;\"></div>\r\n", styles: [""] });
19186
19212
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: PdftronComponent, decorators: [{
19187
19213
  type: i0.Component,
19188
19214
  args: [{
@@ -19222,6 +19248,10 @@
19222
19248
  type: i0.Input
19223
19249
  }], correspondance: [{
19224
19250
  type: i0.Input
19251
+ }], secrecyProperty: [{
19252
+ type: i0.Input
19253
+ }], events: [{
19254
+ type: i0.Output
19225
19255
  }] } });
19226
19256
 
19227
19257
  var PdfTronModule = /** @class */ (function () {