@tekkare/auriga 0.2.37 → 0.2.39
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/dist/module.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="relative">
|
|
3
|
-
<div class="relative">
|
|
2
|
+
<div @click.stop class="relative">
|
|
3
|
+
<div @click.stop class="relative">
|
|
4
4
|
<div
|
|
5
5
|
class="filters_input_search"
|
|
6
6
|
:class="[
|
|
7
7
|
{ filters_shortcuts_open: typing },
|
|
8
8
|
suggOpen && suggestions !== null ? 'no_bottom' : '',
|
|
9
9
|
]"
|
|
10
|
+
@click.stop="openSugg"
|
|
10
11
|
>
|
|
11
12
|
<arg-icon
|
|
12
13
|
name="MagnifyingGlass"
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
@keydown.up="typing ? shortcutSelect('asc') : selectOption(false)"
|
|
37
38
|
@keydown.down="typing ? shortcutSelect('desc') : selectOption(true)"
|
|
38
39
|
autocomplete="off"
|
|
39
|
-
click.stop
|
|
40
|
+
@click.stop="openSugg"
|
|
40
41
|
/>
|
|
41
42
|
|
|
42
43
|
<div
|
|
@@ -342,13 +343,11 @@ export default defineComponent({
|
|
|
342
343
|
typing.value = false;
|
|
343
344
|
if (new_value === "") {
|
|
344
345
|
hoverShortcut.value = "";
|
|
345
|
-
|
|
346
|
+
closeSugg();
|
|
346
347
|
optionIndex.value = 1;
|
|
347
|
-
document.removeEventListener("click", closeSugg);
|
|
348
348
|
} else {
|
|
349
|
-
suggOpen.value = true;
|
|
350
349
|
setTimeout(() => {
|
|
351
|
-
|
|
350
|
+
openSugg();
|
|
352
351
|
}, 100);
|
|
353
352
|
for (let i = 0; i < shortcuts.value.length; i++) {
|
|
354
353
|
if (new_value.startsWith(shortcuts.value[i].symbol)) {
|
|
@@ -358,6 +357,12 @@ export default defineComponent({
|
|
|
358
357
|
}
|
|
359
358
|
optionIndex.value = 1;
|
|
360
359
|
});
|
|
360
|
+
function openSugg() {
|
|
361
|
+
if (value.value.length > 0) {
|
|
362
|
+
suggOpen.value = true;
|
|
363
|
+
document.addEventListener("click", closeSugg);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
361
366
|
function debounce(func, delay) {
|
|
362
367
|
let debounceTimer;
|
|
363
368
|
return function(...args) {
|
|
@@ -397,7 +402,7 @@ export default defineComponent({
|
|
|
397
402
|
});
|
|
398
403
|
onMounted(() => {
|
|
399
404
|
searchBar.value = document.getElementById("search_input_advanced");
|
|
400
|
-
searchBar.value.addEventListener("input", debounce(handleInput,
|
|
405
|
+
searchBar.value.addEventListener("input", debounce(handleInput, 300));
|
|
401
406
|
tagsSection.value = document.getElementById("tags");
|
|
402
407
|
if (props.customShortcuts.length > 0) {
|
|
403
408
|
for (let i = 0; i < props.customShortcuts.length; i++) {
|
|
@@ -416,7 +421,7 @@ export default defineComponent({
|
|
|
416
421
|
}
|
|
417
422
|
});
|
|
418
423
|
onUnmounted(() => {
|
|
419
|
-
searchBar.value.removeEventListener("input", debounce(handleInput,
|
|
424
|
+
searchBar.value.removeEventListener("input", debounce(handleInput, 300));
|
|
420
425
|
});
|
|
421
426
|
function shortcutColor(shortcut) {
|
|
422
427
|
if (shortcut === selectedShortcut.value || shortcut === hoverShortcut.value) {
|
|
@@ -713,8 +718,7 @@ export default defineComponent({
|
|
|
713
718
|
}
|
|
714
719
|
function closeSugg() {
|
|
715
720
|
suggOpen.value = false;
|
|
716
|
-
|
|
717
|
-
document.removeEventListener("click", close);
|
|
721
|
+
document.removeEventListener("click", closeSugg);
|
|
718
722
|
}
|
|
719
723
|
return {
|
|
720
724
|
close,
|
|
@@ -759,7 +763,8 @@ export default defineComponent({
|
|
|
759
763
|
changeSearchType,
|
|
760
764
|
notFound,
|
|
761
765
|
loaderText,
|
|
762
|
-
handleChangeType
|
|
766
|
+
handleChangeType,
|
|
767
|
+
openSugg
|
|
763
768
|
};
|
|
764
769
|
}
|
|
765
770
|
});
|
|
@@ -160,6 +160,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
160
160
|
es: string;
|
|
161
161
|
};
|
|
162
162
|
handleChangeType: (searchIndex: number) => void;
|
|
163
|
+
openSugg: () => void;
|
|
163
164
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:Value" | "onClose" | "onTyping")[], "update:Value" | "onClose" | "onTyping", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
164
165
|
placeHolderValue: {
|
|
165
166
|
type: StringConstructor;
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
@keydown.down="selectOption(true)"
|
|
22
22
|
@keydown.up="selectOption(false)"
|
|
23
23
|
autocomplete="off"
|
|
24
|
+
@click.stop="openSugg"
|
|
24
25
|
/>
|
|
25
26
|
</div>
|
|
26
27
|
<div
|
|
@@ -154,18 +155,14 @@ export default defineComponent({
|
|
|
154
155
|
() => {
|
|
155
156
|
if (searchValue.value.length > 0 && props.suggestions !== null) {
|
|
156
157
|
if (!closeOnEnter.value) {
|
|
157
|
-
suggOpen.value = true;
|
|
158
158
|
setTimeout(() => {
|
|
159
|
-
|
|
159
|
+
openSugg();
|
|
160
160
|
});
|
|
161
161
|
} else {
|
|
162
|
-
|
|
163
|
-
document.removeEventListener("click", closeSugg);
|
|
164
|
-
closeOnEnter.value = false;
|
|
162
|
+
closeSugg();
|
|
165
163
|
}
|
|
166
164
|
} else {
|
|
167
|
-
|
|
168
|
-
document.removeEventListener("click", closeSugg);
|
|
165
|
+
closeSugg();
|
|
169
166
|
}
|
|
170
167
|
optionIndex.value = 1;
|
|
171
168
|
}
|
|
@@ -211,10 +208,12 @@ export default defineComponent({
|
|
|
211
208
|
};
|
|
212
209
|
function closeSugg() {
|
|
213
210
|
suggOpen.value = false;
|
|
211
|
+
document.removeEventListener("click", closeSugg);
|
|
214
212
|
}
|
|
215
213
|
function openSugg() {
|
|
216
214
|
if (searchValue.value.length > 0) {
|
|
217
215
|
suggOpen.value = true;
|
|
216
|
+
document.addEventListener("click", closeSugg);
|
|
218
217
|
}
|
|
219
218
|
}
|
|
220
219
|
function debounce(func, delay) {
|
|
@@ -230,11 +229,11 @@ export default defineComponent({
|
|
|
230
229
|
}
|
|
231
230
|
onMounted(() => {
|
|
232
231
|
searchBar.value = document.getElementById("search_input");
|
|
233
|
-
searchBar.value.addEventListener("input", debounce(handleInput,
|
|
232
|
+
searchBar.value.addEventListener("input", debounce(handleInput, 300));
|
|
234
233
|
searchValue.value = props.defaultValue;
|
|
235
234
|
});
|
|
236
235
|
onUnmounted(() => {
|
|
237
|
-
searchBar.value.removeEventListener("input", debounce(handleInput,
|
|
236
|
+
searchBar.value.removeEventListener("input", debounce(handleInput, 300));
|
|
238
237
|
});
|
|
239
238
|
watch(
|
|
240
239
|
() => props.defaultValue,
|