@acorex/platform-generator 18.0.7 → 18.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -11
- package/generators.json +9 -9
- package/package.json +1 -1
- package/src/generators/app-module/files/.eslintrc.json.template +40 -40
- package/src/generators/app-module/files/jest.config.ts.template +22 -22
- package/src/generators/app-module/files/project.json.template +308 -308
- package/src/generators/app-module/files/src/app/app.component.ts.template +10 -10
- package/src/generators/app-module/files/src/app/app.module.ts.template +99 -99
- package/src/generators/app-module/files/src/app/app.routes.ts.template +13 -13
- package/src/generators/app-module/files/src/app/header-interceptor.interceptor.ts.template +33 -33
- package/src/generators/app-module/files/src/app/modules/auth/application.loader.ts.template +34 -34
- package/src/generators/app-module/files/src/app/modules/auth/auth-root.module.ts.template +52 -52
- package/src/generators/app-module/files/src/app/modules/auth/auth.strategy.ts.template +91 -91
- package/src/generators/app-module/files/src/app/modules/auth/feature.loader.ts.template +17 -17
- package/src/generators/app-module/files/src/app/modules/auth/permission.loader.ts.template +21 -21
- package/src/generators/app-module/files/src/app/modules/auth/tenant.loader.ts.template +32 -32
- package/src/generators/app-module/files/src/app/modules/common/translation-root.module.ts.template +45 -45
- package/src/generators/app-module/files/src/app/modules/layout/entity.loader.ts.template +21 -21
- package/src/generators/app-module/files/src/app/modules/layout/layout-root.module.ts.template +79 -79
- package/src/generators/app-module/files/src/app/modules/layout/menu.loader.ts.template +159 -159
- package/src/generators/app-module/files/src/app/modules/root/home/home.page.html.template +2 -2
- package/src/generators/app-module/files/src/app/modules/root/home/home.page.ts.template +9 -9
- package/src/generators/app-module/files/src/app/modules/root/root.module.ts.template +32 -32
- package/src/generators/app-module/files/src/app/modules/root/sample/sample.entity.ts.template +184 -184
- package/src/generators/app-module/files/src/assets/auth-background.svg +6 -6
- package/src/generators/app-module/files/src/assets/documents.svg +9 -9
- package/src/generators/app-module/files/src/assets/fonts/font-awesome/css/brands.min.css +1457 -1457
- package/src/generators/app-module/files/src/assets/fonts/font-awesome/css/fontawesome.min.css +11291 -11291
- package/src/generators/app-module/files/src/assets/fonts/font-awesome/css/light.min.css +22 -22
- package/src/generators/app-module/files/src/assets/fonts/font-awesome/css/regular.min.css +22 -22
- package/src/generators/app-module/files/src/assets/fonts/font-awesome/css/solid.min.css +5 -5
- package/src/generators/app-module/files/src/assets/i18n/en/auth.json +49 -49
- package/src/generators/app-module/files/src/assets/i18n/en/common.json +179 -179
- package/src/generators/app-module/files/src/assets/images/error/error-404.svg +336 -336
- package/src/generators/app-module/files/src/assets/images/error/error-offline.svg +133 -133
- package/src/generators/app-module/files/src/assets/logos/logo-colored.svg +18 -18
- package/src/generators/app-module/files/src/assets/logos/logo-white.svg +17 -17
- package/src/generators/app-module/files/src/assets/themes/default/default.scss.template +141 -141
- package/src/generators/app-module/files/src/environments/environment.dev.ts.template +19 -19
- package/src/generators/app-module/files/src/environments/environment.local.ts.template +19 -19
- package/src/generators/app-module/files/src/environments/environment.prod.ts.template +19 -19
- package/src/generators/app-module/files/src/environments/environment.test.local.ts.template +19 -19
- package/src/generators/app-module/files/src/environments/environment.test.ts.template +19 -19
- package/src/generators/app-module/files/src/environments/environment.ts.template +19 -19
- package/src/generators/app-module/files/src/index.html.template +34 -34
- package/src/generators/app-module/files/src/main.ts.template +6 -6
- package/src/generators/app-module/files/src/styles.scss.template +188 -188
- package/src/generators/app-module/files/src/test-setup.ts.template +7 -7
- package/src/generators/app-module/files/tailwind.config.js.template +18 -18
- package/src/generators/app-module/files/tsconfig.app.json.template +10 -10
- package/src/generators/app-module/files/tsconfig.editor.json.template +7 -7
- package/src/generators/app-module/files/tsconfig.json.template +34 -34
- package/src/generators/app-module/files/tsconfig.spec.json.template +11 -11
- package/src/generators/app-module/schema.d.ts +4 -4
- package/src/generators/app-module/schema.json +27 -27
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { AXPFeature, AXPFeatureLoader } from '@acorex/platform/auth';
|
|
2
|
-
import { Observable, delay, of } from 'rxjs';
|
|
3
|
-
|
|
4
|
-
export class <%= upperCase(name) %>FeatureLoader implements AXPFeatureLoader {
|
|
5
|
-
|
|
6
|
-
private list: AXPFeature[] = [
|
|
7
|
-
// {
|
|
8
|
-
// name: 'feature name',
|
|
9
|
-
// title: 'Feature Title',
|
|
10
|
-
// value: false
|
|
11
|
-
// },
|
|
12
|
-
]
|
|
13
|
-
|
|
14
|
-
getList(): Observable < AXPFeature[] > {
|
|
15
|
-
return of(this.list).pipe(delay(0));
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
import { AXPFeature, AXPFeatureLoader } from '@acorex/platform/auth';
|
|
2
|
+
import { Observable, delay, of } from 'rxjs';
|
|
3
|
+
|
|
4
|
+
export class <%= upperCase(name) %>FeatureLoader implements AXPFeatureLoader {
|
|
5
|
+
|
|
6
|
+
private list: AXPFeature[] = [
|
|
7
|
+
// {
|
|
8
|
+
// name: 'feature name',
|
|
9
|
+
// title: 'Feature Title',
|
|
10
|
+
// value: false
|
|
11
|
+
// },
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
getList(): Observable < AXPFeature[] > {
|
|
15
|
+
return of(this.list).pipe(delay(0));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { AXPPermission, AXPPermissionLoader, AXPSessionContext } from '@acorex/platform/auth';
|
|
2
|
-
import { AXP_ROOT_CONFIG_TOKEN } from '@acorex/platform/common';
|
|
3
|
-
import { Injectable, inject } from '@angular/core';
|
|
4
|
-
import { Observable, map, of } from 'rxjs';
|
|
5
|
-
|
|
6
|
-
@Injectable()
|
|
7
|
-
export class <%= upperCase(name) %>PermissionLoader implements AXPPermissionLoader {
|
|
8
|
-
|
|
9
|
-
getList(context: AXPSessionContext): Observable<AXPPermission[]> {
|
|
10
|
-
if (context.user?.name == 'Root') {
|
|
11
|
-
return of(['admin', 'platform.admin.settings', 'platform.admin.reports']);
|
|
12
|
-
}
|
|
13
|
-
else if (context.user?.name == 'Admin') {
|
|
14
|
-
return of(['admin', '<%= name %>.admin.settings']);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
return of(['<%= name %>_app.forms']);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
}
|
|
1
|
+
import { AXPPermission, AXPPermissionLoader, AXPSessionContext } from '@acorex/platform/auth';
|
|
2
|
+
import { AXP_ROOT_CONFIG_TOKEN } from '@acorex/platform/common';
|
|
3
|
+
import { Injectable, inject } from '@angular/core';
|
|
4
|
+
import { Observable, map, of } from 'rxjs';
|
|
5
|
+
|
|
6
|
+
@Injectable()
|
|
7
|
+
export class <%= upperCase(name) %>PermissionLoader implements AXPPermissionLoader {
|
|
8
|
+
|
|
9
|
+
getList(context: AXPSessionContext): Observable<AXPPermission[]> {
|
|
10
|
+
if (context.user?.name == 'Root') {
|
|
11
|
+
return of(['admin', 'platform.admin.settings', 'platform.admin.reports']);
|
|
12
|
+
}
|
|
13
|
+
else if (context.user?.name == 'Admin') {
|
|
14
|
+
return of(['admin', '<%= name %>.admin.settings']);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return of(['<%= name %>_app.forms']);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { AXPTenant, AXPTenantLoader, AXPSessionContext } from '@acorex/platform/auth';
|
|
2
|
-
import { AXP_ROOT_CONFIG_TOKEN } from '@acorex/platform/common';
|
|
3
|
-
import { Injectable, inject } from '@angular/core';
|
|
4
|
-
import { Observable, delay, of } from 'rxjs';
|
|
5
|
-
|
|
6
|
-
@Injectable()
|
|
7
|
-
export class <%= upperCase(name) %>TenantLoader implements AXPTenantLoader {
|
|
8
|
-
|
|
9
|
-
getList(context: AXPSessionContext): Observable<AXPTenant[]> {
|
|
10
|
-
|
|
11
|
-
const acorex_tenant = {
|
|
12
|
-
id: '99',
|
|
13
|
-
name: 'acorex-tenant',
|
|
14
|
-
title: 'ACoreX Platform Tenant',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const <%= name %>_tenant = {
|
|
18
|
-
id: '1',
|
|
19
|
-
name: '<%= name %>-tenant',
|
|
20
|
-
title: '<%= upperCase(name) %> Tenant',
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
if (context.user?.name == 'Root') {
|
|
24
|
-
return of([<%= name %>_tenant, acorex_tenant]).pipe(delay(500));
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
return of([<%= name %>_tenant]).pipe(delay(500));
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
}
|
|
1
|
+
import { AXPTenant, AXPTenantLoader, AXPSessionContext } from '@acorex/platform/auth';
|
|
2
|
+
import { AXP_ROOT_CONFIG_TOKEN } from '@acorex/platform/common';
|
|
3
|
+
import { Injectable, inject } from '@angular/core';
|
|
4
|
+
import { Observable, delay, of } from 'rxjs';
|
|
5
|
+
|
|
6
|
+
@Injectable()
|
|
7
|
+
export class <%= upperCase(name) %>TenantLoader implements AXPTenantLoader {
|
|
8
|
+
|
|
9
|
+
getList(context: AXPSessionContext): Observable<AXPTenant[]> {
|
|
10
|
+
|
|
11
|
+
const acorex_tenant = {
|
|
12
|
+
id: '99',
|
|
13
|
+
name: 'acorex-tenant',
|
|
14
|
+
title: 'ACoreX Platform Tenant',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const <%= name %>_tenant = {
|
|
18
|
+
id: '1',
|
|
19
|
+
name: '<%= name %>-tenant',
|
|
20
|
+
title: '<%= upperCase(name) %> Tenant',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
if (context.user?.name == 'Root') {
|
|
24
|
+
return of([<%= name %>_tenant, acorex_tenant]).pipe(delay(500));
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
return of([<%= name %>_tenant]).pipe(delay(500));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
}
|
package/src/generators/app-module/files/src/app/modules/common/translation-root.module.ts.template
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AX_TRANSLATION_CONFIG,
|
|
3
|
-
AX_TRANSLATION_LOADER,
|
|
4
|
-
AXTranslation,
|
|
5
|
-
AXTranslationLoader,
|
|
6
|
-
AXTranslationLoaderOptions,
|
|
7
|
-
AXTranslationModule,
|
|
8
|
-
translationConfig,
|
|
9
|
-
} from '@acorex/core/translation';
|
|
10
|
-
import { HttpClient } from '@angular/common/http';
|
|
11
|
-
|
|
12
|
-
import { Injectable, NgModule } from '@angular/core';
|
|
13
|
-
import { Observable } from 'rxjs';
|
|
14
|
-
|
|
15
|
-
@Injectable()
|
|
16
|
-
export class MyTranslationLoader implements AXTranslationLoader {
|
|
17
|
-
constructor(private http: HttpClient) { }
|
|
18
|
-
|
|
19
|
-
getTranslation(options: AXTranslationLoaderOptions): Observable<AXTranslation> {
|
|
20
|
-
return this.http
|
|
21
|
-
.get<AXTranslation>(`/assets/i18n/${options.lang}/${options.scope}.json`)
|
|
22
|
-
.pipe();
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@NgModule({
|
|
27
|
-
exports: [AXTranslationModule],
|
|
28
|
-
imports: [],
|
|
29
|
-
providers: [
|
|
30
|
-
{
|
|
31
|
-
provide: AX_TRANSLATION_LOADER,
|
|
32
|
-
useClass: MyTranslationLoader,
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
provide: AX_TRANSLATION_CONFIG,
|
|
36
|
-
useValue: translationConfig({
|
|
37
|
-
preloadLangs: ['en'],
|
|
38
|
-
preloadScopes: ['common', 'auth'],
|
|
39
|
-
defaultLang: 'en',
|
|
40
|
-
availableLangs: ['en'],
|
|
41
|
-
}),
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
})
|
|
45
|
-
export class AXPTranslationRootModule { }
|
|
1
|
+
import {
|
|
2
|
+
AX_TRANSLATION_CONFIG,
|
|
3
|
+
AX_TRANSLATION_LOADER,
|
|
4
|
+
AXTranslation,
|
|
5
|
+
AXTranslationLoader,
|
|
6
|
+
AXTranslationLoaderOptions,
|
|
7
|
+
AXTranslationModule,
|
|
8
|
+
translationConfig,
|
|
9
|
+
} from '@acorex/core/translation';
|
|
10
|
+
import { HttpClient } from '@angular/common/http';
|
|
11
|
+
|
|
12
|
+
import { Injectable, NgModule } from '@angular/core';
|
|
13
|
+
import { Observable } from 'rxjs';
|
|
14
|
+
|
|
15
|
+
@Injectable()
|
|
16
|
+
export class MyTranslationLoader implements AXTranslationLoader {
|
|
17
|
+
constructor(private http: HttpClient) { }
|
|
18
|
+
|
|
19
|
+
getTranslation(options: AXTranslationLoaderOptions): Observable<AXTranslation> {
|
|
20
|
+
return this.http
|
|
21
|
+
.get<AXTranslation>(`/assets/i18n/${options.lang}/${options.scope}.json`)
|
|
22
|
+
.pipe();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@NgModule({
|
|
27
|
+
exports: [AXTranslationModule],
|
|
28
|
+
imports: [],
|
|
29
|
+
providers: [
|
|
30
|
+
{
|
|
31
|
+
provide: AX_TRANSLATION_LOADER,
|
|
32
|
+
useClass: MyTranslationLoader,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
provide: AX_TRANSLATION_CONFIG,
|
|
36
|
+
useValue: translationConfig({
|
|
37
|
+
preloadLangs: ['en'],
|
|
38
|
+
preloadScopes: ['common', 'auth'],
|
|
39
|
+
defaultLang: 'en',
|
|
40
|
+
availableLangs: ['en'],
|
|
41
|
+
}),
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
})
|
|
45
|
+
export class AXPTranslationRootModule { }
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { AXPEntityConfig, AXPEntityLoader } from '@acorex/platform/common';
|
|
2
|
-
import { Injectable, Injector, inject } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
@Injectable()
|
|
5
|
-
export class AXPRootEntityLoader implements AXPEntityLoader {
|
|
6
|
-
private injector = inject(Injector);
|
|
7
|
-
|
|
8
|
-
async get(moduleName: string, entityName: string): Promise<AXPEntityConfig | null> {
|
|
9
|
-
return new Promise(async (resolve) => {
|
|
10
|
-
switch (entityName) {
|
|
11
|
-
case 'sample': {
|
|
12
|
-
const entity = (await import('../<%= name %>/sample/sample.entity')).entityFactory;
|
|
13
|
-
resolve(entity(this.injector));
|
|
14
|
-
break;
|
|
15
|
-
}
|
|
16
|
-
default:
|
|
17
|
-
resolve(null);
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
1
|
+
import { AXPEntityConfig, AXPEntityLoader } from '@acorex/platform/common';
|
|
2
|
+
import { Injectable, Injector, inject } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Injectable()
|
|
5
|
+
export class AXPRootEntityLoader implements AXPEntityLoader {
|
|
6
|
+
private injector = inject(Injector);
|
|
7
|
+
|
|
8
|
+
async get(moduleName: string, entityName: string): Promise<AXPEntityConfig | null> {
|
|
9
|
+
return new Promise(async (resolve) => {
|
|
10
|
+
switch (entityName) {
|
|
11
|
+
case 'sample': {
|
|
12
|
+
const entity = (await import('../<%= name %>/sample/sample.entity')).entityFactory;
|
|
13
|
+
resolve(entity(this.injector));
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
default:
|
|
17
|
+
resolve(null);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
package/src/generators/app-module/files/src/app/modules/layout/layout-root.module.ts.template
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AXPAdminLayoutModule,
|
|
3
|
-
AXPLayoutModule,
|
|
4
|
-
} from '@acorex/platform/layouts';
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
AXPFooterTextSlotComponent,
|
|
8
|
-
AXPNavBarSlotComponent,
|
|
9
|
-
AXPThemeSlotComponent,
|
|
10
|
-
AXP_ENTITY_LOADER,
|
|
11
|
-
AXPComponentSlotModule,
|
|
12
|
-
} from '@acorex/platform/common';
|
|
13
|
-
import { NgModule, inject } from '@angular/core';
|
|
14
|
-
import { AXPRootMenuLoader } from './menu.loader';
|
|
15
|
-
import { AXPRootEntityLoader } from './entity.loader';
|
|
16
|
-
import { AXPCommonModule, AXPMenuItem, AXPNavigateAction, AXP_MENU_LOADER, AXP_PLATFORM_CONFIG_TOKEN } from '@acorex/platform/common';
|
|
17
|
-
import pkg from '../../../../../../package.json';
|
|
18
|
-
import { AXPComponentSlotModule } from '@acorex/platform/layout/builder';
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
@NgModule({
|
|
22
|
-
imports: [
|
|
23
|
-
AXPAdminLayoutModule,
|
|
24
|
-
AXPCommonModule,
|
|
25
|
-
AXPLayoutModule,
|
|
26
|
-
AXPComponentSlotModule.forRoot({
|
|
27
|
-
"footer-start": [
|
|
28
|
-
{
|
|
29
|
-
name: "version",
|
|
30
|
-
component: AXPFooterTextSlotComponent,
|
|
31
|
-
options: () => {
|
|
32
|
-
return { text: `v${pkg.version}` };
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
name: "copyright",
|
|
37
|
-
component: AXPFooterTextSlotComponent,
|
|
38
|
-
options: () => {
|
|
39
|
-
const a = inject(AXP_PLATFORM_CONFIG_TOKEN);
|
|
40
|
-
return { text: a.copyright };
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
"auth-footer-links": [
|
|
45
|
-
{
|
|
46
|
-
name: "links",
|
|
47
|
-
component: AXPNavBarSlotComponent,
|
|
48
|
-
options: () => {
|
|
49
|
-
const items: AXPMenuItem[] = [
|
|
50
|
-
// {
|
|
51
|
-
// text: 'About',
|
|
52
|
-
// command: AXPNavigateAction({ payload: { commands: ['asc/help/about'] } })
|
|
53
|
-
// }
|
|
54
|
-
];
|
|
55
|
-
return { items };
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
],
|
|
59
|
-
"header-end": [
|
|
60
|
-
{
|
|
61
|
-
name: 'theme',
|
|
62
|
-
component: AXPThemeSlotComponent,
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
})
|
|
66
|
-
],
|
|
67
|
-
exports: [],
|
|
68
|
-
providers: [
|
|
69
|
-
{
|
|
70
|
-
provide: AXP_MENU_LOADER,
|
|
71
|
-
useClass: AXPRootMenuLoader
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
provide: AXP_ENTITY_LOADER,
|
|
75
|
-
useClass: AXPRootEntityLoader
|
|
76
|
-
},
|
|
77
|
-
],
|
|
78
|
-
})
|
|
79
|
-
export class AXPLayoutRootModule { }
|
|
1
|
+
import {
|
|
2
|
+
AXPAdminLayoutModule,
|
|
3
|
+
AXPLayoutModule,
|
|
4
|
+
} from '@acorex/platform/layouts';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
AXPFooterTextSlotComponent,
|
|
8
|
+
AXPNavBarSlotComponent,
|
|
9
|
+
AXPThemeSlotComponent,
|
|
10
|
+
AXP_ENTITY_LOADER,
|
|
11
|
+
AXPComponentSlotModule,
|
|
12
|
+
} from '@acorex/platform/common';
|
|
13
|
+
import { NgModule, inject } from '@angular/core';
|
|
14
|
+
import { AXPRootMenuLoader } from './menu.loader';
|
|
15
|
+
import { AXPRootEntityLoader } from './entity.loader';
|
|
16
|
+
import { AXPCommonModule, AXPMenuItem, AXPNavigateAction, AXP_MENU_LOADER, AXP_PLATFORM_CONFIG_TOKEN } from '@acorex/platform/common';
|
|
17
|
+
import pkg from '../../../../../../package.json';
|
|
18
|
+
import { AXPComponentSlotModule } from '@acorex/platform/layout/builder';
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@NgModule({
|
|
22
|
+
imports: [
|
|
23
|
+
AXPAdminLayoutModule,
|
|
24
|
+
AXPCommonModule,
|
|
25
|
+
AXPLayoutModule,
|
|
26
|
+
AXPComponentSlotModule.forRoot({
|
|
27
|
+
"footer-start": [
|
|
28
|
+
{
|
|
29
|
+
name: "version",
|
|
30
|
+
component: AXPFooterTextSlotComponent,
|
|
31
|
+
options: () => {
|
|
32
|
+
return { text: `v${pkg.version}` };
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "copyright",
|
|
37
|
+
component: AXPFooterTextSlotComponent,
|
|
38
|
+
options: () => {
|
|
39
|
+
const a = inject(AXP_PLATFORM_CONFIG_TOKEN);
|
|
40
|
+
return { text: a.copyright };
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
"auth-footer-links": [
|
|
45
|
+
{
|
|
46
|
+
name: "links",
|
|
47
|
+
component: AXPNavBarSlotComponent,
|
|
48
|
+
options: () => {
|
|
49
|
+
const items: AXPMenuItem[] = [
|
|
50
|
+
// {
|
|
51
|
+
// text: 'About',
|
|
52
|
+
// command: AXPNavigateAction({ payload: { commands: ['asc/help/about'] } })
|
|
53
|
+
// }
|
|
54
|
+
];
|
|
55
|
+
return { items };
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"header-end": [
|
|
60
|
+
{
|
|
61
|
+
name: 'theme',
|
|
62
|
+
component: AXPThemeSlotComponent,
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
})
|
|
66
|
+
],
|
|
67
|
+
exports: [],
|
|
68
|
+
providers: [
|
|
69
|
+
{
|
|
70
|
+
provide: AXP_MENU_LOADER,
|
|
71
|
+
useClass: AXPRootMenuLoader
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
provide: AXP_ENTITY_LOADER,
|
|
75
|
+
useClass: AXPRootEntityLoader
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
})
|
|
79
|
+
export class AXPLayoutRootModule { }
|