@fctc/interface-logic 2.2.0 → 2.2.2
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 +22 -44
- package/dist/configs.mjs +22 -44
- package/dist/constants.d.mts +1 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/constants.mjs +1 -0
- package/dist/environment.js +22 -44
- package/dist/environment.mjs +22 -44
- package/dist/hooks.d.mts +4 -16
- package/dist/hooks.d.ts +4 -16
- package/dist/hooks.js +103 -208
- package/dist/hooks.mjs +103 -208
- package/dist/provider.d.mts +1 -2
- package/dist/provider.d.ts +1 -2
- package/dist/provider.js +125 -252
- package/dist/provider.mjs +125 -252
- package/dist/services.d.mts +15 -23
- package/dist/services.d.ts +15 -23
- package/dist/services.js +78 -160
- package/dist/services.mjs +78 -160
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- 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/hooks.mjs
CHANGED
|
@@ -25,6 +25,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
25
25
|
UriConstants2["IMAGE_PATH"] = `/web/image`;
|
|
26
26
|
UriConstants2["LOAD_MESSAGE"] = `/load_message_failures`;
|
|
27
27
|
UriConstants2["TOKEN"] = `/check_token`;
|
|
28
|
+
UriConstants2["VALIDATE_ACTION_TOKEN"] = `/action-token/validate`;
|
|
28
29
|
UriConstants2["CREATE_UPDATE_PATH"] = `/create_update`;
|
|
29
30
|
UriConstants2["TWOFA_METHOD_PATH"] = `/id/api/v2/call`;
|
|
30
31
|
UriConstants2["SIGNIN_SSO"] = `/signin-sso/oauth`;
|
|
@@ -2839,21 +2840,15 @@ function useActionService() {
|
|
|
2839
2840
|
const loadAction = useCallback2(
|
|
2840
2841
|
async ({
|
|
2841
2842
|
idAction,
|
|
2842
|
-
context
|
|
2843
|
-
service
|
|
2843
|
+
context
|
|
2844
2844
|
}) => {
|
|
2845
2845
|
const jsonData = {
|
|
2846
2846
|
action_id: idAction,
|
|
2847
2847
|
with_context: { ...context }
|
|
2848
2848
|
};
|
|
2849
|
-
return env.requests.post(
|
|
2850
|
-
"/
|
|
2851
|
-
|
|
2852
|
-
{
|
|
2853
|
-
headers: { "Content-Type": "application/json" }
|
|
2854
|
-
},
|
|
2855
|
-
service
|
|
2856
|
-
);
|
|
2849
|
+
return env.requests.post("/load_action" /* LOAD_ACTION */, jsonData, {
|
|
2850
|
+
headers: { "Content-Type": "application/json" }
|
|
2851
|
+
});
|
|
2857
2852
|
},
|
|
2858
2853
|
[env]
|
|
2859
2854
|
);
|
|
@@ -2862,8 +2857,7 @@ function useActionService() {
|
|
|
2862
2857
|
model,
|
|
2863
2858
|
ids = [],
|
|
2864
2859
|
context,
|
|
2865
|
-
method
|
|
2866
|
-
service
|
|
2860
|
+
method
|
|
2867
2861
|
}) => {
|
|
2868
2862
|
try {
|
|
2869
2863
|
const jsonData = {
|
|
@@ -2872,14 +2866,9 @@ function useActionService() {
|
|
|
2872
2866
|
ids,
|
|
2873
2867
|
with_context: context
|
|
2874
2868
|
};
|
|
2875
|
-
return env.requests.post(
|
|
2876
|
-
"/
|
|
2877
|
-
|
|
2878
|
-
{
|
|
2879
|
-
headers: { "Content-Type": "application/json" }
|
|
2880
|
-
},
|
|
2881
|
-
service
|
|
2882
|
-
);
|
|
2869
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
2870
|
+
headers: { "Content-Type": "application/json" }
|
|
2871
|
+
});
|
|
2883
2872
|
} catch (error) {
|
|
2884
2873
|
console.error("Error when calling button action:", error);
|
|
2885
2874
|
throw error;
|
|
@@ -2891,8 +2880,7 @@ function useActionService() {
|
|
|
2891
2880
|
async ({
|
|
2892
2881
|
model,
|
|
2893
2882
|
ids,
|
|
2894
|
-
context
|
|
2895
|
-
service
|
|
2883
|
+
context
|
|
2896
2884
|
}) => {
|
|
2897
2885
|
const jsonData = {
|
|
2898
2886
|
model,
|
|
@@ -2900,14 +2888,9 @@ function useActionService() {
|
|
|
2900
2888
|
ids,
|
|
2901
2889
|
with_context: context
|
|
2902
2890
|
};
|
|
2903
|
-
return env.requests.post(
|
|
2904
|
-
"/
|
|
2905
|
-
|
|
2906
|
-
{
|
|
2907
|
-
headers: { "Content-Type": "application/json" }
|
|
2908
|
-
},
|
|
2909
|
-
service
|
|
2910
|
-
);
|
|
2891
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
2892
|
+
headers: { "Content-Type": "application/json" }
|
|
2893
|
+
});
|
|
2911
2894
|
},
|
|
2912
2895
|
[env]
|
|
2913
2896
|
);
|
|
@@ -2915,8 +2898,7 @@ function useActionService() {
|
|
|
2915
2898
|
async ({
|
|
2916
2899
|
model,
|
|
2917
2900
|
id,
|
|
2918
|
-
context
|
|
2919
|
-
service
|
|
2901
|
+
context
|
|
2920
2902
|
}) => {
|
|
2921
2903
|
const jsonData = {
|
|
2922
2904
|
model,
|
|
@@ -2924,14 +2906,9 @@ function useActionService() {
|
|
|
2924
2906
|
ids: id,
|
|
2925
2907
|
with_context: context
|
|
2926
2908
|
};
|
|
2927
|
-
return env.requests.post(
|
|
2928
|
-
"/
|
|
2929
|
-
|
|
2930
|
-
{
|
|
2931
|
-
headers: { "Content-Type": "application/json" }
|
|
2932
|
-
},
|
|
2933
|
-
service
|
|
2934
|
-
);
|
|
2909
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
2910
|
+
headers: { "Content-Type": "application/json" }
|
|
2911
|
+
});
|
|
2935
2912
|
},
|
|
2936
2913
|
[env]
|
|
2937
2914
|
);
|
|
@@ -2974,21 +2951,15 @@ function useActionService() {
|
|
|
2974
2951
|
const runAction = useCallback2(
|
|
2975
2952
|
async ({
|
|
2976
2953
|
idAction,
|
|
2977
|
-
context
|
|
2978
|
-
service
|
|
2954
|
+
context
|
|
2979
2955
|
}) => {
|
|
2980
2956
|
const jsonData = {
|
|
2981
2957
|
action_id: idAction,
|
|
2982
2958
|
with_context: { ...context }
|
|
2983
2959
|
};
|
|
2984
|
-
return env.requests.post(
|
|
2985
|
-
"/
|
|
2986
|
-
|
|
2987
|
-
{
|
|
2988
|
-
headers: { "Content-Type": "application/json" }
|
|
2989
|
-
},
|
|
2990
|
-
service
|
|
2991
|
-
);
|
|
2960
|
+
return env.requests.post("/run_action" /* RUN_ACTION_PATH */, jsonData, {
|
|
2961
|
+
headers: { "Content-Type": "application/json" }
|
|
2962
|
+
});
|
|
2992
2963
|
},
|
|
2993
2964
|
[env]
|
|
2994
2965
|
);
|
|
@@ -3131,18 +3102,15 @@ function useAuthService() {
|
|
|
3131
3102
|
[env]
|
|
3132
3103
|
);
|
|
3133
3104
|
const isValidActionToken = useCallback3(
|
|
3134
|
-
async (actionToken
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
{
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
actionToken
|
|
3144
|
-
}
|
|
3145
|
-
);
|
|
3105
|
+
async (actionToken) => {
|
|
3106
|
+
const bodyData = {};
|
|
3107
|
+
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
3108
|
+
headers: {
|
|
3109
|
+
"Content-Type": "application/json"
|
|
3110
|
+
},
|
|
3111
|
+
useActionToken: true,
|
|
3112
|
+
actionToken
|
|
3113
|
+
});
|
|
3146
3114
|
},
|
|
3147
3115
|
[env]
|
|
3148
3116
|
);
|
|
@@ -3703,7 +3671,7 @@ function useModelService() {
|
|
|
3703
3671
|
});
|
|
3704
3672
|
}, [env]);
|
|
3705
3673
|
const getAll = useCallback8(
|
|
3706
|
-
async ({ data
|
|
3674
|
+
async ({ data }) => {
|
|
3707
3675
|
const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
3708
3676
|
fields: data.fields,
|
|
3709
3677
|
groupby: data.groupby
|
|
@@ -3724,16 +3692,11 @@ function useModelService() {
|
|
|
3724
3692
|
...jsonReadGroup
|
|
3725
3693
|
}
|
|
3726
3694
|
};
|
|
3727
|
-
return env.requests.post(
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
"Content-Type": "application/json"
|
|
3733
|
-
}
|
|
3734
|
-
},
|
|
3735
|
-
service
|
|
3736
|
-
);
|
|
3695
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3696
|
+
headers: {
|
|
3697
|
+
"Content-Type": "application/json"
|
|
3698
|
+
}
|
|
3699
|
+
});
|
|
3737
3700
|
},
|
|
3738
3701
|
[env]
|
|
3739
3702
|
);
|
|
@@ -3801,13 +3764,7 @@ function useModelService() {
|
|
|
3801
3764
|
[env]
|
|
3802
3765
|
);
|
|
3803
3766
|
const getDetail = useCallback8(
|
|
3804
|
-
async ({
|
|
3805
|
-
ids = [],
|
|
3806
|
-
model,
|
|
3807
|
-
specification,
|
|
3808
|
-
context,
|
|
3809
|
-
service
|
|
3810
|
-
}) => {
|
|
3767
|
+
async ({ ids = [], model, specification, context }) => {
|
|
3811
3768
|
const jsonData = {
|
|
3812
3769
|
model,
|
|
3813
3770
|
method: "web_read" /* WEB_READ */,
|
|
@@ -3817,16 +3774,11 @@ function useModelService() {
|
|
|
3817
3774
|
specification
|
|
3818
3775
|
}
|
|
3819
3776
|
};
|
|
3820
|
-
return env.requests.post(
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
"Content-Type": "application/json"
|
|
3826
|
-
}
|
|
3827
|
-
},
|
|
3828
|
-
service
|
|
3829
|
-
);
|
|
3777
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3778
|
+
headers: {
|
|
3779
|
+
"Content-Type": "application/json"
|
|
3780
|
+
}
|
|
3781
|
+
});
|
|
3830
3782
|
},
|
|
3831
3783
|
[env]
|
|
3832
3784
|
);
|
|
@@ -3837,8 +3789,7 @@ function useModelService() {
|
|
|
3837
3789
|
data = {},
|
|
3838
3790
|
specification = {},
|
|
3839
3791
|
context = {},
|
|
3840
|
-
path
|
|
3841
|
-
service
|
|
3792
|
+
path
|
|
3842
3793
|
}) => {
|
|
3843
3794
|
const jsonData = {
|
|
3844
3795
|
model,
|
|
@@ -3850,36 +3801,26 @@ function useModelService() {
|
|
|
3850
3801
|
specification
|
|
3851
3802
|
}
|
|
3852
3803
|
};
|
|
3853
|
-
return env.requests.post(
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
"Content-Type": "application/json"
|
|
3859
|
-
}
|
|
3860
|
-
},
|
|
3861
|
-
service
|
|
3862
|
-
);
|
|
3804
|
+
return env.requests.post(path ?? "/call" /* CALL_PATH */, jsonData, {
|
|
3805
|
+
headers: {
|
|
3806
|
+
"Content-Type": "application/json"
|
|
3807
|
+
}
|
|
3808
|
+
});
|
|
3863
3809
|
},
|
|
3864
3810
|
[env]
|
|
3865
3811
|
);
|
|
3866
3812
|
const deleteApi = useCallback8(
|
|
3867
|
-
async ({ ids = [], model
|
|
3813
|
+
async ({ ids = [], model }) => {
|
|
3868
3814
|
const jsonData = {
|
|
3869
3815
|
model,
|
|
3870
3816
|
method: "unlink" /* UNLINK */,
|
|
3871
3817
|
ids
|
|
3872
3818
|
};
|
|
3873
|
-
return env.requests.post(
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
"Content-Type": "application/json"
|
|
3879
|
-
}
|
|
3880
|
-
},
|
|
3881
|
-
service
|
|
3882
|
-
);
|
|
3819
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3820
|
+
headers: {
|
|
3821
|
+
"Content-Type": "application/json"
|
|
3822
|
+
}
|
|
3823
|
+
});
|
|
3883
3824
|
},
|
|
3884
3825
|
[env]
|
|
3885
3826
|
);
|
|
@@ -3890,8 +3831,7 @@ function useModelService() {
|
|
|
3890
3831
|
object,
|
|
3891
3832
|
specification,
|
|
3892
3833
|
context,
|
|
3893
|
-
fieldChange
|
|
3894
|
-
service
|
|
3834
|
+
fieldChange
|
|
3895
3835
|
}) => {
|
|
3896
3836
|
const jsonData = {
|
|
3897
3837
|
model,
|
|
@@ -3904,36 +3844,25 @@ function useModelService() {
|
|
|
3904
3844
|
specification
|
|
3905
3845
|
]
|
|
3906
3846
|
};
|
|
3907
|
-
return env.requests.post(
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
"Content-Type": "application/json"
|
|
3913
|
-
}
|
|
3914
|
-
},
|
|
3915
|
-
service
|
|
3916
|
-
);
|
|
3847
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3848
|
+
headers: {
|
|
3849
|
+
"Content-Type": "application/json"
|
|
3850
|
+
}
|
|
3851
|
+
});
|
|
3917
3852
|
},
|
|
3918
3853
|
[env]
|
|
3919
3854
|
);
|
|
3920
3855
|
const getListFieldsOnchange = useCallback8(
|
|
3921
|
-
async ({ model
|
|
3922
|
-
console.log("service", service);
|
|
3856
|
+
async ({ model }) => {
|
|
3923
3857
|
const jsonData = {
|
|
3924
3858
|
model,
|
|
3925
3859
|
method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
|
|
3926
3860
|
};
|
|
3927
|
-
return env.requests.post(
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
"Content-Type": "application/json"
|
|
3933
|
-
}
|
|
3934
|
-
},
|
|
3935
|
-
service
|
|
3936
|
-
);
|
|
3861
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3862
|
+
headers: {
|
|
3863
|
+
"Content-Type": "application/json"
|
|
3864
|
+
}
|
|
3865
|
+
});
|
|
3937
3866
|
},
|
|
3938
3867
|
[env]
|
|
3939
3868
|
);
|
|
@@ -4093,8 +4022,7 @@ function useViewService() {
|
|
|
4093
4022
|
views,
|
|
4094
4023
|
context = {},
|
|
4095
4024
|
options = {},
|
|
4096
|
-
aid
|
|
4097
|
-
service
|
|
4025
|
+
aid
|
|
4098
4026
|
}) => {
|
|
4099
4027
|
const defaultOptions = {
|
|
4100
4028
|
load_filters: true,
|
|
@@ -4110,16 +4038,11 @@ function useViewService() {
|
|
|
4110
4038
|
},
|
|
4111
4039
|
with_context: context
|
|
4112
4040
|
};
|
|
4113
|
-
return env?.requests?.post(
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
"Content-Type": "application/json"
|
|
4119
|
-
}
|
|
4120
|
-
},
|
|
4121
|
-
service
|
|
4122
|
-
);
|
|
4041
|
+
return env?.requests?.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
4042
|
+
headers: {
|
|
4043
|
+
"Content-Type": "application/json"
|
|
4044
|
+
}
|
|
4045
|
+
});
|
|
4123
4046
|
},
|
|
4124
4047
|
[env]
|
|
4125
4048
|
);
|
|
@@ -4202,7 +4125,7 @@ function useViewService() {
|
|
|
4202
4125
|
[env]
|
|
4203
4126
|
);
|
|
4204
4127
|
const getSelectionItem = useCallback10(
|
|
4205
|
-
async ({ data
|
|
4128
|
+
async ({ data }) => {
|
|
4206
4129
|
const jsonData = {
|
|
4207
4130
|
model: data.model,
|
|
4208
4131
|
ids: [],
|
|
@@ -4220,16 +4143,11 @@ function useViewService() {
|
|
|
4220
4143
|
}
|
|
4221
4144
|
}
|
|
4222
4145
|
};
|
|
4223
|
-
return env?.requests.post(
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
"Content-Type": "application/json"
|
|
4229
|
-
}
|
|
4230
|
-
},
|
|
4231
|
-
service
|
|
4232
|
-
);
|
|
4146
|
+
return env?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4147
|
+
headers: {
|
|
4148
|
+
"Content-Type": "application/json"
|
|
4149
|
+
}
|
|
4150
|
+
});
|
|
4233
4151
|
},
|
|
4234
4152
|
[env]
|
|
4235
4153
|
);
|
|
@@ -4588,11 +4506,8 @@ import { useMutation as useMutation12 } from "@tanstack/react-query";
|
|
|
4588
4506
|
var useValidateActionToken = () => {
|
|
4589
4507
|
const { isValidActionToken } = useAuthService();
|
|
4590
4508
|
return useMutation12({
|
|
4591
|
-
mutationFn: ({
|
|
4592
|
-
actionToken
|
|
4593
|
-
path
|
|
4594
|
-
}) => {
|
|
4595
|
-
return isValidActionToken(actionToken, path);
|
|
4509
|
+
mutationFn: ({ actionToken }) => {
|
|
4510
|
+
return isValidActionToken(actionToken);
|
|
4596
4511
|
}
|
|
4597
4512
|
});
|
|
4598
4513
|
};
|
|
@@ -4900,7 +4815,7 @@ import { useMutation as useMutation25 } from "@tanstack/react-query";
|
|
|
4900
4815
|
var useDelete = () => {
|
|
4901
4816
|
const { deleteApi } = useModelService();
|
|
4902
4817
|
return useMutation25({
|
|
4903
|
-
mutationFn: ({ ids, model
|
|
4818
|
+
mutationFn: ({ ids, model }) => deleteApi({ ids, model })
|
|
4904
4819
|
});
|
|
4905
4820
|
};
|
|
4906
4821
|
var use_delete_default = useDelete;
|
|
@@ -4963,14 +4878,12 @@ var useGetDetail = () => {
|
|
|
4963
4878
|
model,
|
|
4964
4879
|
ids,
|
|
4965
4880
|
specification,
|
|
4966
|
-
context
|
|
4967
|
-
service
|
|
4881
|
+
context
|
|
4968
4882
|
}) => getDetail({
|
|
4969
4883
|
model,
|
|
4970
4884
|
ids,
|
|
4971
4885
|
specification,
|
|
4972
|
-
context
|
|
4973
|
-
service
|
|
4886
|
+
context
|
|
4974
4887
|
})
|
|
4975
4888
|
});
|
|
4976
4889
|
};
|
|
@@ -4978,16 +4891,12 @@ var use_get_detail_default = useGetDetail;
|
|
|
4978
4891
|
|
|
4979
4892
|
// src/hooks/model/use-get-field-onchange.ts
|
|
4980
4893
|
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
4981
|
-
var useGetFieldOnChange = ({
|
|
4982
|
-
model,
|
|
4983
|
-
service
|
|
4984
|
-
}) => {
|
|
4894
|
+
var useGetFieldOnChange = ({ model }) => {
|
|
4985
4895
|
const { getListFieldsOnchange } = useModelService();
|
|
4986
4896
|
return useQuery9({
|
|
4987
4897
|
queryKey: [`field-onchange-${model}`, model],
|
|
4988
4898
|
queryFn: () => getListFieldsOnchange({
|
|
4989
|
-
model
|
|
4990
|
-
service
|
|
4899
|
+
model
|
|
4991
4900
|
}).then((res) => {
|
|
4992
4901
|
if (res) {
|
|
4993
4902
|
return res;
|
|
@@ -5170,16 +5079,14 @@ var useOnChangeForm = () => {
|
|
|
5170
5079
|
specification,
|
|
5171
5080
|
context,
|
|
5172
5081
|
object,
|
|
5173
|
-
fieldChange
|
|
5174
|
-
service
|
|
5082
|
+
fieldChange
|
|
5175
5083
|
}) => onChange({
|
|
5176
5084
|
ids,
|
|
5177
5085
|
model,
|
|
5178
5086
|
specification,
|
|
5179
5087
|
context,
|
|
5180
5088
|
object,
|
|
5181
|
-
fieldChange
|
|
5182
|
-
service
|
|
5089
|
+
fieldChange
|
|
5183
5090
|
})
|
|
5184
5091
|
});
|
|
5185
5092
|
};
|
|
@@ -5196,9 +5103,8 @@ var useSave = () => {
|
|
|
5196
5103
|
data,
|
|
5197
5104
|
specification,
|
|
5198
5105
|
context,
|
|
5199
|
-
path
|
|
5200
|
-
|
|
5201
|
-
}) => save({ ids, model, data, specification, context, path, service })
|
|
5106
|
+
path
|
|
5107
|
+
}) => save({ ids, model, data, specification, context, path })
|
|
5202
5108
|
});
|
|
5203
5109
|
};
|
|
5204
5110
|
var use_save_default = useSave;
|
|
@@ -5250,14 +5156,12 @@ var useButton = () => {
|
|
|
5250
5156
|
model,
|
|
5251
5157
|
ids,
|
|
5252
5158
|
context,
|
|
5253
|
-
method
|
|
5254
|
-
service
|
|
5159
|
+
method
|
|
5255
5160
|
}) => callButton({
|
|
5256
5161
|
model,
|
|
5257
5162
|
ids,
|
|
5258
5163
|
context,
|
|
5259
|
-
method
|
|
5260
|
-
service
|
|
5164
|
+
method
|
|
5261
5165
|
}),
|
|
5262
5166
|
onSuccess: (response) => {
|
|
5263
5167
|
return response;
|
|
@@ -5274,13 +5178,11 @@ var useDuplicateRecord = () => {
|
|
|
5274
5178
|
mutationFn: ({
|
|
5275
5179
|
id,
|
|
5276
5180
|
model,
|
|
5277
|
-
context
|
|
5278
|
-
service
|
|
5181
|
+
context
|
|
5279
5182
|
}) => duplicateRecord({
|
|
5280
5183
|
id,
|
|
5281
5184
|
model,
|
|
5282
|
-
context
|
|
5283
|
-
service
|
|
5185
|
+
context
|
|
5284
5186
|
})
|
|
5285
5187
|
});
|
|
5286
5188
|
};
|
|
@@ -5363,11 +5265,11 @@ var use_get_groups_default = useGetGroups;
|
|
|
5363
5265
|
|
|
5364
5266
|
// src/hooks/view/use-get-list-data.ts
|
|
5365
5267
|
import { useQuery as useQuery14 } from "@tanstack/react-query";
|
|
5366
|
-
var useGetListData = (listDataProps, queryKey, enabled
|
|
5268
|
+
var useGetListData = (listDataProps, queryKey, enabled) => {
|
|
5367
5269
|
const { getAll } = useModelService();
|
|
5368
5270
|
return useQuery14({
|
|
5369
5271
|
queryKey,
|
|
5370
|
-
queryFn: () => getAll({ data: listDataProps
|
|
5272
|
+
queryFn: () => getAll({ data: listDataProps }).then((res) => {
|
|
5371
5273
|
if (res) {
|
|
5372
5274
|
return res;
|
|
5373
5275
|
}
|
|
@@ -5443,13 +5345,12 @@ import { useQuery as useQuery17 } from "@tanstack/react-query";
|
|
|
5443
5345
|
var useGetSelection = ({
|
|
5444
5346
|
data,
|
|
5445
5347
|
queryKey,
|
|
5446
|
-
enabled
|
|
5447
|
-
service
|
|
5348
|
+
enabled
|
|
5448
5349
|
}) => {
|
|
5449
5350
|
const { getSelectionItem } = useViewService();
|
|
5450
5351
|
return useQuery17({
|
|
5451
5352
|
queryKey,
|
|
5452
|
-
queryFn: () => getSelectionItem({ data
|
|
5353
|
+
queryFn: () => getSelectionItem({ data }),
|
|
5453
5354
|
enabled,
|
|
5454
5355
|
refetchOnWindowFocus: false
|
|
5455
5356
|
});
|
|
@@ -5477,13 +5378,11 @@ var useLoadAction = () => {
|
|
|
5477
5378
|
return useMutation35({
|
|
5478
5379
|
mutationFn: ({
|
|
5479
5380
|
idAction,
|
|
5480
|
-
context
|
|
5481
|
-
service
|
|
5381
|
+
context
|
|
5482
5382
|
}) => {
|
|
5483
5383
|
return loadAction({
|
|
5484
5384
|
idAction,
|
|
5485
|
-
context
|
|
5486
|
-
service
|
|
5385
|
+
context
|
|
5487
5386
|
});
|
|
5488
5387
|
}
|
|
5489
5388
|
});
|
|
@@ -5524,13 +5423,11 @@ var useRemoveRow = () => {
|
|
|
5524
5423
|
mutationFn: ({
|
|
5525
5424
|
model,
|
|
5526
5425
|
ids,
|
|
5527
|
-
context
|
|
5528
|
-
service
|
|
5426
|
+
context
|
|
5529
5427
|
}) => removeRows({
|
|
5530
5428
|
model,
|
|
5531
5429
|
ids,
|
|
5532
|
-
context
|
|
5533
|
-
service
|
|
5430
|
+
context
|
|
5534
5431
|
})
|
|
5535
5432
|
});
|
|
5536
5433
|
};
|
|
@@ -5561,12 +5458,10 @@ var useRunAction = () => {
|
|
|
5561
5458
|
return useMutation38({
|
|
5562
5459
|
mutationFn: ({
|
|
5563
5460
|
idAction,
|
|
5564
|
-
context
|
|
5565
|
-
service
|
|
5461
|
+
context
|
|
5566
5462
|
}) => runAction({
|
|
5567
5463
|
idAction,
|
|
5568
|
-
context
|
|
5569
|
-
service
|
|
5464
|
+
context
|
|
5570
5465
|
})
|
|
5571
5466
|
});
|
|
5572
5467
|
};
|
package/dist/provider.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
import { L as LocalStorageUtilsType, S as SessionStorageUtilsType } from './session-storage-ARp_lhTD.mjs';
|
|
4
4
|
import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFile, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp } from './hooks.mjs';
|
|
5
5
|
import '@tanstack/react-query';
|
|
6
|
-
import './view-type-
|
|
6
|
+
import './view-type-BGJfDe73.mjs';
|
|
7
7
|
|
|
8
8
|
declare const MainProvider: ({ children }: {
|
|
9
9
|
children: ReactNode;
|
|
@@ -21,7 +21,6 @@ interface EnvConfig {
|
|
|
21
21
|
env?: any;
|
|
22
22
|
baseUrl?: string;
|
|
23
23
|
requests?: any;
|
|
24
|
-
default_service?: string;
|
|
25
24
|
context?: {
|
|
26
25
|
uid?: number | null;
|
|
27
26
|
allowed_company_ids?: number[];
|
package/dist/provider.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
import { L as LocalStorageUtilsType, S as SessionStorageUtilsType } from './session-storage-ARp_lhTD.js';
|
|
4
4
|
import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFile, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp } from './hooks.js';
|
|
5
5
|
import '@tanstack/react-query';
|
|
6
|
-
import './view-type-
|
|
6
|
+
import './view-type-BGJfDe73.js';
|
|
7
7
|
|
|
8
8
|
declare const MainProvider: ({ children }: {
|
|
9
9
|
children: ReactNode;
|
|
@@ -21,7 +21,6 @@ interface EnvConfig {
|
|
|
21
21
|
env?: any;
|
|
22
22
|
baseUrl?: string;
|
|
23
23
|
requests?: any;
|
|
24
|
-
default_service?: string;
|
|
25
24
|
context?: {
|
|
26
25
|
uid?: number | null;
|
|
27
26
|
allowed_company_ids?: number[];
|