@ember-eui/core 5.2.1 → 5.4.2
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.
- package/addon/components/eui-button-icon/index.hbs +3 -3
- package/addon/components/eui-combo-box/options/index.hbs +6 -4
- package/addon/components/eui-combo-box/options/index.js +6 -0
- package/addon/components/eui-icon/index.ts +1 -1
- package/addon/components/eui-notification-event-meta/index.hbs +1 -1
- package/addon/helpers/arg-or-default.ts +18 -8
- package/package.json +2 -2
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
componentName="EuiButtonIcon"
|
|
6
6
|
display=(arg-or-default @display "empty")
|
|
7
7
|
color=(arg-or-default @color "primary")
|
|
8
|
-
size=(arg-or-default @size "xs")
|
|
8
|
+
size=(arg-or-default @size "xs" configKey="euiButtonIcon.size")
|
|
9
9
|
}}
|
|
10
10
|
href={{@href}}
|
|
11
11
|
target={{@target}}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
componentName="EuiButtonIcon"
|
|
31
31
|
display=(arg-or-default @display "empty")
|
|
32
32
|
color=(arg-or-default @color "primary")
|
|
33
|
-
size=(arg-or-default @size "xs")
|
|
33
|
+
size=(arg-or-default @size "xs" configKey="euiButtonIcon.size")
|
|
34
34
|
}}
|
|
35
35
|
disabled={{or @isDisabled @disabled}}
|
|
36
36
|
aria-pressed={{if @isSelected "true" "false"}}
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<EuiIcon
|
|
42
42
|
@iconClasses="euiButtonIcon__icon {{@iconClasses}}"
|
|
43
43
|
@type={{@iconType}}
|
|
44
|
-
@size={{@iconSize}}
|
|
44
|
+
@size={{arg-or-default @iconSize "m"}}
|
|
45
45
|
@useSvg={{@useSvg}}
|
|
46
46
|
@color="inherit"
|
|
47
47
|
@useComponent={{@useComponent}}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
{{#let
|
|
1
|
+
{{#let
|
|
2
|
+
(component (ensure-safe-component @groupComponent))
|
|
3
|
+
as |Group|}}
|
|
2
4
|
{{#if @select.loading}}
|
|
3
5
|
<EuiText @size="xs" class="euiComboBoxOptionsList__empty">
|
|
4
6
|
<EuiFlexGroup @gutterSize="s" @justifyContent="center">
|
|
@@ -15,7 +17,7 @@
|
|
|
15
17
|
<VerticalCollection
|
|
16
18
|
@items={{this.flattedOptions}}
|
|
17
19
|
@tagName="div"
|
|
18
|
-
@estimateHeight={{
|
|
20
|
+
@estimateHeight={{this.rowHeight}}
|
|
19
21
|
@staticHeight={{true}}
|
|
20
22
|
@bufferSize={{3}}
|
|
21
23
|
style="max-height: 200px; overflow-y: auto;"
|
|
@@ -34,14 +36,14 @@
|
|
|
34
36
|
@select={{@select}}
|
|
35
37
|
@extra={{@extra}}
|
|
36
38
|
style={{html-safe
|
|
37
|
-
(concat "height:"
|
|
39
|
+
(concat "height:" this.rowHeight "px;")
|
|
38
40
|
}}
|
|
39
41
|
data-option-index="{{index}}"
|
|
40
42
|
/>
|
|
41
43
|
{{else}}
|
|
42
44
|
<li
|
|
43
45
|
style={{html-safe
|
|
44
|
-
(concat "height:"
|
|
46
|
+
(concat "height:" this.rowHeight "px;")
|
|
45
47
|
}}
|
|
46
48
|
class="euiFilterSelectItem
|
|
47
49
|
{{if
|
|
@@ -1,7 +1,9 @@
|
|
|
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 { tracked } from '@glimmer/tracking';
|
|
4
|
+
import config from 'ember-get-config';
|
|
4
5
|
|
|
6
|
+
const rowHeight = config['@ember-eui/core']?.euiComboBoxOptionsHeight || 29;
|
|
5
7
|
export default class EuiComboBoxOptionsComponent extends EmberPowerSelectOptions {
|
|
6
8
|
@tracked flattedOptions = [];
|
|
7
9
|
_optionsCache = [];
|
|
@@ -34,4 +36,8 @@ export default class EuiComboBoxOptionsComponent extends EmberPowerSelectOptions
|
|
|
34
36
|
}
|
|
35
37
|
return option;
|
|
36
38
|
}
|
|
39
|
+
|
|
40
|
+
get rowHeight() {
|
|
41
|
+
return this.args.rowHeight ?? rowHeight
|
|
42
|
+
}
|
|
37
43
|
}
|
|
@@ -117,7 +117,7 @@ export default class EuiIcon extends Component<EuiIconArgs> {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
getEuiIconSvgPath(type: EuiIconType): string {
|
|
120
|
-
return typeToPathMap[type]
|
|
120
|
+
return typeToPathMap[type];
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
get isAppIcon(): string | boolean {
|
|
@@ -65,7 +65,7 @@ as |hasDefaultBlock|}}
|
|
|
65
65
|
@iconType="boxesVertical"
|
|
66
66
|
@color="text"
|
|
67
67
|
data-test-subj={{concat @id '-notificationEventMetaButton'}}
|
|
68
|
-
{{on 'click' (fn isPopoverOpen.setState true)}}
|
|
68
|
+
{{on 'click' (if isPopoverOpen.value (fn isPopoverOpen.setState false) (fn isPopoverOpen.setState true))}}
|
|
69
69
|
/>
|
|
70
70
|
</:button>
|
|
71
71
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { helper } from '@ember/component/helper';
|
|
2
2
|
import { assert } from '@ember/debug';
|
|
3
|
+
//@ts-ignore
|
|
4
|
+
import config from 'ember-get-config';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* Helper that returns a default value if the passed argument is undefined
|
|
@@ -8,21 +10,29 @@ import { assert } from '@ember/debug';
|
|
|
8
10
|
* @property {unknown} 0 - value to be returned if it's defined
|
|
9
11
|
* @property {unknown} 1 - default value to be returned if value is undefined
|
|
10
12
|
*/
|
|
11
|
-
export function argOrDefault(
|
|
12
|
-
unknown,
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
export function argOrDefault(
|
|
14
|
+
[value, defaultValue]: [unknown, unknown],
|
|
15
|
+
{ configKey }: { configKey?: string }
|
|
16
|
+
): unknown {
|
|
15
17
|
assert('`defaultValue` must be provided', defaultValue !== undefined);
|
|
16
|
-
|
|
18
|
+
let configValue;
|
|
19
|
+
if (configKey) {
|
|
20
|
+
configValue = config['@ember-eui/core']?.[configKey];
|
|
21
|
+
}
|
|
22
|
+
return value !== undefined ? value : configValue || defaultValue;
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
//eslint-disable-next-line
|
|
20
|
-
export function argOrDefaultDecorator<T>(
|
|
26
|
+
export function argOrDefaultDecorator<T>(
|
|
27
|
+
defaultValue: T,
|
|
28
|
+
configKey?: string
|
|
29
|
+
): any {
|
|
21
30
|
return function (_target: any, key: string) {
|
|
22
31
|
return {
|
|
23
32
|
get(this: { args: Record<string, T> }): T {
|
|
24
|
-
|
|
25
|
-
|
|
33
|
+
return argOrDefault([this.args[key], defaultValue], {
|
|
34
|
+
configKey: configKey
|
|
35
|
+
}) as T;
|
|
26
36
|
}
|
|
27
37
|
};
|
|
28
38
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-eui/core",
|
|
3
|
-
"version": "5.2
|
|
3
|
+
"version": "5.4.2",
|
|
4
4
|
"description": "Ember Components for Elastic UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -182,5 +182,5 @@
|
|
|
182
182
|
"volta": {
|
|
183
183
|
"extends": "../../package.json"
|
|
184
184
|
},
|
|
185
|
-
"gitHead": "
|
|
185
|
+
"gitHead": "510ff775f572f0c8b4f573980effd770ef016c94"
|
|
186
186
|
}
|