nuxeo-development-framework 5.2.8 → 5.3.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.
@@ -2453,6 +2453,8 @@
2453
2453
  _this.dialogRef.close(value);
2454
2454
  }, function (err) {
2455
2455
  _this.loading = false;
2456
+ }, function () {
2457
+ _this.loading = false;
2456
2458
  });
2457
2459
  }
2458
2460
  else {
@@ -3773,7 +3775,34 @@
3773
3775
  }] }];
3774
3776
  } });
3775
3777
 
3776
- var _BaseService_nuxeoService, _BaseService_callApiService, _BaseService_cacheBaseService;
3778
+ var _ApisErrorsMessagesService_handlerFn;
3779
+ var ApisErrorsMessagesService = /** @class */ (function () {
3780
+ function ApisErrorsMessagesService() {
3781
+ _ApisErrorsMessagesService_handlerFn.set(this, function () {
3782
+ return rxjs.pipe(operators.catchError(function (err) {
3783
+ throw err;
3784
+ }));
3785
+ });
3786
+ }
3787
+ ApisErrorsMessagesService.prototype.setErrorHandler = function (handler) {
3788
+ __classPrivateFieldSet(this, _ApisErrorsMessagesService_handlerFn, handler, "f");
3789
+ };
3790
+ ApisErrorsMessagesService.prototype.handleErrorMessage = function () {
3791
+ return __classPrivateFieldGet(this, _ApisErrorsMessagesService_handlerFn, "f").call(this);
3792
+ };
3793
+ return ApisErrorsMessagesService;
3794
+ }());
3795
+ _ApisErrorsMessagesService_handlerFn = new WeakMap();
3796
+ ApisErrorsMessagesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ApisErrorsMessagesService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
3797
+ ApisErrorsMessagesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ApisErrorsMessagesService, providedIn: 'root' });
3798
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ApisErrorsMessagesService, decorators: [{
3799
+ type: i0.Injectable,
3800
+ args: [{
3801
+ providedIn: 'root'
3802
+ }]
3803
+ }] });
3804
+
3805
+ var _BaseService_nuxeoService, _BaseService_callApiService, _BaseService_cacheBaseService, _BaseService_apisErrorsService;
3777
3806
  var BaseService = /** @class */ (function (_super) {
3778
3807
  __extends(BaseService, _super);
3779
3808
  function BaseService(injector) {
@@ -3781,9 +3810,11 @@
3781
3810
  _BaseService_nuxeoService.set(_this, void 0);
3782
3811
  _BaseService_callApiService.set(_this, void 0);
3783
3812
  _BaseService_cacheBaseService.set(_this, void 0);
3813
+ _BaseService_apisErrorsService.set(_this, void 0);
3784
3814
  __classPrivateFieldSet(_this, _BaseService_nuxeoService, injector.get(NuxeoService), "f");
3785
3815
  __classPrivateFieldSet(_this, _BaseService_callApiService, injector.get(CallApiService), "f");
3786
3816
  __classPrivateFieldSet(_this, _BaseService_cacheBaseService, injector.get(CacheBaseService), "f");
3817
+ __classPrivateFieldSet(_this, _BaseService_apisErrorsService, injector.get(ApisErrorsMessagesService), "f");
3787
3818
  _this.adapterService = injector.get(AdapterService);
3788
3819
  _this.translateService = injector.get(i1.TranslateService);
3789
3820
  __classPrivateFieldGet(_this, _BaseService_cacheBaseService, "f").validateTTL(_this.userName);
@@ -3834,7 +3865,7 @@
3834
3865
  .input(input ? input : undefined)
3835
3866
  .params(params ? Object.assign({}, params) : undefined)
3836
3867
  .context(context ? Object.assign({}, context) : undefined)
3837
- .execute({ headers: headers ? Object.assign({}, headers) : undefined })).pipe(operators.map(function (response) { return response; }), this.catchErrors());
3868
+ .execute({ headers: headers ? Object.assign({}, headers) : undefined })).pipe(operators.map(function (response) { return response; }), __classPrivateFieldGet(this, _BaseService_apisErrorsService, "f").handleErrorMessage());
3838
3869
  };
3839
3870
  BaseService.prototype.customAutomation = function (operationOrOptions, input, params, context, headers) {
3840
3871
  if (input === void 0) { input = undefined; }
@@ -3948,7 +3979,7 @@
3948
3979
  };
3949
3980
  return BaseService;
3950
3981
  }(HttpBaseService));
3951
- _BaseService_nuxeoService = new WeakMap(), _BaseService_callApiService = new WeakMap(), _BaseService_cacheBaseService = new WeakMap();
3982
+ _BaseService_nuxeoService = new WeakMap(), _BaseService_callApiService = new WeakMap(), _BaseService_cacheBaseService = new WeakMap(), _BaseService_apisErrorsService = new WeakMap();
3952
3983
  BaseService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseService, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
