react-table-edit 1.5.27 → 1.5.29

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,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { JSX } from 'react';
2
2
  export type IFColumnSelectTableTree = {
3
3
  field: string;
4
4
  headerText: string;
@@ -23,21 +23,14 @@ export type IFTableTreeSelectFormat = {
23
23
  type Props = {
24
24
  id?: string;
25
25
  component?: any;
26
- footerComponent?: any;
27
26
  fieldValue?: string;
28
27
  fieldLabel?: string;
29
- onChange: any;
30
28
  textAlign?: 'left' | 'right' | 'center';
31
29
  placeholder?: string;
32
30
  invalid?: any;
33
- loadOptions?: any;
34
31
  menuWidth?: number;
35
32
  width?: number;
36
- rowData?: any;
37
33
  value: any;
38
- onKeyDown?: (e: React.KeyboardEvent<any>) => void | any;
39
- formatOptionLabel?: any;
40
- handleAdd?: any;
41
34
  options: any[];
42
35
  isMulti?: boolean;
43
36
  noHeader?: boolean;
@@ -49,8 +42,14 @@ type Props = {
49
42
  showFooter?: boolean;
50
43
  selectChilds?: boolean;
51
44
  formatSetting?: IFTableTreeSelectFormat;
52
- onOpenMenu?: any;
53
- onPaste?: any;
45
+ formatOptionLabel?: (ele: any) => JSX.Element;
46
+ onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => any;
47
+ onOpenMenu?: () => void;
48
+ handleAdd?: (e?: any) => void;
49
+ onPaste?: (e: React.ClipboardEvent<HTMLInputElement>) => void;
50
+ onCloseMenu?: () => void;
51
+ footerComponent?: () => JSX.Element;
52
+ onChange: (val: any) => void;
54
53
  };
55
54
  declare const SelectTableTree: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
56
55
  export { SelectTableTree };
@@ -4,6 +4,8 @@ export interface IFPropsDetail {
4
4
  setColumn: any;
5
5
  openSidebar: boolean;
6
6
  handleSidebar: any;
7
+ resetDefaultColumns?: () => void;
8
+ formatSetting?: any;
7
9
  }
8
10
  declare const SidebarSetColumn: (props: IFPropsDetail) => import("react/jsx-runtime").JSX.Element;
9
11
  export default SidebarSetColumn;
@@ -0,0 +1,6 @@
1
+ import { IColumnTable } from '../type';
2
+ type IFProps = {
3
+ contentColumns: IColumnTable[];
4
+ };
5
+ export declare const RenderColGroup: ({ contentColumns }: IFProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -24,10 +24,6 @@ type IFDataProps = {
24
24
  container: any;
25
25
  optionsFilter: any;
26
26
  formatSetting?: IFTableEditFormat;
27
- groupSetting?: {
28
- visibleGroupColumn?: boolean;
29
- groupColumns: string[];
30
- };
31
27
  setColumns?: (columns: IHeaderColumnTable[]) => void;
32
28
  changeFilter: (data: IFFilterTable[]) => void;
33
29
  setContentColumns: (col: any[]) => void;
@@ -16,10 +16,6 @@ type IContentColProps = {
16
16
  isMulti?: boolean;
17
17
  fieldKey: string;
18
18
  zeroVisiable?: boolean;
19
- groupSetting?: {
20
- visibleGroupColumn?: boolean;
21
- groupColumns: string[];
22
- };
23
19
  setSelectedRows: (value: any[]) => void;
24
20
  };
25
21
  export declare const RenderContentCol: (props: IContentColProps) => import("react/jsx-runtime").JSX.Element;
@@ -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 '../type';
3
+ import { IColumnTable, IFFilterTable, IFOrderTable, IFTableEditFormat } from "../type";
4
4
  type IFDataProps = {
5
5
  idTable: string;
6
6
  selectEnable: boolean;
@@ -12,7 +12,7 @@ export interface KeyHandlerParams {
12
12
  pagingClient?: boolean;
13
13
  totalCount: number;
14
14
  columnLastEdit: number;
15
- addMoveNewCell: () => void;
15
+ moveIndexRowToNewPage: () => void;
16
16
  editDisable?: boolean;
17
17
  addDisable?: boolean;
18
18
  handleDuplicate: () => void;
@@ -22,10 +22,10 @@ export interface KeyHandlerParams {
22
22
  getNewParents: (parent: string, index: number) => string;
23
23
  fieldChildren?: string;
24
24
  }
25
- export declare const handleArrowRight: (e: KeyboardEvent<any>, params: KeyHandlerParams) => void;
26
- export declare const handleArrowLeft: (e: KeyboardEvent<any>, params: KeyHandlerParams) => void;
27
- export declare const handleArrowUp: (e: KeyboardEvent<any>, params: KeyHandlerParams) => void;
28
- export declare const handleArrowDown: (e: KeyboardEvent<any>, params: KeyHandlerParams) => "" | undefined;
29
- export declare const handleTab: (e: KeyboardEvent<any>, params: KeyHandlerParams) => void;
30
- export declare const handleEnter: (e: KeyboardEvent<any>, params: KeyHandlerParams) => "" | undefined;
31
- export declare const handleCtrlD: (e: KeyboardEvent<any>, params: KeyHandlerParams) => void;
25
+ export declare const handleArrowRight: (e: KeyboardEvent<any>, params: KeyHandlerParams) => string | undefined;
26
+ export declare const handleArrowLeft: (e: KeyboardEvent<any>, params: KeyHandlerParams) => string | undefined;
27
+ export declare const handleArrowUp: (e: KeyboardEvent<any>, params: KeyHandlerParams) => string | undefined;
28
+ export declare const handleArrowDown: (e: KeyboardEvent<any>, params: KeyHandlerParams) => string | undefined;
29
+ export declare const handleTab: (e: KeyboardEvent<any>, params: KeyHandlerParams) => string | undefined;
30
+ export declare const handleEnter: (e: KeyboardEvent<any>, params: KeyHandlerParams) => string | undefined;
31
+ export declare const handleCtrlD: (e: KeyboardEvent<any>, params: KeyHandlerParams) => string | undefined;
@@ -182,6 +182,8 @@ export type IColumnTable = {
182
182
  editEnable?: boolean;
183
183
  /** Có hiển thị không */
184
184
  visible?: boolean;
185
+ /** Có nhóm không */
186
+ isGroup?: boolean;
185
187
  /** Có cho cho phép điều chỉnh hiển thị không */
186
188
  visibleLocked?: boolean;
187
189
  /** Kiểu chỉnh sửa */
@@ -329,6 +331,7 @@ export type IHeaderColumnTable = {
329
331
  width?: number | string;
330
332
  /** Hiển thị/ẩn */
331
333
  visible?: boolean;
334
+ isGroup?: boolean;
332
335
  /** Số dòng chiếm (rowspan) */
333
336
  rowspan?: number;
334
337
  /** Cột con */
@@ -38,7 +38,7 @@ export declare const FindNodeByPath: (tree: any[], path: string) => {
38
38
  * fisrtObjWidthFixRight: number // Chỉ số cột đầu tiên fixed right
39
39
  * }
40
40
  */
41
- export declare const calculateTableStructure: (columns: any[], settingColumns?: IFSettingColumns[]) => {
41
+ export declare const calculateTableStructure: (columns: any[], settingColumns?: IFSettingColumns[], groupColumns?: string[]) => {
42
42
  levels: any[][];
43
43
  flat: any[];
44
44
  flatVisbleContent: any[];
@@ -55,3 +55,4 @@ export declare const calculateTableStructure: (columns: any[], settingColumns?:
55
55
  * 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
56
56
  */
57
57
  export declare const CheckRowMatch: (row: Record<string, any>, filters: IFFilterTable[], keyword: string, searchKeys: string[]) => boolean;
58
+ export declare const getMaxExpandedLevel: (items: any[], fieldChildren?: string, level?: number) => number;
package/dist/index.d.ts CHANGED
@@ -186,6 +186,8 @@ type IColumnTable = {
186
186
  editEnable?: boolean;
187
187
  /** Có hiển thị không */
188
188
  visible?: boolean;
189
+ /** Có nhóm không */
190
+ isGroup?: boolean;
189
191
  /** Có cho cho phép điều chỉnh hiển thị không */
190
192
  visibleLocked?: boolean;
191
193
  /** Kiểu chỉnh sửa */
@@ -333,6 +335,7 @@ type IHeaderColumnTable = {
333
335
  width?: number | string;
334
336
  /** Hiển thị/ẩn */
335
337
  visible?: boolean;
338
+ isGroup?: boolean;
336
339
  /** Số dòng chiếm (rowspan) */
337
340
  rowspan?: number;
338
341
  /** Cột con */
@@ -655,21 +658,14 @@ type IFTableTreeSelectFormat = {
655
658
  type Props = {
656
659
  id?: string;
657
660
  component?: any;
658
- footerComponent?: any;
659
661
  fieldValue?: string;
660
662
  fieldLabel?: string;
661
- onChange: any;
662
663
  textAlign?: 'left' | 'right' | 'center';
663
664
  placeholder?: string;
664
665
  invalid?: any;
665
- loadOptions?: any;
666
666
  menuWidth?: number;
667
667
  width?: number;
668
- rowData?: any;
669
668
  value: any;
670
- onKeyDown?: (e: React__default.KeyboardEvent<any>) => void | any;
671
- formatOptionLabel?: any;
672
- handleAdd?: any;
673
669
  options: any[];
674
670
  isMulti?: boolean;
675
671
  noHeader?: boolean;
@@ -681,8 +677,14 @@ type Props = {
681
677
  showFooter?: boolean;
682
678
  selectChilds?: boolean;
683
679
  formatSetting?: IFTableTreeSelectFormat;
684
- onOpenMenu?: any;
685
- onPaste?: any;
680
+ formatOptionLabel?: (ele: any) => JSX.Element;
681
+ onKeyDown?: (e: React__default.KeyboardEvent<HTMLInputElement>) => any;
682
+ onOpenMenu?: () => void;
683
+ handleAdd?: (e?: any) => void;
684
+ onPaste?: (e: React__default.ClipboardEvent<HTMLInputElement>) => void;
685
+ onCloseMenu?: () => void;
686
+ footerComponent?: () => JSX.Element;
687
+ onChange: (val: any) => void;
686
688
  };
687
689
  declare const SelectTableTree: React__default.ForwardRefExoticComponent<Props & React__default.RefAttributes<unknown>>;
688
690
 
@@ -784,7 +786,7 @@ declare const FindNodeByPath: (tree: any[], path: string) => {
784
786
  * fisrtObjWidthFixRight: number // Chỉ số cột đầu tiên fixed right
785
787
  * }
786
788
  */
787
- declare const calculateTableStructure: (columns: any[], settingColumns?: IFSettingColumns[]) => {
789
+ declare const calculateTableStructure: (columns: any[], settingColumns?: IFSettingColumns[], groupColumns?: string[]) => {
788
790
  levels: any[][];
789
791
  flat: any[];
790
792
  flatVisbleContent: any[];
@@ -801,6 +803,7 @@ declare const calculateTableStructure: (columns: any[], settingColumns?: IFSetti
801
803
  * 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
802
804
  */
803
805
  declare const CheckRowMatch: (row: Record<string, any>, filters: IFFilterTable[], keyword: string, searchKeys: string[]) => boolean;
806
+ declare const getMaxExpandedLevel: (items: any[], fieldChildren?: string, level?: number) => number;
804
807
 
805
808
  type IFSteps = {
806
809
  id: string;
@@ -828,5 +831,5 @@ type IFProps = {
828
831
  };
829
832
  declare const Wizard: React.ForwardRefExoticComponent<IFProps & React.RefAttributes<unknown>>;
830
833
 
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 };
834
+ export { CheckRowMatch, ExportExcelComponent, FindNodeByPath, InputStyleComponent, ModalImportComponent, SelectTable, SelectTableTree, TableView, TabsMenuComponent, Wizard, calculateTableStructure, checkDecimalSeparator, checkThousandSeparator, TableEdit as default, formartNumberic, formatDateTime, generateUUID, getMaxExpandedLevel, isNullOrUndefined, messageBoxConfirm, messageBoxConfirmAsync, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxConfirmAsync, messageHtmlBoxError, notificationError, notificationSuccess, roundNumber, useOnClickOutside };
832
835
  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 };