@ember-eui/core 5.10.0 → 5.10.1

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.
@@ -1,8 +1,7 @@
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
- import config from 'ember-get-config';
3
+ import euiConfig from '@ember-eui/core/utils/eui-config';
4
4
 
5
- const rowHeight = config['@ember-eui/core']?.euiComboBoxOptionsHeight || 29;
6
5
  export default class EuiComboBoxOptionsComponent extends EmberPowerSelectOptions {
7
6
  _optionsCache = [];
8
7
 
@@ -30,7 +29,11 @@ export default class EuiComboBoxOptionsComponent extends EmberPowerSelectOptions
30
29
  return option;
31
30
  }
32
31
 
32
+ get configRowHeight() {
33
+ return euiConfig?.['@ember-eui/core']?.euiComboBoxOptionsHeight || 29;
34
+ }
35
+
33
36
  get rowHeight() {
34
- return this.args.rowHeight ?? rowHeight;
37
+ return this.args.rowHeight ?? this.configRowHeight;
35
38
  }
36
39
  }
@@ -8,7 +8,8 @@ import {
8
8
  } from '../../utils/css-mappings/eui-icon';
9
9
  import { uniqueId } from '../../helpers/unique-id';
10
10
  import { htmlSafe } from '@ember/template';
11
- import { getOwner } from '@ember/application';
11
+ //@ts-ignore
12
+ import euiConfig from '@ember-eui/core/utils/eui-config';
12
13
 
13
14
  export const TYPES = keysOf(typeToPathMap);
14
15
 
@@ -88,11 +89,9 @@ export default class EuiIcon extends Component<EuiIconArgs> {
88
89
  }
89
90
 
90
91
  get useSvg(): boolean {
91
- //@ts-ignore
92
- const config = getOwner(this).resolveRegistration('config:environment');
93
92
  return (
94
93
  this.args.useSvg ??
95
- config?.['@ember-eui/core']?.['eui-icon']?.useSvg ??
94
+ euiConfig?.['@ember-eui/core']?.['eui-icon']?.useSvg ??
96
95
  false
97
96
  );
98
97
  }
@@ -1,7 +1,7 @@
1
1
  import { helper } from '@ember/component/helper';
2
2
  import { assert } from '@ember/debug';
3
3
  //@ts-ignore
4
- import config from 'ember-get-config';
4
+ import euiConfigs from '@ember-eui/core/utils/eui-config';
5
5
  import { get } from '@ember/object';
6
6
 
7
7
  /**
@@ -18,7 +18,7 @@ export function argOrDefault(
18
18
  assert('`defaultValue` must be provided', defaultValue !== undefined);
19
19
  let configValue;
20
20
  if (configKey) {
21
- configValue = get(config, configKey);
21
+ configValue = get(euiConfigs, configKey);
22
22
  }
23
23
  return value !== undefined ? value : configValue || defaultValue;
24
24
  }
@@ -0,0 +1,12 @@
1
+ export default {
2
+ '@ember-eui/core': {
3
+ euiButtonIcon: {
4
+ size: 'xs'
5
+ },
6
+ '@ember-eui/core': {
7
+ 'eui-icon': {
8
+ useSvg: false
9
+ }
10
+ }
11
+ }
12
+ };
package/addon/version.ts CHANGED
@@ -1,4 +1,3 @@
1
- // import config from 'ember-get-config';
2
1
  // import Ember from 'ember';
3
2
 
4
3
  export function registerLibrary() {
@@ -0,0 +1 @@
1
+ export { default } from '@ember-eui/core/utils/eui-config';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ember-eui/core",
3
- "version": "5.10.0",
3
+ "version": "5.10.1",
4
4
  "description": "Ember Components for Elastic UI",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -142,7 +142,6 @@
142
142
  "ember-disable-prototype-extensions": "^1.1.3",
143
143
  "ember-export-application-global": "^2.0.1",
144
144
  "ember-focus-trap": "^1.0.1",
145
- "ember-get-config": "~1.0.2",
146
145
  "ember-load-initializers": "^2.1.2",
147
146
  "ember-page-title": "^7.0.0",
148
147
  "ember-qunit": "^5.1.5",
@@ -185,5 +184,5 @@
185
184
  "volta": {
186
185
  "extends": "../../package.json"
187
186
  },
188
- "gitHead": "f362b88c26b899191769be04f0a65e04eccc75ac"
187
+ "gitHead": "32e6e712c4d5d0dcb6a570b15eff540ebb9aa51a"
189
188
  }