File

src/ui/viewer/components/field-set/field-set.component.ts

Implements

OnInit AfterViewInit

Metadata

selector smart-viewer-fieldset
styleUrls ./field-set.component.css
templateUrl ./field-set.component.html

Index

Properties
Inputs
Accessors

Constructor

constructor(screenService: SmartScreenService, renderer: Renderer2, element: ElementRef)
Parameters :
Name Type Optional
screenService SmartScreenService No
renderer Renderer2 No
element ElementRef No

Inputs

definition
Type : SmartViewerFieldsetSettings
hasAbsolutePosition
Type : boolean
inline-labels
Type : boolean
itemIndex
Type : number
partOfGroup
Type : boolean
title
Type : string

Properties

classList
Type : string
Default value : ''
fields
Type : SmartViewerFieldSettings[]
Default value : []
fieldSet
Type : ElementRef
Decorators :
@ViewChild('fieldSet', {read: ElementRef})
height
Type : number
Default value : 0
lastChild
Type : SmartViewerFieldComponent | FieldSetComponent
maxDepthValue
Type : number
Default value : 0
padded
Type : boolean

Accessors

fieldChildren
setfieldChildren(fieldChildren)
Parameters :
Name Optional
fieldChildren No
Returns : void
fieldsetChildren
setfieldsetChildren(fieldsetChildren)
Parameters :
Name Optional
fieldsetChildren No
Returns : void
fieldsetHeight
getfieldsetHeight()
top
gettop()
Returns : number
<fieldset #fieldSet [ngClass]="{ padded: padded, 'smart-viewer-fieldset': true }" [class]="classList">
    <legend *ngIf="!definition.inputSettings || definition.inputSettings.noLabel!==true">{{definition && definition.title}}</legend>
    <ng-container *ngFor="let item of fields">
        <smart-viewer-group
            *ngIf="item.type === 'group'"
            [definition]="item">
        </smart-viewer-group>
        <smart-viewer-field 
            [field]="item"
            [inline-label]="inlineLabels"
            *ngIf="item.type !== 'group' && item.type !=='fieldset'"></smart-viewer-field>
        <smart-viewer-fieldset
            [definition]="item"
            *ngIf="item.type === 'fieldset'">
        </smart-viewer-fieldset>
    </ng-container>
</fieldset>

./field-set.component.css

::ng-deep legend {
    border-bottom: unset !important;
}

fieldset.padded {
    margin-top: 20px;
}

.smart-viewer-fieldset.border-all {
    border: 1px solid lightgray !important;
    padding: 10px !important;
    border-radius: 0.25rem !important;
}

.smart-viewer-fieldset.border-top {
    border-top: 1px solid black !important;
}
Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""