gomtm 0.0.262 → 0.0.264

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.
@@ -76,7 +76,7 @@ function ListViewProvider(props) {
76
76
  setOpenDebug,
77
77
  params,
78
78
  setParams
79
- }, children });
79
+ }, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx("div", { children: "loading list" }), children }) });
80
80
  }
81
81
  const useListView = () => {
82
82
  const ctx = useContext(commonListViewContext);
@@ -25,7 +25,10 @@ const LzFrontLayout = lazy(() => import("./front-layout"));
25
25
  const LayoutBase = (props) => {
26
26
  const { layoutName, children } = props;
27
27
  return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(TooltipProvider, { delayDuration: 0, children: [
28
- layoutName == "front" ? /* @__PURE__ */ jsx(LzFrontLayout, { children }) : 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,
28
+ layoutName == "front" ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Fragment, { children: "loading" }), children: /* @__PURE__ */ jsx(LzFrontLayout, { children }) }) : (
29
+ // layoutName == "front" ? <FrontLayout>{children}</FrontLayout> :
30
+ 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
31
+ ),
29
32
  /* @__PURE__ */ jsx(
30
33
  ProgressBar,
31
34
  {
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { MtLink } from "mtxuilib/common/mtlink";
4
+ import { Suspense } from "react";
4
5
  import UserAvatorMenus from "../UserAvatorMenus";
5
6
  import { PageSearchCmd } from "./PageSearchCmd";
6
7
  import { MainNav } from "./main-nav";
@@ -10,7 +11,7 @@ const FrontLayoutHeader = () => {
10
11
  /* @__PURE__ */ jsx(MainNav, {}),
11
12
  /* @__PURE__ */ jsx("nav", { className: " flex items-center space-x-6 text-sm font-medium" }),
12
13
  /* @__PURE__ */ jsx(PageSearchCmd, {}),
13
- /* @__PURE__ */ jsx("div", { className: "flex flex-1 shrink items-center justify-end space-x-2 pr-4", children: /* @__PURE__ */ jsx("nav", { className: "flex items-center", children: /* @__PURE__ */ jsx(UserAvatorMenus, {}) }) })
14
+ /* @__PURE__ */ jsx("div", { className: "flex flex-1 shrink items-center justify-end space-x-2 pr-4", children: /* @__PURE__ */ jsx("nav", { className: "flex items-center", children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(UserAvatorMenus, {}) }) }) })
14
15
  ] }) });
15
16
  };
16
17
  export {
@@ -37,6 +37,7 @@ var __async = (__this, __arguments, generator) => {
37
37
  import { createPromiseClient } from "@connectrpc/connect";
38
38
  import { createConnectTransport } from "@connectrpc/connect-web";
39
39
  import { merge } from "lodash";
40
+ import { fetchMiddleWithCache } from "mtxlib/http/fetchMiddleWithCache";
40
41
  import { MTM_API_PREFIX } from "./consts";
41
42
  import { MtmService } from "./gomtmpb/mtm/sppb/mtm_connect";
42
43
  const ssrGetBackendUrl = () => {
@@ -103,7 +104,11 @@ const gomtmFetcher = (initGlobal) => {
103
104
  "Content-Type": "application/json"
104
105
  }, (initGlobal == null ? void 0 : initGlobal.cookieStr) && { "Cookie": initGlobal == null ? void 0 : initGlobal.cookieStr })
105
106
  });
106
- const fetcher = fetch;
107
+ let fetcher = fetch;
108
+ req.enableCache = true;
109
+ if (req.enableCache) {
110
+ fetcher = fetchMiddleWithCache(fetch);
111
+ }
107
112
  try {
108
113
  console.info("[mtmfetch]", {
109
114
  input,