@mashroom/mashroom-portal-tabify-app
v2.7.1
Published
A Mashroom Portal App that automatically organizes all other Apps in the area where it is placed in tabs
Downloads
111
Readme
Mashroom Portal Tabify App
Plugin for Mashroom Server, a Microfrontend Integration Platform.
This Mashroom Portal App turns any app area where it is placed automatically into a tabbed container.
Usage
If node_modules/@mashroom is configured as plugin path just add @mashroom/mashroom-portal-tabify-app as dependency.
After placing it on a page use the Portal Admin Toolbar to set the following properties:
- addCloseButtons: Defines if a close button will be added to remove a portal app displayed as tab
- appNameTitleMapping: A map to override the displayed title in the tab (Portal App Name -> Title to display)
- fixedTabTitles: A list of fixed tab titles per position (null means not fixed). E.g.: [null, 'the second tag']
Updates via MessageBus
It is possible to change the App/Title mapping and to show a specific Tab via MessageBus. This is especially useful for dynamic cockpits where you load Apps programmatically via MashroomPortalAppService.
Available topics:
- tabify-add-plugin-name-title-mapping
- tabify-add-app-id-title-mapping
- tabify-focus-app
tabify-add-plugin-name-title-mapping expect a message like this:
{
pluginName: 'My App',
title: 'Another title'
}
tabify-add-app-id-title-mapping expect a message like this:
{
appId: '1234123',
title: 'Another title'
}
And tabify-focus-app expects just an id:
{
appId: '1234123'
}