@pdg/react-table 1.0.92 → 1.0.94

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 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
@@ -1,3 +1,4 @@
1
+ import './index.scss';
1
2
  export * from './@types';
2
3
  export * from './Table';
3
4
  export * from './SearchTable';
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
@@ -2064,12 +2090,12 @@ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, temp
2064
2090
  : undefined;
2065
2091
  return item.type === 'divider' ? (React.createElement(Grid, { key: idx, item: true, xs: 12 },
2066
2092
  React.createElement(Stack, { direction: 'row', spacing: 0.5, alignItems: 'center' },
2067
- item.icon && (React.createElement(PdgIcon, { sx: { color: item.dividerColor || dividerColor }, fontSize: 'small' }, item.icon)),
2093
+ item.icon && (React.createElement(PdgIcon, { sx: { color: item.dividerColor || dividerColor }, size: 'small' }, item.icon)),
2068
2094
  item.label && (React.createElement(Label, { className: classNames(labelClassName, item.labelClassName), style: __assign(__assign({}, item.labelStyle), labelStyle), sx: finalLabelSx }, item.label)),
2069
2095
  item.dividerLine && (React.createElement(React.Fragment, null, item.icon || item.label ? (React.createElement("div", { style: { flex: 1, paddingLeft: 5 } },
2070
2096
  React.createElement(Line, null))) : (React.createElement(Line, null))))))) : (React.createElement(Grid, __assign({ key: idx, item: true }, sizeProps, { className: item.className, style: item.style, sx: item.sx }),
2071
2097
  React.createElement(Stack, { direction: 'row', spacing: 0.5, alignItems: 'center' },
2072
- item.icon && (React.createElement(PdgIcon, { sx: { color: finalLabelColor }, fontSize: 'small' }, "CalendarMonth")),
2098
+ item.icon && (React.createElement(PdgIcon, { sx: { color: finalLabelColor }, size: 'small' }, "CalendarMonth")),
2073
2099
  React.createElement(Label, { className: classNames(labelClassName, item.labelClassName), style: __assign(__assign({}, item.labelStyle), labelStyle), sx: finalLabelSx }, item.label)),
2074
2100
  React.createElement(ValueWrap, { className: classNames(valueClassName, item.valueClassName), style: __assign(__assign(__assign({}, valueStyle), item.valueStyle), valueUnderlineStyle), sx: finalValueSx },
2075
2101
  item.ellipsis || ellipsis ? React.createElement(ValueEllipsis, null, data) : React.createElement(Value, null, data),
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
@@ -2064,12 +2090,12 @@ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, temp
2064
2090
  : undefined;
2065
2091
  return item.type === 'divider' ? (React.createElement(material.Grid, { key: idx, item: true, xs: 12 },
2066
2092
  React.createElement(material.Stack, { direction: 'row', spacing: 0.5, alignItems: 'center' },
2067
- item.icon && (React.createElement(reactComponent.PdgIcon, { sx: { color: item.dividerColor || dividerColor }, fontSize: 'small' }, item.icon)),
2093
+ item.icon && (React.createElement(reactComponent.PdgIcon, { sx: { color: item.dividerColor || dividerColor }, size: 'small' }, item.icon)),
2068
2094
  item.label && (React.createElement(Label, { className: classNames(labelClassName, item.labelClassName), style: __assign(__assign({}, item.labelStyle), labelStyle), sx: finalLabelSx }, item.label)),
2069
2095
  item.dividerLine && (React.createElement(React.Fragment, null, item.icon || item.label ? (React.createElement("div", { style: { flex: 1, paddingLeft: 5 } },
2070
2096
  React.createElement(Line, null))) : (React.createElement(Line, null))))))) : (React.createElement(material.Grid, __assign({ key: idx, item: true }, sizeProps, { className: item.className, style: item.style, sx: item.sx }),
2071
2097
  React.createElement(material.Stack, { direction: 'row', spacing: 0.5, alignItems: 'center' },
2072
- item.icon && (React.createElement(reactComponent.PdgIcon, { sx: { color: finalLabelColor }, fontSize: 'small' }, "CalendarMonth")),
2098
+ item.icon && (React.createElement(reactComponent.PdgIcon, { sx: { color: finalLabelColor }, size: 'small' }, "CalendarMonth")),
2073
2099
  React.createElement(Label, { className: classNames(labelClassName, item.labelClassName), style: __assign(__assign({}, item.labelStyle), labelStyle), sx: finalLabelSx }, item.label)),
2074
2100
  React.createElement(ValueWrap, { className: classNames(valueClassName, item.valueClassName), style: __assign(__assign(__assign({}, valueStyle), item.valueStyle), valueUnderlineStyle), sx: finalValueSx },
2075
2101
  item.ellipsis || ellipsis ? React.createElement(ValueEllipsis, null, data) : React.createElement(Value, null, data),
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.92",
4
+ "version": "1.0.94",
5
5
  "description": "React Table",
6
6
  "type": "module",
7
7
  "types": "dist/index.d.ts",
@@ -24,7 +24,8 @@
24
24
  "dev": "cd examples && npm run dev",
25
25
  "dev-prd-lib": "cd examples && npm run dev-prd-lib",
26
26
  "build": "rollup -c --bundleConfigAsCjs",
27
- "pub": "npm i && npm run build && npm publish --access=public && rm ./.git/hooks/pre-commit",
27
+ "build:examples": "cd examples && npm run build",
28
+ "pub": "npm i && npm run build:examples && npm run build && npm publish --access=public && rm ./.git/hooks/pre-commit",
28
29
  "lint": "eslint './src/**/*.{ts,tsx}'",
29
30
  "reinstall-module": "rm -rf node_modules && rm -f package-lock.json && npm i"
30
31
  },
@@ -46,10 +47,10 @@
46
47
  "@mui/icons-material": "^5.15.13",
47
48
  "@mui/material": "^5.15.13",
48
49
  "@mui/x-date-pickers": "^6.19.7",
49
- "@pdg/react-component": "^1.0.11",
50
- "@pdg/react-form": "^1.0.104",
51
- "@pdg/react-hook": "^1.0.15",
52
- "@pdg/util": "^1.0.19",
50
+ "@pdg/react-component": "^1.0.12",
51
+ "@pdg/react-form": "^1.0.106",
52
+ "@pdg/react-hook": "^1.0.16",
53
+ "@pdg/util": "^1.0.20",
53
54
  "@tinymce/tinymce-react": "^4.3.2",
54
55
  "@types/react": "^17.0.0 || ^18.0.0",
55
56
  "@types/react-copy-to-clipboard": "^5.0.7",