@opengov/form-renderer 0.0.41-config-beta.2 → 0.0.41
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.d.ts +7 -0
- package/dist/fields/Checkbox/Checkbox.d.ts +1 -3
- package/dist/fields/DateInput/DateInput.d.ts +2 -3
- package/dist/fields/Dropdown/Dropdown.d.ts +5 -4
- package/dist/fields/NonEditableField/NonEditableField.d.ts +1 -3
- package/dist/fields/NumberInput.d.ts +3 -0
- package/dist/fields/TextInput.d.ts +4 -0
- package/dist/fields/defaultFields.d.ts +3 -3
- package/dist/index.d.ts +5 -5
- package/dist/lib.js +10802 -10840
- package/dist/lib.umd.cjs +74 -74
- package/dist/renderer/FormProvider.d.ts +4 -3
- package/dist/renderer/context/FormRendererContext.d.ts +9 -93
- package/dist/renderer/index.d.ts +1 -1
- package/dist/renderer/types.d.ts +84 -3
- package/dist/stories/basicTemplate.d.ts +1 -1
- package/dist/stories/complexTemplate.d.ts +1 -1
- package/dist/utils/TestWrapper.d.ts +1 -1
- package/package.json +1 -2
- package/dist/fields/CalculatedNumber/CalculatedNumber.d.ts +0 -13
- package/dist/fields/CalculatedNumber/CalculatedNumberConfig.d.ts +0 -3
- package/dist/fields/Checkbox/CheckboxConfig.d.ts +0 -3
- package/dist/fields/DateInput/DateConfig.d.ts +0 -3
- package/dist/fields/Dropdown/DropdownConfig.d.ts +0 -3
- package/dist/fields/Number/NumberConfig.d.ts +0 -3
- package/dist/fields/Number/NumberInput.d.ts +0 -5
- package/dist/fields/Text/TextConfig.d.ts +0 -3
- package/dist/fields/Text/TextInput.d.ts +0 -6
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GeneralInputProps } from './types';
|
|
2
|
+
import { FieldTemplate } from '../renderer/types';
|
|
3
|
+
declare function CalculatedNumber({ name, label, sx }: GeneralInputProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function CalculationWithFormula({ fieldTemplate }: {
|
|
5
|
+
fieldTemplate: FieldTemplate;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default CalculatedNumber;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import { GeneralInputProps } from '../types';
|
|
2
|
-
export default function CheckboxInput({ name, label, sx, disabled, rules, ...rest }: GeneralInputProps
|
|
3
|
-
readonly?: boolean;
|
|
4
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function CheckboxInput({ name, label, sx, disabled, rules, ...rest }: GeneralInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { GeneralInputProps } from '../types';
|
|
2
|
-
import { DateConstraints, DateFormat } from '
|
|
2
|
+
import { DateConstraints, DateFormat } from '../../renderer/types';
|
|
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
|
-
declare function DateInput({ name, rules, sx, constraints,
|
|
8
|
+
declare function DateInput({ name, rules, sx, constraints, ...rest }: DateInputProps): import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
export default DateInput;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GeneralInputProps } from '../types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export default function DropdownInput({ name, label, options, sx, disabled, rules, }: GeneralInputProps & {
|
|
3
|
+
options?: Array<{
|
|
4
|
+
displayValue: string;
|
|
5
|
+
key: string;
|
|
6
|
+
}>;
|
|
6
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { SxProps } from '@mui/material';
|
|
2
|
-
import { DateFormat } from '@opengov/form-utils';
|
|
3
2
|
interface NonEditableProps {
|
|
4
3
|
name: string;
|
|
5
4
|
type: string;
|
|
@@ -11,7 +10,6 @@ interface NonEditableProps {
|
|
|
11
10
|
key: string;
|
|
12
11
|
displayValue: string;
|
|
13
12
|
}[];
|
|
14
|
-
dateFormat?: DateFormat;
|
|
15
13
|
}
|
|
16
|
-
export default function NonEditable({ name, type, label, asHTML, sx, rules, options
|
|
14
|
+
export default function NonEditable({ name, type, label, asHTML, sx, rules, options }: NonEditableProps): import("react/jsx-runtime").JSX.Element;
|
|
17
15
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FieldRenders, FieldTemplate } from '../renderer/types';
|
|
2
2
|
export declare const defaultRules: (field: FieldTemplate) => {
|
|
3
3
|
required: {
|
|
4
4
|
value: boolean;
|
|
5
5
|
message: string;
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
|
-
declare const
|
|
9
|
-
export default
|
|
8
|
+
declare const defaultFields: FieldRenders;
|
|
9
|
+
export default defaultFields;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { default as DateInput } from './fields/DateInput/DateInput';
|
|
2
2
|
import { default as CheckboxInput } from './fields/Checkbox/Checkbox';
|
|
3
|
-
import { default as TextInput } from './fields/
|
|
4
|
-
import { default as NumberInput } from './fields/
|
|
5
|
-
import { default as
|
|
3
|
+
import { default as TextInput } from './fields/TextInput';
|
|
4
|
+
import { default as NumberInput } from './fields/NumberInput';
|
|
5
|
+
import { default as CalculatedNumberInput } from './fields/CalculatedNumber';
|
|
6
6
|
import { default as DropdownInput } from './fields/Dropdown/Dropdown';
|
|
7
7
|
import { default as NonEditableField } from './fields/NonEditableField/NonEditableField';
|
|
8
8
|
import { default as FormFieldLabel } from './fields/FormFieldLabel';
|
|
9
9
|
import { default as FormProvider } from './renderer/FormProvider';
|
|
10
10
|
import { default as FormRenderer, Renderer } from './renderer';
|
|
11
|
-
import { default as
|
|
12
|
-
export { FormProvider, Renderer, FormFieldLabel, CheckboxInput, DateInput, TextInput, NumberInput,
|
|
11
|
+
import { default as defaultFields, defaultRules } from './fields/defaultFields';
|
|
12
|
+
export { FormProvider, Renderer, FormFieldLabel, CheckboxInput, DateInput, TextInput, NumberInput, CalculatedNumberInput, DropdownInput, NonEditableField, defaultFields, defaultRules, };
|
|
13
13
|
export default FormRenderer;
|