@elastic/eui 85.1.0 → 86.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_charts_theme.js +26 -2
- package/dist/eui_charts_theme.js.map +1 -1
- package/es/components/combo_box/combo_box_options_list/combo_box_title.js +1 -3
- package/es/components/datagrid/body/data_grid_body.js +7 -7
- package/es/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/es/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/es/components/datagrid/body/data_grid_cell.js +14 -13
- package/es/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
- package/es/components/datagrid/body/header/data_grid_header_cell.js +1 -1
- package/es/components/datagrid/body/header/data_grid_header_row.js +5 -5
- package/es/components/datagrid/controls/data_grid_toolbar.js +31 -26
- package/es/components/datagrid/controls/display_selector.js +1 -1
- package/es/components/datagrid/data_grid.js +7 -7
- package/es/components/datagrid/utils/in_memory.js +4 -4
- package/es/components/datagrid/utils/row_heights.js +4 -4
- package/es/components/date_picker/date_picker.js +1 -1
- package/es/components/drag_and_drop/drag_drop_context.js +1 -1
- package/es/components/drag_and_drop/draggable.js +2 -2
- package/es/components/drag_and_drop/droppable.js +1 -1
- package/es/components/drag_and_drop/index.js +3 -2
- package/es/components/header/header_section/header_section_item_button.js +94 -0
- package/es/components/highlight/highlight.js +2 -2
- package/es/components/inline_edit/inline_edit_text.js +2 -3
- package/es/components/inline_edit/inline_edit_title.js +2 -3
- package/es/components/inner_text/index.js +1 -2
- package/es/components/markdown_editor/markdown_actions.js +1 -1
- package/es/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/es/components/modal/confirm_modal.js +11 -29
- package/es/components/outside_click_detector/outside_click_detector.js +10 -11
- package/es/components/page/page_template.js +8 -8
- package/es/components/popover/wrapping_popover.js +1 -9
- package/es/components/portal/portal.js +34 -24
- package/es/components/tabs/tabs.js +25 -0
- package/es/components/timeline/timeline_item_icon.js +3 -3
- package/es/components/tour/tour_step.js +16 -12
- package/es/services/color/eui_palettes.js +7 -1
- package/es/services/color/index.js +1 -1
- package/es/services/index.js +1 -1
- package/es/services/time/timer.js +3 -5
- package/es/test/rtl/component_helpers.js +1 -1
- package/es/test/rtl/index.js +2 -1
- package/es/test/rtl/render_hook.js +23 -0
- package/eui.d.ts +1234 -748
- package/i18ntokens.json +144 -144
- package/lib/components/combo_box/combo_box_options_list/combo_box_title.js +1 -3
- package/lib/components/datagrid/body/data_grid_body.js +7 -7
- package/lib/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/lib/components/datagrid/body/data_grid_cell.js +14 -13
- package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +1 -1
- package/lib/components/datagrid/body/header/data_grid_header_row.js +5 -5
- package/lib/components/datagrid/controls/data_grid_toolbar.js +41 -38
- package/lib/components/datagrid/controls/display_selector.js +1 -1
- package/lib/components/datagrid/data_grid.js +7 -7
- package/lib/components/datagrid/utils/in_memory.js +4 -4
- package/lib/components/datagrid/utils/row_heights.js +4 -4
- package/lib/components/date_picker/date_picker.js +1 -1
- package/lib/components/drag_and_drop/drag_drop_context.js +2 -2
- package/lib/components/drag_and_drop/draggable.js +3 -3
- package/lib/components/drag_and_drop/droppable.js +2 -2
- package/lib/components/header/header_section/header_section_item_button.js +94 -0
- package/lib/components/highlight/highlight.js +2 -2
- package/lib/components/inline_edit/inline_edit_text.js +2 -3
- package/lib/components/inline_edit/inline_edit_title.js +2 -3
- package/lib/components/inner_text/index.js +1 -8
- package/lib/components/markdown_editor/markdown_actions.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/lib/components/modal/confirm_modal.js +10 -28
- package/lib/components/outside_click_detector/outside_click_detector.js +10 -11
- package/lib/components/page/page_template.js +8 -8
- package/lib/components/popover/wrapping_popover.js +1 -9
- package/lib/components/portal/portal.js +34 -24
- package/lib/components/tabs/tabs.js +25 -0
- package/lib/components/timeline/timeline_item_icon.js +6 -3
- package/lib/components/tour/tour_step.js +15 -11
- package/lib/services/color/eui_palettes.js +9 -2
- package/lib/services/color/index.js +7 -0
- package/lib/services/index.js +7 -0
- package/lib/services/time/timer.js +3 -5
- package/lib/test/rtl/component_helpers.js +1 -1
- package/lib/test/rtl/index.js +13 -1
- package/lib/test/rtl/render_hook.js +29 -0
- package/optimize/es/components/datagrid/body/data_grid_cell.js +10 -9
- package/optimize/es/components/datagrid/controls/data_grid_toolbar.js +31 -26
- package/optimize/es/components/datagrid/controls/display_selector.js +1 -1
- package/optimize/es/components/datagrid/utils/in_memory.js +2 -2
- package/optimize/es/components/datagrid/utils/row_heights.js +4 -4
- package/optimize/es/components/date_picker/date_picker.js +1 -1
- package/optimize/es/components/drag_and_drop/drag_drop_context.js +1 -1
- package/optimize/es/components/drag_and_drop/draggable.js +2 -2
- package/optimize/es/components/drag_and_drop/droppable.js +1 -1
- package/optimize/es/components/drag_and_drop/index.js +3 -2
- package/optimize/es/components/highlight/highlight.js +2 -2
- package/optimize/es/components/inline_edit/inline_edit_text.js +2 -3
- package/optimize/es/components/inline_edit/inline_edit_title.js +2 -3
- package/optimize/es/components/inner_text/index.js +1 -2
- package/optimize/es/components/markdown_editor/markdown_actions.js +1 -1
- package/optimize/es/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/optimize/es/components/modal/confirm_modal.js +11 -24
- package/optimize/es/components/outside_click_detector/outside_click_detector.js +10 -11
- package/optimize/es/components/popover/wrapping_popover.js +1 -9
- package/optimize/es/components/portal/portal.js +34 -25
- package/optimize/es/components/timeline/timeline_item_icon.js +3 -3
- package/optimize/es/components/tour/tour_step.js +16 -12
- package/optimize/es/services/color/eui_palettes.js +7 -1
- package/optimize/es/services/color/index.js +1 -1
- package/optimize/es/services/index.js +1 -1
- package/optimize/es/services/time/timer.js +3 -5
- package/optimize/es/test/rtl/component_helpers.js +1 -1
- package/optimize/es/test/rtl/index.js +2 -1
- package/optimize/es/test/rtl/render_hook.js +23 -0
- package/optimize/lib/components/datagrid/body/data_grid_cell.js +10 -9
- package/optimize/lib/components/datagrid/controls/data_grid_toolbar.js +36 -28
- package/optimize/lib/components/datagrid/controls/display_selector.js +1 -1
- package/optimize/lib/components/datagrid/utils/in_memory.js +2 -2
- package/optimize/lib/components/datagrid/utils/row_heights.js +4 -4
- package/optimize/lib/components/date_picker/date_picker.js +1 -1
- package/optimize/lib/components/drag_and_drop/drag_drop_context.js +2 -2
- package/optimize/lib/components/drag_and_drop/draggable.js +3 -3
- package/optimize/lib/components/drag_and_drop/droppable.js +2 -2
- package/optimize/lib/components/highlight/highlight.js +2 -2
- package/optimize/lib/components/inline_edit/inline_edit_text.js +2 -3
- package/optimize/lib/components/inline_edit/inline_edit_title.js +2 -3
- package/optimize/lib/components/inner_text/index.js +1 -8
- package/optimize/lib/components/markdown_editor/markdown_actions.js +1 -1
- package/optimize/lib/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/optimize/lib/components/modal/confirm_modal.js +10 -23
- package/optimize/lib/components/outside_click_detector/outside_click_detector.js +10 -11
- package/optimize/lib/components/popover/wrapping_popover.js +1 -9
- package/optimize/lib/components/portal/portal.js +34 -25
- package/optimize/lib/components/timeline/timeline_item_icon.js +6 -4
- package/optimize/lib/components/tour/tour_step.js +15 -11
- package/optimize/lib/services/color/eui_palettes.js +9 -2
- package/optimize/lib/services/color/index.js +7 -0
- package/optimize/lib/services/index.js +7 -0
- package/optimize/lib/services/time/timer.js +3 -5
- package/optimize/lib/test/rtl/component_helpers.js +1 -1
- package/optimize/lib/test/rtl/index.js +13 -1
- package/optimize/lib/test/rtl/render_hook.js +29 -0
- package/package.json +23 -16
- package/test-env/components/combo_box/combo_box_options_list/combo_box_title.js +1 -3
- package/test-env/components/datagrid/body/data_grid_body.js +7 -7
- package/test-env/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/test-env/components/datagrid/body/data_grid_cell.js +14 -13
- package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +1 -1
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +5 -5
- package/test-env/components/datagrid/controls/data_grid_toolbar.js +36 -28
- package/test-env/components/datagrid/controls/display_selector.js +1 -1
- package/test-env/components/datagrid/data_grid.js +7 -7
- package/test-env/components/datagrid/utils/in_memory.js +4 -4
- package/test-env/components/datagrid/utils/row_heights.js +4 -4
- package/test-env/components/date_picker/date_picker.js +1 -1
- package/test-env/components/drag_and_drop/drag_drop_context.js +2 -2
- package/test-env/components/drag_and_drop/draggable.js +3 -3
- package/test-env/components/drag_and_drop/droppable.js +2 -2
- package/test-env/components/header/header_section/header_section_item_button.js +94 -0
- package/test-env/components/highlight/highlight.js +2 -2
- package/test-env/components/inline_edit/inline_edit_text.js +2 -3
- package/test-env/components/inline_edit/inline_edit_title.js +2 -3
- package/test-env/components/inner_text/index.js +1 -8
- package/test-env/components/markdown_editor/markdown_actions.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/test-env/components/modal/confirm_modal.js +10 -23
- package/test-env/components/outside_click_detector/outside_click_detector.js +10 -11
- package/test-env/components/page/page_template.js +8 -8
- package/test-env/components/popover/wrapping_popover.js +1 -9
- package/test-env/components/portal/portal.js +34 -25
- package/test-env/components/tabs/tabs.js +25 -0
- package/test-env/components/timeline/timeline_item_icon.js +6 -3
- package/test-env/components/tour/tour_step.js +15 -11
- package/test-env/services/color/eui_palettes.js +9 -2
- package/test-env/services/color/index.js +7 -0
- package/test-env/services/index.js +7 -0
- package/test-env/services/time/timer.js +3 -5
- package/test-env/test/rtl/component_helpers.js +1 -1
- package/test-env/test/rtl/index.js +13 -1
- package/test-env/test/rtl/render_hook.js +29 -0
- package/es/components/inner_text/render_to_text.js +0 -47
- package/lib/components/inner_text/render_to_text.js +0 -54
- package/optimize/es/components/inner_text/render_to_text.js +0 -42
- package/optimize/lib/components/inner_text/render_to_text.js +0 -52
- package/test-env/components/inner_text/render_to_text.js +0 -52
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.EuiHeaderSectionItemButton = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
11
|
var _badge_notification = require("../../badge/notification_badge/badge_notification");
|
|
11
12
|
var _icon = require("../../icon");
|
|
@@ -176,4 +177,97 @@ ref) {
|
|
|
176
177
|
}, children), buttonNotification);
|
|
177
178
|
});
|
|
178
179
|
exports.EuiHeaderSectionItemButton = EuiHeaderSectionItemButton;
|
|
180
|
+
EuiHeaderSectionItemButton.propTypes = {
|
|
181
|
+
href: _propTypes.default.string,
|
|
182
|
+
onClick: _propTypes.default.func,
|
|
183
|
+
/**
|
|
184
|
+
* Any of the named color palette options.
|
|
185
|
+
* **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
|
|
186
|
+
*/
|
|
187
|
+
/**
|
|
188
|
+
* Any of the named color palette options.
|
|
189
|
+
* **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
|
|
190
|
+
*/
|
|
191
|
+
color: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf(["ghost"])]),
|
|
192
|
+
size: _propTypes.default.any,
|
|
193
|
+
/**
|
|
194
|
+
* Ensure the text of the button sits flush to the left, right, or both sides of its container
|
|
195
|
+
*/
|
|
196
|
+
/**
|
|
197
|
+
* Ensure the text of the button sits flush to the left, right, or both sides of its container
|
|
198
|
+
*/
|
|
199
|
+
flush: _propTypes.default.any,
|
|
200
|
+
/**
|
|
201
|
+
* `disabled` is also allowed
|
|
202
|
+
*/
|
|
203
|
+
/**
|
|
204
|
+
* `disabled` is also allowed
|
|
205
|
+
*/
|
|
206
|
+
isDisabled: _propTypes.default.bool,
|
|
207
|
+
/**
|
|
208
|
+
* Force disables the button and changes the icon to a loading spinner
|
|
209
|
+
*/
|
|
210
|
+
/**
|
|
211
|
+
* Force disables the button and changes the icon to a loading spinner
|
|
212
|
+
*/
|
|
213
|
+
isLoading: _propTypes.default.bool,
|
|
214
|
+
/**
|
|
215
|
+
* Applies the boolean state as the `aria-pressed` property to create a toggle button.
|
|
216
|
+
* *Only use when the readable text does not change between states.*
|
|
217
|
+
*/
|
|
218
|
+
/**
|
|
219
|
+
* Applies the boolean state as the `aria-pressed` property to create a toggle button.
|
|
220
|
+
* *Only use when the readable text does not change between states.*
|
|
221
|
+
*/
|
|
222
|
+
isSelected: _propTypes.default.bool,
|
|
223
|
+
target: _propTypes.default.string,
|
|
224
|
+
rel: _propTypes.default.string,
|
|
225
|
+
type: _propTypes.default.oneOf(["button", "submit"]),
|
|
226
|
+
buttonRef: _propTypes.default.any,
|
|
227
|
+
/**
|
|
228
|
+
* Object of props passed to the <span/> wrapping the button's content
|
|
229
|
+
*/
|
|
230
|
+
/**
|
|
231
|
+
* Object of props passed to the <span/> wrapping the button's content
|
|
232
|
+
*/
|
|
233
|
+
contentProps: _propTypes.default.shape({
|
|
234
|
+
className: _propTypes.default.string,
|
|
235
|
+
"aria-label": _propTypes.default.string,
|
|
236
|
+
"data-test-subj": _propTypes.default.string,
|
|
237
|
+
css: _propTypes.default.any
|
|
238
|
+
}),
|
|
239
|
+
/**
|
|
240
|
+
* Any `type` accepted by EuiIcon
|
|
241
|
+
*/
|
|
242
|
+
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", "eql", "eraser", "error", "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", "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", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipelineApp", "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", "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", "tokenDenseVector", "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"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]),
|
|
243
|
+
/**
|
|
244
|
+
* Can only be one side `left` or `right`
|
|
245
|
+
*/
|
|
246
|
+
iconSide: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf([undefined])]),
|
|
247
|
+
/**
|
|
248
|
+
* Object of props passed to the <span/> wrapping the content's text/children only (not icon)
|
|
249
|
+
*/
|
|
250
|
+
textProps: _propTypes.default.shape({
|
|
251
|
+
className: _propTypes.default.string,
|
|
252
|
+
"aria-label": _propTypes.default.string,
|
|
253
|
+
"data-test-subj": _propTypes.default.string,
|
|
254
|
+
css: _propTypes.default.any,
|
|
255
|
+
ref: _propTypes.default.any,
|
|
256
|
+
"data-text": _propTypes.default.string
|
|
257
|
+
}),
|
|
258
|
+
iconSize: _propTypes.default.any,
|
|
259
|
+
className: _propTypes.default.string,
|
|
260
|
+
"aria-label": _propTypes.default.string,
|
|
261
|
+
"data-test-subj": _propTypes.default.string,
|
|
262
|
+
css: _propTypes.default.any,
|
|
263
|
+
/**
|
|
264
|
+
* Inserts the node into a EuiBadgeNotification and places it appropriately against the button.
|
|
265
|
+
* Or pass `true` to render a simple dot
|
|
266
|
+
*/
|
|
267
|
+
notification: _propTypes.default.oneOfType([_propTypes.default.node.isRequired, _propTypes.default.bool.isRequired]),
|
|
268
|
+
/**
|
|
269
|
+
* Changes the color of the notification background
|
|
270
|
+
*/
|
|
271
|
+
notificationColor: _propTypes.default.any
|
|
272
|
+
};
|
|
179
273
|
EuiHeaderSectionItemButton.displayName = 'EuiHeaderSectionItemButton';
|
|
@@ -55,9 +55,9 @@ var highlight = function highlight(searchSubject, searchValue, isStrict, highlig
|
|
|
55
55
|
var preMatch = searchSubject.substring(0, indexOfMatch);
|
|
56
56
|
var match = searchSubject.substring(indexOfMatch, indexOfMatch + searchValue.length);
|
|
57
57
|
var postMatch = searchSubject.substring(indexOfMatch + searchValue.length);
|
|
58
|
-
return (0, _react2.jsx)(_react.Fragment, null, preMatch, (0, _react2.jsx)(_mark.EuiMark, {
|
|
58
|
+
return (0, _react2.jsx)(_react.Fragment, null, preMatch || undefined, (0, _react2.jsx)(_mark.EuiMark, {
|
|
59
59
|
hasScreenReaderHelpText: hasScreenReaderHelpText
|
|
60
|
-
}, match), postMatch);
|
|
60
|
+
}, match), postMatch || undefined);
|
|
61
61
|
};
|
|
62
62
|
var getHightlightWords = function getHightlightWords(searchSubject, searchValue, isStrict) {
|
|
63
63
|
var regex = new RegExp(searchValue, isStrict ? 'g' : 'gi');
|
|
@@ -13,7 +13,7 @@ var _inline_edit_form = require("./inline_edit_form");
|
|
|
13
13
|
var _services = require("../../services");
|
|
14
14
|
var _inline_edit_text = require("./inline_edit_text.styles");
|
|
15
15
|
var _react2 = require("@emotion/react");
|
|
16
|
-
var _excluded = ["
|
|
16
|
+
var _excluded = ["className", "size", "defaultValue", "placeholder", "inputAriaLabel", "startWithEditOpen", "readModeProps", "editModeProps", "isLoading", "isInvalid", "isReadOnly"];
|
|
17
17
|
/*
|
|
18
18
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
19
19
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -33,8 +33,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
33
33
|
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; }
|
|
34
34
|
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; }
|
|
35
35
|
var EuiInlineEditText = function EuiInlineEditText(_ref) {
|
|
36
|
-
var
|
|
37
|
-
className = _ref.className,
|
|
36
|
+
var className = _ref.className,
|
|
38
37
|
_ref$size = _ref.size,
|
|
39
38
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
40
39
|
defaultValue = _ref.defaultValue,
|
|
@@ -13,7 +13,7 @@ var _inline_edit_form = require("./inline_edit_form");
|
|
|
13
13
|
var _services = require("../../services");
|
|
14
14
|
var _inline_edit_title = require("./inline_edit_title.styles");
|
|
15
15
|
var _react2 = require("@emotion/react");
|
|
16
|
-
var _excluded = ["
|
|
16
|
+
var _excluded = ["className", "size", "heading", "defaultValue", "placeholder", "inputAriaLabel", "startWithEditOpen", "readModeProps", "editModeProps", "isLoading", "isInvalid", "isReadOnly"];
|
|
17
17
|
/*
|
|
18
18
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
19
19
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -35,8 +35,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
35
35
|
var HEADINGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'span'];
|
|
36
36
|
exports.HEADINGS = HEADINGS;
|
|
37
37
|
var EuiInlineEditTitle = function EuiInlineEditTitle(_ref) {
|
|
38
|
-
var
|
|
39
|
-
className = _ref.className,
|
|
38
|
+
var className = _ref.className,
|
|
40
39
|
_ref$size = _ref.size,
|
|
41
40
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
42
41
|
heading = _ref.heading,
|
|
@@ -15,11 +15,4 @@ Object.defineProperty(exports, "useInnerText", {
|
|
|
15
15
|
return _inner_text.useInnerText;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _render_to_text.useRenderToText;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
var _inner_text = require("./inner_text");
|
|
25
|
-
var _render_to_text = require("./render_to_text");
|
|
18
|
+
var _inner_text = require("./inner_text");
|
|
@@ -54,8 +54,8 @@ SOFTWARE.
|
|
|
54
54
|
var MarkdownActions = /*#__PURE__*/function () {
|
|
55
55
|
function MarkdownActions(editorID, uiPlugins) {
|
|
56
56
|
_classCallCheck(this, MarkdownActions);
|
|
57
|
-
this.editorID = editorID;
|
|
58
57
|
_defineProperty(this, "styles", void 0);
|
|
58
|
+
this.editorID = editorID;
|
|
59
59
|
/**
|
|
60
60
|
* This object is in the format:
|
|
61
61
|
* [nameOfAction]: {[styles to apply]}
|
|
@@ -40,13 +40,19 @@ var EuiMarkdownEditorTextArea = /*#__PURE__*/(0, _react.forwardRef)(function (_r
|
|
|
40
40
|
var classes = (0, _classnames.default)('euiMarkdownEditorTextArea', {
|
|
41
41
|
'euiMarkdownEditorTextArea-isReadOnly': readOnly
|
|
42
42
|
});
|
|
43
|
+
|
|
44
|
+
// Ignore invalid empty string style values
|
|
45
|
+
var style = {};
|
|
46
|
+
if (height !== '') {
|
|
47
|
+
style.height = height;
|
|
48
|
+
}
|
|
49
|
+
if (maxHeight !== '') {
|
|
50
|
+
style.maxHeight = maxHeight;
|
|
51
|
+
}
|
|
43
52
|
return (0, _react2.jsx)("textarea", _extends({
|
|
44
53
|
ref: ref,
|
|
45
54
|
"data-test-subj": "euiMarkdownEditorTextArea",
|
|
46
|
-
style:
|
|
47
|
-
height: height,
|
|
48
|
-
maxHeight: maxHeight
|
|
49
|
-
},
|
|
55
|
+
style: style,
|
|
50
56
|
className: classes
|
|
51
57
|
}, rest, {
|
|
52
58
|
rows: 6,
|
|
@@ -30,12 +30,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
30
30
|
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); }
|
|
31
31
|
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; }
|
|
32
32
|
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); }
|
|
33
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
34
|
-
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."); }
|
|
35
|
-
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); }
|
|
36
|
-
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; }
|
|
37
|
-
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; } }
|
|
38
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
33
|
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; }
|
|
40
34
|
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; }
|
|
41
35
|
var CONFIRM_BUTTON = 'confirm';
|
|
@@ -57,33 +51,21 @@ var EuiConfirmModal = function EuiConfirmModal(_ref) {
|
|
|
57
51
|
defaultFocusedButton = _ref.defaultFocusedButton,
|
|
58
52
|
isLoading = _ref.isLoading,
|
|
59
53
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
60
|
-
var
|
|
61
|
-
|
|
62
|
-
cancelButton = _useState2[0],
|
|
63
|
-
setCancelButton = _useState2[1];
|
|
64
|
-
var _useState3 = (0, _react.useState)(null),
|
|
65
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
66
|
-
confirmButton = _useState4[0],
|
|
67
|
-
setConfirmButton = _useState4[1];
|
|
54
|
+
var cancelButtonRef = (0, _react.useRef)(null);
|
|
55
|
+
var confirmButtonRef = (0, _react.useRef)(null);
|
|
68
56
|
(0, _react.useEffect)(function () {
|
|
69
57
|
// We have to do this instead of using `autoFocus` because React's polyfill for auto-focusing
|
|
70
58
|
// elements conflicts with the focus-trap logic we have on EuiModal.
|
|
71
59
|
// Wait a beat for the focus-trap to complete, and then set focus to the right button. Check that
|
|
72
60
|
// the buttons exist first, because it's possible the modal has been closed already.
|
|
73
|
-
|
|
74
|
-
if (defaultFocusedButton === CANCEL_BUTTON &&
|
|
75
|
-
|
|
76
|
-
} else if (defaultFocusedButton === CONFIRM_BUTTON &&
|
|
77
|
-
|
|
61
|
+
setTimeout(function () {
|
|
62
|
+
if (defaultFocusedButton === CANCEL_BUTTON && cancelButtonRef.current) {
|
|
63
|
+
cancelButtonRef.current.focus();
|
|
64
|
+
} else if (defaultFocusedButton === CONFIRM_BUTTON && confirmButtonRef.current) {
|
|
65
|
+
confirmButtonRef.current.focus();
|
|
78
66
|
}
|
|
79
67
|
});
|
|
80
|
-
});
|
|
81
|
-
var confirmRef = function confirmRef(node) {
|
|
82
|
-
return setConfirmButton(node);
|
|
83
|
-
};
|
|
84
|
-
var cancelRef = function cancelRef(node) {
|
|
85
|
-
return setCancelButton(node);
|
|
86
|
-
};
|
|
68
|
+
}, [defaultFocusedButton, cancelButtonRef, confirmButtonRef]);
|
|
87
69
|
var classes = (0, _classnames.default)('euiModal--confirmation', className);
|
|
88
70
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
89
71
|
var styles = (0, _modal2.euiModalStyles)(euiTheme);
|
|
@@ -109,13 +91,13 @@ var EuiConfirmModal = function EuiConfirmModal(_ref) {
|
|
|
109
91
|
}, message)), (0, _react2.jsx)(_modal_footer.EuiModalFooter, null, (0, _react2.jsx)(_button.EuiButtonEmpty, {
|
|
110
92
|
"data-test-subj": "confirmModalCancelButton",
|
|
111
93
|
onClick: onCancel,
|
|
112
|
-
buttonRef:
|
|
94
|
+
buttonRef: cancelButtonRef
|
|
113
95
|
}, cancelButtonText), (0, _react2.jsx)(_button.EuiButton, {
|
|
114
96
|
"data-test-subj": "confirmModalConfirmButton",
|
|
115
97
|
onClick: onConfirm,
|
|
116
98
|
isLoading: isLoading,
|
|
117
99
|
fill: true,
|
|
118
|
-
buttonRef:
|
|
100
|
+
buttonRef: confirmButtonRef,
|
|
119
101
|
color: buttonColor,
|
|
120
102
|
isDisabled: confirmButtonDisabled
|
|
121
103
|
}, confirmButtonText)));
|
|
@@ -33,17 +33,6 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
33
33
|
var EuiOutsideClickDetector = /*#__PURE__*/function (_Component) {
|
|
34
34
|
_inherits(EuiOutsideClickDetector, _Component);
|
|
35
35
|
var _super = _createSuper(EuiOutsideClickDetector);
|
|
36
|
-
// We are working with the assumption that a click event is
|
|
37
|
-
// equivalent to a sequential, compound press and release of
|
|
38
|
-
// the pointing device (mouse, finger, stylus, etc.).
|
|
39
|
-
// A click event's target can be imprecise, as the value will be
|
|
40
|
-
// the closest common ancestor of the press (mousedown, touchstart)
|
|
41
|
-
// and release (mouseup, touchend) events (often <body />) if
|
|
42
|
-
// the the target of each event differs.
|
|
43
|
-
// We need the actual event targets to make the correct decisions
|
|
44
|
-
// about user intention. So, consider the down/start and up/end
|
|
45
|
-
// items below as the deconstruction of a click event.
|
|
46
|
-
|
|
47
36
|
function EuiOutsideClickDetector(props) {
|
|
48
37
|
var _this;
|
|
49
38
|
_classCallCheck(this, EuiOutsideClickDetector);
|
|
@@ -65,6 +54,16 @@ var EuiOutsideClickDetector = /*#__PURE__*/function (_Component) {
|
|
|
65
54
|
// virtual DOM and executes EuiClickDetector's onClick handler,
|
|
66
55
|
// stamping the id even though the event originates outside
|
|
67
56
|
// this component's reified DOM tree.
|
|
57
|
+
// We are working with the assumption that a click event is
|
|
58
|
+
// equivalent to a sequential, compound press and release of
|
|
59
|
+
// the pointing device (mouse, finger, stylus, etc.).
|
|
60
|
+
// A click event's target can be imprecise, as the value will be
|
|
61
|
+
// the closest common ancestor of the press (mousedown, touchstart)
|
|
62
|
+
// and release (mouseup, touchend) events (often <body />) if
|
|
63
|
+
// the the target of each event differs.
|
|
64
|
+
// We need the actual event targets to make the correct decisions
|
|
65
|
+
// about user intention. So, consider the down/start and up/end
|
|
66
|
+
// items below as the deconstruction of a click event.
|
|
68
67
|
_defineProperty(_assertThisInitialized(_this), "id", void 0);
|
|
69
68
|
_defineProperty(_assertThisInitialized(_this), "capturedDownIds", void 0);
|
|
70
69
|
_defineProperty(_assertThisInitialized(_this), "onClickOutside", function (e) {
|
|
@@ -401,20 +401,20 @@ EuiPageTemplate_Deprecated.propTypes = {
|
|
|
401
401
|
*/
|
|
402
402
|
restrictWidth: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.number.isRequired, _propTypes.default.string.isRequired]),
|
|
403
403
|
/**
|
|
404
|
-
|
|
405
|
-
|
|
404
|
+
* Sets the HTML element for `EuiPageBody`.
|
|
405
|
+
*/
|
|
406
406
|
component: _propTypes.default.any,
|
|
407
407
|
/**
|
|
408
|
-
|
|
409
|
-
|
|
408
|
+
* Uses an EuiPanel as the main component instead of a plain div
|
|
409
|
+
*/
|
|
410
410
|
panelled: _propTypes.default.bool,
|
|
411
411
|
/**
|
|
412
|
-
|
|
413
|
-
|
|
412
|
+
* Extends any extra EuiPanel props if `panelled=true`
|
|
413
|
+
*/
|
|
414
414
|
panelProps: _propTypes.default.any,
|
|
415
415
|
/**
|
|
416
|
-
|
|
417
|
-
|
|
416
|
+
* Adjusts the padding
|
|
417
|
+
*/
|
|
418
418
|
paddingSize: _propTypes.default.any
|
|
419
419
|
}),
|
|
420
420
|
/**
|
|
@@ -52,23 +52,15 @@ var EuiWrappingPopover = /*#__PURE__*/function (_Component) {
|
|
|
52
52
|
}
|
|
53
53
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
54
54
|
_defineProperty(_assertThisInitialized(_this), "portal", null);
|
|
55
|
-
_defineProperty(_assertThisInitialized(_this), "anchor", null);
|
|
56
55
|
_defineProperty(_assertThisInitialized(_this), "setPortalRef", function (node) {
|
|
57
56
|
_this.portal = node;
|
|
58
57
|
});
|
|
59
58
|
_defineProperty(_assertThisInitialized(_this), "setAnchorRef", function (node) {
|
|
60
|
-
|
|
59
|
+
node === null || node === void 0 ? void 0 : node.insertAdjacentElement('beforebegin', _this.props.button);
|
|
61
60
|
});
|
|
62
61
|
return _this;
|
|
63
62
|
}
|
|
64
63
|
_createClass(EuiWrappingPopover, [{
|
|
65
|
-
key: "componentDidMount",
|
|
66
|
-
value: function componentDidMount() {
|
|
67
|
-
if (this.anchor) {
|
|
68
|
-
this.anchor.insertAdjacentElement('beforebegin', this.props.button);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}, {
|
|
72
64
|
key: "componentWillUnmount",
|
|
73
65
|
value: function componentWillUnmount() {
|
|
74
66
|
if (this.props.button.parentNode) {
|
|
@@ -47,35 +47,41 @@ var EuiPortal = /*#__PURE__*/function (_Component) {
|
|
|
47
47
|
var _this;
|
|
48
48
|
_classCallCheck(this, EuiPortal);
|
|
49
49
|
_this = _super.call(this, props);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
var insert = _this.props.insert;
|
|
54
|
-
_this.portalNode = document.createElement('div');
|
|
55
|
-
_this.portalNode.dataset.euiportal = 'true';
|
|
56
|
-
if (insert == null) {
|
|
57
|
-
// no insertion defined, append to body
|
|
58
|
-
document.body.appendChild(_this.portalNode);
|
|
59
|
-
} else {
|
|
60
|
-
// inserting before or after an element
|
|
61
|
-
var sibling = insert.sibling,
|
|
62
|
-
position = insert.position;
|
|
63
|
-
sibling.insertAdjacentElement(insertPositions[position], _this.portalNode);
|
|
64
|
-
}
|
|
50
|
+
_this.state = {
|
|
51
|
+
portalNode: null
|
|
52
|
+
};
|
|
65
53
|
return _this;
|
|
66
54
|
}
|
|
67
55
|
_createClass(EuiPortal, [{
|
|
68
56
|
key: "componentDidMount",
|
|
69
57
|
value: function componentDidMount() {
|
|
70
|
-
this.
|
|
71
|
-
|
|
58
|
+
var insert = this.props.insert;
|
|
59
|
+
var portalNode = document.createElement('div');
|
|
60
|
+
portalNode.dataset.euiportal = 'true';
|
|
61
|
+
if (insert == null) {
|
|
62
|
+
// no insertion defined, append to body
|
|
63
|
+
document.body.appendChild(portalNode);
|
|
64
|
+
} else {
|
|
65
|
+
// inserting before or after an element
|
|
66
|
+
var sibling = insert.sibling,
|
|
67
|
+
position = insert.position;
|
|
68
|
+
sibling.insertAdjacentElement(insertPositions[position], portalNode);
|
|
69
|
+
}
|
|
70
|
+
this.setThemeColor(portalNode);
|
|
71
|
+
this.updatePortalRef(portalNode);
|
|
72
|
+
|
|
73
|
+
// Update state with portalNode to intentionally trigger component rerender
|
|
74
|
+
// and call createPortal with correct root element in render()
|
|
75
|
+
this.setState({
|
|
76
|
+
portalNode: portalNode
|
|
77
|
+
});
|
|
72
78
|
}
|
|
73
79
|
}, {
|
|
74
80
|
key: "componentWillUnmount",
|
|
75
81
|
value: function componentWillUnmount() {
|
|
76
|
-
var
|
|
77
|
-
if (
|
|
78
|
-
|
|
82
|
+
var portalNode = this.state.portalNode;
|
|
83
|
+
if (portalNode !== null && portalNode !== void 0 && portalNode.parentNode) {
|
|
84
|
+
portalNode.parentNode.removeChild(portalNode);
|
|
79
85
|
}
|
|
80
86
|
this.updatePortalRef(null);
|
|
81
87
|
}
|
|
@@ -83,13 +89,13 @@ var EuiPortal = /*#__PURE__*/function (_Component) {
|
|
|
83
89
|
// Set the inherited color of the portal based on the wrapping EuiThemeProvider
|
|
84
90
|
}, {
|
|
85
91
|
key: "setThemeColor",
|
|
86
|
-
value: function setThemeColor() {
|
|
87
|
-
if (this.
|
|
92
|
+
value: function setThemeColor(portalNode) {
|
|
93
|
+
if (this.context) {
|
|
88
94
|
var _this$context = this.context,
|
|
89
95
|
hasDifferentColorFromGlobalTheme = _this$context.hasDifferentColorFromGlobalTheme,
|
|
90
96
|
colorClassName = _this$context.colorClassName;
|
|
91
97
|
if (hasDifferentColorFromGlobalTheme && this.props.insert == null) {
|
|
92
|
-
|
|
98
|
+
portalNode.classList.add(colorClassName);
|
|
93
99
|
}
|
|
94
100
|
}
|
|
95
101
|
}
|
|
@@ -103,7 +109,11 @@ var EuiPortal = /*#__PURE__*/function (_Component) {
|
|
|
103
109
|
}, {
|
|
104
110
|
key: "render",
|
|
105
111
|
value: function render() {
|
|
106
|
-
|
|
112
|
+
var portalNode = this.state.portalNode;
|
|
113
|
+
if (!portalNode) {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
return /*#__PURE__*/(0, _reactDom.createPortal)(this.props.children, portalNode);
|
|
107
117
|
}
|
|
108
118
|
}]);
|
|
109
119
|
return EuiPortal;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.SIZES = exports.EuiTabs = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
11
|
var _services = require("../../services");
|
|
11
12
|
var _tabs = require("./tabs.styles");
|
|
@@ -55,4 +56,28 @@ var EuiTabs = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
55
56
|
}, children));
|
|
56
57
|
});
|
|
57
58
|
exports.EuiTabs = EuiTabs;
|
|
59
|
+
EuiTabs.propTypes = {
|
|
60
|
+
className: _propTypes.default.string,
|
|
61
|
+
"aria-label": _propTypes.default.string,
|
|
62
|
+
"data-test-subj": _propTypes.default.string,
|
|
63
|
+
css: _propTypes.default.any,
|
|
64
|
+
/**
|
|
65
|
+
* ReactNode to render as this component's content
|
|
66
|
+
*/
|
|
67
|
+
children: _propTypes.default.node,
|
|
68
|
+
/**
|
|
69
|
+
* Evenly stretches each tab to fill the
|
|
70
|
+
* horizontal space
|
|
71
|
+
*/
|
|
72
|
+
expand: _propTypes.default.bool,
|
|
73
|
+
/**
|
|
74
|
+
* Adds a bottom border to separate it from the content after
|
|
75
|
+
*/
|
|
76
|
+
bottomBorder: _propTypes.default.bool,
|
|
77
|
+
/**
|
|
78
|
+
* Sizes affect both font size and overall size.
|
|
79
|
+
* Only use the `xl` size when displayed as page titles.
|
|
80
|
+
*/
|
|
81
|
+
size: _propTypes.default.any
|
|
82
|
+
};
|
|
58
83
|
EuiTabs.displayName = 'EuiTabs';
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.EuiTimelineItemIcon = void 0;
|
|
7
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
10
|
var _avatar = require("../avatar");
|
|
10
11
|
var _services = require("../../services");
|
|
11
12
|
var _timeline_item_icon = require("./timeline_item_icon.styles");
|
|
12
13
|
var _react2 = require("@emotion/react");
|
|
13
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
14
17
|
/*
|
|
15
18
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
16
19
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -29,11 +32,11 @@ var EuiTimelineItemIcon = function EuiTimelineItemIcon(_ref) {
|
|
|
29
32
|
var cssStyles = [styles.euiTimelineItemIcon, styles[verticalAlign]];
|
|
30
33
|
var cssContentStyles = styles.euiTimelineItemIcon__content;
|
|
31
34
|
var ariaLabel = iconAriaLabel ? iconAriaLabel : '';
|
|
32
|
-
var iconRender =
|
|
35
|
+
var iconRender = /*#__PURE__*/(0, _react.isValidElement)(icon) ? icon : (0, _react2.jsx)(_avatar.EuiAvatar, {
|
|
33
36
|
color: "subdued",
|
|
34
37
|
name: ariaLabel,
|
|
35
38
|
iconType: icon
|
|
36
|
-
})
|
|
39
|
+
});
|
|
37
40
|
return (0, _react2.jsx)("div", {
|
|
38
41
|
css: cssStyles
|
|
39
42
|
}, (0, _react2.jsx)("div", {
|
|
@@ -79,12 +79,10 @@ var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
79
79
|
if (step === 0) {
|
|
80
80
|
console.warn('EuiTourStep `step` should 1-based indexing. Please update to eliminate 0 indexes.');
|
|
81
81
|
}
|
|
82
|
-
var _useState = (0, _react.useState)(
|
|
82
|
+
var _useState = (0, _react.useState)(null),
|
|
83
83
|
_useState2 = _slicedToArray(_useState, 2),
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
var animationFrameId = (0, _react.useRef)();
|
|
87
|
-
var anchorNode = (0, _react.useRef)(null);
|
|
84
|
+
anchorNode = _useState2[0],
|
|
85
|
+
setAnchorNode = _useState2[1];
|
|
88
86
|
var _useState3 = (0, _react.useState)(),
|
|
89
87
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
90
88
|
popoverPosition = _useState4[0],
|
|
@@ -93,14 +91,20 @@ var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
93
91
|
setPopoverPosition(position);
|
|
94
92
|
};
|
|
95
93
|
(0, _react.useEffect)(function () {
|
|
94
|
+
var timeout;
|
|
96
95
|
if (anchor) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
// Wait until next tick to find anchor node in case it's not already
|
|
97
|
+
// in DOM requestAnimationFrame isn't used here because we don't need to
|
|
98
|
+
// synchronize with repainting ticks and the updated value still
|
|
99
|
+
// needs to go through a react DOM rerender which may take more than
|
|
100
|
+
// 1 frame (16ms) of time.
|
|
101
|
+
// TODO: It would be ideal to have some kind of intersection observer here instead
|
|
102
|
+
timeout = window.setTimeout(function () {
|
|
103
|
+
setAnchorNode((0, _services.findElementBySelectorOrRef)(anchor));
|
|
100
104
|
});
|
|
101
105
|
}
|
|
102
106
|
return function () {
|
|
103
|
-
|
|
107
|
+
timeout && window.clearTimeout(timeout);
|
|
104
108
|
};
|
|
105
109
|
}, [anchor]);
|
|
106
110
|
var classes = (0, _classnames.default)('euiTour', className);
|
|
@@ -212,8 +216,8 @@ var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
212
216
|
button: children
|
|
213
217
|
}, popoverProps), layout);
|
|
214
218
|
}
|
|
215
|
-
return
|
|
216
|
-
button: anchorNode
|
|
219
|
+
return anchorNode ? (0, _react2.jsx)(_popover.EuiWrappingPopover, _extends({
|
|
220
|
+
button: anchorNode
|
|
217
221
|
}, popoverProps), layout) : null;
|
|
218
222
|
};
|
|
219
223
|
exports.EuiTourStep = EuiTourStep;
|