@bexis2/bexis2-core-ui 0.4.19 → 0.4.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.
Files changed (53) hide show
  1. package/README.md +18 -8
  2. package/dist/components/CodeEditor/CodeEditor.svelte +4 -0
  3. package/dist/components/Facets/Facets.svelte +23 -10
  4. package/dist/components/Facets/ShowMore.svelte +30 -17
  5. package/dist/components/Facets/ShowMore.svelte.d.ts +1 -1
  6. package/dist/components/File/FileUploader.svelte +1 -1
  7. package/dist/components/Table/ColumnsMenu.svelte +5 -0
  8. package/dist/components/Table/TableContent.svelte +13 -3
  9. package/dist/components/Table/TableFilter.svelte +12 -0
  10. package/dist/components/Table/TableFilterServer.svelte +13 -1
  11. package/dist/components/Table/TablePagination.svelte +10 -1
  12. package/dist/components/Table/TablePaginationServer.svelte +8 -0
  13. package/dist/components/form/Checkbox.svelte +1 -1
  14. package/dist/components/form/CheckboxKvPList.svelte +2 -1
  15. package/dist/components/form/CheckboxList.svelte +2 -2
  16. package/dist/components/form/DateInput.svelte +1 -1
  17. package/dist/components/form/DropdownKvP.svelte +1 -1
  18. package/dist/components/form/InputContainer.svelte +7 -1
  19. package/dist/components/form/MultiSelect.svelte +100 -106
  20. package/dist/components/form/NumberInput.svelte +1 -1
  21. package/dist/components/form/TextArea.svelte +1 -1
  22. package/dist/components/form/TextInput.svelte +1 -1
  23. package/dist/components/page/Alert.svelte +1 -1
  24. package/dist/components/page/BackToTop.svelte +1 -1
  25. package/dist/components/page/GoToTop.svelte +1 -0
  26. package/dist/components/page/HelpPopUp.svelte +1 -0
  27. package/dist/components/page/Page.svelte +5 -4
  28. package/package.json +1 -1
  29. package/src/lib/components/CodeEditor/CodeEditor.svelte +4 -0
  30. package/src/lib/components/Facets/Facets.svelte +28 -12
  31. package/src/lib/components/Facets/ShowMore.svelte +31 -17
  32. package/src/lib/components/File/FileUploader.svelte +1 -1
  33. package/src/lib/components/Table/ColumnsMenu.svelte +5 -0
  34. package/src/lib/components/Table/TableContent.svelte +13 -3
  35. package/src/lib/components/Table/TableFilter.svelte +12 -0
  36. package/src/lib/components/Table/TableFilterServer.svelte +13 -1
  37. package/src/lib/components/Table/TablePagination.svelte +10 -1
  38. package/src/lib/components/Table/TablePaginationServer.svelte +8 -0
  39. package/src/lib/components/form/Checkbox.svelte +1 -1
  40. package/src/lib/components/form/CheckboxKvPList.svelte +2 -1
  41. package/src/lib/components/form/CheckboxList.svelte +2 -2
  42. package/src/lib/components/form/DateInput.svelte +1 -1
  43. package/src/lib/components/form/DropdownKvP.svelte +1 -1
  44. package/src/lib/components/form/InputContainer.svelte +7 -1
  45. package/src/lib/components/form/MultiSelect.svelte +100 -106
  46. package/src/lib/components/form/NumberInput.svelte +1 -1
  47. package/src/lib/components/form/TextArea.svelte +1 -1
  48. package/src/lib/components/form/TextInput.svelte +1 -1
  49. package/src/lib/components/page/Alert.svelte +1 -1
  50. package/src/lib/components/page/BackToTop.svelte +1 -1
  51. package/src/lib/components/page/GoToTop.svelte +1 -0
  52. package/src/lib/components/page/HelpPopUp.svelte +1 -0
  53. package/src/lib/components/page/Page.svelte +5 -4
@@ -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}
@@ -13,7 +13,13 @@ function onMouseOut() {
13
13
  }
14
14
  </script>
15
15
 
