@pdg/react-table 1.0.126 → 1.0.128

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
@@ -1,4 +1,4 @@
1
- import React,{createContext,useContext,useMemo,useCallback,useState,useEffect,useRef,useLayoutEffect,useId}from'react';import classNames from'classnames';import {styled,TableRow,lighten,TableCell,Box,Tooltip,Checkbox,Stack,Pagination,useTheme,TableHead,TableBody,Icon,TableFooter,Paper,Table as Table$1,Grid,Popper,Grow,ClickAwayListener,IconButton}from'@mui/material';import {useResizeDetector}from'react-resize-detector';import {useSortable,sortableKeyboardCoordinates,arrayMove,SortableContext,verticalListSortingStrategy}from'@dnd-kit/sortable';import dayjs from'dayjs';import {personalNoAutoDash,companyNoAutoDash,telNoAutoDash,numberFormat,notEmpty,equal,empty}from'@pdg/util';import {useAutoUpdateLayoutState}from'@pdg/react-hook';import {useSensors,useSensor,MouseSensor,TouchSensor,KeyboardSensor,DndContext,closestCenter}from'@dnd-kit/core';import SimpleBar from'simplebar-react';import'simplebar-react/dist/simplebar.min.css';import {v4}from'uuid';import {Search,SearchGroup,FormHidden}from'@pdg/react-form';import {PdgButton,PdgIcon,PdgCopyToClipboard}from'@pdg/react-component';function styleInject(css, ref) {
1
+ import React,{createContext,useContext,useMemo,useCallback,useState,useEffect,useRef,useLayoutEffect,useId}from'react';import classNames from'classnames';import {styled,TableRow,lighten,TableCell,Stack,Pagination,Checkbox,useTheme,TableHead,Box,Tooltip,TableBody,Icon,TableFooter,Paper,Table as Table$1,Grid,Popper,Grow,ClickAwayListener,IconButton}from'@mui/material';import {useResizeDetector}from'react-resize-detector';import {useAutoUpdateLayoutState}from'@pdg/react-hook';import {useSensors,useSensor,MouseSensor,TouchSensor,KeyboardSensor,DndContext,closestCenter}from'@dnd-kit/core';import {useSortable,SortableContext,verticalListSortingStrategy,sortableKeyboardCoordinates,arrayMove}from'@dnd-kit/sortable';import SimpleBar from'simplebar-react';import'simplebar-react/dist/simplebar.min.css';import {v4}from'uuid';import dayjs from'dayjs';import {personalNoAutoDash,companyNoAutoDash,telNoAutoDash,numberFormat,ifUndefined,notEmpty,equal,empty}from'@pdg/util';import {useInView}from'react-intersection-observer';import {Search,SearchGroup,FormHidden}from'@pdg/react-form';import {PdgButton,PdgIcon,PdgCopyToClipboard}from'@pdg/react-component';function styleInject(css, ref) {
2
2
  if ( ref === void 0 ) ref = {};
3
3
  var insertAt = ref.insertAt;
4
4
 
@@ -83,57 +83,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
83
83
  });
84
84
  });
