@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.
- package/dist/eui-icons.json +10 -10
- package/es/components/datagrid/body/cell/data_grid_cell.js +5 -8
- package/es/components/datagrid/body/cell/data_grid_cell.styles.js +1 -1
- package/es/components/datagrid/body/cell/data_grid_cell_wrapper.js +2 -4
- package/es/components/datagrid/body/footer/data_grid_footer_row.js +0 -4
- package/es/components/datagrid/body/header/column_resizer.js +87 -74
- package/es/components/datagrid/body/header/data_grid_control_header_cell.js +1 -2
- package/es/components/datagrid/body/header/data_grid_header_cell.js +0 -1
- package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +3 -9
- package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -1
- package/es/components/datagrid/controls/keyboard_shortcuts.js +1 -17
- package/es/components/datagrid/data_grid.js +0 -2
- package/es/components/form/super_select/super_select.js +351 -247
- package/eui.d.ts +55 -30
- package/i18ntokens.json +205 -277
- package/lib/components/datagrid/body/cell/data_grid_cell.js +5 -8
- package/lib/components/datagrid/body/cell/data_grid_cell.styles.js +1 -1
- package/lib/components/datagrid/body/cell/data_grid_cell_wrapper.js +2 -4
- package/lib/components/datagrid/body/footer/data_grid_footer_row.js +0 -4
- package/lib/components/datagrid/body/header/column_resizer.js +85 -73
- package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +1 -2
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +0 -1
- package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +3 -9
- package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -1
- package/lib/components/datagrid/controls/keyboard_shortcuts.js +1 -17
- package/lib/components/datagrid/data_grid.js +0 -2
- package/lib/components/form/super_select/super_select.js +355 -253
- package/optimize/es/components/datagrid/body/cell/data_grid_cell.js +4 -5
- package/optimize/es/components/datagrid/body/cell/data_grid_cell.styles.js +1 -1
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_wrapper.js +2 -4
- package/optimize/es/components/datagrid/body/footer/data_grid_footer_row.js +0 -4
- package/optimize/es/components/datagrid/body/header/column_resizer.js +81 -69
- package/optimize/es/components/datagrid/body/header/data_grid_control_header_cell.js +1 -2
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +0 -1
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +3 -7
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -1
- package/optimize/es/components/datagrid/controls/keyboard_shortcuts.js +1 -17
- package/optimize/es/components/datagrid/data_grid.js +0 -2
- package/optimize/es/components/form/super_select/super_select.js +265 -242
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell.js +4 -5
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell.styles.js +1 -1
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_wrapper.js +2 -4
- package/optimize/lib/components/datagrid/body/footer/data_grid_footer_row.js +0 -4
- package/optimize/lib/components/datagrid/body/header/column_resizer.js +79 -69
- package/optimize/lib/components/datagrid/body/header/data_grid_control_header_cell.js +1 -2
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +0 -1
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +3 -7
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -1
- package/optimize/lib/components/datagrid/controls/keyboard_shortcuts.js +1 -17
- package/optimize/lib/components/datagrid/data_grid.js +0 -2
- package/optimize/lib/components/form/super_select/super_select.js +265 -243
- package/package.json +7 -8
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +5 -8
- package/test-env/components/datagrid/body/cell/data_grid_cell.styles.js +1 -1
- package/test-env/components/datagrid/body/cell/data_grid_cell_wrapper.js +2 -4
- package/test-env/components/datagrid/body/footer/data_grid_footer_row.js +0 -4
- package/test-env/components/datagrid/body/header/column_resizer.js +79 -69
- package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +1 -2
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +0 -1
- package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.js +3 -9
- package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -1
- package/test-env/components/datagrid/controls/keyboard_shortcuts.js +1 -17
- package/test-env/components/datagrid/data_grid.js +0 -2
- package/test-env/components/form/super_select/super_select.js +345 -243
- package/es/components/datagrid/utils/copy_focused_cell.js +0 -34
- package/lib/components/datagrid/utils/copy_focused_cell.js +0 -39
- package/optimize/es/components/datagrid/utils/copy_focused_cell.js +0 -34
- package/optimize/lib/components/datagrid/utils/copy_focused_cell.js +0 -39
- 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() {};
|