@rtsee/ngx 0.0.59 → 0.0.60
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/dist/ngx/fesm2022/rtsee-ngx.mjs +1689 -0
- package/dist/ngx/fesm2022/rtsee-ngx.mjs.map +1 -0
- package/dist/ngx/index.d.ts +538 -0
- package/package.json +10 -7
- package/.editorconfig +0 -16
- package/CHANGELOG.md +0 -120
- package/angular.json +0 -67
- package/jest.config.ts +0 -9
- package/projects/ngx/ng-package.json +0 -8
- package/projects/ngx/package.json +0 -20
- package/projects/ngx/src/lib/common/components/preloader/preloader.component.html +0 -5
- package/projects/ngx/src/lib/common/components/preloader/preloader.component.ts +0 -30
- package/projects/ngx/src/lib/common/interfaces/index.ts +0 -1
- package/projects/ngx/src/lib/common/interfaces/server-errors.ts +0 -5
- package/projects/ngx/src/lib/components/constans/common.const.ts +0 -8
- package/projects/ngx/src/lib/components/enums/form.enum.ts +0 -8
- package/projects/ngx/src/lib/components/rtsee/rtsee-conference.component.html +0 -70
- package/projects/ngx/src/lib/components/rtsee/rtsee-conference.component.ts +0 -35
- package/projects/ngx/src/lib/components/rtsee/rtsee-controls/rtsee-controls.component.html +0 -54
- package/projects/ngx/src/lib/components/rtsee/rtsee-controls/rtsee-controls.component.scss +0 -70
- package/projects/ngx/src/lib/components/rtsee/rtsee-controls/rtsee-controls.component.ts +0 -24
- package/projects/ngx/src/lib/components/rtsee-auth/auth/auth.component.html +0 -16
- package/projects/ngx/src/lib/components/rtsee-auth/auth/auth.component.ts +0 -48
- package/projects/ngx/src/lib/components/rtsee-auth/forgot-password/forgot-password.component.html +0 -35
- package/projects/ngx/src/lib/components/rtsee-auth/forgot-password/forgot-password.component.ts +0 -42
- package/projects/ngx/src/lib/components/rtsee-auth/reset-password/reset-password.component.html +0 -43
- package/projects/ngx/src/lib/components/rtsee-auth/reset-password/reset-password.component.ts +0 -83
- package/projects/ngx/src/lib/components/rtsee-auth/services/auth.service.ts +0 -40
- package/projects/ngx/src/lib/components/rtsee-auth/services/utils.service.ts +0 -20
- package/projects/ngx/src/lib/components/rtsee-auth/sign-in/sign-in.component.html +0 -84
- package/projects/ngx/src/lib/components/rtsee-auth/sign-in/sign-in.component.ts +0 -120
- package/projects/ngx/src/lib/components/rtsee-auth/sign-up/sign-up.component.html +0 -51
- package/projects/ngx/src/lib/components/rtsee-auth/sign-up/sign-up.component.ts +0 -67
- package/projects/ngx/src/lib/components/rtsee-auth/types/auth-form.type.ts +0 -36
- package/projects/ngx/src/lib/components/rtsee-auth/validators/form-fields-validators.ts +0 -27
- package/projects/ngx/src/lib/components/rtsee-auth/vendors/vendors.component.html +0 -1
- package/projects/ngx/src/lib/components/rtsee-auth/vendors/vendors.component.ts +0 -10
- package/projects/ngx/src/lib/components/rtsee-container/rtsee-container.component.html +0 -46
- package/projects/ngx/src/lib/components/rtsee-container/rtsee-container.component.ts +0 -34
- package/projects/ngx/src/lib/components/rtsee-container/rtsee-nav/rtsee-nav.component.html +0 -25
- package/projects/ngx/src/lib/components/rtsee-container/rtsee-nav/rtsee-nav.component.ts +0 -26
- package/projects/ngx/src/lib/components/rtsee-events-dashboard/components/event-thumbnail/event-thumbnail.component.html +0 -20
- package/projects/ngx/src/lib/components/rtsee-events-dashboard/components/event-thumbnail/event-thumbnail.component.ts +0 -89
- package/projects/ngx/src/lib/components/rtsee-events-dashboard/components/rtsee-events-dashboard-client/rtsee-events-dashboard-client.component.html +0 -1
- package/projects/ngx/src/lib/components/rtsee-events-dashboard/components/rtsee-events-dashboard-client/rtsee-events-dashboard-client.component.ts +0 -8
- package/projects/ngx/src/lib/components/rtsee-events-dashboard/components/rtsee-events-dashboard-client-thumbnail/rtsee-events-dashboard-client-thumbnail.component.html +0 -25
- package/projects/ngx/src/lib/components/rtsee-events-dashboard/components/rtsee-events-dashboard-client-thumbnail/rtsee-events-dashboard-client-thumbnail.component.ts +0 -40
- package/projects/ngx/src/lib/components/rtsee-events-dashboard/components/rtsee-events-dashboard-session/rtsee-events-dashboard-session.component.html +0 -32
- package/projects/ngx/src/lib/components/rtsee-events-dashboard/components/rtsee-events-dashboard-session/rtsee-events-dashboard-session.component.ts +0 -21
- package/projects/ngx/src/lib/components/rtsee-events-dashboard/rtsee-events-dashboard.component.html +0 -12
- package/projects/ngx/src/lib/components/rtsee-events-dashboard/rtsee-events-dashboard.component.ts +0 -19
- package/projects/ngx/src/lib/components/rtsee-messenger/chat/chat.component.html +0 -10
- package/projects/ngx/src/lib/components/rtsee-messenger/chat/chat.component.ts +0 -18
- package/projects/ngx/src/lib/components/rtsee-messenger/chat-input/chat-input.component.html +0 -20
- package/projects/ngx/src/lib/components/rtsee-messenger/chat-input/chat-input.component.ts +0 -31
- package/projects/ngx/src/lib/components/rtsee-messenger/chat-thumbnail/chat-thumbnail.component.html +0 -28
- package/projects/ngx/src/lib/components/rtsee-messenger/chat-thumbnail/chat-thumbnail.component.ts +0 -27
- package/projects/ngx/src/lib/components/rtsee-messenger/chats-list/chats-list.component.html +0 -6
- package/projects/ngx/src/lib/components/rtsee-messenger/chats-list/chats-list.component.ts +0 -22
- package/projects/ngx/src/lib/components/rtsee-messenger/main-menu/components/contacts-multiselect/contacts-multiselect.component.html +0 -3
- package/projects/ngx/src/lib/components/rtsee-messenger/main-menu/components/contacts-multiselect/contacts-multiselect.component.scss +0 -0
- package/projects/ngx/src/lib/components/rtsee-messenger/main-menu/components/contacts-multiselect/contacts-multiselect.component.ts +0 -18
- package/projects/ngx/src/lib/components/rtsee-messenger/main-menu/components/manage-chat/manage-chat.component.html +0 -4
- package/projects/ngx/src/lib/components/rtsee-messenger/main-menu/components/manage-chat/manage-chat.component.scss +0 -0
- package/projects/ngx/src/lib/components/rtsee-messenger/main-menu/components/manage-chat/manage-chat.component.ts +0 -18
- package/projects/ngx/src/lib/components/rtsee-messenger/main-menu/components/models/MainMenuState.ts +0 -11
- package/projects/ngx/src/lib/components/rtsee-messenger/main-menu/components/search/search.component.html +0 -25
- package/projects/ngx/src/lib/components/rtsee-messenger/main-menu/components/search/search.component.ts +0 -36
- package/projects/ngx/src/lib/components/rtsee-messenger/main-menu/main-menu.component.html +0 -32
- package/projects/ngx/src/lib/components/rtsee-messenger/main-menu/main-menu.component.ts +0 -41
- package/projects/ngx/src/lib/components/rtsee-messenger/message/components/message-time-and-status/message-time-and-status.component.html +0 -9
- package/projects/ngx/src/lib/components/rtsee-messenger/message/components/message-time-and-status/message-time-and-status.component.ts +0 -23
- package/projects/ngx/src/lib/components/rtsee-messenger/message/message.component.html +0 -17
- package/projects/ngx/src/lib/components/rtsee-messenger/message/message.component.ts +0 -64
- package/projects/ngx/src/lib/components/rtsee-messenger/message-widgets/call-widget/call-widget.component.html +0 -10
- package/projects/ngx/src/lib/components/rtsee-messenger/message-widgets/call-widget/call-widget.component.scss +0 -1
- package/projects/ngx/src/lib/components/rtsee-messenger/message-widgets/call-widget/call-widget.component.ts +0 -36
- package/projects/ngx/src/lib/components/rtsee-messenger/messages-list/messages-list.component.html +0 -18
- package/projects/ngx/src/lib/components/rtsee-messenger/messages-list/messages-list.component.ts +0 -91
- package/projects/ngx/src/lib/components/rtsee-messenger/messenger/messenger.component.html +0 -31
- package/projects/ngx/src/lib/components/rtsee-messenger/messenger/messenger.component.ts +0 -45
- package/projects/ngx/src/lib/components/rtsee-messenger/messenger-header/messenger-header.component.html +0 -57
- package/projects/ngx/src/lib/components/rtsee-messenger/messenger-header/messenger-header.component.ts +0 -30
- package/projects/ngx/src/lib/components/rtsee-messenger/profile/profile.component.html +0 -20
- package/projects/ngx/src/lib/components/rtsee-messenger/profile/profile.component.ts +0 -25
- package/projects/ngx/src/lib/components/rtsee-peer/rtsee-peer.component.html +0 -28
- package/projects/ngx/src/lib/components/rtsee-peer/rtsee-peer.component.ts +0 -43
- package/projects/ngx/src/lib/components/rtsee-peers-list/rtsee-peers-list.component.html +0 -1
- package/projects/ngx/src/lib/components/rtsee-peers-list/rtsee-peers-list.component.scss +0 -0
- package/projects/ngx/src/lib/components/rtsee-peers-list/rtsee-peers-list.component.ts +0 -9
- package/projects/ngx/src/lib/components/rtsee-presentation/presentation/presentation.component.html +0 -25
- package/projects/ngx/src/lib/components/rtsee-presentation/presentation/presentation.component.ts +0 -24
- package/projects/ngx/src/lib/components/rtsee-presentation/presentation-header/presentation-header.component.html +0 -14
- package/projects/ngx/src/lib/components/rtsee-presentation/presentation-header/presentation-header.component.ts +0 -15
- package/projects/ngx/src/lib/components/rtsee-presentation/slide/slide.component.html +0 -33
- package/projects/ngx/src/lib/components/rtsee-presentation/slide/slide.component.ts +0 -26
- package/projects/ngx/src/lib/components/rtsee-presentation/story-player/story-player.component.html +0 -10
- package/projects/ngx/src/lib/components/rtsee-presentation/story-player/story-player.component.ts +0 -22
- package/projects/ngx/src/lib/components/rtsee-presentation/story-thumbnail/story-thumbnail.component.html +0 -15
- package/projects/ngx/src/lib/components/rtsee-presentation/story-thumbnail/story-thumbnail.component.scss +0 -0
- package/projects/ngx/src/lib/components/rtsee-presentation/story-thumbnail/story-thumbnail.component.ts +0 -19
- package/projects/ngx/src/lib/components/rtsee-settings/rtsee-settings.component.html +0 -44
- package/projects/ngx/src/lib/components/rtsee-settings/rtsee-settings.component.scss +0 -30
- package/projects/ngx/src/lib/components/rtsee-settings/rtsee-settings.component.ts +0 -57
- package/projects/ngx/src/lib/components/rtsee-soundbar/rtsee-soundbar.component.html +0 -19
- package/projects/ngx/src/lib/components/rtsee-soundbar/rtsee-soundbar.component.scss +0 -56
- package/projects/ngx/src/lib/components/rtsee-soundbar/rtsee-soundbar.component.ts +0 -66
- package/projects/ngx/src/lib/directives/shave.directive.ts +0 -15
- package/projects/ngx/src/lib/directives/widget.directive.ts +0 -9
- package/projects/ngx/src/lib/ngx.module.ts +0 -127
- package/projects/ngx/src/lib/ngx.service.spec.ts +0 -16
- package/projects/ngx/src/lib/ngx.service.ts +0 -11
- package/projects/ngx/src/lib/services/default-images.service.ts +0 -8
- package/projects/ngx/src/lib/services/events-widgets.service.ts +0 -19
- package/projects/ngx/src/lib/services/message-widgets.service.ts +0 -26
- package/projects/ngx/src/lib/services/time-format-helper.service.ts +0 -111
- package/projects/ngx/src/public-api.ts +0 -16
- package/projects/ngx/tsconfig.lib.json +0 -14
- package/projects/ngx/tsconfig.lib.prod.json +0 -10
- package/projects/ngx/tsconfig.spec.json +0 -10
- package/projects/ngx/yarn.lock +0 -8
- package/scss-bundle.config.json +0 -6
- package/setup-jest.ts +0 -1
- package/tsconfig.eslint.json +0 -4
- package/tsconfig.json +0 -35
- package/tsconfig.spec.json +0 -8
- /package/{projects → dist}/ngx/README.md +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/auth/auth-container.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/auth/index.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/auth/variables.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/common-components/preloader.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/common-variables.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/common.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/containers/index.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/containers/nav-item.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/containers/nav.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/containers/shell.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/containers/variables.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/events-manager/client-thumbnail.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/events-manager/event-thumbnail.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/events-manager/events-dashboard-session.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/events-manager/events-dashboard.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/events-manager/events-manager.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/events-manager/index.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/events-manager.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/forms/common.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/forms/index.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/forms/variables.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/general.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/messenger/call-widget.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/messenger/chat-input.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/messenger/chat-thumbnail.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/messenger/chat.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/messenger/chats-list.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/messenger/index.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/messenger/message-time-and-status.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/messenger/message.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/messenger/messages-list.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/messenger/messenger-header.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/messenger/messenger-search.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/messenger/messenger.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/messenger/variables.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/presentation/index.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/presentation/slide.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/presentation/story-player.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/presentation/story-thumbnail.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/presentation/variables.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/styles.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/video-chat/index.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/video-chat/video-chat.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/video-chat/video-peer.scss +0 -0
- /package/{projects → dist}/ngx/src/lib/theme/video-chat.scss +0 -0
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<div class="rtsee-messenger-search">
|
|
2
|
-
<input type="text"
|
|
3
|
-
[formControl]="queryControl"
|
|
4
|
-
class="rtsee-messenger-search-input"
|
|
5
|
-
placeholder="Search"/>
|
|
6
|
-
</div>
|
|
7
|
-
|
|
8
|
-
<div class="rtsee-messenger-search-results">
|
|
9
|
-
<rtsee-preloader [diameter]="50"
|
|
10
|
-
*ngIf="search.searchInProgress"
|
|
11
|
-
></rtsee-preloader>
|
|
12
|
-
<p>Chats</p>
|
|
13
|
-
<div class="rtsee-messenger-search-results-chats">
|
|
14
|
-
<div *ngFor="let chat of search.results.chats"
|
|
15
|
-
class="rtsee-messenger-search-results-chat-wrapper">
|
|
16
|
-
<p>{{chat.name}}</p>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
<p>Messages</p>
|
|
20
|
-
<div class="rtsee-messenger-search-results-messages">
|
|
21
|
-
<div *ngFor="let message of search.results.messages" class="rtsee-messenger-search-results-message-wrapper">
|
|
22
|
-
<p>{{message.chatName || message.senderName }}</p>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { debounceTime } from 'rxjs/operators';
|
|
3
|
-
import {FormControl, ReactiveFormsModule} from '@angular/forms';
|
|
4
|
-
import { Subscription } from 'rxjs';
|
|
5
|
-
import { RTSeeMessengerSearch } from '@rtsee/messenger';
|
|
6
|
-
import {PreloaderComponent} from "../../../../../common/components/preloader/preloader.component";
|
|
7
|
-
import {NgForOf} from "@angular/common";
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'rtsee-search',
|
|
11
|
-
templateUrl: './search.component.html',
|
|
12
|
-
imports: [
|
|
13
|
-
ReactiveFormsModule,
|
|
14
|
-
PreloaderComponent,
|
|
15
|
-
NgForOf
|
|
16
|
-
],
|
|
17
|
-
standalone: true
|
|
18
|
-
})
|
|
19
|
-
export class SearchComponent implements OnInit, OnDestroy {
|
|
20
|
-
queryControl = new FormControl();
|
|
21
|
-
queryCtrlSub?: Subscription;
|
|
22
|
-
|
|
23
|
-
@Input() search!: RTSeeMessengerSearch;
|
|
24
|
-
|
|
25
|
-
ngOnInit(): void {
|
|
26
|
-
this.queryCtrlSub = this.queryControl.valueChanges
|
|
27
|
-
.pipe(debounceTime(200))
|
|
28
|
-
.subscribe((value: string) => this.search.onQueryChange(value));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
ngOnDestroy() {
|
|
32
|
-
if (this.queryCtrlSub) {
|
|
33
|
-
this.queryCtrlSub.unsubscribe();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<div class="rtsee-messenger-main-menu">
|
|
2
|
-
<div class="rtsee-messenger-main-menu-home" *ngIf="state.activePanel === MainMenuPanels.HOME">
|
|
3
|
-
<ul class="rtsee-messenger-controls">
|
|
4
|
-
<li>
|
|
5
|
-
<div class="rtsee-messenger-control-item" (click)="onNewGroupClicked()">
|
|
6
|
-
<div class="rtsee-messenger-control-icon">
|
|
7
|
-
<span class="material-icons-outlined">people</span>
|
|
8
|
-
</div>
|
|
9
|
-
<span>New Group</span>
|
|
10
|
-
</div>
|
|
11
|
-
</li>
|
|
12
|
-
<li>
|
|
13
|
-
<div class="rtsee-messenger-control-item" (click)="onNewChannelClicked()">
|
|
14
|
-
<div class="rtsee-messenger-control-icon">
|
|
15
|
-
<span class="material-icons-outlined">campaign</span>
|
|
16
|
-
</div>
|
|
17
|
-
<span>New Channel</span>
|
|
18
|
-
</div>
|
|
19
|
-
</li>
|
|
20
|
-
</ul>
|
|
21
|
-
<rtsee-search [search]="search" ></rtsee-search>
|
|
22
|
-
</div>
|
|
23
|
-
|
|
24
|
-
<rtsee-manage-chat *ngIf="state.activePanel === MainMenuPanels.MANAGE_CHAT"
|
|
25
|
-
[messenger]="messenger"
|
|
26
|
-
[menuState]="state"
|
|
27
|
-
></rtsee-manage-chat>
|
|
28
|
-
<rtsee-contacts-multiselect [search]="search"
|
|
29
|
-
[menuState]="state"
|
|
30
|
-
*ngIf="state.activePanel === MainMenuPanels.CONTACTS_SELECT"
|
|
31
|
-
></rtsee-contacts-multiselect>
|
|
32
|
-
</div>
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { RTSeeMessenger, RTSeeMessengerSearch } from '@rtsee/messenger';
|
|
3
|
-
import {
|
|
4
|
-
DEFAULT_MAIN_MENU_STATE,
|
|
5
|
-
IMainMenuState,
|
|
6
|
-
MainMenuPanels,
|
|
7
|
-
} from './components/models/MainMenuState';
|
|
8
|
-
import {NgIf} from "@angular/common";
|
|
9
|
-
import {SearchComponent} from "./components/search/search.component";
|
|
10
|
-
import {ManageChatComponent} from "./components/manage-chat/manage-chat.component";
|
|
11
|
-
import {ContactsMultiselectComponent} from "./components/contacts-multiselect/contacts-multiselect.component";
|
|
12
|
-
|
|
13
|
-
@Component({
|
|
14
|
-
selector: 'rtsee-main-menu',
|
|
15
|
-
templateUrl: './main-menu.component.html',
|
|
16
|
-
imports: [
|
|
17
|
-
NgIf,
|
|
18
|
-
SearchComponent,
|
|
19
|
-
ManageChatComponent,
|
|
20
|
-
ContactsMultiselectComponent
|
|
21
|
-
],
|
|
22
|
-
standalone: true
|
|
23
|
-
})
|
|
24
|
-
export class MainMenuComponent {
|
|
25
|
-
@Input() search!: RTSeeMessengerSearch;
|
|
26
|
-
@Input() messenger!: RTSeeMessenger;
|
|
27
|
-
|
|
28
|
-
readonly MainMenuPanels = MainMenuPanels;
|
|
29
|
-
|
|
30
|
-
state: IMainMenuState = {
|
|
31
|
-
activePanel: DEFAULT_MAIN_MENU_STATE,
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
onNewGroupClicked() {
|
|
35
|
-
this.state.activePanel = MainMenuPanels.CONTACTS_SELECT;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
onNewChannelClicked() {
|
|
39
|
-
this.state.activePanel = MainMenuPanels.MANAGE_CHAT;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<div class="rtsee-messenger-message-time-and-status">
|
|
2
|
-
<span class="rtsee-messenger-message-status" *ngIf="!hideStatus" [ngClass]="{'showing-status-inside-chat': inChat }">
|
|
3
|
-
<span *ngIf="message.status === 'pending'"><rtsee-preloader [diameter]="5"></rtsee-preloader></span>
|
|
4
|
-
<span *ngIf="message.status === 'sent'" class="material-icons-outlined rtsee-message-sent-status">check</span>
|
|
5
|
-
<span *ngIf="message.status === 'delivered'" class="material-icons-outlined rtsee-message-delivered-status">check</span>
|
|
6
|
-
<span *ngIf="message.status === 'seen'" class="material-icons-outlined rtsee-message-seen-status">done_all</span>
|
|
7
|
-
</span>
|
|
8
|
-
<span class="rtsee-messenger-message-time">{{timeFormatService.formatTimeOrDate(message.createdAt)}}</span>
|
|
9
|
-
</div>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { RTSeeMessage } from '@rtsee/messenger';
|
|
3
|
-
import { IMessageThumbnail } from '@rtsee/common';
|
|
4
|
-
import { TimeFormatHelperService } from '../../../../../services/time-format-helper.service';
|
|
5
|
-
import {NgClass, NgIf} from "@angular/common";
|
|
6
|
-
import {PreloaderComponent} from "../../../../../common/components/preloader/preloader.component";
|
|
7
|
-
|
|
8
|
-
@Component({
|
|
9
|
-
selector: 'rtsee-message-time-and-status',
|
|
10
|
-
templateUrl: './message-time-and-status.component.html',
|
|
11
|
-
imports: [
|
|
12
|
-
NgIf,
|
|
13
|
-
NgClass,
|
|
14
|
-
PreloaderComponent
|
|
15
|
-
],
|
|
16
|
-
standalone: true
|
|
17
|
-
})
|
|
18
|
-
export class MessageTimeAndStatusComponent {
|
|
19
|
-
@Input() message!: RTSeeMessage | IMessageThumbnail;
|
|
20
|
-
@Input() hideStatus?: boolean;
|
|
21
|
-
@Input() inChat?: boolean;
|
|
22
|
-
constructor(public timeFormatService: TimeFormatHelperService) {}
|
|
23
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<div class="rtsee-messenger-message-container" #rtsMessageContainer
|
|
2
|
-
[ngClass]="{'rtsee-message-from-me': message.from.id === messenger.clientId}"
|
|
3
|
-
>
|
|
4
|
-
<div class="rtsee-messenger-message">
|
|
5
|
-
<ng-template *ngIf="message.widget" widgetHost></ng-template>
|
|
6
|
-
<p *ngIf="!message.widget"
|
|
7
|
-
class="rtsee-messenger-message-text"
|
|
8
|
-
>{{ message.text }}</p>
|
|
9
|
-
<div class="rtsee-messenger-message-info" #rtsMessageInfo>
|
|
10
|
-
<rtsee-message-time-and-status [message]="message"
|
|
11
|
-
[inChat]="true"
|
|
12
|
-
[hideStatus]="message.from.id !== messenger.clientId"
|
|
13
|
-
></rtsee-message-time-and-status>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
<div class="message-tail"></div>
|
|
17
|
-
</div>
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AfterViewInit,
|
|
3
|
-
Component,
|
|
4
|
-
ComponentFactoryResolver,
|
|
5
|
-
ComponentRef,
|
|
6
|
-
Input,
|
|
7
|
-
ViewChild,
|
|
8
|
-
} from '@angular/core';
|
|
9
|
-
import {
|
|
10
|
-
RTSeeChat,
|
|
11
|
-
RTSeeChatMember,
|
|
12
|
-
RTSeeMessage,
|
|
13
|
-
RTSeeMessenger,
|
|
14
|
-
} from '@rtsee/messenger';
|
|
15
|
-
import { MessageWidgetsService } from '../../../services/message-widgets.service';
|
|
16
|
-
import { WidgetDirective } from '../../../directives/widget.directive';
|
|
17
|
-
import { TimeFormatHelperService } from '../../../services/time-format-helper.service';
|
|
18
|
-
import {NgClass, NgIf} from "@angular/common";
|
|
19
|
-
import {MessageTimeAndStatusComponent} from "./components/message-time-and-status/message-time-and-status.component";
|
|
20
|
-
|
|
21
|
-
@Component({
|
|
22
|
-
selector: 'rtsee-message',
|
|
23
|
-
templateUrl: './message.component.html',
|
|
24
|
-
imports: [
|
|
25
|
-
NgClass,
|
|
26
|
-
NgIf,
|
|
27
|
-
MessageTimeAndStatusComponent
|
|
28
|
-
],
|
|
29
|
-
standalone: true
|
|
30
|
-
})
|
|
31
|
-
export class MessageComponent implements AfterViewInit {
|
|
32
|
-
@Input() chat!: RTSeeChat;
|
|
33
|
-
@Input() message!: RTSeeMessage;
|
|
34
|
-
@Input() member!: RTSeeChatMember<any>;
|
|
35
|
-
@Input() messenger!: RTSeeMessenger;
|
|
36
|
-
@ViewChild(WidgetDirective, { static: false }) widgetHost!: WidgetDirective;
|
|
37
|
-
constructor(
|
|
38
|
-
private widgetsService: MessageWidgetsService,
|
|
39
|
-
private componentFactoryResolver: ComponentFactoryResolver,
|
|
40
|
-
public timeFormatService: TimeFormatHelperService,
|
|
41
|
-
) {}
|
|
42
|
-
|
|
43
|
-
ngAfterViewInit() {
|
|
44
|
-
/* eslint-disable */
|
|
45
|
-
if (this.message.widget) {
|
|
46
|
-
const widget = this.widgetsService.getWidgetComponentByName(
|
|
47
|
-
this.message.widget,
|
|
48
|
-
);
|
|
49
|
-
if (!widget) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
const viewContainerRef = this.widgetHost.viewContainerRef;
|
|
53
|
-
viewContainerRef.clear();
|
|
54
|
-
const componentToShow =
|
|
55
|
-
this.componentFactoryResolver.resolveComponentFactory(widget);
|
|
56
|
-
const componentRef: ComponentRef<typeof widget> =
|
|
57
|
-
viewContainerRef.createComponent(componentToShow);
|
|
58
|
-
componentRef.instance.message = this.message;
|
|
59
|
-
componentRef.instance.messenger = this.messenger;
|
|
60
|
-
componentRef.changeDetectorRef.detectChanges();
|
|
61
|
-
}
|
|
62
|
-
/* eslint-enable */
|
|
63
|
-
}
|
|
64
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<div class="rtsee-call-widget">
|
|
2
|
-
<p *ngIf="callerName && callerName !== 'You'"> {{ callerName }} has started a call</p>
|
|
3
|
-
<p *ngIf="callerName && callerName === 'You'"> You have started a call</p>
|
|
4
|
-
<p *ngIf="!callerName"> The call has started</p>
|
|
5
|
-
<button class="rtsee-join-call-btn"
|
|
6
|
-
[ngClass]="{'rtsee-join-your-call-btn': callerName && callerName === 'You'}"
|
|
7
|
-
(click)="joinCall()">
|
|
8
|
-
Join Call
|
|
9
|
-
</button>
|
|
10
|
-
</div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Component, Input, OnInit } from '@angular/core';
|
|
2
|
-
import { RTSeeMessage, RTSeeMessenger } from '@rtsee/messenger';
|
|
3
|
-
import { IRTSeeCall } from '@rtsee/core';
|
|
4
|
-
import {NgClass, NgIf} from "@angular/common";
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'ngx-call-widget',
|
|
8
|
-
templateUrl: './call-widget.component.html',
|
|
9
|
-
styleUrls: ['./call-widget.component.scss'],
|
|
10
|
-
imports: [
|
|
11
|
-
NgIf,
|
|
12
|
-
NgClass
|
|
13
|
-
],
|
|
14
|
-
standalone: true
|
|
15
|
-
})
|
|
16
|
-
export class CallWidgetComponent implements OnInit {
|
|
17
|
-
@Input() message!: RTSeeMessage<IRTSeeCall>;
|
|
18
|
-
@Input() messenger!: RTSeeMessenger;
|
|
19
|
-
callerName?: string;
|
|
20
|
-
|
|
21
|
-
ngOnInit(): void {
|
|
22
|
-
if (this.messenger.clientId === this.message.data?.callerId) {
|
|
23
|
-
this.callerName = 'You';
|
|
24
|
-
} else {
|
|
25
|
-
this.callerName = this.message.data?.caller?.name;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
joinCall() {
|
|
30
|
-
if (!this.messenger || !this.message.data?.roomId) {
|
|
31
|
-
console.log('No Room Id specified or no messenger!');
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
void this.messenger.joinCall(this.message.data.roomId);
|
|
35
|
-
}
|
|
36
|
-
}
|
package/projects/ngx/src/lib/components/rtsee-messenger/messages-list/messages-list.component.html
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<div class="rtsee-messenger-messages-list"
|
|
2
|
-
#scrollBlock
|
|
3
|
-
infiniteScroll
|
|
4
|
-
[infiniteScrollUpDistance]="2"
|
|
5
|
-
[infiniteScrollDistance]="2"
|
|
6
|
-
[infiniteScrollThrottle]="50"
|
|
7
|
-
[scrollWindow]="false"
|
|
8
|
-
(scrolledUp)="onScrolledToTop()"
|
|
9
|
-
(scroll)="onScroll()"
|
|
10
|
-
>
|
|
11
|
-
@for (message of chat.messages; track message.id; let i = $index) {
|
|
12
|
-
<div [ngClass]="{'rtsee-messenger-message-wrapper-consecutive': message.from === chat.messages[i+1]?.from}"
|
|
13
|
-
class="rtsee-messenger-message-wrapper"
|
|
14
|
-
>
|
|
15
|
-
<rtsee-message [message]="message" [messenger]="messenger" [chat]="chat"></rtsee-message>
|
|
16
|
-
</div>
|
|
17
|
-
}
|
|
18
|
-
</div>
|
package/projects/ngx/src/lib/components/rtsee-messenger/messages-list/messages-list.component.ts
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AfterViewInit,
|
|
3
|
-
Component,
|
|
4
|
-
ElementRef,
|
|
5
|
-
Input,
|
|
6
|
-
OnDestroy,
|
|
7
|
-
OnInit,
|
|
8
|
-
ViewChild,
|
|
9
|
-
} from '@angular/core';
|
|
10
|
-
import {
|
|
11
|
-
RTSeeChat,
|
|
12
|
-
RTSeeMessenger,
|
|
13
|
-
RTSeeMessage,
|
|
14
|
-
RTSeeChatEvents,
|
|
15
|
-
} from '@rtsee/messenger';
|
|
16
|
-
import { TimeFormatHelperService } from '../../../services/time-format-helper.service';
|
|
17
|
-
import {InfiniteScrollDirective} from "ngx-infinite-scroll";
|
|
18
|
-
import {NgClass, NgForOf} from "@angular/common";
|
|
19
|
-
import {MessageComponent} from "../message/message.component";
|
|
20
|
-
|
|
21
|
-
@Component({
|
|
22
|
-
selector: 'rtsee-messages-list',
|
|
23
|
-
templateUrl: './messages-list.component.html',
|
|
24
|
-
imports: [
|
|
25
|
-
InfiniteScrollDirective,
|
|
26
|
-
NgClass,
|
|
27
|
-
NgForOf,
|
|
28
|
-
MessageComponent
|
|
29
|
-
],
|
|
30
|
-
standalone: true
|
|
31
|
-
})
|
|
32
|
-
export class MessagesListComponent implements AfterViewInit, OnDestroy, OnInit {
|
|
33
|
-
bindScrollFunction: () => void;
|
|
34
|
-
|
|
35
|
-
@Input() chat!: RTSeeChat;
|
|
36
|
-
@Input() messenger!: RTSeeMessenger;
|
|
37
|
-
@ViewChild('scrollBlock') scrollContainer!: ElementRef<HTMLDivElement>;
|
|
38
|
-
constructor(private timeFormatService: TimeFormatHelperService) {
|
|
39
|
-
this.bindScrollFunction = this.scrollToBottom.bind(this) as () => void;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
ngOnInit() {
|
|
43
|
-
this.chat.on(RTSeeChatEvents.MESSAGE_ADDED, this.bindScrollFunction);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
ngAfterViewInit() {
|
|
47
|
-
this.scrollToBottom();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
onMessageSent() {
|
|
51
|
-
this.scrollToBottom();
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
ngOnDestroy() {
|
|
55
|
-
this.chat.off(RTSeeChatEvents.MESSAGE_ADDED, this.bindScrollFunction);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
onScrolledToTop() {
|
|
59
|
-
if (this.chat.messagesLoadInProgress) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
this.chat.loadRemoteMessages('back');
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
onScroll() {
|
|
66
|
-
// if (this.scrollContainer.nativeElement.scrollTop < 1) {
|
|
67
|
-
// this.scrollContainer.nativeElement.scrollTop = 1;
|
|
68
|
-
// }
|
|
69
|
-
if (this.chat.messagesLoadInProgress) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
this.chat.loadRemoteMessages('front');
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
scrollToBottom() {
|
|
76
|
-
if (!this.scrollContainer?.nativeElement?.scrollHeight) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
try {
|
|
81
|
-
this.scrollContainer.nativeElement.scrollTop =
|
|
82
|
-
this.scrollContainer.nativeElement.scrollHeight;
|
|
83
|
-
} catch (err) {
|
|
84
|
-
console.log('Failed to Scroll');
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
formatDate(message: RTSeeMessage) {
|
|
89
|
-
return this.timeFormatService.formatDate(message.createdAt);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<div class="rtsee-messenger" [ngClass]="{
|
|
2
|
-
'rtsee-messenger-main-menu-opened': messenger.mainMenuOpened,
|
|
3
|
-
'rtsee-messenger-header-expanded': isHeaderExpanded,
|
|
4
|
-
'rtsee-messenger-folded': messenger.folded
|
|
5
|
-
}">
|
|
6
|
-
<div class="rtsee-messenger-header-container">
|
|
7
|
-
<rtsee-messenger-header [messenger]="messenger"
|
|
8
|
-
(expandToggled)="onHeaderExpandToggled($event)"
|
|
9
|
-
></rtsee-messenger-header>
|
|
10
|
-
</div>
|
|
11
|
-
<div class="rtsee-messenger-body-container"
|
|
12
|
-
infiniteScroll
|
|
13
|
-
[infiniteScrollDistance]="2"
|
|
14
|
-
[infiniteScrollThrottle]="50"
|
|
15
|
-
[scrollWindow]="false"
|
|
16
|
-
(scrolled)="onScroll()"
|
|
17
|
-
>
|
|
18
|
-
<rtsee-chats-list *ngIf="!messenger.openedChat" [chats]="messenger.chats" [messenger]="messenger"></rtsee-chats-list>
|
|
19
|
-
<rtsee-chat *ngIf="messenger.openedChat" [messenger]="messenger" [chat]="messenger.openedChat"></rtsee-chat>
|
|
20
|
-
<rtsee-preloader [diameter]="50" *ngIf="messenger.loadingChatsInProgress" ></rtsee-preloader>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="rtsee-messenger-main-menu-container">
|
|
23
|
-
<rtsee-main-menu
|
|
24
|
-
*ngIf="messenger.mainMenuOpened"
|
|
25
|
-
[search]="messenger.search"
|
|
26
|
-
[messenger]="messenger"></rtsee-main-menu>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="rtsee-messenger-overlay" (click)="messenger.openMainMenu(false)"></div>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { RTSeeMessenger } from '@rtsee/messenger';
|
|
3
|
-
import {MessengerHeaderComponent} from "../messenger-header/messenger-header.component";
|
|
4
|
-
import {InfiniteScrollDirective} from "ngx-infinite-scroll";
|
|
5
|
-
import {NgClass, NgIf} from "@angular/common";
|
|
6
|
-
import {ChatsListComponent} from "../chats-list/chats-list.component";
|
|
7
|
-
import {ChatComponent} from "../chat/chat.component";
|
|
8
|
-
import {PreloaderComponent} from "../../../common/components/preloader/preloader.component";
|
|
9
|
-
import {MainMenuComponent} from "../main-menu/main-menu.component";
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: 'rtsee-messenger',
|
|
13
|
-
templateUrl: './messenger.component.html',
|
|
14
|
-
imports: [
|
|
15
|
-
MessengerHeaderComponent,
|
|
16
|
-
InfiniteScrollDirective,
|
|
17
|
-
NgClass,
|
|
18
|
-
ChatsListComponent,
|
|
19
|
-
ChatComponent,
|
|
20
|
-
PreloaderComponent,
|
|
21
|
-
MainMenuComponent,
|
|
22
|
-
NgIf
|
|
23
|
-
],
|
|
24
|
-
standalone: true
|
|
25
|
-
})
|
|
26
|
-
export class MessengerComponent {
|
|
27
|
-
isHeaderExpanded: boolean;
|
|
28
|
-
|
|
29
|
-
@Input() messenger!: RTSeeMessenger;
|
|
30
|
-
constructor() {
|
|
31
|
-
this.isHeaderExpanded = false;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
onScroll() {
|
|
35
|
-
this.messenger.loadChats();
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// onGeneralScroll($event) {
|
|
39
|
-
// // $event.stopPropagation();
|
|
40
|
-
// }
|
|
41
|
-
|
|
42
|
-
onHeaderExpandToggled(value: boolean) {
|
|
43
|
-
this.isHeaderExpanded = value;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
<div class="rtsee-messenger-header"
|
|
2
|
-
[ngClass]="{
|
|
3
|
-
'rtsee-messenger-header-chat-opened': messenger.openedChat,
|
|
4
|
-
'rtsee-chat-header-unread': messenger.openedChat && !messenger.unreadMessagesCount,
|
|
5
|
-
'rtsee-messenger-header-expanded': isExpanded
|
|
6
|
-
}"
|
|
7
|
-
>
|
|
8
|
-
<div class="rtsee-messenger-profile-image-container ">
|
|
9
|
-
<div *ngIf="!messenger.openedChat"
|
|
10
|
-
[style.background-image]="'url(' + messenger.myPeer?.imageUrl || defaultImagesService.PROFILE + ')'"
|
|
11
|
-
class="rtsee-messenger-profile-image">
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
|
|
15
|
-
<button class="rtsee-messenger-close-chat"
|
|
16
|
-
*ngIf="messenger.openedChat"
|
|
17
|
-
(click)="messenger.closeChat()"
|
|
18
|
-
>
|
|
19
|
-
<span class="material-icons-outlined">arrow_back</span>
|
|
20
|
-
<span class="unread-count" *ngIf="messenger.unreadMessagesCount">{{messenger.unreadMessagesCount}}</span>
|
|
21
|
-
</button>
|
|
22
|
-
|
|
23
|
-
<button class="rtsee-messenger-menu-toggle"
|
|
24
|
-
*ngIf="!messenger.openedChat && false"
|
|
25
|
-
(click)="messenger.openMainMenu(true)"
|
|
26
|
-
>
|
|
27
|
-
<span class="material-icons-outlined rtsee-messenger-menu-toggle-icon">menu</span>
|
|
28
|
-
</button>
|
|
29
|
-
<button class="rtsee-messenger-fold-toggle"
|
|
30
|
-
(click)="messenger.changeChatFoldState(!messenger.folded)"
|
|
31
|
-
>
|
|
32
|
-
<span *ngIf="!messenger.folded" class="material-icons-outlined rtsee-messenger-menu-toggle-icon">expand_more</span>
|
|
33
|
-
<span *ngIf="messenger.folded" class="material-icons-outlined rtsee-messenger-menu-toggle-icon">expand_less</span>
|
|
34
|
-
</button>
|
|
35
|
-
|
|
36
|
-
<div *ngIf="messenger.openedChat"
|
|
37
|
-
[ngClass]="{'rtsee-messenger-header-opened-chat-info-expanded': isExpanded}"
|
|
38
|
-
class="rtsee-messenger-header-opened-chat-info">
|
|
39
|
-
<div class="rtsee-messenger-profile-header-placeholder">
|
|
40
|
-
<p *ngIf="messenger.openedChat"
|
|
41
|
-
class="rtsee-messenger-header-chat-title"
|
|
42
|
-
>{{ messenger.openedChat.name }}</p>
|
|
43
|
-
<div class="rtsee-messenger-profile-image-container" (click)="toggleExpand()">
|
|
44
|
-
<div class="rtsee-messenger-profile-image"
|
|
45
|
-
[style.background-image]="'url(' + messenger.openedChat.imageUrl || defaultImagesService.PROFILE + ')'"
|
|
46
|
-
></div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
<div class="rtsee-messenger-profile-data-container">
|
|
50
|
-
<rtsee-profile *ngIf="isExpanded" [messenger]="messenger"></rtsee-profile>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
|
|
54
|
-
<p *ngIf="!messenger.openedChat"
|
|
55
|
-
class="rtsee-messenger-header-title"
|
|
56
|
-
>Messaging</p>
|
|
57
|
-
</div>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import { RTSeeMessenger } from '@rtsee/messenger';
|
|
3
|
-
import { DefaultImagesService } from '../../../services/default-images.service';
|
|
4
|
-
import {NgClass, NgIf} from "@angular/common";
|
|
5
|
-
import {ProfileComponent} from "../profile/profile.component";
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
selector: 'rtsee-messenger-header',
|
|
9
|
-
templateUrl: './messenger-header.component.html',
|
|
10
|
-
imports: [
|
|
11
|
-
NgClass,
|
|
12
|
-
NgIf,
|
|
13
|
-
ProfileComponent
|
|
14
|
-
],
|
|
15
|
-
standalone: true
|
|
16
|
-
})
|
|
17
|
-
export class MessengerHeaderComponent {
|
|
18
|
-
@Output() expandToggled = new EventEmitter();
|
|
19
|
-
@Input() isExpanded?: boolean;
|
|
20
|
-
@Input() messenger!: RTSeeMessenger;
|
|
21
|
-
constructor(public defaultImagesService: DefaultImagesService) {
|
|
22
|
-
this.isExpanded = false;
|
|
23
|
-
this.expandToggled.emit(this.isExpanded);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
toggleExpand() {
|
|
27
|
-
this.isExpanded = !this.isExpanded;
|
|
28
|
-
this.expandToggled.emit(this.isExpanded);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<div class="rtsee-messenger-profile">
|
|
2
|
-
<ul class="rtsee-messenger-profile-controls">
|
|
3
|
-
<li class="rtsee-messenger-profile-control">
|
|
4
|
-
<div class="rtsee-messenger-control-item" (click)="call()">
|
|
5
|
-
<div class="rtsee-messenger-control-icon">
|
|
6
|
-
<span class="material-icons-outlined">call</span>
|
|
7
|
-
</div>
|
|
8
|
-
<span>Call</span>
|
|
9
|
-
</div>
|
|
10
|
-
</li>
|
|
11
|
-
<li class="rtsee-messenger-profile-control">
|
|
12
|
-
<div class="rtsee-messenger-control-item" (click)="videoCall()">
|
|
13
|
-
<div class="rtsee-messenger-control-icon">
|
|
14
|
-
<span class="material-icons-outlined">videocam</span>
|
|
15
|
-
</div>
|
|
16
|
-
<span>Video</span>
|
|
17
|
-
</div>
|
|
18
|
-
</li>
|
|
19
|
-
</ul>
|
|
20
|
-
</div>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { RTSeeMessenger } from '@rtsee/messenger';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'rtsee-profile',
|
|
6
|
-
templateUrl: './profile.component.html',
|
|
7
|
-
standalone: true
|
|
8
|
-
})
|
|
9
|
-
export class ProfileComponent {
|
|
10
|
-
@Input() messenger!: RTSeeMessenger;
|
|
11
|
-
|
|
12
|
-
call() {
|
|
13
|
-
if (!this.messenger.openedChat) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
void this.messenger.initializeVideoCall(this.messenger.openedChat);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
videoCall() {
|
|
20
|
-
if (!this.messenger.openedChat) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
void this.messenger.initializeVideoCall(this.messenger.openedChat);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<div class="rtsee-peer" [ngClass]="{
|
|
2
|
-
'rtsee-peer-video-disabled': !peer.remoteVideoStream || !peer.camera
|
|
3
|
-
}">
|
|
4
|
-
<div class="rtsee-peer-content">
|
|
5
|
-
<div class="rtsee-peer-photo" *ngIf="!peer.camera">
|
|
6
|
-
<div class="rtsee-peer-photo-wrapper">
|
|
7
|
-
<div *ngIf="peer.imageUrl"
|
|
8
|
-
[style.background-image]="'url(' + peer.imageUrl + ')'"
|
|
9
|
-
class="rtsee-peer-photo-image"
|
|
10
|
-
></div>
|
|
11
|
-
<img *ngIf="!peer.imageUrl" [src]="" alt="peer_photo" class="rtsee-peer-photo-image">
|
|
12
|
-
</div>
|
|
13
|
-
<div class="rtsee-peer-info">
|
|
14
|
-
<p class="rtsee-peer-name" *ngIf="peer.name">{{peer.name}}</p>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
<video #videoOutput
|
|
18
|
-
class="rtsee-peer-video"
|
|
19
|
-
[autoplay]="true"
|
|
20
|
-
[srcObject]="peer.remoteVideoStream"
|
|
21
|
-
playsinline="true"
|
|
22
|
-
>
|
|
23
|
-
</video>
|
|
24
|
-
<div class="rtsee-peer-soundbar">
|
|
25
|
-
<ngx-rtsee-soundbar [peer]="peer"></ngx-rtsee-soundbar>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|