aq-fe-framework 0.1.202 → 0.1.203

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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  baseAxios_default,
3
3
  useQ_AQ_GetAQModule
4
- } from "./chunk-QR4NSLBN.mjs";
4
+ } from "./chunk-XBRWDG25.mjs";
5
5
  import {
6
6
  createGenericStore
7
7
  } from "./chunk-Y3YGC5IH.mjs";
@@ -1,27 +1,6 @@
1
- // src/hooks/custom-hooks/useC_MutationAction.tsx
2
- import { useQueryClient } from "@tanstack/react-query";
3
-
4
1
  // src/api/baseAxios.ts
5
2
  import axios from "axios";
6
3
  var baseAxios = axios.create();
7
- (async function loadConfig() {
8
- try {
9
- const response = await fetch("/config.json");
10
- if (response.ok) {
11
- const data = await response.json();
12
- if (data.baseURL) {
13
- baseAxios.defaults.baseURL = data.baseURL;
14
- console.log("\u2705 baseURL set to:", data.baseURL);
15
- } else {
16
- console.warn("\u26A0\uFE0F baseURL kh\xF4ng c\xF3 trong config.json");
17
- }
18
- } else {
19
- console.error("\u274C Kh\xF4ng load \u0111\u01B0\u1EE3c config.json");
20
- }
21
- } catch (error) {
22
- console.error("\u274C L\u1ED7i khi t\u1EA3i config.json", error);
23
- }
24
- })();
25
4
  baseAxios.interceptors.request.use(
26
5
  (config) => {
27
6
  var _a, _b;
@@ -37,6 +16,28 @@ baseAxios.interceptors.request.use(
37
16
  );
38
17
  var baseAxios_default = baseAxios;
39
18
 
19
+ // src/hooks/useLoadConfig.ts
20
+ import { useEffect } from "react";
21
+ var useLoadConfig = () => {
22
+ useEffect(() => {
23
+ (async () => {
24
+ try {
25
+ const res = await fetch("/config.json");
26
+ const config = await res.json();
27
+ if (config.baseURL) {
28
+ baseAxios_default.defaults.baseURL = config.baseURL;
29
+ console.log("\u2705 baseURL set to", config.baseURL);
30
+ }
31
+ } catch (err) {
32
+ console.error("\u274C L\u1ED7i khi load config.json:", err);
33
+ }
34
+ })();
35
+ }, []);
36
+ };
37
+
38
+ // src/hooks/custom-hooks/useC_MutationAction.tsx
39
+ import { useQueryClient } from "@tanstack/react-query";
40
+
40
41
  // src/hooks/query/AQ/useQ_AQ_GetAQModule.ts
41
42
  import { useQuery } from "@tanstack/react-query";
42
43
  function useQ_AQ_GetAQModule() {
@@ -66,5 +67,6 @@ function useQ_SkillCenter_GetAll() {
66
67
  export {
67
68
  baseAxios_default,
68
69
  useQ_AQ_GetAQModule,
70
+ useLoadConfig,
69
71
  useQ_SkillCenter_GetAll
70
72
  };
@@ -66,8 +66,8 @@ import {
66
66
  useS_BasicAppShell,
67
67
  useS_ButtonImport,
68
68
  utils_layout_getItemsWithoutLinks
69
- } from "../chunk-KTGRWET4.mjs";
70
- import "../chunk-QR4NSLBN.mjs";
69
+ } from "../chunk-RZDOLASD.mjs";
70
+ import "../chunk-XBRWDG25.mjs";
71
71
  import "../chunk-Y3YGC5IH.mjs";
72
72
  import "../chunk-5U2JSHSJ.mjs";
73
73
  import "../chunk-7ZCOFATU.mjs";
@@ -1,6 +1,8 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { I as IAQModule } from '../IAQModule-XZYlbivW.mjs';
3
3
 
4
+ declare const useLoadConfig: () => void;
5
+
4
6
  declare function useQ_AQ_GetAQModule(): _tanstack_react_query.UseQueryResult<IAQModule, Error>;
5
7
 
6
- export { useQ_AQ_GetAQModule };
8
+ export { useLoadConfig, useQ_AQ_GetAQModule };
@@ -1,8 +1,10 @@
1
1
  import {
2
+ useLoadConfig,
2
3
  useQ_AQ_GetAQModule
3
- } from "../chunk-QR4NSLBN.mjs";
4
+ } from "../chunk-XBRWDG25.mjs";
4
5
  import "../chunk-7ZCOFATU.mjs";
5
6
  import "../chunk-FWCSY2DS.mjs";
6
7
  export {
8
+ useLoadConfig,
7
9
  useQ_AQ_GetAQModule
8
10
  };
@@ -25,12 +25,12 @@ import {
25
25
  useS_BasicAppShell,
26
26
  useS_authenticate,
27
27
  utils_layout_getItemsWithoutLinks
28
- } from "../chunk-KTGRWET4.mjs";
28
+ } from "../chunk-RZDOLASD.mjs";
29
29
  import {
30
30
  baseAxios_default,
31
31
  useQ_AQ_GetAQModule,
32
32
  useQ_SkillCenter_GetAll
33
- } from "../chunk-QR4NSLBN.mjs";
33
+ } from "../chunk-XBRWDG25.mjs";
34
34
  import {
35
35
  createGenericStore
36
36
  } from "../chunk-Y3YGC5IH.mjs";
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "types": "./dist/hooks/index.d.mts"
23
23
  }
24
24
  },
25
- "version": "0.1.202",
25
+ "version": "0.1.203",
26
26
  "private": false,
27
27
  "files": [
28
28
  "dist"
@@ -76,6 +76,7 @@
76
76
  "@tiptap/starter-kit": "^2.9.1",
77
77
  "autoprefixer": "^10.4.20",
78
78
  "axios": "^1.7.7",
79
+ "caniuse-lite": "^1.0.30001718",
79
80
  "clsx": "^2.1.1",
80
81
  "dayjs": "^1.11.13",
81
82
  "docxtemplater": "^3.54.1",