This commit is contained in:
Jason Kulatunga
2020-08-19 16:04:21 -07:00
commit 8482272d45
336 changed files with 197309 additions and 0 deletions
@@ -0,0 +1,28 @@
import { Layout } from "app/layout/layout.types";
// Theme type
export type Theme = "light" | "dark";
/**
* AppConfig interface. Update this interface to strictly type your config
* object.
*/
export interface AppConfig
{
theme: Theme;
layout: Layout;
}
/**
* Default configuration for the entire application. This object is used by
* "ConfigService" to set the default configuration.
*
* If you need to store global configuration for your app, you can use this
* object to set the defaults. To access, update and reset the config, use
* "ConfigService".
*/
export const appConfig: AppConfig = {
theme : "light",
layout: "material"
};
@@ -0,0 +1,42 @@
import { NgModule, Optional, SkipSelf } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { DomSanitizer } from '@angular/platform-browser';
import { MatIconRegistry } from '@angular/material/icon';
@NgModule({
imports : [
HttpClientModule
],
providers: []
})
export class CoreModule
{
/**
* Constructor
*
* @param {DomSanitizer} _domSanitizer
* @param {MatIconRegistry} _matIconRegistry
* @param parentModule
*/
constructor(
private _domSanitizer: DomSanitizer,
private _matIconRegistry: MatIconRegistry,
@Optional() @SkipSelf() parentModule?: CoreModule
)
{
// Do not allow multiple injections
if ( parentModule )
{
throw new Error('CoreModule has already been loaded. Import this module in the AppModule only.');
}
// Register icon sets
this._matIconRegistry.addSvgIconSet(this._domSanitizer.bypassSecurityTrustResourceUrl('assets/icons/material-twotone.svg'));
this._matIconRegistry.addSvgIconSetInNamespace('mat_outline', this._domSanitizer.bypassSecurityTrustResourceUrl('assets/icons/material-outline.svg'));
this._matIconRegistry.addSvgIconSetInNamespace('iconsmind', this._domSanitizer.bypassSecurityTrustResourceUrl('assets/icons/iconsmind.svg'));
this._matIconRegistry.addSvgIconSetInNamespace('dripicons', this._domSanitizer.bypassSecurityTrustResourceUrl('assets/icons/dripicons.svg'));
this._matIconRegistry.addSvgIconSetInNamespace('feather', this._domSanitizer.bypassSecurityTrustResourceUrl('assets/icons/feather.svg'));
this._matIconRegistry.addSvgIconSetInNamespace('heroicons_outline', this._domSanitizer.bypassSecurityTrustResourceUrl('assets/icons/heroicons-outline.svg'));
this._matIconRegistry.addSvgIconSetInNamespace('heroicons_solid', this._domSanitizer.bypassSecurityTrustResourceUrl('assets/icons/heroicons-solid.svg'));
}
}