src/smart-developer-tools/smart-developer-tools.form.ts
selector | smart-developer-tools |
styleUrls | ../ui/form/smart-form.component.css, |
templateUrl | ../ui/form/smart-form.component.html |
viewProviders |
|
constructor(injector: Injector)
|
||||||
Parameters :
|
Public addFormChild | ||||
addFormChild(item)
|
||||
Parameters :
Returns :
void
|
Public checkForTooTallElements | ||||
checkForTooTallElements(column)
|
||||
Parameters :
Returns :
void
|
Public checkIfAllChildrenLoaded |
checkIfAllChildrenLoaded()
|
Returns :
boolean
boolean |
Public checkIfStacked |
checkIfStacked()
|
Returns :
boolean
|
checkTabFolders |
checkTabFolders()
|
Returns :
void
|
Public closeWindow |
closeWindow()
|
Closes the floating window, if the Smart Form has been rendered in one
Returns :
void
|
Public componentLoaded | |||||||||
componentLoaded(instanceName: string, componentInstance: AbstractFormChild)
|
|||||||||
Parameters :
Returns :
void
|
Public composeFormStretchInfo | ||||
composeFormStretchInfo(container)
|
||||
Parameters :
Returns :
void
|
Public computeContainerStretchInfo | ||||
computeContainerStretchInfo(container)
|
||||
Parameters :
Returns :
void
|
Public computeFormChildren |
computeFormChildren()
|
Returns :
void
|
Public computeFormItemPadding | ||||||
computeFormItemPadding(elem: HTMLElement)
|
||||||
Parameters :
Returns :
any
|
Public Async computeHeights |
computeHeights()
|
Returns :
any
|
Public Async computeHeightsInWindow |
computeHeightsInWindow()
|
Returns :
any
|
getCurrentViewInjector |
getCurrentViewInjector()
|
Returns :
Injector
Injector |
Public getElementHeightFromInstanceName | ||||||||
getElementHeightFromInstanceName(instanceName: string)
|
||||||||
Parameters :
Returns :
number
The height of the Smart Form Item, including padding. |
getFormDatasource | ||||||
getFormDatasource(datasourceName: string)
|
||||||
Parameters :
Returns :
SmartDataSource
SmartDataSource |
getFormDatasourceAsObservable | ||||||
getFormDatasourceAsObservable(datasourceName: string)
|
||||||
Parameters :
Returns :
Observable<SmartDataSource>
|
Public getInstanceFromName | ||||||
getInstanceFromName(name: string)
|
||||||
Parameters :
Returns :
AbstractFormChild
AbstractFormChild |
Public getWrapperContainer | ||||||
getWrapperContainer(element: HTMLElement)
|
||||||
Parameters :
Returns :
HTMLElement
|
Public handleChildLayoutChanged |
handleChildLayoutChanged()
|
Re-calculates the heights for stretch-mode and re-evaluates the flex direction for form columns
Returns :
void
|
handleComponentTypeChange | ||||||
handleComponentTypeChange(newCmpType: any)
|
||||||
Parameters :
Returns :
boolean
boolean |
init |
init()
|
Returns :
void
|
setComponentType | ||||
setComponentType(cmpType)
|
||||
Parameters :
Returns :
void
|
Public setFlexDirection |
setFlexDirection()
|
Returns :
void
|
setFormConfiguration | ||||||
setFormConfiguration(layout: string | SmartFormConfiguration)
|
||||||
Parameters :
Returns :
void
|
Public setFormHeight | ||||||
setFormHeight(formElement: HTMLElement)
|
||||||
Parameters :
Returns :
void
|
Public setHeightsOnContainer | ||||
setHeightsOnContainer(container)
|
||||
Parameters :
Returns :
void
|
setUpdateMode | ||||||
setUpdateMode(value: boolean)
|
||||||
Parameters :
Returns :
void
|
setViewRef | ||||||
setViewRef(viewRef: ViewRef)
|
||||||
Parameters :
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
|
Public updateToStackFormConfiguration |
updateToStackFormConfiguration()
|
Returns :
void
|
breadcrumbInstance |
Type : SmartBreadCrumbNavigationComponent
|
columnWidthCssClass |
Type : string
|
container |
Type : ViewRef
|
Decorators :
@ViewChild('container', {read: ViewRef, static: true})
|
containerSize |
Type : WindowSize
|
containerVcRef |
Type : ViewContainerRef
|
Decorators :
@ViewChild('container', {read: ViewContainerRef, static: true})
|
flexDirection |
Type : string
|
floatingWindowTitleBarTemplate |
Type : TemplateRef<any>
|
Decorators :
@ViewChild('floatingWindowTitleBar', {read: TemplateRef})
|
Public formChildren |
Type : string[]
|
Default value : []
|
formConfiguration |
Type : SmartFormConfiguration
|
formConfigurationStacked |
Type : SmartFormConfiguration
|
formDomElement |
Type : ElementRef
|
Decorators :
@ViewChild('container', {read: ElementRef})
|
Public formHeight |
Type : number
|
formIconUrl |
Type : SafeResourceUrl
|
formIsStacked |
Type : boolean
|
formSize |
Type : string
|
formTitle |
Type : string
|
Public injector |
Type : Injector
|
inUpdateMode |
Type : EventEmitter<boolean>
|
Default value : new EventEmitter<boolean>()
|
Public loadedChildren |
Type : literal type[]
|
Default value : []
|
maxNonStretchHeight |
Type : number
|
Default value : 0
|
Public nonStretchHeight |
Type : number
|
Public rippleContainerHeight |
Type : number
|
rootView |
Type : ViewContainerRef
|
Decorators :
@ViewChild('root', {read: ViewContainerRef})
|
screenService |
Type : SmartScreenService
|
Public stretchableCount |
Type : number
|
Public stretchElemHeight |
Type : number
|
templatePlaceholders |
Type : QueryList<SmartFormPlaceholderDirective>
|
Decorators :
@ViewChildren(SmartFormPlaceholderDirective)
|
<div #container>
<div
#root
*ngIf="!!formConfiguration"
kendoRippleContainer
[disabled]="!enableRippleEffect"
[ngClass]="formConfiguration.settings.classList"
[ngStyle]="formConfiguration.settings.style">
<ng-container *ngIf="!isChildActive">
<!-- data sources configuration -->
<smart-data-source
*ngFor="let datasource of formConfiguration.dataSources"
[smart-server-side-filtering]="datasource.serverSideFiltering"
[smart-server-side-sorting]="datasource.serverSideSorting"
[smart-instance-name]="datasource.instanceName"
[smart-object-name]="datasource.objectName"
[smart-business-entity-name]="datasource.entityName"
[smart-entity-table]="datasource.tableRef"
[smart-entity-view]="datasource.entityView"
[smart-filter]="datasource.initialFilter || datasource.smartFilter"
[smart-sort]="datasource.initialSort"
[smart-data-source]="datasource.parentDataSource"
[smart-foreign-fields]="datasource.foreignFields"
[smart-navigation-source]="datasource.navigationSource"
[use-initial-values]="datasource.useInitialValues"
[smart-filter-source]="datasource.filterSource"
[smart-auto-fetch]="datasource.autoFetch"
[smart-partial-dataset]="datasource.partialDataset">
</smart-data-source>
<ng-container *ngIf="!!formConfiguration.rows && !formConfiguration.columns">
<div class="container-fluid">
<div class="row smart-form-row" *ngFor="let row of formConfiguration.rows">
<FormColumn
*ngFor="let column of row.items"
[class]="column.widthClass"
[formItems]="[column]">
</FormColumn>
</div>
</div>
</ng-container>
<ng-container *ngIf="!!formConfiguration.columns && !formConfiguration.rows">
<div class="container-fluid">
<div class="row smart-form-row" [ngStyle]="{ flexDirection: flexDirection ? flexDirection : 'row', display: 'flex' }" >
<FormColumn
*ngFor="let column of formConfiguration.columns"
[class]=" flexDirection === 'column' ? 'w-100' : columnWidthCssClass"
[formItems]="column.items">
</FormColumn>
</div>
</div>
</ng-container>
</ng-container>
<smart-form-outlet *ngIf="isChildActive"></smart-form-outlet>
</div>
</div>
<ng-template #floatingWindowTitleBar let-win>
<div class="k-window-title">
<img *ngIf="formIconUrl" class="form-window-icon" [src]="formIconUrl">
<span [ngStyle]="{ marginLeft: formIconUrl ? '20px' : 'inherit' }">
{{formTitle}}
</span>
</div>
<div class="k-window-actions">
<button
(click)="setWindowState('minimized')"
[hidden]="windowHelperService.windowRef.window.instance.state === 'minimized'"
class="k-button-icon k-button k-bare"
role="button"
title="Minimize"
aria-label="Minimize"
aria-disabled="false" dir="ltr" type="button"
style="display: inline-flex;">
<span class="k-icon k-i-window-minimize" role="presentation"></span>
</button>
<button
[hidden]="windowHelperService.windowRef.window.instance.state === 'minimized' || windowHelperService.windowRef.window.instance.state === 'maximized'"
(click)="setWindowState('maximized')"
class="k-button-icon k-button k-bare"
role="button"
title="Maximize"
aria-label="Maximize"
aria-disabled="false" dir="ltr" type="button"
style="display: inline-flex;">
<span class="k-icon k-i-window-maximize" role="presentation"></span>
</button>
<button
[hidden]="!(windowHelperService.windowRef.window.instance.state === 'minimized' || windowHelperService.windowRef.window.instance.state === 'maximized')"
(click)="setWindowState('default')"
class="k-button-icon k-button k-bare"
role="button"
title="Restore"
aria-label="Restore"
aria-disabled="false" dir="ltr" type="button"
style="display: inline-flex;">
<span class="k-icon k-i-window-restore" role="presentation"></span>
</button>
<button
(click)="closeWindow()"
class="k-button-icon k-button k-bare"
role="button"
title="Close"
aria-label="Close"
aria-disabled="false" dir="ltr" type="button"
style="display: inline-flex;">
<span class="k-icon k-i-close" role="presentation"></span>
</button>
</div>
</ng-template>
../ui/form/smart-form.component.css
::ng-deep FormItem {
padding-left: 5px !important;
padding-right: 5px !important;
display: block;
}
::ng-deep .k-ripple-container {
padding: 10px 0px;
}
::ng-deep .container-fluid > .row.smart-form-row {
display: block;
flex-direction: unset;
}
::ng-deep .container-fluid > .row.smart-form-row > formcolumn {
overflow-y: auto !important;
}
./smart-developer-tools.form.css