es-grid-template 1.9.15 → 1.9.16

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.
@@ -208,9 +208,9 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
208
208
  ellipsis?: boolean;
209
209
  allowResizing?: boolean;
210
210
  allowSelection?: boolean | ((rowData: RecordType) => boolean);
211
- onCellStyles?: Omit<CSSProperties, "position" | "left" | "right" | "width" | "display" | "minWidth"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "position" | "left" | "right" | "width" | "display" | "minWidth">);
212
- onCellHeaderStyles?: Omit<CSSProperties, "position" | "left" | "right" | "width" | "display" | "minWidth"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "position" | "left" | "right" | "width" | "display" | "minWidth">);
213
- onCellFooterStyles?: Omit<CSSProperties, "position" | "left" | "right" | "width" | "display" | "minWidth"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "position" | "left" | "right" | "width" | "display" | "minWidth">);
211
+ onCellStyles?: Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position">);
212
+ onCellHeaderStyles?: Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position">);
213
+ onCellFooterStyles?: Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position">);
214
214
  sumGroup?: boolean;
215
215
  getValue?: (row: any, rowIndex: number) => any;
216
216
  getCellProps?: (value: any, row: any, rowIndex: number) => import("./../../grid-component/type").CellProps;
@@ -37,7 +37,7 @@ const TableHeadCell = props => {
37
37
  const column = header.column.columnDef;
38
38
  const originalColumn = header.column.columnDef.meta ?? {};
39
39
  const filtered = (header.column.getFilterValue() ?? []).length > 0;
40
- const cellContent = originalColumn.headerTemplate ? originalColumn.headerTemplate : t ? t(originalColumn.headerText) : originalColumn.headerText;
40
+ const cellContent = typeof originalColumn.headerTemplate === 'function' ? originalColumn.headerTemplate(originalColumn) : originalColumn.headerTemplate ?? (t ? t(originalColumn.headerText) : originalColumn.headerText);
41
41
  const headerCustomTooltip = originalColumn.headerTooltip ?? (t ? t(originalColumn.headerText) : originalColumn.headerText);
42
42
 
43
43
  // const filtered = header.column.getIsFiltered()
@@ -58,7 +58,10 @@ const TableHeadCell2 = props => {
58
58
  const fieldOriginal = fieldOriginalKey ? visibleCols.find(it => it.id === fieldOriginalKey) : undefined;
59
59
  const cellStyles = typeof originalColumn.onCellHeaderStyles === 'function' ? originalColumn.onCellHeaderStyles(header) : originalColumn.onCellHeaderStyles;
60
60
  const filtered = ((fieldOriginal ? fieldOriginal.getFilterValue() : column.getFilterValue()) ?? []).length > 0;
61
- const cellContent = originalColumn.headerTemplate ? originalColumn.headerTemplate : t ? t(originalColumn.headerText) : originalColumn.headerText;
61
+
62
+ // const cellContent = originalColumn.headerTemplate ? originalColumn.headerTemplate : (t ? t(originalColumn.headerText) : originalColumn.headerText)
63
+
64
+ const cellContent = typeof originalColumn.headerTemplate === 'function' ? originalColumn.headerTemplate(originalColumn) : originalColumn.headerTemplate ?? (t ? t(originalColumn.headerText) : originalColumn.headerText);
62
65
  const headerCustomTooltip = originalColumn?.headerTooltip ?? (t ? t(originalColumn?.headerText) : originalColumn?.headerText);
63
66
  const style = {
64
67
  transition: 'width transform 0.2s ease-in-out',
@@ -25,7 +25,10 @@ const TableHeadGroupCell = props => {
25
25
  const isFirstRightPinnedColumn = isPinned === 'right' && column.getIsFirstColumn('right');
26
26
  const originalColumn = column.columnDef.meta ?? {};
27
27
  const cellStyles = typeof originalColumn.onCellHeaderStyles === 'function' ? originalColumn.onCellHeaderStyles(header) : originalColumn.onCellHeaderStyles;
28
- const cellContent = originalColumn.headerTemplate ? originalColumn.headerTemplate : t ? t(originalColumn.headerText) : originalColumn.headerText;
28
+
29
+ // const cellContent = originalColumn.headerTemplate ? originalColumn.headerTemplate : (t ? t(originalColumn.headerText) : originalColumn.headerText)
30
+
31
+ const cellContent = typeof originalColumn.headerTemplate === 'function' ? originalColumn.headerTemplate(originalColumn) : originalColumn.headerTemplate ?? (t ? t(originalColumn.headerText) : originalColumn.headerText);
29
32
  const headerCustomTooltip = originalColumn?.headerTooltip ?? (t ? t(originalColumn?.headerText) : originalColumn?.headerText);
30
33
  const style = {
31
34
  transition: 'width transform 0.2s ease-in-out',
@@ -46,7 +46,7 @@ const TableHeadCell = props => {
46
46
  const column = header.column.columnDef;
47
47
  const originalColumn = header.column.columnDef.meta ?? {};
48
48
  const filtered = (header.column.getFilterValue() ?? []).length > 0;
49
- const cellContent = originalColumn.headerTemplate ? originalColumn.headerTemplate : t ? t(originalColumn.headerText) : originalColumn.headerText;
49
+ const cellContent = typeof originalColumn.headerTemplate === 'function' ? originalColumn.headerTemplate(originalColumn) : originalColumn.headerTemplate ?? (t ? t(originalColumn.headerText) : originalColumn.headerText);
50
50
  const headerCustomTooltip = originalColumn.headerTooltip ?? (t ? t(originalColumn.headerText) : originalColumn.headerText);
51
51
 
52
52
  // const filtered = header.column.getIsFiltered()
@@ -67,7 +67,10 @@ const TableHeadCell2 = props => {
67
67
  const fieldOriginal = fieldOriginalKey ? visibleCols.find(it => it.id === fieldOriginalKey) : undefined;
68
68
  const cellStyles = typeof originalColumn.onCellHeaderStyles === 'function' ? originalColumn.onCellHeaderStyles(header) : originalColumn.onCellHeaderStyles;
69
69
  const filtered = ((fieldOriginal ? fieldOriginal.getFilterValue() : column.getFilterValue()) ?? []).length > 0;
70
- const cellContent = originalColumn.headerTemplate ? originalColumn.headerTemplate : t ? t(originalColumn.headerText) : originalColumn.headerText;
70
+
71
+ // const cellContent = originalColumn.headerTemplate ? originalColumn.headerTemplate : (t ? t(originalColumn.headerText) : originalColumn.headerText)
72
+
73
+ const cellContent = typeof originalColumn.headerTemplate === 'function' ? originalColumn.headerTemplate(originalColumn) : originalColumn.headerTemplate ?? (t ? t(originalColumn.headerText) : originalColumn.headerText);
71
74
  const headerCustomTooltip = originalColumn?.headerTooltip ?? (t ? t(originalColumn?.headerText) : originalColumn?.headerText);
72
75
  const style = {
73
76
  transition: 'width transform 0.2s ease-in-out',
@@ -34,7 +34,10 @@ const TableHeadGroupCell = props => {
34
34
  const isFirstRightPinnedColumn = isPinned === 'right' && column.getIsFirstColumn('right');
35
35
  const originalColumn = column.columnDef.meta ?? {};
36
36
  const cellStyles = typeof originalColumn.onCellHeaderStyles === 'function' ? originalColumn.onCellHeaderStyles(header) : originalColumn.onCellHeaderStyles;
37
- const cellContent = originalColumn.headerTemplate ? originalColumn.headerTemplate : t ? t(originalColumn.headerText) : originalColumn.headerText;
37
+
38
+ // const cellContent = originalColumn.headerTemplate ? originalColumn.headerTemplate : (t ? t(originalColumn.headerText) : originalColumn.headerText)
39
+
40
+ const cellContent = typeof originalColumn.headerTemplate === 'function' ? originalColumn.headerTemplate(originalColumn) : originalColumn.headerTemplate ?? (t ? t(originalColumn.headerText) : originalColumn.headerText);
38
41
  const headerCustomTooltip = originalColumn?.headerTooltip ?? (t ? t(originalColumn?.headerText) : originalColumn?.headerText);
39
42
  const style = {
40
43
  transition: 'width transform 0.2s ease-in-out',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "es-grid-template",
3
- "version": "1.9.15",
3
+ "version": "1.9.16",
4
4
  "description": "es-grid-template",
5
5
  "keywords": [
6
6
  "react",