material-react-table 3.1.0 → 3.2.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.
Files changed (127) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.esm.js +38 -13
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.js +38 -13
  5. package/dist/index.js.map +1 -1
  6. package/locales/ar/index.esm.js +1 -0
  7. package/locales/ar/index.js +1 -0
  8. package/locales/az/index.esm.js +1 -0
  9. package/locales/az/index.js +1 -0
  10. package/locales/bg/index.esm.js +1 -0
  11. package/locales/bg/index.js +1 -0
  12. package/locales/cs/index.esm.js +1 -0
  13. package/locales/cs/index.js +1 -0
  14. package/locales/da/index.esm.js +1 -0
  15. package/locales/da/index.js +1 -0
  16. package/locales/de/index.esm.js +1 -0
  17. package/locales/de/index.js +1 -0
  18. package/locales/el/index.esm.js +1 -0
  19. package/locales/el/index.js +1 -0
  20. package/locales/en/index.esm.js +1 -0
  21. package/locales/en/index.js +1 -0
  22. package/locales/es/index.esm.js +1 -0
  23. package/locales/es/index.js +1 -0
  24. package/locales/et/index.esm.js +1 -0
  25. package/locales/et/index.js +1 -0
  26. package/locales/fa/index.esm.js +1 -0
  27. package/locales/fa/index.js +1 -0
  28. package/locales/fi/index.esm.js +1 -0
  29. package/locales/fi/index.js +1 -0
  30. package/locales/fr/index.esm.js +1 -0
  31. package/locales/fr/index.js +1 -0
  32. package/locales/he/index.esm.js +1 -0
  33. package/locales/he/index.js +1 -0
  34. package/locales/hr/index.esm.js +1 -0
  35. package/locales/hr/index.js +1 -0
  36. package/locales/hu/index.esm.js +1 -0
  37. package/locales/hu/index.js +1 -0
  38. package/locales/hy/index.esm.js +1 -0
  39. package/locales/hy/index.js +1 -0
  40. package/locales/id/index.esm.js +1 -0
  41. package/locales/id/index.js +1 -0
  42. package/locales/it/index.esm.js +1 -0
  43. package/locales/it/index.js +1 -0
  44. package/locales/ja/index.esm.js +1 -0
  45. package/locales/ja/index.js +1 -0
  46. package/locales/ko/index.esm.js +1 -0
  47. package/locales/ko/index.js +1 -0
  48. package/locales/nl/index.esm.js +1 -0
  49. package/locales/nl/index.js +1 -0
  50. package/locales/no/index.esm.js +1 -0
  51. package/locales/no/index.js +1 -0
  52. package/locales/np/index.esm.js +1 -0
  53. package/locales/np/index.js +1 -0
  54. package/locales/pl/index.esm.js +1 -0
  55. package/locales/pl/index.js +1 -0
  56. package/locales/pt/index.esm.js +1 -0
  57. package/locales/pt/index.js +1 -0
  58. package/locales/pt-BR/index.esm.js +1 -0
  59. package/locales/pt-BR/index.js +1 -0
  60. package/locales/ro/index.esm.js +1 -0
  61. package/locales/ro/index.js +1 -0
  62. package/locales/ru/index.esm.js +1 -0
  63. package/locales/ru/index.js +1 -0
  64. package/locales/sk/index.esm.js +1 -0
  65. package/locales/sk/index.js +1 -0
  66. package/locales/sr-Cyrl-RS/index.esm.js +1 -0
  67. package/locales/sr-Cyrl-RS/index.js +1 -0
  68. package/locales/sr-Latn-RS/index.esm.js +1 -0
  69. package/locales/sr-Latn-RS/index.js +1 -0
  70. package/locales/sv/index.esm.js +1 -0
  71. package/locales/sv/index.js +1 -0
  72. package/locales/tr/index.esm.js +1 -0
  73. package/locales/tr/index.js +1 -0
  74. package/locales/uk/index.esm.js +1 -0
  75. package/locales/uk/index.js +1 -0
  76. package/locales/vi/index.esm.js +1 -0
  77. package/locales/vi/index.js +1 -0
  78. package/locales/zh-Hans/index.esm.js +1 -0
  79. package/locales/zh-Hans/index.js +1 -0
  80. package/locales/zh-Hant/index.esm.js +1 -0
  81. package/locales/zh-Hant/index.js +1 -0
  82. package/package.json +1 -1
  83. package/src/components/inputs/MRT_FilterTextField.tsx +18 -4
  84. package/src/components/toolbar/MRT_TablePagination.tsx +5 -3
  85. package/src/components/toolbar/MRT_ToolbarAlertBanner.tsx +2 -2
  86. package/src/hooks/useMRT_Effects.ts +1 -1
  87. package/src/hooks/useMRT_RowVirtualizer.ts +16 -4
  88. package/src/locales/ar.ts +1 -0
  89. package/src/locales/az.ts +1 -0
  90. package/src/locales/bg.ts +1 -0
  91. package/src/locales/cs.ts +1 -0
  92. package/src/locales/da.ts +1 -0
  93. package/src/locales/de.ts +1 -0
  94. package/src/locales/el.ts +1 -0
  95. package/src/locales/en.ts +1 -0
  96. package/src/locales/es.ts +1 -0
  97. package/src/locales/et.ts +1 -0
  98. package/src/locales/fa.ts +1 -0
  99. package/src/locales/fi.ts +1 -0
  100. package/src/locales/fr.ts +1 -0
  101. package/src/locales/he.ts +1 -0
  102. package/src/locales/hr.ts +1 -0
  103. package/src/locales/hu.ts +1 -0
  104. package/src/locales/hy.ts +1 -0
  105. package/src/locales/id.ts +1 -0
  106. package/src/locales/it.ts +1 -0
  107. package/src/locales/ja.ts +1 -0
  108. package/src/locales/ko.ts +1 -0
  109. package/src/locales/nl.ts +1 -0
  110. package/src/locales/no.ts +1 -0
  111. package/src/locales/np.ts +1 -0
  112. package/src/locales/pl.ts +1 -0
  113. package/src/locales/pt-BR.ts +1 -0
  114. package/src/locales/pt.ts +1 -0
  115. package/src/locales/ro.ts +1 -0
  116. package/src/locales/ru.ts +1 -0
  117. package/src/locales/sk.ts +1 -0
  118. package/src/locales/sr-Cyrl-RS.ts +1 -0
  119. package/src/locales/sr-Latn-RS.ts +1 -0
  120. package/src/locales/sv.ts +1 -0
  121. package/src/locales/tr.ts +1 -0
  122. package/src/locales/uk.ts +1 -0
  123. package/src/locales/vi.ts +1 -0
  124. package/src/locales/zh-Hans.ts +1 -0
  125. package/src/locales/zh-Hant.ts +1 -0
  126. package/src/types.ts +2 -0
  127. package/src/utils/virtualization.utils.ts +5 -0
