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) => FunctionComponent<any> | ComponentClass<any, 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. |
label inherited | string | The extension label. |
name inherited | string | The extension name. |
(props: LayoutContextToolProps, evt?: MouseEvent<any, MouseEvent>) => void | OnClick callback. | |
boolean | Check whether this tool should be opened by default when the toolbar opened. | |
(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) => FunctionComponent<any> | ComponentClass<any, 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): FunctionComponent<any> | ComponentClass<any, any>
Parameters
Parameter | Type |
---|---|
props | LayoutContextToolProps |
Returns
FunctionComponent<any> | ComponentClass<any, 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
openWhenAdded
openWhenAdded: boolean
Check whether this tool should be opened by default when the toolbar opened.
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.