Constructor
new VlocityDCGlobalHeader()
Example
Sample Usage -
Include the component in your template simply by adding vlocity-dc-global-header custom tag
<vlocity-dc-global-header></vlocity-dc-global-header>
KEY INFO -
events fired : "vlocity-dc-route-navigation", "vlocity-dc-sign-in" and "vlocity-dc-sign-out"
events registered :
| Event Name | Event source component | Callback Function | Description |
|--------------------------------|---------------------------------|------------------------|--------------------------------------------|
| vlocity-dc-login-complete | vlocity-dc-sign-in | loginSuccess() | Event triggered on login |
Dependency - vlocity-dc-global-header is a global component and doesn't have any dependency
Sample with slots -
<vlocity-dc-global-header>
<div slot="{slot_name}">
Custom header HTML elements goes here
</div>
</vlocity-dc-global-header>
List of available slots -
| Slot names | Dynamic | Description | Impact |
|-----------------------------|-------------|---------------------------------|----------------------------------------|
| dc-global-header | - | Wrapper for header elements | Replaces header elements |
Extends
- DCBaseComponent
Members
(static, readonly) properties
Properties that will be available in the template binding
Methods
(static) closeLoginModal()
Method to close login modal
(async, static) doSignOut()
Method to signOut the user.
(static) initLogin()
Method to initiate login/signup SDK call.
(static) loginSuccess()
callback function for event vlocity-dc-login-complete
(static) openAccount()
Method to navigate to my accounts
(static) openLoginModal()
Method to open login modal
(static) signOutHandleFailure()
A custom function to be used by customers for handling api failures
(static) signOutPostHook()
A custom function to be used by customers for customisation, any custom action after sign in call can be written here
(static) signOutPreHook()
A custom function to be used by customers for customisation, any custom action prior to sign out call can be written here
(static) signOutPreSDKCalls()
This function is used to do any changes prior to sdk calls
(static) signOutProcessResponse(response)
This function is used to process signOut response
Parameters:
Name | Type | Description |
---|---|---|
response |
object | Response Object from SDK call. |
(static) signOutSDKCall()
This function is used to do actual sdk calls