@elastic/eui 116.3.1 → 116.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/es/components/banner/banner.js +1 -2
- package/es/components/banner/banner.styles.js +1 -1
- package/es/components/basic_table/basic_table.js +35 -5
- package/es/components/basic_table/basic_table.styles.js +19 -1
- package/es/components/basic_table/in_memory_table.js +17 -0
- package/es/components/basic_table/index.js +2 -1
- package/es/components/basic_table/pagination_bar.js +19 -4
- package/es/components/basic_table/pagination_bar.styles.js +21 -0
- package/es/components/basic_table/panel.styles.js +14 -0
- package/es/components/basic_table/use_panel_props.js +28 -0
- package/es/components/date_picker/auto_refresh/refresh_interval.js +176 -229
- package/es/components/flyout/flyout.component.js +10 -6
- package/es/components/flyout/flyout_menu.js +122 -19
- package/es/components/flyout/flyout_menu.styles.js +2 -1
- package/es/components/flyout/manager/actions.js +20 -0
- package/es/components/flyout/manager/flyout_child.js +23 -1
- package/es/components/flyout/manager/flyout_managed.js +65 -19
- package/es/components/flyout/manager/hooks.js +1 -1
- package/es/components/flyout/manager/index.js +2 -2
- package/es/components/flyout/manager/reducer.js +32 -8
- package/es/components/flyout/manager/selectors.js +8 -2
- package/es/components/flyout/manager/store.js +35 -2
- package/es/components/flyout/use_flyout_menu.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout_icons.js +95 -143
- package/es/components/notification_icon/assets/info_fill.js +34 -0
- package/es/components/notification_icon/assets/warning_static.js +40 -0
- package/es/components/notification_icon/notification_icon.js +87 -0
- package/es/components/notification_icon/notification_icon.styles.js +22 -0
- package/es/components/table/mobile/table_sort_mobile.js +64 -103
- package/es/components/toast/global_toast_list.js +132 -6
- package/es/components/toast/global_toast_list.styles.js +31 -7
- package/es/components/toast/toast.js +242 -47
- package/es/components/toast/toast.styles.js +35 -47
- package/es/components/toast/toast_action.js +34 -0
- package/es/components/toast/types.js +9 -0
- package/es/components/tool_tip/tool_tip.js +3 -3
- package/eui.d.ts +1203 -971
- package/i18ntokens.json +1582 -1546
- package/lib/components/banner/banner.js +1 -2
- package/lib/components/banner/banner.styles.js +1 -1
- package/lib/components/basic_table/basic_table.js +34 -4
- package/lib/components/basic_table/basic_table.styles.js +19 -1
- package/lib/components/basic_table/in_memory_table.js +17 -0
- package/lib/components/basic_table/index.js +8 -1
- package/lib/components/basic_table/pagination_bar.js +19 -4
- package/lib/components/basic_table/pagination_bar.styles.js +26 -0
- package/lib/components/basic_table/panel.styles.js +20 -0
- package/lib/components/basic_table/use_panel_props.js +33 -0
- package/lib/components/date_picker/auto_refresh/refresh_interval.js +175 -229
- package/lib/components/flyout/flyout.component.js +10 -6
- package/lib/components/flyout/flyout_menu.js +120 -19
- package/lib/components/flyout/flyout_menu.styles.js +2 -1
- package/lib/components/flyout/manager/actions.js +21 -1
- package/lib/components/flyout/manager/flyout_child.js +23 -1
- package/lib/components/flyout/manager/flyout_managed.js +41 -17
- package/lib/components/flyout/manager/hooks.js +6 -0
- package/lib/components/flyout/manager/index.js +12 -0
- package/lib/components/flyout/manager/reducer.js +31 -7
- package/lib/components/flyout/manager/selectors.js +9 -3
- package/lib/components/flyout/manager/store.js +34 -1
- package/lib/components/flyout/use_flyout_menu.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout_icons.js +95 -145
- package/lib/components/notification_icon/assets/info_fill.js +41 -0
- package/lib/components/notification_icon/assets/warning_static.js +47 -0
- package/lib/components/notification_icon/notification_icon.js +93 -0
- package/lib/components/notification_icon/notification_icon.styles.js +28 -0
- package/lib/components/notification_icon/svgs/info_fill.svg +3 -0
- package/lib/components/notification_icon/svgs/warning_static.svg +5 -0
- package/lib/components/table/mobile/table_sort_mobile.js +71 -108
- package/lib/components/toast/global_toast_list.js +132 -6
- package/lib/components/toast/global_toast_list.styles.js +31 -8
- package/lib/components/toast/toast.js +244 -47
- package/lib/components/toast/toast.styles.js +32 -45
- package/lib/components/toast/toast_action.js +40 -0
- package/lib/components/toast/types.js +15 -0
- package/lib/components/tool_tip/tool_tip.js +2 -2
- package/optimize/es/components/banner/banner.js +1 -2
- package/optimize/es/components/banner/banner.styles.js +1 -1
- package/optimize/es/components/basic_table/basic_table.js +18 -5
- package/optimize/es/components/basic_table/basic_table.styles.js +19 -1
- package/optimize/es/components/basic_table/index.js +2 -1
- package/optimize/es/components/basic_table/pagination_bar.js +19 -4
- package/optimize/es/components/basic_table/pagination_bar.styles.js +21 -0
- package/optimize/es/components/basic_table/panel.styles.js +14 -0
- package/optimize/es/components/basic_table/use_panel_props.js +28 -0
- package/optimize/es/components/date_picker/auto_refresh/refresh_interval.js +172 -196
- package/optimize/es/components/flyout/flyout.component.js +10 -6
- package/optimize/es/components/flyout/flyout_menu.js +99 -18
- package/optimize/es/components/flyout/flyout_menu.styles.js +2 -1
- package/optimize/es/components/flyout/manager/actions.js +20 -0
- package/optimize/es/components/flyout/manager/flyout_managed.js +42 -18
- package/optimize/es/components/flyout/manager/hooks.js +1 -1
- package/optimize/es/components/flyout/manager/index.js +2 -2
- package/optimize/es/components/flyout/manager/reducer.js +32 -8
- package/optimize/es/components/flyout/manager/selectors.js +8 -2
- package/optimize/es/components/flyout/manager/store.js +35 -2
- package/optimize/es/components/flyout/use_flyout_menu.js +2 -2
- package/optimize/es/components/form/form_control_layout/form_control_layout_icons.js +96 -115
- package/optimize/es/components/notification_icon/assets/info_fill.js +33 -0
- package/optimize/es/components/notification_icon/assets/warning_static.js +39 -0
- package/optimize/es/components/notification_icon/notification_icon.js +77 -0
- package/optimize/es/components/notification_icon/notification_icon.styles.js +22 -0
- package/optimize/es/components/table/mobile/table_sort_mobile.js +59 -82
- package/optimize/es/components/toast/global_toast_list.js +31 -6
- package/optimize/es/components/toast/global_toast_list.styles.js +31 -7
- package/optimize/es/components/toast/toast.js +143 -47
- package/optimize/es/components/toast/toast.styles.js +35 -47
- package/optimize/es/components/toast/toast_action.js +33 -0
- package/optimize/es/components/toast/types.js +9 -0
- package/optimize/es/components/tool_tip/tool_tip.js +3 -3
- package/optimize/lib/components/banner/banner.js +1 -2
- package/optimize/lib/components/banner/banner.styles.js +1 -1
- package/optimize/lib/components/basic_table/basic_table.js +17 -4
- package/optimize/lib/components/basic_table/basic_table.styles.js +19 -1
- package/optimize/lib/components/basic_table/index.js +8 -1
- package/optimize/lib/components/basic_table/pagination_bar.js +19 -4
- package/optimize/lib/components/basic_table/pagination_bar.styles.js +26 -0
- package/optimize/lib/components/basic_table/panel.styles.js +20 -0
- package/optimize/lib/components/basic_table/use_panel_props.js +33 -0
- package/optimize/lib/components/date_picker/auto_refresh/refresh_interval.js +170 -194
- package/optimize/lib/components/flyout/flyout.component.js +10 -6
- package/optimize/lib/components/flyout/flyout_menu.js +98 -18
- package/optimize/lib/components/flyout/flyout_menu.styles.js +2 -1
- package/optimize/lib/components/flyout/manager/actions.js +21 -1
- package/optimize/lib/components/flyout/manager/flyout_managed.js +41 -17
- package/optimize/lib/components/flyout/manager/hooks.js +6 -0
- package/optimize/lib/components/flyout/manager/index.js +12 -0
- package/optimize/lib/components/flyout/manager/reducer.js +31 -7
- package/optimize/lib/components/flyout/manager/selectors.js +9 -3
- package/optimize/lib/components/flyout/manager/store.js +34 -1
- package/optimize/lib/components/flyout/use_flyout_menu.js +2 -2
- package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.js +96 -117
- package/optimize/lib/components/notification_icon/assets/info_fill.js +41 -0
- package/optimize/lib/components/notification_icon/assets/warning_static.js +47 -0
- package/optimize/lib/components/notification_icon/notification_icon.js +83 -0
- package/optimize/lib/components/notification_icon/notification_icon.styles.js +28 -0
- package/optimize/lib/components/notification_icon/svgs/info_fill.svg +3 -0
- package/optimize/lib/components/notification_icon/svgs/warning_static.svg +5 -0
- package/optimize/lib/components/table/mobile/table_sort_mobile.js +61 -83
- package/optimize/lib/components/toast/global_toast_list.js +31 -6
- package/optimize/lib/components/toast/global_toast_list.styles.js +30 -7
- package/optimize/lib/components/toast/toast.js +146 -47
- package/optimize/lib/components/toast/toast.styles.js +33 -45
- package/optimize/lib/components/toast/toast_action.js +39 -0
- package/optimize/lib/components/toast/types.js +15 -0
- package/optimize/lib/components/tool_tip/tool_tip.js +2 -2
- package/package.json +7 -5
- package/test-env/components/banner/banner.js +1 -2
- package/test-env/components/banner/banner.styles.js +1 -1
- package/test-env/components/basic_table/basic_table.js +34 -4
- package/test-env/components/basic_table/basic_table.styles.js +19 -1
- package/test-env/components/basic_table/in_memory_table.js +17 -0
- package/test-env/components/basic_table/index.js +8 -1
- package/test-env/components/basic_table/pagination_bar.js +19 -4
- package/test-env/components/basic_table/pagination_bar.styles.js +26 -0
- package/test-env/components/basic_table/panel.styles.js +20 -0
- package/test-env/components/basic_table/use_panel_props.js +33 -0
- package/test-env/components/date_picker/auto_refresh/refresh_interval.js +170 -220
- package/test-env/components/flyout/flyout.component.js +10 -6
- package/test-env/components/flyout/flyout_menu.js +121 -19
- package/test-env/components/flyout/flyout_menu.styles.js +2 -1
- package/test-env/components/flyout/manager/actions.js +21 -1
- package/test-env/components/flyout/manager/flyout_child.js +23 -1
- package/test-env/components/flyout/manager/flyout_managed.js +41 -17
- package/test-env/components/flyout/manager/hooks.js +6 -0
- package/test-env/components/flyout/manager/index.js +12 -0
- package/test-env/components/flyout/manager/reducer.js +31 -7
- package/test-env/components/flyout/manager/selectors.js +9 -3
- package/test-env/components/flyout/manager/store.js +34 -1
- package/test-env/components/flyout/use_flyout_menu.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout_icons.js +95 -139
- package/test-env/components/notification_icon/assets/info_fill.js +41 -0
- package/test-env/components/notification_icon/assets/warning_static.js +47 -0
- package/test-env/components/notification_icon/notification_icon.js +46 -0
- package/test-env/components/notification_icon/notification_icon.styles.js +28 -0
- package/test-env/components/table/mobile/table_sort_mobile.js +61 -98
- package/test-env/components/toast/global_toast_list.js +132 -6
- package/test-env/components/toast/global_toast_list.styles.js +30 -7
- package/test-env/components/toast/toast.js +242 -47
- package/test-env/components/toast/toast.styles.js +33 -45
- package/test-env/components/toast/toast_action.js +39 -0
- package/test-env/components/toast/types.js +15 -0
- package/test-env/components/tool_tip/tool_tip.js +2 -2
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -9,12 +8,7 @@ exports.isIconShape = exports.ICON_SIDES = exports.EuiFormControlLayoutIcons = v
|
|
|
9
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
10
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
12
|
-
var
|
|
13
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
14
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
15
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
16
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _react = _interopRequireDefault(require("react"));
|
|
18
12
|
var _services = require("../../../services");
|
|
19
13
|
var _icon = require("../../icon");
|
|
20
14
|
var _loading = require("../../loading");
|
|
@@ -23,10 +17,7 @@ var _form_control_layout_custom_icon = require("./form_control_layout_custom_ico
|
|
|
23
17
|
var _form_control_layout_icons = require("./form_control_layout_icons.styles");
|
|
24
18
|
var _react2 = require("@emotion/react");
|
|
25
19
|
var _excluded = ["ref", "side"];
|
|
26
|
-
|
|
27
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
28
|
-
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
29
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /*
|
|
20
|
+
/*
|
|
30
21
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
31
22
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
32
23
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
@@ -37,111 +28,99 @@ var ICON_SIDES = exports.ICON_SIDES = ['left', 'right'];
|
|
|
37
28
|
var isIconShape = exports.isIconShape = function isIconShape(icon) {
|
|
38
29
|
return !!icon && icon.hasOwnProperty('type');
|
|
39
30
|
};
|
|
40
|
-
var EuiFormControlLayoutIcons = exports.EuiFormControlLayoutIcons =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
var EuiFormControlLayoutIcons = exports.EuiFormControlLayoutIcons = function EuiFormControlLayoutIcons(_ref) {
|
|
32
|
+
var _ref$side = _ref.side,
|
|
33
|
+
side = _ref$side === void 0 ? 'left' : _ref$side,
|
|
34
|
+
_ref$iconsPosition = _ref.iconsPosition,
|
|
35
|
+
iconsPosition = _ref$iconsPosition === void 0 ? 'absolute' : _ref$iconsPosition,
|
|
36
|
+
compressed = _ref.compressed,
|
|
37
|
+
isDisabled = _ref.isDisabled,
|
|
38
|
+
icon = _ref.icon,
|
|
39
|
+
clear = _ref.clear,
|
|
40
|
+
isLoading = _ref.isLoading,
|
|
41
|
+
isInvalid = _ref.isInvalid,
|
|
42
|
+
isDropdown = _ref.isDropdown;
|
|
43
|
+
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
44
|
+
var styles = (0, _form_control_layout_icons.euiFormControlLayoutIconsStyles)(euiThemeContext);
|
|
45
|
+
var cssStyles = [styles.euiFormControlLayoutIcons, compressed ? styles.compressed : styles.uncompressed].concat((0, _toConsumableArray2.default)(iconsPosition === 'absolute' ? [styles.position.absolute.absolute, compressed ? styles.position.absolute.compressed[side] : styles.position.absolute.uncompressed[side]] : [styles.position.static.static, compressed ? styles.position.static.compressed : styles.position.static.uncompressed]), [isDisabled && styles.disabled]);
|
|
46
|
+
return (0, _react2.jsx)("div", {
|
|
47
|
+
css: cssStyles,
|
|
48
|
+
className: "euiFormControlLayoutIcons"
|
|
49
|
+
}, (0, _react2.jsx)(ClearButton, {
|
|
50
|
+
clear: clear,
|
|
51
|
+
isDisabled: isDisabled
|
|
52
|
+
}), (0, _react2.jsx)(LoadingSpinner, {
|
|
53
|
+
isLoading: isLoading
|
|
54
|
+
}), (0, _react2.jsx)(InvalidIcon, {
|
|
55
|
+
isInvalid: isInvalid
|
|
56
|
+
}), (0, _react2.jsx)(CustomIcon, {
|
|
57
|
+
icon: icon,
|
|
58
|
+
isDisabled: isDisabled
|
|
59
|
+
}), (0, _react2.jsx)(DropdownIcon, {
|
|
60
|
+
isDropdown: isDropdown,
|
|
61
|
+
isDisabled: isDisabled
|
|
62
|
+
}));
|
|
63
|
+
};
|
|
64
|
+
var CustomIcon = function CustomIcon(_ref2) {
|
|
65
|
+
var icon = _ref2.icon,
|
|
66
|
+
isDisabled = _ref2.isDisabled;
|
|
67
|
+
if (!icon) {
|
|
68
|
+
return null;
|
|
44
69
|
}
|
|
45
|
-
(0, _inherits2.default)(EuiFormControlLayoutIcons, _Component);
|
|
46
|
-
return (0, _createClass2.default)(EuiFormControlLayoutIcons, [{
|
|
47
|
-
key: "render",
|
|
48
|
-
value: function render() {
|
|
49
|
-
var _this$props = this.props,
|
|
50
|
-
_this$props$side = _this$props.side,
|
|
51
|
-
side = _this$props$side === void 0 ? 'left' : _this$props$side,
|
|
52
|
-
_this$props$iconsPosi = _this$props.iconsPosition,
|
|
53
|
-
iconsPosition = _this$props$iconsPosi === void 0 ? 'absolute' : _this$props$iconsPosi,
|
|
54
|
-
compressed = _this$props.compressed,
|
|
55
|
-
isDisabled = _this$props.isDisabled;
|
|
56
|
-
var customIcon = this.renderCustomIcon();
|
|
57
|
-
var loadingSpinner = this.renderLoadingSpinner();
|
|
58
|
-
var clearButton = this.renderClearButton();
|
|
59
|
-
var invalidIcon = this.renderInvalidIcon();
|
|
60
|
-
var dropdownIcon = this.renderDropdownIcon();
|
|
61
|
-
return (0, _react2.jsx)(_services.RenderWithEuiStylesMemoizer, null, function (stylesMemoizer) {
|
|
62
|
-
var styles = stylesMemoizer(_form_control_layout_icons.euiFormControlLayoutIconsStyles);
|
|
63
|
-
var cssStyles = [styles.euiFormControlLayoutIcons, compressed ? styles.compressed : styles.uncompressed].concat((0, _toConsumableArray2.default)(iconsPosition === 'absolute' ? [styles.position.absolute.absolute, compressed ? styles.position.absolute.compressed[side] : styles.position.absolute.uncompressed[side]] : [styles.position.static.static, compressed ? styles.position.static.compressed : styles.position.static.uncompressed]), [isDisabled && styles.disabled]);
|
|
64
|
-
return (0, _react2.jsx)("div", {
|
|
65
|
-
css: cssStyles,
|
|
66
|
-
className: "euiFormControlLayoutIcons"
|
|
67
|
-
}, clearButton, loadingSpinner, invalidIcon, customIcon, dropdownIcon);
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}, {
|
|
71
|
-
key: "renderCustomIcon",
|
|
72
|
-
value: function renderCustomIcon() {
|
|
73
|
-
var _this$props2 = this.props,
|
|
74
|
-
icon = _this$props2.icon,
|
|
75
|
-
isDisabled = _this$props2.isDisabled;
|
|
76
|
-
if (!icon) {
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
70
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
var isInvalid = this.props.isInvalid;
|
|
137
|
-
if (!isInvalid) {
|
|
138
|
-
return null;
|
|
139
|
-
}
|
|
140
|
-
return (0, _react2.jsx)(_icon.EuiIcon, {
|
|
141
|
-
size: "m",
|
|
142
|
-
color: "danger",
|
|
143
|
-
type: "warning"
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
}]);
|
|
147
|
-
}(_react.Component);
|
|
71
|
+
// Normalize the icon to an object if it's a string.
|
|
72
|
+
var iconProps = isIconShape(icon) ? icon : {
|
|
73
|
+
type: icon
|
|
74
|
+
};
|
|
75
|
+
var iconRef = iconProps.ref,
|
|
76
|
+
side = iconProps.side,
|
|
77
|
+
iconRest = (0, _objectWithoutProperties2.default)(iconProps, _excluded);
|
|
78
|
+
return (0, _react2.jsx)(_form_control_layout_custom_icon.EuiFormControlLayoutCustomIcon, (0, _extends2.default)({
|
|
79
|
+
size: "m",
|
|
80
|
+
disabled: isDisabled,
|
|
81
|
+
iconRef: iconRef
|
|
82
|
+
}, iconRest));
|
|
83
|
+
};
|
|
84
|
+
var DropdownIcon = function DropdownIcon(_ref3) {
|
|
85
|
+
var isDropdown = _ref3.isDropdown,
|
|
86
|
+
isDisabled = _ref3.isDisabled;
|
|
87
|
+
if (!isDropdown) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
return (0, _react2.jsx)(_form_control_layout_custom_icon.EuiFormControlLayoutCustomIcon, {
|
|
91
|
+
size: "m",
|
|
92
|
+
disabled: isDisabled,
|
|
93
|
+
type: "chevronSingleDown"
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
var LoadingSpinner = function LoadingSpinner(_ref4) {
|
|
97
|
+
var isLoading = _ref4.isLoading;
|
|
98
|
+
if (!isLoading) {
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
return (0, _react2.jsx)(_loading.EuiLoadingSpinner, {
|
|
102
|
+
size: "m"
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
var ClearButton = function ClearButton(_ref5) {
|
|
106
|
+
var clear = _ref5.clear,
|
|
107
|
+
isDisabled = _ref5.isDisabled;
|
|
108
|
+
if (!clear) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
return (0, _react2.jsx)(_form_control_layout_clear_button.EuiFormControlLayoutClearButton, (0, _extends2.default)({
|
|
112
|
+
size: "m",
|
|
113
|
+
disabled: isDisabled
|
|
114
|
+
}, clear));
|
|
115
|
+
};
|
|
116
|
+
var InvalidIcon = function InvalidIcon(_ref6) {
|
|
117
|
+
var isInvalid = _ref6.isInvalid;
|
|
118
|
+
if (!isInvalid) {
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
return (0, _react2.jsx)(_icon.EuiIcon, {
|
|
122
|
+
size: "m",
|
|
123
|
+
color: "danger",
|
|
124
|
+
type: "warning"
|
|
125
|
+
});
|
|
126
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.icon = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _react2 = require("@emotion/react");
|
|
13
|
+
var _excluded = ["title", "titleId"];
|
|
14
|
+
/*
|
|
15
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
16
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
17
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
18
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
19
|
+
* Side Public License, v 1.
|
|
20
|
+
*/
|
|
21
|
+
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
|
|
22
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
23
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
|
+
var EuiIconInfoFill = function EuiIconInfoFill(_ref) {
|
|
25
|
+
var title = _ref.title,
|
|
26
|
+
titleId = _ref.titleId,
|
|
27
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
28
|
+
return (0, _react2.jsx)("svg", (0, _extends2.default)({
|
|
29
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
30
|
+
width: 16,
|
|
31
|
+
height: 16,
|
|
32
|
+
fill: "none",
|
|
33
|
+
viewBox: "0 0 16 16",
|
|
34
|
+
"aria-labelledby": titleId
|
|
35
|
+
}, props), title ? (0, _react2.jsx)("title", {
|
|
36
|
+
id: titleId
|
|
37
|
+
}, title) : null, (0, _react2.jsx)("path", {
|
|
38
|
+
d: "M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1ZM6.5 7v1h1v3H6v1h4v-1H8.5V7h-2ZM8 4a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"
|
|
39
|
+
}));
|
|
40
|
+
};
|
|
41
|
+
var icon = exports.icon = EuiIconInfoFill;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.icon = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _react2 = require("@emotion/react");
|
|
13
|
+
var _excluded = ["title", "titleId"];
|
|
14
|
+
/*
|
|
15
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
16
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
17
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
18
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
19
|
+
* Side Public License, v 1.
|
|
20
|
+
*/
|
|
21
|
+
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
|
|
22
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
23
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
|
+
var EuiIconWarningStatic = function EuiIconWarningStatic(_ref) {
|
|
25
|
+
var title = _ref.title,
|
|
26
|
+
titleId = _ref.titleId,
|
|
27
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
28
|
+
return (0, _react2.jsx)("svg", (0, _extends2.default)({
|
|
29
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
30
|
+
width: 16,
|
|
31
|
+
height: 16,
|
|
32
|
+
fill: "none",
|
|
33
|
+
viewBox: "0 0 16 16",
|
|
34
|
+
"aria-labelledby": titleId
|
|
35
|
+
}, props), title ? (0, _react2.jsx)("title", {
|
|
36
|
+
id: titleId
|
|
37
|
+
}, title) : null, (0, _react2.jsx)("path", {
|
|
38
|
+
fill: "#FACB3D",
|
|
39
|
+
fillRule: "evenodd",
|
|
40
|
+
d: "M8 1a1 1 0 0 1 .863.496l7 12A1 1 0 0 1 15 15H1a1 1 0 0 1-.864-1.504l7-12A1 1 0 0 1 8 1Z",
|
|
41
|
+
clipRule: "evenodd"
|
|
42
|
+
}), (0, _react2.jsx)("path", {
|
|
43
|
+
fill: "#825803",
|
|
44
|
+
d: "M7 12a1 1 0 1 1 2 0 1 1 0 0 1-2 0ZM7.5 10V5h1v5h-1Z"
|
|
45
|
+
}));
|
|
46
|
+
};
|
|
47
|
+
var icon = exports.icon = EuiIconWarningStatic;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.NOTIFICATION_ICONS_MAP = exports.EuiNotificationIcon = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
|
+
var _services = require("../../services");
|
|
13
|
+
var _icon = require("../icon/icon");
|
|
14
|
+
var _error_fill = require("../icon/assets/error_fill");
|
|
15
|
+
var _check_circle_fill = require("../icon/assets/check_circle_fill");
|
|
16
|
+
var _info_fill = require("./assets/info_fill");
|
|
17
|
+
var _warning_static = require("./assets/warning_static");
|
|
18
|
+
var _notification_icon = require("./notification_icon.styles");
|
|
19
|
+
var _react2 = require("@emotion/react");
|
|
20
|
+
var _excluded = ["className", "type", "size", "css"];
|
|
21
|
+
/*
|
|
22
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
23
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
24
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
25
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
26
|
+
* Side Public License, v 1.
|
|
27
|
+
*/
|
|
28
|
+
var TYPES = ['info', 'success', 'warning', 'error'];
|
|
29
|
+
var NOTIFICATION_ICONS_MAP = exports.NOTIFICATION_ICONS_MAP = {
|
|
30
|
+
info: {
|
|
31
|
+
name: 'infoFill',
|
|
32
|
+
icon: _info_fill.icon
|
|
33
|
+
},
|
|
34
|
+
success: {
|
|
35
|
+
name: 'checkCircleFill',
|
|
36
|
+
icon: _check_circle_fill.icon
|
|
37
|
+
},
|
|
38
|
+
warning: {
|
|
39
|
+
name: 'warningStatic',
|
|
40
|
+
icon: _warning_static.icon
|
|
41
|
+
},
|
|
42
|
+
error: {
|
|
43
|
+
name: 'errorFill',
|
|
44
|
+
icon: _error_fill.icon
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
var ICON_TYPES_MAP = {
|
|
48
|
+
info: {
|
|
49
|
+
icon: NOTIFICATION_ICONS_MAP.info.icon,
|
|
50
|
+
color: 'primary'
|
|
51
|
+
},
|
|
52
|
+
success: {
|
|
53
|
+
icon: NOTIFICATION_ICONS_MAP.success.icon,
|
|
54
|
+
color: 'success'
|
|
55
|
+
},
|
|
56
|
+
warning: {
|
|
57
|
+
icon: NOTIFICATION_ICONS_MAP.warning.icon
|
|
58
|
+
},
|
|
59
|
+
error: {
|
|
60
|
+
icon: NOTIFICATION_ICONS_MAP.error.icon,
|
|
61
|
+
color: 'danger'
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var EuiNotificationIcon = exports.EuiNotificationIcon = function EuiNotificationIcon(_ref) {
|
|
65
|
+
var className = _ref.className,
|
|
66
|
+
type = _ref.type,
|
|
67
|
+
_ref$size = _ref.size,
|
|
68
|
+
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
69
|
+
css = _ref.css,
|
|
70
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
71
|
+
var Icon = ICON_TYPES_MAP[type];
|
|
72
|
+
var classes = (0, _classnames.default)('euiNotificationIcon', className);
|
|
73
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_notification_icon.euiNotificationIconStyles);
|
|
74
|
+
var cssStyles = [styles.euiNotificationIcon, size === 'l' && styles.size[size], css];
|
|
75
|
+
return (0, _react2.jsx)(_icon.EuiIcon, (0, _extends2.default)({}, rest, {
|
|
76
|
+
className: classes,
|
|
77
|
+
css: cssStyles,
|
|
78
|
+
type: Icon.icon,
|
|
79
|
+
color: Icon.color,
|
|
80
|
+
"aria-hidden": "true",
|
|
81
|
+
size: size
|
|
82
|
+
}));
|
|
83
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiNotificationIconStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _euiThemeCommon = require("@elastic/eui-theme-common");
|
|
9
|
+
/*
|
|
10
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
11
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
12
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
13
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
14
|
+
* Side Public License, v 1.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
var euiNotificationIconStyles = exports.euiNotificationIconStyles = function euiNotificationIconStyles(_ref) {
|
|
18
|
+
var euiTheme = _ref.euiTheme;
|
|
19
|
+
var sizeL = (0, _euiThemeCommon.mathWithUnits)(euiTheme.size.base, function (x) {
|
|
20
|
+
return x * 1.25;
|
|
21
|
+
});
|
|
22
|
+
return {
|
|
23
|
+
euiNotificationIcon: /*#__PURE__*/(0, _react.css)(";label:euiNotificationIcon;"),
|
|
24
|
+
size: {
|
|
25
|
+
l: /*#__PURE__*/(0, _react.css)("block-size:", sizeL, ";inline-size:", sizeL, ";;label:l;")
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M8 1C11.866 1 15 4.13401 15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1ZM6.5 7V8H7.5V11H6V12H10V11H8.5V7H6.5ZM8 4C7.44772 4 7 4.44772 7 5C7 5.55228 7.44772 6 8 6C8.55228 6 9 5.55228 9 5C9 4.44772 8.55228 4 8 4Z" />
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.00021 1C8.35577 1.00002 8.68427 1.18902 8.86349 1.49609L15.8635 13.4961C16.0439 13.8054 16.0457 14.1876 15.8674 14.498C15.6891 14.8085 15.3583 15 15.0002 15H1.00021C0.642148 15 0.311364 14.8085 0.133026 14.498C-0.0452792 14.1876 -0.0443711 13.8054 0.135956 13.4961L7.13596 1.49609C7.31517 1.18888 7.64455 1 8.00021 1Z" fill="#FACB3D"/>
|
|
3
|
+
<path d="M7.00024 12C7.00024 11.4477 7.44796 11 8.00024 11C8.5525 11 9.00024 11.4477 9.00024 12C9.00024 12.5523 8.5525 13 8.00024 13C7.44796 13 7.00024 12.5523 7.00024 12Z" fill="#825803"/>
|
|
4
|
+
<path d="M7.50024 10V5H8.50024V10H7.50024Z" fill="#825803"/>
|
|
5
|
+
</svg>
|
|
@@ -7,13 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.EuiTableSortMobile = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
14
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
15
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
16
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
18
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
14
|
var _button_empty = require("../../button/button_empty");
|
|
@@ -23,87 +18,70 @@ var _i18n = require("../../i18n");
|
|
|
23
18
|
var _table_sort_mobile_item = require("./table_sort_mobile_item");
|
|
24
19
|
var _react2 = require("@emotion/react");
|
|
25
20
|
var _excluded = ["className", "anchorPosition", "items"];
|
|
26
|
-
|
|
27
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
28
|
-
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
29
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /*
|
|
21
|
+
/*
|
|
30
22
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
31
23
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
32
24
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
33
25
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
34
26
|
* Side Public License, v 1.
|
|
35
27
|
*/
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
(0,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
});
|
|
57
|
-
// Aligns the button to the right even when it's the only element present
|
|
58
|
-
(0, _defineProperty2.default)(_this, "euiTableSortMobileStyles", {
|
|
59
|
-
marginInlineStart: 'auto',
|
|
60
|
-
label: 'euiTableSortMobile'
|
|
28
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
29
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
30
|
+
// Aligns the button to the right even when it's the only element present
|
|
31
|
+
var euiTableSortMobileStyles = {
|
|
32
|
+
marginInlineStart: 'auto',
|
|
33
|
+
label: 'euiTableSortMobile'
|
|
34
|
+
};
|
|
35
|
+
var EuiTableSortMobile = exports.EuiTableSortMobile = function EuiTableSortMobile(_ref) {
|
|
36
|
+
var className = _ref.className,
|
|
37
|
+
anchorPosition = _ref.anchorPosition,
|
|
38
|
+
items = _ref.items,
|
|
39
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
40
|
+
var _useState = (0, _react.useState)(false),
|
|
41
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
42
|
+
isPopoverOpen = _useState2[0],
|
|
43
|
+
setIsPopoverOpen = _useState2[1];
|
|
44
|
+
var classes = (0, _classnames.default)('euiTableSortMobile', className);
|
|
45
|
+
var onButtonClick = function onButtonClick() {
|
|
46
|
+
setIsPopoverOpen(function (isOpen) {
|
|
47
|
+
return !isOpen;
|
|
61
48
|
});
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}) : undefined
|
|
102
|
-
}));
|
|
103
|
-
return (0, _react2.jsx)("div", {
|
|
104
|
-
className: classes,
|
|
105
|
-
css: this.euiTableSortMobileStyles
|
|
106
|
-
}, mobileSortPopover);
|
|
107
|
-
}
|
|
108
|
-
}]);
|
|
109
|
-
}(_react.Component);
|
|
49
|
+
};
|
|
50
|
+
var closePopover = function closePopover() {
|
|
51
|
+
setIsPopoverOpen(false);
|
|
52
|
+
};
|
|
53
|
+
var mobileSortButton = (0, _react2.jsx)(_button_empty.EuiButtonEmpty, {
|
|
54
|
+
iconType: "chevronSingleDown",
|
|
55
|
+
iconSide: "right",
|
|
56
|
+
onClick: onButtonClick,
|
|
57
|
+
flush: "right",
|
|
58
|
+
size: "xs"
|
|
59
|
+
}, (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
60
|
+
token: "euiTableSortMobile.sorting",
|
|
61
|
+
default: "Sorting"
|
|
62
|
+
}));
|
|
63
|
+
var mobileSortPopover = (0, _react2.jsx)(_popover.EuiPopover, (0, _extends2.default)({
|
|
64
|
+
button: mobileSortButton,
|
|
65
|
+
isOpen: isPopoverOpen,
|
|
66
|
+
closePopover: closePopover,
|
|
67
|
+
anchorPosition: anchorPosition || 'downRight',
|
|
68
|
+
panelPaddingSize: "none"
|
|
69
|
+
}, rest), (0, _react2.jsx)(_context_menu.EuiContextMenuPanel, {
|
|
70
|
+
style: {
|
|
71
|
+
minWidth: 200
|
|
72
|
+
},
|
|
73
|
+
items: items !== null && items !== void 0 && items.length ? items.map(function (item) {
|
|
74
|
+
return (0, _react2.jsx)(_table_sort_mobile_item.EuiTableSortMobileItem, {
|
|
75
|
+
key: item.key,
|
|
76
|
+
onSort: item.onSort,
|
|
77
|
+
isSorted: item.isSorted,
|
|
78
|
+
isSortAscending: item.isSortAscending
|
|
79
|
+
}, item.name);
|
|
80
|
+
}) : undefined
|
|
81
|
+
}));
|
|
82
|
+
return (0, _react2.jsx)("div", {
|
|
83
|
+
className: classes,
|
|
84
|
+
css: euiTableSortMobileStyles
|
|
85
|
+
}, mobileSortPopover);
|
|
86
|
+
};
|
|
87
|
+
EuiTableSortMobile.displayName = 'EuiTableSortMobile';
|