react-table-edit 1.2.28 → 1.2.30
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/README.md +8 -0
- package/dist/bundle.js +1972 -0
- package/dist/component/edit-form/index.d.ts +39 -0
- package/dist/component/edit-form/select-table/index.d.ts +32 -0
- package/dist/component/icon/index.d.ts +2 -0
- package/dist/component/input-number/index.d.ts +28 -0
- package/dist/component/input-style/fonts.d.ts +4 -0
- package/dist/component/input-style/index.d.ts +23 -0
- package/dist/component/input-text/index.d.ts +25 -0
- package/dist/component/modal-header/index.d.ts +8 -0
- package/dist/component/notifications.d.ts +9 -0
- package/dist/component/react-input/index.d.ts +2 -0
- package/dist/component/select-table/index.d.ts +56 -0
- package/dist/component/select-table-tree/index.d.ts +56 -0
- package/dist/component/sidebar/index.d.ts +11 -0
- package/dist/component/sidebar-setting-column/index.d.ts +9 -0
- package/dist/component/tab-menu/index.d.ts +12 -0
- package/dist/component/table/command.d.ts +12 -0
- package/dist/component/table/header.d.ts +19 -0
- package/dist/component/table/index.d.ts +179 -0
- package/dist/component/table/paging/index.d.ts +10 -0
- package/dist/component/table/render-edit.d.ts +20 -0
- package/dist/component/table/type.d.ts +158 -0
- package/dist/component/utils.d.ts +17 -0
- package/dist/index.d.ts +10 -366
- package/package.json +20 -12
- package/dist/index.css +0 -67
- package/dist/index.css.map +0 -1
- package/dist/index.d.mts +0 -366
- package/dist/index.js +0 -20160
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -20164
- package/dist/index.mjs.map +0 -1
|
@@ -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;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,366 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
type?: 'text' | 'numeric' | 'date' | 'datetime';
|
|
12
|
-
template?: any;
|
|
13
|
-
typeCondition?: any;
|
|
14
|
-
fraction?: number;
|
|
15
|
-
width?: number;
|
|
16
|
-
maxWidth?: number;
|
|
17
|
-
minWidth?: number;
|
|
18
|
-
};
|
|
19
|
-
type IFTableSelectFormat = {
|
|
20
|
-
dateFormat?: string;
|
|
21
|
-
datetimeFormat?: string;
|
|
22
|
-
decimalSeparator?: string;
|
|
23
|
-
thousandSeparator?: string;
|
|
24
|
-
colorNegative?: string;
|
|
25
|
-
prefixNegative?: string;
|
|
26
|
-
suffixNegative?: string;
|
|
27
|
-
};
|
|
28
|
-
type Props$1 = {
|
|
29
|
-
id?: string;
|
|
30
|
-
component?: any;
|
|
31
|
-
footerComponent?: any;
|
|
32
|
-
fieldValue?: string;
|
|
33
|
-
fieldLabel?: string;
|
|
34
|
-
onChange: any;
|
|
35
|
-
textAlign?: 'left' | 'right' | 'center';
|
|
36
|
-
placeholder?: string;
|
|
37
|
-
invalid?: any;
|
|
38
|
-
loadOptions?: any;
|
|
39
|
-
menuWidth?: number;
|
|
40
|
-
width?: number;
|
|
41
|
-
rowData?: any;
|
|
42
|
-
value: any;
|
|
43
|
-
onKeyDown?: any;
|
|
44
|
-
onOpenMenu?: any;
|
|
45
|
-
formatOptionLabel?: any;
|
|
46
|
-
handleAdd?: any;
|
|
47
|
-
options: any[];
|
|
48
|
-
isMulti?: boolean;
|
|
49
|
-
noHeader?: boolean;
|
|
50
|
-
maxHeight?: number;
|
|
51
|
-
columns?: IFColumnSelectTable[];
|
|
52
|
-
isClearable?: boolean;
|
|
53
|
-
isDisabled?: boolean;
|
|
54
|
-
allowCreate?: boolean;
|
|
55
|
-
showFooter?: boolean;
|
|
56
|
-
onPaste?: any;
|
|
57
|
-
formatSetting?: IFTableSelectFormat;
|
|
58
|
-
};
|
|
59
|
-
declare const SelectTable: react__default.ForwardRefExoticComponent<Props$1 & react__default.RefAttributes<unknown>>;
|
|
60
|
-
|
|
61
|
-
type ITextAlign = 'center' | 'left' | 'right';
|
|
62
|
-
type IEditType = 'text' | 'numeric' | 'datetime' | 'selectTree' | 'date' | 'select' | 'checkbox' | 'form' | 'color';
|
|
63
|
-
type ICommandItem = {
|
|
64
|
-
id: string;
|
|
65
|
-
color?: string;
|
|
66
|
-
tooltip?: string;
|
|
67
|
-
icon?: string;
|
|
68
|
-
commandTemplate?: ReactNode;
|
|
69
|
-
};
|
|
70
|
-
type ISettingFormElement = {
|
|
71
|
-
schema: any;
|
|
72
|
-
labelSize?: 'label-small' | 'label-medium' | 'label-large';
|
|
73
|
-
menuWidth?: number;
|
|
74
|
-
menuHeight?: number;
|
|
75
|
-
displayValue?: any;
|
|
76
|
-
footerTemplate?: any;
|
|
77
|
-
openOnFocus?: boolean;
|
|
78
|
-
isClearable?: boolean;
|
|
79
|
-
onChangeField?: any;
|
|
80
|
-
onFormOpen?: any;
|
|
81
|
-
onFormSubmit?: any;
|
|
82
|
-
};
|
|
83
|
-
type ISettingSelectElement = {
|
|
84
|
-
isClearable?: boolean;
|
|
85
|
-
isMulti?: boolean;
|
|
86
|
-
noHeader?: boolean;
|
|
87
|
-
showFooter?: boolean;
|
|
88
|
-
footerComponent?: any;
|
|
89
|
-
formatOptionLabel?: any;
|
|
90
|
-
selectChilds?: boolean;
|
|
91
|
-
loadOptions?: any;
|
|
92
|
-
defaultValue?: any;
|
|
93
|
-
fieldValue?: string;
|
|
94
|
-
fieldLabel?: string;
|
|
95
|
-
fieldChild?: string;
|
|
96
|
-
options?: any[];
|
|
97
|
-
widthPopup?: string | number;
|
|
98
|
-
heightPopup?: string | number;
|
|
99
|
-
iconGroup?: string;
|
|
100
|
-
handAddNew?: any;
|
|
101
|
-
validateOption?: any;
|
|
102
|
-
optionsField?: string;
|
|
103
|
-
columns?: IFColumnSelectTable[];
|
|
104
|
-
onOpenMenu?: any;
|
|
105
|
-
};
|
|
106
|
-
type ISettingNumericElement = {
|
|
107
|
-
min?: number;
|
|
108
|
-
max?: number;
|
|
109
|
-
fraction?: number;
|
|
110
|
-
allowNegative?: boolean;
|
|
111
|
-
};
|
|
112
|
-
type IColumnTable = {
|
|
113
|
-
field: string;
|
|
114
|
-
headerText?: string;
|
|
115
|
-
isPrimarykey?: boolean;
|
|
116
|
-
isUnikey?: boolean;
|
|
117
|
-
haveSum?: boolean;
|
|
118
|
-
haveToolTip?: boolean;
|
|
119
|
-
validate?: any;
|
|
120
|
-
disabledCondition?: any;
|
|
121
|
-
callback?: any;
|
|
122
|
-
width?: number | string;
|
|
123
|
-
minWidth?: number | string;
|
|
124
|
-
maxWidth?: number | string;
|
|
125
|
-
editEnable?: boolean;
|
|
126
|
-
visible?: boolean;
|
|
127
|
-
invisibleDisable?: boolean;
|
|
128
|
-
editType?: IEditType;
|
|
129
|
-
textAlign?: ITextAlign;
|
|
130
|
-
fixedType?: 'left' | 'right' | undefined;
|
|
131
|
-
template?: any;
|
|
132
|
-
commandItems?: ICommandItem[];
|
|
133
|
-
editTypeCondition?: any;
|
|
134
|
-
onPaste?: any;
|
|
135
|
-
onPasteValidate?: any;
|
|
136
|
-
placeholder?: string;
|
|
137
|
-
numericSettings?: ISettingNumericElement;
|
|
138
|
-
selectSettings?: ISettingSelectElement;
|
|
139
|
-
formSettings?: ISettingFormElement;
|
|
140
|
-
columns?: IColumnTable[];
|
|
141
|
-
};
|
|
142
|
-
type IFToolbarOptions = {
|
|
143
|
-
align: 'left' | 'right' | 'center';
|
|
144
|
-
template: any;
|
|
145
|
-
};
|
|
146
|
-
type IFTableEditPaging = {
|
|
147
|
-
allowPaging?: boolean;
|
|
148
|
-
pagingClient?: boolean;
|
|
149
|
-
currentPage?: number;
|
|
150
|
-
setCurrentPage?: Dispatch<SetStateAction<number>>;
|
|
151
|
-
setPageSize?: Dispatch<SetStateAction<number>>;
|
|
152
|
-
pageSize?: number;
|
|
153
|
-
totalItem?: number;
|
|
154
|
-
};
|
|
155
|
-
type IFTableEditButton = {
|
|
156
|
-
deleteAllDisable?: boolean;
|
|
157
|
-
insertAfterDisable?: boolean;
|
|
158
|
-
insertBeforeDisable?: boolean;
|
|
159
|
-
duplicateDisable?: boolean;
|
|
160
|
-
};
|
|
161
|
-
type IFTableEditToolbar = {
|
|
162
|
-
showTopToolbar?: boolean;
|
|
163
|
-
toolbarOptions?: IFToolbarOptions[];
|
|
164
|
-
toolbarBottomOptions?: IFToolbarOptions[];
|
|
165
|
-
showBottomToolbar?: boolean;
|
|
166
|
-
};
|
|
167
|
-
type IFTableEditSearchSetting = {
|
|
168
|
-
searchEnable?: boolean;
|
|
169
|
-
searchClient?: boolean;
|
|
170
|
-
searchTerm?: string;
|
|
171
|
-
keyField?: string[];
|
|
172
|
-
setSearchTerm?: Dispatch<SetStateAction<string>>;
|
|
173
|
-
};
|
|
174
|
-
type IFTableEditFormat = {
|
|
175
|
-
dateFormat?: string;
|
|
176
|
-
datetimeFormat?: string;
|
|
177
|
-
decimalSeparator?: string;
|
|
178
|
-
thousandSeparator?: string;
|
|
179
|
-
colorNegative?: string;
|
|
180
|
-
prefixNegative?: string;
|
|
181
|
-
suffixNegative?: string;
|
|
182
|
-
};
|
|
183
|
-
type IFTableEditProps = {
|
|
184
|
-
idTable?: string;
|
|
185
|
-
dataSource: any[];
|
|
186
|
-
selectEnable?: boolean;
|
|
187
|
-
defaultValue?: any;
|
|
188
|
-
columns: IColumnTable[];
|
|
189
|
-
setDataSource?: any;
|
|
190
|
-
commandClick?: any;
|
|
191
|
-
rowChange?: any;
|
|
192
|
-
handleSelect?: any;
|
|
193
|
-
dataSourceChange?: any;
|
|
194
|
-
height?: number;
|
|
195
|
-
maxHeight?: number;
|
|
196
|
-
minHeight?: number;
|
|
197
|
-
selectedItem?: any;
|
|
198
|
-
setSelectedItem?: Dispatch<SetStateAction<any>>;
|
|
199
|
-
isMulti?: boolean;
|
|
200
|
-
editDisable?: boolean;
|
|
201
|
-
addDisable?: boolean;
|
|
202
|
-
haveSum?: boolean;
|
|
203
|
-
disableAutoKey?: boolean;
|
|
204
|
-
formatSetting?: IFTableEditFormat;
|
|
205
|
-
pagingSetting?: IFTableEditPaging;
|
|
206
|
-
buttonSetting?: IFTableEditButton;
|
|
207
|
-
toolbarSetting?: IFTableEditToolbar;
|
|
208
|
-
searchSetting?: IFTableEditSearchSetting;
|
|
209
|
-
};
|
|
210
|
-
type IFPageSize = {
|
|
211
|
-
pageSize: number;
|
|
212
|
-
};
|
|
213
|
-
type IFCurrentPage = {
|
|
214
|
-
currentPage: number;
|
|
215
|
-
};
|
|
216
|
-
type IFCurrentPageConfig = {
|
|
217
|
-
currentPage: number;
|
|
218
|
-
oldPage: number;
|
|
219
|
-
};
|
|
220
|
-
type IFRef = {
|
|
221
|
-
refeshFocusRow: any;
|
|
222
|
-
};
|
|
223
|
-
type IHeaderColumnTable = {
|
|
224
|
-
field: string;
|
|
225
|
-
headerText?: string;
|
|
226
|
-
width?: number | string;
|
|
227
|
-
minWidth?: number | string;
|
|
228
|
-
maxWidth?: number | string;
|
|
229
|
-
visible?: boolean;
|
|
230
|
-
rowspan?: number;
|
|
231
|
-
columns?: IColumnTable[];
|
|
232
|
-
textAlign?: ITextAlign;
|
|
233
|
-
fixedType?: 'left' | 'right' | undefined;
|
|
234
|
-
index?: number;
|
|
235
|
-
};
|
|
236
|
-
declare const TableEdit: react.ForwardRefExoticComponent<IFTableEditProps & react.RefAttributes<IFRef>>;
|
|
237
|
-
|
|
238
|
-
type FromItemsField = {
|
|
239
|
-
name: string;
|
|
240
|
-
label: string;
|
|
241
|
-
type: 'text' | 'numeric' | 'select' | 'selectCreatable';
|
|
242
|
-
disabled?: boolean;
|
|
243
|
-
fraction?: number;
|
|
244
|
-
min?: number;
|
|
245
|
-
max?: number;
|
|
246
|
-
options?: any[];
|
|
247
|
-
};
|
|
248
|
-
|
|
249
|
-
declare const messageHtmlBoxConfirm: (t: TFunction<"translation", undefined>, message: any[], handle: any, data: any, title?: string, btnOk?: string, btnCancel?: string) => void;
|
|
250
|
-
declare const messageHtmlBoxError: (t: TFunction<"translation", undefined>, message: any[], title?: string, btnCancel?: string) => void;
|
|
251
|
-
declare const messageBoxConfirmDelete: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
|
|
252
|
-
declare const messageBoxConfirm: (t: TFunction<"translation", undefined>, handle: any, data: any, message: string, title?: string, btnOk?: string, btnCancel?: string) => void;
|
|
253
|
-
declare const messageBoxError: (t: TFunction<"translation", undefined>, message: string, title?: string, btnCancel?: string) => void;
|
|
254
|
-
declare const notificationError: (param: string) => string;
|
|
255
|
-
declare const notificationSuccess: (param: string) => string;
|
|
256
|
-
declare const messageBoxConfirm2: (t: TFunction<"translation", undefined>, data: any, data2: any, message: string) => Promise<boolean>;
|
|
257
|
-
|
|
258
|
-
declare const useOnClickOutside: (ref: any, handler: any) => void;
|
|
259
|
-
declare const checkThousandSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
|
|
260
|
-
declare const checkDecimalSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
|
|
261
|
-
declare const isNullOrUndefined: (d: any) => boolean;
|
|
262
|
-
declare const generateUUID: () => string;
|
|
263
|
-
/**
|
|
264
|
-
* format chuỗi kí tự số
|
|
265
|
-
* @param str chuỗi số cần format
|
|
266
|
-
* @param decimalSeparator kí tự thập phân
|
|
267
|
-
* @param thousandSeparator kí tự phân cách hàng nghìn
|
|
268
|
-
* @param fraction số kí tự thập phân
|
|
269
|
-
* @param isDone đã nhập xong
|
|
270
|
-
* @returns
|
|
271
|
-
*/
|
|
272
|
-
declare const formartNumberic: (str: string | number, decimalSeparator: string, thousandSeparator: string, fraction?: number, isDone?: boolean, haveNegative?: boolean) => string;
|
|
273
|
-
declare const roundNumber: (num: number, fraction: number) => number;
|
|
274
|
-
declare const formatDateTime: (data: any, format?: string) => string;
|
|
275
|
-
|
|
276
|
-
type IFDataProps = {
|
|
277
|
-
buttonWidth?: number;
|
|
278
|
-
tabParent?: boolean;
|
|
279
|
-
tabChild?: boolean;
|
|
280
|
-
resourceCodeParent?: string;
|
|
281
|
-
resourceCode: string;
|
|
282
|
-
resources: any[];
|
|
283
|
-
renderModal?: any;
|
|
284
|
-
windowSize?: any;
|
|
285
|
-
};
|
|
286
|
-
declare const TabsMenuComponent: ({ buttonWidth, tabParent, tabChild, resourceCodeParent, resources, resourceCode, windowSize, renderModal }: IFDataProps) => react_jsx_runtime.JSX.Element;
|
|
287
|
-
|
|
288
|
-
type IFColumnSelectTableTree = {
|
|
289
|
-
field: string;
|
|
290
|
-
headerText: string;
|
|
291
|
-
visible?: boolean;
|
|
292
|
-
textAlign?: 'left' | 'right' | 'center';
|
|
293
|
-
type?: 'text' | 'numeric' | 'date' | 'datetime';
|
|
294
|
-
template?: any;
|
|
295
|
-
typeCondition?: any;
|
|
296
|
-
fraction?: number;
|
|
297
|
-
width?: number;
|
|
298
|
-
maxWidth?: number;
|
|
299
|
-
minWidth?: number;
|
|
300
|
-
};
|
|
301
|
-
type IFTableTreeSelectFormat = {
|
|
302
|
-
dateFormat?: string;
|
|
303
|
-
decimalSeparator?: string;
|
|
304
|
-
thousandSeparator?: string;
|
|
305
|
-
colorNegative?: string;
|
|
306
|
-
prefixNegative?: string;
|
|
307
|
-
suffixNegative?: string;
|
|
308
|
-
};
|
|
309
|
-
type Props = {
|
|
310
|
-
id?: string;
|
|
311
|
-
component?: any;
|
|
312
|
-
footerComponent?: any;
|
|
313
|
-
fieldValue?: string;
|
|
314
|
-
fieldLabel?: string;
|
|
315
|
-
onChange: any;
|
|
316
|
-
textAlign?: 'left' | 'right' | 'center';
|
|
317
|
-
placeholder?: string;
|
|
318
|
-
invalid?: any;
|
|
319
|
-
loadOptions?: any;
|
|
320
|
-
menuWidth?: number;
|
|
321
|
-
width?: number;
|
|
322
|
-
rowData?: any;
|
|
323
|
-
value: any;
|
|
324
|
-
onKeyDown?: any;
|
|
325
|
-
formatOptionLabel?: any;
|
|
326
|
-
handleAdd?: any;
|
|
327
|
-
options: any[];
|
|
328
|
-
isMulti?: boolean;
|
|
329
|
-
noHeader?: boolean;
|
|
330
|
-
maxHeight?: number;
|
|
331
|
-
columns?: IFColumnSelectTableTree[];
|
|
332
|
-
fieldChildren?: string;
|
|
333
|
-
isClearable?: boolean;
|
|
334
|
-
isDisabled?: boolean;
|
|
335
|
-
showFooter?: boolean;
|
|
336
|
-
selectChilds?: boolean;
|
|
337
|
-
formatSetting?: IFTableTreeSelectFormat;
|
|
338
|
-
onOpenMenu?: any;
|
|
339
|
-
onPaste?: any;
|
|
340
|
-
};
|
|
341
|
-
declare const SelectTableTree: react__default.ForwardRefExoticComponent<Props & react__default.RefAttributes<unknown>>;
|
|
342
|
-
|
|
343
|
-
interface IFDataStyleSetting {
|
|
344
|
-
color: string;
|
|
345
|
-
backgroundColor: string;
|
|
346
|
-
fontFamily: string;
|
|
347
|
-
fontSize: number;
|
|
348
|
-
bold: boolean;
|
|
349
|
-
italic: boolean;
|
|
350
|
-
underline: boolean;
|
|
351
|
-
}
|
|
352
|
-
interface IFDataInputStyle {
|
|
353
|
-
value: IFDataStyleSetting;
|
|
354
|
-
onChange: any;
|
|
355
|
-
disabled?: boolean;
|
|
356
|
-
disabledColor?: boolean;
|
|
357
|
-
disabledBackgroundColor?: boolean;
|
|
358
|
-
disabledFontFamily?: boolean;
|
|
359
|
-
disabledFontSize?: boolean;
|
|
360
|
-
disabledBold?: boolean;
|
|
361
|
-
disabledItalic?: boolean;
|
|
362
|
-
disabledUnderline?: boolean;
|
|
363
|
-
}
|
|
364
|
-
declare const InputStyleComponent: (props: IFDataInputStyle) => react_jsx_runtime.JSX.Element;
|
|
365
|
-
|
|
366
|
-
export { type FromItemsField, type IColumnTable, type ICommandItem, type IFColumnSelectTable, type IFColumnSelectTableTree, type IFCurrentPage, type IFCurrentPageConfig, type IFPageSize, type IFTableEditButton, type IFTableEditFormat, type IFTableEditPaging, type IFTableEditProps, type IFTableEditSearchSetting, type IFTableEditToolbar, type IFTableSelectFormat, type IFTableTreeSelectFormat, type IFToolbarOptions, type IHeaderColumnTable, type ISettingFormElement, type ISettingNumericElement, type ISettingSelectElement, InputStyleComponent, SelectTable, SelectTableTree, TabsMenuComponent, checkDecimalSeparator, checkThousandSeparator, TableEdit as default, formartNumberic, formatDateTime, generateUUID, isNullOrUndefined, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess, roundNumber, useOnClickOutside };
|
|
1
|
+
import TableEdit from './component/table';
|
|
2
|
+
export { type FromItemsField } from './component/edit-form';
|
|
3
|
+
export * from './component/notifications';
|
|
4
|
+
export * from './component/table';
|
|
5
|
+
export * from './component/utils';
|
|
6
|
+
export * from './component/tab-menu';
|
|
7
|
+
export * from './component/select-table';
|
|
8
|
+
export * from './component/select-table-tree';
|
|
9
|
+
export * from './component/input-style';
|
|
10
|
+
export default TableEdit;
|
package/package.json
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-table-edit",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.30",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
|
-
"module": "dist/index.mjs",
|
|
6
5
|
"types": "dist/index.d.ts",
|
|
7
6
|
"files": [
|
|
8
7
|
"dist/**/*"
|
|
9
8
|
],
|
|
10
9
|
"scripts": {
|
|
11
|
-
"build": "
|
|
12
|
-
"start": "
|
|
10
|
+
"build": "webpack --config webpack.config.js",
|
|
11
|
+
"start": "webpack serve --config webpack.config.js --mode development"
|
|
13
12
|
},
|
|
14
13
|
"keywords": [
|
|
15
14
|
"react",
|
|
@@ -22,32 +21,41 @@
|
|
|
22
21
|
"license": "ISC",
|
|
23
22
|
"author": "hungnv",
|
|
24
23
|
"peerDependencies": {
|
|
24
|
+
"i18next": "^21.8.2",
|
|
25
25
|
"react": ">=16.8.6",
|
|
26
26
|
"react-dom": ">=16.8.6",
|
|
27
|
-
"react-router-dom": "^6.3.0",
|
|
28
27
|
"react-hook-form": "^7.43.9",
|
|
29
28
|
"react-i18next": "^11.16.9",
|
|
29
|
+
"react-router-dom": "^6.3.0",
|
|
30
30
|
"reactstrap": "^9.0.1",
|
|
31
|
-
"i18next": "^21.8.2",
|
|
32
31
|
"yup": "^0.32.11"
|
|
33
32
|
},
|
|
34
33
|
"devDependencies": {
|
|
35
34
|
"@hookform/resolvers": "^2.8.10",
|
|
35
|
+
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
|
|
36
36
|
"@types/react-resizable": "^3.0.7",
|
|
37
37
|
"becoxy-icons": "1.8.1",
|
|
38
38
|
"classnames": "2.3.1",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
39
|
+
"css-loader": "^7.1.2",
|
|
40
|
+
"html-webpack-plugin": "^5.5.1",
|
|
41
|
+
"react-hook-form": "^7.43.9",
|
|
41
42
|
"react-hot-toast": "2.2.0",
|
|
42
43
|
"react-i18next": "^11.16.9",
|
|
44
|
+
"react-number-format": "^5.3.3",
|
|
45
|
+
"react-refresh": "^0.14.0",
|
|
43
46
|
"react-resizable": "^3.0.5",
|
|
44
47
|
"react-router-dom": "^6.3.0",
|
|
45
48
|
"reactstrap": "9.0.1",
|
|
49
|
+
"sass": "^1.81.0",
|
|
50
|
+
"sass-loader": "^16.0.3",
|
|
51
|
+
"style-loader": "^4.0.0",
|
|
46
52
|
"sweetalert2": "^11.4.14",
|
|
47
53
|
"sweetalert2-react-content": "^5.0.0",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
54
|
+
"ts-loader": "^9.4.2",
|
|
55
|
+
"typescript": "^5.6.3",
|
|
56
|
+
"webpack": "^5.88.2",
|
|
57
|
+
"webpack-cli": "^5.1.4",
|
|
58
|
+
"webpack-dev-server": "^4.15.0",
|
|
59
|
+
"yup": "^0.32.11"
|
|
52
60
|
}
|
|
53
61
|
}
|
package/dist/index.css
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/* node_modules/react-resizable/css/styles.css */
|
|
2
|
-
.react-resizable {
|
|
3
|
-
position: relative;
|
|
4
|
-
}
|
|
5
|
-
.react-resizable-handle {
|
|
6
|
-
position: absolute;
|
|
7
|
-
width: 20px;
|
|
8
|
-
height: 20px;
|
|
9
|
-
background-repeat: no-repeat;
|
|
10
|
-
background-origin: content-box;
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+);
|
|
13
|
-
background-position: bottom right;
|
|
14
|
-
padding: 0 3px 3px 0;
|
|
15
|
-
}
|
|
16
|
-
.react-resizable-handle-sw {
|
|
17
|
-
bottom: 0;
|
|
18
|
-
left: 0;
|
|
19
|
-
cursor: sw-resize;
|
|
20
|
-
transform: rotate(90deg);
|
|
21
|
-
}
|
|
22
|
-
.react-resizable-handle-se {
|
|
23
|
-
bottom: 0;
|
|
24
|
-
right: 0;
|
|
25
|
-
cursor: se-resize;
|
|
26
|
-
}
|
|
27
|
-
.react-resizable-handle-nw {
|
|
28
|
-
top: 0;
|
|
29
|
-
left: 0;
|
|
30
|
-
cursor: nw-resize;
|
|
31
|
-
transform: rotate(180deg);
|
|
32
|
-
}
|
|
33
|
-
.react-resizable-handle-ne {
|
|
34
|
-
top: 0;
|
|
35
|
-
right: 0;
|
|
36
|
-
cursor: ne-resize;
|
|
37
|
-
transform: rotate(270deg);
|
|
38
|
-
}
|
|
39
|
-
.react-resizable-handle-w,
|
|
40
|
-
.react-resizable-handle-e {
|
|
41
|
-
top: 50%;
|
|
42
|
-
margin-top: -10px;
|
|
43
|
-
cursor: ew-resize;
|
|
44
|
-
}
|
|
45
|
-
.react-resizable-handle-w {
|
|
46
|
-
left: 0;
|
|
47
|
-
transform: rotate(135deg);
|
|
48
|
-
}
|
|
49
|
-
.react-resizable-handle-e {
|
|
50
|
-
right: 0;
|
|
51
|
-
transform: rotate(315deg);
|
|
52
|
-
}
|
|
53
|
-
.react-resizable-handle-n,
|
|
54
|
-
.react-resizable-handle-s {
|
|
55
|
-
left: 50%;
|
|
56
|
-
margin-left: -10px;
|
|
57
|
-
cursor: ns-resize;
|
|
58
|
-
}
|
|
59
|
-
.react-resizable-handle-n {
|
|
60
|
-
top: 0;
|
|
61
|
-
transform: rotate(225deg);
|
|
62
|
-
}
|
|
63
|
-
.react-resizable-handle-s {
|
|
64
|
-
bottom: 0;
|
|
65
|
-
transform: rotate(45deg);
|
|
66
|
-
}
|
|
67
|
-
/*# sourceMappingURL=index.css.map */
|
package/dist/index.css.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../node_modules/react-resizable/css/styles.css"],"sourcesContent":[".react-resizable {\n position: relative;\n}\n.react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n background-repeat: no-repeat;\n background-origin: content-box;\n box-sizing: border-box;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+');\n background-position: bottom right;\n padding: 0 3px 3px 0;\n}\n.react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n}\n.react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n}\n.react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n}\n.react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n}\n.react-resizable-handle-w,\n.react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n}\n.react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n}\n.react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n}\n.react-resizable-handle-n,\n.react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n}\n.react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n}\n.react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n}"],"mappings":";AAAA,CAAC;AACC,YAAU;AACZ;AACA,CAAC;AACC,YAAU;AACV,SAAO;AACP,UAAQ;AACR,qBAAmB;AACnB,qBAAmB;AACnB,cAAY;AACZ,oBAAkB;AAClB,uBAAqB,OAAO;AAC5B,WAAS,EAAE,IAAI,IAAI;AACrB;AACA,CAAC;AACC,UAAQ;AACR,QAAM;AACN,UAAQ;AACR,aAAW,OAAO;AACpB;AACA,CAAC;AACC,UAAQ;AACR,SAAO;AACP,UAAQ;AACV;AACA,CAAC;AACC,OAAK;AACL,QAAM;AACN,UAAQ;AACR,aAAW,OAAO;AACpB;AACA,CAAC;AACC,OAAK;AACL,SAAO;AACP,UAAQ;AACR,aAAW,OAAO;AACpB;AACA,CAAC;AACD,CAAC;AACC,OAAK;AACL,cAAY;AACZ,UAAQ;AACV;AACA,CANC;AAOC,QAAM;AACN,aAAW,OAAO;AACpB;AACA,CATC;AAUC,SAAO;AACP,aAAW,OAAO;AACpB;AACA,CAAC;AACD,CAAC;AACC,QAAM;AACN,eAAa;AACb,UAAQ;AACV;AACA,CANC;AAOC,OAAK;AACL,aAAW,OAAO;AACpB;AACA,CATC;AAUC,UAAQ;AACR,aAAW,OAAO;AACpB;","names":[]}
|