@fctc/interface-logic 4.0.3 → 4.0.5
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/hooks.js +125 -124
- package/dist/hooks.mjs +3 -2
- package/dist/provider.js +151 -149
- package/dist/provider.mjs +17 -15
- package/dist/services.js +124 -123
- package/dist/services.mjs +3 -2
- package/package.json +90 -90
package/dist/provider.mjs
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
// src/provider/react-query-provider.tsx
|
|
2
|
+
import { useState } from "react";
|
|
2
3
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
var ReactQueryProvider = ({ children }) => {
|
|
5
|
-
const queryClient =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
const [queryClient] = useState(
|
|
7
|
+
() => new QueryClient({
|
|
8
|
+
defaultOptions: {
|
|
9
|
+
queries: {
|
|
10
|
+
refetchOnWindowFocus: false,
|
|
11
|
+
refetchOnMount: false,
|
|
12
|
+
refetchOnReconnect: false,
|
|
13
|
+
retry: false
|
|
14
|
+
}
|
|
13
15
|
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
+
})
|
|
17
|
+
);
|
|
16
18
|
return /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children });
|
|
17
19
|
};
|
|
18
20
|
|
|
@@ -652,7 +654,7 @@ var MainProvider = ({ children }) => {
|
|
|
652
654
|
};
|
|
653
655
|
|
|
654
656
|
// src/provider/version-gate-provider.tsx
|
|
655
|
-
import { useEffect as useEffect2, useState as
|
|
657
|
+
import { useEffect as useEffect2, useState as useState3 } from "react";
|
|
656
658
|
import { useQueryClient } from "@tanstack/react-query";
|
|
657
659
|
|
|
658
660
|
// src/services/action-service/index.ts
|
|
@@ -2826,7 +2828,7 @@ function matchDomain(record, domain) {
|
|
|
2826
2828
|
}
|
|
2827
2829
|
|
|
2828
2830
|
// src/utils/function.ts
|
|
2829
|
-
import { useEffect, useState } from "react";
|
|
2831
|
+
import { useEffect, useState as useState2 } from "react";
|
|
2830
2832
|
var toQueryString = (params) => {
|
|
2831
2833
|
return Object.keys(params).map(
|
|
2832
2834
|
(key) => encodeURIComponent(key) + "=" + encodeURIComponent(params[key].toString())
|
|
@@ -5834,7 +5836,7 @@ function useDashboardService() {
|
|
|
5834
5836
|
import { Fragment, jsx as jsx4 } from "react/jsx-runtime";
|
|
5835
5837
|
var VersionGate = ({ children }) => {
|
|
5836
5838
|
const queryClient = useQueryClient();
|
|
5837
|
-
const [ready, setReady] =
|
|
5839
|
+
const [ready, setReady] = useState3(false);
|
|
5838
5840
|
const { getVersion } = useViewService();
|
|
5839
5841
|
useEffect2(() => {
|
|
5840
5842
|
const clearVersion = () => {
|
|
@@ -5867,7 +5869,7 @@ var VersionGate = ({ children }) => {
|
|
|
5867
5869
|
};
|
|
5868
5870
|
|
|
5869
5871
|
// src/provider/env-provider.tsx
|
|
5870
|
-
import { createContext, useContext, useState as
|
|
5872
|
+
import { createContext, useContext, useState as useState4, useCallback as useCallback11 } from "react";
|
|
5871
5873
|
|
|
5872
5874
|
// src/configs/axios-client.ts
|
|
5873
5875
|
import axios from "axios";
|
|
@@ -6218,7 +6220,7 @@ function EnvProvider({
|
|
|
6218
6220
|
localStorageUtils: localStorageUtil = localStorageUtils(),
|
|
6219
6221
|
sessionStorageUtils: sessionStorageUtil = sessionStorageUtils
|
|
6220
6222
|
}) {
|
|
6221
|
-
const [env, setEnvState] =
|
|
6223
|
+
const [env, setEnvState] = useState4({
|
|
6222
6224
|
...initialEnvState,
|
|
6223
6225
|
localStorageUtils: localStorageUtil,
|
|
6224
6226
|
sessionStorageUtils: sessionStorageUtil
|