es-grid-template 1.3.3 → 1.3.5
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/assets/index.css +10 -0
- package/assets/index.scss +15 -0
- package/es/grid-component/ContextMenu.js +4 -1
- package/es/grid-component/EditableCell.js +60 -18
- package/es/grid-component/TableGrid.js +5 -8
- package/es/grid-component/hooks/columns/index.js +17 -16
- package/es/grid-component/hooks/content/HeaderContent.js +3 -1
- package/es/grid-component/hooks/useColumns.js +2 -1
- package/es/grid-component/hooks/utils.d.ts +13 -0
- package/es/grid-component/hooks/utils.js +136 -4
- package/es/grid-component/number/index.d.ts +10 -0
- package/es/grid-component/number/index.js +39 -0
- package/es/grid-component/styles.scss +15 -0
- package/es/grid-component/table/GridEdit.js +597 -209
- package/es/grid-component/type.d.ts +3 -0
- package/es/grid-component/useContext.d.ts +2 -0
- package/lib/grid-component/ContextMenu.js +4 -1
- package/lib/grid-component/EditableCell.js +61 -18
- package/lib/grid-component/TableGrid.js +5 -8
- package/lib/grid-component/hooks/columns/index.js +16 -15
- package/lib/grid-component/hooks/content/HeaderContent.js +3 -1
- package/lib/grid-component/hooks/useColumns.js +2 -1
- package/lib/grid-component/hooks/utils.d.ts +13 -0
- package/lib/grid-component/hooks/utils.js +150 -7
- package/lib/grid-component/number/index.d.ts +10 -0
- package/lib/grid-component/number/index.js +47 -0
- package/lib/grid-component/styles.scss +15 -0
- package/lib/grid-component/table/GridEdit.js +585 -205
- package/lib/grid-component/type.d.ts +3 -0
- package/lib/grid-component/useContext.d.ts +2 -0
- package/package.json +109 -109
|
@@ -108,6 +108,7 @@ export type ColumnTable<RecordType = AnyObject> = Omit<RcColumnType<RecordType>,
|
|
|
108
108
|
headerTooltip?: boolean | string | (() => ReactNode | ReactElement);
|
|
109
109
|
columnGroupText?: string;
|
|
110
110
|
textAlign?: ITextAlign;
|
|
111
|
+
headerTextAlign?: ITextAlign;
|
|
111
112
|
template?: ReactNode | ReactElement | ((args: ColumnTemplate<RecordType>) => ReactNode | ReactElement);
|
|
112
113
|
showTooltip?: boolean;
|
|
113
114
|
tooltipDescription?: ReactNode | ReactElement | ((value: any, record: RecordType, index: number) => ReactNode | ReactElement);
|
|
@@ -149,6 +150,7 @@ export interface TableProps<RecordType = AnyObject> extends Omit<RcTableProps<Re
|
|
|
149
150
|
t?: any;
|
|
150
151
|
lang?: string;
|
|
151
152
|
contextMenuItems?: ContextMenuItem[];
|
|
153
|
+
showDefaultContext?: boolean;
|
|
152
154
|
contextMenuHidden?: string[] | ((args?: Omit<ContextInfo<RecordType>, 'item' | 'event'>) => string[]);
|
|
153
155
|
contextMenuOpen?: (args: Omit<ContextInfo<RecordType>, 'item'>) => void;
|
|
154
156
|
contextMenuClick?: (args: ContextInfo<RecordType>) => void;
|
|
@@ -253,6 +255,7 @@ export interface ICellPasteModel<RecordType = AnyObject> {
|
|
|
253
255
|
onPasted?: (args: IOnPastedProps, handleCallback: (callbackData: any[]) => void) => void;
|
|
254
256
|
dataChange?: (data: RecordType[]) => void;
|
|
255
257
|
getCallbackData?: (props: any) => void;
|
|
258
|
+
maxRowsPaste?: number;
|
|
256
259
|
}
|
|
257
260
|
export type SourceFilter = {
|
|
258
261
|
key: string;
|
package/package.json
CHANGED
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "es-grid-template",
|
|
3
|
-
"version": "1.3.
|
|
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/*.scss"
|
|
19
|
-
],
|
|
20
|
-
"scripts": {
|
|
21
|
-
"__compile": "father build && ",
|
|
22
|
-
"compile": "father build && sass assets/index.scss assets/index.css",
|
|
23
|
-
"docs:build": "dumi build",
|
|
24
|
-
"__docs:deploy": "gh-pages -d dist",
|
|
25
|
-
"lint": "eslint src/ --ext .tsx,.ts,.jsx,.js",
|
|
26
|
-
"now-build": "npm run docs:build",
|
|
27
|
-
"prepare": "dumi setup",
|
|
28
|
-
"prepublishOnly": "npm run compile",
|
|
29
|
-
"postpublish": "npm run docs:build",
|
|
30
|
-
"__postpublish": "npm run docs:build && npm run docs:deploy",
|
|
31
|
-
"start": "dumi dev",
|
|
32
|
-
"test": "vitest --watch false",
|
|
33
|
-
"coverage": "vitest run --coverage"
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"@ant-design/colors": "^8.0.0",
|
|
37
|
-
"@ant-design/cssinjs": "^1.22.0",
|
|
38
|
-
"@ant-design/cssinjs-utils": "^1.1.1",
|
|
39
|
-
"@ant-design/icons": "^5.5.2",
|
|
40
|
-
"@babel/runtime": "^7.11.2",
|
|
41
|
-
"@core-rc/rc-select": "^0.0.8",
|
|
42
|
-
"@ctrl/tinycolor": "^3.6.1",
|
|
43
|
-
"@faker-js/faker": "^9.5.0",
|
|
44
|
-
"@floating-ui/react": "^0.27.5",
|
|
45
|
-
"@rc-component/color-picker": "^2.0.1",
|
|
46
|
-
"@rc-component/father-plugin": "^2.0.1",
|
|
47
|
-
"@rc-component/trigger": "^2.0.0",
|
|
48
|
-
"@rc-component/util": "^1.0.1",
|
|
49
|
-
"@types/react-resizable": "^3.0.8",
|
|
50
|
-
"@types/styled-components": "^5.1.34",
|
|
51
|
-
"@vitest/coverage-v8": "^2.0.5",
|
|
52
|
-
"antd": "^5.24.1",
|
|
53
|
-
"antd-style": "^3.7.1",
|
|
54
|
-
"becoxy-icons": "^2.0.1",
|
|
55
|
-
"classnames": "^2.3.1",
|
|
56
|
-
"dayjs": "^1.11.13",
|
|
57
|
-
"lodash": "^4.17.21",
|
|
58
|
-
"moment": "^2.30.1",
|
|
59
|
-
"postcss": "^8.4.35",
|
|
60
|
-
"rc-checkbox": "^3.5.0",
|
|
61
|
-
"rc-dropdown": "^4.2.1",
|
|
62
|
-
"rc-field-form": "^2.6.0",
|
|
63
|
-
"rc-master-ui": "^1.1.
|
|
64
|
-
"rc-select": "^14.16.3",
|
|
65
|
-
"rc-tooltip": "^6.3.0",
|
|
66
|
-
"rc-tree": "^5.10.1",
|
|
67
|
-
"rc-tree-select": "^5.24.5",
|
|
68
|
-
"react-hook-form": "^7.54.2",
|
|
69
|
-
"react-hot-toast": "^2.5.2",
|
|
70
|
-
"react-numeric-component": "^1.0.7",
|
|
71
|
-
"react-resizable": "^3.0.5",
|
|
72
|
-
"react-tooltip": "^5.28.1",
|
|
73
|
-
"sass": "^1.81.0",
|
|
74
|
-
"styled-components": "^6.1.15",
|
|
75
|
-
"sweetalert2": "^11.4.14",
|
|
76
|
-
"sweetalert2-react-content": "^5.0.0",
|
|
77
|
-
"throttle-debounce": "^5.0.2",
|
|
78
|
-
"vitest": "^2.0.5"
|
|
79
|
-
},
|
|
80
|
-
"devDependencies": {
|
|
81
|
-
"@babel/cli": "^7.26.4",
|
|
82
|
-
"@babel/preset-env": "^7.26.9",
|
|
83
|
-
"@rc-component/np": "^1.0.3",
|
|
84
|
-
"@testing-library/react": "^14.0.0",
|
|
85
|
-
"@types/jest": "^29.4.0",
|
|
86
|
-
"@types/react": "^18.0.26",
|
|
87
|
-
"@types/react-dom": "^18.0.10",
|
|
88
|
-
"@types/warning": "^3.0.0",
|
|
89
|
-
"cross-env": "^7.0.0",
|
|
90
|
-
"dumi": "^2.2.13",
|
|
91
|
-
"eslint": "^8.56.0",
|
|
92
|
-
"eslint-plugin-unicorn": "^55.0.0",
|
|
93
|
-
"father": "^4.0.0",
|
|
94
|
-
"gh-pages": "^3.1.0",
|
|
95
|
-
"less": "^4.1.1",
|
|
96
|
-
"np": "^7.1.0",
|
|
97
|
-
"rc-test": "^7.0.9",
|
|
98
|
-
"react": "^18.2.0",
|
|
99
|
-
"react-dom": "^18.2.0",
|
|
100
|
-
"typescript": "^4.0.5"
|
|
101
|
-
},
|
|
102
|
-
"peerDependencies": {
|
|
103
|
-
"react": ">=16.9.0",
|
|
104
|
-
"react-dom": ">=16.9.0"
|
|
105
|
-
},
|
|
106
|
-
"umi": {
|
|
107
|
-
"configFile": "config.ts"
|
|
108
|
-
}
|
|
109
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "es-grid-template",
|
|
3
|
+
"version": "1.3.5",
|
|
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/*.scss"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"__compile": "father build && ",
|
|
22
|
+
"compile": "father build && sass assets/index.scss assets/index.css",
|
|
23
|
+
"docs:build": "dumi build",
|
|
24
|
+
"__docs:deploy": "gh-pages -d dist",
|
|
25
|
+
"lint": "eslint src/ --ext .tsx,.ts,.jsx,.js",
|
|
26
|
+
"now-build": "npm run docs:build",
|
|
27
|
+
"prepare": "dumi setup",
|
|
28
|
+
"prepublishOnly": "npm run compile",
|
|
29
|
+
"postpublish": "npm run docs:build",
|
|
30
|
+
"__postpublish": "npm run docs:build && npm run docs:deploy",
|
|
31
|
+
"start": "dumi dev",
|
|
32
|
+
"test": "vitest --watch false",
|
|
33
|
+
"coverage": "vitest run --coverage"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@ant-design/colors": "^8.0.0",
|
|
37
|
+
"@ant-design/cssinjs": "^1.22.0",
|
|
38
|
+
"@ant-design/cssinjs-utils": "^1.1.1",
|
|
39
|
+
"@ant-design/icons": "^5.5.2",
|
|
40
|
+
"@babel/runtime": "^7.11.2",
|
|
41
|
+
"@core-rc/rc-select": "^0.0.8",
|
|
42
|
+
"@ctrl/tinycolor": "^3.6.1",
|
|
43
|
+
"@faker-js/faker": "^9.5.0",
|
|
44
|
+
"@floating-ui/react": "^0.27.5",
|
|
45
|
+
"@rc-component/color-picker": "^2.0.1",
|
|
46
|
+
"@rc-component/father-plugin": "^2.0.1",
|
|
47
|
+
"@rc-component/trigger": "^2.0.0",
|
|
48
|
+
"@rc-component/util": "^1.0.1",
|
|
49
|
+
"@types/react-resizable": "^3.0.8",
|
|
50
|
+
"@types/styled-components": "^5.1.34",
|
|
51
|
+
"@vitest/coverage-v8": "^2.0.5",
|
|
52
|
+
"antd": "^5.24.1",
|
|
53
|
+
"antd-style": "^3.7.1",
|
|
54
|
+
"becoxy-icons": "^2.0.1",
|
|
55
|
+
"classnames": "^2.3.1",
|
|
56
|
+
"dayjs": "^1.11.13",
|
|
57
|
+
"lodash": "^4.17.21",
|
|
58
|
+
"moment": "^2.30.1",
|
|
59
|
+
"postcss": "^8.4.35",
|
|
60
|
+
"rc-checkbox": "^3.5.0",
|
|
61
|
+
"rc-dropdown": "^4.2.1",
|
|
62
|
+
"rc-field-form": "^2.6.0",
|
|
63
|
+
"rc-master-ui": "^1.1.24",
|
|
64
|
+
"rc-select": "^14.16.3",
|
|
65
|
+
"rc-tooltip": "^6.3.0",
|
|
66
|
+
"rc-tree": "^5.10.1",
|
|
67
|
+
"rc-tree-select": "^5.24.5",
|
|
68
|
+
"react-hook-form": "^7.54.2",
|
|
69
|
+
"react-hot-toast": "^2.5.2",
|
|
70
|
+
"react-numeric-component": "^1.0.7",
|
|
71
|
+
"react-resizable": "^3.0.5",
|
|
72
|
+
"react-tooltip": "^5.28.1",
|
|
73
|
+
"sass": "^1.81.0",
|
|
74
|
+
"styled-components": "^6.1.15",
|
|
75
|
+
"sweetalert2": "^11.4.14",
|
|
76
|
+
"sweetalert2-react-content": "^5.0.0",
|
|
77
|
+
"throttle-debounce": "^5.0.2",
|
|
78
|
+
"vitest": "^2.0.5"
|
|
79
|
+
},
|
|
80
|
+
"devDependencies": {
|
|
81
|
+
"@babel/cli": "^7.26.4",
|
|
82
|
+
"@babel/preset-env": "^7.26.9",
|
|
83
|
+
"@rc-component/np": "^1.0.3",
|
|
84
|
+
"@testing-library/react": "^14.0.0",
|
|
85
|
+
"@types/jest": "^29.4.0",
|
|
86
|
+
"@types/react": "^18.0.26",
|
|
87
|
+
"@types/react-dom": "^18.0.10",
|
|
88
|
+
"@types/warning": "^3.0.0",
|
|
89
|
+
"cross-env": "^7.0.0",
|
|
90
|
+
"dumi": "^2.2.13",
|
|
91
|
+
"eslint": "^8.56.0",
|
|
92
|
+
"eslint-plugin-unicorn": "^55.0.0",
|
|
93
|
+
"father": "^4.0.0",
|
|
94
|
+
"gh-pages": "^3.1.0",
|
|
95
|
+
"less": "^4.1.1",
|
|
96
|
+
"np": "^7.1.0",
|
|
97
|
+
"rc-test": "^7.0.9",
|
|
98
|
+
"react": "^18.2.0",
|
|
99
|
+
"react-dom": "^18.2.0",
|
|
100
|
+
"typescript": "^4.0.5"
|
|
101
|
+
},
|
|
102
|
+
"peerDependencies": {
|
|
103
|
+
"react": ">=16.9.0",
|
|
104
|
+
"react-dom": ">=16.9.0"
|
|
105
|
+
},
|
|
106
|
+
"umi": {
|
|
107
|
+
"configFile": "config.ts"
|
|
108
|
+
}
|
|
109
|
+
}
|