Releases: morganstanley/fdc3-web
Releases · morganstanley/fdc3-web
v0.11.0
v0.11.0
v0.10.0
Breaking
IOpenApplicationStrategy.open()andIOpenApplicationStrategy.canOpen()now take a single parameter argument rather than multiple parameters
was:
export type OpenApplicationStrategyParams = {
appDirectoryRecord: Omit<AppDirectoryApplication, 'hostManifests'>;
agent: DesktopAgent;
manifest?: unknown;
};
canOpen(params: OpenApplicationStrategyParams, context?: Context): Promise<boolean>;
open(params: OpenApplicationStrategyParams, appReadyPromise: Promise<FullyQualifiedAppIdentifier>, context?: Context): Promise<string>;now:
export type OpenApplicationStrategyParams = {
appDirectoryRecord: Omit<AppDirectoryApplication, 'hostManifests'>;
agent: DesktopAgent;
/**
* manifest from the app directory record identified by the strategy's manifestKey
*/
manifest?: unknown;
context?: Context;
};
export type OpenApplicationStrategyResolverParams = OpenApplicationStrategyParams & {
appReadyPromise: Promise<FullyQualifiedAppIdentifier>;
};
canOpen(params: OpenApplicationStrategyParams): Promise<boolean>;
open(params: OpenApplicationStrategyResolverParams): Promise<string>;Added
appReadyPromiseproperty added toIOpenApplicationStrategy.open()function. This promise resolves when the application that is being opened is ready and has had aninstanceIdassigned- Singleton app support added. If an application is marked as a singleton it will not appear in the
New Instancesection of the app resolver if an instance already exists. This means that the user cannot open more than one instance of an app using the app resolver as a result of araiseIntentorraiseIntentForContextcall. Add an entry tohostManifestswithin your app directory record to enable this:
{
"title": "My App",
"appId": "my-app",
"type": "web",
"details": {
"url": "http://localhost:4302/app-b.html"
},
"hostManifests": {
"MorganStanley.fdc3-web": {
"singleton": true
}
}
}applicationStrategiesparameter inRootDesktopAgentFactoryParamsnow accepts(IOpenApplicationStrategy | ISelectApplicationStrategy)[]instead of justIOpenApplicationStrategy[]ISelectApplicationStrategy- new interface for selecting/focusing existing application instances. This allows strategies to restore minimised windows or bring windows to the front. Define strategies withcanSelectApp()andselectApp()methods:
export interface ISelectApplicationStrategy {
manifestKey?: string;
canSelectApp(params: SelectApplicationStrategyParams): Promise<boolean>;
selectApp(params: SelectApplicationStrategyParams): Promise<void>;
}Changed
- IAppResolver implementations no longer have to return an
FullyQualifiedAppIdentifier. Instead they can just return anAppIdentifier. If a non-qualified identifier is returned the Desktop Agent will handle the responsibility of opening a new instance of that app.
v0.9.1
What's Changed
- chore(deps): bump glob by @dependabot[bot] in #249
- chore(deps-dev): bump js-yaml from 3.14.1 to 3.14.2 by @dependabot[bot] in #248
- ensure that if we are re-adding the same app directory we do not lose the registered instances by @Roaders in #250
Full Changelog: v0.9.0...v0.9.1