@pixpilot/formily-shadcn 0.37.1 → 0.38.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.
Files changed (38) hide show
  1. package/dist/components/Checkbox.d.ts +2 -2
  2. package/dist/components/DatePicker.d.cts +1 -1
  3. package/dist/components/DatePicker.d.ts +3 -3
  4. package/dist/components/IconPicker.d.ts +3 -3
  5. package/dist/components/Separator.d.ts +2 -2
  6. package/dist/components/Switch.d.cts +2 -2
  7. package/dist/components/TagsInputInline.d.cts +2 -2
  8. package/dist/components/TagsInputInline.d.ts +2 -2
  9. package/dist/components/Textarea.d.ts +2 -2
  10. package/dist/components/array-collapse/Item.cjs +7 -3
  11. package/dist/components/array-collapse/Item.js +7 -3
  12. package/dist/components/array-common/ArrayItemHeaderRow.cjs +24 -23
  13. package/dist/components/array-common/ArrayItemHeaderRow.js +24 -23
  14. package/dist/components/array-common/ListItem.cjs +7 -3
  15. package/dist/components/array-common/ListItem.js +7 -3
  16. package/dist/components/array-common/get-hidden-item-schema.cjs +27 -0
  17. package/dist/components/array-common/get-hidden-item-schema.js +26 -0
  18. package/dist/components/array-common/index.cjs +1 -0
  19. package/dist/components/array-common/index.js +1 -0
  20. package/dist/components/array-dialog/EditDialog.cjs +0 -1
  21. package/dist/components/array-dialog/EditDialog.js +0 -1
  22. package/dist/components/array-popover/Popover.cjs +1 -1
  23. package/dist/components/array-popover/Popover.js +1 -1
  24. package/dist/components/file-upload/FileUpload.d.cts +8 -8
  25. package/dist/components/file-upload/FileUploadInline.d.cts +8 -8
  26. package/dist/components/number/NumberInput.d.cts +3 -3
  27. package/dist/components/schema-field/schema-field-basics.d.cts +255 -255
  28. package/dist/components/schema-field/schema-field-basics.d.ts +270 -270
  29. package/dist/components/schema-field/schema-field-extended.d.cts +552 -552
  30. package/dist/components/schema-field/schema-field-extended.d.ts +11 -11
  31. package/dist/components/schema-field/schema-field.d.cts +331 -331
  32. package/dist/components/schema-field/schema-field.d.ts +347 -347
  33. package/dist/components/slider/Slider.d.cts +3 -3
  34. package/dist/components/slider/Slider.d.ts +3 -3
  35. package/dist/components/slider/SliderInput.d.cts +3 -3
  36. package/dist/components/slider/SliderInput.d.ts +3 -3
  37. package/dist/components/slider/SliderSelect.d.cts +3 -3
  38. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- import * as react0 from "react";
1
+ import * as react1 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: react0.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_checkbox0.CheckboxProps & react0.RefAttributes<HTMLButtonElement>>, "ref"> & react0.RefAttributes<unknown>>;
9
+ declare const Checkbox: react1.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_checkbox0.CheckboxProps & react1.RefAttributes<HTMLButtonElement>>, "ref"> & react1.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Checkbox };
@@ -6,6 +6,6 @@ declare const DatePicker: react2.ForwardRefExoticComponent<Partial<{
6
6
  value?: Date;
7
7
  onChange?: (date: Date | undefined) => void;
8
8
  placeholder?: string;
9
- } & Omit<DatePickerProps, "onSelect" | "selected" | "mode">> & react2.RefAttributes<unknown>>;
9
+ } & Omit<DatePickerProps, "selected" | "onSelect" | "mode">> & react2.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { DatePicker };
@@ -1,11 +1,11 @@
1
- import * as react4 from "react";
1
+ import * as react0 from "react";
2
2
  import { DatePickerProps } from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/DatePicker.d.ts
