react-table-edit 1.2.32 → 1.2.33
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/index.d.mts +366 -0
- package/dist/index.d.ts +366 -10
- package/dist/index.js +5396 -0
- package/dist/index.mjs +5366 -0
- package/package.json +18 -36
- package/dist/bundle.js +0 -3776
- package/dist/component/edit-form/index.d.ts +0 -39
- package/dist/component/edit-form/select-table/index.d.ts +0 -32
- package/dist/component/icon/index.d.ts +0 -2
- package/dist/component/input-number/index.d.ts +0 -28
- package/dist/component/input-style/fonts.d.ts +0 -4
- package/dist/component/input-style/index.d.ts +0 -23
- package/dist/component/input-text/index.d.ts +0 -25
- package/dist/component/modal-header/index.d.ts +0 -8
- package/dist/component/notifications.d.ts +0 -9
- package/dist/component/react-input/index.d.ts +0 -2
- package/dist/component/select-table/index.d.ts +0 -56
- package/dist/component/select-table-tree/index.d.ts +0 -56
- package/dist/component/sidebar/index.d.ts +0 -11
- package/dist/component/sidebar-setting-column/index.d.ts +0 -9
- package/dist/component/tab-menu/index.d.ts +0 -12
- package/dist/component/table/command.d.ts +0 -12
- package/dist/component/table/header.d.ts +0 -19
- package/dist/component/table/index.d.ts +0 -179
- package/dist/component/table/paging/index.d.ts +0 -10
- package/dist/component/table/render-edit.d.ts +0 -20
- package/dist/component/table/type.d.ts +0 -158
- package/dist/component/utils.d.ts +0 -17
- package/dist/index.html +0 -11
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import react__default, { ReactNode, Dispatch, SetStateAction } from 'react';
|
|
3
|
+
import { TFunction } from 'react-i18next';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
type IFColumnSelectTable = {
|
|
7
|
+
field: string;
|
|
8
|
+
headerText: string;
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
textAlign?: 'left' | 'right' | 'center';
|
|
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 };
|