@elastic/eui 121.0.0-snapshot.1788869799640 → 121.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 (69) hide show
  1. package/dist/eui-icons.json +10 -10
  2. package/es/components/datagrid/body/cell/data_grid_cell.js +5 -8
  3. package/es/components/datagrid/body/cell/data_grid_cell.styles.js +1 -1
  4. package/es/components/datagrid/body/cell/data_grid_cell_wrapper.js +2 -4
  5. package/es/components/datagrid/body/footer/data_grid_footer_row.js +0 -4
  6. package/es/components/datagrid/body/header/column_resizer.js +87 -74
  7. package/es/components/datagrid/body/header/data_grid_control_header_cell.js +1 -2
  8. package/es/components/datagrid/body/header/data_grid_header_cell.js +0 -1
  9. package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +3 -9
  10. package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -1
  11. package/es/components/datagrid/controls/keyboard_shortcuts.js +1 -17
  12. package/es/components/datagrid/data_grid.js +0 -2
  13. package/es/components/form/super_select/super_select.js +351 -247
  14. package/eui.d.ts +55 -30
  15. package/i18ntokens.json +205 -277
  16. package/lib/components/datagrid/body/cell/data_grid_cell.js +5 -8
  17. package/lib/components/datagrid/body/cell/data_grid_cell.styles.js +1 -1
  18. package/lib/components/datagrid/body/cell/data_grid_cell_wrapper.js +2 -4
  19. package/lib/components/datagrid/body/footer/data_grid_footer_row.js +0 -4
  20. package/lib/components/datagrid/body/header/column_resizer.js +85 -73
  21. package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +1 -2
  22. package/lib/components/datagrid/body/header/data_grid_header_cell.js +0 -1
  23. package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +3 -9
  24. package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -1
  25. package/lib/components/datagrid/controls/keyboard_shortcuts.js +1 -17
  26. package/lib/components/datagrid/data_grid.js +0 -2
  27. package/lib/components/form/super_select/super_select.js +355 -253
  28. package/optimize/es/components/datagrid/body/cell/data_grid_cell.js +4 -5
  29. package/optimize/es/components/datagrid/body/cell/data_grid_cell.styles.js +1 -1
  30. package/optimize/es/components/datagrid/body/cell/data_grid_cell_wrapper.js +2 -4
  31. package/optimize/es/components/datagrid/body/footer/data_grid_footer_row.js +0 -4
  32. package/optimize/es/components/datagrid/body/header/column_resizer.js +81 -69
  33. package/optimize/es/components/datagrid/body/header/data_grid_control_header_cell.js +1 -2
  34. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +0 -1
  35. package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +3 -7
  36. package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -1
  37. package/optimize/es/components/datagrid/controls/keyboard_shortcuts.js +1 -17
  38. package/optimize/es/components/datagrid/data_grid.js +0 -2
  39. package/optimize/es/components/form/super_select/super_select.js +265 -242
  40. package/optimize/lib/components/datagrid/body/cell/data_grid_cell.js +4 -5
  41. package/optimize/lib/components/datagrid/body/cell/data_grid_cell.styles.js +1 -1
  42. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_wrapper.js +2 -4
  43. package/optimize/lib/components/datagrid/body/footer/data_grid_footer_row.js +0 -4
  44. package/optimize/lib/components/datagrid/body/header/column_resizer.js +79 -69
  45. package/optimize/lib/components/datagrid/body/header/data_grid_control_header_cell.js +1 -2
  46. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +0 -1
  47. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +3 -7
  48. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -1
  49. package/optimize/lib/components/datagrid/controls/keyboard_shortcuts.js +1 -17
  50. package/optimize/lib/components/datagrid/data_grid.js +0 -2
  51. package/optimize/lib/components/form/super_select/super_select.js +265 -243
  52. package/package.json +7 -8
  53. package/test-env/components/datagrid/body/cell/data_grid_cell.js +5 -8
  54. package/test-env/components/datagrid/body/cell/data_grid_cell.styles.js +1 -1
  55. package/test-env/components/datagrid/body/cell/data_grid_cell_wrapper.js +2 -4
  56. package/test-env/components/datagrid/body/footer/data_grid_footer_row.js +0 -4
  57. package/test-env/components/datagrid/body/header/column_resizer.js +79 -69
  58. package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +1 -2
  59. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +0 -1
  60. package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.js +3 -9
  61. package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -1
  62. package/test-env/components/datagrid/controls/keyboard_shortcuts.js +1 -17
  63. package/test-env/components/datagrid/data_grid.js +0 -2
  64. package/test-env/components/form/super_select/super_select.js +345 -243
  65. package/es/components/datagrid/utils/copy_focused_cell.js +0 -34
  66. package/lib/components/datagrid/utils/copy_focused_cell.js +0 -39
  67. package/optimize/es/components/datagrid/utils/copy_focused_cell.js +0 -34
  68. package/optimize/lib/components/datagrid/utils/copy_focused_cell.js +0 -39
  69. package/test-env/components/datagrid/utils/copy_focused_cell.js +0 -16
