@likable-hair/svelte 3.0.30 → 3.0.32
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/forms/AsyncAutocomplete.svelte +1 -0
- package/dist/components/composed/forms/AsyncAutocomplete.svelte.d.ts +2 -0
- package/dist/components/composed/list/PaginatedTable.svelte +36 -21
- package/dist/components/composed/list/PaginatedTable.svelte.d.ts +5 -0
- package/dist/components/composed/list/Paginator.svelte +2 -2
- package/dist/components/composed/search/Filters.css +3 -0
- package/dist/components/composed/search/Filters.svelte +5 -0
- package/dist/components/composed/search/Filters.svelte.d.ts +3 -1
- package/dist/components/composed/search/SearchBar.svelte +2 -2
- package/dist/components/simple/lists/SimpleTable.css +1 -0
- package/dist/components/simple/lists/SimpleTable.svelte +4 -0
- package/dist/components/simple/navigation/TabSwitcher.svelte +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ export let headers = [], items = [], sortedBy = void 0, sortDirection = void 0,
|
|
|
14
14
|
{ label: "20", value: 20 },
|
|
15
15
|
{ label: "50", value: 50 },
|
|
16
16
|
{ label: "100", value: 100 }
|
|
17
|
-
], hideRowsPerPage = false, totalElements = void 0, rowsPerPage = 20, filters = [], searchBarColumns = void 0, lang = "en";
|
|
17
|
+
], hideRowsPerPage = false, totalElements = void 0, rowsPerPage = 20, filters = [], searchBarColumns = void 0, searchBarVisible = true, lang = "en";
|
|
18
18
|
let searchBarInput, searchText = void 0;
|
|
19
19
|
let dispatch = createEventDispatcher();
|
|
20
20
|
let rowsPerPageSelection = [];
|
|
@@ -61,22 +61,29 @@ function handleFiltersChange() {
|
|
|
61
61
|
</script>
|
|
62
62
|
|
|
63
63
|
<div class="paginated-table">
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
{#if searchBarVisible}
|
|
65
|
+
<slot name="search-bar" {handleSearchChange}>
|
|
66
|
+
<SearchBar
|
|
67
|
+
placeholder="Type something to search..."
|
|
68
|
+
bind:input={searchBarInput}
|
|
69
|
+
bind:value={searchText}
|
|
70
|
+
>
|
|
71
|
+
</SearchBar>
|
|
72
|
+
</slot>
|
|
73
|
+
{/if}
|
|
71
74
|
<div class="filter-container">
|
|
72
75
|
<Filters
|
|
73
76
|
bind:filters
|
|
74
77
|
on:applyFilter={handleFiltersChange}
|
|
75
78
|
on:removeFilter={handleFiltersChange}
|
|
79
|
+
--filters-default-wrapper-width="100%"
|
|
76
80
|
{lang}
|
|
77
|
-
>
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
>
|
|
82
|
+
<svelte:fragment slot="append">
|
|
83
|
+
<slot name="filter-append"></slot>
|
|
84
|
+
</svelte:fragment>
|
|
85
|
+
</Filters>
|
|
86
|
+
</div>
|
|
80
87
|
<SimpleTable
|
|
81
88
|
bind:headers
|
|
82
89
|
bind:class={clazz.simpleTable}
|
|
@@ -138,15 +145,17 @@ function handleFiltersChange() {
|
|
|
138
145
|
{handlePaginationChange}
|
|
139
146
|
>
|
|
140
147
|
{#if !hideRowsPerPage}
|
|
141
|
-
<
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
<div class="per-page-dropdown">
|
|
149
|
+
<Dropdown
|
|
150
|
+
placeholder="Per pagina"
|
|
151
|
+
clearable={false}
|
|
152
|
+
mandatory={true}
|
|
153
|
+
bind:items={rowsPerPageOptions}
|
|
154
|
+
bind:values={rowsPerPageSelection}
|
|
155
|
+
--button-default-width="90px"
|
|
156
|
+
on:change={handleRowsPerPageChange}
|
|
157
|
+
></Dropdown>
|
|
158
|
+
</div>
|
|
150
159
|
{/if}
|
|
151
160
|
{#if totalElements !== undefined}
|
|
152
161
|
<slot name="rangeDescriptor" {page} {maxPage} {rowsPerPage} {totalElements}>
|
|
@@ -194,10 +203,16 @@ function handleFiltersChange() {
|
|
|
194
203
|
.filter-container {
|
|
195
204
|
margin-top: 10px;
|
|
196
205
|
display: flex;
|
|
197
|
-
align-items:
|
|
206
|
+
align-items: center;
|
|
198
207
|
flex-direction: row;
|
|
199
208
|
gap: 10px;
|
|
209
|
+
width: 100%;
|
|
200
210
|
}
|
|
201
211
|
|
|
212
|
+
@media only screen and (max-width: 768px) {
|
|
213
|
+
.per-page-dropdown {
|
|
214
|
+
display: none;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
202
217
|
|
|
203
218
|
</style>
|
|
@@ -23,6 +23,7 @@ declare const __propDef: {
|
|
|
23
23
|
rowsPerPage?: number | undefined;
|
|
24
24
|
filters?: ComponentProps<Filters>['filters'];
|
|
25
25
|
searchBarColumns?: string[] | undefined;
|
|
26
|
+
searchBarVisible?: boolean | undefined;
|
|
26
27
|
lang?: "it" | "en" | undefined;
|
|
27
28
|
};
|
|
28
29
|
events: {
|
|
@@ -34,6 +35,10 @@ declare const __propDef: {
|
|
|
34
35
|
[evt: string]: CustomEvent<any>;
|
|
35
36
|
};
|
|
36
37
|
slots: {
|
|
38
|
+
'search-bar': {
|
|
39
|
+
handleSearchChange: (searchText: string | undefined) => void;
|
|
40
|
+
};
|
|
41
|
+
'filter-append': {};
|
|
37
42
|
header: {
|
|
38
43
|
head: import("../../simple/lists/SimpleTable.svelte").Header;
|
|
39
44
|
};
|
|
@@ -42,7 +42,7 @@ $:
|
|
|
42
42
|
page = maxPage;
|
|
43
43
|
</script>
|
|
44
44
|
|
|
45
|
-
<div class="container">
|
|
45
|
+
<div class="paginator-container">
|
|
46
46
|
<Button
|
|
47
47
|
icon="mdi-chevron-double-left"
|
|
48
48
|
on:click={hardPrevious}
|
|
@@ -118,7 +118,7 @@ $:
|
|
|
118
118
|
</div>
|
|
119
119
|
|
|
120
120
|
<style>
|
|
121
|
-
.container {
|
|
121
|
+
.paginator-container {
|
|
122
122
|
display: flex;
|
|
123
123
|
align-items: center;
|
|
124
124
|
gap: 5px;
|
|
@@ -276,6 +276,7 @@ function handleDeleteIconClick(e) {
|
|
|
276
276
|
|
|
277
277
|
</div>
|
|
278
278
|
{/if}
|
|
279
|
+
<slot name="append"></slot>
|
|
279
280
|
</div>
|
|
280
281
|
{#if mAndDown}
|
|
281
282
|
<Drawer
|
|
@@ -429,6 +430,10 @@ function handleDeleteIconClick(e) {
|
|
|
429
430
|
align-items: center;
|
|
430
431
|
gap: 20px;
|
|
431
432
|
max-width: 100%;
|
|
433
|
+
width: var(
|
|
434
|
+
--filters-wrapper-width,
|
|
435
|
+
var(--filters-default-wrapper-width)
|
|
436
|
+
)
|
|
432
437
|
}
|
|
433
438
|
|
|
434
439
|
.filter-button {
|
|
@@ -6,7 +6,7 @@ export let input = void 0, value = void 0, placeholder = void 0;
|
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<div
|
|
9
|
-
class="container {clazz.container}"
|
|
9
|
+
class="search-bar-container {clazz.container}"
|
|
10
10
|
>
|
|
11
11
|
<slot name="icon">
|
|
12
12
|
<svg
|
|
@@ -47,7 +47,7 @@ export let input = void 0, value = void 0, placeholder = void 0;
|
|
|
47
47
|
</div>
|
|
48
48
|
|
|
49
49
|
<style>
|
|
50
|
-
.container {
|
|
50
|
+
.search-bar-container {
|
|
51
51
|
box-shadow: inset 0 0 0 1px var(
|
|
52
52
|
--search-bar-ring-color,
|
|
53
53
|
var(--search-bar-default-ring-color)
|
|
@@ -130,6 +130,10 @@ function formatDate(dateTime, dateFormat) {
|
|
|
130
130
|
--simple-table-max-height,
|
|
131
131
|
var(--simple-table-default-max-height)
|
|
132
132
|
);
|
|
133
|
+
overflow-x: var(
|
|
134
|
+
--simple-table-overflow-x,
|
|
135
|
+
var(--simple-table-default-overflow-x)
|
|
136
|
+
);
|
|
133
137
|
}
|
|
134
138
|
|
|
135
139
|
.table {
|
|
@@ -17,6 +17,7 @@ afterUpdate(() => {
|
|
|
17
17
|
setBookmarkPosition();
|
|
18
18
|
});
|
|
19
19
|
import { createEventDispatcher } from "svelte";
|
|
20
|
+
import Icon from "../media/Icon.svelte";
|
|
20
21
|
const dispatch = createEventDispatcher();
|
|
21
22
|
let bookmarkWidth = 0, bookmarkLeft = 0;
|
|
22
23
|
function handleTabClick(clickedTab, nativeEvent) {
|
|
@@ -55,6 +56,9 @@ function setBookmarkPosition() {
|
|
|
55
56
|
on:keypress={(event) => handleTabKeypress(tab, event)}
|
|
56
57
|
bind:this={tabButtons[tab.name]}
|
|
57
58
|
>
|
|
59
|
+
{#if !!tab.icon}
|
|
60
|
+
<Icon name={tab.icon}></Icon>
|
|
61
|
+
{/if}
|
|
58
62
|
{tab.label}
|
|
59
63
|
</div>
|
|
60
64
|
{/each}
|
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,8 @@ export { default as ProductsGrid } from './components/composed/shop/ProductsGrid
|
|
|
48
48
|
export { default as PaginatedTable } from './components/composed/list/PaginatedTable.svelte';
|
|
49
49
|
export { default as Filters } from './components/composed/search/Filters.svelte';
|
|
50
50
|
export { default as GlobalSearchTextField } from './components/composed/search/GlobalSearchTextField.svelte';
|
|
51
|
+
export { default as MenuOrDrawer } from './components/composed/common/MenuOrDrawer.svelte';
|
|
52
|
+
export { default as MenuOrDrawerOptions } from './components/composed/common/MenuOrDrawerOptions.svelte';
|
|
51
53
|
export { default as mediaQuery } from './stores/mediaQuery';
|
|
52
54
|
export { default as theme, toggleTheme, setTheme } from './stores/theme';
|
|
53
55
|
export { default as SimpleTimeLine } from './components/simple/timeline/SimpleTimeLine.svelte';
|
package/dist/index.js
CHANGED
|
@@ -48,6 +48,8 @@ export { default as ProductsGrid } from './components/composed/shop/ProductsGrid
|
|
|
48
48
|
export { default as PaginatedTable } from './components/composed/list/PaginatedTable.svelte';
|
|
49
49
|
export { default as Filters } from './components/composed/search/Filters.svelte';
|
|
50
50
|
export { default as GlobalSearchTextField } from './components/composed/search/GlobalSearchTextField.svelte';
|
|
51
|
+
export { default as MenuOrDrawer } from './components/composed/common/MenuOrDrawer.svelte';
|
|
52
|
+
export { default as MenuOrDrawerOptions } from './components/composed/common/MenuOrDrawerOptions.svelte';
|
|
51
53
|
export { default as mediaQuery } from './stores/mediaQuery';
|
|
52
54
|
export { default as theme, toggleTheme, setTheme } from './stores/theme';
|
|
53
55
|
export { default as SimpleTimeLine } from './components/simple/timeline/SimpleTimeLine.svelte';
|