@aemforms/af-core 0.22.54 → 0.22.55
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/lib/BaseNode.js +2 -1
- package/lib/Field.d.ts +2 -0
- package/lib/Field.js +14 -0
- package/package.json +2 -2
package/lib/BaseNode.js
CHANGED
|
@@ -19,6 +19,8 @@ exports.editableProperties = [
|
|
|
19
19
|
'description',
|
|
20
20
|
'visible',
|
|
21
21
|
'enabled',
|
|
22
|
+
'valid',
|
|
23
|
+
'errorMessage',
|
|
22
24
|
'readOnly',
|
|
23
25
|
'enum',
|
|
24
26
|
'enumNames',
|
|
@@ -33,7 +35,6 @@ exports.editableProperties = [
|
|
|
33
35
|
];
|
|
34
36
|
exports.dynamicProps = [
|
|
35
37
|
...exports.editableProperties,
|
|
36
|
-
'valid',
|
|
37
38
|
'index',
|
|
38
39
|
'activeChild'
|
|
39
40
|
];
|
package/lib/Field.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ declare class Field extends Scriptable<FieldJson> implements FieldModel {
|
|
|
33
33
|
get enabled(): boolean | undefined;
|
|
34
34
|
set enabled(e: boolean | undefined);
|
|
35
35
|
get valid(): any;
|
|
36
|
+
set valid(e: any);
|
|
36
37
|
get validity(): any;
|
|
37
38
|
get emptyValue(): "" | null | undefined;
|
|
38
39
|
get enum(): any[] | undefined;
|
|
@@ -59,6 +60,7 @@ declare class Field extends Scriptable<FieldJson> implements FieldModel {
|
|
|
59
60
|
toString(): any;
|
|
60
61
|
getErrorMessage(constraint: keyof (ConstraintsMessages)): string;
|
|
61
62
|
get errorMessage(): string | undefined;
|
|
63
|
+
set errorMessage(e: string | undefined);
|
|
62
64
|
get screenReaderText(): string | undefined;
|
|
63
65
|
_getConstraintObject(): {
|
|
64
66
|
enum: (constraint: any, inputVal: any) => {
|
package/lib/Field.js
CHANGED
|
@@ -204,6 +204,13 @@ class Field extends Scriptable_1.default {
|
|
|
204
204
|
var _a, _b;
|
|
205
205
|
return (_b = (_a = this._jsonModel) === null || _a === void 0 ? void 0 : _a.validity) === null || _b === void 0 ? void 0 : _b.valid;
|
|
206
206
|
}
|
|
207
|
+
set valid(e) {
|
|
208
|
+
const validity = {
|
|
209
|
+
valid: e
|
|
210
|
+
};
|
|
211
|
+
this._setProperty('valid', e);
|
|
212
|
+
this._setProperty('validity', validity);
|
|
213
|
+
}
|
|
207
214
|
get validity() {
|
|
208
215
|
return this._jsonModel.validity;
|
|
209
216
|
}
|
|
@@ -416,6 +423,10 @@ class Field extends Scriptable_1.default {
|
|
|
416
423
|
get errorMessage() {
|
|
417
424
|
return this._jsonModel.errorMessage;
|
|
418
425
|
}
|
|
426
|
+
set errorMessage(e) {
|
|
427
|
+
this._setProperty('errorMessage', e);
|
|
428
|
+
this._setProperty('validationMessage', e);
|
|
429
|
+
}
|
|
419
430
|
get screenReaderText() {
|
|
420
431
|
return this._jsonModel.screenReaderText;
|
|
421
432
|
}
|
|
@@ -699,6 +710,9 @@ __decorate([
|
|
|
699
710
|
__decorate([
|
|
700
711
|
(0, BaseNode_1.dependencyTracked)()
|
|
701
712
|
], Field.prototype, "value", null);
|
|
713
|
+
__decorate([
|
|
714
|
+
(0, BaseNode_1.dependencyTracked)()
|
|
715
|
+
], Field.prototype, "errorMessage", null);
|
|
702
716
|
__decorate([
|
|
703
717
|
(0, BaseNode_1.include)('text-input', 'date-input', 'file-input', 'email')
|
|
704
718
|
], Field.prototype, "format", null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aemforms/af-core",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.55",
|
|
4
4
|
"description": "Core Module for Forms Runtime",
|
|
5
5
|
"author": "Adobe Systems",
|
|
6
6
|
"license": "Adobe Proprietary",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@adobe/json-formula": "0.1.50",
|
|
38
|
-
"@aemforms/af-formatters": "^0.22.
|
|
38
|
+
"@aemforms/af-formatters": "^0.22.55"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@babel/preset-env": "^7.20.2",
|