react-table-edit 1.2.59 → 1.2.61
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/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-date/index.d.ts +10 -0
- package/dist/component/input-number/index.d.ts +27 -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 +57 -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 +180 -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/toolbar-bottom.d.ts +7 -0
- package/dist/component/table/toolbar-top.d.ts +6 -0
- package/dist/component/table/type.d.ts +158 -0
- package/dist/component/utils.d.ts +17 -0
- package/dist/index.js +29294 -5224
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +29247 -5194
- package/dist/index.mjs.map +1 -0
- package/package.json +30 -18
- package/dist/index.d.mts +0 -368
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { InferType } from "yup";
|
|
2
|
+
export type FromItemsField = {
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
type: 'text' | 'numeric' | 'select' | 'selectCreatable';
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
fraction?: number;
|
|
8
|
+
min?: number;
|
|
9
|
+
max?: number;
|
|
10
|
+
options?: any[];
|
|
11
|
+
};
|
|
12
|
+
type Props = {
|
|
13
|
+
id?: string;
|
|
14
|
+
field?: string;
|
|
15
|
+
displayValue: string;
|
|
16
|
+
onChange: any;
|
|
17
|
+
onPaste?: any;
|
|
18
|
+
textAlign?: 'left' | 'right' | 'center';
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
invalid?: any;
|
|
21
|
+
menuHeight?: number;
|
|
22
|
+
menuWidth?: number;
|
|
23
|
+
rowData: any;
|
|
24
|
+
indexRow: any;
|
|
25
|
+
template?: any;
|
|
26
|
+
onKeyDown?: any;
|
|
27
|
+
defaultValues?: any;
|
|
28
|
+
schema?: InferType<any>;
|
|
29
|
+
onFormOpen?: any;
|
|
30
|
+
onFormSubmit?: any;
|
|
31
|
+
footerTemplate?: any;
|
|
32
|
+
onChangeField?: any;
|
|
33
|
+
minWidth?: number;
|
|
34
|
+
openOnFocus?: boolean;
|
|
35
|
+
isClearable?: boolean;
|
|
36
|
+
labelSize?: 'label-small' | 'label-medium' | 'label-large';
|
|
37
|
+
};
|
|
38
|
+
declare const EditForm: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<unknown>>;
|
|
39
|
+
export default EditForm;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IFColumnSelectTable } from "../../select-table";
|
|
2
|
+
interface ISelectTableBox {
|
|
3
|
+
id?: string;
|
|
4
|
+
name: string;
|
|
5
|
+
control: any;
|
|
6
|
+
defaultValue?: any;
|
|
7
|
+
isMulti?: boolean;
|
|
8
|
+
isLabel?: boolean;
|
|
9
|
+
inLine?: boolean;
|
|
10
|
+
labelComponent?: any;
|
|
11
|
+
defaultOptions: any[];
|
|
12
|
+
loadOptions?: any;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
label?: any;
|
|
16
|
+
labelSize?: any;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
errors?: any;
|
|
19
|
+
cssClass?: string;
|
|
20
|
+
callback?: any;
|
|
21
|
+
confirmHandle?: any;
|
|
22
|
+
columns?: IFColumnSelectTable[];
|
|
23
|
+
handleAddNew?: any;
|
|
24
|
+
fieldLabel?: string;
|
|
25
|
+
fieldValue?: string;
|
|
26
|
+
isClearable?: boolean;
|
|
27
|
+
noHeader?: boolean;
|
|
28
|
+
desciptionLabel?: string;
|
|
29
|
+
classLabel?: string;
|
|
30
|
+
}
|
|
31
|
+
declare const SelectTableBox: (props: ISelectTableBox) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export default SelectTableBox;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { InputType } from "reactstrap/types/lib/Input";
|
|
2
|
+
interface IFFormInput {
|
|
3
|
+
control: any;
|
|
4
|
+
name: string;
|
|
5
|
+
id?: string;
|
|
6
|
+
type?: InputType;
|
|
7
|
+
label: string;
|
|
8
|
+
labelSize?: string;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
errors?: any;
|
|
11
|
+
classes?: string;
|
|
12
|
+
min?: number;
|
|
13
|
+
max?: number;
|
|
14
|
+
fractionCurrency?: number;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
width?: number;
|
|
17
|
+
isLabel?: boolean;
|
|
18
|
+
inLine?: boolean;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
thousandSeparator?: string;
|
|
21
|
+
decimalSeparator?: string;
|
|
22
|
+
callback?: any;
|
|
23
|
+
allowNegative?: boolean;
|
|
24
|
+
fixedDecimalScale?: boolean;
|
|
25
|
+
}
|
|
26
|
+
declare const NumberInput: (props: IFFormInput) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export default NumberInput;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface IFDataStyleSetting {
|
|
2
|
+
color: string;
|
|
3
|
+
backgroundColor: string;
|
|
4
|
+
fontFamily: string;
|
|
5
|
+
fontSize: number;
|
|
6
|
+
bold: boolean;
|
|
7
|
+
italic: boolean;
|
|
8
|
+
underline: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface IFDataInputStyle {
|
|
11
|
+
value: IFDataStyleSetting;
|
|
12
|
+
onChange: any;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
disabledColor?: boolean;
|
|
15
|
+
disabledBackgroundColor?: boolean;
|
|
16
|
+
disabledFontFamily?: boolean;
|
|
17
|
+
disabledFontSize?: boolean;
|
|
18
|
+
disabledBold?: boolean;
|
|
19
|
+
disabledItalic?: boolean;
|
|
20
|
+
disabledUnderline?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const InputStyleComponent: (props: IFDataInputStyle) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export { InputStyleComponent };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { InputType } from "reactstrap/types/lib/Input";
|
|
2
|
+
interface IFFormInput {
|
|
3
|
+
control: any;
|
|
4
|
+
name: string;
|
|
5
|
+
id?: string;
|
|
6
|
+
type?: InputType;
|
|
7
|
+
label: string;
|
|
8
|
+
labelSize?: string;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
errors?: any;
|
|
11
|
+
classes?: string;
|
|
12
|
+
height?: number | string;
|
|
13
|
+
min?: number;
|
|
14
|
+
max?: number;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
row?: number;
|
|
17
|
+
isLabel?: boolean;
|
|
18
|
+
inLine?: boolean;
|
|
19
|
+
autoFocus?: boolean;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
callback?: any;
|
|
22
|
+
readOnly?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare const TextInput: (props: IFFormInput) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export default TextInput;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TFunction } from 'react-i18next';
|
|
2
|
+
export declare const messageHtmlBoxConfirm: (t: TFunction<"translation", undefined>, message: any[], handle: any, data: any, title?: string, btnOk?: string, btnCancel?: string) => void;
|
|
3
|
+
export declare const messageHtmlBoxError: (t: TFunction<"translation", undefined>, message: any[], title?: string, btnCancel?: string) => void;
|
|
4
|
+
export declare const messageBoxConfirmDelete: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
|
|
5
|
+
export declare const messageBoxConfirm: (t: TFunction<"translation", undefined>, handle: any, data: any, message: string, title?: string, btnOk?: string, btnCancel?: string) => void;
|
|
6
|
+
export declare const messageBoxError: (t: TFunction<"translation", undefined>, message: string, title?: string, btnCancel?: string) => void;
|
|
7
|
+
export declare const notificationError: (param: string) => string;
|
|
8
|
+
export declare const notificationSuccess: (param: string) => string;
|
|
9
|
+
export declare const messageBoxConfirm2: (t: TFunction<"translation", undefined>, data: any, data2: any, message: string) => Promise<boolean>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type IFColumnSelectTable = {
|
|
3
|
+
field: string;
|
|
4
|
+
headerText: string;
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
textAlign?: 'left' | 'right' | 'center';
|
|
7
|
+
type?: 'text' | 'numeric' | 'date' | 'datetime';
|
|
8
|
+
template?: any;
|
|
9
|
+
typeCondition?: any;
|
|
10
|
+
fraction?: number;
|
|
11
|
+
width?: number;
|
|
12
|
+
maxWidth?: number;
|
|
13
|
+
minWidth?: number;
|
|
14
|
+
};
|
|
15
|
+
export type IFTableSelectFormat = {
|
|
16
|
+
dateFormat?: string;
|
|
17
|
+
datetimeFormat?: string;
|
|
18
|
+
decimalSeparator?: string;
|
|
19
|
+
thousandSeparator?: string;
|
|
20
|
+
colorNegative?: string;
|
|
21
|
+
prefixNegative?: string;
|
|
22
|
+
suffixNegative?: string;
|
|
23
|
+
};
|
|
24
|
+
type Props = {
|
|
25
|
+
id?: string;
|
|
26
|
+
component?: any;
|
|
27
|
+
footerComponent?: any;
|
|
28
|
+
fieldValue?: string;
|
|
29
|
+
fieldLabel?: string;
|
|
30
|
+
onChange: any;
|
|
31
|
+
textAlign?: 'left' | 'right' | 'center';
|
|
32
|
+
placeholder?: string;
|
|
33
|
+
invalid?: any;
|
|
34
|
+
loadOptions?: any;
|
|
35
|
+
menuWidth?: number;
|
|
36
|
+
width?: number;
|
|
37
|
+
rowData?: any;
|
|
38
|
+
value: any;
|
|
39
|
+
onKeyDown?: any;
|
|
40
|
+
onOpenMenu?: any;
|
|
41
|
+
formatOptionLabel?: any;
|
|
42
|
+
handleAdd?: any;
|
|
43
|
+
options: any[];
|
|
44
|
+
isMulti?: boolean;
|
|
45
|
+
noHeader?: boolean;
|
|
46
|
+
maxHeight?: number;
|
|
47
|
+
columns?: IFColumnSelectTable[];
|
|
48
|
+
isClearable?: boolean;
|
|
49
|
+
isDisabled?: boolean;
|
|
50
|
+
allowCreate?: boolean;
|
|
51
|
+
showFooter?: boolean;
|
|
52
|
+
onPaste?: any;
|
|
53
|
+
onCloseMenu?: any;
|
|
54
|
+
formatSetting?: IFTableSelectFormat;
|
|
55
|
+
};
|
|
56
|
+
declare const SelectTable: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
|
|
57
|
+
export { SelectTable };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type IFColumnSelectTableTree = {
|
|
3
|
+
field: string;
|
|
4
|
+
headerText: string;
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
textAlign?: 'left' | 'right' | 'center';
|
|
7
|
+
type?: 'text' | 'numeric' | 'date' | 'datetime';
|
|
8
|
+
template?: any;
|
|
9
|
+
typeCondition?: any;
|
|
10
|
+
fraction?: number;
|
|
11
|
+
width?: number;
|
|
12
|
+
maxWidth?: number;
|
|
13
|
+
minWidth?: number;
|
|
14
|
+
};
|
|
15
|
+
export type IFTableTreeSelectFormat = {
|
|
16
|
+
dateFormat?: string;
|
|
17
|
+
decimalSeparator?: string;
|
|
18
|
+
thousandSeparator?: string;
|
|
19
|
+
colorNegative?: string;
|
|
20
|
+
prefixNegative?: string;
|
|
21
|
+
suffixNegative?: string;
|
|
22
|
+
};
|
|
23
|
+
type Props = {
|
|
24
|
+
id?: string;
|
|
25
|
+
component?: any;
|
|
26
|
+
footerComponent?: any;
|
|
27
|
+
fieldValue?: string;
|
|
28
|
+
fieldLabel?: string;
|
|
29
|
+
onChange: any;
|
|
30
|
+
textAlign?: 'left' | 'right' | 'center';
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
invalid?: any;
|
|
33
|
+
loadOptions?: any;
|
|
34
|
+
menuWidth?: number;
|
|
35
|
+
width?: number;
|
|
36
|
+
rowData?: any;
|
|
37
|
+
value: any;
|
|
38
|
+
onKeyDown?: any;
|
|
39
|
+
formatOptionLabel?: any;
|
|
40
|
+
handleAdd?: any;
|
|
41
|
+
options: any[];
|
|
42
|
+
isMulti?: boolean;
|
|
43
|
+
noHeader?: boolean;
|
|
44
|
+
maxHeight?: number;
|
|
45
|
+
columns?: IFColumnSelectTableTree[];
|
|
46
|
+
fieldChildren?: string;
|
|
47
|
+
isClearable?: boolean;
|
|
48
|
+
isDisabled?: boolean;
|
|
49
|
+
showFooter?: boolean;
|
|
50
|
+
selectChilds?: boolean;
|
|
51
|
+
formatSetting?: IFTableTreeSelectFormat;
|
|
52
|
+
onOpenMenu?: any;
|
|
53
|
+
onPaste?: any;
|
|
54
|
+
};
|
|
55
|
+
declare const SelectTableTree: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
|
|
56
|
+
export { SelectTableTree };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface IFDataProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
children: any;
|
|
4
|
+
toggleSidebar: any;
|
|
5
|
+
width?: string | number;
|
|
6
|
+
keyboard?: boolean;
|
|
7
|
+
hiddenBackground?: boolean;
|
|
8
|
+
hiddenFullScreenButton?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Sidebar: (props: IFDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default Sidebar;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IColumnTable } from '../table';
|
|
2
|
+
export interface IFPropsDetail {
|
|
3
|
+
column: IColumnTable[];
|
|
4
|
+
setColumn: any;
|
|
5
|
+
openSidebar: boolean;
|
|
6
|
+
handleSidebar: any;
|
|
7
|
+
}
|
|
8
|
+
declare const SidebarSetColumn: (props: IFPropsDetail) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default SidebarSetColumn;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type IFDataProps = {
|
|
2
|
+
buttonWidth?: number;
|
|
3
|
+
tabParent?: boolean;
|
|
4
|
+
tabChild?: boolean;
|
|
5
|
+
resourceCodeParent?: string;
|
|
6
|
+
resourceCode: string;
|
|
7
|
+
resources: any[];
|
|
8
|
+
renderModal?: any;
|
|
9
|
+
windowSize?: any;
|
|
10
|
+
};
|
|
11
|
+
declare const TabsMenuComponent: ({ buttonWidth, tabParent, tabChild, resourceCodeParent, resources, resourceCode, windowSize, renderModal }: IFDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { TabsMenuComponent };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { ICommandItem } from '.';
|
|
3
|
+
type IFDataProps = {
|
|
4
|
+
commandItems: ICommandItem[];
|
|
5
|
+
rowData: any;
|
|
6
|
+
indexRow: number;
|
|
7
|
+
indexFocus?: number;
|
|
8
|
+
setIndexFocus: Dispatch<SetStateAction<number | undefined>>;
|
|
9
|
+
handleCommandClick: any;
|
|
10
|
+
};
|
|
11
|
+
declare const CommandElement: (props: IFDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default CommandElement;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { IHeaderColumnTable } from '.';
|
|
3
|
+
import 'react-resizable/css/styles.css';
|
|
4
|
+
type IFDataProps = {
|
|
5
|
+
selectEnable: boolean;
|
|
6
|
+
dataSource: any[];
|
|
7
|
+
setSelectedRows: Dispatch<SetStateAction<any[]>>;
|
|
8
|
+
col: IHeaderColumnTable;
|
|
9
|
+
column: IHeaderColumnTable[];
|
|
10
|
+
setColumn: Dispatch<SetStateAction<IHeaderColumnTable[]>>;
|
|
11
|
+
indexCol: number;
|
|
12
|
+
indexParent: number;
|
|
13
|
+
objWidthFix: any;
|
|
14
|
+
totalCount: number;
|
|
15
|
+
selectedRows: any[];
|
|
16
|
+
isMulti: boolean;
|
|
17
|
+
};
|
|
18
|
+
declare const HeaderTableCol: (props: IFDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default HeaderTableCol;
|
|
@@ -0,0 +1,180 @@
|
|
|
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 IFToolbarOptions = {
|
|
13
|
+
align: 'left' | 'right' | 'center';
|
|
14
|
+
template: any;
|
|
15
|
+
};
|
|
16
|
+
export type ISettingFormElement = {
|
|
17
|
+
schema: any;
|
|
18
|
+
labelSize?: 'label-small' | 'label-medium' | 'label-large';
|
|
19
|
+
menuWidth?: number;
|
|
20
|
+
menuHeight?: number;
|
|
21
|
+
displayValue?: any;
|
|
22
|
+
footerTemplate?: any;
|
|
23
|
+
openOnFocus?: boolean;
|
|
24
|
+
isClearable?: boolean;
|
|
25
|
+
onChangeField?: any;
|
|
26
|
+
onFormOpen?: any;
|
|
27
|
+
onFormSubmit?: any;
|
|
28
|
+
};
|
|
29
|
+
export type ISettingSelectElement = {
|
|
30
|
+
isClearable?: boolean;
|
|
31
|
+
isMulti?: boolean;
|
|
32
|
+
noHeader?: boolean;
|
|
33
|
+
showFooter?: boolean;
|
|
34
|
+
footerComponent?: any;
|
|
35
|
+
formatOptionLabel?: any;
|
|
36
|
+
selectChilds?: boolean;
|
|
37
|
+
allowCreate?: boolean;
|
|
38
|
+
loadOptions?: any;
|
|
39
|
+
defaultValue?: any;
|
|
40
|
+
fieldValue?: string;
|
|
41
|
+
fieldLabel?: string;
|
|
42
|
+
fieldChild?: string;
|
|
43
|
+
options?: any[];
|
|
44
|
+
widthPopup?: string | number;
|
|
45
|
+
heightPopup?: string | number;
|
|
46
|
+
iconGroup?: string;
|
|
47
|
+
handAddNew?: any;
|
|
48
|
+
validateOption?: any;
|
|
49
|
+
optionsField?: string;
|
|
50
|
+
columns?: IFColumnSelectTable[];
|
|
51
|
+
onOpenMenu?: any;
|
|
52
|
+
};
|
|
53
|
+
export type ISettingNumericElement = {
|
|
54
|
+
min?: number;
|
|
55
|
+
max?: number;
|
|
56
|
+
fraction?: number;
|
|
57
|
+
allowNegative?: boolean;
|
|
58
|
+
};
|
|
59
|
+
export type IColumnTable = {
|
|
60
|
+
field: string;
|
|
61
|
+
headerText?: string;
|
|
62
|
+
isPrimarykey?: boolean;
|
|
63
|
+
isUnikey?: boolean;
|
|
64
|
+
haveSum?: boolean;
|
|
65
|
+
haveToolTip?: boolean;
|
|
66
|
+
validate?: any;
|
|
67
|
+
disabledCondition?: any;
|
|
68
|
+
callback?: any;
|
|
69
|
+
width?: number | string;
|
|
70
|
+
minWidth?: number | string;
|
|
71
|
+
maxWidth?: number | string;
|
|
72
|
+
editEnable?: boolean;
|
|
73
|
+
visible?: boolean;
|
|
74
|
+
invisibleDisable?: boolean;
|
|
75
|
+
editType?: IEditType;
|
|
76
|
+
textAlign?: ITextAlign;
|
|
77
|
+
fixedType?: 'left' | 'right' | undefined;
|
|
78
|
+
template?: any;
|
|
79
|
+
commandItems?: ICommandItem[];
|
|
80
|
+
editTypeCondition?: any;
|
|
81
|
+
onPaste?: any;
|
|
82
|
+
onPasteValidate?: any;
|
|
83
|
+
placeholder?: string;
|
|
84
|
+
numericSettings?: ISettingNumericElement;
|
|
85
|
+
selectSettings?: ISettingSelectElement;
|
|
86
|
+
formSettings?: ISettingFormElement;
|
|
87
|
+
columns?: IColumnTable[];
|
|
88
|
+
};
|
|
89
|
+
export type IFTableEditPaging = {
|
|
90
|
+
allowPaging?: boolean;
|
|
91
|
+
pagingClient?: boolean;
|
|
92
|
+
currentPage?: number;
|
|
93
|
+
setCurrentPage?: Dispatch<SetStateAction<number>>;
|
|
94
|
+
setPageSize?: Dispatch<SetStateAction<number>>;
|
|
95
|
+
pageSize?: number;
|
|
96
|
+
totalItem?: number;
|
|
97
|
+
};
|
|
98
|
+
export type IFTableEditButton = {
|
|
99
|
+
deleteAllDisable?: boolean;
|
|
100
|
+
insertAfterDisable?: boolean;
|
|
101
|
+
insertBeforeDisable?: boolean;
|
|
102
|
+
duplicateDisable?: boolean;
|
|
103
|
+
};
|
|
104
|
+
export type IFTableEditToolbar = {
|
|
105
|
+
showTopToolbar?: boolean;
|
|
106
|
+
toolbarOptions?: IFToolbarOptions[];
|
|
107
|
+
toolbarBottomOptions?: IFToolbarOptions[];
|
|
108
|
+
showBottomToolbar?: boolean;
|
|
109
|
+
};
|
|
110
|
+
export type IFTableEditSearchSetting = {
|
|
111
|
+
searchEnable?: boolean;
|
|
112
|
+
searchClient?: boolean;
|
|
113
|
+
searchTerm?: string;
|
|
114
|
+
keyField?: string[];
|
|
115
|
+
setSearchTerm?: Dispatch<SetStateAction<string>>;
|
|
116
|
+
};
|
|
117
|
+
export type IFTableEditFormat = {
|
|
118
|
+
dateFormat?: string;
|
|
119
|
+
datetimeFormat?: string;
|
|
120
|
+
decimalSeparator?: string;
|
|
121
|
+
thousandSeparator?: string;
|
|
122
|
+
colorNegative?: string;
|
|
123
|
+
prefixNegative?: string;
|
|
124
|
+
suffixNegative?: string;
|
|
125
|
+
};
|
|
126
|
+
export type IFTableEditProps = {
|
|
127
|
+
idTable?: string;
|
|
128
|
+
dataSource: any[];
|
|
129
|
+
selectEnable?: boolean;
|
|
130
|
+
defaultValue?: any;
|
|
131
|
+
columns: IColumnTable[];
|
|
132
|
+
setDataSource?: any;
|
|
133
|
+
commandClick?: any;
|
|
134
|
+
rowChange?: any;
|
|
135
|
+
handleSelect?: any;
|
|
136
|
+
dataSourceChange?: any;
|
|
137
|
+
height?: number;
|
|
138
|
+
maxHeight?: number;
|
|
139
|
+
minHeight?: number;
|
|
140
|
+
selectedItem?: any;
|
|
141
|
+
setSelectedItem?: Dispatch<SetStateAction<any>>;
|
|
142
|
+
isMulti?: boolean;
|
|
143
|
+
editDisable?: boolean;
|
|
144
|
+
addDisable?: boolean;
|
|
145
|
+
haveSum?: boolean;
|
|
146
|
+
disableAutoKey?: boolean;
|
|
147
|
+
formatSetting?: IFTableEditFormat;
|
|
148
|
+
pagingSetting?: IFTableEditPaging;
|
|
149
|
+
buttonSetting?: IFTableEditButton;
|
|
150
|
+
toolbarSetting?: IFTableEditToolbar;
|
|
151
|
+
searchSetting?: IFTableEditSearchSetting;
|
|
152
|
+
};
|
|
153
|
+
export type IFPageSize = {
|
|
154
|
+
pageSize: number;
|
|
155
|
+
};
|
|
156
|
+
export type IFCurrentPage = {
|
|
157
|
+
currentPage: number;
|
|
158
|
+
};
|
|
159
|
+
export type IFCurrentPageConfig = {
|
|
160
|
+
currentPage: number;
|
|
161
|
+
oldPage: number;
|
|
162
|
+
};
|
|
163
|
+
type IFRef = {
|
|
164
|
+
refeshFocusRow: any;
|
|
165
|
+
};
|
|
166
|
+
export type IHeaderColumnTable = {
|
|
167
|
+
field: string;
|
|
168
|
+
headerText?: string;
|
|
169
|
+
width?: number | string;
|
|
170
|
+
minWidth?: number | string;
|
|
171
|
+
maxWidth?: number | string;
|
|
172
|
+
visible?: boolean;
|
|
173
|
+
rowspan?: number;
|
|
174
|
+
columns?: IColumnTable[];
|
|
175
|
+
textAlign?: ITextAlign;
|
|
176
|
+
fixedType?: 'left' | 'right' | undefined;
|
|
177
|
+
index?: number;
|
|
178
|
+
};
|
|
179
|
+
declare const TableEdit: import("react").ForwardRefExoticComponent<IFTableEditProps & import("react").RefAttributes<IFRef>>;
|
|
180
|
+
export default TableEdit;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type IFDataProps = {
|
|
2
|
+
onChangePage?: any;
|
|
3
|
+
onChangePageSize?: any;
|
|
4
|
+
pageOptions: number[];
|
|
5
|
+
currentPage: number;
|
|
6
|
+
pageSize: number;
|
|
7
|
+
totalItem: number;
|
|
8
|
+
};
|
|
9
|
+
declare const PagingComponent: ({ totalItem, pageSize, currentPage, onChangePage, pageOptions, onChangePageSize }: IFDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { PagingComponent };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IColumnTable, IFTableEditToolbar } from '.';
|
|
3
|
+
interface RenderEditProps {
|
|
4
|
+
row: any;
|
|
5
|
+
col: IColumnTable;
|
|
6
|
+
indexRow: number;
|
|
7
|
+
indexCol: number;
|
|
8
|
+
idTable: string;
|
|
9
|
+
toolbarSetting?: IFTableEditToolbar;
|
|
10
|
+
pasteDataFromExcel: any;
|
|
11
|
+
editDisable?: boolean;
|
|
12
|
+
addDisable?: boolean;
|
|
13
|
+
thousandSeparator: string;
|
|
14
|
+
decimalSeparator: string;
|
|
15
|
+
tableElement: any;
|
|
16
|
+
checkKeyDown: any;
|
|
17
|
+
handleDataChange: (row: any, col: IColumnTable, indexRow: number) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const RenderEdit: React.NamedExoticComponent<RenderEditProps>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IFTableEditButton, IFTableEditToolbar } from "./type";
|
|
2
|
+
export type IFToolbarOptions = {
|
|
3
|
+
align: 'left' | 'right' | 'center';
|
|
4
|
+
template: any;
|
|
5
|
+
};
|
|
6
|
+
declare const renderToolbarBottom: (t: any, handleAdd: any, handleDuplicate: any, handleInsertBefore: any, handleInsertAfter: any, handleDeleteAll: any, dataSource: any[], headerColumns: any[], indexFocus: number, setOpenPopupSetupColumn: any, editDisable?: boolean, buttonSetting?: IFTableEditButton, addDisable?: boolean, toolbarSetting?: IFTableEditToolbar) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default renderToolbarBottom;
|