@bpmn-io/form-js-viewer 1.8.4 → 1.8.5
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/dist/index.cjs +244 -136
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +243 -137
- package/dist/index.es.js.map +1 -1
- package/dist/types/Form.d.ts +2 -3
- package/dist/types/core/Validator.d.ts +16 -1
- package/dist/types/features/viewerCommands/ViewerCommands.d.ts +6 -0
- package/dist/types/features/viewerCommands/cmd/UpdateFieldInstanceValidationHandler.d.ts +10 -0
- package/dist/types/features/viewerCommands/cmd/UpdateFieldValidationHandler.d.ts +3 -0
- package/dist/types/util/expressions.d.ts +17 -0
- package/dist/types/util/index.d.ts +1 -0
- package/dist/types/util/simple.d.ts +1 -7
- package/package.json +2 -2
package/dist/types/Form.d.ts
CHANGED
|
@@ -103,11 +103,10 @@ export class Form {
|
|
|
103
103
|
/**
|
|
104
104
|
* @internal
|
|
105
105
|
*
|
|
106
|
-
* @param { {
|
|
106
|
+
* @param { { fieldInstance: any, value: any } } update
|
|
107
107
|
*/
|
|
108
108
|
_update(update: {
|
|
109
|
-
|
|
110
|
-
indexes: object;
|
|
109
|
+
fieldInstance: any;
|
|
111
110
|
value: any;
|
|
112
111
|
}): void;
|
|
113
112
|
/**
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
export class Validator {
|
|
2
|
-
constructor(expressionLanguage: any, conditionChecker: any, form: any);
|
|
2
|
+
constructor(expressionLanguage: any, conditionChecker: any, form: any, formFieldRegistry: any);
|
|
3
3
|
_expressionLanguage: any;
|
|
4
4
|
_conditionChecker: any;
|
|
5
5
|
_form: any;
|
|
6
|
+
_formFieldRegistry: any;
|
|
7
|
+
/**
|
|
8
|
+
* Validate against a field definition, does not support proper expression evaluation.
|
|
9
|
+
*
|
|
10
|
+
* @deprecated use validateFieldInstance instead
|
|
11
|
+
*/
|
|
6
12
|
validateField(field: any, value: any): any[];
|
|
13
|
+
/**
|
|
14
|
+
* Validate a field instance.
|
|
15
|
+
*
|
|
16
|
+
* @param {Object} fieldInstance
|
|
17
|
+
* @param {string} value
|
|
18
|
+
*
|
|
19
|
+
* @returns {Array<string>}
|
|
20
|
+
*/
|
|
21
|
+
validateFieldInstance(fieldInstance: any, value: string): Array<string>;
|
|
7
22
|
}
|
|
8
23
|
export namespace Validator {
|
|
9
24
|
let $inject: string[];
|
|
@@ -4,10 +4,16 @@ export class ViewerCommands {
|
|
|
4
4
|
registerHandlers(): void;
|
|
5
5
|
getHandlers(): {
|
|
6
6
|
'formField.validation.update': typeof UpdateFieldValidationHandler;
|
|
7
|
+
'formFieldInstance.validation.update': typeof UpdateFieldInstanceValidationHandler;
|
|
7
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated
|
|
11
|
+
*/
|
|
8
12
|
updateFieldValidation(field: any, value: any, indexes: any): void;
|
|
13
|
+
updateFieldInstanceValidation(fieldInstance: any, value: any): void;
|
|
9
14
|
}
|
|
10
15
|
export namespace ViewerCommands {
|
|
11
16
|
let $inject: string[];
|
|
12
17
|
}
|
|
13
18
|
import { UpdateFieldValidationHandler } from './cmd/UpdateFieldValidationHandler';
|
|
19
|
+
import { UpdateFieldInstanceValidationHandler } from './cmd/UpdateFieldInstanceValidationHandler';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export class UpdateFieldInstanceValidationHandler {
|
|
2
|
+
constructor(form: any, validator: any);
|
|
3
|
+
_form: any;
|
|
4
|
+
_validator: any;
|
|
5
|
+
execute(context: any): void;
|
|
6
|
+
revert(context: any): void;
|
|
7
|
+
}
|
|
8
|
+
export namespace UpdateFieldInstanceValidationHandler {
|
|
9
|
+
let $inject: string[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transform a LocalExpressionContext object into a usable FEEL context.
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} context - The LocalExpressionContext object.
|
|
5
|
+
* @returns {Object} The usable FEEL context.
|
|
6
|
+
*/
|
|
7
|
+
export function buildExpressionContext(context: any): any;
|
|
8
|
+
/**
|
|
9
|
+
* Evaluate a string based on the expressionLanguage and context information.
|
|
10
|
+
* If the string is not an expression, it is returned as is.
|
|
11
|
+
*
|
|
12
|
+
* @param {any} expressionLanguage - The expression language to use.
|
|
13
|
+
* @param {string} value - The string to evaluate.
|
|
14
|
+
* @param {Object} expressionContextInfo - The context information to use.
|
|
15
|
+
* @returns {any} - Evaluated value or the original value if not an expression.
|
|
16
|
+
*/
|
|
17
|
+
export function runExpressionEvaluation(expressionLanguage: any, value: string, expressionContextInfo: any): any;
|
|
@@ -10,11 +10,5 @@ export function generateIdForType(type: any): string;
|
|
|
10
10
|
* @return {T}
|
|
11
11
|
*/
|
|
12
12
|
export function clone<T>(data: T, replacer?: (this: any, key: string, value: any) => any): T;
|
|
13
|
-
/**
|
|
14
|
-
* Transform a LocalExpressionContext object into a usable FEEL context.
|
|
15
|
-
*
|
|
16
|
-
* @param {Object} context - The LocalExpressionContext object.
|
|
17
|
-
* @returns {Object} The usable FEEL context.
|
|
18
|
-
*/
|
|
19
|
-
export function buildExpressionContext(context: any): any;
|
|
20
13
|
export function runRecursively(formField: any, fn: any): void;
|
|
14
|
+
export function wrapObjectKeysWithUnderscores(obj: any): {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmn-io/form-js-viewer",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.5",
|
|
4
4
|
"description": "View forms - powered by bpmn.io",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"files": [
|
|
66
66
|
"dist"
|
|
67
67
|
],
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "cc2823143bb6974e9c1355e4af494164122fd829"
|
|
69
69
|
}
|