File

src/ui/viewer/components/field/wrappers/button/button-wrapper.component.ts

Extends

AbstractInputWrapperComponent

Implements

OnInit

Metadata

Index

Properties
Methods
Inputs
Outputs
Accessors

Constructor

constructor(helperService: SmartViewerHelperService<AbstractFrameComponent>, elementRef: ElementRef, renderer: Renderer2, changeDetector: ChangeDetectorRef)
Parameters :
Name Type Optional
helperService SmartViewerHelperService<AbstractFrameComponent> No
elementRef ElementRef No
renderer Renderer2 No
changeDetector ChangeDetectorRef No

Inputs

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

Outputs

modelChange
Type : EventEmitter<any>

Methods

viewerButtonClicked
viewerButtonClicked()
Returns : void
Public updateValue
updateValue(newValue: any)
Parameters :
Name Type Optional
newValue any No
Returns : void

Properties

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)

Accessors

buttonImageUrl
setbuttonImageUrl(value: string)

Sets the button image URL.

Parameters :
Name Type Optional
value string No
Returns : void
buttonIcon
setbuttonIcon(value: string)

Sets the button icon.

Parameters :
Name Type Optional
value string No
Returns : void
fieldLabelOverride
getfieldLabelOverride()

Returns the field label override.

Returns : string
setfieldLabelOverride(value: string)

Sets the field label override.

Parameters :
Name Type Optional Description
value string No
  • The override label.
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>   
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""