@fctc/interface-logic 2.1.5 → 2.2.1

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/hooks.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { L as LoginCredentialBody, d as SocialTokenBody, F as ForgotPasswordBody, u as updatePasswordBody, V as ViewData, C as ContextApi, c as GetSelectionType, f as GetViewParams } from './view-type-BGJfDe73.js';
2
+ import { L as LoginCredentialBody, d as SocialTokenBody, F as ForgotPasswordBody, u as updatePasswordBody, V as ViewData, C as ContextApi, c as GetSelectionType, f as GetViewParams } from './view-type-p4JdAOsz.js';
3
3
 
4
4
  declare const useForgotPassword: () => _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
5
5
 
@@ -38,6 +38,7 @@ declare const useGetAccessByCode: () => _tanstack_react_query.UseMutationResult<
38
38
 
39
39
  declare const useValidateActionToken: () => _tanstack_react_query.UseMutationResult<any, Error, {
40
40
  actionToken: string;
41
+ path: string;
41
42
  }, unknown>;
42
43
 
43
44
  declare const useGetCompanyInfo: () => _tanstack_react_query.UseMutationResult<any, Error, number, unknown>;
@@ -139,6 +140,7 @@ declare const useUploadImage: () => _tanstack_react_query.UseMutationResult<any,
139
140
  declare const useDelete: () => _tanstack_react_query.UseMutationResult<any, Error, {
140
141
  ids: any;
141
142
  model: string;
143
+ service?: string;
142
144
  }, unknown>;
143
145
 
144
146
  declare const useGetAll: ({ data, queryKey, viewResponse }: any) => _tanstack_react_query.UseQueryResult<any, Error>;
@@ -152,10 +154,12 @@ declare const useGetDetail: () => _tanstack_react_query.UseMutationResult<any, E
152
154
  ids: any;
153
155
  specification?: any;
154
156
  context?: any;
157
+ service?: string;
155
158
  }, unknown>;
156
159
 
