new ViewPanel(args)
Parameters:
Name | Type | Description |
---|---|---|
args |
ExtViewPanelConstructorArgs |
Members
contentRootViewNode :HTMLElement
Type:
- HTMLElement
currentlyActiveBaseRoute :string
Type:
- string
currentlyActiveFullQuery :string
Type:
- string
currentlyActiveFullQuery
Server-side rendering of view panels NOT allowed. So, directly calls, asking for view template.
currentlyActivePanelNavId :string
Type:
- string
dataResponseHostPipeline :genericParamFunction.<HOST_PIPELINE_DATA>
USE THIS PIPELINE ONLY TO PASS DATA. AND CHOOSE HOW YOU WILL DESTROY PANEL LATER. Internally or externally by invoking manager
Type:
- genericParamFunction.<HOST_PIPELINE_DATA>
globalInflationID :string
Type:
- string
localRoutingInfos :Array.<LocalViewPanelRoutingInfo>
Type:
- Array.<LocalViewPanelRoutingInfo>
panelQuery :string
The query to read value from. Also, one to read savedState from?
Type:
- string
panelRootViewNode :HTMLElement
Type:
- HTMLElement
updateQueryList :GenericRouteQueryData.<{}>
Type:
- GenericRouteQueryData.<{}>
viewPanelsManager :ViewPanelsManagerInstance
Use it to invoke another panel build? Yea. Call it openViewPanelByRoute if route-based
Otherwise, use normal invocation (no route changes, but full build process)
Type:
- ViewPanelsManagerInstance
Methods
bindLocalRoutingInfoToNavigation(launchParams, buildStageArgs)
Parameters:
Name | Type | Description |
---|---|---|
launchParams |
LaunchViewPanelParams.<{}, {}> | |
buildStageArgs |
ViewPanelBuildStagesArgs |
bindNewViewPanelUIToDOM(launchParams, buildStageArgs, cb)
Internal. Don't override
This should not be an asynchronous call
Parameters:
Name | Type | Description |
---|---|---|
launchParams |
LaunchViewPanelParams.<LAUNCH_DATA, HOST_PIPELINE_DATA> | |
buildStageArgs |
ViewPanelBuildStagesArgs | |
cb |
genericFunction |
bindPanelViewUIToListeners()
DO NOT OVERRIDE. Use onViewPanelUIBind
checkQueryUpdates(routeParams)
Leave implementation as super
Parameters:
Name | Type | Description |
---|---|---|
routeParams |
RouteParams |
destroyViewPanel(cb)
Parameters:
Name | Type | Description |
---|---|---|
cb |
genericFunction |
detachPanelViewFromDOM(pipelineCb)
Parameters:
Name | Type | Description |
---|---|---|
pipelineCb |
genericFunction |
getCloseTransitionsData_Workers_Queue() → {TransitionsManagerRunArgs.<{}>}
Returns:
- Type
- TransitionsManagerRunArgs.<{}>
getLaunchTransitionsData_Workers_Queue(launchParams, buildStageArgs) → {TransitionsManagerRunArgs.<{}>}
Parameters:
Name | Type | Description |
---|---|---|
launchParams |
LaunchViewPanelParams.<LAUNCH_DATA, HOST_PIPELINE_DATA> | |
buildStageArgs |
ViewPanelBuildStagesArgs |
Returns:
- Type
- TransitionsManagerRunArgs.<{}>
getLifeCycleObject() → {FragmentLifeCycleInstance}
Returns:
- Type
- FragmentLifeCycleInstance
getSpecSavedState(savedState, target) → {ExtSpecSavedFragmentState}
Parameters:
Name | Type | Description |
---|---|---|
savedState |
SavedFragmentState | |
target |
string |
Returns:
- Type
- ExtSpecSavedFragmentState
getViewPanelState() → {SavedFragmentState}
Override and call super to add your own properties
Returns:
- Type
- SavedFragmentState
(async) initializePanelView(launchParams, buildStageArgs, localPipelineCb)
Initializes the view for the view panel. You can source it remotely using a promise (you must wait for this promise)
or use a template already shipped in the code
Override and use appropriately
Finally, call onViewInitSuccess with the view as a buildStageArgs in plain text html
Parameters:
Name | Type | Description |
---|---|---|
launchParams |
LaunchViewPanelParams.<LAUNCH_DATA, HOST_PIPELINE_DATA> | |
buildStageArgs |
ViewPanelBuildStagesArgs | |
localPipelineCb |
genericParamFunction.<ViewPanelBuildStagesArgs> |
isViewPanelContentViewInitialized() → {boolean}
Tells if the content view has been initialized
Returns:
- Type
- boolean
isViewPanelRootViewInitialized() → {boolean}
Tells if root view of the panel has been initialized
Automatically tells if part of DOM. So, as long as you add it with the right ID, done!
Have a utils class that ensures IDs are not repeated? Developer be careful for now
Returns:
- Type
- boolean
loadRemoteViewPanelUI(reqOptions) → {Promise.<string>}
Loads a remote UI resource in plain text
Parameters:
Name | Type | Description |
---|---|---|
reqOptions |
RequestOptions |
Returns:
A promise that resolves with the ui template in plain text html
- Type
- Promise.<string>
maintainViewPanel(pipelineCb)
Parameters:
Name | Type | Description |
---|---|---|
pipelineCb |
getViewPanelConsentCb |
normalizeUpdateQueryList(updateQueryList)
Parameters:
Name | Type | Description |
---|---|---|
updateQueryList |
GenericRouteQueryData.<{}> |
onBindPanelView(launchParams, buildStageArgs, localPipelineCb)
Parameters:
Name | Type | Description |
---|---|---|
launchParams |
LaunchViewPanelParams.<LAUNCH_DATA, HOST_PIPELINE_DATA> | |
buildStageArgs |
ViewPanelBuildStagesArgs | |
localPipelineCb |
genericParamFunction.<ViewPanelBuildStagesArgs> |
onBindPanelViewUtils()
onInitPanelView(launchParams, buildStageArgs, localPipelineCb)
Initializes the panel view - loads the content view of the panel. Not bound yet
Parameters:
Name | Type | Description |
---|---|---|
launchParams |
LaunchViewPanelParams.<LAUNCH_DATA, HOST_PIPELINE_DATA> | |
buildStageArgs |
ViewPanelBuildStagesArgs | |
localPipelineCb |
genericParamFunction.<ViewPanelBuildStagesArgs> |
(async) onQueryDataUpdate()
OVERRIDE to check updates on queries, data sent through route call, and the saved fragment state
onViewInitSuccess(launchParams, buildStageArgs, localPipelineCb)
Call after the UI has been loaded successfully to start binding to DOM
Do not override.
Parameters:
Name | Type | Description |
---|---|---|
launchParams |
LaunchViewPanelParams.<LAUNCH_DATA, HOST_PIPELINE_DATA> | |
buildStageArgs |
ViewPanelBuildStagesArgs | |
localPipelineCb |
genericParamFunction.<ViewPanelBuildStagesArgs> |
onViewPanelBuildStart(launchParams, buildStageArgs, localPipelineCb)
CALL SUPER
ALWAYS called when build about to start. Use to set any necessary values you need.
Parameters:
Name | Type | Description |
---|---|---|
launchParams |
LaunchViewPanelParams.<LAUNCH_DATA, HOST_PIPELINE_DATA> | |
buildStageArgs |
ViewPanelBuildStagesArgs | |
localPipelineCb |
genericParamFunction.<ViewPanelBuildStagesArgs> |
onViewPanelConsent(pipelineCb)
Override to consent to view panel changes
Call super to confirm consent. Else, call maintainViewPanel
Parameters:
Name | Type | Description |
---|---|---|
pipelineCb |
getViewPanelConsentCb |
onViewPanelUIBind()
Override. Bind your listeners here. View already bound to DOM
onViewPanelUpdateParams()
setCurrentlyActiveViewPanelNavigation(updatedQueries)
WRITE LOGIC LATER, WHEN NEEDED - LOL
Set the active navigation for the view panel based on the updated queries, if any provided, or default (MUST BE GIVEN)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
updatedQueries |
GenericRouteQueryData.<{}> | null |
setWrapperAttributes(launchParams, buildStageArgs, wrapper)
Override
Called ONLY if root now hardcoded in DOM
Don't set ID. It will be overwritten
Set unique attributes for the wrapper if need be. COPY FOR FRAGMENT??
Parameters:
Name | Type | Description |
---|---|---|
launchParams |
LaunchViewPanelParams.<LAUNCH_DATA, HOST_PIPELINE_DATA> | |
buildStageArgs |
ViewPanelBuildStagesArgs | |
wrapper |
HTMLDivElement |
triggerViewPanelNavigationalRouting(info, dataAndArgs, failCb)
Override if you want to specify whether scroll state restore should be skipped when going back for fragment
Handle localized?
Parameters:
Name | Type | Description |
---|---|---|
info |
LocalViewPanelRoutingInfo | |
dataAndArgs |
routeBuildPipelineDataArgs.<{}> | |
failCb |
genericFunction |