@genesislcap/blank-app-seed 3.29.2 → 3.30.0-prerelease.10
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/scripts/update-versions.js +45 -15
- package/.genx/templates/angular/entityManager.hbs +3 -0
- package/.genx/templates/angular/route.hbs +0 -1
- package/.genx/templates/react/chart.hbs +9 -1
- 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 +5 -3
- package/.genx/templates/react/component/component.hbs +65 -20
- 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 +63 -43
- package/.genx/templates/react/form.hbs +9 -1
- package/.genx/templates/react/grid.hbs +23 -7
- package/.genx/templates/react/gridLayout.hbs +28 -28
- package/.genx/templates/react/horizontalLayout.hbs +5 -5
- package/.genx/templates/react/route.hbs +4 -19
- package/.genx/templates/react/tabsLayout.hbs +5 -5
- package/.genx/templates/web-components/entityManager.hbs +3 -0
- package/.genx/utils/formatRouteData.js +1 -1
- package/.genx/utils/generateRoute.js +8 -7
- package/.genx/utils/generateTile.js +31 -15
- package/.genx/versions.json +3 -3
- package/.github/pull_request_template.md +1 -1
- package/.github/workflows/build.yml +3 -2
- package/.github/workflows/slack.yml +1 -1
- package/.github/workflows/upgrade.yml +6 -1
- package/.github/workflows/upgrade_prerelease.yml +1 -0
- package/.idea/modules.xml +6 -6
- package/CHANGELOG.md +165 -4
- package/client-tmp/react/.babelrc +10 -0
- package/client-tmp/react/.eslintrc.cjs +4 -1
- package/client-tmp/react/env.development.json +3 -0
- package/client-tmp/react/index.html +1 -1
- package/client-tmp/react/jest.config.ts +15 -0
- package/client-tmp/react/jest.setup.ts +1 -0
- package/client-tmp/react/lint-css.ts +19 -0
- package/client-tmp/react/package.json +42 -6
- package/client-tmp/react/playwright.config.ts +17 -0
- package/client-tmp/react/src/App.tsx +34 -7
- package/client-tmp/react/src/components/ErrorMessage/ErrorMessage.test.tsx +95 -0
- package/client-tmp/react/src/components/ErrorMessage/ErrorMessage.tsx +67 -0
- package/client-tmp/react/src/config.ts +2 -1
- package/client-tmp/react/src/custom-elements.d.ts +19 -9
- package/client-tmp/react/src/guards/AuthGuard.tsx +1 -1
- package/client-tmp/react/src/guards/PermissionsGuard.tsx +37 -0
- package/client-tmp/react/src/index.ts +21 -0
- package/client-tmp/react/src/pages/AuthPage/AuthPage.test.tsx +10 -0
- package/client-tmp/react/src/pages/{auth/AuthPage.jsx → AuthPage/AuthPage.tsx} +3 -2
- package/client-tmp/react/src/pages/NotPermittedPage/NotPermittedPage.css +0 -0
- package/client-tmp/react/src/pages/NotPermittedPage/NotPermittedPage.test.tsx +17 -0
- package/client-tmp/react/src/pages/NotPermittedPage/NotPermittedPage.tsx +14 -0
- package/client-tmp/react/src/{reportWebVitals.js → reportWebVitals.ts} +1 -1
- package/client-tmp/react/src/share/foundation-login.ts +1 -1
- package/client-tmp/react/src/svg-elements.d.ts +1 -1
- package/client-tmp/react/src/utils/fdc3.ts +32 -0
- package/client-tmp/react/src/utils/history.ts +1 -3
- package/client-tmp/react/src/utils/index.ts +4 -0
- package/client-tmp/react/src/utils/permissions.ts +7 -0
- package/client-tmp/react/src/utils/setApiHost.ts +9 -0
- package/client-tmp/react/test/e2e/fixture.ts +26 -0
- package/client-tmp/react/test/e2e/flows/001-protected.e2e.ts +6 -0
- package/client-tmp/react/test/e2e/index.ts +2 -0
- package/client-tmp/react/test/e2e/pages/index.ts +1 -0
- package/client-tmp/react/test/e2e/pages/protected.ts +16 -0
- package/client-tmp/react/tsconfig.app.json +2 -5
- package/client-tmp/react/tsconfig.json +4 -1
- package/client-tmp/react/vite.config.ts +57 -12
- package/package.json +1 -1
- package/server/settings.gradle.kts +2 -2
- package/client-tmp/react/src/index.js +0 -17
- /package/client-tmp/react/src/pages/{auth → AuthPage}/AuthPage.css +0 -0
- /package/client-tmp/react/src/{setupTests.js → setupTests.ts} +0 -0
package/.genx/package.json
CHANGED
|
@@ -4,23 +4,30 @@ const { resolve } = require('node:path');
|
|
|
4
4
|
const current = require('../versions.json');
|
|
5
5
|
|
|
6
6
|
const args = process.argv.slice(2);
|
|
7
|
-
const patchOnly = args.indexOf("--patch-only") >= 0;
|
|
8
|
-
const dryRun = args.indexOf("--dry-run") >= 0;
|
|
9
7
|
|
|
10
|
-
const
|
|
8
|
+
const argDefined = (name) => args.indexOf(name) >= 0;
|
|
9
|
+
|
|
10
|
+
const patchOnly = argDefined("--patch-only");
|
|
11
|
+
const dryRun = argDefined("--dry-run");
|
|
12
|
+
const skipServer = argDefined("--skip-server");
|
|
11
13
|
|
|
12
|
-
const
|
|
14
|
+
const VERSION_REGEX = /\d+$/;
|
|
15
|
+
const JFROG_BASE_EXCLUSIONS = '*-SNAPSHOT*;*maven-metadata*;*test*;*TEST*';
|
|
13
16
|
|
|
14
|
-
const
|
|
17
|
+
const { jfrogVersionMatcher, jfrogExclusionsMatcher, npmVersionMatcher } = patchOnly
|
|
18
|
+
? { jfrogVersionMatcher: current.GSF.replace(VERSION_REGEX, '*'), jfrogExclusionsMatcher: `*-beta*;*-RC*;${JFROG_BASE_EXCLUSIONS}`, npmVersionMatcher: current.UI.replace(VERSION_REGEX, 'x') }
|
|
19
|
+
: { jfrogVersionMatcher: undefined, jfrogExclusionsMatcher: JFROG_BASE_EXCLUSIONS, npmVersionMatcher: 'latest' };
|
|
15
20
|
|
|
16
|
-
console.log('Running with: ', {patchOnly, dryRun, npmVersionMatcher, jfrogVersionMatcher})
|
|
21
|
+
console.log('Running with: ', { patchOnly, skipServer, dryRun, npmVersionMatcher, jfrogVersionMatcher, jfrogExclusionsMatcher });
|
|
17
22
|
|
|
18
|
-
const run = (command) =>
|
|
19
|
-
|
|
23
|
+
const run = (command) => {
|
|
24
|
+
console.debug('running:', command);
|
|
25
|
+
return execSync(command, {
|
|
20
26
|
stdio: ['pipe', 'pipe', 'ignore'],
|
|
21
27
|
})
|
|
22
28
|
.toString('utf8')
|
|
23
29
|
.trim();
|
|
30
|
+
};
|
|
24
31
|
|
|
25
32
|
const writeJSON = (json, path) => {
|
|
26
33
|
const data = JSON.stringify(json, null, 2) + '\n';
|
|
@@ -32,15 +39,38 @@ const writeJSON = (json, path) => {
|
|
|
32
39
|
}
|
|
33
40
|
};
|
|
34
41
|
|
|
35
|
-
|
|
42
|
+
/**
|
|
43
|
+
* NPM Info returns a string if there's only one version in the channel;, otherwise it returns a valid json array,
|
|
44
|
+
* where the most recent version will be the last value;
|
|
45
|
+
* @param {*} output
|
|
46
|
+
* @returns
|
|
47
|
+
*/
|
|
48
|
+
const parseNpmInfo = (output) => {
|
|
49
|
+
try {
|
|
50
|
+
const versions = JSON.parse(output);
|
|
51
|
+
return Array.isArray(versions) ? versions[versions.length-1] : versions;
|
|
52
|
+
} catch (err) {
|
|
53
|
+
return output;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const npmInfo = run(`npm info @genesislcap/foundation-ui@${npmVersionMatcher} version --json`);
|
|
58
|
+
console.debug('Npm raw output:', npmInfo);
|
|
59
|
+
const UI = parseNpmInfo(npmInfo);
|
|
60
|
+
|
|
61
|
+
const serverOsCommandPipeline = `grep path | tr -s ' ' | sed 's/"path": //g' | awk -F'/' '{print $(NF-1)}' | sort -V | tail -n 1`;
|
|
36
62
|
|
|
37
|
-
const GSF =
|
|
38
|
-
|
|
39
|
-
|
|
63
|
+
const { GSF, Auth } = skipServer
|
|
64
|
+
? { GSF: current.GSF, Auth: current.Auth }
|
|
65
|
+
: {
|
|
66
|
+
GSF: run(
|
|
67
|
+
`jf rt s "libs-release-client/global/genesis/genesis-distribution/${jfrogVersionMatcher ?? ''}" --exclusions="${jfrogExclusionsMatcher}" | ${serverOsCommandPipeline}`
|
|
68
|
+
),
|
|
69
|
+
Auth: run(
|
|
70
|
+
`jf rt s "libs-release-client/global/genesis/auth-distribution/${jfrogVersionMatcher ?? ''}" --exclusions="${jfrogExclusionsMatcher}" | ${serverOsCommandPipeline}`,
|
|
71
|
+
)
|
|
72
|
+
};
|
|
40
73
|
|
|
41
|
-
const Auth = run(
|
|
42
|
-
`jf rt s "libs-release-client/global/genesis/auth-distribution/${jfrogVersionMatcher ?? ''}" --exclusions="*-RC*;*-SNAPSHOT*;*maven-metadata*;*test*;*TEST*" | grep path | tr -s ' ' | sed 's/"path": //g' | awk -F'/' '{print $(NF-1)}' | sort -V | tail -n 1`,
|
|
43
|
-
);
|
|
44
74
|
const latest = { UI, GSF, Auth };
|
|
45
75
|
|
|
46
76
|
console.log('Current:', current);
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
{{#if config.permissions.viewRight~}}
|
|
2
|
+
hasUserPermission('{{config.permissions.viewRight}}') ? (
|
|
3
|
+
{{/if}}
|
|
1
4
|
<rapid-g2plot-chart
|
|
2
5
|
type="{{ config.type }}"
|
|
3
|
-
config={
|
|
6
|
+
config={chartConfig}
|
|
4
7
|
>
|
|
5
8
|
<chart-datasource
|
|
6
9
|
resourceName="{{ config.resourceName }}"
|
|
7
10
|
server-fields="{{ config.xField }} {{ config.yField }}"
|
|
8
11
|
></chart-datasource>
|
|
9
12
|
</rapid-g2plot-chart>
|
|
13
|
+
{{#if config.permissions.viewRight~}}
|
|
14
|
+
) : (
|
|
15
|
+
<ErrorMessage elementType="h3" message="You do not have access to view this component." />
|
|
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
|
-
{{/if}}
|
|
11
|
+
{{/if}}
|
|
@@ -1,32 +1,77 @@
|
|
|
1
|
-
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
1
|
+
{{#if tile.config.permissions.viewRight~}}
|
|
3
2
|
import { getUser } from '@genesislcap/foundation-user';
|
|
4
|
-
import { ErrorMessageComponent } from '../../../components/error-message/error-message.component';
|
|
5
3
|
import { getViewUpdateRightComponent } from '../../../utils';
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import ErrorMessage from '../../../components/ErrorMessage/ErrorMessage';
|
|
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';
|
|
8
9
|
{{/if}}
|
|
9
|
-
{{#if tile.config.createFormUiSchema}}
|
|
10
|
-
import { createFormSchema } from './{{
|
|
10
|
+
{{#if tile.config.createFormUiSchema~}}
|
|
11
|
+
import { createFormSchema as createFormSchemaTile } from './{{pascalCase tile.title}}CreateFormSchema';
|
|
11
12
|
{{/if}}
|
|
12
|
-
{{#if tile.config.uischema}}
|
|
13
|
-
import { createFormSchema } from './{{
|
|
13
|
+
{{#if tile.config.uischema~}}
|
|
14
|
+
import { createFormSchema as createFormSchemaTile } from './{{pascalCase tile.title}}CreateFormSchema';
|
|
14
15
|
{{/if}}
|
|
15
|
-
{{#if tile.config.updateFormUiSchema}}
|
|
16
|
-
import { updateFormSchema } from './{{
|
|
16
|
+
{{#if tile.config.updateFormUiSchema~}}
|
|
17
|
+
import { updateFormSchema as updateFormSchemaTile } from './{{pascalCase tile.title}}UpdateFormSchema';
|
|
17
18
|
{{/if}}
|
|
18
|
-
{{#if tile.config.columns}}
|
|
19
|
-
import { columnDefs } from './{{
|
|
19
|
+
{{#if tile.config.columns~}}
|
|
20
|
+
import { columnDefs as columnDefsTile } from './{{pascalCase tile.title}}ColumnDefs';
|
|
20
21
|
{{/if}}
|
|
21
|
-
{{#if tile.config.gridOptions}}
|
|
22
|
-
import {
|
|
22
|
+
{{#if tile.config.gridOptions~}}
|
|
23
|
+
import { GridOptionsConfig } from '@genesislcap/rapid-grid-pro';
|
|
24
|
+
import { gridOptions as gridOptionsTile } from './{{pascalCase tile.title}}GridOptions';
|
|
23
25
|
{{/if}}
|
|
24
|
-
import './{{
|
|
26
|
+
import './{{pascalCase tile.title}}Component.css';
|
|
27
|
+
|
|
28
|
+
export const {{pascalCase tile.componentName}}: React.FC = () => {
|
|
29
|
+
{{#if tile.config.permissions.viewRight~}}
|
|
30
|
+
const hasUserPermission = (permissionCode: string): boolean => getViewUpdateRightComponent(getUser(), permissionCode);
|
|
31
|
+
{{else if tile.config.permissions.updateRight~}}
|
|
32
|
+
const hasUserPermission = (permissionCode: string): boolean => getViewUpdateRightComponent(getUser(), permissionCode);
|
|
33
|
+
{{/if}}
|
|
34
|
+
{{#if tile.config.createFormUiSchema~}}
|
|
35
|
+
const createFormSchema: typeof createFormSchemaTile = createFormSchemaTile;
|
|
36
|
+
{{/if}}
|
|
37
|
+
{{#if tile.config.uischema~}}
|
|
38
|
+
const uischema: typeof createFormSchemaTile = createFormSchemaTile;
|
|
39
|
+
{{/if}}
|
|
40
|
+
{{#if tile.config.updateFormUiSchema~}}
|
|
41
|
+
const updateFormSchema: typeof updateFormSchemaTile = updateFormSchemaTile;
|
|
42
|
+
{{/if}}
|
|
43
|
+
{{#if tile.config.columns~}}
|
|
44
|
+
const columnDefs: typeof columnDefsTile = columnDefsTile;
|
|
45
|
+
{{/if}}
|
|
46
|
+
{{#if tile.config.gridOptions~}}
|
|
47
|
+
const deferredGridOptions: { onRowClicked: GridOptionsConfig.onRowClicked } = { onRowClicked: gridOptionsTile?.onRowClicked }
|
|
48
|
+
{{/if}}
|
|
49
|
+
{{#if tile.config.reqrep~}}
|
|
50
|
+
const reqrep: { pollingInterval: number } = { pollingInterval: 5000 };
|
|
51
|
+
{{/if}}
|
|
52
|
+
{{#if tile.config.type~}}
|
|
53
|
+
const chartConfig: {
|
|
54
|
+
{{#ifEquals tile.config.type 'pie'~}}
|
|
55
|
+
radius: number;
|
|
56
|
+
angleField: string;
|
|
57
|
+
colorField: string;
|
|
58
|
+
{{else~}}
|
|
59
|
+
xField: string;
|
|
60
|
+
yField: string;
|
|
61
|
+
{{/ifEquals}}
|
|
62
|
+
} = {
|
|
63
|
+
{{#ifEquals tile.config.type 'pie'~}}
|
|
64
|
+
radius: 0.75,
|
|
65
|
+
angleField: 'value',
|
|
66
|
+
colorField: 'groupBy',
|
|
67
|
+
{{else~}}
|
|
68
|
+
xField: 'groupBy',
|
|
69
|
+
yField: 'value',
|
|
70
|
+
{{/ifEquals}}
|
|
71
|
+
};
|
|
72
|
+
{{/if}}
|
|
25
73
|
|
|
26
|
-
const {{pascalCase tile.componentName}} = () => {
|
|
27
74
|
return (
|
|
28
75
|
{{> (lookup tile 'type') tile}}
|
|
29
76
|
);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export default {{pascalCase tile.componentName}};
|
|
77
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './{{
|
|
1
|
+
export * from './{{pascalCase tile.title}}Component.tsx';
|
|
@@ -1,45 +1,65 @@
|
|
|
1
|
+
{{#if config.permissions.viewRight~}}
|
|
2
|
+
hasUserPermission('{{config.permissions.viewRight}}') ? (
|
|
3
|
+
{{/if}}
|
|
1
4
|
<entity-management
|
|
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
|
-
|
|
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}}
|
|
45
60
|
></entity-management>
|
|
61
|
+
{{#if config.permissions.viewRight~}}
|
|
62
|
+
) : (
|
|
63
|
+
<ErrorMessage elementType="h3" message="You do not have access to view this component." />
|
|
64
|
+
)
|
|
65
|
+
{{/if}}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
+
{{#if config.permissions.updateRight~}}
|
|
2
|
+
hasUserPermission('{{config.permissions.updateRight}}') ? (
|
|
3
|
+
{{/if}}
|
|
1
4
|
<foundation-form
|
|
2
5
|
design-system-prefix="rapid"
|
|
3
6
|
resourceName="{{config.resourceName}}"
|
|
4
7
|
{{#if config.uischema}}
|
|
5
|
-
uischema={
|
|
8
|
+
uischema={uischema}
|
|
6
9
|
{{/if}}
|
|
7
10
|
>
|
|
8
11
|
</foundation-form>
|
|
12
|
+
{{#if config.permissions.updateRight~}}
|
|
13
|
+
) : (
|
|
14
|
+
<ErrorMessage elementType="h3" message="You do not have access to view this component." />
|
|
15
|
+
)
|
|
16
|
+
{{/if}}
|
|
@@ -1,18 +1,34 @@
|
|
|
1
|
+
{{#if config.permissions.viewRight~}}
|
|
2
|
+
hasUserPermission('{{config.permissions.viewRight}}') ? (
|
|
3
|
+
{{/if}}
|
|
1
4
|
<rapid-grid-pro
|
|
5
|
+
header-case-type="capitalCase"
|
|
6
|
+
{{#if config.useOnlyTemplateCols~}}
|
|
7
|
+
only-template-col-defs
|
|
8
|
+
{{/if}}
|
|
2
9
|
enable-row-flashing
|
|
3
10
|
enable-cell-flashing
|
|
4
11
|
>
|
|
5
12
|
<grid-pro-genesis-datasource
|
|
6
13
|
resource-name="{{config.resourceName}}"
|
|
7
|
-
{{#if config.snapshot}}
|
|
14
|
+
{{#if config.snapshot~}}
|
|
8
15
|
isSnapshot="{{config.snapshot}}"
|
|
9
16
|
{{/if}}
|
|
10
|
-
{{#if config.reqrep}}
|
|
11
|
-
datasourceConfig=
|
|
17
|
+
{{#if config.reqrep~}}
|
|
18
|
+
datasourceConfig="reqrep"
|
|
12
19
|
{{/if}}
|
|
13
|
-
{{#if config.gridOptions}}
|
|
14
|
-
deferredGridOptions={
|
|
20
|
+
{{#if config.gridOptions~}}
|
|
21
|
+
deferredGridOptions={deferredGridOptions}
|
|
15
22
|
{{/if}}
|
|
16
|
-
>
|
|
17
|
-
|
|
23
|
+
></grid-pro-genesis-datasource>
|
|
24
|
+
{{#if config.gridOptions}}
|
|
25
|
+
{gridOptionsTile?.columnDefs?.map((columnDef, index) => (
|
|
26
|
+
<grid-pro-column key={index} definition={columnDef}></grid-pro-column>
|
|
27
|
+
))}
|
|
28
|
+
{{/if}}
|
|
18
29
|
</rapid-grid-pro>
|
|
30
|
+
{{#if config.permissions.viewRight~}}
|
|
31
|
+
) : (
|
|
32
|
+
<ErrorMessage elementType="h3" message="You do not have access to view this component." />
|
|
33
|
+
)
|
|
34
|
+
{{/if}}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
<rapid-layout-region type="horizontal">
|
|
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
|
-
|
|
2
|
+
<rapid-layout-region type="vertical">
|
|
3
|
+
{{#each route.tiles}}
|
|
4
|
+
{{#ifEquals @index 0}}
|
|
5
|
+
<rapid-layout-item title="{{../title}}">
|
|
6
|
+
<{{pascalCase ../componentName}}></{{pascalCase ../componentName}}>
|
|
7
|
+
</rapid-layout-item>
|
|
8
|
+
{{/ifEquals}}
|
|
9
|
+
{{#ifEquals @index 1}}
|
|
10
|
+
<rapid-layout-item title="{{../title}}">
|
|
11
|
+
<{{pascalCase ../componentName}}></{{pascalCase ../componentName}}>
|
|
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
|
+
<{{pascalCase ../componentName}}></{{pascalCase ../componentName}}>
|
|
21
|
+
</rapid-layout-item>
|
|
22
|
+
{{/ifEquals}}
|
|
23
|
+
{{#ifEquals @index 3}}
|
|
24
|
+
<rapid-layout-item title="{{../title}}">
|
|
25
|
+
<{{pascalCase ../componentName}}></{{pascalCase ../componentName}}>
|
|
26
|
+
</rapid-layout-item>
|
|
27
|
+
{{/ifEquals}}
|
|
28
|
+
{{/each}}
|
|
29
|
+
</rapid-layout-region>
|
|
30
30
|
</rapid-layout-region>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<rapid-layout-region>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
{{#each route.tiles}}
|
|
3
|
+
<rapid-layout-item title="{{this.title}}">
|
|
4
|
+
<{{pascalCase this.componentName}}></{{pascalCase this.componentName}}>
|
|
5
|
+
</rapid-layout-item>
|
|
6
|
+
{{/each}}
|
|
7
7
|
</rapid-layout-region>
|
|
@@ -1,28 +1,13 @@
|
|
|
1
1
|
import './{{pascalCase route.name}}.css';
|
|
2
|
+
{{#each route.tiles}}
|
|
3
|
+
import { {{pascalCase this.componentName}} } from './{{pascalCase this.title}}{{pascalCase this.componentType}}';
|
|
4
|
+
{{/each}}
|
|
2
5
|
|
|
3
6
|
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
7
|
return (
|
|
23
8
|
<section className="{{kebabCase route.name}}-page">
|
|
24
9
|
{{#if route.tiles}}
|
|
25
|
-
<rapid-layout auto-save-key="{{route.layoutKey}}">
|
|
10
|
+
<rapid-layout auto-save-key={process.env.NODE_ENV === 'production' ? "{{route.layoutKey}}" : null}>
|
|
26
11
|
{{> (lookup ./route 'layoutType') }}
|
|
27
12
|
</rapid-layout>
|
|
28
13
|
{{else}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<rapid-layout-region type="tabs">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
{{#each route.tiles}}
|
|
3
|
+
<rapid-layout-item title="{{this.title}}">
|
|
4
|
+
{{> (lookup . 'type') }}
|
|
5
|
+
</rapid-layout-item>
|
|
6
|
+
{{/each}}
|
|
7
7
|
</rapid-layout-region>
|
|
@@ -37,7 +37,7 @@ const formatRouteData = (framework, route) => {
|
|
|
37
37
|
...config,
|
|
38
38
|
index,
|
|
39
39
|
gridOptions: gridOptionsSerializer(gridOptions),
|
|
40
|
-
useOnlyTemplateCols: !!gridOptions?.
|
|
40
|
+
useOnlyTemplateCols: !!gridOptions?.columns,
|
|
41
41
|
createFormUiSchema: formatJSONValue(createFormUiSchema),
|
|
42
42
|
updateFormUiSchema: formatJSONValue(updateFormUiSchema),
|
|
43
43
|
uischema: formatJSONValue(uischema),
|
|
@@ -14,7 +14,7 @@ const getPathByFramework = {
|
|
|
14
14
|
route: (clientSrcPath, routeName) => `${clientSrcPath}/${routeName}`,
|
|
15
15
|
component: (routeDir, routeName) => `${routeDir}/${routeName}.ts`,
|
|
16
16
|
template: (routeDir, routeName) => `${routeDir}/${routeName}.template.ts`,
|
|
17
|
-
style: (
|
|
17
|
+
style: (routeDir, routeName) => `${routeDir}/${routeName}.styles.ts`,
|
|
18
18
|
},
|
|
19
19
|
[FRAMEWORK_ANGULAR_ALIAS]: {
|
|
20
20
|
clientSrcPath: `../../client/src/app/pages`,
|
|
@@ -22,15 +22,16 @@ const getPathByFramework = {
|
|
|
22
22
|
component: (routeDir, routeName) => `${routeDir}/${routeName}.component.ts`,
|
|
23
23
|
template: (routeDir, routeName) =>
|
|
24
24
|
`${routeDir}/${routeName}.component.html`,
|
|
25
|
-
style: (
|
|
25
|
+
style: (routeDir, routeName) => `${routeDir}/${routeName}.component.css`,
|
|
26
26
|
},
|
|
27
27
|
[FRAMEWORK_REACT_ALIAS]: {
|
|
28
28
|
clientSrcPath: `../../client/src/pages`,
|
|
29
|
-
route: (clientSrcPath, routeName) =>
|
|
29
|
+
route: (clientSrcPath, routeName, changeCase) =>
|
|
30
|
+
`${clientSrcPath}/${changeCase.pascalCase(routeName)}`,
|
|
30
31
|
component: (routeDir, routeName, changeCase) =>
|
|
31
|
-
`${routeDir}/${changeCase.pascalCase(routeName)}.
|
|
32
|
-
style: (
|
|
33
|
-
`${
|
|
32
|
+
`${routeDir}/${changeCase.pascalCase(routeName)}.tsx`,
|
|
33
|
+
style: (routeDir, routeName, changeCase) =>
|
|
34
|
+
`${routeDir}/${changeCase.pascalCase(routeName)}.css`,
|
|
34
35
|
},
|
|
35
36
|
};
|
|
36
37
|
|
|
@@ -44,7 +45,7 @@ const generateRoute = (route, { changeCase, writeFileWithData }, framework) => {
|
|
|
44
45
|
} = getPathByFramework[framework];
|
|
45
46
|
const routeName = changeCase.paramCase(route.name);
|
|
46
47
|
const sourceTemplateDir = `../${DIR_TEMPLATE_BY_FRAMEWORK[framework]}`;
|
|
47
|
-
const routeDir = getRouteDir(clientSrcPath, routeName);
|
|
48
|
+
const routeDir = getRouteDir(clientSrcPath, routeName, changeCase);
|
|
48
49
|
|
|
49
50
|
const filesToWrite = [
|
|
50
51
|
{
|