@pixpilot/formily-shadcn 1.4.3 → 1.4.5
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.cts +2 -2
- package/dist/components/FormGrid.d.cts +2 -2
- package/dist/components/IconPicker.d.cts +3 -3
- package/dist/components/IconToggle.d.cts +2 -2
- package/dist/components/Input.d.cts +3 -3
- package/dist/components/TagsInputInline.d.cts +3 -3
- package/dist/components/Textarea.d.cts +2 -2
- package/dist/components/ToggleButton.d.cts +3 -3
- package/dist/components/array-base/components/Addition.cjs +1 -1
- package/dist/components/array-base/components/Addition.js +1 -1
- package/dist/components/array-dialog/ArrayDialog.cjs +1 -0
- package/dist/components/array-dialog/ArrayDialog.js +1 -0
- package/dist/components/array-dialog/EditDialog.cjs +4 -0
- package/dist/components/array-dialog/EditDialog.js +4 -0
- package/dist/components/array-popover/ArrayPopover.cjs +1 -0
- package/dist/components/array-popover/ArrayPopover.js +1 -0
- package/dist/components/context/types.d.cts +2 -1
- package/dist/components/context/types.d.ts +2 -1
- package/dist/components/schema-field/schema-field-basics.d.ts +303 -303
- package/dist/components/schema-field/schema-field-extended.d.cts +9 -9
- package/dist/components/schema-field/schema-field-extended.d.ts +633 -633
- package/dist/components/schema-field/schema-field.d.ts +412 -412
- package/dist/components/slider/Slider.d.ts +3 -3
- package/dist/components/slider/SliderInput.d.ts +3 -3
- package/package.json +5 -5
|
@@ -2,7 +2,7 @@ import { FormContextStates } from "./context/form-context.cjs";
|
|
|
2
2
|
import "./context/index.cjs";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { Form } from "@formily/core";
|
|
5
|
-
import * as
|
|
5
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/Form.d.ts
|
|
8
8
|
interface IFormProps extends FormContextStates {
|
|
@@ -25,6 +25,6 @@ declare function Form$1({
|
|
|
25
25
|
onAutoSubmit,
|
|
26
26
|
layout,
|
|
27
27
|
settings
|
|
28
|
-
}: IFormProps):
|
|
28
|
+
}: IFormProps): react_jsx_runtime0.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_runtime1 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_runtime1.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,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react9 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/components/Input.d.ts
|
|
4
4
|
|
|
@@ -6,12 +6,12 @@ import * as react4 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: react9.ForwardRefExoticComponent<Omit<Partial<react9.ClassAttributes<HTMLInputElement> & react9.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"> & react9.RefAttributes<unknown>>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { Input };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react25 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: react25.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui2.TagsInputProps> & react25.RefAttributes<unknown>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { TagsInputInLine };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react27 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: react27.ForwardRefExoticComponent<Omit<Partial<react27.ClassAttributes<HTMLTextAreaElement> & react27.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react27.RefAttributes<unknown>>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Textarea };
|
|
@@ -1,11 +1,11 @@
|
|
|
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/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: react22.ForwardRefExoticComponent<Omit<Partial<Omit<_pixpilot_shadcn_ui1.ToggleButtonProps, "ref"> & react22.RefAttributes<HTMLButtonElement>>, "ref"> & react22.RefAttributes<unknown>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { ToggleButton };
|
|
@@ -42,7 +42,7 @@ function ArrayAddition({ ref,...props }) {
|
|
|
42
42
|
if (e.defaultPrevented) return;
|
|
43
43
|
}
|
|
44
44
|
const defaultValue = require_get_default_value.getDefaultValue(props.defaultValue, array.schema);
|
|
45
|
-
if (
|
|
45
|
+
if (array.props?.autoSave === false) {
|
|
46
46
|
const method = props.method ?? "push";
|
|
47
47
|
const insertionIndex = method === "unshift" ? 0 : currentLength;
|
|
48
48
|
array.props?.onAdd?.(insertionIndex, {
|
|
@@ -36,7 +36,7 @@ function ArrayAddition({ ref,...props }) {
|
|
|
36
36
|
if (e.defaultPrevented) return;
|
|
37
37
|
}
|
|
38
38
|
const defaultValue = getDefaultValue(props.defaultValue, array.schema);
|
|
39
|
-
if (
|
|
39
|
+
if (array.props?.autoSave === false) {
|
|
40
40
|
const method = props.method ?? "push";
|
|
41
41
|
const insertionIndex = method === "unshift" ? 0 : currentLength;
|
|
42
42
|
array.props?.onAdd?.(insertionIndex, {
|
|
@@ -35,6 +35,7 @@ const ArrayDialogBase = (0, __formily_react.observer)((props) => {
|
|
|
35
35
|
const items = require_use_array_item_schema.useArrayItemSchema();
|
|
36
36
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_array_base.ArrayBase, {
|
|
37
37
|
...props,
|
|
38
|
+
autoSave: autoSave ?? false,
|
|
38
39
|
transformActions,
|
|
39
40
|
onAdd: handleAdd,
|
|
40
41
|
onRemove,
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_use_form_context = require('../../hooks/use-form-context.cjs');
|
|
3
|
+
require('../../hooks/index.cjs');
|
|
2
4
|
const require_ArrayItemDraftFields = require('../array-common/ArrayItemDraftFields.cjs');
|
|
3
5
|
const require_ShakeStyles = require('../array-common/ShakeStyles.cjs');
|
|
4
6
|
const require_use_array_item_edit_state = require('../array-common/use-array-item-edit-state.cjs');
|
|
@@ -26,12 +28,14 @@ const EditDialog = (0, __formily_react.observer)(({ schema, onSave, onAutoSave,
|
|
|
26
28
|
onAutoSave,
|
|
27
29
|
autoSave
|
|
28
30
|
});
|
|
31
|
+
const { settings = {} } = require_use_form_context.useFormContext();
|
|
29
32
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.Dialog, {
|
|
30
33
|
open,
|
|
31
34
|
onOpenChange: (isOpen) => {
|
|
32
35
|
if (!isOpen) handleCancel();
|
|
33
36
|
},
|
|
34
37
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn_ui.DialogContent, {
|
|
38
|
+
...settings.dialog,
|
|
35
39
|
...rest,
|
|
36
40
|
className: (0, __pixpilot_shadcn_ui.cn)("sm:max-w-[525px]", shouldShake && "pp-shake", className),
|
|
37
41
|
onInteractOutside: (event) => {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { useFormContext } from "../../hooks/use-form-context.js";
|
|
2
|
+
import "../../hooks/index.js";
|
|
1
3
|
import { ArrayItemDraftFields } from "../array-common/ArrayItemDraftFields.js";
|
|
2
4
|
import { ShakeStyles } from "../array-common/ShakeStyles.js";
|
|
3
5
|
import { useArrayItemEditState } from "../array-common/use-array-item-edit-state.js";
|
|
@@ -21,12 +23,14 @@ const EditDialog = observer(({ schema, onSave, onAutoSave, onCancel, activeItemM
|
|
|
21
23
|
onAutoSave,
|
|
22
24
|
autoSave
|
|
23
25
|
});
|
|
26
|
+
const { settings = {} } = useFormContext();
|
|
24
27
|
return /* @__PURE__ */ jsx(Dialog, {
|
|
25
28
|
open,
|
|
26
29
|
onOpenChange: (isOpen) => {
|
|
27
30
|
if (!isOpen) handleCancel();
|
|
28
31
|
},
|
|
29
32
|
children: /* @__PURE__ */ jsxs(DialogContent, {
|
|
33
|
+
...settings.dialog,
|
|
30
34
|
...rest,
|
|
31
35
|
className: cn("sm:max-w-[525px]", shouldShake && "pp-shake", className),
|
|
32
36
|
onInteractOutside: (event) => {
|
|
@@ -28,6 +28,7 @@ const ArrayPopoverBase = (0, __formily_react.observer)((props) => {
|
|
|
28
28
|
const schema = require_use_array_item_schema.useArrayItemSchema();
|
|
29
29
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_array_base.ArrayBase, {
|
|
30
30
|
...props,
|
|
31
|
+
autoSave,
|
|
31
32
|
transformActions,
|
|
32
33
|
onAdd: handleAdd,
|
|
33
34
|
onRemove,
|
|
@@ -2,7 +2,7 @@ import { ActionItem } from "../array-base/types.cjs";
|
|
|
2
2
|
import "../array-base/index.cjs";
|
|
3
3
|
import { FormSpace } from "../../types/form.cjs";
|
|
4
4
|
import { DescriptionPlacement, LabelPlacement } from "../../types/form-item.cjs";
|
|
5
|
-
import { FileUploadProgressCallBacks, IconProvider, RichTextEditorProps } from "@pixpilot/shadcn-ui";
|
|
5
|
+
import { DialogContentProps, FileUploadProgressCallBacks, IconProvider, RichTextEditorProps } from "@pixpilot/shadcn-ui";
|
|
6
6
|
|
|
7
7
|
//#region src/components/context/types.d.ts
|
|
8
8
|
interface FomFileUpload {
|
|
@@ -37,6 +37,7 @@ interface FormSettings {
|
|
|
37
37
|
actions?: ActionItem[] | false;
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
|
+
dialog?: DialogContentProps;
|
|
40
41
|
}
|
|
41
42
|
/**
|
|
42
43
|
* Layout configuration options for form components.
|
|
@@ -2,7 +2,7 @@ import { ActionItem } from "../array-base/types.js";
|
|
|
2
2
|
import "../array-base/index.js";
|
|
3
3
|
import { FormSpace } from "../../types/form.js";
|
|
4
4
|
import { DescriptionPlacement, LabelPlacement } from "../../types/form-item.js";
|
|
5
|
-
import { FileUploadProgressCallBacks, IconProvider, RichTextEditorProps } from "@pixpilot/shadcn-ui";
|
|
5
|
+
import { DialogContentProps, FileUploadProgressCallBacks, IconProvider, RichTextEditorProps } from "@pixpilot/shadcn-ui";
|
|
6
6
|
|
|
7
7
|
//#region src/components/context/types.d.ts
|
|
8
8
|
interface FomFileUpload {
|
|
@@ -37,6 +37,7 @@ interface FormSettings {
|
|
|
37
37
|
actions?: ActionItem[] | false;
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
|
+
dialog?: DialogContentProps;
|
|
40
41
|
}
|
|
41
42
|
/**
|
|
42
43
|
* Layout configuration options for form components.
|