nuxeo-development-framework 4.2.4 → 4.2.5
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.
- package/bundles/nuxeo-development-framework.umd.js +24 -17
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/notifications/components/notification-item/notification-item.component.js +2 -2
- package/esm2015/lib/components/notifications/containers/notifications-settings-container/notifications-settings-container.component.js +2 -1
- package/esm2015/lib/components/notifications/services/notifications.service.js +23 -17
- package/fesm2015/nuxeo-development-framework.js +24 -18
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/package.json +1 -1
|
@@ -32306,7 +32306,7 @@
|
|
|
32306
32306
|
return NotificationItemComponent;
|
|
32307
32307
|
}(DestroySubject));
|
|
32308
32308
|
NotificationItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NotificationItemComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
32309
|
-
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
|
|
32309
|
+
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\t*ngIf=\"notification?.properties as properties\"\r\n\tclass=\"notification-item\"\r\n\t[class.new-item]=\"properties['notif_cnt:status'] == status.new\"\r\n\t[class.unread-item]=\"properties['notif_cnt:status'] == status.unRead\"\r\n>\r\n\t<div class=\"notification-item__icon\">\r\n\t\t<div class=\"notification-item__icon__wrapper\" *ngIf=\"iconOptions?.active\">\r\n\t\t\t<i [class]=\"notification | getIcon : iconOptions\"></i>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"notification-item__content\">\r\n\t\t<p class=\"notification-item__message line-clamp-2\">\r\n\t\t\t{{\r\n\t\t\t\tcurrentLang === 'ar-AR'\r\n\t\t\t\t\t? properties['notif_cnt:arMessage']\r\n\t\t\t\t\t: properties['notif_cnt:enMessage']\r\n\t\t\t}}\r\n\t\t</p>\r\n\t\t<button\r\n\t\t\tclass=\"mat-icon-button\"\r\n\t\t\t[matMenuTriggerFor]=\"appMenu\"\r\n\t\t\tmat-icon-button\r\n\t\t\t(click)=\"$event.stopPropagation()\"\r\n\t\t>\r\n\t\t\t<mat-icon class=\"mat-24\">more_horiz</mat-icon>\r\n\t\t</button>\r\n\t\t<span class=\"notification-item__date\">{{\r\n\t\t\tproperties['dc:created'] | timeAgo : currentLang\r\n\t\t}}</span>\r\n\t</div>\r\n\r\n\t<mat-menu\r\n\t\tclass=\"notification-item__actions\"\r\n\t\t#appMenu=\"matMenu\"\r\n\t\t[attr.dir.rtl]=\"currentLang === 'ar-AR'\"\r\n\t>\r\n\t\t<span\r\n\t\t\t(click)=\"closeMenu($event, appMenu)\"\r\n\t\t\t[attr.dir.rtl]=\"currentLang === 'ar-AR'\"\r\n\t\t>\r\n\t\t\t<button\r\n\t\t\t\t*ngIf=\"properties['notif_cnt:status'] == status.read\"\r\n\t\t\t\tmat-menu-item\r\n\t\t\t\tclass=\"notification-item__actions__item\"\r\n\t\t\t\t(click)=\"markAsUnread.emit(notification)\"\r\n\t\t\t>\r\n\t\t\t\t<span class=\"mx-1\">{{ 'notifications.markAsUnread' | translate }}</span>\r\n\t\t\t</button>\r\n\r\n\t\t\t<button\r\n\t\t\t\t*ngIf=\"\r\n\t\t\t\t\tproperties['notif_cnt:status'] == status.new ||\r\n\t\t\t\t\tproperties['notif_cnt:status'] == status.unRead\r\n\t\t\t\t\"\r\n\t\t\t\tmat-menu-item\r\n\t\t\t\tclass=\"notification-item__actions__item\"\r\n\t\t\t\t(click)=\"markAsRead.emit(notification)\"\r\n\t\t\t>\r\n\t\t\t\t<span class=\"mx-1\">{{ 'notifications.markAsRead' | translate }}</span>\r\n\t\t\t</button>\r\n\r\n\t\t\t<button\r\n\t\t\t\tmat-menu-item\r\n\t\t\t\t(click)=\"markAsDeleted.emit(notification)\"\r\n\t\t\t\tclass=\"notification-item__actions__item\"\r\n\t\t\t>\r\n\t\t\t\t<span>{{ 'notifications.delete' | translate }}</span>\r\n\t\t\t</button>\r\n\t\t</span>\r\n\t</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$9.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$1.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$1.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.TranslatePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
32310
32310
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NotificationItemComponent, decorators: [{
|
|
32311
32311
|
type: i0.Component,
|
|
32312
32312
|
args: [{
|
|
@@ -32432,7 +32432,8 @@
|
|
|
32432
32432
|
_this._callApi = _callApi;
|
|
32433
32433
|
_this._http = _http;
|
|
32434
32434
|
_this.listenerObserver = new rxjs.Subject();
|
|
32435
|
-
if (((_b = (_a = _this._nuxeoService.nuxeoClient) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.id) &&
|
|
32435
|
+
if (((_b = (_a = _this._nuxeoService.nuxeoClient) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.id) &&
|
|
32436
|
+
((_c = _this._environment) === null || _c === void 0 ? void 0 : _c.socketUrl)) {
|
|
32436
32437
|
_this.socketConnect()
|
|
32437
32438
|
.pipe(operators.switchMap(function () { return _this.onMessage$; }), operators.catchError(function (error) {
|
|
32438
32439
|
console.log(error);
|
|
@@ -32466,7 +32467,7 @@
|
|
|
32466
32467
|
pageSize: 1,
|
|
32467
32468
|
notfnotificationcontent_company: this._tenantId,
|
|
32468
32469
|
notfnotificationcontent_applicationKey: this._appKey,
|
|
32469
|
-
notfnotificationcontent_status: NOTIFICATION_STATUS.new
|
|
32470
|
+
notfnotificationcontent_status: NOTIFICATION_STATUS.new
|
|
32470
32471
|
}, {})
|
|
32471
32472
|
.pipe(operators.map(function (data) { var _a; return (_a = data.totalSize) !== null && _a !== void 0 ? _a : 0; }));
|
|
32472
32473
|
};
|
|
@@ -32498,17 +32499,17 @@
|
|
|
32498
32499
|
};
|
|
32499
32500
|
NotificationsService.prototype.subscribe = function (id) {
|
|
32500
32501
|
return this._operation(id, 'subscribe', {
|
|
32501
|
-
companyName: this._tenantId
|
|
32502
|
+
companyName: this._tenantId
|
|
32502
32503
|
});
|
|
32503
32504
|
};
|
|
32504
32505
|
NotificationsService.prototype.resetSubscriptions = function () {
|
|
32505
32506
|
return rxjs.from(this._nuxeoService.nuxeoClient
|
|
32506
32507
|
.operation(NotificationsService.operations.reset, {
|
|
32507
|
-
url: "" + this._environment.nuxeo + this._environment.customAutomation
|
|
32508
|
+
url: "" + this._environment.nuxeo + this._environment.customAutomation
|
|
32508
32509
|
})
|
|
32509
32510
|
.params({
|
|
32510
32511
|
companyName: this._tenantId,
|
|
32511
|
-
applicationKey: this._appKey
|
|
32512
|
+
applicationKey: this._appKey
|
|
32512
32513
|
})
|
|
32513
32514
|
.execute());
|
|
32514
32515
|
};
|
|
@@ -32523,8 +32524,8 @@
|
|
|
32523
32524
|
return this._callApi
|
|
32524
32525
|
.query(Object.assign({ pageProvider: NotificationsService.providers.definition, notfnotificationdef_applicationKey: this._appKey, pageSize: Number.MAX_SAFE_INTEGER, notfnotificationdef_isActive: true }, payload), {
|
|
32525
32526
|
headers: {
|
|
32526
|
-
properties: '*'
|
|
32527
|
-
}
|
|
32527
|
+
properties: '*'
|
|
32528
|
+
}
|
|
32528
32529
|
})
|
|
32529
32530
|
.pipe(operators.map(function (data) { return data.entries; }));
|
|
32530
32531
|
};
|
|
@@ -32533,8 +32534,8 @@
|
|
|
32533
32534
|
return this._callApi
|
|
32534
32535
|
.query(Object.assign({ pageProvider: NotificationsService.providers.subscription, notfsubscription_companyName: this._tenantId, notfsubscription_applicationKey: this._appKey, pageSize: Number.MAX_SAFE_INTEGER }, payload), {
|
|
32535
32536
|
headers: {
|
|
32536
|
-
properties: '*'
|
|
32537
|
-
}
|
|
32537
|
+
properties: '*'
|
|
32538
|
+
}
|
|
32538
32539
|
})
|
|
32539
32540
|
.pipe(operators.map(function (data) { return data.entries; }));
|
|
32540
32541
|
};
|
|
@@ -32543,19 +32544,24 @@
|
|
|
32543
32544
|
return this._callApi
|
|
32544
32545
|
.query(Object.assign({ pageProvider: pageProvider, notfnotificationcontent_company: this._tenantId, notfnotificationcontent_applicationKey: this._appKey }, payload), {
|
|
32545
32546
|
headers: {
|
|
32546
|
-
properties: '*'
|
|
32547
|
-
}
|
|
32547
|
+
properties: '*'
|
|
32548
|
+
}
|
|
32548
32549
|
})
|
|
32549
32550
|
.pipe(operators.map(function (data) { return mapNotificationsToPagingResponse(data); }));
|
|
32550
32551
|
};
|
|
32551
32552
|
NotificationsService.prototype._getVocabulary = function (url) {
|
|
32552
|
-
|
|
32553
|
+
var _this = this;
|
|
32554
|
+
return rxjs.from(this._nuxeoService.getToken()).pipe(operators.map(function (token) {
|
|
32555
|
+
var bearerToken = "Bearer " + token;
|
|
32556
|
+
var headers = new i1.HttpHeaders().set('Authorization', bearerToken);
|
|
32557
|
+
return headers;
|
|
32558
|
+
}), 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; }); }));
|
|
32553
32559
|
};
|
|
32554
32560
|
NotificationsService.prototype._operation = function (id, option, params) {
|
|
32555
32561
|
if (params === void 0) { params = {}; }
|
|
32556
32562
|
return rxjs.from(this._nuxeoService.nuxeoClient
|
|
32557
32563
|
.operation(NotificationsService.operations[option], {
|
|
32558
|
-
url: "" + this._environment.nuxeo + this._environment.customAutomation
|
|
32564
|
+
url: "" + this._environment.nuxeo + this._environment.customAutomation
|
|
32559
32565
|
})
|
|
32560
32566
|
.params(params)
|
|
32561
32567
|
.input(id)
|
|
@@ -32566,7 +32572,7 @@
|
|
|
32566
32572
|
if (headers === void 0) { headers = {}; }
|
|
32567
32573
|
return rxjs.from(this._nuxeoService.nuxeoClient
|
|
32568
32574
|
.operation(NotificationsService.operations[option], {
|
|
32569
|
-
url: "" + this._environment.nuxeo + this._environment.customAutomation
|
|
32575
|
+
url: "" + this._environment.nuxeo + this._environment.customAutomation
|
|
32570
32576
|
})
|
|
32571
32577
|
.params(Object.assign({ companyName: this._tenantId, applicationKey: this._appKey }, params))
|
|
32572
32578
|
.execute({}));
|
|
@@ -32579,7 +32585,7 @@
|
|
|
32579
32585
|
notifications: 'PP_NotfNotificationContent',
|
|
32580
32586
|
notificationsMango: 'PP_NotfNotificationContent_Mongo',
|
|
32581
32587
|
subscription: 'PP_NotfSubscription_Mongo',
|
|
32582
|
-
definition: 'PP_NotfNotificationDefinition_Mongo'
|
|
32588
|
+
definition: 'PP_NotfNotificationDefinition_Mongo'
|
|
32583
32589
|
};
|
|
32584
32590
|
NotificationsService.operations = {
|
|
32585
32591
|
markAllAsRead: 'AC_UA_NotfNotification_ReadAll',
|
|
@@ -32589,7 +32595,7 @@
|
|
|
32589
32595
|
unsubscribe: 'AC_UA_NotfNotification_Unsubscribe',
|
|
32590
32596
|
subscribe: 'AC_UA_NotfNotification_Subscribe',
|
|
32591
32597
|
reset: 'AC_UA_NotfNotification_ResetSubscription',
|
|
32592
|
-
markAllAsUnread: 'AC_UA_NotfNotification_UnreadAll'
|
|
32598
|
+
markAllAsUnread: 'AC_UA_NotfNotification_UnreadAll'
|
|
32593
32599
|
};
|
|
32594
32600
|
NotificationsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NotificationsService, deps: [{ token: 'environment' }, { token: NuxeoService }, { token: CallApiService }, { token: i1__namespace$2.HttpClient }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
32595
32601
|
NotificationsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NotificationsService });
|
|
@@ -33860,6 +33866,7 @@
|
|
|
33860
33866
|
var _this = this;
|
|
33861
33867
|
this._matDialog
|
|
33862
33868
|
.open(ConfirmationDialogComponent, {
|
|
33869
|
+
panelClass: ['confirm-dialog'],
|
|
33863
33870
|
data: {
|
|
33864
33871
|
title: 'notifications.resetToDefault.resetConfirm',
|
|
33865
33872
|
message: 'notifications.resetToDefault.resetConfirmMessage',
|