DCAssetDetails

DCAssetDetails

c-dc-asset-details is the component for rendering each asset.

Constructor

new DCAssetDetails()

Properties:
Name Type Description
asset Object object containing a single asset.
Source:
Example
Sample Usage -

Include the component in your template by adding c-dc-asset-details  custom tag

<c-dc-asset-details .asset="${asset}"></c-dc-asset-details>

| Attribute Name    | Type Expected                                                                   | Required |
|-------------------|---------------------------------------------------------------------------------|----------|
| asset             | It expects an object which contains a current asset from asset list             |   Yes    |

 KEY INFO -

 events fired : "vlocity-dc-toggle-asset"

 events registered : none

 Dependency - c-dc-asset-details is a child component of c-dc-assets-list.
 It is used inside c-dc-assets-list for each iteration of assets.


               | Parent Component         | Expected Children Components |
               |--------------------------|------------------------------|
               | c-dc-assets-list         | c-dc-asset-attributes        |
               |                          | c-dc-asset-item-details      |

Sample with slots -

<c-dc-asset-details >
   <span slot="{slot_name}">
     Custom HTML elements goes here
   </span>
</c-dc-asset-details >

List of available slots -

| Slot names                  | Dynamic     | Description                     | Impact                                 |
|--------------------------   |-------------|---------------------------------|----------------------------------------|
| dc-asset-name               | -           | Wrapper for asset name          | Replaces asset name                    |
| dc-asset-header             | -           | Wrapper for asset header        | Replaces asset header                  |
| dc-loading-toggle-icon      | -           | Wrapper for toggle icon         | Replaces toggle icon                   |
| dc-asset-details            | -           | Wrapper for each asset details  | Replaces each asset detail view        |
| dc-asset-attributes         | -           | Wrapper for asset attributes    | Replaces asset attributes              |

Extends

  • LitElement

Members

(static) assetAttributes

This function is used as getter for attributes
Source:

(static) assetPromotions

Method to fetch promotion string from getPromotions utility
Source:

Methods

(static) getSDKInstance()

Method to get digital commerce SDK instance.
Source:

(static) getTranslationLabels()

Method to get translation SDK instance.
Source:

(static) toggleCheckbox(event)

This function is used to fire event on toggling of checkboxes
Parameters:
Name Type Description
event object Current Event Object.
Source:

(static) toggleDetails()

This function is used to handle toggle of detail view of assets
Source: