gomtm 0.0.277 → 0.0.279
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/components/SSR.d.ts +1 -1
- package/dist/esm/components/SSR.js +2 -2
- package/dist/esm/consts.d.ts +1 -0
- package/dist/esm/consts.js +2 -0
- package/dist/esm/curd/ListViewPage.d.ts +1 -1
- package/dist/esm/curd/ListViewPage.js +12 -3
- package/dist/esm/curd/ListViewProvider.js +6 -4
- package/dist/esm/ly/LayoutBase.d.ts +1 -3
- package/dist/esm/ly/LayoutBase.js +4 -3
- package/dist/tsconfig.type.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Message, PartialMessage } from "@bufbuild/protobuf";
|
|
2
2
|
import { PropsWithChildren } from "react";
|
|
3
3
|
import { MethodUnaryDescriptor } from "../connectquery";
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function PrefetchConnectInfiniteQuery<I extends Message<I>, O extends Message<O>>(props: {
|
|
5
5
|
methodSig: MethodUnaryDescriptor<I, O>;
|
|
6
6
|
input?: PartialMessage<I>;
|
|
7
7
|
} & PropsWithChildren): Promise<import("react").JSX.Element>;
|
|
@@ -38,7 +38,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
38
38
|
import { HydrationBoundary, QueryClient, dehydrate } from "@tanstack/react-query";
|
|
39
39
|
import { callUnaryMethod, createConnectInfiniteQueryKey } from "../connectquery";
|
|
40
40
|
import { createTransport } from "../mtmFetcher";
|
|
41
|
-
function
|
|
41
|
+
function PrefetchConnectInfiniteQuery(props) {
|
|
42
42
|
return __async(this, null, function* () {
|
|
43
43
|
const { methodSig, input, children } = props;
|
|
44
44
|
const queryClient = new QueryClient();
|
|
@@ -55,5 +55,5 @@ function WithConnectHydrate(props) {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
export {
|
|
58
|
-
|
|
58
|
+
PrefetchConnectInfiniteQuery
|
|
59
59
|
};
|
package/dist/esm/consts.d.ts
CHANGED
package/dist/esm/consts.js
CHANGED
|
@@ -29,6 +29,7 @@ const TRPC_API_PREFIX = "/api.v1/trpc";
|
|
|
29
29
|
const HOTKEY_Debug = "alt+j";
|
|
30
30
|
const HOTKEY_Switchlayout = "alt+l";
|
|
31
31
|
const HOTKEY_ListViewCMDK = "alt+c";
|
|
32
|
+
const CONST_debounce_INPUT = 300;
|
|
32
33
|
export {
|
|
33
34
|
ADMIN_ROLE,
|
|
34
35
|
ActionCreate,
|
|
@@ -36,6 +37,7 @@ export {
|
|
|
36
37
|
ActionEdit,
|
|
37
38
|
ActionFetchNextPage,
|
|
38
39
|
ActionRefetch,
|
|
40
|
+
CONST_debounce_INPUT,
|
|
39
41
|
COOKIE_IS_DEBUG,
|
|
40
42
|
COOKIE_MTM_SITE_ID,
|
|
41
43
|
Cookie_Site_Host,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ComponentProps, PropsWithChildren } from "react";
|
|
2
2
|
import { Message } from "..";
|
|
3
3
|
import { ListViewProvider } from "./ListViewProvider";
|
|
4
|
-
export default function
|
|
4
|
+
export default function MtListView<I extends Message<I>, O extends Message<O>>(props: {} & ComponentProps<typeof ListViewProvider> & PropsWithChildren): import("react").JSX.Element;
|
|
@@ -31,11 +31,20 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
return target;
|
|
32
32
|
};
|
|
33
33
|
import { jsx } from "react/jsx-runtime";
|
|
34
|
+
import { PrefetchConnectInfiniteQuery } from "../components/SSR";
|
|
35
|
+
import { siteList } from "../gomtmpb/mtm/sppb/mtm-MtmService_connectquery";
|
|
34
36
|
import { ListViewProvider } from "./ListViewProvider";
|
|
35
|
-
function
|
|
37
|
+
function MtListView(props) {
|
|
36
38
|
const _a = props, { children } = _a, etc = __objRest(_a, ["children"]);
|
|
37
|
-
return /* @__PURE__ */ jsx(ListViewProvider, __spreadProps(__spreadValues({}, etc), { children
|
|
39
|
+
return /* @__PURE__ */ jsx(ListViewProvider, __spreadProps(__spreadValues({}, etc), { children: /* @__PURE__ */ jsx(
|
|
40
|
+
PrefetchConnectInfiniteQuery,
|
|
41
|
+
{
|
|
42
|
+
methodSig: siteList,
|
|
43
|
+
input: etc.params,
|
|
44
|
+
children
|
|
45
|
+
}
|
|
46
|
+
) }));
|
|
38
47
|
}
|
|
39
48
|
export {
|
|
40
|
-
|
|
49
|
+
MtListView as default
|
|
41
50
|
};
|
|
@@ -49,6 +49,7 @@ import { MtButton } from "mtxuilib/ui/ui-mt/Button";
|
|
|
49
49
|
import { Suspense, createContext, useCallback, useContext, useMemo, useState } from "react";
|
|
50
50
|
import { MtmErrorView } from "../components/MtmErrorView";
|
|
51
51
|
import { useMutation, useSuspenseInfiniteQuery } from "../connectquery";
|
|
52
|
+
import { CONST_debounce_INPUT } from "../consts";
|
|
52
53
|
import { useMtmApp } from "../providers/GomtmProvider";
|
|
53
54
|
import { DlgCurdDebugInfo, DlgCurdDebugInfoTriggerButton } from "./CurdDetailProvider";
|
|
54
55
|
import CurdCreatePanel, { CurdCreatePanelTriggerButton } from "./create/CurdCreatePanel";
|
|
@@ -57,7 +58,7 @@ import { ListItemView } from "./list-item/ListItem";
|
|
|
57
58
|
import { ListLayout } from "./list-item/ListLayout";
|
|
58
59
|
const commonListViewContext = createContext(void 0);
|
|
59
60
|
function ListViewProvider(props) {
|
|
60
|
-
const { children, methodList, methodDelete, slugPath, methodCreate } = props;
|
|
61
|
+
const { children, methodList, methodDelete, slugPath, methodCreate, methodGet } = props;
|
|
61
62
|
const mtapp = useMtmApp();
|
|
62
63
|
const [openRemove, setOpenRemove] = useState(false);
|
|
63
64
|
const [openCreate, setOpenCreate] = useState(false);
|
|
@@ -74,14 +75,15 @@ function ListViewProvider(props) {
|
|
|
74
75
|
}, [mtapp.globalSearchParams]);
|
|
75
76
|
const setParams = useCallback(debounce((values) => {
|
|
76
77
|
_setParams(values);
|
|
77
|
-
},
|
|
78
|
+
}, CONST_debounce_INPUT), [_setParams]);
|
|
78
79
|
return /* @__PURE__ */ jsx(commonListViewContext.Provider, { value: {
|
|
79
80
|
methodList,
|
|
81
|
+
methodGet,
|
|
82
|
+
methodDelete,
|
|
83
|
+
methodCreate,
|
|
80
84
|
slugPath,
|
|
81
85
|
openRemove,
|
|
82
86
|
setOpenRemove,
|
|
83
|
-
methodDelete,
|
|
84
|
-
methodCreate,
|
|
85
87
|
openCreate,
|
|
86
88
|
setOpenCreate,
|
|
87
89
|
activateItem,
|
|
@@ -3,6 +3,4 @@ export declare const LzDash5: import("react").LazyExoticComponent<typeof import(
|
|
|
3
3
|
export declare const LzDemoLayout: import("react").LazyExoticComponent<typeof import("./demo-layout").default>;
|
|
4
4
|
export declare const LzDebugLayout: import("react").LazyExoticComponent<typeof import("./debug-layout").default>;
|
|
5
5
|
export declare const LzFrontLayout: import("react").LazyExoticComponent<typeof import("./front-layout").default>;
|
|
6
|
-
export declare const LayoutBase: (props: {
|
|
7
|
-
layoutName?: string;
|
|
8
|
-
} & PropsWithChildren) => import("react").JSX.Element;
|
|
6
|
+
export declare const LayoutBase: (props: {} & PropsWithChildren) => import("react").JSX.Element;
|
|
@@ -24,13 +24,14 @@ const LzDemoLayout = lazy(() => import("./demo-layout"));
|
|
|
24
24
|
const LzDebugLayout = lazy(() => import("./debug-layout"));
|
|
25
25
|
const LzFrontLayout = lazy(() => import("./front-layout"));
|
|
26
26
|
const LayoutBase = (props) => {
|
|
27
|
-
const {
|
|
27
|
+
const { children } = props;
|
|
28
|
+
const mtapp = useMtmApp();
|
|
28
29
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(TooltipProvider, { delayDuration: 0, children: [
|
|
29
|
-
layoutName == "front" ? /* @__PURE__ */ jsxs(LzFrontLayout, { children: [
|
|
30
|
+
mtapp.layoutName == "front" ? /* @__PURE__ */ jsxs(LzFrontLayout, { children: [
|
|
30
31
|
" ",
|
|
31
32
|
children,
|
|
32
33
|
" "
|
|
33
|
-
] }) : layoutName == "dash5" ? /* @__PURE__ */ jsx(LzDash5, { children }) : layoutName == "debug" ? /* @__PURE__ */ jsx(LzDebugLayout, { children }) : layoutName == "demo1" ? /* @__PURE__ */ jsx(LzDemoLayout, { children }) : layoutName == "default" ? /* @__PURE__ */ jsx(Fragment, { children }) : children,
|
|
34
|
+
] }) : mtapp.layoutName == "dash5" ? /* @__PURE__ */ jsx(LzDash5, { children }) : mtapp.layoutName == "debug" ? /* @__PURE__ */ jsx(LzDebugLayout, { children }) : mtapp.layoutName == "demo1" ? /* @__PURE__ */ jsx(LzDemoLayout, { children }) : mtapp.layoutName == "default" ? /* @__PURE__ */ jsx(Fragment, { children }) : children,
|
|
34
35
|
/* @__PURE__ */ jsx(
|
|
35
36
|
ProgressBar,
|
|
36
37
|
{
|