@ember-eui/core 3.0.2 → 3.1.3
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 +18 -0
- package/README.md +1 -0
- package/addon/components/eui-combo-box/index.hbs +5 -7
- package/addon/components/eui-combo-box/index.ts +2 -0
- package/addon/components/eui-combo-box/options/index.hbs +10 -5
- package/addon/components/eui-combo-box/trigger/index.hbs +115 -118
- package/addon/components/eui-icon/index.hbs +1 -1
- package/addon/components/eui-list-group-item/index.hbs +1 -1
- package/addon/components/eui-markdown-editor/index.ts +13 -2
- package/addon/components/eui-markdown-editor-toolbar/index.hbs +1 -1
- package/addon/components/eui-markdown-format/index.hbs +13 -3
- package/package.json +3 -2
- package/app/components/eui-text-field/index.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
### Master
|
|
4
4
|
|
|
5
|
+
### 3.1.0
|
|
6
|
+
🚀 Enhancements
|
|
7
|
+
`@ember-eui/*`
|
|
8
|
+
- Embroider ready, in order to use staticComponents you need to have `@embroider` > 1.2.0
|
|
9
|
+
|
|
10
|
+
🐛 Bug / Fixes
|
|
11
|
+
`@ember-eui/core`
|
|
12
|
+
- `<EuiMarkdownFormat />` and `<EuiMarkdownEditor />` styling bugs and double render issues fixed
|
|
13
|
+
|
|
5
14
|
### 3.0.2
|
|
6
15
|
`@ember-eui/core`
|
|
7
16
|
🐛 Bug / Fixes
|
|
@@ -29,6 +38,15 @@
|
|
|
29
38
|
💥 Breaking change
|
|
30
39
|
`@ember-eui/core`
|
|
31
40
|
- Deprecate `ember-svg-jar` `hbs` strategy for now, just use stock `ember-svg-jar`
|
|
41
|
+
### 1.6.7
|
|
42
|
+
🐛 Bug / Fixes
|
|
43
|
+
`@ember-eui/core`
|
|
44
|
+
- `<EuiComboBox />` Call `onChange` after `onCreateOption` is triggered
|
|
45
|
+
### 1.6.5
|
|
46
|
+
🐛 Bug / Fixes
|
|
47
|
+
`@ember-eui/core`
|
|
48
|
+
- `<EuiComboBox />` hide clear button when disabled
|
|
49
|
+
- `<EuiComboBox />` close options dropdown after creating option
|
|
32
50
|
|
|
33
51
|
### 1.6.3
|
|
34
52
|
🐛 Bug / Fixes
|
package/README.md
CHANGED
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
onCreateOption=(if
|
|
28
28
|
@onCreateOption (pipe this.onCreateOption @onCreateOption)
|
|
29
29
|
)
|
|
30
|
-
isClearable=@isClearable
|
|
31
30
|
}}
|
|
32
31
|
@matcher={{@matcher}}
|
|
33
32
|
@initiallyOpen={{@initiallyOpen}}
|
|
@@ -51,14 +50,13 @@
|
|
|
51
50
|
@triggerRole={{@triggerRole}}
|
|
52
51
|
@title={{@title}}
|
|
53
52
|
@triggerId={{@triggerId}}
|
|
54
|
-
@allowClear={{
|
|
53
|
+
@allowClear={{and
|
|
54
|
+
(arg-or-default @isClearable true)
|
|
55
|
+
(not (or @isDisabled @disabled))
|
|
56
|
+
}}
|
|
55
57
|
@loadingMessage={{@loadingMessage}}
|
|
56
58
|
@selectedItemComponent={{@selectedItemComponent}}
|
|
57
|
-
@beforeOptionsComponent={{
|
|
58
|
-
@beforeOptionsComponent
|
|
59
|
-
@beforeOptionsComponent
|
|
60
|
-
null
|
|
61
|
-
}}
|
|
59
|
+
@beforeOptionsComponent={{@beforeOptionsComponent}}
|
|
62
60
|
@placeholder={{@placeholder}}
|
|
63
61
|
@searchPlaceholder={{@searchPlaceholder}}
|
|
64
62
|
@optionsComponent={{component "eui-combo-box/options" rowHeight=@rowHeight}}
|
|
@@ -66,6 +66,8 @@ export default class EuiComboBoxComponent extends Component<EuiComboBoxArgs> {
|
|
|
66
66
|
onCreateOption() {
|
|
67
67
|
let search = this.select.searchText;
|
|
68
68
|
this.select.actions.search('');
|
|
69
|
+
this.select.actions.select(search);
|
|
70
|
+
this.select.actions.close();
|
|
69
71
|
return search;
|
|
70
72
|
}
|
|
71
73
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{{#let (component @groupComponent) as |Group|}}
|
|
1
|
+
{{#let (component (ensure-safe-component @groupComponent)) as |Group|}}
|
|
2
2
|
{{#if @select.loading}}
|
|
3
3
|
<EuiText @size="xs" class="euiComboBoxOptionsList__empty">
|
|
4
4
|
<EuiFlexGroup @gutterSize="s" @justifyContent="center">
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
aria-controls="ember-power-select-trigger-{{@select.uniqueId}}"
|
|
24
24
|
...attributes
|
|
25
25
|
{{did-insert this.addHandlers}}
|
|
26
|
-
{{will-destroy this.removeHandlers}}
|
|
26
|
+
{{will-destroy this.removeHandlers}}
|
|
27
|
+
as |opt index|
|
|
27
28
|
>
|
|
28
29
|
{{! template-lint-enable }}
|
|
29
30
|
{{#if (ember-power-select-is-group opt)}}
|
|
@@ -31,10 +32,14 @@
|
|
|
31
32
|
{{else}}
|
|
32
33
|
<li
|
|
33
34
|
class="euiFilterSelectItem
|
|
34
|
-
{{if
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
{{if
|
|
36
|
+
(eq opt @select.highlighted)
|
|
37
|
+
' euiFilterSelectItem-isFocused'
|
|
37
38
|
}}"
|
|
39
|
+
aria-selected="{{ember-power-select-is-selected
|
|
40
|
+
opt
|
|
41
|
+
@select.selected
|
|
42
|
+
}}"
|
|
38
43
|
aria-disabled={{if opt.disabled "true"}}
|
|
39
44
|
aria-current="{{eq opt @select.highlighted}}"
|
|
40
45
|
data-option-index="{{index}}"
|
|
@@ -1,121 +1,118 @@
|
|
|
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
|
-
|
|
1
|
+
<EuiFormControlLayout
|
|
2
|
+
@icon="arrowDown"
|
|
3
|
+
@iconSide="right"
|
|
4
|
+
@fullWidth={{@fullWidth}}
|
|
5
|
+
@compressed={{@compressed}}
|
|
6
|
+
@readOnly={{@readOnly}}
|
|
7
|
+
@clear={{if
|
|
8
|
+
(and @select.selected @allowClear)
|
|
9
|
+
(fn @select.actions.select (array))
|
|
10
|
+
}}
|
|
11
|
+
@disabled={{@select.disabled}}
|
|
12
|
+
>
|
|
13
|
+
<:field>
|
|
14
|
+
{{! template-lint-disable }}
|
|
15
|
+
<ul
|
|
16
|
+
id="ember-power-select-multiple-options-{{@select.uniqueId}}"
|
|
17
|
+
class={{class-names
|
|
18
|
+
"euiComboBox__inputWrap ember-power-select-multiple-options"
|
|
19
|
+
(if @compressed "euiComboBox__inputWrap--compressed")
|
|
20
|
+
(if @fullWidth "euiComboBox__inputWrap--fullWidth")
|
|
21
|
+
(if @singleSelection "euiComboBox__inputWrap--noWrap")
|
|
22
|
+
(if @isLoading "euiComboBox__inputWrap--isLoading")
|
|
23
|
+
(if @allowClear "euiComboBox__inputWrap-isClearable")
|
|
24
|
+
}}
|
|
25
|
+
...attributes
|
|
26
|
+
{{did-update this.openChanged @select.isOpen}}
|
|
27
|
+
{{on "touchstart" this.chooseOption}}
|
|
28
|
+
{{on "mousedown" this.chooseOption}}
|
|
29
|
+
>
|
|
30
|
+
{{! template-lint-enable }}
|
|
31
|
+
{{#if
|
|
32
|
+
(or
|
|
33
|
+
(and @singleSelection (not @select.searchText)) (not @singleSelection)
|
|
34
|
+
)
|
|
35
|
+
}}
|
|
36
|
+
{{#each @select.selected as |opt idx|}}
|
|
37
|
+
{{#if @selectedItemComponent}}
|
|
38
|
+
{{component
|
|
39
|
+
@selectedItemComponent
|
|
40
|
+
extra=@extra
|
|
41
|
+
option=opt
|
|
42
|
+
select=@select
|
|
43
|
+
}}
|
|
44
|
+
{{else}}
|
|
45
|
+
<EuiComboBoxPill
|
|
46
|
+
class="ember-power-select-multiple-option
|
|
47
|
+
{{if
|
|
48
|
+
opt.disabled
|
|
49
|
+
"ember-power-select-multiple-option--disabled"
|
|
50
|
+
}}"
|
|
51
|
+
@option={{opt}}
|
|
52
|
+
@onClose={{if
|
|
53
|
+
(or @select.disabled @singleSelection)
|
|
54
|
+
false
|
|
55
|
+
(if @onClose (fn (optional @onClose) opt) true)
|
|
45
56
|
}}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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>
|
|
57
|
+
@dataSelectedIconIndex={{idx}}
|
|
58
|
+
@color={{opt.color}}
|
|
59
|
+
@asPlainText={{@singleSelection.asPlainText}}
|
|
60
|
+
>
|
|
61
|
+
{{yield opt @select}}
|
|
62
|
+
</EuiComboBoxPill>
|
|
78
63
|
{{/if}}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
>
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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 }}
|
|
64
|
+
{{else if (and @placeholder (not @searchEnabled))}}
|
|
65
|
+
<span class="ember-power-select-placeholder">
|
|
66
|
+
{{@placeholder}}
|
|
67
|
+
</span>
|
|
68
|
+
{{/each}}
|
|
69
|
+
{{/if}}
|
|
70
|
+
{{#if @searchEnabled}}
|
|
71
|
+
{{! template-lint-disable }}
|
|
72
|
+
{{#if (and this.maybePlaceholder (not @select.searchText))}}
|
|
73
|
+
<p class="euiComboBoxPlaceholder">
|
|
74
|
+
{{this.maybePlaceholder}}
|
|
75
|
+
</p>
|
|
117
76
|
{{/if}}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
77
|
+
<div
|
|
78
|
+
class="euiComboBox__input"
|
|
79
|
+
style="font-size: 14px; display: inline-block; position: relative;"
|
|
80
|
+
>
|
|
81
|
+
<input
|
|
82
|
+
tabindex="-1"
|
|
83
|
+
style="opacity: 0px; width:0px; height:0px; position: absolute; top: 40%; border:solid 1px transparent !important; margin:0px !important;"
|
|
84
|
+
class="fake-input-for-html-form-validity"
|
|
85
|
+
{{validatable-control @isInvalid}}
|
|
86
|
+
/>
|
|
87
|
+
<input
|
|
88
|
+
class="ember-power-select-trigger-multiple-input euiComboBox__input"
|
|
89
|
+
autocomplete="off"
|
|
90
|
+
autocorrect="off"
|
|
91
|
+
autocapitalize="off"
|
|
92
|
+
spellcheck={{false}}
|
|
93
|
+
id="ember-power-select-trigger-multiple-input-{{@select.uniqueId}}"
|
|
94
|
+
value={{@select.searchText}}
|
|
95
|
+
aria-controls={{@listboxId}}
|
|
96
|
+
style={{this.triggerMultipleInputStyle}}
|
|
97
|
+
disabled={{@select.disabled}}
|
|
98
|
+
tabindex={{@tabindex}}
|
|
99
|
+
form="power-select-fake-form"
|
|
100
|
+
{{on "focus" @onFocus}}
|
|
101
|
+
{{on "blur" @onBlur}}
|
|
102
|
+
{{on "input" this.handleInput}}
|
|
103
|
+
{{on "keydown" this.handleKeydown}}
|
|
104
|
+
{{did-insert this.storeInputStyles}}
|
|
105
|
+
/>
|
|
106
|
+
</div>
|
|
107
|
+
{{! template-lint-enable }}
|
|
108
|
+
{{else}}
|
|
109
|
+
{{! template-lint-disable }}
|
|
110
|
+
<div
|
|
111
|
+
class="euiComboBox__input"
|
|
112
|
+
style="font-size: 14px; display: inline-block;"
|
|
113
|
+
></div>
|
|
114
|
+
{{! template-lint-enable }}
|
|
115
|
+
{{/if}}
|
|
116
|
+
</ul>
|
|
117
|
+
</:field>
|
|
118
|
+
</EuiFormControlLayout>
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
EuiMarkdownAstNode
|
|
21
21
|
} from '../../utils/markdown/markdown-types';
|
|
22
22
|
import { Processor } from 'unified';
|
|
23
|
+
import { scheduleOnce } from '@ember/runloop';
|
|
23
24
|
|
|
24
25
|
export interface EuiMarkdownEditorArgs {
|
|
25
26
|
initialViewMode?: string;
|
|
@@ -119,7 +120,11 @@ export default class EuiMarkdownEditorComponent extends Component<EuiMarkdownEdi
|
|
|
119
120
|
const resizedTextareaHeight =
|
|
120
121
|
this.textareaRef.offsetHeight + this.editorFooterHeight;
|
|
121
122
|
|
|
122
|
-
|
|
123
|
+
const update = () => {
|
|
124
|
+
this.currentHeight = resizedTextareaHeight;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
scheduleOnce('afterRender', this, update);
|
|
123
128
|
}
|
|
124
129
|
}
|
|
125
130
|
|
|
@@ -144,7 +149,13 @@ export default class EuiMarkdownEditorComponent extends Component<EuiMarkdownEdi
|
|
|
144
149
|
// then add an extra pixel for safety and because the scrollHeight value is rounded
|
|
145
150
|
const extraHeight = borderWidth + marginWidth + 1;
|
|
146
151
|
|
|
147
|
-
|
|
152
|
+
const update = () => {
|
|
153
|
+
if (previewRef) {
|
|
154
|
+
this.currentHeight = previewRef.scrollHeight + extraHeight;
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
scheduleOnce('afterRender', this, update);
|
|
148
159
|
}
|
|
149
160
|
}
|
|
150
161
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
{{on "click" (fn this.handleMdButtonClick item.id)}}
|
|
21
21
|
@iconType={{if
|
|
22
22
|
item.iconType.component
|
|
23
|
-
(component item.iconType.component)
|
|
23
|
+
(component (ensure-safe-component item.iconType.component))
|
|
24
24
|
item.iconType
|
|
25
25
|
}}
|
|
26
26
|
@useComponent={{item.iconType.component}}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
{{! This hbs was inspired by https://github.com/ampatspell/ember-cli-remark-static/blob/v3.0.5/addon/components/remark.hbs }}
|
|
2
|
-
<
|
|
2
|
+
<EuiText
|
|
3
|
+
class="euiMarkdownFormat"
|
|
4
|
+
@color={{@color}}
|
|
5
|
+
@grow={{@grow}}
|
|
6
|
+
@size={{@textSize}}
|
|
7
|
+
@textAlign={{@textAlign}}
|
|
8
|
+
...attributes
|
|
9
|
+
>
|
|
3
10
|
{{this.result.element}}
|
|
4
11
|
{{#each this.result.components as |CompNode|}}
|
|
5
12
|
{{#in-element CompNode.element}}
|
|
6
|
-
{{#let
|
|
13
|
+
{{#let
|
|
14
|
+
(component (ensure-safe-component CompNode.componentName))
|
|
15
|
+
as |DynamicComponent|
|
|
16
|
+
}}
|
|
7
17
|
<DynamicComponent
|
|
8
18
|
@replaceNode={{optional @replaceNode}}
|
|
9
19
|
@node={{CompNode}}
|
|
@@ -11,4 +21,4 @@
|
|
|
11
21
|
{{/let}}
|
|
12
22
|
{{/in-element}}
|
|
13
23
|
{{/each}}
|
|
14
|
-
</
|
|
24
|
+
</EuiText>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-eui/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.3",
|
|
4
4
|
"description": "Ember Components for Elastic UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
"@ember/optional-features": "^2.0.0",
|
|
96
96
|
"@ember/test-helpers": "^2.6.0",
|
|
97
97
|
"@embroider/test-setup": "^1.0.0",
|
|
98
|
+
"@embroider/util": "^1.2.0",
|
|
98
99
|
"@glimmer/component": "^1.0.4",
|
|
99
100
|
"@glimmer/tracking": "^1.0.4",
|
|
100
101
|
"@types/ember": "^3.16.0",
|
|
@@ -172,5 +173,5 @@
|
|
|
172
173
|
"volta": {
|
|
173
174
|
"node": "12.22.1"
|
|
174
175
|
},
|
|
175
|
-
"gitHead": "
|
|
176
|
+
"gitHead": "ab669b60b2132395c6a6ee54b109eca7cb7497b8"
|
|
176
177
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@ember-eui/core/components/eui-text-field';
|