@volo/abp.ng.chat 7.0.0-rc.3 → 7.0.0-rc.4
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/config/components/chat-icon.component.d.ts +1 -1
- package/esm2020/config/chat-config.module.mjs +4 -4
- package/esm2020/config/components/chat-icon.component.mjs +4 -4
- package/esm2020/config/services/chat-config.service.mjs +3 -3
- package/esm2020/lib/chat-routing.module.mjs +4 -4
- package/esm2020/lib/chat.module.mjs +4 -4
- package/esm2020/lib/components/chat-contacts.component.mjs +3 -3
- package/esm2020/lib/components/chat-message-title.component.mjs +3 -3
- package/esm2020/lib/components/chat.component.mjs +3 -3
- package/esm2020/lib/components/conversation-avatar.component.mjs +3 -3
- package/esm2020/lib/services/contact.service.mjs +3 -3
- package/esm2020/lib/services/conversation.service.mjs +3 -3
- package/esm2020/proxy/lib/proxy/volo/chat/conversations/conversation.service.mjs +3 -3
- package/esm2020/proxy/lib/proxy/volo/chat/settings/settings.service.mjs +3 -3
- package/esm2020/proxy/lib/proxy/volo/chat/users/contact.service.mjs +3 -3
- package/fesm2015/volo-abp.ng.chat-config.mjs +11 -11
- package/fesm2015/volo-abp.ng.chat-config.mjs.map +1 -1
- package/fesm2015/volo-abp.ng.chat-proxy.mjs +9 -9
- package/fesm2015/volo-abp.ng.chat.mjs +26 -26
- package/fesm2020/volo-abp.ng.chat-config.mjs +11 -11
- package/fesm2020/volo-abp.ng.chat-config.mjs.map +1 -1
- package/fesm2020/volo-abp.ng.chat-proxy.mjs +9 -9
- package/fesm2020/volo-abp.ng.chat.mjs +26 -26
- package/lib/components/chat-contacts.component.d.ts +1 -1
- package/lib/components/chat-message-title.component.d.ts +1 -1
- package/lib/components/chat.component.d.ts +1 -1
- package/lib/components/conversation-avatar.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -13,5 +13,5 @@ export declare class ChatIconComponent implements OnDestroy {
|
|
|
13
13
|
private listenToRouterEvents;
|
|
14
14
|
ngOnDestroy(): void;
|
|
15
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatIconComponent, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChatIconComponent, "abp-chat-icon", never, {}, {}, never, never, false>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatIconComponent, "abp-chat-icon", never, {}, {}, never, never, false, never>;
|
|
17
17
|
}
|
|
@@ -23,10 +23,10 @@ export class ChatConfigModule {
|
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
ChatConfigModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
27
|
-
ChatConfigModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
28
|
-
ChatConfigModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
26
|
+
ChatConfigModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
27
|
+
ChatConfigModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.1", ngImport: i0, type: ChatConfigModule, declarations: [ChatIconComponent], imports: [CoreModule] });
|
|
28
|
+
ChatConfigModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatConfigModule, imports: [CoreModule] });
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatConfigModule, decorators: [{
|
|
30
30
|
type: NgModule,
|
|
31
31
|
args: [{
|
|
32
32
|
imports: [CoreModule],
|
|
@@ -40,16 +40,16 @@ export class ChatIconComponent {
|
|
|
40
40
|
this.subscription.unsubscribe();
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
ChatIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
44
|
-
ChatIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
43
|
+
ChatIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatIconComponent, deps: [{ token: i1.ChatConfigService }, { token: i2.ToasterService }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
44
|
+
ChatIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: ChatIconComponent, selector: "abp-chat-icon", ngImport: i0, template: `<div class="position-relative">
|
|
45
45
|
<a routerLink="/chat"
|
|
46
46
|
><i class="fas fa-comments fa-lg"></i>
|
|
47
47
|
<span *ngIf="chatConfigService.unreadMessagesCount" class="badge badge-primary">{{
|
|
48
48
|
chatConfigService.unreadMessagesCount
|
|
49
49
|
}}</span></a
|
|
50
50
|
>
|
|
51
|
-
</div>`, isInline: true, styles: ["a{color:inherit}.badge{position:absolute;right:-10px;top:-8px}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
51
|
+
</div>`, isInline: true, styles: ["a{color:inherit}.badge{position:absolute;right:-10px;top:-8px}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatIconComponent, decorators: [{
|
|
53
53
|
type: Component,
|
|
54
54
|
args: [{ selector: 'abp-chat-icon', template: `<div class="position-relative">
|
|
55
55
|
<a routerLink="/chat"
|
|
@@ -86,9 +86,9 @@ export class ChatConfigService {
|
|
|
86
86
|
.subscribe((count) => (this.unreadMessagesCount = count));
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
ChatConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
90
|
-
ChatConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
89
|
+
ChatConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatConfigService, deps: [{ token: i1.RestService }, { token: i2.Router }, { token: i3.OAuthService }, { token: i4.NavItemsService }, { token: i1.PermissionService }, { token: i1.ConfigStateService }, { token: i1.EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
90
|
+
ChatConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatConfigService, providedIn: 'root' });
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatConfigService, decorators: [{
|
|
92
92
|
type: Injectable,
|
|
93
93
|
args: [{
|
|
94
94
|
providedIn: 'root',
|
|
@@ -26,10 +26,10 @@ const routes = [
|
|
|
26
26
|
];
|
|
27
27
|
export class ChatRoutingModule {
|
|
28
28
|
}
|
|
29
|
-
ChatRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
30
|
-
ChatRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
31
|
-
ChatRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
29
|
+
ChatRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
30
|
+
ChatRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.1", ngImport: i0, type: ChatRoutingModule, imports: [i1.RouterModule], exports: [RouterModule] });
|
|
31
|
+
ChatRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] });
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatRoutingModule, decorators: [{
|
|
33
33
|
type: NgModule,
|
|
34
34
|
args: [{
|
|
35
35
|
imports: [RouterModule.forChild(routes)],
|
|
@@ -24,16 +24,16 @@ export class ChatModule {
|
|
|
24
24
|
return new LazyModuleFactory(ChatModule.forChild());
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
ChatModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
28
|
-
ChatModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
27
|
+
ChatModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
28
|
+
ChatModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.1", ngImport: i0, type: ChatModule, declarations: [ChatComponent,
|
|
29
29
|
ChatContactsComponent,
|
|
30
30
|
ConversationAvatarComponent,
|
|
31
31
|
ChatMessageTitleComponent], imports: [CoreModule, ThemeSharedModule, ChatRoutingModule], exports: [ChatComponent,
|
|
32
32
|
ChatContactsComponent,
|
|
33
33
|
ConversationAvatarComponent,
|
|
34
34
|
ChatMessageTitleComponent] });
|
|
35
|
-
ChatModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
35
|
+
ChatModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatModule, imports: [CoreModule, ThemeSharedModule, ChatRoutingModule] });
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatModule, decorators: [{
|
|
37
37
|
type: NgModule,
|
|
38
38
|
args: [{
|
|
39
39
|
declarations,
|
|
@@ -86,9 +86,9 @@ export class ChatContactsComponent {
|
|
|
86
86
|
this.selectedContact.unreadMessageCount = 0;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
ChatContactsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
90
|
-
ChatContactsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
89
|
+
ChatContactsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatContactsComponent, deps: [{ token: i1.ContactService }, { token: i2.ChatConfigService }, { token: i3.SubscriptionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
90
|
+
ChatContactsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: ChatContactsComponent, selector: "abp-chat-contacts", outputs: { selected: "selected" }, providers: [SubscriptionService], ngImport: i0, template: "\r\n<div class=\"card w-100 mb-3 mb-md-0\">\r\n\r\n <div class=\"card-body p-1 p-md-2 p-lg-3\">\r\n <div class=\" mb-2 rounded-2\">\r\n <div class=\"row\">\r\n <div class=\"col\">\r\n <input\r\n id=\"contacts-filter\"\r\n type=\"search\"\r\n class=\"form-control form-control\"\r\n autocomplete=\"off\"\r\n spellcheck=\"false\"\r\n [(ngModel)]=\"filter\"\r\n [placeholder]=\"'Chat::SearchInContacts' | abpLocalization\"\r\n [attr.aria-label]=\"'Chat::SearchInContacts' | abpLocalization\"\r\n (input.debounce)=\"get()\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"messages-box m-0 p-0\">\r\n <div class=\"list-group rounded-3\" id=\"contact-list\">\r\n <ng-container\r\n *ngFor=\"let contact of contacts; let i = index; trackBy: trackByUserId\"\r\n [ngTemplateOutlet]=\"contactTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: contact, index: i }\"\r\n >\r\n </ng-container>\r\n <div\r\n *ngIf=\"otherContacts.length\"\r\n class=\"list-group-item px-2 py-1 bg-light text-muted text-center font-size-sm text-uppercase border-start-0 border-end-0\"\r\n >\r\n <small>{{ 'Chat::OtherContacts' | abpLocalization }}</small>\r\n </div>\r\n <ng-container\r\n *ngFor=\"let contact of otherContacts; let i = index; trackBy: trackByUserId\"\r\n [ngTemplateOutlet]=\"contactTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: contact, index: i }\"\r\n >\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #contactTemplate let-contact let-i=\"index\">\r\n <a\r\n (click)=\"selectContact(contact)\"\r\n class=\"chat-contact list-group-item list-group-item-action cursor-pointer px-2 border-2 rounded-2 mb-1 mt-0 {{\r\n selectedContact.userId === contact.userId ? 'active' : ''\r\n }}\"\r\n ><div class=\"media\">\r\n <abp-conversation-avatar [contact]=\"contact\"></abp-conversation-avatar>\r\n <div class=\"media-body ms-2\">\r\n <div class=\"d-flex align-items-center justify-content-between mb-0\">\r\n <h5 class=\"mb-0 mt-1\">\r\n <small *ngIf=\"contact.unreadMessageCount\" class=\"badge badge-success me-1\">{{\r\n contact.unreadMessageCount\r\n }}</small\r\n >{{ getContactName(contact) }}\r\n </h5>\r\n <small class=\"last-message-date\">{{\r\n contact.lastMessageDate | date\r\n }}</small>\r\n </div>\r\n <p class=\"mb-0 small last-message\">\r\n {{\r\n contact.lastMessage?.length > 24\r\n ? (contact.lastMessage | slice: 0:23) + '...'\r\n : contact.lastMessage\r\n }}\r\n </p>\r\n </div>\r\n </div>\r\n </a>\r\n</ng-template>\r\n", styles: [".messages-box{overflow-y:scroll;max-height:calc(100vh - 254.34px)}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.InputEventDebounceDirective, selector: "[input.debounce]", inputs: ["debounce"], outputs: ["input.debounce"] }, { kind: "component", type: i6.ConversationAvatarComponent, selector: "abp-conversation-avatar", inputs: ["contact", "small"] }, { kind: "pipe", type: i4.SlicePipe, name: "slice" }, { kind: "pipe", type: i4.DatePipe, name: "date" }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] });
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatContactsComponent, decorators: [{
|
|
92
92
|
type: Component,
|
|
93
93
|
args: [{ selector: 'abp-chat-contacts', providers: [SubscriptionService], template: "\r\n<div class=\"card w-100 mb-3 mb-md-0\">\r\n\r\n <div class=\"card-body p-1 p-md-2 p-lg-3\">\r\n <div class=\" mb-2 rounded-2\">\r\n <div class=\"row\">\r\n <div class=\"col\">\r\n <input\r\n id=\"contacts-filter\"\r\n type=\"search\"\r\n class=\"form-control form-control\"\r\n autocomplete=\"off\"\r\n spellcheck=\"false\"\r\n [(ngModel)]=\"filter\"\r\n [placeholder]=\"'Chat::SearchInContacts' | abpLocalization\"\r\n [attr.aria-label]=\"'Chat::SearchInContacts' | abpLocalization\"\r\n (input.debounce)=\"get()\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"messages-box m-0 p-0\">\r\n <div class=\"list-group rounded-3\" id=\"contact-list\">\r\n <ng-container\r\n *ngFor=\"let contact of contacts; let i = index; trackBy: trackByUserId\"\r\n [ngTemplateOutlet]=\"contactTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: contact, index: i }\"\r\n >\r\n </ng-container>\r\n <div\r\n *ngIf=\"otherContacts.length\"\r\n class=\"list-group-item px-2 py-1 bg-light text-muted text-center font-size-sm text-uppercase border-start-0 border-end-0\"\r\n >\r\n <small>{{ 'Chat::OtherContacts' | abpLocalization }}</small>\r\n </div>\r\n <ng-container\r\n *ngFor=\"let contact of otherContacts; let i = index; trackBy: trackByUserId\"\r\n [ngTemplateOutlet]=\"contactTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: contact, index: i }\"\r\n >\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #contactTemplate let-contact let-i=\"index\">\r\n <a\r\n (click)=\"selectContact(contact)\"\r\n class=\"chat-contact list-group-item list-group-item-action cursor-pointer px-2 border-2 rounded-2 mb-1 mt-0 {{\r\n selectedContact.userId === contact.userId ? 'active' : ''\r\n }}\"\r\n ><div class=\"media\">\r\n <abp-conversation-avatar [contact]=\"contact\"></abp-conversation-avatar>\r\n <div class=\"media-body ms-2\">\r\n <div class=\"d-flex align-items-center justify-content-between mb-0\">\r\n <h5 class=\"mb-0 mt-1\">\r\n <small *ngIf=\"contact.unreadMessageCount\" class=\"badge badge-success me-1\">{{\r\n contact.unreadMessageCount\r\n }}</small\r\n >{{ getContactName(contact) }}\r\n </h5>\r\n <small class=\"last-message-date\">{{\r\n contact.lastMessageDate | date\r\n }}</small>\r\n </div>\r\n <p class=\"mb-0 small last-message\">\r\n {{\r\n contact.lastMessage?.length > 24\r\n ? (contact.lastMessage | slice: 0:23) + '...'\r\n : contact.lastMessage\r\n }}\r\n </p>\r\n </div>\r\n </div>\r\n </a>\r\n</ng-template>\r\n", styles: [".messages-box{overflow-y:scroll;max-height:calc(100vh - 254.34px)}\n"] }]
|
|
94
94
|
}], ctorParameters: function () { return [{ type: i1.ContactService }, { type: i2.ChatConfigService }, { type: i3.SubscriptionService }]; }, propDecorators: { selected: [{
|
|
@@ -8,8 +8,8 @@ export class ChatMessageTitleComponent {
|
|
|
8
8
|
return getContactName(this.selectedContact || {});
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
ChatMessageTitleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
12
|
-
ChatMessageTitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
11
|
+
ChatMessageTitleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatMessageTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12
|
+
ChatMessageTitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: ChatMessageTitleComponent, selector: "abp-chat-message-title", inputs: { selectedContact: "selectedContact" }, ngImport: i0, template: `
|
|
13
13
|
<div class="px-2 py-1 border mb-2 rounded-2">
|
|
14
14
|
<div class="row">
|
|
15
15
|
<div class="col-auto py-1 pe-0">
|
|
@@ -22,7 +22,7 @@ ChatMessageTitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
|
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
24
24
|
`, isInline: true, dependencies: [{ kind: "component", type: i1.ConversationAvatarComponent, selector: "abp-conversation-avatar", inputs: ["contact", "small"] }] });
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatMessageTitleComponent, decorators: [{
|
|
26
26
|
type: Component,
|
|
27
27
|
args: [{ selector: 'abp-chat-message-title', template: `
|
|
28
28
|
<div class="px-2 py-1 border mb-2 rounded-2">
|
|
@@ -182,9 +182,9 @@ export class ChatComponent {
|
|
|
182
182
|
}, 0);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
ChatComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
186
|
-
ChatComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
187
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
185
|
+
ChatComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatComponent, deps: [{ token: i1.ConversationService }, { token: i2.ChatConfigService }, { token: i3.ConfigStateService }, { token: i3.HttpWaitService }], target: i0.ɵɵFactoryTarget.Component });
|
|
186
|
+
ChatComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: ChatComponent, selector: "abp-chat", viewQueries: [{ propertyName: "chatBoxRef", first: true, predicate: ["chatBox"], descendants: true }, { propertyName: "chatContactsComponent", first: true, predicate: ChatContactsComponent, descendants: true }], ngImport: i0, template: "<div class=\"row entry-row\">\r\n <div class=\"col-auto\"></div>\r\n <div class=\"col-lg-auto ps-lg-0\"></div>\r\n <div class=\"col\">\r\n <div class=\"text-lg-end pt-2\" id=\"AbpContentToolbar\"></div>\r\n </div>\r\n</div>\r\n\r\n<div id=\"chat_wrapper\">\r\n <div class=\"container-fluid\">\r\n <div class=\"row\">\r\n <!-- Users box-->\r\n <div class=\"col-12 col-md-5 col-lg-4 d-flex align-items-stretch\">\r\n <abp-chat-contacts class=\"d-flex w-100\" (selected)=\"onSelectContact($event)\"></abp-chat-contacts>\r\n </div>\r\n <!-- /Users box-->\r\n\r\n <!-- Chat Box-->\r\n\r\n <div class=\"col-12 col-md-7 col-lg-8 d-flex align-items-stretch\">\r\n <div class=\"card w-100 mb-0\">\r\n <div class=\"card-body p-1 p-md-2 p-lg-3\">\r\n <abp-chat-message-title [selectedContact]=\"selectedContact\"></abp-chat-message-title>\r\n\r\n <div #chatBox id=\"chat-conversation-wrapper\" class=\"chat-box mb-2\">\r\n <div class=\"chat-box-container\" id=\"chat-conversation\">\r\n <ng-container\r\n *ngFor=\"\r\n let message of selectedContactMessages;\r\n let i = index;\r\n trackBy: trackByMessageDate\r\n \"\r\n >\r\n <div\r\n *ngIf=\"selectedContactMessages.length - unreadMessageCount === i\"\r\n class=\"row justify-content-center unread-message-count-badge-wrapper\"\r\n >\r\n <h3>\r\n <span class=\"badge badge-info\">\r\n <ng-container *ngIf=\"unreadMessageCount === 1; else moreThanOne\">\r\n {{ 'Chat::YouHaveAnUnreadMessage' | abpLocalization }}\r\n </ng-container>\r\n\r\n <ng-template #moreThanOne>\r\n {{\r\n 'Chat::YouHave{0}UnreadMessages'\r\n | abpLocalization: '' + unreadMessageCount\r\n }}\r\n </ng-template>\r\n </span>\r\n </h3>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"{ isSender: message.side === chatMessageSide.Sender } as data\"\r\n class=\"media w-75 mw-65 w-lp-auto mb-2\"\r\n [class.ms-auto]=\"data.isSender\"\r\n >\r\n <div class=\"media-body position-relative\">\r\n <div\r\n class=\"card shadow-sm rounded py-1 px-2 py-lg-2 px-lg-3 mb-1 {{\r\n data.isSender ? 'bg-primary' : 'bg-light'\r\n }}\"\r\n >\r\n <p\r\n class=\"text-small mb-0 {{ data.isSender ? 'text-white' : 'text-muted' }}\"\r\n [innerHTML]=\"message.message\"\r\n ></p>\r\n </div>\r\n <p\r\n class=\"message-date small text-muted m-0 {{\r\n data.isSender ? 'left' : 'right'\r\n }}\"\r\n >\r\n {{ message.messageDate | date: getDateFormat(message.messageDate) }}\r\n </p>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <!-- Typing area -->\r\n <div\r\n *ngIf=\"selectedContact?.userId\"\r\n id=\"send-message-form\"\r\n class=\"bg-light rounded-3 m-0\"\r\n >\r\n <div class=\"p-2 p-lg-3\">\r\n <textarea\r\n id=\"chat-message-box\"\r\n name=\"message\"\r\n type=\"text\"\r\n [placeholder]=\"'Chat::TypeMessage' | abpLocalization\"\r\n class=\"form-control rounded py-2 bg-white\"\r\n [(ngModel)]=\"message\"\r\n (keydown.enter)=\"sendWithEnter($event)\"\r\n ></textarea>\r\n <div class=\"form-check float-start mt-2\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"form-check-input border shadow-sm\"\r\n id=\"send-on-enter\"\r\n [(ngModel)]=\"sendOnEnter\"\r\n />\r\n <label class=\"form-check-label\" for=\"send-on-enter\">{{\r\n 'Chat::SendOnEnter' | abpLocalization\r\n }}</label>\r\n </div>\r\n <div class=\"mt-2 text-end\">\r\n <button\r\n [disabled]=\"!message\"\r\n (click)=\"send()\"\r\n id=\"send-message-button\"\r\n type=\"button\"\r\n class=\"btn btn-primary px-3\"\r\n >\r\n {{ 'Chat::Send' | abpLocalization }}\r\n <i *ngIf=\"!loading; else loadingIcon\" class=\"fa fa-paper-plane ms-2\"></i>\r\n\r\n <ng-template #loadingIcon>\r\n <i class=\"fas fa-spinner fa-spin ms-2\"></i>\r\n </ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- /Chat Box-->\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".chat-box{height:calc(100vh - 390px);overflow-y:scroll}.message-date{position:absolute;opacity:.35;width:100px;top:1px}.message-date.left{left:-110px;text-align:right}.message-date.right{right:-110px}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.ChatContactsComponent, selector: "abp-chat-contacts", outputs: ["selected"] }, { kind: "component", type: i7.ChatMessageTitleComponent, selector: "abp-chat-message-title", inputs: ["selectedContact"] }, { kind: "pipe", type: i4.DatePipe, name: "date" }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] });
|
|
187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatComponent, decorators: [{
|
|
188
188
|
type: Component,
|
|
189
189
|
args: [{ selector: 'abp-chat', template: "<div class=\"row entry-row\">\r\n <div class=\"col-auto\"></div>\r\n <div class=\"col-lg-auto ps-lg-0\"></div>\r\n <div class=\"col\">\r\n <div class=\"text-lg-end pt-2\" id=\"AbpContentToolbar\"></div>\r\n </div>\r\n</div>\r\n\r\n<div id=\"chat_wrapper\">\r\n <div class=\"container-fluid\">\r\n <div class=\"row\">\r\n <!-- Users box-->\r\n <div class=\"col-12 col-md-5 col-lg-4 d-flex align-items-stretch\">\r\n <abp-chat-contacts class=\"d-flex w-100\" (selected)=\"onSelectContact($event)\"></abp-chat-contacts>\r\n </div>\r\n <!-- /Users box-->\r\n\r\n <!-- Chat Box-->\r\n\r\n <div class=\"col-12 col-md-7 col-lg-8 d-flex align-items-stretch\">\r\n <div class=\"card w-100 mb-0\">\r\n <div class=\"card-body p-1 p-md-2 p-lg-3\">\r\n <abp-chat-message-title [selectedContact]=\"selectedContact\"></abp-chat-message-title>\r\n\r\n <div #chatBox id=\"chat-conversation-wrapper\" class=\"chat-box mb-2\">\r\n <div class=\"chat-box-container\" id=\"chat-conversation\">\r\n <ng-container\r\n *ngFor=\"\r\n let message of selectedContactMessages;\r\n let i = index;\r\n trackBy: trackByMessageDate\r\n \"\r\n >\r\n <div\r\n *ngIf=\"selectedContactMessages.length - unreadMessageCount === i\"\r\n class=\"row justify-content-center unread-message-count-badge-wrapper\"\r\n >\r\n <h3>\r\n <span class=\"badge badge-info\">\r\n <ng-container *ngIf=\"unreadMessageCount === 1; else moreThanOne\">\r\n {{ 'Chat::YouHaveAnUnreadMessage' | abpLocalization }}\r\n </ng-container>\r\n\r\n <ng-template #moreThanOne>\r\n {{\r\n 'Chat::YouHave{0}UnreadMessages'\r\n | abpLocalization: '' + unreadMessageCount\r\n }}\r\n </ng-template>\r\n </span>\r\n </h3>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"{ isSender: message.side === chatMessageSide.Sender } as data\"\r\n class=\"media w-75 mw-65 w-lp-auto mb-2\"\r\n [class.ms-auto]=\"data.isSender\"\r\n >\r\n <div class=\"media-body position-relative\">\r\n <div\r\n class=\"card shadow-sm rounded py-1 px-2 py-lg-2 px-lg-3 mb-1 {{\r\n data.isSender ? 'bg-primary' : 'bg-light'\r\n }}\"\r\n >\r\n <p\r\n class=\"text-small mb-0 {{ data.isSender ? 'text-white' : 'text-muted' }}\"\r\n [innerHTML]=\"message.message\"\r\n ></p>\r\n </div>\r\n <p\r\n class=\"message-date small text-muted m-0 {{\r\n data.isSender ? 'left' : 'right'\r\n }}\"\r\n >\r\n {{ message.messageDate | date: getDateFormat(message.messageDate) }}\r\n </p>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <!-- Typing area -->\r\n <div\r\n *ngIf=\"selectedContact?.userId\"\r\n id=\"send-message-form\"\r\n class=\"bg-light rounded-3 m-0\"\r\n >\r\n <div class=\"p-2 p-lg-3\">\r\n <textarea\r\n id=\"chat-message-box\"\r\n name=\"message\"\r\n type=\"text\"\r\n [placeholder]=\"'Chat::TypeMessage' | abpLocalization\"\r\n class=\"form-control rounded py-2 bg-white\"\r\n [(ngModel)]=\"message\"\r\n (keydown.enter)=\"sendWithEnter($event)\"\r\n ></textarea>\r\n <div class=\"form-check float-start mt-2\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"form-check-input border shadow-sm\"\r\n id=\"send-on-enter\"\r\n [(ngModel)]=\"sendOnEnter\"\r\n />\r\n <label class=\"form-check-label\" for=\"send-on-enter\">{{\r\n 'Chat::SendOnEnter' | abpLocalization\r\n }}</label>\r\n </div>\r\n <div class=\"mt-2 text-end\">\r\n <button\r\n [disabled]=\"!message\"\r\n (click)=\"send()\"\r\n id=\"send-message-button\"\r\n type=\"button\"\r\n class=\"btn btn-primary px-3\"\r\n >\r\n {{ 'Chat::Send' | abpLocalization }}\r\n <i *ngIf=\"!loading; else loadingIcon\" class=\"fa fa-paper-plane ms-2\"></i>\r\n\r\n <ng-template #loadingIcon>\r\n <i class=\"fas fa-spinner fa-spin ms-2\"></i>\r\n </ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- /Chat Box-->\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".chat-box{height:calc(100vh - 390px);overflow-y:scroll}.message-date{position:absolute;opacity:.35;width:100px;top:1px}.message-date.left{left:-110px;text-align:right}.message-date.right{right:-110px}\n"] }]
|
|
190
190
|
}], ctorParameters: function () { return [{ type: i1.ConversationService }, { type: i2.ChatConfigService }, { type: i3.ConfigStateService }, { type: i3.HttpWaitService }]; }, propDecorators: { chatBoxRef: [{
|
|
@@ -37,15 +37,15 @@ export class ConversationAvatarComponent {
|
|
|
37
37
|
return typeof this.small === 'string' || this.small;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
ConversationAvatarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
41
|
-
ConversationAvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
40
|
+
ConversationAvatarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ConversationAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
41
|
+
ConversationAvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: ConversationAvatarComponent, selector: "abp-conversation-avatar", inputs: { contact: "contact", small: "small" }, ngImport: i0, template: `<div
|
|
42
42
|
class="avatar me-2 float-start rounded-circle"
|
|
43
43
|
[class.small]="isSmall"
|
|
44
44
|
[ngStyle]="avatarBgStyle"
|
|
45
45
|
>
|
|
46
46
|
{{ avatarText }}
|
|
47
47
|
</div>`, isInline: true, styles: [".avatar{height:48px;width:48px;line-height:48px;font-size:16px;font-weight:700;text-align:center;text-transform:uppercase}.avatar.small{height:36px;width:36px;line-height:37px;font-size:14px}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ConversationAvatarComponent, decorators: [{
|
|
49
49
|
type: Component,
|
|
50
50
|
args: [{ selector: 'abp-conversation-avatar', template: `<div
|
|
51
51
|
class="avatar me-2 float-start rounded-circle"
|
|
@@ -11,9 +11,9 @@ export class ContactService {
|
|
|
11
11
|
return this.restService.request({ url: '/api/chat/contact/contacts', method: 'GET', params }, { apiName: this.apiName });
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
ContactService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
15
|
-
ContactService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
14
|
+
ContactService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ContactService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
15
|
+
ContactService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ContactService, providedIn: 'root' });
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ContactService, decorators: [{
|
|
17
17
|
type: Injectable,
|
|
18
18
|
args: [{ providedIn: 'root' }]
|
|
19
19
|
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
@@ -17,9 +17,9 @@ export class ConversationService {
|
|
|
17
17
|
return this.restService.request({ url: '/api/chat/conversation/mark-conversation-as-read', method: 'POST', body }, { apiName: this.apiName });
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
ConversationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
21
|
-
ConversationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
20
|
+
ConversationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ConversationService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
21
|
+
ConversationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ConversationService, providedIn: 'root' });
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ConversationService, decorators: [{
|
|
23
23
|
type: Injectable,
|
|
24
24
|
args: [{ providedIn: 'root' }]
|
|
25
25
|
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
@@ -23,9 +23,9 @@ export class ConversationService {
|
|
|
23
23
|
}, { apiName: this.apiName });
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
ConversationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
27
|
-
ConversationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
26
|
+
ConversationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ConversationService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
27
|
+
ConversationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ConversationService, providedIn: 'root' });
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ConversationService, decorators: [{
|
|
29
29
|
type: Injectable,
|
|
30
30
|
args: [{
|
|
31
31
|
providedIn: 'root',
|
|
@@ -13,9 +13,9 @@ export class SettingsService {
|
|
|
13
13
|
}, { apiName: this.apiName });
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
SettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
17
|
-
SettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
16
|
+
SettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: SettingsService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
17
|
+
SettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: SettingsService, providedIn: 'root' });
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: SettingsService, decorators: [{
|
|
19
19
|
type: Injectable,
|
|
20
20
|
args: [{
|
|
21
21
|
providedIn: 'root',
|
|
@@ -17,9 +17,9 @@ export class ContactService {
|
|
|
17
17
|
}, { apiName: this.apiName });
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
ContactService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
21
|
-
ContactService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
20
|
+
ContactService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ContactService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
21
|
+
ContactService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ContactService, providedIn: 'root' });
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ContactService, decorators: [{
|
|
23
23
|
type: Injectable,
|
|
24
24
|
args: [{
|
|
25
25
|
providedIn: 'root',
|
|
@@ -90,9 +90,9 @@ class ChatConfigService {
|
|
|
90
90
|
.subscribe((count) => (this.unreadMessagesCount = count));
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
ChatConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
94
|
-
ChatConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
93
|
+
ChatConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", 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: "15.0.1", ngImport: i0, type: ChatConfigService, providedIn: 'root' });
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatConfigService, decorators: [{
|
|
96
96
|
type: Injectable,
|
|
97
97
|
args: [{
|
|
98
98
|
providedIn: 'root',
|
|
@@ -130,16 +130,16 @@ class ChatIconComponent {
|
|
|
130
130
|
this.subscription.unsubscribe();
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
ChatIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
134
|
-
ChatIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
133
|
+
ChatIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatIconComponent, deps: [{ token: ChatConfigService }, { token: i4.ToasterService }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
134
|
+
ChatIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: ChatIconComponent, selector: "abp-chat-icon", ngImport: i0, template: `<div class="position-relative">
|
|
135
135
|
<a routerLink="/chat"
|
|
136
136
|
><i class="fas fa-comments fa-lg"></i>
|
|
137
137
|
<span *ngIf="chatConfigService.unreadMessagesCount" class="badge badge-primary">{{
|
|
138
138
|
chatConfigService.unreadMessagesCount
|
|
139
139
|
}}</span></a
|
|
140
140
|
>
|
|
141
|
-
</div>`, isInline: true, styles: ["a{color:inherit}.badge{position:absolute;right:-10px;top:-8px}\n"], dependencies: [{ kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.
|
|
142
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
141
|
+
</div>`, isInline: true, styles: ["a{color:inherit}.badge{position:absolute;right:-10px;top:-8px}\n"], dependencies: [{ kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatIconComponent, decorators: [{
|
|
143
143
|
type: Component,
|
|
144
144
|
args: [{ selector: 'abp-chat-icon', template: `<div class="position-relative">
|
|
145
145
|
<a routerLink="/chat"
|
|
@@ -202,10 +202,10 @@ class ChatConfigModule {
|
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
ChatConfigModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
206
|
-
ChatConfigModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
207
|
-
ChatConfigModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
208
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
205
|
+
ChatConfigModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
206
|
+
ChatConfigModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.1", ngImport: i0, type: ChatConfigModule, declarations: [ChatIconComponent], imports: [CoreModule] });
|
|
207
|
+
ChatConfigModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatConfigModule, imports: [CoreModule] });
|
|
208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChatConfigModule, decorators: [{
|
|
209
209
|
type: NgModule,
|
|
210
210
|
args: [{
|
|
211
211
|
imports: [CoreModule],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"volo-abp.ng.chat-config.mjs","sources":["../../../../packages/chat/config/src/services/chat-config.service.ts","../../../../packages/chat/config/src/components/chat-icon.component.ts","../../../../packages/chat/config/src/providers/nav-item.provider.ts","../../../../packages/chat/config/src/providers/route.provider.ts","../../../../packages/chat/config/src/chat-config.module.ts","../../../../packages/chat/config/src/volo-abp.ng.chat-config.ts"],"sourcesContent":["import {\r\n ConfigStateService,\r\n CurrentUserDto,\r\n EnvironmentService,\r\n PermissionService,\r\n RestService,\r\n} from '@abp/ng.core';\r\nimport { NavItemsService } from '@abp/ng.theme.shared';\r\nimport { Injectable } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport * as signalR from '@microsoft/signalr';\r\nimport { OAuthService } from 'angular-oauth2-oidc';\r\nimport { Subject } from 'rxjs';\r\n\r\nconst permission = 'Chat.Messaging';\r\n\r\nexport interface ChatMessage {\r\n senderUserId: string;\r\n senderUsername: string;\r\n senderName: string;\r\n senderSurname: string;\r\n text: string;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ChatConfigService {\r\n apiName = 'Chat';\r\n conectedUserId: string;\r\n connection: signalR.HubConnection;\r\n message$ = new Subject<ChatMessage>();\r\n unreadMessagesCount = 0;\r\n\r\n get isChatEnabled(): boolean {\r\n return (this.configState.getFeature('Chat.Enable') || '').toLowerCase() !== 'false';\r\n }\r\n\r\n get signalRUrl() {\r\n const { apis } = this.environmentService.getEnvironment();\r\n\r\n return apis[this.apiName]?.signalRUrl || apis[this.apiName]?.url || apis.default.url;\r\n }\r\n\r\n constructor(\r\n private restService: RestService,\r\n private router: Router,\r\n private oAuthService: OAuthService,\r\n private navItems: NavItemsService,\r\n private permissionService: PermissionService,\r\n private configState: ConfigStateService,\r\n private environmentService: EnvironmentService\r\n ) {\r\n this.listenToAppConfig();\r\n }\r\n\r\n private listenToAppConfig() {\r\n this.configState\r\n .createOnUpdateStream((state) => state)\r\n .subscribe(() => {\r\n const currentUser = this.configState.getOne('currentUser') as CurrentUserDto;\r\n\r\n if (!this.isChatEnabled) {\r\n this.toggleChat();\r\n return;\r\n }\r\n\r\n if (!currentUser.isAuthenticated || !this.permissionService.getGrantedPolicy(permission)) {\r\n if (this.connection) this.connection.stop();\r\n return;\r\n }\r\n\r\n this.initSignalR(currentUser);\r\n this.setTotalUnreadMessageCount();\r\n });\r\n }\r\n\r\n private toggleChat() {\r\n if (!this.isChatEnabled && this.connection) this.connection.stop();\r\n this.navItems.patchItem('Chat.ChatIconComponent', { visible: () => this.isChatEnabled });\r\n }\r\n\r\n private initSignalR(currentUser: CurrentUserDto) {\r\n if (this.conectedUserId === currentUser.id) return;\r\n if (this.connection) this.connection.stop();\r\n\r\n this.connection = new signalR.HubConnectionBuilder()\r\n .withUrl(`${this.signalRUrl}/signalr-hubs/chat`, {\r\n accessTokenFactory: () => this.oAuthService.getAccessToken(),\r\n })\r\n .build();\r\n\r\n this.connection.on('ReceiveMessage', this.handleMessage);\r\n\r\n this.connection\r\n .start()\r\n .then(() => {\r\n this.conectedUserId = currentUser.id;\r\n })\r\n .catch((err) => {\r\n return console.error(err.toString());\r\n });\r\n }\r\n\r\n private handleMessage = (message: ChatMessage) => {\r\n this.message$.next(message);\r\n };\r\n\r\n setTotalUnreadMessageCount() {\r\n if (this.router.url === '/chat') return;\r\n\r\n this.restService\r\n .request<null, number>(\r\n { url: '/api/chat/contact/total-unread-message-count', method: 'GET' },\r\n { apiName: this.apiName }\r\n )\r\n .subscribe((count) => (this.unreadMessagesCount = count));\r\n }\r\n}\r\n","import { ToasterService } from '@abp/ng.theme.shared';\r\nimport { Component, OnDestroy } from '@angular/core';\r\nimport { NavigationEnd, Router } from '@angular/router';\r\nimport { Subscription } from 'rxjs';\r\nimport { filter } from 'rxjs/operators';\r\nimport { ChatConfigService } from '../services/chat-config.service';\r\n\r\n@Component({\r\n selector: 'abp-chat-icon',\r\n template: `<div class=\"position-relative\">\r\n <a routerLink=\"/chat\"\r\n ><i class=\"fas fa-comments fa-lg\"></i>\r\n <span *ngIf=\"chatConfigService.unreadMessagesCount\" class=\"badge badge-primary\">{{\r\n chatConfigService.unreadMessagesCount\r\n }}</span></a\r\n >\r\n </div>`,\r\n styles: [\r\n `\r\n a {\r\n color: inherit;\r\n }\r\n\r\n .badge {\r\n position: absolute;\r\n right: -10px;\r\n top: -8px;\r\n }\r\n `,\r\n ],\r\n})\r\nexport class ChatIconComponent implements OnDestroy {\r\n private subscription = new Subscription();\r\n\r\n constructor(\r\n public chatConfigService: ChatConfigService,\r\n private toaster: ToasterService,\r\n private router: Router,\r\n ) {\r\n this.listenToMessages();\r\n this.listenToRouterEvents();\r\n }\r\n\r\n private listenToMessages() {\r\n this.subscription.add(\r\n this.chatConfigService.message$\r\n .pipe(filter(() => this.router.url !== '/chat'))\r\n .subscribe(message => {\r\n const { senderName, senderSurname, senderUsername, text } = message;\r\n const sender = `${\r\n senderName ? senderName + (' ' + senderSurname || '') : senderUsername\r\n }`;\r\n const toasterMessage = `<strong>${sender}</strong>: ${\r\n text.length > 50 ? text.substring(0, 49) + '...' : text\r\n }`;\r\n this.chatConfigService.unreadMessagesCount++;\r\n this.toaster.info(toasterMessage, 'Chat::NewChatMessage', {\r\n tapToDismiss: true,\r\n });\r\n }),\r\n );\r\n }\r\n\r\n private listenToRouterEvents() {\r\n this.subscription.add(\r\n this.router.events\r\n .pipe(filter(event => event instanceof NavigationEnd && event.url === '/chat'))\r\n .subscribe(() => (this.chatConfigService.unreadMessagesCount = 0)),\r\n );\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subscription.unsubscribe();\r\n }\r\n}\r\n","import { NavItemsService } from '@abp/ng.theme.shared';\r\nimport { APP_INITIALIZER } from '@angular/core';\r\nimport { ChatIconComponent } from '../components/chat-icon.component';\r\nimport { eChatPolicyNames } from '../enums/policy-names';\r\n\r\nexport const CHAT_NAV_ITEM_PROVIDERS = [\r\n { provide: APP_INITIALIZER, useFactory: configureNavItems, deps: [NavItemsService], multi: true },\r\n];\r\n\r\nexport function configureNavItems(navItems: NavItemsService) {\r\n return () => {\r\n navItems.addItems([\r\n {\r\n id: 'Chat.ChatIconComponent',\r\n requiredPolicy: eChatPolicyNames.Messaging,\r\n component: ChatIconComponent,\r\n order: 99.99,\r\n },\r\n ]);\r\n };\r\n}\r\n","import { eLayoutType, RoutesService } from '@abp/ng.core';\r\nimport { APP_INITIALIZER } from '@angular/core';\r\nimport { eChatPolicyNames } from '../enums/policy-names';\r\nimport { eChatRouteNames } from '../enums/route-names';\r\n\r\nexport const CHAT_ROUTE_PROVIDERS = [\r\n { provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true },\r\n];\r\n\r\nexport function configureRoutes(routes: RoutesService) {\r\n return () => {\r\n routes.add([\r\n {\r\n path: '/chat',\r\n name: eChatRouteNames.Chat,\r\n requiredPolicy: eChatPolicyNames.Messaging,\r\n layout: eLayoutType.application,\r\n iconClass: 'fa fa-comments',\r\n invisible: true,\r\n },\r\n ]);\r\n };\r\n}\r\n","import { CoreModule, noop } from '@abp/ng.core';\r\nimport { ModuleWithProviders, NgModule, APP_INITIALIZER } from '@angular/core';\r\nimport { ChatIconComponent } from './components/chat-icon.component';\r\nimport { CHAT_NAV_ITEM_PROVIDERS } from './providers/nav-item.provider';\r\nimport { CHAT_ROUTE_PROVIDERS } from './providers/route.provider';\r\nimport { ChatConfigService } from './services/chat-config.service';\r\nimport { OAuthService } from 'angular-oauth2-oidc';\r\n\r\n@NgModule({\r\n imports: [CoreModule],\r\n declarations: [ChatIconComponent]\r\n})\r\nexport class ChatConfigModule {\r\n static forRoot(): ModuleWithProviders<ChatConfigModule> {\r\n return {\r\n ngModule: ChatConfigModule,\r\n providers: [\r\n CHAT_ROUTE_PROVIDERS,\r\n CHAT_NAV_ITEM_PROVIDERS,\r\n {\r\n provide: APP_INITIALIZER,\r\n deps: [ChatConfigService, OAuthService],\r\n multi: true,\r\n useFactory: noop,\r\n },\r\n ],\r\n };\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i3","i1.ChatConfigService","i4"],"mappings":";;;;;;;;;;;;;;;AAcA,MAAM,UAAU,GAAG,gBAAgB,CAAC;MAavB,iBAAiB,CAAA;AAiB5B,IAAA,WAAA,CACU,WAAwB,EACxB,MAAc,EACd,YAA0B,EAC1B,QAAyB,EACzB,iBAAoC,EACpC,WAA+B,EAC/B,kBAAsC,EAAA;AANtC,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;AACxB,QAAA,IAAM,CAAA,MAAA,GAAN,MA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,CAAA,EAAA,CAAA,CAAA;2FAGX,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,UAAU,CAAC;oBACrB,YAAY,EAAE,CAAC,iBAAiB,CAAC;iBACpC,CAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"volo-abp.ng.chat-config.mjs","sources":["../../../../packages/chat/config/src/services/chat-config.service.ts","../../../../packages/chat/config/src/components/chat-icon.component.ts","../../../../packages/chat/config/src/providers/nav-item.provider.ts","../../../../packages/chat/config/src/providers/route.provider.ts","../../../../packages/chat/config/src/chat-config.module.ts","../../../../packages/chat/config/src/volo-abp.ng.chat-config.ts"],"sourcesContent":["import {\r\n ConfigStateService,\r\n CurrentUserDto,\r\n EnvironmentService,\r\n PermissionService,\r\n RestService,\r\n} from '@abp/ng.core';\r\nimport { NavItemsService } from '@abp/ng.theme.shared';\r\nimport { Injectable } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport * as signalR from '@microsoft/signalr';\r\nimport { OAuthService } from 'angular-oauth2-oidc';\r\nimport { Subject } from 'rxjs';\r\n\r\nconst permission = 'Chat.Messaging';\r\n\r\nexport interface ChatMessage {\r\n senderUserId: string;\r\n senderUsername: string;\r\n senderName: string;\r\n senderSurname: string;\r\n text: string;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ChatConfigService {\r\n apiName = 'Chat';\r\n conectedUserId: string;\r\n connection: signalR.HubConnection;\r\n message$ = new Subject<ChatMessage>();\r\n unreadMessagesCount = 0;\r\n\r\n get isChatEnabled(): boolean {\r\n return (this.configState.getFeature('Chat.Enable') || '').toLowerCase() !== 'false';\r\n }\r\n\r\n get signalRUrl() {\r\n const { apis } = this.environmentService.getEnvironment();\r\n\r\n return apis[this.apiName]?.signalRUrl || apis[this.apiName]?.url || apis.default.url;\r\n }\r\n\r\n constructor(\r\n private restService: RestService,\r\n private router: Router,\r\n private oAuthService: OAuthService,\r\n private navItems: NavItemsService,\r\n private permissionService: PermissionService,\r\n private configState: ConfigStateService,\r\n private environmentService: EnvironmentService\r\n ) {\r\n this.listenToAppConfig();\r\n }\r\n\r\n private listenToAppConfig() {\r\n this.configState\r\n .createOnUpdateStream((state) => state)\r\n .subscribe(() => {\r\n const currentUser = this.configState.getOne('currentUser') as CurrentUserDto;\r\n\r\n if (!this.isChatEnabled) {\r\n this.toggleChat();\r\n return;\r\n }\r\n\r\n if (!currentUser.isAuthenticated || !this.permissionService.getGrantedPolicy(permission)) {\r\n if (this.connection) this.connection.stop();\r\n return;\r\n }\r\n\r\n this.initSignalR(currentUser);\r\n this.setTotalUnreadMessageCount();\r\n });\r\n }\r\n\r\n private toggleChat() {\r\n if (!this.isChatEnabled && this.connection) this.connection.stop();\r\n this.navItems.patchItem('Chat.ChatIconComponent', { visible: () => this.isChatEnabled });\r\n }\r\n\r\n private initSignalR(currentUser: CurrentUserDto) {\r\n if (this.conectedUserId === currentUser.id) return;\r\n if (this.connection) this.connection.stop();\r\n\r\n this.connection = new signalR.HubConnectionBuilder()\r\n .withUrl(`${this.signalRUrl}/signalr-hubs/chat`, {\r\n accessTokenFactory: () => this.oAuthService.getAccessToken(),\r\n })\r\n .build();\r\n\r\n this.connection.on('ReceiveMessage', this.handleMessage);\r\n\r\n this.connection\r\n .start()\r\n .then(() => {\r\n this.conectedUserId = currentUser.id;\r\n })\r\n .catch((err) => {\r\n return console.error(err.toString());\r\n });\r\n }\r\n\r\n private handleMessage = (message: ChatMessage) => {\r\n this.message$.next(message);\r\n };\r\n\r\n setTotalUnreadMessageCount() {\r\n if (this.router.url === '/chat') return;\r\n\r\n this.restService\r\n .request<null, number>(\r\n { url: '/api/chat/contact/total-unread-message-count', method: 'GET' },\r\n { apiName: this.apiName }\r\n )\r\n .subscribe((count) => (this.unreadMessagesCount = count));\r\n }\r\n}\r\n","import { ToasterService } from '@abp/ng.theme.shared';\r\nimport { Component, OnDestroy } from '@angular/core';\r\nimport { NavigationEnd, Router } from '@angular/router';\r\nimport { Subscription } from 'rxjs';\r\nimport { filter } from 'rxjs/operators';\r\nimport { ChatConfigService } from '../services/chat-config.service';\r\n\r\n@Component({\r\n selector: 'abp-chat-icon',\r\n template: `<div class=\"position-relative\">\r\n <a routerLink=\"/chat\"\r\n ><i class=\"fas fa-comments fa-lg\"></i>\r\n <span *ngIf=\"chatConfigService.unreadMessagesCount\" class=\"badge badge-primary\">{{\r\n chatConfigService.unreadMessagesCount\r\n }}</span></a\r\n >\r\n </div>`,\r\n styles: [\r\n `\r\n a {\r\n color: inherit;\r\n }\r\n\r\n .badge {\r\n position: absolute;\r\n right: -10px;\r\n top: -8px;\r\n }\r\n `,\r\n ],\r\n})\r\nexport class ChatIconComponent implements OnDestroy {\r\n private subscription = new Subscription();\r\n\r\n constructor(\r\n public chatConfigService: ChatConfigService,\r\n private toaster: ToasterService,\r\n private router: Router,\r\n ) {\r\n this.listenToMessages();\r\n this.listenToRouterEvents();\r\n }\r\n\r\n private listenToMessages() {\r\n this.subscription.add(\r\n this.chatConfigService.message$\r\n .pipe(filter(() => this.router.url !== '/chat'))\r\n .subscribe(message => {\r\n const { senderName, senderSurname, senderUsername, text } = message;\r\n const sender = `${\r\n senderName ? senderName + (' ' + senderSurname || '') : senderUsername\r\n }`;\r\n const toasterMessage = `<strong>${sender}</strong>: ${\r\n text.length > 50 ? text.substring(0, 49) + '...' : text\r\n }`;\r\n this.chatConfigService.unreadMessagesCount++;\r\n this.toaster.info(toasterMessage, 'Chat::NewChatMessage', {\r\n tapToDismiss: true,\r\n });\r\n }),\r\n );\r\n }\r\n\r\n private listenToRouterEvents() {\r\n this.subscription.add(\r\n this.router.events\r\n .pipe(filter(event => event instanceof NavigationEnd && event.url === '/chat'))\r\n .subscribe(() => (this.chatConfigService.unreadMessagesCount = 0)),\r\n );\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subscription.unsubscribe();\r\n }\r\n}\r\n","import { NavItemsService } from '@abp/ng.theme.shared';\r\nimport { APP_INITIALIZER } from '@angular/core';\r\nimport { ChatIconComponent } from '../components/chat-icon.component';\r\nimport { eChatPolicyNames } from '../enums/policy-names';\r\n\r\nexport const CHAT_NAV_ITEM_PROVIDERS = [\r\n { provide: APP_INITIALIZER, useFactory: configureNavItems, deps: [NavItemsService], multi: true },\r\n];\r\n\r\nexport function configureNavItems(navItems: NavItemsService) {\r\n return () => {\r\n navItems.addItems([\r\n {\r\n id: 'Chat.ChatIconComponent',\r\n requiredPolicy: eChatPolicyNames.Messaging,\r\n component: ChatIconComponent,\r\n order: 99.99,\r\n },\r\n ]);\r\n };\r\n}\r\n","import { eLayoutType, RoutesService } from '@abp/ng.core';\r\nimport { APP_INITIALIZER } from '@angular/core';\r\nimport { eChatPolicyNames } from '../enums/policy-names';\r\nimport { eChatRouteNames } from '../enums/route-names';\r\n\r\nexport const CHAT_ROUTE_PROVIDERS = [\r\n { provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true },\r\n];\r\n\r\nexport function configureRoutes(routes: RoutesService) {\r\n return () => {\r\n routes.add([\r\n {\r\n path: '/chat',\r\n name: eChatRouteNames.Chat,\r\n requiredPolicy: eChatPolicyNames.Messaging,\r\n layout: eLayoutType.application,\r\n iconClass: 'fa fa-comments',\r\n invisible: true,\r\n },\r\n ]);\r\n };\r\n}\r\n","import { CoreModule, noop } from '@abp/ng.core';\r\nimport { ModuleWithProviders, NgModule, APP_INITIALIZER } from '@angular/core';\r\nimport { ChatIconComponent } from './components/chat-icon.component';\r\nimport { CHAT_NAV_ITEM_PROVIDERS } from './providers/nav-item.provider';\r\nimport { CHAT_ROUTE_PROVIDERS } from './providers/route.provider';\r\nimport { ChatConfigService } from './services/chat-config.service';\r\nimport { OAuthService } from 'angular-oauth2-oidc';\r\n\r\n@NgModule({\r\n imports: [CoreModule],\r\n declarations: [ChatIconComponent]\r\n})\r\nexport class ChatConfigModule {\r\n static forRoot(): ModuleWithProviders<ChatConfigModule> {\r\n return {\r\n ngModule: ChatConfigModule,\r\n providers: [\r\n CHAT_ROUTE_PROVIDERS,\r\n CHAT_NAV_ITEM_PROVIDERS,\r\n {\r\n provide: APP_INITIALIZER,\r\n deps: [ChatConfigService, OAuthService],\r\n multi: true,\r\n useFactory: noop,\r\n },\r\n ],\r\n };\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i3","i1.ChatConfigService","i4"],"mappings":";;;;;;;;;;;;;;;AAcA,MAAM,UAAU,GAAG,gBAAgB,CAAC;MAavB,iBAAiB,CAAA;AAiB5B,IAAA,WAAA,CACU,WAAwB,EACxB,MAAc,EACd,YAA0B,EAC1B,QAAyB,EACzB,iBAAoC,EACpC,WAA+B,EAC/B,kBAAsC,EAAA;AANtC,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;AACxB,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;AACd,QAAA,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAc;AAC1B,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAiB;AACzB,QAAA,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAmB;AACpC,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAoB;AAC/B,QAAA,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB,CAAoB;AAvBhD,QAAA,IAAO,CAAA,OAAA,GAAG,MAAM,CAAC;AAGjB,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,OAAO,EAAe,CAAC;AACtC,QAAA,IAAmB,CAAA,mBAAA,GAAG,CAAC,CAAC;AAwEhB,QAAA,IAAA,CAAA,aAAa,GAAG,CAAC,OAAoB,KAAI;AAC/C,YAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC9B,SAAC,CAAC;QArDA,IAAI,CAAC,iBAAiB,EAAE,CAAC;KAC1B;AApBD,IAAA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AAuB;AACvB,gBAAA;AACE,oBAAA,OAAO,EAAE,eAAe;AACxB,oBAAA,IAAI,EAAE,CAAC,iBAAiB,EAAE,YAAY,CAAC;AACvC,oBAAA,KAAK,EAAE,IAAI;AACX,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;AACF,aAAA;SACF,CAAC;KACH;;6GAfU,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;8GAAhB,gBAAgB,EAAA,YAAA,EAAA,CAFV,iBAAiB,CAAA,EAAA,OAAA,EAAA,CADtB,UAAU,CAAA,EAAA,CAAA,CAAA;AAGX,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAHf,UAAU,CAAA,EAAA,CAAA,CAAA;2FAGX,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,UAAU,CAAC;oBACrB,YAAY,EAAE,CAAC,iBAAiB,CAAC;iBACpC,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -24,9 +24,9 @@ class ConversationService {
|
|
|
24
24
|
}, { apiName: this.apiName });
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
ConversationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
28
|
-
ConversationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
27
|
+
ConversationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ConversationService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
28
|
+
ConversationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ConversationService, providedIn: 'root' });
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ConversationService, decorators: [{
|
|
30
30
|
type: Injectable,
|
|
31
31
|
args: [{
|
|
32
32
|
providedIn: 'root',
|
|
@@ -51,9 +51,9 @@ class SettingsService {
|
|
|
51
51
|
}, { apiName: this.apiName });
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
SettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
55
|
-
SettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
56
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
54
|
+
SettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: SettingsService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
55
|
+
SettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: SettingsService, providedIn: 'root' });
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: SettingsService, decorators: [{
|
|
57
57
|
type: Injectable,
|
|
58
58
|
args: [{
|
|
59
59
|
providedIn: 'root',
|
|
@@ -75,9 +75,9 @@ class ContactService {
|
|
|
75
75
|
}, { apiName: this.apiName });
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
ContactService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
79
|
-
ContactService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
80
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
78
|
+
ContactService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ContactService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
79
|
+
ContactService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ContactService, providedIn: 'root' });
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ContactService, decorators: [{
|
|
81
81
|
type: Injectable,
|
|
82
82
|
args: [{
|
|
83
83
|
providedIn: 'root',
|