157
- declare const useGetFieldOnChange: ({ model }: {
160
+ declare const useGetFieldOnChange: ({ model, service, }: {
158
161
  model: string;
162
+ service?: string;
159
163
  }) => _tanstack_react_query.UseQueryResult<any, Error>;
160
164
 
161
165
  declare const useGetListMyBankAccount: ({ domain, spectification, model, }: {
@@ -203,6 +207,7 @@ declare const useOnChangeForm: () => _tanstack_react_query.UseMutationResult<any
203
207
  context: any;
204
208
  object: any;
205
209
  fieldChange?: any;
210
+ service?: string;
206
211
  }, unknown>;
207
212
 
208
213
  declare const useSave: () => _tanstack_react_query.UseMutationResult<any, Error, {
@@ -212,6 +217,7 @@ declare const useSave: () => _tanstack_react_query.UseMutationResult<any, Error,
212
217
  specification?: any;
213
218
  context: any;
214
219
  path?: string;
220
+ service?: string;
215
221
  }, unknown>;
216
222
 
217
223
  declare const useGetProfile: (path?: string) => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
@@ -234,12 +240,14 @@ declare const useButton: () => _tanstack_react_query.UseMutationResult<any, Erro
234
240
  ids: Record<string, any>[] | any;
235
241
  context: ContextApi;
236
242
  method: any;
243
+ service?: string;
237
244
  }, unknown>;
238
245
 
239
246
  declare const useDuplicateRecord: () => _tanstack_react_query.UseMutationResult<any, Error, {
240
247
  id: any;
241
248
  model: string;
242
249
  context: ContextApi;
250
+ service?: string;
243
251
  }, unknown>;
244
252
 
245
253
  declare const useGetActionDetail: ({ aid, context, enabled, id, model, queryKey, }: {
@@ -258,7 +266,7 @@ declare const useGetGroups: ({ model, width_context, }: {
258
266
  width_context: any;
259
267
  }) => _tanstack_react_query.UseQueryResult<any, Error>;
260
268
 
261
- declare const useGetListData: (listDataProps: any, queryKey?: any, enabled?: any) => _tanstack_react_query.UseQueryResult<any, Error>;
269
+ declare const useGetListData: (listDataProps: any, queryKey?: any, enabled?: any, service?: string) => _tanstack_react_query.UseQueryResult<any, Error>;
262
270
 
263
271
  declare const useGetMenu: (context: any, specification: any, enabled?: boolean) => _tanstack_react_query.UseQueryResult<any, Error>;
264
272
 
@@ -273,10 +281,11 @@ declare const useGetProGressBar: ({ field, color, model, width_context, }: {
273
281
  width_context: string;
274
282
  }) => _tanstack_react_query.UseQueryResult<any, Error>;
275
283
 
276
- declare const useGetSelection: ({ data, queryKey, enabled, }: {
284
+ declare const useGetSelection: ({ data, queryKey, enabled, service }: {
277
285
  data: GetSelectionType;
278
286
  queryKey: any[];
279
287
  enabled?: boolean;
288
+ service?: string;
280
289
  }) => _tanstack_react_query.UseQueryResult<any, Error>;
281
290
 
282
291
  declare const useGetView: (viewParams: GetViewParams, actData?: any) => _tanstack_react_query.UseQueryResult<any, Error>;
@@ -284,6 +293,7 @@ declare const useGetView: (viewParams: GetViewParams, actData?: any) => _tanstac
284
293
  declare const useLoadAction: () => _tanstack_react_query.UseMutationResult<any, Error, {
285
294
  idAction: any;
286
295
  context: ContextApi;
296
+ service?: string;
287
297
  }, unknown>;
288
298
 
289
299
  declare const useLoadMessage: () => _tanstack_react_query.UseQueryResult<any, Error>;
@@ -298,6 +308,7 @@ declare const useRemoveRow: () => _tanstack_react_query.UseMutationResult<any, E
298
308
  model: string;
299
309
  ids: Record<string, any>[] | any;
300
310
  context: ContextApi;
311
+ service?: string;
301
312
  }, unknown>;
302
313
 
303
314
  declare const useGetResequence: (model: string, resIds: any, context: any, offset: any) => _tanstack_react_query.UseQueryResult<any, Error>;
@@ -305,6 +316,7 @@ declare const useGetResequence: (model: string, resIds: any, context: any, offse
305
316
  declare const useRunAction: () => _tanstack_react_query.UseMutationResult<any, Error, {
306
317
  idAction: any;
307
318
  context: ContextApi;
319
+ service?: string;
308
320
  }, unknown>;
309
321
 
310
322
  declare const useSignInSSO: () => _tanstack_react_query.UseMutationResult<any, Error, {
package/dist/hooks.js CHANGED
@@ -128,7 +128,6 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
128
128
  UriConstants2["IMAGE_PATH"] = `/web/image`;
129
129
  UriConstants2["LOAD_MESSAGE"] = `/load_message_failures`;
130
130
  UriConstants2["TOKEN"] = `/check_token`;
131
- UriConstants2["VALIDATE_ACTION_TOKEN"] = "/action-token/validate";
132
131
  UriConstants2["CREATE_UPDATE_PATH"] = `/create_update`;
133
132
  UriConstants2["TWOFA_METHOD_PATH"] = `/id/api/v2/call`;
134
133
  UriConstants2["SIGNIN_SSO"] = `/signin-sso/oauth`;
@@ -2943,15 +2942,21 @@ function useActionService() {
2943
2942
  const loadAction = (0, import_react6.useCallback)(
2944
2943
  async ({
2945
2944
  idAction,
2946
- context
2945
+ context,
2946
+ service
2947
2947
  }) => {
2948
2948
  const jsonData = {
2949
2949
  action_id: idAction,
2950
2950
  with_context: { ...context }
2951
2951
  };
2952
- return env.requests.post("/load_action" /* LOAD_ACTION */, jsonData, {
2953
- headers: { "Content-Type": "application/json" }
2954
- });
2952
+ return env.requests.post(
2953
+ "/load_action" /* LOAD_ACTION */,
2954
+ jsonData,
2955
+ {
2956
+ headers: { "Content-Type": "application/json" }
2957
+ },
2958
+ service
2959
+ );
2955
2960
  },
2956
2961
  [env]
2957
2962
  );
@@ -2960,7 +2965,8 @@ function useActionService() {
2960
2965
  model,
2961
2966
  ids = [],
2962
2967
  context,
2963
- method
2968
+ method,
2969
+ service
2964
2970
  }) => {
2965
2971
  try {
2966
2972
  const jsonData = {
@@ -2969,9 +2975,14 @@ function useActionService() {
2969
2975
  ids,
2970
2976
  with_context: context
2971
2977
  };
2972
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
2973
- headers: { "Content-Type": "application/json" }
2974
- });
2978
+ return env.requests.post(
2979
+ "/call" /* CALL_PATH */,
2980
+ jsonData,
2981
+ {
2982
+ headers: { "Content-Type": "application/json" }
2983
+ },
2984
+ service
2985
+ );
2975
2986
  } catch (error) {
2976
2987
  console.error("Error when calling button action:", error);
2977
2988
  throw error;
@@ -2983,7 +2994,8 @@ function useActionService() {
2983
2994
  async ({
2984
2995
  model,
2985
2996
  ids,
2986
- context
2997
+ context,
2998
+ service
2987
2999
  }) => {
2988
3000
  const jsonData = {
2989
3001
  model,
@@ -2991,9 +3003,14 @@ function useActionService() {
2991
3003
  ids,
2992
3004
  with_context: context
2993
3005
  };
2994
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
2995
- headers: { "Content-Type": "application/json" }
2996
- });
3006
+ return env.requests.post(
3007
+ "/call" /* CALL_PATH */,
3008
+ jsonData,
3009
+ {
3010
+ headers: { "Content-Type": "application/json" }
3011
+ },
3012
+ service
3013
+ );
2997
3014
  },
2998
3015
  [env]
2999
3016
  );
@@ -3001,7 +3018,8 @@ function useActionService() {
3001
3018
  async ({
3002
3019
  model,
3003
3020
  id,
3004
- context
3021
+ context,
3022
+ service
3005
3023
  }) => {
3006
3024
  const jsonData = {
3007
3025
  model,
@@ -3009,9 +3027,14 @@ function useActionService() {
3009
3027
  ids: id,
3010
3028
  with_context: context
3011
3029
  };
3012
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3013
- headers: { "Content-Type": "application/json" }
3014
- });
3030
+ return env.requests.post(
3031
+ "/call" /* CALL_PATH */,
3032
+ jsonData,
3033
+ {
3034
+ headers: { "Content-Type": "application/json" }
3035
+ },
3036
+ service
3037
+ );
3015
3038
  },
3016
3039
  [env]
3017
3040
  );
@@ -3054,15 +3077,21 @@ function useActionService() {
3054
3077
  const runAction = (0, import_react6.useCallback)(
3055
3078
  async ({
3056
3079
  idAction,
3057
- context
3080
+ context,
3081
+ service
3058
3082
  }) => {
3059
3083
  const jsonData = {
3060
3084
  action_id: idAction,
3061
3085
  with_context: { ...context }
3062
3086
  };
3063
- return env.requests.post("/run_action" /* RUN_ACTION_PATH */, jsonData, {
3064
- headers: { "Content-Type": "application/json" }
3065
- });
3087
+ return env.requests.post(
3088
+ "/run_action" /* RUN_ACTION_PATH */,
3089
+ jsonData,
3090
+ {
3091
+ headers: { "Content-Type": "application/json" }
3092
+ },
3093
+ service
3094
+ );
3066
3095
  },
3067
3096
  [env]
3068
3097
  );
@@ -3205,9 +3234,9 @@ function useAuthService() {
3205
3234
  [env]
3206
3235
  );
3207
3236
  const isValidActionToken = (0, import_react7.useCallback)(
3208
- async (actionToken) => {
3237
+ async (actionToken, path) => {
3209
3238
  return env?.requests?.post(
3210
- "/action-token/validate" /* VALIDATE_ACTION_TOKEN */,
3239
+ path,
3211
3240
  {},
3212
3241
  {
3213
3242
  headers: {
@@ -3777,7 +3806,7 @@ function useModelService() {
3777
3806
  });
3778
3807
  }, [env]);
3779
3808
  const getAll = (0, import_react12.useCallback)(
3780
- async ({ data }) => {
3809
+ async ({ data, service }) => {
3781
3810
  const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
3782
3811
  fields: data.fields,
3783
3812
  groupby: data.groupby
@@ -3798,11 +3827,16 @@ function useModelService() {
3798
3827
  ...jsonReadGroup
3799
3828
  }
3800
3829
  };
3801
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3802
- headers: {
3803
- "Content-Type": "application/json"
3804
- }
3805
- });
3830
+ return env.requests.post(
3831
+ "/call" /* CALL_PATH */,
3832
+ jsonData,
3833
+ {
3834
+ headers: {
3835
+ "Content-Type": "application/json"
3836
+ }
3837
+ },
3838
+ service
3839
+ );
3806
3840
  },
3807
3841
  [env]
3808
3842
  );
@@ -3870,7 +3904,13 @@ function useModelService() {
3870
3904
  [env]
3871
3905
  );
3872
3906
  const getDetail = (0, import_react12.useCallback)(
3873
- async ({ ids = [], model, specification, context }) => {
3907
+ async ({
3908
+ ids = [],
3909
+ model,
3910
+ specification,
3911
+ context,
3912
+ service
3913
+ }) => {
3874
3914
  const jsonData = {
3875
3915
  model,
3876
3916
  method: "web_read" /* WEB_READ */,
@@ -3880,11 +3920,16 @@ function useModelService() {
3880
3920
  specification
3881
3921
  }
3882
3922
  };
3883
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3884
- headers: {
3885
- "Content-Type": "application/json"
3886
- }
3887
- });
3923
+ return env.requests.post(
3924
+ "/call" /* CALL_PATH */,
3925
+ jsonData,
3926
+ {
3927
+ headers: {
3928
+ "Content-Type": "application/json"
3929
+ }
3930
+ },
3931
+ service
3932
+ );
3888
3933
  },
3889
3934
  [env]
3890
3935
  );
@@ -3895,7 +3940,8 @@ function useModelService() {
3895
3940
  data = {},
3896
3941
  specification = {},
3897
3942
  context = {},
3898
- path
3943
+ path,
3944
+ service
3899
3945
  }) => {
3900
3946
  const jsonData = {
3901
3947
  model,
@@ -3907,26 +3953,36 @@ function useModelService() {
3907
3953
  specification
3908
3954
  }
3909
3955
  };
3910
- return env.requests.post(path ?? "/call" /* CALL_PATH */, jsonData, {
3911
- headers: {
3912
- "Content-Type": "application/json"
3913
- }
3914
- });
3956
+ return env.requests.post(
3957
+ path ?? "/call" /* CALL_PATH */,
3958
+ jsonData,
3959
+ {
3960
+ headers: {
3961
+ "Content-Type": "application/json"
3962
+ }
3963
+ },
3964
+ service
3965
+ );
3915
3966
  },
3916
3967
  [env]
3917
3968
  );
3918
3969
  const deleteApi = (0, import_react12.useCallback)(
3919
- async ({ ids = [], model }) => {
3970
+ async ({ ids = [], model, service }) => {
3920
3971
  const jsonData = {
3921
3972
  model,
3922
3973
  method: "unlink" /* UNLINK */,
3923
3974
  ids
3924
3975
  };
3925
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3926
- headers: {
3927
- "Content-Type": "application/json"
3928
- }
3929
- });
3976
+ return env.requests.post(
3977
+ "/call" /* CALL_PATH */,
3978
+ jsonData,
3979
+ {
3980
+ headers: {
3981
+ "Content-Type": "application/json"
3982
+ }
3983
+ },
3984
+ service
3985
+ );
3930
3986
  },
3931
3987
  [env]
3932
3988
  );
@@ -3937,7 +3993,8 @@ function useModelService() {
3937
3993
  object,
3938
3994
  specification,
3939
3995
  context,
3940
- fieldChange
3996
+ fieldChange,
3997
+ service
3941
3998
  }) => {
3942
3999
  const jsonData = {
3943
4000
  model,
@@ -3950,25 +4007,36 @@ function useModelService() {
3950
4007
  specification
3951
4008
  ]
3952
4009
  };
3953
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3954
- headers: {
3955
- "Content-Type": "application/json"
3956
- }
3957
- });
4010
+ return env.requests.post(
4011
+ "/call" /* CALL_PATH */,
4012
+ jsonData,
4013
+ {
4014
+ headers: {
4015
+ "Content-Type": "application/json"
4016
+ }
4017
+ },
4018
+ service
4019
+ );
3958
4020
  },
3959
4021
  [env]
3960
4022
  );
