@fctc/interface-logic 2.2.2 → 2.2.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 +41 -14
- package/dist/configs.mjs +41 -14
- package/dist/environment.js +41 -14
- package/dist/environment.mjs +41 -14
- package/dist/hooks.d.mts +15 -4
- package/dist/hooks.d.ts +15 -4
- package/dist/hooks.js +194 -99
- package/dist/hooks.mjs +194 -99
- package/dist/provider.d.mts +2 -1
- package/dist/provider.d.ts +2 -1
- package/dist/provider.js +235 -113
- package/dist/provider.mjs +235 -113
- package/dist/services.d.mts +22 -14
- package/dist/services.d.ts +22 -14
- package/dist/services.js +151 -76
- package/dist/services.mjs +151 -76
- 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/provider.js
CHANGED
|
@@ -2892,15 +2892,21 @@ function useActionService() {
|
|
|
2892
2892
|
const loadAction = (0, import_react2.useCallback)(
|
|
2893
2893
|
async ({
|
|
2894
2894
|
idAction,
|
|
2895
|
-
context
|
|
2895
|
+
context,
|
|
2896
|
+
service
|
|
2896
2897
|
}) => {
|
|
2897
2898
|
const jsonData = {
|
|
2898
2899
|
action_id: idAction,
|
|
2899
2900
|
with_context: { ...context }
|
|
2900
2901
|
};
|
|
2901
|
-
return env.requests.post(
|
|
2902
|
-
|
|
2903
|
-
|
|
2902
|
+
return env.requests.post(
|
|
2903
|
+
"/load_action" /* LOAD_ACTION */,
|
|
2904
|
+
jsonData,
|
|
2905
|
+
{
|
|
2906
|
+
headers: { "Content-Type": "application/json" }
|
|
2907
|
+
},
|
|
2908
|
+
service
|
|
2909
|
+
);
|
|
2904
2910
|
},
|
|
2905
2911
|
[env]
|
|
2906
2912
|
);
|
|
@@ -2909,7 +2915,8 @@ function useActionService() {
|
|
|
2909
2915
|
model,
|
|
2910
2916
|
ids = [],
|
|
2911
2917
|
context,
|
|
2912
|
-
method
|
|
2918
|
+
method,
|
|
2919
|
+
service
|
|
2913
2920
|
}) => {
|
|
2914
2921
|
try {
|
|
2915
2922
|
const jsonData = {
|
|
@@ -2918,9 +2925,14 @@ function useActionService() {
|
|
|
2918
2925
|
ids,
|
|
2919
2926
|
with_context: context
|
|
2920
2927
|
};
|
|
2921
|
-
return env.requests.post(
|
|
2922
|
-
|
|
2923
|
-
|
|
2928
|
+
return env.requests.post(
|
|
2929
|
+
"/call" /* CALL_PATH */,
|
|
2930
|
+
jsonData,
|
|
2931
|
+
{
|
|
2932
|
+
headers: { "Content-Type": "application/json" }
|
|
2933
|
+
},
|
|
2934
|
+
service
|
|
2935
|
+
);
|
|
2924
2936
|
} catch (error) {
|
|
2925
2937
|
console.error("Error when calling button action:", error);
|
|
2926
2938
|
throw error;
|
|
@@ -2932,7 +2944,8 @@ function useActionService() {
|
|
|
2932
2944
|
async ({
|
|
2933
2945
|
model,
|
|
2934
2946
|
ids,
|
|
2935
|
-
context
|
|
2947
|
+
context,
|
|
2948
|
+
service
|
|
2936
2949
|
}) => {
|
|
2937
2950
|
const jsonData = {
|
|
2938
2951
|
model,
|
|
@@ -2940,9 +2953,14 @@ function useActionService() {
|
|
|
2940
2953
|
ids,
|
|
2941
2954
|
with_context: context
|
|
2942
2955
|
};
|
|
2943
|
-
return env.requests.post(
|
|
2944
|
-
|
|
2945
|
-
|
|
2956
|
+
return env.requests.post(
|
|
2957
|
+
"/call" /* CALL_PATH */,
|
|
2958
|
+
jsonData,
|
|
2959
|
+
{
|
|
2960
|
+
headers: { "Content-Type": "application/json" }
|
|
2961
|
+
},
|
|
2962
|
+
service
|
|
2963
|
+
);
|
|
2946
2964
|
},
|
|
2947
2965
|
[env]
|
|
2948
2966
|
);
|
|
@@ -2950,7 +2968,8 @@ function useActionService() {
|
|
|
2950
2968
|
async ({
|
|
2951
2969
|
model,
|
|
2952
2970
|
id,
|
|
2953
|
-
context
|
|
2971
|
+
context,
|
|
2972
|
+
service
|
|
2954
2973
|
}) => {
|
|
2955
2974
|
const jsonData = {
|
|
2956
2975
|
model,
|
|
@@ -2958,9 +2977,14 @@ function useActionService() {
|
|
|
2958
2977
|
ids: id,
|
|
2959
2978
|
with_context: context
|
|
2960
2979
|
};
|
|
2961
|
-
return env.requests.post(
|
|
2962
|
-
|
|
2963
|
-
|
|
2980
|
+
return env.requests.post(
|
|
2981
|
+
"/call" /* CALL_PATH */,
|
|
2982
|
+
jsonData,
|
|
2983
|
+
{
|
|
2984
|
+
headers: { "Content-Type": "application/json" }
|
|
2985
|
+
},
|
|
2986
|
+
service
|
|
2987
|
+
);
|
|
2964
2988
|
},
|
|
2965
2989
|
[env]
|
|
2966
2990
|
);
|
|
@@ -3003,15 +3027,21 @@ function useActionService() {
|
|
|
3003
3027
|
const runAction = (0, import_react2.useCallback)(
|
|
3004
3028
|
async ({
|
|
3005
3029
|
idAction,
|
|
3006
|
-
context
|
|
3030
|
+
context,
|
|
3031
|
+
service
|
|
3007
3032
|
}) => {
|
|
3008
3033
|
const jsonData = {
|
|
3009
3034
|
action_id: idAction,
|
|
3010
3035
|
with_context: { ...context }
|
|
3011
3036
|
};
|
|
3012
|
-
return env.requests.post(
|
|
3013
|
-
|
|
3014
|
-
|
|
3037
|
+
return env.requests.post(
|
|
3038
|
+
"/run_action" /* RUN_ACTION_PATH */,
|
|
3039
|
+
jsonData,
|
|
3040
|
+
{
|
|
3041
|
+
headers: { "Content-Type": "application/json" }
|
|
3042
|
+
},
|
|
3043
|
+
service
|
|
3044
|
+
);
|
|
3015
3045
|
},
|
|
3016
3046
|
[env]
|
|
3017
3047
|
);
|
|
@@ -3197,15 +3227,11 @@ function useAuthService() {
|
|
|
3197
3227
|
data.append("grant_type", "authorization_code");
|
|
3198
3228
|
data.append("client_id", env?.config?.clientId || "");
|
|
3199
3229
|
data.append("redirect_uri", env?.config?.redirectUri || "");
|
|
3200
|
-
return env?.requests?.post(
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
{
|
|
3204
|
-
headers: {
|
|
3205
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
3206
|
-
}
|
|
3230
|
+
return env?.requests?.post("/token" /* TOKEN_BY_CODE */, data, {
|
|
3231
|
+
headers: {
|
|
3232
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
3207
3233
|
}
|
|
3208
|
-
);
|
|
3234
|
+
});
|
|
3209
3235
|
},
|
|
3210
3236
|
[env]
|
|
3211
3237
|
);
|
|
@@ -3723,7 +3749,7 @@ function useModelService() {
|
|
|
3723
3749
|
});
|
|
3724
3750
|
}, [env]);
|
|
3725
3751
|
const getAll = (0, import_react8.useCallback)(
|
|
3726
|
-
async ({ data }) => {
|
|
3752
|
+
async ({ data, service }) => {
|
|
3727
3753
|
const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
3728
3754
|
fields: data.fields,
|
|
3729
3755
|
groupby: data.groupby
|
|
@@ -3744,11 +3770,16 @@ function useModelService() {
|
|
|
3744
3770
|
...jsonReadGroup
|
|
3745
3771
|
}
|
|
3746
3772
|
};
|
|
3747
|
-
return env.requests.post(
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3773
|
+
return env.requests.post(
|
|
3774
|
+
"/call" /* CALL_PATH */,
|
|
3775
|
+
jsonData,
|
|
3776
|
+
{
|
|
3777
|
+
headers: {
|
|
3778
|
+
"Content-Type": "application/json"
|
|
3779
|
+
}
|
|
3780
|
+
},
|
|
3781
|
+
service
|
|
3782
|
+
);
|
|
3752
3783
|
},
|
|
3753
3784
|
[env]
|
|
3754
3785
|
);
|
|
@@ -3816,7 +3847,13 @@ function useModelService() {
|
|
|
3816
3847
|
[env]
|
|
3817
3848
|
);
|
|
3818
3849
|
const getDetail = (0, import_react8.useCallback)(
|
|
3819
|
-
async ({
|
|
3850
|
+
async ({
|
|
3851
|
+
ids = [],
|
|
3852
|
+
model,
|
|
3853
|
+
specification,
|
|
3854
|
+
context,
|
|
3855
|
+
service
|
|
3856
|
+
}) => {
|
|
3820
3857
|
const jsonData = {
|
|
3821
3858
|
model,
|
|
3822
3859
|
method: "web_read" /* WEB_READ */,
|
|
@@ -3826,11 +3863,16 @@ function useModelService() {
|
|
|
3826
3863
|
specification
|
|
3827
3864
|
}
|
|
3828
3865
|
};
|
|
3829
|
-
return env.requests.post(
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3866
|
+
return env.requests.post(
|
|
3867
|
+
"/call" /* CALL_PATH */,
|
|
3868
|
+
jsonData,
|
|
3869
|
+
{
|
|
3870
|
+
headers: {
|
|
3871
|
+
"Content-Type": "application/json"
|
|
3872
|
+
}
|
|
3873
|
+
},
|
|
3874
|
+
service
|
|
3875
|
+
);
|
|
3834
3876
|
},
|
|
3835
3877
|
[env]
|
|
3836
3878
|
);
|
|
@@ -3841,7 +3883,8 @@ function useModelService() {
|
|
|
3841
3883
|
data = {},
|
|
3842
3884
|
specification = {},
|
|
3843
3885
|
context = {},
|
|
3844
|
-
path
|
|
3886
|
+
path,
|
|
3887
|
+
service
|
|
3845
3888
|
}) => {
|
|
3846
3889
|
const jsonData = {
|
|
3847
3890
|
model,
|
|
@@ -3853,26 +3896,36 @@ function useModelService() {
|
|
|
3853
3896
|
specification
|
|
3854
3897
|
}
|
|
3855
3898
|
};
|
|
3856
|
-
return env.requests.post(
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3899
|
+
return env.requests.post(
|
|
3900
|
+
path ?? "/call" /* CALL_PATH */,
|
|
3901
|
+
jsonData,
|
|
3902
|
+
{
|
|
3903
|
+
headers: {
|
|
3904
|
+
"Content-Type": "application/json"
|
|
3905
|
+
}
|
|
3906
|
+
},
|
|
3907
|
+
service
|
|
3908
|
+
);
|
|
3861
3909
|
},
|
|
3862
3910
|
[env]
|
|
3863
3911
|
);
|
|
3864
3912
|
const deleteApi = (0, import_react8.useCallback)(
|
|
3865
|
-
async ({ ids = [], model }) => {
|
|
3913
|
+
async ({ ids = [], model, service }) => {
|
|
3866
3914
|
const jsonData = {
|
|
3867
3915
|
model,
|
|
3868
3916
|
method: "unlink" /* UNLINK */,
|
|
3869
3917
|
ids
|
|
3870
3918
|
};
|
|
3871
|
-
return env.requests.post(
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3919
|
+
return env.requests.post(
|
|
3920
|
+
"/call" /* CALL_PATH */,
|
|
3921
|
+
jsonData,
|
|
3922
|
+
{
|
|
3923
|
+
headers: {
|
|
3924
|
+
"Content-Type": "application/json"
|
|
3925
|
+
}
|
|
3926
|
+
},
|
|
3927
|
+
service
|
|
3928
|
+
);
|
|
3876
3929
|
},
|
|
3877
3930
|
[env]
|
|
3878
3931
|
);
|
|
@@ -3883,7 +3936,8 @@ function useModelService() {
|
|
|
3883
3936
|
object,
|
|
3884
3937
|
specification,
|
|
3885
3938
|
context,
|
|
3886
|
-
fieldChange
|
|
3939
|
+
fieldChange,
|
|
3940
|
+
service
|
|
3887
3941
|
}) => {
|
|
3888
3942
|
const jsonData = {
|
|
3889
3943
|
model,
|
|
@@ -3896,25 +3950,35 @@ function useModelService() {
|
|
|
3896
3950
|
specification
|
|
3897
3951
|
]
|
|
3898
3952
|
};
|
|
3899
|
-
return env.requests.post(
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3953
|
+
return env.requests.post(
|
|
3954
|
+
"/call" /* CALL_PATH */,
|
|
3955
|
+
jsonData,
|
|
3956
|
+
{
|
|
3957
|
+
headers: {
|
|
3958
|
+
"Content-Type": "application/json"
|
|
3959
|
+
}
|
|
3960
|
+
},
|
|
3961
|
+
service
|
|
3962
|
+
);
|
|
3904
3963
|
},
|
|
3905
3964
|
[env]
|
|
3906
3965
|
);
|
|
3907
3966
|
const getListFieldsOnchange = (0, import_react8.useCallback)(
|
|
3908
|
-
async ({ model }) => {
|
|
3967
|
+
async ({ model, service }) => {
|
|
3909
3968
|
const jsonData = {
|
|
3910
3969
|
model,
|
|
3911
3970
|
method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
|
|
3912
3971
|
};
|
|
3913
|
-
return env.requests.post(
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3972
|
+
return env.requests.post(
|
|
3973
|
+
"/call" /* CALL_PATH */,
|
|
3974
|
+
jsonData,
|
|
3975
|
+
{
|
|
3976
|
+
headers: {
|
|
3977
|
+
"Content-Type": "application/json"
|
|
3978
|
+
}
|
|
3979
|
+
},
|
|
3980
|
+
service
|
|
3981
|
+
);
|
|
3918
3982
|
},
|
|
3919
3983
|
[env]
|
|
3920
3984
|
);
|
|
@@ -4074,7 +4138,8 @@ function useViewService() {
|
|
|
4074
4138
|
views,
|
|
4075
4139
|
context = {},
|
|
4076
4140
|
options = {},
|
|
4077
|
-
aid
|
|
4141
|
+
aid,
|
|
4142
|
+
service
|
|
4078
4143
|
}) => {
|
|
4079
4144
|
const defaultOptions = {
|
|
4080
4145
|
load_filters: true,
|
|
@@ -4090,11 +4155,16 @@ function useViewService() {
|
|
|
4090
4155
|
},
|
|
4091
4156
|
with_context: context
|
|
4092
4157
|
};
|
|
4093
|
-
return env?.requests?.post(
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4158
|
+
return env?.requests?.post(
|
|
4159
|
+
"/call" /* CALL_PATH */,
|
|
4160
|
+
jsonDataView,
|
|
4161
|
+
{
|
|
4162
|
+
headers: {
|
|
4163
|
+
"Content-Type": "application/json"
|
|
4164
|
+
}
|
|
4165
|
+
},
|
|
4166
|
+
service
|
|
4167
|
+
);
|
|
4098
4168
|
},
|
|
4099
4169
|
[env]
|
|
4100
4170
|
);
|
|
@@ -4177,7 +4247,7 @@ function useViewService() {
|
|
|
4177
4247
|
[env]
|
|
4178
4248
|
);
|
|
4179
4249
|
const getSelectionItem = (0, import_react10.useCallback)(
|
|
4180
|
-
async ({ data }) => {
|
|
4250
|
+
async ({ data, service }) => {
|
|
4181
4251
|
const jsonData = {
|
|
4182
4252
|
model: data.model,
|
|
4183
4253
|
ids: [],
|
|
@@ -4195,11 +4265,16 @@ function useViewService() {
|
|
|
4195
4265
|
}
|
|
4196
4266
|
}
|
|
4197
4267
|
};
|
|
4198
|
-
return env?.requests.post(
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4268
|
+
return env?.requests.post(
|
|
4269
|
+
"/call" /* CALL_PATH */,
|
|
4270
|
+
jsonData,
|
|
4271
|
+
{
|
|
4272
|
+
headers: {
|
|
4273
|
+
"Content-Type": "application/json"
|
|
4274
|
+
}
|
|
4275
|
+
},
|
|
4276
|
+
service
|
|
4277
|
+
);
|
|
4203
4278
|
},
|
|
4204
4279
|
[env]
|
|
4205
4280
|
);
|
|
@@ -4492,7 +4567,6 @@ var sessionStorageUtils = () => {
|
|
|
4492
4567
|
// src/configs/axios-client.ts
|
|
4493
4568
|
var axiosClient = {
|
|
4494
4569
|
init(config) {
|
|
4495
|
-
console.log("config", config);
|
|
4496
4570
|
const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
|
|
4497
4571
|
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
|
|
4498
4572
|
const db = config?.db;
|
|
@@ -4511,7 +4585,7 @@ var axiosClient = {
|
|
|
4511
4585
|
};
|
|
4512
4586
|
const instance = import_axios.default.create({
|
|
4513
4587
|
adapter: import_axios.default.defaults.adapter,
|
|
4514
|
-
baseURL: config
|
|
4588
|
+
baseURL: config?.baseUrl,
|
|
4515
4589
|
timeout: 5e4,
|
|
4516
4590
|
paramsSerializer: (params) => new URLSearchParams(params).toString()
|
|
4517
4591
|
});
|
|
@@ -4530,6 +4604,7 @@ var axiosClient = {
|
|
|
4530
4604
|
if (database) {
|
|
4531
4605
|
config2.headers["DATABASE"] = database;
|
|
4532
4606
|
}
|
|
4607
|
+
if (token) config2.headers["Authorization"] = `Bearer ${token}`;
|
|
4533
4608
|
return config2;
|
|
4534
4609
|
}, Promise.reject);
|
|
4535
4610
|
instance.interceptors.response.use(
|
|
@@ -4584,7 +4659,7 @@ var axiosClient = {
|
|
|
4584
4659
|
);
|
|
4585
4660
|
return new Promise(function(resolve) {
|
|
4586
4661
|
import_axios.default.post(
|
|
4587
|
-
`${config
|
|
4662
|
+
`${config?.baseUrl}${config.refreshTokenEndpoint ?? "/authentication/oauth2/token" /* AUTH_TOKEN_PATH */}`,
|
|
4588
4663
|
payload,
|
|
4589
4664
|
{
|
|
4590
4665
|
headers: {
|
|
@@ -4652,20 +4727,47 @@ var axiosClient = {
|
|
|
4652
4727
|
function formatUrl(url, db2) {
|
|
4653
4728
|
return url + (db2 ? "?db=" + db2 : "");
|
|
4654
4729
|
}
|
|
4730
|
+
const getBaseUrl = (baseUrl, serviceName) => {
|
|
4731
|
+
const service = serviceName || config?.default_service;
|
|
4732
|
+
return `${baseUrl.replace(/\/$/, "")}/${service}/api/v2`;
|
|
4733
|
+
};
|
|
4655
4734
|
const responseBody = (response) => response;
|
|
4656
4735
|
const requests = {
|
|
4657
|
-
get: (url, headers) => instance.get(
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4736
|
+
get: (url, headers, serviceName) => instance.get(
|
|
4737
|
+
formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
|
|
4738
|
+
headers
|
|
4739
|
+
).then(responseBody),
|
|
4740
|
+
post: (url, body, headers, serviceName) => instance.post(
|
|
4741
|
+
formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
|
|
4742
|
+
body,
|
|
4743
|
+
headers
|
|
4744
|
+
).then(responseBody),
|
|
4745
|
+
post_excel: (url, body, headers, serviceName) => instance.post(
|
|
4746
|
+
formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
|
|
4747
|
+
body,
|
|
4748
|
+
{
|
|
4749
|
+
responseType: "arraybuffer",
|
|
4750
|
+
headers: {
|
|
4751
|
+
"Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
|
|
4752
|
+
Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
4753
|
+
...headers
|
|
4754
|
+
}
|
|
4664
4755
|
}
|
|
4665
|
-
|
|
4666
|
-
put: (url, body, headers) => instance.put(
|
|
4667
|
-
|
|
4668
|
-
|
|
4756
|
+
).then(responseBody),
|
|
4757
|
+
put: (url, body, headers, serviceName) => instance.put(
|
|
4758
|
+
formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
|
|
4759
|
+
body,
|
|
4760
|
+
headers
|
|
4761
|
+
).then(responseBody),
|
|
4762
|
+
patch: (url, body, headers, serviceName) => instance.patch(
|
|
4763
|
+
formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
|
|
4764
|
+
body,
|
|
4765
|
+
headers
|
|
4766
|
+
).then(responseBody),
|
|
4767
|
+
delete: (url, headers, serviceName) => instance.delete(
|
|
4768
|
+
formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
|
|
4769
|
+
headers
|
|
4770
|
+
).then(responseBody)
|
|
4669
4771
|
};
|
|
4670
4772
|
return requests;
|
|
4671
4773
|
}
|
|
@@ -5258,7 +5360,7 @@ var import_react_query32 = require("@tanstack/react-query");
|
|
|
5258
5360
|
var useDelete = () => {
|
|
5259
5361
|
const { deleteApi } = useModelService();
|
|
5260
5362
|
return (0, import_react_query32.useMutation)({
|
|
5261
|
-
mutationFn: ({ ids, model }) => deleteApi({ ids, model })
|
|
5363
|
+
mutationFn: ({ ids, model, service }) => deleteApi({ ids, model, service })
|
|
5262
5364
|
});
|
|
5263
5365
|
};
|
|
5264
5366
|
var use_delete_default = useDelete;
|
|
@@ -5321,12 +5423,14 @@ var useGetDetail = () => {
|
|
|
5321
5423
|
model,
|
|
5322
5424
|
ids,
|
|
5323
5425
|
specification,
|
|
5324
|
-
context
|
|
5426
|
+
context,
|
|
5427
|
+
service
|
|
5325
5428
|
}) => getDetail({
|
|
5326
5429
|
model,
|
|
5327
5430
|
ids,
|
|
5328
5431
|
specification,
|
|
5329
|
-
context
|
|
5432
|
+
context,
|
|
5433
|
+
service
|
|
5330
5434
|
})
|
|
5331
5435
|
});
|
|
5332
5436
|
};
|
|
@@ -5334,12 +5438,16 @@ var use_get_detail_default = useGetDetail;
|
|
|
5334
5438
|
|
|
5335
5439
|
// src/hooks/model/use-get-field-onchange.ts
|
|
5336
5440
|
var import_react_query37 = require("@tanstack/react-query");
|
|
5337
|
-
var useGetFieldOnChange = ({
|
|
5441
|
+
var useGetFieldOnChange = ({
|
|
5442
|
+
model,
|
|
5443
|
+
service
|
|
5444
|
+
}) => {
|
|
5338
5445
|
const { getListFieldsOnchange } = useModelService();
|
|
5339
5446
|
return (0, import_react_query37.useQuery)({
|
|
5340
5447
|
queryKey: [`field-onchange-${model}`, model],
|
|
5341
5448
|
queryFn: () => getListFieldsOnchange({
|
|
5342
|
-
model
|
|
5449
|
+
model,
|
|
5450
|
+
service
|
|
5343
5451
|
}).then((res) => {
|
|
5344
5452
|
if (res) {
|
|
5345
5453
|
return res;
|
|
@@ -5522,14 +5630,16 @@ var useOnChangeForm = () => {
|
|
|
5522
5630
|
specification,
|
|
5523
5631
|
context,
|
|
5524
5632
|
object,
|
|
5525
|
-
fieldChange
|
|
5633
|
+
fieldChange,
|
|
5634
|
+
service
|
|
5526
5635
|
}) => onChange({
|
|
5527
5636
|
ids,
|
|
5528
5637
|
model,
|
|
5529
5638
|
specification,
|
|
5530
5639
|
context,
|
|
5531
5640
|
object,
|
|
5532
|
-
fieldChange
|
|
5641
|
+
fieldChange,
|
|
5642
|
+
service
|
|
5533
5643
|
})
|
|
5534
5644
|
});
|
|
5535
5645
|
};
|
|
@@ -5546,8 +5656,9 @@ var useSave = () => {
|
|
|
5546
5656
|
data,
|
|
5547
5657
|
specification,
|
|
5548
5658
|
context,
|
|
5549
|
-
path
|
|
5550
|
-
|
|
5659
|
+
path,
|
|
5660
|
+
service
|
|
5661
|
+
}) => save({ ids, model, data, specification, context, path, service })
|
|
5551
5662
|
});
|
|
5552
5663
|
};
|
|
5553
5664
|
var use_save_default = useSave;
|
|
@@ -5599,12 +5710,14 @@ var useButton = () => {
|
|
|
5599
5710
|
model,
|
|
5600
5711
|
ids,
|
|
5601
5712
|
context,
|
|
5602
|
-
method
|
|
5713
|
+
method,
|
|
5714
|
+
service
|
|
5603
5715
|
}) => callButton({
|
|
5604
5716
|
model,
|
|
5605
5717
|
ids,
|
|
5606
5718
|
context,
|
|
5607
|
-
method
|
|
5719
|
+
method,
|
|
5720
|
+
service
|
|
5608
5721
|
}),
|
|
5609
5722
|
onSuccess: (response) => {
|
|
5610
5723
|
return response;
|
|
@@ -5621,11 +5734,13 @@ var useDuplicateRecord = () => {
|
|
|
5621
5734
|
mutationFn: ({
|
|
5622
5735
|
id,
|
|
5623
5736
|
model,
|
|
5624
|
-
context
|
|
5737
|
+
context,
|
|
5738
|
+
service
|
|
5625
5739
|
}) => duplicateRecord({
|
|
5626
5740
|
id,
|
|
5627
5741
|
model,
|
|
5628
|
-
context
|
|
5742
|
+
context,
|
|
5743
|
+
service
|
|
5629
5744
|
})
|
|
5630
5745
|
});
|
|
5631
5746
|
};
|
|
@@ -5708,11 +5823,11 @@ var use_get_groups_default = useGetGroups;
|
|
|
5708
5823
|
|
|
5709
5824
|
// src/hooks/view/use-get-list-data.ts
|
|
5710
5825
|
var import_react_query49 = require("@tanstack/react-query");
|
|
5711
|
-
var useGetListData = (listDataProps, queryKey, enabled) => {
|
|
5826
|
+
var useGetListData = (listDataProps, queryKey, enabled, service) => {
|
|
5712
5827
|
const { getAll } = useModelService();
|
|
5713
5828
|
return (0, import_react_query49.useQuery)({
|
|
5714
5829
|
queryKey,
|
|
5715
|
-
queryFn: () => getAll({ data: listDataProps }).then((res) => {
|
|
5830
|
+
queryFn: () => getAll({ data: listDataProps, service }).then((res) => {
|
|
5716
5831
|
if (res) {
|
|
5717
5832
|
return res;
|
|
5718
5833
|
}
|
|
@@ -5788,12 +5903,13 @@ var import_react_query53 = require("@tanstack/react-query");
|
|
|
5788
5903
|
var useGetSelection = ({
|
|
5789
5904
|
data,
|
|
5790
5905
|
queryKey,
|
|
5791
|
-
enabled
|
|
5906
|
+
enabled,
|
|
5907
|
+
service
|
|
5792
5908
|
}) => {
|
|
5793
5909
|
const { getSelectionItem } = useViewService();
|
|
5794
5910
|
return (0, import_react_query53.useQuery)({
|
|
5795
5911
|
queryKey,
|
|
5796
|
-
queryFn: () => getSelectionItem({ data }),
|
|
5912
|
+
queryFn: () => getSelectionItem({ data, service }),
|
|
5797
5913
|
enabled,
|
|
5798
5914
|
refetchOnWindowFocus: false
|
|
5799
5915
|
});
|
|
@@ -5821,11 +5937,13 @@ var useLoadAction = () => {
|
|
|
5821
5937
|
return (0, import_react_query55.useMutation)({
|
|
5822
5938
|
mutationFn: ({
|
|
5823
5939
|
idAction,
|
|
5824
|
-
context
|
|
5940
|
+
context,
|
|
5941
|
+
service
|
|
5825
5942
|
}) => {
|
|
5826
5943
|
return loadAction({
|
|
5827
5944
|
idAction,
|
|
5828
|
-
context
|
|
5945
|
+
context,
|
|
5946
|
+
service
|
|
5829
5947
|
});
|
|
5830
5948
|
}
|
|
5831
5949
|
});
|
|
@@ -5866,11 +5984,13 @@ var useRemoveRow = () => {
|
|
|
5866
5984
|
mutationFn: ({
|
|
5867
5985
|
model,
|
|
5868
5986
|
ids,
|
|
5869
|
-
context
|
|
5987
|
+
context,
|
|
5988
|
+
service
|
|
5870
5989
|
}) => removeRows({
|
|
5871
5990
|
model,
|
|
5872
5991
|
ids,
|
|
5873
|
-
context
|
|
5992
|
+
context,
|
|
5993
|
+
service
|
|
5874
5994
|
})
|
|
5875
5995
|
});
|
|
5876
5996
|
};
|
|
@@ -5901,10 +6021,12 @@ var useRunAction = () => {
|
|
|
5901
6021
|
return (0, import_react_query60.useMutation)({
|
|
5902
6022
|
mutationFn: ({
|
|
5903
6023
|
idAction,
|
|
5904
|
-
context
|
|
6024
|
+
context,
|
|
6025
|
+
service
|
|
5905
6026
|
}) => runAction({
|
|
5906
6027
|
idAction,
|
|
5907
|
-
context
|
|
6028
|
+
context,
|
|
6029
|
+
service
|
|
5908
6030
|
})
|
|
5909
6031
|
});
|
|
5910
6032
|
};
|