@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/provider.js CHANGED
@@ -718,7 +718,6 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
718
718
  UriConstants2["IMAGE_PATH"] = `/web/image`;
719
719
  UriConstants2["LOAD_MESSAGE"] = `/load_message_failures`;
720
720
  UriConstants2["TOKEN"] = `/check_token`;
721
- UriConstants2["VALIDATE_ACTION_TOKEN"] = "/action-token/validate";
722
721
  UriConstants2["CREATE_UPDATE_PATH"] = `/create_update`;
723
722
  UriConstants2["TWOFA_METHOD_PATH"] = `/id/api/v2/call`;
724
723
  UriConstants2["SIGNIN_SSO"] = `/signin-sso/oauth`;
@@ -2892,15 +2891,21 @@ function useActionService() {
2892
2891
  const loadAction = (0, import_react2.useCallback)(
2893
2892
  async ({
2894
2893
  idAction,
2895
- context
2894
+ context,
2895
+ service
2896
2896
  }) => {
2897
2897
  const jsonData = {
2898
2898
  action_id: idAction,
2899
2899
  with_context: { ...context }
2900
2900
  };
2901
- return env.requests.post("/load_action" /* LOAD_ACTION */, jsonData, {
2902
- headers: { "Content-Type": "application/json" }
2903
- });
2901
+ return env.requests.post(
2902
+ "/load_action" /* LOAD_ACTION */,
2903
+ jsonData,
2904
+ {
2905
+ headers: { "Content-Type": "application/json" }
2906
+ },
2907
+ service
2908
+ );
2904
2909
  },
2905
2910
  [env]
2906
2911
  );
@@ -2909,7 +2914,8 @@ function useActionService() {
2909
2914
  model,
2910
2915
  ids = [],
2911
2916
  context,
2912
- method
2917
+ method,
2918
+ service
2913
2919
  }) => {
2914
2920
  try {
2915
2921
  const jsonData = {
@@ -2918,9 +2924,14 @@ function useActionService() {
2918
2924
  ids,
2919
2925
  with_context: context
2920
2926
  };
2921
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
2922
- headers: { "Content-Type": "application/json" }
2923
- });
2927
+ return env.requests.post(
2928
+ "/call" /* CALL_PATH */,
2929
+ jsonData,
2930
+ {
2931
+ headers: { "Content-Type": "application/json" }
2932
+ },
2933
+ service
2934
+ );
2924
2935
  } catch (error) {
2925
2936
  console.error("Error when calling button action:", error);
2926
2937
  throw error;
@@ -2932,7 +2943,8 @@ function useActionService() {
2932
2943
  async ({
2933
2944
  model,
2934
2945
  ids,
2935
- context
2946
+ context,
2947
+ service
2936
2948
  }) => {
2937
2949
  const jsonData = {
2938
2950
  model,
@@ -2940,9 +2952,14 @@ function useActionService() {
2940
2952
  ids,
2941
2953
  with_context: context
2942
2954
  };
2943
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
2944
- headers: { "Content-Type": "application/json" }
2945
- });
2955
+ return env.requests.post(
2956
+ "/call" /* CALL_PATH */,
2957
+ jsonData,
2958
+ {
2959
+ headers: { "Content-Type": "application/json" }
2960
+ },
2961
+ service
2962
+ );
2946
2963
  },
2947
2964
  [env]
2948
2965
  );
@@ -2950,7 +2967,8 @@ function useActionService() {
2950
2967
  async ({
2951
2968
  model,
2952
2969
  id,
2953
- context
2970
+ context,
2971
+ service
2954
2972
  }) => {
2955
2973
  const jsonData = {
2956
2974
  model,
@@ -2958,9 +2976,14 @@ function useActionService() {
2958
2976
  ids: id,
2959
2977
  with_context: context
2960
2978
  };
2961
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
2962
- headers: { "Content-Type": "application/json" }
2963
- });
2979
+ return env.requests.post(
2980
+ "/call" /* CALL_PATH */,
2981
+ jsonData,
2982
+ {
2983
+ headers: { "Content-Type": "application/json" }
2984
+ },
2985
+ service
2986
+ );
2964
2987
  },
2965
2988
  [env]
2966
2989
  );
