@genesislcap/blank-app-seed 3.29.1-prerelease.4 → 3.29.1-prerelease.6
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/angular/route.hbs +0 -1
- package/.genx/templates/react/chart.hbs +1 -1
- package/.genx/templates/react/component/component.gridOptions.hbs +1 -1
- package/.genx/templates/react/component/component.hbs +16 -12
- package/.genx/templates/react/component/component.index.hbs +1 -1
- package/.genx/templates/react/entityManager.hbs +5 -5
- package/.genx/templates/react/form.hbs +1 -1
- package/.genx/templates/react/grid.hbs +3 -4
- package/.genx/templates/react/gridLayout.hbs +28 -28
- package/.genx/templates/react/horizontalLayout.hbs +5 -5
- package/.genx/templates/react/route.hbs +3 -17
- package/.genx/utils/generateTile.js +1 -0
- package/.genx/versions.json +1 -1
- package/CHANGELOG.md +14 -0
- package/client-tmp/react/package.json +3 -0
- package/client-tmp/react/src/App.tsx +20 -2
- package/client-tmp/react/src/share/foundation-login.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 +2 -0
- package/package.json +1 -1
package/.genx/package.json
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
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
1
|
{{#if tile.config.createFormUiSchema}}
|
|
10
2
|
import { createFormSchema } from './{{kebabCase tile.title}}.create.form.schema';
|
|
11
3
|
{{/if}}
|
|
@@ -19,14 +11,26 @@ import { updateFormSchema } from './{{kebabCase tile.title}}.update.form.schema'
|
|
|
19
11
|
import { columnDefs } from './{{kebabCase tile.title}}.column.defs';
|
|
20
12
|
{{/if}}
|
|
21
13
|
{{#if tile.config.gridOptions}}
|
|
22
|
-
import { gridOptions } from './{{kebabCase tile.title}}.gridOptions';
|
|
14
|
+
import { gridOptions as tileGridOptions } from './{{kebabCase tile.title}}.gridOptions';
|
|
23
15
|
{{/if}}
|
|
24
16
|
import './{{kebabCase tile.title}}.component.css';
|
|
25
17
|
|
|
26
|
-
const {{pascalCase tile.componentName}} = () => {
|
|
18
|
+
export const {{pascalCase tile.componentName}} = () => { {{#if tile.config.createFormUiSchema}}
|
|
19
|
+
const createFormSchema = createFormSchema;{{/if}}{{#if tile.config.uischema}}
|
|
20
|
+
const uischema = createFormSchema;{{/if}}{{#if tile.config.updateFormUiSchema}}
|
|
21
|
+
const updateFormSchema = updateFormSchema;{{/if}}{{#if tile.config.columns}}
|
|
22
|
+
const columnDefs = columnDefs;{{/if}}{{#if tile.config.gridOptions}}
|
|
23
|
+
const gridOptions = tileGridOptions;{{/if}}{{#if tile.config.reqrep}}
|
|
24
|
+
const reqrep = { pollingInterval: 5000 };{{/if}}{{#if tile.config.type}}
|
|
25
|
+
const chartConfig = { {{#ifEquals tile.config.type 'pie'}}
|
|
26
|
+
"radius": 0.75,
|
|
27
|
+
"angleField": "value",
|
|
28
|
+
"colorField": "groupBy",{{else}}
|
|
29
|
+
"xField": "groupBy",
|
|
30
|
+
"yField": "value",{{/ifEquals}}
|
|
31
|
+
};{{/if}}
|
|
32
|
+
|
|
27
33
|
return (
|
|
28
34
|
{{> (lookup tile 'type') tile}}
|
|
29
35
|
);
|
|
30
36
|
};
|
|
31
|
-
|
|
32
|
-
export default {{pascalCase tile.componentName}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './{{kebabCase tile.title}}.component';
|
|
1
|
+
export * from './{{kebabCase tile.title}}.component.jsx';
|
|
@@ -9,29 +9,29 @@
|
|
|
9
9
|
{{#if config.createEvent}}
|
|
10
10
|
createEvent="{{ config.createEvent }}"
|
|
11
11
|
{{#if config.createFormUiSchema}}
|
|
12
|
-
createFormUiSchema={
|
|
12
|
+
createFormUiSchema={createFormUiSchema}
|
|
13
13
|
{{/if}}
|
|
14
14
|
{{/if}}
|
|
15
15
|
{{#if config.updateEvent}}
|
|
16
16
|
updateEvent="{{ config.updateEvent }}"
|
|
17
17
|
{{#if config.updateFormUiSchema}}
|
|
18
|
-
updateFormUiSchema={
|
|
18
|
+
updateFormUiSchema={updateFormUiSchema}
|
|
19
19
|
{{/if}}
|
|
20
20
|
{{/if}}
|
|
21
21
|
{{#if config.deleteEvent}}
|
|
22
22
|
deleteEvent="{{ config.deleteEvent }}"
|
|
23
23
|
{{/if}}
|
|
24
24
|
{{#if config.gridOptions}}
|
|
25
|
-
gridOptions={
|
|
25
|
+
gridOptions={gridOptions}
|
|
26
26
|
{{/if}}
|
|
27
27
|
{{#if config.snapshot}}
|
|
28
28
|
datasourceConfig={ isSnapshot: {{ config.snapshot }} }
|
|
29
29
|
{{/if}}
|
|
30
30
|
{{#if config.reqrep}}
|
|
31
|
-
datasourceConfig={
|
|
31
|
+
datasourceConfig={reqrep}
|
|
32
32
|
{{/if}}
|
|
33
33
|
{{#if config.columns}}
|
|
34
|
-
columns={
|
|
34
|
+
columns={columnDefs}
|
|
35
35
|
{{/if}}
|
|
36
36
|
{{#if config.modalPosition}}
|
|
37
37
|
modal-position="{{ config.modalPosition }}"
|
|
@@ -8,11 +8,10 @@
|
|
|
8
8
|
isSnapshot="{{config.snapshot}}"
|
|
9
9
|
{{/if}}
|
|
10
10
|
{{#if config.reqrep}}
|
|
11
|
-
datasourceConfig=
|
|
11
|
+
datasourceConfig="reqrep"
|
|
12
12
|
{{/if}}
|
|
13
13
|
{{#if config.gridOptions}}
|
|
14
|
-
deferredGridOptions
|
|
14
|
+
deferredGridOptions=\{{ onRowClicked: gridOptions?.onRowClicked }}
|
|
15
15
|
{{/if}}
|
|
16
|
-
>
|
|
17
|
-
</grid-pro-genesis-datasource>
|
|
16
|
+
></grid-pro-genesis-datasource>
|
|
18
17
|
</rapid-grid-pro>
|
|
@@ -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,23 +1,9 @@
|
|
|
1
1
|
import './{{pascalCase route.name}}.css';
|
|
2
|
+
{{#each route.tiles}}
|
|
3
|
+
import { {{pascalCase this.componentName}} } from './{{kebabCase this.title}}-{{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
7
|
|
|
22
8
|
return (
|
|
23
9
|
<section className="{{kebabCase route.name}}-page">
|
|
@@ -44,6 +44,7 @@ const getPathByFramework = {
|
|
|
44
44
|
},
|
|
45
45
|
[FRAMEWORK_REACT_ALIAS]: {
|
|
46
46
|
...defaultPathGetters,
|
|
47
|
+
index: (componentPath) => `${componentPath}/index.js`,
|
|
47
48
|
clientSrcPath: `../../client/src/pages`,
|
|
48
49
|
route: (clientSrcPath, tile, routeName) =>
|
|
49
50
|
`${clientSrcPath}/${routeName}/${tile.name}-${tile.componentType}`,
|
package/.genx/versions.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.29.1-prerelease.6](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.29.1-prerelease.5...v3.29.1-prerelease.6) (2024-08-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) f18c4cf
|
|
9
|
+
|
|
10
|
+
## [3.29.1-prerelease.5](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.29.1-prerelease.4...v3.29.1-prerelease.5) (2024-08-16)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) a2c959c
|
|
16
|
+
|
|
3
17
|
## [3.29.1-prerelease.4](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.29.1-prerelease.3...v3.29.1-prerelease.4) (2024-08-16)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
"@ag-grid-enterprise/core": "29.2.0",
|
|
20
20
|
"@ag-grid-enterprise/row-grouping": "29.2.0",
|
|
21
21
|
"@ag-grid-enterprise/server-side-row-model": "29.2.0",
|
|
22
|
+
{{#if FDC3.includeDependencies}}
|
|
23
|
+
"@genesislcap/foundation-fdc3": "{{versions.UI}}",
|
|
24
|
+
{{/if}}
|
|
22
25
|
"@genesislcap/foundation-comms": "{{versions.UI}}",
|
|
23
26
|
"@genesislcap/foundation-login": "{{versions.UI}}",
|
|
24
27
|
"@genesislcap/foundation-entity-management": "{{versions.UI}}",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
unstable_HistoryRouter as HistoryRouter,
|
|
4
4
|
Routes,
|
|
5
5
|
Route,
|
|
6
6
|
useLocation,
|
|
7
7
|
} from 'react-router-dom';
|
|
8
|
-
import history from './utils/history';
|
|
8
|
+
import { history } from './utils/history';
|
|
9
9
|
import LayoutWrapper from './layouts/LayoutWrapper';
|
|
10
10
|
import { routeLayouts } from './config';
|
|
11
11
|
import AuthGuard from './guards/AuthGuard';
|
|
@@ -15,12 +15,30 @@ import AuthPage from './pages/auth/AuthPage';
|
|
|
15
15
|
{{#each routes}}
|
|
16
16
|
import {{pascalCase this.name}} from './pages/{{kebabCase this.name}}/{{pascalCase this.name}}';
|
|
17
17
|
{{/each}}
|
|
18
|
+
{{#if FDC3.channels.length}}
|
|
19
|
+
import { listenToChannel, onFDC3Ready } from './utils';
|
|
20
|
+
{{/if}}
|
|
18
21
|
// Genesis Components
|
|
19
22
|
import './share/genesis-components';
|
|
20
23
|
|
|
21
24
|
const LayoutWithLocation = () => {
|
|
22
25
|
const location = useLocation();
|
|
23
26
|
const layout = routeLayouts[location.pathname] || 'default';
|
|
27
|
+
{{#if FDC3.channels.length}}
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
{{#each FDC3.channels}}
|
|
30
|
+
listenToChannel('{{this.name}}', '{{this.type}}', (result) => {
|
|
31
|
+
console.log('Received FDC3 channel message on: {{this.name}} channel, type: {{this.type}}', result);
|
|
32
|
+
// TODO: Add your listener logic here
|
|
33
|
+
// E.g. open a modal or route to specific page: Route.path.push(`[Route name]`);
|
|
34
|
+
});
|
|
35
|
+
{{/each}}
|
|
36
|
+
|
|
37
|
+
return () => {
|
|
38
|
+
console.log('Component is being unmounted');
|
|
39
|
+
};
|
|
40
|
+
}, []);
|
|
41
|
+
{{/if}}
|
|
24
42
|
|
|
25
43
|
let pageComponent;
|
|
26
44
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {configure, define} from '@genesislcap/foundation-login';
|
|
2
2
|
import { AUTH_PATH } from '../config';
|
|
3
3
|
import { DI } from '@microsoft/fast-foundation';
|
|
4
|
-
import history from '../utils/history';
|
|
4
|
+
import { history } from '../utils/history';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Configure the micro frontend
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{{#if FDC3.includeDependencies}}
|
|
2
|
+
import { DefaultFDC3 } from '@genesislcap/foundation-fdc3';
|
|
3
|
+
{{/if}}
|
|
4
|
+
export const isFDC3 = (): boolean => !!(window as any).fdc3;
|
|
5
|
+
{{#if FDC3.includeDependencies}}
|
|
6
|
+
|
|
7
|
+
export const onFDC3Ready = async (FDC3ReadyCb: () => any): Promise<void> => {
|
|
8
|
+
isFDC3()
|
|
9
|
+
? await FDC3ReadyCb()
|
|
10
|
+
: window.addEventListener('fdc3Ready', async () => {
|
|
11
|
+
await FDC3ReadyCb();
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const listenToChannel = async (
|
|
16
|
+
channelName: string,
|
|
17
|
+
type: string,
|
|
18
|
+
callback: (result: any) => void,
|
|
19
|
+
): Promise<void> => {
|
|
20
|
+
const fdc3Service = new DefaultFDC3();
|
|
21
|
+
fdc3Service.addChannelListener(channelName, type, callback);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const sendEventOnChannel = (channelName: string, type: string) => {
|
|
25
|
+
return async (e: any) => {
|
|
26
|
+
const fdc3Service = new DefaultFDC3();
|
|
27
|
+
// check for ag-grid-specific events, fall back to standard events
|
|
28
|
+
const payload = e.data || e.detail;
|
|
29
|
+
await fdc3Service.broadcastOnChannel(channelName, type, payload);
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
{{/if}}
|