es-grid-template 1.9.14 → 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.
- package/es/group-component/hook/utils.d.ts +3 -3
- package/es/table-component/TableContainerEdit.js +4 -3
- package/es/table-component/header/TableHeadCell.js +1 -1
- package/es/table-component/header/TableHeadCell2.js +4 -1
- package/es/table-component/header/TableHeadGroupCell.js +4 -1
- package/lib/table-component/TableContainerEdit.js +4 -3
- package/lib/table-component/header/TableHeadCell.js +1 -1
- package/lib/table-component/header/TableHeadCell2.js +4 -1
- package/lib/table-component/header/TableHeadGroupCell.js +4 -1
- package/package.json +1 -1
|
@@ -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, "
|
|
212
|
-
onCellHeaderStyles?: Omit<CSSProperties, "
|
|
213
|
-
onCellFooterStyles?: Omit<CSSProperties, "
|
|
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;
|
|
@@ -132,7 +132,8 @@ const TableContainerEdit = props => {
|
|
|
132
132
|
rowClassName,
|
|
133
133
|
onRowStyles,
|
|
134
134
|
dataSourceFilter,
|
|
135
|
-
setIsExpandClick
|
|
135
|
+
setIsExpandClick,
|
|
136
|
+
...rest
|
|
136
137
|
} = props;
|
|
137
138
|
const [paginationLocal] = useLocale('Pagination');
|
|
138
139
|
const [tableLocal] = useLocale('Table');
|
|
@@ -2096,7 +2097,7 @@ const TableContainerEdit = props => {
|
|
|
2096
2097
|
dataSourceFilter,
|
|
2097
2098
|
setIsExpandClick
|
|
2098
2099
|
}
|
|
2099
|
-
}, /*#__PURE__*/React.createElement(TableWrapper, {
|
|
2100
|
+
}, /*#__PURE__*/React.createElement(TableWrapper, _extends({}, rest, {
|
|
2100
2101
|
contextMenuItems: contextMenuItems,
|
|
2101
2102
|
height: tableHeight,
|
|
2102
2103
|
minHeight: minHeight,
|
|
@@ -2120,7 +2121,7 @@ const TableContainerEdit = props => {
|
|
|
2120
2121
|
virtualPaddingRight: virtualPaddingRight,
|
|
2121
2122
|
fixedLeftColumns: fixedLeftColumns,
|
|
2122
2123
|
fixedRightColumns: fixedRightColumns
|
|
2123
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
2124
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
2124
2125
|
ref: bottomToolbarRef,
|
|
2125
2126
|
style: {
|
|
2126
2127
|
transition: 'max-height 0.3s ease'
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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',
|
|
@@ -139,7 +139,8 @@ const TableContainerEdit = props => {
|
|
|
139
139
|
rowClassName,
|
|
140
140
|
onRowStyles,
|
|
141
141
|
dataSourceFilter,
|
|
142
|
-
setIsExpandClick
|
|
142
|
+
setIsExpandClick,
|
|
143
|
+
...rest
|
|
143
144
|
} = props;
|
|
144
145
|
const [paginationLocal] = (0, _locale.useLocale)('Pagination');
|
|
145
146
|
const [tableLocal] = (0, _locale.useLocale)('Table');
|
|
@@ -2103,7 +2104,7 @@ const TableContainerEdit = props => {
|
|
|
2103
2104
|
dataSourceFilter,
|
|
2104
2105
|
setIsExpandClick
|
|
2105
2106
|
}
|
|
2106
|
-
}, /*#__PURE__*/_react.default.createElement(_TableWrapper.default, {
|
|
2107
|
+
}, /*#__PURE__*/_react.default.createElement(_TableWrapper.default, (0, _extends2.default)({}, rest, {
|
|
2107
2108
|
contextMenuItems: contextMenuItems,
|
|
2108
2109
|
height: tableHeight,
|
|
2109
2110
|
minHeight: minHeight,
|
|
@@ -2127,7 +2128,7 @@ const TableContainerEdit = props => {
|
|
|
2127
2128
|
virtualPaddingRight: virtualPaddingRight,
|
|
2128
2129
|
fixedLeftColumns: fixedLeftColumns,
|
|
2129
2130
|
fixedRightColumns: fixedRightColumns
|
|
2130
|
-
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
2131
|
+
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
2131
2132
|
ref: bottomToolbarRef,
|
|
2132
2133
|
style: {
|
|
2133
2134
|
transition: 'max-height 0.3s ease'
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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',
|