5
- declare const DatePicker$1: react4.ForwardRefExoticComponent<Partial<{
5
+ declare const DatePicker$1: react0.ForwardRefExoticComponent<Partial<{
6
6
  value?: Date;
7
7
  onChange?: (date: Date | undefined) => void;
8
8
  placeholder?: string;
9
- } & Omit<DatePickerProps, "onSelect" | "selected" | "mode">> & react4.RefAttributes<unknown>>;
9
+ } & Omit<DatePickerProps, "selected" | "onSelect" | "mode">> & react0.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { DatePicker$1 as DatePicker };
@@ -1,4 +1,4 @@
1
- import * as react2 from "react";
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$1: react2.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
11
+ declare const IconPicker$1: react4.ForwardRefExoticComponent<Partial<Omit<IconPickerProps, "providers"> & {
12
12
  providers?: IconProviderProps[];
13
- }> & react2.RefAttributes<unknown>>;
13
+ }> & react4.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { IconPicker$1 as IconPicker };
@@ -1,4 +1,4 @@
1
- import * as react16 from "react";
1
+ import * as react22 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: react16.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator0.SeparatorProps & react16.RefAttributes<HTMLDivElement>>, "ref"> & react16.RefAttributes<unknown>>;
9
+ declare const Separator: react22.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator0.SeparatorProps & react22.RefAttributes<HTMLDivElement>>, "ref"> & react22.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Separator };
@@ -1,4 +1,4 @@
1
- import * as react18 from "react";
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: react18.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch0.SwitchProps & react18.RefAttributes<HTMLButtonElement>>, "ref"> & react18.RefAttributes<unknown>>;
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,4 +1,4 @@
1
- import * as react16 from "react";
1
+ import * as react19 from "react";
2
2
  import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/TagsInputInline.d.ts
@@ -10,6 +10,6 @@ import * as _pixpilot_shadcn_ui0 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: react16.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.TagsInputProps> & react16.RefAttributes<unknown>>;
13
+ declare const TagsInputInLine: react19.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.TagsInputProps> & react19.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { TagsInputInLine };
@@ -1,4 +1,4 @@
1
- import * as react19 from "react";
1
+ import * as react16 from "react";
2
2
  import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/TagsInputInline.d.ts
@@ -10,6 +10,6 @@ import * as _pixpilot_shadcn_ui0 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: react19.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.TagsInputProps> & react19.RefAttributes<unknown>>;
13
+ declare const TagsInputInLine: react16.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.TagsInputProps> & react16.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { TagsInputInLine };
@@ -1,9 +1,9 @@
1
- import * as react21 from "react";
1
+ import * as react18 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: react21.ForwardRefExoticComponent<Omit<Partial<react21.ClassAttributes<HTMLTextAreaElement> & react21.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react21.RefAttributes<unknown>>;
7
+ declare const Textarea: react18.ForwardRefExoticComponent<Omit<Partial<react18.ClassAttributes<HTMLTextAreaElement> & react18.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react18.RefAttributes<unknown>>;
8
8
  //#endregion
9
9
  export { Textarea };
@@ -7,6 +7,7 @@ require('../array-base/index.cjs');
7
7
  const require_SortableItem = require('../array-sortable/SortableItem.cjs');
8
8
  require('../array-sortable/index.cjs');
9
9
  const require_ArrayItemHeaderRow = require('../array-common/ArrayItemHeaderRow.cjs');
10
+ const require_get_hidden_item_schema = require('../array-common/get-hidden-item-schema.cjs');
10
11
  const require_ItemWrapper = require('../array-common/ItemWrapper.cjs');
11
12
  const require_use_array_item_schema = require('../array-common/use-array-item-schema.cjs');
12
13
  require('../array-common/index.cjs');