16
- <div id="{id}-container" on:mouseover={onMouseOver} on:focus={onMouseOver} on:mouseout={onMouseOut} on:blur={onMouseOut}>
16
+ <div
17
+ id="{id}-container"
18
+ on:mouseover={onMouseOver}
19
+ on:focus={onMouseOver}
20
+ on:mouseout={onMouseOut}
21
+ on:blur={onMouseOut}
22
+ >
17
23
  <label class="label">
18
24
  <span
19
25
  >{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
- console.log("updateTarget", target, selection, isMulti);
40
- if(selection == undefined)
41
- {
42
- console.log("no update");
43
-
44
- return;
40
+ return;
45
41
  }
46
42
 
47
- console.log("update");
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("🚀 ~ updateTarget ~ selection:", selection)
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
- // console.log(label, filterText, option);
172
- let itemFilter = label.toLowerCase().startsWith(filterText.toLowerCase());
166
+ function filterItemStartFn(label, filterText, option) {
167
+ // console.log(label, filterText, option);
168
+ let itemFilter = label.toLowerCase().startsWith(filterText.toLowerCase());
173
169
 
174
- return itemFilter;
175
- }
170
+ return itemFilter;
171
+ }
176
172
 
177
- function filterItemExactFn(label, filterText, option) {
178
- // console.log(label, filterText, option);
179
- let itemFilter = label.toLowerCase() == filterText.toLowerCase();
173
+ function filterItemExactFn(label, filterText, option) {
174
+ // console.log(label, filterText, option);
175
+ let itemFilter = label.toLowerCase() == filterText.toLowerCase();
180
176
 
181
- return itemFilter;
182
- }
177
+ return itemFilter;
178
+ }
183
179
 
184
- function filterItemIncludesFn(label, filterText, option) {
185
- // console.log(label, filterText, option);
186
- let itemFilter = label.toLowerCase().includes(filterText.toLowerCase());
180
+ function filterItemIncludesFn(label, filterText, option) {
181
+ // console.log(label, filterText, option);
182
+ let itemFilter = label.toLowerCase().includes(filterText.toLowerCase());
187
183
 
188
- return itemFilter;
189
- }
184
+ return itemFilter;
185
+ }
190
186
 
