File

src/ui/toolbar/controls/smart-toolbar.button.ts

Extends

SmartToolbarControlItem

Implements

OnInit

Metadata

Index

Properties
Methods
Inputs
Outputs
Accessors

Constructor

constructor(injector: Injector, vcRef: ViewContainerRef, globalValues: SmartGlobalValueStoreService, elementRef: ElementRef)
Parameters :
Name Type Optional
injector Injector No
vcRef ViewContainerRef No
globalValues SmartGlobalValueStoreService No
elementRef ElementRef No

Inputs

action
Type : string

Sets the action to perform when the button is clicked.

dataSource
Type : string

Sets the data source name of the toolbar button.

disabled
Type : boolean

Sets whether the toolbar button is disabled.

form
Type : string

Sets the form associated with the toolbar button.

icon
Type : string

Sets the icon of the toolbar button.

image
Type : string

Sets the image of the toolbar button.

itemId
Type : string

Sets the item ID of the toolbar button.

label
Type : string

Sets the label of the toolbar button.

menuFunction
Type : string

Sets the menu function for the toolbar button.

name
Type : string

Sets the name of the toolbar button.

role
Type : string

Sets the role of the toolbar button control.

tooltip
Type : string

Sets the tooltip of the toolbar button.

Outputs

disabledChange
Type : EventEmitter<boolean>
onClick
Type : EventEmitter<SmartToolbarButtonComponent>

Methods

addCssClass
addCssClass(className: string)
Parameters :
Name Type Optional
className string No
Returns : void
click
click()
Returns : void
handleClick
handleClick()
Returns : void
removeCssClass
removeCssClass(className: string)
Parameters :
Name Type Optional
className string No
Returns : void

Properties

Readonly _buttonIconSignal
Type : Signal<string | undefined>
Default value : computed(() => { const icon = this._iconSignal(); if (!icon) { return undefined; } if (icon.split(' ').length === 1 && !icon.startsWith('fa-')) { return `fa-solid fa-${icon}`; } return icon; })

Resolved button icon class derived from the icon input.

Readonly _imageUrlSignal
Type : Signal<string | undefined>
Default value : computed(() => { const image = this._imageSignal(); if (!image) { return undefined; } if (image.startsWith('data:image/')) { return image; } if (isGlobalValueString(image)) { return this.globalValues.getGlobalValue<string>( parseGlobalValueString(image) ); } if (image.startsWith('frontend://')) { return resolveFrontendUrl(image); } return `${this.serviceAdapter.imageURI}/${image}`; })

Resolved image URL derived from the image input.

buttonControl
Type : ElementRef
Decorators :
@ViewChild('buttonControl', {read: ElementRef, static: true})
classList
Type : string[]
Default value : []
domElement
Type : ElementRef
Decorators :
@ViewChild('content', {read: ElementRef, static: true})
Public elementRef
Type : ElementRef
onChanges
Type : EventEmitter<void>
Default value : new EventEmitter()

Accessors

label
getlabel()

Returns the label of the toolbar button.

Returns : string
setlabel(value: string)

Sets the label of the toolbar button.

Parameters :
Name Type Optional Description
value string No
  • The label text.
Returns : void
tooltip
gettooltip()

Returns the tooltip of the toolbar button.

Returns : string
settooltip(value: string)

Sets the tooltip of the toolbar button.

Parameters :
Name Type Optional Description
value string No
  • The tooltip text.
Returns : void
image
getimage()

Returns the image of the toolbar button.

Returns : string
setimage(value: string)

Sets the image of the toolbar button.

Parameters :
Name Type Optional Description
value string No
  • The image path or data URI.
Returns : void
icon
geticon()

Returns the icon of the toolbar button.

Returns : string
seticon(value: string)

Sets the icon of the toolbar button.

Parameters :
Name Type Optional Description
value string No
  • The icon class name.
Returns : void
itemId
getitemId()

Returns the item ID of the toolbar button.

Returns : string
setitemId(value: string)

Sets the item ID of the toolbar button.

Parameters :
Name Type Optional Description
value string No
  • The item ID.
Returns : void
dataSource
getdataSource()

Returns the data source name of the toolbar button.

Returns : string
setdataSource(value: string)

Sets the data source name of the toolbar button.

Parameters :
Name Type Optional Description
value string No
  • The data source name.
Returns : void
content
getcontent()
Returns : HTMLElement
disabled
getdisabled()

Returns whether the toolbar button is disabled.

Returns : boolean
setdisabled(value: boolean)

Sets whether the toolbar button is disabled.

Parameters :
Name Type Optional Description
value boolean No
  • The disabled state.
Returns : void
action
getaction()

Returns the action to perform when the button is clicked.

Returns : string
setaction(value: string)

Sets the action to perform when the button is clicked.

Parameters :
Name Type Optional Description
value string No
  • The action name.
Returns : void
form
getform()

Returns the form associated with the toolbar button.

Returns : string
setform(value: string)

Sets the form associated with the toolbar button.

Parameters :
Name Type Optional Description
value string No
  • The form name.
Returns : void
menuFunction
getmenuFunction()

Returns the menu function for the toolbar button.

Returns : string
setmenuFunction(value: string)

Sets the menu function for the toolbar button.

Parameters :
Name Type Optional Description
value string No
  • The menu function identifier.
Returns : void
serviceAdapter
getserviceAdapter()
role
getrole()

Returns the role of the toolbar button control.

Returns : string
setrole(value: string)

Sets the role of the toolbar button control.

Parameters :
Name Type Optional Description
value string No
  • The role identifier.
Returns : void
name
getname()

Returns the name of the toolbar button.

Returns : string
setname(value: string)

Sets the name of the toolbar button.

Parameters :
Name Type Optional Description
value string No
  • The button name.
Returns : void
imageUrl
getimageUrl()

Returns the resolved image URL for the toolbar button.

Returns : string
buttonIcon
getbuttonIcon()

Returns the resolved button icon class for the toolbar button.

Returns : string
clientWidth
getclientWidth()
Returns : number
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""