@fctc/interface-logic 2.3.2 → 2.3.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/hooks.mjs CHANGED
@@ -17,8 +17,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
17
17
  UriConstants2["LOAD_ACTION"] = `/load_action`;
18
18
  UriConstants2["REPORT_PATH"] = `/report`;
19
19
  UriConstants2["RUN_ACTION_PATH"] = `/run_action`;
20
- UriConstants2["UPLOAD_FILE_EXCEL_PATH"] = `/upload/file`;
21
- UriConstants2["UPLOAD_FILE_PATH"] = `/web/binary/upload_attachment`;
20
+ UriConstants2["UPLOAD_FILE_PATH"] = `/upload/file`;
22
21
  UriConstants2["GET_MESSAGE"] = `/chatter/thread/messages`;
23
22
  UriConstants2["SENT_MESSAGE"] = `/chatter/message/post`;
24
23
  UriConstants2["UPLOAD_IMAGE"] = `/mail/attachment/upload`;
@@ -26,7 +25,6 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
26
25
  UriConstants2["IMAGE_PATH"] = `/web/image`;
27
26
  UriConstants2["LOAD_MESSAGE"] = `/load_message_failures`;
28
27
  UriConstants2["TOKEN"] = `/check_token`;
29
- UriConstants2["VALIDATE_ACTION_TOKEN"] = `/action-token/validate`;
30
28
  UriConstants2["CREATE_UPDATE_PATH"] = `/create_update`;
31
29
  UriConstants2["TWOFA_METHOD_PATH"] = `/id/api/v2/call`;
32
30
  UriConstants2["SIGNIN_SSO"] = `/signin-sso/oauth`;
