nuxeo-development-framework 4.4.9 → 4.5.1

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.
@@ -3416,7 +3416,8 @@
3416
3416
  return __classPrivateFieldGet(this, _CacheBaseService_fetchedItems, "f")[options.cacheKey].onFinishFetching.asObservable();
3417
3417
  }
3418
3418
  else {
3419
- return __classPrivateFieldGet(this, _CacheBaseService_instances, "m", _CacheBaseService_handleCacheItems).call(this, options);
3419
+ __classPrivateFieldGet(this, _CacheBaseService_instances, "m", _CacheBaseService_handleCacheItems).call(this, options).pipe(operators.take(1)).subscribe();
3420
+ return __classPrivateFieldGet(this, _CacheBaseService_fetchedItems, "f")[options.cacheKey].onFinishFetching.asObservable();
3420
3421
  }
3421
3422
  };
3422
3423
  return CacheBaseService;
@@ -3475,6 +3476,8 @@
3475
3476
  res.onFinishFetching.next(result);
3476
3477
  res.onFinishFetching.complete();
3477
3478
  return result;
3479
+ }), operators.catchError(function (er) {
3480
+ throw er;
3478
3481
  }));
3479
3482
  }, _CacheBaseService_findNode = function _CacheBaseService_findNode(items, uniqueCompareKey, childrenPath, value) {
3480
3483
  var e_1, _j;
@@ -33009,8 +33012,7 @@
33009
33012
  _this._callApi = _callApi;
33010
33013
  _this._http = _http;
33011
33014
  _this.listenerObserver = new rxjs.Subject();
33012
- if (((_b = (_a = _this._nuxeoService.nuxeoClient) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.id) &&
33013
- ((_c = _this._environment) === null || _c === void 0 ? void 0 : _c.socketUrl)) {
33015
+ 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)) {
33014
33016
  _this.socketConnect()
33015
33017
  .pipe(operators.switchMap(function () { return _this.onMessage$; }), operators.catchError(function (error) {
33016
33018
  console.log(error);
@@ -33024,7 +33026,8 @@
33024
33026
  }
33025
33027
  Object.defineProperty(NotificationsService.prototype, "_tenantId", {
33026
33028
  get: function () {
33027
- return this._nuxeoService.nuxeoClient.user.properties.tenantId;
33029
+ var _a;
33030
+ return (_a = this._nuxeoService.nuxeoClient.user.properties.tenantId) !== null && _a !== void 0 ? _a : '';
33028
33031
  },
33029
33032
  enumerable: false,
33030
33033
  configurable: true
@@ -33042,7 +33045,7 @@
33042
33045
  .query({
33043
33046
  pageProvider: NotificationsService.providers.notificationsMango,
33044
33047
  pageSize: 1,
33045
- notfnotificationcontent_company: this._tenantId,
33048
+ notfnotificationcontent_company: "" + this._tenantId,
33046
33049
  notfnotificationcontent_applicationKey: this._appKey,
33047
33050
  notfnotificationcontent_status: NOTIFICATION_STATUS.new
33048
33051
  }, {})
@@ -33076,7 +33079,7 @@
33076
33079
  };
33077
33080
  NotificationsService.prototype.subscribe = function (id) {
33078
33081
  return this._operation(id, 'subscribe', {
33079
- companyName: this._tenantId
33082
+ companyName: "" + this._tenantId
33080
33083
  });
33081
33084
  };
33082
33085
  NotificationsService.prototype.resetSubscriptions = function () {
@@ -33085,7 +33088,7 @@
33085
33088
  url: "" + this._environment.nuxeo + this._environment.customAutomation
33086
33089
  })
33087
33090
  .params({
33088
- companyName: this._tenantId,
33091
+ companyName: "" + this._tenantId,
33089
33092
  applicationKey: this._appKey
33090
33093
  })
33091
33094
  .execute());
@@ -33109,7 +33112,7 @@
33109
33112
  NotificationsService.prototype.getSubscriptions = function (payload) {
33110
33113
  if (payload === void 0) { payload = {}; }
33111
33114
  return this._callApi
33112
- .query(Object.assign({ pageProvider: NotificationsService.providers.subscription, notfsubscription_companyName: this._tenantId, notfsubscription_applicationKey: this._appKey, pageSize: Number.MAX_SAFE_INTEGER }, payload), {
33115
+ .query(Object.assign({ pageProvider: NotificationsService.providers.subscription, notfsubscription_companyName: "" + this._tenantId, notfsubscription_applicationKey: this._appKey, pageSize: Number.MAX_SAFE_INTEGER }, payload), {
33113
33116
  headers: {
33114
33117
  properties: '*'
33115
33118
  }
@@ -33119,7 +33122,7 @@
33119
33122
  NotificationsService.prototype._getNotifications = function (pageProvider, payload) {
33120
33123
  if (payload === void 0) { payload = {}; }
33121
33124
  return this._callApi
33122
- .query(Object.assign({ pageProvider: pageProvider, notfnotificationcontent_company: this._tenantId, notfnotificationcontent_applicationKey: this._appKey }, payload), {
33125
+ .query(Object.assign({ pageProvider: pageProvider, notfnotificationcontent_company: "" + this._tenantId, notfnotificationcontent_applicationKey: this._appKey }, payload), {
33123
33126
  headers: {
33124
33127
  properties: '*'
33125
33128
  }
@@ -33132,7 +33135,7 @@
33132
33135
  var bearerToken = "Bearer " + token;
33133
33136
  var headers = new i1.HttpHeaders().set('Authorization', bearerToken);
33134
33137
  return headers;
33135
- }), 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; }); }));
33138
+ }), 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); }); }));
33136
33139
  };
33137
33140
  NotificationsService.prototype._operation = function (id, option, params) {
33138
33141
  if (params === void 0) { params = {}; }
@@ -33151,7 +33154,7 @@
33151
33154
  .operation(NotificationsService.operations[option], {
33152
33155
  url: "" + this._environment.nuxeo + this._environment.customAutomation
33153
33156
  })
33154
- .params(Object.assign({ companyName: this._tenantId, applicationKey: this._appKey }, params))
33157
+ .params(Object.assign({ companyName: "" + this._tenantId, applicationKey: this._appKey }, params))
33155
33158
  .execute({}));
33156
33159
  };
33157
33160
  return NotificationsService;
@@ -34052,7 +34055,7 @@
34052
34055
  return NotificationsButtonComponent;
34053
34056
  }(BaseNotification));
34054
34057
  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 });
34055
- 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-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$3.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 });
34058
+ 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$3.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 });
34056
34059
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NotificationsButtonComponent, decorators: [{
34057
34060
  type: i0.Component,
34058
34061
  args: [{