@opengov/form-renderer 0.2.10-beta-1 → 0.2.10-beta-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/dist/lib.js +8278 -11358
- package/dist/lib.umd.cjs +54 -54
- package/dist/renderer/RendererProvider.d.ts +1 -1
- package/dist/renderer/context/FormRendererContext.d.ts +17 -17
- package/package.json +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { FieldTypes, FormTemplate } from '@opengov/form-utils';
|
|
1
2
|
import { default as React } from 'react';
|
|
2
3
|
import { LayoutState } from './context/LayoutContext';
|
|
3
|
-
import { FormTemplate, FieldTypes } from '@opengov/form-utils';
|
|
4
4
|
interface RendererProviderProps {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
template: FormTemplate;
|
|
@@ -19,19 +19,20 @@ export declare const useFieldType: (type?: string) => {
|
|
|
19
19
|
groups: import('@opengov/form-utils').ConfigurationGroup<import('react-hook-form').FieldValues>[];
|
|
20
20
|
omitLabelConfiguration?: boolean;
|
|
21
21
|
fullWidth: boolean;
|
|
22
|
-
|
|
22
|
+
dateFormat: import('@opengov/form-utils').DateFormat;
|
|
23
|
+
renderField: ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').DateConfiguration, { disabled, readonly, name }: {
|
|
23
24
|
disabled?: boolean;
|
|
24
25
|
readonly?: boolean;
|
|
25
26
|
name?: string;
|
|
26
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').
|
|
27
|
+
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').FieldConfiguration<import('react-hook-form').FieldValues>, { disabled, readonly, name }: {
|
|
27
28
|
disabled?: boolean;
|
|
28
29
|
readonly?: boolean;
|
|
29
30
|
name?: string;
|
|
30
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').
|
|
31
|
+
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').TextConfiguration, { disabled, readonly, name }: {
|
|
31
32
|
disabled?: boolean;
|
|
32
33
|
readonly?: boolean;
|
|
33
34
|
name?: string;
|
|
34
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').
|
|
35
|
+
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').NumberConfiguration, { disabled, readonly, name }: {
|
|
35
36
|
disabled?: boolean;
|
|
36
37
|
readonly?: boolean;
|
|
37
38
|
name?: string;
|
|
@@ -46,19 +47,19 @@ export declare const useFieldType: (type?: string) => {
|
|
|
46
47
|
fullWidth: boolean;
|
|
47
48
|
maxLength: number;
|
|
48
49
|
filter?: (value: string) => string;
|
|
49
|
-
renderField: ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').
|
|
50
|
+
renderField: ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').DateConfiguration, { disabled, readonly, name }: {
|
|
50
51
|
disabled?: boolean;
|
|
51
52
|
readonly?: boolean;
|
|
52
53
|
name?: string;
|
|
53
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').
|
|
54
|
+
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').FieldConfiguration<import('react-hook-form').FieldValues>, { disabled, readonly, name }: {
|
|
54
55
|
disabled?: boolean;
|
|
55
56
|
readonly?: boolean;
|
|
56
57
|
name?: string;
|
|
57
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').
|
|
58
|
+
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').TextConfiguration, { disabled, readonly, name }: {
|
|
58
59
|
disabled?: boolean;
|
|
59
60
|
readonly?: boolean;
|
|
60
61
|
name?: string;
|
|
61
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').
|
|
62
|
+
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').NumberConfiguration, { disabled, readonly, name }: {
|
|
62
63
|
disabled?: boolean;
|
|
63
64
|
readonly?: boolean;
|
|
64
65
|
name?: string;
|
|
@@ -72,19 +73,19 @@ export declare const useFieldType: (type?: string) => {
|
|
|
72
73
|
omitLabelConfiguration?: boolean;
|
|
73
74
|
fullWidth: boolean;
|
|
74
75
|
decimalPlaces: number;
|
|
75
|
-
renderField: ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').
|
|
76
|
+
renderField: ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').DateConfiguration, { disabled, readonly, name }: {
|
|
76
77
|
disabled?: boolean;
|
|
77
78
|
readonly?: boolean;
|
|
78
79
|
name?: string;
|
|
79
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').
|
|
80
|
+
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').FieldConfiguration<import('react-hook-form').FieldValues>, { disabled, readonly, name }: {
|
|
80
81
|
disabled?: boolean;
|
|
81
82
|
readonly?: boolean;
|
|
82
83
|
name?: string;
|
|
83
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').
|
|
84
|
+
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').TextConfiguration, { disabled, readonly, name }: {
|
|
84
85
|
disabled?: boolean;
|
|
85
86
|
readonly?: boolean;
|
|
86
87
|
name?: string;
|
|
87
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').
|
|
88
|
+
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').NumberConfiguration, { disabled, readonly, name }: {
|
|
88
89
|
disabled?: boolean;
|
|
89
90
|
readonly?: boolean;
|
|
90
91
|
name?: string;
|
|
@@ -97,20 +98,19 @@ export declare const useFieldType: (type?: string) => {
|
|
|
97
98
|
groups: import('@opengov/form-utils').ConfigurationGroup<import('react-hook-form').FieldValues>[];
|
|
98
99
|
omitLabelConfiguration?: boolean;
|
|
99
100
|
fullWidth: boolean;
|
|
100
|
-
|
|
101
|
-
renderField: ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').FieldConfiguration<import('react-hook-form').FieldValues>, { disabled, readonly, name }: {
|
|
101
|
+
renderField: ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').DateConfiguration, { disabled, readonly, name }: {
|
|
102
102
|
disabled?: boolean;
|
|
103
103
|
readonly?: boolean;
|
|
104
104
|
name?: string;
|
|
105
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').
|
|
105
|
+
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').FieldConfiguration<import('react-hook-form').FieldValues>, { disabled, readonly, name }: {
|
|
106
106
|
disabled?: boolean;
|
|
107
107
|
readonly?: boolean;
|
|
108
108
|
name?: string;
|
|
109
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').
|
|
109
|
+
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').TextConfiguration, { disabled, readonly, name }: {
|
|
110
110
|
disabled?: boolean;
|
|
111
111
|
readonly?: boolean;
|
|
112
112
|
name?: string;
|
|
113
|
-
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').
|
|
113
|
+
}) => JSX.Element) | ((template: import('@opengov/form-utils').FieldTemplate, config: import('@opengov/form-utils').NumberConfiguration, { disabled, readonly, name }: {
|
|
114
114
|
disabled?: boolean;
|
|
115
115
|
readonly?: boolean;
|
|
116
116
|
name?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengov/form-renderer",
|
|
3
|
-
"version": "0.2.10-beta-
|
|
3
|
+
"version": "0.2.10-beta-2",
|
|
4
4
|
"description": "OpenGov Smart Forms form renderer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"module": "./dist/lib.js",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
13
14
|
"import": "./dist/lib.js",
|
|
14
|
-
"require": "./dist/lib.umd.cjs"
|
|
15
|
-
"types": "./dist/index.d.ts"
|
|
15
|
+
"require": "./dist/lib.umd.cjs"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"types": "dist/index.d.ts",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"@mdi/react": "^1.6.1",
|
|
29
29
|
"@mui/icons-material": "^6.1.1",
|
|
30
30
|
"@opengov/form-utils": "^0.5.0",
|
|
31
|
-
"date-fns": "^
|
|
31
|
+
"date-fns": "^3.6.0",
|
|
32
32
|
"lodash": "^4.17.21",
|
|
33
33
|
"mathjs": "^14.3.1",
|
|
34
34
|
"sanitize-html": "^2.14.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@mui/material": ">= 5.0.0",
|
|
38
|
-
"@mui/x-date-pickers-pro": ">=
|
|
38
|
+
"@mui/x-date-pickers-pro": ">=7.29.0 <8.0.0",
|
|
39
39
|
"@opengov/capital-mui-theme": ">= 36.0.0",
|
|
40
40
|
"react": ">= 16.8.0",
|
|
41
41
|
"react-dom": ">= 16.8.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@emotion/react": "^11.13.3",
|
|
46
46
|
"@emotion/styled": "^11.13.0",
|
|
47
47
|
"@mui/material": "^6.1.1",
|
|
48
|
-
"@mui/x-date-pickers-pro": "
|
|
48
|
+
"@mui/x-date-pickers-pro": "^7.29.4",
|
|
49
49
|
"@opengov/capital-mui-theme": "^36.0.0-beta.9",
|
|
50
50
|
"@types/sanitize-html": "^2.13.0",
|
|
51
51
|
"react": "^18.3.1",
|