Constructor
new VlocityDCOfferConfigDetails()
Properties:
Name | Type | Description |
---|---|---|
currentOffer |
OfferObject | current selected offer object. |
Example
Sample Usage -
Include the component in your template simply by adding vlocity-dc-offer-config-details custom tag
<vlocity-dc-offer-config-details .currentOffer="${offer}"> </vlocity-dc-offer-config-details>
| Attribute Name | Type Expected | Required |
|-------------------|---------------------------------------------------------------------------------|----------|
| currentOffer | OfferObject value expected | required |
--------------------------------------------------------------------------------------------------------------------------------------
KEY INFO -
events fired : none
events registered : none
Dependency - vlocity-dc-offer-config-details is a component that is commonly used as a child of vlocity-dc-offer-config but can also be used as an independent component.
| Parent Component | Expected Children Components |
|----------------------------------|---------------------------------------|
| | vlocity-dc-offer-configurations |
| | vlocity-dc-offer-color-config |
| vlocity-dc-offer-config | vlocity-dc-offer-attribute-config |
| | vlocity-dc-offer-input-config |
| | vlocity-dc-offer-payment-config |
Sample with slots -
<vlocity-dc-offer-config-details>
<span slot="{slot_name}">
Custom HTML elements goes here
</span>
</vlocity-dc-offer-config-details>
List of available slots -
| Slot names | Dynamic | Description | Impact |
|----------------------------|-------------|----------------------------------------------------|
| dc-offer-title | - | Offer Title | Replaces DOM |
| dc-offer-details | - | Wrapper for Offer Details | Replaces DOM |
Extends
- LitElement
Members
(static, readonly) properties
Properties that will be available in the binding system
Properties:
Name | Type | Description |
---|---|---|
currentOffer |
OfferObject | selected offer object |
offerLoaded |
Boolean | boolean value to check if offer is loaded. |
isAddonBtnDisabled |
Boolean | boolean value to enable/disable addon button. |
Methods
(static) connectedCallback()
Invoked when vlocity-dc-offer-config-details component is added to the document’s DOM.
(static) groupBy(records, key) → {Array}
Groups the attributes based on the type
Parameters:
Name | Type | Description |
---|---|---|
records |
Array.<OfferAttributeObject> | Data to be grouped |
key |
String | Property using which grouping will be done |