@@ -1,34 +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
-
9
- import { useEffect } from 'react';
10
-
11
- /** Copies the focused data cell value when nothing is selected. */
12
- export var copyFocusedDataGridCell = function copyFocusedDataGridCell(event) {
13
- var _window$getSelection, _ref, _cellContent$innerTex;
14
- if (event.defaultPrevented) return;
15
- var cell = document.activeElement;
16
- if (!(cell instanceof HTMLElement)) return;
17
- if (!cell.classList.contains('euiDataGridRowCell')) return;
18
- if (cell.classList.contains('euiDataGridRowCell--controlColumn')) return;
19
- if ((_window$getSelection = window.getSelection()) !== null && _window$getSelection !== void 0 && _window$getSelection.toString()) return;
20
- if (!event.clipboardData) return;
21
- var cellContent = cell.querySelector('[data-datagrid-cellcontent]');
22
- var text = (_ref = (_cellContent$innerTex = cellContent === null || cellContent === void 0 ? void 0 : cellContent.innerText) !== null && _cellContent$innerTex !== void 0 ? _cellContent$innerTex : cellContent === null || cellContent === void 0 ? void 0 : cellContent.textContent) !== null && _ref !== void 0 ? _ref : '';
23
- if (!text) return;
24
- event.clipboardData.setData('text/plain', text);
25
- event.preventDefault();
26
- };
27
- export var useCopyFocusedDataGridCell = function useCopyFocusedDataGridCell() {
28
- useEffect(function () {
29
- // The handler is static, so the browser dedupes identical listeners.
30
- // Do not remove on unmount — that would disable copy for remaining grids.
31
- // Same approach as OverrideCopiedTabularContent.
32
- document.addEventListener('copy', copyFocusedDataGridCell);
33
- }, []);
34
- };
@@ -1,39 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useCopyFocusedDataGridCell = exports.copyFocusedDataGridCell = void 0;
7
- var _react = require("react");
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
-
16
- /** Copies the focused data cell value when nothing is selected. */
17
- var copyFocusedDataGridCell = exports.copyFocusedDataGridCell = function copyFocusedDataGridCell(event) {
18
- var _window$getSelection, _ref, _cellContent$innerTex;
19
- if (event.defaultPrevented) return;
20
- var cell = document.activeElement;
21
- if (!(cell instanceof HTMLElement)) return;
22
- if (!cell.classList.contains('euiDataGridRowCell')) return;
23
- if (cell.classList.contains('euiDataGridRowCell--controlColumn')) return;
24
- if ((_window$getSelection = window.getSelection()) !== null && _window$getSelection !== void 0 && _window$getSelection.toString()) return;
25
- if (!event.clipboardData) return;
26
- var cellContent = cell.querySelector('[data-datagrid-cellcontent]');
27
- var text = (_ref = (_cellContent$innerTex = cellContent === null || cellContent === void 0 ? void 0 : cellContent.innerText) !== null && _cellContent$innerTex !== void 0 ? _cellContent$innerTex : cellContent === null || cellContent === void 0 ? void 0 : cellContent.textContent) !== null && _ref !== void 0 ? _ref : '';
28
- if (!text) return;
29
- event.clipboardData.setData('text/plain', text);
30
- event.preventDefault();
31
- };
32
- var useCopyFocusedDataGridCell = exports.useCopyFocusedDataGridCell = function useCopyFocusedDataGridCell() {
33
- (0, _react.useEffect)(function () {
34
- // The handler is static, so the browser dedupes identical listeners.
35
- // Do not remove on unmount — that would disable copy for remaining grids.
36
- // Same approach as OverrideCopiedTabularContent.
37
- document.addEventListener('copy', copyFocusedDataGridCell);
38
- }, []);
39
- };
@@ -1,34 +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
-
9
- import { useEffect } from 'react';
10
-
11
- /** Copies the focused data cell value when nothing is selected. */
12
- export var copyFocusedDataGridCell = function copyFocusedDataGridCell(event) {
13
- var _window$getSelection, _ref, _cellContent$innerTex;
14
- if (event.defaultPrevented) return;
15
- var cell = document.activeElement;
16
- if (!(cell instanceof HTMLElement)) return;
17
- if (!cell.classList.contains('euiDataGridRowCell')) return;
18
- if (cell.classList.contains('euiDataGridRowCell--controlColumn')) return;
19
- if ((_window$getSelection = window.getSelection()) !== null && _window$getSelection !== void 0 && _window$getSelection.toString()) return;
20
- if (!event.clipboardData) return;
21
- var cellContent = cell.querySelector('[data-datagrid-cellcontent]');
22
- var text = (_ref = (_cellContent$innerTex = cellContent === null || cellContent === void 0 ? void 0 : cellContent.innerText) !== null && _cellContent$innerTex !== void 0 ? _cellContent$innerTex : cellContent === null || cellContent === void 0 ? void 0 : cellContent.textContent) !== null && _ref !== void 0 ? _ref : '';
23
- if (!text) return;
24
- event.clipboardData.setData('text/plain', text);
25
- event.preventDefault();
26
- };
27
- export var useCopyFocusedDataGridCell = function useCopyFocusedDataGridCell() {
28
- useEffect(function () {
29
- // The handler is static, so the browser dedupes identical listeners.
30
- // Do not remove on unmount — that would disable copy for remaining grids.
31
- // Same approach as OverrideCopiedTabularContent.
32
- document.addEventListener('copy', copyFocusedDataGridCell);
33
- }, []);
34
- };
@@ -1,39 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useCopyFocusedDataGridCell = exports.copyFocusedDataGridCell = void 0;
7
- var _react = require("react");
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
-
16
- /** Copies the focused data cell value when nothing is selected. */
17
- var copyFocusedDataGridCell = exports.copyFocusedDataGridCell = function copyFocusedDataGridCell(event) {
18
- var _window$getSelection, _ref, _cellContent$innerTex;
19
- if (event.defaultPrevented) return;
20
- var cell = document.activeElement;
21
- if (!(cell instanceof HTMLElement)) return;
22
- if (!cell.classList.contains('euiDataGridRowCell')) return;
23
- if (cell.classList.contains('euiDataGridRowCell--controlColumn')) return;
24
- if ((_window$getSelection = window.getSelection()) !== null && _window$getSelection !== void 0 && _window$getSelection.toString()) return;
25
- if (!event.clipboardData) return;
26
- var cellContent = cell.querySelector('[data-datagrid-cellcontent]');
27
- var text = (_ref = (_cellContent$innerTex = cellContent === null || cellContent === void 0 ? void 0 : cellContent.innerText) !== null && _cellContent$innerTex !== void 0 ? _cellContent$innerTex : cellContent === null || cellContent === void 0 ? void 0 : cellContent.textContent) !== null && _ref !== void 0 ? _ref : '';
28
- if (!text) return;
29
- event.clipboardData.setData('text/plain', text);
30
- event.preventDefault();
31
- };
32
- var useCopyFocusedDataGridCell = exports.useCopyFocusedDataGridCell = function useCopyFocusedDataGridCell() {
33
- (0, _react.useEffect)(function () {
34
- // The handler is static, so the browser dedupes identical listeners.
35
- // Do not remove on unmount — that would disable copy for remaining grids.
36
- // Same approach as OverrideCopiedTabularContent.
37
- document.addEventListener('copy', copyFocusedDataGridCell);
38
- }, []);
39
- };
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useCopyFocusedDataGridCell = exports.copyFocusedDataGridCell = void 0;
7
- /*
8
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
9
- * or more contributor license agreements. Licensed under the Elastic License
10
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
11
- * in compliance with, at your election, the Elastic License 2.0 or the Server
12
- * Side Public License, v 1.
13
- */
14
-
15
- var copyFocusedDataGridCell = exports.copyFocusedDataGridCell = function copyFocusedDataGridCell() {};
16
- var useCopyFocusedDataGridCell = exports.useCopyFocusedDataGridCell = function useCopyFocusedDataGridCell() {};