@ember-eui/core 4.2.5 → 4.4.0
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
### Master
|
|
4
4
|
|
|
5
|
+
### 4.4.0
|
|
6
|
+
🚀 Enhancements
|
|
7
|
+
`@ember-eui/changeset-form`
|
|
8
|
+
- Pass disabled to all form components
|
|
9
|
+
|
|
10
|
+
### 4.3.0
|
|
11
|
+
🚀 Enhancements
|
|
12
|
+
`@ember-eui/flatpickr`
|
|
13
|
+
- New addon plug in, @ember-eui/flatpickr!
|
|
14
|
+
|
|
15
|
+
### 4.2.6
|
|
16
|
+
🐛 Bug / Fixes
|
|
17
|
+
`@ember-eui/core`
|
|
18
|
+
- `<EuiComboBox />` fix css and html issues for amsterdam theme
|
|
19
|
+
- `{{use-state}}` schedule changes for afterRender
|
|
20
|
+
|
|
5
21
|
### 4.2.5
|
|
6
22
|
🐛 Bug / Fixes
|
|
7
23
|
`@ember-eui/core`
|
|
@@ -1,5 +1,18 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<div
|
|
2
|
+
role="button"
|
|
3
|
+
class="euiComboBoxOptionsList__rowWrap"
|
|
4
|
+
{{on "click" @onCreateOption}}
|
|
5
|
+
>
|
|
6
|
+
<EuiText class="euiComboBoxOptionsList__empty" @size="xs">
|
|
7
|
+
<div class="euiComboBoxOption__contentWrapper">
|
|
8
|
+
<p class="euiComboBoxOption__emptyStateText">
|
|
9
|
+
{{this.formattedString}}
|
|
10
|
+
</p>
|
|
11
|
+
<EuiBadge
|
|
12
|
+
@iconType="returnKey"
|
|
13
|
+
class="euiComboBoxOption__enterBadge"
|
|
14
|
+
@color="hollow"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
</EuiText>
|
|
18
|
+
</div>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"eui-combo-box/trigger"
|
|
21
21
|
fullWidth=@fullWidth
|
|
22
22
|
compressed=@compressed
|
|
23
|
-
disabled=@
|
|
23
|
+
disabled=@isDisabled
|
|
24
24
|
isInvalid=@isInvalid
|
|
25
25
|
singleSelection=@singleSelection
|
|
26
26
|
onClose=@removeTag
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
@preventScroll={{@preventScroll}}
|
|
43
43
|
@renderInPlace={{@renderInPlace}}
|
|
44
44
|
@verticalPosition={{@verticalPosition}}
|
|
45
|
-
@disabled={{@
|
|
45
|
+
@disabled={{@isDisabled}}
|
|
46
46
|
@calculatePosition={{@calculatePosition}}
|
|
47
47
|
@eventType={{@eventType}}
|
|
48
48
|
@ariaLabel={{@ariaLabel}}
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
@triggerId={{@triggerId}}
|
|
53
53
|
@allowClear={{and
|
|
54
54
|
(arg-or-default @isClearable true)
|
|
55
|
-
(not
|
|
55
|
+
(not @isDisabled)
|
|
56
56
|
}}
|
|
57
57
|
@loadingMessage={{@loadingMessage}}
|
|
58
58
|
@selectedItemComponent={{@selectedItemComponent}}
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"euiComboBox"
|
|
67
67
|
(if @compressed "euiComboBox--compressed")
|
|
68
68
|
(if @fullWidth "euiComboBox--fullWidth")
|
|
69
|
-
(if
|
|
69
|
+
(if @isDisabled "euiComboBox-isDisabled")
|
|
70
70
|
(if @isInvalid "euiComboBox--isInvalid")
|
|
71
71
|
(if this.select.isOpen "euiComboBox-isOpen")
|
|
72
72
|
}}
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
)
|
|
81
81
|
(component "eui-combo-box/no-matches-message")
|
|
82
82
|
}}
|
|
83
|
-
@dropdownClass="euiComboBoxOptionsList euiPanel euiPanel
|
|
83
|
+
@dropdownClass="euiComboBoxOptionsList euiPanel euiPanel--borderRadiusMedium euiPanel--noShadow euiPanel--plain euiPopover__panel euiPopover__panel--bottom euiPopover__panel-isAttached euiPopover__panel-isOpen euiPopover__panel-noArrow {{@dropdownClass}}"
|
|
84
84
|
as |option i|
|
|
85
85
|
>
|
|
86
86
|
{{yield option i}}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { helper } from '@ember/component/helper';
|
|
2
2
|
import { action } from '@ember/object';
|
|
3
3
|
import { tracked } from '@glimmer/tracking';
|
|
4
|
+
import { scheduleOnce } from '@ember/runloop';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* @param value - initial value to use, undefined if not provided.
|
|
@@ -17,7 +18,10 @@ class SingleUseState<T> {
|
|
|
17
18
|
|
|
18
19
|
@action
|
|
19
20
|
setState(value: T): T {
|
|
20
|
-
|
|
21
|
+
const updater = () => {
|
|
22
|
+
this.value = value;
|
|
23
|
+
};
|
|
24
|
+
scheduleOnce('afterRender', this, updater);
|
|
21
25
|
return value;
|
|
22
26
|
}
|
|
23
27
|
}
|
|
@@ -7,17 +7,18 @@ order: 2
|
|
|
7
7
|
Using on create options for bubbling new option and handling in onCreateOption function, you may want to provide a customOptionText, you can assume {searchText} will be interpolated, be sure sanitize your string!
|
|
8
8
|
|
|
9
9
|
```hbs template
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
<EuiComboBox
|
|
11
|
+
@onChange={{this.onChange}}
|
|
12
|
+
@options={{this.remainingOptions}}
|
|
13
|
+
@onCreateOption={{this.onCreateOption}}
|
|
14
|
+
@selectedOptions={{this.selected}}
|
|
15
|
+
@searchEnabled={{true}}
|
|
16
|
+
@customOptionText='Do you want to add <strong>{searchText}</strong> to your list?'
|
|
17
|
+
@searchField='label'
|
|
18
|
+
as |option item|
|
|
19
|
+
>
|
|
20
|
+
{{option.label}}
|
|
21
|
+
</EuiComboBox>
|
|
21
22
|
```
|
|
22
23
|
|
|
23
24
|
```javascript component
|
|
@@ -59,10 +60,13 @@ export default class Demo1 extends Component {
|
|
|
59
60
|
const newOptionStructure = {
|
|
60
61
|
value: `${newOption}`,
|
|
61
62
|
label: `${newOption}`
|
|
62
|
-
}
|
|
63
|
-
if(
|
|
64
|
-
this.options.
|
|
65
|
-
|
|
63
|
+
};
|
|
64
|
+
if (
|
|
65
|
+
this.options.filter((opt) => opt.value == newOptionStructure.value)
|
|
66
|
+
.length == 0
|
|
67
|
+
) {
|
|
68
|
+
this.options.addObject(newOptionStructure);
|
|
69
|
+
this.selected.addObject(newOptionStructure);
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-eui/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "Ember Components for Elastic UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -95,8 +95,8 @@
|
|
|
95
95
|
"devDependencies": {
|
|
96
96
|
"@ember/optional-features": "^2.0.0",
|
|
97
97
|
"@ember/test-helpers": "^2.6.0",
|
|
98
|
-
"@embroider/test-setup": "^1.
|
|
99
|
-
"@embroider/util": "^1.
|
|
98
|
+
"@embroider/test-setup": "^1.5.0",
|
|
99
|
+
"@embroider/util": "^1.5.0",
|
|
100
100
|
"@glimmer/component": "^1.0.4",
|
|
101
101
|
"@glimmer/tracking": "^1.0.4",
|
|
102
102
|
"@types/ember": "^3.16.0",
|
|
@@ -176,5 +176,5 @@
|
|
|
176
176
|
"volta": {
|
|
177
177
|
"extends": "../../package.json"
|
|
178
178
|
},
|
|
179
|
-
"gitHead": "
|
|
179
|
+
"gitHead": "37fb2ed8242e7f7243bbf6e5a17aa9361e82e7ae"
|
|
180
180
|
}
|