File

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

Implements

OnInit AfterViewInit

Metadata

Index

Properties
Methods
Inputs
Accessors

Inputs

definition
Type : any

Sets the fieldset definition.

hasAbsolutePosition
Type : boolean

Sets whether the fieldset uses absolute positioning.

inline-labels
Type : boolean

Sets the inline labels flag.

itemIndex
Type : number
partOfGroup
Type : boolean

Sets whether this fieldset is part of a group.

smart-help-url
Type : string
title
Type : string

Methods

Public refreshTitle
refreshTitle()

Recomputes label visibility and forces view refresh.

Returns : void

Properties

classList
Type : string[]
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

definition
getdefinition()

Returns the fieldset definition.

Returns : any
setdefinition(value: any)

Sets the fieldset definition.

Parameters :
Name Type Optional Description
value any No
  • The definition object.
Returns : void
inlineLabels
getinlineLabels()

Returns whether labels are inline.

Returns : boolean
setinlineLabels(value: boolean)

Sets the inline labels flag.

Parameters :
Name Type Optional Description
value boolean No
  • Whether labels are inline.
Returns : void
partOfGroup
getpartOfGroup()

Returns whether this fieldset is part of a group.

Returns : boolean
setpartOfGroup(value: boolean)

Sets whether this fieldset is part of a group.

Parameters :
Name Type Optional Description
value boolean No
  • The part of group flag.
Returns : void
hasAbsolutePosition
gethasAbsolutePosition()

Returns whether the fieldset uses absolute positioning.

Returns : boolean
sethasAbsolutePosition(value: boolean)

Sets whether the fieldset uses absolute positioning.

Parameters :
Name Type Optional Description
value boolean No
  • The absolute position flag.
Returns : void
helpUrl
gethelpUrl()
Returns : string
sethelpUrl(value: string)
Parameters :
Name Type Optional
value string No
Returns : void
noLabel
getnoLabel()

Returns whether the label is hidden.

Returns : boolean
setnoLabel(value: boolean)

Sets the no-label flag.

Parameters :
Name Type Optional Description
value boolean No
  • Whether the label is hidden.
Returns : void
fieldChildren
setfieldChildren(fieldChildren: QueryList<SmartViewerFieldComponent>)
Parameters :
Name Type Optional
fieldChildren QueryList<SmartViewerFieldComponent> No
Returns : void
fieldsetChildren
setfieldsetChildren(fieldsetChildren: QueryList<FieldSetComponent>)
Parameters :
Name Type Optional
fieldsetChildren QueryList<FieldSetComponent> No
Returns : void
fields
getfields()

Returns the fields array.

setfields(value: SmartViewerFieldSettings[])

Sets the fields array.

Parameters :
Name Type Optional Description
value SmartViewerFieldSettings[] No
  • The fields.
Returns : void
fieldsetHeight
getfieldsetHeight()
top
gettop()
Returns : number
<!--
**************************************************************************
* 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        : field-set.component.html
    Purpose     : Template for field set.
    Author(s)   : Radu Nicoara
    Created     : Dec 21, 2017
--------------------------------------------------------------------------
-->
<fieldset
	#fieldSet
	class="smart-viewer-fieldset k-form-fieldset"
	smart-widget
	smart-widget-target="self"
	[name]="_definitionSignal().fieldName"
	[componentInstance]="this"
>
	@if (!_noLabelSignal()) {
	<legend class="k-form-legend">{{ titleSignal() }}</legend>
	} @else {
	<legend class="k-form-legend"></legend>
	}
	<div class="fieldset-content">
		@for (item of _fieldsSignal(); track item.fieldName) { @if (item.type
		=== 'group') {
		<smart-viewer-group
			[definition]="item"
			[hasAbsolutePosition]="_hasAbsolutePositionSignal()"
			[inline-labels]="_inlineLabelsSignal()"
			[ngClass]="{ 'labels-left-group': _inlineLabelsSignal() }"
			[smart-help-url]="
				$safeNavigationMigration(item.inputSettings?.helpUrl)
			"
		>
		</smart-viewer-group>
		} @else if (item.type === 'fieldset') {
		<smart-viewer-fieldset
			[definition]="item"
			[hasAbsolutePosition]="_hasAbsolutePositionSignal()"
			[inline-labels]="_inlineLabelsSignal()"
			[partOfGroup]="_partOfGroupSignal()"
			[smart-help-url]="
				$safeNavigationMigration(item.inputSettings?.helpUrl)
			"
		>
		</smart-viewer-fieldset>
		} @else {
		<smart-viewer-field
			[field]="item"
			[hasAbsolutePosition]="_hasAbsolutePositionSignal()"
			[inline-label]="_inlineLabelsSignal()"
			[smart-help-url]="
				$safeNavigationMigration(item.inputSettings?.helpUrl)
			"
			[ngClass]="{
				'vertical-stretch': item.inputSettings?.editorOptions
					?.verticalStretch
					? true
					: false
			}"
		>
		</smart-viewer-field>
		} }
	</div>
</fieldset>

./field-set.component.css

/**********************************************************************
 * 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        : field-set.component.css
    Purpose     : Styles for field set.
    Author(s)   : Mike Fechner
    Created     : Dec 12, 2016
  ----------------------------------------------------------------------*/

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

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

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

::ng-deep .absolute-layout .smart-viewer-fieldset.border-all {
    padding: 0px 10px !important;
}

.smart-viewer-fieldset.border-top {
    border-top: 1px solid black !important;
}

::ng-deep .smart-viewer-fieldset smart-viewer-field:first-of-type div.k-form-field.form-field-label {
    margin-top: 0px !important;
}

fieldset.no-legend legend {
    width: 0px;
    padding: 0px;
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""