@genesislcap/foundation-fdc3 14.173.3 → 14.174.0

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.
Files changed (2) hide show
  1. package/README.md +74 -12
  2. package/package.json +12 -12
package/README.md CHANGED
@@ -1,29 +1,91 @@
1
1
  # Genesis Foundation FDC3
2
2
 
3
- [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
4
- [![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](https://www.typescriptlang.org/)
3
+ This provides a robust implementation of the FDC3 standard, facilitating interoperability between desktop financial applications. It leverages the `@finos/fdc3` library to implement an API that covers intents, context sharing, and channels, enhancing the communication and interaction capabilities of applications within the financial domain.
5
4
 
6
- `foundation-fdc3` provides a collection of FDC3 services and utilities. See the API docs linked below for more information.
5
+ ## API Documentation
7
6
 
8
- ## Installation
7
+ For more detailed information on API and configurations, please refer to the [API documentation](docs/api/index.md) in the `docs/api` directory.
9
8
 
10
- To enable this module in your application, follow the steps below.
9
+ ## Installation
11
10
 
12
- 1. Add `@genesislcap/foundation-fdc3` as a dependency in your `package.json` file. Whenever you change the dependencies of your project, ensure you run the `$ npm run bootstrap` command again. You can find more information in the [package.json basics](https://learn.genesis.global/secure/web/basics/package-json-basics/) page.
11
+ To include `@genesislcap/foundation-fdc3` in your project, add it as a dependency in your `package.json` file and follow your project's routine for dependency installation.
13
12
 
14
13
  ```json
15
14
  {
16
- ...
17
15
  "dependencies": {
18
- ...
19
16
  "@genesislcap/foundation-fdc3": "latest"
20
- ...
21
- },
22
- ...
17
+ }
18
+ }
19
+ ```
20
+
21
+ ## Key Features
22
+
23
+ - **FDC3 Standard Compliance:** Implements FDC3 API standards, ensuring compatibility and interoperability across financial desktop applications.
24
+ - **Event and Context Management:** Supports handling and broadcasting of various event types and contexts, enabling rich interaction patterns between applications.
25
+ - **Channel Support:** Offers utilities for channel management, allowing applications to join, create, or broadcast over specific channels for targeted communication.
26
+ - **Intent Handling:** Provides mechanisms to raise, listen for, and handle intents, facilitating action-driven communication between applications.
27
+
28
+ ## Usage Examples
29
+
30
+ ### Adding Intent Listeners
31
+
32
+ ```typescript
33
+ import { FDC3, FDC3Intents, FDC3ContextHandler } from '@genesislcap/foundation-fdc3';
34
+ import { FASTElement } from '@microsoft/fast-element';
35
+
36
+ export class MyComponent extends FASTElement {
37
+ @FDC3 fdc3Service: FDC3;
38
+
39
+ connectedCallback() {
40
+ const listeners = new Map<FDC3Intents, FDC3ContextHandler>([
41
+ [FDC3Intents.controlClicked, (context) => console.log('Control clicked', context)],
42
+ [FDC3Intents.routeChanged, (context) => console.log('Route changed', context)],
43
+ ]);
44
+
45
+ this.fdc3Service.addIntentListeners(listeners);
46
+ }
23
47
  }
24
48
  ```
25
49
 
26
- ## [API Docs](./docs/api/index.md)
50
+ ### Raising an Intent
51
+
52
+ ```typescript
53
+ import { FDC3, FDC3Intents } from '@genesislcap/foundation-fdc3';
54
+ import { FASTElement } from '@microsoft/fast-element';
55
+
56
+ export class MyComponent extends FASTElement{
57
+ @FDC3 fdc3Service: FDC3;
58
+
59
+ onClick() {
60
+ this.fdc3Service.raiseIntent({ type: 'ViewChart', symbol: 'AAPL' }, FDC3Intents.controlClicked);
61
+ }
62
+ }
63
+ ```
64
+
65
+ ### Joining a Channel
66
+
67
+ ```typescript
68
+ import { FDC3 } from '@genesislcap/foundation-fdc3';
69
+ import { FASTElement } from '@microsoft/fast-element';
70
+
71
+ export class MyComponent extends FASTElement {
72
+ @FDC3 fdc3Service: FDC3;
73
+
74
+ connectedCallback() {
75
+ this.fdc3Service.joinChannel('blue');
76
+ }
77
+ }
78
+ ```
79
+
80
+ ## Best Practices
81
+
82
+ - **Intent and Context Definition:** Clearly define the intents and contexts your application will use or listen for, ensuring they align with FDC3 standards and facilitate meaningful interactions between applications.
83
+ - **Error Handling:** Implement robust error handling for intent raising and context sharing operations, especially when dealing with asynchronous actions.
84
+ - **Channel Usage:** When using channels for communication, ensure proper management of channel membership and context broadcasting to avoid unintended interactions.
85
+
86
+ ## Dependency Injection and Service Configuration
87
+
88
+ The FDC3 service is designed to be easily integrated and configured within your application using dependency injection. This approach allows for flexible instantiation and usage of the FDC3 API, ensuring that financial desktop applications can leverage standard communication protocols for enhanced interoperability.
27
89
 
28
90
  ## License
29
91
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-fdc3",
3
3
  "description": "Genesis Foundation FDC3",
4
- "version": "14.173.3",
4
+ "version": "14.174.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -51,20 +51,20 @@
51
51
  "test:debug": "genx test --debug"
52
52
  },
53
53
  "devDependencies": {
54
- "@genesislcap/foundation-testing": "14.173.3",
55
- "@genesislcap/genx": "14.173.3",
56
- "@genesislcap/rollup-builder": "14.173.3",
57
- "@genesislcap/ts-builder": "14.173.3",
58
- "@genesislcap/uvu-playwright-builder": "14.173.3",
59
- "@genesislcap/vite-builder": "14.173.3",
60
- "@genesislcap/webpack-builder": "14.173.3",
54
+ "@genesislcap/foundation-testing": "14.174.0",
55
+ "@genesislcap/genx": "14.174.0",
56
+ "@genesislcap/rollup-builder": "14.174.0",
57
+ "@genesislcap/ts-builder": "14.174.0",
58
+ "@genesislcap/uvu-playwright-builder": "14.174.0",
59
+ "@genesislcap/vite-builder": "14.174.0",
60
+ "@genesislcap/webpack-builder": "14.174.0",
61
61
  "rimraf": "^3.0.2"
62
62
  },
63
63
  "dependencies": {
64
64
  "@finos/fdc3": "^1.2.0",
65
- "@genesislcap/foundation-logger": "14.173.3",
66
- "@genesislcap/foundation-utils": "14.173.3",
67
- "@genesislcap/web-core": "14.173.3",
65
+ "@genesislcap/foundation-logger": "14.174.0",
66
+ "@genesislcap/foundation-utils": "14.174.0",
67
+ "@genesislcap/web-core": "14.174.0",
68
68
  "@microsoft/fast-element": "^1.12.0",
69
69
  "@microsoft/fast-foundation": "^2.49.4",
70
70
  "tslib": "^2.3.1"
@@ -77,5 +77,5 @@
77
77
  "publishConfig": {
78
78
  "access": "public"
79
79
  },
80
- "gitHead": "0bdb1299f8a0357337b96c114401a8bb84f92d36"
80
+ "gitHead": "1812b2af8a7a6a9c72db973b338c19128d876f93"
81
81
  }