@pixpilot/formily-shadcn 0.11.2 → 0.12.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/array-base/components/array-copy.cjs +2 -2
- package/dist/components/array-base/components/array-copy.js +2 -2
- package/dist/components/array-base/components/edit.cjs +2 -2
- package/dist/components/array-base/components/edit.js +2 -2
- package/dist/components/array-base/components/move-down.cjs +2 -2
- package/dist/components/array-base/components/move-down.js +2 -2
- package/dist/components/array-base/components/move-up.cjs +2 -2
- package/dist/components/array-base/components/move-up.js +2 -2
- package/dist/components/array-base/components/remove.cjs +2 -2
- package/dist/components/array-base/components/remove.js +2 -2
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/date-picker.d.ts +3 -3
- package/dist/components/file-upload/avatar-upload.cjs +35 -0
- package/dist/components/file-upload/avatar-upload.d.cts +12 -0
- package/dist/components/file-upload/avatar-upload.d.ts +12 -0
- package/dist/components/file-upload/avatar-upload.js +30 -0
- package/dist/components/file-upload/file-upload-inline.d.ts +8 -8
- package/dist/components/file-upload/file-upload.d.ts +8 -8
- package/dist/components/file-upload/index.cjs +1 -0
- package/dist/components/file-upload/index.d.cts +1 -0
- package/dist/components/file-upload/index.d.ts +1 -0
- package/dist/components/file-upload/index.js +1 -0
- package/dist/components/form-item/connected-form-item.d.cts +4 -4
- package/dist/components/form-item/connected-form-item.d.ts +4 -4
- package/dist/components/icon-picker.d.ts +3 -3
- package/dist/components/input.d.ts +2 -2
- package/dist/components/json-schema-form-renderer/json-schema-form-renderer.cjs +1 -4
- package/dist/components/json-schema-form-renderer/json-schema-form-renderer.js +3 -5
- package/dist/components/json-schema-form-renderer/types.d.cts +1 -2
- package/dist/components/json-schema-form-renderer/types.d.ts +1 -2
- package/dist/components/number-input.d.ts +2 -2
- package/dist/components/schema-field/schema-field-basics.d.ts +211 -211
- package/dist/components/schema-field/schema-field-extended.cjs +5 -0
- package/dist/components/schema-field/schema-field-extended.d.cts +23 -9
- package/dist/components/schema-field/schema-field-extended.d.ts +244 -230
- package/dist/components/schema-field/schema-field-extended.js +5 -0
- package/dist/components/schema-field/schema-field.d.ts +244 -244
- package/dist/components/separator.d.ts +2 -2
- package/dist/components/slider.d.cts +2 -2
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/switch.d.cts +2 -2
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/tags-input-inline.d.cts +2 -2
- package/dist/components/tags-input-inline.d.ts +2 -2
- package/dist/components/textarea.d.ts +2 -2
- package/dist/index.cjs +2 -0
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/utils/transform-schema.cjs +6 -1
- package/dist/utils/transform-schema.js +6 -1
- package/package.json +2 -2
|
@@ -14,7 +14,7 @@ let __formily_shared = require("@formily/shared");
|
|
|
14
14
|
__formily_shared = require_rolldown_runtime.__toESM(__formily_shared);
|
|
15
15
|
|
|
16
16
|
//#region src/components/array-base/components/array-copy.tsx
|
|
17
|
-
|
|
17
|
+
function ArrayCopy({ ref,...props }) {
|
|
18
18
|
const self = (0, __formily_react.useField)();
|
|
19
19
|
const array = require_array_context.useArray();
|
|
20
20
|
const index = require_array_context.useIndex(props.index);
|
|
@@ -43,7 +43,7 @@ const ArrayCopy = react.default.forwardRef((props, ref) => {
|
|
|
43
43
|
},
|
|
44
44
|
children: props.icon !== void 0 ? props.icon : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CopyIcon, { className: "size-4" })
|
|
45
45
|
});
|
|
46
|
-
}
|
|
46
|
+
}
|
|
47
47
|
|
|
48
48
|
//#endregion
|
|
49
49
|
exports.ArrayCopy = ArrayCopy;
|
|
@@ -7,7 +7,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
7
7
|
import { clone } from "@formily/shared";
|
|
8
8
|
|
|
9
9
|
//#region src/components/array-base/components/array-copy.tsx
|
|
10
|
-
|
|
10
|
+
function ArrayCopy({ ref,...props }) {
|
|
11
11
|
const self = useField();
|
|
12
12
|
const array = useArray();
|
|
13
13
|
const index = useIndex(props.index);
|
|
@@ -36,7 +36,7 @@ const ArrayCopy = React.forwardRef((props, ref) => {
|
|
|
36
36
|
},
|
|
37
37
|
children: props.icon !== void 0 ? props.icon : /* @__PURE__ */ jsx(CopyIcon, { className: "size-4" })
|
|
38
38
|
});
|
|
39
|
-
}
|
|
39
|
+
}
|
|
40
40
|
|
|
41
41
|
//#endregion
|
|
42
42
|
export { ArrayCopy };
|
|
@@ -12,7 +12,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
12
12
|
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
13
13
|
|
|
14
14
|
//#region src/components/array-base/components/edit.tsx
|
|
15
|
-
|
|
15
|
+
function ArrayEditButton({ ref,...props }) {
|
|
16
16
|
const index = require_array_context.useIndex(props.index);
|
|
17
17
|
const self = (0, __formily_react.useField)();
|
|
18
18
|
const array = require_array_context.useArray();
|
|
@@ -35,7 +35,7 @@ const ArrayEditButton = react.default.forwardRef((props, ref) => {
|
|
|
35
35
|
},
|
|
36
36
|
children: props.icon !== void 0 ? props.icon : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.EditIcon, { className: "size-4" })
|
|
37
37
|
});
|
|
38
|
-
}
|
|
38
|
+
}
|
|
39
39
|
ArrayEditButton.displayName = "ArrayEditButton";
|
|
40
40
|
|
|
41
41
|
//#endregion
|
|
@@ -6,7 +6,7 @@ import { EditIcon } from "lucide-react";
|
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region src/components/array-base/components/edit.tsx
|
|
9
|
-
|
|
9
|
+
function ArrayEditButton({ ref,...props }) {
|
|
10
10
|
const index = useIndex(props.index);
|
|
11
11
|
const self = useField();
|
|
12
12
|
const array = useArray();
|
|
@@ -29,7 +29,7 @@ const ArrayEditButton = React.forwardRef((props, ref) => {
|
|
|
29
29
|
},
|
|
30
30
|
children: props.icon !== void 0 ? props.icon : /* @__PURE__ */ jsx(EditIcon, { className: "size-4" })
|
|
31
31
|
});
|
|
32
|
-
}
|
|
32
|
+
}
|
|
33
33
|
ArrayEditButton.displayName = "ArrayEditButton";
|
|
34
34
|
|
|
35
35
|
//#endregion
|
|
@@ -12,7 +12,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
12
12
|
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
13
13
|
|
|
14
14
|
//#region src/components/array-base/components/move-down.tsx
|
|
15
|
-
|
|
15
|
+
function ArrayMoveDown({ ref,...props }) {
|
|
16
16
|
const index = require_array_context.useIndex(props.index);
|
|
17
17
|
const self = (0, __formily_react.useField)();
|
|
18
18
|
const array = require_array_context.useArray();
|
|
@@ -40,7 +40,7 @@ const ArrayMoveDown = react.default.forwardRef((props, ref) => {
|
|
|
40
40
|
},
|
|
41
41
|
children: props.icon !== void 0 ? props.icon : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDownIcon, { className: "size-4" })
|
|
42
42
|
});
|
|
43
|
-
}
|
|
43
|
+
}
|
|
44
44
|
ArrayMoveDown.displayName = "ArrayMoveDown";
|
|
45
45
|
|
|
46
46
|
//#endregion
|
|
@@ -6,7 +6,7 @@ import { ChevronDownIcon } from "lucide-react";
|
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region src/components/array-base/components/move-down.tsx
|
|
9
|
-
|
|
9
|
+
function ArrayMoveDown({ ref,...props }) {
|
|
10
10
|
const index = useIndex(props.index);
|
|
11
11
|
const self = useField();
|
|
12
12
|
const array = useArray();
|
|
@@ -34,7 +34,7 @@ const ArrayMoveDown = React.forwardRef((props, ref) => {
|
|
|
34
34
|
},
|
|
35
35
|
children: props.icon !== void 0 ? props.icon : /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
36
36
|
});
|
|
37
|
-
}
|
|
37
|
+
}
|
|
38
38
|
ArrayMoveDown.displayName = "ArrayMoveDown";
|
|
39
39
|
|
|
40
40
|
//#endregion
|
|
@@ -12,7 +12,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
12
12
|
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
13
13
|
|
|
14
14
|
//#region src/components/array-base/components/move-up.tsx
|
|
15
|
-
|
|
15
|
+
function ArrayMoveUp({ ref,...props }) {
|
|
16
16
|
const index = require_array_context.useIndex(props.index);
|
|
17
17
|
const self = (0, __formily_react.useField)();
|
|
18
18
|
const array = require_array_context.useArray();
|
|
@@ -40,7 +40,7 @@ const ArrayMoveUp = react.default.forwardRef((props, ref) => {
|
|
|
40
40
|
},
|
|
41
41
|
children: props.icon !== void 0 ? props.icon : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronUpIcon, { className: "size-4" })
|
|
42
42
|
});
|
|
43
|
-
}
|
|
43
|
+
}
|
|
44
44
|
ArrayMoveUp.displayName = "ArrayMoveUp";
|
|
45
45
|
|
|
46
46
|
//#endregion
|
|
@@ -6,7 +6,7 @@ import { ChevronUpIcon } from "lucide-react";
|
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region src/components/array-base/components/move-up.tsx
|
|
9
|
-
|
|
9
|
+
function ArrayMoveUp({ ref,...props }) {
|
|
10
10
|
const index = useIndex(props.index);
|
|
11
11
|
const self = useField();
|
|
12
12
|
const array = useArray();
|
|
@@ -34,7 +34,7 @@ const ArrayMoveUp = React.forwardRef((props, ref) => {
|
|
|
34
34
|
},
|
|
35
35
|
children: props.icon !== void 0 ? props.icon : /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
|
|
36
36
|
});
|
|
37
|
-
}
|
|
37
|
+
}
|
|
38
38
|
ArrayMoveUp.displayName = "ArrayMoveUp";
|
|
39
39
|
|
|
40
40
|
//#endregion
|
|
@@ -12,7 +12,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
12
12
|
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
13
13
|
|
|
14
14
|
//#region src/components/array-base/components/remove.tsx
|
|
15
|
-
|
|
15
|
+
function ArrayRemove({ ref,...props }) {
|
|
16
16
|
const index = require_array_context.useIndex(props.index);
|
|
17
17
|
const self = (0, __formily_react.useField)();
|
|
18
18
|
const array = require_array_context.useArray();
|
|
@@ -39,7 +39,7 @@ const ArrayRemove = react.default.forwardRef((props, ref) => {
|
|
|
39
39
|
},
|
|
40
40
|
children: props.icon !== void 0 ? props.icon : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Trash2Icon, { className: "size-4" })
|
|
41
41
|
});
|
|
42
|
-
}
|
|
42
|
+
}
|
|
43
43
|
ArrayRemove.displayName = "ArrayRemove";
|
|
44
44
|
|
|
45
45
|
//#endregion
|
|
@@ -6,7 +6,7 @@ import { Trash2Icon } from "lucide-react";
|
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region src/components/array-base/components/remove.tsx
|
|
9
|
-
|
|
9
|
+
function ArrayRemove({ ref,...props }) {
|
|
10
10
|
const index = useIndex(props.index);
|
|
11
11
|
const self = useField();
|
|
12
12
|
const array = useArray();
|
|
@@ -33,7 +33,7 @@ const ArrayRemove = React.forwardRef((props, ref) => {
|
|
|
33
33
|
},
|
|
34
34
|
children: props.icon !== void 0 ? props.icon : /* @__PURE__ */ jsx(Trash2Icon, { className: "size-4" })
|
|
35
35
|
});
|
|
36
|
-
}
|
|
36
|
+
}
|
|
37
37
|
ArrayRemove.displayName = "ArrayRemove";
|
|
38
38
|
|
|
39
39
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react3 from "react";
|
|
2
2
|
import * as _radix_ui_react_checkbox0 from "@radix-ui/react-checkbox";
|
|
3
3
|
|
|
4
4
|
//#region src/components/checkbox.d.ts
|
|
@@ -6,6 +6,6 @@ import * as _radix_ui_react_checkbox0 from "@radix-ui/react-checkbox";
|
|
|
6
6
|
* Formily-connected Checkbox component
|
|
7
7
|
* Maps Formily field checked state to shadcn Checkbox
|
|
8
8
|
*/
|
|
9
|
-
declare const Checkbox:
|
|
9
|
+
declare const Checkbox: react3.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_checkbox0.CheckboxProps & react3.RefAttributes<HTMLButtonElement>>, "ref"> & react3.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Checkbox };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react6 from "react";
|
|
2
2
|
import { DatePickerProps } from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/date-picker.d.ts
|
|
5
|
-
declare const DatePicker$1:
|
|
5
|
+
declare const DatePicker$1: react6.ForwardRefExoticComponent<Partial<{
|
|
6
6
|
value?: Date;
|
|
7
7
|
onChange?: (date: Date | undefined) => void;
|
|
8
8
|
placeholder?: string;
|
|
9
|
-
} & Omit<DatePickerProps, "onSelect" | "selected" | "mode">> &
|
|
9
|
+
} & Omit<DatePickerProps, "onSelect" | "selected" | "mode">> & react6.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { DatePicker$1 as DatePicker };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_use_file_upload_feedback = require('./use-file-upload-feedback.cjs');
|
|
3
|
+
let __formily_react = require("@formily/react");
|
|
4
|
+
__formily_react = require_rolldown_runtime.__toESM(__formily_react);
|
|
5
|
+
let react = require("react");
|
|
6
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
7
|
+
let __pixpilot_shadcn_ui = require("@pixpilot/shadcn-ui");
|
|
8
|
+
__pixpilot_shadcn_ui = require_rolldown_runtime.__toESM(__pixpilot_shadcn_ui);
|
|
9
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
11
|
+
|
|
12
|
+
//#region src/components/file-upload/avatar-upload.tsx
|
|
13
|
+
const BaseAvatarUpload = (props) => {
|
|
14
|
+
const { onUpload, maxSize, handleFilesRejection, handleFileValidate } = require_use_file_upload_feedback.useFileUploadFeedback(props);
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.AvatarUpload, {
|
|
16
|
+
...props,
|
|
17
|
+
maxSize,
|
|
18
|
+
onFilesReject: handleFilesRejection,
|
|
19
|
+
onFileValidate: handleFileValidate,
|
|
20
|
+
onUpload
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Formily-connected AvatarUpload component
|
|
25
|
+
* Automatically connects shadcn AvatarUpload to Formily field state
|
|
26
|
+
*/
|
|
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
|
+
}));
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
exports.AvatarUpload = AvatarUpload;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AvatarUploadProps } from "@pixpilot/shadcn-ui";
|
|
3
|
+
|
|
4
|
+
//#region src/components/file-upload/avatar-upload.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Formily-connected AvatarUpload component
|
|
8
|
+
* Automatically connects shadcn AvatarUpload to Formily field state
|
|
9
|
+
*/
|
|
10
|
+
declare const AvatarUpload: React.ForwardRefExoticComponent<Omit<Partial<AvatarUploadProps>, "ref"> & React.RefAttributes<unknown>>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { AvatarUpload };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AvatarUploadProps } from "@pixpilot/shadcn-ui";
|
|
3
|
+
|
|
4
|
+
//#region src/components/file-upload/avatar-upload.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Formily-connected AvatarUpload component
|
|
8
|
+
* Automatically connects shadcn AvatarUpload to Formily field state
|
|
9
|
+
*/
|
|
10
|
+
declare const AvatarUpload$1: React.ForwardRefExoticComponent<Omit<Partial<AvatarUploadProps>, "ref"> & React.RefAttributes<unknown>>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { AvatarUpload$1 as AvatarUpload };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useFileUploadFeedback } from "./use-file-upload-feedback.js";
|
|
2
|
+
import { connect, mapProps } from "@formily/react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { AvatarUpload } from "@pixpilot/shadcn-ui";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/file-upload/avatar-upload.tsx
|
|
8
|
+
const BaseAvatarUpload = (props) => {
|
|
9
|
+
const { onUpload, maxSize, handleFilesRejection, handleFileValidate } = useFileUploadFeedback(props);
|
|
10
|
+
return /* @__PURE__ */ jsx(AvatarUpload, {
|
|
11
|
+
...props,
|
|
12
|
+
maxSize,
|
|
13
|
+
onFilesReject: handleFilesRejection,
|
|
14
|
+
onFileValidate: handleFileValidate,
|
|
15
|
+
onUpload
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Formily-connected AvatarUpload component
|
|
20
|
+
* Automatically connects shadcn AvatarUpload to Formily field state
|
|
21
|
+
*/
|
|
22
|
+
const AvatarUpload$1 = connect(BaseAvatarUpload, mapProps((props, field) => {
|
|
23
|
+
return {
|
|
24
|
+
...props,
|
|
25
|
+
value: field.value ?? null
|
|
26
|
+
};
|
|
27
|
+
}));
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { AvatarUpload$1 as AvatarUpload };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/file-upload/file-upload-inline.d.ts
|
|
5
5
|
|
|
@@ -7,14 +7,14 @@ import * as _pixpilot_shadcn_ui286 from "@pixpilot/shadcn-ui";
|
|
|
7
7
|
* Formily-connected FileUploadInline component
|
|
8
8
|
* Automatically connects shadcn FileUploadInline to Formily field state
|
|
9
9
|
*/
|
|
10
|
-
declare const FileUploadInline$1: React.ForwardRefExoticComponent<(Omit<Partial<
|
|
10
|
+
declare const FileUploadInline$1: React.ForwardRefExoticComponent<(Omit<Partial<_pixpilot_shadcn_ui0.FileUploadInlineBaseProps & {
|
|
11
11
|
multiple: true;
|
|
12
|
-
value?:
|
|
13
|
-
onChange?:
|
|
14
|
-
} &
|
|
12
|
+
value?: _pixpilot_shadcn_ui0.FileMetadata[];
|
|
13
|
+
onChange?: _pixpilot_shadcn_ui0.OnChangeMultipleFiles;
|
|
14
|
+
} & _pixpilot_shadcn_ui0.FileUploadBaseProps>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui0.FileUploadInlineBaseProps & {
|
|
15
15
|
multiple?: false;
|
|
16
|
-
value?:
|
|
17
|
-
onChange?:
|
|
18
|
-
} &
|
|
16
|
+
value?: _pixpilot_shadcn_ui0.FileMetadata | null;
|
|
17
|
+
onChange?: _pixpilot_shadcn_ui0.OnChangeSingleFile;
|
|
18
|
+
} & _pixpilot_shadcn_ui0.FileUploadBaseProps>, "ref">) & React.RefAttributes<unknown>>;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { FileUploadInline$1 as FileUploadInline };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _pixpilot_shadcn_ui8 from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/file-upload/file-upload.d.ts
|
|
5
5
|
|
|
@@ -7,14 +7,14 @@ import * as _pixpilot_shadcn_ui294 from "@pixpilot/shadcn-ui";
|
|
|
7
7
|
* Formily-connected FileUploadInline component
|
|
8
8
|
* Automatically connects shadcn FileUploadInline to Formily field state
|
|
9
9
|
*/
|
|
10
|
-
declare const FileUpload$1: React.ForwardRefExoticComponent<(Omit<Partial<
|
|
10
|
+
declare const FileUpload$1: React.ForwardRefExoticComponent<(Omit<Partial<_pixpilot_shadcn_ui8.FileUploadInlineBaseProps & {
|
|
11
11
|
multiple: true;
|
|
12
|
-
value?:
|
|
13
|
-
onChange?:
|
|
14
|
-
} &
|
|
12
|
+
value?: _pixpilot_shadcn_ui8.FileMetadata[];
|
|
13
|
+
onChange?: _pixpilot_shadcn_ui8.OnChangeMultipleFiles;
|
|
14
|
+
} & _pixpilot_shadcn_ui8.FileUploadBaseProps>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui8.FileUploadInlineBaseProps & {
|
|
15
15
|
multiple?: false;
|
|
16
|
-
value?:
|
|
17
|
-
onChange?:
|
|
18
|
-
} &
|
|
16
|
+
value?: _pixpilot_shadcn_ui8.FileMetadata | null;
|
|
17
|
+
onChange?: _pixpilot_shadcn_ui8.OnChangeSingleFile;
|
|
18
|
+
} & _pixpilot_shadcn_ui8.FileUploadBaseProps>, "ref">) & React.RefAttributes<unknown>>;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { FileUpload$1 as FileUpload };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { FormItemProps } from "./form-item-types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react1363 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/form-item/connected-form-item.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* FormItem component connected to Formily field state.
|
|
7
7
|
* Automatically maps field validation state to component props.
|
|
8
8
|
*/
|
|
9
|
-
declare const FormItem:
|
|
10
|
-
children?:
|
|
11
|
-
}>, "ref"> &
|
|
9
|
+
declare const FormItem: react1363.ForwardRefExoticComponent<Omit<Partial<FormItemProps & {
|
|
10
|
+
children?: react1363.ReactNode | undefined;
|
|
11
|
+
}>, "ref"> & react1363.RefAttributes<unknown>>;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { FormItem };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { FormItemProps } from "./form-item-types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react1363 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/form-item/connected-form-item.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* FormItem component connected to Formily field state.
|
|
7
7
|
* Automatically maps field validation state to component props.
|
|
8
8
|
*/
|
|
9
|
-
declare const FormItem:
|
|
10
|
-
children?:
|
|
11
|
-
}>, "ref"> &
|
|
9
|
+
declare const FormItem: react1363.ForwardRefExoticComponent<Omit<Partial<FormItemProps & {
|
|
10
|
+
children?: react1363.ReactNode | undefined;
|
|
11
|
+
}>, "ref"> & react1363.RefAttributes<unknown>>;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { FormItem };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react8 from "react";
|
|
2
2
|
import { IconPickerProps, IconProviderProps } from "@pixpilot/shadcn-ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/icon-picker.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: react8.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
|
|
12
12
|
providers?: IconProviderProps[];
|
|
13
|
-
}> &
|
|
13
|
+
}> & react8.RefAttributes<unknown>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { IconPicker$1 as IconPicker };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react10 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/components/input.d.ts
|
|
4
4
|
|
|
@@ -6,6 +6,6 @@ import * as react6 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: react10.ForwardRefExoticComponent<Omit<Partial<react10.ClassAttributes<HTMLInputElement> & react10.InputHTMLAttributes<HTMLInputElement>>, "ref"> & react10.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Input };
|
|
@@ -11,15 +11,12 @@ let react = require("react");
|
|
|
11
11
|
react = require_rolldown_runtime.__toESM(react);
|
|
12
12
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
13
|
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
14
|
-
let __formily_core = require("@formily/core");
|
|
15
|
-
__formily_core = require_rolldown_runtime.__toESM(__formily_core);
|
|
16
14
|
let __pixpilot_env_is_dev = require("@pixpilot/env/is-dev");
|
|
17
15
|
__pixpilot_env_is_dev = require_rolldown_runtime.__toESM(__pixpilot_env_is_dev);
|
|
18
16
|
|
|
19
17
|
//#region src/components/json-schema-form-renderer/json-schema-form-renderer.tsx
|
|
20
18
|
const JsonSchemaFormRenderer = (props) => {
|
|
21
|
-
const { schema, children, settings: configProp, components: componentsProp,
|
|
22
|
-
const form = (0, react.useMemo)(() => (0, __formily_core.createForm)({ values: values || {} }), [values]);
|
|
19
|
+
const { schema, children, settings: configProp, components: componentsProp, form,...rest } = props;
|
|
23
20
|
const formSchema = (0, react.useMemo)(() => {
|
|
24
21
|
return require_transform_schema.transformSchema(schema, require_extract_fields_decorators.extractFieldsDecorators(componentsProp?.fields));
|
|
25
22
|
}, [schema, componentsProp]);
|
|
@@ -2,18 +2,16 @@ import { extractFieldsDecorators } from "../../utils/extract-fields-decorators.j
|
|
|
2
2
|
import { transformSchema } from "../../utils/transform-schema.js";
|
|
3
3
|
import { validateSchemaComponents } from "../../utils/validate-schema-components.js";
|
|
4
4
|
import "../../utils/index.js";
|
|
5
|
-
import { Form
|
|
5
|
+
import { Form } from "../form.js";
|
|
6
6
|
import { extractComponents } from "../../utils/extract-components.js";
|
|
7
7
|
import { createSchemaField } from "@formily/react";
|
|
8
8
|
import React, { useMemo } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
import { createForm } from "@formily/core";
|
|
11
10
|
import { isDevelopment } from "@pixpilot/env/is-dev";
|
|
12
11
|
|
|
13
12
|
//#region src/components/json-schema-form-renderer/json-schema-form-renderer.tsx
|
|
14
13
|
const JsonSchemaFormRenderer = (props) => {
|
|
15
|
-
const { schema, children, settings: configProp, components: componentsProp,
|
|
16
|
-
const form = useMemo(() => createForm({ values: values || {} }), [values]);
|
|
14
|
+
const { schema, children, settings: configProp, components: componentsProp, form,...rest } = props;
|
|
17
15
|
const formSchema = useMemo(() => {
|
|
18
16
|
return transformSchema(schema, extractFieldsDecorators(componentsProp?.fields));
|
|
19
17
|
}, [schema, componentsProp]);
|
|
@@ -38,7 +36,7 @@ const JsonSchemaFormRenderer = (props) => {
|
|
|
38
36
|
}
|
|
39
37
|
};
|
|
40
38
|
}, [configProp]);
|
|
41
|
-
return /* @__PURE__ */ jsxs(Form
|
|
39
|
+
return /* @__PURE__ */ jsxs(Form, {
|
|
42
40
|
...rest,
|
|
43
41
|
form,
|
|
44
42
|
settings: config,
|
|
@@ -10,10 +10,9 @@ interface JsonSchemaFormComponents {
|
|
|
10
10
|
fields?: Record<string, JsonSchemaFormComponent>;
|
|
11
11
|
decorators?: Record<string, React.ComponentType<any>>;
|
|
12
12
|
}
|
|
13
|
-
interface JsonSchemaFormRendererProps extends
|
|
13
|
+
interface JsonSchemaFormRendererProps extends React.ComponentProps<typeof Form> {
|
|
14
14
|
schema: ISchema;
|
|
15
15
|
children?: React.ReactNode;
|
|
16
|
-
values?: Record<string, any>;
|
|
17
16
|
components: Partial<JsonSchemaFormComponents>;
|
|
18
17
|
}
|
|
19
18
|
interface JsonSchemaFormProps extends Omit<JsonSchemaFormRendererProps, 'components'> {
|
|
@@ -10,10 +10,9 @@ interface JsonSchemaFormComponents {
|
|
|
10
10
|
fields?: Record<string, JsonSchemaFormComponent>;
|
|
11
11
|
decorators?: Record<string, React.ComponentType<any>>;
|
|
12
12
|
}
|
|
13
|
-
interface JsonSchemaFormRendererProps extends
|
|
13
|
+
interface JsonSchemaFormRendererProps extends React.ComponentProps<typeof Form> {
|
|
14
14
|
schema: ISchema;
|
|
15
15
|
children?: React.ReactNode;
|
|
16
|
-
values?: Record<string, any>;
|
|
17
16
|
components: Partial<JsonSchemaFormComponents>;
|
|
18
17
|
}
|
|
19
18
|
interface JsonSchemaFormProps extends Omit<JsonSchemaFormRendererProps, 'components'> {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react14 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/components/number-input.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Formily-connected Number Input component
|
|
6
6
|
*/
|
|
7
|
-
declare const NumberInput:
|
|
7
|
+
declare const NumberInput: react14.ForwardRefExoticComponent<Omit<Partial<react14.ClassAttributes<HTMLInputElement> & react14.InputHTMLAttributes<HTMLInputElement>>, "ref"> & react14.RefAttributes<unknown>>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { NumberInput };
|