@lavalogic/scoria 0.3.3 → 0.3.5
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.
|
@@ -14,7 +14,7 @@ export class ColumnDef {
|
|
|
14
14
|
this.resizable = $derived(props.resizable ?? true);
|
|
15
15
|
this.header = $derived(props.header);
|
|
16
16
|
this._filterValueType = $derived(props.filterValueType);
|
|
17
|
-
this.
|
|
17
|
+
this._getDisplayValue = $derived(props.getDisplayValue);
|
|
18
18
|
}
|
|
19
19
|
id;
|
|
20
20
|
_index;
|
|
@@ -18,6 +18,13 @@ import { ActionsDef } from '../Columns/Definitions/Actions/ActionsDef.svelte.js'
|
|
|
18
18
|
import { BubbleDef } from '../Columns/Definitions/Display/BubbleDef.svelte.js';
|
|
19
19
|
const SORTING_ICON_WIDTH = 24;
|
|
20
20
|
const InternalSymbol = Symbol();
|
|
21
|
+
const uncopyableColumns = new Set([
|
|
22
|
+
ColumnType.RowSelect,
|
|
23
|
+
ColumnType.Expand,
|
|
24
|
+
ColumnType.Actions,
|
|
25
|
+
ColumnType.FilterOnly,
|
|
26
|
+
ColumnType.Custom
|
|
27
|
+
]);
|
|
21
28
|
export class TableContext {
|
|
22
29
|
defaultColumnDefs;
|
|
23
30
|
tableName;
|
|
@@ -1633,10 +1640,7 @@ export class TableContext {
|
|
|
1633
1640
|
}
|
|
1634
1641
|
return ('index' in it &&
|
|
1635
1642
|
this.columnVisibility[it.id] !== false &&
|
|
1636
|
-
(it.columnType
|
|
1637
|
-
it.columnType === 'Accessor' ||
|
|
1638
|
-
//only include it if it returns some kind of tangible value instead of a custom component
|
|
1639
|
-
('accessorFn' in it && typeof it.accessorFn?.(this.sortedData[0], 0) != 'function')));
|
|
1643
|
+
!uncopyableColumns.has(it.columnType));
|
|
1640
1644
|
};
|
|
1641
1645
|
_updateLocalStorageSettings() {
|
|
1642
1646
|
const isCompact = this.isCompact;
|
|
@@ -1749,6 +1753,9 @@ export class TableContext {
|
|
|
1749
1753
|
targetRow.push(key !== undefined && this.selectedItems.has(key) ? 'true' : 'false');
|
|
1750
1754
|
continue;
|
|
1751
1755
|
}
|
|
1756
|
+
if (uncopyableColumns.has(col.columnType)) {
|
|
1757
|
+
continue;
|
|
1758
|
+
}
|
|
1752
1759
|
const x = (await col.getDisplayValue?.(item, this.sortedData.lastIndexOf(item))) ||
|
|
1753
1760
|
('accessorFn' in col && (await col.accessorFn?.(item, this.sortedData.indexOf(item))));
|
|
1754
1761
|
if (x && typeof x === 'string') {
|
|
@@ -1814,7 +1821,7 @@ export class TableContext {
|
|
|
1814
1821
|
const colLength = affectedColumns.length;
|
|
1815
1822
|
for (let colIndex = 0; colIndex < colLength; colIndex++) {
|
|
1816
1823
|
const col = affectedColumns[colIndex];
|
|
1817
|
-
if (col.columnType
|
|
1824
|
+
if (uncopyableColumns.has(col.columnType)) {
|
|
1818
1825
|
targetRow.push(key !== undefined && this.selectedItems.has(key) ? 'true' : 'false');
|
|
1819
1826
|
continue;
|
|
1820
1827
|
}
|