VlocityDCMain

VlocityDCMain

vlocity-dc-main is the container component which has the internal navigation logic between different screens/phases

Constructor

new VlocityDCMain()

Source:
Example
Sample Usage -

Include the component in your template by adding vlocity-dc-main custom tag

<vlocity-dc-main></vlocity-dc-main>

 KEY INFO -

 events fired : none

 events registered :

               | Event Name                         | Event source component                                                                                  | Callback Function      |
               |------------------------------------|---------------------------------------------------------------------------------------------------------|------------------------|
               |                                    | Mutiple Event Sources:                                                                                  |                        |
               |                                    |      | Component Name                        | Description                                         |    |                        |
               | vlocity-dc-route-navigation        |      |---------------------------------------|-----------------------------------------------------|    | customNavigation()     |
               |                                    |      | vlocity-dc-assets-list                | Event for navigation                                |    |                        |
               |                                    |      | vlocity-dc-checkout                   |                                                     |    |                        |
               |                                    |      | vlocity-dc-global-header              |                                                     |    |                        |
               |                                    |      | vlocity-dc-offer-addons               |                                                     |    |                        |
               |                                    |      | vlocity-dc-offer-config               |                                                     |    |                        |
               |                                    |      | vlocity-dc-offer-group-selections     |                                                     |    |                        |
               |                                    |      | vlocity-dc-offer-list                 |                                                     |    |                        |
               |                                    |      | vlocity-dc-shopping-cart              |                                                     |    |                        |
               |                                    |      | vlocity-dc-totalbar                   |                                                     |    |                        |
               |                                    |                                                                                                         |                        |
               |                                    | Mutiple Event Sources:                                                                                  |                        |
               |                                    |      | Component Name                        | Description                                         |    |                        |
               | vlocity-dc-update-catalog-code     |      |---------------------------------------|-----------------------------------------------------|    | updateCatalogCode()    |
               |                                    |      | vlocity-dc-catalog                    | Event for updating catalog code                     |    |                        |
               |                                    |      | vlocity-dc-child-catalog              |                                                     |    |                        |
               |                                    |                                                                                                         |                        |
               | vlocity-dc-login-complete          | vlocity-dc-signin                                                                                       | handleUserLogin()      |
               |                                    |                                                                                                         |                        |
               | vlocity-dc-sign-out                | vlocity-dc-global-header                                                                                | handleUserLogin()      |
               |                                    |                                                                                                         |                        |


 Dependency - vlocity-dc-main is an independent component and has no dependency on parent component.
 It is commonly used as a container component where main screens/phases navigation logic resides

               | Parent Component | Expected Children Components |
               |------------------|------------------------------|
               | none             | vlocity-dc-global-header     |
               |                  | vlocity-dc-home-page         |
               |                  | vlocity-dc-offer-config      |
               |                  | vlocity-dc-offer-addons      |
               |                  | vlocity-dc-shopping-cart     |
               |                  | vlocity-dc-checkout          |
               |                  | vlocity-dc-my-account        |

Extends

Methods

(static) createRenderRoot()

Method to create render root
Source:

(static) customNavigation()

Method to push route state
Source:

(static) getLabels(labelList, language)

Method to get getLabels from Translation SDK
Parameters:
Name Type Description
labelList Array array of labelKeys
language String language code
Source:

(static) getParamsFromUrl()

Method to split params from URL
Source:

(static) handleUserLogin(data)

Method to handle user login
Parameters:
Name Type Description
data object
Source:

(static) navigate(path)

Method to navigate route
Parameters:
Name Type Description
path String route path
Source:

(static) render()

Method to render template
Source:

(static) setAttributes(path)

Method to push route state
Parameters:
Name Type Description
path String route path
Source:

(static) updateCatalogCode()

Method to update catalog code
Source: