react-table-edit 1.2.53 → 1.2.55

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.
Files changed (36) hide show
  1. package/dist/component/edit-form/index.d.ts +39 -0
  2. package/dist/component/edit-form/select-table/index.d.ts +32 -0
  3. package/dist/component/icon/index.d.ts +2 -0
  4. package/dist/component/input-date/index.d.ts +12 -0
  5. package/dist/component/input-number/index.d.ts +27 -0
  6. package/dist/component/input-style/fonts.d.ts +4 -0
  7. package/dist/component/input-style/index.d.ts +23 -0
  8. package/dist/component/input-text/index.d.ts +25 -0
  9. package/dist/component/modal-header/index.d.ts +8 -0
  10. package/dist/component/notifications.d.ts +9 -0
  11. package/dist/component/react-input/index.d.ts +2 -0
  12. package/dist/component/select-table/index.d.ts +57 -0
  13. package/dist/component/select-table-tree/index.d.ts +56 -0
  14. package/dist/component/sidebar/index.d.ts +11 -0
  15. package/dist/component/sidebar-setting-column/index.d.ts +9 -0
  16. package/dist/component/tab-menu/index.d.ts +12 -0
  17. package/dist/component/table/command.d.ts +12 -0
  18. package/dist/component/table/header.d.ts +19 -0
  19. package/dist/component/table/index.d.ts +180 -0
  20. package/dist/component/table/paging/index.d.ts +10 -0
  21. package/dist/component/table/render-edit.d.ts +20 -0
  22. package/dist/component/table/toolbar-bottom.d.ts +7 -0
  23. package/dist/component/table/toolbar-top.d.ts +3 -0
  24. package/dist/component/table/type.d.ts +158 -0
  25. package/dist/component/utils.d.ts +17 -0
  26. package/dist/index.cjs.css +830 -0
  27. package/dist/index.cjs.js +47150 -0
  28. package/dist/index.cjs.js.map +1 -0
  29. package/dist/index.d.ts +10 -368
  30. package/dist/index.esm.css +830 -0
  31. package/dist/index.esm.js +47108 -0
  32. package/dist/index.esm.js.map +1 -0
  33. package/package.json +19 -27
  34. package/dist/index.d.mts +0 -368
  35. package/dist/index.js +0 -5450
  36. package/dist/index.mjs +0 -5420
