@kws3/ui 1.5.5 → 1.5.9
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.
|
@@ -106,19 +106,24 @@
|
|
|
106
106
|
|
|
107
107
|
let query = "",
|
|
108
108
|
_filters = [],
|
|
109
|
-
filterVals = {}
|
|
109
|
+
filterVals = {},
|
|
110
|
+
filterWidthStyle = "";
|
|
110
111
|
|
|
111
112
|
$: usedFilterComponent = filterComponent ? filterComponent : SearchFilter;
|
|
112
|
-
$: filterWidthStyle = hasSearch
|
|
113
|
-
? `max-width:${(1 / (_filters.length + 2)) * 100}%`
|
|
114
|
-
: "";
|
|
115
113
|
$: changed = q && q.trim() != "";
|
|
116
114
|
$: q, qHasChanged();
|
|
117
115
|
$: filters, filtersHaveChanged();
|
|
118
116
|
|
|
117
|
+
function calculateMaxWidths() {
|
|
118
|
+
filterWidthStyle = hasSearch
|
|
119
|
+
? `max-width:${(1 / (_filters.length + 2)) * 100}%`
|
|
120
|
+
: "";
|
|
121
|
+
}
|
|
122
|
+
|
|
119
123
|
function filtersHaveChanged() {
|
|
120
124
|
if (filters) {
|
|
121
125
|
_filters = [];
|
|
126
|
+
let temp = [];
|
|
122
127
|
for (let i in filters) {
|
|
123
128
|
let obj = { name: i, options: [], type: "select" };
|
|
124
129
|
if (Array.isArray(filters[i])) {
|
|
@@ -131,9 +136,12 @@
|
|
|
131
136
|
obj.type = filters[i].type;
|
|
132
137
|
}
|
|
133
138
|
}
|
|
134
|
-
|
|
139
|
+
temp.push(obj);
|
|
135
140
|
}
|
|
141
|
+
_filters = temp;
|
|
136
142
|
}
|
|
143
|
+
|
|
144
|
+
calculateMaxWidths();
|
|
137
145
|
}
|
|
138
146
|
|
|
139
147
|
function qHasChanged() {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
{:else}
|
|
48
48
|
<div class="level-item">
|
|
49
49
|
{#if showTotal}
|
|
50
|
-
<strong>Total {
|
|
50
|
+
<strong>Total {totalItems} {entityName}</strong>
|
|
51
51
|
{:else if showCurrent}
|
|
52
52
|
{#if meta.total > 0}Showing {meta.offset * 1 + 1} to {meta.offset *
|
|
53
53
|
1 +
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
{/if}
|
|
73
73
|
{/if}
|
|
74
74
|
{#if showTotal}
|
|
75
|
-
<strong>{
|
|
75
|
+
<strong>{totalItems} {entityName}</strong>
|
|
76
76
|
{/if}
|
|
77
77
|
</div>
|
|
78
78
|
{:else if showPerPage && showTotal && !showCurrent}
|
|
79
79
|
<div class="level-item pagination-showing">
|
|
80
|
-
<strong>Total {
|
|
80
|
+
<strong>Total {totalItems} {entityName}</strong>
|
|
81
81
|
</div>
|
|
82
82
|
{/if}
|
|
83
83
|
|
|
@@ -204,6 +204,7 @@
|
|
|
204
204
|
_perPageOptions = ret;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
+
$: totalItems = meta && meta.total ? meta.total : 0;
|
|
207
208
|
$: currentPage = Math.floor(meta.offset / meta.limit);
|
|
208
209
|
$: totalPages = Math.ceil(meta.total / (meta.limit || 1));
|
|
209
210
|
$: totalPages, currentPage, breakThreshold, calculatePages();
|
|
@@ -73,6 +73,7 @@ Default value: `<span>{option[search_key] || option}</span>`
|
|
|
73
73
|
{#if !readonly && !disabled}
|
|
74
74
|
<button
|
|
75
75
|
on:click|self|stopPropagation={() => remove(tag)}
|
|
76
|
+
role="button"
|
|
76
77
|
type="button"
|
|
77
78
|
class="delete is-small"
|
|
78
79
|
data-tooltip="{remove_btn_tip} {tag[used_search_key]}" />
|
|
@@ -97,6 +98,7 @@ Default value: `<span>{option[search_key] || option}</span>`
|
|
|
97
98
|
</ul>
|
|
98
99
|
{#if !readonly && !disabled}
|
|
99
100
|
<button
|
|
101
|
+
role="button"
|
|
100
102
|
type="button"
|
|
101
103
|
class="remove-all delete is-small"
|
|
102
104
|
data-tooltip={remove_all_tip}
|
package/helpers/Nl2br.svelte
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kws3/ui",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.9",
|
|
4
4
|
"description": "UI components for use with Svelte v3 applications.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"text-mask-core": "^5.1.2",
|
|
29
29
|
"tippy.js": "^6.3.1"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "6705334ff3fa5284eb9c6610eb0e0a23e9ac5534"
|
|
32
32
|
}
|
package/styles/Select.scss
CHANGED
|
@@ -11,6 +11,13 @@ $kws-select-selecting-background: $primary !default;
|
|
|
11
11
|
$kws-select-selected-color: $primary-dark !default;
|
|
12
12
|
$kws-select-selected-background: $primary-light !default;
|
|
13
13
|
|
|
14
|
+
$__modal-z: 41 !default;
|
|
15
|
+
@if $modal-z {
|
|
16
|
+
$__modal-z: $modal-z;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
$kws-select-options-z-index: $__modal-z + 1 !default;
|
|
20
|
+
|
|
14
21
|
.kws-searchableselect {
|
|
15
22
|
position: relative;
|
|
16
23
|
align-items: center;
|
|
@@ -205,5 +212,6 @@ $kws-select-selected-background: $primary-light !default;
|
|
|
205
212
|
#kws-overlay-root {
|
|
206
213
|
.kws-searchableselect {
|
|
207
214
|
position: absolute;
|
|
215
|
+
z-index: $kws-select-options-z-index;
|
|
208
216
|
}
|
|
209
217
|
}
|