@fctc/interface-logic 2.4.1 → 2.4.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
@@ -2842,8 +2842,7 @@ function useActionService() {
2842
2842
  async ({
2843
2843
  idAction,
2844
2844
  context,
2845
- service,
2846
- xNode
2845
+ service
2847
2846
  }) => {
2848
2847
  const jsonData = {
2849
2848
  action_id: idAction,
@@ -2853,7 +2852,7 @@ function useActionService() {
2853
2852
  "/load_action" /* LOAD_ACTION */,
2854
2853
  jsonData,
2855
2854
  {
2856
- headers: { "Content-Type": "application/json", x_node: xNode }
2855
+ headers: { "Content-Type": "application/json" }
2857
2856
  },
2858
2857
  service
2859
2858
  );
@@ -2866,8 +2865,7 @@ function useActionService() {
2866
2865
  ids = [],
2867
2866
  context,
2868
2867
  method,
2869
- service,
2870
- xNode
2868
+ service
2871
2869
  }) => {
2872
2870
  try {
2873
2871
  const jsonData = {
@@ -2880,8 +2878,7 @@ function useActionService() {
2880
2878
  "/call" /* CALL_PATH */,
2881
2879
  jsonData,
2882
2880
  {
2883
- headers: { "Content-Type": "application/json" },
2884
- ...xNode ? { x_node: xNode } : {}
2881
+ headers: { "Content-Type": "application/json" }
2885
2882
  },
2886
2883
  service
2887
2884
  );
@@ -2897,8 +2894,7 @@ function useActionService() {
2897
2894
  model,
2898
2895
  ids,
2899
2896
  context,
2900
- service,
2901
- xNode
2897
+ service
2902
2898
  }) => {
2903
2899
  const jsonData = {
2904
2900
  model,
@@ -2910,8 +2906,7 @@ function useActionService() {
2910
2906
  "/call" /* CALL_PATH */,
2911
2907
  jsonData,
2912
2908
  {
2913
- headers: { "Content-Type": "application/json" },
2914
- ...xNode ? { x_node: xNode } : {}
2909
+ headers: { "Content-Type": "application/json" }
2915
2910
  },
2916
2911
  service
2917
2912
  );
@@ -2923,8 +2918,7 @@ function useActionService() {
2923
2918
  model,
2924
2919
  id,
2925
2920
  context,
2926
- service,
2927
- xNode
2921
+ service
2928
2922
  }) => {
2929
2923
  const jsonData = {
2930
2924
  model,
@@ -2936,8 +2930,7 @@ function useActionService() {
2936
2930
  "/call" /* CALL_PATH */,
2937
2931
  jsonData,
2938
2932
  {
2939
- headers: { "Content-Type": "application/json" },
2940
- ...xNode ? { x_node: xNode } : {}
2933
+ headers: { "Content-Type": "application/json" }
2941
2934
  },
2942
2935
  service
2943
2936
  );
@@ -2984,8 +2977,7 @@ function useActionService() {
2984
2977
  async ({
2985
2978
  idAction,
2986
2979
  context,
2987
- service,
2988
- xNode
2980
+ service
2989
2981
  }) => {
2990
2982
  const jsonData = {
2991
2983
  action_id: idAction,
@@ -2995,8 +2987,7 @@ function useActionService() {
2995
2987
  "/run_action" /* RUN_ACTION_PATH */,
2996
2988
  jsonData,
2997
2989
  {
2998
- headers: { "Content-Type": "application/json" },
2999
- ...xNode ? { x_node: xNode } : {}
2990
+ headers: { "Content-Type": "application/json" }
3000
2991
  },
3001
2992
  service
3002
2993
  );
@@ -3330,7 +3321,7 @@ function useExcelService() {
3330
3321
  };
3331
3322
  return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3332
3323
  headers: {
3333
- "Content-Type": "multipart/form-data"
3324
+ "Content-Type": "application/json"
3334
3325
  }
3335
3326
  });
3336
3327
  },
@@ -3359,7 +3350,7 @@ function useExcelService() {
3359
3350
  };
3360
3351
  return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3361
3352
  headers: {
3362
- "Content-Type": "multipart/form-data"
3353
+ "Content-Type": "application/json"
3363
3354
  }
3364
3355
  });
3365
3356
  },
@@ -3719,11 +3710,7 @@ function useModelService() {
3719
3710
  });
3720
3711
  }, [env]);
3721
3712
  const getAll = useCallback8(
3722
- async ({
3723
- data,
3724
- service,
3725
- xNode
3726
- }) => {
3713
+ async ({ data, service }) => {
3727
3714
  const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
3728
3715
  fields: data.fields,
3729
3716
  groupby: data.groupby
@@ -3749,8 +3736,7 @@ function useModelService() {
3749
3736
  jsonData,
3750
3737
  {
3751
3738
  headers: {
3752
- "Content-Type": "application/json",
3753
- ...xNode ? { x_node: xNode } : {}
3739
+ "Content-Type": "application/json"
3754
3740
  }
3755
3741
  },
3756
3742
  service
@@ -3827,8 +3813,7 @@ function useModelService() {
3827
3813
  model,
3828
3814
  specification,
3829
3815
  context,
3830
- service,
3831
- xNode
3816
+ service
3832
3817
  }) => {
3833
3818
  const jsonData = {
3834
3819
  model,
@@ -3844,8 +3829,7 @@ function useModelService() {
3844
3829
  jsonData,
3845
3830
  {
3846
3831
  headers: {
3847
- "Content-Type": "application/json",
3848
- ...xNode ? { x_node: xNode } : {}
3832
+ "Content-Type": "application/json"
3849
3833
  }
3850
3834
  },
3851
3835
  service
@@ -3861,8 +3845,7 @@ function useModelService() {
3861
3845
  specification = {},
3862
3846
  context = {},
3863
3847
  path,
3864
- service,
3865
- xNode
3848
+ service
3866
3849
  }) => {
3867
3850
  const jsonData = {
3868
3851
  model,
@@ -3879,8 +3862,7 @@ function useModelService() {
3879
3862
  jsonData,
3880
3863
  {
3881
3864
  headers: {
3882
- "Content-Type": "application/json",
3883
- ...xNode ? { x_node: xNode } : {}
3865
+ "Content-Type": "application/json"
3884
3866
  }
3885
3867
  },
3886
3868
  service
@@ -3916,8 +3898,7 @@ function useModelService() {
3916
3898
  specification,
3917
3899
  context,
3918
3900
  fieldChange,
3919
- service,
3920
- xNode
3901
+ service
3921
3902
  }) => {
3922
3903
  const jsonData = {
3923
3904
  model,
@@ -3935,8 +3916,7 @@ function useModelService() {
3935
3916
  jsonData,
3936
3917
  {
3937
3918
  headers: {
3938
- "Content-Type": "application/json",
3939
- ...xNode ? { x_node: xNode } : {}
3919
+ "Content-Type": "application/json"
3940
3920
  }
3941
3921
  },
3942
3922
  service
@@ -3945,11 +3925,7 @@ function useModelService() {
3945
3925
  [env]
3946
3926
  );
3947
3927
  const getListFieldsOnchange = useCallback8(
3948
- async ({
3949
- model,
3950
- service,
3951
- xNode
3952
- }) => {
3928
+ async ({ model, service }) => {
3953
3929
  const jsonData = {
3954
3930
  model,
3955
3931
  method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
@@ -3959,8 +3935,7 @@ function useModelService() {
3959
3935
  jsonData,
3960
3936
  {
3961
3937
  headers: {
3962
- "Content-Type": "application/json",
3963
- ...xNode ? { x_node: xNode } : {}
3938
+ "Content-Type": "application/json"
3964
3939
  }
3965
3940
  },
3966
3941
  service
@@ -4125,8 +4100,7 @@ function useViewService() {
4125
4100
  context = {},
4126
4101
  options = {},
4127
4102
  aid,
4128
- service,
4129
- xNode
4103
+ service
4130
4104
  }) => {
4131
4105
  const defaultOptions = {
4132
4106
  load_filters: true,
@@ -4147,8 +4121,7 @@ function useViewService() {
4147
4121
  jsonDataView,
4148
4122
  {
4149
4123
  headers: {
4150
- "Content-Type": "application/json",
4151
- ...xNode ? { x_node: xNode } : {}
4124
+ "Content-Type": "application/json"
4152
4125
  }
4153
4126
  },
4154
4127
  service
@@ -4236,11 +4209,7 @@ function useViewService() {
4236
4209
  [env]
4237
4210
  );
4238
4211
  const getSelectionItem = useCallback10(
4239
- async ({
4240
- data,
4241
- service,
4242
- xNode
4243
- }) => {
4212
+ async ({ data, service }) => {
4244
4213
  const jsonData = {
4245
4214
  model: data.model,
4246
4215
  ids: [],
@@ -4263,8 +4232,7 @@ function useViewService() {
4263
4232
  jsonData,
4264
4233
  {
4265
4234
  headers: {
4266
- "Content-Type": "application/json",
4267
- ...xNode ? { x_node: xNode } : {}
4235
+ "Content-Type": "application/json"
4268
4236
  }
4269
4237
  },
4270
4238
  service
@@ -5012,15 +4980,13 @@ var useGetDetail = () => {
5012
4980
  ids,
5013
4981
  specification,
5014
4982
  context,
5015
- service,
5016
- xNode
4983
+ service
5017
4984
  }) => getDetail({
5018
4985
  model,
5019
4986
  ids,
5020
4987
  specification,
5021
4988
  context,
5022
- service,
5023
- xNode
4989
+ service
5024
4990
  })
5025
4991
  });
5026
4992
  };
@@ -5030,16 +4996,14 @@ var use_get_detail_default = useGetDetail;
5030
4996
  import { useQuery as useQuery9 } from "@tanstack/react-query";
5031
4997
  var useGetFieldOnChange = ({
5032
4998
  model,
5033
- service,
5034
- xNode
4999
+ service
5035
5000
  }) => {
5036
5001
  const { getListFieldsOnchange } = useModelService();
5037
5002
  return useQuery9({
5038
5003
  queryKey: [`field-onchange-${model}`, model],
5039
5004
  queryFn: () => getListFieldsOnchange({
5040
5005
  model,
5041
- service,
5042
- xNode
5006
+ service
5043
5007
  }).then((res) => {
5044
5008
  if (res) {
5045
5009
  return res;
@@ -5224,8 +5188,7 @@ var useOnChangeForm = () => {
5224
5188
  context,
5225
5189
  object,
5226
5190
  fieldChange,
5227
- service,
5228
- xNode
5191
+ service
5229
5192
  }) => onChange({
5230
5193
  ids,
5231
5194
  model,
@@ -5233,8 +5196,7 @@ var useOnChangeForm = () => {
5233
5196
  context,
5234
5197
  object,
5235
5198
  fieldChange,
5236
- service,
5237
- xNode
5199
+ service
5238
5200
  })
5239
5201
  });
5240
5202
  };
@@ -5252,9 +5214,8 @@ var useSave = () => {
5252
5214
  specification,
5253
5215
  context,
5254
5216
  path,
5255
- service,
5256
- xNode
5257
- }) => save({ ids, model, data, specification, context, path, service, xNode })
5217
+ service
5218
+ }) => save({ ids, model, data, specification, context, path, service })
5258
5219
  });
5259
5220
  };
5260
5221
  var use_save_default = useSave;
@@ -5307,15 +5268,13 @@ var useButton = () => {
5307
5268
  ids,
5308
5269
  context,
5309
5270
  method,
5310
- service,
5311
- xNode
5271
+ service
5312
5272
  }) => callButton({
5313
5273
  model,
5314
5274
  ids,
5315
5275
  context,
5316
5276
  method,
5317
- service,
5318
- xNode
5277
+ service
5319
5278
  }),
5320
5279
  onSuccess: (response) => {
5321
5280
  return response;
@@ -5333,14 +5292,12 @@ var useDuplicateRecord = () => {
5333
5292
  id,
5334
5293
  model,
5335
5294
  context,
5336
- service,
5337
- xNode
5295
+ service
5338
5296
  }) => duplicateRecord({
5339
5297
  id,
5340
5298
  model,
5341
5299
  context,
5342
- service,
5343
- xNode
5300
+ service
5344
5301
  })
5345
5302
  });
5346
5303
  };
@@ -5422,12 +5379,12 @@ var useGetGroups = ({
5422
5379
  var use_get_groups_default = useGetGroups;
5423
5380
 
5424
5381
  // src/hooks/view/use-get-list-data.ts
5425
- import { keepPreviousData, useQuery as useQuery14 } from "@tanstack/react-query";
5426
- var useGetListData = (listDataProps, queryKey, enabled, service, xNode) => {
5382
+ import { useQuery as useQuery14 } from "@tanstack/react-query";
5383
+ var useGetListData = (listDataProps, queryKey, enabled, service) => {
5427
5384
  const { getAll } = useModelService();
5428
5385
  return useQuery14({
5429
5386
  queryKey,
5430
- queryFn: () => getAll({ data: listDataProps, service, xNode }).then((res) => {
5387
+ queryFn: () => getAll({ data: listDataProps, service }).then((res) => {
5431
5388
  if (res) {
5432
5389
  return res;
5433
5390
  }
@@ -5435,8 +5392,7 @@ var useGetListData = (listDataProps, queryKey, enabled, service, xNode) => {
5435
5392
  }),
5436
5393
  enabled,
5437
5394
  refetchOnWindowFocus: false,
5438
- staleTime: 0,
5439
- placeholderData: keepPreviousData
5395
+ staleTime: 0
5440
5396
  });
5441
5397
  };
5442
5398
  var use_get_list_data_default = useGetListData;
@@ -5505,13 +5461,12 @@ var useGetSelection = ({
5505
5461
  data,
5506
5462
  queryKey,
5507
5463
  enabled,
5508
- service,
5509
- xNode
5464
+ service
5510
5465
  }) => {
5511
5466
  const { getSelectionItem } = useViewService();
5512
5467
  return useQuery17({
5513
5468
  queryKey,
5514
- queryFn: () => getSelectionItem({ data, service, xNode }),
5469
+ queryFn: () => getSelectionItem({ data, service }),
5515
5470
  enabled,
5516
5471
  refetchOnWindowFocus: false
5517
5472
  });
@@ -5540,14 +5495,12 @@ var useLoadAction = () => {
5540
5495
  mutationFn: ({
5541
5496
  idAction,
5542
5497
  context,
5543
- service,
5544
- xNode
5498
+ service
5545
5499
  }) => {
5546
5500
  return loadAction({
5547
5501
  idAction,
5548
5502
  context,
5549
- service,
5550
- xNode
5503
+ service
5551
5504
  });
5552
5505
  }
5553
5506
  });
@@ -5589,14 +5542,12 @@ var useRemoveRow = () => {
5589
5542
  model,
5590
5543
  ids,
5591
5544
  context,
5592
- service,
5593
- xNode
5545
+ service
5594
5546
  }) => removeRows({
5595
5547
  model,
5596
5548
  ids,
5597
5549
  context,
5598
- service,
5599
- xNode
5550
+ service
5600
5551
  })
5601
5552
  });
5602
5553
  };
@@ -5628,13 +5579,11 @@ var useRunAction = () => {
5628
5579
  mutationFn: ({
5629
5580
  idAction,
5630
5581
  context,
5631
- service,
5632
- xNode
5582
+ service
5633
5583
  }) => runAction({
5634
5584
  idAction,
5635
5585
  context,
5636
- service,
5637
- xNode
5586
+ service
5638
5587
  })
5639
5588
  });
5640
5589
  };
@@ -1,21 +1,20 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import { ReactNode } from 'react';
3
2
  import { L as LocalStorageUtilsType, S as SessionStorageUtilsType } from './session-storage-ARp_lhTD.mjs';
4
3
  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
4
  import '@tanstack/react-query';
6
- import './view-type-xxw9OeSR.mjs';
5
+ import './view-type-p4JdAOsz.mjs';
7
6
 
8
7
  declare const MainProvider: ({ children }: {
9
8
  children: ReactNode;
10
- }) => react_jsx_runtime.JSX.Element;
9
+ }) => JSX.Element;
11
10
 
12
11
  declare const ReactQueryProvider: ({ children }: {
13
12
  children: ReactNode;
14
- }) => react_jsx_runtime.JSX.Element;
13
+ }) => JSX.Element;
15
14
 
16
15
  declare const VersionGate: ({ children }: {
17
16
  children: ReactNode;
18
- }) => react_jsx_runtime.JSX.Element | null;
17
+ }) => JSX.Element | null;
19
18
 
20
19
  interface EnvConfig {
21
20
  env?: any;
@@ -47,7 +46,7 @@ declare function EnvProvider({ children, localStorageUtils: localStorageUtil, se
47
46
  children: React.ReactNode;
48
47
  localStorageUtils?: LocalStorageUtilsType;
49
48
  sessionStorageUtils?: SessionStorageUtilsType;
50
- }): react_jsx_runtime.JSX.Element;
49
+ }): JSX.Element;
51
50
  declare function useEnv(): {
52
51
  env: EnvConfig;
53
52
  setupEnv: (envConfig: Partial<EnvConfig>) => EnvConfig;
@@ -134,12 +133,12 @@ interface ServiceContextType {
134
133
  }
135
134
  declare const ServiceProvider: ({ children, }: {
136
135
  children: React.ReactNode;
137
- }) => react_jsx_runtime.JSX.Element;
136
+ }) => JSX.Element;
138
137
  declare const useService: () => ServiceContextType;
139
138
 
140
139
  type MetaProviderProps = {
141
140
  children: ReactNode;
142
141
  };
143
- declare const MetaProvider: ({ children }: MetaProviderProps) => react_jsx_runtime.JSX.Element;
142
+ declare const MetaProvider: ({ children }: MetaProviderProps) => JSX.Element;
144
143
 
145
144
  export { EnvProvider, MainProvider, MetaProvider, ReactQueryProvider, ServiceProvider, VersionGate, useEnv, useService };
@@ -1,21 +1,20 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import { ReactNode } from 'react';
3
2
  import { L as LocalStorageUtilsType, S as SessionStorageUtilsType } from './session-storage-ARp_lhTD.js';
4
3
  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
4
  import '@tanstack/react-query';
6
- import './view-type-xxw9OeSR.js';
5
+ import './view-type-p4JdAOsz.js';
7
6
 
8
7
  declare const MainProvider: ({ children }: {
9
8
  children: ReactNode;
10
- }) => react_jsx_runtime.JSX.Element;
9
+ }) => JSX.Element;
11
10
 
12
11
  declare const ReactQueryProvider: ({ children }: {
13
12
  children: ReactNode;
14
- }) => react_jsx_runtime.JSX.Element;
13
+ }) => JSX.Element;
15
14
 
