Constructor
new VlocityDCEditModal()
Properties:
Name | Type | Description |
---|---|---|
isRootProduct |
Boolean | boolen value to check if product is a root product. |
displayModal |
Boolean | boolen value to show/hide modal. |
currentOffer |
Object | offer to be re-configured. |
Example
Sample Usage -
Include the component in your template simply by adding vlocity-dc-edit-modal custom tag
<vlocity-dc-edit-modal isRootProduct=${shoppingCartComponent.isRootProduct} displayModal=${shoppingCartComponent.showEditModalPopup} .currentOffer="${shoppingCartComponent.configureProductData}"></vlocity-dc-edit-modal>
| Attribute Name | Type Expected | Required |
|-------------------|---------------------------------------------------------------------------------|----------|
| currentOffer | It expects an offer object. | required |
| isRootProduct | It expects a boolean value to determine if product is a root product. | required |
| displayModal | It expects a boolean value to show/hide modal popup. | required |
--------------------------------------------------------------------------------------------------------------------------------------
KEY INFO -
events fired : vlocity-dc-event-source-basket and vlocity-dc-close-edit-modal
| Event Name | Description |
|--------------------------------------|---------------------------------------------------------------|
| vlocity-dc-event-source-basket | Event to set source of the event from where it is being fired.|
| vlocity-dc-close-edit-modal | Event to publish that modal popup is closed. |
events registered : none
Dependency - vlocity-dc-edit-modal is an independent component and has no dependency on parent component.
| Parent Component | Expected Child Component |
|------------------|---------------------------|
| none | none |
Sample with slots -
<vlocity-dc-edit-modal>
<span slot="{slot_name}">
Custom HTML elements goes here
</span>
</vlocity-dc-edit-modal>
List of available slots -
| Slot names | Dynamic | Description | Impact |
|---------------------------------------|-------------|----------------------------------------------------|
| dc-edit-modal-wrapper | - | Wrapper for template | Replaces DOM |
Extends
- LitElement
Members
(static, readonly) properties
Properties that will be available in the binding system
Properties:
Name | Type | Description |
---|---|---|
displayModal |
Boolean | boolen value to show/hide modal. |
currentOffer |
Object | offer object that needs to be updated. |
isRootProduct |
Boolean | boolen value to check if product is a root product. |
Methods
(static) closeModal()
Trigger to close modal popup