package/dist/index.js CHANGED
@@ -1388,6 +1388,7 @@ const MRT_Default_Icons = {
1388
1388
  };
1389
1389
 
1390
1390
  const MRT_Localization_EN = {
1391
+ language: 'en',
1391
1392
  actions: 'Actions',
1392
1393
  and: 'and',
1393
1394
  cancel: 'Cancel',
@@ -1673,7 +1674,7 @@ const useMRT_Effects = (table) => {
1673
1674
  if (firstVisibleRowIndex >= totalRowCount) {
1674
1675
  table.setPageIndex(Math.ceil(totalRowCount / pageSize) - 1);
1675
1676
  }
1676
- }, [totalRowCount]);
1677
+ }, [totalRowCount, enablePagination, isLoading, showSkeletons]);
1677
1678
  //turn off sort when global filter is looking for ranked results
1678
1679
  const appliedSort = react.useRef(sorting);
1679
1680
  react.useEffect(() => {
@@ -1887,6 +1888,11 @@ const useMRT_TableInstance = (definedTableOptions) => {
1887
1888
 
1888
1889
  const useMaterialReactTable = (tableOptions) => useMRT_TableInstance(useMRT_TableOptions(tableOptions));
1889
1890
 
1891
+ /**
1892
+ * When scroll, the `draggingRow` or `draggingColumn` can be removed from document because of virtualization,
1893
+ * then, the `dragEnd` event on `MRT_TableBodyRowGrabHandle` or `MRT_TableHeadCellGrabHandle` will not fire.
1894
+ * We should keep the `draggingRow` or `draggingColumn` in `getVirtualItems()` to avoid this thing.
1895
+ */
1890
1896
  const extraIndexRangeExtractor = (range, draggingIndex) => {
1891
1897
  const newIndexes = reactVirtual.defaultRangeExtractor(range);
1892
1898
  if (draggingIndex === undefined)
@@ -1962,7 +1968,6 @@ const useMRT_ColumnVirtualizer = (table) => {
1962
1968
  };
1963
1969
 
1964
1970
  const useMRT_RowVirtualizer = (table, rows) => {
1965
- var _a;
1966
1971
  const { getRowModel, getState, options: { enableRowVirtualization, renderDetailPanel, rowVirtualizerInstanceRef, rowVirtualizerOptions, }, refs: { tableContainerRef }, } = table;
1967
1972
  const { density, draggingRow, expanded } = getState();
1968
1973
  if (!enableRowVirtualization)
@@ -1970,7 +1975,14 @@ const useMRT_RowVirtualizer = (table, rows) => {
1970
1975
  const rowVirtualizerProps = parseFromValuesOrFunc(rowVirtualizerOptions, {
1971
1976
  table,
1972
1977
  });
1973
- const rowCount = (_a = rows === null || rows === void 0 ? void 0 : rows.length) !== null && _a !== void 0 ? _a : getRowModel().rows.length;
1978
+ const realRows = rows !== null && rows !== void 0 ? rows : getRowModel().rows;
1979
+ /**
1980
+ * when filtering, should find the correct index in filtered rows
1981
+ */
1982
+ const draggingRowIndex = react.useMemo(() => (draggingRow === null || draggingRow === void 0 ? void 0 : draggingRow.id)
1983
+ ? realRows.findIndex((r) => r.id === (draggingRow === null || draggingRow === void 0 ? void 0 : draggingRow.id))
1984
+ : undefined, [realRows, draggingRow === null || draggingRow === void 0 ? void 0 : draggingRow.id]);
1985
+ const rowCount = realRows.length;
1974
1986
  const normalRowHeight = density === 'compact' ? 37 : density === 'comfortable' ? 58 : 73;
1975
1987
  const rowVirtualizer = reactVirtual.useVirtualizer(Object.assign({ count: renderDetailPanel ? rowCount * 2 : rowCount, estimateSize: (index) => renderDetailPanel && index % 2 === 1
1976
1988
  ? expanded === true
@@ -1980,9 +1992,8 @@ const useMRT_RowVirtualizer = (table, rows) => {
1980
1992
  navigator.userAgent.indexOf('Firefox') === -1
1981
1993
  ? (element) => element === null || element === void 0 ? void 0 : element.getBoundingClientRect().height
1982
1994
  : undefined, overscan: 4, rangeExtractor: react.useCallback((range) => {
1983
- var _a;
1984
- return extraIndexRangeExtractor(range, (_a = draggingRow === null || draggingRow === void 0 ? void 0 : draggingRow.index) !== null && _a !== void 0 ? _a : 0);
1985
- }, [draggingRow]) }, rowVirtualizerProps));
1995
+ return extraIndexRangeExtractor(range, draggingRowIndex);
1996
+ }, [draggingRowIndex]) }, rowVirtualizerProps));
1986
1997
  rowVirtualizer.virtualRows = rowVirtualizer.getVirtualItems();
1987
1998
  if (rowVirtualizerInstanceRef) {
1988
1999
  //@ts-expect-error
@@ -3130,9 +3141,11 @@ const MRT_FilterTextField = (_a) => {
3130
3141
  ? column.getFilterValue() || []
3131
3142
  : isRangeFilter
3132
3143
  ? ((_a = column.getFilterValue()) === null || _a === void 0 ? void 0 : _a[rangeFilterIndex]) || ''
3133
- : ((_b = column.getFilterValue()) !== null && _b !== void 0 ? _b : '');
3144
+ : isAutocompleteFilter
3145
+ ? typeof column.getFilterValue() === 'string' ? column.getFilterValue() : ''
3146
+ : ((_b = column.getFilterValue()) !== null && _b !== void 0 ? _b : '');
3134
3147
  });
3135
- const [autocompleteValue, setAutocompleteValue] = react.useState(isAutocompleteFilter ? filterValue : null);
3148
+ const [autocompleteValue, setAutocompleteValue] = react.useState(() => isAutocompleteFilter ? (column.getFilterValue() || null) : null);
3136
3149
  const handleChangeDebounced = react.useCallback(utils.debounce((newValue) => {
3137
3150
  if (isRangeFilter) {
3138
3151
  column.setFilterValue((old) => {
@@ -3159,9 +3172,12 @@ const MRT_FilterTextField = (_a) => {
3159
3172
  handleChange(newValue);
3160
3173
  (_a = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.onChange) === null || _a === void 0 ? void 0 : _a.call(textFieldProps, event);
3161
3174
  };
3175
+ const handleAutocompleteInputChange = (_event, newValue, _reason) => {
3176
+ handleChange(newValue);
3177
+ };
3162
3178
  const handleAutocompleteChange = (newValue) => {
3163
3179
  setAutocompleteValue(newValue);
3164
- handleChange(getValueAndLabel(newValue).value);
3180
+ handleChangeDebounced(getValueAndLabel(newValue).value);
3165
3181
  };
3166
3182
  const handleClear = () => {
3167
3183
  if (isMultiSelectFilter) {
@@ -3176,6 +3192,13 @@ const MRT_FilterTextField = (_a) => {
3176
3192
  return newFilterValues;
3177
3193
  });
3178
3194
  }
3195
+ else if (isAutocompleteFilter) {
3196
+ setAutocompleteValue(null);
3197
+ setFilterValue('');
3198
+ // when using 'autocomplete' this function is called only inside effect and only if the filterValue === undefined
3199
+ // so the following call is excessive; should be uncommented if the handleClear becomes part of the Autocomplete component callbacks
3200
+ // column.setFilterValue(undefined)
3201
+ }
3179
3202
  else {
3180
3203
  setFilterValue('');
3181
3204
  column.setFilterValue(undefined);
@@ -3266,11 +3289,11 @@ const MRT_FilterTextField = (_a) => {
3266
3289
  } }))) : (filterVariant === null || filterVariant === void 0 ? void 0 : filterVariant.startsWith('date')) ? (jsxRuntime.jsx(DatePicker.DatePicker, Object.assign({}, commonDatePickerProps, datePickerProps, { slotProps: {
3267
3290
  field: Object.assign({ clearable: true, onClear: () => handleClear() }, (_t = datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.slotProps) === null || _t === void 0 ? void 0 : _t.field),
3268
3291
  textField: Object.assign(Object.assign({}, commonTextFieldProps), (_u = datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.slotProps) === null || _u === void 0 ? void 0 : _u.textField),
3269
- } }))) : isAutocompleteFilter ? (jsxRuntime.jsx(Autocomplete__default["default"], Object.assign({ freeSolo: true, getOptionLabel: (option) => getValueAndLabel(option).label, onChange: (_e, newValue) => handleAutocompleteChange(newValue), options: (_v = dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.map((option) => getValueAndLabel(option))) !== null && _v !== void 0 ? _v : [] }, autocompleteProps, { renderInput: (builtinTextFieldProps) => {
3292
+ } }))) : isAutocompleteFilter ? (jsxRuntime.jsx(Autocomplete__default["default"], Object.assign({ freeSolo: true, getOptionLabel: (option) => getValueAndLabel(option).label, onChange: (_e, newValue) => handleAutocompleteChange(newValue), options: (_v = dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.map((option) => getValueAndLabel(option))) !== null && _v !== void 0 ? _v : [], inputValue: filterValue, onInputChange: handleAutocompleteInputChange }, autocompleteProps, { renderInput: (builtinTextFieldProps) => {
3270
3293
  var _a, _b, _c, _d, _f;
3271
3294
  return (jsxRuntime.jsx(TextField__default["default"], Object.assign({}, commonTextFieldProps, builtinTextFieldProps, { slotProps: Object.assign(Object.assign(Object.assign({}, builtinTextFieldProps.slotProps), commonTextFieldProps.slotProps), { input: Object.assign(Object.assign(Object.assign({}, builtinTextFieldProps.InputProps), (_a = builtinTextFieldProps.slotProps) === null || _a === void 0 ? void 0 : _a.input), { startAdornment:
3272
3295
  //@ts-expect-error
3273
- (_c = (_b = commonTextFieldProps === null || commonTextFieldProps === void 0 ? void 0 : commonTextFieldProps.slotProps) === null || _b === void 0 ? void 0 : _b.input) === null || _c === void 0 ? void 0 : _c.startAdornment }), htmlInput: Object.assign(Object.assign(Object.assign({}, builtinTextFieldProps.inputProps), (_d = builtinTextFieldProps.slotProps) === null || _d === void 0 ? void 0 : _d.htmlInput), (_f = commonTextFieldProps === null || commonTextFieldProps === void 0 ? void 0 : commonTextFieldProps.slotProps) === null || _f === void 0 ? void 0 : _f.htmlInput) }), onChange: handleTextFieldChange, onClick: (e) => e.stopPropagation() })));
3296
+ (_c = (_b = commonTextFieldProps === null || commonTextFieldProps === void 0 ? void 0 : commonTextFieldProps.slotProps) === null || _b === void 0 ? void 0 : _b.input) === null || _c === void 0 ? void 0 : _c.startAdornment }), htmlInput: Object.assign(Object.assign(Object.assign({}, builtinTextFieldProps.inputProps), (_d = builtinTextFieldProps.slotProps) === null || _d === void 0 ? void 0 : _d.htmlInput), (_f = commonTextFieldProps === null || commonTextFieldProps === void 0 ? void 0 : commonTextFieldProps.slotProps) === null || _f === void 0 ? void 0 : _f.htmlInput) }), onClick: (e) => e.stopPropagation() })));
3274
3297
  }, value: autocompleteValue }))) : (jsxRuntime.jsx(TextField__default["default"], Object.assign({ select: isSelectFilter || isMultiSelectFilter }, commonTextFieldProps, { slotProps: Object.assign(Object.assign({}, commonTextFieldProps.slotProps), { inputLabel: Object.assign({ shrink: isSelectFilter || isMultiSelectFilter }, (_w = commonTextFieldProps.slotProps) === null || _w === void 0 ? void 0 : _w.inputLabel), select: Object.assign({ MenuProps: { disableScrollLock: true }, displayEmpty: true, multiple: isMultiSelectFilter, renderValue: isMultiSelectFilter
3275
3298
  ? (selected) => !Array.isArray(selected) || (selected === null || selected === void 0 ? void 0 : selected.length) === 0 ? (jsxRuntime.jsx(Box__default["default"], { sx: { opacity: 0.5 }, children: filterPlaceholder })) : (jsxRuntime.jsx(Box__default["default"], { sx: { display: 'flex', flexWrap: 'wrap', gap: '2px' }, children: selected.map((value) => {
3276
3299
  const selectedValue = dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.find((option) => getValueAndLabel(option).value === value);
@@ -3764,7 +3787,7 @@ const MRT_ToolbarAlertBanner = (_a) => {
3764
3787
  const selectedRowCount = react.useMemo(() => manualPagination
3765
3788
  ? Object.values(rowSelection).filter(Boolean).length
3766
3789
  : getFilteredSelectedRowModel().rows.length, [rowSelection, totalRowCount, manualPagination]);
3767
- const selectedAlert = selectedRowCount > 0 ? (jsxRuntime.jsxs(Stack__default["default"], { alignItems: "center", direction: "row", gap: "16px", children: [(_c = (_b = localization.selectedCountOfRowCountRowsSelected) === null || _b === void 0 ? void 0 : _b.replace('{selectedCount}', selectedRowCount.toLocaleString())) === null || _c === void 0 ? void 0 : _c.replace('{rowCount}', totalRowCount.toString()), jsxRuntime.jsx(Button__default["default"], { onClick: (event) => getMRT_SelectAllHandler({ table })(event, false, true), size: "small", sx: { p: '2px' }, children: localization.clearSelection })] })) : null;
3790
+ const selectedAlert = selectedRowCount > 0 ? (jsxRuntime.jsxs(Stack__default["default"], { alignItems: "center", direction: "row", gap: "16px", children: [(_c = (_b = localization.selectedCountOfRowCountRowsSelected) === null || _b === void 0 ? void 0 : _b.replace('{selectedCount}', selectedRowCount.toLocaleString(localization.language))) === null || _c === void 0 ? void 0 : _c.replace('{rowCount}', totalRowCount.toLocaleString(localization.language)), jsxRuntime.jsx(Button__default["default"], { onClick: (event) => getMRT_SelectAllHandler({ table })(event, false, true), size: "small", sx: { p: '2px' }, children: localization.clearSelection })] })) : null;
3768
3791
  const groupedAlert = grouping.length > 0 ? (jsxRuntime.jsxs("span", { children: [localization.groupedBy, ' ', grouping.map((columnId, index) => (jsxRuntime.jsxs(react.Fragment, { children: [index > 0 ? localization.thenBy : '', jsxRuntime.jsx(Chip__default["default"], Object.assign({ label: table.getColumn(columnId).columnDef.header, onDelete: () => table.getColumn(columnId).toggleGrouping() }, chipProps))] }, `${index}-${columnId}`)))] })) : null;
3769
3792
  return (jsxRuntime.jsx(Collapse__default["default"], { in: showAlertBanner || !!selectedAlert || !!groupedAlert, timeout: stackAlertBanner ? 200 : 0, children: jsxRuntime.jsx(Alert__default["default"], Object.assign({ color: "info", icon: false }, alertProps, { sx: (theme) => {
3770
3793
  var _a, _b;
@@ -4049,7 +4072,9 @@ const MRT_TablePagination = (_a) => {
4049
4072
  last: LastPageIcon,
4050
4073
  next: ChevronRightIcon,
4051
4074
  previous: ChevronLeftIcon,
4052
- } }, item))), showFirstButton: showFirstButton, showLastButton: showLastButton }, restPaginationProps))) : paginationDisplayMode === 'default' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography__default["default"], { align: "center", component: "span", sx: { m: '0 4px', minWidth: '8ch' }, variant: "body2", children: `${lastRowIndex === 0 ? 0 : (firstRowIndex + 1).toLocaleString()}-${lastRowIndex.toLocaleString()} ${localization.of} ${totalRowCount.toLocaleString()}` }), jsxRuntime.jsxs(Box__default["default"], { gap: "xs", children: [showFirstButton && (jsxRuntime.jsx(Tooltip__default["default"], Object.assign({}, tooltipProps, { title: localization.goToFirstPage, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToFirstPage, disabled: disableBack, onClick: () => table.firstPage(), size: "small", children: jsxRuntime.jsx(FirstPageIcon, Object.assign({}, flipIconStyles(theme))) }) }) }))), jsxRuntime.jsx(Tooltip__default["default"], Object.assign({}, tooltipProps, { title: localization.goToPreviousPage, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToPreviousPage, disabled: disableBack, onClick: () => table.previousPage(), size: "small", children: jsxRuntime.jsx(ChevronLeftIcon, Object.assign({}, flipIconStyles(theme))) }) }) })), jsxRuntime.jsx(Tooltip__default["default"], Object.assign({}, tooltipProps, { title: localization.goToNextPage, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToNextPage, disabled: disableNext, onClick: () => table.nextPage(), size: "small", children: jsxRuntime.jsx(ChevronRightIcon, Object.assign({}, flipIconStyles(theme))) }) }) })), showLastButton && (jsxRuntime.jsx(Tooltip__default["default"], Object.assign({}, tooltipProps, { title: localization.goToLastPage, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToLastPage, disabled: disableNext, onClick: () => table.lastPage(), size: "small", children: jsxRuntime.jsx(LastPageIcon, Object.assign({}, flipIconStyles(theme))) }) }) })))] })] })) : null] }));
4075
+ } }, item))), showFirstButton: showFirstButton, showLastButton: showLastButton }, restPaginationProps))) : paginationDisplayMode === 'default' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography__default["default"], { align: "center", component: "span", sx: { m: '0 4px', minWidth: '8ch' }, variant: "body2", children: `${lastRowIndex === 0
4076
+ ? 0
4077
+ : (firstRowIndex + 1).toLocaleString(localization.language)}-${lastRowIndex.toLocaleString(localization.language)} ${localization.of} ${totalRowCount.toLocaleString(localization.language)}` }), jsxRuntime.jsxs(Box__default["default"], { gap: "xs", children: [showFirstButton && (jsxRuntime.jsx(Tooltip__default["default"], Object.assign({}, tooltipProps, { title: localization.goToFirstPage, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToFirstPage, disabled: disableBack, onClick: () => table.firstPage(), size: "small", children: jsxRuntime.jsx(FirstPageIcon, Object.assign({}, flipIconStyles(theme))) }) }) }))), jsxRuntime.jsx(Tooltip__default["default"], Object.assign({}, tooltipProps, { title: localization.goToPreviousPage, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToPreviousPage, disabled: disableBack, onClick: () => table.previousPage(), size: "small", children: jsxRuntime.jsx(ChevronLeftIcon, Object.assign({}, flipIconStyles(theme))) }) }) })), jsxRuntime.jsx(Tooltip__default["default"], Object.assign({}, tooltipProps, { title: localization.goToNextPage, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToNextPage, disabled: disableNext, onClick: () => table.nextPage(), size: "small", children: jsxRuntime.jsx(ChevronRightIcon, Object.assign({}, flipIconStyles(theme))) }) }) })), showLastButton && (jsxRuntime.jsx(Tooltip__default["default"], Object.assign({}, tooltipProps, { title: localization.goToLastPage, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToLastPage, disabled: disableNext, onClick: () => table.lastPage(), size: "small", children: jsxRuntime.jsx(LastPageIcon, Object.assign({}, flipIconStyles(theme))) }) }) })))] })] })) : null] }));
4053
4078
  };
4054
4079
 
4055
4080
  const MRT_ToolbarDropZone = (_a) => {