VlocityDCOfferGroup

VlocityDCOfferGroup

vlocity-dc-offer-group is a component to display offer group.

Constructor

new VlocityDCOfferGroup()

Properties:
Name Type Description
nestedChild Boolean boolean value to check if vlocity-dc-offer-group is a nested child.
currentPlanGroup OfferProductGroupObject current plan group
groupSections Boolean boolean value condition for creating offer-group section
isParent Boolean boolean value to check if offer group is parent.
isRecurring Boolean price type is recurring or one time.
collapsed Boolean boolean value to check collapse/expand state.
nestedProductsAvailable Boolean boolean value to show if nested offer are available
Example
Sample Usage -

Include the component in your template simply by adding vlocity-dc-offer-group custom tag

<vlocity-dc-offer-group .currentPlanGroup="${nestedPlan}" .isParent="${false}" .nestedChild="${true}"
.groupSections="${true}" isRecurring=${false}></vlocity-dc-offer-group>

--------------------------------------------------------------------------------------------------------------------------------------
 KEY INFO -

 events fired : none


 events registered :

               | Event Name                         | Event source component                                                                                  | Callback Function      |
               |------------------------------------|---------------------------------------------------------------------------------------------------------|------------------------|
               |                                    | Mutiple Event Sources:                                                                                  |                        |
               |                                    |      | Component Name                        | Description                                         |    |                        |
               | vlocity-dc-refresh-offer-groups    |      |---------------------------------------|-----------------------------------------------------|    | refreshPage()          |
               |                                    |      | vlocity-dc-offer-addons               | Event for refreshing product groups                 |    |                        |
               |                                    |      | vlocity-dc-offer-group-sections       |                                                     |    |                        |
               |                                    |      | vlocity-dc-offer-group-selection      |                                                     |    |                        |

 Dependency - vlocity-dc-offer-group is an independent component that has no dependency on parent component.

               | Parent Component | Expected Child Component            |
               |------------------|-------------------------------------|
               | none             | vlocity-dc-offer-group-selection    |


Sample with slots -

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

List of available slots -

| Slot names                          | Dynamic     | Description                 | Impact                |
|-------------------------------------|-------------|-----------------------------------------------------|
| dc-offer-group-wrapper              | -           | Wrapper for component       | Replaces template DOM |
| dc-offer-group-title                | -           | offer Group Title           | Replace title         |
| dc-offer-group-collapse-icons       | -           | collapse icons              | Replace icon          |

Extends

  • LitElement

Members

(static, readonly) properties

Properties that will be available in the binding system
Properties:
Name Type Description
nestedChild Boolean boolean value to check if vlocity-dc-offer-group is a nested child.
currentPlanGroup OfferProductGroupObject current plan group
groupSections Boolean boolean value condition for creating product-group section
isParent Boolean boolean value to check if product group is parent.
isRecurring Boolean price type is recurring or one time.
collapsed Boolean boolean value to check collapse/expand state.
nestedProductsAvailable Boolean boolean value to show if nested product are available

Methods

(static) connectedCallback()

Invoked when vlocity-dc-offer-group component is added to the document’s DOM.

(static) expandCollapseProducts()

Invoked on click of expand/collapse icon.

(static) refreshPage()

callback function for event vlocity-dc-refresh-offer-groups.