@tracktor/shared-module 0.12.1 → 0.13.1
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/CHANGELOG.md +2 -2
- package/dist/components/Inputs/MaskTextField.d.ts +1 -1
- package/dist/hooks/useAuth/index.d.ts +2 -0
- package/dist/hooks/useAuth/useAuth.d.ts +21 -0
- package/dist/hooks/useInfiniteDataGrid/useInfiniteDataGrid.d.ts +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.js +298 -284
- package/dist/main.umd.cjs +10 -10
- package/package.json +11 -8
package/CHANGELOG.md
CHANGED
|
@@ -28,5 +28,5 @@ interface MaskTextFieldProps<T> {
|
|
|
28
28
|
*/
|
|
29
29
|
IMaskMixin: (param: (props: any) => any) => any;
|
|
30
30
|
}
|
|
31
|
-
declare const MaskTextField: <T extends ComponentType
|
|
31
|
+
declare const MaskTextField: <T extends ComponentType>({ IMaskMixin, ...props }: MaskTextFieldProps<T> & ComponentProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
32
32
|
export default MaskTextField;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface useAuthParams {
|
|
2
|
+
/**
|
|
3
|
+
* Axios instance
|
|
4
|
+
*/
|
|
5
|
+
defaults: {
|
|
6
|
+
baseURL?: string;
|
|
7
|
+
headers: {
|
|
8
|
+
common: {
|
|
9
|
+
Authorization?: any;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
declare const useAuth: <T>(axios: useAuthParams & T) => {
|
|
15
|
+
clearAuthenticationToken: () => void;
|
|
16
|
+
setAuthenticationToken: ({ tokenType, accessToken }: {
|
|
17
|
+
tokenType: string;
|
|
18
|
+
accessToken: string;
|
|
19
|
+
}) => void;
|
|
20
|
+
};
|
|
21
|
+
export default useAuth;
|
|
@@ -23,7 +23,7 @@ interface GridRowScrollEndParams {
|
|
|
23
23
|
* @param isLoading
|
|
24
24
|
* @param enabled
|
|
25
25
|
*/
|
|
26
|
-
declare const useInfiniteDataGrid: <T
|
|
26
|
+
declare const useInfiniteDataGrid: <T>({ data, fetchNextPage, isFetchingNextPage, isInitialLoading, isLoading, enabled, }: useInfiniteDataGridParams<T>) => {
|
|
27
27
|
fetchNextPageOnRowsScrollEnd: (params: GridRowScrollEndParams) => Promise<void>;
|
|
28
28
|
isLoading: boolean;
|
|
29
29
|
loadingVariant: "skeleton" | "linear";
|
package/dist/main.d.ts
CHANGED
|
@@ -20,5 +20,7 @@ export { default as useResponseError } from './hooks/useResponseError';
|
|
|
20
20
|
export * from './hooks/useResponseError';
|
|
21
21
|
export { default as useInfiniteDataGrid } from './hooks/useInfiniteDataGrid';
|
|
22
22
|
export * from './hooks/useInfiniteDataGrid';
|
|
23
|
+
export { default as useAuth } from './hooks/useAuth';
|
|
24
|
+
export * from './hooks/useAuth';
|
|
23
25
|
export { default as getOrvalConfig } from './config/orval';
|
|
24
26
|
export * from './config/orval';
|