@fctc/interface-logic 2.3.1 → 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 +7 -28
- package/dist/hooks.d.ts +7 -28
- package/dist/hooks.js +196 -361
- package/dist/hooks.mjs +166 -329
- package/dist/provider.d.mts +10 -12
- package/dist/provider.d.ts +10 -12
- package/dist/provider.js +216 -409
- package/dist/provider.mjs +186 -379
- package/dist/services.d.mts +16 -33
- package/dist/services.d.ts +16 -33
- package/dist/services.js +126 -248
- package/dist/services.mjs +111 -233
- 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,14 +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
|
-
// src/hooks/form/use-save-file.ts
|
|
2898
|
-
import { useMutation as useMutation26 } from "@tanstack/react-query";
|
|
2899
|
-
|
|
2900
2892
|
// src/hooks/model/use-delete.ts
|
|
2901
|
-
import { useMutation as
|
|
2893
|
+
import { useMutation as useMutation25 } from "@tanstack/react-query";
|
|
2902
2894
|
|
|
2903
2895
|
// src/hooks/model/use-get-all.ts
|
|
2904
2896
|
import { useQuery as useQuery6 } from "@tanstack/react-query";
|
|
@@ -2910,7 +2902,7 @@ import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
|
2910
2902
|
import { useQuery as useQuery8 } from "@tanstack/react-query";
|
|
2911
2903
|
|
|
2912
2904
|
// src/hooks/model/use-get-detail.ts
|
|
2913
|
-
import { useMutation as
|
|
2905
|
+
import { useMutation as useMutation26 } from "@tanstack/react-query";
|
|
2914
2906
|
|
|
2915
2907
|
// src/hooks/model/use-get-field-onchange.ts
|
|
2916
2908
|
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
@@ -2919,25 +2911,25 @@ import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
|
2919
2911
|
import { useQuery as useQuery10 } from "@tanstack/react-query";
|
|
2920
2912
|
|
|
2921
2913
|
// src/hooks/model/use-onchange-form.ts
|
|
2922
|
-
import { useMutation as
|
|
2914
|
+
import { useMutation as useMutation27 } from "@tanstack/react-query";
|
|
2923
2915
|
|
|
2924
2916
|
// src/hooks/model/use-save.ts
|
|
2925
|
-
import { useMutation as
|
|
2917
|
+
import { useMutation as useMutation28 } from "@tanstack/react-query";
|
|
2926
2918
|
|
|
2927
2919
|
// src/hooks/user/use-get-profile.ts
|
|
2928
|
-
import { useMutation as
|
|
2920
|
+
import { useMutation as useMutation29 } from "@tanstack/react-query";
|
|
2929
2921
|
|
|
2930
2922
|
// src/hooks/user/use-get-user.ts
|
|
2931
|
-
import { useMutation as
|
|
2923
|
+
import { useMutation as useMutation30 } from "@tanstack/react-query";
|
|
2932
2924
|
|
|
2933
2925
|
// src/hooks/user/use-switch-locale.ts
|
|
2934
|
-
import { useMutation as
|
|
2926
|
+
import { useMutation as useMutation31 } from "@tanstack/react-query";
|
|
2935
2927
|
|
|
2936
2928
|
// src/hooks/view/use-button.ts
|
|
2937
|
-
import { useMutation as
|
|
2929
|
+
import { useMutation as useMutation32 } from "@tanstack/react-query";
|
|
2938
2930
|
|
|
2939
2931
|
// src/hooks/view/use-duplicate-record.ts
|
|
2940
|
-
import { useMutation as
|
|
2932
|
+
import { useMutation as useMutation33 } from "@tanstack/react-query";
|
|
2941
2933
|
|
|
2942
2934
|
// src/hooks/view/use-get-action-detail.ts
|
|
2943
2935
|
import { useQuery as useQuery11 } from "@tanstack/react-query";
|
|
@@ -2955,7 +2947,7 @@ import { useQuery as useQuery14 } from "@tanstack/react-query";
|
|
|
2955
2947
|
import { useQuery as useQuery15 } from "@tanstack/react-query";
|
|
2956
2948
|
|
|
2957
2949
|
// src/hooks/view/use-get-print-report.ts
|
|
2958
|
-
import { useMutation as
|
|
2950
|
+
import { useMutation as useMutation34 } from "@tanstack/react-query";
|
|
2959
2951
|
|
|
2960
2952
|
// src/hooks/view/use-get-progress-bar.ts
|
|
2961
2953
|
import { useQuery as useQuery16 } from "@tanstack/react-query";
|
|
@@ -2967,46 +2959,46 @@ import { useQuery as useQuery17 } from "@tanstack/react-query";
|
|
|
2967
2959
|
import { useQuery as useQuery18 } from "@tanstack/react-query";
|
|
2968
2960
|
|
|
2969
2961
|
// src/hooks/view/use-load-action.ts
|
|
2970
|
-
import { useMutation as
|
|
2962
|
+
import { useMutation as useMutation35 } from "@tanstack/react-query";
|
|
2971
2963
|
|
|
2972
2964
|
// src/hooks/view/use-load-message.ts
|
|
2973
2965
|
import { useQuery as useQuery19 } from "@tanstack/react-query";
|
|
2974
2966
|
|
|
2975
2967
|
// src/hooks/view/use-print.ts
|
|
2976
|
-
import { useMutation as
|
|
2968
|
+
import { useMutation as useMutation36 } from "@tanstack/react-query";
|
|
2977
2969
|
|
|
2978
2970
|
// src/hooks/view/use-remove-row.ts
|
|
2979
|
-
import { useMutation as
|
|
2971
|
+
import { useMutation as useMutation37 } from "@tanstack/react-query";
|
|
2980
2972
|
|
|
2981
2973
|
// src/hooks/view/use-resequence.ts
|
|
2982
2974
|
import { useQuery as useQuery20 } from "@tanstack/react-query";
|
|
2983
2975
|
|
|
2984
2976
|
// src/hooks/view/use-run-action.ts
|
|
2985
|
-
import { useMutation as
|
|
2977
|
+
import { useMutation as useMutation38 } from "@tanstack/react-query";
|
|
2986
2978
|
|
|
2987
2979
|
// src/hooks/view/use-signin-sso.ts
|
|
2988
|
-
import { useMutation as
|
|
2980
|
+
import { useMutation as useMutation39 } from "@tanstack/react-query";
|
|
2989
2981
|
|
|
2990
2982
|
// src/hooks/view/use-verify-2FA.ts
|
|
2991
|
-
import { useMutation as
|
|
2983
|
+
import { useMutation as useMutation40 } from "@tanstack/react-query";
|
|
2992
2984
|
|
|
2993
2985
|
// src/hooks/view/uset-get-2FA-method.ts
|
|
2994
|
-
import { useMutation as
|
|
2986
|
+
import { useMutation as useMutation41 } from "@tanstack/react-query";
|
|
2995
2987
|
|
|
2996
2988
|
// src/hooks/view/use-grant-access.ts
|
|
2997
|
-
import { useMutation as
|
|
2989
|
+
import { useMutation as useMutation42 } from "@tanstack/react-query";
|
|
2998
2990
|
|
|
2999
2991
|
// src/hooks/view/use-remove-totp-setup.ts
|
|
3000
|
-
import { useMutation as
|
|
2992
|
+
import { useMutation as useMutation43 } from "@tanstack/react-query";
|
|
3001
2993
|
|
|
3002
2994
|
// src/hooks/view/use-request-setup-totp.ts
|
|
3003
|
-
import { useMutation as
|
|
2995
|
+
import { useMutation as useMutation44 } from "@tanstack/react-query";
|
|
3004
2996
|
|
|
3005
2997
|
// src/hooks/view/use-settings-web-read-2fa.ts
|
|
3006
|
-
import { useMutation as
|
|
2998
|
+
import { useMutation as useMutation45 } from "@tanstack/react-query";
|
|
3007
2999
|
|
|
3008
3000
|
// src/hooks/view/use-verify-totp.ts
|
|
3009
|
-
import { useMutation as
|
|
3001
|
+
import { useMutation as useMutation46 } from "@tanstack/react-query";
|
|
3010
3002
|
|
|
3011
3003
|
// src/provider/service-provider.tsx
|
|
3012
3004
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
@@ -3022,21 +3014,15 @@ function useActionService() {
|
|
|
3022
3014
|
const loadAction = useCallback2(
|
|
3023
3015
|
async ({
|
|
3024
3016
|
idAction,
|
|
3025
|
-
context
|
|
3026
|
-
service
|
|
3017
|
+
context
|
|
3027
3018
|
}) => {
|
|
3028
3019
|
const jsonData = {
|
|
3029
3020
|
action_id: idAction,
|
|
3030
3021
|
with_context: { ...context }
|
|
3031
3022
|
};
|
|
3032
|
-
return env.requests.post(
|
|
3033
|
-
"/
|
|
3034
|
-
|
|
3035
|
-
{
|
|
3036
|
-
headers: { "Content-Type": "application/json" }
|
|
3037
|
-
},
|
|
3038
|
-
service
|
|
3039
|
-
);
|
|
3023
|
+
return env.requests.post("/load_action" /* LOAD_ACTION */, jsonData, {
|
|
3024
|
+
headers: { "Content-Type": "application/json" }
|
|
3025
|
+
});
|
|
3040
3026
|
},
|
|
3041
3027
|
[env]
|
|
3042
3028
|
);
|
|
@@ -3045,8 +3031,7 @@ function useActionService() {
|
|
|
3045
3031
|
model,
|
|
3046
3032
|
ids = [],
|
|
3047
3033
|
context,
|
|
3048
|
-
method
|
|
3049
|
-
service
|
|
3034
|
+
method
|
|
3050
3035
|
}) => {
|
|
3051
3036
|
try {
|
|
3052
3037
|
const jsonData = {
|
|
@@ -3055,14 +3040,9 @@ function useActionService() {
|
|
|
3055
3040
|
ids,
|
|
3056
3041
|
with_context: context
|
|
3057
3042
|
};
|
|
3058
|
-
return env.requests.post(
|
|
3059
|
-
"/
|
|
3060
|
-
|
|
3061
|
-
{
|
|
3062
|
-
headers: { "Content-Type": "application/json" }
|
|
3063
|
-
},
|
|
3064
|
-
service
|
|
3065
|
-
);
|
|
3043
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3044
|
+
headers: { "Content-Type": "application/json" }
|
|
3045
|
+
});
|
|
3066
3046
|
} catch (error) {
|
|
3067
3047
|
console.error("Error when calling button action:", error);
|
|
3068
3048
|
throw error;
|
|
@@ -3074,8 +3054,7 @@ function useActionService() {
|
|
|
3074
3054
|
async ({
|
|
3075
3055
|
model,
|
|
3076
3056
|
ids,
|
|
3077
|
-
context
|
|
3078
|
-
service
|
|
3057
|
+
context
|
|
3079
3058
|
}) => {
|
|
3080
3059
|
const jsonData = {
|
|
3081
3060
|
model,
|
|
@@ -3083,14 +3062,9 @@ function useActionService() {
|
|
|
3083
3062
|
ids,
|
|
3084
3063
|
with_context: context
|
|
3085
3064
|
};
|
|
3086
|
-
return env.requests.post(
|
|
3087
|
-
"/
|
|
3088
|
-
|
|
3089
|
-
{
|
|
3090
|
-
headers: { "Content-Type": "application/json" }
|
|
3091
|
-
},
|
|
3092
|
-
service
|
|
3093
|
-
);
|
|
3065
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3066
|
+
headers: { "Content-Type": "application/json" }
|
|
3067
|
+
});
|
|
3094
3068
|
},
|
|
3095
3069
|
[env]
|
|
3096
3070
|
);
|
|
@@ -3098,8 +3072,7 @@ function useActionService() {
|
|
|
3098
3072
|
async ({
|
|
3099
3073
|
model,
|
|
3100
3074
|
id,
|
|
3101
|
-
context
|
|
3102
|
-
service
|
|
3075
|
+
context
|
|
3103
3076
|
}) => {
|
|
3104
3077
|
const jsonData = {
|
|
3105
3078
|
model,
|
|
@@ -3107,14 +3080,9 @@ function useActionService() {
|
|
|
3107
3080
|
ids: id,
|
|
3108
3081
|
with_context: context
|
|
3109
3082
|
};
|
|
3110
|
-
return env.requests.post(
|
|
3111
|
-
"/
|
|
3112
|
-
|
|
3113
|
-
{
|
|
3114
|
-
headers: { "Content-Type": "application/json" }
|
|
3115
|
-
},
|
|
3116
|
-
service
|
|
3117
|
-
);
|
|
3083
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3084
|
+
headers: { "Content-Type": "application/json" }
|
|
3085
|
+
});
|
|
3118
3086
|
},
|
|
3119
3087
|
[env]
|
|
3120
3088
|
);
|
|
@@ -3157,21 +3125,15 @@ function useActionService() {
|
|
|
3157
3125
|
const runAction = useCallback2(
|
|
3158
3126
|
async ({
|
|
3159
3127
|
idAction,
|
|
3160
|
-
context
|
|
3161
|
-
service
|
|
3128
|
+
context
|
|
3162
3129
|
}) => {
|
|
3163
3130
|
const jsonData = {
|
|
3164
3131
|
action_id: idAction,
|
|
3165
3132
|
with_context: { ...context }
|
|
3166
3133
|
};
|
|
3167
|
-
return env.requests.post(
|
|
3168
|
-
"/
|
|
3169
|
-
|
|
3170
|
-
{
|
|
3171
|
-
headers: { "Content-Type": "application/json" }
|
|
3172
|
-
},
|
|
3173
|
-
service
|
|
3174
|
-
);
|
|
3134
|
+
return env.requests.post("/run_action" /* RUN_ACTION_PATH */, jsonData, {
|
|
3135
|
+
headers: { "Content-Type": "application/json" }
|
|
3136
|
+
});
|
|
3175
3137
|
},
|
|
3176
3138
|
[env]
|
|
3177
3139
|
);
|
|
@@ -3314,15 +3276,18 @@ function useAuthService() {
|
|
|
3314
3276
|
[env]
|
|
3315
3277
|
);
|
|
3316
3278
|
const isValidActionToken = useCallback3(
|
|
3317
|
-
async (actionToken) => {
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
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
|
+
);
|
|
3326
3291
|
},
|
|
3327
3292
|
[env]
|
|
3328
3293
|
);
|
|
@@ -3358,14 +3323,13 @@ function useAuthService() {
|
|
|
3358
3323
|
data.append("client_id", env?.config?.clientId || "");
|
|
3359
3324
|
data.append("redirect_uri", env?.config?.redirectUri || "");
|
|
3360
3325
|
return env?.requests?.post(
|
|
3361
|
-
"/token" /* TOKEN_BY_CODE
|
|
3326
|
+
`${env?.baseUrl?.replace("/mms/", "/id/")}/${"/token" /* TOKEN_BY_CODE */}`,
|
|
3362
3327
|
data,
|
|
3363
3328
|
{
|
|
3364
3329
|
headers: {
|
|
3365
3330
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
3366
3331
|
}
|
|
3367
|
-
}
|
|
3368
|
-
"id"
|
|
3332
|
+
}
|
|
3369
3333
|
);
|
|
3370
3334
|
},
|
|
3371
3335
|
[env]
|
|
@@ -3448,15 +3412,15 @@ function useCompanyService() {
|
|
|
3448
3412
|
import { useCallback as useCallback5 } from "react";
|
|
3449
3413
|
function useExcelService() {
|
|
3450
3414
|
const { env } = useEnv();
|
|
3451
|
-
const
|
|
3415
|
+
const uploadFile = useCallback5(
|
|
3452
3416
|
async ({ formData }) => {
|
|
3453
|
-
return env.requests.post("/upload/file" /*
|
|
3417
|
+
return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData);
|
|
3454
3418
|
},
|
|
3455
3419
|
[env]
|
|
3456
3420
|
);
|
|
3457
3421
|
const uploadIdFile = useCallback5(
|
|
3458
3422
|
async ({ formData }) => {
|
|
3459
|
-
return env.requests.post("/upload/file" /*
|
|
3423
|
+
return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData, {
|
|
3460
3424
|
headers: {
|
|
3461
3425
|
"Content-Type": "multipart/form-data"
|
|
3462
3426
|
}
|
|
@@ -3604,7 +3568,7 @@ function useExcelService() {
|
|
|
3604
3568
|
[env]
|
|
3605
3569
|
);
|
|
3606
3570
|
return {
|
|
3607
|
-
|
|
3571
|
+
uploadFile,
|
|
3608
3572
|
uploadIdFile,
|
|
3609
3573
|
parsePreview,
|
|
3610
3574
|
executeImport,
|
|
@@ -3699,41 +3663,6 @@ function useFormService() {
|
|
|
3699
3663
|
},
|
|
3700
3664
|
[env]
|
|
3701
3665
|
);
|
|
3702
|
-
const uploadFile = useCallback6(
|
|
3703
|
-
async ({ formData }) => {
|
|
3704
|
-
return env.requests.post("/web/binary/upload_attachment" /* UPLOAD_FILE_PATH */, formData);
|
|
3705
|
-
},
|
|
3706
|
-
[env]
|
|
3707
|
-
);
|
|
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
3666
|
const getFormView = useCallback6(
|
|
3738
3667
|
async ({ data }) => {
|
|
3739
3668
|
const jsonData = {
|
|
@@ -3786,9 +3715,7 @@ function useFormService() {
|
|
|
3786
3715
|
getImage,
|
|
3787
3716
|
uploadImage,
|
|
3788
3717
|
getFormView,
|
|
3789
|
-
changeStatus
|
|
3790
|
-
uploadFile,
|
|
3791
|
-
saveFile
|
|
3718
|
+
changeStatus
|
|
3792
3719
|
};
|
|
3793
3720
|
}
|
|
3794
3721
|
|
|
@@ -3921,7 +3848,7 @@ function useModelService() {
|
|
|
3921
3848
|
});
|
|
3922
3849
|
}, [env]);
|
|
3923
3850
|
const getAll = useCallback8(
|
|
3924
|
-
async ({ data
|
|
3851
|
+
async ({ data }) => {
|
|
3925
3852
|
const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
3926
3853
|
fields: data.fields,
|
|
3927
3854
|
groupby: data.groupby
|
|
@@ -3942,16 +3869,11 @@ function useModelService() {
|
|
|
3942
3869
|
...jsonReadGroup
|
|
3943
3870
|
}
|
|
3944
3871
|
};
|
|
3945
|
-
return env.requests.post(
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
"Content-Type": "application/json"
|
|
3951
|
-
}
|
|
3952
|
-
},
|
|
3953
|
-
service
|
|
3954
|
-
);
|
|
3872
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3873
|
+
headers: {
|
|
3874
|
+
"Content-Type": "application/json"
|
|
3875
|
+
}
|
|
3876
|
+
});
|
|
3955
3877
|
},
|
|
3956
3878
|
[env]
|
|
3957
3879
|
);
|
|
@@ -4019,13 +3941,7 @@ function useModelService() {
|
|
|
4019
3941
|
[env]
|
|
4020
3942
|
);
|
|
4021
3943
|
const getDetail = useCallback8(
|
|
4022
|
-
async ({
|
|
4023
|
-
ids = [],
|
|
4024
|
-
model,
|
|
4025
|
-
specification,
|
|
4026
|
-
context,
|
|
4027
|
-
service
|
|
4028
|
-
}) => {
|
|
3944
|
+
async ({ ids = [], model, specification, context }) => {
|
|
4029
3945
|
const jsonData = {
|
|
4030
3946
|
model,
|
|
4031
3947
|
method: "web_read" /* WEB_READ */,
|
|
@@ -4035,16 +3951,11 @@ function useModelService() {
|
|
|
4035
3951
|
specification
|
|
4036
3952
|
}
|
|
4037
3953
|
};
|
|
4038
|
-
return env.requests.post(
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
"Content-Type": "application/json"
|
|
4044
|
-
}
|
|
4045
|
-
},
|
|
4046
|
-
service
|
|
4047
|
-
);
|
|
3954
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3955
|
+
headers: {
|
|
3956
|
+
"Content-Type": "application/json"
|
|
3957
|
+
}
|
|
3958
|
+
});
|
|
4048
3959
|
},
|
|
4049
3960
|
[env]
|
|
4050
3961
|
);
|
|
@@ -4055,8 +3966,7 @@ function useModelService() {
|
|
|
4055
3966
|
data = {},
|
|
4056
3967
|
specification = {},
|
|
4057
3968
|
context = {},
|
|
4058
|
-
path
|
|
4059
|
-
service
|
|
3969
|
+
path
|
|
4060
3970
|
}) => {
|
|
4061
3971
|
const jsonData = {
|
|
4062
3972
|
model,
|
|
@@ -4068,36 +3978,26 @@ function useModelService() {
|
|
|
4068
3978
|
specification
|
|
4069
3979
|
}
|
|
4070
3980
|
};
|
|
4071
|
-
return env.requests.post(
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
"Content-Type": "application/json"
|
|
4077
|
-
}
|
|
4078
|
-
},
|
|
4079
|
-
service
|
|
4080
|
-
);
|
|
3981
|
+
return env.requests.post(path ?? "/call" /* CALL_PATH */, jsonData, {
|
|
3982
|
+
headers: {
|
|
3983
|
+
"Content-Type": "application/json"
|
|
3984
|
+
}
|
|
3985
|
+
});
|
|
4081
3986
|
},
|
|
4082
3987
|
[env]
|
|
4083
3988
|
);
|
|
4084
3989
|
const deleteApi = useCallback8(
|
|
4085
|
-
async ({ ids = [], model
|
|
3990
|
+
async ({ ids = [], model }) => {
|
|
4086
3991
|
const jsonData = {
|
|
4087
3992
|
model,
|
|
4088
3993
|
method: "unlink" /* UNLINK */,
|
|
4089
3994
|
ids
|
|
4090
3995
|
};
|
|
4091
|
-
return env.requests.post(
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
"Content-Type": "application/json"
|
|
4097
|
-
}
|
|
4098
|
-
},
|
|
4099
|
-
service
|
|
4100
|
-
);
|
|
3996
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3997
|
+
headers: {
|
|
3998
|
+
"Content-Type": "application/json"
|
|
3999
|
+
}
|
|
4000
|
+
});
|
|
4101
4001
|
},
|
|
4102
4002
|
[env]
|
|
4103
4003
|
);
|
|
@@ -4108,8 +4008,7 @@ function useModelService() {
|
|
|
4108
4008
|
object,
|
|
4109
4009
|
specification,
|
|
4110
4010
|
context,
|
|
4111
|
-
fieldChange
|
|
4112
|
-
service
|
|
4011
|
+
fieldChange
|
|
4113
4012
|
}) => {
|
|
4114
4013
|
const jsonData = {
|
|
4115
4014
|
model,
|
|
@@ -4122,35 +4021,25 @@ function useModelService() {
|
|
|
4122
4021
|
specification
|
|
4123
4022
|
]
|
|
4124
4023
|
};
|
|
4125
|
-
return env.requests.post(
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
"Content-Type": "application/json"
|
|
4131
|
-
}
|
|
4132
|
-
},
|
|
4133
|
-
service
|
|
4134
|
-
);
|
|
4024
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4025
|
+
headers: {
|
|
4026
|
+
"Content-Type": "application/json"
|
|
4027
|
+
}
|
|
4028
|
+
});
|
|
4135
4029
|
},
|
|
4136
4030
|
[env]
|
|
4137
4031
|
);
|
|
4138
4032
|
const getListFieldsOnchange = useCallback8(
|
|
4139
|
-
async ({ model
|
|
4033
|
+
async ({ model }) => {
|
|
4140
4034
|
const jsonData = {
|
|
4141
4035
|
model,
|
|
4142
4036
|
method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
|
|
4143
4037
|
};
|
|
4144
|
-
return env.requests.post(
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
"Content-Type": "application/json"
|
|
4150
|
-
}
|
|
4151
|
-
},
|
|
4152
|
-
service
|
|
4153
|
-
);
|
|
4038
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4039
|
+
headers: {
|
|
4040
|
+
"Content-Type": "application/json"
|
|
4041
|
+
}
|
|
4042
|
+
});
|
|
4154
4043
|
},
|
|
4155
4044
|
[env]
|
|
4156
4045
|
);
|
|
@@ -4310,8 +4199,7 @@ function useViewService() {
|
|
|
4310
4199
|
views,
|
|
4311
4200
|
context = {},
|
|
4312
4201
|
options = {},
|
|
4313
|
-
aid
|
|
4314
|
-
service
|
|
4202
|
+
aid
|
|
4315
4203
|
}) => {
|
|
4316
4204
|
const defaultOptions = {
|
|
4317
4205
|
load_filters: true,
|
|
@@ -4327,16 +4215,11 @@ function useViewService() {
|
|
|
4327
4215
|
},
|
|
4328
4216
|
with_context: context
|
|
4329
4217
|
};
|
|
4330
|
-
return env?.requests?.post(
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
"Content-Type": "application/json"
|
|
4336
|
-
}
|
|
4337
|
-
},
|
|
4338
|
-
service
|
|
4339
|
-
);
|
|
4218
|
+
return env?.requests?.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
4219
|
+
headers: {
|
|
4220
|
+
"Content-Type": "application/json"
|
|
4221
|
+
}
|
|
4222
|
+
});
|
|
4340
4223
|
},
|
|
4341
4224
|
[env]
|
|
4342
4225
|
);
|
|
@@ -4419,7 +4302,7 @@ function useViewService() {
|
|
|
4419
4302
|
[env]
|
|
4420
4303
|
);
|
|
4421
4304
|
const getSelectionItem = useCallback10(
|
|
4422
|
-
async ({ data
|
|
4305
|
+
async ({ data }) => {
|
|
4423
4306
|
const jsonData = {
|
|
4424
4307
|
model: data.model,
|
|
4425
4308
|
ids: [],
|
|
@@ -4437,16 +4320,11 @@ function useViewService() {
|
|
|
4437
4320
|
}
|
|
4438
4321
|
}
|
|
4439
4322
|
};
|
|
4440
|
-
return env?.requests.post(
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
"Content-Type": "application/json"
|
|
4446
|
-
}
|
|
4447
|
-
},
|
|
4448
|
-
service
|
|
4449
|
-
);
|
|
4323
|
+
return env?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4324
|
+
headers: {
|
|
4325
|
+
"Content-Type": "application/json"
|
|
4326
|
+
}
|
|
4327
|
+
});
|
|
4450
4328
|
},
|
|
4451
4329
|
[env]
|
|
4452
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;
|