@lavalogic/scoria 0.18.2 → 0.19.1
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/Headers/TableHead.svelte +6 -0
- package/dist/Components/Table/Table.svelte +128 -133
- package/dist/Components/Table/Types/Context/TableContext.svelte.d.ts +1 -1
- 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
|
@@ -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;
|
|
@@ -32,7 +32,7 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
32
32
|
selectionExtractor: TableInitOptions<T, RowIdType>['selectionExtractor'];
|
|
33
33
|
getUserId: () => string | undefined;
|
|
34
34
|
private _onEditCell;
|
|
35
|
-
|
|
35
|
+
readonly debug: boolean;
|
|
36
36
|
static readonly identifier: unique symbol;
|
|
37
37
|
static init<T extends object, RowIdType extends Primitive>(defaultColumnDefs: DefsWrapper<T>, tableName: string, dataRepo: IDataRepository<T>, options: TableInitOptions<T, RowIdType>): TableContext<T, RowIdType>;
|
|
38
38
|
protected constructor(INTERNAL_ONLY: symbol, defaultColumnDefs: DefsWrapper<T>, tableName: string, dataRepo: IDataRepository<T>, allowCopy: boolean, enableResize: boolean, allowColumnReordering: boolean, allowQuickFiltering: boolean, showQuickFilterByDefault: boolean, allowAdvancedFiltering: boolean, toolbarPosition: ToolbarPosition, displayFooter: boolean, selectionExtractor: TableInitOptions<T, RowIdType>['selectionExtractor'], getUserId: () => string | undefined, _onEditCell: TableInitOptions<T, RowIdType>['onEditCell'], debug: boolean);
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
onclose,
|
|
34
34
|
row,
|
|
35
35
|
wrap,
|
|
36
|
-
submitRef = $bindable()
|
|
36
|
+
submitRef = $bindable(),
|
|
37
37
|
}: TouchModalProps = $props();
|
|
38
38
|
|
|
39
39
|
let dialog: HTMLDialogElement | undefined;
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
}}
|
|
138
138
|
icon={{
|
|
139
139
|
name: 'cross',
|
|
140
|
-
size: Size.DoubleXLarge
|
|
140
|
+
size: Size.DoubleXLarge,
|
|
141
141
|
}}
|
|
142
142
|
onkeydown={handleEsc}
|
|
143
143
|
colourSet={ColourSet.Primary}
|
|
@@ -155,11 +155,19 @@
|
|
|
155
155
|
{#if defaultTimer}
|
|
156
156
|
<!-- class:paused -->
|
|
157
157
|
<div class="bar-container">
|
|
158
|
-
<div
|
|
158
|
+
<div
|
|
159
|
+
class:paused
|
|
160
|
+
class="bar-timer"
|
|
161
|
+
></div>
|
|
159
162
|
</div>
|
|
160
163
|
{/if}
|
|
161
164
|
|
|
162
|
-
<div
|
|
165
|
+
<div
|
|
166
|
+
class="modal-main"
|
|
167
|
+
class:row
|
|
168
|
+
class:wrap
|
|
169
|
+
class:noscroll
|
|
170
|
+
>
|
|
163
171
|
{#if explanation}
|
|
164
172
|
{@render explanation()}
|
|
165
173
|
{/if}
|
|
@@ -175,7 +183,10 @@
|
|
|
175
183
|
<div class="button-barcode-set">
|
|
176
184
|
{#if button.barcodeValue}
|
|
177
185
|
{@const icon = DATAMatrix(button.barcodeValue)}
|
|
178
|
-
<DataMatrixIcon
|
|
186
|
+
<DataMatrixIcon
|
|
187
|
+
title={button.label}
|
|
188
|
+
{icon}
|
|
189
|
+
/>
|
|
179
190
|
{/if}
|
|
180
191
|
{#await button.isValid}
|
|
181
192
|
<button
|
|
@@ -207,7 +218,10 @@
|
|
|
207
218
|
<div class="button-barcode-set">
|
|
208
219
|
{#if button.barcodeValue}
|
|
209
220
|
{@const icon = DATAMatrix(button.barcodeValue)}
|
|
210
|
-
<DataMatrixIcon
|
|
221
|
+
<DataMatrixIcon
|
|
222
|
+
title={button.label}
|
|
223
|
+
{icon}
|
|
224
|
+
/>
|
|
211
225
|
{/if}
|
|
212
226
|
{#await button.isValid}
|
|
213
227
|
<button
|
|
@@ -51,3 +51,4 @@ export declare function hasQuery<FilterValueType>(customFilter: CustomFilter<Fil
|
|
|
51
51
|
export declare function isDateTuple(value: unknown): value is [Date | null, Date | null];
|
|
52
52
|
export declare function isNumberTuple(value: unknown): value is [number | null, number | null];
|
|
53
53
|
export declare function isValidityTuple(v: Validity | ValidityWrapper | undefined): v is ValidityWrapper;
|
|
54
|
+
export declare const loadingText = "loading\u2026";
|