@@ -3003,15 +3026,21 @@ function useActionService() {
3003
3026
  const runAction = (0, import_react2.useCallback)(
3004
3027
  async ({
3005
3028
  idAction,
3006
- context
3029
+ context,
3030
+ service
3007
3031
  }) => {
3008
3032
  const jsonData = {
3009
3033
  action_id: idAction,
3010
3034
  with_context: { ...context }
3011
3035
  };
3012
- return env.requests.post("/run_action" /* RUN_ACTION_PATH */, jsonData, {
3013
- headers: { "Content-Type": "application/json" }
3014
- });
3036
+ return env.requests.post(
3037
+ "/run_action" /* RUN_ACTION_PATH */,
3038
+ jsonData,
3039
+ {
3040
+ headers: { "Content-Type": "application/json" }
3041
+ },
3042
+ service
3043
+ );
3015
3044
  },
3016
3045
  [env]
3017
3046
  );
@@ -3154,9 +3183,9 @@ function useAuthService() {
3154
3183
  [env]
3155
3184
  );
3156
3185
  const isValidActionToken = (0, import_react3.useCallback)(
3157
- async (actionToken) => {
3186
+ async (actionToken, path) => {
3158
3187
  return env?.requests?.post(
3159
- "/action-token/validate" /* VALIDATE_ACTION_TOKEN */,
3188
+ path,
3160
3189
  {},
3161
3190
  {
3162
3191
  headers: {
@@ -3726,7 +3755,7 @@ function useModelService() {
3726
3755
  });
3727
3756
  }, [env]);
3728
3757
  const getAll = (0, import_react8.useCallback)(
3729
- async ({ data }) => {
3758
+ async ({ data, service }) => {
3730
3759
  const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
3731
3760
  fields: data.fields,
3732
3761
  groupby: data.groupby
@@ -3747,11 +3776,16 @@ function useModelService() {
3747
3776
  ...jsonReadGroup
3748
3777
  }
3749
3778
  };
3750
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3751
- headers: {
3752
- "Content-Type": "application/json"
3753
- }
3754
- });
3779
+ return env.requests.post(
3780
+ "/call" /* CALL_PATH */,
3781
+ jsonData,
3782
+ {
3783
+ headers: {
3784
+ "Content-Type": "application/json"
3785
+ }
3786
+ },
3787
+ service
3788
+ );
3755
3789
  },
3756
3790
  [env]
3757
3791
  );
@@ -3819,7 +3853,13 @@ function useModelService() {
3819
3853
  [env]
3820
3854
  );
3821
3855
  const getDetail = (0, import_react8.useCallback)(
3822
- async ({ ids = [], model, specification, context }) => {
3856
+ async ({
3857
+ ids = [],
3858
+ model,
3859
+ specification,
3860
+ context,
3861
+ service
3862
+ }) => {
3823
3863
  const jsonData = {
3824
3864
  model,
3825
3865
  method: "web_read" /* WEB_READ */,
@@ -3829,11 +3869,16 @@ function useModelService() {
3829
3869
  specification
3830
3870
  }
3831
3871
  };
3832
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3833
- headers: {
3834
- "Content-Type": "application/json"
3835
- }
3836
- });
3872
+ return env.requests.post(
3873
+ "/call" /* CALL_PATH */,
3874
+ jsonData,
3875
+ {
3876
+ headers: {
3877
+ "Content-Type": "application/json"
3878
+ }
3879
+ },
3880
+ service
3881
+ );
3837
3882
  },
3838
3883
  [env]
3839
3884
  );
@@ -3844,7 +3889,8 @@ function useModelService() {
3844
3889
  data = {},
3845
3890
  specification = {},
3846
3891
  context = {},
3847
- path
3892
+ path,
3893
+ service
3848
3894
  }) => {
3849
3895
  const jsonData = {
3850
3896
  model,
@@ -3856,26 +3902,36 @@ function useModelService() {
3856
3902
  specification
3857
3903
  }
3858
3904
  };
3859
- return env.requests.post(path ?? "/call" /* CALL_PATH */, jsonData, {
3860
- headers: {
3861
- "Content-Type": "application/json"
3862
- }
3863
- });
3905
+ return env.requests.post(
3906
+ path ?? "/call" /* CALL_PATH */,
3907
+ jsonData,
3908
+ {
3909
+ headers: {
3910
+ "Content-Type": "application/json"
3911
+ }
3912
+ },
3913
+ service
3914
+ );
3864
3915
  },
