@bpmn-io/form-js-viewer 1.7.1 → 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.
@@ -1,4 +1,4 @@
1
- export const formFields: (typeof Default | typeof Group | typeof Image)[];
1
+ export const formFields: (typeof Default | typeof Group | typeof Image | typeof Radio)[];
2
2
  export * from "./icons";
3
3
  export * from "./Sanitizer";
4
4
  export * from "./util/sanitizerUtil";
@@ -1,8 +1,24 @@
1
- export function getOptionsData(formField: any, formData: any): any;
2
- export function normalizeOptionsData(optionsData: any): any;
3
- export function createEmptyOptions(options?: {}): {
4
- values: {
5
- label: string;
6
- value: string;
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 { useDeepCompareState } from "./useDeepCompareState";
13
+ export { useDeepCompareMemoize } from "./useDeepCompareMemoize";
14
14
  export { useSingleLineTemplateEvaluation } from "./useSingleLineTemplateEvaluation";
15
15
  export { useTemplateEvaluation } from "./useTemplateEvaluation";
16
16
  export { useCleanupSingleSelectValue } from "./useCleanupSingleSelectValue";
@@ -0,0 +1,8 @@
1
+ /**
2
+ * A custom hook to manage state changes with deep comparison.
3
+ *
4
+ * @template T
5
+ * @param {T} value - The current value to manage.
6
+ * @returns {T} - Returns the current state.
7
+ */
8
+ export function useDeepCompareMemoize<T>(value: T): T;
@@ -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.1",
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": "f6ffe2569d2d2f7fe6214ad5bb00b76f1d74ef1a"
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;