gomtm 0.0.342 → 0.0.344
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/esm/curd/create/CurdCreatePanel.js +1 -2
- package/dist/esm/curd/edit/CurdEditPanel.d.ts +0 -1
- package/dist/esm/curd/edit/CurdEditPanel.js +1 -10
- package/dist/esm/curd/listview/CommonListView.js +2 -6
- package/dist/esm/curd/listview/ListViewRender.js +0 -1
- package/dist/tsconfig.type.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -22,11 +22,10 @@ function CurdCreatePanel(props) {
|
|
|
22
22
|
] }) });
|
|
23
23
|
}
|
|
24
24
|
const CurdCreatePanelTriggerButton = () => {
|
|
25
|
-
const openCreate = useListview((x) => x.openCreate);
|
|
26
25
|
const setOpenCreate = useListview((x) => x.setOpenCreate);
|
|
27
26
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(MtButton, { onClick: () => {
|
|
28
27
|
setOpenCreate(true);
|
|
29
|
-
}, children: "
|
|
28
|
+
}, children: "Create" }) });
|
|
30
29
|
};
|
|
31
30
|
export {
|
|
32
31
|
CurdCreatePanelTriggerButton,
|
|
@@ -2,6 +2,5 @@ import { ComponentType } from "react";
|
|
|
2
2
|
export default function CurdEditPanel(props: {
|
|
3
3
|
fullScreen?: boolean;
|
|
4
4
|
}): import("react").JSX.Element | null;
|
|
5
|
-
export declare const CurdEditPanelTriggerButton: () => import("react").JSX.Element;
|
|
6
5
|
export declare const RenderEditorComponent: () => import("react").JSX.Element;
|
|
7
6
|
export declare const RegisterEditorComponent: (name: string, Component: ComponentType<any>) => void;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { flexRender } from "mtxuilib/lib/render";
|
|
4
4
|
import { Dialog, DialogContent, DialogTitle } from "mtxuilib/ui/dialog";
|
|
5
|
-
import { MtButton } from "mtxuilib/ui/ui-mt/Button";
|
|
6
5
|
import { FullScreenPanel } from "mtxuilib/ui/ui-mt/FullScreenEditPanel";
|
|
7
6
|
import { useMemo } from "react";
|
|
8
7
|
import { useGomtmSuspenseQuery } from "../../gomtmQuery";
|
|
@@ -12,7 +11,6 @@ function CurdEditPanel(props) {
|
|
|
12
11
|
const setOpenEdit = useListview((x) => x.setOpenEdit);
|
|
13
12
|
const openEdit = useListview((x) => x.openEdit);
|
|
14
13
|
const editRender = useListview((x) => x.editRender);
|
|
15
|
-
const editorComponentName = useListview((x) => x.editorComponentName);
|
|
16
14
|
if (!openEdit) {
|
|
17
15
|
return null;
|
|
18
16
|
}
|
|
@@ -41,12 +39,6 @@ const WithLoadGetData = (props) => {
|
|
|
41
39
|
}
|
|
42
40
|
return /* @__PURE__ */ jsx("div", { className: "bg-red-200 p-2", children });
|
|
43
41
|
};
|
|
44
|
-
const CurdEditPanelTriggerButton = () => {
|
|
45
|
-
const setOpenEdit = useListview((x) => x.setOpenEdit);
|
|
46
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(MtButton, { onClick: () => {
|
|
47
|
-
setOpenEdit(true);
|
|
48
|
-
}, children: "Edit" }) });
|
|
49
|
-
};
|
|
50
42
|
const RenderEditorComponent = () => {
|
|
51
43
|
const editorComponentName = useListview((x) => x.editorComponentName);
|
|
52
44
|
const editRender = useListview((x) => x.editRender);
|
|
@@ -73,7 +65,6 @@ RegisterEditorComponent("hello_editor", () => {
|
|
|
73
65
|
return /* @__PURE__ */ jsx("div", { children: "HelloEditorComponent" });
|
|
74
66
|
});
|
|
75
67
|
export {
|
|
76
|
-
CurdEditPanelTriggerButton,
|
|
77
68
|
RegisterEditorComponent,
|
|
78
69
|
RenderEditorComponent,
|
|
79
70
|
CurdEditPanel as default
|
|
@@ -12,7 +12,6 @@ import { MtmErrorView } from "../../components/MtmErrorView";
|
|
|
12
12
|
import { HOTKEY_Listview_Switchlayout } from "../../consts";
|
|
13
13
|
import { useGomtmSuspenseInfiniteQuery } from "../../gomtmQuery";
|
|
14
14
|
import { CurdCreatePanelTriggerButton } from "../create/CurdCreatePanel";
|
|
15
|
-
import { CurdEditPanelTriggerButton } from "../edit/CurdEditPanel";
|
|
16
15
|
import { CommontListResView } from "../list-item/ListViewLayoutRender";
|
|
17
16
|
import { useListview } from "./list-store";
|
|
18
17
|
const ALL_Layouts = [
|
|
@@ -62,12 +61,9 @@ const ListViewActions = () => {
|
|
|
62
61
|
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
63
62
|
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(MtButton, { variant: "ghost", className: "m-0 flex h-10 w-10 items-center justify-center border p-0 shadow-sm backdrop-blur", children: /* @__PURE__ */ jsx(Icons.ellipsis, {}) }) }),
|
|
64
63
|
/* @__PURE__ */ jsxs(DropdownMenuContent, { className: "w-56", children: [
|
|
65
|
-
/* @__PURE__ */ jsx(DropdownMenuLabel, { children: "
|
|
64
|
+
/* @__PURE__ */ jsx(DropdownMenuLabel, { children: "List \u64CD\u4F5C" }),
|
|
66
65
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
67
|
-
/* @__PURE__ */ jsx(DropdownMenuGroup, { children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */ jsx(CurdEditPanelTriggerButton, {}),
|
|
69
|
-
/* @__PURE__ */ jsx(CurdCreatePanelTriggerButton, {})
|
|
70
|
-
] }) }) }) }),
|
|
66
|
+
/* @__PURE__ */ jsx(DropdownMenuGroup, { children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsx("div", { className: "bg-yellow-100 p-2", children: /* @__PURE__ */ jsx(CurdCreatePanelTriggerButton, {}) }) }) }) }),
|
|
71
67
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {})
|
|
72
68
|
] })
|
|
73
69
|
] });
|
|
@@ -10,7 +10,6 @@ const ListViewRender = (props) => {
|
|
|
10
10
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11
11
|
/* @__PURE__ */ jsx(CommonListView, {}),
|
|
12
12
|
/* @__PURE__ */ jsxs(Suspense, { children: [
|
|
13
|
-
/* @__PURE__ */ jsx(PanelRemove, {}),
|
|
14
13
|
/* @__PURE__ */ jsx(CurdCreatePanel, {}),
|
|
15
14
|
/* @__PURE__ */ jsx(CurdEditPanel, { fullScreen: true }),
|
|
16
15
|
/* @__PURE__ */ jsx(PanelRemove, {})
|