@likable-hair/svelte 3.0.19 → 3.0.21
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/composed/common/MenuOrDrawer.svelte +3 -2
- package/dist/components/composed/common/MenuOrDrawer.svelte.d.ts +2 -1
- package/dist/components/composed/common/MenuOrDrawerOptions.svelte +2 -2
- package/dist/components/composed/common/MenuOrDrawerOptions.svelte.d.ts +1 -1
- package/dist/components/composed/forms/Dropdown.svelte +19 -8
- package/dist/components/composed/forms/Dropdown.svelte.d.ts +7 -0
- package/dist/components/composed/list/PaginatedTable.svelte +179 -129
- package/dist/components/composed/list/PaginatedTable.svelte.d.ts +71 -2
- package/dist/components/composed/list/Paginator.svelte +12 -6
- package/dist/components/composed/search/FilterEditor.svelte +260 -0
- package/dist/components/composed/search/FilterEditor.svelte.d.ts +29 -0
- package/dist/components/composed/search/Filters.css +0 -0
- package/dist/components/composed/search/Filters.svelte +500 -0
- package/dist/components/composed/search/Filters.svelte.d.ts +46 -0
- package/dist/components/composed/search/MobileFilterEditor.svelte +342 -0
- package/dist/components/composed/search/MobileFilterEditor.svelte.d.ts +34 -0
- package/dist/components/composed/search/SearchBar.svelte +12 -11
- package/dist/components/composed/search/SearchBar.svelte.d.ts +1 -0
- package/dist/components/simple/buttons/Button.css +1 -0
- package/dist/components/simple/buttons/Button.svelte +8 -0
- package/dist/components/simple/common/Menu.svelte +29 -10
- package/dist/components/simple/common/Menu.svelte.d.ts +2 -0
- package/dist/components/simple/dates/DatePickerTextField.svelte +91 -61
- package/dist/components/simple/dates/DatePickerTextField.svelte.d.ts +2 -0
- package/dist/components/simple/dialogs/Dialog.svelte.d.ts +1 -1
- package/dist/components/simple/forms/Autocomplete.css +1 -0
- package/dist/components/simple/forms/Autocomplete.svelte +100 -46
- package/dist/components/simple/forms/Autocomplete.svelte.d.ts +4 -0
- package/dist/components/simple/lists/SelectableVerticalList.svelte +52 -9
- package/dist/components/simple/lists/SelectableVerticalList.svelte.d.ts +9 -0
- package/dist/components/simple/lists/SimpleTable.svelte +25 -23
- package/dist/components/simple/lists/SimpleTable.svelte.d.ts +3 -1
- package/dist/components/simple/lists/columnTypes.d.ts +35 -0
- package/dist/components/simple/lists/columnTypes.js +1 -0
- package/dist/components/simple/media/DescriptiveAvatar.svelte.d.ts +1 -1
- package/dist/components/simple/navigation/Chip.css +2 -1
- package/dist/components/simple/navigation/Chip.svelte +16 -5
- package/dist/components/simple/navigation/Chip.svelte.d.ts +1 -0
- package/dist/components/simple/navigation/Drawer.svelte +10 -0
- package/dist/components/simple/navigation/Drawer.svelte.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/utils/filters/builder.d.ts +43 -0
- package/dist/utils/filters/builder.js +137 -0
- package/dist/utils/filters/filters.d.ts +89 -0
- package/dist/utils/filters/filters.js +102 -0
- package/dist/utils/filters/modifiers/join.d.ts +26 -0
- package/dist/utils/filters/modifiers/join.js +1 -0
- package/dist/utils/filters/modifiers/where.d.ts +29 -0
- package/dist/utils/filters/modifiers/where.js +1 -0
- package/dist/utils/filters/validator.d.ts +4 -0
- package/dist/utils/filters/validator.js +30 -0
- package/package.json +2 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import Drawer from "../../simple/navigation/Drawer.svelte";
|
|
3
3
|
import Menu from "../../simple/common/Menu.svelte";
|
|
4
4
|
import MediaQuery from "../../simple/common/MediaQuery.svelte";
|
|
5
|
-
export let open = false, activator, drawerPosition = "bottom", menuAnchor = "bottom-center", _boxShadow = "rgb(var(--global-color-grey-900), .5) 0px 2px 4px", _height = "fit-content", _maxHeight = void 0, _minWidth = "100px",
|
|
5
|
+
export let open = false, activator, drawerPosition = "bottom", menuAnchor = "bottom-center", _boxShadow = "rgb(var(--global-color-grey-900), .5) 0px 2px 4px", _height = "fit-content", _maxHeight = void 0, _minWidth = "100px", _borderRadius = "5px";
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<MediaQuery let:mAndDown>
|
|
@@ -10,6 +10,7 @@ export let open = false, activator, drawerPosition = "bottom", menuAnchor = "bot
|
|
|
10
10
|
<Drawer
|
|
11
11
|
bind:open={open}
|
|
12
12
|
bind:position={drawerPosition}
|
|
13
|
+
on:close
|
|
13
14
|
on:item-click
|
|
14
15
|
>
|
|
15
16
|
<slot isDrawer={true} isMenu={false}></slot>
|
|
@@ -23,7 +24,7 @@ export let open = false, activator, drawerPosition = "bottom", menuAnchor = "bot
|
|
|
23
24
|
_height={_height}
|
|
24
25
|
_maxHeight={_maxHeight}
|
|
25
26
|
_minWidth={_minWidth}
|
|
26
|
-
_borderRadius={
|
|
27
|
+
_borderRadius={_borderRadius}
|
|
27
28
|
anchor={menuAnchor}
|
|
28
29
|
>
|
|
29
30
|
<slot isDrawer={false} isMenu={true}></slot>
|
|
@@ -13,9 +13,10 @@ declare const __propDef: {
|
|
|
13
13
|
_height?: string | undefined;
|
|
14
14
|
_maxHeight?: string | undefined;
|
|
15
15
|
_minWidth?: string | undefined;
|
|
16
|
-
|
|
16
|
+
_borderRadius?: string | undefined;
|
|
17
17
|
};
|
|
18
18
|
events: {
|
|
19
|
+
close: CustomEvent<{}>;
|
|
19
20
|
'item-click': CustomEvent<{
|
|
20
21
|
item: import("../../simple/navigation/Navigator.svelte").Item;
|
|
21
22
|
}>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<script>import "../../../css/main.css";
|
|
4
4
|
import MenuOrDrawer from "./MenuOrDrawer.svelte";
|
|
5
5
|
import SelectableVerticalList from "../../simple/lists/SelectableVerticalList.svelte";
|
|
6
|
-
export let open = false, activator, drawerPosition = "bottom", menuAnchor = "bottom-center", elements = [], _boxShadow = "rgb(var(--global-color-grey-900), .5) 0px 2px 4px", _height = "fit-content", _maxHeight = void 0, _minWidth = "100px",
|
|
6
|
+
export let open = false, activator, drawerPosition = "bottom", menuAnchor = "bottom-center", elements = [], _boxShadow = "rgb(var(--global-color-grey-900), .5) 0px 2px 4px", _height = "fit-content", _maxHeight = void 0, _minWidth = "100px", _borderRadius = "5px";
|
|
7
7
|
let selected;
|
|
8
8
|
let focused;
|
|
9
9
|
$:
|
|
@@ -23,7 +23,7 @@ $:
|
|
|
23
23
|
{_height}
|
|
24
24
|
{_maxHeight}
|
|
25
25
|
{_minWidth}
|
|
26
|
-
{
|
|
26
|
+
{_borderRadius}
|
|
27
27
|
let:isDrawer
|
|
28
28
|
--drawer-default-space={`${Math.min(elements?.length || 0, 5) * 56}px`}
|
|
29
29
|
>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<script>import Autocomplete from "../../../components/simple/forms/Autocomplete.svelte";
|
|
4
4
|
import Button from "../../simple/buttons/Button.svelte";
|
|
5
5
|
import Icon from "../../simple/media/Icon.svelte";
|
|
6
|
-
export let items = [], values = [], multiple = false, searchText = void 0, maxVisibleChips = void 0, placeholder = "Seleziona", icon = void 0;
|
|
6
|
+
export let items = [], values = [], multiple = false, lang = "en", searchText = void 0, maxVisibleChips = void 0, placeholder = lang == "en" ? "Select" : "Seleziona", clearable = true, mandatory = true, icon = void 0, menuOpened = false, openingId = void 0;
|
|
7
7
|
$:
|
|
8
8
|
generatedLabel = values.length == 1 ? values[0].label : `${values.length} Selezionati`;
|
|
9
9
|
function handleCloseClick(event) {
|
|
@@ -19,11 +19,17 @@ function handleCloseClick(event) {
|
|
|
19
19
|
bind:searchText
|
|
20
20
|
bind:multiple
|
|
21
21
|
bind:maxVisibleChips
|
|
22
|
+
bind:mandatory
|
|
22
23
|
searchFunction={() => true}
|
|
24
|
+
on:change
|
|
25
|
+
bind:menuOpened
|
|
26
|
+
bind:openingId
|
|
23
27
|
>
|
|
24
28
|
<svelte:fragment slot="selection-container" let:openMenu let:handleKeyDown>
|
|
25
|
-
<Button
|
|
29
|
+
<Button
|
|
26
30
|
--button-default-background-color="transparent"
|
|
31
|
+
--button-default-focus-background-color="rgb(var(--global-color-primary-400), .3)"
|
|
32
|
+
--button-default-focus-color="rgb(var(--global-color-contrast-900))"
|
|
27
33
|
--button-default-border="2px solid rgb(var(--global-color-primary-400))"
|
|
28
34
|
--button-default-color="rgb(var(--global-color-contrast-800))"
|
|
29
35
|
on:click={openMenu}
|
|
@@ -48,11 +54,13 @@ function handleCloseClick(event) {
|
|
|
48
54
|
{:else}
|
|
49
55
|
<div class="space-between">
|
|
50
56
|
<div>{generatedLabel}</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
{#if clearable}
|
|
58
|
+
<Icon
|
|
59
|
+
name="mdi-close"
|
|
60
|
+
click
|
|
61
|
+
on:click={handleCloseClick}
|
|
62
|
+
></Icon>
|
|
63
|
+
{/if}
|
|
56
64
|
</div>
|
|
57
65
|
{/if}
|
|
58
66
|
</div>
|
|
@@ -67,7 +75,9 @@ function handleCloseClick(event) {
|
|
|
67
75
|
justify-content: flex-start;
|
|
68
76
|
align-items: center;
|
|
69
77
|
gap: 10px;
|
|
70
|
-
width:
|
|
78
|
+
width: 100%;
|
|
79
|
+
text-overflow: ellipsis;
|
|
80
|
+
white-space: pre;
|
|
71
81
|
}
|
|
72
82
|
|
|
73
83
|
.space-between {
|
|
@@ -75,5 +85,6 @@ function handleCloseClick(event) {
|
|
|
75
85
|
display: flex;
|
|
76
86
|
justify-content: space-between;
|
|
77
87
|
align-items: center;
|
|
88
|
+
gap: 10px;
|
|
78
89
|
}
|
|
79
90
|
</style>
|
|
@@ -6,12 +6,19 @@ declare const __propDef: {
|
|
|
6
6
|
items?: Item[] | undefined;
|
|
7
7
|
values?: Item[] | undefined;
|
|
8
8
|
multiple?: boolean | undefined;
|
|
9
|
+
lang?: "it" | "en" | undefined;
|
|
9
10
|
searchText?: string | undefined;
|
|
10
11
|
maxVisibleChips?: number | undefined;
|
|
11
12
|
placeholder?: string | undefined;
|
|
13
|
+
clearable?: boolean | undefined;
|
|
14
|
+
mandatory?: boolean | undefined;
|
|
12
15
|
icon?: string | undefined;
|
|
16
|
+
menuOpened?: boolean | undefined;
|
|
17
|
+
openingId?: string | undefined;
|
|
13
18
|
};
|
|
14
19
|
events: {
|
|
20
|
+
change: CustomEvent<any>;
|
|
21
|
+
} & {
|
|
15
22
|
[evt: string]: CustomEvent<any>;
|
|
16
23
|
};
|
|
17
24
|
slots: {
|
|
@@ -1,152 +1,202 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
width?: string;
|
|
7
|
-
minWidth?: string;
|
|
8
|
-
data?: { [key: string]: any };
|
|
9
|
-
};
|
|
1
|
+
<script context="module">import SimpleTable from "../../simple/lists/SimpleTable.svelte";
|
|
2
|
+
import Icon from "../../simple/media/Icon.svelte";
|
|
3
|
+
import Paginator from "./Paginator.svelte";
|
|
4
|
+
import Dropdown from "../forms/Dropdown.svelte";
|
|
5
|
+
import { createEventDispatcher } from "svelte";
|
|
10
6
|
</script>
|
|
11
7
|
|
|
12
|
-
<script
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function handlePaginationChange() {
|
|
58
|
-
loadRows()
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function handlePerPageChange() {
|
|
62
|
-
page = 1
|
|
63
|
-
loadRows()
|
|
8
|
+
<script>import Filters from "../search/Filters.svelte";
|
|
9
|
+
import SearchBar from "../search/SearchBar.svelte";
|
|
10
|
+
import Converter from "../../../utils/filters/filters";
|
|
11
|
+
let clazz = {};
|
|
12
|
+
export { clazz as class };
|
|
13
|
+
export let headers = [], items = [], sortedBy = void 0, sortDirection = void 0, page = 1, maxPage = void 0, rowsPerPageOptions = [
|
|
14
|
+
{ label: "20", value: 20 },
|
|
15
|
+
{ label: "50", value: 50 },
|
|
16
|
+
{ label: "100", value: 100 }
|
|
17
|
+
], hideRowsPerPage = false, totalElements = void 0, rowsPerPage = 20, filters = [], searchBarColumns = void 0;
|
|
18
|
+
let searchBarInput, searchText = void 0;
|
|
19
|
+
let dispatch = createEventDispatcher();
|
|
20
|
+
let rowsPerPageSelection = [];
|
|
21
|
+
$:
|
|
22
|
+
rowsPerPageSelection = [
|
|
23
|
+
{ label: rowsPerPage.toString(), value: rowsPerPage }
|
|
24
|
+
];
|
|
25
|
+
$:
|
|
26
|
+
if (totalElements !== void 0)
|
|
27
|
+
maxPage = Math.max(Math.round(totalElements / rowsPerPage), 1);
|
|
28
|
+
function handleRowsPerPageChange(e) {
|
|
29
|
+
rowsPerPage = Number(e.detail.selection?.[0].value);
|
|
30
|
+
handlePaginationChange();
|
|
31
|
+
}
|
|
32
|
+
function handlePaginationChange() {
|
|
33
|
+
dispatch("paginationChange", {
|
|
34
|
+
rowsPerPage,
|
|
35
|
+
page
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function handleSearchChange(searchText2) {
|
|
39
|
+
let converter = new Converter();
|
|
40
|
+
let builder;
|
|
41
|
+
builder = converter.createBuilder({
|
|
42
|
+
filters: filters || []
|
|
43
|
+
});
|
|
44
|
+
if (!!searchText2 && !!searchBarColumns && searchBarColumns.length > 0) {
|
|
45
|
+
builder.where((b) => {
|
|
46
|
+
b.where(searchBarColumns[0], "like", searchText2);
|
|
47
|
+
for (let i = 1; i < searchBarColumns.length; i += 1) {
|
|
48
|
+
b.orWhere(searchBarColumns[i], "like", searchText2);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
64
51
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
reload = false
|
|
75
|
-
})
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
$: filters && loadRows()
|
|
79
|
-
|
|
52
|
+
dispatch("filtersChange", {
|
|
53
|
+
builder
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
$:
|
|
57
|
+
handleSearchChange(searchText);
|
|
58
|
+
function handleFiltersChange() {
|
|
59
|
+
handleSearchChange(searchText);
|
|
60
|
+
}
|
|
80
61
|
</script>
|
|
81
62
|
|
|
82
|
-
<div class="
|
|
63
|
+
<div class="paginated-table">
|
|
83
64
|
|
|
65
|
+
<SearchBar
|
|
66
|
+
placeholder="Type something to search..."
|
|
67
|
+
bind:input={searchBarInput}
|
|
68
|
+
bind:value={searchText}
|
|
69
|
+
>
|
|
70
|
+
</SearchBar>
|
|
71
|
+
<div class="filter-container">
|
|
72
|
+
<Filters
|
|
73
|
+
bind:filters
|
|
74
|
+
on:applyFilter={handleFiltersChange}
|
|
75
|
+
on:removeFilter={handleFiltersChange}
|
|
76
|
+
>
|
|
77
|
+
</Filters>
|
|
84
78
|
</div>
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
79
|
+
<SimpleTable
|
|
80
|
+
bind:headers
|
|
81
|
+
bind:class={clazz.simpleTable}
|
|
82
|
+
bind:items
|
|
83
|
+
bind:sortedBy
|
|
84
|
+
bind:sortDirection
|
|
85
|
+
on:sort
|
|
90
86
|
>
|
|
91
|
-
<svelte:fragment slot="
|
|
92
|
-
<slot name="
|
|
87
|
+
<svelte:fragment slot="header" let:head>
|
|
88
|
+
<slot name="header" {head} >
|
|
89
|
+
<span class="header-label">
|
|
90
|
+
<slot name="headerLabel">
|
|
91
|
+
{head.label}
|
|
92
|
+
</slot>
|
|
93
|
+
</span>
|
|
94
|
+
{#if head.sortable}
|
|
95
|
+
<span
|
|
96
|
+
class="header-sort-icon"
|
|
97
|
+
class:active={sortedBy == head.value}
|
|
98
|
+
class:asc={sortDirection == 'asc'}
|
|
99
|
+
class:desc={sortDirection == 'desc'}
|
|
100
|
+
>
|
|
101
|
+
{#if sortDirection == 'asc'}
|
|
102
|
+
<Icon name="mdi-arrow-up"></Icon>
|
|
103
|
+
{:else}
|
|
104
|
+
<Icon name="mdi-arrow-down"></Icon>
|
|
105
|
+
{/if}
|
|
106
|
+
</span>
|
|
107
|
+
{/if}
|
|
108
|
+
</slot>
|
|
93
109
|
</svelte:fragment>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
110
|
+
<svelte:fragment
|
|
111
|
+
slot="custom"
|
|
112
|
+
let:columnIndex
|
|
113
|
+
let:index
|
|
114
|
+
let:header
|
|
115
|
+
let:item
|
|
116
|
+
>
|
|
117
|
+
<slot name="custom" {index} {columnIndex} {header} {item}/>
|
|
97
118
|
</svelte:fragment>
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
<svelte:fragment slot="rowActions" let:index let:item>
|
|
120
|
+
<slot name="rowActions" {index} {item} />
|
|
121
|
+
</svelte:fragment>
|
|
122
|
+
<svelte:fragment slot="append" let:index let:item>
|
|
123
|
+
<slot name="append" {index} {item} />
|
|
124
|
+
</svelte:fragment>
|
|
125
|
+
</SimpleTable>
|
|
126
|
+
|
|
127
|
+
<div class="footer">
|
|
128
|
+
<slot
|
|
129
|
+
name="footer"
|
|
130
|
+
{hideRowsPerPage}
|
|
131
|
+
{rowsPerPageOptions}
|
|
132
|
+
{rowsPerPageSelection}
|
|
133
|
+
{totalElements}
|
|
134
|
+
{page}
|
|
135
|
+
{maxPage}
|
|
136
|
+
{rowsPerPage}
|
|
137
|
+
{handlePaginationChange}
|
|
138
|
+
>
|
|
139
|
+
{#if !hideRowsPerPage}
|
|
140
|
+
<Dropdown
|
|
141
|
+
placeholder="Per pagina"
|
|
142
|
+
clearable={false}
|
|
143
|
+
mandatory={true}
|
|
144
|
+
bind:items={rowsPerPageOptions}
|
|
145
|
+
bind:values={rowsPerPageSelection}
|
|
146
|
+
--button-default-width="90px"
|
|
147
|
+
on:change={handleRowsPerPageChange}
|
|
148
|
+
></Dropdown>
|
|
149
|
+
{/if}
|
|
150
|
+
{#if totalElements !== undefined}
|
|
151
|
+
<slot name="rangeDescriptor" {page} {maxPage} {rowsPerPage} {totalElements}>
|
|
152
|
+
<div class="range-descriptor">
|
|
153
|
+
viewing {((page || 1) - 1) * rowsPerPage} - {(page || 1) * rowsPerPage} of {totalElements}
|
|
154
|
+
</div>
|
|
155
|
+
</slot>
|
|
156
|
+
{/if}
|
|
157
|
+
<Paginator
|
|
158
|
+
bind:page
|
|
159
|
+
bind:maxPage
|
|
160
|
+
on:change={handlePaginationChange}
|
|
161
|
+
></Paginator>
|
|
162
|
+
</slot>
|
|
123
163
|
</div>
|
|
124
164
|
</div>
|
|
125
165
|
|
|
126
166
|
<style>
|
|
127
|
-
.
|
|
167
|
+
.paginated-table {
|
|
168
|
+
width: 100%;
|
|
128
169
|
display: flex;
|
|
129
|
-
|
|
130
|
-
|
|
170
|
+
flex-direction: column;
|
|
171
|
+
gap: 24px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.header-sort-icon {
|
|
175
|
+
display: none;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.header-sort-icon.active {
|
|
179
|
+
display: inline;
|
|
131
180
|
}
|
|
132
181
|
|
|
133
|
-
.
|
|
134
|
-
|
|
135
|
-
|
|
182
|
+
.range-descriptor {
|
|
183
|
+
font-size: .7rem;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.footer {
|
|
136
187
|
display: flex;
|
|
137
|
-
justify-content:
|
|
188
|
+
justify-content: space-between;
|
|
138
189
|
align-items: center;
|
|
139
|
-
|
|
140
|
-
font-size: .9rem;
|
|
190
|
+
width: 100%;
|
|
141
191
|
}
|
|
142
192
|
|
|
143
|
-
.
|
|
144
|
-
|
|
145
|
-
max-height: 100vh;
|
|
193
|
+
.filter-container {
|
|
194
|
+
margin-top: 10px;
|
|
146
195
|
display: flex;
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
font-size: .9rem;
|
|
196
|
+
align-items: left;
|
|
197
|
+
flex-direction: row;
|
|
198
|
+
gap: 10px;
|
|
151
199
|
}
|
|
152
|
-
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
</style>
|
|
@@ -1,10 +1,79 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import SimpleTable from "../../simple/lists/SimpleTable.svelte";
|
|
3
|
+
import Paginator from "./Paginator.svelte";
|
|
4
|
+
import Dropdown from "../forms/Dropdown.svelte";
|
|
5
|
+
import { type ComponentProps } from "svelte";
|
|
6
|
+
type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
|
|
7
|
+
export type Header = ArrayElement<NonNullable<ComponentProps<SimpleTable>['headers']>>;
|
|
8
|
+
import Filters from "../search/Filters.svelte";
|
|
2
9
|
declare const __propDef: {
|
|
3
|
-
props:
|
|
10
|
+
props: {
|
|
11
|
+
class?: {
|
|
12
|
+
simpleTable?: ComponentProps<SimpleTable>['class'];
|
|
13
|
+
} | undefined;
|
|
14
|
+
headers?: ComponentProps<SimpleTable>['headers'];
|
|
15
|
+
items?: ComponentProps<SimpleTable>['items'];
|
|
16
|
+
sortedBy?: ComponentProps<SimpleTable>['sortedBy'];
|
|
17
|
+
sortDirection?: ComponentProps<SimpleTable>['sortDirection'];
|
|
18
|
+
page?: number | undefined;
|
|
19
|
+
maxPage?: ComponentProps<Paginator>['maxPage'];
|
|
20
|
+
rowsPerPageOptions?: ComponentProps<Dropdown>['items'];
|
|
21
|
+
hideRowsPerPage?: boolean | undefined;
|
|
22
|
+
totalElements?: number | undefined;
|
|
23
|
+
rowsPerPage?: number | undefined;
|
|
24
|
+
filters?: ComponentProps<Filters>['filters'];
|
|
25
|
+
searchBarColumns?: string[] | undefined;
|
|
26
|
+
};
|
|
4
27
|
events: {
|
|
28
|
+
sort: CustomEvent<{
|
|
29
|
+
sortedBy: string | undefined;
|
|
30
|
+
sortDirection: string;
|
|
31
|
+
}>;
|
|
32
|
+
} & {
|
|
5
33
|
[evt: string]: CustomEvent<any>;
|
|
6
34
|
};
|
|
7
|
-
slots: {
|
|
35
|
+
slots: {
|
|
36
|
+
header: {
|
|
37
|
+
head: import("../../simple/lists/SimpleTable.svelte").Header;
|
|
38
|
+
};
|
|
39
|
+
headerLabel: {};
|
|
40
|
+
custom: {
|
|
41
|
+
index: any;
|
|
42
|
+
columnIndex: any;
|
|
43
|
+
header: import("../../simple/lists/SimpleTable.svelte").Header;
|
|
44
|
+
item: {
|
|
45
|
+
[key: string]: any;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
rowActions: {
|
|
49
|
+
index: any;
|
|
50
|
+
item: {
|
|
51
|
+
[key: string]: any;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
append: {
|
|
55
|
+
index: any;
|
|
56
|
+
item: {
|
|
57
|
+
[key: string]: any;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
footer: {
|
|
61
|
+
hideRowsPerPage: boolean;
|
|
62
|
+
rowsPerPageOptions: import("../forms/Dropdown.svelte").Item[] | undefined;
|
|
63
|
+
rowsPerPageSelection: import("../forms/Dropdown.svelte").Item[];
|
|
64
|
+
totalElements: number | undefined;
|
|
65
|
+
page: number;
|
|
66
|
+
maxPage: number | undefined;
|
|
67
|
+
rowsPerPage: number;
|
|
68
|
+
handlePaginationChange: () => void;
|
|
69
|
+
};
|
|
70
|
+
rangeDescriptor: {
|
|
71
|
+
page: number;
|
|
72
|
+
maxPage: number | undefined;
|
|
73
|
+
rowsPerPage: number;
|
|
74
|
+
totalElements: number | undefined;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
8
77
|
};
|
|
9
78
|
export type PaginatedTableProps = typeof __propDef.props;
|
|
10
79
|
export type PaginatedTableEvents = typeof __propDef.events;
|
|
@@ -47,7 +47,8 @@ $:
|
|
|
47
47
|
icon="mdi-chevron-double-left"
|
|
48
48
|
on:click={hardPrevious}
|
|
49
49
|
--button-default-background-color="transparent"
|
|
50
|
-
--button-default-focus-background-color="
|
|
50
|
+
--button-default-focus-background-color="rgb(var(--global-color-primary-500), .3)"
|
|
51
|
+
--button-default-focus-color="rgb(var(--global-color-contrast-900))"
|
|
51
52
|
--button-default-hover-background-color="rgb(var(--global-color-primary-500))"
|
|
52
53
|
--button-default-box-shadow="none"
|
|
53
54
|
--button-default-color="rgb(var(--global-color-contrast-900))"
|
|
@@ -56,7 +57,8 @@ $:
|
|
|
56
57
|
icon="mdi-chevron-left"
|
|
57
58
|
on:click={previousPage}
|
|
58
59
|
--button-default-background-color="transparent"
|
|
59
|
-
--button-default-focus-background-color="
|
|
60
|
+
--button-default-focus-background-color="rgb(var(--global-color-primary-500), .3)"
|
|
61
|
+
--button-default-focus-color="rgb(var(--global-color-contrast-900))"
|
|
60
62
|
--button-default-hover-background-color="rgb(var(--global-color-primary-500))"
|
|
61
63
|
--button-default-box-shadow="none"
|
|
62
64
|
--button-default-color="rgb(var(--global-color-contrast-900))"
|
|
@@ -65,7 +67,8 @@ $:
|
|
|
65
67
|
<Button
|
|
66
68
|
on:click={() => goToPage(page - 1)}
|
|
67
69
|
--button-default-background-color="transparent"
|
|
68
|
-
--button-default-focus-background-color="
|
|
70
|
+
--button-default-focus-background-color="rgb(var(--global-color-primary-500), .3)"
|
|
71
|
+
--button-default-focus-color="rgb(var(--global-color-contrast-900))"
|
|
69
72
|
--button-default-hover-background-color="rgb(var(--global-color-primary-500))"
|
|
70
73
|
--button-default-box-shadow="none"
|
|
71
74
|
--button-default-color="rgb(var(--global-color-contrast-900))"
|
|
@@ -82,7 +85,8 @@ $:
|
|
|
82
85
|
<Button
|
|
83
86
|
on:click={() => goToPage(page + 1)}
|
|
84
87
|
--button-default-background-color="transparent"
|
|
85
|
-
--button-default-focus-background-color="
|
|
88
|
+
--button-default-focus-background-color="rgb(var(--global-color-primary-500), .3)"
|
|
89
|
+
--button-default-focus-color="rgb(var(--global-color-contrast-900))"
|
|
86
90
|
--button-default-hover-background-color="rgb(var(--global-color-primary-500))"
|
|
87
91
|
--button-default-box-shadow="none"
|
|
88
92
|
--button-default-color="rgb(var(--global-color-contrast-900))"
|
|
@@ -93,7 +97,8 @@ $:
|
|
|
93
97
|
on:click={nextPage}
|
|
94
98
|
icon="mdi-chevron-right"
|
|
95
99
|
--button-default-background-color="transparent"
|
|
96
|
-
--button-default-focus-background-color="
|
|
100
|
+
--button-default-focus-background-color="rgb(var(--global-color-primary-500), .3)"
|
|
101
|
+
--button-default-focus-color="rgb(var(--global-color-contrast-900))"
|
|
97
102
|
--button-default-hover-background-color="rgb(var(--global-color-primary-500))"
|
|
98
103
|
--button-default-box-shadow="none"
|
|
99
104
|
--button-default-color="rgb(var(--global-color-contrast-900))"
|
|
@@ -103,7 +108,8 @@ $:
|
|
|
103
108
|
on:click={hardNext}
|
|
104
109
|
icon="mdi-chevron-double-right"
|
|
105
110
|
--button-default-background-color="transparent"
|
|
106
|
-
--button-default-focus-background-color="
|
|
111
|
+
--button-default-focus-background-color="rgb(var(--global-color-primary-500), .3)"
|
|
112
|
+
--button-default-focus-color="rgb(var(--global-color-contrast-900))"
|
|
107
113
|
--button-default-hover-background-color="rgb(var(--global-color-primary-500))"
|
|
108
114
|
--button-default-box-shadow="none"
|
|
109
115
|
--button-default-color="rgb(var(--global-color-contrast-900))"
|