Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cibernox/ember-power-select
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9dec05852dbdc4425c3d83feb74cfddf0e43e503
Choose a base ref
..
head repository: cibernox/ember-power-select
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 24f9f401f23ff246ea29b5cabf18f8bdafea4632
Choose a head ref
Showing with 4,536 additions and 7,389 deletions.
  1. +1 −0 .travis.yml
  2. +5 −0 CHANGELOG.md
  3. +1 −1 README.md
  4. +6 −3 addon/components/power-select.ts
  5. +2 −2 addon/components/power-select/options.hbs
  6. +8 −0 config/ember-try.js
  7. +4,405 −7,325 package-lock.json
  8. +18 −18 package.json
  9. +1 −1 tests/dummy/app/app.js
  10. +9 −9 tests/dummy/app/components/navigable-select.js
  11. +1 −1 tests/dummy/app/router.js
  12. +1 −1 tests/dummy/config/targets.js
  13. +55 −5 tests/integration/components/power-select/a11y-test.js
  14. +1 −1 tests/integration/components/power-select/custom-search-test.js
  15. +1 −1 tests/integration/components/power-select/customization-with-attrs-test.js
  16. +1 −1 tests/integration/components/power-select/customization-with-components-test.js
  17. +1 −1 tests/integration/components/power-select/disabled-test.js
  18. +1 −1 tests/integration/components/power-select/ember-data-test.js
  19. +3 −3 tests/integration/components/power-select/general-behaviour-test.js
  20. +2 −2 tests/integration/components/power-select/groups-test.js
  21. +1 −1 tests/integration/components/power-select/helpers-test.js
  22. +1 −1 tests/integration/components/power-select/keyboard-control-test.js
  23. +1 −1 tests/integration/components/power-select/mouse-control-test.js
  24. +3 −3 tests/integration/components/power-select/multiple-test.js
  25. +1 −1 tests/integration/components/power-select/opened-property-test.js
  26. +1 −1 tests/integration/components/power-select/public-actions-test.js
  27. +1 −1 tests/integration/components/power-select/touch-control-test.js
  28. +1 −1 tests/integration/components/power-select/type-ahead-test.js
  29. +1 −1 tests/integration/helpers-test.js
  30. +2 −2 tests/test-helper.js
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ jobs:
# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- env: EMBER_TRY_SCENARIO=ember-lts-3.16
- env: EMBER_TRY_SCENARIO=ember-lts-3.20
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Master

# 4.1.0
- [ENHANCEMENT] Makes changed to aria roles so the currently highlighted option can be announced by assistive
technology like Voice Over.
- [CHORE] Relax allowed versions of ember-truth-helpers so projects are less likely to have to resolve dependencies.

# 4.0.5
- [BUGFIX] Remove event listeners on destroy.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -92,7 +92,7 @@ module.exports = function (defaults) {
}
}
});

return app.toTree();
}
```
9 changes: 6 additions & 3 deletions addon/components/power-select.ts
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action, get } from '@ember/object';
import { addObserver, removeObserver } from '@ember/object/observers';
import { scheduleOnce } from '@ember/runloop';
import { scheduleOnce, next } from '@ember/runloop';
import { isEqual } from '@ember/utils';
import { assert } from '@ember/debug';
import {
@@ -280,7 +280,7 @@ export default class PowerSelect extends Component<PowerSelectArgs> {
@action
handleFocus(event: FocusEvent): void {
if (!this.isDestroying) {
this.isActive = true;
scheduleOnce('actions', this, this._updateIsActive, true);
}
if (this.args.onFocus) {
this.args.onFocus(this.storedAPI, event);
@@ -290,7 +290,7 @@ export default class PowerSelect extends Component<PowerSelectArgs> {
@action
handleBlur(event: FocusEvent): void {
if (!this.isDestroying) {
this.isActive = false;
scheduleOnce('actions', this, this._updateIsActive, false);
}
if (this.args.onBlur) {
this.args.onBlur(this.storedAPI, event);
@@ -550,6 +550,9 @@ export default class PowerSelect extends Component<PowerSelectArgs> {
return filterOptions(options || [], term, optionMatcher, skipDisabled);
}

_updateIsActive(value: boolean) {
this.isActive = value;
}

findWithOffset(options: any[], term: string, offset: number, skipDisabled = false): any {
let typeAheadOptionMatcher = getOptionMatcher(this.args.typeAheadOptionMatcher || defaultTypeAheadMatcher, defaultTypeAheadMatcher, this.args.searchField);
4 changes: 2 additions & 2 deletions addon/components/power-select/options.hbs
Original file line number Diff line number Diff line change
@@ -27,10 +27,10 @@
aria-disabled={{if opt.disabled "true"}}
aria-current="{{eq opt @select.highlighted}}"
data-option-index="{{@groupIndex}}{{index}}"
role="option">
role={{if (eq opt @select.highlighted) "alert" "option"}}>
{{yield opt @select}}
</li>
{{/if}}
{{/each}}
{{/let}}
</ul>
</ul>
8 changes: 8 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -13,6 +13,14 @@ module.exports = async function() {
}
}
},
{
name: 'ember-lts-3.20',
npm: {
devDependencies: {
'ember-source': '~3.20.5'
}
}
},
{
name: 'ember-release',
npm: {
Loading