85
85
  var StyledNoDataDiv = styled('div')(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n text-align: center;\n padding: 30px 0;\n font-weight: 500;\n font-size: 13px;\n color: #94a0b2;\n opacity: 0.8;\n\n .material-icons {\n font-size: 40px;\n margin-bottom: 5px;\n }\n"], ["\n text-align: center;\n padding: 30px 0;\n font-weight: 500;\n font-size: 13px;\n color: #94a0b2;\n opacity: 0.8;\n\n .material-icons {\n font-size: 40px;\n margin-bottom: 5px;\n }\n"])));
86
- var templateObject_1$4;const CSS = /*#__PURE__*/Object.freeze({
87
- Translate: {
88
- toString(transform) {
89
- if (!transform) {
90
- return;
91
- }
92
-
93
- const {
94
- x,
95
- y
96
- } = transform;
97
- return "translate3d(" + (x ? Math.round(x) : 0) + "px, " + (y ? Math.round(y) : 0) + "px, 0)";
98
- }
99
-
100
- },
101
- Scale: {
102
- toString(transform) {
103
- if (!transform) {
104
- return;
105
- }
106
-
107
- const {
108
- scaleX,
109
- scaleY
110
- } = transform;
111
- return "scaleX(" + scaleX + ") scaleY(" + scaleY + ")";
112
- }
113
-
114
- },
115
- Transform: {
116
- toString(transform) {
117
- if (!transform) {
118
- return;
119
- }
120
-
121
- return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(' ');
122
- }
123
-
124
- },
125
- Transition: {
126
- toString(_ref) {
127
- let {
128
- property,
129
- duration,
130
- easing
131
- } = _ref;
132
- return property + " " + duration + "ms " + easing;
133
- }
134
-
135
- }
136
- });function getTableColumnAlign(column, defaultAlign) {
86
+ var templateObject_1$4;function getTableColumnAlign(column, defaultAlign) {
137
87
  switch (column.type) {
138
88
  case 'number':
139
89
  return column.align ? column.align : 'right';
@@ -183,7 +133,7 @@ function typographyColorToSxColor(color) {
183
133
  }
184
134
  return value;
185
135
  }var StyledTableCell = styled(TableCell)(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n &.ellipsis {\n position: relative;\n max-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n"], ["\n &.ellipsis {\n position: relative;\n max-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n"])));
186
- var TableCommonCell = function (_a) {
136
+ var TableCommonCell = React.forwardRef(function (_a, ref) {
187
137
  /********************************************************************************************************************
188
138
  * Use
189
139
  * ******************************************************************************************************************/
@@ -337,10 +287,278 @@ var TableCommonCell = function (_a) {
337
287
  /********************************************************************************************************************
338
288
  * Render
339
289
  * ******************************************************************************************************************/
340
- return (React.createElement(StyledTableCell, { align: align, className: classNames(className, 'TableCommonCell', ellipsis && 'ellipsis', column.type ? "column-type-".concat(column.type) : false), style: style, sx: sx, onClick: type === 'body' ? handleClick : undefined }, children));
290
+ return (React.createElement(StyledTableCell, { ref: ref, align: align, className: classNames(className, 'TableCommonCell', ellipsis && 'ellipsis', column.type ? "column-type-".concat(column.type) : false), style: style, sx: sx, onClick: type === 'body' ? handleClick : undefined }, children));
291
+ });
292
+ var templateObject_1$3;var TableFooterCell = function (_a) {
293
+ /********************************************************************************************************************
294
+ * Memo
295
+ * ******************************************************************************************************************/
296
+ var column = _a.column, items = _a.items, defaultAlign = _a.defaultAlign;
297
+ var data = useMemo(function () {
298
+ var _a, _b, _c;
299
+ if ((_a = column.footer) === null || _a === void 0 ? void 0 : _a.onRender) {
300
+ return (_b = column.footer) === null || _b === void 0 ? void 0 : _b.onRender(items);
301
+ }
302
+ else {
303
+ return (_c = column.footer) === null || _c === void 0 ? void 0 : _c.value;
304
+ }
305
+ }, [column.footer, items]);
306
+ /********************************************************************************************************************
307
+ * Render
308
+ * ******************************************************************************************************************/
309
+ return (React.createElement(TableCommonCell, { type: 'head', className: 'TableFooterCell', column: column, defaultAlign: defaultAlign }, data));
310
+ };var TablePagination = function (_a) {
311
+ var className = _a.className, style = _a.style, sx = _a.sx, paging = _a.paging, align = _a.align, onChange = _a.onChange;
312
+ return (React.createElement(Stack, { alignItems: align },
313
+ React.createElement(Pagination, { count: paging.last_page, page: paging.current_page, color: 'primary', className: classNames('TablePagination', className), style: style, sx: sx, onChange: function (e, page) {
314
+ if (onChange)
315
+ onChange(page);
316
+ } })));
317
+ };var TableContextProvider = function (_a) {
318
+ var children = _a.children, value = _a.value;
319
+ return React.createElement(TableContext.Provider, { value: value }, children);
320
+ };var TableTopHeadCaptionRow = styled(TableRow)(function (_a) {
321
+ var theme = _a.theme;
322
+ return ({
323
+ '> th': {
324
+ backgroundColor: theme.palette.grey.A100,
325
+ textAlign: 'center',
326
+ fontWeight: 700,
327
+ },
328
+ });
329
+ });var TableHeadCell = function (_a) {
330
+ /********************************************************************************************************************
331
+ * Use
332
+ * ******************************************************************************************************************/
333
+ var column = _a.column, items = _a.items, defaultAlign = _a.defaultAlign, top = _a.top, onCheckChange = _a.onCheckChange;
334
+ var _b = useTableState(), setHeadColumnChecked = _b.setHeadColumnChecked, setHeadColumnCommands = _b.setHeadColumnCommands;
335
+ /********************************************************************************************************************
336
+ * State
337
+ * ******************************************************************************************************************/
338
+ var _c = useState(false), checked = _c[0], setChecked = _c[1];
339
+ var _d = useState(false), checkDisabled = _d[0], setCheckDisabled = _d[1];
340
+ /********************************************************************************************************************
341
+ * Effect
342
+ * ******************************************************************************************************************/
343
+ useEffect(function () {
344
+ if (column.type === 'check') {
345
+ setHeadColumnChecked(column, checked);
346
+ }
347
+ }, [column, checked, setHeadColumnChecked]);
348
+ useEffect(function () {
349
+ setHeadColumnCommands(column, {
350
+ setChecked: function (checked) {
351
+ if (column.type === 'check') {
352
+ setChecked(checked);
353
+ }
354
+ },
355
+ setCheckDisabled: function (checkDisabled) {
356
+ if (column.type === 'check') {
357
+ setCheckDisabled(checkDisabled);
358
+ }
359
+ },
360
+ });
361
+ }, [setHeadColumnCommands, column]);
362
+ /********************************************************************************************************************
363
+ * Memo
364
+ * ******************************************************************************************************************/
365
+ var data = useMemo(function () {
366
+ var _a, _b, _c, _d;
367
+ if (column.type === 'check') {
368
+ if (column.hideAllCheck) {
369
+ if ((_a = column.head) === null || _a === void 0 ? void 0 : _a.onRender) {
370
+ return (_b = column.head) === null || _b === void 0 ? void 0 : _b.onRender(items);
371
+ }
372
+ else {
373
+ if (typeof column.label === 'string') {
374
+ return React.createElement("div", { dangerouslySetInnerHTML: { __html: column.label } });
375
+ }
376
+ else {
377
+ return column.label;
378
+ }
379
+ }
380
+ }
381
+ else {
382
+ return (React.createElement(Checkbox, { checked: checked, disabled: checkDisabled, onChange: function (e, newChecked) {
383
+ setChecked(newChecked);
384
+ onCheckChange && onCheckChange(column, newChecked);
385
+ } }));
386
+ }
387
+ }
388
+ else {
389
+ if ((_c = column.head) === null || _c === void 0 ? void 0 : _c.onRender) {
390
+ return (_d = column.head) === null || _d === void 0 ? void 0 : _d.onRender(items);
391
+ }
392
+ else {
393
+ if (typeof column.label === 'string') {
394
+ return React.createElement("div", { dangerouslySetInnerHTML: { __html: column.label } });
395
+ }
396
+ else {
397
+ return column.label;
398
+ }
399
+ }
400
+ }
401
+ }, [checkDisabled, checked, column, items, onCheckChange]);
402
+ /********************************************************************************************************************
403
+ * Render
404
+ * ******************************************************************************************************************/
405
+ return (React.createElement(TableCommonCell, { type: 'head', className: 'TableHeadCell', style: top !== undefined ? { top: top } : undefined, column: column, defaultAlign: defaultAlign }, data));
406
+ };var BottomLine = styled('div')(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n height: 1px;\n position: absolute;\n left: 3px;\n right: 3px;\n bottom: 0;\n"], ["\n height: 1px;\n position: absolute;\n left: 3px;\n right: 3px;\n bottom: 0;\n"])));
407
+ var TableTopHead = function (_a) {
408
+ /********************************************************************************************************************
409
+ * Use
410
+ * ******************************************************************************************************************/
411
+ var columns = _a.columns, items = _a.items, rows = _a.rows, caption = _a.caption, defaultAlign = _a.defaultAlign, onCheckChange = _a.onCheckChange;
412
+ var theme = useTheme();
413
+ /********************************************************************************************************************
414
+ * Ref
415
+ * ******************************************************************************************************************/
416
+ var captionRef = useRef(null);
417
+ var row1Ref = useRef(null);
418
+ var row2Ref = useRef(null);
419
+ var row3Ref = useRef(null);
420
+ /********************************************************************************************************************
421
+ * ResizeDetector
422
+ * ******************************************************************************************************************/
423
+ var captionHeight = useResizeDetector({
424
+ targetRef: captionRef,
425
+ handleWidth: false,
426
+ handleHeight: true,
427
+ }).height;
428
+ var row1Height = useResizeDetector({ targetRef: row1Ref, handleWidth: false, handleHeight: true }).height;
429
+ var row2Height = useResizeDetector({ targetRef: row2Ref, handleWidth: false, handleHeight: true }).height;
430
+ var row3Height = useResizeDetector({ targetRef: row3Ref, handleWidth: false, handleHeight: true }).height;
431
+ /********************************************************************************************************************
432
+ * Function
433
+ * ******************************************************************************************************************/
434
+ var makeRowCells = useCallback(function (row, top) {
435
+ var totalColumns = 0;
436
+ var cells = row
437
+ .map(function (info, idx) {
438
+ if (info) {
439
+ totalColumns += info.colSpan || 1;
440
+ return (React.createElement(TableCell, { key: idx, colSpan: info.colSpan, align: info.align, style: {
441
+ top: top,
442
+ borderBottom: 0,
443
+ } },
444
+ info.label,
445
+ info.label != null && React.createElement(BottomLine, { style: { backgroundColor: theme.palette.divider } })));
446
+ }
447
+ })
448
+ .filter(function (cell) { return !!cell; });
449
+ if (totalColumns < columns.length) {
450
+ cells.push(React.createElement(TableCell, { key: columns.length, colSpan: columns.length - cells.length, style: { top: top, borderBottom: 0 } }));
451
+ }
452
+ return cells;
453
+ }, [columns, theme.palette.divider]);
454
+ var columnRow = useMemo(function () {
455
+ var top = (captionHeight || 0) + (row1Height || 0) + (row2Height || 0) + (row3Height || 0);
456
+ return (React.createElement(TableRow, null, columns.map(function (column, idx) { return (React.createElement(TableHeadCell, { key: idx, column: column, items: items, defaultAlign: defaultAlign, top: top, onCheckChange: onCheckChange })); })));
457
+ }, [captionHeight, columns, defaultAlign, items, onCheckChange, row1Height, row2Height, row3Height]);
458
+ /********************************************************************************************************************
459
+ * Variable
460
+ * ******************************************************************************************************************/
461
+ var captionRow = !!caption && (React.createElement(TableTopHeadCaptionRow, { ref: captionRef, className: 'TableTopHeadCaptionRow' },
462
+ React.createElement(TableCell, { colSpan: columns.length }, caption)));
463
+ /********************************************************************************************************************
464
+ * Render
465
+ * ******************************************************************************************************************/
466
+ if (rows) {
467
+ if (Array.isArray(rows[0])) {
468
+ return (React.createElement(TableHead, { className: 'TableHead' },
469
+ captionRow,
470
+ rows.map(function (row, idx) {
471
+ var ref = undefined;
472
+ var top = undefined;
473
+ switch (idx) {
474
+ case 0:
475
+ ref = row1Ref;
476
+ top = captionHeight;
477
+ break;
478
+ case 1:
479
+ ref = row2Ref;
480
+ top = (captionHeight || 0) + (row1Height || 0);
481
+ break;
482
+ case 2:
483
+ ref = row3Ref;
484
+ top = (captionHeight || 0) + (row1Height || 0) + (row2Height || 0);
485
+ break;
486
+ case 3:
487
+ top = (captionHeight || 0) + (row1Height || 0) + (row2Height || 0) + (row3Height || 0);
488
+ }
489
+ return (React.createElement(TableRow, { key: idx, ref: ref, className: 'TableHeadRow' }, makeRowCells(row, top)));
490
+ })));
491
+ }
492
+ else {
493
+ return (React.createElement(TableHead, { className: 'TableHead' },
494
+ captionRow,
495
+ React.createElement(TableRow, { ref: row1Ref, className: 'TableHeadRow' }, makeRowCells(rows, captionHeight)),
496
+ columnRow));
497
+ }
498
+ }
499
+ else {
500
+ return (React.createElement(TableHead, { className: 'TableHead' },
501
+ captionRow,
502
+ columnRow));
503
+ }
341
504
  };
342
- var templateObject_1$3;var StyledButtonsBox = styled(Box)(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n gap: 5px;\n"], ["\n display: flex;\n flex-wrap: wrap;\n gap: 5px;\n"])));
343
- var TableBodyCell = function (_a) {
505
+ var templateObject_1$2;var makeSortableItems = function (items) {
506
+ return items === null || items === void 0 ? void 0 : items.map(function (_a, index) {
507
+ var id = _a.id, item = __rest(_a, ["id"]);
508
+ return __assign({ id: id == null ? "".concat(v4(), "_").concat(index) : id }, item);
509
+ });
510
+ };const CSS = /*#__PURE__*/Object.freeze({
511
+ Translate: {
512
+ toString(transform) {
513
+ if (!transform) {
514
+ return;
515
+ }
516
+
517
+ const {
518
+ x,
519
+ y
520
+ } = transform;
521
+ return "translate3d(" + (x ? Math.round(x) : 0) + "px, " + (y ? Math.round(y) : 0) + "px, 0)";
522
+ }
523
+
524
+ },
525
+ Scale: {
526
+ toString(transform) {
527
+ if (!transform) {
528
+ return;
529
+ }
530
+
531
+ const {
532
+ scaleX,
533
+ scaleY
534
+ } = transform;
535
+ return "scaleX(" + scaleX + ") scaleY(" + scaleY + ")";
536
+ }
537
+
538
+ },
539
+ Transform: {
540
+ toString(transform) {
541
+ if (!transform) {
542
+ return;
543
+ }
544
+
545
+ return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(' ');
546
+ }
547
+
548
+ },
549
+ Transition: {
550
+ toString(_ref) {
551
+ let {
552
+ property,
553
+ duration,
554
+ easing
555
+ } = _ref;
556
+ return property + " " + duration + "ms " + easing;
557
+ }
558
+
559
+ }
560
+ });var StyledButtonsBox = styled(Box)(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n gap: 5px;\n"], ["\n display: flex;\n flex-wrap: wrap;\n gap: 5px;\n"])));
561
+ var TableBodyCell = React.forwardRef(function (_a, ref) {
344
562
  /********************************************************************************************************************
345
563
  * Use
346
564
  * ******************************************************************************************************************/
@@ -529,9 +747,9 @@ var TableBodyCell = function (_a) {
529
747
  /********************************************************************************************************************
530
748
  * Render
531
749
  * ******************************************************************************************************************/
532
- return (React.createElement(TableCommonCell, { type: 'body', className: classNames('TableBodyCell', className), style: style, sx: sx, column: column, defaultAlign: defaultAlign, defaultEllipsis: defaultEllipsis, item: item, index: index, onClick: column.onClick || onClick ? handleClick : undefined }, !isHidden && data));
533
- };
534
- var templateObject_1$2;var StyledBodyRow = styled(TableRow)(function (_a) {
750
+ return (React.createElement(TableCommonCell, { ref: ref, type: 'body', className: classNames('TableBodyCell', className), style: style, sx: sx, column: column, defaultAlign: defaultAlign, defaultEllipsis: defaultEllipsis, item: item, index: index, onClick: column.onClick || onClick ? handleClick : undefined }, !isHidden && data));
751
+ });
752
+ var templateObject_1$1;var StyledBodyRow = styled(TableRow)(function (_a) {
535
753
  var theme = _a.theme;
536
754
  return ({
537
755
  '&.odd-color:nth-of-type(odd):not(:hover)': {
@@ -556,226 +774,107 @@ var TableBodyRow = function (_a) {
556
774
  /********************************************************************************************************************
557
775
  * Render
558
776
  * ******************************************************************************************************************/
559
- return (React.createElement(StyledBodyRow, __assign({ className: classNames('TableBodyRow', className), style: sortable
560
- ? __assign(__assign({}, style), { transform: CSS.Transform.toString(transform), transition: transition }) : style }, props, sortableProps), columns.map(function (column, columnIdx) { return (React.createElement(TableBodyCell, { className: onGetColumnClassName ? onGetColumnClassName(column, item, index) : undefined, sx: onGetColumnSx ? onGetColumnSx(column, item, index) : undefined, style: onGetColumnStyle ? onGetColumnStyle(column, item, index) : undefined, key: columnIdx, index: index, item: item, defaultAlign: defaultAlign, defaultEllipsis: defaultEllipsis, column: column, onClick: onClick, onCheckChange: onCheckChange })); })));
561
- };var TableFooterCell = function (_a) {
562
- /********************************************************************************************************************
563
- * Memo
564
- * ******************************************************************************************************************/
565
- var column = _a.column, items = _a.items, defaultAlign = _a.defaultAlign;
566
- var data = useMemo(function () {
567
- var _a, _b, _c;
568
- if ((_a = column.footer) === null || _a === void 0 ? void 0 : _a.onRender) {
569
- return (_b = column.footer) === null || _b === void 0 ? void 0 : _b.onRender(items);
570
- }
571
- else {
572
- return (_c = column.footer) === null || _c === void 0 ? void 0 : _c.value;
573
- }
574
- }, [column.footer, items]);
575
- /********************************************************************************************************************
576
- * Render
577
- * ******************************************************************************************************************/
578
- return (React.createElement(TableCommonCell, { type: 'head', className: 'TableFooterCell', column: column, defaultAlign: defaultAlign }, data));
579
- };var TablePagination = function (_a) {
580
- var className = _a.className, style = _a.style, sx = _a.sx, paging = _a.paging, align = _a.align, onChange = _a.onChange;
581
- return (React.createElement(Stack, { alignItems: align },
582
- React.createElement(Pagination, { count: paging.last_page, page: paging.current_page, color: 'primary', className: classNames('TablePagination', className), style: style, sx: sx, onChange: function (e, page) {
583
- if (onChange)
584
- onChange(page);
585
- } })));
586
- };var TableContextProvider = function (_a) {
587
- var children = _a.children, value = _a.value;
588
- return React.createElement(TableContext.Provider, { value: value }, children);
589
- };var TableTopHeadCaptionRow = styled(TableRow)(function (_a) {
590
- var theme = _a.theme;
591
- return ({
592
- '> th': {
593
- backgroundColor: theme.palette.grey.A100,
594
- textAlign: 'center',
595
- fontWeight: 700,
596
- },
597
- });
598
- });var TableHeadCell = function (_a) {
777
+ return (React.createElement(React.Fragment, null,
778
+ React.createElement(StyledBodyRow, __assign({ className: classNames('TableBodyRow', className), style: sortable
779
+ ? __assign(__assign({}, style), { transform: CSS.Transform.toString(transform), transition: transition }) : style }, props, sortableProps), columns.map(function (column, columnIdx) { return (React.createElement(TableBodyCell, { className: onGetColumnClassName ? onGetColumnClassName(column, item, index) : undefined, sx: onGetColumnSx ? onGetColumnSx(column, item, index) : undefined, style: onGetColumnStyle ? onGetColumnStyle(column, item, index) : undefined, key: columnIdx, index: index, item: item, defaultAlign: defaultAlign, defaultEllipsis: defaultEllipsis, column: column, onClick: onClick, onCheckChange: onCheckChange })); }))));
780
+ };var TableSortableBodyBlock = function (_a) {
781
+ var items = _a.items, baseIndex = _a.baseIndex, columns = _a.columns, showOddColor = _a.showOddColor, showEvenColor = _a.showEvenColor, onGetBodyRowStyle = _a.onGetBodyRowStyle, onGetBodyRowSx = _a.onGetBodyRowSx, onGetBodyRowClassName = _a.onGetBodyRowClassName, onGetBodyColumnClassName = _a.onGetBodyColumnClassName, onGetBodyColumnStyle = _a.onGetBodyColumnStyle, onGetBodyColumnSx = _a.onGetBodyColumnSx, defaultAlign = _a.defaultAlign, defaultEllipsis = _a.defaultEllipsis, sortable = _a.sortable, onClick = _a.onClick, onCheckChange = _a.onCheckChange;
782
+ var progressiveVisible = useTableState().progressiveVisible;
599
783
  /********************************************************************************************************************
600
784
  * Use
601
785
  * ******************************************************************************************************************/
602
- var column = _a.column, items = _a.items, defaultAlign = _a.defaultAlign, top = _a.top, onCheckChange = _a.onCheckChange;
603
- var _b = useTableState(), setHeadColumnChecked = _b.setHeadColumnChecked, setHeadColumnCommands = _b.setHeadColumnCommands;
786
+ var _b = useInView({ threshold: 0, triggerOnce: true }), ref = _b.ref, inView = _b.inView;
604
787
  /********************************************************************************************************************
605
788
  * State
606
789
  * ******************************************************************************************************************/
607
- var _c = useState(false), checked = _c[0], setChecked = _c[1];
608
- var _d = useState(false), checkDisabled = _d[0], setCheckDisabled = _d[1];
790
+ var _c = useState(baseIndex === 0), canInView = _c[0], setCanInView = _c[1];
609
791
  /********************************************************************************************************************
610
792
  * Effect
611
793
  * ******************************************************************************************************************/
612
794
  useEffect(function () {
613
- if (column.type === 'check') {
614
- setHeadColumnChecked(column, checked);
795
+ if (progressiveVisible && baseIndex > 0) {
796
+ setTimeout(function () {
797
+ setCanInView(true);
798
+ }, baseIndex * ifUndefined(progressiveVisible.delay, 300));
615
799
  }
616
- }, [column, checked, setHeadColumnChecked]);
617
- useEffect(function () {
618
- setHeadColumnCommands(column, {
619
- setChecked: function (checked) {
620
- if (column.type === 'check') {
621
- setChecked(checked);
622
- }
623
- },
624
- setCheckDisabled: function (checkDisabled) {
625
- if (column.type === 'check') {
626
- setCheckDisabled(checkDisabled);
627
- }
628
- },
629
- });
630
- }, [setHeadColumnCommands, column]);
800
+ // eslint-disable-next-line react-hooks/exhaustive-deps
801
+ }, [progressiveVisible]);
631
802
  /********************************************************************************************************************
632
803
  * Memo
633
804
  * ******************************************************************************************************************/
634
- var data = useMemo(function () {
635
- var _a, _b, _c, _d;
636
- if (column.type === 'check') {
637
- if (column.hideAllCheck) {
638
- if ((_a = column.head) === null || _a === void 0 ? void 0 : _a.onRender) {
639
- return (_b = column.head) === null || _b === void 0 ? void 0 : _b.onRender(items);
640
- }
641
- else {
642
- if (typeof column.label === 'string') {
643
- return React.createElement("div", { dangerouslySetInnerHTML: { __html: column.label } });
644
- }
645
- else {
646
- return column.label;
647
- }
648
- }
649
- }
650
- else {
651
- return (React.createElement(Checkbox, { checked: checked, disabled: checkDisabled, onChange: function (e, newChecked) {
652
- setChecked(newChecked);
653
- onCheckChange && onCheckChange(column, newChecked);
654
- } }));
655
- }
656
- }
657
- else {
658
- if ((_c = column.head) === null || _c === void 0 ? void 0 : _c.onRender) {
659
- return (_d = column.head) === null || _d === void 0 ? void 0 : _d.onRender(items);
660
- }
661
- else {
662
- if (typeof column.label === 'string') {
663
- return React.createElement("div", { dangerouslySetInnerHTML: { __html: column.label } });
664
- }
665
- else {
666
- return column.label;
667
- }
668
- }
669
- }
670
- }, [checkDisabled, checked, column, items, onCheckChange]);
805
+ var renderItems = useMemo(function () {
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 && '...')));
808
+ }, [
809
+ baseIndex,
810
+ canInView,
811
+ columns,
812
+ defaultAlign,
813
+ defaultEllipsis,
814
+ inView,
815
+ items,
816
+ onCheckChange,
817
+ onClick,
818
+ onGetBodyColumnClassName,
819
+ onGetBodyColumnStyle,
820
+ onGetBodyColumnSx,
821
+ onGetBodyRowClassName,
822
+ onGetBodyRowStyle,
823
+ onGetBodyRowSx,
824
+ progressiveVisible,
825
+ ref,
826
+ showEvenColor,
827
+ showOddColor,
828
+ sortable,
829
+ ]);
671
830
  /********************************************************************************************************************
672
831
  * Render
673
832
  * ******************************************************************************************************************/
674
- return (React.createElement(TableCommonCell, { type: 'head', className: 'TableHeadCell', style: top !== undefined ? { top: top } : undefined, column: column, defaultAlign: defaultAlign }, data));
675
- };var BottomLine = styled('div')(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n height: 1px;\n position: absolute;\n left: 3px;\n right: 3px;\n bottom: 0;\n"], ["\n height: 1px;\n position: absolute;\n left: 3px;\n right: 3px;\n bottom: 0;\n"])));
676
- var TableTopHead = function (_a) {
833
+ return React.createElement(React.Fragment, null, renderItems);
834
+ };var chunkArray = function (array, size) {
835
+ var result = [];
836
+ for (var i = 0; i < array.length; i += size) {
837
+ result.push(array.slice(i, i + size));
838
+ }
839
+ return result;
840
+ };var TableSortableBody = function (_a) {
677
841
  /********************************************************************************************************************
678
842
  * Use
679
843
  * ******************************************************************************************************************/
680
- var columns = _a.columns, items = _a.items, rows = _a.rows, caption = _a.caption, defaultAlign = _a.defaultAlign, onCheckChange = _a.onCheckChange;
681
- var theme = useTheme();
682
- /********************************************************************************************************************
683
- * Ref
684
- * ******************************************************************************************************************/
685
- var captionRef = useRef(null);
686
- var row1Ref = useRef(null);
687
- var row2Ref = useRef(null);
688
- var row3Ref = useRef(null);
689
- /********************************************************************************************************************
690
- * ResizeDetector
691
- * ******************************************************************************************************************/
692
- var captionHeight = useResizeDetector({
693
- targetRef: captionRef,
694
- handleWidth: false,
695
- handleHeight: true,
696
- }).height;
697
- var row1Height = useResizeDetector({ targetRef: row1Ref, handleWidth: false, handleHeight: true }).height;
698
- var row2Height = useResizeDetector({ targetRef: row2Ref, handleWidth: false, handleHeight: true }).height;
699
- var row3Height = useResizeDetector({ targetRef: row3Ref, handleWidth: false, handleHeight: true }).height;
844
+ var items = _a.items, columns = _a.columns, showOddColor = _a.showOddColor, showEvenColor = _a.showEvenColor, onGetBodyRowStyle = _a.onGetBodyRowStyle, onGetBodyRowSx = _a.onGetBodyRowSx, onGetBodyRowClassName = _a.onGetBodyRowClassName, onGetBodyColumnClassName = _a.onGetBodyColumnClassName, onGetBodyColumnStyle = _a.onGetBodyColumnStyle, onGetBodyColumnSx = _a.onGetBodyColumnSx, defaultAlign = _a.defaultAlign, defaultEllipsis = _a.defaultEllipsis, sortable = _a.sortable, onClick = _a.onClick, onCheckChange = _a.onCheckChange;
845
+ var progressiveVisible = useTableState().progressiveVisible;
700
846
  /********************************************************************************************************************
701
- * Function
847
+ * Memo
702
848
  * ******************************************************************************************************************/
703
- var makeRowCells = useCallback(function (row, top) {
704
- var totalColumns = 0;
705
- var cells = row
706
- .map(function (info, idx) {
707
- if (info) {
708
- totalColumns += info.colSpan || 1;
709
- return (React.createElement(TableCell, { key: idx, colSpan: info.colSpan, align: info.align, style: {
710
- top: top,
711
- borderBottom: 0,
712
- } },
713
- info.label,
714
- info.label != null && React.createElement(BottomLine, { style: { backgroundColor: theme.palette.divider } })));
715
- }
716
- })
717
- .filter(function (cell) { return !!cell; });
718
- if (totalColumns < columns.length) {
719
- cells.push(React.createElement(TableCell, { key: columns.length, colSpan: columns.length - cells.length, style: { top: top, borderBottom: 0 } }));
849
+ var renderBlock = useMemo(function () {
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 })); })));
720
852
  }
721
- return cells;
722
- }, [columns, theme.palette.divider]);
723
- var columnRow = useMemo(function () {
724
- var top = (captionHeight || 0) + (row1Height || 0) + (row2Height || 0) + (row3Height || 0);
725
- return (React.createElement(TableRow, null, columns.map(function (column, idx) { return (React.createElement(TableHeadCell, { key: idx, column: column, items: items, defaultAlign: defaultAlign, top: top, onCheckChange: onCheckChange })); })));
726
- }, [captionHeight, columns, defaultAlign, items, onCheckChange, row1Height, row2Height, row3Height]);
727
- /********************************************************************************************************************
728
- * Variable
729
- * ******************************************************************************************************************/
730
- var captionRow = !!caption && (React.createElement(TableTopHeadCaptionRow, { ref: captionRef, className: 'TableTopHeadCaptionRow' },
731
- React.createElement(TableCell, { colSpan: columns.length }, caption)));
853
+ else {
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 }));
855
+ }
856
+ }, [
857
+ columns,
858
+ defaultAlign,
859
+ defaultEllipsis,
860
+ items,
861
+ onCheckChange,
862
+ onClick,
863
+ onGetBodyColumnClassName,
864
+ onGetBodyColumnStyle,
865
+ onGetBodyColumnSx,
866
+ onGetBodyRowClassName,
867
+ onGetBodyRowStyle,
868
+ onGetBodyRowSx,
869
+ progressiveVisible,
870
+ showEvenColor,
871
+ showOddColor,
872
+ sortable,
873
+ ]);
732
874
  /********************************************************************************************************************
733
875
  * Render
734
876
  * ******************************************************************************************************************/
735
- if (rows) {
736
- if (Array.isArray(rows[0])) {
737
- return (React.createElement(TableHead, { className: 'TableHead' },
738
- captionRow,
739
- rows.map(function (row, idx) {
740
- var ref = undefined;
741
- var top = undefined;
742
- switch (idx) {
743
- case 0:
744
- ref = row1Ref;
745
- top = captionHeight;
746
- break;
747
- case 1:
748
- ref = row2Ref;
749
- top = (captionHeight || 0) + (row1Height || 0);
750
- break;
751
- case 2:
752
- ref = row3Ref;
753
- top = (captionHeight || 0) + (row1Height || 0) + (row2Height || 0);
754
- break;
755
- case 3:
756
- top = (captionHeight || 0) + (row1Height || 0) + (row2Height || 0) + (row3Height || 0);
757
- }
758
- return (React.createElement(TableRow, { key: idx, ref: ref, className: 'TableHeadRow' }, makeRowCells(row, top)));
759
- })));
760
- }
761
- else {
762
- return (React.createElement(TableHead, { className: 'TableHead' },
763
- captionRow,
764
- React.createElement(TableRow, { ref: row1Ref, className: 'TableHeadRow' }, makeRowCells(rows, captionHeight)),
765
- columnRow));
766
- }
767
- }
768
- else {
769
- return (React.createElement(TableHead, { className: 'TableHead' },
770
- captionRow,
771
- columnRow));
772
- }
773
- };
774
- var templateObject_1$1;var makeSortableItems = function (items) {
775
- return items === null || items === void 0 ? void 0 : items.map(function (_a, index) {
776
- var id = _a.id, item = __rest(_a, ["id"]);
777
- return __assign({ id: id == null ? "".concat(v4(), "_").concat(index) : id }, item);
778
- });
877
+ return sortable ? (React.createElement(SortableContext, { items: items, strategy: verticalListSortingStrategy }, renderBlock)) : (renderBlock);
779
878
  };function columnFilter(v) {
780
879
  return v !== undefined && v !== null && v !== false;
781
880
  }
@@ -784,7 +883,7 @@ var Table = React.forwardRef(function (_a, ref) {
784
883
  /********************************************************************************************************************
785
884
  * Ref
786
885
  * ******************************************************************************************************************/
787
- var className = _a.className, initStyle = _a.style, sx = _a.sx, caption = _a.caption, topHeadRows = _a.topHeadRows, initColumns = _a.columns, initItems = _a.items, initPaging = _a.paging, _b = _a.pagingAlign, pagingAlign = _b === void 0 ? 'center' : _b, _c = _a.defaultAlign, defaultAlign = _c === void 0 ? 'left' : _c, defaultEllipsis = _a.defaultEllipsis, initStickyHeader = _a.stickyHeader, height = _a.height, minHeight = _a.minHeight, maxHeight = _a.maxHeight, fullHeight = _a.fullHeight, showOddColor = _a.showOddColor, showEvenColor = _a.showEvenColor, _d = _a.cellPadding, cellPadding = _d === void 0 ? 13 : _d, footer = _a.footer, noData = _a.noData, pagination = _a.pagination, sortable = _a.sortable, onClick = _a.onClick, onGetBodyRowClassName = _a.onGetBodyRowClassName, onGetBodyRowStyle = _a.onGetBodyRowStyle, onGetBodyRowSx = _a.onGetBodyRowSx, onGetBodyColumnClassName = _a.onGetBodyColumnClassName, onGetBodyColumnStyle = _a.onGetBodyColumnStyle, onGetBodyColumnSx = _a.onGetBodyColumnSx, onPageChange = _a.onPageChange, onSortChange = _a.onSortChange, onCheckChange = _a.onCheckChange;
886
+ var className = _a.className, initStyle = _a.style, sx = _a.sx, caption = _a.caption, topHeadRows = _a.topHeadRows, initColumns = _a.columns, initItems = _a.items, initPaging = _a.paging, _b = _a.pagingAlign, pagingAlign = _b === void 0 ? 'center' : _b, _c = _a.defaultAlign, defaultAlign = _c === void 0 ? 'left' : _c, defaultEllipsis = _a.defaultEllipsis, initStickyHeader = _a.stickyHeader, height = _a.height, minHeight = _a.minHeight, maxHeight = _a.maxHeight, fullHeight = _a.fullHeight, showOddColor = _a.showOddColor, showEvenColor = _a.showEvenColor, _d = _a.cellPadding, cellPadding = _d === void 0 ? 13 : _d, footer = _a.footer, noData = _a.noData, pagination = _a.pagination, sortable = _a.sortable, progressiveVisible = _a.progressiveVisible, onClick = _a.onClick, onGetBodyRowClassName = _a.onGetBodyRowClassName, onGetBodyRowStyle = _a.onGetBodyRowStyle, onGetBodyRowSx = _a.onGetBodyRowSx, onGetBodyColumnClassName = _a.onGetBodyColumnClassName, onGetBodyColumnStyle = _a.onGetBodyColumnStyle, onGetBodyColumnSx = _a.onGetBodyColumnSx, onPageChange = _a.onPageChange, onSortChange = _a.onSortChange, onCheckChange = _a.onCheckChange;
788
887
  var localHeaderDataRef = useRef({});
789
888
  var localBodyDataRef = useRef({});
790
889
  var updateHeadCheckTimer = useRef(undefined);
@@ -850,19 +949,6 @@ var Table = React.forwardRef(function (_a, ref) {
850
949
  }
851
950
  },
852
951
  }).ref;
853
- /********************************************************************************************************************
854
- * Memo
855
- * ******************************************************************************************************************/
856
- var tableSx = useMemo(function () {
857
- var sx = {
858
- padding: typeof cellPadding === 'number' ? "".concat(cellPadding, "px") : cellPadding,
859
- };
860
- return {
861
- '> .MuiTableHead-root > .MuiTableRow-root > .MuiTableCell-root ': sx,
862
- '> .MuiTableBody-root > .MuiTableRow-root > .MuiTableCell-root ': sx,
863
- '> .MuiTableFooter-root > .MuiTableRow-root > .MuiTableCell-root ': sx,
864
- };
865
- }, [cellPadding]);
866
952
  /********************************************************************************************************************
867
953
  * Function
868
954
  * ******************************************************************************************************************/
@@ -1256,28 +1342,42 @@ var Table = React.forwardRef(function (_a, ref) {
1256
1342
  var isNoData = !!sortableItems && sortableItems.length <= 0;
1257
1343
  var finalPagingHeight = paging && paging.total > 0 ? pagingHeight || 0 : 0;
1258
1344
  var stickyHeader = !isNoData && initStickyHeader;
1259
- var style = fullHeight
1260
- ? __assign(__assign({ width: '100%' }, initStyle), { flex: 1, justifyContent: 'flex-end', height: '100%', display: 'flex', flexDirection: 'column', position: 'relative' }) : __assign({ width: '100%' }, initStyle);
1261
- var simpleBarStyle = fullHeight
1262
- ? {
1263
- height: (containerHeight || 0) - (finalPagingHeight || 0) - 1,
1264
- flex: 1,
1265
- position: 'absolute',
1266
- top: 0,
1267
- left: 0,
1268
- right: 0,
1269
- marginBottom: finalPagingHeight || 0,
1270
- }
1271
- : { height: height, minHeight: minHeight, maxHeight: maxHeight, marginBottom: -1 };
1272
- var tableStyle = fullHeight && isNoData ? { flex: 1, height: (containerHeight || 0) - finalPagingHeight - 2 } : undefined;
1273
- // pageStyle
1274
- var pagingStyle = { padding: '13px 0', borderTop: '1px solid rgba(224, 224, 224, 1)' };
1275
- if (fullHeight) {
1276
- pagingStyle.position = 'sticky';
1277
- }
1278
- var tableTopHead = finalColumns && (React.createElement(TableTopHead, { caption: caption, rows: topHeadRows, columns: finalColumns, items: items, defaultAlign: defaultAlign, onCheckChange: handleHeadCheckChange }));
1345
+ var _p = useMemo(function () {
1346
+ var style = fullHeight
1347
+ ? __assign(__assign({ width: '100%' }, initStyle), { flex: 1, justifyContent: 'flex-end', height: '100%', display: 'flex', flexDirection: 'column', position: 'relative' }) : __assign({ width: '100%' }, initStyle);
1348
+ var sx = { padding: typeof cellPadding === 'number' ? "".concat(cellPadding, "px") : cellPadding };
1349
+ var tableSx = {
1350
+ '> .MuiTableHead-root > .MuiTableRow-root > .MuiTableCell-root ': sx,
1351
+ '> .MuiTableBody-root > .MuiTableRow-root > .MuiTableCell-root ': sx,
1352
+ '> .MuiTableFooter-root > .MuiTableRow-root > .MuiTableCell-root ': sx,
1353
+ };
1354
+ // pageStyle
1355
+ var pagingStyle = { padding: '13px 0', borderTop: '1px solid rgba(224, 224, 224, 1)' };
1356
+ if (fullHeight) {
1357
+ pagingStyle.position = 'sticky';
1358
+ }
1359
+ return { style: style, tableSx: tableSx, pagingStyle: pagingStyle };
1360
+ }, [cellPadding, fullHeight, initStyle]), style = _p.style, tableSx = _p.tableSx, pagingStyle = _p.pagingStyle;
1361
+ var _q = useMemo(function () {
1362
+ var simpleBarStyle = fullHeight
1363
+ ? {
1364
+ height: (containerHeight || 0) - (finalPagingHeight || 0) - 1,
1365
+ flex: 1,
1366
+ position: 'absolute',
1367
+ top: 0,
1368
+ left: 0,
1369
+ right: 0,
1370
+ marginBottom: finalPagingHeight || 0,
1371
+ }
1372
+ : { height: height, minHeight: minHeight, maxHeight: maxHeight, marginBottom: -1 };
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;
1376
+ var tableTopHead = useMemo(function () {
1377
+ return finalColumns && (React.createElement(TableTopHead, { caption: caption, rows: topHeadRows, columns: finalColumns, items: items, defaultAlign: defaultAlign, onCheckChange: handleHeadCheckChange }));
1378
+ }, [caption, defaultAlign, finalColumns, handleHeadCheckChange, items, topHeadRows]);
1279
1379
  var tableBody = useMemo(function () {
1280
- return finalColumns && (React.createElement(TableBody, null, sortableItems ? (sortableItems.length > 0 ? (React.createElement(SortableContext, { items: sortableItems, strategy: verticalListSortingStrategy }, sortableItems.map(function (item, idx) { return (React.createElement(TableBodyRow, { key: item.id, className: classNames(!!showOddColor && 'odd-color', !!showEvenColor && 'even-color', onGetBodyRowClassName ? onGetBodyRowClassName(item, idx) : undefined), style: onGetBodyRowStyle ? onGetBodyRowStyle(item, idx) : undefined, sx: onGetBodyRowSx ? onGetBodyRowSx(item, idx) : undefined, onGetColumnClassName: onGetBodyColumnClassName, onGetColumnStyle: onGetBodyColumnStyle, onGetColumnSx: onGetBodyColumnSx, hover: true, id: item.id, index: idx, defaultAlign: defaultAlign, defaultEllipsis: defaultEllipsis, sortable: sortable, columns: finalColumns, item: item, onClick: onClick, onCheckChange: handleBodyCheckChange })); }))) : (React.createElement(StyledBodyRow$1, null,
1380
+ return finalColumns && (React.createElement(TableBody, null, sortableItems ? (sortableItems.length > 0 ? (React.createElement(TableSortableBody, { items: sortableItems, columns: finalColumns, showOddColor: showOddColor, showEvenColor: showEvenColor, defaultAlign: defaultAlign, defaultEllipsis: defaultEllipsis, sortable: sortable, onClick: onClick, onCheckChange: handleBodyCheckChange, onGetBodyRowClassName: onGetBodyRowClassName, onGetBodyRowStyle: onGetBodyRowStyle, onGetBodyRowSx: onGetBodyRowSx, onGetBodyColumnClassName: onGetBodyColumnClassName, onGetBodyColumnSx: onGetBodyColumnSx, onGetBodyColumnStyle: onGetBodyColumnStyle })) : (React.createElement(StyledBodyRow$1, null,
1281
1381
  React.createElement(TableCell, { colSpan: finalColumns.length, style: { flex: 1 } }, noData ? (noData) : (React.createElement(StyledNoDataDiv, null,
1282
1382
  React.createElement("div", null,
1283
1383
  React.createElement(Icon, null, "error")),
@@ -1312,6 +1412,7 @@ var Table = React.forwardRef(function (_a, ref) {
1312
1412
  return finalColumns ? (React.createElement(TableContextProvider, { value: {
1313
1413
  menuOpen: menuOpen,
1314
1414
  openMenuId: openMenuId,
1415
+ progressiveVisible: progressiveVisible,
1315
1416
  setMenuOpen: TableContextSetMenuOpen,
1316
1417
  setItemColumnChecked: TableContextSetItemColumnChecked,
1317
1418
  setItemColumnCheckDisabled: TableContextSetItemColumnCheckDisabled,