gomtm 0.0.201 → 0.0.202
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.
|
@@ -9,7 +9,7 @@ export declare const curd3ListParamsAtom: import("jotai").PrimitiveAtom<PlainMes
|
|
|
9
9
|
export declare const activateItemValueAtom: import("jotai").PrimitiveAtom<any> & {
|
|
10
10
|
init: any;
|
|
11
11
|
};
|
|
12
|
-
export declare const activateItemAtom: import("jotai").
|
|
12
|
+
export declare const activateItemAtom: import("jotai").WritableAtom<any, [value: any], void>;
|
|
13
13
|
export declare const paramsAtom: import("jotai").Atom<any>;
|
|
14
14
|
export declare const curdPathAtom: import("jotai").PrimitiveAtom<string> & {
|
|
15
15
|
init: string;
|
|
@@ -30,6 +30,11 @@ const activateItemValueAtom = atom(void 0);
|
|
|
30
30
|
const activateItemAtom = atom((get) => {
|
|
31
31
|
const v = get(activateItemValueAtom);
|
|
32
32
|
return v;
|
|
33
|
+
}, (_, set, value) => {
|
|
34
|
+
if (value == null ? void 0 : value.id) {
|
|
35
|
+
set(curdActivateIdAtom, value.id);
|
|
36
|
+
}
|
|
37
|
+
set(activateItemValueAtom, value);
|
|
33
38
|
});
|
|
34
39
|
const paramsValueAtom = atom(void 0);
|
|
35
40
|
const paramsAtom = atom((get) => {
|
|
@@ -4,24 +4,24 @@ import { useAtom } from "jotai";
|
|
|
4
4
|
import { MtLink } from "mtxuilib/common/mtlink";
|
|
5
5
|
import { cn } from "mtxuilib/lib/utils";
|
|
6
6
|
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "mtxuilib/ui/card";
|
|
7
|
-
import { curdActivateIdAtom } from "../curd.atoms";
|
|
8
7
|
import { Icons } from "mtxuilib/icons/icons";
|
|
9
8
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuSeparator, DropdownMenuTrigger } from "mtxuilib/ui/dropdown-menu";
|
|
10
9
|
import { DropdownMenuItemLink } from "mtxuilib/ui/ui-mt/DropdownMenuItemLink";
|
|
11
10
|
import { curdSlugPathAtom } from "../CommonListViewV2";
|
|
11
|
+
import { activateItemAtom } from "../curd.atoms";
|
|
12
12
|
const PostCardListItem = (props) => {
|
|
13
13
|
const { item } = props;
|
|
14
|
-
const [
|
|
14
|
+
const [activateItem, setActivateItem] = useAtom(activateItemAtom);
|
|
15
15
|
const [curdSlugPath] = useAtom(curdSlugPathAtom);
|
|
16
16
|
return /* @__PURE__ */ jsxs(
|
|
17
17
|
Card,
|
|
18
18
|
{
|
|
19
19
|
className: cn(
|
|
20
20
|
"m-2 w-[350px]",
|
|
21
|
-
item.id ==
|
|
21
|
+
item.id == (activateItem == null ? void 0 : activateItem.id) && " p-2 shadow-md"
|
|
22
22
|
),
|
|
23
23
|
onClick: () => {
|
|
24
|
-
|
|
24
|
+
setActivateItem(item);
|
|
25
25
|
},
|
|
26
26
|
children: [
|
|
27
27
|
/* @__PURE__ */ jsxs(CardHeader, { children: [
|