@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.
Files changed (160) hide show
  1. package/dist/eui_charts_theme.js.map +1 -1
  2. package/dist/eui_theme_dark.css +0 -513
  3. package/dist/eui_theme_dark.min.css +1 -1
  4. package/dist/eui_theme_light.css +0 -513
  5. package/dist/eui_theme_light.min.css +1 -1
  6. package/es/components/basic_table/basic_table.js +5 -5
  7. package/es/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  8. package/es/components/filter_group/filter_button.js +20 -13
  9. package/es/components/filter_group/filter_button.styles.js +11 -20
  10. package/es/components/flyout/flyout.js +4 -4
  11. package/es/components/flyout/flyout_resizable.js +127 -0
  12. package/es/components/flyout/flyout_resizable.styles.js +27 -0
  13. package/es/components/flyout/index.js +2 -1
  14. package/es/components/form/range/dual_range.js +15 -66
  15. package/es/components/form/range/range.js +6 -5
  16. package/es/components/form/range/range_slider.js +28 -22
  17. package/es/components/form/text_area/text_area.js +39 -3
  18. package/es/components/index.js +0 -2
  19. package/es/components/markdown_editor/markdown_editor.js +12 -13
  20. package/es/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  21. package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  22. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +5 -0
  23. package/es/components/tree_view/tree_view.js +23 -25
  24. package/es/utils/prop_types/is.js +2 -2
  25. package/eui.d.ts +825 -1141
  26. package/i18ntokens.json +68 -338
  27. package/lib/components/basic_table/basic_table.js +5 -5
  28. package/lib/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  29. package/lib/components/filter_group/filter_button.js +20 -13
  30. package/lib/components/filter_group/filter_button.styles.js +11 -20
  31. package/lib/components/flyout/flyout.js +4 -4
  32. package/lib/components/flyout/flyout_resizable.js +136 -0
  33. package/lib/components/flyout/flyout_resizable.styles.js +32 -0
  34. package/lib/components/flyout/index.js +8 -1
  35. package/lib/components/form/range/dual_range.js +15 -66
  36. package/lib/components/form/range/range.js +6 -5
  37. package/lib/components/form/range/range_slider.js +27 -21
  38. package/lib/components/form/text_area/text_area.js +42 -3
  39. package/lib/components/index.js +0 -22
  40. package/lib/components/markdown_editor/markdown_editor.js +12 -13
  41. package/lib/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  42. package/lib/components/pagination/pagination_button.js +79 -2
  43. package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  44. package/lib/components/tree_view/tree_view.js +23 -25
  45. package/lib/utils/prop_types/is.js +2 -2
  46. package/optimize/es/components/basic_table/basic_table.js +5 -5
  47. package/optimize/es/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  48. package/optimize/es/components/filter_group/filter_button.js +20 -13
  49. package/optimize/es/components/filter_group/filter_button.styles.js +11 -20
  50. package/optimize/es/components/flyout/flyout.js +4 -4
  51. package/optimize/es/components/flyout/flyout_resizable.js +121 -0
  52. package/optimize/es/components/flyout/flyout_resizable.styles.js +27 -0
  53. package/optimize/es/components/flyout/index.js +2 -1
  54. package/optimize/es/components/form/range/dual_range.js +15 -66
  55. package/optimize/es/components/form/range/range.js +6 -5
  56. package/optimize/es/components/form/range/range_slider.js +26 -21
  57. package/optimize/es/components/form/text_area/text_area.js +29 -3
  58. package/optimize/es/components/index.js +0 -2
  59. package/optimize/es/components/markdown_editor/markdown_editor.js +12 -13
  60. package/optimize/es/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  61. package/optimize/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  62. package/optimize/es/components/tree_view/tree_view.js +23 -25
  63. package/optimize/es/utils/prop_types/is.js +2 -2
  64. package/optimize/lib/components/basic_table/basic_table.js +5 -5
  65. package/optimize/lib/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  66. package/optimize/lib/components/filter_group/filter_button.js +20 -13
  67. package/optimize/lib/components/filter_group/filter_button.styles.js +11 -20
  68. package/optimize/lib/components/flyout/flyout.js +4 -4
  69. package/optimize/lib/components/flyout/flyout_resizable.js +131 -0
  70. package/optimize/lib/components/flyout/flyout_resizable.styles.js +32 -0
  71. package/optimize/lib/components/flyout/index.js +8 -1
  72. package/optimize/lib/components/form/range/dual_range.js +15 -66
  73. package/optimize/lib/components/form/range/range.js +6 -5
  74. package/optimize/lib/components/form/range/range_slider.js +26 -21
  75. package/optimize/lib/components/form/text_area/text_area.js +32 -3
  76. package/optimize/lib/components/index.js +0 -22
  77. package/optimize/lib/components/markdown_editor/markdown_editor.js +12 -13
  78. package/optimize/lib/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  79. package/optimize/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  80. package/optimize/lib/components/tree_view/tree_view.js +23 -25
  81. package/optimize/lib/utils/prop_types/is.js +2 -2
  82. package/package.json +2 -2
  83. package/src/components/index.scss +0 -2
  84. package/test-env/components/basic_table/basic_table.js +5 -5
  85. package/test-env/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  86. package/test-env/components/filter_group/filter_button.js +20 -13
  87. package/test-env/components/filter_group/filter_button.styles.js +11 -20
  88. package/test-env/components/flyout/flyout_resizable.js +131 -0
  89. package/test-env/components/flyout/flyout_resizable.styles.js +32 -0
  90. package/test-env/components/flyout/index.js +8 -1
  91. package/test-env/components/form/range/dual_range.js +15 -66
  92. package/test-env/components/form/range/range.js +6 -5
  93. package/test-env/components/form/range/range_slider.js +27 -21
  94. package/test-env/components/form/text_area/text_area.js +42 -3
  95. package/test-env/components/index.js +0 -22
  96. package/test-env/components/markdown_editor/markdown_editor.js +12 -13
  97. package/test-env/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  98. package/test-env/components/pagination/pagination_button.js +79 -2
  99. package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
  100. package/test-env/components/tree_view/tree_view.js +23 -25
  101. package/test-env/utils/prop_types/is.js +2 -2
  102. package/es/components/control_bar/control_bar.a11y.js +0 -133
  103. package/es/components/control_bar/control_bar.js +0 -609
  104. package/es/components/control_bar/index.js +0 -9
  105. package/es/components/notification/index.js +0 -9
  106. package/es/components/notification/notification_event.a11y.js +0 -104
  107. package/es/components/notification/notification_event.js +0 -288
  108. package/es/components/notification/notification_event_messages.js +0 -79
  109. package/es/components/notification/notification_event_meta.js +0 -148
  110. package/es/components/notification/notification_event_read_button.js +0 -86
  111. package/es/components/notification/notification_event_read_icon.js +0 -77
  112. package/lib/components/control_bar/control_bar.a11y.js +0 -134
  113. package/lib/components/control_bar/control_bar.js +0 -441
  114. package/lib/components/control_bar/index.js +0 -12
  115. package/lib/components/notification/index.js +0 -12
  116. package/lib/components/notification/notification_event.a11y.js +0 -105
  117. package/lib/components/notification/notification_event.js +0 -297
  118. package/lib/components/notification/notification_event_messages.js +0 -88
  119. package/lib/components/notification/notification_event_meta.js +0 -157
  120. package/lib/components/notification/notification_event_read_button.js +0 -93
  121. package/lib/components/notification/notification_event_read_icon.js +0 -64
  122. package/optimize/es/components/control_bar/control_bar.a11y.js +0 -128
  123. package/optimize/es/components/control_bar/control_bar.js +0 -308
  124. package/optimize/es/components/control_bar/index.js +0 -9
  125. package/optimize/es/components/notification/index.js +0 -9
  126. package/optimize/es/components/notification/notification_event.a11y.js +0 -99
  127. package/optimize/es/components/notification/notification_event.js +0 -114
  128. package/optimize/es/components/notification/notification_event_messages.js +0 -63
  129. package/optimize/es/components/notification/notification_event_meta.js +0 -106
  130. package/optimize/es/components/notification/notification_event_read_button.js +0 -44
  131. package/optimize/es/components/notification/notification_event_read_icon.js +0 -44
  132. package/optimize/lib/components/control_bar/control_bar.a11y.js +0 -134
  133. package/optimize/lib/components/control_bar/control_bar.js +0 -301
  134. package/optimize/lib/components/control_bar/index.js +0 -12
  135. package/optimize/lib/components/notification/index.js +0 -12
  136. package/optimize/lib/components/notification/notification_event.a11y.js +0 -105
  137. package/optimize/lib/components/notification/notification_event.js +0 -123
  138. package/optimize/lib/components/notification/notification_event_messages.js +0 -74
  139. package/optimize/lib/components/notification/notification_event_meta.js +0 -117
  140. package/optimize/lib/components/notification/notification_event_read_button.js +0 -51
  141. package/optimize/lib/components/notification/notification_event_read_icon.js +0 -51
  142. package/src/components/control_bar/_control_bar.scss +0 -232
  143. package/src/components/control_bar/_index.scss +0 -2
  144. package/src/components/control_bar/_variables.scss +0 -12
  145. package/src/components/notification/_index.scss +0 -5
  146. package/src/components/notification/_notification_event.scss +0 -40
  147. package/src/components/notification/_notification_event_messages.scss +0 -17
  148. package/src/components/notification/_notification_event_meta.scss +0 -44
  149. package/src/components/notification/_notification_event_read_button.scss +0 -5
  150. package/src/components/notification/_notification_event_read_icon.scss +0 -12
  151. package/test-env/components/control_bar/control_bar.a11y.js +0 -134
  152. package/test-env/components/control_bar/control_bar.js +0 -436
  153. package/test-env/components/control_bar/index.js +0 -12
  154. package/test-env/components/notification/index.js +0 -12
  155. package/test-env/components/notification/notification_event.a11y.js +0 -105
  156. package/test-env/components/notification/notification_event.js +0 -296
  157. package/test-env/components/notification/notification_event_messages.js +0 -85
  158. package/test-env/components/notification/notification_event_meta.js +0 -154
  159. package/test-env/components/notification/notification_event_read_button.js +0 -92
  160. package/test-env/components/notification/notification_event_read_icon.js +0 -63
