@genesislcap/blank-app-seed 3.30.0-prerelease.7 → 3.30.0-prerelease.71
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 +625 -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
|
@@ -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
|
-
<{{pascalCase
|
|
5
|
+
<rapid-layout-item title="{{this.title}}">
|
|
6
|
+
<{{pascalCase this.componentName}}></{{pascalCase this.componentName}}>
|
|
7
7
|
</rapid-layout-item>
|
|
8
8
|
{{/ifEquals}}
|
|
9
9
|
{{#ifEquals @index 1}}
|
|
10
|
-
<rapid-layout-item title="{{
|
|
11
|
-
<{{pascalCase
|
|
10
|
+
<rapid-layout-item title="{{this.title}}">
|
|
11
|
+
<{{pascalCase this.componentName}}></{{pascalCase 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
|
-
<{{pascalCase
|
|
19
|
+
<rapid-layout-item title="{{this.title}}">
|
|
20
|
+
<{{pascalCase this.componentName}}></{{pascalCase this.componentName}}>
|
|
21
21
|
</rapid-layout-item>
|
|
22
22
|
{{/ifEquals}}
|
|
23
23
|
{{#ifEquals @index 3}}
|
|
24
|
-
<rapid-layout-item title="{{
|
|
25
|
-
<{{pascalCase
|
|
24
|
+
<rapid-layout-item title="{{this.title}}">
|
|
25
|
+
<{{pascalCase this.componentName}}></{{pascalCase this.componentName}}>
|
|
26
26
|
</rapid-layout-item>
|
|
27
27
|
{{/ifEquals}}
|
|
28
28
|
{{/each}}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import './{{pascalCase route.name}}.css';
|
|
2
|
+
import { persistLayout } from '../../utils';
|
|
2
3
|
{{#each route.tiles}}
|
|
3
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={
|
|
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
|
-
|
|
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>
|
|
@@ -1,7 +1,25 @@
|
|
|
1
|
+
import { Connect } from '@genesislcap/foundation-comms';
|
|
1
2
|
import { User } from '@genesislcap/foundation-user';
|
|
2
|
-
import { customElement, GenesisElement } from '@genesislcap/web-core';
|
|
3
|
+
import { customElement, GenesisElement, observable } from '@genesislcap/web-core';
|
|
3
4
|
import { {{pascalCase tile.title}}Styles as styles } from './{{kebabCase tile.title}}.styles';
|
|
4
5
|
import { {{pascalCase tile.title}}Template as template } from './{{kebabCase tile.title}}.template';
|
|
6
|
+
{{#if tile.config.columns}}
|
|
7
|
+
import { columnDefs } from './{{kebabCase tile.title}}.column.defs';
|
|
8
|
+
import { ColDef } from '@ag-grid-community/core';
|
|
9
|
+
{{/if}}
|
|
10
|
+
{{#if tile.config.customEvents}}
|
|
11
|
+
import type { ActionRendererParams } from '@genesislcap/rapid-grid-pro';
|
|
12
|
+
import { RapidAgActionRenderer } from '@genesislcap/rapid-grid-pro';
|
|
13
|
+
{{/if}}
|
|
14
|
+
|
|
15
|
+
{{#ifAny tile.metadata.comment tile.metadata.todo}}
|
|
16
|
+
/**
|
|
17
|
+
{{~#if tile.metadata.comment}}{{{ tile.metadata.comment }}}{{/if}}
|
|
18
|
+
{{~#if tile.metadata.todo}}{{#if tile.metadata.comment}}
|
|
19
|
+
*{{/if}}
|
|
20
|
+
* TODO: {{{ tile.metadata.todo }}}{{/if}}
|
|
21
|
+
*/
|
|
22
|
+
{{/ifAny}}
|
|
5
23
|
|
|
6
24
|
@customElement({
|
|
7
25
|
name: '{{kebabCase tile.componentName}}',
|
|
@@ -10,4 +28,39 @@ import { {{pascalCase tile.title}}Template as template } from './{{kebabCase til
|
|
|
10
28
|
})
|
|
11
29
|
export class {{pascalCase tile.componentName}} extends GenesisElement {
|
|
12
30
|
@User user: User;
|
|
13
|
-
|
|
31
|
+
@Connect connect!: Connect;
|
|
32
|
+
|
|
33
|
+
{{#if tile.config.columns}}
|
|
34
|
+
@observable columns: ColDef[] = [
|
|
35
|
+
...columnDefs,
|
|
36
|
+
{{#if tile.config.customEvents}}
|
|
37
|
+
/**
|
|
38
|
+
* TODO: Update the action button's icon under `contentTemplate` below.
|
|
39
|
+
* More information about rapid-icon can be found at: https://docs.genesis.global/docs/develop/client-capabilities/presentation/client-presentation-icon/
|
|
40
|
+
**/
|
|
41
|
+
{{#each tile.config.customEvents}}
|
|
42
|
+
{
|
|
43
|
+
field: '',
|
|
44
|
+
headerName: '',
|
|
45
|
+
minWidth: 50,
|
|
46
|
+
maxWidth: 50,
|
|
47
|
+
headerTooltip: '{{capitalCase this}}',
|
|
48
|
+
pinned: 'right',
|
|
49
|
+
cellRenderer: RapidAgActionRenderer,
|
|
50
|
+
cellRendererParams: <ActionRendererParams>{
|
|
51
|
+
actionClick: async (rowData) => {
|
|
52
|
+
const { ROW_REF, ...DETAILS } = rowData;
|
|
53
|
+
const response = await this.connect.commitEvent("EVENT_{{this}}", {
|
|
54
|
+
DETAILS,
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
contentTemplate: `
|
|
58
|
+
<rapid-icon name="cog"></rapid-icon>
|
|
59
|
+
`,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
{{/each}}
|
|
63
|
+
{{/if}}
|
|
64
|
+
];
|
|
65
|
+
{{/if}}
|
|
66
|
+
}
|
|
@@ -10,9 +10,6 @@ import { createFormSchema } from './{{kebabCase tile.title}}.create.form.schema'
|
|
|
10
10
|
{{#if tile.config.updateFormUiSchema}}
|
|
11
11
|
import { updateFormSchema } from './{{kebabCase tile.title}}.update.form.schema';
|
|
12
12
|
{{/if}}
|
|
13
|
-
{{#if tile.config.columns}}
|
|
14
|
-
import { columnDefs } from './{{kebabCase tile.title}}.column.defs';
|
|
15
|
-
{{/if}}
|
|
16
13
|
{{#if tile.config.gridOptions}}
|
|
17
14
|
import { gridOptions } from './{{kebabCase tile.title}}.gridOptions';
|
|
18
15
|
{{/if}}
|
|
@@ -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
|
-
<{{kebabCase
|
|
5
|
+
<rapid-layout-item title="{{this.title}}">
|
|
6
|
+
<{{kebabCase this.componentName}}></{{kebabCase this.componentName}}>
|
|
7
7
|
</rapid-layout-item>
|
|
8
8
|
{{/ifEquals}}
|
|
9
9
|
{{#ifEquals @index 1}}
|
|
10
|
-
<rapid-layout-item title="{{
|
|
11
|
-
<{{kebabCase
|
|
10
|
+
<rapid-layout-item title="{{this.title}}">
|
|
11
|
+
<{{kebabCase this.componentName}}></{{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
|
-
<{{kebabCase
|
|
19
|
+
<rapid-layout-item title="{{this.title}}">
|
|
20
|
+
<{{kebabCase this.componentName}}></{{kebabCase this.componentName}}>
|
|
21
21
|
</rapid-layout-item>
|
|
22
22
|
{{/ifEquals}}
|
|
23
23
|
{{#ifEquals @index 3}}
|
|
24
|
-
<rapid-layout-item title="{{
|
|
25
|
-
<{{kebabCase
|
|
24
|
+
<rapid-layout-item title="{{this.title}}">
|
|
25
|
+
<{{kebabCase this.componentName}}></{{kebabCase this.componentName}}>
|
|
26
26
|
</rapid-layout-item>
|
|
27
27
|
{{/ifEquals}}
|
|
28
28
|
{{/each}}
|
|
@@ -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="${() => (
|
|
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;
|
|
@@ -3,6 +3,7 @@ const {
|
|
|
3
3
|
gridColumnsSerializer,
|
|
4
4
|
} = require('./gridSerializers');
|
|
5
5
|
const formatJSONValue = require('./formatJSONValue');
|
|
6
|
+
const { getFormattedComment, getFormattedTodo } = require('./getTodosAndComments')
|
|
6
7
|
const getLayoutType = require('./getLayoutType');
|
|
7
8
|
const { COMPONENT_TYPE, FRAMEWORK_ANGULAR_ALIAS } = require('../static');
|
|
8
9
|
|
|
@@ -19,8 +20,12 @@ const formatRouteData = (framework, route) => {
|
|
|
19
20
|
);
|
|
20
21
|
const tiles = route.tiles?.map((tile, index) => {
|
|
21
22
|
const config = tile.config || {};
|
|
23
|
+
const metadata = tile.metadata || {};
|
|
22
24
|
const componentType = COMPONENT_TYPE[tile.type];
|
|
23
25
|
const componentName = `${route.name}-${tile.title.replace(/[^0-9a-z]/gi, '')}-${componentType}`;
|
|
26
|
+
const todo = metadata?.todo && getFormattedTodo(metadata.todo);
|
|
27
|
+
const comment = metadata?.comment && getFormattedComment(metadata.comment);
|
|
28
|
+
|
|
24
29
|
const {
|
|
25
30
|
gridOptions,
|
|
26
31
|
createFormUiSchema,
|
|
@@ -43,6 +48,11 @@ const formatRouteData = (framework, route) => {
|
|
|
43
48
|
uischema: formatJSONValue(uischema),
|
|
44
49
|
columns: gridColumnsSerializer(columns),
|
|
45
50
|
},
|
|
51
|
+
metadata: {
|
|
52
|
+
...metadata,
|
|
53
|
+
todo,
|
|
54
|
+
comment
|
|
55
|
+
}
|
|
46
56
|
};
|
|
47
57
|
});
|
|
48
58
|
|
|
@@ -29,7 +29,7 @@ const getPathByFramework = {
|
|
|
29
29
|
route: (clientSrcPath, routeName, changeCase) =>
|
|
30
30
|
`${clientSrcPath}/${changeCase.pascalCase(routeName)}`,
|
|
31
31
|
component: (routeDir, routeName, changeCase) =>
|
|
32
|
-
`${routeDir}/${changeCase.pascalCase(routeName)}.
|
|
32
|
+
`${routeDir}/${changeCase.pascalCase(routeName)}.tsx`,
|
|
33
33
|
style: (routeDir, routeName, changeCase) =>
|
|
34
34
|
`${routeDir}/${changeCase.pascalCase(routeName)}.css`,
|
|
35
35
|
},
|
|
@@ -76,6 +76,7 @@ const generateRoute = (route, { changeCase, writeFileWithData }, framework) => {
|
|
|
76
76
|
|
|
77
77
|
if (route?.tiles?.length) {
|
|
78
78
|
route.tiles.forEach((tile) => {
|
|
79
|
+
tile.metadata = tile.metadata || {};
|
|
79
80
|
generateTile(tile, route, { changeCase, writeFileWithData }, framework);
|
|
80
81
|
});
|
|
81
82
|
}
|
|
@@ -44,12 +44,12 @@ const getPathByFramework = {
|
|
|
44
44
|
},
|
|
45
45
|
[FRAMEWORK_REACT_ALIAS]: {
|
|
46
46
|
...defaultPathGetters,
|
|
47
|
-
index: (componentPath) => `${componentPath}/index.
|
|
47
|
+
index: (componentPath) => `${componentPath}/index.tsx`,
|
|
48
48
|
clientSrcPath: `../../client/src/pages`,
|
|
49
49
|
route: (clientSrcPath, tile, routeName, changeCase) =>
|
|
50
50
|
`${clientSrcPath}/${changeCase.pascalCase(routeName)}/${changeCase.pascalCase(tile.name)}${changeCase.pascalCase(tile.componentType)}`,
|
|
51
51
|
component: (componentPath, tile, changeCase) =>
|
|
52
|
-
`${componentPath}/${changeCase.pascalCase(tile.name)}Component.
|
|
52
|
+
`${componentPath}/${changeCase.pascalCase(tile.name)}Component.tsx`,
|
|
53
53
|
style: (componentPath, tile, changeCase) =>
|
|
54
54
|
`${componentPath}/${changeCase.pascalCase(tile.name)}Component.css`,
|
|
55
55
|
addForm: (componentPath, tile, changeCase) =>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const MAX_LINE_LENGTH = 100;
|
|
2
|
+
|
|
3
|
+
const wrapText = (text, pad = " ") => {
|
|
4
|
+
let currentLength = 0;
|
|
5
|
+
const formattedText = text.split(" ").map((singleWord) => {
|
|
6
|
+
const lineLength = currentLength + singleWord.length + 1;
|
|
7
|
+
if(lineLength <= MAX_LINE_LENGTH) {
|
|
8
|
+
currentLength = lineLength;
|
|
9
|
+
return singleWord
|
|
10
|
+
} else {
|
|
11
|
+
currentLength = 0;
|
|
12
|
+
return `\n *${pad}${singleWord}`
|
|
13
|
+
}
|
|
14
|
+
}).join(" ")
|
|
15
|
+
|
|
16
|
+
return formattedText;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const getFormattedTodo = (todo) =>
|
|
20
|
+
todo.split(/\r?\n/).map((x, index)=> `${index > 0 ? '\n * ' : ''}${wrapText(x.trim())}`).join('');
|
|
21
|
+
|
|
22
|
+
const getFormattedComment = (comment) =>
|
|
23
|
+
comment.split(/\r?\n/).map(x => `\n * ${wrapText(x.trim(), " ")}`).join('');
|
|
24
|
+
|
|
25
|
+
module.exports = {
|
|
26
|
+
getFormattedComment,
|
|
27
|
+
getFormattedTodo
|
|
28
|
+
};
|
package/.genx/utils/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const excludeFrameworks = require('./excludeFrameworks');
|
|
2
|
+
const deleteGradleWrappers = require('./deleteGradleWrappers');
|
|
2
3
|
const formatRouteData = require('./formatRouteData');
|
|
3
4
|
const generateRoute = require('./generateRoute');
|
|
4
5
|
const generateCsv = require('./generateCsv');
|
|
@@ -11,6 +12,7 @@ const validateRoute = require('./validateRoute');
|
|
|
11
12
|
const validateFrameworkAlias = require('./validateFrameworkAlias');
|
|
12
13
|
|
|
13
14
|
module.exports = {
|
|
15
|
+
deleteGradleWrappers,
|
|
14
16
|
excludeFrameworks,
|
|
15
17
|
formatRouteData,
|
|
16
18
|
generateRoute,
|
package/.genx/versions.json
CHANGED
package/.gitignore
CHANGED
|
@@ -44,6 +44,7 @@ client/bootstrapDone
|
|
|
44
44
|
.husky/.gitignore
|
|
45
45
|
build-cache/
|
|
46
46
|
server/h2/
|
|
47
|
+
project-zips
|
|
47
48
|
|
|
48
49
|
# Ignore Gradle GUI config
|
|
49
50
|
gradle-app.setting
|
|
@@ -107,3 +108,5 @@ custom-elements.json
|
|
|
107
108
|
# Gradle tasks
|
|
108
109
|
.bootstrapDone
|
|
109
110
|
.tests.executed
|
|
111
|
+
|
|
112
|
+
blankappseedtest/
|