@ember-eui/core 7.1.3 → 7.1.4

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.
@@ -9,7 +9,7 @@
9
9
  @searchMessage={{@searchMessage}}
10
10
  @noMatchesMessage={{@noMatchesMessage}}
11
11
  @matchTriggerWidth={{@matchTriggerWidth}}
12
- @options={{@options}}
12
+ @options={{this.options}}
13
13
  @selected={{@selectedOptions}}
14
14
  @closeOnSelect={{@closeOnSelect}}
15
15
  @defaultHighlighted={{@defaultHighlighted}}
@@ -3,6 +3,7 @@ import { action } from '@ember/object';
3
3
  import { tracked, cached } from '@glimmer/tracking';
4
4
  import { emberPowerSelectIsGroup } from 'ember-power-select/helpers/ember-power-select-is-group';
5
5
  import { isEqual } from '@ember/utils';
6
+ import { isArray } from '@ember/array';
6
7
 
7
8
  interface PromiseProxy<T> extends Promise<T> {
8
9
  content: any;
@@ -27,7 +28,7 @@ interface Sliceable<T> {
27
28
  }
28
29
 
29
30
  const isSliceable = <T>(coll: any): coll is Sliceable<T> => {
30
- return typeof coll.slice === 'function' && typeof coll.sort === 'function';
31
+ return isArray(coll);
31
32
  };
32
33
 
33
34
  export const toPlainArray = <T>(collection: T[] | Sliceable<T>): T[] => {
@@ -52,7 +53,6 @@ export default class EuiComboBoxComponent extends Component<EuiComboBoxArgs> {
52
53
  //This is to allow scrolling between virtualized groups
53
54
  @cached
54
55
  get opts() {
55
- //@ts-ignore
56
56
  return this.results.reduce((acc, curr) => {
57
57
  if (emberPowerSelectIsGroup([curr])) {
58
58
  acc.push(curr, ...curr.options);
@@ -1,7 +1,6 @@
1
1
  import EmberPowerSelectOptions from 'ember-power-select/components/power-select/options';
2
2
  import { emberPowerSelectIsGroup } from 'ember-power-select/helpers/ember-power-select-is-group';
3
3
  import config from 'ember-get-config';
4
- import { toPlainArray } from '..';
5
4
 
6
5
  export default class EuiComboBoxOptionsComponent extends EmberPowerSelectOptions {
7
6
  _optionsCache = [];
@@ -23,7 +22,7 @@ export default class EuiComboBoxOptionsComponent extends EmberPowerSelectOptions
23
22
 
24
23
  _optionFromIndex(index) {
25
24
  let parts = index.split('.');
26
- let option = toPlainArray(this.flattedOptions).at?.(parseInt(parts[0], 10));
25
+ let option = this.flattedOptions.at?.(parseInt(parts[0], 10));
27
26
  for (let i = 1; i < parts.length; i++) {
28
27
  option = option.options[parseInt(parts[i], 10)];
29
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ember-eui/core",
3
- "version": "7.1.3",
3
+ "version": "7.1.4",
4
4
  "description": "Ember Components for Elastic UI",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -186,5 +186,5 @@
186
186
  "volta": {
187
187
  "extends": "../../package.json"
188
188
  },
189
- "gitHead": "b31eb2bf6cd5c5c15a271a88b7d7386df271ed4d"
189
+ "gitHead": "eef29b384199cdcecc58a6208ec8432fe25c071a"
190
190
  }