@genesislcap/blank-app-seed 3.11.1 → 3.11.3

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.1",
4
+ "version": "3.11.3",
5
5
  "license": "Apache-2.0",
6
6
  "genxSeedConfig": {
7
7
  "exclude": [
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.11.3](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.11.2...v3.11.3) (2024-05-29)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * fdc3 file to unix file endings and fix linting error GENC-292 (#242) 50471e0
9
+
10
+ ## [3.11.2](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.11.1...v3.11.2) (2024-05-29)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * adding foundation-fdc3 - GENC-292 (#239) fb1676d
16
+
3
17
  ## [3.11.1](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.11.0...v3.11.1) (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,30 +1,16 @@
1
1
  {{#if FDC3.includeDependencies}}
2
- import { getOrCreateChannel, raiseIntent, addIntentListener } from '@finos/fdc3';
2
+ import { DefaultFDC3 } from '@genesislcap/foundation-fdc3';
3
3
  {{/if}}
4
4
  export const isFDC3 = (): boolean => !!(window as any).fdc3;
5
5
  {{#if FDC3.includeDependencies}}
6
+ const fdc3Service = new DefaultFDC3();
6
7
 
7
8
  export const onFDC3Ready = async (FDC3ReadyCb: () => any): Promise<void> => {
8
9
  isFDC3()
9
10
  ? await FDC3ReadyCb()
10
11
  : 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);
12
+ await FDC3ReadyCb();
13
+ });
28
14
  };
29
15
 
30
16
  export const listenToChannel = async (
@@ -32,47 +18,14 @@ export const listenToChannel = async (
32
18
  type: string,
33
19
  callback: (result: any) => void,
34
20
  ): 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));
21
+ fdc3Service.addChannelListener(channelName, type, callback);
53
22
  };
54
23
 
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
24
  export const sendEventOnChannel = (channelName: string, type: string) => {
71
25
  return async (e: any) => {
72
26
  // check for ag-grid-specific events, fall back to standard events
73
27
  const payload = e.data || e.detail;
74
- const sanitised = stripOutBigInt(payload);
75
- sendMessageOnChannel(channelName, type, sanitised);
28
+ await fdc3Service.broadcastOnChannel(channelName, type, payload);
76
29
  };
77
30
  };
78
31
  {{/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.1",
4
+ "version": "3.11.3",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "release": "semantic-release"