@bpmn-io/form-js-viewer 1.7.0 → 1.7.2
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 +270 -163
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +271 -164
- package/dist/index.es.js.map +1 -1
- package/dist/types/render/components/Label.d.ts +4 -2
- package/dist/types/render/components/index.d.ts +1 -1
- package/dist/types/render/components/util/optionsUtil.d.ts +24 -8
- package/dist/types/render/hooks/index.d.ts +1 -1
- package/dist/types/render/hooks/useDeepCompareMemoize.d.ts +8 -0
- package/dist/types/types.d.ts +35 -35
- package/package.json +2 -2
- package/dist/types/render/hooks/useDeepCompareState.d.ts +0 -8
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @typedef Props
|
|
3
|
-
* @property {string} [id]
|
|
3
|
+
* @property {string|undefined} [id]
|
|
4
|
+
* @property {string|undefined} [htmlFor]
|
|
4
5
|
* @property {string|undefined} label
|
|
5
6
|
* @property {string} [class]
|
|
6
7
|
* @property {boolean} [collapseOnEmpty]
|
|
@@ -12,7 +13,8 @@
|
|
|
12
13
|
*/
|
|
13
14
|
export function Label(props: Props): import("preact").JSX.Element;
|
|
14
15
|
export type Props = {
|
|
15
|
-
id?: string;
|
|
16
|
+
id?: string | undefined;
|
|
17
|
+
htmlFor?: string | undefined;
|
|
16
18
|
label: string | undefined;
|
|
17
19
|
class?: string;
|
|
18
20
|
collapseOnEmpty?: boolean;
|
|
@@ -1,8 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Returns the options data for the provided if they can be simply determined, ignoring expression defined options.
|
|
3
|
+
*
|
|
4
|
+
* @param {object} formField
|
|
5
|
+
* @param {object} formData
|
|
6
|
+
*/
|
|
7
|
+
export function getSimpleOptionsData(formField: object, formData: object): any;
|
|
8
|
+
/**
|
|
9
|
+
* Normalizes the provided options data to a format that can be used by the select components.
|
|
10
|
+
* If the options data is not valid, it is filtered out.
|
|
11
|
+
*
|
|
12
|
+
* @param {any[]} optionsData
|
|
13
|
+
*
|
|
14
|
+
* @returns {object[]}
|
|
15
|
+
*/
|
|
16
|
+
export function normalizeOptionsData(optionsData: any[]): object[];
|
|
17
|
+
/**
|
|
18
|
+
* Creates an options object with default values if no options are provided.
|
|
19
|
+
*
|
|
20
|
+
* @param {object} options
|
|
21
|
+
*
|
|
22
|
+
* @returns {object}
|
|
23
|
+
*/
|
|
24
|
+
export function createEmptyOptions(options?: object): object;
|
|
@@ -10,7 +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 {
|
|
13
|
+
export { useDeepCompareMemoize } from "./useDeepCompareMemoize";
|
|
14
14
|
export { useSingleLineTemplateEvaluation } from "./useSingleLineTemplateEvaluation";
|
|
15
15
|
export { useTemplateEvaluation } from "./useTemplateEvaluation";
|
|
16
16
|
export { useCleanupSingleSelectValue } from "./useCleanupSingleSelectValue";
|
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
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmn-io/form-js-viewer",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "View forms - powered by bpmn.io",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"files": [
|
|
65
65
|
"dist"
|
|
66
66
|
],
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "bcedc83096d7db0d89d64b1d6c0faf776d133dab"
|
|
68
68
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A custom hook to manage state changes with deep comparison.
|
|
3
|
-
*
|
|
4
|
-
* @param {any} value - The current value to manage.
|
|
5
|
-
* @param {any} defaultValue - The initial default value for the state.
|
|
6
|
-
* @returns {any} - Returns the current state.
|
|
7
|
-
*/
|
|
8
|
-
export function useDeepCompareState(value: any, defaultValue: any): any;
|