-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating type for button and actions core components (#1364)
* Updating type for buttons * Updating collateral for button * Fixing collateral and test * Fixing code and test * Fixing test and keeping button disabled * Adding code comments * Updating read me and test * Fixing reset test --------- Co-authored-by: Muskan Gupta <[email protected]> Co-authored-by: Muskan Gupta <[email protected]> Co-authored-by: Rishi Mehta <[email protected]>
- Loading branch information
1 parent
b154b88
commit 77886e9
Showing
34 changed files
with
742 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...main/content/jcr_root/apps/forms-core-components-it/components/page-buttonv1/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
~ Copyright 2024 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. | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/--> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | ||
jcr:description="Page Component for the Core Components IT" | ||
jcr:primaryType="cq:Component" | ||
jcr:title="Page" | ||
sling:resourceSuperType="forms-components-examples/components/page" | ||
componentGroup=".hidden"/> |
27 changes: 27 additions & 0 deletions
27
...ent/jcr_root/apps/forms-core-components-it/components/page-buttonv1/customfooterlibs.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
~ Copyright 2024 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. | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/--> | ||
<sly data-sly-use.clientlib="core/wcm/components/commons/v1/templates/clientlib.html" | ||
data-sly-use.formclientlibmanager="com.adobe.cq.forms.core.components.models.form.FormClientLibManager"> | ||
<sly data-sly-repeat="${formclientlibmanager.clientLibRefList}" data-sly-call="${clientlib.js @ categories=item, async=true}"/> | ||
</sly> | ||
<!-- Adding core.forms.components.it.runtime.all as we need to embed all component client libraries inside all due to inter dependency between them --> | ||
<!-- core.forms.components.it.textinput.v1.runtime is embedded as part of core.forms.components.it.runtime.all --> | ||
<sly data-sly-use.clientlib="core/wcm/components/commons/v1/templates/clientlib.html"> | ||
<sly data-sly-test="${!wcmmode.edit}" data-sly-call="${clientlib.js @ categories=['core.forms.components.runtime.base','core.forms.components.container.v2.runtime','core.forms.components.button.v1.runtime'], async=false}"/> | ||
</sly> | ||
<sly data-sly-use.page="com.adobe.cq.wcm.core.components.models.Page"> | ||
<sly data-sly-test="${page.data && page.dataLayerClientlibIncluded}" data-sly-call="${clientlib.js @ categories='core.forms.components.commons.v1.datalayer', async=true}"></sly> | ||
</sly> |
22 changes: 22 additions & 0 deletions
22
...main/content/jcr_root/apps/forms-core-components-it/components/page-buttonv2/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
~ Copyright 2024 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. | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/--> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | ||
jcr:description="Page Component for the Core Components IT" | ||
jcr:primaryType="cq:Component" | ||
jcr:title="Page" | ||
sling:resourceSuperType="forms-components-examples/components/page" | ||
componentGroup=".hidden"/> |
27 changes: 27 additions & 0 deletions
27
...ent/jcr_root/apps/forms-core-components-it/components/page-buttonv2/customfooterlibs.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
~ Copyright 2024 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. | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/--> | ||
<sly data-sly-use.clientlib="core/wcm/components/commons/v1/templates/clientlib.html" | ||
data-sly-use.formclientlibmanager="com.adobe.cq.forms.core.components.models.form.FormClientLibManager"> | ||
<sly data-sly-repeat="${formclientlibmanager.clientLibRefList}" data-sly-call="${clientlib.js @ categories=item, async=true}"/> | ||
</sly> | ||
<!-- Adding core.forms.components.it.runtime.all as we need to embed all component client libraries inside all due to inter dependency between them --> | ||
<!-- core.forms.components.it.textinput.v1.runtime is embedded as part of core.forms.components.it.runtime.all --> | ||
<sly data-sly-use.clientlib="core/wcm/components/commons/v1/templates/clientlib.html"> | ||
<sly data-sly-test="${!wcmmode.edit}" data-sly-call="${clientlib.js @ categories=['core.forms.components.runtime.base','core.forms.components.container.v2.runtime','core.forms.components.button.v1.runtime'], async=false}"/> | ||
</sly> | ||
<sly data-sly-use.page="com.adobe.cq.wcm.core.components.models.Page"> | ||
<sly data-sly-test="${page.data && page.dataLayerClientlibIncluded}" data-sly-call="${clientlib.js @ categories='core.forms.components.commons.v1.datalayer', async=true}"></sly> | ||
</sly> |
7 changes: 7 additions & 0 deletions
7
...oot/content/dam/formsanddocuments/core-components-it/samples/button/buttonv1/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" | ||
jcr:mixinTypes="[rep:AccessControllable]" | ||
jcr:primaryType="sling:Folder" | ||
lcFolder="{Long}0" | ||
type="lcFolder" | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...oot/content/dam/formsanddocuments/core-components-it/samples/button/buttonv2/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" | ||
jcr:mixinTypes="[rep:AccessControllable]" | ||
jcr:primaryType="sling:Folder" | ||
lcFolder="{Long}0" | ||
type="lcFolder" | ||
/> |
21 changes: 21 additions & 0 deletions
21
...ntent/dam/formsanddocuments/core-components-it/samples/button/buttonv2/basic/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:fd="http://www.adobe.com/aemfd/fd/1.0" xmlns:dam="http://www.day.com/dam/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" | ||
jcr:primaryType="dam:Asset"> | ||
<jcr:content | ||
jcr:lastModified="{Date}2024-09-03T15:12:59.900+05:30" | ||
jcr:primaryType="dam:AssetContent" | ||
sling:resourceType="fd/fm/af/render" | ||
guide="1" | ||
type="guide"> | ||
<metadata | ||
fd:version="2.1" | ||
jcr:primaryType="nt:unstructured" | ||
allowedRenderFormat="HTML" | ||
author="admin" | ||
availableInMobileApp="{Boolean}false" | ||
dorType="none" | ||
formmodel="none" | ||
hasCustomThumbnail="{Boolean}false" | ||
title="Adaptive Form V2 (IT)"/> | ||
</jcr:content> | ||
</jcr:root> |
5 changes: 5 additions & 0 deletions
5
...content/jcr_root/content/forms/af/core-components-it/samples/button/buttonv1/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" | ||
jcr:mixinTypes="[rep:AccessControllable]" | ||
jcr:primaryType="sling:Folder" | ||
hidden="true"/> |
81 changes: 81 additions & 0 deletions
81
...t/jcr_root/content/forms/af/core-components-it/samples/button/buttonv1/basic/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:fd="http://www.adobe.com/aemfd/fd/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" | ||
jcr:primaryType="cq:Page"> | ||
<jcr:content | ||
cq:deviceGroups="[mobile/groups/responsive]" | ||
cq:lastModified="{Date}2024-09-03T15:12:59.900+05:30" | ||
cq:lastModifiedBy="admin" | ||
cq:template="/conf/core-components-examples/settings/wcm/templates/af-blank-v2" | ||
jcr:language="en" | ||
jcr:primaryType="cq:PageContent" | ||
jcr:title="Adaptive Form V1 (IT)" | ||
sling:resourceType="forms-core-components-it/components/page-buttonv1"> | ||
<guideContainer | ||
fd:version="2.1" | ||
fieldType="form" | ||
jcr:primaryType="nt:unstructured" | ||
sling:resourceType="forms-components-examples/components/form/container"> | ||
<button-1 | ||
type="button" | ||
jcr:primaryType="nt:unstructured" | ||
name="button-1" | ||
fieldType="button" | ||
jcr:title="button-1" | ||
enabled="{Boolean}true" | ||
visible="{Boolean}true" | ||
sling:resourceType="core/fd/components/form/button/v1/button"/> | ||
<button-2 | ||
aria-label="basic-button" | ||
type="button" | ||
jcr:primaryType="nt:unstructured" | ||
name="button-2" | ||
jcr:title="button-2" | ||
fieldType="button" | ||
enabled="{Boolean}false" | ||
visible="{Boolean}true" | ||
sling:resourceType="core/fd/components/form/button/v1/button"/> | ||
<button-3 | ||
class="cmp-button" | ||
data-cmp-is="adaptiveFormButton" | ||
aria-label="basic-button" | ||
type="button" | ||
jcr:primaryType="nt:unstructured" | ||
name="button-3" | ||
jcr:title="button-3" | ||
fieldType="button" | ||
enabled="{Boolean}true" | ||
visible="{Boolean}false" | ||
sling:resourceType="core/fd/components/form/button/v1/button"/> | ||
<button-4 | ||
description="This is long description" | ||
tooltip="This is short description" | ||
tooltipVisible="true" | ||
aria-label="basic-button-4" | ||
type="button" | ||
jcr:primaryType="nt:unstructured" | ||
name="button-4" | ||
jcr:title="button-4" | ||
fieldType="button" | ||
enabled="{Boolean}true" | ||
visible="{Boolean}true" | ||
sling:resourceType="core/fd/components/form/button/v1/button"/> | ||
<button-5 | ||
jcr:lastModified="{Date}2023-01-30T14:02:55.708+05:30" | ||
jcr:lastModifiedBy="admin" | ||
jcr:primaryType="nt:unstructured" | ||
jcr:title="Navigate" | ||
sling:resourceType="core/fd/components/form/button/v1/button" | ||
dorExclusion="true" | ||
fieldType="button" | ||
name="button1675067564294"> | ||
<fd:rules | ||
fd:click="[{"nodeName":"ROOT"\,"items":[{"nodeName":"STATEMENT"\,"choice":{"nodeName":"EVENT_SCRIPTS"\,"items":[{"nodeName":"EVENT_CONDITION"\,"choice":{"nodeName":"EVENT_AND_COMPARISON"\,"items":[{"nodeName":"COMPONENT"\,"value":{"id":"$form.button1675067564294"\,"type":"BUTTON"\,"name":"button1675067564294"}}\,{"nodeName":"EVENT_AND_COMPARISON_OPERATOR"\,"choice":{"nodeName":"is clicked"\,"value":null}}\,{"nodeName":"PRIMITIVE_EXPRESSION"\,"choice":null}]}\,"nested":false}\,{"nodeName":"Then"\,"value":null}\,{"nodeName":"BLOCK_STATEMENTS"\,"items":[{"nodeName":"BLOCK_STATEMENT"\,"choice":{"nodeName":"NAVIGATE_TO"\,"items":[{"nodeName":"URL_LITERAL"\,"value":"https://www.google.com"}\,{"nodeName":"in"\,"value":null}\,{"nodeName":"NAVIGATE_METHOD_OPTIONS"\,"choice":{"nodeName":"NEW_WINDOW"\,"items":[]}}]}}]}]}}]\,"isValid":true\,"enabled":true\,"version":1\,"script":["navigateTo('https://www.google.com'\, '_newwindow')"]\,"eventName":"Click"\,"ruleType":""\,"description":""}]" | ||
jcr:primaryType="nt:unstructured" | ||
validationStatus="valid"/> | ||
<fd:events | ||
jcr:primaryType="nt:unstructured" | ||
click="[navigateTo('https://www.google.com'\, '_newwindow')]"/> | ||
</button-5> | ||
</guideContainer> | ||
</jcr:content> | ||
</jcr:root> |
5 changes: 5 additions & 0 deletions
5
...content/jcr_root/content/forms/af/core-components-it/samples/button/buttonv2/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" | ||
jcr:mixinTypes="[rep:AccessControllable]" | ||
jcr:primaryType="sling:Folder" | ||
hidden="true"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...apps/src/main/content/jcr_root/apps/core/fd/components/form/actions/reset/v2/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" | ||
jcr:primaryType="nt:unstructured"> | ||
<reset/> | ||
</jcr:root> |
8 changes: 8 additions & 0 deletions
8
...rc/main/content/jcr_root/apps/core/fd/components/form/actions/reset/v2/reset/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | ||
cq:icon="revert" | ||
jcr:description="Reset Button" | ||
jcr:primaryType="cq:Component" | ||
jcr:title="Adaptive Form Reset Button (v2)" | ||
sling:resourceSuperType="core/fd/components/form/button/v2/button" | ||
componentGroup=".core-adaptiveform"/> |
Oops, something went wrong.