@lavalogic/scoria 0.18.2 → 0.19.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.
- package/dist/Components/Base/Snippets.svelte +26 -0
- package/dist/Components/Base/Snippets.svelte.d.ts +5 -0
- package/dist/Components/CollapsibleCard.svelte +6 -3
- package/dist/Components/GridInput.svelte +18 -6
- package/dist/Components/LoadingAnimation.svelte +7 -2
- package/dist/Components/Table/Body/QuickSearchCell.svelte +30 -32
- package/dist/Components/Table/Body/Rows/Columns/FocusableImmutableCell.svelte +15 -21
- package/dist/Components/Table/Body/Rows/Columns/TableAction.svelte +8 -2
- package/dist/Components/Table/Body/Rows/Columns/TableDatePicker.svelte +43 -13
- package/dist/Components/Table/Body/Rows/Columns/TableDatePicker.svelte.d.ts +6 -6
- package/dist/Components/Table/Body/Rows/Columns/TableNumberInput.svelte +27 -2
- package/dist/Components/Table/Body/Rows/Columns/TableNumberInput.svelte.d.ts +6 -6
- package/dist/Components/Table/Body/Rows/Columns/TableQuerySelect.svelte +60 -15
- package/dist/Components/Table/Body/Rows/Columns/TableQuerySelect.svelte.d.ts +6 -6
- package/dist/Components/Table/Body/Rows/Columns/TableSelect.svelte +56 -44
- package/dist/Components/Table/Body/Rows/Columns/TableSelect.svelte.d.ts +6 -6
- package/dist/Components/Table/Body/Rows/Columns/TableTextInput.svelte +30 -6
- package/dist/Components/Table/Body/Rows/Columns/TableTextInput.svelte.d.ts +6 -6
- package/dist/Components/Table/Body/TableBody.svelte +15 -16
- package/dist/Components/Table/Headers/HighlightAllHeader.svelte +6 -3
- package/dist/Components/Table/Headers/SelectAllHeader.svelte +4 -1
- package/dist/Components/Table/Table.svelte +128 -133
- package/dist/Components/Touch/TouchModal.svelte +20 -6
- package/dist/Helpers/Helpers.svelte.d.ts +1 -0
- package/dist/Helpers/Helpers.svelte.js +1 -0
- package/package.json +1 -1
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
import SingleSelect from '../../../../SingleSelect.svelte';
|
|
9
9
|
import { TableContext } from '../../../Types/Context/TableContext.svelte.js';
|
|
10
10
|
import { TableFocusDetails } from '../../../Types/Focus/TableFocusDetails.svelte.js';
|
|
11
|
-
import { devCatch, isValidityTuple } from '../../../../../Helpers/Helpers.svelte.js';
|
|
11
|
+
import { devCatch, isValidityTuple, loadingText } from '../../../../../Helpers/Helpers.svelte.js';
|
|
12
12
|
import type { SelectOption } from '../../../../../Types/Internal/SelectOption.js';
|
|
13
13
|
import { Validity } from '../../../../../Types/Internal/Validity.js';
|
|
14
|
-
import { getContext, tick
|
|
14
|
+
import { getContext, tick } from 'svelte';
|
|
15
15
|
import type { TableSelectProps } from './TableSelectProps.js';
|
|
16
16
|
</script>
|
|
17
17
|
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
const tableContext = getContext<TableContext<T, never>>(TableContext.identifier);
|
|
35
35
|
|
|
36
36
|
const editable = $derived(
|
|
37
|
-
|
|
37
|
+
cell.column.columnDef.isEditable(cell.row.original, cell.row.originalIndex)
|
|
38
38
|
);
|
|
39
39
|
|
|
40
40
|
const focusDetails: TableFocusDetails<T, never> = $derived(
|
|
@@ -50,40 +50,41 @@
|
|
|
50
50
|
tableContext.focusStartIsBeingEdited
|
|
51
51
|
);
|
|
52
52
|
|
|
53
|
-
let isBeingEdited = $
|
|
53
|
+
let isBeingEdited = $derived(false);
|
|
54
54
|
$effect(() => {
|
|
55
|
+
void editable;
|
|
55
56
|
if (wantsToBeEdited) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
editable
|
|
58
|
+
.then((isEditable) => {
|
|
59
|
+
if (isEditable) {
|
|
60
|
+
return tick().then(() => {
|
|
60
61
|
isBeingEdited = true;
|
|
61
62
|
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
} else {
|
|
64
|
+
if (isBeingEdited) {
|
|
65
|
+
return tick()
|
|
66
|
+
.then(() => {
|
|
67
|
+
if (!tableContext.singleClickEditing) {
|
|
68
|
+
tableContext.focusStartIsBeingEdited = false;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
isBeingEdited = false;
|
|
72
|
+
})
|
|
73
|
+
.catch(devCatch);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return;
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
.catch(devCatch);
|
|
73
81
|
} else {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
isBeingEdited = false;
|
|
83
|
-
});
|
|
84
|
-
})
|
|
85
|
-
.catch(devCatch);
|
|
86
|
-
}
|
|
82
|
+
tick()
|
|
83
|
+
.then(() => {
|
|
84
|
+
isBeingEdited = false;
|
|
85
|
+
tableContext.focusStartIsBeingEdited = false;
|
|
86
|
+
})
|
|
87
|
+
.catch(devCatch);
|
|
87
88
|
}
|
|
88
89
|
});
|
|
89
90
|
|
|
@@ -111,9 +112,9 @@
|
|
|
111
112
|
.catch(devCatch);
|
|
112
113
|
});
|
|
113
114
|
|
|
114
|
-
function handleTDFocus(): boolean {
|
|
115
|
+
async function handleTDFocus(): Promise<boolean> {
|
|
115
116
|
if (
|
|
116
|
-
editable &&
|
|
117
|
+
(await editable) &&
|
|
117
118
|
tableContext.focusStart?.column === focusDetails.coordinates.column &&
|
|
118
119
|
tableContext.focusStart.row === focusDetails.coordinates.row
|
|
119
120
|
) {
|
|
@@ -132,11 +133,11 @@
|
|
|
132
133
|
return false;
|
|
133
134
|
}
|
|
134
135
|
|
|
135
|
-
function handleSingleClick() {
|
|
136
|
-
return tableContext.singleClickEditing && handleTDFocus();
|
|
136
|
+
async function handleSingleClick(): Promise<boolean> {
|
|
137
|
+
return tableContext.singleClickEditing && (await handleTDFocus());
|
|
137
138
|
}
|
|
138
|
-
function handleDoubleClick() {
|
|
139
|
-
return !tableContext.singleClickEditing && handleTDFocus();
|
|
139
|
+
async function handleDoubleClick(): Promise<boolean> {
|
|
140
|
+
return !tableContext.singleClickEditing && (await handleTDFocus());
|
|
140
141
|
}
|
|
141
142
|
|
|
142
143
|
function handleTab(e: KeyboardEvent) {
|
|
@@ -176,11 +177,15 @@
|
|
|
176
177
|
target?.addEventListener('keydown', keydownForce);
|
|
177
178
|
}
|
|
178
179
|
|
|
180
|
+
function tryHandleTDFocus() {
|
|
181
|
+
handleTDFocus().catch(devCatch);
|
|
182
|
+
}
|
|
183
|
+
|
|
179
184
|
let prevtdref: HTMLTableCellElement | undefined = undefined;
|
|
180
185
|
$effect(() => {
|
|
181
186
|
if (tdref) {
|
|
182
187
|
if (tdref != prevtdref) {
|
|
183
|
-
tdref.addEventListener('edit',
|
|
188
|
+
tdref.addEventListener('edit', tryHandleTDFocus);
|
|
184
189
|
} else {
|
|
185
190
|
prevtdref = tdref;
|
|
186
191
|
}
|
|
@@ -196,7 +201,7 @@
|
|
|
196
201
|
bind:this={tdref}
|
|
197
202
|
>
|
|
198
203
|
{#await Promise.all([optionsPromise, selectValue])}
|
|
199
|
-
|
|
204
|
+
{loadingText}
|
|
200
205
|
{:then [options, value]}
|
|
201
206
|
<SingleSelect
|
|
202
207
|
focusOnLoad
|
|
@@ -249,7 +254,9 @@
|
|
|
249
254
|
class:success={validity == Validity.Valid}
|
|
250
255
|
class:warning={validity == Validity.Warning}
|
|
251
256
|
class:error={validity == Validity.Invalid}
|
|
252
|
-
ondblclick={
|
|
257
|
+
ondblclick={() => {
|
|
258
|
+
handleDoubleClick().catch(devCatch);
|
|
259
|
+
}}
|
|
253
260
|
onmousedown={(e) => {
|
|
254
261
|
// start focus only on left click
|
|
255
262
|
if (e.button === 0) {
|
|
@@ -267,11 +274,16 @@
|
|
|
267
274
|
}
|
|
268
275
|
}}
|
|
269
276
|
onmouseup={() => {
|
|
270
|
-
|
|
271
|
-
|
|
277
|
+
handleSingleClick()
|
|
278
|
+
.then((wasHandled) => {
|
|
279
|
+
if (!wasHandled) {
|
|
280
|
+
tableContext.endFocus(focusDetails.coordinates);
|
|
281
|
+
}
|
|
282
|
+
})
|
|
283
|
+
.catch(devCatch);
|
|
272
284
|
}}
|
|
273
285
|
>{#await visibleValue}
|
|
274
|
-
|
|
286
|
+
{loadingText}
|
|
275
287
|
{:then value}
|
|
276
288
|
{value ?? '-'}
|
|
277
289
|
{:catch e}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import type { TableSelectProps } from './TableSelectProps.js';
|
|
2
|
-
declare function $$render<T extends object>():
|
|
2
|
+
declare function $$render<T extends object>(): {
|
|
3
3
|
props: TableSelectProps<T, T>;
|
|
4
4
|
exports: {};
|
|
5
5
|
bindings: "";
|
|
6
6
|
slots: {};
|
|
7
7
|
events: {};
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
9
|
declare class __sveltets_Render<T extends object> {
|
|
10
|
-
props():
|
|
11
|
-
events():
|
|
12
|
-
slots():
|
|
10
|
+
props(): ReturnType<typeof $$render<T>>['props'];
|
|
11
|
+
events(): ReturnType<typeof $$render<T>>['events'];
|
|
12
|
+
slots(): ReturnType<typeof $$render<T>>['slots'];
|
|
13
13
|
bindings(): "";
|
|
14
|
-
exports():
|
|
14
|
+
exports(): {};
|
|
15
15
|
}
|
|
16
16
|
interface $$IsomorphicComponent {
|
|
17
17
|
new <T extends object>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
|
|
@@ -21,9 +21,35 @@
|
|
|
21
21
|
// getNumberColumnDefOrError(cell.column.columnDef)
|
|
22
22
|
// );
|
|
23
23
|
|
|
24
|
-
const
|
|
24
|
+
const editableAsync = $derived(
|
|
25
25
|
cell.column.columnDef.isEditable(cell.row.original, cell.row.originalIndex)
|
|
26
26
|
);
|
|
27
|
+
let editable = $state(false);
|
|
28
|
+
|
|
29
|
+
let asyncCounter = 0;
|
|
30
|
+
$effect(() => {
|
|
31
|
+
void editableAsync;
|
|
32
|
+
const localCounter = (asyncCounter = asyncCounter + 1);
|
|
33
|
+
(async () => {
|
|
34
|
+
try {
|
|
35
|
+
const isEditable = await editableAsync;
|
|
36
|
+
if (asyncCounter === localCounter) {
|
|
37
|
+
editable = isEditable;
|
|
38
|
+
} else if (cell.column.columnDef.debug) {
|
|
39
|
+
console.log('skipping async editable because it is stale');
|
|
40
|
+
}
|
|
41
|
+
} catch (e) {
|
|
42
|
+
if (cell.column.columnDef.debug) {
|
|
43
|
+
console.error(e);
|
|
44
|
+
}
|
|
45
|
+
if (asyncCounter === localCounter) {
|
|
46
|
+
editable = false;
|
|
47
|
+
} else if (cell.column.columnDef.debug) {
|
|
48
|
+
console.log('skipping async editable because it is stale');
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
})().catch(devCatch);
|
|
52
|
+
});
|
|
27
53
|
|
|
28
54
|
const value = $derived(cell.getValue());
|
|
29
55
|
|
|
@@ -51,7 +77,7 @@
|
|
|
51
77
|
|
|
52
78
|
$effect(() => {
|
|
53
79
|
if (wantsToBeEdited) {
|
|
54
|
-
if (
|
|
80
|
+
if (editable) {
|
|
55
81
|
tick()
|
|
56
82
|
.then(() => {
|
|
57
83
|
if (typeof value == 'object' && value instanceof Promise) {
|
|
@@ -192,7 +218,7 @@
|
|
|
192
218
|
if (
|
|
193
219
|
tableContext.focusStart?.column === focusDetails.coordinates.column &&
|
|
194
220
|
tableContext.focusStart.row === focusDetails.coordinates.row &&
|
|
195
|
-
|
|
221
|
+
editable
|
|
196
222
|
) {
|
|
197
223
|
if (
|
|
198
224
|
tableContext.focusEnd?.column !== focusDetails.coordinates.column ||
|
|
@@ -259,8 +285,6 @@
|
|
|
259
285
|
|
|
260
286
|
return unsubscriber;
|
|
261
287
|
});
|
|
262
|
-
|
|
263
|
-
const isEditableText = $derived(await isEditable);
|
|
264
288
|
</script>
|
|
265
289
|
|
|
266
290
|
{#if isBeingEdited}
|
|
@@ -307,7 +331,7 @@
|
|
|
307
331
|
}}
|
|
308
332
|
bind:this={tdref}
|
|
309
333
|
tabIndex="0"
|
|
310
|
-
class:
|
|
334
|
+
class:editable
|
|
311
335
|
class="focusable"
|
|
312
336
|
class:multifocus={focusDetails.isMultiFocused}
|
|
313
337
|
class:multifocus-start={focusDetails.isMultiFocusStart}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import type { TableTextInputProps } from './TableTextInputProps.js';
|
|
2
|
-
declare function $$render<T extends object, FilterValueType>():
|
|
2
|
+
declare function $$render<T extends object, FilterValueType>(): {
|
|
3
3
|
props: TableTextInputProps<T, FilterValueType>;
|
|
4
4
|
exports: {};
|
|
5
5
|
bindings: "";
|
|
6
6
|
slots: {};
|
|
7
7
|
events: {};
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
9
|
declare class __sveltets_Render<T extends object, FilterValueType> {
|
|
10
|
-
props():
|
|
11
|
-
events():
|
|
12
|
-
slots():
|
|
10
|
+
props(): ReturnType<typeof $$render<T, FilterValueType>>['props'];
|
|
11
|
+
events(): ReturnType<typeof $$render<T, FilterValueType>>['events'];
|
|
12
|
+
slots(): ReturnType<typeof $$render<T, FilterValueType>>['slots'];
|
|
13
13
|
bindings(): "";
|
|
14
|
-
exports():
|
|
14
|
+
exports(): {};
|
|
15
15
|
}
|
|
16
16
|
interface $$IsomorphicComponent {
|
|
17
17
|
new <T extends object, FilterValueType>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T, FilterValueType>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T, FilterValueType>['props']>, ReturnType<__sveltets_Render<T, FilterValueType>['events']>, ReturnType<__sveltets_Render<T, FilterValueType>['slots']>> & {
|
|
@@ -48,24 +48,23 @@
|
|
|
48
48
|
{/each}
|
|
49
49
|
</tr>
|
|
50
50
|
{/if}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
|
|
52
|
+
{#await tableContext.paginationRowModel then prm}
|
|
53
|
+
{#each prm.rows as row, index (row)}
|
|
54
|
+
<!-- {@const customHeight = heights[index]?.applyTo.includes(side)
|
|
55
55
|
? heights[index].maxHeight
|
|
56
56
|
: undefined} -->
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
</svelte:boundary>
|
|
57
|
+
<!-- {customHeight} -->
|
|
58
|
+
<TableRow
|
|
59
|
+
customHeight={undefined}
|
|
60
|
+
{includeHighlight}
|
|
61
|
+
{row}
|
|
62
|
+
{side}
|
|
63
|
+
odd={index % 2 == 1}
|
|
64
|
+
/>
|
|
65
|
+
<!-- bind:this={rows[index]} -->
|
|
66
|
+
{/each}
|
|
67
|
+
{/await}
|
|
69
68
|
</tbody>
|
|
70
69
|
|
|
71
70
|
<style>td {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<svelte:options runes />
|
|
2
2
|
|
|
3
|
-
<script
|
|
3
|
+
<script
|
|
4
|
+
lang="ts"
|
|
5
|
+
generics="T extends object"
|
|
6
|
+
>
|
|
4
7
|
import { devCatch } from '../../../Helpers/Helpers.svelte.js';
|
|
5
8
|
import { Colour } from '../../../scss/colours.js';
|
|
6
9
|
import { Size } from '../../../Types/Internal/Size.js';
|
|
@@ -34,7 +37,7 @@
|
|
|
34
37
|
hoverBackgroundColour={Colour['$brand-dark']}
|
|
35
38
|
size={Size.FillWidth}
|
|
36
39
|
icon={{
|
|
37
|
-
name: 'nothing'
|
|
40
|
+
name: 'nothing',
|
|
38
41
|
}}
|
|
39
42
|
onclick={() => {
|
|
40
43
|
tableContext.onHighlightAll();
|
|
@@ -46,7 +49,7 @@
|
|
|
46
49
|
hoverBackgroundColour={Colour['$brand-dark']}
|
|
47
50
|
size={Size.FillWidth}
|
|
48
51
|
icon={{
|
|
49
|
-
name: 'nothing'
|
|
52
|
+
name: 'nothing',
|
|
50
53
|
}}
|
|
51
54
|
onclick={() => {
|
|
52
55
|
tableContext.onHighlightAll();
|
|
@@ -103,12 +103,9 @@
|
|
|
103
103
|
});
|
|
104
104
|
|
|
105
105
|
$effect(() => {
|
|
106
|
-
|
|
107
|
-
tableContext.
|
|
108
|
-
|
|
109
|
-
tableContext.selectedItems;
|
|
110
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
111
|
-
tableContext.paginationRepo?.pageStartIndex;
|
|
106
|
+
void tableContext.dataRepo.data.length;
|
|
107
|
+
void tableContext.selectedItems;
|
|
108
|
+
void tableContext.paginationRepo?.pageStartIndex;
|
|
112
109
|
|
|
113
110
|
untrack(() => {
|
|
114
111
|
tableContext.recalculateAllSelectedInCurrentPage();
|
|
@@ -359,151 +356,149 @@
|
|
|
359
356
|
}}
|
|
360
357
|
/>
|
|
361
358
|
|
|
362
|
-
<
|
|
359
|
+
<div
|
|
360
|
+
class="grid"
|
|
361
|
+
class:nested
|
|
362
|
+
>
|
|
363
|
+
{#if tableContext.dataRepo.isLoading}
|
|
364
|
+
<LoadingOverlay
|
|
365
|
+
absolute
|
|
366
|
+
borderRadius="4px"
|
|
367
|
+
/>
|
|
368
|
+
{/if}
|
|
369
|
+
|
|
363
370
|
<div
|
|
364
|
-
class="
|
|
365
|
-
class:
|
|
371
|
+
class="horizontal-bar"
|
|
372
|
+
class:border={tableContext.toolbarPosition === ToolbarPosition.Top}
|
|
366
373
|
>
|
|
367
|
-
{#if tableContext.
|
|
368
|
-
<
|
|
369
|
-
absolute
|
|
370
|
-
borderRadius="4px"
|
|
371
|
-
/>
|
|
374
|
+
{#if tableContext.toolbarPosition === ToolbarPosition.Top}
|
|
375
|
+
<TableHorizontalBar />
|
|
372
376
|
{/if}
|
|
377
|
+
</div>
|
|
373
378
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
class:nested
|
|
397
|
-
style="--nested-height: {nestedHeight}px;"
|
|
398
|
-
>
|
|
399
|
-
{#if tableContext.toolbarPosition === ToolbarPosition.Right}
|
|
400
|
-
<div class="sidebar toolbar-right">
|
|
401
|
-
<TableSidebar />
|
|
402
|
-
</div>
|
|
403
|
-
{/if}
|
|
404
|
-
</div>
|
|
379
|
+
<div
|
|
380
|
+
class="sidebar-wrapper sidebar-wrapper-left"
|
|
381
|
+
class:nested
|
|
382
|
+
style="--nested-height: {nestedHeight}px;"
|
|
383
|
+
>
|
|
384
|
+
{#if tableContext.toolbarPosition === ToolbarPosition.Left}
|
|
385
|
+
<div class="sidebar toolbar-left">
|
|
386
|
+
<TableSidebar />
|
|
387
|
+
</div>
|
|
388
|
+
{/if}
|
|
389
|
+
</div>
|
|
390
|
+
<div
|
|
391
|
+
class="sidebar-wrapper sidebar-wrapper-right"
|
|
392
|
+
class:nested
|
|
393
|
+
style="--nested-height: {nestedHeight}px;"
|
|
394
|
+
>
|
|
395
|
+
{#if tableContext.toolbarPosition === ToolbarPosition.Right}
|
|
396
|
+
<div class="sidebar toolbar-right">
|
|
397
|
+
<TableSidebar />
|
|
398
|
+
</div>
|
|
399
|
+
{/if}
|
|
400
|
+
</div>
|
|
405
401
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
402
|
+
<div class="footer">
|
|
403
|
+
{#if tableContext.displayFooter}
|
|
404
|
+
<TableFooter />
|
|
405
|
+
{/if}
|
|
406
|
+
</div>
|
|
411
407
|
|
|
412
|
-
|
|
408
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
409
|
+
<div
|
|
410
|
+
bind:this={tableRef}
|
|
411
|
+
class="datatable"
|
|
412
|
+
class:nested
|
|
413
|
+
class:compact={tableContext.isCompact}
|
|
414
|
+
class:quick-filtering={tableContext.showQuickFiltering}
|
|
415
|
+
onkeydown={tableContext.handleTdKeydown}
|
|
416
|
+
>
|
|
413
417
|
<div
|
|
414
|
-
|
|
415
|
-
|
|
418
|
+
class="flex_table"
|
|
419
|
+
bind:this={ref}
|
|
416
420
|
class:nested
|
|
417
|
-
class:compact={tableContext.isCompact}
|
|
418
|
-
class:quick-filtering={tableContext.showQuickFiltering}
|
|
419
|
-
onkeydown={tableContext.handleTdKeydown}
|
|
420
421
|
>
|
|
421
422
|
<div
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
423
|
+
bind:this={unfocusRef}
|
|
424
|
+
class="table-wrapper"
|
|
425
|
+
oncontextmenu={openContextMenu}
|
|
425
426
|
>
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
class="
|
|
429
|
-
|
|
427
|
+
<!-- {#if leftTotalSize > 0} -->
|
|
428
|
+
<table
|
|
429
|
+
class="datatable__table left"
|
|
430
|
+
style="min-width: {leftTotalSize}px"
|
|
430
431
|
>
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
includeHighlight={appropriateSide == 'centre'}
|
|
462
|
-
columns={centreColumns}
|
|
463
|
-
side="centre"
|
|
464
|
-
/>
|
|
465
|
-
<!-- heights={totalRowSizes}
|
|
432
|
+
<TableHead
|
|
433
|
+
showHighlight={leftTotalSize > 0}
|
|
434
|
+
side="left"
|
|
435
|
+
/>
|
|
436
|
+
<TableBody
|
|
437
|
+
includeHighlight={appropriateSide == 'left'}
|
|
438
|
+
columns={leftColumns}
|
|
439
|
+
side="left"
|
|
440
|
+
/>
|
|
441
|
+
<!-- heights={totalRowSizes} -->
|
|
442
|
+
<!-- bind:this={leftTable} -->
|
|
443
|
+
</table>
|
|
444
|
+
<!-- {/if} -->
|
|
445
|
+
|
|
446
|
+
<!-- {#if centreTotalSize > 0} -->
|
|
447
|
+
|
|
448
|
+
<table
|
|
449
|
+
class="datatable__table centre"
|
|
450
|
+
style="min-width: {centreTotalSize}px"
|
|
451
|
+
>
|
|
452
|
+
<TableHead
|
|
453
|
+
showHighlight={leftTotalSize == 0}
|
|
454
|
+
side="centre"
|
|
455
|
+
/>
|
|
456
|
+
<TableBody
|
|
457
|
+
includeHighlight={appropriateSide == 'centre'}
|
|
458
|
+
columns={centreColumns}
|
|
459
|
+
side="centre"
|
|
460
|
+
/>
|
|
461
|
+
<!-- heights={totalRowSizes}
|
|
466
462
|
bind:this={centreTable} -->
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
<!-- {#if rightTotalSize > 0} -->
|
|
471
|
-
<table
|
|
472
|
-
class="datatable__table right"
|
|
473
|
-
style="min-width: {rightTotalSize}px"
|
|
474
|
-
>
|
|
475
|
-
<TableHead
|
|
476
|
-
showHighlight={false}
|
|
477
|
-
side="right"
|
|
478
|
-
/>
|
|
479
|
-
<TableBody
|
|
480
|
-
includeHighlight={appropriateSide == 'right'}
|
|
481
|
-
columns={rightColumns}
|
|
482
|
-
side="right"
|
|
483
|
-
/>
|
|
484
|
-
<!-- heights={totalRowSizes}
|
|
485
|
-
bind:this={rightTable} -->
|
|
486
|
-
</table>
|
|
487
|
-
<!-- {/if} -->
|
|
488
|
-
</div>
|
|
463
|
+
</table>
|
|
464
|
+
<!-- {/if} -->
|
|
489
465
|
|
|
490
|
-
<!--
|
|
466
|
+
<!-- {#if rightTotalSize > 0} -->
|
|
467
|
+
<table
|
|
468
|
+
class="datatable__table right"
|
|
469
|
+
style="min-width: {rightTotalSize}px"
|
|
470
|
+
>
|
|
471
|
+
<TableHead
|
|
472
|
+
showHighlight={false}
|
|
473
|
+
side="right"
|
|
474
|
+
/>
|
|
475
|
+
<TableBody
|
|
476
|
+
includeHighlight={appropriateSide == 'right'}
|
|
477
|
+
columns={rightColumns}
|
|
478
|
+
side="right"
|
|
479
|
+
/>
|
|
480
|
+
<!-- heights={totalRowSizes}
|
|
481
|
+
bind:this={rightTable} -->
|
|
482
|
+
</table>
|
|
483
|
+
<!-- {/if} -->
|
|
491
484
|
</div>
|
|
492
485
|
|
|
493
|
-
|
|
494
|
-
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
495
|
-
<div
|
|
496
|
-
class:isResizing
|
|
497
|
-
class="resizer"
|
|
498
|
-
onmousedown={(e) => {
|
|
499
|
-
e.preventDefault();
|
|
500
|
-
addOverrideResizeHandler();
|
|
501
|
-
}}
|
|
502
|
-
></div>
|
|
503
|
-
{/if}
|
|
486
|
+
<!-- TODO add filter callbacks -->
|
|
504
487
|
</div>
|
|
488
|
+
|
|
489
|
+
{#if nested}
|
|
490
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
491
|
+
<div
|
|
492
|
+
class:isResizing
|
|
493
|
+
class="resizer"
|
|
494
|
+
onmousedown={(e) => {
|
|
495
|
+
e.preventDefault();
|
|
496
|
+
addOverrideResizeHandler();
|
|
497
|
+
}}
|
|
498
|
+
></div>
|
|
499
|
+
{/if}
|
|
505
500
|
</div>
|
|
506
|
-
</
|
|
501
|
+
</div>
|
|
507
502
|
|
|
508
503
|
<style>div.grid {
|
|
509
504
|
border-radius: 4px;
|