vue3-extended-multiselect 1.10.2 → 2.0.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/LICENSE +21 -21
- package/README.md +270 -270
- package/dist/Vue3ExtendedMultiselect.cjs.js +5295 -0
- package/dist/Vue3ExtendedMultiselect.cjs.js.map +1 -0
- package/dist/Vue3ExtendedMultiselect.esm.js +5290 -0
- package/dist/Vue3ExtendedMultiselect.esm.js.map +1 -0
- package/{src/assets → dist/assets/images}/base-arrow.svg +70 -70
- package/{src/assets → dist/assets/images}/cancel.svg +34 -34
- package/{src/assets → dist/assets/images}/circle-arrow.svg +7 -7
- package/{src/assets → dist/assets/images}/double-arrow.svg +39 -39
- package/{src/assets → dist/assets/images}/inner-arrow.svg +8 -8
- package/{src/assets → dist/assets/images}/loader.svg +5 -5
- package/{src/assets → dist/assets/images}/triangle-arrow.svg +72 -72
- package/{src/assets → dist/assets/images}/triangle-circle-arrow.svg +38 -38
- package/{src/assets → dist/assets/images}/wide-arrow.svg +72 -72
- package/dist/types/index.d.ts +46 -0
- package/package.json +60 -46
- package/.browserslistrc +0 -3
- package/.eslintrc.js +0 -35
- package/.github/workflows/publish.yml +0 -41
- package/.nvmrc +0 -0
- package/CHANGELOG.md +0 -389
- package/CONTRIBUTING.md +0 -57
- package/babel.config.js +0 -10
- package/index.js +0 -3
- package/jest.config.js +0 -62
- package/src/components/ExtendedMultiselectCancel.vue +0 -165
- package/src/components/ExtendedMultiselectInput.vue +0 -742
- package/src/components/ExtendedMultiselectLoader.vue +0 -182
- package/src/components/ExtendedMultiselectMultiple.vue +0 -400
- package/src/components/ExtendedMultiselectOptions.vue +0 -1191
- package/src/components/ExtendedMultiselectToggle.vue +0 -272
- package/src/components/Vue3ExtendedMultiselect.vue +0 -1950
- package/src/composition/cancel.js +0 -40
- package/src/composition/click-outside.js +0 -9
- package/src/composition/debounce.js +0 -9
- package/src/composition/emitter.js +0 -9
- package/src/composition/image-path.js +0 -17
- package/src/composition/labels.js +0 -42
- package/src/composition/preselected-options.js +0 -68
- package/src/composition/search-value.js +0 -34
- package/src/composition/sizes.js +0 -45
- package/src/composition/toggle.js +0 -32
- package/src/sets/sets.js +0 -100
- package/src/styles/animations.css +0 -19
- package/src/styles/main.css +0 -460
- package/src/styles/variables.css +0 -52
- package/src/tools/Debounce.js +0 -26
- package/src/tools/LocalEmitter.js +0 -32
- package/src/tools/instance.js +0 -3
- package/tests/unit/events.spec.js +0 -150
- package/tests/unit/props.spec.js +0 -1156
- package/tests/unit/tools.spec.js +0 -54
- package/tests/utils/mocks.js +0 -1
- package/tests/utils/mount.js +0 -38
- package/tests/utils/stubs.js +0 -1
- package/tests/utils/utils.js +0 -25
- package/typings/vue3-extended-multiselect.d.ts +0 -44
package/CHANGELOG.md
DELETED
|
@@ -1,389 +0,0 @@
|
|
|
1
|
-
# Patch notes
|
|
2
|
-
|
|
3
|
-
Current `vue3-extended-multiselect` version: **1.10.2**
|
|
4
|
-
|
|
5
|
-
***
|
|
6
|
-
|
|
7
|
-
### 0.0.1 (2022-11-29)
|
|
8
|
-
|
|
9
|
-
Component `vue3-extended-multiselect` was released.
|
|
10
|
-
|
|
11
|
-
### 0.0.2 (2022-11-29)
|
|
12
|
-
|
|
13
|
-
Small fixes in documentation.
|
|
14
|
-
|
|
15
|
-
### 0.0.3 (2022-11-29)
|
|
16
|
-
|
|
17
|
-
Changing font-size property of "props" table in documentation.
|
|
18
|
-
|
|
19
|
-
### 0.0.4 (2022-11-30)
|
|
20
|
-
|
|
21
|
-
Correction of cancel button highlighting while loading.
|
|
22
|
-
|
|
23
|
-
### 0.0.5 (2022-11-30)
|
|
24
|
-
|
|
25
|
-
Changing tables format in documentation.
|
|
26
|
-
|
|
27
|
-
### 0.0.6 (2022-11-30)
|
|
28
|
-
|
|
29
|
-
Relocation of main.js file for local qa tests.
|
|
30
|
-
|
|
31
|
-
### 0.1.0 (2022-12-01)
|
|
32
|
-
|
|
33
|
-
* Changing the style language from `sass` to `css` for greater package accessibility.
|
|
34
|
-
* Removal of dev-dependency "sass".
|
|
35
|
-
* Removal of dev-dependency "sass-loader".
|
|
36
|
-
|
|
37
|
-
### 0.1.1 (2022-12-01)
|
|
38
|
-
|
|
39
|
-
Placeholder color fixes.
|
|
40
|
-
|
|
41
|
-
### 0.1.2 (2022-12-01)
|
|
42
|
-
|
|
43
|
-
Removal of excess symbol in styles.
|
|
44
|
-
|
|
45
|
-
### 0.1.3 (2022-12-05)
|
|
46
|
-
|
|
47
|
-
Adding .nvmrc file.
|
|
48
|
-
|
|
49
|
-
### 0.1.4 (2022-12-05)
|
|
50
|
-
|
|
51
|
-
Adding descriptive comments for some types in typings.
|
|
52
|
-
|
|
53
|
-
### 0.2.0 (2022-12-07)
|
|
54
|
-
|
|
55
|
-
* Fixing bug with hidden "noOptions" slot when list of available options is empty.
|
|
56
|
-
* Fixing warning with incorrect array type reactive field initialization.
|
|
57
|
-
* Adding .eslintignore file.
|
|
58
|
-
* Replacing some of default exports with common exports.
|
|
59
|
-
* Arranging CSS-variabled in alphabetical order.
|
|
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 api.
|
|
66
|
-
|
|
67
|
-
### 0.3.0 (2022-12-08)
|
|
68
|
-
|
|
69
|
-
* Adding vite.config.js file.
|
|
70
|
-
* Adding "vite" dependency
|
|
71
|
-
* Adding "vite-plugin-require" dependency
|
|
72
|
-
* Component adaptation for vite.
|
|
73
|
-
|
|
74
|
-
### 1.0.0 (2022-12-10)
|
|
75
|
-
|
|
76
|
-
* Removal of dependency "tiny-emitter".
|
|
77
|
-
* Removal of dependency "vite".
|
|
78
|
-
* Removal of dependency "vite-plugin-require".
|
|
79
|
-
* Adding "mitt" dependency.
|
|
80
|
-
* Adding "babel-plugin-transform-import-meta" dev-dependency.
|
|
81
|
-
* Removal of .eslintignore file.
|
|
82
|
-
* Removal of vite.config.js file.
|
|
83
|
-
* Adding "events" directory with emitter.js file using "mitt" dependency.
|
|
84
|
-
* Adding image-path.js file with "useImagePath" custom hook.
|
|
85
|
-
* Adding emitter import in composition api from "mitt" dependency.
|
|
86
|
-
* Adding some new css-variabled.
|
|
87
|
-
* Removal of some old css-variables.
|
|
88
|
-
* Changing styles of "marker" and "option" slots.
|
|
89
|
-
* Adding new fields in "parserOptions" section of .eslintrc.
|
|
90
|
-
* Disabling "no-undef" rule in .eslintrc.
|
|
91
|
-
* Static file import optimization for different module builders.
|
|
92
|
-
|
|
93
|
-
### 1.1.0 (2022-12-10)
|
|
94
|
-
|
|
95
|
-
* Removal of dependency "lodash.debounce".
|
|
96
|
-
* Removal of dependency "click-outside".
|
|
97
|
-
* Adding "lodash-es" dependency.
|
|
98
|
-
* Adding "vue3-click-away" dependency.
|
|
99
|
-
* Adding "transformIgnorePatterns" section in jest.config.js.
|
|
100
|
-
* Replacing "clickOutside" function in "onMounted" hook with "v-click-outside" directive.
|
|
101
|
-
* Fixing bug with rolling up options list when "toggleOptionsBySelect" prop is set to false.
|
|
102
|
-
* Fixing bug with reaching "optionsWrapper" ref before initialization.
|
|
103
|
-
|
|
104
|
-
### 1.1.1 (2022-12-10)
|
|
105
|
-
|
|
106
|
-
* Replacing package-lock.json file with new one.
|
|
107
|
-
|
|
108
|
-
### 1.1.2 (2022-12-10)
|
|
109
|
-
|
|
110
|
-
* Replacing dev-dependency "@vue/cli-plugin-eslint" with its latest version.
|
|
111
|
-
|
|
112
|
-
### 1.1.3 (2022-12-11)
|
|
113
|
-
|
|
114
|
-
* Adding "searchByField" optional prop.
|
|
115
|
-
* Adding unit-test for new optional prop.
|
|
116
|
-
|
|
117
|
-
### 1.1.4 (2022-12-13)
|
|
118
|
-
|
|
119
|
-
* Adding "optionCreateLabel" to expose as utility.
|
|
120
|
-
* Fixing bug with wrong name of label field
|
|
121
|
-
|
|
122
|
-
### 1.1.5 (2022-12-14)
|
|
123
|
-
|
|
124
|
-
* Fixing bug with empty raw options list when using async loader.
|
|
125
|
-
|
|
126
|
-
### 1.1.6 (2022-12-14)
|
|
127
|
-
|
|
128
|
-
* Fixing bug with extra call of async loader by changing value of search field.
|
|
129
|
-
* Adding new internal prop "externalOptionsLoader" to ExtendedMultiselectInput.
|
|
130
|
-
* Searching for options by async loader is moved to in separate method.
|
|
131
|
-
|
|
132
|
-
### 1.1.7 (2022-12-15)
|
|
133
|
-
|
|
134
|
-
* Adding "disableByField" prop for determination of field in options of type "object" which value will be used to disable such options.
|
|
135
|
-
|
|
136
|
-
### 1.1.8 (2022-12-18)
|
|
137
|
-
|
|
138
|
-
* Changing default value of "toggleIcon" prop to "base-arrow".
|
|
139
|
-
|
|
140
|
-
### 1.2.0 (2022-12-20)
|
|
141
|
-
|
|
142
|
-
* Adding "uuid" dependency
|
|
143
|
-
* Removal of "id" attribute of extended multiselect wrapper.
|
|
144
|
-
* Removal of "querySelector" usage in ExtendedMultiselect component. Switching to using event emitter.
|
|
145
|
-
* Fixing bug with bound event emitters between two extended multiselects.
|
|
146
|
-
* Fixing bug with undefined class in extended multiselect wrapper class list.
|
|
147
|
-
|
|
148
|
-
### 1.2.1 (2022-12-21)
|
|
149
|
-
|
|
150
|
-
* Moving transitions of "border-radius" css-property from computed property to css variable.
|
|
151
|
-
|
|
152
|
-
### 1.2.2 (2022-12-21)
|
|
153
|
-
|
|
154
|
-
* Removal of excess "transition" css-property.
|
|
155
|
-
|
|
156
|
-
### 1.2.3 (2022-12-22)
|
|
157
|
-
|
|
158
|
-
* Fixing bug with excess bottom offset of options list when prop "toggleAppearanceSide" is set to "atop".
|
|
159
|
-
* Supplementation of some css-variables.
|
|
160
|
-
|
|
161
|
-
### 1.2.4 (2022-12-22)
|
|
162
|
-
|
|
163
|
-
* Fixing bug of too wide extended multiselect with long single selected option.
|
|
164
|
-
|
|
165
|
-
### 1.3.0 (2023-01-11)
|
|
166
|
-
|
|
167
|
-
* Adding "autoSelectSearchValue" optional prop.
|
|
168
|
-
* Adding unit-test for new optional prop.
|
|
169
|
-
* Fixing bug with setting search pattern when deselecting of all options.
|
|
170
|
-
* Fixing bug with selected options display when prop "toggleOptionsBySelect" is set to false.
|
|
171
|
-
|
|
172
|
-
### 1.4.0 (2023-01-14)
|
|
173
|
-
|
|
174
|
-
* Removal of dependency "mitt".
|
|
175
|
-
* Adding LocalEmitter.js file with simplified event emitter instead of dependency "mitt".
|
|
176
|
-
* Changing event types in some of props unit-tests.
|
|
177
|
-
* Fixing bug with toggle restriction in custom slots.
|
|
178
|
-
|
|
179
|
-
### 1.4.1 (2023-01-14)
|
|
180
|
-
|
|
181
|
-
* Small fixes in documentation.
|
|
182
|
-
|
|
183
|
-
### 1.4.2 (2023-01-15)
|
|
184
|
-
|
|
185
|
-
* Regenerating of .nvmrc file.
|
|
186
|
-
|
|
187
|
-
### 1.5.0 (2023-01-21)
|
|
188
|
-
|
|
189
|
-
* Removal of dependency "uuid".
|
|
190
|
-
* Adding "events" prop to child components using LocalEmitter.
|
|
191
|
-
* Adding emitter.js file to composition directory with reactive LocalEmitter instace.
|
|
192
|
-
* Removal of "emitterUniqueId" prop from child components.
|
|
193
|
-
* Removal of emitter.js file from events directory.
|
|
194
|
-
* Changing event emitter invocations in some of unit tests.
|
|
195
|
-
|
|
196
|
-
### 1.5.1 (2023-01-25)
|
|
197
|
-
|
|
198
|
-
* Fixing bug with missing toggle on option click in single selection.
|
|
199
|
-
|
|
200
|
-
### 1.5.2 (2023-01-25)
|
|
201
|
-
|
|
202
|
-
* Fixing bug with empty class list in toggle restrictor when "disabled" prop equals true.
|
|
203
|
-
|
|
204
|
-
### 1.5.3 (2023-01-25)
|
|
205
|
-
|
|
206
|
-
* Fixing bug with incorrect setting of preselected options from v-model.
|
|
207
|
-
* Fixing bug with incompatible single preselected option.
|
|
208
|
-
|
|
209
|
-
### 1.5.4 (2023-01-25)
|
|
210
|
-
|
|
211
|
-
* Removal of restrictions for preselected options from v-model.
|
|
212
|
-
|
|
213
|
-
### 1.5.5 (2023-01-26)
|
|
214
|
-
|
|
215
|
-
* Changing some option block styles.
|
|
216
|
-
|
|
217
|
-
### 1.5.6 (2023-01-26)
|
|
218
|
-
|
|
219
|
-
* Fixing bug with "noOption" slot being displayed when search field value is not empty.
|
|
220
|
-
* Fixing bug with reload of preselected options when using external loader.
|
|
221
|
-
|
|
222
|
-
### 1.5.7 (2023-01-26)
|
|
223
|
-
|
|
224
|
-
* Removal of internal loading state because of using "lodash.debounce".
|
|
225
|
-
|
|
226
|
-
### 1.5.8 (2023-02-01)
|
|
227
|
-
|
|
228
|
-
* Adding CONTRIBUTING.md file.
|
|
229
|
-
|
|
230
|
-
### 1.5.9 (2023-02-01)
|
|
231
|
-
|
|
232
|
-
* "loading" prop no longer disables search field.
|
|
233
|
-
* Changing value of css-variable "--min-block-height" from 25px to 26px.
|
|
234
|
-
|
|
235
|
-
### 1.5.10 (2023-02-01)
|
|
236
|
-
|
|
237
|
-
* Fixing bug with field focus when selecting an option.
|
|
238
|
-
* Removal of validator from "emptyObjectsPlaceholder" prop.
|
|
239
|
-
|
|
240
|
-
### 1.6.0 (2023-02-02)
|
|
241
|
-
|
|
242
|
-
* Adding "showDeselectIconLoader" optional prop.
|
|
243
|
-
* Adding unit-test for new optional prop.
|
|
244
|
-
* Adding loader icon to deselect button of multiple option blocks depending on "showDeselectIconLoader" optional prop.
|
|
245
|
-
* Changing styles of multiple option blocks.
|
|
246
|
-
|
|
247
|
-
### 1.6.1 (2023-02-02)
|
|
248
|
-
|
|
249
|
-
* Fixing bug with not clotting options list when single option was selected.
|
|
250
|
-
|
|
251
|
-
### 1.6.2 (2023-02-02)
|
|
252
|
-
|
|
253
|
-
* Fixing bug with not clotting options list when multiple options were selected.
|
|
254
|
-
|
|
255
|
-
### 1.6.3 (2023-02-02)
|
|
256
|
-
|
|
257
|
-
* Fixing bug with duplicate options when using an external loader.
|
|
258
|
-
|
|
259
|
-
### 1.6.4 (2023-02-02)
|
|
260
|
-
|
|
261
|
-
* Fixing bug with duplication of selected and found options.
|
|
262
|
-
|
|
263
|
-
### 1.6.5 (2023-02-03)
|
|
264
|
-
|
|
265
|
-
* Fixing bug with not clotting options list when slots were used.
|
|
266
|
-
|
|
267
|
-
### 1.6.6 (2023-02-03)
|
|
268
|
-
|
|
269
|
-
* Adding unit-test for "showDeselectIconLoader" optional prop.
|
|
270
|
-
|
|
271
|
-
### 1.7.0 (2023-02-06)
|
|
272
|
-
|
|
273
|
-
* Adding "extended-click-outside" dependency.
|
|
274
|
-
* Adding click-outside.js file with to composition director with extended-click-outside-instanse.
|
|
275
|
-
* Changing "typescript" dependency version to "~4.1.0".
|
|
276
|
-
* Removal of "vue3-click-away" dependency.
|
|
277
|
-
|
|
278
|
-
### 1.7.1 (2023-02-07)
|
|
279
|
-
|
|
280
|
-
* Adding instance.js file with noт-reactive instance of local event emitter.
|
|
281
|
-
* Fixing bug with not clotting options list when clicking on another instance.
|
|
282
|
-
|
|
283
|
-
### 1.7.2 (2023-02-07)
|
|
284
|
-
|
|
285
|
-
* Changing event type to collapse the list of options when clicking on another instance.
|
|
286
|
-
|
|
287
|
-
### 1.7.3 (2023-02-07)
|
|
288
|
-
|
|
289
|
-
* Fixing bug with disabled removal of selected options based on external modelValue changes.
|
|
290
|
-
|
|
291
|
-
### 1.7.4 (2023-02-07)
|
|
292
|
-
|
|
293
|
-
* Adding "update:wrapper" event.
|
|
294
|
-
|
|
295
|
-
### 1.7.5 (2023-02-08)
|
|
296
|
-
|
|
297
|
-
* Removal of excess condition in toggle restriction.
|
|
298
|
-
|
|
299
|
-
### 1.8.0 (2023-02-15)
|
|
300
|
-
|
|
301
|
-
* Adding tools directory.
|
|
302
|
-
* Adding Debounce.js file with debounce tool.
|
|
303
|
-
* Adding type for "update-wrapper" event.
|
|
304
|
-
* Adding tools.spec.js file with unit-tests for tools.
|
|
305
|
-
* Moving local emitter files to tools directory.
|
|
306
|
-
* Removal of "lodash-es" dependency.
|
|
307
|
-
|
|
308
|
-
### 1.8.1 (2023-02-21)
|
|
309
|
-
|
|
310
|
-
* Removal of "update:wrapper" event.
|
|
311
|
-
* Fixing bug with incorrect v-model updating in custom wrappers.
|
|
312
|
-
|
|
313
|
-
### 1.8.2 (2023-02-21)
|
|
314
|
-
|
|
315
|
-
* Fixing bug with non-updating modelValue by handling preselected options.
|
|
316
|
-
|
|
317
|
-
### 1.8.3 (2023-02-23)
|
|
318
|
-
|
|
319
|
-
* Fixing bug with placeholder disappearing on blur.
|
|
320
|
-
|
|
321
|
-
### 1.8.4 (2023-02-23)
|
|
322
|
-
|
|
323
|
-
* Fixing bug with single select input focus.
|
|
324
|
-
|
|
325
|
-
### 1.8.5 (2023-03-07)
|
|
326
|
-
|
|
327
|
-
* Adding "resize-observer-polyfill" dev-dependency.
|
|
328
|
-
* Fixing bug with options wrapper resize when "toggleAppearanceSide" prop is set to "atop".
|
|
329
|
-
|
|
330
|
-
### 1.8.6 (2023-03-07)
|
|
331
|
-
|
|
332
|
-
* fixing bug with undefined "offsetHeight" variable.
|
|
333
|
-
|
|
334
|
-
### 1.9.0 (2023-03-18)
|
|
335
|
-
|
|
336
|
-
* Adding "dropdownDisabled" optional prop.
|
|
337
|
-
* Adding unit-test for new optional prop.
|
|
338
|
-
* Adding some new css-variabled.
|
|
339
|
-
* Removal of excess type from types.
|
|
340
|
-
|
|
341
|
-
### 1.9.1 (2023-03-20)
|
|
342
|
-
|
|
343
|
-
* Fixing bug with "pattern-changed" event with a call to the internal loader method.
|
|
344
|
-
|
|
345
|
-
### 1.9.2 (2023-03-22)
|
|
346
|
-
|
|
347
|
-
* Fixing bug with always fixed "height" css-property of option block.
|
|
348
|
-
* Setting default value of "anyOptionWrapperBlockHeight" optional prop to "auto".
|
|
349
|
-
|
|
350
|
-
### 1.9.3 (2023-03-22)
|
|
351
|
-
|
|
352
|
-
* Fixing bug with v-model not clearing by computed property.
|
|
353
|
-
|
|
354
|
-
### 1.9.4 (2023-03-23)
|
|
355
|
-
|
|
356
|
-
* Fixing bug with hidden placeholder when "showSearchField" prop is set to false.
|
|
357
|
-
* Fixing bug with deselection of all options when "showSelectedOptions" prop is set to true.
|
|
358
|
-
|
|
359
|
-
### 1.9.5 (2023-03-23)
|
|
360
|
-
|
|
361
|
-
* Adding "selected" flag to "marker" slot.
|
|
362
|
-
|
|
363
|
-
### 1.9.6 (2023-03-23)
|
|
364
|
-
|
|
365
|
-
* Fixing bug with v-model not updating by clearing of all options.
|
|
366
|
-
|
|
367
|
-
### 1.9.7 (2023-03-23)
|
|
368
|
-
|
|
369
|
-
* Fixing bug with non-rendering "labelBlock" slot when "showSearchField" prop is set to false.
|
|
370
|
-
|
|
371
|
-
### 1.9.8 (2023-03-23)
|
|
372
|
-
|
|
373
|
-
* Fixing bug with "clean" event payload when all options were deselected.
|
|
374
|
-
|
|
375
|
-
### 1.10.0 (2023-03-26)
|
|
376
|
-
|
|
377
|
-
* Adding "multipleBlocks" slot for element with all selected options.
|
|
378
|
-
* Adding conditional rendering to all slots.
|
|
379
|
-
* Removal of some excess props inside the component.
|
|
380
|
-
* Ordering "Events" section in documentation in alphabetic order.
|
|
381
|
-
* Ordering props in alphabetic order inside the component.
|
|
382
|
-
|
|
383
|
-
### 1.10.1 (2023-03-26)
|
|
384
|
-
|
|
385
|
-
* Fixing bug with incorrect display of multiple option blocks.
|
|
386
|
-
|
|
387
|
-
### 1.10.2 (2023-09-01)
|
|
388
|
-
|
|
389
|
-
* Updating dependencies and dev-dependencies.
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# Contributing to vue3-extended-multiselect
|
|
2
|
-
|
|
3
|
-
First off, thanks for taking the time to contribute! ❤️
|
|
4
|
-
|
|
5
|
-
All types of contributions are encouraged and valued. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
|
|
6
|
-
|
|
7
|
-
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which i would also be very happy about:
|
|
8
|
-
> - Star the project
|
|
9
|
-
> - Start watching this project
|
|
10
|
-
> - Refer this project in your project's readme
|
|
11
|
-
> - Mention the project at local meetups and tell your friends/colleagues
|
|
12
|
-
|
|
13
|
-
## You Have a Question
|
|
14
|
-
|
|
15
|
-
> If you want to ask a question, i assume that you have read the available [Documentation](https://github.com/danyaridiger/vue3-extended-multiselect/blob/master/README.md).
|
|
16
|
-
|
|
17
|
-
Before you ask a question, it is best to search for existing [Issues](https://github.com/danyaridiger/vue3-extended-multiselect/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
|
|
18
|
-
|
|
19
|
-
If you then still feel the need to ask a question and need clarification, i recommend the following:
|
|
20
|
-
|
|
21
|
-
- Open an [Issue](https://github.com/danyaridiger/vue3-extended-multiselect/issues/new).
|
|
22
|
-
- Provide as much context as you can about what you're running into.
|
|
23
|
-
- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant.
|
|
24
|
-
|
|
25
|
-
I will then take care of the issue as soon as possible.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## You Want To Contribute
|
|
29
|
-
|
|
30
|
-
> ### Legal Notice
|
|
31
|
-
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
### Suggesting Enhancements
|
|
35
|
-
|
|
36
|
-
This section guides you through submitting an enhancement suggestion for **vue3-extended-multiselect**, including completely new features and minor improvements to existing functionality. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
#### Before Submitting an Enhancement
|
|
40
|
-
|
|
41
|
-
- Make sure that you are using the latest version.
|
|
42
|
-
- Read the [documentation](https://github.com/danyaridiger/vue3-extended-multiselect/blob/master/README.md) carefully and find out if the functionality is already covered, maybe by an individual configuration.
|
|
43
|
-
- Perform a [search](https://github.com/danyaridiger/vue3-extended-multiselect/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
|
|
44
|
-
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that i want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
#### How Do You Submit a Good Enhancement Suggestion?
|
|
48
|
-
|
|
49
|
-
Enhancement suggestions are tracked as [GitHub issues](https://github.com/danyaridiger/vue3-extended-multiselect/issues).
|
|
50
|
-
|
|
51
|
-
- Use a **clear and descriptive title** for the issue to identify the suggestion.
|
|
52
|
-
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
|
|
53
|
-
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
|
|
54
|
-
- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to.
|
|
55
|
-
- **Explain why this enhancement would be useful** to most **vue3-extended-multiselect** users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
|
|
56
|
-
|
|
57
|
-
|
package/babel.config.js
DELETED
package/index.js
DELETED
package/jest.config.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
preset: '@vue/cli-plugin-unit-jest',
|
|
3
|
-
transform: {
|
|
4
|
-
'^.+\\.vue$': 'vue-jest'
|
|
5
|
-
},
|
|
6
|
-
expand: true,
|
|
7
|
-
displayName: {
|
|
8
|
-
name: "vue3-extended-multiselect",
|
|
9
|
-
color: "bgGreen",
|
|
10
|
-
},
|
|
11
|
-
extraGlobals: [],
|
|
12
|
-
globals: {
|
|
13
|
-
OPTIONS: [
|
|
14
|
-
{ label: "First Option", customLabel: "First Option Custom Label" },
|
|
15
|
-
{ label: "Second Option" },
|
|
16
|
-
{ label: "Third Option", searchByField: "First" },
|
|
17
|
-
126,
|
|
18
|
-
],
|
|
19
|
-
INPUT_ID: "vue3-extended-multiselect-input-1",
|
|
20
|
-
SEARCH_VALUE: "Search for options",
|
|
21
|
-
SEARCH_VALUE_WITH_RESULTS: "First",
|
|
22
|
-
MORE_THAN_LIMIT: "You have to select no more than one option",
|
|
23
|
-
LESS_THAN_LIMIT: "You have to select at least two options",
|
|
24
|
-
},
|
|
25
|
-
include: [
|
|
26
|
-
"<rootDir>/components/ExtendedMultiselectOptions.vue"
|
|
27
|
-
],
|
|
28
|
-
injectGlobals: true,
|
|
29
|
-
moduleFileExtensions: [
|
|
30
|
-
"ts",
|
|
31
|
-
"tsx",
|
|
32
|
-
"js",
|
|
33
|
-
"json",
|
|
34
|
-
"jsx",
|
|
35
|
-
"mjs",
|
|
36
|
-
"node",
|
|
37
|
-
"vue"
|
|
38
|
-
],
|
|
39
|
-
moduleNameMapper: {
|
|
40
|
-
"\\.svg$" : "<rootDir>/tests/utils/stubs",
|
|
41
|
-
"\\.scss$" : "identity-obj-proxy",
|
|
42
|
-
},
|
|
43
|
-
modulePathIgnorePatterns: ["<rootDir>/assets"],
|
|
44
|
-
resetModules: true,
|
|
45
|
-
resetMocks: true,
|
|
46
|
-
rootDir: "./",
|
|
47
|
-
setupFiles: ["<rootDir>/tests/utils/mocks"],
|
|
48
|
-
slowTestThreshold: 20,
|
|
49
|
-
testEnvironment: "jsdom",
|
|
50
|
-
testLocationInResults: true,
|
|
51
|
-
testMatch: [
|
|
52
|
-
"**/tests/**/*.[jt]s?(x)",
|
|
53
|
-
"**/?(*.)+(spec|test).[tj]s?(x)"
|
|
54
|
-
],
|
|
55
|
-
testPathIgnorePatterns: [
|
|
56
|
-
"tests/utils"
|
|
57
|
-
],
|
|
58
|
-
transformIgnorePatterns: [
|
|
59
|
-
"<rootDir>/node_modules/"
|
|
60
|
-
],
|
|
61
|
-
timers: "real",
|
|
62
|
-
}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
aria-label="Clear options list"
|
|
4
|
-
id="extended__multiselect-cancel"
|
|
5
|
-
role="button"
|
|
6
|
-
:class="classes"
|
|
7
|
-
:tabindex="increasedTabindex"
|
|
8
|
-
@click="cancel"
|
|
9
|
-
@keypress.stop="cancel"
|
|
10
|
-
>
|
|
11
|
-
<img
|
|
12
|
-
alt=""
|
|
13
|
-
v-if="!loading"
|
|
14
|
-
:class="iconSizeClass"
|
|
15
|
-
:src="cancelIcon"
|
|
16
|
-
/>
|
|
17
|
-
<extended-multiselect-loader
|
|
18
|
-
v-else
|
|
19
|
-
:icon-filter="iconFilter"
|
|
20
|
-
:icon-size="iconSize"
|
|
21
|
-
/>
|
|
22
|
-
</div>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
|
-
<script setup>
|
|
26
|
-
import {
|
|
27
|
-
computed,
|
|
28
|
-
defineProps,
|
|
29
|
-
inject,
|
|
30
|
-
ref,
|
|
31
|
-
toRefs,
|
|
32
|
-
} from "vue";
|
|
33
|
-
|
|
34
|
-
import useCancel from "../composition/cancel";
|
|
35
|
-
import useImagePath from "../composition/image-path";
|
|
36
|
-
import useSizes from "../composition/sizes";
|
|
37
|
-
|
|
38
|
-
import ExtendedMultiselectLoader from "./ExtendedMultiselectLoader.vue";
|
|
39
|
-
|
|
40
|
-
const props = defineProps({
|
|
41
|
-
/**
|
|
42
|
-
* Blocks cancel button
|
|
43
|
-
* @property {boolean} disabled
|
|
44
|
-
*/
|
|
45
|
-
disabled: {
|
|
46
|
-
type: Boolean,
|
|
47
|
-
required: true,
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Defines a svg-filter for icons
|
|
52
|
-
* @property {string} iconFilter
|
|
53
|
-
*/
|
|
54
|
-
iconFilter: {
|
|
55
|
-
type: String,
|
|
56
|
-
required: true,
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Provides size to create special size-class
|
|
61
|
-
* for each kind of icon
|
|
62
|
-
* @property {string} iconSize
|
|
63
|
-
*/
|
|
64
|
-
iconSize: {
|
|
65
|
-
type: String,
|
|
66
|
-
required: true,
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Replaces cancel button with loader
|
|
71
|
-
* @property {boolean} loading
|
|
72
|
-
*/
|
|
73
|
-
loading: {
|
|
74
|
-
type: Boolean,
|
|
75
|
-
required: true,
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Determines whether to clear current value of search field
|
|
80
|
-
* @property {boolean} showSearchField
|
|
81
|
-
*/
|
|
82
|
-
showSearchField: {
|
|
83
|
-
type: Boolean,
|
|
84
|
-
required: true,
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Defines "tabindex" attribute of cancel button
|
|
89
|
-
* @default null
|
|
90
|
-
* @property {number|null} tabindex
|
|
91
|
-
*/
|
|
92
|
-
tabindex: {
|
|
93
|
-
type: Number,
|
|
94
|
-
default: null,
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* List of selected options
|
|
99
|
-
* @property {Array} selectedOptions
|
|
100
|
-
*/
|
|
101
|
-
selectedOptions: {
|
|
102
|
-
type: Array,
|
|
103
|
-
required: true,
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Reactive instance of LocalEmitter class
|
|
108
|
-
* @property {object} emitter
|
|
109
|
-
*/
|
|
110
|
-
emitter: {
|
|
111
|
-
type: Object,
|
|
112
|
-
required: true,
|
|
113
|
-
},
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
const setSearchValue = inject("setSearchValue");
|
|
117
|
-
const setSearchPattern = inject("setSearchPattern");
|
|
118
|
-
|
|
119
|
-
const {
|
|
120
|
-
disabled,
|
|
121
|
-
emitter,
|
|
122
|
-
iconFilter,
|
|
123
|
-
iconSize,
|
|
124
|
-
loading,
|
|
125
|
-
selectedOptions,
|
|
126
|
-
showSearchField,
|
|
127
|
-
tabindex,
|
|
128
|
-
} = toRefs(props);
|
|
129
|
-
|
|
130
|
-
const { createImagePath } = useImagePath();
|
|
131
|
-
|
|
132
|
-
const cancelIcon = ref(createImagePath("cancel.svg"));
|
|
133
|
-
|
|
134
|
-
const { cancel } = useCancel(
|
|
135
|
-
disabled,
|
|
136
|
-
showSearchField,
|
|
137
|
-
selectedOptions,
|
|
138
|
-
emitter,
|
|
139
|
-
setSearchValue,
|
|
140
|
-
setSearchPattern,
|
|
141
|
-
);
|
|
142
|
-
const { iconSizeClass } = useSizes(iconSize);
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Toggles classes of component if "loading"
|
|
146
|
-
* or "disabled" props equals true
|
|
147
|
-
* @function
|
|
148
|
-
* @returns {string} class
|
|
149
|
-
*/
|
|
150
|
-
const classes = computed(() => {
|
|
151
|
-
return (loading.value || disabled.value)
|
|
152
|
-
? "extended__multiselect-cancel--disabled"
|
|
153
|
-
: "extended__multiselect-cancel";
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Sets "tabindex" attibute of clear button based on
|
|
158
|
-
* given tabindex
|
|
159
|
-
* @function
|
|
160
|
-
* @returns {number} tabindex
|
|
161
|
-
*/
|
|
162
|
-
const increasedTabindex = computed(() => {
|
|
163
|
-
return tabindex.value ? tabindex.value + 2 : 0;
|
|
164
|
-
});
|
|
165
|
-
</script>
|