From 39e63f03cb58531d3056e776a8144772820562d5 Mon Sep 17 00:00:00 2001 From: Miroslav Lukic Date: Tue, 18 Jan 2022 13:41:37 -0500 Subject: [PATCH] Created new template type/template, Updated Language Toggle, Restructure packages, Multiple CSS fixes --- source/core/pom.xml | 2 +- ...ListItemModel.java => CustomListItem.java} | 9 +- .../models/DetectLanguageForms.java | 33 + .../core/components/models/HeaderModel.java | 100 -- .../models/LanguageNavigationLabel.java | 6 + ...QuickSearchModel.java => QuickSearch.java} | 2 +- .../impl/CustomExperienceFragmentImpl.java | 139 ++ .../models/impl/DetectLanguageFormsImpl.java | 145 ++ .../components/models/impl/GCListImpl.java | 11 +- .../impl/LanguageNavigationLabelImpl.java | 68 + .../models/impl/LayoutContainerUXPImpl.java | 3 +- ...rchModelImpl.java => QuickSearchImpl.java} | 10 +- .../models/impl/SeoComponentImpl.java | 4 +- source/it.launcher/pom.xml | 6 +- source/it.tests/pom.xml | 4 +- source/pom.xml | 4 +- source/ui.apps/pom.xml | 4 +- .../clientlib-site-extra/less/grid.less | 2 +- .../content/breadcrumb/.content.xml | 1 + .../components/content/button/.content.xml | 1 + .../components/content/carousel/.content.xml | 1 + .../components/content/download/.content.xml | 8 + .../components/content/embed/.content.xml | 8 + .../content/experiencefragment/.content.xml | 2 +- .../components/content/gcBanner/.content.xml | 1 + .../components/content/gcList/.content.xml | 1 + .../components/content/image/.content.xml | 1 + .../content/languagenavigation/.content.xml | 1 + .../languagenavigation/itemContent.html | 17 +- .../languagenavigationForms/.content.xml | 6 + .../_cq_dialog/.content.xml | 45 + .../languagenavigationForms.html | 45 + .../components/content/list/.content.xml | 1 + .../content/navigation/.content.xml | 1 + .../content/navigation/groupNextLevel.html | 9 +- .../content/quickSearch/quickSearch.html | 2 +- .../components/content/sharing/.content.xml | 1 + .../components/content/tabs/.content.xml | 1 + .../components/content/teaser/.content.xml | 2 +- .../components/content/text/.content.xml | 1 + .../jcr_root/apps/adobeuxp/i18n/fr.xml | 3 + .../themeLibrary/wetcompliance/.content.xml | 0 .../assets/Accordion-Add-Default.svg | 0 .../assets/Accordion-Add-Hover.svg | 0 .../assets/Accordion-Delete-Default.svg | 0 .../assets/Accordion-Delete-Hover.svg | 0 .../wetcompliance/assets/Chevron-Active.svg | 0 .../assets/Chevron-Down-Active.svg | 0 .../assets/Chevron-Down-Default.svg | 0 .../assets/Chevron-Left-Hover.svg | 0 .../assets/Chevron-Left-White.svg | 0 .../wetcompliance/assets/Chevron-Left.svg | 0 .../assets/Chevron-Right-Hover.svg | 0 .../assets/Chevron-Right-White.svg | 0 .../wetcompliance/assets/Chevron-Right.svg | 0 .../wetcompliance/assets/DoubleTick.svg | 0 .../assets/FatChevron-Left-Default.svg | 0 .../assets/FatChevron-Right-Default.svg | 0 .../assets/HamburgerMenuWmargin-Default.svg | 0 .../assets/HamburgerMenuWmargin-Hover.svg | 0 .../assets/ImageChoiceSelectIcon.svg | 0 .../wetcompliance/assets/Minus.svg | 0 .../wetcompliance/assets/Minus_Hover.svg | 0 .../wetcompliance/assets/Plus.svg | 0 .../wetcompliance/assets/Plus_Hover.svg | 0 .../wetcompliance/assets/Reset-Hover.svg | 0 .../wetcompliance/assets/Reset.svg | 0 .../wetcompliance/assets/Save-Hover.svg | 0 .../wetcompliance/assets/Save.svg | 0 .../wetcompliance/assets/ScrollDown.svg | 0 .../wetcompliance/assets/Submit-Hover.svg | 0 .../assets/Table-Edit-Default.svg | 0 .../wetcompliance/assets/Table-Edit-Hover.svg | 0 .../wetcompliance/assets/Tick.svg | 0 .../wetcompliance/assets/Tick_Hover.svg | 0 .../assets/fileattachmentlisting-ip.png | Bin .../wetcompliance/assets/questionmark.svg | 0 .../themes/themeLibrary/wetcompliance/css.txt | 0 .../wetcompliance/css.txt.dir/.content.xml | 0 .../themeLibrary/wetcompliance/css/theme.css | 130 +- .../content/jcr_root/etc/mobile/.content.xml | 0 .../jcr_root/etc/mobile/groups/.content.xml | 0 .../etc/mobile/groups/responsive/.content.xml | 0 .../etc/mobile/groups/responsive/static.css | 0 source/ui.content/.content.xml | 1166 +++++++++++++++++ source/ui.content/pom.xml | 4 +- .../main/content/META-INF/vault/filter.xml | 4 +- .../uxp/settings/wcm/policies/.content.xml | 2 +- .../page-header-footer/.content.xml | 12 + .../page-header-footer/initial/.content.xml | 42 + .../page-header-footer/policies/.content.xml | 14 + .../page-header-footer/structure/.content.xml | 104 ++ .../basic-adaptive-form-template/.content.xml | 2 +- .../initial/.content.xml | 364 ++--- .../basics1/items/guideimagechoice2/file-1 | Bin 0 -> 3453 bytes .../basics1/items/guideimagechoice2/file-2 | Bin 0 -> 4494 bytes .../structure/.content.xml | 6 +- .../content/dam/uxp/Signin.JPG/.content.xml | 47 + .../renditions/cq5dam.thumbnail.140.100.png | Bin 0 -> 6531 bytes .../.content.xml | 7 + .../renditions/cq5dam.thumbnail.319.319.png | Bin 0 -> 27334 bytes .../.content.xml | 7 + .../renditions/cq5dam.thumbnail.48.48.png | Bin 0 -> 1216 bytes .../.content.xml | 7 + .../renditions/cq5dam.web.1280.1280.jpeg | Bin 0 -> 76564 bytes .../.content.xml | 7 + .../_jcr_content/renditions/original | Bin 0 -> 67784 bytes .../renditions/original.dir/.content.xml | 8 + .../dam/uxp/aip-653x194.jpg/.content.xml | 32 + .../renditions/cq5dam.thumbnail.140.100.png | Bin 0 -> 17927 bytes .../.content.xml | 7 + .../renditions/cq5dam.thumbnail.319.319.png | Bin 0 -> 87295 bytes .../.content.xml | 7 + .../renditions/cq5dam.thumbnail.48.48.png | Bin 0 -> 2380 bytes .../.content.xml | 7 + .../renditions/cq5dam.web.1280.1280.jpeg | Bin 0 -> 54539 bytes .../.content.xml | 7 + .../_jcr_content/renditions/original | Bin 0 -> 164979 bytes .../renditions/original.dir/.content.xml | 8 + .../dam/uxp/benefits-theme.jpg/.content.xml | 41 + .../renditions/cq5dam.thumbnail.140.100.png | Bin 0 -> 19405 bytes .../.content.xml | 7 + .../renditions/cq5dam.thumbnail.319.319.png | Bin 0 -> 91280 bytes .../.content.xml | 7 + .../renditions/cq5dam.thumbnail.48.48.png | Bin 0 -> 2735 bytes .../.content.xml | 7 + .../renditions/cq5dam.web.1280.1280.jpeg | Bin 0 -> 27770 bytes .../.content.xml | 7 + .../_jcr_content/renditions/original | Bin 0 -> 40832 bytes .../renditions/original.dir/.content.xml | 8 + .../.content.xml | 32 + .../renditions/cq5dam.thumbnail.140.100.png | Bin 0 -> 12362 bytes .../.content.xml | 7 + .../renditions/cq5dam.thumbnail.319.319.png | Bin 0 -> 42754 bytes .../.content.xml | 7 + .../renditions/cq5dam.thumbnail.48.48.png | Bin 0 -> 2323 bytes .../.content.xml | 7 + .../renditions/cq5dam.web.1280.1280.png | Bin 0 -> 79208 bytes .../cq5dam.web.1280.1280.png.dir/.content.xml | 7 + .../_jcr_content/renditions/original | Bin 0 -> 67063 bytes .../renditions/original.dir/.content.xml | 8 + .../experience-fragments/uxp/.content.xml | 2 +- .../uxp/en/header-banner/.content.xml | 1 + .../header-banner-forms/.content.xml | 16 +- .../uxp/en/header-banner/master/.content.xml | 41 +- .../footer-navigation-menu/.content.xml | 8 +- .../uxp/fr/header-banner/.content.xml | 1 + .../header-banner-forms/.content.xml | 212 +++ .../uxp/fr/header-banner/master/.content.xml | 13 +- .../footer-navigation-menu/.content.xml | 10 +- .../uxp/fr/navigation/master/.content.xml | 2 +- .../forms/af/uxp/basic-test-form/.content.xml | 21 +- .../jcr_root/content/uxp/en/.content.xml | 55 +- .../jcr_root/content/uxp/en/jobs/.content.xml | 2 +- .../jcr_root/content/uxp/fr/.content.xml | 7 +- .../content/uxp/fr/benefits/.content.xml | 6 +- .../immigration-and-citizenship/.content.xml | 6 +- .../jcr_root/content/uxp/fr/jobs/.content.xml | 6 +- .../uxp/fr/travel-and-tourism/.content.xml | 5 +- .../content/uxp/fr/uxp-examples/.content.xml | 5 +- 160 files changed, 2745 insertions(+), 531 deletions(-) rename source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/{CustomListItemModel.java => CustomListItem.java} (93%) create mode 100644 source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/DetectLanguageForms.java delete mode 100644 source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/HeaderModel.java create mode 100644 source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/LanguageNavigationLabel.java rename source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/{QuickSearchModel.java => QuickSearch.java} (96%) create mode 100644 source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/CustomExperienceFragmentImpl.java create mode 100644 source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/DetectLanguageFormsImpl.java create mode 100644 source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/LanguageNavigationLabelImpl.java rename source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/{QuickSearchModelImpl.java => QuickSearchImpl.java} (88%) create mode 100644 source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/download/.content.xml create mode 100644 source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/embed/.content.xml create mode 100644 source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigationForms/.content.xml create mode 100644 source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigationForms/_cq_dialog/.content.xml create mode 100644 source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigationForms/languagenavigationForms.html rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/.content.xml (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Accordion-Add-Default.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Accordion-Add-Hover.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Accordion-Delete-Default.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Accordion-Delete-Hover.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Chevron-Active.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Chevron-Down-Active.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Chevron-Down-Default.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Chevron-Left-Hover.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Chevron-Left-White.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Chevron-Left.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Chevron-Right-Hover.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Chevron-Right-White.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Chevron-Right.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/DoubleTick.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/FatChevron-Left-Default.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/FatChevron-Right-Default.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/HamburgerMenuWmargin-Default.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/HamburgerMenuWmargin-Hover.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/ImageChoiceSelectIcon.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Minus.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Minus_Hover.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Plus.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Plus_Hover.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Reset-Hover.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Reset.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Save-Hover.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Save.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/ScrollDown.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Submit-Hover.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Table-Edit-Default.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Table-Edit-Hover.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Tick.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/Tick_Hover.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/fileattachmentlisting-ip.png (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/assets/questionmark.svg (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/css.txt (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/css.txt.dir/.content.xml (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/clientlibs/fd/themes/themeLibrary/wetcompliance/css/theme.css (96%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/mobile/.content.xml (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/mobile/groups/.content.xml (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/mobile/groups/responsive/.content.xml (100%) rename source/{ui.content => ui.apps}/src/main/content/jcr_root/etc/mobile/groups/responsive/static.css (100%) create mode 100644 source/ui.content/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/conf/uxp/settings/wcm/template-types/page-header-footer/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/conf/uxp/settings/wcm/template-types/page-header-footer/initial/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/conf/uxp/settings/wcm/template-types/page-header-footer/policies/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/conf/uxp/settings/wcm/template-types/page-header-footer/structure/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/conf/uxp/settings/wcm/templates/basic-adaptive-form-template/initial/_jcr_content/guideContainer/rootPanel/items/basics1/items/guideimagechoice2/file-1 create mode 100644 source/ui.content/src/main/content/jcr_root/conf/uxp/settings/wcm/templates/basic-adaptive-form-template/initial/_jcr_content/guideContainer/rootPanel/items/basics1/items/guideimagechoice2/file-2 create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/Signin.JPG/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/Signin.JPG/_jcr_content/renditions/cq5dam.thumbnail.140.100.png create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/Signin.JPG/_jcr_content/renditions/cq5dam.thumbnail.140.100.png.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/Signin.JPG/_jcr_content/renditions/cq5dam.thumbnail.319.319.png create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/Signin.JPG/_jcr_content/renditions/cq5dam.thumbnail.319.319.png.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/Signin.JPG/_jcr_content/renditions/cq5dam.thumbnail.48.48.png create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/Signin.JPG/_jcr_content/renditions/cq5dam.thumbnail.48.48.png.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/Signin.JPG/_jcr_content/renditions/cq5dam.web.1280.1280.jpeg create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/Signin.JPG/_jcr_content/renditions/cq5dam.web.1280.1280.jpeg.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/Signin.JPG/_jcr_content/renditions/original create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/Signin.JPG/_jcr_content/renditions/original.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/aip-653x194.jpg/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/aip-653x194.jpg/_jcr_content/renditions/cq5dam.thumbnail.140.100.png create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/aip-653x194.jpg/_jcr_content/renditions/cq5dam.thumbnail.140.100.png.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/aip-653x194.jpg/_jcr_content/renditions/cq5dam.thumbnail.319.319.png create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/aip-653x194.jpg/_jcr_content/renditions/cq5dam.thumbnail.319.319.png.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/aip-653x194.jpg/_jcr_content/renditions/cq5dam.thumbnail.48.48.png create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/aip-653x194.jpg/_jcr_content/renditions/cq5dam.thumbnail.48.48.png.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/aip-653x194.jpg/_jcr_content/renditions/cq5dam.web.1280.1280.jpeg create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/aip-653x194.jpg/_jcr_content/renditions/cq5dam.web.1280.1280.jpeg.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/aip-653x194.jpg/_jcr_content/renditions/original create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/aip-653x194.jpg/_jcr_content/renditions/original.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/benefits-theme.jpg/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/benefits-theme.jpg/_jcr_content/renditions/cq5dam.thumbnail.140.100.png create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/benefits-theme.jpg/_jcr_content/renditions/cq5dam.thumbnail.140.100.png.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/benefits-theme.jpg/_jcr_content/renditions/cq5dam.thumbnail.319.319.png create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/benefits-theme.jpg/_jcr_content/renditions/cq5dam.thumbnail.319.319.png.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/benefits-theme.jpg/_jcr_content/renditions/cq5dam.thumbnail.48.48.png create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/benefits-theme.jpg/_jcr_content/renditions/cq5dam.thumbnail.48.48.png.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/benefits-theme.jpg/_jcr_content/renditions/cq5dam.web.1280.1280.jpeg create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/benefits-theme.jpg/_jcr_content/renditions/cq5dam.web.1280.1280.jpeg.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/benefits-theme.jpg/_jcr_content/renditions/original create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/benefits-theme.jpg/_jcr_content/renditions/original.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/dronewebimages_topic_static_520x200.png/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/dronewebimages_topic_static_520x200.png/_jcr_content/renditions/cq5dam.thumbnail.140.100.png create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/dronewebimages_topic_static_520x200.png/_jcr_content/renditions/cq5dam.thumbnail.140.100.png.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/dronewebimages_topic_static_520x200.png/_jcr_content/renditions/cq5dam.thumbnail.319.319.png create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/dronewebimages_topic_static_520x200.png/_jcr_content/renditions/cq5dam.thumbnail.319.319.png.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/dronewebimages_topic_static_520x200.png/_jcr_content/renditions/cq5dam.thumbnail.48.48.png create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/dronewebimages_topic_static_520x200.png/_jcr_content/renditions/cq5dam.thumbnail.48.48.png.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/dronewebimages_topic_static_520x200.png/_jcr_content/renditions/cq5dam.web.1280.1280.png create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/dronewebimages_topic_static_520x200.png/_jcr_content/renditions/cq5dam.web.1280.1280.png.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/dronewebimages_topic_static_520x200.png/_jcr_content/renditions/original create mode 100644 source/ui.content/src/main/content/jcr_root/content/dam/uxp/dronewebimages_topic_static_520x200.png/_jcr_content/renditions/original.dir/.content.xml create mode 100644 source/ui.content/src/main/content/jcr_root/content/experience-fragments/uxp/fr/header-banner/header-banner-forms/.content.xml diff --git a/source/core/pom.xml b/source/core/pom.xml index 69e9ffc..f29f42b 100644 --- a/source/core/pom.xml +++ b/source/core/pom.xml @@ -20,7 +20,7 @@ com.adobe.acs adobeuxp - 0.0.1-SNAPSHOT + 0.2.0-SNAPSHOT ../pom.xml adobeuxp.core diff --git a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/CustomListItemModel.java b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/CustomListItem.java similarity index 93% rename from source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/CustomListItemModel.java rename to source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/CustomListItem.java index d709cb8..a4103a5 100644 --- a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/CustomListItemModel.java +++ b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/CustomListItem.java @@ -12,26 +12,23 @@ package com.adobe.acs.adobeuxp.wcm.core.components.models; import java.io.Serializable; - import javax.inject.Inject; import javax.jcr.Node; - import org.apache.sling.api.resource.Resource; import org.apache.sling.models.annotations.Model; import org.apache.sling.models.annotations.Optional; import org.apache.sling.models.annotations.injectorspecific.Self; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - import com.adobe.cq.wcm.core.components.models.ListItem; @Model(adaptables = Resource.class) -public class CustomListItemModel implements ListItem, Serializable { +public class CustomListItem implements ListItem, Serializable { private static final long serialVersionUID = 1L; - private static final Logger LOGGER = LoggerFactory.getLogger(CustomListItemModel.class); + private static final Logger LOGGER = LoggerFactory.getLogger(CustomListItem.class); @Self private Node node; @@ -49,7 +46,7 @@ public class CustomListItemModel implements ListItem, Serializable { private String url; - public CustomListItemModel(){ + public CustomListItem(){ //nothing } @Override diff --git a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/DetectLanguageForms.java b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/DetectLanguageForms.java new file mode 100644 index 0000000..68f88cf --- /dev/null +++ b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/DetectLanguageForms.java @@ -0,0 +1,33 @@ +/* +Copyright 2020 Adobe. All rights reserved. +This file is licensed to you under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may obtain a copy +of the License at http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under +the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS +OF ANY KIND, either express or implied. See the License for the specific language +governing permissions and limitations under the License. +*/ +package com.adobe.acs.adobeuxp.wcm.core.components.models; + +import org.osgi.annotation.versioning.ConsumerType; + +@ConsumerType +public interface DetectLanguageForms { + + default String getLang(){ + throw new UnsupportedOperationException(); + } + + default boolean isSelector(){ + throw new UnsupportedOperationException(); + } + + default String getActionURL(){ + throw new UnsupportedOperationException(); + } + default String getLabel(){ + throw new UnsupportedOperationException(); + } +} diff --git a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/HeaderModel.java b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/HeaderModel.java deleted file mode 100644 index 244f091..0000000 --- a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/HeaderModel.java +++ /dev/null @@ -1,100 +0,0 @@ -/* -Copyright 2020 Adobe. All rights reserved. -This file is licensed to you under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. You may obtain a copy -of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under -the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ -package com.adobe.acs.adobeuxp.wcm.core.components.models; - -import static org.apache.sling.api.resource.ResourceResolver.PROPERTY_RESOURCE_TYPE; - -import java.util.Locale; - -import javax.annotation.PostConstruct; - -import org.apache.http.client.fluent.Request; -import org.apache.sling.api.SlingHttpServletRequest; -import org.apache.sling.api.resource.Resource; -import org.apache.sling.api.resource.ResourceResolver; -import org.apache.sling.models.annotations.Default; -import org.apache.sling.models.annotations.Model; -import org.apache.sling.models.annotations.injectorspecific.InjectionStrategy; -import org.apache.sling.models.annotations.injectorspecific.OSGiService; -import org.apache.sling.models.annotations.injectorspecific.SlingObject; -import org.apache.sling.models.annotations.injectorspecific.ValueMapValue; -import org.apache.sling.settings.SlingSettingsService; - -import com.day.cq.wcm.api.Page; -import com.day.cq.wcm.api.PageManager; - -//@Model(adaptables = Resource.class) -@Model(adaptables = {SlingHttpServletRequest.class, Resource.class}) -public class HeaderModel { - - @OSGiService - private SlingSettingsService settings; - @SlingObject - private Resource currentResource; - @SlingObject - private ResourceResolver resourceResolver; - @SlingObject - private SlingHttpServletRequest req; - - private String languageOtherPath; - private String otherLanguage; - - //private String aa; - private String otherLang; - - @PostConstruct - protected void init() { - - //aa = req.getRequestPathInfo().getResourcePath(); - //aa = req.getRequestURI(); - languageOtherPath = req.getRequestURI(); - /* PageManager pageManager = resourceResolver.adaptTo(PageManager.class); - Page currentPage = pageManager.getContainingPage(currentResource); - - if (currentPage.getLanguage().equals(Locale.CANADA_FRENCH)) { - otherLanguage = Locale.ENGLISH.getLanguage(); - languageOtherPath = currentPage.getPath().replace("/fr_ca", "/en"); - } - else { - otherLanguage = Locale.CANADA_FRENCH.getLanguage(); - languageOtherPath = currentPage.getPath().replace("/en", "/fr_ca"); - }*/ - //if(aa.contains("/en/")||aa.endsWith("en.html")) { - if(languageOtherPath.contains("/en/")||languageOtherPath.endsWith("en.html")) { - //aa = aa.replaceFirst("/en", "/fr_ca"); - languageOtherPath = languageOtherPath.replaceFirst("/en", "/fr_ca"); - otherLanguage = "Francais"; - otherLang = "fr_ca"; - }else { - //aa = aa.replaceFirst("/fr_ca", "/en"); - languageOtherPath = languageOtherPath.replaceFirst("/fr_ca", "/en"); - otherLanguage = "English"; - otherLang = "en"; - } - - } - - public String getLanguageOtherPath() { - return languageOtherPath; - //return aa; - } - - public String getOtherLanguage() { - return otherLanguage; - //return aa; - } - - public String getOtherLang() { - return otherLang; - //return aa; - } -} diff --git a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/LanguageNavigationLabel.java b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/LanguageNavigationLabel.java new file mode 100644 index 0000000..6f42130 --- /dev/null +++ b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/LanguageNavigationLabel.java @@ -0,0 +1,6 @@ +package com.adobe.acs.adobeuxp.wcm.core.components.models; + +public interface LanguageNavigationLabel { + + String getSubtitle(); +} diff --git a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/QuickSearchModel.java b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/QuickSearch.java similarity index 96% rename from source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/QuickSearchModel.java rename to source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/QuickSearch.java index 0249754..d3a249c 100644 --- a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/QuickSearchModel.java +++ b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/QuickSearch.java @@ -14,7 +14,7 @@ import org.osgi.annotation.versioning.ConsumerType; @ConsumerType -public interface QuickSearchModel { +public interface QuickSearch { default String getActionURL(){ throw new UnsupportedOperationException(); } diff --git a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/CustomExperienceFragmentImpl.java b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/CustomExperienceFragmentImpl.java new file mode 100644 index 0000000..5149e64 --- /dev/null +++ b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/CustomExperienceFragmentImpl.java @@ -0,0 +1,139 @@ +/* +Copyright 2020 Adobe. All rights reserved. +This file is licensed to you under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may obtain a copy +of the License at http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under +the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS +OF ANY KIND, either express or implied. See the License for the specific language +governing permissions and limitations under the License. +*/ +package com.adobe.acs.adobeuxp.wcm.core.components.models.impl; + +import java.util.Arrays; +import java.util.List; +import java.util.Locale; +import java.util.MissingResourceException; + +import org.apache.commons.lang3.StringUtils; +import org.apache.sling.api.SlingHttpServletRequest; +import org.apache.sling.api.resource.Resource; +import org.apache.sling.api.resource.ResourceResolver; +import org.apache.sling.models.annotations.DefaultInjectionStrategy; +import org.apache.sling.models.annotations.Exporter; +import org.apache.sling.models.annotations.Model; +import org.apache.sling.models.annotations.Via; +import org.apache.sling.models.annotations.injectorspecific.InjectionStrategy; +import org.apache.sling.models.annotations.injectorspecific.ScriptVariable; +import org.apache.sling.models.annotations.injectorspecific.Self; +import org.apache.sling.models.annotations.injectorspecific.SlingObject; +import org.apache.sling.models.annotations.via.ResourceSuperType; +import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.adobe.cq.export.json.ExporterConstants; +import com.adobe.cq.wcm.core.components.models.ExperienceFragment; +import com.day.cq.wcm.api.Page; + +import lombok.experimental.Delegate; + + +@Model(adaptables = { Resource.class, + SlingHttpServletRequest.class }, adapters = ExperienceFragment.class, resourceType = CustomExperienceFragmentImpl.RESOURCE_TYPE, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL) + +@Exporter(name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, extensions = ExporterConstants.SLING_MODEL_EXTENSION) + +public class CustomExperienceFragmentImpl implements ExperienceFragment { + private static final Logger LOGGER = LoggerFactory.getLogger(CustomExperienceFragmentImpl.class); + + public static final String RESOURCE_TYPE = "adobeuxp/components/content/experiencefragment"; + public static final String AF_ACCEPT_LANG_PARAM = "afAcceptLang"; + public static final String AF_FORMS_LOCATION = "/content/forms/af"; + public static final String LANG_REGEX = "(\\/([\\w]{2})-([\\w]{2})\\/)|(\\/([\\w]{2})\\/)"; + + @Self + @Via(type = ResourceSuperType.class) + @Delegate(excludes = DelegationExclusion.class) + private ExperienceFragment delegate; + + @Self + private SlingHttpServletRequest request; + + @SlingObject + private ResourceResolver resourceResolver; + + @ScriptVariable(injectionStrategy = InjectionStrategy.OPTIONAL) + private Page currentPage; + + @Override + public String getLocalizedFragmentVariationPath() { + + try { + if(StringUtils.startsWith(currentPage.getPath(), AF_FORMS_LOCATION) ) { + String fragmentVariationPath = request.getResource().getValueMap().get(ExperienceFragment.PN_FRAGMENT_VARIATION_PATH, String.class); + String lng = getLanguageParameter(); + LOGGER.debug("Language {}", lng); + if(StringUtils.isNoneEmpty(fragmentVariationPath) && lng!=null) { + LOGGER.debug("Current Page: {} FragmentVariationPath: {} Language: {}",currentPage.getPath(),fragmentVariationPath,lng); + fragmentVariationPath = StringUtils.replaceFirst(fragmentVariationPath, LANG_REGEX, "/"+lng+"/"); + if(resourceExists(fragmentVariationPath)) { + return fragmentVariationPath; + } + + } + } + } catch (Exception e) { + LOGGER.error(e.getMessage()); + } + return delegate.getLocalizedFragmentVariationPath(); + } + + @NotNull + private String getLanguageParameter() { + + return java.util.Optional.ofNullable( + java.util.Optional.ofNullable(request.getParameter(AF_ACCEPT_LANG_PARAM)) + .orElseGet(()->java.util.Optional.ofNullable(getLanguageSelector()) + .orElse(null))) + .orElse(null); + } + + private String getLanguageSelector() { + if(request.getRequestPathInfo().getSelectors().length > 0) { + List selectors = Arrays.asList(request.getRequestPathInfo().getSelectors()); + + if(isValid(parseLocale(selectors.get(0)))) { + return selectors.get(0); + } + } + return null; + } + + private Locale parseLocale(String locale) { + String[] parts = locale.split("_"); + switch (parts.length) { + case 3: return new Locale(parts[0], parts[1], parts[2]); + case 2: return new Locale(parts[0], parts[1]); + case 1: return new Locale(parts[0]); + default: throw new IllegalArgumentException("Invalid locale: " + locale); + } + } + + private boolean isValid(Locale locale) { + try { + return locale.getISO3Language() != null && locale.getISO3Country() != null; + } catch (MissingResourceException e) { + return false; + } + } + + private boolean resourceExists(final String path) { + return (StringUtils.isNotEmpty(path) && this.request.getResourceResolver().getResource(path) != null); + } + + private interface DelegationExclusion { + String getLocalizedFragmentVariationPath(); + } +} diff --git a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/DetectLanguageFormsImpl.java b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/DetectLanguageFormsImpl.java new file mode 100644 index 0000000..f5f4596 --- /dev/null +++ b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/DetectLanguageFormsImpl.java @@ -0,0 +1,145 @@ +/* +Copyright 2020 Adobe. All rights reserved. +This file is licensed to you under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may obtain a copy +of the License at http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under +the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS +OF ANY KIND, either express or implied. See the License for the specific language +governing permissions and limitations under the License. +*/ +package com.adobe.acs.adobeuxp.wcm.core.components.models.impl; + +import java.util.Arrays; +import java.util.List; +import java.util.Locale; +import java.util.MissingResourceException; +import org.apache.commons.lang3.StringUtils; +import org.apache.sling.api.SlingHttpServletRequest; +import org.apache.sling.models.annotations.Model; +import org.apache.sling.models.annotations.injectorspecific.InjectionStrategy; +import org.apache.sling.models.annotations.injectorspecific.ScriptVariable; +import org.apache.sling.models.annotations.injectorspecific.SlingObject; +import org.apache.sling.models.annotations.injectorspecific.ValueMapValue; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.adobe.acs.adobeuxp.wcm.core.components.models.DetectLanguageForms; +import com.day.cq.wcm.api.Page; + + +@Model( + adaptables = SlingHttpServletRequest.class, + adapters = {DetectLanguageForms.class}, + resourceType = DetectLanguageFormsImpl.RESOURCE_TYPE + ) +public class DetectLanguageFormsImpl implements DetectLanguageForms { + public static final String RESOURCE_TYPE = "adobeuxp/components/content/languagenavigationForms"; + private static final Logger LOGGER = LoggerFactory.getLogger(DetectLanguageFormsImpl.class); + public static final String AF_ACCEPT_LANG_PARAM = "afAcceptLang"; + public static final String AF_FORMS_LOCATION = "/content/forms/af"; + public static final String AF_ACCEPT_LANG_REGEX = "(afAcceptLang=(([\\w]{2})-([\\w]{2})))|(afAcceptLang=([\\w]{2}))"; + public static final String SELECTOR_LANG_REGEX = "(.([\\w]{2})-([\\w]{2}).html)|(.([\\w]{2}).html)"; + + + @ScriptVariable + protected Page currentPage; + + @SlingObject + private SlingHttpServletRequest request; + + + @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL) + @Nullable + private String label; + + @Override + @Nullable + public String getActionURL(){ + String lng = getLang(); + if(lng.equals("fr") && !isSelector()) { + String query = StringUtils.replaceFirst(request.getQueryString(), AF_ACCEPT_LANG_REGEX, "afAcceptLang=en"); + return request.getRequestURI() + "?" + query; + }else if(lng.equals("fr") && isSelector()) { + String uri = StringUtils.replaceFirst(request.getRequestURI(), SELECTOR_LANG_REGEX, "en.html"); + return uri; + }else if(lng.equals("en") && !isSelector()) { + String query = StringUtils.replaceFirst(request.getQueryString(), AF_ACCEPT_LANG_REGEX, "afAcceptLang=fr"); + return request.getRequestURI() + "?" + query; + }else if(lng.equals("en") && isSelector()) { + String uri = StringUtils.replaceFirst(request.getRequestURI(), SELECTOR_LANG_REGEX, "fr.html"); + return uri; + } + + return request.getRequestURI() + (request.getQueryString() != null ? "?" + request.getQueryString() : ""); + } + + @Override + @Nullable + public String getLabel(){ + return label; + } + + @Override + @Nullable + public boolean isSelector(){ + if(getLanguageSelector()!=null) { + return true; + } + return false; + } + + @Override + public String getLang(){ + if(StringUtils.startsWith(currentPage.getPath(), AF_FORMS_LOCATION) ) { + + return getLanguageParameter(); + } + return currentPage == null ? Locale.getDefault().toLanguageTag() + : currentPage.getLanguage(false).toLanguageTag(); + } + + + @NotNull + private String getLanguageParameter() { + + return java.util.Optional.ofNullable( + java.util.Optional.ofNullable(request.getParameter(AF_ACCEPT_LANG_PARAM)) + .orElseGet(()->java.util.Optional.ofNullable(getLanguageSelector()) + .orElse(null))) + .orElse(null); + } + + private String getLanguageSelector() { + + if(request.getRequestPathInfo().getSelectors().length > 0) { + List selectors = Arrays.asList(request.getRequestPathInfo().getSelectors()); + + if(isValid(parseLocale(selectors.get(0)))) { + return selectors.get(0); + } + } + return null; + } + + private Locale parseLocale(String locale) { + String[] parts = locale.split("_"); + switch (parts.length) { + case 3: return new Locale(parts[0], parts[1], parts[2]); + case 2: return new Locale(parts[0], parts[1]); + case 1: return new Locale(parts[0]); + default: throw new IllegalArgumentException("Invalid locale: " + locale); + } + } + + private boolean isValid(Locale locale) { + try { + return locale.getISO3Language() != null && locale.getISO3Country() != null; + } catch (MissingResourceException e) { + return false; + } + } +} diff --git a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/GCListImpl.java b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/GCListImpl.java index 8c228f2..07fed8b 100644 --- a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/GCListImpl.java +++ b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/GCListImpl.java @@ -12,12 +12,11 @@ package com.adobe.acs.adobeuxp.wcm.core.components.models.impl; import java.util.Collection; + import java.util.Objects; import java.util.stream.Collectors; - import javax.inject.Inject; import javax.inject.Named; - import org.apache.sling.api.SlingHttpServletRequest; import org.apache.sling.api.resource.Resource; import org.apache.sling.api.resource.ValueMap; @@ -31,16 +30,18 @@ import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.adobe.acs.adobeuxp.wcm.core.components.models.CustomListItemModel; +import com.adobe.acs.adobeuxp.wcm.core.components.models.CustomListItem; import com.adobe.cq.export.json.ComponentExporter; import com.adobe.cq.export.json.ExporterConstants; import com.adobe.cq.wcm.core.components.models.List; import com.adobe.cq.wcm.core.components.models.ListItem; +import com.adobe.cq.wcm.core.components.util.AbstractComponentImpl; import com.day.cq.wcm.api.designer.Style; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.experimental.Delegate; + @Model( adaptables = {Resource.class, SlingHttpServletRequest.class}, adapters = {List.class, ComponentExporter.class}, @@ -49,7 +50,7 @@ ) @Exporter(name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, extensions = ExporterConstants.SLING_MODEL_EXTENSION) -public class GCListImpl implements List { +public class GCListImpl extends AbstractComponentImpl implements List { /** * Standard logger. */ @@ -82,7 +83,7 @@ public class GCListImpl implements List { @Inject @Named("customListItems") @Via("resource") - private java.util.List customListItems; + private java.util.List customListItems; /** * Result list. diff --git a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/LanguageNavigationLabelImpl.java b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/LanguageNavigationLabelImpl.java new file mode 100644 index 0000000..90bd05e --- /dev/null +++ b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/LanguageNavigationLabelImpl.java @@ -0,0 +1,68 @@ +/* +Copyright 2020 Adobe. All rights reserved. +This file is licensed to you under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may obtain a copy +of the License at http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under +the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS +OF ANY KIND, either express or implied. See the License for the specific language +governing permissions and limitations under the License. +*/ +package com.adobe.acs.adobeuxp.wcm.core.components.models.impl; + +import javax.annotation.PostConstruct; + + +import org.apache.sling.api.SlingHttpServletRequest; +import org.apache.sling.api.resource.ValueMap; +import org.apache.sling.models.annotations.DefaultInjectionStrategy; +import org.apache.sling.models.annotations.Exporter; +import org.apache.sling.models.annotations.Model; +import org.apache.sling.models.annotations.injectorspecific.InjectionStrategy; +import org.apache.sling.models.annotations.injectorspecific.ScriptVariable; +import org.apache.sling.models.annotations.injectorspecific.ValueMapValue; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.adobe.acs.adobeuxp.wcm.core.components.models.LanguageNavigationLabel; +import com.adobe.cq.export.json.ExporterConstants; +import com.adobe.cq.wcm.core.components.util.AbstractComponentImpl; +import com.day.cq.wcm.api.Page; + +@Model( + adaptables = {SlingHttpServletRequest.class}, + adapters = {LanguageNavigationLabel.class}, + resourceType = {LanguageNavigationLabelImpl.RESOURCE_TYPE}, + defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL +) +@Exporter(name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, extensions = ExporterConstants.SLING_MODEL_EXTENSION) + + +public class LanguageNavigationLabelImpl extends AbstractComponentImpl implements LanguageNavigationLabel { + + protected static final String RESOURCE_TYPE = "adobeuxp/components/content/languagenavigation"; + private static final Logger LOGGER = LoggerFactory.getLogger(LanguageNavigationLabelImpl.class); + + @ScriptVariable + protected com.day.cq.wcm.api.Page currentPage; + + @ScriptVariable + private ValueMap properties; + + private static final String SUBTITLE = "subtitle"; + private String subtitle; + + + @PostConstruct + protected void init() { + Page rootInstitutionPage = currentPage.getAbsoluteParent(2); + subtitle = rootInstitutionPage != null ? rootInstitutionPage.getProperties().get(SUBTITLE, String.class) : " "; + } + + @Override + public String getSubtitle() { + return (subtitle); + } + +} diff --git a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/LayoutContainerUXPImpl.java b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/LayoutContainerUXPImpl.java index 6fb6d32..7ab791d 100644 --- a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/LayoutContainerUXPImpl.java +++ b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/LayoutContainerUXPImpl.java @@ -30,6 +30,7 @@ import lombok.experimental.Delegate; import com.adobe.cq.export.json.ComponentExporter; import com.adobe.cq.wcm.core.components.models.LayoutContainer; +import com.adobe.cq.wcm.core.components.util.AbstractComponentImpl; /** * Layout container model implementation. @@ -42,7 +43,7 @@ defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL ) -public class LayoutContainerUXPImpl implements LayoutContainer{ +public class LayoutContainerUXPImpl extends AbstractComponentImpl implements LayoutContainer{ /** * Standard logger. */ diff --git a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/QuickSearchModelImpl.java b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/QuickSearchImpl.java similarity index 88% rename from source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/QuickSearchModelImpl.java rename to source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/QuickSearchImpl.java index d8354c8..a33acfe 100644 --- a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/QuickSearchModelImpl.java +++ b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/QuickSearchImpl.java @@ -13,6 +13,7 @@ import java.util.Locale; + import org.apache.sling.api.SlingHttpServletRequest; import org.apache.sling.models.annotations.Model; import org.apache.sling.models.annotations.injectorspecific.InjectionStrategy; @@ -20,15 +21,16 @@ import org.apache.sling.models.annotations.injectorspecific.ValueMapValue; import org.jetbrains.annotations.Nullable; -import com.adobe.acs.adobeuxp.wcm.core.components.models.QuickSearchModel; +import com.adobe.acs.adobeuxp.wcm.core.components.models.QuickSearch; +import com.adobe.cq.wcm.core.components.util.AbstractComponentImpl; import com.day.cq.wcm.api.Page; @Model( adaptables = SlingHttpServletRequest.class, - adapters = {QuickSearchModel.class}, - resourceType = QuickSearchModelImpl.RESOURCE_TYPE + adapters = {QuickSearch.class}, + resourceType = QuickSearchImpl.RESOURCE_TYPE ) -public class QuickSearchModelImpl implements QuickSearchModel{ +public class QuickSearchImpl extends AbstractComponentImpl implements QuickSearch { public static final String RESOURCE_TYPE = "adobeuxp/components/content/quickSearch"; @ScriptVariable diff --git a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/SeoComponentImpl.java b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/SeoComponentImpl.java index dcd3982..8416e81 100644 --- a/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/SeoComponentImpl.java +++ b/source/core/src/main/java/com/adobe/acs/adobeuxp/wcm/core/components/models/impl/SeoComponentImpl.java @@ -12,7 +12,9 @@ package com.adobe.acs.adobeuxp.wcm.core.components.models.impl; import com.adobe.acs.adobeuxp.wcm.core.components.models.SeoComponent; + import com.adobe.cq.export.json.ExporterConstants; +import com.adobe.cq.wcm.core.components.util.AbstractComponentImpl; import com.day.cq.commons.jcr.JcrConstants; import com.day.cq.wcm.api.NameConstants; @@ -41,7 +43,7 @@ @Exporter(name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, extensions = ExporterConstants.SLING_MODEL_EXTENSION) -public class SeoComponentImpl implements SeoComponent { +public class SeoComponentImpl extends AbstractComponentImpl implements SeoComponent { protected static final String RESOURCE_TYPE = "adobeuxp/components/structure/seo"; private static final Logger LOGGER = LoggerFactory.getLogger(SeoComponentImpl.class); diff --git a/source/it.launcher/pom.xml b/source/it.launcher/pom.xml index dbf4c7d..8bf35d6 100644 --- a/source/it.launcher/pom.xml +++ b/source/it.launcher/pom.xml @@ -20,7 +20,7 @@ com.adobe.acs adobeuxp - 0.0.1-SNAPSHOT + 0.2.0-SNAPSHOT ../pom.xml @@ -314,12 +314,12 @@ com.adobe.acs adobeuxp.it.tests - 0.0.1-SNAPSHOT + 0.2.0-SNAPSHOT com.adobe.acs adobeuxp.core - 0.0.1-SNAPSHOT + 0.2.0-SNAPSHOT diff --git a/source/it.tests/pom.xml b/source/it.tests/pom.xml index f547484..455d16f 100644 --- a/source/it.tests/pom.xml +++ b/source/it.tests/pom.xml @@ -23,7 +23,7 @@ com.adobe.acs adobeuxp - 0.0.1-SNAPSHOT + 0.2.0-SNAPSHOT ../pom.xml @@ -114,7 +114,7 @@ com.adobe.acs adobeuxp.core - 0.0.1-SNAPSHOT + 0.2.0-SNAPSHOT bundle provided diff --git a/source/pom.xml b/source/pom.xml index e6b00b2..c97c20e 100644 --- a/source/pom.xml +++ b/source/pom.xml @@ -21,7 +21,7 @@ com.adobe.acs adobeuxp pom - 0.0.1-SNAPSHOT + 0.2.0-SNAPSHOT Adobe UPX Project @@ -41,7 +41,7 @@ admin admin admin - 2.14.0 + 2.17.10 5.0.0 UTF-8 UTF-8 diff --git a/source/ui.apps/pom.xml b/source/ui.apps/pom.xml index ce5b6cf..0c0b02a 100644 --- a/source/ui.apps/pom.xml +++ b/source/ui.apps/pom.xml @@ -23,7 +23,7 @@ com.adobe.acs adobeuxp - 0.0.1-SNAPSHOT + 0.2.0-SNAPSHOT ../pom.xml @@ -98,7 +98,7 @@ com.adobe.acs adobeuxp.core - 0.0.1-SNAPSHOT + 0.2.0-SNAPSHOT diff --git a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/clientlibs/clientlib-site-extra/less/grid.less b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/clientlibs/clientlib-site-extra/less/grid.less index 93d74ce..359a830 100644 --- a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/clientlibs/clientlib-site-extra/less/grid.less +++ b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/clientlibs/clientlib-site-extra/less/grid.less @@ -80,7 +80,7 @@ label { font-size: 1.2rem; } input, select, textarea, .guideScribble img, .afTermsAndConditions { - font-size: 1.2rem; +/* font-size: 1.2rem;*/ } .guideFieldDescription.short { diff --git a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/breadcrumb/.content.xml b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/breadcrumb/.content.xml index a234913..7c41c2e 100644 --- a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/breadcrumb/.content.xml +++ b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/breadcrumb/.content.xml @@ -1,6 +1,7 @@ diff --git a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/button/.content.xml b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/button/.content.xml index b666e1c..53dc039 100644 --- a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/button/.content.xml +++ b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/button/.content.xml @@ -1,6 +1,7 @@ diff --git a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/carousel/.content.xml b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/carousel/.content.xml index 68d1d52..e5fe5a1 100644 --- a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/carousel/.content.xml +++ b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/carousel/.content.xml @@ -1,6 +1,7 @@ + diff --git a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/embed/.content.xml b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/embed/.content.xml new file mode 100644 index 0000000..8baab54 --- /dev/null +++ b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/embed/.content.xml @@ -0,0 +1,8 @@ + + diff --git a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/experiencefragment/.content.xml b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/experiencefragment/.content.xml index 2c81151..535d205 100644 --- a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/experiencefragment/.content.xml +++ b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/experiencefragment/.content.xml @@ -2,6 +2,6 @@ diff --git a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/gcBanner/.content.xml b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/gcBanner/.content.xml index 5cb82b8..15c37c1 100644 --- a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/gcBanner/.content.xml +++ b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/gcBanner/.content.xml @@ -2,6 +2,7 @@ diff --git a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/gcList/.content.xml b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/gcList/.content.xml index 0f857a1..b466729 100644 --- a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/gcList/.content.xml +++ b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/gcList/.content.xml @@ -2,5 +2,6 @@ diff --git a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/image/.content.xml b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/image/.content.xml index 021fe0c..2fea2c4 100644 --- a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/image/.content.xml +++ b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/image/.content.xml @@ -1,6 +1,7 @@ diff --git a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigation/.content.xml b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigation/.content.xml index bd9c557..cad49f4 100644 --- a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigation/.content.xml +++ b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigation/.content.xml @@ -1,6 +1,7 @@ diff --git a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigation/itemContent.html b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigation/itemContent.html index ab9fe7d..f24194e 100644 --- a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigation/itemContent.html +++ b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigation/itemContent.html @@ -14,19 +14,14 @@ ~ limitations under the License. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/--> + \ No newline at end of file diff --git a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigationForms/.content.xml b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigationForms/.content.xml new file mode 100644 index 0000000..e137e06 --- /dev/null +++ b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigationForms/.content.xml @@ -0,0 +1,6 @@ + + diff --git a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigationForms/_cq_dialog/.content.xml b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigationForms/_cq_dialog/.content.xml new file mode 100644 index 0000000..8b15a87 --- /dev/null +++ b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigationForms/_cq_dialog/.content.xml @@ -0,0 +1,45 @@ + + + + + + +
+ + + + + + + + + + +
+
+
+
+
+
diff --git a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigationForms/languagenavigationForms.html b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigationForms/languagenavigationForms.html new file mode 100644 index 0000000..9d19a07 --- /dev/null +++ b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/languagenavigationForms/languagenavigationForms.html @@ -0,0 +1,45 @@ + + + +

${'Language selection' @i18n, locale=detectlang.lang}

+ \ No newline at end of file diff --git a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/list/.content.xml b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/list/.content.xml index b2e5ee2..390b92f 100644 --- a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/list/.content.xml +++ b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/list/.content.xml @@ -1,6 +1,7 @@ diff --git a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/navigation/.content.xml b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/navigation/.content.xml index c0906e4..90ae233 100644 --- a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/navigation/.content.xml +++ b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/navigation/.content.xml @@ -1,6 +1,7 @@ diff --git a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/navigation/groupNextLevel.html b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/navigation/groupNextLevel.html index 33c007f..9f32fff 100644 --- a/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/navigation/groupNextLevel.html +++ b/source/ui.apps/src/main/content/jcr_root/apps/adobeuxp/components/content/navigation/groupNextLevel.html @@ -13,11 +13,14 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/--> -