@shival99/z-ui 2.0.60 → 2.0.62
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/fesm2022/shival99-z-ui-components-z-table.mjs +28 -3
- package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
- package/package.json +1 -1
- package/types/shival99-z-ui-components-z-calendar.d.ts +4 -4
- package/types/shival99-z-ui-components-z-select.d.ts +1 -1
- package/types/shival99-z-ui-components-z-table.d.ts +2 -0
|
@@ -5287,8 +5287,7 @@ class ZTableComponent {
|
|
|
5287
5287
|
cellSelectionOptions = computed(() => {
|
|
5288
5288
|
const config = this.zConfig().cellSelection;
|
|
5289
5289
|
if (config === false || config === undefined) {
|
|
5290
|
-
return { enabled:
|
|
5291
|
-
// return { enabled: false, range: false, contextMenu: false, copyWithHeaders: false };
|
|
5290
|
+
return { enabled: false, range: false, contextMenu: false, copyWithHeaders: false };
|
|
5292
5291
|
}
|
|
5293
5292
|
if (config === true) {
|
|
5294
5293
|
return { enabled: true, range: true, contextMenu: true, copyWithHeaders: true };
|
|
@@ -7648,6 +7647,7 @@ class ZTableComponent {
|
|
|
7648
7647
|
return;
|
|
7649
7648
|
}
|
|
7650
7649
|
const text = this._getContentEditClipboardText(menu.row.id, menu.columnId) ??
|
|
7650
|
+
this._getRenderedCellClipboardValue(menu.row.id, menu.columnId) ??
|
|
7651
7651
|
this._formatCellClipboardValue(menu.row.getValue(menu.columnId));
|
|
7652
7652
|
void this._writeClipboardText(text);
|
|
7653
7653
|
this.contentRowMenuControl()?.closeImmediate();
|
|
@@ -7997,7 +7997,8 @@ class ZTableComponent {
|
|
|
7997
7997
|
if (!this._isSelectableCell(row, columnId)) {
|
|
7998
7998
|
return '';
|
|
7999
7999
|
}
|
|
8000
|
-
return this.
|
|
8000
|
+
return (this._getRenderedCellClipboardValue(row.id, columnId) ??
|
|
8001
|
+
this._formatCellClipboardValue(row.getValue(columnId)));
|
|
8001
8002
|
})
|
|
8002
8003
|
.join('\t'));
|
|
8003
8004
|
}
|
|
@@ -8063,6 +8064,30 @@ class ZTableComponent {
|
|
|
8063
8064
|
}
|
|
8064
8065
|
return String(value).replace(/\r?\n/g, ' ');
|
|
8065
8066
|
}
|
|
8067
|
+
_getRenderedCellClipboardValue(rowId, columnId) {
|
|
8068
|
+
const cell = this._getRenderedBodyCell(rowId, columnId);
|
|
8069
|
+
if (!cell) {
|
|
8070
|
+
return null;
|
|
8071
|
+
}
|
|
8072
|
+
const renderedText = cell.innerText || cell.textContent || '';
|
|
8073
|
+
return this._formatCellClipboardValue(renderedText.replace(/\u00a0/g, ' ').trim()).replace(/[ \t]+/g, ' ');
|
|
8074
|
+
}
|
|
8075
|
+
_getRenderedBodyCell(rowId, columnId) {
|
|
8076
|
+
const rows = Array.from(this._host.nativeElement.querySelectorAll('tbody tr[data-row-id]'));
|
|
8077
|
+
for (const row of rows) {
|
|
8078
|
+
if (row.getAttribute('data-row-id') !== rowId) {
|
|
8079
|
+
continue;
|
|
8080
|
+
}
|
|
8081
|
+
const cells = Array.from(row.querySelectorAll('td[data-column-id]'));
|
|
8082
|
+
for (const cell of cells) {
|
|
8083
|
+
if (cell.getAttribute('data-column-id') === columnId) {
|
|
8084
|
+
return cell instanceof HTMLElement ? cell : null;
|
|
8085
|
+
}
|
|
8086
|
+
}
|
|
8087
|
+
return null;
|
|
8088
|
+
}
|
|
8089
|
+
return null;
|
|
8090
|
+
}
|
|
8066
8091
|
_getColumnCopyHeader(columnId) {
|
|
8067
8092
|
const columnConfig = this._findColumnConfig(columnId);
|
|
8068
8093
|
const header = columnConfig?.header;
|