191
- function filterFn({
192
- loadOptions,
193
- filterText,
194
- items,
195
- multiple,
196
- value,
197
- itemId,
198
- groupBy,
199
- filterSelectedItems,
200
- itemFilter,
201
- convertStringItemsToObjects,
202
- filterGroupedItems,
203
- label,
204
- }) {
205
- if (items && loadOptions) return items;
206
- if (!items) return [];
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
- if (items && items.length > 0 && typeof items[0] !== 'object') {
209
- items = convertStringItemsToObjects(items);
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
- let filterResults = filterListFn(items, label, filterText,multiple,value,filterSelectedItems, itemId)
222
+ return filterResults;
223
+ }
213
224
 
214
- if (groupBy) {
215
- filterResults = filterGroupedItems(filterResults, label, filterText);
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
- return filterResults;
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
- // filter checks 3 types, exact, starts, includes
222
- function filterListFn(items ,label , filterText, multiple, value, filterSelectedItems, itemId)
223
- {
237
+ return matchesFilter;
238
+ });
224
239
 
225
- if (!items) return [];
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
- let exact = items.filter((item) => {
228
- let matchesFilter = filterItemExactFn(item[label], filterText, item);
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
- return matchesFilter;
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
- let starts = items.filter((item) => {
239
- let matchesFilter = filterItemStartFn(item[label], filterText, item);
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
- console.log("after clear", target);
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
- filter={filterFn}
292
+ filter={filterFn}
299
293
  on:change
300
294
  on:input
301
295
  on:focus
@@ -15,7 +15,7 @@ export let disabled = false;
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 dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
19
19
  type="number"
20
20
  class:input-success={valid}
21
21
  class:input-error={invalid}
@@ -14,7 +14,7 @@ export let disabled = false;
14
14
  <InputContainer {id} {label} {feedback} {required} {help}>
15
15
  <textarea
16
16
  {id}
17
- class="textarea variant-form-material"
17
+ class="textarea variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
18
18
  class:input-success={valid}
19
19
  class:input-error={invalid}
20
20
  bind:value
@@ -14,7 +14,7 @@ export let disabled = false;
14
14
  <InputContainer {id} {label} {feedback} {required} {help}>
15
15
  <input
16
16
  {id}
17
- class="input variant-form-material"
17
+ class="input variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
18
18
  type="text"
19
19
  class:input-success={valid}
20
20
  class:input-error={invalid}
@@ -27,7 +27,7 @@ $: show = true;
27
27
  <slot name="actions" />
28
28
 
29
29
  {#if deleteBtn}
30
- <button class="btn hover:text-primary-100" on:click={() => (show = false)}>
30
+ <button class="btn hover:text-primary-100" title="Close alert" on:click={() => (show = false)}>
31
31
  <Fa icon={faXmark} />
32
32
  </button>
33
33
  {/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>
@@ -17,6 +17,7 @@
17
17
  {#if showGotoTop}
18
18
  <button
19
19
  id="gotToTop"
20
+ title="Go to top"
20
21
  class="chip variant-filled-warning fixed bottom-5 right-20 shadow-md"
21
22
  on:click={gotoTop}
22
23
  ><Fa icon={faAngleUp}/></button >
@@ -29,6 +29,7 @@ async function resetItemId() {
29
29
  {#if active}
30
30
  <button
31
31
  id="helpButton"
32
+ title="Open help window"
32
33
  class="chip variant-filled-warning fixed bottom-5 right-10 shadow-md"
33
34
  use:popup={helpClick}><Fa icon={faQuestion} /></button
34
35
  >
@@ -59,10 +59,6 @@ function scrollToTop() {
59
59
  </AppBar>
60
60
  </svelte:fragment>
61
61
 
62
- <svelte:fragment slot="footer">
63
- <Footer />
64
- </svelte:fragment>
65
-
66
62
  <slot name="description" />
67
63
 
68
64
  <div class="flex flex-initial space-x-5">
@@ -98,6 +94,11 @@ function scrollToTop() {
98
94
  <GoToTop/>
99
95
  <HelpPopUp active={help} />
100
96
  <Notification />
97
+
98
+ <svelte:fragment slot="footer">
99
+ <Footer />
100
+ </svelte:fragment>
101
+
101
102
  </AppShell>
102
103
  </div>
103
104
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bexis2/bexis2-core-ui",
3
- "version": "0.4.19",
3
+ "version": "0.4.21",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -100,6 +100,7 @@
100
100
  <div class="flex gap-2">
101
101
  <button
102
102
  class="btn variant-filled-warning"
103
+ title="Reset"
103
104
  id="{id}-reset"
104
105
  on:click|preventDefault={() => modalStore.trigger(modal)}
105
106
  ><Fa icon={faArrowRotateLeft} /></button
@@ -108,6 +109,7 @@
108
109
  class="btn border"
109
110
  class:bg-slate-700={dark}
110
111
  class:bg-white={!dark}
112
+ title="Toggle dark mode"
111
113
  id="{id}-toggle"
112
114
  on:click|preventDefault={() => (dark = !dark)}
113
115
  >
@@ -124,11 +126,13 @@
124
126
  <div class="flex gap-2">
125
127
  <button
126
128
  class="btn variant-filled-warning"
129
+ title="Cancel"
127
130
  id="{id}-cancel"
128
131
  on:click|preventDefault={() => dispatch('cancel')}><Fa icon={faXmark} /></button
129
132
  >
130
133
  <button
131
134
  class="btn variant-filled-primary"
135
+ title="Save"
132
136
  id="{id}-save"
133
137
  disabled={!isValid}
134
138
  on:click|preventDefault={() => dispatch('save')}><Fa icon={faSave} /></button
@@ -26,7 +26,7 @@
26
26
  ref: ShowMore,
27
27
  props: {
28
28
  group,
29
- handleSave,
29
+ handleApply,
30
30
  handleCancel
31
31
  }
32
32
  }
@@ -45,7 +45,7 @@
45
45
 
46
46
  const modalStore = getModalStore();
47
47
 
48
- const handleSave = (group: SelectedFacetGroup) => {
48
+ const handleApply = (group: SelectedFacetGroup) => {
49
49
  const { name: groupName, children } = group;
50
50
 
51
51
  dispatch('showMoreOpenChange', {
@@ -110,9 +110,8 @@
110
110
  changed.length && dispatch('facetSelect', changed);
111
111
  };
112
112
 
113
- // Keeping the sorting function, but stays unused for now
114
113
  const sortOptions = () => {
115
- // Sort facets in a descending order if count exits, or sort alphabetically
114
+ // Sort facets in a descending order if count exits
116
115
  Object.keys(selected).forEach((group) => {
117
116
  const checked = Object.keys(selected[group].children)
118
117
  .filter((item) => selected[group].children[item].selected)
@@ -121,13 +120,20 @@
121
120
  if (a.count != undefined && b.count != undefined) {
122
121
  return b.count - a.count;
123
122
  }
124
- return a.displayName.localeCompare(b.displayName);
123
+ return 0;
125
124
  })
126
125
  .map((item) => item.name);
127
126
 
128
- const unchecked = Object.keys(selected[group].children).filter(
129
- (item) => !checked.includes(item)
130
- );
127
+ const unchecked = Object.keys(selected[group].children)
128
+ .filter((item) => !checked.includes(item))
129
+ .map((item) => selected[group].children[item])
130
+ .sort((a, b) => {
131
+ if (a.count != undefined && b.count != undefined) {
132
+ return b.count - a.count;
133
+ }
134
+ return 0;
135
+ })
136
+ .map((item) => item.name);
131
137
 
132
138
  const groupIndex = displayedGroups.findIndex((g) => g.name === group);
133
139
 
@@ -172,7 +178,7 @@
172
178
  });
173
179
 
174
180
  $: displayedGroups = structuredClone($groups);
175
- $: selectedItems, mapSelected('items'); // sortOptions(); // Sorting is not used for now
181
+ $: selectedItems, mapSelected('items'), sortOptions();
176
182
  $: selectedGroups, mapSelected('groups');
177
183
  </script>
178
184
 
@@ -186,7 +192,7 @@
186
192
  bind:checked={selectedGroups[group.name]}
187
193
  bind:group={selectedGroups}
188
194
  >
189
- <p class="font-semibold">
195
+ <p class="font-semibold whitespace-nowrap">
190
196
  {group.displayName}{group.count !== undefined ? ` (${group.count})` : ''}
191
197
  </p>
192
198
 
@@ -204,7 +210,12 @@
204
210
  selection
205
211
  multiple
206
212
  >
207
- <p>{item.displayName} ({item.count})</p>
213
+ <div class="flex gap-2">
214
+ <p class="w-max grow truncate">
215
+ <span title={item.displayName}>{item.displayName}</span>
216
+ </p>
217
+ <span>({item.count})</span>
218
+ </div>
208
219
  </TreeViewItem>
209
220
  {/each}
210
221
  <!-- Trigger for the Modal to view all options -->
@@ -226,7 +237,12 @@
226
237
  selection
227
238
  multiple
228
239
  >
229
- <p>{item.displayName} ({item.count})</p>
240
+ <div class="flex gap-2">
241
+ <p class="w-max grow truncate">
242
+ <span title={item.displayName}>{item.displayName}</span>
243
+ </p>
244
+ <span>({item.count})</span>
245
+ </div>
230
246
  </TreeViewItem>
231
247
  {/each}
232
248
  {/if}
@@ -2,7 +2,7 @@
2
2
  import type { SelectedFacetGroup } from '$models/Models';
3
3
 
4
4
  export let group: SelectedFacetGroup;
5
- export let handleSave: (group: SelectedFacetGroup) => {};
5
+ export let handleApply: (group: SelectedFacetGroup) => {};
6
6
  export let handleCancel: (groupName: string) => {};
7
7
 
8
8
  let selected = structuredClone(group.children);
@@ -15,8 +15,8 @@
15
15
  Object.keys(selected).forEach((key) => (selected[key].selected = false));
16
16
  };
17
17
 
18
- const onSave = () => {
19
- handleSave({
18
+ const onApply = () => {
19
+ handleApply({
20
20
  ...group,
21
21
  children: selected
22
22
  });
@@ -29,32 +29,46 @@
29
29
  };
30
30
 
31
31
  const gridClass = (items: any[]) => {
32
- if (items.length >= 50) {
33
- return 'grid-cols-5';
34
- } else if (items.length >= 30) {
35
- return 'grid-cols-4';
36
- } else if (items.length >= 20) {
37
- return 'grid-cols-3';
38
- }
32
+ const ceil = Math.ceil(Math.sqrt(items.length));
33
+ const max = Math.max(ceil, Math.floor(items.length / 3));
39
34
 
40
- return 'grid-cols-2';
35
+ const classes = [
36
+ 'grid-rows-1',
37
+ 'grid-rows-2',
38
+ 'grid-rows-3',
39
+ 'grid-rows-4',
40
+ 'grid-rows-5',
41
+ 'grid-rows-6',
42
+ 'grid-rows-7',
43
+ 'grid-rows-8',
44
+ 'grid-rows-9',
45
+ 'grid-rows-10',
46
+ 'grid-rows-11',
47
+ 'grid-rows-12'
48
+ ];
49
+
50
+ if (max > 12) {
51
+ return 'grid-rows-12';
52
+ } else return classes[max - 1 || 1];
41
53
  };
42
54
  </script>
43
55
 
44
- <div class="p-5 rounded-md bg-surface-50 dark:bg-surface-800 border-primary-500 border-2">
56
+ <div class="p-5 rounded-md max-w-6xl bg-surface-50 dark:bg-surface-800 border-primary-500 border-2">
45
57
  <!-- Header -->
46
58
  <h2 class="text-xl font-semibold">{group.displayName}</h2>
47
59
 
48
60
  <!-- Items -->
49
61
  <div
50
- class="grid {gridClass(
62
+ class="{gridClass(
51
63
  Object.keys(selected)
52
- )} !gap-x-20 gap-y-2 py-10 px-2 max-h-[1000px] overflow-x-auto max-w-6xl"
64
+ )} grid grid-flow-col gap-x-10 gap-y-2 py-10 px-2 h-full overflow-x-auto"
53
65
  >
54
66
  {#each Object.keys(selected) as key}
55
- <label class="flex gap-3 items-center">
67
+ <label class="flex gap-3 items-center w-48">
56
68
  <input type="checkbox" class="checkbox" bind:checked={selected[key].selected} />
57
- <span class="whitespace-nowrap break-before-avoid break-after-avoid"
69
+ <span
70
+ title={selected[key].displayName}
71
+ class="whitespace-nowrap break-before-avoid break-after-avoid truncate"
58
72
  >{selected[key].displayName}</span
59
73
  >
60
74
  </label>
@@ -68,7 +82,7 @@
68
82
  <button class="btn btn-sm variant-filled-tertiary" on:click={selectAll}>All</button>
69
83
  </div>
70
84
  <div class="flex gap-3">
71
- <button class="btn btn-sm variant-filled-primary" on:click={onSave}>Save</button>
85
+ <button class="btn btn-sm variant-filled-primary" on:click={onApply}>Apply</button>
72
86
  <button class="btn btn-sm variant-filled-secondary" on:click={onCancel}>Cancel</button>
73
87
  </div>
74
88
  </div>
@@ -193,7 +193,7 @@
193
193
  {/if}
194
194
  </div>
195
195
 
196
- <button id={submitBt} color="primary" style="display:none"><Fa icon={faSave} /></button>
196
+ <button title="Submit" id={submitBt} color="primary" style="display:none"><Fa icon={faSave} /></button>
197
197
  {:else}
198
198
  <!-- while data is not loaded show a loading information -->
199
199
 
@@ -14,7 +14,9 @@
14
14
 
15
15
  <button
16
16
  type="button"
17
+ title="Hide or show columns"
17
18
  class="btn btn-sm variant-filled-primary rounded-full order-last"
19
+ aria-label="Open menu to hide/show columns"
18
20
  use:popup={popupCombobox}>Columns</button
19
21
  >
20
22
 
@@ -24,8 +26,11 @@
24
26
  >
25
27
  {#each columns as column}
26
28
  <div class="flex gap-3 items-center">
29
+ <label for={column.id} class="cursor-pointer" title={column.label}></label>
27
30
  <input
31
+ aria-label="Toggle column visibility for column {column.label}"
28
32
  type="checkbox"
33
+ id = {column.id}
29
34
  bind:checked={column.visible}
30
35
  disabled={columns.filter((c) => c.visible).length === 1 && column.visible}
31
36
  />