@ember-eui/core 1.2.1 → 1.2.5
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,8 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
### Master
|
|
4
4
|
|
|
5
|
+
### 1.2.4
|
|
6
|
+
🐛 Bug / Fixes
|
|
7
|
+
`@ember-eui/core`
|
|
8
|
+
- Fix `<EuiComboBox/>` isClereable
|
|
5
9
|
|
|
6
|
-
### 1.2.
|
|
10
|
+
### 1.2.4
|
|
11
|
+
🏠 Internal
|
|
12
|
+
`@ember-eui/changeset-form`,`@ember-eui/validated-form`
|
|
13
|
+
- Pass down isCleareable to <EuiComboBox /> wrapped components
|
|
14
|
+
|
|
15
|
+
### 1.2.3
|
|
16
|
+
🚀 Enhancements
|
|
17
|
+
`@ember-eui/core`
|
|
18
|
+
- add errorMessage for validatable-control for i18n or so
|
|
19
|
+
|
|
20
|
+
🏠 Internal
|
|
21
|
+
`@ember-eui/core`
|
|
22
|
+
- update ember-power-select in order to be able to pass attributes to trigger
|
|
23
|
+
|
|
24
|
+
### 1.2.2
|
|
25
|
+
🐛 Bug / Fixes
|
|
26
|
+
`@ember-eui/core`
|
|
27
|
+
- add styling for fake input
|
|
28
|
+
|
|
29
|
+
### 1.2.1
|
|
7
30
|
🐛 Bug / Fixes
|
|
8
31
|
`@ember-eui/core`
|
|
9
32
|
- add tabindex to fake input for `<EuiComboBox />`
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
onCreateOption=(if
|
|
28
28
|
@onCreateOption (pipe this.onCreateOption @onCreateOption)
|
|
29
29
|
)
|
|
30
|
+
isClearable=@isClearable
|
|
30
31
|
}}
|
|
31
32
|
@matcher={{@matcher}}
|
|
32
33
|
@initiallyOpen={{@initiallyOpen}}
|
|
@@ -81,8 +82,8 @@
|
|
|
81
82
|
)
|
|
82
83
|
(component "eui-combo-box/no-matches-message")
|
|
83
84
|
}}
|
|
84
|
-
@dropdownClass="euiComboBoxOptionsList euiPanel euiPanel euiPanel--borderRadiusMedium euiPanel--noShadow euiPanel--plain euiPopover__panel-isAttached euiPopover__panel-noArrow euiPopover__panel--bottom euiPopover__panel-isOpen euiComboBoxOptionsList__rowWrap
|
|
85
|
-
|
|
85
|
+
@dropdownClass="euiComboBoxOptionsList euiPanel euiPanel euiPanel--borderRadiusMedium euiPanel--noShadow euiPanel--plain euiPopover__panel-isAttached euiPopover__panel-noArrow euiPopover__panel--bottom euiPopover__panel-isOpen euiComboBoxOptionsList__rowWrap {{@dropdownClass}}"
|
|
86
|
+
as |option i|
|
|
86
87
|
>
|
|
87
88
|
{{yield option i}}
|
|
88
89
|
</PowerSelectMultiple>
|
|
@@ -1,139 +1,121 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}}
|
|
46
|
-
{{#each @select.selected as |opt idx|}}
|
|
47
|
-
{{#if @selectedItemComponent}}
|
|
48
|
-
{{component
|
|
49
|
-
@selectedItemComponent
|
|
50
|
-
extra=@extra
|
|
51
|
-
option=opt
|
|
52
|
-
select=@select
|
|
53
|
-
}}
|
|
54
|
-
{{else}}
|
|
55
|
-
<EuiComboBoxPill
|
|
56
|
-
class="ember-power-select-multiple-option
|
|
57
|
-
{{if
|
|
58
|
-
opt.disabled
|
|
59
|
-
"ember-power-select-multiple-option--disabled"
|
|
60
|
-
}}"
|
|
61
|
-
@option={{opt}}
|
|
62
|
-
@onClose={{if
|
|
63
|
-
(or @select.disabled @singleSelection)
|
|
64
|
-
false
|
|
65
|
-
(if @onClose (fn (optional @onClose) opt) true)
|
|
1
|
+
{{#let (arg-or-default @isClearable true) as |isClearable|}}
|
|
2
|
+
<EuiFormControlLayout
|
|
3
|
+
@icon="arrowDown"
|
|
4
|
+
@iconSide="right"
|
|
5
|
+
@fullWidth={{@fullWidth}}
|
|
6
|
+
@compressed={{@compressed}}
|
|
7
|
+
@readOnly={{@readOnly}}
|
|
8
|
+
@clear={{if
|
|
9
|
+
(and @select.selected isClearable)
|
|
10
|
+
(fn @select.actions.select (array))
|
|
11
|
+
}}
|
|
12
|
+
@disabled={{@select.disabled}}
|
|
13
|
+
>
|
|
14
|
+
<:field>
|
|
15
|
+
{{! template-lint-disable }}
|
|
16
|
+
<ul
|
|
17
|
+
id="ember-power-select-multiple-options-{{@select.uniqueId}}"
|
|
18
|
+
class={{class-names
|
|
19
|
+
"euiComboBox__inputWrap ember-power-select-multiple-options"
|
|
20
|
+
(if @compressed "euiComboBox__inputWrap--compressed")
|
|
21
|
+
(if @fullWidth "euiComboBox__inputWrap--fullWidth")
|
|
22
|
+
(if @singleSelection "euiComboBox__inputWrap--noWrap")
|
|
23
|
+
(if @isLoading "euiComboBox__inputWrap--isLoading")
|
|
24
|
+
(if isClearable "euiComboBox__inputWrap-isClearable")
|
|
25
|
+
}}
|
|
26
|
+
...attributes
|
|
27
|
+
{{did-update this.openChanged @select.isOpen}}
|
|
28
|
+
{{on "touchstart" this.chooseOption}}
|
|
29
|
+
{{on "mousedown" this.chooseOption}}
|
|
30
|
+
>
|
|
31
|
+
{{! template-lint-enable }}
|
|
32
|
+
{{#if
|
|
33
|
+
(or
|
|
34
|
+
(and @singleSelection (not @select.searchText))
|
|
35
|
+
(not @singleSelection)
|
|
36
|
+
)
|
|
37
|
+
}}
|
|
38
|
+
{{#each @select.selected as |opt idx|}}
|
|
39
|
+
{{#if @selectedItemComponent}}
|
|
40
|
+
{{component
|
|
41
|
+
@selectedItemComponent
|
|
42
|
+
extra=@extra
|
|
43
|
+
option=opt
|
|
44
|
+
select=@select
|
|
66
45
|
}}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
46
|
+
{{else}}
|
|
47
|
+
<EuiComboBoxPill
|
|
48
|
+
class="ember-power-select-multiple-option
|
|
49
|
+
{{if
|
|
50
|
+
opt.disabled
|
|
51
|
+
"ember-power-select-multiple-option--disabled"
|
|
52
|
+
}}"
|
|
53
|
+
@option={{opt}}
|
|
54
|
+
@onClose={{if
|
|
55
|
+
(or @select.disabled @singleSelection)
|
|
56
|
+
false
|
|
57
|
+
(if @onClose (fn (optional @onClose) opt) true)
|
|
58
|
+
}}
|
|
59
|
+
@dataSelectedIconIndex={{idx}}
|
|
60
|
+
@color={{opt.color}}
|
|
61
|
+
@asPlainText={{@singleSelection.asPlainText}}
|
|
62
|
+
>
|
|
63
|
+
{{yield opt @select}}
|
|
64
|
+
</EuiComboBoxPill>
|
|
65
|
+
{{/if}}
|
|
66
|
+
{{else if (and @placeholder (not @searchEnabled))}}
|
|
67
|
+
<span class="ember-power-select-placeholder">
|
|
68
|
+
{{@placeholder}}
|
|
69
|
+
</span>
|
|
70
|
+
{{/each}}
|
|
71
|
+
{{/if}}
|
|
72
|
+
{{#if @searchEnabled}}
|
|
73
|
+
{{! template-lint-disable }}
|
|
74
|
+
{{#if (and this.maybePlaceholder (not @select.searchText))}}
|
|
75
|
+
<p class="euiComboBoxPlaceholder">
|
|
76
|
+
{{this.maybePlaceholder}}
|
|
77
|
+
</p>
|
|
73
78
|
{{/if}}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
<div
|
|
80
|
+
class="euiComboBox__input"
|
|
81
|
+
style="font-size: 14px; display: inline-block; position: relative;"
|
|
82
|
+
>
|
|
83
|
+
<input
|
|
84
|
+
tabindex="-1"
|
|
85
|
+
style="opacity: 0px; width:0px; height:0px; position: absolute; top: 40%; border:solid 1px transparent !important; margin:0px !important;"
|
|
86
|
+
class="fake-input-for-html-form-validity"
|
|
87
|
+
{{validatable-control @isInvalid}}
|
|
88
|
+
/>
|
|
89
|
+
<input
|
|
90
|
+
class="ember-power-select-trigger-multiple-input euiComboBox__input"
|
|
91
|
+
autocomplete="off"
|
|
92
|
+
autocorrect="off"
|
|
93
|
+
autocapitalize="off"
|
|
94
|
+
spellcheck={{false}}
|
|
95
|
+
id="ember-power-select-trigger-multiple-input-{{@select.uniqueId}}"
|
|
96
|
+
value={{@select.searchText}}
|
|
97
|
+
aria-controls={{@listboxId}}
|
|
98
|
+
style={{this.triggerMultipleInputStyle}}
|
|
99
|
+
disabled={{@select.disabled}}
|
|
100
|
+
tabindex={{@tabindex}}
|
|
101
|
+
form="power-select-fake-form"
|
|
102
|
+
{{on "focus" @onFocus}}
|
|
103
|
+
{{on "blur" @onBlur}}
|
|
104
|
+
{{on "input" this.handleInput}}
|
|
105
|
+
{{on "keydown" this.handleKeydown}}
|
|
106
|
+
{{did-insert this.storeInputStyles}}
|
|
107
|
+
/>
|
|
108
|
+
</div>
|
|
109
|
+
{{! template-lint-enable }}
|
|
110
|
+
{{else}}
|
|
111
|
+
{{! template-lint-disable }}
|
|
112
|
+
<div
|
|
113
|
+
class="euiComboBox__input"
|
|
114
|
+
style="font-size: 14px; display: inline-block;"
|
|
115
|
+
></div>
|
|
116
|
+
{{! template-lint-enable }}
|
|
86
117
|
{{/if}}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
<input
|
|
92
|
-
tabindex="-1"
|
|
93
|
-
style="opacity: 0px; width:0px; height:0px; position: absolute; top: 40%; border:solid 1px;"
|
|
94
|
-
class="fake-input-for-html-form-validity"
|
|
95
|
-
{{validatable-control @isInvalid}}
|
|
96
|
-
/>
|
|
97
|
-
<input
|
|
98
|
-
class="ember-power-select-trigger-multiple-input euiComboBox__input"
|
|
99
|
-
autocomplete="off"
|
|
100
|
-
autocorrect="off"
|
|
101
|
-
autocapitalize="off"
|
|
102
|
-
spellcheck={{false}}
|
|
103
|
-
id="ember-power-select-trigger-multiple-input-{{@select.uniqueId}}"
|
|
104
|
-
value={{@select.searchText}}
|
|
105
|
-
aria-controls={{@listboxId}}
|
|
106
|
-
style={{this.triggerMultipleInputStyle}}
|
|
107
|
-
disabled={{@select.disabled}}
|
|
108
|
-
tabindex={{@tabindex}}
|
|
109
|
-
form="power-select-fake-form"
|
|
110
|
-
{{on "focus" @onFocus}}
|
|
111
|
-
{{on "blur" @onBlur}}
|
|
112
|
-
{{on "input" this.handleInput}}
|
|
113
|
-
{{on "keydown" this.handleKeydown}}
|
|
114
|
-
{{did-insert this.storeInputStyles}}
|
|
115
|
-
/>
|
|
116
|
-
</div>
|
|
117
|
-
{{! template-lint-enable }}
|
|
118
|
-
{{else}}
|
|
119
|
-
{{! template-lint-disable }}
|
|
120
|
-
<div
|
|
121
|
-
class="euiComboBox__input"
|
|
122
|
-
style="font-size: 14px; display: inline-block;"
|
|
123
|
-
></div>
|
|
124
|
-
{{! template-lint-enable }}
|
|
125
|
-
{{/if}}
|
|
126
|
-
</ul>
|
|
127
|
-
</:field>
|
|
128
|
-
{{!-- <:append as |classes|>
|
|
129
|
-
{{#if @extra.appendTriggerInputComponent}}
|
|
130
|
-
{{#let
|
|
131
|
-
(component
|
|
132
|
-
@extra.appendTriggerInputComponent
|
|
133
|
-
) as |AppendTriggerInputComponent|
|
|
134
|
-
}}
|
|
135
|
-
<AppendTriggerInputComponent class={{classes}} />
|
|
136
|
-
{{/let}}
|
|
137
|
-
{{/if}}
|
|
138
|
-
</:append> --}}
|
|
139
|
-
</EuiFormControlLayout>
|
|
118
|
+
</ul>
|
|
119
|
+
</:field>
|
|
120
|
+
</EuiFormControlLayout>
|
|
121
|
+
{{/let}}
|
|
@@ -3,13 +3,13 @@ import { typeOf } from '@ember/utils';
|
|
|
3
3
|
|
|
4
4
|
export default modifier(function validatableControl(
|
|
5
5
|
element: HTMLObjectElement,
|
|
6
|
-
[isInvalid]: [boolean]
|
|
6
|
+
[isInvalid, errorMessage]: [boolean, string]
|
|
7
7
|
) {
|
|
8
8
|
if (typeOf(element.setCustomValidity) !== 'function') {
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
11
11
|
if (isInvalid) {
|
|
12
|
-
element.setCustomValidity('Invalid');
|
|
12
|
+
element.setCustomValidity(errorMessage || 'Invalid');
|
|
13
13
|
} else {
|
|
14
14
|
element.setCustomValidity('');
|
|
15
15
|
}
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-eui/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "Ember Components for Elastic UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"ember-math-helpers": "^2.15.0",
|
|
72
72
|
"ember-modifier": "^2.1.1",
|
|
73
73
|
"ember-named-blocks-polyfill": "^0.2.3",
|
|
74
|
-
"ember-power-select": "^
|
|
74
|
+
"ember-power-select": "^5.0.2",
|
|
75
75
|
"ember-set-body-class": "^1.0.2",
|
|
76
76
|
"ember-set-helper": "^2.0.0",
|
|
77
77
|
"ember-style-modifier": "^0.6.0",
|
|
@@ -141,5 +141,5 @@
|
|
|
141
141
|
"volta": {
|
|
142
142
|
"node": "12.22.1"
|
|
143
143
|
},
|
|
144
|
-
"gitHead": "
|
|
144
|
+
"gitHead": "fce9c43d0d625c0880eb1e98eb3910a0ce1395a2"
|
|
145
145
|
}
|