UnifiedStateManager
FitFileViewer - API Documentation v29.4.0
FitFileViewer - API Documentation / utils/state/core/unifiedStateManager / UnifiedStateManager
Class: UnifiedStateManager
Defined in: utils/state/core/unifiedStateManager.js:33
Unified State Manager - Single interface for all state systems Provides consistency during migration from legacy to new state management
Constructorsβ
Constructorβ
new UnifiedStateManager():
UnifiedStateManager
Defined in: utils/state/core/unifiedStateManager.js:34
Returnsβ
UnifiedStateManager
Propertiesβ
legacyWarningsShownβ
legacyWarningsShown:
Set<any>
Defined in: utils/state/core/unifiedStateManager.js:35
syncEnabledβ
syncEnabled:
boolean
Defined in: utils/state/core/unifiedStateManager.js:36
debugModeβ
debugMode:
boolean
Defined in: utils/state/core/unifiedStateManager.js:37
Methodsβ
disableDebugMode()β
disableDebugMode():
void
Defined in: utils/state/core/unifiedStateManager.js:43
Disable debug mode
Returnsβ
void
enableDebugMode()β
enableDebugMode():
void
Defined in: utils/state/core/unifiedStateManager.js:50
Enable debug mode for state management
Returnsβ
void
get()β
get(
path:string,defaultValue?:any):any
Defined in: utils/state/core/unifiedStateManager.js:61
Get state value with unified interface
Parametersβ
pathβ
string
State path (dot notation)
defaultValue?β
any
Default value if not found
Returnsβ
any
State value
getLegacyState()β
privategetLegacyState(path:string,defaultValue:any):any
Defined in: utils/state/core/unifiedStateManager.js:82
Get legacy state with fallback handling
Parametersβ
pathβ
string
State path
defaultValueβ
any
Default value
Returnsβ
any
State value
getSnapshot()β
getSnapshot():
Object
Defined in: utils/state/core/unifiedStateManager.js:108
Get current state snapshot for debugging
Returnsβ
Object
State snapshot
isLegacyPath()β
isLegacyPath(
path:string):boolean
Defined in: utils/state/core/unifiedStateManager.js:123
Check if a path belongs to legacy state system
Parametersβ
pathβ
string
State path to check
Returnsβ
boolean
True if legacy path
set()β
set(
path:string,value:any,options?:UnifiedStateOptions):void
Defined in: utils/state/core/unifiedStateManager.js:134
Set state value with unified interface
Parametersβ
pathβ
string
State path (dot notation)
valueβ
any
Value to set
options?β
UnifiedStateOptions = {}
Set options
Returnsβ
void
setLegacyState()β
privatesetLegacyState(path:string,value:any,_options:UnifiedStateOptions):void
Defined in: utils/state/core/unifiedStateManager.js:169
Set legacy state with fallback handling
Parametersβ
pathβ
string
State path
valueβ
any
Value to set *
_optionsβ
Set options (currently unused)
Returnsβ
void
setSyncEnabled()β
setSyncEnabled(
enabled:boolean):void
Defined in: utils/state/core/unifiedStateManager.js:191
Enable or disable legacy system synchronization
Parametersβ
enabledβ
boolean
Whether to enable sync
Returnsβ
void
subscribe()β
subscribe(
path:string,callback:Function):Function
Defined in: utils/state/core/unifiedStateManager.js:204
Subscribe to state changes with unified interface
Parametersβ
pathβ
string
State path to watch (* for all)
callbackβ
Function
Callback function
Returnsβ
Function
Unsubscribe function
validateConsistency()β
validateConsistency():
Object
Defined in: utils/state/core/unifiedStateManager.js:217
Validate state consistency across systems
Returnsβ
Object
Validation results