PageOrchestratorComponent
| Decorators: | @Component |
| Selectors: | div[ |
PageOrchestrator manages page navigation and visibility for paged forms. It acts as an intermediary between the DynamicForm component and PageField components, handling page state management and navigation events without interfering with form data.
This component uses declarative rendering with @defer blocks for optimal performance, ensuring that non-visible pages are lazily loaded only when needed.
Key responsibilities:
- Manage current page index state
- Handle navigation events (next/previous)
- Declaratively render pages with deferred loading
- Emit page change events
- Validate navigation boundaries
Constructor
No documentation has been provided. |
Presentation |
Properties
| Name | Type | Description |
|---|---|---|
| currentPageValid r | Signal<boolean> | Signal indicating whether all fields on the current page are valid. This is used by next page buttons to determine their disabled state. Returns |
| extendedFieldSignalContext r | Signal<{ currentPageValid: Signal<boolean>; injector: Injector; value: WritableSignal<Partial<any> | undefined>; defaultValues: () => any; form: FieldTree<any>; defaultValidationMessages?: | Extended field signal context that includes currentPageValid. This extends the parent context from DynamicForm with page-specific information needed by button mappers (e.g., next button needs to know if the current page is valid). |
| fieldSignalContext | InputSignal< | Field signal context for child fields |
| form | InputSignal<FieldTree<unknown>> | Root form instance from parent DynamicForm. Uses FieldTree |
| pageFields | InputSignal< | Array of page field definitions to render |
| pageHiddenStates r | Signal<boolean[]> | Computed signal that tracks which pages are hidden. Returns an array of booleans where true means the page is hidden. This signal is reactive and will re-evaluate when form values change. |
| state r | Signal< | Computed state for the orchestrator |
| visiblePageIndices r | Signal<number[]> | Computed signal that returns indices of visible (non-hidden) pages. This is used for navigation to skip hidden pages. |
Methods
navigateToNextPage() |
|---|
Navigate to the next visible page, skipping hidden pages. |
Presentation |
Returns |
navigateToPage() | ||||||
|---|---|---|---|---|---|---|
Navigate to a specific page index | ||||||
Presentation | ||||||
Parameters
Returns |
navigateToPreviousPage() |
|---|
Navigate to the previous visible page, skipping hidden pages. |
Presentation |
Returns |
Example usage
<div page-orchestrator
[pageFields]="pageFields"
[form]="form"
[fieldSignalContext]="fieldSignalContext"
[config]="orchestratorConfig"
(pageChanged)="onPageChanged($event)"
(navigationStateChanged)="onNavigationStateChanged($event)">
</div>