@fctc/interface-logic 2.2.4 → 2.2.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/services.mjs CHANGED
@@ -14,7 +14,8 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
14
14
  UriConstants2["LOAD_ACTION"] = `/load_action`;
15
15
  UriConstants2["REPORT_PATH"] = `/report`;
16
16
  UriConstants2["RUN_ACTION_PATH"] = `/run_action`;
17
- UriConstants2["UPLOAD_FILE_PATH"] = `/upload/file`;
17
+ UriConstants2["UPLOAD_FILE_EXCEL_PATH"] = `/upload/file`;
18
+ UriConstants2["UPLOAD_FILE_PATH"] = `/web/binary/upload_attachment`;
18
19
  UriConstants2["GET_MESSAGE"] = `/chatter/thread/messages`;
19
20
  UriConstants2["SENT_MESSAGE"] = `/chatter/message/post`;
20
21
  UriConstants2["UPLOAD_IMAGE"] = `/mail/attachment/upload`;
@@ -2860,7 +2861,7 @@ import { useQuery as useQuery2 } from "@tanstack/react-query";
2860
2861
  // src/hooks/excel/use-parse-preview.ts
2861
2862
  import { useMutation as useMutation17 } from "@tanstack/react-query";
2862
2863
 
2863
- // src/hooks/excel/use-upload-file.ts
2864
+ // src/hooks/excel/use-upload-file-excel.ts
2864
2865
  import { useMutation as useMutation18 } from "@tanstack/react-query";
2865
2866
 
2866
2867
  // src/hooks/excel/use-upload-id-file.ts
@@ -2890,9 +2891,12 @@ import { useMutation as useMutation23 } from "@tanstack/react-query";
2890
2891
  // src/hooks/form/use-upload-image.ts
2891
2892
  import { useMutation as useMutation24 } from "@tanstack/react-query";
2892
2893
 
2893
- // src/hooks/model/use-delete.ts
2894
+ // src/hooks/form/use-upload-file.ts
2894
2895
  import { useMutation as useMutation25 } from "@tanstack/react-query";
2895
2896
 
2897
+ // src/hooks/model/use-delete.ts
2898
+ import { useMutation as useMutation26 } from "@tanstack/react-query";
2899
+
2896
2900
  // src/hooks/model/use-get-all.ts
2897
2901
  import { useQuery as useQuery6 } from "@tanstack/react-query";
2898
2902
 
@@ -2903,7 +2907,7 @@ import { useQuery as useQuery7 } from "@tanstack/react-query";
2903
2907
  import { useQuery as useQuery8 } from "@tanstack/react-query";
2904
2908
 
2905
2909
  // src/hooks/model/use-get-detail.ts
2906
- import { useMutation as useMutation26 } from "@tanstack/react-query";
2910
+ import { useMutation as useMutation27 } from "@tanstack/react-query";
2907
2911
 
2908
2912
  // src/hooks/model/use-get-field-onchange.ts
2909
2913
  import { useQuery as useQuery9 } from "@tanstack/react-query";
@@ -2912,25 +2916,25 @@ import { useQuery as useQuery9 } from "@tanstack/react-query";
2912
2916
  import { useQuery as useQuery10 } from "@tanstack/react-query";
2913
2917
 
2914
2918
  // src/hooks/model/use-onchange-form.ts
2915
- import { useMutation as useMutation27 } from "@tanstack/react-query";
2919
+ import { useMutation as useMutation28 } from "@tanstack/react-query";
2916
2920
 
2917
2921
  // src/hooks/model/use-save.ts
2918
- import { useMutation as useMutation28 } from "@tanstack/react-query";
2922
+ import { useMutation as useMutation29 } from "@tanstack/react-query";
2919
2923
 
2920
2924
  // src/hooks/user/use-get-profile.ts
2921
- import { useMutation as useMutation29 } from "@tanstack/react-query";
2925
+ import { useMutation as useMutation30 } from "@tanstack/react-query";
2922
2926
 
2923
2927
  // src/hooks/user/use-get-user.ts
2924
- import { useMutation as useMutation30 } from "@tanstack/react-query";
2928
+ import { useMutation as useMutation31 } from "@tanstack/react-query";
2925
2929
 
2926
2930
  // src/hooks/user/use-switch-locale.ts
