Interface
The extension interface for ContextTool extension point.
Properties
Property | Type | Notes |
---|---|---|
(props: LayoutContextToolProps) => boolean | Check whether this tool is checked. | |
(props: LayoutContextToolProps) => boolean | Check whether this tool is disabled. | |
() => string | Return group id. | |
() => ComponentClass<SVGAttributes<SVGElement>, any> | Return the icon. | |
(props: LayoutContextToolProps) => ComponentClass<unknown, any> | The setting panel of the tool. Returning null means there is no setting panel for the tool. If the returned value is not null, the setting panel will be rendered. | |
(props: LayoutContextToolProps) => string | Return the title. | |
id inherited | string | The unique id. For widget's provided extension, the id pattern is: widgetId + extensionName |
index inherited | number | If an extension point supports multiple extensions, the index is used to determine the extension order. |
name inherited | string | The extension name. |
(props: LayoutContextToolProps, evt?: MouseEvent<any, MouseEvent>) => void | OnClick callback. | |
(props: LayoutContextToolProps) => boolean | Check whether this tool is visible. | |
widgetId inherited | string | The widget id that provides the extension. No widget id means the extension is provided by Jimu. |
checked
checked: (props: LayoutContextToolProps) => boolean
Check whether this tool is checked.
Type declaration
function(props: LayoutContextToolProps): boolean
Parameters
Parameter | Type |
---|---|
props | LayoutContextToolProps |
Returns
boolean
disabled
disabled: (props: LayoutContextToolProps) => boolean
Check whether this tool is disabled.
Type declaration
function(props: LayoutContextToolProps): boolean
Parameters
Parameter | Type |
---|---|
props | LayoutContextToolProps |
Returns
boolean
getGroupId
Interface PropertygetGroupId: () => string
Return group id.
Type declaration
function(): string
Returns
string
getIcon
Interface PropertygetIcon: () => ComponentClass<SVGAttributes<SVGElement>, any>
Return the icon.
Type declaration
function(): ComponentClass<SVGAttributes<SVGElement>, any>
Returns
ComponentClass<SVGAttributes<SVGElement>, any>
getSettingPanel
Interface PropertygetSettingPanel: (props: LayoutContextToolProps) => ComponentClass<unknown, any>
The setting panel of the tool. Returning null means there is no setting panel for the tool. If the returned value is not null, the setting panel will be rendered.
Type declaration
function(props: LayoutContextToolProps): ComponentClass<unknown, any>
Parameters
Parameter | Type |
---|---|
props | LayoutContextToolProps |
Returns
ComponentClass<unknown, any>
getTitle
Interface PropertygetTitle: (props: LayoutContextToolProps) => string
Return the title.
Type declaration
function(props: LayoutContextToolProps): string
Parameters
Parameter | Type |
---|---|
props | LayoutContextToolProps |
Returns
string
id
id: string
The unique id. For widget's provided extension, the id pattern is: widgetId + extensionName
index
index: number
If an extension point supports multiple extensions, the index is used to determine the extension order.
onClick
onClick: (props: LayoutContextToolProps, evt?: MouseEvent<any, MouseEvent>) => void
OnClick callback.
Type declaration
function(props: LayoutContextToolProps, evt?: MouseEvent<any, MouseEvent>): void
Parameters
Parameter | Type |
---|---|
props | LayoutContextToolProps |
evt | MouseEvent<any, MouseEvent> |
Returns
void
visible
visible: (props: LayoutContextToolProps) => boolean
Check whether this tool is visible.
Type declaration
function(props: LayoutContextToolProps): boolean
Parameters
Parameter | Type |
---|---|
props | LayoutContextToolProps |
Returns
boolean
widgetId
widgetId: string
The widget id that provides the extension. No widget id means the extension is provided by Jimu.