@aemforms/af-core 0.22.123 → 0.22.124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/afb-runtime.js +3 -1
- package/lib/Field.js +4 -2
- package/package.json +2 -2
package/esm/afb-runtime.js
CHANGED
|
@@ -4177,7 +4177,9 @@ class Field extends Scriptable {
|
|
|
4177
4177
|
return this.executeExpression(this.displayValueExpression);
|
|
4178
4178
|
}
|
|
4179
4179
|
const df = this.displayFormat;
|
|
4180
|
-
if (df && this.isNotEmpty(this.value) &&
|
|
4180
|
+
if (df && this.isNotEmpty(this.value) &&
|
|
4181
|
+
this?.validity?.typeMismatch !== true &&
|
|
4182
|
+
((this.format === 'date' || this.format === 'date-time') ? this?.validity?.formatMismatch !== true : true)) {
|
|
4181
4183
|
try {
|
|
4182
4184
|
return format(this.value, this.lang, df);
|
|
4183
4185
|
}
|
package/lib/Field.js
CHANGED
|
@@ -316,12 +316,14 @@ class Field extends Scriptable_1.default {
|
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
get displayValue() {
|
|
319
|
-
var _a;
|
|
319
|
+
var _a, _b;
|
|
320
320
|
if (this.displayValueExpression && typeof this.displayValueExpression === 'string' && this.displayValueExpression.length !== 0) {
|
|
321
321
|
return this.executeExpression(this.displayValueExpression);
|
|
322
322
|
}
|
|
323
323
|
const df = this.displayFormat;
|
|
324
|
-
if (df && this.isNotEmpty(this.value) &&
|
|
324
|
+
if (df && this.isNotEmpty(this.value) &&
|
|
325
|
+
((_a = this === null || this === void 0 ? void 0 : this.validity) === null || _a === void 0 ? void 0 : _a.typeMismatch) !== true &&
|
|
326
|
+
((this.format === 'date' || this.format === 'date-time') ? ((_b = this === null || this === void 0 ? void 0 : this.validity) === null || _b === void 0 ? void 0 : _b.formatMismatch) !== true : true)) {
|
|
325
327
|
try {
|
|
326
328
|
return (0, af_formatters_1.format)(this.value, this.lang, df);
|
|
327
329
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aemforms/af-core",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.124",
|
|
4
4
|
"description": "Core Module for Forms Runtime",
|
|
5
5
|
"author": "Adobe Systems",
|
|
6
6
|
"license": "Adobe Proprietary",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@adobe/json-formula": "0.1.50",
|
|
40
|
-
"@aemforms/af-formatters": "^0.22.
|
|
40
|
+
"@aemforms/af-formatters": "^0.22.124"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@babel/preset-env": "^7.20.2",
|