@bpmn-io/form-js-viewer 1.13.1 → 1.14.0
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 +82 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +82 -48
- package/dist/index.es.js.map +1 -1
- package/dist/types/Form.d.ts +12 -12
- package/dist/types/core/Importer.d.ts +1 -1
- package/dist/types/features/expressionLanguage/ConditionChecker.d.ts +1 -1
- package/dist/types/features/expressionLanguage/FeelExpressionLanguage.d.ts +1 -1
- package/dist/types/features/expressionLanguage/FeelersTemplating.d.ts +2 -2
- package/dist/types/features/repeatRender/RepeatRenderManager.d.ts +4 -4
- package/dist/types/index.d.ts +1 -1
- package/dist/types/render/FileRegistry.d.ts +4 -4
- package/dist/types/render/Renderer.d.ts +4 -4
- package/dist/types/render/components/form-fields/DocumentPreview.d.ts +2 -0
- package/dist/types/render/components/form-fields/FilePicker.d.ts +5 -0
- package/dist/types/render/components/form-fields/Table.d.ts +1 -1
- package/dist/types/render/hooks/useReadonly.d.ts +1 -1
- package/dist/types/render/hooks/useService.d.ts +1 -1
- package/dist/types/util/getSchemaVariables.d.ts +1 -1
- package/dist/types/util/structure.d.ts +1 -1
- package/package.json +6 -6
package/dist/types/Form.d.ts
CHANGED
|
@@ -30,12 +30,12 @@ export class Form {
|
|
|
30
30
|
get: {
|
|
31
31
|
<Name extends never>(name: Name): null[Name];
|
|
32
32
|
<T>(name: string): T;
|
|
33
|
-
<
|
|
34
|
-
<
|
|
33
|
+
<T>(name: string, strict: true): T;
|
|
34
|
+
<T>(name: string, strict: boolean): T;
|
|
35
35
|
};
|
|
36
36
|
invoke: {
|
|
37
|
-
<
|
|
38
|
-
<
|
|
37
|
+
<T>(func: import("didi").FactoryFunction<T>, context?: import("didi").InjectionContext, locals?: import("didi").LocalsMap): T;
|
|
38
|
+
<T>(func: import("didi").ArrayFunc<T>, context?: import("didi").InjectionContext, locals?: import("didi").LocalsMap): T;
|
|
39
39
|
};
|
|
40
40
|
clear(): void;
|
|
41
41
|
/**
|
|
@@ -153,14 +153,14 @@ export class Form {
|
|
|
153
153
|
*/
|
|
154
154
|
_getInitializedFieldData(data: any, options?: {}): any;
|
|
155
155
|
}
|
|
156
|
-
export type Injector = import(
|
|
157
|
-
export type Data = import(
|
|
158
|
-
export type Errors = import(
|
|
159
|
-
export type Schema = import(
|
|
160
|
-
export type FormProperties = import(
|
|
161
|
-
export type FormProperty = import(
|
|
162
|
-
export type FormEvent = import(
|
|
163
|
-
export type FormOptions = import(
|
|
156
|
+
export type Injector = import("./types").Injector;
|
|
157
|
+
export type Data = import("./types").Data;
|
|
158
|
+
export type Errors = import("./types").Errors;
|
|
159
|
+
export type Schema = import("./types").Schema;
|
|
160
|
+
export type FormProperties = import("./types").FormProperties;
|
|
161
|
+
export type FormProperty = import("./types").FormProperty;
|
|
162
|
+
export type FormEvent = import("./types").FormEvent;
|
|
163
|
+
export type FormOptions = import("./types").FormOptions;
|
|
164
164
|
export type State = {
|
|
165
165
|
data: Data;
|
|
166
166
|
initialData: Data;
|
|
@@ -6,7 +6,7 @@ export class Importer {
|
|
|
6
6
|
* @param { import('./FieldFactory').FieldFactory } fieldFactory
|
|
7
7
|
* @param { import('./FormLayouter').FormLayouter } formLayouter
|
|
8
8
|
*/
|
|
9
|
-
constructor(formFieldRegistry: import(
|
|
9
|
+
constructor(formFieldRegistry: import("./FormFieldRegistry").FormFieldRegistry, pathRegistry: import("./PathRegistry").PathRegistry, fieldFactory: import("./FieldFactory").FieldFactory, formLayouter: import("./FormLayouter").FormLayouter);
|
|
10
10
|
_formFieldRegistry: import("./FormFieldRegistry").FormFieldRegistry;
|
|
11
11
|
_pathRegistry: import("./PathRegistry").PathRegistry;
|
|
12
12
|
_fieldFactory: import("./FieldFactory").FieldFactory;
|
|
@@ -34,7 +34,7 @@ export class ConditionChecker {
|
|
|
34
34
|
*
|
|
35
35
|
* @returns {boolean|null}
|
|
36
36
|
*/
|
|
37
|
-
check(condition: string, data?: import(
|
|
37
|
+
check(condition: string, data?: import("../../types").Data): boolean | null;
|
|
38
38
|
/**
|
|
39
39
|
* Check if hide condition is met.
|
|
40
40
|
*
|
|
@@ -29,7 +29,7 @@ export class FeelExpressionLanguage {
|
|
|
29
29
|
*
|
|
30
30
|
* @returns {any}
|
|
31
31
|
*/
|
|
32
|
-
evaluate(expression: string, data?: import(
|
|
32
|
+
evaluate(expression: string, data?: import("../../types").Data): any;
|
|
33
33
|
}
|
|
34
34
|
export namespace FeelExpressionLanguage {
|
|
35
35
|
let $inject: string[];
|
|
@@ -53,7 +53,7 @@ export class FeelersTemplating {
|
|
|
53
53
|
* const template = "Hello {{user}}, you have:{{#loop items}}\n- {{amount}} {{name}}{{/loop}}.";
|
|
54
54
|
* const extractedExpressions = _extractExpressionsWithDepth(template);
|
|
55
55
|
*/
|
|
56
|
-
_extractExpressionsWithDepth(template: string): {
|
|
56
|
+
_extractExpressionsWithDepth(template: string): Array<{
|
|
57
57
|
/**
|
|
58
58
|
* - The depth of the expression in the syntax tree.
|
|
59
59
|
*/
|
|
@@ -62,7 +62,7 @@ export class FeelersTemplating {
|
|
|
62
62
|
* - The extracted expression
|
|
63
63
|
*/
|
|
64
64
|
expression: string;
|
|
65
|
-
}
|
|
65
|
+
}>;
|
|
66
66
|
}
|
|
67
67
|
export namespace FeelersTemplating {
|
|
68
68
|
let $inject: any[];
|
|
@@ -2,13 +2,13 @@ export class RepeatRenderManager {
|
|
|
2
2
|
constructor(form: any, formFields: any, formFieldRegistry: any, pathRegistry: any, eventBus: any);
|
|
3
3
|
_form: any;
|
|
4
4
|
/** @type {import('../../render/FormFields').FormFields} */
|
|
5
|
-
_formFields: import(
|
|
5
|
+
_formFields: import("../../render/FormFields").FormFields;
|
|
6
6
|
/** @type {import('../../core/FormFieldRegistry').FormFieldRegistry} */
|
|
7
|
-
_formFieldRegistry: import(
|
|
7
|
+
_formFieldRegistry: import("../../core/FormFieldRegistry").FormFieldRegistry;
|
|
8
8
|
/** @type {import('../../core/PathRegistry').PathRegistry} */
|
|
9
|
-
_pathRegistry: import(
|
|
9
|
+
_pathRegistry: import("../../core/PathRegistry").PathRegistry;
|
|
10
10
|
/** @type {import('../../core/EventBus').EventBus} */
|
|
11
|
-
_eventBus: import(
|
|
11
|
+
_eventBus: import("../../core/EventBus").EventBus;
|
|
12
12
|
Repeater(props: any): import("preact").JSX.Element;
|
|
13
13
|
RepeatFooter(props: any): import("preact").JSX.Element;
|
|
14
14
|
/**
|
package/dist/types/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export function createForm(options: CreateFormOptions): Promise<Form>;
|
|
|
12
12
|
export * from "./render";
|
|
13
13
|
export * from "./util";
|
|
14
14
|
export * from "./features";
|
|
15
|
-
export type CreateFormOptions = import(
|
|
15
|
+
export type CreateFormOptions = import("./types").CreateFormOptions;
|
|
16
16
|
import { Form } from './Form';
|
|
17
17
|
export const schemaVersion: 18;
|
|
18
18
|
export { Form };
|
|
@@ -4,7 +4,7 @@ export class FileRegistry {
|
|
|
4
4
|
* @param {import('../core/FormFieldRegistry').FormFieldRegistry} formFieldRegistry
|
|
5
5
|
* @param {import('../core/FormFieldInstanceRegistry').FormFieldInstanceRegistry} formFieldInstanceRegistry
|
|
6
6
|
*/
|
|
7
|
-
constructor(eventBus: import(
|
|
7
|
+
constructor(eventBus: import("../core/EventBus").EventBus, formFieldRegistry: import("../core/FormFieldRegistry").FormFieldRegistry, formFieldInstanceRegistry: import("../core/FormFieldInstanceRegistry").FormFieldInstanceRegistry);
|
|
8
8
|
/**
|
|
9
9
|
* @param {string} id
|
|
10
10
|
* @param {File[]} files
|
|
@@ -36,11 +36,11 @@ export class FileRegistry {
|
|
|
36
36
|
/** @type {Map<string, File[]>} */
|
|
37
37
|
[fileRegistry]: Map<string, File[]>;
|
|
38
38
|
/** @type {import('../core/EventBus').EventBus} */
|
|
39
|
-
[eventBusSymbol]: import(
|
|
39
|
+
[eventBusSymbol]: import("../core/EventBus").EventBus;
|
|
40
40
|
/** @type {import('../core/FormFieldRegistry').FormFieldRegistry} */
|
|
41
|
-
[formFieldRegistrySymbol]: import(
|
|
41
|
+
[formFieldRegistrySymbol]: import("../core/FormFieldRegistry").FormFieldRegistry;
|
|
42
42
|
/** @type {import('../core/FormFieldInstanceRegistry').FormFieldInstanceRegistry} */
|
|
43
|
-
[formFieldInstanceRegistrySymbol]: import(
|
|
43
|
+
[formFieldInstanceRegistrySymbol]: import("../core/FormFieldInstanceRegistry").FormFieldInstanceRegistry;
|
|
44
44
|
}
|
|
45
45
|
export namespace FileRegistry {
|
|
46
46
|
let $inject: string[];
|
|
@@ -15,8 +15,8 @@ export namespace Renderer {
|
|
|
15
15
|
let $inject: string[];
|
|
16
16
|
}
|
|
17
17
|
export type Config = {
|
|
18
|
-
container;
|
|
18
|
+
container: any;
|
|
19
19
|
};
|
|
20
|
-
export type Injector = import(
|
|
21
|
-
export type EventBus = import(
|
|
22
|
-
export type Form = import(
|
|
20
|
+
export type Injector = import("didi").Injector;
|
|
21
|
+
export type EventBus = import("../core/EventBus").EventBus;
|
|
22
|
+
export type Form = import("../Form").Form;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @typedef DocumentMetadata
|
|
3
3
|
* @property {string} documentId
|
|
4
|
+
* @property {string} contentHash
|
|
4
5
|
* @property {Object} metadata
|
|
5
6
|
* @property {string|undefined} [metadata.contentType]
|
|
6
7
|
* @property {string} metadata.fileName
|
|
@@ -35,6 +36,7 @@ export namespace DocumentPreview {
|
|
|
35
36
|
}
|
|
36
37
|
export type DocumentMetadata = {
|
|
37
38
|
documentId: string;
|
|
39
|
+
contentHash: string;
|
|
38
40
|
metadata: {
|
|
39
41
|
contentType?: string | undefined;
|
|
40
42
|
fileName: string;
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
* @property {string} [field.label]
|
|
12
12
|
* @property {string} [field.accept]
|
|
13
13
|
* @property {string|boolean} [field.multiple]
|
|
14
|
+
* @property {Object} [field.validate]
|
|
15
|
+
* @property {boolean} [field.validate.required]
|
|
14
16
|
* @property {string} [value]
|
|
15
17
|
*
|
|
16
18
|
* @param {Props} props
|
|
@@ -41,6 +43,9 @@ export type Props = {
|
|
|
41
43
|
label?: string;
|
|
42
44
|
accept?: string;
|
|
43
45
|
multiple?: string | boolean;
|
|
46
|
+
validate?: {
|
|
47
|
+
required?: boolean;
|
|
48
|
+
};
|
|
44
49
|
};
|
|
45
50
|
value?: string;
|
|
46
51
|
};
|
|
@@ -14,4 +14,4 @@ export function useReadonly(formField: any, properties?: FormProperties): boolea
|
|
|
14
14
|
* Retrieve readonly value of a form field, given it can be an
|
|
15
15
|
* expression optionally or configured globally.
|
|
16
16
|
*/
|
|
17
|
-
export type FormProperties = import(
|
|
17
|
+
export type FormProperties = import("../../types").FormProperties;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function getAncestryList(formFieldId: string, formFieldRegistry: import(
|
|
1
|
+
export function getAncestryList(formFieldId: string, formFieldRegistry: import("../core/FormFieldRegistry").FormFieldRegistry): Array<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmn-io/form-js-viewer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "View forms - powered by bpmn.io",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -45,18 +45,18 @@
|
|
|
45
45
|
"url": "https://github.com/bpmn-io"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@carbon/grid": "^11.
|
|
48
|
+
"@carbon/grid": "^11.30.0",
|
|
49
49
|
"big.js": "^6.2.2",
|
|
50
50
|
"classnames": "^2.5.1",
|
|
51
51
|
"didi": "^10.2.2",
|
|
52
|
-
"dompurify": "^3.2.
|
|
52
|
+
"dompurify": "^3.2.3",
|
|
53
53
|
"feelers": "^1.4.0",
|
|
54
|
-
"feelin": "^3.
|
|
54
|
+
"feelin": "^4.3.0",
|
|
55
55
|
"flatpickr": "^4.6.13",
|
|
56
56
|
"ids": "^1.0.5",
|
|
57
57
|
"lodash": "^4.17.21",
|
|
58
58
|
"luxon": "^3.5.0",
|
|
59
|
-
"marked": "^15.0.
|
|
59
|
+
"marked": "^15.0.6",
|
|
60
60
|
"min-dash": "^4.2.2",
|
|
61
61
|
"preact": "^10.5.14"
|
|
62
62
|
},
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"files": [
|
|
67
67
|
"dist"
|
|
68
68
|
],
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "4af04fd5caafd491ba61099e6500fd20b9ee1891"
|
|
70
70
|
}
|