material-react-table 2.0.2 → 2.0.4
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 +15 -3
- package/dist/index.esm.js +9 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/locales/am/index.d.ts +3 -0
- package/locales/am/index.esm.d.ts +3 -0
- package/locales/am/index.esm.js +93 -0
- package/locales/am/index.js +97 -0
- package/locales/am/package.json +6 -0
- package/locales/ar/index.esm.js +3 -3
- package/locales/ar/index.js +3 -3
- package/locales/zh-Hans/index.esm.js +2 -2
- package/locales/zh-Hans/index.js +2 -2
- package/package.json +19 -19
- package/src/buttons/MRT_GrabHandleButton.tsx +1 -0
- package/src/locales/am.ts +94 -0
- package/src/locales/ar.ts +3 -3
- package/src/locales/zh-Hans.ts +2 -2
- package/src/toolbar/MRT_TablePagination.tsx +21 -7
- package/src/types.ts +5 -2
    
        package/dist/index.js
    CHANGED
    
    | @@ -552,11 +552,11 @@ const MRT_TableBodyCellValue = ({ cell, table, }) => { | |
| 552 552 | 
             
            };
         | 
| 553 553 |  | 
| 554 554 | 
             
            const MRT_GrabHandleButton = (_a) => {
         | 
| 555 | 
            -
                var _b;
         | 
| 555 | 
            +
                var _b, _c;
         | 
| 556 556 | 
             
                var { iconButtonProps, location, onDragEnd, onDragStart, table } = _a, rest = __rest(_a, ["iconButtonProps", "location", "onDragEnd", "onDragStart", "table"]);
         | 
| 557 557 | 
             
                const { options: { icons: { DragHandleIcon }, localization, }, } = table;
         | 
| 558 558 | 
             
                const _iconButtonProps = Object.assign(Object.assign({}, iconButtonProps), rest);
         | 
| 559 | 
            -
                return (jsxRuntime.jsx(Tooltip__default["default"], { enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_b = _iconButtonProps === null || _iconButtonProps === void 0 ? void 0 : _iconButtonProps.title) !== null && _b !== void 0 ? _b : localization.move, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ disableRipple: true, draggable: "true", size: "small" }, _iconButtonProps, { onClick: (e) => {
         | 
| 559 | 
            +
                return (jsxRuntime.jsx(Tooltip__default["default"], { enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_b = _iconButtonProps === null || _iconButtonProps === void 0 ? void 0 : _iconButtonProps.title) !== null && _b !== void 0 ? _b : localization.move, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": (_c = _iconButtonProps.title) !== null && _c !== void 0 ? _c : localization.move, disableRipple: true, draggable: "true", size: "small" }, _iconButtonProps, { onClick: (e) => {
         | 
| 560 560 | 
             
                            var _a;
         | 
| 561 561 | 
             
                            e.stopPropagation();
         | 
| 562 562 | 
             
                            (_a = _iconButtonProps === null || _iconButtonProps === void 0 ? void 0 : _iconButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(_iconButtonProps, e);
         | 
| @@ -2243,7 +2243,7 @@ const MRT_TablePagination = (_a) => { | |
| 2243 2243 | 
             
                const showFirstLastPageButtons = numberOfPages > 2;
         | 
| 2244 2244 | 
             
                const firstRowIndex = pageIndex * pageSize;
         | 
| 2245 2245 | 
             
                const lastRowIndex = Math.min(pageIndex * pageSize + pageSize, totalRowCount);
         | 
| 2246 | 
            -
                const _b = paginationProps !== null && paginationProps !== void 0 ? paginationProps : {}, { rowsPerPageOptions = defaultRowsPerPage, showFirstButton = showFirstLastPageButtons, showLastButton = showFirstLastPageButtons, showRowsPerPage = true } = _b, _rest = __rest(_b, ["rowsPerPageOptions", "showFirstButton", "showLastButton", "showRowsPerPage"]);
         | 
| 2246 | 
            +
                const _b = paginationProps !== null && paginationProps !== void 0 ? paginationProps : {}, { SelectProps, rowsPerPageOptions = defaultRowsPerPage, showFirstButton = showFirstLastPageButtons, showLastButton = showFirstLastPageButtons, showRowsPerPage = true } = _b, _rest = __rest(_b, ["SelectProps", "rowsPerPageOptions", "showFirstButton", "showLastButton", "showRowsPerPage"]);
         | 
| 2247 2247 | 
             
                return (jsxRuntime.jsxs(Box__default["default"], { sx: {
         | 
| 2248 2248 | 
             
                        alignItems: 'center',
         | 
| 2249 2249 | 
             
                        display: 'flex',
         | 
| @@ -2260,7 +2260,12 @@ const MRT_TablePagination = (_a) => { | |
| 2260 2260 | 
             
                        px: '8px',
         | 
| 2261 2261 | 
             
                        py: '12px',
         | 
| 2262 2262 | 
             
                        zIndex: 2,
         | 
| 2263 | 
            -
                    }, children: [showRowsPerPage && (jsxRuntime.jsxs(Box__default["default"], { sx: { alignItems: 'center', display: 'flex', gap: '8px' }, children: [jsxRuntime.jsx(InputLabel__default["default"], { htmlFor: "mrt-rows-per-page", sx: { mb: 0 }, children: localization.rowsPerPage }), jsxRuntime.jsx(Select__default["default"], { disableUnderline: true, id: "mrt-rows-per-page", inputProps: { 'aria-label': localization.rowsPerPage }, label: localization.rowsPerPage, onChange: (event) => setPageSize(+event.target.value), sx: { mb: 0 }, value: pageSize, variant: "standard",  | 
| 2263 | 
            +
                    }, children: [showRowsPerPage && (jsxRuntime.jsxs(Box__default["default"], { sx: { alignItems: 'center', display: 'flex', gap: '8px' }, children: [jsxRuntime.jsx(InputLabel__default["default"], { htmlFor: "mrt-rows-per-page", sx: { mb: 0 }, children: localization.rowsPerPage }), jsxRuntime.jsx(Select__default["default"], Object.assign({ disableUnderline: true, id: "mrt-rows-per-page", inputProps: { 'aria-label': localization.rowsPerPage }, label: localization.rowsPerPage, onChange: (event) => setPageSize(+event.target.value), sx: { mb: 0 }, value: pageSize, variant: "standard" }, SelectProps, { children: rowsPerPageOptions.map((option) => {
         | 
| 2264 | 
            +
                                        var _a;
         | 
| 2265 | 
            +
                                        const value = typeof option !== 'number' ? option.value : option;
         | 
| 2266 | 
            +
                                        const label = typeof option !== 'number' ? option.label : `${option}`;
         | 
| 2267 | 
            +
                                        return ((_a = SelectProps === null || SelectProps === void 0 ? void 0 : SelectProps.children) !== null && _a !== void 0 ? _a : ((SelectProps === null || SelectProps === void 0 ? void 0 : SelectProps.native) ? (jsxRuntime.jsx("option", { value: value, children: label }, value)) : (jsxRuntime.jsx(MenuItem__default["default"], { sx: { m: 0 }, value: value, children: label }, value))));
         | 
| 2268 | 
            +
                                    }) }))] })), paginationDisplayMode === 'pages' ? (jsxRuntime.jsx(Pagination__default["default"], Object.assign({ count: numberOfPages, onChange: (_e, newPageIndex) => setPageIndex(newPageIndex - 1), page: pageIndex + 1, renderItem: (item) => (jsxRuntime.jsx(PaginationItem__default["default"], Object.assign({ slots: {
         | 
| 2264 2269 | 
             
                                    first: FirstPageIcon,
         | 
| 2265 2270 | 
             
                                    last: LastPageIcon,
         | 
| 2266 2271 | 
             
                                    next: ChevronRightIcon,
         |