@fctc/interface-logic 2.4.0 → 2.4.2

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
@@ -2894,8 +2894,7 @@ function useActionService() {
2894
2894
  async ({
2895
2895
  idAction,
2896
2896
  context,
2897
- service,
2898
- xNode
2897
+ service
2899
2898
  }) => {
2900
2899
  const jsonData = {
2901
2900
  action_id: idAction,
@@ -2905,7 +2904,7 @@ function useActionService() {
2905
2904
  "/load_action" /* LOAD_ACTION */,
2906
2905
  jsonData,
2907
2906
  {
2908
- headers: { "Content-Type": "application/json", x_node: xNode }
2907
+ headers: { "Content-Type": "application/json" }
2909
2908
  },
2910
2909
  service
2911
2910
  );
@@ -2918,8 +2917,7 @@ function useActionService() {
2918
2917
  ids = [],
2919
2918
  context,
2920
2919
  method,
2921
- service,
2922
- xNode
2920
+ service
2923
2921
  }) => {
2924
2922
  try {
2925
2923
  const jsonData = {
@@ -2932,8 +2930,7 @@ function useActionService() {
2932
2930
  "/call" /* CALL_PATH */,
2933
2931
  jsonData,
2934
2932
  {
2935
- headers: { "Content-Type": "application/json" },
2936
- ...xNode ? { x_node: xNode } : {}
2933
+ headers: { "Content-Type": "application/json" }
2937
2934
  },
2938
2935
  service
2939
2936
  );
@@ -2949,8 +2946,7 @@ function useActionService() {
2949
2946
  model,
2950
2947
  ids,
2951
2948
  context,
2952
- service,
2953
- xNode
2949
+ service
2954
2950
  }) => {
2955
2951
  const jsonData = {
2956
2952
  model,
@@ -2962,8 +2958,7 @@ function useActionService() {
2962
2958
  "/call" /* CALL_PATH */,
2963
2959
  jsonData,
2964
2960
  {
2965
- headers: { "Content-Type": "application/json" },
2966
- ...xNode ? { x_node: xNode } : {}
2961
+ headers: { "Content-Type": "application/json" }
2967
2962
  },
2968
2963
  service
2969
2964
  );
@@ -2975,8 +2970,7 @@ function useActionService() {
2975
2970
  model,
2976
2971
  id,
2977
2972
  context,
2978
- service,
2979
- xNode
2973
+ service
2980
2974
  }) => {
2981
2975
  const jsonData = {
2982
2976
  model,
@@ -2988,8 +2982,7 @@ function useActionService() {
2988
2982
  "/call" /* CALL_PATH */,
2989
2983
  jsonData,
2990
2984
  {
2991
- headers: { "Content-Type": "application/json" },
2992
- ...xNode ? { x_node: xNode } : {}
2985
+ headers: { "Content-Type": "application/json" }
2993
2986
  },
2994
2987
  service
2995
2988
  );
@@ -3036,8 +3029,7 @@ function useActionService() {
3036
3029
  async ({
3037
3030
  idAction,
3038
3031
  context,
3039
- service,
3040
- xNode
3032
+ service
3041
3033
  }) => {
3042
3034
  const jsonData = {
3043
3035
  action_id: idAction,
@@ -3047,8 +3039,7 @@ function useActionService() {
3047
3039
  "/run_action" /* RUN_ACTION_PATH */,
3048
3040
  jsonData,
3049
3041
  {
3050
- headers: { "Content-Type": "application/json" },
3051
- ...xNode ? { x_node: xNode } : {}
3042
+ headers: { "Content-Type": "application/json" }
3052
3043
  },
3053
3044
  service
3054
3045
  );
@@ -3382,7 +3373,7 @@ function useExcelService() {
3382
3373
  };
3383
3374
  return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3384
3375
  headers: {
3385
- "Content-Type": "multipart/form-data"
3376
+ "Content-Type": "application/json"
3386
3377
  }
3387
3378
  });
3388
3379
  },
@@ -3771,11 +3762,7 @@ function useModelService() {
3771
3762
  });
3772
3763
  }, [env]);
3773
3764
  const getAll = (0, import_react8.useCallback)(
3774
- async ({
3775
- data,
3776
- service,
3777
- xNode
3778
- }) => {
3765
+ async ({ data, service }) => {
3779
3766
  const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
3780
3767
  fields: data.fields,
3781
3768
  groupby: data.groupby
@@ -3801,8 +3788,7 @@ function useModelService() {
3801
3788
  jsonData,
3802
3789
  {
3803
3790
  headers: {
3804
- "Content-Type": "application/json",
3805
- ...xNode ? { x_node: xNode } : {}
3791
+ "Content-Type": "application/json"
3806
3792
  }
3807
3793
  },
3808
3794
  service
@@ -3879,8 +3865,7 @@ function useModelService() {
3879
3865
  model,
3880
3866
  specification,
3881
3867
  context,
3882
- service,
3883
- xNode
3868
+ service
3884
3869
  }) => {
3885
3870
  const jsonData = {
3886
3871
  model,
@@ -3896,8 +3881,7 @@ function useModelService() {
3896
3881
  jsonData,
3897
3882
  {
3898
3883
  headers: {
3899
- "Content-Type": "application/json",
3900
- ...xNode ? { x_node: xNode } : {}
3884
+ "Content-Type": "application/json"
3901
3885
  }
3902
3886
  },
3903
3887
  service
@@ -3913,8 +3897,7 @@ function useModelService() {
3913
3897
  specification = {},
3914
3898
  context = {},
3915
3899
  path,
3916
- service,
3917
- xNode
3900
+ service
3918
3901
  }) => {
3919
3902
  const jsonData = {
3920
3903
  model,
@@ -3931,8 +3914,7 @@ function useModelService() {
3931
3914
  jsonData,
3932
3915
  {
3933
3916
  headers: {
3934
- "Content-Type": "application/json",
3935
- ...xNode ? { x_node: xNode } : {}
3917
+ "Content-Type": "application/json"
3936
3918
  }
3937
3919
  },
3938
3920
  service
@@ -3968,8 +3950,7 @@ function useModelService() {
3968
3950
  specification,
3969
3951
  context,
3970
3952
  fieldChange,
3971
- service,
3972
- xNode
3953
+ service
3973
3954
  }) => {
3974
3955
  const jsonData = {
3975
3956
  model,
@@ -3987,8 +3968,7 @@ function useModelService() {
3987
3968
  jsonData,
3988
3969
  {
3989
3970
  headers: {
3990
- "Content-Type": "application/json",
3991
- ...xNode ? { x_node: xNode } : {}
3971
+ "Content-Type": "application/json"
3992
3972
  }
3993
3973
  },
3994
3974
  service
@@ -3997,11 +3977,7 @@ function useModelService() {
3997
3977
  [env]
3998
3978
  );
3999
3979
  const getListFieldsOnchange = (0, import_react8.useCallback)(
4000
- async ({
4001
- model,
4002
- service,
4003
- xNode
4004
- }) => {
3980
+ async ({ model, service }) => {
4005
3981
  const jsonData = {
4006
3982
  model,
4007
3983
  method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
@@ -4011,8 +3987,7 @@ function useModelService() {
4011
3987
  jsonData,
4012
3988
  {
4013
3989
  headers: {
4014
- "Content-Type": "application/json",
4015
- ...xNode ? { x_node: xNode } : {}
3990
+ "Content-Type": "application/json"
4016
3991
  }
4017
3992
  },
4018
3993
  service
@@ -4286,11 +4261,7 @@ function useViewService() {
4286
4261
  [env]
4287
4262
  );
4288
4263
  const getSelectionItem = (0, import_react10.useCallback)(
4289
- async ({
4290
- data,
4291
- service,
4292
- xNode
4293
- }) => {
4264
+ async ({ data, service }) => {
4294
4265
  const jsonData = {
4295
4266
  model: data.model,
4296
4267
  ids: [],
@@ -4313,8 +4284,7 @@ function useViewService() {
4313
4284
  jsonData,
4314
4285
  {
4315
4286
  headers: {
4316
- "Content-Type": "application/json",
4317
- ...xNode ? { x_node: xNode } : {}
4287
+ "Content-Type": "application/json"
4318
4288
  }
4319
4289
  },
4320
4290
  service
@@ -4781,7 +4751,7 @@ var axiosClient = {
4781
4751
  formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
4782
4752
  headers
4783
4753
  ).then(responseBody),
4784
- post: async (url, body, headers, serviceName) => instance.post(
4754
+ post: (url, body, headers, serviceName) => instance.post(
4785
4755
  formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
4786
4756
  body,
4787
4757
  headers
@@ -5480,15 +5450,13 @@ var useGetDetail = () => {
5480
5450
  ids,
5481
5451
  specification,
5482
5452
  context,
5483
- service,
5484
- xNode
5453
+ service
5485
5454
  }) => getDetail({
5486
5455
  model,
5487
5456
  ids,
5488
5457
  specification,
5489
5458
  context,
5490
- service,
5491
- xNode
5459
+ service
5492
5460
  })
5493
5461
  });
5494
5462
  };
@@ -5498,16 +5466,14 @@ var use_get_detail_default = useGetDetail;
5498
5466
  var import_react_query38 = require("@tanstack/react-query");
5499
5467
  var useGetFieldOnChange = ({
5500
5468
  model,
5501
- service,
5502
- xNode
5469
+ service
5503
5470
  }) => {
5504
5471
  const { getListFieldsOnchange } = useModelService();
5505
5472
  return (0, import_react_query38.useQuery)({
5506
5473
  queryKey: [`field-onchange-${model}`, model],
5507
5474
  queryFn: () => getListFieldsOnchange({
5508
5475
  model,
5509
- service,
5510
- xNode
5476
+ service
5511
5477
  }).then((res) => {
5512
5478
  if (res) {
5513
5479
  return res;
@@ -5692,8 +5658,7 @@ var useOnChangeForm = () => {
5692
5658
  context,
5693
5659
  object,
5694
5660
  fieldChange,
5695
- service,
5696
- xNode
5661
+ service
5697
5662
  }) => onChange({
5698
5663
  ids,
5699
5664
  model,
@@ -5701,8 +5666,7 @@ var useOnChangeForm = () => {
5701
5666
  context,
5702
5667
  object,
5703
5668
  fieldChange,
5704
- service,
5705
- xNode
5669
+ service
5706
5670
  })
5707
5671
  });
5708
5672
  };
@@ -5720,9 +5684,8 @@ var useSave = () => {
5720
5684
  specification,
5721
5685
  context,
5722
5686
  path,
5723
- service,
5724
- xNode
5725
- }) => save({ ids, model, data, specification, context, path, service, xNode })
5687
+ service
5688
+ }) => save({ ids, model, data, specification, context, path, service })
5726
5689
  });
5727
5690
  };
5728
5691
  var use_save_default = useSave;
@@ -5775,15 +5738,13 @@ var useButton = () => {
5775
5738
  ids,
5776
5739
  context,
5777
5740
  method,
5778
- service,
5779
- xNode
5741
+ service
5780
5742
  }) => callButton({
5781
5743
  model,
5782
5744
  ids,
5783
5745
  context,
5784
5746
  method,
5785
- service,
5786
- xNode
5747
+ service
5787
5748
  }),
5788
5749
  onSuccess: (response) => {
5789
5750
  return response;
@@ -5801,14 +5762,12 @@ var useDuplicateRecord = () => {
5801
5762
  id,
5802
5763
  model,
5803
5764
  context,
5804
- service,
5805
- xNode
5765
+ service
5806
5766
  }) => duplicateRecord({
5807
5767
  id,
5808
5768
  model,
5809
5769
  context,
5810
- service,
5811
- xNode
5770
+ service
5812
5771
  })
5813
5772
  });
5814
5773
  };
@@ -5891,11 +5850,11 @@ var use_get_groups_default = useGetGroups;
5891
5850
 
5892
5851
  // src/hooks/view/use-get-list-data.ts
5893
5852
  var import_react_query50 = require("@tanstack/react-query");
5894
- var useGetListData = (listDataProps, queryKey, enabled, service, xNode) => {
5853
+ var useGetListData = (listDataProps, queryKey, enabled, service) => {
5895
5854
  const { getAll } = useModelService();
5896
5855
  return (0, import_react_query50.useQuery)({
5897
5856
  queryKey,
5898
- queryFn: () => getAll({ data: listDataProps, service, xNode }).then((res) => {
5857
+ queryFn: () => getAll({ data: listDataProps, service }).then((res) => {
5899
5858
  if (res) {
5900
5859
  return res;
5901
5860
  }
@@ -5903,8 +5862,7 @@ var useGetListData = (listDataProps, queryKey, enabled, service, xNode) => {
5903
5862
  }),
5904
5863
  enabled,
5905
5864
  refetchOnWindowFocus: false,
5906
- staleTime: 0,
5907
- placeholderData: import_react_query50.keepPreviousData
5865
+ staleTime: 0
5908
5866
  });
5909
5867
  };
5910
5868
  var use_get_list_data_default = useGetListData;
@@ -5973,13 +5931,12 @@ var useGetSelection = ({
5973
5931
  data,
5974
5932
  queryKey,
5975
5933
  enabled,
5976
- service,
5977
- xNode
5934
+ service
5978
5935
  }) => {
5979
5936
  const { getSelectionItem } = useViewService();
5980
5937
  return (0, import_react_query54.useQuery)({
5981
5938
  queryKey,
5982
- queryFn: () => getSelectionItem({ data, service, xNode }),
5939
+ queryFn: () => getSelectionItem({ data, service }),
5983
5940
  enabled,
5984
5941
  refetchOnWindowFocus: false
5985
5942
  });
@@ -6008,14 +5965,12 @@ var useLoadAction = () => {
6008
5965
  mutationFn: ({
6009
5966
  idAction,
6010
5967
  context,
6011
- service,
6012
- xNode
5968
+ service
6013
5969
  }) => {
6014
5970
  return loadAction({
6015
5971
  idAction,
6016
5972
  context,
6017
- service,
6018
- xNode
5973
+ service
6019
5974
  });
6020
5975
  }
6021
5976
  });
@@ -6057,14 +6012,12 @@ var useRemoveRow = () => {
6057
6012
  model,
6058
6013
  ids,
6059
6014
  context,
6060
- service,
6061
- xNode
6015
+ service
6062
6016
  }) => removeRows({
6063
6017
  model,
6064
6018
  ids,
6065
6019
  context,
6066
- service,
6067
- xNode
6020
+ service
6068
6021
  })
6069
6022
  });
6070
6023
  };
@@ -6096,13 +6049,11 @@ var useRunAction = () => {
6096
6049
  mutationFn: ({
6097
6050
  idAction,
6098
6051
  context,
6099
- service,
6100
- xNode
6052
+ service
6101
6053
  }) => runAction({
6102
6054
  idAction,
6103
6055
  context,
6104
- service,
6105
- xNode
6056
+ service
6106
6057
  })
6107
6058
  });
6108
6059
  };