nuxeo-development-framework 3.1.1 → 3.1.3

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.
@@ -23476,31 +23476,62 @@
23476
23476
  //console.log(res);
23477
23477
  res.entries.filter(function (f) { return !_this.myConfigService.myConfiguration.logs.excludedStates.includes(f.eventId); })
23478
23478
  .map(function (item) {
23479
- _this.activitylog.push(
23480
- // {
23481
- // documentLifecycle : 'registered', //'doclifecycle'
23482
- // eventName:'incoming_register', //eventId
23483
- // eventDate: '2021-09-27T10:42:38.000Z', // eventDate
23484
- // creator:{
23485
- // properties : {
23486
- // firstName: "Cts",
23487
- // lastName: "Sec"
23488
- // }
23489
- // },
23490
- // documentName:'edge incoming 4 ' // pass from outside
23491
- // }
23492
- {
23493
- documentLifecycle: item.docLifeCycle,
23494
- eventName: item.eventId,
23495
- eventDate: item.eventDate,
23496
- creator: {
23497
- properties: {
23498
- firstName: item.principalName,
23499
- lastName: ''
23500
- }
23501
- },
23502
- documentName: _this.documentTitle
23503
- });
23479
+ var _a, _b, _c;
23480
+ if ((item === null || item === void 0 ? void 0 : item.eventId) == "Download") {
23481
+ item.principalName = (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.comment) === null || _a === void 0 ? void 0 : _a.split(",")[1]) === null || _b === void 0 ? void 0 : _b.split(":")[1]) === null || _c === void 0 ? void 0 : _c.split("'")[0];
23482
+ _this.activitylog.push(
23483
+ // {
23484
+ // documentLifecycle : 'registered', //'doclifecycle'
23485
+ // eventName:'incoming_register', //eventId
23486
+ // eventDate: '2021-09-27T10:42:38.000Z', // eventDate
23487
+ // creator:{
23488
+ // properties : {
23489
+ // firstName: "Cts",
23490
+ // lastName: "Sec"
23491
+ // }
23492
+ // },
23493
+ // documentName:'edge incoming 4 ' // pass from outside
23494
+ // }
23495
+ {
23496
+ documentLifecycle: item.docLifeCycle,
23497
+ eventName: item.eventId,
23498
+ eventDate: item.eventDate,
23499
+ creator: {
23500
+ properties: {
23501
+ firstName: item.principalName,
23502
+ lastName: ''
23503
+ }
23504
+ },
23505
+ documentName: _this.documentTitle
23506
+ });
23507
+ }
23508
+ else {
23509
+ _this.activitylog.push(
23510
+ // {
23511
+ // documentLifecycle : 'registered', //'doclifecycle'
23512
+ // eventName:'incoming_register', //eventId
23513
+ // eventDate: '2021-09-27T10:42:38.000Z', // eventDate
23514
+ // creator:{
23515
+ // properties : {
23516
+ // firstName: "Cts",
23517
+ // lastName: "Sec"
23518
+ // }
23519
+ // },
23520
+ // documentName:'edge incoming 4 ' // pass from outside
23521
+ // }
23522
+ {
23523
+ documentLifecycle: item.docLifeCycle,
23524
+ eventName: item.eventId,
23525
+ eventDate: item.eventDate,
23526
+ creator: {
23527
+ properties: {
23528
+ firstName: item.principalName,
23529
+ lastName: ''
23530
+ }
23531
+ },
23532
+ documentName: _this.documentTitle
23533
+ });
23534
+ }
23504
23535
  });
23505
23536
  _this.isFetching = false;
23506
23537
  _this.success.emit(true);
@@ -26504,6 +26535,7 @@
26504
26535
  "mySection": this.PublicationForm.get('target').value
26505
26536
  };
