diff --git a/bundles/af-core/pom.xml b/bundles/af-core/pom.xml
index 097ee47f8c..81a72f3ca3 100644
--- a/bundles/af-core/pom.xml
+++ b/bundles/af-core/pom.xml
@@ -340,7 +340,6 @@
net.revelc.code
impsort-maven-plugin
- 1.4.1
java, javax, org
*
diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/package-info.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/package-info.java
index 510fa1406e..50915102a1 100644
--- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/package-info.java
+++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/package-info.java
@@ -34,7 +34,7 @@
* version, is bound to this proxy component resource type.
*
*/
-@Version("4.7.1")
+@Version("5.2.0") // aligning this with release/650 since af2-rest-api is compiled with 5.2.0 in release/650
package com.adobe.cq.forms.core.components.models.form;
import org.osgi.annotation.versioning.Version;
diff --git a/bundles/core/pom.xml b/bundles/core/pom.xml
index c1ae1d91e5..f40ede30e8 100644
--- a/bundles/core/pom.xml
+++ b/bundles/core/pom.xml
@@ -340,7 +340,6 @@
net.revelc.code
impsort-maven-plugin
- 1.4.1
java, javax, org
*
diff --git a/it/apps/src/main/content/jcr_root/apps/core/fd/af-clientlibs/core-forms-components-runtime-all/resources/i18n/th.json b/it/apps/src/main/content/jcr_root/apps/core/fd/af-clientlibs/core-forms-components-runtime-all/resources/i18n/th.json
new file mode 100644
index 0000000000..b0fced45ad
--- /dev/null
+++ b/it/apps/src/main/content/jcr_root/apps/core/fd/af-clientlibs/core-forms-components-runtime-all/resources/i18n/th.json
@@ -0,0 +1,89 @@
+{
+ "FileCloseAccessText" : "กด Enter เพื่อลบไฟล์ ",
+ "FileSizeGreater" : "ไฟล์ ${0} ใหญ่กว่าขนาดที่คาดไว้: ${1}MB",
+ "FileNameInvalid" : "ห้ามแนบไฟล์ที่ชื่อไฟล์ขึ้นต้นด้วย (.) มี \\ / : * ? \" < > | ; % $ หรือเป็นคีย์เวิร์ดที่สงวนไว้ เช่น nul, prn, con, lpt หรือ com",
+ "FileMimeTypeInvalid" : "ไฟล์ ${0} เป็นประเภทไฟล์ที่ไม่รองรับ",
+ "InternalFormSubmissionError" : "พบข้อผิดพลาดภายในขณะส่งแบบฟอร์ม",
+ "type" : "กรุณาใส่ค่าที่ถูกต้อง.",
+ "required" : "กรุณากรอกข้อมูลในช่องนี้.",
+ "minimum" : "ค่าต้องมากกว่าหรือเท่ากับ ${0}.",
+ "maximum" : "ค่าต้องน้อยกว่าหรือเท่ากับ ${0}",
+ "minLength" : "โปรดขยายข้อความนี้ให้มีความยาว ${0} ตัวอักษรขึ้นไป.",
+ "maxLength" : "โปรดย่อข้อความนี้ให้เหลือ ${0} ตัวอักษรหรือน้อยกว่า.",
+ "step" : "กรุณาใส่ค่าที่ถูกต้อง.",
+ "format" : "ระบุค่าในรูปแบบที่อนุญาต : ${0}.",
+ "pattern" : "กรุณาตรงกับรูปแบบที่ร้องขอ.",
+ "minItems" : "ระบุจำนวนรายการเท่ากับหรือมากกว่า ${0}.",
+ "maxItems" : "ระบุจำนวนรายการเท่ากับหรือน้อยกว่า ${0}",
+ "uniqueItems" : "รายการทั้งหมดจะต้องไม่ซ้ำกัน",
+ "validationExpression" : "กรุณาใส่ค่าที่ถูกต้อง.",
+ "maxFileSize" : "ไฟล์มีขนาดใหญ่เกินไป ลดขนาดแล้วลองอีกครั้ง.",
+ "accept" : "ไม่รองรับประเภทไฟล์ที่ระบุ.",
+ "defaultError" : "มีข้อผิดพลาดในสนาม",
+ "clearText" : "ลอสเชน",
+ "0" : "๐",
+ "calendarSymbols" : {
+ "monthNames" : [
+ "มกราคม",
+ "กุมภาพันธ์",
+ "มีนาคม",
+ "เมษายน",
+ "พฤษภาคม",
+ "มิถุนายน",
+ "กรกฎาคม",
+ "สิงหาคม",
+ "กันยายน",
+ "ตุลาคม",
+ "พฤศจิกายน",
+ "ธันวาคม"
+ ],
+ "abbrmonthNames" : [
+ "ม.ค.",
+ "ก.พ.",
+ "มี.ค.",
+ "เม.ย.",
+ "พ.ค.",
+ "มิ.ย.",
+ "ก.ค.",
+ "ส.ค.",
+ "ก.ย.",
+ "ต.ค.",
+ "พ.ย.",
+ "ธ.ค."
+ ],
+ "dayNames" : [
+ "วันอาทิตย์",
+ "วันจันทร์",
+ "วันอังคาร",
+ "วันพุธ",
+ "วันพฤหัสบดี",
+ "วันศุกร์",
+ "วันเสาร์"
+ ],
+ "abbrdayNames" : [
+ "อา.",
+ "จ.",
+ "อ.",
+ "พ.",
+ "พฤ.",
+ "ศ.",
+ "ส."
+ ],
+ "meridiemNames" : [
+ "vorm.",
+ "nachm."
+ ],
+ "eraNames" : [
+ "v. Chr.",
+ "n. Chr."
+ ],
+ "day": "วัน",
+ "days": "วัน",
+ "month": "เดือน",
+ "months": "เดือน",
+ "year": "ปี",
+ "years": "ปี",
+ "more": "มากกว่า",
+ "less": "น้อย"
+ }
+}
\ No newline at end of file
diff --git a/it/apps/src/main/content/jcr_root/apps/forms-core-components-it/clientlibs/clientlib-it-custom-locale/resources/i18n/th.json b/it/apps/src/main/content/jcr_root/apps/forms-core-components-it/clientlibs/clientlib-it-custom-locale/resources/i18n/th.json
new file mode 100644
index 0000000000..4d392e2f7a
--- /dev/null
+++ b/it/apps/src/main/content/jcr_root/apps/forms-core-components-it/clientlibs/clientlib-it-custom-locale/resources/i18n/th.json
@@ -0,0 +1,3 @@
+{
+ "Zero" : "๐"
+}
\ No newline at end of file
diff --git a/it/config/src/main/content/jcr_root/apps/system/config/Guide Localization Service.cfg.json b/it/config/src/main/content/jcr_root/apps/system/config/Guide Localization Service.cfg.json
index 242858438c..ca89a79cd3 100644
--- a/it/config/src/main/content/jcr_root/apps/system/config/Guide Localization Service.cfg.json
+++ b/it/config/src/main/content/jcr_root/apps/system/config/Guide Localization Service.cfg.json
@@ -11,6 +11,7 @@
"it",
"es",
"ru-ru",
- "hi"
+ "hi",
+ "th"
]
}
\ No newline at end of file
diff --git a/it/content/src/main/content/jcr_root/content/dam/formsanddocuments/core-components-it/samples/af2-form-translation/.content.xml b/it/content/src/main/content/jcr_root/content/dam/formsanddocuments/core-components-it/samples/af2-form-translation/.content.xml
index 93af3b7302..aaa074ddd9 100755
--- a/it/content/src/main/content/jcr_root/content/dam/formsanddocuments/core-components-it/samples/af2-form-translation/.content.xml
+++ b/it/content/src/main/content/jcr_root/content/dam/formsanddocuments/core-components-it/samples/af2-form-translation/.content.xml
@@ -20,6 +20,7 @@
+ |
-
-
-
+jcr:primaryType="dam:Asset">
+
+
+
+
\ No newline at end of file
diff --git a/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/radiobutton/basic/.content.xml b/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/radiobutton/basic/.content.xml
index fa1227f723..153721d31b 100755
--- a/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/radiobutton/basic/.content.xml
+++ b/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/radiobutton/basic/.content.xml
@@ -171,6 +171,26 @@
textIsRich="[true,true]"
type="string"
visible="{Boolean}true"/>
+
\ No newline at end of file
diff --git a/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/setfocus/.content.xml b/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/setfocus/.content.xml
index 28a016478b..5353bccbb4 100644
--- a/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/setfocus/.content.xml
+++ b/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/setfocus/.content.xml
@@ -1,221 +1,326 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+jcr:primaryType="cq:Page">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$"/>
+
+
+
+
+
+
+
+
+()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$"/>
+
+
+
+
+
+sdfbgd</p>
"/>
+
+
+adsgsg</p>
"
+visible="{Boolean}true"/>
+
+
+
\ No newline at end of file
diff --git a/parent/pom.xml b/parent/pom.xml
index 385829f4b6..cb7e2cf716 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -808,7 +808,16 @@
net.revelc.code
impsort-maven-plugin
- 1.4.1
+ 1.6.2
+
+
+
+ org.codehaus.plexus
+ plexus-utils
+ 3.5.1
+
+
java, javax, org
*
diff --git a/ui.af.apps/pom.xml b/ui.af.apps/pom.xml
index cb5b34daec..c12b6f1b39 100644
--- a/ui.af.apps/pom.xml
+++ b/ui.af.apps/pom.xml
@@ -284,14 +284,15 @@
maven-antrun-plugin
+ 3.1.0
prepare-package
-
-
+
+
-
+
@@ -323,7 +324,7 @@
-
+
run
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/button/v1/button/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/button/v1/button/_cq_dialog/.content.xml
index 517ce55741..0d53a69346 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/button/v1/button/_cq_dialog/.content.xml
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/button/v1/button/_cq_dialog/.content.xml
@@ -70,6 +70,9 @@
sling:orderBefore ="bindref"
granite:hide="{Boolean}true"
name="./icon"/>
+
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkbox/v1/checkbox/README.md b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkbox/v1/checkbox/README.md
index a4a73e6a2b..c55e26e229 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkbox/v1/checkbox/README.md
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkbox/v1/checkbox/README.md
@@ -37,9 +37,8 @@ The following properties are written to JCR for this Form CheckBox component and
5. `./description` - defines a help message that can be rendered in the field as a hint for the user
6. `./required` - if set to `true`, this field will be marked as required, not allowing the form to be submitted until the field has a value
7. `./requiredMessage` - defines the message displayed as tooltip when submitting the form if the value is left empty
-8. `./readOnly` - if set to `true`, the filed will be read only
-9. `./type` - defines the data type of the value
-10. `./enum` - defines the two set of possible values for this field. (On or Off)
+8. `./type` - defines the data type of the value
+9. `./enum` - defines the two set of possible values for this field. (On or Off)
## Enum
Checkbox component can have only one of two state i.e. ON and OFF. Since the enums are stored as array, the enum at index '0' is assumed to be ON(i.e. checkbox is 'checked''), and enum at index '1' is OFF
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkbox/v1/checkbox/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkbox/v1/checkbox/_cq_dialog/.content.xml
index d3fc371401..c2c65748b0 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkbox/v1/checkbox/_cq_dialog/.content.xml
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkbox/v1/checkbox/_cq_dialog/.content.xml
@@ -105,6 +105,9 @@
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldLabel="Default value"
name="./default"/>
+
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkbox/v1/checkbox/checkbox.html b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkbox/v1/checkbox/checkbox.html
index 9ff57dad69..97e2c2f912 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkbox/v1/checkbox/checkbox.html
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkbox/v1/checkbox/checkbox.html
@@ -29,7 +29,6 @@
data-cmp-visible="${checkbox.visible ? 'true' : 'false'}"
data-cmp-enabled="${checkbox.enabled ? 'true' : 'false'}"
data-cmp-required="${checkbox.required ? 'true': 'false'}"
- data-cmp-readonly="${checkbox.readOnly ? 'true' : 'false'}"
data-cmp-data-layer="${checkbox.data.json}"
data-sly-test.widgetId="${'{0}-{1}' @ format=[component.id, '_widget']}"
data-cmp-adaptiveformcontainer-path="${formstructparser.formContainerPath}">
@@ -42,9 +41,8 @@
id="${checkbox.id}_widget"
title="${checkbox.tooltipVisible ? '' : checkbox.tooltipText}"
name="${checkbox.name}"
- aria-readonly="${checkbox.readOnly ? 'true' : 'false'}"
value="${checkbox.default[0]}"
- disabled="${!checkbox.enabled || checkbox.readOnly}" />
+ disabled="${!checkbox.enabled}" />
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/container/v2/container/clientlibs/editorhook/css/replacehook.css b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/container/v2/container/clientlibs/editorhook/css/replacehook.css
index 9ef46e48ca..f6238e0e2b 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/container/v2/container/clientlibs/editorhook/css/replacehook.css
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/container/v2/container/clientlibs/editorhook/css/replacehook.css
@@ -13,3 +13,6 @@
.cmp-replace-dialog-search-components {
padding: 0;
}
+.cmp-replace-dialog-search > input {
+ width: 100%;
+}
\ No newline at end of file
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/datepicker/v1/datepicker/clientlibs/site/js/datepickerwidget.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/datepicker/v1/datepicker/clientlibs/site/js/datepickerwidget.js
index 35443399d2..3ad0c18297 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/datepicker/v1/datepicker/clientlibs/site/js/datepickerwidget.js
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/datepicker/v1/datepicker/clientlibs/site/js/datepickerwidget.js
@@ -629,11 +629,12 @@ if (typeof window.DatePickerWidget === 'undefined') {
day1 = new Date(this.currentYear, this.currentMonth, 1).getDay(),
rowsReq = Math.ceil((day1 + maxDay) / 7) + 1,
data, display;
+ var localizedYear = this.#getLocalizedYear(curDate);
this.#tabulateView(
{
caption: this.#options.locale.months[this.currentMonth] + ", "
- + this.#convertNumberToLocale(this.currentYear),
+ + this.#convertNumberToLocale(localizedYear),
header: this.#options.locale.days,
numRows: rowsReq,
numColumns: 7,
@@ -699,9 +700,10 @@ if (typeof window.DatePickerWidget === 'undefined') {
curDate = new Date(this.currentYear, 0), //can't omit month, if only one param present it is treated as millisecond
data,
month;
+ var localizedYear = this.#getLocalizedYear(curDate);
this.#tabulateView(
{
- caption: this.#convertNumberToLocale(this.currentYear),
+ caption: this.#convertNumberToLocale(localizedYear),
numRows: 4,
numColumns: 3,
elementAt: function (row, col) {
@@ -723,6 +725,16 @@ if (typeof window.DatePickerWidget === 'undefined') {
});
}
+ #getLocalizedYear(date) {
+ const dateFormat = new Intl.DateTimeFormat(this.#lang, {
+ year: 'numeric'
+ });
+ const dateParts = dateFormat.formatToParts(date);
+ const yearObject = dateParts.find(yearObject => yearObject.type === "year");
+ const localizedYear = yearObject.value;
+ return Number(localizedYear);
+ }
+
/*
* show the year set view
*/
@@ -735,17 +747,20 @@ if (typeof window.DatePickerWidget === 'undefined') {
curDate = new Date(),
data,
self = this;
+ var localizedYear = this.#getLocalizedYear(new Date(this.currentYear, 0)),
+ localizedYearSet = this.#getLocalizedYear(new Date(self.currentYear, 0));
+
this.#tabulateView(
{
caption: this.#convertNumberToLocale(
- this.currentYear - this.#options.yearsPerView / 2) + "-"
+ localizedYear - this.#options.yearsPerView / 2) + "-"
+ this.#convertNumberToLocale(
- this.currentYear - this.#options.yearsPerView / 2
+ localizedYear - this.#options.yearsPerView / 2
+ this.#options.yearsPerView - 1),
numRows: 4,
numColumns: 4,
elementAt: function (row, col) {
- data = year = self.currentYear - 8 + (row * 4 + col);
+ data = year = localizedYearSet - 8 + (row * 4 + col);
let gridId = "year-" + data;
curDate.setFullYear(year);
if ((minDate && curDate < minDate) || (maxDate && curDate
@@ -1085,6 +1100,10 @@ if (typeof window.DatePickerWidget === 'undefined') {
if (clearText) {
defaultOptions.locale.clearText = clearText;
}
+ var zero = FormView.LanguageUtils.getTranslatedString(locale, "0");
+ if (zero) {
+ defaultOptions.locale.zero = zero;
+ }
}
#isEditValueOrDisplayValue(value) {
@@ -1127,7 +1146,8 @@ if (typeof window.DatePickerWidget === 'undefined') {
*/
setValue(value) {
- let currDate = new Date(value);
+ let currDate = new Date(value);
+
if (!isNaN(currDate) && value != null) {
//in case the value is directly updated from the field without using calendar widget
this.selectedMonth = currDate.getMonth();
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/image/v1/image/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/image/v1/image/_cq_dialog/.content.xml
index bddc2ac056..fbd9b14375 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/image/v1/image/_cq_dialog/.content.xml
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/image/v1/image/_cq_dialog/.content.xml
@@ -68,6 +68,9 @@
+
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/radiobutton/v1/radiobutton/clientlibs/site/js/radiobuttonview.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/radiobutton/v1/radiobutton/clientlibs/site/js/radiobuttonview.js
index 7182ee95dc..642c593360 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/radiobutton/v1/radiobutton/clientlibs/site/js/radiobuttonview.js
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/radiobutton/v1/radiobutton/clientlibs/site/js/radiobuttonview.js
@@ -114,7 +114,7 @@
updateValue(modelValue) {
this.widget.forEach(widget => {
- if (modelValue && widget.value != null && modelValue.toString() == widget.value.toString()) {
+ if (modelValue != null && widget.value != null && (modelValue.toString() == widget.value.toString())) {
widget.checked = true;
widget.setAttribute(FormView.Constants.HTML_ATTRS.CHECKED, FormView.Constants.HTML_ATTRS.CHECKED);
widget.setAttribute(FormView.Constants.ARIA_CHECKED, true);
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/termsandconditions/v1/termsandconditions/_cq_design_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/termsandconditions/v1/termsandconditions/_cq_design_dialog/.content.xml
new file mode 100644
index 0000000000..1aad816bf6
--- /dev/null
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/termsandconditions/v1/termsandconditions/_cq_design_dialog/.content.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/termsandconditions/v1/termsandconditions/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/termsandconditions/v1/termsandconditions/_cq_dialog/.content.xml
index 109a9c1d7f..a47003a1ce 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/termsandconditions/v1/termsandconditions/_cq_dialog/.content.xml
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/termsandconditions/v1/termsandconditions/_cq_dialog/.content.xml
@@ -159,6 +159,10 @@
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/include"
path="core/fd/components/form/base/v1/base/cq:dialog/content/items/tabs/items/dor"/>
+
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/text/v1/text/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/text/v1/text/_cq_dialog/.content.xml
index 3ee71eb18c..7214fdb65b 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/text/v1/text/_cq_dialog/.content.xml
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/text/v1/text/_cq_dialog/.content.xml
@@ -62,6 +62,9 @@
+
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/text/v1/text/clientlibs/site/js/textview.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/text/v1/text/clientlibs/site/js/textview.js
index bf4762f1ec..6f0591c7a6 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/text/v1/text/clientlibs/site/js/textview.js
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/text/v1/text/clientlibs/site/js/textview.js
@@ -60,6 +60,7 @@
setFocus() {
this.setActive();
+ this.element.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
updateValue(value) {
diff --git a/ui.apps/pom.xml b/ui.apps/pom.xml
index a81bdd3636..44451753cc 100644
--- a/ui.apps/pom.xml
+++ b/ui.apps/pom.xml
@@ -264,11 +264,12 @@
maven-antrun-plugin
+ 3.1.0
prepare-package
-
+
@@ -277,7 +278,7 @@
-
+
run
diff --git a/ui.tests/test-module/specs/button/button.authoring.spec.js b/ui.tests/test-module/specs/button/button.authoring.spec.js
index 4f296c882d..c0da98e3df 100644
--- a/ui.tests/test-module/specs/button/button.authoring.spec.js
+++ b/ui.tests/test-module/specs/button/button.authoring.spec.js
@@ -64,8 +64,8 @@ describe('Button - Authoring', function () {
.should("exist");
cy.get("coral-checkbox[name='./enabled']")
.should("exist");
- // cy.get("[name='./icon']")
- // .should("exist");
+ cy.get("[name='./readOnly']")
+ .should("not.exist");
// Checking some dynamic behaviours
diff --git a/ui.tests/test-module/specs/checkbox/checkbox.authoring.spec.js b/ui.tests/test-module/specs/checkbox/checkbox.authoring.spec.js
index c564a76218..ae6724e72a 100644
--- a/ui.tests/test-module/specs/checkbox/checkbox.authoring.spec.js
+++ b/ui.tests/test-module/specs/checkbox/checkbox.authoring.spec.js
@@ -49,7 +49,9 @@ describe('Page - Authoring', function () {
cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + checkboxEditPathSelector);
cy.invokeEditableAction("[data-action='CONFIGURE']"); // this line is causing frame busting which is causing cypress to fail
cy.get("[name='./name']")
- .should("exist");
+ .should("exist");
+ cy.get("[name='./readOnly']")
+ .should("not.exist");
cy.get('.cq-dialog-cancel').click();
diff --git a/ui.tests/test-module/specs/datepicker/datepicker.runtime.thai.locale.spec.js b/ui.tests/test-module/specs/datepicker/datepicker.runtime.thai.locale.spec.js
new file mode 100644
index 0000000000..e570e892a0
--- /dev/null
+++ b/ui.tests/test-module/specs/datepicker/datepicker.runtime.thai.locale.spec.js
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright 2023 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.
+ ******************************************************************************/
+describe("Form Runtime with Date Picker", () => {
+
+ const pagePath = "content/forms/af/core-components-it/samples/datepicker/basic.html"
+ const bemBlock = 'cmp-adaptiveform-datepicker'
+
+ let formContainer = null
+
+ beforeEach(() => {
+ cy.previewForm(pagePath, {"params" : ["afAcceptLang=th"]}).then(p => {
+ formContainer = p;
+ })
+ });
+
+ // Year should be in Buddhist calendar year for Thai language
+ it("Test localisation for date picker for thai", () => {
+ const [datePicker7, datePicker7FieldView] = Object.entries(formContainer._fields)[6];
+ cy.get(`#${datePicker7}`).find(".cmp-adaptiveform-datepicker__calendar-icon").should("be.visible").click().then(() => {
+ let todayDate = new Date();
+
+ const dateFormat = new Intl.DateTimeFormat('th', {
+ year: 'numeric',
+ month : 'long'
+ });
+
+ const dateParts = dateFormat.formatToParts(todayDate);
+ const yearObject = dateParts.find(yearObject => yearObject.type === "year");
+ const monthObject = dateParts.find(monthObject => monthObject.type === "month");
+ const localizedYear = convertNumberToLocale(Number(yearObject.value));
+ const localizedMonth = monthObject.value;
+ cy.get(".dp-caption").invoke("text").should("eq", localizedMonth + ', ' + localizedYear);
+ cy.get(".dp-caption").click();
+ cy.get(".dp-caption").invoke("text").should("eq", localizedYear);
+ cy.get(".dp-rightnav").click();
+ });
+ });
+
+ const convertNumberToLocale = function (number) {
+ const zeroCode = 3664;
+ number += "";
+ let newNumber = [];
+ for (let i = 0; i < number.length; i++) {
+ newNumber.push(
+ String.fromCharCode(zeroCode + parseInt(number.charAt(i))));
+ }
+ return newNumber.join("");
+ }
+
+
+
+})
\ No newline at end of file
diff --git a/ui.tests/test-module/specs/image/image.authoring.spec.js b/ui.tests/test-module/specs/image/image.authoring.spec.js
index 47ec438a7b..c848330507 100644
--- a/ui.tests/test-module/specs/image/image.authoring.spec.js
+++ b/ui.tests/test-module/specs/image/image.authoring.spec.js
@@ -55,6 +55,10 @@ describe('Page - Authoring', function () {
.should("exist");
cy.get("[name='./altText']")
.should("exist");
+ cy.get("[name='./name']")
+ .should("exist");
+ cy.get("[name='./readOnly']")
+ .should("not.exist");
cy.get("[name='./visible'][type=\"checkbox\"]").should("exist").check();
cy.get('.cq-dialog-cancel').click();
cy.deleteComponentByPath(imageDrop);
diff --git a/ui.tests/test-module/specs/radiobutton/radiobutton.runtime.spec.js b/ui.tests/test-module/specs/radiobutton/radiobutton.runtime.spec.js
index 692dc58cb0..42c8c6268c 100644
--- a/ui.tests/test-module/specs/radiobutton/radiobutton.runtime.spec.js
+++ b/ui.tests/test-module/specs/radiobutton/radiobutton.runtime.spec.js
@@ -189,6 +189,17 @@ describe("Form with Radio Button Input", () => {
cy.get(`#${radioButton1}`).should('have.class', 'cmp-adaptiveform-radiobutton--filled');
})
})
+
+ it("radiobutton with boolean type selection should happen in first click", () => {
+ const [radioButton8, radioButton1FieldView] = Object.entries(formContainer._fields)[7];
+ cy.get(`#${radioButton8}`).find("input").check("true").then(() => {
+ cy.get(`#${radioButton8}`).find('input[value="true"]').should("be.checked");
+ })
+
+ cy.get(`#${radioButton8}`).find("input").check("false").then(() => {
+ cy.get(`#${radioButton8}`).find('input[value="false"]').should("be.checked");
+ })
+ })
})
describe("setFocus on radiobutton via rules", () => {
diff --git a/ui.tests/test-module/specs/setFocusTests.runtime.spec.js b/ui.tests/test-module/specs/setFocusTests.runtime.spec.js
index d96a8ae034..f1a8948044 100644
--- a/ui.tests/test-module/specs/setFocusTests.runtime.spec.js
+++ b/ui.tests/test-module/specs/setFocusTests.runtime.spec.js
@@ -25,26 +25,8 @@ describe("Form with multipe components", () => {
})
});
- const checkHTML = (id, state, view, count) => {
- const visible = state.visible;
- const passVisibleCheck = `${visible === true ? "" : "not."}be.visible`;
- cy.get(`#${id}`)
- .should(passVisibleCheck)
- .invoke('attr', 'data-cmp-visible')
- .should('eq', visible.toString());
- cy.get(`#${id}`)
- .invoke('attr', 'data-cmp-enabled')
- .should('eq', state.enabled.toString());
- expect(state.items.length, "model has children equal to count").to.equal(count);
- if (count == 0) {
- return cy.get(`.${childBemBlock}`).should('not.exist');
- } else {
- return cy.get(`.${childBemBlock}`).should('have.length', count);
- }
- };
-
it("check if first tab activated if focus call from other tab", () => {
- const firstChildComponentId = formContainer._model.items[7].items[1].items[0].id;
+ const firstChildComponentId = formContainer._model.items[8].items[2].items[0].id;
const firstChildComponentButtonId = formContainer._model.items[0].id ;
cy.get(`#${firstChildComponentButtonId}`).click();
cy.get(`#${firstChildComponentId}`).isElementInViewport().should("eq", true);
diff --git a/ui.tests/test-module/specs/text/text.authoring.spec.js b/ui.tests/test-module/specs/text/text.authoring.spec.js
index 53ff4ce142..476a647921 100644
--- a/ui.tests/test-module/specs/text/text.authoring.spec.js
+++ b/ui.tests/test-module/specs/text/text.authoring.spec.js
@@ -53,6 +53,10 @@ describe('Page - Authoring', function () {
.should("exist");
cy.get("[name='./dataRef']")
.should("exist");
+ cy.get("[name='./name']")
+ .should("exist");
+ cy.get("[name='./readOnly']")
+ .should("not.exist");
cy.get("[name='./visible'][type=\"checkbox\"]").should("exist").check();
cy.get('.cq-dialog-cancel').click();