@pdg/react-table 1.0.107 → 1.0.108
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/README.md +1 -1
- package/dist/TableBodyRow/TableBodyRow.d.ts +1 -3
- package/dist/TableButton/TableButton.d.ts +1 -1
- package/dist/TableContext/TableContext.d.ts +0 -1
- package/dist/TableMenuButton/TableMenuButton.types.d.ts +2 -2
- package/dist/assets/output-DqXiI6rW.css +15 -0
- package/dist/index.esm.js +12 -38
- package/dist/index.js +12 -38
- package/package.json +40 -41
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ https://parkdigy.github.io/react-table/
|
|
|
8
8
|
|
|
9
9
|
## 설치
|
|
10
10
|
```shell
|
|
11
|
-
npm install -D @pdg/react-table @dnd-kit/core @dnd-kit/sortable @emotion/react @emotion/styled @mui/icons-material @mui/material @mui/x-date-pickers @pdg/react-component @pdg/react-hook @pdg/react-form @tinymce/tinymce-react @types/
|
|
11
|
+
npm install -D @pdg/react-table @dnd-kit/core @dnd-kit/sortable @emotion/react @emotion/styled @mui/icons-material @mui/material @mui/x-date-pickers @pdg/react-component @pdg/react-hook @pdg/react-form @tinymce/tinymce-react @types/uuid classnames dayjs copy-to-clipboard react-number-format react-resize-detector simplebar-react uuid
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
### simplebar-react css 추가
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TableBodyRowProps as Props } from './TableBodyRow.types';
|
|
3
|
-
export declare const StyledBodyRow: import("@emotion/styled").StyledComponent<import("@mui/material").TableRowOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<
|
|
4
|
-
ref?: ((instance: HTMLTableRowElement | null) => void) | React.RefObject<HTMLTableRowElement> | null | undefined;
|
|
5
|
-
}, "className" | "style" | "classes" | "children" | "hover" | "selected" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
3
|
+
export declare const StyledBodyRow: import("@emotion/styled").StyledComponent<import("@mui/material").TableRowOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "className" | "style" | "classes" | "children" | "hover" | "selected" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
6
4
|
declare const TableBodyRow: React.FC<Props>;
|
|
7
5
|
export default TableBodyRow;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TableButtonProps as Props } from './TableButton.types';
|
|
3
|
-
declare const _default: React.
|
|
3
|
+
declare const _default: React.NamedExoticComponent<Props & React.RefAttributes<HTMLButtonElement>>;
|
|
4
4
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { PopperPlacementType } from '@mui/base/Popper/Popper.types';
|
|
3
2
|
import { PdgButtonProps } from '@pdg/react-component';
|
|
3
|
+
import { PopperPlacementType, MenuListProps } from '@mui/material';
|
|
4
4
|
export interface TableMenuButtonProps extends Omit<PdgButtonProps, 'size' | 'onClick'> {
|
|
5
5
|
placement?: PopperPlacementType;
|
|
6
6
|
inModal?: boolean;
|
|
7
7
|
zIndex?: number;
|
|
8
|
-
menuList: ReactElement
|
|
8
|
+
menuList: ReactElement<MenuListProps>;
|
|
9
9
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.simplebar-track.simplebar-vertical {
|
|
2
|
+
width: 8px !important;
|
|
3
|
+
}
|
|
4
|
+
.simplebar-track.simplebar-vertical .simplebar-scrollbar.simplebar-visible:before {
|
|
5
|
+
opacity: 0.3 !important;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.Table .TableHead .TableHeadRow th {
|
|
9
|
+
position: relative;
|
|
10
|
+
transform: translateY(-100%);
|
|
11
|
+
}
|
|
12
|
+
.Table.sticky-header .TableHead .TableHeadRow th {
|
|
13
|
+
position: sticky;
|
|
14
|
+
transform: none;
|
|
15
|
+
}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,30 +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}from'@pdg/react-component'
|
|
2
|
-
if ( ref === void 0 ) ref = {};
|
|
3
|
-
var insertAt = ref.insertAt;
|
|
4
|
-
|
|
5
|
-
if (typeof document === 'undefined') { return; }
|
|
6
|
-
|
|
7
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
8
|
-
var style = document.createElement('style');
|
|
9
|
-
style.type = 'text/css';
|
|
10
|
-
|
|
11
|
-
if (insertAt === 'top') {
|
|
12
|
-
if (head.firstChild) {
|
|
13
|
-
head.insertBefore(style, head.firstChild);
|
|
14
|
-
} else {
|
|
15
|
-
head.appendChild(style);
|
|
16
|
-
}
|
|
17
|
-
} else {
|
|
18
|
-
head.appendChild(style);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if (style.styleSheet) {
|
|
22
|
-
style.styleSheet.cssText = css;
|
|
23
|
-
} else {
|
|
24
|
-
style.appendChild(document.createTextNode(css));
|
|
25
|
-
}
|
|
26
|
-
}var css_248z = ".simplebar-track.simplebar-vertical {\n width: 8px !important;\n}\n.simplebar-track.simplebar-vertical .simplebar-scrollbar.simplebar-visible:before {\n opacity: 0.3 !important;\n}\n\n.Table .TableHead .TableHeadRow th {\n position: relative;\n transform: translateY(-100%);\n}\n.Table.sticky-header .TableHead .TableHeadRow th {\n position: sticky;\n transform: none;\n}";
|
|
27
|
-
styleInject(css_248z);/******************************************************************************
|
|
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';/******************************************************************************
|
|
28
2
|
Copyright (c) Microsoft Corporation.
|
|
29
3
|
|
|
30
4
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -38,7 +12,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
38
12
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
39
13
|
PERFORMANCE OF THIS SOFTWARE.
|
|
40
14
|
***************************************************************************** */
|
|
41
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
15
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
42
16
|
|
|
43
17
|
|
|
44
18
|
var __assign = function() {
|
|
@@ -772,7 +746,7 @@ var Table = React.forwardRef(function (_a, ref) {
|
|
|
772
746
|
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;
|
|
773
747
|
var localHeaderDataRef = useRef({});
|
|
774
748
|
var localBodyDataRef = useRef({});
|
|
775
|
-
var updateHeadCheckTimer = useRef();
|
|
749
|
+
var updateHeadCheckTimer = useRef(undefined);
|
|
776
750
|
var fireOnCheckChangeTimer = useRef({});
|
|
777
751
|
var simpleBarRef = useRef(null);
|
|
778
752
|
var finalColumnsIdRef = useRef([]);
|
|
@@ -1276,8 +1250,8 @@ var deHash = function () {
|
|
|
1276
1250
|
* ******************************************************************************************************************/
|
|
1277
1251
|
var _b, _c;
|
|
1278
1252
|
var className = _a.className, initStyle = _a.style, sx = _a.sx, color = _a.color, hash = _a.hash, stickyHeader = _a.stickyHeader, fullHeight = _a.fullHeight, search = _a.search, table = _a.table, betweenSearchTableComponent = _a.betweenSearchTableComponent, onGetData = _a.onGetData, onRequestHashChange = _a.onRequestHashChange;
|
|
1279
|
-
var searchRef = useRef();
|
|
1280
|
-
var tableRef = useRef();
|
|
1253
|
+
var searchRef = useRef(undefined);
|
|
1254
|
+
var tableRef = useRef(undefined);
|
|
1281
1255
|
var lastGetDataDataRef = useRef({});
|
|
1282
1256
|
/********************************************************************************************************************
|
|
1283
1257
|
* State
|
|
@@ -1636,7 +1610,7 @@ var deHash = function () {
|
|
|
1636
1610
|
* Render
|
|
1637
1611
|
* ******************************************************************************************************************/
|
|
1638
1612
|
return (React.createElement(Grid, { container: true, direction: 'column', spacing: 1, className: classNames('SearchTable', className), style: fullHeight ? __assign(__assign({}, initStyle), { flex: 1, display: 'flex' }) : initStyle, sx: sx },
|
|
1639
|
-
React.createElement(Grid, {
|
|
1613
|
+
React.createElement(Grid, { sx: { display: searchInfo.searchGroups ? undefined : 'none' } },
|
|
1640
1614
|
React.createElement(Search, __assign({ color: color }, searchInfo.props, { ref: function (commands) {
|
|
1641
1615
|
if (searchInfo.ref) {
|
|
1642
1616
|
if (typeof searchInfo.ref === 'function') {
|
|
@@ -1651,8 +1625,8 @@ var deHash = function () {
|
|
|
1651
1625
|
React.createElement(SearchGroup, { hidden: true },
|
|
1652
1626
|
React.createElement(FormHidden, { name: 'page', value: 1 })),
|
|
1653
1627
|
searchInfo.searchGroups)),
|
|
1654
|
-
betweenSearchTableComponent && React.createElement(Grid,
|
|
1655
|
-
React.createElement(Grid, {
|
|
1628
|
+
betweenSearchTableComponent && React.createElement(Grid, null, betweenSearchTableComponent),
|
|
1629
|
+
React.createElement(Grid, { style: fullHeight ? { flex: 1, display: 'flex', flexDirection: 'column' } : undefined },
|
|
1656
1630
|
React.createElement(Table, __assign({}, tableInfo.props, { stickyHeader: stickyHeader || ((_b = tableInfo.props) === null || _b === void 0 ? void 0 : _b.stickyHeader), fullHeight: fullHeight || ((_c = tableInfo.props) === null || _c === void 0 ? void 0 : _c.fullHeight), ref: function (commands) {
|
|
1657
1631
|
if (tableInfo.ref) {
|
|
1658
1632
|
if (typeof tableInfo.ref === 'function') {
|
|
@@ -1686,7 +1660,7 @@ var TableButton$1 = React.memo(TableButton);var TableMenuButton = React.forwardR
|
|
|
1686
1660
|
/********************************************************************************************************************
|
|
1687
1661
|
* Ref
|
|
1688
1662
|
* ******************************************************************************************************************/
|
|
1689
|
-
var anchorRef = useRef();
|
|
1663
|
+
var anchorRef = useRef(null);
|
|
1690
1664
|
/********************************************************************************************************************
|
|
1691
1665
|
* State
|
|
1692
1666
|
* ******************************************************************************************************************/
|
|
@@ -1979,19 +1953,19 @@ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, temp
|
|
|
1979
1953
|
var valueUnderlineStyle = valueUnderline
|
|
1980
1954
|
? { borderBottom: '1px solid #efefef', paddingBottom: 5 }
|
|
1981
1955
|
: undefined;
|
|
1982
|
-
return item.type === 'divider' ? (React.createElement(Grid, { key: idx,
|
|
1956
|
+
return item.type === 'divider' ? (React.createElement(Grid, { key: idx, size: { xs: 12 } },
|
|
1983
1957
|
React.createElement(Stack, { direction: 'row', spacing: 0.5, alignItems: 'center' },
|
|
1984
1958
|
item.icon && (React.createElement(PdgIcon, { sx: { color: item.dividerColor || dividerColor }, size: 'small' }, item.icon)),
|
|
1985
1959
|
item.label && (React.createElement(Label, { className: classNames(labelClassName, item.labelClassName), style: __assign(__assign({}, item.labelStyle), labelStyle), sx: finalLabelSx }, item.label)),
|
|
1986
1960
|
item.dividerLine && (React.createElement(React.Fragment, null, item.icon || item.label ? (React.createElement("div", { style: { flex: 1, paddingLeft: 5 } },
|
|
1987
|
-
React.createElement(Line, null))) : (React.createElement(Line, null))))))) : (React.createElement(Grid,
|
|
1961
|
+
React.createElement(Line, null))) : (React.createElement(Line, null))))))) : (React.createElement(Grid, { key: idx, size: sizeProps, className: item.className, style: item.style, sx: item.sx },
|
|
1988
1962
|
React.createElement(Stack, { direction: 'row', spacing: 0.5, alignItems: 'center' },
|
|
1989
1963
|
item.icon && (React.createElement(PdgIcon, { sx: { color: finalLabelColor }, size: 'small' }, "CalendarMonth")),
|
|
1990
1964
|
React.createElement(Label, { className: classNames(labelClassName, item.labelClassName), style: __assign(__assign({}, item.labelStyle), labelStyle), sx: finalLabelSx }, item.label)),
|
|
1991
1965
|
React.createElement(ValueWrap, { className: classNames(valueClassName, item.valueClassName), style: __assign(__assign(__assign({}, valueStyle), item.valueStyle), valueUnderlineStyle), sx: finalValueSx },
|
|
1992
1966
|
item.ellipsis || ellipsis ? React.createElement(ValueEllipsis, null, data) : React.createElement(Value, null, data),
|
|
1993
1967
|
item.clipboard && notEmpty(copyToClipboardText) && (React.createElement(ValueClipboard, null,
|
|
1994
|
-
React.createElement(
|
|
1968
|
+
React.createElement(PdgCopyToClipboard, { text: copyToClipboardText, onCopy: onCopyToClipboard ? function () { return onCopyToClipboard(item, copyToClipboardText); } : undefined },
|
|
1995
1969
|
React.createElement(ClipboardIconButton, __assign({ size: 'small', color: 'primary' }, item.clipboardProps),
|
|
1996
1970
|
React.createElement(PdgIcon, null, item.clipboardIcon || 'ContentPaste'))))))));
|
|
1997
1971
|
});
|
package/dist/index.js
CHANGED
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
'use strict';var React=require('react'),classNames=require('classnames'),material=require('@mui/material'),reactResizeDetector=require('react-resize-detector'),sortable=require('@dnd-kit/sortable'),dayjs=require('dayjs'),util=require('@pdg/util'),reactHook=require('@pdg/react-hook'),core=require('@dnd-kit/core'),SimpleBar=require('simplebar-react');require('simplebar-react/dist/simplebar.min.css');var uuid=require('uuid'),reactForm=require('@pdg/react-form'),reactComponent=require('@pdg/react-component')
|
|
2
|
-
if ( ref === void 0 ) ref = {};
|
|
3
|
-
var insertAt = ref.insertAt;
|
|
4
|
-
|
|
5
|
-
if (typeof document === 'undefined') { return; }
|
|
6
|
-
|
|
7
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
8
|
-
var style = document.createElement('style');
|
|
9
|
-
style.type = 'text/css';
|
|
10
|
-
|
|
11
|
-
if (insertAt === 'top') {
|
|
12
|
-
if (head.firstChild) {
|
|
13
|
-
head.insertBefore(style, head.firstChild);
|
|
14
|
-
} else {
|
|
15
|
-
head.appendChild(style);
|
|
16
|
-
}
|
|
17
|
-
} else {
|
|
18
|
-
head.appendChild(style);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if (style.styleSheet) {
|
|
22
|
-
style.styleSheet.cssText = css;
|
|
23
|
-
} else {
|
|
24
|
-
style.appendChild(document.createTextNode(css));
|
|
25
|
-
}
|
|
26
|
-
}var css_248z = ".simplebar-track.simplebar-vertical {\n width: 8px !important;\n}\n.simplebar-track.simplebar-vertical .simplebar-scrollbar.simplebar-visible:before {\n opacity: 0.3 !important;\n}\n\n.Table .TableHead .TableHeadRow th {\n position: relative;\n transform: translateY(-100%);\n}\n.Table.sticky-header .TableHead .TableHeadRow th {\n position: sticky;\n transform: none;\n}";
|
|
27
|
-
styleInject(css_248z);/******************************************************************************
|
|
1
|
+
'use strict';var React=require('react'),classNames=require('classnames'),material=require('@mui/material'),reactResizeDetector=require('react-resize-detector'),sortable=require('@dnd-kit/sortable'),dayjs=require('dayjs'),util=require('@pdg/util'),reactHook=require('@pdg/react-hook'),core=require('@dnd-kit/core'),SimpleBar=require('simplebar-react');require('simplebar-react/dist/simplebar.min.css');var uuid=require('uuid'),reactForm=require('@pdg/react-form'),reactComponent=require('@pdg/react-component');/******************************************************************************
|
|
28
2
|
Copyright (c) Microsoft Corporation.
|
|
29
3
|
|
|
30
4
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -38,7 +12,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
38
12
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
39
13
|
PERFORMANCE OF THIS SOFTWARE.
|
|
40
14
|
***************************************************************************** */
|
|
41
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
15
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
42
16
|
|
|
43
17
|
|
|
44
18
|
var __assign = function() {
|
|
@@ -772,7 +746,7 @@ var Table = React.forwardRef(function (_a, ref) {
|
|
|
772
746
|
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$1 = _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;
|
|
773
747
|
var localHeaderDataRef = React.useRef({});
|
|
774
748
|
var localBodyDataRef = React.useRef({});
|
|
775
|
-
var updateHeadCheckTimer = React.useRef();
|
|
749
|
+
var updateHeadCheckTimer = React.useRef(undefined);
|
|
776
750
|
var fireOnCheckChangeTimer = React.useRef({});
|
|
777
751
|
var simpleBarRef = React.useRef(null);
|
|
778
752
|
var finalColumnsIdRef = React.useRef([]);
|
|
@@ -1276,8 +1250,8 @@ var deHash = function () {
|
|
|
1276
1250
|
* ******************************************************************************************************************/
|
|
1277
1251
|
var _b, _c;
|
|
1278
1252
|
var className = _a.className, initStyle = _a.style, sx = _a.sx, color = _a.color, hash = _a.hash, stickyHeader = _a.stickyHeader, fullHeight = _a.fullHeight, search = _a.search, table = _a.table, betweenSearchTableComponent = _a.betweenSearchTableComponent, onGetData = _a.onGetData, onRequestHashChange = _a.onRequestHashChange;
|
|
1279
|
-
var searchRef = React.useRef();
|
|
1280
|
-
var tableRef = React.useRef();
|
|
1253
|
+
var searchRef = React.useRef(undefined);
|
|
1254
|
+
var tableRef = React.useRef(undefined);
|
|
1281
1255
|
var lastGetDataDataRef = React.useRef({});
|
|
1282
1256
|
/********************************************************************************************************************
|
|
1283
1257
|
* State
|
|
@@ -1636,7 +1610,7 @@ var deHash = function () {
|
|
|
1636
1610
|
* Render
|
|
1637
1611
|
* ******************************************************************************************************************/
|
|
1638
1612
|
return (React.createElement(material.Grid, { container: true, direction: 'column', spacing: 1, className: classNames('SearchTable', className), style: fullHeight ? __assign(__assign({}, initStyle), { flex: 1, display: 'flex' }) : initStyle, sx: sx },
|
|
1639
|
-
React.createElement(material.Grid, {
|
|
1613
|
+
React.createElement(material.Grid, { sx: { display: searchInfo.searchGroups ? undefined : 'none' } },
|
|
1640
1614
|
React.createElement(reactForm.Search, __assign({ color: color }, searchInfo.props, { ref: function (commands) {
|
|
1641
1615
|
if (searchInfo.ref) {
|
|
1642
1616
|
if (typeof searchInfo.ref === 'function') {
|
|
@@ -1651,8 +1625,8 @@ var deHash = function () {
|
|
|
1651
1625
|
React.createElement(reactForm.SearchGroup, { hidden: true },
|
|
1652
1626
|
React.createElement(reactForm.FormHidden, { name: 'page', value: 1 })),
|
|
1653
1627
|
searchInfo.searchGroups)),
|
|
1654
|
-
betweenSearchTableComponent && React.createElement(material.Grid,
|
|
1655
|
-
React.createElement(material.Grid, {
|
|
1628
|
+
betweenSearchTableComponent && React.createElement(material.Grid, null, betweenSearchTableComponent),
|
|
1629
|
+
React.createElement(material.Grid, { style: fullHeight ? { flex: 1, display: 'flex', flexDirection: 'column' } : undefined },
|
|
1656
1630
|
React.createElement(Table, __assign({}, tableInfo.props, { stickyHeader: stickyHeader || ((_b = tableInfo.props) === null || _b === void 0 ? void 0 : _b.stickyHeader), fullHeight: fullHeight || ((_c = tableInfo.props) === null || _c === void 0 ? void 0 : _c.fullHeight), ref: function (commands) {
|
|
1657
1631
|
if (tableInfo.ref) {
|
|
1658
1632
|
if (typeof tableInfo.ref === 'function') {
|
|
@@ -1686,7 +1660,7 @@ var TableButton$1 = React.memo(TableButton);var TableMenuButton = React.forwardR
|
|
|
1686
1660
|
/********************************************************************************************************************
|
|
1687
1661
|
* Ref
|
|
1688
1662
|
* ******************************************************************************************************************/
|
|
1689
|
-
var anchorRef = React.useRef();
|
|
1663
|
+
var anchorRef = React.useRef(null);
|
|
1690
1664
|
/********************************************************************************************************************
|
|
1691
1665
|
* State
|
|
1692
1666
|
* ******************************************************************************************************************/
|
|
@@ -1979,19 +1953,19 @@ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, temp
|
|
|
1979
1953
|
var valueUnderlineStyle = valueUnderline
|
|
1980
1954
|
? { borderBottom: '1px solid #efefef', paddingBottom: 5 }
|
|
1981
1955
|
: undefined;
|
|
1982
|
-
return item.type === 'divider' ? (React.createElement(material.Grid, { key: idx,
|
|
1956
|
+
return item.type === 'divider' ? (React.createElement(material.Grid, { key: idx, size: { xs: 12 } },
|
|
1983
1957
|
React.createElement(material.Stack, { direction: 'row', spacing: 0.5, alignItems: 'center' },
|
|
1984
1958
|
item.icon && (React.createElement(reactComponent.PdgIcon, { sx: { color: item.dividerColor || dividerColor }, size: 'small' }, item.icon)),
|
|
1985
1959
|
item.label && (React.createElement(Label, { className: classNames(labelClassName, item.labelClassName), style: __assign(__assign({}, item.labelStyle), labelStyle), sx: finalLabelSx }, item.label)),
|
|
1986
1960
|
item.dividerLine && (React.createElement(React.Fragment, null, item.icon || item.label ? (React.createElement("div", { style: { flex: 1, paddingLeft: 5 } },
|
|
1987
|
-
React.createElement(Line, null))) : (React.createElement(Line, null))))))) : (React.createElement(material.Grid,
|
|
1961
|
+
React.createElement(Line, null))) : (React.createElement(Line, null))))))) : (React.createElement(material.Grid, { key: idx, size: sizeProps, className: item.className, style: item.style, sx: item.sx },
|
|
1988
1962
|
React.createElement(material.Stack, { direction: 'row', spacing: 0.5, alignItems: 'center' },
|
|
1989
1963
|
item.icon && (React.createElement(reactComponent.PdgIcon, { sx: { color: finalLabelColor }, size: 'small' }, "CalendarMonth")),
|
|
1990
1964
|
React.createElement(Label, { className: classNames(labelClassName, item.labelClassName), style: __assign(__assign({}, item.labelStyle), labelStyle), sx: finalLabelSx }, item.label)),
|
|
1991
1965
|
React.createElement(ValueWrap, { className: classNames(valueClassName, item.valueClassName), style: __assign(__assign(__assign({}, valueStyle), item.valueStyle), valueUnderlineStyle), sx: finalValueSx },
|
|
1992
1966
|
item.ellipsis || ellipsis ? React.createElement(ValueEllipsis, null, data) : React.createElement(Value, null, data),
|
|
1993
1967
|
item.clipboard && util.notEmpty(copyToClipboardText) && (React.createElement(ValueClipboard, null,
|
|
1994
|
-
React.createElement(
|
|
1968
|
+
React.createElement(reactComponent.PdgCopyToClipboard, { text: copyToClipboardText, onCopy: onCopyToClipboard ? function () { return onCopyToClipboard(item, copyToClipboardText); } : undefined },
|
|
1995
1969
|
React.createElement(ClipboardIconButton, __assign({ size: 'small', color: 'primary' }, item.clipboardProps),
|
|
1996
1970
|
React.createElement(reactComponent.PdgIcon, null, item.clipboardIcon || 'ContentPaste'))))))));
|
|
1997
1971
|
});
|
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.
|
|
4
|
+
"version": "1.0.108",
|
|
5
5
|
"description": "React Table",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -40,50 +40,49 @@
|
|
|
40
40
|
"javascript"
|
|
41
41
|
],
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@dnd-kit/core": "^6.1
|
|
44
|
-
"@dnd-kit/sortable": "^
|
|
45
|
-
"@emotion/react": "^11.
|
|
46
|
-
"@emotion/styled": "^11.
|
|
47
|
-
"@mui/icons-material": "^
|
|
48
|
-
"@mui/material": "^
|
|
49
|
-
"@mui/x-date-pickers": "^
|
|
50
|
-
"@pdg/react-component": "^1.0.
|
|
51
|
-
"@pdg/react-form": "^1.0.
|
|
52
|
-
"@pdg/react-hook": "^1.0.
|
|
53
|
-
"@pdg/util": "^1.0.
|
|
54
|
-
"@tinymce/tinymce-react": "^
|
|
55
|
-
"@types/react": "
|
|
56
|
-
"@types/
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"react": "
|
|
61
|
-
"react-
|
|
62
|
-
"react-
|
|
63
|
-
"react
|
|
64
|
-
"
|
|
65
|
-
"simplebar-react": "^3.2.5",
|
|
66
|
-
"uuid": "^9.0.1"
|
|
43
|
+
"@dnd-kit/core": "^6.3.1",
|
|
44
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
45
|
+
"@emotion/react": "^11.14.0",
|
|
46
|
+
"@emotion/styled": "^11.14.0",
|
|
47
|
+
"@mui/icons-material": "^7.0.2",
|
|
48
|
+
"@mui/material": "^7.0.2",
|
|
49
|
+
"@mui/x-date-pickers": "^7.28.3",
|
|
50
|
+
"@pdg/react-component": "^1.0.31",
|
|
51
|
+
"@pdg/react-form": "^1.0.133",
|
|
52
|
+
"@pdg/react-hook": "^1.0.26",
|
|
53
|
+
"@pdg/util": "^1.0.23",
|
|
54
|
+
"@tinymce/tinymce-react": "^6.1.0",
|
|
55
|
+
"@types/react": ">=17.0.0",
|
|
56
|
+
"@types/uuid": "^10.0.0",
|
|
57
|
+
"classnames": "^2.0.0",
|
|
58
|
+
"dayjs": "^1.0.0",
|
|
59
|
+
"react": ">=17.0.0",
|
|
60
|
+
"react-dom": ">=17.0.0",
|
|
61
|
+
"react-number-format": "^5.0.0",
|
|
62
|
+
"react-resize-detector": "^12.0.0",
|
|
63
|
+
"simplebar-react": "^3.0.0",
|
|
64
|
+
"uuid": "^11.0.0"
|
|
67
65
|
},
|
|
68
66
|
"devDependencies": {
|
|
69
|
-
"@rollup/plugin-commonjs": "^
|
|
67
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
|
70
68
|
"@rollup/plugin-eslint": "^9.0.5",
|
|
71
|
-
"@rollup/plugin-node-resolve": "^
|
|
72
|
-
"@
|
|
73
|
-
"@typescript-eslint/
|
|
74
|
-
"eslint": "8.
|
|
75
|
-
"eslint
|
|
76
|
-
"eslint-
|
|
77
|
-
"eslint-plugin-
|
|
78
|
-
"eslint-plugin-
|
|
79
|
-
"eslint-plugin-react
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"rollup
|
|
69
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
70
|
+
"@types/node": "^22.14.0",
|
|
71
|
+
"@typescript-eslint/eslint-plugin": "^8.29.1",
|
|
72
|
+
"@typescript-eslint/parser": "^8.29.1",
|
|
73
|
+
"eslint": "8.57.1",
|
|
74
|
+
"eslint-config-prettier": "^10.1.2",
|
|
75
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
76
|
+
"eslint-plugin-prettier": "^5.2.6",
|
|
77
|
+
"eslint-plugin-react": "^7.37.5",
|
|
78
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
79
|
+
"prettier": "^3.5.3",
|
|
80
|
+
"rollup": "^4.39.0",
|
|
81
|
+
"rollup-plugin-delete": "^2.2.0",
|
|
83
82
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
84
|
-
"rollup-plugin-
|
|
83
|
+
"rollup-plugin-scss": "^4.0.1",
|
|
85
84
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
86
|
-
"sass": "^1.
|
|
87
|
-
"typescript": "^5.
|
|
85
|
+
"sass": "^1.86.3",
|
|
86
|
+
"typescript": "^5.8.3"
|
|
88
87
|
}
|
|
89
88
|
}
|