Skip to content

Commit

Permalink
Merge pull request #414 from pricefx/feature/pai-302-events
Browse files Browse the repository at this point in the history
Events Component
  • Loading branch information
pankajkumar-bounteous authored Nov 8, 2024
2 parents fcfb0f5 + b9e555d commit b969d21
Show file tree
Hide file tree
Showing 5 changed files with 153 additions and 0 deletions.
3 changes: 3 additions & 0 deletions blocks/events/events.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.events {
margin: 0;
}
7 changes: 7 additions & 0 deletions blocks/events/events.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* Decorates Events on DOM
* @param {Element} block The Events block element
*/
export default async function decorate(block) {
console.log(block);

Check warning on line 6 in blocks/events/events.js

View workflow job for this annotation

GitHub Actions / build

Delete `··`

Check warning on line 6 in blocks/events/events.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
}

Check warning on line 7 in blocks/events/events.js

View workflow job for this annotation

GitHub Actions / build

Insert `⏎`
17 changes: 17 additions & 0 deletions component-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,23 @@
}
}
},
{
"title": "Events",
"id": "events",
"plugins": {
"xwalk": {
"page": {
"resourceType": "core/franklin/components/block/v1/block",
"template": {
"name": "Events",
"model": "events",
"numberOfArticles": "6",
"key-value": true
}
}
}
}
},
{
"title": "Form",
"id": "form",
Expand Down
1 change: 1 addition & 0 deletions component-filters.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"cookie-banner",
"download",
"embed",
"events",
"fragment",
"google-map",
"hero",
Expand Down
125 changes: 125 additions & 0 deletions component-models.json
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,131 @@
}
]
},
{
"id": "events",
"fields": [
{
"component": "tab",
"label": "Configs",
"name": "configs"
},
{
"component": "aem-content",
"name": "featuredEvents",
"value": "",
"label": "Featured Events",
"valueType": "string"
},
{
"component": "text",
"name": "searchPlaceholderText",
"label": "Search Placeholder Text",
"valueType": "string"
},
{
"component": "number",
"name": "numberOfEvents",
"label": "Number Of Events Display",
"valueType": "number",
"value": 6,
"validation": {
"numberMin": 3
}
},
{
"component": "multiselect",
"name": "sortBy",
"label": "Sort By",
"valueType": "string",
"options": [
{
"name": "Date",
"children": [
{ "name": "Asc Date", "value": "asc-date" },
{ "name": "Desc Date", "value": "desc-date" }
]
},
{
"name": "Title",
"children": [
{ "name": "A-Z", "value": "asc-title" },
{ "name": "Z-A", "value": "desc-title" }
]
}
]
},
{
"component": "tab",
"label": "Filters",
"name": "filters"
},
{
"component": "text-input",
"valueType": "string",
"name": "filterOneTitle",
"value": "",
"label": "Filter 1 Title"
},
{
"component": "aem-tag",
"label": "Filter 1 Options",
"name": "filterOneTags",
"valueType": "string"
},
{
"component": "text-input",
"valueType": "string",
"name": "filterTwoTitle",
"value": "",
"label": "Filter 2 Title"
},
{
"component": "aem-tag",
"label": "Filter 2 Options",
"name": "filterTwoTags",
"valueType": "string"
},
{
"component": "text-input",
"valueType": "string",
"name": "filterThreeTitle",
"value": "",
"label": "Filter 3 Title"
},
{
"component": "aem-tag",
"label": "Filter 3 Options",
"name": "filterThreeTags",
"valueType": "string"
},
{
"component": "text-input",
"valueType": "string",
"name": "filterFourTitle",
"value": "",
"label": "Filter 4 Title"
},
{
"component": "aem-tag",
"label": "Filter 4 Options",
"name": "filterFourTags",
"valueType": "string"
},
{
"component": "text-input",
"valueType": "string",
"name": "filterFiveTitle",
"value": "",
"label": "Filter 5 Title"
},
{
"component": "aem-tag",
"label": "Filter 5 Options",
"name": "filterFiveTags",
"valueType": "string"
}
]
},
{
"id": "left-right-boxed",
"fields": [
Expand Down

0 comments on commit b969d21

Please sign in to comment.