2021-04-13 21:53:58 +02:00
|
|
|
import { Platform } from '@angular/cdk/platform';
|
|
|
|
import { HttpClientModule } from '@angular/common/http';
|
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import {
|
|
|
|
DateAdapter,
|
|
|
|
MAT_DATE_FORMATS,
|
|
|
|
MAT_DATE_LOCALE,
|
|
|
|
MatNativeDateModule
|
|
|
|
} from '@angular/material/core';
|
|
|
|
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
|
|
import { BrowserModule } from '@angular/platform-browser';
|
|
|
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
|
|
import { MaterialCssVarsModule } from 'angular-material-css-vars';
|
|
|
|
import { MarkdownModule } from 'ngx-markdown';
|
|
|
|
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
|
2021-07-17 11:04:43 +02:00
|
|
|
import { NgxStripeModule, STRIPE_PUBLISHABLE_KEY } from 'ngx-stripe';
|
2021-04-13 21:53:58 +02:00
|
|
|
|
2021-06-21 20:03:36 +02:00
|
|
|
import { environment } from '../environments/environment';
|
2021-04-13 21:53:58 +02:00
|
|
|
import { CustomDateAdapter } from './adapter/custom-date-adapter';
|
|
|
|
import { DateFormats } from './adapter/date-formats';
|
|
|
|
import { AppRoutingModule } from './app-routing.module';
|
|
|
|
import { AppComponent } from './app.component';
|
|
|
|
import { GfHeaderModule } from './components/header/header.module';
|
|
|
|
import { authInterceptorProviders } from './core/auth.interceptor';
|
|
|
|
import { httpResponseInterceptorProviders } from './core/http-response.interceptor';
|
2021-05-17 19:55:10 +02:00
|
|
|
import { LanguageService } from './core/language.service';
|
2021-04-13 21:53:58 +02:00
|
|
|
|
2021-07-17 11:04:43 +02:00
|
|
|
export function NgxStripeFactory(): string {
|
|
|
|
return environment.stripePublicKey;
|
|
|
|
}
|
|
|
|
|
2021-04-13 21:53:58 +02:00
|
|
|
@NgModule({
|
|
|
|
declarations: [AppComponent],
|
|
|
|
imports: [
|
|
|
|
AppRoutingModule,
|
|
|
|
BrowserAnimationsModule,
|
|
|
|
BrowserModule,
|
|
|
|
GfHeaderModule,
|
|
|
|
HttpClientModule,
|
|
|
|
MarkdownModule.forRoot(),
|
|
|
|
MaterialCssVarsModule.forRoot({
|
|
|
|
darkThemeClass: 'is-dark-theme',
|
|
|
|
isAutoContrast: true,
|
|
|
|
lightThemeClass: 'is-light-theme'
|
|
|
|
}),
|
|
|
|
MatNativeDateModule,
|
|
|
|
MatSnackBarModule,
|
2021-06-21 20:03:36 +02:00
|
|
|
NgxSkeletonLoaderModule,
|
|
|
|
NgxStripeModule.forRoot(environment.stripePublicKey)
|
2021-04-13 21:53:58 +02:00
|
|
|
],
|
|
|
|
providers: [
|
|
|
|
authInterceptorProviders,
|
|
|
|
httpResponseInterceptorProviders,
|
2021-05-17 19:55:10 +02:00
|
|
|
LanguageService,
|
2021-04-13 21:53:58 +02:00
|
|
|
{
|
|
|
|
provide: DateAdapter,
|
|
|
|
useClass: CustomDateAdapter,
|
2021-05-17 19:55:10 +02:00
|
|
|
deps: [LanguageService, MAT_DATE_LOCALE, Platform]
|
2021-04-13 21:53:58 +02:00
|
|
|
},
|
2021-07-17 11:04:43 +02:00
|
|
|
{ provide: MAT_DATE_FORMATS, useValue: DateFormats },
|
|
|
|
{
|
|
|
|
provide: STRIPE_PUBLISHABLE_KEY,
|
|
|
|
useFactory: NgxStripeFactory
|
|
|
|
}
|
2021-04-13 21:53:58 +02:00
|
|
|
],
|
|
|
|
bootstrap: [AppComponent]
|
|
|
|
})
|
|
|
|
export class AppModule {}
|