26506
26537
  if (this.data.PublishType == "File") {
26538
+ var Id_1;
26507
26539
  switch (this.PublicationForm.get('renditionName').value) {
26508
26540
  case 'none': {
26509
26541
  break;
@@ -26512,16 +26544,18 @@
26512
26544
  default: params["myRenditionName"] = this.PublicationForm.get('renditionName').value;
26513
26545
  }
26514
26546
  }
26515
- this.subscribtion.concat([this.publishing.publishDocument(this.data.id, params).subscribe(function (res) {
26547
+ var Id;
26548
+ (this.data.PublishType == "File") ? Id = (this.fetchedVersionDoc) ? this.fetchedVersionDoc.versionDocId : this.data.file.uid : Id = (this.fetchedVersionDoc) ? this.fetchedVersionDoc.versionDocId : this.data.id;
26549
+ this.subscribtion.concat([this.publishing.publishDocument(Id, params).subscribe(function (res) {
26516
26550
  if (res) {
26517
26551
  _this.publishing.newPublished.next(true);
26518
- _this.tosterService.show('success', 'TOASTER.SUCCESS', "TOASTER.publish_success");
26552
+ (_this.data.PublishType == "File") ? _this.tosterService.show('success', 'TOASTER.SUCCESS', "TOASTER.publishDocument_success") : _this.tosterService.show('success', 'TOASTER.SUCCESS', "TOASTER.publishFolder_success");
26519
26553
  setTimeout(function () {
26520
26554
  _this.close();
26521
26555
  }, 500);
26522
26556
  }
26523
26557
  }, function (err) {
26524
- _this.tosterService.show('error', 'TOASTER.ERROR', 'TOASTER.publish_fail');
26558
+ (_this.data.PublishType == "File") ? _this.tosterService.show('error', 'TOASTER.ERROR', 'TOASTER.publishDocument_fail') : _this.tosterService.show('error', 'TOASTER.ERROR', 'TOASTER.publishFolder_fail');
26525
26559
  _this.startPublishing = false;
26526
26560
  })]);
26527
26561
  };
@@ -26531,7 +26565,7 @@
26531
26565
  return PublishDialogComponent;
26532
26566
  }());
26533
26567
  PublishDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: PublishDialogComponent, deps: [{ token: PublishingDocumentService }, { token: i1__namespace$6.MatDialogRef }, { token: i1$6.MAT_DIALOG_DATA }, { token: CustomToastrService }, { token: i1__namespace$1.TranslateService }], target: i0__namespace.ɵɵFactoryTarget.Component });
