@genesislcap/blank-app-seed 3.21.0 → 3.23.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/static.js +3 -2
- package/.genx/templates/angular/chart.hbs +21 -9
- package/.genx/templates/angular/entityManager.hbs +57 -45
- package/.genx/templates/angular/form.hbs +21 -8
- package/.genx/templates/angular/grid.hbs +30 -18
- package/.genx/templates/angular/route.hbs +8 -5
- package/.genx/templates/react/chart.hbs +9 -0
- package/.genx/templates/react/entityManager.hbs +45 -0
- package/.genx/templates/react/form.hbs +8 -0
- package/.genx/templates/react/grid.hbs +18 -0
- package/.genx/templates/react/gridLayout.hbs +30 -0
- package/.genx/templates/react/horizontalLayout.hbs +7 -0
- package/.genx/templates/react/route.hbs +35 -0
- package/.genx/templates/react/route.styles.hbs +3 -0
- package/.genx/templates/react/tabsLayout.hbs +7 -0
- package/.genx/templates/web-components/entityManager.hbs +1 -1
- package/.genx/utils/generateRoute.js +21 -9
- package/CHANGELOG.md +14 -0
- package/client-tmp/angular/angular.json +21 -12
- package/client-tmp/angular/package.json +45 -20
- package/client-tmp/angular/src/app/app-routing.module.ts +10 -3
- package/client-tmp/angular/src/app/app.component.spec.ts +2 -8
- package/client-tmp/angular/src/app/app.component.ts +0 -1
- package/client-tmp/angular/src/app/app.config.ts +1 -0
- package/client-tmp/angular/src/app/components/error-message/error-message.component.html +15 -0
- package/client-tmp/angular/src/app/components/error-message/error-message.component.spec.ts +74 -0
- package/client-tmp/angular/src/app/components/error-message/error-message.component.ts +15 -0
- package/client-tmp/angular/src/app/guards/auth.guard.ts +3 -3
- package/client-tmp/angular/src/app/guards/permissions.guard.ts +24 -0
- package/client-tmp/angular/src/app/layouts/blank/blank.layout.html +0 -1
- package/client-tmp/angular/src/app/layouts/blank/blank.layout.spec.ts +1 -1
- package/client-tmp/angular/src/app/layouts/default/default.layout.html +0 -1
- package/client-tmp/angular/src/app/layouts/default/default.layout.spec.ts +30 -15
- package/client-tmp/angular/src/app/pages/auth-login/auth-login.component.spec.ts +6 -6
- package/client-tmp/angular/src/app/pages/not-permitted/not-permitted.component.html +4 -0
- package/client-tmp/angular/src/app/pages/not-permitted/not-permitted.component.scss +12 -0
- package/client-tmp/angular/src/app/pages/not-permitted/not-permitted.component.spec.ts +32 -0
- package/client-tmp/angular/src/app/pages/not-permitted/not-permitted.component.ts +13 -0
- package/client-tmp/angular/src/app/services/auth.service.ts +12 -4
- package/client-tmp/angular/src/app/share/foundation-login.ts +3 -0
- package/client-tmp/angular/src/app/utils/index.ts +1 -0
- package/client-tmp/angular/src/app/utils/permissions.ts +7 -0
- package/client-tmp/angular/src/styles/_mixins.scss +8 -0
- package/client-tmp/react/.eslintrc.cjs +18 -0
- package/client-tmp/react/README.md +48 -0
- package/client-tmp/react/git +0 -0
- package/client-tmp/react/index.html +13 -0
- package/client-tmp/react/package.json +54 -0
- package/client-tmp/react/src/App.tsx +66 -0
- package/client-tmp/react/src/assets/logo-icon--light.svg +3 -0
- package/client-tmp/react/src/config.ts +31 -0
- package/client-tmp/react/src/custom-elements.d.ts +11 -0
- package/client-tmp/react/src/guards/AuthGuard.tsx +32 -0
- package/client-tmp/react/src/index.js +17 -0
- package/client-tmp/react/src/layouts/LayoutWrapper.tsx +20 -0
- package/client-tmp/react/src/layouts/blank/BlankLayout.module.css +9 -0
- package/client-tmp/react/src/layouts/blank/BlankLayout.tsx +26 -0
- package/client-tmp/react/src/layouts/default/DefaultLayout.module.css +35 -0
- package/client-tmp/react/src/layouts/default/DefaultLayout.tsx +80 -0
- package/client-tmp/react/src/main.tsx +10 -0
- package/client-tmp/react/src/pages/auth/AuthPage.css +0 -0
- package/client-tmp/react/src/pages/auth/AuthPage.jsx +11 -0
- package/client-tmp/react/src/reportWebVitals.js +13 -0
- package/client-tmp/react/src/services/auth.service.ts +13 -0
- package/client-tmp/react/src/services/connect.service.ts +26 -0
- package/client-tmp/react/src/setupTests.js +5 -0
- package/client-tmp/react/src/share/foundation-login.ts +21 -0
- package/client-tmp/react/src/share/genesis-components.ts +32 -0
- package/client-tmp/react/src/store/AuthContext.tsx +56 -0
- package/client-tmp/react/src/styles/design-tokens.json +56 -0
- package/client-tmp/react/src/styles/styles.css +39 -0
- package/client-tmp/react/src/svg-elements.d.ts +4 -0
- package/client-tmp/react/src/types/RouteLayouts.ts +3 -0
- package/client-tmp/react/src/types/layers.ts +9 -0
- package/client-tmp/react/src/types/menu.ts +8 -0
- package/client-tmp/react/src/utils/history.ts +5 -0
- package/client-tmp/react/src/utils/navigation.ts +5 -0
- package/client-tmp/react/src/vite-env.d.ts +1 -0
- package/client-tmp/react/tsconfig.app.json +28 -0
- package/client-tmp/react/tsconfig.json +11 -0
- package/client-tmp/react/tsconfig.node.json +13 -0
- package/client-tmp/react/vite.config.ts +14 -0
- package/package.json +1 -1
- package/client-tmp/react/react-file.ts +0 -1
package/.genx/package.json
CHANGED
package/.genx/static.js
CHANGED
|
@@ -52,14 +52,15 @@ const DIR_TEMPLATE_BY_FRAMEWORK = {
|
|
|
52
52
|
DIR_TEMPLATE_WEB_COMPONENT_ALIAS,
|
|
53
53
|
),
|
|
54
54
|
[FRAMEWORK_ANGULAR_ALIAS]: DIRS_MAP.get(DIR_TEMPLATE_ANGULAR_ALIAS),
|
|
55
|
+
[FRAMEWORK_REACT_ALIAS]: DIRS_MAP.get(FRAMEWORK_REACT_ALIAS),
|
|
55
56
|
};
|
|
56
57
|
|
|
57
58
|
const COMPONENT_TYPE = {
|
|
58
59
|
'entity-manager': 'manager',
|
|
59
60
|
'grid-pro': 'grid',
|
|
60
61
|
'smart-form': 'form',
|
|
61
|
-
|
|
62
|
-
}
|
|
62
|
+
chart: 'chart',
|
|
63
|
+
};
|
|
63
64
|
|
|
64
65
|
const TEXTS = {
|
|
65
66
|
INTRO_API_HOST:
|
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
<section style="height: 100%; width: 100%;">
|
|
2
|
+
<ng-container *ngIf="hasUserPermission('{{config.permissions.viewRight}}'); else notPermitted{{ config.index }}">
|
|
3
|
+
<rapid-g2plot-chart
|
|
4
|
+
type="{{ config.type }}"
|
|
5
|
+
[config]="tile{{ config.index }}.chartConfig"
|
|
6
|
+
>
|
|
7
|
+
<chart-datasource
|
|
8
|
+
resourceName="{{ config.resourceName }}"
|
|
9
|
+
server-fields="{{ config.xField }} {{ config.yField }}"
|
|
10
|
+
></chart-datasource>
|
|
11
|
+
</rapid-g2plot-chart>
|
|
12
|
+
</ng-container>
|
|
13
|
+
|
|
14
|
+
<ng-template #notPermitted{{ config.index }}>
|
|
15
|
+
<app-error-message
|
|
16
|
+
style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;"
|
|
17
|
+
elementType="h3"
|
|
18
|
+
message="You do not have access to view this component.">
|
|
19
|
+
</app-error-message>
|
|
20
|
+
</ng-template>
|
|
21
|
+
</section>
|
|
@@ -1,45 +1,57 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
1
|
+
<section style="height: 100%; width: 100%;">
|
|
2
|
+
<ng-container *ngIf="hasUserPermission('{{config.permissions.viewRight}}'); else notPermitted{{ config.index }}">
|
|
3
|
+
<entity-management
|
|
4
|
+
design-system-prefix="rapid"
|
|
5
|
+
enable-row-flashing
|
|
6
|
+
enable-cell-flashing
|
|
7
|
+
{{#if config.title}}
|
|
8
|
+
title="{{ config.title }}"
|
|
9
|
+
{{/if}}
|
|
10
|
+
resourceName="{{ config.resourceName }}"
|
|
11
|
+
{{#if config.createEvent}}
|
|
12
|
+
[createEvent]="hasUserPermission('{{config.permissions.updateRight}}') ? '{{ config.createEvent }}' : undefined"
|
|
13
|
+
{{#if config.createFormUiSchema}}
|
|
14
|
+
[createFormUiSchema]="tile{{ config.index }}.createFormUiSchema"
|
|
15
|
+
{{/if}}
|
|
16
|
+
{{/if}}
|
|
17
|
+
{{#if config.updateEvent}}
|
|
18
|
+
[updateEvent]="hasUserPermission('{{config.permissions.updateRight}}') ? '{{ config.updateEvent }}' : undefined"
|
|
19
|
+
{{#if config.updateFormUiSchema}}
|
|
20
|
+
[updateFormUiSchema]="tile{{ config.index }}.updateFormUiSchema"
|
|
21
|
+
{{/if}}
|
|
22
|
+
{{/if}}
|
|
23
|
+
{{#if config.deleteEvent}}
|
|
24
|
+
[deleteEvent]="hasUserPermission('{{config.permissions.updateRight}}') ? '{{ config.deleteEvent }}' : undefined"
|
|
25
|
+
{{/if}}
|
|
26
|
+
{{#if config.gridOptions}}
|
|
27
|
+
[gridOptions]="{{ config.gridOptions }}"
|
|
28
|
+
{{/if}}
|
|
29
|
+
{{#if config.snapshot}}
|
|
30
|
+
[datasourceConfig]="{ isSnapshot: {{ config.snapshot }} }"
|
|
31
|
+
{{/if}}
|
|
32
|
+
{{#if config.reqrep}}
|
|
33
|
+
[datasourceConfig]="tile{{ config.index }}.reqrep"
|
|
34
|
+
{{/if}}
|
|
35
|
+
{{#if config.columns}}
|
|
36
|
+
[columns]="tile{{ config.index }}.columns"
|
|
37
|
+
{{/if}}
|
|
38
|
+
{{#if config.modalPosition}}
|
|
39
|
+
modal-position="{{ config.modalPosition }}"
|
|
40
|
+
{{/if}}
|
|
41
|
+
{{#if config.sizeColumnsToFit}}
|
|
42
|
+
size-columns-to-fit
|
|
43
|
+
{{/if}}
|
|
44
|
+
{{#if config.enableSearchBar}}
|
|
45
|
+
enable-search-bar
|
|
46
|
+
{{/if}}
|
|
47
|
+
></entity-management>
|
|
48
|
+
</ng-container>
|
|
49
|
+
|
|
50
|
+
<ng-template #notPermitted{{ config.index }}>
|
|
51
|
+
<app-error-message
|
|
52
|
+
style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;"
|
|
53
|
+
elementType="h3"
|
|
54
|
+
message="You do not have access to view this component.">
|
|
55
|
+
</app-error-message>
|
|
56
|
+
</ng-template>
|
|
57
|
+
</section>
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
<section style="height: 100%; width: 100%;">
|
|
2
|
+
<ng-container *ngIf="hasUserPermission('{{config.permissions.updateRight}}'); else notPermitted{{ config.index }}">
|
|
3
|
+
<foundation-form
|
|
4
|
+
design-system-prefix="rapid"
|
|
5
|
+
resourceName="{{config.resourceName}}"
|
|
6
|
+
{{#if config.uischema}}
|
|
7
|
+
[uischema]="tile{{ config.index }}.uischema"
|
|
8
|
+
{{/if}}
|
|
9
|
+
>
|
|
10
|
+
</foundation-form>
|
|
11
|
+
</ng-container>
|
|
12
|
+
|
|
13
|
+
<ng-template #notPermitted{{ config.index }}>
|
|
14
|
+
<app-error-message
|
|
15
|
+
style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;"
|
|
16
|
+
elementType="h3"
|
|
17
|
+
message="You do not have access to view this component.">
|
|
18
|
+
</app-error-message>
|
|
19
|
+
</ng-template>
|
|
20
|
+
</section>
|
|
21
|
+
|
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
<section style="height: 100%; width: 100%;">
|
|
2
|
+
<ng-container *ngIf="hasUserPermission('{{config.permissions.viewRight}}'); else notPermitted{{ config.index }}">
|
|
3
|
+
<rapid-grid-pro
|
|
4
|
+
enable-row-flashing
|
|
5
|
+
enable-cell-flashing
|
|
6
|
+
>
|
|
7
|
+
<grid-pro-genesis-datasource
|
|
8
|
+
resource-name="{{config.resourceName}}"
|
|
9
|
+
{{#if config.snapshot}}
|
|
10
|
+
isSnapshot="{{config.snapshot}}"
|
|
11
|
+
{{/if}}
|
|
12
|
+
{{#if config.reqrep}}
|
|
13
|
+
[datasourceConfig]="tile{{ config.index }}.reqrep"
|
|
14
|
+
{{/if}}
|
|
15
|
+
{{#if config.gridOptions}}
|
|
16
|
+
[deferredGridOptions]="tile{{ config.index }}.gridOptions"
|
|
17
|
+
{{/if}}
|
|
18
|
+
>
|
|
19
|
+
</grid-pro-genesis-datasource>
|
|
20
|
+
</rapid-grid-pro>
|
|
21
|
+
</ng-container>
|
|
22
|
+
|
|
23
|
+
<ng-template #notPermitted{{ config.index }}>
|
|
24
|
+
<app-error-message
|
|
25
|
+
style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;"
|
|
26
|
+
elementType="h3"
|
|
27
|
+
message="You do not have access to view this component.">
|
|
28
|
+
</app-error-message>
|
|
29
|
+
</ng-template>
|
|
30
|
+
</section>
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {Component, CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
|
|
2
|
-
import {CommonModule} from '@angular/common';
|
|
3
|
-
{
|
|
4
|
-
import { getDateFormatter, getNumberFormatter } from '../../utils';
|
|
5
|
-
{
|
|
1
|
+
import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { User, getUser } from '@genesislcap/foundation-user';
|
|
4
|
+
import { getDateFormatter, getNumberFormatter, getViewUpdateRightComponent } from '../../utils';
|
|
5
|
+
import { ErrorMessageComponent } from '../../components/error-message/error-message.component';
|
|
6
6
|
|
|
7
7
|
@Component({
|
|
8
8
|
selector: 'app-{{pascalCase route.name}}',
|
|
9
9
|
standalone: true,
|
|
10
10
|
imports: [
|
|
11
|
+
ErrorMessageComponent,
|
|
11
12
|
CommonModule,
|
|
12
13
|
],
|
|
13
14
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
@@ -15,6 +16,8 @@ import { getDateFormatter, getNumberFormatter } from '../../utils';
|
|
|
15
16
|
styleUrls: ['./{{kebabCase route.name}}.component.css'],
|
|
16
17
|
})
|
|
17
18
|
export class {{pascalCase route.name}}Component {
|
|
19
|
+
hasUserPermission = (permissionCode: string) => getViewUpdateRightComponent(getUser(), permissionCode);
|
|
20
|
+
|
|
18
21
|
{{#each route.tiles}}
|
|
19
22
|
tile{{this.config.index}} = { {{#if this.config.createFormUiSchema}}
|
|
20
23
|
"createFormUiSchema": {{{ this.config.createFormUiSchema }}},{{/if}}{{#if this.config.updateFormUiSchema}}
|
|
@@ -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>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<rapid-layout-region type="horizontal">
|
|
2
|
+
<rapid-layout-region type="vertical">
|
|
3
|
+
{{#each route.tiles}}
|
|
4
|
+
{{#ifEquals @index 0}}
|
|
5
|
+
<rapid-layout-item title="{{../title}}">
|
|
6
|
+
{{> (lookup ../this 'type') ../this}}
|
|
7
|
+
</rapid-layout-item>
|
|
8
|
+
{{/ifEquals}}
|
|
9
|
+
{{#ifEquals @index 1}}
|
|
10
|
+
<rapid-layout-item title="{{../title}}">
|
|
11
|
+
{{> (lookup ../this 'type') ../this}}
|
|
12
|
+
</rapid-layout-item>
|
|
13
|
+
{{/ifEquals}}
|
|
14
|
+
{{/each}}
|
|
15
|
+
</rapid-layout-region>
|
|
16
|
+
<rapid-layout-region type="vertical">
|
|
17
|
+
{{#each route.tiles}}
|
|
18
|
+
{{#ifEquals @index 2}}
|
|
19
|
+
<rapid-layout-item title="{{../title}}">
|
|
20
|
+
{{> (lookup ../this 'type') ../this}}
|
|
21
|
+
</rapid-layout-item>
|
|
22
|
+
{{/ifEquals}}
|
|
23
|
+
{{#ifEquals @index 3}}
|
|
24
|
+
<rapid-layout-item title="{{../title}}">
|
|
25
|
+
{{> (lookup ../this 'type') ../this}}
|
|
26
|
+
</rapid-layout-item>
|
|
27
|
+
{{/ifEquals}}
|
|
28
|
+
{{/each}}
|
|
29
|
+
</rapid-layout-region>
|
|
30
|
+
</rapid-layout-region>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import './{{pascalCase route.name}}.css';
|
|
2
|
+
|
|
3
|
+
const {{pascalCase route.name}} = () => {
|
|
4
|
+
{{#each route.tiles}}
|
|
5
|
+
const tile{{this.config.index}} = { {{#if this.config.createFormUiSchema}}
|
|
6
|
+
"createFormUiSchema": {{{ this.config.createFormUiSchema }}},{{/if}}{{#if this.config.updateFormUiSchema}}
|
|
7
|
+
"updateFormUiSchema": {{{ this.config.updateFormUiSchema }}},{{/if}}{{#if this.config.uischema}}
|
|
8
|
+
"uischema": {{{ this.config.uischema }}},{{/if}}{{#if this.config.gridOptions}}
|
|
9
|
+
"gridOptions": {{{ this.config.gridOptions }}},{{/if}}{{#if this.config.reqrep}}
|
|
10
|
+
"reqrep": {{{ this.config.reqrep }}},{{/if}}{{#if this.config.columns}}
|
|
11
|
+
"columns": {{{ this.config.columns }}},{{/if}}{{#if this.config.type}}
|
|
12
|
+
"chartConfig": { {{#ifEquals this.config.type 'pie'}}
|
|
13
|
+
"radius": 0.75,
|
|
14
|
+
"angleField": "value",
|
|
15
|
+
"colorField": "groupBy",{{else}}
|
|
16
|
+
"xField": "groupBy",
|
|
17
|
+
"yField": "value",{{/ifEquals}}
|
|
18
|
+
},{{/if}}
|
|
19
|
+
};
|
|
20
|
+
{{/each}}
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<section className="{{kebabCase route.name}}-page">
|
|
24
|
+
{{#if route.tiles}}
|
|
25
|
+
<rapid-layout auto-save-key="{{route.layoutKey}}">
|
|
26
|
+
{{> (lookup ./route 'layoutType') }}
|
|
27
|
+
</rapid-layout>
|
|
28
|
+
{{else}}
|
|
29
|
+
Welcome to {{sentenceCase route.name}}
|
|
30
|
+
{{/if}}
|
|
31
|
+
</section>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default {{pascalCase route.name}};
|
|
@@ -4,6 +4,7 @@ const generateTile = require('./generateTile');
|
|
|
4
4
|
const {
|
|
5
5
|
FRAMEWORK_WEB_COMPONENTS_ALIAS,
|
|
6
6
|
FRAMEWORK_ANGULAR_ALIAS,
|
|
7
|
+
FRAMEWORK_REACT_ALIAS,
|
|
7
8
|
DIR_TEMPLATE_BY_FRAMEWORK,
|
|
8
9
|
} = require('../static');
|
|
9
10
|
|
|
@@ -23,11 +24,17 @@ const getPathByFramework = {
|
|
|
23
24
|
`${routeDir}/${routeName}.component.html`,
|
|
24
25
|
style: (routePath, routeName) => `${routePath}/${routeName}.component.css`,
|
|
25
26
|
},
|
|
27
|
+
[FRAMEWORK_REACT_ALIAS]: {
|
|
28
|
+
clientSrcPath: `../../client/src/pages`,
|
|
29
|
+
route: (clientSrcPath, routeName) => `${clientSrcPath}/${routeName}`,
|
|
30
|
+
component: (routeDir, routeName, changeCase) =>
|
|
31
|
+
`${routeDir}/${changeCase.pascalCase(routeName)}.jsx`,
|
|
32
|
+
style: (routePath, routeName, changeCase) =>
|
|
33
|
+
`${routePath}/${changeCase.pascalCase(routeName)}.css`,
|
|
34
|
+
},
|
|
26
35
|
};
|
|
27
36
|
|
|
28
37
|
const generateRoute = (route, { changeCase, writeFileWithData }, framework) => {
|
|
29
|
-
const routeName = changeCase.paramCase(route.name);
|
|
30
|
-
const sourceTemplateDir = `../${DIR_TEMPLATE_BY_FRAMEWORK[framework]}`;
|
|
31
38
|
const {
|
|
32
39
|
clientSrcPath,
|
|
33
40
|
route: getRouteDir,
|
|
@@ -35,23 +42,28 @@ const generateRoute = (route, { changeCase, writeFileWithData }, framework) => {
|
|
|
35
42
|
template: getTemplateTarget,
|
|
36
43
|
style: getStyleTarget,
|
|
37
44
|
} = getPathByFramework[framework];
|
|
45
|
+
const routeName = changeCase.paramCase(route.name);
|
|
46
|
+
const sourceTemplateDir = `../${DIR_TEMPLATE_BY_FRAMEWORK[framework]}`;
|
|
38
47
|
const routeDir = getRouteDir(clientSrcPath, routeName);
|
|
39
48
|
|
|
40
49
|
const filesToWrite = [
|
|
41
50
|
{
|
|
42
51
|
source: `${sourceTemplateDir}/route.hbs`,
|
|
43
|
-
target: getComponentTarget(routeDir, routeName),
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
source: `${sourceTemplateDir}/route.template.hbs`,
|
|
47
|
-
target: getTemplateTarget(routeDir, routeName),
|
|
52
|
+
target: getComponentTarget(routeDir, routeName, changeCase),
|
|
48
53
|
},
|
|
49
54
|
{
|
|
50
55
|
source: `${sourceTemplateDir}/route.styles.hbs`,
|
|
51
|
-
target: getStyleTarget(routeDir, routeName),
|
|
56
|
+
target: getStyleTarget(routeDir, routeName, changeCase),
|
|
52
57
|
},
|
|
53
58
|
];
|
|
54
59
|
|
|
60
|
+
if (getTemplateTarget) {
|
|
61
|
+
filesToWrite.push({
|
|
62
|
+
source: `${sourceTemplateDir}/route.template.hbs`,
|
|
63
|
+
target: getTemplateTarget(routeDir, routeName),
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
55
67
|
makeDirectory(resolve(__dirname, routeDir));
|
|
56
68
|
filesToWrite.forEach(({ source, target }) => {
|
|
57
69
|
writeFileWithData(
|
|
@@ -61,7 +73,7 @@ const generateRoute = (route, { changeCase, writeFileWithData }, framework) => {
|
|
|
61
73
|
);
|
|
62
74
|
});
|
|
63
75
|
|
|
64
|
-
// Remove condition after adding changes for angular
|
|
76
|
+
// Remove condition after adding changes for angular & react
|
|
65
77
|
if (framework === FRAMEWORK_WEB_COMPONENTS_ALIAS && route?.tiles?.length) {
|
|
66
78
|
route.tiles.forEach((tile) => {
|
|
67
79
|
generateTile(tile, route, { changeCase, writeFileWithData }, framework);
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.23.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.22.0...v3.23.0) (2024-07-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* react blank-app-seed (#278) 83b1767
|
|
9
|
+
|
|
10
|
+
## [3.22.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.21.0...v3.22.0) (2024-07-15)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* angular handle route, component view/update permissions - [FUI-2066](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/2066) (#273) 8c73b16
|
|
16
|
+
|
|
3
17
|
## [3.21.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.20.5...v3.21.0) (2024-07-09)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -13,12 +13,6 @@
|
|
|
13
13
|
"build": {
|
|
14
14
|
"builder": "@angular-builders/custom-webpack:browser",
|
|
15
15
|
"options": {
|
|
16
|
-
"customWebpackConfig": {
|
|
17
|
-
"path": "./custom-webpack.config.js",
|
|
18
|
-
"mergeStrategies": {
|
|
19
|
-
"externals": "replace"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
16
|
"outputPath": "dist/{{pkgName}}",
|
|
23
17
|
"index": "src/index.html",
|
|
24
18
|
"main": "src/main.ts",
|
|
@@ -39,7 +33,9 @@
|
|
|
39
33
|
"size-sensor",
|
|
40
34
|
"pdfast",
|
|
41
35
|
"fmin",
|
|
42
|
-
"@json-schema-tools/dereferencer"
|
|
36
|
+
"@json-schema-tools/dereferencer",
|
|
37
|
+
"numeral",
|
|
38
|
+
"numeral/locales"
|
|
43
39
|
]
|
|
44
40
|
},
|
|
45
41
|
"configurations": {
|
|
@@ -107,13 +103,26 @@
|
|
|
107
103
|
},
|
|
108
104
|
"test": {
|
|
109
105
|
"builder": "@angular-builders/custom-webpack:karma",
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
"
|
|
106
|
+
"configurations": {
|
|
107
|
+
"production": {
|
|
108
|
+
"customWebpackConfig": {
|
|
109
|
+
"path": "./webpack.prod.config.js",
|
|
110
|
+
"mergeStrategies": {
|
|
111
|
+
"externals": "replace"
|
|
112
|
+
}
|
|
115
113
|
}
|
|
116
114
|
},
|
|
115
|
+
"development": {
|
|
116
|
+
"customWebpackConfig": {
|
|
117
|
+
"path": "./webpack.dev.config.js",
|
|
118
|
+
"mergeStrategies": {
|
|
119
|
+
"externals": "replace"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"defaultConfiguration": "development",
|
|
125
|
+
"options": {
|
|
117
126
|
"polyfills": ["zone.js", "zone.js/testing"],
|
|
118
127
|
"tsConfig": "tsconfig.spec.json",
|
|
119
128
|
"assets": ["src/favicon.ico", "src/assets"],
|