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