2017-01-27 03:20:51 -05:00
|
|
|
import { BrowserModule } from '@angular/platform-browser';
|
2018-02-06 12:59:34 -05:00
|
|
|
import { ErrorHandler, NgModule } from '@angular/core';
|
2017-08-11 13:16:55 -04:00
|
|
|
import { HttpClientModule } from '@angular/common/http';
|
2017-03-26 16:32:29 -04:00
|
|
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
2017-02-15 14:22:37 -05:00
|
|
|
|
2017-03-01 09:30:25 -05:00
|
|
|
import { Location, LocationStrategy, PathLocationStrategy } from '@angular/common';
|
|
|
|
|
2017-07-31 08:45:18 -04:00
|
|
|
import { MatButtonModule } from '@angular/material/button';
|
|
|
|
import { MatIconModule, MatIconRegistry } from '@angular/material/icon';
|
|
|
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
|
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
|
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
2017-10-13 16:35:53 -04:00
|
|
|
|
2017-07-31 08:45:18 -04:00
|
|
|
import { ROUTES } from '@angular/router';
|
2017-10-13 16:35:53 -04:00
|
|
|
|
2017-03-30 02:55:03 -04:00
|
|
|
|
2018-02-06 12:55:43 -05:00
|
|
|
import { AnnouncementBarComponent } from 'app/embedded/announcement-bar/announcement-bar.component';
|
2017-03-01 09:30:25 -05:00
|
|
|
import { AppComponent } from 'app/app.component';
|
2017-07-31 08:45:18 -04:00
|
|
|
import { EMBEDDED_COMPONENTS, EmbeddedComponentsMap } from 'app/embed-components/embed-components.service';
|
2017-10-29 10:01:00 -04:00
|
|
|
import { CustomIconRegistry, SVG_ICONS } from 'app/shared/custom-icon-registry';
|
2017-07-26 13:36:00 -04:00
|
|
|
import { Deployment } from 'app/shared/deployment.service';
|
2017-03-01 09:30:25 -05:00
|
|
|
import { DocViewerComponent } from 'app/layout/doc-viewer/doc-viewer.component';
|
2017-04-02 00:45:32 -04:00
|
|
|
import { DtComponent } from 'app/layout/doc-viewer/dt.component';
|
2017-07-26 13:36:00 -04:00
|
|
|
import { ModeBannerComponent } from 'app/layout/mode-banner/mode-banner.component';
|
2017-03-13 21:08:23 -04:00
|
|
|
import { GaService } from 'app/shared/ga.service';
|
2017-03-01 09:30:25 -05:00
|
|
|
import { Logger } from 'app/shared/logger.service';
|
|
|
|
import { LocationService } from 'app/shared/location.service';
|
|
|
|
import { NavigationService } from 'app/navigation/navigation.service';
|
|
|
|
import { DocumentService } from 'app/documents/document.service';
|
2017-03-01 18:05:16 -05:00
|
|
|
import { SearchService } from 'app/search/search.service';
|
2017-03-01 09:30:25 -05:00
|
|
|
import { TopMenuComponent } from 'app/layout/top-menu/top-menu.component';
|
2017-03-29 17:13:40 -04:00
|
|
|
import { FooterComponent } from 'app/layout/footer/footer.component';
|
2017-03-01 09:30:25 -05:00
|
|
|
import { NavMenuComponent } from 'app/layout/nav-menu/nav-menu.component';
|
|
|
|
import { NavItemComponent } from 'app/layout/nav-item/nav-item.component';
|
2018-02-06 12:59:34 -05:00
|
|
|
import { ReportingErrorHandler } from 'app/shared/reporting-error-handler';
|
2017-05-08 19:42:38 -04:00
|
|
|
import { ScrollService } from 'app/shared/scroll.service';
|
2017-05-08 07:33:56 -04:00
|
|
|
import { ScrollSpyService } from 'app/shared/scroll-spy.service';
|
2017-07-31 08:45:18 -04:00
|
|
|
import { SearchBoxComponent } from 'app/search/search-box/search-box.component';
|
2018-01-11 08:56:01 -05:00
|
|
|
import { NotificationComponent } from 'app/layout/notification/notification.component';
|
2017-07-31 08:45:18 -04:00
|
|
|
import { TocComponent } from 'app/layout/toc/toc.component';
|
2017-04-27 18:32:46 -04:00
|
|
|
import { TocService } from 'app/shared/toc.service';
|
2018-01-11 08:56:01 -05:00
|
|
|
import { CurrentDateToken, currentDateProvider } from 'app/shared/current-date';
|
2017-10-19 08:58:27 -04:00
|
|
|
import { WindowToken, windowProvider } from 'app/shared/window';
|
2017-04-21 04:42:33 -04:00
|
|
|
|
2017-07-31 08:45:18 -04:00
|
|
|
import { EmbedComponentsModule } from 'app/embed-components/embed-components.module';
|
2017-06-06 05:09:46 -04:00
|
|
|
import { SharedModule } from 'app/shared/shared.module';
|
2017-07-31 08:45:18 -04:00
|
|
|
import { SwUpdatesModule } from 'app/sw-updates/sw-updates.module';
|
|
|
|
|
|
|
|
|
|
|
|
// The path to the `EmbeddedModule`.
|
|
|
|
const embeddedModulePath = 'app/embedded/embedded.module#EmbeddedModule';
|
2017-06-06 05:09:46 -04:00
|
|
|
|
2017-10-13 16:08:32 -04:00
|
|
|
// These are the hardcoded inline svg sources to be used by the `<mat-icon>` component
|
2017-04-21 04:42:33 -04:00
|
|
|
export const svgIconProviders = [
|
|
|
|
{
|
|
|
|
provide: SVG_ICONS,
|
|
|
|
useValue: {
|
|
|
|
name: 'keyboard_arrow_right',
|
|
|
|
svgSource: '<svg xmlns="http://www.w3.org/2000/svg" focusable="false" ' +
|
|
|
|
'viewBox="0 0 24 24"><path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/></svg>'
|
|
|
|
},
|
|
|
|
multi: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
provide: SVG_ICONS,
|
|
|
|
useValue: {
|
|
|
|
name: 'menu',
|
|
|
|
svgSource: '<svg xmlns="http://www.w3.org/2000/svg" focusable="false" ' +
|
|
|
|
'viewBox="0 0 24 24"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>'
|
|
|
|
},
|
|
|
|
multi: true
|
2018-01-11 08:56:01 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
provide: SVG_ICONS,
|
|
|
|
useValue: {
|
|
|
|
name: 'insert_comment',
|
|
|
|
svgSource:
|
|
|
|
'<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">' +
|
|
|
|
'<path d="M20 2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"/>' +
|
|
|
|
'<path d="M0 0h24v24H0z" fill="none"/>' +
|
|
|
|
'</svg>'
|
|
|
|
},
|
|
|
|
multi: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
provide: SVG_ICONS,
|
|
|
|
useValue: {
|
|
|
|
name: 'close',
|
|
|
|
svgSource:
|
|
|
|
'<svg fill="#ffffff" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">' +
|
|
|
|
'<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>' +
|
|
|
|
'<path d="M0 0h24v24H0z" fill="none"/>' +
|
|
|
|
'</svg>'
|
|
|
|
},
|
|
|
|
multi: true
|
2017-04-21 04:42:33 -04:00
|
|
|
}
|
|
|
|
];
|
2017-01-27 03:20:51 -05:00
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [
|
|
|
|
BrowserModule,
|
2017-03-26 16:32:29 -04:00
|
|
|
BrowserAnimationsModule,
|
2017-07-31 08:45:18 -04:00
|
|
|
EmbedComponentsModule,
|
|
|
|
HttpClientModule,
|
2017-10-13 16:02:27 -04:00
|
|
|
MatButtonModule,
|
|
|
|
MatIconModule,
|
|
|
|
MatProgressBarModule,
|
|
|
|
MatSidenavModule,
|
|
|
|
MatToolbarModule,
|
2017-06-06 05:09:46 -04:00
|
|
|
SwUpdatesModule,
|
|
|
|
SharedModule
|
2017-01-27 03:20:51 -05:00
|
|
|
],
|
2017-02-03 02:02:23 -05:00
|
|
|
declarations: [
|
2018-02-06 12:55:43 -05:00
|
|
|
AnnouncementBarComponent,
|
2017-02-03 02:02:23 -05:00
|
|
|
AppComponent,
|
|
|
|
DocViewerComponent,
|
2017-04-02 00:45:32 -04:00
|
|
|
DtComponent,
|
2017-03-29 17:13:40 -04:00
|
|
|
FooterComponent,
|
2017-07-26 13:36:00 -04:00
|
|
|
ModeBannerComponent,
|
2017-03-01 09:30:25 -05:00
|
|
|
NavMenuComponent,
|
2017-02-15 14:22:37 -05:00
|
|
|
NavItemComponent,
|
2017-03-13 15:58:31 -04:00
|
|
|
SearchBoxComponent,
|
2018-01-11 08:56:01 -05:00
|
|
|
NotificationComponent,
|
2017-07-31 08:45:18 -04:00
|
|
|
TocComponent,
|
2017-07-26 13:36:00 -04:00
|
|
|
TopMenuComponent,
|
2017-02-03 02:02:23 -05:00
|
|
|
],
|
2017-02-07 15:57:18 -05:00
|
|
|
providers: [
|
2017-07-26 13:36:00 -04:00
|
|
|
Deployment,
|
2017-04-27 18:32:46 -04:00
|
|
|
DocumentService,
|
2018-02-06 12:59:34 -05:00
|
|
|
{ provide: ErrorHandler, useClass: ReportingErrorHandler },
|
2017-03-13 21:08:23 -04:00
|
|
|
GaService,
|
2017-02-07 15:57:18 -05:00
|
|
|
Logger,
|
2017-03-01 09:30:25 -05:00
|
|
|
Location,
|
|
|
|
{ provide: LocationStrategy, useClass: PathLocationStrategy },
|
|
|
|
LocationService,
|
2017-10-29 10:01:00 -04:00
|
|
|
{ provide: MatIconRegistry, useClass: CustomIconRegistry },
|
2017-03-01 09:30:25 -05:00
|
|
|
NavigationService,
|
2017-05-08 19:42:38 -04:00
|
|
|
ScrollService,
|
2017-05-08 07:33:56 -04:00
|
|
|
ScrollSpyService,
|
2017-05-08 19:42:38 -04:00
|
|
|
SearchService,
|
2017-04-27 18:32:46 -04:00
|
|
|
svgIconProviders,
|
2017-10-19 08:58:27 -04:00
|
|
|
TocService,
|
2018-01-11 08:56:01 -05:00
|
|
|
{ provide: CurrentDateToken, useFactory: currentDateProvider },
|
2017-10-19 08:58:27 -04:00
|
|
|
{ provide: WindowToken, useFactory: windowProvider },
|
2017-07-31 08:45:18 -04:00
|
|
|
|
|
|
|
{
|
|
|
|
provide: EMBEDDED_COMPONENTS,
|
|
|
|
useValue: {
|
|
|
|
/* tslint:disable: max-line-length */
|
2018-02-06 12:55:43 -05:00
|
|
|
'aio-announcement-bar': [AnnouncementBarComponent],
|
2017-07-31 08:45:18 -04:00
|
|
|
'aio-toc': [TocComponent],
|
|
|
|
'aio-api-list, aio-contributor-list, aio-file-not-found-search, aio-resource-list, code-example, code-tabs, current-location, live-example': embeddedModulePath,
|
|
|
|
/* tslint:enable: max-line-length */
|
|
|
|
} as EmbeddedComponentsMap,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
// This is currently the only way to get `@angular/cli`
|
|
|
|
// to split `EmbeddedModule` into a separate chunk :(
|
|
|
|
provide: ROUTES,
|
|
|
|
useValue: [{ path: '/embedded', loadChildren: embeddedModulePath }],
|
|
|
|
multi: true,
|
|
|
|
},
|
2017-02-07 15:57:18 -05:00
|
|
|
],
|
2018-02-06 12:55:43 -05:00
|
|
|
entryComponents: [ AnnouncementBarComponent, TocComponent ],
|
2017-07-31 08:45:18 -04:00
|
|
|
bootstrap: [ AppComponent ]
|
2017-01-27 03:20:51 -05:00
|
|
|
})
|
2017-02-07 15:57:18 -05:00
|
|
|
export class AppModule {
|
|
|
|
}
|