@genesislcap/blank-app-seed 3.30.0-prerelease.3 → 3.30.0-prerelease.31

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.
Files changed (111) hide show
  1. package/.genx/configure.js +5 -0
  2. package/.genx/package.json +1 -1
  3. package/.genx/prompts/api.js +2 -9
  4. package/.genx/prompts/server.js +9 -0
  5. package/.genx/prompts.js +9 -2
  6. package/.genx/static.js +1 -1
  7. package/.genx/templates/angular/component/component.hbs +12 -0
  8. package/.genx/templates/react/chart.hbs +7 -3
  9. package/.genx/templates/react/component/component.column.defs.hbs +4 -2
  10. package/.genx/templates/react/component/component.create.form.hbs +2 -2
  11. package/.genx/templates/react/component/component.gridOptions.hbs +4 -2
  12. package/.genx/templates/react/component/component.hbs +76 -27
  13. package/.genx/templates/react/component/component.index.hbs +1 -1
  14. package/.genx/templates/react/component/component.update.form.hbs +1 -1
  15. package/.genx/templates/react/entityManager.hbs +62 -49
  16. package/.genx/templates/react/form.hbs +7 -3
  17. package/.genx/templates/react/grid.hbs +16 -10
  18. package/.genx/templates/react/route.hbs +3 -3
  19. package/.genx/templates/react/tabsLayout.hbs +5 -5
  20. package/.genx/templates/web-components/component/component.hbs +12 -0
  21. package/.genx/templates/web-components/route.template.hbs +2 -2
  22. package/.genx/utils/deleteGradleWrappers.js +12 -0
  23. package/.genx/utils/generateRoute.js +9 -7
  24. package/.genx/utils/generateTile.js +31 -16
  25. package/.genx/utils/index.js +2 -0
  26. package/.genx/versions.json +3 -3
  27. package/.gitignore +3 -0
  28. package/.idea/modules.xml +6 -6
  29. package/CHANGELOG.md +196 -0
  30. package/README.md +6 -10
  31. package/client-tmp/angular/__mocks__/fileMock.js +1 -0
  32. package/client-tmp/angular/angular.json +0 -29
  33. package/client-tmp/angular/jest.config.js +20 -0
  34. package/client-tmp/angular/package.json +6 -6
  35. package/client-tmp/angular/src/app/layouts/default/default.layout.spec.ts +2 -2
  36. package/client-tmp/angular/src/jest.setup.ts +46 -0
  37. package/client-tmp/angular/tsconfig.app.json +1 -2
  38. package/client-tmp/angular/tsconfig.json +1 -2
  39. package/client-tmp/angular/tsconfig.spec.json +13 -7
  40. package/client-tmp/react/.babelrc +10 -0
  41. package/client-tmp/react/.eslintrc.cjs +1 -0
  42. package/client-tmp/react/jest.config.ts +15 -0
  43. package/client-tmp/react/jest.setup.ts +1 -0
  44. package/client-tmp/react/lint-css.ts +19 -0
  45. package/client-tmp/react/package.json +45 -17
  46. package/client-tmp/react/public/favicon.ico +0 -0
  47. package/client-tmp/react/public/index.html +13 -0
  48. package/client-tmp/react/src/App.tsx +95 -68
  49. package/client-tmp/react/src/components/{ErrorMessage.test.js → ErrorMessage/ErrorMessage.test.tsx} +31 -16
  50. package/client-tmp/react/src/components/ErrorMessage/{ErrorMessage.jsx → ErrorMessage.tsx} +9 -4
  51. package/client-tmp/react/src/config.ts +2 -16
  52. package/client-tmp/react/src/custom-elements.d.ts +21 -9
  53. package/client-tmp/react/src/environments/environment.prod.ts +8 -0
  54. package/client-tmp/react/src/environments/environment.ts +9 -0
  55. package/client-tmp/react/src/guards/ProtectedGuard.tsx +64 -0
  56. package/client-tmp/react/src/helpers/hasPermissionHelper.tsx +10 -0
  57. package/client-tmp/react/src/helpers/isAuthenticatedHelper.tsx +14 -0
  58. package/client-tmp/react/src/helpers/isConnectedHelper.tsx +16 -0
  59. package/client-tmp/react/src/layouts/blank/BlankLayout.tsx +1 -1
  60. package/client-tmp/react/src/layouts/default/DefaultLayout.tsx +26 -15
  61. package/client-tmp/react/src/main.tsx +21 -5
  62. package/client-tmp/react/src/pages/AuthPage/AuthPage.test.tsx +10 -0
  63. package/client-tmp/react/src/pages/AuthPage/{AuthPage.jsx → AuthPage.tsx} +3 -2
  64. package/client-tmp/react/src/pages/NotFoundPage/NotFoundPage.css +0 -0
  65. package/client-tmp/react/src/pages/NotFoundPage/NotFoundPage.tsx +14 -0
  66. package/client-tmp/react/src/pages/NotPermittedPage/NotPermittedPage.test.tsx +17 -0
  67. package/client-tmp/react/src/pages/NotPermittedPage/NotPermittedPage.tsx +14 -0
  68. package/client-tmp/react/src/pbc/README.md +7 -0
  69. package/client-tmp/react/src/pbc/container.tsx +44 -0
  70. package/client-tmp/react/src/pbc/elementsRenderer.tsx +40 -0
  71. package/client-tmp/react/src/pbc/utils.ts +121 -0
  72. package/client-tmp/react/src/services/store.service.ts +48 -0
  73. package/client-tmp/react/src/share/foundation-login.ts +13 -6
  74. package/client-tmp/react/src/share/genesis-components.ts +49 -23
  75. package/client-tmp/react/src/store/AuthContext.tsx +0 -2
  76. package/client-tmp/react/src/store/RoutesContext.tsx +74 -0
  77. package/client-tmp/react/src/types/LayoutName.ts +3 -0
  78. package/client-tmp/react/src/types/RouteLayouts.ts +3 -1
  79. package/client-tmp/react/src/utils/getLayoutNameByRoute.ts +5 -0
  80. package/client-tmp/react/src/utils/history.ts +4 -2
  81. package/client-tmp/react/src/utils/index.ts +3 -1
  82. package/client-tmp/react/src/utils/layout.ts +11 -0
  83. package/client-tmp/react/test/e2e/fixture.ts +1 -1
  84. package/client-tmp/react/tsconfig.app.json +2 -26
  85. package/client-tmp/react/tsconfig.json +31 -8
  86. package/client-tmp/react/tsconfig.node.json +1 -1
  87. package/client-tmp/react/vite.config.ts +70 -0
  88. package/client-tmp/react/webpack.config.js +103 -0
  89. package/client-tmp/web-components/package.json +2 -1
  90. package/client-tmp/web-components/src/main/main.styles.ts +1 -1
  91. package/client-tmp/web-components/src/utils/index.ts +1 -0
  92. package/client-tmp/web-components/src/utils/layout.ts +11 -0
  93. package/client-tmp/web-components/tsconfig.json +1 -1
  94. package/package.json +1 -1
  95. package/server/build.gradle.kts +1 -0
  96. package/server/gradle.properties +1 -0
  97. package/server/settings.gradle.kts +8 -7
  98. package/settings.gradle.kts +7 -4
  99. package/testData/excel/.gitkeep +0 -0
  100. package/client-tmp/angular/karma.conf.js +0 -9
  101. package/client-tmp/angular/src/app/app.component.spec.ts +0 -23
  102. package/client-tmp/react/env.development.json +0 -3
  103. package/client-tmp/react/lint-css.js +0 -18
  104. package/client-tmp/react/src/guards/AuthGuard.tsx +0 -32
  105. package/client-tmp/react/src/guards/PermissionsGuard.tsx +0 -37
  106. package/client-tmp/react/src/index.js +0 -17
  107. package/client-tmp/react/src/pages/NotPermittedPage/NotPermittedPage.jsx +0 -13
  108. package/client-tmp/react/src/reportWebVitals.js +0 -13
  109. package/client-tmp/react/vite.config.js +0 -59
  110. /package/client-tmp/react/src/{setupTests.js → setupTests.ts} +0 -0
  111. /package/server/{{appName}}-app/src/main/genesis/scripts/{{{appName}}-data-pipelines.kts → {{appName}}-pipelines.kts} +0 -0
