File

src/ui/frame/smart-frame.component.ts

Extends

AbstractFrameComponent

Implements

OnInit OnDestroy AfterViewInit

Metadata

Index

Properties
Methods
Inputs
Outputs
Accessors

Constructor

constructor(registry: SmartFrameRegistryService, injector: Injector)
Parameters :
Name Type Optional
registry SmartFrameRegistryService No
injector Injector No

Inputs

smart-frame-layout
Type : any
smart-frame-settings
Type : SmartFrameSettings
value
Type : any
smart-help-url
Type : string

The help URL

smart-layout-type
Type : SmartFrameLayoutType
smart-logic-classes
Type : string[]
smart-object-name
Type : string
prompt-before-delete
Type : string
smart-event-handlers
Type : SSEHEventHandlerDefinitions
ignoreFlexboxLayout
Type : boolean
smart-help-text
Type : string | undefined

Sets the HelpText value for this form child.

smart-instance-name
Type : string

The instance name of the component

Outputs

frameButtonClicked
Type : EventEmitter<any>
valueChange
Type : EventEmitter<any>
buttonClicked
Type : EventEmitter<SmartViewerFieldSettings>
inputBlurred
Type : EventEmitter<string>
inputFocused
Type : EventEmitter<string>
inputValueChanged
Type : EventEmitter<InputChangedEventArgs>

Fires when an input belonging to the Smart Viewer changes it's value.

onAfterAddRecord
Type : EventEmitter<AfterAddEventArgument>
onAfterCancelRecord
Type : EventEmitter<AfterCancelEventArgument>
onAfterCopyRecord
Type : EventEmitter<AfterCopyEventArgument>
onAfterDeleteRecord
Type : EventEmitter<AfterDeleteEventArgument>
onAfterEnableFields
Type : EventEmitter<AfterEnableFieldsEventArgument>
onAfterSaveChanges
Type : EventEmitter<AfterSaveChangesEventArgument>
onBeforeAddRecord
Type : EventEmitter<BeforeAddEventArgument>
onBeforeCancelRecord
Type : EventEmitter<BeforeCancelEventArgument>
onBeforeCopyRecord
Type : EventEmitter<BeforeCopyEventArgument>
onBeforeDeleteRecord
Type : EventEmitter<BeforeDeleteEventArgument>
onBeforeEnableFields
Type : EventEmitter<BeforeEnableFieldsEventArgument>
onBeforeSaveChanges
Type : EventEmitter<BeforeSaveChangesEventArgument>

Methods

componentLoaded
componentLoaded()

Sets up listeners on lookup and combo editor children

Returns : void
Public getFieldReference
getFieldReference(fieldName: string)
Type parameters :
  • T

Returns a field reference

Parameters :
Name Type Optional Description
fieldName string No

the field name

Returns : T

{T}

getSelectedRecords
getSelectedRecords()

Returns an empty array, as frames are unbound

Returns : any[]
Public getWidgetFacade
getWidgetFacade(fieldName: string)

Returns a Widget Facade

Parameters :
Name Type Optional Description
fieldName string No

the field name

Returns : IWidgetFacade

{IWidgetFacade}

Public syncToolbarWithTableIOState
syncToolbarWithTableIOState(toolbar: ISmartTableIOSource)

Syncs the toolbar button states with the current state of this table IO target. SmartFrameComponent does not manage toolbar state, so this is a no-op implementation.

Parameters :
Name Type Optional Description
toolbar ISmartTableIOSource No
  • The toolbar to sync
Returns : void
Public callLogicMethod
callLogicMethod(methodName: string, ...args: any[])

Calls a method on the logic class instances

Parameters :
Name Type Optional Description
methodName string No
  • The method name to call
args any[] No
  • Arguments to pass to the method
Returns : Promise | any

The result of the method call

checkViewersPadding
checkViewersPadding()

Updates the viewer's padding

Returns : void
focusField
focusField(fieldToFocus: string)

Moves focus to the specified viewer field input

Parameters :
Name Type Optional Description
fieldToFocus string No

The fully qualified name of the viewer field

Returns : void
getTableIoSource
getTableIoSource()

Returns null

null

handleAdd
handleAdd()

Handles an add operation

Returns : void
handleCancel
handleCancel()

Handles a cancel operation

Returns : void
handleCopy
handleCopy()

Handles a copy operation

Returns : void
handleDelete
handleDelete()

Handles a delete operation

