@genesislcap/blank-app-seed 3.28.5 → 3.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.genx/package.json +1 -1
- package/.genx/templates/react/component/component.column.defs.hbs +9 -0
- package/.genx/templates/react/component/component.create.form.hbs +8 -0
- package/.genx/templates/react/component/component.gridOptions.hbs +9 -0
- package/.genx/templates/react/component/component.hbs +32 -0
- package/.genx/templates/react/component/component.index.hbs +1 -0
- package/.genx/templates/react/component/component.styles.hbs +3 -0
- package/.genx/templates/react/component/component.update.form.hbs +5 -0
- package/.genx/utils/generateRoute.js +1 -7
- package/.genx/utils/generateTile.js +19 -11
- package/.genx/versions.json +3 -3
- package/CHANGELOG.md +14 -0
- package/package.json +1 -1
package/.genx/package.json
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ColDef } from '@ag-grid-community/core';
|
|
2
|
+
import { getNumberFormatter, getDateFormatter } from '@genesislcap/foundation-utils';
|
|
3
|
+
{{#if route.FDC3EventHandlersEnabled}}
|
|
4
|
+
import { sendEventOnChannel } from '../../../utils';
|
|
5
|
+
{{/if}}
|
|
6
|
+
|
|
7
|
+
{{#if tile.config.columns}}
|
|
8
|
+
export const columnDefs: ColDef[] = {{{ tile.config.columns }}}
|
|
9
|
+
{{/if}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UiSchema } from '@genesislcap/foundation-forms';
|
|
2
|
+
|
|
3
|
+
{{#if tile.config.createFormUiSchema}}
|
|
4
|
+
export const createFormSchema: UiSchema = {{{ tile.config.createFormUiSchema }}}
|
|
5
|
+
{{/if}}
|
|
6
|
+
{{#if tile.config.uischema}}
|
|
7
|
+
export const createFormSchema: UiSchema = {{{ tile.config.uischema }}}
|
|
8
|
+
{{/if}}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GridOptionsConfig } from '@genesislcap/rapid-grid-pro';
|
|
2
|
+
import { getNumberFormatter, getDateFormatter } from '@genesislcap/foundation-utils';
|
|
3
|
+
{{#if route.FDC3EventHandlersEnabled}}
|
|
4
|
+
import { sendEventOnChannel } from '../../../utils';
|
|
5
|
+
{{/if}}
|
|
6
|
+
|
|
7
|
+
{{#if tile.config.gridOptions}}
|
|
8
|
+
export const gridOptions: GridOptionsConfig = {{{ tile.config.gridOptions }}}
|
|
9
|
+
{{/if}}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Component, Input, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { getUser } from '@genesislcap/foundation-user';
|
|
4
|
+
import { ErrorMessageComponent } from '../../../components/error-message/error-message.component';
|
|
5
|
+
import { getViewUpdateRightComponent } from '../../../utils';
|
|
6
|
+
{{#if tile.config.gridOptions}}
|
|
7
|
+
import { GridOptionsConfig } from "@genesislcap/rapid-grid-pro";
|
|
8
|
+
{{/if}}
|
|
9
|
+
{{#if tile.config.createFormUiSchema}}
|
|
10
|
+
import { createFormSchema } from './{{kebabCase tile.title}}.create.form.schema';
|
|
11
|
+
{{/if}}
|
|
12
|
+
{{#if tile.config.uischema}}
|
|
13
|
+
import { createFormSchema } from './{{kebabCase tile.title}}.create.form.schema';
|
|
14
|
+
{{/if}}
|
|
15
|
+
{{#if tile.config.updateFormUiSchema}}
|
|
16
|
+
import { updateFormSchema } from './{{kebabCase tile.title}}.update.form.schema';
|
|
17
|
+
{{/if}}
|
|
18
|
+
{{#if tile.config.columns}}
|
|
19
|
+
import { columnDefs } from './{{kebabCase tile.title}}.column.defs';
|
|
20
|
+
{{/if}}
|
|
21
|
+
{{#if tile.config.gridOptions}}
|
|
22
|
+
import { gridOptions } from './{{kebabCase tile.title}}.gridOptions';
|
|
23
|
+
{{/if}}
|
|
24
|
+
import './{{kebabCase tile.title}}.component.css';
|
|
25
|
+
|
|
26
|
+
const {{pascalCase tile.componentName}} = () => {
|
|
27
|
+
return (
|
|
28
|
+
{{> (lookup tile 'type') tile}}
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default {{pascalCase tile.componentName}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './{{kebabCase tile.title}}.component';
|
|
@@ -73,13 +73,7 @@ const generateRoute = (route, { changeCase, writeFileWithData }, framework) => {
|
|
|
73
73
|
);
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
if (
|
|
78
|
-
[FRAMEWORK_WEB_COMPONENTS_ALIAS, FRAMEWORK_ANGULAR_ALIAS].includes(
|
|
79
|
-
framework,
|
|
80
|
-
) &&
|
|
81
|
-
route?.tiles?.length
|
|
82
|
-
) {
|
|
76
|
+
if (route?.tiles?.length) {
|
|
83
77
|
route.tiles.forEach((tile) => {
|
|
84
78
|
generateTile(tile, route, { changeCase, writeFileWithData }, framework);
|
|
85
79
|
});
|
|
@@ -3,6 +3,7 @@ const makeDirectory = require('./makeDirectory');
|
|
|
3
3
|
const {
|
|
4
4
|
FRAMEWORK_WEB_COMPONENTS_ALIAS,
|
|
5
5
|
FRAMEWORK_ANGULAR_ALIAS,
|
|
6
|
+
FRAMEWORK_REACT_ALIAS,
|
|
6
7
|
DIR_TEMPLATE_BY_FRAMEWORK,
|
|
7
8
|
} = require('../static');
|
|
8
9
|
|
|
@@ -41,6 +42,16 @@ const getPathByFramework = {
|
|
|
41
42
|
style: (componentPath, tile) =>
|
|
42
43
|
`${componentPath}/${tile.name}.component.css`,
|
|
43
44
|
},
|
|
45
|
+
[FRAMEWORK_REACT_ALIAS]: {
|
|
46
|
+
...defaultPathGetters,
|
|
47
|
+
clientSrcPath: `../../client/src/pages`,
|
|
48
|
+
route: (clientSrcPath, tile, routeName) =>
|
|
49
|
+
`${clientSrcPath}/${routeName}/${tile.name}-${tile.componentType}`,
|
|
50
|
+
component: (componentPath, tile) =>
|
|
51
|
+
`${componentPath}/${tile.name}.component.jsx`,
|
|
52
|
+
style: (componentPath, tile) =>
|
|
53
|
+
`${componentPath}/${tile.name}.component.css`,
|
|
54
|
+
},
|
|
44
55
|
};
|
|
45
56
|
|
|
46
57
|
const getFilesToWrite = (tileData, routeName, path, sourceTemplateDir) => {
|
|
@@ -69,11 +80,6 @@ const getFilesToWrite = (tileData, routeName, path, sourceTemplateDir) => {
|
|
|
69
80
|
target: getComponentTarget(routeDir, tileData),
|
|
70
81
|
};
|
|
71
82
|
|
|
72
|
-
const componentTemplateFile = {
|
|
73
|
-
source: `${sourceTemplateDir}/component/component.template.hbs`,
|
|
74
|
-
target: getTemplateTarget(routeDir, tileData),
|
|
75
|
-
};
|
|
76
|
-
|
|
77
83
|
const componentStylesFile = {
|
|
78
84
|
source: `${sourceTemplateDir}/component/component.styles.hbs`,
|
|
79
85
|
target: getStyleTarget(routeDir, tileData),
|
|
@@ -99,12 +105,14 @@ const getFilesToWrite = (tileData, routeName, path, sourceTemplateDir) => {
|
|
|
99
105
|
target: getGridOptionsTarget(routeDir, tileData),
|
|
100
106
|
};
|
|
101
107
|
|
|
102
|
-
const filesToWrite = [
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
+
const filesToWrite = [componentIndexFile, componentFile, componentStylesFile];
|
|
109
|
+
|
|
110
|
+
if (getTemplateTarget) {
|
|
111
|
+
filesToWrite.push({
|
|
112
|
+
source: `${sourceTemplateDir}/component/component.template.hbs`,
|
|
113
|
+
target: getTemplateTarget(routeDir, tileData),
|
|
114
|
+
});
|
|
115
|
+
}
|
|
108
116
|
|
|
109
117
|
switch (tileData.type) {
|
|
110
118
|
case 'entity-manager':
|
package/.genx/versions.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.29.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.28.6...v3.29.0) (2024-08-13)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* Implement the generated UI code structure proposal (react) - [FUI-2139](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/2139) (#305) 6054353
|
|
9
|
+
|
|
10
|
+
## [3.28.6](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.28.5...v3.28.6) (2024-08-12)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) (#303) 7e258fc
|
|
16
|
+
|
|
3
17
|
## [3.28.5](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.28.4...v3.28.5) (2024-08-12)
|
|
4
18
|
|
|
5
19
|
|