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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Patch notes
2
2
 
3
- Current `vue3-extended-multiselect` version: **0.2.0**
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
@@ -1,4 +1,4 @@
1
- # vue3-extended-multiselect v0.2.0
1
+ # vue3-extended-multiselect v0.2.1
2
2
 
3
3
  ***
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue3-extended-multiselect",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Extended multiselect component for applications based on Vue 3 framework",
5
5
  "keywords": [
6
6
  "multiselect",
@@ -29,8 +29,10 @@ import {
29
29
  toRefs,
30
30
  } from "vue";
31
31
 
32
- import { useCancel } from "../composition/cancel";
33
- import { useSizes } from "../composition/sizes";
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
 
@@ -110,7 +110,7 @@ import {
110
110
  toRefs,
111
111
  } from "vue";
112
112
 
113
- import { useSizes } from "../composition/sizes";
113
+ import useSizes from "../composition/sizes";
114
114
 
115
115
  const props = defineProps({
116
116
  /**
@@ -59,7 +59,7 @@ import {
59
59
 
60
60
  import emitter from "tiny-emitter/instance";
61
61
 
62
- import { useLabels } from "../composition/labels";
62
+ import useLabels from "../composition/labels";
63
63
 
64
64
  const props = defineProps({
65
65
  /**
@@ -102,8 +102,8 @@ import {
102
102
 
103
103
  import emitter from 'tiny-emitter/instance';
104
104
 
105
- import { usePreselectedOptions } from "../composition/preselected-options";
106
- import { useLabels } from "../composition/labels";
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 { useToggle } from "../composition/toggle";
87
- import { useSizes } from "../composition/sizes";
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(loading, disabled);
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 { useToggle } from "../composition/toggle";
235
- import { useCancel } from "../composition/cancel";
236
- import { usePreselectedOptions } from "../composition/preselected-options";
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(loading, disabled, internalLoader);
898
- const { cancel } = useCancel(disabled, showSearchField, selectedOptions);
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
@@ -1,4 +1,4 @@
1
- export function useLabels(
1
+ export default function useLabels(
2
2
  createCustomOptionLabel,
3
3
  emptyObjectsPlaceholder,
4
4
  ) {
@@ -1,4 +1,4 @@
1
- export function usePreselectedOptions(
1
+ export default function usePreselectedOptions(
2
2
  label,
3
3
  emptyObjectsPlaceholder,
4
4
  showInsertWarnings,
@@ -4,7 +4,7 @@ import {
4
4
  readonly,
5
5
  } from "vue";
6
6
 
7
- export function useSizes(iconSize) {
7
+ export default function useSizes(iconSize) {
8
8
  /**
9
9
  * Defines classes for each kind of icon
10
10
  * @function
@@ -1,8 +1,6 @@
1
1
  import { computed, readonly } from "vue";
2
2
 
3
- import emitter from 'tiny-emitter/instance';
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