react-table-edit 1.5.10 → 1.5.12
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/icon/ExpandAll.d.ts +10 -0
- package/dist/component/icon/GroupIcon.d.ts +10 -0
- package/dist/component/icon/UnExpandAll.d.ts +10 -0
- package/dist/component/input/input-date/index.d.ts +8 -5
- package/dist/component/input/input-date-gange/index.d.ts +21 -0
- package/dist/component/input/input-date-range/index.d.ts +21 -0
- package/dist/component/select-table/index.d.ts +2 -2
- package/dist/component/table/data-table.d.ts +3 -3
- package/dist/component/table/edit-element.d.ts +1 -1
- package/dist/component/table/filter-element.d.ts +13 -0
- package/dist/component/table/header.d.ts +1 -1
- package/dist/component/table/index.d.ts +2 -2
- package/dist/component/table/toolbar-top.d.ts +1 -1
- package/dist/component/table-view/content.d.ts +1 -1
- package/dist/component/table-view/header.d.ts +1 -1
- package/dist/component/table-view/index.d.ts +1 -1
- package/dist/component/type/index.d.ts +16 -17
- package/dist/component/utils.d.ts +3 -3
- package/dist/index.d.ts +18 -19
- package/dist/index.js +5161 -9960
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5162 -9961
- package/dist/index.mjs.map +1 -1
- package/dist/styles/date-picker.css +74 -771
- package/dist/styles/date-picker.css.map +1 -1
- package/dist/styles/index.css +109 -770
- package/dist/styles/index.css.map +1 -1
- package/package.json +2 -3
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ExpandAllProps {
|
|
3
|
+
color?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
size?: number;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
declare const ExpandAllIcon: React.FC<ExpandAllProps>;
|
|
10
|
+
export default ExpandAllIcon;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface UnExpandAllProps {
|
|
3
|
+
color?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
size?: number;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
declare const UnExpandAllIcon: React.FC<UnExpandAllProps>;
|
|
10
|
+
export default UnExpandAllIcon;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { ClipboardEvent } from 'react';
|
|
1
|
+
import React, { ClipboardEvent } from 'react';
|
|
2
|
+
import 'react-day-picker/dist/style.css';
|
|
2
3
|
interface IFFormInput {
|
|
3
4
|
id?: string;
|
|
4
|
-
dateFormat:
|
|
5
|
-
onChange: any;
|
|
5
|
+
dateFormat: 'dd/MM/yyyy' | 'dd/MM/yyyy HH:mm' | 'MM/yyyy';
|
|
6
6
|
className?: string;
|
|
7
|
+
invalid?: boolean;
|
|
7
8
|
value: Date;
|
|
9
|
+
container?: any;
|
|
10
|
+
onChange: (range: Date | undefined) => void;
|
|
8
11
|
onKeyDown?: (e: React.KeyboardEvent<any>) => void | any;
|
|
9
12
|
onPaste?: (e: ClipboardEvent<HTMLElement>) => void;
|
|
10
13
|
}
|
|
11
|
-
declare const
|
|
12
|
-
export default
|
|
14
|
+
declare const DatePicker: React.ForwardRefExoticComponent<IFFormInput & React.RefAttributes<unknown>>;
|
|
15
|
+
export default DatePicker;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { ClipboardEvent } from 'react';
|
|
2
|
+
import 'react-day-picker/dist/style.css';
|
|
3
|
+
interface IFDateRange {
|
|
4
|
+
id?: string;
|
|
5
|
+
dateFormat?: 'dd/MM/yyyy' | 'dd/MM/yyyy HH:mm' | 'MM/yyyy';
|
|
6
|
+
className?: string;
|
|
7
|
+
invalid?: boolean;
|
|
8
|
+
value?: {
|
|
9
|
+
from?: Date;
|
|
10
|
+
to?: Date;
|
|
11
|
+
};
|
|
12
|
+
container?: any;
|
|
13
|
+
onChange: (value: {
|
|
14
|
+
from?: Date | string;
|
|
15
|
+
to?: Date | string;
|
|
16
|
+
}) => void;
|
|
17
|
+
onKeyDown?: (e: React.KeyboardEvent<any>) => void | any;
|
|
18
|
+
onPaste?: (e: ClipboardEvent<HTMLElement>) => void;
|
|
19
|
+
}
|
|
20
|
+
declare const DateRangePicker: React.ForwardRefExoticComponent<IFDateRange & React.RefAttributes<unknown>>;
|
|
21
|
+
export default DateRangePicker;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { ClipboardEvent } from 'react';
|
|
2
|
+
import 'react-day-picker/dist/style.css';
|
|
3
|
+
interface IFDateRange {
|
|
4
|
+
id?: string;
|
|
5
|
+
dateFormat?: 'dd/MM/yyyy' | 'dd/MM/yyyy HH:mm' | 'MM/yyyy';
|
|
6
|
+
className?: string;
|
|
7
|
+
invalid?: boolean;
|
|
8
|
+
value?: {
|
|
9
|
+
from?: Date;
|
|
10
|
+
to?: Date;
|
|
11
|
+
};
|
|
12
|
+
container?: any;
|
|
13
|
+
onChange: (value: {
|
|
14
|
+
from?: Date | string;
|
|
15
|
+
to?: Date | string;
|
|
16
|
+
}) => void;
|
|
17
|
+
onKeyDown?: (e: React.KeyboardEvent<any>) => void | any;
|
|
18
|
+
onPaste?: (e: ClipboardEvent<HTMLElement>) => void;
|
|
19
|
+
}
|
|
20
|
+
declare const DateRangePicker: React.ForwardRefExoticComponent<IFDateRange & React.RefAttributes<unknown>>;
|
|
21
|
+
export default DateRangePicker;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { Dispatch, MutableRefObject, SetStateAction } from
|
|
2
|
-
import { ICellInfo, IColumnTable, IFFilterTable, IFOrderTable, IFTableEditButton, IFTableEditFormat, IFTableEditToolbar, IHeaderColumnTable } from
|
|
1
|
+
import React, { Dispatch, MutableRefObject, SetStateAction } from 'react';
|
|
2
|
+
import { ICellInfo, IColumnTable, IFFilterTable, IFOrderTable, IFTableEditButton, IFTableEditFormat, IFTableEditToolbar, IHeaderColumnTable } from '../type';
|
|
3
3
|
interface TableComponentProps {
|
|
4
4
|
idTable?: string;
|
|
5
5
|
dataSource: any[];
|
|
@@ -56,7 +56,7 @@ interface TableComponentProps {
|
|
|
56
56
|
handleCommandClick: (id: string, rowData: any, index: number) => void;
|
|
57
57
|
handleDuplicate: () => void;
|
|
58
58
|
handleKeyDown: (e: React.KeyboardEvent<HTMLDivElement>, row: any) => void;
|
|
59
|
-
onDuplicate?: (
|
|
59
|
+
onDuplicate?: (newData: any, index: number) => void;
|
|
60
60
|
setSelectedCell: Dispatch<SetStateAction<{
|
|
61
61
|
minRow: number;
|
|
62
62
|
maxRow: number;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
import 'react-resizable/css/styles.css';
|
|
3
|
+
import { IColumnTable, IFFilterTable, IFTableEditFormat } from '../type';
|
|
4
|
+
type IFilterProps = {
|
|
5
|
+
column: IColumnTable;
|
|
6
|
+
optionsFilter: any;
|
|
7
|
+
filterBy: IFFilterTable[];
|
|
8
|
+
setOpenFilter: Dispatch<boolean>;
|
|
9
|
+
formatSetting?: IFTableEditFormat;
|
|
10
|
+
changeFilter: (data: IFFilterTable[]) => void;
|
|
11
|
+
};
|
|
12
|
+
declare const FilterComponent: ({ optionsFilter, formatSetting, filterBy, setOpenFilter, changeFilter, column }: IFilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default FilterComponent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import 'react-resizable/css/styles.css';
|
|
3
|
-
import { IFFilterTable, IFOrderTable, IFTableEditFormat, IHeaderColumnTable } from
|
|
3
|
+
import { IFFilterTable, IFOrderTable, IFTableEditFormat, IHeaderColumnTable } from '../type';
|
|
4
4
|
type IFDataProps = {
|
|
5
5
|
idTable: string;
|
|
6
6
|
selectEnable: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from
|
|
2
|
-
import { IColumnTable, IFSettingColumns, IFTableEditButton, IFTableEditFormat, IFTableEditPaging, IFTableEditSearchSetting, IFTableEditToolbar } from
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { IColumnTable, IFSettingColumns, IFTableEditButton, IFTableEditFormat, IFTableEditPaging, IFTableEditSearchSetting, IFTableEditToolbar } from '../type';
|
|
3
3
|
export type IFTableEditProps = {
|
|
4
4
|
idTable?: string;
|
|
5
5
|
dataSource: any[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import 'react-resizable/css/styles.css';
|
|
3
|
-
import { IColumnTable, IFFilterTable, IFOrderTable, IFTableEditFormat } from
|
|
3
|
+
import { IColumnTable, IFFilterTable, IFOrderTable, IFTableEditFormat } from '../type';
|
|
4
4
|
type IFDataProps = {
|
|
5
5
|
idTable: string;
|
|
6
6
|
selectEnable: boolean;
|
|
@@ -37,7 +37,7 @@ type TableViewProps = {
|
|
|
37
37
|
resetDefaultColumns?: () => void;
|
|
38
38
|
saveSettingColumn?: (data: IFSettingColumns[]) => void;
|
|
39
39
|
setSelectedItem?: Dispatch<SetStateAction<any>>;
|
|
40
|
-
|
|
40
|
+
isMulti?: boolean;
|
|
41
41
|
handleSelect?: (data: any) => void;
|
|
42
42
|
};
|
|
43
43
|
declare const TableView: React.FC<TableViewProps>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Dispatch, JSX, ReactNode, SetStateAction } from
|
|
2
|
-
import { UseFormGetValues, UseFormReset, UseFormSetValue } from
|
|
1
|
+
import { Dispatch, JSX, ReactNode, SetStateAction } from 'react';
|
|
2
|
+
import { UseFormGetValues, UseFormReset, UseFormSetValue } from 'react-hook-form';
|
|
3
3
|
/** Căn lề văn bản trong bảng */
|
|
4
|
-
type ITextAlign =
|
|
4
|
+
type ITextAlign = 'center' | 'left' | 'right';
|
|
5
5
|
/**
|
|
6
6
|
* Loại cột hiển thị trong hệ thống.
|
|
7
7
|
*
|
|
8
8
|
* Lưu ý:
|
|
9
9
|
* - Các loại 'text', 'numeric', 'datetime' không được dùng cho view.
|
|
10
10
|
*/
|
|
11
|
-
export type IColumnType =
|
|
11
|
+
export type IColumnType = '#' | 'command' | 'text' | 'numeric' | 'datetime' | 'date' | 'checkbox' | 'select' | 'form' | 'formInline' | 'color' | 'selectTree';
|
|
12
12
|
/** Loại lọc của cột */
|
|
13
|
-
type IFilterType =
|
|
13
|
+
export type IFilterType = 'text' | 'numeric' | 'date' | 'select';
|
|
14
14
|
export type ICellInfo = {
|
|
15
15
|
/** index hàng */
|
|
16
16
|
row: number;
|
|
@@ -32,9 +32,8 @@ export type ICommandItem = {
|
|
|
32
32
|
};
|
|
33
33
|
/** Cấu hình thanh công cụ (toolbar) */
|
|
34
34
|
export type IFToolbarOptions = {
|
|
35
|
-
id?: string;
|
|
36
35
|
/** Vị trí hiển thị (trái, phải, giữa) */
|
|
37
|
-
align:
|
|
36
|
+
align: 'left' | 'right' | 'center';
|
|
38
37
|
/** Template toolbar */
|
|
39
38
|
template?: () => JSX.Element | string | number | undefined;
|
|
40
39
|
};
|
|
@@ -47,7 +46,7 @@ export type IFSettingColumns = {
|
|
|
47
46
|
/** Có hiển thị không */
|
|
48
47
|
visible?: boolean;
|
|
49
48
|
/** Cố định trái/phải */
|
|
50
|
-
fixedType?:
|
|
49
|
+
fixedType?: 'left' | 'right';
|
|
51
50
|
/** Chiều rộng cột */
|
|
52
51
|
width?: number | string;
|
|
53
52
|
/** Sắp xếp */
|
|
@@ -58,7 +57,7 @@ export type ISettingFormElement = {
|
|
|
58
57
|
/** Schema định nghĩa cấu trúc form */
|
|
59
58
|
schema: any;
|
|
60
59
|
/** Kích thước nhãn */
|
|
61
|
-
labelSize?:
|
|
60
|
+
labelSize?: 'label-small' | 'label-medium' | 'label-large';
|
|
62
61
|
/** Chiều rộng popup form */
|
|
63
62
|
menuWidth?: number;
|
|
64
63
|
/** Chiều cao popup form */
|
|
@@ -143,7 +142,7 @@ export type ISettingNumericElement = {
|
|
|
143
142
|
/** Định nghĩa cột bảng */
|
|
144
143
|
export type IColumnTable = {
|
|
145
144
|
/** Tên thuộc tính */
|
|
146
|
-
field:
|
|
145
|
+
field: '#' | 'checkbox' | 'command' | string;
|
|
147
146
|
/** Tên thuộc tính lọc*/
|
|
148
147
|
fieldFilter?: string;
|
|
149
148
|
/** Tiêu đề cột */
|
|
@@ -173,7 +172,7 @@ export type IColumnTable = {
|
|
|
173
172
|
/** Căn lề */
|
|
174
173
|
textAlign?: ITextAlign;
|
|
175
174
|
/** Cố định trái/phải */
|
|
176
|
-
fixedType?:
|
|
175
|
+
fixedType?: 'left' | 'right' | undefined;
|
|
177
176
|
/** Danh sách thao tác */
|
|
178
177
|
commandItems?: ICommandItem[];
|
|
179
178
|
/** Placeholder trong ô input */
|
|
@@ -322,7 +321,7 @@ export type IHeaderColumnTable = {
|
|
|
322
321
|
/** Cho phép lọc cột */
|
|
323
322
|
allowFilter?: boolean;
|
|
324
323
|
/** Cố định trái/phải */
|
|
325
|
-
fixedType?:
|
|
324
|
+
fixedType?: 'left' | 'right' | undefined;
|
|
326
325
|
/** Cấu hình cho kiểu numeric */
|
|
327
326
|
numericSettings?: ISettingNumericElement;
|
|
328
327
|
/** Kiểu chỉnh sửa */
|
|
@@ -338,9 +337,9 @@ export type IFColumnSelectTable = {
|
|
|
338
337
|
/** Cờ cho phép hiển thị hoặc ẩn cột (mặc định là true) */
|
|
339
338
|
visible?: boolean;
|
|
340
339
|
/** Căn lề nội dung trong cột: trái, phải, giữa */
|
|
341
|
-
textAlign?:
|
|
340
|
+
textAlign?: 'left' | 'right' | 'center';
|
|
342
341
|
/** Loại dữ liệu của cột: văn bản, số, ngày, ngày giờ */
|
|
343
|
-
type?:
|
|
342
|
+
type?: 'text' | 'numeric' | 'date' | 'datetime';
|
|
344
343
|
/** Template tùy chỉnh nội dung hiển thị trong ô */
|
|
345
344
|
template?: any;
|
|
346
345
|
/** Điều kiện thay đổi kiểu dữ liệu của cột */
|
|
@@ -376,7 +375,7 @@ export type FromItemsField = {
|
|
|
376
375
|
/** Nhãn hiển thị cho trường dữ liệu */
|
|
377
376
|
label: string;
|
|
378
377
|
/** Loại trường dữ liệu: văn bản, số, chọn, chọn có thể tạo mới */
|
|
379
|
-
type:
|
|
378
|
+
type: 'text' | 'numeric' | 'select' | 'selectCreatable';
|
|
380
379
|
/** Trường có bị disable hay không (không cho chỉnh sửa) */
|
|
381
380
|
disabled?: boolean;
|
|
382
381
|
/** Số chữ số sau dấu phẩy (chỉ áp dụng với loại 'numeric') */
|
|
@@ -396,11 +395,11 @@ export type IColumnsAgg = {
|
|
|
396
395
|
};
|
|
397
396
|
export type IFOrderTable = {
|
|
398
397
|
key: string;
|
|
399
|
-
direction:
|
|
398
|
+
direction: 'asc' | 'desc';
|
|
400
399
|
};
|
|
401
400
|
export type IFFilterTable = {
|
|
402
401
|
key: string;
|
|
403
402
|
value: any;
|
|
404
|
-
ope:
|
|
403
|
+
ope: 'startswith' | 'endswith' | 'contains' | 'equal' | 'notequal' | 'greaterthan' | 'greaterthanorequal' | 'lessthan' | 'lessthanorequal';
|
|
405
404
|
};
|
|
406
405
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IFFilterTable, IFSettingColumns } from
|
|
1
|
+
import { IFFilterTable, IFSettingColumns } from './type';
|
|
2
2
|
export declare const useOnClickOutside: (ref: any, handler: any) => void;
|
|
3
3
|
export declare const checkThousandSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
|
|
4
4
|
export declare const checkDecimalSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
|
|
@@ -53,6 +53,6 @@ export declare const calculateTableStructure: (columns: any[], settingColumns?:
|
|
|
53
53
|
indexLastEdit: number;
|
|
54
54
|
};
|
|
55
55
|
/**
|
|
56
|
-
* Kiểm tra row có thỏa mãn tất cả filter và chứa từ khóa tìm kiếm hay không
|
|
57
|
-
*/
|
|
56
|
+
* Kiểm tra row có thỏa mãn tất cả filter và chứa từ khóa tìm kiếm hay không
|
|
57
|
+
*/
|
|
58
58
|
export declare const CheckRowMatch: (row: Record<string, any>, filters: IFFilterTable[], keyword: string, searchKeys: string[]) => boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,16 +5,16 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
5
5
|
import { TFunction } from 'react-i18next';
|
|
6
6
|
|
|
7
7
|
/** Căn lề văn bản trong bảng */
|
|
8
|
-
type ITextAlign =
|
|
8
|
+
type ITextAlign = 'center' | 'left' | 'right';
|
|
9
9
|
/**
|
|
10
10
|
* Loại cột hiển thị trong hệ thống.
|
|
11
11
|
*
|
|
12
12
|
* Lưu ý:
|
|
13
13
|
* - Các loại 'text', 'numeric', 'datetime' không được dùng cho view.
|
|
14
14
|
*/
|
|
15
|
-
type IColumnType =
|
|
15
|
+
type IColumnType = '#' | 'command' | 'text' | 'numeric' | 'datetime' | 'date' | 'checkbox' | 'select' | 'form' | 'formInline' | 'color' | 'selectTree';
|
|
16
16
|
/** Loại lọc của cột */
|
|
17
|
-
type IFilterType =
|
|
17
|
+
type IFilterType = 'text' | 'numeric' | 'date' | 'select';
|
|
18
18
|
type ICellInfo = {
|
|
19
19
|
/** index hàng */
|
|
20
20
|
row: number;
|
|
@@ -36,9 +36,8 @@ type ICommandItem = {
|
|
|
36
36
|
};
|
|
37
37
|
/** Cấu hình thanh công cụ (toolbar) */
|
|
38
38
|
type IFToolbarOptions = {
|
|
39
|
-
id?: string;
|
|
40
39
|
/** Vị trí hiển thị (trái, phải, giữa) */
|
|
41
|
-
align:
|
|
40
|
+
align: 'left' | 'right' | 'center';
|
|
42
41
|
/** Template toolbar */
|
|
43
42
|
template?: () => JSX.Element | string | number | undefined;
|
|
44
43
|
};
|
|
@@ -51,7 +50,7 @@ type IFSettingColumns = {
|
|
|
51
50
|
/** Có hiển thị không */
|
|
52
51
|
visible?: boolean;
|
|
53
52
|
/** Cố định trái/phải */
|
|
54
|
-
fixedType?:
|
|
53
|
+
fixedType?: 'left' | 'right';
|
|
55
54
|
/** Chiều rộng cột */
|
|
56
55
|
width?: number | string;
|
|
57
56
|
/** Sắp xếp */
|
|
@@ -62,7 +61,7 @@ type ISettingFormElement = {
|
|
|
62
61
|
/** Schema định nghĩa cấu trúc form */
|
|
63
62
|
schema: any;
|
|
64
63
|
/** Kích thước nhãn */
|
|
65
|
-
labelSize?:
|
|
64
|
+
labelSize?: 'label-small' | 'label-medium' | 'label-large';
|
|
66
65
|
/** Chiều rộng popup form */
|
|
67
66
|
menuWidth?: number;
|
|
68
67
|
/** Chiều cao popup form */
|
|
@@ -147,7 +146,7 @@ type ISettingNumericElement = {
|
|
|
147
146
|
/** Định nghĩa cột bảng */
|
|
148
147
|
type IColumnTable = {
|
|
149
148
|
/** Tên thuộc tính */
|
|
150
|
-
field:
|
|
149
|
+
field: '#' | 'checkbox' | 'command' | string;
|
|
151
150
|
/** Tên thuộc tính lọc*/
|
|
152
151
|
fieldFilter?: string;
|
|
153
152
|
/** Tiêu đề cột */
|
|
@@ -177,7 +176,7 @@ type IColumnTable = {
|
|
|
177
176
|
/** Căn lề */
|
|
178
177
|
textAlign?: ITextAlign;
|
|
179
178
|
/** Cố định trái/phải */
|
|
180
|
-
fixedType?:
|
|
179
|
+
fixedType?: 'left' | 'right' | undefined;
|
|
181
180
|
/** Danh sách thao tác */
|
|
182
181
|
commandItems?: ICommandItem[];
|
|
183
182
|
/** Placeholder trong ô input */
|
|
@@ -326,7 +325,7 @@ type IHeaderColumnTable = {
|
|
|
326
325
|
/** Cho phép lọc cột */
|
|
327
326
|
allowFilter?: boolean;
|
|
328
327
|
/** Cố định trái/phải */
|
|
329
|
-
fixedType?:
|
|
328
|
+
fixedType?: 'left' | 'right' | undefined;
|
|
330
329
|
/** Cấu hình cho kiểu numeric */
|
|
331
330
|
numericSettings?: ISettingNumericElement;
|
|
332
331
|
/** Kiểu chỉnh sửa */
|
|
@@ -342,9 +341,9 @@ type IFColumnSelectTable = {
|
|
|
342
341
|
/** Cờ cho phép hiển thị hoặc ẩn cột (mặc định là true) */
|
|
343
342
|
visible?: boolean;
|
|
344
343
|
/** Căn lề nội dung trong cột: trái, phải, giữa */
|
|
345
|
-
textAlign?:
|
|
344
|
+
textAlign?: 'left' | 'right' | 'center';
|
|
346
345
|
/** Loại dữ liệu của cột: văn bản, số, ngày, ngày giờ */
|
|
347
|
-
type?:
|
|
346
|
+
type?: 'text' | 'numeric' | 'date' | 'datetime';
|
|
348
347
|
/** Template tùy chỉnh nội dung hiển thị trong ô */
|
|
349
348
|
template?: any;
|
|
350
349
|
/** Điều kiện thay đổi kiểu dữ liệu của cột */
|
|
@@ -380,7 +379,7 @@ type FromItemsField = {
|
|
|
380
379
|
/** Nhãn hiển thị cho trường dữ liệu */
|
|
381
380
|
label: string;
|
|
382
381
|
/** Loại trường dữ liệu: văn bản, số, chọn, chọn có thể tạo mới */
|
|
383
|
-
type:
|
|
382
|
+
type: 'text' | 'numeric' | 'select' | 'selectCreatable';
|
|
384
383
|
/** Trường có bị disable hay không (không cho chỉnh sửa) */
|
|
385
384
|
disabled?: boolean;
|
|
386
385
|
/** Số chữ số sau dấu phẩy (chỉ áp dụng với loại 'numeric') */
|
|
@@ -400,12 +399,12 @@ type IColumnsAgg = {
|
|
|
400
399
|
};
|
|
401
400
|
type IFOrderTable = {
|
|
402
401
|
key: string;
|
|
403
|
-
direction:
|
|
402
|
+
direction: 'asc' | 'desc';
|
|
404
403
|
};
|
|
405
404
|
type IFFilterTable = {
|
|
406
405
|
key: string;
|
|
407
406
|
value: any;
|
|
408
|
-
ope:
|
|
407
|
+
ope: 'startswith' | 'endswith' | 'contains' | 'equal' | 'notequal' | 'greaterthan' | 'greaterthanorequal' | 'lessthan' | 'lessthanorequal';
|
|
409
408
|
};
|
|
410
409
|
|
|
411
410
|
type IFTableEditProps = {
|
|
@@ -717,7 +716,7 @@ type TableViewProps = {
|
|
|
717
716
|
resetDefaultColumns?: () => void;
|
|
718
717
|
saveSettingColumn?: (data: IFSettingColumns[]) => void;
|
|
719
718
|
setSelectedItem?: Dispatch<SetStateAction<any>>;
|
|
720
|
-
|
|
719
|
+
isMulti?: boolean;
|
|
721
720
|
handleSelect?: (data: any) => void;
|
|
722
721
|
};
|
|
723
722
|
declare const TableView: React__default.FC<TableViewProps>;
|
|
@@ -776,8 +775,8 @@ declare const calculateTableStructure: (columns: any[], settingColumns?: IFSetti
|
|
|
776
775
|
indexLastEdit: number;
|
|
777
776
|
};
|
|
778
777
|
/**
|
|
779
|
-
* Kiểm tra row có thỏa mãn tất cả filter và chứa từ khóa tìm kiếm hay không
|
|
780
|
-
*/
|
|
778
|
+
* Kiểm tra row có thỏa mãn tất cả filter và chứa từ khóa tìm kiếm hay không
|
|
779
|
+
*/
|
|
781
780
|
declare const CheckRowMatch: (row: Record<string, any>, filters: IFFilterTable[], keyword: string, searchKeys: string[]) => boolean;
|
|
782
781
|
|
|
783
782
|
type IFSteps = {
|
|
@@ -807,4 +806,4 @@ type IFProps = {
|
|
|
807
806
|
declare const Wizard: React.ForwardRefExoticComponent<IFProps & React.RefAttributes<unknown>>;
|
|
808
807
|
|
|
809
808
|
export { CheckRowMatch, ExportExcelComponent, FindNodeByPath, InputStyleComponent, ModalImportComponent, SelectTable, SelectTableTree, TableView, TabsMenuComponent, Wizard, calculateTableStructure, checkDecimalSeparator, checkThousandSeparator, TableEdit as default, formartNumberic, formatDateTime, generateUUID, isNullOrUndefined, messageBoxConfirm, messageBoxConfirmAsync, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxConfirmAsync, messageHtmlBoxError, notificationError, notificationSuccess, roundNumber, useOnClickOutside };
|
|
810
|
-
export type { FromItemsField, ICellInfo, IColumnTable, IColumnType, IColumnsAgg, ICommandItem, IFColumnSelectTable, IFColumnSelectTableTree, IFCurrentPage, IFCurrentPageConfig, IFFilterTable, IFOrderTable, IFPageSize, IFSettingColumns, IFTableEditButton, IFTableEditFormat, IFTableEditPaging, IFTableEditSearchSetting, IFTableEditToolbar, IFTableSelectFormat, IFTableTreeSelectFormat, IFToolbarOptions, IHeaderColumnTable, ISettingFormElement, ISettingNumericElement, ISettingSelectElement };
|
|
809
|
+
export type { FromItemsField, ICellInfo, IColumnTable, IColumnType, IColumnsAgg, ICommandItem, IFColumnSelectTable, IFColumnSelectTableTree, IFCurrentPage, IFCurrentPageConfig, IFFilterTable, IFOrderTable, IFPageSize, IFSettingColumns, IFTableEditButton, IFTableEditFormat, IFTableEditPaging, IFTableEditSearchSetting, IFTableEditToolbar, IFTableSelectFormat, IFTableTreeSelectFormat, IFToolbarOptions, IFilterType, IHeaderColumnTable, ISettingFormElement, ISettingNumericElement, ISettingSelectElement };
|