3953
3984
  BaseService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseService, providedIn: 'root' });
3954
3985
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseService, decorators: [{
@@ -40907,7 +40938,7 @@
40907
40938
  return NotificationsButtonComponent;
40908
40939
  }(BaseNotification));
40909
40940
  NotificationsButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NotificationsButtonComponent, deps: [{ token: i0__namespace.Injector }, { token: TranslationService }, { token: CustomToastrService }, { token: i0__namespace.ChangeDetectorRef }, { token: NOTIFICATIONS_LIST_OPTIONS, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
40910
- NotificationsButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NotificationsButtonComponent, selector: "app-notifications-button", inputs: { styleClass: "styleClass", badgeOptions: "badgeOptions", shouldMarkAsUnread: "shouldMarkAsUnread", ignoredToastEvents: "ignoredToastEvents" }, outputs: { listItemClick: "listItemClick", openSettings: "openSettings", openNotifications: "openNotifications", onNotification: "onNotification" }, host: { classAttribute: "inline-flex justify-center items-center notification-button" }, queries: [{ propertyName: "customIconTemplate", first: true, predicate: NOTIFICATION_ICON, descendants: true, read: i0.TemplateRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<button\r\n *ngIf=\"panelMode === panelModeEnum.panel\"\r\n [matMenuTriggerFor]=\"notifications\"\r\n [matBadge]=\"newNotificationCount$ | async\"\r\n [matBadgeHidden]=\"!(showBadge$ | async)\"\r\n [matBadgeSize]=\"badgeOptions.size\"\r\n [matBadgeColor]=\"badgeOptions.color\"\r\n [matBadgePosition]=\"badgeOptions.position\"\r\n [class]=\"styleClass\"\r\n (menuOpened)=\"markAllAsUnread()\"\r\n>\r\n <ng-container [ngTemplateOutlet]=\"customIconTemplate || defaultIconTemplate\">\r\n </ng-container>\r\n</button>\r\n\r\n<mat-menu #notifications=\"matMenu\" class=\"notification-list-panel\">\r\n <ng-template matMenuContent>\r\n <app-notifications-list\r\n (itemClicked)=\"listItemClick.emit($event); notifications.closed.emit()\"\r\n (openSettings)=\"openSettings.emit($event); notifications.closed.emit()\"\r\n (openNotifications)=\"openNotifications.emit($event); notifications.closed.emit()\"\r\n (markAllRead)=\"refreshUnreadCount()\"\r\n ></app-notifications-list>\r\n </ng-template>\r\n <div class=\"notification-list-panel__footer flex justify-center\">\r\n <ng-content select=\"[notifications-footer]\"></ng-content>\r\n </div>\r\n</mat-menu>\r\n\r\n<ng-container *ngIf=\"panelMode === panelModeEnum.sidebar\">\r\n <button\r\n [matBadge]=\"newNotificationCount$ | async\"\r\n [matBadgeHidden]=\"!(showBadge$ | async)\"\r\n [matBadgeSize]=\"badgeOptions.size\"\r\n [matBadgeColor]=\"badgeOptions.color\"\r\n [matBadgePosition]=\"badgeOptions.position\"\r\n [class]=\"styleClass\"\r\n (click)=\"toggleSideBar(); markAllAsUnread()\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"customIconTemplate || defaultIconTemplate\">\r\n </ng-container>\r\n </button>\r\n <app-notifications-sidebar\r\n [(visible)]=\"isSidebarOpened\"\r\n (visibleChange)=\"refreshUnreadCount()\"\r\n [position]=\"sidebarPosition$ | async\"\r\n >\r\n <ng-template appNotificationSidebarContent>\r\n <app-notifications-list\r\n class=\"notifications-sidebar\"\r\n (itemClicked)=\"\r\n listItemClick.emit($event); toggleSideBar(false); refreshUnreadCount()\r\n \"\r\n (openSettings)=\"openSettings.emit($event); toggleSideBar(false)\"\r\n (openNotifications)=\"openNotifications.emit($event); toggleSideBar(false)\"\r\n (markAllRead)=\"refreshUnreadCount()\"\r\n ></app-notifications-list>\r\n </ng-template>\r\n </app-notifications-sidebar>\r\n</ng-container>\r\n\r\n<ng-template #defaultIconTemplate>\r\n <i class=\"bi bi-bell bell\"></i>\r\n</ng-template>\r\n", styles: [".notification-button{font-size:var(--not-btn-font-size, 1.5rem);width:var(--not-btn-width, 40px)}.notification-button .mat-badge-content{text-overflow:unset;width:18px;height:18px;line-height:18px}.notification-list-panel{--width: var(--nos-panel-width, min(80vw, 450px));width:var(--width);border-radius:var(--nos-panel-radius, 5px);overflow:hidden;-webkit-overflow-scrolling:touch;outline:0;background:var(--nos-panel-background, #fff)}.notification-list-panel.mat-menu-panel{max-width:var(--width);max-height:var(--nos-panel-max-height, var(--height))}.notification-list-panel__navigate-btn{background:var(--not-btn-background, transparent);border-radius:var(--not-btn-radius, 5px);padding:var(--not-btn-padding, .5rem 1rem);margin:var(--not-btn-margin, .5rem 0);color:var(--not-btn-color, currentColor);width:var(--not-btn-width, 90%)}.notification-list-panel__navigate-btn:hover{--not-btn-background: var(--not-btn-hover-background, #f0f0f0);--not-btn-color: var(--not-btn-hover-color);-webkit-text-decoration:var(--not-btn-decoration, none);text-decoration:var(--not-btn-decoration, none)}.notification-list-panel__navigate-btn:active{--not-btn-background: var(--not-btn-active-background, #e2e2e2);--not-btn-color: var(--not-btn-active-color)}.notifications-sidebar{--nto-list-header-padding: var(--sidebar-list-header-padding, 1rem);--nto-list-height: var(--sidebar-list-height, calc(100vh - 100px))}\n"], components: [{ type: i3__namespace$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: NotificationsListComponent, selector: "app-notifications-list", outputs: ["openSettings", "openNotifications"] }, { type: NotificationsSidebarComponent, selector: "app-notifications-sidebar", inputs: ["appendToBody", "clearOnCLose", "visible", "position"], outputs: ["visibleChange", "onShow", "onHide"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["matMenuTriggerRestoreFocus", "mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { type: i7__namespace$2.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgePosition", "matBadgeSize", "matBadgeColor", "matBadgeOverlap", "matBadgeDescription", "matBadgeHidden", "matBadge"] }, { type: i4__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3__namespace$2.MatMenuContent, selector: "ng-template[matMenuContent]" }, { type: NotificationSidebarContentDirective, selector: "[appNotificationSidebarContent]" }], pipes: { "async": i4__namespace$1.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
40941
+ NotificationsButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NotificationsButtonComponent, selector: "app-notifications-button", inputs: { styleClass: "styleClass", badgeOptions: "badgeOptions", shouldMarkAsUnread: "shouldMarkAsUnread", ignoredToastEvents: "ignoredToastEvents" }, outputs: { listItemClick: "listItemClick", openSettings: "openSettings", openNotifications: "openNotifications", onNotification: "onNotification" }, host: { classAttribute: "inline-flex justify-center items-center notification-button" }, queries: [{ propertyName: "customIconTemplate", first: true, predicate: NOTIFICATION_ICON, descendants: true, read: i0.TemplateRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<button\r\n\t*ngIf=\"panelMode === panelModeEnum.panel\"\r\n\t[matMenuTriggerFor]=\"notifications\"\r\n\t[matBadge]=\"newNotificationCount$ | async\"\r\n\t[matBadgeHidden]=\"!(showBadge$ | async)\"\r\n\t[matBadgeSize]=\"badgeOptions.size\"\r\n\t[matBadgeColor]=\"badgeOptions.color\"\r\n\t[matBadgePosition]=\"badgeOptions.position\"\r\n\t[class]=\"styleClass\"\r\n>\r\n\t<ng-container [ngTemplateOutlet]=\"customIconTemplate || defaultIconTemplate\"> </ng-container>\r\n</button>\r\n\r\n<mat-menu #notifications=\"matMenu\" class=\"notification-list-panel\">\r\n\t<ng-template matMenuContent>\r\n\t\t<app-notifications-list\r\n\t\t\t(itemClicked)=\"listItemClick.emit($event); notifications.closed.emit()\"\r\n\t\t\t(openSettings)=\"openSettings.emit($event); notifications.closed.emit()\"\r\n\t\t\t(openNotifications)=\"openNotifications.emit($event); notifications.closed.emit()\"\r\n\t\t\t(markAllRead)=\"refreshUnreadCount()\"\r\n\t\t></app-notifications-list>\r\n\t</ng-template>\r\n\t<div class=\"notification-list-panel__footer flex justify-center\">\r\n\t\t<ng-content select=\"[notifications-footer]\"></ng-content>\r\n\t</div>\r\n</mat-menu>\r\n\r\n<ng-container *ngIf=\"panelMode === panelModeEnum.sidebar\">\r\n\t<button\r\n\t\t[matBadge]=\"newNotificationCount$ | async\"\r\n\t\t[matBadgeHidden]=\"!(showBadge$ | async)\"\r\n\t\t[matBadgeSize]=\"badgeOptions.size\"\r\n\t\t[matBadgeColor]=\"badgeOptions.color\"\r\n\t\t[matBadgePosition]=\"badgeOptions.position\"\r\n\t\t[class]=\"styleClass\"\r\n\t\t(click)=\"toggleSideBar()\"\r\n\t>\r\n\t\t<ng-container [ngTemplateOutlet]=\"customIconTemplate || defaultIconTemplate\"> </ng-container>\r\n\t</button>\r\n\t<app-notifications-sidebar\r\n\t\t[(visible)]=\"isSidebarOpened\"\r\n\t\t(visibleChange)=\"refreshUnreadCount()\"\r\n\t\t[position]=\"sidebarPosition$ | async\"\r\n\t>\r\n\t\t<ng-template appNotificationSidebarContent>\r\n\t\t\t<app-notifications-list\r\n\t\t\t\tclass=\"notifications-sidebar\"\r\n\t\t\t\t(itemClicked)=\"listItemClick.emit($event); toggleSideBar(false); refreshUnreadCount()\"\r\n\t\t\t\t(openSettings)=\"openSettings.emit($event); toggleSideBar(false)\"\r\n\t\t\t\t(openNotifications)=\"openNotifications.emit($event); toggleSideBar(false)\"\r\n\t\t\t\t(markAllRead)=\"refreshUnreadCount()\"\r\n\t\t\t></app-notifications-list>\r\n\t\t</ng-template>\r\n\t</app-notifications-sidebar>\r\n</ng-container>\r\n\r\n<ng-template #defaultIconTemplate>\r\n\t<i class=\"bi bi-bell bell\"></i>\r\n</ng-template>\r\n", styles: [".notification-button{font-size:var(--not-btn-font-size, 1.5rem);width:var(--not-btn-width, 40px)}.notification-button .mat-badge-content{text-overflow:unset;width:18px;height:18px;line-height:18px}.notification-list-panel{--width: var(--nos-panel-width, min(80vw, 450px));width:var(--width);border-radius:var(--nos-panel-radius, 5px);overflow:hidden;-webkit-overflow-scrolling:touch;outline:0;background:var(--nos-panel-background, #fff)}.notification-list-panel.mat-menu-panel{max-width:var(--width);max-height:var(--nos-panel-max-height, var(--height))}.notification-list-panel__navigate-btn{background:var(--not-btn-background, transparent);border-radius:var(--not-btn-radius, 5px);padding:var(--not-btn-padding, .5rem 1rem);margin:var(--not-btn-margin, .5rem 0);color:var(--not-btn-color, currentColor);width:var(--not-btn-width, 90%)}.notification-list-panel__navigate-btn:hover{--not-btn-background: var(--not-btn-hover-background, #f0f0f0);--not-btn-color: var(--not-btn-hover-color);-webkit-text-decoration:var(--not-btn-decoration, none);text-decoration:var(--not-btn-decoration, none)}.notification-list-panel__navigate-btn:active{--not-btn-background: var(--not-btn-active-background, #e2e2e2);--not-btn-color: var(--not-btn-active-color)}.notifications-sidebar{--nto-list-header-padding: var(--sidebar-list-header-padding, 1rem);--nto-list-height: var(--sidebar-list-height, calc(100vh - 100px))}\n"], components: [{ type: i3__namespace$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: NotificationsListComponent, selector: "app-notifications-list", outputs: ["openSettings", "openNotifications"] }, { type: NotificationsSidebarComponent, selector: "app-notifications-sidebar", inputs: ["appendToBody", "clearOnCLose", "visible", "position"], outputs: ["visibleChange", "onShow", "onHide"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["matMenuTriggerRestoreFocus", "mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { type: i7__namespace$2.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgePosition", "matBadgeSize", "matBadgeColor", "matBadgeOverlap", "matBadgeDescription", "matBadgeHidden", "matBadge"] }, { type: i4__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3__namespace$2.MatMenuContent, selector: "ng-template[matMenuContent]" }, { type: NotificationSidebarContentDirective, selector: "[appNotificationSidebarContent]" }], pipes: { "async": i4__namespace$1.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
40911
40942
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NotificationsButtonComponent, decorators: [{
40912
40943
  type: i0.Component,
40913
40944
  args: [{
@@ -42763,6 +42794,7 @@
42763
42794
  exports.AggregationRadioComponent = AggregationRadioComponent;
42764
42795
  exports.AggregationSelectComponent = AggregationSelectComponent;
42765
42796
  exports.AggregationSwitchComponent = AggregationSwitchComponent;
42797
+ exports.ApisErrorsMessagesService = ApisErrorsMessagesService;
42766
42798
  exports.AppConfigService = AppConfigService;
42767
42799
  exports.AppHasRoleDirective = AppHasRoleDirective;
42768
42800
  exports.AttachmentItemComponent = AttachmentItemComponent;