@dataloop-ai/components 0.18.137 → 0.18.138
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 +1 -1
- package/src/components/basic/DlPopup/DlPopup.vue +2 -2
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchInput.vue +16 -7
- package/src/components/compound/DlSearches/DlSmartSearch/components/SuggestionsDropdown.vue +3 -4
- package/src/components/essential/DlMenu/DlMenu.vue +2 -2
- package/src/demos/SmartSearchDemo/DlSmartSearchDemo.vue +1 -0
package/package.json
CHANGED
|
@@ -201,7 +201,7 @@ export default defineComponent({
|
|
|
201
201
|
'show',
|
|
202
202
|
'before-show',
|
|
203
203
|
'hide',
|
|
204
|
-
'
|
|
204
|
+
'escapekey',
|
|
205
205
|
'before-hide',
|
|
206
206
|
'update:model-value'
|
|
207
207
|
],
|
|
@@ -402,7 +402,7 @@ export default defineComponent({
|
|
|
402
402
|
}
|
|
403
403
|
|
|
404
404
|
function onEscapeKey(evt: AnchorEvent) {
|
|
405
|
-
proxy.$emit('
|
|
405
|
+
proxy.$emit('escapekey')
|
|
406
406
|
if (!props.disableCloseByEsc) {
|
|
407
407
|
hide(evt)
|
|
408
408
|
}
|
|
@@ -70,14 +70,14 @@
|
|
|
70
70
|
:offset="menuOffset"
|
|
71
71
|
:expanded="expanded"
|
|
72
72
|
@set-input-value="setInputFromSuggestion"
|
|
73
|
-
@
|
|
73
|
+
@escapekey="onEscapeKey"
|
|
74
74
|
/>
|
|
75
75
|
<dl-menu
|
|
76
76
|
v-if="showDatePicker && focused"
|
|
77
77
|
v-model="showDatePicker"
|
|
78
78
|
:disabled="disabled"
|
|
79
79
|
:offset="[0, 3]"
|
|
80
|
-
@
|
|
80
|
+
@escapekey="onEscapeKey"
|
|
81
81
|
>
|
|
82
82
|
<div class="dl-smart-search-input__date-picker-wrapper">
|
|
83
83
|
<dl-date-picker
|
|
@@ -582,11 +582,20 @@ export default defineComponent({
|
|
|
582
582
|
}
|
|
583
583
|
|
|
584
584
|
const onEscapeKey = () => {
|
|
585
|
-
if (
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
) {
|
|
585
|
+
if (!focused.value) {
|
|
586
|
+
return
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
if (showDatePicker.value) {
|
|
590
|
+
showDatePicker.value = false
|
|
591
|
+
showSuggestions.value = true
|
|
592
|
+
datePickerSelection.value = null
|
|
593
|
+
setCaret(input.value)
|
|
594
|
+
return
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
if (showSuggestions.value) {
|
|
598
|
+
showSuggestions.value = false
|
|
590
599
|
return
|
|
591
600
|
}
|
|
592
601
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
@hide="onHide"
|
|
19
19
|
@highlightedIndex="setHighlightedIndex"
|
|
20
20
|
@handleSelectedItem="handleSelectedItem"
|
|
21
|
-
@
|
|
21
|
+
@escapekey="onEscapeKey"
|
|
22
22
|
>
|
|
23
23
|
<dl-list>
|
|
24
24
|
<dl-list-item
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
import { computed, defineComponent, PropType, ref } from 'vue-demi'
|
|
39
39
|
import { DlMenu, DlList } from '../../../../essential'
|
|
40
40
|
import { DlListItem } from '../../../../basic'
|
|
41
|
-
import { emit } from 'process'
|
|
42
41
|
|
|
43
42
|
export default defineComponent({
|
|
44
43
|
components: {
|
|
@@ -83,7 +82,7 @@ export default defineComponent({
|
|
|
83
82
|
default: 1
|
|
84
83
|
}
|
|
85
84
|
},
|
|
86
|
-
emits: ['set-input-value', 'update:model-value', '
|
|
85
|
+
emits: ['set-input-value', 'update:model-value', 'escapekey'],
|
|
87
86
|
setup(props, { emit }) {
|
|
88
87
|
const isMenuOpen = ref(false)
|
|
89
88
|
const highlightedIndex = ref(-1)
|
|
@@ -112,7 +111,7 @@ export default defineComponent({
|
|
|
112
111
|
})
|
|
113
112
|
|
|
114
113
|
const onEscapeKey = () => {
|
|
115
|
-
emit('
|
|
114
|
+
emit('escapekey')
|
|
116
115
|
emit('update:model-value', false)
|
|
117
116
|
}
|
|
118
117
|
|
|
@@ -170,7 +170,7 @@ export default defineComponent({
|
|
|
170
170
|
emits: [
|
|
171
171
|
...useModelToggleEmits,
|
|
172
172
|
'click',
|
|
173
|
-
'
|
|
173
|
+
'escapekey',
|
|
174
174
|
'highlightedIndex',
|
|
175
175
|
'handleSelectedItem'
|
|
176
176
|
],
|
|
@@ -385,7 +385,7 @@ export default defineComponent({
|
|
|
385
385
|
}
|
|
386
386
|
|
|
387
387
|
function onEscapeKey(evt: AnchorEvent) {
|
|
388
|
-
emit('
|
|
388
|
+
emit('escapekey')
|
|
389
389
|
hide(evt)
|
|
390
390
|
}
|
|
391
391
|
|