@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.
@@ -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.29.1-prerelease.4",
4
+ "version": "3.29.1-prerelease.6",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "lint": "eslint .",
@@ -5,7 +5,6 @@ import { {{pascalCase this.componentName}} } from './{{kebabCase this.title}}-{{
5
5
  {{/each}}
6
6
  import { environment } from '../../../environments/environment';
7
7
 
8
-
9
8
  @Component({
10
9
  selector: 'app-{{kebabCase route.name}}',
11
10
  standalone: true,
@@ -1,6 +1,6 @@
1
1
  <rapid-g2plot-chart
2
2
  type="{{ config.type }}"
3
- config={tile{{ config.index }}.chartConfig}
3
+ config={chartConfig}
4
4
  >
5
5
  <chart-datasource
6
6
  resourceName="{{ config.resourceName }}"
@@ -6,4 +6,4 @@ import { sendEventOnChannel } from '../../../utils';
6
6
 
7
7
  {{#if tile.config.gridOptions}}
8
8
  export const gridOptions: GridOptionsConfig = {{{ tile.config.gridOptions }}}
9
- {{/if}}
9
+ {{/if}}
@@ -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={tile{{ config.index }}.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={tile{{ config.index }}.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={{{ config.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={tile{{ config.index }}.reqrep}
31
+ datasourceConfig={reqrep}
32
32
  {{/if}}
33
33
  {{#if config.columns}}
34
- columns={tile{{ config.index }}.columns}
34
+ columns={columnDefs}
35
35
  {{/if}}
36
36
  {{#if config.modalPosition}}
37
37
  modal-position="{{ config.modalPosition }}"
@@ -2,7 +2,7 @@
2
2
  design-system-prefix="rapid"
3
3
  resourceName="{{config.resourceName}}"
4
4
  {{#if config.uischema}}
5
- uischema={tile{{ config.index }}.uischema}
5
+ uischema={uischema}
6
6
  {{/if}}
7
7
  >
8
8
  </foundation-form>
@@ -8,11 +8,10 @@
8
8
  isSnapshot="{{config.snapshot}}"
9
9
  {{/if}}
10
10
  {{#if config.reqrep}}
11
- datasourceConfig={tile{{ config.index }}.reqrep}
11
+ datasourceConfig="reqrep"
12
12
  {{/if}}
13
13
  {{#if config.gridOptions}}
14
- deferredGridOptions={tile{{ config.index }}.gridOptions}
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
- <rapid-layout-region type="vertical">
3
- {{#each route.tiles}}
4
- {{#ifEquals @index 0}}
5
- <rapid-layout-item title="{{../title}}">
6
- {{> (lookup ../this 'type') ../this}}
7
- </rapid-layout-item>
8
- {{/ifEquals}}
9
- {{#ifEquals @index 1}}
10
- <rapid-layout-item title="{{../title}}">
11
- {{> (lookup ../this 'type') ../this}}
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
- {{> (lookup ../this 'type') ../this}}
21
- </rapid-layout-item>
22
- {{/ifEquals}}
23
- {{#ifEquals @index 3}}
24
- <rapid-layout-item title="{{../title}}">
25
- {{> (lookup ../this 'type') ../this}}
26
- </rapid-layout-item>
27
- {{/ifEquals}}
28
- {{/each}}
29
- </rapid-layout-region>
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
- {{#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
+ <{{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}`,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "UI": "14.200.0",
3
- "GSF": "8.3.0-beta0",
3
+ "GSF": "8.3.0-beta2",
4
4
  "Auth": "8.3.0-beta0"
5
5
  }
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 React from 'react';
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}}
@@ -1,5 +1,3 @@
1
1
  import { createBrowserHistory } from 'history';
2
2
 
3
- const history = createBrowserHistory();
4
-
5
- export default history;
3
+ export const history = createBrowserHistory();
@@ -0,0 +1,2 @@
1
+ export * from './history';
2
+ export * from './fdc3';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/blank-app-seed",
3
3
  "description": "Genesis Blank App Seed",
4
- "version": "3.29.1-prerelease.4",
4
+ "version": "3.29.1-prerelease.6",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "release": "semantic-release"