@genesislcap/blank-app-seed 3.30.0-prerelease.7 → 3.30.0-prerelease.70
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/configure.js +5 -0
- package/.genx/package.json +1 -1
- package/.genx/prompts/api.js +2 -9
- package/.genx/prompts/server.js +9 -0
- package/.genx/prompts.js +9 -2
- package/.genx/static.js +1 -1
- package/.genx/templates/angular/component/component.hbs +46 -3
- package/.genx/templates/angular/gridLayout.hbs +8 -8
- package/.genx/templates/react/chart.hbs +7 -3
- package/.genx/templates/react/component/component.column.defs.hbs +4 -2
- package/.genx/templates/react/component/component.create.form.hbs +2 -2
- package/.genx/templates/react/component/component.gridOptions.hbs +4 -2
- package/.genx/templates/react/component/component.hbs +101 -21
- package/.genx/templates/react/component/component.index.hbs +1 -1
- package/.genx/templates/react/component/component.update.form.hbs +1 -1
- package/.genx/templates/react/entityManager.hbs +62 -49
- package/.genx/templates/react/form.hbs +7 -3
- package/.genx/templates/react/grid.hbs +16 -10
- package/.genx/templates/react/gridLayout.hbs +8 -8
- package/.genx/templates/react/route.hbs +2 -2
- package/.genx/templates/react/tabsLayout.hbs +5 -5
- package/.genx/templates/web-components/component/component.hbs +55 -2
- package/.genx/templates/web-components/component/component.template.hbs +0 -3
- package/.genx/templates/web-components/entityManager.hbs +1 -1
- package/.genx/templates/web-components/gridLayout.hbs +8 -8
- package/.genx/templates/web-components/route.template.hbs +2 -2
- package/.genx/utils/deleteGradleWrappers.js +12 -0
- package/.genx/utils/formatRouteData.js +10 -0
- package/.genx/utils/generateRoute.js +2 -1
- package/.genx/utils/generateTile.js +2 -2
- package/.genx/utils/getTodosAndComments.js +28 -0
- package/.genx/utils/index.js +2 -0
- package/.genx/versions.json +3 -3
- package/.gitignore +3 -0
- package/CHANGELOG.md +618 -0
- package/README.md +7 -13
- package/client-tmp/angular/__mocks__/fileMock.js +1 -0
- package/client-tmp/angular/angular.json +0 -29
- package/client-tmp/angular/jest.config.js +20 -0
- package/client-tmp/angular/package.json +6 -6
- package/client-tmp/angular/src/app/layouts/default/default.layout.spec.ts +2 -2
- package/client-tmp/angular/src/jest.setup.ts +46 -0
- package/client-tmp/angular/tsconfig.app.json +1 -2
- package/client-tmp/angular/tsconfig.json +1 -2
- package/client-tmp/angular/tsconfig.spec.json +13 -7
- package/client-tmp/react/.babelrc +2 -1
- package/client-tmp/react/.eslintrc.cjs +1 -0
- package/client-tmp/react/README.md +36 -24
- package/client-tmp/react/jest.config.ts +15 -0
- package/client-tmp/react/lint-css.ts +19 -0
- package/client-tmp/react/package.json +42 -24
- package/client-tmp/react/public/favicon.ico +0 -0
- package/client-tmp/react/public/index.html +13 -0
- package/client-tmp/react/src/App.tsx +95 -68
- package/client-tmp/react/src/components/ErrorMessage/{ErrorMessage.test.js → ErrorMessage.test.tsx} +18 -20
- package/client-tmp/react/src/components/ErrorMessage/{ErrorMessage.jsx → ErrorMessage.tsx} +9 -4
- package/client-tmp/react/src/config.ts +2 -16
- package/client-tmp/react/src/custom-elements.d.ts +21 -9
- package/client-tmp/react/src/environments/environment.prod.ts +8 -0
- package/client-tmp/react/src/environments/environment.ts +9 -0
- package/client-tmp/react/src/guards/ProtectedGuard.tsx +66 -0
- package/client-tmp/react/src/helpers/hasPermissionHelper.tsx +11 -0
- package/client-tmp/react/src/helpers/isAuthenticatedHelper.tsx +14 -0
- package/client-tmp/react/src/helpers/isConnectedHelper.tsx +16 -0
- package/client-tmp/react/src/layouts/blank/BlankLayout.tsx +1 -1
- package/client-tmp/react/src/layouts/default/DefaultLayout.tsx +26 -15
- package/client-tmp/react/src/main.tsx +21 -5
- package/client-tmp/react/src/pages/AuthPage/{AuthPage.test.js → AuthPage.test.tsx} +2 -2
- package/client-tmp/react/src/pages/AuthPage/{AuthPage.jsx → AuthPage.tsx} +3 -2
- package/client-tmp/react/src/pages/NotFoundPage/NotFoundPage.css +0 -0
- package/client-tmp/react/src/pages/NotFoundPage/NotFoundPage.tsx +14 -0
- package/client-tmp/react/src/pages/NotPermittedPage/{NotPermittedPage.test.js → NotPermittedPage.test.tsx} +3 -4
- package/client-tmp/react/src/pages/NotPermittedPage/NotPermittedPage.tsx +14 -0
- package/client-tmp/react/src/pbc/README.md +7 -0
- package/client-tmp/react/src/pbc/container.tsx +44 -0
- package/client-tmp/react/src/pbc/elementsRenderer.tsx +40 -0
- package/client-tmp/react/src/pbc/utils.ts +121 -0
- package/client-tmp/react/src/services/store.service.ts +48 -0
- package/client-tmp/react/src/share/foundation-login.ts +13 -6
- package/client-tmp/react/src/share/genesis-components.ts +49 -23
- package/client-tmp/react/src/store/AuthContext.tsx +0 -2
- package/client-tmp/react/src/store/RoutesContext.tsx +74 -0
- package/client-tmp/react/src/types/LayoutName.ts +3 -0
- package/client-tmp/react/src/types/RouteLayouts.ts +3 -1
- package/client-tmp/react/src/utils/getLayoutNameByRoute.ts +5 -0
- package/client-tmp/react/src/utils/history.ts +4 -2
- package/client-tmp/react/src/utils/index.ts +3 -1
- package/client-tmp/react/src/utils/layout.ts +11 -0
- package/client-tmp/react/test/e2e/fixture.ts +1 -1
- package/client-tmp/react/tsconfig.app.json +2 -26
- package/client-tmp/react/tsconfig.json +31 -8
- package/client-tmp/react/tsconfig.node.json +1 -1
- package/client-tmp/react/vite.config.ts +70 -0
- package/client-tmp/react/webpack.config.js +103 -0
- package/client-tmp/web-components/README.md +2 -2
- package/client-tmp/web-components/package.json +10 -8
- package/client-tmp/web-components/src/main/main.styles.ts +1 -1
- package/client-tmp/web-components/src/pbc/README.md +1 -1
- package/client-tmp/web-components/src/routes/config.ts +4 -1
- package/client-tmp/web-components/src/utils/index.ts +1 -0
- package/client-tmp/web-components/src/utils/layout.ts +11 -0
- package/client-tmp/web-components/test/README.md +1 -1
- package/client-tmp/web-components/tsconfig.json +1 -1
- package/package.json +1 -1
- package/server/README.md +1 -1
- package/server/build.gradle.kts +6 -3
- package/server/gradle.properties +2 -1
- package/server/settings.gradle.kts +6 -5
- package/server/{{appName}}-app/src/test/kotlin/global/genesis/EventHandlerTest.kt +1 -1
- package/settings.gradle.kts +7 -4
- package/testData/excel/.gitkeep +0 -0
- package/client-tmp/angular/karma.conf.js +0 -9
- package/client-tmp/angular/src/app/app.component.spec.ts +0 -23
- package/client-tmp/react/env.development.json +0 -3
- package/client-tmp/react/jest.config.js +0 -10
- package/client-tmp/react/lint-css.js +0 -18
- package/client-tmp/react/src/guards/AuthGuard.tsx +0 -32
- package/client-tmp/react/src/guards/PermissionsGuard.tsx +0 -37
- package/client-tmp/react/src/index.js +0 -17
- package/client-tmp/react/src/pages/NotPermittedPage/NotPermittedPage.jsx +0 -13
- package/client-tmp/react/src/reportWebVitals.js +0 -13
- package/client-tmp/react/vite.config.js +0 -59
- /package/client-tmp/react/{jest.setup.js → jest.setup.ts} +0 -0
- /package/client-tmp/react/src/{setupTests.js → setupTests.ts} +0 -0
- /package/server/{{appName}}-app/src/main/genesis/scripts/{{{appName}}-data-pipelines.kts → {{appName}}-pipelines.kts} +0 -0
package/.genx/configure.js
CHANGED
|
@@ -7,6 +7,7 @@ const {
|
|
|
7
7
|
getCombinedCsvData,
|
|
8
8
|
registerPartials,
|
|
9
9
|
validateRoute,
|
|
10
|
+
deleteGradleWrappers,
|
|
10
11
|
} = require('./utils');
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -48,4 +49,8 @@ module.exports = async (data, utils) => {
|
|
|
48
49
|
.forEach((entity) => {
|
|
49
50
|
generateCsv(entity, utils);
|
|
50
51
|
});
|
|
52
|
+
|
|
53
|
+
if (data.excludeGradleWrapper) {
|
|
54
|
+
deleteGradleWrappers();
|
|
55
|
+
}
|
|
51
56
|
};
|
package/.genx/package.json
CHANGED
package/.genx/prompts/api.js
CHANGED
|
@@ -7,19 +7,12 @@ const ssoIntro = () => console.log(TEXTS.INTRO_API_SSO);
|
|
|
7
7
|
module.exports = async (inquirer, prevAns = {}) => {
|
|
8
8
|
apiHostIntro();
|
|
9
9
|
const { apiHost = prevAns.apiHost } = await inquirer.prompt([
|
|
10
|
-
{
|
|
11
|
-
name: 'setApiHost',
|
|
12
|
-
type: 'confirm',
|
|
13
|
-
message: TEXTS.MESSAGE_API_SET_HOST,
|
|
14
|
-
when: !prevAns.apiHost,
|
|
15
|
-
default: true,
|
|
16
|
-
},
|
|
17
10
|
{
|
|
18
11
|
name: 'apiHost',
|
|
19
12
|
type: 'input',
|
|
20
13
|
message: TEXTS.MESSAGE_API_HOST,
|
|
21
|
-
when:
|
|
22
|
-
default:
|
|
14
|
+
when: !prevAns.apiHost,
|
|
15
|
+
default: 'ws://localhost:9064',
|
|
23
16
|
validate: websocketValidator,
|
|
24
17
|
},
|
|
25
18
|
]);
|
package/.genx/prompts/server.js
CHANGED
|
@@ -11,6 +11,7 @@ module.exports = async (inquirer, prevAns = {}) => {
|
|
|
11
11
|
applicationVersion = prevAns.applicationVersion,
|
|
12
12
|
enableDeployPlugin = prevAns.enableDeployPlugin,
|
|
13
13
|
csv = prevAns.csv,
|
|
14
|
+
excludeGradleWrapper = prevAns.excludeGradleWrapper,
|
|
14
15
|
} = await inquirer.prompt([
|
|
15
16
|
{
|
|
16
17
|
name: 'description',
|
|
@@ -41,6 +42,13 @@ module.exports = async (inquirer, prevAns = {}) => {
|
|
|
41
42
|
when: prevAns.enableDeployPlugin === undefined,
|
|
42
43
|
default: prevAns.enableDeployPlugin || false,
|
|
43
44
|
},
|
|
45
|
+
{
|
|
46
|
+
name: 'excludeGradleWrapper',
|
|
47
|
+
type: 'confirm',
|
|
48
|
+
message: TEXTS.MESSAGE_EXCLUDE_GRADLE_WRAPPER,
|
|
49
|
+
when: prevAns.excludeGradleWrapper === undefined,
|
|
50
|
+
default: prevAns.excludeGradleWrapper || false,
|
|
51
|
+
},
|
|
44
52
|
{
|
|
45
53
|
name: 'csv',
|
|
46
54
|
type: 'input',
|
|
@@ -56,5 +64,6 @@ module.exports = async (inquirer, prevAns = {}) => {
|
|
|
56
64
|
applicationVersion,
|
|
57
65
|
enableDeployPlugin,
|
|
58
66
|
csv: parsecsv(csv),
|
|
67
|
+
excludeGradleWrapper,
|
|
59
68
|
};
|
|
60
69
|
};
|
package/.genx/prompts.js
CHANGED
|
@@ -17,8 +17,14 @@ module.exports = async (inquirer, prevAns = {}) => {
|
|
|
17
17
|
License: ${license}`);
|
|
18
18
|
|
|
19
19
|
const { apiHost, enableSSO } = await apiPrompts(inquirer, prevAns);
|
|
20
|
-
const {
|
|
21
|
-
|
|
20
|
+
const {
|
|
21
|
+
description,
|
|
22
|
+
groupId,
|
|
23
|
+
applicationVersion,
|
|
24
|
+
enableDeployPlugin,
|
|
25
|
+
csv,
|
|
26
|
+
excludeGradleWrapper,
|
|
27
|
+
} = await genesisServerPrompts(inquirer, prevAns);
|
|
22
28
|
const { routes, ui, framework } = await uiPrompts(inquirer, prevAns);
|
|
23
29
|
|
|
24
30
|
return {
|
|
@@ -32,5 +38,6 @@ module.exports = async (inquirer, prevAns = {}) => {
|
|
|
32
38
|
csv,
|
|
33
39
|
ui,
|
|
34
40
|
framework,
|
|
41
|
+
excludeGradleWrapper,
|
|
35
42
|
};
|
|
36
43
|
};
|
package/.genx/static.js
CHANGED
|
@@ -67,13 +67,13 @@ const TEXTS = {
|
|
|
67
67
|
'You can override the default Genesis server URL used during local developent.',
|
|
68
68
|
INTRO_API_SSO:
|
|
69
69
|
'Optionally, you can enable the SSO function, which will redirect to identity provider before starting the application (given we only have one identity provider).',
|
|
70
|
-
MESSAGE_API_SET_HOST: 'Set API Host',
|
|
71
70
|
MESSAGE_API_HOST: 'API Host (with WebSocket prefix and suffix if any)',
|
|
72
71
|
MESSAGE_API_SSO: 'Init SSO connection before loading application',
|
|
73
72
|
MESSAGE_SERVER_DESCRIPTION: 'Project Description',
|
|
74
73
|
MESSAGE_SERVER_GROUP_ID: 'Group Id',
|
|
75
74
|
MESSAGE_SERVER_APPLICATION_VERSION: 'Application Version',
|
|
76
75
|
MESSAGE_SERVER_DEPLOY_PLUGIN: 'Enable deploy plugin?',
|
|
76
|
+
MESSAGE_EXCLUDE_GRADLE_WRAPPER: 'Exclude Gradle wrapper?',
|
|
77
77
|
MESSAGE_SERVER_CSV:
|
|
78
78
|
'Generate empty CSV for entities? (config in JSON format)',
|
|
79
79
|
MESSAGE_UI_ROTUES: 'Pages config in JSON format',
|
|
@@ -3,6 +3,11 @@ import { CommonModule } from '@angular/common';
|
|
|
3
3
|
import { getUser } from '@genesislcap/foundation-user';
|
|
4
4
|
import { ErrorMessageComponent } from '../../../components/error-message/error-message.component';
|
|
5
5
|
import { getViewUpdateRightComponent } from '../../../utils';
|
|
6
|
+
{{#if tile.config.customEvents}}
|
|
7
|
+
import { getConnect } from '@genesislcap/foundation-comms';
|
|
8
|
+
import type { ActionRendererParams } from '@genesislcap/rapid-grid-pro';
|
|
9
|
+
import { RapidAgActionRenderer } from '@genesislcap/rapid-grid-pro';
|
|
10
|
+
{{/if}}
|
|
6
11
|
{{#if tile.config.gridOptions}}
|
|
7
12
|
import { GridOptionsConfig } from "@genesislcap/rapid-grid-pro";
|
|
8
13
|
{{/if}}
|
|
@@ -22,6 +27,15 @@ import { columnDefs } from './{{kebabCase tile.title}}.column.defs';
|
|
|
22
27
|
import { gridOptions } from './{{kebabCase tile.title}}.gridOptions';
|
|
23
28
|
{{/if}}
|
|
24
29
|
|
|
30
|
+
{{#ifAny tile.metadata.comment tile.metadata.todo}}
|
|
31
|
+
/**
|
|
32
|
+
{{~#if tile.metadata.comment}}{{{ tile.metadata.comment }}}{{/if}}
|
|
33
|
+
{{~#if tile.metadata.todo}}{{#if tile.metadata.comment}}
|
|
34
|
+
*{{/if}}
|
|
35
|
+
* TODO: {{{ tile.metadata.todo }}}{{/if}}
|
|
36
|
+
*/
|
|
37
|
+
{{/ifAny}}
|
|
38
|
+
|
|
25
39
|
@Component({
|
|
26
40
|
selector: 'app-{{kebabCase tile.componentName}}',
|
|
27
41
|
templateUrl: './{{kebabCase tile.title}}.component.html',
|
|
@@ -37,10 +51,39 @@ export class {{pascalCase tile.componentName}} {
|
|
|
37
51
|
hasUserPermission = (permissionCode: string) => getViewUpdateRightComponent(getUser(), permissionCode);{{#if tile.config.createFormUiSchema}}
|
|
38
52
|
createFormSchema = createFormSchema;{{/if}}{{#if tile.config.uischema}}
|
|
39
53
|
uischema = createFormSchema;{{/if}}{{#if tile.config.updateFormUiSchema}}
|
|
40
|
-
updateFormSchema = updateFormSchema;{{/if}}{{#if tile.config.
|
|
41
|
-
columnDefs = columnDefs;{{/if}}{{#if tile.config.gridOptions}}
|
|
54
|
+
updateFormSchema = updateFormSchema;{{/if}}{{#if tile.config.gridOptions}}
|
|
42
55
|
gridOptions = gridOptions as GridOptionsConfig;{{/if}}{{#if tile.config.reqrep}}
|
|
43
|
-
reqrep = { pollingInterval: 5000 };{{/if}}{{#if tile.config.
|
|
56
|
+
reqrep = { pollingInterval: 5000 };{{/if}}{{#if tile.config.columns}}
|
|
57
|
+
columnDefs = [
|
|
58
|
+
...columnDefs,
|
|
59
|
+
{{#if tile.config.customEvents}}
|
|
60
|
+
/**
|
|
61
|
+
* TODO: Update the action button's icon under `contentTemplate` below.
|
|
62
|
+
* More information about rapid-icon can be found at: https://docs.genesis.global/docs/develop/client-capabilities/presentation/client-presentation-icon/
|
|
63
|
+
**/
|
|
64
|
+
{{#each tile.config.customEvents}}
|
|
65
|
+
{
|
|
66
|
+
field: '',
|
|
67
|
+
headerName: '',
|
|
68
|
+
minWidth: 50,
|
|
69
|
+
maxWidth: 50,
|
|
70
|
+
pinned: 'right',
|
|
71
|
+
cellRenderer: RapidAgActionRenderer,
|
|
72
|
+
cellRendererParams: <ActionRendererParams>{
|
|
73
|
+
actionClick: async (rowData) => {
|
|
74
|
+
const { ROW_REF, ...DETAILS } = rowData;
|
|
75
|
+
const response = await getConnect().commitEvent("EVENT_{{this}}", {
|
|
76
|
+
DETAILS,
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
contentTemplate: `
|
|
80
|
+
<rapid-icon name="cog"></rapid-icon>
|
|
81
|
+
`,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{{/each}}
|
|
85
|
+
{{/if}}
|
|
86
|
+
];{{/if}}{{#if tile.config.type}}
|
|
44
87
|
chartConfig = { {{#ifEquals tile.config.type 'pie'}}
|
|
45
88
|
"radius": 0.75,
|
|
46
89
|
"angleField": "value",
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
<rapid-layout-region type="vertical">
|
|
3
3
|
{{#each route.tiles}}
|
|
4
4
|
{{#ifEquals @index 0}}
|
|
5
|
-
<rapid-layout-item title="{{
|
|
6
|
-
<app-{{kebabCase
|
|
5
|
+
<rapid-layout-item title="{{this.title}}">
|
|
6
|
+
<app-{{kebabCase this.componentName}}></app-{{kebabCase this.componentName}}>
|
|
7
7
|
</rapid-layout-item>
|
|
8
8
|
{{/ifEquals}}
|
|
9
9
|
{{#ifEquals @index 1}}
|
|
10
|
-
<rapid-layout-item title="{{
|
|
11
|
-
<app-{{kebabCase
|
|
10
|
+
<rapid-layout-item title="{{this.title}}">
|
|
11
|
+
<app-{{kebabCase this.componentName}}></app-{{kebabCase this.componentName}}>
|
|
12
12
|
</rapid-layout-item>
|
|
13
13
|
{{/ifEquals}}
|
|
14
14
|
{{/each}}
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
<rapid-layout-region type="vertical">
|
|
17
17
|
{{#each route.tiles}}
|
|
18
18
|
{{#ifEquals @index 2}}
|
|
19
|
-
<rapid-layout-item title="{{
|
|
20
|
-
<app-{{kebabCase
|
|
19
|
+
<rapid-layout-item title="{{this.title}}">
|
|
20
|
+
<app-{{kebabCase this.componentName}}></app-{{kebabCase this.componentName}}>
|
|
21
21
|
</rapid-layout-item>
|
|
22
22
|
{{/ifEquals}}
|
|
23
23
|
{{#ifEquals @index 3}}
|
|
24
|
-
<rapid-layout-item title="{{
|
|
25
|
-
<app-{{kebabCase
|
|
24
|
+
<rapid-layout-item title="{{this.title}}">
|
|
25
|
+
<app-{{kebabCase this.componentName}}></app-{{kebabCase this.componentName}}>
|
|
26
26
|
</rapid-layout-item>
|
|
27
27
|
{{/ifEquals}}
|
|
28
28
|
{{/each}}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
{{#if config.permissions.viewRight}}
|
|
1
|
+
{{#if config.permissions.viewRight~}}
|
|
2
|
+
hasUserPermission('{{config.permissions.viewRight}}') ? (
|
|
3
|
+
{{/if}}
|
|
2
4
|
<rapid-g2plot-chart
|
|
3
5
|
type="{{ config.type }}"
|
|
4
6
|
config={chartConfig}
|
|
@@ -7,7 +9,9 @@
|
|
|
7
9
|
resourceName="{{ config.resourceName }}"
|
|
8
10
|
server-fields="{{ config.xField }} {{ config.yField }}"
|
|
9
11
|
></chart-datasource>
|
|
10
|
-
</rapid-g2plot-chart>
|
|
12
|
+
</rapid-g2plot-chart>
|
|
13
|
+
{{#if config.permissions.viewRight~}}
|
|
11
14
|
) : (
|
|
12
15
|
<ErrorMessage elementType="h3" message="You do not have access to view this component." />
|
|
13
|
-
)
|
|
16
|
+
)
|
|
17
|
+
{{/if}}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
{{#if tile.config.columns~}}
|
|
1
2
|
import { ColDef } from '@ag-grid-community/core';
|
|
3
|
+
{{/if}}
|
|
2
4
|
import { getNumberFormatter, getDateFormatter } from '@genesislcap/foundation-utils';
|
|
3
|
-
{{#if route.FDC3EventHandlersEnabled}}
|
|
5
|
+
{{#if route.FDC3EventHandlersEnabled~}}
|
|
4
6
|
import { sendEventOnChannel } from '../../../utils';
|
|
5
7
|
{{/if}}
|
|
6
8
|
|
|
7
|
-
{{#if tile.config.columns}}
|
|
9
|
+
{{#if tile.config.columns~}}
|
|
8
10
|
export const columnDefs: ColDef[] = {{{ tile.config.columns }}}
|
|
9
11
|
{{/if}}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { UiSchema } from '@genesislcap/foundation-forms';
|
|
2
2
|
|
|
3
|
-
{{#if tile.config.createFormUiSchema}}
|
|
3
|
+
{{#if tile.config.createFormUiSchema~}}
|
|
4
4
|
export const createFormSchema: UiSchema = {{{ tile.config.createFormUiSchema }}}
|
|
5
5
|
{{/if}}
|
|
6
|
-
{{#if tile.config.uischema}}
|
|
6
|
+
{{#if tile.config.uischema~}}
|
|
7
7
|
export const createFormSchema: UiSchema = {{{ tile.config.uischema }}}
|
|
8
8
|
{{/if}}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
{{#if tile.config.gridOptions~}}
|
|
1
2
|
import { GridOptionsConfig } from '@genesislcap/rapid-grid-pro';
|
|
3
|
+
{{/if}}
|
|
2
4
|
import { getNumberFormatter, getDateFormatter } from '@genesislcap/foundation-utils';
|
|
3
|
-
{{#if route.FDC3EventHandlersEnabled}}
|
|
5
|
+
{{#if route.FDC3EventHandlersEnabled~}}
|
|
4
6
|
import { sendEventOnChannel } from '../../../utils';
|
|
5
7
|
{{/if}}
|
|
6
8
|
|
|
7
|
-
{{#if tile.config.gridOptions}}
|
|
9
|
+
{{#if tile.config.gridOptions~}}
|
|
8
10
|
export const gridOptions: GridOptionsConfig = {{{ tile.config.gridOptions }}}
|
|
9
11
|
{{/if}}
|
|
@@ -1,40 +1,120 @@
|
|
|
1
|
+
{{#if tile.config.permissions.viewRight~}}
|
|
1
2
|
import { getUser } from '@genesislcap/foundation-user';
|
|
2
3
|
import { getViewUpdateRightComponent } from '../../../utils';
|
|
3
4
|
import ErrorMessage from '../../../components/ErrorMessage/ErrorMessage';
|
|
4
|
-
{{
|
|
5
|
+
{{else if tile.config.permissions.updateRight~}}
|
|
6
|
+
import { getUser } from '@genesislcap/foundation-user';
|
|
7
|
+
import { getViewUpdateRightComponent } from '../../../utils';
|
|
8
|
+
import ErrorMessage from '../../../components/ErrorMessage/ErrorMessage';
|
|
9
|
+
{{/if}}
|
|
10
|
+
{{#if tile.config.customEvents}}
|
|
11
|
+
import { getConnect } from '@genesislcap/foundation-comms';
|
|
12
|
+
import type { ActionRendererParams } from '@genesislcap/rapid-grid-pro';
|
|
13
|
+
import { RapidAgActionRenderer } from '@genesislcap/rapid-grid-pro';
|
|
14
|
+
{{/if}}
|
|
15
|
+
{{#if tile.config.createFormUiSchema~}}
|
|
5
16
|
import { createFormSchema as createFormSchemaTile } from './{{pascalCase tile.title}}CreateFormSchema';
|
|
6
17
|
{{/if}}
|
|
7
|
-
{{#if tile.config.uischema}}
|
|
18
|
+
{{#if tile.config.uischema~}}
|
|
8
19
|
import { createFormSchema as createFormSchemaTile } from './{{pascalCase tile.title}}CreateFormSchema';
|
|
9
20
|
{{/if}}
|
|
10
|
-
{{#if tile.config.updateFormUiSchema}}
|
|
21
|
+
{{#if tile.config.updateFormUiSchema~}}
|
|
11
22
|
import { updateFormSchema as updateFormSchemaTile } from './{{pascalCase tile.title}}UpdateFormSchema';
|
|
12
23
|
{{/if}}
|
|
13
|
-
{{#if tile.config.columns}}
|
|
24
|
+
{{#if tile.config.columns~}}
|
|
14
25
|
import { columnDefs as columnDefsTile } from './{{pascalCase tile.title}}ColumnDefs';
|
|
15
26
|
{{/if}}
|
|
16
|
-
{{#if tile.config.gridOptions}}
|
|
27
|
+
{{#if tile.config.gridOptions~}}
|
|
28
|
+
import { GridOptionsConfig } from '@genesislcap/rapid-grid-pro';
|
|
17
29
|
import { gridOptions as gridOptionsTile } from './{{pascalCase tile.title}}GridOptions';
|
|
18
30
|
{{/if}}
|
|
19
31
|
import './{{pascalCase tile.title}}Component.css';
|
|
20
32
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
{{#ifAny tile.metadata.comment tile.metadata.todo}}
|
|
34
|
+
/**
|
|
35
|
+
{{~#if tile.metadata.comment}}{{{ tile.metadata.comment }}}{{/if}}
|
|
36
|
+
{{~#if tile.metadata.todo}}{{#if tile.metadata.comment}}
|
|
37
|
+
*{{/if}}
|
|
38
|
+
* TODO: {{{ tile.metadata.todo }}}{{/if}}
|
|
39
|
+
*/
|
|
40
|
+
{{/ifAny}}
|
|
41
|
+
|
|
42
|
+
export const {{pascalCase tile.componentName}}: React.FC = () => {
|
|
43
|
+
{{#if tile.config.permissions.viewRight~}}
|
|
44
|
+
const hasUserPermission = (permissionCode: string): boolean => getViewUpdateRightComponent(getUser(), permissionCode);
|
|
45
|
+
{{else if tile.config.permissions.updateRight~}}
|
|
46
|
+
const hasUserPermission = (permissionCode: string): boolean => getViewUpdateRightComponent(getUser(), permissionCode);
|
|
47
|
+
{{/if}}
|
|
48
|
+
{{#if tile.config.createFormUiSchema~}}
|
|
49
|
+
const createFormSchema: typeof createFormSchemaTile = createFormSchemaTile;
|
|
50
|
+
{{/if}}
|
|
51
|
+
{{#if tile.config.uischema~}}
|
|
52
|
+
const uischema: typeof createFormSchemaTile = createFormSchemaTile;
|
|
53
|
+
{{/if}}
|
|
54
|
+
{{#if tile.config.updateFormUiSchema~}}
|
|
55
|
+
const updateFormSchema: typeof updateFormSchemaTile = updateFormSchemaTile;
|
|
56
|
+
{{/if}}
|
|
57
|
+
{{#if tile.config.columns~}}
|
|
58
|
+
const columnDefs: typeof columnDefsTile = [
|
|
59
|
+
...columnDefsTile,
|
|
60
|
+
{{#if tile.config.customEvents}}
|
|
61
|
+
/**
|
|
62
|
+
* TODO: Update the action button's icon under `contentTemplate` below.
|
|
63
|
+
* More information about rapid-icon can be found at: https://docs.genesis.global/docs/develop/client-capabilities/presentation/client-presentation-icon/
|
|
64
|
+
**/
|
|
65
|
+
{{#each tile.config.customEvents}}
|
|
66
|
+
{
|
|
67
|
+
field: '',
|
|
68
|
+
headerName: '',
|
|
69
|
+
minWidth: 50,
|
|
70
|
+
maxWidth: 50,
|
|
71
|
+
pinned: 'right',
|
|
72
|
+
cellRenderer: RapidAgActionRenderer,
|
|
73
|
+
cellRendererParams: {
|
|
74
|
+
actionClick: async (rowData) => {
|
|
75
|
+
const { ROW_REF, ...DETAILS } = rowData;
|
|
76
|
+
const response = await getConnect().commitEvent("EVENT_{{this}}", {
|
|
77
|
+
DETAILS,
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
contentTemplate: `
|
|
81
|
+
<rapid-icon name="cog"></rapid-icon>
|
|
82
|
+
`,
|
|
83
|
+
} as ActionRendererParams,
|
|
84
|
+
},
|
|
85
|
+
{{/each}}
|
|
86
|
+
{{/if}}
|
|
87
|
+
];
|
|
88
|
+
{{/if}}
|
|
89
|
+
{{#if tile.config.gridOptions~}}
|
|
90
|
+
const deferredGridOptions: { onRowClicked: GridOptionsConfig.onRowClicked } = { onRowClicked: gridOptionsTile?.onRowClicked }
|
|
91
|
+
{{/if}}
|
|
92
|
+
{{#if tile.config.reqrep~}}
|
|
93
|
+
const reqrep: { pollingInterval: number } = { pollingInterval: 5000 };
|
|
94
|
+
{{/if}}
|
|
95
|
+
{{#if tile.config.type~}}
|
|
96
|
+
const chartConfig: {
|
|
97
|
+
{{#ifEquals tile.config.type 'pie'~}}
|
|
98
|
+
radius: number;
|
|
99
|
+
angleField: string;
|
|
100
|
+
colorField: string;
|
|
101
|
+
{{else~}}
|
|
102
|
+
xField: string;
|
|
103
|
+
yField: string;
|
|
104
|
+
{{/ifEquals}}
|
|
105
|
+
} = {
|
|
106
|
+
{{#ifEquals tile.config.type 'pie'~}}
|
|
107
|
+
radius: 0.75,
|
|
108
|
+
angleField: 'value',
|
|
109
|
+
colorField: 'groupBy',
|
|
110
|
+
{{else~}}
|
|
111
|
+
xField: 'groupBy',
|
|
112
|
+
yField: 'value',
|
|
113
|
+
{{/ifEquals}}
|
|
114
|
+
};
|
|
115
|
+
{{/if}}
|
|
36
116
|
|
|
37
117
|
return (
|
|
38
118
|
{{> (lookup tile 'type') tile}}
|
|
39
119
|
);
|
|
40
|
-
};
|
|
120
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './{{pascalCase tile.title}}Component.
|
|
1
|
+
export * from './{{pascalCase tile.title}}Component.tsx';
|
|
@@ -1,52 +1,65 @@
|
|
|
1
|
-
{{#if config.permissions.viewRight}}
|
|
1
|
+
{{#if config.permissions.viewRight~}}
|
|
2
|
+
hasUserPermission('{{config.permissions.viewRight}}') ? (
|
|
3
|
+
{{/if}}
|
|
2
4
|
<entity-management
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
5
|
+
design-system-prefix="rapid"
|
|
6
|
+
enable-row-flashing
|
|
7
|
+
enable-cell-flashing
|
|
8
|
+
{{#if config.title~}}
|
|
9
|
+
title="{{ config.title }}"
|
|
10
|
+
{{/if}}
|
|
11
|
+
resourceName="{{ config.resourceName }}"
|
|
12
|
+
{{#if config.createEvent~}}
|
|
13
|
+
{{#if config.permissions.updateRight~}}
|
|
14
|
+
createEvent={hasUserPermission('{{config.permissions.updateRight}}') ? '{{ config.createEvent }}' : undefined}
|
|
15
|
+
{{else~}}
|
|
16
|
+
createEvent="{{ config.updateEvent }}"
|
|
17
|
+
{{/if}}
|
|
18
|
+
{{#if config.createFormUiSchema~}}
|
|
19
|
+
createFormUiSchema={createFormSchema}
|
|
20
|
+
{{/if}}
|
|
21
|
+
{{/if}}
|
|
22
|
+
{{#if config.updateEvent~}}
|
|
23
|
+
{{#if config.permissions.updateRight~}}
|
|
24
|
+
updateEvent={hasUserPermission('{{config.permissions.updateRight}}') ? '{{ config.updateEvent }}' : undefined}
|
|
25
|
+
{{else~}}
|
|
26
|
+
updateEvent="{{ config.updateEvent }}"
|
|
27
|
+
{{/if}}
|
|
28
|
+
{{#if config.updateFormUiSchema~}}
|
|
29
|
+
updateFormUiSchema={updateFormSchema}
|
|
30
|
+
{{/if}}
|
|
31
|
+
{{/if}}
|
|
32
|
+
{{#if config.deleteEvent~}}
|
|
33
|
+
{{#if config.permissions.updateRight~}}
|
|
34
|
+
deleteEvent={hasUserPermission('{{config.permissions.updateRight}}') ? '{{ config.deleteEvent }}' : undefined}
|
|
35
|
+
{{else~}}
|
|
36
|
+
deleteEvent="{{ config.deleteEvent }}"
|
|
37
|
+
{{/if}}
|
|
38
|
+
{{/if}}
|
|
39
|
+
{{#if config.gridOptions~}}
|
|
40
|
+
gridOptions={gridOptions}
|
|
41
|
+
{{/if}}
|
|
42
|
+
{{#if config.snapshot~}}
|
|
43
|
+
datasourceConfig={ isSnapshot: {{ config.snapshot }} }
|
|
44
|
+
{{/if}}
|
|
45
|
+
{{#if config.reqrep~}}
|
|
46
|
+
datasourceConfig={reqrep}
|
|
47
|
+
{{/if}}
|
|
48
|
+
{{#if config.columns~}}
|
|
49
|
+
columns={columnDefs}
|
|
50
|
+
{{/if}}
|
|
51
|
+
{{#if config.modalPosition~}}
|
|
52
|
+
modal-position="{{ config.modalPosition }}"
|
|
53
|
+
{{/if}}
|
|
54
|
+
{{#if config.sizeColumnsToFit~}}
|
|
55
|
+
size-columns-to-fit
|
|
56
|
+
{{/if}}
|
|
57
|
+
{{#if config.enableSearchBar~}}
|
|
58
|
+
enable-search-bar
|
|
59
|
+
{{/if}}
|
|
60
|
+
></entity-management>
|
|
61
|
+
{{#if config.permissions.viewRight~}}
|
|
50
62
|
) : (
|
|
51
63
|
<ErrorMessage elementType="h3" message="You do not have access to view this component." />
|
|
52
|
-
)
|
|
64
|
+
)
|
|
65
|
+
{{/if}}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
{{#if config.permissions.updateRight}}
|
|
1
|
+
{{#if config.permissions.updateRight~}}
|
|
2
|
+
hasUserPermission('{{config.permissions.updateRight}}') ? (
|
|
3
|
+
{{/if}}
|
|
2
4
|
<foundation-form
|
|
3
5
|
design-system-prefix="rapid"
|
|
4
6
|
resourceName="{{config.resourceName}}"
|
|
@@ -6,7 +8,9 @@
|
|
|
6
8
|
uischema={uischema}
|
|
7
9
|
{{/if}}
|
|
8
10
|
>
|
|
9
|
-
</foundation-form>
|
|
11
|
+
</foundation-form>
|
|
12
|
+
{{#if config.permissions.updateRight~}}
|
|
10
13
|
) : (
|
|
11
14
|
<ErrorMessage elementType="h3" message="You do not have access to view this component." />
|
|
12
|
-
)
|
|
15
|
+
)
|
|
16
|
+
{{/if}}
|
|
@@ -1,28 +1,34 @@
|
|
|
1
|
-
{{#if config.permissions.viewRight}}
|
|
1
|
+
{{#if config.permissions.viewRight~}}
|
|
2
|
+
hasUserPermission('{{config.permissions.viewRight}}') ? (
|
|
3
|
+
{{/if}}
|
|
2
4
|
<rapid-grid-pro
|
|
3
|
-
header-case-type="capitalCase"
|
|
4
|
-
|
|
5
|
+
header-case-type="capitalCase"
|
|
6
|
+
{{#if config.useOnlyTemplateCols~}}
|
|
7
|
+
only-template-col-defs
|
|
8
|
+
{{/if}}
|
|
5
9
|
enable-row-flashing
|
|
6
10
|
enable-cell-flashing
|
|
7
11
|
>
|
|
8
12
|
<grid-pro-genesis-datasource
|
|
9
13
|
resource-name="{{config.resourceName}}"
|
|
10
|
-
{{#if config.snapshot}}
|
|
14
|
+
{{#if config.snapshot~}}
|
|
11
15
|
isSnapshot="{{config.snapshot}}"
|
|
12
16
|
{{/if}}
|
|
13
|
-
{{#if config.reqrep}}
|
|
17
|
+
{{#if config.reqrep~}}
|
|
14
18
|
datasourceConfig="reqrep"
|
|
15
19
|
{{/if}}
|
|
16
|
-
{{#if config.gridOptions}}
|
|
17
|
-
deferredGridOptions
|
|
20
|
+
{{#if config.gridOptions~}}
|
|
21
|
+
deferredGridOptions={deferredGridOptions}
|
|
18
22
|
{{/if}}
|
|
19
23
|
></grid-pro-genesis-datasource>
|
|
20
24
|
{{#if config.gridOptions}}
|
|
21
|
-
{
|
|
25
|
+
{gridOptionsTile?.columnDefs?.map((columnDef, index) => (
|
|
22
26
|
<grid-pro-column key={index} definition={columnDef}></grid-pro-column>
|
|
23
27
|
))}
|
|
24
28
|
{{/if}}
|
|
25
|
-
</rapid-grid-pro>
|
|
29
|
+
</rapid-grid-pro>
|
|
30
|
+
{{#if config.permissions.viewRight~}}
|
|
26
31
|
) : (
|
|
27
32
|
<ErrorMessage elementType="h3" message="You do not have access to view this component." />
|
|
28
|
-
)
|
|
33
|
+
)
|
|
34
|
+
{{/if}}
|