@fctc/interface-logic 2.3.5 → 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/hooks.mjs CHANGED
@@ -2842,7 +2842,8 @@ function useActionService() {
2842
2842
  async ({
2843
2843
  idAction,
2844
2844
  context,
2845
- service
2845
+ service,
2846
+ xNode
2846
2847
  }) => {
2847
2848
  const jsonData = {
2848
2849
  action_id: idAction,
@@ -2852,7 +2853,7 @@ function useActionService() {
2852
2853
  "/load_action" /* LOAD_ACTION */,
2853
2854
  jsonData,
2854
2855
  {
2855
- headers: { "Content-Type": "application/json" }
2856
+ headers: { "Content-Type": "application/json", x_node: xNode }
2856
2857
  },
2857
2858
  service
2858
2859
  );
@@ -2865,7 +2866,8 @@ function useActionService() {
2865
2866
  ids = [],
2866
2867
  context,
2867
2868
  method,
2868
- service
2869
+ service,
2870
+ xNode
2869
2871
  }) => {
2870
2872
  try {
2871
2873
  const jsonData = {
@@ -2878,7 +2880,8 @@ function useActionService() {
2878
2880
  "/call" /* CALL_PATH */,
2879
2881
  jsonData,
2880
2882
  {
2881
- headers: { "Content-Type": "application/json" }
2883
+ headers: { "Content-Type": "application/json" },
2884
+ ...xNode ? { x_node: xNode } : {}
2882
2885
  },
2883
2886
  service
2884
2887
  );
@@ -2894,7 +2897,8 @@ function useActionService() {
2894
2897
  model,
2895
2898
  ids,
2896
2899
  context,
2897
- service
2900
+ service,
2901
+ xNode
2898
2902
  }) => {
2899
2903
  const jsonData = {
2900
2904
  model,
@@ -2906,7 +2910,8 @@ function useActionService() {
2906
2910
  "/call" /* CALL_PATH */,
2907
2911
  jsonData,
2908
2912
  {
2909
- headers: { "Content-Type": "application/json" }
2913
+ headers: { "Content-Type": "application/json" },
2914
+ ...xNode ? { x_node: xNode } : {}
2910
2915
  },
2911
2916
  service
2912
2917
  );
@@ -2918,7 +2923,8 @@ function useActionService() {
2918
2923
  model,
2919
2924
  id,
2920
2925
  context,
2921
- service
2926
+ service,
2927
+ xNode
2922
2928
  }) => {
2923
2929
  const jsonData = {
2924
2930
  model,
@@ -2930,7 +2936,8 @@ function useActionService() {
2930
2936
  "/call" /* CALL_PATH */,
2931
2937
  jsonData,
2932
2938
  {
2933
- headers: { "Content-Type": "application/json" }
2939
+ headers: { "Content-Type": "application/json" },
2940
+ ...xNode ? { x_node: xNode } : {}
2934
2941
  },
2935
2942
  service
2936
2943
  );
@@ -2977,7 +2984,8 @@ function useActionService() {
2977
2984
  async ({
2978
2985
  idAction,
2979
2986
  context,
2980
- service
2987
+ service,
2988
+ xNode
2981
2989
  }) => {
2982
2990
  const jsonData = {
2983
2991
  action_id: idAction,
@@ -2987,7 +2995,8 @@ function useActionService() {
2987
2995
  "/run_action" /* RUN_ACTION_PATH */,
2988
2996
  jsonData,
2989
2997
  {
2990
- headers: { "Content-Type": "application/json" }
2998
+ headers: { "Content-Type": "application/json" },
2999
+ ...xNode ? { x_node: xNode } : {}
2991
3000
  },
2992
3001
  service
2993
3002
  );
@@ -3710,7 +3719,11 @@ function useModelService() {
3710
3719
  });
3711
3720
  }, [env]);
3712
3721
  const getAll = useCallback8(
3713
- async ({ data, service }) => {
3722
+ async ({
3723
+ data,
3724
+ service,
3725
+ xNode
3726
+ }) => {
3714
3727
  const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
3715
3728
  fields: data.fields,
3716
3729
  groupby: data.groupby
@@ -3736,7 +3749,8 @@ function useModelService() {
3736
3749
  jsonData,
3737
3750
  {
3738
3751
  headers: {
3739
- "Content-Type": "application/json"
3752
+ "Content-Type": "application/json",
3753
+ ...xNode ? { x_node: xNode } : {}
3740
3754
  }
3741
3755
  },
3742
3756
  service
@@ -3813,7 +3827,8 @@ function useModelService() {
3813
3827
  model,
3814
3828
  specification,
3815
3829
  context,
3816
- service
3830
+ service,
3831
+ xNode
3817
3832
  }) => {
3818
3833
  const jsonData = {
3819
3834
  model,
@@ -3829,7 +3844,8 @@ function useModelService() {
3829
3844
  jsonData,
3830
3845
  {
3831
3846
  headers: {
3832
- "Content-Type": "application/json"
3847
+ "Content-Type": "application/json",
3848
+ ...xNode ? { x_node: xNode } : {}
3833
3849
  }
3834
3850
  },
3835
3851
  service
@@ -3845,7 +3861,8 @@ function useModelService() {
3845
3861
  specification = {},
3846
3862
  context = {},
3847
3863
  path,
3848
- service
3864
+ service,
3865
+ xNode
3849
3866
  }) => {
3850
3867
  const jsonData = {
3851
3868
  model,
@@ -3862,7 +3879,8 @@ function useModelService() {
3862
3879
  jsonData,
3863
3880
  {
3864
3881
  headers: {
3865
- "Content-Type": "application/json"
3882
+ "Content-Type": "application/json",
3883
+ ...xNode ? { x_node: xNode } : {}
3866
3884
  }
3867
3885
  },
3868
3886
  service
@@ -3898,7 +3916,8 @@ function useModelService() {
3898
3916
  specification,
3899
3917
  context,
3900
3918
  fieldChange,
3901
- service
3919
+ service,
3920
+ xNode
3902
3921
  }) => {
3903
3922
  const jsonData = {
3904
3923
  model,
@@ -3916,7 +3935,8 @@ function useModelService() {
3916
3935
  jsonData,
3917
3936
  {
3918
3937
  headers: {
3919
- "Content-Type": "application/json"
3938
+ "Content-Type": "application/json",
3939
+ ...xNode ? { x_node: xNode } : {}
3920
3940
  }
3921
3941
  },
3922
3942
  service
@@ -3925,7 +3945,11 @@ function useModelService() {
3925
3945
  [env]
3926
3946
  );
3927
3947
  const getListFieldsOnchange = useCallback8(
3928
- async ({ model, service }) => {
3948
+ async ({
3949
+ model,
3950
+ service,
3951
+ xNode
3952
+ }) => {
3929
3953
  const jsonData = {
3930
3954
  model,
3931
3955
  method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
@@ -3935,7 +3959,8 @@ function useModelService() {
3935
3959
  jsonData,
3936
3960
  {
3937
3961
  headers: {
3938
- "Content-Type": "application/json"
3962
+ "Content-Type": "application/json",
3963
+ ...xNode ? { x_node: xNode } : {}
3939
3964
  }
3940
3965
  },
3941
3966
  service
@@ -4209,7 +4234,11 @@ function useViewService() {
4209
4234
  [env]
4210
4235
  );
4211
4236
  const getSelectionItem = useCallback10(
4212
- async ({ data, service }) => {
4237
+ async ({
4238
+ data,
4239
+ service,
4240
+ xNode
4241
+ }) => {
4213
4242
  const jsonData = {
4214
4243
  model: data.model,
4215
4244
  ids: [],
@@ -4232,7 +4261,8 @@ function useViewService() {
4232
4261
  jsonData,
4233
4262
  {
4234
4263
  headers: {
4235
- "Content-Type": "application/json"
4264
+ "Content-Type": "application/json",
4265
+ ...xNode ? { x_node: xNode } : {}
4236
4266
  }
4237
4267
  },
4238
4268
  service
@@ -4980,13 +5010,15 @@ var useGetDetail = () => {
4980
5010
  ids,
4981
5011
  specification,
4982
5012
  context,
4983
- service
5013
+ service,
5014
+ xNode
4984
5015
  }) => getDetail({
4985
5016
  model,
4986
5017
  ids,
4987
5018
  specification,
4988
5019
  context,
4989
- service
5020
+ service,
5021
+ xNode
4990
5022
  })
4991
5023
  });
4992
5024
  };
@@ -4996,14 +5028,16 @@ var use_get_detail_default = useGetDetail;
4996
5028
  import { useQuery as useQuery9 } from "@tanstack/react-query";
4997
5029
  var useGetFieldOnChange = ({
4998
5030
  model,
4999
- service
5031
+ service,
5032
+ xNode
5000
5033
  }) => {
5001
5034
  const { getListFieldsOnchange } = useModelService();
5002
5035
  return useQuery9({
5003
5036
  queryKey: [`field-onchange-${model}`, model],
5004
5037
  queryFn: () => getListFieldsOnchange({
5005
5038
  model,
5006
- service
5039
+ service,
5040
+ xNode
5007
5041
  }).then((res) => {
5008
5042
  if (res) {
5009
5043
  return res;
@@ -5188,7 +5222,8 @@ var useOnChangeForm = () => {
5188
5222
  context,
5189
5223
  object,
5190
5224
  fieldChange,
5191
- service
5225
+ service,
5226
+ xNode
5192
5227
  }) => onChange({
5193
5228
  ids,
5194
5229
  model,
@@ -5196,7 +5231,8 @@ var useOnChangeForm = () => {
5196
5231
  context,
5197
5232
  object,
5198
5233
  fieldChange,
5199
- service
5234
+ service,
5235
+ xNode
5200
5236
  })
5201
5237
  });
5202
5238
  };
@@ -5214,8 +5250,9 @@ var useSave = () => {
5214
5250
  specification,
5215
5251
  context,
5216
5252
  path,
5217
- service
5218
- }) => save({ ids, model, data, specification, context, path, service })
5253
+ service,
5254
+ xNode
5255
+ }) => save({ ids, model, data, specification, context, path, service, xNode })
5219
5256
  });
5220
5257
  };
5221
5258
  var use_save_default = useSave;
@@ -5268,13 +5305,15 @@ var useButton = () => {
5268
5305
  ids,
5269
5306
  context,
5270
5307
  method,
5271
- service
5308
+ service,
5309
+ xNode
5272
5310
  }) => callButton({
5273
5311
  model,
5274
5312
  ids,
5275
5313
  context,
5276
5314
  method,
5277
- service
5315
+ service,
5316
+ xNode
5278
5317
  }),
5279
5318
  onSuccess: (response) => {
5280
5319
  return response;
@@ -5292,12 +5331,14 @@ var useDuplicateRecord = () => {
5292
5331
  id,
5293
5332
  model,
5294
5333
  context,
5295
- service
5334
+ service,
5335
+ xNode
5296
5336
  }) => duplicateRecord({
5297
5337
  id,
5298
5338
  model,
5299
5339
  context,
5300
- service
5340
+ service,
5341
+ xNode
5301
5342
  })
5302
5343
  });
5303
5344
  };
@@ -5380,11 +5421,11 @@ var use_get_groups_default = useGetGroups;
5380
5421
 
5381
5422
  // src/hooks/view/use-get-list-data.ts
5382
5423
  import { useQuery as useQuery14 } from "@tanstack/react-query";
5383
- var useGetListData = (listDataProps, queryKey, enabled, service) => {
5424
+ var useGetListData = (listDataProps, queryKey, enabled, service, xNode) => {
5384
5425
  const { getAll } = useModelService();
5385
5426
  return useQuery14({
5386
5427
  queryKey,
5387
- queryFn: () => getAll({ data: listDataProps, service }).then((res) => {
5428
+ queryFn: () => getAll({ data: listDataProps, service, xNode }).then((res) => {
5388
5429
  if (res) {
5389
5430
  return res;
5390
5431
  }
@@ -5461,12 +5502,13 @@ var useGetSelection = ({
5461
5502
  data,
5462
5503
  queryKey,
5463
5504
  enabled,
5464
- service
5505
+ service,
5506
+ xNode
5465
5507
  }) => {
5466
5508
  const { getSelectionItem } = useViewService();
5467
5509
  return useQuery17({
5468
5510
  queryKey,
5469
- queryFn: () => getSelectionItem({ data, service }),
5511
+ queryFn: () => getSelectionItem({ data, service, xNode }),
5470
5512
  enabled,
5471
5513
  refetchOnWindowFocus: false
5472
5514
  });
@@ -5495,12 +5537,14 @@ var useLoadAction = () => {
5495
5537
  mutationFn: ({
5496
5538
  idAction,
5497
5539
  context,
5498
- service
5540
+ service,
5541
+ xNode
5499
5542
  }) => {
5500
5543
  return loadAction({
5501
5544
  idAction,
5502
5545
  context,
5503
- service
5546
+ service,
5547
+ xNode
5504
5548
  });
5505
5549
  }
5506
5550
  });
@@ -5542,12 +5586,14 @@ var useRemoveRow = () => {
5542
5586
  model,
5543
5587
  ids,
5544
5588
  context,
5545
- service
5589
+ service,
5590
+ xNode
5546
5591
  }) => removeRows({
5547
5592
  model,
5548
5593
  ids,
5549
5594
  context,
5550
- service
5595
+ service,
5596
+ xNode
5551
5597
  })
5552
5598
  });
5553
5599
  };
@@ -5579,11 +5625,13 @@ var useRunAction = () => {
5579
5625
  mutationFn: ({
5580
5626
  idAction,
5581
5627
  context,
5582
- service
5628
+ service,
5629
+ xNode
5583
5630
  }) => runAction({
5584
5631
  idAction,
5585
5632
  context,
5586
- service
5633
+ service,
5634
+ xNode
5587
5635
  })
5588
5636
  });
5589
5637
  };
@@ -3,7 +3,7 @@ import { ReactNode } from 'react';
3
3
  import { L as LocalStorageUtilsType, S as SessionStorageUtilsType } from './session-storage-ARp_lhTD.mjs';
4
4
  import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFileExcel, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp, useUploadFile } from './hooks.mjs';
5
5
  import '@tanstack/react-query';
6
- import './view-type-p4JdAOsz.mjs';
6
+ import './view-type-DioSS9fJ.mjs';
7
7
 
8
8
  declare const MainProvider: ({ children }: {
9
9
  children: ReactNode;
@@ -3,7 +3,7 @@ import { ReactNode } from 'react';
3
3
  import { L as LocalStorageUtilsType, S as SessionStorageUtilsType } from './session-storage-ARp_lhTD.js';
4
4
  import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFileExcel, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp, useUploadFile } from './hooks.js';
5
5
  import '@tanstack/react-query';
6
- import './view-type-p4JdAOsz.js';
6
+ import './view-type-DioSS9fJ.js';
7
7
 
8
8
  declare const MainProvider: ({ children }: {
9
9
  children: ReactNode;