@elastic/eui 72.2.0 → 74.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 (99) hide show
  1. package/dist/eui_theme_dark.css +15 -67
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +15 -67
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/basic_table/basic_table.js +56 -101
  6. package/es/components/basic_table/basic_table.styles.js +45 -0
  7. package/es/components/datagrid/controls/column_selector.js +23 -7
  8. package/es/components/datagrid/controls/column_sorting_draggable.js +17 -8
  9. package/es/components/datagrid/data_grid.a11y.js +3 -2
  10. package/es/components/modal/confirm_modal.js +5 -3
  11. package/es/components/modal/modal.a11y.js +1 -1
  12. package/es/components/modal/modal_header_title.js +12 -3
  13. package/es/components/notification/notification_event.a11y.js +113 -0
  14. package/es/components/page/page_header/page_header.a11y.js +32 -0
  15. package/es/components/portal/portal.a11y.js +70 -0
  16. package/es/components/resizable_container/resizable_panel.js +5 -0
  17. package/es/components/tool_tip/tool_tip.js +10 -5
  18. package/es/components/tool_tip/tool_tip_manager.js +42 -0
  19. package/es/services/security/get_secure_rel_for_target.js +2 -8
  20. package/es/services/theme/hooks.js +18 -0
  21. package/es/services/theme/index.js +1 -1
  22. package/eui.d.ts +57 -19
  23. package/i18ntokens.json +54 -38
  24. package/lib/components/basic_table/basic_table.js +56 -100
  25. package/lib/components/basic_table/basic_table.styles.js +54 -0
  26. package/lib/components/datagrid/controls/column_selector.js +21 -6
  27. package/lib/components/datagrid/controls/column_sorting_draggable.js +17 -8
  28. package/lib/components/datagrid/data_grid.a11y.js +3 -2
  29. package/lib/components/modal/confirm_modal.js +5 -3
  30. package/lib/components/modal/modal.a11y.js +1 -1
  31. package/lib/components/modal/modal_header_title.js +12 -3
  32. package/lib/components/notification/notification_event.a11y.js +117 -0
  33. package/lib/components/page/page_header/page_header.a11y.js +40 -0
  34. package/lib/components/portal/portal.a11y.js +73 -0
  35. package/lib/components/resizable_container/resizable_panel.js +5 -0
  36. package/lib/components/tool_tip/tool_tip.js +13 -7
  37. package/lib/components/tool_tip/tool_tip_manager.js +50 -0
  38. package/lib/services/security/get_secure_rel_for_target.js +2 -9
  39. package/lib/services/theme/hooks.js +22 -2
  40. package/lib/services/theme/index.js +6 -0
  41. package/optimize/es/components/basic_table/basic_table.js +56 -101
  42. package/optimize/es/components/basic_table/basic_table.styles.js +45 -0
  43. package/optimize/es/components/datagrid/controls/column_selector.js +22 -7
  44. package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +17 -8
  45. package/optimize/es/components/datagrid/data_grid.a11y.js +3 -2
  46. package/optimize/es/components/modal/confirm_modal.js +4 -3
  47. package/optimize/es/components/modal/modal.a11y.js +1 -1
  48. package/optimize/es/components/modal/modal_header_title.js +4 -2
  49. package/optimize/es/components/notification/notification_event.a11y.js +103 -0
  50. package/optimize/es/components/page/page_header/page_header.a11y.js +32 -0
  51. package/optimize/es/components/portal/portal.a11y.js +60 -0
  52. package/optimize/es/components/tool_tip/tool_tip.js +10 -5
  53. package/optimize/es/components/tool_tip/tool_tip_manager.js +41 -0
  54. package/optimize/es/services/security/get_secure_rel_for_target.js +2 -8
  55. package/optimize/es/services/theme/hooks.js +18 -0
  56. package/optimize/es/services/theme/index.js +1 -1
  57. package/optimize/lib/components/basic_table/basic_table.js +56 -95
  58. package/optimize/lib/components/basic_table/basic_table.styles.js +56 -0
  59. package/optimize/lib/components/datagrid/controls/column_selector.js +21 -6
  60. package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +17 -8
  61. package/optimize/lib/components/datagrid/data_grid.a11y.js +3 -2
  62. package/optimize/lib/components/modal/confirm_modal.js +4 -3
  63. package/optimize/lib/components/modal/modal.a11y.js +1 -1
  64. package/optimize/lib/components/modal/modal_header_title.js +4 -2
  65. package/optimize/lib/components/notification/notification_event.a11y.js +117 -0
  66. package/optimize/lib/components/page/page_header/page_header.a11y.js +40 -0
  67. package/optimize/lib/components/portal/portal.a11y.js +73 -0
  68. package/optimize/lib/components/tool_tip/tool_tip.js +13 -7
  69. package/optimize/lib/components/tool_tip/tool_tip_manager.js +49 -0
  70. package/optimize/lib/services/security/get_secure_rel_for_target.js +2 -9
  71. package/optimize/lib/services/theme/hooks.js +22 -2
  72. package/optimize/lib/services/theme/index.js +6 -0
  73. package/package.json +1 -1
  74. package/src/components/datagrid/controls/_data_grid_column_sorting.scss +14 -13
  75. package/src/components/index.scss +0 -1
  76. package/test-env/components/basic_table/basic_table.js +56 -95
  77. package/test-env/components/basic_table/basic_table.styles.js +56 -0
  78. package/test-env/components/datagrid/controls/column_selector.js +21 -6
  79. package/test-env/components/datagrid/controls/column_sorting_draggable.js +17 -8
  80. package/test-env/components/datagrid/data_grid.a11y.js +3 -2
  81. package/test-env/components/modal/confirm_modal.js +5 -3
  82. package/test-env/components/modal/modal.a11y.js +1 -1
  83. package/test-env/components/modal/modal_header_title.js +12 -3
  84. package/test-env/components/notification/notification_event.a11y.js +117 -0
  85. package/test-env/components/page/page_header/page_header.a11y.js +40 -0
  86. package/test-env/components/portal/portal.a11y.js +73 -0
  87. package/test-env/components/resizable_container/resizable_panel.js +5 -0
  88. package/test-env/components/tool_tip/tool_tip.js +13 -7
  89. package/test-env/components/tool_tip/tool_tip_manager.js +49 -0
  90. package/test-env/services/security/get_secure_rel_for_target.js +2 -9
  91. package/test-env/services/theme/hooks.js +22 -2
  92. package/test-env/services/theme/index.js +6 -0
  93. package/es/services/url.js +0 -23
  94. package/lib/services/url.js +0 -32
  95. package/optimize/es/services/url.js +0 -23
  96. package/optimize/lib/services/url.js +0 -32
  97. package/src/components/basic_table/_basic_table.scss +0 -41
  98. package/src/components/basic_table/_index.scss +0 -1
  99. package/test-env/services/url.js +0 -32
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _react = _interopRequireDefault(require("react"));
6
+
7
+ var _button = require("../../button");
8
+
9
+ var _page_header = require("./page_header");
10
+
11
+ var _react2 = require("@emotion/react");
12
+
13
+ /*
14
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
15
+ * or more contributor license agreements. Licensed under the Elastic License
16
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
17
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
18
+ * Side Public License, v 1.
19
+ */
20
+ /// <reference types="../../../../cypress/support"/>
21
+ describe('EuiPageHeader', function () {
22
+ beforeEach(function () {
23
+ cy.viewport(1024, 768); // medium breakpoint
24
+
25
+ cy.realMount((0, _react2.jsx)(_page_header.EuiPageHeader, {
26
+ pageTitle: "Page title",
27
+ iconType: "logoKibana",
28
+ description: "This description should be describing the current page as depicted by the page title. It will never extend beneath the right side content.",
29
+ rightSideItems: [(0, _react2.jsx)(_button.EuiButton, {
30
+ fill: true
31
+ }, "Add something"), (0, _react2.jsx)(_button.EuiButton, null, "Do something")]
32
+ }));
33
+ cy.get('h1.euiTitle').should('exist');
34
+ });
35
+ describe('Automated accessibility check', function () {
36
+ it('has zero violations on first render', function () {
37
+ cy.checkAxe();
38
+ });
39
+ });
40
+ });
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
7
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
8
+
9
+ var _react = _interopRequireWildcard(require("react"));
10
+
11
+ var _button = require("../button");
12
+
13
+ var _portal = require("./portal");
14
+
15
+ var _react2 = require("@emotion/react");
16
+
17
+ 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); }
18
+
19
+ 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; }
20
+
21
+ /*
22
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
23
+ * or more contributor license agreements. Licensed under the Elastic License
24
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
25
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
26
+ * Side Public License, v 1.
27
+ */
28
+ /// <reference types="../../../cypress/support"/>
29
+ var Portal = function Portal() {
30
+ var _useState = (0, _react.useState)(false),
31
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
32
+ isPortalVisible = _useState2[0],
33
+ setIsPortalVisible = _useState2[1];
34
+
35
+ var togglePortal = function togglePortal() {
36
+ setIsPortalVisible(!isPortalVisible);
37
+ };
38
+
39
+ var closePortal = function closePortal() {
40
+ setIsPortalVisible(false);
41
+ };
42
+
43
+ var customPortal;
44
+
45
+ if (isPortalVisible) {
46
+ customPortal = (0, _react2.jsx)(_portal.EuiPortal, null, (0, _react2.jsx)("div", null, "This is the portal. Click anywhere to close."), (0, _react2.jsx)(_button.EuiButton, {
47
+ onClick: closePortal
48
+ }, "Close portal"));
49
+ }
50
+
51
+ return (0, _react2.jsx)("div", null, (0, _react2.jsx)(_button.EuiButton, {
52
+ onClick: togglePortal
53
+ }, "View guide"), customPortal);
54
+ };
55
+
56
+ describe('EuiPortal', function () {
57
+ beforeEach(function () {
58
+ cy.viewport(1024, 768); // medium breakpoint
59
+
60
+ cy.realMount((0, _react2.jsx)(Portal, null));
61
+ cy.get('div[data-relative-to-header="above"]').should('not.exist');
62
+ });
63
+ describe('Automated accessibility check', function () {
64
+ it('has zero violations on first render', function () {
65
+ cy.checkAxe();
66
+ });
67
+ it('has zero violations after the portal is activated', function () {
68
+ cy.get('button[type="button"]').contains('View guide').realClick();
69
+ cy.get('div[data-euiportal="true"]').should('exist');
70
+ cy.checkAxe();
71
+ });
72
+ });
73
+ });
@@ -329,6 +329,11 @@ EuiResizablePanel.propTypes = {
329
329
  */
330
330
  style: _propTypes.default.any,
331
331
 
332
+ /**
333
+ * tabIndex={0} provides full keyboard access when content overflows `<EuiResizablePanel />`
334
+ */
335
+ tabIndex: _propTypes.default.number,
336
+
332
337
  /**
333
338
  * Props to add to the wrapping `.euiResizablePanel` div
334
339
  */
@@ -35,19 +35,21 @@ var _classnames = _interopRequireDefault(require("classnames"));
35
35
 
36
36
  var _common = require("../common");
37
37
 
38
- var _portal = require("../portal");
38
+ var _services = require("../../services");
39
39
 
40
- var _tool_tip_anchor = require("./tool_tip_anchor");
40
+ var _react2 = require("../../services/react");
41
41
 
42
- var _tool_tip_arrow = require("./tool_tip_arrow");
42
+ var _resize_observer = require("../observer/resize_observer");
43
+
44
+ var _portal = require("../portal");
43
45
 
44
46
  var _tool_tip_popover = require("./tool_tip_popover");
45
47
 
46
- var _react2 = require("../../services/react");
48
+ var _tool_tip_anchor = require("./tool_tip_anchor");
47
49
 
48
- var _services = require("../../services");
50
+ var _tool_tip_arrow = require("./tool_tip_arrow");
49
51
 
50
- var _resize_observer = require("../observer/resize_observer");
52
+ var _tool_tip_manager = require("./tool_tip_manager");
51
53
 
52
54
  var _react3 = require("@emotion/react");
53
55
 
@@ -146,9 +148,11 @@ var EuiToolTip = /*#__PURE__*/function (_Component) {
146
148
  if (!_this.timeoutId) {
147
149
  _this.timeoutId = setTimeout(function () {
148
150
  (0, _react2.enqueueStateChange)(function () {
149
- return _this.setState({
151
+ _this.setState({
150
152
  visible: true
151
153
  });
154
+
155
+ _tool_tip_manager.toolTipManager.registerTooltip(_this.hideToolTip);
152
156
  });
153
157
  }, delayToMsMap[_this.props.delay]);
154
158
  }
@@ -207,6 +211,8 @@ var EuiToolTip = /*#__PURE__*/function (_Component) {
207
211
  toolTipStyles: DEFAULT_TOOLTIP_STYLES,
208
212
  arrowStyles: undefined
209
213
  });
214
+
215
+ _tool_tip_manager.toolTipManager.deregisterToolTip(_this.hideToolTip);
210
216
  }
211
217
  });
