@bexis2/bexis2-core-ui 0.4.19 → 0.4.20
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 +15 -8
- package/dist/components/CodeEditor/CodeEditor.svelte +4 -0
- package/dist/components/Facets/Facets.svelte +23 -10
- package/dist/components/Facets/ShowMore.svelte +30 -17
- package/dist/components/Facets/ShowMore.svelte.d.ts +1 -1
- package/dist/components/File/FileUploader.svelte +1 -1
- package/dist/components/Table/ColumnsMenu.svelte +5 -0
- package/dist/components/Table/TableContent.svelte +13 -3
- package/dist/components/Table/TableFilter.svelte +12 -0
- package/dist/components/Table/TableFilterServer.svelte +13 -1
- package/dist/components/Table/TablePagination.svelte +10 -1
- package/dist/components/Table/TablePaginationServer.svelte +8 -0
- package/dist/components/form/Checkbox.svelte +1 -1
- package/dist/components/form/CheckboxKvPList.svelte +2 -1
- package/dist/components/form/CheckboxList.svelte +2 -2
- package/dist/components/form/DateInput.svelte +1 -1
- package/dist/components/form/DropdownKvP.svelte +1 -1
- package/dist/components/form/InputContainer.svelte +7 -1
- package/dist/components/form/MultiSelect.svelte +100 -106
- package/dist/components/form/NumberInput.svelte +1 -1
- package/dist/components/form/TextArea.svelte +1 -1
- package/dist/components/form/TextInput.svelte +1 -1
- package/dist/components/page/Alert.svelte +1 -1
- package/dist/components/page/BackToTop.svelte +1 -1
- package/dist/components/page/Docs.svelte +1 -1
- package/dist/components/page/GoToTop.svelte +1 -0
- package/dist/components/page/HelpPopUp.svelte +1 -0
- package/dist/components/page/Page.svelte +14 -19
- package/dist/components/page/menu/MenuSublist.svelte +7 -5
- package/package.json +114 -114
- package/src/lib/components/CodeEditor/CodeEditor.svelte +4 -0
- package/src/lib/components/Facets/Facets.svelte +28 -12
- package/src/lib/components/Facets/ShowMore.svelte +31 -17
- package/src/lib/components/File/FileUploader.svelte +1 -1
- package/src/lib/components/Table/ColumnsMenu.svelte +5 -0
- package/src/lib/components/Table/TableContent.svelte +13 -3
- package/src/lib/components/Table/TableFilter.svelte +12 -0
- package/src/lib/components/Table/TableFilterServer.svelte +13 -1
- package/src/lib/components/Table/TablePagination.svelte +10 -1
- package/src/lib/components/Table/TablePaginationServer.svelte +8 -0
- package/src/lib/components/form/Checkbox.svelte +1 -1
- package/src/lib/components/form/CheckboxKvPList.svelte +2 -1
- package/src/lib/components/form/CheckboxList.svelte +2 -2
- package/src/lib/components/form/DateInput.svelte +1 -1
- package/src/lib/components/form/DropdownKvP.svelte +1 -1
- package/src/lib/components/form/InputContainer.svelte +7 -1
- package/src/lib/components/form/MultiSelect.svelte +100 -106
- package/src/lib/components/form/NumberInput.svelte +1 -1
- package/src/lib/components/form/TextArea.svelte +1 -1
- package/src/lib/components/form/TextInput.svelte +1 -1
- package/src/lib/components/page/Alert.svelte +1 -1
- package/src/lib/components/page/BackToTop.svelte +1 -1
- package/src/lib/components/page/Docs.svelte +1 -1
- package/src/lib/components/page/GoToTop.svelte +1 -0
- package/src/lib/components/page/HelpPopUp.svelte +1 -0
- package/src/lib/components/page/Page.svelte +15 -20
- package/src/lib/components/page/menu/MenuSublist.svelte +11 -8
|
@@ -233,6 +233,7 @@
|
|
|
233
233
|
type="button"
|
|
234
234
|
use:popup={popupFeatured}
|
|
235
235
|
id="{popupId}-button"
|
|
236
|
+
aria-label="Open filter menu for column {id}"
|
|
236
237
|
>
|
|
237
238
|
<Fa icon={faFilter} size="12" />
|
|
238
239
|
</button>
|
|
@@ -242,6 +243,7 @@
|
|
|
242
243
|
<button
|
|
243
244
|
class="btn variant-filled-primary btn-sm"
|
|
244
245
|
type="button"
|
|
246
|
+
aria-label="Clear Filters"
|
|
245
247
|
on:click|preventDefault={() => {
|
|
246
248
|
// Set the defaults when cleared
|
|
247
249
|
clearFilters();
|
|
@@ -264,6 +266,7 @@
|
|
|
264
266
|
{#each options[type] as option (option)}
|
|
265
267
|
<option
|
|
266
268
|
value={option.value}
|
|
269
|
+
aria-label={option.label}
|
|
267
270
|
selected={dropdown.option === option.value}
|
|
268
271
|
disabled={Object.keys($filters[id]).includes(option.value) &&
|
|
269
272
|
dropdown.option !== option.value}>{option.label}</option
|
|
@@ -272,10 +275,13 @@
|
|
|
272
275
|
</select>
|
|
273
276
|
{#if dropdowns.length > 1}
|
|
274
277
|
<div
|
|
278
|
+
role="button"
|
|
279
|
+
tabindex="0"
|
|
275
280
|
class="btn variant-filled-warning btn-sm h-full"
|
|
276
281
|
on:click|preventDefault={() => removeFilter(dropdown.option)}
|
|
277
282
|
on:keydown|preventDefault={() => removeFilter(dropdown.option)}
|
|
278
|
-
|
|
283
|
+
aria-label="Remove filter"
|
|
284
|
+
>
|
|
279
285
|
<Fa icon={faXmark} />
|
|
280
286
|
</div>
|
|
281
287
|
{/if}
|
|
@@ -294,6 +300,7 @@
|
|
|
294
300
|
class="input p-1 border border-primary-500"
|
|
295
301
|
on:input={(e) => valueChangeHandler(e, index)}
|
|
296
302
|
bind:value={dropdown.value}
|
|
303
|
+
aria-label="Filter value"
|
|
297
304
|
/>
|
|
298
305
|
{:else}
|
|
299
306
|
<input
|
|
@@ -301,6 +308,7 @@
|
|
|
301
308
|
class="input p-1 border border-primary-500"
|
|
302
309
|
on:input={(e) => valueChangeHandler(e, index)}
|
|
303
310
|
bind:value={dropdown.value}
|
|
311
|
+
aria-label="Filter value"
|
|
304
312
|
/>
|
|
305
313
|
{/if}
|
|
306
314
|
</div>
|
|
@@ -313,6 +321,9 @@
|
|
|
313
321
|
{#if remainingFilters.length}
|
|
314
322
|
<div
|
|
315
323
|
class="btn variant-filled-secondary btn-sm cursor-pointer"
|
|
324
|
+
aria-label="Add filter"
|
|
325
|
+
role="button"
|
|
326
|
+
tabindex="0"
|
|
316
327
|
on:click|stopPropagation={() => {
|
|
317
328
|
addFilter(remainingFilters[0].value, undefined);
|
|
318
329
|
}}
|
|
@@ -326,6 +337,7 @@
|
|
|
326
337
|
<button
|
|
327
338
|
class="btn variant-filled-primary btn-sm"
|
|
328
339
|
type="button"
|
|
340
|
+
aria-label="Apply filters"
|
|
329
341
|
on:click|preventDefault={applyFilters}>Apply</button
|
|
330
342
|
>
|
|
331
343
|
</div>
|
|
@@ -62,7 +62,11 @@
|
|
|
62
62
|
{/each}
|
|
63
63
|
</select> -->
|
|
64
64
|
|
|
65
|
-
<button
|
|
65
|
+
<button
|
|
66
|
+
aria-label="Open menu to select number of items per page"
|
|
67
|
+
class="btn variant-filled-primary w-20 justify-between"
|
|
68
|
+
use:popup={pageSizePopup}
|
|
69
|
+
>
|
|
66
70
|
<span class="capitalize font-semibold">{pageSizeDropdownValue}</span>
|
|
67
71
|
<Fa icon={faChevronDown} size="xs" />
|
|
68
72
|
</button>
|
|
@@ -82,6 +86,7 @@
|
|
|
82
86
|
<button
|
|
83
87
|
class="btn btn-sm variant-filled-primary"
|
|
84
88
|
on:click|preventDefault={goToFirstPage}
|
|
89
|
+
aria-label="Go to first page"
|
|
85
90
|
disabled={goToFirstPageDisabled}
|
|
86
91
|
id="{id}-first"
|
|
87
92
|
>
|
|
@@ -90,6 +95,7 @@
|
|
|
90
95
|
<button
|
|
91
96
|
class="btn btn-sm variant-filled-primary"
|
|
92
97
|
id="{id}-previous"
|
|
98
|
+
aria-label="Go to previous page"
|
|
93
99
|
on:click|preventDefault={goToPreviousPage}
|
|
94
100
|
disabled={goToPreviousPageDisabled}><Fa icon={faAngleLeft} /></button
|
|
95
101
|
>
|
|
@@ -98,17 +104,20 @@
|
|
|
98
104
|
class="input border border-primary-500 rounded flex w-24"
|
|
99
105
|
value={$pageIndex + 1}
|
|
100
106
|
max={$pageCount}
|
|
107
|
+
aria-label="Current page"
|
|
101
108
|
min={1}
|
|
102
109
|
on:change={handleChange}
|
|
103
110
|
/>
|
|
104
111
|
<button
|
|
105
112
|
class="btn btn-sm variant-filled-primary"
|
|
106
113
|
id="{id}-next"
|
|
114
|
+
aria-label="Go to next page"
|
|
107
115
|
on:click|preventDefault={goToNextPage}
|
|
108
116
|
disabled={goToNextPageDisabled}><Fa icon={faAngleRight} /></button
|
|
109
117
|
>
|
|
110
118
|
<button
|
|
111
119
|
class="btn btn-sm variant-filled-primary"
|
|
120
|
+
aria-label="Go to last page"
|
|
112
121
|
id="{id}-last"
|
|
113
122
|
on:click|preventDefault={goToLastPage}
|
|
114
123
|
disabled={goToLastPageDisabled}><Fa icon={faAnglesRight} /></button
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
<select
|
|
74
74
|
name="pageSize"
|
|
75
75
|
id="{id}-pageSize"
|
|
76
|
+
aria-label="Open menu to select number of items per page"
|
|
76
77
|
class="select variant-filled-primary w-min font-bold"
|
|
77
78
|
bind:value={$pageSize}
|
|
78
79
|
>
|
|
@@ -84,21 +85,26 @@
|
|
|
84
85
|
<div class="flex justify-center gap-1">
|
|
85
86
|
<button
|
|
86
87
|
class="btn btn-sm variant-filled-primary"
|
|
88
|
+
title="Go to first page"
|
|
87
89
|
on:click|preventDefault={() => goTo('first')}
|
|
88
90
|
disabled={goToFirstPageDisabled}
|
|
91
|
+
aria-label="Go to first page"
|
|
89
92
|
id="{id}-first"
|
|
90
93
|
>
|
|
91
94
|
<Fa icon={faAnglesLeft} /></button
|
|
92
95
|
>
|
|
93
96
|
<button
|
|
94
97
|
class="btn btn-sm variant-filled-primary"
|
|
98
|
+
title="Go to previous page"
|
|
95
99
|
id="{id}-previous"
|
|
100
|
+
aria-label="Go to previous page"
|
|
96
101
|
on:click|preventDefault={() => goTo('previous')}
|
|
97
102
|
disabled={goToPreviousPageDisabled}><Fa icon={faAngleLeft} /></button
|
|
98
103
|
>
|
|
99
104
|
<input
|
|
100
105
|
type="number"
|
|
101
106
|
class="input border border-primary-500 rounded flex w-24"
|
|
107
|
+
aria-label="Current page"
|
|
102
108
|
value={$pageIndex + 1}
|
|
103
109
|
max={pageCount}
|
|
104
110
|
min={1}
|
|
@@ -108,11 +114,13 @@
|
|
|
108
114
|
class="btn btn-sm variant-filled-primary"
|
|
109
115
|
id="{id}-next"
|
|
110
116
|
on:click|preventDefault={() => goTo('next')}
|
|
117
|
+
aria-label="Go to next page"
|
|
111
118
|
disabled={goToNextPageDisabled}><Fa icon={faAngleRight} /></button
|
|
112
119
|
>
|
|
113
120
|
<button
|
|
114
121
|
class="btn btn-sm variant-filled-primary"
|
|
115
122
|
id="{id}-last"
|
|
123
|
+
aria-label="Go to last page"
|
|
116
124
|
on:click|preventDefault={() => goTo('last')}
|
|
117
125
|
disabled={goToLastPageDisabled}><Fa icon={faAnglesRight} /></button
|
|
118
126
|
>
|
|
@@ -15,13 +15,14 @@
|
|
|
15
15
|
|
|
16
16
|
<InputContainer {id} label={title} {feedback} {required} {help}>
|
|
17
17
|
{#each source as item}
|
|
18
|
-
<label class="flex items-center space-x-2" for={key}>
|
|
18
|
+
<label class="flex items-center space-x-2" for={item.key}>
|
|
19
19
|
<input
|
|
20
20
|
class="checkbox"
|
|
21
21
|
type="checkbox"
|
|
22
22
|
bind:group={target}
|
|
23
23
|
checked={item.key}
|
|
24
24
|
value={item.key}
|
|
25
|
+
id={item.key}
|
|
25
26
|
/>
|
|
26
27
|
<p>{item.value}</p>
|
|
27
28
|
</label>
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
<InputContainer label={title} {feedback} {required}>
|
|
15
15
|
{#each source as item}
|
|
16
|
-
<label class="flex items-center space-x-2" for={
|
|
17
|
-
<input class="checkbox" type="checkbox" bind:group={target} value={item} />
|
|
16
|
+
<label class="flex items-center space-x-2" for={item}>
|
|
17
|
+
<input class="checkbox" type="checkbox" bind:group={target} value={item} id={item}/>
|
|
18
18
|
<p>{item}</p>
|
|
19
19
|
</label>
|
|
20
20
|
{/each}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
16
16
|
<input
|
|
17
17
|
{id}
|
|
18
|
-
class="input variant-form-material"
|
|
18
|
+
class="input variant-form-material bg-zinc-50 dark:bg-zinc-700 placeholder:text-gray-400"
|
|
19
19
|
type="date"
|
|
20
20
|
class:input-success={valid}
|
|
21
21
|
class:input-error={invalid}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
<InputContainer {id} label={title} {feedback} {required} {help}>
|
|
40
40
|
<select
|
|
41
41
|
{id}
|
|
42
|
-
class="select variant-form-material"
|
|
42
|
+
class="select variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
|
|
43
43
|
class:input-success={valid}
|
|
44
44
|
class:input-error={invalid}
|
|
45
45
|
bind:value={selected}
|
|
@@ -16,7 +16,13 @@
|
|
|
16
16
|
function onMouseOut() {}
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
|
-
<div
|
|
19
|
+
<div
|
|
20
|
+
id="{id}-container"
|
|
21
|
+
on:mouseover={onMouseOver}
|
|
22
|
+
on:focus={onMouseOver}
|
|
23
|
+
on:mouseout={onMouseOut}
|
|
24
|
+
on:blur={onMouseOut}
|
|
25
|
+
>
|
|
20
26
|
<label class="label">
|
|
21
27
|
<span
|
|
22
28
|
>{label}
|
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
import Select from 'svelte-select';
|
|
5
5
|
import { onMount } from 'svelte';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
7
|
export let source;
|
|
10
8
|
export let target;
|
|
11
9
|
export let id;
|
|
@@ -35,16 +33,14 @@
|
|
|
35
33
|
$: groupBy;
|
|
36
34
|
|
|
37
35
|
function updateTarget(selection) {
|
|
36
|
+
console.log('updateTarget', target, selection, isMulti);
|
|
37
|
+
if (selection == undefined) {
|
|
38
|
+
console.log('no update');
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
if(selection == undefined)
|
|
41
|
-
{
|
|
42
|
-
console.log("no update");
|
|
43
|
-
|
|
44
|
-
return;
|
|
40
|
+
return;
|
|
45
41
|
}
|
|
46
42
|
|
|
47
|
-
console.log(
|
|
43
|
+
console.log('update');
|
|
48
44
|
//different cases
|
|
49
45
|
//a) source is complex model is simple return array
|
|
50
46
|
if (complexSource && !complexTarget && isLoaded && isMulti) {
|
|
@@ -75,8 +71,8 @@
|
|
|
75
71
|
}
|
|
76
72
|
|
|
77
73
|
if (!complexSource && !complexTarget && isLoaded && !isMulti) {
|
|
78
|
-
console.log(
|
|
79
|
-
if(selection){
|
|
74
|
+
console.log('🚀 ~ updateTarget ~ selection:', selection);
|
|
75
|
+
if (selection) {
|
|
80
76
|
target = selection.value;
|
|
81
77
|
}
|
|
82
78
|
}
|
|
@@ -167,118 +163,116 @@
|
|
|
167
163
|
//console.log(t,value)
|
|
168
164
|
}
|
|
169
165
|
|
|
170
|
-
function filterItemStartFn(label, filterText, option) {
|
|
171
|
-
|
|
172
|
-
|
|
166
|
+
function filterItemStartFn(label, filterText, option) {
|
|
167
|
+
// console.log(label, filterText, option);
|
|
168
|
+
let itemFilter = label.toLowerCase().startsWith(filterText.toLowerCase());
|
|
173
169
|
|
|
174
|
-
|
|
175
|
-
}
|
|
170
|
+
return itemFilter;
|
|
171
|
+
}
|
|
176
172
|
|
|
177
|
-
function filterItemExactFn(label, filterText, option) {
|
|
178
|
-
|
|
179
|
-
|
|
173
|
+
function filterItemExactFn(label, filterText, option) {
|
|
174
|
+
// console.log(label, filterText, option);
|
|
175
|
+
let itemFilter = label.toLowerCase() == filterText.toLowerCase();
|
|
180
176
|
|
|
181
|
-
|
|
182
|
-
}
|
|
177
|
+
return itemFilter;
|
|
178
|
+
}
|
|
183
179
|
|
|
184
|
-
function filterItemIncludesFn(label, filterText, option) {
|
|
185
|
-
|
|
186
|
-
|
|
180
|
+
function filterItemIncludesFn(label, filterText, option) {
|
|
181
|
+
// console.log(label, filterText, option);
|
|
182
|
+
let itemFilter = label.toLowerCase().includes(filterText.toLowerCase());
|
|
187
183
|
|
|
188
|
-
|
|
189
|
-
}
|
|
184
|
+
return itemFilter;
|
|
185
|
+
}
|
|
190
186
|
|
|
191
|
-
function filterFn({
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
}) {
|
|
205
|
-
|
|
206
|
-
|
|
187
|
+
function filterFn({
|
|
188
|
+
loadOptions,
|
|
189
|
+
filterText,
|
|
190
|
+
items,
|
|
191
|
+
multiple,
|
|
192
|
+
value,
|
|
193
|
+
itemId,
|
|
194
|
+
groupBy,
|
|
195
|
+
filterSelectedItems,
|
|
196
|
+
itemFilter,
|
|
197
|
+
convertStringItemsToObjects,
|
|
198
|
+
filterGroupedItems,
|
|
199
|
+
label
|
|
200
|
+
}) {
|
|
201
|
+
if (items && loadOptions) return items;
|
|
202
|
+
if (!items) return [];
|
|
203
|
+
|
|
204
|
+
if (items && items.length > 0 && typeof items[0] !== 'object') {
|
|
205
|
+
items = convertStringItemsToObjects(items);
|
|
206
|
+
}
|
|
207
207
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
let filterResults = filterListFn(
|
|
209
|
+
items,
|
|
210
|
+
label,
|
|
211
|
+
filterText,
|
|
212
|
+
multiple,
|
|
213
|
+
value,
|
|
214
|
+
filterSelectedItems,
|
|
215
|
+
itemId
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
if (groupBy) {
|
|
219
|
+
filterResults = filterGroupedItems(filterResults, label, filterText);
|
|
220
|
+
}
|
|
211
221
|
|
|
212
|
-
|
|
222
|
+
return filterResults;
|
|
223
|
+
}
|
|
213
224
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
225
|
+
// filter checks 3 types, exact, starts, includes
|
|
226
|
+
function filterListFn(items, label, filterText, multiple, value, filterSelectedItems, itemId) {
|
|
227
|
+
if (!items) return [];
|
|
217
228
|
|
|
218
|
-
|
|
219
|
-
|
|
229
|
+
let exact = items.filter((item) => {
|
|
230
|
+
let matchesFilter = filterItemExactFn(item[label], filterText, item);
|
|
231
|
+
if (matchesFilter && multiple && value?.length) {
|
|
232
|
+
matchesFilter = !value.some((x) => {
|
|
233
|
+
return filterSelectedItems ? x[itemId] === item[itemId] : false;
|
|
234
|
+
});
|
|
235
|
+
}
|
|
220
236
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
{
|
|
237
|
+
return matchesFilter;
|
|
238
|
+
});
|
|
224
239
|
|
|
225
|
-
|
|
240
|
+
let starts = items.filter((item) => {
|
|
241
|
+
let matchesFilter = filterItemStartFn(item[label], filterText, item);
|
|
242
|
+
if (matchesFilter && multiple && value?.length) {
|
|
243
|
+
matchesFilter = !value.some((x) => {
|
|
244
|
+
return filterSelectedItems ? x[itemId] === item[itemId] : false;
|
|
245
|
+
});
|
|
246
|
+
}
|
|
226
247
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
if (matchesFilter && multiple && value?.length) {
|
|
230
|
-
matchesFilter = !value.some((x) => {
|
|
231
|
-
return filterSelectedItems ? x[itemId] === item[itemId] : false;
|
|
232
|
-
});
|
|
233
|
-
}
|
|
248
|
+
return matchesFilter;
|
|
249
|
+
});
|
|
234
250
|
|
|
235
|
-
|
|
236
|
-
|
|
251
|
+
let includes = items.filter((item) => {
|
|
252
|
+
let matchesFilter = filterItemIncludesFn(item[label], filterText, item);
|
|
253
|
+
if (matchesFilter && multiple && value?.length) {
|
|
254
|
+
matchesFilter = !value.some((x) => {
|
|
255
|
+
return filterSelectedItems ? x[itemId] === item[itemId] : false;
|
|
256
|
+
});
|
|
257
|
+
}
|
|
237
258
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
if (matchesFilter && multiple && value?.length) {
|
|
241
|
-
matchesFilter = !value.some((x) => {
|
|
242
|
-
return filterSelectedItems ? x[itemId] === item[itemId] : false;
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
return matchesFilter;
|
|
247
|
-
|
|
248
|
-
});
|
|
249
|
-
|
|
250
|
-
let includes = items.filter((item) => {
|
|
251
|
-
let matchesFilter = filterItemIncludesFn(item[label], filterText, item);
|
|
252
|
-
if (matchesFilter && multiple && value?.length) {
|
|
253
|
-
matchesFilter = !value.some((x) => {
|
|
254
|
-
return filterSelectedItems ? x[itemId] === item[itemId] : false;
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
return matchesFilter;
|
|
259
|
-
});
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
let result = [...exact,...starts,...includes];
|
|
263
|
-
return [...new Set(result)];
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
function clearFn(e)
|
|
267
|
-
{
|
|
268
|
-
console.log("clear", target, e);
|
|
269
|
-
if(isMulti)
|
|
270
|
-
{
|
|
271
|
-
target = [];
|
|
272
|
-
}
|
|
273
|
-
else
|
|
274
|
-
{
|
|
275
|
-
target="";
|
|
276
|
-
}
|
|
259
|
+
return matchesFilter;
|
|
260
|
+
});
|
|
277
261
|
|
|
278
|
-
|
|
279
|
-
|
|
262
|
+
let result = [...exact, ...starts, ...includes];
|
|
263
|
+
return [...new Set(result)];
|
|
264
|
+
}
|
|
280
265
|
|
|
266
|
+
function clearFn(e) {
|
|
267
|
+
console.log('clear', target, e);
|
|
268
|
+
if (isMulti) {
|
|
269
|
+
target = [];
|
|
270
|
+
} else {
|
|
271
|
+
target = '';
|
|
272
|
+
}
|
|
281
273
|
|
|
274
|
+
console.log('after clear', target);
|
|
275
|
+
}
|
|
282
276
|
</script>
|
|
283
277
|
|
|
284
278
|
<InputContainer {id} label={title} {feedback} {required} {help}>
|
|
@@ -295,7 +289,7 @@ function clearFn(e)
|
|
|
295
289
|
{loading}
|
|
296
290
|
{clearable}
|
|
297
291
|
{disabled}
|
|
298
|
-
|
|
292
|
+
filter={filterFn}
|
|
299
293
|
on:change
|
|
300
294
|
on:input
|
|
301
295
|
on:focus
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
19
19
|
<input
|
|
20
20
|
{id}
|
|
21
|
-
class="input variant-form-material"
|
|
21
|
+
class="input variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
|
|
22
22
|
type="number"
|
|
23
23
|
class:input-success={valid}
|
|
24
24
|
class:input-error={invalid}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
18
18
|
<textarea
|
|
19
19
|
{id}
|
|
20
|
-
class="textarea variant-form-material"
|
|
20
|
+
class="textarea variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
|
|
21
21
|
class:input-success={valid}
|
|
22
22
|
class:input-error={invalid}
|
|
23
23
|
bind:value
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
17
17
|
<input
|
|
18
18
|
{id}
|
|
19
|
-
class="input variant-form-material"
|
|
19
|
+
class="input variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
|
|
20
20
|
type="text"
|
|
21
21
|
class:input-success={valid}
|
|
22
22
|
class:input-error={invalid}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<slot name="actions" />
|
|
33
33
|
|
|
34
34
|
{#if deleteBtn}
|
|
35
|
-
<button class="btn hover:text-primary-100" on:click={() => (show = false)}>
|
|
35
|
+
<button class="btn hover:text-primary-100" title="Close alert" on:click={() => (show = false)}>
|
|
36
36
|
<Fa icon={faXmark} />
|
|
37
37
|
</button>
|
|
38
38
|
{/if}
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
<svelte:window on:scroll={handleOnScroll} />
|
|
27
27
|
|
|
28
28
|
<div class="w-full items-center">
|
|
29
|
-
<button class="btn ring back-to-top" on:click={goTop} class:hidden>Back to top</button>
|
|
29
|
+
<button class="btn ring back-to-top" title="Back to top" on:click={goTop} class:hidden>Back to top</button>
|
|
30
30
|
</div>
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
{/if}
|
|
40
40
|
|
|
41
41
|
{#each links as link}
|
|
42
|
-
<span class="chip variant-soft hover:variant-filled" on:click={() => goTo(link.url, false)} on:keypress={() => goTo(link.url, false)}>
|
|
42
|
+
<span class="chip variant-soft hover:variant-filled" role="button" tabindex="0" on:click={() => goTo(link.url, false)} on:keypress={() => goTo(link.url, false)}>
|
|
43
43
|
<span>{link.label}</span>
|
|
44
44
|
</span>
|
|
45
45
|
{/each}
|
|
@@ -61,27 +61,23 @@ import type { helpItemType, helpStoreType } from '$models/Models';
|
|
|
61
61
|
</script>
|
|
62
62
|
|
|
63
63
|
<div class="app" bind:this={app}>
|
|
64
|
-
<
|
|
64
|
+
<div class="w-full h-full flex flex-col overflow-hidden">
|
|
65
65
|
<!--header-->
|
|
66
|
-
<
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
<Menu />
|
|
72
|
-
{/if}
|
|
73
|
-
|
|
74
|
-
<div class="grid grid-cols-2">
|
|
75
|
-
<Breadcrumb bind:title />
|
|
76
|
-
<Docs {links} {note} />
|
|
77
|
-
</div>
|
|
78
|
-
</svelte:fragment>
|
|
79
|
-
</AppBar>
|
|
80
|
-
</svelte:fragment>
|
|
66
|
+
<header class="flex-none z-10">
|
|
67
|
+
<Header />
|
|
68
|
+
{#if true}
|
|
69
|
+
<Menu />
|
|
70
|
+
{/if}
|
|
81
71
|
|
|
82
|
-
|
|
72
|
+
<div class="grid grid-cols-2">
|
|
73
|
+
<Breadcrumb bind:title />
|
|
74
|
+
<Docs {links} {note} />
|
|
75
|
+
</div>
|
|
76
|
+
</header>
|
|
77
|
+
|
|
78
|
+
<footer >
|
|
83
79
|
<Footer />
|
|
84
|
-
</
|
|
80
|
+
</footer>
|
|
85
81
|
|
|
86
82
|
<slot name="description" />
|
|
87
83
|
|
|
@@ -118,6 +114,5 @@ import type { helpItemType, helpStoreType } from '$models/Models';
|
|
|
118
114
|
<GoToTop/>
|
|
119
115
|
<HelpPopUp active={help} />
|
|
120
116
|
<Notification />
|
|
121
|
-
</AppShell>
|
|
122
117
|
</div>
|
|
123
|
-
|
|
118
|
+
</div>
|