3961
4023
  const getListFieldsOnchange = (0, import_react12.useCallback)(
3962
- async ({ model }) => {
4024
+ async ({ model, service }) => {
4025
+ console.log("service", service);
3963
4026
  const jsonData = {
3964
4027
  model,
3965
4028
  method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
3966
4029
  };
3967
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3968
- headers: {
3969
- "Content-Type": "application/json"
3970
- }
3971
- });
4030
+ return env.requests.post(
4031
+ "/call" /* CALL_PATH */,
4032
+ jsonData,
4033
+ {
4034
+ headers: {
4035
+ "Content-Type": "application/json"
4036
+ }
4037
+ },
4038
+ service
4039
+ );
3972
4040
  },
3973
4041
  [env]
3974
4042
  );
@@ -4128,7 +4196,8 @@ function useViewService() {
4128
4196
  views,
4129
4197
  context = {},
4130
4198
  options = {},
4131
- aid
4199
+ aid,
4200
+ service
4132
4201
  }) => {
4133
4202
  const defaultOptions = {
4134
4203
  load_filters: true,
@@ -4144,11 +4213,16 @@ function useViewService() {
4144
4213
  },
4145
4214
  with_context: context
4146
4215
  };
4147
- return env?.requests?.post("/call" /* CALL_PATH */, jsonDataView, {
4148
- headers: {
4149
- "Content-Type": "application/json"
4150
- }
4151
- });
4216
+ return env?.requests?.post(
4217
+ "/call" /* CALL_PATH */,
4218
+ jsonDataView,
4219
+ {
4220
+ headers: {
4221
+ "Content-Type": "application/json"
4222
+ }
4223
+ },
4224
+ service
4225
+ );
4152
4226
  },