3865
3916
  [env]
3866
3917
  );
3867
3918
  const deleteApi = (0, import_react8.useCallback)(
3868
- async ({ ids = [], model }) => {
3919
+ async ({ ids = [], model, service }) => {
3869
3920
  const jsonData = {
3870
3921
  model,
3871
3922
  method: "unlink" /* UNLINK */,
3872
3923
  ids
3873
3924
  };
3874
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3875
- headers: {
3876
- "Content-Type": "application/json"
3877
- }
3878
- });
3925
+ return env.requests.post(
3926
+ "/call" /* CALL_PATH */,
3927
+ jsonData,
3928
+ {
3929
+ headers: {
3930
+ "Content-Type": "application/json"
3931
+ }
3932
+ },
3933
+ service
3934
+ );
3879
3935
  },
3880
3936
  [env]
3881
3937
  );
@@ -3886,7 +3942,8 @@ function useModelService() {
3886
3942
  object,
3887
3943
  specification,
3888
3944
  context,
3889
- fieldChange
3945
+ fieldChange,
3946
+ service
3890
3947
  }) => {
3891
3948
  const jsonData = {
3892
3949
  model,
@@ -3899,25 +3956,36 @@ function useModelService() {
3899
3956
  specification
3900
3957
  ]
3901
3958
  };
3902
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3903
- headers: {
3904
- "Content-Type": "application/json"
3905
- }
3906
- });
3959
+ return env.requests.post(
3960
+ "/call" /* CALL_PATH */,
3961
+ jsonData,
3962
+ {
3963
+ headers: {
3964
+ "Content-Type": "application/json"
3965
+ }
3966
+ },
3967
+ service
3968
+ );
3907
3969
  },
3908
3970
  [env]
3909
3971
  );
3910
3972
  const getListFieldsOnchange = (0, import_react8.useCallback)(
3911
- async ({ model }) => {
3973
+ async ({ model, service }) => {
3974
+ console.log("service", service);
3912
3975
  const jsonData = {
3913
3976
  model,
3914
3977
  method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
3915
3978
  };
3916
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3917
- headers: {
3918
- "Content-Type": "application/json"
3919
- }
3920
- });
3979
+ return env.requests.post(
3980
+ "/call" /* CALL_PATH */,
3981
+ jsonData,
3982
+ {
3983
+ headers: {
3984
+ "Content-Type": "application/json"
3985
+ }
3986
+ },
3987
+ service
3988
+ );
3921
3989
  },
3922
3990
  [env]
3923
3991
  );
@@ -4077,7 +4145,8 @@ function useViewService() {
4077
4145
  views,
4078
4146
  context = {},
4079
4147
  options = {},
4080
- aid
4148
+ aid,
4149
+ service
4081
4150
  }) => {
4082
4151
  const defaultOptions = {
4083
4152
  load_filters: true,
@@ -4093,11 +4162,16 @@ function useViewService() {
4093
4162
  },
4094
4163
  with_context: context
4095
4164
  };
4096
- return env?.requests?.post("/call" /* CALL_PATH */, jsonDataView, {
4097
- headers: {
4098
- "Content-Type": "application/json"
4099
- }
4100
- });
4165
+ return env?.requests?.post(
4166
+ "/call" /* CALL_PATH */,
4167
+ jsonDataView,
4168
+ {
4169
+ headers: {
4170
+ "Content-Type": "application/json"
4171
+ }
4172
+ },
4173
+ service
4174
+ );
4101
4175
  },
4102
4176
  [env]
4103
4177
  );
@@ -4180,7 +4254,7 @@ function useViewService() {
4180
4254
  [env]
4181
4255
  );
