@opengov/form-renderer 0.0.43 → 0.0.45
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/CalculatedNumber/CalculatedNumber.d.ts +1 -12
- package/dist/fields/Checkbox/Checkbox.d.ts +1 -1
- package/dist/fields/FormFieldLabel.d.ts +1 -2
- package/dist/fields/LabeledField/LabeledField.d.ts +19 -0
- package/dist/fields/Number/NumberInput.d.ts +1 -0
- package/dist/fields/Number/NumberInput.test.d.ts +1 -0
- package/dist/fields/Text/TextInput.d.ts +3 -1
- package/dist/fields/Text/TextInput.test.d.ts +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/lib.js +13417 -7126
- package/dist/lib.umd.cjs +74 -58
- package/dist/renderer/context/FormRendererContext.d.ts +2 -4
- package/dist/renderer/types.d.ts +1 -0
- package/package.json +2 -1
- package/dist/fields/NonEditableField/NonEditableField.d.ts +0 -17
- /package/dist/fields/{NonEditableField/NonEditableField.test.d.ts → LabeledField/LabeledField.test.d.ts} +0 -0
|
@@ -1,13 +1,2 @@
|
|
|
1
1
|
import { GeneralInputProps } from '../types';
|
|
2
|
-
|
|
3
|
-
export declare function CalculatedNumberInput({ name, label, sx }: GeneralInputProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare function CalculationWithFormula({ template, readonly }: {
|
|
5
|
-
template: FieldTemplate;
|
|
6
|
-
readonly?: boolean;
|
|
7
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default function CalculatedNumber({ template, disabled, readonly, }: {
|
|
9
|
-
template: FieldTemplate;
|
|
10
|
-
config: FieldConfiguration;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
readonly?: boolean;
|
|
13
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function CalculatedNumber({ name, label, sx }: GeneralInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GeneralInputProps } from '../types';
|
|
2
|
-
export default function CheckboxInput({ name, label, sx, disabled, rules, ...rest }: GeneralInputProps & {
|
|
2
|
+
export default function CheckboxInput({ name, label, sx, disabled, rules, readonly, ...rest }: GeneralInputProps & {
|
|
3
3
|
readonly?: boolean;
|
|
4
4
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,8 +6,7 @@ interface FormFieldLabelProps {
|
|
|
6
6
|
isCalculated?: boolean;
|
|
7
7
|
readonly?: boolean;
|
|
8
8
|
deleted?: boolean;
|
|
9
|
-
formula?: string;
|
|
10
9
|
isSection?: boolean;
|
|
11
10
|
}
|
|
12
|
-
export default function FormFieldLabel({ children, internal, required, helpText, isCalculated, readonly, deleted,
|
|
11
|
+
export default function FormFieldLabel({ children, internal, required, helpText, isCalculated, readonly, deleted, isSection, }: FormFieldLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
export declare function LabelWithChildren({ label, error, childId, dataTestId, sx, children, }: {
|
|
3
|
+
label: string | JSX.Element;
|
|
4
|
+
error?: string;
|
|
5
|
+
childId?: string;
|
|
6
|
+
dataTestId?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
sx?: SxProps;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default function LabeledField({ label, value, childId, asHTML, sx, error, startAdornment, endAdornment, }: {
|
|
11
|
+
label: string | JSX.Element;
|
|
12
|
+
value?: string;
|
|
13
|
+
childId?: string;
|
|
14
|
+
asHTML?: boolean;
|
|
15
|
+
sx?: SxProps;
|
|
16
|
+
error?: string;
|
|
17
|
+
startAdornment?: React.ReactNode;
|
|
18
|
+
endAdornment?: React.ReactNode;
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,4 +2,5 @@ import { TextFieldProps } from '@mui/material';
|
|
|
2
2
|
import { GeneralInputProps } from '../types';
|
|
3
3
|
export default function NumberInput(props: Omit<GeneralInputProps & TextFieldProps, 'type'> & {
|
|
4
4
|
readonly?: boolean;
|
|
5
|
+
decimalPlaces?: number;
|
|
5
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { TextFieldProps } from '@mui/material';
|
|
2
2
|
import { GeneralInputProps } from '../types';
|
|
3
|
-
declare function TextInput({ name, label, rules, sx, ...rest }: GeneralInputProps & TextFieldProps & {
|
|
3
|
+
declare function TextInput({ name, label, rules, sx, readonly, maxLength, filter, ...rest }: GeneralInputProps & TextFieldProps & {
|
|
4
4
|
readonly?: boolean;
|
|
5
|
+
maxLength?: number;
|
|
6
|
+
filter?: (value: string) => string;
|
|
5
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
6
8
|
export default TextInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -4,10 +4,11 @@ import { default as TextInput } from './fields/Text/TextInput';
|
|
|
4
4
|
import { default as NumberInput } from './fields/Number/NumberInput';
|
|
5
5
|
import { default as CalculatedNumber } from './fields/CalculatedNumber/CalculatedNumber';
|
|
6
6
|
import { default as DropdownInput } from './fields/Dropdown/Dropdown';
|
|
7
|
-
import { default as
|
|
7
|
+
import { default as LabeledField } from './fields/LabeledField/LabeledField';
|
|
8
|
+
import { default as ErrorMessage } from './fields/ErrorMessage';
|
|
8
9
|
import { default as FormFieldLabel } from './fields/FormFieldLabel';
|
|
9
10
|
import { default as FormProvider } from './renderer/FormProvider';
|
|
10
11
|
import { default as FormRenderer, Renderer } from './renderer';
|
|
11
12
|
import { default as defaultFieldTypes, defaultRules } from './fields/defaultFields';
|
|
12
|
-
export { FormProvider, Renderer, FormFieldLabel, CheckboxInput, DateInput, TextInput, NumberInput, CalculatedNumber, DropdownInput,
|
|
13
|
+
export { FormProvider, Renderer, FormFieldLabel, CheckboxInput, DateInput, TextInput, NumberInput, CalculatedNumber, DropdownInput, LabeledField, ErrorMessage, defaultFieldTypes, defaultRules, };
|
|
13
14
|
export default FormRenderer;
|