2927
- import { useMutation as useMutation31 } from "@tanstack/react-query";
2931
+ import { useMutation as useMutation32 } from "@tanstack/react-query";
2928
2932
 
2929
2933
  // src/hooks/view/use-button.ts
2930
- import { useMutation as useMutation32 } from "@tanstack/react-query";
2934
+ import { useMutation as useMutation33 } from "@tanstack/react-query";
2931
2935
 
2932
2936
  // src/hooks/view/use-duplicate-record.ts
2933
- import { useMutation as useMutation33 } from "@tanstack/react-query";
2937
+ import { useMutation as useMutation34 } from "@tanstack/react-query";
2934
2938
 
2935
2939
  // src/hooks/view/use-get-action-detail.ts
2936
2940
  import { useQuery as useQuery11 } from "@tanstack/react-query";
@@ -2948,7 +2952,7 @@ import { useQuery as useQuery14 } from "@tanstack/react-query";
2948
2952
  import { useQuery as useQuery15 } from "@tanstack/react-query";
2949
2953
 
2950
2954
  // src/hooks/view/use-get-print-report.ts
2951
- import { useMutation as useMutation34 } from "@tanstack/react-query";
2955
+ import { useMutation as useMutation35 } from "@tanstack/react-query";
2952
2956
 
2953
2957
  // src/hooks/view/use-get-progress-bar.ts
2954
2958
  import { useQuery as useQuery16 } from "@tanstack/react-query";
@@ -2960,46 +2964,46 @@ import { useQuery as useQuery17 } from "@tanstack/react-query";
2960
2964
  import { useQuery as useQuery18 } from "@tanstack/react-query";
2961
2965
 
2962
2966
  // src/hooks/view/use-load-action.ts
2963
- import { useMutation as useMutation35 } from "@tanstack/react-query";
2967
+ import { useMutation as useMutation36 } from "@tanstack/react-query";
2964
2968
 
2965
2969
  // src/hooks/view/use-load-message.ts
2966
2970
  import { useQuery as useQuery19 } from "@tanstack/react-query";
2967
2971
 
2968
2972
  // src/hooks/view/use-print.ts
2969
- import { useMutation as useMutation36 } from "@tanstack/react-query";
2973
+ import { useMutation as useMutation37 } from "@tanstack/react-query";
2970
2974
 
2971
2975
  // src/hooks/view/use-remove-row.ts
2972
- import { useMutation as useMutation37 } from "@tanstack/react-query";
2976
+ import { useMutation as useMutation38 } from "@tanstack/react-query";
2973
2977
 
2974
2978
  // src/hooks/view/use-resequence.ts
2975
2979
  import { useQuery as useQuery20 } from "@tanstack/react-query";
2976
2980
 
2977
2981
  // src/hooks/view/use-run-action.ts
2978
- import { useMutation as useMutation38 } from "@tanstack/react-query";
2982
+ import { useMutation as useMutation39 } from "@tanstack/react-query";
2979
2983
 
2980
2984
  // src/hooks/view/use-signin-sso.ts
2981
- import { useMutation as useMutation39 } from "@tanstack/react-query";
2985
+ import { useMutation as useMutation40 } from "@tanstack/react-query";
2982
2986
 
2983
2987
  // src/hooks/view/use-verify-2FA.ts
2984
- import { useMutation as useMutation40 } from "@tanstack/react-query";
2988
+ import { useMutation as useMutation41 } from "@tanstack/react-query";
2985
2989
 
2986
2990
  // src/hooks/view/uset-get-2FA-method.ts
2987
- import { useMutation as useMutation41 } from "@tanstack/react-query";
2991
+ import { useMutation as useMutation42 } from "@tanstack/react-query";
2988
2992
 
2989
2993
  // src/hooks/view/use-grant-access.ts
2990
- import { useMutation as useMutation42 } from "@tanstack/react-query";
2994
+ import { useMutation as useMutation43 } from "@tanstack/react-query";
2991
2995
 
2992
2996
  // src/hooks/view/use-remove-totp-setup.ts
2993
- import { useMutation as useMutation43 } from "@tanstack/react-query";
2997
+ import { useMutation as useMutation44 } from "@tanstack/react-query";
2994
2998
 
2995
2999
  // src/hooks/view/use-request-setup-totp.ts
2996
- import { useMutation as useMutation44 } from "@tanstack/react-query";
3000
+ import { useMutation as useMutation45 } from "@tanstack/react-query";
2997
3001
 