4182
4256
  const getSelectionItem = (0, import_react10.useCallback)(
4183
- async ({ data }) => {
4257
+ async ({ data, service }) => {
4184
4258
  const jsonData = {
4185
4259
  model: data.model,
4186
4260
  ids: [],
@@ -4198,11 +4272,16 @@ function useViewService() {
4198
4272
  }
4199
4273
  }
4200
4274
  };
4201
- return env?.requests.post("/call" /* CALL_PATH */, jsonData, {
4202
- headers: {
4203
- "Content-Type": "application/json"
4204
- }
4205
- });
4275
+ return env?.requests.post(
4276
+ "/call" /* CALL_PATH */,
4277
+ jsonData,
4278
+ {
4279
+ headers: {
4280
+ "Content-Type": "application/json"
4281
+ }
4282
+ },
4283
+ service
4284
+ );
4206
4285
  },
4207
4286
  [env]
4208
4287
  );
@@ -4495,7 +4574,6 @@ var sessionStorageUtils = () => {
4495
4574
  // src/configs/axios-client.ts
4496
4575
  var axiosClient = {
4497
4576
  init(config) {
4498
- console.log("config", config);
4499
4577
  const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
4500
4578
  const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
4501
4579
  const db = config?.db;
@@ -4514,25 +4592,21 @@ var axiosClient = {
4514
4592
  };
4515
4593
  const instance = import_axios.default.create({
4516
4594
  adapter: import_axios.default.defaults.adapter,
4517
- baseURL: config.baseUrl,
4595
+ baseURL: config?.baseUrl,
4518
4596
  timeout: 5e4,
4519
4597
  paramsSerializer: (params) => new URLSearchParams(params).toString()
4520
4598
  });
4521
4599
  instance.interceptors.request.use(async (config2) => {
4522
4600
  const { useRefreshToken, useActionToken, actionToken } = config2;
4523
- let token = null;
4524
4601
  if (useActionToken && actionToken) {
4525
- token = actionToken;
4526
- } else {
4527
- const getToken = useRefreshToken ? localStorage2.getRefreshToken : localStorage2.getAccessToken;
4528
- token = await getToken?.();
4529
- }
4530
- if (token) {
4531
- config2.headers["Authorization"] = `Bearer ${token}`;
4602
+ config2.headers["Action-Token"] = actionToken;
4532
4603
  }
4533
4604
  if (database) {
4534
4605
  config2.headers["DATABASE"] = database;
4535
4606
  }
4607
+ const getToken = useRefreshToken ? localStorage2.getRefreshToken : localStorage2.getAccessToken;
4608
+ const token = await getToken?.();
4609
+ if (token) config2.headers["Authorization"] = `Bearer ${token}`;
4536
4610
  return config2;
4537
4611
  }, Promise.reject);
4538
4612
  instance.interceptors.response.use(
@@ -4587,7 +4661,7 @@ var axiosClient = {
4587
4661
  );
4588
4662
  return new Promise(function(resolve) {
4589
4663
  import_axios.default.post(
4590
- `${config.baseUrl}${config.refreshTokenEndpoint ?? "/authentication/oauth2/token" /* AUTH_TOKEN_PATH */}`,
4664
+ `${config?.baseUrl}${config.refreshTokenEndpoint ?? "/authentication/oauth2/token" /* AUTH_TOKEN_PATH */}`,
4591
4665
  payload,
4592
4666
  {
4593
4667
  headers: {
@@ -4655,20 +4729,47 @@ var axiosClient = {
4655
4729
  function formatUrl(url, db2) {
4656
4730
  return url + (db2 ? "?db=" + db2 : "");
4657
4731
  }
4732
+ const getBaseUrl = (baseUrl, serviceName) => {
4733
+ const service = serviceName || config?.default_service;
4734
+ return `${baseUrl.replace(/\/$/, "")}/${service}/api/v2`;
4735
+ };
4658
4736
  const responseBody = (response) => response;
4659
4737
  const requests = {
4660
- get: (url, headers) => instance.get(formatUrl(url, db), headers).then(responseBody),
4661
- post: (url, body, headers) => instance.post(formatUrl(url, db), body, headers).then(responseBody),
4662
- post_excel: (url, body, headers) => instance.post(formatUrl(url, db), body, {
4663
- responseType: "arraybuffer",
4664
- headers: {
4665
- "Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
4666
- Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
4738
+ get: (url, headers, serviceName) => instance.get(
4739
+ formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
4740
+ headers
4741
+ ).then(responseBody),
4742
+ post: (url, body, headers, serviceName) => instance.post(
4743
+ formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
4744
+ body,
4745
+ headers
4746
+ ).then(responseBody),
4747
+ post_excel: (url, body, headers, serviceName) => instance.post(
4748
+ formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
4749
+ body,
4750
+ {
4751
+ responseType: "arraybuffer",
4752
+ headers: {
4753
+ "Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
4754
+ Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
4755
+ ...headers
4756
+ }
4667
4757
  }
4668
- }).then(responseBody),
4669
- put: (url, body, headers) => instance.put(formatUrl(url, db), body, headers).then(responseBody),
4670
- patch: (url, body) => instance.patch(formatUrl(url, db), body).then(responseBody),
4671
- delete: (url, body) => instance.delete(formatUrl(url, db), body).then(responseBody)
4758
+ ).then(responseBody),
4759
+ put: (url, body, headers, serviceName) => instance.put(
4760
+ formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
4761
+ body,
4762
+ headers
4763
+ ).then(responseBody),
4764
+ patch: (url, body, headers, serviceName) => instance.patch(
4765
+ formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
4766
+ body,
4767
+ headers
4768
+ ).then(responseBody),
4769
+ delete: (url, headers, serviceName) => instance.delete(
4770
+ formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
4771
+ headers
4772
+ ).then(responseBody)
4672
4773
  };
4673
4774
  return requests;
4674
4775
  }
@@ -4952,8 +5053,11 @@ var import_react_query14 = require("@tanstack/react-query");
4952
5053
  var useValidateActionToken = () => {
4953
5054
  const { isValidActionToken } = useAuthService();
4954
5055
  return (0, import_react_query14.useMutation)({
4955
- mutationFn: ({ actionToken }) => {
4956
- return isValidActionToken(actionToken);
5056
+ mutationFn: ({
5057
+ actionToken,
5058
+ path
5059
+ }) => {
5060
+ return isValidActionToken(actionToken, path);
4957
5061
  }
4958
5062
  });
4959
5063
  };
@@ -5261,7 +5365,7 @@ var import_react_query32 = require("@tanstack/react-query");
5261
5365
  var useDelete = () => {
5262
5366
  const { deleteApi } = useModelService();
5263
5367
  return (0, import_react_query32.useMutation)({
5264
- mutationFn: ({ ids, model }) => deleteApi({ ids, model })
5368
+ mutationFn: ({ ids, model, service }) => deleteApi({ ids, model, service })
5265
5369
  });
5266
5370
  };
5267
5371
  var use_delete_default = useDelete;
@@ -5324,12 +5428,14 @@ var useGetDetail = () => {
5324
5428
  model,
5325
5429
  ids,
5326
5430
  specification,
5327
- context
5431
+ context,
5432
+ service
5328
5433
  }) => getDetail({
5329
5434
  model,
5330
5435
  ids,
5331
5436
  specification,
5332
- context
5437
+ context,
5438
+ service
5333
5439
  })
5334
5440
  });
5335
5441
  };
@@ -5337,12 +5443,17 @@ var use_get_detail_default = useGetDetail;
5337
5443
 
5338
5444
  // src/hooks/model/use-get-field-onchange.ts
5339
5445
  var import_react_query37 = require("@tanstack/react-query");
5340
- var useGetFieldOnChange = ({ model }) => {
5446
+ var useGetFieldOnChange = ({
5447
+ model,
5448
+ service
5449
+ }) => {
5341
5450
  const { getListFieldsOnchange } = useModelService();
5451
+ console.log("service", service);
5342
5452
  return (0, import_react_query37.useQuery)({
5343
5453
  queryKey: [`field-onchange-${model}`, model],
5344
5454
  queryFn: () => getListFieldsOnchange({
5345
- model
5455
+ model,
5456
+ service
5346
5457
  }).then((res) => {
5347
5458
  if (res) {
5348
5459
  return res;
@@ -5525,14 +5636,16 @@ var useOnChangeForm = () => {
5525
5636
  specification,
5526
5637
  context,
5527
5638
  object,
5528
- fieldChange
5639
+ fieldChange,
5640
+ service
5529
5641
  }) => onChange({
5530
5642
  ids,
5531
5643
  model,
5532
5644
  specification,
5533
5645
  context,
5534
5646
  object,
5535
- fieldChange
5647
+ fieldChange,
5648
+ service
5536
5649
  })
5537
5650
  });
5538
5651
  };
@@ -5549,8 +5662,9 @@ var useSave = () => {
5549
5662
  data,
5550
5663
  specification,
5551
5664
  context,
5552
- path
5553
- }) => save({ ids, model, data, specification, context, path })
5665
+ path,
5666
+ service
5667
+ }) => save({ ids, model, data, specification, context, path, service })
5554
5668
  });
5555
5669
  };
5556
5670
  var use_save_default = useSave;
@@ -5602,12 +5716,14 @@ var useButton = () => {
5602
5716
  model,
5603
5717
  ids,
5604
5718
  context,
5605
- method
5719
+ method,
5720
+ service
5606
5721
  }) => callButton({
5607
5722
  model,
5608
5723
  ids,
5609
5724
  context,
5610
- method
5725
+ method,
5726
+ service
5611
5727
  }),
5612
5728
  onSuccess: (response) => {
5613
5729
  return response;
@@ -5624,11 +5740,13 @@ var useDuplicateRecord = () => {
5624
5740
  mutationFn: ({
5625
5741
  id,
5626
5742
  model,
5627
- context
5743
+ context,
5744
+ service
5628
5745
  }) => duplicateRecord({
5629
5746
  id,
5630
5747
  model,
5631
- context
5748
+ context,
5749
+ service
5632
5750
  })
5633
5751
  });
5634
5752
  };
@@ -5711,11 +5829,11 @@ var use_get_groups_default = useGetGroups;
5711
5829
 
5712
5830
  // src/hooks/view/use-get-list-data.ts
5713
5831
  var import_react_query49 = require("@tanstack/react-query");
5714
- var useGetListData = (listDataProps, queryKey, enabled) => {
5832
+ var useGetListData = (listDataProps, queryKey, enabled, service) => {
5715
5833
  const { getAll } = useModelService();
5716
5834
  return (0, import_react_query49.useQuery)({
5717
5835
  queryKey,
5718
- queryFn: () => getAll({ data: listDataProps }).then((res) => {
5836
+ queryFn: () => getAll({ data: listDataProps, service }).then((res) => {
5719
5837
  if (res) {
5720
5838
  return res;
5721
5839
  }
@@ -5791,12 +5909,13 @@ var import_react_query53 = require("@tanstack/react-query");
5791
5909
  var useGetSelection = ({
5792
5910
  data,
5793
5911
  queryKey,
5794
- enabled
5912
+ enabled,
5913
+ service
5795
5914
  }) => {
5796
5915
  const { getSelectionItem } = useViewService();
5797
5916
  return (0, import_react_query53.useQuery)({
5798
5917
  queryKey,
5799
- queryFn: () => getSelectionItem({ data }),
5918
+ queryFn: () => getSelectionItem({ data, service }),
5800
5919
  enabled,
5801
5920
  refetchOnWindowFocus: false
5802
5921
  });
@@ -5824,11 +5943,13 @@ var useLoadAction = () => {
5824
5943
  return (0, import_react_query55.useMutation)({
5825
5944
  mutationFn: ({
5826
5945
  idAction,
5827
- context
5946
+ context,
5947
+ service
5828
5948
  }) => {
5829
5949
  return loadAction({
5830
5950
  idAction,
5831
- context
5951
+ context,
5952
+ service
5832
5953
  });
5833
5954
  }
5834
5955
  });
@@ -5869,11 +5990,13 @@ var useRemoveRow = () => {
5869
5990
  mutationFn: ({
5870
5991
  model,
5871
5992
  ids,
5872
- context
5993
+ context,
5994
+ service
5873
5995
  }) => removeRows({
5874
5996
  model,
5875
5997
  ids,
5876
- context
5998
+ context,
5999
+ service
5877
6000
  })
5878
6001
  });
5879
6002
  };
@@ -5904,10 +6027,12 @@ var useRunAction = () => {
5904
6027
  return (0, import_react_query60.useMutation)({
5905
6028
  mutationFn: ({
5906
6029
  idAction,
5907
- context
6030
+ context,
6031
+ service
5908
6032
  }) => runAction({
5909
6033
  idAction,
5910
- context
6034
+ context,
6035
+ service
5911
6036
  })
5912
6037
  });
5913
6038
  };