@lavalogic/scoria 0.22.2 → 0.22.4
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/dist/Components/FileUpload.svelte +13 -5
- package/dist/Components/Table/Types/Columns/Definitions/ColumnDef.svelte.d.ts +4 -3
- package/dist/Components/Table/Types/Context/TableContext.svelte.d.ts +10 -0
- package/dist/Components/Table/Types/Context/TableContext.svelte.js +86 -116
- package/dist/Components/Table/Types/Coordinates/CellCoordinates.d.ts +2 -1
- package/dist/Components/Table/Types/Coordinates/ColumnIndices.d.ts +8 -0
- package/dist/Components/Table/Types/Coordinates/ColumnIndices.js +1 -0
- package/dist/Components/Table/Types/Focus/TableFocusDetails.svelte.js +7 -5
- package/package.json +1 -1
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
inputRef = $bindable(),
|
|
35
35
|
onblur,
|
|
36
|
-
onfocus
|
|
36
|
+
onfocus,
|
|
37
37
|
}: FileUploadProps = $props();
|
|
38
38
|
|
|
39
39
|
function onchange(e: Event & { currentTarget: EventTarget & HTMLInputElement }) {
|
|
@@ -90,7 +90,9 @@
|
|
|
90
90
|
<!-- HACK removed label for modals for now because I couldn't think of a decent style that doesn't interfere with scrolling -->
|
|
91
91
|
{#if labelTop && variant !== InputVariant.Modal}
|
|
92
92
|
<!-- <span class="top-label" class:invalid={isInvalid}>{labelTop}{#if optional}<i> - optional</i>{/if}</span> -->
|
|
93
|
-
<span
|
|
93
|
+
<span
|
|
94
|
+
class="top-label"
|
|
95
|
+
class:for-default={variant === InputVariant.Default}
|
|
94
96
|
>{labelTop}{#if optional}<i> - optional</i>{/if}</span
|
|
95
97
|
>
|
|
96
98
|
{#if variant === InputVariant.Default}
|
|
@@ -100,7 +102,10 @@
|
|
|
100
102
|
{/if}
|
|
101
103
|
{/if}
|
|
102
104
|
<!-- style="--background-colour: {leftIcon?.backgroundColour ?? rightIcon?.backgroundColour};" -->
|
|
103
|
-
<div
|
|
105
|
+
<div
|
|
106
|
+
class="icon-container"
|
|
107
|
+
class:for-modal={variant == InputVariant.Modal}
|
|
108
|
+
>
|
|
104
109
|
{#if leftIcon}
|
|
105
110
|
<Icon
|
|
106
111
|
name={leftIcon.name}
|
|
@@ -157,7 +162,7 @@
|
|
|
157
162
|
colourSet={ColourSet.Secondary}
|
|
158
163
|
backgroundColour="transparent"
|
|
159
164
|
icon={{ name: 'upload' }}
|
|
160
|
-
label="
|
|
165
|
+
label="Upload"
|
|
161
166
|
size={Size.Medium}
|
|
162
167
|
onclick={() => {
|
|
163
168
|
a();
|
|
@@ -180,7 +185,10 @@
|
|
|
180
185
|
/>
|
|
181
186
|
{/if}
|
|
182
187
|
{#if labelRight}
|
|
183
|
-
<span
|
|
188
|
+
<span
|
|
189
|
+
class="right-label"
|
|
190
|
+
class:for-modal={variant == InputVariant.Modal}>{labelRight}</span
|
|
191
|
+
>
|
|
184
192
|
{/if}
|
|
185
193
|
</div>
|
|
186
194
|
</label>
|
|
@@ -6,11 +6,12 @@ import type { FilterValueType } from '../../Filtering/FilterValueType.js';
|
|
|
6
6
|
import { ColumnType } from '../ColumnType.js';
|
|
7
7
|
import type { AccessorFn } from './AccessorFn.js';
|
|
8
8
|
import type { ValidationFn } from './ValidationFn.js';
|
|
9
|
+
import type { MemoryColumnIndex } from '../../Coordinates/ColumnIndices.js';
|
|
9
10
|
export interface ColumnDefProps<T extends object, in FilterFnType, out OptionsType> {
|
|
10
11
|
id: string;
|
|
11
12
|
header: string | Snippet;
|
|
12
13
|
debug?: boolean;
|
|
13
|
-
index?:
|
|
14
|
+
index?: MemoryColumnIndex;
|
|
14
15
|
allowFiltering?: boolean;
|
|
15
16
|
allowSorting?: boolean;
|
|
16
17
|
defaultHidden?: boolean;
|
|
@@ -30,8 +31,8 @@ export declare abstract class ColumnDef<T extends object, in FilterFnType = neve
|
|
|
30
31
|
readonly id: string;
|
|
31
32
|
debug: boolean;
|
|
32
33
|
private _index;
|
|
33
|
-
get index():
|
|
34
|
-
set index(v:
|
|
34
|
+
get index(): MemoryColumnIndex;
|
|
35
|
+
set index(v: MemoryColumnIndex);
|
|
35
36
|
abstract readonly columnType: ColumnType;
|
|
36
37
|
readonly defaultHidden: boolean;
|
|
37
38
|
readonly allowSorting: boolean;
|
|
@@ -8,6 +8,7 @@ import type { DefsWrapper } from '../Columns/DefsWrapper.js';
|
|
|
8
8
|
import type { VisibilityState } from '../Columns/VisibilityState.js';
|
|
9
9
|
import type { CellCoordinates } from '../Coordinates/CellCoordinates.js';
|
|
10
10
|
import type { CellCoordinatesWithoutColumn } from '../Coordinates/CellCoordinatesWithoutColumn.js';
|
|
11
|
+
import type { VisualColumnIndex } from '../Coordinates/ColumnIndices.js';
|
|
11
12
|
import type { IDataRepository } from '../DataRepository/IDataRepository.js';
|
|
12
13
|
import type { ColumnFiltersState } from '../Filtering/ColumnFiltersState.js';
|
|
13
14
|
import type { CustomRemoteFilters } from '../Filtering/CustomRemoteFilters.js';
|
|
@@ -225,6 +226,15 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
225
226
|
private createRow;
|
|
226
227
|
private columnDefReturnsTextValue;
|
|
227
228
|
private _updateLocalStorageSettings;
|
|
229
|
+
/**
|
|
230
|
+
* Columns in visual display order: pinned-left → center → pinned-right,
|
|
231
|
+
* preserving memory order within each section. Only includes visible columns.
|
|
232
|
+
*/
|
|
233
|
+
private get _visualColumns();
|
|
234
|
+
/** Returns the visual index of the column with the given id, or -1 if not found. */
|
|
235
|
+
columnVisualIndex(id: string): VisualColumnIndex;
|
|
236
|
+
get focusStartVisualColumn(): VisualColumnIndex;
|
|
237
|
+
get focusEndVisualColumn(): VisualColumnIndex;
|
|
228
238
|
private _moveFocusEndRow;
|
|
229
239
|
private _moveFocusRow;
|
|
230
240
|
private getHighlightedRowData;
|
|
@@ -170,8 +170,8 @@ export class TableContext {
|
|
|
170
170
|
this._focusedColumnIds = new Set();
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
|
-
const { row: startRowIndexId
|
|
174
|
-
const { row: endRowIndexId
|
|
173
|
+
const { row: startRowIndexId } = this.focusStart;
|
|
174
|
+
const { row: endRowIndexId } = this.focusEnd;
|
|
175
175
|
const model = this.paginationRowModel;
|
|
176
176
|
if (current === latest_pageColData) {
|
|
177
177
|
const startRowIndex = model.rows.findIndex((row) => row.visibleIndex === startRowIndexId);
|
|
@@ -185,20 +185,14 @@ export class TableContext {
|
|
|
185
185
|
}
|
|
186
186
|
const minRowIndex = Math.min(startRowIndex, endRowIndex);
|
|
187
187
|
const maxRowIndex = Math.max(startRowIndex, endRowIndex);
|
|
188
|
-
const
|
|
189
|
-
const
|
|
188
|
+
const startVisualIndex = this.columnVisualIndex(this.focusStart.id);
|
|
189
|
+
const endVisualIndex = this.columnVisualIndex(this.focusEnd.id);
|
|
190
|
+
const minVisualIndex = Math.min(startVisualIndex, endVisualIndex);
|
|
191
|
+
const maxVisualIndex = Math.max(startVisualIndex, endVisualIndex);
|
|
190
192
|
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
191
193
|
const affectedColumns = new Set();
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
.filter((it) => 'index' in it &&
|
|
195
|
-
visibility[it.id] !== false &&
|
|
196
|
-
// TODO handle pinning behaviour
|
|
197
|
-
// !columnPinning.left?.includes(it.id) &&
|
|
198
|
-
// !columnPinning.right?.includes(it.id) &&
|
|
199
|
-
// (!('columnType' in it) || it.columnType === undefined || it.columnType === 'Accessor') &&
|
|
200
|
-
it.index >= minColumnIndex &&
|
|
201
|
-
it.index <= maxColumnIndex)
|
|
194
|
+
this._visualColumns
|
|
195
|
+
.slice(minVisualIndex, maxVisualIndex + 1)
|
|
202
196
|
.forEach((it) => affectedColumns.add(it.id));
|
|
203
197
|
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
204
198
|
const indices = new Set();
|
|
@@ -1578,8 +1572,8 @@ export class TableContext {
|
|
|
1578
1572
|
// newColumns[i].index += 1;
|
|
1579
1573
|
// }
|
|
1580
1574
|
if (originalIndex > dropTargetIndex && !targetIsLI(dropTarget)) {
|
|
1581
|
-
newDefs[dropTargetIndex].index
|
|
1582
|
-
this.dragTarget.index = newDefs[dropTargetIndex].index - 1;
|
|
1575
|
+
newDefs[dropTargetIndex].index = (newDefs[dropTargetIndex].index + 1);
|
|
1576
|
+
this.dragTarget.index = (newDefs[dropTargetIndex].index - 1);
|
|
1583
1577
|
newDefs.push(this.dragTarget);
|
|
1584
1578
|
}
|
|
1585
1579
|
else {
|
|
@@ -1780,36 +1774,21 @@ export class TableContext {
|
|
|
1780
1774
|
if (!this.focusEnd) {
|
|
1781
1775
|
return;
|
|
1782
1776
|
}
|
|
1783
|
-
const
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
while (index < currentIndex) {
|
|
1788
|
-
const newId = columnDefs[index].id;
|
|
1789
|
-
if (newId && visibility[newId] !== false) {
|
|
1790
|
-
this.focusEnd = { ...this.focusEnd, column: index };
|
|
1791
|
-
return;
|
|
1792
|
-
}
|
|
1793
|
-
++index;
|
|
1777
|
+
const visualCols = this._visualColumns;
|
|
1778
|
+
if (visualCols.length > 0) {
|
|
1779
|
+
const first = visualCols[0];
|
|
1780
|
+
this.focusEnd = { ...this.focusEnd, id: first.id, column: first.index };
|
|
1794
1781
|
}
|
|
1795
1782
|
};
|
|
1796
1783
|
moveToStart = () => {
|
|
1797
1784
|
if (!this.focusStart) {
|
|
1798
1785
|
return;
|
|
1799
1786
|
}
|
|
1800
|
-
const
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
while (index < current) {
|
|
1805
|
-
const newId = columnDefs[index].id;
|
|
1806
|
-
if (newId && visibility[newId] !== false) {
|
|
1807
|
-
this.moveFocus({ ...this.focusStart, id: newId, column: index });
|
|
1808
|
-
return;
|
|
1809
|
-
}
|
|
1810
|
-
++index;
|
|
1787
|
+
const visualCols = this._visualColumns;
|
|
1788
|
+
if (visualCols.length > 0) {
|
|
1789
|
+
const first = visualCols[0];
|
|
1790
|
+
this.moveFocus({ ...this.focusStart, id: first.id, column: first.index });
|
|
1811
1791
|
}
|
|
1812
|
-
//otherwise return without doing anything
|
|
1813
1792
|
};
|
|
1814
1793
|
focusToEnd = () => {
|
|
1815
1794
|
if (!this.allowCopy) {
|
|
@@ -1818,38 +1797,21 @@ export class TableContext {
|
|
|
1818
1797
|
if (!this.focusEnd) {
|
|
1819
1798
|
return;
|
|
1820
1799
|
}
|
|
1821
|
-
const
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
let index = columnDefs.length - 1;
|
|
1826
|
-
while (index > currentIndex) {
|
|
1827
|
-
const newId = columnDefs[index].id;
|
|
1828
|
-
if (newId && visibility[newId] !== false) {
|
|
1829
|
-
this.focusEnd = { ...this.focusEnd, column: index };
|
|
1830
|
-
return;
|
|
1831
|
-
}
|
|
1832
|
-
--index;
|
|
1800
|
+
const visualCols = this._visualColumns;
|
|
1801
|
+
if (visualCols.length > 0) {
|
|
1802
|
+
const last = visualCols[visualCols.length - 1];
|
|
1803
|
+
this.focusEnd = { ...this.focusEnd, id: last.id, column: last.index };
|
|
1833
1804
|
}
|
|
1834
|
-
this.focusEnd = current;
|
|
1835
1805
|
};
|
|
1836
1806
|
moveToEnd = () => {
|
|
1837
1807
|
if (!this.focusStart) {
|
|
1838
1808
|
return;
|
|
1839
1809
|
}
|
|
1840
|
-
const
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
while (index > current) {
|
|
1845
|
-
const newId = columnDefs[index].id;
|
|
1846
|
-
if (newId && visibility[newId] !== false) {
|
|
1847
|
-
this.moveFocus({ ...this.focusStart, id: newId, column: index });
|
|
1848
|
-
return;
|
|
1849
|
-
}
|
|
1850
|
-
--index;
|
|
1810
|
+
const visualCols = this._visualColumns;
|
|
1811
|
+
if (visualCols.length > 0) {
|
|
1812
|
+
const last = visualCols[visualCols.length - 1];
|
|
1813
|
+
this.moveFocus({ ...this.focusStart, id: last.id, column: last.index });
|
|
1851
1814
|
}
|
|
1852
|
-
//otherwise return without doing anything
|
|
1853
1815
|
};
|
|
1854
1816
|
moveFocusDown = () => {
|
|
1855
1817
|
if (!this.allowCopy) {
|
|
@@ -1865,15 +1827,11 @@ export class TableContext {
|
|
|
1865
1827
|
return;
|
|
1866
1828
|
}
|
|
1867
1829
|
if (this.focusEnd != null) {
|
|
1868
|
-
const
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
const
|
|
1872
|
-
|
|
1873
|
-
this.focusEnd = { ...this.focusEnd, column: index };
|
|
1874
|
-
return;
|
|
1875
|
-
}
|
|
1876
|
-
--index;
|
|
1830
|
+
const visualCols = this._visualColumns;
|
|
1831
|
+
const visualIndex = this.columnVisualIndex(this.focusEnd.id);
|
|
1832
|
+
if (visualIndex > 0) {
|
|
1833
|
+
const prev = visualCols[visualIndex - 1];
|
|
1834
|
+
this.focusEnd = { ...this.focusEnd, id: prev.id, column: prev.index };
|
|
1877
1835
|
}
|
|
1878
1836
|
}
|
|
1879
1837
|
};
|
|
@@ -1881,35 +1839,23 @@ export class TableContext {
|
|
|
1881
1839
|
if (!this.focusStart) {
|
|
1882
1840
|
return;
|
|
1883
1841
|
}
|
|
1884
|
-
const
|
|
1885
|
-
const
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
if (newId && visibility[newId] !== false) {
|
|
1890
|
-
this.moveFocus({ ...this.focusStart, id: newId, column: index });
|
|
1891
|
-
return;
|
|
1892
|
-
}
|
|
1893
|
-
--index;
|
|
1842
|
+
const visualCols = this._visualColumns;
|
|
1843
|
+
const visualIndex = this.columnVisualIndex(this.focusStart.id);
|
|
1844
|
+
if (visualIndex > 0) {
|
|
1845
|
+
const prev = visualCols[visualIndex - 1];
|
|
1846
|
+
this.moveFocus({ ...this.focusStart, id: prev.id, column: prev.index });
|
|
1894
1847
|
}
|
|
1895
|
-
//otherwise return without doing anything
|
|
1896
1848
|
};
|
|
1897
1849
|
moveFocusRight = () => {
|
|
1898
1850
|
if (!this.allowCopy) {
|
|
1899
1851
|
return;
|
|
1900
1852
|
}
|
|
1901
1853
|
if (this.focusEnd != null) {
|
|
1902
|
-
const
|
|
1903
|
-
const
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
const newId = columnDefs[index].id;
|
|
1908
|
-
if (newId && visibility[newId] !== false) {
|
|
1909
|
-
this.focusEnd = { ...this.focusEnd, column: index };
|
|
1910
|
-
return;
|
|
1911
|
-
}
|
|
1912
|
-
++index;
|
|
1854
|
+
const visualCols = this._visualColumns;
|
|
1855
|
+
const visualIndex = this.columnVisualIndex(this.focusEnd.id);
|
|
1856
|
+
if (visualIndex < visualCols.length - 1) {
|
|
1857
|
+
const next = visualCols[visualIndex + 1];
|
|
1858
|
+
this.focusEnd = { ...this.focusEnd, id: next.id, column: next.index };
|
|
1913
1859
|
}
|
|
1914
1860
|
}
|
|
1915
1861
|
};
|
|
@@ -1917,19 +1863,12 @@ export class TableContext {
|
|
|
1917
1863
|
if (!this.focusStart) {
|
|
1918
1864
|
return;
|
|
1919
1865
|
}
|
|
1920
|
-
const
|
|
1921
|
-
const
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
const newId = columnDefs[index].id;
|
|
1926
|
-
if (newId && visibility[newId] !== false) {
|
|
1927
|
-
this.moveFocus({ ...this.focusStart, id: newId, column: index });
|
|
1928
|
-
return;
|
|
1929
|
-
}
|
|
1930
|
-
++index;
|
|
1866
|
+
const visualCols = this._visualColumns;
|
|
1867
|
+
const visualIndex = this.columnVisualIndex(this.focusStart.id);
|
|
1868
|
+
if (visualIndex < visualCols.length - 1) {
|
|
1869
|
+
const next = visualCols[visualIndex + 1];
|
|
1870
|
+
this.moveFocus({ ...this.focusStart, id: next.id, column: next.index });
|
|
1931
1871
|
}
|
|
1932
|
-
//otherwise return without doing anything
|
|
1933
1872
|
};
|
|
1934
1873
|
endFocus = (coords) => {
|
|
1935
1874
|
if (this.isMousingDown) {
|
|
@@ -2125,6 +2064,37 @@ export class TableContext {
|
|
|
2125
2064
|
};
|
|
2126
2065
|
localStorage.setItem(`${this.userId}-${this.tableName}-settings`, JSON.stringify(settingsObject));
|
|
2127
2066
|
}
|
|
2067
|
+
/**
|
|
2068
|
+
* Columns in visual display order: pinned-left → center → pinned-right,
|
|
2069
|
+
* preserving memory order within each section. Only includes visible columns.
|
|
2070
|
+
*/
|
|
2071
|
+
get _visualColumns() {
|
|
2072
|
+
const visibility = this.columnVisibility;
|
|
2073
|
+
const pinLeft = this.columnPinning.left;
|
|
2074
|
+
const pinRight = this.columnPinning.right;
|
|
2075
|
+
const visible = this.columnDefs.filter((it) => visibility[it.id] !== false);
|
|
2076
|
+
return [
|
|
2077
|
+
...visible.filter((it) => pinLeft?.has(it.id)),
|
|
2078
|
+
...visible.filter((it) => !pinLeft?.has(it.id) && !pinRight?.has(it.id)),
|
|
2079
|
+
...visible.filter((it) => pinRight?.has(it.id)),
|
|
2080
|
+
];
|
|
2081
|
+
}
|
|
2082
|
+
/** Returns the visual index of the column with the given id, or -1 if not found. */
|
|
2083
|
+
columnVisualIndex(id) {
|
|
2084
|
+
return this._visualColumns.findIndex((it) => it.id === id);
|
|
2085
|
+
}
|
|
2086
|
+
get focusStartVisualColumn() {
|
|
2087
|
+
if (!this.focusStart) {
|
|
2088
|
+
return -1;
|
|
2089
|
+
}
|
|
2090
|
+
return this.columnVisualIndex(this.focusStart.id);
|
|
2091
|
+
}
|
|
2092
|
+
get focusEndVisualColumn() {
|
|
2093
|
+
if (!this.focusEnd) {
|
|
2094
|
+
return -1;
|
|
2095
|
+
}
|
|
2096
|
+
return this.columnVisualIndex(this.focusEnd.id);
|
|
2097
|
+
}
|
|
2128
2098
|
_moveFocusEndRow(offset) {
|
|
2129
2099
|
if (!this.allowCopy) {
|
|
2130
2100
|
return;
|
|
@@ -2219,8 +2189,8 @@ export class TableContext {
|
|
|
2219
2189
|
}
|
|
2220
2190
|
async getFocusElementData() {
|
|
2221
2191
|
if (this.focusStart && this.focusEnd) {
|
|
2222
|
-
const { row: startRowIndexId
|
|
2223
|
-
const { row: endRowIndexId
|
|
2192
|
+
const { row: startRowIndexId } = this.focusStart;
|
|
2193
|
+
const { row: endRowIndexId } = this.focusEnd;
|
|
2224
2194
|
// const model = this._currentPageData;
|
|
2225
2195
|
const model = this.paginationRowModel;
|
|
2226
2196
|
const startRowIndex = model.rows.findIndex((row) => row.visibleIndex === startRowIndexId);
|
|
@@ -2230,13 +2200,13 @@ export class TableContext {
|
|
|
2230
2200
|
}
|
|
2231
2201
|
const minRowIndex = Math.min(startRowIndex, endRowIndex);
|
|
2232
2202
|
const maxRowIndex = Math.max(startRowIndex, endRowIndex);
|
|
2233
|
-
const
|
|
2234
|
-
const
|
|
2235
|
-
const
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2203
|
+
const startVisualIndex = this.columnVisualIndex(this.focusStart.id);
|
|
2204
|
+
const endVisualIndex = this.columnVisualIndex(this.focusEnd.id);
|
|
2205
|
+
const minVisualIndex = Math.min(startVisualIndex, endVisualIndex);
|
|
2206
|
+
const maxVisualIndex = Math.max(startVisualIndex, endVisualIndex);
|
|
2207
|
+
const affectedColumns = this._visualColumns
|
|
2208
|
+
.slice(minVisualIndex, maxVisualIndex + 1)
|
|
2209
|
+
.filter((it) => this.columnDefReturnsTextValue(it));
|
|
2240
2210
|
const selectedRows = [];
|
|
2241
2211
|
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
2242
2212
|
const indices = new Map();
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Position of a column in the `columnDefs` array (memory order). */
|
|
2
|
+
export type MemoryColumnIndex = number & {
|
|
3
|
+
readonly __brand: 'MemoryColumnIndex';
|
|
4
|
+
};
|
|
5
|
+
/** Position of a column in the visual display order (pinned-left → center → pinned-right). */
|
|
6
|
+
export type VisualColumnIndex = number & {
|
|
7
|
+
readonly __brand: 'VisualColumnIndex';
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -29,7 +29,7 @@ export class TableFocusDetails {
|
|
|
29
29
|
this.leftToRight = $derived.by(() => {
|
|
30
30
|
void this.hasMultipleFocus;
|
|
31
31
|
return (this.hasMultipleFocus &&
|
|
32
|
-
|
|
32
|
+
this.tableContext.focusStartVisualColumn < this.tableContext.focusEndVisualColumn);
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
coordinates;
|
|
@@ -42,11 +42,12 @@ export class TableFocusDetails {
|
|
|
42
42
|
void this.isMultiFocused;
|
|
43
43
|
void this.leftToRight;
|
|
44
44
|
if (this.isMultiFocused) {
|
|
45
|
+
const thisVisualIndex = this.tableContext.columnVisualIndex(this.cell.column.columnDef.id);
|
|
45
46
|
if (this.leftToRight) {
|
|
46
|
-
return
|
|
47
|
+
return thisVisualIndex === this.tableContext.focusStartVisualColumn;
|
|
47
48
|
}
|
|
48
49
|
else {
|
|
49
|
-
return
|
|
50
|
+
return thisVisualIndex === this.tableContext.focusEndVisualColumn;
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
return false;
|
|
@@ -68,11 +69,12 @@ export class TableFocusDetails {
|
|
|
68
69
|
void this.isMultiFocused;
|
|
69
70
|
void this.leftToRight;
|
|
70
71
|
if (this.isMultiFocused) {
|
|
72
|
+
const myVisual = this.tableContext.columnVisualIndex(this.cell.column.columnDef.id);
|
|
71
73
|
if (this.leftToRight) {
|
|
72
|
-
return
|
|
74
|
+
return myVisual === this.tableContext.focusEndVisualColumn;
|
|
73
75
|
}
|
|
74
76
|
else {
|
|
75
|
-
return
|
|
77
|
+
return myVisual === this.tableContext.focusStartVisualColumn;
|
|
76
78
|
}
|
|
77
79
|
}
|
|
78
80
|
return false;
|