Constructor
new VlocityDCCatalog()
Properties:
Name | Type | Description |
---|---|---|
menuFlag |
Boolean | boolean flag to denote if menu in mobile screen is open or closed. |
catalogs |
Array | array containing list of all the available catalogs. |
activeIndex |
Number | current selected catalog's index. |
Example
Sample Usage -
Include the component in your template by adding vlocity-dc-catalog custom tag
<vlocity-dc-catalog></vlocity-dc-catalog>
| Attribute Name | Type Expected | Required |
|-------------------|---------------------------------------------------------------------------------|----------|
| catalogCode | It expects a String which denotes Catalog Code | Yes |
KEY INFO -
events fired : "vlocity-dc-update-catalog-code"
events registered : none
Dependency - vlocity-dc-catalog is an independent component and has no dependency on parent component.
It is commonly used in the home page to display the list of all available catalogs.
| Parent Component | Expected Children Components |
|------------------|------------------------------|
| none | none |
Sample with slots -
<vlocity-dc-catalog>
<span slot="{slot_name}">
Custom HTML elements goes here
</span>
</vlocity-dc-catalog>
List of available slots -
| Slot names | Dynamic | Description | Impact |
|-------------------------- |-------------|------------------------------------------------------------------------|
| dc-catalog-wrapper-small | - | Wrapper for mobile menu | Replaces mobile menu |
| dc-catalog-wrapper-large | - | Wrapper for desktop menu | Replaces desktop menu |
| dc-catalog-{catalog_code} | Y | Each catalog menu | Replaces DOM in given catalog menu |
Extends
- LitElement
Members
(static, readonly) properties
Properties that will be available in the template binding
Properties:
Name | Type | Description |
---|---|---|
menuFlag |
Boolean | boolean flag to denote if menu in mobile screen is open or closed. |
catalogs |
Array | array containing list of all the available catalogs. |
activeIndex |
Number | current selected catalog's index. |
Methods
(static) closeCatalog()
This function is used for closing catalog in mobile view
(static) openCatalog()
This function is used for opening catalog in mobile view
(static) selectCatalog(record)
This function is used for selecting a catalog
Parameters:
Name | Type | Description |
---|---|---|
record |
object | Current catalog object |