@fctc/interface-logic 2.3.8 → 2.3.9

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