Skip to content

Commit 5077318

Browse files
Armaan GuptaArmaan Gupta
authored andcommitted
Merge branch 'dev' into FORMS-18211
pulling the latest dev
2 parents 2d4952c + a361cfb commit 5077318

File tree

287 files changed

+14109
-454
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

287 files changed

+14109
-454
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"accessibilityExceptionList": ["landmark-one-main", "label-title-only", "region", "focus-order-semantics", "target-size", "page-has-heading-one"]
2+
"accessibilityExceptionList": ["landmark-one-main", "label-title-only", "region", "focus-order-semantics", "target-size", "page-has-heading-one", "aria-required-attr", "empty-heading"]
33
}

.circleci/ci/it-tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ try {
3939

4040
//todo: remove this later, once aem image is released, since sites rotary aem base image has "2.25.4"
4141
//let wcmVersion = ci.sh('mvn help:evaluate -Dexpression=core.wcm.components.version -q -DforceStdout', true);
42-
let wcmVersion = "2.27.0";
42+
let wcmVersion = "2.30.0";
4343
ci.stage("Integration Tests");
4444
ci.dir(qpPath, () => {
4545
// Connect to QP

.circleci/config.yml

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@ common:
2828
name: Docker compose
2929
command: |
3030
set +e # Disable exit on error
31+
# Clean up any existing containers first
32+
docker-compose -f .circleci/docker-compose.yml down -v --remove-orphans || true
33+
# Pull images in parallel to save time
34+
# docker-compose -f .circleci/docker-compose.yml pull --parallel || true
3135
for i in $(seq 3); do
3236
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin docker2-granite-release-local.dr-uw2.adobeitc.com
3337
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin docker-adobe-cif-release.dr-uw2.adobeitc.com
34-
docker-compose -f .circleci/docker-compose.yml down -v
38+
# docker-compose -f .circleci/docker-compose.yml down -v
3539
docker-compose -f .circleci/docker-compose.yml up -d && break
3640
sleep 10 # Add a delay between retries
3741
done
@@ -136,6 +140,7 @@ executors:
136140
machine:
137141
image: ubuntu-2204:2024.01.1
138142
docker_layer_caching: true
143+
resource_class: medium
139144

140145
jobs:
141146
build-java-11:
@@ -161,13 +166,13 @@ jobs:
161166
root: /home/circleci/build
162167
paths:
163168
- configuration.json
164-
- bundles/core/target
165-
- bundles/af-core/target
169+
- bundles/core/target/*.jar
170+
- bundles/af-core/target/*.jar
166171
- ui.apps/target/*.zip
167172
- ui.af.apps/target/*.zip
168173
- examples/ui.apps/target/*.zip
169174
- examples/ui.content/target/*.zip
170-
- examples/core/target
175+
- examples/core/target/*.jar
171176
- it/core/target/*.jar
172177
- it/apps/target/*.zip
173178
- it/content/target/*.zip
@@ -182,17 +187,17 @@ jobs:
182187
conf: .circleci/codecov.yml
183188
flags: unittests
184189

185-
cypress-chrome-cloudready-with-addon:
186-
executor: test_executor_cloudready
187-
environment:
188-
AEM: addon
189-
TYPE: cypress
190-
BROWSER: chrome
191-
PRERELEASE: 'true'
192-
resource_class: xlarge
193-
working_directory: /home/circleci/build
194-
parallelism: 8
195-
<<: *cypress_test_steps
190+
# cypress-chrome-cloudready-with-addon:
191+
# executor: test_executor_cloudready
192+
# environment:
193+
# AEM: addon
194+
# TYPE: cypress
195+
# BROWSER: chrome
196+
# PRERELEASE: 'true'
197+
# resource_class: xlarge
198+
# working_directory: /home/circleci/build
199+
# parallelism: 8
200+
# <<: *cypress_test_steps
196201

197202
cypress-chrome-cloudready-with-latest-addon:
198203
executor: test_executor_cloudready
@@ -202,9 +207,9 @@ jobs:
202207
BROWSER: chrome
203208
PRERELEASE: 'true'
204209
FT: 'true'
205-
resource_class: xlarge
210+
resource_class: large
206211
working_directory: /home/circleci/build
207-
parallelism: 8
212+
parallelism: 4
208213
<<: *cypress_test_steps
209214

210215
cypress-chrome-cloudready-with-latest-addon-without-ft:
@@ -215,9 +220,9 @@ jobs:
215220
BROWSER: chrome
216221
PRERELEASE: 'true'
217222
FT: 'false'
218-
resource_class: xlarge
223+
resource_class: large
219224
working_directory: /home/circleci/build
220-
parallelism: 8
225+
parallelism: 4
221226
<<: *cypress_test_steps
222227

223228
# cypress-chrome-cloudready-with-latest-addon-and-old-core-components:
@@ -393,12 +398,12 @@ workflows:
393398
filters:
394399
tags:
395400
only: /.*/
396-
- cypress-chrome-cloudready-with-addon:
397-
filters:
398-
tags:
399-
only: /.*/
400-
requires:
401-
- build-java-11
401+
# - cypress-chrome-cloudready-with-addon:
402+
# filters:
403+
# tags:
404+
# only: /.*/
405+
# requires:
406+
# - build-java-11
402407
- cypress-chrome-cloudready-with-latest-addon:
403408
filters:
404409
tags:

.circleci/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
entrypoint: tail -f /dev/null # Keeps the container running
77

88
circleci-aem-cloudready:
9-
image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem-cloudready:19823-final-openjdk11
9+
image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem-cloudready:22450-openjdk11
1010
depends_on:
1111
- circleci-qp
1212
# Add any additional configurations or environment variables if needed

bundles/af-core/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,10 @@
653653
<artifactId>core.wcm.components.core</artifactId>
654654
<scope>provided</scope>
655655
</dependency>
656+
<dependency>
657+
<groupId>com.adobe.aem</groupId>
658+
<artifactId>core-forms-print-components-print-dor-api</artifactId>
659+
</dependency>
656660
<dependency>
657661
<groupId>org.apache.sling</groupId>
658662
<artifactId>org.apache.sling.testing.caconfig-mock-plugin</artifactId>

bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/FormConstants.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,11 @@ private FormConstants() {
148148

149149
/** Form definition type indicating submission view */
150150
public static final String FORM_DEFINITION_SUBMISSION = "submission";
151+
152+
/** The channel for print */
153+
public static final String CHANNEL_PRINT = "print";
154+
155+
/** The resource type for date time input field v1 */
156+
public static final String RT_FD_FORM_DATETIME_V1 = RT_FD_FORM_PREFIX + "datetime/v1/datetime";
157+
151158
}

bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/ReservedProperties.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,20 @@ private ReservedProperties() {
7474
public static final String PN_PLACEHOLDER = "placeholder";
7575
public static final String PN_READ_ONLY = "readOnly";
7676
public static final String PN_DEFAULT_VALUE = "default";
77+
public static final String PN_EMPTY_VALUE = "fd:emptyValue";
7778
public static final String PN_MULTI_DEFAULT_VALUES = "fd:multiDefaultValues";
7879
public static final String PN_FORMAT = "format";
7980
public static final String PN_DISPLAY_FORMAT = "displayFormat";
81+
public static final String PN_CUSTOM_DISPLAY_FORMAT = "fd:customDisplayFormat";
8082
public static final String PN_EDIT_FORMAT = "editFormat";
8183
public static final String PN_DISPLAY_VALUE_EXPRESSION = "displayValueExpression";
8284
public static final String PN_DATA_FORMAT = "dataFormat";
8385
public static final String PN_MIN_LENGTH = "minLength";
8486
public static final String PN_MAX_LENGTH = "maxLength";
8587
public static final String PN_MINIMUM_DATE = "minimumDate";
8688
public static final String PN_MAXIMUM_DATE = "maximumDate";
89+
public static final String PN_MINIMUM_DATE_TIME = "minimumDateTime";
90+
public static final String PN_MAXIMUM_DATE_TIME = "maximumDateTime";
8791
public static final String PN_MAXIMUM = "maximum";
8892
public static final String PN_MINIMUM = "minimum";
8993
public static final String PN_EXCLUSIVE_MINIMUM = "exclusiveMinimum";
@@ -163,8 +167,8 @@ private ReservedProperties() {
163167
public static final String FD_ENABLE_AUTO_SAVE = "fd:enableAutoSave";
164168
public static final String FD_AUTO_SAVE_STRATEGY_TYPE = "fd:autoSaveStrategyType";
165169
public static final String FD_AUTO_SAVE_INTERVAL = "fd:autoSaveInterval";
166-
public static final String FD_EXCLUDE_FROM_DOR_IF_HIDDEN = "excludeFromDoRIfHidden";
167-
170+
public static final String FD_EXCLUDE_FROM_DOR_IF_HIDDEN = "fd:excludeFromDoRIfHidden";
171+
public static final String FD_DIALOG_LABEL = "fd:dialogLabel";
168172
public static final String FD_XFA_SCRIPTS = "fd:xfaScripts";
169173

170174
public static final String FD_DRAFT_ID = "fd:draftId";

bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/ButtonImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ public Map<String, Object> getDorProperties() {
109109
if (dorColspan != null) {
110110
customDorProperties.put("dorColspan", dorColspan);
111111
}
112+
Map<String, Object> dorContainer = getDorContainer();
113+
if (dorContainer != null) {
114+
customDorProperties.put(CUSTOM_DOR_CONTAINER_WRAPPER, dorContainer);
115+
}
112116
return customDorProperties;
113117
}
114118

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2+
~ Copyright 2025 Adobe
3+
~
4+
~ Licensed under the Apache License, Version 2.0 (the "License");
5+
~ you may not use this file except in compliance with the License.
6+
~ You may obtain a copy of the License at
7+
~
8+
~ http://www.apache.org/licenses/LICENSE-2.0
9+
~
10+
~ Unless required by applicable law or agreed to in writing, software
11+
~ distributed under the License is distributed on an "AS IS" BASIS,
12+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
~ See the License for the specific language governing permissions and
14+
~ limitations under the License.
15+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
16+
17+
package com.adobe.cq.forms.core.components.internal.models.v1.form;
18+
19+
import java.time.OffsetDateTime;
20+
import java.time.format.DateTimeFormatter;
21+
import java.util.Map;
22+
23+
import javax.annotation.Nullable;
24+
25+
import org.apache.sling.api.SlingHttpServletRequest;
26+
import org.apache.sling.api.resource.Resource;
27+
import org.apache.sling.models.annotations.Exporter;
28+
import org.apache.sling.models.annotations.Model;
29+
import org.apache.sling.models.annotations.injectorspecific.InjectionStrategy;
30+
import org.apache.sling.models.annotations.injectorspecific.ValueMapValue;
31+
import org.jetbrains.annotations.NotNull;
32+
33+
import com.adobe.cq.export.json.ComponentExporter;
34+
import com.adobe.cq.export.json.ExporterConstants;
35+
import com.adobe.cq.forms.core.components.internal.form.FormConstants;
36+
import com.adobe.cq.forms.core.components.models.form.*;
37+
import com.adobe.cq.forms.core.components.util.AbstractFieldImpl;
38+
import com.adobe.xfa.ut.StringUtils;
39+
import com.fasterxml.jackson.annotation.JsonFormat;
40+
41+
@Model(
42+
adaptables = { SlingHttpServletRequest.class, Resource.class },
43+
adapters = { DateTime.class, ComponentExporter.class },
44+
resourceType = { FormConstants.RT_FD_FORM_DATETIME_V1 })
45+
@Exporter(
46+
name = ExporterConstants.SLING_MODEL_EXPORTER_NAME,
47+
extensions = ExporterConstants.SLING_MODEL_EXTENSION)
48+
public class DateTimeImpl extends AbstractFieldImpl implements DateTime {
49+
@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL)
50+
@Nullable
51+
private String pattern;
52+
53+
@Override
54+
public String getFieldType() {
55+
return super.getFieldType(FieldType.DATETIME_INPUT);
56+
}
57+
58+
@Override
59+
public String getMinimumDateTime() {
60+
return getFormattedDate(minimumDateTime);
61+
}
62+
63+
@Override
64+
public String getMaximumDateTime() {
65+
return getFormattedDate(maximumDateTime);
66+
}
67+
68+
private String getFormattedDate(String dateTime) {
69+
if (!StringUtils.isEmpty(dateTime)) {
70+
OffsetDateTime formattedTime = OffsetDateTime.parse(dateTime);
71+
return formattedTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm"));
72+
}
73+
return dateTime;
74+
75+
}
76+
77+
public @NotNull Map<ConstraintType, String> getConstraintMessages() {
78+
Map<ConstraintType, String> res = super.getConstraintMessages();
79+
String msg = getConstraintMessage(ConstraintType.MINIMUM);
80+
if (msg != null) {
81+
res.put(ConstraintType.MINIMUM, msg);
82+
}
83+
msg = getConstraintMessage(ConstraintType.MAXIMUM);
84+
if (msg != null) {
85+
res.put(ConstraintType.MAXIMUM, msg);
86+
}
87+
return res;
88+
}
89+
90+
@Override
91+
@Nullable
92+
public String getFormat() {
93+
return "date-time";
94+
}
95+
96+
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = Base.DATE_TIME_FORMATTER, timezone = "UTC")
97+
@Override
98+
public Object[] getDefault() {
99+
return defaultValue != null ? defaultValue.clone() : null;
100+
}
101+
102+
}

0 commit comments

Comments
 (0)