@morgan-stanley/composeui-fdc3
v0.1.0-alpha.11
Published
FDC3 DesktopAgent implementation for Compose UI
Keywords
Readme
composeui-fdc3
composeui-fdc3 is a TypeScript/JavaScript package that provides FDC3 support for ComposeUI applications. It enables interoperability between desktop applications by implementing the FDC3 standard APIs for context sharing, intent handling, and application discovery.
Note: This package currently supports only FDC3 version 2.0.
It uses the Messaging abstractions TypeScript library as its messaging layer.
Features
- Implements FDC3 APIs for context, intents, and app channels
- TypeScript typings included
Installation
You need to embed the generated bundle into your shell application, similar to how it is handled in the current Shell POC. In that example, a .NET WPF application includes the bundle as an embedded resource. When using WebView2 to load web windows, the application initializes the bundle as a script and injects it into the page.
To use the FDC3 APIs, install the official FINOS FDC3 library (version 2.0) in your application:
npm install @finos/[email protected]Usage
Import and use the FDC3 API in your application as needed.
// Raise an intent
fdc3.raiseIntent('ViewChart', { instrument: { type: 'fdc3.instrument', id: { ticker: 'AAPL' } } });
// Broadcast context
fdc3.broadcast({ type: 'fdc3.contact', name: 'Jane Doe' });
// Listen for context
fdc3.addContextListener('fdc3.instrument', context => {
console.log('Received instrument context:', context);
});API
This package implements the FDC3 2.0+ API. See the FDC3 documentation for details on available methods and context types.
Setup
- Have a Shell bundling the generated resource into the webpage.
- Import and use the FDC3 API from the FINOS library as shown above.
- Ensure your environment is configured to support FDC3 interoperability, e.g., having the FDC3 DesktopAgent backend for handling the requests.
Documentation
© Morgan Stanley. See NOTICE file for additional information.
