@volo/abp.ng.chat 8.0.1 → 8.0.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/esm2022/config/chat-config.module.mjs +4 -4
- package/esm2022/config/components/chat-icon.component.mjs +6 -6
- package/esm2022/config/components/chat-tab.component.mjs +3 -3
- package/esm2022/config/services/chat-config.service.mjs +9 -6
- package/esm2022/lib/chat-routing.module.mjs +4 -4
- package/esm2022/lib/chat.module.mjs +4 -4
- package/esm2022/lib/components/chat-contacts.component.mjs +3 -3
- package/esm2022/lib/components/chat-message-title.component.mjs +3 -3
- package/esm2022/lib/components/chat.component.mjs +3 -3
- package/esm2022/lib/components/conversation-avatar.component.mjs +3 -3
- package/esm2022/lib/services/contact.service.mjs +3 -3
- package/esm2022/lib/services/conversation.service.mjs +3 -3
- package/esm2022/lib/services/settings.service.mjs +3 -3
- package/esm2022/proxy/lib/proxy/volo/chat/conversations/conversation.service.mjs +3 -3
- package/esm2022/proxy/lib/proxy/volo/chat/settings/settings.service.mjs +3 -3
- package/esm2022/proxy/lib/proxy/volo/chat/users/contact.service.mjs +3 -3
- package/fesm2022/volo-abp.ng.chat-config.mjs +20 -17
- package/fesm2022/volo-abp.ng.chat-config.mjs.map +1 -1
- package/fesm2022/volo-abp.ng.chat-proxy.mjs +9 -9
- package/fesm2022/volo-abp.ng.chat.mjs +29 -29
- package/package.json +1 -1
|
@@ -23,11 +23,11 @@ export class ChatConfigModule {
|
|
|
23
23
|
],
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
27
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.
|
|
28
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.
|
|
26
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
27
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type: ChatConfigModule, declarations: [ChatIconComponent], imports: [CoreModule] }); }
|
|
28
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatConfigModule, imports: [CoreModule] }); }
|
|
29
29
|
}
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatConfigModule, decorators: [{
|
|
31
31
|
type: NgModule,
|
|
32
32
|
args: [{
|
|
33
33
|
imports: [CoreModule],
|
|
@@ -6,14 +6,14 @@ export class ChatIconComponent {
|
|
|
6
6
|
constructor() {
|
|
7
7
|
this.chatConfigService = inject(ChatConfigService);
|
|
8
8
|
}
|
|
9
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
10
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.
|
|
9
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: ChatIconComponent, selector: "abp-chat-icon", ngImport: i0, template: `
|
|
11
11
|
<div class="position-relative">
|
|
12
12
|
<a>
|
|
13
13
|
<i class="fas fa-comments fa-lg"></i>
|
|
14
14
|
<span
|
|
15
15
|
*ngIf="chatConfigService.unreadMessagesCount$ | async as messageCount"
|
|
16
|
-
class="badge
|
|
16
|
+
class="badge text-dark"
|
|
17
17
|
>
|
|
18
18
|
{{ messageCount }}
|
|
19
19
|
</span>
|
|
@@ -21,7 +21,7 @@ export class ChatIconComponent {
|
|
|
21
21
|
</div>
|
|
22
22
|
`, isInline: true, styles: ["a{color:inherit}.badge{position:absolute;right:-10px;top:-8px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
|
|
23
23
|
}
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatIconComponent, decorators: [{
|
|
25
25
|
type: Component,
|
|
26
26
|
args: [{ selector: 'abp-chat-icon', template: `
|
|
27
27
|
<div class="position-relative">
|
|
@@ -29,7 +29,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
|
|
|
29
29
|
<i class="fas fa-comments fa-lg"></i>
|
|
30
30
|
<span
|
|
31
31
|
*ngIf="chatConfigService.unreadMessagesCount$ | async as messageCount"
|
|
32
|
-
class="badge
|
|
32
|
+
class="badge text-dark"
|
|
33
33
|
>
|
|
34
34
|
{{ messageCount }}
|
|
35
35
|
</span>
|
|
@@ -37,4 +37,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
|
|
|
37
37
|
</div>
|
|
38
38
|
`, styles: ["a{color:inherit}.badge{position:absolute;right:-10px;top:-8px}\n"] }]
|
|
39
39
|
}] });
|
|
40
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhdC1pY29uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NoYXQvY29uZml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YXNzPVwiYmFkZ2UgdGV4dC1kYXJrXCJcclxuICAgICAgICA+XHJcbiAgICAgICAgICB7eyBtZXNzYWdlQ291bnQgfX1cclxuICAgICAgICA8L3NwYW4+XHJcbiAgICAgIDwvYT5cclxuICAgIDwvZGl2PlxyXG4gIGAsXHJcbiAgc3R5bGVzOiBbXHJcbiAgICBgXHJcbiAgICAgIGEge1xyXG4gICAgICAgIGNvbG9yOiBpbmhlcml0O1xyXG4gICAgICB9XHJcblxyXG4gICAgICAuYmFkZ2Uge1xyXG4gICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcclxuICAgICAgICByaWdodDogLTEwcHg7XHJcbiAgICAgICAgdG9wOiAtOHB4O1xyXG4gICAgICB9XHJcbiAgICBgLFxyXG4gIF0sXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBDaGF0SWNvbkNvbXBvbmVudCB7XHJcbiAgcHJvdGVjdGVkIHJlYWRvbmx5IGNoYXRDb25maWdTZXJ2aWNlID0gaW5qZWN0KENoYXRDb25maWdTZXJ2aWNlKTtcclxufVxyXG4iXX0=
|
|
@@ -55,10 +55,10 @@ export class ChatTabComponent {
|
|
|
55
55
|
this.configStateService.refreshAppState();
|
|
56
56
|
this.toasterService.success('AbpSettingManagement::SuccessfullySaved');
|
|
57
57
|
}
|
|
58
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
59
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.
|
|
58
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
59
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: ChatTabComponent, isStandalone: true, selector: "abp-chat-tab", ngImport: i0, template: "<form [formGroup]=\"deleteMessageForm\" class=\"abp-md-form\" (ngSubmit)=\"onSubmit()\">\r\n <div class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'Chat::DisplayName:Abp.Chat.DeletingMessages' | abpLocalization }}<span class=\"ms-1\"></span></label\r\n >\r\n <select class=\"form-select form-control\" formControlName=\"deletingMessages\" >\r\n <option *ngFor=\"let option of deleteMessageOptions; trackBy: track.by('value')\" [ngValue]=\"option.value\">\r\n {{ option.name | abpLocalization}}\r\n </option>\r\n </select>\r\n </div>\r\n <div *ngIf=\"deletingMessages === 3\" class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'Chat::DisplayName:Abp.Chat.MessageDeletionPeriod' | abpLocalization }}<span class=\"ms-1\"></span></label\r\n >\r\n <input type=\"number\" class=\"form-control\" formControlName=\"messageDeletionPeriod\" />\r\n </div>\r\n <div *ngIf=\"deletingMessages === 1\" class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'Chat::DisplayName:Abp.Chat.DeletingConversations' | abpLocalization }}<span class=\"ms-1\"></span></label\r\n >\r\n <select class=\"form-select form-control\" formControlName=\"deletingConversations\" >\r\n <option *ngFor=\"let option of deleteConversationOptions; trackBy: track.by('value')\" [ngValue]=\"option.value\">\r\n {{ option.name | abpLocalization}}\r\n </option>\r\n </select>\r\n </div>\r\n <hr class=\"my-4\">\r\n <abp-button iconClass=\"fa fa-save\" buttonType=\"submit\" [loading]=\"loading\">\r\n {{ 'AbpIdentity::Save' | abpLocalization }}\r\n </abp-button>\r\n</form>", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.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: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }, { kind: "directive", type: i3.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "ngmodule", type: ThemeSharedModule }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i5.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }] }); }
|
|
60
60
|
}
|
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatTabComponent, decorators: [{
|
|
62
62
|
type: Component,
|
|
63
63
|
args: [{ selector: 'abp-chat-tab', standalone: true, imports: [CoreModule, ThemeSharedModule], template: "<form [formGroup]=\"deleteMessageForm\" class=\"abp-md-form\" (ngSubmit)=\"onSubmit()\">\r\n <div class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'Chat::DisplayName:Abp.Chat.DeletingMessages' | abpLocalization }}<span class=\"ms-1\"></span></label\r\n >\r\n <select class=\"form-select form-control\" formControlName=\"deletingMessages\" >\r\n <option *ngFor=\"let option of deleteMessageOptions; trackBy: track.by('value')\" [ngValue]=\"option.value\">\r\n {{ option.name | abpLocalization}}\r\n </option>\r\n </select>\r\n </div>\r\n <div *ngIf=\"deletingMessages === 3\" class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'Chat::DisplayName:Abp.Chat.MessageDeletionPeriod' | abpLocalization }}<span class=\"ms-1\"></span></label\r\n >\r\n <input type=\"number\" class=\"form-control\" formControlName=\"messageDeletionPeriod\" />\r\n </div>\r\n <div *ngIf=\"deletingMessages === 1\" class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'Chat::DisplayName:Abp.Chat.DeletingConversations' | abpLocalization }}<span class=\"ms-1\"></span></label\r\n >\r\n <select class=\"form-select form-control\" formControlName=\"deletingConversations\" >\r\n <option *ngFor=\"let option of deleteConversationOptions; trackBy: track.by('value')\" [ngValue]=\"option.value\">\r\n {{ option.name | abpLocalization}}\r\n </option>\r\n </select>\r\n </div>\r\n <hr class=\"my-4\">\r\n <abp-button iconClass=\"fa fa-save\" buttonType=\"submit\" [loading]=\"loading\">\r\n {{ 'AbpIdentity::Save' | abpLocalization }}\r\n </abp-button>\r\n</form>" }]
|
|
64
64
|
}], ctorParameters: () => [] });
|
|
@@ -101,22 +101,25 @@ export class ChatConfigService {
|
|
|
101
101
|
listenToMessages() {
|
|
102
102
|
return this.message$.pipe(filter(() => this.router.url !== '/chat'), tap(message => {
|
|
103
103
|
const { senderName, senderSurname, senderUsername, text } = message;
|
|
104
|
-
const sender = `${senderName ? senderName + (' ' + senderSurname
|
|
104
|
+
const sender = `${senderName ? senderName + (senderSurname ? (' ' + senderSurname) : '') : senderUsername}`;
|
|
105
105
|
const toasterMessage = `<strong>${sender}</strong>: ${text.length > 50 ? text.substring(0, 49) + '...' : text}`;
|
|
106
106
|
this.addUnreadMessageCount(1);
|
|
107
|
-
this.toaster.info(toasterMessage,
|
|
107
|
+
this.toaster.info(toasterMessage, null, {
|
|
108
|
+
tapToDismiss: true,
|
|
109
|
+
iconClass: 'fa-comment-dots',
|
|
110
|
+
});
|
|
108
111
|
}));
|
|
109
112
|
}
|
|
110
113
|
listenToRouterEvents() {
|
|
111
114
|
return this.router.events.pipe(filter(event => event instanceof NavigationEnd && event.url === '/chat'), tap(() => this.resetUnreadMessageCount()));
|
|
112
115
|
}
|
|
113
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
114
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.
|
|
116
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", 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 }); }
|
|
117
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatConfigService, providedIn: 'root' }); }
|
|
115
118
|
}
|
|
116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatConfigService, decorators: [{
|
|
117
120
|
type: Injectable,
|
|
118
121
|
args: [{
|
|
119
122
|
providedIn: 'root',
|
|
120
123
|
}]
|
|
121
124
|
}], ctorParameters: () => [{ type: i1.RestService }, { type: i2.Router }, { type: i3.OAuthService }, { type: i4.NavItemsService }, { type: i1.PermissionService }, { type: i1.ConfigStateService }, { type: i1.EnvironmentService }] });
|
|
122
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhdC1jb25maWcuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NoYXQvY29uZmlnL3NyYy9zZXJ2aWNlcy9jaGF0LWNvbmZpZy5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ25ELE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBQ2hFLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDeEQsT0FBTyxFQUFFLGVBQWUsRUFBYyxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sRUFBRSxTQUFTLEVBQUUsR0FBRyxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQ25HLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUNuRCxPQUFPLEtBQUssT0FBTyxNQUFNLG9CQUFvQixDQUFDO0FBQzlDLE9BQU8sRUFDTCxrQkFBa0IsRUFFbEIsa0JBQWtCLEVBQ2xCLGlCQUFpQixFQUNqQixXQUFXLEdBQ1osTUFBTS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JOYW1lICsgKHNlbmRlclN1cm5hbWUgPyAoJyAnICsgc2VuZGVyU3VybmFtZSkgOiAnJykgOiBzZW5kZXJVc2VybmFtZX1gO1xyXG4gICAgICAgIGNvbnN0IHRvYXN0ZXJNZXNzYWdlID0gYDxzdHJvbmc+JHtzZW5kZXJ9PC9zdHJvbmc+OiAke1xyXG4gICAgICAgICAgdGV4dC5sZW5ndGggPiA1MCA/IHRleHQuc3Vic3RyaW5nKDAsIDQ5KSArICcuLi4nIDogdGV4dFxyXG4gICAgICAgIH1gO1xyXG5cclxuICAgICAgICB0aGlzLmFkZFVucmVhZE1lc3NhZ2VDb3VudCgxKTtcclxuICAgICAgICB0aGlzLnRvYXN0ZXIuaW5mbyh0b2FzdGVyTWVzc2FnZSwgbnVsbCwge1xyXG4gICAgICAgICAgdGFwVG9EaXNtaXNzOiB0cnVlLFxyXG4gICAgICAgICAgaWNvbkNsYXNzOiAnZmEtY29tbWVudC1kb3RzJyxcclxuICAgICAgICB9KTtcclxuICAgICAgfSksXHJcbiAgICApO1xyXG4gIH1cclxuXHJcbiAgbGlzdGVuVG9Sb3V0ZXJFdmVudHMoKSB7XHJcbiAgICByZXR1cm4gdGhpcy5yb3V0ZXIuZXZlbnRzLnBpcGUoXHJcbiAgICAgIGZpbHRlcihldmVudCA9PiBldmVudCBpbnN0YW5jZW9mIE5hdmlnYXRpb25FbmQgJiYgZXZlbnQudXJsID09PSAnL2NoYXQnKSxcclxuICAgICAgdGFwKCgpID0+IHRoaXMucmVzZXRVbnJlYWRNZXNzYWdlQ291bnQoKSksXHJcbiAgICApO1xyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -25,11 +25,11 @@ const routes = [
|
|
|
25
25
|
},
|
|
26
26
|
];
|
|
27
27
|
export class ChatRoutingModule {
|
|
28
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
29
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.
|
|
30
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.
|
|
28
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
29
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type: ChatRoutingModule, imports: [i1.RouterModule], exports: [RouterModule] }); }
|
|
30
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
|
|
31
31
|
}
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatRoutingModule, decorators: [{
|
|
33
33
|
type: NgModule,
|
|
34
34
|
args: [{
|
|
35
35
|
imports: [RouterModule.forChild(routes)],
|
|
@@ -24,17 +24,17 @@ export class ChatModule {
|
|
|
24
24
|
static forLazy() {
|
|
25
25
|
return new LazyModuleFactory(ChatModule.forChild());
|
|
26
26
|
}
|
|
27
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
28
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.
|
|
27
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
28
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type: ChatModule, declarations: [ChatComponent,
|
|
29
29
|
ChatContactsComponent,
|
|
30
30
|
ConversationAvatarComponent,
|
|
31
31
|
ChatMessageTitleComponent], imports: [CoreModule, ThemeSharedModule, ChatRoutingModule, NgbDropdownModule], exports: [ChatComponent,
|
|
32
32
|
ChatContactsComponent,
|
|
33
33
|
ConversationAvatarComponent,
|
|
34
34
|
ChatMessageTitleComponent] }); }
|
|
35
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.
|
|
35
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatModule, imports: [CoreModule, ThemeSharedModule, ChatRoutingModule, NgbDropdownModule] }); }
|
|
36
36
|
}
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatModule, decorators: [{
|
|
38
38
|
type: NgModule,
|
|
39
39
|
args: [{
|
|
40
40
|
declarations,
|
|
@@ -98,10 +98,10 @@ export class ChatContactsComponent {
|
|
|
98
98
|
this.get();
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
102
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.
|
|
101
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatContactsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
102
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: ChatContactsComponent, selector: "abp-chat-contacts", inputs: { startConversation: "startConversation", conversationDeletable: "conversationDeletable" }, outputs: { selected: "selected" }, providers: [SubscriptionService], usesOnChanges: true, ngImport: i0, template: "<div class=\"card w-100 mb-3 mb-md-0\">\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 <div class=\"messages-box m-0 p-0\">\r\n <div class=\"list-group rounded-3\" [ngStyle]=\"{'min-height': allContacts.length && 'calc(100vh - 254.34px)'}\" 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 position-relative px-2 border-2 rounded-2 mb-1 mt-0 {{\r\n selectedContact.userId === contact.userId ? 'active' : ''\r\n }}\"\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\">{{ contact.lastMessageDate | date:'HH:mm' }}</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 *ngIf=\"conversationDeletable\" ngbDropdown class=\"dropdown position-absolute bottom-0 end-0\">\r\n <button class=\"btn p-1 down-arrow\" \r\n id=\"dropdownBasic1\" ngbDropdownToggle><i class=\"bi bi-chevron-down\"></i></button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem (click)=\"deleteConversation(contact)\">Delete</button>\r\n </div>\r\n </div>\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)}.dropdown-toggle:after{display:none}.dropdown{border-color:transparent}.down-arrow{border:none;opacity:0}.media:hover .down-arrow{opacity:100%}.list-group{padding-right:7px}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:var(--lpx-border-color)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.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: "directive", type: i4.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i4.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i4.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i4.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i4.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i5.ConversationAvatarComponent, selector: "abp-conversation-avatar", inputs: ["contact", "small"] }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
103
103
|
}
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatContactsComponent, decorators: [{
|
|
105
105
|
type: Component,
|
|
106
106
|
args: [{ selector: 'abp-chat-contacts', providers: [SubscriptionService], template: "<div class=\"card w-100 mb-3 mb-md-0\">\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 <div class=\"messages-box m-0 p-0\">\r\n <div class=\"list-group rounded-3\" [ngStyle]=\"{'min-height': allContacts.length && 'calc(100vh - 254.34px)'}\" 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 position-relative px-2 border-2 rounded-2 mb-1 mt-0 {{\r\n selectedContact.userId === contact.userId ? 'active' : ''\r\n }}\"\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\">{{ contact.lastMessageDate | date:'HH:mm' }}</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 *ngIf=\"conversationDeletable\" ngbDropdown class=\"dropdown position-absolute bottom-0 end-0\">\r\n <button class=\"btn p-1 down-arrow\" \r\n id=\"dropdownBasic1\" ngbDropdownToggle><i class=\"bi bi-chevron-down\"></i></button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem (click)=\"deleteConversation(contact)\">Delete</button>\r\n </div>\r\n </div>\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)}.dropdown-toggle:after{display:none}.dropdown{border-color:transparent}.down-arrow{border:none;opacity:0}.media:hover .down-arrow{opacity:100%}.list-group{padding-right:7px}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:var(--lpx-border-color)}\n"] }]
|
|
107
107
|
}], propDecorators: { startConversation: [{
|
|
@@ -7,8 +7,8 @@ export class ChatMessageTitleComponent {
|
|
|
7
7
|
get contactName() {
|
|
8
8
|
return getContactName(this.selectedContact || {});
|
|
9
9
|
}
|
|
10
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
11
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.
|
|
10
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatMessageTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: ChatMessageTitleComponent, selector: "abp-chat-message-title", inputs: { selectedContact: "selectedContact" }, ngImport: i0, template: `
|
|
12
12
|
<div class="px-2 py-1 border mb-2 rounded-2">
|
|
13
13
|
<div class="row">
|
|
14
14
|
<div class="col-auto py-1 pe-0">
|
|
@@ -22,7 +22,7 @@ export class ChatMessageTitleComponent {
|
|
|
22
22
|
</div>
|
|
23
23
|
`, isInline: true, dependencies: [{ kind: "component", type: i1.ConversationAvatarComponent, selector: "abp-conversation-avatar", inputs: ["contact", "small"] }] }); }
|
|
24
24
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", 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">
|
|
@@ -227,10 +227,10 @@ export class ChatComponent {
|
|
|
227
227
|
const now = new Date().getTime();
|
|
228
228
|
return now - readDate > this.messageDeletePeriod ? false : true;
|
|
229
229
|
}
|
|
230
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
231
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", 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\r\n class=\"d-flex w-100\"\r\n (selected)=\"onSelectContact($event)\"\r\n [startConversation]=\"clickedStartMessage\"\r\n [conversationDeletable]=\"conversationDeletable\"\r\n ></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 *ngIf=\"selectedContact.userId\" 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 <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=\"message-text 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\r\n <div *ngIf=\"messageDeletable\" ngbDropdown class=\"dropdown position-absolute top-0 end-0\">\r\n <button class=\"btn p-1 text-light down-arrow\" \r\n ngbDropdownToggle><i class=\"bi bi-chevron-down\"></i></button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem (click)=\"deleteMessage(message)\">Delete</button>\r\n </div>\r\n </div>\r\n <div *ngIf=\"messageDeletableWithPeriod && showDeleteDropdown(message)\" ngbDropdown class=\"dropdown position-absolute top-0 end-0\">\r\n <button class=\"btn p-1 text-light down-arrow\" \r\n ngbDropdownToggle><i class=\"bi bi-chevron-down\"></i></button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem (click)=\"deleteMessage(message)\">Delete</button>\r\n </div>\r\n </div>\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\"\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\" aria-hidden=\"true\"></i>\r\n\r\n <ng-template #loadingIcon>\r\n <i class=\"fas fa-spinner fa-spin ms-2\" aria-hidden=\"true\"></i>\r\n </ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!selectedContact.userId\" class=\"card-body pt-5 pb-5 text-center\">\r\n <i class=\"fa fa-commenting-o fs-2\" aria-hidden=\"true\"></i>\r\n <p>{{ 'Chat::NoMessageYetMessage' | abpLocalization }}</p>\r\n <button (click)=\"startConversation()\" type=\"button\" class=\"btn btn-primary\">\r\n {{ 'Chat::StartConversation' | abpLocalization }}\r\n </button>\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-text{white-space:pre-line}.message-date{position:absolute;opacity:.35;width:100px;top:1px}.message-date.left{left:-110px;text-align:right}.message-date.right{right:-110px}.dropdown-toggle:after{display:none}.dropdown{border-color:transparent}.down-arrow{border:none;opacity:0}.media-body:hover .down-arrow{opacity:100%}.chat-box-container{padding-right:7px}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:var(--lpx-border-color)}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.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: i6.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i7.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i7.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i7.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i7.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i7.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i8.ChatContactsComponent, selector: "abp-chat-contacts", inputs: ["startConversation", "conversationDeletable"], outputs: ["selected"] }, { kind: "component", type: i9.ChatMessageTitleComponent, selector: "abp-chat-message-title", inputs: ["selectedContact"] }, { kind: "pipe", type: i5.DatePipe, name: "date" }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
230
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatComponent, deps: [{ token: i1.ConversationService }, { token: i2.ChatConfigService }, { token: i3.ConfigStateService }, { token: i3.HttpWaitService }, { token: i4.ConfirmationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
231
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", 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\r\n class=\"d-flex w-100\"\r\n (selected)=\"onSelectContact($event)\"\r\n [startConversation]=\"clickedStartMessage\"\r\n [conversationDeletable]=\"conversationDeletable\"\r\n ></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 *ngIf=\"selectedContact.userId\" 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 <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=\"message-text 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\r\n <div *ngIf=\"messageDeletable\" ngbDropdown class=\"dropdown position-absolute top-0 end-0\">\r\n <button class=\"btn p-1 text-light down-arrow\" \r\n ngbDropdownToggle><i class=\"bi bi-chevron-down\"></i></button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem (click)=\"deleteMessage(message)\">Delete</button>\r\n </div>\r\n </div>\r\n <div *ngIf=\"messageDeletableWithPeriod && showDeleteDropdown(message)\" ngbDropdown class=\"dropdown position-absolute top-0 end-0\">\r\n <button class=\"btn p-1 text-light down-arrow\" \r\n ngbDropdownToggle><i class=\"bi bi-chevron-down\"></i></button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem (click)=\"deleteMessage(message)\">Delete</button>\r\n </div>\r\n </div>\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\"\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\" aria-hidden=\"true\"></i>\r\n\r\n <ng-template #loadingIcon>\r\n <i class=\"fas fa-spinner fa-spin ms-2\" aria-hidden=\"true\"></i>\r\n </ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!selectedContact.userId\" class=\"card-body pt-5 pb-5 text-center\">\r\n <i class=\"fa fa-commenting-o fs-2\" aria-hidden=\"true\"></i>\r\n <p>{{ 'Chat::NoMessageYetMessage' | abpLocalization }}</p>\r\n <button (click)=\"startConversation()\" type=\"button\" class=\"btn btn-primary\">\r\n {{ 'Chat::StartConversation' | abpLocalization }}\r\n </button>\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-text{white-space:pre-line}.message-date{position:absolute;opacity:.35;width:100px;top:1px}.message-date.left{left:-110px;text-align:right}.message-date.right{right:-110px}.dropdown-toggle:after{display:none}.dropdown{border-color:transparent}.down-arrow{border:none;opacity:0}.media-body:hover .down-arrow{opacity:100%}.chat-box-container{padding-right:7px}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:var(--lpx-border-color)}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.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: i6.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i7.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i7.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i7.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i7.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i7.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i8.ChatContactsComponent, selector: "abp-chat-contacts", inputs: ["startConversation", "conversationDeletable"], outputs: ["selected"] }, { kind: "component", type: i9.ChatMessageTitleComponent, selector: "abp-chat-message-title", inputs: ["selectedContact"] }, { kind: "pipe", type: i5.DatePipe, name: "date" }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
232
232
|
}
|
|
233
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatComponent, decorators: [{
|
|
234
234
|
type: Component,
|
|
235
235
|
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\r\n class=\"d-flex w-100\"\r\n (selected)=\"onSelectContact($event)\"\r\n [startConversation]=\"clickedStartMessage\"\r\n [conversationDeletable]=\"conversationDeletable\"\r\n ></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 *ngIf=\"selectedContact.userId\" 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 <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=\"message-text 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\r\n <div *ngIf=\"messageDeletable\" ngbDropdown class=\"dropdown position-absolute top-0 end-0\">\r\n <button class=\"btn p-1 text-light down-arrow\" \r\n ngbDropdownToggle><i class=\"bi bi-chevron-down\"></i></button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem (click)=\"deleteMessage(message)\">Delete</button>\r\n </div>\r\n </div>\r\n <div *ngIf=\"messageDeletableWithPeriod && showDeleteDropdown(message)\" ngbDropdown class=\"dropdown position-absolute top-0 end-0\">\r\n <button class=\"btn p-1 text-light down-arrow\" \r\n ngbDropdownToggle><i class=\"bi bi-chevron-down\"></i></button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem (click)=\"deleteMessage(message)\">Delete</button>\r\n </div>\r\n </div>\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\"\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\" aria-hidden=\"true\"></i>\r\n\r\n <ng-template #loadingIcon>\r\n <i class=\"fas fa-spinner fa-spin ms-2\" aria-hidden=\"true\"></i>\r\n </ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!selectedContact.userId\" class=\"card-body pt-5 pb-5 text-center\">\r\n <i class=\"fa fa-commenting-o fs-2\" aria-hidden=\"true\"></i>\r\n <p>{{ 'Chat::NoMessageYetMessage' | abpLocalization }}</p>\r\n <button (click)=\"startConversation()\" type=\"button\" class=\"btn btn-primary\">\r\n {{ 'Chat::StartConversation' | abpLocalization }}\r\n </button>\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-text{white-space:pre-line}.message-date{position:absolute;opacity:.35;width:100px;top:1px}.message-date.left{left:-110px;text-align:right}.message-date.right{right:-110px}.dropdown-toggle:after{display:none}.dropdown{border-color:transparent}.down-arrow{border:none;opacity:0}.media-body:hover .down-arrow{opacity:100%}.chat-box-container{padding-right:7px}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:var(--lpx-border-color)}\n"] }]
|
|
236
236
|
}], ctorParameters: () => [{ type: i1.ConversationService }, { type: i2.ChatConfigService }, { type: i3.ConfigStateService }, { type: i3.HttpWaitService }, { type: i4.ConfirmationService }], propDecorators: { chatBoxRef: [{
|
|
@@ -36,8 +36,8 @@ export class ConversationAvatarComponent {
|
|
|
36
36
|
get isSmall() {
|
|
37
37
|
return typeof this.small === 'string' || this.small;
|
|
38
38
|
}
|
|
39
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
40
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.
|
|
39
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ConversationAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
40
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: ConversationAvatarComponent, selector: "abp-conversation-avatar", inputs: { contact: "contact", small: "small" }, ngImport: i0, template: `<div
|
|
41
41
|
class="avatar me-2 float-start rounded-circle"
|
|
42
42
|
[class.small]="isSmall"
|
|
43
43
|
[ngStyle]="avatarBgStyle"
|
|
@@ -45,7 +45,7 @@ export class ConversationAvatarComponent {
|
|
|
45
45
|
{{ avatarText }}
|
|
46
46
|
</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"] }] }); }
|
|
47
47
|
}
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", 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"
|
|
@@ -10,10 +10,10 @@ export class ContactService {
|
|
|
10
10
|
getContactsByInput(params = {}) {
|
|
11
11
|
return this.restService.request({ url: '/api/chat/contact/contacts', method: 'GET', params }, { apiName: this.apiName });
|
|
12
12
|
}
|
|
13
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
14
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.
|
|
13
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ContactService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
14
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ContactService, providedIn: 'root' }); }
|
|
15
15
|
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ContactService, decorators: [{
|
|
17
17
|
type: Injectable,
|
|
18
18
|
args: [{ providedIn: 'root' }]
|
|
19
19
|
}], ctorParameters: () => [{ type: i1.RestService }] });
|
|
@@ -16,10 +16,10 @@ export class ConversationService {
|
|
|
16
16
|
markConversationAsReadByInput(body) {
|
|
17
17
|
return this.restService.request({ url: '/api/chat/conversation/mark-conversation-as-read', method: 'POST', body }, { apiName: this.apiName });
|
|
18
18
|
}
|
|
19
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
20
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.
|
|
19
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ConversationService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
20
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ConversationService, providedIn: 'root' }); }
|
|
21
21
|
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ConversationService, decorators: [{
|
|
23
23
|
type: Injectable,
|
|
24
24
|
args: [{ providedIn: 'root' }]
|
|
25
25
|
}], ctorParameters: () => [{ type: i1.RestService }] });
|
|
@@ -10,10 +10,10 @@ export class SettingsService {
|
|
|
10
10
|
setSendOnEnterSettingByInput(body) {
|
|
11
11
|
return this.restService.request({ url: '/api/chat/settings/send-on-enter', method: 'POST', body }, { apiName: this.apiName });
|
|
12
12
|
}
|
|
13
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
14
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.
|
|
13
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SettingsService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
14
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SettingsService, providedIn: 'root' }); }
|
|
15
15
|
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SettingsService, decorators: [{
|
|
17
17
|
type: Injectable,
|
|
18
18
|
args: [{ providedIn: 'root' }]
|
|
19
19
|
}], ctorParameters: () => [{ type: i1.RestService }] });
|
|
@@ -32,10 +32,10 @@ export class ConversationService {
|
|
|
32
32
|
body: input,
|
|
33
33
|
}, { apiName: this.apiName, ...config });
|
|
34
34
|
}
|
|
35
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
36
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.
|
|
35
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ConversationService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
36
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ConversationService, providedIn: 'root' }); }
|
|
37
37
|
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ConversationService, decorators: [{
|
|
39
39
|
type: Injectable,
|
|
40
40
|
args: [{
|
|
41
41
|
providedIn: 'root',
|
|
@@ -21,10 +21,10 @@ export class SettingsService {
|
|
|
21
21
|
body: input,
|
|
22
22
|
}, { apiName: this.apiName, ...config });
|
|
23
23
|
}
|
|
24
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
25
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.
|
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SettingsService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
25
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SettingsService, providedIn: 'root' }); }
|
|
26
26
|
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SettingsService, decorators: [{
|
|
28
28
|
type: Injectable,
|
|
29
29
|
args: [{
|
|
30
30
|
providedIn: 'root',
|
|
@@ -16,10 +16,10 @@ export class ContactService {
|
|
|
16
16
|
url: '/api/chat/contact/total-unread-message-count',
|
|
17
17
|
}, { apiName: this.apiName, ...config });
|
|
18
18
|
}
|
|
19
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
20
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.
|
|
19
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ContactService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
20
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ContactService, providedIn: 'root' }); }
|
|
21
21
|
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ContactService, decorators: [{
|
|
23
23
|
type: Injectable,
|
|
24
24
|
args: [{
|
|
25
25
|
providedIn: 'root',
|
|
@@ -107,19 +107,22 @@ class ChatConfigService {
|
|
|
107
107
|
listenToMessages() {
|
|
108
108
|
return this.message$.pipe(filter(() => this.router.url !== '/chat'), tap(message => {
|
|
109
109
|
const { senderName, senderSurname, senderUsername, text } = message;
|
|
110
|
-
const sender = `${senderName ? senderName + (' ' + senderSurname
|
|
110
|
+
const sender = `${senderName ? senderName + (senderSurname ? (' ' + senderSurname) : '') : senderUsername}`;
|
|
111
111
|
const toasterMessage = `<strong>${sender}</strong>: ${text.length > 50 ? text.substring(0, 49) + '...' : text}`;
|
|
112
112
|
this.addUnreadMessageCount(1);
|
|
113
|
-
this.toaster.info(toasterMessage,
|
|
113
|
+
this.toaster.info(toasterMessage, null, {
|
|
114
|
+
tapToDismiss: true,
|
|
115
|
+
iconClass: 'fa-comment-dots',
|
|
116
|
+
});
|
|
114
117
|
}));
|
|
115
118
|
}
|
|
116
119
|
listenToRouterEvents() {
|
|
117
120
|
return this.router.events.pipe(filter(event => event instanceof NavigationEnd && event.url === '/chat'), tap(() => this.resetUnreadMessageCount()));
|
|
118
121
|
}
|
|
119
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
120
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.
|
|
122
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", 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 }); }
|
|
123
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatConfigService, providedIn: 'root' }); }
|
|
121
124
|
}
|
|
122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatConfigService, decorators: [{
|
|
123
126
|
type: Injectable,
|
|
124
127
|
args: [{
|
|
125
128
|
providedIn: 'root',
|
|
@@ -130,14 +133,14 @@ class ChatIconComponent {
|
|
|
130
133
|
constructor() {
|
|
131
134
|
this.chatConfigService = inject(ChatConfigService);
|
|
132
135
|
}
|
|
133
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
134
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.
|
|
136
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
137
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: ChatIconComponent, selector: "abp-chat-icon", ngImport: i0, template: `
|
|
135
138
|
<div class="position-relative">
|
|
136
139
|
<a>
|
|
137
140
|
<i class="fas fa-comments fa-lg"></i>
|
|
138
141
|
<span
|
|
139
142
|
*ngIf="chatConfigService.unreadMessagesCount$ | async as messageCount"
|
|
140
|
-
class="badge
|
|
143
|
+
class="badge text-dark"
|
|
141
144
|
>
|
|
142
145
|
{{ messageCount }}
|
|
143
146
|
</span>
|
|
@@ -145,7 +148,7 @@ class ChatIconComponent {
|
|
|
145
148
|
</div>
|
|
146
149
|
`, isInline: true, styles: ["a{color:inherit}.badge{position:absolute;right:-10px;top:-8px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] }); }
|
|
147
150
|
}
|
|
148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatIconComponent, decorators: [{
|
|
149
152
|
type: Component,
|
|
150
153
|
args: [{ selector: 'abp-chat-icon', template: `
|
|
151
154
|
<div class="position-relative">
|
|
@@ -153,7 +156,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
|
|
|
153
156
|
<i class="fas fa-comments fa-lg"></i>
|
|
154
157
|
<span
|
|
155
158
|
*ngIf="chatConfigService.unreadMessagesCount$ | async as messageCount"
|
|
156
|
-
class="badge
|
|
159
|
+
class="badge text-dark"
|
|
157
160
|
>
|
|
158
161
|
{{ messageCount }}
|
|
159
162
|
</span>
|
|
@@ -255,10 +258,10 @@ class ChatTabComponent {
|
|
|
255
258
|
this.configStateService.refreshAppState();
|
|
256
259
|
this.toasterService.success('AbpSettingManagement::SuccessfullySaved');
|
|
257
260
|
}
|
|
258
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
259
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.
|
|
261
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
262
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: ChatTabComponent, isStandalone: true, selector: "abp-chat-tab", ngImport: i0, template: "<form [formGroup]=\"deleteMessageForm\" class=\"abp-md-form\" (ngSubmit)=\"onSubmit()\">\r\n <div class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'Chat::DisplayName:Abp.Chat.DeletingMessages' | abpLocalization }}<span class=\"ms-1\"></span></label\r\n >\r\n <select class=\"form-select form-control\" formControlName=\"deletingMessages\" >\r\n <option *ngFor=\"let option of deleteMessageOptions; trackBy: track.by('value')\" [ngValue]=\"option.value\">\r\n {{ option.name | abpLocalization}}\r\n </option>\r\n </select>\r\n </div>\r\n <div *ngIf=\"deletingMessages === 3\" class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'Chat::DisplayName:Abp.Chat.MessageDeletionPeriod' | abpLocalization }}<span class=\"ms-1\"></span></label\r\n >\r\n <input type=\"number\" class=\"form-control\" formControlName=\"messageDeletionPeriod\" />\r\n </div>\r\n <div *ngIf=\"deletingMessages === 1\" class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'Chat::DisplayName:Abp.Chat.DeletingConversations' | abpLocalization }}<span class=\"ms-1\"></span></label\r\n >\r\n <select class=\"form-select form-control\" formControlName=\"deletingConversations\" >\r\n <option *ngFor=\"let option of deleteConversationOptions; trackBy: track.by('value')\" [ngValue]=\"option.value\">\r\n {{ option.name | abpLocalization}}\r\n </option>\r\n </select>\r\n </div>\r\n <hr class=\"my-4\">\r\n <abp-button iconClass=\"fa fa-save\" buttonType=\"submit\" [loading]=\"loading\">\r\n {{ 'AbpIdentity::Save' | abpLocalization }}\r\n </abp-button>\r\n</form>", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$1.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: i2$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }, { kind: "directive", type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "ngmodule", type: ThemeSharedModule }, { kind: "directive", type: i4$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i4.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }] }); }
|
|
260
263
|
}
|
|
261
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
264
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatTabComponent, decorators: [{
|
|
262
265
|
type: Component,
|
|
263
266
|
args: [{ selector: 'abp-chat-tab', standalone: true, imports: [CoreModule, ThemeSharedModule], template: "<form [formGroup]=\"deleteMessageForm\" class=\"abp-md-form\" (ngSubmit)=\"onSubmit()\">\r\n <div class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'Chat::DisplayName:Abp.Chat.DeletingMessages' | abpLocalization }}<span class=\"ms-1\"></span></label\r\n >\r\n <select class=\"form-select form-control\" formControlName=\"deletingMessages\" >\r\n <option *ngFor=\"let option of deleteMessageOptions; trackBy: track.by('value')\" [ngValue]=\"option.value\">\r\n {{ option.name | abpLocalization}}\r\n </option>\r\n </select>\r\n </div>\r\n <div *ngIf=\"deletingMessages === 3\" class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'Chat::DisplayName:Abp.Chat.MessageDeletionPeriod' | abpLocalization }}<span class=\"ms-1\"></span></label\r\n >\r\n <input type=\"number\" class=\"form-control\" formControlName=\"messageDeletionPeriod\" />\r\n </div>\r\n <div *ngIf=\"deletingMessages === 1\" class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'Chat::DisplayName:Abp.Chat.DeletingConversations' | abpLocalization }}<span class=\"ms-1\"></span></label\r\n >\r\n <select class=\"form-select form-control\" formControlName=\"deletingConversations\" >\r\n <option *ngFor=\"let option of deleteConversationOptions; trackBy: track.by('value')\" [ngValue]=\"option.value\">\r\n {{ option.name | abpLocalization}}\r\n </option>\r\n </select>\r\n </div>\r\n <hr class=\"my-4\">\r\n <abp-button iconClass=\"fa fa-save\" buttonType=\"submit\" [loading]=\"loading\">\r\n {{ 'AbpIdentity::Save' | abpLocalization }}\r\n </abp-button>\r\n</form>" }]
|
|
264
267
|
}], ctorParameters: () => [] });
|
|
@@ -301,11 +304,11 @@ class ChatConfigModule {
|
|
|
301
304
|
],
|
|
302
305
|
};
|
|
303
306
|
}
|
|
304
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
305
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.
|
|
306
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.
|
|
307
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
308
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type: ChatConfigModule, declarations: [ChatIconComponent], imports: [CoreModule] }); }
|
|
309
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatConfigModule, imports: [CoreModule] }); }
|
|
307
310
|
}
|
|
308
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatConfigModule, decorators: [{
|
|
309
312
|
type: NgModule,
|
|
310
313
|
args: [{
|
|
311
314
|
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/components/chat-tab.component.ts","../../../../packages/chat/config/src/components/chat-tab.component.html","../../../../packages/chat/config/src/providers/chat-module-settings.provider.ts","../../../../packages/chat/config/src/chat-config.module.ts","../../../../packages/chat/config/src/volo-abp.ng.chat-config.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { NavigationEnd, Router } from '@angular/router';\r\nimport { BehaviorSubject, Observable, Subject, combineLatest, filter, switchMap, tap } from 'rxjs';\r\nimport { OAuthService } from 'angular-oauth2-oidc';\r\nimport * as signalR from '@microsoft/signalr';\r\nimport {\r\n ConfigStateService,\r\n CurrentUserDto,\r\n EnvironmentService,\r\n PermissionService,\r\n RestService,\r\n} from '@abp/ng.core';\r\nimport { NavItemsService, ToasterService } from '@abp/ng.theme.shared';\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 protected readonly toaster = inject(ToasterService);\r\n\r\n protected readonly unreadMessagesCount = new BehaviorSubject<number>(0);\r\n\r\n apiName = 'Chat';\r\n conectedUserId: string;\r\n connection: signalR.HubConnection;\r\n message$ = new Subject<ChatMessage>();\r\n\r\n get unreadMessagesCount$(): Observable<number> {\r\n return this.unreadMessagesCount.asObservable();\r\n }\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 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 protected listenToAppConfig(): void {\r\n this.configState\r\n .createOnUpdateStream(state => state)\r\n .pipe(\r\n filter(({ currentUser }) => {\r\n const { isAuthenticated } = currentUser;\r\n const isGranted = this.permissionService.getGrantedPolicy(permission);\r\n\r\n if ((!isAuthenticated || !isGranted) && this.connection) {\r\n this.connection.stop();\r\n }\r\n if (!this.isChatEnabled) {\r\n this.toggleChat();\r\n }\r\n if (isGranted) {\r\n this.initSignalR(currentUser as CurrentUserDto);\r\n }\r\n\r\n return isGranted;\r\n }),\r\n switchMap(() => this.setTotalUnreadMessageCount()),\r\n switchMap(() => combineLatest([this.listenToMessages(), this.listenToRouterEvents()])),\r\n takeUntilDestroyed(),\r\n )\r\n .subscribe();\r\n }\r\n\r\n protected toggleChat(): void {\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 protected initSignalR(currentUser: CurrentUserDto): void {\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(() => (this.conectedUserId = currentUser.id))\r\n .catch(err => console.error(err.toString()));\r\n }\r\n\r\n protected handleMessage = (message: ChatMessage): void => {\r\n this.message$.next(message);\r\n };\r\n\r\n setTotalUnreadMessageCount() {\r\n if (this.router.url === '/chat') return;\r\n return 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 .pipe(tap(count => this.unreadMessagesCount.next(count)));\r\n }\r\n\r\n addUnreadMessageCount(count: number): void {\r\n if (!count || count < 1) {\r\n this.resetUnreadMessageCount();\r\n return;\r\n }\r\n\r\n const currentCount = this.unreadMessagesCount.getValue();\r\n this.unreadMessagesCount.next(currentCount + count);\r\n }\r\n\r\n resetUnreadMessageCount(): void {\r\n this.unreadMessagesCount.next(0);\r\n }\r\n\r\n listenToMessages(): Observable<ChatMessage> {\r\n return this.message$.pipe(\r\n filter(() => this.router.url !== '/chat'),\r\n tap(message => {\r\n const { senderName, senderSurname, senderUsername, text } = message;\r\n const sender = `${senderName ? senderName + (' ' + senderSurname || '') : senderUsername}`;\r\n const toasterMessage = `<strong>${sender}</strong>: ${text.length > 50 ? text.substring(0, 49) + '...' : text\r\n }`;\r\n\r\n this.addUnreadMessageCount(1);\r\n this.toaster.info(toasterMessage, 'Chat::NewChatMessage', { tapToDismiss: true });\r\n }),\r\n );\r\n }\r\n\r\n listenToRouterEvents() {\r\n return this.router.events.pipe(\r\n filter(event => event instanceof NavigationEnd && event.url === '/chat'),\r\n tap(() => this.resetUnreadMessageCount()),\r\n );\r\n }\r\n}\r\n","import { Component, inject } from '@angular/core';\r\nimport { ChatConfigService } from '../services/chat-config.service';\r\n\r\n@Component({\r\n selector: 'abp-chat-icon',\r\n template: `\r\n <div class=\"position-relative\">\r\n <a>\r\n <i class=\"fas fa-comments fa-lg\"></i>\r\n <span\r\n *ngIf=\"chatConfigService.unreadMessagesCount$ | async as messageCount\"\r\n class=\"badge badge-primary\"\r\n >\r\n {{ messageCount }}\r\n </span>\r\n </a>\r\n </div>\r\n `,\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 {\r\n protected readonly chatConfigService = inject(ChatConfigService);\r\n}\r\n","import { APP_INITIALIZER, inject } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { NavItemsService } from '@abp/ng.theme.shared';\r\nimport { ChatIconComponent } from '../components/chat-icon.component';\r\nimport { eChatPolicyNames } from '../enums/policy-names';\r\nimport { ChatConfigService } from '../services/chat-config.service';\r\n\r\nexport const CHAT_NAV_ITEM_PROVIDERS = [\r\n {\r\n provide: APP_INITIALIZER,\r\n useFactory: configureNavItems,\r\n deps: [NavItemsService, Router],\r\n multi: true,\r\n },\r\n];\r\n\r\nexport function configureNavItems(navItems: NavItemsService, router: Router) {\r\n const chatConfigService = inject(ChatConfigService);\r\n\r\n return () => {\r\n navItems.addItems([\r\n {\r\n id: 'Chat.ChatIconComponent',\r\n name: 'Chat::Feature:ChatGroup',\r\n requiredPolicy: eChatPolicyNames.Messaging,\r\n component: ChatIconComponent,\r\n badge: {\r\n count: chatConfigService.unreadMessagesCount$,\r\n },\r\n order: 99.99,\r\n icon: 'fas fa-comments fa-lg',\r\n action: () => {\r\n router.navigate(['/chat']);\r\n },\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 { ConfigStateService, CoreModule, TrackByService } from \"@abp/ng.core\";\r\nimport { ThemeSharedModule, ToasterService } from \"@abp/ng.theme.shared\";\r\nimport { Component, inject } from \"@angular/core\";\r\nimport { FormBuilder } from \"@angular/forms\";\r\nimport { ChatDeletingConversationsNames, ChatDeletingMessagesNames } from \"../enums/delete-message.enums\";\r\nimport { DeleteConversationModel, DeleteMessageModel } from \"../models/deleteMessage.model\";\r\nimport { ChatDeletingMessages, ChatDeletingConversations, ChatSettingsDto, SettingsService } from \"@volo/abp.ng.chat/proxy\";\r\nimport { firstValueFrom } from \"rxjs\";\r\n\r\n@Component({\r\n selector: 'abp-chat-tab',\r\n templateUrl: './chat-tab.component.html',\r\n standalone: true,\r\n imports: [CoreModule,ThemeSharedModule]\r\n})\r\nexport class ChatTabComponent{\r\n protected readonly toasterService = inject(ToasterService);\r\n protected readonly chatSettingsService = inject(SettingsService);\r\n protected readonly configStateService = inject(ConfigStateService);\r\n protected readonly fb = inject(FormBuilder);\r\n public readonly track = inject(TrackByService);\r\n loading = false;\r\n deleteMessageForm = this.fb.group({\r\n deletingMessages: [1],\r\n deletingConversations: [1],\r\n messageDeletionPeriod: [0]\r\n });\r\n constructor(){\r\n this.init();\r\n }\r\n\r\n deleteMessageOptions : DeleteMessageModel[] = [\r\n {name:ChatDeletingMessagesNames.Enabled,value:ChatDeletingMessages.Enabled},\r\n {name:ChatDeletingMessagesNames.Disabled,value:ChatDeletingMessages.Disabled},\r\n {name:ChatDeletingMessagesNames.WithPeriod,value:ChatDeletingMessages.EnabledWithDeletionPeriod},\r\n ]\r\n\r\n deleteConversationOptions : DeleteConversationModel[] = [\r\n {name:ChatDeletingConversationsNames.Enabled,value:ChatDeletingConversations.Enabled},\r\n {name:ChatDeletingConversationsNames.Disabled,value:ChatDeletingConversations.Disabled},\r\n ]\r\n\r\n get deletingMessages(){\r\n return this.deleteMessageForm.value.deletingMessages;\r\n }\r\n get deletingConversations(){\r\n return this.deleteMessageForm.value.deletingConversations;\r\n }\r\n get messageDeletionPeriod(){\r\n return this.deleteMessageForm.value.messageDeletionPeriod;\r\n }\r\n \r\n async init(){\r\n const formValues = await firstValueFrom(this.chatSettingsService.get());\r\n this.deleteMessageForm.setValue(formValues)\r\n }\r\n\r\n async onSubmit(){\r\n const formValues = {...this.deleteMessageForm.value} as ChatSettingsDto\r\n this.loading = true\r\n await firstValueFrom(this.chatSettingsService.update(formValues))\r\n this.loading = false\r\n this.configStateService.refreshAppState();\r\n this.toasterService.success('AbpSettingManagement::SuccessfullySaved');\r\n }\r\n}","<form [formGroup]=\"deleteMessageForm\" class=\"abp-md-form\" (ngSubmit)=\"onSubmit()\">\r\n <div class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'Chat::DisplayName:Abp.Chat.DeletingMessages' | abpLocalization }}<span class=\"ms-1\"></span></label\r\n >\r\n <select class=\"form-select form-control\" formControlName=\"deletingMessages\" >\r\n <option *ngFor=\"let option of deleteMessageOptions; trackBy: track.by('value')\" [ngValue]=\"option.value\">\r\n {{ option.name | abpLocalization}}\r\n </option>\r\n </select>\r\n </div>\r\n <div *ngIf=\"deletingMessages === 3\" class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'Chat::DisplayName:Abp.Chat.MessageDeletionPeriod' | abpLocalization }}<span class=\"ms-1\"></span></label\r\n >\r\n <input type=\"number\" class=\"form-control\" formControlName=\"messageDeletionPeriod\" />\r\n </div>\r\n <div *ngIf=\"deletingMessages === 1\" class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'Chat::DisplayName:Abp.Chat.DeletingConversations' | abpLocalization }}<span class=\"ms-1\"></span></label\r\n >\r\n <select class=\"form-select form-control\" formControlName=\"deletingConversations\" >\r\n <option *ngFor=\"let option of deleteConversationOptions; trackBy: track.by('value')\" [ngValue]=\"option.value\">\r\n {{ option.name | abpLocalization}}\r\n </option>\r\n </select>\r\n </div>\r\n <hr class=\"my-4\">\r\n <abp-button iconClass=\"fa fa-save\" buttonType=\"submit\" [loading]=\"loading\">\r\n {{ 'AbpIdentity::Save' | abpLocalization }}\r\n </abp-button>\r\n</form>","import { SettingTabsService } from '@abp/ng.setting-management/config';\r\nimport { APP_INITIALIZER } from '@angular/core';\r\nimport { eChatModuleTabNames } from '../enums/chat-module-tab-names';\r\nimport { ChatTabComponent } from '../components/chat-tab.component';\r\n\r\nexport const CHAT_SETTINGS_PROVIDERS = [\r\n {\r\n provide: APP_INITIALIZER,\r\n useFactory: configureSettingTabs,\r\n deps: [SettingTabsService],\r\n multi: true,\r\n },\r\n];\r\n\r\nexport function configureSettingTabs(settingtabs: SettingTabsService) {\r\n return () => {\r\n settingtabs.add([\r\n {\r\n name: eChatModuleTabNames.ChatTab,\r\n order: 100,\r\n component: ChatTabComponent,\r\n requiredPolicy:'Chat.SettingManagement'\r\n },\r\n ]);\r\n };\r\n}\r\n","import { AuthService, 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 { CHAT_SETTINGS_PROVIDERS } from './providers';\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 CHAT_SETTINGS_PROVIDERS,\r\n {\r\n provide: APP_INITIALIZER,\r\n deps: [ChatConfigService, AuthService],\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":["i1","i4","i5"],"mappings":";;;;;;;;;;;;;;;;;;;AAeA,MAAM,UAAU,GAAG,gBAAgB,CAAC;MAavB,iBAAiB,CAAA;AAU5B,IAAA,IAAI,oBAAoB,GAAA;AACtB,QAAA,OAAO,IAAI,CAAC,mBAAmB,CAAC,YAAY,EAAE,CAAC;KAChD;AAED,IAAA,IAAI,aAAa,GAAA;AACf,QAAA,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,EAAE,EAAE,WAAW,EAAE,KAAK,OAAO,CAAC;KACrF;AAED,IAAA,IAAI,UAAU,GAAA;QACZ,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,kBA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AAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAhB,gBAAgB,EAAA,YAAA,EAAA,CAFV,iBAAiB,CAAA,EAAA,OAAA,EAAA,CADtB,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;AAGX,IAAA,SAAA,IAAA,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,EAAA;;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;AACpC,iBAAA,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/components/chat-tab.component.ts","../../../../packages/chat/config/src/components/chat-tab.component.html","../../../../packages/chat/config/src/providers/chat-module-settings.provider.ts","../../../../packages/chat/config/src/chat-config.module.ts","../../../../packages/chat/config/src/volo-abp.ng.chat-config.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { NavigationEnd, Router } from '@angular/router';\r\nimport { BehaviorSubject, Observable, Subject, combineLatest, filter, switchMap, tap } from 'rxjs';\r\nimport { OAuthService } from 'angular-oauth2-oidc';\r\nimport * as signalR from '@microsoft/signalr';\r\nimport {\r\n ConfigStateService,\r\n CurrentUserDto,\r\n EnvironmentService,\r\n PermissionService,\r\n RestService,\r\n} from '@abp/ng.core';\r\nimport { NavItemsService, ToasterService } from '@abp/ng.theme.shared';\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 protected readonly toaster = inject(ToasterService);\r\n\r\n protected readonly unreadMessagesCount = new BehaviorSubject<number>(0);\r\n\r\n apiName = 'Chat';\r\n conectedUserId: string;\r\n connection: signalR.HubConnection;\r\n message$ = new Subject<ChatMessage>();\r\n\r\n get unreadMessagesCount$(): Observable<number> {\r\n return this.unreadMessagesCount.asObservable();\r\n }\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 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 protected listenToAppConfig(): void {\r\n this.configState\r\n .createOnUpdateStream(state => state)\r\n .pipe(\r\n filter(({ currentUser }) => {\r\n const { isAuthenticated } = currentUser;\r\n const isGranted = this.permissionService.getGrantedPolicy(permission);\r\n\r\n if ((!isAuthenticated || !isGranted) && this.connection) {\r\n this.connection.stop();\r\n }\r\n if (!this.isChatEnabled) {\r\n this.toggleChat();\r\n }\r\n if (isGranted) {\r\n this.initSignalR(currentUser as CurrentUserDto);\r\n }\r\n\r\n return isGranted;\r\n }),\r\n switchMap(() => this.setTotalUnreadMessageCount()),\r\n switchMap(() => combineLatest([this.listenToMessages(), this.listenToRouterEvents()])),\r\n takeUntilDestroyed(),\r\n )\r\n .subscribe();\r\n }\r\n\r\n protected toggleChat(): void {\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 protected initSignalR(currentUser: CurrentUserDto): void {\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(() => (this.conectedUserId = currentUser.id))\r\n .catch(err => console.error(err.toString()));\r\n }\r\n\r\n protected handleMessage = (message: ChatMessage): void => {\r\n this.message$.next(message);\r\n };\r\n\r\n setTotalUnreadMessageCount() {\r\n if (this.router.url === '/chat') return;\r\n return 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 .pipe(tap(count => this.unreadMessagesCount.next(count)));\r\n }\r\n\r\n addUnreadMessageCount(count: number): void {\r\n if (!count || count < 1) {\r\n this.resetUnreadMessageCount();\r\n return;\r\n }\r\n\r\n const currentCount = this.unreadMessagesCount.getValue();\r\n this.unreadMessagesCount.next(currentCount + count);\r\n }\r\n\r\n resetUnreadMessageCount(): void {\r\n this.unreadMessagesCount.next(0);\r\n }\r\n\r\n listenToMessages(): Observable<ChatMessage> {\r\n return this.message$.pipe(\r\n filter(() => this.router.url !== '/chat'),\r\n tap(message => {\r\n const { senderName, senderSurname, senderUsername, text } = message;\r\n const sender = `${senderName ? senderName + (senderSurname ? (' ' + senderSurname) : '') : senderUsername}`;\r\n const toasterMessage = `<strong>${sender}</strong>: ${\r\n text.length > 50 ? text.substring(0, 49) + '...' : text\r\n }`;\r\n\r\n this.addUnreadMessageCount(1);\r\n this.toaster.info(toasterMessage, null, {\r\n tapToDismiss: true,\r\n iconClass: 'fa-comment-dots',\r\n });\r\n }),\r\n );\r\n }\r\n\r\n listenToRouterEvents() {\r\n return this.router.events.pipe(\r\n filter(event => event instanceof NavigationEnd && event.url === '/chat'),\r\n tap(() => this.resetUnreadMessageCount()),\r\n );\r\n }\r\n}\r\n","import { Component, inject } from '@angular/core';\r\nimport { ChatConfigService } from '../services/chat-config.service';\r\n\r\n@Component({\r\n selector: 'abp-chat-icon',\r\n template: `\r\n <div class=\"position-relative\">\r\n <a>\r\n <i class=\"fas fa-comments fa-lg\"></i>\r\n <span\r\n *ngIf=\"chatConfigService.unreadMessagesCount$ | async as messageCount\"\r\n class=\"badge text-dark\"\r\n >\r\n {{ messageCount }}\r\n </span>\r\n </a>\r\n </div>\r\n `,\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 {\r\n protected readonly chatConfigService = inject(ChatConfigService);\r\n}\r\n","import { APP_INITIALIZER, inject } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { NavItemsService } from '@abp/ng.theme.shared';\r\nimport { ChatIconComponent } from '../components/chat-icon.component';\r\nimport { eChatPolicyNames } from '../enums/policy-names';\r\nimport { ChatConfigService } from '../services/chat-config.service';\r\n\r\nexport const CHAT_NAV_ITEM_PROVIDERS = [\r\n {\r\n provide: APP_INITIALIZER,\r\n useFactory: configureNavItems,\r\n deps: [NavItemsService, Router],\r\n multi: true,\r\n },\r\n];\r\n\r\nexport function configureNavItems(navItems: NavItemsService, router: Router) {\r\n const chatConfigService = inject(ChatConfigService);\r\n\r\n return () => {\r\n navItems.addItems([\r\n {\r\n id: 'Chat.ChatIconComponent',\r\n name: 'Chat::Feature:ChatGroup',\r\n requiredPolicy: eChatPolicyNames.Messaging,\r\n component: ChatIconComponent,\r\n badge: {\r\n count: chatConfigService.unreadMessagesCount$,\r\n },\r\n order: 99.99,\r\n icon: 'fas fa-comments fa-lg',\r\n action: () => {\r\n router.navigate(['/chat']);\r\n },\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 { ConfigStateService, CoreModule, TrackByService } from \"@abp/ng.core\";\r\nimport { ThemeSharedModule, ToasterService } from \"@abp/ng.theme.shared\";\r\nimport { Component, inject } from \"@angular/core\";\r\nimport { FormBuilder } from \"@angular/forms\";\r\nimport { ChatDeletingConversationsNames, ChatDeletingMessagesNames } from \"../enums/delete-message.enums\";\r\nimport { DeleteConversationModel, DeleteMessageModel } from \"../models/deleteMessage.model\";\r\nimport { ChatDeletingMessages, ChatDeletingConversations, ChatSettingsDto, SettingsService } from \"@volo/abp.ng.chat/proxy\";\r\nimport { firstValueFrom } from \"rxjs\";\r\n\r\n@Component({\r\n selector: 'abp-chat-tab',\r\n templateUrl: './chat-tab.component.html',\r\n standalone: true,\r\n imports: [CoreModule,ThemeSharedModule]\r\n})\r\nexport class ChatTabComponent{\r\n protected readonly toasterService = inject(ToasterService);\r\n protected readonly chatSettingsService = inject(SettingsService);\r\n protected readonly configStateService = inject(ConfigStateService);\r\n protected readonly fb = inject(FormBuilder);\r\n public readonly track = inject(TrackByService);\r\n loading = false;\r\n deleteMessageForm = this.fb.group({\r\n deletingMessages: [1],\r\n deletingConversations: [1],\r\n messageDeletionPeriod: [0]\r\n });\r\n constructor(){\r\n this.init();\r\n }\r\n\r\n deleteMessageOptions : DeleteMessageModel[] = [\r\n {name:ChatDeletingMessagesNames.Enabled,value:ChatDeletingMessages.Enabled},\r\n {name:ChatDeletingMessagesNames.Disabled,value:ChatDeletingMessages.Disabled},\r\n {name:ChatDeletingMessagesNames.WithPeriod,value:ChatDeletingMessages.EnabledWithDeletionPeriod},\r\n ]\r\n\r\n deleteConversationOptions : DeleteConversationModel[] = [\r\n {name:ChatDeletingConversationsNames.Enabled,value:ChatDeletingConversations.Enabled},\r\n {name:ChatDeletingConversationsNames.Disabled,value:ChatDeletingConversations.Disabled},\r\n ]\r\n\r\n get deletingMessages(){\r\n return this.deleteMessageForm.value.deletingMessages;\r\n }\r\n get deletingConversations(){\r\n return this.deleteMessageForm.value.deletingConversations;\r\n }\r\n get messageDeletionPeriod(){\r\n return this.deleteMessageForm.value.messageDeletionPeriod;\r\n }\r\n \r\n async init(){\r\n const formValues = await firstValueFrom(this.chatSettingsService.get());\r\n this.deleteMessageForm.setValue(formValues)\r\n }\r\n\r\n async onSubmit(){\r\n const formValues = {...this.deleteMessageForm.value} as ChatSettingsDto\r\n this.loading = true\r\n await firstValueFrom(this.chatSettingsService.update(formValues))\r\n this.loading = false\r\n this.configStateService.refreshAppState();\r\n this.toasterService.success('AbpSettingManagement::SuccessfullySaved');\r\n }\r\n}","<form [formGroup]=\"deleteMessageForm\" class=\"abp-md-form\" (ngSubmit)=\"onSubmit()\">\r\n <div class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'Chat::DisplayName:Abp.Chat.DeletingMessages' | abpLocalization }}<span class=\"ms-1\"></span></label\r\n >\r\n <select class=\"form-select form-control\" formControlName=\"deletingMessages\" >\r\n <option *ngFor=\"let option of deleteMessageOptions; trackBy: track.by('value')\" [ngValue]=\"option.value\">\r\n {{ option.name | abpLocalization}}\r\n </option>\r\n </select>\r\n </div>\r\n <div *ngIf=\"deletingMessages === 3\" class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'Chat::DisplayName:Abp.Chat.MessageDeletionPeriod' | abpLocalization }}<span class=\"ms-1\"></span></label\r\n >\r\n <input type=\"number\" class=\"form-control\" formControlName=\"messageDeletionPeriod\" />\r\n </div>\r\n <div *ngIf=\"deletingMessages === 1\" class=\"mb-3 form-group\">\r\n <label class=\"form-label\"\r\n >{{ 'Chat::DisplayName:Abp.Chat.DeletingConversations' | abpLocalization }}<span class=\"ms-1\"></span></label\r\n >\r\n <select class=\"form-select form-control\" formControlName=\"deletingConversations\" >\r\n <option *ngFor=\"let option of deleteConversationOptions; trackBy: track.by('value')\" [ngValue]=\"option.value\">\r\n {{ option.name | abpLocalization}}\r\n </option>\r\n </select>\r\n </div>\r\n <hr class=\"my-4\">\r\n <abp-button iconClass=\"fa fa-save\" buttonType=\"submit\" [loading]=\"loading\">\r\n {{ 'AbpIdentity::Save' | abpLocalization }}\r\n </abp-button>\r\n</form>","import { SettingTabsService } from '@abp/ng.setting-management/config';\r\nimport { APP_INITIALIZER } from '@angular/core';\r\nimport { eChatModuleTabNames } from '../enums/chat-module-tab-names';\r\nimport { ChatTabComponent } from '../components/chat-tab.component';\r\n\r\nexport const CHAT_SETTINGS_PROVIDERS = [\r\n {\r\n provide: APP_INITIALIZER,\r\n useFactory: configureSettingTabs,\r\n deps: [SettingTabsService],\r\n multi: true,\r\n },\r\n];\r\n\r\nexport function configureSettingTabs(settingtabs: SettingTabsService) {\r\n return () => {\r\n settingtabs.add([\r\n {\r\n name: eChatModuleTabNames.ChatTab,\r\n order: 100,\r\n component: ChatTabComponent,\r\n requiredPolicy:'Chat.SettingManagement'\r\n },\r\n ]);\r\n };\r\n}\r\n","import { AuthService, 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 { CHAT_SETTINGS_PROVIDERS } from './providers';\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 CHAT_SETTINGS_PROVIDERS,\r\n {\r\n provide: APP_INITIALIZER,\r\n deps: [ChatConfigService, AuthService],\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":["i1","i4","i5"],"mappings":";;;;;;;;;;;;;;;;;;;AAeA,MAAM,UAAU,GAAG,gBAAgB,CAAC;MAavB,iBAAiB,CAAA;AAU5B,IAAA,IAAI,oBAAoB,GAAA;AACtB,QAAA,OAAO,IAAI,CAAC,mBAAmB,CAAC,YAAY,EAAE,CAAC;KAChD;AAED,IAAA,IAAI,aAAa,GAAA;AACf,QAAA,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,EAAE,EAAE,WAAW,EAAE,KAAK,OAAO,CAAC;KACrF;AAED,IAAA,IAAI,UAAU,GAAA;QACZ,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,kBAAkB,CAAC,cAAc,EAAE,CAAC;QAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,UAAU,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;KACtF;AAED,IAAA,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CAAA,CAAA,EAAA;AAGX,IAAA,SAAA,IAAA,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,EAAA;;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;AACpC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -33,10 +33,10 @@ class ConversationService {
|
|
|
33
33
|
body: input,
|
|
34
34
|
}, { apiName: this.apiName, ...config });
|
|
35
35
|
}
|
|
36
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
37
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.
|
|
36
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ConversationService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
37
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ConversationService, providedIn: 'root' }); }
|
|
38
38
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ConversationService, decorators: [{
|
|
40
40
|
type: Injectable,
|
|
41
41
|
args: [{
|
|
42
42
|
providedIn: 'root',
|
|
@@ -84,10 +84,10 @@ class SettingsService {
|
|
|
84
84
|
body: input,
|
|
85
85
|
}, { apiName: this.apiName, ...config });
|
|
86
86
|
}
|
|
87
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
88
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.
|
|
87
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SettingsService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
88
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SettingsService, providedIn: 'root' }); }
|
|
89
89
|
}
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SettingsService, decorators: [{
|
|
91
91
|
type: Injectable,
|
|
92
92
|
args: [{
|
|
93
93
|
providedIn: 'root',
|
|
@@ -108,10 +108,10 @@ class ContactService {
|
|
|
108
108
|
url: '/api/chat/contact/total-unread-message-count',
|
|
109
109
|
}, { apiName: this.apiName, ...config });
|
|
110
110
|
}
|
|
111
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
112
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.
|
|
111
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ContactService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
112
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ContactService, providedIn: 'root' }); }
|
|
113
113
|
}
|
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ContactService, decorators: [{
|
|
115
115
|
type: Injectable,
|
|
116
116
|
args: [{
|
|
117
117
|
providedIn: 'root',
|
|
@@ -31,10 +31,10 @@ class ContactService {
|
|
|
31
31
|
getContactsByInput(params = {}) {
|
|
32
32
|
return this.restService.request({ url: '/api/chat/contact/contacts', method: 'GET', params }, { apiName: this.apiName });
|
|
33
33
|
}
|
|
34
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
35
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.
|
|
34
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ContactService, deps: [{ token: i3.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
35
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ContactService, providedIn: 'root' }); }
|
|
36
36
|
}
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ContactService, decorators: [{
|
|
38
38
|
type: Injectable,
|
|
39
39
|
args: [{ providedIn: 'root' }]
|
|
40
40
|
}], ctorParameters: () => [{ type: i3.RestService }] });
|
|
@@ -85,8 +85,8 @@ class ConversationAvatarComponent {
|
|
|
85
85
|
get isSmall() {
|
|
86
86
|
return typeof this.small === 'string' || this.small;
|
|
87
87
|
}
|
|
88
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
89
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.
|
|
88
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ConversationAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
89
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: ConversationAvatarComponent, selector: "abp-conversation-avatar", inputs: { contact: "contact", small: "small" }, ngImport: i0, template: `<div
|
|
90
90
|
class="avatar me-2 float-start rounded-circle"
|
|
91
91
|
[class.small]="isSmall"
|
|
92
92
|
[ngStyle]="avatarBgStyle"
|
|
@@ -94,7 +94,7 @@ class ConversationAvatarComponent {
|
|
|
94
94
|
{{ avatarText }}
|
|
95
95
|
</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"] }] }); }
|
|
96
96
|
}
|
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ConversationAvatarComponent, decorators: [{
|
|
98
98
|
type: Component,
|
|
99
99
|
args: [{ selector: 'abp-conversation-avatar', template: `<div
|
|
100
100
|
class="avatar me-2 float-start rounded-circle"
|
|
@@ -196,10 +196,10 @@ class ChatContactsComponent {
|
|
|
196
196
|
this.get();
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
200
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.
|
|
199
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatContactsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
200
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: ChatContactsComponent, selector: "abp-chat-contacts", inputs: { startConversation: "startConversation", conversationDeletable: "conversationDeletable" }, outputs: { selected: "selected" }, providers: [SubscriptionService], usesOnChanges: true, ngImport: i0, template: "<div class=\"card w-100 mb-3 mb-md-0\">\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 <div class=\"messages-box m-0 p-0\">\r\n <div class=\"list-group rounded-3\" [ngStyle]=\"{'min-height': allContacts.length && 'calc(100vh - 254.34px)'}\" 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 position-relative px-2 border-2 rounded-2 mb-1 mt-0 {{\r\n selectedContact.userId === contact.userId ? 'active' : ''\r\n }}\"\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\">{{ contact.lastMessageDate | date:'HH:mm' }}</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 *ngIf=\"conversationDeletable\" ngbDropdown class=\"dropdown position-absolute bottom-0 end-0\">\r\n <button class=\"btn p-1 down-arrow\" \r\n id=\"dropdownBasic1\" ngbDropdownToggle><i class=\"bi bi-chevron-down\"></i></button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem (click)=\"deleteConversation(contact)\">Delete</button>\r\n </div>\r\n </div>\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)}.dropdown-toggle:after{display:none}.dropdown{border-color:transparent}.down-arrow{border:none;opacity:0}.media:hover .down-arrow{opacity:100%}.list-group{padding-right:7px}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:var(--lpx-border-color)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i6.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: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.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: "directive", type: i4.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i4.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i4.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i4.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i4.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: ConversationAvatarComponent, selector: "abp-conversation-avatar", inputs: ["contact", "small"] }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
201
201
|
}
|
|
202
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
202
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatContactsComponent, decorators: [{
|
|
203
203
|
type: Component,
|
|
204
204
|
args: [{ selector: 'abp-chat-contacts', providers: [SubscriptionService], template: "<div class=\"card w-100 mb-3 mb-md-0\">\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 <div class=\"messages-box m-0 p-0\">\r\n <div class=\"list-group rounded-3\" [ngStyle]=\"{'min-height': allContacts.length && 'calc(100vh - 254.34px)'}\" 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 position-relative px-2 border-2 rounded-2 mb-1 mt-0 {{\r\n selectedContact.userId === contact.userId ? 'active' : ''\r\n }}\"\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\">{{ contact.lastMessageDate | date:'HH:mm' }}</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 *ngIf=\"conversationDeletable\" ngbDropdown class=\"dropdown position-absolute bottom-0 end-0\">\r\n <button class=\"btn p-1 down-arrow\" \r\n id=\"dropdownBasic1\" ngbDropdownToggle><i class=\"bi bi-chevron-down\"></i></button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem (click)=\"deleteConversation(contact)\">Delete</button>\r\n </div>\r\n </div>\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)}.dropdown-toggle:after{display:none}.dropdown{border-color:transparent}.down-arrow{border:none;opacity:0}.media:hover .down-arrow{opacity:100%}.list-group{padding-right:7px}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:var(--lpx-border-color)}\n"] }]
|
|
205
205
|
}], propDecorators: { startConversation: [{
|
|
@@ -297,8 +297,8 @@ class ChatMessageTitleComponent {
|
|
|
297
297
|
get contactName() {
|
|
298
298
|
return getContactName(this.selectedContact || {});
|
|
299
299
|
}
|
|
300
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
301
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.
|
|
300
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatMessageTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
301
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: ChatMessageTitleComponent, selector: "abp-chat-message-title", inputs: { selectedContact: "selectedContact" }, ngImport: i0, template: `
|
|
302
302
|
<div class="px-2 py-1 border mb-2 rounded-2">
|
|
303
303
|
<div class="row">
|
|
304
304
|
<div class="col-auto py-1 pe-0">
|
|
@@ -312,7 +312,7 @@ class ChatMessageTitleComponent {
|
|
|
312
312
|
</div>
|
|
313
313
|
`, isInline: true, dependencies: [{ kind: "component", type: ConversationAvatarComponent, selector: "abp-conversation-avatar", inputs: ["contact", "small"] }] }); }
|
|
314
314
|
}
|
|
315
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatMessageTitleComponent, decorators: [{
|
|
316
316
|
type: Component,
|
|
317
317
|
args: [{ selector: 'abp-chat-message-title', template: `
|
|
318
318
|
<div class="px-2 py-1 border mb-2 rounded-2">
|
|
@@ -542,10 +542,10 @@ class ChatComponent {
|
|
|
542
542
|
const now = new Date().getTime();
|
|
543
543
|
return now - readDate > this.messageDeletePeriod ? false : true;
|
|
544
544
|
}
|
|
545
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
546
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", 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\r\n class=\"d-flex w-100\"\r\n (selected)=\"onSelectContact($event)\"\r\n [startConversation]=\"clickedStartMessage\"\r\n [conversationDeletable]=\"conversationDeletable\"\r\n ></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 *ngIf=\"selectedContact.userId\" 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 <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=\"message-text 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\r\n <div *ngIf=\"messageDeletable\" ngbDropdown class=\"dropdown position-absolute top-0 end-0\">\r\n <button class=\"btn p-1 text-light down-arrow\" \r\n ngbDropdownToggle><i class=\"bi bi-chevron-down\"></i></button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem (click)=\"deleteMessage(message)\">Delete</button>\r\n </div>\r\n </div>\r\n <div *ngIf=\"messageDeletableWithPeriod && showDeleteDropdown(message)\" ngbDropdown class=\"dropdown position-absolute top-0 end-0\">\r\n <button class=\"btn p-1 text-light down-arrow\" \r\n ngbDropdownToggle><i class=\"bi bi-chevron-down\"></i></button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem (click)=\"deleteMessage(message)\">Delete</button>\r\n </div>\r\n </div>\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\"\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\" aria-hidden=\"true\"></i>\r\n\r\n <ng-template #loadingIcon>\r\n <i class=\"fas fa-spinner fa-spin ms-2\" aria-hidden=\"true\"></i>\r\n </ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!selectedContact.userId\" class=\"card-body pt-5 pb-5 text-center\">\r\n <i class=\"fa fa-commenting-o fs-2\" aria-hidden=\"true\"></i>\r\n <p>{{ 'Chat::NoMessageYetMessage' | abpLocalization }}</p>\r\n <button (click)=\"startConversation()\" type=\"button\" class=\"btn btn-primary\">\r\n {{ 'Chat::StartConversation' | abpLocalization }}\r\n </button>\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-text{white-space:pre-line}.message-date{position:absolute;opacity:.35;width:100px;top:1px}.message-date.left{left:-110px;text-align:right}.message-date.right{right:-110px}.dropdown-toggle:after{display:none}.dropdown{border-color:transparent}.down-arrow{border:none;opacity:0}.media-body:hover .down-arrow{opacity:100%}.chat-box-container{padding-right:7px}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:var(--lpx-border-color)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.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: i6.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i4.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i4.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i4.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i4.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: ChatContactsComponent, selector: "abp-chat-contacts", inputs: ["startConversation", "conversationDeletable"], outputs: ["selected"] }, { kind: "component", type: ChatMessageTitleComponent, selector: "abp-chat-message-title", inputs: ["selectedContact"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
545
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatComponent, deps: [{ token: i1$1.ConversationService }, { token: i2.ChatConfigService }, { token: i3.ConfigStateService }, { token: i3.HttpWaitService }, { token: i4$1.ConfirmationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
546
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", 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\r\n class=\"d-flex w-100\"\r\n (selected)=\"onSelectContact($event)\"\r\n [startConversation]=\"clickedStartMessage\"\r\n [conversationDeletable]=\"conversationDeletable\"\r\n ></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 *ngIf=\"selectedContact.userId\" 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 <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=\"message-text 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\r\n <div *ngIf=\"messageDeletable\" ngbDropdown class=\"dropdown position-absolute top-0 end-0\">\r\n <button class=\"btn p-1 text-light down-arrow\" \r\n ngbDropdownToggle><i class=\"bi bi-chevron-down\"></i></button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem (click)=\"deleteMessage(message)\">Delete</button>\r\n </div>\r\n </div>\r\n <div *ngIf=\"messageDeletableWithPeriod && showDeleteDropdown(message)\" ngbDropdown class=\"dropdown position-absolute top-0 end-0\">\r\n <button class=\"btn p-1 text-light down-arrow\" \r\n ngbDropdownToggle><i class=\"bi bi-chevron-down\"></i></button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem (click)=\"deleteMessage(message)\">Delete</button>\r\n </div>\r\n </div>\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\"\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\" aria-hidden=\"true\"></i>\r\n\r\n <ng-template #loadingIcon>\r\n <i class=\"fas fa-spinner fa-spin ms-2\" aria-hidden=\"true\"></i>\r\n </ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!selectedContact.userId\" class=\"card-body pt-5 pb-5 text-center\">\r\n <i class=\"fa fa-commenting-o fs-2\" aria-hidden=\"true\"></i>\r\n <p>{{ 'Chat::NoMessageYetMessage' | abpLocalization }}</p>\r\n <button (click)=\"startConversation()\" type=\"button\" class=\"btn btn-primary\">\r\n {{ 'Chat::StartConversation' | abpLocalization }}\r\n </button>\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-text{white-space:pre-line}.message-date{position:absolute;opacity:.35;width:100px;top:1px}.message-date.left{left:-110px;text-align:right}.message-date.right{right:-110px}.dropdown-toggle:after{display:none}.dropdown{border-color:transparent}.down-arrow{border:none;opacity:0}.media-body:hover .down-arrow{opacity:100%}.chat-box-container{padding-right:7px}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:var(--lpx-border-color)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.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: i6.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i4.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i4.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i4.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i4.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: ChatContactsComponent, selector: "abp-chat-contacts", inputs: ["startConversation", "conversationDeletable"], outputs: ["selected"] }, { kind: "component", type: ChatMessageTitleComponent, selector: "abp-chat-message-title", inputs: ["selectedContact"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
547
547
|
}
|
|
548
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
548
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatComponent, decorators: [{
|
|
549
549
|
type: Component,
|
|
550
550
|
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\r\n class=\"d-flex w-100\"\r\n (selected)=\"onSelectContact($event)\"\r\n [startConversation]=\"clickedStartMessage\"\r\n [conversationDeletable]=\"conversationDeletable\"\r\n ></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 *ngIf=\"selectedContact.userId\" 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 <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=\"message-text 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\r\n <div *ngIf=\"messageDeletable\" ngbDropdown class=\"dropdown position-absolute top-0 end-0\">\r\n <button class=\"btn p-1 text-light down-arrow\" \r\n ngbDropdownToggle><i class=\"bi bi-chevron-down\"></i></button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem (click)=\"deleteMessage(message)\">Delete</button>\r\n </div>\r\n </div>\r\n <div *ngIf=\"messageDeletableWithPeriod && showDeleteDropdown(message)\" ngbDropdown class=\"dropdown position-absolute top-0 end-0\">\r\n <button class=\"btn p-1 text-light down-arrow\" \r\n ngbDropdownToggle><i class=\"bi bi-chevron-down\"></i></button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem (click)=\"deleteMessage(message)\">Delete</button>\r\n </div>\r\n </div>\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\"\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\" aria-hidden=\"true\"></i>\r\n\r\n <ng-template #loadingIcon>\r\n <i class=\"fas fa-spinner fa-spin ms-2\" aria-hidden=\"true\"></i>\r\n </ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!selectedContact.userId\" class=\"card-body pt-5 pb-5 text-center\">\r\n <i class=\"fa fa-commenting-o fs-2\" aria-hidden=\"true\"></i>\r\n <p>{{ 'Chat::NoMessageYetMessage' | abpLocalization }}</p>\r\n <button (click)=\"startConversation()\" type=\"button\" class=\"btn btn-primary\">\r\n {{ 'Chat::StartConversation' | abpLocalization }}\r\n </button>\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-text{white-space:pre-line}.message-date{position:absolute;opacity:.35;width:100px;top:1px}.message-date.left{left:-110px;text-align:right}.message-date.right{right:-110px}.dropdown-toggle:after{display:none}.dropdown{border-color:transparent}.down-arrow{border:none;opacity:0}.media-body:hover .down-arrow{opacity:100%}.chat-box-container{padding-right:7px}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:var(--lpx-border-color)}\n"] }]
|
|
551
551
|
}], ctorParameters: () => [{ type: i1$1.ConversationService }, { type: i2.ChatConfigService }, { type: i3.ConfigStateService }, { type: i3.HttpWaitService }, { type: i4$1.ConfirmationService }], propDecorators: { chatBoxRef: [{
|
|
@@ -577,11 +577,11 @@ const routes = [
|
|
|
577
577
|
},
|
|
578
578
|
];
|
|
579
579
|
class ChatRoutingModule {
|
|
580
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
581
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.
|
|
582
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.
|
|
580
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
581
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type: ChatRoutingModule, imports: [i1$2.RouterModule], exports: [RouterModule] }); }
|
|
582
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
|
|
583
583
|
}
|
|
584
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
584
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatRoutingModule, decorators: [{
|
|
585
585
|
type: NgModule,
|
|
586
586
|
args: [{
|
|
587
587
|
imports: [RouterModule.forChild(routes)],
|
|
@@ -605,17 +605,17 @@ class ChatModule {
|
|
|
605
605
|
static forLazy() {
|
|
606
606
|
return new LazyModuleFactory(ChatModule.forChild());
|
|
607
607
|
}
|
|
608
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
609
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.
|
|
608
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
609
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type: ChatModule, declarations: [ChatComponent,
|
|
610
610
|
ChatContactsComponent,
|
|
611
611
|
ConversationAvatarComponent,
|
|
612
612
|
ChatMessageTitleComponent], imports: [CoreModule, ThemeSharedModule, ChatRoutingModule, NgbDropdownModule], exports: [ChatComponent,
|
|
613
613
|
ChatContactsComponent,
|
|
614
614
|
ConversationAvatarComponent,
|
|
615
615
|
ChatMessageTitleComponent] }); }
|
|
616
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.
|
|
616
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatModule, imports: [CoreModule, ThemeSharedModule, ChatRoutingModule, NgbDropdownModule] }); }
|
|
617
617
|
}
|
|
618
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
618
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ChatModule, decorators: [{
|
|
619
619
|
type: NgModule,
|
|
620
620
|
args: [{
|
|
621
621
|
declarations,
|
|
@@ -638,10 +638,10 @@ class ConversationService {
|
|
|
638
638
|
markConversationAsReadByInput(body) {
|
|
639
639
|
return this.restService.request({ url: '/api/chat/conversation/mark-conversation-as-read', method: 'POST', body }, { apiName: this.apiName });
|
|
640
640
|
}
|
|
641
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
642
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.
|
|
641
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ConversationService, deps: [{ token: i3.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
642
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ConversationService, providedIn: 'root' }); }
|
|
643
643
|
}
|
|
644
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
644
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: ConversationService, decorators: [{
|
|
645
645
|
type: Injectable,
|
|
646
646
|
args: [{ providedIn: 'root' }]
|
|
647
647
|
}], ctorParameters: () => [{ type: i3.RestService }] });
|
|
@@ -654,10 +654,10 @@ class SettingsService {
|
|
|
654
654
|
setSendOnEnterSettingByInput(body) {
|
|
655
655
|
return this.restService.request({ url: '/api/chat/settings/send-on-enter', method: 'POST', body }, { apiName: this.apiName });
|
|
656
656
|
}
|
|
657
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
658
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.
|
|
657
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SettingsService, deps: [{ token: i3.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
658
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SettingsService, providedIn: 'root' }); }
|
|
659
659
|
}
|
|
660
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
660
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SettingsService, decorators: [{
|
|
661
661
|
type: Injectable,
|
|
662
662
|
args: [{ providedIn: 'root' }]
|
|
663
663
|
}], ctorParameters: () => [{ type: i3.RestService }] });
|