@farmzone/fz-react-ui 0.0.8 → 0.0.9
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/index.cjs +29 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +29 -16
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -8894,9 +8894,15 @@ function DetailModalFrame(props) {
|
|
|
8894
8894
|
renderEditBody,
|
|
8895
8895
|
mode,
|
|
8896
8896
|
onModeChange,
|
|
8897
|
-
contentClassName
|
|
8897
|
+
contentClassName,
|
|
8898
|
+
renderExtraContent,
|
|
8899
|
+
renderFooterExtra,
|
|
8900
|
+
onDirtyChange
|
|
8898
8901
|
} = props;
|
|
8899
8902
|
const controller = useDetailController({ mode, onModeChange });
|
|
8903
|
+
React6.useEffect(() => {
|
|
8904
|
+
onDirtyChange?.(controller.isDirty);
|
|
8905
|
+
}, [controller.isDirty, onDirtyChange]);
|
|
8900
8906
|
const handleClose = React6.useCallback(async () => {
|
|
8901
8907
|
if (controller.isDirty) {
|
|
8902
8908
|
const confirmed = await new Promise((resolve) => {
|
|
@@ -8934,24 +8940,31 @@ function DetailModalFrame(props) {
|
|
|
8934
8940
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-semibold text-gray-900", children: title }),
|
|
8935
8941
|
!isEditMode && canEdit && /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "sm", onClick: handleEdit, children: "\uC218\uC815" })
|
|
8936
8942
|
] }),
|
|
8937
|
-
/* @__PURE__ */ jsxRuntime.
|
|
8938
|
-
|
|
8939
|
-
|
|
8940
|
-
|
|
8941
|
-
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
|
|
8945
|
-
|
|
8946
|
-
|
|
8947
|
-
|
|
8948
|
-
|
|
8949
|
-
|
|
8950
|
-
|
|
8943
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ModalBody, { className: "flex-1 min-h-0 p-0", children: [
|
|
8944
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8945
|
+
DetailContent,
|
|
8946
|
+
{
|
|
8947
|
+
controller,
|
|
8948
|
+
data,
|
|
8949
|
+
readFields,
|
|
8950
|
+
editSchema,
|
|
8951
|
+
editFields,
|
|
8952
|
+
onSave,
|
|
8953
|
+
renderReadBody,
|
|
8954
|
+
renderEditBody,
|
|
8955
|
+
layout: "compact",
|
|
8956
|
+
className: "overflow-visible max-h-none"
|
|
8957
|
+
}
|
|
8958
|
+
),
|
|
8959
|
+
renderExtraContent?.({ isEditMode })
|
|
8960
|
+
] }),
|
|
8951
8961
|
/* @__PURE__ */ jsxRuntime.jsx(ModalFooter, { className: "flex justify-end gap-2", children: isEditMode ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8952
8962
|
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", onClick: handleCancelEdit, disabled: controller.isSaving, children: "\uCDE8\uC18C" }),
|
|
8953
8963
|
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "submit", form: controller.formId, variant: "save", disabled: controller.isSaving, children: controller.isSaving ? "\uC800\uC7A5 \uC911..." : "\uC800\uC7A5" })
|
|
8954
|
-
] }) : /* @__PURE__ */ jsxRuntime.
|
|
8964
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8965
|
+
renderFooterExtra,
|
|
8966
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", onClick: handleClose, children: "\uB2EB\uAE30" })
|
|
8967
|
+
] }) })
|
|
8955
8968
|
] });
|
|
8956
8969
|
}
|
|
8957
8970
|
function useBlockModalConfirm() {
|