@lavalogic/scoria 0.3.6 → 0.4.0

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.
@@ -1175,10 +1175,11 @@ export class TableContext {
1175
1175
  const value = await (async () => {
1176
1176
  const selectColumns = new Map();
1177
1177
  for (let i = affectedColumns.length - 1; i > -1; i--) {
1178
- const col = affectedColumns[i];
1179
- if (col instanceof SelectDef) {
1178
+ const columnDef = affectedColumns[i];
1179
+ if (columnDef instanceof SelectDef) {
1180
1180
  const item = items[i];
1181
- selectColumns.set(i, await (col.getSpecificOptions?.(item, indicesByItem.get(item)) ?? col.getOptions()));
1181
+ selectColumns.set(i, await (columnDef.getSpecificOptions?.(item, indicesByItem.get(item)) ??
1182
+ columnDef.getOptions()));
1182
1183
  }
1183
1184
  }
1184
1185
  const separator = this.commaSeparatedCopy ? ',' : '\t';
@@ -1748,16 +1749,17 @@ export class TableContext {
1748
1749
  const targetRow = selectedCells[rowIndex];
1749
1750
  const colLength = affectedColumns.length;
1750
1751
  for (let colIndex = 0; colIndex < colLength; colIndex++) {
1751
- const col = affectedColumns[colIndex];
1752
- if (col instanceof RowSelectionDef) {
1752
+ const columnDef = affectedColumns[colIndex];
1753
+ if (columnDef instanceof RowSelectionDef) {
1753
1754
  targetRow.push(key !== undefined && this.selectedItems.has(key) ? 'true' : 'false');
1754
1755
  continue;
1755
1756
  }
1756
- if (uncopyableColumns.has(col.columnType)) {
1757
+ if (uncopyableColumns.has(columnDef.columnType)) {
1757
1758
  continue;
1758
1759
  }
1759
- const x = (await col.getDisplayValue?.(item, this.sortedData.lastIndexOf(item))) ||
1760
- ('accessorFn' in col && (await col.accessorFn?.(item, this.sortedData.indexOf(item))));
1760
+ const x = (await columnDef.getDisplayValue?.(item, this.sortedData.lastIndexOf(item))) ||
1761
+ ('accessorFn' in columnDef &&
1762
+ (await columnDef.accessorFn?.(item, this.sortedData.indexOf(item))));
1761
1763
  if (x && typeof x === 'string') {
1762
1764
  targetRow.push(x);
1763
1765
  continue;
@@ -1766,7 +1768,7 @@ export class TableContext {
1766
1768
  targetRow.push(x.join(', '));
1767
1769
  continue;
1768
1770
  }
1769
- const toCopy = col.id && col.id in item ? item[col.id] : null;
1771
+ const toCopy = columnDef.id && columnDef.id in item ? item[columnDef.id] : null;
1770
1772
  const y = toCopy && typeof toCopy === 'object' && toCopy instanceof Date
1771
1773
  ? toCopy.toLocaleDateString()
1772
1774
  : (toCopy?.toString() ?? '');
@@ -1820,13 +1822,17 @@ export class TableContext {
1820
1822
  const targetRow = selectedCells[rowIndex];
1821
1823
  const colLength = affectedColumns.length;
1822
1824
  for (let colIndex = 0; colIndex < colLength; colIndex++) {
1823
- const col = affectedColumns[colIndex];
1824
- if (uncopyableColumns.has(col.columnType)) {
1825
+ const columnDef = affectedColumns[colIndex];
1826
+ if (columnDef instanceof RowSelectionDef) {
1825
1827
  targetRow.push(key !== undefined && this.selectedItems.has(key) ? 'true' : 'false');
1826
1828
  continue;
1827
1829
  }
1828
- const x = (await col.getDisplayValue?.(item, this.sortedData.lastIndexOf(item))) ||
1829
- ('accessorFn' in col && (await col.accessorFn?.(item, this.sortedData.indexOf(item))));
1830
+ if (uncopyableColumns.has(columnDef.columnType)) {
1831
+ continue;
1832
+ }
1833
+ const x = (await columnDef.getDisplayValue?.(item, this.sortedData.lastIndexOf(item))) ||
1834
+ ('accessorFn' in columnDef &&
1835
+ (await columnDef.accessorFn?.(item, this.sortedData.indexOf(item))));
1830
1836
  if (x && typeof x === 'string') {
1831
1837
  targetRow.push(x);
1832
1838
  continue;
@@ -1835,7 +1841,7 @@ export class TableContext {
1835
1841
  targetRow.push(x.join(', '));
1836
1842
  continue;
1837
1843
  }
1838
- const toCopy = col.id && col.id in item ? item[col.id] : null;
1844
+ const toCopy = columnDef.id && columnDef.id in item ? item[columnDef.id] : null;
1839
1845
  const y = toCopy && typeof toCopy === 'object' && toCopy instanceof Date
1840
1846
  ? toCopy.toLocaleDateString()
1841
1847
  : (toCopy?.toString() ?? '');
package/dist/index.d.ts CHANGED
@@ -114,6 +114,8 @@ export { default as TextInput } from './Components/TextInput.svelte';
114
114
  export { default as ThreeStateRadio } from './Components/ThreeStateRadio.svelte';
115
115
  export { default as VerticalTabGroup } from './Components/VerticalTabGroup.svelte';
116
116
  export { default as VerticalTabGroupButton } from './Components/VerticalTabGroupButton.svelte';
117
+ export { default as DragMenuHolder } from './Components/DragMenu/DragMenuHolder.svelte';
118
+ export { default as DraggableCard } from './Components/DragMenu/DraggableCard.svelte';
117
119
  export { AlertContext, type IAlertProps, type IPromptProps } from './Contexts/AlertContext.svelte.js';
118
120
  export { ContextMenuContext } from './Contexts/ContextMenuContext.svelte.js';
119
121
  export { ToastContext } from './Contexts/ToastContext.svelte.js';
package/dist/index.js CHANGED
@@ -121,6 +121,8 @@ export { default as TextInput } from './Components/TextInput.svelte';
121
121
  export { default as ThreeStateRadio } from './Components/ThreeStateRadio.svelte';
122
122
  export { default as VerticalTabGroup } from './Components/VerticalTabGroup.svelte';
123
123
  export { default as VerticalTabGroupButton } from './Components/VerticalTabGroupButton.svelte';
124
+ export { default as DragMenuHolder } from './Components/DragMenu/DragMenuHolder.svelte';
125
+ export { default as DraggableCard } from './Components/DragMenu/DraggableCard.svelte';
124
126
  export { AlertContext } from './Contexts/AlertContext.svelte.js';
125
127
  export { ContextMenuContext } from './Contexts/ContextMenuContext.svelte.js';
126
128
  export { ToastContext } from './Contexts/ToastContext.svelte.js';
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.6",
4
+ "version": "0.4.0",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },