@tealca/core-components 1.0.17 → 1.0.18
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/index.d.ts +6 -32
- package/dist/tealca-core-components.cjs.js +29 -29
- package/dist/tealca-core-components.es.js +5439 -4985
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes } from 'react';
|
|
2
|
-
import { AuthState } from './slices/authSlice';
|
|
3
2
|
import { AxiosInstance } from 'axios';
|
|
4
3
|
import { ButtonHTMLAttributes } from 'react';
|
|
5
4
|
import { Context } from 'react';
|
|
6
5
|
import { default as default_2 } from 'react';
|
|
7
|
-
import { EnhancedStore } from '@reduxjs/toolkit';
|
|
8
6
|
import { FC } from 'react';
|
|
9
7
|
import { FormikHelpers } from 'formik';
|
|
10
8
|
import { FormikProps } from 'formik';
|
|
@@ -16,10 +14,6 @@ import { InputHTMLAttributes } from 'react';
|
|
|
16
14
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
17
15
|
import { ReactNode } from 'react';
|
|
18
16
|
import { RefAttributes } from 'react';
|
|
19
|
-
import { StoreEnhancer } from 'redux';
|
|
20
|
-
import { ThunkDispatch } from 'redux-thunk';
|
|
21
|
-
import { Tuple } from '@reduxjs/toolkit';
|
|
22
|
-
import { UnknownAction } from 'redux';
|
|
23
17
|
|
|
24
18
|
export declare interface Account {
|
|
25
19
|
id: string;
|
|
@@ -138,7 +132,7 @@ export declare interface AppContextProps {
|
|
|
138
132
|
basicApi: AxiosInstance;
|
|
139
133
|
}
|
|
140
134
|
|
|
141
|
-
export declare type AppDispatch =
|
|
135
|
+
export declare type AppDispatch = AppStore["dispatch"];
|
|
142
136
|
|
|
143
137
|
export declare interface Application {
|
|
144
138
|
applicationId: number;
|
|
@@ -153,6 +147,8 @@ export declare const AppProvider: FC<{
|
|
|
153
147
|
applicationId: number;
|
|
154
148
|
}>;
|
|
155
149
|
|
|
150
|
+
export declare type AppStore = ReturnType<typeof makeStore>;
|
|
151
|
+
|
|
156
152
|
/**
|
|
157
153
|
* React context for managing authentication state throughout the application.
|
|
158
154
|
*
|
|
@@ -797,6 +793,8 @@ declare interface LoginProps {
|
|
|
797
793
|
onSuccess?: () => void;
|
|
798
794
|
}
|
|
799
795
|
|
|
796
|
+
export declare const makeStore: () => any;
|
|
797
|
+
|
|
800
798
|
declare interface MenuItem {
|
|
801
799
|
id: string;
|
|
802
800
|
label: string;
|
|
@@ -1111,7 +1109,7 @@ declare interface Response_2<_TModelType> {
|
|
|
1111
1109
|
}
|
|
1112
1110
|
export { Response_2 as Response }
|
|
1113
1111
|
|
|
1114
|
-
export declare type RootState = ReturnType<
|
|
1112
|
+
export declare type RootState = ReturnType<AppStore["getState"]>;
|
|
1115
1113
|
|
|
1116
1114
|
/**
|
|
1117
1115
|
* A secondary button component with predefined styles.
|
|
@@ -1512,14 +1510,6 @@ export declare interface Store {
|
|
|
1512
1510
|
address: Address;
|
|
1513
1511
|
}
|
|
1514
1512
|
|
|
1515
|
-
export declare const store: EnhancedStore< {
|
|
1516
|
-
auth: AuthState;
|
|
1517
|
-
}, UnknownAction, Tuple<[StoreEnhancer< {
|
|
1518
|
-
dispatch: ThunkDispatch< {
|
|
1519
|
-
auth: AuthState;
|
|
1520
|
-
}, undefined, UnknownAction>;
|
|
1521
|
-
}>, StoreEnhancer]>>;
|
|
1522
|
-
|
|
1523
1513
|
/**
|
|
1524
1514
|
* A base switch (toggle) component.
|
|
1525
1515
|
* Inherits all props from the standard HTML input[type="checkbox"] element.
|
|
@@ -1583,22 +1573,6 @@ declare interface TrackingTableProps {
|
|
|
1583
1573
|
wrapperClassName?: string;
|
|
1584
1574
|
}
|
|
1585
1575
|
|
|
1586
|
-
/**
|
|
1587
|
-
* `api` is an instance of `axios` configured for interacting with the backend API.
|
|
1588
|
-
*
|
|
1589
|
-
* It has interceptors to standardize requests and responses.
|
|
1590
|
-
*
|
|
1591
|
-
* Request Interceptor:
|
|
1592
|
-
* 1. Adds the `Authorization` header with the JWT token if available.
|
|
1593
|
-
* 2. Converts the keys of the request `data` from camelCase to snake_case.
|
|
1594
|
-
* 3. Converts the keys of the request `params` from camelCase to snake_case.
|
|
1595
|
-
*
|
|
1596
|
-
* Response Interceptor:
|
|
1597
|
-
* 1. Converts the keys of the response `data` from snake_case to camelCase.
|
|
1598
|
-
* 2. If a 401 Unauthorized error occurs, it attempts to refresh the token.
|
|
1599
|
-
* - If token refresh is successful, it retries the original request with the new token.
|
|
1600
|
-
* - If token refresh fails, it rejects the promise.
|
|
1601
|
-
*/
|
|
1602
1576
|
export declare const useApi: (apiUri: string, basicApi: AxiosInstance) => AxiosInstance;
|
|
1603
1577
|
|
|
1604
1578
|
/**
|