gomtm 0.0.348 → 0.0.349
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.
|
@@ -39,7 +39,7 @@ import { curdViewGet } from "../gomtmpb/mtm/sppb/mtm-MtmService_connectquery";
|
|
|
39
39
|
import { CurdView } from "../gomtmpb/mtm/sppb/mtm_pb";
|
|
40
40
|
import CurdCreatePanel from "./create/CurdCreatePanel";
|
|
41
41
|
import CurdEditPanel from "./edit/CurdEditPanel";
|
|
42
|
-
import {
|
|
42
|
+
import { CommonListView } from "./listview/CommonListView";
|
|
43
43
|
import { ListViewStoreProvider } from "./listview/list-store";
|
|
44
44
|
import { PanelRemove } from "./remove/RemovePanel";
|
|
45
45
|
const createListviewStore = (initProps) => {
|
|
@@ -98,7 +98,7 @@ const CurdViewView = (props) => {
|
|
|
98
98
|
viewUpdate: curdViewData.routeEdit,
|
|
99
99
|
viewCreate: curdViewData.routeCreate,
|
|
100
100
|
children: [
|
|
101
|
-
/* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx("div", { children: "loading
|
|
101
|
+
/* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx("div", { children: "loading CommonListView" }), children: /* @__PURE__ */ jsx(CommonListView, {}) }),
|
|
102
102
|
/* @__PURE__ */ jsxs(Suspense, { children: [
|
|
103
103
|
/* @__PURE__ */ jsx(CurdCreatePanel, { fullScreen: true }),
|
|
104
104
|
/* @__PURE__ */ jsx(CurdEditPanel, { fullScreen: true }),
|
|
@@ -20,9 +20,9 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20
20
|
};
|
|
21
21
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
22
22
|
import { Suspense } from "react";
|
|
23
|
-
import { MtmService } from "../../src/gomtmpb/mtm/sppb/mtm_connect";
|
|
24
23
|
import { PrefetchConnectInfiniteQuery, PrefetchConnectQuery } from "../components/SSR";
|
|
25
24
|
import { curdViewGet } from "../gomtmpb/mtm/sppb/mtm-MtmService_connectquery";
|
|
25
|
+
import { MtmService } from "../gomtmpb/mtm/sppb/mtm_connect";
|
|
26
26
|
import { CurdViewGetReq } from "../gomtmpb/mtm/sppb/mtm_pb";
|
|
27
27
|
import { createMtmServiceClient } from "../mtmFetcher";
|
|
28
28
|
import { CurdViewView } from "./CurdView";
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Icons } from "mtxuilib/icons/icons";
|
|
4
4
|
import { cn } from "mtxuilib/lib/utils";
|
|
5
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "mtxuilib/ui/dropdown-menu";
|
|
5
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "mtxuilib/ui/dropdown-menu";
|
|
6
6
|
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "mtxuilib/ui/pagination";
|
|
7
7
|
import { MtButton } from "mtxuilib/ui/ui-mt/Button";
|
|
8
|
-
import {
|
|
8
|
+
import { lazy, useState } from "react";
|
|
9
9
|
import { MtmErrorView } from "../../components/MtmErrorView";
|
|
10
10
|
import { useGomtmSuspenseInfiniteQuery } from "../../gomtmQuery";
|
|
11
|
-
import { CurdCreatePanelTriggerButton } from "../create/CurdCreatePanel";
|
|
12
11
|
import { CommontListResView } from "../list-item/ListViewLayoutRender";
|
|
13
12
|
import { useListview } from "./list-store";
|
|
14
13
|
const ALL_Layouts = [
|
|
@@ -55,12 +54,18 @@ function CommonListView() {
|
|
|
55
54
|
] });
|
|
56
55
|
}
|
|
57
56
|
const ListViewActions = () => {
|
|
58
|
-
|
|
57
|
+
const [open, setOpen] = useState(false);
|
|
58
|
+
const setOpenCreate = useListview((x) => x.setOpenCreate);
|
|
59
|
+
setOpen;
|
|
60
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, { open, onOpenChange: setOpen, children: [
|
|
59
61
|
/* @__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, {}) }) }),
|
|
60
62
|
/* @__PURE__ */ jsxs(DropdownMenuContent, { className: "w-56", children: [
|
|
61
63
|
/* @__PURE__ */ jsx(DropdownMenuLabel, { children: "List \u64CD\u4F5C" }),
|
|
62
64
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
63
|
-
/* @__PURE__ */ jsx(DropdownMenuGroup, { children: /* @__PURE__ */ jsx(
|
|
65
|
+
/* @__PURE__ */ jsx(DropdownMenuGroup, { children: /* @__PURE__ */ jsx(DropdownMenuItem, { onClick: () => {
|
|
66
|
+
setOpenCreate(true);
|
|
67
|
+
setOpen(false);
|
|
68
|
+
}, children: "create" }) }),
|
|
64
69
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {})
|
|
65
70
|
] })
|
|
66
71
|
] });
|