@pdg/react-table 1.0.129 → 1.0.131

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.esm.js CHANGED
@@ -1359,7 +1359,7 @@ var Table = React.forwardRef(function (_a, ref) {
1359
1359
  return { style: style, tableSx: tableSx, pagingStyle: pagingStyle };
1360
1360
  }, [cellPadding, fullHeight, initStyle]), style = _p.style, tableSx = _p.tableSx, pagingStyle = _p.pagingStyle;
1361
1361
  var _q = useMemo(function () {
1362
- var simpleBarStyle = fullHeight
1362
+ var contentContainerStyle = fullHeight
1363
1363
  ? {
1364
1364
  height: (containerHeight || 0) - (finalPagingHeight || 0) - 1,
1365
1365
  flex: 1,
@@ -1371,8 +1371,8 @@ var Table = React.forwardRef(function (_a, ref) {
1371
1371
  }
1372
1372
  : { height: height, minHeight: minHeight, maxHeight: maxHeight, marginBottom: -1 };
1373
1373
  var tableStyle = fullHeight && isNoData ? { flex: 1, height: (containerHeight || 0) - finalPagingHeight - 2 } : undefined;
1374
- return { simpleBarStyle: simpleBarStyle, tableStyle: tableStyle };
1375
- }, [containerHeight, finalPagingHeight, fullHeight, height, isNoData, maxHeight, minHeight]), simpleBarStyle = _q.simpleBarStyle, tableStyle = _q.tableStyle;
1374
+ return { contentContainerStyle: contentContainerStyle, tableStyle: tableStyle };
1375
+ }, [containerHeight, finalPagingHeight, fullHeight, height, isNoData, maxHeight, minHeight]), contentContainerStyle = _q.contentContainerStyle, tableStyle = _q.tableStyle;
1376
1376
  var tableTopHead = useMemo(function () {
1377
1377
  return finalColumns && (React.createElement(TableTopHead, { caption: caption, rows: topHeadRows, columns: finalColumns, items: items, defaultAlign: defaultAlign, onCheckChange: handleHeadCheckChange }));
1378
1378
  }, [caption, defaultAlign, finalColumns, handleHeadCheckChange, items, topHeadRows]);
@@ -1421,12 +1421,17 @@ var Table = React.forwardRef(function (_a, ref) {
1421
1421
  setHeadColumnCommands: TableContextSetHeadColumnCommands,
1422
1422
  } },
1423
1423
  React.createElement(Paper, { ref: fullHeight ? containerHeightDetector : undefined, className: classNames('Table', className, !!stickyHeader && 'sticky-header', !!fullHeight && 'full-height', !!showOddColor && 'odd-color', !!showEvenColor && 'even-color', !!sortable && 'sortable'), variant: 'outlined', style: style, sx: sx },
1424
- React.createElement(SimpleBar, { ref: simpleBarRef, style: simpleBarStyle },
1424
+ fullHeight ? (React.createElement(SimpleBar, { ref: simpleBarRef, style: contentContainerStyle },
1425
1425
  React.createElement(DndContext, { sensors: sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd },
1426
1426
  React.createElement(Table$1, { stickyHeader: stickyHeader, sx: tableSx, style: tableStyle },
1427
1427
  tableTopHead,
1428
1428
  tableBody,
1429
- tableFooter))),
1429
+ tableFooter)))) : (React.createElement(Box, { style: contentContainerStyle },
1430
+ React.createElement(DndContext, { sensors: sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd },
1431
+ React.createElement(Table$1, { stickyHeader: stickyHeader, sx: tableSx, style: tableStyle },
1432
+ tableTopHead,
1433
+ tableBody,
1434
+ tableFooter)))),
1430
1435
  finalColumns && paging && paging.total > 0 && (React.createElement(Stack, { ref: fullHeight ? pagingHeightResizeDetector : undefined, alignItems: pagingAlign, style: pagingStyle },
1431
1436
  React.createElement(TablePagination, { className: pagination === null || pagination === void 0 ? void 0 : pagination.className, style: pagination === null || pagination === void 0 ? void 0 : pagination.style, sx: pagination === null || pagination === void 0 ? void 0 : pagination.sx, paging: paging, align: pagingAlign, onChange: handlePageChange })))))) : null;