2998
3002
  // src/hooks/view/use-settings-web-read-2fa.ts
2999
- import { useMutation as useMutation45 } from "@tanstack/react-query";
3003
+ import { useMutation as useMutation46 } from "@tanstack/react-query";
3000
3004
 
3001
3005
  // src/hooks/view/use-verify-totp.ts
3002
- import { useMutation as useMutation46 } from "@tanstack/react-query";
3006
+ import { useMutation as useMutation47 } from "@tanstack/react-query";
3003
3007
 
3004
3008
  // src/provider/service-provider.tsx
3005
3009
  import { jsx as jsx6 } from "react/jsx-runtime";
@@ -3441,15 +3445,15 @@ function useCompanyService() {
3441
3445
  import { useCallback as useCallback5 } from "react";
3442
3446
  function useExcelService() {
3443
3447
  const { env } = useEnv();
3444
- const uploadFile = useCallback5(
3448
+ const uploadFileExcel = useCallback5(
3445
3449
  async ({ formData }) => {
3446
- return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData);
3450
+ return env.requests.post("/upload/file" /* UPLOAD_FILE_EXCEL_PATH */, formData);
3447
3451
  },
3448
3452
  [env]
3449
3453
  );
3450
3454
  const uploadIdFile = useCallback5(
3451
3455
  async ({ formData }) => {
3452
- return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData, {
3456
+ return env.requests.post("/upload/file" /* UPLOAD_FILE_EXCEL_PATH */, formData, {
3453
3457
  headers: {
3454
3458
  "Content-Type": "multipart/form-data"
3455
3459
  }
@@ -3597,7 +3601,7 @@ function useExcelService() {
3597
3601
  [env]
3598
3602
  );
3599
3603
  return {
3600
- uploadFile,
3604
+ uploadFileExcel,
3601
3605
  uploadIdFile,
3602
3606
  parsePreview,
3603
3607
  executeImport,
@@ -3692,6 +3696,12 @@ function useFormService() {
3692
3696
  },
3693
3697
  [env]
3694
3698
  );
3699
+ const uploadFile = useCallback6(
3700
+ async ({ formData }) => {
3701
+ return env.requests.post("/web/binary/upload_attachment" /* UPLOAD_FILE_PATH */, formData);
3702
+ },
3703
+ [env]
3704
+ );
3695
3705
  const getFormView = useCallback6(
3696
3706
  async ({ data }) => {
3697
3707
  const jsonData = {
@@ -3744,7 +3754,8 @@ function useFormService() {
3744
3754
  getImage,
3745
3755
  uploadImage,
3746
3756
  getFormView,
3747
- changeStatus
3757
+ changeStatus,
3758
+ uploadFile
3748
3759
  };
3749
3760
  }
3750
3761
 
package/package.json CHANGED
@@ -1,85 +1,85 @@
1
- {
2
- "name": "@fctc/interface-logic",
3
- "version": "2.2.4",
4
- "types": "dist/index.d.ts",
5
- "main": "dist/index.cjs",
6
- "module": "dist/index.mjs",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "import": "./dist/index.mjs",
11
- "require": "./dist/index.cjs"
12
- },
13
- "./configs": {
14
- "types": "./dist/configs.d.ts",
15
- "import": "./dist/configs.mjs",
16
- "require": "./dist/configs.cjs"
17
- },
18
- "./constants": {
19
- "types": "./dist/constants.d.ts",
20
- "import": "./dist/constants.mjs",
21
- "require": "./dist/constants.cjs"
22
- },
23
- "./environment": {
24
- "types": "./dist/environment.d.ts",
25
- "import": "./dist/environment.mjs",
26
- "require": "./dist/environment.cjs"
27
- },
28
- "./hooks": {
29
- "types": "./dist/hooks.d.ts",
30
- "import": "./dist/hooks.mjs",
31
- "require": "./dist/hooks.cjs"
32
- },
33
- "./provider": {
34
- "types": "./dist/provider.d.ts",
35
- "import": "./dist/provider.mjs",
36
- "require": "./dist/provider.cjs"
37
- },
38
- "./services": {
39
- "types": "./dist/services.d.ts",
40
- "import": "./dist/services.mjs",
41
- "require": "./dist/services.cjs"
42
- },
43
- "./store": {
44
- "types": "./dist/store.d.ts",
45
- "import": "./dist/store.mjs",
46
- "require": "./dist/store.cjs"
47
- },
48
- "./utils": {
49
- "types": "./dist/utils.d.ts",
50
- "import": "./dist/utils.mjs",
51
- "require": "./dist/utils.cjs"
52
- },
53
- "./types": {
54
- "types": "./dist/types.d.ts",
55
- "import": "./dist/types.mjs",
56
- "require": "./dist/types.cjs"
57
- }
58
- },
59
- "files": [
60
- "dist"
61
- ],
62
- "scripts": {
63
- "build": "tsup",
64
- "test": "jest"
65
- },
66
- "peerDependencies": {
67
- "react": "18.0.0",
68
- "@tanstack/react-query": "^5.83.0"
69
- },
70
- "dependencies": {
71
- "@reduxjs/toolkit": "^2.8.2",
72
- "@tanstack/react-query": "^5.83.0",
73
- "axios": "^1.11.0",
74
- "moment": "^2.30.1",
75
- "react-redux": "^9.2.0"
76
- },
77
- "devDependencies": {
78
- "@types/react": "^18.3.1",
79
- "react": "18.0.0",
80
- "jest": "^29.7.0",
81
- "tsup": "^8.0.0",
82
- "typescript": "^5.8.2"
83
- },
84
- "packageManager": "yarn@1.22.0"
85
- }
1
+ {
2
+ "name": "@fctc/interface-logic",
3
+ "version": "2.2.5",
4
+ "types": "dist/index.d.ts",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.mjs",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.cjs"
12
+ },
13
+ "./configs": {
14
+ "types": "./dist/configs.d.ts",
15
+ "import": "./dist/configs.mjs",
16
+ "require": "./dist/configs.cjs"
17
+ },
18
+ "./constants": {
19
+ "types": "./dist/constants.d.ts",
20
+ "import": "./dist/constants.mjs",
21
+ "require": "./dist/constants.cjs"
22
+ },
23
+ "./environment": {
24
+ "types": "./dist/environment.d.ts",
25
+ "import": "./dist/environment.mjs",
26
+ "require": "./dist/environment.cjs"
27
+ },
28
+ "./hooks": {
29
+ "types": "./dist/hooks.d.ts",
30
+ "import": "./dist/hooks.mjs",
31
+ "require": "./dist/hooks.cjs"
32
+ },
33
+ "./provider": {
34
+ "types": "./dist/provider.d.ts",
35
+ "import": "./dist/provider.mjs",
36
+ "require": "./dist/provider.cjs"
37
+ },
38
+ "./services": {
39
+ "types": "./dist/services.d.ts",
40
+ "import": "./dist/services.mjs",
41
+ "require": "./dist/services.cjs"
42
+ },
43
+ "./store": {
44
+ "types": "./dist/store.d.ts",
45
+ "import": "./dist/store.mjs",
46
+ "require": "./dist/store.cjs"
47
+ },
48
+ "./utils": {
49
+ "types": "./dist/utils.d.ts",
50
+ "import": "./dist/utils.mjs",
51
+ "require": "./dist/utils.cjs"
52
+ },
53
+ "./types": {
54
+ "types": "./dist/types.d.ts",
55
+ "import": "./dist/types.mjs",
56
+ "require": "./dist/types.cjs"
57
+ }
58
+ },
59
+ "files": [
60
+ "dist"
61
+ ],
62
+ "scripts": {
63
+ "build": "tsup",
64
+ "test": "jest"
65
+ },
66
+ "peerDependencies": {
67
+ "react": "18.0.0",
68
+ "@tanstack/react-query": "^5.83.0"
69
+ },
70
+ "dependencies": {
71
+ "@reduxjs/toolkit": "^2.8.2",
72
+ "@tanstack/react-query": "^5.83.0",
73
+ "axios": "^1.11.0",
74
+ "moment": "^2.30.1",
75
+ "react-redux": "^9.2.0"
76
+ },
77
+ "devDependencies": {
78
+ "@types/react": "^18.3.1",
79
+ "react": "18.0.0",
80
+ "jest": "^29.7.0",
81
+ "tsup": "^8.0.0",
82
+ "typescript": "^5.8.2"
83
+ },
84
+ "packageManager": "yarn@1.22.0"
85
+ }