@aemforms/af-core 0.22.73 → 0.22.75
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-events.js +6 -1
- package/esm/afb-runtime.js +1745 -1666
- package/esm/types/src/BaseNode.d.ts +4 -2
- package/esm/types/src/Checkbox.d.ts +72 -0
- package/esm/types/src/Container.d.ts +4 -2
- package/esm/types/src/Field.d.ts +3 -2
- package/esm/types/src/Form.d.ts +4 -2
- package/esm/types/src/FormInstance.d.ts +1 -1
- package/esm/types/src/controller/Events.d.ts +3 -0
- package/esm/types/src/types/Json.d.ts +1 -0
- package/esm/types/src/utils/ValidationUtils.d.ts +2 -1
- package/lib/BaseNode.d.ts +4 -2
- package/lib/BaseNode.js +11 -2
- package/lib/Checkbox.d.ts +72 -0
- package/lib/Checkbox.js +55 -0
- package/lib/Container.d.ts +4 -2
- package/lib/Field.d.ts +3 -2
- package/lib/Field.js +0 -1
- package/lib/Form.d.ts +4 -2
- package/lib/Form.js +1 -1
- package/lib/FormInstance.d.ts +1 -1
- package/lib/FormInstance.js +6 -1
- package/lib/controller/Events.d.ts +3 -0
- package/lib/controller/Events.js +7 -1
- package/lib/rules/FunctionRuntime.js +25 -6
- package/lib/types/Json.d.ts +1 -0
- package/lib/utils/ValidationUtils.d.ts +2 -1
- package/lib/utils/ValidationUtils.js +3 -1
- package/package.json +2 -2
|
@@ -12,7 +12,8 @@ declare type ValidConstraintsType = {
|
|
|
12
12
|
email: ValidationConstraints[];
|
|
13
13
|
};
|
|
14
14
|
export declare const ValidConstraints: ValidConstraintsType;
|
|
15
|
-
export declare
|
|
15
|
+
export declare const validationConstraintsList: readonly ["type", "format", "minimum", "maximum", "exclusiveMinimum", "exclusiveMaximum", "minItems", "maxItems", "uniqueItems", "minLength", "maxLength", "pattern", "required", "enum", "accept", "maxFileSize"];
|
|
16
|
+
export declare type ValidationConstraints = typeof validationConstraintsList[number];
|
|
16
17
|
declare type ConstraintsObject = {
|
|
17
18
|
[key in ValidationConstraints]: (constraint: any, inputVal: any) => ValidationResult;
|
|
18
19
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Constraints = exports.ValidConstraints = exports.coerceType = void 0;
|
|
3
|
+
exports.Constraints = exports.validationConstraintsList = exports.ValidConstraints = exports.coerceType = void 0;
|
|
4
4
|
const FormUtils_1 = require("./FormUtils");
|
|
5
5
|
const FileObject_1 = require("../FileObject");
|
|
6
6
|
const dateRegex = /^(\d{4})-(\d{1,2})-(\d{1,2})$/;
|
|
@@ -118,6 +118,8 @@ exports.ValidConstraints = {
|
|
|
118
118
|
file: ['accept', 'maxFileSize'],
|
|
119
119
|
email: ['minLength', 'maxLength', 'format', 'pattern']
|
|
120
120
|
};
|
|
121
|
+
exports.validationConstraintsList = ['type', 'format', 'minimum', 'maximum', 'exclusiveMinimum', 'exclusiveMaximum', 'minItems',
|
|
122
|
+
'maxItems', 'uniqueItems', 'minLength', 'maxLength', 'pattern', 'required', 'enum', 'accept', 'maxFileSize'];
|
|
121
123
|
exports.Constraints = {
|
|
122
124
|
type: (constraint, inputVal) => {
|
|
123
125
|
let value = inputVal;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aemforms/af-core",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.75",
|
|
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.75"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@babel/preset-env": "^7.20.2",
|