@@ -0,0 +1,158 @@
1
+ import { Dispatch, ReactNode, SetStateAction } from "react";
2
+ import { IFColumnSelectTable } from "../select-table";
3
+ type ITextAlign = 'center' | 'left' | 'right';
4
+ type IEditType = 'text' | 'numeric' | 'datetime' | 'selectTree' | 'date' | 'select' | 'checkbox' | 'form' | 'color';
5
+ export type ICommandItem = {
6
+ id: string;
7
+ color?: string;
8
+ tooltip?: string;
9
+ icon?: string;
10
+ commandTemplate?: ReactNode;
11
+ };
12
+ export type ISettingFormElement = {
13
+ schema: any;
14
+ labelSize?: 'label-small' | 'label-medium' | 'label-large';
15
+ menuWidth?: number;
16
+ menuHeight?: number;
17
+ onFormOpen?: any;
18
+ onFormSubmit?: any;
19
+ displayValue?: any;
20
+ footerTemplate?: any;
21
+ onChangeField?: any;
22
+ openOnFocus?: boolean;
23
+ isClearable?: boolean;
24
+ };
25
+ export type ISettingSelectElement = {
26
+ isClearable?: boolean;
27
+ isMulti?: boolean;
28
+ loadOptions?: any;
29
+ defaultValue?: any;
30
+ fieldValue?: string;
31
+ fieldLabel?: string;
32
+ options?: any[];
33
+ widthPopup?: string | number;
34
+ heightPopup?: string | number;
35
+ iconGroup?: string;
36
+ handAddNew?: any;
37
+ validateOption?: any;
38
+ optionsField?: string;
39
+ columns?: IFColumnSelectTable[];
40
+ };
41
+ export type ISettingNumericElement = {
42
+ min?: number;
43
+ max?: number;
44
+ fraction?: number;
45
+ };
46
+ export type IColumnTable = {
47
+ field: string;
48
+ headerText?: string;
49
+ isPrimarykey?: boolean;
50
+ isUnikey?: boolean;
51
+ haveSum?: boolean;
52
+ haveToolTip?: boolean;
53
+ validate?: any;
54
+ disabledCondition?: any;
55
+ callback?: any;
56
+ width?: string | number;
57
+ minWidth?: string | number;
58
+ maxWidth?: string | number;
59
+ editEnable?: boolean;
60
+ visible?: boolean;
61
+ invisibleDisable?: boolean;
62
+ editType?: IEditType;
63
+ textAlign?: ITextAlign;
64
+ fixedType?: 'left' | 'right' | undefined;
65
+ template?: any;
66
+ commandItems?: ICommandItem[];
67
+ editTypeCondition?: any;
68
+ onPaste?: any;
69
+ onPasteValidate?: any;
70
+ placeholder?: string;
71
+ numericSettings?: ISettingNumericElement;
72
+ selectSettings?: ISettingSelectElement;
73
+ formSettings?: ISettingFormElement;
74
+ columns?: IColumnTable[];
75
+ };
76
+ export type IFToolbarOptions = {
77
+ align: 'left' | 'right' | 'center';
78
+ template: any;
79
+ };
80
+ export type IFTableEditPaging = {
81
+ allowPaging?: boolean;
82
+ pagingClient?: boolean;
83
+ currentPage?: number;
84
+ setCurrentPage?: Dispatch<SetStateAction<number>>;
85
+ setPageSize?: Dispatch<SetStateAction<number>>;
86
+ pageSize?: number;
87
+ totalItem?: number;
88
+ };
89
+ export type IFTableEditButton = {
90
+ deleteAllDisable?: boolean;
91
+ insertAfterDisable?: boolean;
92
+ insertBeforeDisable?: boolean;
93
+ duplicateDisable?: boolean;
94
+ };
95
+ export type IFTableEditToolbar = {
96
+ showTopToolbar?: boolean;
97
+ toolbarOptions?: IFToolbarOptions[];
98
+ toolbarBottomOptions?: IFToolbarOptions[];
99
+ showBottomToolbar?: boolean;
100
+ };
101
+ export type IFTableEditSearchSetting = {
102
+ searchEnable?: boolean;
103
+ searchClient?: boolean;
104
+ searchTerm?: string;
105
+ keyField?: string[];
106
+ setSearchTerm?: Dispatch<SetStateAction<string>>;
107
+ };
108
+ export type IFTableEditProps = {
109
+ idTable?: string;
110
+ dataSource: any[];
111
+ selectEnable?: boolean;
112
+ defaultValue?: any;
113
+ columns: IColumnTable[];
114
+ setDataSource?: any;
115
+ commandClick?: any;
116
+ rowChange?: any;
117
+ handleSelect?: any;
118
+ dataSourceChange?: any;
119
+ height?: number;
120
+ maxHeight?: number;
121
+ minHeight?: number;
122
+ selectedItem?: any;
123
+ setSelectedItem?: Dispatch<SetStateAction<any>>;
124
+ isMulti?: boolean;
125
+ haveSum?: boolean;
126
+ editDisable?: boolean;
127
+ addDisable?: boolean;
128
+ decimalSeparator?: string;
129
+ thousandSeparator?: string;
130
+ pagingSetting?: IFTableEditPaging;
131
+ buttonSetting?: IFTableEditButton;
132
+ toolbarSetting?: IFTableEditToolbar;
133
+ searchSetting?: IFTableEditSearchSetting;
134
+ };
135
+ export type IFPageSize = {
136
+ pageSize: number;
137
+ };
138
+ export type IFCurrentPage = {
139
+ currentPage: number;
140
+ };
141
+ export type IFCurrentPageConfig = {
142
+ currentPage: number;
143
+ oldPage: number;
144
+ };
145
+ export type IHeaderColumnTable = {
146
+ field: string;
147
+ headerText?: string;
148
+ width?: string | number;
149
+ minWidth?: string | number;
150
+ maxWidth?: string | number;
151
+ visible?: boolean;
152
+ rowspan?: number;
153
+ columns?: IColumnTable[];
154
+ textAlign?: ITextAlign;
155
+ fixedType?: 'left' | 'right' | undefined;
156
+ index?: number;
157
+ };
158
+ export {};
@@ -0,0 +1,17 @@
1
+ export declare const useOnClickOutside: (ref: any, handler: any) => void;
2
+ export declare const checkThousandSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
3
+ export declare const checkDecimalSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
4
+ export declare const isNullOrUndefined: (d: any) => boolean;
5
+ export declare const generateUUID: () => string;
6
+ /**
7
+ * format chuỗi kí tự số
8
+ * @param str chuỗi số cần format
9
+ * @param decimalSeparator kí tự thập phân
10
+ * @param thousandSeparator kí tự phân cách hàng nghìn
11
+ * @param fraction số kí tự thập phân
12
+ * @param isDone đã nhập xong
13
+ * @returns
14
+ */
15
+ export declare const formartNumberic: (str: string | number, decimalSeparator: string, thousandSeparator: string, fraction?: number, isDone?: boolean, haveNegative?: boolean) => string;
16
+ export declare const roundNumber: (num: number, fraction: number) => number;
17
+ export declare const formatDateTime: (data: any, format?: string) => string;