From a12c9e1efd1198005fc4a0d648d6378530fb920d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 09:02:39 -0700 Subject: [PATCH 01/14] chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /docs (#1474) Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/yarn.lock b/docs/yarn.lock index 8a3b327..29432c4 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -6050,9 +6050,9 @@ path-key@^3.1.0: integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-to-regexp@0.1.7: version "0.1.7" From c8571c150420187cf8433e1297e5f05c61377dfd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 09:03:06 -0700 Subject: [PATCH 02/14] chore(deps): bump path-parse from 1.0.6 to 1.0.7 (#1473) Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index e2008b1..26c3b13 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8945,9 +8945,9 @@ path-key@^3.0.0, path-key@^3.1.0: integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-to-regexp@0.1.7: version "0.1.7" From 58905e1659ffca32a9fb3c21c59a555d4ab3cd0d Mon Sep 17 00:00:00 2001 From: HckrNews Date: Mon, 23 Aug 2021 22:50:06 +0200 Subject: [PATCH 03/14] fix: use click instead of mousedown event, fixes iOS bug (#1248) Thanks to @PieterWigboldus for originally reporting in #814 and fixing in #815. Co-authored-by: Jeff Sagal --- src/components/Select.vue | 2 +- src/scss/modules/_dropdown-option.scss | 10 ++-------- tests/unit/Selectable.spec.js | 4 ++-- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/components/Select.vue b/src/components/Select.vue index a99a5ef..c2d81d8 100644 --- a/src/components/Select.vue +++ b/src/components/Select.vue @@ -109,7 +109,7 @@ }" :aria-selected="index === typeAheadPointer ? true : null" @mouseover="selectable(option) ? (typeAheadPointer = index) : null" - @mousedown.prevent.stop="selectable(option) ? select(option) : null" + @click.prevent.stop="selectable(option) ? select(option) : null" > {{ getOptionLabel(option) }} diff --git a/src/scss/modules/_dropdown-option.scss b/src/scss/modules/_dropdown-option.scss index 474746d..aa195c9 100644 --- a/src/scss/modules/_dropdown-option.scss +++ b/src/scss/modules/_dropdown-option.scss @@ -6,10 +6,7 @@ clear: both; color: #333; /* Overrides most CSS frameworks */ white-space: nowrap; - - &:hover { - cursor: pointer; - } + cursor: pointer; } .vs__dropdown-option--highlight { @@ -20,8 +17,5 @@ .vs__dropdown-option--disabled { background: inherit; color: $vs-state-disabled-color; - - &:hover { - cursor: inherit; - } + cursor: inherit; } diff --git a/tests/unit/Selectable.spec.js b/tests/unit/Selectable.spec.js index bfa0449..2c318a6 100644 --- a/tests/unit/Selectable.spec.js +++ b/tests/unit/Selectable.spec.js @@ -10,7 +10,7 @@ describe('Selectable prop', () => { Select.vm.$data.open = true await Select.vm.$nextTick() - Select.find('.vs__dropdown-menu li:first-child').trigger('mousedown') + Select.find('.vs__dropdown-menu li:first-child').trigger('click') await Select.vm.$nextTick() expect(Select.vm.selectedValue).toEqual(['one']) @@ -25,7 +25,7 @@ describe('Selectable prop', () => { Select.vm.$data.open = true await Select.vm.$nextTick() - Select.find('.vs__dropdown-menu li:last-child').trigger('mousedown') + Select.find('.vs__dropdown-menu li:last-child').trigger('click') await Select.vm.$nextTick() expect(Select.vm.selectedValue).toEqual([]) From 896c323abe457f0a41b861d715df3447c0f5b9b3 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 23 Aug 2021 20:51:10 +0000 Subject: [PATCH 04/14] =?UTF-8?q?chore(=F0=9F=9A=80):=203.12.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e40cbd1..0ad9741 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-select", - "version": "3.12.2", + "version": "3.12.3", "description": "Everything you wish the HTML element could do, wrapped up into a lightweight, extensible Vue component.", "author": "Jeff Sagal ", "homepage": "https://vue-select.org", From da0bcb09291a8fc73fec6a8a0f332ff7ac34a923 Mon Sep 17 00:00:00 2001 From: Jeff Sagal Date: Wed, 6 Oct 2021 09:38:50 -0700 Subject: [PATCH 09/14] chore(deps): update vue test utils (#1512) --- package.json | 2 +- tests/helpers.js | 4 +- tests/unit/Autoscroll.spec.js | 4 +- tests/unit/Components.spec.js | 4 +- tests/unit/Deselecting.spec.js | 6 +-- tests/unit/Dropdown.spec.js | 10 ++--- tests/unit/Keydown.spec.js | 24 +++++------ tests/unit/ReactiveOptions.spec.js | 8 ++-- tests/unit/Selectable.spec.js | 4 +- tests/unit/Selecting.spec.js | 2 +- tests/unit/Slots.spec.js | 8 +++- tests/unit/Tagging.spec.js | 2 +- tests/unit/TypeAhead.spec.js | 4 +- yarn.lock | 64 +++++++++++++++++++++++------- 14 files changed, 92 insertions(+), 54 deletions(-) diff --git a/package.json b/package.json index 3810e78..4bb9550 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@babel/runtime": "^7.4.2", "@semantic-release/git": "^9.0.0", "@semantic-release/github": "^7.0.4", - "@vue/test-utils": "^1.0.0-beta.31", + "@vue/test-utils": "^1.2.2", "autoprefixer": "^9.4.7", "babel-core": "^7.0.0-bridge.0", "babel-eslint": "^10.0.3", diff --git a/tests/helpers.js b/tests/helpers.js index 3b8c195..b223097 100755 --- a/tests/helpers.js +++ b/tests/helpers.js @@ -13,7 +13,7 @@ export const searchSubmit = (Wrapper, searchText = false) => { if (searchText) { Wrapper.vm.search = searchText } - Wrapper.find({ ref: 'search' }).trigger('keydown.enter') + Wrapper.findComponent({ ref: 'search' }).trigger('keydown.enter') } /** @@ -29,7 +29,7 @@ export const selectTag = async (Wrapper, searchText) => { Wrapper.vm.search = searchText await Wrapper.vm.$nextTick() - Wrapper.find({ ref: 'search' }).trigger('keydown.enter') + Wrapper.findComponent({ ref: 'search' }).trigger('keydown.enter') await Wrapper.vm.$nextTick() } diff --git a/tests/unit/Autoscroll.spec.js b/tests/unit/Autoscroll.spec.js index 939a37a..0bf13bd 100644 --- a/tests/unit/Autoscroll.spec.js +++ b/tests/unit/Autoscroll.spec.js @@ -8,7 +8,7 @@ describe('Automatic Scrolling', () => { Select.vm.typeAheadPointer = 1 // When - Select.find({ ref: 'search' }).trigger('keydown.up') + Select.findComponent({ ref: 'search' }).trigger('keydown.up') await Select.vm.$nextTick() // Then @@ -22,7 +22,7 @@ describe('Automatic Scrolling', () => { Select.vm.typeAheadPointer = 1 // When - Select.find({ ref: 'search' }).trigger('keydown.down') + Select.findComponent({ ref: 'search' }).trigger('keydown.down') await Select.vm.$nextTick() // Then diff --git a/tests/unit/Components.spec.js b/tests/unit/Components.spec.js index 1c3fcb8..9ce35a2 100644 --- a/tests/unit/Components.spec.js +++ b/tests/unit/Components.spec.js @@ -11,7 +11,7 @@ describe('Components API', () => { const Select = selectWithProps({ components: { Deselect } }) - expect(Select.contains(Deselect)).toBeTruthy() + expect(Select.findComponent(Deselect)).toBeTruthy() }) it('swap the OpenIndicator component', () => { @@ -23,6 +23,6 @@ describe('Components API', () => { const Select = selectWithProps({ components: { OpenIndicator } }) - expect(Select.contains(OpenIndicator)).toBeTruthy() + expect(Select.findComponent(OpenIndicator)).toBeTruthy() }) }) diff --git a/tests/unit/Deselecting.spec.js b/tests/unit/Deselecting.spec.js index 16f3f41..ee2625d 100755 --- a/tests/unit/Deselecting.spec.js +++ b/tests/unit/Deselecting.spec.js @@ -51,11 +51,11 @@ describe('Removing values', () => { it('will not emit input event if value has not changed with backspace', () => { const Select = mountDefault() Select.vm.$data._value = 'one' - Select.find({ ref: 'search' }).trigger('keydown.backspace') + Select.findComponent({ ref: 'search' }).trigger('keydown.backspace') expect(Select.emitted().input.length).toBe(1) - Select.find({ ref: 'search' }).trigger('keydown.backspace') - Select.find({ ref: 'search' }).trigger('keydown.backspace') + Select.findComponent({ ref: 'search' }).trigger('keydown.backspace') + Select.findComponent({ ref: 'search' }).trigger('keydown.backspace') expect(Select.emitted().input.length).toBe(1) }) diff --git a/tests/unit/Dropdown.spec.js b/tests/unit/Dropdown.spec.js index f5828dd..d7e95be 100755 --- a/tests/unit/Dropdown.spec.js +++ b/tests/unit/Dropdown.spec.js @@ -92,7 +92,7 @@ describe('Toggling Dropdown', () => { }) Select.vm.open = true - Select.find({ ref: 'search' }).trigger('blur') + Select.findComponent({ ref: 'search' }).trigger('blur') expect(Select.vm.open).toEqual(false) }) @@ -158,9 +158,9 @@ describe('Toggling Dropdown', () => { expect(Select.vm.open).toEqual(true) await Select.vm.$nextTick() - expect(Select.contains('.vs__dropdown-menu')).toBeFalsy() - expect(Select.contains('.vs__dropdown-option')).toBeFalsy() - expect(Select.contains('.vs__no-options')).toBeFalsy() + expect(Select.find('.vs__dropdown-menu').exists()).toBeFalsy() + expect(Select.find('.vs__dropdown-option').exists()).toBeFalsy() + expect(Select.find('.vs__no-options').exists()).toBeFalsy() expect(Select.vm.stateClasses['vs--open']).toBeFalsy() }) @@ -168,7 +168,7 @@ describe('Toggling Dropdown', () => { const Select = selectWithProps({ noDrop: true, }) - expect(Select.contains(OpenIndicator)).toBeFalsy() + expect(Select.findComponent(OpenIndicator).exists()).toBeFalsy() }) it('should not add the searchable state class when noDrop is true', () => { diff --git a/tests/unit/Keydown.spec.js b/tests/unit/Keydown.spec.js index 4e224a6..e46eb49 100644 --- a/tests/unit/Keydown.spec.js +++ b/tests/unit/Keydown.spec.js @@ -7,7 +7,7 @@ describe('Custom Keydown Handlers', () => { mapKeydown: (defaults, vm) => ({ ...defaults, 32: onKeyDown }), }) - Select.find({ ref: 'search' }).trigger('keydown.space') + Select.findComponent({ ref: 'search' }).trigger('keydown.space') expect(onKeyDown.mock.calls.length).toBe(1) }) @@ -19,7 +19,7 @@ describe('Custom Keydown Handlers', () => { const spy = jest.spyOn(Select.vm, 'typeAheadSelect') - Select.find({ ref: 'search' }).trigger('keydown.space') + Select.findComponent({ ref: 'search' }).trigger('keydown.space') expect(spy).toHaveBeenCalledTimes(1) }) @@ -33,10 +33,10 @@ describe('Custom Keydown Handlers', () => { const spy = jest.spyOn(Select.vm, 'typeAheadSelect') - Select.find({ ref: 'search' }).trigger('keydown.space') + Select.findComponent({ ref: 'search' }).trigger('keydown.space') expect(onKeyDown.mock.calls.length).toBe(1) - Select.find({ ref: 'search' }).trigger('keydown.tab') + Select.findComponent({ ref: 'search' }).trigger('keydown.tab') expect(spy).toHaveBeenCalledTimes(1) }) @@ -45,12 +45,12 @@ describe('Custom Keydown Handlers', () => { const Select = mountDefault() const spy = jest.spyOn(Select.vm, 'typeAheadSelect') - Select.find({ ref: 'search' }).trigger('compositionstart') - Select.find({ ref: 'search' }).trigger('keydown.enter') + Select.findComponent({ ref: 'search' }).trigger('compositionstart') + Select.findComponent({ ref: 'search' }).trigger('keydown.enter') expect(spy).toHaveBeenCalledTimes(0) - Select.find({ ref: 'search' }).trigger('compositionend') - Select.find({ ref: 'search' }).trigger('keydown.enter') + Select.findComponent({ ref: 'search' }).trigger('compositionend') + Select.findComponent({ ref: 'search' }).trigger('keydown.enter') expect(spy).toHaveBeenCalledTimes(1) }) @@ -58,12 +58,12 @@ describe('Custom Keydown Handlers', () => { const Select = mountDefault({ selectOnTab: true }) const spy = jest.spyOn(Select.vm, 'typeAheadSelect') - Select.find({ ref: 'search' }).trigger('compositionstart') - Select.find({ ref: 'search' }).trigger('keydown.tab') + Select.findComponent({ ref: 'search' }).trigger('compositionstart') + Select.findComponent({ ref: 'search' }).trigger('keydown.tab') expect(spy).toHaveBeenCalledTimes(0) - Select.find({ ref: 'search' }).trigger('compositionend') - Select.find({ ref: 'search' }).trigger('keydown.tab') + Select.findComponent({ ref: 'search' }).trigger('compositionend') + Select.findComponent({ ref: 'search' }).trigger('keydown.tab') expect(spy).toHaveBeenCalledTimes(1) }) }) diff --git a/tests/unit/ReactiveOptions.spec.js b/tests/unit/ReactiveOptions.spec.js index a010d3c..36d42d6 100755 --- a/tests/unit/ReactiveOptions.spec.js +++ b/tests/unit/ReactiveOptions.spec.js @@ -137,9 +137,9 @@ describe('Reset on options change', () => { it('clearSearchOnBlur returns false when multiple is true', () => { const Select = mountDefault({}) let clearSearchOnBlur = jest.spyOn(Select.vm, 'clearSearchOnBlur') - Select.find({ ref: 'search' }).trigger('click') + Select.findComponent({ ref: 'search' }).trigger('click') Select.setData({ search: 'one' }) - Select.find({ ref: 'search' }).trigger('blur') + Select.findComponent({ ref: 'search' }).trigger('blur') expect(clearSearchOnBlur).toHaveBeenCalledTimes(1) expect(clearSearchOnBlur).toHaveBeenCalledWith({ @@ -153,9 +153,9 @@ describe('Reset on options change', () => { let clearSearchOnBlur = jest.fn(() => false) const Select = mountDefault({ clearSearchOnBlur }) - Select.find({ ref: 'search' }).trigger('click') + Select.findComponent({ ref: 'search' }).trigger('click') Select.setData({ search: 'one' }) - Select.find({ ref: 'search' }).trigger('blur') + Select.findComponent({ ref: 'search' }).trigger('blur') expect(clearSearchOnBlur).toHaveBeenCalledTimes(1) expect(Select.vm.search).toBe('one') diff --git a/tests/unit/Selectable.spec.js b/tests/unit/Selectable.spec.js index 2c318a6..b17e57b 100644 --- a/tests/unit/Selectable.spec.js +++ b/tests/unit/Selectable.spec.js @@ -39,7 +39,7 @@ describe('Selectable prop', () => { Select.vm.typeAheadPointer = 1 - Select.find({ ref: 'search' }).trigger('keydown.down') + Select.findComponent({ ref: 'search' }).trigger('keydown.down') expect(Select.vm.typeAheadPointer).toEqual(2) }) @@ -52,7 +52,7 @@ describe('Selectable prop', () => { Select.vm.typeAheadPointer = 2 - Select.find({ ref: 'search' }).trigger('keydown.up') + Select.findComponent({ ref: 'search' }).trigger('keydown.up') expect(Select.vm.typeAheadPointer).toEqual(0) }) diff --git a/tests/unit/Selecting.spec.js b/tests/unit/Selecting.spec.js index 02ad976..7e407ad 100755 --- a/tests/unit/Selecting.spec.js +++ b/tests/unit/Selecting.spec.js @@ -59,7 +59,7 @@ describe('VS - Selecting Values', () => { const spy = jest.spyOn(Select.vm, 'typeAheadSelect') - Select.find({ ref: 'search' }).trigger('keydown.tab') + Select.findComponent({ ref: 'search' }).trigger('keydown.tab') expect(spy).toHaveBeenCalledWith() }) diff --git a/tests/unit/Slots.spec.js b/tests/unit/Slots.spec.js index 98cfcab..024f6ee 100644 --- a/tests/unit/Slots.spec.js +++ b/tests/unit/Slots.spec.js @@ -11,7 +11,9 @@ describe('Scoped Slots', () => { } ) - expect(Select.find({ ref: 'selectedOptions' }).text()).toEqual('one') + expect(Select.findComponent({ ref: 'selectedOptions' }).text()).toEqual( + 'one' + ) }) describe('Slot: selected-option', () => { @@ -56,7 +58,9 @@ describe('Scoped Slots', () => { Select.vm.open = true await Select.vm.$nextTick() - expect(Select.find({ ref: 'dropdownMenu' }).text()).toEqual('onetwothree') + expect(Select.findComponent({ ref: 'dropdownMenu' }).text()).toEqual( + 'onetwothree' + ) }) it('noOptions slot receives the current search text', async () => { diff --git a/tests/unit/Tagging.spec.js b/tests/unit/Tagging.spec.js index bc97d82..1b6c5fa 100755 --- a/tests/unit/Tagging.spec.js +++ b/tests/unit/Tagging.spec.js @@ -252,7 +252,7 @@ describe('When Tagging Is Enabled', () => { }) Select.vm.typeAheadPointer = 0 - Select.find({ ref: 'search' }).trigger('keydown.tab') + Select.findComponent({ ref: 'search' }).trigger('keydown.tab') await Select.vm.$nextTick() expect(Select.vm.selectedValue).toEqual(['one']) diff --git a/tests/unit/TypeAhead.spec.js b/tests/unit/TypeAhead.spec.js index ca4adcc..3d091d1 100755 --- a/tests/unit/TypeAhead.spec.js +++ b/tests/unit/TypeAhead.spec.js @@ -22,7 +22,7 @@ describe('Moving the Typeahead Pointer', () => { Select.vm.typeAheadPointer = 1 - Select.find({ ref: 'search' }).trigger('keydown.up') + Select.findComponent({ ref: 'search' }).trigger('keydown.up') expect(Select.vm.typeAheadPointer).toEqual(0) }) @@ -32,7 +32,7 @@ describe('Moving the Typeahead Pointer', () => { Select.vm.typeAheadPointer = 1 - Select.find({ ref: 'search' }).trigger('keydown.down') + Select.findComponent({ ref: 'search' }).trigger('keydown.down') expect(Select.vm.typeAheadPointer).toEqual(2) }) diff --git a/yarn.lock b/yarn.lock index 2825f08..c3f27d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1288,10 +1288,10 @@ source-map "~0.6.1" vue-template-es2015-compiler "^1.9.0" -"@vue/test-utils@^1.0.0-beta.31": - version "1.0.0-beta.31" - resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-1.0.0-beta.31.tgz#580d6e45f07452e497d69807d80986e713949b73" - integrity sha512-IlhSx5hyEVnbvDZ3P98R1jNmy88QAd/y66Upn4EcvxSD5D4hwOutl3dIdfmSTSXs4b9DIMDnEVjX7t00cvOnvg== +"@vue/test-utils@^1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-1.2.2.tgz#0242ea4e202d4853541bb167fead3f2249140ab7" + integrity sha512-P+yiAsszoy8z1TqXiVUnAZaJj0WGGz5fCxm4bOSI6Cpwy1+PNYwYxDv0ROAA/SUtOPppV+aD8tp/QWwxf8ROJw== dependencies: dom-event-types "^1.0.0" lodash "^4.17.15" @@ -2055,9 +2055,9 @@ babylon@^6.18.0: integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== base64-js@^1.0.2: version "1.3.1" @@ -3038,9 +3038,9 @@ condense-newlines@^0.2.1: kind-of "^3.0.2" config-chain@^1.1.12: - version "1.1.12" - resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" - integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== + version "1.1.13" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" + integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ== dependencies: ini "^1.3.4" proto-list "~1.2.1" @@ -5086,7 +5086,7 @@ glob@7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.1: +glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.4, glob@^7.1.6, glob@~7.1.1: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -5098,6 +5098,18 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, gl once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.3: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + global-dirs@^0.1.0, global-dirs@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" @@ -5791,7 +5803,12 @@ inherits@2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: +ini@^1.3.4: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + +ini@^1.3.5, ini@~1.3.0: version "1.3.7" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84" integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ== @@ -6748,7 +6765,17 @@ js-base64@^2.1.8: resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121" integrity sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw== -js-beautify@^1.6.12, js-beautify@^1.6.14: +js-beautify@^1.6.12: + version "1.14.0" + resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.14.0.tgz#2ce790c555d53ce1e3d7363227acf5dc69024c2d" + integrity sha512-yuck9KirNSCAwyNJbqW+BxJqJ0NLJ4PwBUzQQACl5O3qHMBXVkXb/rD0ilh/Lat/tn88zSZ+CAHOlk0DsY7GuQ== + dependencies: + config-chain "^1.1.12" + editorconfig "^0.15.3" + glob "^7.1.3" + nopt "^5.0.0" + +js-beautify@^1.6.14: version "1.10.3" resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.10.3.tgz#c73fa10cf69d3dfa52d8ed624f23c64c0a6a94c1" integrity sha512-wfk/IAWobz1TfApSdivH5PJ0miIHgDoYb1ugSqHcODPmaYu46rYe5FVuIEkhjg8IQiv6rDNPyhsqbsohI/C2vQ== @@ -7349,12 +7376,12 @@ lodash.without@~4.4.0: resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" integrity sha1-PNRXSgC2e643OpS3SHcmQFB7eqw= -lodash@4.17.15, lodash@^4.0.0, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.3, lodash@^4.17.4, lodash@~4.17.10: +lodash@4.17.15, lodash@^4.0.0, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.3, lodash@^4.17.4, lodash@~4.17.10: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== -lodash@^4.17.19, lodash@^4.17.21: +lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -8106,6 +8133,13 @@ nopt@^4.0.1, nopt@^4.0.3, nopt@~4.0.1: abbrev "1" osenv "^0.1.4" +nopt@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" + integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== + dependencies: + abbrev "1" + normalize-package-data@^2.0.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.4.0, normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" From b965b3b195a69a66d278ec02fe22ad50d21c6e5c Mon Sep 17 00:00:00 2001 From: Yilmaz <44588992+yoktav@users.noreply.github.com> Date: Wed, 6 Oct 2021 19:51:43 +0300 Subject: [PATCH 10/14] fix(filtering): transform letters to locale specific cases (#1511) --- docs/api/props.md | 4 ++-- src/components/Select.vue | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/api/props.md b/docs/api/props.md index cfe3aca..b205d14 100644 --- a/docs/api/props.md +++ b/docs/api/props.md @@ -189,7 +189,7 @@ disabled: { ## dropdownShouldOpen -Determines whether the dropdown should open. Used +Determines whether the dropdown should open. Used for overriding the default dropdown behaviour. Receives the vue-select instance as the single argument to the function. @@ -250,7 +250,7 @@ if the option should be displayed. filterBy: { type: Function, default(option, label, search) { - return (label || '').toLowerCase().indexOf(search.toLowerCase()) > -1 + return (label || '').toLocaleLowerCase().indexOf(search.toLocaleLowerCase()) > -1 } }, ``` diff --git a/src/components/Select.vue b/src/components/Select.vue index 4f852ba..06c0417 100644 --- a/src/components/Select.vue +++ b/src/components/Select.vue @@ -440,7 +440,11 @@ export default { filterBy: { type: Function, default(option, label, search) { - return (label || '').toLowerCase().indexOf(search.toLowerCase()) > -1 + return ( + (label || '') + .toLocaleLowerCase() + .indexOf(search.toLocaleLowerCase()) > -1 + ) }, }, From 9917747ab95c5dd6cb21acd981b3c1ea87b69ad8 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 6 Oct 2021 16:53:12 +0000 Subject: [PATCH 11/14] =?UTF-8?q?chore(=F0=9F=9A=80):=203.13.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4bb9550..5d125dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-select", - "version": "3.13.0", + "version": "3.13.1", "description": "Everything you wish the HTML element could do, wrapped up into a lightweight, extensible Vue component.", "author": "Jeff Sagal ", "homepage": "https://vue-select.org", From 119bf412805b45c30dfed0499ae7c76e57d5b1f6 Mon Sep 17 00:00:00 2001 From: Brian Kuzma Date: Thu, 7 Oct 2021 17:28:20 +0200 Subject: [PATCH 14/14] docs(pagination): fix bugs in Pagination use case example in docs (#1492) * fix(Paginated): fix bugs in Pagination use case example in docs Reset the current offset each type the search query changes; otherwise there may be no results shown if the user clicked forward one or more pages and then typed to search. Replace instances of magic number 10 with the "limit" variable; otherwise changing the value of the "limit" data prop will result in buggy behavior because clicking forward and back still updates the offset by 10. Convert query and country name strings to lower case before filtering the list so that the user doesn't have to match the exact case of the country names. * Update Paginated.vue Co-authored-by: Jeff Sagal --- docs/.vuepress/components/Paginated.vue | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/docs/.vuepress/components/Paginated.vue b/docs/.vuepress/components/Paginated.vue index 9918d4c..30b04cc 100644 --- a/docs/.vuepress/components/Paginated.vue +++ b/docs/.vuepress/components/Paginated.vue @@ -1,12 +1,8 @@ @@ -22,24 +18,32 @@ export default { }), computed: { filtered() { - return this.countries.filter((country) => country.includes(this.search)) + return this.countries.filter((country) => + country.toLocaleLowerCase().includes(this.search.toLocaleLowerCase()) + ) }, paginated() { return this.filtered.slice(this.offset, this.limit + this.offset) }, hasNextPage() { - const nextOffset = this.offset + 10 + const nextOffset = this.offset + this.limit return Boolean( this.filtered.slice(nextOffset, this.limit + nextOffset).length ) }, hasPrevPage() { - const prevOffset = this.offset - 10 + const prevOffset = this.offset - this.limit return Boolean( this.filtered.slice(prevOffset, this.limit + prevOffset).length ) }, }, + methods: { + onSearch(query) { + this.search = query + this.offset = 0 + }, + }, }