gomtm 0.0.249 → 0.0.250
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/consts.d.ts
CHANGED
|
@@ -12,8 +12,8 @@ export declare const DEFAULT_revalidate_SECONDS = 3;
|
|
|
12
12
|
export declare const LOGIN_CALLBACK_URL_KEY = "back";
|
|
13
13
|
export declare const MTM_API_PREFIX = "/api";
|
|
14
14
|
export declare const LayoutNameCookie = "layout";
|
|
15
|
+
export declare const IsDebugCookie = "is_debug";
|
|
15
16
|
export declare const ExtKey_Hostname = "host";
|
|
16
|
-
export declare const ExtKey_mtmaccessToken = "access_token";
|
|
17
17
|
export declare const ItemAction_list_new_item = "list_new_item";
|
|
18
18
|
export declare const Listview_list_filter = "Listview_list_filter";
|
|
19
19
|
export declare const ActionEdit = "edit";
|
package/dist/esm/consts.js
CHANGED
|
@@ -12,8 +12,8 @@ const DEFAULT_revalidate_SECONDS = 3;
|
|
|
12
12
|
const LOGIN_CALLBACK_URL_KEY = "back";
|
|
13
13
|
const MTM_API_PREFIX = "/api";
|
|
14
14
|
const LayoutNameCookie = "layout";
|
|
15
|
+
const IsDebugCookie = "is_debug";
|
|
15
16
|
const ExtKey_Hostname = "host";
|
|
16
|
-
const ExtKey_mtmaccessToken = "access_token";
|
|
17
17
|
const ItemAction_list_new_item = "list_new_item";
|
|
18
18
|
const Listview_list_filter = "Listview_list_filter";
|
|
19
19
|
const ActionEdit = "edit";
|
|
@@ -38,10 +38,10 @@ export {
|
|
|
38
38
|
Cookie_Site_Host,
|
|
39
39
|
DEFAULT_revalidate_SECONDS,
|
|
40
40
|
ExtKey_Hostname,
|
|
41
|
-
ExtKey_mtmaccessToken,
|
|
42
41
|
HeaderMtmApi,
|
|
43
42
|
HeaderMtmHost,
|
|
44
43
|
ImageNoExist,
|
|
44
|
+
IsDebugCookie,
|
|
45
45
|
ItemAction_list_new_item,
|
|
46
46
|
LOGIN_CALLBACK_URL_KEY,
|
|
47
47
|
LayoutNameCookie,
|
|
@@ -4,16 +4,19 @@ import { atom, useAtom } from "jotai";
|
|
|
4
4
|
import { ScopeAtomsHydrator } from "mtxlib/jotai/jotai-helper";
|
|
5
5
|
import { Dialog, DialogContent, DialogTrigger } from "mtxuilib/ui/dialog";
|
|
6
6
|
import { MtButton } from "mtxuilib/ui/ui-mt/Button";
|
|
7
|
+
import { Suspense } from "react";
|
|
7
8
|
import { useSuspenseQuery } from "../connectquery";
|
|
9
|
+
import { isDebugAtom } from "../providers/GomtmProvider";
|
|
8
10
|
const curdDetailPageDataAtom = atom(void 0);
|
|
9
11
|
function CurdDetailProvider(props) {
|
|
10
12
|
const { children, methodGet, params } = props;
|
|
13
|
+
const [isDebug] = useAtom(isDebugAtom);
|
|
11
14
|
const query = useSuspenseQuery(methodGet, params);
|
|
12
15
|
return /* @__PURE__ */ jsxs(ScopeAtomsHydrator, { atomValues: [
|
|
13
16
|
[curdDetailPageDataAtom, query.data]
|
|
14
17
|
], children: [
|
|
15
18
|
children,
|
|
16
|
-
/* @__PURE__ */ jsx(DetailViewDataDlg, {})
|
|
19
|
+
isDebug && /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(DetailViewDataDlg, {}) })
|
|
17
20
|
] });
|
|
18
21
|
}
|
|
19
22
|
const DetailViewDataDlg = () => {
|
|
@@ -21,10 +21,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21
21
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
22
22
|
import { ScopeAtomsHydrator } from "mtxlib/jotai/jotai-helper";
|
|
23
23
|
import { cookies, headers } from "next/headers";
|
|
24
|
-
import { LayoutNameCookie } from "../consts";
|
|
24
|
+
import { IsDebugCookie, LayoutNameCookie } from "../consts";
|
|
25
25
|
import { layoutNameAtom } from "../ly/LayoutBase";
|
|
26
26
|
import { ssrGetBackendUrl } from "../mtmFetcher";
|
|
27
|
-
import { GomtmProvider, cookiesAtom } from "./GomtmProvider";
|
|
27
|
+
import { GomtmProvider, cookiesAtom, isDebugAtom } from "./GomtmProvider";
|
|
28
28
|
function GomtmAppSS(props) {
|
|
29
29
|
return __async(this, null, function* () {
|
|
30
30
|
const { children } = props;
|
|
@@ -34,9 +34,11 @@ function GomtmAppSS(props) {
|
|
|
34
34
|
}
|
|
35
35
|
const cookiesStr = headers().get("Cookie");
|
|
36
36
|
const layoutName = cookies().get(LayoutNameCookie);
|
|
37
|
+
const isDebug = cookies().get(IsDebugCookie);
|
|
37
38
|
return /* @__PURE__ */ jsx(GomtmProvider, { backendUrl: backend, children: /* @__PURE__ */ jsx(ScopeAtomsHydrator, { atomValues: [
|
|
38
39
|
[cookiesAtom, cookiesStr],
|
|
39
|
-
[layoutNameAtom, layoutName]
|
|
40
|
+
[layoutNameAtom, layoutName],
|
|
41
|
+
[isDebugAtom, isDebug]
|
|
40
42
|
], children }) });
|
|
41
43
|
});
|
|
42
44
|
}
|