react-table-edit 1.4.47 → 1.4.48
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 +46 -21
- package/dist/component/modal-import-excel/tab-handle-error.d.ts +3 -3
- package/dist/component/modal-import-excel/tab-merge.d.ts +1 -2
- package/dist/component/modal-import-excel/tab-select-file.d.ts +2 -2
- package/dist/component/modal-import-excel/tab-validate.d.ts +2 -2
- package/dist/component/modal-import-excel/type.d.ts +10 -1
- package/dist/component/modal-import-excel/utils.d.ts +4 -18
- package/dist/component/table/setting-column.d.ts +11 -0
- package/dist/component/wizard/index.d.ts +2 -1
- package/dist/index.d.ts +127 -173
- package/dist/index.js +4893 -19334
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4894 -19334
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,24 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { IColumnTable } from '../type';
|
|
2
|
+
import { IFDataMapExcel, IFNumberFormat } from './type';
|
|
3
|
+
type IFProps = {
|
|
4
|
+
/** Kích thước cửa sổ hiện tại (width, height) */
|
|
5
|
+
windowSize: any;
|
|
6
|
+
/** Trạng thái mở/đóng modal import */
|
|
7
|
+
openModal: boolean;
|
|
8
|
+
/** Hàm toggle mở/đóng modal */
|
|
9
|
+
handleModal: () => void;
|
|
10
|
+
/** Hàm format số (tuỳ chọn) */
|
|
10
11
|
formatNumber?: IFNumberFormat;
|
|
12
|
+
/** Danh sách các lựa chọn số trang (ví dụ [10, 20, 50]) */
|
|
11
13
|
pageOptions: number[];
|
|
14
|
+
/** Số hàng tiêu đề mặc định */
|
|
15
|
+
defaultHeaderRow?: number;
|
|
16
|
+
/** Số bản ghi mặc định trên một trang */
|
|
12
17
|
pageSizeDefault: number;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
/** Cấu hình mapping cột giữa file Excel và dữ liệu trong hệ thống */
|
|
19
|
+
mapColumn: IFDataMapExcel[];
|
|
20
|
+
/** Cấu hình header bảng validate (tuỳ chọn) */
|
|
21
|
+
headerValidateExcelColumns?: IColumnTable[];
|
|
22
|
+
/** Cấu hình header bảng lỗi (tuỳ chọn) */
|
|
23
|
+
headerErrorExcelColumns?: IColumnTable[];
|
|
24
|
+
/**
|
|
25
|
+
* link lấy mẫu import
|
|
26
|
+
*/
|
|
27
|
+
templateUrl?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Hàm validate từng cell (tuỳ chọn)
|
|
30
|
+
* @param item Dòng dữ liệu hiện tại
|
|
31
|
+
* @param ele Cấu hình mapping của cột
|
|
32
|
+
* @param value Giá trị trong cell
|
|
33
|
+
*/
|
|
34
|
+
handleValidate?: (item: any, ele: IFDataMapExcel, value: string) => void;
|
|
35
|
+
/**
|
|
36
|
+
* API import Excel
|
|
37
|
+
* @param params Tham số gửi lên server
|
|
38
|
+
* @returns Promise<any>
|
|
39
|
+
*/
|
|
40
|
+
importExcelApi: (params: any) => Promise<any>;
|
|
41
|
+
/**
|
|
42
|
+
* API validate Excel
|
|
43
|
+
* @param params Tham số gửi lên server
|
|
44
|
+
* @returns Promise<any>
|
|
45
|
+
*/
|
|
46
|
+
validateExcelApi: (params: any) => Promise<any>;
|
|
47
|
+
};
|
|
48
|
+
declare const ModalImportComponent: (props: IFProps) => import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export default ModalImportComponent;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { IFNumberFormat } from './type';
|
|
2
2
|
export interface IFPropsDetail {
|
|
3
|
-
dataError: any[];
|
|
4
3
|
windowSize: any;
|
|
5
4
|
formatNumber?: IFNumberFormat;
|
|
6
|
-
pageOptions
|
|
7
|
-
pageSizeDefault
|
|
5
|
+
pageOptions?: number[];
|
|
6
|
+
pageSizeDefault?: number;
|
|
7
|
+
dataError: any[];
|
|
8
8
|
headerHandleErrorExcelColumns: any[];
|
|
9
9
|
}
|
|
10
10
|
declare const TabHandleErrorImportExcel: (props: IFPropsDetail) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Control, FieldErrors, UseFormGetValues, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
2
|
-
import { IFDataExcel } from './
|
|
3
|
-
import { IFNumberFormat } from './type';
|
|
2
|
+
import { IFDataExcel, IFNumberFormat } from './type';
|
|
4
3
|
export interface IFPropsDetail {
|
|
5
4
|
control: Control<IFDataExcel>;
|
|
6
5
|
watch: UseFormWatch<IFDataExcel>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Control, FieldErrors, UseFormGetValues, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
2
|
-
import { IFDataExcel } from './
|
|
2
|
+
import { IFDataExcel } from './type';
|
|
3
3
|
export interface IFPropsDetail {
|
|
4
4
|
control: Control<IFDataExcel>;
|
|
5
5
|
watch: UseFormWatch<IFDataExcel>;
|
|
6
6
|
errors: FieldErrors<IFDataExcel>;
|
|
7
7
|
setValue: UseFormSetValue<IFDataExcel>;
|
|
8
8
|
getValues: UseFormGetValues<IFDataExcel>;
|
|
9
|
-
|
|
9
|
+
templateUrl?: string;
|
|
10
10
|
}
|
|
11
11
|
declare const TabSelectFileImportExcel: (props: IFPropsDetail) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export default TabSelectFileImportExcel;
|
|
@@ -6,8 +6,8 @@ export interface IFPropsDetail {
|
|
|
6
6
|
windowSize: any;
|
|
7
7
|
headerValidateExcelColumns: any[];
|
|
8
8
|
formatNumber?: IFNumberFormat;
|
|
9
|
-
pageOptions
|
|
10
|
-
pageSizeDefault
|
|
9
|
+
pageOptions?: number[];
|
|
10
|
+
pageSizeDefault?: number;
|
|
11
11
|
}
|
|
12
12
|
declare const TabValidateImportExcel: (props: IFPropsDetail) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export default TabValidateImportExcel;
|
|
@@ -6,13 +6,22 @@ export interface IFDataExcel {
|
|
|
6
6
|
dataMap: IFDataMapExcel[];
|
|
7
7
|
}
|
|
8
8
|
export interface IFDataMapExcel {
|
|
9
|
+
/** Tên field trong dữ liệu (key để map dữ liệu) */
|
|
9
10
|
field: string;
|
|
11
|
+
/** Danh sách header mặc định có thể mapping với cột Excel */
|
|
10
12
|
headerDefault: string[];
|
|
13
|
+
/** Tên header hiển thị trong bảng */
|
|
11
14
|
header: string;
|
|
12
|
-
|
|
15
|
+
/** Kiểu dữ liệu của cột */
|
|
16
|
+
dataType: "numeric" | "string" | "date" | "datetime" | "boolean";
|
|
17
|
+
/** Tên cột trong Excel (ví dụ: "A", "B", "C"...) (không cần truyền) */
|
|
13
18
|
column?: string;
|
|
19
|
+
/** Không cho phép chỉnh sửa giá trị nếu = true */
|
|
14
20
|
disableEdit?: boolean;
|
|
21
|
+
/** Bắt buộc nhập dữ liệu nếu = true */
|
|
15
22
|
isRequired?: boolean;
|
|
23
|
+
/** Độ rộng cột (pixel hoặc đơn vị tùy theo UI) */
|
|
24
|
+
width?: number;
|
|
16
25
|
}
|
|
17
26
|
export type IFNumberFormat = {
|
|
18
27
|
dateFormat?: string;
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from
|
|
2
|
-
import { UseFormSetValue } from
|
|
3
|
-
|
|
4
|
-
step: number;
|
|
5
|
-
file?: any;
|
|
6
|
-
sheetId?: string;
|
|
7
|
-
headerRow?: number;
|
|
8
|
-
dataMap: IFDataMapExcel[];
|
|
9
|
-
}
|
|
10
|
-
export interface IFDataMapExcel {
|
|
11
|
-
field: string;
|
|
12
|
-
headerDefault: string[];
|
|
13
|
-
header: string;
|
|
14
|
-
dataType: 'numeric' | 'string' | 'date' | 'datetime' | 'boolean';
|
|
15
|
-
column?: string;
|
|
16
|
-
disableEdit?: boolean;
|
|
17
|
-
isRequired?: boolean;
|
|
18
|
-
}
|
|
1
|
+
import { Dispatch, SetStateAction } from "react";
|
|
2
|
+
import { UseFormSetValue } from "react-hook-form";
|
|
3
|
+
import { IFDataMapExcel } from "./type";
|
|
19
4
|
export declare const getSheetsExcel: (file: any, setValue: UseFormSetValue<any>, setOptionSheetName: Dispatch<SetStateAction<any[]>>) => void;
|
|
20
5
|
export declare const getColumnsSheetExcel: (file: any, headerRow: number, sheetName: string, handleSetColumns: any) => void;
|
|
21
6
|
export declare const mapDataImportExcel: (dataSheet: any[], headerRow: number, dataMap: IFDataMapExcel[], handleValidate: any) => Promise<any[]>;
|
|
7
|
+
export declare const connectString: (t: any, props: string[]) => any;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IColumnTable } from "../type";
|
|
2
|
+
export interface IFPropsDetail {
|
|
3
|
+
column: IColumnTable[];
|
|
4
|
+
setColumn: any;
|
|
5
|
+
openSidebar: boolean;
|
|
6
|
+
handleSidebar: any;
|
|
7
|
+
resetDefaultColumns?: () => void;
|
|
8
|
+
formatSetting?: any;
|
|
9
|
+
}
|
|
10
|
+
declare const SettingColumn: (props: IFPropsDetail) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default SettingColumn;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JSX } from 'react';
|
|
2
1
|
import 'bs-stepper/dist/css/bs-stepper.min.css';
|
|
2
|
+
import { JSX } from 'react';
|
|
3
3
|
type IFSteps = {
|
|
4
4
|
id: string;
|
|
5
5
|
content: JSX.Element;
|
|
@@ -9,6 +9,7 @@ type IFSteps = {
|
|
|
9
9
|
done?: boolean;
|
|
10
10
|
loading?: boolean;
|
|
11
11
|
disable?: boolean;
|
|
12
|
+
visiable?: boolean;
|
|
12
13
|
};
|
|
13
14
|
type IFProps = {
|
|
14
15
|
steps: IFSteps[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { ReactNode, Dispatch, SetStateAction, JSX } from 'react';
|
|
3
|
-
import { UseFormSetValue, UseFormGetValues, UseFormReset
|
|
4
|
-
import { TFunction } from 'react-i18next';
|
|
3
|
+
import { UseFormSetValue, UseFormGetValues, UseFormReset } from 'react-hook-form';
|
|
5
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
import { TFunction } from 'react-i18next';
|
|
6
6
|
|
|
7
7
|
/** Căn lề văn bản trong bảng */
|
|
8
8
|
type ITextAlign = "center" | "left" | "right";
|
|
@@ -444,6 +444,41 @@ type IFRef = {
|
|
|
444
444
|
};
|
|
445
445
|
declare const TableEdit: React.ForwardRefExoticComponent<IFTableEditProps & React.RefAttributes<IFRef>>;
|
|
446
446
|
|
|
447
|
+
interface IFDataStyleSetting {
|
|
448
|
+
color: string;
|
|
449
|
+
backgroundColor: string;
|
|
450
|
+
fontFamily: string;
|
|
451
|
+
fontSize: number;
|
|
452
|
+
bold: boolean;
|
|
453
|
+
italic: boolean;
|
|
454
|
+
underline: boolean;
|
|
455
|
+
}
|
|
456
|
+
interface IFDataInputStyle {
|
|
457
|
+
value: IFDataStyleSetting;
|
|
458
|
+
onChange: any;
|
|
459
|
+
disabled?: boolean;
|
|
460
|
+
disabledColor?: boolean;
|
|
461
|
+
disabledBackgroundColor?: boolean;
|
|
462
|
+
disabledFontFamily?: boolean;
|
|
463
|
+
disabledFontSize?: boolean;
|
|
464
|
+
disabledBold?: boolean;
|
|
465
|
+
disabledItalic?: boolean;
|
|
466
|
+
disabledUnderline?: boolean;
|
|
467
|
+
}
|
|
468
|
+
declare const InputStyleComponent: (props: IFDataInputStyle) => react_jsx_runtime.JSX.Element;
|
|
469
|
+
|
|
470
|
+
type IFDataProps$1 = {
|
|
471
|
+
openModal: boolean;
|
|
472
|
+
typeModal: string;
|
|
473
|
+
handleModal: any;
|
|
474
|
+
windowSize: any;
|
|
475
|
+
dataItem: any;
|
|
476
|
+
columns: any;
|
|
477
|
+
setCheckDetailExport?: any;
|
|
478
|
+
columnGroups?: any[];
|
|
479
|
+
};
|
|
480
|
+
declare const ExportExcelComponent: ({ openModal, typeModal, handleModal, windowSize, dataItem, columns, columnGroups }: IFDataProps$1) => react_jsx_runtime.JSX.Element;
|
|
481
|
+
|
|
447
482
|
declare const messageHtmlBoxConfirm: (t: TFunction<"translation", undefined>, message: any[], handle: any, data: any, title?: string, btnOk?: string, btnCancel?: string) => void;
|
|
448
483
|
declare const messageHtmlBoxError: (t: TFunction<"translation", undefined>, message: any[], title?: string, btnCancel?: string) => void;
|
|
449
484
|
declare const messageBoxConfirmDelete: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
|
|
@@ -454,71 +489,6 @@ declare const notificationSuccess: (param: string) => string;
|
|
|
454
489
|
declare const messageBoxConfirmAsync: (t: TFunction<"translation", undefined>, message: string, title?: string, btnOk?: string, btnCancel?: string) => Promise<boolean>;
|
|
455
490
|
declare const messageHtmlBoxConfirmAsync: (t: TFunction<"translation", undefined>, message: any[], title?: string, btnOk?: string, btnCancel?: string) => Promise<unknown>;
|
|
456
491
|
|
|
457
|
-
declare const useOnClickOutside: (ref: any, handler: any) => void;
|
|
458
|
-
declare const checkThousandSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
|
|
459
|
-
declare const checkDecimalSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
|
|
460
|
-
declare const isNullOrUndefined: (d: any) => boolean;
|
|
461
|
-
declare const generateUUID: () => string;
|
|
462
|
-
/**
|
|
463
|
-
* format chuỗi kí tự số
|
|
464
|
-
* @param str chuỗi số cần format
|
|
465
|
-
* @param decimalSeparator kí tự thập phân
|
|
466
|
-
* @param thousandSeparator kí tự phân cách hàng nghìn
|
|
467
|
-
* @param fraction số kí tự thập phân
|
|
468
|
-
* @param isDone đã nhập xong
|
|
469
|
-
* @returns
|
|
470
|
-
*/
|
|
471
|
-
declare const formartNumberic: (str: string | number, decimalSeparator: string, thousandSeparator: string, fraction?: number, isDone?: boolean, haveNegative?: boolean) => string;
|
|
472
|
-
declare const roundNumber: (num: number, fraction: number) => number;
|
|
473
|
-
declare const formatDateTime: (data: any, format?: string) => string;
|
|
474
|
-
declare const FindNodeByPath: (tree: any[], path: string) => {
|
|
475
|
-
parent: any[];
|
|
476
|
-
lastIndex: number | undefined;
|
|
477
|
-
firstIndex: number;
|
|
478
|
-
node: any;
|
|
479
|
-
} | null;
|
|
480
|
-
/**
|
|
481
|
-
* Tính toán cấu trúc bảng từ dữ liệu column dạng cây:
|
|
482
|
-
* - Tạo header dạng nhiều cấp (header theo chiều dọc)
|
|
483
|
-
* - Chuyển cột thành dạng phẳng để render nội dung
|
|
484
|
-
* - Tính toán vị trí cố định trái/phải (fixed column) để hiển thị sticky
|
|
485
|
-
*
|
|
486
|
-
* @param columns Mảng cấu trúc cây đại diện cho các cột của bảng
|
|
487
|
-
* @returns {
|
|
488
|
-
* levels: IHeaderColumnTable[][] // Các hàng header theo cấp
|
|
489
|
-
* flat: IColumnTable[] // Danh sách cột phẳng
|
|
490
|
-
* objWidthFixLeft: Record<number, number> // Offset trái cho cột fixed left
|
|
491
|
-
* objWidthFixRight: Record<number, number> // Offset phải cho cột fixed right
|
|
492
|
-
* lastObjWidthFixLeft: number // Chỉ số cột cuối cùng fixed left
|
|
493
|
-
* fisrtObjWidthFixRight: number // Chỉ số cột đầu tiên fixed right
|
|
494
|
-
* }
|
|
495
|
-
*/
|
|
496
|
-
declare const calculateTableStructure: (columns: any[], settingColumns?: IFSettingColumns[]) => {
|
|
497
|
-
levels: any[][];
|
|
498
|
-
flat: any[];
|
|
499
|
-
flatVisble: any[];
|
|
500
|
-
objWidthFixLeft: Record<number, number>;
|
|
501
|
-
objWidthFixRight: Record<number, number>;
|
|
502
|
-
lastObjWidthFixLeft: number;
|
|
503
|
-
fisrtObjWidthFixRight: number;
|
|
504
|
-
objHeaderWidthFixRight: Record<string, number>;
|
|
505
|
-
objHeaderWidthFixLeft: Record<string, number>;
|
|
506
|
-
indexFirstEdit: number;
|
|
507
|
-
indexLastEdit: number;
|
|
508
|
-
};
|
|
509
|
-
|
|
510
|
-
type IFDataProps$1 = {
|
|
511
|
-
buttonWidth?: number;
|
|
512
|
-
tabParent?: boolean;
|
|
513
|
-
tabChild?: boolean;
|
|
514
|
-
resourceCodeParent?: string;
|
|
515
|
-
resourceCode: string;
|
|
516
|
-
resources: any[];
|
|
517
|
-
renderModal?: any;
|
|
518
|
-
windowSize?: any;
|
|
519
|
-
};
|
|
520
|
-
declare const TabsMenuComponent: ({ buttonWidth, tabParent, tabChild, resourceCodeParent, resources, resourceCode, windowSize, renderModal }: IFDataProps$1) => react_jsx_runtime.JSX.Element;
|
|
521
|
-
|
|
522
492
|
type Props$1 = {
|
|
523
493
|
id?: string;
|
|
524
494
|
value: any;
|
|
@@ -608,112 +578,17 @@ type Props = {
|
|
|
608
578
|
};
|
|
609
579
|
declare const SelectTableTree: React__default.ForwardRefExoticComponent<Props & React__default.RefAttributes<unknown>>;
|
|
610
580
|
|
|
611
|
-
interface IFDataStyleSetting {
|
|
612
|
-
color: string;
|
|
613
|
-
backgroundColor: string;
|
|
614
|
-
fontFamily: string;
|
|
615
|
-
fontSize: number;
|
|
616
|
-
bold: boolean;
|
|
617
|
-
italic: boolean;
|
|
618
|
-
underline: boolean;
|
|
619
|
-
}
|
|
620
|
-
interface IFDataInputStyle {
|
|
621
|
-
value: IFDataStyleSetting;
|
|
622
|
-
onChange: any;
|
|
623
|
-
disabled?: boolean;
|
|
624
|
-
disabledColor?: boolean;
|
|
625
|
-
disabledBackgroundColor?: boolean;
|
|
626
|
-
disabledFontFamily?: boolean;
|
|
627
|
-
disabledFontSize?: boolean;
|
|
628
|
-
disabledBold?: boolean;
|
|
629
|
-
disabledItalic?: boolean;
|
|
630
|
-
disabledUnderline?: boolean;
|
|
631
|
-
}
|
|
632
|
-
declare const InputStyleComponent: (props: IFDataInputStyle) => react_jsx_runtime.JSX.Element;
|
|
633
|
-
|
|
634
581
|
type IFDataProps = {
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
};
|
|
644
|
-
declare const ExportExcelComponent: ({ openModal, typeModal, handleModal, windowSize, dataItem, columns, columnGroups }: IFDataProps) => react_jsx_runtime.JSX.Element;
|
|
645
|
-
|
|
646
|
-
interface IFDataExcel {
|
|
647
|
-
step: number;
|
|
648
|
-
file?: any;
|
|
649
|
-
sheetId?: string;
|
|
650
|
-
headerRow?: number;
|
|
651
|
-
dataMap: IFDataMapExcel[];
|
|
652
|
-
}
|
|
653
|
-
interface IFDataMapExcel {
|
|
654
|
-
field: string;
|
|
655
|
-
headerDefault: string[];
|
|
656
|
-
header: string;
|
|
657
|
-
dataType: 'numeric' | 'string' | 'date' | 'datetime' | 'boolean';
|
|
658
|
-
column?: string;
|
|
659
|
-
disableEdit?: boolean;
|
|
660
|
-
isRequired?: boolean;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
type IFNumberFormat = {
|
|
664
|
-
dateFormat?: string;
|
|
665
|
-
decimalSeparator?: string;
|
|
666
|
-
thousandSeparator?: string;
|
|
667
|
-
colorNegative?: string;
|
|
668
|
-
prefixNegative?: string;
|
|
669
|
-
suffixNegative?: string;
|
|
670
|
-
};
|
|
671
|
-
|
|
672
|
-
interface IFPropsDetail {
|
|
673
|
-
control: Control<IFDataExcel>;
|
|
674
|
-
watch: UseFormWatch<IFDataExcel>;
|
|
675
|
-
errors: FieldErrors<IFDataExcel>;
|
|
676
|
-
setValue: UseFormSetValue<IFDataExcel>;
|
|
677
|
-
getValues: UseFormGetValues<IFDataExcel>;
|
|
678
|
-
formatNumber?: IFNumberFormat;
|
|
679
|
-
pageOptions: number[];
|
|
680
|
-
pageSizeDefault: number;
|
|
681
|
-
windowSize: any;
|
|
682
|
-
getExcelTemplate?: any;
|
|
683
|
-
optionField: any[];
|
|
684
|
-
dataInvalid: any[];
|
|
685
|
-
dataValid: any[];
|
|
686
|
-
dataValidate: any[];
|
|
687
|
-
dataError: any[];
|
|
688
|
-
headerValidateExcelColumns: any[];
|
|
689
|
-
headerHandleErrorExcelColumns: any[];
|
|
690
|
-
}
|
|
691
|
-
declare const ImportExcelComponent: (props: IFPropsDetail) => react_jsx_runtime.JSX.Element;
|
|
692
|
-
|
|
693
|
-
type IFSteps = {
|
|
694
|
-
id: string;
|
|
695
|
-
content: JSX.Element;
|
|
696
|
-
subtitle?: JSX.Element | string;
|
|
697
|
-
title: JSX.Element | string;
|
|
698
|
-
icon?: JSX.Element | string;
|
|
699
|
-
done?: boolean;
|
|
700
|
-
loading?: boolean;
|
|
701
|
-
disable?: boolean;
|
|
702
|
-
};
|
|
703
|
-
type IFProps = {
|
|
704
|
-
steps: IFSteps[];
|
|
705
|
-
activeStep: number;
|
|
706
|
-
setActiveStep?: (stepper: number) => void;
|
|
707
|
-
className?: string;
|
|
708
|
-
headerClassName?: string;
|
|
709
|
-
contentClassName?: string;
|
|
710
|
-
contentWrapperClassName?: string;
|
|
711
|
-
heightContent?: number | string;
|
|
712
|
-
widthContent?: number | string;
|
|
713
|
-
type?: 'vertical' | 'horizontal' | 'modern-horizontal' | 'modern-vertical';
|
|
714
|
-
separator?: JSX.Element;
|
|
582
|
+
buttonWidth?: number;
|
|
583
|
+
tabParent?: boolean;
|
|
584
|
+
tabChild?: boolean;
|
|
585
|
+
resourceCodeParent?: string;
|
|
586
|
+
resourceCode: string;
|
|
587
|
+
resources: any[];
|
|
588
|
+
renderModal?: any;
|
|
589
|
+
windowSize?: any;
|
|
715
590
|
};
|
|
716
|
-
declare const
|
|
591
|
+
declare const TabsMenuComponent: ({ buttonWidth, tabParent, tabChild, resourceCodeParent, resources, resourceCode, windowSize, renderModal }: IFDataProps) => react_jsx_runtime.JSX.Element;
|
|
717
592
|
|
|
718
593
|
type TableViewProps = {
|
|
719
594
|
idTable: string;
|
|
@@ -743,5 +618,84 @@ type TableViewProps = {
|
|
|
743
618
|
};
|
|
744
619
|
declare const TableView: React__default.FC<TableViewProps>;
|
|
745
620
|
|
|
746
|
-
|
|
747
|
-
|
|
621
|
+
declare const useOnClickOutside: (ref: any, handler: any) => void;
|
|
622
|
+
declare const checkThousandSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
|
|
623
|
+
declare const checkDecimalSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
|
|
624
|
+
declare const isNullOrUndefined: (d: any) => boolean;
|
|
625
|
+
declare const generateUUID: () => string;
|
|
626
|
+
/**
|
|
627
|
+
* format chuỗi kí tự số
|
|
628
|
+
* @param str chuỗi số cần format
|
|
629
|
+
* @param decimalSeparator kí tự thập phân
|
|
630
|
+
* @param thousandSeparator kí tự phân cách hàng nghìn
|
|
631
|
+
* @param fraction số kí tự thập phân
|
|
632
|
+
* @param isDone đã nhập xong
|
|
633
|
+
* @returns
|
|
634
|
+
*/
|
|
635
|
+
declare const formartNumberic: (str: string | number, decimalSeparator: string, thousandSeparator: string, fraction?: number, isDone?: boolean, haveNegative?: boolean) => string;
|
|
636
|
+
declare const roundNumber: (num: number, fraction: number) => number;
|
|
637
|
+
declare const formatDateTime: (data: any, format?: string) => string;
|
|
638
|
+
declare const FindNodeByPath: (tree: any[], path: string) => {
|
|
639
|
+
parent: any[];
|
|
640
|
+
lastIndex: number | undefined;
|
|
641
|
+
firstIndex: number;
|
|
642
|
+
node: any;
|
|
643
|
+
} | null;
|
|
644
|
+
/**
|
|
645
|
+
* Tính toán cấu trúc bảng từ dữ liệu column dạng cây:
|
|
646
|
+
* - Tạo header dạng nhiều cấp (header theo chiều dọc)
|
|
647
|
+
* - Chuyển cột thành dạng phẳng để render nội dung
|
|
648
|
+
* - Tính toán vị trí cố định trái/phải (fixed column) để hiển thị sticky
|
|
649
|
+
*
|
|
650
|
+
* @param columns Mảng cấu trúc cây đại diện cho các cột của bảng
|
|
651
|
+
* @returns {
|
|
652
|
+
* levels: IHeaderColumnTable[][] // Các hàng header theo cấp
|
|
653
|
+
* flat: IColumnTable[] // Danh sách cột phẳng
|
|
654
|
+
* objWidthFixLeft: Record<number, number> // Offset trái cho cột fixed left
|
|
655
|
+
* objWidthFixRight: Record<number, number> // Offset phải cho cột fixed right
|
|
656
|
+
* lastObjWidthFixLeft: number // Chỉ số cột cuối cùng fixed left
|
|
657
|
+
* fisrtObjWidthFixRight: number // Chỉ số cột đầu tiên fixed right
|
|
658
|
+
* }
|
|
659
|
+
*/
|
|
660
|
+
declare const calculateTableStructure: (columns: any[], settingColumns?: IFSettingColumns[]) => {
|
|
661
|
+
levels: any[][];
|
|
662
|
+
flat: any[];
|
|
663
|
+
flatVisble: any[];
|
|
664
|
+
objWidthFixLeft: Record<number, number>;
|
|
665
|
+
objWidthFixRight: Record<number, number>;
|
|
666
|
+
lastObjWidthFixLeft: number;
|
|
667
|
+
fisrtObjWidthFixRight: number;
|
|
668
|
+
objHeaderWidthFixRight: Record<string, number>;
|
|
669
|
+
objHeaderWidthFixLeft: Record<string, number>;
|
|
670
|
+
indexFirstEdit: number;
|
|
671
|
+
indexLastEdit: number;
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
type IFSteps = {
|
|
675
|
+
id: string;
|
|
676
|
+
content: JSX.Element;
|
|
677
|
+
subtitle?: JSX.Element | string;
|
|
678
|
+
title: JSX.Element | string;
|
|
679
|
+
icon?: JSX.Element | string;
|
|
680
|
+
done?: boolean;
|
|
681
|
+
loading?: boolean;
|
|
682
|
+
disable?: boolean;
|
|
683
|
+
visiable?: boolean;
|
|
684
|
+
};
|
|
685
|
+
type IFProps = {
|
|
686
|
+
steps: IFSteps[];
|
|
687
|
+
activeStep: number;
|
|
688
|
+
setActiveStep?: (stepper: number) => void;
|
|
689
|
+
className?: string;
|
|
690
|
+
headerClassName?: string;
|
|
691
|
+
contentClassName?: string;
|
|
692
|
+
contentWrapperClassName?: string;
|
|
693
|
+
heightContent?: number | string;
|
|
694
|
+
widthContent?: number | string;
|
|
695
|
+
type?: 'vertical' | 'horizontal' | 'modern-horizontal' | 'modern-vertical';
|
|
696
|
+
separator?: JSX.Element;
|
|
697
|
+
};
|
|
698
|
+
declare const Wizard: React.ForwardRefExoticComponent<IFProps & React.RefAttributes<unknown>>;
|
|
699
|
+
|
|
700
|
+
export { ExportExcelComponent, FindNodeByPath, InputStyleComponent, 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 };
|
|
701
|
+
export type { FromItemsField, IColumnTable, IColumnsAgg, ICommandItem, IFColumnSelectTable, IFColumnSelectTableTree, IFCurrentPage, IFCurrentPageConfig, IFFilterTable, IFOrderTable, IFPageSize, IFSettingColumns, IFTableEditButton, IFTableEditFormat, IFTableEditPaging, IFTableEditSearchSetting, IFTableEditToolbar, IFTableSelectFormat, IFTableTreeSelectFormat, IFToolbarOptions, IHeaderColumnTable, ISettingFormElement, ISettingNumericElement, ISettingSelectElement };
|