@bpmn-io/form-js-viewer 1.3.2 → 1.4.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/LICENSE +22 -22
- package/README.md +189 -164
- package/dist/assets/form-js-base.css +1016 -987
- package/dist/assets/form-js.css +29 -0
- package/dist/index.cjs +5659 -5466
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +5655 -5468
- package/dist/index.es.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/render/components/form-fields/Separator.d.ts +12 -0
- package/dist/types/render/components/form-fields/parts/SkipLink.d.ts +1 -0
- package/dist/types/render/components/index.d.ts +6 -1
- package/dist/types/types.d.ts +35 -35
- package/dist/types/util/index.d.ts +34 -3
- package/package.json +2 -2
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: 12;
|
|
18
18
|
export { Form };
|
|
19
19
|
export { FormFieldRegistry, FormLayouter, Importer, FieldFactory, PathRegistry } from "./core";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare function Separator(): import("preact").JSX.Element;
|
|
2
|
+
declare namespace Separator {
|
|
3
|
+
namespace config {
|
|
4
|
+
export { type };
|
|
5
|
+
export const keyed: boolean;
|
|
6
|
+
export const label: string;
|
|
7
|
+
export const group: string;
|
|
8
|
+
export function create(options?: {}): {};
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export default Separator;
|
|
12
|
+
declare const type: "separator";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function SkipLink(props: any): import("preact").JSX.Element;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export const formFields: (typeof Default | typeof Group | typeof Image)[];
|
|
2
2
|
export * from "./icons";
|
|
3
|
+
export * from "./Sanitizer";
|
|
4
|
+
import Label from './Label';
|
|
5
|
+
import Description from './Description';
|
|
6
|
+
import Errors from './Errors';
|
|
3
7
|
import Button from './form-fields/Button';
|
|
4
8
|
import Checkbox from './form-fields/Checkbox';
|
|
5
9
|
import Checklist from './form-fields/Checklist';
|
|
@@ -12,9 +16,10 @@ import Image from './form-fields/Image';
|
|
|
12
16
|
import Numberfield from './form-fields/Number';
|
|
13
17
|
import Radio from './form-fields/Radio';
|
|
14
18
|
import Select from './form-fields/Select';
|
|
19
|
+
import Separator from './form-fields/Separator';
|
|
15
20
|
import Spacer from './form-fields/Spacer';
|
|
16
21
|
import Taglist from './form-fields/Taglist';
|
|
17
22
|
import Text from './form-fields/Text';
|
|
18
23
|
import Textfield from './form-fields/Textfield';
|
|
19
24
|
import Textarea from './form-fields/Textarea';
|
|
20
|
-
export { Button, Checkbox, Checklist, Default, Datetime, FormComponent, FormField, Group, Image, Numberfield, Radio, Select, Spacer, Taglist, Text, Textfield, Textarea };
|
|
25
|
+
export { Label, Description, Errors, Button, Checkbox, Checklist, Default, Datetime, FormComponent, FormField, Group, Image, Numberfield, Radio, Select, Separator, Spacer, Taglist, Text, Textfield, Textarea };
|
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
|
};
|
|
@@ -11,14 +11,45 @@ export function generateIdForType(type: any): string;
|
|
|
11
11
|
*/
|
|
12
12
|
export function clone<T>(data: T, replacer?: (this: any, key: string, value: any) => any): T;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* @typedef { import('../types').Schema } Schema
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Parse the schema for variables a form might make use of.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
*
|
|
21
|
+
* // retrieve variables from schema
|
|
22
|
+
* const variables = getSchemaVariables(schema);
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
*
|
|
26
|
+
* // retrieve input variables from schema
|
|
27
|
+
* const inputVariables = getSchemaVariables(schema, { outputs: false });
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
*
|
|
31
|
+
* // retrieve output variables from schema
|
|
32
|
+
* const outputVariables = getSchemaVariables(schema, { inputs: false });
|
|
15
33
|
*
|
|
16
|
-
* @param {
|
|
34
|
+
* @param {Schema} schema
|
|
35
|
+
* @param {object} [options]
|
|
36
|
+
* @param {any} [options.expressionLanguage]
|
|
37
|
+
* @param {any} [options.templating]
|
|
38
|
+
* @param {any} [options.formFields]
|
|
39
|
+
* @param {boolean} [options.inputs=true]
|
|
40
|
+
* @param {boolean} [options.outputs=true]
|
|
17
41
|
*
|
|
18
42
|
* @return {string[]}
|
|
19
43
|
*/
|
|
20
|
-
export function getSchemaVariables(schema:
|
|
44
|
+
export function getSchemaVariables(schema: Schema, options?: {
|
|
45
|
+
expressionLanguage?: any;
|
|
46
|
+
templating?: any;
|
|
47
|
+
formFields?: any;
|
|
48
|
+
inputs?: boolean;
|
|
49
|
+
outputs?: boolean;
|
|
50
|
+
}): string[];
|
|
21
51
|
export function runRecursively(formField: any, fn: any): void;
|
|
22
52
|
export * from "./constants";
|
|
23
53
|
export * from "./injector";
|
|
24
54
|
export * from "./form";
|
|
55
|
+
export type Schema = import('../types').Schema;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmn-io/form-js-viewer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "View forms - powered by bpmn.io",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"files": [
|
|
64
64
|
"dist"
|
|
65
65
|
],
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "cf256b38f256abf7b4d676ea5cd2bdf796b08f31"
|
|
67
67
|
}
|