gomtm 0.0.203 → 0.0.205

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.
@@ -8,6 +8,7 @@ export declare const exampleListItemValueComponent: import("jotai").PrimitiveAto
8
8
  export declare const exampleListItemComponent: import("jotai").Atom<any>;
9
9
  export declare function CommonListViewProvider<I extends Message<I>, O extends Message<O>>(props: {
10
10
  methodList: MethodUnaryDescriptor<I, any>;
11
+ methodDelete: MethodUnaryDescriptor<any, any>;
11
12
  slugPath?: string;
12
13
  } & PropsWithChildren): import("react").JSX.Element;
13
14
  export declare function CommonListView<I extends Message<I>, O extends Message<O>>(): import("react").JSX.Element | null;
@@ -6,6 +6,7 @@ import { cn } from "mtxuilib/lib/utils";
6
6
  import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "mtxuilib/ui/pagination";
7
7
  import { MtUnaryCallErrorView } from "../components/MtUnaryCallErrorView";
8
8
  import { useSuspenseInfiniteQuery } from "../connectquery";
9
+ import { removeMeghodSigAtom } from "./curd.atoms";
9
10
  import { ListItemView } from "./list-item/ListItem";
10
11
  import { ListLayout } from "./list-item/ListLayout";
11
12
  const listQueryAtom = atom(null);
@@ -28,7 +29,7 @@ const exampleListItemComponent = atom((get) => {
28
29
  };
29
30
  });
30
31
  function CommonListViewProvider(props) {
31
- const { children, methodList, slugPath } = props;
32
+ const { children, methodList, methodDelete, slugPath } = props;
32
33
  const listquery = useSuspenseInfiniteQuery(methodList, {
33
34
  //@ts-expect-error
34
35
  page: 1
@@ -43,7 +44,8 @@ function CommonListViewProvider(props) {
43
44
  });
44
45
  return /* @__PURE__ */ jsx(ScopeAtomsHydrator, { atomValues: [
45
46
  [listQueryAtom, listquery],
46
- [curdSlugPathValueAtom, slugPath]
47
+ [curdSlugPathValueAtom, slugPath],
48
+ [removeMeghodSigAtom, methodDelete]
47
49
  ], children });
48
50
  }
49
51
  function CommonListView() {
@@ -11,7 +11,7 @@ export declare const activateItemValueAtom: import("jotai").PrimitiveAtom<any> &
11
11
  };
12
12
  export declare const activateItemAtom: import("jotai").WritableAtom<any, [value: any], void>;
13
13
  export declare const paramsAtom: import("jotai").Atom<any>;
14
- export declare const remoteMeghodSigAtom: import("jotai").PrimitiveAtom<any> & {
14
+ export declare const removeMeghodSigAtom: import("jotai").PrimitiveAtom<any> & {
15
15
  init: any;
16
16
  };
17
17
  export declare const curdPathAtom: import("jotai").PrimitiveAtom<string> & {
@@ -41,7 +41,7 @@ const paramsAtom = atom((get) => {
41
41
  const v = get(paramsValueAtom);
42
42
  return v;
43
43
  });
44
- const remoteMeghodSigAtom = atom(void 0);
44
+ const removeMeghodSigAtom = atom(void 0);
45
45
  const curdPathAtom = atom("");
46
46
  const curd3ItemsV2Atom = atom((get) => __async(void 0, null, function* () {
47
47
  const slugPath = get(curdPathAtom);
@@ -71,6 +71,6 @@ export {
71
71
  curdActivateIdAtom,
72
72
  curdPathAtom,
73
73
  paramsAtom,
74
- remoteMeghodSigAtom,
74
+ removeMeghodSigAtom,
75
75
  useCurdSlugName
76
76
  };
@@ -8,7 +8,7 @@ import { Icons } from "mtxuilib/icons/icons";
8
8
  import { DropdownMenu, DropdownMenuContent, DropdownMenuSeparator, DropdownMenuTrigger } from "mtxuilib/ui/dropdown-menu";
9
9
  import { DropdownMenuItemLink } from "mtxuilib/ui/ui-mt/DropdownMenuItemLink";
10
10
  import { curdSlugPathAtom } from "../CommonListViewV2";
11
- import { activateItemAtom } from "../curd.atoms";
11
+ import { activateItemAtom, removeMeghodSigAtom } from "../curd.atoms";
12
12
  const PostCardListItem = (props) => {
13
13
  const { item } = props;
14
14
  const [activateItem, setActivateItem] = useAtom(activateItemAtom);
@@ -56,6 +56,7 @@ const PostCardListItem = (props) => {
56
56
  const PostCardItemActions = (props) => {
57
57
  const { id } = props;
58
58
  const [curdSlugPath] = useAtom(curdSlugPathAtom);
59
+ const [deleteMethod] = useAtom(removeMeghodSigAtom);
59
60
  return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
60
61
  /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
61
62
  MtLink,
@@ -72,7 +73,16 @@ const PostCardItemActions = (props) => {
72
73
  /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: "w-[160px]", children: [
73
74
  /* @__PURE__ */ jsx(DropdownMenuItemLink, { href: `${curdSlugPath}/create/${id}`, children: "create" }),
74
75
  /* @__PURE__ */ jsx(DropdownMenuItemLink, { href: `${curdSlugPath}/edit/${id}`, children: "edit" }),
75
- /* @__PURE__ */ jsx(DropdownMenuItemLink, { href: `/remove`, children: "remove" }),
76
+ /* @__PURE__ */ jsx(
77
+ DropdownMenuItemLink,
78
+ {
79
+ href: `/remove`,
80
+ onClick: () => {
81
+ console.log("deleteMethod", deleteMethod);
82
+ },
83
+ children: "remove"
84
+ }
85
+ ),
76
86
  /* @__PURE__ */ jsx(DropdownMenuSeparator, {})
77
87
  ] })
78
88
  ] });