212
218
  });
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.toolTipManager = void 0;
9
+
10
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
+
12
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
+
14
+ /*
15
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
16
+ * or more contributor license agreements. Licensed under the Elastic License
17
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
18
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
19
+ * Side Public License, v 1.
20
+ */
21
+
22
+ /**
23
+ * Manager utility that ensures only one tooltip is visible at a time
24
+ *
25
+ * UX rationale (primarily for mouse-only users):
26
+ * @see https://github.com/elastic/kibana/issues/144482
27
+ * @see https://github.com/elastic/eui/issues/5883
28
+ */
29
+ var ToolTipManager = function ToolTipManager() {
30
+ var _this = this;
31
+
32
+ (0, _classCallCheck2.default)(this, ToolTipManager);
33
+ (0, _defineProperty2.default)(this, "toolTipsToHide", new Set());
34
+ (0, _defineProperty2.default)(this, "registerTooltip", function (hideCallback) {
35
+ _this.toolTipsToHide.forEach(function (hide) {
36
+ return hide();
37
+ });
38
+
39
+ _this.toolTipsToHide.clear();
40
+
41
+ _this.toolTipsToHide.add(hideCallback);
42
+ });
43
+ (0, _defineProperty2.default)(this, "deregisterToolTip", function (hideCallback) {
44
+ _this.toolTipsToHide.delete(hideCallback);
45
+ });
46
+ };
47
+
48
+ var toolTipManager = new ToolTipManager();
49
+ exports.toolTipManager = toolTipManager;
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getSecureRelForTarget = void 0;
7
7
 
