@elastic/eui 85.1.0 → 86.0.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/dist/eui_charts_theme.js +26 -2
- package/dist/eui_charts_theme.js.map +1 -1
- package/es/components/combo_box/combo_box_options_list/combo_box_title.js +1 -3
- package/es/components/datagrid/body/data_grid_body.js +7 -7
- package/es/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/es/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/es/components/datagrid/body/data_grid_cell.js +14 -13
- package/es/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
- package/es/components/datagrid/body/header/data_grid_header_cell.js +1 -1
- package/es/components/datagrid/body/header/data_grid_header_row.js +5 -5
- package/es/components/datagrid/controls/data_grid_toolbar.js +31 -26
- package/es/components/datagrid/controls/display_selector.js +1 -1
- package/es/components/datagrid/data_grid.js +7 -7
- package/es/components/datagrid/utils/in_memory.js +4 -4
- package/es/components/datagrid/utils/row_heights.js +4 -4
- package/es/components/date_picker/date_picker.js +1 -1
- package/es/components/drag_and_drop/drag_drop_context.js +1 -1
- package/es/components/drag_and_drop/draggable.js +2 -2
- package/es/components/drag_and_drop/droppable.js +1 -1
- package/es/components/drag_and_drop/index.js +3 -2
- package/es/components/header/header_section/header_section_item_button.js +94 -0
- package/es/components/highlight/highlight.js +2 -2
- package/es/components/inline_edit/inline_edit_text.js +2 -3
- package/es/components/inline_edit/inline_edit_title.js +2 -3
- package/es/components/inner_text/index.js +1 -2
- package/es/components/markdown_editor/markdown_actions.js +1 -1
- package/es/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/es/components/modal/confirm_modal.js +11 -29
- package/es/components/outside_click_detector/outside_click_detector.js +10 -11
- package/es/components/page/page_template.js +8 -8
- package/es/components/popover/wrapping_popover.js +1 -9
- package/es/components/portal/portal.js +34 -24
- package/es/components/tabs/tabs.js +25 -0
- package/es/components/timeline/timeline_item_icon.js +3 -3
- package/es/components/tour/tour_step.js +16 -12
- package/es/services/color/eui_palettes.js +7 -1
- package/es/services/color/index.js +1 -1
- package/es/services/index.js +1 -1
- package/es/services/time/timer.js +3 -5
- package/es/test/rtl/component_helpers.js +1 -1
- package/es/test/rtl/index.js +2 -1
- package/es/test/rtl/render_hook.js +23 -0
- package/eui.d.ts +1234 -748
- package/i18ntokens.json +144 -144
- package/lib/components/combo_box/combo_box_options_list/combo_box_title.js +1 -3
- package/lib/components/datagrid/body/data_grid_body.js +7 -7
- package/lib/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/lib/components/datagrid/body/data_grid_cell.js +14 -13
- package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +1 -1
- package/lib/components/datagrid/body/header/data_grid_header_row.js +5 -5
- package/lib/components/datagrid/controls/data_grid_toolbar.js +41 -38
- package/lib/components/datagrid/controls/display_selector.js +1 -1
- package/lib/components/datagrid/data_grid.js +7 -7
- package/lib/components/datagrid/utils/in_memory.js +4 -4
- package/lib/components/datagrid/utils/row_heights.js +4 -4
- package/lib/components/date_picker/date_picker.js +1 -1
- package/lib/components/drag_and_drop/drag_drop_context.js +2 -2
- package/lib/components/drag_and_drop/draggable.js +3 -3
- package/lib/components/drag_and_drop/droppable.js +2 -2
- package/lib/components/header/header_section/header_section_item_button.js +94 -0
- package/lib/components/highlight/highlight.js +2 -2
- package/lib/components/inline_edit/inline_edit_text.js +2 -3
- package/lib/components/inline_edit/inline_edit_title.js +2 -3
- package/lib/components/inner_text/index.js +1 -8
- package/lib/components/markdown_editor/markdown_actions.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/lib/components/modal/confirm_modal.js +10 -28
- package/lib/components/outside_click_detector/outside_click_detector.js +10 -11
- package/lib/components/page/page_template.js +8 -8
- package/lib/components/popover/wrapping_popover.js +1 -9
- package/lib/components/portal/portal.js +34 -24
- package/lib/components/tabs/tabs.js +25 -0
- package/lib/components/timeline/timeline_item_icon.js +6 -3
- package/lib/components/tour/tour_step.js +15 -11
- package/lib/services/color/eui_palettes.js +9 -2
- package/lib/services/color/index.js +7 -0
- package/lib/services/index.js +7 -0
- package/lib/services/time/timer.js +3 -5
- package/lib/test/rtl/component_helpers.js +1 -1
- package/lib/test/rtl/index.js +13 -1
- package/lib/test/rtl/render_hook.js +29 -0
- package/optimize/es/components/datagrid/body/data_grid_cell.js +10 -9
- package/optimize/es/components/datagrid/controls/data_grid_toolbar.js +31 -26
- package/optimize/es/components/datagrid/controls/display_selector.js +1 -1
- package/optimize/es/components/datagrid/utils/in_memory.js +2 -2
- package/optimize/es/components/datagrid/utils/row_heights.js +4 -4
- package/optimize/es/components/date_picker/date_picker.js +1 -1
- package/optimize/es/components/drag_and_drop/drag_drop_context.js +1 -1
- package/optimize/es/components/drag_and_drop/draggable.js +2 -2
- package/optimize/es/components/drag_and_drop/droppable.js +1 -1
- package/optimize/es/components/drag_and_drop/index.js +3 -2
- package/optimize/es/components/highlight/highlight.js +2 -2
- package/optimize/es/components/inline_edit/inline_edit_text.js +2 -3
- package/optimize/es/components/inline_edit/inline_edit_title.js +2 -3
- package/optimize/es/components/inner_text/index.js +1 -2
- package/optimize/es/components/markdown_editor/markdown_actions.js +1 -1
- package/optimize/es/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/optimize/es/components/modal/confirm_modal.js +11 -24
- package/optimize/es/components/outside_click_detector/outside_click_detector.js +10 -11
- package/optimize/es/components/popover/wrapping_popover.js +1 -9
- package/optimize/es/components/portal/portal.js +34 -25
- package/optimize/es/components/timeline/timeline_item_icon.js +3 -3
- package/optimize/es/components/tour/tour_step.js +16 -12
- package/optimize/es/services/color/eui_palettes.js +7 -1
- package/optimize/es/services/color/index.js +1 -1
- package/optimize/es/services/index.js +1 -1
- package/optimize/es/services/time/timer.js +3 -5
- package/optimize/es/test/rtl/component_helpers.js +1 -1
- package/optimize/es/test/rtl/index.js +2 -1
- package/optimize/es/test/rtl/render_hook.js +23 -0
- package/optimize/lib/components/datagrid/body/data_grid_cell.js +10 -9
- package/optimize/lib/components/datagrid/controls/data_grid_toolbar.js +36 -28
- package/optimize/lib/components/datagrid/controls/display_selector.js +1 -1
- package/optimize/lib/components/datagrid/utils/in_memory.js +2 -2
- package/optimize/lib/components/datagrid/utils/row_heights.js +4 -4
- package/optimize/lib/components/date_picker/date_picker.js +1 -1
- package/optimize/lib/components/drag_and_drop/drag_drop_context.js +2 -2
- package/optimize/lib/components/drag_and_drop/draggable.js +3 -3
- package/optimize/lib/components/drag_and_drop/droppable.js +2 -2
- package/optimize/lib/components/highlight/highlight.js +2 -2
- package/optimize/lib/components/inline_edit/inline_edit_text.js +2 -3
- package/optimize/lib/components/inline_edit/inline_edit_title.js +2 -3
- package/optimize/lib/components/inner_text/index.js +1 -8
- package/optimize/lib/components/markdown_editor/markdown_actions.js +1 -1
- package/optimize/lib/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/optimize/lib/components/modal/confirm_modal.js +10 -23
- package/optimize/lib/components/outside_click_detector/outside_click_detector.js +10 -11
- package/optimize/lib/components/popover/wrapping_popover.js +1 -9
- package/optimize/lib/components/portal/portal.js +34 -25
- package/optimize/lib/components/timeline/timeline_item_icon.js +6 -4
- package/optimize/lib/components/tour/tour_step.js +15 -11
- package/optimize/lib/services/color/eui_palettes.js +9 -2
- package/optimize/lib/services/color/index.js +7 -0
- package/optimize/lib/services/index.js +7 -0
- package/optimize/lib/services/time/timer.js +3 -5
- package/optimize/lib/test/rtl/component_helpers.js +1 -1
- package/optimize/lib/test/rtl/index.js +13 -1
- package/optimize/lib/test/rtl/render_hook.js +29 -0
- package/package.json +23 -16
- package/test-env/components/combo_box/combo_box_options_list/combo_box_title.js +1 -3
- package/test-env/components/datagrid/body/data_grid_body.js +7 -7
- package/test-env/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/test-env/components/datagrid/body/data_grid_cell.js +14 -13
- package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +1 -1
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +5 -5
- package/test-env/components/datagrid/controls/data_grid_toolbar.js +36 -28
- package/test-env/components/datagrid/controls/display_selector.js +1 -1
- package/test-env/components/datagrid/data_grid.js +7 -7
- package/test-env/components/datagrid/utils/in_memory.js +4 -4
- package/test-env/components/datagrid/utils/row_heights.js +4 -4
- package/test-env/components/date_picker/date_picker.js +1 -1
- package/test-env/components/drag_and_drop/drag_drop_context.js +2 -2
- package/test-env/components/drag_and_drop/draggable.js +3 -3
- package/test-env/components/drag_and_drop/droppable.js +2 -2
- package/test-env/components/header/header_section/header_section_item_button.js +94 -0
- package/test-env/components/highlight/highlight.js +2 -2
- package/test-env/components/inline_edit/inline_edit_text.js +2 -3
- package/test-env/components/inline_edit/inline_edit_title.js +2 -3
- package/test-env/components/inner_text/index.js +1 -8
- package/test-env/components/markdown_editor/markdown_actions.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/test-env/components/modal/confirm_modal.js +10 -23
- package/test-env/components/outside_click_detector/outside_click_detector.js +10 -11
- package/test-env/components/page/page_template.js +8 -8
- package/test-env/components/popover/wrapping_popover.js +1 -9
- package/test-env/components/portal/portal.js +34 -25
- package/test-env/components/tabs/tabs.js +25 -0
- package/test-env/components/timeline/timeline_item_icon.js +6 -3
- package/test-env/components/tour/tour_step.js +15 -11
- package/test-env/services/color/eui_palettes.js +9 -2
- package/test-env/services/color/index.js +7 -0
- package/test-env/services/index.js +7 -0
- package/test-env/services/time/timer.js +3 -5
- package/test-env/test/rtl/component_helpers.js +1 -1
- package/test-env/test/rtl/index.js +13 -1
- package/test-env/test/rtl/render_hook.js +29 -0
- package/es/components/inner_text/render_to_text.js +0 -47
- package/lib/components/inner_text/render_to_text.js +0 -54
- package/optimize/es/components/inner_text/render_to_text.js +0 -42
- package/optimize/lib/components/inner_text/render_to_text.js +0 -52
- package/test-env/components/inner_text/render_to_text.js +0 -52
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
@@ -36,35 +35,41 @@ export var EuiPortal = /*#__PURE__*/function (_Component) {
|
|
|
36
35
|
var _this;
|
|
37
36
|
_classCallCheck(this, EuiPortal);
|
|
38
37
|
_this = _super.call(this, props);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
var insert = _this.props.insert;
|
|
43
|
-
_this.portalNode = document.createElement('div');
|
|
44
|
-
_this.portalNode.dataset.euiportal = 'true';
|
|
45
|
-
if (insert == null) {
|
|
46
|
-
// no insertion defined, append to body
|
|
47
|
-
document.body.appendChild(_this.portalNode);
|
|
48
|
-
} else {
|
|
49
|
-
// inserting before or after an element
|
|
50
|
-
var sibling = insert.sibling,
|
|
51
|
-
position = insert.position;
|
|
52
|
-
sibling.insertAdjacentElement(insertPositions[position], _this.portalNode);
|
|
53
|
-
}
|
|
38
|
+
_this.state = {
|
|
39
|
+
portalNode: null
|
|
40
|
+
};
|
|
54
41
|
return _this;
|
|
55
42
|
}
|
|
56
43
|
_createClass(EuiPortal, [{
|
|
57
44
|
key: "componentDidMount",
|
|
58
45
|
value: function componentDidMount() {
|
|
59
|
-
this.
|
|
60
|
-
|
|
46
|
+
var insert = this.props.insert;
|
|
47
|
+
var portalNode = document.createElement('div');
|
|
48
|
+
portalNode.dataset.euiportal = 'true';
|
|
49
|
+
if (insert == null) {
|
|
50
|
+
// no insertion defined, append to body
|
|
51
|
+
document.body.appendChild(portalNode);
|
|
52
|
+
} else {
|
|
53
|
+
// inserting before or after an element
|
|
54
|
+
var sibling = insert.sibling,
|
|
55
|
+
position = insert.position;
|
|
56
|
+
sibling.insertAdjacentElement(insertPositions[position], portalNode);
|
|
57
|
+
}
|
|
58
|
+
this.setThemeColor(portalNode);
|
|
59
|
+
this.updatePortalRef(portalNode);
|
|
60
|
+
|
|
61
|
+
// Update state with portalNode to intentionally trigger component rerender
|
|
62
|
+
// and call createPortal with correct root element in render()
|
|
63
|
+
this.setState({
|
|
64
|
+
portalNode: portalNode
|
|
65
|
+
});
|
|
61
66
|
}
|
|
62
67
|
}, {
|
|
63
68
|
key: "componentWillUnmount",
|
|
64
69
|
value: function componentWillUnmount() {
|
|
65
|
-
var
|
|
66
|
-
if (
|
|
67
|
-
|
|
70
|
+
var portalNode = this.state.portalNode;
|
|
71
|
+
if (portalNode !== null && portalNode !== void 0 && portalNode.parentNode) {
|
|
72
|
+
portalNode.parentNode.removeChild(portalNode);
|
|
68
73
|
}
|
|
69
74
|
this.updatePortalRef(null);
|
|
70
75
|
}
|
|
@@ -72,13 +77,13 @@ export var EuiPortal = /*#__PURE__*/function (_Component) {
|
|
|
72
77
|
// Set the inherited color of the portal based on the wrapping EuiThemeProvider
|
|
73
78
|
}, {
|
|
74
79
|
key: "setThemeColor",
|
|
75
|
-
value: function setThemeColor() {
|
|
76
|
-
if (this.
|
|
80
|
+
value: function setThemeColor(portalNode) {
|
|
81
|
+
if (this.context) {
|
|
77
82
|
var _this$context = this.context,
|
|
78
83
|
hasDifferentColorFromGlobalTheme = _this$context.hasDifferentColorFromGlobalTheme,
|
|
79
84
|
colorClassName = _this$context.colorClassName;
|
|
80
85
|
if (hasDifferentColorFromGlobalTheme && this.props.insert == null) {
|
|
81
|
-
|
|
86
|
+
portalNode.classList.add(colorClassName);
|
|
82
87
|
}
|
|
83
88
|
}
|
|
84
89
|
}
|
|
@@ -92,7 +97,11 @@ export var EuiPortal = /*#__PURE__*/function (_Component) {
|
|
|
92
97
|
}, {
|
|
93
98
|
key: "render",
|
|
94
99
|
value: function render() {
|
|
95
|
-
|
|
100
|
+
var portalNode = this.state.portalNode;
|
|
101
|
+
if (!portalNode) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
return /*#__PURE__*/createPortal(this.props.children, portalNode);
|
|
96
105
|
}
|
|
97
106
|
}]);
|
|
98
107
|
return EuiPortal;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import React from 'react';
|
|
9
|
+
import React, { isValidElement } from 'react';
|
|
10
10
|
import { EuiAvatar } from '../avatar';
|
|
11
11
|
import { useEuiTheme } from '../../services';
|
|
12
12
|
import { euiTimelineItemIconStyles } from './timeline_item_icon.styles';
|
|
@@ -21,11 +21,11 @@ export var EuiTimelineItemIcon = function EuiTimelineItemIcon(_ref) {
|
|
|
21
21
|
var cssStyles = [styles.euiTimelineItemIcon, styles[verticalAlign]];
|
|
22
22
|
var cssContentStyles = styles.euiTimelineItemIcon__content;
|
|
23
23
|
var ariaLabel = iconAriaLabel ? iconAriaLabel : '';
|
|
24
|
-
var iconRender =
|
|
24
|
+
var iconRender = /*#__PURE__*/isValidElement(icon) ? icon : ___EmotionJSX(EuiAvatar, {
|
|
25
25
|
color: "subdued",
|
|
26
26
|
name: ariaLabel,
|
|
27
27
|
iconType: icon
|
|
28
|
-
})
|
|
28
|
+
});
|
|
29
29
|
return ___EmotionJSX("div", {
|
|
30
30
|
css: cssStyles
|
|
31
31
|
}, ___EmotionJSX("div", {
|
|
@@ -14,7 +14,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
14
14
|
* Side Public License, v 1.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import React, { useEffect,
|
|
17
|
+
import React, { useEffect, useState } from 'react';
|
|
18
18
|
import classNames from 'classnames';
|
|
19
19
|
import { EuiBeacon } from '../beacon';
|
|
20
20
|
import { EuiButtonEmpty } from '../button';
|
|
@@ -58,12 +58,10 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
58
58
|
if (step === 0) {
|
|
59
59
|
console.warn('EuiTourStep `step` should 1-based indexing. Please update to eliminate 0 indexes.');
|
|
60
60
|
}
|
|
61
|
-
var _useState = useState(
|
|
61
|
+
var _useState = useState(null),
|
|
62
62
|
_useState2 = _slicedToArray(_useState, 2),
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
var animationFrameId = useRef();
|
|
66
|
-
var anchorNode = useRef(null);
|
|
63
|
+
anchorNode = _useState2[0],
|
|
64
|
+
setAnchorNode = _useState2[1];
|
|
67
65
|
var _useState3 = useState(),
|
|
68
66
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
69
67
|
popoverPosition = _useState4[0],
|
|
@@ -72,14 +70,20 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
72
70
|
setPopoverPosition(position);
|
|
73
71
|
};
|
|
74
72
|
useEffect(function () {
|
|
73
|
+
var timeout;
|
|
75
74
|
if (anchor) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
// Wait until next tick to find anchor node in case it's not already
|
|
76
|
+
// in DOM requestAnimationFrame isn't used here because we don't need to
|
|
77
|
+
// synchronize with repainting ticks and the updated value still
|
|
78
|
+
// needs to go through a react DOM rerender which may take more than
|
|
79
|
+
// 1 frame (16ms) of time.
|
|
80
|
+
// TODO: It would be ideal to have some kind of intersection observer here instead
|
|
81
|
+
timeout = window.setTimeout(function () {
|
|
82
|
+
setAnchorNode(findElementBySelectorOrRef(anchor));
|
|
79
83
|
});
|
|
80
84
|
}
|
|
81
85
|
return function () {
|
|
82
|
-
|
|
86
|
+
timeout && window.clearTimeout(timeout);
|
|
83
87
|
};
|
|
84
88
|
}, [anchor]);
|
|
85
89
|
var classes = classNames('euiTour', className);
|
|
@@ -191,7 +195,7 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
191
195
|
button: children
|
|
192
196
|
}, popoverProps), layout);
|
|
193
197
|
}
|
|
194
|
-
return
|
|
195
|
-
button: anchorNode
|
|
198
|
+
return anchorNode ? ___EmotionJSX(EuiWrappingPopover, _extends({
|
|
199
|
+
button: anchorNode
|
|
196
200
|
}, popoverProps), layout) : null;
|
|
197
201
|
};
|
|
@@ -142,12 +142,18 @@ export var euiPaletteForTemperature = function euiPaletteForTemperature(steps) {
|
|
|
142
142
|
}
|
|
143
143
|
return euiPalette([].concat(_toConsumableArray(cools), _toConsumableArray(warms)), steps, true);
|
|
144
144
|
};
|
|
145
|
-
export var
|
|
145
|
+
export var euiPaletteComplementary = function euiPaletteComplementary(steps) {
|
|
146
146
|
if (steps === 1) {
|
|
147
147
|
return [euiPaletteColorBlind()[1]];
|
|
148
148
|
}
|
|
149
149
|
return euiPalette([euiPaletteColorBlind()[1], euiPaletteColorBlind()[7]], steps, true);
|
|
150
150
|
};
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* The old typo'd name for this palette remains exported until the end of its deprecation period
|
|
154
|
+
* @deprecated Use euiPaletteComplementary instead
|
|
155
|
+
*/
|
|
156
|
+
export var euiPaletteComplimentary = euiPaletteComplementary;
|
|
151
157
|
export var euiPaletteNegative = function euiPaletteNegative(steps) {
|
|
152
158
|
if (steps === 1) {
|
|
153
159
|
return [lightNegativeColor];
|
|
@@ -17,7 +17,7 @@ export { rgbToHsv } from './rgb_to_hsv';
|
|
|
17
17
|
export { calculateContrast, calculateLuminance } from './luminance_and_contrast';
|
|
18
18
|
export { VISUALIZATION_COLORS, DEFAULT_VISUALIZATION_COLOR } from './visualization_colors';
|
|
19
19
|
export { colorPalette } from './color_palette';
|
|
20
|
-
export { euiPaletteForLightBackground, euiPaletteForDarkBackground, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteComplimentary, euiPaletteNegative, euiPalettePositive, euiPaletteCool, euiPaletteWarm, euiPaletteGray } from './eui_palettes';
|
|
20
|
+
export { euiPaletteForLightBackground, euiPaletteForDarkBackground, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteComplimentary, euiPaletteComplementary, euiPaletteNegative, euiPalettePositive, euiPaletteCool, euiPaletteWarm, euiPaletteGray } from './eui_palettes';
|
|
21
21
|
export { getSteppedGradient } from './stepped_gradient';
|
|
22
22
|
export * from './manipulation';
|
|
23
23
|
export * from './contrast';
|
|
@@ -11,7 +11,7 @@ import * as keys from './keys';
|
|
|
11
11
|
export { accessibleClickKeys, cascadingMenuKeys, comboBoxKeys, htmlIdGenerator, useGeneratedHtmlId } from './accessibility';
|
|
12
12
|
export { CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT } from './alignment';
|
|
13
13
|
export { CurrentEuiBreakpointContext, CurrentEuiBreakpointProvider, useCurrentEuiBreakpoint, useIsWithinBreakpoints, useIsWithinMaxBreakpoint, useIsWithinMinBreakpoint } from './breakpoint';
|
|
14
|
-
export { brighten, calculateContrast, calculateLuminance, colorPalette, darken, DEFAULT_VISUALIZATION_COLOR, desaturate, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteComplimentary, euiPaletteCool, euiPaletteForDarkBackground, euiPaletteForLightBackground, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteGray, euiPaletteNegative, euiPalettePositive, euiPaletteWarm, getSteppedGradient, hexToHsv, hexToRgb, hsvToHex, hsvToRgb, isColorDark, isValidHex, lightness, makeDisabledContrastColor, makeHighContrastColor, rgbToHex, rgbToHsv, saturate, shade, shadeOrTint, tint, tintOrShade, transparentize, VISUALIZATION_COLORS, wcagContrastMin } from './color';
|
|
14
|
+
export { brighten, calculateContrast, calculateLuminance, colorPalette, darken, DEFAULT_VISUALIZATION_COLOR, desaturate, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteComplimentary, euiPaletteComplementary, euiPaletteCool, euiPaletteForDarkBackground, euiPaletteForLightBackground, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteGray, euiPaletteNegative, euiPalettePositive, euiPaletteWarm, getSteppedGradient, hexToHsv, hexToRgb, hsvToHex, hsvToRgb, isColorDark, isValidHex, lightness, makeDisabledContrastColor, makeHighContrastColor, rgbToHex, rgbToHsv, saturate, shade, shadeOrTint, tint, tintOrShade, transparentize, VISUALIZATION_COLORS, wcagContrastMin } from './color';
|
|
15
15
|
export { useColorPickerState, useColorStopsState } from './color_picker';
|
|
16
16
|
export * from './console';
|
|
17
17
|
export { copyToClipboard } from './copy_to_clipboard';
|
|
@@ -9,13 +9,11 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
9
9
|
* Side Public License, v 1.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
export var Timer = /*#__PURE__*/_createClass(
|
|
13
|
-
// In a browser this is a number, but in node it's a NodeJS.Time (a
|
|
14
|
-
// class). We don't care about this difference.
|
|
15
|
-
|
|
16
|
-
function Timer(callback, timeMs) {
|
|
12
|
+
export var Timer = /*#__PURE__*/_createClass(function Timer(callback, timeMs) {
|
|
17
13
|
var _this = this;
|
|
18
14
|
_classCallCheck(this, Timer);
|
|
15
|
+
// In a browser this is a number, but in node it's a NodeJS.Time (a
|
|
16
|
+
// class). We don't care about this difference.
|
|
19
17
|
_defineProperty(this, "id", void 0);
|
|
20
18
|
_defineProperty(this, "callback", void 0);
|
|
21
19
|
_defineProperty(this, "finishTime", void 0);
|
|
@@ -74,7 +74,7 @@ export var waitForEuiToolTipVisible = /*#__PURE__*/function () {
|
|
|
74
74
|
var tooltip = document.querySelector('.euiToolTipPopover');
|
|
75
75
|
expect(tooltip).toBeVisible();
|
|
76
76
|
}, {
|
|
77
|
-
timeout:
|
|
77
|
+
timeout: 3000
|
|
78
78
|
} // Account for long delay on tooltips
|
|
79
79
|
);
|
|
80
80
|
case 2:
|
|
@@ -8,4 +8,5 @@
|
|
|
8
8
|
|
|
9
9
|
export * from './component_helpers';
|
|
10
10
|
export { queryByTestSubject, queryAllByTestSubject, getByTestSubject, getAllByTestSubject, findAllByTestSubject, findByTestSubject } from './data_test_subj_queries';
|
|
11
|
-
export { render, screen, within } from './custom_render';
|
|
11
|
+
export { render, screen, within } from './custom_render';
|
|
12
|
+
export * from './render_hook';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
10
|
+
|
|
11
|
+
var renderHook;
|
|
12
|
+
var renderHookAct;
|
|
13
|
+
if (process.env.REACT_VERSION === '18') {
|
|
14
|
+
renderHook = require('@testing-library/react').renderHook;
|
|
15
|
+
renderHookAct = require('@testing-library/react').act;
|
|
16
|
+
} else {
|
|
17
|
+
renderHook = require('@testing-library/react-hooks').renderHook;
|
|
18
|
+
renderHookAct = require('@testing-library/react-hooks').act;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* eslint-enable @typescript-eslint/no-var-requires */
|
|
22
|
+
|
|
23
|
+
export { renderHook, renderHookAct };
|
|
@@ -323,15 +323,7 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
|
|
|
323
323
|
}
|
|
324
324
|
});
|
|
325
325
|
return _this;
|
|
326
|
-
}
|
|
327
|
-
// the parent grid owns which cell is focused,
|
|
328
|
-
// but individual cells need to react to changes and also report that
|
|
329
|
-
// they are focused in response to user actions like clicking on the cell
|
|
330
|
-
// to avoid focus trap fighting, cells wait a tick after being clicked to allow
|
|
331
|
-
// any existing traps to disconnect before the cell reports the new focus state to the parent grid
|
|
332
|
-
// but because of this small delay, multiple cells could queue up focus and
|
|
333
|
-
// create an infinite loop as the cells activate->deactivate->...
|
|
334
|
-
// so we track the last timeout id and clear that request if superseded
|
|
326
|
+
}
|
|
335
327
|
(0, _createClass2.default)(EuiDataGridCell, [{
|
|
336
328
|
key: "componentDidMount",
|
|
337
329
|
value: function componentDidMount() {
|
|
@@ -635,5 +627,14 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
|
|
|
635
627
|
return EuiDataGridCell;
|
|
636
628
|
}(_react.Component);
|
|
637
629
|
exports.EuiDataGridCell = EuiDataGridCell;
|
|
630
|
+
// focus tracking is split between the entire grid & individual cells,
|
|
631
|
+
// the parent grid owns which cell is focused,
|
|
632
|
+
// but individual cells need to react to changes and also report that
|
|
633
|
+
// they are focused in response to user actions like clicking on the cell
|
|
634
|
+
// to avoid focus trap fighting, cells wait a tick after being clicked to allow
|
|
635
|
+
// any existing traps to disconnect before the cell reports the new focus state to the parent grid
|
|
636
|
+
// but because of this small delay, multiple cells could queue up focus and
|
|
637
|
+
// create an infinite loop as the cells activate->deactivate->...
|
|
638
|
+
// so we track the last timeout id and clear that request if superseded
|
|
638
639
|
(0, _defineProperty2.default)(EuiDataGridCell, "activeFocusTimeoutId", undefined);
|
|
639
640
|
(0, _defineProperty2.default)(EuiDataGridCell, "contextType", _focus.DataGridFocusContext);
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.EuiDataGridToolbar = void 0;
|
|
8
9
|
exports.checkOrDefaultToolBarDisplayOptions = checkOrDefaultToolBarDisplayOptions;
|
|
9
10
|
exports.getNestedObjectOptions = getNestedObjectOptions;
|
|
10
|
-
exports.renderAdditionalControls =
|
|
11
|
-
var
|
|
11
|
+
exports.renderAdditionalControls = void 0;
|
|
12
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
14
|
var _accessibility = require("../../accessibility");
|
|
13
15
|
var _utils = require("../../../utils");
|
|
14
16
|
var _react2 = require("@emotion/react");
|
|
17
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
19
|
/*
|
|
16
20
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
17
21
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -68,50 +72,54 @@ function checkOrDefaultToolBarDisplayOptions(arg, option) {
|
|
|
68
72
|
return true;
|
|
69
73
|
}
|
|
70
74
|
}
|
|
71
|
-
function renderAdditionalControls(toolbarVisibility, position) {
|
|
72
|
-
var _additionalControlsOb;
|
|
75
|
+
var renderAdditionalControls = function renderAdditionalControls(toolbarVisibility, position) {
|
|
73
76
|
if (typeof toolbarVisibility === 'boolean') return null;
|
|
74
77
|
var _ref2 = toolbarVisibility || {},
|
|
75
78
|
additionalControls = _ref2.additionalControls;
|
|
76
79
|
if (!additionalControls) return null;
|
|
77
80
|
|
|
78
|
-
//
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
// API backwards compatability: if the consumer passed a single ReactNode
|
|
82
|
+
// to `additionalControls`, default to the left append position.
|
|
83
|
+
if ( /*#__PURE__*/(0, _react.isValidElement)(additionalControls) && position === 'left.append') {
|
|
84
|
+
return additionalControls;
|
|
85
|
+
}
|
|
86
|
+
if ((0, _typeof2.default)(additionalControls) !== 'object') {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
var handleLeftObjectConfig = function handleLeftObjectConfig(leftConfig) {
|
|
90
|
+
if (position === 'left.prepend') {
|
|
91
|
+
return leftConfig.prepend;
|
|
85
92
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return leftPositionObj.prepend;
|
|
93
|
+
if (position === 'left.append') {
|
|
94
|
+
return leftConfig.append;
|
|
89
95
|
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
96
|
+
};
|
|
97
|
+
var handleObjectConfig = function handleObjectConfig(additionalControls) {
|
|
98
|
+
if (position === 'right') {
|
|
99
|
+
return additionalControls.right;
|
|
93
100
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
101
|
+
// API backwards compatability: If the consumer passed a single ReactNode
|
|
102
|
+
// to `additionalControls.left`, default to the left append position
|
|
103
|
+
if ( /*#__PURE__*/(0, _react.isValidElement)(additionalControls.left) && position === 'left.append') {
|
|
104
|
+
return additionalControls.left;
|
|
97
105
|
}
|
|
98
|
-
if (
|
|
99
|
-
|
|
100
|
-
return additionalControls;
|
|
106
|
+
if (additionalControls.left && (0, _typeof2.default)(additionalControls.left) === 'object') {
|
|
107
|
+
return handleLeftObjectConfig(additionalControls.left);
|
|
101
108
|
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
109
|
+
};
|
|
110
|
+
var rendered = handleObjectConfig(additionalControls);
|
|
111
|
+
return rendered || null;
|
|
112
|
+
};
|
|
105
113
|
|
|
106
114
|
/**
|
|
107
115
|
* Utility helper for selectors/controls that allow nested options
|
|
108
116
|
* (e.g. column selector, display selector)
|
|
109
117
|
*/
|
|
110
|
-
|
|
118
|
+
exports.renderAdditionalControls = renderAdditionalControls;
|
|
111
119
|
function getNestedObjectOptions(controlOption, objectKey) {
|
|
112
120
|
var _controlOption$object;
|
|
113
121
|
// If the config is a boolean, nested options follow that boolean
|
|
114
|
-
if (
|
|
122
|
+
if (typeof controlOption === 'boolean') return controlOption;
|
|
115
123
|
// If config is not defined, default to enabled
|
|
116
124
|
if (controlOption == null) return true;
|
|
117
125
|
// Otherwise, type should be an object of boolean values - dive into it and return the value
|
|
@@ -133,7 +133,7 @@ var useDataGridDisplaySelector = function useDataGridDisplaySelector(showDisplay
|
|
|
133
133
|
setUserRowHeightsOptions(rowHeightsOptions);
|
|
134
134
|
}, [lineCount]);
|
|
135
135
|
var setLineCountHeight = (0, _react.useCallback)(function (event) {
|
|
136
|
-
var newLineCount = Number(event.
|
|
136
|
+
var newLineCount = Number(event.currentTarget.value);
|
|
137
137
|
if (newLineCount < 1) return; // Don't let users set a 0 or negative line count
|
|
138
138
|
|
|
139
139
|
setLineCount(newLineCount);
|
|
@@ -153,9 +153,9 @@ var EuiDataGridInMemoryRenderer = function EuiDataGridInMemoryRenderer(_ref) {
|
|
|
153
153
|
var cellDivs = documentFragment.childNodes[0].childNodes;
|
|
154
154
|
for (var i = 0; i < cellDivs.length; i++) {
|
|
155
155
|
var cellDiv = cellDivs[i];
|
|
156
|
-
var
|
|
156
|
+
var rowIndex = parseInt(cellDiv.getAttribute('data-dg-row'), 10);
|
|
157
157
|
var column = cellDiv.getAttribute('data-dg-column');
|
|
158
|
-
onCellRender(
|
|
158
|
+
onCellRender(rowIndex, column, getElementText(cellDiv));
|
|
159
159
|
}
|
|
160
160
|
// changes to documentFragment.children is reflected by `cells`
|
|
161
161
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -204,15 +204,15 @@ var RowHeightVirtualizationUtils = /*#__PURE__*/function (_RowHeightUtils) {
|
|
|
204
204
|
var _this2;
|
|
205
205
|
(0, _classCallCheck2.default)(this, RowHeightVirtualizationUtils);
|
|
206
206
|
_this2 = _super.call(this);
|
|
207
|
-
_this2.gridRef = gridRef;
|
|
208
|
-
_this2.outerGridElementRef = outerGridElementRef;
|
|
209
|
-
_this2.gridItemsRenderedRef = gridItemsRenderedRef;
|
|
210
|
-
_this2.rerenderGridBodyRef = rerenderGridBodyRef;
|
|
211
207
|
/**
|
|
212
208
|
* Virtualization workarounds for auto height rows
|
|
213
209
|
*/
|
|
214
210
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "timerId", void 0);
|
|
215
211
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "lastUpdatedRow", Infinity);
|
|
212
|
+
_this2.gridRef = gridRef;
|
|
213
|
+
_this2.outerGridElementRef = outerGridElementRef;
|
|
214
|
+
_this2.gridItemsRenderedRef = gridItemsRenderedRef;
|
|
215
|
+
_this2.rerenderGridBodyRef = rerenderGridBodyRef;
|
|
216
216
|
return _this2;
|
|
217
217
|
}
|
|
218
218
|
(0, _createClass2.default)(RowHeightVirtualizationUtils, [{
|
|
@@ -145,7 +145,7 @@ var EuiDatePicker = function EuiDatePicker(_ref) {
|
|
|
145
145
|
inputValidityRef = _useState2[0],
|
|
146
146
|
_setInputValidityRef = _useState2[1];
|
|
147
147
|
var setInputValidityRef = (0, _react.useCallback)(function (ref) {
|
|
148
|
-
_setInputValidityRef(ref === null || ref === void 0 ? void 0 : ref.input);
|
|
148
|
+
_setInputValidityRef((ref === null || ref === void 0 ? void 0 : ref.input) || null);
|
|
149
149
|
}, []);
|
|
150
150
|
(0, _form.useEuiValidatableControl)({
|
|
151
151
|
isInvalid: isInvalid,
|
|
@@ -10,7 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
var
|
|
13
|
+
var _dnd = require("@hello-pangea/dnd");
|
|
14
14
|
var _react2 = require("@emotion/react");
|
|
15
15
|
var _excluded = ["onBeforeDragStart", "onDragStart", "onDragUpdate", "onDragEnd", "children"];
|
|
16
16
|
/*
|
|
@@ -50,7 +50,7 @@ var EuiDragDropContext = function EuiDragDropContext(_ref) {
|
|
|
50
50
|
onDragEnd(result, provided);
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
return (0, _react2.jsx)(
|
|
53
|
+
return (0, _react2.jsx)(_dnd.DragDropContext, (0, _extends2.default)({
|
|
54
54
|
onBeforeDragStart: onBeforeDragStart,
|
|
55
55
|
onDragStart: euiOnDragStart,
|
|
56
56
|
onDragUpdate: onDragUpdate,
|
|
@@ -10,7 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
var
|
|
13
|
+
var _dnd = require("@hello-pangea/dnd");
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
15
|
var _droppable = require("./droppable");
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
@@ -53,7 +53,7 @@ var EuiDraggable = function EuiDraggable(_ref) {
|
|
|
53
53
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
54
54
|
var _useContext = (0, _react.useContext)(_droppable.EuiDroppableContext),
|
|
55
55
|
cloneItems = _useContext.cloneItems;
|
|
56
|
-
return (0, _react2.jsx)(
|
|
56
|
+
return (0, _react2.jsx)(_dnd.Draggable, (0, _extends2.default)({
|
|
57
57
|
draggableId: draggableId,
|
|
58
58
|
index: index,
|
|
59
59
|
isDragDisabled: isDragDisabled
|
|
@@ -71,7 +71,7 @@ var EuiDraggable = function EuiDraggable(_ref) {
|
|
|
71
71
|
'euiDraggable__item--isDragging': snapshot.isDragging,
|
|
72
72
|
'euiDraggable__item--isDropAnimating': snapshot.isDropAnimating
|
|
73
73
|
});
|
|
74
|
-
var DraggableElement = typeof children === 'function' ? children(provided, snapshot, rubric) : children;
|
|
74
|
+
var DraggableElement = typeof children === 'function' ? children(provided, snapshot, rubric) : children;
|
|
75
75
|
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", (0, _extends2.default)({}, provided.draggableProps, !customDragHandle ? provided.dragHandleProps : {}, {
|
|
76
76
|
ref: provided.innerRef,
|
|
77
77
|
"data-test-subj": dataTestSubj,
|
|
@@ -9,7 +9,7 @@ exports.EuiDroppableContext = exports.EuiDroppable = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var
|
|
12
|
+
var _dnd = require("@hello-pangea/dnd");
|
|
13
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
14
|
var _drag_drop_context = require("./drag_drop_context");
|
|
15
15
|
var _react2 = require("@emotion/react");
|
|
@@ -57,7 +57,7 @@ var EuiDroppable = function EuiDroppable(_ref) {
|
|
|
57
57
|
var _useContext = (0, _react.useContext)(_drag_drop_context.EuiDragDropContextContext),
|
|
58
58
|
isDraggingType = _useContext.isDraggingType;
|
|
59
59
|
var dropIsDisabled = cloneDraggables ? true : isDropDisabled;
|
|
60
|
-
return (0, _react2.jsx)(
|
|
60
|
+
return (0, _react2.jsx)(_dnd.Droppable, (0, _extends2.default)({
|
|
61
61
|
isDropDisabled: dropIsDisabled,
|
|
62
62
|
droppableId: droppableId,
|
|
63
63
|
direction: direction,
|
|
@@ -53,9 +53,9 @@ var highlight = function highlight(searchSubject, searchValue, isStrict, highlig
|
|
|
53
53
|
var preMatch = searchSubject.substring(0, indexOfMatch);
|
|
54
54
|
var match = searchSubject.substring(indexOfMatch, indexOfMatch + searchValue.length);
|
|
55
55
|
var postMatch = searchSubject.substring(indexOfMatch + searchValue.length);
|
|
56
|
-
return (0, _react2.jsx)(_react.Fragment, null, preMatch, (0, _react2.jsx)(_mark.EuiMark, {
|
|
56
|
+
return (0, _react2.jsx)(_react.Fragment, null, preMatch || undefined, (0, _react2.jsx)(_mark.EuiMark, {
|
|
57
57
|
hasScreenReaderHelpText: hasScreenReaderHelpText
|
|
58
|
-
}, match), postMatch);
|
|
58
|
+
}, match), postMatch || undefined);
|
|
59
59
|
};
|
|
60
60
|
var getHightlightWords = function getHightlightWords(searchSubject, searchValue, isStrict) {
|
|
61
61
|
var regex = new RegExp(searchValue, isStrict ? 'g' : 'gi');
|
|
@@ -16,7 +16,7 @@ var _inline_edit_form = require("./inline_edit_form");
|
|
|
16
16
|
var _services = require("../../services");
|
|
17
17
|
var _inline_edit_text = require("./inline_edit_text.styles");
|
|
18
18
|
var _react2 = require("@emotion/react");
|
|
19
|
-
var _excluded = ["
|
|
19
|
+
var _excluded = ["className", "size", "defaultValue", "placeholder", "inputAriaLabel", "startWithEditOpen", "readModeProps", "editModeProps", "isLoading", "isInvalid", "isReadOnly"];
|
|
20
20
|
/*
|
|
21
21
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
22
22
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -29,8 +29,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
29
29
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
30
30
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
31
|
var EuiInlineEditText = function EuiInlineEditText(_ref) {
|
|
32
|
-
var
|
|
33
|
-
className = _ref.className,
|
|
32
|
+
var className = _ref.className,
|
|
34
33
|
_ref$size = _ref.size,
|
|
35
34
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
36
35
|
defaultValue = _ref.defaultValue,
|
|
@@ -16,7 +16,7 @@ var _inline_edit_form = require("./inline_edit_form");
|
|
|
16
16
|
var _services = require("../../services");
|
|
17
17
|
var _inline_edit_title = require("./inline_edit_title.styles");
|
|
18
18
|
var _react2 = require("@emotion/react");
|
|
19
|
-
var _excluded = ["
|
|
19
|
+
var _excluded = ["className", "size", "heading", "defaultValue", "placeholder", "inputAriaLabel", "startWithEditOpen", "readModeProps", "editModeProps", "isLoading", "isInvalid", "isReadOnly"];
|
|
20
20
|
/*
|
|
21
21
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
22
22
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -31,8 +31,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
31
31
|
var HEADINGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'span'];
|
|
32
32
|
exports.HEADINGS = HEADINGS;
|
|
33
33
|
var EuiInlineEditTitle = function EuiInlineEditTitle(_ref) {
|
|
34
|
-
var
|
|
35
|
-
className = _ref.className,
|
|
34
|
+
var className = _ref.className,
|
|
36
35
|
_ref$size = _ref.size,
|
|
37
36
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
38
37
|
heading = _ref.heading,
|
|
@@ -15,11 +15,4 @@ Object.defineProperty(exports, "useInnerText", {
|
|
|
15
15
|
return _inner_text.useInnerText;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _render_to_text.useRenderToText;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
var _inner_text = require("./inner_text");
|
|
25
|
-
var _render_to_text = require("./render_to_text");
|
|
18
|
+
var _inner_text = require("./inner_text");
|
|
@@ -51,8 +51,8 @@ SOFTWARE.
|
|
|
51
51
|
var MarkdownActions = /*#__PURE__*/function () {
|
|
52
52
|
function MarkdownActions(editorID, uiPlugins) {
|
|
53
53
|
(0, _classCallCheck2.default)(this, MarkdownActions);
|
|
54
|
-
this.editorID = editorID;
|
|
55
54
|
(0, _defineProperty2.default)(this, "styles", void 0);
|
|
55
|
+
this.editorID = editorID;
|
|
56
56
|
/**
|
|
57
57
|
* This object is in the format:
|
|
58
58
|
* [nameOfAction]: {[styles to apply]}
|