@@ -2841,21 +2839,15 @@ function useActionService() {
2841
2839
  const loadAction = useCallback2(
2842
2840
  async ({
2843
2841
  idAction,
2844
- context,
2845
- service
2842
+ context
2846
2843
  }) => {
2847
2844
  const jsonData = {
2848
2845
  action_id: idAction,
2849
2846
  with_context: { ...context }
2850
2847
  };
2851
- return env.requests.post(
2852
- "/load_action" /* LOAD_ACTION */,
2853
- jsonData,
2854
- {
2855
- headers: { "Content-Type": "application/json" }
2856
- },
2857
- service
2858
- );
2848
+ return env.requests.post("/load_action" /* LOAD_ACTION */, jsonData, {
2849
+ headers: { "Content-Type": "application/json" }
2850
+ });
2859
2851
  },
2860
2852
  [env]
2861
2853
  );
@@ -2864,8 +2856,7 @@ function useActionService() {
2864
2856
  model,
2865
2857
  ids = [],
2866
2858
  context,
2867
- method,
2868
- service
2859
+ method
2869
2860
  }) => {
2870
2861
  try {
2871
2862
  const jsonData = {
@@ -2874,14 +2865,9 @@ function useActionService() {
2874
2865
  ids,
2875
2866
  with_context: context
2876
2867
  };
2877
- return env.requests.post(
2878
- "/call" /* CALL_PATH */,
2879
- jsonData,
2880
- {
2881
- headers: { "Content-Type": "application/json" }
2882
- },
2883
- service
2884
- );
2868
+ return env.requests.post("/call" /* CALL_PATH */, jsonData, {
2869
+ headers: { "Content-Type": "application/json" }
2870
+ });
2885
2871
  } catch (error) {
2886
2872
  console.error("Error when calling button action:", error);
2887
2873
  throw error;
@@ -2893,8 +2879,7 @@ function useActionService() {
2893
2879
  async ({
2894
2880
  model,
2895
2881
  ids,
2896
- context,
2897
- service
2882
+ context
2898
2883
  }) => {
2899
2884
  const jsonData = {
2900
2885
  model,
@@ -2902,14 +2887,9 @@ function useActionService() {
2902
2887
  ids,
2903
2888
  with_context: context
2904
2889
  };
2905
- return env.requests.post(
2906
- "/call" /* CALL_PATH */,
2907
- jsonData,
2908
- {
2909
- headers: { "Content-Type": "application/json" }
2910
- },
2911
- service
2912
- );
2890
+ return env.requests.post("/call" /* CALL_PATH */, jsonData, {
2891
+ headers: { "Content-Type": "application/json" }
2892
+ });
2913
2893
  },
2914
2894
  [env]
2915
2895
  );
@@ -2917,8 +2897,7 @@ function useActionService() {
2917
2897
  async ({
2918
2898
  model,
2919
2899
  id,
2920
- context,
2921
- service
2900
+ context
2922
2901
  }) => {
2923
2902
  const jsonData = {
2924
2903
  model,
@@ -2926,14 +2905,9 @@ function useActionService() {
2926
2905
  ids: id,
2927
2906
  with_context: context
2928
2907
  };
2929
- return env.requests.post(
2930
- "/call" /* CALL_PATH */,
2931
- jsonData,
2932
- {
2933
- headers: { "Content-Type": "application/json" }
2934
- },
2935
- service
2936
- );
2908
+ return env.requests.post("/call" /* CALL_PATH */, jsonData, {
2909
+ headers: { "Content-Type": "application/json" }
2910
+ });
2937
2911
  },
2938
2912
  [env]
2939
2913
  );
@@ -2976,21 +2950,15 @@ function useActionService() {
2976
2950
  const runAction = useCallback2(
2977
2951
  async ({
2978
2952
  idAction,
2979
- context,
2980
- service
2953
+ context
2981
2954
  }) => {
2982
2955
  const jsonData = {
2983
2956
  action_id: idAction,
2984
2957
  with_context: { ...context }
2985
2958
  };
2986
- return env.requests.post(
2987
- "/run_action" /* RUN_ACTION_PATH */,
2988
- jsonData,
2989
- {
2990
- headers: { "Content-Type": "application/json" }
2991
- },
2992
- service
2993
- );
2959
+ return env.requests.post("/run_action" /* RUN_ACTION_PATH */, jsonData, {
2960
+ headers: { "Content-Type": "application/json" }
2961
+ });
2994
2962
  },
2995
2963
  [env]
2996
2964
  );
@@ -3133,15 +3101,18 @@ function useAuthService() {
3133
3101
  [env]
3134
3102
  );
3135
3103
  const isValidActionToken = useCallback3(
3136
- async (actionToken) => {
3137
- const bodyData = {};
3138
- return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
3139
- headers: {
3140
- "Content-Type": "application/json"
3141
- },
3142
- useActionToken: true,
3143
- actionToken
3144
- });
3104
+ async (actionToken, path) => {
3105
+ return env?.requests?.post(
3106
+ path,
3107
+ {},
3108
+ {
3109
+ headers: {
3110
+ "Content-Type": "application/json"
3111
+ },
3112
+ useActionToken: true,
3113
+ actionToken
3114
+ }
3115
+ );
3145
3116
  },
3146
3117
  [env]
3147
3118
  );
@@ -3177,14 +3148,13 @@ function useAuthService() {
3177
3148
  data.append("client_id", env?.config?.clientId || "");
3178
3149
  data.append("redirect_uri", env?.config?.redirectUri || "");
3179
3150
  return env?.requests?.post(
3180
- "/token" /* TOKEN_BY_CODE */,
3151
+ `${env?.baseUrl?.replace("/mms/", "/id/")}/${"/token" /* TOKEN_BY_CODE */}`,
3181
3152
  data,
3182
3153
  {
3183
3154
  headers: {
3184
3155
  "Content-Type": "application/x-www-form-urlencoded"
3185
3156
  }
3186
- },
3187
- "id"
3157
+ }
3188
3158
  );
3189
3159
  },
3190
3160
  [env]
@@ -3267,15 +3237,15 @@ function useCompanyService() {
3267
3237
  import { useCallback as useCallback5 } from "react";
3268
3238
  function useExcelService() {
3269
3239
  const { env } = useEnv();
3270
- const uploadFileExcel = useCallback5(
3240
+ const uploadFile = useCallback5(
3271
3241
  async ({ formData }) => {
3272
- return env.requests.post("/upload/file" /* UPLOAD_FILE_EXCEL_PATH */, formData);
3242
+ return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData);
3273
3243
  },
3274
3244
  [env]
3275
3245
  );
3276
3246
  const uploadIdFile = useCallback5(
3277
3247
  async ({ formData }) => {
3278
- return env.requests.post("/upload/file" /* UPLOAD_FILE_EXCEL_PATH */, formData, {
3248
+ return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData, {
3279
3249
  headers: {
3280
3250
  "Content-Type": "multipart/form-data"
3281
3251
  }
@@ -3423,7 +3393,7 @@ function useExcelService() {
3423
3393
  [env]
3424
3394
  );
3425
3395
  return {
3426
- uploadFileExcel,
3396
+ uploadFile,
3427
3397
  uploadIdFile,
3428
3398
  parsePreview,
3429
3399
  executeImport,
@@ -3518,12 +3488,6 @@ function useFormService() {
3518
3488
  },
3519
3489
  [env]
3520
3490
  );
3521
- const uploadFile = useCallback6(
3522
- async ({ formData }) => {
3523
- return env.requests.post("/web/binary/upload_attachment" /* UPLOAD_FILE_PATH */, formData);
3524
- },
3525
- [env]
3526
- );
3527
3491
  const getFormView = useCallback6(
3528
3492
  async ({ data }) => {
3529
3493
  const jsonData = {
@@ -3576,8 +3540,7 @@ function useFormService() {
3576
3540
  getImage,
3577
3541
  uploadImage,
3578
3542
  getFormView,
3579
- changeStatus,
3580
- uploadFile
3543
+ changeStatus
3581
3544
  };
3582
3545
  }
3583
3546
 
@@ -3710,7 +3673,7 @@ function useModelService() {
3710
3673
  });
3711
3674
  }, [env]);
3712
3675
  const getAll = useCallback8(
3713
- async ({ data, service }) => {
3676
+ async ({ data }) => {
3714
3677
  const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
3715
3678
  fields: data.fields,
3716
3679
  groupby: data.groupby
@@ -3731,16 +3694,11 @@ function useModelService() {
3731
3694
  ...jsonReadGroup
3732
3695
  }
3733
3696
  };
3734
- return env.requests.post(
3735
- "/call" /* CALL_PATH */,
3736
- jsonData,
3737
- {
3738
- headers: {
3739
- "Content-Type": "application/json"
3740
- }
3741
- },
3742
- service
3743
- );
3697
+ return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3698
+ headers: {
3699
+ "Content-Type": "application/json"
3700
+ }
3701
+ });
3744
3702
  },
3745
3703
  [env]
3746
3704
  );
@@ -3808,13 +3766,7 @@ function useModelService() {
3808
3766
  [env]
3809
3767
  );
3810
3768
  const getDetail = useCallback8(
3811
- async ({
3812
- ids = [],
3813
- model,
3814
- specification,
3815
- context,
3816
- service
3817
- }) => {
3769
+ async ({ ids = [], model, specification, context }) => {
3818
3770
  const jsonData = {
3819
3771
  model,
3820
3772
  method: "web_read" /* WEB_READ */,
@@ -3824,16 +3776,11 @@ function useModelService() {
3824
3776
  specification
3825
3777
  }
3826
3778
  };
3827
- return env.requests.post(
3828
- "/call" /* CALL_PATH */,
3829
- jsonData,
3830
- {
3831
- headers: {
3832
- "Content-Type": "application/json"
3833
- }
3834
- },
3835
- service
3836
- );
3779
+ return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3780
+ headers: {
3781
+ "Content-Type": "application/json"
3782
+ }
3783
+ });
3837
3784
  },
3838
3785
  [env]
3839
3786
  );
@@ -3844,8 +3791,7 @@ function useModelService() {
3844
3791
  data = {},
3845
3792
  specification = {},
3846
3793
  context = {},
3847
- path,
3848
- service
3794
+ path
3849
3795
  }) => {
3850
3796
  const jsonData = {
3851
3797
  model,
@@ -3857,36 +3803,26 @@ function useModelService() {
3857
3803
  specification
3858
3804
  }
3859
3805
  };
3860
- return env.requests.post(
3861
- path ?? "/call" /* CALL_PATH */,
3862
- jsonData,
3863
- {
3864
- headers: {
3865
- "Content-Type": "application/json"
3866
- }
3867
- },
3868
- service
3869
- );
3806
+ return env.requests.post(path ?? "/call" /* CALL_PATH */, jsonData, {
3807
+ headers: {
3808
+ "Content-Type": "application/json"
3809
+ }
3810
+ });
3870
3811
  },
3871
3812
  [env]
3872
3813
  );
3873
3814
  const deleteApi = useCallback8(
3874
- async ({ ids = [], model, service }) => {
3815
+ async ({ ids = [], model }) => {
3875
3816
  const jsonData = {
3876
3817
  model,
3877
3818
  method: "unlink" /* UNLINK */,
3878
3819
  ids
3879
3820
  };
3880
- return env.requests.post(
3881
- "/call" /* CALL_PATH */,
3882
- jsonData,
3883
- {
3884
- headers: {
3885
- "Content-Type": "application/json"
3886
- }
3887
- },
3888
- service
3889
- );
3821
+ return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3822
+ headers: {
3823
+ "Content-Type": "application/json"
3824
+ }
3825
+ });
3890
3826
  },
3891
3827
  [env]
3892
3828
  );
@@ -3897,8 +3833,7 @@ function useModelService() {
3897
3833
  object,
3898
3834
  specification,
3899
3835
  context,
3900
- fieldChange,
3901
- service
3836
+ fieldChange
3902
3837
  }) => {
3903
3838
  const jsonData = {
3904
3839
  model,
@@ -3911,35 +3846,25 @@ function useModelService() {
3911
3846
  specification
3912
3847
  ]
3913
3848
  };
3914
- return env.requests.post(
3915
- "/call" /* CALL_PATH */,
3916
- jsonData,
3917
- {
3918
- headers: {
3919
- "Content-Type": "application/json"
3920
- }
3921
- },
3922
- service
3923
- );
3849
+ return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3850
+ headers: {
3851
+ "Content-Type": "application/json"
3852
+ }
3853
+ });
3924
3854
  },
3925
3855
  [env]
3926
3856
  );
