pixelize-design-library 2.2.178 → 2.2.182
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/coverage/clover.xml +638 -0
- package/coverage/coverage-final.json +20 -0
- package/coverage/lcov-report/Table/CompactSelect.tsx.html +379 -0
- package/coverage/lcov-report/Table/Components/ActiveFilters.tsx.html +514 -0
- package/coverage/lcov-report/Table/Components/HeaderActions.tsx.html +373 -0
- package/coverage/lcov-report/Table/Components/Pagination.tsx.html +574 -0
- package/coverage/lcov-report/Table/Components/TableActions.tsx.html +574 -0
- package/coverage/lcov-report/Table/Components/TableBody.tsx.html +1027 -0
- package/coverage/lcov-report/Table/Components/TableFilters.tsx.html +397 -0
- package/coverage/lcov-report/Table/Components/TableHeader.tsx.html +1060 -0
- package/coverage/lcov-report/Table/Components/TableLoading.tsx.html +361 -0
- package/coverage/lcov-report/Table/Components/TableSearch.tsx.html +337 -0
- package/coverage/lcov-report/Table/Components/index.html +266 -0
- package/coverage/lcov-report/Table/Components/useDebounce.ts.html +178 -0
- package/coverage/lcov-report/Table/Components/useTable.ts.html +778 -0
- package/coverage/lcov-report/Table/LeftFilterPane.tsx.html +1810 -0
- package/coverage/lcov-report/Table/SelectOperationControls.tsx.html +178 -0
- package/coverage/lcov-report/Table/Table.tsx.html +1567 -0
- package/coverage/lcov-report/Table/TableProps.tsx.html +658 -0
- package/coverage/lcov-report/Table/TableSettings/ManageColumns.tsx.html +619 -0
- package/coverage/lcov-report/Table/TableSettings/TableFilters.tsx.html +229 -0
- package/coverage/lcov-report/Table/TableSettings/TableSettings.tsx.html +532 -0
- package/coverage/lcov-report/Table/TableSettings/index.html +146 -0
- package/coverage/lcov-report/Table/TableToDo.tsx.html +973 -0
- package/coverage/lcov-report/Table/TextOperationControls.tsx.html +271 -0
- package/coverage/lcov-report/Table/filterTypes.ts.html +97 -0
- package/coverage/lcov-report/Table/index.html +176 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +146 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov.info +1836 -0
- package/debug-storybook.log +72 -0
- package/dist/Assets/defaultLogo.tsx +31 -0
- package/dist/Components/Table/Components/Pagination.d.ts +2 -3
- package/dist/Components/Table/Components/Pagination.js +8 -10
- package/dist/Components/Table/Components/useTable.js +6 -2
- package/dist/Components/Table/Table.js +27 -6
- package/dist/Components/Table/TableProps.d.ts +1 -1
- package/dist/Theme/Dark/palette.d.ts +370 -0
- package/dist/Theme/Dark/palette.js +372 -0
- package/package.json +1 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
[14:50:38.093] [INFO] storybook v10.2.16
|
|
2
|
+
[14:50:40.124] [DEBUG] Getting package.json info for /Users/mahesh/Applications/Pixelize/CRM/Micro-Components/package.json...
|
|
3
|
+
[14:50:40.126] [WARN] You are currently using Storybook 10.2.16 but you have packages which are incompatible with it:
|
|
4
|
+
|
|
5
|
+
- @storybook/addon-essentials@8.6.14 which depends on 8.6.14
|
|
6
|
+
Repo: https://github.com/storybookjs/storybook/tree/next/code/addons/essentials
|
|
7
|
+
- @storybook/addon-interactions@8.6.14 which depends on 8.6.14
|
|
8
|
+
Repo: https://github.com/storybookjs/storybook/tree/next/code/addons/interactions
|
|
9
|
+
- @storybook/test@8.6.15 which depends on 8.6.15
|
|
10
|
+
Repo: https://github.com/storybookjs/storybook/tree/next/code/lib/test
|
|
11
|
+
|
|
12
|
+
Please consider updating your packages or contacting the maintainers for compatibility details.
|
|
13
|
+
|
|
14
|
+
For more details on compatibility guidance, see:
|
|
15
|
+
https://github.com/storybookjs/storybook/issues/32836
|
|
16
|
+
[14:50:40.147] [ERROR] [38;2;241;97;97mSB_CORE-SERVER_0002 (CriticalPresetLoadError): Storybook failed to load the following preset: @storybook/react-vite/preset.
|
|
17
|
+
|
|
18
|
+
Please check whether your setup is correct, the Storybook dependencies (and their peer dependencies) are installed correctly and there are no package version clashes.
|
|
19
|
+
|
|
20
|
+
If you believe this is a bug, please open an issue on Github.
|
|
21
|
+
|
|
22
|
+
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@storybook/react-vite' imported from /Users/mahesh/.npm/_npx/6fe9a9991b157df1/node_modules/storybook/dist/_node-chunks/chunk-EBZ4DOUR.js
|
|
23
|
+
at packageResolve (node:internal/modules/esm/resolve:873:9)
|
|
24
|
+
at moduleResolve (node:internal/modules/esm/resolve:946:18)
|
|
25
|
+
at defaultResolve (node:internal/modules/esm/resolve:1188:11)
|
|
26
|
+
at nextResolve (node:internal/modules/esm/hooks:864:28)
|
|
27
|
+
at Hooks.resolve (node:internal/modules/esm/hooks:306:30)
|
|
28
|
+
at MessagePort.handleMessage (node:internal/modules/esm/worker:196:24)
|
|
29
|
+
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:831:20)
|
|
30
|
+
at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28)
|
|
31
|
+
|
|
32
|
+
More info:
|
|
33
|
+
[39m
|
|
34
|
+
at loadPreset (file:///Users/mahesh/.npm/_npx/6fe9a9991b157df1/node_modules/storybook/dist/_node-chunks/chunk-UXMBIWPQ.js:10081:13)
|
|
35
|
+
at async Promise.all (index 0)
|
|
36
|
+
at async loadPresets (file:///Users/mahesh/.npm/_npx/6fe9a9991b157df1/node_modules/storybook/dist/_node-chunks/chunk-UXMBIWPQ.js:10090:73)
|
|
37
|
+
at async getPresets (file:///Users/mahesh/.npm/_npx/6fe9a9991b157df1/node_modules/storybook/dist/_node-chunks/chunk-UXMBIWPQ.js:10121:23)
|
|
38
|
+
at async buildDevStandalone (file:///Users/mahesh/.npm/_npx/6fe9a9991b157df1/node_modules/storybook/dist/core-server/index.js:7661:17)
|
|
39
|
+
at async withTelemetry (file:///Users/mahesh/.npm/_npx/6fe9a9991b157df1/node_modules/storybook/dist/_node-chunks/chunk-CSGMAQQ4.js:218:12)
|
|
40
|
+
at async dev (file:///Users/mahesh/.npm/_npx/6fe9a9991b157df1/node_modules/storybook/dist/bin/core.js:2734:3)
|
|
41
|
+
at async _Command.<anonymous> (file:///Users/mahesh/.npm/_npx/6fe9a9991b157df1/node_modules/storybook/dist/bin/core.js:2804:92)
|
|
42
|
+
[14:50:40.152] [WARN] Broken build, fix the error above.
|
|
43
|
+
You may need to refresh the browser.
|
|
44
|
+
[14:50:40.159] [WARN] Failed to load preset: {"name":"/Users/mahesh/Applications/Pixelize/CRM/Micro-Components/node_modules/@storybook/addon-essentials/dist/preset.js"} on level 2
|
|
45
|
+
[14:50:40.159] [ERROR] [38;2;241;97;97mError: Cannot find module 'storybook/internal/common'
|
|
46
|
+
Require stack:
|
|
47
|
+
- ./node_modules/@storybook/addon-essentials/dist/preset.js[39m
|
|
48
|
+
at Module._resolveFilename (node:internal/modules/cjs/loader:1212:15)
|
|
49
|
+
at Module._load (node:internal/modules/cjs/loader:1043:27)
|
|
50
|
+
at Module.require (node:internal/modules/cjs/loader:1298:19)
|
|
51
|
+
at require (node:internal/modules/helpers:182:18)
|
|
52
|
+
at Object.<anonymous> (./node_modules/@storybook/addon-essentials/dist/preset.js:4:14)
|
|
53
|
+
at Module._compile (node:internal/modules/cjs/loader:1529:14)
|
|
54
|
+
at Module._extensions..js (node:internal/modules/cjs/loader:1613:10)
|
|
55
|
+
at Module.load (node:internal/modules/cjs/loader:1275:32)
|
|
56
|
+
at Module._load (node:internal/modules/cjs/loader:1096:12)
|
|
57
|
+
at cjsLoader (node:internal/modules/esm/translators:298:15)
|
|
58
|
+
[14:50:40.161] [WARN] Failed to load preset: {"name":"/Users/mahesh/Applications/Pixelize/CRM/Micro-Components/node_modules/@storybook/addon-interactions/dist/preset.js"} on level 2
|
|
59
|
+
[14:50:40.161] [ERROR] [38;2;241;97;97mError: Cannot find module 'storybook/internal/common'
|
|
60
|
+
Require stack:
|
|
61
|
+
- ./node_modules/@storybook/addon-interactions/dist/preset.js[39m
|
|
62
|
+
at Module._resolveFilename (node:internal/modules/cjs/loader:1212:15)
|
|
63
|
+
at Module._load (node:internal/modules/cjs/loader:1043:27)
|
|
64
|
+
at Module.require (node:internal/modules/cjs/loader:1298:19)
|
|
65
|
+
at require (node:internal/modules/helpers:182:18)
|
|
66
|
+
at Object.<anonymous> (./node_modules/@storybook/addon-interactions/dist/preset.js:4:14)
|
|
67
|
+
at Module._compile (node:internal/modules/cjs/loader:1529:14)
|
|
68
|
+
at Module._extensions..js (node:internal/modules/cjs/loader:1613:10)
|
|
69
|
+
at Module.load (node:internal/modules/cjs/loader:1275:32)
|
|
70
|
+
at Module._load (node:internal/modules/cjs/loader:1096:12)
|
|
71
|
+
at cjsLoader (node:internal/modules/esm/translators:298:15)
|
|
72
|
+
[14:50:40.164] [INFO] Storybook collects completely anonymous usage telemetry. We use it to shape Storybook's roadmap and prioritize features. You can learn more, including how to opt out, at https://storybook.js.org/telemetry
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCustomTheme } from "../Theme/useCustomTheme";
|
|
3
|
+
|
|
4
|
+
const DefaultLogo = () => {
|
|
5
|
+
const theme = useCustomTheme();
|
|
6
|
+
return (
|
|
7
|
+
<svg
|
|
8
|
+
width="12.09"
|
|
9
|
+
height="15.95"
|
|
10
|
+
viewBox="0 0 31 29"
|
|
11
|
+
fill="none"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
>
|
|
14
|
+
<path
|
|
15
|
+
d="M30.4999 6.26137V7.81058H15.9761H14.8787V22.8508V28.8862H12.5226C9.6824 28.8862 7.32632 26.4656 7.06812 23.3995C7.06812 23.2381 7.06812 23.0444 7.06812 22.8508V18.3323C7.06812 18.2677 7.06812 18.2032 7.06812 18.1063V15.5889V6.2291C7.06812 2.80793 9.84378 -5.72205e-06 13.2972 -5.72205e-06H24.8517C28.0147 0.355021 30.4676 3.00158 30.4676 6.2291L30.4999 6.26137Z"
|
|
16
|
+
fill={theme.colors.black}
|
|
17
|
+
/>
|
|
18
|
+
<path
|
|
19
|
+
d="M7.10053 23.3672H7.03598C5.16402 23.2381 3.48571 22.4635 2.25926 21.3338C0.871428 20.0428 0 18.2677 0 16.3312V15.6211H7.06825V18.1386C7.06825 18.2032 7.06825 18.2677 7.06825 18.3645V22.883C7.06825 23.0767 7.06825 23.2381 7.06825 23.4317L7.10053 23.3672Z"
|
|
20
|
+
fill={theme.colors.black}
|
|
21
|
+
/>
|
|
22
|
+
<path
|
|
23
|
+
d="M30.4678 12.0063V15.6211V17.1703C30.4678 20.6238 26.272 23.3994 21.0757 23.3994H14.8789V22.8508V15.6211H22.6572V7.81056C22.6895 7.81056 30.5001 7.81056 30.5001 7.81056V11.5868C30.5001 11.7159 30.5001 11.8772 30.5001 12.0063H30.4678Z"
|
|
24
|
+
fill={theme.colors.black}
|
|
25
|
+
/>
|
|
26
|
+
</svg>
|
|
27
|
+
|
|
28
|
+
)
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default DefaultLogo;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TableProps } from "../TableProps";
|
|
3
|
-
type PaginationProps = Pick<TableProps, "isVisiblity" | "columns"> & {
|
|
3
|
+
type PaginationProps = Pick<TableProps, "isVisiblity" | "columns" | "paginationSelectOptions"> & {
|
|
4
4
|
paginationText: string;
|
|
5
5
|
handlePageSizeChange: (event: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
6
6
|
rowsPerPage: number;
|
|
@@ -9,7 +9,6 @@ type PaginationProps = Pick<TableProps, "isVisiblity" | "columns"> & {
|
|
|
9
9
|
setCurrentPage: React.Dispatch<React.SetStateAction<number>>;
|
|
10
10
|
dataLength: number;
|
|
11
11
|
isServerPagination: boolean;
|
|
12
|
-
pageSizeOptions?: (number | string)[];
|
|
13
12
|
};
|
|
14
|
-
declare const Pagination: ({ paginationText, handlePageSizeChange, rowsPerPage, currentPage, pages, setCurrentPage, dataLength, isServerPagination,
|
|
13
|
+
declare const Pagination: ({ paginationText, handlePageSizeChange, rowsPerPage, currentPage, pages, setCurrentPage, dataLength, isServerPagination, paginationSelectOptions, }: PaginationProps) => React.JSX.Element;
|
|
15
14
|
export default Pagination;
|
|
@@ -8,26 +8,24 @@ var react_2 = require("@chakra-ui/react");
|
|
|
8
8
|
var table_1 = require("../../../Utils/table");
|
|
9
9
|
var lucide_react_1 = require("lucide-react");
|
|
10
10
|
var Pagination = function (_a) {
|
|
11
|
-
var paginationText = _a.paginationText, handlePageSizeChange = _a.handlePageSizeChange, rowsPerPage = _a.rowsPerPage, currentPage = _a.currentPage, pages = _a.pages, setCurrentPage = _a.setCurrentPage, dataLength = _a.dataLength, isServerPagination = _a.isServerPagination,
|
|
12
|
-
var computedOptions =
|
|
13
|
-
?
|
|
11
|
+
var paginationText = _a.paginationText, handlePageSizeChange = _a.handlePageSizeChange, rowsPerPage = _a.rowsPerPage, currentPage = _a.currentPage, pages = _a.pages, setCurrentPage = _a.setCurrentPage, dataLength = _a.dataLength, isServerPagination = _a.isServerPagination, paginationSelectOptions = _a.paginationSelectOptions;
|
|
12
|
+
var computedOptions = paginationSelectOptions && paginationSelectOptions.length
|
|
13
|
+
? paginationSelectOptions
|
|
14
14
|
: (0, table_1.pageSizeCalculation)(dataLength);
|
|
15
15
|
// const isLeftDisabled = currentPage === 0;
|
|
16
16
|
// const isRightDisabled = currentPage >= pages - 1;
|
|
17
17
|
var isLeftDisabled = dataLength === 0 || currentPage === 0;
|
|
18
18
|
var isRightDisabled = dataLength === 0 || currentPage >= pages - 1;
|
|
19
19
|
return (react_1.default.createElement(react_2.Flex, { justify: "flex-end", align: "center", minW: 0, overflow: "hidden", flexWrap: "nowrap" },
|
|
20
|
-
!isServerPagination && (react_1.default.createElement(react_2.Select, { onChange: handlePageSizeChange, value: rowsPerPage, size: "xs", borderRadius: 3, width: 20, isDisabled: dataLength === 0 },
|
|
21
|
-
!
|
|
22
|
-
computedOptions.map(function (size, index) {
|
|
23
|
-
|
|
24
|
-
}))),
|
|
25
|
-
dataLength > 0 && (react_1.default.createElement(react_2.Flex, null,
|
|
20
|
+
(!isServerPagination || paginationSelectOptions) && (react_1.default.createElement(react_2.Select, { onChange: handlePageSizeChange, value: rowsPerPage, size: "xs", borderRadius: 3, width: 20, isDisabled: dataLength === 0 },
|
|
21
|
+
!paginationSelectOptions && dataLength < 100 ? react_1.default.createElement("option", { value: 0 }) : null,
|
|
22
|
+
computedOptions.map(function (size, index) { return (react_1.default.createElement("option", { key: index, value: size }, String(size))); }))),
|
|
23
|
+
dataLength > 0 && (react_1.default.createElement(react_2.Flex, { w: "100%" },
|
|
26
24
|
react_1.default.createElement(react_2.IconButton, { "aria-label": "first-page", color: isLeftDisabled ? "gray" : "black", rounded: "full", variant: isLeftDisabled ? "plain" : "ghost", onClick: function () { return setCurrentPage(0); } },
|
|
27
25
|
react_1.default.createElement(lucide_react_1.ChevronsLeft, null)),
|
|
28
26
|
react_1.default.createElement(react_2.IconButton, { "aria-label": "previous-page", color: isLeftDisabled ? "gray" : "black", rounded: "full", variant: isLeftDisabled ? "plain" : "ghost", onClick: function () { return currentPage > 0 && setCurrentPage(currentPage - 1); } },
|
|
29
27
|
react_1.default.createElement(lucide_react_1.ChevronLeft, null)),
|
|
30
|
-
react_1.default.createElement(react_2.Text, { mt: 3, fontSize: 12 }, paginationText),
|
|
28
|
+
react_1.default.createElement(react_2.Text, { mt: 3, fontSize: 12, whiteSpace: "nowrap" }, paginationText),
|
|
31
29
|
react_1.default.createElement(react_2.IconButton, { "aria-label": "next-page", color: isRightDisabled ? "gray" : "black", rounded: "full", variant: isRightDisabled ? "plain" : "ghost", onClick: function () {
|
|
32
30
|
return currentPage < pages - 1 && setCurrentPage(currentPage + 1);
|
|
33
31
|
} },
|
|
@@ -46,6 +46,11 @@ var useTable = function (_a) {
|
|
|
46
46
|
var _d = (0, react_1.useState)([]), columnsSort = _d[0], setColumnsSort = _d[1];
|
|
47
47
|
var _e = (0, react_1.useState)(0), currentPage = _e[0], setCurrentPage = _e[1];
|
|
48
48
|
var _f = (0, react_1.useState)(noOfRowsPerPage !== null && noOfRowsPerPage !== void 0 ? noOfRowsPerPage : defaultPageSize), rowsPerPage = _f[0], setRowsPerPage = _f[1];
|
|
49
|
+
(0, react_1.useEffect)(function () {
|
|
50
|
+
if (noOfRowsPerPage !== undefined) {
|
|
51
|
+
setRowsPerPage(noOfRowsPerPage);
|
|
52
|
+
}
|
|
53
|
+
}, [noOfRowsPerPage]);
|
|
49
54
|
var tableData = (0, react_1.useMemo)(function () { return data; }, [data]);
|
|
50
55
|
var _g = (0, react_1.useState)(tableData), filteredData = _g[0], setFilteredData = _g[1];
|
|
51
56
|
var _h = (0, react_1.useState)(function () {
|
|
@@ -89,7 +94,7 @@ var useTable = function (_a) {
|
|
|
89
94
|
}, []);
|
|
90
95
|
var pages = (0, react_1.useMemo)(function () {
|
|
91
96
|
if (isServerPagination) {
|
|
92
|
-
return Math.ceil(totalRecords / (
|
|
97
|
+
return Math.ceil(totalRecords / (rowsPerPage || 1));
|
|
93
98
|
}
|
|
94
99
|
return isPagination ? Math.ceil(tableData.length / rowsPerPage) : 0;
|
|
95
100
|
}, [
|
|
@@ -98,7 +103,6 @@ var useTable = function (_a) {
|
|
|
98
103
|
tableData.length,
|
|
99
104
|
totalRecords,
|
|
100
105
|
isServerPagination,
|
|
101
|
-
noOfRowsPerPage,
|
|
102
106
|
]);
|
|
103
107
|
var startRow = (0, react_1.useMemo)(function () { return (!isPagination ? 0 : currentPage * rowsPerPage); }, [currentPage, isPagination, rowsPerPage]);
|
|
104
108
|
var endRow = (0, react_1.useMemo)(function () { return (!isPagination ? tableData.length : startRow + rowsPerPage); }, [isPagination, rowsPerPage, startRow, tableData.length]);
|
|
@@ -117,11 +117,32 @@ function Table(_a) {
|
|
|
117
117
|
var _filteredData = (0, react_1.useMemo)(function () {
|
|
118
118
|
return (0, table_1.searchAndSortData)(filteredData, columnsSearch);
|
|
119
119
|
}, [columnsSearch, filteredData]);
|
|
120
|
+
var onPaginationRef = (0, react_1.useRef)(onPagination);
|
|
121
|
+
onPaginationRef.current = onPagination;
|
|
122
|
+
var prevPageRef = (0, react_1.useRef)(currentPage);
|
|
120
123
|
(0, react_1.useEffect)(function () {
|
|
121
|
-
if (
|
|
122
|
-
|
|
124
|
+
if (onPaginationRef.current) {
|
|
125
|
+
var prevPage = prevPageRef.current;
|
|
126
|
+
var direction = void 0;
|
|
127
|
+
if (currentPage === 0) {
|
|
128
|
+
direction = "first";
|
|
129
|
+
}
|
|
130
|
+
else if (currentPage === pages - 1) {
|
|
131
|
+
direction = "last";
|
|
132
|
+
}
|
|
133
|
+
else if (currentPage > prevPage) {
|
|
134
|
+
direction = "next";
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
direction = "prev";
|
|
138
|
+
}
|
|
139
|
+
var record = direction === "next" || direction === "last"
|
|
140
|
+
? (tableData.length > 0 ? tableData[tableData.length - 1] : undefined)
|
|
141
|
+
: (tableData.length > 0 ? tableData[0] : undefined);
|
|
142
|
+
onPaginationRef.current(currentPage + 1, rowsPerPage, record, direction);
|
|
143
|
+
prevPageRef.current = currentPage;
|
|
123
144
|
}
|
|
124
|
-
}, [currentPage,
|
|
145
|
+
}, [currentPage, rowsPerPage, pages]);
|
|
125
146
|
var tablePaginationText = "".concat(startRow + 1, " - ").concat(endRow > tableData.length ? tableData.length : endRow, " of ").concat(isServerPagination ? totalRecords : tableData.length);
|
|
126
147
|
var controlsHeight = 45;
|
|
127
148
|
var estimatedRowHeight = 45;
|
|
@@ -203,13 +224,13 @@ function Table(_a) {
|
|
|
203
224
|
react_1.default.createElement(ActiveFilters_1.default, { columns: columnsList, columnsSearch: columnsSearch, setColumnsSearch: setColumnsSearch }),
|
|
204
225
|
react_1.default.createElement(react_2.Box, { ml: "auto", display: "flex", alignItems: "center", gap: 2 },
|
|
205
226
|
(isPagination || isServerPagination) && !isCompactHeader && (react_1.default.createElement(react_2.Box, { flex: "0 1 280px", minW: 0, overflow: "hidden" },
|
|
206
|
-
react_1.default.createElement(Pagination_1.default, { columns: columns, currentPage: currentPage, setCurrentPage: setCurrentPage, rowsPerPage: rowsPerPage, pages: pages, paginationText: tablePaginationText, handlePageSizeChange: handlePageSizeChange, dataLength: tableData.length, isServerPagination: isServerPagination,
|
|
227
|
+
react_1.default.createElement(Pagination_1.default, { columns: columns, currentPage: currentPage, setCurrentPage: setCurrentPage, rowsPerPage: rowsPerPage, pages: pages, paginationText: tablePaginationText, handlePageSizeChange: handlePageSizeChange, dataLength: tableData.length, isServerPagination: isServerPagination, paginationSelectOptions: paginationSelectOptions, isVisiblity: true }))),
|
|
207
228
|
(isPagination || isServerPagination) && isCompactHeader && tableData.length > 0 && (react_1.default.createElement(react_2.Popover, { placement: "bottom-end" },
|
|
208
229
|
react_1.default.createElement(react_2.PopoverTrigger, null,
|
|
209
230
|
react_1.default.createElement(react_2.IconButton, { "aria-label": "More", size: "sm", variant: "ghost", icon: react_1.default.createElement(lucide_react_1.EllipsisVertical, { size: 18, color: (_w = (_v = theme.colors) === null || _v === void 0 ? void 0 : _v.text) === null || _w === void 0 ? void 0 : _w[500] }) })),
|
|
210
|
-
react_1.default.createElement(react_2.PopoverContent, { maxW: "
|
|
231
|
+
react_1.default.createElement(react_2.PopoverContent, { maxW: "22rem", p: 2, overflow: "hidden" },
|
|
211
232
|
react_1.default.createElement(react_2.PopoverBody, { p: 0 },
|
|
212
|
-
react_1.default.createElement(Pagination_1.default, { columns: columns, currentPage: currentPage, setCurrentPage: setCurrentPage, rowsPerPage: rowsPerPage, pages: pages, paginationText: tablePaginationText, handlePageSizeChange: handlePageSizeChange, dataLength: tableData.length, isServerPagination: isServerPagination,
|
|
233
|
+
react_1.default.createElement(Pagination_1.default, { columns: columns, currentPage: currentPage, setCurrentPage: setCurrentPage, rowsPerPage: rowsPerPage, pages: pages, paginationText: tablePaginationText, handlePageSizeChange: handlePageSizeChange, dataLength: tableData.length, isServerPagination: isServerPagination, paginationSelectOptions: paginationSelectOptions, isVisiblity: true }))))))),
|
|
213
234
|
react_1.default.createElement(react_2.TableContainer, { ref: tableContainerRef, position: "relative", h: isTableLoading ? tableMaxH : undefined, maxH: !isTableLoading ? tableMaxH : undefined, pb: isTableLoading ? 0 : compactScrollbarPadding, overflowY: isCompactRows ? "hidden" : "auto", overflowX: "auto", sx: {
|
|
214
235
|
'&::-webkit-scrollbar': {
|
|
215
236
|
width: '6px',
|
|
@@ -23,7 +23,7 @@ export type TableProps = {
|
|
|
23
23
|
paginationMode?: "client" | "server";
|
|
24
24
|
noOfRowsPerPage?: number;
|
|
25
25
|
totalRecords?: number;
|
|
26
|
-
onPagination?: (page: number, noOfRecords: number) => void;
|
|
26
|
+
onPagination?: (page: number, noOfRecords: number, record: DataObject | undefined, direction: "next" | "prev" | "first" | "last") => void;
|
|
27
27
|
onNoOfRowsPerPageChange?: (noOfRows: number) => void;
|
|
28
28
|
paginationSelectOptions?: (number | string)[];
|
|
29
29
|
tableMaxHeight?: number;
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
declare const darkPalette: {
|
|
2
|
+
primary: {
|
|
3
|
+
50: string;
|
|
4
|
+
100: string;
|
|
5
|
+
200: string;
|
|
6
|
+
300: string;
|
|
7
|
+
400: string;
|
|
8
|
+
500: string;
|
|
9
|
+
600: string;
|
|
10
|
+
700: string;
|
|
11
|
+
800: string;
|
|
12
|
+
900: string;
|
|
13
|
+
opacity: {
|
|
14
|
+
4: string;
|
|
15
|
+
8: string;
|
|
16
|
+
16: string;
|
|
17
|
+
24: string;
|
|
18
|
+
32: string;
|
|
19
|
+
40: string;
|
|
20
|
+
48: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
secondary: {
|
|
24
|
+
50: string;
|
|
25
|
+
100: string;
|
|
26
|
+
200: string;
|
|
27
|
+
300: string;
|
|
28
|
+
400: string;
|
|
29
|
+
500: string;
|
|
30
|
+
600: string;
|
|
31
|
+
700: string;
|
|
32
|
+
800: string;
|
|
33
|
+
900: string;
|
|
34
|
+
opacity: {
|
|
35
|
+
4: string;
|
|
36
|
+
8: string;
|
|
37
|
+
16: string;
|
|
38
|
+
24: string;
|
|
39
|
+
32: string;
|
|
40
|
+
40: string;
|
|
41
|
+
48: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
tertiary: {
|
|
45
|
+
50: string;
|
|
46
|
+
100: string;
|
|
47
|
+
200: string;
|
|
48
|
+
300: string;
|
|
49
|
+
400: string;
|
|
50
|
+
500: string;
|
|
51
|
+
600: string;
|
|
52
|
+
700: string;
|
|
53
|
+
800: string;
|
|
54
|
+
900: string;
|
|
55
|
+
opacity: {
|
|
56
|
+
4: string;
|
|
57
|
+
8: string;
|
|
58
|
+
16: string;
|
|
59
|
+
24: string;
|
|
60
|
+
32: string;
|
|
61
|
+
40: string;
|
|
62
|
+
48: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
transparent: string;
|
|
66
|
+
black: string;
|
|
67
|
+
white: string;
|
|
68
|
+
semantic: {
|
|
69
|
+
success: {
|
|
70
|
+
50: string;
|
|
71
|
+
100: string;
|
|
72
|
+
200: string;
|
|
73
|
+
300: string;
|
|
74
|
+
400: string;
|
|
75
|
+
500: string;
|
|
76
|
+
600: string;
|
|
77
|
+
700: string;
|
|
78
|
+
800: string;
|
|
79
|
+
900: string;
|
|
80
|
+
};
|
|
81
|
+
error: {
|
|
82
|
+
50: string;
|
|
83
|
+
100: string;
|
|
84
|
+
200: string;
|
|
85
|
+
300: string;
|
|
86
|
+
400: string;
|
|
87
|
+
500: string;
|
|
88
|
+
600: string;
|
|
89
|
+
700: string;
|
|
90
|
+
800: string;
|
|
91
|
+
900: string;
|
|
92
|
+
};
|
|
93
|
+
warning: {
|
|
94
|
+
50: string;
|
|
95
|
+
100: string;
|
|
96
|
+
200: string;
|
|
97
|
+
300: string;
|
|
98
|
+
400: string;
|
|
99
|
+
500: string;
|
|
100
|
+
600: string;
|
|
101
|
+
700: string;
|
|
102
|
+
800: string;
|
|
103
|
+
900: string;
|
|
104
|
+
};
|
|
105
|
+
info: {
|
|
106
|
+
50: string;
|
|
107
|
+
100: string;
|
|
108
|
+
200: string;
|
|
109
|
+
300: string;
|
|
110
|
+
400: string;
|
|
111
|
+
500: string;
|
|
112
|
+
600: string;
|
|
113
|
+
700: string;
|
|
114
|
+
800: string;
|
|
115
|
+
900: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
gray: {
|
|
119
|
+
50: string;
|
|
120
|
+
100: string;
|
|
121
|
+
200: string;
|
|
122
|
+
300: string;
|
|
123
|
+
400: string;
|
|
124
|
+
500: string;
|
|
125
|
+
600: string;
|
|
126
|
+
700: string;
|
|
127
|
+
800: string;
|
|
128
|
+
900: string;
|
|
129
|
+
};
|
|
130
|
+
red: {
|
|
131
|
+
50: string;
|
|
132
|
+
100: string;
|
|
133
|
+
200: string;
|
|
134
|
+
300: string;
|
|
135
|
+
400: string;
|
|
136
|
+
500: string;
|
|
137
|
+
600: string;
|
|
138
|
+
700: string;
|
|
139
|
+
800: string;
|
|
140
|
+
900: string;
|
|
141
|
+
};
|
|
142
|
+
orange: {
|
|
143
|
+
50: string;
|
|
144
|
+
100: string;
|
|
145
|
+
200: string;
|
|
146
|
+
300: string;
|
|
147
|
+
400: string;
|
|
148
|
+
500: string;
|
|
149
|
+
600: string;
|
|
150
|
+
700: string;
|
|
151
|
+
800: string;
|
|
152
|
+
900: string;
|
|
153
|
+
};
|
|
154
|
+
yellow: {
|
|
155
|
+
50: string;
|
|
156
|
+
100: string;
|
|
157
|
+
200: string;
|
|
158
|
+
300: string;
|
|
159
|
+
400: string;
|
|
160
|
+
500: string;
|
|
161
|
+
600: string;
|
|
162
|
+
700: string;
|
|
163
|
+
800: string;
|
|
164
|
+
900: string;
|
|
165
|
+
};
|
|
166
|
+
green: {
|
|
167
|
+
50: string;
|
|
168
|
+
100: string;
|
|
169
|
+
200: string;
|
|
170
|
+
300: string;
|
|
171
|
+
400: string;
|
|
172
|
+
500: string;
|
|
173
|
+
600: string;
|
|
174
|
+
700: string;
|
|
175
|
+
800: string;
|
|
176
|
+
900: string;
|
|
177
|
+
};
|
|
178
|
+
teal: {
|
|
179
|
+
50: string;
|
|
180
|
+
100: string;
|
|
181
|
+
200: string;
|
|
182
|
+
300: string;
|
|
183
|
+
400: string;
|
|
184
|
+
500: string;
|
|
185
|
+
600: string;
|
|
186
|
+
700: string;
|
|
187
|
+
800: string;
|
|
188
|
+
900: string;
|
|
189
|
+
};
|
|
190
|
+
blue: {
|
|
191
|
+
50: string;
|
|
192
|
+
100: string;
|
|
193
|
+
200: string;
|
|
194
|
+
300: string;
|
|
195
|
+
400: string;
|
|
196
|
+
500: string;
|
|
197
|
+
600: string;
|
|
198
|
+
700: string;
|
|
199
|
+
800: string;
|
|
200
|
+
900: string;
|
|
201
|
+
};
|
|
202
|
+
cyan: {
|
|
203
|
+
50: string;
|
|
204
|
+
100: string;
|
|
205
|
+
200: string;
|
|
206
|
+
300: string;
|
|
207
|
+
400: string;
|
|
208
|
+
500: string;
|
|
209
|
+
600: string;
|
|
210
|
+
700: string;
|
|
211
|
+
800: string;
|
|
212
|
+
900: string;
|
|
213
|
+
};
|
|
214
|
+
purple: {
|
|
215
|
+
50: string;
|
|
216
|
+
100: string;
|
|
217
|
+
200: string;
|
|
218
|
+
300: string;
|
|
219
|
+
400: string;
|
|
220
|
+
500: string;
|
|
221
|
+
600: string;
|
|
222
|
+
700: string;
|
|
223
|
+
800: string;
|
|
224
|
+
900: string;
|
|
225
|
+
};
|
|
226
|
+
pink: {
|
|
227
|
+
50: string;
|
|
228
|
+
100: string;
|
|
229
|
+
200: string;
|
|
230
|
+
300: string;
|
|
231
|
+
400: string;
|
|
232
|
+
500: string;
|
|
233
|
+
600: string;
|
|
234
|
+
700: string;
|
|
235
|
+
800: string;
|
|
236
|
+
900: string;
|
|
237
|
+
};
|
|
238
|
+
background: {
|
|
239
|
+
50: string;
|
|
240
|
+
100: string;
|
|
241
|
+
200: string;
|
|
242
|
+
300: string;
|
|
243
|
+
400: string;
|
|
244
|
+
500: string;
|
|
245
|
+
600: string;
|
|
246
|
+
700: string;
|
|
247
|
+
800: string;
|
|
248
|
+
900: string;
|
|
249
|
+
};
|
|
250
|
+
backgroundColor: {
|
|
251
|
+
main: string;
|
|
252
|
+
secondary: string;
|
|
253
|
+
tertiary: string;
|
|
254
|
+
quaternary: string;
|
|
255
|
+
light: string;
|
|
256
|
+
medium: string;
|
|
257
|
+
accent: string;
|
|
258
|
+
subtle: string;
|
|
259
|
+
muted: string;
|
|
260
|
+
neutral: string;
|
|
261
|
+
base: string;
|
|
262
|
+
tableHeader: string;
|
|
263
|
+
};
|
|
264
|
+
text: {
|
|
265
|
+
50: string;
|
|
266
|
+
100: string;
|
|
267
|
+
200: string;
|
|
268
|
+
300: string;
|
|
269
|
+
400: string;
|
|
270
|
+
500: string;
|
|
271
|
+
600: string;
|
|
272
|
+
700: string;
|
|
273
|
+
800: string;
|
|
274
|
+
900: string;
|
|
275
|
+
};
|
|
276
|
+
header: {
|
|
277
|
+
50: string;
|
|
278
|
+
100: string;
|
|
279
|
+
200: string;
|
|
280
|
+
300: string;
|
|
281
|
+
400: string;
|
|
282
|
+
500: string;
|
|
283
|
+
600: string;
|
|
284
|
+
700: string;
|
|
285
|
+
800: string;
|
|
286
|
+
900: string;
|
|
287
|
+
};
|
|
288
|
+
placeholder: {
|
|
289
|
+
50: string;
|
|
290
|
+
100: string;
|
|
291
|
+
200: string;
|
|
292
|
+
300: string;
|
|
293
|
+
400: string;
|
|
294
|
+
500: string;
|
|
295
|
+
600: string;
|
|
296
|
+
700: string;
|
|
297
|
+
800: string;
|
|
298
|
+
900: string;
|
|
299
|
+
};
|
|
300
|
+
boxShadow: {
|
|
301
|
+
primary: string;
|
|
302
|
+
error: string;
|
|
303
|
+
default: string;
|
|
304
|
+
};
|
|
305
|
+
sidebar: {
|
|
306
|
+
background: {
|
|
307
|
+
50: string;
|
|
308
|
+
100: string;
|
|
309
|
+
200: string;
|
|
310
|
+
300: string;
|
|
311
|
+
400: string;
|
|
312
|
+
500: string;
|
|
313
|
+
600: string;
|
|
314
|
+
700: string;
|
|
315
|
+
800: string;
|
|
316
|
+
900: string;
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
boxborder: {
|
|
320
|
+
50: string;
|
|
321
|
+
100: string;
|
|
322
|
+
200: string;
|
|
323
|
+
300: string;
|
|
324
|
+
400: string;
|
|
325
|
+
500: string;
|
|
326
|
+
600: string;
|
|
327
|
+
700: string;
|
|
328
|
+
800: string;
|
|
329
|
+
900: string;
|
|
330
|
+
};
|
|
331
|
+
border: {
|
|
332
|
+
50: string;
|
|
333
|
+
100: string;
|
|
334
|
+
200: string;
|
|
335
|
+
300: string;
|
|
336
|
+
400: string;
|
|
337
|
+
500: string;
|
|
338
|
+
600: string;
|
|
339
|
+
700: string;
|
|
340
|
+
800: string;
|
|
341
|
+
900: string;
|
|
342
|
+
};
|
|
343
|
+
table: {
|
|
344
|
+
hover: {
|
|
345
|
+
50: string;
|
|
346
|
+
100: string;
|
|
347
|
+
200: string;
|
|
348
|
+
300: string;
|
|
349
|
+
400: string;
|
|
350
|
+
500: string;
|
|
351
|
+
600: string;
|
|
352
|
+
700: string;
|
|
353
|
+
800: string;
|
|
354
|
+
900: string;
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
disabled: {
|
|
358
|
+
50: string;
|
|
359
|
+
100: string;
|
|
360
|
+
200: string;
|
|
361
|
+
300: string;
|
|
362
|
+
400: string;
|
|
363
|
+
500: string;
|
|
364
|
+
600: string;
|
|
365
|
+
700: string;
|
|
366
|
+
800: string;
|
|
367
|
+
900: string;
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
export default darkPalette;
|