1432
1437
  });var getSearchInfo = function (search) {
package/dist/index.js CHANGED
@@ -1359,7 +1359,7 @@ var Table = React.forwardRef(function (_a, ref) {
1359
1359
  return { style: style, tableSx: tableSx, pagingStyle: pagingStyle };
1360
1360
  }, [cellPadding, fullHeight, initStyle]), style = _p.style, tableSx = _p.tableSx, pagingStyle = _p.pagingStyle;
1361
1361
  var _q = React.useMemo(function () {
1362
- var simpleBarStyle = fullHeight
1362
+ var contentContainerStyle = fullHeight
1363
1363
  ? {
1364
1364
  height: (containerHeight || 0) - (finalPagingHeight || 0) - 1,
1365
1365
  flex: 1,
@@ -1371,8 +1371,8 @@ var Table = React.forwardRef(function (_a, ref) {
1371
1371
  }
1372
1372
  : { height: height, minHeight: minHeight, maxHeight: maxHeight, marginBottom: -1 };
1373
1373
  var tableStyle = fullHeight && isNoData ? { flex: 1, height: (containerHeight || 0) - finalPagingHeight - 2 } : undefined;
1374
- return { simpleBarStyle: simpleBarStyle, tableStyle: tableStyle };
1375
- }, [containerHeight, finalPagingHeight, fullHeight, height, isNoData, maxHeight, minHeight]), simpleBarStyle = _q.simpleBarStyle, tableStyle = _q.tableStyle;
1374
+ return { contentContainerStyle: contentContainerStyle, tableStyle: tableStyle };
1375
+ }, [containerHeight, finalPagingHeight, fullHeight, height, isNoData, maxHeight, minHeight]), contentContainerStyle = _q.contentContainerStyle, tableStyle = _q.tableStyle;
1376
1376
  var tableTopHead = React.useMemo(function () {
1377
1377
  return finalColumns && (React.createElement(TableTopHead, { caption: caption, rows: topHeadRows, columns: finalColumns, items: items, defaultAlign: defaultAlign, onCheckChange: handleHeadCheckChange }));
1378
1378
  }, [caption, defaultAlign, finalColumns, handleHeadCheckChange, items, topHeadRows]);
@@ -1421,12 +1421,17 @@ var Table = React.forwardRef(function (_a, ref) {
1421
1421
  setHeadColumnCommands: TableContextSetHeadColumnCommands,
1422
1422
  } },
1423
1423
  React.createElement(material.Paper, { ref: fullHeight ? containerHeightDetector : undefined, className: classNames('Table', className, !!stickyHeader && 'sticky-header', !!fullHeight && 'full-height', !!showOddColor && 'odd-color', !!showEvenColor && 'even-color', !!sortable$1 && 'sortable'), variant: 'outlined', style: style, sx: sx },
1424
- React.createElement(SimpleBar, { ref: simpleBarRef, style: simpleBarStyle },
1424
+ fullHeight ? (React.createElement(SimpleBar, { ref: simpleBarRef, style: contentContainerStyle },
1425
1425
  React.createElement(core.DndContext, { sensors: sensors, collisionDetection: core.closestCenter, onDragEnd: handleDragEnd },
1426
1426
  React.createElement(material.Table, { stickyHeader: stickyHeader, sx: tableSx, style: tableStyle },
1427
1427
  tableTopHead,
1428
1428
  tableBody,
1429
- tableFooter))),
1429
+ tableFooter)))) : (React.createElement(material.Box, { style: contentContainerStyle },
1430
+ React.createElement(core.DndContext, { sensors: sensors, collisionDetection: core.closestCenter, onDragEnd: handleDragEnd },
1431
+ React.createElement(material.Table, { stickyHeader: stickyHeader, sx: tableSx, style: tableStyle },
1432
+ tableTopHead,
1433
+ tableBody,
1434
+ tableFooter)))),
1430
1435
  finalColumns && paging && paging.total > 0 && (React.createElement(material.Stack, { ref: fullHeight ? pagingHeightResizeDetector : undefined, alignItems: pagingAlign, style: pagingStyle },
1431
1436
  React.createElement(TablePagination, { className: pagination === null || pagination === void 0 ? void 0 : pagination.className, style: pagination === null || pagination === void 0 ? void 0 : pagination.style, sx: pagination === null || pagination === void 0 ? void 0 : pagination.sx, paging: paging, align: pagingAlign, onChange: handlePageChange })))))) : null;
1432
1437
  });var getSearchInfo = function (search) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pdg/react-table",
3
3
  "title": "React Table",
4
- "version": "1.0.129",
4
+ "version": "1.0.131",
5
5
  "description": "React Table",
6
6
  "type": "module",
7
7
  "types": "dist/index.d.ts",
@@ -47,8 +47,8 @@
47
47
  "@mui/icons-material": "^7.0.2",
48
48
  "@mui/material": "^7.0.2",
49
49
  "@mui/x-date-pickers": "^7.28.3",
50
- "@pdg/react-component": "^1.0.33",
51
- "@pdg/react-form": "^1.0.148",
50
+ "@pdg/react-component": "^1.0.34",
51
+ "@pdg/react-form": "^1.0.151",
52
52
  "@pdg/react-hook": "^1.0.28",
53
53
  "@pdg/util": "^1.0.23",
54
54
  "@tinymce/tinymce-react": "^6.1.0",