@opengov/form-renderer 0.2.18 → 0.2.19
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/Checkbox/Checkbox.d.ts +1 -3
- package/dist/fields/DateInput/DateInput.d.ts +0 -1
- package/dist/fields/Dropdown/Dropdown.d.ts +3 -3
- package/dist/fields/Number/NumberInput.d.ts +0 -1
- package/dist/fields/Text/TextInput.d.ts +1 -3
- package/dist/fields/defaultFields.d.ts +2 -7
- package/dist/fields/types.d.ts +3 -1
- package/dist/lib.js +1337 -1330
- package/dist/lib.umd.cjs +48 -48
- package/dist/renderer/Field.d.ts +3 -2
- package/package.json +2 -2
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import { GeneralInputProps } from '../types';
|
|
2
|
-
export default function CheckboxInput({ name, label, sx, disabled, rules, readonly, ...rest }: GeneralInputProps
|
|
3
|
-
readonly?: boolean;
|
|
4
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function CheckboxInput({ name, label, sx, disabled, rules, readonly, ...rest }: GeneralInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,6 @@ import { DateConstraints, DateFormat } from '@opengov/form-utils';
|
|
|
3
3
|
interface DateInputProps extends GeneralInputProps {
|
|
4
4
|
constraints?: DateConstraints;
|
|
5
5
|
dateFormat?: DateFormat;
|
|
6
|
-
readonly?: boolean;
|
|
7
6
|
}
|
|
8
7
|
export declare const shouldDisableDate: (date: Date, constraints: DateConstraints) => boolean;
|
|
9
8
|
declare function DateInput({ name, rules, sx, constraints, dateFormat, ...rest }: DateInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GeneralInputProps } from '../types';
|
|
2
2
|
import { DropdownOption } from '@opengov/form-utils';
|
|
3
|
-
export
|
|
3
|
+
export interface DropdownInputProps extends GeneralInputProps {
|
|
4
4
|
options?: DropdownOption[];
|
|
5
|
-
|
|
6
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
}
|
|
6
|
+
export default function DropdownInput({ name, label, options, sx, disabled, rules, readonly, }: DropdownInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TextFieldProps } from '@mui/material';
|
|
2
2
|
import { GeneralInputProps } from '../types';
|
|
3
3
|
export default function NumberInput(props: Omit<GeneralInputProps & TextFieldProps, 'type'> & {
|
|
4
|
-
readonly?: boolean;
|
|
5
4
|
decimalPlaces?: number;
|
|
6
5
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { TextFieldProps } from '@mui/material';
|
|
2
2
|
import { GeneralInputProps } from '../types';
|
|
3
|
-
|
|
4
|
-
readonly?: boolean;
|
|
3
|
+
export default function TextInput({ name, label, rules, sx, readonly, maxLength, filter, ...rest }: GeneralInputProps & TextFieldProps & {
|
|
5
4
|
maxLength?: number;
|
|
6
5
|
filter?: (value: string) => string;
|
|
7
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default TextInput;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import { FieldTemplate, FieldTypes } from '@opengov/form-utils';
|
|
2
|
-
export declare const defaultRules: (field: FieldTemplate) =>
|
|
3
|
-
required: {
|
|
4
|
-
value: boolean;
|
|
5
|
-
message: string;
|
|
6
|
-
};
|
|
7
|
-
};
|
|
1
|
+
import { FieldTemplate, FieldTypes, FieldRules } from '@opengov/form-utils';
|
|
2
|
+
export declare const defaultRules: (field: FieldTemplate) => FieldRules;
|
|
8
3
|
declare const defaultFieldTypes: FieldTypes[];
|
|
9
4
|
export default defaultFieldTypes;
|
package/dist/fields/types.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { SxProps } from '@mui/material';
|
|
2
|
+
import { FieldRules } from '@opengov/form-utils';
|
|
2
3
|
export interface GeneralInputProps {
|
|
3
4
|
name: string;
|
|
4
5
|
label: string | JSX.Element;
|
|
5
6
|
sx?: SxProps;
|
|
6
7
|
disabled?: boolean;
|
|
7
|
-
|
|
8
|
+
readonly?: boolean;
|
|
9
|
+
rules?: FieldRules;
|
|
8
10
|
}
|