@fctc/widget-logic 2.4.2 → 2.4.5

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.d.mts CHANGED
@@ -1,77 +1,100 @@
1
- import * as _tanstack_react_query from '@tanstack/react-query';
1
+ export { useButton, useChangeStatus, useDelete, useDeleteComment, useDuplicateRecord, useExecuteImport, useExportExcel, useForgotPassword, useForgotPasswordSSO, useGet2FAMethods, useGetAccessByCode, useGetActionDetail, useGetAll, useGetCalendar, useGetComment, useGetCompanyInfo, useGetConversionRate, useGetCurrency, useGetCurrentCompany, useGetDetail, useGetFieldExport, useGetFieldOnChange, useGetFileExcel, useGetFormView, useGetGroups, useGetImage, useGetListCompany, useGetListData, useGetListMyBankAccount, useGetMenu, useGetPrintReport, useGetProGressBar, useGetProfile, useGetProvider, useGetResequence, useGetSelection, useGetUser, useGetView, useGrantAccess, useIsValidToken, useLoadAction, useLoadMessage, useLoginCredential, useLoginSocial, useLogout, useModel, useOdooDataTransform, useOnChangeForm, useParsePreview, usePrint, useRemoveRow, useRemoveTotpSetup, useRequestSetupTotp, useResetPassword, useResetPasswordSSO, useRunAction, useSave, useSendComment, useSettingsWebRead2fa, useSignInSSO, useSwitchLocale, useUpdatePassword, useUploadFile, useUploadFileExcel, useUploadIdFile, useUploadImage, useValidateActionToken, useVerify2FA, useVerifyTotp } from '@fctc/interface-logic/hooks';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
3
  import * as _tanstack_query_core from '@tanstack/query-core';
3
4
  import * as react from 'react';
4
5
  import react__default, { RefObject } from 'react';
5
- import * as react_jsx_runtime from 'react/jsx-runtime';
6
- export * from '@fctc/interface-logic/hooks';
7
6
 