4153
4227
  [env]
4154
4228
  );
@@ -4231,7 +4305,7 @@ function useViewService() {
4231
4305
  [env]
4232
4306
  );
4233
4307
  const getSelectionItem = (0, import_react14.useCallback)(
4234
- async ({ data }) => {
4308
+ async ({ data, service }) => {
4235
4309
  const jsonData = {
4236
4310
  model: data.model,
4237
4311
  ids: [],
@@ -4249,11 +4323,16 @@ function useViewService() {
4249
4323
  }
4250
4324
  }
4251
4325
  };
4252
- return env?.requests.post("/call" /* CALL_PATH */, jsonData, {
4253
- headers: {
4254
- "Content-Type": "application/json"
4255
- }
4256
- });
4326
+ return env?.requests.post(
4327
+ "/call" /* CALL_PATH */,
4328
+ jsonData,
4329
+ {
4330
+ headers: {
4331
+ "Content-Type": "application/json"
4332
+ }
4333
+ },
4334
+ service
4335
+ );
4257
4336
  },
4258
4337
  [env]
4259
4338
  );
@@ -4612,8 +4691,11 @@ var import_react_query14 = require("@tanstack/react-query");
4612
4691
  var useValidateActionToken = () => {
4613
4692
  const { isValidActionToken } = useAuthService();
4614
4693
  return (0, import_react_query14.useMutation)({
4615
- mutationFn: ({ actionToken }) => {
4616
- return isValidActionToken(actionToken);
4694
+ mutationFn: ({
4695
+ actionToken,
4696
+ path
4697
+ }) => {
4698
+ return isValidActionToken(actionToken, path);
4617
4699
  }
4618
4700
  });
4619
4701
  };
@@ -4921,7 +5003,7 @@ var import_react_query32 = require("@tanstack/react-query");
4921
5003
  var useDelete = () => {
4922
5004
  const { deleteApi } = useModelService();
4923
5005
  return (0, import_react_query32.useMutation)({
4924
- mutationFn: ({ ids, model }) => deleteApi({ ids, model })
5006
+ mutationFn: ({ ids, model, service }) => deleteApi({ ids, model, service })
4925
5007
  });
4926
5008
  };
4927
5009
  var use_delete_default = useDelete;
@@ -4984,12 +5066,14 @@ var useGetDetail = () => {
4984
5066
  model,
4985
5067
  ids,
4986
5068
  specification,
4987
- context
5069
+ context,
5070
+ service
4988
5071
  }) => getDetail({
4989
5072
  model,
4990
5073
  ids,
4991
5074
  specification,
4992
- context
5075
+ context,
5076
+ service
4993
5077
  })
