File

src/ui/layout-container/smart-dynamic-layout-slot.component.ts

Description

Renders a fetched (or already loaded) Smart Form layout fragment into a named slot inside the current smart-form without creating a nested smart-form.

The fragment's dataSources are merged into the parent form runtime (owned by the form-scoped SmartLayoutFragmentService) and its columns/rows are rendered through smart-layout-container, so the fragment controls behave as first-class members of the parent form for SSEH, TableIO and UIActions.

Extends

AbstractDataSourcesContainerComponent

Implements

AfterViewInit OnDestroy ISmartLayoutFragmentSlotHost

Metadata

Index

Methods
Inputs
Outputs

Inputs

columnClass
Type : string
Default value : ''
containerClass
Type : string
Default value : ''
height
Type : number
layout
Type : SmartFormConfiguration | SmartFormLayoutFragment

An already loaded layout object to render instead of fetching from a URL.

layoutUrl
Type : string

Layout URL to fetch and render. Resolved the same way as smart-form layout URLs (absolute, leading-slash backend, or relative form name).

slotId
Type : string

Stable identifier used by the parent form to scope registrations and cleanup for this slot.

sourceTree
Type : string

Optional instance name of the tree whose selection drives this slot. Used by tree-view form support (SCLNG-1678); harmless otherwise.

stretchMode
Type : boolean
Default value : false

Outputs

fragmentCleared
Type : EventEmitter
fragmentLoaded
Type : EventEmitter
fragmentLoadError
Type : EventEmitter
fragmentLoading
Type : EventEmitter
dataSourcesContainerLoaded$
Type : ReplaySubject<void>

Methods

Public clearContent
clearContent()

Destroys the slot's currently rendered views and unmerges its data sources from the parent form runtime.

Returns : void
Public handleLayoutChange
handleLayoutChange(styling: any)

Applies parent stretch-mode sizing to the slot host.

Parameters :
Name Type Optional Description
styling any No

The computed stretch-mode layout data.

Returns : void
Public Async load
load(source: string | SmartFormConfiguration | SmartFormLayoutFragment)

Loads a layout fragment from a URL or an already loaded layout object and renders it into this slot, replacing any previous content.

Parameters :
Name Type Optional Description
source string | SmartFormConfiguration | SmartFormLayoutFragment No
  • The fragment URL or layout object.
Returns : Promise<boolean>
Public Async loadContent
loadContent(source: string | SmartFormConfiguration | SmartFormLayoutFragment)

Loads a layout fragment into this slot without updating service state.

Parameters :
Name Type Optional Description
source string | SmartFormConfiguration | SmartFormLayoutFragment No
  • The fragment URL or layout object.
Returns : Promise<boolean>
<!--
**************************************************************************
* 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-dynamic-layout-slot.component.html
    Purpose     : Template for the dynamic layout fragment slot host.
    Author(s)   : Radu Nicoara
    Created     : Jun 30, 2026
--------------------------------------------------------------------------
-->
@if (fragmentLoadingSignal()) {
<div class="smart-dynamic-layout-slot-skeleton">
	<div class="skeleton-toolbar">
		<kendo-skeleton
			shape="rectangle"
			[width]="'100%'"
			[height]="'40px'"
			animation="wave"
		></kendo-skeleton>
	</div>
	<div class="skeleton-content">
		@for (row of [1, 2, 3, 4, 5, 6]; track row) {
		<div class="skeleton-row">
			<kendo-skeleton
				shape="rectangle"
				[width]="'100%'"
				[height]="'32px'"
				animation="wave"
			></kendo-skeleton>
		</div>
		}
	</div>
</div>
}
<!-- Hosts the merged fragment data source components -->
<ng-container #dataSourcesContainer></ng-container>
<!-- Hosts the smart-layout-container rendering the fragment columns/rows -->
<ng-container #layoutContainer></ng-container>

./smart-dynamic-layout-slot.component.scss

:host {
	display: block;
	width: 100%;
	height: 100%;
}

.smart-dynamic-layout-slot-skeleton {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	gap: var(--kendo-spacing-2, 0.5rem);
	padding: var(--kendo-spacing-2, 0.5rem);
	box-sizing: border-box;
	overflow: hidden;
}

.smart-dynamic-layout-slot-skeleton .skeleton-content {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: var(--kendo-spacing-2, 0.5rem);
	overflow: hidden;
}

.smart-dynamic-layout-slot-skeleton .skeleton-row {
	width: 100%;
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""