@ember-eui/core 7.1.2 → 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={{
|
|
12
|
+
@options={{this.options}}
|
|
13
13
|
@selected={{@selectedOptions}}
|
|
14
14
|
@closeOnSelect={{@closeOnSelect}}
|
|
15
15
|
@defaultHighlighted={{@defaultHighlighted}}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { action } from '@ember/object';
|
|
3
3
|
import { tracked, cached } from '@glimmer/tracking';
|
|
4
|
-
//@ts-ignore
|
|
5
4
|
import { emberPowerSelectIsGroup } from 'ember-power-select/helpers/ember-power-select-is-group';
|
|
6
5
|
import { isEqual } from '@ember/utils';
|
|
6
|
+
import { isArray } from '@ember/array';
|
|
7
7
|
|
|
8
8
|
interface PromiseProxy<T> extends Promise<T> {
|
|
9
9
|
content: any;
|
|
@@ -23,16 +23,17 @@ interface Select {
|
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
interface
|
|
27
|
-
|
|
26
|
+
interface Sliceable<T> {
|
|
27
|
+
slice(): T[];
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
|
|
30
|
+
const isSliceable = <T>(coll: any): coll is Sliceable<T> => {
|
|
31
|
+
return isArray(coll);
|
|
31
32
|
};
|
|
32
33
|
|
|
33
|
-
const toPlainArray = <T>(collection: T[] |
|
|
34
|
-
if (
|
|
35
|
-
return collection.
|
|
34
|
+
export const toPlainArray = <T>(collection: T[] | Sliceable<T>): T[] => {
|
|
35
|
+
if (isSliceable<T>(collection)) {
|
|
36
|
+
return collection.slice();
|
|
36
37
|
} else {
|
|
37
38
|
return collection;
|
|
38
39
|
}
|
|
@@ -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);
|
|
@@ -22,7 +22,7 @@ export default class EuiComboBoxOptionsComponent extends EmberPowerSelectOptions
|
|
|
22
22
|
|
|
23
23
|
_optionFromIndex(index) {
|
|
24
24
|
let parts = index.split('.');
|
|
25
|
-
let option = this.flattedOptions
|
|
25
|
+
let option = this.flattedOptions.at?.(parseInt(parts[0], 10));
|
|
26
26
|
for (let i = 1; i < parts.length; i++) {
|
|
27
27
|
option = option.options[parseInt(parts[i], 10)];
|
|
28
28
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-eui/core",
|
|
3
|
-
"version": "7.1.
|
|
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": "
|
|
189
|
+
"gitHead": "eef29b384199cdcecc58a6208ec8432fe25c071a"
|
|
190
190
|
}
|