@v1nt1248/3nclient-lib 0.1.78 → 0.1.79

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@v1nt1248/3nclient-lib",
3
3
  "license": "AGPL-3.0-or-later",
4
4
  "author": "v1nt1248",
5
- "version": "0.1.78",
5
+ "version": "0.1.79",
6
6
  "description": "Library for 3NWeb clients",
7
7
  "type": "module",
8
8
  "files": [
@@ -21,7 +21,8 @@
21
21
  import size from 'lodash/size';
22
22
  import Ui3nChip from '../ui3n-chip/ui3n-chip.vue';
23
23
  import Ui3nMenu from '../ui3n-menu/ui3n-menu.vue';
24
- import Ui3nHtml from '../../directives/ui3n-html';
24
+ import Ui3nHtml from '@/directives/ui3n-html';
25
+ import Ui3nClickOutside from '@/directives/ui3n-click-outside';
25
26
  import { markSearch, getRandomId } from '@/utils';
26
27
  import type { Nullable } from '@/components/types';
27
28
  import {
@@ -32,6 +33,7 @@
32
33
  } from './types';
33
34
 
34
35
  const vUi3nHtml = Ui3nHtml;
36
+ const vUi3nClickOutside = Ui3nClickOutside;
35
37
 
36
38
  const props = withDefaults(defineProps<Ui3nAutocompleteProps<T>>(), {
37
39
  clearOnSelect: false,
@@ -210,6 +212,10 @@
210
212
  }
211
213
  }
212
214
 
215
+ function onClickOutside() {
216
+ handlePressingEscOrTabKeys();
217
+ }
218
+
213
219
  watch(
214
220
  () => size(filteredItems.value),
215
221
  (val, oVal) => {
@@ -260,7 +266,7 @@
260
266
  </div>
261
267
 
262
268
  <template #menu>
263
- <div ref="menuBodyEl" :class="$style.body">
269
+ <div ref="menuBodyEl" v-ui3n-click-outside="onClickOutside" :class="$style.body">
264
270
  <template v-if="size(filteredItems)">
265
271
  <template v-for="(item, index) in filteredItems" :key="item.id">
266
272
  <div