@pixpilot/formily-shadcn 1.7.5 → 1.9.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/Form.d.ts +2 -2
- package/dist/components/FormGrid.d.ts +2 -2
- package/dist/components/IconPicker.d.cts +3 -3
- package/dist/components/IconToggle.d.cts +2 -2
- package/dist/components/Radio.d.ts +2 -2
- package/dist/components/Row.d.ts +2 -2
- package/dist/components/Separator.d.ts +2 -2
- package/dist/components/Switch.d.cts +2 -2
- package/dist/components/Switch.d.ts +2 -2
- package/dist/components/TagsInputInline.d.cts +3 -3
- package/dist/components/TagsInputInline.d.ts +2 -2
- package/dist/components/Textarea.d.cts +2 -2
- package/dist/components/Textarea.d.ts +2 -2
- package/dist/components/ToggleButton.d.cts +3 -3
- package/dist/components/file-upload/AvatarUpload.cjs +5 -8
- package/dist/components/file-upload/AvatarUpload.d.cts +4 -3
- package/dist/components/file-upload/AvatarUpload.d.ts +4 -3
- package/dist/components/file-upload/AvatarUpload.js +5 -8
- package/dist/components/file-upload/FileUpload.cjs +7 -10
- package/dist/components/file-upload/FileUpload.d.cts +7 -14
- package/dist/components/file-upload/FileUpload.d.ts +7 -14
- package/dist/components/file-upload/FileUpload.js +7 -10
- package/dist/components/file-upload/FileUploadInline.cjs +5 -8
- package/dist/components/file-upload/FileUploadInline.d.cts +5 -12
- package/dist/components/file-upload/FileUploadInline.d.ts +5 -12
- package/dist/components/file-upload/FileUploadInline.js +5 -8
- package/dist/components/file-upload/index.d.cts +3 -3
- package/dist/components/file-upload/index.d.ts +3 -3
- package/dist/components/file-upload/map-upload-props.cjs +50 -0
- package/dist/components/file-upload/map-upload-props.d.cts +16 -0
- package/dist/components/file-upload/map-upload-props.d.ts +16 -0
- package/dist/components/file-upload/map-upload-props.js +49 -0
- package/dist/components/form-item/ConnectedFormItem.d.cts +4 -4
- package/dist/components/form-item/ConnectedFormItem.d.ts +4 -4
- package/dist/components/number/NumberInput.d.cts +3 -3
- package/dist/components/schema-field/schema-field-basics.d.cts +288 -288
- package/dist/components/schema-field/schema-field-basics.d.ts +303 -303
- package/dist/components/schema-field/schema-field-extended.d.cts +499 -671
- package/dist/components/schema-field/schema-field-extended.d.ts +505 -677
- package/dist/components/schema-field/schema-field.d.cts +398 -398
- package/dist/components/schema-field/schema-field.d.ts +412 -412
- 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/SliderInput.d.ts +3 -3
- package/dist/components/slider/SliderSelect.d.cts +3 -3
- package/dist/components/slider/SliderSelect.d.ts +3 -3
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/package.json +6 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormContextStates } from "./context/form-context.js";
|
|
2
2
|
import "./context/index.js";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
5
5
|
import { Form } from "@formily/core";
|
|
6
6
|
|
|
7
7
|
//#region src/components/Form.d.ts
|
|
@@ -25,6 +25,6 @@ declare function Form$1({
|
|
|
25
25
|
onAutoSubmit,
|
|
26
26
|
layout,
|
|
27
27
|
settings
|
|
28
|
-
}: IFormProps):
|
|
28
|
+
}: IFormProps): react_jsx_runtime1.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { Form$1 as Form };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime0 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_runtime0.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { FormGrid };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react4 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:
|
|
11
|
+
declare const IconPicker: react4.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
|
|
12
12
|
providers?: IconProviderProps[];
|
|
13
|
-
}> &
|
|
13
|
+
}> & react4.RefAttributes<unknown>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { IconPicker };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react6 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:
|
|
9
|
+
declare const IconToggle: react6.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui0.IconToggleProps, "ref"> & react6.RefAttributes<HTMLButtonElement>>, "ref"> & react6.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { IconToggle };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime3 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_runtime3.JSX.Element;
|
|
19
19
|
declare namespace Radio {
|
|
20
20
|
var displayName: string;
|
|
21
21
|
}
|
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_runtime2 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_runtime2.JSX.Element;
|
|
40
40
|
//#endregion
|
|
41
41
|
export { Row };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react19 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: react19.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator0.SeparatorProps & react19.RefAttributes<HTMLDivElement>>, "ref"> & react19.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,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react16 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: react16.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch0.SwitchProps & react16.RefAttributes<HTMLButtonElement>>, "ref"> & react16.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Switch };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react22 from "react";
|
|
2
|
+
import * as _pixpilot_shadcn_ui1 from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/TagsInputInline.d.ts
|
|
5
5
|
|
|
@@ -10,6 +10,6 @@ import * as _pixpilot_shadcn_ui2 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: react22.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui1.TagsInputProps> & react22.RefAttributes<unknown>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { TagsInputInLine };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react26 from "react";
|
|
2
2
|
import * as _pixpilot_shadcn_ui1 from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/TagsInputInline.d.ts
|
|
@@ -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: react26.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui1.TagsInputProps> & react26.RefAttributes<unknown>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { TagsInputInLine };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react24 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/components/Textarea.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Formily-connected Textarea component
|
|
6
6
|
*/
|
|
7
|
-
declare const Textarea:
|
|
7
|
+
declare const Textarea: react24.ForwardRefExoticComponent<Omit<Partial<react24.ClassAttributes<HTMLTextAreaElement> & react24.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react24.RefAttributes<unknown>>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Textarea };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react22 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/components/Textarea.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Formily-connected Textarea component
|
|
6
6
|
*/
|
|
7
|
-
declare const Textarea:
|
|
7
|
+
declare const Textarea: react22.ForwardRefExoticComponent<Omit<Partial<react22.ClassAttributes<HTMLTextAreaElement> & react22.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react22.RefAttributes<unknown>>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Textarea };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react28 from "react";
|
|
2
|
+
import * as _pixpilot_shadcn_ui2 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:
|
|
9
|
+
declare const ToggleButton: react28.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui2.ToggleButtonProps, "ref"> & react28.RefAttributes<HTMLButtonElement>>, "ref"> & react28.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { ToggleButton };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_map_upload_props = require('./map-upload-props.cjs');
|
|
2
3
|
const require_use_file_upload_feedback = require('./use-file-upload-feedback.cjs');
|
|
3
4
|
let __formily_react = require("@formily/react");
|
|
4
5
|
__formily_react = require_rolldown_runtime.__toESM(__formily_react);
|
|
@@ -11,9 +12,10 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
|
11
12
|
|
|
12
13
|
//#region src/components/file-upload/AvatarUpload.tsx
|
|
13
14
|
const BaseAvatarUpload = (props) => {
|
|
14
|
-
const {
|
|
15
|
+
const { mapValue: _mapValue,...uploadProps } = props;
|
|
16
|
+
const { onUpload, maxSize, handleFilesRejection, handleFileValidate } = require_use_file_upload_feedback.useFileUploadFeedback(uploadProps);
|
|
15
17
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.AvatarUpload, {
|
|
16
|
-
...
|
|
18
|
+
...uploadProps,
|
|
17
19
|
maxSize,
|
|
18
20
|
onFilesReject: handleFilesRejection,
|
|
19
21
|
onFileValidate: handleFileValidate,
|
|
@@ -24,12 +26,7 @@ const BaseAvatarUpload = (props) => {
|
|
|
24
26
|
* Formily-connected AvatarUpload component
|
|
25
27
|
* Automatically connects shadcn AvatarUpload to Formily field state
|
|
26
28
|
*/
|
|
27
|
-
const AvatarUpload = (0, __formily_react.connect)(BaseAvatarUpload, (0, __formily_react.mapProps)((props, field) =>
|
|
28
|
-
return {
|
|
29
|
-
...props,
|
|
30
|
-
value: field.value ?? null
|
|
31
|
-
};
|
|
32
|
-
}));
|
|
29
|
+
const AvatarUpload = (0, __formily_react.connect)(BaseAvatarUpload, (0, __formily_react.mapProps)((props, field) => require_map_upload_props.mapUploadProps(props, field)));
|
|
33
30
|
|
|
34
31
|
//#endregion
|
|
35
32
|
exports.AvatarUpload = AvatarUpload;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { FormilyUploadProps } from "./map-upload-props.cjs";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { AvatarUploadProps } from "@pixpilot/shadcn-ui";
|
|
3
4
|
|
|
4
5
|
//#region src/components/file-upload/AvatarUpload.d.ts
|
|
5
|
-
|
|
6
|
+
type AvatarUploadProps$1 = FormilyUploadProps<AvatarUploadProps>;
|
|
6
7
|
/**
|
|
7
8
|
* Formily-connected AvatarUpload component
|
|
8
9
|
* Automatically connects shadcn AvatarUpload to Formily field state
|
|
9
10
|
*/
|
|
10
|
-
declare const AvatarUpload: React.
|
|
11
|
+
declare const AvatarUpload: React.FC<AvatarUploadProps$1>;
|
|
11
12
|
//#endregion
|
|
12
|
-
export { AvatarUpload };
|
|
13
|
+
export { AvatarUpload, AvatarUploadProps$1 as AvatarUploadProps };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { FormilyUploadProps } from "./map-upload-props.js";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { AvatarUploadProps } from "@pixpilot/shadcn-ui";
|
|
3
4
|
|
|
4
5
|
//#region src/components/file-upload/AvatarUpload.d.ts
|
|
5
|
-
|
|
6
|
+
type AvatarUploadProps$1 = FormilyUploadProps<AvatarUploadProps>;
|
|
6
7
|
/**
|
|
7
8
|
* Formily-connected AvatarUpload component
|
|
8
9
|
* Automatically connects shadcn AvatarUpload to Formily field state
|
|
9
10
|
*/
|
|
10
|
-
declare const AvatarUpload$1: React.
|
|
11
|
+
declare const AvatarUpload$1: React.FC<AvatarUploadProps$1>;
|
|
11
12
|
//#endregion
|
|
12
|
-
export { AvatarUpload$1 as AvatarUpload };
|
|
13
|
+
export { AvatarUpload$1 as AvatarUpload, AvatarUploadProps$1 as AvatarUploadProps };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { mapUploadProps } from "./map-upload-props.js";
|
|
1
2
|
import { useFileUploadFeedback } from "./use-file-upload-feedback.js";
|
|
2
3
|
import { connect, mapProps } from "@formily/react";
|
|
3
4
|
import React from "react";
|
|
@@ -6,9 +7,10 @@ import { jsx } from "react/jsx-runtime";
|
|
|
6
7
|
|
|
7
8
|
//#region src/components/file-upload/AvatarUpload.tsx
|
|
8
9
|
const BaseAvatarUpload = (props) => {
|
|
9
|
-
const {
|
|
10
|
+
const { mapValue: _mapValue,...uploadProps } = props;
|
|
11
|
+
const { onUpload, maxSize, handleFilesRejection, handleFileValidate } = useFileUploadFeedback(uploadProps);
|
|
10
12
|
return /* @__PURE__ */ jsx(AvatarUpload, {
|
|
11
|
-
...
|
|
13
|
+
...uploadProps,
|
|
12
14
|
maxSize,
|
|
13
15
|
onFilesReject: handleFilesRejection,
|
|
14
16
|
onFileValidate: handleFileValidate,
|
|
@@ -19,12 +21,7 @@ const BaseAvatarUpload = (props) => {
|
|
|
19
21
|
* Formily-connected AvatarUpload component
|
|
20
22
|
* Automatically connects shadcn AvatarUpload to Formily field state
|
|
21
23
|
*/
|
|
22
|
-
const AvatarUpload$1 = connect(BaseAvatarUpload, mapProps((props, field) =>
|
|
23
|
-
return {
|
|
24
|
-
...props,
|
|
25
|
-
value: field.value ?? null
|
|
26
|
-
};
|
|
27
|
-
}));
|
|
24
|
+
const AvatarUpload$1 = connect(BaseAvatarUpload, mapProps((props, field) => mapUploadProps(props, field)));
|
|
28
25
|
|
|
29
26
|
//#endregion
|
|
30
27
|
export { AvatarUpload$1 as AvatarUpload };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_map_upload_props = require('./map-upload-props.cjs');
|
|
2
3
|
const require_use_file_upload_feedback = require('./use-file-upload-feedback.cjs');
|
|
3
4
|
let __formily_react = require("@formily/react");
|
|
4
5
|
__formily_react = require_rolldown_runtime.__toESM(__formily_react);
|
|
@@ -11,9 +12,10 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
|
11
12
|
|
|
12
13
|
//#region src/components/file-upload/FileUpload.tsx
|
|
13
14
|
const BaseFileUpload = (props) => {
|
|
14
|
-
const {
|
|
15
|
+
const { mapValue: _mapValue,...uploadProps } = props;
|
|
16
|
+
const { onUpload, maxSize, handleFilesRejection, handleFileValidate } = require_use_file_upload_feedback.useFileUploadFeedback(uploadProps);
|
|
15
17
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.FileUpload, {
|
|
16
|
-
...
|
|
18
|
+
...uploadProps,
|
|
17
19
|
maxSize,
|
|
18
20
|
onFilesReject: handleFilesRejection,
|
|
19
21
|
onFileValidate: handleFileValidate,
|
|
@@ -21,15 +23,10 @@ const BaseFileUpload = (props) => {
|
|
|
21
23
|
});
|
|
22
24
|
};
|
|
23
25
|
/**
|
|
24
|
-
* Formily-connected
|
|
25
|
-
* Automatically connects shadcn
|
|
26
|
+
* Formily-connected FileUpload component
|
|
27
|
+
* Automatically connects shadcn FileUpload to Formily field state
|
|
26
28
|
*/
|
|
27
|
-
const FileUpload = (0, __formily_react.connect)(BaseFileUpload, (0, __formily_react.mapProps)((props, field) =>
|
|
28
|
-
return {
|
|
29
|
-
...props,
|
|
30
|
-
value: field.value ?? null
|
|
31
|
-
};
|
|
32
|
-
}));
|
|
29
|
+
const FileUpload = (0, __formily_react.connect)(BaseFileUpload, (0, __formily_react.mapProps)((props, field) => require_map_upload_props.mapUploadProps(props, field)));
|
|
33
30
|
|
|
34
31
|
//#endregion
|
|
35
32
|
exports.FileUpload = FileUpload;
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
+
import { FormilyUploadProps } from "./map-upload-props.cjs";
|
|
1
2
|
import React from "react";
|
|
2
|
-
import
|
|
3
|
+
import { FileUploadProps } from "@pixpilot/shadcn-ui";
|
|
3
4
|
|
|
4
5
|
//#region src/components/file-upload/FileUpload.d.ts
|
|
5
|
-
|
|
6
|
+
type FileUploadProps$1 = FormilyUploadProps<FileUploadProps>;
|
|
6
7
|
/**
|
|
7
|
-
* Formily-connected
|
|
8
|
-
* Automatically connects shadcn
|
|
8
|
+
* Formily-connected FileUpload component
|
|
9
|
+
* Automatically connects shadcn FileUpload to Formily field state
|
|
9
10
|
*/
|
|
10
|
-
declare const FileUpload: React.
|
|
11
|
-
multiple: true;
|
|
12
|
-
value?: _pixpilot_shadcn_ui3.FileMetadata[];
|
|
13
|
-
onChange?: _pixpilot_shadcn_ui3.OnChangeMultipleFiles;
|
|
14
|
-
} & _pixpilot_shadcn_ui3.FileUploadBaseProps & _pixpilot_shadcn_ui3.MultiFileCallbacks>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui3.FileUploadInlineBaseProps & _pixpilot_shadcn_ui3.FileUploadRootPropsBaseProps & {
|
|
15
|
-
multiple?: false;
|
|
16
|
-
value?: _pixpilot_shadcn_ui3.FileMetadata | null;
|
|
17
|
-
onChange?: _pixpilot_shadcn_ui3.OnChangeSingleFile;
|
|
18
|
-
} & _pixpilot_shadcn_ui3.FileUploadBaseProps & _pixpilot_shadcn_ui3.UseFileCallbacks>, "ref">) & React.RefAttributes<unknown>>;
|
|
11
|
+
declare const FileUpload: React.FC<FileUploadProps$1>;
|
|
19
12
|
//#endregion
|
|
20
|
-
export { FileUpload };
|
|
13
|
+
export { FileUpload, FileUploadProps$1 as FileUploadProps };
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
+
import { FormilyUploadProps } from "./map-upload-props.js";
|
|
1
2
|
import React from "react";
|
|
2
|
-
import
|
|
3
|
+
import { FileUploadProps } from "@pixpilot/shadcn-ui";
|
|
3
4
|
|
|
4
5
|
//#region src/components/file-upload/FileUpload.d.ts
|
|
5
|
-
|
|
6
|
+
type FileUploadProps$1 = FormilyUploadProps<FileUploadProps>;
|
|
6
7
|
/**
|
|
7
|
-
* Formily-connected
|
|
8
|
-
* Automatically connects shadcn
|
|
8
|
+
* Formily-connected FileUpload component
|
|
9
|
+
* Automatically connects shadcn FileUpload to Formily field state
|
|
9
10
|
*/
|
|
10
|
-
declare const FileUpload$1: React.
|
|
11
|
-
multiple: true;
|
|
12
|
-
value?: _pixpilot_shadcn_ui3.FileMetadata[];
|
|
13
|
-
onChange?: _pixpilot_shadcn_ui3.OnChangeMultipleFiles;
|
|
14
|
-
} & _pixpilot_shadcn_ui3.FileUploadBaseProps & _pixpilot_shadcn_ui3.MultiFileCallbacks>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui3.FileUploadInlineBaseProps & _pixpilot_shadcn_ui3.FileUploadRootPropsBaseProps & {
|
|
15
|
-
multiple?: false;
|
|
16
|
-
value?: _pixpilot_shadcn_ui3.FileMetadata | null;
|
|
17
|
-
onChange?: _pixpilot_shadcn_ui3.OnChangeSingleFile;
|
|
18
|
-
} & _pixpilot_shadcn_ui3.FileUploadBaseProps & _pixpilot_shadcn_ui3.UseFileCallbacks>, "ref">) & React.RefAttributes<unknown>>;
|
|
11
|
+
declare const FileUpload$1: React.FC<FileUploadProps$1>;
|
|
19
12
|
//#endregion
|
|
20
|
-
export { FileUpload$1 as FileUpload };
|
|
13
|
+
export { FileUpload$1 as FileUpload, FileUploadProps$1 as FileUploadProps };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { mapUploadProps } from "./map-upload-props.js";
|
|
1
2
|
import { useFileUploadFeedback } from "./use-file-upload-feedback.js";
|
|
2
3
|
import { connect, mapProps } from "@formily/react";
|
|
3
4
|
import React from "react";
|
|
@@ -6,9 +7,10 @@ import { jsx } from "react/jsx-runtime";
|
|
|
6
7
|
|
|
7
8
|
//#region src/components/file-upload/FileUpload.tsx
|
|
8
9
|
const BaseFileUpload = (props) => {
|
|
9
|
-
const {
|
|
10
|
+
const { mapValue: _mapValue,...uploadProps } = props;
|
|
11
|
+
const { onUpload, maxSize, handleFilesRejection, handleFileValidate } = useFileUploadFeedback(uploadProps);
|
|
10
12
|
return /* @__PURE__ */ jsx(FileUpload, {
|
|
11
|
-
...
|
|
13
|
+
...uploadProps,
|
|
12
14
|
maxSize,
|
|
13
15
|
onFilesReject: handleFilesRejection,
|
|
14
16
|
onFileValidate: handleFileValidate,
|
|
@@ -16,15 +18,10 @@ const BaseFileUpload = (props) => {
|
|
|
16
18
|
});
|
|
17
19
|
};
|
|
18
20
|
/**
|
|
19
|
-
* Formily-connected
|
|
20
|
-
* Automatically connects shadcn
|
|
21
|
+
* Formily-connected FileUpload component
|
|
22
|
+
* Automatically connects shadcn FileUpload to Formily field state
|
|
21
23
|
*/
|
|
22
|
-
const FileUpload$1 = connect(BaseFileUpload, mapProps((props, field) =>
|
|
23
|
-
return {
|
|
24
|
-
...props,
|
|
25
|
-
value: field.value ?? null
|
|
26
|
-
};
|
|
27
|
-
}));
|
|
24
|
+
const FileUpload$1 = connect(BaseFileUpload, mapProps((props, field) => mapUploadProps(props, field)));
|
|
28
25
|
|
|
29
26
|
//#endregion
|
|
30
27
|
export { FileUpload$1 as FileUpload };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_map_upload_props = require('./map-upload-props.cjs');
|
|
2
3
|
const require_use_file_upload_feedback = require('./use-file-upload-feedback.cjs');
|
|
3
4
|
let __formily_react = require("@formily/react");
|
|
4
5
|
__formily_react = require_rolldown_runtime.__toESM(__formily_react);
|
|
@@ -11,9 +12,10 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
|
11
12
|
|
|
12
13
|
//#region src/components/file-upload/FileUploadInline.tsx
|
|
13
14
|
const BaseFileUploadInline = (props) => {
|
|
14
|
-
const {
|
|
15
|
+
const { mapValue: _mapValue,...uploadProps } = props;
|
|
16
|
+
const { onUpload, maxSize, handleFilesRejection, handleFileValidate } = require_use_file_upload_feedback.useFileUploadFeedback(uploadProps);
|
|
15
17
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.FileUploadInline, {
|
|
16
|
-
...
|
|
18
|
+
...uploadProps,
|
|
17
19
|
maxSize,
|
|
18
20
|
onFilesReject: handleFilesRejection,
|
|
19
21
|
onFileValidate: handleFileValidate,
|
|
@@ -24,12 +26,7 @@ const BaseFileUploadInline = (props) => {
|
|
|
24
26
|
* Formily-connected FileUploadInline component
|
|
25
27
|
* Automatically connects shadcn FileUploadInline to Formily field state
|
|
26
28
|
*/
|
|
27
|
-
const FileUploadInline = (0, __formily_react.connect)(BaseFileUploadInline, (0, __formily_react.mapProps)((props, field) =>
|
|
28
|
-
return {
|
|
29
|
-
...props,
|
|
30
|
-
value: field.value ?? null
|
|
31
|
-
};
|
|
32
|
-
}));
|
|
29
|
+
const FileUploadInline = (0, __formily_react.connect)(BaseFileUploadInline, (0, __formily_react.mapProps)((props, field) => require_map_upload_props.mapUploadProps(props, field)));
|
|
33
30
|
|
|
34
31
|
//#endregion
|
|
35
32
|
exports.FileUploadInline = FileUploadInline;
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
+
import { FormilyUploadProps } from "./map-upload-props.cjs";
|
|
1
2
|
import React from "react";
|
|
2
|
-
import
|
|
3
|
+
import { FileUploadInlineProps } from "@pixpilot/shadcn-ui";
|
|
3
4
|
|
|
4
5
|
//#region src/components/file-upload/FileUploadInline.d.ts
|
|
5
|
-
|
|
6
|
+
type FileUploadInlineProps$1 = FormilyUploadProps<FileUploadInlineProps>;
|
|
6
7
|
/**
|
|
7
8
|
* Formily-connected FileUploadInline component
|
|
8
9
|
* Automatically connects shadcn FileUploadInline to Formily field state
|
|
9
10
|
*/
|
|
10
|
-
declare const FileUploadInline: React.
|
|
11
|
-
multiple: true;
|
|
12
|
-
value?: _pixpilot_shadcn_ui15.FileMetadata[];
|
|
13
|
-
onChange?: _pixpilot_shadcn_ui15.OnChangeMultipleFiles;
|
|
14
|
-
} & _pixpilot_shadcn_ui15.FileUploadBaseProps & _pixpilot_shadcn_ui15.MultiFileCallbacks>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui15.FileUploadInlineBaseProps & _pixpilot_shadcn_ui15.FileUploadRootPropsBaseProps & {
|
|
15
|
-
multiple?: false;
|
|
16
|
-
value?: _pixpilot_shadcn_ui15.FileMetadata | null;
|
|
17
|
-
onChange?: _pixpilot_shadcn_ui15.OnChangeSingleFile;
|
|
18
|
-
} & _pixpilot_shadcn_ui15.FileUploadBaseProps & _pixpilot_shadcn_ui15.UseFileCallbacks>, "ref">) & React.RefAttributes<unknown>>;
|
|
11
|
+
declare const FileUploadInline: React.FC<FileUploadInlineProps$1>;
|
|
19
12
|
//#endregion
|
|
20
|
-
export { FileUploadInline };
|
|
13
|
+
export { FileUploadInline, FileUploadInlineProps$1 as FileUploadInlineProps };
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
+
import { FormilyUploadProps } from "./map-upload-props.js";
|
|
1
2
|
import React from "react";
|
|
2
|
-
import
|
|
3
|
+
import { FileUploadInlineProps } from "@pixpilot/shadcn-ui";
|
|
3
4
|
|
|
4
5
|
//#region src/components/file-upload/FileUploadInline.d.ts
|
|
5
|
-
|
|
6
|
+
type FileUploadInlineProps$1 = FormilyUploadProps<FileUploadInlineProps>;
|
|
6
7
|
/**
|
|
7
8
|
* Formily-connected FileUploadInline component
|
|
8
9
|
* Automatically connects shadcn FileUploadInline to Formily field state
|
|
9
10
|
*/
|
|
10
|
-
declare const FileUploadInline$1: React.
|
|
11
|
-
multiple: true;
|
|
12
|
-
value?: _pixpilot_shadcn_ui15.FileMetadata[];
|
|
13
|
-
onChange?: _pixpilot_shadcn_ui15.OnChangeMultipleFiles;
|
|
14
|
-
} & _pixpilot_shadcn_ui15.FileUploadBaseProps & _pixpilot_shadcn_ui15.MultiFileCallbacks>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui15.FileUploadInlineBaseProps & _pixpilot_shadcn_ui15.FileUploadRootPropsBaseProps & {
|
|
15
|
-
multiple?: false;
|
|
16
|
-
value?: _pixpilot_shadcn_ui15.FileMetadata | null;
|
|
17
|
-
onChange?: _pixpilot_shadcn_ui15.OnChangeSingleFile;
|
|
18
|
-
} & _pixpilot_shadcn_ui15.FileUploadBaseProps & _pixpilot_shadcn_ui15.UseFileCallbacks>, "ref">) & React.RefAttributes<unknown>>;
|
|
11
|
+
declare const FileUploadInline$1: React.FC<FileUploadInlineProps$1>;
|
|
19
12
|
//#endregion
|
|
20
|
-
export { FileUploadInline$1 as FileUploadInline };
|
|
13
|
+
export { FileUploadInline$1 as FileUploadInline, FileUploadInlineProps$1 as FileUploadInlineProps };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { mapUploadProps } from "./map-upload-props.js";
|
|
1
2
|
import { useFileUploadFeedback } from "./use-file-upload-feedback.js";
|
|
2
3
|
import { connect, mapProps } from "@formily/react";
|
|
3
4
|
import React from "react";
|
|
@@ -6,9 +7,10 @@ import { jsx } from "react/jsx-runtime";
|
|
|
6
7
|
|
|
7
8
|
//#region src/components/file-upload/FileUploadInline.tsx
|
|
8
9
|
const BaseFileUploadInline = (props) => {
|
|
9
|
-
const {
|
|
10
|
+
const { mapValue: _mapValue,...uploadProps } = props;
|
|
11
|
+
const { onUpload, maxSize, handleFilesRejection, handleFileValidate } = useFileUploadFeedback(uploadProps);
|
|
10
12
|
return /* @__PURE__ */ jsx(FileUploadInline, {
|
|
11
|
-
...
|
|
13
|
+
...uploadProps,
|
|
12
14
|
maxSize,
|
|
13
15
|
onFilesReject: handleFilesRejection,
|
|
14
16
|
onFileValidate: handleFileValidate,
|
|
@@ -19,12 +21,7 @@ const BaseFileUploadInline = (props) => {
|
|
|
19
21
|
* Formily-connected FileUploadInline component
|
|
20
22
|
* Automatically connects shadcn FileUploadInline to Formily field state
|
|
21
23
|
*/
|
|
22
|
-
const FileUploadInline$1 = connect(BaseFileUploadInline, mapProps((props, field) =>
|
|
23
|
-
return {
|
|
24
|
-
...props,
|
|
25
|
-
value: field.value ?? null
|
|
26
|
-
};
|
|
27
|
-
}));
|
|
24
|
+
const FileUploadInline$1 = connect(BaseFileUploadInline, mapProps((props, field) => mapUploadProps(props, field)));
|
|
28
25
|
|
|
29
26
|
//#endregion
|
|
30
27
|
export { FileUploadInline$1 as FileUploadInline };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { AvatarUpload } from "./AvatarUpload.cjs";
|
|
2
|
-
import { FileUpload } from "./FileUpload.cjs";
|
|
3
|
-
import { FileUploadInline } from "./FileUploadInline.cjs";
|
|
1
|
+
import { AvatarUpload, AvatarUploadProps as AvatarUploadProps$1 } from "./AvatarUpload.cjs";
|
|
2
|
+
import { FileUpload, FileUploadProps as FileUploadProps$1 } from "./FileUpload.cjs";
|
|
3
|
+
import { FileUploadInline, FileUploadInlineProps as FileUploadInlineProps$1 } from "./FileUploadInline.cjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AvatarUpload as AvatarUpload$1 } from "./AvatarUpload.js";
|
|
2
|
-
import { FileUpload as FileUpload$1 } from "./FileUpload.js";
|
|
3
|
-
import { FileUploadInline as FileUploadInline$1 } from "./FileUploadInline.js";
|
|
1
|
+
import { AvatarUpload as AvatarUpload$1, AvatarUploadProps as AvatarUploadProps$1 } from "./AvatarUpload.js";
|
|
2
|
+
import { FileUpload as FileUpload$1, FileUploadProps as FileUploadProps$1 } from "./FileUpload.js";
|
|
3
|
+
import { FileUploadInline as FileUploadInline$1, FileUploadInlineProps as FileUploadInlineProps$1 } from "./FileUploadInline.js";
|
|
4
4
|
import "@pixpilot/shadcn-ui";
|