3927
3857
  const getListFieldsOnchange = useCallback8(
3928
- async ({ model, service }) => {
3858
+ async ({ model }) => {
3929
3859
  const jsonData = {
3930
3860
  model,
3931
3861
  method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
3932
3862
  };
3933
- return env.requests.post(
3934
- "/call" /* CALL_PATH */,
3935
- jsonData,
3936
- {
3937
- headers: {
3938
- "Content-Type": "application/json"
3939
- }
3940
- },
3941
- service
3942
- );
3863
+ return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3864
+ headers: {
3865
+ "Content-Type": "application/json"
3866
+ }
3867
+ });
3943
3868
  },
3944
3869
  [env]
3945
3870
  );
@@ -4099,8 +4024,7 @@ function useViewService() {
4099
4024
  views,
4100
4025
  context = {},
4101
4026
  options = {},
4102
- aid,
4103
- service
4027
+ aid
4104
4028
  }) => {
4105
4029
  const defaultOptions = {
4106
4030
  load_filters: true,
@@ -4116,22 +4040,16 @@ function useViewService() {
4116
4040
  },
4117
4041
  with_context: context
4118
4042
  };
4119
- return env?.requests?.post(
4120
- "/call" /* CALL_PATH */,
4121
- jsonDataView,
4122
- {
4123
- headers: {
4124
- "Content-Type": "application/json"
4125
- }
4126
- },
4127
- service
4128
- );
4043
+ return env?.requests?.post("/call" /* CALL_PATH */, jsonDataView, {
4044
+ headers: {
4045
+ "Content-Type": "application/json"
4046
+ }
4047
+ });
4129
4048
  },