@@ -27,6 +28,9 @@ const ArrayCollapseItem = react.default.memo((props) => {
27
28
  const field = (0, __formily_react.useField)();
28
29
  const schema = (0, __formily_react.useFieldSchema)();
29
30
  const items = require_use_array_item_schema.useArrayItemSchema();
31
+ const hiddenItemSchema = react.default.useMemo(() => {
32
+ return require_get_hidden_item_schema.getHiddenItemSchema(items);
33
+ }, [items]);
30
34
  const itemWrapperProps = require_get_x_component_props.getXComponentProps(items);
31
35
  react.default.useEffect(() => {
32
36
  if (isNewItem(index)) formCollapse.addActiveKey(itemId);
@@ -41,13 +45,13 @@ const ArrayCollapseItem = react.default.memo((props) => {
41
45
  record: () => field.value?.[index],
42
46
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_SortableItem.SortableItem, {
43
47
  id: itemKey,
44
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
48
+ children: [hiddenItemSchema ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
45
49
  style: { display: "none" },
46
50
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__formily_react.RecursionField, {
47
- schema: items,
51
+ schema: hiddenItemSchema,
48
52
  name: index
49
53
  })
50
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_ItemWrapper.ItemWrapper, {
54
+ }) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_ItemWrapper.ItemWrapper, {
51
55
  ...itemWrapperProps,
52
56
  index,
53
57
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ArrayItemHeaderRow.ArrayItemHeaderRow, {
@@ -6,6 +6,7 @@ import "../array-base/index.js";
6
6
  import { SortableItem } from "../array-sortable/SortableItem.js";
7
7
  import "../array-sortable/index.js";
8
8
  import { ArrayItemHeaderRow } from "../array-common/ArrayItemHeaderRow.js";
9
+ import { getHiddenItemSchema } from "../array-common/get-hidden-item-schema.js";
9
10
  import { ItemWrapper } from "../array-common/ItemWrapper.js";
10
11
  import { useArrayItemSchema } from "../array-common/use-array-item-schema.js";
11
12
  import "../array-common/index.js";
@@ -21,6 +22,9 @@ const ArrayCollapseItem = React.memo((props) => {
21
22
  const field = useField();
22
23
  const schema = useFieldSchema();
23
24
  const items = useArrayItemSchema();
25
+ const hiddenItemSchema = React.useMemo(() => {
26
+ return getHiddenItemSchema(items);
27
+ }, [items]);
24
28
  const itemWrapperProps = getXComponentProps(items);
25
29
  React.useEffect(() => {
26
30
  if (isNewItem(index)) formCollapse.addActiveKey(itemId);
@@ -35,13 +39,13 @@ const ArrayCollapseItem = React.memo((props) => {
35
39
  record: () => field.value?.[index],
36
40
  children: /* @__PURE__ */ jsxs(SortableItem, {
37
41
  id: itemKey,
38
- children: [/* @__PURE__ */ jsx("div", {
42
+ children: [hiddenItemSchema ? /* @__PURE__ */ jsx("div", {
39
43
  style: { display: "none" },
40
44
  children: /* @__PURE__ */ jsx(RecursionField, {
41
- schema: items,
45
+ schema: hiddenItemSchema,
42
46
  name: index
43
47
  })
44
- }), /* @__PURE__ */ jsxs(ItemWrapper, {
48
+ }) : null, /* @__PURE__ */ jsxs(ItemWrapper, {
45
49
  ...itemWrapperProps,
46
50
  index,
47
51
  children: [/* @__PURE__ */ jsx(ArrayItemHeaderRow, {
@@ -72,31 +72,32 @@ const ArrayItemHeaderRow = react.default.memo(({ schema, index, className, leadi
72
72
  }, i)) });
73
73
  const arraySortable = (array?.props)?.sortable;
74
74
  const formSortable = formConfig.array?.sortable;
75
- const content = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
76
- arraySortable !== false && formSortable !== false ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_DragHandle.DragHandle, {
77
- className: "-ml-2",
78
- disabled: array?.field?.pattern !== "editable"
79
- }) : null,
80
- leading,
81
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
82
- className: "min-w-0 flex-1",
83
- children: labelNode
84
- })
85
- ] });
75
+ const dragHandleNode = arraySortable !== false && formSortable !== false ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_DragHandle.DragHandle, {
76
+ className: "-ml-2",
77
+ disabled: array?.field?.pattern !== "editable"
78
+ }) : null;
79
+ const content = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [leading, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
80
+ className: "min-w-0 flex-1",
81
+ children: labelNode
82
+ })] });
86
83
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
87
84
  className: (0, __pixpilot_shadcn_ui.cn)("flex items-center gap-2", className),
88
- children: [buttonProps ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
89
- ...buttonProps,
90
- type: buttonProps.type ?? "button",
91
- className: (0, __pixpilot_shadcn_ui.cn)("flex flex-1 min-w-0 items-center gap-2", slots?.content?.className, buttonProps.className),
92
- children: content
93
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
94
- className: (0, __pixpilot_shadcn_ui.cn)("flex flex-1 min-w-0 items-center gap-2", slots?.content?.className),
95
- children: content
96
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
97
- className: (0, __pixpilot_shadcn_ui.cn)("flex items-center gap-1 shrink-0"),
98
- children: operationsNode
99
- })]
85
+ children: [
86
+ dragHandleNode,
87
+ buttonProps ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
88
+ ...buttonProps,
89
+ type: buttonProps.type ?? "button",
90
+ className: (0, __pixpilot_shadcn_ui.cn)("flex flex-1 min-w-0 items-center gap-2", slots?.content?.className, buttonProps.className),
91
+ children: content
92
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
93
+ className: (0, __pixpilot_shadcn_ui.cn)("flex flex-1 min-w-0 items-center gap-2", slots?.content?.className),
94
+ children: content
95
+ }),
96
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
97
+ className: (0, __pixpilot_shadcn_ui.cn)("flex items-center gap-1 shrink-0"),
98
+ children: operationsNode
99
+ })
100
+ ]
100
101
  });
101
102
  });
102
103
  ArrayItemHeaderRow.displayName = "ArrayItemHeaderRow";
@@ -67,31 +67,32 @@ const ArrayItemHeaderRow = React.memo(({ schema, index, className, leading, labe
67
67
  }, i)) });
