@akanjs/ui 0.9.55 → 0.9.57
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/Data/CardList.d.ts +3 -3
- package/Data/TableList.d.ts +4 -4
- package/Field.d.ts +11 -12
- package/Model/Remove.d.ts +3 -1
- package/Select.d.ts +2 -2
- package/Signal/Arg.d.ts +14 -11
- package/Signal/Doc.d.ts +8 -1
- package/Signal/GraphQL.d.ts +13 -16
- package/Signal/Message.d.ts +12 -15
- package/Signal/PubSub.d.ts +13 -15
- package/Signal/Response.d.ts +3 -5
- package/Signal/RestApi.d.ts +17 -20
- package/Signal/WebSocket.d.ts +1 -1
- package/System/CSR.d.ts +2 -2
- package/System/Common.d.ts +2 -25
- package/System/SSR.d.ts +2 -2
- package/Table.d.ts +2 -2
- package/cjs/Data/Insight.js +1 -1
- package/cjs/Data/Item.js +1 -1
- package/cjs/Data/ListContainer.js +5 -5
- package/cjs/Data/TableList.js +2 -5
- package/cjs/Field.js +11 -9
- package/cjs/Model/EditModal.js +1 -1
- package/cjs/Model/Remove.js +6 -11
- package/cjs/Model/ViewEditModal.js +14 -1
- package/cjs/Select.js +1 -1
- package/cjs/Signal/Arg.js +22 -22
- package/cjs/Signal/Doc.js +18 -27
- package/cjs/Signal/GraphQL.js +37 -52
- package/cjs/Signal/Message.js +25 -53
- package/cjs/Signal/Object.js +4 -12
- package/cjs/Signal/PubSub.js +20 -54
- package/cjs/Signal/Response.js +2 -2
- package/cjs/Signal/RestApi.js +63 -79
- package/cjs/Signal/WebSocket.js +14 -15
- package/cjs/System/CSR.js +5 -10
- package/cjs/System/Common.js +6 -6
- package/cjs/System/SSR.js +5 -10
- package/esm/Data/Insight.js +1 -1
- package/esm/Data/Item.js +1 -1
- package/esm/Data/ListContainer.js +5 -5
- package/esm/Data/TableList.js +2 -5
- package/esm/Field.js +12 -10
- package/esm/Model/EditModal.js +1 -1
- package/esm/Model/Remove.js +7 -12
- package/esm/Model/ViewEditModal.js +15 -2
- package/esm/Select.js +2 -2
- package/esm/Signal/Arg.js +24 -24
- package/esm/Signal/Doc.js +17 -26
- package/esm/Signal/GraphQL.js +39 -62
- package/esm/Signal/Message.js +27 -55
- package/esm/Signal/Object.js +4 -12
- package/esm/Signal/PubSub.js +22 -56
- package/esm/Signal/Response.js +2 -2
- package/esm/Signal/RestApi.js +66 -90
- package/esm/Signal/WebSocket.js +14 -15
- package/esm/System/CSR.js +5 -10
- package/esm/System/Common.js +6 -6
- package/esm/System/SSR.js +5 -10
- package/package.json +1 -1
package/esm/Signal/Object.js
CHANGED
|
@@ -71,17 +71,9 @@ const ObjectDetail = ({ objRef }) => {
|
|
|
71
71
|
})()
|
|
72
72
|
] }) : null
|
|
73
73
|
] }),
|
|
74
|
-
/* @__PURE__ */ jsx("td", { className: "text-center", children: l.
|
|
75
|
-
/* @__PURE__ */ jsx("td", { className: "text-center", children: l.
|
|
76
|
-
/* @__PURE__ */ jsx("td", { className: "flex flex-wrap items-center justify-center gap-2 text-center", children: enumOpt ? enumOpt.map((opt, idx2) => /* @__PURE__ */ jsx(
|
|
77
|
-
"div",
|
|
78
|
-
{
|
|
79
|
-
className: "tooltip tooltip-primary",
|
|
80
|
-
"data-tip": l.enum(modelRefName, key, opt),
|
|
81
|
-
children: /* @__PURE__ */ jsx("button", { className: "btn btn-xs", children: opt })
|
|
82
|
-
},
|
|
83
|
-
idx2
|
|
84
|
-
)) : "-" })
|
|
74
|
+
/* @__PURE__ */ jsx("td", { className: "text-center", children: l._(`${modelRefName}.${key}`) }),
|
|
75
|
+
/* @__PURE__ */ jsx("td", { className: "text-center", children: l._(`${modelRefName}.${key}.desc`) }),
|
|
76
|
+
/* @__PURE__ */ jsx("td", { className: "flex flex-wrap items-center justify-center gap-2 text-center", children: enumOpt ? enumOpt.map((opt, idx2) => /* @__PURE__ */ jsx("div", { className: "tooltip tooltip-primary", "data-tip": l._(`${enumOpt.refName}.${opt}`), children: /* @__PURE__ */ jsx("button", { className: "btn btn-xs", children: opt }) }, idx2)) : "-" })
|
|
85
77
|
] }) }, idx))
|
|
86
78
|
] }) });
|
|
87
79
|
};
|
|
@@ -95,7 +87,7 @@ const ObjectSchema = ({ objRef }) => {
|
|
|
95
87
|
/* @__PURE__ */ jsx("div", { className: "text-3xl font-bold", children: gqlName }),
|
|
96
88
|
/* @__PURE__ */ jsxs("div", { className: "mb-5", children: [
|
|
97
89
|
" - ",
|
|
98
|
-
l.
|
|
90
|
+
l._(`${refName}.modelDesc`)
|
|
99
91
|
] }),
|
|
100
92
|
/* @__PURE__ */ jsx("div", { className: "text-2xl font-bold", children: "Schema" }),
|
|
101
93
|
/* @__PURE__ */ jsx(ObjectDetail, { objRef })
|
package/esm/Signal/PubSub.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { isGqlScalar } from "@akanjs/base";
|
|
4
4
|
import { usePage } from "@akanjs/client";
|
|
5
|
-
import {
|
|
6
|
-
import { fetch,
|
|
5
|
+
import { constantInfo } from "@akanjs/constant";
|
|
6
|
+
import { fetch, makeRequestExample } from "@akanjs/signal";
|
|
7
7
|
import { st } from "@akanjs/store";
|
|
8
8
|
import { useEffect, useMemo, useState } from "react";
|
|
9
9
|
import { AiOutlineDisconnect, AiOutlineFileWord, AiOutlineSwap } from "react-icons/ai";
|
|
@@ -15,22 +15,18 @@ import Response from "./Response";
|
|
|
15
15
|
function PubSub() {
|
|
16
16
|
return /* @__PURE__ */ jsx("div", {});
|
|
17
17
|
}
|
|
18
|
-
const PubSubEndpoint = ({
|
|
18
|
+
const PubSubEndpoint = ({ refName, gqlKey, gqlMeta, open }) => {
|
|
19
19
|
const { l } = usePage();
|
|
20
|
-
const sigMeta = getSigMeta(sigRef);
|
|
21
20
|
const [viewStatus, setViewStatus] = useState("doc");
|
|
22
|
-
const [argMetas] = getArgMetas(sigRef, gqlMeta.key);
|
|
23
|
-
const gqlArgMetas = argMetas.filter((argMeta) => argMeta.type !== "Upload");
|
|
24
|
-
const uploadArgMetas = argMetas.filter((argMeta) => argMeta.type === "Upload");
|
|
25
21
|
return /* @__PURE__ */ jsxs("div", { className: "collapse-arrow bg-base-300 collapse my-1", children: [
|
|
26
22
|
/* @__PURE__ */ jsx("input", { type: "checkbox", checked: open }),
|
|
27
23
|
/* @__PURE__ */ jsx("div", { className: "collapse-title text-xl", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
28
|
-
/* @__PURE__ */ jsx("div", { className: `btn btn-xs w-16 ${gqlMeta.type === "
|
|
29
|
-
|
|
24
|
+
/* @__PURE__ */ jsx("div", { className: `btn btn-xs w-16 ${gqlMeta.type === "pubsub" ? "btn-info" : "btn-warning"}`, children: gqlMeta.type }),
|
|
25
|
+
gqlKey,
|
|
30
26
|
" ",
|
|
31
27
|
/* @__PURE__ */ jsxs("span", { className: "text-sm", children: [
|
|
32
28
|
"(",
|
|
33
|
-
l.
|
|
29
|
+
l._(`${refName}.signal.${gqlKey}`),
|
|
34
30
|
")"
|
|
35
31
|
] })
|
|
36
32
|
] }) }),
|
|
@@ -38,9 +34,9 @@ const PubSubEndpoint = ({ sigRef, gqlMeta, open }) => {
|
|
|
38
34
|
/* @__PURE__ */ jsxs("div", { className: "mt-4 text-lg", children: [
|
|
39
35
|
"Description",
|
|
40
36
|
/* @__PURE__ */ jsx("hr", { className: "my-2 border-[0.1px] border-gray-400" }),
|
|
41
|
-
gqlMeta.guards
|
|
37
|
+
gqlMeta.signalOption?.guards?.some((guard) => guard !== "None") ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 pb-3 pl-3 text-base font-normal", children: [
|
|
42
38
|
"- Guards:",
|
|
43
|
-
gqlMeta.guards.map((guard) => /* @__PURE__ */ jsx(
|
|
39
|
+
gqlMeta.signalOption.guards.map((guard) => /* @__PURE__ */ jsx(
|
|
44
40
|
"span",
|
|
45
41
|
{
|
|
46
42
|
className: `badge ${guard === "Public" ? "badge-success" : guard === "SuperAdmin" ? "badge-error" : guard === "Admin" ? "badge-error" : guard === "User" ? "badge-accent" : guard === "Owner" ? "badge-accent" : guard === "Every" ? "badge-warning" : ""}`,
|
|
@@ -51,7 +47,7 @@ const PubSubEndpoint = ({ sigRef, gqlMeta, open }) => {
|
|
|
51
47
|
] }) : null,
|
|
52
48
|
/* @__PURE__ */ jsxs("div", { className: "pb-3 pl-3 text-base font-normal", children: [
|
|
53
49
|
"- ",
|
|
54
|
-
l.
|
|
50
|
+
l._(`${refName}.signal.${gqlKey}.desc`)
|
|
55
51
|
] })
|
|
56
52
|
] }),
|
|
57
53
|
/* @__PURE__ */ jsxs("div", { className: "my-4 flex w-full gap-5 px-5", children: [
|
|
@@ -82,64 +78,48 @@ const PubSubEndpoint = ({ sigRef, gqlMeta, open }) => {
|
|
|
82
78
|
}
|
|
83
79
|
)
|
|
84
80
|
] }),
|
|
85
|
-
viewStatus === "doc" ? /* @__PURE__ */ jsx(
|
|
86
|
-
PubSubInterface,
|
|
87
|
-
{
|
|
88
|
-
sigRef,
|
|
89
|
-
gqlMeta,
|
|
90
|
-
gqlArgMetas,
|
|
91
|
-
uploadArgMetas
|
|
92
|
-
}
|
|
93
|
-
) : /* @__PURE__ */ jsx(PubSubTry, { sigRef, gqlMeta, gqlArgMetas, uploadArgMetas })
|
|
81
|
+
viewStatus === "doc" ? /* @__PURE__ */ jsx(PubSubInterface, { refName, gqlKey, gqlMeta }) : /* @__PURE__ */ jsx(PubSubTry, { refName, gqlKey, gqlMeta })
|
|
94
82
|
] })
|
|
95
83
|
] });
|
|
96
84
|
};
|
|
97
85
|
PubSub.Endpoint = PubSubEndpoint;
|
|
98
|
-
const PubSubInterface = ({
|
|
99
|
-
const
|
|
100
|
-
const [returnRef, arrDepth] = getNonArrayModel(gqlMeta.returns());
|
|
86
|
+
const PubSubInterface = ({ refName, gqlKey, gqlMeta }) => {
|
|
87
|
+
const returnRef = constantInfo.getModelRef(gqlMeta.returns.refName, gqlMeta.returns.modelType);
|
|
101
88
|
const isReturnModelType = !isGqlScalar(returnRef);
|
|
102
89
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
103
|
-
|
|
104
|
-
/* @__PURE__ */ jsx("div", { className: "text-lg", children: "Form data upload" }),
|
|
105
|
-
/* @__PURE__ */ jsx("div", { className: "bg-base-100 overflow-x-auto rounded-md p-3", children: /* @__PURE__ */ jsx(Arg.Table, { sigMeta, gqlMeta, argMetas: uploadArgMetas }) })
|
|
106
|
-
] }) : null,
|
|
107
|
-
gqlArgMetas.length ? /* @__PURE__ */ jsxs("div", { children: [
|
|
90
|
+
gqlMeta.args.length ? /* @__PURE__ */ jsxs("div", { children: [
|
|
108
91
|
/* @__PURE__ */ jsx("div", { className: "text-lg", children: "Variables" }),
|
|
109
|
-
/* @__PURE__ */ jsx("div", { className: "bg-base-100 overflow-x-auto rounded-md p-3", children: /* @__PURE__ */ jsx(Arg.Table, {
|
|
92
|
+
/* @__PURE__ */ jsx("div", { className: "bg-base-100 overflow-x-auto rounded-md p-3", children: /* @__PURE__ */ jsx(Arg.Table, { refName, gqlKey, argMetas: gqlMeta.args }) })
|
|
110
93
|
] }) : null,
|
|
111
94
|
/* @__PURE__ */ jsx("div", { className: "text-lg font-bold", children: /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col gap-2 rounded-md font-normal md:flex-row", children: [
|
|
112
95
|
/* @__PURE__ */ jsxs("div", { className: "w-full md:w-1/2", children: [
|
|
113
96
|
"Response Type",
|
|
114
97
|
/* @__PURE__ */ jsxs("div", { className: "bg-base-100 max-h-[500px] overflow-auto rounded-md p-4 md:h-[500px]", children: [
|
|
115
98
|
"Returns: ",
|
|
116
|
-
/* @__PURE__ */ jsx(Object.Type, { objRef: returnRef, arrDepth }),
|
|
99
|
+
/* @__PURE__ */ jsx(Object.Type, { objRef: returnRef, arrDepth: gqlMeta.returns.arrDepth }),
|
|
117
100
|
isReturnModelType ? /* @__PURE__ */ jsx(Object.Detail, { objRef: returnRef }) : null
|
|
118
101
|
] })
|
|
119
102
|
] }),
|
|
120
103
|
/* @__PURE__ */ jsxs("div", { className: "w-full md:w-1/2", children: [
|
|
121
104
|
"Response Example",
|
|
122
|
-
/* @__PURE__ */ jsx(Response.Example, {
|
|
105
|
+
/* @__PURE__ */ jsx(Response.Example, { gqlMeta })
|
|
123
106
|
] })
|
|
124
107
|
] }) })
|
|
125
108
|
] });
|
|
126
109
|
};
|
|
127
110
|
PubSub.Interface = PubSubInterface;
|
|
128
|
-
const PubSubTry = ({
|
|
111
|
+
const PubSubTry = ({ refName, gqlKey, gqlMeta }) => {
|
|
129
112
|
const tryJwt = st.use.tryJwt();
|
|
130
|
-
const
|
|
131
|
-
const isScalar = isGqlScalar(modelRef);
|
|
132
|
-
const requestExample = useMemo(() => JSON.stringify(makeRequestExample(sigRef, gqlMeta.key), null, 2), []);
|
|
113
|
+
const requestExample = useMemo(() => JSON.stringify(makeRequestExample(gqlMeta), null, 2), []);
|
|
133
114
|
const [gqlRequest, setGqlRequest] = useState(requestExample);
|
|
134
|
-
const [uploadRequest, setUploadRequest] = useState({});
|
|
135
115
|
const [unsubscribe, setUnsubscribe] = useState(null);
|
|
136
116
|
const [messages, setMessages] = useState("");
|
|
137
117
|
const [response, setResponse] = useState({ status: "ready", data: "" });
|
|
138
118
|
const onSubscribe = () => {
|
|
139
119
|
setResponse({ status: "loading", data: "" });
|
|
140
|
-
const request =
|
|
141
|
-
const argData =
|
|
142
|
-
const fetchFn = fetch[
|
|
120
|
+
const request = JSON.parse(gqlRequest);
|
|
121
|
+
const argData = gqlMeta.args.map((argMeta) => request[argMeta.name]);
|
|
122
|
+
const fetchFn = fetch[gqlKey].bind(fetch);
|
|
143
123
|
setResponse({ status: "loading", data: messages });
|
|
144
124
|
const unsubscribe2 = fetchFn(...argData, (data) => {
|
|
145
125
|
setMessages(
|
|
@@ -169,20 +149,6 @@ ${data}` : typeof data === "object" ? [
|
|
|
169
149
|
};
|
|
170
150
|
}, [unsubscribe]);
|
|
171
151
|
return /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col gap-4", children: [
|
|
172
|
-
uploadArgMetas.length ? /* @__PURE__ */ jsxs("div", { children: [
|
|
173
|
-
/* @__PURE__ */ jsx("div", { className: "text-lg", children: "Form data uplaod" }),
|
|
174
|
-
uploadArgMetas.map((argMeta) => /* @__PURE__ */ jsx(
|
|
175
|
-
Arg.FormData,
|
|
176
|
-
{
|
|
177
|
-
argMeta,
|
|
178
|
-
value: uploadRequest[argMeta.name],
|
|
179
|
-
onChange: (fileList) => {
|
|
180
|
-
setUploadRequest({ ...uploadRequest, [argMeta.name]: fileList });
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
argMeta.name
|
|
184
|
-
))
|
|
185
|
-
] }) : null,
|
|
186
152
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
187
153
|
/* @__PURE__ */ jsx("div", { className: "grid gap-2 lg:grid-cols-2", children: /* @__PURE__ */ jsxs("div", { children: [
|
|
188
154
|
/* @__PURE__ */ jsx("div", { className: "text-lg", children: "Variables" }),
|
package/esm/Signal/Response.js
CHANGED
|
@@ -6,8 +6,8 @@ import { Copy } from "../Copy";
|
|
|
6
6
|
function Response() {
|
|
7
7
|
return /* @__PURE__ */ jsx("div", {});
|
|
8
8
|
}
|
|
9
|
-
const ResponseExample = ({
|
|
10
|
-
const example = useMemo(() => JSON.stringify(makeResponseExample(
|
|
9
|
+
const ResponseExample = ({ gqlMeta }) => {
|
|
10
|
+
const example = useMemo(() => JSON.stringify(makeResponseExample(gqlMeta), null, 2), []);
|
|
11
11
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
12
12
|
/* @__PURE__ */ jsx(
|
|
13
13
|
"textarea",
|
package/esm/Signal/RestApi.js
CHANGED
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { baseClientEnv,
|
|
3
|
+
import { baseClientEnv, isGqlScalar } from "@akanjs/base";
|
|
4
4
|
import { usePage } from "@akanjs/client";
|
|
5
|
-
import { getGqlTypeStr } from "@akanjs/constant";
|
|
6
|
-
import {
|
|
7
|
-
getArgMetas,
|
|
8
|
-
getControllerPath,
|
|
9
|
-
getControllerPrefix,
|
|
10
|
-
getExampleData,
|
|
11
|
-
getGqlMetas,
|
|
12
|
-
getSigMeta,
|
|
13
|
-
getSignalRefsOnStorage
|
|
14
|
-
} from "@akanjs/signal";
|
|
5
|
+
import { constantInfo, getGqlTypeStr } from "@akanjs/constant";
|
|
6
|
+
import { getExampleData } from "@akanjs/signal";
|
|
15
7
|
import { st } from "@akanjs/store";
|
|
16
8
|
import { useMemo, useState } from "react";
|
|
17
9
|
import { AiOutlineApi, AiOutlineCopy, AiOutlineFileWord, AiOutlineSend } from "react-icons/ai";
|
|
@@ -19,55 +11,67 @@ import { Copy } from "../Copy";
|
|
|
19
11
|
import { Signal } from ".";
|
|
20
12
|
import Arg from "./Arg";
|
|
21
13
|
import Response from "./Response";
|
|
14
|
+
const getControllerPath = (gqlKey, gqlMeta) => {
|
|
15
|
+
return gqlMeta.signalOption?.path ?? [
|
|
16
|
+
gqlMeta.signalOption?.name ?? gqlKey,
|
|
17
|
+
...gqlMeta.args.filter((argMeta) => argMeta.type === "Param").map((argMeta) => `:${argMeta.name}`)
|
|
18
|
+
].join("/");
|
|
19
|
+
};
|
|
22
20
|
function RestApi() {
|
|
23
21
|
return /* @__PURE__ */ jsx("div", {});
|
|
24
22
|
}
|
|
25
|
-
const RestApiEndpoints = ({ refName, endpoints, openAll, httpUri }) => {
|
|
26
|
-
const
|
|
27
|
-
|
|
23
|
+
const RestApiEndpoints = ({ refName, prefix, endpoints, openAll, httpUri }) => {
|
|
24
|
+
const signals = global.signals;
|
|
25
|
+
const signal = signals.find((signal2) => signal2.refName === refName);
|
|
26
|
+
if (!signal)
|
|
28
27
|
return null;
|
|
29
28
|
const tryRoles = st.use.tryRoles();
|
|
30
|
-
const gqlInfos =
|
|
31
|
-
|
|
32
|
-
[]
|
|
33
|
-
).filter(({ key }) => !endpoints || endpoints.includes(key)).sort((a, b) => a.key > b.key ? 1 : -1).filter(({ gqlMeta }) => gqlMeta.signalOption.onlyFor !== "graphql").filter(({ gqlMeta }) => {
|
|
34
|
-
if (gqlMeta.type === "Pubsub" || gqlMeta.type === "Message")
|
|
29
|
+
const gqlInfos = Object.entries(signal.endpoint).filter(([key, gqlMeta]) => !endpoints || endpoints.includes(key)).sort(([keyA], [keyB]) => keyA > keyB ? 1 : -1).filter(([key, gqlMeta]) => gqlMeta.signalOption?.onlyFor !== "graphql").filter(([key, gqlMeta]) => {
|
|
30
|
+
if (gqlMeta.type === "pubsub" || gqlMeta.type === "message")
|
|
35
31
|
return false;
|
|
36
|
-
if (gqlMeta.guards
|
|
32
|
+
if (gqlMeta.signalOption?.guards?.includes("Public") && tryRoles.includes("Public"))
|
|
37
33
|
return true;
|
|
38
|
-
if ((gqlMeta.guards
|
|
34
|
+
if ((gqlMeta.signalOption?.guards?.includes("User") || gqlMeta.signalOption?.guards?.includes("Every")) && tryRoles.includes("User"))
|
|
39
35
|
return true;
|
|
40
|
-
if ((gqlMeta.guards
|
|
36
|
+
if ((gqlMeta.signalOption?.guards?.includes("Admin") || gqlMeta.signalOption?.guards?.includes("Every")) && tryRoles.includes("Admin"))
|
|
41
37
|
return true;
|
|
42
|
-
if (gqlMeta.guards
|
|
38
|
+
if ((gqlMeta.signalOption?.guards?.includes("SuperAdmin") || gqlMeta.signalOption?.guards?.includes("Every")) && tryRoles.includes("SuperAdmin"))
|
|
43
39
|
return true;
|
|
44
40
|
return false;
|
|
45
41
|
});
|
|
46
|
-
return /* @__PURE__ */ jsx("div", { children: gqlInfos.map((
|
|
42
|
+
return /* @__PURE__ */ jsx("div", { children: gqlInfos.map(([gqlKey, gqlMeta], idx) => /* @__PURE__ */ jsx(
|
|
43
|
+
RestApiEndpoint,
|
|
44
|
+
{
|
|
45
|
+
prefix,
|
|
46
|
+
refName,
|
|
47
|
+
gqlKey,
|
|
48
|
+
gqlMeta,
|
|
49
|
+
open: openAll,
|
|
50
|
+
httpUri
|
|
51
|
+
},
|
|
52
|
+
idx
|
|
53
|
+
)) });
|
|
47
54
|
};
|
|
48
55
|
RestApi.Endpoints = RestApiEndpoints;
|
|
49
|
-
const RestApiEndpoint = ({
|
|
56
|
+
const RestApiEndpoint = ({ refName, prefix, gqlKey, gqlMeta, open, httpUri }) => {
|
|
50
57
|
const { l } = usePage();
|
|
51
|
-
const sigMeta = getSigMeta(sigRef);
|
|
52
58
|
const [viewStatus, setViewStatus] = useState("doc");
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
const prefix = getControllerPrefix(sigMeta);
|
|
59
|
-
const path = getControllerPath(gqlMeta, paramArgMetas);
|
|
59
|
+
const queryArgMetas = gqlMeta.args.filter((argMeta) => argMeta.type === "Query");
|
|
60
|
+
const paramArgMetas = gqlMeta.args.filter((argMeta) => argMeta.type === "Param");
|
|
61
|
+
const bodyArgMetas = gqlMeta.args.filter((argMeta) => argMeta.type === "Body");
|
|
62
|
+
const uploadArgMetas = gqlMeta.args.filter((argMeta) => argMeta.type === "Upload");
|
|
63
|
+
const path = getControllerPath(gqlKey, gqlMeta);
|
|
60
64
|
return /* @__PURE__ */ jsxs("div", { className: "collapse-arrow bg-base-300 collapse my-1", children: [
|
|
61
65
|
/* @__PURE__ */ jsx("input", { type: "checkbox", checked: open }),
|
|
62
66
|
/* @__PURE__ */ jsx("div", { className: "collapse-title", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
63
|
-
/* @__PURE__ */ jsx("div", { className: `btn btn-xs w-16 ${gqlMeta.type === "
|
|
67
|
+
/* @__PURE__ */ jsx("div", { className: `btn btn-xs w-16 ${gqlMeta.type === "query" ? "btn-success" : "btn-accent"}`, children: gqlMeta.type === "query" ? "GET" : "POST" }),
|
|
64
68
|
prefix ? `/${prefix}` : "",
|
|
65
69
|
"/",
|
|
66
70
|
path,
|
|
67
71
|
" ",
|
|
68
72
|
/* @__PURE__ */ jsxs("span", { className: "text-lg", children: [
|
|
69
73
|
"(",
|
|
70
|
-
l.
|
|
74
|
+
l._(`${refName}.signal.${gqlKey}`),
|
|
71
75
|
")"
|
|
72
76
|
] })
|
|
73
77
|
] }) }),
|
|
@@ -75,9 +79,9 @@ const RestApiEndpoint = ({ sigRef, gqlMeta, open, httpUri }) => {
|
|
|
75
79
|
/* @__PURE__ */ jsxs("div", { className: "mt-4 text-lg", children: [
|
|
76
80
|
/* @__PURE__ */ jsx("div", { className: "text-lg font-extrabold", children: "Description" }),
|
|
77
81
|
/* @__PURE__ */ jsx("hr", { className: "my-2 border-[0.1px] border-gray-400" }),
|
|
78
|
-
gqlMeta.guards
|
|
82
|
+
gqlMeta.signalOption?.guards?.some((guard) => guard !== "None") ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 pb-3 pl-3 text-base font-normal", children: [
|
|
79
83
|
"- Guards:",
|
|
80
|
-
gqlMeta.guards.map((guard) => /* @__PURE__ */ jsx(
|
|
84
|
+
gqlMeta.signalOption.guards.map((guard) => /* @__PURE__ */ jsx(
|
|
81
85
|
"span",
|
|
82
86
|
{
|
|
83
87
|
className: `badge ${guard === "Public" ? "badge-success" : guard === "SuperAdmin" ? "badge-error" : guard === "Admin" ? "badge-error" : guard === "User" ? "badge-accent" : guard === "Owner" ? "badge-accent" : guard === "Every" ? "badge-warning" : ""}`,
|
|
@@ -88,7 +92,7 @@ const RestApiEndpoint = ({ sigRef, gqlMeta, open, httpUri }) => {
|
|
|
88
92
|
] }) : null,
|
|
89
93
|
/* @__PURE__ */ jsxs("div", { className: "pb-3 pl-3 text-base font-normal", children: [
|
|
90
94
|
"- ",
|
|
91
|
-
l.
|
|
95
|
+
l._(`${refName}.signal.${gqlKey}.desc`)
|
|
92
96
|
] })
|
|
93
97
|
] }),
|
|
94
98
|
/* @__PURE__ */ jsxs("div", { className: "my-4 flex w-full gap-5 px-5", children: [
|
|
@@ -119,87 +123,57 @@ const RestApiEndpoint = ({ sigRef, gqlMeta, open, httpUri }) => {
|
|
|
119
123
|
}
|
|
120
124
|
)
|
|
121
125
|
] }),
|
|
122
|
-
viewStatus === "doc" ? /* @__PURE__ */ jsx(
|
|
123
|
-
RestApiInterface,
|
|
124
|
-
{
|
|
125
|
-
sigRef,
|
|
126
|
-
gqlMeta,
|
|
127
|
-
queryArgMetas,
|
|
128
|
-
paramArgMetas,
|
|
129
|
-
bodyArgMetas,
|
|
130
|
-
uploadArgMetas
|
|
131
|
-
}
|
|
132
|
-
) : /* @__PURE__ */ jsx(
|
|
133
|
-
RestApiTry,
|
|
134
|
-
{
|
|
135
|
-
sigRef,
|
|
136
|
-
gqlMeta,
|
|
137
|
-
queryArgMetas,
|
|
138
|
-
paramArgMetas,
|
|
139
|
-
bodyArgMetas,
|
|
140
|
-
uploadArgMetas,
|
|
141
|
-
httpUri
|
|
142
|
-
}
|
|
143
|
-
)
|
|
126
|
+
viewStatus === "doc" ? /* @__PURE__ */ jsx(RestApiInterface, { refName, gqlKey, gqlMeta }) : /* @__PURE__ */ jsx(RestApiTry, { refName, gqlKey, gqlMeta, httpUri })
|
|
144
127
|
] })
|
|
145
128
|
] });
|
|
146
129
|
};
|
|
147
130
|
RestApi.Endpoint = RestApiEndpoint;
|
|
148
|
-
const RestApiInterface = ({
|
|
149
|
-
|
|
150
|
-
gqlMeta,
|
|
151
|
-
queryArgMetas,
|
|
152
|
-
paramArgMetas,
|
|
153
|
-
bodyArgMetas,
|
|
154
|
-
uploadArgMetas
|
|
155
|
-
}) => {
|
|
156
|
-
const sigMeta = getSigMeta(sigRef);
|
|
157
|
-
const [returnRef, arrDepth] = getNonArrayModel(gqlMeta.returns());
|
|
131
|
+
const RestApiInterface = ({ refName, gqlKey, gqlMeta }) => {
|
|
132
|
+
const returnRef = constantInfo.getModelRef(gqlMeta.returns.refName, gqlMeta.returns.modelType);
|
|
158
133
|
const isReturnModelType = !isGqlScalar(returnRef);
|
|
134
|
+
const uploadArgMetas = gqlMeta.args.filter((argMeta) => argMeta.type === "Upload");
|
|
135
|
+
const paramArgMetas = gqlMeta.args.filter((argMeta) => argMeta.type === "Param");
|
|
136
|
+
const queryArgMetas = gqlMeta.args.filter((argMeta) => argMeta.type === "Query");
|
|
137
|
+
const bodyArgMetas = gqlMeta.args.filter((argMeta) => argMeta.type === "Body");
|
|
159
138
|
return /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col gap-4", children: [
|
|
160
139
|
uploadArgMetas.length ? /* @__PURE__ */ jsxs("div", { children: [
|
|
161
140
|
/* @__PURE__ */ jsx("div", { className: "text-lg font-extrabold", children: "Form data upload" }),
|
|
162
|
-
/* @__PURE__ */ jsx("div", { className: "bg-base-100 overflow-x-auto rounded-md p-3", children: /* @__PURE__ */ jsx(Arg.Table, {
|
|
141
|
+
/* @__PURE__ */ jsx("div", { className: "bg-base-100 overflow-x-auto rounded-md p-3", children: /* @__PURE__ */ jsx(Arg.Table, { refName, gqlKey, argMetas: uploadArgMetas }) })
|
|
163
142
|
] }) : null,
|
|
164
143
|
paramArgMetas.length ? /* @__PURE__ */ jsxs("div", { children: [
|
|
165
144
|
/* @__PURE__ */ jsx("div", { className: "text-lg font-extrabold", children: "Parameters" }),
|
|
166
|
-
/* @__PURE__ */ jsx("div", { className: "bg-base-100 overflow-x-auto rounded-md p-3", children: /* @__PURE__ */ jsx(Arg.Table, {
|
|
145
|
+
/* @__PURE__ */ jsx("div", { className: "bg-base-100 overflow-x-auto rounded-md p-3", children: /* @__PURE__ */ jsx(Arg.Table, { refName, gqlKey, argMetas: paramArgMetas }) })
|
|
167
146
|
] }) : null,
|
|
168
147
|
queryArgMetas.length ? /* @__PURE__ */ jsxs("div", { children: [
|
|
169
148
|
/* @__PURE__ */ jsx("div", { className: "text-lg font-extrabold", children: "Query" }),
|
|
170
|
-
/* @__PURE__ */ jsx("div", { className: "bg-base-100 overflow-x-auto rounded-md p-3", children: /* @__PURE__ */ jsx(Arg.Table, {
|
|
149
|
+
/* @__PURE__ */ jsx("div", { className: "bg-base-100 overflow-x-auto rounded-md p-3", children: /* @__PURE__ */ jsx(Arg.Table, { refName, gqlKey, argMetas: queryArgMetas }) })
|
|
171
150
|
] }) : null,
|
|
172
151
|
bodyArgMetas.length ? /* @__PURE__ */ jsxs("div", { children: [
|
|
173
152
|
/* @__PURE__ */ jsx("div", { className: "text-lg font-extrabold", children: "Body" }),
|
|
174
|
-
/* @__PURE__ */ jsx("div", { className: "bg-base-100 overflow-x-auto rounded-md p-3", children: /* @__PURE__ */ jsx(Arg.Table, {
|
|
153
|
+
/* @__PURE__ */ jsx("div", { className: "bg-base-100 overflow-x-auto rounded-md p-3", children: /* @__PURE__ */ jsx(Arg.Table, { refName, gqlKey, argMetas: bodyArgMetas }) })
|
|
175
154
|
] }) : null,
|
|
176
155
|
/* @__PURE__ */ jsx("div", { className: "text-lg font-bold", children: /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col gap-2 rounded-md font-normal md:flex-row", children: [
|
|
177
156
|
/* @__PURE__ */ jsxs("div", { className: "w-full md:w-1/2", children: [
|
|
178
157
|
/* @__PURE__ */ jsx("div", { className: "text-lg font-extrabold", children: "Response Type" }),
|
|
179
158
|
/* @__PURE__ */ jsxs("div", { className: "bg-base-100 max-h-[500px] overflow-auto rounded-md p-4 md:h-[500px]", children: [
|
|
180
159
|
"Returns: ",
|
|
181
|
-
/* @__PURE__ */ jsx(Signal.Object.Type, { objRef: returnRef, arrDepth }),
|
|
160
|
+
/* @__PURE__ */ jsx(Signal.Object.Type, { objRef: returnRef, arrDepth: gqlMeta.returns.arrDepth }),
|
|
182
161
|
isReturnModelType ? /* @__PURE__ */ jsx(Signal.Object.Detail, { objRef: returnRef }) : null
|
|
183
162
|
] })
|
|
184
163
|
] }),
|
|
185
164
|
/* @__PURE__ */ jsxs("div", { className: "w-full md:w-1/2", children: [
|
|
186
165
|
/* @__PURE__ */ jsx("div", { className: "text-lg font-extrabold", children: "Response Example" }),
|
|
187
|
-
/* @__PURE__ */ jsx(Response.Example, {
|
|
166
|
+
/* @__PURE__ */ jsx(Response.Example, { gqlMeta })
|
|
188
167
|
] })
|
|
189
168
|
] }) })
|
|
190
169
|
] });
|
|
191
170
|
};
|
|
192
171
|
RestApi.Interface = RestApiInterface;
|
|
193
|
-
const RestApiTry = ({
|
|
194
|
-
|
|
195
|
-
gqlMeta
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
bodyArgMetas,
|
|
199
|
-
uploadArgMetas,
|
|
200
|
-
httpUri = baseClientEnv.serverHttpUri
|
|
201
|
-
}) => {
|
|
202
|
-
const sigMeta = getSigMeta(sigRef);
|
|
172
|
+
const RestApiTry = ({ prefix, refName, gqlKey, gqlMeta, httpUri = baseClientEnv.serverHttpUri }) => {
|
|
173
|
+
const queryArgMetas = gqlMeta.args.filter((argMeta) => argMeta.type === "Query");
|
|
174
|
+
const paramArgMetas = gqlMeta.args.filter((argMeta) => argMeta.type === "Param");
|
|
175
|
+
const bodyArgMetas = gqlMeta.args.filter((argMeta) => argMeta.type === "Body");
|
|
176
|
+
const uploadArgMetas = gqlMeta.args.filter((argMeta) => argMeta.type === "Upload");
|
|
203
177
|
const tryJwt = st.use.tryJwt();
|
|
204
178
|
const paramExample = useMemo(() => getExampleData(paramArgMetas, "restapi"), []);
|
|
205
179
|
const queryExample = useMemo(() => getExampleData(queryArgMetas, "restapi"), []);
|
|
@@ -212,16 +186,15 @@ const RestApiTry = ({
|
|
|
212
186
|
status: "idle",
|
|
213
187
|
data: null
|
|
214
188
|
});
|
|
215
|
-
const method = gqlMeta.type === "
|
|
216
|
-
const
|
|
217
|
-
const path = getControllerPath(gqlMeta, paramArgMetas);
|
|
189
|
+
const method = gqlMeta.type === "query" ? "GET" : "POST";
|
|
190
|
+
const path = getControllerPath(gqlKey, gqlMeta);
|
|
218
191
|
const queryString = new URLSearchParams(
|
|
219
192
|
Object.fromEntries(
|
|
220
193
|
queryArgMetas.map((argMeta) => {
|
|
221
194
|
const value = queryRequest[argMeta.name];
|
|
222
195
|
if (value === void 0 || value === null || value === "" || Array.isArray(value) && value.length === 0)
|
|
223
196
|
return null;
|
|
224
|
-
const
|
|
197
|
+
const argRef = constantInfo.getModelRef(argMeta.refName, argMeta.modelType);
|
|
225
198
|
if (getGqlTypeStr(argRef) === "JSON")
|
|
226
199
|
return [argMeta.name, btoa(value)];
|
|
227
200
|
return [argMeta.name, value];
|
|
@@ -279,6 +252,7 @@ const RestApiTry = ({
|
|
|
279
252
|
uploadArgMetas.map((argMeta) => /* @__PURE__ */ jsx(
|
|
280
253
|
Arg.FormData,
|
|
281
254
|
{
|
|
255
|
+
gqlKey,
|
|
282
256
|
argMeta,
|
|
283
257
|
value: uploadRequest[argMeta.name],
|
|
284
258
|
onChange: (fileList) => {
|
|
@@ -293,6 +267,7 @@ const RestApiTry = ({
|
|
|
293
267
|
paramArgMetas.map((argMeta, idx) => /* @__PURE__ */ jsx(
|
|
294
268
|
Arg.Param,
|
|
295
269
|
{
|
|
270
|
+
gqlKey,
|
|
296
271
|
argMeta,
|
|
297
272
|
value: paramRequest[argMeta.name],
|
|
298
273
|
onChange: (value) => {
|
|
@@ -307,6 +282,7 @@ const RestApiTry = ({
|
|
|
307
282
|
queryArgMetas.map((argMeta, idx) => /* @__PURE__ */ jsx(
|
|
308
283
|
Arg.Query,
|
|
309
284
|
{
|
|
285
|
+
gqlKey,
|
|
310
286
|
argMeta,
|
|
311
287
|
value: queryRequest[argMeta.name] ?? "",
|
|
312
288
|
onChange: (value) => {
|
package/esm/Signal/WebSocket.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { getGqlMetas, getSignalRefsOnStorage } from "@akanjs/signal";
|
|
4
3
|
import { st } from "@akanjs/store";
|
|
5
4
|
import Message from "./Message";
|
|
6
5
|
import PubSub from "./PubSub";
|
|
@@ -8,29 +7,29 @@ function WebSocket() {
|
|
|
8
7
|
return /* @__PURE__ */ jsx("div", {});
|
|
9
8
|
}
|
|
10
9
|
const WebSocketEndpoints = ({ refName, openAll }) => {
|
|
11
|
-
const
|
|
10
|
+
const signals = global.signals;
|
|
11
|
+
const signal = signals.find((signal2) => signal2.refName === refName);
|
|
12
|
+
if (!signal)
|
|
13
|
+
return null;
|
|
12
14
|
const tryRoles = st.use.tryRoles();
|
|
13
|
-
const gqlInfos =
|
|
14
|
-
|
|
15
|
-
[]
|
|
16
|
-
).sort((a, b) => a.key > b.key ? 1 : -1).filter(({ gqlMeta }) => gqlMeta.signalOption.onlyFor !== "restapi").filter(({ gqlMeta }) => {
|
|
17
|
-
if (gqlMeta.type === "Query" || gqlMeta.type === "Mutation")
|
|
15
|
+
const gqlInfos = Object.entries(signal.endpoint).sort(([keyA], [keyB]) => keyA > keyB ? 1 : -1).filter(([key, gqlMeta]) => gqlMeta.signalOption?.onlyFor !== "restapi").filter(([key, gqlMeta]) => {
|
|
16
|
+
if (gqlMeta.type === "pubsub" || gqlMeta.type === "message")
|
|
18
17
|
return false;
|
|
19
|
-
if (gqlMeta.guards
|
|
18
|
+
if (gqlMeta.signalOption?.guards?.includes("Public") && tryRoles.includes("Public"))
|
|
20
19
|
return true;
|
|
21
|
-
if ((gqlMeta.guards
|
|
20
|
+
if ((gqlMeta.signalOption?.guards?.includes("User") || gqlMeta.signalOption?.guards?.includes("Every")) && tryRoles.includes("User"))
|
|
22
21
|
return true;
|
|
23
|
-
if ((gqlMeta.guards
|
|
22
|
+
if ((gqlMeta.signalOption?.guards?.includes("Admin") || gqlMeta.signalOption?.guards?.includes("Every")) && tryRoles.includes("Admin"))
|
|
24
23
|
return true;
|
|
25
|
-
if (gqlMeta.guards
|
|
24
|
+
if ((gqlMeta.signalOption?.guards?.includes("SuperAdmin") || gqlMeta.signalOption?.guards?.includes("Every")) && tryRoles.includes("SuperAdmin"))
|
|
26
25
|
return true;
|
|
27
26
|
return false;
|
|
28
27
|
});
|
|
29
|
-
return /* @__PURE__ */ jsx("div", { children: gqlInfos.map((
|
|
30
|
-
if (gqlMeta.type === "
|
|
31
|
-
return /* @__PURE__ */ jsx(PubSub.Endpoint, {
|
|
28
|
+
return /* @__PURE__ */ jsx("div", { children: gqlInfos.map(([gqlKey, gqlMeta], idx) => {
|
|
29
|
+
if (gqlMeta.type === "pubsub") {
|
|
30
|
+
return /* @__PURE__ */ jsx(PubSub.Endpoint, { refName, gqlKey, gqlMeta, open: openAll }, idx);
|
|
32
31
|
} else {
|
|
33
|
-
return /* @__PURE__ */ jsx(Message.Endpoint, {
|
|
32
|
+
return /* @__PURE__ */ jsx(Message.Endpoint, { refName, gqlKey, gqlMeta, open: openAll }, idx);
|
|
34
33
|
}
|
|
35
34
|
}) });
|
|
36
35
|
};
|
package/esm/System/CSR.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { baseClientEnv } from "@akanjs/base";
|
|
3
4
|
import { clsx, device, getPathInfo, router, useCsr } from "@akanjs/client";
|
|
4
5
|
import { usePushNoti } from "@akanjs/next";
|
|
5
6
|
import { st } from "@akanjs/store";
|
|
@@ -26,10 +27,7 @@ const CSRProvider = ({
|
|
|
26
27
|
fonts,
|
|
27
28
|
layoutStyle = "web",
|
|
28
29
|
reconnect,
|
|
29
|
-
of
|
|
30
|
-
fetchPing,
|
|
31
|
-
fetchMe,
|
|
32
|
-
fetchSelf
|
|
30
|
+
of
|
|
33
31
|
}) => {
|
|
34
32
|
return /* @__PURE__ */ jsx(
|
|
35
33
|
Load.Page,
|
|
@@ -37,9 +35,10 @@ const CSRProvider = ({
|
|
|
37
35
|
of,
|
|
38
36
|
loader: async () => {
|
|
39
37
|
const { lang } = await params;
|
|
40
|
-
|
|
38
|
+
const fetch = baseClientEnv.side === "server" && baseClientEnv.operationMode === "local" ? global.builtFetch : global.fetch;
|
|
39
|
+
return { lang, fetch };
|
|
41
40
|
},
|
|
42
|
-
render: ({ lang }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
41
|
+
render: ({ lang, fetch }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
43
42
|
/* @__PURE__ */ jsx(Client.Wrapper, { theme, lang, reconnect, children: /* @__PURE__ */ jsx(
|
|
44
43
|
CSRWrapper,
|
|
45
44
|
{
|
|
@@ -57,10 +56,6 @@ const CSRProvider = ({
|
|
|
57
56
|
Common.Wrapper,
|
|
58
57
|
{
|
|
59
58
|
fetch,
|
|
60
|
-
environment: env.environment,
|
|
61
|
-
fetchPing,
|
|
62
|
-
fetchMe,
|
|
63
|
-
fetchSelf,
|
|
64
59
|
render: ({ mePromise, selfPromise }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
65
60
|
/* @__PURE__ */ jsx(Client.Inner, {}),
|
|
66
61
|
/* @__PURE__ */ jsx(CSRInner, {}),
|
package/esm/System/Common.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import "dayjs/locale/ko";
|
|
3
|
+
import { baseClientEnv } from "@akanjs/base";
|
|
3
4
|
import { getAccount } from "@akanjs/client";
|
|
4
5
|
import { Load } from "../Load";
|
|
5
6
|
const Common = () => {
|
|
6
7
|
return /* @__PURE__ */ jsx(Fragment, {});
|
|
7
8
|
};
|
|
8
9
|
const CommonWrapper = ({
|
|
9
|
-
fetch,
|
|
10
|
-
|
|
11
|
-
render,
|
|
12
|
-
fetchPing,
|
|
13
|
-
fetchMe = (props, option) => fetch.me?.(props, option),
|
|
14
|
-
fetchSelf = (props, option) => fetch.getSelf?.(props, option)
|
|
10
|
+
fetch = baseClientEnv.side === "server" && baseClientEnv.operationMode === "local" ? global.builtFetch : global.fetch,
|
|
11
|
+
render
|
|
15
12
|
}) => {
|
|
16
13
|
const account = getAccount();
|
|
14
|
+
const fetchPing = (option) => fetch.ping(option);
|
|
15
|
+
const fetchMe = (props, option) => fetch.me?.(props, option);
|
|
16
|
+
const fetchSelf = (props, option) => fetch.getSelf?.(props, option);
|
|
17
17
|
return /* @__PURE__ */ jsx(
|
|
18
18
|
Load.Page,
|
|
19
19
|
{
|