4994
5078
  });
4995
5079
  };
@@ -4997,12 +5081,17 @@ var use_get_detail_default = useGetDetail;
4997
5081
 
4998
5082
  // src/hooks/model/use-get-field-onchange.ts
4999
5083
  var import_react_query37 = require("@tanstack/react-query");
5000
- var useGetFieldOnChange = ({ model }) => {
5084
+ var useGetFieldOnChange = ({
5085
+ model,
5086
+ service
5087
+ }) => {
5001
5088
  const { getListFieldsOnchange } = useModelService();
5089
+ console.log("service", service);
5002
5090
  return (0, import_react_query37.useQuery)({
5003
5091
  queryKey: [`field-onchange-${model}`, model],
5004
5092
  queryFn: () => getListFieldsOnchange({
5005
- model
5093
+ model,
5094
+ service
5006
5095
  }).then((res) => {
5007
5096
  if (res) {
5008
5097
  return res;
@@ -5185,14 +5274,16 @@ var useOnChangeForm = () => {
5185
5274
  specification,
5186
5275
  context,
5187
5276
  object,
5188
- fieldChange
5277
+ fieldChange,
5278
+ service
5189
5279
  }) => onChange({
5190
5280
  ids,
5191
5281
  model,
5192
5282
  specification,
5193
5283
  context,
5194
5284
  object,
5195
- fieldChange
5285
+ fieldChange,
5286
+ service
5196
5287
  })
5197
5288
  });
5198
5289
  };
@@ -5209,8 +5300,9 @@ var useSave = () => {
5209
5300
  data,
5210
5301
  specification,
5211
5302
  context,
5212
- path
5213
- }) => save({ ids, model, data, specification, context, path })
5303
+ path,
5304
+ service
5305
+ }) => save({ ids, model, data, specification, context, path, service })
5214
5306
  });
