nuxeo-development-framework 3.6.8 → 3.6.9

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.
@@ -20443,11 +20443,13 @@
20443
20443
  * ></cts-versions>
20444
20444
  */
20445
20445
  var VersionsComponent = /** @class */ (function () {
20446
- function VersionsComponent(viewerFilesService, documentsApi) {
20446
+ function VersionsComponent(viewerFilesService, trnaslationService, documentsApi) {
20447
20447
  this.viewerFilesService = viewerFilesService;
20448
+ this.trnaslationService = trnaslationService;
20448
20449
  this.documentsApi = documentsApi;
20449
20450
  this.handleActions = new i0.EventEmitter();
20450
20451
  this.versions = [];
20452
+ this.isArabic = false;
20451
20453
  }
20452
20454
  VersionsComponent.prototype.ngOnChanges = function (changes) {
20453
20455
  if (changes.file && changes.file.currentValue &&
@@ -20456,6 +20458,10 @@
20456
20458
  }
20457
20459
  };
20458
20460
  VersionsComponent.prototype.ngOnInit = function () {
20461
+ var _this = this;
20462
+ this.langSubscription = this.trnaslationService.isArabic$.subscribe(function (res) {
20463
+ _this.isArabic = res;
20464
+ });
20459
20465
  this.getVersions();
20460
20466
  };
20461
20467
  VersionsComponent.prototype.getVersion = function (version) {
@@ -20476,10 +20482,13 @@
20476
20482
  VersionsComponent.prototype.handleAction = function (event) {
20477
20483
  this.handleActions.emit(event);
20478
20484
  };
20485
+ VersionsComponent.prototype.ngOnDestroy = function () {
20486
+ this.langSubscription ? this.langSubscription.unsubscribe() : null;
20487
+ };
20479
20488
  return VersionsComponent;
20480
20489
  }());
20481
- VersionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: VersionsComponent, deps: [{ token: ViewerFilesService }, { token: DocumentsService }], target: i0__namespace.ɵɵFactoryTarget.Component });
20482
- VersionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: VersionsComponent, selector: "cts-versions", inputs: { selectedVersion: "selectedVersion", file: "file", actions: "actions" }, outputs: { handleActions: "handleActions" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"flex flex-col\">\r\n<div class=\"viewer-attachments\">\r\n <div class=\"subheader\">\r\n <div> {{ \"viewer.current\" | translate }}</div>\r\n\r\n </div>\r\n <div class=\"attachments-list\">\r\n <mat-list>\r\n <div class=\"mat-list-items\">\r\n <cts-item-list [item]=\"file\" [title]=\"file.title\" [iconname]=\"'description'\" [moreclasses]=\"'text-danger'\"\r\n [actions]=\"actions\" (itemClicked)=\"showVersion(file)\" (actionclicked)=\"handleAction($event)\">\r\n <div class=\"description\">\r\n {{getVersion(file)}}\r\n -\r\n {{ file.lastModified | localizedDate }}\r\n </div>\r\n </cts-item-list>\r\n </div>\r\n </mat-list>\r\n </div>\r\n</div>\r\n\r\n<div class=\"viewer-attachments original-section\" *ngIf=\"versions.length > 0\">\r\n <div class=\"subheader\">\r\n <div>{{ \"viewer.origin\" | translate }}</div>\r\n </div>\r\n <div class=\"attachments-list\">\r\n <mat-list>\r\n <div class=\"mat-list-items\">\r\n <cts-item-list [item]=\"versions[versions.length -1]\" [title]=\"versions[versions.length -1].title\"\r\n [iconname]=\"'description'\" [moreclasses]=\"'text-danger'\" [actions]=\"actions\"\r\n (itemClicked)=\"showVersion(versions[versions.length -1])\" (actionclicked)=\"handleAction($event)\">\r\n\r\n </cts-item-list>\r\n </div>\r\n </mat-list>\r\n </div>\r\n</div>\r\n\r\n<div class=\"viewer-attachments\" *permission=\"{name: 'viewVersions', entity: file}\">\r\n <div class=\"subheader\">\r\n <div> {{ \"viewer.history\" | translate }}</div>\r\n\r\n </div>\r\n <div class=\"attachments-list\" *ngIf=\"versions.length > 0\">\r\n <ng-container>\r\n\r\n\r\n <mat-list>\r\n <div class=\"mat-list-items\" *ngFor=\"let version of versions ;let cnt = count; let i = index\">\r\n <cts-item-list [item]=\"version\" [title]=\"version.title + '-' + getVersion(version)\" [iconname]=\"'description'\"\r\n [moreclasses]=\"'text-danger'\" (itemClicked)=\"showVersion(version)\" [actions]=\"actions\" (actionclicked)=\"handleAction($event)\">\r\n <div class=\"description\">\r\n {{getVersion(version)}}\r\n -\r\n {{ version.lastModified | localizedDate }}\r\n <span class=\"font-weight-bold\">\r\n\r\n {{\r\n version.properties.lastContributor.id === 'system' ?\r\n ('SYSTEM_ADMIN' | translate) :\r\n version.properties.lastContributor.properties.firstName +\r\n \" \" +\r\n version.properties.lastContributor.properties.lastName\r\n }}\r\n </span>\r\n </div>\r\n </cts-item-list>\r\n </div>\r\n </mat-list>\r\n </ng-container>\r\n </div>\r\n <div *ngIf=\"versions.length === 0\">\r\n <cts-no-data></cts-no-data>\r\n </div>\r\n</div>\r\n</div>\r\n<ng-template #noEntry>\r\n\r\n</ng-template>", styles: [""], components: [{ type: i2__namespace$3.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"] }, { type: NoDataComponent, selector: "cts-no-data", inputs: ["message", "border", "img"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: PermissionsDirective, selector: "[permission]", inputs: ["permission"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1__namespace$1.TranslatePipe, "localizedDate": LocalizedDatePipe } });
20490
+ VersionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: VersionsComponent, deps: [{ token: ViewerFilesService }, { token: TranslationService$1 }, { token: DocumentsService }], target: i0__namespace.ɵɵFactoryTarget.Component });
20491
+ VersionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: VersionsComponent, selector: "cts-versions", inputs: { selectedVersion: "selectedVersion", file: "file", actions: "actions" }, outputs: { handleActions: "handleActions" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"flex flex-col\">\r\n<div class=\"viewer-attachments\">\r\n <div class=\"subheader\">\r\n <div> {{ \"viewer.current\" | translate }}</div>\r\n\r\n </div>\r\n <div class=\"attachments-list\">\r\n <mat-list>\r\n <div class=\"mat-list-items\">\r\n <cts-item-list [item]=\"file\" [title]=\"file.title\" [iconname]=\"'description'\" [moreclasses]=\"'text-danger'\"\r\n [actions]=\"actions\" (itemClicked)=\"showVersion(file)\" (actionclicked)=\"handleAction($event)\">\r\n <div class=\"description\">\r\n {{getVersion(file)}}\r\n -\r\n {{ file.lastModified | localizedDate : '' : (isArabic? 'ar-AR' : 'en-US') }}\r\n </div>\r\n </cts-item-list>\r\n </div>\r\n </mat-list>\r\n </div>\r\n</div>\r\n\r\n<div class=\"viewer-attachments original-section\" *ngIf=\"versions.length > 0\">\r\n <div class=\"subheader\">\r\n <div>{{ \"viewer.origin\" | translate }}</div>\r\n </div>\r\n <div class=\"attachments-list\">\r\n <mat-list>\r\n <div class=\"mat-list-items\">\r\n <cts-item-list [item]=\"versions[versions.length -1]\" [title]=\"versions[versions.length -1].title\"\r\n [iconname]=\"'description'\" [moreclasses]=\"'text-danger'\" [actions]=\"actions\"\r\n (itemClicked)=\"showVersion(versions[versions.length -1])\" (actionclicked)=\"handleAction($event)\">\r\n\r\n </cts-item-list>\r\n </div>\r\n </mat-list>\r\n </div>\r\n</div>\r\n\r\n<div class=\"viewer-attachments\" *permission=\"{name: 'viewVersions', entity: file}\">\r\n <div class=\"subheader\">\r\n <div> {{ \"viewer.history\" | translate }}</div>\r\n\r\n </div>\r\n <div class=\"attachments-list\" *ngIf=\"versions.length > 0\">\r\n <ng-container>\r\n\r\n\r\n <mat-list>\r\n <div class=\"mat-list-items\" *ngFor=\"let version of versions ;let cnt = count; let i = index\">\r\n <cts-item-list [item]=\"version\" [title]=\"version.title + '-' + getVersion(version)\" [iconname]=\"'description'\"\r\n [moreclasses]=\"'text-danger'\" (itemClicked)=\"showVersion(version)\" [actions]=\"actions\" (actionclicked)=\"handleAction($event)\">\r\n <div class=\"description\">\r\n {{getVersion(version)}}\r\n -\r\n {{ version.lastModified | localizedDate : '' : (isArabic? 'ar-AR' : 'en-US') }}\r\n <span class=\"font-weight-bold\">\r\n\r\n {{\r\n version.properties.lastContributor.id === 'system' ?\r\n ('SYSTEM_ADMIN' | translate) :\r\n version.properties.lastContributor.properties.firstName +\r\n \" \" +\r\n version.properties.lastContributor.properties.lastName\r\n }}\r\n </span>\r\n </div>\r\n </cts-item-list>\r\n </div>\r\n </mat-list>\r\n </ng-container>\r\n </div>\r\n <div *ngIf=\"versions.length === 0\">\r\n <cts-no-data></cts-no-data>\r\n </div>\r\n</div>\r\n</div>\r\n<ng-template #noEntry>\r\n\r\n</ng-template>", styles: [""], components: [{ type: i2__namespace$3.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"] }, { type: NoDataComponent, selector: "cts-no-data", inputs: ["message", "border", "img"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: PermissionsDirective, selector: "[permission]", inputs: ["permission"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1__namespace$1.TranslatePipe, "localizedDate": LocalizedDatePipe } });
20483
20492
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: VersionsComponent, decorators: [{
20484
20493
  type: i0.Component,
20485
20494
  args: [{
@@ -20487,7 +20496,7 @@
20487
20496
  templateUrl: './versions.component.html',
20488
20497
  styleUrls: ['./versions.component.scss']
20489
20498
  }]
20490
- }], ctorParameters: function () { return [{ type: ViewerFilesService }, { type: DocumentsService }]; }, propDecorators: { selectedVersion: [{
20499
+ }], ctorParameters: function () { return [{ type: ViewerFilesService }, { type: TranslationService$1 }, { type: DocumentsService }]; }, propDecorators: { selectedVersion: [{
20491
20500
  type: i0.Input
20492
20501
  }], file: [{
20493
20502
  type: i0.Input