@elastic/eui 91.3.1 → 92.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.map +1 -1
- package/dist/eui_theme_dark.css +0 -513
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -513
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/basic_table/basic_table.js +5 -5
- package/es/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
- package/es/components/filter_group/filter_button.js +20 -13
- package/es/components/filter_group/filter_button.styles.js +11 -20
- package/es/components/flyout/flyout.js +4 -4
- package/es/components/flyout/flyout_resizable.js +127 -0
- package/es/components/flyout/flyout_resizable.styles.js +27 -0
- package/es/components/flyout/index.js +2 -1
- package/es/components/form/range/dual_range.js +15 -66
- package/es/components/form/range/range.js +6 -5
- package/es/components/form/range/range_slider.js +28 -22
- package/es/components/form/text_area/text_area.js +39 -3
- package/es/components/index.js +0 -2
- package/es/components/markdown_editor/markdown_editor.js +12 -13
- package/es/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +5 -0
- package/es/components/tree_view/tree_view.js +23 -25
- package/es/utils/prop_types/is.js +2 -2
- package/eui.d.ts +825 -1141
- package/i18ntokens.json +68 -338
- package/lib/components/basic_table/basic_table.js +5 -5
- package/lib/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
- package/lib/components/filter_group/filter_button.js +20 -13
- package/lib/components/filter_group/filter_button.styles.js +11 -20
- package/lib/components/flyout/flyout.js +4 -4
- package/lib/components/flyout/flyout_resizable.js +136 -0
- package/lib/components/flyout/flyout_resizable.styles.js +32 -0
- package/lib/components/flyout/index.js +8 -1
- package/lib/components/form/range/dual_range.js +15 -66
- package/lib/components/form/range/range.js +6 -5
- package/lib/components/form/range/range_slider.js +27 -21
- package/lib/components/form/text_area/text_area.js +42 -3
- package/lib/components/index.js +0 -22
- package/lib/components/markdown_editor/markdown_editor.js +12 -13
- package/lib/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
- package/lib/components/pagination/pagination_button.js +79 -2
- package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/lib/components/tree_view/tree_view.js +23 -25
- package/lib/utils/prop_types/is.js +2 -2
- package/optimize/es/components/basic_table/basic_table.js +5 -5
- package/optimize/es/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
- package/optimize/es/components/filter_group/filter_button.js +20 -13
- package/optimize/es/components/filter_group/filter_button.styles.js +11 -20
- package/optimize/es/components/flyout/flyout.js +4 -4
- package/optimize/es/components/flyout/flyout_resizable.js +121 -0
- package/optimize/es/components/flyout/flyout_resizable.styles.js +27 -0
- package/optimize/es/components/flyout/index.js +2 -1
- package/optimize/es/components/form/range/dual_range.js +15 -66
- package/optimize/es/components/form/range/range.js +6 -5
- package/optimize/es/components/form/range/range_slider.js +26 -21
- package/optimize/es/components/form/text_area/text_area.js +29 -3
- package/optimize/es/components/index.js +0 -2
- package/optimize/es/components/markdown_editor/markdown_editor.js +12 -13
- package/optimize/es/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
- package/optimize/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/optimize/es/components/tree_view/tree_view.js +23 -25
- package/optimize/es/utils/prop_types/is.js +2 -2
- package/optimize/lib/components/basic_table/basic_table.js +5 -5
- package/optimize/lib/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
- package/optimize/lib/components/filter_group/filter_button.js +20 -13
- package/optimize/lib/components/filter_group/filter_button.styles.js +11 -20
- package/optimize/lib/components/flyout/flyout.js +4 -4
- package/optimize/lib/components/flyout/flyout_resizable.js +131 -0
- package/optimize/lib/components/flyout/flyout_resizable.styles.js +32 -0
- package/optimize/lib/components/flyout/index.js +8 -1
- package/optimize/lib/components/form/range/dual_range.js +15 -66
- package/optimize/lib/components/form/range/range.js +6 -5
- package/optimize/lib/components/form/range/range_slider.js +26 -21
- package/optimize/lib/components/form/text_area/text_area.js +32 -3
- package/optimize/lib/components/index.js +0 -22
- package/optimize/lib/components/markdown_editor/markdown_editor.js +12 -13
- package/optimize/lib/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
- package/optimize/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/optimize/lib/components/tree_view/tree_view.js +23 -25
- package/optimize/lib/utils/prop_types/is.js +2 -2
- package/package.json +2 -2
- package/src/components/index.scss +0 -2
- package/test-env/components/basic_table/basic_table.js +5 -5
- package/test-env/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
- package/test-env/components/filter_group/filter_button.js +20 -13
- package/test-env/components/filter_group/filter_button.styles.js +11 -20
- package/test-env/components/flyout/flyout_resizable.js +131 -0
- package/test-env/components/flyout/flyout_resizable.styles.js +32 -0
- package/test-env/components/flyout/index.js +8 -1
- package/test-env/components/form/range/dual_range.js +15 -66
- package/test-env/components/form/range/range.js +6 -5
- package/test-env/components/form/range/range_slider.js +27 -21
- package/test-env/components/form/text_area/text_area.js +42 -3
- package/test-env/components/index.js +0 -22
- package/test-env/components/markdown_editor/markdown_editor.js +12 -13
- package/test-env/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
- package/test-env/components/pagination/pagination_button.js +79 -2
- package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/test-env/components/tree_view/tree_view.js +23 -25
- package/test-env/utils/prop_types/is.js +2 -2
- package/es/components/control_bar/control_bar.a11y.js +0 -133
- package/es/components/control_bar/control_bar.js +0 -609
- package/es/components/control_bar/index.js +0 -9
- package/es/components/notification/index.js +0 -9
- package/es/components/notification/notification_event.a11y.js +0 -104
- package/es/components/notification/notification_event.js +0 -288
- package/es/components/notification/notification_event_messages.js +0 -79
- package/es/components/notification/notification_event_meta.js +0 -148
- package/es/components/notification/notification_event_read_button.js +0 -86
- package/es/components/notification/notification_event_read_icon.js +0 -77
- package/lib/components/control_bar/control_bar.a11y.js +0 -134
- package/lib/components/control_bar/control_bar.js +0 -441
- package/lib/components/control_bar/index.js +0 -12
- package/lib/components/notification/index.js +0 -12
- package/lib/components/notification/notification_event.a11y.js +0 -105
- package/lib/components/notification/notification_event.js +0 -297
- package/lib/components/notification/notification_event_messages.js +0 -88
- package/lib/components/notification/notification_event_meta.js +0 -157
- package/lib/components/notification/notification_event_read_button.js +0 -93
- package/lib/components/notification/notification_event_read_icon.js +0 -64
- package/optimize/es/components/control_bar/control_bar.a11y.js +0 -128
- package/optimize/es/components/control_bar/control_bar.js +0 -308
- package/optimize/es/components/control_bar/index.js +0 -9
- package/optimize/es/components/notification/index.js +0 -9
- package/optimize/es/components/notification/notification_event.a11y.js +0 -99
- package/optimize/es/components/notification/notification_event.js +0 -114
- package/optimize/es/components/notification/notification_event_messages.js +0 -63
- package/optimize/es/components/notification/notification_event_meta.js +0 -106
- package/optimize/es/components/notification/notification_event_read_button.js +0 -44
- package/optimize/es/components/notification/notification_event_read_icon.js +0 -44
- package/optimize/lib/components/control_bar/control_bar.a11y.js +0 -134
- package/optimize/lib/components/control_bar/control_bar.js +0 -301
- package/optimize/lib/components/control_bar/index.js +0 -12
- package/optimize/lib/components/notification/index.js +0 -12
- package/optimize/lib/components/notification/notification_event.a11y.js +0 -105
- package/optimize/lib/components/notification/notification_event.js +0 -123
- package/optimize/lib/components/notification/notification_event_messages.js +0 -74
- package/optimize/lib/components/notification/notification_event_meta.js +0 -117
- package/optimize/lib/components/notification/notification_event_read_button.js +0 -51
- package/optimize/lib/components/notification/notification_event_read_icon.js +0 -51
- package/src/components/control_bar/_control_bar.scss +0 -232
- package/src/components/control_bar/_index.scss +0 -2
- package/src/components/control_bar/_variables.scss +0 -12
- package/src/components/notification/_index.scss +0 -5
- package/src/components/notification/_notification_event.scss +0 -40
- package/src/components/notification/_notification_event_messages.scss +0 -17
- package/src/components/notification/_notification_event_meta.scss +0 -44
- package/src/components/notification/_notification_event_read_button.scss +0 -5
- package/src/components/notification/_notification_event_read_icon.scss +0 -12
- package/test-env/components/control_bar/control_bar.a11y.js +0 -134
- package/test-env/components/control_bar/control_bar.js +0 -436
- package/test-env/components/control_bar/index.js +0 -12
- package/test-env/components/notification/index.js +0 -12
- package/test-env/components/notification/notification_event.a11y.js +0 -105
- package/test-env/components/notification/notification_event.js +0 -296
- package/test-env/components/notification/notification_event_messages.js +0 -85
- package/test-env/components/notification/notification_event_meta.js +0 -154
- package/test-env/components/notification/notification_event_read_button.js +0 -92
- package/test-env/components/notification/notification_event_read_icon.js +0 -63
|
@@ -1,154 +0,0 @@
|
|
|
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.EuiNotificationEventMeta = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
|
-
var _icon = require("../icon");
|
|
15
|
-
var _badge = require("../badge");
|
|
16
|
-
var _popover = require("../popover");
|
|
17
|
-
var _button = require("../button");
|
|
18
|
-
var _context_menu = require("../context_menu");
|
|
19
|
-
var _i18n = require("../i18n");
|
|
20
|
-
var _services = require("../../services");
|
|
21
|
-
var _react2 = require("@emotion/react");
|
|
22
|
-
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); }
|
|
23
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(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; }
|
|
24
|
-
/*
|
|
25
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
26
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
27
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
28
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
29
|
-
* Side Public License, v 1.
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
var EuiNotificationEventMeta = function EuiNotificationEventMeta(_ref) {
|
|
33
|
-
var id = _ref.id,
|
|
34
|
-
iconType = _ref.iconType,
|
|
35
|
-
type = _ref.type,
|
|
36
|
-
time = _ref.time,
|
|
37
|
-
_ref$badgeColor = _ref.badgeColor,
|
|
38
|
-
badgeColor = _ref$badgeColor === void 0 ? 'hollow' : _ref$badgeColor,
|
|
39
|
-
severity = _ref.severity,
|
|
40
|
-
eventName = _ref.eventName,
|
|
41
|
-
iconAriaLabel = _ref.iconAriaLabel,
|
|
42
|
-
onOpenContextMenu = _ref.onOpenContextMenu;
|
|
43
|
-
var _useState = (0, _react.useState)(false),
|
|
44
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
45
|
-
isPopoverOpen = _useState2[0],
|
|
46
|
-
setIsPopoverOpen = _useState2[1];
|
|
47
|
-
var classes = (0, _classnames.default)('euiNotificationEventMeta', {
|
|
48
|
-
'euiNotificationEventMeta--hasContextMenu': onOpenContextMenu
|
|
49
|
-
});
|
|
50
|
-
var _useState3 = (0, _react.useState)([]),
|
|
51
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
52
|
-
contextMenuItems = _useState4[0],
|
|
53
|
-
setContextMenuItems = _useState4[1];
|
|
54
|
-
var randomPopoverId = (0, _services.useGeneratedHtmlId)();
|
|
55
|
-
var ariaAttribute = iconAriaLabel ? {
|
|
56
|
-
'aria-label': iconAriaLabel
|
|
57
|
-
} : {
|
|
58
|
-
'aria-hidden': true
|
|
59
|
-
};
|
|
60
|
-
var onOpenPopover = function onOpenPopover() {
|
|
61
|
-
setIsPopoverOpen(!isPopoverOpen);
|
|
62
|
-
if (onOpenContextMenu) {
|
|
63
|
-
setContextMenuItems(onOpenContextMenu());
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
return (0, _react2.jsx)("div", {
|
|
67
|
-
className: classes
|
|
68
|
-
}, (0, _react2.jsx)("div", {
|
|
69
|
-
className: "euiNotificationEventMeta__section"
|
|
70
|
-
}, iconType && (0, _react2.jsx)(_icon.EuiIcon, (0, _extends2.default)({
|
|
71
|
-
className: "euiNotificationEventMeta__icon",
|
|
72
|
-
type: iconType
|
|
73
|
-
}, ariaAttribute)), type && (0, _react2.jsx)(_badge.EuiBadge, {
|
|
74
|
-
className: "euiNotificationEventMeta__badge",
|
|
75
|
-
color: badgeColor
|
|
76
|
-
}, severity ? "".concat(type, ": ").concat(severity) : type)), (0, _react2.jsx)("div", {
|
|
77
|
-
className: "euiNotificationEventMeta__section"
|
|
78
|
-
}, (0, _react2.jsx)("span", {
|
|
79
|
-
className: "euiNotificationEventMeta__time"
|
|
80
|
-
}, time)), onOpenContextMenu && (0, _react2.jsx)("div", {
|
|
81
|
-
className: "euiNotificationEventMeta__contextMenuWrapper"
|
|
82
|
-
}, (0, _react2.jsx)(_popover.EuiPopover, {
|
|
83
|
-
id: randomPopoverId,
|
|
84
|
-
ownFocus: true,
|
|
85
|
-
repositionOnScroll: true,
|
|
86
|
-
isOpen: isPopoverOpen,
|
|
87
|
-
panelPaddingSize: "none",
|
|
88
|
-
anchorPosition: "leftUp",
|
|
89
|
-
button: (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
90
|
-
token: "euiNotificationEventMeta.contextMenuButton",
|
|
91
|
-
default: "Menu for {eventName}",
|
|
92
|
-
values: {
|
|
93
|
-
eventName: eventName
|
|
94
|
-
}
|
|
95
|
-
}, function (contextMenuButton) {
|
|
96
|
-
return (0, _react2.jsx)(_button.EuiButtonIcon, {
|
|
97
|
-
"aria-label": contextMenuButton,
|
|
98
|
-
"aria-controls": randomPopoverId,
|
|
99
|
-
"aria-expanded": isPopoverOpen,
|
|
100
|
-
"aria-haspopup": "true",
|
|
101
|
-
iconType: "boxesVertical",
|
|
102
|
-
color: "text",
|
|
103
|
-
onClick: onOpenPopover,
|
|
104
|
-
"data-test-subj": "".concat(id, "-notificationEventMetaButton")
|
|
105
|
-
});
|
|
106
|
-
}),
|
|
107
|
-
closePopover: function closePopover() {
|
|
108
|
-
return setIsPopoverOpen(false);
|
|
109
|
-
}
|
|
110
|
-
}, (0, _react2.jsx)("div", {
|
|
111
|
-
onClick: function onClick() {
|
|
112
|
-
return setIsPopoverOpen(false);
|
|
113
|
-
}
|
|
114
|
-
}, (0, _react2.jsx)(_context_menu.EuiContextMenuPanel, {
|
|
115
|
-
items: contextMenuItems
|
|
116
|
-
})))));
|
|
117
|
-
};
|
|
118
|
-
exports.EuiNotificationEventMeta = EuiNotificationEventMeta;
|
|
119
|
-
EuiNotificationEventMeta.propTypes = {
|
|
120
|
-
id: _propTypes.default.string.isRequired,
|
|
121
|
-
/**
|
|
122
|
-
* Type of event (e.g. "Alert", "Cloud", etc..). Shows inside a badge.
|
|
123
|
-
*/
|
|
124
|
-
type: _propTypes.default.string.isRequired,
|
|
125
|
-
/**
|
|
126
|
-
* A unique, human-friendly name for the event to be used in aria attributes (e.g. "alert-critical-01", "cloud-no-severity-12", etc..).
|
|
127
|
-
*/
|
|
128
|
-
eventName: _propTypes.default.string.isRequired,
|
|
129
|
-
/**
|
|
130
|
-
* Type of severity (e.g. "Critical", "Warning", etc..). Shows as a text after the `type` following the format "Alert: Critical".
|
|
131
|
-
*/
|
|
132
|
-
severity: _propTypes.default.string,
|
|
133
|
-
/**
|
|
134
|
-
* Accepts either our palette colors (primary, success ..etc) or a hex value `#FFFFFF`, `#000`.
|
|
135
|
-
*/
|
|
136
|
-
badgeColor: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.string.isRequired]),
|
|
137
|
-
/**
|
|
138
|
-
* The icon used to visually represent this data type. Accepts any `EuiIcon IconType`.
|
|
139
|
-
*/
|
|
140
|
-
iconType: _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "article", "asterisk", "at", "auditbeatApp", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "codeApp", "color", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "endpoint", "eql", "eraser", "error", "esqlVis", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "grabOmnidirectional", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "launch", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "namespace", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipeBreaks", "pipelineApp", "pipeNoBreaks", "pivot", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "timeslider", "training", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "alert", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable", "tokenVectorDense", "tokenDenseVector", "tokenVectorSparse"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]),
|
|
141
|
-
/**
|
|
142
|
-
* Specify an `aria-label` for the icon.
|
|
143
|
-
* If no `aria-label` is passed we assume the icon is purely decorative.
|
|
144
|
-
*/
|
|
145
|
-
iconAriaLabel: _propTypes.default.string,
|
|
146
|
-
/**
|
|
147
|
-
* Indicates when the event was received.
|
|
148
|
-
*/
|
|
149
|
-
time: _propTypes.default.node.isRequired,
|
|
150
|
-
/**
|
|
151
|
-
* Necessary to trigger `onOpenContextMenu` from #EuiNotificationEvent
|
|
152
|
-
*/
|
|
153
|
-
onOpenContextMenu: _propTypes.default.func
|
|
154
|
-
};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.EuiNotificationEventReadButton = 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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
-
var _button = require("../button");
|
|
13
|
-
var _i18n = require("../i18n");
|
|
14
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
var _react2 = require("@emotion/react");
|
|
16
|
-
var _excluded = ["id", "isRead", "onClick", "eventName"];
|
|
17
|
-
/*
|
|
18
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
19
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
20
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
21
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
22
|
-
* Side Public License, v 1.
|
|
23
|
-
*/
|
|
24
|
-
var EuiNotificationEventReadButton = function EuiNotificationEventReadButton(_ref) {
|
|
25
|
-
var id = _ref.id,
|
|
26
|
-
isRead = _ref.isRead,
|
|
27
|
-
onClick = _ref.onClick,
|
|
28
|
-
eventName = _ref.eventName,
|
|
29
|
-
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
30
|
-
var classesReadState = (0, _classnames.default)('euiNotificationEventReadButton', {
|
|
31
|
-
'euiNotificationEventReadButton--isRead': isRead
|
|
32
|
-
});
|
|
33
|
-
var markAsReadAria = (0, _i18n.useEuiI18n)('euiNotificationEventReadButton.markAsReadAria', 'Mark {eventName} as read', {
|
|
34
|
-
eventName: eventName
|
|
35
|
-
});
|
|
36
|
-
var markAsUnreadAria = (0, _i18n.useEuiI18n)('euiNotificationEventReadButton.markAsUnreadAria', 'Mark {eventName} as unread', {
|
|
37
|
-
eventName: eventName
|
|
38
|
-
});
|
|
39
|
-
var markAsRead = (0, _i18n.useEuiI18n)('euiNotificationEventReadButton.markAsRead', 'Mark as read');
|
|
40
|
-
var markAsUnread = (0, _i18n.useEuiI18n)('euiNotificationEventReadButton.markAsUnread', 'Mark as unread');
|
|
41
|
-
var buttonAriaLabel = isRead ? markAsUnreadAria : markAsReadAria;
|
|
42
|
-
var buttonTitle = isRead ? markAsUnread : markAsRead;
|
|
43
|
-
return (0, _react2.jsx)(_button.EuiButtonIcon, (0, _extends2.default)({
|
|
44
|
-
iconType: "dot",
|
|
45
|
-
"aria-label": buttonAriaLabel,
|
|
46
|
-
title: buttonTitle,
|
|
47
|
-
className: classesReadState,
|
|
48
|
-
onClick: onClick,
|
|
49
|
-
"data-test-subj": "".concat(id, "-notificationEventReadButton")
|
|
50
|
-
}, rest));
|
|
51
|
-
};
|
|
52
|
-
exports.EuiNotificationEventReadButton = EuiNotificationEventReadButton;
|
|
53
|
-
EuiNotificationEventReadButton.propTypes = {
|
|
54
|
-
/**
|
|
55
|
-
* Any of the named color palette options.
|
|
56
|
-
*/
|
|
57
|
-
color: _propTypes.default.any,
|
|
58
|
-
"aria-label": _propTypes.default.string,
|
|
59
|
-
"aria-labelledby": _propTypes.default.string,
|
|
60
|
-
/**
|
|
61
|
-
* Size of the icon only.
|
|
62
|
-
* This will not affect the overall size of the button
|
|
63
|
-
*/
|
|
64
|
-
iconSize: _propTypes.default.any,
|
|
65
|
-
/**
|
|
66
|
-
* Sets the display style for matching other EuiButton types.
|
|
67
|
-
* `base` is equivalent to a typical EuiButton
|
|
68
|
-
* `fill` is equivalent to a filled EuiButton
|
|
69
|
-
* `empty` (default) is equivalent to an EuiButtonEmpty
|
|
70
|
-
*/
|
|
71
|
-
display: _propTypes.default.any,
|
|
72
|
-
/**
|
|
73
|
-
* Disables the button and changes the icon to a loading spinner
|
|
74
|
-
*/
|
|
75
|
-
isLoading: _propTypes.default.bool,
|
|
76
|
-
className: _propTypes.default.string,
|
|
77
|
-
"data-test-subj": _propTypes.default.string,
|
|
78
|
-
css: _propTypes.default.any,
|
|
79
|
-
id: _propTypes.default.string.isRequired,
|
|
80
|
-
/**
|
|
81
|
-
* Shows an indicator of the read state of the event
|
|
82
|
-
*/
|
|
83
|
-
isRead: _propTypes.default.bool.isRequired,
|
|
84
|
-
/**
|
|
85
|
-
* Applies an `onClick` handler to the `read` indicator.
|
|
86
|
-
*/
|
|
87
|
-
onClick: _propTypes.default.func.isRequired,
|
|
88
|
-
/**
|
|
89
|
-
* A unique, human-friendly name for the event to be used in aria attributes (e.g. "alert-critical-01", "cloud-no-severity-12", etc..).
|
|
90
|
-
*/
|
|
91
|
-
eventName: _propTypes.default.string.isRequired
|
|
92
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.EuiNotificationEventReadIcon = 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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
-
var _i18n = require("../i18n");
|
|
13
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
|
-
var _icon = require("../icon");
|
|
15
|
-
var _react2 = require("@emotion/react");
|
|
16
|
-
var _excluded = ["id", "isRead", "eventName"];
|
|
17
|
-
/*
|
|
18
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
19
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
20
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
21
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
22
|
-
* Side Public License, v 1.
|
|
23
|
-
*/
|
|
24
|
-
var EuiNotificationEventReadIcon = function EuiNotificationEventReadIcon(_ref) {
|
|
25
|
-
var id = _ref.id,
|
|
26
|
-
isRead = _ref.isRead,
|
|
27
|
-
eventName = _ref.eventName,
|
|
28
|
-
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
29
|
-
var classesReadState = (0, _classnames.default)('euiNotificationEventReadIcon', {
|
|
30
|
-
'euiNotificationEventReadIcon--isRead': isRead
|
|
31
|
-
});
|
|
32
|
-
var readAria = (0, _i18n.useEuiI18n)('euiNotificationEventReadIcon.readAria', '{eventName} is read', {
|
|
33
|
-
eventName: eventName
|
|
34
|
-
});
|
|
35
|
-
var unreadAria = (0, _i18n.useEuiI18n)('euiNotificationEventReadIcon.unreadAria', '{eventName} is unread', {
|
|
36
|
-
eventName: eventName
|
|
37
|
-
});
|
|
38
|
-
var readTitle = (0, _i18n.useEuiI18n)('euiNotificationEventReadIcon.read', 'Read');
|
|
39
|
-
var unreadTitle = (0, _i18n.useEuiI18n)('euiNotificationEventReadIcon.unread', 'Unread');
|
|
40
|
-
var iconAriaLabel = isRead ? readAria : unreadAria;
|
|
41
|
-
var iconTitle = isRead ? readTitle : unreadTitle;
|
|
42
|
-
return (0, _react2.jsx)("div", {
|
|
43
|
-
className: classesReadState
|
|
44
|
-
}, (0, _react2.jsx)(_icon.EuiIcon, (0, _extends2.default)({
|
|
45
|
-
type: "dot",
|
|
46
|
-
"aria-label": iconAriaLabel,
|
|
47
|
-
title: iconTitle,
|
|
48
|
-
color: "primary",
|
|
49
|
-
"data-test-subj": "".concat(id, "-notificationEventReadIcon")
|
|
50
|
-
}, rest)));
|
|
51
|
-
};
|
|
52
|
-
exports.EuiNotificationEventReadIcon = EuiNotificationEventReadIcon;
|
|
53
|
-
EuiNotificationEventReadIcon.propTypes = {
|
|
54
|
-
id: _propTypes.default.string.isRequired,
|
|
55
|
-
/**
|
|
56
|
-
* Shows an indicator of the read state of the event
|
|
57
|
-
*/
|
|
58
|
-
isRead: _propTypes.default.bool.isRequired,
|
|
59
|
-
/**
|
|
60
|
-
* A unique, human-friendly name for the event to be used in aria attributes (e.g. "alert-critical-01", "cloud-no-severity-12", etc..).
|
|
61
|
-
*/
|
|
62
|
-
eventName: _propTypes.default.string.isRequired
|
|
63
|
-
};
|