@abdellatifui/react 3.2.53 → 3.2.54

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/nextgen.d.ts CHANGED
@@ -1,18 +1,14 @@
1
1
  import { AgGridReactProps } from 'ag-grid-react';
2
- import { AxiosDefaults } from 'axios';
3
- import { AxiosHeaderValue } from 'axios';
4
- import { AxiosInstance } from 'axios';
5
- import { AxiosInterceptorManager } from 'axios';
2
+ import { AxiosError } from 'axios';
3
+ import { AxiosRequestConfig } from 'axios';
6
4
  import { AxiosResponse } from 'axios';
7
5
  import { ChangeEvent } from 'react';
8
6
  import { ClassValue } from 'clsx';
9
7
  import { Context } from 'react';
10
- import { CreateAxiosDefaults } from 'axios';
11
8
  import { cva } from 'class-variance-authority';
12
9
  import { default as default_2 } from 'react';
13
10
  import { Dispatch } from 'react';
14
11
  import { ForwardRefExoticComponent } from 'react';
15
- import { HeadersDefaults } from 'axios';
16
12
  import { InternalAxiosRequestConfig } from 'axios';
17
13
  import { IntersectionOptions } from 'react-intersection-observer';
18
14
  import { JSX } from 'react/jsx-runtime';
@@ -21,16 +17,28 @@ import { MutableRefObject } from 'react';
21
17
  import * as React_2 from 'react';
22
18
  import { ReactNode } from 'react';
23
19
  import { RefAttributes } from 'react';
24
- import { RefObject } from 'react';
25
20
  import { SetStateAction } from 'react';
21
+ import { Socket } from 'socket.io-client';
26
22
  import { ThemeDefaultParams } from 'ag-grid-community';
27
23
  import { TooltipProviderProps } from '@radix-ui/react-tooltip';
28
24
  import { ViewState } from 'react-map-gl/maplibre';
29
25
 
30
- export declare const AbuiContext: default_2.Context<unknown>;
26
+ export declare const AbuiContext: default_2.Context<{
27
+ externalApi: {};
28
+ }>;
31
29
 
32
30
  export declare const AbuiContextProvider: (props: any) => JSX.Element;
33
31
 
32
+ export declare type AbuiContextType = {
33
+ children: default_2.ReactNode<HTMLAllCollection>;
34
+ suspense: default_2.ReactNode<HTMLAllCollection>;
35
+ authorization: boolean;
36
+ onReady: (event: any) => void;
37
+ onInit: (event: any) => void;
38
+ api: UseApiProps;
39
+ contentActivityMode: "hidden" | "visible";
40
+ };
41
+
34
42
  export declare const AccordionGroup: (props: any) => JSX.Element;
35
43
 
36
44
  export declare interface AccordionGroupProps {
@@ -348,6 +356,16 @@ export declare interface ExcelFilterProps {
348
356
  tid?: string;
349
357
  }
350
358
 
359
+ declare interface ExtendedAxiosInstance extends Socket {
360
+ socketio: Socket | Record<string, never>;
361
+ ready: boolean;
362
+ socketioConnected: boolean;
363
+ connected: boolean;
364
+ csid: string;
365
+ pool: React.RefObject<InternalAxiosRequestConfig[]>;
366
+ props: UseApiProps;
367
+ }
368
+
351
369
  export declare interface FilterState {
352
370
  [columnField: string]: any[];
353
371
  }
@@ -371,7 +389,7 @@ export declare interface FrequencyProps {
371
389
  */
372
390
  export declare function getRandomColor(): string;
373
391
 
374
- export declare const GetRandomStr: (length?: number, str?: boolean) => string;
392
+ export declare const GetRandomStr: (options: any) => string;
375
393
 
376
394
  export declare const getWholeSpectrum: () => any[];
377
395
 
@@ -1315,24 +1333,7 @@ export declare interface TooltipProps {
1315
1333
  variant?: 'primary' | 'secondary' | 'outline';
1316
1334
  }
1317
1335
 
1318
- export declare const useApi: (props: UseApiProps) => {
1319
- ready: boolean;
1320
- socketioConnected: boolean;
1321
- connected: boolean;
1322
- csid: string;
1323
- pool: RefObject<any[]>;
1324
- props: UseApiProps;
1325
- create(config?: CreateAxiosDefaults): AxiosInstance;
1326
- defaults: Omit<AxiosDefaults, "headers"> & {
1327
- headers: HeadersDefaults & {
1328
- [key: string]: AxiosHeaderValue;
1329
- };
1330
- };
1331
- interceptors: {
1332
- request: AxiosInterceptorManager<InternalAxiosRequestConfig>;
1333
- response: AxiosInterceptorManager<AxiosResponse>;
1334
- };
1335
- };
1336
+ export declare const useApi: (props: UseApiProps) => ExtendedAxiosInstance;
1336
1337
 
1337
1338
  export declare interface UseApiProps {
1338
1339
  baseUrl?: string;
@@ -1340,15 +1341,15 @@ export declare interface UseApiProps {
1340
1341
  pushToast?: boolean;
1341
1342
  spinner?: boolean;
1342
1343
  debug?: boolean;
1343
- config?: any;
1344
- socketioParams?: any;
1345
- headers?: any;
1344
+ config?: AxiosRequestConfig;
1345
+ socketioParams?: Record<string, any>;
1346
+ headers?: Record<string, string>;
1346
1347
  socketio?: boolean;
1347
- onSuccess?: any;
1348
- onFail?: any;
1349
- onComplete?: any;
1350
- onRequest?: any;
1351
- onFailureRule?: any;
1348
+ onSuccess?: (response: AxiosResponse) => void;
1349
+ onFail?: (error: AxiosError | Error) => void;
1350
+ onComplete?: (error: AxiosError | Error | null, response?: AxiosResponse) => void;
1351
+ onRequest?: (args: any) => void;
1352
+ onFailureRule?: (response: AxiosResponse) => boolean;
1352
1353
  socketBaseUrl?: string;
1353
1354
  notify?: boolean;
1354
1355
  }