vue3-extended-multiselect 0.2.0 → 0.2.1
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 +7 -2
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/components/ExtendedMultiselectCancel.vue +5 -2
- package/src/components/ExtendedMultiselectLoader.vue +1 -1
- package/src/components/ExtendedMultiselectMultiple.vue +1 -1
- package/src/components/ExtendedMultiselectOptions.vue +2 -2
- package/src/components/ExtendedMultiselectToggle.vue +10 -3
- package/src/components/Vue3ExtendedMultiselect.vue +15 -5
- package/src/composition/cancel.js +1 -3
- package/src/composition/labels.js +1 -1
- package/src/composition/preselected-options.js +1 -1
- package/src/composition/sizes.js +1 -1
- package/src/composition/toggle.js +1 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Patch notes
|
|
2
2
|
|
|
3
|
-
Current `vue3-extended-multiselect` version: **0.2.
|
|
3
|
+
Current `vue3-extended-multiselect` version: **0.2.1**
|
|
4
4
|
|
|
5
5
|
***
|
|
6
6
|
|
|
@@ -57,4 +57,9 @@ Adding descriptive comments for some types in typings.
|
|
|
57
57
|
* Adding .eslintignore file.
|
|
58
58
|
* Replacing some of default exports with common exports.
|
|
59
59
|
* Arranging CSS-variabled in alphabetical order.
|
|
60
|
-
* Adding customizing section in documentation.
|
|
60
|
+
* Adding customizing section in documentation.
|
|
61
|
+
|
|
62
|
+
### 0.2.1 (2022-12-08)
|
|
63
|
+
|
|
64
|
+
* Replacing all common exports with default exports.
|
|
65
|
+
* Removal of excess emitter import in composition.
|
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -29,8 +29,10 @@ import {
|
|
|
29
29
|
toRefs,
|
|
30
30
|
} from "vue";
|
|
31
31
|
|
|
32
|
-
import
|
|
33
|
-
|
|
32
|
+
import emitter from "tiny-emitter/instance";
|
|
33
|
+
|
|
34
|
+
import useCancel from "../composition/cancel";
|
|
35
|
+
import useSizes from "../composition/sizes";
|
|
34
36
|
|
|
35
37
|
import ExtendedMultiselectLoader from "./ExtendedMultiselectLoader.vue";
|
|
36
38
|
|
|
@@ -115,6 +117,7 @@ const { cancel } = useCancel(
|
|
|
115
117
|
disabled,
|
|
116
118
|
showSearchField,
|
|
117
119
|
selectedOptions,
|
|
120
|
+
emitter,
|
|
118
121
|
);
|
|
119
122
|
const { iconSizeClass } = useSizes(iconSize);
|
|
120
123
|
|
|
@@ -102,8 +102,8 @@ import {
|
|
|
102
102
|
|
|
103
103
|
import emitter from 'tiny-emitter/instance';
|
|
104
104
|
|
|
105
|
-
import
|
|
106
|
-
import
|
|
105
|
+
import usePreselectedOptions from "../composition/preselected-options";
|
|
106
|
+
import useLabels from "../composition/labels";
|
|
107
107
|
|
|
108
108
|
import { UnionPropType } from "../sets/sets";
|
|
109
109
|
|
|
@@ -83,8 +83,10 @@ import {
|
|
|
83
83
|
toRefs,
|
|
84
84
|
} from "vue";
|
|
85
85
|
|
|
86
|
-
import
|
|
87
|
-
|
|
86
|
+
import emitter from "tiny-emitter/instance";
|
|
87
|
+
|
|
88
|
+
import useToggle from "../composition/toggle";
|
|
89
|
+
import useSizes from "../composition/sizes";
|
|
88
90
|
|
|
89
91
|
import ExtendedMultiselectLoader from "./ExtendedMultiselectLoader.vue";
|
|
90
92
|
|
|
@@ -166,7 +168,12 @@ const {
|
|
|
166
168
|
toggleIcon,
|
|
167
169
|
} = toRefs(props);
|
|
168
170
|
|
|
169
|
-
const { toggleSlotClass, toggleOptionsList } = useToggle(
|
|
171
|
+
const { toggleSlotClass, toggleOptionsList } = useToggle(
|
|
172
|
+
loading,
|
|
173
|
+
disabled,
|
|
174
|
+
null,
|
|
175
|
+
emitter,
|
|
176
|
+
);
|
|
170
177
|
const { iconSizeClass } = useSizes(iconSize);
|
|
171
178
|
|
|
172
179
|
/**
|
|
@@ -231,9 +231,9 @@ import {
|
|
|
231
231
|
UnionPropType,
|
|
232
232
|
} from "../sets/sets";
|
|
233
233
|
|
|
234
|
-
import
|
|
235
|
-
import
|
|
236
|
-
import
|
|
234
|
+
import useToggle from "../composition/toggle";
|
|
235
|
+
import useCancel from "../composition/cancel";
|
|
236
|
+
import usePreselectedOptions from "../composition/preselected-options";
|
|
237
237
|
import useSearchValue from "../composition/search-value";
|
|
238
238
|
|
|
239
239
|
import ExtendedMultiselectCancel from "./ExtendedMultiselectCancel.vue";
|
|
@@ -894,8 +894,18 @@ provide("searchState", searchState);
|
|
|
894
894
|
provide("setSearchValue", setSearchValue);
|
|
895
895
|
provide("setSearchPattern", setSearchPattern);
|
|
896
896
|
|
|
897
|
-
const { toggleOptionsList } = useToggle(
|
|
898
|
-
|
|
897
|
+
const { toggleOptionsList } = useToggle(
|
|
898
|
+
loading,
|
|
899
|
+
disabled,
|
|
900
|
+
internalLoader,
|
|
901
|
+
emitter,
|
|
902
|
+
);
|
|
903
|
+
const { cancel } = useCancel(
|
|
904
|
+
disabled,
|
|
905
|
+
showSearchField,
|
|
906
|
+
selectedOptions,
|
|
907
|
+
emitter,
|
|
908
|
+
);
|
|
899
909
|
const { createLabel, optionTypeRestrictor } = usePreselectedOptions(
|
|
900
910
|
label,
|
|
901
911
|
emptyObjectsPlaceholder,
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import emitter from 'tiny-emitter/instance';
|
|
2
|
-
|
|
3
1
|
import useSearchValue from './search-value';
|
|
4
2
|
|
|
5
|
-
export function useCancel(disabled, showSearchField, selectedOptions) {
|
|
3
|
+
export default function useCancel(disabled, showSearchField, selectedOptions, emitter) {
|
|
6
4
|
/**
|
|
7
5
|
* Removes all selected options or single selected option
|
|
8
6
|
* when "multiple" prop equals false
|
package/src/composition/sizes.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { computed, readonly } from "vue";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export function useToggle(loading, disabled, internalLoader) {
|
|
3
|
+
export default function useToggle(loading, disabled, internalLoader, emitter) {
|
|
6
4
|
/**
|
|
7
5
|
* Toggles classes of slots if "loading"
|
|
8
6
|
* or "disabled" props equals true
|