@opengov/form-renderer 0.2.13 → 0.2.14-beta.1
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/fields/FormFieldLabel.d.ts +2 -3
- package/dist/lib.js +3703 -3713
- package/dist/lib.umd.cjs +50 -50
- package/dist/renderer/Field.d.ts +2 -1
- package/dist/renderer/context/FormRendererContext.d.ts +1 -105
- package/package.json +2 -2
package/dist/renderer/Field.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { FieldTemplate } from '@opengov/form-utils';
|
|
|
11
11
|
* @param disabled - Whether the field is disabled.
|
|
12
12
|
* @returns A Field component.
|
|
13
13
|
*/
|
|
14
|
-
export default function Field({ id, name, readonly, disabled, wrapper, }: {
|
|
14
|
+
export default function Field({ id, name, readonly, disabled, wrapper, icons, }: {
|
|
15
15
|
id: string;
|
|
16
16
|
name?: string;
|
|
17
17
|
readonly?: boolean;
|
|
@@ -21,4 +21,5 @@ export default function Field({ id, name, readonly, disabled, wrapper, }: {
|
|
|
21
21
|
field: FieldTemplate;
|
|
22
22
|
sx?: SxProps;
|
|
23
23
|
}>;
|
|
24
|
+
icons?: React.ReactNode[];
|
|
24
25
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,110 +11,6 @@ interface FormRendererProviderProps {
|
|
|
11
11
|
}
|
|
12
12
|
export declare const FormRendererProvider: React.FC<FormRendererProviderProps>;
|
|
13
13
|
export declare const useFormRenderer: () => FormRendererContextType;
|
|
14
|
-
export declare const useFieldType: (type?: string) =>
|
|
15
|
-
type: string;
|
|
16
|
-
name: string;
|
|
17
|
-
Icon?: React.ElementType;
|
|
18
|
-
icon?: string;
|
|
19
|
-
groups: import('@opengov/form-utils').ConfigurationGroup<import('react-hook-form').FieldValues>[];
|
|
20
|
-
omitLabelConfiguration?: boolean;
|
|
21
|
-
fullWidth: boolean;
|
|
22
|
-
renderField: ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').FieldConfiguration<import('react-hook-form').FieldValues>, { disabled, readonly, name }: {
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
readonly?: boolean;
|
|
25
|
-
name?: string;
|
|
26
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').TextConfiguration, { disabled, readonly, name }: {
|
|
27
|
-
disabled?: boolean;
|
|
28
|
-
readonly?: boolean;
|
|
29
|
-
name?: string;
|
|
30
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').NumberConfiguration, { disabled, readonly, name }: {
|
|
31
|
-
disabled?: boolean;
|
|
32
|
-
readonly?: boolean;
|
|
33
|
-
name?: string;
|
|
34
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').DateConfiguration, { disabled, readonly, name }: {
|
|
35
|
-
disabled?: boolean;
|
|
36
|
-
readonly?: boolean;
|
|
37
|
-
name?: string;
|
|
38
|
-
}) => JSX.Element);
|
|
39
|
-
} | {
|
|
40
|
-
type: string;
|
|
41
|
-
name: string;
|
|
42
|
-
Icon?: React.ElementType;
|
|
43
|
-
icon?: string;
|
|
44
|
-
groups: import('@opengov/form-utils').ConfigurationGroup<import('react-hook-form').FieldValues>[];
|
|
45
|
-
omitLabelConfiguration?: boolean;
|
|
46
|
-
fullWidth: boolean;
|
|
47
|
-
maxLength: number;
|
|
48
|
-
filter?: (value: string) => string;
|
|
49
|
-
renderField: ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').FieldConfiguration<import('react-hook-form').FieldValues>, { disabled, readonly, name }: {
|
|
50
|
-
disabled?: boolean;
|
|
51
|
-
readonly?: boolean;
|
|
52
|
-
name?: string;
|
|
53
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').TextConfiguration, { disabled, readonly, name }: {
|
|
54
|
-
disabled?: boolean;
|
|
55
|
-
readonly?: boolean;
|
|
56
|
-
name?: string;
|
|
57
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').NumberConfiguration, { disabled, readonly, name }: {
|
|
58
|
-
disabled?: boolean;
|
|
59
|
-
readonly?: boolean;
|
|
60
|
-
name?: string;
|
|
61
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').DateConfiguration, { disabled, readonly, name }: {
|
|
62
|
-
disabled?: boolean;
|
|
63
|
-
readonly?: boolean;
|
|
64
|
-
name?: string;
|
|
65
|
-
}) => JSX.Element);
|
|
66
|
-
} | {
|
|
67
|
-
type: string;
|
|
68
|
-
name: string;
|
|
69
|
-
Icon?: React.ElementType;
|
|
70
|
-
icon?: string;
|
|
71
|
-
groups: import('@opengov/form-utils').ConfigurationGroup<import('react-hook-form').FieldValues>[];
|
|
72
|
-
omitLabelConfiguration?: boolean;
|
|
73
|
-
fullWidth: boolean;
|
|
74
|
-
decimalPlaces: number;
|
|
75
|
-
renderField: ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').FieldConfiguration<import('react-hook-form').FieldValues>, { disabled, readonly, name }: {
|
|
76
|
-
disabled?: boolean;
|
|
77
|
-
readonly?: boolean;
|
|
78
|
-
name?: string;
|
|
79
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').TextConfiguration, { disabled, readonly, name }: {
|
|
80
|
-
disabled?: boolean;
|
|
81
|
-
readonly?: boolean;
|
|
82
|
-
name?: string;
|
|
83
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').NumberConfiguration, { disabled, readonly, name }: {
|
|
84
|
-
disabled?: boolean;
|
|
85
|
-
readonly?: boolean;
|
|
86
|
-
name?: string;
|
|
87
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').DateConfiguration, { disabled, readonly, name }: {
|
|
88
|
-
disabled?: boolean;
|
|
89
|
-
readonly?: boolean;
|
|
90
|
-
name?: string;
|
|
91
|
-
}) => JSX.Element);
|
|
92
|
-
} | {
|
|
93
|
-
type: string;
|
|
94
|
-
name: string;
|
|
95
|
-
Icon?: React.ElementType;
|
|
96
|
-
icon?: string;
|
|
97
|
-
groups: import('@opengov/form-utils').ConfigurationGroup<import('react-hook-form').FieldValues>[];
|
|
98
|
-
omitLabelConfiguration?: boolean;
|
|
99
|
-
fullWidth: boolean;
|
|
100
|
-
dateFormat: import('@opengov/form-utils').DateFormat;
|
|
101
|
-
renderField: ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').FieldConfiguration<import('react-hook-form').FieldValues>, { disabled, readonly, name }: {
|
|
102
|
-
disabled?: boolean;
|
|
103
|
-
readonly?: boolean;
|
|
104
|
-
name?: string;
|
|
105
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').TextConfiguration, { disabled, readonly, name }: {
|
|
106
|
-
disabled?: boolean;
|
|
107
|
-
readonly?: boolean;
|
|
108
|
-
name?: string;
|
|
109
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').NumberConfiguration, { disabled, readonly, name }: {
|
|
110
|
-
disabled?: boolean;
|
|
111
|
-
readonly?: boolean;
|
|
112
|
-
name?: string;
|
|
113
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').DateConfiguration, { disabled, readonly, name }: {
|
|
114
|
-
disabled?: boolean;
|
|
115
|
-
readonly?: boolean;
|
|
116
|
-
name?: string;
|
|
117
|
-
}) => JSX.Element);
|
|
118
|
-
} | null;
|
|
14
|
+
export declare const useFieldType: (type?: string) => FieldTypes | null;
|
|
119
15
|
export declare const useFieldTemplate: (fieldId: string) => import('@opengov/form-utils').FieldTemplate;
|
|
120
16
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengov/form-renderer",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14-beta.1",
|
|
4
4
|
"description": "OpenGov Smart Forms form renderer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@mdi/js": "^7.4.47",
|
|
28
28
|
"@mdi/react": "^1.6.1",
|
|
29
29
|
"@mui/icons-material": "^6.1.1",
|
|
30
|
-
"@opengov/form-utils": "^0.5.
|
|
30
|
+
"@opengov/form-utils": "^0.5.1-beta.1",
|
|
31
31
|
"date-fns": "^4.1.0",
|
|
32
32
|
"lodash": "^4.17.21",
|
|
33
33
|
"mathjs": "^14.3.1",
|