@pixpilot/formily-shadcn 1.4.4 → 1.5.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/Column.d.ts +2 -2
- package/dist/components/DatePicker.d.ts +3 -3
- package/dist/components/Form.d.ts +2 -2
- package/dist/components/FormGrid.d.ts +2 -2
- package/dist/components/IconPicker.d.ts +3 -3
- package/dist/components/IconToggle.d.ts +3 -3
- package/dist/components/Input.d.ts +3 -3
- package/dist/components/Radio.d.ts +2 -2
- package/dist/components/Rating.d.ts +4 -4
- package/dist/components/Row.d.ts +2 -2
- package/dist/components/Separator.d.cts +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 +2 -2
- package/dist/components/TagsInputInline.d.ts +3 -3
- package/dist/components/Textarea.d.cts +2 -2
- package/dist/components/Textarea.d.ts +2 -2
- package/dist/components/ToggleButton.d.cts +2 -2
- package/dist/components/ToggleButton.d.ts +3 -3
- package/dist/components/array-common/ArrayItemDraftFields.cjs +37 -25
- package/dist/components/array-common/ArrayItemDraftFields.js +37 -25
- package/dist/components/array-common/ArrayItemsList.cjs +3 -2
- package/dist/components/array-common/ArrayItemsList.js +3 -2
- package/dist/components/array-common/ItemWrapper.cjs +1 -0
- package/dist/components/array-common/ItemWrapper.js +1 -0
- package/dist/components/array-common/ListItem.cjs +21 -4
- package/dist/components/array-common/ListItem.js +23 -6
- package/dist/components/array-common/use-array-item-draft-form.cjs +31 -15
- package/dist/components/array-common/use-array-item-draft-form.js +31 -15
- package/dist/components/array-common/use-array-item-edit-state.cjs +5 -14
- package/dist/components/array-common/use-array-item-edit-state.js +5 -13
- package/dist/components/array-dialog/EditDialog.cjs +60 -6
- package/dist/components/array-dialog/EditDialog.js +60 -6
- package/dist/components/array-popover/ArrayPopover.cjs +29 -16
- package/dist/components/array-popover/ArrayPopover.js +30 -17
- package/dist/components/array-popover/Popover.cjs +88 -88
- package/dist/components/array-popover/Popover.js +88 -88
- package/dist/components/context/types.d.cts +2 -1
- package/dist/components/context/types.d.ts +2 -1
- package/dist/components/file-upload/FileUpload.d.ts +8 -8
- package/dist/components/file-upload/FileUploadInline.d.ts +8 -8
- package/dist/components/schema-field/schema-field-basics.d.ts +302 -302
- package/dist/components/schema-field/schema-field-extended.d.cts +632 -632
- package/dist/components/schema-field/schema-field-extended.d.ts +307 -307
- package/dist/components/schema-field/schema-field.d.cts +412 -412
- 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 +2 -2
- package/dist/components/slider/SliderInput.d.ts +2 -2
- package/dist/components/slider/SliderSelect.d.cts +3 -3
- package/dist/components/slider/SliderSelect.d.ts +2 -2
- package/package.json +6 -6
|
@@ -6,16 +6,16 @@ let __formily_react = require("@formily/react");
|
|
|
6
6
|
__formily_react = require_rolldown_runtime.__toESM(__formily_react);
|
|
7
7
|
let react = require("react");
|
|
8
8
|
react = require_rolldown_runtime.__toESM(react);
|
|
9
|
+
let lucide_react = require("lucide-react");
|
|
10
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_react);
|
|
9
11
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
12
|
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
11
13
|
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
12
14
|
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
13
|
-
let react_dom = require("react-dom");
|
|
14
|
-
react_dom = require_rolldown_runtime.__toESM(react_dom);
|
|
15
15
|
|
|
16
16
|
//#region src/components/array-popover/Popover.tsx
|
|
17
|
-
const ArrayItemsEditPopover = (0, __formily_react.observer)(({ schema, onSave, onAutoSave, onCancel,
|
|
18
|
-
const { arrayField, activeIndex, isNewItem,
|
|
17
|
+
const ArrayItemsEditPopover = (0, __formily_react.observer)(({ schema, onSave, onAutoSave, onCancel, activeItemManager, autoSave,...rest }) => {
|
|
18
|
+
const { arrayField, activeIndex, isNewItem, normalizedAutoSave, draftForm, basePath, validationPath, isolatedForm, isDirty, title, description, shouldShake, triggerShake, handleSave, handleCancel } = require_use_array_item_edit_state.useArrayItemEditState({
|
|
19
19
|
schema,
|
|
20
20
|
activeItemManager,
|
|
21
21
|
onSave,
|
|
@@ -40,7 +40,7 @@ const ArrayItemsEditPopover = (0, __formily_react.observer)(({ schema, onSave, o
|
|
|
40
40
|
triggerShake();
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
|
-
Promise.resolve(draftForm.validate()).then(() => {
|
|
43
|
+
Promise.resolve(draftForm.validate(validationPath)).then(() => {
|
|
44
44
|
handleCancel();
|
|
45
45
|
}).catch(() => {
|
|
46
46
|
triggerShake();
|
|
@@ -50,93 +50,93 @@ const ArrayItemsEditPopover = (0, __formily_react.observer)(({ schema, onSave, o
|
|
|
50
50
|
draftForm,
|
|
51
51
|
handleCancel,
|
|
52
52
|
isDirty,
|
|
53
|
-
triggerShake
|
|
53
|
+
triggerShake,
|
|
54
|
+
validationPath
|
|
54
55
|
]);
|
|
55
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.PopoverContent, {
|
|
57
|
+
className: shouldShake ? "relative w-96 pp-shake" : "relative w-96",
|
|
58
|
+
side: "top",
|
|
59
|
+
...rest,
|
|
60
|
+
onInteractOutside: (event) => {
|
|
61
|
+
if (isDirty) {
|
|
62
|
+
event.preventDefault();
|
|
63
|
+
triggerShake();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
event.preventDefault();
|
|
59
67
|
validateAndClose();
|
|
60
|
-
},
|
|
61
|
-
|
|
68
|
+
},
|
|
69
|
+
onEscapeKeyDown: (event) => {
|
|
70
|
+
if (isDirty) {
|
|
71
|
+
event.preventDefault();
|
|
72
|
+
triggerShake();
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
event.preventDefault();
|
|
76
|
+
validateAndClose();
|
|
77
|
+
},
|
|
62
78
|
children: [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
79
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ShakeStyles.ShakeStyles, {}),
|
|
80
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Button, {
|
|
81
|
+
type: "button",
|
|
82
|
+
variant: "ghost",
|
|
83
|
+
size: "icon",
|
|
84
|
+
className: "absolute right-2 top-2 z-10 size-8",
|
|
85
|
+
"aria-label": "Close",
|
|
86
|
+
onClick: validateAndClose,
|
|
87
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.XIcon, { className: "size-4" })
|
|
66
88
|
}),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
size: "sm",
|
|
119
|
-
onClick: handleSave,
|
|
120
|
-
children: "Save"
|
|
121
|
-
})]
|
|
122
|
-
}),
|
|
123
|
-
normalizedAutoSave && isNewItem && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
124
|
-
className: "flex justify-end gap-2",
|
|
125
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Button, {
|
|
126
|
-
type: "button",
|
|
127
|
-
variant: "outline",
|
|
128
|
-
size: "sm",
|
|
129
|
-
onClick: handleDiscard,
|
|
130
|
-
children: "Discard"
|
|
131
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Button, {
|
|
132
|
-
type: "button",
|
|
133
|
-
size: "sm",
|
|
134
|
-
onClick: validateAndClose,
|
|
135
|
-
children: "Done"
|
|
136
|
-
})]
|
|
137
|
-
})
|
|
138
|
-
]
|
|
139
|
-
})]
|
|
89
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
90
|
+
className: "space-y-4",
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
93
|
+
className: "space-y-2",
|
|
94
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", {
|
|
95
|
+
className: "font-medium leading-none",
|
|
96
|
+
children: title
|
|
97
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
98
|
+
className: "text-muted-foreground text-sm",
|
|
99
|
+
children: description
|
|
100
|
+
})]
|
|
101
|
+
}),
|
|
102
|
+
activeIndex != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ArrayItemDraftFields.ArrayItemDraftFields, {
|
|
103
|
+
schema,
|
|
104
|
+
form: draftForm,
|
|
105
|
+
basePath,
|
|
106
|
+
isolated: isolatedForm,
|
|
107
|
+
className: "space-y-4"
|
|
108
|
+
}),
|
|
109
|
+
!normalizedAutoSave && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
110
|
+
className: "flex justify-end gap-2",
|
|
111
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Button, {
|
|
112
|
+
type: "button",
|
|
113
|
+
variant: "outline",
|
|
114
|
+
size: "sm",
|
|
115
|
+
onClick: handleCancel,
|
|
116
|
+
children: "Cancel"
|
|
117
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Button, {
|
|
118
|
+
type: "button",
|
|
119
|
+
size: "sm",
|
|
120
|
+
onClick: handleSave,
|
|
121
|
+
children: "Save"
|
|
122
|
+
})]
|
|
123
|
+
}),
|
|
124
|
+
normalizedAutoSave && isNewItem && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
125
|
+
className: "flex justify-end gap-2",
|
|
126
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Button, {
|
|
127
|
+
type: "button",
|
|
128
|
+
variant: "outline",
|
|
129
|
+
size: "sm",
|
|
130
|
+
onClick: handleDiscard,
|
|
131
|
+
children: "Discard"
|
|
132
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Button, {
|
|
133
|
+
type: "button",
|
|
134
|
+
size: "sm",
|
|
135
|
+
onClick: validateAndClose,
|
|
136
|
+
children: "Done"
|
|
137
|
+
})]
|
|
138
|
+
})
|
|
139
|
+
]
|
|
140
140
|
})
|
|
141
141
|
]
|
|
142
142
|
});
|
|
@@ -3,13 +3,13 @@ import { ShakeStyles } from "../array-common/ShakeStyles.js";
|
|
|
3
3
|
import { useArrayItemEditState } from "../array-common/use-array-item-edit-state.js";
|
|
4
4
|
import { observer } from "@formily/react";
|
|
5
5
|
import React from "react";
|
|
6
|
+
import { XIcon } from "lucide-react";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { Button,
|
|
8
|
-
import { createPortal } from "react-dom";
|
|
8
|
+
import { Button, PopoverContent } from "@pixpilot/shadcn";
|
|
9
9
|
|
|
10
10
|
//#region src/components/array-popover/Popover.tsx
|
|
11
|
-
const ArrayItemsEditPopover = observer(({ schema, onSave, onAutoSave, onCancel,
|
|
12
|
-
const { arrayField, activeIndex, isNewItem,
|
|
11
|
+
const ArrayItemsEditPopover = observer(({ schema, onSave, onAutoSave, onCancel, activeItemManager, autoSave,...rest }) => {
|
|
12
|
+
const { arrayField, activeIndex, isNewItem, normalizedAutoSave, draftForm, basePath, validationPath, isolatedForm, isDirty, title, description, shouldShake, triggerShake, handleSave, handleCancel } = useArrayItemEditState({
|
|
13
13
|
schema,
|
|
14
14
|
activeItemManager,
|
|
15
15
|
onSave,
|
|
@@ -34,7 +34,7 @@ const ArrayItemsEditPopover = observer(({ schema, onSave, onAutoSave, onCancel,
|
|
|
34
34
|
triggerShake();
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
Promise.resolve(draftForm.validate()).then(() => {
|
|
37
|
+
Promise.resolve(draftForm.validate(validationPath)).then(() => {
|
|
38
38
|
handleCancel();
|
|
39
39
|
}).catch(() => {
|
|
40
40
|
triggerShake();
|
|
@@ -44,93 +44,93 @@ const ArrayItemsEditPopover = observer(({ schema, onSave, onAutoSave, onCancel,
|
|
|
44
44
|
draftForm,
|
|
45
45
|
handleCancel,
|
|
46
46
|
isDirty,
|
|
47
|
-
triggerShake
|
|
47
|
+
triggerShake,
|
|
48
|
+
validationPath
|
|
48
49
|
]);
|
|
49
|
-
return /* @__PURE__ */ jsxs(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
return /* @__PURE__ */ jsxs(PopoverContent, {
|
|
51
|
+
className: shouldShake ? "relative w-96 pp-shake" : "relative w-96",
|
|
52
|
+
side: "top",
|
|
53
|
+
...rest,
|
|
54
|
+
onInteractOutside: (event) => {
|
|
55
|
+
if (isDirty) {
|
|
56
|
+
event.preventDefault();
|
|
57
|
+
triggerShake();
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
event.preventDefault();
|
|
53
61
|
validateAndClose();
|
|
54
|
-
},
|
|
55
|
-
|
|
62
|
+
},
|
|
63
|
+
onEscapeKeyDown: (event) => {
|
|
64
|
+
if (isDirty) {
|
|
65
|
+
event.preventDefault();
|
|
66
|
+
triggerShake();
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
event.preventDefault();
|
|
70
|
+
validateAndClose();
|
|
71
|
+
},
|
|
56
72
|
children: [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
73
|
+
/* @__PURE__ */ jsx(ShakeStyles, {}),
|
|
74
|
+
/* @__PURE__ */ jsx(Button, {
|
|
75
|
+
type: "button",
|
|
76
|
+
variant: "ghost",
|
|
77
|
+
size: "icon",
|
|
78
|
+
className: "absolute right-2 top-2 z-10 size-8",
|
|
79
|
+
"aria-label": "Close",
|
|
80
|
+
onClick: validateAndClose,
|
|
81
|
+
children: /* @__PURE__ */ jsx(XIcon, { className: "size-4" })
|
|
60
82
|
}),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
size: "sm",
|
|
113
|
-
onClick: handleSave,
|
|
114
|
-
children: "Save"
|
|
115
|
-
})]
|
|
116
|
-
}),
|
|
117
|
-
normalizedAutoSave && isNewItem && /* @__PURE__ */ jsxs("div", {
|
|
118
|
-
className: "flex justify-end gap-2",
|
|
119
|
-
children: [/* @__PURE__ */ jsx(Button, {
|
|
120
|
-
type: "button",
|
|
121
|
-
variant: "outline",
|
|
122
|
-
size: "sm",
|
|
123
|
-
onClick: handleDiscard,
|
|
124
|
-
children: "Discard"
|
|
125
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
126
|
-
type: "button",
|
|
127
|
-
size: "sm",
|
|
128
|
-
onClick: validateAndClose,
|
|
129
|
-
children: "Done"
|
|
130
|
-
})]
|
|
131
|
-
})
|
|
132
|
-
]
|
|
133
|
-
})]
|
|
83
|
+
/* @__PURE__ */ jsxs("div", {
|
|
84
|
+
className: "space-y-4",
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ jsxs("div", {
|
|
87
|
+
className: "space-y-2",
|
|
88
|
+
children: [/* @__PURE__ */ jsx("h4", {
|
|
89
|
+
className: "font-medium leading-none",
|
|
90
|
+
children: title
|
|
91
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
92
|
+
className: "text-muted-foreground text-sm",
|
|
93
|
+
children: description
|
|
94
|
+
})]
|
|
95
|
+
}),
|
|
96
|
+
activeIndex != null && /* @__PURE__ */ jsx(ArrayItemDraftFields, {
|
|
97
|
+
schema,
|
|
98
|
+
form: draftForm,
|
|
99
|
+
basePath,
|
|
100
|
+
isolated: isolatedForm,
|
|
101
|
+
className: "space-y-4"
|
|
102
|
+
}),
|
|
103
|
+
!normalizedAutoSave && /* @__PURE__ */ jsxs("div", {
|
|
104
|
+
className: "flex justify-end gap-2",
|
|
105
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
106
|
+
type: "button",
|
|
107
|
+
variant: "outline",
|
|
108
|
+
size: "sm",
|
|
109
|
+
onClick: handleCancel,
|
|
110
|
+
children: "Cancel"
|
|
111
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
112
|
+
type: "button",
|
|
113
|
+
size: "sm",
|
|
114
|
+
onClick: handleSave,
|
|
115
|
+
children: "Save"
|
|
116
|
+
})]
|
|
117
|
+
}),
|
|
118
|
+
normalizedAutoSave && isNewItem && /* @__PURE__ */ jsxs("div", {
|
|
119
|
+
className: "flex justify-end gap-2",
|
|
120
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
121
|
+
type: "button",
|
|
122
|
+
variant: "outline",
|
|
123
|
+
size: "sm",
|
|
124
|
+
onClick: handleDiscard,
|
|
125
|
+
children: "Discard"
|
|
126
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
127
|
+
type: "button",
|
|
128
|
+
size: "sm",
|
|
129
|
+
onClick: validateAndClose,
|
|
130
|
+
children: "Done"
|
|
131
|
+
})]
|
|
132
|
+
})
|
|
133
|
+
]
|
|
134
134
|
})
|
|
135
135
|
]
|
|
136
136
|
});
|
|
@@ -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.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _pixpilot_shadcn_ui13 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_ui511 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_ui13.FileUploadInlineBaseProps & _pixpilot_shadcn_ui13.FileUploadRootPropsBaseProps & {
|
|
11
11
|
multiple: true;
|
|
12
|
-
value?:
|
|
13
|
-
onChange?:
|
|
14
|
-
} &
|
|
12
|
+
value?: _pixpilot_shadcn_ui13.FileMetadata[];
|
|
13
|
+
onChange?: _pixpilot_shadcn_ui13.OnChangeMultipleFiles;
|
|
14
|
+
} & _pixpilot_shadcn_ui13.FileUploadBaseProps>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui13.FileUploadInlineBaseProps & _pixpilot_shadcn_ui13.FileUploadRootPropsBaseProps & {
|
|
15
15
|
multiple?: false;
|
|
16
|
-
value?:
|
|
17
|
-
onChange?:
|
|
18
|
-
} &
|
|
16
|
+
value?: _pixpilot_shadcn_ui13.FileMetadata | null;
|
|
17
|
+
onChange?: _pixpilot_shadcn_ui13.OnChangeSingleFile;
|
|
18
|
+
} & _pixpilot_shadcn_ui13.FileUploadBaseProps>, "ref">) & React.RefAttributes<unknown>>;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { FileUpload$1 as FileUpload };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _pixpilot_shadcn_ui3 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_ui501 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_ui3.FileUploadInlineBaseProps & _pixpilot_shadcn_ui3.FileUploadRootPropsBaseProps & {
|
|
11
11
|
multiple: true;
|
|
12
|
-
value?:
|
|
13
|
-
onChange?:
|
|
14
|
-
} &
|
|
12
|
+
value?: _pixpilot_shadcn_ui3.FileMetadata[];
|
|
13
|
+
onChange?: _pixpilot_shadcn_ui3.OnChangeMultipleFiles;
|
|
14
|
+
} & _pixpilot_shadcn_ui3.FileUploadBaseProps>, "ref"> | Omit<Partial<_pixpilot_shadcn_ui3.FileUploadInlineBaseProps & _pixpilot_shadcn_ui3.FileUploadRootPropsBaseProps & {
|
|
15
15
|
multiple?: false;
|
|
16
|
-
value?:
|
|
17
|
-
onChange?:
|
|
18
|
-
} &
|
|
16
|
+
value?: _pixpilot_shadcn_ui3.FileMetadata | null;
|
|
17
|
+
onChange?: _pixpilot_shadcn_ui3.OnChangeSingleFile;
|
|
18
|
+
} & _pixpilot_shadcn_ui3.FileUploadBaseProps>, "ref">) & React.RefAttributes<unknown>>;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { FileUploadInline$1 as FileUploadInline };
|