@bpmn-io/form-js-viewer 1.8.3 → 1.8.4
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/README.md +177 -189
- package/dist/assets/form-js-base.css +47 -39
- package/dist/assets/form-js.css +11 -26
- package/dist/index.cjs +222 -172
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +221 -173
- package/dist/index.es.js.map +1 -1
- package/dist/types/Form.d.ts +8 -11
- package/dist/types/core/FormFieldInstanceRegistry.d.ts +15 -0
- package/dist/types/core/index.d.ts +2 -0
- package/dist/types/features/expressionField/ExpressionLoopPreventer.d.ts +18 -0
- package/dist/types/features/expressionField/index.d.ts +6 -0
- package/dist/types/features/expressionLanguage/FeelersTemplating.d.ts +4 -4
- package/dist/types/features/index.d.ts +2 -0
- package/dist/types/types.d.ts +34 -36
- package/package.json +2 -2
package/dist/types/Form.d.ts
CHANGED
|
@@ -103,14 +103,12 @@ export class Form {
|
|
|
103
103
|
/**
|
|
104
104
|
* @internal
|
|
105
105
|
*
|
|
106
|
-
* @param { {
|
|
106
|
+
* @param { { field: any, indexes: object, value: any } } update
|
|
107
107
|
*/
|
|
108
108
|
_update(update: {
|
|
109
|
-
add?: boolean;
|
|
110
109
|
field: any;
|
|
111
110
|
indexes: object;
|
|
112
|
-
|
|
113
|
-
value?: any;
|
|
111
|
+
value: any;
|
|
114
112
|
}): void;
|
|
115
113
|
/**
|
|
116
114
|
* @internal
|
|
@@ -121,13 +119,16 @@ export class Form {
|
|
|
121
119
|
*/
|
|
122
120
|
_setState(state: any): void;
|
|
123
121
|
/**
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
* @internal
|
|
123
|
+
*/
|
|
126
124
|
_getModules(): ({
|
|
127
125
|
__init__: string[];
|
|
128
126
|
expressionLanguage: (string | typeof import("./features").FeelExpressionLanguage)[];
|
|
129
127
|
templating: (string | typeof import("./features").FeelersTemplating)[];
|
|
130
128
|
conditionChecker: (string | typeof import("./features").ConditionChecker)[];
|
|
129
|
+
} | {
|
|
130
|
+
__init__: string[];
|
|
131
|
+
expressionLoopPreventer: (string | typeof import("./features").ExpressionLoopPreventer)[];
|
|
131
132
|
} | {
|
|
132
133
|
__init__: string[];
|
|
133
134
|
markdownRenderer: (string | typeof import("./features").MarkdownRenderer)[];
|
|
@@ -146,11 +147,7 @@ export class Form {
|
|
|
146
147
|
/**
|
|
147
148
|
* @internal
|
|
148
149
|
*/
|
|
149
|
-
_getSubmitData():
|
|
150
|
-
/**
|
|
151
|
-
* @internal
|
|
152
|
-
*/
|
|
153
|
-
_applyConditions(toFilter: any, data: any, options?: {}): any;
|
|
150
|
+
_getSubmitData(): {};
|
|
154
151
|
/**
|
|
155
152
|
* @internal
|
|
156
153
|
*/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class FormFieldInstanceRegistry {
|
|
2
|
+
constructor(eventBus: any, formFieldRegistry: any, formFields: any);
|
|
3
|
+
_eventBus: any;
|
|
4
|
+
_formFieldRegistry: any;
|
|
5
|
+
_formFields: any;
|
|
6
|
+
_formFieldInstances: {};
|
|
7
|
+
add(instance: any): string;
|
|
8
|
+
remove(instanceId: any): void;
|
|
9
|
+
getAll(): any[];
|
|
10
|
+
getAllKeyed(): any[];
|
|
11
|
+
clear(): void;
|
|
12
|
+
}
|
|
13
|
+
export namespace FormFieldInstanceRegistry {
|
|
14
|
+
let $inject: string[];
|
|
15
|
+
}
|
|
@@ -8,6 +8,7 @@ export namespace CoreModule {
|
|
|
8
8
|
let importer: (string | typeof Importer)[];
|
|
9
9
|
let fieldFactory: (string | typeof FieldFactory)[];
|
|
10
10
|
let formFieldRegistry: (string | typeof FormFieldRegistry)[];
|
|
11
|
+
let formFieldInstanceRegistry: (string | typeof FormFieldInstanceRegistry)[];
|
|
11
12
|
let pathRegistry: (string | typeof PathRegistry)[];
|
|
12
13
|
let formLayouter: (string | typeof FormLayouter)[];
|
|
13
14
|
let validator: (string | typeof Validator)[];
|
|
@@ -18,5 +19,6 @@ import { FormFieldRegistry } from './FormFieldRegistry';
|
|
|
18
19
|
import { PathRegistry } from './PathRegistry';
|
|
19
20
|
import { FormLayouter } from './FormLayouter';
|
|
20
21
|
import { EventBus } from './EventBus';
|
|
22
|
+
import { FormFieldInstanceRegistry } from './FormFieldInstanceRegistry';
|
|
21
23
|
import { Validator } from './Validator';
|
|
22
24
|
export { Importer, FieldFactory, FormFieldRegistry, PathRegistry, FormLayouter };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export class ExpressionLoopPreventer {
|
|
2
|
+
constructor(eventBus: any);
|
|
3
|
+
_computedExpressions: any[];
|
|
4
|
+
/**
|
|
5
|
+
* Checks if the expression field has already been computed, and registers it if not.
|
|
6
|
+
*
|
|
7
|
+
* @param {any} expressionField
|
|
8
|
+
* @returns {boolean} - whether the expression field has already been computed within the current cycle
|
|
9
|
+
*/
|
|
10
|
+
registerExpressionExecution(expressionField: any): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Resets the list of computed expressions.
|
|
13
|
+
*/
|
|
14
|
+
reset(): void;
|
|
15
|
+
}
|
|
16
|
+
export namespace ExpressionLoopPreventer {
|
|
17
|
+
let $inject: string[];
|
|
18
|
+
}
|
|
@@ -37,10 +37,10 @@ export class FeelersTemplating {
|
|
|
37
37
|
sanitizer?: Function;
|
|
38
38
|
}): any;
|
|
39
39
|
/**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
* @typedef {Object} ExpressionWithDepth
|
|
41
|
+
* @property {number} depth - The depth of the expression in the syntax tree.
|
|
42
|
+
* @property {string} expression - The extracted expression
|
|
43
|
+
*/
|
|
44
44
|
/**
|
|
45
45
|
* Extracts all feel expressions in the template along with their depth in the syntax tree.
|
|
46
46
|
* The depth is incremented for child expressions of loops to account for context drilling.
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export { ExpressionLanguageModule } from "./expressionLanguage";
|
|
2
|
+
export { ExpressionFieldModule } from "./expressionField";
|
|
2
3
|
export { MarkdownRendererModule } from "./markdown";
|
|
3
4
|
export { ViewerCommandsModule } from "./viewerCommands";
|
|
4
5
|
export { RepeatRenderModule } from "./repeatRender";
|
|
5
6
|
export * from "./expressionLanguage";
|
|
7
|
+
export * from "./expressionField";
|
|
6
8
|
export * from "./markdown";
|
|
7
9
|
export * from "./viewerCommands";
|
|
8
10
|
export * from "./repeatRender";
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,36 +1,34 @@
|
|
|
1
|
-
import { Injector } from 'didi';
|
|
2
|
-
|
|
3
|
-
export type Module = any;
|
|
4
|
-
export type Schema = any;
|
|
5
|
-
|
|
6
|
-
export interface Data {
|
|
7
|
-
[x: string]: any;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface Errors {
|
|
11
|
-
[x: string]: string[];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export type FormProperty =
|
|
15
|
-
export type FormEvent =
|
|
16
|
-
|
|
17
|
-
export interface FormProperties {
|
|
18
|
-
[x: string]: any;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface FormOptions {
|
|
22
|
-
additionalModules?: Module[];
|
|
23
|
-
container?: Element | null | string;
|
|
24
|
-
injector?: Injector;
|
|
25
|
-
modules?: Module[];
|
|
26
|
-
properties?: FormProperties;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface CreateFormOptions extends FormOptions {
|
|
30
|
-
data?: Data;
|
|
31
|
-
schema: Schema;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export {
|
|
35
|
-
Injector
|
|
36
|
-
};
|
|
1
|
+
import { Injector } from 'didi';
|
|
2
|
+
|
|
3
|
+
export type Module = any;
|
|
4
|
+
export type Schema = any;
|
|
5
|
+
|
|
6
|
+
export interface Data {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface Errors {
|
|
11
|
+
[x: string]: string[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type FormProperty = 'readOnly' | 'disabled' | string;
|
|
15
|
+
export type FormEvent = 'submit' | 'changed' | string;
|
|
16
|
+
|
|
17
|
+
export interface FormProperties {
|
|
18
|
+
[x: string]: any;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface FormOptions {
|
|
22
|
+
additionalModules?: Module[];
|
|
23
|
+
container?: Element | null | string;
|
|
24
|
+
injector?: Injector;
|
|
25
|
+
modules?: Module[];
|
|
26
|
+
properties?: FormProperties;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface CreateFormOptions extends FormOptions {
|
|
30
|
+
data?: Data;
|
|
31
|
+
schema: Schema;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { Injector };
|
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.4",
|
|
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": "c9a4761209756fce5711053526023f42bf3b7b54"
|
|
69
69
|
}
|