es-grid-template 0.1.2-1 → 0.1.2-2
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/es/grid-component/TableGrid.js +2 -1
- package/es/grid-component/hooks/useColumns/index.js +4 -3
- package/es/grid-component/styles.scss +12 -0
- package/es/grid-component/table/Grid.js +0 -1
- package/es/grid-component/table/GridEdit.js +2 -1
- package/lib/grid-component/TableGrid.js +2 -1
- package/lib/grid-component/hooks/useColumns/index.js +4 -3
- package/lib/grid-component/styles.scss +12 -0
- package/lib/grid-component/table/Grid.js +0 -1
- package/lib/grid-component/table/GridEdit.js +2 -1
- package/package.json +102 -102
|
@@ -97,6 +97,7 @@ const TableGrid = props => {
|
|
|
97
97
|
t,
|
|
98
98
|
lang,
|
|
99
99
|
contextMenuOpen,
|
|
100
|
+
className,
|
|
100
101
|
contextMenuItems: propContextMenuItems,
|
|
101
102
|
contextMenuHidden,
|
|
102
103
|
contextMenuClick,
|
|
@@ -322,7 +323,7 @@ const TableGrid = props => {
|
|
|
322
323
|
dataSource: dataSource
|
|
323
324
|
// className={styles.customTable}
|
|
324
325
|
,
|
|
325
|
-
className: classNames(
|
|
326
|
+
className: classNames(className, {
|
|
326
327
|
'table-none-column-select': selectionSettings?.mode === undefined && selectionSettings?.type !== 'multiple'
|
|
327
328
|
}, styles.customTable),
|
|
328
329
|
bordered: true,
|
|
@@ -166,8 +166,9 @@ export const renderFilter = (column, selectedKeys, setSelectedKeys, confirm, vis
|
|
|
166
166
|
height: '100%'
|
|
167
167
|
},
|
|
168
168
|
value: dateValue,
|
|
169
|
-
defaultValue: dateValue
|
|
170
|
-
placeholder: column?.placeholder
|
|
169
|
+
defaultValue: dateValue
|
|
170
|
+
// placeholder={t ? t(column?.placeholder) : column?.placeholder}
|
|
171
|
+
,
|
|
171
172
|
onChange: (date, dateString) => {
|
|
172
173
|
const newDateValue = dateString ? moment(convertDayjsToDate(dateString, dateFormat)).format() : null;
|
|
173
174
|
setSelectedKeys(newDateValue ? [newDateValue] : []);
|
|
@@ -413,7 +414,7 @@ export const renderFilter = (column, selectedKeys, setSelectedKeys, confirm, vis
|
|
|
413
414
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
414
415
|
className: 'mb-1'
|
|
415
416
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
416
|
-
placeholder: `Search
|
|
417
|
+
placeholder: `Search`,
|
|
417
418
|
value: selectedKeys[0],
|
|
418
419
|
onChange: e => setSelectedKeys(e.target.value ? [e.target.value] : [])
|
|
419
420
|
// onPressEnter={() => handleSearch(selectedKeys as string[], confirm)}
|
|
@@ -29,6 +29,18 @@ $rowSelectedHoverBg: 'ui-rc' !default;
|
|
|
29
29
|
|
|
30
30
|
.#{$prefix}-table-wrapper {
|
|
31
31
|
|
|
32
|
+
&.table-none-column-select {
|
|
33
|
+
.#{$prefix}-table-cell {
|
|
34
|
+
&.#{$prefix}-table-selection-column {
|
|
35
|
+
padding: 0 !important;
|
|
36
|
+
overflow: hidden !important;
|
|
37
|
+
border-inline-end: 0 !important;
|
|
38
|
+
//flex: 0 0 0 !important;
|
|
39
|
+
//width: 0 !important;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
32
44
|
.#{$prefix}-table-tbody-virtual {
|
|
33
45
|
.#{$prefix}-table-cell {
|
|
34
46
|
border-bottom: 1px solid $tableBorderColor;
|
|
@@ -36,6 +36,7 @@ const GridEdit = props => {
|
|
|
36
36
|
onCellChange,
|
|
37
37
|
style,
|
|
38
38
|
getRowKey,
|
|
39
|
+
className,
|
|
39
40
|
...rest
|
|
40
41
|
} = props;
|
|
41
42
|
|
|
@@ -767,7 +768,7 @@ const GridEdit = props => {
|
|
|
767
768
|
cell: EditableCell
|
|
768
769
|
}
|
|
769
770
|
},
|
|
770
|
-
className: 'grid-editable',
|
|
771
|
+
className: classNames(className, 'grid-editable'),
|
|
771
772
|
rowKey: rowKey,
|
|
772
773
|
columns: resizableColumns,
|
|
773
774
|
showSorterTooltip: {
|
|
@@ -104,6 +104,7 @@ const TableGrid = props => {
|
|
|
104
104
|
t,
|
|
105
105
|
lang,
|
|
106
106
|
contextMenuOpen,
|
|
107
|
+
className,
|
|
107
108
|
contextMenuItems: propContextMenuItems,
|
|
108
109
|
contextMenuHidden,
|
|
109
110
|
contextMenuClick,
|
|
@@ -329,7 +330,7 @@ const TableGrid = props => {
|
|
|
329
330
|
dataSource: dataSource
|
|
330
331
|
// className={styles.customTable}
|
|
331
332
|
,
|
|
332
|
-
className: (0, _classnames.default)(
|
|
333
|
+
className: (0, _classnames.default)(className, {
|
|
333
334
|
'table-none-column-select': selectionSettings?.mode === undefined && selectionSettings?.type !== 'multiple'
|
|
334
335
|
}, styles.customTable),
|
|
335
336
|
bordered: true,
|
|
@@ -178,8 +178,9 @@ const renderFilter = (column, selectedKeys, setSelectedKeys, confirm, visible, s
|
|
|
178
178
|
height: '100%'
|
|
179
179
|
},
|
|
180
180
|
value: dateValue,
|
|
181
|
-
defaultValue: dateValue
|
|
182
|
-
placeholder: column?.placeholder
|
|
181
|
+
defaultValue: dateValue
|
|
182
|
+
// placeholder={t ? t(column?.placeholder) : column?.placeholder}
|
|
183
|
+
,
|
|
183
184
|
onChange: (date, dateString) => {
|
|
184
185
|
const newDateValue = dateString ? (0, _moment.default)((0, _utils.convertDayjsToDate)(dateString, dateFormat)).format() : null;
|
|
185
186
|
setSelectedKeys(newDateValue ? [newDateValue] : []);
|
|
@@ -425,7 +426,7 @@ const renderFilter = (column, selectedKeys, setSelectedKeys, confirm, visible, s
|
|
|
425
426
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
426
427
|
className: 'mb-1'
|
|
427
428
|
}, /*#__PURE__*/_react.default.createElement(_rcMasterUi.Input, {
|
|
428
|
-
placeholder: `Search
|
|
429
|
+
placeholder: `Search`,
|
|
429
430
|
value: selectedKeys[0],
|
|
430
431
|
onChange: e => setSelectedKeys(e.target.value ? [e.target.value] : [])
|
|
431
432
|
// onPressEnter={() => handleSearch(selectedKeys as string[], confirm)}
|
|
@@ -29,6 +29,18 @@ $rowSelectedHoverBg: 'ui-rc' !default;
|
|
|
29
29
|
|
|
30
30
|
.#{$prefix}-table-wrapper {
|
|
31
31
|
|
|
32
|
+
&.table-none-column-select {
|
|
33
|
+
.#{$prefix}-table-cell {
|
|
34
|
+
&.#{$prefix}-table-selection-column {
|
|
35
|
+
padding: 0 !important;
|
|
36
|
+
overflow: hidden !important;
|
|
37
|
+
border-inline-end: 0 !important;
|
|
38
|
+
//flex: 0 0 0 !important;
|
|
39
|
+
//width: 0 !important;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
32
44
|
.#{$prefix}-table-tbody-virtual {
|
|
33
45
|
.#{$prefix}-table-cell {
|
|
34
46
|
border-bottom: 1px solid $tableBorderColor;
|
|
@@ -45,6 +45,7 @@ const GridEdit = props => {
|
|
|
45
45
|
onCellChange,
|
|
46
46
|
style,
|
|
47
47
|
getRowKey,
|
|
48
|
+
className,
|
|
48
49
|
...rest
|
|
49
50
|
} = props;
|
|
50
51
|
|
|
@@ -776,7 +777,7 @@ const GridEdit = props => {
|
|
|
776
777
|
cell: _EditableCell.default
|
|
777
778
|
}
|
|
778
779
|
},
|
|
779
|
-
className: 'grid-editable',
|
|
780
|
+
className: (0, _classnames.default)(className, 'grid-editable'),
|
|
780
781
|
rowKey: rowKey,
|
|
781
782
|
columns: resizableColumns,
|
|
782
783
|
showSorterTooltip: {
|
package/package.json
CHANGED
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "es-grid-template",
|
|
3
|
-
"version": "0.1.2-
|
|
4
|
-
"description": "es-grid-template",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"react",
|
|
7
|
-
"react-component",
|
|
8
|
-
"grid",
|
|
9
|
-
"table"
|
|
10
|
-
],
|
|
11
|
-
"license": "MIT",
|
|
12
|
-
"main": "lib/index",
|
|
13
|
-
"module": "es/index",
|
|
14
|
-
"files": [
|
|
15
|
-
"lib",
|
|
16
|
-
"es",
|
|
17
|
-
"assets/*.css",
|
|
18
|
-
"assets/*.less"
|
|
19
|
-
],
|
|
20
|
-
"scripts": {
|
|
21
|
-
"compile": "father build",
|
|
22
|
-
"docs:build": "dumi build",
|
|
23
|
-
"__docs:deploy": "gh-pages -d dist",
|
|
24
|
-
"lint": "eslint src/ --ext .tsx,.ts,.jsx,.js",
|
|
25
|
-
"now-build": "npm run docs:build",
|
|
26
|
-
"prepare": "dumi setup",
|
|
27
|
-
"prepublishOnly": "npm run compile",
|
|
28
|
-
"postpublish": "npm run docs:build",
|
|
29
|
-
"__postpublish": "npm run docs:build && npm run docs:deploy",
|
|
30
|
-
"start": "dumi dev",
|
|
31
|
-
"test": "vitest --watch false",
|
|
32
|
-
"coverage": "vitest run --coverage"
|
|
33
|
-
},
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"@ant-design/colors": "^8.0.0",
|
|
36
|
-
"@ant-design/cssinjs": "^1.22.0",
|
|
37
|
-
"@ant-design/cssinjs-utils": "^1.1.1",
|
|
38
|
-
"@ant-design/icons": "^5.5.2",
|
|
39
|
-
"@babel/runtime": "^7.11.2",
|
|
40
|
-
"@core-rc/rc-select": "^0.0.8",
|
|
41
|
-
"@ctrl/tinycolor": "^3.6.1",
|
|
42
|
-
"@faker-js/faker": "^9.5.0",
|
|
43
|
-
"@floating-ui/react": "^0.27.5",
|
|
44
|
-
"@rc-component/color-picker": "^2.0.1",
|
|
45
|
-
"@rc-component/father-plugin": "^2.0.1",
|
|
46
|
-
"@rc-component/trigger": "^2.0.0",
|
|
47
|
-
"@rc-component/util": "^1.0.1",
|
|
48
|
-
"@types/react-resizable": "^3.0.8",
|
|
49
|
-
"@types/styled-components": "^5.1.34",
|
|
50
|
-
"@vitest/coverage-v8": "^2.0.5",
|
|
51
|
-
"antd": "^5.24.1",
|
|
52
|
-
"antd-style": "^3.7.1",
|
|
53
|
-
"becoxy-icons": "^1.9.9",
|
|
54
|
-
"classnames": "^2.3.1",
|
|
55
|
-
"dayjs": "^1.11.13",
|
|
56
|
-
"lodash": "^4.17.21",
|
|
57
|
-
"moment": "^2.30.1",
|
|
58
|
-
"postcss": "^8.4.35",
|
|
59
|
-
"rc-checkbox": "^3.5.0",
|
|
60
|
-
"rc-dropdown": "^4.2.1",
|
|
61
|
-
"rc-field-form": "^2.6.0",
|
|
62
|
-
"rc-master-ui": "^1.1.8",
|
|
63
|
-
"rc-select": "^14.16.3",
|
|
64
|
-
"rc-tooltip": "^6.3.0",
|
|
65
|
-
"rc-tree": "^5.10.1",
|
|
66
|
-
"rc-tree-select": "^5.24.5",
|
|
67
|
-
"react-hook-form": "^7.54.2",
|
|
68
|
-
"react-hot-toast": "^2.5.2",
|
|
69
|
-
"react-numeric-component": "^1.0.7",
|
|
70
|
-
"react-resizable": "^3.0.5",
|
|
71
|
-
"sass": "^1.81.0",
|
|
72
|
-
"styled-components": "^6.1.15",
|
|
73
|
-
"throttle-debounce": "^5.0.2",
|
|
74
|
-
"vitest": "^2.0.5"
|
|
75
|
-
},
|
|
76
|
-
"devDependencies": {
|
|
77
|
-
"@babel/cli": "^7.26.4",
|
|
78
|
-
"@babel/preset-env": "^7.26.9",
|
|
79
|
-
"@rc-component/np": "^1.0.3",
|
|
80
|
-
"@testing-library/react": "^14.0.0",
|
|
81
|
-
"@types/jest": "^29.4.0",
|
|
82
|
-
"@types/react": "^18.0.26",
|
|
83
|
-
"@types/react-dom": "^18.0.10",
|
|
84
|
-
"@types/warning": "^3.0.0",
|
|
85
|
-
"cross-env": "^7.0.0",
|
|
86
|
-
"dumi": "^2.2.13",
|
|
87
|
-
"eslint": "^8.56.0",
|
|
88
|
-
"eslint-plugin-unicorn": "^55.0.0",
|
|
89
|
-
"father": "^4.0.0",
|
|
90
|
-
"gh-pages": "^3.1.0",
|
|
91
|
-
"less": "^4.1.1",
|
|
92
|
-
"np": "^7.1.0",
|
|
93
|
-
"rc-test": "^7.0.9",
|
|
94
|
-
"react": "^18.2.0",
|
|
95
|
-
"react-dom": "^18.2.0",
|
|
96
|
-
"typescript": "^4.0.5"
|
|
97
|
-
},
|
|
98
|
-
"peerDependencies": {
|
|
99
|
-
"react": ">=16.9.0",
|
|
100
|
-
"react-dom": ">=16.9.0"
|
|
101
|
-
}
|
|
102
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "es-grid-template",
|
|
3
|
+
"version": "0.1.2-2",
|
|
4
|
+
"description": "es-grid-template",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"react-component",
|
|
8
|
+
"grid",
|
|
9
|
+
"table"
|
|
10
|
+
],
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"main": "lib/index",
|
|
13
|
+
"module": "es/index",
|
|
14
|
+
"files": [
|
|
15
|
+
"lib",
|
|
16
|
+
"es",
|
|
17
|
+
"assets/*.css",
|
|
18
|
+
"assets/*.less"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"compile": "father build",
|
|
22
|
+
"docs:build": "dumi build",
|
|
23
|
+
"__docs:deploy": "gh-pages -d dist",
|
|
24
|
+
"lint": "eslint src/ --ext .tsx,.ts,.jsx,.js",
|
|
25
|
+
"now-build": "npm run docs:build",
|
|
26
|
+
"prepare": "dumi setup",
|
|
27
|
+
"prepublishOnly": "npm run compile",
|
|
28
|
+
"postpublish": "npm run docs:build",
|
|
29
|
+
"__postpublish": "npm run docs:build && npm run docs:deploy",
|
|
30
|
+
"start": "dumi dev",
|
|
31
|
+
"test": "vitest --watch false",
|
|
32
|
+
"coverage": "vitest run --coverage"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@ant-design/colors": "^8.0.0",
|
|
36
|
+
"@ant-design/cssinjs": "^1.22.0",
|
|
37
|
+
"@ant-design/cssinjs-utils": "^1.1.1",
|
|
38
|
+
"@ant-design/icons": "^5.5.2",
|
|
39
|
+
"@babel/runtime": "^7.11.2",
|
|
40
|
+
"@core-rc/rc-select": "^0.0.8",
|
|
41
|
+
"@ctrl/tinycolor": "^3.6.1",
|
|
42
|
+
"@faker-js/faker": "^9.5.0",
|
|
43
|
+
"@floating-ui/react": "^0.27.5",
|
|
44
|
+
"@rc-component/color-picker": "^2.0.1",
|
|
45
|
+
"@rc-component/father-plugin": "^2.0.1",
|
|
46
|
+
"@rc-component/trigger": "^2.0.0",
|
|
47
|
+
"@rc-component/util": "^1.0.1",
|
|
48
|
+
"@types/react-resizable": "^3.0.8",
|
|
49
|
+
"@types/styled-components": "^5.1.34",
|
|
50
|
+
"@vitest/coverage-v8": "^2.0.5",
|
|
51
|
+
"antd": "^5.24.1",
|
|
52
|
+
"antd-style": "^3.7.1",
|
|
53
|
+
"becoxy-icons": "^1.9.9",
|
|
54
|
+
"classnames": "^2.3.1",
|
|
55
|
+
"dayjs": "^1.11.13",
|
|
56
|
+
"lodash": "^4.17.21",
|
|
57
|
+
"moment": "^2.30.1",
|
|
58
|
+
"postcss": "^8.4.35",
|
|
59
|
+
"rc-checkbox": "^3.5.0",
|
|
60
|
+
"rc-dropdown": "^4.2.1",
|
|
61
|
+
"rc-field-form": "^2.6.0",
|
|
62
|
+
"rc-master-ui": "^1.1.8",
|
|
63
|
+
"rc-select": "^14.16.3",
|
|
64
|
+
"rc-tooltip": "^6.3.0",
|
|
65
|
+
"rc-tree": "^5.10.1",
|
|
66
|
+
"rc-tree-select": "^5.24.5",
|
|
67
|
+
"react-hook-form": "^7.54.2",
|
|
68
|
+
"react-hot-toast": "^2.5.2",
|
|
69
|
+
"react-numeric-component": "^1.0.7",
|
|
70
|
+
"react-resizable": "^3.0.5",
|
|
71
|
+
"sass": "^1.81.0",
|
|
72
|
+
"styled-components": "^6.1.15",
|
|
73
|
+
"throttle-debounce": "^5.0.2",
|
|
74
|
+
"vitest": "^2.0.5"
|
|
75
|
+
},
|
|
76
|
+
"devDependencies": {
|
|
77
|
+
"@babel/cli": "^7.26.4",
|
|
78
|
+
"@babel/preset-env": "^7.26.9",
|
|
79
|
+
"@rc-component/np": "^1.0.3",
|
|
80
|
+
"@testing-library/react": "^14.0.0",
|
|
81
|
+
"@types/jest": "^29.4.0",
|
|
82
|
+
"@types/react": "^18.0.26",
|
|
83
|
+
"@types/react-dom": "^18.0.10",
|
|
84
|
+
"@types/warning": "^3.0.0",
|
|
85
|
+
"cross-env": "^7.0.0",
|
|
86
|
+
"dumi": "^2.2.13",
|
|
87
|
+
"eslint": "^8.56.0",
|
|
88
|
+
"eslint-plugin-unicorn": "^55.0.0",
|
|
89
|
+
"father": "^4.0.0",
|
|
90
|
+
"gh-pages": "^3.1.0",
|
|
91
|
+
"less": "^4.1.1",
|
|
92
|
+
"np": "^7.1.0",
|
|
93
|
+
"rc-test": "^7.0.9",
|
|
94
|
+
"react": "^18.2.0",
|
|
95
|
+
"react-dom": "^18.2.0",
|
|
96
|
+
"typescript": "^4.0.5"
|
|
97
|
+
},
|
|
98
|
+
"peerDependencies": {
|
|
99
|
+
"react": ">=16.9.0",
|
|
100
|
+
"react-dom": ">=16.9.0"
|
|
101
|
+
}
|
|
102
|
+
}
|