From 264db1facc317b1d5e170cb2374b0aa71bf936b4 Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Thu, 11 Dec 2025 15:00:42 +0100 Subject: [PATCH] feat: convert components, directives, and pipes to standalone - Updated LangSelectorComponent, ParticipantNameInputComponent, ThemeSelectorComponent, VideoDevicesComponent, StreamComponent, ToolbarMediaButtonsComponent, ToolbarPanelButtonsComponent, ToolbarComponent, VideoPosterComponent, VideoconferenceComponent to be standalone components. - Converted directives (ActivitiesPanelRecordingActivityDirective, AdminDashboardRecordingsListDirective, etc.) to standalone. - Updated pipes (LinkifyPipe, RemoteParticipantTracksPipe, DurationFromSecondsPipe, etc.) to standalone. - Adjusted imports in OpenViduComponentsAngularUiModule to include necessary modules for standalone components. --- .../admin-dashboard.component.ts | 14 ++++++- .../admin-login/admin-login.component.ts | 8 +++- .../audio-wave/audio-wave.component.ts | 2 +- .../dialogs/delete-recording.component.ts | 6 ++- .../components/dialogs/dialog.component.ts | 5 ++- .../dialogs/pro-feature-dialog.component.ts | 6 ++- .../dialogs/recording-dialog.component.ts | 8 +++- .../landscape-warning.component.ts | 6 ++- .../lib/components/layout/layout.component.ts | 6 ++- .../media-element/media-element.component.ts | 5 ++- .../activities-panel.component.ts | 8 +++- .../broadcasting-activity.component.ts | 7 +++- .../recording-activity.component.ts | 12 +++++- .../background-effects-panel.component.ts | 6 ++- .../panel/chat-panel/chat-panel.component.ts | 8 +++- .../lib/components/panel/panel.component.ts | 4 +- .../participant-panel-item.component.ts | 7 +++- .../participants-panel.component.ts | 7 +++- .../settings-panel.component.ts | 20 +++++++++- .../components/pre-join/pre-join.component.ts | 24 +++++++++++- .../components/session/session.component.ts | 7 +++- .../audio-devices/audio-devices.component.ts | 6 ++- .../lang-selector/lang-selector.component.ts | 5 ++- .../participant-name-input.component.ts | 7 +++- .../theme-selector.component.ts | 5 ++- .../video-devices/video-devices.component.ts | 6 ++- .../lib/components/stream/stream.component.ts | 7 +++- .../toolbar-media-buttons.component.ts | 6 ++- .../toolbar-panel-buttons.component.ts | 6 ++- .../components/toolbar/toolbar.component.ts | 14 ++++++- .../video-poster/video-poster.component.ts | 5 ++- .../videoconference.component.ts | 38 ++++++++++++++++++- .../api/activities-panel.directive.ts | 4 +- .../src/lib/directives/api/admin.directive.ts | 8 ++-- .../directives/api/api.directive.module.ts | 2 +- .../lib/directives/api/internals.directive.ts | 26 ++++++------- .../api/participant-panel-item.directive.ts | 2 +- .../lib/directives/api/stream.directive.ts | 6 +-- .../lib/directives/api/toolbar.directive.ts | 30 +++++++-------- .../api/videoconference.directive.ts | 24 ++++++------ .../template/internals.directive.ts | 14 +++---- ...idu-components-angular.directive.module.ts | 2 +- .../openvidu-components-angular.directive.ts | 26 ++++++------- .../openvidu-components-angular-ui.module.ts | 18 ++++----- .../src/lib/pipes/linkify.pipe.ts | 2 +- .../src/lib/pipes/participant.pipe.ts | 4 +- .../src/lib/pipes/recording.pipe.ts | 6 +-- .../src/lib/pipes/translate.pipe.ts | 2 +- 48 files changed, 334 insertions(+), 123 deletions(-) diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/admin/admin-dashboard/admin-dashboard.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/admin/admin-dashboard/admin-dashboard.component.ts index b6ffb8f83..9675bb0a6 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/admin/admin-dashboard/admin-dashboard.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/admin/admin-dashboard/admin-dashboard.component.ts @@ -1,4 +1,9 @@ import { Component, OnInit, Output, EventEmitter, OnDestroy } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { AppMaterialModule } from '../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../pipes/translate.pipe'; +import { SearchByStringPropertyPipe } from '../../pipes/recording.pipe'; import { Subscription } from 'rxjs'; import { RecordingDeleteRequestedEvent, RecordingInfo, RecordingStatus } from '../../models/recording.model'; import { ActionService } from '../../services/action/action.service'; @@ -9,7 +14,14 @@ import { RecordingService } from '../../services/recording/recording.service'; selector: 'ov-admin-dashboard', templateUrl: './admin-dashboard.component.html', styleUrls: ['./admin-dashboard.component.scss'], - standalone: false + standalone: true, + imports: [ + CommonModule, + FormsModule, + AppMaterialModule, + TranslatePipe, + SearchByStringPropertyPipe + ] }) export class AdminDashboardComponent implements OnInit, OnDestroy { /** diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/admin/admin-login/admin-login.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/admin/admin-login/admin-login.component.ts index 8918a061f..29b4efa46 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/admin/admin-login/admin-login.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/admin/admin-login/admin-login.component.ts @@ -1,5 +1,8 @@ import { Component, EventEmitter, OnInit, Output } from '@angular/core'; -import { Validators, FormGroup, FormBuilder } from '@angular/forms'; +import { CommonModule } from '@angular/common'; +import { ReactiveFormsModule, Validators, FormGroup, FormBuilder } from '@angular/forms'; +import { AppMaterialModule } from '../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../pipes/translate.pipe'; import { Subscription } from 'rxjs'; import { ActionService } from '../../services/action/action.service'; import { OpenViduComponentsConfigService } from '../../services/config/directive-config.service'; @@ -8,7 +11,8 @@ import { OpenViduComponentsConfigService } from '../../services/config/directive selector: 'ov-admin-login', templateUrl: './admin-login.component.html', styleUrls: ['./admin-login.component.scss'], - standalone: false + standalone: true, + imports: [CommonModule, ReactiveFormsModule, AppMaterialModule, TranslatePipe] }) export class AdminLoginComponent implements OnInit { /** diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/audio-wave/audio-wave.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/audio-wave/audio-wave.component.ts index 9e47bd9ea..130225eef 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/audio-wave/audio-wave.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/audio-wave/audio-wave.component.ts @@ -13,6 +13,6 @@ import { Component } from '@angular/core'; `, styleUrls: ['./audio-wave.component.scss'], - standalone: false + standalone: true }) export class AudioWaveComponent {} diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/dialogs/delete-recording.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/dialogs/delete-recording.component.ts index 0ffc23630..5d45544d7 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/dialogs/delete-recording.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/dialogs/delete-recording.component.ts @@ -1,4 +1,7 @@ import { Component } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AppMaterialModule } from '../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../pipes/translate.pipe'; import { MatDialogRef } from '@angular/material/dialog'; /** @@ -37,7 +40,8 @@ import { MatDialogRef } from '@angular/material/dialog'; } ` ], - standalone: false + standalone: true, + imports: [CommonModule, AppMaterialModule, TranslatePipe] }) export class DeleteDialogComponent { constructor(public dialogRef: MatDialogRef) {} diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/dialogs/dialog.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/dialogs/dialog.component.ts index d22dc73bf..cbe16250e 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/dialogs/dialog.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/dialogs/dialog.component.ts @@ -1,4 +1,7 @@ import { Component, Inject } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AppMaterialModule } from '../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../pipes/translate.pipe'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { DialogData } from '../../models/dialog.model'; @@ -34,7 +37,7 @@ import { DialogData } from '../../models/dialog.model'; } ` ], - standalone: false + standalone: true }) export class DialogTemplateComponent { constructor( diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/dialogs/pro-feature-dialog.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/dialogs/pro-feature-dialog.component.ts index 64f2d7242..4b60e128a 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/dialogs/pro-feature-dialog.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/dialogs/pro-feature-dialog.component.ts @@ -1,4 +1,7 @@ import { Component, Inject } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AppMaterialModule } from '../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../pipes/translate.pipe'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { DialogData } from '../../models/dialog.model'; @@ -20,7 +23,8 @@ import { DialogData } from '../../models/dialog.model'; `, - standalone: false + standalone: true, + imports: [CommonModule, AppMaterialModule, TranslatePipe] }) export class ProFeatureDialogTemplateComponent { constructor(public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: DialogData) {} diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/dialogs/recording-dialog.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/dialogs/recording-dialog.component.ts index 92f896199..b52324ed7 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/dialogs/recording-dialog.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/dialogs/recording-dialog.component.ts @@ -1,4 +1,7 @@ import { Component, ElementRef, Inject, ViewChild } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AppMaterialModule } from '../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../pipes/translate.pipe'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { RecordingDialogData } from '../../models/dialog.model'; @@ -39,10 +42,11 @@ import { RecordingDialogData } from '../../models/dialog.model'; } ` ], - standalone: false + standalone: true, + imports: [CommonModule, AppMaterialModule, TranslatePipe] }) export class RecordingDialogComponent { - @ViewChild('videoElement', { static: true }) videoElement: ElementRef; + @ViewChild('videoElement', { static: true }) videoElement!: ElementRef; src: string; diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/landscape-warning/landscape-warning.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/landscape-warning/landscape-warning.component.ts index de64e7676..ed727c065 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/landscape-warning/landscape-warning.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/landscape-warning/landscape-warning.component.ts @@ -1,5 +1,8 @@ import { animate, style, transition, trigger } from '@angular/animations'; import { Component } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AppMaterialModule } from '../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../pipes/translate.pipe'; /** * Component to display a landscape orientation warning on mobile devices. @@ -9,7 +12,8 @@ import { Component } from '@angular/core'; selector: 'ov-landscape-warning', templateUrl: './landscape-warning.component.html', styleUrl: './landscape-warning.component.scss', - standalone: false, + standalone: true, + imports: [CommonModule, AppMaterialModule, TranslatePipe], animations: [ trigger('inOutAnimation', [ transition(':enter', [style({ opacity: 0 }), animate('200ms', style({ opacity: 1 }))]), diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/layout/layout.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/layout/layout.component.ts index 097dd9db8..660b842b5 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/layout/layout.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/layout/layout.component.ts @@ -13,6 +13,9 @@ import { ViewChild, ViewContainerRef } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { DragDropModule } from '@angular/cdk/drag-drop'; +import { RemoteParticipantTracksPipe } from '../../pipes/participant.pipe'; import { combineLatest, map, Subject, takeUntil } from 'rxjs'; import { StreamDirective } from '../../directives/template/openvidu-components-angular.directive'; import { ParticipantTrackPublication, ParticipantModel } from '../../models/participant.model'; @@ -34,7 +37,8 @@ import { LayoutTemplateConfiguration, TemplateManagerService } from '../../servi templateUrl: './layout.component.html', styleUrls: ['./layout.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + standalone: true, + imports: [CommonModule, DragDropModule, RemoteParticipantTracksPipe] }) export class LayoutComponent implements OnInit, OnDestroy, AfterViewInit { /** diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/media-element/media-element.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/media-element/media-element.component.ts index 10a160854..6890b66d1 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/media-element/media-element.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/media-element/media-element.component.ts @@ -1,5 +1,7 @@ import { animate, style, transition, trigger } from '@angular/animations'; import { AfterViewInit, Component, ElementRef, Input, OnDestroy, ViewChild } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { VideoPosterComponent } from '../video-poster/video-poster.component'; import { Track } from 'livekit-client'; /** @@ -25,7 +27,8 @@ import { Track } from 'livekit-client'; transition(':leave', [style({ opacity: 1 }), animate('200ms', style({ opacity: 0 }))]) ]) ], - standalone: false + standalone: true, + imports: [CommonModule, VideoPosterComponent] }) export class MediaElementComponent implements AfterViewInit, OnDestroy { _track: Track; diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/activities-panel/activities-panel.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/activities-panel/activities-panel.component.ts index 28dc71be0..0979be8c6 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/activities-panel/activities-panel.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/activities-panel/activities-panel.component.ts @@ -1,4 +1,9 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, OnInit, Output } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AppMaterialModule } from '../../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../../pipes/translate.pipe'; +import { RecordingActivityComponent } from './recording-activity/recording-activity.component'; +import { BroadcastingActivityComponent } from './broadcasting-activity/broadcasting-activity.component'; import { Subject, takeUntil } from 'rxjs'; import { PanelStatusInfo, PanelType } from '../../../models/panel.model'; import { OpenViduComponentsConfigService } from '../../../services/config/directive-config.service'; @@ -21,7 +26,8 @@ import { BroadcastingStartRequestedEvent, BroadcastingStopRequestedEvent } from templateUrl: './activities-panel.component.html', styleUrls: ['../panel.component.scss', './activities-panel.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + standalone: true, + imports: [CommonModule, AppMaterialModule, TranslatePipe, RecordingActivityComponent, BroadcastingActivityComponent] }) export class ActivitiesPanelComponent implements OnInit { /** diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/activities-panel/broadcasting-activity/broadcasting-activity.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/activities-panel/broadcasting-activity/broadcasting-activity.component.ts index ed2f581df..6c71bf2da 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/activities-panel/broadcasting-activity/broadcasting-activity.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/activities-panel/broadcasting-activity/broadcasting-activity.component.ts @@ -1,4 +1,8 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { AppMaterialModule } from '../../../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../../../pipes/translate.pipe'; import { Subject, takeUntil } from 'rxjs'; import { BroadcastingStartRequestedEvent, @@ -19,7 +23,8 @@ import { OpenViduService } from '../../../../services/openvidu/openvidu.service' templateUrl: './broadcasting-activity.component.html', styleUrls: ['./broadcasting-activity.component.scss', '../activities-panel.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + standalone: true, + imports: [CommonModule, FormsModule, AppMaterialModule, TranslatePipe] }) // TODO: Allow to add more than one broadcast url diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/activities-panel/recording-activity/recording-activity.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/activities-panel/recording-activity/recording-activity.component.ts index 9096df7dc..4c4c2fb17 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/activities-panel/recording-activity/recording-activity.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/activities-panel/recording-activity/recording-activity.component.ts @@ -1,4 +1,8 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, OnDestroy, Output } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { AppMaterialModule } from '../../../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../../../pipes/translate.pipe'; import { Subject, takeUntil } from 'rxjs'; import { RecordingDeleteRequestedEvent, @@ -26,7 +30,13 @@ import { OpenViduComponentsConfigService } from '../../../../services/config/dir templateUrl: './recording-activity.component.html', styleUrls: ['./recording-activity.component.scss', '../activities-panel.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + standalone: true, + imports: [ + CommonModule, + FormsModule, + AppMaterialModule, + TranslatePipe + ] }) // TODO: Allow to add more than one recording type diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/background-effects-panel/background-effects-panel.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/background-effects-panel/background-effects-panel.component.ts index 1861f8b10..b8b6fc8ab 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/background-effects-panel/background-effects-panel.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/background-effects-panel/background-effects-panel.component.ts @@ -1,4 +1,7 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AppMaterialModule } from '../../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../../pipes/translate.pipe'; import { Subscription } from 'rxjs'; import { BackgroundEffect, EffectType } from '../../../models/background-effect.model'; import { PanelType } from '../../../models/panel.model'; @@ -13,7 +16,8 @@ import { VirtualBackgroundService } from '../../../services/virtual-background/v templateUrl: './background-effects-panel.component.html', styleUrls: ['../panel.component.scss', './background-effects-panel.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + standalone: true, + imports: [CommonModule, AppMaterialModule, TranslatePipe] }) export class BackgroundEffectsPanelComponent implements OnInit { @Input() mode: 'prejoin' | 'meeting' = 'meeting'; diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/chat-panel/chat-panel.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/chat-panel/chat-panel.component.ts index 494d944c7..48e3bf38a 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/chat-panel/chat-panel.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/chat-panel/chat-panel.component.ts @@ -1,4 +1,9 @@ import { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit, ViewChild } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { AppMaterialModule } from '../../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../../pipes/translate.pipe'; +import { LinkifyPipe } from '../../../pipes/linkify.pipe'; import { Subject, takeUntil } from 'rxjs'; import { ChatMessage } from '../../../models/chat.model'; import { PanelType } from '../../../models/panel.model'; @@ -14,7 +19,8 @@ import { PanelService } from '../../../services/panel/panel.service'; templateUrl: './chat-panel.component.html', styleUrls: ['../panel.component.scss', './chat-panel.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + standalone: true, + imports: [CommonModule, FormsModule, AppMaterialModule, TranslatePipe, LinkifyPipe] }) export class ChatPanelComponent implements OnInit, AfterViewInit { /** diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/panel.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/panel.component.ts index 8462165d4..4c6019eb6 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/panel.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/panel.component.ts @@ -8,6 +8,7 @@ import { Output, TemplateRef } from '@angular/core'; +import { CommonModule } from '@angular/common'; import { skip, Subject, takeUntil } from 'rxjs'; import { ActivitiesPanelDirective, @@ -39,7 +40,8 @@ import { TemplateManagerService, PanelTemplateConfiguration } from '../../servic templateUrl: './panel.component.html', styleUrls: ['./panel.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + standalone: true, + imports: [CommonModule] }) export class PanelComponent implements OnInit { /** diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/participants-panel/participant-panel-item/participant-panel-item.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/participants-panel/participant-panel-item/participant-panel-item.component.ts index 7576c2766..bf6b7f7a6 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/participants-panel/participant-panel-item/participant-panel-item.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/participants-panel/participant-panel-item/participant-panel-item.component.ts @@ -1,4 +1,8 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, Input, OnDestroy, OnInit, TemplateRef } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AppMaterialModule } from '../../../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../../../pipes/translate.pipe'; +import { TrackPublishedTypesPipe } from '../../../../pipes/participant.pipe'; import { Subscription } from 'rxjs'; import { ParticipantPanelItemElementsDirective } from '../../../../directives/template/openvidu-components-angular.directive'; import { ParticipantPanelParticipantBadgeDirective } from '../../../../directives/template/internals.directive'; @@ -17,7 +21,8 @@ import { TemplateManagerService, ParticipantPanelItemTemplateConfiguration } fro templateUrl: './participant-panel-item.component.html', styleUrls: ['./participant-panel-item.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + standalone: true, + imports: [CommonModule, AppMaterialModule, TranslatePipe, TrackPublishedTypesPipe] }) export class ParticipantPanelItemComponent implements OnInit, OnDestroy { /** diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/participants-panel/participants-panel/participants-panel.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/participants-panel/participants-panel/participants-panel.component.ts index 7b9e00ff6..cfbc5cb68 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/participants-panel/participants-panel/participants-panel.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/participants-panel/participants-panel/participants-panel.component.ts @@ -9,6 +9,10 @@ import { TemplateRef, ViewChild } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AppMaterialModule } from '../../../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../../../pipes/translate.pipe'; +import { ParticipantPanelItemComponent } from '../participant-panel-item/participant-panel-item.component'; // import { ParticipantModel } from '../../../../models/participant.model'; import { ParticipantService } from '../../../../services/participant/participant.service'; import { PanelService } from '../../../../services/panel/panel.service'; @@ -28,7 +32,8 @@ import { OpenViduComponentsConfigService } from '../../../../services/config/dir templateUrl: './participants-panel.component.html', styleUrls: ['../../panel.component.scss', './participants-panel.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + standalone: true, + imports: [CommonModule, AppMaterialModule, TranslatePipe, ParticipantPanelItemComponent] }) export class ParticipantsPanelComponent implements OnInit, OnDestroy, AfterViewInit { /** diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/settings-panel/settings-panel.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/settings-panel/settings-panel.component.ts index 788c6e129..e20226f2a 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/settings-panel/settings-panel.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/settings-panel/settings-panel.component.ts @@ -1,4 +1,12 @@ import { Component, ContentChild, EventEmitter, OnInit, Output, TemplateRef } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AppMaterialModule } from '../../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../../pipes/translate.pipe'; +import { ParticipantNameInputComponent } from '../../settings/participant-name-input/participant-name-input.component'; +import { LangSelectorComponent } from '../../settings/lang-selector/lang-selector.component'; +import { ThemeSelectorComponent } from '../../settings/theme-selector/theme-selector.component'; +import { VideoDevicesComponent } from '../../settings/video-devices/video-devices.component'; +import { AudioDevicesComponent } from '../../settings/audio-devices/audio-devices.component'; import { Subject, takeUntil } from 'rxjs'; import { PanelStatusInfo, PanelSettingsOptions, PanelType } from '../../../models/panel.model'; import { OpenViduComponentsConfigService } from '../../../services/config/directive-config.service'; @@ -16,7 +24,17 @@ import { SettingsPanelGeneralAdditionalElementsDirective } from '../../../direct selector: 'ov-settings-panel', templateUrl: './settings-panel.component.html', styleUrls: ['../panel.component.scss', './settings-panel.component.scss'], - standalone: false + standalone: true, + imports: [ + CommonModule, + AppMaterialModule, + TranslatePipe, + ParticipantNameInputComponent, + LangSelectorComponent, + ThemeSelectorComponent, + VideoDevicesComponent, + AudioDevicesComponent + ] }) export class SettingsPanelComponent implements OnInit { @Output() onVideoEnabledChanged = new EventEmitter(); diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/pre-join/pre-join.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/pre-join/pre-join.component.ts index 4bc2ff638..954cdf367 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/pre-join/pre-join.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/pre-join/pre-join.component.ts @@ -9,6 +9,16 @@ import { OnInit, Output } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AppMaterialModule } from '../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../pipes/translate.pipe'; +import { LandscapeWarningComponent } from '../landscape-warning/landscape-warning.component'; +import { LangSelectorComponent } from '../settings/lang-selector/lang-selector.component'; +import { MediaElementComponent } from '../media-element/media-element.component'; +import { VideoDevicesComponent } from '../settings/video-devices/video-devices.component'; +import { AudioDevicesComponent } from '../settings/audio-devices/audio-devices.component'; +import { ParticipantNameInputComponent } from '../settings/participant-name-input/participant-name-input.component'; +import { BackgroundEffectsPanelComponent } from '../panel/background-effects-panel/background-effects-panel.component'; import { animate, state, style, transition, trigger } from '@angular/animations'; import { filter, Subject, take, takeUntil } from 'rxjs'; import { ILogger } from '../../models/logger.model'; @@ -30,7 +40,19 @@ import { LangOption } from '../../models/lang.model'; templateUrl: './pre-join.component.html', styleUrls: ['./pre-join.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, + standalone: true, + imports: [ + CommonModule, + AppMaterialModule, + TranslatePipe, + LandscapeWarningComponent, + LangSelectorComponent, + MediaElementComponent, + VideoDevicesComponent, + AudioDevicesComponent, + ParticipantNameInputComponent, + BackgroundEffectsPanelComponent + ], animations: [ trigger('containerResize', [ state( diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/session/session.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/session/session.component.ts index d27d105db..6debb7c45 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/session/session.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/session/session.component.ts @@ -12,6 +12,10 @@ import { TemplateRef, ViewChild } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AppMaterialModule } from '../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../pipes/translate.pipe'; +import { LandscapeWarningComponent } from '../landscape-warning/landscape-warning.component'; import { ILogger } from '../../models/logger.model'; import { animate, style, transition, trigger } from '@angular/animations'; @@ -68,7 +72,8 @@ import { safeJsonParse } from '../../utils/utils'; ]) ], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + standalone: true, + imports: [CommonModule, AppMaterialModule, TranslatePipe, LandscapeWarningComponent] }) export class SessionComponent implements OnInit, OnDestroy { @ContentChild('toolbar', { read: TemplateRef }) toolbarTemplate: TemplateRef | undefined; diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/settings/audio-devices/audio-devices.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/settings/audio-devices/audio-devices.component.ts index 4673c49dc..4f2af8046 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/settings/audio-devices/audio-devices.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/settings/audio-devices/audio-devices.component.ts @@ -1,4 +1,7 @@ import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AppMaterialModule } from '../../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../../pipes/translate.pipe'; import { Subscription } from 'rxjs'; import { CustomDevice } from '../../../models/device.model'; import { DeviceService } from '../../../services/device/device.service'; @@ -15,7 +18,8 @@ import { ILogger } from '../../../models/logger.model'; selector: 'ov-audio-devices-select', templateUrl: './audio-devices.component.html', styleUrls: ['./audio-devices.component.scss'], - standalone: false + standalone: true, + imports: [CommonModule, AppMaterialModule, TranslatePipe] }) export class AudioDevicesComponent implements OnInit, OnDestroy { @Input() compact: boolean = false; diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/settings/lang-selector/lang-selector.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/settings/lang-selector/lang-selector.component.ts index 132e9c464..a00a857d1 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/settings/lang-selector/lang-selector.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/settings/lang-selector/lang-selector.component.ts @@ -1,4 +1,6 @@ import { Component, OnInit, Output, ViewChild, EventEmitter, Input, OnDestroy } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AppMaterialModule } from '../../../openvidu-components-angular.material.module'; import { MatMenuTrigger } from '@angular/material/menu'; import { MatSelect } from '@angular/material/select'; import { StorageService } from '../../../services/storage/storage.service'; @@ -13,7 +15,8 @@ import { Subscription } from 'rxjs'; selector: 'ov-lang-selector', templateUrl: './lang-selector.component.html', styleUrls: ['./lang-selector.component.scss'], - standalone: false + standalone: true, + imports: [CommonModule, AppMaterialModule] }) export class LangSelectorComponent implements OnInit, OnDestroy { /** diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/settings/participant-name-input/participant-name-input.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/settings/participant-name-input/participant-name-input.component.ts index ab3e60b24..9531b5b9d 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/settings/participant-name-input/participant-name-input.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/settings/participant-name-input/participant-name-input.component.ts @@ -1,4 +1,8 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { AppMaterialModule } from '../../../openvidu-components-angular.material.module'; +import { TranslatePipe } from '../../../pipes/translate.pipe'; import { Subscription } from 'rxjs'; import { ParticipantService } from '../../../services/participant/participant.service'; import { StorageService } from '../../../services/storage/storage.service'; @@ -10,7 +14,8 @@ import { StorageService } from '../../../services/storage/storage.service'; selector: 'ov-participant-name-input', templateUrl: './participant-name-input.component.html', styleUrls: ['./participant-name-input.component.scss'], - standalone: false + standalone: true, + imports: [CommonModule, FormsModule, AppMaterialModule, TranslatePipe] }) export class ParticipantNameInputComponent implements OnInit { name: string; diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/settings/theme-selector/theme-selector.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/settings/theme-selector/theme-selector.component.ts index 1d0d60131..0a04dd41b 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/settings/theme-selector/theme-selector.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/settings/theme-selector/theme-selector.component.ts @@ -1,10 +1,13 @@ import { Component } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AppMaterialModule } from '../../../openvidu-components-angular.material.module'; import { OpenViduThemeService } from '../../../services/theme/theme.service'; import { OpenViduThemeMode } from '../../../models/theme.model'; @Component({ selector: 'ov-theme-selector', - standalone: false, + standalone: true, + imports: [CommonModule, AppMaterialModule], template: `