@js-smart/react-kit 1.2.0 → 4.1.0
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/index.d.ts +5 -0
- package/index.js +76 -49
- package/index.mjs +5983 -5094
- package/lib/components/NextLink.d.ts +16 -0
- package/lib/components/table/TablePaginationActions.d.ts +10 -0
- package/lib/components/tabs/TabPanel.d.ts +13 -0
- package/lib/types/ProgressState.d.ts +4 -4
- package/lib/utils/CssUtils.d.ts +11 -0
- package/lib/utils/DateUtils.d.ts +1 -1
- package/lib/utils/ProgressStateUtils.d.ts +2 -2
- package/lib/utils/fetchClient.d.ts +1 -1
- package/package.json +1 -1
- package/style.css +1 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Reusable custom Next.js 13 Link component.
|
|
5
|
+
*
|
|
6
|
+
* @param props Properties of the React Node
|
|
7
|
+
*
|
|
8
|
+
* @author Pavan Kumar Jadda
|
|
9
|
+
* @since 0.3.2
|
|
10
|
+
*/
|
|
11
|
+
export declare function NextLink(props: {
|
|
12
|
+
href: string;
|
|
13
|
+
linkText?: string;
|
|
14
|
+
target?: string;
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface TablePaginationActionsProps {
|
|
4
|
+
count: number;
|
|
5
|
+
page: number;
|
|
6
|
+
rowsPerPage: number;
|
|
7
|
+
onPageChange: (event: React.MouseEvent<HTMLButtonElement>, newPage: number) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function TablePaginationActions(props: TablePaginationActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare function TabPanel(props: TabPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function a11yProps(index: number): {
|
|
5
|
+
id: string;
|
|
6
|
+
'aria-controls': string;
|
|
7
|
+
};
|
|
8
|
+
interface TabPanelProps {
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
index: number;
|
|
11
|
+
value: string;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the value of a CSS variable
|
|
3
|
+
*
|
|
4
|
+
* @param variable The name of the CSS variable
|
|
5
|
+
*
|
|
6
|
+
* @returns The value of the CSS variable
|
|
7
|
+
*
|
|
8
|
+
* @author Pavan Kumar Jadda
|
|
9
|
+
* @since 1.6.0
|
|
10
|
+
*/
|
|
11
|
+
export declare function getCssVariable(variable: string): string;
|
package/lib/utils/DateUtils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Sets Cookie expiration to 24 hours. By default, server sets 60 minutes expiration but after each API request it extends to another 60 minutes. In client side set 24 hours as expiration date,
|
|
3
|
-
* if the user hasn't refreshed web page in 60 minutes, they would get HTTP 401
|
|
3
|
+
* if the user hasn't refreshed web page in 60 minutes, they would get HTTP 401 isError and redirected to login page. And redirect URL will be stored in cookie
|
|
4
4
|
*
|
|
5
5
|
* @author Pavan Kumar Jadda
|
|
6
6
|
* @since 0.2.30
|
|
@@ -20,7 +20,7 @@ export declare const initializeState: () => ProgressState;
|
|
|
20
20
|
*/
|
|
21
21
|
export declare const markLoading: (progressState: ProgressState) => ProgressState;
|
|
22
22
|
/**
|
|
23
|
-
* Update state as
|
|
23
|
+
* Update state as isSuccess
|
|
24
24
|
*
|
|
25
25
|
* @return ProgressState Updated State Object
|
|
26
26
|
*
|
|
@@ -29,7 +29,7 @@ export declare const markLoading: (progressState: ProgressState) => ProgressStat
|
|
|
29
29
|
*/
|
|
30
30
|
export declare const markSuccess: (progressState: ProgressState, message?: string) => ProgressState;
|
|
31
31
|
/**
|
|
32
|
-
* Update state as failure or
|
|
32
|
+
* Update state as failure or isError
|
|
33
33
|
*
|
|
34
34
|
* @return ProgressState Updated State Object
|
|
35
35
|
*
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @param {string} url - The URL to request.
|
|
5
5
|
* @param {RequestInit} [options] - Options for the fetch request.
|
|
6
6
|
* @returns {Promise<T>} - A promise that resolves to the JSON response of type T.
|
|
7
|
-
* @throws {Error} - Throws an
|
|
7
|
+
* @throws {Error} - Throws an isError if the response is not OK.
|
|
8
8
|
*
|
|
9
9
|
* @author Pavan Kumar Jadda
|
|
10
10
|
* @since 1.0.3
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--primary-color: #153d77;--secondary-color: #607d8b;--success-color: #198754;--error-color: #ff1744;--white-color: #fff;--background-color: #dedede;--pdf-color: #f40f02;--word-document-color: #2b579a}
|