@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/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
  },
@@ -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
@@ -4234,11 +4209,7 @@ function useViewService() {
4234
4209
  [env]
4235
4210
  );
4236
4211
  const getSelectionItem = useCallback10(
4237
- async ({
4238
- data,
4239
- service,
4240
- xNode
4241
- }) => {
4212
+ async ({ data, service }) => {
4242
4213
  const jsonData = {
4243
4214
  model: data.model,
4244
4215
  ids: [],
@@ -4261,8 +4232,7 @@ function useViewService() {
4261
4232
  jsonData,
4262
4233
  {
4263
4234
  headers: {
4264
- "Content-Type": "application/json",
4265
- ...xNode ? { x_node: xNode } : {}
4235
+ "Content-Type": "application/json"
4266
4236
  }
4267
4237
  },
4268
4238
  service
@@ -5010,15 +4980,13 @@ var useGetDetail = () => {
5010
4980
  ids,
5011
4981
  specification,
5012
4982
  context,
5013
- service,
5014
- xNode
4983
+ service
5015
4984
  }) => getDetail({
5016
4985
  model,
5017
4986
  ids,
5018
4987
  specification,
5019
4988
  context,
5020
- service,
5021
- xNode
4989
+ service
5022
4990
  })
5023
4991
  });
5024
4992
  };
@@ -5028,16 +4996,14 @@ var use_get_detail_default = useGetDetail;
5028
4996
  import { useQuery as useQuery9 } from "@tanstack/react-query";
5029
4997
  var useGetFieldOnChange = ({
5030
4998
  model,
5031
- service,
5032
- xNode
4999
+ service
5033
5000
  }) => {
5034
5001
  const { getListFieldsOnchange } = useModelService();
5035
5002
  return useQuery9({
5036
5003
  queryKey: [`field-onchange-${model}`, model],
5037
5004
  queryFn: () => getListFieldsOnchange({
5038
5005
  model,
5039
- service,
5040
- xNode
5006
+ service
5041
5007
  }).then((res) => {
5042
5008
  if (res) {
5043
5009
  return res;
@@ -5222,8 +5188,7 @@ var useOnChangeForm = () => {
5222
5188
  context,
5223
5189
  object,
5224
5190
  fieldChange,
5225
- service,
5226
- xNode
5191
+ service
5227
5192
  }) => onChange({
5228
5193
  ids,
5229
5194
  model,
@@ -5231,8 +5196,7 @@ var useOnChangeForm = () => {
5231
5196
  context,
5232
5197
  object,
5233
5198
  fieldChange,
5234
- service,
5235
- xNode
5199
+ service
5236
5200
  })
5237
5201
  });
5238
5202
  };
@@ -5250,9 +5214,8 @@ var useSave = () => {
5250
5214
  specification,
5251
5215
  context,
5252
5216
  path,
5253
- service,
5254
- xNode
5255
- }) => save({ ids, model, data, specification, context, path, service, xNode })
5217
+ service
5218
+ }) => save({ ids, model, data, specification, context, path, service })
5256
5219
  });
5257
5220
  };
5258
5221
  var use_save_default = useSave;
@@ -5305,15 +5268,13 @@ var useButton = () => {
5305
5268
  ids,
5306
5269
  context,
5307
5270
  method,
5308
- service,
5309
- xNode
5271
+ service
5310
5272
  }) => callButton({
5311
5273
  model,
5312
5274
  ids,
5313
5275
  context,
5314
5276
  method,
5315
- service,
5316
- xNode
5277
+ service
5317
5278
  }),
5318
5279
  onSuccess: (response) => {
5319
5280
  return response;
@@ -5331,14 +5292,12 @@ var useDuplicateRecord = () => {
5331
5292
  id,
5332
5293
  model,
5333
5294
  context,
5334
- service,
5335
- xNode
5295
+ service
5336
5296
  }) => duplicateRecord({
5337
5297
  id,
5338
5298
  model,
5339
5299
  context,
5340
- service,
5341
- xNode
5300
+ service
5342
5301
  })
5343
5302
  });
5344
5303
  };
@@ -5420,12 +5379,12 @@ var useGetGroups = ({
5420
5379
  var use_get_groups_default = useGetGroups;
5421
5380
 
5422
5381
  // src/hooks/view/use-get-list-data.ts
5423
- import { keepPreviousData, useQuery as useQuery14 } from "@tanstack/react-query";
5424
- var useGetListData = (listDataProps, queryKey, enabled, service, xNode) => {
5382
+ import { useQuery as useQuery14 } from "@tanstack/react-query";
5383
+ var useGetListData = (listDataProps, queryKey, enabled, service) => {
5425
5384
  const { getAll } = useModelService();
5426
5385
  return useQuery14({
5427
5386
  queryKey,
5428
- queryFn: () => getAll({ data: listDataProps, service, xNode }).then((res) => {
5387
+ queryFn: () => getAll({ data: listDataProps, service }).then((res) => {
5429
5388
  if (res) {
5430
5389
  return res;
5431
5390
  }
@@ -5433,8 +5392,7 @@ var useGetListData = (listDataProps, queryKey, enabled, service, xNode) => {
5433
5392
  }),
5434
5393
  enabled,
5435
5394
  refetchOnWindowFocus: false,
5436
- staleTime: 0,
5437
- placeholderData: keepPreviousData
5395
+ staleTime: 0
5438
5396
  });
5439
5397
  };
5440
5398
  var use_get_list_data_default = useGetListData;
@@ -5503,13 +5461,12 @@ var useGetSelection = ({
5503
5461
  data,
5504
5462
  queryKey,
5505
5463
  enabled,
5506
- service,
5507
- xNode
5464
+ service
5508
5465
  }) => {
5509
5466
  const { getSelectionItem } = useViewService();
5510
5467
  return useQuery17({
5511
5468
  queryKey,
5512
- queryFn: () => getSelectionItem({ data, service, xNode }),
5469
+ queryFn: () => getSelectionItem({ data, service }),
5513
5470
  enabled,
5514
5471
  refetchOnWindowFocus: false
5515
5472
  });
@@ -5538,14 +5495,12 @@ var useLoadAction = () => {
5538
5495
  mutationFn: ({
5539
5496
  idAction,
5540
5497
  context,
5541
- service,
5542
- xNode
5498
+ service
5543
5499
  }) => {
5544
5500
  return loadAction({
5545
5501
  idAction,
5546
5502
  context,
5547
- service,
5548
- xNode
5503
+ service
5549
5504
  });
5550
5505
  }
5551
5506
  });
@@ -5587,14 +5542,12 @@ var useRemoveRow = () => {
5587
5542
  model,
5588
5543
  ids,
5589
5544
  context,
5590
- service,
5591
- xNode
5545
+ service
5592
5546
  }) => removeRows({
5593
5547
  model,
5594
5548
  ids,
5595
5549
  context,
5596
- service,
5597
- xNode
5550
+ service
5598
5551
  })
5599
5552
  });
5600
5553
  };
@@ -5626,13 +5579,11 @@ var useRunAction = () => {
5626
5579
  mutationFn: ({
5627
5580
  idAction,
5628
5581
  context,
5629
- service,
5630
- xNode
5582
+ service
5631
5583
  }) => runAction({
5632
5584
  idAction,
5633
5585
  context,
5634
- service,
5635
- xNode
5586
+ service
5636
5587
  })
5637
5588
  });
5638
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-DioSS9fJ.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-DioSS9fJ.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 };