@volo/abp.ng.chat 4.4.1 → 5.0.0-beta.2
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/volo-abp.ng.chat-config.umd.js +1 -1
- package/bundles/volo-abp.ng.chat-proxy.umd.js +1 -0
- package/bundles/volo-abp.ng.chat.umd.js +1 -1
- package/config/chat-config.module.d.ts +6 -0
- package/config/components/chat-icon.component.d.ts +3 -0
- package/config/package.json +0 -1
- package/config/providers/nav-item.provider.d.ts +1 -1
- package/config/providers/route.provider.d.ts +1 -1
- package/config/services/chat-config.service.d.ts +4 -3
- package/config/volo-abp.ng.chat-config.d.ts +1 -2
- package/esm2015/config/chat-config.module.js +1 -1
- package/esm2015/config/components/chat-icon.component.js +1 -1
- package/esm2015/config/services/chat-config.service.js +1 -1
- package/esm2015/config/volo-abp.ng.chat-config.js +1 -1
- package/esm2015/lib/chat-routing.module.js +1 -1
- package/esm2015/lib/chat.module.js +1 -1
- package/esm2015/lib/components/chat-contacts.component.js +1 -1
- package/esm2015/lib/components/chat.component.js +1 -1
- package/esm2015/lib/components/conversation-avatar.component.js +1 -1
- package/esm2015/lib/components/index.js +1 -0
- package/esm2015/lib/services/contact.service.js +1 -1
- package/esm2015/lib/services/conversation.service.js +1 -1
- package/esm2015/proxy/lib/index.js +1 -0
- package/esm2015/proxy/lib/proxy/volo/chat/conversations/conversation.service.js +1 -0
- package/esm2015/proxy/lib/proxy/volo/chat/conversations/index.js +1 -0
- package/esm2015/proxy/lib/proxy/volo/chat/conversations/models.js +1 -0
- package/esm2015/proxy/lib/proxy/volo/chat/messages/chat-message-side.enum.js +1 -0
- package/esm2015/proxy/lib/proxy/volo/chat/messages/index.js +1 -0
- package/esm2015/proxy/lib/proxy/volo/chat/messages/models.js +1 -0
- package/esm2015/proxy/lib/proxy/volo/chat/settings/index.js +1 -0
- package/esm2015/proxy/lib/proxy/volo/chat/settings/models.js +1 -0
- package/esm2015/proxy/lib/proxy/volo/chat/settings/settings.service.js +1 -0
- package/esm2015/proxy/lib/proxy/volo/chat/users/contact.service.js +1 -0
- package/esm2015/proxy/lib/proxy/volo/chat/users/index.js +1 -0
- package/esm2015/proxy/lib/proxy/volo/chat/users/models.js +1 -0
- package/esm2015/proxy/public-api.js +1 -0
- package/esm2015/proxy/volo-abp.ng.chat-proxy.js +1 -0
- package/esm2015/public-api.js +1 -1
- package/esm2015/volo-abp.ng.chat.js +1 -1
- package/fesm2015/volo-abp.ng.chat-config.js +48 -47
- package/fesm2015/volo-abp.ng.chat-proxy.js +92 -0
- package/fesm2015/volo-abp.ng.chat.js +186 -166
- package/lib/chat-routing.module.d.ts +5 -0
- package/lib/chat.module.d.ts +10 -0
- package/lib/components/chat-contacts.component.d.ts +6 -1
- package/lib/components/chat.component.d.ts +3 -0
- package/lib/components/conversation-avatar.component.d.ts +3 -0
- package/lib/components/index.d.ts +3 -0
- package/lib/services/contact.service.d.ts +3 -0
- package/lib/services/conversation.service.d.ts +3 -0
- package/package.json +3 -4
- package/proxy/lib/index.d.ts +4 -0
- package/proxy/lib/proxy/volo/chat/conversations/conversation.service.d.ts +14 -0
- package/proxy/lib/proxy/volo/chat/conversations/index.d.ts +2 -0
- package/proxy/lib/proxy/volo/chat/conversations/models.d.ts +13 -0
- package/proxy/lib/proxy/volo/chat/messages/chat-message-side.enum.d.ts +5 -0
- package/proxy/lib/proxy/volo/chat/messages/index.d.ts +2 -0
- package/proxy/lib/proxy/volo/chat/messages/models.d.ts +12 -0
- package/proxy/lib/proxy/volo/chat/settings/index.d.ts +2 -0
- package/proxy/lib/proxy/volo/chat/settings/models.d.ts +3 -0
- package/proxy/lib/proxy/volo/chat/settings/settings.service.d.ts +11 -0
- package/proxy/lib/proxy/volo/chat/users/contact.service.d.ts +12 -0
- package/proxy/lib/proxy/volo/chat/users/index.d.ts +2 -0
- package/proxy/lib/proxy/volo/chat/users/models.d.ts +21 -0
- package/proxy/package.json +10 -0
- package/proxy/public-api.d.ts +1 -0
- package/proxy/volo-abp.ng.chat-proxy.d.ts +5 -0
- package/public-api.d.ts +1 -1
- package/volo-abp.ng.chat.d.ts +1 -5
- package/bundles/volo-abp.ng.chat-config.umd.min.js +0 -1
- package/bundles/volo-abp.ng.chat.umd.min.js +0 -1
- package/config/volo-abp.ng.chat-config.metadata.json +0 -1
- package/volo-abp.ng.chat.metadata.json +0 -1
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { NavItemsService
|
|
1
|
+
import * as i4 from '@abp/ng.theme.shared';
|
|
2
|
+
import { NavItemsService } from '@abp/ng.theme.shared';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { Injectable, Component, APP_INITIALIZER, NgModule } from '@angular/core';
|
|
5
|
-
import * as
|
|
6
|
-
import {
|
|
5
|
+
import * as i3 from '@angular/router';
|
|
6
|
+
import { NavigationEnd } from '@angular/router';
|
|
7
7
|
import { Subject, Subscription } from 'rxjs';
|
|
8
8
|
import { filter } from 'rxjs/operators';
|
|
9
9
|
import * as i1 from '@abp/ng.core';
|
|
10
|
-
import {
|
|
10
|
+
import { RoutesService, noop, CoreModule } from '@abp/ng.core';
|
|
11
11
|
import * as signalR from '@microsoft/signalr';
|
|
12
|
-
import * as i3 from '
|
|
13
|
-
import { Store } from '@ngxs/store';
|
|
14
|
-
import * as i4 from 'angular-oauth2-oidc';
|
|
12
|
+
import * as i3$1 from 'angular-oauth2-oidc';
|
|
15
13
|
import { OAuthService } from 'angular-oauth2-oidc';
|
|
14
|
+
import * as i4$1 from '@angular/common';
|
|
16
15
|
|
|
17
16
|
const permission = 'Chat.Messaging';
|
|
18
17
|
class ChatConfigService {
|
|
19
|
-
constructor(restService, router,
|
|
18
|
+
constructor(restService, router, oAuthService, navItems, permissionService, configState, environmentService) {
|
|
20
19
|
this.restService = restService;
|
|
21
20
|
this.router = router;
|
|
22
|
-
this.store = store;
|
|
23
21
|
this.oAuthService = oAuthService;
|
|
24
22
|
this.navItems = navItems;
|
|
25
23
|
this.permissionService = permissionService;
|
|
@@ -92,22 +90,14 @@ class ChatConfigService {
|
|
|
92
90
|
.subscribe((count) => (this.unreadMessagesCount = count));
|
|
93
91
|
}
|
|
94
92
|
}
|
|
95
|
-
ChatConfigService.ɵ
|
|
96
|
-
ChatConfigService
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
{ type: Router },
|
|
104
|
-
{ type: Store },
|
|
105
|
-
{ type: OAuthService },
|
|
106
|
-
{ type: NavItemsService },
|
|
107
|
-
{ type: PermissionService },
|
|
108
|
-
{ type: ConfigStateService },
|
|
109
|
-
{ type: EnvironmentService }
|
|
110
|
-
];
|
|
93
|
+
ChatConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: ChatConfigService, deps: [{ token: i1.RestService }, { token: i3.Router }, { token: i3$1.OAuthService }, { token: i4.NavItemsService }, { token: i1.PermissionService }, { token: i1.ConfigStateService }, { token: i1.EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
94
|
+
ChatConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: ChatConfigService, providedIn: 'root' });
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: ChatConfigService, decorators: [{
|
|
96
|
+
type: Injectable,
|
|
97
|
+
args: [{
|
|
98
|
+
providedIn: 'root',
|
|
99
|
+
}]
|
|
100
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }, { type: i3.Router }, { type: i3$1.OAuthService }, { type: i4.NavItemsService }, { type: i1.PermissionService }, { type: i1.ConfigStateService }, { type: i1.EnvironmentService }]; } });
|
|
111
101
|
|
|
112
102
|
class ChatIconComponent {
|
|
113
103
|
constructor(chatConfigService, toaster, router) {
|
|
@@ -140,10 +130,20 @@ class ChatIconComponent {
|
|
|
140
130
|
this.subscription.unsubscribe();
|
|
141
131
|
}
|
|
142
132
|
}
|
|
143
|
-
ChatIconComponent
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
133
|
+
ChatIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: ChatIconComponent, deps: [{ token: ChatConfigService }, { token: i4.ToasterService }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
134
|
+
ChatIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.9", type: ChatIconComponent, selector: "abp-chat-icon", ngImport: i0, template: `<div class="position-relative">
|
|
135
|
+
<a routerLink="/chat"
|
|
136
|
+
><i class="fas fa-envelope fa-lg"></i>
|
|
137
|
+
<span *ngIf="chatConfigService.unreadMessagesCount" class="badge badge-primary">{{
|
|
138
|
+
chatConfigService.unreadMessagesCount
|
|
139
|
+
}}</span></a
|
|
140
|
+
>
|
|
141
|
+
</div>`, isInline: true, styles: ["\n a {\n color: inherit;\n }\n\n .badge {\n position: absolute;\n right: -10px;\n top: -8px;\n }\n "], directives: [{ type: i3.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: ChatIconComponent, decorators: [{
|
|
143
|
+
type: Component,
|
|
144
|
+
args: [{
|
|
145
|
+
selector: 'abp-chat-icon',
|
|
146
|
+
template: `<div class="position-relative">
|
|
147
147
|
<a routerLink="/chat"
|
|
148
148
|
><i class="fas fa-envelope fa-lg"></i>
|
|
149
149
|
<span *ngIf="chatConfigService.unreadMessagesCount" class="badge badge-primary">{{
|
|
@@ -151,7 +151,8 @@ ChatIconComponent.decorators = [
|
|
|
151
151
|
}}</span></a
|
|
152
152
|
>
|
|
153
153
|
</div>`,
|
|
154
|
-
|
|
154
|
+
styles: [
|
|
155
|
+
`
|
|
155
156
|
a {
|
|
156
157
|
color: inherit;
|
|
157
158
|
}
|
|
@@ -161,14 +162,10 @@ ChatIconComponent.decorators = [
|
|
|
161
162
|
right: -10px;
|
|
162
163
|
top: -8px;
|
|
163
164
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
]
|
|
167
|
-
|
|
168
|
-
{ type: ChatConfigService },
|
|
169
|
-
{ type: ToasterService },
|
|
170
|
-
{ type: Router }
|
|
171
|
-
];
|
|
165
|
+
`,
|
|
166
|
+
],
|
|
167
|
+
}]
|
|
168
|
+
}], ctorParameters: function () { return [{ type: ChatConfigService }, { type: i4.ToasterService }, { type: i3.Router }]; } });
|
|
172
169
|
|
|
173
170
|
const CHAT_NAV_ITEM_PROVIDERS = [
|
|
174
171
|
{ provide: APP_INITIALIZER, useFactory: configureNavItems, deps: [NavItemsService], multi: true },
|
|
@@ -221,17 +218,21 @@ class ChatConfigModule {
|
|
|
221
218
|
};
|
|
222
219
|
}
|
|
223
220
|
}
|
|
224
|
-
ChatConfigModule
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
]
|
|
221
|
+
ChatConfigModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: ChatConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
222
|
+
ChatConfigModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: ChatConfigModule, declarations: [ChatIconComponent], imports: [CoreModule] });
|
|
223
|
+
ChatConfigModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: ChatConfigModule, imports: [[CoreModule]] });
|
|
224
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: ChatConfigModule, decorators: [{
|
|
225
|
+
type: NgModule,
|
|
226
|
+
args: [{
|
|
227
|
+
imports: [CoreModule],
|
|
228
|
+
declarations: [ChatIconComponent],
|
|
229
|
+
entryComponents: [ChatIconComponent],
|
|
230
|
+
}]
|
|
231
|
+
}] });
|
|
231
232
|
|
|
232
233
|
/**
|
|
233
234
|
* Generated bundle index. Do not edit.
|
|
234
235
|
*/
|
|
235
236
|
|
|
236
|
-
export { CHAT_NAV_ITEM_PROVIDERS, CHAT_ROUTE_PROVIDERS, ChatConfigModule, ChatConfigService, ChatIconComponent, configureNavItems, configureRoutes
|
|
237
|
+
export { CHAT_NAV_ITEM_PROVIDERS, CHAT_ROUTE_PROVIDERS, ChatConfigModule, ChatConfigService, ChatIconComponent, configureNavItems, configureRoutes };
|
|
237
238
|
//# sourceMappingURL=volo-abp.ng.chat-config.js.map
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as i1 from '@abp/ng.core';
|
|
2
|
+
import { mapEnumToOptions } from '@abp/ng.core';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { Injectable } from '@angular/core';
|
|
5
|
+
|
|
6
|
+
class ConversationService {
|
|
7
|
+
constructor(restService) {
|
|
8
|
+
this.restService = restService;
|
|
9
|
+
this.apiName = 'Chat';
|
|
10
|
+
this.getConversation = (input) => this.restService.request({
|
|
11
|
+
method: 'GET',
|
|
12
|
+
url: '/api/chat/conversation/conversation',
|
|
13
|
+
params: { targetUserId: input.targetUserId, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
|
|
14
|
+
}, { apiName: this.apiName });
|
|
15
|
+
this.markConversationAsRead = (input) => this.restService.request({
|
|
16
|
+
method: 'POST',
|
|
17
|
+
url: '/api/chat/conversation/mark-conversation-as-read',
|
|
18
|
+
body: input,
|
|
19
|
+
}, { apiName: this.apiName });
|
|
20
|
+
this.sendMessage = (input) => this.restService.request({
|
|
21
|
+
method: 'POST',
|
|
22
|
+
url: '/api/chat/conversation/send-message',
|
|
23
|
+
body: input,
|
|
24
|
+
}, { apiName: this.apiName });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
ConversationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: ConversationService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
28
|
+
ConversationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: ConversationService, providedIn: 'root' });
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: ConversationService, decorators: [{
|
|
30
|
+
type: Injectable,
|
|
31
|
+
args: [{
|
|
32
|
+
providedIn: 'root',
|
|
33
|
+
}]
|
|
34
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
35
|
+
|
|
36
|
+
var ChatMessageSide;
|
|
37
|
+
(function (ChatMessageSide) {
|
|
38
|
+
ChatMessageSide[ChatMessageSide["Sender"] = 1] = "Sender";
|
|
39
|
+
ChatMessageSide[ChatMessageSide["Receiver"] = 2] = "Receiver";
|
|
40
|
+
})(ChatMessageSide || (ChatMessageSide = {}));
|
|
41
|
+
const chatMessageSideOptions = mapEnumToOptions(ChatMessageSide);
|
|
42
|
+
|
|
43
|
+
class SettingsService {
|
|
44
|
+
constructor(restService) {
|
|
45
|
+
this.restService = restService;
|
|
46
|
+
this.apiName = 'Chat';
|
|
47
|
+
this.setSendOnEnterSetting = (input) => this.restService.request({
|
|
48
|
+
method: 'POST',
|
|
49
|
+
url: '/api/chat/settings/send-on-enter',
|
|
50
|
+
body: input,
|
|
51
|
+
}, { apiName: this.apiName });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
SettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: SettingsService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
55
|
+
SettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: SettingsService, providedIn: 'root' });
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: SettingsService, decorators: [{
|
|
57
|
+
type: Injectable,
|
|
58
|
+
args: [{
|
|
59
|
+
providedIn: 'root',
|
|
60
|
+
}]
|
|
61
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
62
|
+
|
|
63
|
+
class ContactService {
|
|
64
|
+
constructor(restService) {
|
|
65
|
+
this.restService = restService;
|
|
66
|
+
this.apiName = 'Chat';
|
|
67
|
+
this.getContacts = (input) => this.restService.request({
|
|
68
|
+
method: 'GET',
|
|
69
|
+
url: '/api/chat/contact/contacts',
|
|
70
|
+
params: { filter: input.filter, includeOtherContacts: input.includeOtherContacts },
|
|
71
|
+
}, { apiName: this.apiName });
|
|
72
|
+
this.getTotalUnreadMessageCount = () => this.restService.request({
|
|
73
|
+
method: 'GET',
|
|
74
|
+
url: '/api/chat/contact/total-unread-message-count',
|
|
75
|
+
}, { apiName: this.apiName });
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
ContactService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: ContactService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
79
|
+
ContactService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: ContactService, providedIn: 'root' });
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: ContactService, decorators: [{
|
|
81
|
+
type: Injectable,
|
|
82
|
+
args: [{
|
|
83
|
+
providedIn: 'root',
|
|
84
|
+
}]
|
|
85
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Generated bundle index. Do not edit.
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
export { ChatMessageSide, ContactService, ConversationService, SettingsService, chatMessageSideOptions };
|
|
92
|
+
//# sourceMappingURL=volo-abp.ng.chat-proxy.js.map
|