Skip to content
Snippets Groups Projects
app-common.module.ts 5.8 KiB
Newer Older
  • Learn to ignore specific revisions
  • import { CommonModule }                         from '@angular/common';
    
    import { NgModule }                             from '@angular/core';
    
    /*CORE IMPORTS*/
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    import { BrowserModule, HammerGestureConfig, HAMMER_GESTURE_CONFIG }   from '@angular/platform-browser';
    
    import { BrowserAnimationsModule }              from '@angular/platform-browser/animations';
    import { FormsModule, ReactiveFormsModule }     from '@angular/forms';
    import { HttpClientModule }                     from '@angular/common/http';
    import { RouterModule }                         from '@angular/router';
    
    import { DragDropModule }                         from '@angular/cdk/drag-drop';
    
    /*PLUGINS IMPORTS*/
    
    import { SortPipe }                             from '../plugins/sorting.pipe';
    
    import { PdfViewerModule }                      from 'ng2-pdf-viewer';
    //import { SimplePdfViewerModule }                from 'simple-pdf-viewer';
    
    import { NgStringPipesModule }                  from 'ngx-pipes';
    
    import { LatinisePipe }                         from 'ngx-pipes';
    
    import { CookieService }                        from 'ngx-cookie-service';
    
    import { TimeAgoPipe }                          from '../plugins/timeAgo.pipe';
    
    import { TimeLimitPipe }                        from '../plugins/timeLimit.pipe';
    import { FilterListPipe }                       from '../plugins/filterList.pipe';
    
    /*FRONT IMPORTS*/
    import { AppMaterialModule }                    from './app-material.module';
    
    
    import { SmdFabSpeedDialComponent,SmdFabSpeedDialTrigger, SmdFabSpeedDialActions, }             from '../plugins/fab-speed-dial';
    
    
    /*MENU COMPONENT*/
    
    import { HeaderRightComponent }                 from './header/header-right.component';
    import { HeaderLeftComponent }                  from './header/header-left.component';
    import { HeaderPanelComponent }                  from './header/header-panel.component';
    
    import { MainHeaderComponent }                  from './menu/main-header.component';
    
    import { MenuComponent }                        from './menu/menu.component';
    import { MenuNavComponent }                     from './menu/menu-nav.component';
    
    import { MenuShortcutComponent, IndexingGroupModalComponent }                from './menu/menu-shortcut.component';
    
    Florian Azizian's avatar
    Florian Azizian committed
    /*SEARCH*/
    import { SearchHomeComponent }                        from './search/search-home.component';
    
    /*SEARCH*/
    import { BasketHomeComponent }                        from './basket/basket-home.component';
    
    import { IndexingFormComponent }                        from './indexation/indexing-form/indexing-form.component';
    import { FieldListComponent }                        from './indexation/field-list/field-list.component';
    
    
    
    /*MODAL*/
    import { AlertComponent }                        from '../plugins/modal/alert.component';
    
    import { ConfirmComponent }                        from '../plugins/modal/confirm.component';
    
    /*PLUGIN COMPONENT*/
    import { PluginAutocomplete }                        from '../plugins/autocomplete/autocomplete.component';
    
    import { PluginSelectSearchComponent }                        from '../plugins/select-search/select-search.component';
    
    import { FolderInputComponent }                        from '../app/folder/indexing/folder-input.component';
    import { TagInputComponent }                        from '../app/tag/indexing/tag-input.component';
    
    import { DiffusionsListComponent }             from './diffusions/diffusions-list.component';
    
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    export class MyHammerConfig extends HammerGestureConfig {
        overrides = <any> {
            'pinch': { enable: false },
            'rotate': { enable: false }
        }
    }
    
    @NgModule({
        imports: [
            CommonModule,
            BrowserModule,
            BrowserAnimationsModule,
            FormsModule,
    
            ReactiveFormsModule,
    
            HttpClientModule,
            RouterModule,
    
            NgStringPipesModule,
    
            AppMaterialModule,
    
            DragDropModule
    
        ],
        declarations: [
    
            MenuComponent,
            MenuNavComponent,
    
            MenuShortcutComponent,
    
            HeaderRightComponent,
            HeaderLeftComponent,
            HeaderPanelComponent,
    
    Florian Azizian's avatar
    Florian Azizian committed
            SearchHomeComponent,
            BasketHomeComponent,
    
            TimeAgoPipe,
            TimeLimitPipe,
            FilterListPipe,
    
            IndexingGroupModalComponent,
            SmdFabSpeedDialComponent,
            SmdFabSpeedDialTrigger,
            SmdFabSpeedDialActions,
    
            AlertComponent,
    
            ConfirmComponent,
    
            FieldListComponent,
    
            PluginSelectSearchComponent,
    
            FolderInputComponent,
    
            TagInputComponent,
            DiffusionsListComponent
    
        ],
        exports: [
            CommonModule,
    
            MenuComponent,
            MenuNavComponent,
    
            HeaderRightComponent,
            HeaderLeftComponent,
            HeaderPanelComponent,
    
    Florian Azizian's avatar
    Florian Azizian committed
            SearchHomeComponent,
            BasketHomeComponent,
    
            BrowserModule,
            BrowserAnimationsModule,
            FormsModule,
            ReactiveFormsModule,
            HttpClientModule,
            RouterModule,
    
            AppMaterialModule,
    
            TimeAgoPipe,
            TimeLimitPipe,
    
            NgStringPipesModule,
    
            SmdFabSpeedDialComponent,
            SmdFabSpeedDialTrigger,
            SmdFabSpeedDialActions,
    
            DragDropModule,
    
            FieldListComponent,
    
            PluginSelectSearchComponent,
    
            FolderInputComponent,
    
            TagInputComponent,
            DiffusionsListComponent
    
        providers: [
    
            LatinisePipe,
    
    Alex ORLUC's avatar
    Alex ORLUC committed
            CookieService,
            {
                provide: HAMMER_GESTURE_CONFIG,
                useClass: MyHammerConfig
            }
    
            IndexingGroupModalComponent,
    
            AlertComponent,
            ConfirmComponent
    
    })
    export class SharedModule { }