react-table-edit 1.5.40 → 1.5.42
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/modal-import-excel/index.d.ts +13 -1
- package/dist/component/modal-import-excel/tab-select-file.d.ts +9 -0
- package/dist/component/select-table/element.d.ts +24 -0
- package/dist/component/select-table/table.d.ts +24 -0
- package/dist/component/table/header.d.ts +1 -1
- package/dist/component/table/toolbar-top.d.ts +4 -1
- package/dist/component/table-view/content.d.ts +2 -1
- package/dist/component/table-view/index.d.ts +1 -0
- package/dist/component/table-view/table.d.ts +46 -0
- package/dist/component/type/index.d.ts +2 -0
- package/dist/index.d.ts +16 -1
- package/dist/index.js +445 -244
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +446 -245
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -48,9 +48,21 @@ type IFProps = {
|
|
|
48
48
|
* @param params - Tham số cập nhật
|
|
49
49
|
*/
|
|
50
50
|
updateGeneralSettingApi?: (params: IFDataMapExcel[]) => void;
|
|
51
|
+
/**
|
|
52
|
+
* API lấy mẫu Excel
|
|
53
|
+
*/
|
|
54
|
+
getExcelTemplate?: (params: string) => Promise<any>;
|
|
55
|
+
/**
|
|
56
|
+
* Mã code chức năng để lấy mẫu nhập excel
|
|
57
|
+
*/
|
|
58
|
+
templateCode?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Tên chức năng đang import Excel
|
|
61
|
+
*/
|
|
62
|
+
resourceName?: string;
|
|
51
63
|
/**
|
|
52
64
|
* API lấy cấu hình in
|
|
53
|
-
* @returns Promise trả về
|
|
65
|
+
* @returns Promise trả về cấu hình map cột
|
|
54
66
|
*/
|
|
55
67
|
getGeneralSettingApi?: () => Promise<any>;
|
|
56
68
|
};
|
|
@@ -7,6 +7,15 @@ export interface IFPropsDetail {
|
|
|
7
7
|
setValue: UseFormSetValue<IFDataExcel>;
|
|
8
8
|
getValues: UseFormGetValues<IFDataExcel>;
|
|
9
9
|
templateUrl?: string;
|
|
10
|
+
resourceName?: string;
|
|
11
|
+
/**
|
|
12
|
+
* API lấy mẫu Excel
|
|
13
|
+
*/
|
|
14
|
+
getExcelTemplate?: (params: string) => Promise<any>;
|
|
15
|
+
/**
|
|
16
|
+
* Mã code chức năng để lấy mẫu nhập excel
|
|
17
|
+
*/
|
|
18
|
+
templateCode?: string;
|
|
10
19
|
}
|
|
11
20
|
declare const TabSelectFileImportExcel: (props: IFPropsDetail) => import("react/jsx-runtime").JSX.Element;
|
|
12
21
|
export default TabSelectFileImportExcel;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IFColumnSelectTable, IFTableSelectFormat } from '../type';
|
|
3
|
+
type IFRenderElement = {
|
|
4
|
+
id?: string;
|
|
5
|
+
indexRow: number;
|
|
6
|
+
row: any;
|
|
7
|
+
isSelected: boolean;
|
|
8
|
+
level?: number;
|
|
9
|
+
value: any;
|
|
10
|
+
isMulti?: boolean;
|
|
11
|
+
currentOptions: any[];
|
|
12
|
+
fieldValue?: string;
|
|
13
|
+
columns?: IFColumnSelectTable[];
|
|
14
|
+
defaultColumns: IFColumnSelectTable[];
|
|
15
|
+
indexFocus: number;
|
|
16
|
+
formatSetting?: IFTableSelectFormat;
|
|
17
|
+
handChange: (val: any) => void;
|
|
18
|
+
compareFunction?: (row?: any) => boolean | undefined;
|
|
19
|
+
setIndexFocus: (value: React.SetStateAction<number>) => void;
|
|
20
|
+
setSearchTerm: (value: React.SetStateAction<string>) => void;
|
|
21
|
+
closeMenu: () => void;
|
|
22
|
+
};
|
|
23
|
+
export declare const RenderElement: React.MemoExoticComponent<(props: IFRenderElement) => import("react/jsx-runtime").JSX.Element>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IFColumnSelectTable, IFTableSelectFormat } from '../type';
|
|
3
|
+
type ITableElementProps = {
|
|
4
|
+
value: any;
|
|
5
|
+
isMulti?: boolean;
|
|
6
|
+
currentOptions: any[];
|
|
7
|
+
fieldValue?: string;
|
|
8
|
+
fieldLabel?: string;
|
|
9
|
+
noHeader?: boolean;
|
|
10
|
+
columns?: IFColumnSelectTable[];
|
|
11
|
+
defaultColumns: IFColumnSelectTable[];
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
haveCreateNew: boolean;
|
|
14
|
+
searchTerm: string;
|
|
15
|
+
indexFocus: number;
|
|
16
|
+
formatSetting?: IFTableSelectFormat;
|
|
17
|
+
handChange: (val: any) => void;
|
|
18
|
+
compareFunction?: (row?: any) => boolean | undefined;
|
|
19
|
+
setIndexFocus: (value: React.SetStateAction<number>) => void;
|
|
20
|
+
setSearchTerm: (value: React.SetStateAction<string>) => void;
|
|
21
|
+
closeMenu: () => void;
|
|
22
|
+
};
|
|
23
|
+
export declare const TableElement: React.MemoExoticComponent<(props: ITableElementProps) => import("react/jsx-runtime").JSX.Element>;
|
|
24
|
+
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
1
2
|
import { IFToolbarOptions } from '../type';
|
|
2
3
|
type IFDataProps = {
|
|
3
4
|
toolbarTopOption?: IFToolbarOptions[];
|
|
5
|
+
maximize?: boolean;
|
|
6
|
+
setMaximize?: Dispatch<SetStateAction<boolean>>;
|
|
4
7
|
};
|
|
5
|
-
declare const RenderToolbarTop: ({ toolbarTopOption }: IFDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const RenderToolbarTop: ({ toolbarTopOption, maximize, setMaximize }: IFDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
9
|
export default RenderToolbarTop;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { IColumnTable, IFTableEditFormat } from '../type';
|
|
2
3
|
type IContentColProps = {
|
|
3
4
|
col: IColumnTable;
|
|
@@ -19,5 +20,5 @@ type IContentColProps = {
|
|
|
19
20
|
handleCloseContext: () => void;
|
|
20
21
|
handleDoubleClick?: (row: any, col: IColumnTable) => void;
|
|
21
22
|
};
|
|
22
|
-
export declare const RenderContentCol: (props: IContentColProps) => import("react/jsx-runtime").JSX.Element
|
|
23
|
+
export declare const RenderContentCol: React.MemoExoticComponent<(props: IContentColProps) => import("react/jsx-runtime").JSX.Element>;
|
|
23
24
|
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React, { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { IColumnsAgg, IColumnTable, IContextItem, IFFilterTable, IFOrderTable, IFTableEditFormat, IFTableEditSearchSetting, IHeaderColumnTable } from '../type';
|
|
3
|
+
type ITableElementProps = {
|
|
4
|
+
idTable: string;
|
|
5
|
+
gridRef: React.RefObject<HTMLDivElement | null>;
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
dataSource: any[];
|
|
8
|
+
objHeaderWidthFixLeft: any;
|
|
9
|
+
objHeaderWidthFixRight: any;
|
|
10
|
+
fieldKey: string;
|
|
11
|
+
lastObjWidthFixLeft: number;
|
|
12
|
+
fisrtObjWidthFixRight: number;
|
|
13
|
+
selectedRows: any[];
|
|
14
|
+
isMulti?: boolean;
|
|
15
|
+
filterBy: IFFilterTable[];
|
|
16
|
+
orderBy: IFOrderTable[];
|
|
17
|
+
formatSetting?: IFTableEditFormat;
|
|
18
|
+
contentColumns: IColumnTable[];
|
|
19
|
+
headerColumns: IHeaderColumnTable[][];
|
|
20
|
+
objWidthFixLeft: any;
|
|
21
|
+
objWidthFixRight: any;
|
|
22
|
+
searchTerm: string;
|
|
23
|
+
searchSetting: IFTableEditSearchSetting | undefined;
|
|
24
|
+
columnsAggregate?: IColumnsAgg[];
|
|
25
|
+
haveSum?: boolean;
|
|
26
|
+
expandsAll: boolean | undefined;
|
|
27
|
+
zeroVisiable?: boolean;
|
|
28
|
+
contextMenuItems?: IContextItem[];
|
|
29
|
+
handleContextMenuClick?: (context: IContextItem, data: any) => void;
|
|
30
|
+
setFilterBy: React.Dispatch<React.SetStateAction<IFFilterTable[]>>;
|
|
31
|
+
setSelectedRows: Dispatch<SetStateAction<any[]>>;
|
|
32
|
+
setOrderBy: React.Dispatch<React.SetStateAction<IFOrderTable[]>>;
|
|
33
|
+
handleDoubleClick?: (row: any, col: IColumnTable) => void;
|
|
34
|
+
querySetting?: {
|
|
35
|
+
client?: boolean;
|
|
36
|
+
allowFiltering?: boolean;
|
|
37
|
+
allowSorting?: boolean;
|
|
38
|
+
optionsFilter?: any;
|
|
39
|
+
changeFilter?: (data: IFFilterTable[]) => void;
|
|
40
|
+
changeOrder?: (data: IFOrderTable[]) => void;
|
|
41
|
+
};
|
|
42
|
+
setContentColumns: (col: any[]) => void;
|
|
43
|
+
setExpandsAll: (value: React.SetStateAction<boolean | undefined>) => void;
|
|
44
|
+
};
|
|
45
|
+
export declare const TableElement: React.MemoExoticComponent<(props: ITableElementProps) => import("react/jsx-runtime").JSX.Element>;
|
|
46
|
+
export {};
|
|
@@ -180,6 +180,8 @@ export type IColumnTable = {
|
|
|
180
180
|
editEnable?: boolean;
|
|
181
181
|
/** Có hiển thị không */
|
|
182
182
|
visible?: boolean;
|
|
183
|
+
/** Có hiển thị giá trị 0 hay ko */
|
|
184
|
+
zeroVisiable?: boolean;
|
|
183
185
|
/** Có nhóm không */
|
|
184
186
|
isGroup?: boolean;
|
|
185
187
|
/** Có cho cho phép điều chỉnh hiển thị không */
|
package/dist/index.d.ts
CHANGED
|
@@ -184,6 +184,8 @@ type IColumnTable = {
|
|
|
184
184
|
editEnable?: boolean;
|
|
185
185
|
/** Có hiển thị không */
|
|
186
186
|
visible?: boolean;
|
|
187
|
+
/** Có hiển thị giá trị 0 hay ko */
|
|
188
|
+
zeroVisiable?: boolean;
|
|
187
189
|
/** Có nhóm không */
|
|
188
190
|
isGroup?: boolean;
|
|
189
191
|
/** Có cho cho phép điều chỉnh hiển thị không */
|
|
@@ -586,9 +588,21 @@ type IFProps$1 = {
|
|
|
586
588
|
* @param params - Tham số cập nhật
|
|
587
589
|
*/
|
|
588
590
|
updateGeneralSettingApi?: (params: IFDataMapExcel[]) => void;
|
|
591
|
+
/**
|
|
592
|
+
* API lấy mẫu Excel
|
|
593
|
+
*/
|
|
594
|
+
getExcelTemplate?: (params: string) => Promise<any>;
|
|
595
|
+
/**
|
|
596
|
+
* Mã code chức năng để lấy mẫu nhập excel
|
|
597
|
+
*/
|
|
598
|
+
templateCode?: string;
|
|
599
|
+
/**
|
|
600
|
+
* Tên chức năng đang import Excel
|
|
601
|
+
*/
|
|
602
|
+
resourceName?: string;
|
|
589
603
|
/**
|
|
590
604
|
* API lấy cấu hình in
|
|
591
|
-
* @returns Promise trả về
|
|
605
|
+
* @returns Promise trả về cấu hình map cột
|
|
592
606
|
*/
|
|
593
607
|
getGeneralSettingApi?: () => Promise<any>;
|
|
594
608
|
};
|
|
@@ -708,6 +722,7 @@ type TableViewProps = {
|
|
|
708
722
|
idTable: string;
|
|
709
723
|
dataSource: any[];
|
|
710
724
|
height?: number;
|
|
725
|
+
headerHeight?: number;
|
|
711
726
|
columns: IColumnTable[];
|
|
712
727
|
isLoading?: boolean;
|
|
713
728
|
formatSetting?: IFTableEditFormat;
|