From 7be938bd7f3f9e5ca4c20d090d1f8dc572c1d283 Mon Sep 17 00:00:00 2001 From: Pankaj Parashar Date: Fri, 26 Nov 2021 10:25:17 +0530 Subject: [PATCH 1/5] Update Historical Versions (#838) As per System Requirements mentioned at https://github.com/adobe/aem-project-archetype/tree/master --- VERSIONS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSIONS.md b/VERSIONS.md index e9d7b0bd0..fcf77bee8 100644 --- a/VERSIONS.md +++ b/VERSIONS.md @@ -20,4 +20,4 @@ Archetype Version | AEM Version 20, 21, 22 | 6.5, 6.4, 6.3 + SP3 23 | 6.5, 6.4, 6.3 + SP3, AEM as a Cloud Service 24, 25, 26, 27 | 6.5.5, 6.4.8.1, AEM as a Cloud Service -28, 30, 31 | 6.5.5, AEM as a Cloud Service +28, 30, 31, 32 | 6.5.7, AEM as a Cloud Service From 46873f2f3129ef6263ec1a637575220e7e44ce19 Mon Sep 17 00:00:00 2001 From: deepprakash345 Date: Thu, 24 Mar 2022 14:38:25 +0530 Subject: [PATCH 2/5] merge release/36 to master . after release step (#910) --- README.md | 4 +- VERSIONS.md | 2 +- pom.xml | 5 +- src/main/archetype/all/pom.xml | 15 ++ src/main/archetype/it.tests/pom.xml | 2 +- src/main/archetype/pom.xml | 54 +++--- .../clientlibs/clientlib-cif/.content.xml | 2 +- .../components/accordion/_cq_editConfig.xml | 9 +- .../components/breadcrumb/.content.xml | 2 +- .../__appId__/components/button/.content.xml | 4 +- .../components/carousel/_cq_editConfig.xml | 9 +- .../catalogpage/customheaderlibs.html | 8 +- .../contentfragment/_cq_editConfig.xml | 31 +--- .../contentfragmentlist/.content.xml | 2 +- .../components/download/.content.xml | 2 +- .../components/download/_cq_editConfig.xml | 4 + .../__appId__/components/embed/.content.xml | 2 +- .../experiencefragment/.content.xml | 2 +- .../experiencefragment/_cq_editConfig.xml | 21 +-- .../form/container/_cq_editConfig.xml | 4 + .../__appId__/components/image/.content.xml | 2 +- .../components/image/_cq_editConfig.xml | 94 +---------- .../languagenavigation/.content.xml | 2 +- .../__appId__/components/list/.content.xml | 2 +- .../components/list/_cq_editConfig.xml | 17 +- .../components/navigation/.content.xml | 2 +- .../__appId__/components/page/.content.xml | 2 +- .../components/remotepage/.content.xml | 2 +- .../components/remotepagenext/.content.xml | 2 +- .../__appId__/components/sharing/.content.xml | 10 -- .../components/tabs/_cq_editConfig.xml | 9 +- .../__appId__/components/teaser/.content.xml | 2 +- .../components/teaser/_cq_editConfig.xml | 4 + .../components/text/_cq_editConfig.xml | 1 + .../__appId__/components/title/.content.xml | 2 +- .../components/title/_cq_editConfig.xml | 4 + ...onfigurationFactoryImpl~__appId__.cfg.json | 10 +- .../template-types/page/policies/.content.xml | 4 +- .../page/structure/.content.xml | 6 +- .../ui.frontend.angular/CustomModelClient.js | 49 ++++++ .../archetype/ui.frontend.angular/README.md | 26 ++- .../actions/ssr/expressjs-ow.js | 155 ++++++++++++++++++ .../ui.frontend.angular/actions/ssr/index.js | 20 +++ .../ui.frontend.angular/angular.json | 34 ++++ .../ui.frontend.angular/manifest.yml | 14 ++ .../ui.frontend.angular/package.json | 4 + .../ui.frontend.angular/serverless.ts | 103 ++++++++++++ .../ui.frontend.angular/tsconfig.server.json | 3 +- .../ui.frontend.general/package-lock.json | 18 +- .../components/commerce/_navigation.scss | 20 +++ .../components/commerce/_productcarousel.scss | 7 + .../commerce/_productcollection.scss | 10 ++ .../components/commerce/_productlist.scss | 2 + src/main/archetype/ui.frontend.react/.babelrc | 32 ++++ .../ui.frontend.react/.env.development | 3 + .../.env.development.decoupled | 26 +++ .../archetype/ui.frontend.react/README.md | 7 +- .../ui.frontend.react/actions/ssr/index.js | 10 +- .../archetype/ui.frontend.react/package.json | 3 +- .../src/server/CustomModelClient.js | 34 ++++ .../webpack.config.adobeio.js | 2 +- .../ui.tests/test-module/package-lock.json | 70 +++----- .../ui.tests/test-module/package.json | 2 +- .../META-INF/archetype-post-generate.groovy | 9 +- 64 files changed, 702 insertions(+), 322 deletions(-) create mode 100644 src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/download/_cq_editConfig.xml create mode 100644 src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/form/container/_cq_editConfig.xml delete mode 100644 src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/sharing/.content.xml create mode 100644 src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/teaser/_cq_editConfig.xml create mode 100644 src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/title/_cq_editConfig.xml create mode 100644 src/main/archetype/ui.frontend.angular/CustomModelClient.js create mode 100644 src/main/archetype/ui.frontend.angular/actions/ssr/expressjs-ow.js create mode 100644 src/main/archetype/ui.frontend.angular/actions/ssr/index.js create mode 100644 src/main/archetype/ui.frontend.angular/manifest.yml create mode 100644 src/main/archetype/ui.frontend.angular/serverless.ts create mode 100644 src/main/archetype/ui.frontend.general/src/main/webpack/components/commerce/_navigation.scss create mode 100644 src/main/archetype/ui.frontend.react/.babelrc create mode 100644 src/main/archetype/ui.frontend.react/.env.development.decoupled create mode 100644 src/main/archetype/ui.frontend.react/src/server/CustomModelClient.js diff --git a/README.md b/README.md index 93b695783..c5fe10745 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ To generate a project, adjust the following command line to your needs: mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate \ -D archetypeGroupId=com.adobe.aem \ -D archetypeArtifactId=aem-project-archetype \ - -D archetypeVersion=35\ + -D archetypeVersion=36\ -D appTitle="My Site" \ -D appId="mysite" \ -D groupId="com.mysite" @@ -97,7 +97,7 @@ Name | Default | Description Archetype | AEM as a Cloud Service | AEM 6.5 | Java SE | Maven ---------|---------|---------|---------|--------- -[35](https://github.com/adobe/aem-project-archetype/releases/tag/aem-project-archetype-35) | Continual | 6.5.7.0+ | 8, 11 | 3.3.9+ +[36](https://github.com/adobe/aem-project-archetype/releases/tag/aem-project-archetype-36) | Continual | 6.5.7.0+ | 8, 11 | 3.3.9+ Setup your local development environment for [AEM as a Cloud Service SDK](https://docs.adobe.com/content/help/en/experience-manager-learn/cloud-service/local-development-environment-set-up/overview.html) or for [older versions of AEM](https://docs.adobe.com/content/help/en/experience-manager-learn/foundation/development/set-up-a-local-aem-development-environment.html). diff --git a/VERSIONS.md b/VERSIONS.md index 5ed019502..bcb288712 100644 --- a/VERSIONS.md +++ b/VERSIONS.md @@ -20,4 +20,4 @@ Archetype Version | AEM Version 20, 21, 22 | 6.5, 6.4, 6.3 + SP3 23 | 6.5, 6.4, 6.3 + SP3, AEM as a Cloud Service 24, 25, 26, 27 | 6.5.5, 6.4.8.1, AEM as a Cloud Service -28, 30, 31, 32, 33, 34, 35 | 6.5.7, AEM as a Cloud Service +28, 30, 31, 32, 33, 34, 35, 36 | 6.5.7, AEM as a Cloud Service diff --git a/pom.xml b/pom.xml index 3fa1a3ebb..5a467b493 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ com.adobe.aem aem-project-archetype - 36-SNAPSHOT + 37-SNAPSHOT maven-archetype AEM Multi-Module Archetype @@ -154,6 +154,9 @@ maven-archetype-plugin ${maven.archetype.version} + + false + diff --git a/src/main/archetype/all/pom.xml b/src/main/archetype/all/pom.xml index 7b8ead084..28460809e 100644 --- a/src/main/archetype/all/pom.xml +++ b/src/main/archetype/all/pom.xml @@ -193,6 +193,14 @@ core-forms-components-core /apps/${appId}-vendor-packages/application/install +#end +#if ( $includeExamples == "y" and ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y") and $aemVersion == "cloud" ) ) + + com.adobe.aem + core-forms-components-examples-all + zip + /apps/${appId}-vendor-packages/application/install + #end @@ -413,6 +421,13 @@ core.wcm.components.examples.ui.content zip +#end +#if ( $includeExamples == "y" and ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y") and $aemVersion == "cloud" ) ) + + com.adobe.aem + core-forms-components-examples-all + zip + #end diff --git a/src/main/archetype/it.tests/pom.xml b/src/main/archetype/it.tests/pom.xml index 8b20106d6..fbb64bf2a 100644 --- a/src/main/archetype/it.tests/pom.xml +++ b/src/main/archetype/it.tests/pom.xml @@ -49,7 +49,7 @@ com.adobe.cq aem-cloud-testing-clients - 1.0.0 + 1.0.5 #elseif ($aemVersion.startsWith("6.5")) diff --git a/src/main/archetype/pom.xml b/src/main/archetype/pom.xml index 0d490fb47..2870c5202 100644 --- a/src/main/archetype/pom.xml +++ b/src/main/archetype/pom.xml @@ -71,20 +71,20 @@ ${env.AIO_RUNTIME_NAMESPACE} ${env.AIO_RUNTIME_AUTH} #end - 2.17.12 + 2.18.0 #if ( $includeCommerce == "y" ) - 2.4.2 + 2.6.0 9.0.0-magento242ee #if ( $aemVersion != "cloud") - 1.7.6 + 1.7.7 #end #if ( $aemVersion == "cloud") - 2021.11.18.00 + 2022.01.20.00 #end #end #if ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y") and $aemVersion == "cloud" ) - 0.0.22 + 1.0.6 SDK_FORMS_VERSION #end 5.1.2 @@ -103,7 +103,7 @@ #end #if ( $aemVersion == "cloud") SDK_VERSION - 1.3.0 + 1.4.2 #end $appTitle @@ -871,23 +871,31 @@ Bundle-DocURL: #end #end #if ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y") and $aemVersion == "cloud") - - - com.adobe.aem - aem-forms-sdk-api - ${aem.forms.sdk.api} - - - com.adobe.aem - core-forms-components-apps - zip - ${core.forms.components.version} - - - com.adobe.aem - core-forms-components-core - ${core.forms.components.version} - + + + com.adobe.aem + aem-forms-sdk-api + ${aem.forms.sdk.api} + + + com.adobe.aem + core-forms-components-apps + zip + ${core.forms.components.version} + + + com.adobe.aem + core-forms-components-core + ${core.forms.components.version} + +#end +#if ( $includeExamples == "y" and ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y") and $aemVersion == "cloud" ) ) + + com.adobe.aem + core-forms-components-examples-all + zip + ${core.forms.components.version} + #end #if ( $isSpaProject ) diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/clientlibs/clientlib-cif/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/clientlibs/clientlib-cif/.content.xml index 65b10b4f7..e0e84d303 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/clientlibs/clientlib-cif/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/clientlibs/clientlib-cif/.content.xml @@ -5,4 +5,4 @@ cssProcessor="[default:none,min:none]" jsProcessor="[default:none,min:none]" categories="[${appId}.cif]" - embed="[core.cif.components.product.v1,core.cif.components.productcarousel.v1,core.cif.components.productcollection.v2,core.cif.components.productteaser.v1,core.cif.components.searchbar.v2,core.cif.components.header.v1,core.cif.components.navigation.v2,core.cif.components.react,core.cif.components.carousel.v1,core.cif.components.categorycarousel.v1,core.cif.components.featuredcategorylist.v1]" /> + embed="[core.cif.components.product.v1,core.cif.components.productcarousel.v1,core.cif.components.productcollection.v2,core.cif.components.productteaser.v1,core.cif.components.searchbar.v2,core.cif.components.header.v1,core.cif.components.react,core.cif.components.carousel.v1,core.cif.components.categorycarousel.v1,core.cif.components.featuredcategorylist.v1]" /> diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/accordion/_cq_editConfig.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/accordion/_cq_editConfig.xml index ef3831259..614b8f845 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/accordion/_cq_editConfig.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/accordion/_cq_editConfig.xml @@ -1,9 +1,4 @@ - - \ No newline at end of file + cq:inherit="{Boolean}true" + jcr:primaryType="cq:EditConfig"/> diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/breadcrumb/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/breadcrumb/.content.xml index 4115167c7..2caaa4613 100755 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/breadcrumb/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/breadcrumb/.content.xml @@ -2,5 +2,5 @@ diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/button/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/button/.content.xml index 02d754ffe..7b43a29bd 100755 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/button/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/button/.content.xml @@ -3,8 +3,8 @@ jcr:primaryType="cq:Component" jcr:title="Button" #if ( $includeCommerce == "y" ) - sling:resourceSuperType="core/cif/components/content/button/v2/button" + sling:resourceSuperType="core/cif/components/content/button/v2/button" #else - sling:resourceSuperType="core/wcm/components/button/v1/button" + sling:resourceSuperType="core/wcm/components/button/v2/button" #end componentGroup="${appTitle} - Content"/> diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/carousel/_cq_editConfig.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/carousel/_cq_editConfig.xml index ef3831259..614b8f845 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/carousel/_cq_editConfig.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/carousel/_cq_editConfig.xml @@ -1,9 +1,4 @@ - - \ No newline at end of file + cq:inherit="{Boolean}true" + jcr:primaryType="cq:EditConfig"/> diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/catalogpage/customheaderlibs.html b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/catalogpage/customheaderlibs.html index aa3ad9034..1e7676a15 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/catalogpage/customheaderlibs.html +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/catalogpage/customheaderlibs.html @@ -13,9 +13,9 @@ See the License for the specific language governing permissions and limitations under the License. */--> - - - + + + - + \ No newline at end of file diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/contentfragment/_cq_editConfig.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/contentfragment/_cq_editConfig.xml index ea09b5712..614b8f845 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/contentfragment/_cq_editConfig.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/contentfragment/_cq_editConfig.xml @@ -1,29 +1,4 @@ - - - - - - - - - \ No newline at end of file + diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/contentfragmentlist/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/contentfragmentlist/.content.xml index 023c5acd7..ae065d3cc 100755 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/contentfragmentlist/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/contentfragmentlist/.content.xml @@ -3,5 +3,5 @@ cq:styleElements="[div,section,article,main,aside,header,footer]" jcr:primaryType="cq:Component" jcr:title="Content Fragment List" - sling:resourceSuperType="core/wcm/components/contentfragmentlist/v1/contentfragmentlist" + sling:resourceSuperType="core/wcm/components/contentfragmentlist/v2/contentfragmentlist" componentGroup="${appTitle} - Content"/> diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/download/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/download/.content.xml index 3c186f52c..3e2b18e6d 100755 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/download/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/download/.content.xml @@ -2,5 +2,5 @@ diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/download/_cq_editConfig.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/download/_cq_editConfig.xml new file mode 100644 index 000000000..614b8f845 --- /dev/null +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/download/_cq_editConfig.xml @@ -0,0 +1,4 @@ + + diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/embed/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/embed/.content.xml index 5b99d7ebc..8ad03273a 100755 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/embed/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/embed/.content.xml @@ -2,5 +2,5 @@ \ No newline at end of file diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/experiencefragment/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/experiencefragment/.content.xml index 17830aa3e..318c1558f 100755 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/experiencefragment/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/experiencefragment/.content.xml @@ -3,5 +3,5 @@ cq:styleElements="[div,section,article,main,aside,header,footer]" jcr:primaryType="cq:Component" jcr:title="Experience Fragment" - sling:resourceSuperType="core/wcm/components/experiencefragment/v1/experiencefragment" + sling:resourceSuperType="core/wcm/components/experiencefragment/v2/experiencefragment" componentGroup="${appTitle} - Content"/> diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/experiencefragment/_cq_editConfig.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/experiencefragment/_cq_editConfig.xml index 1333b1e03..614b8f845 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/experiencefragment/_cq_editConfig.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/experiencefragment/_cq_editConfig.xml @@ -1,21 +1,4 @@ - - - - - - - + cq:inherit="{Boolean}true" + jcr:primaryType="cq:EditConfig"/> diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/form/container/_cq_editConfig.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/form/container/_cq_editConfig.xml new file mode 100644 index 000000000..614b8f845 --- /dev/null +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/form/container/_cq_editConfig.xml @@ -0,0 +1,4 @@ + + diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/image/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/image/.content.xml index 1ff0b3fc4..a5b3ebac3 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/image/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/image/.content.xml @@ -5,6 +5,6 @@ #if ( $amp == "y") sling:resourceSuperType="core/wcm/extensions/amp/components/image/v1/image" #else - sling:resourceSuperType="core/wcm/components/image/v2/image" + sling:resourceSuperType="core/wcm/components/image/v3/image" #end componentGroup="${appTitle} - Content"/> diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/image/_cq_editConfig.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/image/_cq_editConfig.xml index 170188b09..1b6ce875e 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/image/_cq_editConfig.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/image/_cq_editConfig.xml @@ -1,92 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/languagenavigation/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/languagenavigation/.content.xml index 48dcf172e..c4258ab96 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/languagenavigation/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/languagenavigation/.content.xml @@ -2,5 +2,5 @@ diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/list/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/list/.content.xml index 57cc3f4eb..2d23d3492 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/list/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/list/.content.xml @@ -2,5 +2,5 @@ diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/list/_cq_editConfig.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/list/_cq_editConfig.xml index 92d0434ad..614b8f845 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/list/_cq_editConfig.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/list/_cq_editConfig.xml @@ -1,15 +1,4 @@ - - - - - - - + diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/navigation/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/navigation/.content.xml index dec499718..e06b9aea9 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/navigation/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/navigation/.content.xml @@ -2,5 +2,5 @@ diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/page/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/page/.content.xml index 610a2f34f..8fb39f3c6 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/page/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/page/.content.xml @@ -9,6 +9,6 @@ #elseif ( $amp == "y" ) sling:resourceSuperType="core/wcm/extensions/amp/components/page/v1/page" #else - sling:resourceSuperType="core/wcm/components/page/v2/page" + sling:resourceSuperType="core/wcm/components/page/v3/page" #end componentGroup=".hidden"/> diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/remotepage/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/remotepage/.content.xml index f6a1a5ef9..a37ea29fe 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/remotepage/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/remotepage/.content.xml @@ -5,6 +5,6 @@ #if ( $isSpaProject ) sling:resourceSuperType="spa-project-core/components/remotepage" #else - sling:resourceSuperType="core/wcm/components/page/v2/page" + sling:resourceSuperType="core/wcm/components/page/v3/page" #end componentGroup=".hidden"/> diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/remotepagenext/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/remotepagenext/.content.xml index 11b75769c..f325de773 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/remotepagenext/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/remotepagenext/.content.xml @@ -5,6 +5,6 @@ #if ( $isSpaProject ) sling:resourceSuperType="spa-project-core/components/remotepagenext" #else - sling:resourceSuperType="core/wcm/components/page/v2/page" + sling:resourceSuperType="core/wcm/components/page/v3/page" #end componentGroup=".hidden"/> diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/sharing/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/sharing/.content.xml deleted file mode 100644 index 6d14bc444..000000000 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/sharing/.content.xml +++ /dev/null @@ -1,10 +0,0 @@ - - diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/tabs/_cq_editConfig.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/tabs/_cq_editConfig.xml index ef3831259..614b8f845 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/tabs/_cq_editConfig.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/tabs/_cq_editConfig.xml @@ -1,9 +1,4 @@ - - \ No newline at end of file + cq:inherit="{Boolean}true" + jcr:primaryType="cq:EditConfig"/> diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/teaser/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/teaser/.content.xml index acdcf0ef9..96d8670ac 100755 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/teaser/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/teaser/.content.xml @@ -3,6 +3,6 @@ xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="cq:Component" jcr:title="Teaser" - sling:resourceSuperType="core/wcm/components/teaser/v1/teaser" + sling:resourceSuperType="core/wcm/components/teaser/v2/teaser" componentGroup="${appTitle} - Content" imageDelegate="${appId}/components/image"/> \ No newline at end of file diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/teaser/_cq_editConfig.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/teaser/_cq_editConfig.xml new file mode 100644 index 000000000..614b8f845 --- /dev/null +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/teaser/_cq_editConfig.xml @@ -0,0 +1,4 @@ + + diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/text/_cq_editConfig.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/text/_cq_editConfig.xml index ed489d2ab..1e8a875f7 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/text/_cq_editConfig.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/text/_cq_editConfig.xml @@ -1,5 +1,6 @@ diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/title/_cq_editConfig.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/title/_cq_editConfig.xml new file mode 100644 index 000000000..614b8f845 --- /dev/null +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/title/_cq_editConfig.xml @@ -0,0 +1,4 @@ + + diff --git a/src/main/archetype/ui.config/src/main/content/jcr_root/apps/__appId__/osgiconfig/config/com.adobe.cq.remote.content.renderer.impl.factory.ConfigurationFactoryImpl~__appId__.cfg.json b/src/main/archetype/ui.config/src/main/content/jcr_root/apps/__appId__/osgiconfig/config/com.adobe.cq.remote.content.renderer.impl.factory.ConfigurationFactoryImpl~__appId__.cfg.json index 0f876fb18..58e7eea5f 100644 --- a/src/main/archetype/ui.config/src/main/content/jcr_root/apps/__appId__/osgiconfig/config/com.adobe.cq.remote.content.renderer.impl.factory.ConfigurationFactoryImpl~__appId__.cfg.json +++ b/src/main/archetype/ui.config/src/main/content/jcr_root/apps/__appId__/osgiconfig/config/com.adobe.cq.remote.content.renderer.impl.factory.ConfigurationFactoryImpl~__appId__.cfg.json @@ -1,13 +1,9 @@ { "getContentPathPattern": "/content/${appId}/(.*)|/conf/${appId}/(.*)/settings/wcm/templates/(.*)", -#if ( $frontendModule == "react") "getRemoteHTMLRendererUrl" : "http://localhost:3233/api/v1/web/guest/${appId}-0.1.0/ssr", -#end -#if ( $frontendModule == "angular") - "getRemoteHTMLRendererUrl" : "http://localhost:3233", -#end "getRequestTimeout": 10000, "getAdditionalRequestHeaders": [ - - ] + + ], + "getCompression": "none" } diff --git a/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/page/policies/.content.xml b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/page/policies/.content.xml index 9d3e1afbf..5590d335d 100644 --- a/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/page/policies/.content.xml +++ b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/page/policies/.content.xml @@ -11,11 +11,11 @@ sling:resourceType="wcm/core/components/policies/mapping"> #if ( $includeCommerce == "y" ) diff --git a/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/page/structure/.content.xml b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/page/structure/.content.xml index 2bf2f135d..ce80ad5ca 100644 --- a/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/page/structure/.content.xml +++ b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/page/structure/.content.xml @@ -20,14 +20,14 @@ #end #if ( $includeCommerce == "y" ) #else diff --git a/src/main/archetype/ui.frontend.angular/CustomModelClient.js b/src/main/archetype/ui.frontend.angular/CustomModelClient.js new file mode 100644 index 000000000..8dd44a51e --- /dev/null +++ b/src/main/archetype/ui.frontend.angular/CustomModelClient.js @@ -0,0 +1,49 @@ +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ Copyright 2018 Adobe Systems Incorporated + ~ + ~ Licensed 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 CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +import { ModelClient } from '@adobe/aem-spa-page-model-manager'; + + +export class CustomModelClient extends ModelClient { + + + constructor(api, ModelManager) { + super(api); + this.ModelManager = ModelManager; + + } + /** + * Fetches a model using the given a resource path + * + * @param {string} modelPath - Path to the model + * @return {*} + */ + fetch(modelPath) { + + if (!modelPath) { + let err = 'Fetching model rejected for path: ' + modelPath; + return Promise.reject(new Error(err)); + } + + if(modelPath.indexOf('/api/v1/web/guest/') > -1){ + let index = modelPath.indexOf('ssr/') + 4; + let fixPath = '/' + modelPath.substr(index, modelPath.length - index); + return this.ModelManager.getData(fixPath); + } + + let err = 'Model ' + modelPath + ' not provided in initial model payload to the render function.'; + return Promise.reject(new Error(err)); + } +} diff --git a/src/main/archetype/ui.frontend.angular/README.md b/src/main/archetype/ui.frontend.angular/README.md index b12fb09e2..64cf8e100 100755 --- a/src/main/archetype/ui.frontend.angular/README.md +++ b/src/main/archetype/ui.frontend.angular/README.md @@ -45,19 +45,33 @@ By default, this project uses [Browserslist](https://github.com/browserslist/bro #if ( $enableSSR == "y" ) -${hash} Frontend SSR Build (Express) +${hash} Frontend SSR Build (Express, IO-Runtime) ${hash}${hash} Features -* Server Side rendering of the SPA editor +* AdobeIO Runtime (Serverless) rendering of the SPA editor +* ExpressJS rendering (serverfull) of the SPA eidtor * Local + Remote development +* Uses AIO CLI + +${hash}${hash} Installation + +1. Install [NodeJS](https://nodejs.org/en/download/) (v10+), globally. This will also install `npm`. +2. Navigate to `ui.frontend` in your project and run `npm install`. (You must have run the archetype with `-DfrontendModule=react` for this to work) +3. If running locally the following images must be installed: + * docker pull openwhisk/action-nodejs-v10:latest + * docker pull adobeapiplatform/adobe-action-nodejs-v10:3.0.21 ${hash}${hash} Usage The following npm scripts are available: -* `npm run build-server` - Build express code (debuggable with sourcemaps) -* `npm run start-ssr-express` - Runs the express code (debuggable with sourcemaps) +* `build-serverless` - Build serverless code for IO Runtime(debuggable with sourcemaps) +* `build-server` - Build express code (debuggable with sourcemaps) +* `start-ssr-express` - Runs the express code (debuggable with sourcemaps) +* `start-ssr-ioruntime` - Deploys the serverless code to a local docker container with AIO CLI. Requires docker running. Enables you to debug with visual studio code. +* `deploy-ssr-ioruntime` - Deploys the serverless code to your IO runtime namespace. Requires the environment variables AIO_RUNTIME_NAMESPACE and AIO_RUNTIME_AUTH to be set. + ${hash}${hash}${hash}${hash} Notes @@ -85,7 +99,7 @@ com.adobe.cq.remote.content.renderer.impl.factory.ConfigurationFactoryImpl~mysit ```json { "getContentPathPattern": "/content/mysite/(.*)|/conf/mysite/(.*)/settings/wcm/templates/(.*)", - "getRemoteHTMLRendererUrl" : "http://localhost:3233/", + "getRemoteHTMLRendererUrl" : "http://localhost:3233/api/v1/web/guest/${appId}-0.1.0/ssr", "getRequestTimeout": 10000, "getAdditionalRequestHeaders": [ @@ -93,6 +107,8 @@ com.adobe.cq.remote.content.renderer.impl.factory.ConfigurationFactoryImpl~mysit } ``` +For express, set `getRemoteHTMLRendererUrl` to `http://localhost:3233`. + In here you put the correct endpoint. By default for demonstration purposes the endpoint is configured to your localhost. For production purposes the URL should point to an actual express instance. Under "getAdditionalRequestHeaders" of this configuration you can put an authentication header that is needed for express, or any other static headers that are desired. diff --git a/src/main/archetype/ui.frontend.angular/actions/ssr/expressjs-ow.js b/src/main/archetype/ui.frontend.angular/actions/ssr/expressjs-ow.js new file mode 100644 index 000000000..23240243b --- /dev/null +++ b/src/main/archetype/ui.frontend.angular/actions/ssr/expressjs-ow.js @@ -0,0 +1,155 @@ +/* + * Copyright 2017 IBM Corporation + * + * Licensed 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 CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Temporarily forked from https://github.com/IBM/expressjs-openwhisk/blob/master/index.js + * Because of dependency issue: + * https://github.com/IBM/expressjs-openwhisk/issues/16 + */ + +const request = require('supertest'); + +/* + OpenWhisk web action redirecting requests to Express + @param {object} app Express app + @param {object} args OpenWhisk Web action request + @param {object} [args.express_locals] Values to add to Express locals + */ +module.exports = exports = (app) => (args) => { + return new Promise((resolve, reject) => { + + if (args.express_locals) { + app.locals = Object.assign(app.locals, args.express_locals); + delete args.express_locals; + } + + // Create mock request based on the original request. + let req = request(app)[args.__ow_method](args.__ow_path); + + if (args.__ow_headers) + req.set(args.__ow_headers); + + if (args.__ow_query) + req.query(args.__ow_query); + + if (args.__ow_body && (args.__ow_method === 'post' || args.__ow_method === 'put' || args.__ow_method === 'patch')) { + req = req.send(args.__ow_body); + } + + app.action_params = args; + + req.end((err, res) => { + if (err) + return resolve({ + statusCode: 500, + body: JSON.stringify(err) + }); + + let body = res.text || res.body; + + let contentType = res.headers['content-type'] || 'text/plain'; + contentType = contentType.split(';')[0]; + if (isBinary(contentType)) + body = new Buffer(body).toString('base64'); + + // Convert response back to a OpenWhisk response object. + return resolve({ + statusCode: res.status, + headers: res.headers, + body: body + }); + }); + }); +} + +const mediaTypes = { + "application/atom+xml": false, + "application/base64": true, + "application/excel": true, + "application/font-woff": true, + "application/gnutar": true, + "application/java-archive": true, + "application/javascript": false, + "application/json": true, // we treat JSON as binary, since its encoding is not variable but defined by RFC4627 + "application/json-patch+json": true, // we treat JSON as binary, since its encoding is not variable but defined by RFC4627 + "application/lha": true, + "application/lzx": true, + "application/mspowerpoint": true, + "application/msword": true, + "application/octet-stream": true, + "application/pdf": true, + "application/postscript": true, + "application/rss+xml": false, + "application/soap+xml": false, + "application/vnd.api+json": true, // we treat JSON as binary, since its encoding is not variable but defined by RFC4627 + "application/vnd.google-earth.kml+xml": false, + "application/vnd.google-earth.kmz": true, + "application/vnd.ms-fontobject": true, + "application/vnd.oasis.opendocument.chart": true, + "application/vnd.oasis.opendocument.database": true, + "application/vnd.oasis.opendocument.formula": true, + "application/vnd.oasis.opendocument.graphics": true, + "application/vnd.oasis.opendocument.image": true, + "application/vnd.oasis.opendocument.presentation": true, + "application/vnd.oasis.opendocument.spreadsheet": true, + "application/vnd.oasis.opendocument.text": true, + "application/vnd.oasis.opendocument.text-master": true, + "application/vnd.oasis.opendocument.text-web": true, + "application/vnd.openxmlformats-officedocument.presentationml.presentation": true, + "application/vnd.openxmlformats-officedocument.presentationml.slide": true, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": true, + "application/vnd.openxmlformats-officedocument.presentationml.template": true, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": true, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": true, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": true, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": true, + "application/x-7z-compressed": true, + "application/x-ace-compressed": true, + "application/x-apple-diskimage": true, + "application/x-arc-compressed": true, + "application/x-bzip": true, + "application/x-bzip2": true, + "application/x-chrome-extension": true, + "application/x-compress": true, + "application/x-compressed": true, + "application/x-debian-package": true, + "application/x-dvi": true, + "application/x-font-truetype": true, + "application/x-font-opentype": true, + "application/x-gtar": true, + "application/x-gzip": true, + "application/x-latex": true, + "application/x-rar-compressed": true, + "application/x-redhat-package-manager": true, + "application/x-shockwave-flash": true, + "application/x-tar": true, + "application/x-tex": true, + "application/x-texinfo": true, + "application/x-vrml": false, + "application/x-www-form-urlencoded": false, + "application/x-x509-ca-cert": true, + "application/x-xpinstall": true, + "application/xhtml+xml": false, + "application/xml-dtd": false, + "application/xml": false, + "application/zip": true +} + +function isBinary(contentType) { + if (contentType.startsWith('text/') || contentType.startsWith('message/')) + return false; + if (contentType.startsWith('audio/') || contentType.startsWith('image/') || contentType.startsWith('video/')) + return true; + return mediaTypes[contentType]; +} \ No newline at end of file diff --git a/src/main/archetype/ui.frontend.angular/actions/ssr/index.js b/src/main/archetype/ui.frontend.angular/actions/ssr/index.js new file mode 100644 index 000000000..c8ac4ad20 --- /dev/null +++ b/src/main/archetype/ui.frontend.angular/actions/ssr/index.js @@ -0,0 +1,20 @@ +const appModule = require('../webapp/server/main'); + +const app = appModule.default(); + +const forward = require('./expressjs-ow')(app); + +function main (args){ + + const refinedArgs = { + '__ow_path': args['__ow_path'], + '__ow_headers': args['__ow_headers'], + '__ow_method': args['__ow_method'], + '__ow_body': args + }; + + return forward(refinedArgs); + +} + +exports.main = main; diff --git a/src/main/archetype/ui.frontend.angular/angular.json b/src/main/archetype/ui.frontend.angular/angular.json index cde0f980d..889095536 100644 --- a/src/main/archetype/ui.frontend.angular/angular.json +++ b/src/main/archetype/ui.frontend.angular/angular.json @@ -33,6 +33,36 @@ "aem-develop": { "deployUrl": "/etc.clientlibs/${appId}/clientlibs/clientlib-angular/resources/" }, + "serverless": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ], + "outputPath": "actions/webapp", + "optimization": false, + "outputHashing": "all", + "sourceMap": false, + "extractCss": true, + "namedChunks": false, + "aot": true, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true, + "budgets": [ + { + "type": "initial", + "maximumWarning": "2mb", + "maximumError": "5mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "6kb", + "maximumError": "10kb" + } + ] + }, "production": { "deployUrl": "/etc.clientlibs/${appId}/clientlibs/clientlib-angular/resources/", "fileReplacements": [ @@ -109,6 +139,10 @@ "tsConfig": "tsconfig.server.json" }, "configurations": { + "serverless": { + "main": "serverless.ts", + "outputPath": "actions/webapp/server" + }, "production": { "outputHashing": "media", "fileReplacements": [ diff --git a/src/main/archetype/ui.frontend.angular/manifest.yml b/src/main/archetype/ui.frontend.angular/manifest.yml new file mode 100644 index 000000000..1048e953e --- /dev/null +++ b/src/main/archetype/ui.frontend.angular/manifest.yml @@ -0,0 +1,14 @@ +packages: + __APP_PACKAGE__: + license: Apache-2.0 + actions: + ssr: + function: actions/ssr/index.js + include: + - [ "actions/webapp/*.html", "./webapp/" ] + web: 'yes' + runtime: 'nodejs:10' + inputs: + LOG_LEVEL: debug + annotations: + final: true diff --git a/src/main/archetype/ui.frontend.angular/package.json b/src/main/archetype/ui.frontend.angular/package.json index 0d8986930..ae6539920 100644 --- a/src/main/archetype/ui.frontend.angular/package.json +++ b/src/main/archetype/ui.frontend.angular/package.json @@ -5,8 +5,11 @@ "scripts": { #if ( $enableSSR == "y") + "build-serverless": "ng build --configuration serverless && ng run angular-app:server:serverless", "build-server": "ng run angular-app:server", "start-ssr-express": "node dist/server/main.js", + "start-ssr-ioruntime": "aio app run --local", + "deploy-ssr-ioruntime": "aio app deploy", #end "start": "ng serve --open --proxy-config ./proxy.conf.json", "build": "ng lint && ng build --configuration=aem-develop && clientlib", @@ -25,6 +28,7 @@ "node-html-parser": "2.0.2", "node-fetch": "^2.6.1", "isomorphic-fetch": "^3.0.0", + "supertest": "^6.2.2", #end "@adobe/aem-angular-editable-components": "^1.2.0", diff --git a/src/main/archetype/ui.frontend.angular/serverless.ts b/src/main/archetype/ui.frontend.angular/serverless.ts new file mode 100644 index 000000000..7ef54a2e5 --- /dev/null +++ b/src/main/archetype/ui.frontend.angular/serverless.ts @@ -0,0 +1,103 @@ +import { ModelManager, ModelClient } from '@adobe/aem-spa-page-model-manager'; +import 'zone.js/dist/zone-node'; + +import { ngExpressEngine } from '@nguniversal/express-engine'; +import * as express from 'express'; + +import { AppServerModule } from './src/main.server'; +import { environment } from './src/environments/environment'; +import { parse } from 'node-html-parser'; +import { CustomModelClient } from './CustomModelClient'; + +const APP_ROOT_PATH = environment.APP_ROOT_PATH; + +const clone = require('clone'); + + +// The Express app is exported so that it can be used by serverless Functions. +export default function app() { + const server = express(); + const distFolder = 'webapp'; + const indexHtml = 'index.html'; + const bodyParser = require('body-parser'); + + // Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine) + server.engine('html', ngExpressEngine({ + bootstrap: AppServerModule, + })); + + server.set('view engine', 'html'); + server.set('views', distFolder); + server.use(bodyParser.urlencoded({ extended: false })); + server.use(bodyParser.json()); + + // Example Express Rest API endpoints + // server.get('/api/**', (req, res) => { }); + // Serve static files from /browser + server.get('*.*', express.static(distFolder, { + maxAge: '1y' + })); + + const rootFolder = '/api/v1/web/guest/${appId}-0.1.0/ssr'; + + server.post('*', (req, res, next) => { + + const pageModelRootPath = req.headers['page-model-root-url'] || APP_ROOT_PATH; + const target = req.url.substr(rootFolder.length, req.url.length - rootFolder.length).replace('.html',''); + + const model = req.body; + const adaptedModel = clone(model); + adaptedModel[':children'][req.url] = adaptedModel[':children'][target]; + + ModelManager.initialize({ path: pageModelRootPath, model: adaptedModel, modelClient: new CustomModelClient('', ModelManager) }).then(() => { + + res.render(indexHtml, { req } , (err, html) => { + + if(!!err){ + next(err); + }else{ + const parsedHtml = parse(html); + const appElement = parsedHtml.querySelector('#spa-root'); + let state = { + rootModel: model, + rootModelUrl: ModelManager.rootPath, + }; + let stateStr = JSON.stringify(state); + + const rendered = `${appElement.innerHTML} + `; + res.send(rendered); + } + + }); + }).catch((error) => { + next(error); + }); + }); + + + + return server; +} + +function run() { + const port = process.env.PORT || 3233; + + // Start up the Node server + const server = app(); + server.listen(port, () => { + console.log(`Node Express server listening on http://localhost:${port}`); + }); +} + +// Webpack will replace 'require' with '__webpack_require__' +// '__non_webpack_require__' is a proxy to Node 'require' +// The below code is to ensure that the server is run only when not requiring the bundle. +declare const __non_webpack_require__: NodeRequire; +const mainModule = __non_webpack_require__.main; +const moduleFilename = mainModule && mainModule.filename || ''; +if (moduleFilename === __filename || moduleFilename.includes('iisnode')) { + run(); +} + +export * from './src/main.server'; diff --git a/src/main/archetype/ui.frontend.angular/tsconfig.server.json b/src/main/archetype/ui.frontend.angular/tsconfig.server.json index f6ca95f06..1d8e7157c 100644 --- a/src/main/archetype/ui.frontend.angular/tsconfig.server.json +++ b/src/main/archetype/ui.frontend.angular/tsconfig.server.json @@ -12,7 +12,8 @@ }, "files": [ "src/main.server.ts", - "server.ts" + "server.ts", + "serverless.ts" ], "exclude": [ "test.ts", diff --git a/src/main/archetype/ui.frontend.general/package-lock.json b/src/main/archetype/ui.frontend.general/package-lock.json index cb677b8a3..e9b94d260 100644 --- a/src/main/archetype/ui.frontend.general/package-lock.json +++ b/src/main/archetype/ui.frontend.general/package-lock.json @@ -2969,9 +2969,9 @@ "dev": true }, "follow-redirects": { - "version": "1.14.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.6.tgz", - "integrity": "sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A==", + "version": "1.14.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", + "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==", "dev": true }, "form-data": { @@ -3961,9 +3961,9 @@ "dev": true }, "nanoid": { - "version": "3.1.30", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.30.tgz", - "integrity": "sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz", + "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==", "dev": true }, "natural-compare": { @@ -4003,9 +4003,9 @@ } }, "node-fetch": { - "version": "2.6.6", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", - "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "dev": true, "requires": { "whatwg-url": "^5.0.0" diff --git a/src/main/archetype/ui.frontend.general/src/main/webpack/components/commerce/_navigation.scss b/src/main/archetype/ui.frontend.general/src/main/webpack/components/commerce/_navigation.scss new file mode 100644 index 000000000..5d39fc1fa --- /dev/null +++ b/src/main/archetype/ui.frontend.general/src/main/webpack/components/commerce/_navigation.scss @@ -0,0 +1,20 @@ + .cmp-navigation__group { + display: flex; + flex-flow: row wrap; +} + +.cmp-navigation__item { + list-style: none; + padding: 0.5em; +} + +.cmp-navigation__item--level-0 .cmp-navigation__group { + display: none; +} + +.cmp-navigation__item--level-0:hover > .cmp-navigation__group { + display: flex; + flex-direction: column; + flex-wrap: nowrap; + position: absolute; +} \ No newline at end of file diff --git a/src/main/archetype/ui.frontend.general/src/main/webpack/components/commerce/_productcarousel.scss b/src/main/archetype/ui.frontend.general/src/main/webpack/components/commerce/_productcarousel.scss index db5374eb5..94fcd8525 100644 --- a/src/main/archetype/ui.frontend.general/src/main/webpack/components/commerce/_productcarousel.scss +++ b/src/main/archetype/ui.frontend.general/src/main/webpack/components/commerce/_productcarousel.scss @@ -1,5 +1,12 @@ .product__card {} +.product__card-content {} +.product__card-actions {} +.product__card-button {} +.product__card-button--add-to-cart {} +.product__card-button--add-to-wish-list {} +.product__card-button-content {} .product__card__image {} +.product__card-title {} .product__image {} .productcarousel__btn {} .productcarousel__btn--next {} diff --git a/src/main/archetype/ui.frontend.general/src/main/webpack/components/commerce/_productcollection.scss b/src/main/archetype/ui.frontend.general/src/main/webpack/components/commerce/_productcollection.scss index d8b67274b..1bb66f46a 100644 --- a/src/main/archetype/ui.frontend.general/src/main/webpack/components/commerce/_productcollection.scss +++ b/src/main/archetype/ui.frontend.general/src/main/webpack/components/commerce/_productcollection.scss @@ -19,6 +19,11 @@ .productcollection__items {} .productcollection__item {} .productcollection__item--staged {} +.productcollection__item-actions {} +.productcollection__item-button {} +.productcollection__item-button--add-to-cart {} +.productcollection__item-button--add-to-wish-list {} +.productcollection__item-button-content {} .productcollection__item-images {} .productcollection__item-image {} .productcollection__item-image--placeholder {} @@ -29,12 +34,17 @@ .productcollection__sort-title {} .productcollection__sort-keys {} .productcollection__sort-order {} +.productcollection__sort-order--asc {} +.productcollection__sort-order--desc {} .productcollection__loadmore-button {} .productcollection__loadmore-spinner {} .productcollection__pagination {} .productcollection__pagination-arrow {} +.productcollection__pagination-arrow--prev {} +.productcollection__pagination-arrow--next {} .productcollection__pagination-arrow--inactive {} .productcollection__pagination-icon {} +.productcollection__pagination-button {} .productcollection__pagination-button--current {} .productcollection__pagination-button--inactive {} .productcollection__pagination-button-title {} \ No newline at end of file diff --git a/src/main/archetype/ui.frontend.general/src/main/webpack/components/commerce/_productlist.scss b/src/main/archetype/ui.frontend.general/src/main/webpack/components/commerce/_productlist.scss index 994c58ea7..e9beea57d 100644 --- a/src/main/archetype/ui.frontend.general/src/main/webpack/components/commerce/_productlist.scss +++ b/src/main/archetype/ui.frontend.general/src/main/webpack/components/commerce/_productlist.scss @@ -1,5 +1,7 @@ .category__root {} .category__root--staged {} +.category__root--noimage {} +.category__root--notitle {} .category__header {} .category__image {} .category__staged {} diff --git a/src/main/archetype/ui.frontend.react/.babelrc b/src/main/archetype/ui.frontend.react/.babelrc new file mode 100644 index 000000000..4af5c732a --- /dev/null +++ b/src/main/archetype/ui.frontend.react/.babelrc @@ -0,0 +1,32 @@ +{ + "presets": [ + ["@babel/preset-env" + , + { + "targets": { + "esmodules": true + } + } + ], + "@babel/react"], + "plugins": [], + "env": { + "test": { + "plugins": [ + [ + "istanbul", + { + "include": [ + "src/**.*" + ], + "exclude": [ + "dist/**.*", + "node_modules/**.*", + "tests/**.*" + ] + } + ] + ] + } + } +} diff --git a/src/main/archetype/ui.frontend.react/.env.development b/src/main/archetype/ui.frontend.react/.env.development index 33068f128..1874be254 100755 --- a/src/main/archetype/ui.frontend.react/.env.development +++ b/src/main/archetype/ui.frontend.react/.env.development @@ -29,4 +29,7 @@ REACT_APP_ROOT=/content/${appId}/${country}/${language}/home.html AIO_RUNTIME_NAMESPACE=guest AIO_RUNTIME_AUTH=23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP AIO_RUNTIME_APIHOST=http://localhost:3233 +OW_NAMESPACE=guest +OW_AUTH=23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP +OW_APIHOST=http://localhost:3233 #end diff --git a/src/main/archetype/ui.frontend.react/.env.development.decoupled b/src/main/archetype/ui.frontend.react/.env.development.decoupled new file mode 100644 index 000000000..5373d6879 --- /dev/null +++ b/src/main/archetype/ui.frontend.react/.env.development.decoupled @@ -0,0 +1,26 @@ +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ Copyright 2021 Adobe Systems Incorporated + ~ + ~ Licensed 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 CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +# Path to the `public` directory when the web app is deployed. In the case of +# AEM, that's the path to the `resources` ClientLib directory. Specifying this +# path is required for features like code splitting to work (because it will be +# prepended to paths in the `asset-manifest.json` file) +PUBLIC_URL=/etc.clientlibs/${appId}/clientlibs/clientlib-react/resources + +REACT_APP_PAGE_MODEL_PATH=/etc.clientlibs/${appId}/clientlibs/clientlib-react/resources/mock.model.json +REACT_APP_API_HOST=http://localhost:3000 +REACT_APP_AEM_AUTHORIZATION_HEADER='Basic YWRtaW46YWRtaW4=' +REACT_APP_ROOT=/content/${appId}/${country}/${language}/home.html diff --git a/src/main/archetype/ui.frontend.react/README.md b/src/main/archetype/ui.frontend.react/README.md index cab92dccd..e86ccb488 100644 --- a/src/main/archetype/ui.frontend.react/README.md +++ b/src/main/archetype/ui.frontend.react/README.md @@ -82,8 +82,11 @@ ${hash}${hash} Usage The following npm scripts are available for deployment under `ui.frontend.ssr.ioruntime`: -* `npm run run-local` - Deploys the serverless code to a local docker container with AIO CLI. Requires docker running. Enables you to debug with visual studio code. -* `npm run deploy:runtime` - Deploys the serverless code to your IO runtime namespace. Requires the environment variables AIO_RUNTIME_NAMESPACE and AIO_RUNTIME_AUTH to be set. +* `build-with-ssr` - Build serverless code for IO Runtime(debuggable with sourcemaps) +* `build-with-express` - Build express code (debuggable with sourcemaps) +* `start-ssr-ioruntime` - Deploys the serverless code to a local docker container with AIO CLI. Requires docker running. Enables you to debug with visual studio code. +* `start-ssr-express` - Runs the express code (debuggable with sourcemaps) +* `deploy-ssr-ioruntime` - Deploys the serverless code to your IO runtime namespace. Requires the environment variables AIO_RUNTIME_NAMESPACE and AIO_RUNTIME_AUTH to be set. ${hash}${hash}${hash}${hash} Notes diff --git a/src/main/archetype/ui.frontend.react/actions/ssr/index.js b/src/main/archetype/ui.frontend.react/actions/ssr/index.js index 58766f390..ab3e409c0 100644 --- a/src/main/archetype/ui.frontend.react/actions/ssr/index.js +++ b/src/main/archetype/ui.frontend.react/actions/ssr/index.js @@ -1,11 +1,17 @@ require("regenerator-runtime/runtime"); const processor = require('../common/app'); +const pako = require('pako'); async function main(args) { - + var data; + if (args.__ow_headers['content-type'] === "application/octet-stream") { + data = Buffer.from(pako.inflate(Buffer.from(args.__ow_body, 'base64')), "base64").toString() + } else { + data = args + } const refinedArgs = { - data: args, + data: data, pageRoot: args.__ow_headers['page-model-root-url'], pagePath: args.__ow_path, wcmmode: args.__ow_headers['wcm-mode'] diff --git a/src/main/archetype/ui.frontend.react/package.json b/src/main/archetype/ui.frontend.react/package.json index cf5a13a74..f07977415 100644 --- a/src/main/archetype/ui.frontend.react/package.json +++ b/src/main/archetype/ui.frontend.react/package.json @@ -21,6 +21,7 @@ "@adobe/aio-sdk": "^3.0.0", "minimist": "^1.2.0", "node-fetch": "^2.6.0", + "pako": "^2.0.4", "react-fast-compare": "^3.0.1", "react-router": "^5.1.2", "regenerator-runtime": "^0.13.7", @@ -43,7 +44,7 @@ #if ( $enableSSR == "y") "cross-env": "^7.0.3", "@adobe/aio-cli": "^8.2.0", - "@adobe/wskdebug": "^1.1.3", + "@openwhisk/wskdebug": "^1.3.0", "babel-core": "^6.26.2", "babel-polyfill": "^6.26.0", "babel-preset-es2015": "^6.24.1", diff --git a/src/main/archetype/ui.frontend.react/src/server/CustomModelClient.js b/src/main/archetype/ui.frontend.react/src/server/CustomModelClient.js new file mode 100644 index 000000000..1a51d7228 --- /dev/null +++ b/src/main/archetype/ui.frontend.react/src/server/CustomModelClient.js @@ -0,0 +1,34 @@ +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ Copyright 2018 Adobe Systems Incorporated + ~ + ~ Licensed 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 CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +import { ModelClient } from '@adobe/aem-spa-page-model-manager'; + + +/** + * Custom ModelClient for the server that will throw an error on the fetch. + * Alternative is to use node-fetch to retrieve the model JSON but in this case we will always send over the payload. + */ +export class CustomModelClient extends ModelClient { + + constructor() { + super(); + } + + fetch(modelPath) { + let err = 'Model ' + modelPath + ' not provided in initial model payload to the render function.'; + return Promise.reject(new Error(err)); + } +} + diff --git a/src/main/archetype/ui.frontend.react/webpack.config.adobeio.js b/src/main/archetype/ui.frontend.react/webpack.config.adobeio.js index 2ce0f34ff..ad251a4cc 100644 --- a/src/main/archetype/ui.frontend.react/webpack.config.adobeio.js +++ b/src/main/archetype/ui.frontend.react/webpack.config.adobeio.js @@ -24,7 +24,7 @@ var isTestEnvironment = process.env.NODE_ENV == 'test'; const serverConfig = { // Tell webpack to start bundling our app at app/index.js - entry: ['babel-polyfill', './src/server/aem-processor.js'], + entry: ['./src/server/aem-processor.js'], target: 'node', externals: nodeExternals({ whitelist: [ diff --git a/src/main/archetype/ui.tests/test-module/package-lock.json b/src/main/archetype/ui.tests/test-module/package-lock.json index b639f604c..f2538fc54 100644 --- a/src/main/archetype/ui.tests/test-module/package-lock.json +++ b/src/main/archetype/ui.tests/test-module/package-lock.json @@ -3073,22 +3073,22 @@ } }, "log4js": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.3.0.tgz", - "integrity": "sha512-Mc8jNuSFImQUIateBFwdOQcmC6Q5maU0VVvdC2R6XMb66/VnT+7WS4D/0EeNMZu1YODmJe5NIn2XftCzEocUgw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.4.0.tgz", + "integrity": "sha512-ysc/XUecZJuN8NoKOssk3V0cQ29xY4fra6fnigZa5VwxFsCsvdqsdnEuAxNN89LlHpbE4KUD3zGcn+kFqonSVQ==", "dev": true, "requires": { - "date-format": "^3.0.0", - "debug": "^4.1.1", - "flatted": "^2.0.1", - "rfdc": "^1.1.4", - "streamroller": "^2.2.4" + "date-format": "^4.0.3", + "debug": "^4.3.3", + "flatted": "^3.2.4", + "rfdc": "^1.3.0", + "streamroller": "^3.0.2" }, "dependencies": { "date-format": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-3.0.0.tgz", - "integrity": "sha512-eyTcpKOcamdhWJXj56DpQMo1ylSQpcGtGKXcU0Tb97+K56/CF5amAqqqNj0+KvA0iw2ynxtHWFsPDSClCxe48w==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.3.tgz", + "integrity": "sha512-7P3FyqDcfeznLZp2b+OMitV9Sz2lUnsT87WaTat9nVwqsBkTzPG3lPLNwW3en6F4pHUiWzr6vb8CLhjdK9bcxQ==", "dev": true }, "debug": { @@ -3100,12 +3100,6 @@ "ms": "2.1.2" } }, - "flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", - "dev": true - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -4406,20 +4400,20 @@ "dev": true }, "streamroller": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-2.2.4.tgz", - "integrity": "sha512-OG79qm3AujAM9ImoqgWEY1xG4HX+Lw+yY6qZj9R1K2mhF5bEmQ849wvrb+4vt4jLMLzwXttJlQbOdPOQVRv7DQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.0.2.tgz", + "integrity": "sha512-ur6y5S5dopOaRXBuRIZ1u6GC5bcEXHRZKgfBjfCglMhmIf+roVCECjvkEYzNQOXIN2/JPnkMPW/8B3CZoKaEPA==", "dev": true, "requires": { - "date-format": "^2.1.0", + "date-format": "^4.0.3", "debug": "^4.1.1", - "fs-extra": "^8.1.0" + "fs-extra": "^10.0.0" }, "dependencies": { "date-format": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-2.1.0.tgz", - "integrity": "sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.3.tgz", + "integrity": "sha512-7P3FyqDcfeznLZp2b+OMitV9Sz2lUnsT87WaTat9nVwqsBkTzPG3lPLNwW3en6F4pHUiWzr6vb8CLhjdK9bcxQ==", "dev": true }, "debug": { @@ -4431,37 +4425,11 @@ "ms": "2.1.2" } }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true } } }, diff --git a/src/main/archetype/ui.tests/test-module/package.json b/src/main/archetype/ui.tests/test-module/package.json index 3e113b198..edb054ebb 100644 --- a/src/main/archetype/ui.tests/test-module/package.json +++ b/src/main/archetype/ui.tests/test-module/package.json @@ -30,7 +30,7 @@ "date-fns": "^2.27.0", "eslint": "^7.4.0", "eslint-plugin-wdio": "^6.0.12", - "log4js": "^6.3.0", + "log4js": "^6.4.0", "pixelmatch": "^5.2.1", "pngjs": "^6.0.0", "request": "^2.88.2", diff --git a/src/main/resources/META-INF/archetype-post-generate.groovy b/src/main/resources/META-INF/archetype-post-generate.groovy index b7305fca7..f51ff7627 100644 --- a/src/main/resources/META-INF/archetype-post-generate.groovy +++ b/src/main/resources/META-INF/archetype-post-generate.groovy @@ -187,6 +187,7 @@ if (includeForms == "n" && includeFormsenrollment == "n" && includeFormscommunic assert new File("$uiTestPackage/test-module/specs/aem/forms.js").delete() assert new File("$uiTestPackage/test-module/lib/util").deleteDir() assert new File("$uiTestPackage/test-module/rules").deleteDir() + assert new File("$uiTestPackage/test-module/assets/form").deleteDir() assert new File("$appsFolder/clientlibs/clientlibs-forms").deleteDir() } else { if (aemVersion == "cloud") { @@ -266,11 +267,6 @@ def cleanUpFrontendModule(frontendModules, optionFrontendModule, rootPom, rootDi assert new File("$appsFolder/components/structure/spa").deleteDir() assert new File("$appsFolder/components/xfpage/body.html").delete() - // Delete EditConfigs - if (includeCommerce == "n") { - assert new File("$appsFolder/components/text/_cq_editConfig.xml").delete() - } - // Delete SPA templates assert new File("$confFolder/settings/wcm/templates/spa-app-template").deleteDir() assert new File("$confFolder/settings/wcm/templates/spa-page-template").deleteDir() @@ -310,6 +306,9 @@ def cleanUpFrontendModule(frontendModules, optionFrontendModule, rootPom, rootDi assert new File(rootDir, "ui.frontend/scripts").deleteDir(); }else if(optionFrontendModule == "angular"){ assert new File(rootDir, "ui.frontend/server.ts").delete(); + assert new File(rootDir, "ui.frontend/serverless.ts").delete(); + assert new File(rootDir, "ui.frontend/manifest.yml").delete(); + assert new File(rootDir, "ui.frontend/CustomModelClient.js").delete(); assert new File(rootDir, "ui.frontend/tsconfig.server.json").delete(); assert new File(rootDir, "ui.frontend/src/main.server.ts").delete(); assert new File(rootDir, "ui.frontend/src/app/app.server.module.ts").delete(); From ca31098f9b5c1844754413d5346d1e6c4174ea58 Mon Sep 17 00:00:00 2001 From: Barshat Rai Date: Mon, 27 Jun 2022 21:58:35 +0530 Subject: [PATCH 3/5] Release/37 (#952) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * CIF-2628 - Remove reference to Venia from Archetype (#873) * remove references to Venia * Issue/angular ssr - io runtime support Provide support for IO runtime in the angular spa editor. This will provide support for performing SSR for aem in the cloud as well. Co-authored-by: Niek Raaijmakers Co-authored-by: Zoran Nikolovski * releng - Update CIF to January release (#881) * releng - Update CIF to January release * Add feedback * CIF-2678 - Styling is broken on catalog page in Venia and archetype projects (#884) * fixed HTL syntax in catalogpage customheaderlibs.html * CIF-2638: Move navigation styling to archetype (#888) * add rule to remove form ui test assets if not a forms project (#890) * Update aemanalyser maven plugin to 1.4.0 (#895) * Bump log4js in /src/main/archetype/ui.tests/test-module (#879) Bumps [log4js](https://github.com/log4js-node/log4js-node) from 6.3.0 to 6.4.0. - [Release notes](https://github.com/log4js-node/log4js-node/releases) - [Changelog](https://github.com/log4js-node/log4js-node/blob/master/CHANGELOG.md) - [Commits](https://github.com/log4js-node/log4js-node/compare/v6.3.0...v6.4.0) --- updated-dependencies: - dependency-name: log4js dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump nanoid in /src/main/archetype/ui.frontend.general (#880) Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.30 to 3.2.0. - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](https://github.com/ai/nanoid/compare/3.1.30...3.2.0) --- updated-dependencies: - dependency-name: nanoid dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump node-fetch in /src/main/archetype/ui.frontend.general (#883) Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7. - [Release notes](https://github.com/node-fetch/node-fetch/releases) - [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7) --- updated-dependencies: - dependency-name: node-fetch dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump aem-testing-clients to 1.0.5 (#892) Fixes: SLING-11131 - Remove Guava Dependency for CVE-2018-10237 and CVE-2020-8908 SLING-11124 - Update Apache HTTP Client Dependency for CVE-2020-13956 Allow to set "forceBasicAuth" for author and publish instance separately Co-authored-by: Andrei Tuicu * Bump follow-redirects in /src/main/archetype/ui.frontend.general (#894) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.6 to 1.14.8. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.6...v1.14.8) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Restore .gitignore files to generated projects (#889) * restore gitignore file * disable default exclude rule * Update Core Components to v2.18.0 (#897) * Update Core Components to v2.18.0 - update dependency of core components to latest v2.18.0 - update resourceSuperType of proxy components to latest component version - enable inheritance of edit config from parent component - remove deprecated sharing component fixes #896 * Adjust AIO SSR configuration, handle gzip payload (#903) Co-authored-by: Cezary Czernecki Co-authored-by: Hanish Bansal <38317539+habansal@users.noreply.github.com> * CIF-2721: update CIF Core Components to 2.6.0 (#899) * CIF-2526 - Add add-to-cart button in all product collections (#904) * updated style templates for productcarousel, productcollection and productlist component * Update forms (#901) * Update Forms Core Components to v1.0.4 Also include examples if user chose to in project creation @review @rismehta * CQ-4331109 Update to forms core components v1.0.6 * Update AEM Analyser Maven Plugin to 1.4.2 (#906) * updated README and VERSIONS for 36 release (#908) Co-authored-by: ddewanji * Release/36 merge into develop after release step (#909) * [maven-release-plugin] prepare release aem-project-archetype-36 * [maven-release-plugin] prepare for next development iteration Co-authored-by: adobe-bot * Update the AEMAnalyser update to 1.4.6 (#912) Co-authored-by: Niek Raaijmakers * Adding updated immutable files gnerated by AEM Dispatcher Tools 2.0.91 (#918) * CIF-2734: update CIF Core Components to 2.8.0 and CIF GQL Client to 1.7.10 (#923) * Update Core Components to v2.19.0 (#926) * Update Core Components to v2.19.0 - update dependency of core components to 2.19.0 - set proxy search component to v2 - set proxy amp image component to v2 fixes #921 * SITES-5185 - Ensure all GraphQL Queries to publisher are using Persistent Queries and not POST requests (#922) * Update aemanalyser-maven-plugin to 1.4.8 (#928) Updating to the latest release to get some improvements and bugfixes. * Load js clientlibs async in customfooterlibs (#934) * CIF-2302 - JS error in console (#935) * load js clientlibs async in customfooterlibs * load js clientlibs async in customfooterlibs * Update aemanalyser plugin to 1.4.10 (#936) We should update to the latest release: https://github.com/adobe/aemanalyser-maven-plugin/releases/tag/aemanalyser-maven-plugin-1.4.10 * CIF-2289 - Create a CIF Page v3 component based on the WCM Page v3 (#933) * update CIF page to v3 * update CIF components to 2.9.0 * CIF-2732 - Teaser: add option to open CTA in a new Tab (#932) * updated commerce teaser proxy to v3 * Adding model.json cache settings to dispatcher (#937) * * adding model.json cache settings to dispatcher * bump of required version of spa.project.core * * adding model.json cache settings to dispatcher * bump of required version of spa.project.core Co-authored-by: Bartosz Borowski * Cq 4343453 (#945) * CQ-4343453 Initial commit for af2 forms component * CQ-4343453 using flag includeFormsheadless for headless forms * CQ-4343453 changes to include includeFormsheadless * CQ-4343453 Renaming * CQ-4343453 include ui.frontend.forms module * CQ-4343453 adding basic af2 template and some minor fixes * CQ-4343453 closing review comments * CQ-4343453 Update Readme * CQ-4343453 Updated package.json with aemforms dependencies, changes in template and templatetypes * CQ-4343453 Added Sample Form Json * CQ-4343453 Added test case * CQ-4343453 template-type editable * CQ-4343453 minor fixes * CQ-4343453 removing unnecessary lines * CQ-4343453 aligning npm packages to new names * CQ-4343453 Review comments * CQ-4343453 build fix * revert 940419a Co-authored-by: barshatr * CQ-4343453 Upgrade forms core components (#947) * CQ-4343453 Upgrade forms core components * CQ-4343453 Update @aemforms artifacts in package.json Co-authored-by: barshatr * CQ-4343453 Update sample form for multiple submit fix (#948) Co-authored-by: barshatr * CQ-4343453 Exclude forms core components if cloud (#949) * CQ-4343453 Exclude forms core components if cloud * CQ-4343453 include sdk api for cloud * CQ-4343453 minor changes Co-authored-by: barshatr * updated README and VERSIONS for 37 release (#944) Co-authored-by: barshatr * CQ-4343453 remove debugger from form.tsx (#950) Co-authored-by: barshatr * [maven-release-plugin] prepare release aem-project-archetype-37 * [maven-release-plugin] prepare for next development iteration * remove extra spaces Co-authored-by: Burkhard Pauli Co-authored-by: Mark J. Becker Co-authored-by: Niek Raaijmakers Co-authored-by: Niek Raaijmakers Co-authored-by: Zoran Nikolovski Co-authored-by: Levente Sántha Co-authored-by: Daniel Gordon Co-authored-by: Carsten Ziegeler Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrei Tuicu Co-authored-by: Andrei Tuicu Co-authored-by: Cezary Czernecki Co-authored-by: Cezary Czernecki Co-authored-by: Hanish Bansal <38317539+habansal@users.noreply.github.com> Co-authored-by: Dirk Rudolph Co-authored-by: Viresh Gupta Co-authored-by: David Bosschaert Co-authored-by: deepprakash345 Co-authored-by: ddewanji Co-authored-by: adobe-bot Co-authored-by: Patrick Heinzelmann Co-authored-by: Andreea Miruna Moise <53038821+sandru85@users.noreply.github.com> Co-authored-by: Bartosz Borowski Co-authored-by: Bartosz Borowski Co-authored-by: barshatr --- README.md | 6 +- VERSIONS.md | 2 +- pom.xml | 2 +- src/main/archetype/all/pom.xml | 10 +- src/main/archetype/archetype.properties | 1 + src/main/archetype/core/pom.xml | 4 +- .../src/conf.d/available_vhosts/default.vhost | 17 +- .../src/conf.d/dispatcher_vhost.conf | 57 +++++- .../filters/default_filters.any | 15 +- src/main/archetype/pom.xml | 23 ++- src/main/archetype/ui.apps/pom.xml | 33 ++-- .../clientlibs/clientlib-cif/.content.xml | 2 +- .../adaptiveForm/formcontainer/.content.xml | 7 + .../commerce/catalogpage/.content.xml | 2 +- .../catalogpage/customfooterlibs.html | 6 +- .../catalogpage/customheaderlibs.html | 2 +- .../components/commerce/teaser/.content.xml | 2 +- .../__appId__/components/image/.content.xml | 2 +- .../__appId__/components/page/.content.xml | 4 +- .../components/page/customfooterlibs.html | 9 +- .../components/page/customheaderlibs.html | 5 +- .../__appId__/components/search/.content.xml | 4 +- .../main/content/META-INF/vault/filter.xml | 3 + .../settings/wcm/policies/.content.xml | 64 +++++++ .../template-types/af-page-v2/.content.xml | 8 + .../af-page-v2/initial/.content.xml | 15 ++ .../af-page-v2/policies/.content.xml | 22 +++ .../af-page-v2/structure/.content.xml | 36 ++++ .../template-types/af-page-v2/thumbnail.png | Bin 0 -> 12092 bytes .../wcm/templates/blank-af-v2/.content.xml | 11 ++ .../blank-af-v2/initial/.content.xml | 15 ++ .../blank-af-v2/policies/.content.xml | 22 +++ .../blank-af-v2/structure/.content.xml | 36 ++++ .../wcm/templates/blank-af-v2/thumbnail.png | Bin 0 -> 12086 bytes .../af_model_sample.json/.content.xml | 20 ++ .../_jcr_content/renditions/original | 179 ++++++++++++++++++ .../renditions/original.dir/.content.xml | 8 + .../ui.frontend.react.forms.af/.babelrc | 32 ++++ .../archetype/ui.frontend.react.forms.af/.env | 21 ++ .../.env.development | 21 ++ .../ui.frontend.react.forms.af/README.md | 62 ++++++ .../ui.frontend.react.forms.af/assembly.xml | 16 ++ .../clientlib.config.js | 57 ++++++ .../ui.frontend.react.forms.af/package.json | 46 +++++ .../ui.frontend.react.forms.af/pom.xml | 126 ++++++++++++ .../public/index.html | 20 ++ .../ui.frontend.react.forms.af/src/Form.tsx | 56 ++++++ .../src/hooks/useEditorEvents.js | 82 ++++++++ .../ui.frontend.react.forms.af/src/index.tsx | 17 ++ .../ui.frontend.react.forms.af/tsconfig.json | 17 ++ .../utils/entrypoints.js | 27 +++ .../webpack.common.js | 45 +++++ .../ui.frontend.react.forms.af/webpack.dev.js | 48 +++++ .../webpack.prod.js | 32 ++++ .../META-INF/archetype-post-generate.groovy | 31 ++- .../META-INF/maven/archetype-metadata.xml | 44 +++++ .../projects/basic-6.5.0/archetype.properties | 1 + .../projects/basic/archetype.properties | 1 + .../projects/cif-cloud/archetype.properties | 1 + .../projects/cif/archetype.properties | 1 + .../archetype.properties | 1 + .../projects/cloud/archetype.properties | 1 + .../archetype.properties | 3 +- .../archetype.properties | 1 + .../forms-headless/archetype.properties | 27 +++ .../projects/forms-headless/goal.txt | 1 + .../frontend-angular-ssr/archetype.properties | 1 + .../frontend-angular/archetype.properties | 1 + .../frontend-general/archetype.properties | 1 + .../frontend-react-ssr/archetype.properties | 1 + .../frontend-react/archetype.properties | 1 + 71 files changed, 1432 insertions(+), 65 deletions(-) create mode 100644 src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/adaptiveForm/formcontainer/.content.xml create mode 100644 src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/.content.xml create mode 100644 src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/initial/.content.xml create mode 100644 src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/policies/.content.xml create mode 100644 src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/structure/.content.xml create mode 100644 src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/thumbnail.png create mode 100644 src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/.content.xml create mode 100644 src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/initial/.content.xml create mode 100644 src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/policies/.content.xml create mode 100644 src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/structure/.content.xml create mode 100644 src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/thumbnail.png create mode 100755 src/main/archetype/ui.content/src/main/content/jcr_root/content/dam/__appId__/af_model_sample.json/.content.xml create mode 100755 src/main/archetype/ui.content/src/main/content/jcr_root/content/dam/__appId__/af_model_sample.json/_jcr_content/renditions/original create mode 100755 src/main/archetype/ui.content/src/main/content/jcr_root/content/dam/__appId__/af_model_sample.json/_jcr_content/renditions/original.dir/.content.xml create mode 100644 src/main/archetype/ui.frontend.react.forms.af/.babelrc create mode 100644 src/main/archetype/ui.frontend.react.forms.af/.env create mode 100644 src/main/archetype/ui.frontend.react.forms.af/.env.development create mode 100644 src/main/archetype/ui.frontend.react.forms.af/README.md create mode 100644 src/main/archetype/ui.frontend.react.forms.af/assembly.xml create mode 100644 src/main/archetype/ui.frontend.react.forms.af/clientlib.config.js create mode 100644 src/main/archetype/ui.frontend.react.forms.af/package.json create mode 100644 src/main/archetype/ui.frontend.react.forms.af/pom.xml create mode 100644 src/main/archetype/ui.frontend.react.forms.af/public/index.html create mode 100644 src/main/archetype/ui.frontend.react.forms.af/src/Form.tsx create mode 100644 src/main/archetype/ui.frontend.react.forms.af/src/hooks/useEditorEvents.js create mode 100644 src/main/archetype/ui.frontend.react.forms.af/src/index.tsx create mode 100644 src/main/archetype/ui.frontend.react.forms.af/tsconfig.json create mode 100644 src/main/archetype/ui.frontend.react.forms.af/utils/entrypoints.js create mode 100644 src/main/archetype/ui.frontend.react.forms.af/webpack.common.js create mode 100644 src/main/archetype/ui.frontend.react.forms.af/webpack.dev.js create mode 100644 src/main/archetype/ui.frontend.react.forms.af/webpack.prod.js create mode 100644 src/test/resources/projects/forms-headless/archetype.properties create mode 100644 src/test/resources/projects/forms-headless/goal.txt diff --git a/README.md b/README.md index c5fe10745..e44c96daa 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ To generate a project, adjust the following command line to your needs: mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate \ -D archetypeGroupId=com.adobe.aem \ -D archetypeArtifactId=aem-project-archetype \ - -D archetypeVersion=36\ + -D archetypeVersion=37\ -D appTitle="My Site" \ -D appId="mysite" \ -D groupId="com.mysite" @@ -92,12 +92,12 @@ Name | Default | Description `enableDynamicMedia` | `n` | Enabled foundation DynamicMedia components in project policy settings and activates Dynamic Media features in Core Image component's policy. `enableSSR` | `n` | Option to enable SSR for the front-end project `precompiledScripts` | `n` | Option to [precompile](https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/archetype/precompiled-bundled-scripts.html) the server-side scripts from `ui.apps` and attach them to the build as a secondary bundle artifact in the `ui.apps` project. `aemVersion` should be set to `cloud`. - +`includeFormsheadless` | `n` | Includes [Forms Core Components](https://github.com/adobe/aem-core-forms-components) dependencies, ui.frontend.react.forms.af and headless artifacts. ## System Requirements Archetype | AEM as a Cloud Service | AEM 6.5 | Java SE | Maven ---------|---------|---------|---------|--------- -[36](https://github.com/adobe/aem-project-archetype/releases/tag/aem-project-archetype-36) | Continual | 6.5.7.0+ | 8, 11 | 3.3.9+ +[37](https://github.com/adobe/aem-project-archetype/releases/tag/aem-project-archetype-37) | Continual | 6.5.7.0+ | 8, 11 | 3.3.9+ Setup your local development environment for [AEM as a Cloud Service SDK](https://docs.adobe.com/content/help/en/experience-manager-learn/cloud-service/local-development-environment-set-up/overview.html) or for [older versions of AEM](https://docs.adobe.com/content/help/en/experience-manager-learn/foundation/development/set-up-a-local-aem-development-environment.html). diff --git a/VERSIONS.md b/VERSIONS.md index bcb288712..4472ee11d 100644 --- a/VERSIONS.md +++ b/VERSIONS.md @@ -20,4 +20,4 @@ Archetype Version | AEM Version 20, 21, 22 | 6.5, 6.4, 6.3 + SP3 23 | 6.5, 6.4, 6.3 + SP3, AEM as a Cloud Service 24, 25, 26, 27 | 6.5.5, 6.4.8.1, AEM as a Cloud Service -28, 30, 31, 32, 33, 34, 35, 36 | 6.5.7, AEM as a Cloud Service +28, 30, 31, 32, 33, 34, 35, 36, 37 | 6.5.7, AEM as a Cloud Service diff --git a/pom.xml b/pom.xml index 5a467b493..2054854d4 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ com.adobe.aem aem-project-archetype - 37-SNAPSHOT + 38-SNAPSHOT maven-archetype AEM Multi-Module Archetype diff --git a/src/main/archetype/all/pom.xml b/src/main/archetype/all/pom.xml index 28460809e..f9e2bb083 100644 --- a/src/main/archetype/all/pom.xml +++ b/src/main/archetype/all/pom.xml @@ -181,7 +181,7 @@ #end #end -#if ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y") and $aemVersion == "cloud" ) +#if ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y" or $includeFormsheadless == "y") and $aemVersion != "cloud" ) com.adobe.aem core-forms-components-apps @@ -194,7 +194,7 @@ /apps/${appId}-vendor-packages/application/install #end -#if ( $includeExamples == "y" and ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y") and $aemVersion == "cloud" ) ) +#if ( $includeExamples == "y" and ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y" or $includeFormsheadless == "y") and $aemVersion == "cloud" ) ) com.adobe.aem core-forms-components-examples-all @@ -397,7 +397,7 @@ zip #end -#if ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y") and $aemVersion == "cloud" ) +#if ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y" or $includeFormsheadless == "y") and $aemVersion != "cloud" ) com.adobe.aem @@ -422,7 +422,7 @@ zip #end -#if ( $includeExamples == "y" and ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y") and $aemVersion == "cloud" ) ) +#if ( $includeExamples == "y" and ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y" or $includeFormsheadless == "y") and $aemVersion == "cloud" ) ) com.adobe.aem core-forms-components-examples-all @@ -430,4 +430,4 @@ #end - + \ No newline at end of file diff --git a/src/main/archetype/archetype.properties b/src/main/archetype/archetype.properties index 9563b92b3..1ec0bf3a5 100644 --- a/src/main/archetype/archetype.properties +++ b/src/main/archetype/archetype.properties @@ -25,3 +25,4 @@ amp=${amp} enableDynamicMedia=${enableDynamicMedia} enableSSR=${enableSSR} precompiledScripts=${precompiledScripts} +includeFormsheadless=${includeFormsheadless} diff --git a/src/main/archetype/core/pom.xml b/src/main/archetype/core/pom.xml index d98e0983a..6e4cb603e 100644 --- a/src/main/archetype/core/pom.xml +++ b/src/main/archetype/core/pom.xml @@ -207,16 +207,18 @@ Import-Package: javax.annotation;version=0.0.0,* #end #end -#if ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y") and $aemVersion == "cloud" ) +#if ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y" or $includeFormsheadless == "y") com.adobe.aem aem-forms-sdk-api + #if ($aemVersion != "cloud") com.adobe.aem core-forms-components-core + #end #end diff --git a/src/main/archetype/dispatcher.cloud/src/conf.d/available_vhosts/default.vhost b/src/main/archetype/dispatcher.cloud/src/conf.d/available_vhosts/default.vhost index e170bd817..f54fc8c28 100644 --- a/src/main/archetype/dispatcher.cloud/src/conf.d/available_vhosts/default.vhost +++ b/src/main/archetype/dispatcher.cloud/src/conf.d/available_vhosts/default.vhost @@ -1,5 +1,5 @@ # -# This is the default publish virtualhost definition for Apache. +# This is the default publish virtualhost definition for Apache. # # DO NOT EDIT this file, your changes will have no impact on your deployment. # @@ -23,7 +23,7 @@ Include conf.d/variables/custom.vars Header add X-Vhost "publish" - + # Some items cache with the wrong mime type # Use this option to use the name to auto-detect mime types when cached improperly @@ -37,7 +37,6 @@ Include conf.d/variables/custom.vars Options FollowSymLinks AllowOverride None - Require all granted # Insert filter SetOutputFilter DEFLATE # Don't compress images @@ -45,6 +44,10 @@ Include conf.d/variables/custom.vars # Prevent clickjacking Header always append X-Frame-Options SAMEORIGIN + + AllowOverride None + Require all granted + # Enabled to allow rewrites to take affect and not be ignored by the dispatcher module DispatcherUseProcessedURL On @@ -57,6 +60,12 @@ Include conf.d/variables/custom.vars # Rewrite index page internally, pass through (PT) RewriteRule "^(/?)$" "/index.html" [PT] - + + # Content Services/Sling Model Exporter: Cache for 5min with background refresh 1h on browser and 12h on CDN to avoid MISS + + Header set Cache-Control "max-age=300,stale-while-revalidate=3600" "expr=%{REQUEST_STATUS} < 400" + Header set Surrogate-Control "stale-while-revalidate=43200,stale-if-error=43200" "expr=%{REQUEST_STATUS} < 400" + Header set Age 0 + diff --git a/src/main/archetype/dispatcher.cloud/src/conf.d/dispatcher_vhost.conf b/src/main/archetype/dispatcher.cloud/src/conf.d/dispatcher_vhost.conf index 450e32df6..79496ddb9 100644 --- a/src/main/archetype/dispatcher.cloud/src/conf.d/dispatcher_vhost.conf +++ b/src/main/archetype/dispatcher.cloud/src/conf.d/dispatcher_vhost.conf @@ -10,6 +10,28 @@ ServerName dispatcher Include conf.d/variables/default.vars Include conf.d/variables/global.vars + +# WARNING!!! The probe paths below are INTERNAL and RESERVED - please DO NOT USE them in your virtual host configurations! + +# Liveness probe URL +Alias "/system/probes/live" /etc/httpd/probes/live-status.json +# Readiness probe URL +Alias "/system/probes/ready" /etc/httpd/probes/ready-status.json +# Startup probe URL +Alias "/system/probes/start" /etc/httpd/probes/startup-status.json + +# internal probes endpoint + + RewriteEngine Off + + + + SetHandler default-handler + AllowOverride None + Require all granted + + + #SKYOPS-13837: Proxy static frontend code requests through dispatcher SSLProxyEngine on @@ -32,6 +54,16 @@ Include conf.d/variables/global.vars +# SITES-5185 - Ensure all GraphQL Queries to production publisher are using Persistent Queries and not direct query requests + + SSLProxyEngine on + + RewriteCond %{ENV:ENABLE_GRAPHQL_ENDPOINT} ^$ [OR] + RewriteCond %{ENV:ENABLE_GRAPHQL_ENDPOINT} ^false$ + RewriteRule ^/(.*)$ - [R=404,L] + + + # If the module loads correctly then apply base settings for the module # location of the configuration file. eg: 'conf/dispatcher.any' @@ -76,12 +108,18 @@ Include conf.d/variables/global.vars Header unset Age -# Allow ingressroute checks through on /systemready (regardless of dispatcher filters) +# (legacy) Allow ingressroute checks through on /systemready (regardless of dispatcher filters) ProxyPass http://${AEM_HOST}:${AEM_PORT}/systemready RewriteEngine Off +# new Health probe URL to legacy /systemready URL mapping + + ProxyPass http://${AEM_HOST}:${AEM_PORT}/systemready + RewriteEngine Off + + # Allow access to CRXDE on dev environment @@ -93,6 +131,10 @@ Include conf.d/variables/global.vars # CQ-4287185: Allow access to magento reverse-proxy endpoint SSLProxyEngine on + # CIF-2557 add ProxyRemote to tunnel reverse-proxy traffic through egress proxy if available + + ProxyRemote ${COMMERCE_ENDPOINT} "http://${AEM_HTTP_PROXY_HOST}:${AEM_HTTP_PROXY_PORT}" + ProxyPass ${COMMERCE_ENDPOINT} ProxyPassReverse ${COMMERCE_ENDPOINT} @@ -107,6 +149,19 @@ Include conf.d/variables/global.vars Require all denied +# internal metadata endpoint +Alias "/gitinit-status" /etc/httpd/metadata/gitinit-status.json + + + RewriteEngine Off + + + + SetHandler default-handler + AllowOverride None + Require expr "%{HTTP_HOST} == '${POD_NAME}'" + + Include conf.d/enabled_vhosts/*.vhost # Create a catch-all vhost diff --git a/src/main/archetype/dispatcher.cloud/src/conf.dispatcher.d/filters/default_filters.any b/src/main/archetype/dispatcher.cloud/src/conf.dispatcher.d/filters/default_filters.any index 5af14b347..43af2ce64 100644 --- a/src/main/archetype/dispatcher.cloud/src/conf.dispatcher.d/filters/default_filters.any +++ b/src/main/archetype/dispatcher.cloud/src/conf.dispatcher.d/filters/default_filters.any @@ -52,7 +52,7 @@ # AEM Forms specific filters # to allow AF specific endpoints for prefill, submit and sign -/0032 { /type "allow" /path "/content/forms/af/*" /method "POST" /selectors '(submit|internalsubmit|agreement|signSubmit|prefilldata|save)' /extension '(jsp|json)' } +/0032 { /type "allow" /path "/content/forms/af/*" /method "POST" /selectors '(submit|internalsubmit|agreement|signSubmit|prefilldata|save|analyticsconfigparser)' /extension '(jsp|json)' } # to allow AF specific endpoints for thank you page /0033 { /type "allow" /path "/content/forms/af/*" /method "GET" /selectors '(guideThankYouPage|guideAsyncThankYouPage)' /extension '(html)'} @@ -69,6 +69,9 @@ # to allow invoke service functionality (FDM) /0037 { /type "allow" /path "/content/forms/*" /selectors '(af)' /extension '(dermis)' } +# to allow forms portal draft and submissions component operation servlet +/0038 { /type "allow" /path "/content/*" /method "GET" /selectors '(fp)' /extension '(operation)' } + # AEM Screens Filters # to allow AEM Screens channels selectors /0050 { /type "allow" /method "GET" /url "/screens/channels.json" } @@ -80,6 +83,12 @@ # to allow site30 theme servlet /0052 { /type "allow" /extension "theme" /path "/content/*" } +# Allow manifest.webmanifest files located in the content +/0053 { /type "allow" /extension "webmanifest" /path "/content/*/manifest" } + +# Allow Apache Sling Sitemap selectors: sitemap, sitemap-index, sitemap.any-nested-or-named-sitemap +/0054 { /type "allow" /method "GET" /path "/content/*" /selectors 'sitemap(-index)?' /extension "xml" } + # Allow GraphQL & preflight requests # GraphQL also supports "GET" requests, if you intend to use "GET" add a rule in filters.any /0060 { /type "allow" /method '(POST|OPTIONS)' /url "/content/_cq_graphql/*/endpoint.json" } @@ -87,5 +96,5 @@ # GraphQL Persisted Queries & preflight requests /0061 { /type "allow" /method '(GET|POST|OPTIONS)' /url "/graphql/execute.json*" } -# Allow Forms Doc Generation requests -/0062 { /type "allow" /method "POST" /url "/adobe/forms/doc/*" } +# Allow Forms Document Services requests +/0062 { /type "allow" /method "POST" /url "/adobe/forms/*" } diff --git a/src/main/archetype/pom.xml b/src/main/archetype/pom.xml index 2870c5202..da30829c2 100644 --- a/src/main/archetype/pom.xml +++ b/src/main/archetype/pom.xml @@ -41,6 +41,9 @@ #if ( $frontendModule != "none" ) ui.frontend #end + #if ( $includeFormsheadless == "y" ) + ui.frontend.react.forms.af + #end ui.apps ui.apps.structure ui.config @@ -71,27 +74,27 @@ ${env.AIO_RUNTIME_NAMESPACE} ${env.AIO_RUNTIME_AUTH} #end - 2.18.0 + 2.19.0 #if ( $includeCommerce == "y" ) - 2.6.0 + 2.9.0 9.0.0-magento242ee #if ( $aemVersion != "cloud") - 1.7.7 + 1.7.10 #end #if ( $aemVersion == "cloud") 2022.01.20.00 #end #end -#if ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y") and $aemVersion == "cloud" ) - 1.0.6 +#if ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y" or $includeFormsheadless == "y") and $aemVersion == "cloud" ) + 1.0.14 SDK_FORMS_VERSION #end 5.1.2 UTF-8 UTF-8 #if ( $isSpaProject ) - 1.3.10 + 1.3.12 #end #if ( $frontendModule == "angular" ) com.adobe.aem @@ -889,7 +892,7 @@ Bundle-DocURL: ${core.forms.components.version} #end -#if ( $includeExamples == "y" and ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y") and $aemVersion == "cloud" ) ) +#if ( $includeExamples == "y" and ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y" or $includeFormsheadless == "y") and $aemVersion == "cloud" ) ) com.adobe.aem core-forms-components-examples-all @@ -965,4 +968,4 @@ Bundle-DocURL: - + \ No newline at end of file diff --git a/src/main/archetype/ui.apps/pom.xml b/src/main/archetype/ui.apps/pom.xml index 3ebab534c..010c6a04d 100644 --- a/src/main/archetype/ui.apps/pom.xml +++ b/src/main/archetype/ui.apps/pom.xml @@ -84,7 +84,7 @@ core-cif-components-apps #end -#if ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y") and $aemVersion == "cloud" ) +#if ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y" or $includeFormsheadless == "y") and $aemVersion != "cloud" ) com.adobe.aem core-forms-components-apps @@ -218,6 +218,15 @@ Require-Capability: osgi.extender;filter:="(&(osgi.extender=sling.scripting)(ver #end +#if ( $includeFormsheadless == "y") + + ${groupId} + ${rootArtifactId}.ui.frontend.react.forms.af + ${project.version} + zip + +#end + #if ( $isSpaProject ) @@ -325,21 +334,23 @@ Require-Capability: osgi.extender;filter:="(&(osgi.extender=sling.scripting)(ver #end #end -#if ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y") and $aemVersion == "cloud") +#if ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y" or $includeFormsheadless == "y") com.adobe.aem aem-forms-sdk-api - - com.adobe.aem - core-forms-components-apps - zip - - - com.adobe.aem - core-forms-components-core - + #if ($aemVersion != "cloud") + + com.adobe.aem + core-forms-components-apps + zip + + + com.adobe.aem + core-forms-components-core + + #end #end diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/clientlibs/clientlib-cif/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/clientlibs/clientlib-cif/.content.xml index e0e84d303..5d51f0bd7 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/clientlibs/clientlib-cif/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/clientlibs/clientlib-cif/.content.xml @@ -5,4 +5,4 @@ cssProcessor="[default:none,min:none]" jsProcessor="[default:none,min:none]" categories="[${appId}.cif]" - embed="[core.cif.components.product.v1,core.cif.components.productcarousel.v1,core.cif.components.productcollection.v2,core.cif.components.productteaser.v1,core.cif.components.searchbar.v2,core.cif.components.header.v1,core.cif.components.react,core.cif.components.carousel.v1,core.cif.components.categorycarousel.v1,core.cif.components.featuredcategorylist.v1]" /> + embed="[core.cif.components.common,core.cif.components.product.v1,core.cif.components.productcarousel.v1,core.cif.components.productcollection.v2,core.cif.components.productteaser.v1,core.cif.components.searchbar.v2,core.cif.components.header.v1,core.cif.components.react,core.cif.components.carousel.v1,core.cif.components.categorycarousel.v1,core.cif.components.featuredcategorylist.v1]" /> diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/adaptiveForm/formcontainer/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/adaptiveForm/formcontainer/.content.xml new file mode 100644 index 000000000..e760ae258 --- /dev/null +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/adaptiveForm/formcontainer/.content.xml @@ -0,0 +1,7 @@ + + diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/catalogpage/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/catalogpage/.content.xml index 9339cef97..48521e85a 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/catalogpage/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/catalogpage/.content.xml @@ -3,5 +3,5 @@ cq:icon="page" jcr:primaryType="cq:Component" jcr:title="Catalog Landing Page" - sling:resourceSuperType="core/cif/components/structure/catalogpage/v1/catalogpage" + sling:resourceSuperType="core/cif/components/structure/catalogpage/v3/catalogpage" componentGroup=".hidden"/> diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/catalogpage/customfooterlibs.html b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/catalogpage/customfooterlibs.html index 129b77780..1d6ed57ed 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/catalogpage/customfooterlibs.html +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/catalogpage/customfooterlibs.html @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */--> - - - + + + diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/catalogpage/customheaderlibs.html b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/catalogpage/customheaderlibs.html index 1e7676a15..ac7fc4eae 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/catalogpage/customheaderlibs.html +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/catalogpage/customheaderlibs.html @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */--> - + diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/teaser/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/teaser/.content.xml index 015f547ac..87c056387 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/teaser/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/commerce/teaser/.content.xml @@ -4,6 +4,6 @@ jcr:description="Commerce Teaser" jcr:primaryType="cq:Component" jcr:title="Commerce Teaser" - sling:resourceSuperType="core/cif/components/content/teaser/v2/teaser" + sling:resourceSuperType="core/cif/components/content/teaser/v3/teaser" imageDelegate="${appId}/components/image" componentGroup="${appTitle} - Commerce"/> diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/image/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/image/.content.xml index a5b3ebac3..19699a9e6 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/image/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/image/.content.xml @@ -3,7 +3,7 @@ jcr:primaryType="cq:Component" jcr:title="Image" #if ( $amp == "y") - sling:resourceSuperType="core/wcm/extensions/amp/components/image/v1/image" + sling:resourceSuperType="core/wcm/extensions/amp/components/image/v2/image" #else sling:resourceSuperType="core/wcm/components/image/v3/image" #end diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/page/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/page/.content.xml index 8fb39f3c6..c34d535f5 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/page/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/page/.content.xml @@ -5,9 +5,11 @@ #if ( $isSpaProject ) sling:resourceSuperType="spa-project-core/components/page" #elseif ( $includeCommerce == "y" ) - sling:resourceSuperType="core/cif/components/structure/page/v2/page" + sling:resourceSuperType="core/cif/components/structure/page/v3/page" #elseif ( $amp == "y" ) sling:resourceSuperType="core/wcm/extensions/amp/components/page/v1/page" +#elseif ( $includeFormsheadless =="y" ) + sling:resourceSuperType="core/fd/components/page/v1/page" #else sling:resourceSuperType="core/wcm/components/page/v3/page" #end diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/page/customfooterlibs.html b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/page/customfooterlibs.html index 737da09a9..85ae4387e 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/page/customfooterlibs.html +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/page/customfooterlibs.html @@ -13,10 +13,13 @@ See the License for the specific language governing permissions and limitations under the License. */--> - - + + #if ( $includeCommerce == "y" ) - + +#end +#if ( $includeFormsheadless == "y" ) + #end #if ( $isSpaProject ) diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/page/customheaderlibs.html b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/page/customheaderlibs.html index 46c05dad8..5577f4fa6 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/page/customheaderlibs.html +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/page/customheaderlibs.html @@ -13,11 +13,14 @@ See the License for the specific language governing permissions and limitations under the License. */--> - + #if ( $includeCommerce == "y" ) #end +#if ( $includeFormsheadless == "y" ) + +#end #if ( $frontendModule == "angular" ) diff --git a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/search/.content.xml b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/search/.content.xml index 98ea4ac98..77df7c4ec 100644 --- a/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/search/.content.xml +++ b/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/search/.content.xml @@ -3,8 +3,8 @@ jcr:primaryType="cq:Component" jcr:title="Quick Search" #if ( $amp == "y") - sling:resourceSuperType="core/wcm/extensions/amp/components/search/v1/search" + sling:resourceSuperType="core/wcm/extensions/amp/components/search/v2/search" #else - sling:resourceSuperType="core/wcm/components/search/v1/search" + sling:resourceSuperType="core/wcm/components/search/v2/search" #end componentGroup="${appTitle} - Structure"/> diff --git a/src/main/archetype/ui.content/src/main/content/META-INF/vault/filter.xml b/src/main/archetype/ui.content/src/main/content/META-INF/vault/filter.xml index abf4a1041..fcd6c738a 100644 --- a/src/main/archetype/ui.content/src/main/content/META-INF/vault/filter.xml +++ b/src/main/archetype/ui.content/src/main/content/META-INF/vault/filter.xml @@ -13,4 +13,7 @@ #end +#if ( ($includeFormsheadless == "y" ) and $aemVersion == "cloud") + +#end diff --git a/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/policies/.content.xml b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/policies/.content.xml index deb110f24..9428ffbb1 100644 --- a/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/policies/.content.xml +++ b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/policies/.content.xml @@ -531,6 +531,70 @@ +#end +#if ( $includeFormsheadless == "y" ) + + + + + + + + + + + + + + + #end diff --git a/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/.content.xml b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/.content.xml new file mode 100644 index 000000000..bcedba138 --- /dev/null +++ b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/.content.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/initial/.content.xml b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/initial/.content.xml new file mode 100644 index 000000000..8608ca7af --- /dev/null +++ b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/initial/.content.xml @@ -0,0 +1,15 @@ + + + + + + + diff --git a/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/policies/.content.xml b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/policies/.content.xml new file mode 100644 index 000000000..e5baaa97f --- /dev/null +++ b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/policies/.content.xml @@ -0,0 +1,22 @@ + + + + + + + + + diff --git a/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/structure/.content.xml b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/structure/.content.xml new file mode 100644 index 000000000..3c2673b69 --- /dev/null +++ b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/structure/.content.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + diff --git a/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/thumbnail.png b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/thumbnail.png new file mode 100644 index 0000000000000000000000000000000000000000..ee87e8034a3dd553aa8c66e162c95c83fd018d6a GIT binary patch literal 12092 zcma)hWn3K3w(TH+!QI_8xcdwi+!EXgFo7UJh5!i=G&lqc?(V@EB)G#6f&>lj?*8U~ z?mhRNFYov6hbifs3P+Zhp&l3l7&DMh9bdxjiWi~}urG2lzcADckxG1Gxj0iP zBF@rMf?LUUp=iujZk~BSYYlH;W|L%$^k^%G(0eK$nJ`6BY80i)K9-JLUBtT{K40QvF)S5H+=mlb$RhtK&7Pk zm@+z&bG>=jA~#(KS&`p6*LMFMcf59D#8;Mq8}{|IBE_o|)k4>8DC}kL)J^5PKs+hG z?6Eb$e!Dsj)2p2C>pSx6oDGSaahf07aKpBRh+c;DiWF&iQ&zmHGcN`XewH{$9<|`I}qLh%+(n)~_F z>_sxQo^J$tE;~?Hv0k2x^ux5oeg(`CiUI0nmX+-}7#~$Oy>iXVgs>TR?l_$&$3_J7 z3d9HPA7+Ho+3=ovtfY*%^nVz2smjnI!jG$fjV>$Bw#byAklXJ(5`?DNqzU^MBd6`I zlQUfVjZr6s22g)o;jKx%)|mRL*eukqm>`W7FTJ-0$$_CH5LLRn>qN-!-Ua&)ft}*WC#M#3H29?j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zR}_RYC;Tu)`KPt{^md!k`deQ> z4ujhFxQuXSJ#GsXQbf#>OmqUD2~0aQoEq5j^Pr*Py!bhSp`!1N$RfDh3d*~E+<6LS zE|>bbRTIS;@StKnfhAin!!X2&M<0mx{R=y`uYX}z|C6WqCynu+iu^y*8vjmX{6|{j ee>1%QMs{^mR?Yr^ss)iQ0jMZyDpY|j1OE>S$U9sB literal 0 HcmV?d00001 diff --git a/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/.content.xml b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/.content.xml new file mode 100644 index 000000000..e71212dee --- /dev/null +++ b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/.content.xml @@ -0,0 +1,11 @@ + + + + diff --git a/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/initial/.content.xml b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/initial/.content.xml new file mode 100644 index 000000000..9cebaaa14 --- /dev/null +++ b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/initial/.content.xml @@ -0,0 +1,15 @@ + + + + + + diff --git a/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/policies/.content.xml b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/policies/.content.xml new file mode 100644 index 000000000..e5baaa97f --- /dev/null +++ b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/policies/.content.xml @@ -0,0 +1,22 @@ + + + + + + + + + diff --git a/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/structure/.content.xml b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/structure/.content.xml new file mode 100644 index 000000000..d119b3991 --- /dev/null +++ b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/structure/.content.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + diff --git a/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/thumbnail.png b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/templates/blank-af-v2/thumbnail.png new file mode 100644 index 0000000000000000000000000000000000000000..7c20949595d44c85a99073c9c84f2a434f0bb6f5 GIT binary patch literal 12086 zcmeHtbx@n#*KHC41c%}+?xhqdUbGa4;#QnuZ*eUyL5o9ir$TWrE=h5h0xeE(D;B&E z`0}>zowegzI_F80hMEEa?tNSU06?ImD60hk01@a% zA_NQl3_K3)L?^(u&t5zO0BREOZY(eX0PcMy*=IW5!2R5-I^zwWt$fo;iZH-?Oba1A zdpU}3^BR1&S9UTz$$*D0qNCl($~jh4*y^8OU4~0R%?fOuY|NPV>8{P>x#low_u9P8 ztmU+3VE9@Mc~4;E0D9aH`m#Jf)OILg=XufIe&I7FI_55^P}s6qqz*eg@$Wcn%&*Ju zTwk{`aT6eSPucS*WpOZZC6l+X1XF$M1?Q#`;*QC@a*(&fm8z}J!5y5sC+XW_&a;Bi zC$F+wlUr!c8^Y;7(d_ASR1)<*{ehOv3>Fii(xztNXO-t^Gd|vrL{l4#GkyucPQPfo^!7kMRUW`AF2QgY)S|Ip2+CbB_1(8E_QHM37e*fwi_6N z6^_E)HJn%}iu;pg@#W5WZ-PKf=6Hd2}&<#fRniNnXjdAhu71t=e*a|j=S;r*qzCu-e zP|w^9&NAiX09!?rrynX@{m+OO9(UP^d-_p7>{}d?v=1jgG(JLPw3A+Rg@x1+5Vgj2 z^SkQ!`Oofz+Qhe!Yh08HW|og~KBcd1+y4yf)8vXf?Cq#ek-yhOv;dx3SIh5PkJnvo2s~kDN z=*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vR1Xd}v|;p!(`R?ilU{wGiL^8P@I1ZZfiVo1NTs=v*x z4x-*5o*?W;LP`SeWgZXY-1c@nc7#~P!;OVIVY~4sPj(op%?W*XG@?1y(Ei$mhU_)Q zA4TG2L3eW^+<@j!NQ{lvtN-mRdd-LujxK`F?@;z^=<^PGAYE^PIzLmyZ$`sFgII`x z>EUl743 + + + + + + diff --git a/src/main/archetype/ui.content/src/main/content/jcr_root/content/dam/__appId__/af_model_sample.json/_jcr_content/renditions/original b/src/main/archetype/ui.content/src/main/content/jcr_root/content/dam/__appId__/af_model_sample.json/_jcr_content/renditions/original new file mode 100755 index 000000000..53e648235 --- /dev/null +++ b/src/main/archetype/ui.content/src/main/content/jcr_root/content/dam/__appId__/af_model_sample.json/_jcr_content/renditions/original @@ -0,0 +1,179 @@ +{ + "adaptiveform": "0.10.0", + "data": {}, + "items": [ + { + "name": "firstName", + "fieldType": "text-input", + "default": "john", + "type": "string", + "minLength": 0, + "maxLength": 30, + "required": true, + "constraintMessages": { + "minLength": "Name cannot be empty", + "maxLength": "Please enter only first 30 characters of your name", + "required": "Name cannot be empty" + }, + "description": "We need it to address you in our responses", + "screenReaderText": "'Enter your name as you like us to address you'", + "rules": { + "required": "isAnonymous != true()" + }, + "label": { + "value": "First Name" + }, + "properties": { + "afs:translationIds": { + "title": "firstName##7081##title##1335", + "description": "firstName##7081##description##9756" + } + } + }, + { + "name": "lastName", + "fieldType": "text-input", + "default": "doe", + "description": "We need it to address you in our responses", + "screenReaderText": "Enter your name as you like us to address you", + "type": "string", + "minLength": 0, + "maxLength": 30, + "required": true, + "constraintMessages": { + "minLength": "Name cannot be empty", + "maxLength": "Please enter only first 30 characters of your name", + "required": "Name cannot be empty" + }, + "rules": { + "required": "isAnonymous != true()" + }, + "label": { + "value": "Last Name" + }, + "properties": { + "afs:translationIds": { + "title": "lastName##904##title##4759", + "description": "lastName##904##description##2371" + } + } + }, + { + "name": "name", + "fieldType": "text-input", + "rules": { + "value": "firstName & ' ' & lastName" + }, + "label": { + "value": "Your Full Name" + }, + "properties": { + "afs:translationIds": { + "title": "name##6861##title##536" + } + } + }, + { + "name": "email", + "fieldType": "text-input", + "description": "It's a promise that we will not spam you", + "screenReaderText": "Provide your email address so that we can reply to you.", + "type": "string", + "format": "email", + "required": true, + "constraintMessages": { + "format": "Please enter a valid email address", + "required": "The email address is mandatory" + }, + "rules": { + "required": "isAnonymous != true()" + }, + "label": { + "value": "Email Address" + }, + "properties": { + "afs:translationIds": { + "title": "email##8831##title##4231", + "description": "email##8831##description##1775" + } + } + }, + { + "name": "isAnonymous", + "fieldType": "checkbox", + "description": "In case you want to remain anonymous", + "type": "boolean", + "required": true, + "label": { + "value": "Remain Anonymous", + "richText": false + }, + "properties": { + "afs:translationIds": { + "title": "isAnonymous##4997##title##4650", + "description": "isAnonymous##4997##description##4835" + } + } + }, + { + "name": "phone", + "fieldType": "text-input", + "description": "Your mobile number where we can reach you. But only if you want", + "screenReaderText": "Enter you mobile number without the ISD code", + "pattern": "[0-9]{10}", + "constraintMessages": { + "pattern": "Phone number must be 10 digit long" + }, + "label": { + "value": "Mobile Number" + }, + "properties": { + "afs:translationIds": { + "title": "phone##2170##title##9683", + "description": "phone##2170##description##4677" + } + } + }, + { + "name": "message", + "fieldType": "multiline-input", + "screenReaderText": "Enter your message in less than 1000 characters and minimum 50 characters", + "minLength": 50, + "maxLength": 1000, + "required": true, + "constraintMessages": { + "minLength": "Enter minimum 50 characters", + "maxLength": "Maximum Limit (1000 characters) reached. Please email us directly", + "required": "The message is " + }, + "label": { + "value": "Message" + }, + "properties": { + "afs:translationIds": { + "title": "message##4881##title##112" + } + } + }, + { + "name": "submit", + "fieldType": "button", + "screenReaderText": "Enter your message in less than 1000 characters and minimum 50 characters", + "events": { + "click": "dispatchEvent($form, 'submit')" + }, + "label": { + "value": "Submit" + }, + "properties": { + "afs:translationIds": { + "title": "submit##313##title##7066" + } + } + } + ], + "metadata": { + "grammar": "json-formula-1.0.0", + "version": "1.0.0" + } +} \ No newline at end of file diff --git a/src/main/archetype/ui.content/src/main/content/jcr_root/content/dam/__appId__/af_model_sample.json/_jcr_content/renditions/original.dir/.content.xml b/src/main/archetype/ui.content/src/main/content/jcr_root/content/dam/__appId__/af_model_sample.json/_jcr_content/renditions/original.dir/.content.xml new file mode 100755 index 000000000..9f1d58560 --- /dev/null +++ b/src/main/archetype/ui.content/src/main/content/jcr_root/content/dam/__appId__/af_model_sample.json/_jcr_content/renditions/original.dir/.content.xml @@ -0,0 +1,8 @@ + + + + diff --git a/src/main/archetype/ui.frontend.react.forms.af/.babelrc b/src/main/archetype/ui.frontend.react.forms.af/.babelrc new file mode 100644 index 000000000..4af5c732a --- /dev/null +++ b/src/main/archetype/ui.frontend.react.forms.af/.babelrc @@ -0,0 +1,32 @@ +{ + "presets": [ + ["@babel/preset-env" + , + { + "targets": { + "esmodules": true + } + } + ], + "@babel/react"], + "plugins": [], + "env": { + "test": { + "plugins": [ + [ + "istanbul", + { + "include": [ + "src/**.*" + ], + "exclude": [ + "dist/**.*", + "node_modules/**.*", + "tests/**.*" + ] + } + ] + ] + } + } +} diff --git a/src/main/archetype/ui.frontend.react.forms.af/.env b/src/main/archetype/ui.frontend.react.forms.af/.env new file mode 100644 index 000000000..26f293e64 --- /dev/null +++ b/src/main/archetype/ui.frontend.react.forms.af/.env @@ -0,0 +1,21 @@ +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ Copyright 2022 Adobe Systems Incorporated + ~ + ~ Licensed 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 CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +# Path to the `public` directory when the web app is deployed. In the case of +# AEM, that's the path to the `resources` ClientLib directory. Specifying this +# path is required for features like code splitting to work (because it will be +# prepended to paths in the `asset-manifest.json` file) +FORMPATH=/content/forms/af/f1 \ No newline at end of file diff --git a/src/main/archetype/ui.frontend.react.forms.af/.env.development b/src/main/archetype/ui.frontend.react.forms.af/.env.development new file mode 100644 index 000000000..26f293e64 --- /dev/null +++ b/src/main/archetype/ui.frontend.react.forms.af/.env.development @@ -0,0 +1,21 @@ +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ Copyright 2022 Adobe Systems Incorporated + ~ + ~ Licensed 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 CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +# Path to the `public` directory when the web app is deployed. In the case of +# AEM, that's the path to the `resources` ClientLib directory. Specifying this +# path is required for features like code splitting to work (because it will be +# prepended to paths in the `asset-manifest.json` file) +FORMPATH=/content/forms/af/f1 \ No newline at end of file diff --git a/src/main/archetype/ui.frontend.react.forms.af/README.md b/src/main/archetype/ui.frontend.react.forms.af/README.md new file mode 100644 index 000000000..7dae60538 --- /dev/null +++ b/src/main/archetype/ui.frontend.react.forms.af/README.md @@ -0,0 +1,62 @@ +# Frontend Build: React App + +This project was bootstrapped with [`create-react-app`](https://github.com/facebook/create-react-app). + +This application is built to consume the form model definition of an adaptive form. + +## Scripts + +In the project directory, you can run the following commands: + +### `npm start` + +Runs the app in development mode by proxying the JSON model from a local AEM instance running at http://localhost:4502. This assumes that the entire project has been deployed to AEM at least once (`mvn clean install -PautoInstallPackage` **in the project root**). + +After running `npm start` **in the `ui.frontend` directory**, your app will be automatically opened in your browser (at path http://localhost:3000/content/mysite/us/en/home.html). If you make edits, the page will reload. + +If you are getting errors related to CORS, you might want to configure AEM as follows: + +1. Navigate to the Configuration Manager (http://localhost:4502/system/console/configMgr) +2. Open the configuration for "Adobe Granite Cross-Origin Resource Sharing Policy" +3. Create a new configuration with the following additional values: + - Allowed Origins: http://localhost:3000 + - Supported Headers: Authorization + - Allowed Methods: OPTIONS + +### `npm test` + +Launches the test runner in the interactive watch mode. See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. + +### `npm run build` + +Builds the app for production to the `build` folder. It bundles React in production mode and optimizes the build for the best performance. See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. + +Furthermore, an AEM ClientLib is generated from the app using the [`aem-clientlib-generator`](https://github.com/wcm-io-frontend/aem-clientlib-generator) package. + +## Browser Support + +By default, this project uses [Browserslist](https://github.com/browserslist/browserslist)'s `defaults` option to identify target browsers. Additionally, it includes polyfills for modern language features to support older browsers (e.g. Internet Explorer 11). If supporting such browsers isn't a requirement, the polyfill dependencies and imports can be removed. + +## Custom Model Client + +For scenarios where the react application doesn't have access to the model json payload a request to AEM has to be made to fetch it. This may require a custom model client that can provide additional capabilities over the default one provided via the [`aem-spa-page-model-manager`](https://github.com/adobe/aem-spa-page-model-manager/blob/master/src/ModelClient.ts) such as authentication. + +## Code Splitting + +The React app is configured to make use of [code splitting](https://webpack.js.org/guides/code-splitting) by default. When building the app for production, the code will be output in several chunks: + +```sh +$ ls build/static/js +2.5b77f553.chunk.js +2.5b77f553.chunk.js.map +main.cff1a559.chunk.js +main.cff1a559.chunk.js.map +runtime~main.a8a9905a.js +runtime~main.a8a9905a.js.map +``` + +Loading chunks only when they are required can improve the app performance significantly. + +To get this feature to work with AEM, the app needs to be able to identify which JS and CSS files need to be requested from the HTML generated by AEM. This can be achieved using the `"entrypoints"` key in the `asset-manifest.json` file: The file is parsed in `clientlib.config.js` and only the entrypoint files are bundled into the ClientLib. The remaining files are placed in the ClientLib's `resources` directory and will be requested dynamically and therefore only loaded when they are actually needed. + + diff --git a/src/main/archetype/ui.frontend.react.forms.af/assembly.xml b/src/main/archetype/ui.frontend.react.forms.af/assembly.xml new file mode 100644 index 000000000..9569ae49d --- /dev/null +++ b/src/main/archetype/ui.frontend.react.forms.af/assembly.xml @@ -0,0 +1,16 @@ + + distribution + + zip + + false + + + ${basedir}/dist/ + + **/* + + + + + diff --git a/src/main/archetype/ui.frontend.react.forms.af/clientlib.config.js b/src/main/archetype/ui.frontend.react.forms.af/clientlib.config.js new file mode 100644 index 000000000..999884b5b --- /dev/null +++ b/src/main/archetype/ui.frontend.react.forms.af/clientlib.config.js @@ -0,0 +1,57 @@ +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ Copyright 2022 Adobe Systems Incorporated + ~ + ~ Licensed 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 CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +const path = require('path'); + +const CLIENTLIB_DIR = path.join( + __dirname, + '..', + 'ui.apps', + 'src', + 'main', + 'content', + 'jcr_root', + 'apps', + '${appId}', + 'clientlibs' +); + +const libsBaseConfig = { + allowProxy: true, + serializationFormat: 'xml', + cssProcessor: ['default:none', 'min:none'], + jsProcessor: ['default:none', 'min:none'] +}; + +// Config for `aem-clientlib-generator` +module.exports = { + context: __dirname, + clientLibRoot: CLIENTLIB_DIR, + libs: [ + { + ...libsBaseConfig, + name: 'clientlib-forms-react', + categories: ['${appId}.forms.react'], + assets: { + // Copy entrypoint scripts and stylesheets into the respective ClientLib + // directories + js: ['dist/main.js'], + css: ['dist/dist/main.css'], + resources: ['dist/forms-react-components/resources/*.*'] + } + } + ] +}; diff --git a/src/main/archetype/ui.frontend.react.forms.af/package.json b/src/main/archetype/ui.frontend.react.forms.af/package.json new file mode 100644 index 000000000..44dc57f0c --- /dev/null +++ b/src/main/archetype/ui.frontend.react.forms.af/package.json @@ -0,0 +1,46 @@ +{ + "name": "forms-archetype-sample", + "version": "1.0.0", + "description": "Sample for generating AF 2 Web Runtime clientlib", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\"", + "build:dev": "npx webpack --config webpack.dev.js", + "build:prod": "npx webpack --config webpack.prod.js && clientlib --verbose", + "start": "npx webpack serve --config webpack.dev.js --env mode=development" + }, + "author": "", + "license": "Apache-2.0", + "devDependencies": { + "@types/react": "^18.0.9", + "@types/react-dom": "^18.0.4", + "css-loader": "^6.7.1", + "css-minimizer-webpack-plugin": "^4.0.0", + "dotenv": "^16.0.1", + "html-webpack-plugin": "^5.5.0", + "mini-css-extract-plugin": "^2.6.0", + "postcss-loader": "^7.0.0", + "process": "^0.11.10", + "sass-loader": "^13.0.0", + "style-loader": "^3.3.1", + "ts-loader": "^9.3.0", + "typescript": "^4.6.4", + "webpack": "^5.72.1", + "webpack-bundle-analyzer": "^4.5.0", + "webpack-cli": "^4.9.2", + "webpack-dev-server": "^4.9.0", + "webpack-import-glob-loader": "^1.6.3", + "webpack-merge": "^5.8.0" + }, + "dependencies": { + "@adobe/react-spectrum": "^3.17.0", + "@aemforms/af-core": "^0.16.0", + "@aemforms/af-react-components": "^0.16.0", + "@aemforms/af-react-renderer": "^0.16.0", + "aem-clientlib-generator": "^1.5.0", + "react": "^16.14.0", + "react-dom": "^16.14.0", + "react-intl": "^5.8.4", + "react-is": "^16.8.6" + } +} diff --git a/src/main/archetype/ui.frontend.react.forms.af/pom.xml b/src/main/archetype/ui.frontend.react.forms.af/pom.xml new file mode 100644 index 000000000..8b3e20f2c --- /dev/null +++ b/src/main/archetype/ui.frontend.react.forms.af/pom.xml @@ -0,0 +1,126 @@ + + + + 4.0.0 + + + + + + ${groupId} + ${rootArtifactId} + ${version} + ../pom.xml + + + + + + ${rootArtifactId}.ui.frontend.react.forms.af + pom + ${appTitle} - UI Frontend Forms + + + + + + + src/main/content/jcr_root + + + com.github.eirslett + frontend-maven-plugin + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + assembly.xml + + false + + + + + + + + + com.github.eirslett + frontend-maven-plugin + + + npm run test + generate-resources + + npm + + + test + + true + + + + + npm run build + generate-resources + + npm + + + run build:prod + + + + + + + + + + dev + + + + com.github.eirslett + frontend-maven-plugin + + + npm run build dev + generate-resources + + npm + + + run build:dev + + + + + + + + + diff --git a/src/main/archetype/ui.frontend.react.forms.af/public/index.html b/src/main/archetype/ui.frontend.react.forms.af/public/index.html new file mode 100644 index 000000000..40f650902 --- /dev/null +++ b/src/main/archetype/ui.frontend.react.forms.af/public/index.html @@ -0,0 +1,20 @@ + + + + + + + + + + ${appTitle} + + + +
+
+ +
+
+ + diff --git a/src/main/archetype/ui.frontend.react.forms.af/src/Form.tsx b/src/main/archetype/ui.frontend.react.forms.af/src/Form.tsx new file mode 100644 index 000000000..7b32126d4 --- /dev/null +++ b/src/main/archetype/ui.frontend.react.forms.af/src/Form.tsx @@ -0,0 +1,56 @@ +import React, {useEffect, useState} from "react"; +import {AdaptiveForm} from "@aemforms/af-react-renderer"; +import {mappings} from "@aemforms/af-react-components"; +import useEditorEvents from "./hooks/useEditorEvents"; +import ReactDOM from "react-dom"; +//@ts-ignore +import {Provider as Spectrum3Provider, defaultTheme} from '@adobe/react-spectrum' + +const base64url = (s: any) => { + var to64url = btoa(s); + // Replace non-url compatible chars with base64url standard chars and remove leading = + return to64url.replace(/\+/g, '_').replace(/\//g, '-').replace(/=+${symbol_dollar}/g, ''); +} + + +export const getId = () => { + let id = "" + if (!process.env.FORMPATH) { + const parent = document.querySelector(".cmp-formcontainer") + id = parent.getAttribute("data-form-id") + } else { + id = base64url(process.env.FORMPATH) + } + return id; +} + +const getForm = async (id: string) => { + const resp = await fetch(`/adobe/forms/af/v1/${symbol_dollar}{id}`) + const json = (await resp.json()) + return json +} + +const Form = (props: any) => { + const [form, setForm] = useState("") + const [state, setState] = useEditorEvents() + const fetchForm = async () => { + let id = getId(); + if (id) { + const json:any = await getForm(id); + setForm(JSON.stringify(json.afModelDefinition)) + } + } + useEffect(() => { + fetchForm() + }, [state]); + if (form != "") { + const element = document.querySelector(".cmp-formcontainer__content") + const retVal = ( + + ) + return ReactDOM.createPortal(retVal, element) + } + return null +} + +export default Form \ No newline at end of file diff --git a/src/main/archetype/ui.frontend.react.forms.af/src/hooks/useEditorEvents.js b/src/main/archetype/ui.frontend.react.forms.af/src/hooks/useEditorEvents.js new file mode 100644 index 000000000..112479256 --- /dev/null +++ b/src/main/archetype/ui.frontend.react.forms.af/src/hooks/useEditorEvents.js @@ -0,0 +1,82 @@ +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ Copyright 2021 Adobe + ~ + ~ Licensed 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 CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +import { useEffect, useState } from 'react'; + +export const cookieValue = cookieName => { + let b = document.cookie.match(`(^|[^;]+)\\s*${cookieName}\\s*=\\s*([^;]+)`); + return b ? b.pop() : ''; +}; + +const checkCookie = cookieName => { + return document.cookie.split(';').filter(item => item.trim().startsWith(`${symbol_dollar}{cookieName}=`)).length > 0; +}; + +const useCookieValue = cookieName => { + if (!cookieName || cookieName.length === 0) { + return ''; + } + let value = checkCookie(cookieName) ? cookieValue(cookieName) : ''; + const setCookieValue = (value, age) => { + const cookieSettings = `path=/; domain=${window.location.hostname};Max-Age=${symbol_dollar}{age !== undefined ? age : 3600}`; + document.cookie = `${symbol_dollar}{cookieName}=${value};${symbol_dollar}{cookieSettings}`; + }; + + return [value, setCookieValue]; +}; + +/** + * This hook listens to messages from the AEM Sites editor, when in editing mode + * and triggers a re-render of components using the hook. + */ +const useEditorEvents = () => { + const [wcmmode] = useCookieValue('wcmmode'); + const [state, setState] = useState(1) + const onMessage = event => { + // Drop events from unknown origins + if (event.origin !== window.location.origin) { + return; + } + + // Drop events that are not AEM Sites editor commands + if (!event.data || !event.data.msg || event.data.msg !== 'cqauthor-cmd') { + return; + } + + // Skip commands that do not require a re-render + if (event.data.data && event.data.data.cmd && event.data.data.cmd === 'toggleClass') { + return; + } + + // Update state to force re-render + setState(state => state + 1) + }; + + useEffect(() => { + // Only during editing + if (wcmmode !== 'edit') { + return; + } + + window.addEventListener('message', onMessage, false); + return () => { + window.removeEventListener('message', onMessage, false); + }; + }, []); + + return [state, setState] +}; + +export default useEditorEvents; diff --git a/src/main/archetype/ui.frontend.react.forms.af/src/index.tsx b/src/main/archetype/ui.frontend.react.forms.af/src/index.tsx new file mode 100644 index 000000000..cb7aa22de --- /dev/null +++ b/src/main/archetype/ui.frontend.react.forms.af/src/index.tsx @@ -0,0 +1,17 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +// @ts-ignore +import AForm from './Form' + +window.onload = async () => { + let div = document.getElementById("form-app"); + if (!div) { + div = document.createElement("div") + div.id = "form-app" + document.body.appendChild(div) + } + ReactDOM.render( + , + div + ); +}; \ No newline at end of file diff --git a/src/main/archetype/ui.frontend.react.forms.af/tsconfig.json b/src/main/archetype/ui.frontend.react.forms.af/tsconfig.json new file mode 100644 index 000000000..fd7790070 --- /dev/null +++ b/src/main/archetype/ui.frontend.react.forms.af/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "outDir": "./dist/", + "noImplicitAny": true, + "module": "es6", + "target": "es5", + "jsx": "react", + "allowJs": true, + "allowSyntheticDefaultImports": true, + "moduleResolution": "node", + "lib": [ + "dom", + "dom.iterable", + "esnext" + ] + } +} diff --git a/src/main/archetype/ui.frontend.react.forms.af/utils/entrypoints.js b/src/main/archetype/ui.frontend.react.forms.af/utils/entrypoints.js new file mode 100644 index 000000000..79fb34f1e --- /dev/null +++ b/src/main/archetype/ui.frontend.react.forms.af/utils/entrypoints.js @@ -0,0 +1,27 @@ +const fs = require('fs'); + +/** + * Returns all entrypoint chunks (JS and CSS) of the React app. These chunks + * will not need to be precached because they're already requested from the HTML + * file) + * + * @param {string} assetManifestPath: Path to the asset manifest file from which + * the entrypoint files can be read + */ +function getEntrypoints(assetManifestPath) { + if (!fs.existsSync(assetManifestPath)) { + throw Error( + `Cannot determine entrypoints: No asset manifest found at path ${symbol_dollar}{assetManifestPath}` + ); + } + const manifest = fs.readFileSync(assetManifestPath, { encoding: 'utf8' }); + const manifestContent = JSON.parse(manifest); + if (!('entrypoints' in manifestContent)) { + throw Error( + `Cannot determine entrypoints: Missing "entrypoints" key in ${symbol_dollar}{assetManifestPath}` + ); + } + return manifestContent.entrypoints; +} + +module.exports = getEntrypoints; diff --git a/src/main/archetype/ui.frontend.react.forms.af/webpack.common.js b/src/main/archetype/ui.frontend.react.forms.af/webpack.common.js new file mode 100644 index 000000000..4c94d3158 --- /dev/null +++ b/src/main/archetype/ui.frontend.react.forms.af/webpack.common.js @@ -0,0 +1,45 @@ +const path = require('path'); +const HtmlWebpackPlugin = require('html-webpack-plugin'); +const pkg = require('./package.json'); +const MiniCssExtractPlugin = require('mini-css-extract-plugin'); +const alias = Object.keys(pkg.dependencies) + .reduce((obj, key) => ({...obj, [key]: path.resolve(__dirname, 'node_modules', key)}), {}); + +module.exports = { + entry: './src/index.tsx', + devtool: 'source-map', + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /\.css$/i, + use: [MiniCssExtractPlugin.loader, 'css-loader'], + }, + ], + }, + plugins: [ + new HtmlWebpackPlugin({ + title: 'AEM Forms - Sample', + template: "public/index.html" + }), + new MiniCssExtractPlugin({ + filename: 'dist/[name].css', + }) + ], + resolve: { + alias: { + ...alias + }, + extensions: ['.tsx', '.ts', '.js'] + }, + output: { + filename: '[name].js', + path: path.resolve(__dirname, 'dist'), + clean: true, + //sourceMapFilename: `clientlib-forms-react/resources/[name].map[ext]` // uncomment for debugging + } +}; diff --git a/src/main/archetype/ui.frontend.react.forms.af/webpack.dev.js b/src/main/archetype/ui.frontend.react.forms.af/webpack.dev.js new file mode 100644 index 000000000..47cd7da0b --- /dev/null +++ b/src/main/archetype/ui.frontend.react.forms.af/webpack.dev.js @@ -0,0 +1,48 @@ +const {merge} = require('webpack-merge'); +const common = require('./webpack.common.js'); +const BundleAnalyzerPlugin = require('webpack-bundle-analyzer') + .BundleAnalyzerPlugin; +const webpack = require('webpack') +const path = require('path'); +require('dotenv').config({ path: './.env' }); + +module.exports = + merge(common, { + mode: 'development', + devtool: 'source-map', + performance: {hints: 'warning'}, + devServer: { + static: { + directory: path.join(__dirname, 'dist'), + }, + client: { + overlay: false + }, + compress: true, + port: 3000, + proxy: { + '/adobe': 'http://localhost:4502', + } + }, + plugins: [ + new BundleAnalyzerPlugin({ + analyzerMode: 'static', + generateStatsFile: true, + openAnalyzer: false, + }), + new webpack.DefinePlugin({ + process: { + browser: true, + env: { + SCALE_MEDIUM: 'true', + SCALE_LARGE: 'false', + THEME_LIGHT: 'true', + THEME_LIGHTEST: 'false', + THEME_DARK: 'false', + THEME_DARKEST: 'false', + FORMPATH: `'${process.env.FORMPATH}'` + } + } + }), + ], + }); diff --git a/src/main/archetype/ui.frontend.react.forms.af/webpack.prod.js b/src/main/archetype/ui.frontend.react.forms.af/webpack.prod.js new file mode 100644 index 000000000..d2150bbd5 --- /dev/null +++ b/src/main/archetype/ui.frontend.react.forms.af/webpack.prod.js @@ -0,0 +1,32 @@ +const {merge} = require('webpack-merge'); +const common = require('./webpack.common.js'); +const BundleAnalyzerPlugin = require('webpack-bundle-analyzer') + .BundleAnalyzerPlugin; +const webpack = require('webpack') +module.exports = + merge(common, { + mode: 'production', + optimization: { + //minimize: false // for debugging in AEM, uncomment + }, + plugins: [ + new BundleAnalyzerPlugin({ + analyzerMode: 'static', + generateStatsFile: true, + openAnalyzer: false, + }), + new webpack.DefinePlugin({ + process: { + browser: true, + env: { + SCALE_MEDIUM: 'true', + SCALE_LARGE: 'false', + THEME_LIGHT: 'true', + THEME_LIGHTEST: 'false', + THEME_DARK: 'false', + THEME_DARKEST: 'false' + } + } + }), + ], + }); diff --git a/src/main/resources/META-INF/archetype-post-generate.groovy b/src/main/resources/META-INF/archetype-post-generate.groovy index f51ff7627..2de64e669 100644 --- a/src/main/resources/META-INF/archetype-post-generate.groovy +++ b/src/main/resources/META-INF/archetype-post-generate.groovy @@ -29,6 +29,7 @@ def includeFormscommunications = request.getProperties().get("includeFormscommun def enableSSR = request.getProperties().get("enableSSR"); def sdkFormsVersion = request.getProperties().get("sdkFormsVersion") def precompiledScripts = request.getProperties().get("precompiledScripts") +def includeFormsheadless = request.getProperties().get("includeFormsheadless") def appsFolder = new File("$uiAppsPackage/src/main/content/jcr_root/apps/$appId") def configFolder = new File("$uiConfigPackage/src/main/content/jcr_root/apps/$appId/osgiconfig") @@ -189,16 +190,28 @@ if (includeForms == "n" && includeFormsenrollment == "n" && includeFormscommunic assert new File("$uiTestPackage/test-module/rules").deleteDir() assert new File("$uiTestPackage/test-module/assets/form").deleteDir() assert new File("$appsFolder/clientlibs/clientlibs-forms").deleteDir() -} else { - if (aemVersion == "cloud") { - // if forms is included and aem version is set to cloud, set the forms sdk version - if (sdkFormsVersion == "latest") { - println "No Forms SDK version specified, trying to fetch latest" - sdkFormsVersion = getLatestFormsSDK(request.getArchetypeVersion()) - } - println "Using AEM Forms as a Cloud Service SDK version: " + sdkFormsVersion - rootPom.text = rootPom.text.replaceAll('SDK_FORMS_VERSION', sdkFormsVersion.toString()) +} + +// For Adaptive Forms 2 +if (includeFormsheadless == "n") { + assert new File("$appsFolder/components/adaptiveForm").deleteDir() + assert new File("$confFolder/settings/wcm/template-types/af-page-v2").deleteDir() + assert new File("$confFolder/settings/wcm/templates/blank-af-v2").deleteDir() + assert new File("$uiContentPackage/src/main/content/jcr_root/content/dam/$appId/af_model_sample.json").deleteDir() + // Remove ui.frontend.react.forms.af module entry from root pom + removeModule(rootPom, 'ui.frontend.react.forms.af') + // Delete ui.frontend.react.forms.af directory + assert new File(rootDir, "ui.frontend.react.forms.af").deleteDir() +} + +// if forms is included and aem version is set to cloud, set the forms sdk version +if ((includeForms == "y" || includeFormsenrollment == "y" || includeFormscommunications == "y" || includeFormsheadless == "y") && aemVersion == "cloud") { + if (sdkFormsVersion == "latest") { + println "No Forms SDK version specified, trying to fetch latest" + sdkFormsVersion = getLatestFormsSDK(request.getArchetypeVersion()) } + println "Using AEM Forms as a Cloud Service SDK version: " + sdkFormsVersion + rootPom.text = rootPom.text.replaceAll('SDK_FORMS_VERSION', sdkFormsVersion.toString()) } // if config.publish folder ends up empty, remove it, otherwise the filevault-package-maven-plugin will throw diff --git a/src/main/resources/META-INF/maven/archetype-metadata.xml b/src/main/resources/META-INF/maven/archetype-metadata.xml index d62db3c5d..d819d946f 100644 --- a/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -149,6 +149,13 @@ n ^(y|n)$ + + + n + ^(y|n)$ + @@ -388,6 +395,43 @@ + + + + + + **/* + + + + **/node/ + + **/node_modules/ + **/package-lock.json + **/yarn.lock + + **/*.gif + **/*.ico + **/*.jpeg + **/*.jpg + **/*.png + **/*.svg + + + + + + + **/*.gif + **/*.ico + **/*.jpeg + **/*.jpg + **/*.png + **/*.svg + + + + diff --git a/src/test/resources/projects/basic-6.5.0/archetype.properties b/src/test/resources/projects/basic-6.5.0/archetype.properties index f76bd61fb..51a3170cd 100644 --- a/src/test/resources/projects/basic-6.5.0/archetype.properties +++ b/src/test/resources/projects/basic-6.5.0/archetype.properties @@ -24,3 +24,4 @@ amp=y enableDynamicMedia=y enableSSR=n precompiledScripts=n +includeFormsheadless=n diff --git a/src/test/resources/projects/basic/archetype.properties b/src/test/resources/projects/basic/archetype.properties index a18cbb56a..10c87dbeb 100644 --- a/src/test/resources/projects/basic/archetype.properties +++ b/src/test/resources/projects/basic/archetype.properties @@ -24,3 +24,4 @@ amp=y enableDynamicMedia=y enableSSR=n precompiledScripts=n +includeFormsheadless=n diff --git a/src/test/resources/projects/cif-cloud/archetype.properties b/src/test/resources/projects/cif-cloud/archetype.properties index 1c98e5eea..5bdb16eb6 100644 --- a/src/test/resources/projects/cif-cloud/archetype.properties +++ b/src/test/resources/projects/cif-cloud/archetype.properties @@ -24,3 +24,4 @@ amp=${amp} enableDynamicMedia=y enableSSR=n precompiledScripts=n +includeFormsheadless=n \ No newline at end of file diff --git a/src/test/resources/projects/cif/archetype.properties b/src/test/resources/projects/cif/archetype.properties index 7edd07507..1cc319f73 100644 --- a/src/test/resources/projects/cif/archetype.properties +++ b/src/test/resources/projects/cif/archetype.properties @@ -24,3 +24,4 @@ amp=${amp} enableDynamicMedia=y enableSSR=n precompiledScripts=n +includeFormsheadless=n diff --git a/src/test/resources/projects/cloud-precompiled-scripts/archetype.properties b/src/test/resources/projects/cloud-precompiled-scripts/archetype.properties index 0dd47d488..215690f64 100644 --- a/src/test/resources/projects/cloud-precompiled-scripts/archetype.properties +++ b/src/test/resources/projects/cloud-precompiled-scripts/archetype.properties @@ -24,3 +24,4 @@ amp=y enableDynamicMedia=y enableSSR=n precompiledScripts=y +includeFormsheadless=n diff --git a/src/test/resources/projects/cloud/archetype.properties b/src/test/resources/projects/cloud/archetype.properties index e1fee7419..c3db85481 100644 --- a/src/test/resources/projects/cloud/archetype.properties +++ b/src/test/resources/projects/cloud/archetype.properties @@ -24,3 +24,4 @@ amp=y enableDynamicMedia=y enableSSR=n precompiledScripts=n +includeFormsheadless=n \ No newline at end of file diff --git a/src/test/resources/projects/forms-communications-cloud/archetype.properties b/src/test/resources/projects/forms-communications-cloud/archetype.properties index b3bf54d99..ca6330c93 100644 --- a/src/test/resources/projects/forms-communications-cloud/archetype.properties +++ b/src/test/resources/projects/forms-communications-cloud/archetype.properties @@ -23,4 +23,5 @@ datalayer=${datalayer} amp=${amp} enableDynamicMedia=y enableSSR=y -precompiledScripts=n \ No newline at end of file +precompiledScripts=n +includeFormsheadless=n \ No newline at end of file diff --git a/src/test/resources/projects/forms-enrollment-cloud/archetype.properties b/src/test/resources/projects/forms-enrollment-cloud/archetype.properties index 29565095d..36c516ed4 100644 --- a/src/test/resources/projects/forms-enrollment-cloud/archetype.properties +++ b/src/test/resources/projects/forms-enrollment-cloud/archetype.properties @@ -24,3 +24,4 @@ amp=${amp} enableDynamicMedia=y enableSSR=y precompiledScripts=n +includeFormsheadless=n \ No newline at end of file diff --git a/src/test/resources/projects/forms-headless/archetype.properties b/src/test/resources/projects/forms-headless/archetype.properties new file mode 100644 index 000000000..d16ad3128 --- /dev/null +++ b/src/test/resources/projects/forms-headless/archetype.properties @@ -0,0 +1,27 @@ +groupId=archetype.it +artifactId=testing-forms-cloud +appId=testing-forms-cloud +package=it.pkg +version=0.1-SNAPSHOT +appTitle=Test Forms Cloud Project +aemVersion=cloud +sdkVersion=latest +language=en +country=us +singleCountry=n +frontendModule=general +includeExamples=y +includeErrorHandler=n +includeDispatcherConfig=y +includeCommerce=n +commerceEndpoint=https://hostname.com/grapql +includeForms=n +includeFormsenrollment=y +includeFormscommunications=n +sdkFormsVersion=latest +datalayer=${datalayer} +amp=${amp} +enableDynamicMedia=y +enableSSR=y +precompiledScripts=n +includeFormsheadless=y \ No newline at end of file diff --git a/src/test/resources/projects/forms-headless/goal.txt b/src/test/resources/projects/forms-headless/goal.txt new file mode 100644 index 000000000..7c32f5598 --- /dev/null +++ b/src/test/resources/projects/forms-headless/goal.txt @@ -0,0 +1 @@ +install diff --git a/src/test/resources/projects/frontend-angular-ssr/archetype.properties b/src/test/resources/projects/frontend-angular-ssr/archetype.properties index 17ca7d83d..b8a55c208 100644 --- a/src/test/resources/projects/frontend-angular-ssr/archetype.properties +++ b/src/test/resources/projects/frontend-angular-ssr/archetype.properties @@ -24,3 +24,4 @@ amp=${amp} enableDynamicMedia=y enableSSR=y precompiledScripts=n +includeFormsheadless=n \ No newline at end of file diff --git a/src/test/resources/projects/frontend-angular/archetype.properties b/src/test/resources/projects/frontend-angular/archetype.properties index ce604a849..2912af914 100644 --- a/src/test/resources/projects/frontend-angular/archetype.properties +++ b/src/test/resources/projects/frontend-angular/archetype.properties @@ -24,3 +24,4 @@ amp=${amp} enableDynamicMedia=y enableSSR=n precompiledScripts=n +includeFormsheadless=n \ No newline at end of file diff --git a/src/test/resources/projects/frontend-general/archetype.properties b/src/test/resources/projects/frontend-general/archetype.properties index a500d68b9..b2359dc76 100644 --- a/src/test/resources/projects/frontend-general/archetype.properties +++ b/src/test/resources/projects/frontend-general/archetype.properties @@ -24,3 +24,4 @@ amp=${amp} enableDynamicMedia=y enableSSR=n precompiledScripts=n +includeFormsheadless=n \ No newline at end of file diff --git a/src/test/resources/projects/frontend-react-ssr/archetype.properties b/src/test/resources/projects/frontend-react-ssr/archetype.properties index b1c4d9375..68156b797 100644 --- a/src/test/resources/projects/frontend-react-ssr/archetype.properties +++ b/src/test/resources/projects/frontend-react-ssr/archetype.properties @@ -24,3 +24,4 @@ amp=${amp} enableDynamicMedia=y enableSSR=y precompiledScripts=n +includeFormsheadless=n \ No newline at end of file diff --git a/src/test/resources/projects/frontend-react/archetype.properties b/src/test/resources/projects/frontend-react/archetype.properties index 943ffb56a..9ed9512aa 100644 --- a/src/test/resources/projects/frontend-react/archetype.properties +++ b/src/test/resources/projects/frontend-react/archetype.properties @@ -24,3 +24,4 @@ amp=${amp} enableDynamicMedia=y enableSSR=n precompiledScripts=n +includeFormsheadless=n \ No newline at end of file From 67ad97dfe477c10c9fbdc2f23adf4218c0dca1c0 Mon Sep 17 00:00:00 2001 From: Chris Bohnert <38424477+bohnertchris@users.noreply.github.com> Date: Wed, 31 Aug 2022 14:06:32 +0200 Subject: [PATCH 4/5] Add note about valid Java package name for groupID (#978) CQDOC-18946 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e44c96daa..52d6504de 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Name | Default | Description `appTitle` | | Application title, will be used for website title and components groups (e.g. `"My Site"`). `appId` | | Technical name, will be used for component, config and content folder names, as well as client library names (e.g. `"mysite"`). `artifactId` | *`${appId}`* | Base Maven artifact ID (e.g. `"mysite"`). -`groupId` | | Base Maven group ID (e.g. `"com.mysite"`). +`groupId` | | Base Maven group ID (e.g. `"com.mysite"`). This value must be a [valid Java package name.](https://docs.oracle.com/javase/specs/jls/se6/html/packages.html#7.7) `package` | *`${groupId}`* | Java Source Package (e.g. `"com.mysite"`). `version` | `1.0-SNAPSHOT` | Project version (e.g. `1.0-SNAPSHOT`). `aemVersion` | `cloud` | Target AEM version (can be `cloud` for [AEM as a Cloud Service](https://docs.adobe.com/content/help/en/experience-manager-cloud-service/landing/home.html); or `6.5.5` for [Adobe Managed Services](https://github.com/adobe/aem-project-archetype/tree/master/src/main/archetype/dispatcher.ams) or on-premise). From c49709ec43ca7a33ac4cf1793f7dac03814a00da Mon Sep 17 00:00:00 2001 From: Namit Gupta Date: Thu, 22 Jun 2023 16:53:36 +0530 Subject: [PATCH 5/5] Added gitignore rule for VS Code configurations --- src/main/archetype/.gitignore | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/archetype/.gitignore b/src/main/archetype/.gitignore index b86f696dc..f0ef2f030 100644 --- a/src/main/archetype/.gitignore +++ b/src/main/archetype/.gitignore @@ -41,6 +41,10 @@ local.properties # TeXlipse plugin .texlipse +### VS Code ### + +# basic config +.vscode ### Java ### *.class @@ -102,4 +106,4 @@ reports/ # Others dispatcher/src/conf.d/variables/default.vars ui.tests/test-module/assets/form/themes/**/*diff.png -ui.tests/test-module/assets/form/themes/**/*current.png \ No newline at end of file +ui.tests/test-module/assets/form/themes/**/*current.png