es-grid-template 1.8.74 → 1.8.75

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.
@@ -125,7 +125,7 @@ export type ColumnTable<RecordType = AnyObject> = {
125
125
  showTooltip?: boolean;
126
126
  tooltipDescription?: string | ((args: {
127
127
  value: any;
128
- record: RecordType;
128
+ rowData: RecordType;
129
129
  }) => ReactNode | ReactElement);
130
130
  headerTemplate?: React.ReactNode | React.ReactElement | ((column: ColumnTable<RecordType>) => React.ReactNode | React.ReactElement);
131
131
  commandItems?: CommandItem[];
@@ -287,7 +287,7 @@ export type ExpandableConfig<RecordType> = {
287
287
  columnTitle?: React.ReactNode;
288
288
  expandRowByClick?: boolean;
289
289
  expandIcon?: RenderExpandIcon<RecordType>;
290
- onExpand?: (expanded: boolean, record: RecordType) => void;
290
+ onExpand?: (expanded: boolean, rowData: RecordType) => void;
291
291
  onExpandedRowsChange?: (expandedKeys: readonly Key[]) => void;
292
292
  defaultExpandAllRows?: boolean;
293
293
  expandIconColumnIndex?: number;
@@ -295,17 +295,17 @@ export type ExpandableConfig<RecordType> = {
295
295
  showExpandColumn?: boolean;
296
296
  expandedRowClassName?: string | RowClassName<RecordType>;
297
297
  childrenColumnName?: string;
298
- rowExpandable?: (record: RecordType) => boolean;
298
+ rowExpandable?: (rowData: RecordType) => boolean;
299
299
  };
300
300
  export type RenderExpandIcon<RecordType> = (props: RenderExpandIconProps<RecordType>) => React.ReactNode;
301
301
  export interface RenderExpandIconProps<RecordType> {
302
302
  prefixCls: string;
303
303
  expanded: boolean;
304
- record: RecordType;
304
+ rowData: RecordType;
305
305
  expandable: boolean;
306
306
  onExpand: TriggerEventHandler<RecordType>;
307
307
  }
308
- export type TriggerEventHandler<RecordType> = (record: RecordType, event: React.MouseEvent<HTMLElement>) => void;
308
+ export type TriggerEventHandler<RecordType> = (rowData: RecordType, event: React.MouseEvent<HTMLElement>) => void;
309
309
  export type RowClassName<RecordType> = (record: RecordType, index: number, indent: number) => string;
310
310
  export type ExpandedRowRender<ValueType> = (record: ValueType, index: number, indent: number, expanded: boolean) => React.ReactNode;
311
311
  export type CommandClick<T> = {
@@ -195,7 +195,7 @@ const TableBodyCell = props => {
195
195
  // const tooltipContent = (isOpenTooltip === false || columnMeta.type === 'checkbox') ? '' : flexRender(cell.column.columnDef.cell, cell.getContext());
196
196
  const tooltipContent = isOpenTooltip === false ? '' : columnMeta?.tooltipDescription ? typeof columnMeta.tooltipDescription === 'function' ? columnMeta.tooltipDescription({
197
197
  value: cell.getValue(),
198
- record
198
+ rowData: record
199
199
  }) : columnMeta.tooltipDescription : columnMeta.template && typeof columnMeta.template !== 'function' ? columnMeta.template : cell.getValue();
200
200
  const allRows = table.getRowModel().flatRows;
201
201
  const rowNumber = allRows.findIndex(it => it.id === cell.row.id);
@@ -243,7 +243,7 @@ const TableBodyCellEdit = props => {
243
243
  const message = rowError && rowError[cell.column.id]?.field === cell.column.id ? rowError[cell.column.id].message : undefined;
244
244
  const tooltipContent = isOpenTooltip === false ? '' : columnMeta?.tooltipDescription ? typeof columnMeta.tooltipDescription === 'function' ? columnMeta.tooltipDescription({
245
245
  value: cell.getValue(),
246
- record
246
+ rowData: record
247
247
  }) : columnMeta.tooltipDescription : columnMeta.template && typeof columnMeta.template !== 'function' ? columnMeta.template : cell.getValue();
248
248
  const canEdit = isEditable(cell.column.columnDef.meta, record) && isRowEditable !== false;
249
249
 
@@ -30,7 +30,7 @@ const TableBodyCellEmpty = props => {
30
30
  // const tooltipContent = (isOpenTooltip === false || columnMeta.type === 'checkbox') ? '' : flexRender(cell.column.columnDef.cell, cell.getContext());
31
31
  const tooltipContent = isOpenTooltip === false ? '' : columnMeta?.tooltipDescription ? typeof columnMeta.tooltipDescription === 'function' ? columnMeta.tooltipDescription({
32
32
  value: cell.getValue(),
33
- record
33
+ rowData: record
34
34
  }) : columnMeta.tooltipDescription : columnMeta.template && typeof columnMeta.template !== 'function' ? columnMeta.template : cell.getValue();
35
35
  const allRows = table.getRowModel().flatRows;
36
36
  const rowNumber = allRows.findIndex(it => it.id === cell.row.id);
@@ -189,7 +189,7 @@ const TableBodyCell = props => {
189
189
  // const tooltipContent = (isOpenTooltip === false || columnMeta.type === 'checkbox') ? '' : flexRender(cell.column.columnDef.cell, cell.getContext());
190
190
  const tooltipContent = isOpenTooltip === false ? '' : columnMeta?.tooltipDescription ? typeof columnMeta.tooltipDescription === 'function' ? columnMeta.tooltipDescription({
191
191
  value: cell.getValue(),
192
- record
192
+ rowData: record
193
193
  }) : columnMeta.tooltipDescription : columnMeta.template && typeof columnMeta.template !== 'function' ? columnMeta.template : cell.getValue();
194
194
  const allRows = table.getRowModel().flatRows;
195
195
  const rowNumber = allRows.findIndex(it => it.id === cell.row.id);
@@ -189,7 +189,7 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
189
189
  showTooltip?: boolean;
190
190
  tooltipDescription?: string | ((args: {
191
191
  value: any;
192
- record: RecordType;
192
+ rowData: RecordType;
193
193
  }) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
194
194
  headerTemplate?: import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | ((column: ColumnTable<RecordType>) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
195
195
  commandItems?: import("./../../grid-component/type").CommandItem[];
@@ -211,9 +211,9 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
211
211
  ellipsis?: boolean;
212
212
  allowResizing?: boolean;
213
213
  allowSelection?: boolean | ((rowData: RecordType) => boolean);
214
- onCellStyles?: Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width">);
215
- onCellHeaderStyles?: Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width">);
216
- onCellFooterStyles?: Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width">);
214
+ onCellStyles?: Omit<CSSProperties, "display" | "width" | "minWidth" | "left" | "right" | "position"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "display" | "width" | "minWidth" | "left" | "right" | "position">);
215
+ onCellHeaderStyles?: Omit<CSSProperties, "display" | "width" | "minWidth" | "left" | "right" | "position"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "display" | "width" | "minWidth" | "left" | "right" | "position">);
216
+ onCellFooterStyles?: Omit<CSSProperties, "display" | "width" | "minWidth" | "left" | "right" | "position"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "display" | "width" | "minWidth" | "left" | "right" | "position">);
217
217
  sumGroup?: boolean;
218
218
  onCell?: (rowData: RecordType, index: number) => import("react").TdHTMLAttributes<HTMLTableCellElement>;
219
219
  }[];
@@ -188,7 +188,7 @@ const TableBodyCell = props => {
188
188
  // const tooltipContent = (isOpenTooltip === false || columnMeta.type === 'checkbox') ? '' : flexRender(cell.column.columnDef.cell, cell.getContext());
189
189
  const tooltipContent = isOpenTooltip === false ? '' : columnMeta?.tooltipDescription ? typeof columnMeta.tooltipDescription === 'function' ? columnMeta.tooltipDescription({
190
190
  value: cell.getValue(),
191
- record
191
+ rowData: record
192
192
  }) : columnMeta.tooltipDescription : columnMeta.template && typeof columnMeta.template !== 'function' ? columnMeta.template : cell.getValue();
193
193
  const allRows = table.getRowModel().flatRows;
194
194
  const rowNumber = allRows.findIndex(it => it.id === cell.row.id);
@@ -242,7 +242,7 @@ const TableBodyCellEdit = props => {
242
242
  const message = rowError && rowError[cell.column.id]?.field === cell.column.id ? rowError[cell.column.id].message : undefined;
243
243
  const tooltipContent = isOpenTooltip === false ? '' : columnMeta?.tooltipDescription ? typeof columnMeta.tooltipDescription === 'function' ? columnMeta.tooltipDescription({
244
244
  value: cell.getValue(),
245
- record
245
+ rowData: record
246
246
  }) : columnMeta.tooltipDescription : columnMeta.template && typeof columnMeta.template !== 'function' ? columnMeta.template : cell.getValue();
247
247
  const canEdit = isEditable(cell.column.columnDef.meta, record) && isRowEditable !== false;
248
248
 
@@ -176,7 +176,7 @@ const TableBodyCell = props => {
176
176
  // const tooltipContent = (isOpenTooltip === false || columnMeta.type === 'checkbox') ? '' : flexRender(cell.column.columnDef.cell, cell.getContext());
177
177
  const tooltipContent = isOpenTooltip === false ? '' : columnMeta?.tooltipDescription ? typeof columnMeta.tooltipDescription === 'function' ? columnMeta.tooltipDescription({
178
178
  value: cell.getValue(),
179
- record
179
+ rowData: record
180
180
  }) : columnMeta.tooltipDescription : columnMeta.template && typeof columnMeta.template !== 'function' ? columnMeta.template : cell.getValue();
181
181
  const allRows = table.getRowModel().flatRows;
182
182
  const rowNumber = allRows.findIndex(it => it.id === cell.row.id);
@@ -37,7 +37,7 @@ const TableBodyCellRowGroup = props => {
37
37
  // const tooltipContent = (isOpenTooltip === false || columnMeta.type === 'checkbox') ? '' : flexRender(cell.column.columnDef.cell, cell.getContext());
38
38
  const tooltipContent = isOpenTooltip === false ? '' : columnMeta?.tooltipDescription ? typeof columnMeta.tooltipDescription === 'function' ? columnMeta.tooltipDescription({
39
39
  value: cell.getValue(),
40
- record
40
+ rowData: record
41
41
  }) : columnMeta.tooltipDescription : columnMeta.template && typeof columnMeta.template !== 'function' ? columnMeta.template : cell.getValue();
42
42
  const allRows = table.getRowModel().flatRows;
43
43
  const rowNumber = allRows.findIndex(it => it.id === cell.row.id);
@@ -125,7 +125,7 @@ export type ColumnTable<RecordType = AnyObject> = {
125
125
  showTooltip?: boolean;
126
126
  tooltipDescription?: string | ((args: {
127
127
  value: any;
128
- record: RecordType;
128
+ rowData: RecordType;
129
129
  }) => ReactNode | ReactElement);
130
130
  headerTemplate?: React.ReactNode | React.ReactElement | ((column: ColumnTable<RecordType>) => React.ReactNode | React.ReactElement);
131
131
  commandItems?: CommandItem[];
@@ -287,7 +287,7 @@ export type ExpandableConfig<RecordType> = {
287
287
  columnTitle?: React.ReactNode;
288
288
  expandRowByClick?: boolean;
289
289
  expandIcon?: RenderExpandIcon<RecordType>;
290
- onExpand?: (expanded: boolean, record: RecordType) => void;
290
+ onExpand?: (expanded: boolean, rowData: RecordType) => void;
291
291
  onExpandedRowsChange?: (expandedKeys: readonly Key[]) => void;
292
292
  defaultExpandAllRows?: boolean;
293
293
  expandIconColumnIndex?: number;
@@ -295,17 +295,17 @@ export type ExpandableConfig<RecordType> = {
295
295
  showExpandColumn?: boolean;
296
296
  expandedRowClassName?: string | RowClassName<RecordType>;
297
297
  childrenColumnName?: string;
298
- rowExpandable?: (record: RecordType) => boolean;
298
+ rowExpandable?: (rowData: RecordType) => boolean;
299
299
  };
300
300
  export type RenderExpandIcon<RecordType> = (props: RenderExpandIconProps<RecordType>) => React.ReactNode;
301
301
  export interface RenderExpandIconProps<RecordType> {
302
302
  prefixCls: string;
303
303
  expanded: boolean;
304
- record: RecordType;
304
+ rowData: RecordType;
305
305
  expandable: boolean;
306
306
  onExpand: TriggerEventHandler<RecordType>;
307
307
  }
308
- export type TriggerEventHandler<RecordType> = (record: RecordType, event: React.MouseEvent<HTMLElement>) => void;
308
+ export type TriggerEventHandler<RecordType> = (rowData: RecordType, event: React.MouseEvent<HTMLElement>) => void;
309
309
  export type RowClassName<RecordType> = (record: RecordType, index: number, indent: number) => string;
310
310
  export type ExpandedRowRender<ValueType> = (record: ValueType, index: number, indent: number, expanded: boolean) => React.ReactNode;
311
311
  export type CommandClick<T> = {
@@ -203,7 +203,7 @@ const TableBodyCell = props => {
203
203
  // const tooltipContent = (isOpenTooltip === false || columnMeta.type === 'checkbox') ? '' : flexRender(cell.column.columnDef.cell, cell.getContext());
204
204
  const tooltipContent = isOpenTooltip === false ? '' : columnMeta?.tooltipDescription ? typeof columnMeta.tooltipDescription === 'function' ? columnMeta.tooltipDescription({
205
205
  value: cell.getValue(),
206
- record
206
+ rowData: record
207
207
  }) : columnMeta.tooltipDescription : columnMeta.template && typeof columnMeta.template !== 'function' ? columnMeta.template : cell.getValue();
208
208
  const allRows = table.getRowModel().flatRows;
209
209
  const rowNumber = allRows.findIndex(it => it.id === cell.row.id);
@@ -250,7 +250,7 @@ const TableBodyCellEdit = props => {
250
250
  const message = rowError && rowError[cell.column.id]?.field === cell.column.id ? rowError[cell.column.id].message : undefined;
251
251
  const tooltipContent = isOpenTooltip === false ? '' : columnMeta?.tooltipDescription ? typeof columnMeta.tooltipDescription === 'function' ? columnMeta.tooltipDescription({
252
252
  value: cell.getValue(),
253
- record
253
+ rowData: record
254
254
  }) : columnMeta.tooltipDescription : columnMeta.template && typeof columnMeta.template !== 'function' ? columnMeta.template : cell.getValue();
255
255
  const canEdit = (0, _utils.isEditable)(cell.column.columnDef.meta, record) && isRowEditable !== false;
256
256
 
@@ -37,7 +37,7 @@ const TableBodyCellEmpty = props => {
37
37
  // const tooltipContent = (isOpenTooltip === false || columnMeta.type === 'checkbox') ? '' : flexRender(cell.column.columnDef.cell, cell.getContext());
38
38
  const tooltipContent = isOpenTooltip === false ? '' : columnMeta?.tooltipDescription ? typeof columnMeta.tooltipDescription === 'function' ? columnMeta.tooltipDescription({
39
39
  value: cell.getValue(),
40
- record
40
+ rowData: record
41
41
  }) : columnMeta.tooltipDescription : columnMeta.template && typeof columnMeta.template !== 'function' ? columnMeta.template : cell.getValue();
42
42
  const allRows = table.getRowModel().flatRows;
43
43
  const rowNumber = allRows.findIndex(it => it.id === cell.row.id);
@@ -197,7 +197,7 @@ const TableBodyCell = props => {
197
197
  // const tooltipContent = (isOpenTooltip === false || columnMeta.type === 'checkbox') ? '' : flexRender(cell.column.columnDef.cell, cell.getContext());
198
198
  const tooltipContent = isOpenTooltip === false ? '' : columnMeta?.tooltipDescription ? typeof columnMeta.tooltipDescription === 'function' ? columnMeta.tooltipDescription({
199
199
  value: cell.getValue(),
200
- record
200
+ rowData: record
201
201
  }) : columnMeta.tooltipDescription : columnMeta.template && typeof columnMeta.template !== 'function' ? columnMeta.template : cell.getValue();
202
202
  const allRows = table.getRowModel().flatRows;
203
203
  const rowNumber = allRows.findIndex(it => it.id === cell.row.id);
@@ -189,7 +189,7 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
189
189
  showTooltip?: boolean;
190
190
  tooltipDescription?: string | ((args: {
191
191
  value: any;
192
- record: RecordType;
192
+ rowData: RecordType;
193
193
  }) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
194
194
  headerTemplate?: import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | ((column: ColumnTable<RecordType>) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
195
195
  commandItems?: import("./../../grid-component/type").CommandItem[];
@@ -195,7 +195,7 @@ const TableBodyCell = props => {
195
195
  // const tooltipContent = (isOpenTooltip === false || columnMeta.type === 'checkbox') ? '' : flexRender(cell.column.columnDef.cell, cell.getContext());
196
196
  const tooltipContent = isOpenTooltip === false ? '' : columnMeta?.tooltipDescription ? typeof columnMeta.tooltipDescription === 'function' ? columnMeta.tooltipDescription({
197
197
  value: cell.getValue(),
198
- record
198
+ rowData: record
199
199
  }) : columnMeta.tooltipDescription : columnMeta.template && typeof columnMeta.template !== 'function' ? columnMeta.template : cell.getValue();
200
200
  const allRows = table.getRowModel().flatRows;
201
201
  const rowNumber = allRows.findIndex(it => it.id === cell.row.id);
@@ -249,7 +249,7 @@ const TableBodyCellEdit = props => {
249
249
  const message = rowError && rowError[cell.column.id]?.field === cell.column.id ? rowError[cell.column.id].message : undefined;
250
250
  const tooltipContent = isOpenTooltip === false ? '' : columnMeta?.tooltipDescription ? typeof columnMeta.tooltipDescription === 'function' ? columnMeta.tooltipDescription({
251
251
  value: cell.getValue(),
252
- record
252
+ rowData: record
253
253
  }) : columnMeta.tooltipDescription : columnMeta.template && typeof columnMeta.template !== 'function' ? columnMeta.template : cell.getValue();
254
254
  const canEdit = (0, _utils.isEditable)(cell.column.columnDef.meta, record) && isRowEditable !== false;
255
255
 
@@ -183,7 +183,7 @@ const TableBodyCell = props => {
183
183
  // const tooltipContent = (isOpenTooltip === false || columnMeta.type === 'checkbox') ? '' : flexRender(cell.column.columnDef.cell, cell.getContext());
184
184
  const tooltipContent = isOpenTooltip === false ? '' : columnMeta?.tooltipDescription ? typeof columnMeta.tooltipDescription === 'function' ? columnMeta.tooltipDescription({
185
185
  value: cell.getValue(),
186
- record
186
+ rowData: record
187
187
  }) : columnMeta.tooltipDescription : columnMeta.template && typeof columnMeta.template !== 'function' ? columnMeta.template : cell.getValue();
188
188
  const allRows = table.getRowModel().flatRows;
189
189
  const rowNumber = allRows.findIndex(it => it.id === cell.row.id);
@@ -44,7 +44,7 @@ const TableBodyCellRowGroup = props => {
44
44
  // const tooltipContent = (isOpenTooltip === false || columnMeta.type === 'checkbox') ? '' : flexRender(cell.column.columnDef.cell, cell.getContext());
45
45
  const tooltipContent = isOpenTooltip === false ? '' : columnMeta?.tooltipDescription ? typeof columnMeta.tooltipDescription === 'function' ? columnMeta.tooltipDescription({
46
46
  value: cell.getValue(),
47
- record
47
+ rowData: record
48
48
  }) : columnMeta.tooltipDescription : columnMeta.template && typeof columnMeta.template !== 'function' ? columnMeta.template : cell.getValue();
49
49
  const allRows = table.getRowModel().flatRows;
50
50
  const rowNumber = allRows.findIndex(it => it.id === cell.row.id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "es-grid-template",
3
- "version": "1.8.74",
3
+ "version": "1.8.75",
4
4
  "description": "es-grid-template",
5
5
  "keywords": [
6
6
  "react",