@tealca/core-components 1.0.16 → 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 CHANGED
@@ -132,6 +132,8 @@ export declare interface AppContextProps {
132
132
  basicApi: AxiosInstance;
133
133
  }
134
134
 
135
+ export declare type AppDispatch = AppStore["dispatch"];
136
+
135
137
  export declare interface Application {
136
138
  applicationId: number;
137
139
  applicationCode: string;
@@ -145,6 +147,8 @@ export declare const AppProvider: FC<{
145
147
  applicationId: number;
146
148
  }>;
147
149
 
150
+ export declare type AppStore = ReturnType<typeof makeStore>;
151
+
148
152
  /**
149
153
  * React context for managing authentication state throughout the application.
150
154
  *
@@ -789,6 +793,8 @@ declare interface LoginProps {
789
793
  onSuccess?: () => void;
790
794
  }
791
795
 
796
+ export declare const makeStore: () => any;
797
+
792
798
  declare interface MenuItem {
793
799
  id: string;
794
800
  label: string;
@@ -1103,6 +1109,8 @@ declare interface Response_2<_TModelType> {
1103
1109
  }
1104
1110
  export { Response_2 as Response }
1105
1111
 
1112
+ export declare type RootState = ReturnType<AppStore["getState"]>;
1113
+
1106
1114
  /**
1107
1115
  * A secondary button component with predefined styles.
1108
1116
  * Inherits all props from the standard HTML button element.
@@ -1565,22 +1573,6 @@ declare interface TrackingTableProps {
1565
1573
  wrapperClassName?: string;
1566
1574
  }
1567
1575
 
1568
- /**
1569
- * `api` is an instance of `axios` configured for interacting with the backend API.
1570
- *
1571
- * It has interceptors to standardize requests and responses.
1572
- *
1573
- * Request Interceptor:
1574
- * 1. Adds the `Authorization` header with the JWT token if available.
1575
- * 2. Converts the keys of the request `data` from camelCase to snake_case.
1576
- * 3. Converts the keys of the request `params` from camelCase to snake_case.
1577
- *
1578
- * Response Interceptor:
1579
- * 1. Converts the keys of the response `data` from snake_case to camelCase.
1580
- * 2. If a 401 Unauthorized error occurs, it attempts to refresh the token.
1581
- * - If token refresh is successful, it retries the original request with the new token.
1582
- * - If token refresh fails, it rejects the promise.
1583
- */
1584
1576
  export declare const useApi: (apiUri: string, basicApi: AxiosInstance) => AxiosInstance;
1585
1577
 
1586
1578
  /**