dependencies Legend  Declarations  Module  Bootstrap  Providers  Exports cluster_ThemeModule cluster_ThemeModule_declarations cluster_ThemeModule_exports cluster_ThemeModule_providers CapitalizePipe CapitalizePipe ThemeModule ThemeModule CapitalizePipe->ThemeModule FooterComponent FooterComponent FooterComponent->ThemeModule HeaderComponent HeaderComponent HeaderComponent->ThemeModule LayoutDirectionSwitcherComponent LayoutDirectionSwitcherComponent LayoutDirectionSwitcherComponent->ThemeModule NgxAuthBlockComponent NgxAuthBlockComponent NgxAuthBlockComponent->ThemeModule NgxAuthComponent NgxAuthComponent NgxAuthComponent->ThemeModule NgxLoginComponent NgxLoginComponent NgxLoginComponent->ThemeModule OneColumnLayoutComponent OneColumnLayoutComponent OneColumnLayoutComponent->ThemeModule PluralPipe PluralPipe PluralPipe->ThemeModule RoundPipe RoundPipe RoundPipe->ThemeModule SampleLayoutComponent SampleLayoutComponent SampleLayoutComponent->ThemeModule SearchInputComponent SearchInputComponent SearchInputComponent->ThemeModule SwitcherComponent SwitcherComponent SwitcherComponent->ThemeModule ThemeSettingsComponent ThemeSettingsComponent ThemeSettingsComponent->ThemeModule ThemeSwitcherComponent ThemeSwitcherComponent ThemeSwitcherComponent->ThemeModule ThemeSwitcherListComponent ThemeSwitcherListComponent ThemeSwitcherListComponent->ThemeModule ThreeColumnsLayoutComponent ThreeColumnsLayoutComponent ThreeColumnsLayoutComponent->ThemeModule TimingPipe TimingPipe TimingPipe->ThemeModule TinyMCEComponent TinyMCEComponent TinyMCEComponent->ThemeModule TwoColumnsLayoutComponent TwoColumnsLayoutComponent TwoColumnsLayoutComponent->ThemeModule CapitalizePipe CapitalizePipe ThemeModule->CapitalizePipe FooterComponent FooterComponent ThemeModule->FooterComponent HeaderComponent HeaderComponent ThemeModule->HeaderComponent LayoutDirectionSwitcherComponent LayoutDirectionSwitcherComponent ThemeModule->LayoutDirectionSwitcherComponent NgxAuthBlockComponent NgxAuthBlockComponent ThemeModule->NgxAuthBlockComponent NgxAuthComponent NgxAuthComponent ThemeModule->NgxAuthComponent NgxLoginComponent NgxLoginComponent ThemeModule->NgxLoginComponent OneColumnLayoutComponent OneColumnLayoutComponent ThemeModule->OneColumnLayoutComponent PluralPipe PluralPipe ThemeModule->PluralPipe RoundPipe RoundPipe ThemeModule->RoundPipe SampleLayoutComponent SampleLayoutComponent ThemeModule->SampleLayoutComponent SearchInputComponent SearchInputComponent ThemeModule->SearchInputComponent SwitcherComponent SwitcherComponent ThemeModule->SwitcherComponent ThemeSettingsComponent ThemeSettingsComponent ThemeModule->ThemeSettingsComponent ThemeSwitcherComponent ThemeSwitcherComponent ThemeModule->ThemeSwitcherComponent ThemeSwitcherListComponent ThemeSwitcherListComponent ThemeModule->ThemeSwitcherListComponent ThreeColumnsLayoutComponent ThreeColumnsLayoutComponent ThemeModule->ThreeColumnsLayoutComponent TimingPipe TimingPipe ThemeModule->TimingPipe TinyMCEComponent TinyMCEComponent ThemeModule->TinyMCEComponent TwoColumnsLayoutComponent TwoColumnsLayoutComponent ThemeModule->TwoColumnsLayoutComponent AuthService AuthService AuthService->ThemeModule
import {ModuleWithProviders, NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
import {RouterModule} from '@angular/router';

// make sure the path is correct for your setup

import {
  NbActionsModule,
  NbCardModule,
  NbLayoutModule,
  NbMenuModule,
  NbRouteTabsetModule,
  NbSearchModule,
  NbSidebarModule,
  NbTabsetModule,
  NbThemeModule,
  NbUserModule,
  NbCheckboxModule,
  NbPopoverModule,
  NbContextMenuModule, NbMenuService, NbLayoutDimensions,
} from '@nebular/theme';

import {NbSecurityModule} from '@nebular/security';

import {
  FooterComponent,
  HeaderComponent,
  SearchInputComponent,
  ThemeSettingsComponent,
  SwitcherComponent,
  LayoutDirectionSwitcherComponent,
  ThemeSwitcherComponent,
  TinyMCEComponent,
} from './components';
import {CapitalizePipe, PluralPipe, RoundPipe, TimingPipe} from './pipes';
import {
  OneColumnLayoutComponent,
  SampleLayoutComponent,
  ThreeColumnsLayoutComponent,
  TwoColumnsLayoutComponent,
} from './layouts';
import {DEFAULT_THEME} from './styles/theme.default';
import {COSMIC_THEME} from './styles/theme.cosmic';
import {TranslateModule} from "@ngx-translate/core";
import {NgxAuthBlockComponent, NgxAuthComponent, NgxLoginComponent} from "./components/auth";
import {AuthService} from "./components/auth/auth.service";
import {CORPORATE_THEME} from "./styles/theme.corporate";
import {ThemeSwitcherListComponent} from "./components/theme-switcher/themes-switcher-list/themes-switcher-list.component";
import {NbLayoutDirection} from "@nebular/theme/services/direction.service";

const BASE_MODULES = [CommonModule, FormsModule, ReactiveFormsModule, RouterModule, TranslateModule];

const NB_MODULES = [
  NbCardModule,
  NbLayoutModule,
  NbTabsetModule,
  NbRouteTabsetModule,
  NbMenuModule,
  NbUserModule,
  NbActionsModule,
  NbSearchModule,
  NbSidebarModule,
  NbCheckboxModule,
  NbPopoverModule,
  NbContextMenuModule,
  NgbModule,
  NbSecurityModule, // *nbIsGranted directive
];

const COMPONENTS = [
  SwitcherComponent,
  LayoutDirectionSwitcherComponent,
  ThemeSwitcherComponent,
  ThemeSwitcherListComponent,
  HeaderComponent,
  FooterComponent,
  SearchInputComponent,
  ThemeSettingsComponent,
  TinyMCEComponent,
  OneColumnLayoutComponent,
  SampleLayoutComponent,
  ThreeColumnsLayoutComponent,
  TwoColumnsLayoutComponent,


  NgxAuthComponent,
  NgxAuthBlockComponent,
  NgxLoginComponent,

];

const PIPES = [
  CapitalizePipe,
  PluralPipe,
  RoundPipe,
  TimingPipe,
];

const ENTRY_COMPONENTS = [
  ThemeSwitcherListComponent,
];

const NB_THEME_PROVIDERS = [
  ...NbThemeModule.forRoot(
    {
      name: 'corporate',
    },
    [DEFAULT_THEME, COSMIC_THEME, CORPORATE_THEME],
    null, NbLayoutDirection.RTL
  ).providers,
  ...NbSidebarModule.forRoot().providers,
  ...NbMenuModule.forRoot().providers,
];

@NgModule({
  imports: [...BASE_MODULES, ...NB_MODULES],
  exports: [...BASE_MODULES, ...NB_MODULES, ...COMPONENTS, ...PIPES],
  declarations: [...COMPONENTS, ...PIPES],
  providers: [
    AuthService,
    NbMenuService
  ],
  entryComponents: [...ENTRY_COMPONENTS],
})
export class ThemeModule {
  static forRoot(): ModuleWithProviders {
    return <ModuleWithProviders>{
      ngModule: ThemeModule,
      providers: [...NB_THEME_PROVIDERS, NbMenuService],
    };
  }
}

results matching ""

    No results matching ""