@genesislcap/blank-app-seed 5.12.0 → 5.12.1-prerelease.1
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 +6 -1
- package/.genx/templates/react/component/component.gridOptions.hbs +6 -1
- package/.genx/templates/react/slices/eventing.slice.hbs +2 -0
- package/.genx/utils/formatRouteData.js +11 -0
- package/.genx/versions.json +3 -3
- package/CHANGELOG.md +9 -0
- package/client-tmp/react/src/App.tsx +2 -4
- package/client-tmp/react/src/components/routes/AppRoutes.tsx +2 -0
- package/client-tmp/react/src/store/RoutesContext.tsx +3 -2
- package/client-tmp/react/src/types/AppRoute.ts +15 -0
- package/client-tmp/react/src/utils/index.ts +0 -1
- package/package.json +1 -1
- package/client-tmp/react/src/services/connect.service.ts +0 -26
- package/client-tmp/react/src/utils/setApiHost.ts +0 -9
package/.genx/package.json
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
{{#if tile.config.columns~}}
|
|
2
2
|
import { ColDef } from '@ag-grid-community/core';
|
|
3
3
|
{{/if}}
|
|
4
|
-
|
|
4
|
+
{{#if tile.config.hasNumberFormatter~}}
|
|
5
|
+
import { getNumberFormatter } from '@genesislcap/foundation-utils';
|
|
6
|
+
{{/if}}
|
|
7
|
+
{{#if tile.config.hasDateFormatter~}}
|
|
8
|
+
import { getDateFormatter } from '@genesislcap/foundation-utils';
|
|
9
|
+
{{/if}}
|
|
5
10
|
{{#if route.FDC3EventHandlersEnabled~}}
|
|
6
11
|
import { sendEventOnChannel } from '../../../utils';
|
|
7
12
|
{{/if}}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
{{#if tile.config.gridOptions~}}
|
|
2
2
|
import { GridOptionsConfig } from '@genesislcap/rapid-grid-pro';
|
|
3
3
|
{{/if}}
|
|
4
|
-
|
|
4
|
+
{{#if tile.config.hasNumberFormatter~}}
|
|
5
|
+
import { getNumberFormatter } from '@genesislcap/foundation-utils';
|
|
6
|
+
{{/if}}
|
|
7
|
+
{{#if tile.config.hasDateFormatter~}}
|
|
8
|
+
import { getDateFormatter } from '@genesislcap/foundation-utils';
|
|
9
|
+
{{/if}}
|
|
5
10
|
{{#if route.FDC3EventHandlersEnabled~}}
|
|
6
11
|
import { sendEventOnChannel } from '../../../utils';
|
|
7
12
|
{{/if}}
|
|
@@ -47,6 +47,11 @@ const formatRouteData = (framework, route) => {
|
|
|
47
47
|
eventing,
|
|
48
48
|
} = config;
|
|
49
49
|
|
|
50
|
+
const hasFormatter = (name, colsOrOpts) => {
|
|
51
|
+
const cols = Array.isArray(colsOrOpts) ? colsOrOpts : colsOrOpts?.columns;
|
|
52
|
+
return cols?.some((col) => col.valueFormatter?.name === name);
|
|
53
|
+
};
|
|
54
|
+
|
|
50
55
|
return {
|
|
51
56
|
...tile,
|
|
52
57
|
componentName,
|
|
@@ -61,6 +66,12 @@ const formatRouteData = (framework, route) => {
|
|
|
61
66
|
filterFormUiSchema: formatJSONValue(filterFormUiSchema),
|
|
62
67
|
uischema: formatJSONValue(uischema),
|
|
63
68
|
columns: gridColumnsSerializer(columns),
|
|
69
|
+
hasNumberFormatter:
|
|
70
|
+
hasFormatter('getNumberFormatter', columns) ||
|
|
71
|
+
hasFormatter('getNumberFormatter', gridOptions),
|
|
72
|
+
hasDateFormatter:
|
|
73
|
+
hasFormatter('getDateFormatter', columns) ||
|
|
74
|
+
hasFormatter('getDateFormatter', gridOptions),
|
|
64
75
|
customEvents: formatCustomEvents(customEvents),
|
|
65
76
|
eventing: {
|
|
66
77
|
publishEventName: eventing?.publishEventName || null,
|
package/.genx/versions.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.12.1-prerelease.1](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v5.12.0...v5.12.1-prerelease.1) (2026-05-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* backport main to prerelease GENC-0 (#571) 3674a0f
|
|
9
|
+
* **react:** resolve TypeScript errors in generated React app templates [FUI-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) ab0903c
|
|
10
|
+
* resolve TypeScript errors in generated React app templates [FUI-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) (#570) 5e3a583
|
|
11
|
+
|
|
3
12
|
## [5.12.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v5.11.0...v5.12.0) (2026-05-05)
|
|
4
13
|
|
|
5
14
|
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { useCallback, useEffect, useState } from 'react';
|
|
2
2
|
import { BrowserRouter as Router } from 'react-router-dom';
|
|
3
|
+
{{#if FDC3.channels.length~}}
|
|
3
4
|
import {
|
|
4
|
-
setApiHost,
|
|
5
|
-
{{#if FDC3.channels.length~}}
|
|
6
5
|
listenToChannel,
|
|
7
6
|
onFDC3Ready,
|
|
8
|
-
{{/if}}
|
|
9
7
|
} from './utils';
|
|
8
|
+
{{/if}}
|
|
10
9
|
import { customEventFactory, registerStylesTarget } from './pbc/utils';
|
|
11
10
|
import { RoutesProvider } from './store/RoutesContext';
|
|
12
11
|
import { registerComponents as genesisRegisterComponents } from './share/genesis-components';
|
|
@@ -41,7 +40,6 @@ const App: React.FC<AppProps> = ({ rootElement }) => {
|
|
|
41
40
|
}, []);
|
|
42
41
|
useEffect(() => {
|
|
43
42
|
let mounted = true;
|
|
44
|
-
setApiHost();
|
|
45
43
|
(async () => {
|
|
46
44
|
await genesisRegisterComponents();
|
|
47
45
|
if (mounted) {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Routes, Route, Navigate } from 'react-router-dom';
|
|
2
2
|
import AuthPage from '../../pages/AuthPage/AuthPage';
|
|
3
|
+
{{#if routes.[0]}}
|
|
3
4
|
import {{pascalCase routes.[0].name}} from '../../pages/{{pascalCase routes.[0].name}}/{{pascalCase routes.[0].name}}';
|
|
5
|
+
{{/if}}
|
|
4
6
|
import DefaultLayout from '../../layouts/default/DefaultLayout';
|
|
5
7
|
import ProtectedRoute from './ProtectedRoute';
|
|
6
8
|
import { useRoutesContext } from '../../store/RoutesContext';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { createContext, useContext, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Navigate } from 'react-router-dom';
|
|
3
|
+
import type { AppRoute } from '../types/AppRoute';
|
|
3
4
|
import { getApp } from '@genesislcap/foundation-shell/app';
|
|
4
5
|
import AuthPage from '../pages/AuthPage/AuthPage';
|
|
5
6
|
import NotFoundPage from '../pages/NotFoundPage/NotFoundPage';
|
|
@@ -49,7 +50,7 @@ const routes = [
|
|
|
49
50
|
{{/each}}
|
|
50
51
|
];
|
|
51
52
|
|
|
52
|
-
const RoutesContext = createContext<
|
|
53
|
+
const RoutesContext = createContext<AppRoute[]>([]);
|
|
53
54
|
|
|
54
55
|
export const RoutesProvider: React.FC<{ children: ReactNode }> = ({ children }) => {
|
|
55
56
|
const pbcRoutes = getApp().routes.map((route) => ({
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AppRoute as FoundationAppRoute } from '@genesislcap/foundation-shell/app';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface AppRoute {
|
|
5
|
+
path?: string;
|
|
6
|
+
element?: ReactNode;
|
|
7
|
+
children?: AppRoute[];
|
|
8
|
+
data?: {
|
|
9
|
+
permissionCode?: string;
|
|
10
|
+
navItems?: unknown[];
|
|
11
|
+
pbcElement?: FoundationAppRoute['element'];
|
|
12
|
+
pbcElementTag?: unknown;
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
};
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { DI } from '@microsoft/fast-foundation';
|
|
2
|
-
import { Connect } from '@genesislcap/foundation-comms';
|
|
3
|
-
import { API_DATA } from '../config';
|
|
4
|
-
|
|
5
|
-
class ConnectService {
|
|
6
|
-
private container = DI.getOrCreateDOMContainer();
|
|
7
|
-
private connect: Connect = this.container.get(Connect);
|
|
8
|
-
|
|
9
|
-
getContainer() {
|
|
10
|
-
return this.container;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
getConnect() {
|
|
14
|
-
return this.connect;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
isConnected() {
|
|
18
|
-
return this.connect.isConnected;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
init() {
|
|
22
|
-
return this.connect.connect(API_DATA.URL);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export const connectService = new ConnectService();
|