68
68
  const arraySortable = (array?.props)?.sortable;
69
69
  const formSortable = formConfig.array?.sortable;
70
- const content = /* @__PURE__ */ jsxs(Fragment, { children: [
71
- arraySortable !== false && formSortable !== false ? /* @__PURE__ */ jsx(DragHandle, {
72
- className: "-ml-2",
73
- disabled: array?.field?.pattern !== "editable"
74
- }) : null,
75
- leading,
76
- /* @__PURE__ */ jsx("div", {
77
- className: "min-w-0 flex-1",
78
- children: labelNode
79
- })
80
- ] });
70
+ const dragHandleNode = arraySortable !== false && formSortable !== false ? /* @__PURE__ */ jsx(DragHandle, {
71
+ className: "-ml-2",
72
+ disabled: array?.field?.pattern !== "editable"
73
+ }) : null;
74
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [leading, /* @__PURE__ */ jsx("div", {
75
+ className: "min-w-0 flex-1",
76
+ children: labelNode
77
+ })] });
81
78
  return /* @__PURE__ */ jsxs("div", {
82
79
  className: cn("flex items-center gap-2", className),
83
- children: [buttonProps ? /* @__PURE__ */ jsx("button", {
84
- ...buttonProps,
85
- type: buttonProps.type ?? "button",
86
- className: cn("flex flex-1 min-w-0 items-center gap-2", slots?.content?.className, buttonProps.className),
87
- children: content
88
- }) : /* @__PURE__ */ jsx("div", {
89
- className: cn("flex flex-1 min-w-0 items-center gap-2", slots?.content?.className),
90
- children: content
91
- }), /* @__PURE__ */ jsx("div", {
92
- className: cn("flex items-center gap-1 shrink-0"),
93
- children: operationsNode
94
- })]
80
+ children: [
81
+ dragHandleNode,
82
+ buttonProps ? /* @__PURE__ */ jsx("button", {
83
+ ...buttonProps,
84
+ type: buttonProps.type ?? "button",
85
+ className: cn("flex flex-1 min-w-0 items-center gap-2", slots?.content?.className, buttonProps.className),
86
+ children: content
87
+ }) : /* @__PURE__ */ jsx("div", {
88
+ className: cn("flex flex-1 min-w-0 items-center gap-2", slots?.content?.className),
89
+ children: content
90
+ }),
91
+ /* @__PURE__ */ jsx("div", {
92
+ className: cn("flex items-center gap-1 shrink-0"),
93
+ children: operationsNode
94
+ })
95
+ ]
95
96
  });
96
97
  });
97
98
  ArrayItemHeaderRow.displayName = "ArrayItemHeaderRow";
@@ -4,6 +4,7 @@ require('../array-base/index.cjs');
4
4
  const require_SortableItem = require('../array-sortable/SortableItem.cjs');
5
5
  require('../array-sortable/index.cjs');
6
6
  const require_ArrayItemHeaderRow = require('./ArrayItemHeaderRow.cjs');
7
+ const require_get_hidden_item_schema = require('./get-hidden-item-schema.cjs');
7
8
  const require_ItemWrapper = require('./ItemWrapper.cjs');
8
9
  let __formily_react = require("@formily/react");
9
10
  __formily_react = require_rolldown_runtime.__toESM(__formily_react);
@@ -21,19 +22,22 @@ __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
21
22
  */
