react-table-edit 1.4.23 → 1.4.25
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/dist/component/table/header.d.ts +15 -5
- package/dist/component/table/index.d.ts +3 -0
- package/dist/component/type/index.d.ts +12 -0
- package/dist/component/utils.d.ts +4 -0
- package/dist/component/virtualized-table/index.d.ts +1 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +199 -145
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +199 -145
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,22 +1,32 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import { IHeaderColumnTable } from "../type";
|
|
2
|
+
import { IFFilterTable, IFOrderTable, IFTableEditFormat, IHeaderColumnTable } from "../type";
|
|
3
3
|
import 'react-resizable/css/styles.css';
|
|
4
4
|
type IFDataProps = {
|
|
5
|
+
idTable: string;
|
|
5
6
|
selectEnable: boolean;
|
|
6
7
|
dataSource: any[];
|
|
7
8
|
setSelectedRows: Dispatch<SetStateAction<any[]>>;
|
|
8
9
|
col: IHeaderColumnTable;
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
columns: IHeaderColumnTable[];
|
|
11
|
+
setColumns?: (columns: IHeaderColumnTable[]) => void;
|
|
12
|
+
changeFilter: (data: IFFilterTable[]) => void;
|
|
13
|
+
changeOrder: (data: IFOrderTable[]) => void;
|
|
11
14
|
indexCol: number;
|
|
12
15
|
indexParent: number;
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
objHeaderWidthFixLeft: any;
|
|
17
|
+
objHeaderWidthFixRight: any;
|
|
15
18
|
totalCount: number;
|
|
16
19
|
lastObjWidthFixLeft: number;
|
|
17
20
|
fisrtObjWidthFixRight: number;
|
|
18
21
|
selectedRows: any[];
|
|
19
22
|
isMulti: boolean;
|
|
23
|
+
allowFilter?: boolean;
|
|
24
|
+
allowOrder?: boolean;
|
|
25
|
+
filterBy: IFFilterTable[];
|
|
26
|
+
orderBy: IFOrderTable[];
|
|
27
|
+
container: any;
|
|
28
|
+
optionsFilter: any;
|
|
29
|
+
formatSetting?: IFTableEditFormat;
|
|
20
30
|
};
|
|
21
31
|
declare const HeaderTableCol: (props: IFDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
32
|
export default HeaderTableCol;
|
|
@@ -23,6 +23,9 @@ export type IFTableEditProps = {
|
|
|
23
23
|
searchSetting?: IFTableEditSearchSetting;
|
|
24
24
|
selectedItem?: any;
|
|
25
25
|
setDataSource?: any;
|
|
26
|
+
allowFilter?: boolean;
|
|
27
|
+
allowOrder?: boolean;
|
|
28
|
+
optionsFilter?: any;
|
|
26
29
|
setSelectedItem?: Dispatch<SetStateAction<any>>;
|
|
27
30
|
commandClick?: (data: any) => void;
|
|
28
31
|
handleSelect?: (data: any) => void;
|
|
@@ -159,6 +159,10 @@ export type IColumnTable = {
|
|
|
159
159
|
columns?: IColumnTable[];
|
|
160
160
|
/** Không cho phép dán giá trị */
|
|
161
161
|
disablePaste?: boolean;
|
|
162
|
+
/** Kiểu lọc cột */
|
|
163
|
+
filterType?: IFilterType;
|
|
164
|
+
/** Cho phép lọc cột */
|
|
165
|
+
allowFilter?: boolean;
|
|
162
166
|
/**Giá trị trường callback khi copy xuống các dòng dưới */
|
|
163
167
|
callbackValue?: (row: any) => any;
|
|
164
168
|
/** Validate giá trị */
|
|
@@ -284,8 +288,16 @@ export type IHeaderColumnTable = {
|
|
|
284
288
|
columns?: IColumnTable[];
|
|
285
289
|
/** Căn lề */
|
|
286
290
|
textAlign?: ITextAlign;
|
|
291
|
+
/** Kiểu lọc cột */
|
|
292
|
+
filterType?: IFilterType;
|
|
293
|
+
/** Cho phép lọc cột */
|
|
294
|
+
allowFilter?: boolean;
|
|
287
295
|
/** Cố định trái/phải */
|
|
288
296
|
fixedType?: 'left' | 'right' | undefined;
|
|
297
|
+
/** Cấu hình cho kiểu numeric */
|
|
298
|
+
numericSettings?: ISettingNumericElement;
|
|
299
|
+
/** Kiểu chỉnh sửa */
|
|
300
|
+
editType?: IEditType;
|
|
289
301
|
/** Thứ tự cột */
|
|
290
302
|
index?: number;
|
|
291
303
|
};
|
|
@@ -45,4 +45,8 @@ export declare const calculateTableStructure: (columns: any[]) => {
|
|
|
45
45
|
objWidthFixRight: Record<number, number>;
|
|
46
46
|
lastObjWidthFixLeft: number;
|
|
47
47
|
fisrtObjWidthFixRight: number;
|
|
48
|
+
objHeaderWidthFixRight: Record<string, number>;
|
|
49
|
+
objHeaderWidthFixLeft: Record<string, number>;
|
|
50
|
+
firstEdit: any;
|
|
51
|
+
lastEdit: any;
|
|
48
52
|
};
|
|
@@ -12,11 +12,11 @@ type VirtualTableProps = {
|
|
|
12
12
|
formatSetting?: IFTableEditFormat;
|
|
13
13
|
allowFilter?: boolean;
|
|
14
14
|
allowOrder?: boolean;
|
|
15
|
+
optionsFilter?: any;
|
|
15
16
|
pagingSetting?: IFTableEditPaging;
|
|
16
17
|
toolbarSetting?: IFTableEditToolbar;
|
|
17
18
|
searchSetting?: IFTableEditSearchSetting;
|
|
18
19
|
columnsAggregate?: IColumnsVirtualizedAgg[];
|
|
19
|
-
optionsFilter?: any;
|
|
20
20
|
setColumns?: (columns: IColumnVirtualizedTable[]) => void;
|
|
21
21
|
commandClick?: (data: any) => void;
|
|
22
22
|
changeFilter?: (data: IFFilterTable[]) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -163,6 +163,10 @@ type IColumnTable = {
|
|
|
163
163
|
columns?: IColumnTable[];
|
|
164
164
|
/** Không cho phép dán giá trị */
|
|
165
165
|
disablePaste?: boolean;
|
|
166
|
+
/** Kiểu lọc cột */
|
|
167
|
+
filterType?: IFilterType;
|
|
168
|
+
/** Cho phép lọc cột */
|
|
169
|
+
allowFilter?: boolean;
|
|
166
170
|
/**Giá trị trường callback khi copy xuống các dòng dưới */
|
|
167
171
|
callbackValue?: (row: any) => any;
|
|
168
172
|
/** Validate giá trị */
|
|
@@ -288,8 +292,16 @@ type IHeaderColumnTable = {
|
|
|
288
292
|
columns?: IColumnTable[];
|
|
289
293
|
/** Căn lề */
|
|
290
294
|
textAlign?: ITextAlign;
|
|
295
|
+
/** Kiểu lọc cột */
|
|
296
|
+
filterType?: IFilterType;
|
|
297
|
+
/** Cho phép lọc cột */
|
|
298
|
+
allowFilter?: boolean;
|
|
291
299
|
/** Cố định trái/phải */
|
|
292
300
|
fixedType?: 'left' | 'right' | undefined;
|
|
301
|
+
/** Cấu hình cho kiểu numeric */
|
|
302
|
+
numericSettings?: ISettingNumericElement;
|
|
303
|
+
/** Kiểu chỉnh sửa */
|
|
304
|
+
editType?: IEditType;
|
|
293
305
|
/** Thứ tự cột */
|
|
294
306
|
index?: number;
|
|
295
307
|
};
|
|
@@ -433,6 +445,9 @@ type IFTableEditProps = {
|
|
|
433
445
|
searchSetting?: IFTableEditSearchSetting;
|
|
434
446
|
selectedItem?: any;
|
|
435
447
|
setDataSource?: any;
|
|
448
|
+
allowFilter?: boolean;
|
|
449
|
+
allowOrder?: boolean;
|
|
450
|
+
optionsFilter?: any;
|
|
436
451
|
setSelectedItem?: Dispatch<SetStateAction<any>>;
|
|
437
452
|
commandClick?: (data: any) => void;
|
|
438
453
|
handleSelect?: (data: any) => void;
|
|
@@ -501,6 +516,10 @@ declare const calculateTableStructure: (columns: any[]) => {
|
|
|
501
516
|
objWidthFixRight: Record<number, number>;
|
|
502
517
|
lastObjWidthFixLeft: number;
|
|
503
518
|
fisrtObjWidthFixRight: number;
|
|
519
|
+
objHeaderWidthFixRight: Record<string, number>;
|
|
520
|
+
objHeaderWidthFixLeft: Record<string, number>;
|
|
521
|
+
firstEdit: any;
|
|
522
|
+
lastEdit: any;
|
|
504
523
|
};
|
|
505
524
|
|
|
506
525
|
type IFDataProps$1 = {
|
|
@@ -722,11 +741,11 @@ type VirtualTableProps = {
|
|
|
722
741
|
formatSetting?: IFTableEditFormat;
|
|
723
742
|
allowFilter?: boolean;
|
|
724
743
|
allowOrder?: boolean;
|
|
744
|
+
optionsFilter?: any;
|
|
725
745
|
pagingSetting?: IFTableEditPaging;
|
|
726
746
|
toolbarSetting?: IFTableEditToolbar;
|
|
727
747
|
searchSetting?: IFTableEditSearchSetting;
|
|
728
748
|
columnsAggregate?: IColumnsVirtualizedAgg[];
|
|
729
|
-
optionsFilter?: any;
|
|
730
749
|
setColumns?: (columns: IColumnVirtualizedTable[]) => void;
|
|
731
750
|
commandClick?: (data: any) => void;
|
|
732
751
|
changeFilter?: (data: IFFilterTable[]) => void;
|