@fctc/interface-logic 2.3.2 → 2.3.3
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.d.mts +6 -6
- package/dist/configs.d.ts +6 -6
- package/dist/configs.js +18 -48
- package/dist/configs.mjs +18 -48
- package/dist/constants.d.mts +1 -3
- package/dist/constants.d.ts +1 -3
- package/dist/constants.js +1 -3
- package/dist/constants.mjs +1 -3
- package/dist/environment.js +18 -48
- package/dist/environment.mjs +18 -48
- package/dist/hooks.d.mts +8 -22
- package/dist/hooks.d.ts +8 -22
- package/dist/hooks.js +201 -321
- package/dist/hooks.mjs +172 -291
- package/dist/provider.d.mts +3 -5
- package/dist/provider.d.ts +3 -5
- package/dist/provider.js +221 -370
- package/dist/provider.mjs +192 -341
- package/dist/services.d.mts +17 -28
- package/dist/services.d.ts +17 -28
- package/dist/services.js +128 -218
- package/dist/services.mjs +114 -204
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utils.d.mts +2 -1
- package/dist/utils.d.ts +2 -1
- package/dist/utils.js +3 -2
- package/dist/utils.mjs +3 -2
- package/dist/{view-type-p4JdAOsz.d.mts → view-type-BGJfDe73.d.mts} +0 -5
- package/dist/{view-type-p4JdAOsz.d.ts → view-type-BGJfDe73.d.ts} +0 -5
- package/package.json +85 -85
package/dist/services.mjs
CHANGED
|
@@ -14,8 +14,7 @@ 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["
|
|
18
|
-
UriConstants2["UPLOAD_FILE_PATH"] = `/web/binary/upload_attachment`;
|
|
17
|
+
UriConstants2["UPLOAD_FILE_PATH"] = `/upload/file`;
|
|
19
18
|
UriConstants2["GET_MESSAGE"] = `/chatter/thread/messages`;
|
|
20
19
|
UriConstants2["SENT_MESSAGE"] = `/chatter/message/post`;
|
|
21
20
|
UriConstants2["UPLOAD_IMAGE"] = `/mail/attachment/upload`;
|
|
@@ -23,7 +22,6 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
23
22
|
UriConstants2["IMAGE_PATH"] = `/web/image`;
|
|
24
23
|
UriConstants2["LOAD_MESSAGE"] = `/load_message_failures`;
|
|
25
24
|
UriConstants2["TOKEN"] = `/check_token`;
|
|
26
|
-
UriConstants2["VALIDATE_ACTION_TOKEN"] = `/action-token/validate`;
|
|
27
25
|
UriConstants2["CREATE_UPDATE_PATH"] = `/create_update`;
|
|
28
26
|
UriConstants2["TWOFA_METHOD_PATH"] = `/id/api/v2/call`;
|
|
29
27
|
UriConstants2["SIGNIN_SSO"] = `/signin-sso/oauth`;
|
|
@@ -2861,7 +2859,7 @@ import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
|
2861
2859
|
// src/hooks/excel/use-parse-preview.ts
|
|
2862
2860
|
import { useMutation as useMutation17 } from "@tanstack/react-query";
|
|
2863
2861
|
|
|
2864
|
-
// src/hooks/excel/use-upload-file
|
|
2862
|
+
// src/hooks/excel/use-upload-file.ts
|
|
2865
2863
|
import { useMutation as useMutation18 } from "@tanstack/react-query";
|
|
2866
2864
|
|
|
2867
2865
|
// src/hooks/excel/use-upload-id-file.ts
|
|
@@ -2891,11 +2889,8 @@ import { useMutation as useMutation23 } from "@tanstack/react-query";
|
|
|
2891
2889
|
// src/hooks/form/use-upload-image.ts
|
|
2892
2890
|
import { useMutation as useMutation24 } from "@tanstack/react-query";
|
|
2893
2891
|
|
|
2894
|
-
// src/hooks/form/use-upload-file.ts
|
|
2895
|
-
import { useMutation as useMutation25 } from "@tanstack/react-query";
|
|
2896
|
-
|
|
2897
2892
|
// src/hooks/model/use-delete.ts
|
|
2898
|
-
import { useMutation as
|
|
2893
|
+
import { useMutation as useMutation25 } from "@tanstack/react-query";
|
|
2899
2894
|
|
|
2900
2895
|
// src/hooks/model/use-get-all.ts
|
|
2901
2896
|
import { useQuery as useQuery6 } from "@tanstack/react-query";
|
|
@@ -2907,7 +2902,7 @@ import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
|
2907
2902
|
import { useQuery as useQuery8 } from "@tanstack/react-query";
|
|
2908
2903
|
|
|
2909
2904
|
// src/hooks/model/use-get-detail.ts
|
|
2910
|
-
import { useMutation as
|
|
2905
|
+
import { useMutation as useMutation26 } from "@tanstack/react-query";
|
|
2911
2906
|
|
|
2912
2907
|
// src/hooks/model/use-get-field-onchange.ts
|
|
2913
2908
|
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
@@ -2916,25 +2911,25 @@ import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
|
2916
2911
|
import { useQuery as useQuery10 } from "@tanstack/react-query";
|
|
2917
2912
|
|
|
2918
2913
|
// src/hooks/model/use-onchange-form.ts
|
|
2919
|
-
import { useMutation as
|
|
2914
|
+
import { useMutation as useMutation27 } from "@tanstack/react-query";
|
|
2920
2915
|
|
|
2921
2916
|
// src/hooks/model/use-save.ts
|
|
2922
|
-
import { useMutation as
|
|
2917
|
+
import { useMutation as useMutation28 } from "@tanstack/react-query";
|
|
2923
2918
|
|
|
2924
2919
|
// src/hooks/user/use-get-profile.ts
|
|
2925
|
-
import { useMutation as
|
|
2920
|
+
import { useMutation as useMutation29 } from "@tanstack/react-query";
|
|
2926
2921
|
|
|
2927
2922
|
// src/hooks/user/use-get-user.ts
|
|
2928
|
-
import { useMutation as
|
|
2923
|
+
import { useMutation as useMutation30 } from "@tanstack/react-query";
|
|
2929
2924
|
|
|
2930
2925
|
// src/hooks/user/use-switch-locale.ts
|
|
2931
|
-
import { useMutation as
|
|
2926
|
+
import { useMutation as useMutation31 } from "@tanstack/react-query";
|
|
2932
2927
|
|
|
2933
2928
|
// src/hooks/view/use-button.ts
|
|
2934
|
-
import { useMutation as
|
|
2929
|
+
import { useMutation as useMutation32 } from "@tanstack/react-query";
|
|
2935
2930
|
|
|
2936
2931
|
// src/hooks/view/use-duplicate-record.ts
|
|
2937
|
-
import { useMutation as
|
|
2932
|
+
import { useMutation as useMutation33 } from "@tanstack/react-query";
|
|
2938
2933
|
|
|
2939
2934
|
// src/hooks/view/use-get-action-detail.ts
|
|
2940
2935
|
import { useQuery as useQuery11 } from "@tanstack/react-query";
|
|
@@ -2946,13 +2941,13 @@ import { useQuery as useQuery12 } from "@tanstack/react-query";
|
|
|
2946
2941
|
import { useQuery as useQuery13 } from "@tanstack/react-query";
|
|
2947
2942
|
|
|
2948
2943
|
// src/hooks/view/use-get-list-data.ts
|
|
2949
|
-
import {
|
|
2944
|
+
import { useQuery as useQuery14 } from "@tanstack/react-query";
|
|
2950
2945
|
|
|
2951
2946
|
// src/hooks/view/use-get-menu.ts
|
|
2952
2947
|
import { useQuery as useQuery15 } from "@tanstack/react-query";
|
|
2953
2948
|
|
|
2954
2949
|
// src/hooks/view/use-get-print-report.ts
|
|
2955
|
-
import { useMutation as
|
|
2950
|
+
import { useMutation as useMutation34 } from "@tanstack/react-query";
|
|
2956
2951
|
|
|
2957
2952
|
// src/hooks/view/use-get-progress-bar.ts
|
|
2958
2953
|
import { useQuery as useQuery16 } from "@tanstack/react-query";
|
|
@@ -2964,46 +2959,46 @@ import { useQuery as useQuery17 } from "@tanstack/react-query";
|
|
|
2964
2959
|
import { useQuery as useQuery18 } from "@tanstack/react-query";
|
|
2965
2960
|
|
|
2966
2961
|
// src/hooks/view/use-load-action.ts
|
|
2967
|
-
import { useMutation as
|
|
2962
|
+
import { useMutation as useMutation35 } from "@tanstack/react-query";
|
|
2968
2963
|
|
|
2969
2964
|
// src/hooks/view/use-load-message.ts
|
|
2970
2965
|
import { useQuery as useQuery19 } from "@tanstack/react-query";
|
|
2971
2966
|
|
|
2972
2967
|
// src/hooks/view/use-print.ts
|
|
2973
|
-
import { useMutation as
|
|
2968
|
+
import { useMutation as useMutation36 } from "@tanstack/react-query";
|
|
2974
2969
|
|
|
2975
2970
|
// src/hooks/view/use-remove-row.ts
|
|
2976
|
-
import { useMutation as
|
|
2971
|
+
import { useMutation as useMutation37 } from "@tanstack/react-query";
|
|
2977
2972
|
|
|
2978
2973
|
// src/hooks/view/use-resequence.ts
|
|
2979
2974
|
import { useQuery as useQuery20 } from "@tanstack/react-query";
|
|
2980
2975
|
|
|
2981
2976
|
// src/hooks/view/use-run-action.ts
|
|
2982
|
-
import { useMutation as
|
|
2977
|
+
import { useMutation as useMutation38 } from "@tanstack/react-query";
|
|
2983
2978
|
|
|
2984
2979
|
// src/hooks/view/use-signin-sso.ts
|
|
2985
|
-
import { useMutation as
|
|
2980
|
+
import { useMutation as useMutation39 } from "@tanstack/react-query";
|
|
2986
2981
|
|
|
2987
2982
|
// src/hooks/view/use-verify-2FA.ts
|
|
2988
|
-
import { useMutation as
|
|
2983
|
+
import { useMutation as useMutation40 } from "@tanstack/react-query";
|
|
2989
2984
|
|
|
2990
2985
|
// src/hooks/view/uset-get-2FA-method.ts
|
|
2991
|
-
import { useMutation as
|
|
2986
|
+
import { useMutation as useMutation41 } from "@tanstack/react-query";
|
|
2992
2987
|
|
|
2993
2988
|
// src/hooks/view/use-grant-access.ts
|
|
2994
|
-
import { useMutation as
|
|
2989
|
+
import { useMutation as useMutation42 } from "@tanstack/react-query";
|
|
2995
2990
|
|
|
2996
2991
|
// src/hooks/view/use-remove-totp-setup.ts
|
|
2997
|
-
import { useMutation as
|
|
2992
|
+
import { useMutation as useMutation43 } from "@tanstack/react-query";
|
|
2998
2993
|
|
|
2999
2994
|
// src/hooks/view/use-request-setup-totp.ts
|
|
3000
|
-
import { useMutation as
|
|
2995
|
+
import { useMutation as useMutation44 } from "@tanstack/react-query";
|
|
3001
2996
|
|
|
3002
2997
|
// src/hooks/view/use-settings-web-read-2fa.ts
|
|
3003
|
-
import { useMutation as
|
|
2998
|
+
import { useMutation as useMutation45 } from "@tanstack/react-query";
|
|
3004
2999
|
|
|
3005
3000
|
// src/hooks/view/use-verify-totp.ts
|
|
3006
|
-
import { useMutation as
|
|
3001
|
+
import { useMutation as useMutation46 } from "@tanstack/react-query";
|
|
3007
3002
|
|
|
3008
3003
|
// src/provider/service-provider.tsx
|
|
3009
3004
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
@@ -3019,21 +3014,15 @@ function useActionService() {
|
|
|
3019
3014
|
const loadAction = useCallback2(
|
|
3020
3015
|
async ({
|
|
3021
3016
|
idAction,
|
|
3022
|
-
context
|
|
3023
|
-
service
|
|
3017
|
+
context
|
|
3024
3018
|
}) => {
|
|
3025
3019
|
const jsonData = {
|
|
3026
3020
|
action_id: idAction,
|
|
3027
3021
|
with_context: { ...context }
|
|
3028
3022
|
};
|
|
3029
|
-
return env.requests.post(
|
|
3030
|
-
"/
|
|
3031
|
-
|
|
3032
|
-
{
|
|
3033
|
-
headers: { "Content-Type": "application/json" }
|
|
3034
|
-
},
|
|
3035
|
-
service
|
|
3036
|
-
);
|
|
3023
|
+
return env.requests.post("/load_action" /* LOAD_ACTION */, jsonData, {
|
|
3024
|
+
headers: { "Content-Type": "application/json" }
|
|
3025
|
+
});
|
|
3037
3026
|
},
|
|
3038
3027
|
[env]
|
|
3039
3028
|
);
|
|
@@ -3042,8 +3031,7 @@ function useActionService() {
|
|
|
3042
3031
|
model,
|
|
3043
3032
|
ids = [],
|
|
3044
3033
|
context,
|
|
3045
|
-
method
|
|
3046
|
-
service
|
|
3034
|
+
method
|
|
3047
3035
|
}) => {
|
|
3048
3036
|
try {
|
|
3049
3037
|
const jsonData = {
|
|
@@ -3052,14 +3040,9 @@ function useActionService() {
|
|
|
3052
3040
|
ids,
|
|
3053
3041
|
with_context: context
|
|
3054
3042
|
};
|
|
3055
|
-
return env.requests.post(
|
|
3056
|
-
"/
|
|
3057
|
-
|
|
3058
|
-
{
|
|
3059
|
-
headers: { "Content-Type": "application/json" }
|
|
3060
|
-
},
|
|
3061
|
-
service
|
|
3062
|
-
);
|
|
3043
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3044
|
+
headers: { "Content-Type": "application/json" }
|
|
3045
|
+
});
|
|
3063
3046
|
} catch (error) {
|
|
3064
3047
|
console.error("Error when calling button action:", error);
|
|
3065
3048
|
throw error;
|
|
@@ -3071,8 +3054,7 @@ function useActionService() {
|
|
|
3071
3054
|
async ({
|
|
3072
3055
|
model,
|
|
3073
3056
|
ids,
|
|
3074
|
-
context
|
|
3075
|
-
service
|
|
3057
|
+
context
|
|
3076
3058
|
}) => {
|
|
3077
3059
|
const jsonData = {
|
|
3078
3060
|
model,
|
|
@@ -3080,14 +3062,9 @@ function useActionService() {
|
|
|
3080
3062
|
ids,
|
|
3081
3063
|
with_context: context
|
|
3082
3064
|
};
|
|
3083
|
-
return env.requests.post(
|
|
3084
|
-
"/
|
|
3085
|
-
|
|
3086
|
-
{
|
|
3087
|
-
headers: { "Content-Type": "application/json" }
|
|
3088
|
-
},
|
|
3089
|
-
service
|
|
3090
|
-
);
|
|
3065
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3066
|
+
headers: { "Content-Type": "application/json" }
|
|
3067
|
+
});
|
|
3091
3068
|
},
|
|
3092
3069
|
[env]
|
|
3093
3070
|
);
|
|
@@ -3095,8 +3072,7 @@ function useActionService() {
|
|
|
3095
3072
|
async ({
|
|
3096
3073
|
model,
|
|
3097
3074
|
id,
|
|
3098
|
-
context
|
|
3099
|
-
service
|
|
3075
|
+
context
|
|
3100
3076
|
}) => {
|
|
3101
3077
|
const jsonData = {
|
|
3102
3078
|
model,
|
|
@@ -3104,14 +3080,9 @@ function useActionService() {
|
|
|
3104
3080
|
ids: id,
|
|
3105
3081
|
with_context: context
|
|
3106
3082
|
};
|
|
3107
|
-
return env.requests.post(
|
|
3108
|
-
"/
|
|
3109
|
-
|
|
3110
|
-
{
|
|
3111
|
-
headers: { "Content-Type": "application/json" }
|
|
3112
|
-
},
|
|
3113
|
-
service
|
|
3114
|
-
);
|
|
3083
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3084
|
+
headers: { "Content-Type": "application/json" }
|
|
3085
|
+
});
|
|
3115
3086
|
},
|
|
3116
3087
|
[env]
|
|
3117
3088
|
);
|
|
@@ -3154,21 +3125,15 @@ function useActionService() {
|
|
|
3154
3125
|
const runAction = useCallback2(
|
|
3155
3126
|
async ({
|
|
3156
3127
|
idAction,
|
|
3157
|
-
context
|
|
3158
|
-
service
|
|
3128
|
+
context
|
|
3159
3129
|
}) => {
|
|
3160
3130
|
const jsonData = {
|
|
3161
3131
|
action_id: idAction,
|
|
3162
3132
|
with_context: { ...context }
|
|
3163
3133
|
};
|
|
3164
|
-
return env.requests.post(
|
|
3165
|
-
"/
|
|
3166
|
-
|
|
3167
|
-
{
|
|
3168
|
-
headers: { "Content-Type": "application/json" }
|
|
3169
|
-
},
|
|
3170
|
-
service
|
|
3171
|
-
);
|
|
3134
|
+
return env.requests.post("/run_action" /* RUN_ACTION_PATH */, jsonData, {
|
|
3135
|
+
headers: { "Content-Type": "application/json" }
|
|
3136
|
+
});
|
|
3172
3137
|
},
|
|
3173
3138
|
[env]
|
|
3174
3139
|
);
|
|
@@ -3311,15 +3276,18 @@ function useAuthService() {
|
|
|
3311
3276
|
[env]
|
|
3312
3277
|
);
|
|
3313
3278
|
const isValidActionToken = useCallback3(
|
|
3314
|
-
async (actionToken) => {
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3279
|
+
async (actionToken, path) => {
|
|
3280
|
+
return env?.requests?.post(
|
|
3281
|
+
path,
|
|
3282
|
+
{},
|
|
3283
|
+
{
|
|
3284
|
+
headers: {
|
|
3285
|
+
"Content-Type": "application/json"
|
|
3286
|
+
},
|
|
3287
|
+
useActionToken: true,
|
|
3288
|
+
actionToken
|
|
3289
|
+
}
|
|
3290
|
+
);
|
|
3323
3291
|
},
|
|
3324
3292
|
[env]
|
|
3325
3293
|
);
|
|
@@ -3355,14 +3323,13 @@ function useAuthService() {
|
|
|
3355
3323
|
data.append("client_id", env?.config?.clientId || "");
|
|
3356
3324
|
data.append("redirect_uri", env?.config?.redirectUri || "");
|
|
3357
3325
|
return env?.requests?.post(
|
|
3358
|
-
"/token" /* TOKEN_BY_CODE
|
|
3326
|
+
`${env?.baseUrl?.replace("/mms/", "/id/")}/${"/token" /* TOKEN_BY_CODE */}`,
|
|
3359
3327
|
data,
|
|
3360
3328
|
{
|
|
3361
3329
|
headers: {
|
|
3362
3330
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
3363
3331
|
}
|
|
3364
|
-
}
|
|
3365
|
-
"id"
|
|
3332
|
+
}
|
|
3366
3333
|
);
|
|
3367
3334
|
},
|
|
3368
3335
|
[env]
|
|
@@ -3445,15 +3412,15 @@ function useCompanyService() {
|
|
|
3445
3412
|
import { useCallback as useCallback5 } from "react";
|
|
3446
3413
|
function useExcelService() {
|
|
3447
3414
|
const { env } = useEnv();
|
|
3448
|
-
const
|
|
3415
|
+
const uploadFile = useCallback5(
|
|
3449
3416
|
async ({ formData }) => {
|
|
3450
|
-
return env.requests.post("/upload/file" /*
|
|
3417
|
+
return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData);
|
|
3451
3418
|
},
|
|
3452
3419
|
[env]
|
|
3453
3420
|
);
|
|
3454
3421
|
const uploadIdFile = useCallback5(
|
|
3455
3422
|
async ({ formData }) => {
|
|
3456
|
-
return env.requests.post("/upload/file" /*
|
|
3423
|
+
return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData, {
|
|
3457
3424
|
headers: {
|
|
3458
3425
|
"Content-Type": "multipart/form-data"
|
|
3459
3426
|
}
|
|
@@ -3601,7 +3568,7 @@ function useExcelService() {
|
|
|
3601
3568
|
[env]
|
|
3602
3569
|
);
|
|
3603
3570
|
return {
|
|
3604
|
-
|
|
3571
|
+
uploadFile,
|
|
3605
3572
|
uploadIdFile,
|
|
3606
3573
|
parsePreview,
|
|
3607
3574
|
executeImport,
|
|
@@ -3696,12 +3663,6 @@ function useFormService() {
|
|
|
3696
3663
|
},
|
|
3697
3664
|
[env]
|
|
3698
3665
|
);
|
|
3699
|
-
const uploadFile = useCallback6(
|
|
3700
|
-
async ({ formData }) => {
|
|
3701
|
-
return env.requests.post("/web/binary/upload_attachment" /* UPLOAD_FILE_PATH */, formData);
|
|
3702
|
-
},
|
|
3703
|
-
[env]
|
|
3704
|
-
);
|
|
3705
3666
|
const getFormView = useCallback6(
|
|
3706
3667
|
async ({ data }) => {
|
|
3707
3668
|
const jsonData = {
|
|
@@ -3754,8 +3715,7 @@ function useFormService() {
|
|
|
3754
3715
|
getImage,
|
|
3755
3716
|
uploadImage,
|
|
3756
3717
|
getFormView,
|
|
3757
|
-
changeStatus
|
|
3758
|
-
uploadFile
|
|
3718
|
+
changeStatus
|
|
3759
3719
|
};
|
|
3760
3720
|
}
|
|
3761
3721
|
|
|
@@ -3888,7 +3848,7 @@ function useModelService() {
|
|
|
3888
3848
|
});
|
|
3889
3849
|
}, [env]);
|
|
3890
3850
|
const getAll = useCallback8(
|
|
3891
|
-
async ({ data
|
|
3851
|
+
async ({ data }) => {
|
|
3892
3852
|
const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
3893
3853
|
fields: data.fields,
|
|
3894
3854
|
groupby: data.groupby
|
|
@@ -3909,16 +3869,11 @@ function useModelService() {
|
|
|
3909
3869
|
...jsonReadGroup
|
|
3910
3870
|
}
|
|
3911
3871
|
};
|
|
3912
|
-
return env.requests.post(
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
"Content-Type": "application/json"
|
|
3918
|
-
}
|
|
3919
|
-
},
|
|
3920
|
-
service
|
|
3921
|
-
);
|
|
3872
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3873
|
+
headers: {
|
|
3874
|
+
"Content-Type": "application/json"
|
|
3875
|
+
}
|
|
3876
|
+
});
|
|
3922
3877
|
},
|
|
3923
3878
|
[env]
|
|
3924
3879
|
);
|
|
@@ -3986,13 +3941,7 @@ function useModelService() {
|
|
|
3986
3941
|
[env]
|
|
3987
3942
|
);
|
|
3988
3943
|
const getDetail = useCallback8(
|
|
3989
|
-
async ({
|
|
3990
|
-
ids = [],
|
|
3991
|
-
model,
|
|
3992
|
-
specification,
|
|
3993
|
-
context,
|
|
3994
|
-
service
|
|
3995
|
-
}) => {
|
|
3944
|
+
async ({ ids = [], model, specification, context }) => {
|
|
3996
3945
|
const jsonData = {
|
|
3997
3946
|
model,
|
|
3998
3947
|
method: "web_read" /* WEB_READ */,
|
|
@@ -4002,16 +3951,11 @@ function useModelService() {
|
|
|
4002
3951
|
specification
|
|
4003
3952
|
}
|
|
4004
3953
|
};
|
|
4005
|
-
return env.requests.post(
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
"Content-Type": "application/json"
|
|
4011
|
-
}
|
|
4012
|
-
},
|
|
4013
|
-
service
|
|
4014
|
-
);
|
|
3954
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3955
|
+
headers: {
|
|
3956
|
+
"Content-Type": "application/json"
|
|
3957
|
+
}
|
|
3958
|
+
});
|
|
4015
3959
|
},
|
|
4016
3960
|
[env]
|
|
4017
3961
|
);
|
|
@@ -4022,8 +3966,7 @@ function useModelService() {
|
|
|
4022
3966
|
data = {},
|
|
4023
3967
|
specification = {},
|
|
4024
3968
|
context = {},
|
|
4025
|
-
path
|
|
4026
|
-
service
|
|
3969
|
+
path
|
|
4027
3970
|
}) => {
|
|
4028
3971
|
const jsonData = {
|
|
4029
3972
|
model,
|
|
@@ -4035,36 +3978,26 @@ function useModelService() {
|
|
|
4035
3978
|
specification
|
|
4036
3979
|
}
|
|
4037
3980
|
};
|
|
4038
|
-
return env.requests.post(
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
"Content-Type": "application/json"
|
|
4044
|
-
}
|
|
4045
|
-
},
|
|
4046
|
-
service
|
|
4047
|
-
);
|
|
3981
|
+
return env.requests.post(path ?? "/call" /* CALL_PATH */, jsonData, {
|
|
3982
|
+
headers: {
|
|
3983
|
+
"Content-Type": "application/json"
|
|
3984
|
+
}
|
|
3985
|
+
});
|
|
4048
3986
|
},
|
|
4049
3987
|
[env]
|
|
4050
3988
|
);
|
|
4051
3989
|
const deleteApi = useCallback8(
|
|
4052
|
-
async ({ ids = [], model
|
|
3990
|
+
async ({ ids = [], model }) => {
|
|
4053
3991
|
const jsonData = {
|
|
4054
3992
|
model,
|
|
4055
3993
|
method: "unlink" /* UNLINK */,
|
|
4056
3994
|
ids
|
|
4057
3995
|
};
|
|
4058
|
-
return env.requests.post(
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
"Content-Type": "application/json"
|
|
4064
|
-
}
|
|
4065
|
-
},
|
|
4066
|
-
service
|
|
4067
|
-
);
|
|
3996
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3997
|
+
headers: {
|
|
3998
|
+
"Content-Type": "application/json"
|
|
3999
|
+
}
|
|
4000
|
+
});
|
|
4068
4001
|
},
|
|
4069
4002
|
[env]
|
|
4070
4003
|
);
|
|
@@ -4075,8 +4008,7 @@ function useModelService() {
|
|
|
4075
4008
|
object,
|
|
4076
4009
|
specification,
|
|
4077
4010
|
context,
|
|
4078
|
-
fieldChange
|
|
4079
|
-
service
|
|
4011
|
+
fieldChange
|
|
4080
4012
|
}) => {
|
|
4081
4013
|
const jsonData = {
|
|
4082
4014
|
model,
|
|
@@ -4089,35 +4021,25 @@ function useModelService() {
|
|
|
4089
4021
|
specification
|
|
4090
4022
|
]
|
|
4091
4023
|
};
|
|
4092
|
-
return env.requests.post(
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
"Content-Type": "application/json"
|
|
4098
|
-
}
|
|
4099
|
-
},
|
|
4100
|
-
service
|
|
4101
|
-
);
|
|
4024
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4025
|
+
headers: {
|
|
4026
|
+
"Content-Type": "application/json"
|
|
4027
|
+
}
|
|
4028
|
+
});
|
|
4102
4029
|
},
|
|
4103
4030
|
[env]
|
|
4104
4031
|
);
|
|
4105
4032
|
const getListFieldsOnchange = useCallback8(
|
|
4106
|
-
async ({ model
|
|
4033
|
+
async ({ model }) => {
|
|
4107
4034
|
const jsonData = {
|
|
4108
4035
|
model,
|
|
4109
4036
|
method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
|
|
4110
4037
|
};
|
|
4111
|
-
return env.requests.post(
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
"Content-Type": "application/json"
|
|
4117
|
-
}
|
|
4118
|
-
},
|
|
4119
|
-
service
|
|
4120
|
-
);
|
|
4038
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4039
|
+
headers: {
|
|
4040
|
+
"Content-Type": "application/json"
|
|
4041
|
+
}
|
|
4042
|
+
});
|
|
4121
4043
|
},
|
|
4122
4044
|
[env]
|
|
4123
4045
|
);
|
|
@@ -4277,8 +4199,7 @@ function useViewService() {
|
|
|
4277
4199
|
views,
|
|
4278
4200
|
context = {},
|
|
4279
4201
|
options = {},
|
|
4280
|
-
aid
|
|
4281
|
-
service
|
|
4202
|
+
aid
|
|
4282
4203
|
}) => {
|
|
4283
4204
|
const defaultOptions = {
|
|
4284
4205
|
load_filters: true,
|
|
@@ -4294,22 +4215,16 @@ function useViewService() {
|
|
|
4294
4215
|
},
|
|
4295
4216
|
with_context: context
|
|
4296
4217
|
};
|
|
4297
|
-
return env?.requests?.post(
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
"Content-Type": "application/json"
|
|
4303
|
-
}
|
|
4304
|
-
},
|
|
4305
|
-
service
|
|
4306
|
-
);
|
|
4218
|
+
return env?.requests?.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
4219
|
+
headers: {
|
|
4220
|
+
"Content-Type": "application/json"
|
|
4221
|
+
}
|
|
4222
|
+
});
|
|
4307
4223
|
},
|
|
4308
4224
|
[env]
|
|
4309
4225
|
);
|
|
4310
4226
|
const getMenu = useCallback10(
|
|
4311
|
-
async (context, specification
|
|
4312
|
-
console.log("domain", domain);
|
|
4227
|
+
async (context, specification) => {
|
|
4313
4228
|
const jsonData = {
|
|
4314
4229
|
model: "ir.ui.menu" /* MENU */,
|
|
4315
4230
|
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
@@ -4317,7 +4232,7 @@ function useViewService() {
|
|
|
4317
4232
|
with_context: context,
|
|
4318
4233
|
kwargs: {
|
|
4319
4234
|
specification,
|
|
4320
|
-
domain:
|
|
4235
|
+
domain: [
|
|
4321
4236
|
"&",
|
|
4322
4237
|
["is_display", "=", true],
|
|
4323
4238
|
"&",
|
|
@@ -4387,7 +4302,7 @@ function useViewService() {
|
|
|
4387
4302
|
[env]
|
|
4388
4303
|
);
|
|
4389
4304
|
const getSelectionItem = useCallback10(
|
|
4390
|
-
async ({ data
|
|
4305
|
+
async ({ data }) => {
|
|
4391
4306
|
const jsonData = {
|
|
4392
4307
|
model: data.model,
|
|
4393
4308
|
ids: [],
|
|
@@ -4405,16 +4320,11 @@ function useViewService() {
|
|
|
4405
4320
|
}
|
|
4406
4321
|
}
|
|
4407
4322
|
};
|
|
4408
|
-
return env?.requests.post(
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
"Content-Type": "application/json"
|
|
4414
|
-
}
|
|
4415
|
-
},
|
|
4416
|
-
service
|
|
4417
|
-
);
|
|
4323
|
+
return env?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4324
|
+
headers: {
|
|
4325
|
+
"Content-Type": "application/json"
|
|
4326
|
+
}
|
|
4327
|
+
});
|
|
4418
4328
|
},
|
|
4419
4329
|
[env]
|
|
4420
4330
|
);
|
package/dist/types.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, f as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-
|
|
1
|
+
export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, f as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-BGJfDe73.mjs';
|
|
2
2
|
|
|
3
3
|
interface Config {
|
|
4
4
|
baseUrl: string;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, f as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-
|
|
1
|
+
export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, f as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-BGJfDe73.js';
|
|
2
2
|
|
|
3
3
|
interface Config {
|
|
4
4
|
baseUrl: string;
|
package/dist/utils.d.mts
CHANGED
|
@@ -50,13 +50,14 @@ declare const convertFloatToTime: (floatValue: number) => string;
|
|
|
50
50
|
declare const convertTimeToFloat: (timeString: string) => number;
|
|
51
51
|
declare const stringToColor: (name: string, id: number) => string;
|
|
52
52
|
declare const getFieldsOnChange: (fields: any) => any;
|
|
53
|
-
declare const filterFieldDirty: ({ id, viewData, formValues, dirtyFields, model, defaultData, }: {
|
|
53
|
+
declare const filterFieldDirty: ({ id, viewData, formValues, dirtyFields, model, defaultData, keepZeroValue, }: {
|
|
54
54
|
id?: any;
|
|
55
55
|
viewData?: any;
|
|
56
56
|
formValues?: any;
|
|
57
57
|
dirtyFields?: any;
|
|
58
58
|
model?: any;
|
|
59
59
|
defaultData?: any;
|
|
60
|
+
keepZeroValue?: boolean;
|
|
60
61
|
}) => any;
|
|
61
62
|
type MergeableObject = {
|
|
62
63
|
[key: string]: any;
|