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