@fctc/interface-logic 2.2.10 → 2.3.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/configs.js +1 -1
- package/dist/configs.mjs +1 -1
- package/dist/environment.js +1 -1
- package/dist/environment.mjs +1 -1
- package/dist/hooks.d.mts +2 -9
- package/dist/hooks.d.ts +2 -9
- package/dist/hooks.js +80 -126
- package/dist/hooks.mjs +50 -95
- package/dist/provider.d.mts +8 -8
- package/dist/provider.d.ts +8 -8
- package/dist/provider.js +81 -126
- package/dist/provider.mjs +51 -96
- package/dist/services.d.mts +1 -7
- package/dist/services.d.ts +1 -7
- package/dist/services.js +41 -73
- package/dist/services.mjs +26 -58
- package/package.json +85 -85
package/dist/services.mjs
CHANGED
|
@@ -2894,11 +2894,8 @@ import { useMutation as useMutation24 } from "@tanstack/react-query";
|
|
|
2894
2894
|
// src/hooks/form/use-upload-file.ts
|
|
2895
2895
|
import { useMutation as useMutation25 } from "@tanstack/react-query";
|
|
2896
2896
|
|
|
2897
|
-
// src/hooks/form/use-save-file.ts
|
|
2898
|
-
import { useMutation as useMutation26 } from "@tanstack/react-query";
|
|
2899
|
-
|
|
2900
2897
|
// src/hooks/model/use-delete.ts
|
|
2901
|
-
import { useMutation as
|
|
2898
|
+
import { useMutation as useMutation26 } from "@tanstack/react-query";
|
|
2902
2899
|
|
|
2903
2900
|
// src/hooks/model/use-get-all.ts
|
|
2904
2901
|
import { useQuery as useQuery6 } from "@tanstack/react-query";
|
|
@@ -2910,7 +2907,7 @@ import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
|
2910
2907
|
import { useQuery as useQuery8 } from "@tanstack/react-query";
|
|
2911
2908
|
|
|
2912
2909
|
// src/hooks/model/use-get-detail.ts
|
|
2913
|
-
import { useMutation as
|
|
2910
|
+
import { useMutation as useMutation27 } from "@tanstack/react-query";
|
|
2914
2911
|
|
|
2915
2912
|
// src/hooks/model/use-get-field-onchange.ts
|
|
2916
2913
|
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
@@ -2919,25 +2916,25 @@ import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
|
2919
2916
|
import { useQuery as useQuery10 } from "@tanstack/react-query";
|
|
2920
2917
|
|
|
2921
2918
|
// src/hooks/model/use-onchange-form.ts
|
|
2922
|
-
import { useMutation as
|
|
2919
|
+
import { useMutation as useMutation28 } from "@tanstack/react-query";
|
|
2923
2920
|
|
|
2924
2921
|
// src/hooks/model/use-save.ts
|
|
2925
|
-
import { useMutation as
|
|
2922
|
+
import { useMutation as useMutation29 } from "@tanstack/react-query";
|
|
2926
2923
|
|
|
2927
2924
|
// src/hooks/user/use-get-profile.ts
|
|
2928
|
-
import { useMutation as
|
|
2925
|
+
import { useMutation as useMutation30 } from "@tanstack/react-query";
|
|
2929
2926
|
|
|
2930
2927
|
// src/hooks/user/use-get-user.ts
|
|
2931
|
-
import { useMutation as
|
|
2928
|
+
import { useMutation as useMutation31 } from "@tanstack/react-query";
|
|
2932
2929
|
|
|
2933
2930
|
// src/hooks/user/use-switch-locale.ts
|
|
2934
|
-
import { useMutation as
|
|
2931
|
+
import { useMutation as useMutation32 } from "@tanstack/react-query";
|
|
2935
2932
|
|
|
2936
2933
|
// src/hooks/view/use-button.ts
|
|
2937
|
-
import { useMutation as
|
|
2934
|
+
import { useMutation as useMutation33 } from "@tanstack/react-query";
|
|
2938
2935
|
|
|
2939
2936
|
// src/hooks/view/use-duplicate-record.ts
|
|
2940
|
-
import { useMutation as
|
|
2937
|
+
import { useMutation as useMutation34 } from "@tanstack/react-query";
|
|
2941
2938
|
|
|
2942
2939
|
// src/hooks/view/use-get-action-detail.ts
|
|
2943
2940
|
import { useQuery as useQuery11 } from "@tanstack/react-query";
|
|
@@ -2955,7 +2952,7 @@ import { useQuery as useQuery14 } from "@tanstack/react-query";
|
|
|
2955
2952
|
import { useQuery as useQuery15 } from "@tanstack/react-query";
|
|
2956
2953
|
|
|
2957
2954
|
// src/hooks/view/use-get-print-report.ts
|
|
2958
|
-
import { useMutation as
|
|
2955
|
+
import { useMutation as useMutation35 } from "@tanstack/react-query";
|
|
2959
2956
|
|
|
2960
2957
|
// src/hooks/view/use-get-progress-bar.ts
|
|
2961
2958
|
import { useQuery as useQuery16 } from "@tanstack/react-query";
|
|
@@ -2967,46 +2964,46 @@ import { useQuery as useQuery17 } from "@tanstack/react-query";
|
|
|
2967
2964
|
import { useQuery as useQuery18 } from "@tanstack/react-query";
|
|
2968
2965
|
|
|
2969
2966
|
// src/hooks/view/use-load-action.ts
|
|
2970
|
-
import { useMutation as
|
|
2967
|
+
import { useMutation as useMutation36 } from "@tanstack/react-query";
|
|
2971
2968
|
|
|
2972
2969
|
// src/hooks/view/use-load-message.ts
|
|
2973
2970
|
import { useQuery as useQuery19 } from "@tanstack/react-query";
|
|
2974
2971
|
|
|
2975
2972
|
// src/hooks/view/use-print.ts
|
|
2976
|
-
import { useMutation as
|
|
2973
|
+
import { useMutation as useMutation37 } from "@tanstack/react-query";
|
|
2977
2974
|
|
|
2978
2975
|
// src/hooks/view/use-remove-row.ts
|
|
2979
|
-
import { useMutation as
|
|
2976
|
+
import { useMutation as useMutation38 } from "@tanstack/react-query";
|
|
2980
2977
|
|
|
2981
2978
|
// src/hooks/view/use-resequence.ts
|
|
2982
2979
|
import { useQuery as useQuery20 } from "@tanstack/react-query";
|
|
2983
2980
|
|
|
2984
2981
|
// src/hooks/view/use-run-action.ts
|
|
2985
|
-
import { useMutation as
|
|
2982
|
+
import { useMutation as useMutation39 } from "@tanstack/react-query";
|
|
2986
2983
|
|
|
2987
2984
|
// src/hooks/view/use-signin-sso.ts
|
|
2988
|
-
import { useMutation as
|
|
2985
|
+
import { useMutation as useMutation40 } from "@tanstack/react-query";
|
|
2989
2986
|
|
|
2990
2987
|
// src/hooks/view/use-verify-2FA.ts
|
|
2991
|
-
import { useMutation as
|
|
2988
|
+
import { useMutation as useMutation41 } from "@tanstack/react-query";
|
|
2992
2989
|
|
|
2993
2990
|
// src/hooks/view/uset-get-2FA-method.ts
|
|
2994
|
-
import { useMutation as
|
|
2991
|
+
import { useMutation as useMutation42 } from "@tanstack/react-query";
|
|
2995
2992
|
|
|
2996
2993
|
// src/hooks/view/use-grant-access.ts
|
|
2997
|
-
import { useMutation as
|
|
2994
|
+
import { useMutation as useMutation43 } from "@tanstack/react-query";
|
|
2998
2995
|
|
|
2999
2996
|
// src/hooks/view/use-remove-totp-setup.ts
|
|
3000
|
-
import { useMutation as
|
|
2997
|
+
import { useMutation as useMutation44 } from "@tanstack/react-query";
|
|
3001
2998
|
|
|
3002
2999
|
// src/hooks/view/use-request-setup-totp.ts
|
|
3003
|
-
import { useMutation as
|
|
3000
|
+
import { useMutation as useMutation45 } from "@tanstack/react-query";
|
|
3004
3001
|
|
|
3005
3002
|
// src/hooks/view/use-settings-web-read-2fa.ts
|
|
3006
|
-
import { useMutation as
|
|
3003
|
+
import { useMutation as useMutation46 } from "@tanstack/react-query";
|
|
3007
3004
|
|
|
3008
3005
|
// src/hooks/view/use-verify-totp.ts
|
|
3009
|
-
import { useMutation as
|
|
3006
|
+
import { useMutation as useMutation47 } from "@tanstack/react-query";
|
|
3010
3007
|
|
|
3011
3008
|
// src/provider/service-provider.tsx
|
|
3012
3009
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
@@ -3705,35 +3702,6 @@ function useFormService() {
|
|
|
3705
3702
|
},
|
|
3706
3703
|
[env]
|
|
3707
3704
|
);
|
|
3708
|
-
const saveFile = useCallback6(
|
|
3709
|
-
async ({
|
|
3710
|
-
model,
|
|
3711
|
-
idForm,
|
|
3712
|
-
idFile,
|
|
3713
|
-
context
|
|
3714
|
-
}) => {
|
|
3715
|
-
const jsonData = {
|
|
3716
|
-
model,
|
|
3717
|
-
method: "web_save" /* WEB_SAVE */,
|
|
3718
|
-
ids: [
|
|
3719
|
-
[idForm],
|
|
3720
|
-
{
|
|
3721
|
-
attachment_ids: [[4, idFile]]
|
|
3722
|
-
}
|
|
3723
|
-
],
|
|
3724
|
-
kwargs: {
|
|
3725
|
-
context,
|
|
3726
|
-
specification: {}
|
|
3727
|
-
}
|
|
3728
|
-
};
|
|
3729
|
-
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3730
|
-
headers: {
|
|
3731
|
-
"Content-Type": "application/json"
|
|
3732
|
-
}
|
|
3733
|
-
});
|
|
3734
|
-
},
|
|
3735
|
-
[env]
|
|
3736
|
-
);
|
|
3737
3705
|
const getFormView = useCallback6(
|
|
3738
3706
|
async ({ data }) => {
|
|
3739
3707
|
const jsonData = {
|
|
@@ -3787,8 +3755,7 @@ function useFormService() {
|
|
|
3787
3755
|
uploadImage,
|
|
3788
3756
|
getFormView,
|
|
3789
3757
|
changeStatus,
|
|
3790
|
-
uploadFile
|
|
3791
|
-
saveFile
|
|
3758
|
+
uploadFile
|
|
3792
3759
|
};
|
|
3793
3760
|
}
|
|
3794
3761
|
|
|
@@ -4341,7 +4308,8 @@ function useViewService() {
|
|
|
4341
4308
|
[env]
|
|
4342
4309
|
);
|
|
4343
4310
|
const getMenu = useCallback10(
|
|
4344
|
-
async (context, specification) => {
|
|
4311
|
+
async (context, specification, domain) => {
|
|
4312
|
+
console.log("domain", domain);
|
|
4345
4313
|
const jsonData = {
|
|
4346
4314
|
model: "ir.ui.menu" /* MENU */,
|
|
4347
4315
|
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
@@ -4349,7 +4317,7 @@ function useViewService() {
|
|
|
4349
4317
|
with_context: context,
|
|
4350
4318
|
kwargs: {
|
|
4351
4319
|
specification,
|
|
4352
|
-
domain: [
|
|
4320
|
+
domain: domain ?? [
|
|
4353
4321
|
"&",
|
|
4354
4322
|
["is_display", "=", true],
|
|
4355
4323
|
"&",
|
package/package.json
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@fctc/interface-logic",
|
|
3
|
-
"version": "2.
|
|
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.3.0",
|
|
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
|
+
}
|