@pdg/react-table 1.0.128 → 1.0.130

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.
@@ -13,8 +13,8 @@ export interface TableItem {
13
13
  * TableProgressiveVisibleInfo
14
14
  * ******************************************************************************************************************/
15
15
  export interface TableProgressiveVisibleInfo {
16
- blockSize: number;
17
16
  rowHeight: number;
17
+ blockSize?: number;
18
18
  delay?: number;
19
19
  }
20
20
  /********************************************************************************************************************
package/dist/index.esm.js CHANGED
@@ -804,7 +804,7 @@ var TableBodyRow = function (_a) {
804
804
  * ******************************************************************************************************************/
805
805
  var renderItems = useMemo(function () {
806
806
  return !progressiveVisible || inView ? (items.map(function (item, idx) { return (React.createElement(TableBodyRow, { key: item.id, id: item.id, index: baseIndex + idx, className: classNames(showOddColor && 'odd-color', showEvenColor && 'even-color', onGetBodyRowClassName ? onGetBodyRowClassName(item, baseIndex + idx) : undefined), style: onGetBodyRowStyle ? onGetBodyRowStyle(item, baseIndex + idx) : undefined, sx: onGetBodyRowSx ? onGetBodyRowSx(item, baseIndex + idx) : undefined, hover: true, onGetColumnClassName: onGetBodyColumnClassName, onGetColumnStyle: onGetBodyColumnStyle, onGetColumnSx: onGetBodyColumnSx, defaultAlign: defaultAlign, defaultEllipsis: defaultEllipsis, sortable: sortable, columns: columns, item: item, onClick: onClick, onCheckChange: onCheckChange })); })) : (React.createElement(TableRow, { ref: canInView ? ref : undefined },
807
- React.createElement(TableCell, { colSpan: columns.length, style: { height: 50 * items.length, border: 'none', textAlign: 'center' } }, canInView && '...')));
807
+ React.createElement(TableCell, { colSpan: columns.length, style: { height: progressiveVisible.rowHeight * items.length, border: 'none' } })));
808
808
  }, [
809
809
  baseIndex,
810
810
  canInView,
@@ -848,7 +848,7 @@ var TableBodyRow = function (_a) {
848
848
  * ******************************************************************************************************************/
849
849
  var renderBlock = useMemo(function () {
850
850
  if (progressiveVisible) {
851
- return (React.createElement(React.Fragment, null, chunkArray(items, 5).map(function (bItems, index) { return (React.createElement(TableSortableBodyBlock, { key: index, items: bItems, baseIndex: index, columns: columns, showOddColor: showOddColor, showEvenColor: showEvenColor, onGetBodyRowStyle: onGetBodyRowStyle, onGetBodyRowSx: onGetBodyRowSx, onGetBodyRowClassName: onGetBodyRowClassName, onGetBodyColumnClassName: onGetBodyColumnClassName, onGetBodyColumnStyle: onGetBodyColumnStyle, onGetBodyColumnSx: onGetBodyColumnSx, defaultAlign: defaultAlign, defaultEllipsis: defaultEllipsis, sortable: sortable, onClick: onClick, onCheckChange: onCheckChange })); })));
851
+ return (React.createElement(React.Fragment, null, chunkArray(items, ifUndefined(progressiveVisible.blockSize, 20)).map(function (bItems, index) { return (React.createElement(TableSortableBodyBlock, { key: index, items: bItems, baseIndex: index, columns: columns, showOddColor: showOddColor, showEvenColor: showEvenColor, onGetBodyRowStyle: onGetBodyRowStyle, onGetBodyRowSx: onGetBodyRowSx, onGetBodyRowClassName: onGetBodyRowClassName, onGetBodyColumnClassName: onGetBodyColumnClassName, onGetBodyColumnStyle: onGetBodyColumnStyle, onGetBodyColumnSx: onGetBodyColumnSx, defaultAlign: defaultAlign, defaultEllipsis: defaultEllipsis, sortable: sortable, onClick: onClick, onCheckChange: onCheckChange })); })));
852
852
  }
853
853
  else {
854
854
  return (React.createElement(TableSortableBodyBlock, { items: items, baseIndex: 0, columns: columns, showOddColor: showOddColor, showEvenColor: showEvenColor, onGetBodyRowStyle: onGetBodyRowStyle, onGetBodyRowSx: onGetBodyRowSx, onGetBodyRowClassName: onGetBodyRowClassName, onGetBodyColumnClassName: onGetBodyColumnClassName, onGetBodyColumnStyle: onGetBodyColumnStyle, onGetBodyColumnSx: onGetBodyColumnSx, defaultAlign: defaultAlign, defaultEllipsis: defaultEllipsis, sortable: sortable, onClick: onClick, onCheckChange: onCheckChange }));
package/dist/index.js CHANGED
@@ -804,7 +804,7 @@ var TableBodyRow = function (_a) {
804
804
  * ******************************************************************************************************************/
805
805
  var renderItems = React.useMemo(function () {
806
806
  return !progressiveVisible || inView ? (items.map(function (item, idx) { return (React.createElement(TableBodyRow, { key: item.id, id: item.id, index: baseIndex + idx, className: classNames(showOddColor && 'odd-color', showEvenColor && 'even-color', onGetBodyRowClassName ? onGetBodyRowClassName(item, baseIndex + idx) : undefined), style: onGetBodyRowStyle ? onGetBodyRowStyle(item, baseIndex + idx) : undefined, sx: onGetBodyRowSx ? onGetBodyRowSx(item, baseIndex + idx) : undefined, hover: true, onGetColumnClassName: onGetBodyColumnClassName, onGetColumnStyle: onGetBodyColumnStyle, onGetColumnSx: onGetBodyColumnSx, defaultAlign: defaultAlign, defaultEllipsis: defaultEllipsis, sortable: sortable, columns: columns, item: item, onClick: onClick, onCheckChange: onCheckChange })); })) : (React.createElement(material.TableRow, { ref: canInView ? ref : undefined },
807
- React.createElement(material.TableCell, { colSpan: columns.length, style: { height: 50 * items.length, border: 'none', textAlign: 'center' } }, canInView && '...')));
807
+ React.createElement(material.TableCell, { colSpan: columns.length, style: { height: progressiveVisible.rowHeight * items.length, border: 'none' } })));
808
808
  }, [
809
809
  baseIndex,
810
810
  canInView,
@@ -848,7 +848,7 @@ var TableBodyRow = function (_a) {
848
848
  * ******************************************************************************************************************/
849
849
  var renderBlock = React.useMemo(function () {
850
850
  if (progressiveVisible) {
851
- return (React.createElement(React.Fragment, null, chunkArray(items, 5).map(function (bItems, index) { return (React.createElement(TableSortableBodyBlock, { key: index, items: bItems, baseIndex: index, columns: columns, showOddColor: showOddColor, showEvenColor: showEvenColor, onGetBodyRowStyle: onGetBodyRowStyle, onGetBodyRowSx: onGetBodyRowSx, onGetBodyRowClassName: onGetBodyRowClassName, onGetBodyColumnClassName: onGetBodyColumnClassName, onGetBodyColumnStyle: onGetBodyColumnStyle, onGetBodyColumnSx: onGetBodyColumnSx, defaultAlign: defaultAlign, defaultEllipsis: defaultEllipsis, sortable: sortable$1, onClick: onClick, onCheckChange: onCheckChange })); })));
851
+ return (React.createElement(React.Fragment, null, chunkArray(items, util.ifUndefined(progressiveVisible.blockSize, 20)).map(function (bItems, index) { return (React.createElement(TableSortableBodyBlock, { key: index, items: bItems, baseIndex: index, columns: columns, showOddColor: showOddColor, showEvenColor: showEvenColor, onGetBodyRowStyle: onGetBodyRowStyle, onGetBodyRowSx: onGetBodyRowSx, onGetBodyRowClassName: onGetBodyRowClassName, onGetBodyColumnClassName: onGetBodyColumnClassName, onGetBodyColumnStyle: onGetBodyColumnStyle, onGetBodyColumnSx: onGetBodyColumnSx, defaultAlign: defaultAlign, defaultEllipsis: defaultEllipsis, sortable: sortable$1, onClick: onClick, onCheckChange: onCheckChange })); })));
852
852
  }
853
853
  else {
854
854
  return (React.createElement(TableSortableBodyBlock, { items: items, baseIndex: 0, columns: columns, showOddColor: showOddColor, showEvenColor: showEvenColor, onGetBodyRowStyle: onGetBodyRowStyle, onGetBodyRowSx: onGetBodyRowSx, onGetBodyRowClassName: onGetBodyRowClassName, onGetBodyColumnClassName: onGetBodyColumnClassName, onGetBodyColumnStyle: onGetBodyColumnStyle, onGetBodyColumnSx: onGetBodyColumnSx, defaultAlign: defaultAlign, defaultEllipsis: defaultEllipsis, sortable: sortable$1, onClick: onClick, onCheckChange: onCheckChange }));
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.128",
4
+ "version": "1.0.130",
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.149",
52
52
  "@pdg/react-hook": "^1.0.28",
53
53
  "@pdg/util": "^1.0.23",
54
54
  "@tinymce/tinymce-react": "^6.1.0",