src/ui/form/smart-layout-fragment.service.ts
Form-scoped engine for the dynamic layout fragment slots introduced in SCLNG-1677. Owns the runtime merge/unmerge of a fragment's data sources and databound-control expectations into/out of the parent Smart Form, and keeps the parent toolbars consistent across slot swaps. The visual rendering is owned by the SmartDynamicLayoutSlotComponent host.
Properties |
|
Methods |
| clearFragment | ||||||||
clearFragment(slotId: string)
|
||||||||
|
Clears the content of the named slot.
Parameters :
Returns :
void
|
| isFragmentLoaded | ||||||||||||
isFragmentLoaded(slotId: string, source: string | SmartFormConfiguration | SmartFormLayoutFragment)
|
||||||||||||
|
Returns whether the given source is currently loaded in a slot.
Parameters :
Returns :
boolean
|
| Async loadFragment | ||||||||||||||||
loadFragment(slotId: string, source: string | SmartFormConfiguration | SmartFormLayoutFragment, options?: SmartLayoutFragmentLoadOptions)
|
||||||||||||||||
|
Loads a layout fragment into the named slot. This is the public API the parent form (and its logic classes) call to drive a slot.
Parameters :
Returns :
Promise<boolean>
|
| mergeFragmentDataSources | ||||||||||||||||
mergeFragmentDataSources(slotId: string, fragment: SmartFormConfiguration | SmartFormLayoutFragment, host: ISmartLayoutFragmentSlotHost)
|
||||||||||||||||
|
Merges a fragment's data sources into the parent form runtime and feeds the fragment's expected databound controls. Called by the slot host before the fragment controls render.
Parameters :
Returns :
boolean
|
| registerSlot | ||||||||||||
registerSlot(slotId: string, host: ISmartLayoutFragmentSlotHost)
|
||||||||||||
|
Registers a slot host so the form can drive it by slot id.
Parameters :
Returns :
void
|
| releaseSlot | ||||||||||||
releaseSlot(slotId: string, host?: ISmartLayoutFragmentSlotHost)
|
||||||||||||
|
Releases a previously registered slot host and removes any remaining fragment expectations it contributed.
Parameters :
Returns :
void
|
| slotOwnsDataSource | ||||||||||||
slotOwnsDataSource(slotId: string, dataSourceName: string)
|
||||||||||||
|
Returns whether the currently loaded fragment in the slot owns the given data source.
Parameters :
Returns :
boolean
|
| unmergeFragmentDataSources | ||||||||||||
unmergeFragmentDataSources(slotId: string, host: ISmartLayoutFragmentSlotHost)
|
||||||||||||
|
Unmerges a slot's data sources and databound-control expectations from the parent form runtime and revalidates the toolbars' active TableIO targets.
Parameters :
Returns :
void
|
| Readonly slotCleared$ |
Type : unknown
|
Default value : this.slotClearedSubject.asObservable()
|
| Readonly slotReleased$ |
Type : unknown
|
Default value : this.slotReleasedSubject.asObservable()
|