src/smart-developer-tools/smart-developer-tools.form.ts
OnInit
OnDestroy
AfterViewInit
| changeDetection | ChangeDetectionStrategy.Eager |
| selector | smart-developer-tools |
| styleUrls | ../ui/form/smart-form.component.css, |
| templateUrl | ../ui/form/smart-form.component.html |
constructor(injector: Injector, elementRef: ElementRef, tabRegistry: SmartTabFolderRegistryService, developerToolsService: SmartDeveloperToolsService)
|
|||||||||||||||
|
Parameters :
|
| component-type |
Type : any
|
|
Sets the component type. |
| formTitle |
Type : string
|
| smart-form-layout |
Type : any
|
|
Sets the form layout. |
| smart-help-text |
Type : string
|
|
Sets the HelpText value for the Smart Form. |
| smart-help-url |
Type : string
|
| viewReference |
Type : ViewRef
|
|
Sets the view reference. |
| componentRefChange |
Type : EventEmitter<ComponentRef<any>>
|
| initError |
Type : EventEmitter<any>
|
| onDataSourceAdded |
Type : EventEmitter<AbstractSmartDataSource>
|
| onDirtyStateChanged |
Type : EventEmitter<boolean>
|
| onFormClosed |
Type : EventEmitter<SmartFormClosedEventArgs<SmartFormComponent>>
|
| onFormClosing |
Type : EventEmitter<SmartFormClosingEventArgs<SmartFormComponent>>
|
| onModalFormClosed |
Type : EventEmitter<SmartModalFormClosedEventArgs<SmartFormComponent>>
|
| onReady |
Type : EventEmitter<FormReadyEvent>
|
| rootViewLoaded$ |
Type : ReplaySubject<void>
|
| viewLoaded |
Type : EventEmitter<ViewRef>
|
| dataSourcesContainerLoaded$ |
Type : ReplaySubject<void>
|
| attr.kendoRippleContainer |
Type : RippleContainerDirective
|
| componentLoaded | |||||||||
componentLoaded(instanceName: string, componentInstance: AbstractFormChild)
|
|||||||||
|
Parameters :
Returns :
void
|
| setFormFullSize |
setFormFullSize()
|
|
Returns :
void
|
| Public addFormChild | ||||||
addFormChild(item: unknown)
|
||||||
|
Parameters :
Returns :
void
|
| callFormAction | ||||||||||||
| Use callLogicMethod instead | ||||||||||||
callFormAction(actionName: string, ...actionArgs: any[])
|
||||||||||||
|
Calls the given form action
Parameters :
Returns :
any
|
| Public callLogicClassMethod | ||||||||||||
| Use callLogicMethod instead | ||||||||||||
callLogicClassMethod(methodName: string, args: any[])
|
||||||||||||
|
Invokes a specified method on the first available logic class instance that has the method defined.
Parameters :
Returns :
any
|
| Public callLogicMethod | ||||||||||||
callLogicMethod(methodName: string, ...args: any[])
|
||||||||||||
|
Calls a method on the logic class instances
Parameters :
Returns :
Promise | any
The result of the method call |
| Public checkIfAllChildrenLoaded |
checkIfAllChildrenLoaded()
|
|
Returns :
boolean
boolean |
| Public clearLayoutFragment | ||||||||
clearLayoutFragment(slotId: string)
|
||||||||
|
Clears the dynamic layout fragment from a named slot owned by this form.
Parameters :
Returns :
void
|
| Public clearWaitState |
clearWaitState()
|
|
Returns :
void
|
| Public Async closeForm | ||||||||
closeForm(result?: any)
|
||||||||
|
Programmatically closes the form In MDI, it closes the floating-window instance In SDI, it navigates back to the default route (ex. "home")
Parameters :
Returns :
Promise<boolean>
True when the close was accepted |
| Public Async closeWindow | ||||||||
closeWindow(result?: any)
|
||||||||
|
Closes the floating window, if the Smart Form has been rendered in one.
Parameters :
Returns :
Promise<boolean>
True when the close was accepted |
| Public componentLoadedFromLayoutContainer | |||||||||
componentLoadedFromLayoutContainer(instanceName: string, componentInstance: AbstractFormChild)
|
|||||||||
|
Registers a child component with the Smart Form without delegating to the layout container.
Intended for calls originating from a
Parameters :
Returns :
void
|
| Public componentUnloadedFromLayoutContainer | |||||||||
componentUnloadedFromLayoutContainer(instanceName: string, componentInstance: AbstractFormChild)
|
|||||||||
|
Unregisters a child component previously contributed by a layout container.
Parameters :
Returns :
void
|
| Public computeFormChildren |
computeFormChildren()
|
|
Returns :
void
|
| Public Async fireModalFormClosed | ||||||||||||||||
fireModalFormClosed(closeResult: IProvidesDialogResult, launchedFormName: string, launchedFormParameter?: unknown)
|
||||||||||||||||
|
Fires the ModalFormClosed event handler on the parent form.
Parameters :
Returns :
Promise<void>
|
| Public getColumnCssClasses |
getColumnCssClasses()
|
|
Gets column CSS classes for the layout container
Returns :
string
|
| Public getContainerCssClasses |
getContainerCssClasses()
|
|
Gets container CSS classes for the layout container
Returns :
string
|
| Public getContainerSizeCategory |
getContainerSizeCategory(width: number, height: number)
|
|
Returns :
string
{string} |
| getCurrentViewInjector |
getCurrentViewInjector()
|
|
Returns :
Injector
Injector |
| Public getDataSource | ||||||||
getDataSource(dataSourceName?: string)
|
||||||||
|
Gets a form data source for server-side event handler payload generation.
Parameters :
Returns :
Observable<SmartDataSource | null>
The data source observable |
| getFormDatasource | ||||||
getFormDatasource(datasourceName: string)
|
||||||
|
Parameters :
Returns :
SmartDataSource
SmartDataSource |
| getFormDatasourceAsObservable | ||||||||||
getFormDatasourceAsObservable(datasourceName: string)
|
||||||||||
Type parameters :
|
||||||||||
|
Gets a data source as an observable
Parameters :
Returns :
Observable<T>
|
| getFormDataSourceRegistry |
getFormDataSourceRegistry()
|
|
Returns :
DataSourceRegistry
{DataSourceRegistry} |
| Public getFormNameFromLayoutURL |
getFormNameFromLayoutURL()
|
|
Returns the instance name of the Smart Form based on the repository layout URL. Throws an error if the layout is an object or the URL is a frontend URL.
Returns :
string
{string} |
| Public getInstanceFromName | ||||||
getInstanceFromName(name: string)
|
||||||
|
Parameters :
Returns :
AbstractFormChild
AbstractFormChild |
| Public getOwnFunction | ||||||
getOwnFunction(functionName: string)
|
||||||
|
Parameters :
Returns :
any
|
| getSmartGridEventsObservable |
getSmartGridEventsObservable(gridInstanceName: string, eventType?: any)
|
|
Returns grid events
Returns :
Observable<any>
|
| getSmartViewerEventsObservable |
getSmartViewerEventsObservable(viewerInstanceName: string, eventType?: any)
|
|
Returns viewer events
Returns :
Observable<any>
|
| Public getWrapperContainer | ||||||
getWrapperContainer(element: HTMLElement)
|
||||||
|
Parameters :
Returns :
HTMLElement
|
| Public Async handleChildLayoutChanged |
| Layout changes are now handled by the SmartLayoutContainerComponent. This method is kept for backwards compatibility. |
handleChildLayoutChanged()
|
|
Returns :
any
|
| handleComponentTypeChange | ||||||
handleComponentTypeChange(newCmpType: any)
|
||||||
|
Parameters :
Returns :
boolean
boolean |
| init |
init()
|
|
Returns :
void
|
| isInjectedDataSource | ||||||
isInjectedDataSource(dataSourceName: string)
|
||||||
|
Parameters :
Returns :
boolean
{boolean} |
| Public Async PerformAction | ||||||||||||
PerformAction(actionName: string, ...actionArgs: any[])
|
||||||||||||
|
Performs a FormAction
Parameters :
Returns :
any
|
| Async refreshBreadcrumbLabel | ||||||||
refreshBreadcrumbLabel(label?: string)
|
||||||||
|
Refreshes the breadcrumb label for the current form
Parameters :
Returns :
Promise<void>
|
| Public registerLayoutFragment | ||||||||||||
registerLayoutFragment(slotId: string, fragment: string | SmartFormConfiguration | SmartFormLayoutFragment)
|
||||||||||||
|
Loads a dynamic layout fragment into a named slot owned by this form. The fragment's data sources are merged into this form's runtime and its controls participate in this form (SSEH, TableIO, UIActions) without creating a nested smart-form (SCLNG-1677).
Parameters :
Returns :
Promise<boolean>
|
| setComponentType | ||||||
setComponentType(cmpType: unknown)
|
||||||
|
Parameters :
Returns :
void
|
| Public setDialogResult | ||||||||
setDialogResult(result: any)
|
||||||||
|
Sets the dialog result returned when the form is closed.
Parameters :
Returns :
void
|
| setFormConfiguration | ||||||
setFormConfiguration(layout: string | SmartFormConfiguration)
|
||||||
|
Parameters :
Returns :
void
|
| Public Async setFormHeight |
setFormHeight()
|
|
Returns :
any
|
| Public setFormResult | ||||||||||||
setFormResult(formResult: any, dialogResult?: any)
|
||||||||||||
|
Sets the form result returned when the form is closed.
Parameters :
Returns :
void
|
| setUpdateMode | ||||||
setUpdateMode(value: boolean)
|
||||||
|
Parameters :
Returns :
void
|
| setViewRef | ||||||
setViewRef(viewRef: ViewRef)
|
||||||
|
Parameters :
Returns :
void
|
| Public setWaitState |
setWaitState()
|
|
Returns :
void
|
| Public setWindowState | ||||||
setWindowState(state: WindowState)
|
||||||
|
Sets the floating window state, if the Smart Form has been redered in one
Parameters :
Returns :
void
|
| setWindowTitle |
setWindowTitle()
|
|
Returns :
void
|
| subscribeSmartComponentEvents |
subscribeSmartComponentEvents(instanceName: string, callback: any)
|
|
Returns :
Subscription
{Subscription} |
| subscribeToGridToolbarEvents | ||||||
subscribeToGridToolbarEvents(grid: SmartGridComponent)
|
||||||
|
Subscribes to a Smart Grid's toolbar events
Parameters :
Returns :
Subscription
|
| Public trackRuntimeDataSource | ||||||||
trackRuntimeDataSource(ds: SmartDataSource)
|
||||||||
|
Tracks a runtime-merged data source (e.g. from a dynamic layout fragment slot, SCLNG-1677) in this form's dirty-state handling so the existing unsaved-changes conventions (route-leave prompt, floating-window close prompt) cover edits made through it.
Parameters :
Returns :
void
Disposer that detaches the data source again. |
| splitView |
Type : ReplaySubject<SmartSplitPaneComponent>
|
Default value : new ReplaySubject<SmartSplitPaneComponent>()
|
| tabStripElement |
Type : ElementRef
|
Decorators :
@ViewChild(TabStripComponent, {read: ElementRef})
|
| breadcrumbInstance |
Type : SmartBreadCrumbNavigationComponent
|
| Public Readonly componentLoaded$ |
Type : EventEmitter<SmartFormComponentLoadedEventArgs>
|
Default value : new EventEmitter(null)
|
| container |
Type : ViewRef
|
Decorators :
@ViewChild('container', {read: ViewRef, static: true})
|
| containerVcRef |
Type : ViewContainerRef
|
Decorators :
@ViewChild('container', {read: ViewContainerRef, static: true})
|
| currentBrowserTitleTemplate |
Type : string
|
| datasources |
Type : SmartDataSource[]
|
Default value : []
|
| destroy$ |
Type : Subject<boolean>
|
Default value : new Subject<boolean>()
|
| disablingOverlay |
Type : HTMLDivElement
|
| flexDirection |
Type : string
|
| floatingWindowTitleBarTemplate |
Type : TemplateRef<any>
|
Decorators :
@ViewChild('floatingWindowTitleBar', {read: TemplateRef})
|
| Public formChildren |
Type : string[]
|
Default value : []
|
| formConfigurationStacked |
Type : SmartFormConfiguration
|
| formDomElement |
Type : ElementRef
|
Decorators :
@ViewChild('container', {read: ElementRef})
|
| formIsStacked |
Type : boolean
|
| formSize |
Type : string
|
| injectedFormDataSources |
Type : SmartFormDataSources
|
| Public injector |
Type : Injector
|
| inUpdateMode |
Type : EventEmitter<boolean>
|
Default value : new EventEmitter<boolean>()
|
| layoutContainer |
Type : SmartLayoutContainerComponent
|
Decorators :
@ViewChild('layoutContainer', {read: SmartLayoutContainerComponent})
|
|
Reference to the layout container component |
| Public loadedChildren |
Type : LoadedChild[]
|
Default value : []
|
| Public rippleContainerHeight |
Type : number
|
| rippleEffect |
Type : RippleContainerDirective
|
Decorators :
@HostBinding('attr.kendoRippleContainer')
|
| screenService |
Type : SmartScreenService
|
| templatePlaceholders |
Type : QueryList<SmartFormPlaceholderDirective>
|
Decorators :
@ViewChildren(SmartFormPlaceholderDirective)
|
| translationProviderService |
Type : SmartTranslationProviderService
|
<!--
**************************************************************************
* 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-form.component.html
Purpose : Template for Smart Form.
Author(s) : Radu Nicoara
Created : Dec 22, 2017
--------------------------------------------------------------------------
-->
<div class="smart-form-root">
<div #container>
@if(!!_formConfigurationSignal()) {
<div
#root
kendoRippleContainer
[disabled]="!_enableRippleEffectSignal()"
[ngClass]="_formConfigurationSignal().settings?.classList || ''">
<div #dataSourcesContainer></div>
@if (!_isChildActiveSignal()) {
<smart-layout-container
#layoutContainer
class="p-2"
[layout]="_formConfigurationSignal()"
[stretchMode]="_formConfigurationSignal().settings?.stretchMode === true"
[height]="_formHeightSignal()"
[containerClass]="_containerClassStrSignal()"
[columnClass]="_columnClassStrSignal()">
</smart-layout-container>
}
<router-outlet></router-outlet>
</div>
}
</div>
<!-- FAB Action Buttons -->
@if (visibleActionButtons().length > 0) {
<div class="smart-form-fab-container">
@for (button of visibleActionButtons(); track $index) {
<smart-fab
[smart-fab-icon]="button.icon"
[smart-fab-svg-icon]="button.svgIcon"
[smart-fab-text]="button.text"
[smart-fab-actions]="button.actions"
[smart-fab-position-mode]="'absolute'"
[smart-fab-align]="{ vertical: 'bottom', horizontal: 'end' }"
[smart-fab-offset]="{ x: '0px', y: ($index * -72) + 'px' }">
</smart-fab>
}
</div>
}
</div>
<ng-template #floatingWindowTitleBar let-win>
<div #floatingWindowTitle class="k-window-title">
@if(_formIconUrlSignal() && _iconTypeSignal() === 'image') {
<img class="form-window-icon" [src]="_formIconUrlSignal()">
}
@if(_formIconUrlSignal() && _iconTypeSignal() === 'icon') {
<i [class]="'form-window-icon ' + _formIconUrlSignal()"></i>
}
<span style="margin-left: inherit">
{{_layoutFormTitleSignal() || _formTitleSignal() || _fallbackTitleSignal() || _formRepositoryNameSignal()}}
</span>
</div>
@if(_windowStateSignal() !== 'minimized' && !isModal) {
<button
(click)="setWindowState('minimized')"
kendoButton
iconClass="fa-regular fa-window-minimize"
style="display: inline-flex"
title="Minimize"
[fillMode]="'flat'"
>
</button>
}
@if((!_windowStateSignal() || _windowStateSignal() === 'default') && !isModal) {
<button
(click)="setWindowState('maximized')"
kendoButton
iconClass="fa-regular fa-window-maximize"
style="display: inline-flex"
title="Maximize"
[fillMode]="'flat'"
>
</button>
}
@if(_windowStateSignal() === 'maximized' || _windowStateSignal() === 'minimized') {
<button
(click)="setWindowState('default')"
kendoButton
iconClass="fa-regular fa-window-restore"
style="display: inline-flex"
title="Restore"
[fillMode]="'flat'"
>
</button>
}
<button
(click)="closeWindow()"
kendoButton
iconClass="fa-solid fa-xmark"
style="display: inline-flex"
title="Close"
[fillMode]="'flat'"
>
</button>
</ng-template>
../ui/form/smart-form.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 : smart-form.component.css
Purpose : Styles for Smart Form.
Author(s) : Radu Nicoara
Created : Jan 15, 2018
----------------------------------------------------------------------*/
::ng-deep FormItem {
display: block;
}
::ng-deep .form-column.vertical-stretch {
display: flex !important;
height: 100% !important;
}
::ng-deep .k-ripple-container {
padding: var(--kendo-spacing-2.5, 0.625rem) 0px;
}
::ng-deep .container-fluid > .row.smart-form-row {
display: block;
flex-direction: unset;
}
::ng-deep .container-fluid > .row.smart-form-row > formcolumn {
padding-inline-start: 0px;
padding-inline-end: 0px;
display: block;
height: 100% !important;
}
/* Only apply overflow-y: auto when NOT in stretch mode */
::ng-deep .container-fluid:not(.stretch-mode) > .row.smart-form-row > formcolumn {
overflow-y: auto !important;
}
::ng-deep .k-window .k-window-titlebar .k-window-actions.floating-window-buttons .k-button:nth-of-type(1),
::ng-deep .k-window .k-window-titlebar .k-window-actions.floating-window-buttons .k-button:nth-of-type(2) {
visibility: visible !important;
}
::ng-deep .unsaved-changes-warning-dialog {
z-index: 100000 !important;
}
::ng-deep .smart-form-dirty-state > div {
border: 1px solid var(--kendo-color-error, #dc3545);
}
::ng-deep * {
font-family: var(--kendo-font-family, "Segoe UI", "Helvetica Neue", Arial, sans-serif);
}
::ng-deep .form-window-icon {
margin-right: var(--kendo-spacing-2, 0.5rem);
}
::ng-deep img.form-window-icon {
width: var(--kendo-spacing-4, 1rem);
height: var(--kendo-spacing-4, 1rem);
object-fit: contain;
vertical-align: middle;
}
.smart-form-root {
position: relative;
height: 100%;
}
.smart-form-fab-container {
position: absolute;
bottom: 16px;
right: 16px;
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 12px;
z-index: 100;
pointer-events: none;
}
.smart-form-fab-container smart-fab {
pointer-events: auto;
}
./smart-developer-tools.form.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-developer-tools.form.scss
Purpose : Styles for Smart Developer Tools form.
Author(s) : Radu Nicoara
Created : Sep 11, 2025
----------------------------------------------------------------------*/
kendo-tabstrip {
height: 100% !important;
width: 100% !important;
}
.form-column.vertical-stretch {
width: 100% !important;
}
:host {
height: 100% !important;
width: 100% !important;
display: block !important;
& > div {
height: 100% !important;
width: 100% !important;
display: block !important;
& > div {
height: 100% !important;
width: 100% !important;
display: block !important;
& > div.k-ripple-container {
height: 100% !important;
width: 100% !important;
display: block !important;
}
}
}
}