gomtm 0.0.356 → 0.0.359
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/form/CurdEditPanel.d.ts +2 -0
- package/dist/esm/curd/form/CurdEditPanel.js +56 -0
- package/dist/esm/curd/form/GomtmForm.d.ts +2 -0
- package/dist/esm/curd/form/GomtmForm.js +46 -0
- package/dist/esm/curd/form/formStore.d.ts +34 -0
- package/dist/esm/curd/form/formStore.js +121 -0
- package/dist/esm/curd/form/useCurdUpdateForm.d.ts +7 -0
- package/dist/esm/curd/form/useCurdUpdateForm.js +25 -0
- package/dist/esm/curd/listview/CommonListView.js +26 -36
- package/dist/tsconfig.type.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useMtRouter } from "mtxuilib/hooks/use-router";
|
|
4
|
+
import { MtPopupPanel } from "mtxuilib/ui/ui-mt/MtPopupPanel";
|
|
5
|
+
import { useMemo } from "react";
|
|
6
|
+
import { useGomtmSuspenseQuery } from "../../gomtmQuery";
|
|
7
|
+
import { RenderViewByName } from "../DynViews";
|
|
8
|
+
import { useListview } from "../listview/list-store";
|
|
9
|
+
import { useGomtmForm2 } from "./formStore";
|
|
10
|
+
function CurdEditPanel(props) {
|
|
11
|
+
const gomtmForm = useGomtmForm2();
|
|
12
|
+
const router = useMtRouter();
|
|
13
|
+
if (!gomtmForm.open) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
if (!gomtmForm.viewName) {
|
|
17
|
+
return /* @__PURE__ */ jsx("div", { children: "missing viewUpdate value" });
|
|
18
|
+
}
|
|
19
|
+
if (gomtmForm.viewName.startsWith("/")) {
|
|
20
|
+
router.push(gomtmForm.viewName);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (!gomtmForm.viewName) {
|
|
24
|
+
return /* @__PURE__ */ jsx("div", { children: "missing viewName" });
|
|
25
|
+
}
|
|
26
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
27
|
+
MtPopupPanel,
|
|
28
|
+
{
|
|
29
|
+
open: gomtmForm.open,
|
|
30
|
+
onOpenChange: gomtmForm.setOpen,
|
|
31
|
+
fullScreen: gomtmForm.fullScreen,
|
|
32
|
+
title: gomtmForm.title,
|
|
33
|
+
children: /* @__PURE__ */ jsx(RenderViewByName, { name: gomtmForm.viewName })
|
|
34
|
+
}
|
|
35
|
+
) });
|
|
36
|
+
}
|
|
37
|
+
const WithLoadGetData = (props) => {
|
|
38
|
+
const { children } = props;
|
|
39
|
+
const methodGet = useListview((x) => x.methodGet);
|
|
40
|
+
const svc = useListview((x) => x.svc);
|
|
41
|
+
const activateItem = useListview((x) => x.activateItem);
|
|
42
|
+
const setDetailData = useListview((x) => x.setDetailData);
|
|
43
|
+
const detailQuery = useGomtmSuspenseQuery(svc, methodGet, {
|
|
44
|
+
id: parseInt(activateItem.id)
|
|
45
|
+
});
|
|
46
|
+
useMemo(() => {
|
|
47
|
+
setDetailData(detailQuery.data);
|
|
48
|
+
}, [detailQuery.data, setDetailData]);
|
|
49
|
+
if (detailQuery.isLoading) {
|
|
50
|
+
return /* @__PURE__ */ jsx("div", { children: "loading detail" });
|
|
51
|
+
}
|
|
52
|
+
return children;
|
|
53
|
+
};
|
|
54
|
+
export {
|
|
55
|
+
CurdEditPanel as default
|
|
56
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
+
import { EditFormToolbar } from "mtxuilib/form/EditFormToolbar";
|
|
23
|
+
import { MtForm } from "mtxuilib/ui/ui-mt/MtForm";
|
|
24
|
+
import { useGomtmForm, useGomtmForm2 } from "./formStore";
|
|
25
|
+
const GomtmForm = (props) => {
|
|
26
|
+
const { children } = props;
|
|
27
|
+
const handleSubmit = useGomtmForm((x) => x.handleSubmit);
|
|
28
|
+
const handleCancel = useGomtmForm((x) => x.handleCancel);
|
|
29
|
+
const gomtmForm = useGomtmForm2();
|
|
30
|
+
if (!gomtmForm.form) {
|
|
31
|
+
return /* @__PURE__ */ jsx("div", { children: "missing form object" });
|
|
32
|
+
}
|
|
33
|
+
return /* @__PURE__ */ jsx(MtForm, __spreadProps(__spreadValues({}, gomtmForm.form), { children: /* @__PURE__ */ jsxs("form", { onSubmit: gomtmForm.form.handleSubmit(handleSubmit), children: [
|
|
34
|
+
/* @__PURE__ */ jsx("div", { className: " sticky top-0 z-30 p-1", children: /* @__PURE__ */ jsx(
|
|
35
|
+
EditFormToolbar,
|
|
36
|
+
{
|
|
37
|
+
onSubmit: handleSubmit,
|
|
38
|
+
onCancel: handleCancel
|
|
39
|
+
}
|
|
40
|
+
) }),
|
|
41
|
+
children
|
|
42
|
+
] }) }));
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
GomtmForm
|
|
46
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
interface GomtmFormProps {
|
|
3
|
+
open?: boolean;
|
|
4
|
+
fullScreen?: boolean;
|
|
5
|
+
viewName: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
onOpenChange?: (open: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface GomtmFormState extends GomtmFormProps {
|
|
10
|
+
setOpen: (open: boolean) => void;
|
|
11
|
+
setFullScreen: (open: boolean) => void;
|
|
12
|
+
setTitle: (title: string) => void;
|
|
13
|
+
handleSubmit: (values: any) => void;
|
|
14
|
+
handleCancel: (values?: any) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const gomtmFormContext: import("react").Context<import("zustand").StoreApi<GomtmFormState> | null>;
|
|
17
|
+
export declare const GomtmFormProvider: (props: PropsWithChildren<GomtmFormProps>) => import("react").JSX.Element;
|
|
18
|
+
export declare function useGomtmForm(): GomtmFormState;
|
|
19
|
+
export declare function useGomtmForm<T>(selector: (state: GomtmFormState) => T): T;
|
|
20
|
+
export declare function useGomtmForm2(): {
|
|
21
|
+
form: import("react-hook-form").UseFormReturn<import("react-hook-form").FieldValues, any, undefined>;
|
|
22
|
+
open: boolean | undefined;
|
|
23
|
+
setOpen: (open: boolean) => void;
|
|
24
|
+
fullScreen: boolean | undefined;
|
|
25
|
+
viewName: string;
|
|
26
|
+
title: string | undefined;
|
|
27
|
+
setFullScreen: (open: boolean) => void;
|
|
28
|
+
setTitle: (title: string) => void;
|
|
29
|
+
handleSubmit: (values: any) => void;
|
|
30
|
+
handleCancel: (values?: any) => void;
|
|
31
|
+
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
32
|
+
};
|
|
33
|
+
export declare function GomtmFormDebug(): import("react").JSX.Element;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
var __objRest = (source, exclude) => {
|
|
22
|
+
var target = {};
|
|
23
|
+
for (var prop in source)
|
|
24
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
if (source != null && __getOwnPropSymbols)
|
|
27
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
}
|
|
31
|
+
return target;
|
|
32
|
+
};
|
|
33
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
34
|
+
import { createContext, useCallback, useContext, useMemo, useRef } from "react";
|
|
35
|
+
import { useForm } from "react-hook-form";
|
|
36
|
+
import { useStore } from "zustand";
|
|
37
|
+
import { createStore } from "zustand/vanilla";
|
|
38
|
+
const createGomtmFormStore = (initProps) => {
|
|
39
|
+
const DEFAULT_PROPS = {
|
|
40
|
+
open: false,
|
|
41
|
+
viewName: ""
|
|
42
|
+
};
|
|
43
|
+
return createStore()((set, get) => __spreadProps(__spreadValues(__spreadValues({}, DEFAULT_PROPS), initProps), {
|
|
44
|
+
setOpen: (open) => set({ open }),
|
|
45
|
+
setFullScreen: (fullScreen) => set({ fullScreen }),
|
|
46
|
+
setTitle: (title) => set({ title }),
|
|
47
|
+
handleSubmit: (values) => {
|
|
48
|
+
console.log("TODO submit formvalues", values);
|
|
49
|
+
},
|
|
50
|
+
handleCancel: (values) => {
|
|
51
|
+
set({ open: false });
|
|
52
|
+
const onOpenChange = get().onOpenChange;
|
|
53
|
+
if (onOpenChange) {
|
|
54
|
+
onOpenChange(false);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}));
|
|
58
|
+
};
|
|
59
|
+
const gomtmFormContext = createContext(null);
|
|
60
|
+
const GomtmFormProvider = (props) => {
|
|
61
|
+
const _a = props, { children } = _a, etc = __objRest(_a, ["children"]);
|
|
62
|
+
const storeRef = useRef();
|
|
63
|
+
if (!storeRef.current) {
|
|
64
|
+
storeRef.current = createGomtmFormStore(props);
|
|
65
|
+
}
|
|
66
|
+
useMemo(() => {
|
|
67
|
+
var _a2;
|
|
68
|
+
(_a2 = storeRef.current) == null ? void 0 : _a2.setState({ open: props.open });
|
|
69
|
+
}, [props.open]);
|
|
70
|
+
useMemo(() => {
|
|
71
|
+
var _a2;
|
|
72
|
+
(_a2 = storeRef.current) == null ? void 0 : _a2.setState({ viewName: props.viewName });
|
|
73
|
+
}, [props.viewName]);
|
|
74
|
+
return /* @__PURE__ */ jsxs(gomtmFormContext.Provider, { value: storeRef.current, children: [
|
|
75
|
+
children,
|
|
76
|
+
/* @__PURE__ */ jsx(GomtmFormDebug, {})
|
|
77
|
+
] });
|
|
78
|
+
};
|
|
79
|
+
function useGomtmForm(selector) {
|
|
80
|
+
const store = useContext(gomtmFormContext);
|
|
81
|
+
if (!store)
|
|
82
|
+
throw new Error("useGomtmForm Missing GomtmFormProvider in the tree");
|
|
83
|
+
const formStore = useStore(store, selector);
|
|
84
|
+
return formStore;
|
|
85
|
+
}
|
|
86
|
+
function useGomtmForm2() {
|
|
87
|
+
const storeForm = useGomtmForm();
|
|
88
|
+
const _setOpen = useGomtmForm((x) => x.setOpen);
|
|
89
|
+
const fullScreen = useGomtmForm((x) => x.fullScreen);
|
|
90
|
+
const viewName = useGomtmForm((x) => x.viewName);
|
|
91
|
+
const title = useGomtmForm((x) => x.title);
|
|
92
|
+
const form = useForm();
|
|
93
|
+
const open = storeForm.open;
|
|
94
|
+
const setOpen = useCallback((open2) => {
|
|
95
|
+
_setOpen(open2);
|
|
96
|
+
}, [_setOpen]);
|
|
97
|
+
return __spreadProps(__spreadValues({}, storeForm), {
|
|
98
|
+
form,
|
|
99
|
+
open,
|
|
100
|
+
setOpen,
|
|
101
|
+
fullScreen,
|
|
102
|
+
viewName,
|
|
103
|
+
title
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function GomtmFormDebug() {
|
|
107
|
+
const viewName = useGomtmForm((x) => x.viewName);
|
|
108
|
+
const open = useGomtmForm((x) => x.open);
|
|
109
|
+
const gomtmForm = useGomtmForm2();
|
|
110
|
+
return /* @__PURE__ */ jsxs("div", { className: "bg-blue-100 p-2", children: [
|
|
111
|
+
/* @__PURE__ */ jsx("h1", { children: "GomtmFormDebug" }),
|
|
112
|
+
/* @__PURE__ */ jsx("pre", { children: JSON.stringify({ viewName, open, open2: gomtmForm.open }, null, 2) })
|
|
113
|
+
] });
|
|
114
|
+
}
|
|
115
|
+
export {
|
|
116
|
+
GomtmFormDebug,
|
|
117
|
+
GomtmFormProvider,
|
|
118
|
+
gomtmFormContext,
|
|
119
|
+
useGomtmForm,
|
|
120
|
+
useGomtmForm2
|
|
121
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FieldValues } from "react-hook-form";
|
|
2
|
+
export declare function useCurdUpdateForm<TFieldValues extends FieldValues = FieldValues>(): {
|
|
3
|
+
form: import("react-hook-form").UseFormReturn<TFieldValues, any, undefined>;
|
|
4
|
+
handleSubmit: (values: any) => void;
|
|
5
|
+
detailData: any;
|
|
6
|
+
setOpenEdit: (openEdit: boolean) => void;
|
|
7
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useForm } from "react-hook-form";
|
|
3
|
+
import { useCurdUpdateMutation, useListview } from "../listview/list-store";
|
|
4
|
+
function useCurdUpdateForm() {
|
|
5
|
+
const detailData = useListview((x) => x.detailData);
|
|
6
|
+
const setOpenEdit = useListview((x) => x.setOpenEdit);
|
|
7
|
+
const mutationUpdate = useCurdUpdateMutation();
|
|
8
|
+
const form = useForm(
|
|
9
|
+
{
|
|
10
|
+
defaultValues: detailData
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
const handleSubmit = (values) => {
|
|
14
|
+
mutationUpdate.mutateAsync(values);
|
|
15
|
+
};
|
|
16
|
+
return {
|
|
17
|
+
form,
|
|
18
|
+
handleSubmit,
|
|
19
|
+
detailData,
|
|
20
|
+
setOpenEdit
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
useCurdUpdateForm
|
|
25
|
+
};
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useMtRouter } from "mtxuilib/hooks/use-router";
|
|
4
3
|
import { Icons } from "mtxuilib/icons/icons";
|
|
5
4
|
import { cn } from "mtxuilib/lib/utils";
|
|
6
5
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "mtxuilib/ui/dropdown-menu";
|
|
7
6
|
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "mtxuilib/ui/pagination";
|
|
8
7
|
import { MtButton } from "mtxuilib/ui/ui-mt/Button";
|
|
9
|
-
import { Suspense, lazy,
|
|
8
|
+
import { Suspense, lazy, useState } from "react";
|
|
10
9
|
import { MtmErrorView } from "../../components/MtmErrorView";
|
|
11
10
|
import { useGomtmSuspenseInfiniteQuery } from "../../gomtmQuery";
|
|
12
|
-
import CurdEditPanel from "../
|
|
11
|
+
import CurdEditPanel from "../form/CurdEditPanel";
|
|
12
|
+
import { GomtmFormProvider } from "../form/formStore";
|
|
13
13
|
import { CommontListResView } from "../list-item/ListViewLayoutRender";
|
|
14
14
|
import { PanelRemove } from "../remove/RemovePanel";
|
|
15
15
|
import { useListview } from "./list-store";
|
|
16
|
-
import { GomtmFormProvider } from "../edit/formStore";
|
|
17
16
|
const ALL_Layouts = [
|
|
18
17
|
"default",
|
|
19
18
|
"demo"
|
|
@@ -30,25 +29,6 @@ function CommonListView() {
|
|
|
30
29
|
const setOpenCreate = useListview((x) => x.setOpenCreate);
|
|
31
30
|
const viewUpdate = useListview((x) => x.viewUpdate);
|
|
32
31
|
const viewCreate = useListview((x) => x.viewCreate);
|
|
33
|
-
const open = openEdit || openCreate;
|
|
34
|
-
const setOpen = useCallback((open2) => {
|
|
35
|
-
if (openCreate) {
|
|
36
|
-
setOpenCreate(false);
|
|
37
|
-
}
|
|
38
|
-
if (openEdit) {
|
|
39
|
-
setOpenEdit(false);
|
|
40
|
-
}
|
|
41
|
-
}, [openCreate, openEdit, setOpenCreate, setOpenEdit]);
|
|
42
|
-
const router = useMtRouter();
|
|
43
|
-
const viewName = useMemo(() => {
|
|
44
|
-
if (openCreate) {
|
|
45
|
-
return viewCreate;
|
|
46
|
-
}
|
|
47
|
-
if (openEdit) {
|
|
48
|
-
return viewUpdate;
|
|
49
|
-
}
|
|
50
|
-
return "";
|
|
51
|
-
}, [openCreate, openEdit, viewCreate, viewUpdate]);
|
|
52
32
|
const listQuery = useGomtmSuspenseInfiniteQuery(svc, methodList, paramList);
|
|
53
33
|
if (!(listQuery == null ? void 0 : listQuery.data)) {
|
|
54
34
|
return null;
|
|
@@ -80,24 +60,34 @@ function CommonListView() {
|
|
|
80
60
|
/* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationNext, { href: "#" }) })
|
|
81
61
|
] }) }),
|
|
82
62
|
/* @__PURE__ */ jsx("div", { className: "absolute right-1 top-1", children: /* @__PURE__ */ jsx(ListViewActions, {}) }),
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/* @__PURE__ */ jsx(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
63
|
+
/* @__PURE__ */ jsxs(Suspense, { children: [
|
|
64
|
+
/* @__PURE__ */ jsx(
|
|
65
|
+
GomtmFormProvider,
|
|
66
|
+
{
|
|
67
|
+
open: openEdit,
|
|
68
|
+
fullScreen: true,
|
|
69
|
+
viewName: viewUpdate,
|
|
70
|
+
onOpenChange: setOpenEdit,
|
|
71
|
+
children: /* @__PURE__ */ jsx(CurdEditPanel, {})
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ jsx(
|
|
75
|
+
GomtmFormProvider,
|
|
76
|
+
{
|
|
77
|
+
open: openCreate,
|
|
78
|
+
fullScreen: true,
|
|
79
|
+
viewName: viewCreate,
|
|
80
|
+
onOpenChange: setOpenCreate,
|
|
81
|
+
children: /* @__PURE__ */ jsx(CurdEditPanel, {})
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ jsx(PanelRemove, {})
|
|
85
|
+
] })
|
|
95
86
|
] });
|
|
96
87
|
}
|
|
97
88
|
const ListViewActions = () => {
|
|
98
89
|
const [open, setOpen] = useState(false);
|
|
99
90
|
const setOpenCreate = useListview((x) => x.setOpenCreate);
|
|
100
|
-
setOpen;
|
|
101
91
|
return /* @__PURE__ */ jsxs(DropdownMenu, { open, onOpenChange: setOpen, children: [
|
|
102
92
|
/* @__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, {}) }) }),
|
|
103
93
|
/* @__PURE__ */ jsxs(DropdownMenuContent, { className: "w-56", children: [
|