es-grid-template 1.4.0 → 1.4.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/EditableCell.js +46 -15
- package/es/grid-component/InternalTable.d.ts +1 -0
- package/es/grid-component/InternalTable.js +469 -113
- package/es/grid-component/TableGrid.js +46 -48
- package/es/grid-component/hooks/columns/index.d.ts +1 -1
- package/es/grid-component/hooks/columns/index.js +3 -13
- package/es/grid-component/hooks/useColumns.js +5 -2
- package/es/grid-component/hooks/utils.d.ts +17 -2
- package/es/grid-component/hooks/utils.js +24 -5
- package/es/grid-component/styles.scss +1186 -1170
- package/es/grid-component/table/Grid.d.ts +1 -0
- package/es/grid-component/table/GridEdit.d.ts +1 -0
- package/es/grid-component/table/GridEdit.js +190 -140
- package/es/grid-component/table/Group.d.ts +1 -0
- package/es/grid-component/type.d.ts +7 -2
- package/es/grid-component/useContext.d.ts +1 -0
- package/lib/grid-component/EditableCell.js +46 -15
- package/lib/grid-component/InternalTable.d.ts +1 -0
- package/lib/grid-component/InternalTable.js +469 -102
- package/lib/grid-component/TableGrid.js +45 -47
- package/lib/grid-component/hooks/columns/index.d.ts +1 -1
- package/lib/grid-component/hooks/columns/index.js +5 -15
- package/lib/grid-component/hooks/useColumns.js +4 -1
- package/lib/grid-component/hooks/utils.d.ts +17 -2
- package/lib/grid-component/hooks/utils.js +26 -6
- package/lib/grid-component/styles.scss +1186 -1170
- package/lib/grid-component/table/Grid.d.ts +1 -0
- package/lib/grid-component/table/GridEdit.d.ts +1 -0
- package/lib/grid-component/table/GridEdit.js +189 -139
- package/lib/grid-component/table/Group.d.ts +1 -0
- package/lib/grid-component/type.d.ts +7 -2
- package/lib/grid-component/useContext.d.ts +1 -0
- package/package.json +5 -5
|
@@ -9,6 +9,7 @@ type Props<T> = GridTableProps<T> & {
|
|
|
9
9
|
triggerGroupColumns?: (groupedColumns: string[]) => void;
|
|
10
10
|
triggerPaste?: (pastedRows: T[], pastedColumnsArray: string[], newData: T[]) => void;
|
|
11
11
|
triggerFilter?: (queries: any) => void;
|
|
12
|
+
setTooltipContent?: any;
|
|
12
13
|
};
|
|
13
14
|
declare const Group: <RecordType extends object>(props: Props<RecordType>) => React.JSX.Element;
|
|
14
15
|
export default Group;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Key, ReactElement, ReactNode } from "react";
|
|
2
2
|
import type React from "react";
|
|
3
3
|
import type { IOperator } from "./hooks";
|
|
4
|
-
import type { TypeFilter, TableProps as RcTableProps, TableColumnType as RcColumnType, EditType } from "rc-master-ui";
|
|
4
|
+
import type { TypeFilter, TableProps as RcTableProps, TableColumnType as RcColumnType, EditType, TablePaginationConfig } from "rc-master-ui";
|
|
5
5
|
import type { FilterOperator, TableRowSelection } from "rc-master-ui/es/table/interface";
|
|
6
6
|
import type { ToolbarItem as RcToolbarItem } from "rc-master-ui/es/toolbar";
|
|
7
7
|
import type { ItemType } from "rc-master-ui/es/menu/interface";
|
|
@@ -135,12 +135,13 @@ export type ColumnTemplate<RecordType> = {
|
|
|
135
135
|
field: string;
|
|
136
136
|
};
|
|
137
137
|
export type ColumnsTable<RecordType = AnyObject> = ColumnTable<RecordType>[];
|
|
138
|
-
export interface TableProps<RecordType = AnyObject> extends Omit<RcTableProps<RecordType>, 'columns' | 'rowSelection' | 'loading' | 'dataSource' | 'summary'> {
|
|
138
|
+
export interface TableProps<RecordType = AnyObject> extends Omit<RcTableProps<RecordType>, 'columns' | 'rowSelection' | 'loading' | 'dataSource' | 'summary' | 'pagination'> {
|
|
139
139
|
editAble?: boolean;
|
|
140
140
|
groupAble?: boolean;
|
|
141
141
|
groupColumns?: string[];
|
|
142
142
|
groupSetting?: IGroupSetting;
|
|
143
143
|
onChooseColumns?: (props: IOnChooseColumns) => void;
|
|
144
|
+
pagination?: false | PaginationConfig;
|
|
144
145
|
showCustomTooltip?: boolean;
|
|
145
146
|
sortMultiple?: boolean;
|
|
146
147
|
dataSource: RecordType[];
|
|
@@ -193,7 +194,11 @@ export interface TableProps<RecordType = AnyObject> extends Omit<RcTableProps<Re
|
|
|
193
194
|
onCellChange?: (args: CellChangeArgs<RecordType>, handleCallback: (rowData: any, index: any, value?: any) => void) => void;
|
|
194
195
|
onCellClick?: (args: ICellClick, callback?: any) => void;
|
|
195
196
|
rowEditable?: (rowData: RecordType) => boolean;
|
|
197
|
+
validate?: any;
|
|
196
198
|
}
|
|
199
|
+
export type PaginationConfig = TablePaginationConfig & {
|
|
200
|
+
currentPage?: number;
|
|
201
|
+
};
|
|
197
202
|
export type ICellClick = {
|
|
198
203
|
index: number;
|
|
199
204
|
indexCol?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-grid-template",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "es-grid-template",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@ant-design/colors": "^8.0.0",
|
|
37
|
-
"@ant-design/cssinjs": "^1.22.0",
|
|
38
|
-
"@ant-design/cssinjs-utils": "^1.1.1",
|
|
39
37
|
"@ant-design/icons": "^5.5.2",
|
|
40
38
|
"@babel/runtime": "^7.11.2",
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
39
|
+
"@dnd-kit/core": "^6.3.1",
|
|
40
|
+
"@dnd-kit/modifiers": "^9.0.0",
|
|
41
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
43
42
|
"@faker-js/faker": "^9.5.0",
|
|
44
43
|
"@floating-ui/react": "^0.27.5",
|
|
44
|
+
"@hookform/resolvers": "^5.0.1",
|
|
45
45
|
"@rc-component/color-picker": "^2.0.1",
|
|
46
46
|
"@rc-component/father-plugin": "^2.0.1",
|
|
47
47
|
"@rc-component/trigger": "^2.0.0",
|