vue3-extended-multiselect 1.6.6 → 1.7.0
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 +9 -2
- package/README.md +1 -1
- package/babel.config.js +6 -2
- package/jest.config.js +1 -1
- package/package.json +4 -4
- package/src/components/Vue3ExtendedMultiselect.vue +9 -13
- package/src/composition/click-outside.js +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Patch notes
|
|
2
2
|
|
|
3
|
-
Current `vue3-extended-multiselect` version: **1.
|
|
3
|
+
Current `vue3-extended-multiselect` version: **1.7.0**
|
|
4
4
|
|
|
5
5
|
***
|
|
6
6
|
|
|
@@ -265,4 +265,11 @@ Adding descriptive comments for some types in typings.
|
|
|
265
265
|
|
|
266
266
|
### 1.6.6 (2023-02-03)
|
|
267
267
|
|
|
268
|
-
* Adding unit-test for "showDeselectIconLoader" optional prop.
|
|
268
|
+
* Adding unit-test for "showDeselectIconLoader" optional prop.
|
|
269
|
+
|
|
270
|
+
### 1.7.0 (2023-02-06)
|
|
271
|
+
|
|
272
|
+
* Adding "extended-click-outside" dependency.
|
|
273
|
+
* Adding click-outside.js file with to composition director with extended-click-outside-instanse.
|
|
274
|
+
* Changing "typescript" dependency version to "~4.1.0".
|
|
275
|
+
* Removal of "vue3-click-away" dependency.
|
package/README.md
CHANGED
package/babel.config.js
CHANGED
package/jest.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue3-extended-multiselect",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Extended multiselect component for applications based on Vue 3 framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"multiselect",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"core-js": "^3.6.5",
|
|
26
|
+
"extended-click-outside": "^1.1.0",
|
|
26
27
|
"lodash-es": "^4.17.21",
|
|
27
|
-
"vue": "^3.0.0"
|
|
28
|
-
"vue3-click-away": "^1.2.4"
|
|
28
|
+
"vue": "^3.0.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@testing-library/vue": "^6.6.1",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"babel-plugin-transform-import-meta": "^2.2.0",
|
|
41
41
|
"eslint": "^7.2.0",
|
|
42
42
|
"eslint-plugin-vue": "^7.0.0",
|
|
43
|
-
"typescript": "~
|
|
43
|
+
"typescript": "~4.1.0",
|
|
44
44
|
"vue-jest": "^5.0.0-0"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section
|
|
3
3
|
aria-owns="extended-search-field"
|
|
4
|
+
ref="extendedMultiselectWrapper"
|
|
4
5
|
role="combobox"
|
|
5
6
|
:aria-roledescription="roledescription"
|
|
6
7
|
:class="wrapperClasses"
|
|
7
8
|
:tabindex="tabindexIfSearch"
|
|
8
|
-
v-click-outside="clickOutside"
|
|
9
9
|
@click.stop.left="fieldFocus"
|
|
10
10
|
@click.stop.middle="fieldFocus"
|
|
11
11
|
@keyup.stop.esc="rollUp"
|
|
@@ -233,8 +233,6 @@ import {
|
|
|
233
233
|
watch,
|
|
234
234
|
} from "vue";
|
|
235
235
|
|
|
236
|
-
import { directive as vClickOutside } from "vue3-click-away";
|
|
237
|
-
|
|
238
236
|
import {
|
|
239
237
|
themeTypes,
|
|
240
238
|
loaderThemeTypes,
|
|
@@ -251,6 +249,7 @@ import useToggle from "../composition/toggle";
|
|
|
251
249
|
import useCancel from "../composition/cancel";
|
|
252
250
|
import useLabels from "../composition/labels";
|
|
253
251
|
import useEmitter from "../composition/emitter";
|
|
252
|
+
import useClickOutside from "../composition/click-outside";
|
|
254
253
|
import usePreselectedOptions from "../composition/preselected-options";
|
|
255
254
|
import useSearchValue from "../composition/search-value";
|
|
256
255
|
|
|
@@ -261,7 +260,7 @@ import ExtendedMultiselectToggle from "./ExtendedMultiselectToggle.vue";
|
|
|
261
260
|
|
|
262
261
|
/**
|
|
263
262
|
* @author Ridiger Daniil Dmitrievich, 2022
|
|
264
|
-
* @version 1.
|
|
263
|
+
* @version 1.7.0
|
|
265
264
|
*/
|
|
266
265
|
|
|
267
266
|
const props = defineProps({
|
|
@@ -912,6 +911,7 @@ const togglePattern = /^extended__multiselect-toggle_wrapper/i;
|
|
|
912
911
|
*/
|
|
913
912
|
const extendedMultiselect = ref(null);
|
|
914
913
|
const extendedMultiselectToggle = ref(null);
|
|
914
|
+
const extendedMultiselectWrapper = ref(null);
|
|
915
915
|
|
|
916
916
|
const {
|
|
917
917
|
defaultExpanded,
|
|
@@ -954,6 +954,7 @@ provide("setSearchValue", setSearchValue);
|
|
|
954
954
|
provide("setSearchPattern", setSearchPattern);
|
|
955
955
|
|
|
956
956
|
const { emitter } = useEmitter();
|
|
957
|
+
const { clickOutside } = useClickOutside();
|
|
957
958
|
const { toggleOptionsList } = useToggle(
|
|
958
959
|
loading,
|
|
959
960
|
disabled,
|
|
@@ -1182,15 +1183,6 @@ const activeEmitter = () => {
|
|
|
1182
1183
|
emit("active", eventData);
|
|
1183
1184
|
};
|
|
1184
1185
|
|
|
1185
|
-
/**
|
|
1186
|
-
* Handler for "v-click-outside" directive
|
|
1187
|
-
* @function
|
|
1188
|
-
* @emits "extended:rollup-options"
|
|
1189
|
-
*/
|
|
1190
|
-
const clickOutside = () => {
|
|
1191
|
-
emitter.value.emit("extended:rollup-options");
|
|
1192
|
-
};
|
|
1193
|
-
|
|
1194
1186
|
/**
|
|
1195
1187
|
* Emits "close" when dropdown options list is rolled up
|
|
1196
1188
|
* @function
|
|
@@ -1774,6 +1766,10 @@ onMounted(() => {
|
|
|
1774
1766
|
emitter.value.on("extended:loader-pattern-changed", (pattern) => {
|
|
1775
1767
|
loadOptionsByExternalLoader(pattern, false);
|
|
1776
1768
|
});
|
|
1769
|
+
|
|
1770
|
+
clickOutside.value.init(extendedMultiselectWrapper.value, () => {
|
|
1771
|
+
emitter.value.emit("extended:rollup-options");
|
|
1772
|
+
});
|
|
1777
1773
|
});
|
|
1778
1774
|
|
|
1779
1775
|
defineExpose({
|