es-grid-template 1.9.41 → 1.9.43
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/TableContainer.js +1 -1
- package/es/table-virtuoso/body/TableBodyCell.js +3 -3
- package/es/table-virtuoso/body/TableBodyRow.js +6 -1
- package/lib/table-component/TableContainer.js +1 -1
- package/lib/table-virtuoso/body/TableBodyCell.js +3 -3
- package/lib/table-virtuoso/body/TableBodyRow.js +6 -1
- package/package.json +1 -1
|
@@ -194,10 +194,10 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
|
|
|
194
194
|
value: any;
|
|
195
195
|
rowData: RecordType;
|
|
196
196
|
}) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode);
|
|
197
|
-
onCellStyles?: Omit<CSSProperties, "
|
|
198
|
-
onCellHeaderStyles?: Omit<CSSProperties, "
|
|
197
|
+
onCellStyles?: Omit<CSSProperties, "position" | "display" | "width" | "minWidth" | "left" | "right"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "position" | "display" | "width" | "minWidth" | "left" | "right">);
|
|
198
|
+
onCellHeaderStyles?: Omit<CSSProperties, "position" | "display" | "width" | "minWidth" | "left" | "right"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "position" | "display" | "width" | "minWidth" | "left" | "right">);
|
|
199
199
|
onCell?: (rowData: RecordType, index: number) => import("react").TdHTMLAttributes<HTMLTableCellElement>;
|
|
200
|
-
onCellFooterStyles?: Omit<CSSProperties, "
|
|
200
|
+
onCellFooterStyles?: Omit<CSSProperties, "position" | "display" | "width" | "minWidth" | "left" | "right"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "position" | "display" | "width" | "minWidth" | "left" | "right">);
|
|
201
201
|
getValue?: (row: any, rowIndex: number) => any;
|
|
202
202
|
getCellProps?: (value: any, row: any, rowIndex: number) => import("./../../grid-component/type").CellProps;
|
|
203
203
|
headerCellProps?: import("./../../grid-component/type").CellProps;
|
|
@@ -200,7 +200,7 @@ const TableContainer = props => {
|
|
|
200
200
|
if (!toolbarItems) {
|
|
201
201
|
return undefined;
|
|
202
202
|
}
|
|
203
|
-
return toolbarItems.filter(it => it.position !== 'Bottom' && it.fixedRight !==
|
|
203
|
+
return toolbarItems.filter(it => it.position !== 'Bottom' && it.fixedRight !== true);
|
|
204
204
|
}, [toolbarItems]);
|
|
205
205
|
const toolbarItemBottom = React.useMemo(() => {
|
|
206
206
|
if (!toolbarItems) {
|
|
@@ -244,7 +244,7 @@ const TableBodyCell = props => {
|
|
|
244
244
|
className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-collapsed"
|
|
245
245
|
})) : /*#__PURE__*/React.createElement("span", {
|
|
246
246
|
className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-spaced"
|
|
247
|
-
}))), isLastLeftPinnedColumn ? /*#__PURE__*/React.createElement("span", {
|
|
247
|
+
}))), isLastLeftPinnedColumn || isFirstRightPinnedColumn ? /*#__PURE__*/React.createElement("span", {
|
|
248
248
|
className: "ui-rc_cell-content"
|
|
249
249
|
}, renderCellIndex({
|
|
250
250
|
cell,
|
|
@@ -258,7 +258,7 @@ const TableBodyCell = props => {
|
|
|
258
258
|
return /*#__PURE__*/React.createElement("td", {
|
|
259
259
|
key: cell.id,
|
|
260
260
|
className: classNames(`${prefix}-grid-cell ${prefix}-grid-cell-command`, {
|
|
261
|
-
[`${prefix}-grid-cell-ellipsis`]: true,
|
|
261
|
+
[`${prefix}-grid-cell-ellipsis`]: true && !isLastLeftPinnedColumn && !isFirstRightPinnedColumn,
|
|
262
262
|
[`${prefix}-grid-cell-fix-left-last`]: isLastLeftPinnedColumn,
|
|
263
263
|
[`${prefix}-grid-cell-fix-right-first`]: isFirstRightPinnedColumn,
|
|
264
264
|
[`${prefix}-grid-cell-text-center`]: columnMeta?.textAlign === 'center',
|
|
@@ -340,7 +340,7 @@ const TableBodyCell = props => {
|
|
|
340
340
|
className: classNames(`${prefix}-grid-cell`, {
|
|
341
341
|
// [`${prefix}-grid-cell-ellipsis`]: true,
|
|
342
342
|
|
|
343
|
-
[`${prefix}-grid-cell-ellipsis`]: !isLastLeftPinnedColumn && !wrapSettings || !(wrapSettings && (wrapSettings.wrapMode === 'Both' || wrapSettings.wrapMode === 'Content')),
|
|
343
|
+
[`${prefix}-grid-cell-ellipsis`]: !isLastLeftPinnedColumn && !isFirstRightPinnedColumn && (!wrapSettings || !(wrapSettings && (wrapSettings.wrapMode === 'Both' || wrapSettings.wrapMode === 'Content'))),
|
|
344
344
|
[`${prefix}-grid-cell-text-wrap`]: wrapSettings && (wrapSettings.wrapMode === 'Both' || wrapSettings.wrapMode === 'Content'),
|
|
345
345
|
// [`${prefix}-grid-cell-selected`]: isCellSelected,
|
|
346
346
|
|
|
@@ -83,7 +83,12 @@ const TableBodyRow = ({
|
|
|
83
83
|
const firstNonGroupColumn = nonGroupColumns[0];
|
|
84
84
|
|
|
85
85
|
// const colSpan = row.subRows && cell.column.id === firstNonGroupColumn?.id ? (groupSetting?.groupColumnSpan ?? 2)
|
|
86
|
-
|
|
86
|
+
|
|
87
|
+
// const colSpanGroup = row.subRows && row.subRows.length > 0 && cell.column.id === firstNonGroupColumn?.column.id ? (groupSetting?.groupColumnSpan ?? 2) : (row.subRows && nonGroupColumns[1].column.id === cell.column.id ? 0 : 1)
|
|
88
|
+
|
|
89
|
+
const groupColumnSpan = groupSetting?.groupColumnSpan ?? 2;
|
|
90
|
+
const hiddenGroupColumns = new Set(nonGroupColumns.slice(1, groupColumnSpan).map(col => col.column.id));
|
|
91
|
+
const colSpanGroup = row.subRows?.length > 0 ? cell.column.id === firstNonGroupColumn?.column.id ? groupColumnSpan : hiddenGroupColumns.has(cell.column.id) ? 0 : 1 : 1;
|
|
87
92
|
|
|
88
93
|
// if (row.subRows && row.subRows.length > 0 && colSpanGroup === 0 || onCellRowSpan === 0 || onCellColSpan === 0) {
|
|
89
94
|
if (row.subRows && row.getCanExpand() && colSpanGroup === 0 || onCellRowSpan === 0 || onCellColSpan === 0) {
|
|
@@ -207,7 +207,7 @@ const TableContainer = props => {
|
|
|
207
207
|
if (!toolbarItems) {
|
|
208
208
|
return undefined;
|
|
209
209
|
}
|
|
210
|
-
return toolbarItems.filter(it => it.position !== 'Bottom' && it.fixedRight !==
|
|
210
|
+
return toolbarItems.filter(it => it.position !== 'Bottom' && it.fixedRight !== true);
|
|
211
211
|
}, [toolbarItems]);
|
|
212
212
|
const toolbarItemBottom = _react.default.useMemo(() => {
|
|
213
213
|
if (!toolbarItems) {
|
|
@@ -251,7 +251,7 @@ const TableBodyCell = props => {
|
|
|
251
251
|
className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-collapsed"
|
|
252
252
|
})) : /*#__PURE__*/_react.default.createElement("span", {
|
|
253
253
|
className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-spaced"
|
|
254
|
-
}))), isLastLeftPinnedColumn ? /*#__PURE__*/_react.default.createElement("span", {
|
|
254
|
+
}))), isLastLeftPinnedColumn || isFirstRightPinnedColumn ? /*#__PURE__*/_react.default.createElement("span", {
|
|
255
255
|
className: "ui-rc_cell-content"
|
|
256
256
|
}, renderCellIndex({
|
|
257
257
|
cell,
|
|
@@ -265,7 +265,7 @@ const TableBodyCell = props => {
|
|
|
265
265
|
return /*#__PURE__*/_react.default.createElement("td", {
|
|
266
266
|
key: cell.id,
|
|
267
267
|
className: (0, _classnames.default)(`${prefix}-grid-cell ${prefix}-grid-cell-command`, {
|
|
268
|
-
[`${prefix}-grid-cell-ellipsis`]: true,
|
|
268
|
+
[`${prefix}-grid-cell-ellipsis`]: true && !isLastLeftPinnedColumn && !isFirstRightPinnedColumn,
|
|
269
269
|
[`${prefix}-grid-cell-fix-left-last`]: isLastLeftPinnedColumn,
|
|
270
270
|
[`${prefix}-grid-cell-fix-right-first`]: isFirstRightPinnedColumn,
|
|
271
271
|
[`${prefix}-grid-cell-text-center`]: columnMeta?.textAlign === 'center',
|
|
@@ -347,7 +347,7 @@ const TableBodyCell = props => {
|
|
|
347
347
|
className: (0, _classnames.default)(`${prefix}-grid-cell`, {
|
|
348
348
|
// [`${prefix}-grid-cell-ellipsis`]: true,
|
|
349
349
|
|
|
350
|
-
[`${prefix}-grid-cell-ellipsis`]: !isLastLeftPinnedColumn && !wrapSettings || !(wrapSettings && (wrapSettings.wrapMode === 'Both' || wrapSettings.wrapMode === 'Content')),
|
|
350
|
+
[`${prefix}-grid-cell-ellipsis`]: !isLastLeftPinnedColumn && !isFirstRightPinnedColumn && (!wrapSettings || !(wrapSettings && (wrapSettings.wrapMode === 'Both' || wrapSettings.wrapMode === 'Content'))),
|
|
351
351
|
[`${prefix}-grid-cell-text-wrap`]: wrapSettings && (wrapSettings.wrapMode === 'Both' || wrapSettings.wrapMode === 'Content'),
|
|
352
352
|
// [`${prefix}-grid-cell-selected`]: isCellSelected,
|
|
353
353
|
|
|
@@ -90,7 +90,12 @@ const TableBodyRow = ({
|
|
|
90
90
|
const firstNonGroupColumn = nonGroupColumns[0];
|
|
91
91
|
|
|
92
92
|
// const colSpan = row.subRows && cell.column.id === firstNonGroupColumn?.id ? (groupSetting?.groupColumnSpan ?? 2)
|
|
93
|
-
|
|
93
|
+
|
|
94
|
+
// const colSpanGroup = row.subRows && row.subRows.length > 0 && cell.column.id === firstNonGroupColumn?.column.id ? (groupSetting?.groupColumnSpan ?? 2) : (row.subRows && nonGroupColumns[1].column.id === cell.column.id ? 0 : 1)
|
|
95
|
+
|
|
96
|
+
const groupColumnSpan = groupSetting?.groupColumnSpan ?? 2;
|
|
97
|
+
const hiddenGroupColumns = new Set(nonGroupColumns.slice(1, groupColumnSpan).map(col => col.column.id));
|
|
98
|
+
const colSpanGroup = row.subRows?.length > 0 ? cell.column.id === firstNonGroupColumn?.column.id ? groupColumnSpan : hiddenGroupColumns.has(cell.column.id) ? 0 : 1 : 1;
|
|
94
99
|
|
|
95
100
|
// if (row.subRows && row.subRows.length > 0 && colSpanGroup === 0 || onCellRowSpan === 0 || onCellColSpan === 0) {
|
|
96
101
|
if (row.subRows && row.getCanExpand() && colSpanGroup === 0 || onCellRowSpan === 0 || onCellColSpan === 0) {
|