Set the metadata provider this service should use. When unset, falls back to Metadata.Provider.
Collapse all sections for an entity.
The entity name
Array of all section keys to collapse
Expand all sections for an entity.
The entity name
Array of all section keys to expand
Get the current state value for an entity.
The entity name
Current form state
Get the count of expanded sections.
The entity name
Array of section keys to check
Number of expanded sections
Get the custom section order for an entity.
The entity name
Array of section keys in user's preferred order, or undefined if using default order
Get the persisted panel height for a section.
The entity name
The section key
Panel height in pixels, or undefined if no custom height is set
Get section state, returning defaults if section doesn't exist yet.
The entity name
The section key
Section state with defaults applied
Get showEmptyFields preference for an entity.
The entity name
Whether to show empty fields
Get the observable state for an entity. Automatically loads from User Settings on first access.
The entity name
Observable of the form state
Get form width mode.
The entity name
Width mode ('centered' or 'full-width')
Check if a custom section order exists for an entity.
The entity name
True if custom order exists
Whether this entity has had an EXPLICIT widthMode set via the toolbar
width-toggle (and thus the user's choice should win over component
defaults). Returns false for pre-existing persisted blobs that had a
default widthMode serialized as a side effect of other state saves.
Initialize state for an entity by loading from User Settings. Call this when a form component initializes.
The entity name
Check if a section is expanded.
The entity name
The section key
OptionaldefaultExpanded: booleanOptional default value to use when no persisted state exists (defaults to DEFAULT_SECTION_STATE.isExpanded)
True if expanded
Reset the section order to default (removes custom ordering).
The entity name
Reset state to defaults for an entity.
The entity name
Set edit mode for an entity. While in edit mode, state changes update the in-memory BehaviorSubject (so the UI stays reactive) but skip database persistence. When edit mode ends, a single save is queued to persist the final layout state.
The entity name
Whether the form is entering (true) or exiting (false) edit mode
Set section expanded state.
The entity name
The section key
Whether the section is expanded
Set the custom section order for an entity.
The entity name
Array of section keys in the desired order
Set the panel height for a section (persisted to User Settings).
The entity name
The section key
Panel height in pixels
Set showEmptyFields preference for an entity.
The entity name
Whether to show empty fields
Set form width mode. Marks the preference as explicit so it wins over
any component-level default in BaseFormComponent.getFormWidthMode.
Toggle section expanded state.
The entity name
The section key
Toggle form width mode between centered and full-width.
The entity name
Service for managing form state persistence per entity. State is stored in the User Settings entity and shared reactively across all form instances for the same entity.