@@ -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
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/blank-app-seed-config",
3
3
  "description": "Genesis Blank App Seed Configuration",
4
- "version": "3.30.0-prerelease.3",
4
+ "version": "3.30.0-prerelease.31",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "lint": "eslint .",
@@ -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: ({ setApiHost }) => setApiHost,
22
- default: prevAns.apiHost || 'ws://localhost/gwf/',
14
+ when: !prevAns.apiHost,
15
+ default: 'ws://localhost:9064',
23
16
  validate: websocketValidator,
24
17
  },
25
18
  ]);
@@ -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 { description, groupId, applicationVersion, enableDeployPlugin, csv } =
21
- await genesisServerPrompts(inquirer, prevAns);
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',
@@ -22,6 +22,18 @@ import { columnDefs } from './{{kebabCase tile.title}}.column.defs';
22
22
  import { gridOptions } from './{{kebabCase tile.title}}.gridOptions';
23
23
  {{/if}}
24
24
 
25
+ {{#if tile.metadata.comment}}
26
+ /*
27
+ {{ tile.metadata.comment }}
28
+ */
29
+
30
+ {{/if}}
31
+ {{#if tile.metadata.todo}}
32
+ /*
33
+ {{ tile.metadata.todo }}
34
+ */
35
+
36
+ {{/if}}
25
37
  @Component({
26
38
  selector: 'app-{{kebabCase tile.componentName}}',
27
39
  templateUrl: './{{kebabCase tile.title}}.component.html',
@@ -1,4 +1,6 @@
1
- {{#if config.permissions.viewRight}}hasUserPermission('{{config.permissions.viewRight}}') ? ({{/if}}
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>{{#if config.permissions.viewRight}}
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
- ){{/if}}
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,89 @@
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
- {{#if tile.config.createFormUiSchema}}
5
- import { createFormSchema as createFormSchemaTile } from './{{kebabCase tile.title}}.create.form.schema';
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.createFormUiSchema~}}
11
+ import { createFormSchema as createFormSchemaTile } from './{{pascalCase tile.title}}CreateFormSchema';
6
12
  {{/if}}
7
- {{#if tile.config.uischema}}
8
- import { createFormSchema as createFormSchemaTile } from './{{kebabCase tile.title}}.create.form.schema';
13
+ {{#if tile.config.uischema~}}
14
+ import { createFormSchema as createFormSchemaTile } from './{{pascalCase tile.title}}CreateFormSchema';
9
15
  {{/if}}
10
- {{#if tile.config.updateFormUiSchema}}
11
- import { updateFormSchema as updateFormSchemaTile } from './{{kebabCase tile.title}}.update.form.schema';
16
+ {{#if tile.config.updateFormUiSchema~}}
17
+ import { updateFormSchema as updateFormSchemaTile } from './{{pascalCase tile.title}}UpdateFormSchema';
12
18
  {{/if}}
13
- {{#if tile.config.columns}}
14
- import { columnDefs as columnDefsTile } from './{{kebabCase tile.title}}.column.defs';
19
+ {{#if tile.config.columns~}}
20
+ import { columnDefs as columnDefsTile } from './{{pascalCase tile.title}}ColumnDefs';
15
21
  {{/if}}
16
- {{#if tile.config.gridOptions}}
17
- import { gridOptions as gridOptionsTile } from './{{kebabCase tile.title}}.gridOptions';
22
+ {{#if tile.config.gridOptions~}}
23
+ import { GridOptionsConfig } from '@genesislcap/rapid-grid-pro';
24
+ import { gridOptions as gridOptionsTile } from './{{pascalCase tile.title}}GridOptions';
18
25
  {{/if}}
19
- import './{{kebabCase tile.title}}.component.css';
26
+ import './{{pascalCase tile.title}}Component.css';
20
27
 
21
- export const {{pascalCase tile.componentName}} = () => {
22
- const hasUserPermission = (permissionCode) => getViewUpdateRightComponent(getUser(), permissionCode);{{#if tile.config.createFormUiSchema}}
23
- const createFormSchema = createFormSchemaTile;{{/if}}{{#if tile.config.uischema}}
24
- const uischema = createFormSchemaTile;{{/if}}{{#if tile.config.updateFormUiSchema}}
25
- const updateFormSchema = updateFormSchemaTile;{{/if}}{{#if tile.config.columns}}
26
- const columnDefs = columnDefsTile;{{/if}}{{#if tile.config.gridOptions}}
27
- const gridOptions = gridOptionsTile;{{/if}}{{#if tile.config.reqrep}}
28
- const reqrep = { pollingInterval: 5000 };{{/if}}{{#if tile.config.type}}
29
- const chartConfig = { {{#ifEquals tile.config.type 'pie'}}
30
- "radius": 0.75,
31
- "angleField": "value",
32
- "colorField": "groupBy",{{else}}
33
- "xField": "groupBy",
34
- "yField": "value",{{/ifEquals}}
35
- };{{/if}}
28
+ {{#if tile.metadata.comment}}
29
+ /*
30
+ {{ tile.metadata.comment }}
31
+ */
32
+
33
+ {{/if}}
34
+ {{#if tile.metadata.todo}}
35
+ /*
36
+ {{ tile.metadata.todo }}
37
+ */
38
+
39
+ {{/if}}
40
+ export const {{pascalCase tile.componentName}}: React.FC = () => {
41
+ {{#if tile.config.permissions.viewRight~}}
42
+ const hasUserPermission = (permissionCode: string): boolean => getViewUpdateRightComponent(getUser(), permissionCode);
43
+ {{else if tile.config.permissions.updateRight~}}
44
+ const hasUserPermission = (permissionCode: string): boolean => getViewUpdateRightComponent(getUser(), permissionCode);
45
+ {{/if}}
46
+ {{#if tile.config.createFormUiSchema~}}
47
+ const createFormSchema: typeof createFormSchemaTile = createFormSchemaTile;
48
+ {{/if}}
49
+ {{#if tile.config.uischema~}}
50
+ const uischema: typeof createFormSchemaTile = createFormSchemaTile;
51
+ {{/if}}
52
+ {{#if tile.config.updateFormUiSchema~}}
53
+ const updateFormSchema: typeof updateFormSchemaTile = updateFormSchemaTile;
54
+ {{/if}}
55
+ {{#if tile.config.columns~}}
56
+ const columnDefs: typeof columnDefsTile = columnDefsTile;
57
+ {{/if}}
58
+ {{#if tile.config.gridOptions~}}
59
+ const deferredGridOptions: { onRowClicked: GridOptionsConfig.onRowClicked } = { onRowClicked: gridOptionsTile?.onRowClicked }
60
+ {{/if}}
61
+ {{#if tile.config.reqrep~}}
62
+ const reqrep: { pollingInterval: number } = { pollingInterval: 5000 };
63
+ {{/if}}
64
+ {{#if tile.config.type~}}
65
+ const chartConfig: {
66
+ {{#ifEquals tile.config.type 'pie'~}}
67
+ radius: number;
68
+ angleField: string;
69
+ colorField: string;
70
+ {{else~}}
71
+ xField: string;
72
+ yField: string;
73
+ {{/ifEquals}}
74
+ } = {
75
+ {{#ifEquals tile.config.type 'pie'~}}
76
+ radius: 0.75,
77
+ angleField: 'value',
78
+ colorField: 'groupBy',
79
+ {{else~}}
80
+ xField: 'groupBy',
81
+ yField: 'value',
82
+ {{/ifEquals}}
83
+ };
84
+ {{/if}}
36
85
 
37
86
  return (
38
87
  {{> (lookup tile 'type') tile}}
39
88
  );
40
- };
89
+ };
@@ -1 +1 @@
1
- export * from './{{kebabCase tile.title}}.component.jsx';
1
+ export * from './{{pascalCase tile.title}}Component.tsx';
@@ -1,5 +1,5 @@
1
1
  import { UiSchema } from '@genesislcap/foundation-forms';
2
2
 
3
- {{#if tile.config.updateFormUiSchema}}
3
+ {{#if tile.config.updateFormUiSchema~}}
4
4
  export const updateFormSchema: UiSchema = {{{ tile.config.updateFormUiSchema }}}
5
5
  {{/if}}
@@ -1,52 +1,65 @@
1
- {{#if config.permissions.viewRight}}hasUserPermission('{{config.permissions.viewRight}}') ? ({{/if}}
1
+ {{#if config.permissions.viewRight~}}
2
+ hasUserPermission('{{config.permissions.viewRight}}') ? (
3
+ {{/if}}
2
4
  <entity-management
3
- design-system-prefix="rapid"
4
- enable-row-flashing
5
- enable-cell-flashing
6
- {{#if config.title}}
7
- title="{{ config.title }}"
8
- {{/if}}
9
- resourceName="{{ config.resourceName }}"
10
- {{#if config.createEvent}}
11
- createEvent={hasUserPermission('{{config.permissions.updateRight}}') ? '{{ config.createEvent }}' : undefined}
12
- {{#if config.createFormUiSchema}}
13
- createFormUiSchema={createFormSchema}
14
- {{/if}}
15
- {{/if}}
16
- {{#if config.updateEvent}}
17
- updateEvent={hasUserPermission('{{config.permissions.updateRight}}') ? '{{ config.updateEvent }}' : undefined}
18
- {{#if config.updateFormUiSchema}}
19
- updateFormUiSchema={updateFormSchema}
20
- {{/if}}
21
- {{/if}}
22
- {{#if config.deleteEvent}}
23
- deleteEvent={hasUserPermission('{{config.permissions.updateRight}}') ? '{{ config.deleteEvent }}' : undefined}
24
- {{/if}}
25
- {{#if config.gridOptions}}
26
- gridOptions={gridOptions}
27
- {{/if}}
28
- {{#if config.snapshot}}
29
- datasourceConfig={ isSnapshot: {{ config.snapshot }} }
30
- {{/if}}
31
- {{#if config.reqrep}}
32
- datasourceConfig={reqrep}
33
- {{/if}}
34
- {{#if config.entityName}}
35
- entityLabel="{{ config.entityName }}"
36
- {{/if}}
37
- {{#if config.columns}}
38
- columns={columnDefs}
39
- {{/if}}
40
- {{#if config.modalPosition}}
41
- modal-position="{{ config.modalPosition }}"
42
- {{/if}}
43
- {{#if config.sizeColumnsToFit}}
44
- size-columns-to-fit
45
- {{/if}}
46
- {{#if config.enableSearchBar}}
47
- enable-search-bar
48
- {{/if}}
49
- ></entity-management>{{#if config.permissions.viewRight}}
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
- ){{/if}}
64
+ )
65
+ {{/if}}
@@ -1,4 +1,6 @@
1
- {{#if config.permissions.updateRight}}hasUserPermission('{{config.permissions.updateRight}}') ? ({{/if}}
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>{{#if config.permissions.updateRight}}
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
- ){{/if}}
15
+ )
16
+ {{/if}}
@@ -1,28 +1,34 @@
1
- {{#if config.permissions.viewRight}}hasUserPermission('{{config.permissions.viewRight}}') ? ({{/if}}
1
+ {{#if config.permissions.viewRight~}}
2
+ hasUserPermission('{{config.permissions.viewRight}}') ? (
3
+ {{/if}}
2
4
  <rapid-grid-pro
3
- header-case-type="capitalCase"{{#if config.useOnlyTemplateCols}}
4
- only-template-col-defs{{/if}}
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=\{{ onRowClicked: gridOptions?.onRowClicked }}
20
+ {{#if config.gridOptions~}}
21
+ deferredGridOptions={deferredGridOptions}
18
22
  {{/if}}
19
23
  ></grid-pro-genesis-datasource>
20
24
  {{#if config.gridOptions}}
21
- {gridOptions?.columnDefs?.map((columnDef, index) => (
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>{{#if config.permissions.viewRight}}
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
- ){{/if}}
33
+ )
34
+ {{/if}}
@@ -1,14 +1,14 @@
1
1
  import './{{pascalCase route.name}}.css';
2
+ import { persistLayout } from '../../utils';
2
3
  {{#each route.tiles}}
3
- import { {{pascalCase this.componentName}} } from './{{kebabCase this.title}}-{{this.componentType}}';
4
+ import { {{pascalCase this.componentName}} } from './{{pascalCase this.title}}{{pascalCase this.componentType}}';
4
5
  {{/each}}
5
6
 
6
7
  const {{pascalCase route.name}} = () => {
7
-
8
8
  return (
9
9
  <section className="{{kebabCase route.name}}-page">
10
10
  {{#if route.tiles}}
11
- <rapid-layout auto-save-key={process.env.NODE_ENV === 'production' ? "{{route.layoutKey}}" : null}>
11
+ <rapid-layout auto-save-key={persistLayout('{{route.layoutKey}}')}>
12
12
  {{> (lookup ./route 'layoutType') }}
13
13
  </rapid-layout>
14
14
  {{else}}
@@ -1,7 +1,7 @@
1
1
  <rapid-layout-region type="tabs">
2
- {{#each route.tiles}}
3
- <rapid-layout-item title="{{this.title}}">
4
- {{> (lookup . 'type') }}
5
- </rapid-layout-item>
6
- {{/each}}
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>
@@ -3,6 +3,18 @@ import { customElement, GenesisElement } from '@genesislcap/web-core';
3
3
  import { {{pascalCase tile.title}}Styles as styles } from './{{kebabCase tile.title}}.styles';
4
4
  import { {{pascalCase tile.title}}Template as template } from './{{kebabCase tile.title}}.template';
5
5
 
6
+ {{#if tile.metadata.comment}}
7
+ /*
8
+ {{ tile.metadata.comment }}
9
+ */
10
+
11
+ {{/if}}
12
+ {{#if tile.metadata.todo}}
13
+ /*
14
+ {{ tile.metadata.todo }}
15
+ */
16
+
17
+ {{/if}}
6
18
  @customElement({
7
19
  name: '{{kebabCase tile.componentName}}',
8
20
  template,
@@ -1,5 +1,5 @@
1
- import { isDev } from '@genesislcap/foundation-utils';
2
1
  import { html } from '@genesislcap/web-core';
2
+ import { persistLayout } from '../../utils';
3
3
  import type { {{pascalCase route.name}} } from './{{kebabCase route.name}}';
4
4
  {{#each route.tiles}}
5
5
  import { {{pascalCase this.componentName}} } from './{{kebabCase this.title}}-{{this.componentType}}';
@@ -11,7 +11,7 @@ import { {{pascalCase this.componentName}} } from './{{kebabCase this.title}}-{{
11
11
 
12
12
  export const {{pascalCase route.name}}Template = html<{{pascalCase route.name}}>`
13
13
  {{#if route.tiles}}
14
- <rapid-layout auto-save-key="${() => (isDev() ? null : '{{route.layoutKey}}')}">
14
+ <rapid-layout auto-save-key="${() => persistLayout('{{route.layoutKey}}')}">
15
15
  {{> (lookup ./route 'layoutType') }}
16
16
  </rapid-layout>
17
17
  {{else}}
@@ -0,0 +1,12 @@
1
+ const { rmdirSync } = require('node:fs');
2
+ const { resolve } = require('node:path');
3
+
4
+ const deleteGradleWrappers = (
5
+ paths = ['../../gradle', '../../server/gradle'],
6
+ ) => {
7
+ paths.forEach((p) => {
8
+ rmdirSync(resolve(__dirname, p), { recursive: true, force: true });
9
+ });
10
+ };
11
+
12
+ module.exports = deleteGradleWrappers;
@@ -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: (routePath, routeName) => `${routePath}/${routeName}.styles.ts`,
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: (routePath, routeName) => `${routePath}/${routeName}.component.css`,
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) => `${clientSrcPath}/${routeName}`,
29
+ route: (clientSrcPath, routeName, changeCase) =>
30
+ `${clientSrcPath}/${changeCase.pascalCase(routeName)}`,
30
31
  component: (routeDir, routeName, changeCase) =>
31
- `${routeDir}/${changeCase.pascalCase(routeName)}.jsx`,
32
- style: (routePath, routeName, changeCase) =>
33
- `${routePath}/${changeCase.pascalCase(routeName)}.css`,
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
  {
@@ -75,6 +76,7 @@ const generateRoute = (route, { changeCase, writeFileWithData }, framework) => {
75
76
 
76
77
  if (route?.tiles?.length) {
77
78
  route.tiles.forEach((tile) => {
79
+ tile.metadata = tile.metadata || {};
78
80
  generateTile(tile, route, { changeCase, writeFileWithData }, framework);
79
81
  });
80
82
  }