@orbe-agro/client-core 5.6.276 → 5.6.277
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/@ecme/components/template/Footer.js +1 -1
- package/dist/@ecme/services/axios/AxiosBase.js +4 -1
- package/dist/@ecme/services/axios/AxiosBase.js.map +1 -1
- package/dist/@types/@ecme/services/axios/AxiosBase.d.ts.map +1 -1
- package/lib/@ecme/services/axios/AxiosBase.ts +3 -0
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import Container from "../shared/Container.js";
|
|
|
3
3
|
import classNames from "../../utils/classNames.js";
|
|
4
4
|
import { APP_NAME } from "../../constants/app.constant.js";
|
|
5
5
|
import { PAGE_CONTAINER_GUTTER_X } from "../../constants/theme.constant.js";
|
|
6
|
-
const version = true ? "5.6.
|
|
6
|
+
const version = true ? "5.6.277" : "0.0.0";
|
|
7
7
|
const FooterContent = () => {
|
|
8
8
|
return /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-auto items-center justify-between", children: [
|
|
9
9
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -8,7 +8,10 @@ import { getCurrentMicrofrontendId, useLoadingConfigStore } from "../../../base/
|
|
|
8
8
|
import { useThemeStore } from "../../store/themeStore.js";
|
|
9
9
|
const AxiosBase = axios.create({
|
|
10
10
|
timeout: 6e5,
|
|
11
|
-
baseURL: API_URL
|
|
11
|
+
baseURL: API_URL,
|
|
12
|
+
headers: {
|
|
13
|
+
"X-Internal-Request": "true"
|
|
14
|
+
}
|
|
12
15
|
});
|
|
13
16
|
let activeRequests = 0;
|
|
14
17
|
const startGlobalLoading = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AxiosBase.js","sources":["../../../../lib/@ecme/services/axios/AxiosBase.ts"],"sourcesContent":["import type { AxiosError } from \"axios\";\nimport axios from \"axios\";\nimport { API_URL } from \"~/base/configs/api.config\";\nimport { useThemeStore } from \"@/store\";\nimport { useLoadingConfigStore, getCurrentMicrofrontendId } from \"@base/store\";\nimport AxiosRequestIntrceptorConfigCallback from \"./AxiosRequestIntrceptorConfigCallback\";\nimport AxiosResponseIntrceptorErrorCallback from \"./AxiosResponseIntrceptorErrorCallback\";\n\n/**\n * Permite que uma requisição específica seja excluída do loading global\n * (overlay de tela cheia). Útil para chamadas que exibem seu próprio\n * indicador de carregamento — ex.: o chat de IA, que mostra o balãozinho\n * de \"digitando\". Comportamento padrão inalterado: só afeta requisições\n * que marcarem explicitamente `skipGlobalLoading: true`.\n */\ndeclare module \"axios\" {\n interface AxiosRequestConfig {\n skipGlobalLoading?: boolean;\n }\n}\n\nconst AxiosBase = axios.create({\n timeout: 600000,\n baseURL: API_URL,\n});\n\nlet activeRequests = 0;\n\nconst startGlobalLoading = () => {\n const microfrontendId = getCurrentMicrofrontendId();\n const loadingConfig = useLoadingConfigStore.getState();\n if (loadingConfig.getGlobalLoadingEnabled(microfrontendId)) {\n useThemeStore.getState().setLoading(true);\n }\n};\n\nconst stopGlobalLoading = () => {\n const microfrontendId = getCurrentMicrofrontendId();\n const loadingConfig = useLoadingConfigStore.getState();\n if (loadingConfig.getGlobalLoadingEnabled(microfrontendId)) {\n useThemeStore.getState().setLoading(false);\n }\n};\n\nAxiosBase.interceptors.request.use(\n (config) => {\n if (!config.skipGlobalLoading) {\n activeRequests++;\n if (activeRequests === 1) {\n startGlobalLoading();\n }\n }\n return AxiosRequestIntrceptorConfigCallback(config);\n },\n (error) => {\n if (!error?.config?.skipGlobalLoading) {\n activeRequests = Math.max(0, activeRequests - 1);\n if (activeRequests === 0) {\n stopGlobalLoading();\n }\n }\n return Promise.reject(error);\n }\n);\n\nAxiosBase.interceptors.response.use(\n (response) => {\n if (!response.config?.skipGlobalLoading) {\n activeRequests = Math.max(0, activeRequests - 1);\n if (activeRequests === 0) {\n stopGlobalLoading();\n }\n }\n return response;\n },\n (error: AxiosError) => {\n if (!error.config?.skipGlobalLoading) {\n activeRequests = Math.max(0, activeRequests - 1);\n if (activeRequests === 0) {\n stopGlobalLoading();\n }\n }\n AxiosResponseIntrceptorErrorCallback(error);\n return Promise.reject(error);\n }\n);\n\nexport default AxiosBase;\n"],"names":[],"mappings":";;;;;;;;AAqBA,MAAM,YAAY,MAAM,OAAO;AAAA,EAC7B,SAAS;AAAA,EACT,SAAS;
|
|
1
|
+
{"version":3,"file":"AxiosBase.js","sources":["../../../../lib/@ecme/services/axios/AxiosBase.ts"],"sourcesContent":["import type { AxiosError } from \"axios\";\nimport axios from \"axios\";\nimport { API_URL } from \"~/base/configs/api.config\";\nimport { useThemeStore } from \"@/store\";\nimport { useLoadingConfigStore, getCurrentMicrofrontendId } from \"@base/store\";\nimport AxiosRequestIntrceptorConfigCallback from \"./AxiosRequestIntrceptorConfigCallback\";\nimport AxiosResponseIntrceptorErrorCallback from \"./AxiosResponseIntrceptorErrorCallback\";\n\n/**\n * Permite que uma requisição específica seja excluída do loading global\n * (overlay de tela cheia). Útil para chamadas que exibem seu próprio\n * indicador de carregamento — ex.: o chat de IA, que mostra o balãozinho\n * de \"digitando\". Comportamento padrão inalterado: só afeta requisições\n * que marcarem explicitamente `skipGlobalLoading: true`.\n */\ndeclare module \"axios\" {\n interface AxiosRequestConfig {\n skipGlobalLoading?: boolean;\n }\n}\n\nconst AxiosBase = axios.create({\n timeout: 600000,\n baseURL: API_URL,\n headers: {\n 'X-Internal-Request': 'true',\n },\n});\n\nlet activeRequests = 0;\n\nconst startGlobalLoading = () => {\n const microfrontendId = getCurrentMicrofrontendId();\n const loadingConfig = useLoadingConfigStore.getState();\n if (loadingConfig.getGlobalLoadingEnabled(microfrontendId)) {\n useThemeStore.getState().setLoading(true);\n }\n};\n\nconst stopGlobalLoading = () => {\n const microfrontendId = getCurrentMicrofrontendId();\n const loadingConfig = useLoadingConfigStore.getState();\n if (loadingConfig.getGlobalLoadingEnabled(microfrontendId)) {\n useThemeStore.getState().setLoading(false);\n }\n};\n\nAxiosBase.interceptors.request.use(\n (config) => {\n if (!config.skipGlobalLoading) {\n activeRequests++;\n if (activeRequests === 1) {\n startGlobalLoading();\n }\n }\n return AxiosRequestIntrceptorConfigCallback(config);\n },\n (error) => {\n if (!error?.config?.skipGlobalLoading) {\n activeRequests = Math.max(0, activeRequests - 1);\n if (activeRequests === 0) {\n stopGlobalLoading();\n }\n }\n return Promise.reject(error);\n }\n);\n\nAxiosBase.interceptors.response.use(\n (response) => {\n if (!response.config?.skipGlobalLoading) {\n activeRequests = Math.max(0, activeRequests - 1);\n if (activeRequests === 0) {\n stopGlobalLoading();\n }\n }\n return response;\n },\n (error: AxiosError) => {\n if (!error.config?.skipGlobalLoading) {\n activeRequests = Math.max(0, activeRequests - 1);\n if (activeRequests === 0) {\n stopGlobalLoading();\n }\n }\n AxiosResponseIntrceptorErrorCallback(error);\n return Promise.reject(error);\n }\n);\n\nexport default AxiosBase;\n"],"names":[],"mappings":";;;;;;;;AAqBA,MAAM,YAAY,MAAM,OAAO;AAAA,EAC7B,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,IACP,sBAAsB;AAAA,EAAA;AAE1B,CAAC;AAED,IAAI,iBAAiB;AAErB,MAAM,qBAAqB,MAAM;AAC/B,QAAM,kBAAkB,0BAAA;AACxB,QAAM,gBAAgB,sBAAsB,SAAA;AAC5C,MAAI,cAAc,wBAAwB,eAAe,GAAG;AAC1D,kBAAc,SAAA,EAAW,WAAW,IAAI;AAAA,EAC1C;AACF;AAEA,MAAM,oBAAoB,MAAM;AAC9B,QAAM,kBAAkB,0BAAA;AACxB,QAAM,gBAAgB,sBAAsB,SAAA;AAC5C,MAAI,cAAc,wBAAwB,eAAe,GAAG;AAC1D,kBAAc,SAAA,EAAW,WAAW,KAAK;AAAA,EAC3C;AACF;AAEA,UAAU,aAAa,QAAQ;AAAA,EAC7B,CAAC,WAAW;AACV,QAAI,CAAC,OAAO,mBAAmB;AAC7B;AACA,UAAI,mBAAmB,GAAG;AACxB,2BAAA;AAAA,MACF;AAAA,IACF;AACA,WAAO,qCAAqC,MAAM;AAAA,EACpD;AAAA,EACA,CAAC,UAAU;AACT,QAAI,CAAC,OAAO,QAAQ,mBAAmB;AACrC,uBAAiB,KAAK,IAAI,GAAG,iBAAiB,CAAC;AAC/C,UAAI,mBAAmB,GAAG;AACxB,0BAAA;AAAA,MACF;AAAA,IACF;AACA,WAAO,QAAQ,OAAO,KAAK;AAAA,EAC7B;AACF;AAEA,UAAU,aAAa,SAAS;AAAA,EAC9B,CAAC,aAAa;AACZ,QAAI,CAAC,SAAS,QAAQ,mBAAmB;AACvC,uBAAiB,KAAK,IAAI,GAAG,iBAAiB,CAAC;AAC/C,UAAI,mBAAmB,GAAG;AACxB,0BAAA;AAAA,MACF;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAAA,EACA,CAAC,UAAsB;AACrB,QAAI,CAAC,MAAM,QAAQ,mBAAmB;AACpC,uBAAiB,KAAK,IAAI,GAAG,iBAAiB,CAAC;AAC/C,UAAI,mBAAmB,GAAG;AACxB,0BAAA;AAAA,MACF;AAAA,IACF;AACA,yCAAqC,KAAK;AAC1C,WAAO,QAAQ,OAAO,KAAK;AAAA,EAC7B;AACF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AxiosBase.d.ts","sourceRoot":"","sources":["../../../../../lib/@ecme/services/axios/AxiosBase.ts"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,OAAO,QAAQ,OAAO,CAAC;IACrB,UAAU,kBAAkB;QAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC7B;CACF;AAED,QAAA,MAAM,SAAS,+
|
|
1
|
+
{"version":3,"file":"AxiosBase.d.ts","sourceRoot":"","sources":["../../../../../lib/@ecme/services/axios/AxiosBase.ts"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,OAAO,QAAQ,OAAO,CAAC;IACrB,UAAU,kBAAkB;QAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC7B;CACF;AAED,QAAA,MAAM,SAAS,+BAMb,CAAC;AA+DH,eAAe,SAAS,CAAC"}
|
package/package.json
CHANGED