@genesislcap/blank-app-seed 3.17.1 → 3.18.0
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/.genx/package.json +1 -1
- package/.genx/templates/angular/chart.hbs +9 -0
- package/.genx/templates/angular/entityManager.hbs +45 -0
- package/.genx/templates/angular/form.hbs +8 -0
- package/.genx/templates/angular/grid.hbs +18 -0
- package/.genx/templates/angular/route.hbs +19 -1
- package/.genx/templates/angular/route.styles.hbs +1 -1
- package/.genx/templates/angular/route.template.hbs +2 -2
- package/.genx/utils/formatRouteData.js +22 -11
- package/.genx/utils/registerPartials.js +25 -8
- package/.genx/versions.json +2 -2
- package/CHANGELOG.md +3 -3
- package/client-tmp/angular/angular.json +2 -2
- package/client-tmp/angular/package.json +5 -3
- package/client-tmp/angular/src/app/app-routing.module.ts +34 -0
- package/client-tmp/angular/src/app/app.component.html +2 -3
- package/client-tmp/angular/src/app/app.component.ts +13 -7
- package/client-tmp/angular/src/app/app.config.ts +29 -5
- package/client-tmp/angular/src/app/app.module.ts +26 -0
- package/client-tmp/angular/src/app/directive/app-lazy-load.directive.ts +45 -0
- package/client-tmp/angular/src/app/guards/auth.guard.ts +1 -1
- package/client-tmp/angular/src/app/layouts/base.layout.ts +13 -0
- package/client-tmp/angular/src/app/layouts/blank/blank.layout.css +11 -0
- package/client-tmp/angular/src/app/layouts/blank/blank.layout.html +6 -0
- package/client-tmp/angular/src/app/layouts/blank/blank.layout.spec.ts +23 -0
- package/client-tmp/angular/src/app/layouts/blank/blank.layout.ts +16 -0
- package/client-tmp/angular/src/app/layouts/default/default.layout.css +49 -0
- package/client-tmp/angular/src/app/layouts/default/default.layout.html +20 -0
- package/client-tmp/angular/src/app/layouts/default/default.layout.spec.ts +34 -0
- package/client-tmp/angular/src/app/layouts/default/default.layout.ts +41 -0
- package/client-tmp/angular/src/app/share/foundation-auth.ts +0 -1
- package/client-tmp/angular/src/app/share/foundation-login.ts +3 -3
- package/client-tmp/angular/src/app/share/genesis-components.ts +29 -15
- package/client-tmp/angular/src/app/types/layout.ts +5 -0
- package/client-tmp/angular/src/app/types/menu.ts +8 -0
- package/client-tmp/angular/src/app/utils/getLayoutNameByRoute.ts +14 -0
- package/client-tmp/angular/src/main.ts +4 -4
- package/client-tmp/angular/src/styles/design-tokens.json +56 -0
- package/client-tmp/angular/src/styles/styles.css +29 -0
- package/client-tmp/angular/src/styles.css +1 -1
- package/client-tmp/angular/tsconfig.json +2 -1
- package/client-tmp/web-components/globals.d.ts +6 -0
- package/client-tmp/web-components/package.json +0 -2
- package/client-tmp/web-components/src/components/components.ts +1 -7
- package/client-tmp/web-components/tsconfig.json +4 -1
- package/package.json +1 -1
- package/client-tmp/angular/src/app/app.routes.ts +0 -28
- package/client-tmp/angular/src/app/pages/home/home.component.css +0 -3
- package/client-tmp/angular/src/app/pages/home/home.component.html +0 -1
- package/client-tmp/angular/src/app/pages/home/home.component.ts +0 -16
- /package/.genx/templates/{chart.hbs → web-components/chart.hbs} +0 -0
- /package/.genx/templates/{entityManager.hbs → web-components/entityManager.hbs} +0 -0
- /package/.genx/templates/{form.hbs → web-components/form.hbs} +0 -0
- /package/.genx/templates/{grid.hbs → web-components/grid.hbs} +0 -0
package/.genx/package.json
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<rapid-g2plot-chart
|
|
2
|
+
type="{{ config.type }}"
|
|
3
|
+
[config]="tile{{ config.index }}.chartConfig"
|
|
4
|
+
>
|
|
5
|
+
<chart-datasource
|
|
6
|
+
resourceName="{{ config.resourceName }}"
|
|
7
|
+
server-fields="{{ config.xField }} {{ config.yField }}"
|
|
8
|
+
></chart-datasource>
|
|
9
|
+
</rapid-g2plot-chart>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<entity-management
|
|
2
|
+
design-system-prefix="rapid"
|
|
3
|
+
enable-row-flashing
|
|
4
|
+
enable-cell-flashing
|
|
5
|
+
{{#if config.title}}
|
|
6
|
+
title="{{ config.title }}"
|
|
7
|
+
{{/if}}
|
|
8
|
+
resourceName="{{ config.resourceName }}"
|
|
9
|
+
{{#if config.createEvent}}
|
|
10
|
+
createEvent="{{ config.createEvent }}"
|
|
11
|
+
{{#if config.createFormUiSchema}}
|
|
12
|
+
[createFormUiSchema]="tile{{ config.index }}.createFormUiSchema"
|
|
13
|
+
{{/if}}
|
|
14
|
+
{{/if}}
|
|
15
|
+
{{#if config.updateEvent}}
|
|
16
|
+
updateEvent="{{ config.updateEvent }}"
|
|
17
|
+
{{#if config.updateFormUiSchema}}
|
|
18
|
+
[updateFormUiSchema]="tile{{ config.index }}.updateFormUiSchema"
|
|
19
|
+
{{/if}}
|
|
20
|
+
{{/if}}
|
|
21
|
+
{{#if config.deleteEvent}}
|
|
22
|
+
deleteEvent="{{ config.deleteEvent }}"
|
|
23
|
+
{{/if}}
|
|
24
|
+
{{#if config.gridOptions}}
|
|
25
|
+
[gridOptions]="{{ config.gridOptions }}"
|
|
26
|
+
{{/if}}
|
|
27
|
+
{{#if config.snapshot}}
|
|
28
|
+
[datasourceConfig]="{ isSnapshot: {{ config.snapshot }} }"
|
|
29
|
+
{{/if}}
|
|
30
|
+
{{#if config.reqrep}}
|
|
31
|
+
[datasourceConfig]="tile{{ config.index }}.reqrep"
|
|
32
|
+
{{/if}}
|
|
33
|
+
{{#if config.columns}}
|
|
34
|
+
[columns]="tile{{ config.index }}.columns"
|
|
35
|
+
{{/if}}
|
|
36
|
+
{{#if config.modalPosition}}
|
|
37
|
+
modal-position="{{ config.modalPosition }}"
|
|
38
|
+
{{/if}}
|
|
39
|
+
{{#if config.sizeColumnsToFit}}
|
|
40
|
+
size-columns-to-fit
|
|
41
|
+
{{/if}}
|
|
42
|
+
{{#if config.enableSearchBar}}
|
|
43
|
+
enable-search-bar
|
|
44
|
+
{{/if}}
|
|
45
|
+
></entity-management>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<rapid-grid-pro
|
|
2
|
+
enable-row-flashing
|
|
3
|
+
enable-cell-flashing
|
|
4
|
+
>
|
|
5
|
+
<grid-pro-genesis-datasource
|
|
6
|
+
resource-name="{{config.resourceName}}"
|
|
7
|
+
{{#if config.snapshot}}
|
|
8
|
+
isSnapshot="{{config.snapshot}}"
|
|
9
|
+
{{/if}}
|
|
10
|
+
{{#if config.reqrep}}
|
|
11
|
+
[datasourceConfig]="tile{{ config.index }}.reqrep"
|
|
12
|
+
{{/if}}
|
|
13
|
+
{{#if config.gridOptions}}
|
|
14
|
+
[deferredGridOptions]="tile{{ config.index }}.gridOptions"
|
|
15
|
+
{{/if}}
|
|
16
|
+
>
|
|
17
|
+
</grid-pro-genesis-datasource>
|
|
18
|
+
</rapid-grid-pro>
|
|
@@ -11,4 +11,22 @@ import {CommonModule} from '@angular/common';
|
|
|
11
11
|
templateUrl: './{{kebabCase route.name}}.component.html',
|
|
12
12
|
styleUrls: ['./{{kebabCase route.name}}.component.css'],
|
|
13
13
|
})
|
|
14
|
-
export class {{pascalCase route.name}}Component {
|
|
14
|
+
export class {{pascalCase route.name}}Component {
|
|
15
|
+
{{#each route.tiles}}
|
|
16
|
+
tile{{this.config.index}} = { {{#if this.config.createFormUiSchema}}
|
|
17
|
+
"createFormUiSchema": {{{ this.config.createFormUiSchema }}},{{/if}}{{#if this.config.updateFormUiSchema}}
|
|
18
|
+
"updateFormUiSchema": {{{ this.config.updateFormUiSchema }}},{{/if}}{{#if this.config.uischema}}
|
|
19
|
+
"uischema": {{{ this.config.uischema }}},{{/if}}{{#if this.config.gridOptions}}
|
|
20
|
+
"gridOptions": {{{ this.config.gridOptions }}},{{/if}}{{#if this.config.reqrep}}
|
|
21
|
+
"reqrep": {{{ this.config.reqrep }}},{{/if}}{{#if this.config.columns}}
|
|
22
|
+
"columns": {{{ this.config.columns }}},{{/if}}{{#if this.config.type}}
|
|
23
|
+
"chartConfig": { {{#ifEquals this.config.type 'pie'}}
|
|
24
|
+
"radius": 0.75,
|
|
25
|
+
"angleField": "value",
|
|
26
|
+
"colorField": "groupBy",{{else}}
|
|
27
|
+
"xField": "groupBy",
|
|
28
|
+
"yField": "value",{{/ifEquals}}
|
|
29
|
+
},{{/if}}
|
|
30
|
+
}{{#unless @last}};{{/unless}}
|
|
31
|
+
{{/each}}
|
|
32
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{{#if route.tiles}}
|
|
2
|
-
<
|
|
2
|
+
<rapid-layout auto-save-key="{{route.layoutKey}}">
|
|
3
3
|
{{> (lookup ./route 'layoutType') }}
|
|
4
|
-
</
|
|
4
|
+
</rapid-layout>
|
|
5
5
|
{{else}}
|
|
6
6
|
<!-- insert template code here -->
|
|
7
7
|
Welcome to {{sentenceCase route.name}}
|
|
@@ -11,18 +11,29 @@ const formatRouteData = (route) => {
|
|
|
11
11
|
const FDC3EventHandlersEnabled = !!route.tiles?.find(
|
|
12
12
|
(t) => t.config?.gridOptions?.onRowClicked?.category === FDC3ClickCategory,
|
|
13
13
|
);
|
|
14
|
+
const tiles = route.tiles?.map((tile, index) => {
|
|
15
|
+
const config = tile.config || {};
|
|
16
|
+
const {
|
|
17
|
+
gridOptions,
|
|
18
|
+
createFormUiSchema,
|
|
19
|
+
updateFormUiSchema,
|
|
20
|
+
uischema,
|
|
21
|
+
columns,
|
|
22
|
+
} = config;
|
|
14
23
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
return {
|
|
25
|
+
...tile,
|
|
26
|
+
config: {
|
|
27
|
+
...config,
|
|
28
|
+
index,
|
|
29
|
+
gridOptions: gridOptionsSerializer(gridOptions),
|
|
30
|
+
createFormUiSchema: formatJSONValue(createFormUiSchema),
|
|
31
|
+
updateFormUiSchema: formatJSONValue(updateFormUiSchema),
|
|
32
|
+
uischema: formatJSONValue(uischema),
|
|
33
|
+
columns: gridColumnsSerializer(columns),
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
});
|
|
26
37
|
|
|
27
38
|
return {
|
|
28
39
|
...route,
|
|
@@ -1,25 +1,42 @@
|
|
|
1
1
|
const { resolve } = require('node:path');
|
|
2
|
+
const {
|
|
3
|
+
DIR_TEMPLATE_ROOT_ALIAS,
|
|
4
|
+
DIRS_MAP,
|
|
5
|
+
DIR_TEMPLATE_BY_FRAMEWORK,
|
|
6
|
+
} = require('../static');
|
|
7
|
+
|
|
8
|
+
const registerPartials = ({ registerPartial }, framework) => {
|
|
9
|
+
const rootTemplateDir = `../${DIRS_MAP.get(DIR_TEMPLATE_ROOT_ALIAS)}`;
|
|
10
|
+
const sourceTemplateDir = `../${DIR_TEMPLATE_BY_FRAMEWORK[framework]}`;
|
|
2
11
|
|
|
3
|
-
const registerPartials = ({ registerPartial }) => {
|
|
4
12
|
registerPartial(
|
|
5
13
|
'grid-layout',
|
|
6
|
-
resolve(__dirname,
|
|
14
|
+
resolve(__dirname, `${rootTemplateDir}/gridLayout.hbs`),
|
|
7
15
|
);
|
|
8
16
|
registerPartial(
|
|
9
17
|
'tabs-layout',
|
|
10
|
-
resolve(__dirname,
|
|
18
|
+
resolve(__dirname, `${rootTemplateDir}/tabsLayout.hbs`),
|
|
11
19
|
);
|
|
12
20
|
registerPartial(
|
|
13
21
|
'horizontal-layout',
|
|
14
|
-
resolve(__dirname,
|
|
22
|
+
resolve(__dirname, `${rootTemplateDir}/horizontalLayout.hbs`),
|
|
23
|
+
);
|
|
24
|
+
registerPartial(
|
|
25
|
+
'smart-form',
|
|
26
|
+
resolve(__dirname, `${sourceTemplateDir}/form.hbs`),
|
|
27
|
+
);
|
|
28
|
+
registerPartial(
|
|
29
|
+
'chart',
|
|
30
|
+
resolve(__dirname, `${sourceTemplateDir}/chart.hbs`),
|
|
15
31
|
);
|
|
16
|
-
registerPartial('smart-form', resolve(__dirname, '../templates/form.hbs'));
|
|
17
|
-
registerPartial('chart', resolve(__dirname, '../templates/chart.hbs'));
|
|
18
32
|
registerPartial(
|
|
19
33
|
'entity-manager',
|
|
20
|
-
resolve(__dirname,
|
|
34
|
+
resolve(__dirname, `${sourceTemplateDir}/entityManager.hbs`),
|
|
35
|
+
);
|
|
36
|
+
registerPartial(
|
|
37
|
+
'grid-pro',
|
|
38
|
+
resolve(__dirname, `${sourceTemplateDir}/grid.hbs`),
|
|
21
39
|
);
|
|
22
|
-
registerPartial('grid-pro', resolve(__dirname, '../templates/grid.hbs'));
|
|
23
40
|
};
|
|
24
41
|
|
|
25
42
|
module.exports = registerPartials;
|
package/.genx/versions.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [3.
|
|
3
|
+
## [3.18.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.17.1...v3.18.0) (2024-06-25)
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
###
|
|
6
|
+
### Features
|
|
7
7
|
|
|
8
|
-
*
|
|
8
|
+
* tile support in angular [FUI-1969](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/1969) (#253) 2812af6
|
|
9
9
|
|
|
10
10
|
## [3.17.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.16.1...v3.17.0) (2024-06-21)
|
|
11
11
|
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"polyfills": ["zone.js"],
|
|
26
26
|
"tsConfig": "tsconfig.app.json",
|
|
27
27
|
"assets": ["src/favicon.ico", "src/assets"],
|
|
28
|
-
"styles": ["src/styles.css"],
|
|
28
|
+
"styles": ["src/styles/styles.css"],
|
|
29
29
|
"scripts": [],
|
|
30
30
|
"allowedCommonJsDependencies": [
|
|
31
31
|
"lodash",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"polyfills": ["zone.js", "zone.js/testing"],
|
|
118
118
|
"tsConfig": "tsconfig.spec.json",
|
|
119
119
|
"assets": ["src/favicon.ico", "src/assets"],
|
|
120
|
-
"styles": ["src/styles.css"],
|
|
120
|
+
"styles": ["src/styles/styles.css"],
|
|
121
121
|
"scripts": []
|
|
122
122
|
}
|
|
123
123
|
},
|
|
@@ -19,12 +19,14 @@
|
|
|
19
19
|
"@angular/platform-browser": "^17.1.0",
|
|
20
20
|
"@angular/platform-browser-dynamic": "^17.1.0",
|
|
21
21
|
"@angular/router": "^17.1.0",
|
|
22
|
-
"@genesislcap/foundation-ui": "{{versions.UI}}",
|
|
23
22
|
"@genesislcap/foundation-comms": "{{versions.UI}}",
|
|
24
23
|
"@genesislcap/foundation-login": "{{versions.UI}}",
|
|
25
|
-
"@genesislcap/foundation-zero": "{{versions.UI}}",
|
|
26
24
|
"@genesislcap/foundation-entity-management": "{{versions.UI}}",
|
|
27
|
-
"@genesislcap/foundation-
|
|
25
|
+
"@genesislcap/foundation-header": "{{versions.UI}}",
|
|
26
|
+
"@genesislcap/foundation-ui": "{{versions.UI}}",
|
|
27
|
+
"@genesislcap/rapid-design-system": "{{versions.UI}}",
|
|
28
|
+
"@genesislcap/rapid-grid-pro": "{{versions.UI}}",
|
|
29
|
+
"@genesislcap/foundation-layout": "{{versions.UI}}",
|
|
28
30
|
"@genesislcap/g2plot-chart": "{{versions.UI}}",
|
|
29
31
|
"rxjs": "~7.8.0",
|
|
30
32
|
"tslib": "^2.3.0",
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { RouterModule, Routes } from '@angular/router';
|
|
3
|
+
import { AuthGuard } from './guards/auth.guard';
|
|
4
|
+
import { AuthLoginComponent } from './pages/auth-login/auth-login.component';
|
|
5
|
+
{{#each routes}}
|
|
6
|
+
import { {{pascalCase this.name}}Component } from './pages/{{kebabCase this.name}}/{{kebabCase this.name}}.component';
|
|
7
|
+
{{/each}}
|
|
8
|
+
|
|
9
|
+
export const AUTH_PATH = 'login'
|
|
10
|
+
|
|
11
|
+
export const routes: Routes = [
|
|
12
|
+
{
|
|
13
|
+
path: '',
|
|
14
|
+
redirectTo: `${AUTH_PATH}`,
|
|
15
|
+
pathMatch: 'full',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
path: `${AUTH_PATH}`,
|
|
19
|
+
component: AuthLoginComponent,
|
|
20
|
+
},
|
|
21
|
+
{{#each routes}}
|
|
22
|
+
{
|
|
23
|
+
path: '{{kebabCase this.name}}',
|
|
24
|
+
canActivate: [AuthGuard],
|
|
25
|
+
component: {{pascalCase this.name}}Component ,
|
|
26
|
+
},
|
|
27
|
+
{{/each}}
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
@NgModule({
|
|
31
|
+
imports: [RouterModule.forRoot(routes)],
|
|
32
|
+
exports: [RouterModule],
|
|
33
|
+
})
|
|
34
|
+
export class AppRoutingModule {}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
</zero-design-system-provider>
|
|
1
|
+
<ng-container *appLayoutLazyLoad="layoutName"></ng-container>
|
|
2
|
+
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
import { Component
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { Router, NavigationEnd } from '@angular/router';
|
|
3
|
+
import getLayoutNameByRoute from './utils/getLayoutNameByRoute';
|
|
4
|
+
import type { LayoutComponentName } from './types/layout';
|
|
4
5
|
import { configureFoundationLogin } from './share/foundation-login';
|
|
5
6
|
|
|
6
7
|
// Genesis Components
|
|
7
8
|
import './share/genesis-components';
|
|
8
9
|
|
|
9
|
-
|
|
10
10
|
@Component({
|
|
11
11
|
selector: '{{rootElement}}',
|
|
12
|
-
standalone: true,
|
|
13
|
-
imports: [RouterOutlet],
|
|
14
12
|
templateUrl: './app.component.html',
|
|
15
13
|
styleUrl: './app.component.css',
|
|
16
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
17
14
|
})
|
|
18
15
|
export class AppComponent {
|
|
16
|
+
layoutName?: LayoutComponentName;
|
|
19
17
|
title = '{{capitalCase appName}}';
|
|
20
18
|
|
|
21
19
|
constructor(
|
|
22
20
|
private router: Router,
|
|
23
21
|
) {
|
|
24
22
|
configureFoundationLogin({ router });
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
// Set layout componet based on route
|
|
26
|
+
router.events.subscribe((event: any) => {
|
|
27
|
+
if (event instanceof NavigationEnd) {
|
|
28
|
+
this.layoutName = getLayoutNameByRoute(event.urlAfterRedirects);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
25
31
|
}
|
|
26
32
|
}
|
|
@@ -1,7 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { MainMenu } from './types/menu'
|
|
2
|
+
import type { LayoutComponentName } from './types/layout';
|
|
3
|
+
import { AUTH_PATH } from './app-routing.module';
|
|
4
4
|
|
|
5
|
-
export const
|
|
6
|
-
|
|
5
|
+
export const layoutComponentName = {
|
|
6
|
+
default: 'DefaultLayoutComponent',
|
|
7
|
+
blank: 'BlankLayoutComponent',
|
|
7
8
|
};
|
|
9
|
+
|
|
10
|
+
export const layoutComponentImportsByName = {
|
|
11
|
+
[layoutComponentName.default]: () =>
|
|
12
|
+
import('./layouts/default/default.layout').then((m) => m.DefaultLayoutComponent),
|
|
13
|
+
[layoutComponentName.blank]: () =>
|
|
14
|
+
import('./layouts/blank/blank.layout').then((m) => m.BlankLayoutComponent),
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const layoutNameByRouteMap: Map<string, LayoutComponentName> = new Map([
|
|
18
|
+
[`/${AUTH_PATH}`, layoutComponentName.blank],
|
|
19
|
+
]);
|
|
20
|
+
|
|
21
|
+
export const mainMenu: MainMenu = [
|
|
22
|
+
{{#each routes}}
|
|
23
|
+
{
|
|
24
|
+
index: {{@index}},
|
|
25
|
+
path: '{{kebabCase this.name}}',
|
|
26
|
+
title: '{{#if this.title}}{{this.title}}{{else}}{{this.name}}{{/if}}',
|
|
27
|
+
icon: '{{this.icon}}',
|
|
28
|
+
variant: 'solid'
|
|
29
|
+
}{{#unless @last}},{{/unless}}
|
|
30
|
+
{{/each}}
|
|
31
|
+
];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
2
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
3
|
+
import { FormsModule } from '@angular/forms';
|
|
4
|
+
import { AppRoutingModule } from './app-routing.module';
|
|
5
|
+
import { AppComponent } from './app.component';
|
|
6
|
+
import { DefaultLayoutComponent } from './layouts/default/default.layout';
|
|
7
|
+
import { BlankLayoutComponent } from './layouts/blank/blank.layout';
|
|
8
|
+
import { LayoutLazyLoadDirective } from './directive/app-lazy-load.directive';
|
|
9
|
+
|
|
10
|
+
@NgModule({
|
|
11
|
+
declarations: [
|
|
12
|
+
AppComponent,
|
|
13
|
+
LayoutLazyLoadDirective,
|
|
14
|
+
DefaultLayoutComponent,
|
|
15
|
+
BlankLayoutComponent,
|
|
16
|
+
],
|
|
17
|
+
imports: [
|
|
18
|
+
AppRoutingModule,
|
|
19
|
+
BrowserModule,
|
|
20
|
+
FormsModule,
|
|
21
|
+
],
|
|
22
|
+
providers: [],
|
|
23
|
+
bootstrap: [AppComponent],
|
|
24
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
25
|
+
})
|
|
26
|
+
export class AppModule {}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Directive,
|
|
3
|
+
ViewContainerRef,
|
|
4
|
+
Input,
|
|
5
|
+
OnInit,
|
|
6
|
+
OnChanges,
|
|
7
|
+
SimpleChanges,
|
|
8
|
+
} from '@angular/core';
|
|
9
|
+
import { layoutComponentImportsByName } from '../app.config';
|
|
10
|
+
@Directive({
|
|
11
|
+
selector: '[appLayoutLazyLoad]',
|
|
12
|
+
})
|
|
13
|
+
export class LayoutLazyLoadDirective implements OnInit, OnChanges {
|
|
14
|
+
@Input('appLayoutLazyLoad') componentName?: string;
|
|
15
|
+
|
|
16
|
+
constructor(private viewContainerRef: ViewContainerRef) {}
|
|
17
|
+
|
|
18
|
+
ngOnInit() {
|
|
19
|
+
this.loadComponent();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
ngOnChanges({ componentName }: SimpleChanges) {
|
|
23
|
+
const currentValue = componentName?.currentValue;
|
|
24
|
+
const previousValue = componentName?.previousValue;
|
|
25
|
+
|
|
26
|
+
if (currentValue && currentValue !== previousValue) {
|
|
27
|
+
this.loadComponent();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async loadComponent() {
|
|
32
|
+
this.viewContainerRef.clear();
|
|
33
|
+
|
|
34
|
+
if (!this.componentName) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (!layoutComponentImportsByName[this.componentName]) {
|
|
39
|
+
console.error(`Unknown component name: ${this.componentName}`);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const component = await layoutComponentImportsByName[this.componentName]();
|
|
43
|
+
this.viewContainerRef.createComponent(component);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Injectable } from '@angular/core';
|
|
2
2
|
import { CanActivate, Router } from '@angular/router';
|
|
3
|
-
import { AUTH_PATH } from '../app.routes';
|
|
4
3
|
import { AuthService } from '../services/auth.service';
|
|
4
|
+
import { AUTH_PATH } from '../app-routing.module';
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
@Injectable({
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
2
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
3
|
+
|
|
4
|
+
import { BlankLayoutComponent } from './blank.layout';
|
|
5
|
+
|
|
6
|
+
describe('BlankLayoutComponent', () => {
|
|
7
|
+
let component: BlankLayoutComponent;
|
|
8
|
+
let fixture: ComponentFixture<BlankLayoutComponent>;
|
|
9
|
+
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
TestBed.configureTestingModule({
|
|
12
|
+
declarations: [BlankLayoutComponent],
|
|
13
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
14
|
+
});
|
|
15
|
+
fixture = TestBed.createComponent(BlankLayoutComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component, ElementRef, ViewChild, AfterViewInit } from '@angular/core';
|
|
2
|
+
import { configureDesignSystem } from '@genesislcap/foundation-ui';
|
|
3
|
+
import * as designTokens from '../../../styles/design-tokens.json';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'app-blank-layout',
|
|
7
|
+
templateUrl: './blank.layout.html',
|
|
8
|
+
styleUrls: ['./blank.layout.css'],
|
|
9
|
+
})
|
|
10
|
+
export class BlankLayoutComponent implements AfterViewInit {
|
|
11
|
+
@ViewChild('designSystemProvider') designSystemProviderElement!: ElementRef;
|
|
12
|
+
|
|
13
|
+
ngAfterViewInit() {
|
|
14
|
+
configureDesignSystem(this.designSystemProviderElement.nativeElement, designTokens);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
height: 100%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.container {
|
|
8
|
+
position: relative;
|
|
9
|
+
height: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
rapid-design-system-provider {
|
|
13
|
+
height: 100%;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
background-color: var(--neutral-fill-stealth-active);
|
|
17
|
+
color: var(--neutral-foreground-rest);
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
foundation-header {
|
|
22
|
+
z-index: 999;
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 0px;
|
|
25
|
+
left: 0px;
|
|
26
|
+
width: 100%;
|
|
27
|
+
align-items: center;
|
|
28
|
+
border: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
foundation-header::part(background) {
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.routes-wrapper {
|
|
36
|
+
display: flex;
|
|
37
|
+
gap: calc(var(--design-unit) * 2px);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.content {
|
|
41
|
+
width: 100%;
|
|
42
|
+
flex-grow: 1;
|
|
43
|
+
position: absolute;
|
|
44
|
+
top: 0;
|
|
45
|
+
bottom: 0;
|
|
46
|
+
left: 0;
|
|
47
|
+
right: 0;
|
|
48
|
+
padding-top: var(--nav-height);
|
|
49
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<rapid-design-system-provider #designSystemProvider>
|
|
2
|
+
<foundation-header
|
|
3
|
+
#foundationHeader
|
|
4
|
+
show-luminance-toggle-button
|
|
5
|
+
show-misc-toggle-button
|
|
6
|
+
(luminance-icon-clicked)="onLuminanceToogle()"
|
|
7
|
+
[navigateTo]="navigateAngular"
|
|
8
|
+
>
|
|
9
|
+
<section class="routes-wrapper" slot="routes">
|
|
10
|
+
<rapid-button *ngFor="let menuLink of allRoutes" (click)="navigate(menuLink.path)" >
|
|
11
|
+
<rapid-icon name="\{{ menuLink.icon }}"></rapid-icon>
|
|
12
|
+
\{{ menuLink.title }}
|
|
13
|
+
</rapid-button>
|
|
14
|
+
</section>
|
|
15
|
+
</foundation-header>
|
|
16
|
+
<section class="content">
|
|
17
|
+
<router-outlet></router-outlet>
|
|
18
|
+
<app-messages></app-messages>
|
|
19
|
+
</section>
|
|
20
|
+
</rapid-design-system-provider>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
2
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
3
|
+
import { provideMockStore } from '@ngrx/store/testing';
|
|
4
|
+
import * as StateChangerSelector from '../../store/state-changer/state-changer.selectors';
|
|
5
|
+
|
|
6
|
+
import { DefaultLayoutComponent } from './default.layout';
|
|
7
|
+
|
|
8
|
+
describe('DefaultLayoutComponent', () => {
|
|
9
|
+
let component: DefaultLayoutComponent;
|
|
10
|
+
let fixture: ComponentFixture<DefaultLayoutComponent>;
|
|
11
|
+
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
TestBed.configureTestingModule({
|
|
14
|
+
declarations: [DefaultLayoutComponent],
|
|
15
|
+
providers: [
|
|
16
|
+
provideMockStore({
|
|
17
|
+
initialState: {},
|
|
18
|
+
selectors: [
|
|
19
|
+
{ selector: StateChangerSelector.getCriteria, value: 'initial-criteria' },
|
|
20
|
+
{ selector: StateChangerSelector.getResourceName, value: 'initial-resource-name' },
|
|
21
|
+
],
|
|
22
|
+
}),
|
|
23
|
+
],
|
|
24
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
25
|
+
});
|
|
26
|
+
fixture = TestBed.createComponent(DefaultLayoutComponent);
|
|
27
|
+
component = fixture.componentInstance;
|
|
28
|
+
fixture.detectChanges();
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('should create', () => {
|
|
32
|
+
expect(component).toBeTruthy();
|
|
33
|
+
});
|
|
34
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Component, ViewChild, ElementRef, AfterViewInit } from '@angular/core';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
import { baseLayerLuminance, StandardLuminance } from '@microsoft/fast-components';
|
|
4
|
+
import { configureDesignSystem } from '@genesislcap/foundation-ui';
|
|
5
|
+
import * as designTokens from '../../../styles/design-tokens.json';
|
|
6
|
+
import BaseLayout from '../base.layout';
|
|
7
|
+
import { mainMenu } from '../../app.config';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'app-default-layout',
|
|
11
|
+
templateUrl: './default.layout.html',
|
|
12
|
+
styleUrls: ['./default.layout.css'],
|
|
13
|
+
})
|
|
14
|
+
export class DefaultLayoutComponent extends BaseLayout implements AfterViewInit {
|
|
15
|
+
@ViewChild('designSystemProvider') designSystemProviderElement!: ElementRef;
|
|
16
|
+
allRoutes = mainMenu;
|
|
17
|
+
|
|
18
|
+
constructor(
|
|
19
|
+
router: Router,
|
|
20
|
+
) {
|
|
21
|
+
super(router);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
ngAfterViewInit() {
|
|
25
|
+
configureDesignSystem(this.designSystemProviderElement.nativeElement, designTokens);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
navigateAngular = (path: string) => {
|
|
29
|
+
this.router.navigate([path]);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
onLuminanceToogle = (): void => {
|
|
33
|
+
baseLayerLuminance.setValueFor(
|
|
34
|
+
this.designSystemProviderElement.nativeElement,
|
|
35
|
+
baseLayerLuminance.getValueFor(this.designSystemProviderElement.nativeElement) ===
|
|
36
|
+
StandardLuminance.DarkMode
|
|
37
|
+
? StandardLuminance.LightMode
|
|
38
|
+
: StandardLuminance.DarkMode,
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {configure, define} from '@genesislcap/foundation-login';
|
|
2
2
|
import type { Router } from '@angular/router';
|
|
3
|
-
import {
|
|
3
|
+
import { AUTH_PATH } from '../app-routing.module';
|
|
4
4
|
import { DI } from '@microsoft/fast-foundation';
|
|
5
5
|
|
|
6
6
|
const ssoSettings =
|
|
@@ -24,9 +24,9 @@ export const configureFoundationLogin = ({
|
|
|
24
24
|
}) => {
|
|
25
25
|
configure(DI.getOrCreateDOMContainer(), {
|
|
26
26
|
showConnectionIndicator: true,
|
|
27
|
-
hostPath:
|
|
27
|
+
hostPath: AUTH_PATH,
|
|
28
28
|
redirectHandler: () => {
|
|
29
|
-
router.navigate([
|
|
29
|
+
router.navigate(['{{kebabCase routes.[0].name}}'])
|
|
30
30
|
},
|
|
31
31
|
...ssoSettings,
|
|
32
32
|
});
|
|
@@ -1,15 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from '@genesislcap/
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { configure as configureHeader }from '@genesislcap/foundation-header/config';
|
|
2
|
+
import { foundationLayoutComponents } from '@genesislcap/foundation-layout';
|
|
3
|
+
import { EntityManagement } from '@genesislcap/foundation-entity-management';
|
|
4
|
+
import { g2plotChartsComponents } from '@genesislcap/g2plot-chart';
|
|
5
|
+
import * as rapidDesignSystem from '@genesislcap/rapid-design-system';
|
|
6
|
+
import { rapidGridComponents } from '@genesislcap/rapid-grid-pro';
|
|
7
|
+
|
|
8
|
+
EntityManagement;
|
|
9
|
+
|
|
10
|
+
configureHeader({
|
|
11
|
+
templateOptions: {
|
|
12
|
+
provider: 'template',
|
|
13
|
+
icon: 'rapid-icon',
|
|
14
|
+
button: 'rapid-button',
|
|
15
|
+
connectionIndicator: 'rapid-connection-indicator',
|
|
16
|
+
select: 'rapid-select',
|
|
17
|
+
option: 'rapid-option',
|
|
18
|
+
flyout: 'rapid-flyout',
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
rapidDesignSystem
|
|
23
|
+
.provideDesignSystem()
|
|
24
|
+
.register(
|
|
25
|
+
rapidDesignSystem.baseComponents,
|
|
26
|
+
rapidGridComponents,
|
|
27
|
+
g2plotChartsComponents,
|
|
28
|
+
foundationLayoutComponents,
|
|
29
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { layoutComponentName, layoutNameByRouteMap } from '../app.config';
|
|
2
|
+
import { LayoutComponentName } from '../types/layout';
|
|
3
|
+
|
|
4
|
+
const getLayoutNameByRoute = (route: string): LayoutComponentName => {
|
|
5
|
+
const currentLayoutName = layoutNameByRouteMap.get(route);
|
|
6
|
+
|
|
7
|
+
if (currentLayoutName) {
|
|
8
|
+
return currentLayoutName;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return layoutComponentName.default;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default getLayoutNameByRoute;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { AppComponent } from './app/app.component';
|
|
1
|
+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
2
|
+
import { AppModule } from './app/app.module';
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
platformBrowserDynamic()
|
|
5
|
+
.bootstrapModule(AppModule)
|
|
6
6
|
.catch((err) => console.error(err));
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"design_tokens": {
|
|
3
|
+
"color": {
|
|
4
|
+
"accent": {
|
|
5
|
+
"$value": "#0EAFE2",
|
|
6
|
+
"$type": "color"
|
|
7
|
+
},
|
|
8
|
+
"neutral": {
|
|
9
|
+
"$value": "#7C909B",
|
|
10
|
+
"$type": "color"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"fontFamily": {
|
|
14
|
+
"bodyFont": {
|
|
15
|
+
"$value": "Roboto, \"Segoe UI\", Arial, Helvetica, sans-serif",
|
|
16
|
+
"$type": "fontFamily"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"typography": {
|
|
20
|
+
"baseFontSize": {
|
|
21
|
+
"$value": "14px",
|
|
22
|
+
"$type": "dimension"
|
|
23
|
+
},
|
|
24
|
+
"baseLineHeight": {
|
|
25
|
+
"$value": "20px",
|
|
26
|
+
"$type": "dimension"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"mode": {
|
|
30
|
+
"luminance": {
|
|
31
|
+
"$value": 0.23,
|
|
32
|
+
"$type": "number"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"style": {
|
|
36
|
+
"density": {
|
|
37
|
+
"$value": 0,
|
|
38
|
+
"$type": "number"
|
|
39
|
+
},
|
|
40
|
+
"borderRadius": {
|
|
41
|
+
"$value": 4,
|
|
42
|
+
"$type": "number"
|
|
43
|
+
},
|
|
44
|
+
"strokeWidth": {
|
|
45
|
+
"$value": 1,
|
|
46
|
+
"$type": "number"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"space": {
|
|
50
|
+
"designUnit": {
|
|
51
|
+
"$value": 4,
|
|
52
|
+
"$type": "number"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: Segoe UI;
|
|
3
|
+
font-weight: 300;
|
|
4
|
+
src: local("Segoe UI Semilight"), local("Segoe UI");
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
* {
|
|
8
|
+
font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
|
|
9
|
+
font-style: normal;
|
|
10
|
+
font-weight: normal;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
html,
|
|
14
|
+
body {
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
padding: 0;
|
|
18
|
+
margin: 0;
|
|
19
|
+
|
|
20
|
+
--nav-height: 60px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
rapid-design-system-provider,
|
|
24
|
+
.dynamic-template,
|
|
25
|
+
foundation-router {
|
|
26
|
+
display: flex;
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 100%;
|
|
29
|
+
}
|
|
@@ -107,7 +107,6 @@
|
|
|
107
107
|
"@genesislcap/foundation-utils": "{{versions.UI}}",
|
|
108
108
|
"@genesislcap/foundation-user": "{{versions.UI}}",
|
|
109
109
|
"@genesislcap/foundation-zero": "{{versions.UI}}",
|
|
110
|
-
"@genesislcap/foundation-zero-grid-pro": "{{versions.UI}}",
|
|
111
110
|
"@genesislcap/g2plot-chart": "{{versions.UI}}",
|
|
112
111
|
"@genesislcap/rapid-design-system": "{{versions.UI}}",
|
|
113
112
|
"@genesislcap/rapid-grid-pro": "{{versions.UI}}",
|
|
@@ -132,7 +131,6 @@
|
|
|
132
131
|
"@genesislcap/foundation-utils": "{{versions.UI}}",
|
|
133
132
|
"@genesislcap/foundation-user": "{{versions.UI}}",
|
|
134
133
|
"@genesislcap/foundation-zero": "{{versions.UI}}",
|
|
135
|
-
"@genesislcap/foundation-zero-grid-pro": "{{versions.UI}}",
|
|
136
134
|
"@genesislcap/g2plot-chart": "{{versions.UI}}",
|
|
137
135
|
"@genesislcap/rapid-design-system": "{{versions.UI}}",
|
|
138
136
|
"@genesislcap/rapid-grid-pro": "{{versions.UI}}",
|
|
@@ -4,7 +4,6 @@ import { foundationLayoutComponents } from '@genesislcap/foundation-layout';
|
|
|
4
4
|
import { getApp } from '@genesislcap/foundation-shell/app';
|
|
5
5
|
import { FoundationRouter } from '@genesislcap/foundation-ui';
|
|
6
6
|
import * as zeroDesignSystem from '@genesislcap/foundation-zero';
|
|
7
|
-
import { zeroGridComponents } from '@genesislcap/foundation-zero-grid-pro';
|
|
8
7
|
import { g2plotChartsComponents } from '@genesislcap/g2plot-chart';
|
|
9
8
|
import * as rapidDesignSystem from '@genesislcap/rapid-design-system';
|
|
10
9
|
import { rapidGridComponents } from '@genesislcap/rapid-grid-pro';
|
|
@@ -56,10 +55,5 @@ export async function registerComponents() {
|
|
|
56
55
|
*/
|
|
57
56
|
zeroDesignSystem
|
|
58
57
|
.provideDesignSystem()
|
|
59
|
-
.register(
|
|
60
|
-
zeroDesignSystem.baseComponents,
|
|
61
|
-
zeroGridComponents,
|
|
62
|
-
g2plotChartsComponents,
|
|
63
|
-
foundationLayoutComponents,
|
|
64
|
-
);
|
|
58
|
+
.register(zeroDesignSystem.baseComponents, g2plotChartsComponents, foundationLayoutComponents);
|
|
65
59
|
}
|
package/package.json
CHANGED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Routes } from '@angular/router';
|
|
2
|
-
import { AuthGuard } from './guards/auth.guard';
|
|
3
|
-
import { AuthLoginComponent } from './pages/auth-login/auth-login.component';
|
|
4
|
-
import { HomeComponent } from './pages/home/home.component';
|
|
5
|
-
|
|
6
|
-
export const INTERNAL_URLS = {
|
|
7
|
-
auth: 'auth',
|
|
8
|
-
homepage: 'home',
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const AUTH_PATH = INTERNAL_URLS.auth;
|
|
12
|
-
|
|
13
|
-
export const routes: Routes = [
|
|
14
|
-
{
|
|
15
|
-
path: '',
|
|
16
|
-
redirectTo: `/${INTERNAL_URLS.homepage}`,
|
|
17
|
-
pathMatch: 'full',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
path: INTERNAL_URLS.homepage,
|
|
21
|
-
canActivate: [AuthGuard],
|
|
22
|
-
component: HomeComponent,
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
path: INTERNAL_URLS.auth,
|
|
26
|
-
component: AuthLoginComponent,
|
|
27
|
-
},
|
|
28
|
-
];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Home
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import {Component, CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
|
|
2
|
-
import {CommonModule} from '@angular/common';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'app-protected',
|
|
6
|
-
standalone: true,
|
|
7
|
-
imports: [
|
|
8
|
-
CommonModule,
|
|
9
|
-
],
|
|
10
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
11
|
-
templateUrl: './home.component.html',
|
|
12
|
-
styleUrls: ['./home.component.css'],
|
|
13
|
-
})
|
|
14
|
-
export class HomeComponent {
|
|
15
|
-
|
|
16
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|