8
- var _url = require("../url");
9
-
10
8
  /*
11
9
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
12
10
  * or more contributor license agreements. Licensed under the Elastic License
@@ -20,18 +18,13 @@ var _url = require("../url");
20
18
  * https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/
21
19
  */
22
20
  var getSecureRelForTarget = function getSecureRelForTarget(_ref) {
23
- var href = _ref.href,
24
- _ref$target = _ref.target,
21
+ var _ref$target = _ref.target,
25
22
  target = _ref$target === void 0 ? '' : _ref$target,
26
23
  rel = _ref.rel;
27
- var isElasticHref = !!href && (0, _url.isDomainSecure)(href);
28
24
  var relParts = !!rel ? rel.split(' ').filter(function (part) {
29
25
  return !!part.length && part !== 'noreferrer';
30
26
  }) : [];
31
-
32
- if (!isElasticHref) {
33
- relParts.push('noreferrer');
34
- }
27
+ relParts.push('noreferrer');
35
28
 
36
29
  if (target.includes('_blank') && relParts.indexOf('noopener') === -1) {
37
30
  relParts.push('noopener');
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.withEuiTheme = exports.useEuiTheme = void 0;
10
+ exports.withEuiTheme = exports.useEuiTheme = exports.RenderWithEuiTheme = void 0;
11
11
 
12
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
13
 
@@ -31,6 +31,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
31
31
  * Side Public License, v 1.
32
32
  */
33
33
  var providerMessage = "`EuiProvider` is missing which can result in negative effects.\nWrap your component in `EuiProvider`: https://ela.st/euiprovider.";
34
+ /**
35
+ * Hook for function components
36
+ */
34
37
 
35
38
  var useEuiTheme = function useEuiTheme() {
36
39
  var theme = (0, _react.useContext)(_context.EuiThemeContext);
@@ -66,6 +69,10 @@ var useEuiTheme = function useEuiTheme() {
66
69
  }, [theme, colorMode, modifications]);
67
70
  return assembledTheme;
68
71
  };
72
+ /**
73
+ * HOC for class components
74
+ */
75
+
69
76
 
70
77
  exports.useEuiTheme = useEuiTheme;
71
78
 
@@ -86,5 +93,18 @@ var withEuiTheme = function withEuiTheme(Component) {
86
93
  WithEuiTheme.displayName = componentName;
87
94
  return WithEuiTheme;
88
95
  };
96
+ /**
97
+ * Render prop alternative for complex class components
98
+ * Most useful for scenarios where a HOC may interfere with typing
99
+ */
100
+
101
+
102
+ exports.withEuiTheme = withEuiTheme;
103
+
104
+ var RenderWithEuiTheme = function RenderWithEuiTheme(_ref) {
105
+ var children = _ref.children;
106
+ var theme = useEuiTheme();
107
+ return children(theme);
108
+ };
89
109
 
90
- exports.withEuiTheme = withEuiTheme;
110
+ exports.RenderWithEuiTheme = RenderWithEuiTheme;
@@ -45,6 +45,12 @@ Object.defineProperty(exports, "EuiThemeProvider", {
45
45
  return _provider.EuiThemeProvider;
46
46
  }
47
47
  });
