react-table-edit 0.0.1
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 +148 -0
- package/dist/index.d.ts +148 -0
- package/dist/index.js +2677 -0
- package/dist/index.mjs +2651 -0
- package/package.json +48 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { TFunction } from 'react-i18next';
|
|
4
|
+
|
|
5
|
+
type ITextAlign = 'center' | 'left' | 'right';
|
|
6
|
+
type IEditType = 'text' | 'numeric' | 'asyncSelect' | 'datetime' | 'selectMulti' | 'selectTree' | 'date' | 'select' | 'checkbox' | 'form' | 'color';
|
|
7
|
+
type ICommandItem = {
|
|
8
|
+
id: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
tooltip?: string;
|
|
11
|
+
icon?: string;
|
|
12
|
+
commandTemplate?: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
type ISettingFormElement = {
|
|
15
|
+
schema: any;
|
|
16
|
+
labelSize?: 'label-small' | 'label-medium' | 'label-large';
|
|
17
|
+
menuWidth?: number;
|
|
18
|
+
menuHeight?: number;
|
|
19
|
+
onFormOpen?: any;
|
|
20
|
+
onFormSubmit?: any;
|
|
21
|
+
displayValue?: any;
|
|
22
|
+
footerTemplate?: any;
|
|
23
|
+
onChangeField?: any;
|
|
24
|
+
openOnFocus?: boolean;
|
|
25
|
+
};
|
|
26
|
+
type ISettingSelectElement = {
|
|
27
|
+
isClearable?: boolean;
|
|
28
|
+
isMulti?: boolean;
|
|
29
|
+
loadOptions?: any;
|
|
30
|
+
defaultValue?: any;
|
|
31
|
+
fieldValue?: string;
|
|
32
|
+
options?: any[];
|
|
33
|
+
widthPopup?: string | number;
|
|
34
|
+
iconGroup?: string;
|
|
35
|
+
handIconGroupClick?: any;
|
|
36
|
+
validateOption?: any;
|
|
37
|
+
optionsField?: string;
|
|
38
|
+
};
|
|
39
|
+
type ISettingNumericElement = {
|
|
40
|
+
min?: number;
|
|
41
|
+
max?: number;
|
|
42
|
+
fraction?: number;
|
|
43
|
+
};
|
|
44
|
+
type IColumnTable = {
|
|
45
|
+
field: string;
|
|
46
|
+
headerText?: string;
|
|
47
|
+
isPrimarykey?: boolean;
|
|
48
|
+
isUnikey?: boolean;
|
|
49
|
+
haveSum?: boolean;
|
|
50
|
+
fixedType?: 'left' | 'right' | undefined;
|
|
51
|
+
validate?: any;
|
|
52
|
+
disabledCondition?: any;
|
|
53
|
+
callback?: any;
|
|
54
|
+
width?: string | number;
|
|
55
|
+
minWidth?: string | number;
|
|
56
|
+
maxWidth?: string | number;
|
|
57
|
+
editEnable?: boolean;
|
|
58
|
+
visible?: boolean;
|
|
59
|
+
invisibleDisable?: boolean;
|
|
60
|
+
textAlign?: ITextAlign;
|
|
61
|
+
editType?: IEditType;
|
|
62
|
+
template?: any;
|
|
63
|
+
commandItems?: ICommandItem[];
|
|
64
|
+
editTypeCondition?: any;
|
|
65
|
+
placeholder?: string;
|
|
66
|
+
numericSettings?: ISettingNumericElement;
|
|
67
|
+
selectSettings?: ISettingSelectElement;
|
|
68
|
+
formSettings?: ISettingFormElement;
|
|
69
|
+
};
|
|
70
|
+
type IFTableEditProps = {
|
|
71
|
+
dataSource: any[];
|
|
72
|
+
haveSum?: boolean;
|
|
73
|
+
selectEnable?: boolean;
|
|
74
|
+
showTopToolbar?: boolean;
|
|
75
|
+
showBottomToolbar?: boolean;
|
|
76
|
+
defaultValue?: any;
|
|
77
|
+
toolbarOptions?: any[];
|
|
78
|
+
toolbarBottomOptions?: any[];
|
|
79
|
+
columns: IColumnTable[];
|
|
80
|
+
setDataSource?: any;
|
|
81
|
+
commandClick?: any;
|
|
82
|
+
rowChange?: any;
|
|
83
|
+
dataSourceChange?: any;
|
|
84
|
+
allowPaging?: boolean;
|
|
85
|
+
pageSize?: number;
|
|
86
|
+
totalItem?: number;
|
|
87
|
+
height?: number;
|
|
88
|
+
maxHeight?: number;
|
|
89
|
+
minHeight?: number;
|
|
90
|
+
currentPage?: number;
|
|
91
|
+
setCurrentPage?: any;
|
|
92
|
+
setPageSize?: any;
|
|
93
|
+
searchTerm?: string;
|
|
94
|
+
idTable?: string;
|
|
95
|
+
setSearchTerm?: any;
|
|
96
|
+
selectedItem?: any;
|
|
97
|
+
setSelectedItem?: any;
|
|
98
|
+
searchEnable?: boolean;
|
|
99
|
+
editDisable?: boolean;
|
|
100
|
+
addDisable?: boolean;
|
|
101
|
+
deleteAllDisable?: boolean;
|
|
102
|
+
insertAfterDisable?: boolean;
|
|
103
|
+
insertBeforeDisable?: boolean;
|
|
104
|
+
duplicateDisable?: boolean;
|
|
105
|
+
isMulti?: boolean;
|
|
106
|
+
decimalSeparator?: string;
|
|
107
|
+
thousandSeparator?: string;
|
|
108
|
+
};
|
|
109
|
+
type IFPageSize = {
|
|
110
|
+
pageSize: number;
|
|
111
|
+
name: string;
|
|
112
|
+
};
|
|
113
|
+
type IFCurrentPage = {
|
|
114
|
+
currentPage: number;
|
|
115
|
+
};
|
|
116
|
+
type IFCurrentPageConfig = {
|
|
117
|
+
currentPage: number;
|
|
118
|
+
newProp: IFCurrentPage;
|
|
119
|
+
oldProp: IFCurrentPage;
|
|
120
|
+
cancel: boolean;
|
|
121
|
+
name: string;
|
|
122
|
+
};
|
|
123
|
+
type IFRef = {
|
|
124
|
+
refeshFocusRow: any;
|
|
125
|
+
};
|
|
126
|
+
declare const TableEdit: react.ForwardRefExoticComponent<IFTableEditProps & react.RefAttributes<IFRef>>;
|
|
127
|
+
|
|
128
|
+
type FromItemsField = {
|
|
129
|
+
name: string;
|
|
130
|
+
label: string;
|
|
131
|
+
type: 'text' | 'numeric' | 'select' | 'selectCreatable';
|
|
132
|
+
disabled?: boolean;
|
|
133
|
+
fraction?: number;
|
|
134
|
+
min?: number;
|
|
135
|
+
max?: number;
|
|
136
|
+
options?: any[];
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
declare const notificationSuccess: (param: string) => string;
|
|
140
|
+
declare const messageBoxError: (t: TFunction<"translation", undefined>, message: string) => void;
|
|
141
|
+
declare const messageHtmlBoxError: (t: TFunction<"translation", undefined>, message: any[], title?: string) => void;
|
|
142
|
+
declare const messageBoxConfirmDelete: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
|
|
143
|
+
declare const messageBoxConfirmApprove: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
|
|
144
|
+
declare const messageBoxConfirm: (t: TFunction<"translation", undefined>, handle: any, data: any, message: string) => void;
|
|
145
|
+
declare const notificationError: (param: string) => string;
|
|
146
|
+
declare const messageBoxConfirm2: (t: TFunction<"translation", undefined>, data: any, data2: any, message: string) => Promise<boolean>;
|
|
147
|
+
|
|
148
|
+
export { type FromItemsField, type IColumnTable, type ICommandItem, type IFCurrentPage, type IFCurrentPageConfig, type IFPageSize, type IFTableEditProps, type ISettingFormElement, type ISettingNumericElement, type ISettingSelectElement, TableEdit as default, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmApprove, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxError, notificationError, notificationSuccess };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { TFunction } from 'react-i18next';
|
|
4
|
+
|
|
5
|
+
type ITextAlign = 'center' | 'left' | 'right';
|
|
6
|
+
type IEditType = 'text' | 'numeric' | 'asyncSelect' | 'datetime' | 'selectMulti' | 'selectTree' | 'date' | 'select' | 'checkbox' | 'form' | 'color';
|
|
7
|
+
type ICommandItem = {
|
|
8
|
+
id: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
tooltip?: string;
|
|
11
|
+
icon?: string;
|
|
12
|
+
commandTemplate?: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
type ISettingFormElement = {
|
|
15
|
+
schema: any;
|
|
16
|
+
labelSize?: 'label-small' | 'label-medium' | 'label-large';
|
|
17
|
+
menuWidth?: number;
|
|
18
|
+
menuHeight?: number;
|
|
19
|
+
onFormOpen?: any;
|
|
20
|
+
onFormSubmit?: any;
|
|
21
|
+
displayValue?: any;
|
|
22
|
+
footerTemplate?: any;
|
|
23
|
+
onChangeField?: any;
|
|
24
|
+
openOnFocus?: boolean;
|
|
25
|
+
};
|
|
26
|
+
type ISettingSelectElement = {
|
|
27
|
+
isClearable?: boolean;
|
|
28
|
+
isMulti?: boolean;
|
|
29
|
+
loadOptions?: any;
|
|
30
|
+
defaultValue?: any;
|
|
31
|
+
fieldValue?: string;
|
|
32
|
+
options?: any[];
|
|
33
|
+
widthPopup?: string | number;
|
|
34
|
+
iconGroup?: string;
|
|
35
|
+
handIconGroupClick?: any;
|
|
36
|
+
validateOption?: any;
|
|
37
|
+
optionsField?: string;
|
|
38
|
+
};
|
|
39
|
+
type ISettingNumericElement = {
|
|
40
|
+
min?: number;
|
|
41
|
+
max?: number;
|
|
42
|
+
fraction?: number;
|
|
43
|
+
};
|
|
44
|
+
type IColumnTable = {
|
|
45
|
+
field: string;
|
|
46
|
+
headerText?: string;
|
|
47
|
+
isPrimarykey?: boolean;
|
|
48
|
+
isUnikey?: boolean;
|
|
49
|
+
haveSum?: boolean;
|
|
50
|
+
fixedType?: 'left' | 'right' | undefined;
|
|
51
|
+
validate?: any;
|
|
52
|
+
disabledCondition?: any;
|
|
53
|
+
callback?: any;
|
|
54
|
+
width?: string | number;
|
|
55
|
+
minWidth?: string | number;
|
|
56
|
+
maxWidth?: string | number;
|
|
57
|
+
editEnable?: boolean;
|
|
58
|
+
visible?: boolean;
|
|
59
|
+
invisibleDisable?: boolean;
|
|
60
|
+
textAlign?: ITextAlign;
|
|
61
|
+
editType?: IEditType;
|
|
62
|
+
template?: any;
|
|
63
|
+
commandItems?: ICommandItem[];
|
|
64
|
+
editTypeCondition?: any;
|
|
65
|
+
placeholder?: string;
|
|
66
|
+
numericSettings?: ISettingNumericElement;
|
|
67
|
+
selectSettings?: ISettingSelectElement;
|
|
68
|
+
formSettings?: ISettingFormElement;
|
|
69
|
+
};
|
|
70
|
+
type IFTableEditProps = {
|
|
71
|
+
dataSource: any[];
|
|
72
|
+
haveSum?: boolean;
|
|
73
|
+
selectEnable?: boolean;
|
|
74
|
+
showTopToolbar?: boolean;
|
|
75
|
+
showBottomToolbar?: boolean;
|
|
76
|
+
defaultValue?: any;
|
|
77
|
+
toolbarOptions?: any[];
|
|
78
|
+
toolbarBottomOptions?: any[];
|
|
79
|
+
columns: IColumnTable[];
|
|
80
|
+
setDataSource?: any;
|
|
81
|
+
commandClick?: any;
|
|
82
|
+
rowChange?: any;
|
|
83
|
+
dataSourceChange?: any;
|
|
84
|
+
allowPaging?: boolean;
|
|
85
|
+
pageSize?: number;
|
|
86
|
+
totalItem?: number;
|
|
87
|
+
height?: number;
|
|
88
|
+
maxHeight?: number;
|
|
89
|
+
minHeight?: number;
|
|
90
|
+
currentPage?: number;
|
|
91
|
+
setCurrentPage?: any;
|
|
92
|
+
setPageSize?: any;
|
|
93
|
+
searchTerm?: string;
|
|
94
|
+
idTable?: string;
|
|
95
|
+
setSearchTerm?: any;
|
|
96
|
+
selectedItem?: any;
|
|
97
|
+
setSelectedItem?: any;
|
|
98
|
+
searchEnable?: boolean;
|
|
99
|
+
editDisable?: boolean;
|
|
100
|
+
addDisable?: boolean;
|
|
101
|
+
deleteAllDisable?: boolean;
|
|
102
|
+
insertAfterDisable?: boolean;
|
|
103
|
+
insertBeforeDisable?: boolean;
|
|
104
|
+
duplicateDisable?: boolean;
|
|
105
|
+
isMulti?: boolean;
|
|
106
|
+
decimalSeparator?: string;
|
|
107
|
+
thousandSeparator?: string;
|
|
108
|
+
};
|
|
109
|
+
type IFPageSize = {
|
|
110
|
+
pageSize: number;
|
|
111
|
+
name: string;
|
|
112
|
+
};
|
|
113
|
+
type IFCurrentPage = {
|
|
114
|
+
currentPage: number;
|
|
115
|
+
};
|
|
116
|
+
type IFCurrentPageConfig = {
|
|
117
|
+
currentPage: number;
|
|
118
|
+
newProp: IFCurrentPage;
|
|
119
|
+
oldProp: IFCurrentPage;
|
|
120
|
+
cancel: boolean;
|
|
121
|
+
name: string;
|
|
122
|
+
};
|
|
123
|
+
type IFRef = {
|
|
124
|
+
refeshFocusRow: any;
|
|
125
|
+
};
|
|
126
|
+
declare const TableEdit: react.ForwardRefExoticComponent<IFTableEditProps & react.RefAttributes<IFRef>>;
|
|
127
|
+
|
|
128
|
+
type FromItemsField = {
|
|
129
|
+
name: string;
|
|
130
|
+
label: string;
|
|
131
|
+
type: 'text' | 'numeric' | 'select' | 'selectCreatable';
|
|
132
|
+
disabled?: boolean;
|
|
133
|
+
fraction?: number;
|
|
134
|
+
min?: number;
|
|
135
|
+
max?: number;
|
|
136
|
+
options?: any[];
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
declare const notificationSuccess: (param: string) => string;
|
|
140
|
+
declare const messageBoxError: (t: TFunction<"translation", undefined>, message: string) => void;
|
|
141
|
+
declare const messageHtmlBoxError: (t: TFunction<"translation", undefined>, message: any[], title?: string) => void;
|
|
142
|
+
declare const messageBoxConfirmDelete: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
|
|
143
|
+
declare const messageBoxConfirmApprove: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
|
|
144
|
+
declare const messageBoxConfirm: (t: TFunction<"translation", undefined>, handle: any, data: any, message: string) => void;
|
|
145
|
+
declare const notificationError: (param: string) => string;
|
|
146
|
+
declare const messageBoxConfirm2: (t: TFunction<"translation", undefined>, data: any, data2: any, message: string) => Promise<boolean>;
|
|
147
|
+
|
|
148
|
+
export { type FromItemsField, type IColumnTable, type ICommandItem, type IFCurrentPage, type IFCurrentPageConfig, type IFPageSize, type IFTableEditProps, type ISettingFormElement, type ISettingNumericElement, type ISettingSelectElement, TableEdit as default, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmApprove, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxError, notificationError, notificationSuccess };
|