26534
- PublishDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: PublishDialogComponent, selector: "app-publish-dialog", ngImport: i0__namespace, template: "<form [formGroup]=\"PublicationForm\" class=\"h-full\" SetRtl>\r\n <span class=\"text-gray-900 text-lg\">\r\n {{ \"publishDocs.publishDialogTitle\" | translate }}\r\n </span>\r\n <div class=\"flex flex-col justify-between h-full\">\r\n <!--Form Section-->\r\n <div class=\"mt-2\" *ngIf=\"!startPublishing; else loading\">\r\n <div class=\"mb-3\">\r\n <label class=\"text-base font-bold mb-0\">\r\n {{ \"publishDocs.target\" | translate }}\r\n <span class=\"text-danger\">*</span>\r\n </label>\r\n <ng-select [items]=\"sections\" bindLabel=\"title\" bindValue=\"uid\"\r\n [placeholder]=\"'publishDocs.targetPlaceholder' | translate\" formControlName=\"target\">\r\n </ng-select>\r\n <div *ngIf=\"PublicationForm.get('target').touched && PublicationForm.get('target').errors?.required\">\r\n <span class=\"text-red-500 text-base\">\r\n {{ \"publishDocs.target\" | translate }}\r\n {{ \"VALIDATORS.REQUIRED\" | translate }}\r\n </span>\r\n </div>\r\n </div>\r\n <div *ngIf=\"data.PublishType == 'File'\" class=\"mb-3\">\r\n <label class=\"text-base font-bold mb-0\">\r\n {{ \"publishDocs.rendition\" | translate }}\r\n </label>\r\n <ng-select [items]=\"renditionList\" bindLabel=\"name\" bindValue=\"value\"\r\n [(ngModel)]=\"initialRenditionValue\" formControlName=\"renditionName\">\r\n </ng-select>\r\n </div>\r\n </div>\r\n <ng-template #loading>\r\n <span class=\"flex h-full justify-center items-center\"> {{ \"publishDocs.doingPublish\" | translate }}</span>\r\n </ng-template>\r\n <!--Buttons Section-->\r\n <div class=\"d-flex justify-end mb-10\">\r\n <button class=\"cancelation-button\" (click)=\"close()\">\r\n {{ \"BUTTONS.Cancel\" | translate }}\r\n </button>\r\n <button class=\"submission-button\" (click)=\"publish()\" [disabled]=\"!PublicationForm.valid\">\r\n {{ \"BUTTONS.PUBLISH\" | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n</form>", styles: [""], components: [{ type: i4__namespace$1.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"] }], directives: [{ type: i6__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: SetRtlDirective, selector: "[SetRtl]" }, { type: i6__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1__namespace$1.TranslatePipe } });
26568
+ PublishDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: PublishDialogComponent, selector: "app-publish-dialog", ngImport: i0__namespace, template: "<form [formGroup]=\"PublicationForm\" class=\"h-full\" SetRtl>\r\n <span class=\"text-gray-900 text-lg\">\r\n {{ \"publishDocs.publishDialogTitle\" | translate }}\r\n </span>\r\n <div class=\"flex flex-col justify-between h-full\">\r\n <!--Form Section-->\r\n <div class=\"mt-2\" *ngIf=\"!startPublishing; else loading\">\r\n <div class=\"mb-3\">\r\n <label class=\"text-base font-bold mb-0\">\r\n {{ \"publishDocs.target\" | translate }}\r\n <span class=\"text-danger\">*</span>\r\n </label>\r\n <ng-select [items]=\"sections\" bindLabel=\"title\" bindValue=\"uid\"\r\n [placeholder]=\"'publishDocs.targetPlaceholder' | translate\" formControlName=\"target\">\r\n </ng-select>\r\n <div *ngIf=\"PublicationForm.get('target').touched && PublicationForm.get('target').errors?.required\">\r\n <span class=\"text-red-500 text-base\">\r\n {{ \"publishDocs.target\" | translate }}\r\n {{ \"VALIDATORS.REQUIRED\" | translate }}\r\n </span>\r\n </div>\r\n </div>\r\n <div *ngIf=\"data.PublishType == 'File'\" class=\"mb-3\">\r\n <label class=\"text-base font-bold mb-0\">\r\n {{ \"publishDocs.rendition\" | translate }}\r\n </label>\r\n <ng-select [items]=\"renditionList\" bindLabel=\"name\" bindValue=\"value\"\r\n [(ngModel)]=\"initialRenditionValue\" formControlName=\"renditionName\">\r\n </ng-select>\r\n </div>\r\n </div>\r\n <ng-template #loading>\r\n <span class=\"flex h-full justify-center items-center\"> {{ \"publishDocs.doingPublish\" | translate }}</span>\r\n </ng-template>\r\n <!--Buttons Section-->\r\n <div class=\"d-flex justify-end mb-10\">\r\n <button class=\"submission-button\" (click)=\"publish()\" [disabled]=\"!PublicationForm.valid\">\r\n {{ \"BUTTONS.PUBLISH\" | translate }}\r\n </button>\r\n <button class=\"cancelation-button\" (click)=\"close()\">\r\n {{ \"BUTTONS.Cancel\" | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n</form>", styles: [""], components: [{ type: i4__namespace$1.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"] }], directives: [{ type: i6__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: SetRtlDirective, selector: "[SetRtl]" }, { type: i6__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1__namespace$1.TranslatePipe } });
26535
26569
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: PublishDialogComponent, decorators: [{
26536
26570
  type: i0.Component,
26537
26571
  args: [{