Constructor
new ViewPanelsManager(args)
Start here. Implement ViewPanelManager.buildFromQueries. Cascades to children
Parameters:
Name | Type | Description |
---|---|---|
args |
ViewPanelsManagerConstructorArgs |
Members
fragmentLifeCycleObject
mainViewPanelBuildPipeline
masterViewPanelInfoUtils
panelNameDefinitions :PanelNameDefinitions
Type:
- PanelNameDefinitions
routeWatchQueries :OrderedViewPanelsManagerWatchQueries
Type:
- OrderedViewPanelsManagerWatchQueries
Methods
closeViewPanel()
Call this to close a view panel. Can be triggered by a panel or host
Consents first
ONLY USE FOR PANELS NOT ROUTEBUILT. Else, effect an actual route change
destroyAllViewPanels()
Called by fragment on fragment destroy to destroy all view panels (route built or not) as well
Happens in order of exclusive key map stack. Not copy, but actual since destroying. Must be cleared and activeViewPanels map on end
directOpenViewPanel()
Works same as open view panel by name, however, this view panel not in panelNameDefinitions
findMatchingRootViewPanelInfo(query_PanelName) → {MatchingRootViewPanelInfo}
Finds the matching root view panel tree
Uses queries in RouteParams. NOT the processed changed queries
For panel name, just send panel name in query format
CONTINUE FROM HERE. ALGO UPDATED SO DESTROY CAN WORK BASED ON ROUTE CHANGE INFO
OKAY, Need routeBuildInfo polyfilled to ? or work based on known context or key for route build routeBuild?
Yes. Better than extra redundant fields.
So polyfill, have value as getter, and use in logic
Parameters:
Name | Type | Description |
---|---|---|
query_PanelName |
RouteQueryData |
Throws:
Error finding matching watch query entry. Either no query has been passed or query missing
Returns:
- Type
- MatchingRootViewPanelInfo
getViewPanelsConsent()
CALLED EXTERNALLY
Use this to check which view panels are changing
Updated query none, all should destroy (should work with those inflated without actually running that query in the browser)
Otherwise, find changed ones and ask for consent plus state (use frag algo)
With new frag algo, all active consenting
Also, this is for route builds. So, if fragment not destroying, only view panels affected by route change will consent. Others assumed not to be in route?
Wrong assumption. What if route params no longer exist?
Need to mark a view panel in info as routeBuilt or independent (!routeBuilt)
Therefore, if fragment not destroying, those with changing queries (based on data or not being in data)
and routeBuilt destroyed based on changes
openViewPanel() → {string}
Open routeBuilt view panels. Uses OrderedViewPanelsManagerWatchQueries to select the view panel to open
- Source:
- To Do:
-
- *************
Returns:
inflationID - value of context basically
Flow algo like pipeline.
*************
CONSIDER - Using the algo here to inflate fragments. So, maintain a route stack. Sounds nice. Cause this algo is much simple imo
- Type
- string
openViewPanelByName()
Directly opens a view panel by name. These view panels are NOT route built
requestFullRoute()
requestRouteToQuery()
IMPLEMENT FAIL CB IN PIPELINE? BUT MESSAGE SENT IF CONSENT FAILED BY CONSENTER. SEE NO NEED