nuxeo-development-framework 4.0.0 → 4.0.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.
@@ -29244,7 +29244,7 @@
29244
29244
  NotificationsService.prototype.getDefinitions = function (payload) {
29245
29245
  if (payload === void 0) { payload = {}; }
29246
29246
  return this._callApi
29247
- .query(Object.assign({ pageProvider: NotificationsService.providers.definition, notfnotificationdef_applicationKey: this._appKey, pageSize: 1000 }, payload), {
29247
+ .query(Object.assign({ pageProvider: NotificationsService.providers.definition, notfnotificationdef_applicationKey: this._appKey, pageSize: Number.MAX_SAFE_INTEGER, notfnotificationdef_isActive: true }, payload), {
29248
29248
  headers: {
29249
29249
  properties: '*',
29250
29250
  },
@@ -29254,7 +29254,7 @@
29254
29254
  NotificationsService.prototype.getSubscriptions = function (payload) {
29255
29255
  if (payload === void 0) { payload = {}; }
29256
29256
  return this._callApi
29257
- .query(Object.assign({ pageProvider: NotificationsService.providers.subscription, notfsubscription_companyName: this._tenantId, notfsubscription_applicationKey: this._appKey, pageSize: 1000 }, payload), {
29257
+ .query(Object.assign({ pageProvider: NotificationsService.providers.subscription, notfsubscription_companyName: this._tenantId, notfsubscription_applicationKey: this._appKey, pageSize: Number.MAX_SAFE_INTEGER }, payload), {
29258
29258
  headers: {
29259
29259
  properties: '*',
29260
29260
  },
@@ -29428,7 +29428,7 @@
29428
29428
  return NotificationItemComponent;
29429
29429
  }(DestroySubject));
29430
29430
  NotificationItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NotificationItemComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
29431
- NotificationItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NotificationItemComponent, selector: "app-notification-item", inputs: { iconOptions: "iconOptions", currentLang: "currentLang", notification: "notification" }, outputs: { markAsUnread: "markAsUnread", markAsRead: "markAsRead", markAsDeleted: "markAsDeleted" }, usesInheritance: true, ngImport: i0__namespace, template: "<div\r\n *ngIf=\"notification?.properties as properties\"\r\n class=\"notification-item\"\r\n [class.new-item]=\"properties['notif_cnt:status'] == status.new\"\r\n [class.unread-item]=\"properties['notif_cnt:status'] == status.unRead\"\r\n>\r\n <div class=\"notification-item__icon\">\r\n <div class=\"notification-item__icon__wrapper\" *ngIf=\"iconOptions?.active\">\r\n <i [class]=\"notification | getIcon : iconOptions\"></i>\r\n </div>\r\n </div>\r\n <div class=\"notification-item__content\">\r\n <p class=\"notification-item__message line-clamp-2\">\r\n {{\r\n currentLang === 'ar-AR'\r\n ? properties['notif_cnt:arMessage']\r\n : properties['notif_cnt:enMessage']\r\n }}\r\n </p>\r\n <button\r\n class=\"mat-icon-button\"\r\n [matMenuTriggerFor]=\"appMenu\"\r\n mat-icon-button\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <mat-icon class=\"mat-24\">more_horiz</mat-icon>\r\n </button>\r\n <span class=\"notification-item__date\">{{\r\n properties['dc:created'] | timeAgo : currentLang\r\n }}</span>\r\n </div>\r\n\r\n <mat-menu class=\"notification-item__actions\" #appMenu=\"matMenu\">\r\n <span (click)=\"closeMenu($event, appMenu)\">\r\n <button\r\n *ngIf=\"properties['notif_cnt:status'] == status.read\"\r\n mat-menu-item\r\n class=\"notification-item__actions__item\"\r\n (click)=\"markAsUnread.emit(notification)\"\r\n >\r\n <span class=\"mx-1\">{{ 'notifications.markAsUnread' | translate }}</span>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"\r\n properties['notif_cnt:status'] == status.new ||\r\n properties['notif_cnt:status'] == status.unRead\r\n \"\r\n mat-menu-item\r\n class=\"notification-item__actions__item\"\r\n (click)=\"markAsRead.emit(notification)\"\r\n >\r\n <span class=\"mx-1\">{{ 'notifications.markAsRead' | translate }}</span>\r\n </button>\r\n\r\n <button\r\n mat-menu-item\r\n (click)=\"markAsDeleted.emit(notification)\"\r\n class=\"notification-item__actions__item\"\r\n >\r\n <span>{{ 'notifications.delete' | translate }}</span>\r\n </button>\r\n </span>\r\n </mat-menu>\r\n</div>\r\n", styles: [".notification-item{display:var(--n-item-display, grid);grid-template-columns:var(--n-item-columns, auto 1fr);grid-gap:var(--n-item-gap, .5rem);gap:var(--n-item-gap, .5rem);padding:var(--n-items-padding, .5rem 1rem);border:var(--n-item-border, solid #eee);border-width:var(--n-item-border-width, 0 0 1px 0);background:var(--n-item-background, transparent);min-height:var(--n-item-height, 85px)}.notification-item.new-item{--n-item-background: var(--n-status-new-color, #fcfcfc)}.notification-item.unread-item{--n-item-background: var(--n-status-unread-color, #fcfcfc)}.notification-item__icon{display:var(--n-item-icon-display, flex);align-items:var(--n-item-icon-align-items, center)}.notification-item__icon__wrapper{width:var(--n-item-icon-width, 56px);height:var(--n-item-icon-height, 56px);background:var(--n-item-icon-background, rgba(0, 0, 0, .025));color:var(--n-item-icon-color, #636363);font-size:var(--n-item-icon-size, 1.5rem);border-radius:var(--n-item-icon-radius, 50%);display:grid;place-items:center}.notification-item__content{display:var(--n-item-content-display, grid);grid-template-columns:var(--n-item-content-columns, 1fr auto);grid-gap:var(--n-item-gap, .2rem);gap:var(--n-item-gap, .2rem)}.notification-item__message{margin-bottom:0;font-size:var(--n-item-font-size, .9rem);color:var(--n-item-message-color)}.notification-item__date{font-size:var(--n-item-date-size, .8rem);text-align:var(--n-item-date-align, end);grid-column:var(--n-item-date-column, span 2);padding:var(--n-item-date-padding, 0 11px);color:var(--n-item-date-color)}.notification-item__actions{border-radius:var(--n-actions-radius, 4px);background:var(--n-actions-background, #fff);box-shadow:var(--n-actions-shadow, 0px 1px 4px -1px rgba(28, 52, 84, .26))}.notification-item__actions .mat-menu-content:not(:empty){padding:var(--n-actions--menu-padding, .5rem)}.notification-item__actions__item{text-align:var(--action-item-align, start)!important;background:var(--action-item-background, transparent)!important;color:var(--action-item-color, #28282d);padding:var(--action-item-padding, .4rem);height:var(--action-item-height, 38px);line-height:var(--action-item-line, 38px);border-radius:var(--action-item-radius, 4px);font-size:var(--action-item-size, 14px)}.notification-item__actions__item:hover{--action-item-background: var(--action-hover-background, #e6f7ff);--action-item-color: var(--action-hover-color, #005fdb)}\n"], components: [{ type: i1__namespace$8.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2__namespace$3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3__namespace$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i3__namespace$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["matMenuTriggerRestoreFocus", "mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }], pipes: { "getIcon": GetIconPipe, "timeAgo": TimeAgoPipe, "translate": i1__namespace$1.TranslatePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
29431
+ NotificationItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NotificationItemComponent, selector: "app-notification-item", inputs: { iconOptions: "iconOptions", currentLang: "currentLang", notification: "notification" }, outputs: { markAsUnread: "markAsUnread", markAsRead: "markAsRead", markAsDeleted: "markAsDeleted" }, usesInheritance: true, ngImport: i0__namespace, template: "<div\r\n *ngIf=\"notification?.properties as properties\"\r\n class=\"notification-item\"\r\n [class.new-item]=\"properties['notif_cnt:status'] == status.new\"\r\n [class.unread-item]=\"properties['notif_cnt:status'] == status.unRead\"\r\n>\r\n <div class=\"notification-item__icon\">\r\n <div class=\"notification-item__icon__wrapper\" *ngIf=\"iconOptions?.active\">\r\n <i [class]=\"notification | getIcon : iconOptions\"></i>\r\n </div>\r\n </div>\r\n <div class=\"notification-item__content\">\r\n <p class=\"notification-item__message line-clamp-2\">\r\n {{\r\n currentLang === 'ar-AR'\r\n ? properties['notif_cnt:arMessage']\r\n : properties['notif_cnt:enMessage']\r\n }}\r\n </p>\r\n <button\r\n class=\"mat-icon-button\"\r\n [matMenuTriggerFor]=\"appMenu\"\r\n mat-icon-button\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <mat-icon class=\"mat-24\">more_horiz</mat-icon>\r\n </button>\r\n <span class=\"notification-item__date\">{{\r\n properties['dc:created'] | timeAgo : currentLang\r\n }}</span>\r\n </div>\r\n\r\n <mat-menu class=\"notification-item__actions\" #appMenu=\"matMenu\">\r\n <span (click)=\"closeMenu($event, appMenu)\">\r\n <button\r\n *ngIf=\"properties['notif_cnt:status'] == status.read\"\r\n mat-menu-item\r\n class=\"notification-item__actions__item\"\r\n (click)=\"markAsUnread.emit(notification)\"\r\n >\r\n <span class=\"mx-1\">{{ 'notifications.markAsUnread' | translate }}</span>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"\r\n properties['notif_cnt:status'] == status.new ||\r\n properties['notif_cnt:status'] == status.unRead\r\n \"\r\n mat-menu-item\r\n class=\"notification-item__actions__item\"\r\n (click)=\"markAsRead.emit(notification)\"\r\n >\r\n <span class=\"mx-1\">{{ 'notifications.markAsRead' | translate }}</span>\r\n </button>\r\n\r\n <button\r\n mat-menu-item\r\n (click)=\"markAsDeleted.emit(notification)\"\r\n class=\"notification-item__actions__item\"\r\n >\r\n <span>{{ 'notifications.delete' | translate }}</span>\r\n </button>\r\n </span>\r\n </mat-menu>\r\n</div>\r\n", styles: [".notification-item{display:var(--n-item-display, grid);grid-template-columns:var(--n-item-columns, auto 1fr);grid-gap:var(--n-item-gap, .5rem);gap:var(--n-item-gap, .5rem);padding:var(--n-items-padding, .5rem 1rem);border:var(--n-item-border, solid #eee);border-width:var(--n-item-border-width, 0 0 1px 0);background:var(--n-item-background, transparent);min-height:var(--n-item-height, 85px);position:relative}.notification-item.new-item{--n-item-background: var(--n-status-new-color, #ecf8fe)}.notification-item.unread-item{--n-item-background: var(--n-status-unread-color, #ecf8fe)}.notification-item.unread-item:before{content:\"\";position:absolute;inset-inline-start:var(--n-item-unread-inline, 6px);inset-block-start:var(--n-item-unread-block, 6px);width:var(--n-item-unread-width, 8px);height:var(--n-item-unread-height, 8px);background:var(--n-item-unread-background, #39559d);border-radius:50%}.notification-item__icon{display:var(--n-item-icon-display, flex);align-items:var(--n-item-icon-align-items, center)}.notification-item__icon__wrapper{width:var(--n-item-icon-width, 56px);height:var(--n-item-icon-height, 56px);background:var(--n-item-icon-background, rgba(0, 0, 0, .025));color:var(--n-item-icon-color, #636363);font-size:var(--n-item-icon-size, 1.5rem);border-radius:var(--n-item-icon-radius, 50%);display:grid;place-items:center}.notification-item__content{display:var(--n-item-content-display, grid);grid-template-columns:var(--n-item-content-columns, 1fr auto);grid-gap:var(--n-item-gap, .2rem);gap:var(--n-item-gap, .2rem)}.notification-item__message{margin-bottom:0;font-size:var(--n-item-font-size, .9rem);color:var(--n-item-message-color)}.notification-item__date{font-size:var(--n-item-date-size, .8rem);text-align:var(--n-item-date-align, end);grid-column:var(--n-item-date-column, span 2);padding:var(--n-item-date-padding, 0 11px);color:var(--n-item-date-color)}.notification-item__actions{border-radius:var(--n-actions-radius, 4px);background:var(--n-actions-background, #fff);box-shadow:var(--n-actions-shadow, 0px 1px 4px -1px rgba(28, 52, 84, .26))}.notification-item__actions .mat-menu-content:not(:empty){padding:var(--n-actions--menu-padding, .5rem)}.notification-item__actions__item{text-align:var(--action-item-align, start)!important;background:var(--action-item-background, transparent)!important;color:var(--action-item-color, #28282d);padding:var(--action-item-padding, .4rem);height:var(--action-item-height, 38px);line-height:var(--action-item-line, 38px);border-radius:var(--action-item-radius, 4px);font-size:var(--action-item-size, 14px)}.notification-item__actions__item:hover{--action-item-background: var(--action-hover-background, #e6f7ff);--action-item-color: var(--action-hover-color, #005fdb)}\n"], components: [{ type: i1__namespace$8.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2__namespace$3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3__namespace$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i3__namespace$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["matMenuTriggerRestoreFocus", "mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }], pipes: { "getIcon": GetIconPipe, "timeAgo": TimeAgoPipe, "translate": i1__namespace$1.TranslatePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
29432
29432
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NotificationItemComponent, decorators: [{
29433
29433
  type: i0.Component,
29434
29434
  args: [{
@@ -30227,31 +30227,14 @@
30227
30227
  _this.openSettings = new i0.EventEmitter();
30228
30228
  _this.openNotifications = new i0.EventEmitter();
30229
30229
  _this.onNotification = new i0.EventEmitter();
30230
- _this.newNotificationCount$ = _this._getCountSub
30231
- .asObservable()
30232
- .pipe(operators.map(function (count) { return (count >= 100 ? '99+' : count); }));
30230
+ _this.newNotificationCount$ = _this._getCountSub.asObservable();
30233
30231
  _this.panelMode = PANEL_MODE.sidebar;
30234
30232
  _this.panelModeEnum = PANEL_MODE;
30235
30233
  if (_options === null || _options === void 0 ? void 0 : _options.panelMode) {
30236
30234
  _this.panelMode = _options.panelMode;
30237
30235
  }
30238
- _this.notificationsService.listenerObserver
30239
- .pipe(operators.switchMap(function (res) {
30240
- var isAr = _this._translationService.isArabic.getValue();
30241
- return _this._toasterService
30242
- .showToast({
30243
- type: 'info',
30244
- title: 'notifications.newNotification',
30245
- customContent: isAr ? res.arabicMessage : res.englishMessage,
30246
- })
30247
- .onTap.pipe(operators.map(function () { return res; }));
30248
- }), operators.takeUntil(_this.destroy$))
30249
- .subscribe(function (res) {
30250
- _this.refreshUnreadCount();
30251
- if (res === null || res === void 0 ? void 0 : res.clickable) {
30252
- _this.onNotification.emit(res);
30253
- }
30254
- });
30236
+ _this._socketListener();
30237
+ _this.refreshUnreadCount();
30255
30238
  return _this;
30256
30239
  }
30257
30240
  NotificationsButtonComponent.prototype.hideBadgeCount = function () {
@@ -30281,6 +30264,26 @@
30281
30264
  _this._cdr.detectChanges();
30282
30265
  });
30283
30266
  };
30267
+ NotificationsButtonComponent.prototype._socketListener = function () {
30268
+ var _this = this;
30269
+ this.notificationsService.listenerObserver
30270
+ .pipe(operators.switchMap(function (res) {
30271
+ var isAr = _this._translationService.isArabic.getValue();
30272
+ return _this._toasterService
30273
+ .showToast({
30274
+ type: 'info',
30275
+ title: 'notifications.newNotification',
30276
+ customContent: isAr ? res.arabicMessage : res.englishMessage,
30277
+ })
30278
+ .onTap.pipe(operators.map(function () { return res; }));
30279
+ }), operators.takeUntil(this.destroy$))
30280
+ .subscribe(function (res) {
30281
+ _this.refreshUnreadCount();
30282
+ if (res === null || res === void 0 ? void 0 : res.clickable) {
30283
+ _this.onNotification.emit(res);
30284
+ }
30285
+ });
30286
+ };
30284
30287
  return NotificationsButtonComponent;
30285
30288
  }(BaseNotification));
30286
30289
  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 });
@@ -30442,7 +30445,7 @@
30442
30445
  sourceType: _properties['notf_nt:sourceTypee'],
30443
30446
  isActive: _properties['notif_def:isActive'],
30444
30447
  autoSubscription: _properties['notif_def:autoSubscription'],
30445
- sendByDefault: _properties['notif_def:sendByDefault'],
30448
+ sentByDefault: _properties['notif_def:sentByDefault'],
30446
30449
  applicationKey: _properties['notif_def:applicationKey'],
30447
30450
  channel: _properties['notif_def:channel'],
30448
30451
  title: definition.title,
@@ -30477,10 +30480,11 @@
30477
30480
  sub.applicationKey == definition.applicationKey &&
30478
30481
  sub.notificationKey == definition.notificationKey);
30479
30482
  });
30480
- if (_subscription) {
30483
+ if (_subscription &&
30484
+ Object.values(SUBSCRIPTION_STATE).includes(_subscription === null || _subscription === void 0 ? void 0 : _subscription.state)) {
30481
30485
  return _subscription.state === SUBSCRIPTION_STATE.subscribed;
30482
30486
  }
30483
- return false;
30487
+ return !!(definition === null || definition === void 0 ? void 0 : definition.sentByDefault);
30484
30488
  };
30485
30489
  return CheckIfSubscribedPipe;
30486
30490
  }());