@elastic/eui 116.3.0 → 116.3.1-snapshot.1782218964187
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/avatar/avatar.js +4 -0
- package/es/components/avatar/avatar.styles.js +16 -16
- 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/table/store/use_unique_column_id.js +25 -0
- package/es/components/table/table_header_cell.js +7 -8
- package/es/components/table/table_header_cell_checkbox.js +5 -6
- 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 +61 -30
- package/es/components/tool_tip/tool_tip_anchor.js +5 -5
- package/es/components/tool_tip/tool_tip_manager.js +27 -2
- package/eui.d.ts +811 -552
- package/i18ntokens.json +981 -927
- package/lib/components/avatar/avatar.js +4 -0
- package/lib/components/avatar/avatar.styles.js +16 -16
- 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/table/store/use_unique_column_id.js +34 -0
- package/lib/components/table/table_header_cell.js +7 -8
- package/lib/components/table/table_header_cell_checkbox.js +5 -6
- 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 +59 -29
- package/lib/components/tool_tip/tool_tip_anchor.js +5 -5
- package/lib/components/tool_tip/tool_tip_manager.js +27 -2
- package/optimize/es/components/avatar/avatar.js +4 -0
- package/optimize/es/components/avatar/avatar.styles.js +16 -16
- 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/table/store/use_unique_column_id.js +25 -0
- package/optimize/es/components/table/table_header_cell.js +7 -8
- package/optimize/es/components/table/table_header_cell_checkbox.js +5 -6
- 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 +58 -30
- package/optimize/es/components/tool_tip/tool_tip_anchor.js +5 -5
- package/optimize/es/components/tool_tip/tool_tip_manager.js +27 -2
- package/optimize/lib/components/avatar/avatar.js +4 -0
- package/optimize/lib/components/avatar/avatar.styles.js +16 -16
- 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/table/store/use_unique_column_id.js +34 -0
- package/optimize/lib/components/table/table_header_cell.js +7 -8
- package/optimize/lib/components/table/table_header_cell_checkbox.js +5 -6
- 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 +57 -29
- package/optimize/lib/components/tool_tip/tool_tip_anchor.js +5 -5
- package/optimize/lib/components/tool_tip/tool_tip_manager.js +27 -2
- package/package.json +9 -6
- package/test-env/components/avatar/avatar.js +4 -0
- package/test-env/components/avatar/avatar.styles.js +16 -16
- 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/table/store/use_unique_column_id.js +34 -0
- package/test-env/components/table/table_header_cell.js +7 -8
- package/test-env/components/table/table_header_cell_checkbox.js +5 -6
- 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 +57 -29
- package/test-env/components/tool_tip/tool_tip_anchor.js +5 -5
- package/test-env/components/tool_tip/tool_tip_manager.js +27 -2
|
@@ -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';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.useEuiTableStoreUniqueColumnId = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _uuid = require("uuid");
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
/*
|
|
13
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
15
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
16
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
17
|
+
* Side Public License, v 1.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
var useEuiTableStoreUniqueColumnIdFallback = function useEuiTableStoreUniqueColumnIdFallback() {
|
|
21
|
+
var ref = (0, _react.useRef)((0, _uuid.v4)());
|
|
22
|
+
return ref.current;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Returns a stable unique column ID to be used when registering columns.
|
|
27
|
+
* It uses `React.useId()` when available and falls back to UUID v4 on React 17.
|
|
28
|
+
*
|
|
29
|
+
* This is needed so that static `uuid` mocks don't break column registration
|
|
30
|
+
* (at least in React 18+; in older versions this function would need
|
|
31
|
+
* to be mocked to return something unique, but stable).
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
var useEuiTableStoreUniqueColumnId = exports.useEuiTableStoreUniqueColumnId = 'useId' in _react.default ? _react.useId : useEuiTableStoreUniqueColumnIdFallback;
|
|
@@ -12,7 +12,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
14
|
var _services = require("../../services");
|
|
15
|
-
var _html_id_generator = require("../../services/accessibility/html_id_generator");
|
|
16
15
|
var _i18n = require("../i18n");
|
|
17
16
|
var _accessibility = require("../accessibility");
|
|
18
17
|
var _icon = require("../icon");
|
|
@@ -24,6 +23,7 @@ var _table_cell_content = require("./_table_cell_content");
|
|
|
24
23
|
var _table_cells_shared = require("./table_cells_shared.styles");
|
|
25
24
|
var _provider = require("./store/provider");
|
|
26
25
|
var _sticky_header = require("./sticky_header");
|
|
26
|
+
var _use_unique_column_id = require("./store/use_unique_column_id");
|
|
27
27
|
var _react2 = require("@emotion/react");
|
|
28
28
|
var _excluded = ["children", "align", "onSort", "isSorted", "isSortAscending", "className", "scope", "mobileOptions", "width", "minWidth", "maxWidth", "style", "readOnly", "tooltipProps", "description", "append", "sticky"];
|
|
29
29
|
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); }
|
|
@@ -112,7 +112,7 @@ var EuiTableHeaderCell = exports.EuiTableHeaderCell = function EuiTableHeaderCel
|
|
|
112
112
|
sticky = _ref2.sticky,
|
|
113
113
|
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
114
114
|
var selfRef = (0, _react.useRef)(null);
|
|
115
|
-
var
|
|
115
|
+
var storeCellId = (0, _use_unique_column_id.useEuiTableStoreUniqueColumnId)();
|
|
116
116
|
var store = (0, _provider.useEuiTableColumnDataStore)();
|
|
117
117
|
var isWithinStickyHeader = (0, _sticky_header.useEuiTableWithinStickyHeader)();
|
|
118
118
|
var styles = (0, _services.useEuiMemoizedStyles)(_table_cells_shared.euiTableHeaderFooterCellStyles);
|
|
@@ -177,15 +177,15 @@ var EuiTableHeaderCell = exports.EuiTableHeaderCell = function EuiTableHeaderCel
|
|
|
177
177
|
if (!entry) {
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
180
|
-
store.updateColumnWidth(
|
|
181
|
-
}, [store,
|
|
180
|
+
store.updateColumnWidth(storeCellId, entry.contentRect.width);
|
|
181
|
+
}, [store, storeCellId]);
|
|
182
182
|
(0, _react.useEffect)(function () {
|
|
183
183
|
// Don't register the column inside the sticky header as the original
|
|
184
184
|
// column is already registered. This would cause an infinite loop.
|
|
185
185
|
if (isWithinStickyHeader || !selfRef.current || !renderHeaderCellRef.current) {
|
|
186
186
|
return;
|
|
187
187
|
}
|
|
188
|
-
var unregisterColumn = store.registerColumn(
|
|
188
|
+
var unregisterColumn = store.registerColumn(storeCellId, {
|
|
189
189
|
renderHeaderCellRef: renderHeaderCellRef,
|
|
190
190
|
// getBoundingClientRect is not the cheapest, but we call it only once
|
|
191
191
|
currentWidth: selfRef.current.getBoundingClientRect().width
|
|
@@ -207,8 +207,7 @@ var EuiTableHeaderCell = exports.EuiTableHeaderCell = function EuiTableHeaderCel
|
|
|
207
207
|
unregisterColumn();
|
|
208
208
|
(_resizeObserver = resizeObserver) === null || _resizeObserver === void 0 || _resizeObserver.disconnect();
|
|
209
209
|
};
|
|
210
|
-
|
|
211
|
-
}, [store, internalCellId, isWithinStickyHeader]);
|
|
210
|
+
}, [store, isWithinStickyHeader, handleResize, storeCellId]);
|
|
212
211
|
|
|
213
212
|
// Notify the store on every render so the sticky header stays in sync.
|
|
214
213
|
// React's reconciliation will efficiently handle any duplicate renders.
|
|
@@ -223,7 +222,7 @@ var EuiTableHeaderCell = exports.EuiTableHeaderCell = function EuiTableHeaderCel
|
|
|
223
222
|
if (!selfRef.current) {
|
|
224
223
|
return;
|
|
225
224
|
}
|
|
226
|
-
store.updateColumn(
|
|
225
|
+
store.updateColumn(storeCellId, {
|
|
227
226
|
renderHeaderCellRef: renderHeaderCellRef
|
|
228
227
|
});
|
|
229
228
|
});
|
|
@@ -11,11 +11,11 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
var _services = require("../../services");
|
|
14
|
-
var _html_id_generator = require("../../services/accessibility/html_id_generator");
|
|
15
14
|
var _utils = require("./utils");
|
|
16
15
|
var _table_cells_shared = require("./table_cells_shared.styles");
|
|
17
16
|
var _provider = require("./store/provider");
|
|
18
17
|
var _sticky_header = require("./sticky_header");
|
|
18
|
+
var _use_unique_column_id = require("./store/use_unique_column_id");
|
|
19
19
|
var _react2 = require("@emotion/react");
|
|
20
20
|
var _excluded = ["children", "className", "scope", "style", "width", "minWidth", "maxWidth", "append"];
|
|
21
21
|
/*
|
|
@@ -38,7 +38,7 @@ var EuiTableHeaderCellCheckbox = exports.EuiTableHeaderCellCheckbox = function E
|
|
|
38
38
|
maxWidth = props.maxWidth,
|
|
39
39
|
append = props.append,
|
|
40
40
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
41
|
-
var
|
|
41
|
+
var storeCellId = (0, _use_unique_column_id.useEuiTableStoreUniqueColumnId)();
|
|
42
42
|
var store = (0, _provider.useEuiTableColumnDataStore)();
|
|
43
43
|
var isWithinStickyHeader = (0, _sticky_header.useEuiTableWithinStickyHeader)();
|
|
44
44
|
var styles = (0, _services.useEuiMemoizedStyles)(_table_cells_shared.euiTableCellCheckboxStyles);
|
|
@@ -65,21 +65,20 @@ var EuiTableHeaderCellCheckbox = exports.EuiTableHeaderCellCheckbox = function E
|
|
|
65
65
|
if (isWithinStickyHeader) {
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
|
-
var unregisterColumn = store.registerColumn(
|
|
68
|
+
var unregisterColumn = store.registerColumn(storeCellId, {
|
|
69
69
|
renderHeaderCellRef: renderHeaderCellRef
|
|
70
70
|
});
|
|
71
71
|
return function () {
|
|
72
72
|
unregisterColumn();
|
|
73
73
|
};
|
|
74
|
-
|
|
75
|
-
}, [store, internalCellId, isWithinStickyHeader]);
|
|
74
|
+
}, [store, isWithinStickyHeader, storeCellId]);
|
|
76
75
|
(0, _react.useEffect)(function () {
|
|
77
76
|
// Notify the store on every render so the sticky header stays in sync.
|
|
78
77
|
// React's reconciliation will efficiently handle any duplicate renders.
|
|
79
78
|
if (isWithinStickyHeader) {
|
|
80
79
|
return;
|
|
81
80
|
}
|
|
82
|
-
store.updateColumn(
|
|
81
|
+
store.updateColumn(storeCellId, {
|
|
83
82
|
renderHeaderCellRef: renderHeaderCellRef
|
|
84
83
|
});
|
|
85
84
|
});
|
|
@@ -21,8 +21,9 @@ var _toast = require("./toast");
|
|
|
21
21
|
var _global_toast_list = require("./global_toast_list.styles");
|
|
22
22
|
var _button = require("../button");
|
|
23
23
|
var _i18n = require("../i18n");
|
|
24
|
+
var _badge = require("../badge");
|
|
24
25
|
var _react2 = require("@emotion/react");
|
|
25
|
-
var _excluded = ["className", "toasts", "dismissToast", "toastLifeTimeMs", "onClearAllToasts", "side", "showClearAllButtonAt"],
|
|
26
|
+
var _excluded = ["className", "toasts", "dismissToast", "toastLifeTimeMs", "onClearAllToasts", "side", "showClearAllButtonAt", "showNotificationBadge"],
|
|
26
27
|
_excluded2 = ["text", "toastLifeTimeMs"];
|
|
27
28
|
/*
|
|
28
29
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -53,6 +54,8 @@ var EuiGlobalToastList = exports.EuiGlobalToastList = function EuiGlobalToastLis
|
|
|
53
54
|
side = _ref$side === void 0 ? 'right' : _ref$side,
|
|
54
55
|
_ref$showClearAllButt = _ref.showClearAllButtonAt,
|
|
55
56
|
showClearAllButtonAt = _ref$showClearAllButt === void 0 ? CLEAR_ALL_TOASTS_THRESHOLD_DEFAULT : _ref$showClearAllButt,
|
|
57
|
+
_ref$showNotification = _ref.showNotificationBadge,
|
|
58
|
+
showNotificationBadge = _ref$showNotification === void 0 ? false : _ref$showNotification,
|
|
56
59
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
57
60
|
var _useState = (0, _react.useState)({}),
|
|
58
61
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -227,8 +230,9 @@ var EuiGlobalToastList = exports.EuiGlobalToastList = function EuiGlobalToastLis
|
|
|
227
230
|
var renderedToasts = (0, _react.useMemo)(function () {
|
|
228
231
|
return toasts.map(function (toast) {
|
|
229
232
|
var text = toast.text,
|
|
230
|
-
|
|
233
|
+
perToastLifeTimeMs = toast.toastLifeTimeMs,
|
|
231
234
|
rest = (0, _objectWithoutProperties2.default)(toast, _excluded2);
|
|
235
|
+
var effectiveLifeTimeMs = perToastLifeTimeMs !== null && perToastLifeTimeMs !== void 0 ? perToastLifeTimeMs : toastLifeTimeMs;
|
|
232
236
|
var onClose = function onClose() {
|
|
233
237
|
return dismissToast(toast);
|
|
234
238
|
};
|
|
@@ -239,9 +243,12 @@ var EuiGlobalToastList = exports.EuiGlobalToastList = function EuiGlobalToastLis
|
|
|
239
243
|
onClose: onClose,
|
|
240
244
|
onFocus: onMouseEnter,
|
|
241
245
|
onBlur: onMouseLeave
|
|
242
|
-
}, rest
|
|
246
|
+
}, rest, {
|
|
247
|
+
animationMs: effectiveLifeTimeMs,
|
|
248
|
+
text: text
|
|
249
|
+
})));
|
|
243
250
|
});
|
|
244
|
-
}, [toasts, toastIdToDismissedMap, dismissToast, onMouseEnter, onMouseLeave]);
|
|
251
|
+
}, [toasts, toastIdToDismissedMap, dismissToast, onMouseEnter, onMouseLeave, toastLifeTimeMs]);
|
|
245
252
|
var clearAllButton = (0, _react.useMemo)(function () {
|
|
246
253
|
if (toasts.length && showClearAllButtonAt && toasts.length >= showClearAllButtonAt) {
|
|
247
254
|
return (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
@@ -255,7 +262,8 @@ var EuiGlobalToastList = exports.EuiGlobalToastList = function EuiGlobalToastLis
|
|
|
255
262
|
return (0, _react2.jsx)(_global_toast_list_item.EuiGlobalToastListItem, {
|
|
256
263
|
isDismissed: false
|
|
257
264
|
}, (0, _react2.jsx)(_button.EuiButton, {
|
|
258
|
-
|
|
265
|
+
fullWidth: true,
|
|
266
|
+
size: "s",
|
|
259
267
|
color: "text",
|
|
260
268
|
onClick: function onClick() {
|
|
261
269
|
toasts.forEach(function (toast) {
|
|
@@ -271,11 +279,28 @@ var EuiGlobalToastList = exports.EuiGlobalToastList = function EuiGlobalToastLis
|
|
|
271
279
|
}
|
|
272
280
|
}, [showClearAllButtonAt, onClearAllToasts, toasts, dismissToastProp, styles]);
|
|
273
281
|
var classes = (0, _classnames.default)('euiGlobalToastList', className);
|
|
282
|
+
var hasContent = renderedToasts.length > 0 || clearAllButton != null;
|
|
283
|
+
var notificationBadge = (0, _react.useMemo)(function () {
|
|
284
|
+
var _toastIdToDismissedMa, _toasts$;
|
|
285
|
+
var toastWasDismissed = (_toastIdToDismissedMa = toastIdToDismissedMap[(_toasts$ = toasts[0]) === null || _toasts$ === void 0 ? void 0 : _toasts$.id]) !== null && _toastIdToDismissedMa !== void 0 ? _toastIdToDismissedMa : false;
|
|
286
|
+
var isListEmpty = toasts.every(function (t) {
|
|
287
|
+
return toastIdToDismissedMap[t.id];
|
|
288
|
+
});
|
|
289
|
+
return showNotificationBadge && toasts.length > 0 && (0, _react2.jsx)(_badge.EuiNotificationBadge, {
|
|
290
|
+
className: "euiGlobalToastList__countBadge",
|
|
291
|
+
css: [styles.notificationBadge.notificationBadge, toastWasDismissed && styles.notificationBadge.hasFadeOut, isListEmpty && styles.notificationBadge.hasFadeOut, ";label:notificationBadge;"],
|
|
292
|
+
size: "m",
|
|
293
|
+
color: "subdued",
|
|
294
|
+
"data-test-subj": "euiGlobalToastListNotificationBadge"
|
|
295
|
+
}, toasts.length);
|
|
296
|
+
}, [showNotificationBadge, toasts, toastIdToDismissedMap, styles]);
|
|
274
297
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
275
298
|
"aria-live": "polite",
|
|
276
299
|
role: "log",
|
|
277
300
|
ref: listElement,
|
|
278
301
|
css: cssStyles,
|
|
279
302
|
className: classes
|
|
280
|
-
}, rest),
|
|
303
|
+
}, rest), hasContent && (0, _react2.jsx)("div", {
|
|
304
|
+
css: styles.content
|
|
305
|
+
}, notificationBadge, renderedToasts, clearAllButton));
|
|
281
306
|
};
|