@creative-web-solution/front-library 7.1.53 → 7.1.55

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 7.1.55
4
+
5
+ - [Popin]: Rework accessibility
6
+
7
+ ## 7.1.54
8
+
9
+ - [Autocomplete]: Remove shouldMarkValue configuration
10
+
3
11
  ## 7.1.53
4
12
 
5
13
  - Add AriaAnnouncementHelper
@@ -8,12 +8,12 @@ export default abstract class AbstractAutocompleteAdapter<ItemDataType> {
8
8
  query: string,
9
9
  $input: HTMLElement,
10
10
  ): Record<string, any>;
11
- abstract markValue(options: {
11
+ markValue?(options: {
12
12
  item: ItemDataType;
13
13
  index: number;
14
14
  query: string;
15
15
  }): ItemDataType;
16
- abstract updateInputValueFromItem?(options: {
16
+ updateInputValueFromItem?(options: {
17
17
  item: ItemDataType;
18
18
  index: number;
19
19
  query: string;
@@ -25,7 +25,6 @@ type AutocompleteOptions<ItemDataType> = {
25
25
  results: ItemDataType[];
26
26
  }) => void;
27
27
  $searchField: HTMLInputElement;
28
- shouldMarkValue?: boolean;
29
28
  };
30
29
 
31
30
  const PREVENT_DEFAULT_KEY_LIST = [
@@ -49,7 +48,6 @@ const DEFAULT_OPTIONS = {
49
48
  layerPosition: "top",
50
49
  $layerWrapper: document.body,
51
50
  minChar: 3,
52
- shouldMarkValue: false,
53
51
  };
54
52
 
55
53
  export default class Autocomplete<ItemDataType> {
@@ -222,13 +220,11 @@ export default class Autocomplete<ItemDataType> {
222
220
  this.resetResults();
223
221
 
224
222
  this.#currentResults = results.map((item, index) => {
225
- const markedItem = this.#options.shouldMarkValue
226
- ? this.#adapter.markValue({
223
+ const markedItem = this.#adapter.markValue?.({
227
224
  item,
228
225
  index,
229
226
  query: this.#currentQuery,
230
- })
231
- : item;
227
+ }) ?? item;
232
228
  const $item = strToDOM(
233
229
  this.#adapter.itemRender({
234
230
  item: markedItem,