From 4aab305799ebe650ce2c197df2deb186b021fbaa Mon Sep 17 00:00:00 2001 From: rgravitvl Date: Mon, 22 Jul 2024 13:32:05 +0530 Subject: [PATCH 1/2] Updated for carousel for UE --- component-definition.json | 30 ++++++++++ component-filters.json | 12 +++- component-models.json | 94 ++++++++++++++++++++++++++++++ tools/actions/convert/src/index.js | 1 + 4 files changed, 135 insertions(+), 2 deletions(-) diff --git a/component-definition.json b/component-definition.json index 90b4277ff..c1862d7ad 100644 --- a/component-definition.json +++ b/component-definition.json @@ -166,6 +166,36 @@ } } }, + { + "title": "Carousel", + "id": "carousel", + "plugins": { + "xwalk": { + "page": { + "resourceType": "core/franklin/components/block/v1/block", + "template": { + "name": "Carousel", + "filter": "carousel" + } + } + } + } + }, + { + "title": "Carousel Item", + "id": "carousel-item", + "plugins": { + "xwalk": { + "page": { + "resourceType": "core/franklin/components/block/v1/block/item", + "template": { + "name": "Carousel Item", + "model": "carousel-item" + } + } + } + } + }, { "title": "Recent Articles", "id": "recent-articles", diff --git a/component-filters.json b/component-filters.json index e9b6a5a84..82446c766 100644 --- a/component-filters.json +++ b/component-filters.json @@ -30,7 +30,8 @@ "takeway", "call-to-action", "accordion", - "recent-articles" + "recent-articles", + "carousel" ] }, { @@ -38,4 +39,11 @@ "components": [ "accordion-item" ] - }] + }, + { + "id": "carousel", + "components": [ + "carousel-item" + ] + } +] diff --git a/component-models.json b/component-models.json index df435f339..3c67bdb90 100644 --- a/component-models.json +++ b/component-models.json @@ -373,6 +373,100 @@ } ] }, + { + "id": "carousel-item", + "fields": [ + { + "component": "text", + "valueType": "string", + "name": "content_brand", + "value": "", + "label": "Brand" + }, + { + "component": "text", + "valueType": "string", + "name": "content_title", + "value": "", + "label": "Title" + }, + { + "component": "select", + "name": "content_titleType", + "value": "h1", + "label": "Type", + "valueType": "string", + "options": [ + { + "name": "h1", + "value": "h1" + }, + { + "name": "h2", + "value": "h2" + }, + { + "name": "h3", + "value": "h3" + }, + { + "name": "h4", + "value": "h4" + }, + { + "name": "h5", + "value": "h5" + }, + { + "name": "h6", + "value": "h6" + } + ] + }, + { + "component": "richtext", + "valueType": "string", + "name": "content_description", + "value": "", + "label": "Description" + }, + { + "component": "aem-content", + "valueType": "string", + "name": "content_button1", + "value": "", + "label": "Button Link" + }, + { + "component": "text", + "valueType": "string", + "name": "content_button1Text", + "value": "", + "label": "Button Text" + }, + { + "component": "aem-content", + "valueType": "string", + "name": "content_button2", + "value": "", + "label": "Button Link" + }, + { + "component": "text", + "valueType": "string", + "name": "content_button2Text", + "value": "", + "label": "Button Text" + }, + { + "component": "reference", + "valueType": "string", + "name": "fileReference", + "label": "Image", + "multi": false + } + ] + }, { "id": "recent-articles", "fields": [] diff --git a/tools/actions/convert/src/index.js b/tools/actions/convert/src/index.js index d1e064cc0..3f3814ed2 100644 --- a/tools/actions/convert/src/index.js +++ b/tools/actions/convert/src/index.js @@ -103,6 +103,7 @@ function skipConverter(path) { // TODO: remove the logic for test pages (with -jck1 in the path) if (!path) return false; if (path.includes('-jck1')) return true; + if (path.includes('en-new')) return true; // skip the converter for pages like **/products/*/topics/** const regex = /\/[^/]+\/[^/]+\/products\/[^/]+\/topics-jck1\/[^/]+/; return regex.test(path); From 5dd32cbc434d7ad0c4673e71b92f181432628e9b Mon Sep 17 00:00:00 2001 From: rgravitvl Date: Mon, 22 Jul 2024 14:24:40 +0530 Subject: [PATCH 2/2] Updated the review commnents --- tools/actions/convert/src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/actions/convert/src/index.js b/tools/actions/convert/src/index.js index 3f3814ed2..385b3af3a 100644 --- a/tools/actions/convert/src/index.js +++ b/tools/actions/convert/src/index.js @@ -103,7 +103,7 @@ function skipConverter(path) { // TODO: remove the logic for test pages (with -jck1 in the path) if (!path) return false; if (path.includes('-jck1')) return true; - if (path.includes('en-new')) return true; + if (path.includes('/en-new')) return true; // skip the converter for pages like **/products/*/topics/** const regex = /\/[^/]+\/[^/]+\/products\/[^/]+\/topics-jck1\/[^/]+/; return regex.test(path);