@lavalogic/scoria 0.3.4 → 0.3.6

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.
@@ -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, //row select is a special case and is handled by tableContext
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 === undefined ||
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 === ColumnType.RowSelect) {
1824
+ if (uncopyableColumns.has(col.columnType)) {
1818
1825
  targetRow.push(key !== undefined && this.selectedItems.has(key) ? 'true' : 'false');
1819
1826
  continue;
1820
1827
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lavalogic/scoria",
3
3
  "description": "Svelte components used for the FloWMS Web Frontend",
4
- "version": "0.3.4",
4
+ "version": "0.3.6",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },