vue3-extended-multiselect 0.3.0 → 1.0.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/.eslintrc.js +35 -29
- package/.github/workflows/publish.yml +41 -41
- package/CHANGELOG.md +91 -72
- package/LICENSE +21 -21
- package/README.md +261 -262
- package/babel.config.js +3 -2
- package/index.js +2 -2
- package/jest.config.js +57 -57
- package/package.json +47 -48
- package/src/assets/base-arrow.svg +70 -70
- package/src/assets/cancel.svg +34 -34
- package/src/assets/circle-arrow.svg +7 -7
- package/src/assets/double-arrow.svg +39 -39
- package/src/assets/inner-arrow.svg +8 -8
- package/src/assets/loader.svg +5 -5
- package/src/assets/triangle-arrow.svg +72 -72
- package/src/assets/triangle-circle-arrow.svg +38 -38
- package/src/assets/wide-arrow.svg +72 -72
- package/src/components/ExtendedMultiselectCancel.vue +148 -145
- package/src/components/ExtendedMultiselectInput.vue +617 -617
- package/src/components/ExtendedMultiselectLoader.vue +182 -176
- package/src/components/ExtendedMultiselectMultiple.vue +295 -291
- package/src/components/ExtendedMultiselectOptions.vue +1091 -1088
- package/src/components/ExtendedMultiselectToggle.vue +261 -261
- package/src/components/Vue3ExtendedMultiselect.vue +1661 -1661
- package/src/composition/cancel.js +33 -28
- package/src/composition/image-path.js +17 -0
- package/src/composition/labels.js +39 -39
- package/src/composition/preselected-options.js +66 -66
- package/src/composition/search-value.js +33 -33
- package/src/composition/sizes.js +42 -42
- package/src/composition/toggle.js +33 -31
- package/src/events/emitter.js +3 -0
- package/src/sets/sets.js +99 -99
- package/src/styles/animations.css +18 -18
- package/src/styles/main.css +432 -432
- package/src/styles/variables.css +47 -48
- package/tests/unit/events.spec.js +135 -135
- package/tests/unit/props.spec.js +1040 -1040
- package/tests/utils/mount.js +37 -37
- package/tests/utils/utils.js +20 -20
- package/typings/vue3-extended-multiselect.d.ts +42 -42
- package/.eslintignore +0 -2
- package/vite.config.js +0 -7
|
@@ -1,176 +1,182 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="extended__multiselect-loader">
|
|
3
|
-
<img
|
|
4
|
-
alt=""
|
|
5
|
-
:class="[iconFilterClass, iconSizeClass, 'extended__multiselect-loader-animate']"
|
|
6
|
-
:src="
|
|
7
|
-
/>
|
|
8
|
-
<svg
|
|
9
|
-
version="1.1"
|
|
10
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
12
|
-
width="0"
|
|
13
|
-
height="0"
|
|
14
|
-
>
|
|
15
|
-
<defs>
|
|
16
|
-
<filter
|
|
17
|
-
x="0"
|
|
18
|
-
y="0"
|
|
19
|
-
width="1"
|
|
20
|
-
height="1"
|
|
21
|
-
id="filterLoaderDefault"
|
|
22
|
-
>
|
|
23
|
-
<feFlood flood-color="#00BFFF"/>
|
|
24
|
-
<feComposite
|
|
25
|
-
out="SourceGraphic"
|
|
26
|
-
in2="SourceGraphic"
|
|
27
|
-
operator="in"
|
|
28
|
-
/>
|
|
29
|
-
</filter>
|
|
30
|
-
<filter
|
|
31
|
-
x="0"
|
|
32
|
-
y="0"
|
|
33
|
-
width="1"
|
|
34
|
-
height="1"
|
|
35
|
-
id="filterLoaderBasic"
|
|
36
|
-
>
|
|
37
|
-
<feFlood flood-color="#708090"/>
|
|
38
|
-
<feComposite
|
|
39
|
-
out="SourceGraphic"
|
|
40
|
-
in2="SourceGraphic"
|
|
41
|
-
operator="in"
|
|
42
|
-
/>
|
|
43
|
-
</filter>
|
|
44
|
-
<filter
|
|
45
|
-
x="0"
|
|
46
|
-
y="0"
|
|
47
|
-
width="1"
|
|
48
|
-
height="1"
|
|
49
|
-
id="filterLoaderSlateGrey"
|
|
50
|
-
>
|
|
51
|
-
<feFlood flood-color="#2F4F4F"/>
|
|
52
|
-
<feComposite
|
|
53
|
-
out="SourceGraphic"
|
|
54
|
-
in2="SourceGraphic"
|
|
55
|
-
operator="in"
|
|
56
|
-
/>
|
|
57
|
-
</filter>
|
|
58
|
-
<filter
|
|
59
|
-
x="0"
|
|
60
|
-
y="0"
|
|
61
|
-
width="1"
|
|
62
|
-
height="1"
|
|
63
|
-
id="filterLoaderSlateBlue"
|
|
64
|
-
>
|
|
65
|
-
<feFlood flood-color="#483D8B"/>
|
|
66
|
-
<feComposite
|
|
67
|
-
out="SourceGraphic"
|
|
68
|
-
in2="SourceGraphic"
|
|
69
|
-
operator="in"
|
|
70
|
-
/>
|
|
71
|
-
</filter>
|
|
72
|
-
<filter
|
|
73
|
-
x="0"
|
|
74
|
-
y="0"
|
|
75
|
-
width="1"
|
|
76
|
-
height="1"
|
|
77
|
-
id="filterLoaderTeal"
|
|
78
|
-
>
|
|
79
|
-
<feFlood flood-color="#008080"/>
|
|
80
|
-
<feComposite
|
|
81
|
-
out="SourceGraphic"
|
|
82
|
-
in2="SourceGraphic"
|
|
83
|
-
operator="in"
|
|
84
|
-
/>
|
|
85
|
-
</filter>
|
|
86
|
-
<filter
|
|
87
|
-
x="0"
|
|
88
|
-
y="0"
|
|
89
|
-
width="1"
|
|
90
|
-
height="1"
|
|
91
|
-
id="filterLoaderStrict"
|
|
92
|
-
>
|
|
93
|
-
<feFlood flood-color="#00BFFF"/>
|
|
94
|
-
<feComposite
|
|
95
|
-
out="SourceGraphic"
|
|
96
|
-
in2="SourceGraphic"
|
|
97
|
-
operator="in"
|
|
98
|
-
/>
|
|
99
|
-
</filter>
|
|
100
|
-
</defs>
|
|
101
|
-
</svg>
|
|
102
|
-
</div>
|
|
103
|
-
</template>
|
|
104
|
-
|
|
105
|
-
<script setup>
|
|
106
|
-
import {
|
|
107
|
-
computed,
|
|
108
|
-
defineProps,
|
|
109
|
-
inject,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
*
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
const {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
case "
|
|
159
|
-
basicFilter = `${basicFilter}
|
|
160
|
-
break;
|
|
161
|
-
case "
|
|
162
|
-
basicFilter = `${basicFilter}
|
|
163
|
-
break;
|
|
164
|
-
case "
|
|
165
|
-
basicFilter = `${basicFilter}
|
|
166
|
-
break;
|
|
167
|
-
case "
|
|
168
|
-
basicFilter = `${basicFilter}
|
|
169
|
-
break;
|
|
170
|
-
|
|
171
|
-
basicFilter = `${basicFilter}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="extended__multiselect-loader">
|
|
3
|
+
<img
|
|
4
|
+
alt=""
|
|
5
|
+
:class="[iconFilterClass, iconSizeClass, 'extended__multiselect-loader-animate']"
|
|
6
|
+
:src="loaderIcon"
|
|
7
|
+
/>
|
|
8
|
+
<svg
|
|
9
|
+
version="1.1"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
12
|
+
width="0"
|
|
13
|
+
height="0"
|
|
14
|
+
>
|
|
15
|
+
<defs>
|
|
16
|
+
<filter
|
|
17
|
+
x="0"
|
|
18
|
+
y="0"
|
|
19
|
+
width="1"
|
|
20
|
+
height="1"
|
|
21
|
+
id="filterLoaderDefault"
|
|
22
|
+
>
|
|
23
|
+
<feFlood flood-color="#00BFFF"/>
|
|
24
|
+
<feComposite
|
|
25
|
+
out="SourceGraphic"
|
|
26
|
+
in2="SourceGraphic"
|
|
27
|
+
operator="in"
|
|
28
|
+
/>
|
|
29
|
+
</filter>
|
|
30
|
+
<filter
|
|
31
|
+
x="0"
|
|
32
|
+
y="0"
|
|
33
|
+
width="1"
|
|
34
|
+
height="1"
|
|
35
|
+
id="filterLoaderBasic"
|
|
36
|
+
>
|
|
37
|
+
<feFlood flood-color="#708090"/>
|
|
38
|
+
<feComposite
|
|
39
|
+
out="SourceGraphic"
|
|
40
|
+
in2="SourceGraphic"
|
|
41
|
+
operator="in"
|
|
42
|
+
/>
|
|
43
|
+
</filter>
|
|
44
|
+
<filter
|
|
45
|
+
x="0"
|
|
46
|
+
y="0"
|
|
47
|
+
width="1"
|
|
48
|
+
height="1"
|
|
49
|
+
id="filterLoaderSlateGrey"
|
|
50
|
+
>
|
|
51
|
+
<feFlood flood-color="#2F4F4F"/>
|
|
52
|
+
<feComposite
|
|
53
|
+
out="SourceGraphic"
|
|
54
|
+
in2="SourceGraphic"
|
|
55
|
+
operator="in"
|
|
56
|
+
/>
|
|
57
|
+
</filter>
|
|
58
|
+
<filter
|
|
59
|
+
x="0"
|
|
60
|
+
y="0"
|
|
61
|
+
width="1"
|
|
62
|
+
height="1"
|
|
63
|
+
id="filterLoaderSlateBlue"
|
|
64
|
+
>
|
|
65
|
+
<feFlood flood-color="#483D8B"/>
|
|
66
|
+
<feComposite
|
|
67
|
+
out="SourceGraphic"
|
|
68
|
+
in2="SourceGraphic"
|
|
69
|
+
operator="in"
|
|
70
|
+
/>
|
|
71
|
+
</filter>
|
|
72
|
+
<filter
|
|
73
|
+
x="0"
|
|
74
|
+
y="0"
|
|
75
|
+
width="1"
|
|
76
|
+
height="1"
|
|
77
|
+
id="filterLoaderTeal"
|
|
78
|
+
>
|
|
79
|
+
<feFlood flood-color="#008080"/>
|
|
80
|
+
<feComposite
|
|
81
|
+
out="SourceGraphic"
|
|
82
|
+
in2="SourceGraphic"
|
|
83
|
+
operator="in"
|
|
84
|
+
/>
|
|
85
|
+
</filter>
|
|
86
|
+
<filter
|
|
87
|
+
x="0"
|
|
88
|
+
y="0"
|
|
89
|
+
width="1"
|
|
90
|
+
height="1"
|
|
91
|
+
id="filterLoaderStrict"
|
|
92
|
+
>
|
|
93
|
+
<feFlood flood-color="#00BFFF"/>
|
|
94
|
+
<feComposite
|
|
95
|
+
out="SourceGraphic"
|
|
96
|
+
in2="SourceGraphic"
|
|
97
|
+
operator="in"
|
|
98
|
+
/>
|
|
99
|
+
</filter>
|
|
100
|
+
</defs>
|
|
101
|
+
</svg>
|
|
102
|
+
</div>
|
|
103
|
+
</template>
|
|
104
|
+
|
|
105
|
+
<script setup>
|
|
106
|
+
import {
|
|
107
|
+
computed,
|
|
108
|
+
defineProps,
|
|
109
|
+
inject,
|
|
110
|
+
ref,
|
|
111
|
+
toRefs,
|
|
112
|
+
} from "vue";
|
|
113
|
+
|
|
114
|
+
import useImagePath from "../composition/image-path";
|
|
115
|
+
import useSizes from "../composition/sizes";
|
|
116
|
+
|
|
117
|
+
const props = defineProps({
|
|
118
|
+
/**
|
|
119
|
+
* Defines svg-filter for loader icon
|
|
120
|
+
* @property {string} iconFilter
|
|
121
|
+
*/
|
|
122
|
+
iconFilter: {
|
|
123
|
+
type: String,
|
|
124
|
+
required: true,
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Provides size to create special size-class
|
|
129
|
+
* for each kind of icon
|
|
130
|
+
* @property {string} iconSize
|
|
131
|
+
*/
|
|
132
|
+
iconSize: {
|
|
133
|
+
type: String,
|
|
134
|
+
required: true,
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
const loaderIconFilter = inject("loaderIconFilter");
|
|
139
|
+
|
|
140
|
+
const { iconSize } = toRefs(props);
|
|
141
|
+
|
|
142
|
+
const { createImagePath } = useImagePath();
|
|
143
|
+
|
|
144
|
+
const loaderIcon = ref(createImagePath("loader.svg"));
|
|
145
|
+
|
|
146
|
+
const { iconSizeClass } = useSizes(iconSize);
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Defines class for loader icon
|
|
150
|
+
* depends on injected filter name
|
|
151
|
+
* @function
|
|
152
|
+
* @returns {string} class
|
|
153
|
+
*/
|
|
154
|
+
const iconFilterClass = computed(() => {
|
|
155
|
+
let basicFilter = "extended__multiselect-loader";
|
|
156
|
+
|
|
157
|
+
switch(loaderIconFilter) {
|
|
158
|
+
case "default-loader":
|
|
159
|
+
basicFilter = `${basicFilter}_default-loader`;
|
|
160
|
+
break;
|
|
161
|
+
case "basic":
|
|
162
|
+
basicFilter = `${basicFilter}_basic`;
|
|
163
|
+
break;
|
|
164
|
+
case "slate-grey":
|
|
165
|
+
basicFilter = `${basicFilter}_slate-grey`;
|
|
166
|
+
break;
|
|
167
|
+
case "slate-blue":
|
|
168
|
+
basicFilter = `${basicFilter}_slate-blue`;
|
|
169
|
+
break;
|
|
170
|
+
case "teal":
|
|
171
|
+
basicFilter = `${basicFilter}_teal`;
|
|
172
|
+
break;
|
|
173
|
+
case "strict":
|
|
174
|
+
basicFilter = `${basicFilter}_strict`;
|
|
175
|
+
break;
|
|
176
|
+
default:
|
|
177
|
+
basicFilter = `${basicFilter}_default-loader`;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return basicFilter;
|
|
181
|
+
});
|
|
182
|
+
</script>
|