src/ui/viewer/components/field/wrappers/button/button-wrapper.component.ts
| changeDetection | ChangeDetectionStrategy.Eager |
| selector | SmartButtonWrapper |
| templateUrl | ./button-wrapper.component.html |
Properties |
|
Methods |
|
Inputs |
Outputs |
Accessors |
constructor(helperService: SmartViewerHelperService<AbstractFrameComponent>, elementRef: ElementRef, renderer: Renderer2, changeDetector: ChangeDetectorRef)
|
|||||||||||||||
|
Parameters :
|
| buttonIcon |
Type : string
|
|
Sets the button icon. |
| buttonImageUrl |
Type : string
|
|
Sets the button image URL. |
| classList |
Type : any
|
| fieldLabelOverride |
Type : string
|
|
Sets the field label override. |
| componentInstance |
Type : any
|
| contentStyle |
Type : any
|
| field |
Type : any
|
| fieldStyle |
Type : any
|
| hasAbsolutePosition |
Type : boolean
|
| isNumeric |
Type : boolean
|
| model |
Type : any
|
| selected |
Type : any
|
| showDateTimeZone |
Type : boolean
|
| useDateTimeZones |
Type : boolean
|
| modelChange |
Type : EventEmitter<any>
|
| viewerButtonClicked |
viewerButtonClicked()
|
|
Returns :
void
|
| Public updateValue | ||||||
updateValue(newValue: any)
|
||||||
|
Parameters :
Returns :
void
|
| buttonElement |
Type : unknown
|
Default value : viewChild('vBtn', { read: ElementRef })
|
| icon |
Type : unknown
|
Default value : computed(() => this._buttonIcon() || this._buttonImageUrl())
|
| isIconClass |
Type : unknown
|
Default value : computed(() => this._buttonIcon() !== '')
|
| Readonly kendoButton |
Type : unknown
|
Default value : viewChild.required(ButtonComponent)
|
| Public elementRef |
Type : ElementRef
|
| enabledStateDirective |
Type : EnabledStateDirective
|
Decorators :
@ViewChild(EnabledStateDirective)
|
| Public helperService |
Type : SmartViewerHelperService<AbstractFrameComponent>
|
| smartWidgetDirective |
Type : InputFacadeDirective
|
Decorators :
@ViewChild(InputFacadeDirective)
|
| buttonImageUrl | ||||||
setbuttonImageUrl(value: string)
|
||||||
|
Sets the button image URL.
Parameters :
Returns :
void
|
| buttonIcon | ||||||
setbuttonIcon(value: string)
|
||||||
|
Sets the button icon.
Parameters :
Returns :
void
|
| fieldLabelOverride | ||||||||
getfieldLabelOverride()
|
||||||||
|
Returns the field label override.
Returns :
string
|
||||||||
setfieldLabelOverride(value: string)
|
||||||||
|
Sets the field label override.
Parameters :
Returns :
void
|
<!--
**************************************************************************
* Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") - *
* www.consultingwerk.com and other contributors as listed *
* below. All Rights Reserved. *
* *
* Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY *
* KIND, either express or implied. *
* *
* Contributors: *
* *
**************************************************************************
--------------------------------------------------------------------------
File : button-wrapper.component.html
Purpose : Template for button wrapper.
Author(s) : Radu Nicoara
Created : Jul 15, 2024
--------------------------------------------------------------------------
-->
<button
kendoButton
#vBtn
[componentInstance]="vBtn"
[name]="field.fieldName"
[imageUrl]="isIconClass() ? null : icon()"
[iconClass]="isIconClass() ? icon() : null"
type="button"
smart-widget
[enabledState]="field.enabledState"
(click)="viewerButtonClicked()"
[ngClass]="classList"
class="smart-viewer-button"
[attr.dataHelpUrl]="field.inputSettings.helpUrl">
@if(field.inputSettings?.noLabel !== true || _fieldLabelOverrideSignal()) {
{{_fieldLabelOverrideSignal() || field.label || field.ngModel}}
}
</button>