mirror of https://github.com/abpframework/abp.git
81 changed files with 562 additions and 644 deletions
@ -1,5 +0,0 @@ |
|||||
{ |
|
||||
"printWidth": 100, |
|
||||
"singleQuote": true, |
|
||||
"trailingComma": "all" |
|
||||
} |
|
||||
@ -1 +1,27 @@ |
|||||
# MyProjectName |
# MyProjectName |
||||
|
|
||||
|
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.9. |
||||
|
|
||||
|
## Development server |
||||
|
|
||||
|
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. |
||||
|
|
||||
|
## Code scaffolding |
||||
|
|
||||
|
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. |
||||
|
|
||||
|
## Build |
||||
|
|
||||
|
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. |
||||
|
|
||||
|
## Running unit tests |
||||
|
|
||||
|
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). |
||||
|
|
||||
|
## Running end-to-end tests |
||||
|
|
||||
|
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). |
||||
|
|
||||
|
## Further help |
||||
|
|
||||
|
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). |
||||
|
|||||
@ -1,11 +0,0 @@ |
|||||
import { browser, by, element } from 'protractor'; |
|
||||
|
|
||||
export class AppPage { |
|
||||
navigateTo() { |
|
||||
return browser.get(browser.baseUrl) as Promise<any>; |
|
||||
} |
|
||||
|
|
||||
getTitleText() { |
|
||||
return element(by.css('app-root h1')).getText() as Promise<string>; |
|
||||
} |
|
||||
} |
|
||||
@ -1,57 +1,51 @@ |
|||||
{ |
{ |
||||
"name": "MyProjectName", |
"name": "my-project-name", |
||||
"version": "0.0.0", |
"version": "0.0.0", |
||||
"scripts": { |
"scripts": { |
||||
"ng": "ng", |
"ng": "ng", |
||||
"start": "ng serve", |
"start": "ng serve dev-app --open", |
||||
"start:hmr": "ng serve --open", |
"build": "ng build my-project-name --prod", |
||||
"build": "ng build", |
"build:app": "ng build dev-app --prod", |
||||
"test": "ng test", |
"test": "ng test", |
||||
"lint": "ng lint", |
"lint": "ng lint", |
||||
"e2e": "ng e2e" |
"e2e": "ng e2e" |
||||
}, |
}, |
||||
"private": true, |
"private": true, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/ng.account": "~2.9.0", |
"@angular/animations": "~9.1.11", |
||||
"@abp/ng.identity": "~2.9.0", |
"@angular/common": "~9.1.11", |
||||
"@abp/ng.setting-management": "~2.9.0", |
"@angular/compiler": "~9.1.11", |
||||
"@abp/ng.tenant-management": "~2.9.0", |
"@angular/core": "~9.1.11", |
||||
"@abp/ng.theme.basic": "~2.9.0", |
"@angular/forms": "~9.1.11", |
||||
"@angular/animations": "~9.1.2", |
"@angular/platform-browser": "~9.1.11", |
||||
"@angular/common": "~9.1.2", |
"@angular/platform-browser-dynamic": "~9.1.11", |
||||
"@angular/compiler": "~9.1.2", |
"@angular/router": "~9.1.11", |
||||
"@angular/core": "~9.1.2", |
"@abp/ng.theme.shared": "~2.9.1", |
||||
"@angular/forms": "~9.1.2", |
"@swimlane/ngx-datatable": "^17.0.0", |
||||
"@angular/platform-browser": "~9.1.2", |
"rxjs": "~6.5.4", |
||||
"@angular/platform-browser-dynamic": "~9.1.2", |
|
||||
"@angular/router": "~9.1.2", |
|
||||
"rxjs": "~6.5.5", |
|
||||
"tslib": "^1.10.0", |
"tslib": "^1.10.0", |
||||
"zone.js": "~0.10.2" |
"zone.js": "~0.10.2" |
||||
}, |
}, |
||||
"devDependencies": { |
"devDependencies": { |
||||
"@angular-devkit/build-angular": "~0.901.1", |
"@angular-devkit/build-angular": "~0.901.9", |
||||
"@angular-devkit/build-ng-packagr": "~0.901.1", |
"@angular-devkit/build-ng-packagr": "~0.901.9", |
||||
"@angular/cli": "~9.1.1", |
"@angular/cli": "~9.1.9", |
||||
"@angular/compiler-cli": "~9.1.2", |
"@angular/compiler-cli": "~9.1.11", |
||||
"@angular/language-service": "~9.1.2", |
|
||||
"@ngxs/logger-plugin": "^3.5.1", |
|
||||
"@types/jasmine": "~3.3.8", |
|
||||
"@types/jasminewd2": "~2.0.3", |
|
||||
"@types/node": "^12.11.1", |
"@types/node": "^12.11.1", |
||||
|
"@types/jasmine": "~3.5.0", |
||||
|
"@types/jasminewd2": "~2.0.3", |
||||
"codelyzer": "^5.1.2", |
"codelyzer": "^5.1.2", |
||||
"jasmine-core": "~3.4.0", |
"jasmine-core": "~3.5.0", |
||||
"jasmine-spec-reporter": "~4.2.1", |
"jasmine-spec-reporter": "~4.2.1", |
||||
"karma": "~4.1.0", |
"karma": "~5.0.0", |
||||
"karma-chrome-launcher": "~2.2.0", |
"karma-chrome-launcher": "~3.1.0", |
||||
"karma-coverage-istanbul-reporter": "~2.0.1", |
"karma-coverage-istanbul-reporter": "~2.1.0", |
||||
"karma-jasmine": "~2.0.1", |
"karma-jasmine": "~3.0.1", |
||||
"karma-jasmine-html-reporter": "^1.4.0", |
"karma-jasmine-html-reporter": "^1.4.2", |
||||
"ng-packagr": "^9.0.0", |
"ng-packagr": "^9.0.0", |
||||
"ngxs-schematic": "^1.1.9", |
"protractor": "~7.0.0", |
||||
"protractor": "~5.4.0", |
"ts-node": "~8.3.0", |
||||
"ts-node": "~7.0.0", |
"tslint": "~6.1.0", |
||||
"tslint": "~5.15.0", |
|
||||
"typescript": "~3.8.3" |
"typescript": "~3.8.3" |
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -0,0 +1,11 @@ |
|||||
|
import { browser, by, element } from 'protractor'; |
||||
|
|
||||
|
export class AppPage { |
||||
|
navigateTo(): Promise<unknown> { |
||||
|
return browser.get(browser.baseUrl) as Promise<unknown>; |
||||
|
} |
||||
|
|
||||
|
getTitleText(): Promise<string> { |
||||
|
return element(by.css('app-root .content span')).getText() as Promise<string>; |
||||
|
} |
||||
|
} |
||||
@ -1,7 +1,7 @@ |
|||||
{ |
{ |
||||
"extends": "../tsconfig.json", |
"extends": "../../../tsconfig.json", |
||||
"compilerOptions": { |
"compilerOptions": { |
||||
"outDir": "../out-tsc/e2e", |
"outDir": "../../../out-tsc/e2e", |
||||
"module": "commonjs", |
"module": "commonjs", |
||||
"target": "es5", |
"target": "es5", |
||||
"types": [ |
"types": [ |
||||
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
@ -0,0 +1,57 @@ |
|||||
|
import { ABP, DynamicLayoutComponent } from '@abp/ng.core'; |
||||
|
import { NgModule } from '@angular/core'; |
||||
|
import { RouterModule, Routes } from '@angular/router'; |
||||
|
|
||||
|
const routes: Routes = [ |
||||
|
{ |
||||
|
path: '', |
||||
|
component: DynamicLayoutComponent, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '', |
||||
|
pathMatch: 'full', |
||||
|
loadChildren: () => |
||||
|
import('./home/home.module').then((m) => m.HomeModule), |
||||
|
}, |
||||
|
{ |
||||
|
path: 'account', |
||||
|
loadChildren: () => |
||||
|
import('@abp/ng.account').then((m) => |
||||
|
m.AccountModule.forLazy({ redirectUrl: '/' }) |
||||
|
), |
||||
|
}, |
||||
|
{ |
||||
|
path: 'identity', |
||||
|
loadChildren: () => |
||||
|
import('@abp/ng.identity').then((m) => m.IdentityModule.forLazy()), |
||||
|
}, |
||||
|
{ |
||||
|
path: 'tenant-management', |
||||
|
loadChildren: () => |
||||
|
import('@abp/ng.tenant-management').then((m) => |
||||
|
m.TenantManagementModule.forLazy() |
||||
|
), |
||||
|
}, |
||||
|
{ |
||||
|
path: 'setting-management', |
||||
|
loadChildren: () => |
||||
|
import('@abp/ng.setting-management').then((m) => |
||||
|
m.SettingManagementModule.forLazy() |
||||
|
), |
||||
|
}, |
||||
|
{ |
||||
|
path: 'my-project-name', |
||||
|
loadChildren: () => |
||||
|
import('@my-company-name/my-project-name').then((m) => |
||||
|
m.MyProjectNameModule.forLazy() |
||||
|
), |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
@NgModule({ |
||||
|
imports: [RouterModule.forRoot(routes)], |
||||
|
exports: [RouterModule], |
||||
|
}) |
||||
|
export class AppRoutingModule {} |
||||
@ -1,44 +1,41 @@ |
|||||
import { AccountConfigModule } from '@abp/ng.account.config'; |
import { AccountConfigModule } from '@abp/ng.account/config'; |
||||
import { CoreModule } from '@abp/ng.core'; |
import { CoreModule } from '@abp/ng.core'; |
||||
import { IdentityConfigModule } from '@abp/ng.identity.config'; |
import { IdentityConfigModule } from '@abp/ng.identity/config'; |
||||
import { SettingManagementConfigModule } from '@abp/ng.setting-management.config'; |
import { SettingManagementConfigModule } from '@abp/ng.setting-management/config'; |
||||
import { TenantManagementConfigModule } from '@abp/ng.tenant-management.config'; |
import { TenantManagementConfigModule } from '@abp/ng.tenant-management/config'; |
||||
import { ThemeSharedModule } from '@abp/ng.theme.shared'; |
import { ThemeSharedModule } from '@abp/ng.theme.shared'; |
||||
import { NgModule } from '@angular/core'; |
import { NgModule } from '@angular/core'; |
||||
import { BrowserModule } from '@angular/platform-browser'; |
import { BrowserModule } from '@angular/platform-browser'; |
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; |
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; |
||||
import { NgxsLoggerPluginModule } from '@ngxs/logger-plugin'; |
import { MyProjectNameConfigModule } from '@my-company-name/my-project-name/config'; |
||||
import { NgxsModule } from '@ngxs/store'; |
import { NgxsModule } from '@ngxs/store'; |
||||
import { OAuthModule } from 'angular-oauth2-oidc'; |
|
||||
import { MyProjectNameConfigModule } from '../../projects/my-project-name-config/src/public-api'; |
|
||||
import { environment } from '../environments/environment'; |
import { environment } from '../environments/environment'; |
||||
import { AppRoutingModule } from './app-routing.module'; |
import { AppRoutingModule } from './app-routing.module'; |
||||
import { AppComponent } from './app.component'; |
import { AppComponent } from './app.component'; |
||||
|
import { APP_ROUTE_PROVIDER } from './route.provider'; |
||||
import { SharedModule } from './shared/shared.module'; |
import { SharedModule } from './shared/shared.module'; |
||||
|
|
||||
const LOGGERS = [NgxsLoggerPluginModule.forRoot({ disabled: false })]; |
|
||||
|
|
||||
@NgModule({ |
@NgModule({ |
||||
declarations: [AppComponent], |
|
||||
imports: [ |
imports: [ |
||||
BrowserModule, |
BrowserModule, |
||||
BrowserAnimationsModule, |
BrowserAnimationsModule, |
||||
AppRoutingModule, |
AppRoutingModule, |
||||
ThemeSharedModule.forRoot(), |
|
||||
CoreModule.forRoot({ |
CoreModule.forRoot({ |
||||
environment, |
environment, |
||||
|
sendNullsAsQueryParam: false, |
||||
|
skipGetAppConfiguration: false, |
||||
}), |
}), |
||||
OAuthModule.forRoot(), |
ThemeSharedModule.forRoot(), |
||||
NgxsModule.forRoot([]), |
AccountConfigModule.forRoot(), |
||||
AccountConfigModule.forRoot({ redirectUrl: '/' }), |
IdentityConfigModule.forRoot(), |
||||
IdentityConfigModule, |
MyProjectNameConfigModule.forRoot(), |
||||
TenantManagementConfigModule, |
TenantManagementConfigModule.forRoot(), |
||||
SettingManagementConfigModule, |
SettingManagementConfigModule.forRoot(), |
||||
MyProjectNameConfigModule, |
NgxsModule.forRoot(), |
||||
SharedModule, |
SharedModule, |
||||
|
|
||||
...(environment.production ? [] : LOGGERS), |
|
||||
], |
], |
||||
|
providers: [APP_ROUTE_PROVIDER], |
||||
|
declarations: [AppComponent], |
||||
bootstrap: [AppComponent], |
bootstrap: [AppComponent], |
||||
}) |
}) |
||||
export class AppModule {} |
export class AppModule {} |
||||
@ -1,12 +1,10 @@ |
|||||
import { NgModule } from '@angular/core'; |
import { NgModule } from '@angular/core'; |
||||
import { Routes, RouterModule } from '@angular/router'; |
import { Routes, RouterModule } from '@angular/router'; |
||||
import { HomeComponent } from './home.component'; |
import { HomeComponent } from './home.component'; |
||||
import { ApplicationLayoutComponent } from '@abp/ng.theme.basic'; |
|
||||
|
|
||||
const routes: Routes = [ |
const routes: Routes = [ |
||||
{ |
{ |
||||
path: '', |
path: '', |
||||
component: ApplicationLayoutComponent, |
|
||||
children: [{ path: '', component: HomeComponent }], |
children: [{ path: '', component: HomeComponent }], |
||||
}, |
}, |
||||
]; |
]; |
||||
@ -0,0 +1,7 @@ |
|||||
|
import { Component } from '@angular/core'; |
||||
|
|
||||
|
@Component({ |
||||
|
selector: 'app-home', |
||||
|
templateUrl: './home.component.html', |
||||
|
}) |
||||
|
export class HomeComponent {} |
||||
@ -0,0 +1,25 @@ |
|||||
|
import { RoutesService, eLayoutType } from '@abp/ng.core'; |
||||
|
import { APP_INITIALIZER } from '@angular/core'; |
||||
|
|
||||
|
export const APP_ROUTE_PROVIDER = [ |
||||
|
{ |
||||
|
provide: APP_INITIALIZER, |
||||
|
useFactory: configureRoutes, |
||||
|
deps: [RoutesService], |
||||
|
multi: true, |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
function configureRoutes(routes: RoutesService) { |
||||
|
return () => { |
||||
|
routes.add([ |
||||
|
{ |
||||
|
path: '/', |
||||
|
name: 'Home', |
||||
|
iconClass: 'fas fa-home', |
||||
|
order: 1, |
||||
|
layout: eLayoutType.application, |
||||
|
}, |
||||
|
]); |
||||
|
}; |
||||
|
} |
||||
@ -0,0 +1,13 @@ |
|||||
|
<!doctype html> |
||||
|
<html lang="en"> |
||||
|
<head> |
||||
|
<meta charset="utf-8"> |
||||
|
<title>DevApp</title> |
||||
|
<base href="/"> |
||||
|
<meta name="viewport" content="width=device-width, initial-scale=1"> |
||||
|
<link rel="icon" type="image/x-icon" href="favicon.ico"> |
||||
|
</head> |
||||
|
<body> |
||||
|
<app-root></app-root> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1 @@ |
|||||
|
/* You can add global styles to this file, and also import other style files */ |
||||
@ -0,0 +1,14 @@ |
|||||
|
{ |
||||
|
"extends": "../../tsconfig.json", |
||||
|
"compilerOptions": { |
||||
|
"outDir": "../../out-tsc/app", |
||||
|
"types": [] |
||||
|
}, |
||||
|
"files": [ |
||||
|
"src/main.ts", |
||||
|
"src/polyfills.ts" |
||||
|
], |
||||
|
"include": [ |
||||
|
"src/**/*.d.ts" |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,9 @@ |
|||||
|
{ |
||||
|
"extends": "../../tsconfig.prod.json", |
||||
|
"compilerOptions": { |
||||
|
"outDir": "../../out-tsc/app", |
||||
|
"types": [] |
||||
|
}, |
||||
|
"files": ["src/main.ts", "src/polyfills.ts"], |
||||
|
"include": ["src/**/*.d.ts"] |
||||
|
} |
||||
@ -1,7 +1,7 @@ |
|||||
{ |
{ |
||||
"extends": "./tsconfig.json", |
"extends": "../../tsconfig.json", |
||||
"compilerOptions": { |
"compilerOptions": { |
||||
"outDir": "./out-tsc/spec", |
"outDir": "../../out-tsc/spec", |
||||
"types": [ |
"types": [ |
||||
"jasmine", |
"jasmine", |
||||
"node" |
"node" |
||||
@ -1 +0,0 @@ |
|||||
# MyProjectNameConfig |
|
||||
@ -1,32 +0,0 @@ |
|||||
// Karma configuration file, see link for more information
|
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||
|
|
||||
module.exports = function (config) { |
|
||||
config.set({ |
|
||||
basePath: '', |
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'], |
|
||||
plugins: [ |
|
||||
require('karma-jasmine'), |
|
||||
require('karma-chrome-launcher'), |
|
||||
require('karma-jasmine-html-reporter'), |
|
||||
require('karma-coverage-istanbul-reporter'), |
|
||||
require('@angular-devkit/build-angular/plugins/karma') |
|
||||
], |
|
||||
client: { |
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
|
||||
}, |
|
||||
coverageIstanbulReporter: { |
|
||||
dir: require('path').join(__dirname, '../../coverage/my-project-name-config'), |
|
||||
reports: ['html', 'lcovonly', 'text-summary'], |
|
||||
fixWebpackSourcePaths: true |
|
||||
}, |
|
||||
reporters: ['progress', 'kjhtml'], |
|
||||
port: 9876, |
|
||||
colors: true, |
|
||||
logLevel: config.LOG_INFO, |
|
||||
autoWatch: true, |
|
||||
browsers: ['Chrome'], |
|
||||
singleRun: false, |
|
||||
restartOnFileChange: true |
|
||||
}); |
|
||||
}; |
|
||||
@ -1,7 +0,0 @@ |
|||||
{ |
|
||||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json", |
|
||||
"dest": "../../dist/my-project-name-config", |
|
||||
"lib": { |
|
||||
"entryFile": "src/public-api.ts" |
|
||||
} |
|
||||
} |
|
||||
@ -1,7 +0,0 @@ |
|||||
{ |
|
||||
"name": "my-project-name.config", |
|
||||
"version": "0.0.1", |
|
||||
"peerDependencies": { |
|
||||
"@abp/ng.core": "~2.9.0" |
|
||||
} |
|
||||
} |
|
||||
@ -1,9 +0,0 @@ |
|||||
import { Component } from '@angular/core'; |
|
||||
|
|
||||
@Component({ |
|
||||
selector: 'my-project-name-settings', |
|
||||
template: ` |
|
||||
<h3>MyProjectName Settings</h3> |
|
||||
`,
|
|
||||
}) |
|
||||
export class MyProjectNameSettingsComponent {} |
|
||||
@ -1,12 +0,0 @@ |
|||||
import { NgModule, APP_INITIALIZER } from '@angular/core'; |
|
||||
import { MyProjectNameConfigService } from './services/my-project-name-config.service'; |
|
||||
import { noop } from '@abp/ng.core'; |
|
||||
import { MyProjectNameSettingsComponent } from './components/my-project-name-settings.component'; |
|
||||
|
|
||||
@NgModule({ |
|
||||
declarations: [MyProjectNameSettingsComponent], |
|
||||
providers: [{ provide: APP_INITIALIZER, deps: [MyProjectNameConfigService], multi: true, useFactory: noop }], |
|
||||
exports: [MyProjectNameSettingsComponent], |
|
||||
entryComponents: [MyProjectNameSettingsComponent], |
|
||||
}) |
|
||||
export class MyProjectNameConfigModule {} |
|
||||
@ -1,25 +0,0 @@ |
|||||
import { Injectable } from '@angular/core'; |
|
||||
import { eLayoutType, addAbpRoutes, ABP } from '@abp/ng.core'; |
|
||||
import { addSettingTab } from '@abp/ng.theme.shared'; |
|
||||
import { MyProjectNameSettingsComponent } from '../components/my-project-name-settings.component'; |
|
||||
|
|
||||
@Injectable({ |
|
||||
providedIn: 'root', |
|
||||
}) |
|
||||
export class MyProjectNameConfigService { |
|
||||
constructor() { |
|
||||
addAbpRoutes({ |
|
||||
name: 'MyProjectName', |
|
||||
path: 'my-project-name', |
|
||||
layout: eLayoutType.application, |
|
||||
order: 2, |
|
||||
} as ABP.FullRoute); |
|
||||
|
|
||||
const route = addSettingTab({ |
|
||||
component: MyProjectNameSettingsComponent, |
|
||||
name: 'MyProjectName Settings', |
|
||||
order: 1, |
|
||||
requiredPolicy: '', |
|
||||
}); |
|
||||
} |
|
||||
} |
|
||||
@ -1,3 +0,0 @@ |
|||||
export * from './lib/components/my-project-name-settings.component'; |
|
||||
export * from './lib/services/my-project-name-config.service'; |
|
||||
export * from './lib/my-project-name-config.module'; |
|
||||
@ -1,21 +0,0 @@ |
|||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||
|
|
||||
import 'zone.js/dist/zone'; |
|
||||
import 'zone.js/dist/zone-testing'; |
|
||||
import { getTestBed } from '@angular/core/testing'; |
|
||||
import { |
|
||||
BrowserDynamicTestingModule, |
|
||||
platformBrowserDynamicTesting |
|
||||
} from '@angular/platform-browser-dynamic/testing'; |
|
||||
|
|
||||
declare const require: any; |
|
||||
|
|
||||
// First, initialize the Angular testing environment.
|
|
||||
getTestBed().initTestEnvironment( |
|
||||
BrowserDynamicTestingModule, |
|
||||
platformBrowserDynamicTesting() |
|
||||
); |
|
||||
// Then we find all the tests.
|
|
||||
const context = require.context('./', true, /\.spec\.ts$/); |
|
||||
// And load the modules.
|
|
||||
context.keys().map(context); |
|
||||
@ -1,25 +0,0 @@ |
|||||
{ |
|
||||
"extends": "../../tsconfig.json", |
|
||||
"compilerOptions": { |
|
||||
"outDir": "../../out-tsc/lib", |
|
||||
"target": "es2015", |
|
||||
"declaration": true, |
|
||||
"inlineSources": true, |
|
||||
"types": [], |
|
||||
"lib": [ |
|
||||
"dom", |
|
||||
"es2018" |
|
||||
] |
|
||||
}, |
|
||||
"angularCompilerOptions": { |
|
||||
"skipTemplateCodegen": true, |
|
||||
"strictMetadataEmit": true, |
|
||||
"fullTemplateTypeCheck": true, |
|
||||
"strictInjectionParameters": true, |
|
||||
"enableResourceInlining": true |
|
||||
}, |
|
||||
"exclude": [ |
|
||||
"src/test.ts", |
|
||||
"**/*.spec.ts" |
|
||||
] |
|
||||
} |
|
||||
@ -1,6 +0,0 @@ |
|||||
{ |
|
||||
"extends": "./tsconfig.lib.json", |
|
||||
"angularCompilerOptions": { |
|
||||
"enableIvy": false |
|
||||
} |
|
||||
} |
|
||||
@ -1,17 +0,0 @@ |
|||||
{ |
|
||||
"extends": "../../tsconfig.json", |
|
||||
"compilerOptions": { |
|
||||
"outDir": "../../out-tsc/spec", |
|
||||
"types": [ |
|
||||
"jasmine", |
|
||||
"node" |
|
||||
] |
|
||||
}, |
|
||||
"files": [ |
|
||||
"src/test.ts" |
|
||||
], |
|
||||
"include": [ |
|
||||
"**/*.spec.ts", |
|
||||
"**/*.d.ts" |
|
||||
] |
|
||||
} |
|
||||
@ -1 +1,24 @@ |
|||||
# MyProjectName |
# MyProjectName |
||||
|
|
||||
|
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.11. |
||||
|
|
||||
|
## Code scaffolding |
||||
|
|
||||
|
Run `ng generate component component-name --project my-project-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project my-project-name`. |
||||
|
> Note: Don't forget to add `--project my-project-name` or else it will be added to the default project in your `angular.json` file. |
||||
|
|
||||
|
## Build |
||||
|
|
||||
|
Run `ng build my-project-name` to build the project. The build artifacts will be stored in the `dist/` directory. |
||||
|
|
||||
|
## Publishing |
||||
|
|
||||
|
After building your library with `ng build my-project-name`, go to the dist folder `cd dist/my-project-name` and run `npm publish`. |
||||
|
|
||||
|
## Running unit tests |
||||
|
|
||||
|
Run `ng test my-project-name` to execute the unit tests via [Karma](https://karma-runner.github.io). |
||||
|
|
||||
|
## Further help |
||||
|
|
||||
|
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). |
||||
|
|||||
@ -0,0 +1,7 @@ |
|||||
|
{ |
||||
|
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", |
||||
|
"dest": "../../dist/my-project-name/config", |
||||
|
"lib": { |
||||
|
"entryFile": "src/public-api.ts" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1 @@ |
|||||
|
export * from './route-names'; |
||||
@ -0,0 +1,3 @@ |
|||||
|
export const enum eMyProjectNameRouteNames { |
||||
|
MyProjectName = 'MyProjectName', |
||||
|
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
import { ModuleWithProviders, NgModule } from '@angular/core'; |
||||
|
import { MY_PROJECT_NAME_ROUTE_PROVIDERS } from './providers/route.provider'; |
||||
|
|
||||
|
@NgModule() |
||||
|
export class MyProjectNameConfigModule { |
||||
|
static forRoot(): ModuleWithProviders<MyProjectNameConfigModule> { |
||||
|
return { |
||||
|
ngModule: MyProjectNameConfigModule, |
||||
|
providers: [MY_PROJECT_NAME_ROUTE_PROVIDERS], |
||||
|
}; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1 @@ |
|||||
|
export * from './route.provider'; |
||||
@ -0,0 +1,28 @@ |
|||||
|
import { eLayoutType, RoutesService } from '@abp/ng.core'; |
||||
|
import { eThemeSharedRouteNames } from '@abp/ng.theme.shared'; |
||||
|
import { APP_INITIALIZER } from '@angular/core'; |
||||
|
import { eMyProjectNameRouteNames } from '../enums/route-names'; |
||||
|
|
||||
|
export const MY_PROJECT_NAME_ROUTE_PROVIDERS = [ |
||||
|
{ |
||||
|
provide: APP_INITIALIZER, |
||||
|
useFactory: configureRoutes, |
||||
|
deps: [RoutesService], |
||||
|
multi: true, |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
export function configureRoutes(routes: RoutesService) { |
||||
|
return () => { |
||||
|
routes.add([ |
||||
|
{ |
||||
|
path: '/my-project-name', |
||||
|
name: eMyProjectNameRouteNames.MyProjectName, |
||||
|
parentName: eThemeSharedRouteNames.Administration, |
||||
|
iconClass: 'fas fa-book', |
||||
|
layout: eLayoutType.application, |
||||
|
order: 3, |
||||
|
}, |
||||
|
]); |
||||
|
}; |
||||
|
} |
||||
@ -0,0 +1,3 @@ |
|||||
|
export * from './enums'; |
||||
|
export * from './my-project-name-config.module'; |
||||
|
export * from './providers'; |
||||
@ -1,8 +1,13 @@ |
|||||
{ |
{ |
||||
"name": "my-project-name", |
"name": "my-project-name", |
||||
"version": "0.0.1", |
"version": "0.0.1", |
||||
|
"peerDependencies": { |
||||
|
"@angular/common": "^9.1.11", |
||||
|
"@angular/core": "^9.1.11", |
||||
|
"@abp/ng.core": ">=3.0.0", |
||||
|
"@abp/ng.theme.shared": ">=3.0.0" |
||||
|
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/ng.theme.shared": "~2.9.0", |
"tslib": "^1.10.0" |
||||
"my-project-name.config": "^0.0.1" |
|
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,23 @@ |
|||||
import { NgModule } from '@angular/core'; |
import { NgModule, NgModuleFactory, ModuleWithProviders } from '@angular/core'; |
||||
|
import { CoreModule, LazyModuleFactory } from '@abp/ng.core'; |
||||
|
import { ThemeSharedModule } from '@abp/ng.theme.shared'; |
||||
import { MyProjectNameComponent } from './components/my-project-name.component'; |
import { MyProjectNameComponent } from './components/my-project-name.component'; |
||||
import { MyProjectNameRoutingModule } from './my-project-name-routing.module'; |
import { MyProjectNameRoutingModule } from './my-project-name-routing.module'; |
||||
import { ThemeSharedModule } from '@abp/ng.theme.shared'; |
|
||||
import { CoreModule } from '@abp/ng.core'; |
|
||||
|
|
||||
@NgModule({ |
@NgModule({ |
||||
declarations: [MyProjectNameComponent], |
declarations: [MyProjectNameComponent], |
||||
imports: [CoreModule, ThemeSharedModule, MyProjectNameRoutingModule], |
imports: [CoreModule, ThemeSharedModule, MyProjectNameRoutingModule], |
||||
exports: [MyProjectNameComponent], |
exports: [MyProjectNameComponent], |
||||
}) |
}) |
||||
export class MyProjectNameModule {} |
export class MyProjectNameModule { |
||||
|
static forChild(): ModuleWithProviders<MyProjectNameModule> { |
||||
|
return { |
||||
|
ngModule: MyProjectNameModule, |
||||
|
providers: [], |
||||
|
}; |
||||
|
} |
||||
|
|
||||
|
static forLazy(): NgModuleFactory<MyProjectNameModule> { |
||||
|
return new LazyModuleFactory(MyProjectNameModule.forChild()); |
||||
|
} |
||||
|
} |
||||
|
|||||
@ -0,0 +1,16 @@ |
|||||
|
import { TestBed } from '@angular/core/testing'; |
||||
|
|
||||
|
import { MyProjectNameService } from './my-project-name.service'; |
||||
|
|
||||
|
describe('MyProjectNameService', () => { |
||||
|
let service: MyProjectNameService; |
||||
|
|
||||
|
beforeEach(() => { |
||||
|
TestBed.configureTestingModule({}); |
||||
|
service = TestBed.inject(MyProjectNameService); |
||||
|
}); |
||||
|
|
||||
|
it('should be created', () => { |
||||
|
expect(service).toBeTruthy(); |
||||
|
}); |
||||
|
}); |
||||
@ -0,0 +1,9 @@ |
|||||
|
import { Injectable } from '@angular/core'; |
||||
|
|
||||
|
@Injectable({ |
||||
|
providedIn: 'root' |
||||
|
}) |
||||
|
export class MyProjectNameService { |
||||
|
|
||||
|
constructor() { } |
||||
|
} |
||||
@ -1,2 +1,7 @@ |
|||||
|
/* |
||||
|
* Public API Surface of my-project-name |
||||
|
*/ |
||||
|
|
||||
export * from './lib/components/my-project-name.component'; |
export * from './lib/components/my-project-name.component'; |
||||
|
export * from './lib/services/my-project-name.service'; |
||||
export * from './lib/my-project-name.module'; |
export * from './lib/my-project-name.module'; |
||||
|
|||||
@ -1,25 +1,17 @@ |
|||||
{ |
{ |
||||
"extends": "../../tsconfig.json", |
"extends": "../../tsconfig.prod.json", |
||||
"compilerOptions": { |
"compilerOptions": { |
||||
"outDir": "../../out-tsc/lib", |
"outDir": "../../out-tsc/lib", |
||||
"target": "es2015", |
"target": "es2015", |
||||
"declaration": true, |
"declaration": true, |
||||
"inlineSources": true, |
"inlineSources": true, |
||||
"types": [], |
"types": [], |
||||
"lib": [ |
"lib": ["dom", "es2018"] |
||||
"dom", |
|
||||
"es2018" |
|
||||
] |
|
||||
}, |
}, |
||||
"angularCompilerOptions": { |
"angularCompilerOptions": { |
||||
"skipTemplateCodegen": true, |
"skipTemplateCodegen": true, |
||||
"strictMetadataEmit": true, |
"strictMetadataEmit": true, |
||||
"fullTemplateTypeCheck": true, |
|
||||
"strictInjectionParameters": true, |
|
||||
"enableResourceInlining": true |
"enableResourceInlining": true |
||||
}, |
}, |
||||
"exclude": [ |
"exclude": ["src/test.ts", "**/*.spec.ts"] |
||||
"src/test.ts", |
|
||||
"**/*.spec.ts" |
|
||||
] |
|
||||
} |
} |
||||
|
|||||
@ -1,51 +0,0 @@ |
|||||
import { ABP } from '@abp/ng.core'; |
|
||||
import { NgModule } from '@angular/core'; |
|
||||
import { RouterModule, Routes } from '@angular/router'; |
|
||||
|
|
||||
const routes: Routes = [ |
|
||||
{ |
|
||||
path: '', |
|
||||
loadChildren: () => import('./home/home.module').then(m => m.HomeModule), |
|
||||
data: { |
|
||||
routes: { |
|
||||
name: 'Home', |
|
||||
order: 1, |
|
||||
} as ABP.Route, |
|
||||
}, |
|
||||
}, |
|
||||
{ |
|
||||
path: 'account', |
|
||||
loadChildren: () => |
|
||||
import('./lazy-libs/account-wrapper.module').then(m => m.AccountWrapperModule), |
|
||||
}, |
|
||||
{ |
|
||||
path: 'identity', |
|
||||
loadChildren: () => |
|
||||
import('./lazy-libs/identity-wrapper.module').then(m => m.IdentityWrapperModule), |
|
||||
}, |
|
||||
{ |
|
||||
path: 'tenant-management', |
|
||||
loadChildren: () => |
|
||||
import('./lazy-libs/tenant-management-wrapper.module').then( |
|
||||
m => m.TenantManagementWrapperModule, |
|
||||
), |
|
||||
}, |
|
||||
{ |
|
||||
path: 'setting-management', |
|
||||
loadChildren: () => |
|
||||
import('./lazy-libs/setting-management-wrapper.module').then( |
|
||||
m => m.SettingManagementWrapperModule, |
|
||||
), |
|
||||
}, |
|
||||
{ |
|
||||
path: 'my-project-name', |
|
||||
loadChildren: () => |
|
||||
import('./lazy-libs/my-project-name-wrapper.module').then(m => m.MyProjectNameWrapperModule), |
|
||||
}, |
|
||||
]; |
|
||||
|
|
||||
@NgModule({ |
|
||||
imports: [RouterModule.forRoot(routes)], |
|
||||
exports: [RouterModule], |
|
||||
}) |
|
||||
export class AppRoutingModule {} |
|
||||
@ -1,6 +0,0 @@ |
|||||
<div id="AbpContentToolbar"></div> |
|
||||
<div class="row"> |
|
||||
<a routerLink="/account/login" [state]="{ redirectUrl: '/' }" role="button"> |
|
||||
{{ '::Login' | abpLocalization }}</a |
|
||||
> |
|
||||
</div> |
|
||||
@ -1,14 +0,0 @@ |
|||||
import { Component } from '@angular/core'; |
|
||||
import { OAuthService } from 'angular-oauth2-oidc'; |
|
||||
|
|
||||
@Component({ |
|
||||
selector: 'app-home', |
|
||||
templateUrl: './home.component.html', |
|
||||
}) |
|
||||
export class HomeComponent { |
|
||||
get hasLoggedIn(): boolean { |
|
||||
return this.oAuthService.hasValidAccessToken(); |
|
||||
} |
|
||||
|
|
||||
constructor(private oAuthService: OAuthService) {} |
|
||||
} |
|
||||
@ -1,7 +0,0 @@ |
|||||
import { NgModule } from '@angular/core'; |
|
||||
import { AccountModule } from '@abp/ng.account'; |
|
||||
|
|
||||
@NgModule({ |
|
||||
imports: [AccountModule], |
|
||||
}) |
|
||||
export class AccountWrapperModule {} |
|
||||
@ -1,7 +0,0 @@ |
|||||
import { NgModule } from '@angular/core'; |
|
||||
import { IdentityModule } from '@abp/ng.identity'; |
|
||||
|
|
||||
@NgModule({ |
|
||||
imports: [IdentityModule], |
|
||||
}) |
|
||||
export class IdentityWrapperModule {} |
|
||||
@ -1,7 +0,0 @@ |
|||||
import { NgModule } from '@angular/core'; |
|
||||
import { MyProjectNameModule } from '../../../projects/my-project-name/src/public-api'; |
|
||||
|
|
||||
@NgModule({ |
|
||||
imports: [MyProjectNameModule], |
|
||||
}) |
|
||||
export class MyProjectNameWrapperModule {} |
|
||||
@ -1,7 +0,0 @@ |
|||||
import { NgModule } from '@angular/core'; |
|
||||
import { SettingManagementModule } from '@abp/ng.setting-management'; |
|
||||
|
|
||||
@NgModule({ |
|
||||
imports: [SettingManagementModule], |
|
||||
}) |
|
||||
export class SettingManagementWrapperModule {} |
|
||||
@ -1,7 +0,0 @@ |
|||||
import { NgModule } from '@angular/core'; |
|
||||
import { TenantManagementModule } from '@abp/ng.tenant-management'; |
|
||||
|
|
||||
@NgModule({ |
|
||||
imports: [TenantManagementModule], |
|
||||
}) |
|
||||
export class TenantManagementWrapperModule {} |
|
||||
@ -1,16 +0,0 @@ |
|||||
<!DOCTYPE html> |
|
||||
<html lang="en"> |
|
||||
<head> |
|
||||
<meta charset="utf-8" /> |
|
||||
<title>MyProjectName</title> |
|
||||
<base href="/" /> |
|
||||
|
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" /> |
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico" /> |
|
||||
</head> |
|
||||
<body class="bg-light"> |
|
||||
<app-root> |
|
||||
<div class="donut centered"></div> |
|
||||
</app-root> |
|
||||
</body> |
|
||||
</html> |
|
||||
@ -1,27 +0,0 @@ |
|||||
/* You can add global styles to this file, and also import other style files */ |
|
||||
|
|
||||
@keyframes donut-spin { |
|
||||
0% { |
|
||||
transform: rotate(0deg); |
|
||||
} |
|
||||
100% { |
|
||||
transform: rotate(360deg); |
|
||||
} |
|
||||
} |
|
||||
.donut { |
|
||||
display: inline-block; |
|
||||
border: 4px solid rgba(0, 0, 0, 0.1); |
|
||||
border-left-color: #7983ff; |
|
||||
border-radius: 50%; |
|
||||
width: 30px; |
|
||||
height: 30px; |
|
||||
animation: donut-spin 1.2s linear infinite; |
|
||||
|
|
||||
&.centered { |
|
||||
position: fixed; |
|
||||
top: 50%; |
|
||||
left: 50%; |
|
||||
/* bring your own prefixes */ |
|
||||
transform: translate(-50%, -50%); |
|
||||
} |
|
||||
} |
|
||||
@ -1,12 +0,0 @@ |
|||||
{ |
|
||||
"extends": "./tsconfig.json", |
|
||||
"compilerOptions": { |
|
||||
"outDir": "./out-tsc/app", |
|
||||
"types": ["node"] |
|
||||
}, |
|
||||
"files": [ |
|
||||
"src/main.ts", |
|
||||
"src/polyfills.ts" |
|
||||
], |
|
||||
"include": ["src/**/*.d.ts"] |
|
||||
} |
|
||||
@ -1,37 +1,13 @@ |
|||||
{ |
{ |
||||
"compileOnSave": false, |
"extends": "./tsconfig.prod.json", |
||||
"compilerOptions": { |
"compilerOptions": { |
||||
"baseUrl": "./", |
|
||||
"outDir": "./dist/out-tsc", |
|
||||
"sourceMap": true, |
|
||||
"declaration": false, |
|
||||
"downlevelIteration": true, |
|
||||
"emitDecoratorMetadata": true, |
|
||||
"experimentalDecorators": true, |
|
||||
"module": "esnext", |
|
||||
"moduleResolution": "node", |
|
||||
"importHelpers": true, |
|
||||
"target": "es2015", |
|
||||
"typeRoots": [ |
|
||||
"node_modules/@types" |
|
||||
], |
|
||||
"lib": [ |
|
||||
"es2018", |
|
||||
"dom" |
|
||||
], |
|
||||
"paths": { |
"paths": { |
||||
"my-project-name": [ |
"@my-company-name/my-project-name": [ |
||||
"dist/my-project-name" |
"projects/my-project-name/src/public-api.ts" |
||||
], |
], |
||||
"my-project-name/*": [ |
"@my-company-name/my-project-name/config": [ |
||||
"dist/my-project-name/*" |
"projects/my-project-name/config/src/public-api.ts" |
||||
], |
|
||||
"my-project-name-config": [ |
|
||||
"dist/my-project-name-config" |
|
||||
], |
|
||||
"my-project-name-config/*": [ |
|
||||
"dist/my-project-name-config/*" |
|
||||
] |
] |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -0,0 +1,20 @@ |
|||||
|
{ |
||||
|
"compileOnSave": false, |
||||
|
"compilerOptions": { |
||||
|
"baseUrl": "./", |
||||
|
"outDir": "./dist/out-tsc", |
||||
|
"sourceMap": true, |
||||
|
"declaration": false, |
||||
|
"downlevelIteration": true, |
||||
|
"experimentalDecorators": true, |
||||
|
"module": "esnext", |
||||
|
"moduleResolution": "node", |
||||
|
"importHelpers": true, |
||||
|
"target": "es2015", |
||||
|
"lib": ["es2018", "dom"] |
||||
|
}, |
||||
|
"angularCompilerOptions": { |
||||
|
"fullTemplateTypeCheck": true, |
||||
|
"strictInjectionParameters": true |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue