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