4130
4049
  [env]
4131
4050
  );
4132
4051
  const getMenu = useCallback10(
4133
- async (context, specification, domain) => {
4134
- console.log("domain", domain);
4052
+ async (context, specification) => {
4135
4053
  const jsonData = {
4136
4054
  model: "ir.ui.menu" /* MENU */,
4137
4055
  method: "web_search_read" /* WEB_SEARCH_READ */,
@@ -4139,7 +4057,7 @@ function useViewService() {
4139
4057
  with_context: context,
4140
4058
  kwargs: {
4141
4059
  specification,
4142
- domain: domain ?? [
4060
+ domain: [
4143
4061
  "&",
4144
4062
  ["is_display", "=", true],
4145
4063
  "&",
@@ -4209,7 +4127,7 @@ function useViewService() {
4209
4127
  [env]
4210
4128
  );
4211
4129
  const getSelectionItem = useCallback10(
4212
- async ({ data, service }) => {
4130
+ async ({ data }) => {
4213
4131
  const jsonData = {
4214
4132
  model: data.model,
4215
4133
  ids: [],
@@ -4227,16 +4145,11 @@ function useViewService() {
4227
4145
  }
4228
4146
  }
4229
4147
  };
4230
- return env?.requests.post(
4231
- "/call" /* CALL_PATH */,
4232
- jsonData,
4233
- {
4234
- headers: {
4235
- "Content-Type": "application/json"
4236
- }
4237
- },
4238
- service
4239
- );
4148
+ return env?.requests.post("/call" /* CALL_PATH */, jsonData, {
4149
+ headers: {
4150
+ "Content-Type": "application/json"
4151
+ }
4152
+ });
4240
4153
  },
4241
4154
  [env]
4242
4155
  );
@@ -4595,8 +4508,11 @@ import { useMutation as useMutation12 } from "@tanstack/react-query";
4595
4508
  var useValidateActionToken = () => {
4596
4509
  const { isValidActionToken } = useAuthService();
4597
4510
  return useMutation12({
4598
- mutationFn: ({ actionToken }) => {
4599
- return isValidActionToken(actionToken);
4511
+ mutationFn: ({
4512
+ actionToken,
4513
+ path
4514
+ }) => {
4515
+ return isValidActionToken(actionToken, path);
4600
4516
  }
4601
4517
  });
4602
4518
  };
@@ -4742,17 +4658,17 @@ var useParsePreview = () => {
4742
4658
  };
4743
4659
  var use_parse_preview_default = useParsePreview;
4744
4660
 
4745
- // src/hooks/excel/use-upload-file-excel.ts
4661
+ // src/hooks/excel/use-upload-file.ts
4746
4662
  import { useMutation as useMutation18 } from "@tanstack/react-query";
4747
- var useUploadFileExcel = () => {
4748
- const { uploadFileExcel } = useExcelService();
4663
+ var useUploadFile = () => {
4664
+ const { uploadFile } = useExcelService();
4749
4665
  return useMutation18({
4750
- mutationFn: ({ formData }) => uploadFileExcel({
4666
+ mutationFn: ({ formData }) => uploadFile({
4751
4667
  formData
4752
4668
  })
4753
4669
  });
4754
4670
  };
4755
- var use_upload_file_excel_default = useUploadFileExcel;
4671
+ var use_upload_file_default = useUploadFile;
4756
4672
 
4757
4673
  // src/hooks/excel/use-upload-id-file.ts
4758
4674
  import { useMutation as useMutation19 } from "@tanstack/react-query";
@@ -4899,24 +4815,12 @@ var useUploadImage = () => {
4899
4815
  };
4900
4816
  var use_upload_image_default = useUploadImage;
4901
4817
 
4902
- // src/hooks/form/use-upload-file.ts
4903
- import { useMutation as useMutation25 } from "@tanstack/react-query";
4904
- var useUploadFile = () => {
4905
- const { uploadFile } = useFormService();
4906
- return useMutation25({
4907
- mutationFn: ({ formData }) => uploadFile({
4908
- formData
4909
- })
4910
- });
4911
- };
4912
- var use_upload_file_default = useUploadFile;
4913
-
4914
4818
  // src/hooks/model/use-delete.ts
4915
- import { useMutation as useMutation26 } from "@tanstack/react-query";
4819
+ import { useMutation as useMutation25 } from "@tanstack/react-query";
4916
4820
  var useDelete = () => {
4917
4821
  const { deleteApi } = useModelService();
4918
- return useMutation26({
4919
- mutationFn: ({ ids, model, service }) => deleteApi({ ids, model, service })
4822
+ return useMutation25({
4823
+ mutationFn: ({ ids, model }) => deleteApi({ ids, model })
4920
4824
  });
4921
4825
  };
4922
4826
  var use_delete_default = useDelete;
@@ -4971,22 +4875,20 @@ var useGetCurrency = () => {
4971
4875
  var use_get_currency_default = useGetCurrency;
4972
4876
 
4973
4877
  // src/hooks/model/use-get-detail.ts
4974
- import { useMutation as useMutation27 } from "@tanstack/react-query";
4878
+ import { useMutation as useMutation26 } from "@tanstack/react-query";
4975
4879
  var useGetDetail = () => {
4976
4880
  const { getDetail } = useModelService();
4977
- return useMutation27({
4881
+ return useMutation26({
4978
4882
  mutationFn: ({
4979
4883
  model,
4980
4884
  ids,
4981
4885
  specification,
4982
- context,
4983
- service
4886
+ context
4984
4887
  }) => getDetail({
4985
4888
  model,
4986
4889
  ids,
4987
4890
  specification,
4988
- context,
4989
- service
4891
+ context
4990
4892
  })
4991
4893
  });
4992
4894
  };
@@ -4994,16 +4896,12 @@ var use_get_detail_default = useGetDetail;
4994
4896
 
4995
4897
  // src/hooks/model/use-get-field-onchange.ts
4996
4898
  import { useQuery as useQuery9 } from "@tanstack/react-query";
4997
- var useGetFieldOnChange = ({
4998
- model,
4999
- service
5000
- }) => {
4899
+ var useGetFieldOnChange = ({ model }) => {
5001
4900
  const { getListFieldsOnchange } = useModelService();
5002
4901
  return useQuery9({
5003
4902
  queryKey: [`field-onchange-${model}`, model],
5004
4903
  queryFn: () => getListFieldsOnchange({
5005
- model,
5006
- service
4904
+ model
5007
4905
  }).then((res) => {
5008
4906
  if (res) {
5009
4907
  return res;
@@ -5085,8 +4983,7 @@ var BaseModel = class {
5085
4983
  spec[field?.name] = {
5086
4984
  fields: {
5087
4985
  id: {},
5088
- display_name: {},
5089
- ...field?.widget === "many2many_binary" ? { mimetype: {} } : {}
4986
+ display_name: {}
5090
4987
  }
5091
4988
  };
5092
4989
  }
@@ -5177,64 +5074,61 @@ var useOdooDataTransform = () => {
5177
5074
  var use_odoo_data_transform_default = useOdooDataTransform;
5178
5075
 
5179
5076
  // src/hooks/model/use-onchange-form.ts
5180
- import { useMutation as useMutation28 } from "@tanstack/react-query";
5077
+ import { useMutation as useMutation27 } from "@tanstack/react-query";
5181
5078
  var useOnChangeForm = () => {
5182
5079
  const { onChange } = useModelService();
5183
- return useMutation28({
5080
+ return useMutation27({
5184
5081
  mutationFn: ({
5185
5082
  ids,
5186
5083
  model,
5187
5084
  specification,
5188
5085
  context,
5189
5086
  object,
5190
- fieldChange,
5191
- service
5087
+ fieldChange
5192
5088
  }) => onChange({
5193
5089
  ids,
5194
5090
  model,
5195
5091
  specification,
5196
5092
  context,
5197
5093
  object,
5198
- fieldChange,
5199
- service
5094
+ fieldChange
5200
5095
  })
5201
5096
  });
5202
5097
  };
5203
5098
  var use_onchange_form_default = useOnChangeForm;
5204
5099
 
5205
5100
  // src/hooks/model/use-save.ts
5206
- import { useMutation as useMutation29 } from "@tanstack/react-query";
5101
+ import { useMutation as useMutation28 } from "@tanstack/react-query";
5207
5102
  var useSave = () => {
5208
5103
  const { save } = useModelService();
5209
- return useMutation29({
5104
+ return useMutation28({
5210
5105
  mutationFn: ({
5211
5106
  ids,
5212
5107
  model,
5213
5108
  data,
5214
5109
  specification,
5215
5110
  context,
5216
- path,
5217
- service
5218
- }) => save({ ids, model, data, specification, context, path, service })
5111
+ path
5112
+ }) => save({ ids, model, data, specification, context, path })
5219
5113
  });
5220
5114
  };
5221
5115
  var use_save_default = useSave;
5222
5116
 
5223
5117
  // src/hooks/user/use-get-profile.ts
5224
- import { useMutation as useMutation30 } from "@tanstack/react-query";
5118
+ import { useMutation as useMutation29 } from "@tanstack/react-query";
5225
5119
  var useGetProfile = (path) => {
5226
5120
  const { getProfile } = useUserService();
5227
- return useMutation30({
5121
+ return useMutation29({
5228
5122
  mutationFn: () => getProfile(path)
5229
5123
  });
5230
5124
  };
5231
5125
  var use_get_profile_default = useGetProfile;
5232
5126
 
5233
5127
  // src/hooks/user/use-get-user.ts
5234
- import { useMutation as useMutation31 } from "@tanstack/react-query";
5128
+ import { useMutation as useMutation30 } from "@tanstack/react-query";
5235
5129
  var useGetUser = () => {
5236
5130
  const { getUser } = useUserService();
5237
- return useMutation31({
5131
+ return useMutation30({
5238
5132
  mutationFn: ({ id, context }) => getUser({
5239
5133
  id,
5240
5134
  context
@@ -5244,10 +5138,10 @@ var useGetUser = () => {
5244
5138
  var use_get_user_default = useGetUser;
5245
5139
 
5246
5140
  // src/hooks/user/use-switch-locale.ts
5247
- import { useMutation as useMutation32 } from "@tanstack/react-query";
5141
+ import { useMutation as useMutation31 } from "@tanstack/react-query";
5248
5142
  var useSwitchLocale = () => {
5249
5143
  const { switchUserLocale } = useUserService();
5250
- return useMutation32({
5144
+ return useMutation31({
5251
5145
  mutationFn: ({ data }) => {
5252
5146
  return switchUserLocale({
5253
5147
  id: data.id,
@@ -5259,22 +5153,20 @@ var useSwitchLocale = () => {
5259
5153
  var use_switch_locale_default = useSwitchLocale;
5260
5154
 
5261
5155
  // src/hooks/view/use-button.ts
5262
- import { useMutation as useMutation33 } from "@tanstack/react-query";
5156
+ import { useMutation as useMutation32 } from "@tanstack/react-query";
5263
5157
  var useButton = () => {
5264
5158
  const { callButton } = useActionService();
5265
- return useMutation33({
5159
+ return useMutation32({
5266
5160
  mutationFn: ({
5267
5161
  model,
5268
5162
  ids,
5269
5163
  context,
5270
- method,
5271
- service
5164
+ method
5272
5165
  }) => callButton({
5273
5166
  model,
5274
5167
  ids,
5275
5168
  context,
5276
- method,
5277
- service
5169
+ method
5278
5170
  }),
5279
5171
  onSuccess: (response) => {
5280
5172
  return response;
@@ -5284,20 +5176,18 @@ var useButton = () => {
5284
5176
  var use_button_default = useButton;
5285
5177
 
5286
5178
  // src/hooks/view/use-duplicate-record.ts
5287
- import { useMutation as useMutation34 } from "@tanstack/react-query";
5179
+ import { useMutation as useMutation33 } from "@tanstack/react-query";
5288
5180
  var useDuplicateRecord = () => {
5289
5181
  const { duplicateRecord } = useActionService();
5290
- return useMutation34({
5182
+ return useMutation33({
5291
5183
  mutationFn: ({
5292
5184
  id,
5293
5185
  model,
5294
- context,
5295
- service
5186
+ context
5296
5187
  }) => duplicateRecord({
5297
5188
  id,
5298
5189
  model,
5299
- context,
5300
- service
5190
+ context
5301
5191
  })
5302
5192
  });
5303
5193
  };
@@ -5379,12 +5269,12 @@ var useGetGroups = ({
5379
5269
  var use_get_groups_default = useGetGroups;
5380
5270
 
5381
5271
  // src/hooks/view/use-get-list-data.ts
5382
- import { keepPreviousData, useQuery as useQuery14 } from "@tanstack/react-query";
5383
- var useGetListData = (listDataProps, queryKey, enabled, service) => {
5272
+ import { useQuery as useQuery14 } from "@tanstack/react-query";
5273
+ var useGetListData = (listDataProps, queryKey, enabled) => {
5384
5274
  const { getAll } = useModelService();
5385
5275
  return useQuery14({
5386
5276
  queryKey,
5387
- queryFn: () => getAll({ data: listDataProps, service }).then((res) => {
5277
+ queryFn: () => getAll({ data: listDataProps }).then((res) => {
5388
5278
  if (res) {
5389
5279
  return res;
5390
5280
  }
@@ -5392,19 +5282,18 @@ var useGetListData = (listDataProps, queryKey, enabled, service) => {
5392
5282
  }),
5393
5283
  enabled,
5394
5284
  refetchOnWindowFocus: false,
5395
- staleTime: 0,
5396
- placeholderData: keepPreviousData
5285
+ staleTime: 0
5397
5286
  });
5398
5287
  };
5399
5288
  var use_get_list_data_default = useGetListData;
5400
5289
 
5401
5290
  // src/hooks/view/use-get-menu.ts
5402
5291
  import { useQuery as useQuery15 } from "@tanstack/react-query";
5403
- var useGetMenu = (context, specification, enabled, domain) => {
5292
+ var useGetMenu = (context, specification, enabled) => {
5404
5293
  const { getMenu } = useViewService();
5405
5294
  return useQuery15({
5406
5295
  queryKey: ["menus" /* MENU */, context],
5407
- queryFn: () => getMenu(context, specification, domain).then((res) => {
5296
+ queryFn: () => getMenu(context, specification).then((res) => {
5408
5297
  if (res && res?.records && res?.records?.length > 0) {
5409
5298
  return res?.records;
5410
5299
  }
@@ -5418,10 +5307,10 @@ var useGetMenu = (context, specification, enabled, domain) => {
5418
5307
  var use_get_menu_default = useGetMenu;
5419
5308
 
5420
5309
  // src/hooks/view/use-get-print-report.ts
5421
- import { useMutation as useMutation35 } from "@tanstack/react-query";
5310
+ import { useMutation as useMutation34 } from "@tanstack/react-query";
5422
5311
  var useGetPrintReport = () => {
5423
5312
  const { getPrintReportName } = useActionService();
5424
- return useMutation35({
5313
+ return useMutation34({
5425
5314
  mutationFn: ({ id }) => getPrintReportName({
5426
5315
  id
5427
5316
  })
@@ -5461,13 +5350,12 @@ import { useQuery as useQuery17 } from "@tanstack/react-query";
5461
5350
  var useGetSelection = ({
5462
5351
  data,
5463
5352
  queryKey,
5464
- enabled,
5465
- service
5353
+ enabled
5466
5354
  }) => {
5467
5355
  const { getSelectionItem } = useViewService();
5468
5356
  return useQuery17({
5469
5357
  queryKey,
5470
- queryFn: () => getSelectionItem({ data, service }),
5358
+ queryFn: () => getSelectionItem({ data }),
5471
5359
  enabled,
5472
5360
  refetchOnWindowFocus: false
5473
5361
  });
@@ -5489,19 +5377,17 @@ var useGetView = (viewParams, actData) => {
5489
5377
  var use_get_view_default = useGetView;
5490
5378
 
5491
5379
  // src/hooks/view/use-load-action.ts
5492
- import { useMutation as useMutation36 } from "@tanstack/react-query";
5380
+ import { useMutation as useMutation35 } from "@tanstack/react-query";
5493
5381
  var useLoadAction = () => {
5494
5382
  const { loadAction } = useActionService();
5495
- return useMutation36({
5383
+ return useMutation35({
5496
5384
  mutationFn: ({
5497
5385
  idAction,
5498
- context,
5499
- service
5386
+ context
5500
5387
  }) => {
5501
5388
  return loadAction({
5502
5389
  idAction,
5503
- context,
5504
- service
5390
+ context
5505
5391
  });
5506
5392
  }
5507
5393
  });
@@ -5521,10 +5407,10 @@ var useLoadMessage = () => {
5521
5407
  var use_load_message_default = useLoadMessage;
5522
5408
 
5523
5409
  // src/hooks/view/use-print.ts
5524
- import { useMutation as useMutation37 } from "@tanstack/react-query";
5410
+ import { useMutation as useMutation36 } from "@tanstack/react-query";
5525
5411
  var usePrint = () => {
5526
5412
  const { print } = useActionService();
5527
- return useMutation37({
5413
+ return useMutation36({
5528
5414
  mutationFn: ({ id, report, db }) => print({
5529
5415
  id,
5530
5416
  report,
@@ -5535,20 +5421,18 @@ var usePrint = () => {
5535
5421
  var use_print_default = usePrint;
5536
5422
 
5537
5423
  // src/hooks/view/use-remove-row.ts
5538
- import { useMutation as useMutation38 } from "@tanstack/react-query";
5424
+ import { useMutation as useMutation37 } from "@tanstack/react-query";
5539
5425
  var useRemoveRow = () => {
5540
5426
  const { removeRows } = useActionService();
5541
- return useMutation38({
5427
+ return useMutation37({
5542
5428
  mutationFn: ({
5543
5429
  model,
5544
5430
  ids,
5545
- context,
5546
- service
5431
+ context
5547
5432
  }) => removeRows({
5548
5433
  model,
5549
5434
  ids,
5550
- context,
5551
- service
5435
+ context
5552
5436
  })
5553
5437
  });
5554
5438
  };
@@ -5573,28 +5457,26 @@ var useGetResequence = (model, resIds, context, offset) => {
5573
5457
  var use_resequence_default = useGetResequence;
5574
5458
 
5575
5459
  // src/hooks/view/use-run-action.ts
5576
- import { useMutation as useMutation39 } from "@tanstack/react-query";
5460
+ import { useMutation as useMutation38 } from "@tanstack/react-query";
5577
5461
  var useRunAction = () => {
5578
5462
  const { runAction } = useActionService();
5579
- return useMutation39({
5463
+ return useMutation38({
5580
5464
  mutationFn: ({
5581
5465
  idAction,
5582
- context,
5583
- service
5466
+ context
5584
5467
  }) => runAction({
5585
5468
  idAction,
5586
- context,
5587
- service
5469
+ context
5588
5470
  })
5589
5471
  });
5590
5472
  };
5591
5473
  var use_run_action_default = useRunAction;
5592
5474
 
5593
5475
  // src/hooks/view/use-signin-sso.ts
5594
- import { useMutation as useMutation40 } from "@tanstack/react-query";
5476
+ import { useMutation as useMutation39 } from "@tanstack/react-query";
5595
5477
  var useSignInSSO = () => {
5596
5478
  const { signInSSO } = useViewService();
5597
- return useMutation40({
5479
+ return useMutation39({
5598
5480
  mutationFn: ({
5599
5481
  redirect_uri,
5600
5482
  state,
@@ -5617,10 +5499,10 @@ var useSignInSSO = () => {
5617
5499
  var use_signin_sso_default = useSignInSSO;
5618
5500
 
5619
5501
  // src/hooks/view/use-verify-2FA.ts
5620
- import { useMutation as useMutation41 } from "@tanstack/react-query";
5502
+ import { useMutation as useMutation40 } from "@tanstack/react-query";
5621
5503
  var useVerify2FA = () => {
5622
5504
  const { verify2FA } = useViewService();
5623
- return useMutation41({
5505
+ return useMutation40({
5624
5506
  mutationFn: ({
5625
5507
  method,
5626
5508
  with_context,
@@ -5641,10 +5523,10 @@ var useVerify2FA = () => {
5641
5523
  var use_verify_2FA_default = useVerify2FA;
5642
5524
 
5643
5525
  // src/hooks/view/uset-get-2FA-method.ts
5644
- import { useMutation as useMutation42 } from "@tanstack/react-query";
5526
+ import { useMutation as useMutation41 } from "@tanstack/react-query";
5645
5527
  var useGet2FAMethods = () => {
5646
5528
  const { get2FAMethods } = useViewService();
5647
- return useMutation42({
5529
+ return useMutation41({
5648
5530
  mutationFn: ({
5649
5531
  method,
5650
5532
  with_context
@@ -5659,10 +5541,10 @@ var useGet2FAMethods = () => {
5659
5541
  var uset_get_2FA_method_default = useGet2FAMethods;
5660
5542
 
5661
5543
  // src/hooks/view/use-grant-access.ts
5662
- import { useMutation as useMutation43 } from "@tanstack/react-query";
5544
+ import { useMutation as useMutation42 } from "@tanstack/react-query";
5663
5545
  var useGrantAccess = () => {
5664
5546
  const { grantAccess } = useViewService();
5665
- return useMutation43({
5547
+ return useMutation42({
5666
5548
  mutationFn: ({
5667
5549
  redirect_uri,
5668
5550
  state,
@@ -5681,10 +5563,10 @@ var useGrantAccess = () => {
5681
5563
  var use_grant_access_default = useGrantAccess;
5682
5564
 
5683
5565
  // src/hooks/view/use-remove-totp-setup.ts
5684
- import { useMutation as useMutation44 } from "@tanstack/react-query";
5566
+ import { useMutation as useMutation43 } from "@tanstack/react-query";
5685
5567
  var useRemoveTotpSetup = () => {
5686
5568
  const { removeTotpSetUp } = useViewService();
5687
- return useMutation44({
5569
+ return useMutation43({
5688
5570
  mutationFn: ({ method, token }) => {
5689
5571
  return removeTotpSetUp({
5690
5572
  method,
@@ -5696,10 +5578,10 @@ var useRemoveTotpSetup = () => {
5696
5578
  var use_remove_totp_setup_default = useRemoveTotpSetup;
5697
5579
 
5698
5580
  // src/hooks/view/use-request-setup-totp.ts
5699
- import { useMutation as useMutation45 } from "@tanstack/react-query";
5581
+ import { useMutation as useMutation44 } from "@tanstack/react-query";
5700
5582
  var useRequestSetupTotp = () => {
5701
5583
  const { requestSetupTotp } = useViewService();
5702
- return useMutation45({
5584
+ return useMutation44({
5703
5585
  mutationFn: ({ method, token }) => {
5704
5586
  return requestSetupTotp({
5705
5587
  method,
@@ -5711,10 +5593,10 @@ var useRequestSetupTotp = () => {
5711
5593
  var use_request_setup_totp_default = useRequestSetupTotp;
5712
5594
 
5713
5595
  // src/hooks/view/use-settings-web-read-2fa.ts
5714
- import { useMutation as useMutation46 } from "@tanstack/react-query";
5596
+ import { useMutation as useMutation45 } from "@tanstack/react-query";
5715
5597
  var useSettingsWebRead2fa = () => {
5716
5598
  const { settingsWebRead2fa } = useViewService();
5717
- return useMutation46({
5599
+ return useMutation45({
5718
5600
  mutationFn: ({
5719
5601
  method,
5720
5602
  token,
@@ -5733,10 +5615,10 @@ var useSettingsWebRead2fa = () => {
5733
5615
  var use_settings_web_read_2fa_default = useSettingsWebRead2fa;
5734
5616
 
5735
5617
  // src/hooks/view/use-verify-totp.ts
5736
- import { useMutation as useMutation47 } from "@tanstack/react-query";
5618
+ import { useMutation as useMutation46 } from "@tanstack/react-query";
5737
5619
  var useVerifyTotp = () => {
5738
5620
  const { verifyTotp } = useViewService();
5739
- return useMutation47({
5621
+ return useMutation46({
5740
5622
  mutationFn: ({
5741
5623
  method,
5742
5624
  action_token,
@@ -5815,7 +5697,6 @@ export {
5815
5697
  use_switch_locale_default as useSwitchLocale,
5816
5698
  use_update_password_default as useUpdatePassword,
5817
5699
  use_upload_file_default as useUploadFile,
5818
- use_upload_file_excel_default as useUploadFileExcel,
5819
5700
  use_upload_id_file_default as useUploadIdFile,
5820
5701
  use_upload_image_default as useUploadImage,
5821
5702
  use_validate_action_token_default as useValidateActionToken,