Skip to content

ShellPlugin

Since v2.x (extraction #370)

Shell plugin for <tbw-grid>.

OptionTypeDescription
header?ShellHeaderConfigShell header bar configuration
toolPanel?ToolPanelConfigTool panel configuration
  • ShellConfig for all configuration options.
  • Extends BaseGridPlugin.

Extends BaseGridPlugin

Inherited methods like attach(), detach(), afterRender(), etc. are documented in the base class.

Whether the tool panel sidebar is currently open.

readonly isToolPanelOpen: boolean

IDs of the currently expanded accordion sections in the tool panel.

readonly expandedToolPanelSections: string[]

Open the tool panel sidebar.

openToolPanel(panelId: string, options: OpenToolPanelOptions): void
NameTypeDescription
panelIdstringOptional section to expand on open (see ShellController.openToolPanel).
optionsOpenToolPanelOptionsOptional open options. In mode: 'dropdown', options.anchor
sets the element the popover anchors to (see OpenToolPanelOptions).

Close the tool panel sidebar.

closeToolPanel(): void

Toggle the tool panel sidebar open or closed.

toggleToolPanel(options: OpenToolPanelOptions): void
NameTypeDescription
optionsOpenToolPanelOptionsOptional open options forwarded when opening (e.g. anchor
for dropdown mode; see OpenToolPanelOptions).

Toggle an accordion section expanded or collapsed within the tool panel.

toggleToolPanelSection(sectionId: string): void
NameTypeDescription
sectionIdstring

Get all registered tool panel definitions.

getToolPanels(): ToolPanelDefinition[]

Register a custom tool panel section.

registerToolPanel(panel: ToolPanelDefinition): void
NameTypeDescription
panelToolPanelDefinition

Unregister a custom tool panel section.

unregisterToolPanel(panelId: string): void
NameTypeDescription
panelIdstring

Get all registered header content definitions.

getHeaderContents(): HeaderContentDefinition[]

Register custom header content (rendered in the shell header bar).

registerHeaderContent(content: HeaderContentDefinition): void
NameTypeDescription
contentHeaderContentDefinition

Unregister custom header content.

unregisterHeaderContent(contentId: string): void
NameTypeDescription
contentIdstring

Get all registered toolbar content definitions.

getToolbarContents(): ToolbarContentDefinition[]

Register custom toolbar content (rendered in the shell toolbar).

registerToolbarContent(content: ToolbarContentDefinition): void
NameTypeDescription
contentToolbarContentDefinition

Unregister custom toolbar content.

unregisterToolbarContent(contentId: string): void
NameTypeDescription
contentIdstring

override — Contribute to the grid’s effective configuration during each config merge. Called by ConfigManager.merge after the base config is assembled, before it becomes effectiveConfig. Mutate config in place to inject plugin-derived settings (e.g. the shell plugin folds its light-DOM / API-registered state into config.shell).

This is the config-pipeline counterpart to processColumns / processRows: it keeps the core config merge free of any plugin knowledge — each plugin owns the shape it contributes.

processConfig(config: GridConfig): void
NameTypeDescription
configGridConfigThe mutable base config being assembled into effectiveConfig.
processConfig(config: GridConfig): void {
config.shell = { ...config.shell, header: { title: this.#title } };
}

AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://toolboxjs.com/llms-full.txt