@pdg/react-table 1.0.93 → 1.0.95
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 +10 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +28 -2
- package/dist/index.js +28 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,7 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
React Table
|
|
4
4
|
|
|
5
|
+
## Demo
|
|
6
|
+
|
|
7
|
+
https://parkdigy.github.io/react-table/
|
|
8
|
+
|
|
5
9
|
## 설치
|
|
6
|
-
```
|
|
10
|
+
```shell
|
|
7
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/react-copy-to-clipboard @types/uuid classnames dayjs react-copy-to-clipboard react-number-format react-resize-detector simplebar-react uuid
|
|
8
12
|
```
|
|
13
|
+
|
|
14
|
+
### simplebar-react css 추가
|
|
15
|
+
```
|
|
16
|
+
import 'simplebar-react/dist/simplebar.min.css';
|
|
17
|
+
```
|
package/dist/index.d.ts
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
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 {v4}from'uuid';import SimpleBar from'simplebar-react';import'simplebar-react/dist/simplebar.min.css';import {Search,SearchGroup,FormHidden}from'@pdg/react-form';import {PdgButton,PdgIcon}from'@pdg/react-component';import {CopyToClipboard}from'react-copy-to-clipboard'
|
|
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 {v4}from'uuid';import SimpleBar from'simplebar-react';import'simplebar-react/dist/simplebar.min.css';import {Search,SearchGroup,FormHidden}from'@pdg/react-form';import {PdgButton,PdgIcon}from'@pdg/react-component';import {CopyToClipboard}from'react-copy-to-clipboard';function styleInject(css, ref) {
|
|
2
|
+
if ( ref === void 0 ) ref = {};
|
|
3
|
+
var insertAt = ref.insertAt;
|
|
4
|
+
|
|
5
|
+
if (!css || 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);/******************************************************************************
|
|
2
28
|
Copyright (c) Microsoft Corporation.
|
|
3
29
|
|
|
4
30
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -1736,7 +1762,7 @@ SearchTable.defaultProps = SearchTableDefaultProps;var TableButtonDefaultProps =
|
|
|
1736
1762
|
* Memo
|
|
1737
1763
|
* ******************************************************************************************************************/
|
|
1738
1764
|
var children = _a.children, className = _a.className, initSx = _a.sx, color = _a.color, icon = _a.icon, startIcon = _a.startIcon, endIcon = _a.endIcon, onClick = _a.onClick, props = __rest(_a, ["children", "className", "sx", "color", "icon", "startIcon", "endIcon", "onClick"]);
|
|
1739
|
-
var sx = useMemo(function () { return (__assign({ minWidth: 0, px:
|
|
1765
|
+
var sx = useMemo(function () { return (__assign({ minWidth: 0, px: '5px !important' }, initSx)); }, [initSx]);
|
|
1740
1766
|
/********************************************************************************************************************
|
|
1741
1767
|
* Render
|
|
1742
1768
|
* ******************************************************************************************************************/
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
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'),uuid=require('uuid'),SimpleBar=require('simplebar-react');require('simplebar-react/dist/simplebar.min.css');var reactForm=require('@pdg/react-form'),reactComponent=require('@pdg/react-component'),reactCopyToClipboard=require('react-copy-to-clipboard')
|
|
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'),uuid=require('uuid'),SimpleBar=require('simplebar-react');require('simplebar-react/dist/simplebar.min.css');var reactForm=require('@pdg/react-form'),reactComponent=require('@pdg/react-component'),reactCopyToClipboard=require('react-copy-to-clipboard');function styleInject(css, ref) {
|
|
2
|
+
if ( ref === void 0 ) ref = {};
|
|
3
|
+
var insertAt = ref.insertAt;
|
|
4
|
+
|
|
5
|
+
if (!css || 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);/******************************************************************************
|
|
2
28
|
Copyright (c) Microsoft Corporation.
|
|
3
29
|
|
|
4
30
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -1736,7 +1762,7 @@ SearchTable.defaultProps = SearchTableDefaultProps;var TableButtonDefaultProps =
|
|
|
1736
1762
|
* Memo
|
|
1737
1763
|
* ******************************************************************************************************************/
|
|
1738
1764
|
var children = _a.children, className = _a.className, initSx = _a.sx, color = _a.color, icon = _a.icon, startIcon = _a.startIcon, endIcon = _a.endIcon, onClick = _a.onClick, props = __rest(_a, ["children", "className", "sx", "color", "icon", "startIcon", "endIcon", "onClick"]);
|
|
1739
|
-
var sx = React.useMemo(function () { return (__assign({ minWidth: 0, px:
|
|
1765
|
+
var sx = React.useMemo(function () { return (__assign({ minWidth: 0, px: '5px !important' }, initSx)); }, [initSx]);
|
|
1740
1766
|
/********************************************************************************************************************
|
|
1741
1767
|
* Render
|
|
1742
1768
|
* ******************************************************************************************************************/
|
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.95",
|
|
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": "^5.15.13",
|
|
48
48
|
"@mui/material": "^5.15.13",
|
|
49
49
|
"@mui/x-date-pickers": "^6.19.7",
|
|
50
|
-
"@pdg/react-component": "^1.0.
|
|
51
|
-
"@pdg/react-form": "^1.0.
|
|
50
|
+
"@pdg/react-component": "^1.0.15",
|
|
51
|
+
"@pdg/react-form": "^1.0.109",
|
|
52
52
|
"@pdg/react-hook": "^1.0.16",
|
|
53
53
|
"@pdg/util": "^1.0.20",
|
|
54
54
|
"@tinymce/tinymce-react": "^4.3.2",
|