gomtm 0.0.324 → 0.0.325
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.
|
@@ -1,12 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { PlainMessage } from "@bufbuild/protobuf";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} & PropsWithChildren) => string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<import("react").AwaitedReactNode> | import("react").JSX.Element | null | undefined;
|
|
7
|
-
export declare const ListItemView: (props: {
|
|
8
|
-
item: PlainMessage<ListItem>;
|
|
9
|
-
}) => import("react").JSX.Element | null;
|
|
3
|
+
import { CommonListItem, CommontListRes, PostCardItem } from "../../gomtmpb/mtm/sppb/mtm_pb";
|
|
4
|
+
export declare const CommontListResView: (props: {
|
|
5
|
+
data: PlainMessage<CommontListRes>;
|
|
6
|
+
}) => import("react").JSX.Element;
|
|
10
7
|
export declare const CommonListItemView: (props: {
|
|
11
8
|
item: PlainMessage<CommonListItem>;
|
|
12
9
|
}) => import("react").JSX.Element;
|
|
@@ -12,6 +12,11 @@ import { MtDateView } from "../../components/MtDate";
|
|
|
12
12
|
import Tag from "../../components/Tag";
|
|
13
13
|
import { ListViewLayout } from "../../gomtmpb/mtm/sppb/mtm_pb";
|
|
14
14
|
import { useListview } from "../listview/list-store";
|
|
15
|
+
const CommontListResView = (props) => {
|
|
16
|
+
var _a;
|
|
17
|
+
const { data } = props;
|
|
18
|
+
return /* @__PURE__ */ jsx(ListViewLayoutRender, { layout: data.listLayout, children: (_a = data == null ? void 0 : data.items) == null ? void 0 : _a.map((item, j) => /* @__PURE__ */ jsx(ListItemView, { item }, `${j}`)) });
|
|
19
|
+
};
|
|
15
20
|
const ListViewLayoutRender = (props) => {
|
|
16
21
|
const { children } = props;
|
|
17
22
|
switch (props.layout) {
|
|
@@ -206,8 +211,7 @@ const PostCardItemActions = (props) => {
|
|
|
206
211
|
};
|
|
207
212
|
export {
|
|
208
213
|
CommonListItemView,
|
|
209
|
-
|
|
210
|
-
ListViewLayoutRender,
|
|
214
|
+
CommontListResView,
|
|
211
215
|
PostCardItemActions,
|
|
212
216
|
PostCardListItem
|
|
213
217
|
};
|
|
@@ -13,7 +13,7 @@ import { HOTKEY_Listview_Switchlayout } from "../../consts";
|
|
|
13
13
|
import { useGomtmSuspenseInfiniteQuery } from "../../gomtmQuery";
|
|
14
14
|
import { CurdCreatePanelTriggerButton } from "../create/CurdCreatePanel";
|
|
15
15
|
import { CurdEditPanelTriggerButton } from "../edit/CurdEditPanel";
|
|
16
|
-
import {
|
|
16
|
+
import { CommontListResView } from "../list-item/ListViewLayoutRender";
|
|
17
17
|
import { useListview } from "./list-store";
|
|
18
18
|
const ALL_Layouts = [
|
|
19
19
|
"default",
|
|
@@ -39,11 +39,10 @@ function CommonListView() {
|
|
|
39
39
|
// " max-h-[700px] overflow-y-auto"
|
|
40
40
|
),
|
|
41
41
|
children: listQuery.data.pages.map((page, i) => {
|
|
42
|
-
var _a;
|
|
43
42
|
if (page.errCode) {
|
|
44
43
|
return /* @__PURE__ */ jsx(MtmErrorView, { unaryError: page }, i);
|
|
45
44
|
} else {
|
|
46
|
-
return /* @__PURE__ */ jsx(
|
|
45
|
+
return /* @__PURE__ */ jsx(CommontListResView, { data: page }, i);
|
|
47
46
|
}
|
|
48
47
|
})
|
|
49
48
|
}
|