# All files / src/lib openvidu-components-library.module.ts

73.33% Statements 11/15
45.45% Branches 10/22
50% Functions 1/2
70% Lines 7/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    1391x
    1x
    1x
    1x
    1x

    1x

    1x

     import { FormsModule, ReactiveFormsModule } from '@angular/forms';
    import { MatBadgeModule } from '@angular/material/badge';
    impoIrt { MatButtonModule } from '@angular/material/button';
    import { MatCardModule } from '@angular/material/card';
    import { MatOptionModule } from '@angular/material/core';
    import { MatDialogModule } from '@angular/material/dialog';
    import { MatFormFieldModule } from '@angular/material/form-field';
    import { MatGridListModule } from '@angular/material/grid-list';
    import { MatIconModule } from '@angular/material/icon';
    import { MatInputModule } from '@angular/material/input';
    import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
    import { MatSnackBarModule } from '@angular/material/snack-bar';
    import { MatSelectModule } from '@angular/material/select';
    import { MatSidenavModule } from '@angular/material/sidenav';
    import { MatSliderModule } from '@angular/material/slider';
    import { MatToolbarModule } from '@angular/material/toolbar';
    import { MatTooltipModule } from '@angular/material/tooltip';
    import { FlexLayoutModule } from '@angular/flex-layout';
    import { OverlayContainer } from '@angular/cdk/overlay';
    import { MatMenuModule } from '@angular/material/menu';

    import { RouterModule } from '@angular/router';
    import { CommonModule } from '@angular/common';
    import { ModuleWithProviders, NgModule } from '@angular/core';
    import { HttpClientModule } from '@angular/common/http';

    import { UserSettingsComponent } from './components/user-settings/user-settings.component';
    import { ToolbarComponent } from './components/toolbar/toolbar.component';
    import { VideoComponent } from './components/video/video.component';
    import { ChatComponent } from './components/chat/chat.component';
    import { RoomComponent } from './components/room/room.component';
    import { LayoutComponent } from './components/layout/layout.component';
    import { ParticipantComponent } from './components/participant/participant.component';
    import { DialogTemplateComponent } from './components/material/dialog.component';
    import { FooterComponent } from './components/footer/footer.component';

    import { LinkifyPipe } from './pipes/linkify.pipe';
    import { TooltipListPipe } from './pipes/tooltip-list.pipe';

    import { LibConfig } from './config/lib.config';
    import { CdkOverlayContainer } from './config/custom-cdk-overlay';
    import { DeviceService } from './services/device/device.service';
    import { LocalUserService } from './services/local-user/local-user.service';
    import { LoggerService } from './services/logger/logger.service';
    import { PlatformService } from './services/platform/platform.service';
    import { StorageService } from './services/storage/storage.service';
    import { TokenService } from './services/token/token.service';
    import { LibraryConfigService } from './services/library-config/library-config.service';
    import { WebrtcService } from './services/webrtc/webrtc.service';
    import { ActionService } from './services/action/action.service';
    import { ChatService } from './services/chat/chat.service';
    import { DocumentService } from './services/document/document.service';
    import { LayoutService } from './services/layout/layout.service';
    import { RemoteUserService } from './services/remote-user/remote-user.service';

    @NgModule({
      declarations: [
        UserSettingsComponent,
        VideoComponent,
        ToolbarComponent,
        ChatComponent,
        RoomComponent,
        LayoutComponent,
        ParticipantComponent,
        DialogTemplateComponent,
        LinkifyPipe,
        TooltipListPipe,
        FooterComponent
      ],
      imports: [
        CommonModule,
        HttpClientModule,
        FormsModule,
    		ReactiveFormsModule,
        RouterModule.forRoot([]),
    		MatButtonModule,
    		MatCardModule,
    		MatToolbarModule,
    		MatIconModule,
    		MatInputModule,
    		MatFormFieldModule,
    		MatDialogModule,
    		MatTooltipModule,
    		MatBadgeModule,
    		MatGridListModule,
    		MatSelectModule,
    		MatOptionModule,
    		MatProgressSpinnerModule,
    		MatSliderModule,
    		MatSidenavModule,
    		MatSnackBarModule,
    		FlexLayoutModule,
    		MatMenuModule
      ],
      providers: [
        ActionService,
        CdkOverlayContainer,
    		{ provide: OverlayContainer, useClass: CdkOverlayContainer },
        ChatService,
        DeviceService,
        DocumentService,
        LayoutService,
        LocalUserService,
        LoggerService,
        PlatformService,
        RemoteUserService,
        StorageService,
        TokenService,
        WebrtcService

      ],
      exports: [
        UserSettingsComponent,
        ToolbarComponent,
        ChatComponent,
        RoomComponent,
        LayoutComponent,
        FooterComponent,
        CommonModule
      ],
      entryComponents: [
        DialogTemplateComponent
      ]
    })

    export class OpenviduComponentsLibraryModule {
      static forRoot(environment): ModuleWithProviders<OpenviduComponentsLibraryModule> {
        console.log('Library config: ', environment);
        const libConfig: LibConfig = { environment };
        return {
          ngModule: OpenviduComponentsLibraryModule,
          providers: [LibraryConfigService , {provide: 'LIB_CONFIG', useValue: libConfig}]
        };
      }

     }