16
15
  declare const VersionGate: ({ children }: {
17
16
  children: ReactNode;
18
- }) => react_jsx_runtime.JSX.Element | null;
17
+ }) => JSX.Element | null;
19
18
 
20
19
  interface EnvConfig {
21
20
  env?: any;
@@ -47,7 +46,7 @@ declare function EnvProvider({ children, localStorageUtils: localStorageUtil, se
47
46
  children: React.ReactNode;
48
47
  localStorageUtils?: LocalStorageUtilsType;
49
48
  sessionStorageUtils?: SessionStorageUtilsType;
50
- }): react_jsx_runtime.JSX.Element;
49
+ }): JSX.Element;
51
50
  declare function useEnv(): {
52
51
  env: EnvConfig;
53
52
  setupEnv: (envConfig: Partial<EnvConfig>) => EnvConfig;
@@ -134,12 +133,12 @@ interface ServiceContextType {
134
133
  }
135
134
  declare const ServiceProvider: ({ children, }: {
136
135
  children: React.ReactNode;
137
- }) => react_jsx_runtime.JSX.Element;
136
+ }) => JSX.Element;
138
137
  declare const useService: () => ServiceContextType;
139
138
 
140
139
  type MetaProviderProps = {
141
140
  children: ReactNode;
142
141
  };
143
- declare const MetaProvider: ({ children }: MetaProviderProps) => react_jsx_runtime.JSX.Element;
142
+ declare const MetaProvider: ({ children }: MetaProviderProps) => JSX.Element;
144
143
 
145
144
  export { EnvProvider, MainProvider, MetaProvider, ReactQueryProvider, ServiceProvider, VersionGate, useEnv, useService };