Returns : void
handleLayoutChange
handleLayoutChange(newLayout: any)
Parameters :
Name Type Optional
newLayout any No
Returns : void
handleSave
handleSave()

Handles a save operation

Returns : void
handleUpdate
handleUpdate()

Handles an update operation

Returns : void
handleView
handleView()

Handles a view operation

Returns : void
Public hasDateTimeTZSelectorPreferenceContextMenuItem
hasDateTimeTZSelectorPreferenceContextMenuItem()

Indicates whether DATETIME-TZ usage preference applies to this viewer.

Returns : boolean
Public onViewerContextMenu
onViewerContextMenu(event: MouseEvent)

Shows the viewer preference context menu when applicable.

Parameters :
Name Type Optional Description
event MouseEvent No

The context menu event.

Returns : void
Public onViewerPreferenceContextMenuItemSelected
onViewerPreferenceContextMenuItemSelected(event: ContextMenuSelectEvent)

Handles viewer preference context menu item selection.

Parameters :
Name Type Optional Description
event ContextMenuSelectEvent No

The context menu selection event.

Returns : void
trackBy
trackBy(index: number)

Tells the UI to track components by index

Parameters :
Name Type Optional
index number No
Returns : number
getDataSource
getDataSource(dataSourceName?: string)

Returns the data source for the table IO target

Parameters :
Name Type Optional Description
dataSourceName string Yes
  • The name of the data source
Public getToolbarDispatchPolicy
getToolbarDispatchPolicy(button: SmartToolbarButtonComponent)

Returns the policy captured before public toolbar output subscribers run.

Parameters :
Name Type Optional Description
button SmartToolbarButtonComponent No

The clicked toolbar button.

The click-time dispatch policy.

Public handleSuppressedToolbarButton
handleSuppressedToolbarButton(button: SmartToolbarButtonComponent, context: TableIOToolbarDispatchContext)

Performs target-specific UI cleanup after a consumer suppresses central toolbar dispatch.

Parameters :
Name Type Optional Description
button SmartToolbarButtonComponent No

The clicked toolbar button.

context TableIOToolbarDispatchContext No

The accepted click state.

Returns : void
Public handleToolbarButton
handleToolbarButton(button: SmartToolbarButtonComponent, context?: TableIOToolbarDispatchContext)

Handles a toolbar button click routed through the active TableIO target.

Parameters :
Name Type Optional Description
button SmartToolbarButtonComponent No

The clicked toolbar button.

context TableIOToolbarDispatchContext Yes

The accepted click state.

Returns : boolean

True when the target handled the button.

Async registerTableIOTarget
registerTableIOTarget()

Registers the table IO target with the registry

Returns : any
Public notifyLoadingFinished
notifyLoadingFinished(objectName: string)

Notifies the parent Smart Form that this form child has finished loading

Parameters :
Name Type Optional
objectName string No
Returns : void

void

Properties

frameLayout
Deprecated in favor of smartViewerTemplate
Type : any
domElement
Type : ElementRef
Decorators :
@ViewChild('fakeComponent')
fieldHeightsAdded
Type : boolean
fieldsetHeightsAdded
Type : boolean
helperService
Type : SmartViewerHelperService<AbstractFrameComponent>
isLabelsLeft
Type : boolean
maxDepthValue
Type : number
Default value : 0
smartLookups
Type : QueryList<SmartLookupComponent>
Decorators :
@ContentChildren(SmartLookupComponent)
Public viewerFormFieldsContainer
Type : ViewContainerRef
Decorators :
@ViewChild('formFieldsContainer', {read: ViewContainerRef})
viewerFormPadding
Type : number
Default value : 0
viewerLayout
Type : any
Public viewerPreferencesMenu
Type : ContextMenuComponent
Decorators :
@ViewChild('viewerPreferencesMenu', {read: ContextMenuComponent})
Public viewerPreferencesService
Type : SmartViewerPreferencesService
Public tableIoStateSignal
Type : WritableSignal<TableIOTargetState>
Default value : signal( TableIOTargetState.IDLE )

Signal that tracks the current TableIO operation state. Used for synchronizing state between group assign source/target viewers.

Public injector
Type : Injector

Accessors

