gomtm 0.0.202 → 0.0.204
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/curd/CommonListViewV2.d.ts +1 -0
- package/dist/esm/curd/CommonListViewV2.js +4 -2
- package/dist/esm/curd/curd.atoms.d.ts +3 -0
- package/dist/esm/curd/curd.atoms.js +2 -0
- package/dist/esm/mtmFetcher.js +1 -0
- package/dist/esm/providers/GomtmAppSS.d.ts +1 -1
- package/dist/esm/providers/GomtmAppSS.js +2 -8
- package/dist/tsconfig.type.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ export declare const exampleListItemValueComponent: import("jotai").PrimitiveAto
|
|
|
8
8
|
export declare const exampleListItemComponent: import("jotai").Atom<any>;
|
|
9
9
|
export declare function CommonListViewProvider<I extends Message<I>, O extends Message<O>>(props: {
|
|
10
10
|
methodList: MethodUnaryDescriptor<I, any>;
|
|
11
|
+
methodDelete: MethodUnaryDescriptor<any, any>;
|
|
11
12
|
slugPath?: string;
|
|
12
13
|
} & PropsWithChildren): import("react").JSX.Element;
|
|
13
14
|
export declare function CommonListView<I extends Message<I>, O extends Message<O>>(): import("react").JSX.Element | null;
|
|
@@ -6,6 +6,7 @@ import { cn } from "mtxuilib/lib/utils";
|
|
|
6
6
|
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "mtxuilib/ui/pagination";
|
|
7
7
|
import { MtUnaryCallErrorView } from "../components/MtUnaryCallErrorView";
|
|
8
8
|
import { useSuspenseInfiniteQuery } from "../connectquery";
|
|
9
|
+
import { removeMeghodSigAtom } from "./curd.atoms";
|
|
9
10
|
import { ListItemView } from "./list-item/ListItem";
|
|
10
11
|
import { ListLayout } from "./list-item/ListLayout";
|
|
11
12
|
const listQueryAtom = atom(null);
|
|
@@ -28,7 +29,7 @@ const exampleListItemComponent = atom((get) => {
|
|
|
28
29
|
};
|
|
29
30
|
});
|
|
30
31
|
function CommonListViewProvider(props) {
|
|
31
|
-
const { children, methodList, slugPath } = props;
|
|
32
|
+
const { children, methodList, methodDelete, slugPath } = props;
|
|
32
33
|
const listquery = useSuspenseInfiniteQuery(methodList, {
|
|
33
34
|
//@ts-expect-error
|
|
34
35
|
page: 1
|
|
@@ -43,7 +44,8 @@ function CommonListViewProvider(props) {
|
|
|
43
44
|
});
|
|
44
45
|
return /* @__PURE__ */ jsx(ScopeAtomsHydrator, { atomValues: [
|
|
45
46
|
[listQueryAtom, listquery],
|
|
46
|
-
[curdSlugPathValueAtom, slugPath]
|
|
47
|
+
[curdSlugPathValueAtom, slugPath],
|
|
48
|
+
[removeMeghodSigAtom, methodDelete]
|
|
47
49
|
], children });
|
|
48
50
|
}
|
|
49
51
|
function CommonListView() {
|
|
@@ -11,6 +11,9 @@ export declare const activateItemValueAtom: import("jotai").PrimitiveAtom<any> &
|
|
|
11
11
|
};
|
|
12
12
|
export declare const activateItemAtom: import("jotai").WritableAtom<any, [value: any], void>;
|
|
13
13
|
export declare const paramsAtom: import("jotai").Atom<any>;
|
|
14
|
+
export declare const removeMeghodSigAtom: import("jotai").PrimitiveAtom<any> & {
|
|
15
|
+
init: any;
|
|
16
|
+
};
|
|
14
17
|
export declare const curdPathAtom: import("jotai").PrimitiveAtom<string> & {
|
|
15
18
|
init: string;
|
|
16
19
|
};
|
|
@@ -41,6 +41,7 @@ const paramsAtom = atom((get) => {
|
|
|
41
41
|
const v = get(paramsValueAtom);
|
|
42
42
|
return v;
|
|
43
43
|
});
|
|
44
|
+
const removeMeghodSigAtom = atom(void 0);
|
|
44
45
|
const curdPathAtom = atom("");
|
|
45
46
|
const curd3ItemsV2Atom = atom((get) => __async(void 0, null, function* () {
|
|
46
47
|
const slugPath = get(curdPathAtom);
|
|
@@ -70,5 +71,6 @@ export {
|
|
|
70
71
|
curdActivateIdAtom,
|
|
71
72
|
curdPathAtom,
|
|
72
73
|
paramsAtom,
|
|
74
|
+
removeMeghodSigAtom,
|
|
73
75
|
useCurdSlugName
|
|
74
76
|
};
|
package/dist/esm/mtmFetcher.js
CHANGED
|
@@ -91,6 +91,7 @@ const gomtmFetcher = (initGlobal) => {
|
|
|
91
91
|
}) || {};
|
|
92
92
|
let headerCookie = "";
|
|
93
93
|
if (typeof window == "undefined") {
|
|
94
|
+
console.log("mtmFetcher.ts require next/headers");
|
|
94
95
|
const reqHeaders = require("next/headers").headers();
|
|
95
96
|
headerCookie = reqHeaders.get("Cookie");
|
|
96
97
|
}
|
|
@@ -19,7 +19,6 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
21
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
22
|
-
import { MTM_SERVER_COOKIE_ACTIVATE_URL } from "../consts";
|
|
23
22
|
import { GomtmProvider } from "./GomtmProvider";
|
|
24
23
|
function GomtmAppSS(props) {
|
|
25
24
|
return __async(this, null, function* () {
|
|
@@ -32,14 +31,9 @@ function GomtmAppSS(props) {
|
|
|
32
31
|
});
|
|
33
32
|
}
|
|
34
33
|
const ssrGetBackendUrl = () => {
|
|
35
|
-
var _a
|
|
34
|
+
var _a;
|
|
36
35
|
if (typeof window == "undefined") {
|
|
37
|
-
|
|
38
|
-
const value = (_a = _cookies.get(MTM_SERVER_COOKIE_ACTIVATE_URL)) == null ? void 0 : _a.value;
|
|
39
|
-
if (value) {
|
|
40
|
-
return value;
|
|
41
|
-
}
|
|
42
|
-
if ((_b = process == null ? void 0 : process.env) == null ? void 0 : _b.MTM_BACKEND) {
|
|
36
|
+
if ((_a = process == null ? void 0 : process.env) == null ? void 0 : _a.MTM_BACKEND) {
|
|
43
37
|
return process.env.MTM_BACKEND;
|
|
44
38
|
}
|
|
45
39
|
if (process.env.VERCEL_URL) {
|