envoc-form 4.0.1-10 → 4.0.1-11
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/es/AddressInput/AddressInput.d.ts +5 -5
- package/es/DatePicker/DatePickerGroup.d.ts +1 -1
- package/es/DatePicker/DatePickerGroup.js +9 -4
- package/es/DatePicker/StringDateOnlyPickerGroup.d.ts +1 -1
- package/es/DatePicker/StringDatePickerGroup.d.ts +1 -1
- package/es/Field/Field.d.ts +2 -2
- package/es/FieldArray/FieldArray.d.ts +2 -2
- package/es/FieldArray/FieldArray.js +2 -2
- package/es/File/FileGroup.d.ts +1 -1
- package/es/File/FileGroup.js +1 -1
- package/es/File/FileList.d.ts +2 -2
- package/es/Form/FormBasedPreventNavigation.js +31 -14
- package/es/Input/IconInputGroup.d.ts +1 -1
- package/es/Input/IconInputGroup.js +2 -1
- package/es/Input/InputGroup.d.ts +2 -2
- package/es/Input/InputGroup.js +2 -2
- package/es/Input/MoneyInputGroup.d.ts +1 -1
- package/es/Input/NumberInputGroup.d.ts +1 -1
- package/es/Input/StringInputGroup.d.ts +1 -1
- package/es/Input/StringInputGroup.js +2 -1
- package/es/Normalization/normalizers.d.ts +2 -2
- package/es/Select/BooleanSelectGroup.d.ts +1 -1
- package/es/Select/NumberSelectGroup.d.ts +2 -2
- package/es/Select/SelectGroup.d.ts +1 -1
- package/es/Select/SelectGroup.js +1 -1
- package/es/SubmitFormButton.d.ts +1 -1
- package/es/TextArea/TextAreaGroup.d.ts +1 -1
- package/es/TextArea/TextAreaGroup.js +3 -2
- package/es/Validation/validators.d.ts +8 -8
- package/es/Validation/validators.js +3 -0
- package/es/__Tests__/FormTestBase.d.ts +1 -1
- package/es/__Tests__/FormTestBase.js +1 -1
- package/es/index.d.ts +4 -4
- package/lib/AddressInput/AddressInput.d.ts +5 -5
- package/lib/DatePicker/DatePickerGroup.d.ts +1 -1
- package/lib/DatePicker/DatePickerGroup.js +9 -4
- package/lib/DatePicker/StringDateOnlyPickerGroup.d.ts +1 -1
- package/lib/DatePicker/StringDatePickerGroup.d.ts +1 -1
- package/lib/Field/Field.d.ts +2 -2
- package/lib/FieldArray/FieldArray.d.ts +2 -2
- package/lib/FieldArray/FieldArray.js +2 -2
- package/lib/File/FileGroup.d.ts +1 -1
- package/lib/File/FileGroup.js +1 -1
- package/lib/File/FileList.d.ts +2 -2
- package/lib/Form/FormBasedPreventNavigation.js +31 -14
- package/lib/Input/IconInputGroup.d.ts +1 -1
- package/lib/Input/IconInputGroup.js +2 -1
- package/lib/Input/InputGroup.d.ts +2 -2
- package/lib/Input/InputGroup.js +2 -2
- package/lib/Input/MoneyInputGroup.d.ts +1 -1
- package/lib/Input/NumberInputGroup.d.ts +1 -1
- package/lib/Input/StringInputGroup.d.ts +1 -1
- package/lib/Input/StringInputGroup.js +2 -1
- package/lib/Normalization/normalizers.d.ts +2 -2
- package/lib/Select/BooleanSelectGroup.d.ts +1 -1
- package/lib/Select/NumberSelectGroup.d.ts +2 -2
- package/lib/Select/SelectGroup.d.ts +1 -1
- package/lib/Select/SelectGroup.js +1 -1
- package/lib/SubmitFormButton.d.ts +1 -1
- package/lib/TextArea/TextAreaGroup.d.ts +1 -1
- package/lib/TextArea/TextAreaGroup.js +3 -2
- package/lib/Validation/validators.d.ts +8 -8
- package/lib/Validation/validators.js +3 -0
- package/lib/__Tests__/FormTestBase.d.ts +1 -1
- package/lib/__Tests__/FormTestBase.js +2 -2
- package/lib/index.d.ts +4 -4
- package/package.json +2 -2
- package/src/AddressInput/AddressInput.tsx +5 -5
- package/src/DatePicker/DatePickerGroup.tsx +8 -4
- package/src/DatePicker/StringDateOnlyPickerGroup.tsx +2 -2
- package/src/DatePicker/StringDatePickerGroup.tsx +1 -1
- package/src/Field/Field.tsx +2 -2
- package/src/FieldArray/FieldArray.tsx +5 -5
- package/src/File/FileGroup.tsx +2 -2
- package/src/File/FileList.tsx +2 -2
- package/src/Form/FormBasedPreventNavigation.tsx +34 -18
- package/src/Input/IconInputGroup.tsx +2 -2
- package/src/Input/InputGroup.tsx +8 -4
- package/src/Input/MoneyInputGroup.tsx +1 -1
- package/src/Input/NumberInputGroup.tsx +1 -1
- package/src/Input/StringInputGroup.tsx +2 -2
- package/src/Normalization/normalizers.ts +2 -2
- package/src/Select/BooleanSelectGroup.tsx +1 -1
- package/src/Select/NumberSelectGroup.tsx +2 -2
- package/src/Select/SelectGroup.tsx +2 -2
- package/src/SubmitFormButton.tsx +2 -1
- package/src/TextArea/TextAreaGroup.tsx +3 -3
- package/src/Validation/validators.ts +16 -12
- package/src/__Tests__/FormTestBase.tsx +2 -2
- package/src/index.ts +4 -4
@@ -5,11 +5,11 @@ export interface AddressInputProps {
|
|
5
5
|
name: string;
|
6
6
|
}
|
7
7
|
interface AddressDto {
|
8
|
-
address1?: string;
|
9
|
-
address2?: string;
|
10
|
-
zipCode?: string;
|
11
|
-
city?: string;
|
12
|
-
state?: string;
|
8
|
+
address1?: string | null;
|
9
|
+
address2?: string | null;
|
10
|
+
zipCode?: string | null;
|
11
|
+
city?: string | null;
|
12
|
+
state?: string | null;
|
13
13
|
}
|
14
14
|
export default function AddressInput({ fieldBuilder: { Field }, name, }: AddressInputProps): JSX.Element;
|
15
15
|
export {};
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import { DatePickerProps } from 'react-date-picker/dist/entry.nostyle';
|
3
3
|
import { InjectedFieldProps } from '../Field/InjectedFieldProps';
|
4
4
|
import { GroupProps } from '../Group';
|
5
|
-
export interface DatePickerGroupProps<T> extends InjectedFieldProps<T | undefined>, Omit<DatePickerProps, keyof InjectedFieldProps<T> | 'name' | 'value' | 'className'>, Omit<GroupProps, keyof InjectedFieldProps<T> | 'children'> {
|
5
|
+
export interface DatePickerGroupProps<T> extends InjectedFieldProps<T | undefined | null>, Omit<DatePickerProps, keyof InjectedFieldProps<T> | 'name' | 'value' | 'className'>, Omit<GroupProps, keyof InjectedFieldProps<T> | 'children'> {
|
6
6
|
convert: (arg: Date) => T;
|
7
7
|
}
|
8
8
|
export default function DatePickerGroup<T>({ input, meta, label, helpText, className, required, disabled, convert, ...rest }: DatePickerGroupProps<T>): JSX.Element;
|
@@ -31,12 +31,17 @@ export default function DatePickerGroup(_a) {
|
|
31
31
|
var input = _a.input, meta = _a.meta, label = _a.label, helpText = _a.helpText, className = _a.className, required = _a.required, disabled = _a.disabled, convert = _a.convert, rest = __rest(_a, ["input", "meta", "label", "helpText", "className", "required", "disabled", "convert"]);
|
32
32
|
var _b = useState(null), displayDate = _b[0], setDisplayDate = _b[1];
|
33
33
|
useEffect(function () {
|
34
|
-
if (input.value
|
35
|
-
setDisplayDate(new Date("".concat(input.value, "T00:00:00.000")));
|
36
|
-
}
|
37
|
-
else {
|
34
|
+
if (!input.value) {
|
38
35
|
setDisplayDate(null);
|
39
36
|
}
|
37
|
+
else if (typeof input.value === 'string') {
|
38
|
+
if (input.value.indexOf('T') === -1) {
|
39
|
+
setDisplayDate(new Date("".concat(input.value, "T00:00:00.000")));
|
40
|
+
}
|
41
|
+
else {
|
42
|
+
setDisplayDate(new Date(input.value));
|
43
|
+
}
|
44
|
+
}
|
40
45
|
}, [setDisplayDate, input.value]);
|
41
46
|
return (_jsx(Group, __assign({ input: input, meta: meta, label: label, helpText: helpText, className: classnames(className, FormDefaults.cssClassPrefix + 'date-picker'), required: required, disabled: disabled }, { children: _jsx(DatePicker, __assign({}, rest, { className: classnames(FormDefaults.cssClassPrefix + 'date-picker', className), value: displayDate, onChange: handleChange })) })));
|
42
47
|
function handleChange(e) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { DatePickerHelper } from './DatePickerHelper';
|
3
|
-
export interface StringDateOnlyPickerGroupProps extends DatePickerHelper<string | undefined> {
|
3
|
+
export interface StringDateOnlyPickerGroupProps extends DatePickerHelper<string | undefined | null> {
|
4
4
|
}
|
5
5
|
export default function StringDatePickerGroup(props: StringDateOnlyPickerGroupProps): JSX.Element;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { DatePickerHelper } from './DatePickerHelper';
|
3
|
-
export interface StringDatePickerGroupProps extends DatePickerHelper<string | undefined> {
|
3
|
+
export interface StringDatePickerGroupProps extends DatePickerHelper<string | undefined | null> {
|
4
4
|
}
|
5
5
|
export default function StringDatePickerGroup(props: StringDatePickerGroupProps): JSX.Element;
|
package/es/Field/Field.d.ts
CHANGED
@@ -2,8 +2,8 @@ import { ComponentProps, ElementType, LegacyRef } from 'react';
|
|
2
2
|
import { InjectedFieldProps } from './InjectedFieldProps';
|
3
3
|
import { NormalizationFunction } from '../Normalization/NormalizationFunction';
|
4
4
|
import { ValidationFunction } from '../Validation/ValidationFunction';
|
5
|
-
export declare type RenderComponent<TValue, TRenderComponent extends ElementType> = Partial<ComponentProps<TRenderComponent>> extends Partial<InjectedFieldProps<TValue | undefined>> ? TRenderComponent : never;
|
6
|
-
export declare type RenderComponentProps<TValue, TRenderComponent extends ElementType> = Partial<ComponentProps<TRenderComponent>> extends Partial<InjectedFieldProps<TValue | undefined>> ? ComponentProps<TRenderComponent> : never;
|
5
|
+
export declare type RenderComponent<TValue, TRenderComponent extends ElementType> = Partial<ComponentProps<TRenderComponent>> extends Partial<InjectedFieldProps<TValue | undefined | null>> ? TRenderComponent : never;
|
6
|
+
export declare type RenderComponentProps<TValue, TRenderComponent extends ElementType> = Partial<ComponentProps<TRenderComponent>> extends Partial<InjectedFieldProps<TValue | undefined | null>> ? ComponentProps<TRenderComponent> : never;
|
7
7
|
/** A specific Field instance to be rendered by the given TRenderComponent or by whatever default is reasonable */
|
8
8
|
export declare type FieldProps<TForm extends object, TProp extends keyof TForm, TRenderComponent extends ElementType> = {
|
9
9
|
name: TProp;
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import { ElementType } from 'react';
|
2
2
|
import { FieldProps } from '../Field/Field';
|
3
3
|
import { ValidationFunction } from '../Validation/ValidationFunction';
|
4
|
-
export declare type FieldArrayProps<TForm extends object, TProp extends keyof TForm> = TForm[TProp] extends Array<any> | undefined ? {
|
4
|
+
export declare type FieldArrayProps<TForm extends object, TProp extends keyof TForm> = TForm[TProp] extends Array<any> | undefined | null ? {
|
5
5
|
name: TProp;
|
6
6
|
label?: string;
|
7
7
|
disabled?: boolean;
|
8
8
|
validate?: ValidationFunction<TForm[TProp]> | ValidationFunction<TForm[TProp]>[];
|
9
9
|
children: (formBuilder: ArrayFormBuilderProp<TForm[TProp]>) => JSX.Element;
|
10
10
|
} : never;
|
11
|
-
export declare type ArrayFormBuilderProp<TValue extends Array<any> | undefined> = TValue extends Array<infer TForm> | undefined ? TForm extends object ? {
|
11
|
+
export declare type ArrayFormBuilderProp<TValue extends Array<any> | undefined | null> = TValue extends Array<infer TForm> | undefined | null ? TForm extends object ? {
|
12
12
|
Field: <TProp extends keyof TForm, TRenderComponent extends ElementType>(props: FieldProps<TForm, TProp, TRenderComponent>) => JSX.Element;
|
13
13
|
FieldArray: <TProp extends keyof TForm>(props: FieldArrayProps<TForm, TProp>) => JSX.Element;
|
14
14
|
} : never : never;
|
@@ -38,11 +38,11 @@ import { FormDefaults } from '../FormDefaults';
|
|
38
38
|
export default function FieldArray(_a) {
|
39
39
|
var _b;
|
40
40
|
var name = _a.name, label = _a.label, validate = _a.validate, disabled = _a.disabled, children = _a.children, rest = __rest(_a, ["name", "label", "validate", "disabled", "children"]);
|
41
|
-
var
|
41
|
+
var input = useStandardFormInput({
|
42
42
|
name: String(name),
|
43
43
|
validate: validate,
|
44
44
|
disabled: disabled,
|
45
|
-
})
|
45
|
+
})[0];
|
46
46
|
var values = !input.value
|
47
47
|
? []
|
48
48
|
: Array.isArray(input.value)
|
package/es/File/FileGroup.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { InjectedFieldProps } from '../Field/InjectedFieldProps';
|
3
3
|
import { GroupProps } from '../Group';
|
4
|
-
export interface FileGroupProps extends InjectedFieldProps<any | undefined>, Omit<GroupProps, keyof InjectedFieldProps<any> | 'children'>, Omit<React.HTMLProps<HTMLInputElement>, keyof InjectedFieldProps<any> | 'children' | 'className' | 'label'> {
|
4
|
+
export interface FileGroupProps extends InjectedFieldProps<any | undefined | null>, Omit<GroupProps, keyof InjectedFieldProps<any> | 'children'>, Omit<React.HTMLProps<HTMLInputElement>, keyof InjectedFieldProps<any> | 'children' | 'className' | 'label'> {
|
5
5
|
multiple?: boolean | undefined;
|
6
6
|
}
|
7
7
|
declare const FileGroupWithRef: React.ComponentType<FileGroupProps>;
|
package/es/File/FileGroup.js
CHANGED
@@ -24,8 +24,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
import React from 'react';
|
25
25
|
import classNames from 'classnames';
|
26
26
|
import FileList from './FileList';
|
27
|
-
import Group from '../Group';
|
28
27
|
import { FormDefaults } from '../FormDefaults';
|
28
|
+
import Group from '../Group';
|
29
29
|
function FileGroup(_a, ref) {
|
30
30
|
var _b;
|
31
31
|
var input = _a.input, meta = _a.meta, label = _a.label, helpText = _a.helpText, className = _a.className, required = _a.required, disabled = _a.disabled, multiple = _a.multiple, rest = __rest(_a, ["input", "meta", "label", "helpText", "className", "required", "disabled", "multiple"]);
|
package/es/File/FileList.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
export interface FileListProps {
|
3
|
-
files?: File | File[] | undefined;
|
4
|
-
rejectedFiles?: File | File[] | undefined;
|
3
|
+
files?: File | File[] | undefined | null;
|
4
|
+
rejectedFiles?: File | File[] | undefined | null;
|
5
5
|
}
|
6
6
|
export default function FileList({ files, rejectedFiles }: FileListProps): JSX.Element;
|
@@ -22,26 +22,43 @@ export default function FormBasedPreventNavigation(_a) {
|
|
22
22
|
if (!preventNavigate) {
|
23
23
|
return;
|
24
24
|
}
|
25
|
+
var unblock = function () { };
|
26
|
+
var push = navigator.push;
|
25
27
|
// TODO: https://reactrouter.com/docs/en/v6/upgrading/v5#prompt-is-not-currently-supported
|
26
28
|
// this is a workaround until we get native support for prompt on navigate
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
}
|
31
|
-
};
|
32
|
-
var unblock = navigator.block(function (tx) {
|
33
|
-
var autoUnblockingTx = __assign(__assign({}, tx), { retry: function () {
|
34
|
-
// Automatically unblock the transition so it can play all the way
|
35
|
-
// through before retrying it. TODO: Figure out how to re-enable
|
36
|
-
// this block if the transition is cancelled for some reason.
|
37
|
-
unblock();
|
29
|
+
if (navigator.block) {
|
30
|
+
var blocker_1 = function (tx) {
|
31
|
+
if (window.confirm(promptMessage)) {
|
38
32
|
tx.retry();
|
39
|
-
}
|
40
|
-
|
41
|
-
|
33
|
+
}
|
34
|
+
};
|
35
|
+
unblock = navigator.block(function (tx) {
|
36
|
+
var autoUnblockingTx = __assign(__assign({}, tx), { retry: function () {
|
37
|
+
// Automatically unblock the transition so it can play all the way
|
38
|
+
// through before retrying it. TODO: Figure out how to re-enable
|
39
|
+
// this block if the transition is cancelled for some reason.
|
40
|
+
unblock();
|
41
|
+
tx.retry();
|
42
|
+
} });
|
43
|
+
blocker_1(autoUnblockingTx);
|
44
|
+
});
|
45
|
+
}
|
46
|
+
else {
|
47
|
+
//https://gist.github.com/MarksCode/64e438c82b0b2a1161e01c88ca0d0355
|
48
|
+
navigator.push = function () {
|
49
|
+
var args = [];
|
50
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
51
|
+
args[_i] = arguments[_i];
|
52
|
+
}
|
53
|
+
if (window.confirm(promptMessage)) {
|
54
|
+
push.apply(void 0, args);
|
55
|
+
}
|
56
|
+
};
|
57
|
+
}
|
42
58
|
window.addEventListener('beforeunload', beforeUnload);
|
43
59
|
return function () {
|
44
60
|
unblock();
|
61
|
+
navigator.push = push;
|
45
62
|
window.removeEventListener('beforeunload', beforeUnload);
|
46
63
|
};
|
47
64
|
function beforeUnload(e) {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { InputGroupProps } from './InputGroup';
|
3
|
-
export interface IconInputGroupProps extends Omit<InputGroupProps<string | undefined>, 'onChange' | 'type' | 'value'> {
|
3
|
+
export interface IconInputGroupProps extends Omit<InputGroupProps<string | undefined | null>, 'onChange' | 'type' | 'value'> {
|
4
4
|
type?: 'color' | 'email' | 'search' | 'tel' | 'text' | 'url';
|
5
5
|
icon: React.ReactNode;
|
6
6
|
helpText?: string;
|
@@ -26,9 +26,10 @@ import classNames from 'classnames';
|
|
26
26
|
import InputGroupWithRef from './InputGroup';
|
27
27
|
import { FormDefaults } from '../FormDefaults';
|
28
28
|
function IconInputGroup(_a, ref) {
|
29
|
+
var _b;
|
29
30
|
var icon = _a.icon, className = _a.className, rest = __rest(_a, ["icon", "className"]);
|
30
31
|
var input = rest.input;
|
31
|
-
return (_jsx(_Fragment, { children: _jsx(InputGroupWithRef, __assign({ icon: icon, ref: ref, className: classNames(className, FormDefaults.cssClassPrefix + 'icon-input-group'), value: input.value
|
32
|
+
return (_jsx(_Fragment, { children: _jsx(InputGroupWithRef, __assign({ icon: icon, ref: ref, className: classNames(className, FormDefaults.cssClassPrefix + 'icon-input-group'), value: (_b = input.value) !== null && _b !== void 0 ? _b : '', onChange: function (e) {
|
32
33
|
if (!e.target.value) {
|
33
34
|
input.onChange(undefined);
|
34
35
|
}
|
package/es/Input/InputGroup.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import React, { ChangeEventHandler, LegacyRef } from 'react';
|
2
2
|
import { InjectedFieldProps } from '../Field/InjectedFieldProps';
|
3
3
|
import { GroupProps } from '../Group';
|
4
|
-
export interface InputGroupProps<TValue> extends InjectedFieldProps<TValue>, Omit<React.HTMLProps<HTMLInputElement>, keyof InjectedFieldProps<any> | 'children' | 'className' | 'label'>, Omit<GroupProps, keyof InjectedFieldProps<any> | 'children'> {
|
4
|
+
export interface InputGroupProps<TValue> extends InjectedFieldProps<TValue>, Omit<React.HTMLProps<HTMLInputElement>, keyof InjectedFieldProps<any> | 'children' | 'className' | 'label' | 'value'>, Omit<GroupProps, keyof InjectedFieldProps<any> | 'children'> {
|
5
5
|
onChange: ChangeEventHandler<HTMLInputElement>;
|
6
|
-
value: string | number;
|
6
|
+
value: string | number | null | undefined;
|
7
7
|
icon?: React.ReactNode;
|
8
8
|
}
|
9
9
|
/** generic controlled <input/> wrapped by a Group */
|
package/es/Input/InputGroup.js
CHANGED
@@ -23,12 +23,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
24
|
import React from 'react';
|
25
25
|
import classNames from 'classnames';
|
26
|
-
import Group from '../Group';
|
27
26
|
import { FormDefaults } from '../FormDefaults';
|
27
|
+
import Group from '../Group';
|
28
28
|
/** generic controlled <input/> wrapped by a Group */
|
29
29
|
function InputGroup(_a, ref) {
|
30
30
|
var input = _a.input, meta = _a.meta, label = _a.label, helpText = _a.helpText, className = _a.className, required = _a.required, disabled = _a.disabled, onChange = _a.onChange, value = _a.value, icon = _a.icon, rest = __rest(_a, ["input", "meta", "label", "helpText", "className", "required", "disabled", "onChange", "value", "icon"]);
|
31
|
-
return (_jsxs(Group, __assign({ input: input, meta: meta, required: required, disabled: disabled, label: label, helpText: helpText, className: classNames(className, FormDefaults.cssClassPrefix + 'input-group') }, { children: [icon, _jsx("input", __assign({}, input, rest, { value: value, onChange: onChange, ref: ref, className: classNames(className, FormDefaults.cssClassPrefix + 'input-group') }))] })));
|
31
|
+
return (_jsxs(Group, __assign({ input: input, meta: meta, required: required, disabled: disabled, label: label, helpText: helpText, className: classNames(className, FormDefaults.cssClassPrefix + 'input-group') }, { children: [icon, _jsx("input", __assign({}, input, rest, { value: value !== null && value !== void 0 ? value : '', onChange: onChange, ref: ref, className: classNames(className, FormDefaults.cssClassPrefix + 'input-group') }))] })));
|
32
32
|
}
|
33
33
|
var InputGroupWithRef = React.forwardRef(InputGroup);
|
34
34
|
export default InputGroupWithRef;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { InputGroupProps } from './InputGroup';
|
3
|
-
export interface MoneyInputGroupProps extends Omit<InputGroupProps<number | undefined>, 'onChange' | 'type' | 'value'> {
|
3
|
+
export interface MoneyInputGroupProps extends Omit<InputGroupProps<number | undefined | null>, 'onChange' | 'type' | 'value'> {
|
4
4
|
parseFunc?: typeof parseInt | typeof parseFloat;
|
5
5
|
}
|
6
6
|
declare const MoneyInputGroupWithRef: React.FunctionComponent<MoneyInputGroupProps>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { InputGroupProps } from './InputGroup';
|
3
|
-
export interface NumberInputGroupProps extends Omit<InputGroupProps<number | undefined>, 'onChange' | 'type' | 'value'> {
|
3
|
+
export interface NumberInputGroupProps extends Omit<InputGroupProps<number | undefined | null>, 'onChange' | 'type' | 'value'> {
|
4
4
|
parseFunc?: typeof parseInt | typeof parseFloat;
|
5
5
|
}
|
6
6
|
declare const NumberInputGroupWithRef: React.ComponentType<NumberInputGroupProps>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { InputGroupProps } from './InputGroup';
|
3
|
-
export interface StringInputGroupProps extends Omit<InputGroupProps<string | undefined>, 'onChange' | 'type' | 'value'> {
|
3
|
+
export interface StringInputGroupProps extends Omit<InputGroupProps<string | undefined | null>, 'onChange' | 'type' | 'value'> {
|
4
4
|
type?: 'color' | 'email' | 'search' | 'tel' | 'text' | 'url' | 'password' | 'textarea';
|
5
5
|
}
|
6
6
|
declare const StringInputGroupWithRef: React.ComponentType<StringInputGroupProps>;
|
@@ -26,9 +26,10 @@ import classNames from 'classnames';
|
|
26
26
|
import InputGroup from './InputGroup';
|
27
27
|
import { FormDefaults } from '../FormDefaults';
|
28
28
|
function StringInputGroup(_a, ref) {
|
29
|
+
var _b;
|
29
30
|
var className = _a.className, rest = __rest(_a, ["className"]);
|
30
31
|
var input = rest.input;
|
31
|
-
return (_jsx(InputGroup, __assign({ ref: ref }, rest, { className: classNames(className, FormDefaults.cssClassPrefix + 'string-group'), value: input.value
|
32
|
+
return (_jsx(InputGroup, __assign({ ref: ref }, rest, { className: classNames(className, FormDefaults.cssClassPrefix + 'string-group'), value: (_b = input.value) !== null && _b !== void 0 ? _b : '', onChange: function (e) {
|
32
33
|
if (!e.target.value) {
|
33
34
|
input.onChange(undefined);
|
34
35
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const phoneNumber: (value: string | undefined) => string | undefined;
|
2
|
-
export declare const zipCode: (value: string | undefined) => string | undefined;
|
1
|
+
export declare const phoneNumber: (value: string | undefined | null) => string | undefined;
|
2
|
+
export declare const zipCode: (value: string | undefined | null) => string | undefined;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { SelectOption } from './SelectGroup';
|
3
3
|
import { SelectGroupPropsHelper } from './SelectGroupPropsHelper';
|
4
|
-
export interface BooleanSelectGroupProps extends Omit<SelectGroupPropsHelper<boolean>, 'options'> {
|
4
|
+
export interface BooleanSelectGroupProps extends Omit<SelectGroupPropsHelper<boolean | undefined | null>, 'options'> {
|
5
5
|
options?: SelectOption<boolean>[];
|
6
6
|
}
|
7
7
|
export declare function BooleanSelectGroup(props: BooleanSelectGroupProps): JSX.Element;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { SelectGroupPropsHelper } from './SelectGroupPropsHelper';
|
3
|
-
export interface MultiNumberSelectGroupProps extends SelectGroupPropsHelper<number[]> {
|
3
|
+
export interface MultiNumberSelectGroupProps extends SelectGroupPropsHelper<number[] | undefined | null> {
|
4
4
|
}
|
5
5
|
export declare function MultiNumberSelectGroup(props: MultiNumberSelectGroupProps): JSX.Element;
|
6
|
-
export interface SingleNumberSelectGroupProps extends SelectGroupPropsHelper<number> {
|
6
|
+
export interface SingleNumberSelectGroupProps extends SelectGroupPropsHelper<number | undefined | null> {
|
7
7
|
}
|
8
8
|
export declare function SingleNumberSelectGroup(props: SingleNumberSelectGroupProps): JSX.Element;
|
@@ -13,7 +13,7 @@ interface OptionsUseServiceResult<TValue> {
|
|
13
13
|
resp?: Partial<SelectOption<TValue>>[] | OptionsApiResult<TValue> | null;
|
14
14
|
error?: any;
|
15
15
|
}
|
16
|
-
export interface SelectGroupProps<TValue> extends InjectedFieldProps<TValue | undefined>, Omit<GroupProps, 'input' | 'meta' | 'children'> {
|
16
|
+
export interface SelectGroupProps<TValue> extends InjectedFieldProps<TValue | undefined | null>, Omit<GroupProps, 'input' | 'meta' | 'children'> {
|
17
17
|
options: SelectOption<TValue>[] | OptionsUseServiceResult<TValue>;
|
18
18
|
multiple: TValue extends Array<any> ? true : false;
|
19
19
|
placeholder?: string;
|
package/es/Select/SelectGroup.js
CHANGED
@@ -23,8 +23,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
24
24
|
import { default as ReactSelect } from 'react-select';
|
25
25
|
import classNames from 'classnames';
|
26
|
-
import Group from '../Group';
|
27
26
|
import { FormDefaults } from '../FormDefaults';
|
27
|
+
import Group from '../Group';
|
28
28
|
// TODO: we could also name this "ReactSelectGroup" or similar but the types are strongly defined now so kept the names consistent
|
29
29
|
export default function SelectGroup(_a) {
|
30
30
|
var _b;
|
package/es/SubmitFormButton.d.ts
CHANGED
@@ -3,5 +3,5 @@ export interface SubmitFormButtonProps extends Omit<React.HTMLProps<HTMLButtonEl
|
|
3
3
|
allowPristineSubmit?: boolean;
|
4
4
|
children?: React.ReactNode;
|
5
5
|
}
|
6
|
-
declare const _default: React.
|
6
|
+
declare const _default: React.FunctionComponent<SubmitFormButtonProps>;
|
7
7
|
export default _default;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { InjectedFieldProps } from '../Field/InjectedFieldProps';
|
3
3
|
import { GroupProps } from '../Group';
|
4
|
-
export interface TextAreaGroupProps extends InjectedFieldProps<string | undefined>, Omit<React.HTMLProps<HTMLTextAreaElement>, keyof InjectedFieldProps<any> | 'children' | 'className' | 'label'>, Omit<GroupProps, keyof InjectedFieldProps<any> | 'children'> {
|
4
|
+
export interface TextAreaGroupProps extends InjectedFieldProps<string | undefined | null>, Omit<React.HTMLProps<HTMLTextAreaElement>, keyof InjectedFieldProps<any> | 'children' | 'className' | 'label'>, Omit<GroupProps, keyof InjectedFieldProps<any> | 'children'> {
|
5
5
|
icon?: React.ReactNode;
|
6
6
|
}
|
7
7
|
declare const TextAreaGroupWithRef: React.ComponentType<TextAreaGroupProps>;
|
@@ -23,12 +23,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
24
|
import React from 'react';
|
25
25
|
import classNames from 'classnames';
|
26
|
-
import Group from '../Group';
|
27
26
|
import { FormDefaults } from '../FormDefaults';
|
27
|
+
import Group from '../Group';
|
28
28
|
/** generic controlled <textarea/> wrapped by a Group */
|
29
29
|
function TextAreaGroup(_a, ref) {
|
30
|
+
var _b;
|
30
31
|
var input = _a.input, meta = _a.meta, label = _a.label, helpText = _a.helpText, className = _a.className, required = _a.required, disabled = _a.disabled, icon = _a.icon, rest = __rest(_a, ["input", "meta", "label", "helpText", "className", "required", "disabled", "icon"]);
|
31
|
-
return (_jsxs(Group, __assign({ input: input, meta: meta, required: required, disabled: disabled, label: label, helpText: helpText, className: classNames(className, FormDefaults.cssClassPrefix + 'text-area-group') }, { children: [icon, _jsx("textarea", __assign({}, input, rest, { value: input.value, onChange: function (val) { return input.onChange(val.target.value); }, ref: ref, className: classNames(className, FormDefaults.cssClassPrefix + 'text-area-group') }))] })));
|
32
|
+
return (_jsxs(Group, __assign({ input: input, meta: meta, required: required, disabled: disabled, label: label, helpText: helpText, className: classNames(className, FormDefaults.cssClassPrefix + 'text-area-group') }, { children: [icon, _jsx("textarea", __assign({}, input, rest, { value: (_b = input.value) !== null && _b !== void 0 ? _b : '', onChange: function (val) { return input.onChange(val.target.value); }, ref: ref, className: classNames(className, FormDefaults.cssClassPrefix + 'text-area-group') }))] })));
|
32
33
|
}
|
33
34
|
var TextAreaGroupWithRef = React.forwardRef(TextAreaGroup);
|
34
35
|
export default TextAreaGroupWithRef;
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import { ValidationFunction } from './ValidationFunction';
|
2
2
|
export declare const required: (value: any) => "Required" | undefined;
|
3
|
-
export declare const length: (len: number) => (value: string | number | undefined) => string | undefined;
|
4
|
-
export declare const integer: (val: string | number | undefined) => "Must be a whole number" | undefined;
|
5
|
-
export declare const maxLength: (len: number) => (value: string | number | undefined) => string | undefined;
|
3
|
+
export declare const length: (len: number) => (value: string | number | undefined | null) => string | undefined;
|
4
|
+
export declare const integer: (val: string | number | undefined | null) => "Must be a whole number" | undefined;
|
5
|
+
export declare const maxLength: (len: number) => (value: string | number | undefined | null) => string | undefined;
|
6
6
|
export declare const maxCount: (count: number) => (value: {
|
7
7
|
isDeleted?: boolean;
|
8
|
-
}[] | undefined) => string | undefined;
|
8
|
+
}[] | undefined | null) => string | undefined;
|
9
9
|
export declare const minCount: (count: number) => (value: {
|
10
10
|
isDeleted?: boolean;
|
11
|
-
}[] | undefined) => string | undefined;
|
12
|
-
export declare const maxValue: (max: number) => (value: number | undefined) => string | undefined;
|
13
|
-
export declare const minValue: (min: number) => (value: number | undefined) => string | undefined;
|
14
|
-
export declare const zipCode: (value: string | undefined) => "Invalid ZIP Code" | undefined;
|
11
|
+
}[] | undefined | null) => string | undefined;
|
12
|
+
export declare const maxValue: (max: number) => (value: number | undefined | null) => string | undefined;
|
13
|
+
export declare const minValue: (min: number) => (value: number | undefined | null) => string | undefined;
|
14
|
+
export declare const zipCode: (value: string | undefined | null) => "Invalid ZIP Code" | undefined;
|
15
15
|
export declare const any: <TValue>(validatorList: ValidationFunction<TValue>[]) => (value: TValue) => string | undefined;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import '@testing-library/jest-dom/extend-expect';
|
3
|
-
import { FormBuilderProp } from '
|
3
|
+
import { FormBuilderProp } from '../';
|
4
4
|
interface FormTestBaseProps<TForm extends object> {
|
5
5
|
children: (formBuilder: FormBuilderProp<TForm>) => JSX.Element;
|
6
6
|
initialValues?: TForm;
|
@@ -48,7 +48,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
48
48
|
import { jsx as _jsx } from "react/jsx-runtime";
|
49
49
|
import '@testing-library/jest-dom/extend-expect';
|
50
50
|
import { HashRouter } from 'react-router-dom';
|
51
|
-
import { Form } from '
|
51
|
+
import { Form } from '../';
|
52
52
|
export default function FormTestBase(_a) {
|
53
53
|
var children = _a.children, initialValues = _a.initialValues;
|
54
54
|
return (_jsx(HashRouter, { children: _jsx(Form, __assign({ onSubmit: onSubmit, initialValues: initialValues }, { children: children })) }));
|
package/es/index.d.ts
CHANGED
@@ -7,7 +7,7 @@ export type { ConfirmBaseFormProps } from './ConfirmBaseForm/ConfirmBaseForm';
|
|
7
7
|
export { default as ConfirmDeleteForm } from './ConfirmDeleteForm/ConfirmDeleteForm';
|
8
8
|
export type { ConfirmDeleteFormProps } from './ConfirmDeleteForm/ConfirmDeleteForm';
|
9
9
|
export { default as DatePickerGroup } from './DatePicker/DatePickerGroup';
|
10
|
-
export type { DatePickerGroupProps
|
10
|
+
export type { DatePickerGroupProps } from './DatePicker/DatePickerGroup';
|
11
11
|
export { convertToTimeZoneInsensitiveISOString } from './DatePicker/DatePickerGroup';
|
12
12
|
export type { DatePickerHelper } from './DatePicker/DatePickerHelper';
|
13
13
|
export { default as StringDatePickerGroup } from './DatePicker/StringDatePickerGroup';
|
@@ -34,12 +34,12 @@ export type { FormBuilderProp, FormProps } from './Form/Form';
|
|
34
34
|
export { ServerErrorContext } from './Form/ServerErrorContext';
|
35
35
|
export type { ServerErrorContextProps, ServerErrors, } from './Form/ServerErrorContext';
|
36
36
|
export { default as FormActions } from './FormActions';
|
37
|
-
export type { FormActionsProps
|
37
|
+
export type { FormActionsProps } from './FormActions';
|
38
38
|
export { default as StandardFormActions } from './StandardFormActions';
|
39
|
-
export type { StandardFormActionsProps
|
39
|
+
export type { StandardFormActionsProps } from './StandardFormActions';
|
40
40
|
export { FormDefaults } from './FormDefaults';
|
41
41
|
export { default as Group } from './Group';
|
42
|
-
export type { GroupProps
|
42
|
+
export type { GroupProps } from './Group';
|
43
43
|
export { default as IconInputGroup } from './Input/IconInputGroup';
|
44
44
|
export type { IconInputGroupProps } from './Input/IconInputGroup';
|
45
45
|
export { default as InputGroup } from './Input/InputGroup';
|
@@ -5,11 +5,11 @@ export interface AddressInputProps {
|
|
5
5
|
name: string;
|
6
6
|
}
|
7
7
|
interface AddressDto {
|
8
|
-
address1?: string;
|
9
|
-
address2?: string;
|
10
|
-
zipCode?: string;
|
11
|
-
city?: string;
|
12
|
-
state?: string;
|
8
|
+
address1?: string | null;
|
9
|
+
address2?: string | null;
|
10
|
+
zipCode?: string | null;
|
11
|
+
city?: string | null;
|
12
|
+
state?: string | null;
|
13
13
|
}
|
14
14
|
export default function AddressInput({ fieldBuilder: { Field }, name, }: AddressInputProps): JSX.Element;
|
15
15
|
export {};
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import { DatePickerProps } from 'react-date-picker/dist/entry.nostyle';
|
3
3
|
import { InjectedFieldProps } from '../Field/InjectedFieldProps';
|
4
4
|
import { GroupProps } from '../Group';
|
5
|
-
export interface DatePickerGroupProps<T> extends InjectedFieldProps<T | undefined>, Omit<DatePickerProps, keyof InjectedFieldProps<T> | 'name' | 'value' | 'className'>, Omit<GroupProps, keyof InjectedFieldProps<T> | 'children'> {
|
5
|
+
export interface DatePickerGroupProps<T> extends InjectedFieldProps<T | undefined | null>, Omit<DatePickerProps, keyof InjectedFieldProps<T> | 'name' | 'value' | 'className'>, Omit<GroupProps, keyof InjectedFieldProps<T> | 'children'> {
|
6
6
|
convert: (arg: Date) => T;
|
7
7
|
}
|
8
8
|
export default function DatePickerGroup<T>({ input, meta, label, helpText, className, required, disabled, convert, ...rest }: DatePickerGroupProps<T>): JSX.Element;
|
@@ -37,12 +37,17 @@ function DatePickerGroup(_a) {
|
|
37
37
|
var input = _a.input, meta = _a.meta, label = _a.label, helpText = _a.helpText, className = _a.className, required = _a.required, disabled = _a.disabled, convert = _a.convert, rest = __rest(_a, ["input", "meta", "label", "helpText", "className", "required", "disabled", "convert"]);
|
38
38
|
var _b = (0, react_1.useState)(null), displayDate = _b[0], setDisplayDate = _b[1];
|
39
39
|
(0, react_1.useEffect)(function () {
|
40
|
-
if (input.value
|
41
|
-
setDisplayDate(new Date("".concat(input.value, "T00:00:00.000")));
|
42
|
-
}
|
43
|
-
else {
|
40
|
+
if (!input.value) {
|
44
41
|
setDisplayDate(null);
|
45
42
|
}
|
43
|
+
else if (typeof input.value === 'string') {
|
44
|
+
if (input.value.indexOf('T') === -1) {
|
45
|
+
setDisplayDate(new Date("".concat(input.value, "T00:00:00.000")));
|
46
|
+
}
|
47
|
+
else {
|
48
|
+
setDisplayDate(new Date(input.value));
|
49
|
+
}
|
50
|
+
}
|
46
51
|
}, [setDisplayDate, input.value]);
|
47
52
|
return ((0, jsx_runtime_1.jsx)(Group_1.default, __assign({ input: input, meta: meta, label: label, helpText: helpText, className: (0, classnames_1.default)(className, FormDefaults_1.FormDefaults.cssClassPrefix + 'date-picker'), required: required, disabled: disabled }, { children: (0, jsx_runtime_1.jsx)(entry_nostyle_1.default, __assign({}, rest, { className: (0, classnames_1.default)(FormDefaults_1.FormDefaults.cssClassPrefix + 'date-picker', className), value: displayDate, onChange: handleChange })) })));
|
48
53
|
function handleChange(e) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { DatePickerHelper } from './DatePickerHelper';
|
3
|
-
export interface StringDateOnlyPickerGroupProps extends DatePickerHelper<string | undefined> {
|
3
|
+
export interface StringDateOnlyPickerGroupProps extends DatePickerHelper<string | undefined | null> {
|
4
4
|
}
|
5
5
|
export default function StringDatePickerGroup(props: StringDateOnlyPickerGroupProps): JSX.Element;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { DatePickerHelper } from './DatePickerHelper';
|
3
|
-
export interface StringDatePickerGroupProps extends DatePickerHelper<string | undefined> {
|
3
|
+
export interface StringDatePickerGroupProps extends DatePickerHelper<string | undefined | null> {
|
4
4
|
}
|
5
5
|
export default function StringDatePickerGroup(props: StringDatePickerGroupProps): JSX.Element;
|
package/lib/Field/Field.d.ts
CHANGED
@@ -2,8 +2,8 @@ import { ComponentProps, ElementType, LegacyRef } from 'react';
|
|
2
2
|
import { InjectedFieldProps } from './InjectedFieldProps';
|
3
3
|
import { NormalizationFunction } from '../Normalization/NormalizationFunction';
|
4
4
|
import { ValidationFunction } from '../Validation/ValidationFunction';
|
5
|
-
export declare type RenderComponent<TValue, TRenderComponent extends ElementType> = Partial<ComponentProps<TRenderComponent>> extends Partial<InjectedFieldProps<TValue | undefined>> ? TRenderComponent : never;
|
6
|
-
export declare type RenderComponentProps<TValue, TRenderComponent extends ElementType> = Partial<ComponentProps<TRenderComponent>> extends Partial<InjectedFieldProps<TValue | undefined>> ? ComponentProps<TRenderComponent> : never;
|
5
|
+
export declare type RenderComponent<TValue, TRenderComponent extends ElementType> = Partial<ComponentProps<TRenderComponent>> extends Partial<InjectedFieldProps<TValue | undefined | null>> ? TRenderComponent : never;
|
6
|
+
export declare type RenderComponentProps<TValue, TRenderComponent extends ElementType> = Partial<ComponentProps<TRenderComponent>> extends Partial<InjectedFieldProps<TValue | undefined | null>> ? ComponentProps<TRenderComponent> : never;
|
7
7
|
/** A specific Field instance to be rendered by the given TRenderComponent or by whatever default is reasonable */
|
8
8
|
export declare type FieldProps<TForm extends object, TProp extends keyof TForm, TRenderComponent extends ElementType> = {
|
9
9
|
name: TProp;
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import { ElementType } from 'react';
|
2
2
|
import { FieldProps } from '../Field/Field';
|
3
3
|
import { ValidationFunction } from '../Validation/ValidationFunction';
|
4
|
-
export declare type FieldArrayProps<TForm extends object, TProp extends keyof TForm> = TForm[TProp] extends Array<any> | undefined ? {
|
4
|
+
export declare type FieldArrayProps<TForm extends object, TProp extends keyof TForm> = TForm[TProp] extends Array<any> | undefined | null ? {
|
5
5
|
name: TProp;
|
6
6
|
label?: string;
|
7
7
|
disabled?: boolean;
|
8
8
|
validate?: ValidationFunction<TForm[TProp]> | ValidationFunction<TForm[TProp]>[];
|
9
9
|
children: (formBuilder: ArrayFormBuilderProp<TForm[TProp]>) => JSX.Element;
|
10
10
|
} : never;
|
11
|
-
export declare type ArrayFormBuilderProp<TValue extends Array<any> | undefined> = TValue extends Array<infer TForm> | undefined ? TForm extends object ? {
|
11
|
+
export declare type ArrayFormBuilderProp<TValue extends Array<any> | undefined | null> = TValue extends Array<infer TForm> | undefined | null ? TForm extends object ? {
|
12
12
|
Field: <TProp extends keyof TForm, TRenderComponent extends ElementType>(props: FieldProps<TForm, TProp, TRenderComponent>) => JSX.Element;
|
13
13
|
FieldArray: <TProp extends keyof TForm>(props: FieldArrayProps<TForm, TProp>) => JSX.Element;
|
14
14
|
} : never : never;
|
@@ -43,11 +43,11 @@ var FormDefaults_1 = require("../FormDefaults");
|
|
43
43
|
function FieldArray(_a) {
|
44
44
|
var _b;
|
45
45
|
var name = _a.name, label = _a.label, validate = _a.validate, disabled = _a.disabled, children = _a.children, rest = __rest(_a, ["name", "label", "validate", "disabled", "children"]);
|
46
|
-
var
|
46
|
+
var input = (0, useStandardField_1.default)({
|
47
47
|
name: String(name),
|
48
48
|
validate: validate,
|
49
49
|
disabled: disabled,
|
50
|
-
})
|
50
|
+
})[0];
|
51
51
|
var values = !input.value
|
52
52
|
? []
|
53
53
|
: Array.isArray(input.value)
|
package/lib/File/FileGroup.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { InjectedFieldProps } from '../Field/InjectedFieldProps';
|
3
3
|
import { GroupProps } from '../Group';
|
4
|
-
export interface FileGroupProps extends InjectedFieldProps<any | undefined>, Omit<GroupProps, keyof InjectedFieldProps<any> | 'children'>, Omit<React.HTMLProps<HTMLInputElement>, keyof InjectedFieldProps<any> | 'children' | 'className' | 'label'> {
|
4
|
+
export interface FileGroupProps extends InjectedFieldProps<any | undefined | null>, Omit<GroupProps, keyof InjectedFieldProps<any> | 'children'>, Omit<React.HTMLProps<HTMLInputElement>, keyof InjectedFieldProps<any> | 'children' | 'className' | 'label'> {
|
5
5
|
multiple?: boolean | undefined;
|
6
6
|
}
|
7
7
|
declare const FileGroupWithRef: React.ComponentType<FileGroupProps>;
|