smartViewerTemplate
setsmartViewerTemplate(value: any)
Parameters :
Name Type Optional
value any No
Returns : void
value
getvalue()
Returns : any
setvalue(newValue: any)
Parameters :
Name Type Optional
newValue any No
Returns : void
settings
getsettings()
setsettings(value: SmartFrameSettings)
Parameters :
Name Type Optional
value SmartFrameSettings No
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        : smart-viewer.component.html
    Purpose     : Template for Smart Viewer.
    Author(s)   : Radu Nicoara
    Created     : Dec 07, 2017
--------------------------------------------------------------------------
-->
<div 
    #container id="form-container"
    (contextmenu)="onViewerContextMenu($event)">
        <form #viewerForm>
            <div #formFieldsContainer></div>
        </form>
        @if (_readDisabledSignal()) {
        <div class="row">
            <p class="col-12">* Read access is restricted.</p>
        </div>
        }
        @if (hasDateTimeTZSelectorPreferenceContextMenuItem()) {
            <kendo-contextmenu
                #viewerPreferencesMenu
                size="small"
                [collision]="{ horizontal: 'fit', vertical: 'flip' }"
                [popupAnimate]="{ type: 'fade', duration: 100, direction: 'down' }"
                (select)="onViewerPreferenceContextMenuItemSelected($event)">
                <kendo-menu-item text="Use timezones" [icon]="viewerPreferencesService.useDateTimeZones() ? 'checkbox-checked' : 'checkbox'" [data]="'use-date-time-zones'" [disabled]="!viewerPreferencesService.preferencesReady()">
                </kendo-menu-item>
            </kendo-contextmenu>
        }
</div>

../viewer/smart-viewer.component.scss

/**********************************************************************
 * 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        : smart-viewer.component.scss
    Purpose     : Styles for Smart Viewer.
    Author(s)   : Radu Nicoara
    Created     : Dec 07, 2017
  ----------------------------------------------------------------------*/

::ng-deep kendo-numerictextbox .k-numeric-wrap input.k-input {
    text-align: right !important;
    height: 100% !important
}

 ::ng-deep input[disabled],
textarea[disabled],
select[disabled],
[smart-widget-disabled] {
    opacity: 1 !important;
}

::ng-deep input, ::ng-deep label {
    font-weight: normal !important;
}

::ng-deep form.k-form,
::ng-deep form.k-form-inline {
    position: relative !important;
    min-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

::ng-deep form.k-form smart-viewer-field:not(.vertical-stretch),
::ng-deep form.k-form smart-viewer-fieldset,
::ng-deep form.k-form smart-viewer-group,
::ng-deep form.k-form-inline smart-viewer-field:not(.vertical-stretch),
::ng-deep form.k-form-inline smart-viewer-fieldset,
::ng-deep form.k-form-inline smart-viewer-group  {
    flex: 0 !important;
}
::ng-deep form.k-form smart-viewer-field.vertical-stretch:not(.labels-left-field) {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

::ng-deep 
form.k-form-inline smart-viewer-field.vertical-stretch,
form.k-form smart-viewer-field.vertical-stretch.labels-left-field {
    flex: 1 !important;
    display: flex !important;
    flex-direction: row !important;
}

::ng-deep form.k-form smart-viewer-field.vertical-stretch > div,
::ng-deep form.k-form smart-viewer-field.vertical-stretch smarteditorwrapper {
    flex: 1 !important;
    display: flex !important;
}

::ng-deep form.k-form smart-viewer-field.vertical-stretch:not(.labels-left-field) > div {
    flex-direction: column !important;
}

#form-container {
    overflow-y: auto !important;
    height: 100% !important;
}

::ng-deep .absolute-layout .k-form-field.smart-checkbox label,
::ng-deep .absolute-layout .k-form-field span {
    white-space: nowrap !important;
}

::ng-deep .absolute-layout .smart-viewer-fieldset {
    margin-top: 0px !important;
}

::ng-deep .before-delete-prompt-dialog {
    z-index: 100000 !important;
}

../frame/smart-frame.component.scss

/**********************************************************************
 * 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        : smart-frame.component.scss
    Purpose     : Styles for Smart Frame.
    Author(s)   : Radu Nicoara
    Created     : Sep 26, 2018
  ----------------------------------------------------------------------*/

.smart-frame.labels-left .k-form-inline {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.smart-frame-pixel,
:host(.smart-frame-pixel) {
    display: block;
}

.smart-frame-pixel form,
:host(.smart-frame-pixel) form {
    display: block !important;
    position: relative !important;
}

.mass-assignment-form .k-form-inline {
    position: relative !important;
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""