@ember-eui/core 4.2.0 → 4.2.4
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 +25 -0
- package/addon/components/eui-combo-box/index.hbs +2 -2
- package/addon/components/eui-combo-box/index.ts +13 -2
- package/addon/components/eui-icon/index.hbs +15 -21
- package/addon/components/eui-markdown-format/markdown-code/index.d.ts +3 -0
- package/addon/components/eui-markdown-format/markdown-code-block/index.d.ts +3 -0
- package/addon/components/eui-markdown-format/markdown-tooltip/index.d.ts +3 -0
- package/addon/components/eui-tool-tip/index.ts +13 -7
- package/addon/styles/ember-eui.css +31 -3
- package/addon/utils/markdown/plugins/markdown-add-components.ts +4 -3
- package/addon/utils/markdown/plugins/markdown-checkbox.ts +3 -2
- package/addon/utils/markdown/plugins/markdown-tooltip.ts +2 -1
- package/package.json +2 -2
- package/addon/components/eui-markdown-editor-toolbar/icons/markdown-checkmark/index.d.ts +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
### Master
|
|
4
4
|
|
|
5
|
+
### 4.2.4
|
|
6
|
+
🐛 Bug / Fixes
|
|
7
|
+
`@ember-eui/core`
|
|
8
|
+
- `<EuiIcon />` Drop wrapping svg div, add futurist css override
|
|
9
|
+
### 4.2.3
|
|
10
|
+
🐛 Bug / Fixes
|
|
11
|
+
`@ember-eui/core`
|
|
12
|
+
- Cherry pick 1.6.x fix commit hash https://github.com/prysmex/ember-eui/commit/c4b8a4a259f6b86c2be516fd7427f5e48b28cecd
|
|
13
|
+
- Use next for updating the attachTo for `<EuiToolTip />`
|
|
14
|
+
|
|
15
|
+
### 4.2.2
|
|
16
|
+
🐛 Bug / Fixes
|
|
17
|
+
`@ember-eui/core`
|
|
18
|
+
- fix typing issues
|
|
19
|
+
|
|
20
|
+
### 4.2.1
|
|
21
|
+
🐛 Bug / Fixes
|
|
22
|
+
`@ember-eui/core`
|
|
23
|
+
- fix markdown editor components
|
|
24
|
+
|
|
5
25
|
### 4.2.0
|
|
6
26
|
🚀 Enhancements
|
|
7
27
|
`@ember-eui/core`
|
|
@@ -109,6 +129,11 @@ bump @embroider 1.3.0 regenerating yarn.lock, this finally enables staticCompone
|
|
|
109
129
|
💥 Breaking change
|
|
110
130
|
`@ember-eui/core`
|
|
111
131
|
- Deprecate `ember-svg-jar` `hbs` strategy for now, just use stock `ember-svg-jar`
|
|
132
|
+
|
|
133
|
+
### 1.6.10
|
|
134
|
+
🐛 Bug / Fixes
|
|
135
|
+
`@ember-eui/core`
|
|
136
|
+
- `<EuiComboBox />` fixes to `onCreateOption`
|
|
112
137
|
### 1.6.7
|
|
113
138
|
🐛 Bug / Fixes
|
|
114
139
|
`@ember-eui/core`
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
singleSelection=@singleSelection
|
|
26
26
|
onClose=@removeTag
|
|
27
27
|
onCreateOption=(if
|
|
28
|
-
@onCreateOption
|
|
28
|
+
@onCreateOption this.onCreateOption
|
|
29
29
|
)
|
|
30
30
|
}}
|
|
31
31
|
@matcher={{@matcher}}
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
(component
|
|
76
76
|
"eui-combo-box/create-option"
|
|
77
77
|
customOptionText=@customOptionText
|
|
78
|
-
onCreateOption=
|
|
78
|
+
onCreateOption=this.onCreateOption
|
|
79
79
|
select=this.select
|
|
80
80
|
)
|
|
81
81
|
(component "eui-combo-box/no-matches-message")
|
|
@@ -7,6 +7,7 @@ import { isEqual } from '@ember/utils';
|
|
|
7
7
|
|
|
8
8
|
interface EuiComboBoxArgs {
|
|
9
9
|
singleSelection: boolean;
|
|
10
|
+
onCreateOption?: (search: string) => boolean | undefined;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
interface Select {
|
|
@@ -64,9 +65,19 @@ export default class EuiComboBoxComponent extends Component<EuiComboBoxArgs> {
|
|
|
64
65
|
|
|
65
66
|
@action
|
|
66
67
|
onCreateOption() {
|
|
67
|
-
let
|
|
68
|
+
let option;
|
|
69
|
+
if (
|
|
70
|
+
this.args.onCreateOption &&
|
|
71
|
+
typeof this.args.onCreateOption === 'function'
|
|
72
|
+
) {
|
|
73
|
+
// The `onCreateOption` function can be used to sanitize the input or explicitly return `false` to reject the input
|
|
74
|
+
option = this.args.onCreateOption(this.select.searchText);
|
|
75
|
+
if (option === false) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
let search = option || this.select.searchText;
|
|
68
80
|
this.select.actions.search('');
|
|
69
|
-
this.select.actions.select(search);
|
|
70
81
|
this.select.actions.close();
|
|
71
82
|
return search;
|
|
72
83
|
}
|
|
@@ -33,26 +33,20 @@
|
|
|
33
33
|
...attributes
|
|
34
34
|
/>
|
|
35
35
|
{{else}}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
aria-label=(if @aria-label @aria-label this.titleId)
|
|
52
|
-
aria-labelledby=(if @aria-labelledby @aria-labelledby this.titleId)
|
|
53
|
-
tabindex=this.tabIndex
|
|
54
|
-
style=this.optionalCustomStyles
|
|
55
|
-
}}
|
|
56
|
-
</div>
|
|
36
|
+
{{svg-jar
|
|
37
|
+
this.icon
|
|
38
|
+
class=(class-names
|
|
39
|
+
this.optionalColorClass
|
|
40
|
+
(if this.isAppIcon "euiIcon--app")
|
|
41
|
+
componentName="EuiIcon"
|
|
42
|
+
size=this.size
|
|
43
|
+
)
|
|
44
|
+
role="image"
|
|
45
|
+
aria-hidden=(if this.isAriaHidden "true")
|
|
46
|
+
aria-label=(if @aria-label @aria-label this.titleId)
|
|
47
|
+
aria-labelledby=(if @aria-labelledby @aria-labelledby this.titleId)
|
|
48
|
+
tabindex=this.tabIndex
|
|
49
|
+
style=this.optionalCustomStyles
|
|
50
|
+
}}
|
|
57
51
|
{{/if}}
|
|
58
52
|
{{/if}}
|
|
@@ -5,7 +5,7 @@ import { uniqueId } from '../../helpers/unique-id';
|
|
|
5
5
|
import { tracked, cached } from '@glimmer/tracking';
|
|
6
6
|
import { findPopoverPosition } from '../../utils/popover';
|
|
7
7
|
import { keys } from '../../utils/keys';
|
|
8
|
-
import { later, cancel, scheduleOnce } from '@ember/runloop';
|
|
8
|
+
import { later, cancel, scheduleOnce, next } from '@ember/runloop';
|
|
9
9
|
|
|
10
10
|
export type ToolTipPositions = 'top' | 'right' | 'bottom' | 'left';
|
|
11
11
|
|
|
@@ -113,9 +113,11 @@ export default class EuiToolTip extends Component<EuiTooltipArgs> {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
if (this.args.attachTo && this.args.attachTo !== this._attachTo) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
next(() => {
|
|
117
|
+
this.removeAttachToHandlers();
|
|
118
|
+
this._attachTo = this.args.attachTo;
|
|
119
|
+
this.setupAttachToHandlers();
|
|
120
|
+
});
|
|
119
121
|
}
|
|
120
122
|
}
|
|
121
123
|
|
|
@@ -246,13 +248,16 @@ export default class EuiToolTip extends Component<EuiTooltipArgs> {
|
|
|
246
248
|
}
|
|
247
249
|
});
|
|
248
250
|
|
|
249
|
-
const windowWidth =
|
|
251
|
+
const windowWidth =
|
|
252
|
+
document.documentElement.clientWidth || window.innerWidth;
|
|
250
253
|
const useRightValue = windowWidth / 2 < left;
|
|
251
254
|
|
|
252
255
|
const toolTipStyles: ToolTipStyles = {
|
|
253
256
|
top: `${top}px`,
|
|
254
257
|
left: useRightValue ? 'auto' : `${left}px`,
|
|
255
|
-
right: useRightValue
|
|
258
|
+
right: useRightValue
|
|
259
|
+
? `${windowWidth - left - this.popover.offsetWidth}px`
|
|
260
|
+
: 'auto'
|
|
256
261
|
};
|
|
257
262
|
|
|
258
263
|
this.visible = true;
|
|
@@ -299,7 +304,8 @@ export default class EuiToolTip extends Component<EuiTooltipArgs> {
|
|
|
299
304
|
// left the anchor for a non-child.
|
|
300
305
|
if (
|
|
301
306
|
this._anchor === event.relatedTarget ||
|
|
302
|
-
(this._anchor != null &&
|
|
307
|
+
(this._anchor != null &&
|
|
308
|
+
!this._anchor.contains(event.relatedTarget as Node))
|
|
303
309
|
) {
|
|
304
310
|
this.hideToolTip();
|
|
305
311
|
}
|
|
@@ -1,3 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/*
|
|
2
|
+
@override
|
|
3
|
+
.euiAvatar for future css
|
|
4
|
+
*/
|
|
5
|
+
.euiAvatar {
|
|
6
|
+
-webkit-flex-shrink: 0;
|
|
7
|
+
flex-shrink: 0;
|
|
8
|
+
display: -webkit-inline-flex;
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
-webkit-justify-content: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
-webkit-align-items: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
background-size: cover;
|
|
15
|
+
text-align: center;
|
|
16
|
+
vertical-align: middle;
|
|
17
|
+
overflow-x: hidden;
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.euiMarkdownEditor--fullHeight {
|
|
22
|
+
display: -webkit-flex;
|
|
23
|
+
display: flex;
|
|
24
|
+
-webkit-flex-direction: column;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
height: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.euiMarkdownEditor--isPreviewing .euiMarkdownEditor__toggleContainer {
|
|
30
|
+
display: none;
|
|
31
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { RehypeNode } from '../markdown-types';
|
|
2
|
+
import EuiMarkdownFormatMarkdownCode from '../../../components/eui-markdown-format/markdown-code';
|
|
3
|
+
import EuiMarkdownFormatMarkdownCodeBlock from '../../../components/eui-markdown-format/markdown-code-block';
|
|
2
4
|
|
|
3
5
|
type Visitor = (node: RehypeNode) => RehypeNode;
|
|
4
6
|
|
|
@@ -48,12 +50,11 @@ export default function MarkdownAddComponents(): (tree: RehypeNode) => void {
|
|
|
48
50
|
/\r|\n/.exec(child.value)
|
|
49
51
|
);
|
|
50
52
|
if (hasBreaks) {
|
|
51
|
-
node.properties.componentName =
|
|
52
|
-
'eui-markdown-format/markdown-code-block';
|
|
53
|
+
node.properties.componentName = EuiMarkdownFormatMarkdownCodeBlock;
|
|
53
54
|
node.properties.fontSize = 'm';
|
|
54
55
|
node.properties.paddingSize = 's';
|
|
55
56
|
} else {
|
|
56
|
-
node.properties.componentName =
|
|
57
|
+
node.properties.componentName = EuiMarkdownFormatMarkdownCode;
|
|
57
58
|
node.properties.inline = true;
|
|
58
59
|
}
|
|
59
60
|
}
|
|
@@ -19,10 +19,11 @@
|
|
|
19
19
|
|
|
20
20
|
import { RemarkTokenizer } from '../markdown-types';
|
|
21
21
|
import { Plugin } from 'unified';
|
|
22
|
+
import EuiMarkdownFormatMarkdownCheckbox from '../../../components/eui-markdown-format/markdown-checkbox';
|
|
22
23
|
|
|
23
24
|
interface CheckboxNodeDetails {
|
|
24
25
|
type: 'component';
|
|
25
|
-
componentName:
|
|
26
|
+
componentName: any;
|
|
26
27
|
lead: string;
|
|
27
28
|
label: string;
|
|
28
29
|
isChecked: boolean;
|
|
@@ -64,7 +65,7 @@ const CheckboxParser: Plugin = function CheckboxParser() {
|
|
|
64
65
|
|
|
65
66
|
return add({
|
|
66
67
|
type: 'component',
|
|
67
|
-
componentName:
|
|
68
|
+
componentName: EuiMarkdownFormatMarkdownCheckbox,
|
|
68
69
|
lead,
|
|
69
70
|
label: text,
|
|
70
71
|
isChecked,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RemarkTokenizer } from '../markdown-types';
|
|
2
2
|
import { Plugin } from 'unified';
|
|
3
|
+
import EuiMarkdownFormatMarkdownTooltip from '../../../components/eui-markdown-format/markdown-tooltip';
|
|
3
4
|
|
|
4
5
|
interface TooltipNodeDetails {
|
|
5
6
|
type: 'component';
|
|
@@ -95,7 +96,7 @@ const TooltipParser: Plugin = function TooltipParser() {
|
|
|
95
96
|
|
|
96
97
|
return eat(`!{tooltip[${tooltipAnchor}](${tooltipText})}`)({
|
|
97
98
|
type: 'component',
|
|
98
|
-
componentName:
|
|
99
|
+
componentName: EuiMarkdownFormatMarkdownTooltip,
|
|
99
100
|
tooltipText: tooltipText,
|
|
100
101
|
children
|
|
101
102
|
} as TooltipNodeDetails);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-eui/core",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.4",
|
|
4
4
|
"description": "Ember Components for Elastic UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -176,5 +176,5 @@
|
|
|
176
176
|
"volta": {
|
|
177
177
|
"extends": "../../package.json"
|
|
178
178
|
},
|
|
179
|
-
"gitHead": "
|
|
179
|
+
"gitHead": "129e8ad0a68528eddbb628ca3772c7297d48621c"
|
|
180
180
|
}
|