react-table-edit 1.4.47 → 1.4.49
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 +201 -173
- package/dist/index.js +7340 -831
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7340 -831
- 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 { 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,115 @@ 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
|
+
|
|
482
|
+
interface IFDataMapExcel {
|
|
483
|
+
/** Tên field trong dữ liệu (key để map dữ liệu) */
|
|
484
|
+
field: string;
|
|
485
|
+
/** Danh sách header mặc định có thể mapping với cột Excel */
|
|
486
|
+
headerDefault: string[];
|
|
487
|
+
/** Tên header hiển thị trong bảng */
|
|
488
|
+
header: string;
|
|
489
|
+
/** Kiểu dữ liệu của cột */
|
|
490
|
+
dataType: "numeric" | "string" | "date" | "datetime" | "boolean";
|
|
491
|
+
/** Tên cột trong Excel (ví dụ: "A", "B", "C"...) (không cần truyền) */
|
|
492
|
+
column?: string;
|
|
493
|
+
/** Không cho phép chỉnh sửa giá trị nếu = true */
|
|
494
|
+
disableEdit?: boolean;
|
|
495
|
+
/** Bắt buộc nhập dữ liệu nếu = true */
|
|
496
|
+
isRequired?: boolean;
|
|
497
|
+
/** Độ rộng cột (pixel hoặc đơn vị tùy theo UI) */
|
|
498
|
+
width?: number;
|
|
499
|
+
}
|
|
500
|
+
type IFNumberFormat = {
|
|
501
|
+
dateFormat?: string;
|
|
502
|
+
decimalSeparator?: string;
|
|
503
|
+
thousandSeparator?: string;
|
|
504
|
+
colorNegative?: string;
|
|
505
|
+
prefixNegative?: string;
|
|
506
|
+
suffixNegative?: string;
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
type IFProps$1 = {
|
|
510
|
+
/** Kích thước cửa sổ hiện tại (width, height) */
|
|
511
|
+
windowSize: any;
|
|
512
|
+
/** Trạng thái mở/đóng modal import */
|
|
513
|
+
openModal: boolean;
|
|
514
|
+
/** Hàm toggle mở/đóng modal */
|
|
515
|
+
handleModal: () => void;
|
|
516
|
+
/** Hàm format số (tuỳ chọn) */
|
|
517
|
+
formatNumber?: IFNumberFormat;
|
|
518
|
+
/** Danh sách các lựa chọn số trang (ví dụ [10, 20, 50]) */
|
|
519
|
+
pageOptions: number[];
|
|
520
|
+
/** Số hàng tiêu đề mặc định */
|
|
521
|
+
defaultHeaderRow?: number;
|
|
522
|
+
/** Số bản ghi mặc định trên một trang */
|
|
523
|
+
pageSizeDefault: number;
|
|
524
|
+
/** Cấu hình mapping cột giữa file Excel và dữ liệu trong hệ thống */
|
|
525
|
+
mapColumn: IFDataMapExcel[];
|
|
526
|
+
/** Cấu hình header bảng validate (tuỳ chọn) */
|
|
527
|
+
headerValidateExcelColumns?: IColumnTable[];
|
|
528
|
+
/** Cấu hình header bảng lỗi (tuỳ chọn) */
|
|
529
|
+
headerErrorExcelColumns?: IColumnTable[];
|
|
530
|
+
/**
|
|
531
|
+
* link lấy mẫu import
|
|
532
|
+
*/
|
|
533
|
+
templateUrl?: string;
|
|
534
|
+
/**
|
|
535
|
+
* Hàm validate từng cell (tuỳ chọn)
|
|
536
|
+
* @param item Dòng dữ liệu hiện tại
|
|
537
|
+
* @param ele Cấu hình mapping của cột
|
|
538
|
+
* @param value Giá trị trong cell
|
|
539
|
+
*/
|
|
540
|
+
handleValidate?: (item: any, ele: IFDataMapExcel, value: string) => void;
|
|
541
|
+
/**
|
|
542
|
+
* API import Excel
|
|
543
|
+
* @param params Tham số gửi lên server
|
|
544
|
+
* @returns Promise<any>
|
|
545
|
+
*/
|
|
546
|
+
importExcelApi: (params: any) => Promise<any>;
|
|
547
|
+
/**
|
|
548
|
+
* API validate Excel
|
|
549
|
+
* @param params Tham số gửi lên server
|
|
550
|
+
* @returns Promise<any>
|
|
551
|
+
*/
|
|
552
|
+
validateExcelApi: (params: any) => Promise<any>;
|
|
553
|
+
};
|
|
554
|
+
declare const ModalImportComponent: (props: IFProps$1) => react_jsx_runtime.JSX.Element;
|
|
555
|
+
|
|
447
556
|
declare const messageHtmlBoxConfirm: (t: TFunction<"translation", undefined>, message: any[], handle: any, data: any, title?: string, btnOk?: string, btnCancel?: string) => void;
|
|
448
557
|
declare const messageHtmlBoxError: (t: TFunction<"translation", undefined>, message: any[], title?: string, btnCancel?: string) => void;
|
|
449
558
|
declare const messageBoxConfirmDelete: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
|
|
@@ -454,71 +563,6 @@ declare const notificationSuccess: (param: string) => string;
|
|
|
454
563
|
declare const messageBoxConfirmAsync: (t: TFunction<"translation", undefined>, message: string, title?: string, btnOk?: string, btnCancel?: string) => Promise<boolean>;
|
|
455
564
|
declare const messageHtmlBoxConfirmAsync: (t: TFunction<"translation", undefined>, message: any[], title?: string, btnOk?: string, btnCancel?: string) => Promise<unknown>;
|
|
456
565
|
|
|
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
566
|
type Props$1 = {
|
|
523
567
|
id?: string;
|
|
524
568
|
value: any;
|
|
@@ -608,112 +652,17 @@ type Props = {
|
|
|
608
652
|
};
|
|
609
653
|
declare const SelectTableTree: React__default.ForwardRefExoticComponent<Props & React__default.RefAttributes<unknown>>;
|
|
610
654
|
|
|
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
655
|
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;
|
|
656
|
+
buttonWidth?: number;
|
|
657
|
+
tabParent?: boolean;
|
|
658
|
+
tabChild?: boolean;
|
|
659
|
+
resourceCodeParent?: string;
|
|
660
|
+
resourceCode: string;
|
|
661
|
+
resources: any[];
|
|
662
|
+
renderModal?: any;
|
|
663
|
+
windowSize?: any;
|
|
715
664
|
};
|
|
716
|
-
declare const
|
|
665
|
+
declare const TabsMenuComponent: ({ buttonWidth, tabParent, tabChild, resourceCodeParent, resources, resourceCode, windowSize, renderModal }: IFDataProps) => react_jsx_runtime.JSX.Element;
|
|
717
666
|
|
|
718
667
|
type TableViewProps = {
|
|
719
668
|
idTable: string;
|
|
@@ -743,5 +692,84 @@ type TableViewProps = {
|
|
|
743
692
|
};
|
|
744
693
|
declare const TableView: React__default.FC<TableViewProps>;
|
|
745
694
|
|
|
746
|
-
|
|
747
|
-
|
|
695
|
+
declare const useOnClickOutside: (ref: any, handler: any) => void;
|
|
696
|
+
declare const checkThousandSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
|
|
697
|
+
declare const checkDecimalSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
|
|
698
|
+
declare const isNullOrUndefined: (d: any) => boolean;
|
|
699
|
+
declare const generateUUID: () => string;
|
|
700
|
+
/**
|
|
701
|
+
* format chuỗi kí tự số
|
|
702
|
+
* @param str chuỗi số cần format
|
|
703
|
+
* @param decimalSeparator kí tự thập phân
|
|
704
|
+
* @param thousandSeparator kí tự phân cách hàng nghìn
|
|
705
|
+
* @param fraction số kí tự thập phân
|
|
706
|
+
* @param isDone đã nhập xong
|
|
707
|
+
* @returns
|
|
708
|
+
*/
|
|
709
|
+
declare const formartNumberic: (str: string | number, decimalSeparator: string, thousandSeparator: string, fraction?: number, isDone?: boolean, haveNegative?: boolean) => string;
|
|
710
|
+
declare const roundNumber: (num: number, fraction: number) => number;
|
|
711
|
+
declare const formatDateTime: (data: any, format?: string) => string;
|
|
712
|
+
declare const FindNodeByPath: (tree: any[], path: string) => {
|
|
713
|
+
parent: any[];
|
|
714
|
+
lastIndex: number | undefined;
|
|
715
|
+
firstIndex: number;
|
|
716
|
+
node: any;
|
|
717
|
+
} | null;
|
|
718
|
+
/**
|
|
719
|
+
* Tính toán cấu trúc bảng từ dữ liệu column dạng cây:
|
|
720
|
+
* - Tạo header dạng nhiều cấp (header theo chiều dọc)
|
|
721
|
+
* - Chuyển cột thành dạng phẳng để render nội dung
|
|
722
|
+
* - Tính toán vị trí cố định trái/phải (fixed column) để hiển thị sticky
|
|
723
|
+
*
|
|
724
|
+
* @param columns Mảng cấu trúc cây đại diện cho các cột của bảng
|
|
725
|
+
* @returns {
|
|
726
|
+
* levels: IHeaderColumnTable[][] // Các hàng header theo cấp
|
|
727
|
+
* flat: IColumnTable[] // Danh sách cột phẳng
|
|
728
|
+
* objWidthFixLeft: Record<number, number> // Offset trái cho cột fixed left
|
|
729
|
+
* objWidthFixRight: Record<number, number> // Offset phải cho cột fixed right
|
|
730
|
+
* lastObjWidthFixLeft: number // Chỉ số cột cuối cùng fixed left
|
|
731
|
+
* fisrtObjWidthFixRight: number // Chỉ số cột đầu tiên fixed right
|
|
732
|
+
* }
|
|
733
|
+
*/
|
|
734
|
+
declare const calculateTableStructure: (columns: any[], settingColumns?: IFSettingColumns[]) => {
|
|
735
|
+
levels: any[][];
|
|
736
|
+
flat: any[];
|
|
737
|
+
flatVisble: any[];
|
|
738
|
+
objWidthFixLeft: Record<number, number>;
|
|
739
|
+
objWidthFixRight: Record<number, number>;
|
|
740
|
+
lastObjWidthFixLeft: number;
|
|
741
|
+
fisrtObjWidthFixRight: number;
|
|
742
|
+
objHeaderWidthFixRight: Record<string, number>;
|
|
743
|
+
objHeaderWidthFixLeft: Record<string, number>;
|
|
744
|
+
indexFirstEdit: number;
|
|
745
|
+
indexLastEdit: number;
|
|
746
|
+
};
|
|
747
|
+
|
|
748
|
+
type IFSteps = {
|
|
749
|
+
id: string;
|
|
750
|
+
content: JSX.Element;
|
|
751
|
+
subtitle?: JSX.Element | string;
|
|
752
|
+
title: JSX.Element | string;
|
|
753
|
+
icon?: JSX.Element | string;
|
|
754
|
+
done?: boolean;
|
|
755
|
+
loading?: boolean;
|
|
756
|
+
disable?: boolean;
|
|
757
|
+
visiable?: boolean;
|
|
758
|
+
};
|
|
759
|
+
type IFProps = {
|
|
760
|
+
steps: IFSteps[];
|
|
761
|
+
activeStep: number;
|
|
762
|
+
setActiveStep?: (stepper: number) => void;
|
|
763
|
+
className?: string;
|
|
764
|
+
headerClassName?: string;
|
|
765
|
+
contentClassName?: string;
|
|
766
|
+
contentWrapperClassName?: string;
|
|
767
|
+
heightContent?: number | string;
|
|
768
|
+
widthContent?: number | string;
|
|
769
|
+
type?: 'vertical' | 'horizontal' | 'modern-horizontal' | 'modern-vertical';
|
|
770
|
+
separator?: JSX.Element;
|
|
771
|
+
};
|
|
772
|
+
declare const Wizard: React.ForwardRefExoticComponent<IFProps & React.RefAttributes<unknown>>;
|
|
773
|
+
|
|
774
|
+
export { 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 };
|
|
775
|
+
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 };
|