@genesislcap/blank-app-seed 3.11.0 → 3.11.2

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.11.0",
4
+ "version": "3.11.2",
5
5
  "license": "Apache-2.0",
6
6
  "genxSeedConfig": {
7
7
  "exclude": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "UI": "14.181.1",
2
+ "UI": "14.182.2",
3
3
  "GSF": "7.2.6",
4
4
  "Auth": "7.2.1"
5
5
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.11.2](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.11.1...v3.11.2) (2024-05-29)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * adding foundation-fdc3 - GENC-292 (#239) fb1676d
9
+
10
+ ## [3.11.1](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.11.0...v3.11.1) (2024-05-29)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * various Rapid fixes [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) (#238) 771f414
16
+
3
17
  ## [3.11.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.10.8...v3.11.0) (2024-05-29)
4
18
 
5
19
 
@@ -89,7 +89,7 @@
89
89
  },
90
90
  "dependencies": {
91
91
  {{#if FDC3.includeDependencies}}
92
- "@finos/fdc3": "^1.2.0",
92
+ "@genesislcap/foundation-fdc3": "{{versions.UI}}",
93
93
  {{/if}}
94
94
  "@genesislcap/foundation-comms": "{{versions.UI}}",
95
95
  "@genesislcap/foundation-entity-management": "{{versions.UI}}",
@@ -1,78 +1,32 @@
1
- {{#if FDC3.includeDependencies}}
2
- import { getOrCreateChannel, raiseIntent, addIntentListener } from '@finos/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 sendMessageOnChannel = async (
16
- channelName: string,
17
- type: string,
18
- payload: any,
19
- ): Promise<void> => {
20
- const channel = await getOrCreateChannel(channelName);
21
-
22
- const m: any = {
23
- type,
24
- id: payload,
25
- };
26
-
27
- await channel.broadcast(m);
28
- };
29
-
30
- export const listenToChannel = async (
31
- channelName: string,
32
- type: string,
33
- callback: (result: any) => void,
34
- ): Promise<void> => {
35
- const channel = await getOrCreateChannel(channelName);
36
- channel.addContextListener(type, (result) => callback(result));
37
- };
38
-
39
- export const doRaiseIntent = async (intent: string, type: string, context: any): Promise<void> => {
40
- const message = {
41
- type,
42
- id: context,
43
- };
44
-
45
- const result = await raiseIntent(intent, message);
46
- };
47
-
48
- export const listenForIntent = async (
49
- intent: string,
50
- callback: (result: any) => void,
51
- ): Promise<void> => {
52
- addIntentListener(intent, (result) => callback(result));
53
- };
54
-
55
- export const stripOutBigInt = (object: any): any => {
56
-
57
- object = { ...object };
58
-
59
- Object.keys(object).forEach(key => {
60
- if (typeof object[key] === 'bigint') {
61
- delete object[key]
62
- } else if (typeof object[key] === 'object') {
63
- object[key] = stripOutBigInt(object[key]);
64
- }
65
- })
66
-
67
- return object;
68
- }
69
-
70
- export const sendEventOnChannel = (channelName: string, type: string) => {
71
- return async (e: any) => {
72
- // check for ag-grid-specific events, fall back to standard events
73
- const payload = e.data || e.detail;
74
- const sanitised = stripOutBigInt(payload);
75
- sendMessageOnChannel(channelName, type, sanitised);
76
- };
77
- };
78
- {{/if}}
1
+ {{#if FDC3.includeDependencies}}
2
+ import { DefaultFDC3 } from '@genesislcap/foundation-fdc3';
3
+
4
+ {{/if}}
5
+ export const isFDC3 = (): boolean => !!(window as any).fdc3;
6
+ {{#if FDC3.includeDependencies}}
7
+ const fdc3Service = new DefaultFDC3();
8
+
9
+ export const onFDC3Ready = async (FDC3ReadyCb: () => any): Promise<void> => {
10
+ isFDC3()
11
+ ? await FDC3ReadyCb()
12
+ : window.addEventListener('fdc3Ready', async () => {
13
+ await FDC3ReadyCb();
14
+ });
15
+ };
16
+
17
+ export const listenToChannel = async (
18
+ channelName: string,
19
+ type: string,
20
+ callback: (result: any) => void,
21
+ ): Promise<void> => {
22
+ fdc3Service.addChannelListener(channelName, type, callback);
23
+ };
24
+
25
+ export const sendEventOnChannel = (channelName: string, type: string) => {
26
+ return async (e: any) => {
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}}
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.11.0",
4
+ "version": "3.11.2",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "release": "semantic-release"