react-table-edit 1.5.23 → 1.5.25

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.
@@ -1,2 +1,5 @@
1
- declare const IconCustom: (props: any) => import("react/jsx-runtime").JSX.Element | null;
1
+ declare const IconCustom: (props: {
2
+ iconName?: string;
3
+ size: number;
4
+ }) => import("react/jsx-runtime").JSX.Element | null;
2
5
  export default IconCustom;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  export type IFColumnSelectTableTree = {
3
3
  field: string;
4
4
  headerText: string;
@@ -1,8 +1,10 @@
1
1
  import { IColumnTable } from '../type';
2
2
  type IFProps = {
3
3
  contentColumns: IColumnTable[];
4
- groupColumns?: string[];
5
- visibleGroupColumn?: boolean;
4
+ groupSetting?: {
5
+ visibleGroupColumn?: boolean;
6
+ groupColumns: string[];
7
+ };
6
8
  };
7
- export declare const RenderColGroup: ({ contentColumns, groupColumns, visibleGroupColumn }: IFProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const RenderColGroup: ({ contentColumns, groupSetting }: IFProps) => import("react/jsx-runtime").JSX.Element;
8
10
  export {};
@@ -24,8 +24,10 @@ type IFDataProps = {
24
24
  container: any;
25
25
  optionsFilter: any;
26
26
  formatSetting?: IFTableEditFormat;
27
- groupColumns?: string[];
28
- visibleGroupColumn?: boolean;
27
+ groupSetting?: {
28
+ visibleGroupColumn?: boolean;
29
+ groupColumns: string[];
30
+ };
29
31
  setColumns?: (columns: IHeaderColumnTable[]) => void;
30
32
  changeFilter: (data: IFFilterTable[]) => void;
31
33
  setContentColumns: (col: any[]) => void;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { IColumnTable, IFSettingColumns } from '../type';
2
3
  export interface IFPropsDetail {
3
4
  gridRef: any;
@@ -14,5 +15,5 @@ export interface IFPropsDetail {
14
15
  resetDefaultColumns?: () => void;
15
16
  formatSetting?: any;
16
17
  }
17
- declare const SettingColumn: (props: IFPropsDetail) => import("react/jsx-runtime").JSX.Element;
18
+ declare const SettingColumn: React.MemoExoticComponent<(props: IFPropsDetail) => import("react/jsx-runtime").JSX.Element>;
18
19
  export default SettingColumn;
@@ -18,5 +18,5 @@ interface ToolbarBottomProps {
18
18
  toolbarSetting?: IFTableEditToolbar;
19
19
  headerColumns: any[][];
20
20
  }
21
- declare const ToolbarBottom: ({ handleAdd, handleDuplicate, handleInsertBefore, handleInsertAfter, handleDeleteAll, setOpenPopupSetupColumn, focusRow, editDisable, addDisable, buttonSetting, toolbarSetting, headerColumns }: ToolbarBottomProps) => import("react/jsx-runtime").JSX.Element;
21
+ declare const ToolbarBottom: ({ handleAdd, handleDuplicate, handleInsertBefore, handleInsertAfter, handleDeleteAll, setOpenPopupSetupColumn, focusRow, editDisable, addDisable, buttonSetting, toolbarSetting }: ToolbarBottomProps) => import("react/jsx-runtime").JSX.Element;
22
22
  export default ToolbarBottom;
@@ -16,8 +16,10 @@ type IContentColProps = {
16
16
  isMulti?: boolean;
17
17
  fieldKey: string;
18
18
  zeroVisiable?: boolean;
19
- groupColumns?: string[];
20
- visibleGroupColumn?: boolean;
19
+ groupSetting?: {
20
+ visibleGroupColumn?: boolean;
21
+ groupColumns: string[];
22
+ };
21
23
  setSelectedRows: (value: any[]) => void;
22
24
  };
23
25
  export declare const RenderContentCol: (props: IContentColProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React, { Dispatch, SetStateAction } from 'react';
2
- import { IColumnsAgg, IColumnTable, IFFilterTable, IFOrderTable, IFSettingColumns, IFTableEditFormat, IFTableEditPaging, IFTableEditSearchSetting, IFTableEditToolbar } from '../type';
2
+ import { IColumnsAgg, IColumnTable, IContextItem, IFFilterTable, IFOrderTable, IFSettingColumns, IFTableEditFormat, IFTableEditPaging, IFTableEditSearchSetting, IFTableEditToolbar } from '../type';
3
3
  type TableViewProps = {
4
4
  idTable: string;
5
5
  dataSource: any[];
@@ -28,7 +28,7 @@ type TableViewProps = {
28
28
  groupColumns: string[];
29
29
  onGroup: (props: any) => void;
30
30
  };
31
- querySetting: {
31
+ querySetting?: {
32
32
  client?: boolean;
33
33
  allowFiltering?: boolean;
34
34
  allowSorting?: boolean;
@@ -39,6 +39,9 @@ type TableViewProps = {
39
39
  resetDefaultColumns?: () => void;
40
40
  saveSettingColumn?: (data: IFSettingColumns[]) => void;
41
41
  setSelectedItem?: Dispatch<SetStateAction<any>>;
42
+ handleDoubleClick?: (args: any) => void;
43
+ contextMenuItems?: IContextItem[];
44
+ handleContextMenuClick?: (context: IContextItem, data: any) => void;
42
45
  isMulti?: boolean;
43
46
  handleSelect?: (data: any) => void;
44
47
  };
@@ -30,6 +30,17 @@ export type ICommandItem = {
30
30
  /** Template hiển thị thao tác */
31
31
  commandTemplate?: ReactNode;
32
32
  };
33
+ /** Cấu hình thao tác menu bảng */
34
+ export type IContextItem = {
35
+ /** ID thao tác */
36
+ id: string;
37
+ /** Màu hiển thị thao tác */
38
+ color?: string;
39
+ /** Tooltip mô tả thao tác */
40
+ text: string;
41
+ /** Icon đại diện thao tác */
42
+ icon?: string;
43
+ };
33
44
  /** Cấu hình thanh công cụ (toolbar) */
34
45
  export type IFToolbarOptions = {
35
46
  /** Vị trí hiển thị (trái, phải, giữa) */
package/dist/index.d.ts CHANGED
@@ -34,6 +34,17 @@ type ICommandItem = {
34
34
  /** Template hiển thị thao tác */
35
35
  commandTemplate?: ReactNode;
36
36
  };
37
+ /** Cấu hình thao tác menu bảng */
38
+ type IContextItem = {
39
+ /** ID thao tác */
40
+ id: string;
41
+ /** Màu hiển thị thao tác */
42
+ color?: string;
43
+ /** Tooltip mô tả thao tác */
44
+ text: string;
45
+ /** Icon đại diện thao tác */
46
+ icon?: string;
47
+ };
37
48
  /** Cấu hình thanh công cụ (toolbar) */
38
49
  type IFToolbarOptions = {
39
50
  /** Vị trí hiển thị (trái, phải, giữa) */
@@ -715,7 +726,7 @@ type TableViewProps = {
715
726
  groupColumns: string[];
716
727
  onGroup: (props: any) => void;
717
728
  };
718
- querySetting: {
729
+ querySetting?: {
719
730
  client?: boolean;
720
731
  allowFiltering?: boolean;
721
732
  allowSorting?: boolean;
@@ -726,6 +737,9 @@ type TableViewProps = {
726
737
  resetDefaultColumns?: () => void;
727
738
  saveSettingColumn?: (data: IFSettingColumns[]) => void;
728
739
  setSelectedItem?: Dispatch<SetStateAction<any>>;
740
+ handleDoubleClick?: (args: any) => void;
741
+ contextMenuItems?: IContextItem[];
742
+ handleContextMenuClick?: (context: IContextItem, data: any) => void;
729
743
  isMulti?: boolean;
730
744
  handleSelect?: (data: any) => void;
731
745
  };
@@ -815,4 +829,4 @@ type IFProps = {
815
829
  declare const Wizard: React.ForwardRefExoticComponent<IFProps & React.RefAttributes<unknown>>;
816
830
 
817
831
  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 };
818
- 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 };
832
+ export type { FromItemsField, ICellInfo, IColumnTable, IColumnType, IColumnsAgg, ICommandItem, IContextItem, IFColumnSelectTable, IFColumnSelectTableTree, IFCurrentPage, IFCurrentPageConfig, IFFilterTable, IFOrderTable, IFPageSize, IFSettingColumns, IFTableEditButton, IFTableEditFormat, IFTableEditPaging, IFTableEditSearchSetting, IFTableEditToolbar, IFTableSelectFormat, IFTableTreeSelectFormat, IFToolbarOptions, IFilterType, IHeaderColumnTable, ISettingFormElement, ISettingNumericElement, ISettingSelectElement };