react-table-edit 1.4.48 → 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 +1 -1
- package/dist/index.d.ts +75 -1
- package/dist/index.js +21215 -265
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21215 -266
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -479,6 +479,80 @@ type IFDataProps$1 = {
|
|
|
479
479
|
};
|
|
480
480
|
declare const ExportExcelComponent: ({ openModal, typeModal, handleModal, windowSize, dataItem, columns, columnGroups }: IFDataProps$1) => react_jsx_runtime.JSX.Element;
|
|
481
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
|
+
|
|
482
556
|
declare const messageHtmlBoxConfirm: (t: TFunction<"translation", undefined>, message: any[], handle: any, data: any, title?: string, btnOk?: string, btnCancel?: string) => void;
|
|
483
557
|
declare const messageHtmlBoxError: (t: TFunction<"translation", undefined>, message: any[], title?: string, btnCancel?: string) => void;
|
|
484
558
|
declare const messageBoxConfirmDelete: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
|
|
@@ -697,5 +771,5 @@ type IFProps = {
|
|
|
697
771
|
};
|
|
698
772
|
declare const Wizard: React.ForwardRefExoticComponent<IFProps & React.RefAttributes<unknown>>;
|
|
699
773
|
|
|
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 };
|
|
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 };
|
|
701
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 };
|