@bpmn-io/form-js-viewer 0.7.0 → 0.8.0-alpha.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/assets/form-js.css +127 -24
- package/dist/index.cjs +632 -155
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +629 -156
- package/dist/index.es.js.map +1 -1
- package/dist/types/Form.d.ts +12 -6
- package/dist/types/core/Validator.d.ts +5 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/render/components/form-fields/Checklist.d.ts +10 -0
- package/dist/types/render/components/form-fields/Radio.d.ts +1 -6
- package/dist/types/render/components/form-fields/Select.d.ts +1 -6
- package/dist/types/render/components/form-fields/Taglist.d.ts +10 -0
- package/dist/types/render/components/form-fields/parts/DropdownList.d.ts +1 -0
- package/dist/types/render/components/index.d.ts +3 -1
- package/dist/types/render/hooks/useKeyDownAction.d.ts +1 -0
- package/dist/types/render/hooks/useValuesAsync.d.ts +28 -0
- package/package.json +4 -3
package/dist/types/Form.d.ts
CHANGED
|
@@ -7,6 +7,11 @@ export default class Form {
|
|
|
7
7
|
* @param {FormOptions} options
|
|
8
8
|
*/
|
|
9
9
|
constructor(options?: FormOptions);
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
* @type {OnEventType}
|
|
13
|
+
*/
|
|
14
|
+
public on: OnEventType;
|
|
10
15
|
/**
|
|
11
16
|
* @public
|
|
12
17
|
* @type {String}
|
|
@@ -69,12 +74,6 @@ export default class Form {
|
|
|
69
74
|
* @param {any} value
|
|
70
75
|
*/
|
|
71
76
|
setProperty(property: FormProperty, value: any): void;
|
|
72
|
-
/**
|
|
73
|
-
* @param {FormEvent} type
|
|
74
|
-
* @param {number} priority
|
|
75
|
-
* @param {Function} handler
|
|
76
|
-
*/
|
|
77
|
-
on(type: FormEvent, priority: number, handler: Function): void;
|
|
78
77
|
/**
|
|
79
78
|
* @param {FormEvent} type
|
|
80
79
|
* @param {Function} handler
|
|
@@ -112,6 +111,10 @@ export default class Form {
|
|
|
112
111
|
* @internal
|
|
113
112
|
*/
|
|
114
113
|
_setState(state: any): void;
|
|
114
|
+
/**
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
_onEvent(type: any, priority: any, handler: any): void;
|
|
115
118
|
}
|
|
116
119
|
export type Injector = any;
|
|
117
120
|
export type Data = import('./types').Data;
|
|
@@ -128,3 +131,6 @@ export type State = {
|
|
|
128
131
|
properties: FormProperties;
|
|
129
132
|
schema: Schema;
|
|
130
133
|
};
|
|
134
|
+
export type OnEventWithPriority = OnEventWithPriority;
|
|
135
|
+
export type OnEventWithOutPriority = OnEventWithOutPriority;
|
|
136
|
+
export type OnEventType = OnEventWithPriority & OnEventWithOutPriority;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare function Checklist(props: any): import("preact").JSX.Element;
|
|
2
|
+
declare namespace Checklist {
|
|
3
|
+
export function create(options?: {}): {};
|
|
4
|
+
export { type };
|
|
5
|
+
export const label: string;
|
|
6
|
+
export const keyed: boolean;
|
|
7
|
+
export const emptyValue: any[];
|
|
8
|
+
}
|
|
9
|
+
export default Checklist;
|
|
10
|
+
declare const type: "checklist";
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
declare function Radio(props: any): import("preact").JSX.Element;
|
|
2
2
|
declare namespace Radio {
|
|
3
|
-
export function create(options?: {}): {
|
|
4
|
-
values: {
|
|
5
|
-
label: string;
|
|
6
|
-
value: string;
|
|
7
|
-
}[];
|
|
8
|
-
};
|
|
3
|
+
export function create(options?: {}): {};
|
|
9
4
|
export { type };
|
|
10
5
|
export const label: string;
|
|
11
6
|
export const keyed: boolean;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
declare function Select(props: any): import("preact").JSX.Element;
|
|
2
2
|
declare namespace Select {
|
|
3
|
-
export function create(options?: {}): {
|
|
4
|
-
values: {
|
|
5
|
-
label: string;
|
|
6
|
-
value: string;
|
|
7
|
-
}[];
|
|
8
|
-
};
|
|
3
|
+
export function create(options?: {}): {};
|
|
9
4
|
export { type };
|
|
10
5
|
export const label: string;
|
|
11
6
|
export const keyed: boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare function Taglist(props: any): import("preact").JSX.Element;
|
|
2
|
+
declare namespace Taglist {
|
|
3
|
+
export function create(options?: {}): {};
|
|
4
|
+
export { type };
|
|
5
|
+
export const label: string;
|
|
6
|
+
export const keyed: boolean;
|
|
7
|
+
export const emptyValue: any[];
|
|
8
|
+
}
|
|
9
|
+
export default Taglist;
|
|
10
|
+
declare const type: "taglist";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function DropdownList(props: any): import("preact").JSX.Element;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export const formFields: (typeof Button | typeof Default | typeof Number | typeof Text)[];
|
|
2
2
|
import Button from "./form-fields/Button";
|
|
3
3
|
import Checkbox from "./form-fields/Checkbox";
|
|
4
|
+
import Checklist from "./form-fields/Checklist";
|
|
4
5
|
import Default from "./form-fields/Default";
|
|
5
6
|
import FormComponent from "./FormComponent";
|
|
6
7
|
import Number from "./form-fields/Number";
|
|
7
8
|
import Radio from "./form-fields/Radio";
|
|
8
9
|
import Select from "./form-fields/Select";
|
|
10
|
+
import Taglist from "./form-fields/Taglist";
|
|
9
11
|
import Text from "./form-fields/Text";
|
|
10
12
|
import Textfield from "./form-fields/Textfield";
|
|
11
|
-
export { Button, Checkbox, Default, FormComponent, Number, Radio, Select, Text, Textfield };
|
|
13
|
+
export { Button, Checkbox, Checklist, Default, FormComponent, Number, Radio, Select, Taglist, Text, Textfield };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useKeyDownAction(targetKey: any, action: any, listenerElement?: Window & typeof globalThis): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} ValuesGetter
|
|
3
|
+
* @property {Object[]} values - The values data
|
|
4
|
+
* @property {(LOAD_STATES)} state - The values data's loading state, to use for conditional rendering
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A hook to load values for single and multiselect components.
|
|
8
|
+
*
|
|
9
|
+
* @param {Object} field - The form field to handle values for
|
|
10
|
+
* @return {ValuesGetter} valuesGetter - A values getter object providing loading state and values
|
|
11
|
+
*/
|
|
12
|
+
export default function _default(field: any): ValuesGetter;
|
|
13
|
+
export type LOAD_STATES = string;
|
|
14
|
+
export namespace LOAD_STATES {
|
|
15
|
+
const LOADING: string;
|
|
16
|
+
const LOADED: string;
|
|
17
|
+
const ERROR: string;
|
|
18
|
+
}
|
|
19
|
+
export type ValuesGetter = {
|
|
20
|
+
/**
|
|
21
|
+
* - The values data
|
|
22
|
+
*/
|
|
23
|
+
values: any[];
|
|
24
|
+
/**
|
|
25
|
+
* - The values data's loading state, to use for conditional rendering
|
|
26
|
+
*/
|
|
27
|
+
state: (LOAD_STATES);
|
|
28
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmn-io/form-js-viewer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0-alpha.0",
|
|
4
4
|
"description": "View forms - powered by bpmn.io",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"all": "run-s test build",
|
|
21
21
|
"build": "run-p bundle generate-types",
|
|
22
22
|
"start": "SINGLE_START=basic npm run dev",
|
|
23
|
-
"bundle": "rollup -c",
|
|
23
|
+
"bundle": "rollup -c --failAfterWarnings",
|
|
24
24
|
"bundle:watch": "rollup -c -w",
|
|
25
25
|
"dev": "npm test -- --auto-watch --no-single-run",
|
|
26
26
|
"generate-types": "tsc --allowJs --skipLibCheck --declaration --emitDeclarationOnly --outDir dist/types src/index.js && cp src/*.d.ts dist/types",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@bpmn-io/snarkdown": "^2.1.0",
|
|
42
|
+
"classnames": "^2.3.1",
|
|
42
43
|
"didi": "^5.2.1",
|
|
43
44
|
"ids": "^1.0.0",
|
|
44
45
|
"min-dash": "^3.7.0",
|
|
@@ -51,5 +52,5 @@
|
|
|
51
52
|
"files": [
|
|
52
53
|
"dist"
|
|
53
54
|
],
|
|
54
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "ffc5f0cedcf0b9a923b34ff56e7f63a34c362cf9"
|
|
55
56
|
}
|