DCOfferInputConfig

DCOfferInputConfig

c-dc-offer-input-config is a custom input web component .

Features
1.Custom value preset
2.Custom label

Constructor

new DCOfferInputConfig()

Properties:
Name Type Description
label string customisable label value.
value string customisable preset input value.
placeholderText string customisable placeholder text.
Example
Sample Usage -

Include the component in your template simply by adding c-dc-offer-input-config HTML tag

<c-dc-offer-input-config value={offer.quantity} label={"Custom label"} ></c-dc-offer-input-config>

| Attribute Name    | Type Expected                                    | Required                                |
|-------------------|--------------------------------------------------|-----------------------------------------|
| label             | It expects a string value.                       | optional                                |
| value             | It expects a string value.                       | optional (default value = 1)            |
| placeholderText   | It expects a string value.                       | optional (default value = empty string) |

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

 events fired :
               | Event Name                                  | Description                                  |
               |---------------------------------------------|----------------------------------------------|
               | vlocity-dc-configure-offer-attributes       | Event triggered when input value is changed  |

 events registered : none

 Dependency - c-dc-offer-input-config is an independent component but is commonly used as a child component of c-dc-offer-config-details.

               | Parent Component          | Child Components |
               |---------------------------|------------------|
               | c-dc-offer-config-details | none             |

Sample with slots -

<c-dc-offer-input-config>
   <span slot="{slot_name}">
     Custom HTML elements goes here
   </span>
</c-dc-offer-input-config>

List of available slots -

| Slot names                            | Dynamic     | Description                       | Impact                |
|---------------------------------------|-------------|-----------------------------------------------------------|
| dc-offer-config-input-wrapper         | -           | Wrapper for component             | Replaces template DOM |

Extends

Methods

(static) getSDKInstance()

This function gets digital commerce sdk instance

(static) updateInputValue(event)

Called when Input value is updated
Parameters:
Name Type Description
event Event