@bexis2/bexis2-core-ui 0.4.81 → 0.4.82
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/README.md +4 -0
- package/dist/components/Table/TableContent.svelte +35 -13
- package/dist/components/Table/TableFilterServer.svelte +3 -0
- package/dist/components/Table/TableFilterServer.svelte.d.ts +1 -0
- package/dist/components/Table/TablePaginationServer.svelte +7 -3
- package/dist/components/Table/TablePaginationServer.svelte.d.ts +1 -0
- package/package.json +1 -1
- package/src/lib/components/Table/TableContent.svelte +57 -24
- package/src/lib/components/Table/TableFilterServer.svelte +3 -0
- package/src/lib/components/Table/TablePaginationServer.svelte +9 -3
- package/dist/__package_types_tmp__/TableView.svelte.d.ts +0 -23
- package/dist/__package_types_tmp__/components/CodeEditor/CodeEditor.svelte.d.ts +0 -32
- package/dist/__package_types_tmp__/components/Facets/Facets.svelte.d.ts +0 -27
- package/dist/__package_types_tmp__/components/Facets/ShowMore.svelte.d.ts +0 -19
- package/dist/__package_types_tmp__/components/File/FileIcon.svelte.d.ts +0 -23
- package/dist/__package_types_tmp__/components/File/FileInfo.svelte.d.ts +0 -27
- package/dist/__package_types_tmp__/components/File/FileUploader.svelte.d.ts +0 -28
- package/dist/__package_types_tmp__/components/ListView.svelte.d.ts +0 -14
- package/dist/__package_types_tmp__/components/Table/ColumnsMenu.svelte.d.ts +0 -21
- package/dist/__package_types_tmp__/components/Table/Table.svelte.d.ts +0 -19
- package/dist/__package_types_tmp__/components/Table/TableContent.svelte.d.ts +0 -19
- package/dist/__package_types_tmp__/components/Table/TableFilter.svelte.d.ts +0 -23
- package/dist/__package_types_tmp__/components/Table/TableFilterServer.svelte.d.ts +0 -23
- package/dist/__package_types_tmp__/components/Table/TablePagination.svelte.d.ts +0 -19
- package/dist/__package_types_tmp__/components/Table/TablePaginationServer.svelte.d.ts +0 -20
- package/dist/__package_types_tmp__/components/Table/filter.d.ts +0 -4
- package/dist/__package_types_tmp__/components/Table/utils.d.ts +0 -34
- package/dist/__package_types_tmp__/components/form/Checkbox.svelte.d.ts +0 -26
- package/dist/__package_types_tmp__/components/form/CheckboxKvPList.svelte.d.ts +0 -24
- package/dist/__package_types_tmp__/components/form/CheckboxList.svelte.d.ts +0 -22
- package/dist/__package_types_tmp__/components/form/DateInput.svelte.d.ts +0 -28
- package/dist/__package_types_tmp__/components/form/Dropdown.svelte.d.ts +0 -47
- package/dist/__package_types_tmp__/components/form/DropdownKvP.svelte.d.ts +0 -49
- package/dist/__package_types_tmp__/components/form/InputContainer.svelte.d.ts +0 -23
- package/dist/__package_types_tmp__/components/form/MultiSelect.svelte.d.ts +0 -81
- package/dist/__package_types_tmp__/components/form/NumberInput.svelte.d.ts +0 -31
- package/dist/__package_types_tmp__/components/form/TextArea.svelte.d.ts +0 -29
- package/dist/__package_types_tmp__/components/form/TextInput.svelte.d.ts +0 -29
- package/dist/__package_types_tmp__/components/page/Alert.svelte.d.ts +0 -22
- package/dist/__package_types_tmp__/components/page/BackToTop.svelte.d.ts +0 -23
- package/dist/__package_types_tmp__/components/page/Docs.svelte.d.ts +0 -18
- package/dist/__package_types_tmp__/components/page/ErrorMessage.svelte.d.ts +0 -16
- package/dist/__package_types_tmp__/components/page/Footer.svelte.d.ts +0 -14
- package/dist/__package_types_tmp__/components/page/GoToTop.svelte.d.ts +0 -23
- package/dist/__package_types_tmp__/components/page/Header.svelte.d.ts +0 -14
- package/dist/__package_types_tmp__/components/page/HelpPopUp.svelte.d.ts +0 -16
- package/dist/__package_types_tmp__/components/page/Notification.svelte.d.ts +0 -14
- package/dist/__package_types_tmp__/components/page/Page.svelte.d.ts +0 -30
- package/dist/__package_types_tmp__/components/page/PageCaller.d.ts +0 -3
- package/dist/__package_types_tmp__/components/page/Spinner.svelte.d.ts +0 -19
- package/dist/__package_types_tmp__/components/page/TablePlaceholder.svelte.d.ts +0 -17
- package/dist/__package_types_tmp__/components/page/breadcrumb/Breadcrumb.svelte.d.ts +0 -16
- package/dist/__package_types_tmp__/components/page/breadcrumb/BreadcrumbDataCaller.d.ts +0 -1
- package/dist/__package_types_tmp__/components/page/menu/Menu.svelte.d.ts +0 -14
- package/dist/__package_types_tmp__/components/page/menu/MenuAccountBar.svelte.d.ts +0 -17
- package/dist/__package_types_tmp__/components/page/menu/MenuBar.svelte.d.ts +0 -17
- package/dist/__package_types_tmp__/components/page/menu/MenuDataCaller.d.ts +0 -1
- package/dist/__package_types_tmp__/components/page/menu/MenuItem.svelte.d.ts +0 -18
- package/dist/__package_types_tmp__/components/page/menu/MenuSublist.svelte.d.ts +0 -17
- package/dist/__package_types_tmp__/components/page/menu/SettingsBar.svelte.d.ts +0 -17
- package/dist/__package_types_tmp__/components/toggle/Toggle.svelte.d.ts +0 -31
- package/dist/__package_types_tmp__/index.d.ts +0 -48
- package/dist/__package_types_tmp__/models/Enums.d.ts +0 -51
- package/dist/__package_types_tmp__/models/Models.d.ts +0 -196
- package/dist/__package_types_tmp__/models/Page.d.ts +0 -32
- package/dist/__package_types_tmp__/services/Api.d.ts +0 -7
- package/dist/__package_types_tmp__/services/BaseCaller.d.ts +0 -1
- package/dist/__package_types_tmp__/stores/apiStores.d.ts +0 -8
- package/dist/__package_types_tmp__/stores/pageStores.d.ts +0 -34
- package/dist/__package_types_tmp__/themes/theme-bexis2.d.ts +0 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script>import { afterUpdate, createEventDispatcher, onDestroy } from "svelte";
|
|
1
|
+
<script>import { afterUpdate, createEventDispatcher, onDestroy, onMount } from "svelte";
|
|
2
2
|
import { readable, writable } from "svelte/store";
|
|
3
3
|
import Fa from "svelte-fa";
|
|
4
4
|
import { faCompress, faDownload, faXmark } from "@fortawesome/free-solid-svg-icons";
|
|
@@ -167,7 +167,8 @@ const tableColumns = [
|
|
|
167
167
|
pageIndex,
|
|
168
168
|
toFilterableValueFn,
|
|
169
169
|
filters,
|
|
170
|
-
toStringFn
|
|
170
|
+
toStringFn,
|
|
171
|
+
data
|
|
171
172
|
}) : createRender(colFilterComponent ?? TableFilter, {
|
|
172
173
|
filterValue: filterValue2,
|
|
173
174
|
id,
|
|
@@ -208,7 +209,8 @@ const tableColumns = [
|
|
|
208
209
|
values,
|
|
209
210
|
updateTable: updateTableWithParams,
|
|
210
211
|
pageIndex,
|
|
211
|
-
filters
|
|
212
|
+
filters,
|
|
213
|
+
data
|
|
212
214
|
}) : createRender(TableFilter, {
|
|
213
215
|
filterValue: filterValue2,
|
|
214
216
|
id,
|
|
@@ -249,6 +251,7 @@ const { filterValue } = pluginStates.tableFilter;
|
|
|
249
251
|
const { exportedData } = pluginStates.export;
|
|
250
252
|
const { pageIndex, pageSize } = pluginStates.page;
|
|
251
253
|
const { hiddenColumnIds } = pluginStates.hideColumns;
|
|
254
|
+
let prevSort = void 0;
|
|
252
255
|
const sortServer = (order, id) => {
|
|
253
256
|
if (!sendModel) throw new Error("Server-side configuration is missing");
|
|
254
257
|
if (order === void 0) {
|
|
@@ -256,10 +259,22 @@ const sortServer = (order, id) => {
|
|
|
256
259
|
} else {
|
|
257
260
|
sendModel.order = [{ column: id, direction: order }];
|
|
258
261
|
}
|
|
259
|
-
|
|
260
|
-
|
|
262
|
+
if (JSON.stringify(sendModel.order) !== JSON.stringify(prevSort) && prevSort !== void 0) {
|
|
263
|
+
$pageIndex = 0;
|
|
264
|
+
$data = [];
|
|
265
|
+
updateTableWithParams();
|
|
266
|
+
}
|
|
267
|
+
if (order === void 0) {
|
|
268
|
+
prevSort = [];
|
|
269
|
+
} else {
|
|
270
|
+
prevSort = sendModel.order;
|
|
271
|
+
}
|
|
261
272
|
};
|
|
262
273
|
const updateTableWithParams = async () => {
|
|
274
|
+
if ($data.length > 0 && serverSide) {
|
|
275
|
+
console.log("Table is not empty");
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
263
278
|
isFetching = true;
|
|
264
279
|
const result = await utils.updateTable(
|
|
265
280
|
$pageSize,
|
|
@@ -327,7 +342,11 @@ onDestroy(() => {
|
|
|
327
342
|
resizeRowsObserver.disconnect();
|
|
328
343
|
});
|
|
329
344
|
$: sortKeys = pluginStates.sort.sortKeys;
|
|
330
|
-
|
|
345
|
+
onMount(() => {
|
|
346
|
+
if (serverSide) {
|
|
347
|
+
updateTableWithParams();
|
|
348
|
+
}
|
|
349
|
+
});
|
|
331
350
|
$: serverSide && sortServer($sortKeys[0]?.order, $sortKeys[0]?.id);
|
|
332
351
|
$: $hiddenColumnIds = shownColumns.filter((col) => !col.visible).map((col) => col.id);
|
|
333
352
|
</script>
|
|
@@ -503,13 +522,15 @@ $: $hiddenColumnIds = shownColumns.filter((col) => !col.visible).map((col) => co
|
|
|
503
522
|
class:cursor-pointer={!props.sort.disabled}
|
|
504
523
|
on:click={props.sort.toggle}
|
|
505
524
|
on:keydown={props.sort.toggle}
|
|
506
|
-
title={props.sort.disabled
|
|
507
|
-
?
|
|
508
|
-
: props.sort.order === '
|
|
509
|
-
|
|
510
|
-
|
|
525
|
+
title={props.sort.disabled
|
|
526
|
+
? undefined
|
|
527
|
+
: props.sort.order === 'asc'
|
|
528
|
+
? `Sort by ${cell.label} column in descending order`
|
|
529
|
+
: props.sort.order === 'desc'
|
|
530
|
+
? `Remove sorting by ${cell.label} column`
|
|
531
|
+
: `Sort by ${cell.label} column in ascending order`}
|
|
511
532
|
>
|
|
512
|
-
{cell.render().replaceAll(
|
|
533
|
+
{cell.render().replaceAll('%%%', '.')}
|
|
513
534
|
</span>
|
|
514
535
|
<div class="w-2">
|
|
515
536
|
{#if props.sort.order === 'asc'}
|
|
@@ -564,7 +585,7 @@ $: $hiddenColumnIds = shownColumns.filter((col) => !col.visible).map((col) => co
|
|
|
564
585
|
utils.minWidth(cell.id, columns)
|
|
565
586
|
? utils.minWidth(cell.id, columns)
|
|
566
587
|
: $colWidths[index]
|
|
567
|
-
|
|
588
|
+
}px;`
|
|
568
589
|
: ''}
|
|
569
590
|
>
|
|
570
591
|
<Render of={cell.render()} />
|
|
@@ -607,6 +628,7 @@ $: $hiddenColumnIds = shownColumns.filter((col) => !col.visible).map((col) => co
|
|
|
607
628
|
itemCount={$serverItemCount}
|
|
608
629
|
updateTable={updateTableWithParams}
|
|
609
630
|
id={tableId}
|
|
631
|
+
{data}
|
|
610
632
|
/>
|
|
611
633
|
{:else}
|
|
612
634
|
<TablePagination
|
|
@@ -10,6 +10,7 @@ export let filters;
|
|
|
10
10
|
export let updateTable;
|
|
11
11
|
export let pageIndex;
|
|
12
12
|
export let toStringFn = void 0;
|
|
13
|
+
export let data;
|
|
13
14
|
let active = false;
|
|
14
15
|
let type = "string";
|
|
15
16
|
let isDate = false;
|
|
@@ -165,12 +166,14 @@ const clearFilters = () => {
|
|
|
165
166
|
dropdowns = [];
|
|
166
167
|
$filters[id] = {};
|
|
167
168
|
$pageIndex = 0;
|
|
169
|
+
$data = [];
|
|
168
170
|
updateTable().then(() => {
|
|
169
171
|
active = false;
|
|
170
172
|
});
|
|
171
173
|
};
|
|
172
174
|
const applyFilters = () => {
|
|
173
175
|
$pageIndex = 0;
|
|
176
|
+
$data = [];
|
|
174
177
|
updateTable().then(() => {
|
|
175
178
|
active = true;
|
|
176
179
|
});
|
|
@@ -6,6 +6,7 @@ export let pageConfig;
|
|
|
6
6
|
export let pageSizes;
|
|
7
7
|
export let id;
|
|
8
8
|
export let updateTable;
|
|
9
|
+
export let data;
|
|
9
10
|
let indexInformation = "";
|
|
10
11
|
const { pageIndex, pageCount, pageSize } = pageConfig;
|
|
11
12
|
let pageSizeDropdownValue = $pageSize;
|
|
@@ -21,6 +22,10 @@ const getIndexInfomationString = () => {
|
|
|
21
22
|
itemCount
|
|
22
23
|
)} of ${Math.min($pageCount * $pageSize, itemCount)}`;
|
|
23
24
|
};
|
|
25
|
+
function updateTableServer() {
|
|
26
|
+
$data = [];
|
|
27
|
+
updateTable();
|
|
28
|
+
}
|
|
24
29
|
$: paginationSettings = {
|
|
25
30
|
size: itemCount,
|
|
26
31
|
limit: $pageSize,
|
|
@@ -29,7 +34,6 @@ $: paginationSettings = {
|
|
|
29
34
|
};
|
|
30
35
|
$: $pageSize = pageSizeDropdownValue;
|
|
31
36
|
$: $pageCount, $pageIndex, $pageSize, itemCount, indexInformation = getIndexInfomationString();
|
|
32
|
-
updateTable();
|
|
33
37
|
</script>
|
|
34
38
|
|
|
35
39
|
<div class="grid grid-cols-3 w-full items-stretch gap-10">
|
|
@@ -49,7 +53,7 @@ updateTable();
|
|
|
49
53
|
<ListBoxItem
|
|
50
54
|
bind:group={pageSizeDropdownValue}
|
|
51
55
|
name="medium" value={size}
|
|
52
|
-
on:click={() => { $pageSize = size;
|
|
56
|
+
on:click={() => { $pageSize = size; updateTableServer(); }}
|
|
53
57
|
>{size}</ListBoxItem
|
|
54
58
|
>
|
|
55
59
|
{/each}
|
|
@@ -59,7 +63,7 @@ updateTable();
|
|
|
59
63
|
</div>
|
|
60
64
|
<div class="flex justify-center">
|
|
61
65
|
<Paginator
|
|
62
|
-
on:page={(page) => {$pageIndex = page.detail;
|
|
66
|
+
on:page={(page) => {$pageIndex = page.detail; updateTableServer(); }}
|
|
63
67
|
settings={paginationSettings}
|
|
64
68
|
select="hidden"
|
|
65
69
|
active="!variant-filled-secondary !text-on-secondary-token"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bexis2/bexis2-core-ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.82",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).",
|
|
6
6
|
"keywords": [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { afterUpdate, createEventDispatcher, onDestroy } from 'svelte';
|
|
2
|
+
import { afterUpdate, createEventDispatcher, onDestroy, onMount } from 'svelte';
|
|
3
3
|
import { readable, writable } from 'svelte/store';
|
|
4
4
|
|
|
5
5
|
import Fa from 'svelte-fa';
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
const serverItemCount = serverSide
|
|
81
81
|
? readable<Number>(0, (set) => {
|
|
82
82
|
serverItems!.subscribe((val) => set(val));
|
|
83
|
-
|
|
83
|
+
})
|
|
84
84
|
: undefined;
|
|
85
85
|
|
|
86
86
|
// Initializing the table
|
|
@@ -170,8 +170,8 @@
|
|
|
170
170
|
return renderComponent
|
|
171
171
|
? createRender(renderComponent, { value, row, column, dispatchFn: actionDispatcher })
|
|
172
172
|
: toStringFn
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
? toStringFn(value)
|
|
174
|
+
: value;
|
|
175
175
|
},
|
|
176
176
|
plugins: {
|
|
177
177
|
// Sorting config
|
|
@@ -203,8 +203,9 @@
|
|
|
203
203
|
pageIndex,
|
|
204
204
|
toFilterableValueFn,
|
|
205
205
|
filters,
|
|
206
|
-
toStringFn
|
|
207
|
-
|
|
206
|
+
toStringFn,
|
|
207
|
+
data
|
|
208
|
+
})
|
|
208
209
|
: createRender(colFilterComponent ?? TableFilter, {
|
|
209
210
|
filterValue,
|
|
210
211
|
id,
|
|
@@ -214,9 +215,9 @@
|
|
|
214
215
|
filters,
|
|
215
216
|
toStringFn,
|
|
216
217
|
pageIndex
|
|
217
|
-
|
|
218
|
+
});
|
|
218
219
|
}
|
|
219
|
-
|
|
220
|
+
}
|
|
220
221
|
: undefined,
|
|
221
222
|
tableFilter: {
|
|
222
223
|
// Search filter config
|
|
@@ -249,8 +250,9 @@
|
|
|
249
250
|
values,
|
|
250
251
|
updateTable: updateTableWithParams,
|
|
251
252
|
pageIndex,
|
|
252
|
-
filters
|
|
253
|
-
|
|
253
|
+
filters,
|
|
254
|
+
data
|
|
255
|
+
})
|
|
254
256
|
: createRender(TableFilter, {
|
|
255
257
|
filterValue,
|
|
256
258
|
id,
|
|
@@ -258,7 +260,7 @@
|
|
|
258
260
|
values,
|
|
259
261
|
filters,
|
|
260
262
|
pageIndex
|
|
261
|
-
|
|
263
|
+
});
|
|
262
264
|
}
|
|
263
265
|
}
|
|
264
266
|
}
|
|
@@ -302,8 +304,9 @@
|
|
|
302
304
|
// Column visibility configuration
|
|
303
305
|
const { hiddenColumnIds } = pluginStates.hideColumns;
|
|
304
306
|
|
|
307
|
+
let prevSort: { column: string; direction: 'asc' | 'desc' }[] | undefined = undefined;
|
|
305
308
|
const sortServer = (order: 'asc' | 'desc' | undefined, id: string) => {
|
|
306
|
-
|
|
309
|
+
// console.log('Sorting server with', { order, id, sendModel, prevSort });
|
|
307
310
|
if (!sendModel) throw new Error('Server-side configuration is missing');
|
|
308
311
|
// Set parameter for sorting
|
|
309
312
|
if (order === undefined) {
|
|
@@ -312,14 +315,37 @@
|
|
|
312
315
|
sendModel.order = [{ column: id, direction: order }];
|
|
313
316
|
}
|
|
314
317
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
318
|
+
if (JSON.stringify(sendModel.order) !== JSON.stringify(prevSort) && prevSort !== undefined) {
|
|
319
|
+
// Reset pagination
|
|
320
|
+
$pageIndex = 0;
|
|
321
|
+
// console.log('Sorting server with', { order, id, sendModel, prevSort });
|
|
322
|
+
$data = [];
|
|
323
|
+
updateTableWithParams();
|
|
324
|
+
}
|
|
325
|
+
if (order === undefined) {
|
|
326
|
+
prevSort = [];
|
|
327
|
+
} else {
|
|
328
|
+
prevSort = sendModel.order;
|
|
329
|
+
}
|
|
319
330
|
};
|
|
320
331
|
|
|
321
332
|
// Function to update the table with the provided parameters for easily passing to other components
|
|
322
333
|
const updateTableWithParams = async () => {
|
|
334
|
+
// console.trace('Checking who called updateTableWithParams:');
|
|
335
|
+
// console.log('Updating table with params', {
|
|
336
|
+
// pageSize: $pageSize,
|
|
337
|
+
// pageIndex: $pageIndex,
|
|
338
|
+
// filters: $filters,
|
|
339
|
+
// sendModel
|
|
340
|
+
// });
|
|
341
|
+
|
|
342
|
+
if ($data.length > 0 && serverSide) {
|
|
343
|
+
console.log('Table is not empty');
|
|
344
|
+
// $data = [];
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
// throw new Error("Stack trace inspection");
|
|
323
349
|
isFetching = true;
|
|
324
350
|
const result = await utils.updateTable(
|
|
325
351
|
$pageSize,
|
|
@@ -407,7 +433,11 @@
|
|
|
407
433
|
});
|
|
408
434
|
|
|
409
435
|
$: sortKeys = pluginStates.sort.sortKeys;
|
|
410
|
-
|
|
436
|
+
onMount(() => {
|
|
437
|
+
if (serverSide) {
|
|
438
|
+
updateTableWithParams();
|
|
439
|
+
}
|
|
440
|
+
});
|
|
411
441
|
$: serverSide && sortServer($sortKeys[0]?.order, $sortKeys[0]?.id);
|
|
412
442
|
$: $hiddenColumnIds = shownColumns.filter((col) => !col.visible).map((col) => col.id);
|
|
413
443
|
</script>
|
|
@@ -583,13 +613,15 @@
|
|
|
583
613
|
class:cursor-pointer={!props.sort.disabled}
|
|
584
614
|
on:click={props.sort.toggle}
|
|
585
615
|
on:keydown={props.sort.toggle}
|
|
586
|
-
title={props.sort.disabled
|
|
587
|
-
?
|
|
588
|
-
: props.sort.order === '
|
|
589
|
-
|
|
590
|
-
|
|
616
|
+
title={props.sort.disabled
|
|
617
|
+
? undefined
|
|
618
|
+
: props.sort.order === 'asc'
|
|
619
|
+
? `Sort by ${cell.label} column in descending order`
|
|
620
|
+
: props.sort.order === 'desc'
|
|
621
|
+
? `Remove sorting by ${cell.label} column`
|
|
622
|
+
: `Sort by ${cell.label} column in ascending order`}
|
|
591
623
|
>
|
|
592
|
-
{cell.render().replaceAll(
|
|
624
|
+
{cell.render().replaceAll('%%%', '.')}
|
|
593
625
|
</span>
|
|
594
626
|
<div class="w-2">
|
|
595
627
|
{#if props.sort.order === 'asc'}
|
|
@@ -644,7 +676,7 @@
|
|
|
644
676
|
utils.minWidth(cell.id, columns)
|
|
645
677
|
? utils.minWidth(cell.id, columns)
|
|
646
678
|
: $colWidths[index]
|
|
647
|
-
|
|
679
|
+
}px;`
|
|
648
680
|
: ''}
|
|
649
681
|
>
|
|
650
682
|
<Render of={cell.render()} />
|
|
@@ -687,6 +719,7 @@
|
|
|
687
719
|
itemCount={$serverItemCount}
|
|
688
720
|
updateTable={updateTableWithParams}
|
|
689
721
|
id={tableId}
|
|
722
|
+
{data}
|
|
690
723
|
/>
|
|
691
724
|
{:else}
|
|
692
725
|
<TablePagination
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
export let updateTable;
|
|
15
15
|
export let pageIndex;
|
|
16
16
|
export let toStringFn: undefined | ((value: any) => string) = undefined;
|
|
17
|
+
export let data;
|
|
17
18
|
|
|
18
19
|
// If the filter is applied and the displayed values are filtered
|
|
19
20
|
let active = false;
|
|
@@ -200,6 +201,7 @@
|
|
|
200
201
|
$filters[id] = {};
|
|
201
202
|
|
|
202
203
|
$pageIndex = 0;
|
|
204
|
+
$data = [];
|
|
203
205
|
updateTable().then(() => {
|
|
204
206
|
active = false;
|
|
205
207
|
});
|
|
@@ -207,6 +209,7 @@
|
|
|
207
209
|
|
|
208
210
|
const applyFilters = () => {
|
|
209
211
|
$pageIndex = 0;
|
|
212
|
+
$data = [];
|
|
210
213
|
updateTable().then(() => {
|
|
211
214
|
active = true;
|
|
212
215
|
});
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
export let pageSizes;
|
|
10
10
|
export let id;
|
|
11
11
|
export let updateTable; // Function to update table
|
|
12
|
+
export let data;
|
|
12
13
|
|
|
13
14
|
let indexInformation = '';
|
|
14
15
|
|
|
@@ -32,6 +33,11 @@
|
|
|
32
33
|
)} of ${Math.min($pageCount * $pageSize, itemCount)}`;
|
|
33
34
|
};
|
|
34
35
|
|
|
36
|
+
function updateTableServer() {
|
|
37
|
+
$data = [];
|
|
38
|
+
updateTable();
|
|
39
|
+
}
|
|
40
|
+
|
|
35
41
|
$: paginationSettings = {
|
|
36
42
|
size: itemCount,
|
|
37
43
|
limit: $pageSize,
|
|
@@ -41,7 +47,7 @@
|
|
|
41
47
|
$: $pageSize = pageSizeDropdownValue;
|
|
42
48
|
$: $pageCount, $pageIndex, $pageSize, itemCount, (indexInformation = getIndexInfomationString());
|
|
43
49
|
|
|
44
|
-
updateTable();
|
|
50
|
+
// updateTable();
|
|
45
51
|
|
|
46
52
|
</script>
|
|
47
53
|
|
|
@@ -62,7 +68,7 @@
|
|
|
62
68
|
<ListBoxItem
|
|
63
69
|
bind:group={pageSizeDropdownValue}
|
|
64
70
|
name="medium" value={size}
|
|
65
|
-
on:click={() => { $pageSize = size;
|
|
71
|
+
on:click={() => { $pageSize = size; updateTableServer(); }}
|
|
66
72
|
>{size}</ListBoxItem
|
|
67
73
|
>
|
|
68
74
|
{/each}
|
|
@@ -72,7 +78,7 @@
|
|
|
72
78
|
</div>
|
|
73
79
|
<div class="flex justify-center">
|
|
74
80
|
<Paginator
|
|
75
|
-
on:page={(page) => {$pageIndex = page.detail;
|
|
81
|
+
on:page={(page) => {$pageIndex = page.detail; updateTableServer(); }}
|
|
76
82
|
settings={paginationSettings}
|
|
77
83
|
select="hidden"
|
|
78
84
|
active="!variant-filled-secondary !text-on-secondary-token"
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} TableViewProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} TableViewEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} TableViewSlots */
|
|
4
|
-
export default class TableView extends SvelteComponent<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type TableViewProps = typeof __propDef.props;
|
|
11
|
-
export type TableViewEvents = typeof __propDef.events;
|
|
12
|
-
export type TableViewSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponent } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
id: string;
|
|
5
|
-
title?: string;
|
|
6
|
-
initialValue?: string;
|
|
7
|
-
value?: string;
|
|
8
|
-
language?: string;
|
|
9
|
-
dark?: boolean;
|
|
10
|
-
toggle?: boolean;
|
|
11
|
-
actions?: boolean;
|
|
12
|
-
isValid?: boolean;
|
|
13
|
-
styles?: any;
|
|
14
|
-
};
|
|
15
|
-
events: {
|
|
16
|
-
cancel: CustomEvent<any>;
|
|
17
|
-
save: CustomEvent<any>;
|
|
18
|
-
} & {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {
|
|
22
|
-
default: {
|
|
23
|
-
id: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export type CodeEditorProps = typeof __propDef.props;
|
|
28
|
-
export type CodeEditorEvents = typeof __propDef.events;
|
|
29
|
-
export type CodeEditorSlots = typeof __propDef.slots;
|
|
30
|
-
export default class CodeEditor extends SvelteComponent<CodeEditorProps, CodeEditorEvents, CodeEditorSlots> {
|
|
31
|
-
}
|
|
32
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { Writable } from 'svelte/store';
|
|
3
|
-
import type { FacetGroup } from '$models/Models';
|
|
4
|
-
declare const __propDef: {
|
|
5
|
-
props: {
|
|
6
|
-
groupSelection?: boolean;
|
|
7
|
-
groups: Writable<FacetGroup[]>;
|
|
8
|
-
showAll?: boolean;
|
|
9
|
-
open?: boolean;
|
|
10
|
-
showMore?: (groupName: string) => void;
|
|
11
|
-
};
|
|
12
|
-
events: {
|
|
13
|
-
showMoreOpenChange: CustomEvent<any>;
|
|
14
|
-
showMoreSelect: CustomEvent<any>;
|
|
15
|
-
facetSelect: CustomEvent<any>;
|
|
16
|
-
} & {
|
|
17
|
-
[evt: string]: CustomEvent<any>;
|
|
18
|
-
};
|
|
19
|
-
slots: {};
|
|
20
|
-
};
|
|
21
|
-
export type FacetsProps = typeof __propDef.props;
|
|
22
|
-
export type FacetsEvents = typeof __propDef.events;
|
|
23
|
-
export type FacetsSlots = typeof __propDef.slots;
|
|
24
|
-
export default class Facets extends SvelteComponent<FacetsProps, FacetsEvents, FacetsSlots> {
|
|
25
|
-
get showMore(): (groupName: string) => void;
|
|
26
|
-
}
|
|
27
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { SelectedFacetGroup } from '$models/Models';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
group: SelectedFacetGroup;
|
|
6
|
-
handleApply: (group: SelectedFacetGroup) => {};
|
|
7
|
-
handleCancel: (groupName: string) => {};
|
|
8
|
-
};
|
|
9
|
-
events: {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {};
|
|
13
|
-
};
|
|
14
|
-
export type ShowMoreProps = typeof __propDef.props;
|
|
15
|
-
export type ShowMoreEvents = typeof __propDef.events;
|
|
16
|
-
export type ShowMoreSlots = typeof __propDef.slots;
|
|
17
|
-
export default class ShowMore extends SvelteComponent<ShowMoreProps, ShowMoreEvents, ShowMoreSlots> {
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} FileIconProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} FileIconEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} FileIconSlots */
|
|
4
|
-
export default class FileIcon extends SvelteComponent<{
|
|
5
|
-
type?: string | undefined;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type FileIconProps = typeof __propDef.props;
|
|
11
|
-
export type FileIconEvents = typeof __propDef.events;
|
|
12
|
-
export type FileIconSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponent } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
type?: string | undefined;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} FileInfoProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} FileInfoEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} FileInfoSlots */
|
|
4
|
-
export default class FileInfo extends SvelteComponent<{
|
|
5
|
-
type?: string | undefined;
|
|
6
|
-
name?: string | undefined;
|
|
7
|
-
size?: string | undefined;
|
|
8
|
-
}, {
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
}, {}> {
|
|
11
|
-
}
|
|
12
|
-
export type FileInfoProps = typeof __propDef.props;
|
|
13
|
-
export type FileInfoEvents = typeof __propDef.events;
|
|
14
|
-
export type FileInfoSlots = typeof __propDef.slots;
|
|
15
|
-
import { SvelteComponent } from "svelte";
|
|
16
|
-
declare const __propDef: {
|
|
17
|
-
props: {
|
|
18
|
-
type?: string | undefined;
|
|
19
|
-
name?: string | undefined;
|
|
20
|
-
size?: string | undefined;
|
|
21
|
-
};
|
|
22
|
-
events: {
|
|
23
|
-
[evt: string]: CustomEvent<any>;
|
|
24
|
-
};
|
|
25
|
-
slots: {};
|
|
26
|
-
};
|
|
27
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { fileUploaderType } from '../../models/Models.js';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
id?: number;
|
|
6
|
-
version?: number;
|
|
7
|
-
start?: string;
|
|
8
|
-
submit?: string;
|
|
9
|
-
context?: string;
|
|
10
|
-
data: fileUploaderType | undefined;
|
|
11
|
-
};
|
|
12
|
-
events: {
|
|
13
|
-
error: CustomEvent<any>;
|
|
14
|
-
submit: CustomEvent<any>;
|
|
15
|
-
submited: CustomEvent<any>;
|
|
16
|
-
success: CustomEvent<any>;
|
|
17
|
-
submiterror: CustomEvent<any>;
|
|
18
|
-
} & {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export type FileUploaderProps = typeof __propDef.props;
|
|
24
|
-
export type FileUploaderEvents = typeof __propDef.events;
|
|
25
|
-
export type FileUploaderSlots = typeof __propDef.slots;
|
|
26
|
-
export default class FileUploader extends SvelteComponent<FileUploaderProps, FileUploaderEvents, FileUploaderSlots> {
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: Record<string, never>;
|
|
4
|
-
events: {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
};
|
|
7
|
-
slots: {};
|
|
8
|
-
};
|
|
9
|
-
export type ListViewProps = typeof __propDef.props;
|
|
10
|
-
export type ListViewEvents = typeof __propDef.events;
|
|
11
|
-
export type ListViewSlots = typeof __propDef.slots;
|
|
12
|
-
export default class ListView extends SvelteComponent<ListViewProps, ListViewEvents, ListViewSlots> {
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
columns?: {
|
|
5
|
-
id: string;
|
|
6
|
-
label: string;
|
|
7
|
-
visible: boolean;
|
|
8
|
-
}[];
|
|
9
|
-
tableId: string;
|
|
10
|
-
};
|
|
11
|
-
events: {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
};
|
|
14
|
-
slots: {};
|
|
15
|
-
};
|
|
16
|
-
export type ColumnsMenuProps = typeof __propDef.props;
|
|
17
|
-
export type ColumnsMenuEvents = typeof __propDef.events;
|
|
18
|
-
export type ColumnsMenuSlots = typeof __propDef.slots;
|
|
19
|
-
export default class ColumnsMenu extends SvelteComponent<ColumnsMenuProps, ColumnsMenuEvents, ColumnsMenuSlots> {
|
|
20
|
-
}
|
|
21
|
-
export {};
|