48
+ Object.defineProperty(exports, "RenderWithEuiTheme", {
49
+ enumerable: true,
50
+ get: function get() {
51
+ return _hooks.RenderWithEuiTheme;
52
+ }
53
+ });
48
54
  Object.defineProperty(exports, "buildTheme", {
49
55
  enumerable: true,
50
56
  get: function get() {
@@ -1,23 +0,0 @@
1
- /*
2
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
- * or more contributor license agreements. Licensed under the Elastic License
4
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
- * in compliance with, at your election, the Elastic License 2.0 or the Server
6
- * Side Public License, v 1.
7
- */
8
- var isElasticHost = /^([a-zA-Z0-9]+\.)*elastic\.co$/; // In order for the domain to be secure it needs to be in a parsable format,
9
- // with the protocol of http: or https: and the host matching elastic.co or
10
- // of one its subdomains
11
-
12
- export var isDomainSecure = function isDomainSecure() {
13
- var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
14
-
15
- try {
16
- var parsed = new URL(url);
17
- var protocolMatches = parsed.protocol === 'http:' || parsed.protocol === 'https:';
18
- var domainMatches = !!parsed.host.match(isElasticHost);
19
- return protocolMatches && domainMatches;
20
- } catch (e) {
21
- return false;
22
- }
23
- };
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.isDomainSecure = void 0;
7
-
8
- /*
9
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
10
- * or more contributor license agreements. Licensed under the Elastic License
11
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
12
- * in compliance with, at your election, the Elastic License 2.0 or the Server
13
- * Side Public License, v 1.
14
- */
15
- var isElasticHost = /^([a-zA-Z0-9]+\.)*elastic\.co$/; // In order for the domain to be secure it needs to be in a parsable format,
16
- // with the protocol of http: or https: and the host matching elastic.co or
17
- // of one its subdomains
18
-
19
- var isDomainSecure = function isDomainSecure() {
20
- var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
21
-
22
- try {
23
- var parsed = new URL(url);
24
- var protocolMatches = parsed.protocol === 'http:' || parsed.protocol === 'https:';
25
- var domainMatches = !!parsed.host.match(isElasticHost);
26
- return protocolMatches && domainMatches;
27
- } catch (e) {
28
- return false;
29
- }
30
- };
31
-
32
- exports.isDomainSecure = isDomainSecure;
@@ -1,23 +0,0 @@
1
- /*
2
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
- * or more contributor license agreements. Licensed under the Elastic License
4
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
- * in compliance with, at your election, the Elastic License 2.0 or the Server
6
- * Side Public License, v 1.
7
- */
8
- var isElasticHost = /^([a-zA-Z0-9]+\.)*elastic\.co$/; // In order for the domain to be secure it needs to be in a parsable format,
9
- // with the protocol of http: or https: and the host matching elastic.co or
10
- // of one its subdomains
11
-
12
- export var isDomainSecure = function isDomainSecure() {
13
- var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
14
-
15
- try {
16
- var parsed = new URL(url);
17
- var protocolMatches = parsed.protocol === 'http:' || parsed.protocol === 'https:';
18
- var domainMatches = !!parsed.host.match(isElasticHost);
19
- return protocolMatches && domainMatches;
20
- } catch (e) {
21
- return false;
22
- }
23
- };
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.isDomainSecure = void 0;
7
-
8
- /*
9
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
10
- * or more contributor license agreements. Licensed under the Elastic License
11
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
12
- * in compliance with, at your election, the Elastic License 2.0 or the Server
13
- * Side Public License, v 1.
14
- */
15
- var isElasticHost = /^([a-zA-Z0-9]+\.)*elastic\.co$/; // In order for the domain to be secure it needs to be in a parsable format,
16
- // with the protocol of http: or https: and the host matching elastic.co or
17
- // of one its subdomains
18
-
19
- var isDomainSecure = function isDomainSecure() {
20
- var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
21
-
22
- try {
23
- var parsed = new URL(url);
24
- var protocolMatches = parsed.protocol === 'http:' || parsed.protocol === 'https:';
25
- var domainMatches = !!parsed.host.match(isElasticHost);
26
- return protocolMatches && domainMatches;
27
- } catch (e) {
28
- return false;
29
- }
30
- };
31
-
32
- exports.isDomainSecure = isDomainSecure;
@@ -1,41 +0,0 @@
1
- .euiBasicTable {
2
- &-loading {
3
- position: relative;
4
-
5
- tbody {
6
- overflow: hidden;
7
- }
8
-
9
- tbody::before {
10
- position: absolute;
11
- content: '';
12
- width: 100%;
13
- height: $euiBorderWidthThick;
14
- background-color: $euiColorPrimary;
15
- animation: euiBasicTableLoading 1000ms linear;
16
- animation-iteration-count: infinite;
17
- }
18
- }
19
- }
20
-
21
- @keyframes euiBasicTableLoading {
22
- from {
23
- left: 0;
24
- width: 0;
25
- }
26
-
27
- 20% {
28
- left: 0;
29
- width: 40%;
30
- }
31
-
32
- 80% {
33
- left: 60%;
34
- width: 40%;
35
- }
36
-
37
- 100% {
38
- left: 100%;
39
- width: 0;
40
- }
41
- }
@@ -1 +0,0 @@
1
- @import 'basic_table';
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.isDomainSecure = void 0;
7
-
8
- /*
9
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
10
- * or more contributor license agreements. Licensed under the Elastic License
11
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
12
- * in compliance with, at your election, the Elastic License 2.0 or the Server
13
- * Side Public License, v 1.
14
- */
15
- var isElasticHost = /^([a-zA-Z0-9]+\.)*elastic\.co$/; // In order for the domain to be secure it needs to be in a parsable format,
16
- // with the protocol of http: or https: and the host matching elastic.co or
17
- // of one its subdomains
18
-
19
- var isDomainSecure = function isDomainSecure() {
20
- var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
21
-
22
- try {
23
- var parsed = new URL(url);
24
- var protocolMatches = parsed.protocol === 'http:' || parsed.protocol === 'https:';
25
- var domainMatches = !!parsed.host.match(isElasticHost);
26
- return protocolMatches && domainMatches;
27
- } catch (e) {
28
- return false;
29
- }
30
- };
31
-
32
- exports.isDomainSecure = isDomainSecure;