@aemforms/af-core 0.22.62 → 0.22.63
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/Field.js +3 -2
- package/lib/Form.d.ts +1 -0
- package/lib/Form.js +9 -0
- package/lib/types/Model.d.ts +1 -0
- package/package.json +2 -2
package/lib/Field.js
CHANGED
|
@@ -477,8 +477,9 @@ class Field extends Scriptable_1.default {
|
|
|
477
477
|
};
|
|
478
478
|
}
|
|
479
479
|
checkValidationExpression() {
|
|
480
|
-
|
|
481
|
-
|
|
480
|
+
const validationExp = this._jsonModel.validationExpression;
|
|
481
|
+
if (typeof validationExp === 'string' && validationExp.length !== 0) {
|
|
482
|
+
return this.executeExpression(validationExp);
|
|
482
483
|
}
|
|
483
484
|
return true;
|
|
484
485
|
}
|
package/lib/Form.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ declare class Form extends Container<FormJson> implements FormModel {
|
|
|
19
19
|
get action(): string | undefined;
|
|
20
20
|
importData(dataModel: any): void;
|
|
21
21
|
exportData(): any;
|
|
22
|
+
resolveQualifiedName(qualifiedName: string): FieldModel | FieldsetModel | null;
|
|
22
23
|
exportSubmitMetaData(): SubmitMetaData;
|
|
23
24
|
setFocus(field: BaseModel): void;
|
|
24
25
|
getState(): {
|
package/lib/Form.js
CHANGED
|
@@ -47,6 +47,15 @@ class Form extends Container_1.default {
|
|
|
47
47
|
var _a;
|
|
48
48
|
return (_a = this.getDataNode()) === null || _a === void 0 ? void 0 : _a.$value;
|
|
49
49
|
}
|
|
50
|
+
resolveQualifiedName(qualifiedName) {
|
|
51
|
+
let foundFormElement = null;
|
|
52
|
+
this.visit(formElement => {
|
|
53
|
+
if (formElement.qualifiedName === qualifiedName) {
|
|
54
|
+
foundFormElement = formElement;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
return foundFormElement;
|
|
58
|
+
}
|
|
50
59
|
exportSubmitMetaData() {
|
|
51
60
|
let submitMetaInstance = null;
|
|
52
61
|
const captchaInfoObj = {};
|
package/lib/types/Model.d.ts
CHANGED
|
@@ -109,6 +109,7 @@ export interface FormModel extends ContainerModel, WithState<FormJson> {
|
|
|
109
109
|
getUniqueId(): string;
|
|
110
110
|
getEventQueue(): EventQueue;
|
|
111
111
|
visit(callBack: (field: FieldModel | FieldsetModel) => void): void;
|
|
112
|
+
resolveQualifiedName(qualifiedName: string): FieldModel | FieldsetModel | null;
|
|
112
113
|
fieldAdded(field: FieldModel | FieldsetModel): void;
|
|
113
114
|
}
|
|
114
115
|
export interface IFormFieldFactory {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aemforms/af-core",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.63",
|
|
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.63"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@babel/preset-env": "^7.20.2",
|