@cyberskill/shared 1.209.0 → 1.210.0
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/config/config.type.js +4 -0
- package/dist/config/config.util.js +49 -0
- package/dist/config/env/env.util.js +29 -0
- package/dist/config/index.js +6 -0
- package/dist/{src/config → config}/vitest/vitest.e2e.js +1 -1
- package/dist/config/vitest/vitest.unit.js +19 -0
- package/dist/{src/node → node}/apollo-server/apollo-server.util.js +5 -7
- package/dist/{src/node → node}/cli/index.js +31 -29
- package/dist/node/command/command.type.js +4 -0
- package/dist/node/command/command.util.js +144 -0
- package/dist/node/command/index.js +11 -0
- package/dist/{src/node → node}/express/express.util.js +10 -12
- package/dist/node/log/index.js +8 -0
- package/dist/node/log/log.type.js +4 -0
- package/dist/node/mongo/index.js +17 -0
- package/dist/node/mongo/mongo.type.js +16 -0
- package/dist/{src/node → node}/mongo/mongo.util.js +1 -1
- package/dist/node/package/index.js +10 -0
- package/dist/node/package/package.type.js +4 -0
- package/dist/node/package/package.util.js +225 -0
- package/dist/node/path/index.js +52 -0
- package/dist/node/path/path.constant.js +273 -0
- package/dist/node/upload/index.js +7 -0
- package/dist/node/upload/upload.type.js +4 -0
- package/dist/{src/node → node}/upload/upload.util.js +34 -35
- package/dist/{config-CwzVfkkX.js → node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.13_@vitest_browser@3.2.4_jiti@2.4.2_j_cac3da623d5688a51c0b1a2270e144db/node_modules/vitest/dist/config.js} +1 -1
- package/dist/{src/react → react}/apollo-client/apollo-client.component.js +9 -12
- package/dist/{src/react → react}/apollo-client/apollo-client.context.js +2 -2
- package/dist/{src/react → react}/apollo-client/apollo-client.util.js +3 -3
- package/dist/{src/react → react}/apollo-error/apollo-error.component.js +3 -10
- package/dist/react/apollo-error/apollo-error.module.scss.js +11 -0
- package/dist/{src/react → react}/apollo-error/apollo-error.provider.js +2 -2
- package/dist/react/loading/loading.component.js +34 -0
- package/dist/react/loading/loading.module.scss.js +15 -0
- package/dist/react/loading/loading.provider.js +17 -0
- package/dist/react/next-intl/next-intl.provider.js +23 -0
- package/dist/typescript/index.js +4 -0
- package/dist/{src/util → util}/common/common.util.js +1 -1
- package/package.json +68 -68
- package/dist/index-BG1UznTl.js +0 -628
- package/dist/magic-string.es-BQ9KnLz-.js +0 -659
- package/dist/src/config/config.util.js +0 -50
- package/dist/src/config/env/env.util.js +0 -29
- package/dist/src/config/index.js +0 -5
- package/dist/src/config/vitest/vitest.unit.js +0 -19
- package/dist/src/config/vitest/vitest.unit.setup.js +0 -30990
- package/dist/src/node/command/command.util.js +0 -16
- package/dist/src/node/command/index.js +0 -10
- package/dist/src/node/log/index.js +0 -8
- package/dist/src/node/mongo/index.js +0 -26
- package/dist/src/node/package/index.js +0 -9
- package/dist/src/node/package/package.util.js +0 -13
- package/dist/src/node/path/index.js +0 -52
- package/dist/src/node/path/path.constant.js +0 -49
- package/dist/src/node/upload/index.js +0 -6
- package/dist/src/react/apollo-client/apollo-client.hook.js +0 -11
- package/dist/src/react/loading/loading.component.js +0 -40
- package/dist/src/react/loading/loading.provider.js +0 -17
- package/dist/src/react/next-intl/next-intl.provider.js +0 -24
- package/dist/src/typescript/style.d.js +0 -1
- /package/dist/{src/config → config}/commitlint/index.d.ts +0 -0
- /package/dist/{src/config → config}/commitlint/index.js +0 -0
- /package/dist/{src/config → config}/config.type.d.ts +0 -0
- /package/dist/{src/config → config}/config.util.d.ts +0 -0
- /package/dist/{src/config → config}/env/env.constant.d.ts +0 -0
- /package/dist/{src/config → config}/env/env.constant.js +0 -0
- /package/dist/{src/config → config}/env/env.type.d.ts +0 -0
- /package/dist/{src/config → config}/env/env.util.d.ts +0 -0
- /package/dist/{src/config → config}/env/index.d.ts +0 -0
- /package/dist/{src/config → config}/env/index.js +0 -0
- /package/dist/{src/config → config}/eslint/index.d.ts +0 -0
- /package/dist/{src/config → config}/eslint/index.js +0 -0
- /package/dist/{src/config → config}/graphql-codegen/graphql-codegen.type.d.ts +0 -0
- /package/dist/{src/config → config}/graphql-codegen/graphql-codegen.util.d.ts +0 -0
- /package/dist/{src/config → config}/graphql-codegen/graphql-codegen.util.js +0 -0
- /package/dist/{src/config → config}/graphql-codegen/index.d.ts +0 -0
- /package/dist/{src/config → config}/graphql-codegen/index.js +0 -0
- /package/dist/{src/config → config}/index.d.ts +0 -0
- /package/dist/{src/config → config}/lint-staged/index.d.ts +0 -0
- /package/dist/{src/config → config}/lint-staged/index.js +0 -0
- /package/dist/{src/config → config}/vitest/index.d.ts +0 -0
- /package/dist/{src/config → config}/vitest/index.js +0 -0
- /package/dist/{src/config → config}/vitest/vitest.e2e.d.ts +0 -0
- /package/dist/{src/config → config}/vitest/vitest.unit.d.ts +0 -0
- /package/dist/{src/constant → constant}/common.d.ts +0 -0
- /package/dist/{src/constant → constant}/common.js +0 -0
- /package/dist/{src/constant → constant}/index.d.ts +0 -0
- /package/dist/{src/constant → constant}/index.js +0 -0
- /package/dist/{src/constant → constant}/response-status.d.ts +0 -0
- /package/dist/{src/constant → constant}/response-status.js +0 -0
- /package/dist/{src/node → node}/apollo-server/apollo-server.type.d.ts +0 -0
- /package/dist/{src/node → node}/apollo-server/apollo-server.util.d.ts +0 -0
- /package/dist/{src/node → node}/apollo-server/index.d.ts +0 -0
- /package/dist/{src/node → node}/apollo-server/index.js +0 -0
- /package/dist/{src/node → node}/cli/index.d.ts +0 -0
- /package/dist/{src/node → node}/command/command.type.d.ts +0 -0
- /package/dist/{src/node → node}/command/command.util.d.ts +0 -0
- /package/dist/{src/node → node}/command/index.d.ts +0 -0
- /package/dist/{src/node → node}/express/express.type.d.ts +0 -0
- /package/dist/{src/node → node}/express/express.util.d.ts +0 -0
- /package/dist/{src/node → node}/express/index.d.ts +0 -0
- /package/dist/{src/node → node}/express/index.js +0 -0
- /package/dist/{src/node → node}/fs/fs.type.d.ts +0 -0
- /package/dist/{src/node → node}/fs/fs.util.d.ts +0 -0
- /package/dist/{src/node → node}/fs/fs.util.js +0 -0
- /package/dist/{src/node → node}/fs/index.d.ts +0 -0
- /package/dist/{src/node → node}/fs/index.js +0 -0
- /package/dist/{src/node → node}/log/index.d.ts +0 -0
- /package/dist/{src/node → node}/log/log.type.d.ts +0 -0
- /package/dist/{src/node → node}/log/log.util.d.ts +0 -0
- /package/dist/{src/node → node}/log/log.util.js +0 -0
- /package/dist/{src/node → node}/mongo/index.d.ts +0 -0
- /package/dist/{src/node → node}/mongo/mongo.constant.d.ts +0 -0
- /package/dist/{src/node → node}/mongo/mongo.constant.js +0 -0
- /package/dist/{src/node → node}/mongo/mongo.type.d.ts +0 -0
- /package/dist/{src/node → node}/mongo/mongo.util.d.ts +0 -0
- /package/dist/{src/node → node}/package/index.d.ts +0 -0
- /package/dist/{src/node → node}/package/package.type.d.ts +0 -0
- /package/dist/{src/node → node}/package/package.util.d.ts +0 -0
- /package/dist/{src/node → node}/path/index.d.ts +0 -0
- /package/dist/{src/node → node}/path/path.constant.d.ts +0 -0
- /package/dist/{src/node → node}/path/path.util.d.ts +0 -0
- /package/dist/{src/node → node}/path/path.util.js +0 -0
- /package/dist/{src/node → node}/storage/index.d.ts +0 -0
- /package/dist/{src/node → node}/storage/index.js +0 -0
- /package/dist/{src/node → node}/storage/storage.util.d.ts +0 -0
- /package/dist/{src/node → node}/storage/storage.util.js +0 -0
- /package/dist/{src/node → node}/upload/index.d.ts +0 -0
- /package/dist/{src/node → node}/upload/upload.type.d.ts +0 -0
- /package/dist/{src/node → node}/upload/upload.util.d.ts +0 -0
- /package/dist/{src/node → node}/ws/index.d.ts +0 -0
- /package/dist/{src/node → node}/ws/index.js +0 -0
- /package/dist/{src/node → node}/ws/ts.util.d.ts +0 -0
- /package/dist/{src/node → node}/ws/ts.util.js +0 -0
- /package/dist/{src/node → node}/ws/ws.type.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.component.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.constant.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.constant.js +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.context.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.hook.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.type.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.util.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/index.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/index.js +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.component.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.component.js +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.rsc.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.rsc.js +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.util.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.util.js +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/index.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/index.js +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.component.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.context.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.context.js +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.hook.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.hook.js +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.provider.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.type.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.util.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.util.js +0 -0
- /package/dist/{src/react → react}/apollo-error/index.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/index.js +0 -0
- /package/dist/{src/react → react}/i18next/i18next.hook.d.ts +0 -0
- /package/dist/{src/react → react}/i18next/i18next.hook.js +0 -0
- /package/dist/{src/react → react}/i18next/i18next.util.d.ts +0 -0
- /package/dist/{src/react → react}/i18next/i18next.util.js +0 -0
- /package/dist/{src/react → react}/i18next/index.d.ts +0 -0
- /package/dist/{src/react → react}/i18next/index.js +0 -0
- /package/dist/{src/react → react}/loading/index.d.ts +0 -0
- /package/dist/{src/react → react}/loading/index.js +0 -0
- /package/dist/{src/react → react}/loading/loading.component.d.ts +0 -0
- /package/dist/{src/react → react}/loading/loading.context.d.ts +0 -0
- /package/dist/{src/react → react}/loading/loading.context.js +0 -0
- /package/dist/{src/react → react}/loading/loading.hook.d.ts +0 -0
- /package/dist/{src/react → react}/loading/loading.hook.js +0 -0
- /package/dist/{src/react → react}/loading/loading.provider.d.ts +0 -0
- /package/dist/{src/react → react}/loading/loading.type.d.ts +0 -0
- /package/dist/{src/react → react}/log/index.d.ts +0 -0
- /package/dist/{src/react → react}/log/index.js +0 -0
- /package/dist/{src/react → react}/log/log.type.d.ts +0 -0
- /package/dist/{src/react → react}/log/log.util.d.ts +0 -0
- /package/dist/{src/react → react}/log/log.util.js +0 -0
- /package/dist/{src/react → react}/next-intl/index.d.ts +0 -0
- /package/dist/{src/react → react}/next-intl/index.js +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.constant.d.ts +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.constant.js +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.context.d.ts +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.context.js +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.hoc.d.ts +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.hoc.js +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.hook.d.ts +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.hook.js +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.provider.d.ts +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.type.d.ts +0 -0
- /package/dist/{src/react → react}/storage/index.d.ts +0 -0
- /package/dist/{src/react → react}/storage/index.js +0 -0
- /package/dist/{src/react → react}/storage/storage.hook.d.ts +0 -0
- /package/dist/{src/react → react}/storage/storage.hook.js +0 -0
- /package/dist/{src/react → react}/storage/storage.util.d.ts +0 -0
- /package/dist/{src/react → react}/storage/storage.util.js +0 -0
- /package/dist/{src/react → react}/toast/index.d.ts +0 -0
- /package/dist/{src/react → react}/toast/index.js +0 -0
- /package/dist/{src/react → react}/userback/index.d.ts +0 -0
- /package/dist/{src/react → react}/userback/index.js +0 -0
- /package/dist/{src/react → react}/userback/userback.component.d.ts +0 -0
- /package/dist/{src/react → react}/userback/userback.component.js +0 -0
- /package/dist/{src/react → react}/userback/userback.type.d.ts +0 -0
- /package/dist/{src/typescript → typescript}/common.type.d.ts +0 -0
- /package/dist/{src/typescript/index.js → typescript/common.type.js} +0 -0
- /package/dist/{src/typescript → typescript}/index.d.ts +0 -0
- /package/dist/{src/typescript → typescript}/react.type.d.ts +0 -0
- /package/dist/{src/util → util}/common/common.type.d.ts +0 -0
- /package/dist/{src/util → util}/common/common.util.d.ts +0 -0
- /package/dist/{src/util → util}/common/index.d.ts +0 -0
- /package/dist/{src/util → util}/common/index.js +0 -0
- /package/dist/{src/util → util}/index.d.ts +0 -0
- /package/dist/{src/util → util}/index.js +0 -0
- /package/dist/{src/util → util}/object/index.d.ts +0 -0
- /package/dist/{src/util → util}/object/index.js +0 -0
- /package/dist/{src/util → util}/object/object.util.d.ts +0 -0
- /package/dist/{src/util → util}/object/object.util.js +0 -0
- /package/dist/{src/util → util}/serializer/index.d.ts +0 -0
- /package/dist/{src/util → util}/serializer/index.js +0 -0
- /package/dist/{src/util → util}/serializer/serializer.type.d.ts +0 -0
- /package/dist/{src/util → util}/serializer/serializer.util.d.ts +0 -0
- /package/dist/{src/util → util}/serializer/serializer.util.js +0 -0
- /package/dist/{src/util → util}/string/index.d.ts +0 -0
- /package/dist/{src/util → util}/string/index.js +0 -0
- /package/dist/{src/util → util}/string/string.type.d.ts +0 -0
- /package/dist/{src/util → util}/string/string.util.d.ts +0 -0
- /package/dist/{src/util → util}/string/string.util.js +0 -0
- /package/dist/{src/util → util}/validate/index.d.ts +0 -0
- /package/dist/{src/util → util}/validate/index.js +0 -0
- /package/dist/{src/util → util}/validate/validate.util.d.ts +0 -0
- /package/dist/{src/util → util}/validate/validate.util.js +0 -0
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
import { ApolloProvider as l } from "@apollo/client/react/react.cjs";
|
|
2
2
|
import r, { useMemo as m } from "react";
|
|
3
|
-
import { ApolloClientProvider as
|
|
4
|
-
import { getClient as
|
|
3
|
+
import { ApolloClientProvider as n } from "./apollo-client.context.js";
|
|
4
|
+
import { getClient as i } from "./apollo-client.util.js";
|
|
5
5
|
import { ApolloErrorProvider as p } from "../apollo-error/apollo-error.provider.js";
|
|
6
6
|
import { ApolloErrorComponent as a } from "../apollo-error/apollo-error.component.js";
|
|
7
7
|
import { Toaster as c } from "react-hot-toast";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import "@apollo/client/react/hooks/hooks.cjs";
|
|
11
|
-
function _({
|
|
12
|
-
options: o,
|
|
8
|
+
function s({
|
|
9
|
+
options: e,
|
|
13
10
|
children: t
|
|
14
11
|
}) {
|
|
15
|
-
const
|
|
16
|
-
() =>
|
|
17
|
-
[
|
|
12
|
+
const o = m(
|
|
13
|
+
() => i(e || {}),
|
|
14
|
+
[e]
|
|
18
15
|
);
|
|
19
|
-
return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(p, null, /* @__PURE__ */ r.createElement(
|
|
16
|
+
return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(p, null, /* @__PURE__ */ r.createElement(n, { client: o }, /* @__PURE__ */ r.createElement(l, { client: o }, t)), /* @__PURE__ */ r.createElement(a, null)), /* @__PURE__ */ r.createElement(c, { position: "top-right" }));
|
|
20
17
|
}
|
|
21
18
|
export {
|
|
22
|
-
|
|
19
|
+
s as ApolloProvider
|
|
23
20
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import o, { createContext as l } from "react";
|
|
2
2
|
const n = l(null);
|
|
3
|
-
function
|
|
3
|
+
function c({
|
|
4
4
|
client: e,
|
|
5
5
|
children: t
|
|
6
6
|
}) {
|
|
@@ -8,5 +8,5 @@ function a({
|
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
10
10
|
n as ApolloClientContext,
|
|
11
|
-
|
|
11
|
+
c as ApolloClientProvider
|
|
12
12
|
};
|
|
@@ -21,7 +21,7 @@ class S extends k {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function F(i) {
|
|
25
25
|
const { uri: o, wsUrl: s, customLinks: m } = i, c = new S(), f = v(({ graphQLErrors: n, networkError: e, protocolErrors: a, operation: h }) => {
|
|
26
26
|
const A = h?.operationName || "Unknown";
|
|
27
27
|
if (n && n.forEach(({ message: t, locations: l, path: d }) => {
|
|
@@ -87,7 +87,7 @@ function _(i) {
|
|
|
87
87
|
];
|
|
88
88
|
}
|
|
89
89
|
function K(i = {}) {
|
|
90
|
-
const o = D(
|
|
90
|
+
const o = D(F(i));
|
|
91
91
|
return new U({
|
|
92
92
|
link: o,
|
|
93
93
|
cache: new N(),
|
|
@@ -96,6 +96,6 @@ function K(i = {}) {
|
|
|
96
96
|
}
|
|
97
97
|
export {
|
|
98
98
|
S as DevLoggerLink,
|
|
99
|
-
|
|
99
|
+
F as createApolloLinks,
|
|
100
100
|
K as getClient
|
|
101
101
|
};
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import e, { use as c } from "react";
|
|
2
2
|
import { ApolloErrorContext as m } from "./apollo-error.context.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
"modal-content": "_modal-content_8fveh_11",
|
|
6
|
-
"btn-close": "_btn-close_8fveh_22",
|
|
7
|
-
"error-title": "_error-title_8fveh_36",
|
|
8
|
-
"btn-retry": "_btn-retry_8fveh_41",
|
|
9
|
-
"error-details": "_error-details_8fveh_54"
|
|
10
|
-
};
|
|
11
|
-
function d() {
|
|
3
|
+
import t from "./apollo-error.module.scss.js";
|
|
4
|
+
function p() {
|
|
12
5
|
const l = c(m), r = l?.error;
|
|
13
6
|
if (!r)
|
|
14
7
|
return null;
|
|
@@ -32,5 +25,5 @@ function d() {
|
|
|
32
25
|
), " ", r.message), /* @__PURE__ */ e.createElement("div", { className: t["error-details"] }, r.networkError && /* @__PURE__ */ e.createElement("pre", { className: "network" }, /* @__PURE__ */ e.createElement("strong", null, "Network Error:"), " ", r.networkError.message), o("GraphQL Errors", [...r.graphQLErrors]), o("Protocol Errors", [...r.protocolErrors]), o("Client Errors", [...r.clientErrors]), r.extraInfo && /* @__PURE__ */ e.createElement("pre", { className: "extra" }, /* @__PURE__ */ e.createElement("strong", null, "Extra Info:"), " ", JSON.stringify(r.extraInfo, null, 4)))));
|
|
33
26
|
}
|
|
34
27
|
export {
|
|
35
|
-
|
|
28
|
+
p as ApolloErrorComponent
|
|
36
29
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
"modal-backdrop": "_modal-backdrop_8fveh_1",
|
|
3
|
+
"modal-content": "_modal-content_8fveh_11",
|
|
4
|
+
"btn-close": "_btn-close_8fveh_22",
|
|
5
|
+
"error-title": "_error-title_8fveh_36",
|
|
6
|
+
"btn-retry": "_btn-retry_8fveh_41",
|
|
7
|
+
"error-details": "_error-details_8fveh_54"
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
e as default
|
|
11
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import l, { useState as n, useEffect as u, useMemo as a } from "react";
|
|
2
2
|
import { ApolloErrorContext as c } from "./apollo-error.context.js";
|
|
3
3
|
import { setGlobalApolloErrorCallback as m } from "./apollo-error.util.js";
|
|
4
|
-
function
|
|
4
|
+
function f({ children: e }) {
|
|
5
5
|
const [o, r] = n(null);
|
|
6
6
|
u(() => {
|
|
7
7
|
m(r);
|
|
@@ -14,5 +14,5 @@ function p({ children: e }) {
|
|
|
14
14
|
return /* @__PURE__ */ l.createElement(c, { value: t }, e);
|
|
15
15
|
}
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
f as ApolloErrorProvider
|
|
18
18
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import a from "clsx";
|
|
2
|
+
import e, { useEffect as i } from "react";
|
|
3
|
+
import t from "./loading.module.scss.js";
|
|
4
|
+
function d() {
|
|
5
|
+
if (document.getElementById("noscroll-style"))
|
|
6
|
+
return;
|
|
7
|
+
const n = document.createElement("style");
|
|
8
|
+
n.id = "noscroll-style", n.innerHTML = `
|
|
9
|
+
.noscroll {
|
|
10
|
+
overflow: hidden !important;
|
|
11
|
+
height: 100vh !important;
|
|
12
|
+
}
|
|
13
|
+
`, document.head.appendChild(n);
|
|
14
|
+
}
|
|
15
|
+
function E({ full: n = !1, className: r = "", message: o = "Loading", ...s }) {
|
|
16
|
+
i(() => {
|
|
17
|
+
if (n) {
|
|
18
|
+
document.body.classList.add("noscroll");
|
|
19
|
+
const l = (m) => m.preventDefault();
|
|
20
|
+
return document.addEventListener("contextmenu", l), () => {
|
|
21
|
+
document.body.classList.remove("noscroll"), document.removeEventListener("contextmenu", l);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}, [n]), i(() => {
|
|
25
|
+
d();
|
|
26
|
+
}, []);
|
|
27
|
+
function c() {
|
|
28
|
+
return /* @__PURE__ */ e.createElement("div", { className: t.container, ...s }, /* @__PURE__ */ e.createElement("div", { className: t.ring }), /* @__PURE__ */ e.createElement("div", { className: t.ring }), /* @__PURE__ */ e.createElement("div", { className: t.ring }), /* @__PURE__ */ e.createElement("div", { className: t.ring }), o && /* @__PURE__ */ e.createElement("div", { className: t.message }, o));
|
|
29
|
+
}
|
|
30
|
+
return n ? /* @__PURE__ */ e.createElement("div", { className: a(t.full, r) }, c()) : /* @__PURE__ */ e.createElement("div", { className: a(t.block, r) }, c());
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
E as Loading
|
|
34
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const o = "_full_b1d9o_1", n = "_block_b1d9o_2", _ = "_container_b1d9o_40", s = "_ring_b1d9o_50", c = "_message_b1d9o_74", e = {
|
|
2
|
+
full: o,
|
|
3
|
+
block: n,
|
|
4
|
+
container: _,
|
|
5
|
+
ring: s,
|
|
6
|
+
message: c
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
n as block,
|
|
10
|
+
_ as container,
|
|
11
|
+
e as default,
|
|
12
|
+
o as full,
|
|
13
|
+
c as message,
|
|
14
|
+
s as ring
|
|
15
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import i, { useState as l, useCallback as r, useMemo as g } from "react";
|
|
2
|
+
import { Loading as m } from "./loading.component.js";
|
|
3
|
+
import { LoadingContext as u } from "./loading.context.js";
|
|
4
|
+
function x({ children: c }) {
|
|
5
|
+
const [e, t] = l(!1), [o, a] = l(!1), n = r((f = !1) => {
|
|
6
|
+
t(!0), a(f);
|
|
7
|
+
}, []), s = r(() => {
|
|
8
|
+
t(!1), a(!1);
|
|
9
|
+
}, []), d = g(
|
|
10
|
+
() => ({ isLoading: e, isGlobalLoading: o, showLoading: n, hideLoading: s }),
|
|
11
|
+
[e, o, n, s]
|
|
12
|
+
);
|
|
13
|
+
return /* @__PURE__ */ i.createElement(u, { value: d }, e ? /* @__PURE__ */ i.createElement(m, { full: o }) : c);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
x as LoadingProvider
|
|
17
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import t, { useMemo as u } from "react";
|
|
2
|
+
import { NEXT_INTL_DEFAULT_LANGUAGE as c } from "./next-intl.constant.js";
|
|
3
|
+
import { NextIntlContext as p } from "./next-intl.context.js";
|
|
4
|
+
import { withNextIntl as i } from "./next-intl.hoc.js";
|
|
5
|
+
import { useStorage as l } from "../storage/storage.hook.js";
|
|
6
|
+
function f({ children: r }) {
|
|
7
|
+
return /* @__PURE__ */ t.createElement(t.Fragment, null, r);
|
|
8
|
+
}
|
|
9
|
+
const L = i(f);
|
|
10
|
+
function I({
|
|
11
|
+
children: r,
|
|
12
|
+
languages: e,
|
|
13
|
+
messages: a
|
|
14
|
+
}) {
|
|
15
|
+
const { value: n, set: o } = l("lang", e[0]), m = u(
|
|
16
|
+
() => ({ languages: e, currentLanguage: n ?? c, setCurrentLanguage: o }),
|
|
17
|
+
[e, o, n]
|
|
18
|
+
);
|
|
19
|
+
return /* @__PURE__ */ t.createElement(p, { value: m }, /* @__PURE__ */ t.createElement(L, { languages: e, messages: a }, r));
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
I as NextIntlProvider
|
|
23
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import a from "unorm";
|
|
2
|
-
import { E_Environment as o } from "../../typescript/
|
|
2
|
+
import { E_Environment as o } from "../../typescript/common.type.js";
|
|
3
3
|
const E = {
|
|
4
4
|
a: ["à", "á", "ạ", "ả", "ã", "â", "ầ", "ấ", "ậ", "ẩ", "ẫ", "ă", "ằ", "ắ", "ặ", "ẳ", "ẵ"],
|
|
5
5
|
e: ["è", "é", "ẹ", "ẻ", "ẽ", "ê", "ề", "ế", "ệ", "ể", "ễ"],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyberskill/shared",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.210.0",
|
|
5
5
|
"description": "CyberSkill Shared",
|
|
6
6
|
"author": "Stephen Cheng",
|
|
7
7
|
"license": "MIT",
|
|
@@ -16,143 +16,143 @@
|
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"exports": {
|
|
18
18
|
"./config": {
|
|
19
|
-
"types": "./dist/
|
|
20
|
-
"import": "./dist/
|
|
19
|
+
"types": "./dist/config/index.d.ts",
|
|
20
|
+
"import": "./dist/config/index.js"
|
|
21
21
|
},
|
|
22
22
|
"./config/commitlint": {
|
|
23
|
-
"types": "./dist/
|
|
24
|
-
"import": "./dist/
|
|
23
|
+
"types": "./dist/config/commitlint/index.d.ts",
|
|
24
|
+
"import": "./dist/config/commitlint/index.js"
|
|
25
25
|
},
|
|
26
26
|
"./config/env": {
|
|
27
|
-
"types": "./dist/
|
|
28
|
-
"import": "./dist/
|
|
27
|
+
"types": "./dist/config/env/index.d.ts",
|
|
28
|
+
"import": "./dist/config/env/index.js"
|
|
29
29
|
},
|
|
30
30
|
"./config/eslint": {
|
|
31
|
-
"types": "./dist/
|
|
32
|
-
"import": "./dist/
|
|
31
|
+
"types": "./dist/config/eslint/index.d.ts",
|
|
32
|
+
"import": "./dist/config/eslint/index.js"
|
|
33
33
|
},
|
|
34
34
|
"./config/graphql-codegen": {
|
|
35
|
-
"types": "./dist/
|
|
36
|
-
"import": "./dist/
|
|
35
|
+
"types": "./dist/config/graphql-codegen/index.d.ts",
|
|
36
|
+
"import": "./dist/config/graphql-codegen/index.js"
|
|
37
37
|
},
|
|
38
38
|
"./config/lint-staged": {
|
|
39
|
-
"types": "./dist/
|
|
40
|
-
"import": "./dist/
|
|
39
|
+
"types": "./dist/config/lint-staged/index.d.ts",
|
|
40
|
+
"import": "./dist/config/lint-staged/index.js"
|
|
41
41
|
},
|
|
42
42
|
"./config/vitest": {
|
|
43
|
-
"types": "./dist/
|
|
44
|
-
"import": "./dist/
|
|
43
|
+
"types": "./dist/config/vitest/index.d.ts",
|
|
44
|
+
"import": "./dist/config/vitest/index.js"
|
|
45
45
|
},
|
|
46
46
|
"./constant": {
|
|
47
|
-
"types": "./dist/
|
|
48
|
-
"import": "./dist/
|
|
47
|
+
"types": "./dist/constant/index.d.ts",
|
|
48
|
+
"import": "./dist/constant/index.js"
|
|
49
49
|
},
|
|
50
50
|
"./node/apollo-server": {
|
|
51
|
-
"types": "./dist/
|
|
52
|
-
"import": "./dist/
|
|
51
|
+
"types": "./dist/node/apollo-server/index.d.ts",
|
|
52
|
+
"import": "./dist/node/apollo-server/index.js"
|
|
53
53
|
},
|
|
54
54
|
"./node/cli": {
|
|
55
|
-
"types": "./dist/
|
|
56
|
-
"import": "./dist/
|
|
55
|
+
"types": "./dist/node/cli/index.d.ts",
|
|
56
|
+
"import": "./dist/node/cli/index.js"
|
|
57
57
|
},
|
|
58
58
|
"./node/command": {
|
|
59
|
-
"types": "./dist/
|
|
60
|
-
"import": "./dist/
|
|
59
|
+
"types": "./dist/node/command/index.d.ts",
|
|
60
|
+
"import": "./dist/node/command/index.js"
|
|
61
61
|
},
|
|
62
62
|
"./node/express": {
|
|
63
|
-
"types": "./dist/
|
|
64
|
-
"import": "./dist/
|
|
63
|
+
"types": "./dist/node/express/index.d.ts",
|
|
64
|
+
"import": "./dist/node/express/index.js"
|
|
65
65
|
},
|
|
66
66
|
"./node/fs": {
|
|
67
|
-
"types": "./dist/
|
|
68
|
-
"import": "./dist/
|
|
67
|
+
"types": "./dist/node/fs/index.d.ts",
|
|
68
|
+
"import": "./dist/node/fs/index.js"
|
|
69
69
|
},
|
|
70
70
|
"./node/log": {
|
|
71
|
-
"types": "./dist/
|
|
72
|
-
"import": "./dist/
|
|
71
|
+
"types": "./dist/node/log/index.d.ts",
|
|
72
|
+
"import": "./dist/node/log/index.js"
|
|
73
73
|
},
|
|
74
74
|
"./node/mongo": {
|
|
75
|
-
"types": "./dist/
|
|
76
|
-
"import": "./dist/
|
|
75
|
+
"types": "./dist/node/mongo/index.d.ts",
|
|
76
|
+
"import": "./dist/node/mongo/index.js"
|
|
77
77
|
},
|
|
78
78
|
"./node/package": {
|
|
79
|
-
"types": "./dist/
|
|
80
|
-
"import": "./dist/
|
|
79
|
+
"types": "./dist/node/package/index.d.ts",
|
|
80
|
+
"import": "./dist/node/package/index.js"
|
|
81
81
|
},
|
|
82
82
|
"./node/path": {
|
|
83
|
-
"types": "./dist/
|
|
84
|
-
"import": "./dist/
|
|
83
|
+
"types": "./dist/node/path/index.d.ts",
|
|
84
|
+
"import": "./dist/node/path/index.js"
|
|
85
85
|
},
|
|
86
86
|
"./node/storage": {
|
|
87
|
-
"types": "./dist/
|
|
88
|
-
"import": "./dist/
|
|
87
|
+
"types": "./dist/node/storage/index.d.ts",
|
|
88
|
+
"import": "./dist/node/storage/index.js"
|
|
89
89
|
},
|
|
90
90
|
"./node/upload": {
|
|
91
|
-
"types": "./dist/
|
|
92
|
-
"import": "./dist/
|
|
91
|
+
"types": "./dist/node/upload/index.d.ts",
|
|
92
|
+
"import": "./dist/node/upload/index.js"
|
|
93
93
|
},
|
|
94
94
|
"./node/ws": {
|
|
95
|
-
"types": "./dist/
|
|
96
|
-
"import": "./dist/
|
|
95
|
+
"types": "./dist/node/ws/index.d.ts",
|
|
96
|
+
"import": "./dist/node/ws/index.js"
|
|
97
97
|
},
|
|
98
98
|
"./react/apollo-client": {
|
|
99
|
-
"types": "./dist/
|
|
100
|
-
"import": "./dist/
|
|
99
|
+
"types": "./dist/react/apollo-client/index.d.ts",
|
|
100
|
+
"import": "./dist/react/apollo-client/index.js"
|
|
101
101
|
},
|
|
102
102
|
"./react/apollo-client-nextjs": {
|
|
103
|
-
"types": "./dist/
|
|
104
|
-
"import": "./dist/
|
|
103
|
+
"types": "./dist/react/apollo-client-nextjs/index.d.ts",
|
|
104
|
+
"import": "./dist/react/apollo-client-nextjs/index.js"
|
|
105
105
|
},
|
|
106
106
|
"./react/apollo-client-nextjs/rsc": {
|
|
107
|
-
"types": "./dist/
|
|
108
|
-
"import": "./dist/
|
|
107
|
+
"types": "./dist/react/apollo-client-nextjs/apollo-client-nextjs.rsc.d.ts",
|
|
108
|
+
"import": "./dist/react/apollo-client-nextjs/apollo-client-nextjs.rsc.js"
|
|
109
109
|
},
|
|
110
110
|
"./react/apollo-error": {
|
|
111
|
-
"types": "./dist/
|
|
112
|
-
"import": "./dist/
|
|
111
|
+
"types": "./dist/react/apollo-error/index.d.ts",
|
|
112
|
+
"import": "./dist/react/apollo-error/index.js"
|
|
113
113
|
},
|
|
114
114
|
"./react/i18next": {
|
|
115
|
-
"types": "./dist/
|
|
116
|
-
"import": "./dist/
|
|
115
|
+
"types": "./dist/react/i18next/index.d.ts",
|
|
116
|
+
"import": "./dist/react/i18next/index.js"
|
|
117
117
|
},
|
|
118
118
|
"./react/loading": {
|
|
119
|
-
"types": "./dist/
|
|
120
|
-
"import": "./dist/
|
|
119
|
+
"types": "./dist/react/loading/index.d.ts",
|
|
120
|
+
"import": "./dist/react/loading/index.js"
|
|
121
121
|
},
|
|
122
122
|
"./react/log": {
|
|
123
|
-
"types": "./dist/
|
|
124
|
-
"import": "./dist/
|
|
123
|
+
"types": "./dist/react/log/index.d.ts",
|
|
124
|
+
"import": "./dist/react/log/index.js"
|
|
125
125
|
},
|
|
126
126
|
"./react/next-intl": {
|
|
127
|
-
"types": "./dist/
|
|
128
|
-
"import": "./dist/
|
|
127
|
+
"types": "./dist/react/next-intl/index.d.ts",
|
|
128
|
+
"import": "./dist/react/next-intl/index.js"
|
|
129
129
|
},
|
|
130
130
|
"./react/storage": {
|
|
131
|
-
"types": "./dist/
|
|
132
|
-
"import": "./dist/
|
|
131
|
+
"types": "./dist/react/storage/index.d.ts",
|
|
132
|
+
"import": "./dist/react/storage/index.js"
|
|
133
133
|
},
|
|
134
134
|
"./react/toast": {
|
|
135
|
-
"types": "./dist/
|
|
136
|
-
"import": "./dist/
|
|
135
|
+
"types": "./dist/react/toast/index.d.ts",
|
|
136
|
+
"import": "./dist/react/toast/index.js"
|
|
137
137
|
},
|
|
138
138
|
"./react/userback": {
|
|
139
|
-
"types": "./dist/
|
|
140
|
-
"import": "./dist/
|
|
139
|
+
"types": "./dist/react/userback/index.d.ts",
|
|
140
|
+
"import": "./dist/react/userback/index.js"
|
|
141
141
|
},
|
|
142
142
|
"./typescript": {
|
|
143
|
-
"types": "./dist/
|
|
144
|
-
"import": "./dist/
|
|
143
|
+
"types": "./dist/typescript/index.d.ts",
|
|
144
|
+
"import": "./dist/typescript/index.js"
|
|
145
145
|
},
|
|
146
146
|
"./util": {
|
|
147
|
-
"types": "./dist/
|
|
148
|
-
"import": "./dist/
|
|
147
|
+
"types": "./dist/util/index.d.ts",
|
|
148
|
+
"import": "./dist/util/index.js"
|
|
149
149
|
},
|
|
150
150
|
"./style.css": {
|
|
151
151
|
"import": "./dist/style.css"
|
|
152
152
|
}
|
|
153
153
|
},
|
|
154
154
|
"bin": {
|
|
155
|
-
"cyberskill": "dist/
|
|
155
|
+
"cyberskill": "dist/node/cli/index.js"
|
|
156
156
|
},
|
|
157
157
|
"files": [
|
|
158
158
|
"dist",
|