Skip to content

Commit 2179065

Browse files
committed
chore: build, changelog, version
1 parent 3133d50 commit 2179065

6 files changed

+74
-58
lines changed

CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
## v2.5.7
2+
3+
> `2022-11-21`
4+
5+
### 🎉 Feature
6+
- **BREAKING**: added a wrapper `div` and related classes inside the main container next to the dropdown container.
7+
- Accessibility improvements.
8+
9+
### 🐞 Bug Fixes
10+
- Don't select new tag on IME enter #226.
11+
- Removed `v-html` from option & single label for XSS security #278.
12+
- Arrow left should not throw error when not using tags #271.
13+
114
## v2.5.6
215

316
> `2022-09-28`

dist/multiselect.global.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/multiselect.js

+40-39
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ function useValue (props, context)
9595
}
9696

9797
function useSearch (props, context, dep)
98-
{ const { regex } = toRefs(props);
98+
{
99+
const { regex } = toRefs(props);
99100

100101
const $this = getCurrentInstance().proxy;
101102

@@ -1501,6 +1502,11 @@ function useKeyboard (props, context, dep)
15011502
case 'Enter':
15021503
e.preventDefault();
15031504

1505+
if (e.keyCode === 229) {
1506+
// ignore IME confirmation
1507+
return
1508+
}
1509+
15041510
if (activeIndex !== -1 && activeIndex !== undefined) {
15051511
update([...iv.value].filter((v, k) => k !== activeIndex));
15061512

@@ -1594,7 +1600,10 @@ function useKeyboard (props, context, dep)
15941600
break
15951601

15961602
case 'ArrowLeft':
1597-
if ((searchable.value && tags.value.querySelector('input').selectionStart) || e.shiftKey || mode.value !== 'tags' || !iv.value || !iv.value.length) {
1603+
if (
1604+
(searchable.value && tags.value && tags.value.querySelector('input').selectionStart)
1605+
|| e.shiftKey || mode.value !== 'tags' || !iv.value || !iv.value.length
1606+
) {
15981607
return
15991608
}
16001609

@@ -2410,22 +2419,19 @@ const _hoisted_4 = ["onKeyup", "aria-label"];
24102419
const _hoisted_5 = ["onClick"];
24112420
const _hoisted_6 = ["type", "modelValue", "value", "id", "autocomplete", "aria-controls", "aria-placeholder", "aria-expanded", "aria-activedescendant", "aria-multiselectable"];
24122421
const _hoisted_7 = ["innerHTML"];
2413-
const _hoisted_8 = ["innerHTML"];
2414-
const _hoisted_9 = ["id"];
2415-
const _hoisted_10 = ["id", "aria-label", "aria-selected"];
2416-
const _hoisted_11 = ["data-pointed", "onMouseenter", "onClick"];
2417-
const _hoisted_12 = ["innerHTML"];
2418-
const _hoisted_13 = ["aria-label"];
2422+
const _hoisted_8 = ["id"];
2423+
const _hoisted_9 = ["id", "aria-label", "aria-selected"];
2424+
const _hoisted_10 = ["data-pointed", "onMouseenter", "onClick"];
2425+
const _hoisted_11 = ["innerHTML"];
2426+
const _hoisted_12 = ["aria-label"];
2427+
const _hoisted_13 = ["data-pointed", "data-selected", "onMouseenter", "onClick", "id", "aria-selected", "aria-label"];
24192428
const _hoisted_14 = ["data-pointed", "data-selected", "onMouseenter", "onClick", "id", "aria-selected", "aria-label"];
24202429
const _hoisted_15 = ["innerHTML"];
2421-
const _hoisted_16 = ["data-pointed", "data-selected", "onMouseenter", "onClick", "id", "aria-selected", "aria-label"];
2422-
const _hoisted_17 = ["innerHTML"];
2423-
const _hoisted_18 = ["innerHTML"];
2424-
const _hoisted_19 = ["innerHTML"];
2425-
const _hoisted_20 = ["value"];
2426-
const _hoisted_21 = ["name", "value"];
2427-
const _hoisted_22 = ["name", "value"];
2428-
const _hoisted_23 = ["id"];
2430+
const _hoisted_16 = ["innerHTML"];
2431+
const _hoisted_17 = ["value"];
2432+
const _hoisted_18 = ["name", "value"];
2433+
const _hoisted_19 = ["name", "value"];
2434+
const _hoisted_20 = ["id"];
24292435

24302436
function render(_ctx, _cache, $props, $setup, $data, $options) {
24312437
return (openBlock(), createElementBlock("div", {
@@ -2556,9 +2562,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
25562562
class: normalizeClass(_ctx.classList.singleLabel)
25572563
}, [
25582564
createElementVNode("span", {
2559-
class: normalizeClass(_ctx.classList.singleLabelText),
2560-
innerHTML: _ctx.iv[$props.label]
2561-
}, null, 10 /* CLASS, PROPS */, _hoisted_7)
2565+
class: normalizeClass(_ctx.classList.singleLabelText)
2566+
}, toDisplayString(_ctx.iv[$props.label]), 3 /* TEXT, CLASS */)
25622567
], 2 /* CLASS */)
25632568
])
25642569
: createCommentVNode("v-if", true),
@@ -2571,7 +2576,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
25712576
createElementVNode("div", {
25722577
class: normalizeClass(_ctx.classList.multipleLabel),
25732578
innerHTML: _ctx.multipleLabelText
2574-
}, null, 10 /* CLASS, PROPS */, _hoisted_8)
2579+
}, null, 10 /* CLASS, PROPS */, _hoisted_7)
25752580
])
25762581
: createCommentVNode("v-if", true),
25772582
createCommentVNode(" Placeholder "),
@@ -2659,9 +2664,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
26592664
}, () => [
26602665
createElementVNode("span", {
26612666
innerHTML: group[$props.groupLabel]
2662-
}, null, 8 /* PROPS */, _hoisted_12)
2667+
}, null, 8 /* PROPS */, _hoisted_11)
26632668
])
2664-
], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_11),
2669+
], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_10),
26652670
createElementVNode("ul", {
26662671
class: normalizeClass(_ctx.classList.groupOptions),
26672672
"aria-label": _ctx.ariaGroupLabel(group),
@@ -2686,14 +2691,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
26862691
isPointed: _ctx.isPointed,
26872692
search: _ctx.search
26882693
}, () => [
2689-
createElementVNode("span", {
2690-
innerHTML: option[$props.label]
2691-
}, null, 8 /* PROPS */, _hoisted_15)
2694+
createElementVNode("span", null, toDisplayString(option[$props.label]), 1 /* TEXT */)
26922695
])
2693-
], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_14))
2696+
], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_13))
26942697
}), 128 /* KEYED_FRAGMENT */))
2695-
], 10 /* CLASS, PROPS */, _hoisted_13)
2696-
], 10 /* CLASS, PROPS */, _hoisted_10))
2698+
], 10 /* CLASS, PROPS */, _hoisted_12)
2699+
], 10 /* CLASS, PROPS */, _hoisted_9))
26972700
}), 128 /* KEYED_FRAGMENT */))
26982701
: (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.fo, (option, i, key) => {
26992702
return (openBlock(), createElementBlock("li", {
@@ -2714,27 +2717,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
27142717
isPointed: _ctx.isPointed,
27152718
search: _ctx.search
27162719
}, () => [
2717-
createElementVNode("span", {
2718-
innerHTML: option[$props.label]
2719-
}, null, 8 /* PROPS */, _hoisted_17)
2720+
createElementVNode("span", null, toDisplayString(option[$props.label]), 1 /* TEXT */)
27202721
])
2721-
], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_16))
2722+
], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_14))
27222723
}), 128 /* KEYED_FRAGMENT */))
2723-
], 10 /* CLASS, PROPS */, _hoisted_9),
2724+
], 10 /* CLASS, PROPS */, _hoisted_8),
27242725
(_ctx.noOptions)
27252726
? renderSlot(_ctx.$slots, "nooptions", { key: 0 }, () => [
27262727
createElementVNode("div", {
27272728
class: normalizeClass(_ctx.classList.noOptions),
27282729
innerHTML: $props.noOptionsText
2729-
}, null, 10 /* CLASS, PROPS */, _hoisted_18)
2730+
}, null, 10 /* CLASS, PROPS */, _hoisted_15)
27302731
])
27312732
: createCommentVNode("v-if", true),
27322733
(_ctx.noResults)
27332734
? renderSlot(_ctx.$slots, "noresults", { key: 1 }, () => [
27342735
createElementVNode("div", {
27352736
class: normalizeClass(_ctx.classList.noResults),
27362737
innerHTML: $props.noResultsText
2737-
}, null, 10 /* CLASS, PROPS */, _hoisted_19)
2738+
}, null, 10 /* CLASS, PROPS */, _hoisted_16)
27382739
])
27392740
: createCommentVNode("v-if", true),
27402741
($props.infinite && _ctx.hasMore)
@@ -2760,7 +2761,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
27602761
tabindex: "-1",
27612762
value: _ctx.textValue,
27622763
required: ""
2763-
}, null, 10 /* CLASS, PROPS */, _hoisted_20))
2764+
}, null, 10 /* CLASS, PROPS */, _hoisted_17))
27642765
: createCommentVNode("v-if", true),
27652766
createCommentVNode(" Native input support "),
27662767
($props.nativeSupport)
@@ -2771,14 +2772,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
27712772
type: "hidden",
27722773
name: $props.name,
27732774
value: _ctx.plainValue !== undefined ? _ctx.plainValue : ''
2774-
}, null, 8 /* PROPS */, _hoisted_21))
2775+
}, null, 8 /* PROPS */, _hoisted_18))
27752776
: (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.plainValue, (v, i) => {
27762777
return (openBlock(), createElementBlock("input", {
27772778
type: "hidden",
27782779
name: `${$props.name}[]`,
27792780
value: v,
27802781
key: i
2781-
}, null, 8 /* PROPS */, _hoisted_22))
2782+
}, null, 8 /* PROPS */, _hoisted_19))
27822783
}), 128 /* KEYED_FRAGMENT */))
27832784
], 64 /* STABLE_FRAGMENT */))
27842785
: createCommentVNode("v-if", true),
@@ -2789,7 +2790,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
27892790
class: normalizeClass(_ctx.classList.assist),
27902791
id: _ctx.ariaAssist,
27912792
"aria-hidden": "true"
2792-
}, toDisplayString(_ctx.ariaLabel), 11 /* TEXT, CLASS, PROPS */, _hoisted_23))
2793+
}, toDisplayString(_ctx.ariaLabel), 11 /* TEXT, CLASS, PROPS */, _hoisted_20))
27932794
: createCommentVNode("v-if", true),
27942795
createCommentVNode(" Create height for empty input "),
27952796
createElementVNode("div", {

dist/multiselect.vue2.global.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/multiselect.vue2.js

+18-16
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ function useValue (props, context)
9595
}
9696

9797
function useSearch (props, context, dep)
98-
{ const { regex } = toRefs(props);
98+
{
99+
const { regex } = toRefs(props);
99100

100101
const $this = getCurrentInstance().proxy;
101102

@@ -1501,6 +1502,11 @@ function useKeyboard (props, context, dep)
15011502
case 'Enter':
15021503
e.preventDefault();
15031504

1505+
if (e.keyCode === 229) {
1506+
// ignore IME confirmation
1507+
return
1508+
}
1509+
15041510
if (activeIndex !== -1 && activeIndex !== undefined) {
15051511
update([...iv.value].filter((v, k) => k !== activeIndex));
15061512

@@ -1594,7 +1600,10 @@ function useKeyboard (props, context, dep)
15941600
break
15951601

15961602
case 'ArrowLeft':
1597-
if ((searchable.value && tags.value.querySelector('input').selectionStart) || e.shiftKey || mode.value !== 'tags' || !iv.value || !iv.value.length) {
1603+
if (
1604+
(searchable.value && tags.value && tags.value.querySelector('input').selectionStart)
1605+
|| e.shiftKey || mode.value !== 'tags' || !iv.value || !iv.value.length
1606+
) {
15981607
return
15991608
}
16001609

@@ -2713,10 +2722,9 @@ var __vue_render__ = function () {
27132722
function () {
27142723
return [
27152724
_c("div", { class: _vm.classList.singleLabel }, [
2716-
_c("span", {
2717-
class: _vm.classList.singleLabelText,
2718-
domProps: { innerHTML: _vm._s(_vm.iv[_vm.label]) },
2719-
}),
2725+
_c("span", { class: _vm.classList.singleLabelText }, [
2726+
_vm._v(_vm._s(_vm.iv[_vm.label])),
2727+
]),
27202728
]),
27212729
]
27222730
},
@@ -2936,11 +2944,9 @@ var __vue_render__ = function () {
29362944
"option",
29372945
function () {
29382946
return [
2939-
_c("span", {
2940-
domProps: {
2941-
innerHTML: _vm._s(option[_vm.label]),
2942-
},
2943-
}),
2947+
_c("span", [
2948+
_vm._v(_vm._s(option[_vm.label])),
2949+
]),
29442950
]
29452951
},
29462952
{
@@ -2987,11 +2993,7 @@ var __vue_render__ = function () {
29872993
"option",
29882994
function () {
29892995
return [
2990-
_c("span", {
2991-
domProps: {
2992-
innerHTML: _vm._s(option[_vm.label]),
2993-
},
2994-
}),
2996+
_c("span", [_vm._v(_vm._s(option[_vm.label]))]),
29952997
]
29962998
},
29972999
{

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vueform/multiselect",
3-
"version": "2.5.6",
3+
"version": "2.5.7",
44
"private": false,
55
"description": "Vue 3 multiselect component with single select, multiselect and tagging options.",
66
"license": "MIT",

0 commit comments

Comments
 (0)