VlocityDCAssetsList

VlocityDCAssetsList

vlocity-dc-assets-list is the component for displaying all the assets.

Constructor

new VlocityDCAssetsList()

Properties:
Name Type Description
assets Array array containing list of all assets.
Source:
Example
Sample Usage -

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

<vlocity-dc-assets-list .assets="${assetsList}"></vlocity-dc-assets-list>

| Attribute Name    | Type Expected                                                                   | Required |
|-------------------|---------------------------------------------------------------------------------|----------|
| assets            | It expects an array which contains a list of all assets                         |   Yes    |

 KEY INFO -

 events fired : "vlocity-dc-route-navigation"

 events registered :

 | Event Name                            |        Event source component                                                                      |   Callback Function       | Description                                    |
 |---------------------------------------|----------------------------------------------------------------------------------------------------|---------------------------|------------------------------------------------|
 | vlocity-dc-toggle-asset               | vlocity-dc-asset-details                                                                           | toggleAssetSelection      | toggle asset selection in the asset list       |

 Dependency - vlocity-dc-assets-list is an independent component and has no dependency on parent component.
 It is commonly used in the account page to display the list of all assets for the logged in users.


               | Parent Component | Expected Children Components |
               |------------------|------------------------------|
               | none             | vlocity-dc-asset-details     |


Sample with slots -

<vlocity-dc-assets-list>
   <span slot="{slot_name}">
     Custom HTML elements goes here
   </span>
</vlocity-dc-assets-list>

List of available slots -

| Slot names                  | Dynamic     | Description                   | Impact                                 |
|--------------------------   |-------------|------------------------------------------------------------------------|
| dc-asset-details            | -           | Wrapper for asset details     | Replaces each asset detail view        |
| dc-asset-modify             | -           | Wrapper for modify button     | Replaces modify button                 |
| dc-loading-message          | -           | Wrapper for loading message   | Allows adding of loading message       |

Extends

  • LitElement

Members

(static, readonly) properties

Properties that will be available in the template binding
Source:

Methods

(async, static) modifyAssets()

Method to move selected assets to basket
Source:

(static) modifyAssetsGetInput()

This function is used to get assetToBasket input object
Source:

(static) modifyAssetsHandleFailure(error)

This function is used to handle assetToBasket failure
Parameters:
Name Type Description
error object Error Object from SDK call.
Source:

(static) modifyAssetsPostHook(response)

A custom function to be used by customers for customisation, any custom action after assetToBasket call is successfull can be written here
Parameters:
Name Type Description
response object SDK Response object.
Source:

(static) modifyAssetsPreHook(input)

A custom function to be used by customers for customisation, any custom action prior to assetToBasket call can be written here
Parameters:
Name Type Description
input object Current Input Object.
Source:

(static) modifyAssetsPreSDKCalls()

This function is used to execute any action before assetToBasket SDK call is made.
Source:

(static) modifyAssetsProcessResponse(assets)

This function is used to process assetToBasket response
Parameters:
Name Type Description
assets object Assets list from SDK call.
Source:

(static) modifyAssetsSDKCall(input)

This function is used to make SDK call for modifyAssets
Parameters:
Name Type Description
input object Current Input Object.
Source:

(static) toggleAssetSelection()

Event handler for asset toggle selection
Source: