@bpmn-io/form-js-viewer 1.7.3 → 1.8.1
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/LICENSE +22 -22
- package/README.md +189 -189
- package/dist/index.cjs +345 -214
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +344 -216
- package/dist/index.es.js.map +1 -1
- package/dist/types/Form.d.ts +1 -0
- package/dist/types/features/markdown/MarkdownRenderer.d.ts +0 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/render/components/form-fields/ExpressionField.d.ts +15 -0
- package/dist/types/render/components/index.d.ts +4 -2
- package/dist/types/render/components/util/domUtil.d.ts +1 -0
- package/dist/types/render/hooks/index.d.ts +1 -0
- package/dist/types/render/hooks/useEffectOnChange.d.ts +1 -0
- package/dist/types/render/hooks/useScrollIntoView.d.ts +4 -4
- package/dist/types/types.d.ts +35 -35
- package/dist/types/util/injector.d.ts +1 -1
- package/package.json +7 -7
package/dist/types/Form.d.ts
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -14,6 +14,6 @@ export * from "./util";
|
|
|
14
14
|
export * from "./features";
|
|
15
15
|
export type CreateFormOptions = import('./types').CreateFormOptions;
|
|
16
16
|
import { Form } from './Form';
|
|
17
|
-
export const schemaVersion:
|
|
17
|
+
export const schemaVersion: 16;
|
|
18
18
|
export { Form };
|
|
19
19
|
export { FormFieldRegistry, FormLayouter, Importer, FieldFactory, PathRegistry } from "./core";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function ExpressionField(props: any): any;
|
|
2
|
+
export namespace ExpressionField {
|
|
3
|
+
namespace config {
|
|
4
|
+
export { type };
|
|
5
|
+
export let label: string;
|
|
6
|
+
export let group: string;
|
|
7
|
+
export let keyed: boolean;
|
|
8
|
+
export let escapeGridRender: boolean;
|
|
9
|
+
export function create(options?: {}): {
|
|
10
|
+
computeOn: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
declare const type: "expression";
|
|
15
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export const formFields: (typeof Default | typeof Group | typeof Image | typeof Radio)[];
|
|
1
|
+
export const formFields: (typeof Default | typeof Group | typeof Image | typeof Radio | typeof ExpressionField)[];
|
|
2
2
|
export * from "./icons";
|
|
3
3
|
export * from "./Sanitizer";
|
|
4
|
+
export * from "./util/domUtil";
|
|
4
5
|
export * from "./util/sanitizerUtil";
|
|
5
6
|
import { Label } from './Label';
|
|
6
7
|
import { Description } from './Description';
|
|
@@ -17,6 +18,7 @@ import { IFrame } from './form-fields/IFrame';
|
|
|
17
18
|
import { DynamicList } from './form-fields/DynamicList';
|
|
18
19
|
import { Image } from './form-fields/Image';
|
|
19
20
|
import { Numberfield } from './form-fields/Number';
|
|
21
|
+
import { ExpressionField } from './form-fields/ExpressionField';
|
|
20
22
|
import { Radio } from './form-fields/Radio';
|
|
21
23
|
import { Select } from './form-fields/Select';
|
|
22
24
|
import { Separator } from './form-fields/Separator';
|
|
@@ -27,4 +29,4 @@ import { Html } from './form-fields/Html';
|
|
|
27
29
|
import { Textfield } from './form-fields/Textfield';
|
|
28
30
|
import { Textarea } from './form-fields/Textarea';
|
|
29
31
|
import { Table } from './form-fields/Table';
|
|
30
|
-
export { Label, Description, Errors, Button, Checkbox, Checklist, Default, Datetime, FormComponent, FormField, Group, IFrame, DynamicList, Image, Numberfield, Radio, Select, Separator, Spacer, Taglist, Text, Html, Textfield, Textarea, Table };
|
|
32
|
+
export { Label, Description, Errors, Button, Checkbox, Checklist, Default, Datetime, FormComponent, FormField, Group, IFrame, DynamicList, Image, Numberfield, ExpressionField, Radio, Select, Separator, Spacer, Taglist, Text, Html, Textfield, Textarea, Table };
|
|
@@ -10,6 +10,7 @@ export { useReadonly } from "./useReadonly";
|
|
|
10
10
|
export { useService } from "./useService";
|
|
11
11
|
export { usePrevious } from "./usePrevious";
|
|
12
12
|
export { useFlushDebounce } from "./useFlushDebounce";
|
|
13
|
+
export { useEffectOnChange } from "./useEffectOnChange";
|
|
13
14
|
export { useDeepCompareMemoize } from "./useDeepCompareMemoize";
|
|
14
15
|
export { useSingleLineTemplateEvaluation } from "./useSingleLineTemplateEvaluation";
|
|
15
16
|
export { useTemplateEvaluation } from "./useTemplateEvaluation";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function useEffectOnChange(value: any, callback: any, dependencies?: any[]): void;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Custom hook to scroll an element
|
|
2
|
+
* Custom hook to scroll an element within a scrollable container.
|
|
3
3
|
*
|
|
4
|
-
* @param {Object}
|
|
4
|
+
* @param {Object} scrolledElementRef - A ref pointing to the DOM element to scroll into view.
|
|
5
5
|
* @param {Array} deps - An array of dependencies that trigger the effect.
|
|
6
|
-
* @param {Array} flagRefs - An array of refs that are used as flags to control when to scroll.
|
|
7
6
|
* @param {Object} [scrollOptions={}] - Options defining the behavior of the scrolling.
|
|
8
7
|
* @param {String} [scrollOptions.align='center'] - The alignment of the element within the viewport.
|
|
9
8
|
* @param {String} [scrollOptions.behavior='auto'] - The scrolling behavior.
|
|
10
9
|
* @param {Number} [scrollOptions.offset=0] - An offset that is added to the scroll position.
|
|
11
10
|
* @param {Boolean} [scrollOptions.scrollIfVisible=false] - Whether to scroll even if the element is visible.
|
|
11
|
+
* @param {Array} [flagRefs] - An array of refs that are used as flags to control when to scroll.
|
|
12
12
|
*/
|
|
13
|
-
export function useScrollIntoView(
|
|
13
|
+
export function useScrollIntoView(scrolledElementRef: any, deps: any[], scrollOptions?: {
|
|
14
14
|
align?: string;
|
|
15
15
|
behavior?: string;
|
|
16
16
|
offset?: number;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,36 +1,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 {
|
|
35
|
-
Injector
|
|
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 {
|
|
35
|
+
Injector
|
|
36
36
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function createInjector(bootstrapModules: any): Injector
|
|
1
|
+
export function createInjector(bootstrapModules: any): Injector<null>;
|
|
2
2
|
import { Injector } from 'didi';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmn-io/form-js-viewer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "View forms - powered by bpmn.io",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -47,16 +47,16 @@
|
|
|
47
47
|
"@carbon/grid": "^11.11.0",
|
|
48
48
|
"big.js": "^6.2.1",
|
|
49
49
|
"classnames": "^2.3.1",
|
|
50
|
-
"didi": "^10.
|
|
50
|
+
"didi": "^10.2.2",
|
|
51
51
|
"dompurify": "^3.0.8",
|
|
52
|
-
"feelers": "^1.3.
|
|
53
|
-
"feelin": "^3.0.
|
|
52
|
+
"feelers": "^1.3.1",
|
|
53
|
+
"feelin": "^3.0.1",
|
|
54
54
|
"flatpickr": "^4.6.13",
|
|
55
55
|
"ids": "^1.0.0",
|
|
56
56
|
"lodash": "^4.5.0",
|
|
57
|
+
"marked": "^12.0.1",
|
|
57
58
|
"min-dash": "^4.2.1",
|
|
58
|
-
"preact": "^10.5.14"
|
|
59
|
-
"showdown": "^2.1.0"
|
|
59
|
+
"preact": "^10.5.14"
|
|
60
60
|
},
|
|
61
61
|
"sideEffects": [
|
|
62
62
|
"*.css"
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"files": [
|
|
65
65
|
"dist"
|
|
66
66
|
],
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "98d0c362ba37b809703027173c58441c1a2af5c2"
|
|
68
68
|
}
|