MyGit

v1.2

finos/FDC3

版本发布时间: 2021-04-20 00:40:04

finos/FDC3最新发布版本:v2.1(2023-09-14 22:09:37)

v1.2 of the FDC3 standard, consisting of:

Release highlights

Raising an intent for a context type

The new raiseIntentForContext() method allows an application to start just with an FDC3 context data type, and then ask the desktop agent to raise an appropriate intent for that type.

This is similar to calling findIntentsByContext(), followed by raiseIntent(), but an application doesn't have to select from the available intents itself, or ask the user to. It allows the desktop agent to look up all matching intents and apps, and then use its own resolution logic (which could include an agent-provided selection dialog).

Example

const instrument = {
  type: 'fdc3.instrument',
  id: {
    ticker: 'AAPL'
  }
}

await fdc3.raiseIntentForContext(instrument)

fdc3Ready event

Knowing when the window.fdc3 global object will be initialised and set by the current desktop agent was a challenge in earlier versions of FDC3. The 1.2 API specification adds the concept of a global fdc3Ready event that applications can listen for to know when the FDC3 desktop environment has been initialised, and the window.fdc3 global object is available for use:

Example

if (window.fdc3) {
  action()
} else {
  window.addEventListener('fdc3Ready', action)
}

Specifying metadata for target applications

In FDC3 1.0 and 1.1, the open() and raiseIntent() methods accepts can target specific applications by specifying a string application identifier.

In FDC3 1.2, these methods (along with the new raiseIntentForContext() method) will now also accept the AppMetadata interface to help workflows to be even more targeted, and desktop agents to better identify target applications.

In addition, the AppMetadata interface has been expanded to optionally include appId and version.

Example

const target: TargetApp = {
  name: 'MyApp',
  version: '2.5'
}

await fdc3.open(target)

Obtain information about the current FDC3 environment

A new getInfo() method has been added to FDC3 that returns metadata about the FDC3 implementation that is currently being used, which includes the FDC3 version, as well as (optionally) the provider name and version.

Example

const info = fdc3.getInfo()
console.log('FDC3 version: ' + info.fdc3Version)

🚀 New Features

💅 Enhancements

👎 Deprecated

🐛 Bug Fixes

See the CHANGELOG.md for full details.

相关地址:原始地址 下载(tar) 下载(zip)

查看:2021-04-20发行的版本