@likable-hair/svelte 3.2.9 → 3.2.11
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/list/PaginatedTable.svelte +2 -1
- package/dist/components/composed/list/PaginatedTable.svelte.d.ts +1 -0
- package/dist/components/simple/charts/GanymedeLineChart.svelte +24 -6
- package/dist/components/simple/charts/GanymedeLineChart.svelte.d.ts +8 -0
- package/dist/components/simple/lists/SimpleTable.svelte +12 -1
- package/dist/components/simple/lists/SimpleTable.svelte.d.ts +1 -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, searchBarVisible = true, searchBarPlaceholder = "Type something to search...", lang = "en", editFilterMode = "one-edit", showActiveFilters = true, resizableColumns = false, resizedColumnSizeWithPadding = {};
|
|
17
|
+
], hideRowsPerPage = false, totalElements = void 0, rowsPerPage = 20, filters = [], searchBarColumns = void 0, searchBarVisible = true, searchBarPlaceholder = "Type something to search...", lang = "en", editFilterMode = "one-edit", showActiveFilters = true, resizableColumns = false, resizedColumnSizeWithPadding = {}, pointerOnRowHover = void 0;
|
|
18
18
|
export let calculateRowStyles = void 0;
|
|
19
19
|
export let calculateRowClasses = void 0;
|
|
20
20
|
let searchBarInput, searchText = void 0;
|
|
@@ -117,6 +117,7 @@ function buildFilters(params) {
|
|
|
117
117
|
bind:items
|
|
118
118
|
bind:sortedBy
|
|
119
119
|
bind:sortDirection
|
|
120
|
+
bind:pointerOnRowHover
|
|
120
121
|
on:sort={handleFiltersChange}
|
|
121
122
|
on:sort
|
|
122
123
|
on:rowClick
|
|
@@ -32,6 +32,7 @@ declare const __propDef: {
|
|
|
32
32
|
resizedColumnSizeWithPadding?: {
|
|
33
33
|
[value: string]: number;
|
|
34
34
|
} | undefined;
|
|
35
|
+
pointerOnRowHover?: boolean | undefined;
|
|
35
36
|
calculateRowStyles?: CalculateRowStyles | undefined;
|
|
36
37
|
calculateRowClasses?: CalculateRowClasses | undefined;
|
|
37
38
|
};
|
|
@@ -28,7 +28,7 @@ onMount(async () => {
|
|
|
28
28
|
export let data = {
|
|
29
29
|
labels: [],
|
|
30
30
|
datasets: []
|
|
31
|
-
}, horizontal = false, responsive = true, maintainAspectRatio = true, showLegend = true, showYTicks = false, showXTicks = false, displayYGrid = true,
|
|
31
|
+
}, horizontal = false, responsive = true, maintainAspectRatio = true, showLegend = true, showYTicks = false, showXTicks = false, displayYGrid = true, displayXGrid = true, gridLineWidth = 1, lineWidth = 3, enableZoom = false, resetZoom = false, xTickStepSize = void 0, yTickStepSize = void 0, xMax = void 0, yMax = void 0, xMin = void 0, yMin = void 0, pointRadius = void 0, hitRadius = void 0, hoverRadius = void 0, tooltipsDisabled = false;
|
|
32
32
|
$:
|
|
33
33
|
gridColor = "rgb(" + (background || "200, 200, 200") + ", .3)";
|
|
34
34
|
let chart;
|
|
@@ -38,10 +38,13 @@ $:
|
|
|
38
38
|
resetZoom = false;
|
|
39
39
|
}
|
|
40
40
|
$:
|
|
41
|
-
if (
|
|
41
|
+
if (mounted) {
|
|
42
42
|
import("chartjs-plugin-zoom").then(({ default: zoomPlugin }) => {
|
|
43
43
|
ChartJS.register(zoomPlugin);
|
|
44
44
|
zoomMounted = true;
|
|
45
|
+
setTimeout(() => {
|
|
46
|
+
chart?.resetZoom();
|
|
47
|
+
}, 20);
|
|
45
48
|
});
|
|
46
49
|
}
|
|
47
50
|
let chartOptions;
|
|
@@ -50,22 +53,35 @@ $:
|
|
|
50
53
|
indexAxis: horizontal ? "y" : "x",
|
|
51
54
|
responsive,
|
|
52
55
|
maintainAspectRatio,
|
|
56
|
+
elements: {
|
|
57
|
+
line: {
|
|
58
|
+
borderWidth: lineWidth
|
|
59
|
+
},
|
|
60
|
+
point: {
|
|
61
|
+
radius: pointRadius,
|
|
62
|
+
hitRadius,
|
|
63
|
+
hoverRadius
|
|
64
|
+
}
|
|
65
|
+
},
|
|
53
66
|
plugins: {
|
|
54
67
|
legend: {
|
|
55
68
|
display: showLegend
|
|
56
69
|
},
|
|
57
70
|
zoom: {
|
|
58
71
|
pan: {
|
|
59
|
-
enabled:
|
|
72
|
+
enabled: enableZoom,
|
|
60
73
|
mode: "x",
|
|
61
74
|
modifierKey: "ctrl"
|
|
62
75
|
},
|
|
63
76
|
zoom: {
|
|
64
77
|
drag: {
|
|
65
|
-
enabled:
|
|
78
|
+
enabled: enableZoom
|
|
66
79
|
},
|
|
67
80
|
mode: "x"
|
|
68
81
|
}
|
|
82
|
+
},
|
|
83
|
+
tooltip: {
|
|
84
|
+
enabled: !tooltipsDisabled
|
|
69
85
|
}
|
|
70
86
|
},
|
|
71
87
|
interaction: {
|
|
@@ -74,7 +90,8 @@ $:
|
|
|
74
90
|
scales: {
|
|
75
91
|
x: {
|
|
76
92
|
max: xMax,
|
|
77
|
-
|
|
93
|
+
min: xMin,
|
|
94
|
+
display: displayXGrid,
|
|
78
95
|
title: {
|
|
79
96
|
display: true
|
|
80
97
|
},
|
|
@@ -91,10 +108,11 @@ $:
|
|
|
91
108
|
},
|
|
92
109
|
y: {
|
|
93
110
|
max: yMax,
|
|
111
|
+
min: yMin,
|
|
94
112
|
display: displayYGrid,
|
|
95
113
|
title: {},
|
|
96
114
|
grid: {
|
|
97
|
-
lineWidth,
|
|
115
|
+
lineWidth: gridLineWidth,
|
|
98
116
|
color: gridColor
|
|
99
117
|
},
|
|
100
118
|
border: {
|
|
@@ -20,6 +20,8 @@ declare const __propDef: {
|
|
|
20
20
|
showYTicks?: boolean | undefined;
|
|
21
21
|
showXTicks?: boolean | undefined;
|
|
22
22
|
displayYGrid?: boolean | undefined;
|
|
23
|
+
displayXGrid?: boolean | undefined;
|
|
24
|
+
gridLineWidth?: number | undefined;
|
|
23
25
|
lineWidth?: number | undefined;
|
|
24
26
|
enableZoom?: boolean | undefined;
|
|
25
27
|
resetZoom?: boolean | undefined;
|
|
@@ -27,6 +29,12 @@ declare const __propDef: {
|
|
|
27
29
|
yTickStepSize?: number | undefined;
|
|
28
30
|
xMax?: number | undefined;
|
|
29
31
|
yMax?: number | undefined;
|
|
32
|
+
xMin?: number | undefined;
|
|
33
|
+
yMin?: number | undefined;
|
|
34
|
+
pointRadius?: number | undefined;
|
|
35
|
+
hitRadius?: number | undefined;
|
|
36
|
+
hoverRadius?: number | undefined;
|
|
37
|
+
tooltipsDisabled?: boolean | undefined;
|
|
30
38
|
};
|
|
31
39
|
events: {
|
|
32
40
|
[evt: string]: CustomEvent<any>;
|
|
@@ -7,7 +7,7 @@ import { createEventDispatcher, onMount } from "svelte";
|
|
|
7
7
|
let clazz = {};
|
|
8
8
|
export { clazz as class };
|
|
9
9
|
const dispatch = createEventDispatcher();
|
|
10
|
-
export let headers = [], items = [], sortedBy = void 0, sortDirection = "asc", resizableColumns = false, resizedColumnSizeWithPadding = {};
|
|
10
|
+
export let headers = [], items = [], sortedBy = void 0, sortDirection = "asc", resizableColumns = false, resizedColumnSizeWithPadding = {}, pointerOnRowHover = false;
|
|
11
11
|
export let calculateRowStyles = void 0;
|
|
12
12
|
export let calculateRowClasses = void 0;
|
|
13
13
|
onMount(() => {
|
|
@@ -184,9 +184,16 @@ function resize(node) {
|
|
|
184
184
|
<tr
|
|
185
185
|
class="item-tr {clazz.row || ''} {classes}"
|
|
186
186
|
on:click={() => handleRowClick(item)}
|
|
187
|
+
on:keydown={(event) => {
|
|
188
|
+
if (event.key === 'Enter') {
|
|
189
|
+
handleRowClick(item);
|
|
190
|
+
}
|
|
191
|
+
}}
|
|
192
|
+
tabindex="0"
|
|
187
193
|
style:background-color={styles.backgroundColor}
|
|
188
194
|
style:color={styles.color}
|
|
189
195
|
style:font-weight={styles.fontWeight}
|
|
196
|
+
class:pointer={pointerOnRowHover}
|
|
190
197
|
>
|
|
191
198
|
{#each headers as header, j}
|
|
192
199
|
<td class="{clazz.cell || ''}">
|
|
@@ -433,4 +440,8 @@ function resize(node) {
|
|
|
433
440
|
td {
|
|
434
441
|
padding-left: 10px;
|
|
435
442
|
}
|
|
443
|
+
|
|
444
|
+
.pointer {
|
|
445
|
+
cursor: pointer;
|
|
446
|
+
}
|
|
436
447
|
</style>
|
|
@@ -39,6 +39,7 @@ declare const __propDef: {
|
|
|
39
39
|
resizedColumnSizeWithPadding?: {
|
|
40
40
|
[value: string]: number;
|
|
41
41
|
} | undefined;
|
|
42
|
+
pointerOnRowHover?: boolean | undefined;
|
|
42
43
|
calculateRowStyles?: CalculateRowStyles | undefined;
|
|
43
44
|
calculateRowClasses?: CalculateRowClasses | undefined;
|
|
44
45
|
};
|