8
- declare const useCallAction: () => readonly [ActionResult | undefined, ({ aid, actionType, }: {
7
+ declare const useCallAction: () => readonly [ActionResult | undefined, ({ aid, }: {
9
8
  aid: number;
10
9
  actionType?: string;
11
10
  }) => Promise<ActionResult | undefined>];
12
11
  type useCallActionType = ReturnType<typeof useCallAction>;
13
12
  type ActionResultType = useCallActionType[0];
14
13
  interface ActionResult {
15
- jsonrpc: '2.0' | string;
16
- result?: {
17
- id?: number;
18
- name?: string;
19
- type?: 'ir.actions.act_window' | string;
20
- xml_id?: string;
21
- path?: false | string;
22
- help?: string;
23
- binding_model_id?: false | number;
24
- binding_type?: 'action' | string;
25
- binding_view_types?: string;
26
- display_name?: string;
27
- view_id?: false | number;
28
- domain?: false | any[];
29
- context?: string;
30
- res_id?: number;
31
- res_model?: string;
32
- target?: 'current' | 'new' | string;
33
- view_mode?: string;
34
- mobile_view_mode?: string;
35
- views?: [number, string][];
36
- limit?: number;
37
- groups_id?: number[];
38
- search_view_id?: [number, string];
39
- embedded_action_ids?: number[];
40
- filter?: false | any;
41
- };
14
+ id?: number;
15
+ name?: string;
16
+ type?: 'ir.actions.act_window' | string;
17
+ xml_id?: string;
18
+ path?: false | string;
19
+ help?: string;
20
+ binding_model_id?: false | number;
21
+ binding_type?: 'action' | string;
22
+ binding_view_types?: string;
23
+ display_name?: string;
24
+ view_id?: false | number;
25
+ domain?: false | any[];
26
+ context?: string;
27
+ res_id?: number;
28
+ res_model?: string;
29
+ target?: 'current' | 'new' | string;
30
+ view_mode?: string;
31
+ mobile_view_mode?: string;
32
+ views?: [number, string][];
33
+ limit?: number;
34
+ groups_id?: number[];
35
+ search_view_id?: [number, string];
36
+ embedded_action_ids?: number[];
37
+ filter?: false | any;
38
+ url?: string;
42
39
  }
43
40
 
44
- type EnvData = {
45
- mode: string;
46
- baseUrl: string;
47
- config: {
48
- grantType: string;
49
- clientId: string;
50
- clientSecret: string;
41
+ declare const useMenu: ({ context, specification, }: {
42
+ context?: any;
43
+ specification?: any;
44
+ }) => UseMenuReturn;
45
+ type useMenuType = ReturnType<typeof useMenu>;
46
+ interface RecordMenu {
47
+ action: {
48
+ binding_view_types: string;
49
+ display_name: string;
50
+ id: {
51
+ id: number;
52
+ model: string;
53
+ };
54
+ res_model: string;
55
+ type: string;
51
56
  };
52
- };
53
- type ConfigType = {
54
- VITE_SIDEBAR_TYPE: string;
55
- VITE_APP_DOMAIN: string;
56
- VITE_IS_EDU: boolean;
57
- VITE_LOGO_WHITE_LOGIN: string;
58
- VITE_LOGO_BLACK_LOGIN: string;
59
- VITE_BACKGROUND_SIDEBAR: string;
60
- VITE_BANNER: string;
61
- VITE_BG_BUTTON: string;
62
- VITE_BACKGROUND_PAGE: string;
63
- };
64
- declare const useConfig: ({ localStorageUtils, sessionStorageUtils }: any) => {
65
- envConfig: EnvData;
66
- config: ConfigType;
67
- };
68
- type useConfigType = ReturnType<typeof useConfig>;
57
+ active: boolean;
58
+ child_id?: RecordMenu[];
59
+ complete_name: string;
60
+ display_name: string;
61
+ groups_id: any[];
62
+ id: number;
63
+ is_display: boolean;
64
+ is_mobile: boolean;
65
+ name: string;
66
+ sequence: number;
67
+ url_icon: boolean | string | null;
68
+ web_icon: boolean | string | null;
69
+ web_icon_data: boolean | string | null;
70
+ }
71
+ interface UseMenuReturn {
72
+ data: RecordMenu[] | undefined;
73
+ action: {
74
+ handleChangeMenu: ({ menu }: {
75
+ menu?: RecordMenu;
76
+ }) => Promise<any>;
77
+ };
78
+ state: {
79
+ menuId?: string;
80
+ action: any;
81
+ };
82
+ context?: any;
83
+ isLoading: boolean;
84
+ isError: boolean;
85
+ error: unknown;
86
+ refetch: () => void;
87
+ }
69
88
 
70
- declare const useDetail: (accessToken: string | null, sub?: number) => _tanstack_react_query.UseQueryResult<any, Error>;
89
+ declare const useUser: () => any;
90
+ type useUserType = ReturnType<typeof useUser>;
71
91
 
72
- declare const useViewV2: ({ action, context, }: {
73
- action: ActionResultType;
92
+ declare const useViewV2: ({ action, context, aid, views, model, }: {
93
+ action?: ActionResultType;
74
94
  context: any;
95
+ aid?: any;
96
+ views?: any;
97
+ model?: string;
75
98
  }) => {
76
99
  context: any;
77
100
  data: ViewResponse;
@@ -251,19 +274,320 @@ type ViewResponse = {
251
274
  };
252
275
  };
253
276
 
254
- declare const useListData: ({ action, context, viewResponse, }: {
277
+ declare const useCompany: () => {
278
+ currentCompany: {
279
+ data: CurrentCompany | undefined;
280
+ error: Error;
281
+ isError: true;
282
+ isPending: false;
283
+ isLoading: false;
284
+ isLoadingError: false;
285
+ isRefetchError: true;
286
+ isSuccess: false;
287
+ isPlaceholderData: false;
288
+ status: "error";
289
+ dataUpdatedAt: number;
290
+ errorUpdatedAt: number;
291
+ failureCount: number;
292
+ failureReason: Error | null;
293
+ errorUpdateCount: number;
294
+ isFetched: boolean;
295
+ isFetchedAfterMount: boolean;
296
+ isFetching: boolean;
297
+ isInitialLoading: boolean;
298
+ isPaused: boolean;
299
+ isRefetching: boolean;
300
+ isStale: boolean;
301
+ isEnabled: boolean;
302
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<CurrentCompany | undefined, Error>>;
303
+ fetchStatus: _tanstack_query_core.FetchStatus;
304
+ promise: Promise<CurrentCompany | undefined>;
305
+ } | {
306
+ data: CurrentCompany | undefined;
307
+ error: null;
308
+ isError: false;
309
+ isPending: false;
310
+ isLoading: false;
311
+ isLoadingError: false;
312
+ isRefetchError: false;
313
+ isSuccess: true;
314
+ isPlaceholderData: false;
315
+ status: "success";
316
+ dataUpdatedAt: number;
317
+ errorUpdatedAt: number;
318
+ failureCount: number;
319
+ failureReason: Error | null;
320
+ errorUpdateCount: number;
321
+ isFetched: boolean;
322
+ isFetchedAfterMount: boolean;
323
+ isFetching: boolean;
324
+ isInitialLoading: boolean;
325
+ isPaused: boolean;
326
+ isRefetching: boolean;
327
+ isStale: boolean;
328
+ isEnabled: boolean;
329
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<CurrentCompany | undefined, Error>>;
330
+ fetchStatus: _tanstack_query_core.FetchStatus;
331
+ promise: Promise<CurrentCompany | undefined>;
332
+ } | {
333
+ data: CurrentCompany | undefined;
334
+ isError: false;
335
+ error: null;
336
+ isPending: false;
337
+ isLoading: false;
338
+ isLoadingError: false;
339
+ isRefetchError: false;
340
+ isSuccess: true;
341
+ isPlaceholderData: true;
342
+ status: "success";
343
+ dataUpdatedAt: number;
344
+ errorUpdatedAt: number;
345
+ failureCount: number;
346
+ failureReason: Error | null;
347
+ errorUpdateCount: number;
348
+ isFetched: boolean;
349
+ isFetchedAfterMount: boolean;
350
+ isFetching: boolean;
351
+ isInitialLoading: boolean;
352
+ isPaused: boolean;
353
+ isRefetching: boolean;
354
+ isStale: boolean;
355
+ isEnabled: boolean;
356
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<CurrentCompany | undefined, Error>>;
357
+ fetchStatus: _tanstack_query_core.FetchStatus;
358
+ promise: Promise<CurrentCompany | undefined>;
359
+ };
360
+ companyInfo: {
361
+ data: any;
362
+ error: Error;
363
+ isError: true;
364
+ isPending: false;
365
+ isLoading: false;
366
+ isLoadingError: false;
367
+ isRefetchError: true;
368
+ isSuccess: false;
369
+ isPlaceholderData: false;
370
+ status: "error";
371
+ dataUpdatedAt: number;
372
+ errorUpdatedAt: number;
373
+ failureCount: number;
374
+ failureReason: Error | null;
375
+ errorUpdateCount: number;
376
+ isFetched: boolean;
377
+ isFetchedAfterMount: boolean;
378
+ isFetching: boolean;
379
+ isInitialLoading: boolean;
380
+ isPaused: boolean;
381
+ isRefetching: boolean;
382
+ isStale: boolean;
383
+ isEnabled: boolean;
384
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<any, Error>>;
385
+ fetchStatus: _tanstack_query_core.FetchStatus;
386
+ promise: Promise<any>;
387
+ } | {
388
+ data: any;
389
+ error: null;
390
+ isError: false;
391
+ isPending: false;
392
+ isLoading: false;
393
+ isLoadingError: false;
394
+ isRefetchError: false;
395
+ isSuccess: true;
396
+ isPlaceholderData: false;
397
+ status: "success";
398
+ dataUpdatedAt: number;
399
+ errorUpdatedAt: number;
400
+ failureCount: number;
401
+ failureReason: Error | null;
402
+ errorUpdateCount: number;
403
+ isFetched: boolean;
404
+ isFetchedAfterMount: boolean;
405
+ isFetching: boolean;
406
+ isInitialLoading: boolean;
407
+ isPaused: boolean;
408
+ isRefetching: boolean;
409
+ isStale: boolean;
410
+ isEnabled: boolean;
411
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<any, Error>>;
412
+ fetchStatus: _tanstack_query_core.FetchStatus;
413
+ promise: Promise<any>;
414
+ } | {
415
+ data: undefined;
416
+ error: Error;
417
+ isError: true;
418
+ isPending: false;
419
+ isLoading: false;
420
+ isLoadingError: true;
421
+ isRefetchError: false;
422
+ isSuccess: false;
423
+ isPlaceholderData: false;
424
+ status: "error";
425
+ dataUpdatedAt: number;
426
+ errorUpdatedAt: number;
427
+ failureCount: number;
428
+ failureReason: Error | null;
429
+ errorUpdateCount: number;
430
+ isFetched: boolean;
431
+ isFetchedAfterMount: boolean;
432
+ isFetching: boolean;
433
+ isInitialLoading: boolean;
434
+ isPaused: boolean;
435
+ isRefetching: boolean;
436
+ isStale: boolean;
437
+ isEnabled: boolean;
438
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<any, Error>>;
439
+ fetchStatus: _tanstack_query_core.FetchStatus;
440
+ promise: Promise<any>;
441
+ } | {
442
+ data: undefined;
443
+ error: null;
444
+ isError: false;
445
+ isPending: true;
446
+ isLoading: true;
447
+ isLoadingError: false;
448
+ isRefetchError: false;
449
+ isSuccess: false;
450
+ isPlaceholderData: false;
451
+ status: "pending";
452
+ dataUpdatedAt: number;
453
+ errorUpdatedAt: number;
454
+ failureCount: number;
455
+ failureReason: Error | null;
456
+ errorUpdateCount: number;
457
+ isFetched: boolean;
458
+ isFetchedAfterMount: boolean;
459
+ isFetching: boolean;
460
+ isInitialLoading: boolean;
461
+ isPaused: boolean;
462
+ isRefetching: boolean;
463
+ isStale: boolean;
464
+ isEnabled: boolean;
465
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<any, Error>>;
466
+ fetchStatus: _tanstack_query_core.FetchStatus;
467
+ promise: Promise<any>;
468
+ } | {
469
+ data: undefined;
470
+ error: null;
471
+ isError: false;
472
+ isPending: true;
473
+ isLoadingError: false;
474
+ isRefetchError: false;
475
+ isSuccess: false;
476
+ isPlaceholderData: false;
477
+ status: "pending";
478
+ dataUpdatedAt: number;
479
+ errorUpdatedAt: number;
480
+ failureCount: number;
481
+ failureReason: Error | null;
482
+ errorUpdateCount: number;
483
+ isFetched: boolean;
484
+ isFetchedAfterMount: boolean;
485
+ isFetching: boolean;
486
+ isLoading: boolean;
487
+ isInitialLoading: boolean;
488
+ isPaused: boolean;
489
+ isRefetching: boolean;
490
+ isStale: boolean;
491
+ isEnabled: boolean;
492
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<any, Error>>;
493
+ fetchStatus: _tanstack_query_core.FetchStatus;
494
+ promise: Promise<any>;
495
+ } | {
496
+ data: any;
497
+ isError: false;
498
+ error: null;
499
+ isPending: false;
500
+ isLoading: false;
501
+ isLoadingError: false;
502
+ isRefetchError: false;
503
+ isSuccess: true;
504
+ isPlaceholderData: true;
505
+ status: "success";
506
+ dataUpdatedAt: number;
507
+ errorUpdatedAt: number;
508
+ failureCount: number;
509
+ failureReason: Error | null;
510
+ errorUpdateCount: number;
511
+ isFetched: boolean;
512
+ isFetchedAfterMount: boolean;
513
+ isFetching: boolean;
514
+ isInitialLoading: boolean;
515
+ isPaused: boolean;
516
+ isRefetching: boolean;
517
+ isStale: boolean;
518
+ isEnabled: boolean;
519
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<any, Error>>;
520
+ fetchStatus: _tanstack_query_core.FetchStatus;
521
+ promise: Promise<any>;
522
+ };
523
+ context: {
524
+ allowed_company_ids: (number | undefined)[];
525
+ };
526
+ } | undefined;
527
+ interface CompanyTuple extends Array<number | string> {
528
+ 0: number;
529
+ 1: string;
530
+ }
531
+ interface CurrentCompany {
532
+ allowed_companies: CompanyTuple[];
533
+ current_company: CompanyTuple;
534
+ current_company_id: number;
535
+ is_allowed: boolean;
536
+ }
537
+ type useCompanyType = ReturnType<typeof useCompany>;
538
+
539
+ type AppProviderType = {
540
+ user: useUserType;
541
+ company: useCompanyType;
255
542
  action: ActionResultType;
256
- context: any;
257
- viewResponse?: ViewResponse;
258
- }) => {
259
- state: {
260
- type: string;
261
- setType: react.Dispatch<react.SetStateAction<string>>;
262
- mode: string;
263
- setMode: react.Dispatch<react.SetStateAction<string>>;
264
- currentDate: Date;
265
- setCurrentDate: react.Dispatch<react.SetStateAction<Date>>;
543
+ menu: useMenuType;
544
+ view: useViewV2Type;
545
+ };
546
+ declare const AppProvider: ({ children, menuSpecification, aid, }: {
547
+ children: React.ReactNode;
548
+ } & {
549
+ menuSpecification: any;
550
+ aid?: number;
551
+ }) => react_jsx_runtime.JSX.Element;
552
+ declare const useAppProvider: () => AppProviderType;
553
+
554
+ type EnvData = {
555
+ mode: string;
556
+ baseUrl: string;
557
+ config: {
558
+ grantType: string;
559
+ clientId: string;
560
+ clientSecret: string;
266
561
  };
562
+ };
563
+ type ConfigType = {
564
+ VITE_SIDEBAR_TYPE: string;
565
+ VITE_APP_DOMAIN: string;
566
+ VITE_IS_EDU: boolean;
567
+ VITE_LOGO_WHITE_LOGIN: string;
568
+ VITE_LOGO_BLACK_LOGIN: string;
569
+ VITE_BACKGROUND_SIDEBAR: string;
570
+ VITE_BANNER: string;
571
+ VITE_BG_BUTTON: string;
572
+ VITE_BACKGROUND_PAGE: string;
573
+ VITE_BANK: string;
574
+ VITE_BANK_COLLECTOR: string;
575
+ VITE_EDU_FIELD: string;
576
+ [key: string]: any;
577
+ };
578
+ type AppConfig = {
579
+ envConfig: EnvData;
580
+ config: ConfigType;
581
+ sessionStorageUtils?: any;
582
+ localStorageUtils?: any;
583
+ };
584
+ declare const useConfig: ({ envConfig, config, localStorageUtils, sessionStorageUtils, }: AppConfig) => {
585
+ envConfig: EnvData;
586
+ config: ConfigType;
587
+ };
588
+ type useConfigType = ReturnType<typeof useConfig>;
589
+
590
+ declare const useDetail: (sub?: number) => {
267
591
  data: any;
268
592
  error: Error;
269
593
  isError: true;
@@ -291,14 +615,6 @@ declare const useListData: ({ action, context, viewResponse, }: {
291
615
  fetchStatus: _tanstack_query_core.FetchStatus;
292
616
  promise: Promise<any>;
293
617
  } | {
294
- state: {
295
- type: string;
296
- setType: react.Dispatch<react.SetStateAction<string>>;
297
- mode: string;
298
- setMode: react.Dispatch<react.SetStateAction<string>>;
299
- currentDate: Date;
300
- setCurrentDate: react.Dispatch<react.SetStateAction<Date>>;
301
- };
302
618
  data: any;
303
619
  error: null;
304
620
  isError: false;
@@ -326,14 +642,6 @@ declare const useListData: ({ action, context, viewResponse, }: {
326
642
  fetchStatus: _tanstack_query_core.FetchStatus;
327
643
  promise: Promise<any>;
328
644
  } | {
329
- state: {
330
- type: string;
331
- setType: react.Dispatch<react.SetStateAction<string>>;
332
- mode: string;
333
- setMode: react.Dispatch<react.SetStateAction<string>>;
334
- currentDate: Date;
335
- setCurrentDate: react.Dispatch<react.SetStateAction<Date>>;
336
- };
337
645
  data: undefined;
338
646
  error: Error;
339
647
  isError: true;
@@ -361,14 +669,6 @@ declare const useListData: ({ action, context, viewResponse, }: {
361
669
  fetchStatus: _tanstack_query_core.FetchStatus;
362
670
  promise: Promise<any>;
363
671
  } | {
364
- state: {
365
- type: string;
366
- setType: react.Dispatch<react.SetStateAction<string>>;
367
- mode: string;
368
- setMode: react.Dispatch<react.SetStateAction<string>>;
369
- currentDate: Date;
370
- setCurrentDate: react.Dispatch<react.SetStateAction<Date>>;
371
- };
372
672
  data: undefined;
373
673
  error: null;
374
674
  isError: false;
@@ -396,14 +696,6 @@ declare const useListData: ({ action, context, viewResponse, }: {
396
696
  fetchStatus: _tanstack_query_core.FetchStatus;
397
697
  promise: Promise<any>;
398
698
  } | {
399
- state: {
400
- type: string;
401
- setType: react.Dispatch<react.SetStateAction<string>>;
402
- mode: string;
403
- setMode: react.Dispatch<react.SetStateAction<string>>;
404
- currentDate: Date;
405
- setCurrentDate: react.Dispatch<react.SetStateAction<Date>>;
406
- };
407
699
  data: undefined;
408
700
  error: null;
409
701
  isError: false;
@@ -431,14 +723,6 @@ declare const useListData: ({ action, context, viewResponse, }: {
431
723
  fetchStatus: _tanstack_query_core.FetchStatus;
432
724
  promise: Promise<any>;
433
725
  } | {
434
- state: {
435
- type: string;
436
- setType: react.Dispatch<react.SetStateAction<string>>;
437
- mode: string;
438
- setMode: react.Dispatch<react.SetStateAction<string>>;
439
- currentDate: Date;
440
- setCurrentDate: react.Dispatch<react.SetStateAction<Date>>;
441
- };
442
726
  data: any;
443
727
  isError: false;
444
728
  error: null;
@@ -466,20 +750,50 @@ declare const useListData: ({ action, context, viewResponse, }: {
466
750
  fetchStatus: _tanstack_query_core.FetchStatus;
467
751
  promise: Promise<any>;
468
752
  };
469
- type useListDataType = ReturnType<typeof useListData>;
470
753
 
471
- declare const useMenu: ({ context }: {
754
+ declare const useGetAction: ({ aid, context, }: {
755
+ aid: number;
472
756
  context: any;
473
757
  }) => {
474
- data: Record[] | undefined;
475
- action: {
476
- handleChangeMenu: ({ menu, subMenu, }: {
477
- menu?: Record;
478
- subMenu: Record;
479
- }) => Promise<void>;
480
- };
481
- state: any;
758
+ onLoadAction: () => void;
759
+ };
760
+
761
+ declare const useGetSpecification: ({ model, viewData, fields, }: {
762
+ model: string;
763
+ viewData: any;
764
+ fields: any;
765
+ }) => {
766
+ specification: Record<string, any> | null;
767
+ };
768
+
769
+ declare const useListData: ({ action, context, viewData, model, }: {
770
+ action: ActionResultType;
482
771
  context: any;
772
+ viewData?: ViewResponse;
773
+ model: string;
774
+ }) => {
775
+ state: {
776
+ specification: Record<string, any> | null;
777
+ type: string;
778
+ page: number;
779
+ mode: string;
780
+ order: any;
781
+ domain: any;
782
+ pageLimit: number;
783
+ groupByList: any;
784
+ currentDate: Date;
785
+ selectedRowKeys: number[];
786
+ setType: react.Dispatch<react.SetStateAction<string>>;
787
+ setMode: react.Dispatch<react.SetStateAction<string>>;
788
+ setPage: react.Dispatch<react.SetStateAction<number>>;
789
+ setOrder: react.Dispatch<any>;
790
+ setDomain: react.Dispatch<any>;
791
+ setPageLimit: react.Dispatch<react.SetStateAction<number>>;
792
+ setGroupByList: react.Dispatch<any>;
793
+ setCurrentDate: react.Dispatch<react.SetStateAction<Date>>;
794
+ setSelectedRowKeys: react.Dispatch<react.SetStateAction<number[]>>;
795
+ };
796
+ data: any;
483
797
  error: Error;
484
798
  isError: true;
485
799
  isPending: false;
@@ -502,19 +816,32 @@ declare const useMenu: ({ context }: {
502
816
  isRefetching: boolean;
503
817
  isStale: boolean;
504
818
  isEnabled: boolean;
505
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<Record[] | undefined, Error>>;
819
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<any, Error>>;
506
820
  fetchStatus: _tanstack_query_core.FetchStatus;
507
- promise: Promise<Record[] | undefined>;
821
+ promise: Promise<any>;
508
822
  } | {
509
- data: Record[] | undefined;
510
- action: {
511
- handleChangeMenu: ({ menu, subMenu, }: {
512
- menu?: Record;
513
- subMenu: Record;
514
- }) => Promise<void>;
823
+ state: {
824
+ specification: Record<string, any> | null;
825
+ type: string;
826
+ page: number;
827
+ mode: string;
828
+ order: any;
829
+ domain: any;
830
+ pageLimit: number;
831
+ groupByList: any;
832
+ currentDate: Date;
833
+ selectedRowKeys: number[];
834
+ setType: react.Dispatch<react.SetStateAction<string>>;
835
+ setMode: react.Dispatch<react.SetStateAction<string>>;
836
+ setPage: react.Dispatch<react.SetStateAction<number>>;
837
+ setOrder: react.Dispatch<any>;
838
+ setDomain: react.Dispatch<any>;
839
+ setPageLimit: react.Dispatch<react.SetStateAction<number>>;
840
+ setGroupByList: react.Dispatch<any>;
841
+ setCurrentDate: react.Dispatch<react.SetStateAction<Date>>;
842
+ setSelectedRowKeys: react.Dispatch<react.SetStateAction<number[]>>;
515
843
  };
516
- state: any;
517
- context: any;
844
+ data: any;
518
845
  error: null;
519
846
  isError: false;
520
847
  isPending: false;
@@ -537,19 +864,32 @@ declare const useMenu: ({ context }: {
537
864
  isRefetching: boolean;
538
865
  isStale: boolean;
539
866
  isEnabled: boolean;
540
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<Record[] | undefined, Error>>;
867
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<any, Error>>;
541
868
  fetchStatus: _tanstack_query_core.FetchStatus;
542
- promise: Promise<Record[] | undefined>;
869
+ promise: Promise<any>;
543
870
  } | {
544
- data: Record[] | undefined;
545
- action: {
546
- handleChangeMenu: ({ menu, subMenu, }: {
547
- menu?: Record;
548
- subMenu: Record;
549
- }) => Promise<void>;
871
+ state: {
872
+ specification: Record<string, any> | null;
873
+ type: string;
874
+ page: number;
875
+ mode: string;
876
+ order: any;
877
+ domain: any;
878
+ pageLimit: number;
879
+ groupByList: any;
880
+ currentDate: Date;
881
+ selectedRowKeys: number[];
882
+ setType: react.Dispatch<react.SetStateAction<string>>;
883
+ setMode: react.Dispatch<react.SetStateAction<string>>;
884
+ setPage: react.Dispatch<react.SetStateAction<number>>;
885
+ setOrder: react.Dispatch<any>;
886
+ setDomain: react.Dispatch<any>;
887
+ setPageLimit: react.Dispatch<react.SetStateAction<number>>;
888
+ setGroupByList: react.Dispatch<any>;
889
+ setCurrentDate: react.Dispatch<react.SetStateAction<Date>>;
890
+ setSelectedRowKeys: react.Dispatch<react.SetStateAction<number[]>>;
550
891
  };
551
- state: any;
552
- context: any;
892
+ data: undefined;
553
893
  error: Error;
554
894
  isError: true;
555
895
  isPending: false;
@@ -572,19 +912,32 @@ declare const useMenu: ({ context }: {
572
912
  isRefetching: boolean;
573
913
  isStale: boolean;
574
914
  isEnabled: boolean;
575
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<Record[] | undefined, Error>>;
915
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<any, Error>>;
576
916
  fetchStatus: _tanstack_query_core.FetchStatus;
577
- promise: Promise<Record[] | undefined>;
917
+ promise: Promise<any>;
578
918
  } | {
579
- data: Record[] | undefined;
580
- action: {
581
- handleChangeMenu: ({ menu, subMenu, }: {
582
- menu?: Record;
583
- subMenu: Record;
584
- }) => Promise<void>;
919
+ state: {
920
+ specification: Record<string, any> | null;
921
+ type: string;
922
+ page: number;
923
+ mode: string;
924
+ order: any;
925
+ domain: any;
926
+ pageLimit: number;
927
+ groupByList: any;
928
+ currentDate: Date;
929
+ selectedRowKeys: number[];
930
+ setType: react.Dispatch<react.SetStateAction<string>>;
931
+ setMode: react.Dispatch<react.SetStateAction<string>>;
932
+ setPage: react.Dispatch<react.SetStateAction<number>>;
933
+ setOrder: react.Dispatch<any>;
934
+ setDomain: react.Dispatch<any>;
935
+ setPageLimit: react.Dispatch<react.SetStateAction<number>>;
936
+ setGroupByList: react.Dispatch<any>;
937
+ setCurrentDate: react.Dispatch<react.SetStateAction<Date>>;
938
+ setSelectedRowKeys: react.Dispatch<react.SetStateAction<number[]>>;
585
939
  };
586
- state: any;
587
- context: any;
940
+ data: undefined;
588
941
  error: null;
589
942
  isError: false;
590
943
  isPending: true;
@@ -607,19 +960,32 @@ declare const useMenu: ({ context }: {
607
960
  isRefetching: boolean;
608
961
  isStale: boolean;
609
962
  isEnabled: boolean;
610
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<Record[] | undefined, Error>>;
963
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<any, Error>>;
611
964
  fetchStatus: _tanstack_query_core.FetchStatus;
612
- promise: Promise<Record[] | undefined>;
965
+ promise: Promise<any>;
613
966
  } | {
614
- data: Record[] | undefined;
615
- action: {
616
- handleChangeMenu: ({ menu, subMenu, }: {
617
- menu?: Record;
618
- subMenu: Record;
619
- }) => Promise<void>;
967
+ state: {
968
+ specification: Record<string, any> | null;
969
+ type: string;
970
+ page: number;
971
+ mode: string;
972
+ order: any;
973
+ domain: any;
974
+ pageLimit: number;
975
+ groupByList: any;
976
+ currentDate: Date;
977
+ selectedRowKeys: number[];
978
+ setType: react.Dispatch<react.SetStateAction<string>>;
979
+ setMode: react.Dispatch<react.SetStateAction<string>>;
980
+ setPage: react.Dispatch<react.SetStateAction<number>>;
981
+ setOrder: react.Dispatch<any>;
982
+ setDomain: react.Dispatch<any>;
983
+ setPageLimit: react.Dispatch<react.SetStateAction<number>>;
984
+ setGroupByList: react.Dispatch<any>;
985
+ setCurrentDate: react.Dispatch<react.SetStateAction<Date>>;
986
+ setSelectedRowKeys: react.Dispatch<react.SetStateAction<number[]>>;
620
987
  };
621
- state: any;
622
- context: any;
988
+ data: undefined;
623
989
  error: null;
624
990
  isError: false;
625
991
  isPending: true;
@@ -642,19 +1008,32 @@ declare const useMenu: ({ context }: {
642
1008
  isRefetching: boolean;
643
1009
  isStale: boolean;
644
1010
  isEnabled: boolean;
645
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<Record[] | undefined, Error>>;
1011
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<any, Error>>;
646
1012
  fetchStatus: _tanstack_query_core.FetchStatus;
647
- promise: Promise<Record[] | undefined>;
1013
+ promise: Promise<any>;
648
1014
  } | {
649
- data: Record[] | undefined;
650
- action: {
651
- handleChangeMenu: ({ menu, subMenu, }: {
652
- menu?: Record;
653
- subMenu: Record;
654
- }) => Promise<void>;
1015
+ state: {
1016
+ specification: Record<string, any> | null;
1017
+ type: string;
1018
+ page: number;
1019
+ mode: string;
1020
+ order: any;
1021
+ domain: any;
1022
+ pageLimit: number;
1023
+ groupByList: any;
1024
+ currentDate: Date;
1025
+ selectedRowKeys: number[];
1026
+ setType: react.Dispatch<react.SetStateAction<string>>;
1027
+ setMode: react.Dispatch<react.SetStateAction<string>>;
1028
+ setPage: react.Dispatch<react.SetStateAction<number>>;
1029
+ setOrder: react.Dispatch<any>;
1030
+ setDomain: react.Dispatch<any>;
1031
+ setPageLimit: react.Dispatch<react.SetStateAction<number>>;
1032
+ setGroupByList: react.Dispatch<any>;
1033
+ setCurrentDate: react.Dispatch<react.SetStateAction<Date>>;
1034
+ setSelectedRowKeys: react.Dispatch<react.SetStateAction<number[]>>;
655
1035
  };
656
- state: any;
657
- context: any;
1036
+ data: any;
658
1037
  isError: false;
659
1038
  error: null;
660
1039
  isPending: false;
@@ -677,38 +1056,13 @@ declare const useMenu: ({ context }: {
677
1056
  isRefetching: boolean;
678
1057
  isStale: boolean;
679
1058
  isEnabled: boolean;
680
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<Record[] | undefined, Error>>;
1059
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<any, Error>>;
681
1060
  fetchStatus: _tanstack_query_core.FetchStatus;
682
- promise: Promise<Record[] | undefined>;
1061
+ promise: Promise<any>;
683
1062
  };
684
- type useMenuType = ReturnType<typeof useMenu>;
685
- interface Record {
686
- action: {
687
- binding_view_types: string;
688
- display_name: string;
689
- id: {
690
- id: number;
691
- model: string;
692
- };
693
- res_model: string;
694
- type: string;
695
- };
696
- active: boolean;
697
- child_id?: Record[];
698
- complete_name: string;
699
- display_name: string;
700
- groups_id: any[];
701
- id: number;
702
- is_display: boolean;
703
- is_mobile: boolean;
704
- name: string;
705
- sequence: number;
706
- url_icon: boolean | string | null;
707
- web_icon: boolean | string | null;
708
- web_icon_data: boolean | string | null;
709
- }
1063
+ type useListDataType = ReturnType<typeof useListData>;
710
1064
 
711
- declare const useProfile: (accessToken: string | null) => {
1065
+ declare const useProfile: () => {
712
1066
  context: ContextProfile | undefined;
713
1067
  data: UserInfo | undefined;
714
1068
  error: Error;
@@ -764,90 +1118,6 @@ declare const useProfile: (accessToken: string | null) => {
764
1118
  refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<UserInfo | undefined, Error>>;
765
1119
  fetchStatus: _tanstack_query_core.FetchStatus;
766
1120
  promise: Promise<UserInfo | undefined>;
767
- } | {
768
- context: ContextProfile | undefined;
769
- data: undefined;
770
- error: Error;
771
- isError: true;
772
- isPending: false;
773
- isLoading: false;
774
- isLoadingError: true;
775
- isRefetchError: false;
776
- isSuccess: false;
777
- isPlaceholderData: false;
778
- status: "error";
779
- dataUpdatedAt: number;
780
- errorUpdatedAt: number;
781
- failureCount: number;
782
- failureReason: Error | null;
783
- errorUpdateCount: number;
784
- isFetched: boolean;
785
- isFetchedAfterMount: boolean;
786
- isFetching: boolean;
787
- isInitialLoading: boolean;
788
- isPaused: boolean;
789
- isRefetching: boolean;
790
- isStale: boolean;
791
- isEnabled: boolean;
792
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<UserInfo | undefined, Error>>;
793
- fetchStatus: _tanstack_query_core.FetchStatus;
794
- promise: Promise<UserInfo | undefined>;
795
- } | {
796
- context: ContextProfile | undefined;
797
- data: undefined;
798
- error: null;
799
- isError: false;
800
- isPending: true;
801
- isLoading: true;
802
- isLoadingError: false;
803
- isRefetchError: false;
804
- isSuccess: false;
805
- isPlaceholderData: false;
806
- status: "pending";
807
- dataUpdatedAt: number;
808
- errorUpdatedAt: number;
809
- failureCount: number;
810
- failureReason: Error | null;
811
- errorUpdateCount: number;
812
- isFetched: boolean;
813
- isFetchedAfterMount: boolean;
814
- isFetching: boolean;
815
- isInitialLoading: boolean;
816
- isPaused: boolean;
817
- isRefetching: boolean;
818
- isStale: boolean;
819
- isEnabled: boolean;
820
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<UserInfo | undefined, Error>>;
821
- fetchStatus: _tanstack_query_core.FetchStatus;
822
- promise: Promise<UserInfo | undefined>;
823
- } | {
824
- context: ContextProfile | undefined;
825
- data: undefined;
826
- error: null;
827
- isError: false;
828
- isPending: true;
829
- isLoadingError: false;
830
- isRefetchError: false;
831
- isSuccess: false;
832
- isPlaceholderData: false;
833
- status: "pending";
834
- dataUpdatedAt: number;
835
- errorUpdatedAt: number;
836
- failureCount: number;
837
- failureReason: Error | null;
838
- errorUpdateCount: number;
839
- isFetched: boolean;
840
- isFetchedAfterMount: boolean;
841
- isFetching: boolean;
842
- isLoading: boolean;
843
- isInitialLoading: boolean;
844
- isPaused: boolean;
845
- isRefetching: boolean;
846
- isStale: boolean;
847
- isEnabled: boolean;
848
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<UserInfo | undefined, Error>>;
849
- fetchStatus: _tanstack_query_core.FetchStatus;
850
- promise: Promise<UserInfo | undefined>;
851
1121
  } | {
852
1122
  context: ContextProfile | undefined;
853
1123
  data: UserInfo | undefined;
@@ -876,7 +1146,7 @@ declare const useProfile: (accessToken: string | null) => {
876
1146
  refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<UserInfo | undefined, Error>>;
877
1147
  fetchStatus: _tanstack_query_core.FetchStatus;
878
1148
  promise: Promise<UserInfo | undefined>;
879
- };
1149
+ } | null;
880
1150
  interface UserInfo {
881
1151
  address: Address;
882
1152
  email: string;
@@ -909,68 +1179,6 @@ type ContextProfile = {
909
1179
  [key: string]: any;
910
1180
  };
911
1181
 
912
- declare const useUser: (accessToken: string | null) => any;
913
- type useUserType = ReturnType<typeof useUser>;
914
-
915
- declare const useAuth: () => {
916
- signIn: (email: string, password: string) => Promise<void>;
917
- signOut: () => Promise<void>;
918
- accessToken: string | null;
919
- isLoading: boolean;
920
- };
921
- type useAuthType = ReturnType<typeof useAuth>;
922
-
923
- declare const useCompany: (accessToken: string | null) => {
924
- currentCompany: _tanstack_react_query.UseQueryResult<CurrentCompany | undefined, Error>;
925
- companyInfo: _tanstack_react_query.UseQueryResult<any, Error>;
926
- context: {
927
- allowed_company_ids: (number | undefined)[];
928
- };
929
- };
930
-
931
- interface CompanyTuple extends Array<number | string> {
932
- 0: number;
933
- 1: string;
934
- }
935
- interface CurrentCompany {
936
- allowed_companies: CompanyTuple[];
937
- current_company: CompanyTuple;
938
- current_company_id: number;
939
- is_allowed: boolean;
940
- }
941
- type useCompanyType = ReturnType<typeof useCompany>;
942
-
943
- type AppProviderType = {
944
- config: useConfigType;
945
- user: useUserType;
946
- auth: useAuthType;
947
- company: useCompanyType;
948
- action: ActionResultType;
949
- menu: useMenuType;
950
- view: useViewV2Type;
951
- list: useListDataType;
952
- };
953
- declare const AppProvider: ({ children }: {
954
- children: React.ReactNode;
955
- }) => react_jsx_runtime.JSX.Element;
956
- declare const useAppProvider: () => AppProviderType;
957
-
958
- interface TActionDetailType {
959
- id: number;
960
- res_model: string;
961
- views: any[][];
962
- }
963
- declare const useMenuItem: (props: any) => {
964
- handleClick: () => void;
965
- path: string;
966
- queryActionDetail: TActionDetailType;
967
- };
968
-
969
- declare const useGetRowIds: (tableRef: react__default.RefObject<HTMLTableElement | null>) => {
970
- rowIds: string[];
971
- refresh: () => void;
972
- };
973
-
974
1182
  declare const DEFAULT_EVENTS: readonly ["mousedown", "touchstart"];
975
1183
  type EventType = (typeof DEFAULT_EVENTS)[number];
976
1184
  interface UseClickOutsideOptions {
@@ -983,4 +1191,9 @@ declare const useClickOutside: ({ handler, events, nodes, refs, }: UseClickOutsi
983
1191
 
984
1192
  declare function useDebounce<T>(value: T, delay: number): [T];
985
1193
 
986
- export { type ActionResultType, AppProvider, type ContextProfile, type Record, type ViewResponse, useAppProvider, useAuth, type useAuthType, useCallAction, type useCallActionType, useClickOutside, useConfig, type useConfigType, useDebounce, useDetail, useGetRowIds, useListData, type useListDataType, useMenu, useMenuItem, type useMenuType, useProfile, useUser, type useUserType, useViewV2, type useViewV2Type };
1194
+ declare const useGetRowIds: (tableRef: react__default.RefObject<HTMLTableElement | null>) => {
1195
+ rowIds: string[];
1196
+ refresh: () => void;
1197
+ };
1198
+
1199
+ export { type ActionResultType, AppProvider, type CompanyTuple, type ContextProfile, type CurrentCompany, type RecordMenu, type UseMenuReturn, type ViewResponse, useAppProvider, useCallAction, type useCallActionType, useClickOutside, useCompany, type useCompanyType, useConfig, type useConfigType, useDebounce, useDetail, useGetAction, useGetRowIds, useGetSpecification, useListData, type useListDataType, useMenu, type useMenuType, useProfile, useUser, type useUserType, useViewV2, type useViewV2Type };