@mkt-loitd/react-table-grid-custom 1.4.1 → 1.4.2

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 CHANGED
@@ -1,8 +1,7 @@
1
- import { Dispatch, SetStateAction, Key, ReactNode, FC } from 'react';
1
+ import { Dispatch, SetStateAction, Key, FC, ReactNode } from 'react';
2
2
  import { ColumnOrColumnGroup, SortColumn } from 'react-data-grid';
3
3
  export { Column, ColumnOrColumnGroup, DataGridProps } from 'react-data-grid';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
- import { UseMutateFunction } from '@tanstack/react-query';
6
5
 
7
6
  type TColumnsTable<T = unknown, SR = unknown> = readonly ColumnOrColumnGroup<NoInfer<T>, NoInfer<SR>>[];
8
7
  interface useShowHideColumnParameter<T, SR = unknown> {
@@ -45,127 +44,8 @@ interface IReactTableGridCustom<T = unknown, SR = unknown, K extends Key = Key>
45
44
  declare const ReactTableGridCustomInner: <T, SR = unknown, K extends Key = Key>(props: IReactTableGridCustom<T, SR, K>) => react_jsx_runtime.JSX.Element;
46
45
  declare const ReactTableGridCustom: typeof ReactTableGridCustomInner;
47
46
 
48
- interface ContextMenuProps {
49
- selector: string;
50
- children?: ReactNode;
51
- zIndex?: number;
52
- }
53
-
54
- interface IMainResponse<T = any> {
55
- success?: boolean;
56
- status?: 'success' | 'error' | 'warning';
57
- data?: T;
58
- payload?: {
59
- data?: T;
60
- [key: string]: any;
61
- };
62
- message?: {
63
- key: string;
64
- [key: string]: any;
65
- };
66
- error?: any;
67
- }
68
- interface IFieldUpdateAndCheck<T = any, F = any, V = any> {
69
- id?: string | number;
70
- field?: F;
71
- value?: V;
72
- data?: T;
73
- [key: string]: any;
74
- }
75
- interface Account {
76
- id?: string | number;
77
- username?: string;
78
- password?: string;
79
- email?: string;
80
- status?: string;
81
- [key: string]: any;
82
- }
83
- interface Post {
84
- id?: string | number;
85
- title?: string;
86
- content?: string;
87
- createdAt?: number;
88
- [key: string]: any;
89
- }
90
- interface AppSettings {
91
- [key: string]: any;
92
- }
93
- interface ISetConfigPagination {
94
- page?: number;
95
- limit?: number;
96
- total?: number;
97
- [key: string]: any;
98
- }
99
- type ITaskName = string;
100
-
101
- interface IActionUiUtilBy {
102
- action?: string;
103
- [key: string]: any;
104
- }
105
- interface IPayloadStartAction {
106
- action?: string;
107
- [key: string]: any;
108
- }
109
-
110
- interface Proxy {
111
- id?: string;
112
- host?: string;
113
- port?: number;
114
- username?: string;
115
- password?: string;
116
- protocol?: string;
117
- provider?: string;
118
- [key: string]: any;
119
- }
120
-
121
- interface IPayloadRemoveProxy {
122
- ids: string[];
123
- }
124
- interface IPayloadService {
125
- updateByClipboard?: UseMutateFunction<IMainResponse<string[]>, Error, IFieldUpdateAndCheck<Account, string[], keyof Account>, unknown>;
126
- removeFieldBy?: UseMutateFunction<IMainResponse<boolean>, Error, IFieldUpdateAndCheck<Account, Array<keyof Account>, string[]>, unknown>;
127
- copyByField?: UseMutateFunction<IMainResponse<boolean>, Error, IFieldUpdateAndCheck<Account, string, string[]>, unknown>;
128
- actionBy?: UseMutateFunction<IMainResponse<string[]>, Error, IFieldUpdateAndCheck<Account, IActionUiUtilBy, string[]>, unknown>;
129
- updateAccountByField?: UseMutateFunction<IMainResponse<boolean>, Error, IFieldUpdateAndCheck<Account, Partial<Account>, string[]>, unknown>;
130
- deleteProxy?: UseMutateFunction<IMainResponse<boolean>, Error, IPayloadRemoveProxy, unknown>;
131
- removePostByField?: UseMutateFunction<IMainResponse<boolean>, Error, IFieldUpdateAndCheck<Post, undefined, string[]>, unknown>;
132
- startAction?: UseMutateFunction<IMainResponse<boolean>, Error, IPayloadStartAction, unknown>;
133
- updateSettings?: UseMutateFunction<IMainResponse<boolean>, Error, IFieldUpdateAndCheck<AppSettings, object, boolean>, unknown>;
134
- useCopyProxyByField?: UseMutateFunction<IMainResponse<boolean>, Error, IFieldUpdateAndCheck<Proxy, string, string[]>[], unknown>;
135
- exportLinkSuccess?: UseMutateFunction<IMainResponse<boolean>, Error, ITaskName, unknown>;
136
- setAction?: Dispatch<SetStateAction<ITaskName>>;
137
- }
138
-
139
- type IDispatchState<T> = Dispatch<SetStateAction<T>>;
140
-
141
- interface IExpandValue extends IPayloadService {
142
- t?: any;
143
- setConfigSearch?: IDispatchState<ISetConfigPagination>;
144
- setSelectedRecords?: Dispatch<ReadonlySet<string>>;
145
- setIsShowEdit?: Dispatch<SetStateAction<boolean>>;
146
- setIsOpenEditContent?: Dispatch<SetStateAction<boolean>>;
147
- setIsCopy?: Dispatch<SetStateAction<boolean>>;
148
- setIsChangeCate?: Dispatch<SetStateAction<boolean>>;
149
- setIsBackup?: Dispatch<SetStateAction<boolean>>;
150
- }
151
- type configContextMenuType = {
152
- Icon: (prop?: any) => ReactNode;
153
- action: string;
154
- onClick?: (value: string[], expandValue: IExpandValue) => void;
155
- children?: configContextMenuType[];
156
- };
157
- interface RenderContextMenuProps {
158
- renderData?: configContextMenuType[];
159
- valueClickItem?: any;
160
- expandValue?: IExpandValue;
161
- }
162
-
163
47
  interface TableStyleWapperProps {
164
48
  children?: ReactNode;
165
- contextMenuProps?: Omit<ContextMenuProps, 'selector' | 'children'> & {
166
- selector?: string;
167
- };
168
- renderContext?: RenderContextMenuProps;
169
49
  clsTablecustom?: string;
170
50
  idWapper?: string;
171
51
  }
package/dist/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
- import { Dispatch, SetStateAction, Key, ReactNode, FC } from 'react';
1
+ import { Dispatch, SetStateAction, Key, FC, ReactNode } from 'react';
2
2
  import { ColumnOrColumnGroup, SortColumn } from 'react-data-grid';
3
3
  export { Column, ColumnOrColumnGroup, DataGridProps } from 'react-data-grid';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
- import { UseMutateFunction } from '@tanstack/react-query';
6
5
 
7
6
  type TColumnsTable<T = unknown, SR = unknown> = readonly ColumnOrColumnGroup<NoInfer<T>, NoInfer<SR>>[];
8
7
  interface useShowHideColumnParameter<T, SR = unknown> {
@@ -45,127 +44,8 @@ interface IReactTableGridCustom<T = unknown, SR = unknown, K extends Key = Key>
45
44
  declare const ReactTableGridCustomInner: <T, SR = unknown, K extends Key = Key>(props: IReactTableGridCustom<T, SR, K>) => react_jsx_runtime.JSX.Element;
46
45
  declare const ReactTableGridCustom: typeof ReactTableGridCustomInner;
47
46
 
48
- interface ContextMenuProps {
49
- selector: string;
50
- children?: ReactNode;
51
- zIndex?: number;
52
- }
53
-
54
- interface IMainResponse<T = any> {
55
- success?: boolean;
56
- status?: 'success' | 'error' | 'warning';
57
- data?: T;
58
- payload?: {
59
- data?: T;
60
- [key: string]: any;
61
- };
62
- message?: {
63
- key: string;
64
- [key: string]: any;
65
- };
66
- error?: any;
67
- }
68
- interface IFieldUpdateAndCheck<T = any, F = any, V = any> {
69
- id?: string | number;
70
- field?: F;
71
- value?: V;
72
- data?: T;
73
- [key: string]: any;
74
- }
75
- interface Account {
76
- id?: string | number;
77
- username?: string;
78
- password?: string;
79
- email?: string;
80
- status?: string;
81
- [key: string]: any;
82
- }
83
- interface Post {
84
- id?: string | number;
85
- title?: string;
86
- content?: string;
87
- createdAt?: number;
88
- [key: string]: any;
89
- }
90
- interface AppSettings {
91
- [key: string]: any;
92
- }
93
- interface ISetConfigPagination {
94
- page?: number;
95
- limit?: number;
96
- total?: number;
97
- [key: string]: any;
98
- }
99
- type ITaskName = string;
100
-
101
- interface IActionUiUtilBy {
102
- action?: string;
103
- [key: string]: any;
104
- }
105
- interface IPayloadStartAction {
106
- action?: string;
107
- [key: string]: any;
108
- }
109
-
110
- interface Proxy {
111
- id?: string;
112
- host?: string;
113
- port?: number;
114
- username?: string;
115
- password?: string;
116
- protocol?: string;
117
- provider?: string;
118
- [key: string]: any;
119
- }
120
-
121
- interface IPayloadRemoveProxy {
122
- ids: string[];
123
- }
124
- interface IPayloadService {
125
- updateByClipboard?: UseMutateFunction<IMainResponse<string[]>, Error, IFieldUpdateAndCheck<Account, string[], keyof Account>, unknown>;
126
- removeFieldBy?: UseMutateFunction<IMainResponse<boolean>, Error, IFieldUpdateAndCheck<Account, Array<keyof Account>, string[]>, unknown>;
127
- copyByField?: UseMutateFunction<IMainResponse<boolean>, Error, IFieldUpdateAndCheck<Account, string, string[]>, unknown>;
128
- actionBy?: UseMutateFunction<IMainResponse<string[]>, Error, IFieldUpdateAndCheck<Account, IActionUiUtilBy, string[]>, unknown>;
129
- updateAccountByField?: UseMutateFunction<IMainResponse<boolean>, Error, IFieldUpdateAndCheck<Account, Partial<Account>, string[]>, unknown>;
130
- deleteProxy?: UseMutateFunction<IMainResponse<boolean>, Error, IPayloadRemoveProxy, unknown>;
131
- removePostByField?: UseMutateFunction<IMainResponse<boolean>, Error, IFieldUpdateAndCheck<Post, undefined, string[]>, unknown>;
132
- startAction?: UseMutateFunction<IMainResponse<boolean>, Error, IPayloadStartAction, unknown>;
133
- updateSettings?: UseMutateFunction<IMainResponse<boolean>, Error, IFieldUpdateAndCheck<AppSettings, object, boolean>, unknown>;
134
- useCopyProxyByField?: UseMutateFunction<IMainResponse<boolean>, Error, IFieldUpdateAndCheck<Proxy, string, string[]>[], unknown>;
135
- exportLinkSuccess?: UseMutateFunction<IMainResponse<boolean>, Error, ITaskName, unknown>;
136
- setAction?: Dispatch<SetStateAction<ITaskName>>;
137
- }
138
-
139
- type IDispatchState<T> = Dispatch<SetStateAction<T>>;
140
-
141
- interface IExpandValue extends IPayloadService {
142
- t?: any;
143
- setConfigSearch?: IDispatchState<ISetConfigPagination>;
144
- setSelectedRecords?: Dispatch<ReadonlySet<string>>;
145
- setIsShowEdit?: Dispatch<SetStateAction<boolean>>;
146
- setIsOpenEditContent?: Dispatch<SetStateAction<boolean>>;
147
- setIsCopy?: Dispatch<SetStateAction<boolean>>;
148
- setIsChangeCate?: Dispatch<SetStateAction<boolean>>;
149
- setIsBackup?: Dispatch<SetStateAction<boolean>>;
150
- }
151
- type configContextMenuType = {
152
- Icon: (prop?: any) => ReactNode;
153
- action: string;
154
- onClick?: (value: string[], expandValue: IExpandValue) => void;
155
- children?: configContextMenuType[];
156
- };
157
- interface RenderContextMenuProps {
158
- renderData?: configContextMenuType[];
159
- valueClickItem?: any;
160
- expandValue?: IExpandValue;
161
- }
162
-
163
47
  interface TableStyleWapperProps {
164
48
  children?: ReactNode;
165
- contextMenuProps?: Omit<ContextMenuProps, 'selector' | 'children'> & {
166
- selector?: string;
167
- };
168
- renderContext?: RenderContextMenuProps;
169
49
  clsTablecustom?: string;
170
50
  idWapper?: string;
171
51
  }
package/dist/index.js CHANGED
@@ -311,9 +311,9 @@ var import_jsx_runtime3 = require("react/jsx-runtime");
311
311
  var isClient = typeof window !== "undefined";
312
312
  var TableStyleContextWapper = ({
313
313
  children,
314
- contextMenuProps,
314
+ // contextMenuProps,
315
315
  clsTablecustom,
316
- renderContext,
316
+ // renderContext,
317
317
  idWapper: externalId
318
318
  }) => {
319
319
  if (!isClient) {
package/dist/index.mjs CHANGED
@@ -280,9 +280,9 @@ import { Fragment, jsx as jsx3 } from "react/jsx-runtime";
280
280
  var isClient = typeof window !== "undefined";
281
281
  var TableStyleContextWapper = ({
282
282
  children,
283
- contextMenuProps,
283
+ // contextMenuProps,
284
284
  clsTablecustom,
285
- renderContext,
285
+ // renderContext,
286
286
  idWapper: externalId
287
287
  }) => {
288
288
  if (!isClient) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mkt-loitd/react-table-grid-custom",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "React Table Grid Custom component",
5
5
  "license": "ISC",
6
6
  "private": false,