@esvndev/es-react-table-interface 1.1.8 → 1.1.9

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.
@@ -34,7 +34,6 @@ export interface IHeaderToolbar {
34
34
  * @param handleDoubleContextMenuClick là hàm xử lý khi double click vào context menu, vd: (props: any) => void
35
35
  * @param rowSelected là dữ liệu của dòng được chọn
36
36
  * @param dataSelected là dữ liệu của các dòng đã được chọn
37
- * @param rowDataBound là hàm xử lý dữ liệu trước khi render bảng, thay đổi màu sắc hiển thị...
38
37
  * @param dataSourceFilter là dữ liệu của các ô tìm kiếm của cột loại checkbox
39
38
  * @param listContextShow là danh sách các context menu được hiển thị
40
39
  * @param listContextHide là danh sách các context menu bị ẩn
@@ -57,7 +56,6 @@ export interface IHeaderToolbar {
57
56
  */
58
57
  export interface IExternalInterface {
59
58
  windowSize?: any;
60
- rowDataBound?: any;
61
59
  stateId: string;
62
60
  titleChild?: string;
63
61
  stateChildId?: {
@@ -69,10 +67,18 @@ export interface IExternalInterface {
69
67
  totalCount?: number;
70
68
  allowPaging?: boolean;
71
69
  allowResizing?: boolean;
70
+ summary?: boolean;
72
71
  buttons?: IButtonToolbar[];
73
72
  rowSelected?: any;
74
73
  rowClassName?: any;
75
74
  typeCheckbox?: 'checkbox' | 'radio' | undefined;
75
+ onChangeParam?: (item: {
76
+ keyword?: string;
77
+ pageSize?: number;
78
+ pageNumber?: number;
79
+ queryFilter?: any[];
80
+ queryOrder?: any[];
81
+ }) => void;
76
82
  }[];
77
83
  viewIdTable: string;
78
84
  currentPageDefault?: number;
@@ -105,7 +111,7 @@ export interface IExternalInterface {
105
111
  querySelectDefault?: IQueryFilter[];
106
112
  t: TFunction;
107
113
  localeLanguage?: any;
108
- api: {
114
+ api?: {
109
115
  apiGetColumns: any;
110
116
  apiGetOption: any;
111
117
  apiGetDataView: any;
@@ -148,6 +154,11 @@ export interface IExternalInterface {
148
154
  yearFormat?: string;
149
155
  };
150
156
  showUltilities?: boolean;
157
+ ultilities?: {
158
+ showExport?: boolean;
159
+ showPrint?: boolean;
160
+ showSetting?: boolean;
161
+ };
151
162
  allowPaging?: boolean;
152
163
  allowResizing?: boolean;
153
164
  allowFilterClient?: boolean;
@@ -161,6 +172,13 @@ export interface IExternalInterface {
161
172
  columns?: ColumnTable[];
162
173
  totalCount?: number;
163
174
  hideSelectAll?: boolean;
175
+ onChangeParam?: (item: {
176
+ keyword?: string;
177
+ pageSize?: number;
178
+ pageNumber?: number;
179
+ queryFilter?: any[];
180
+ queryOrder?: any[];
181
+ }) => void;
164
182
  rowSelection?: {
165
183
  preserveSelectedRowKeys?: boolean;
166
184
  selectedRowKeys?: any[];
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ interface IFormInput {
3
+ control: any;
4
+ name: string;
5
+ label: string;
6
+ labelSize?: string;
7
+ disabled?: boolean;
8
+ callback?: any;
9
+ isLabel?: boolean;
10
+ inLine?: boolean;
11
+ reverse?: boolean;
12
+ text?: string;
13
+ classname?: string;
14
+ }
15
+ declare const CheckboxInput: (props: IFormInput) => React.JSX.Element;
16
+ export default CheckboxInput;
@@ -0,0 +1,20 @@
1
+ import { SweetAlertIcon } from 'sweetalert2';
2
+ import { TFunction } from 'react-i18next';
3
+ export declare const notificationError: (param: string) => string;
4
+ export declare const notificationSuccess: (param: string) => string;
5
+ export declare const messageBoxConfirm: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
6
+ export declare const messageBoxConfirmDelete: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
7
+ export declare const messageBoxConfirmDeleteAll: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
8
+ export declare const messageBoxError: (t: TFunction<"translation", undefined>, message: string) => void;
9
+ export declare const messageBox: ({ t, message, icon, title, showCancel, showConfirm, textCancel, textConfirm, handle, html }: {
10
+ t: TFunction<"translation", undefined>;
11
+ message?: string;
12
+ html?: HTMLElement | string | JQuery;
13
+ title?: string;
14
+ icon?: SweetAlertIcon;
15
+ showCancel?: boolean;
16
+ showConfirm?: boolean;
17
+ textCancel?: string;
18
+ textConfirm?: string;
19
+ handle?: any;
20
+ }) => void;
@@ -0,0 +1,41 @@
1
+ import React from "react";
2
+ import { IFColumnSelectTable } from "react-table-edit";
3
+ interface ISelectTableBox {
4
+ name: string;
5
+ control: any;
6
+ defaultValue?: any;
7
+ isMulti?: boolean;
8
+ isLabel?: boolean;
9
+ inLine?: boolean;
10
+ labelComponent?: any;
11
+ options: 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
+ footerComponent?: any;
24
+ handleAddNew?: any;
25
+ fieldLabel?: string;
26
+ fieldValue?: string;
27
+ isClearable?: boolean;
28
+ noHeader?: boolean;
29
+ desciptionLabel?: string;
30
+ classLabel?: string;
31
+ showFooter?: boolean;
32
+ allowCreate?: boolean;
33
+ onPaste?: any;
34
+ onOpenMenu?: any;
35
+ onCloseMenu?: any;
36
+ userSubject?: any;
37
+ isView?: boolean;
38
+ nameView?: string;
39
+ }
40
+ declare const SelectTableBox: (props: ISelectTableBox) => React.JSX.Element;
41
+ export default SelectTableBox;
@@ -4,3 +4,4 @@ export declare const getToken: () => string | null;
4
4
  export declare const apiGetOption: (data?: Record<string, any>, config?: RequestInit, timeout?: number) => Promise<any>;
5
5
  export declare const apiTableConfig: (data?: any, config?: any, timeout?: number) => Promise<any>;
6
6
  export declare const apiGetDataView: (data?: any, config?: any, timeout?: number) => Promise<any>;
7
+ export declare const apiTableconfigAddEditDelete: (data?: any, config?: any, timeout?: number) => Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esvndev/es-react-table-interface",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "This product is designed by ESVN and is only for use in products distributed by ESVN. Any product, whether for non-commercial research or commercial purposes, must have written legal approval and a digital signature from ESVN.",
5
5
  "license": "ESVN Limited Use License",
6
6
  "author": "dev@esvn.com.vn",
@@ -47,6 +47,7 @@
47
47
  "@testing-library/react": "^14.2.1",
48
48
  "@types/jest": "^29.5.12",
49
49
  "@types/react": "^18.2.58",
50
+ "@types/react-custom-scrollbars": "^4.0.10",
50
51
  "@typescript-eslint/eslint-plugin": "^5.39.0",
51
52
  "@typescript-eslint/parser": "^5.39.0",
52
53
  "axios": "^1.7.2",
@@ -69,6 +70,7 @@
69
70
  "npm-run-all": "^4.1.5",
70
71
  "prettier": "^3.2.5",
71
72
  "react": "^18.2.0",
73
+ "react-custom-scrollbars-2": "^4.5.0",
72
74
  "react-dom": "^18.2.0",
73
75
  "react-hot-toast": "2.2.0",
74
76
  "react-i18next": "^11.16.9",