5215
5307
  };
5216
5308
  var use_save_default = useSave;
@@ -5262,12 +5354,14 @@ var useButton = () => {
5262
5354
  model,
5263
5355
  ids,
5264
5356
  context,
5265
- method
5357
+ method,
5358
+ service
5266
5359
  }) => callButton({
5267
5360
  model,
5268
5361
  ids,
5269
5362
  context,
5270
- method
5363
+ method,
5364
+ service
5271
5365
  }),
5272
5366
  onSuccess: (response) => {
5273
5367
  return response;
@@ -5284,11 +5378,13 @@ var useDuplicateRecord = () => {
5284
5378
  mutationFn: ({
5285
5379
  id,
5286
5380
  model,
5287
- context
5381
+ context,
5382
+ service
5288
5383
  }) => duplicateRecord({
5289
5384
  id,
5290
5385
  model,
5291
- context
5386
+ context,
5387
+ service
5292
5388
  })
5293
5389
  });
5294
5390
  };
@@ -5371,11 +5467,11 @@ var use_get_groups_default = useGetGroups;
5371
5467
 
5372
5468
  // src/hooks/view/use-get-list-data.ts
5373
5469
  var import_react_query49 = require("@tanstack/react-query");
5374
- var useGetListData = (listDataProps, queryKey, enabled) => {
5470
+ var useGetListData = (listDataProps, queryKey, enabled, service) => {
5375
5471
  const { getAll } = useModelService();
5376
5472
  return (0, import_react_query49.useQuery)({
5377
5473
  queryKey,
5378
- queryFn: () => getAll({ data: listDataProps }).then((res) => {
5474
+ queryFn: () => getAll({ data: listDataProps, service }).then((res) => {
5379
5475
  if (res) {
5380
5476
  return res;
5381
5477
  }
@@ -5451,12 +5547,13 @@ var import_react_query53 = require("@tanstack/react-query");
5451
5547
  var useGetSelection = ({
5452
5548
  data,
5453
5549
  queryKey,
5454
- enabled
5550
+ enabled,
5551
+ service
5455
5552
  }) => {
5456
5553
  const { getSelectionItem } = useViewService();
5457
5554
  return (0, import_react_query53.useQuery)({
5458
5555
  queryKey,
5459
- queryFn: () => getSelectionItem({ data }),
5556
+ queryFn: () => getSelectionItem({ data, service }),
5460
5557
  enabled,
5461
5558
  refetchOnWindowFocus: false
5462
5559
  });
@@ -5484,11 +5581,13 @@ var useLoadAction = () => {
5484
5581
  return (0, import_react_query55.useMutation)({
5485
5582
  mutationFn: ({
5486
5583
  idAction,
5487
- context
5584
+ context,
5585
+ service
5488
5586
  }) => {
5489
5587
  return loadAction({
5490
5588
  idAction,
5491
- context
5589
+ context,
5590
+ service
5492
5591
  });
5493
5592
  }
5494
5593
  });
@@ -5529,11 +5628,13 @@ var useRemoveRow = () => {
5529
5628
  mutationFn: ({
5530
5629
  model,
5531
5630
  ids,
5532
- context
5631
+ context,
5632
+ service
5533
5633
  }) => removeRows({
5534
5634
  model,
5535
5635
  ids,
5536
- context
5636
+ context,
5637
+ service
5537
5638
  })
5538
5639
  });
5539
5640
  };
@@ -5564,10 +5665,12 @@ var useRunAction = () => {
5564
5665
  return (0, import_react_query60.useMutation)({
5565
5666
  mutationFn: ({
5566
5667
  idAction,
5567
- context
5668
+ context,
5669
+ service
5568
5670
  }) => runAction({
5569
5671
  idAction,
5570
- context
5672
+ context,
5673
+ service
5571
5674
  })
5572
5675
  });
5573
5676
  };