@@ -1,297 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.EuiNotificationEvent = void 0;
8
- var _react = _interopRequireWildcard(require("react"));
9
- var _propTypes = _interopRequireDefault(require("prop-types"));
10
- var _classnames = _interopRequireDefault(require("classnames"));
11
- var _notification_event_meta = require("./notification_event_meta");
12
- var _notification_event_messages = require("./notification_event_messages");
13
- var _notification_event_read_button = require("./notification_event_read_button");
14
- var _button = require("../button");
15
- var _link = require("../link");
16
- var _services = require("../../services");
17
- var _notification_event_read_icon = require("./notification_event_read_icon");
18
- var _react2 = require("@emotion/react");
19
- var _excluded = ["id", "type", "severity", "badgeColor", "iconType", "iconAriaLabel", "time", "title", "isRead", "primaryAction", "primaryActionProps", "messages", "onRead", "onOpenContextMenu", "onClickTitle", "onClickPrimaryAction", "headingLevel", "className"];
20
- /*
21
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
22
- * or more contributor license agreements. Licensed under the Elastic License
23
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
24
- * in compliance with, at your election, the Elastic License 2.0 or the Server
25
- * Side Public License, v 1.
26
- */
27
- /**
28
- * @deprecated
29
- */
30
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31
- 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); }
32
- 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; }
33
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
34
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
35
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
36
- /**
37
- * @deprecated - EuiNotificationEvent is scheduled for deprecation due to low internal usage and high
38
- * maintenance requirements. If necessary, we recommend copying this component into your own application.
39
- *
40
- * The component will be permanently removed in December 2023.
41
- */
42
- var EuiNotificationEvent = function EuiNotificationEvent(_ref) {
43
- var id = _ref.id,
44
- type = _ref.type,
45
- severity = _ref.severity,
46
- badgeColor = _ref.badgeColor,
47
- iconType = _ref.iconType,
48
- iconAriaLabel = _ref.iconAriaLabel,
49
- time = _ref.time,
50
- title = _ref.title,
51
- isRead = _ref.isRead,
52
- primaryAction = _ref.primaryAction,
53
- primaryActionProps = _ref.primaryActionProps,
54
- messages = _ref.messages,
55
- onRead = _ref.onRead,
56
- onOpenContextMenu = _ref.onOpenContextMenu,
57
- onClickTitle = _ref.onClickTitle,
58
- onClickPrimaryAction = _ref.onClickPrimaryAction,
59
- _ref$headingLevel = _ref.headingLevel,
60
- headingLevel = _ref$headingLevel === void 0 ? 'h2' : _ref$headingLevel,
61
- className = _ref.className,
62
- rest = _objectWithoutProperties(_ref, _excluded);
63
- var classes = (0, _classnames.default)('euiNotificationEvent', {
64
- 'euiNotificationEvent--withReadState': typeof isRead === 'boolean'
65
- }, className);
66
- var classesTitle = (0, _classnames.default)('euiNotificationEvent__title', {
67
- 'euiNotificationEvent__title--isRead': isRead
68
- });
69
- var randomHeadingId = (0, _services.useGeneratedHtmlId)();
70
- var titleProps = {
71
- id: randomHeadingId,
72
- className: classesTitle,
73
- 'data-test-subj': "".concat(id, "-notificationEventTitle")
74
- };
75
- return (0, _react2.jsx)("article", _extends({
76
- "aria-labelledby": randomHeadingId,
77
- className: classes,
78
- key: id
79
- }, rest), typeof isRead === 'boolean' && (0, _react2.jsx)("div", {
80
- className: "euiNotificationEvent__readButton"
81
- }, !!onRead ? (0, _react2.jsx)(_notification_event_read_button.EuiNotificationEventReadButton, {
82
- isRead: isRead,
83
- onClick: function onClick() {
84
- return onRead(id, isRead);
85
- },
86
- eventName: title,
87
- id: id
88
- }) : (0, _react2.jsx)(_notification_event_read_icon.EuiNotificationEventReadIcon, {
89
- id: id,
90
- isRead: isRead,
91
- eventName: title
92
- })), (0, _react2.jsx)("div", {
93
- className: "euiNotificationEvent__content"
94
- }, (0, _react2.jsx)(_notification_event_meta.EuiNotificationEventMeta, {
95
- id: id,
96
- type: type,
97
- severity: severity,
98
- badgeColor: badgeColor,
99
- iconType: iconType,
100
- iconAriaLabel: iconAriaLabel,
101
- time: time,
102
- onOpenContextMenu: onOpenContextMenu ? function () {
103
- return onOpenContextMenu(id);
104
- } : undefined,
105
- eventName: title
106
- }), onClickTitle ? (0, _react2.jsx)(_link.EuiLink, _extends({
107
- onClick: function onClick() {
108
- return onClickTitle(id);
109
- }
110
- }, titleProps), /*#__PURE__*/(0, _react.createElement)(headingLevel, null, title)) : /*#__PURE__*/(0, _react.createElement)(headingLevel, titleProps, title), (0, _react2.jsx)(_notification_event_messages.EuiNotificationEventMessages, {
111
- messages: messages,
112
- eventName: title
113
- }), onClickPrimaryAction && primaryAction && (0, _react2.jsx)("div", {
114
- className: "euiNotificationEvent__primaryAction"
115
- }, (0, _react2.jsx)(_button.EuiButtonEmpty, _extends({
116
- flush: "left",
117
- size: "s"
118
- }, primaryActionProps, {
119
- onClick: function onClick() {
120
- return onClickPrimaryAction === null || onClickPrimaryAction === void 0 ? void 0 : onClickPrimaryAction(id);
121
- },
122
- "data-test-subj": "".concat(id, "-notificationEventPrimaryAction")
123
- }), primaryAction))));
124
- };
125
- exports.EuiNotificationEvent = EuiNotificationEvent;
126
- EuiNotificationEvent.propTypes = {
127
- /**
128
- * Type of event (e.g. "Alert", "Cloud", etc..). Shows inside a badge.
129
- */
130
- type: _propTypes.default.string.isRequired,
131
- /**
132
- * Type of severity (e.g. "Critical", "Warning", etc..). Shows as a text after the `type` following the format "Alert: Critical".
133
- */
134
- severity: _propTypes.default.string,
135
- /**
136
- * Accepts either our palette colors (primary, success ..etc) or a hex value `#FFFFFF`, `#000`.
137
- */
138
- badgeColor: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.string.isRequired]),
139
- /**
140
- * The icon used to visually represent this data type. Accepts any `EuiIcon IconType`.
141
- */
142
- 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]),
143
- /**
144
- * Specify an `aria-label` for the icon.
145
- * If no `aria-label` is passed we assume the icon is purely decorative.
146
- */
147
- iconAriaLabel: _propTypes.default.string,
148
- /**
149
- * Indicates when the event was received.
150
- */
151
- time: _propTypes.default.node.isRequired,
152
- "aria-label": _propTypes.default.string,
153
- "aria-labelledby": _propTypes.default.string,
154
- /**
155
- * Size of the icon only.
156
- * This will not affect the overall size of the button
157
- */
158
- iconSize: _propTypes.default.any,
159
- /**
160
- * Sets the display style for matching other EuiButton types.
161
- * `base` is equivalent to a typical EuiButton
162
- * `fill` is equivalent to a filled EuiButton
163
- * `empty` (default) is equivalent to an EuiButtonEmpty
164
- */
165
- display: _propTypes.default.any,
166
- /**
167
- * Disables the button and changes the icon to a loading spinner
168
- */
169
- isLoading: _propTypes.default.bool,
170
- className: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.string]),
171
- "data-test-subj": _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.string]),
172
- css: _propTypes.default.oneOfType([_propTypes.default.any, _propTypes.default.any]),
173
- /**
174
- * A unique identifier
175
- */
176
- id: _propTypes.default.string.isRequired,
177
- /**
178
- * The title of the event.
179
- */
180
- title: _propTypes.default.string.isRequired,
181
- /**
182
- * The heading level of the title.
183
- */
184
- headingLevel: _propTypes.default.oneOf(["h2", "h3", "h4", "h5", "h6"]),
185
- /**
186
- * Returns the `id` and applies an `onClick` handler to the title.
187
- */
188
- onClickTitle: _propTypes.default.func,
189
- /**
190
- * The label of the primary action
191
- */
192
- primaryAction: _propTypes.default.string,
193
- /**
194
- * Apply more props to the `primaryAction` button. See #EuiPrimaryActionProps.
195
- */
196
- primaryActionProps: _propTypes.default.shape({
197
- href: _propTypes.default.string,
198
- onClick: _propTypes.default.func,
199
- /**
200
- * Any of the named color palette options.
201
- */
202
- color: _propTypes.default.any,
203
- size: _propTypes.default.any,
204
- /**
205
- * Ensure the text of the button sits flush to the left, right, or both sides of its container
206
- */
207
- /**
208
- * Ensure the text of the button sits flush to the left, right, or both sides of its container
209
- */
210
- flush: _propTypes.default.any,
211
- /**
212
- * `disabled` is also allowed
213
- */
214
- /**
215
- * `disabled` is also allowed
216
- */
217
- isDisabled: _propTypes.default.bool,
218
- /**
219
- * Force disables the button and changes the icon to a loading spinner
220
- */
221
- /**
222
- * Force disables the button and changes the icon to a loading spinner
223
- */
224
- isLoading: _propTypes.default.bool,
225
- /**
226
- * Applies the boolean state as the `aria-pressed` property to create a toggle button.
227
- * *Only use when the readable text does not change between states.*
228
- */
229
- /**
230
- * Applies the boolean state as the `aria-pressed` property to create a toggle button.
231
- * *Only use when the readable text does not change between states.*
232
- */
233
- isSelected: _propTypes.default.bool,
234
- target: _propTypes.default.string,
235
- rel: _propTypes.default.string,
236
- type: _propTypes.default.oneOf(["button", "submit"]),
237
- buttonRef: _propTypes.default.any,
238
- /**
239
- * Object of props passed to the `<span>` wrapping the button's content
240
- */
241
- /**
242
- * Object of props passed to the `<span>` wrapping the button's content
243
- */
244
- contentProps: _propTypes.default.shape({
245
- className: _propTypes.default.string,
246
- "aria-label": _propTypes.default.string,
247
- "data-test-subj": _propTypes.default.string,
248
- css: _propTypes.default.any
249
- }),
250
- /**
251
- * Any `type` accepted by EuiIcon
252
- */
253
- 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]),
254
- /**
255
- * Can only be one side `left` or `right`
256
- */
257
- iconSide: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf([undefined])]),
258
- /**
259
- * Object of props passed to the `<span>` wrapping the content's text/children only (not icon)
260
- *
261
- * This span wrapper can be removed by passing `textProps={false}`.
262
- */
263
- textProps: _propTypes.default.oneOfType([_propTypes.default.shape({
264
- className: _propTypes.default.string,
265
- "aria-label": _propTypes.default.string,
266
- "data-test-subj": _propTypes.default.string,
267
- css: _propTypes.default.any,
268
- ref: _propTypes.default.any,
269
- "data-text": _propTypes.default.string
270
- }).isRequired, _propTypes.default.oneOf([false])]),
271
- iconSize: _propTypes.default.any,
272
- className: _propTypes.default.string,
273
- "aria-label": _propTypes.default.string,
274
- "data-test-subj": _propTypes.default.string,
275
- css: _propTypes.default.any
276
- }),
277
- /**
278
- * Returns the `id` and applies an `onClick` handler to the `primaryAction`.
279
- */
280
- onClickPrimaryAction: _propTypes.default.func,
281
- /**
282
- * Notification messages as an array of strings. More than one message wraps in an accordion.
283
- */
284
- messages: _propTypes.default.arrayOf(_propTypes.default.string.isRequired).isRequired,
285
- /**
286
- * Shows an indicator of the read state of the event. Leave as `undefined` to hide the indicator.
287
- */
288
- isRead: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.oneOf([undefined])]),
289
- /**
290
- * Returns the `id` and `isRead` state. Applies an `onClick` handler to the `read` indicator.
291
- */
292
- onRead: _propTypes.default.func,
293
- /**
294
- * Provided the `id` of the event must return an array of #EuiContextMenuItem elements.
295
- */
296
- onOpenContextMenu: _propTypes.default.func
297
- };
@@ -1,88 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.EuiNotificationEventMessages = void 0;
8
- var _react = _interopRequireWildcard(require("react"));
9
- var _propTypes = _interopRequireDefault(require("prop-types"));
10
- var _accordion = require("../accordion");
11
- var _services = require("../../services");
12
- var _i18n = require("../i18n");
13
- var _text = require("../text");
14
- var _react2 = require("@emotion/react");
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
- 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); }
17
- 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; }
18
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
19
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
20
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
21
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
22
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
23
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /*
24
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
25
- * or more contributor license agreements. Licensed under the Elastic License
26
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
27
- * in compliance with, at your election, the Elastic License 2.0 or the Server
28
- * Side Public License, v 1.
29
- */
30
- var EuiNotificationEventMessages = function EuiNotificationEventMessages(_ref) {
31
- var messages = _ref.messages,
32
- eventName = _ref.eventName;
33
- var _useState = (0, _react.useState)(false),
34
- _useState2 = _slicedToArray(_useState, 2),
35
- isOpen = _useState2[0],
36
- setIsOpen = _useState2[1];
37
- var messagesLength = messages.length;
38
- var accordionId = (0, _services.useGeneratedHtmlId)({
39
- prefix: 'euiNotificationEventMessagesAccordion'
40
- });
41
- var accordionButtonText = (0, _i18n.useEuiI18n)('euiNotificationEventMessages.accordionButtonText', '+ {messagesLength} more', {
42
- messagesLength: messagesLength - 1
43
- });
44
- var accordionAriaLabelButtonText = (0, _i18n.useEuiI18n)('euiNotificationEventMessages.accordionAriaLabelButtonText', '+ {messagesLength} messages for {eventName}', {
45
- messagesLength: messagesLength - 1,
46
- eventName: eventName
47
- });
48
- var accordionHideText = (0, _i18n.useEuiI18n)('euiNotificationEventMessages.accordionHideText', 'hide');
49
- var buttonContentText = isOpen ? "".concat(accordionButtonText, " (").concat(accordionHideText, ")") : accordionButtonText;
50
- return (0, _react2.jsx)("div", {
51
- className: "euiNotificationEventMessages"
52
- }, messages && messagesLength === 1 ? (0, _react2.jsx)(_text.EuiText, {
53
- size: "s",
54
- color: "subdued"
55
- }, (0, _react2.jsx)("p", null, messages)) : (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_text.EuiText, {
56
- size: "s",
57
- color: "subdued"
58
- }, (0, _react2.jsx)("p", null, messages[0])), (0, _react2.jsx)(_accordion.EuiAccordion, {
59
- onToggle: setIsOpen,
60
- buttonProps: {
61
- 'aria-label': accordionAriaLabelButtonText
62
- },
63
- id: accordionId,
64
- className: "euiNotificationEventMessages__accordion",
65
- buttonContent: buttonContentText,
66
- buttonClassName: "euiNotificationEventMessages__accordionButton",
67
- arrowDisplay: "none"
68
- }, (0, _react2.jsx)("div", {
69
- className: "euiNotificationEventMessages__accordionContent"
70
- }, messages.map(function (notification, index) {
71
- return (0, _react2.jsx)(_text.EuiText, {
72
- size: "s",
73
- key: index,
74
- color: "subdued"
75
- }, (0, _react2.jsx)("p", null, notification));
76
- }).slice(1)))));
77
- };
78
- exports.EuiNotificationEventMessages = EuiNotificationEventMessages;
79
- EuiNotificationEventMessages.propTypes = {
80
- /*
81
- * An array of strings that get individually wrapped in `<p>` tags
82
- */
83
- messages: _propTypes.default.arrayOf(_propTypes.default.string.isRequired).isRequired,
84
- /**
85
- * A unique, human-friendly name for the event to be used in aria attributes (e.g. "alert-critical-01", "cloud-no-severity-12", etc..).
86
- */
87
- eventName: _propTypes.default.string.isRequired
88
- };
@@ -1,157 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.EuiNotificationEventMeta = void 0;
8
- var _react = _interopRequireWildcard(require("react"));
9
- var _propTypes = _interopRequireDefault(require("prop-types"));
10
- var _classnames = _interopRequireDefault(require("classnames"));
11
- var _icon = require("../icon");
12
- var _badge = require("../badge");
13
- var _popover = require("../popover");
14
- var _button = require("../button");
15
- var _context_menu = require("../context_menu");
16
- var _i18n = require("../i18n");
17
- var _services = require("../../services");
18
- var _react2 = require("@emotion/react");
19
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
- 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); }
21
- 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; }
22
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
23
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
24
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
25
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
26
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
27
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
28
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /*
29
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
30
- * or more contributor license agreements. Licensed under the Elastic License
31
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
32
- * in compliance with, at your election, the Elastic License 2.0 or the Server
33
- * Side Public License, v 1.
34
- */
35
- var EuiNotificationEventMeta = function EuiNotificationEventMeta(_ref) {
36
- var id = _ref.id,
37
- iconType = _ref.iconType,
38
- type = _ref.type,
39
- time = _ref.time,
40
- _ref$badgeColor = _ref.badgeColor,
41
- badgeColor = _ref$badgeColor === void 0 ? 'hollow' : _ref$badgeColor,
42
- severity = _ref.severity,
43
- eventName = _ref.eventName,
44
- iconAriaLabel = _ref.iconAriaLabel,
45
- onOpenContextMenu = _ref.onOpenContextMenu;
46
- var _useState = (0, _react.useState)(false),
47
- _useState2 = _slicedToArray(_useState, 2),
48
- isPopoverOpen = _useState2[0],
49
- setIsPopoverOpen = _useState2[1];
50
- var classes = (0, _classnames.default)('euiNotificationEventMeta', {
51
- 'euiNotificationEventMeta--hasContextMenu': onOpenContextMenu
52
- });
53
- var _useState3 = (0, _react.useState)([]),
54
- _useState4 = _slicedToArray(_useState3, 2),
55
- contextMenuItems = _useState4[0],
56
- setContextMenuItems = _useState4[1];
57
- var randomPopoverId = (0, _services.useGeneratedHtmlId)();
58
- var ariaAttribute = iconAriaLabel ? {
59
- 'aria-label': iconAriaLabel
60
- } : {
61
- 'aria-hidden': true
62
- };
63
- var onOpenPopover = function onOpenPopover() {
64
- setIsPopoverOpen(!isPopoverOpen);
65
- if (onOpenContextMenu) {
66
- setContextMenuItems(onOpenContextMenu());
67
- }
68
- };
69
- return (0, _react2.jsx)("div", {
70
- className: classes
71
- }, (0, _react2.jsx)("div", {
72
- className: "euiNotificationEventMeta__section"
73
- }, iconType && (0, _react2.jsx)(_icon.EuiIcon, _extends({
74
- className: "euiNotificationEventMeta__icon",
75
- type: iconType
76
- }, ariaAttribute)), type && (0, _react2.jsx)(_badge.EuiBadge, {
77
- className: "euiNotificationEventMeta__badge",
78
- color: badgeColor
79
- }, severity ? "".concat(type, ": ").concat(severity) : type)), (0, _react2.jsx)("div", {
80
- className: "euiNotificationEventMeta__section"
81
- }, (0, _react2.jsx)("span", {
82
- className: "euiNotificationEventMeta__time"
83
- }, time)), onOpenContextMenu && (0, _react2.jsx)("div", {
84
- className: "euiNotificationEventMeta__contextMenuWrapper"
85
- }, (0, _react2.jsx)(_popover.EuiPopover, {
86
- id: randomPopoverId,
87
- ownFocus: true,
88
- repositionOnScroll: true,
89
- isOpen: isPopoverOpen,
90
- panelPaddingSize: "none",
91
- anchorPosition: "leftUp",
92
- button: (0, _react2.jsx)(_i18n.EuiI18n, {
93
- token: "euiNotificationEventMeta.contextMenuButton",
94
- default: "Menu for {eventName}",
95
- values: {
96
- eventName: eventName
97
- }
98
- }, function (contextMenuButton) {
99
- return (0, _react2.jsx)(_button.EuiButtonIcon, {
100
- "aria-label": contextMenuButton,
101
- "aria-controls": randomPopoverId,
102
- "aria-expanded": isPopoverOpen,
103
- "aria-haspopup": "true",
104
- iconType: "boxesVertical",
105
- color: "text",
106
- onClick: onOpenPopover,
107
- "data-test-subj": "".concat(id, "-notificationEventMetaButton")
108
- });
109
- }),
110
- closePopover: function closePopover() {
111
- return setIsPopoverOpen(false);
112
- }
113
- }, (0, _react2.jsx)("div", {
114
- onClick: function onClick() {
115
- return setIsPopoverOpen(false);
116
- }
117
- }, (0, _react2.jsx)(_context_menu.EuiContextMenuPanel, {
118
- items: contextMenuItems
119
- })))));
120
- };
121
- exports.EuiNotificationEventMeta = EuiNotificationEventMeta;
122
- EuiNotificationEventMeta.propTypes = {
123
- id: _propTypes.default.string.isRequired,
124
- /**
125
- * Type of event (e.g. "Alert", "Cloud", etc..). Shows inside a badge.
126
- */
127
- type: _propTypes.default.string.isRequired,
128
- /**
129
- * A unique, human-friendly name for the event to be used in aria attributes (e.g. "alert-critical-01", "cloud-no-severity-12", etc..).
130
- */
131
- eventName: _propTypes.default.string.isRequired,
132
- /**
133
- * Type of severity (e.g. "Critical", "Warning", etc..). Shows as a text after the `type` following the format "Alert: Critical".
134
- */
135
- severity: _propTypes.default.string,
136
- /**
137
- * Accepts either our palette colors (primary, success ..etc) or a hex value `#FFFFFF`, `#000`.
138
- */
139
- badgeColor: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.string.isRequired]),
140
- /**
141
- * The icon used to visually represent this data type. Accepts any `EuiIcon IconType`.
142
- */
143
- 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]),
144
- /**
145
- * Specify an `aria-label` for the icon.
146
- * If no `aria-label` is passed we assume the icon is purely decorative.
147
- */
148
- iconAriaLabel: _propTypes.default.string,
149
- /**
150
- * Indicates when the event was received.
151
- */
152
- time: _propTypes.default.node.isRequired,
153
- /**
154
- * Necessary to trigger `onOpenContextMenu` from #EuiNotificationEvent
155
- */
156
- onOpenContextMenu: _propTypes.default.func
157
- };