Deregister a StorefrontProvider.
import { Storefront, StorefrontProvider } from "@openfin/workspace";
//Instantiate a StorefrontProvider
const myStorefrontProvider: StorefrontProvider = {
id: "my-storefront-id"
title: "My StoreFrontProvider"
icon: "https://cdn.openfin.co/demos/notifications/generator/images/icon-blue.png",
getApps: () => {...},
getNavigation: () => {...},
getLandingPage: () => {...},
getFooter: () => {...},
launchApp: () => {...}
};
const register = async () => {
await Storefront.register(myStorefrontProvider);
}
//Do work with myStorefrontProvider
const deregister = async () => {
await Storefront.deregister("my-storefront-id");
}
the id of the provider.
Hides the Storefront window. Awaits for the latest [[Storefront.register()
]]
internally, so you don't have to. Throws an error if a StorefrontProvider
doesn't exist (i.e., because register()
was not called previously).
import { Storefront } from "@openfin/workspace";
const hide = async () => {
await Storefront.hidef();
//Do thing after show
}
Registers a StorefrontProvider
. Upon registering a provider,
the title of your provider appears in the menu of the Storefront UI.
When a user selects your Storefront, the methods on the provider
object are called to populate the UI. Throws an error if a provider with
the same id
already exists.
import { Storefront, StorefrontProvider } from "@openfin/workspace";
//Declare a provider
const myStorefrontProvider: StorefrontProvider = {
id: "my-storefront-id"
title: "My StorefrontProvider"
icon: "https://cdn.openfin.co/demos/notifications/generator/images/icon-blue.png",
getApps: () => {...},
getNavigation: () => {...},
getLandingPage: () => {...},
getFooter: () => {...},
launchApp: () => {...}
};
const registerProvider = async () => {
await Storefront.register(myStorefrontProvider);
}
the implementation of a Storefront provider.
Shows the Storefront window. Awaits for the latest [[Storefront.register()
]]
internally, so you don't have to. Throws an error if a StorefrontProvider
doesn't exist (i.e., because register()
not called previously).
import { Storefront } from "@openfin/workspace";
const show = async () => {
await Storefront.show();
//Do thing after show
}
Generated using TypeDoc
Interface that contains functions for integrating with Storefront.