22
23
  const ListItem = react.default.memo(({ itemKey, index, record, isNew }) => {
23
24
  const schema = (0, __formily_react.useFieldSchema)();
25
+ const hiddenItemSchema = react.default.useMemo(() => {
26
+ return require_get_hidden_item_schema.getHiddenItemSchema(schema.items);
27
+ }, [schema.items]);
24
28
  const isNewItem = isNew;
25
29
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_array_base.ArrayBase.Item, {
26
30
  index,
27
31
  record,
28
32
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_SortableItem.SortableItem, {
29
33
  id: itemKey,
30
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
34
+ children: [hiddenItemSchema ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
31
35
  style: { display: "none" },
32
36
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__formily_react.RecursionField, {
33
- schema: schema.items,
37
+ schema: hiddenItemSchema,
34
38
  name: index
35
39
  })
36
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ItemWrapper.ItemWrapper, {
40
+ }) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ItemWrapper.ItemWrapper, {
37
41
  className: (0, __pixpilot_shadcn.cn)("px-3 pl-4 py-2", isNewItem && "hidden"),
38
42
  index,
39
43
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ArrayItemHeaderRow.ArrayItemHeaderRow, {
@@ -3,6 +3,7 @@ import "../array-base/index.js";
3
3
  import { SortableItem } from "../array-sortable/SortableItem.js";
4
4
  import "../array-sortable/index.js";
5
5
  import { ArrayItemHeaderRow } from "./ArrayItemHeaderRow.js";
6
+ import { getHiddenItemSchema } from "./get-hidden-item-schema.js";
6
7
  import { ItemWrapper } from "./ItemWrapper.js";
7
8
  import { RecursionField, useFieldSchema } from "@formily/react";
8
9
  import React from "react";
@@ -16,19 +17,22 @@ import { cn } from "@pixpilot/shadcn";
16
17
  */
17
18
  const ListItem = React.memo(({ itemKey, index, record, isNew }) => {
18
19
  const schema = useFieldSchema();
20
+ const hiddenItemSchema = React.useMemo(() => {
21
+ return getHiddenItemSchema(schema.items);
22
+ }, [schema.items]);
19
23
  const isNewItem = isNew;
20
24
  return /* @__PURE__ */ jsx(ArrayBase.Item, {
21
25
  index,
22
26
  record,
23
27
  children: /* @__PURE__ */ jsxs(SortableItem, {
24
28
  id: itemKey,
25
- children: [/* @__PURE__ */ jsx("div", {
29
+ children: [hiddenItemSchema ? /* @__PURE__ */ jsx("div", {
26
30
  style: { display: "none" },
27
31
  children: /* @__PURE__ */ jsx(RecursionField, {
28
- schema: schema.items,
32
+ schema: hiddenItemSchema,
29
33
  name: index
30
34
  })
31
- }), /* @__PURE__ */ jsx(ItemWrapper, {
35
+ }) : null, /* @__PURE__ */ jsx(ItemWrapper, {
32
36
  className: cn("px-3 pl-4 py-2", isNewItem && "hidden"),
33
37
  index,
34
38
  children: /* @__PURE__ */ jsx(ArrayItemHeaderRow, {
@@ -0,0 +1,27 @@
1
+
2
+ //#region src/components/array-common/get-hidden-item-schema.ts
3
+ /**
4
+ * Creates a "shallow" version of an array item schema for hidden RecursionField rendering.
5
+ *
6
+ * This prevents mounting all nested field components (like Input) when the array item UI
7
+ * is closed/collapsed, while still creating the array item field instance for x-reactions
8
+ * (e.g., dynamic titles) to work.
9
+ *
10
+ * Used in array components (ArrayDialog, ArrayCollapse) to avoid unnecessary component
11
+ * mounting in list/collapsed states.
12
+ */
13
+ function getHiddenItemSchema(itemSchema) {
14
+ if (itemSchema == null) return null;
15
+ const jsonSchema = typeof itemSchema.toJSON === "function" ? itemSchema.toJSON() : itemSchema;
16
+ if (jsonSchema == null) return null;
17
+ if (typeof jsonSchema !== "object") return jsonSchema;
18
+ const objectSchema = jsonSchema;
19
+ if (objectSchema.type === "object" || objectSchema.properties != null) return {
20
+ ...objectSchema,
21
+ properties: {}
22
+ };
23
+ return objectSchema;
24
+ }
25
+
26
+ //#endregion
27
+ exports.getHiddenItemSchema = getHiddenItemSchema;
@@ -0,0 +1,26 @@
1
+ //#region src/components/array-common/get-hidden-item-schema.ts
2
+ /**
3
+ * Creates a "shallow" version of an array item schema for hidden RecursionField rendering.
4
+ *
5
+ * This prevents mounting all nested field components (like Input) when the array item UI
6
+ * is closed/collapsed, while still creating the array item field instance for x-reactions
7
+ * (e.g., dynamic titles) to work.
8
+ *
9
+ * Used in array components (ArrayDialog, ArrayCollapse) to avoid unnecessary component
10
+ * mounting in list/collapsed states.
11
+ */
12
+ function getHiddenItemSchema(itemSchema) {
13
+ if (itemSchema == null) return null;
14
+ const jsonSchema = typeof itemSchema.toJSON === "function" ? itemSchema.toJSON() : itemSchema;
15
+ if (jsonSchema == null) return null;
16
+ if (typeof jsonSchema !== "object") return jsonSchema;
17
+ const objectSchema = jsonSchema;
18
+ if (objectSchema.type === "object" || objectSchema.properties != null) return {
19
+ ...objectSchema,
20
+ properties: {}
21
+ };
22
+ return objectSchema;
23
+ }
24
+
25
+ //#endregion
26
+ export { getHiddenItemSchema };
@@ -1,5 +1,6 @@
1
1
  const require_ArrayItemDraftFields = require('./ArrayItemDraftFields.cjs');
2
2
  const require_ArrayItemHeaderRow = require('./ArrayItemHeaderRow.cjs');
3
+ const require_get_hidden_item_schema = require('./get-hidden-item-schema.cjs');
3
4
  const require_ItemWrapper = require('./ItemWrapper.cjs');
4
5
  const require_ListItem = require('./ListItem.cjs');
5
6
  const require_use_array_data_source = require('./use-array-data-source.cjs');
@@ -1,5 +1,6 @@
1
1
  import { ArrayItemDraftFields } from "./ArrayItemDraftFields.js";
2
2
  import { ArrayItemHeaderRow } from "./ArrayItemHeaderRow.js";
3
+ import { getHiddenItemSchema } from "./get-hidden-item-schema.js";
3
4
  import { ItemWrapper } from "./ItemWrapper.js";
4
5
  import { ListItem } from "./ListItem.js";
5
6
  import { useArrayDataSource } from "./use-array-data-source.js";
@@ -54,7 +54,6 @@ const EditDialog = (0, __formily_react.observer)(({ schema, onSave, onAutoSave,
54
54
  autoSave,
55
55
  itemIndex
56
56
  });
57
- if (!open) return null;
58
57
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn_ui.Dialog, {
59
58
  open,
60
59
  onOpenChange: (isOpen) => {
@@ -49,7 +49,6 @@ const EditDialog = observer(({ schema, onSave, onAutoSave, onCancel, activeItemM
49
49
  autoSave,
50
50
  itemIndex
51
51
  });
52
- if (!open) return null;
53
52
  return /* @__PURE__ */ jsx(Dialog, {
54
53
  open,
55
54
  onOpenChange: (isOpen) => {
@@ -122,7 +122,7 @@ const ArrayItemsEditPopover = (0, __formily_react.observer)(({ schema, onSave, o
122
122
  children: description
123
123
  })]
124
124
  }),
125
- activeIndex != null && open && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ArrayItemDraftFields.ArrayItemDraftFields, {
125
+ activeIndex != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ArrayItemDraftFields.ArrayItemDraftFields, {
126
126
  schema,
127
127
  form: draftForm,
128
128
  className: "space-y-4"
@@ -117,7 +117,7 @@ const ArrayItemsEditPopover = observer(({ schema, onSave, onAutoSave, onCancel,
117
117
  children: description
118
118
  })]
119
119
  }),
120
- activeIndex != null && open && /* @__PURE__ */ jsx(ArrayItemDraftFields, {
120
+ activeIndex != null && /* @__PURE__ */ jsx(ArrayItemDraftFields, {
121
121
  schema,
122
122
  form: draftForm,
123
123
  className: "space-y-4"
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as _pixpilot_shadcn_ui306 from "@pixpilot/shadcn-ui";
2
+ import * as _pixpilot_shadcn_ui9 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/file-upload/FileUpload.d.ts
5
5
 
@@ -7,14 +7,14 @@ import * as _pixpilot_shadcn_ui306 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: React.ForwardRefExoticComponent<(Omit<Partial<_pixpilot_shadcn_ui306.FileUploadInlineBaseProps & {
10
+ declare const FileUpload: React.ForwardRefExoticComponent<(Omit<Partial<_pixpilot_shadcn_ui9.FileUploadInlineBaseProps & {
11
11
  multiple: true;
12
- value?: _pixpilot_shadcn_ui306.FileMetadata[];
13
- onChange?: _pixpilot_shadcn_ui306.OnChangeMultipleFiles;
14
- } & _pixpilot_shadcn_ui306.FileUploadBaseProps>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui306.FileUploadInlineBaseProps & {
12
+ value?: _pixpilot_shadcn_ui9.FileMetadata[];
13
+ onChange?: _pixpilot_shadcn_ui9.OnChangeMultipleFiles;
14
+ } & _pixpilot_shadcn_ui9.FileUploadBaseProps>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui9.FileUploadInlineBaseProps & {
15
15
  multiple?: false;
16
- value?: _pixpilot_shadcn_ui306.FileMetadata | null;
17
- onChange?: _pixpilot_shadcn_ui306.OnChangeSingleFile;
18
- } & _pixpilot_shadcn_ui306.FileUploadBaseProps>, "ref">) & React.RefAttributes<unknown>>;
16
+ value?: _pixpilot_shadcn_ui9.FileMetadata | null;
17
+ onChange?: _pixpilot_shadcn_ui9.OnChangeSingleFile;
18
+ } & _pixpilot_shadcn_ui9.FileUploadBaseProps>, "ref">) & React.RefAttributes<unknown>>;
19
19
  //#endregion
20
20
  export { FileUpload };
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as _pixpilot_shadcn_ui298 from "@pixpilot/shadcn-ui";
2
+ import * as _pixpilot_shadcn_ui1 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/file-upload/FileUploadInline.d.ts
5
5
 
@@ -7,14 +7,14 @@ import * as _pixpilot_shadcn_ui298 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: React.ForwardRefExoticComponent<(Omit<Partial<_pixpilot_shadcn_ui298.FileUploadInlineBaseProps & {
10
+ declare const FileUploadInline: React.ForwardRefExoticComponent<(Omit<Partial<_pixpilot_shadcn_ui1.FileUploadInlineBaseProps & {
11
11
  multiple: true;
12
- value?: _pixpilot_shadcn_ui298.FileMetadata[];
13
- onChange?: _pixpilot_shadcn_ui298.OnChangeMultipleFiles;
14
- } & _pixpilot_shadcn_ui298.FileUploadBaseProps>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui298.FileUploadInlineBaseProps & {
12
+ value?: _pixpilot_shadcn_ui1.FileMetadata[];
13
+ onChange?: _pixpilot_shadcn_ui1.OnChangeMultipleFiles;
14
+ } & _pixpilot_shadcn_ui1.FileUploadBaseProps>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui1.FileUploadInlineBaseProps & {
15
15
  multiple?: false;
16
- value?: _pixpilot_shadcn_ui298.FileMetadata | null;
17
- onChange?: _pixpilot_shadcn_ui298.OnChangeSingleFile;
18
- } & _pixpilot_shadcn_ui298.FileUploadBaseProps>, "ref">) & React.RefAttributes<unknown>>;
16
+ value?: _pixpilot_shadcn_ui1.FileMetadata | null;
17
+ onChange?: _pixpilot_shadcn_ui1.OnChangeSingleFile;
18
+ } & _pixpilot_shadcn_ui1.FileUploadBaseProps>, "ref">) & React.RefAttributes<unknown>>;
19
19
  //#endregion
20
20
  export { FileUploadInline };
@@ -1,15 +1,15 @@
1
- import * as react1226 from "react";
1
+ import * as react27 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: react1226.ForwardRefExoticComponent<Omit<Partial<react1226.ClassAttributes<HTMLInputElement> & react1226.InputHTMLAttributes<HTMLInputElement> & {
7
+ declare const NumberInput: react27.ForwardRefExoticComponent<Omit<Partial<react27.ClassAttributes<HTMLInputElement> & react27.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"> & react1226.RefAttributes<unknown>>;
13
+ }>, "ref"> & react27.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { NumberInput };