@bpmn-io/form-js-viewer 0.9.5 → 0.9.8
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 +2 -0
- package/dist/types/Form.d.ts +136 -136
- package/dist/types/core/EventBus.d.ts +1 -1
- package/dist/types/core/FormFieldRegistry.d.ts +17 -17
- package/dist/types/core/Validator.d.ts +7 -7
- package/dist/types/core/index.d.ts +16 -16
- package/dist/types/import/Importer.d.ts +43 -43
- package/dist/types/import/index.d.ts +5 -5
- package/dist/types/index.d.ts +18 -18
- package/dist/types/render/FormFields.d.ts +5 -5
- package/dist/types/render/Renderer.d.ts +23 -23
- package/dist/types/render/components/Description.d.ts +1 -1
- package/dist/types/render/components/Errors.d.ts +1 -1
- package/dist/types/render/components/FormComponent.d.ts +1 -1
- package/dist/types/render/components/FormField.d.ts +1 -1
- package/dist/types/render/components/Label.d.ts +1 -1
- package/dist/types/render/components/PoweredBy.d.ts +1 -1
- package/dist/types/render/components/Sanitizer.d.ts +7 -7
- package/dist/types/render/components/Util.d.ts +6 -6
- package/dist/types/render/components/form-fields/Button.d.ts +11 -11
- package/dist/types/render/components/form-fields/Checkbox.d.ts +13 -13
- package/dist/types/render/components/form-fields/Checklist.d.ts +12 -12
- package/dist/types/render/components/form-fields/Default.d.ts +9 -9
- package/dist/types/render/components/form-fields/Number.d.ts +13 -13
- package/dist/types/render/components/form-fields/Radio.d.ts +12 -12
- package/dist/types/render/components/form-fields/Select.d.ts +12 -12
- package/dist/types/render/components/form-fields/Taglist.d.ts +12 -12
- package/dist/types/render/components/form-fields/Text.d.ts +10 -10
- package/dist/types/render/components/form-fields/Textfield.d.ts +13 -13
- package/dist/types/render/components/form-fields/parts/DropdownList.d.ts +1 -1
- package/dist/types/render/components/index.d.ts +13 -13
- package/dist/types/render/context/FormContext.d.ts +12 -12
- package/dist/types/render/context/FormRenderContext.d.ts +6 -6
- package/dist/types/render/context/index.d.ts +2 -2
- package/dist/types/render/hooks/useKeyDownAction.d.ts +1 -1
- package/dist/types/render/hooks/useService.d.ts +1 -1
- package/dist/types/render/hooks/useValuesAsync.d.ts +28 -28
- package/dist/types/render/index.d.ts +11 -11
- package/dist/types/util/form.d.ts +6 -6
- package/dist/types/util/index.d.ts +24 -24
- package/dist/types/util/injector.d.ts +2 -2
- package/package.json +3 -3
package/dist/assets/form-js.css
CHANGED
|
@@ -97,7 +97,9 @@
|
|
|
97
97
|
.fjs-container .fjs-select {
|
|
98
98
|
border-color: var(--color-borders);
|
|
99
99
|
background-color: var(--color-background);
|
|
100
|
+
font-family: inherit;
|
|
100
101
|
}
|
|
102
|
+
|
|
101
103
|
.fjs-container .fjs-input::placeholder,
|
|
102
104
|
.fjs-container .fjs-textarea::placeholder,
|
|
103
105
|
.fjs-container .fjs-select > option:disabled,
|
package/dist/types/Form.d.ts
CHANGED
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The form.
|
|
3
|
-
*/
|
|
4
|
-
export default class Form {
|
|
5
|
-
/**
|
|
6
|
-
* @constructor
|
|
7
|
-
* @param {FormOptions} options
|
|
8
|
-
*/
|
|
9
|
-
constructor(options?: FormOptions);
|
|
10
|
-
/**
|
|
11
|
-
* @public
|
|
12
|
-
* @type {OnEventType}
|
|
13
|
-
*/
|
|
14
|
-
public on: OnEventType;
|
|
15
|
-
/**
|
|
16
|
-
* @public
|
|
17
|
-
* @type {String}
|
|
18
|
-
*/
|
|
19
|
-
public _id: string;
|
|
20
|
-
/**
|
|
21
|
-
* @private
|
|
22
|
-
* @type {Element}
|
|
23
|
-
*/
|
|
24
|
-
private _container;
|
|
25
|
-
/**
|
|
26
|
-
* @private
|
|
27
|
-
* @type {State}
|
|
28
|
-
*/
|
|
29
|
-
private _state;
|
|
30
|
-
get: <T>(name: string, strict?: boolean) => T;
|
|
31
|
-
invoke: <T_1>(func: (...args: unknown[]) => T_1, context: unknown, locals: import("didi").LocalsMap) => T_1;
|
|
32
|
-
clear(): void;
|
|
33
|
-
/**
|
|
34
|
-
* Destroy the form, removing it from DOM,
|
|
35
|
-
* if attached.
|
|
36
|
-
*/
|
|
37
|
-
destroy(): void;
|
|
38
|
-
/**
|
|
39
|
-
* Open a form schema with the given initial data.
|
|
40
|
-
*
|
|
41
|
-
* @param {Schema} schema
|
|
42
|
-
* @param {Data} [data]
|
|
43
|
-
*
|
|
44
|
-
* @return Promise<{ warnings: Array<any> }>
|
|
45
|
-
*/
|
|
46
|
-
importSchema(schema: Schema, data?: Data): Promise<any>;
|
|
47
|
-
/**
|
|
48
|
-
* Submit the form, triggering all field validations.
|
|
49
|
-
*
|
|
50
|
-
* @returns { { data: Data, errors: Errors } }
|
|
51
|
-
*/
|
|
52
|
-
submit(): {
|
|
53
|
-
data: Data;
|
|
54
|
-
errors: Errors;
|
|
55
|
-
};
|
|
56
|
-
reset(): void;
|
|
57
|
-
/**
|
|
58
|
-
* @returns {Errors}
|
|
59
|
-
*/
|
|
60
|
-
validate(): Errors;
|
|
61
|
-
/**
|
|
62
|
-
* @param {Element|string} parentNode
|
|
63
|
-
*/
|
|
64
|
-
attachTo(parentNode: Element | string): void;
|
|
65
|
-
detach(): void;
|
|
66
|
-
/**
|
|
67
|
-
* @private
|
|
68
|
-
*
|
|
69
|
-
* @param {boolean} [emit]
|
|
70
|
-
*/
|
|
71
|
-
private _detach;
|
|
72
|
-
/**
|
|
73
|
-
* @param {FormProperty} property
|
|
74
|
-
* @param {any} value
|
|
75
|
-
*/
|
|
76
|
-
setProperty(property: FormProperty, value: any): void;
|
|
77
|
-
/**
|
|
78
|
-
* @param {FormEvent} type
|
|
79
|
-
* @param {Function} handler
|
|
80
|
-
*/
|
|
81
|
-
off(type: FormEvent, handler: Function): void;
|
|
82
|
-
/**
|
|
83
|
-
* @private
|
|
84
|
-
*
|
|
85
|
-
* @param {FormOptions} options
|
|
86
|
-
* @param {Element} container
|
|
87
|
-
*
|
|
88
|
-
* @returns {Injector}
|
|
89
|
-
*/
|
|
90
|
-
private _createInjector;
|
|
91
|
-
/**
|
|
92
|
-
* @private
|
|
93
|
-
*/
|
|
94
|
-
private _emit;
|
|
95
|
-
/**
|
|
96
|
-
* @internal
|
|
97
|
-
*
|
|
98
|
-
* @param { { add?: boolean, field: any, remove?: number, value?: any } } update
|
|
99
|
-
*/
|
|
100
|
-
_update(update: {
|
|
101
|
-
add?: boolean;
|
|
102
|
-
field: any;
|
|
103
|
-
remove?: number;
|
|
104
|
-
value?: any;
|
|
105
|
-
}): void;
|
|
106
|
-
/**
|
|
107
|
-
* @internal
|
|
108
|
-
*/
|
|
109
|
-
_getState(): State;
|
|
110
|
-
/**
|
|
111
|
-
* @internal
|
|
112
|
-
*/
|
|
113
|
-
_setState(state: any): void;
|
|
114
|
-
/**
|
|
115
|
-
* @internal
|
|
116
|
-
*/
|
|
117
|
-
_onEvent(type: any, priority: any, handler: any): void;
|
|
118
|
-
}
|
|
119
|
-
export type Injector = import('./types').Injector;
|
|
120
|
-
export type Data = import('./types').Data;
|
|
121
|
-
export type Errors = import('./types').Errors;
|
|
122
|
-
export type Schema = import('./types').Schema;
|
|
123
|
-
export type FormProperties = import('./types').FormProperties;
|
|
124
|
-
export type FormProperty = import('./types').FormProperty;
|
|
125
|
-
export type FormEvent = import('./types').FormEvent;
|
|
126
|
-
export type FormOptions = import('./types').FormOptions;
|
|
127
|
-
export type State = {
|
|
128
|
-
data: Data;
|
|
129
|
-
initialData: Data;
|
|
130
|
-
errors: Errors;
|
|
131
|
-
properties: FormProperties;
|
|
132
|
-
schema: Schema;
|
|
133
|
-
};
|
|
134
|
-
export type OnEventWithPriority = OnEventWithPriority;
|
|
135
|
-
export type OnEventWithOutPriority = OnEventWithOutPriority;
|
|
136
|
-
export type OnEventType = OnEventWithPriority & OnEventWithOutPriority;
|
|
1
|
+
/**
|
|
2
|
+
* The form.
|
|
3
|
+
*/
|
|
4
|
+
export default class Form {
|
|
5
|
+
/**
|
|
6
|
+
* @constructor
|
|
7
|
+
* @param {FormOptions} options
|
|
8
|
+
*/
|
|
9
|
+
constructor(options?: FormOptions);
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
* @type {OnEventType}
|
|
13
|
+
*/
|
|
14
|
+
public on: OnEventType;
|
|
15
|
+
/**
|
|
16
|
+
* @public
|
|
17
|
+
* @type {String}
|
|
18
|
+
*/
|
|
19
|
+
public _id: string;
|
|
20
|
+
/**
|
|
21
|
+
* @private
|
|
22
|
+
* @type {Element}
|
|
23
|
+
*/
|
|
24
|
+
private _container;
|
|
25
|
+
/**
|
|
26
|
+
* @private
|
|
27
|
+
* @type {State}
|
|
28
|
+
*/
|
|
29
|
+
private _state;
|
|
30
|
+
get: <T>(name: string, strict?: boolean) => T;
|
|
31
|
+
invoke: <T_1>(func: (...args: unknown[]) => T_1, context: unknown, locals: import("didi").LocalsMap) => T_1;
|
|
32
|
+
clear(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Destroy the form, removing it from DOM,
|
|
35
|
+
* if attached.
|
|
36
|
+
*/
|
|
37
|
+
destroy(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Open a form schema with the given initial data.
|
|
40
|
+
*
|
|
41
|
+
* @param {Schema} schema
|
|
42
|
+
* @param {Data} [data]
|
|
43
|
+
*
|
|
44
|
+
* @return Promise<{ warnings: Array<any> }>
|
|
45
|
+
*/
|
|
46
|
+
importSchema(schema: Schema, data?: Data): Promise<any>;
|
|
47
|
+
/**
|
|
48
|
+
* Submit the form, triggering all field validations.
|
|
49
|
+
*
|
|
50
|
+
* @returns { { data: Data, errors: Errors } }
|
|
51
|
+
*/
|
|
52
|
+
submit(): {
|
|
53
|
+
data: Data;
|
|
54
|
+
errors: Errors;
|
|
55
|
+
};
|
|
56
|
+
reset(): void;
|
|
57
|
+
/**
|
|
58
|
+
* @returns {Errors}
|
|
59
|
+
*/
|
|
60
|
+
validate(): Errors;
|
|
61
|
+
/**
|
|
62
|
+
* @param {Element|string} parentNode
|
|
63
|
+
*/
|
|
64
|
+
attachTo(parentNode: Element | string): void;
|
|
65
|
+
detach(): void;
|
|
66
|
+
/**
|
|
67
|
+
* @private
|
|
68
|
+
*
|
|
69
|
+
* @param {boolean} [emit]
|
|
70
|
+
*/
|
|
71
|
+
private _detach;
|
|
72
|
+
/**
|
|
73
|
+
* @param {FormProperty} property
|
|
74
|
+
* @param {any} value
|
|
75
|
+
*/
|
|
76
|
+
setProperty(property: FormProperty, value: any): void;
|
|
77
|
+
/**
|
|
78
|
+
* @param {FormEvent} type
|
|
79
|
+
* @param {Function} handler
|
|
80
|
+
*/
|
|
81
|
+
off(type: FormEvent, handler: Function): void;
|
|
82
|
+
/**
|
|
83
|
+
* @private
|
|
84
|
+
*
|
|
85
|
+
* @param {FormOptions} options
|
|
86
|
+
* @param {Element} container
|
|
87
|
+
*
|
|
88
|
+
* @returns {Injector}
|
|
89
|
+
*/
|
|
90
|
+
private _createInjector;
|
|
91
|
+
/**
|
|
92
|
+
* @private
|
|
93
|
+
*/
|
|
94
|
+
private _emit;
|
|
95
|
+
/**
|
|
96
|
+
* @internal
|
|
97
|
+
*
|
|
98
|
+
* @param { { add?: boolean, field: any, remove?: number, value?: any } } update
|
|
99
|
+
*/
|
|
100
|
+
_update(update: {
|
|
101
|
+
add?: boolean;
|
|
102
|
+
field: any;
|
|
103
|
+
remove?: number;
|
|
104
|
+
value?: any;
|
|
105
|
+
}): void;
|
|
106
|
+
/**
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
_getState(): State;
|
|
110
|
+
/**
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
_setState(state: any): void;
|
|
114
|
+
/**
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
_onEvent(type: any, priority: any, handler: any): void;
|
|
118
|
+
}
|
|
119
|
+
export type Injector = import('./types').Injector;
|
|
120
|
+
export type Data = import('./types').Data;
|
|
121
|
+
export type Errors = import('./types').Errors;
|
|
122
|
+
export type Schema = import('./types').Schema;
|
|
123
|
+
export type FormProperties = import('./types').FormProperties;
|
|
124
|
+
export type FormProperty = import('./types').FormProperty;
|
|
125
|
+
export type FormEvent = import('./types').FormEvent;
|
|
126
|
+
export type FormOptions = import('./types').FormOptions;
|
|
127
|
+
export type State = {
|
|
128
|
+
data: Data;
|
|
129
|
+
initialData: Data;
|
|
130
|
+
errors: Errors;
|
|
131
|
+
properties: FormProperties;
|
|
132
|
+
schema: Schema;
|
|
133
|
+
};
|
|
134
|
+
export type OnEventWithPriority = OnEventWithPriority;
|
|
135
|
+
export type OnEventWithOutPriority = OnEventWithOutPriority;
|
|
136
|
+
export type OnEventType = OnEventWithPriority & OnEventWithOutPriority;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
declare class FormFieldRegistry {
|
|
2
|
-
constructor(eventBus: any);
|
|
3
|
-
_eventBus: any;
|
|
4
|
-
_formFields: {};
|
|
5
|
-
_ids: any;
|
|
6
|
-
_keys: any;
|
|
7
|
-
add(formField: any): void;
|
|
8
|
-
remove(formField: any): void;
|
|
9
|
-
get(id: any): any;
|
|
10
|
-
getAll(): any[];
|
|
11
|
-
forEach(callback: any): void;
|
|
12
|
-
clear(): void;
|
|
13
|
-
}
|
|
14
|
-
declare namespace FormFieldRegistry {
|
|
15
|
-
const $inject: string[];
|
|
16
|
-
}
|
|
17
|
-
export default FormFieldRegistry;
|
|
1
|
+
declare class FormFieldRegistry {
|
|
2
|
+
constructor(eventBus: any);
|
|
3
|
+
_eventBus: any;
|
|
4
|
+
_formFields: {};
|
|
5
|
+
_ids: any;
|
|
6
|
+
_keys: any;
|
|
7
|
+
add(formField: any): void;
|
|
8
|
+
remove(formField: any): void;
|
|
9
|
+
get(id: any): any;
|
|
10
|
+
getAll(): any[];
|
|
11
|
+
forEach(callback: any): void;
|
|
12
|
+
clear(): void;
|
|
13
|
+
}
|
|
14
|
+
declare namespace FormFieldRegistry {
|
|
15
|
+
const $inject: string[];
|
|
16
|
+
}
|
|
17
|
+
export default FormFieldRegistry;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare class Validator {
|
|
2
|
-
validateField(field: any, value: any): any[];
|
|
3
|
-
}
|
|
4
|
-
declare namespace Validator {
|
|
5
|
-
const $inject: any[];
|
|
6
|
-
}
|
|
7
|
-
export default Validator;
|
|
1
|
+
declare class Validator {
|
|
2
|
+
validateField(field: any, value: any): any[];
|
|
3
|
+
}
|
|
4
|
+
declare namespace Validator {
|
|
5
|
+
const $inject: any[];
|
|
6
|
+
}
|
|
7
|
+
export default Validator;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export { FormFieldRegistry };
|
|
2
|
-
declare namespace _default {
|
|
3
|
-
const __depends__: ({
|
|
4
|
-
importer: (string | typeof import("../import/Importer").default)[];
|
|
5
|
-
} | {
|
|
6
|
-
__init__: string[];
|
|
7
|
-
formFields: (string | typeof import("../render").FormFields)[];
|
|
8
|
-
renderer: (string | typeof import("../render/Renderer").default)[];
|
|
9
|
-
})[];
|
|
10
|
-
const eventBus: any[];
|
|
11
|
-
const formFieldRegistry: (string | typeof FormFieldRegistry)[];
|
|
12
|
-
const validator: (string | typeof Validator)[];
|
|
13
|
-
}
|
|
14
|
-
export default _default;
|
|
15
|
-
import FormFieldRegistry from "./FormFieldRegistry";
|
|
16
|
-
import Validator from "./Validator";
|
|
1
|
+
export { FormFieldRegistry };
|
|
2
|
+
declare namespace _default {
|
|
3
|
+
const __depends__: ({
|
|
4
|
+
importer: (string | typeof import("../import/Importer").default)[];
|
|
5
|
+
} | {
|
|
6
|
+
__init__: string[];
|
|
7
|
+
formFields: (string | typeof import("../render").FormFields)[];
|
|
8
|
+
renderer: (string | typeof import("../render/Renderer").default)[];
|
|
9
|
+
})[];
|
|
10
|
+
const eventBus: any[];
|
|
11
|
+
const formFieldRegistry: (string | typeof FormFieldRegistry)[];
|
|
12
|
+
const validator: (string | typeof Validator)[];
|
|
13
|
+
}
|
|
14
|
+
export default _default;
|
|
15
|
+
import FormFieldRegistry from "./FormFieldRegistry";
|
|
16
|
+
import Validator from "./Validator";
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
declare class Importer {
|
|
2
|
-
/**
|
|
3
|
-
* @constructor
|
|
4
|
-
* @param { import('../core').FormFieldRegistry } formFieldRegistry
|
|
5
|
-
* @param { import('../render/FormFields').default } formFields
|
|
6
|
-
*/
|
|
7
|
-
constructor(formFieldRegistry: import('../core').FormFieldRegistry, formFields: import('../render/FormFields').default);
|
|
8
|
-
_formFieldRegistry: import("../core").FormFieldRegistry;
|
|
9
|
-
_formFields: import("../render/FormFields").default;
|
|
10
|
-
/**
|
|
11
|
-
* Import schema adding `id`, `_parent` and `_path`
|
|
12
|
-
* information to each field and adding it to the
|
|
13
|
-
* form field registry.
|
|
14
|
-
*
|
|
15
|
-
* @param {any} schema
|
|
16
|
-
* @param {any} [data]
|
|
17
|
-
*
|
|
18
|
-
* @return { { warnings: Array<any>, schema: any, data: any } }
|
|
19
|
-
*/
|
|
20
|
-
importSchema(schema: any, data?: any): {
|
|
21
|
-
warnings: Array<any>;
|
|
22
|
-
schema: any;
|
|
23
|
-
data: any;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* @param {any} formField
|
|
27
|
-
* @param {string} [parentId]
|
|
28
|
-
*
|
|
29
|
-
* @return {any} importedField
|
|
30
|
-
*/
|
|
31
|
-
importFormField(formField: any, parentId?: string): any;
|
|
32
|
-
importFormFields(components: any, parentId: any): void;
|
|
33
|
-
/**
|
|
34
|
-
* @param {Object} data
|
|
35
|
-
*
|
|
36
|
-
* @return {Object} importedData
|
|
37
|
-
*/
|
|
38
|
-
importData(data: any): any;
|
|
39
|
-
}
|
|
40
|
-
declare namespace Importer {
|
|
41
|
-
const $inject: string[];
|
|
42
|
-
}
|
|
43
|
-
export default Importer;
|
|
1
|
+
declare class Importer {
|
|
2
|
+
/**
|
|
3
|
+
* @constructor
|
|
4
|
+
* @param { import('../core').FormFieldRegistry } formFieldRegistry
|
|
5
|
+
* @param { import('../render/FormFields').default } formFields
|
|
6
|
+
*/
|
|
7
|
+
constructor(formFieldRegistry: import('../core').FormFieldRegistry, formFields: import('../render/FormFields').default);
|
|
8
|
+
_formFieldRegistry: import("../core").FormFieldRegistry;
|
|
9
|
+
_formFields: import("../render/FormFields").default;
|
|
10
|
+
/**
|
|
11
|
+
* Import schema adding `id`, `_parent` and `_path`
|
|
12
|
+
* information to each field and adding it to the
|
|
13
|
+
* form field registry.
|
|
14
|
+
*
|
|
15
|
+
* @param {any} schema
|
|
16
|
+
* @param {any} [data]
|
|
17
|
+
*
|
|
18
|
+
* @return { { warnings: Array<any>, schema: any, data: any } }
|
|
19
|
+
*/
|
|
20
|
+
importSchema(schema: any, data?: any): {
|
|
21
|
+
warnings: Array<any>;
|
|
22
|
+
schema: any;
|
|
23
|
+
data: any;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* @param {any} formField
|
|
27
|
+
* @param {string} [parentId]
|
|
28
|
+
*
|
|
29
|
+
* @return {any} importedField
|
|
30
|
+
*/
|
|
31
|
+
importFormField(formField: any, parentId?: string): any;
|
|
32
|
+
importFormFields(components: any, parentId: any): void;
|
|
33
|
+
/**
|
|
34
|
+
* @param {Object} data
|
|
35
|
+
*
|
|
36
|
+
* @return {Object} importedData
|
|
37
|
+
*/
|
|
38
|
+
importData(data: any): any;
|
|
39
|
+
}
|
|
40
|
+
declare namespace Importer {
|
|
41
|
+
const $inject: string[];
|
|
42
|
+
}
|
|
43
|
+
export default Importer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare namespace _default {
|
|
2
|
-
const importer: (string | typeof Importer)[];
|
|
3
|
-
}
|
|
4
|
-
export default _default;
|
|
5
|
-
import Importer from "./Importer";
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
const importer: (string | typeof Importer)[];
|
|
3
|
+
}
|
|
4
|
+
export default _default;
|
|
5
|
+
import Importer from "./Importer";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef { import('./types').CreateFormOptions } CreateFormOptions
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Create a form.
|
|
6
|
-
*
|
|
7
|
-
* @param {CreateFormOptions} options
|
|
8
|
-
*
|
|
9
|
-
* @return {Promise<Form>}
|
|
10
|
-
*/
|
|
11
|
-
export function createForm(options: CreateFormOptions): Promise<Form>;
|
|
12
|
-
export { FormFieldRegistry } from "./core";
|
|
13
|
-
export * from "./render";
|
|
14
|
-
export * from "./util";
|
|
15
|
-
export type CreateFormOptions = import('./types').CreateFormOptions;
|
|
16
|
-
import Form from "./Form";
|
|
17
|
-
export const schemaVersion: 5;
|
|
18
|
-
export { Form };
|
|
1
|
+
/**
|
|
2
|
+
* @typedef { import('./types').CreateFormOptions } CreateFormOptions
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Create a form.
|
|
6
|
+
*
|
|
7
|
+
* @param {CreateFormOptions} options
|
|
8
|
+
*
|
|
9
|
+
* @return {Promise<Form>}
|
|
10
|
+
*/
|
|
11
|
+
export function createForm(options: CreateFormOptions): Promise<Form>;
|
|
12
|
+
export { FormFieldRegistry } from "./core";
|
|
13
|
+
export * from "./render";
|
|
14
|
+
export * from "./util";
|
|
15
|
+
export type CreateFormOptions = import('./types').CreateFormOptions;
|
|
16
|
+
import Form from "./Form";
|
|
17
|
+
export const schemaVersion: 5;
|
|
18
|
+
export { Form };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export default class FormFields {
|
|
2
|
-
_formFields: {};
|
|
3
|
-
register(type: any, formField: any): void;
|
|
4
|
-
get(type: any): any;
|
|
5
|
-
}
|
|
1
|
+
export default class FormFields {
|
|
2
|
+
_formFields: {};
|
|
3
|
+
register(type: any, formField: any): void;
|
|
4
|
+
get(type: any): any;
|
|
5
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef { { container } } Config
|
|
3
|
-
* @typedef { import('didi').Injector } Injector
|
|
4
|
-
* @typedef { import('../core/EventBus').default } EventBus
|
|
5
|
-
* @typedef { import('../Form').default } Form
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* @param {Config} config
|
|
9
|
-
* @param {EventBus} eventBus
|
|
10
|
-
* @param {Form} form
|
|
11
|
-
* @param {Injector} injector
|
|
12
|
-
*/
|
|
13
|
-
declare function Renderer(config: Config, eventBus: any, form: Form, injector: Injector): void;
|
|
14
|
-
declare namespace Renderer {
|
|
15
|
-
const $inject: string[];
|
|
16
|
-
}
|
|
17
|
-
export default Renderer;
|
|
18
|
-
export type Config = {
|
|
19
|
-
container;
|
|
20
|
-
};
|
|
21
|
-
export type Injector = import('didi').Injector;
|
|
22
|
-
export type EventBus = any;
|
|
23
|
-
export type Form = import('../Form').default;
|
|
1
|
+
/**
|
|
2
|
+
* @typedef { { container } } Config
|
|
3
|
+
* @typedef { import('didi').Injector } Injector
|
|
4
|
+
* @typedef { import('../core/EventBus').default } EventBus
|
|
5
|
+
* @typedef { import('../Form').default } Form
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* @param {Config} config
|
|
9
|
+
* @param {EventBus} eventBus
|
|
10
|
+
* @param {Form} form
|
|
11
|
+
* @param {Injector} injector
|
|
12
|
+
*/
|
|
13
|
+
declare function Renderer(config: Config, eventBus: any, form: Form, injector: Injector): void;
|
|
14
|
+
declare namespace Renderer {
|
|
15
|
+
const $inject: string[];
|
|
16
|
+
}
|
|
17
|
+
export default Renderer;
|
|
18
|
+
export type Config = {
|
|
19
|
+
container;
|
|
20
|
+
};
|
|
21
|
+
export type Injector = import('didi').Injector;
|
|
22
|
+
export type EventBus = any;
|
|
23
|
+
export type Form = import('../Form').default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function Description(props: any): import("preact").JSX.Element;
|
|
1
|
+
export default function Description(props: any): import("preact").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function Errors(props: any): import("preact").JSX.Element;
|
|
1
|
+
export default function Errors(props: any): import("preact").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function FormComponent(props: any): import("preact").JSX.Element;
|
|
1
|
+
export default function FormComponent(props: any): import("preact").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function FormField(props: any): import("preact").JSX.Element;
|
|
1
|
+
export default function FormField(props: any): import("preact").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function Label(props: any): import("preact").JSX.Element;
|
|
1
|
+
export default function Label(props: any): import("preact").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function PoweredBy(props: any): import("preact").JSX.Element;
|
|
1
|
+
export default function PoweredBy(props: any): import("preact").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sanitize a HTML string and return the cleaned, safe version.
|
|
3
|
-
*
|
|
4
|
-
* @param {string} html
|
|
5
|
-
* @return {string}
|
|
6
|
-
*/
|
|
7
|
-
export function sanitizeHTML(html: string): string;
|
|
1
|
+
/**
|
|
2
|
+
* Sanitize a HTML string and return the cleaned, safe version.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} html
|
|
5
|
+
* @return {string}
|
|
6
|
+
*/
|
|
7
|
+
export function sanitizeHTML(html: string): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export function formFieldClasses(type: any, errors?: any[]): string;
|
|
2
|
-
export function prefixId(id: any, formId: any): string;
|
|
3
|
-
export function markdownToHTML(markdown: any): any;
|
|
4
|
-
export function safeMarkdown(markdown: any): string;
|
|
5
|
-
export function sanitizeSingleSelectValue(options: any): any;
|
|
6
|
-
export function sanitizeMultiSelectValue(options: any): any;
|
|
1
|
+
export function formFieldClasses(type: any, errors?: any[]): string;
|
|
2
|
+
export function prefixId(id: any, formId: any): string;
|
|
3
|
+
export function markdownToHTML(markdown: any): any;
|
|
4
|
+
export function safeMarkdown(markdown: any): string;
|
|
5
|
+
export function sanitizeSingleSelectValue(options: any): any;
|
|
6
|
+
export function sanitizeMultiSelectValue(options: any): any;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
declare function Button(props: any): import("preact").JSX.Element;
|
|
2
|
-
declare namespace Button {
|
|
3
|
-
export function create(options?: {}): {
|
|
4
|
-
action: string;
|
|
5
|
-
};
|
|
6
|
-
export { type };
|
|
7
|
-
export const label: string;
|
|
8
|
-
export const keyed: boolean;
|
|
9
|
-
}
|
|
10
|
-
export default Button;
|
|
11
|
-
declare const type: "button";
|
|
1
|
+
declare function Button(props: any): import("preact").JSX.Element;
|
|
2
|
+
declare namespace Button {
|
|
3
|
+
export function create(options?: {}): {
|
|
4
|
+
action: string;
|
|
5
|
+
};
|
|
6
|
+
export { type };
|
|
7
|
+
export const label: string;
|
|
8
|
+
export const keyed: boolean;
|
|
9
|
+
}
|
|
10
|
+
export default Button;
|
|
11
|
+
declare const type: "button";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
declare function Checkbox(props: any): import("preact").JSX.Element;
|
|
2
|
-
declare namespace Checkbox {
|
|
3
|
-
export function create(options?: {}): {};
|
|
4
|
-
export { type };
|
|
5
|
-
export const label: string;
|
|
6
|
-
export const keyed: boolean;
|
|
7
|
-
export const emptyValue: boolean;
|
|
8
|
-
export function sanitizeValue({ value }: {
|
|
9
|
-
value: any;
|
|
10
|
-
}): boolean;
|
|
11
|
-
}
|
|
12
|
-
export default Checkbox;
|
|
13
|
-
declare const type: "checkbox";
|
|
1
|
+
declare function Checkbox(props: any): import("preact").JSX.Element;
|
|
2
|
+
declare namespace Checkbox {
|
|
3
|
+
export function create(options?: {}): {};
|
|
4
|
+
export { type };
|
|
5
|
+
export const label: string;
|
|
6
|
+
export const keyed: boolean;
|
|
7
|
+
export const emptyValue: boolean;
|
|
8
|
+
export function sanitizeValue({ value }: {
|
|
9
|
+
value: any;
|
|
10
|
+
}): boolean;
|
|
11
|
+
}
|
|
12
|
+
export default Checkbox;
|
|
13
|
+
declare const type: "checkbox";
|
|
@@ -1,12 +1,12 @@
|
|
|
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
|
-
export { sanitizeMultiSelectValue as sanitizeValue };
|
|
9
|
-
}
|
|
10
|
-
export default Checklist;
|
|
11
|
-
declare const type: "checklist";
|
|
12
|
-
import { sanitizeMultiSelectValue } from "../Util";
|
|
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
|
+
export { sanitizeMultiSelectValue as sanitizeValue };
|
|
9
|
+
}
|
|
10
|
+
export default Checklist;
|
|
11
|
+
declare const type: "checklist";
|
|
12
|
+
import { sanitizeMultiSelectValue } from "../Util";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
declare function Default(props: any): import("preact").JSX.Element;
|
|
2
|
-
declare namespace Default {
|
|
3
|
-
function create(options?: {}): {
|
|
4
|
-
components: any[];
|
|
5
|
-
};
|
|
6
|
-
const type: string;
|
|
7
|
-
const keyed: boolean;
|
|
8
|
-
}
|
|
9
|
-
export default Default;
|
|
1
|
+
declare function Default(props: any): import("preact").JSX.Element;
|
|
2
|
+
declare namespace Default {
|
|
3
|
+
function create(options?: {}): {
|
|
4
|
+
components: any[];
|
|
5
|
+
};
|
|
6
|
+
const type: string;
|
|
7
|
+
const keyed: boolean;
|
|
8
|
+
}
|
|
9
|
+
export default Default;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
declare function Number(props: any): import("preact").JSX.Element;
|
|
2
|
-
declare namespace Number {
|
|
3
|
-
export function create(options?: {}): {};
|
|
4
|
-
export function sanitizeValue({ value }: {
|
|
5
|
-
value: any;
|
|
6
|
-
}): number;
|
|
7
|
-
export { type };
|
|
8
|
-
export const keyed: boolean;
|
|
9
|
-
export const label: string;
|
|
10
|
-
export const emptyValue: any;
|
|
11
|
-
}
|
|
12
|
-
export default Number;
|
|
13
|
-
declare const type: "number";
|
|
1
|
+
declare function Number(props: any): import("preact").JSX.Element;
|
|
2
|
+
declare namespace Number {
|
|
3
|
+
export function create(options?: {}): {};
|
|
4
|
+
export function sanitizeValue({ value }: {
|
|
5
|
+
value: any;
|
|
6
|
+
}): number;
|
|
7
|
+
export { type };
|
|
8
|
+
export const keyed: boolean;
|
|
9
|
+
export const label: string;
|
|
10
|
+
export const emptyValue: any;
|
|
11
|
+
}
|
|
12
|
+
export default Number;
|
|
13
|
+
declare const type: "number";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
declare function Radio(props: any): import("preact").JSX.Element;
|
|
2
|
-
declare namespace Radio {
|
|
3
|
-
export function create(options?: {}): {};
|
|
4
|
-
export { type };
|
|
5
|
-
export const label: string;
|
|
6
|
-
export const keyed: boolean;
|
|
7
|
-
export const emptyValue: any;
|
|
8
|
-
export { sanitizeSingleSelectValue as sanitizeValue };
|
|
9
|
-
}
|
|
10
|
-
export default Radio;
|
|
11
|
-
declare const type: "radio";
|
|
12
|
-
import { sanitizeSingleSelectValue } from "../Util";
|
|
1
|
+
declare function Radio(props: any): import("preact").JSX.Element;
|
|
2
|
+
declare namespace Radio {
|
|
3
|
+
export function create(options?: {}): {};
|
|
4
|
+
export { type };
|
|
5
|
+
export const label: string;
|
|
6
|
+
export const keyed: boolean;
|
|
7
|
+
export const emptyValue: any;
|
|
8
|
+
export { sanitizeSingleSelectValue as sanitizeValue };
|
|
9
|
+
}
|
|
10
|
+
export default Radio;
|
|
11
|
+
declare const type: "radio";
|
|
12
|
+
import { sanitizeSingleSelectValue } from "../Util";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
declare function Select(props: any): import("preact").JSX.Element;
|
|
2
|
-
declare namespace Select {
|
|
3
|
-
export function create(options?: {}): {};
|
|
4
|
-
export { type };
|
|
5
|
-
export const label: string;
|
|
6
|
-
export const keyed: boolean;
|
|
7
|
-
export const emptyValue: any;
|
|
8
|
-
export { sanitizeSingleSelectValue as sanitizeValue };
|
|
9
|
-
}
|
|
10
|
-
export default Select;
|
|
11
|
-
declare const type: "select";
|
|
12
|
-
import { sanitizeSingleSelectValue } from "../Util";
|
|
1
|
+
declare function Select(props: any): import("preact").JSX.Element;
|
|
2
|
+
declare namespace Select {
|
|
3
|
+
export function create(options?: {}): {};
|
|
4
|
+
export { type };
|
|
5
|
+
export const label: string;
|
|
6
|
+
export const keyed: boolean;
|
|
7
|
+
export const emptyValue: any;
|
|
8
|
+
export { sanitizeSingleSelectValue as sanitizeValue };
|
|
9
|
+
}
|
|
10
|
+
export default Select;
|
|
11
|
+
declare const type: "select";
|
|
12
|
+
import { sanitizeSingleSelectValue } from "../Util";
|
|
@@ -1,12 +1,12 @@
|
|
|
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
|
-
export { sanitizeMultiSelectValue as sanitizeValue };
|
|
9
|
-
}
|
|
10
|
-
export default Taglist;
|
|
11
|
-
declare const type: "taglist";
|
|
12
|
-
import { sanitizeMultiSelectValue } from "../Util";
|
|
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
|
+
export { sanitizeMultiSelectValue as sanitizeValue };
|
|
9
|
+
}
|
|
10
|
+
export default Taglist;
|
|
11
|
+
declare const type: "taglist";
|
|
12
|
+
import { sanitizeMultiSelectValue } from "../Util";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
declare function Text(props: any): import("preact").JSX.Element;
|
|
2
|
-
declare namespace Text {
|
|
3
|
-
export function create(options?: {}): {
|
|
4
|
-
text: string;
|
|
5
|
-
};
|
|
6
|
-
export { type };
|
|
7
|
-
export const keyed: boolean;
|
|
8
|
-
}
|
|
9
|
-
export default Text;
|
|
10
|
-
declare const type: "text";
|
|
1
|
+
declare function Text(props: any): import("preact").JSX.Element;
|
|
2
|
+
declare namespace Text {
|
|
3
|
+
export function create(options?: {}): {
|
|
4
|
+
text: string;
|
|
5
|
+
};
|
|
6
|
+
export { type };
|
|
7
|
+
export const keyed: boolean;
|
|
8
|
+
}
|
|
9
|
+
export default Text;
|
|
10
|
+
declare const type: "text";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
declare function Textfield(props: any): import("preact").JSX.Element;
|
|
2
|
-
declare namespace Textfield {
|
|
3
|
-
export function create(options?: {}): {};
|
|
4
|
-
export { type };
|
|
5
|
-
export const label: string;
|
|
6
|
-
export const keyed: boolean;
|
|
7
|
-
export const emptyValue: string;
|
|
8
|
-
export function sanitizeValue({ value }: {
|
|
9
|
-
value: any;
|
|
10
|
-
}): string;
|
|
11
|
-
}
|
|
12
|
-
export default Textfield;
|
|
13
|
-
declare const type: "textfield";
|
|
1
|
+
declare function Textfield(props: any): import("preact").JSX.Element;
|
|
2
|
+
declare namespace Textfield {
|
|
3
|
+
export function create(options?: {}): {};
|
|
4
|
+
export { type };
|
|
5
|
+
export const label: string;
|
|
6
|
+
export const keyed: boolean;
|
|
7
|
+
export const emptyValue: string;
|
|
8
|
+
export function sanitizeValue({ value }: {
|
|
9
|
+
value: any;
|
|
10
|
+
}): string;
|
|
11
|
+
}
|
|
12
|
+
export default Textfield;
|
|
13
|
+
declare const type: "textfield";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function DropdownList(props: any): import("preact").JSX.Element;
|
|
1
|
+
export default function DropdownList(props: any): import("preact").JSX.Element;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export const formFields: (typeof Button | typeof Default | typeof Radio | typeof Text)[];
|
|
2
|
-
import Button from "./form-fields/Button";
|
|
3
|
-
import Checkbox from "./form-fields/Checkbox";
|
|
4
|
-
import Checklist from "./form-fields/Checklist";
|
|
5
|
-
import Default from "./form-fields/Default";
|
|
6
|
-
import FormComponent from "./FormComponent";
|
|
7
|
-
import Number from "./form-fields/Number";
|
|
8
|
-
import Radio from "./form-fields/Radio";
|
|
9
|
-
import Select from "./form-fields/Select";
|
|
10
|
-
import Taglist from "./form-fields/Taglist";
|
|
11
|
-
import Text from "./form-fields/Text";
|
|
12
|
-
import Textfield from "./form-fields/Textfield";
|
|
13
|
-
export { Button, Checkbox, Checklist, Default, FormComponent, Number, Radio, Select, Taglist, Text, Textfield };
|
|
1
|
+
export const formFields: (typeof Button | typeof Default | typeof Radio | typeof Text)[];
|
|
2
|
+
import Button from "./form-fields/Button";
|
|
3
|
+
import Checkbox from "./form-fields/Checkbox";
|
|
4
|
+
import Checklist from "./form-fields/Checklist";
|
|
5
|
+
import Default from "./form-fields/Default";
|
|
6
|
+
import FormComponent from "./FormComponent";
|
|
7
|
+
import Number from "./form-fields/Number";
|
|
8
|
+
import Radio from "./form-fields/Radio";
|
|
9
|
+
import Select from "./form-fields/Select";
|
|
10
|
+
import Taglist from "./form-fields/Taglist";
|
|
11
|
+
import Text from "./form-fields/Text";
|
|
12
|
+
import Textfield from "./form-fields/Textfield";
|
|
13
|
+
export { Button, Checkbox, Checklist, Default, FormComponent, Number, Radio, Select, Taglist, Text, Textfield };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export default FormContext;
|
|
2
|
-
declare const FormContext: import("preact").Context<{
|
|
3
|
-
getService: typeof getService;
|
|
4
|
-
formId: any;
|
|
5
|
-
}>;
|
|
6
|
-
/**
|
|
7
|
-
* @param {string} type
|
|
8
|
-
* @param {boolean} [strict]
|
|
9
|
-
*
|
|
10
|
-
* @returns {any}
|
|
11
|
-
*/
|
|
12
|
-
declare function getService(type: string, strict?: boolean): any;
|
|
1
|
+
export default FormContext;
|
|
2
|
+
declare const FormContext: import("preact").Context<{
|
|
3
|
+
getService: typeof getService;
|
|
4
|
+
formId: any;
|
|
5
|
+
}>;
|
|
6
|
+
/**
|
|
7
|
+
* @param {string} type
|
|
8
|
+
* @param {boolean} [strict]
|
|
9
|
+
*
|
|
10
|
+
* @returns {any}
|
|
11
|
+
*/
|
|
12
|
+
declare function getService(type: string, strict?: boolean): any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export default FormRenderContext;
|
|
2
|
-
declare const FormRenderContext: import("preact").Context<{
|
|
3
|
-
Empty: (props: any) => any;
|
|
4
|
-
Children: (props: any) => any;
|
|
5
|
-
Element: (props: any) => any;
|
|
6
|
-
}>;
|
|
1
|
+
export default FormRenderContext;
|
|
2
|
+
declare const FormRenderContext: import("preact").Context<{
|
|
3
|
+
Empty: (props: any) => any;
|
|
4
|
+
Children: (props: any) => any;
|
|
5
|
+
Element: (props: any) => any;
|
|
6
|
+
}>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as FormRenderContext } from "./FormRenderContext";
|
|
2
|
-
export { default as FormContext } from "./FormContext";
|
|
1
|
+
export { default as FormRenderContext } from "./FormRenderContext";
|
|
2
|
+
export { default as FormContext } from "./FormContext";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function useKeyDownAction(targetKey: any, action: any, listenerElement?: Window & typeof globalThis): void;
|
|
1
|
+
export default function useKeyDownAction(targetKey: any, action: any, listenerElement?: Window & typeof globalThis): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function _default(type: any, strict: any): any;
|
|
1
|
+
export default function _default(type: any, strict: any): any;
|
|
@@ -1,28 +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
|
-
};
|
|
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
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { FormFields };
|
|
2
|
-
export * from "./components";
|
|
3
|
-
export * from "./context";
|
|
4
|
-
declare namespace _default {
|
|
5
|
-
const __init__: string[];
|
|
6
|
-
const formFields: (string | typeof FormFields)[];
|
|
7
|
-
const renderer: (string | typeof Renderer)[];
|
|
8
|
-
}
|
|
9
|
-
export default _default;
|
|
10
|
-
import FormFields from "./FormFields";
|
|
11
|
-
import Renderer from "./Renderer";
|
|
1
|
+
export { FormFields };
|
|
2
|
+
export * from "./components";
|
|
3
|
+
export * from "./context";
|
|
4
|
+
declare namespace _default {
|
|
5
|
+
const __init__: string[];
|
|
6
|
+
const formFields: (string | typeof FormFields)[];
|
|
7
|
+
const renderer: (string | typeof Renderer)[];
|
|
8
|
+
}
|
|
9
|
+
export default _default;
|
|
10
|
+
import FormFields from "./FormFields";
|
|
11
|
+
import Renderer from "./Renderer";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {string?} prefix
|
|
3
|
-
*
|
|
4
|
-
* @returns Element
|
|
5
|
-
*/
|
|
6
|
-
export function createFormContainer(prefix?: string | null): HTMLDivElement;
|
|
1
|
+
/**
|
|
2
|
+
* @param {string?} prefix
|
|
3
|
+
*
|
|
4
|
+
* @returns Element
|
|
5
|
+
*/
|
|
6
|
+
export function createFormContainer(prefix?: string | null): HTMLDivElement;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export function findErrors(errors: any, path: any): any;
|
|
2
|
-
export function isRequired(field: any): any;
|
|
3
|
-
export function pathParse(path: any): any;
|
|
4
|
-
export function pathsEqual(a: any, b: any): any;
|
|
5
|
-
export function pathStringify(path: any): any;
|
|
6
|
-
export function generateIndexForType(type: any): any;
|
|
7
|
-
export function generateIdForType(type: any): string;
|
|
8
|
-
/**
|
|
9
|
-
* @template T
|
|
10
|
-
* @param {T} data
|
|
11
|
-
* @param {(this: any, key: string, value: any) => any} [replacer]
|
|
12
|
-
* @return {T}
|
|
13
|
-
*/
|
|
14
|
-
export function clone<T>(data: T, replacer?: (this: any, key: string, value: any) => any): T;
|
|
15
|
-
/**
|
|
16
|
-
* Parse the schema for input variables a form might make use of
|
|
17
|
-
*
|
|
18
|
-
* @param {any} schema
|
|
19
|
-
*
|
|
20
|
-
* @return {string[]}
|
|
21
|
-
*/
|
|
22
|
-
export function getSchemaVariables(schema: any): string[];
|
|
23
|
-
export * from "./injector";
|
|
24
|
-
export * from "./form";
|
|
1
|
+
export function findErrors(errors: any, path: any): any;
|
|
2
|
+
export function isRequired(field: any): any;
|
|
3
|
+
export function pathParse(path: any): any;
|
|
4
|
+
export function pathsEqual(a: any, b: any): any;
|
|
5
|
+
export function pathStringify(path: any): any;
|
|
6
|
+
export function generateIndexForType(type: any): any;
|
|
7
|
+
export function generateIdForType(type: any): string;
|
|
8
|
+
/**
|
|
9
|
+
* @template T
|
|
10
|
+
* @param {T} data
|
|
11
|
+
* @param {(this: any, key: string, value: any) => any} [replacer]
|
|
12
|
+
* @return {T}
|
|
13
|
+
*/
|
|
14
|
+
export function clone<T>(data: T, replacer?: (this: any, key: string, value: any) => any): T;
|
|
15
|
+
/**
|
|
16
|
+
* Parse the schema for input variables a form might make use of
|
|
17
|
+
*
|
|
18
|
+
* @param {any} schema
|
|
19
|
+
*
|
|
20
|
+
* @return {string[]}
|
|
21
|
+
*/
|
|
22
|
+
export function getSchemaVariables(schema: any): string[];
|
|
23
|
+
export * from "./injector";
|
|
24
|
+
export * from "./form";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function createInjector(bootstrapModules: any): Injector;
|
|
2
|
-
import { Injector } from "didi";
|
|
1
|
+
export function createInjector(bootstrapModules: any): Injector;
|
|
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": "0.9.
|
|
3
|
+
"version": "0.9.8",
|
|
4
4
|
"description": "View forms - powered by bpmn.io",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"classnames": "^2.3.1",
|
|
43
43
|
"didi": "^9.0.0",
|
|
44
44
|
"ids": "^1.0.0",
|
|
45
|
-
"min-dash": "^
|
|
45
|
+
"min-dash": "^4.0.0",
|
|
46
46
|
"preact": "^10.5.14",
|
|
47
47
|
"preact-markup": "^2.1.1"
|
|
48
48
|
},
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"files": [
|
|
53
53
|
"dist"
|
|
54
54
|
],
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "357dfcdd0c046494c54e26b35e415e0e688f8f7c"
|
|
56
56
|
}
|