@pixpilot/formily-shadcn 1.9.0 → 1.10.0
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/components/FormGrid.d.ts +2 -2
- package/dist/components/IconPicker.d.ts +3 -3
- package/dist/components/IconToggle.d.ts +2 -2
- package/dist/components/Input.d.ts +3 -3
- package/dist/components/Radio.d.ts +2 -2
- package/dist/components/Rating.d.ts +4 -4
- package/dist/components/Row.d.ts +2 -2
- package/dist/components/Separator.d.ts +2 -2
- package/dist/components/Switch.d.ts +2 -2
- package/dist/components/TagsInputInline.d.ts +3 -3
- package/dist/components/ToggleButton.d.ts +3 -3
- package/dist/components/file-upload/AvatarUpload.cjs +1 -1
- package/dist/components/file-upload/AvatarUpload.js +1 -1
- package/dist/components/file-upload/FileUploadInline.cjs +1 -1
- package/dist/components/file-upload/FileUploadInline.js +1 -1
- package/dist/components/file-upload/map-upload-props.cjs +39 -20
- package/dist/components/file-upload/map-upload-props.js +39 -20
- package/dist/components/number/NumberInput.d.ts +3 -3
- package/dist/components/schema-field/schema-field-basics.d.cts +288 -288
- package/dist/components/schema-field/schema-field-basics.d.ts +287 -287
- package/dist/components/schema-field/schema-field-extended.d.ts +463 -463
- package/dist/components/schema-field/schema-field.d.cts +398 -398
- package/dist/components/schema-field/schema-field.d.ts +397 -397
- package/dist/components/slider/Slider.d.cts +3 -3
- package/dist/components/slider/Slider.d.ts +3 -3
- package/dist/components/slider/SliderInput.d.cts +3 -3
- package/dist/components/slider/SliderSelect.d.cts +3 -3
- package/dist/components/slider/SliderSelect.d.ts +3 -3
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/FormGrid.d.ts
|
|
5
5
|
interface IFormGridProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
@@ -7,6 +7,6 @@ declare function FormGrid({
|
|
|
7
7
|
className,
|
|
8
8
|
children,
|
|
9
9
|
...rest
|
|
10
|
-
}: IFormGridProps):
|
|
10
|
+
}: IFormGridProps): react_jsx_runtime2.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { FormGrid };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react7 from "react";
|
|
2
2
|
import { IconPickerProps, IconProviderProps } from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/IconPicker.d.ts
|
|
@@ -8,8 +8,8 @@ import { IconPickerProps, IconProviderProps } from "@pixpilot/shadcn-ui";
|
|
|
8
8
|
* Automatically connects to Formily field state
|
|
9
9
|
* Supports both static and async icon providers
|
|
10
10
|
*/
|
|
11
|
-
declare const IconPicker$1:
|
|
11
|
+
declare const IconPicker$1: react7.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
|
|
12
12
|
providers?: IconProviderProps[];
|
|
13
|
-
}> &
|
|
13
|
+
}> & react7.RefAttributes<unknown>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { IconPicker$1 as IconPicker };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react9 from "react";
|
|
2
2
|
import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/IconToggle.d.ts
|
|
@@ -6,6 +6,6 @@ import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
|
|
|
6
6
|
* Formily-connected IconToggle component
|
|
7
7
|
* Toggle button with customizable icons for boolean values
|
|
8
8
|
*/
|
|
9
|
-
declare const IconToggle$1:
|
|
9
|
+
declare const IconToggle$1: react9.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui0.IconToggleProps, "ref"> & react9.RefAttributes<HTMLButtonElement>>, "ref"> & react9.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { IconToggle$1 as IconToggle };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react12 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/components/Input.d.ts
|
|
4
4
|
|
|
@@ -6,12 +6,12 @@ import * as react9 from "react";
|
|
|
6
6
|
* Formily-connected Input component
|
|
7
7
|
* Automatically connects shadcn Input to Formily field state
|
|
8
8
|
*/
|
|
9
|
-
declare const Input:
|
|
9
|
+
declare const Input: react12.ForwardRefExoticComponent<Omit<Partial<react12.ClassAttributes<HTMLInputElement> & react12.InputHTMLAttributes<HTMLInputElement> & {
|
|
10
10
|
prefix?: React.ReactNode;
|
|
11
11
|
suffix?: React.ReactNode;
|
|
12
12
|
groupClassName?: string;
|
|
13
13
|
prefixClassName?: string;
|
|
14
14
|
suffixClassName?: string;
|
|
15
|
-
}>, "ref"> &
|
|
15
|
+
}>, "ref"> & react12.RefAttributes<unknown>>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { Input };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
import { RadioGroup } from "@pixpilot/shadcn";
|
|
4
4
|
|
|
5
5
|
//#region src/components/Radio.d.ts
|
|
@@ -15,7 +15,7 @@ type RadioProps = {
|
|
|
15
15
|
/**
|
|
16
16
|
* Radio component with options rendering
|
|
17
17
|
*/
|
|
18
|
-
declare function Radio(props: RadioProps):
|
|
18
|
+
declare function Radio(props: RadioProps): react_jsx_runtime0.JSX.Element;
|
|
19
19
|
declare namespace Radio {
|
|
20
20
|
var displayName: string;
|
|
21
21
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react4 from "react";
|
|
2
2
|
import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Rating.d.ts
|
|
@@ -6,8 +6,8 @@ import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
|
|
|
6
6
|
* Formily-connected Rating component
|
|
7
7
|
* Automatically connects shadcn-ui Rating to Formily field state
|
|
8
8
|
*/
|
|
9
|
-
declare const Rating$1:
|
|
10
|
-
children?:
|
|
11
|
-
}> &
|
|
9
|
+
declare const Rating$1: react4.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.RatingProps & {
|
|
10
|
+
children?: react4.ReactNode | undefined;
|
|
11
|
+
}> & react4.RefAttributes<unknown>>;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { Rating$1 as Rating };
|
package/dist/components/Row.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Row.d.ts
|
|
5
5
|
interface IRowProps {
|
|
@@ -36,6 +36,6 @@ interface IRowProps {
|
|
|
36
36
|
declare function Row({
|
|
37
37
|
className,
|
|
38
38
|
children
|
|
39
|
-
}: IRowProps):
|
|
39
|
+
}: IRowProps): react_jsx_runtime3.JSX.Element;
|
|
40
40
|
//#endregion
|
|
41
41
|
export { Row };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react16 from "react";
|
|
2
2
|
import * as _radix_ui_react_separator0 from "@radix-ui/react-separator";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Separator.d.ts
|
|
@@ -6,6 +6,6 @@ import * as _radix_ui_react_separator0 from "@radix-ui/react-separator";
|
|
|
6
6
|
* Formily-connected Separator component
|
|
7
7
|
* A visual divider for content sections
|
|
8
8
|
*/
|
|
9
|
-
declare const Separator:
|
|
9
|
+
declare const Separator: react16.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator0.SeparatorProps & react16.RefAttributes<HTMLDivElement>>, "ref"> & react16.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Separator };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react19 from "react";
|
|
2
2
|
import * as _radix_ui_react_switch0 from "@radix-ui/react-switch";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Switch.d.ts
|
|
@@ -6,6 +6,6 @@ import * as _radix_ui_react_switch0 from "@radix-ui/react-switch";
|
|
|
6
6
|
* Formily-connected Switch component
|
|
7
7
|
* Toggle switch for boolean values
|
|
8
8
|
*/
|
|
9
|
-
declare const Switch:
|
|
9
|
+
declare const Switch: react19.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch0.SwitchProps & react19.RefAttributes<HTMLButtonElement>>, "ref"> & react19.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Switch };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react29 from "react";
|
|
2
|
+
import * as _pixpilot_shadcn_ui2 from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/TagsInputInline.d.ts
|
|
5
5
|
|
|
@@ -10,6 +10,6 @@ import * as _pixpilot_shadcn_ui1 from "@pixpilot/shadcn-ui";
|
|
|
10
10
|
* Based on DiceUI's tags-input for inline tag editing with keyboard navigation
|
|
11
11
|
* and validation support.
|
|
12
12
|
*/
|
|
13
|
-
declare const TagsInputInLine:
|
|
13
|
+
declare const TagsInputInLine: react29.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui2.TagsInputProps> & react29.RefAttributes<unknown>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { TagsInputInLine };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react26 from "react";
|
|
2
|
+
import * as _pixpilot_shadcn_ui1 from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ToggleButton.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Formily-connected IconToggle component
|
|
7
7
|
* Toggle button with customizable icons for boolean values
|
|
8
8
|
*/
|
|
9
|
-
declare const ToggleButton$1:
|
|
9
|
+
declare const ToggleButton$1: react26.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui1.ToggleButtonProps, "ref"> & react26.RefAttributes<HTMLButtonElement>>, "ref"> & react26.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { ToggleButton$1 as ToggleButton };
|
|
@@ -26,7 +26,7 @@ const BaseAvatarUpload = (props) => {
|
|
|
26
26
|
* Formily-connected AvatarUpload component
|
|
27
27
|
* Automatically connects shadcn AvatarUpload to Formily field state
|
|
28
28
|
*/
|
|
29
|
-
const AvatarUpload = (0, __formily_react.connect)(BaseAvatarUpload, (0, __formily_react.mapProps)((props, field) => require_map_upload_props.mapUploadProps(props, field)));
|
|
29
|
+
const AvatarUpload = (0, __formily_react.connect)(BaseAvatarUpload, (0, __formily_react.mapProps)((props, field) => require_map_upload_props.mapUploadProps(props, field, { forceSingle: true })));
|
|
30
30
|
|
|
31
31
|
//#endregion
|
|
32
32
|
exports.AvatarUpload = AvatarUpload;
|
|
@@ -21,7 +21,7 @@ const BaseAvatarUpload = (props) => {
|
|
|
21
21
|
* Formily-connected AvatarUpload component
|
|
22
22
|
* Automatically connects shadcn AvatarUpload to Formily field state
|
|
23
23
|
*/
|
|
24
|
-
const AvatarUpload$1 = connect(BaseAvatarUpload, mapProps((props, field) => mapUploadProps(props, field)));
|
|
24
|
+
const AvatarUpload$1 = connect(BaseAvatarUpload, mapProps((props, field) => mapUploadProps(props, field, { forceSingle: true })));
|
|
25
25
|
|
|
26
26
|
//#endregion
|
|
27
27
|
export { AvatarUpload$1 as AvatarUpload };
|
|
@@ -26,7 +26,7 @@ const BaseFileUploadInline = (props) => {
|
|
|
26
26
|
* Formily-connected FileUploadInline component
|
|
27
27
|
* Automatically connects shadcn FileUploadInline to Formily field state
|
|
28
28
|
*/
|
|
29
|
-
const FileUploadInline = (0, __formily_react.connect)(BaseFileUploadInline, (0, __formily_react.mapProps)((props, field) => require_map_upload_props.mapUploadProps(props, field)));
|
|
29
|
+
const FileUploadInline = (0, __formily_react.connect)(BaseFileUploadInline, (0, __formily_react.mapProps)((props, field) => require_map_upload_props.mapUploadProps(props, field, { forceSingle: props.multiple !== true })));
|
|
30
30
|
|
|
31
31
|
//#endregion
|
|
32
32
|
exports.FileUploadInline = FileUploadInline;
|
|
@@ -21,7 +21,7 @@ const BaseFileUploadInline = (props) => {
|
|
|
21
21
|
* Formily-connected FileUploadInline component
|
|
22
22
|
* Automatically connects shadcn FileUploadInline to Formily field state
|
|
23
23
|
*/
|
|
24
|
-
const FileUploadInline$1 = connect(BaseFileUploadInline, mapProps((props, field) => mapUploadProps(props, field)));
|
|
24
|
+
const FileUploadInline$1 = connect(BaseFileUploadInline, mapProps((props, field) => mapUploadProps(props, field, { forceSingle: props.multiple !== true })));
|
|
25
25
|
|
|
26
26
|
//#endregion
|
|
27
27
|
export { FileUploadInline$1 as FileUploadInline };
|
|
@@ -7,41 +7,60 @@
|
|
|
7
7
|
* component displays the currently stored file metadata.
|
|
8
8
|
* - Applies `mapValue` to the field value before forwarding it so callers can
|
|
9
9
|
* derive a display-ready file object without mutating the stored form value.
|
|
10
|
-
* -
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* - Wraps `
|
|
17
|
-
* upload
|
|
18
|
-
* supplied.
|
|
10
|
+
* - Provides a guarded `onChange` that only writes to the field on deletions
|
|
11
|
+
* (value becomes `null` for single-file, or the array shrinks for
|
|
12
|
+
* multi-file). New-file accepts fire `onChange` before the upload
|
|
13
|
+
* completes with incomplete metadata (no `url`), so those calls are
|
|
14
|
+
* intentionally ignored here — `onFileSuccess` handles the final write
|
|
15
|
+
* once the upload finishes.
|
|
16
|
+
* - Wraps `onFileSuccess` so that `field.setValue(fileMeta)` is called only
|
|
17
|
+
* after a successful upload, followed by the original `onFileSuccess`
|
|
18
|
+
* callback if one was supplied. When the field value is an array (multiple
|
|
19
|
+
* mode), the new file is appended to the existing array rather than
|
|
20
|
+
* replacing it.
|
|
21
|
+
* - Wraps `onFileError` so that `field.setFeedback({ type: 'error', … })` is
|
|
22
|
+
* set on upload failure, followed by the original `onFileError` callback if
|
|
23
|
+
* one was supplied.
|
|
19
24
|
*
|
|
20
25
|
* The generic `P extends object` constraint keeps the return type identical to
|
|
21
26
|
* the input type so that the mapper satisfies Formily's `IStateMapper<T>`.
|
|
22
27
|
* Internally the props are cast to `UploadFieldCallbacks` to access the
|
|
23
|
-
* upload-specific callbacks;
|
|
24
|
-
*
|
|
25
|
-
* because this function only overrides `onSuccess` and `onError`.
|
|
28
|
+
* upload-specific callbacks; both single-file and multiple-file modes share
|
|
29
|
+
* the same `onFileSuccess`/`onFileError` callbacks that fire per file.
|
|
26
30
|
*/
|
|
27
|
-
function mapUploadProps(props, field) {
|
|
28
|
-
const {
|
|
31
|
+
function mapUploadProps(props, field, options) {
|
|
32
|
+
const { onFileSuccess, onFileError, mapValue,...restProps } = props;
|
|
33
|
+
const { multiple } = props;
|
|
34
|
+
const isSingle = multiple !== true && (options?.forceSingle === true || multiple === false);
|
|
29
35
|
const baseValue = field.value ?? null;
|
|
30
36
|
const value = mapValue ? mapValue(baseValue) : baseValue;
|
|
37
|
+
const currentMultipleFiles = (() => {
|
|
38
|
+
const currentValue = field.value;
|
|
39
|
+
if (Array.isArray(currentValue)) return currentValue;
|
|
40
|
+
if (currentValue == null) return [];
|
|
41
|
+
return [currentValue];
|
|
42
|
+
})();
|
|
31
43
|
return {
|
|
32
44
|
...restProps,
|
|
33
45
|
value,
|
|
34
|
-
onChange:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
46
|
+
onChange: (newValue) => {
|
|
47
|
+
if (newValue === null) field.setValue(null);
|
|
48
|
+
else if (Array.isArray(newValue)) {
|
|
49
|
+
const currentLen = currentMultipleFiles.length;
|
|
50
|
+
if (newValue.length <= currentLen) field.setValue(newValue);
|
|
51
|
+
}
|
|
38
52
|
},
|
|
39
|
-
|
|
53
|
+
onFileSuccess: (fileMeta) => {
|
|
54
|
+
if (!isSingle) field.setValue([...currentMultipleFiles, fileMeta]);
|
|
55
|
+
else field.setValue(fileMeta);
|
|
56
|
+
onFileSuccess?.(fileMeta);
|
|
57
|
+
},
|
|
58
|
+
onFileError: (file, error) => {
|
|
40
59
|
field.setFeedback({
|
|
41
60
|
type: "error",
|
|
42
61
|
messages: [error]
|
|
43
62
|
});
|
|
44
|
-
|
|
63
|
+
onFileError?.(file, error);
|
|
45
64
|
}
|
|
46
65
|
};
|
|
47
66
|
}
|
|
@@ -6,41 +6,60 @@
|
|
|
6
6
|
* component displays the currently stored file metadata.
|
|
7
7
|
* - Applies `mapValue` to the field value before forwarding it so callers can
|
|
8
8
|
* derive a display-ready file object without mutating the stored form value.
|
|
9
|
-
* -
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* - Wraps `
|
|
16
|
-
* upload
|
|
17
|
-
* supplied.
|
|
9
|
+
* - Provides a guarded `onChange` that only writes to the field on deletions
|
|
10
|
+
* (value becomes `null` for single-file, or the array shrinks for
|
|
11
|
+
* multi-file). New-file accepts fire `onChange` before the upload
|
|
12
|
+
* completes with incomplete metadata (no `url`), so those calls are
|
|
13
|
+
* intentionally ignored here — `onFileSuccess` handles the final write
|
|
14
|
+
* once the upload finishes.
|
|
15
|
+
* - Wraps `onFileSuccess` so that `field.setValue(fileMeta)` is called only
|
|
16
|
+
* after a successful upload, followed by the original `onFileSuccess`
|
|
17
|
+
* callback if one was supplied. When the field value is an array (multiple
|
|
18
|
+
* mode), the new file is appended to the existing array rather than
|
|
19
|
+
* replacing it.
|
|
20
|
+
* - Wraps `onFileError` so that `field.setFeedback({ type: 'error', … })` is
|
|
21
|
+
* set on upload failure, followed by the original `onFileError` callback if
|
|
22
|
+
* one was supplied.
|
|
18
23
|
*
|
|
19
24
|
* The generic `P extends object` constraint keeps the return type identical to
|
|
20
25
|
* the input type so that the mapper satisfies Formily's `IStateMapper<T>`.
|
|
21
26
|
* Internally the props are cast to `UploadFieldCallbacks` to access the
|
|
22
|
-
* upload-specific callbacks;
|
|
23
|
-
*
|
|
24
|
-
* because this function only overrides `onSuccess` and `onError`.
|
|
27
|
+
* upload-specific callbacks; both single-file and multiple-file modes share
|
|
28
|
+
* the same `onFileSuccess`/`onFileError` callbacks that fire per file.
|
|
25
29
|
*/
|
|
26
|
-
function mapUploadProps(props, field) {
|
|
27
|
-
const {
|
|
30
|
+
function mapUploadProps(props, field, options) {
|
|
31
|
+
const { onFileSuccess, onFileError, mapValue,...restProps } = props;
|
|
32
|
+
const { multiple } = props;
|
|
33
|
+
const isSingle = multiple !== true && (options?.forceSingle === true || multiple === false);
|
|
28
34
|
const baseValue = field.value ?? null;
|
|
29
35
|
const value = mapValue ? mapValue(baseValue) : baseValue;
|
|
36
|
+
const currentMultipleFiles = (() => {
|
|
37
|
+
const currentValue = field.value;
|
|
38
|
+
if (Array.isArray(currentValue)) return currentValue;
|
|
39
|
+
if (currentValue == null) return [];
|
|
40
|
+
return [currentValue];
|
|
41
|
+
})();
|
|
30
42
|
return {
|
|
31
43
|
...restProps,
|
|
32
44
|
value,
|
|
33
|
-
onChange:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
onChange: (newValue) => {
|
|
46
|
+
if (newValue === null) field.setValue(null);
|
|
47
|
+
else if (Array.isArray(newValue)) {
|
|
48
|
+
const currentLen = currentMultipleFiles.length;
|
|
49
|
+
if (newValue.length <= currentLen) field.setValue(newValue);
|
|
50
|
+
}
|
|
37
51
|
},
|
|
38
|
-
|
|
52
|
+
onFileSuccess: (fileMeta) => {
|
|
53
|
+
if (!isSingle) field.setValue([...currentMultipleFiles, fileMeta]);
|
|
54
|
+
else field.setValue(fileMeta);
|
|
55
|
+
onFileSuccess?.(fileMeta);
|
|
56
|
+
},
|
|
57
|
+
onFileError: (file, error) => {
|
|
39
58
|
field.setFeedback({
|
|
40
59
|
type: "error",
|
|
41
60
|
messages: [error]
|
|
42
61
|
});
|
|
43
|
-
|
|
62
|
+
onFileError?.(file, error);
|
|
44
63
|
}
|
|
45
64
|
};
|
|
46
65
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react1879 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/components/number/NumberInput.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Formily-connected Number Input component
|
|
6
6
|
*/
|
|
7
|
-
declare const NumberInput:
|
|
7
|
+
declare const NumberInput: react1879.ForwardRefExoticComponent<Omit<Partial<react1879.ClassAttributes<HTMLInputElement> & react1879.InputHTMLAttributes<HTMLInputElement> & {
|
|
8
8
|
prefix?: React.ReactNode;
|
|
9
9
|
suffix?: React.ReactNode;
|
|
10
10
|
groupClassName?: string;
|
|
11
11
|
prefixClassName?: string;
|
|
12
12
|
suffixClassName?: string;
|
|
13
|
-
}>, "ref"> &
|
|
13
|
+
}>, "ref"> & react1879.RefAttributes<unknown>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { NumberInput };
|