@fctc/interface-logic 2.0.4 → 2.0.6
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 +40 -15
- package/dist/configs.mjs +40 -15
- package/dist/environment.js +40 -15
- package/dist/environment.mjs +40 -15
- package/dist/hooks.d.mts +15 -5
- package/dist/hooks.d.ts +15 -5
- package/dist/hooks.js +182 -187
- package/dist/hooks.mjs +182 -187
- package/dist/provider.d.mts +1 -1
- package/dist/provider.d.ts +1 -1
- package/dist/provider.js +222 -202
- package/dist/provider.mjs +222 -202
- package/dist/services.d.mts +23 -16
- package/dist/services.d.ts +23 -16
- package/dist/services.js +141 -162
- package/dist/services.mjs +141 -162
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -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 +85 -85
package/dist/hooks.mjs
CHANGED
|
@@ -2839,15 +2839,21 @@ function useActionService() {
|
|
|
2839
2839
|
const loadAction = useCallback2(
|
|
2840
2840
|
async ({
|
|
2841
2841
|
idAction,
|
|
2842
|
-
context
|
|
2842
|
+
context,
|
|
2843
|
+
service
|
|
2843
2844
|
}) => {
|
|
2844
2845
|
const jsonData = {
|
|
2845
2846
|
action_id: idAction,
|
|
2846
2847
|
with_context: { ...context }
|
|
2847
2848
|
};
|
|
2848
|
-
return env.requests.post(
|
|
2849
|
-
|
|
2850
|
-
|
|
2849
|
+
return env.requests.post(
|
|
2850
|
+
"/load_action" /* LOAD_ACTION */,
|
|
2851
|
+
jsonData,
|
|
2852
|
+
{
|
|
2853
|
+
headers: { "Content-Type": "application/json" }
|
|
2854
|
+
},
|
|
2855
|
+
service
|
|
2856
|
+
);
|
|
2851
2857
|
},
|
|
2852
2858
|
[env]
|
|
2853
2859
|
);
|
|
@@ -2856,7 +2862,8 @@ function useActionService() {
|
|
|
2856
2862
|
model,
|
|
2857
2863
|
ids = [],
|
|
2858
2864
|
context,
|
|
2859
|
-
method
|
|
2865
|
+
method,
|
|
2866
|
+
service
|
|
2860
2867
|
}) => {
|
|
2861
2868
|
try {
|
|
2862
2869
|
const jsonData = {
|
|
@@ -2865,9 +2872,14 @@ function useActionService() {
|
|
|
2865
2872
|
ids,
|
|
2866
2873
|
with_context: context
|
|
2867
2874
|
};
|
|
2868
|
-
return env.requests.post(
|
|
2869
|
-
|
|
2870
|
-
|
|
2875
|
+
return env.requests.post(
|
|
2876
|
+
"/call" /* CALL_PATH */,
|
|
2877
|
+
jsonData,
|
|
2878
|
+
{
|
|
2879
|
+
headers: { "Content-Type": "application/json" }
|
|
2880
|
+
},
|
|
2881
|
+
service
|
|
2882
|
+
);
|
|
2871
2883
|
} catch (error) {
|
|
2872
2884
|
console.error("Error when calling button action:", error);
|
|
2873
2885
|
throw error;
|
|
@@ -2879,7 +2891,8 @@ function useActionService() {
|
|
|
2879
2891
|
async ({
|
|
2880
2892
|
model,
|
|
2881
2893
|
ids,
|
|
2882
|
-
context
|
|
2894
|
+
context,
|
|
2895
|
+
service
|
|
2883
2896
|
}) => {
|
|
2884
2897
|
const jsonData = {
|
|
2885
2898
|
model,
|
|
@@ -2887,9 +2900,14 @@ function useActionService() {
|
|
|
2887
2900
|
ids,
|
|
2888
2901
|
with_context: context
|
|
2889
2902
|
};
|
|
2890
|
-
return env.requests.post(
|
|
2891
|
-
|
|
2892
|
-
|
|
2903
|
+
return env.requests.post(
|
|
2904
|
+
"/call" /* CALL_PATH */,
|
|
2905
|
+
jsonData,
|
|
2906
|
+
{
|
|
2907
|
+
headers: { "Content-Type": "application/json" }
|
|
2908
|
+
},
|
|
2909
|
+
service
|
|
2910
|
+
);
|
|
2893
2911
|
},
|
|
2894
2912
|
[env]
|
|
2895
2913
|
);
|
|
@@ -2897,7 +2915,8 @@ function useActionService() {
|
|
|
2897
2915
|
async ({
|
|
2898
2916
|
model,
|
|
2899
2917
|
id,
|
|
2900
|
-
context
|
|
2918
|
+
context,
|
|
2919
|
+
service
|
|
2901
2920
|
}) => {
|
|
2902
2921
|
const jsonData = {
|
|
2903
2922
|
model,
|
|
@@ -2905,9 +2924,14 @@ function useActionService() {
|
|
|
2905
2924
|
ids: id,
|
|
2906
2925
|
with_context: context
|
|
2907
2926
|
};
|
|
2908
|
-
return env.requests.post(
|
|
2909
|
-
|
|
2910
|
-
|
|
2927
|
+
return env.requests.post(
|
|
2928
|
+
"/call" /* CALL_PATH */,
|
|
2929
|
+
jsonData,
|
|
2930
|
+
{
|
|
2931
|
+
headers: { "Content-Type": "application/json" }
|
|
2932
|
+
},
|
|
2933
|
+
service
|
|
2934
|
+
);
|
|
2911
2935
|
},
|
|
2912
2936
|
[env]
|
|
2913
2937
|
);
|
|
@@ -2950,15 +2974,21 @@ function useActionService() {
|
|
|
2950
2974
|
const runAction = useCallback2(
|
|
2951
2975
|
async ({
|
|
2952
2976
|
idAction,
|
|
2953
|
-
context
|
|
2977
|
+
context,
|
|
2978
|
+
service
|
|
2954
2979
|
}) => {
|
|
2955
2980
|
const jsonData = {
|
|
2956
2981
|
action_id: idAction,
|
|
2957
2982
|
with_context: { ...context }
|
|
2958
2983
|
};
|
|
2959
|
-
return env.requests.post(
|
|
2960
|
-
|
|
2961
|
-
|
|
2984
|
+
return env.requests.post(
|
|
2985
|
+
"/run_action" /* RUN_ACTION_PATH */,
|
|
2986
|
+
jsonData,
|
|
2987
|
+
{
|
|
2988
|
+
headers: { "Content-Type": "application/json" }
|
|
2989
|
+
},
|
|
2990
|
+
service
|
|
2991
|
+
);
|
|
2962
2992
|
},
|
|
2963
2993
|
[env]
|
|
2964
2994
|
);
|
|
@@ -3239,11 +3269,7 @@ function useExcelService() {
|
|
|
3239
3269
|
const { env } = useEnv();
|
|
3240
3270
|
const uploadFile = useCallback5(
|
|
3241
3271
|
async ({ formData }) => {
|
|
3242
|
-
return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData
|
|
3243
|
-
headers: {
|
|
3244
|
-
"Content-Type": "multipart/form-data"
|
|
3245
|
-
}
|
|
3246
|
-
});
|
|
3272
|
+
return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData);
|
|
3247
3273
|
},
|
|
3248
3274
|
[env]
|
|
3249
3275
|
);
|
|
@@ -3487,12 +3513,8 @@ function useFormService() {
|
|
|
3487
3513
|
[env]
|
|
3488
3514
|
);
|
|
3489
3515
|
const uploadImage = useCallback6(
|
|
3490
|
-
async ({
|
|
3491
|
-
return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */,
|
|
3492
|
-
headers: {
|
|
3493
|
-
"Content-Type": "multipart/form-data"
|
|
3494
|
-
}
|
|
3495
|
-
});
|
|
3516
|
+
async ({ formData }) => {
|
|
3517
|
+
return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, formData);
|
|
3496
3518
|
},
|
|
3497
3519
|
[env]
|
|
3498
3520
|
);
|
|
@@ -3681,7 +3703,7 @@ function useModelService() {
|
|
|
3681
3703
|
});
|
|
3682
3704
|
}, [env]);
|
|
3683
3705
|
const getAll = useCallback8(
|
|
3684
|
-
async ({ data }) => {
|
|
3706
|
+
async ({ data, service }) => {
|
|
3685
3707
|
const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
3686
3708
|
fields: data.fields,
|
|
3687
3709
|
groupby: data.groupby
|
|
@@ -3702,11 +3724,16 @@ function useModelService() {
|
|
|
3702
3724
|
...jsonReadGroup
|
|
3703
3725
|
}
|
|
3704
3726
|
};
|
|
3705
|
-
return env.requests.post(
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3727
|
+
return env.requests.post(
|
|
3728
|
+
"/call" /* CALL_PATH */,
|
|
3729
|
+
jsonData,
|
|
3730
|
+
{
|
|
3731
|
+
headers: {
|
|
3732
|
+
"Content-Type": "application/json"
|
|
3733
|
+
}
|
|
3734
|
+
},
|
|
3735
|
+
service
|
|
3736
|
+
);
|
|
3710
3737
|
},
|
|
3711
3738
|
[env]
|
|
3712
3739
|
);
|
|
@@ -3774,7 +3801,13 @@ function useModelService() {
|
|
|
3774
3801
|
[env]
|
|
3775
3802
|
);
|
|
3776
3803
|
const getDetail = useCallback8(
|
|
3777
|
-
async ({
|
|
3804
|
+
async ({
|
|
3805
|
+
ids = [],
|
|
3806
|
+
model,
|
|
3807
|
+
specification,
|
|
3808
|
+
context,
|
|
3809
|
+
service
|
|
3810
|
+
}) => {
|
|
3778
3811
|
const jsonData = {
|
|
3779
3812
|
model,
|
|
3780
3813
|
method: "web_read" /* WEB_READ */,
|
|
@@ -3784,11 +3817,16 @@ function useModelService() {
|
|
|
3784
3817
|
specification
|
|
3785
3818
|
}
|
|
3786
3819
|
};
|
|
3787
|
-
return env.requests.post(
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3820
|
+
return env.requests.post(
|
|
3821
|
+
"/call" /* CALL_PATH */,
|
|
3822
|
+
jsonData,
|
|
3823
|
+
{
|
|
3824
|
+
headers: {
|
|
3825
|
+
"Content-Type": "application/json"
|
|
3826
|
+
}
|
|
3827
|
+
},
|
|
3828
|
+
service
|
|
3829
|
+
);
|
|
3792
3830
|
},
|
|
3793
3831
|
[env]
|
|
3794
3832
|
);
|
|
@@ -3799,7 +3837,8 @@ function useModelService() {
|
|
|
3799
3837
|
data = {},
|
|
3800
3838
|
specification = {},
|
|
3801
3839
|
context = {},
|
|
3802
|
-
path
|
|
3840
|
+
path,
|
|
3841
|
+
service
|
|
3803
3842
|
}) => {
|
|
3804
3843
|
const jsonData = {
|
|
3805
3844
|
model,
|
|
@@ -3811,26 +3850,36 @@ function useModelService() {
|
|
|
3811
3850
|
specification
|
|
3812
3851
|
}
|
|
3813
3852
|
};
|
|
3814
|
-
return env.requests.post(
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3853
|
+
return env.requests.post(
|
|
3854
|
+
path ?? "/call" /* CALL_PATH */,
|
|
3855
|
+
jsonData,
|
|
3856
|
+
{
|
|
3857
|
+
headers: {
|
|
3858
|
+
"Content-Type": "application/json"
|
|
3859
|
+
}
|
|
3860
|
+
},
|
|
3861
|
+
service
|
|
3862
|
+
);
|
|
3819
3863
|
},
|
|
3820
3864
|
[env]
|
|
3821
3865
|
);
|
|
3822
3866
|
const deleteApi = useCallback8(
|
|
3823
|
-
async ({ ids = [], model }) => {
|
|
3867
|
+
async ({ ids = [], model, service }) => {
|
|
3824
3868
|
const jsonData = {
|
|
3825
3869
|
model,
|
|
3826
3870
|
method: "unlink" /* UNLINK */,
|
|
3827
3871
|
ids
|
|
3828
3872
|
};
|
|
3829
|
-
return env.requests.post(
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3873
|
+
return env.requests.post(
|
|
3874
|
+
"/call" /* CALL_PATH */,
|
|
3875
|
+
jsonData,
|
|
3876
|
+
{
|
|
3877
|
+
headers: {
|
|
3878
|
+
"Content-Type": "application/json"
|
|
3879
|
+
}
|
|
3880
|
+
},
|
|
3881
|
+
service
|
|
3882
|
+
);
|
|
3834
3883
|
},
|
|
3835
3884
|
[env]
|
|
3836
3885
|
);
|
|
@@ -3841,7 +3890,8 @@ function useModelService() {
|
|
|
3841
3890
|
object,
|
|
3842
3891
|
specification,
|
|
3843
3892
|
context,
|
|
3844
|
-
fieldChange
|
|
3893
|
+
fieldChange,
|
|
3894
|
+
service
|
|
3845
3895
|
}) => {
|
|
3846
3896
|
const jsonData = {
|
|
3847
3897
|
model,
|
|
@@ -3854,11 +3904,16 @@ function useModelService() {
|
|
|
3854
3904
|
specification
|
|
3855
3905
|
]
|
|
3856
3906
|
};
|
|
3857
|
-
return env.requests.post(
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3907
|
+
return env.requests.post(
|
|
3908
|
+
"/call" /* CALL_PATH */,
|
|
3909
|
+
jsonData,
|
|
3910
|
+
{
|
|
3911
|
+
headers: {
|
|
3912
|
+
"Content-Type": "application/json"
|
|
3913
|
+
}
|
|
3914
|
+
},
|
|
3915
|
+
service
|
|
3916
|
+
);
|
|
3862
3917
|
},
|
|
3863
3918
|
[env]
|
|
3864
3919
|
);
|
|
@@ -4032,7 +4087,8 @@ function useViewService() {
|
|
|
4032
4087
|
views,
|
|
4033
4088
|
context = {},
|
|
4034
4089
|
options = {},
|
|
4035
|
-
aid
|
|
4090
|
+
aid,
|
|
4091
|
+
service
|
|
4036
4092
|
}) => {
|
|
4037
4093
|
const defaultOptions = {
|
|
4038
4094
|
load_filters: true,
|
|
@@ -4048,110 +4104,28 @@ function useViewService() {
|
|
|
4048
4104
|
},
|
|
4049
4105
|
with_context: context
|
|
4050
4106
|
};
|
|
4051
|
-
return env?.requests?.post(
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4107
|
+
return env?.requests?.post(
|
|
4108
|
+
"/call" /* CALL_PATH */,
|
|
4109
|
+
jsonDataView,
|
|
4110
|
+
{
|
|
4111
|
+
headers: {
|
|
4112
|
+
"Content-Type": "application/json"
|
|
4113
|
+
}
|
|
4114
|
+
},
|
|
4115
|
+
service
|
|
4116
|
+
);
|
|
4056
4117
|
},
|
|
4057
4118
|
[env]
|
|
4058
4119
|
);
|
|
4059
4120
|
const getMenu = useCallback10(
|
|
4060
|
-
async (context) => {
|
|
4121
|
+
async (context, specification) => {
|
|
4061
4122
|
const jsonData = {
|
|
4062
4123
|
model: "ir.ui.menu" /* MENU */,
|
|
4063
4124
|
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
4064
4125
|
ids: [],
|
|
4065
4126
|
with_context: context,
|
|
4066
4127
|
kwargs: {
|
|
4067
|
-
specification
|
|
4068
|
-
active: {},
|
|
4069
|
-
name: {},
|
|
4070
|
-
is_display: {},
|
|
4071
|
-
sequence: {},
|
|
4072
|
-
complete_name: {},
|
|
4073
|
-
action: {
|
|
4074
|
-
fields: {
|
|
4075
|
-
display_name: {},
|
|
4076
|
-
type: {},
|
|
4077
|
-
binding_view_types: {}
|
|
4078
|
-
}
|
|
4079
|
-
},
|
|
4080
|
-
url_icon: {},
|
|
4081
|
-
web_icon: {},
|
|
4082
|
-
web_icon_data: {},
|
|
4083
|
-
groups_id: {
|
|
4084
|
-
fields: {
|
|
4085
|
-
full_name: {}
|
|
4086
|
-
},
|
|
4087
|
-
limit: 40,
|
|
4088
|
-
order: ""
|
|
4089
|
-
},
|
|
4090
|
-
display_name: {},
|
|
4091
|
-
child_id: {
|
|
4092
|
-
fields: {
|
|
4093
|
-
active: {},
|
|
4094
|
-
name: {},
|
|
4095
|
-
is_display: {},
|
|
4096
|
-
sequence: {},
|
|
4097
|
-
complete_name: {},
|
|
4098
|
-
action: {
|
|
4099
|
-
fields: {
|
|
4100
|
-
display_name: {},
|
|
4101
|
-
type: {},
|
|
4102
|
-
binding_view_types: {}
|
|
4103
|
-
}
|
|
4104
|
-
},
|
|
4105
|
-
url_icon: {},
|
|
4106
|
-
web_icon: {},
|
|
4107
|
-
web_icon_data: {},
|
|
4108
|
-
groups_id: {
|
|
4109
|
-
fields: {
|
|
4110
|
-
full_name: {}
|
|
4111
|
-
},
|
|
4112
|
-
limit: 40,
|
|
4113
|
-
order: ""
|
|
4114
|
-
},
|
|
4115
|
-
display_name: {},
|
|
4116
|
-
child_id: {
|
|
4117
|
-
fields: {
|
|
4118
|
-
active: {},
|
|
4119
|
-
name: {},
|
|
4120
|
-
is_display: {},
|
|
4121
|
-
sequence: {},
|
|
4122
|
-
complete_name: {},
|
|
4123
|
-
action: {
|
|
4124
|
-
fields: {
|
|
4125
|
-
display_name: {},
|
|
4126
|
-
type: {},
|
|
4127
|
-
binding_view_types: {}
|
|
4128
|
-
}
|
|
4129
|
-
},
|
|
4130
|
-
url_icon: {},
|
|
4131
|
-
web_icon: {},
|
|
4132
|
-
web_icon_data: {},
|
|
4133
|
-
groups_id: {
|
|
4134
|
-
fields: {
|
|
4135
|
-
full_name: {}
|
|
4136
|
-
},
|
|
4137
|
-
limit: 40,
|
|
4138
|
-
order: ""
|
|
4139
|
-
},
|
|
4140
|
-
display_name: {},
|
|
4141
|
-
child_id: {
|
|
4142
|
-
fields: {},
|
|
4143
|
-
limit: 40,
|
|
4144
|
-
order: ""
|
|
4145
|
-
}
|
|
4146
|
-
},
|
|
4147
|
-
limit: 40,
|
|
4148
|
-
order: ""
|
|
4149
|
-
}
|
|
4150
|
-
},
|
|
4151
|
-
limit: 40,
|
|
4152
|
-
order: ""
|
|
4153
|
-
}
|
|
4154
|
-
},
|
|
4128
|
+
specification,
|
|
4155
4129
|
domain: [
|
|
4156
4130
|
"&",
|
|
4157
4131
|
["is_display", "=", true],
|
|
@@ -4222,7 +4196,7 @@ function useViewService() {
|
|
|
4222
4196
|
[env]
|
|
4223
4197
|
);
|
|
4224
4198
|
const getSelectionItem = useCallback10(
|
|
4225
|
-
async ({ data }) => {
|
|
4199
|
+
async ({ data, service }) => {
|
|
4226
4200
|
const jsonData = {
|
|
4227
4201
|
model: data.model,
|
|
4228
4202
|
ids: [],
|
|
@@ -4240,11 +4214,16 @@ function useViewService() {
|
|
|
4240
4214
|
}
|
|
4241
4215
|
}
|
|
4242
4216
|
};
|
|
4243
|
-
return env?.requests.post(
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4217
|
+
return env?.requests.post(
|
|
4218
|
+
"/call" /* CALL_PATH */,
|
|
4219
|
+
jsonData,
|
|
4220
|
+
{
|
|
4221
|
+
headers: {
|
|
4222
|
+
"Content-Type": "application/json"
|
|
4223
|
+
}
|
|
4224
|
+
},
|
|
4225
|
+
service
|
|
4226
|
+
);
|
|
4248
4227
|
},
|
|
4249
4228
|
[env]
|
|
4250
4229
|
);
|
|
@@ -4903,8 +4882,8 @@ import { useMutation as useMutation24 } from "@tanstack/react-query";
|
|
|
4903
4882
|
var useUploadImage = () => {
|
|
4904
4883
|
const { uploadImage } = useFormService();
|
|
4905
4884
|
return useMutation24({
|
|
4906
|
-
mutationFn: ({
|
|
4907
|
-
|
|
4885
|
+
mutationFn: ({ formData }) => uploadImage({
|
|
4886
|
+
formData
|
|
4908
4887
|
})
|
|
4909
4888
|
});
|
|
4910
4889
|
};
|
|
@@ -4915,7 +4894,7 @@ import { useMutation as useMutation25 } from "@tanstack/react-query";
|
|
|
4915
4894
|
var useDelete = () => {
|
|
4916
4895
|
const { deleteApi } = useModelService();
|
|
4917
4896
|
return useMutation25({
|
|
4918
|
-
mutationFn: ({ ids, model }) => deleteApi({ ids, model })
|
|
4897
|
+
mutationFn: ({ ids, model, service }) => deleteApi({ ids, model, service })
|
|
4919
4898
|
});
|
|
4920
4899
|
};
|
|
4921
4900
|
var use_delete_default = useDelete;
|
|
@@ -4978,12 +4957,14 @@ var useGetDetail = () => {
|
|
|
4978
4957
|
model,
|
|
4979
4958
|
ids,
|
|
4980
4959
|
specification,
|
|
4981
|
-
context
|
|
4960
|
+
context,
|
|
4961
|
+
service
|
|
4982
4962
|
}) => getDetail({
|
|
4983
4963
|
model,
|
|
4984
4964
|
ids,
|
|
4985
4965
|
specification,
|
|
4986
|
-
context
|
|
4966
|
+
context,
|
|
4967
|
+
service
|
|
4987
4968
|
})
|
|
4988
4969
|
});
|
|
4989
4970
|
};
|
|
@@ -5179,14 +5160,16 @@ var useOnChangeForm = () => {
|
|
|
5179
5160
|
specification,
|
|
5180
5161
|
context,
|
|
5181
5162
|
object,
|
|
5182
|
-
fieldChange
|
|
5163
|
+
fieldChange,
|
|
5164
|
+
service
|
|
5183
5165
|
}) => onChange({
|
|
5184
5166
|
ids,
|
|
5185
5167
|
model,
|
|
5186
5168
|
specification,
|
|
5187
5169
|
context,
|
|
5188
5170
|
object,
|
|
5189
|
-
fieldChange
|
|
5171
|
+
fieldChange,
|
|
5172
|
+
service
|
|
5190
5173
|
})
|
|
5191
5174
|
});
|
|
5192
5175
|
};
|
|
@@ -5203,8 +5186,9 @@ var useSave = () => {
|
|
|
5203
5186
|
data,
|
|
5204
5187
|
specification,
|
|
5205
5188
|
context,
|
|
5206
|
-
path
|
|
5207
|
-
|
|
5189
|
+
path,
|
|
5190
|
+
service
|
|
5191
|
+
}) => save({ ids, model, data, specification, context, path, service })
|
|
5208
5192
|
});
|
|
5209
5193
|
};
|
|
5210
5194
|
var use_save_default = useSave;
|
|
@@ -5256,12 +5240,14 @@ var useButton = () => {
|
|
|
5256
5240
|
model,
|
|
5257
5241
|
ids,
|
|
5258
5242
|
context,
|
|
5259
|
-
method
|
|
5243
|
+
method,
|
|
5244
|
+
service
|
|
5260
5245
|
}) => callButton({
|
|
5261
5246
|
model,
|
|
5262
5247
|
ids,
|
|
5263
5248
|
context,
|
|
5264
|
-
method
|
|
5249
|
+
method,
|
|
5250
|
+
service
|
|
5265
5251
|
}),
|
|
5266
5252
|
onSuccess: (response) => {
|
|
5267
5253
|
return response;
|
|
@@ -5278,11 +5264,13 @@ var useDuplicateRecord = () => {
|
|
|
5278
5264
|
mutationFn: ({
|
|
5279
5265
|
id,
|
|
5280
5266
|
model,
|
|
5281
|
-
context
|
|
5267
|
+
context,
|
|
5268
|
+
service
|
|
5282
5269
|
}) => duplicateRecord({
|
|
5283
5270
|
id,
|
|
5284
5271
|
model,
|
|
5285
|
-
context
|
|
5272
|
+
context,
|
|
5273
|
+
service
|
|
5286
5274
|
})
|
|
5287
5275
|
});
|
|
5288
5276
|
};
|
|
@@ -5365,11 +5353,11 @@ var use_get_groups_default = useGetGroups;
|
|
|
5365
5353
|
|
|
5366
5354
|
// src/hooks/view/use-get-list-data.ts
|
|
5367
5355
|
import { useQuery as useQuery14 } from "@tanstack/react-query";
|
|
5368
|
-
var useGetListData = (listDataProps, queryKey, enabled) => {
|
|
5356
|
+
var useGetListData = (listDataProps, queryKey, enabled, service) => {
|
|
5369
5357
|
const { getAll } = useModelService();
|
|
5370
5358
|
return useQuery14({
|
|
5371
5359
|
queryKey,
|
|
5372
|
-
queryFn: () => getAll({ data: listDataProps }).then((res) => {
|
|
5360
|
+
queryFn: () => getAll({ data: listDataProps, service }).then((res) => {
|
|
5373
5361
|
if (res) {
|
|
5374
5362
|
return res;
|
|
5375
5363
|
}
|
|
@@ -5384,11 +5372,11 @@ var use_get_list_data_default = useGetListData;
|
|
|
5384
5372
|
|
|
5385
5373
|
// src/hooks/view/use-get-menu.ts
|
|
5386
5374
|
import { useQuery as useQuery15 } from "@tanstack/react-query";
|
|
5387
|
-
var useGetMenu = (context, enabled) => {
|
|
5375
|
+
var useGetMenu = (context, specification, enabled) => {
|
|
5388
5376
|
const { getMenu } = useViewService();
|
|
5389
5377
|
return useQuery15({
|
|
5390
5378
|
queryKey: ["menus" /* MENU */, context],
|
|
5391
|
-
queryFn: () => getMenu(context).then((res) => {
|
|
5379
|
+
queryFn: () => getMenu(context, specification).then((res) => {
|
|
5392
5380
|
if (res && res?.records && res?.records?.length > 0) {
|
|
5393
5381
|
return res?.records;
|
|
5394
5382
|
}
|
|
@@ -5445,12 +5433,13 @@ import { useQuery as useQuery17 } from "@tanstack/react-query";
|
|
|
5445
5433
|
var useGetSelection = ({
|
|
5446
5434
|
data,
|
|
5447
5435
|
queryKey,
|
|
5448
|
-
enabled
|
|
5436
|
+
enabled,
|
|
5437
|
+
service
|
|
5449
5438
|
}) => {
|
|
5450
5439
|
const { getSelectionItem } = useViewService();
|
|
5451
5440
|
return useQuery17({
|
|
5452
5441
|
queryKey,
|
|
5453
|
-
queryFn: () => getSelectionItem({ data }),
|
|
5442
|
+
queryFn: () => getSelectionItem({ data, service }),
|
|
5454
5443
|
enabled,
|
|
5455
5444
|
refetchOnWindowFocus: false
|
|
5456
5445
|
});
|
|
@@ -5478,11 +5467,13 @@ var useLoadAction = () => {
|
|
|
5478
5467
|
return useMutation35({
|
|
5479
5468
|
mutationFn: ({
|
|
5480
5469
|
idAction,
|
|
5481
|
-
context
|
|
5470
|
+
context,
|
|
5471
|
+
service
|
|
5482
5472
|
}) => {
|
|
5483
5473
|
return loadAction({
|
|
5484
5474
|
idAction,
|
|
5485
|
-
context
|
|
5475
|
+
context,
|
|
5476
|
+
service
|
|
5486
5477
|
});
|
|
5487
5478
|
}
|
|
5488
5479
|
});
|
|
@@ -5523,11 +5514,13 @@ var useRemoveRow = () => {
|
|
|
5523
5514
|
mutationFn: ({
|
|
5524
5515
|
model,
|
|
5525
5516
|
ids,
|
|
5526
|
-
context
|
|
5517
|
+
context,
|
|
5518
|
+
service
|
|
5527
5519
|
}) => removeRows({
|
|
5528
5520
|
model,
|
|
5529
5521
|
ids,
|
|
5530
|
-
context
|
|
5522
|
+
context,
|
|
5523
|
+
service
|
|
5531
5524
|
})
|
|
5532
5525
|
});
|
|
5533
5526
|
};
|
|
@@ -5558,10 +5551,12 @@ var useRunAction = () => {
|
|
|
5558
5551
|
return useMutation38({
|
|
5559
5552
|
mutationFn: ({
|
|
5560
5553
|
idAction,
|
|
5561
|
-
context
|
|
5554
|
+
context,
|
|
5555
|
+
service
|
|
5562
5556
|
}) => runAction({
|
|
5563
5557
|
idAction,
|
|
5564
|
-
context
|
|
5558
|
+
context,
|
|
5559
|
+
service
|
|
5565
5560
|
})
|
|
5566
5561
|
});
|
|
5567
5562
|
};
|
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-p4JdAOsz.mjs';
|
|
7
7
|
|
|
8
8
|
declare const MainProvider: ({ children }: {
|
|
9
9
|
children: ReactNode;
|
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-p4JdAOsz.js';
|
|
7
7
|
|
|
8
8
|
declare const MainProvider: ({ children }: {
|
|
9
9
|
children: ReactNode;
|