@elastic/eui 95.11.0 → 95.12.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 (144) hide show
  1. package/README.md +1 -69
  2. package/es/components/basic_table/basic_table.js +39 -32
  3. package/es/components/datagrid/body/cell/data_grid_cell.js +121 -15
  4. package/es/components/datagrid/body/cell/data_grid_cell.styles.js +5 -2
  5. package/es/components/datagrid/body/data_grid_body_custom.js +5 -2
  6. package/es/components/datagrid/body/data_grid_body_virtualized.js +5 -2
  7. package/es/components/datagrid/body/footer/data_grid_footer_row.js +17 -9
  8. package/es/components/datagrid/body/header/data_grid_control_header_cell.js +5 -2
  9. package/es/components/datagrid/body/header/data_grid_header_cell.js +3 -1
  10. package/es/components/datagrid/body/header/data_grid_header_cell.styles.js +0 -2
  11. package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +6 -3
  12. package/es/components/datagrid/body/header/data_grid_header_row.js +5 -1
  13. package/es/components/datagrid/data_grid.js +3 -3
  14. package/es/components/datagrid/data_grid.stories.utils.js +65 -29
  15. package/es/components/datagrid/utils/row_heights.js +9 -33
  16. package/es/components/date_picker/date_picker.js +1 -1
  17. package/es/components/provider/provider.js +16 -13
  18. package/es/components/provider/system_color_mode/index.js +9 -0
  19. package/es/components/provider/system_color_mode/system_color_mode_provider.js +49 -0
  20. package/es/components/resizable_container/resizable_button.js +9 -2
  21. package/es/components/resizable_container/resizable_button.styles.js +19 -6
  22. package/es/components/table/table_header_cell.js +10 -3
  23. package/es/components/table/table_header_cell_checkbox.js +5 -3
  24. package/es/components/table/table_row_cell.js +10 -3
  25. package/es/components/table/table_row_cell_checkbox.js +5 -3
  26. package/es/services/copy/index.js +10 -0
  27. package/es/services/copy/tabular_copy.js +103 -0
  28. package/es/services/index.js +1 -1
  29. package/eui.d.ts +162 -67
  30. package/i18ntokens.json +90 -90
  31. package/lib/components/basic_table/basic_table.js +38 -31
  32. package/lib/components/datagrid/body/cell/data_grid_cell.js +120 -14
  33. package/lib/components/datagrid/body/cell/data_grid_cell.styles.js +5 -2
  34. package/lib/components/datagrid/body/data_grid_body_custom.js +5 -2
  35. package/lib/components/datagrid/body/data_grid_body_virtualized.js +5 -2
  36. package/lib/components/datagrid/body/footer/data_grid_footer_row.js +13 -5
  37. package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +5 -2
  38. package/lib/components/datagrid/body/header/data_grid_header_cell.js +3 -1
  39. package/lib/components/datagrid/body/header/data_grid_header_cell.styles.js +0 -2
  40. package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +5 -2
  41. package/lib/components/datagrid/body/header/data_grid_header_row.js +5 -1
  42. package/lib/components/datagrid/data_grid.js +2 -2
  43. package/lib/components/datagrid/data_grid.stories.utils.js +66 -31
  44. package/lib/components/datagrid/utils/row_heights.js +8 -32
  45. package/lib/components/date_picker/date_picker.js +1 -1
  46. package/lib/components/provider/provider.js +16 -13
  47. package/lib/components/provider/system_color_mode/index.js +12 -0
  48. package/lib/components/provider/system_color_mode/system_color_mode_provider.js +54 -0
  49. package/lib/components/resizable_container/resizable_button.js +9 -2
  50. package/lib/components/resizable_container/resizable_button.styles.js +19 -6
  51. package/lib/components/table/table_header_cell.js +10 -3
  52. package/lib/components/table/table_header_cell_checkbox.js +5 -3
  53. package/lib/components/table/table_row_cell.js +10 -3
  54. package/lib/components/table/table_row_cell_checkbox.js +5 -3
  55. package/lib/services/copy/index.js +25 -0
  56. package/lib/services/copy/tabular_copy.js +111 -0
  57. package/lib/services/index.js +12 -8
  58. package/optimize/es/components/basic_table/basic_table.js +39 -32
  59. package/optimize/es/components/datagrid/body/cell/data_grid_cell.js +18 -14
  60. package/optimize/es/components/datagrid/body/cell/data_grid_cell.styles.js +5 -2
  61. package/optimize/es/components/datagrid/body/data_grid_body_custom.js +5 -2
  62. package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +5 -2
  63. package/optimize/es/components/datagrid/body/footer/data_grid_footer_row.js +17 -9
  64. package/optimize/es/components/datagrid/body/header/data_grid_control_header_cell.js +4 -2
  65. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +3 -1
  66. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.styles.js +0 -2
  67. package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +5 -3
  68. package/optimize/es/components/datagrid/body/header/data_grid_header_row.js +5 -1
  69. package/optimize/es/components/datagrid/data_grid.js +3 -3
  70. package/optimize/es/components/datagrid/data_grid.stories.utils.js +65 -29
  71. package/optimize/es/components/datagrid/utils/row_heights.js +9 -33
  72. package/optimize/es/components/date_picker/date_picker.js +1 -1
  73. package/optimize/es/components/provider/provider.js +16 -13
  74. package/optimize/es/components/provider/system_color_mode/index.js +9 -0
  75. package/optimize/es/components/provider/system_color_mode/system_color_mode_provider.js +40 -0
  76. package/optimize/es/components/resizable_container/resizable_button.js +3 -2
  77. package/optimize/es/components/resizable_container/resizable_button.styles.js +19 -6
  78. package/optimize/es/components/table/table_header_cell.js +3 -2
  79. package/optimize/es/components/table/table_header_cell_checkbox.js +3 -2
  80. package/optimize/es/components/table/table_row_cell.js +4 -3
  81. package/optimize/es/components/table/table_row_cell_checkbox.js +3 -2
  82. package/optimize/es/services/copy/index.js +10 -0
  83. package/optimize/es/services/copy/tabular_copy.js +103 -0
  84. package/optimize/es/services/index.js +1 -1
  85. package/optimize/lib/components/basic_table/basic_table.js +38 -31
  86. package/optimize/lib/components/datagrid/body/cell/data_grid_cell.js +17 -13
  87. package/optimize/lib/components/datagrid/body/cell/data_grid_cell.styles.js +5 -2
  88. package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +5 -2
  89. package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +5 -2
  90. package/optimize/lib/components/datagrid/body/footer/data_grid_footer_row.js +13 -5
  91. package/optimize/lib/components/datagrid/body/header/data_grid_control_header_cell.js +4 -2
  92. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +3 -1
  93. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.styles.js +0 -2
  94. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +4 -2
  95. package/optimize/lib/components/datagrid/body/header/data_grid_header_row.js +5 -1
  96. package/optimize/lib/components/datagrid/data_grid.js +2 -2
  97. package/optimize/lib/components/datagrid/data_grid.stories.utils.js +70 -37
  98. package/optimize/lib/components/datagrid/utils/row_heights.js +8 -32
  99. package/optimize/lib/components/date_picker/date_picker.js +1 -1
  100. package/optimize/lib/components/provider/provider.js +16 -13
  101. package/optimize/lib/components/provider/system_color_mode/index.js +12 -0
  102. package/optimize/lib/components/provider/system_color_mode/system_color_mode_provider.js +47 -0
  103. package/optimize/lib/components/resizable_container/resizable_button.js +3 -2
  104. package/optimize/lib/components/resizable_container/resizable_button.styles.js +19 -6
  105. package/optimize/lib/components/table/table_header_cell.js +3 -2
  106. package/optimize/lib/components/table/table_header_cell_checkbox.js +3 -2
  107. package/optimize/lib/components/table/table_row_cell.js +4 -3
  108. package/optimize/lib/components/table/table_row_cell_checkbox.js +3 -2
  109. package/optimize/lib/services/copy/index.js +25 -0
  110. package/optimize/lib/services/copy/tabular_copy.js +111 -0
  111. package/optimize/lib/services/index.js +12 -8
  112. package/package.json +1 -1
  113. package/test-env/components/basic_table/basic_table.js +38 -31
  114. package/test-env/components/datagrid/body/cell/data_grid_cell.js +120 -14
  115. package/test-env/components/datagrid/body/cell/data_grid_cell.styles.js +5 -2
  116. package/test-env/components/datagrid/body/data_grid_body_custom.js +5 -2
  117. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +5 -2
  118. package/test-env/components/datagrid/body/footer/data_grid_footer_row.js +13 -5
  119. package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +5 -2
  120. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +3 -1
  121. package/test-env/components/datagrid/body/header/data_grid_header_cell.styles.js +0 -2
  122. package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.js +5 -2
  123. package/test-env/components/datagrid/body/header/data_grid_header_row.js +5 -1
  124. package/test-env/components/datagrid/data_grid.js +2 -2
  125. package/test-env/components/datagrid/data_grid.stories.utils.js +70 -37
  126. package/test-env/components/datagrid/utils/row_heights.js +8 -32
  127. package/test-env/components/date_picker/date_picker.js +1 -1
  128. package/test-env/components/provider/provider.js +16 -13
  129. package/test-env/components/provider/system_color_mode/index.js +12 -0
  130. package/test-env/components/provider/system_color_mode/system_color_mode_provider.js +51 -0
  131. package/test-env/components/resizable_container/resizable_button.js +9 -2
  132. package/test-env/components/resizable_container/resizable_button.styles.js +19 -6
  133. package/test-env/components/table/table_header_cell.js +10 -3
  134. package/test-env/components/table/table_header_cell_checkbox.js +5 -3
  135. package/test-env/components/table/table_row_cell.js +10 -3
  136. package/test-env/components/table/table_row_cell_checkbox.js +5 -3
  137. package/test-env/services/copy/index.js +25 -0
  138. package/test-env/services/copy/tabular_copy.js +30 -0
  139. package/test-env/services/index.js +12 -8
  140. /package/es/services/{copy_to_clipboard.js → copy/copy_to_clipboard.js} +0 -0
  141. /package/lib/services/{copy_to_clipboard.js → copy/copy_to_clipboard.js} +0 -0
  142. /package/optimize/es/services/{copy_to_clipboard.js → copy/copy_to_clipboard.js} +0 -0
  143. /package/optimize/lib/services/{copy_to_clipboard.js → copy/copy_to_clipboard.js} +0 -0
  144. /package/test-env/services/{copy_to_clipboard.js → copy/copy_to_clipboard.js} +0 -0
@@ -71,10 +71,7 @@ var EuiDataGridCellContent = /*#__PURE__*/(0, _react.memo)(function (_ref) {
71
71
  });
72
72
  }, [cellHeightType, isControlColumn]);
73
73
  var styles = (0, _services.useEuiMemoizedStyles)(_data_grid_cell.euiDataGridRowCellStyles);
74
- var cssStyles = [styles.content.euiDataGridRowCell__content].concat((0, _toConsumableArray2.default)(isControlColumn ? [
75
- // Control column cells should not be vertically centered (defaultHeight) except
76
- // on single rows. They should be top-aligned for auto and lineCount heights
77
- styles.content.controlColumn, cellHeightType === 'default' ? styles.content.defaultHeight : styles.content.autoHeight] : [
74
+ var cssStyles = [styles.content.euiDataGridRowCell__content].concat((0, _toConsumableArray2.default)(isControlColumn ? [styles.content.controlColumn, styles.content.autoHeight] : [
78
75
  // Regular data cells should always inherit height from the row wrapper,
79
76
  // except for auto height
80
77
  cellHeightType === 'auto' ? styles.content.autoHeight : styles.content.defaultHeight]));
@@ -538,6 +535,57 @@ EuiDataGridCellContent.propTypes = {
538
535
  }),
539
536
  rowHeightUtils: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.any.isRequired]),
540
537
  pagination: _propTypes.default.any,
538
+ gridStyles: _propTypes.default.shape({
539
+ /**
540
+ * Size of fonts used within the row and column cells
541
+ * @default m
542
+ */
543
+ fontSize: _propTypes.default.oneOf(["s", "m", "l"]),
544
+ /**
545
+ * Defines the padding with the row and column cells
546
+ * @default m
547
+ */
548
+ cellPadding: _propTypes.default.oneOf(["s", "m", "l"]),
549
+ /**
550
+ * Border used for the row and column cells
551
+ * @default all
552
+ */
553
+ border: _propTypes.default.oneOf(["all", "horizontal", "none"]),
554
+ /**
555
+ * If set to true, rows will alternate zebra striping for clarity
556
+ * @default false
557
+ */
558
+ stripes: _propTypes.default.bool,
559
+ /**
560
+ * Visual style for the column headers. Recommendation is to use the `underline` style in times when #EuiDataGrid `toolbarVisibility` is set to `false`.
561
+ * @default shade
562
+ */
563
+ header: _propTypes.default.oneOf(["shade", "underline"]),
564
+ /**
565
+ * Visual style for the column footers.
566
+ * @default overline
567
+ */
568
+ footer: _propTypes.default.oneOf(["shade", "overline", "striped"]),
569
+ /**
570
+ * If set to true, the footer row will be sticky
571
+ * @default true
572
+ */
573
+ stickyFooter: _propTypes.default.bool,
574
+ /**
575
+ * Will define what visual style to show on row hover
576
+ * @default hover
577
+ */
578
+ rowHover: _propTypes.default.oneOf(["highlight", "none"]),
579
+ /**
580
+ * Optionally pass custom classes to highlight or customize certain rows
581
+ */
582
+ rowClasses: _propTypes.default.shape({}),
583
+ /**
584
+ * Optional callback returning the current `gridStyle` config when changes occur from user input (e.g. toolbar display controls).
585
+ * Can be used for, e.g. storing user `gridStyle` in a local storage object.
586
+ */
587
+ onChange: _propTypes.default.func
588
+ }).isRequired,
541
589
  setCellProps: _propTypes.default.func.isRequired,
542
590
  setCellContentsRef: _propTypes.default.func.isRequired,
543
591
  isExpanded: _propTypes.default.bool.isRequired,
@@ -605,7 +653,7 @@ var EuiDataGridCell = exports.EuiDataGridCell = /*#__PURE__*/function (_Componen
605
653
  var lineCount = isSingleLine ? 1 : rowHeightUtils === null || rowHeightUtils === void 0 ? void 0 : rowHeightUtils.getLineCount(rowHeightOption);
606
654
  if (lineCount) {
607
655
  var shouldUseHeightsCache = rowHeightUtils === null || rowHeightUtils === void 0 ? void 0 : rowHeightUtils.isRowHeightOverride(rowIndex, rowHeightsOptions);
608
- var height = rowHeightUtils.calculateHeightForLineCount(_this.cellContentsRef, lineCount, shouldUseHeightsCache);
656
+ var height = rowHeightUtils.calculateHeightForLineCount(_this.cellContentsRef, lineCount);
609
657
  if (shouldUseHeightsCache) {
610
658
  var _this$props4 = _this.props,
611
659
  columnId = _this$props4.columnId,
@@ -797,12 +845,12 @@ var EuiDataGridCell = exports.EuiDataGridCell = /*#__PURE__*/function (_Componen
797
845
  }, {
798
846
  key: "componentDidUpdate",
799
847
  value: function componentDidUpdate(prevProps) {
800
- var _this$props$rowHeight, _prevProps$rowHeights, _this$props$rowHeight2, _this$props$rowHeight3, _this$props$style, _prevProps$style;
848
+ var _this$props$rowHeight, _prevProps$rowHeights, _this$props$rowHeight2, _prevProps$rowHeights2, _this$props$rowHeight3, _prevProps$rowHeights3, _this$props$gridStyle, _prevProps$gridStyles, _this$props$gridStyle2, _prevProps$gridStyles2, _this$props$rowHeight4, _this$props$rowHeight5, _this$props$style, _prevProps$style;
801
849
  this.recalculateAutoHeight();
802
- if (((_this$props$rowHeight = this.props.rowHeightsOptions) === null || _this$props$rowHeight === void 0 ? void 0 : _this$props$rowHeight.defaultHeight) !== ((_prevProps$rowHeights = prevProps.rowHeightsOptions) === null || _prevProps$rowHeights === void 0 ? void 0 : _prevProps$rowHeights.defaultHeight)) {
850
+ if (((_this$props$rowHeight = this.props.rowHeightsOptions) === null || _this$props$rowHeight === void 0 ? void 0 : _this$props$rowHeight.defaultHeight) !== ((_prevProps$rowHeights = prevProps.rowHeightsOptions) === null || _prevProps$rowHeights === void 0 ? void 0 : _prevProps$rowHeights.defaultHeight) || ((_this$props$rowHeight2 = this.props.rowHeightsOptions) === null || _this$props$rowHeight2 === void 0 || (_this$props$rowHeight2 = _this$props$rowHeight2.rowHeights) === null || _this$props$rowHeight2 === void 0 ? void 0 : _this$props$rowHeight2[this.props.rowIndex]) !== ((_prevProps$rowHeights2 = prevProps.rowHeightsOptions) === null || _prevProps$rowHeights2 === void 0 || (_prevProps$rowHeights2 = _prevProps$rowHeights2.rowHeights) === null || _prevProps$rowHeights2 === void 0 ? void 0 : _prevProps$rowHeights2[prevProps.rowIndex]) || ((_this$props$rowHeight3 = this.props.rowHeightsOptions) === null || _this$props$rowHeight3 === void 0 ? void 0 : _this$props$rowHeight3.lineHeight) !== ((_prevProps$rowHeights3 = prevProps.rowHeightsOptions) === null || _prevProps$rowHeights3 === void 0 ? void 0 : _prevProps$rowHeights3.lineHeight) || ((_this$props$gridStyle = this.props.gridStyles) === null || _this$props$gridStyle === void 0 ? void 0 : _this$props$gridStyle.fontSize) !== ((_prevProps$gridStyles = prevProps.gridStyles) === null || _prevProps$gridStyles === void 0 ? void 0 : _prevProps$gridStyles.fontSize) || ((_this$props$gridStyle2 = this.props.gridStyles) === null || _this$props$gridStyle2 === void 0 ? void 0 : _this$props$gridStyle2.cellPadding) !== ((_prevProps$gridStyles2 = prevProps.gridStyles) === null || _prevProps$gridStyles2 === void 0 ? void 0 : _prevProps$gridStyles2.cellPadding)) {
803
851
  this.recalculateLineHeight();
804
852
  }
805
- if ((_this$props$rowHeight2 = this.props.rowHeightUtils) !== null && _this$props$rowHeight2 !== void 0 && _this$props$rowHeight2.compensateForLayoutShift && (_this$props$rowHeight3 = this.props.rowHeightsOptions) !== null && _this$props$rowHeight3 !== void 0 && _this$props$rowHeight3.scrollAnchorRow && this.props.colIndex === 0 &&
853
+ if ((_this$props$rowHeight4 = this.props.rowHeightUtils) !== null && _this$props$rowHeight4 !== void 0 && _this$props$rowHeight4.compensateForLayoutShift && (_this$props$rowHeight5 = this.props.rowHeightsOptions) !== null && _this$props$rowHeight5 !== void 0 && _this$props$rowHeight5.scrollAnchorRow && this.props.colIndex === 0 &&
806
854
  // once per row
807
855
  this.props.columnId === prevProps.columnId &&
808
856
  // if this is still the same column
@@ -810,12 +858,12 @@ var EuiDataGridCell = exports.EuiDataGridCell = /*#__PURE__*/function (_Componen
810
858
  // if this is still the same row
811
859
  ((_this$props$style = this.props.style) === null || _this$props$style === void 0 ? void 0 : _this$props$style.top) !== ((_prevProps$style = prevProps.style) === null || _prevProps$style === void 0 ? void 0 : _prevProps$style.top) // if the top position has changed
812
860
  ) {
813
- var _prevProps$style2, _this$props$style2, _this$props$rowHeight4;
861
+ var _prevProps$style2, _this$props$style2, _this$props$rowHeight6;
814
862
  var previousTop = parseFloat((_prevProps$style2 = prevProps.style) === null || _prevProps$style2 === void 0 ? void 0 : _prevProps$style2.top);
815
863
  var currentTop = parseFloat((_this$props$style2 = this.props.style) === null || _this$props$style2 === void 0 ? void 0 : _this$props$style2.top);
816
864
 
817
865
  // @ts-ignore We've already checked that this virtualization util is available above
818
- this.props.rowHeightUtils.compensateForLayoutShift(this.props.rowIndex, currentTop - previousTop, (_this$props$rowHeight4 = this.props.rowHeightsOptions) === null || _this$props$rowHeight4 === void 0 ? void 0 : _this$props$rowHeight4.scrollAnchorRow);
866
+ this.props.rowHeightUtils.compensateForLayoutShift(this.props.rowIndex, currentTop - previousTop, (_this$props$rowHeight6 = this.props.rowHeightsOptions) === null || _this$props$rowHeight6 === void 0 ? void 0 : _this$props$rowHeight6.scrollAnchorRow);
819
867
  }
820
868
  if (this.props.popoverContext.popoverIsOpen !== prevProps.popoverContext.popoverIsOpen || this.props.popoverContext.cellLocation !== prevProps.popoverContext.cellLocation || this.props.renderCellPopover !== prevProps.renderCellPopover) {
821
869
  this.handleCellPopover();
@@ -827,6 +875,7 @@ var EuiDataGridCell = exports.EuiDataGridCell = /*#__PURE__*/function (_Componen
827
875
  }, {
828
876
  key: "shouldComponentUpdate",
829
877
  value: function shouldComponentUpdate(nextProps, nextState) {
878
+ var _nextProps$gridStyles, _this$props$gridStyle3, _nextProps$gridStyles2, _this$props$gridStyle4;
830
879
  if (nextProps.rowIndex !== this.props.rowIndex) return true;
831
880
  if (nextProps.visibleRowIndex !== this.props.visibleRowIndex) return true;
832
881
  if (nextProps.colIndex !== this.props.colIndex) return true;
@@ -834,6 +883,8 @@ var EuiDataGridCell = exports.EuiDataGridCell = /*#__PURE__*/function (_Componen
834
883
  if (nextProps.columnType !== this.props.columnType) return true;
835
884
  if (nextProps.width !== this.props.width) return true;
836
885
  if (nextProps.rowHeightsOptions !== this.props.rowHeightsOptions) return true;
886
+ if (((_nextProps$gridStyles = nextProps.gridStyles) === null || _nextProps$gridStyles === void 0 ? void 0 : _nextProps$gridStyles.fontSize) !== ((_this$props$gridStyle3 = this.props.gridStyles) === null || _this$props$gridStyle3 === void 0 ? void 0 : _this$props$gridStyle3.fontSize)) return true;
887
+ if (((_nextProps$gridStyles2 = nextProps.gridStyles) === null || _nextProps$gridStyles2 === void 0 ? void 0 : _nextProps$gridStyles2.cellPadding) !== ((_this$props$gridStyle4 = this.props.gridStyles) === null || _this$props$gridStyle4 === void 0 ? void 0 : _this$props$gridStyle4.cellPadding)) return true;
837
888
  if (nextProps.renderCellValue !== this.props.renderCellValue) return true;
838
889
  if (nextProps.renderCellPopover !== this.props.renderCellPopover) return true;
839
890
  if (nextProps.interactiveCellId !== this.props.interactiveCellId) return true;
@@ -879,6 +930,10 @@ var EuiDataGridCell = exports.EuiDataGridCell = /*#__PURE__*/function (_Componen
879
930
  var popoverIsOpen = this.isPopoverOpen();
880
931
  var showCellActions = isExpandable && (popoverIsOpen || this.state.isFocused || this.state.isHovered);
881
932
  var cellClasses = (0, _classnames.default)('euiDataGridRowCell', (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "euiDataGridRowCell--".concat(columnType), columnType), 'euiDataGridRowCell--open', popoverIsOpen), className);
933
+
934
+ // classNames set by EuiDataGridCellWrapper
935
+ var isControlColumn = cellClasses.includes('euiDataGridRowCell--controlColumn');
936
+ var isLastColumn = cellClasses.includes('euiDataGridRowCell--lastColumn');
882
937
  var ariaRowIndex = pagination ? visibleRowIndex + 1 + pagination.pageSize * pagination.pageIndex : visibleRowIndex + 1;
883
938
  var _this$state$cellProps2 = this.state.cellProps,
884
939
  _ = _this$state$cellProps2.isExpandable,
@@ -932,10 +987,10 @@ var EuiDataGridCell = exports.EuiDataGridCell = /*#__PURE__*/function (_Componen
932
987
  setCellContentsRef: this.setCellContentsRef,
933
988
  rowHeight: rowHeight,
934
989
  rowHeightUtils: rowHeightUtils,
935
- isControlColumn: cellClasses.includes('euiDataGridRowCell--controlColumn'),
990
+ isControlColumn: isControlColumn,
936
991
  rowIndex: rowIndex,
937
992
  colIndex: colIndex
938
- }))), this.state.isFocused && (0, _react2.jsx)(CellScreenReaderDescription, {
993
+ }))), isLastColumn ? _services.tabularCopyMarkers.hiddenNewline : _services.tabularCopyMarkers.hiddenTab, this.state.isFocused && (0, _react2.jsx)(CellScreenReaderDescription, {
939
994
  columnName: (column === null || column === void 0 ? void 0 : column.displayAsText) || this.props.columnId,
940
995
  columnIndex: colIndex + 1,
941
996
  rowIndex: ariaRowIndex,
@@ -1342,7 +1397,58 @@ EuiDataGridCell.propTypes = {
1342
1397
  rowManager: _propTypes.default.shape({
1343
1398
  getRow: _propTypes.default.func.isRequired
1344
1399
  }),
1345
- pagination: _propTypes.default.any
1400
+ pagination: _propTypes.default.any,
1401
+ gridStyles: _propTypes.default.shape({
1402
+ /**
1403
+ * Size of fonts used within the row and column cells
1404
+ * @default m
1405
+ */
1406
+ fontSize: _propTypes.default.oneOf(["s", "m", "l"]),
1407
+ /**
1408
+ * Defines the padding with the row and column cells
1409
+ * @default m
1410
+ */
1411
+ cellPadding: _propTypes.default.oneOf(["s", "m", "l"]),
1412
+ /**
1413
+ * Border used for the row and column cells
1414
+ * @default all
1415
+ */
1416
+ border: _propTypes.default.oneOf(["all", "horizontal", "none"]),
1417
+ /**
1418
+ * If set to true, rows will alternate zebra striping for clarity
1419
+ * @default false
1420
+ */
1421
+ stripes: _propTypes.default.bool,
1422
+ /**
1423
+ * Visual style for the column headers. Recommendation is to use the `underline` style in times when #EuiDataGrid `toolbarVisibility` is set to `false`.
1424
+ * @default shade
1425
+ */
1426
+ header: _propTypes.default.oneOf(["shade", "underline"]),
1427
+ /**
1428
+ * Visual style for the column footers.
1429
+ * @default overline
1430
+ */
1431
+ footer: _propTypes.default.oneOf(["shade", "overline", "striped"]),
1432
+ /**
1433
+ * If set to true, the footer row will be sticky
1434
+ * @default true
1435
+ */
1436
+ stickyFooter: _propTypes.default.bool,
1437
+ /**
1438
+ * Will define what visual style to show on row hover
1439
+ * @default hover
1440
+ */
1441
+ rowHover: _propTypes.default.oneOf(["highlight", "none"]),
1442
+ /**
1443
+ * Optionally pass custom classes to highlight or customize certain rows
1444
+ */
1445
+ rowClasses: _propTypes.default.shape({}),
1446
+ /**
1447
+ * Optional callback returning the current `gridStyle` config when changes occur from user input (e.g. toolbar display controls).
1448
+ * Can be used for, e.g. storing user `gridStyle` in a local storage object.
1449
+ */
1450
+ onChange: _propTypes.default.func
1451
+ }).isRequired
1346
1452
  };
1347
1453
  var RenderCellInRow = /*#__PURE__*/(0, _react.memo)(function (_ref2) {
1348
1454
  var row = _ref2.row,
@@ -1414,7 +1520,7 @@ var CellScreenReaderDescription = /*#__PURE__*/(0, _react.memo)(function (_ref5)
1414
1520
  rowIndex: rowIndex
1415
1521
  });
1416
1522
  var enterKeyPrompt = (0, _i18n.useEuiI18n)('euiDataGridCell.expansionEnterPrompt', 'Press the Enter key to expand this cell.');
1417
- return (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("p", null, " - ".concat(cellPosition).concat(canExpandCell ? ". ".concat(enterKeyPrompt) : '')));
1523
+ return (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("p", null, _services.tabularCopyMarkers.hiddenNoCopyBoundary, " - ".concat(cellPosition).concat(canExpandCell ? ". ".concat(enterKeyPrompt) : ''), _services.tabularCopyMarkers.hiddenNoCopyBoundary));
1418
1524
  });
1419
1525
  CellScreenReaderDescription.propTypes = {
1420
1526
  columnName: _propTypes.default.string.isRequired,
@@ -96,6 +96,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
96
96
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
97
97
  };
98
98
  var euiDataGridRowCellStyles = exports.euiDataGridRowCellStyles = function euiDataGridRowCellStyles(euiThemeContext) {
99
+ var euiTheme = euiThemeContext.euiTheme;
99
100
  var cellOutline = euiDataGridCellOutlineStyles(euiThemeContext);
100
101
  var _euiDataGridCellOutli = euiDataGridCellOutlineSelectors(),
101
102
  outlineSelectors = _euiDataGridCellOutli.outline;
@@ -103,9 +104,11 @@ var euiDataGridRowCellStyles = exports.euiDataGridRowCellStyles = function euiDa
103
104
  euiDataGridRowCell: /*#__PURE__*/(0, _react.css)("position:relative;", outlineSelectors.show, "{", cellOutline.focusStyles, ";}", outlineSelectors.hover, "{", cellOutline.hoverStyles, ";}", outlineSelectors.focusTrapped, "{", cellOutline.hoverStyles, ";}&>[data-focus-lock-disabled]{", (0, _global_styling.logicalCSS)('height', '100%'), ";}&:where(.euiDataGridRowCell--numeric, .euiDataGridRowCell--currency){", (0, _global_styling.logicalTextAlignCSS)('right'), ";}&:where(.euiDataGridRowCell--uppercase){text-transform:uppercase;}&:where(.euiDataGridRowCell--lowercase){text-transform:lowercase;}&:where(.euiDataGridRowCell--capitalize){text-transform:capitalize;};label:euiDataGridRowCell;"),
104
105
  content: {
105
106
  euiDataGridRowCell__content: _ref,
106
- controlColumn: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', '100%'), " display:flex;align-items:center;;label:controlColumn;"),
107
107
  autoHeight: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', 'auto'), ";;label:autoHeight;"),
108
- defaultHeight: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), ";;label:defaultHeight;")
108
+ defaultHeight: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), ";;label:defaultHeight;"),
109
+ // Control columns should be vertically centered with the *first line* of text
110
+ // for both single and multi-line heights (see https://github.com/elastic/eui/issues/7897)
111
+ controlColumn: /*#__PURE__*/(0, _react.css)("display:inline-flex;align-items:start;gap:", euiTheme.size.xxs, ";vertical-align:-webkit-baseline-middle;vertical-align:-moz-middle-with-baseline;.euiDataGrid--fontSizeSmall &:where(.euiDataGridRowCell__content--defaultHeight){", (0, _global_styling.logicalCSS)('height', '100%'), " align-items:center;}.euiCheckbox:not(:has(label)){display:inline;.euiCheckbox__square{display:inline-flex;vertical-align:text-bottom;@supports (vertical-align: -moz-middle-with-baseline){vertical-align:sub;}}};label:controlColumn;")
109
112
  }
110
113
  };
111
114
  };
@@ -99,6 +99,7 @@ var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = function
99
99
  columnWidths: columnWidths,
100
100
  defaultColumnWidth: defaultColumnWidth,
101
101
  setColumnWidth: setColumnWidth,
102
+ visibleColCount: visibleColCount,
102
103
  setVisibleColumns: setVisibleColumns,
103
104
  switchColumnPos: switchColumnPos,
104
105
  sorting: sorting,
@@ -112,6 +113,7 @@ var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = function
112
113
  renderCellPopover: renderCellPopover,
113
114
  rowIndex: visibleRows.visibleRowCount,
114
115
  visibleRowIndex: visibleRows.visibleRowCount,
116
+ visibleColCount: visibleColCount,
115
117
  interactiveCellId: interactiveCellId,
116
118
  leadingControlColumns: leadingControlColumns,
117
119
  trailingControlColumns: trailingControlColumns,
@@ -143,9 +145,10 @@ var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = function
143
145
  interactiveCellId: interactiveCellId,
144
146
  setRowHeight: setRowHeight,
145
147
  rowHeightsOptions: rowHeightsOptions,
146
- rowHeightUtils: rowHeightUtils
148
+ rowHeightUtils: rowHeightUtils,
149
+ gridStyles: gridStyles
147
150
  };
148
- }, [schema, schemaDetectors, pagination, columns, leadingControlColumns, trailingControlColumns, visibleColCount, columnWidths, defaultColumnWidth, renderCellValue, cellContext, renderCellPopover, interactiveCellId, setRowHeight, rowHeightsOptions, rowHeightUtils]);
151
+ }, [schema, schemaDetectors, pagination, columns, leadingControlColumns, trailingControlColumns, visibleColCount, columnWidths, defaultColumnWidth, renderCellValue, cellContext, renderCellPopover, interactiveCellId, setRowHeight, rowHeightsOptions, rowHeightUtils, gridStyles]);
149
152
  var Cell = (0, _react.useCallback)(function (_ref2) {
150
153
  var colIndex = _ref2.colIndex,
151
154
  visibleRowIndex = _ref2.visibleRowIndex,
@@ -158,6 +158,7 @@ var EuiDataGridBodyVirtualized = exports.EuiDataGridBodyVirtualized = /*#__PURE_
158
158
  columnWidths: columnWidths,
159
159
  defaultColumnWidth: defaultColumnWidth,
160
160
  setColumnWidth: setColumnWidth,
161
+ visibleColCount: visibleColCount,
161
162
  setVisibleColumns: setVisibleColumns,
162
163
  switchColumnPos: switchColumnPos,
163
164
  sorting: sorting,
@@ -172,6 +173,7 @@ var EuiDataGridBodyVirtualized = exports.EuiDataGridBodyVirtualized = /*#__PURE_
172
173
  renderCellPopover: renderCellPopover,
173
174
  rowIndex: visibleRowCount,
174
175
  visibleRowIndex: visibleRowCount,
176
+ visibleColCount: visibleColCount,
175
177
  interactiveCellId: interactiveCellId,
176
178
  leadingControlColumns: leadingControlColumns,
177
179
  trailingControlColumns: trailingControlColumns,
@@ -294,9 +296,10 @@ var EuiDataGridBodyVirtualized = exports.EuiDataGridBodyVirtualized = /*#__PURE_
294
296
  rowHeightUtils: rowHeightUtils,
295
297
  rowManager: rowManager,
296
298
  pagination: pagination,
297
- headerRowHeight: headerRowHeight
299
+ headerRowHeight: headerRowHeight,
300
+ gridStyles: gridStyles
298
301
  };
299
- }, [schemaDetectors, setRowHeight, leadingControlColumns, trailingControlColumns, columns, visibleColCount, schema, columnWidths, defaultColumnWidth, renderCellValue, cellContext, renderCellPopover, interactiveCellId, rowHeightsOptions, rowHeightUtils, rowManager, pagination, headerRowHeight]);
302
+ }, [schemaDetectors, setRowHeight, leadingControlColumns, trailingControlColumns, columns, visibleColCount, schema, columnWidths, defaultColumnWidth, renderCellValue, cellContext, renderCellPopover, interactiveCellId, rowHeightsOptions, rowHeightUtils, rowManager, pagination, headerRowHeight, gridStyles]);
300
303
  var rowWrapperContextValue = (0, _react.useMemo)(function () {
301
304
  return {
302
305
  headerRowHeight: headerRowHeight,
@@ -14,7 +14,7 @@ var _services = require("../../../../services");
14
14
  var _cell = require("../cell");
15
15
  var _data_grid_footer = require("./data_grid_footer.styles");
16
16
  var _react2 = require("@emotion/react");
17
- var _excluded = ["leadingControlColumns", "trailingControlColumns", "columns", "schema", "columnWidths", "defaultColumnWidth", "className", "renderCellValue", "renderCellPopover", "rowIndex", "interactiveCellId", "data-test-subj", "visibleRowIndex", "gridStyles"];
17
+ var _excluded = ["leadingControlColumns", "trailingControlColumns", "columns", "schema", "columnWidths", "defaultColumnWidth", "className", "renderCellValue", "renderCellPopover", "rowIndex", "interactiveCellId", "data-test-subj", "visibleRowIndex", "visibleColCount", "gridStyles"];
18
18
  /*
19
19
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
20
20
  * or more contributor license agreements. Licensed under the Elastic License
@@ -42,19 +42,27 @@ var EuiDataGridFooterRow = exports.EuiDataGridFooterRow = /*#__PURE__*/(0, _reac
42
42
  _dataTestSubj = _ref['data-test-subj'],
43
43
  _ref$visibleRowIndex = _ref.visibleRowIndex,
44
44
  visibleRowIndex = _ref$visibleRowIndex === void 0 ? rowIndex : _ref$visibleRowIndex,
45
+ visibleColCount = _ref.visibleColCount,
45
46
  gridStyles = _ref.gridStyles,
46
47
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
47
48
  var styles = (0, _services.useEuiMemoizedStyles)(_data_grid_footer.euiDataGridFooterStyles);
48
49
  var cssStyles = [styles.euiDataGridFooter, gridStyles.stickyFooter && styles.sticky, gridStyles.footer === 'striped' ? visibleRowIndex % 2 !== 0 && styles.striped : styles[gridStyles.footer]];
49
50
  var classes = (0, _classnames.default)('euiDataGridFooter', className);
50
51
  var dataTestSubj = (0, _classnames.default)('dataGridRow', 'dataGridFooterRow', _dataTestSubj);
52
+ var getCellClasses = (0, _react.useCallback)(function (columnIndex, classes) {
53
+ return (0, _classnames.default)('euiDataGridFooterCell', {
54
+ 'euiDataGridRowCell--firstColumn': columnIndex === 0,
55
+ 'euiDataGridRowCell--lastColumn': columnIndex === visibleColCount - 1
56
+ }, classes);
57
+ }, [visibleColCount]);
51
58
  var popoverContext = (0, _react.useContext)(_cell.DataGridCellPopoverContext);
52
59
  var sharedCellProps = {
53
60
  css: styles.euiDataGridFooterCell,
54
61
  rowIndex: rowIndex,
55
62
  visibleRowIndex: visibleRowIndex,
56
63
  interactiveCellId: interactiveCellId,
57
- popoverContext: popoverContext
64
+ popoverContext: popoverContext,
65
+ gridStyles: gridStyles
58
66
  };
59
67
  return (0, _react2.jsx)("div", (0, _extends2.default)({
60
68
  ref: ref,
@@ -74,7 +82,7 @@ var EuiDataGridFooterRow = exports.EuiDataGridFooterRow = /*#__PURE__*/(0, _reac
74
82
  width: width,
75
83
  renderCellValue: footerCellRender !== null && footerCellRender !== void 0 ? footerCellRender : renderEmpty,
76
84
  isExpandable: false,
77
- className: (0, _classnames.default)('euiDataGridFooterCell', 'euiDataGridRowCell--controlColumn', footerCellProps === null || footerCellProps === void 0 ? void 0 : footerCellProps.className)
85
+ className: getCellClasses(i, (0, _classnames.default)('euiDataGridRowCell--controlColumn', footerCellProps === null || footerCellProps === void 0 ? void 0 : footerCellProps.className))
78
86
  }));
79
87
  }), columns.map(function (_ref3, i) {
80
88
  var id = _ref3.id;
@@ -91,7 +99,7 @@ var EuiDataGridFooterRow = exports.EuiDataGridFooterRow = /*#__PURE__*/(0, _reac
91
99
  renderCellValue: renderCellValue,
92
100
  renderCellPopover: renderCellPopover,
93
101
  isExpandable: true,
94
- className: "euiDataGridFooterCell"
102
+ className: getCellClasses(columnPosition)
95
103
  }));
96
104
  }), trailingControlColumns.map(function (_ref4, i) {
97
105
  var id = _ref4.id,
@@ -106,7 +114,7 @@ var EuiDataGridFooterRow = exports.EuiDataGridFooterRow = /*#__PURE__*/(0, _reac
106
114
  width: width,
107
115
  renderCellValue: footerCellRender !== null && footerCellRender !== void 0 ? footerCellRender : renderEmpty,
108
116
  isExpandable: false,
109
- className: (0, _classnames.default)('euiDataGridFooterCell', 'euiDataGridRowCell--controlColumn', footerCellProps === null || footerCellProps === void 0 ? void 0 : footerCellProps.className)
117
+ className: getCellClasses(colIndex, (0, _classnames.default)('euiDataGridRowCell--controlColumn', footerCellProps === null || footerCellProps === void 0 ? void 0 : footerCellProps.className))
110
118
  }));
111
119
  }));
112
120
  }));
@@ -24,7 +24,8 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
24
24
 
25
25
  var EuiDataGridControlHeaderCell = exports.EuiDataGridControlHeaderCell = /*#__PURE__*/(0, _react.memo)(function (_ref) {
26
26
  var controlColumn = _ref.controlColumn,
27
- index = _ref.index;
27
+ index = _ref.index,
28
+ visibleColCount = _ref.visibleColCount;
28
29
  var HeaderCellRender = controlColumn.headerCellRender,
29
30
  headerCellProps = controlColumn.headerCellProps,
30
31
  width = controlColumn.width,
@@ -33,11 +34,13 @@ var EuiDataGridControlHeaderCell = exports.EuiDataGridControlHeaderCell = /*#__P
33
34
  className: (0, _classnames.default)('euiDataGridHeaderCell--controlColumn', headerCellProps === null || headerCellProps === void 0 ? void 0 : headerCellProps.className),
34
35
  id: id,
35
36
  index: index,
36
- width: width
37
+ width: width,
38
+ visibleColCount: visibleColCount
37
39
  }), (0, _react2.jsx)(HeaderCellRender, null));
38
40
  });
39
41
  EuiDataGridControlHeaderCell.propTypes = {
40
42
  index: _propTypes.default.number.isRequired,
43
+ visibleColCount: _propTypes.default.number.isRequired,
41
44
  controlColumn: _propTypes.default.shape({
42
45
  /**
43
46
  * Used as the React `key` when rendering content
@@ -42,6 +42,7 @@ var EuiDataGridHeaderCell = exports.EuiDataGridHeaderCell = /*#__PURE__*/(0, _re
42
42
  columnWidths = _ref.columnWidths,
43
43
  defaultColumnWidth = _ref.defaultColumnWidth,
44
44
  setColumnWidth = _ref.setColumnWidth,
45
+ visibleColCount = _ref.visibleColCount,
45
46
  setVisibleColumns = _ref.setVisibleColumns,
46
47
  switchColumnPos = _ref.switchColumnPos,
47
48
  sorting = _ref.sorting,
@@ -126,11 +127,12 @@ var EuiDataGridHeaderCell = exports.EuiDataGridHeaderCell = /*#__PURE__*/(0, _re
126
127
  */
127
128
  var classes = (0, _classnames2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "euiDataGridHeaderCell--".concat(columnType), columnType), 'euiDataGridHeaderCell--hasColumnActions', showColumnActions), 'euiDataGridHeaderCell--isActionsPopoverOpen', isPopoverOpen), displayHeaderCellProps === null || displayHeaderCellProps === void 0 ? void 0 : displayHeaderCellProps.className);
128
129
  var styles = (0, _services.useEuiMemoizedStyles)(_data_grid_header_cell.euiDataGridHeaderCellStyles);
129
- var contentStyles = [styles.euiDataGridHeaderCell__content, columnType === 'numeric' || columnType === 'currency' ? styles.right : styles.left];
130
+ var contentStyles = [styles.euiDataGridHeaderCell__content, (columnType === 'numeric' || columnType === 'currency') && styles.right];
130
131
  return (0, _react2.jsx)(_data_grid_header_cell_wrapper.EuiDataGridHeaderCellWrapper, (0, _extends2.default)({}, displayHeaderCellProps, {
131
132
  className: classes,
132
133
  id: id,
133
134
  index: index,
135
+ visibleColCount: visibleColCount,
134
136
  width: width,
135
137
  "aria-sort": ariaSort,
136
138
  hasActionsPopover: showColumnActions,
@@ -24,8 +24,6 @@ var euiDataGridHeaderCellStyles = exports.euiDataGridHeaderCellStyles = function
24
24
  header = _euiDataGridCellOutli.header;
25
25
  return {
26
26
  euiDataGridHeaderCell__content: /*#__PURE__*/(0, _react.css)("flex-grow:1;", (0, _global_styling.euiTextTruncate)(), ";;label:euiDataGridHeaderCell__content;"),
27
- // Overwrite inherited 'center' styles from <button>
28
- left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;"),
29
27
  // Numeric and currency schemas are aligned to the right
30
28
  right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('right'), ";;label:right;"),
31
29
  euiDataGridHeaderCell__popover: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-left', 'auto'), "line-height:0;;label:euiDataGridHeaderCell__popover;"),
@@ -17,7 +17,7 @@ var _focus = require("../../utils/focus");
17
17
  var _focus_utils = require("../cell/focus_utils");
18
18
  var _data_grid_header_cell_wrapper = require("./data_grid_header_cell_wrapper.styles");
19
19
  var _react2 = require("@emotion/react");
20
- var _excluded = ["id", "index", "width", "className", "children", "hasActionsPopover", "openActionsPopover", "aria-label"];
20
+ var _excluded = ["id", "index", "visibleColCount", "width", "className", "children", "hasActionsPopover", "openActionsPopover", "aria-label"];
21
21
  /*
22
22
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
23
23
  * or more contributor license agreements. Licensed under the Elastic License
@@ -35,6 +35,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
35
35
  var EuiDataGridHeaderCellWrapper = exports.EuiDataGridHeaderCellWrapper = function EuiDataGridHeaderCellWrapper(_ref) {
36
36
  var id = _ref.id,
37
37
  index = _ref.index,
38
+ visibleColCount = _ref.visibleColCount,
38
39
  width = _ref.width,
39
40
  className = _ref.className,
40
41
  children = _ref.children,
@@ -90,6 +91,7 @@ var EuiDataGridHeaderCellWrapper = exports.EuiDataGridHeaderCellWrapper = functi
90
91
  openActionsPopover === null || openActionsPopover === void 0 || openActionsPopover();
91
92
  }
92
93
  }, [hasActionsPopover, openActionsPopover, renderFocusTrap, headerEl]);
94
+ var isLastColumn = index === visibleColCount - 1;
93
95
  return (0, _react2.jsx)("div", (0, _extends2.default)({
94
96
  role: "columnheader",
95
97
  ref: setHeaderEl,
@@ -111,12 +113,13 @@ var EuiDataGridHeaderCellWrapper = exports.EuiDataGridHeaderCellWrapper = functi
111
113
  updateCellFocusContext: updateCellFocusContext,
112
114
  renderFocusTrap: renderFocusTrap,
113
115
  onInteractiveChildrenFound: setInteractiveChildren
114
- }, typeof children === 'function' ? children(renderFocusTrap) : children));
116
+ }, typeof children === 'function' ? children(renderFocusTrap) : children), isLastColumn ? _services.tabularCopyMarkers.hiddenNewline : _services.tabularCopyMarkers.hiddenTab);
115
117
  };
116
118
  EuiDataGridHeaderCellWrapper.propTypes = {
117
119
  children: _propTypes.default.oneOfType([_propTypes.default.node.isRequired, _propTypes.default.func.isRequired]).isRequired,
118
120
  id: _propTypes.default.string.isRequired,
119
121
  index: _propTypes.default.number.isRequired,
122
+ visibleColCount: _propTypes.default.number.isRequired,
120
123
  width: _propTypes.default.oneOfType([_propTypes.default.number.isRequired, _propTypes.default.oneOf([null])]),
121
124
  className: _propTypes.default.string,
122
125
  "aria-label": _propTypes.default.any,
@@ -16,7 +16,7 @@ var _data_grid_control_header_cell = require("./data_grid_control_header_cell");
16
16
  var _data_grid_header_cell = require("./data_grid_header_cell");
17
17
  var _data_grid_header_row = require("./data_grid_header_row.styles");
18
18
  var _react2 = require("@emotion/react");
19
- var _excluded = ["className", "data-test-subj", "leadingControlColumns", "trailingControlColumns", "columns", "columnWidths", "defaultColumnWidth", "setColumnWidth", "setVisibleColumns", "switchColumnPos", "sorting", "schema", "schemaDetectors", "gridStyles"];
19
+ var _excluded = ["className", "data-test-subj", "leadingControlColumns", "trailingControlColumns", "columns", "columnWidths", "defaultColumnWidth", "setColumnWidth", "visibleColCount", "setVisibleColumns", "switchColumnPos", "sorting", "schema", "schemaDetectors", "gridStyles"];
20
20
  /*
21
21
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
22
22
  * or more contributor license agreements. Licensed under the Elastic License
@@ -37,6 +37,7 @@ var EuiDataGridHeaderRow = exports.EuiDataGridHeaderRow = /*#__PURE__*/(0, _reac
37
37
  columnWidths = props.columnWidths,
38
38
  defaultColumnWidth = props.defaultColumnWidth,
39
39
  setColumnWidth = props.setColumnWidth,
40
+ visibleColCount = props.visibleColCount,
40
41
  setVisibleColumns = props.setVisibleColumns,
41
42
  switchColumnPos = props.switchColumnPos,
42
43
  sorting = props.sorting,
@@ -58,6 +59,7 @@ var EuiDataGridHeaderRow = exports.EuiDataGridHeaderRow = /*#__PURE__*/(0, _reac
58
59
  return (0, _react2.jsx)(_data_grid_control_header_cell.EuiDataGridControlHeaderCell, {
59
60
  key: controlColumn.id,
60
61
  index: index,
62
+ visibleColCount: visibleColCount,
61
63
  controlColumn: controlColumn
62
64
  });
63
65
  }), columns.map(function (column, index) {
@@ -69,6 +71,7 @@ var EuiDataGridHeaderRow = exports.EuiDataGridHeaderRow = /*#__PURE__*/(0, _reac
69
71
  columnWidths: columnWidths,
70
72
  defaultColumnWidth: defaultColumnWidth,
71
73
  setColumnWidth: setColumnWidth,
74
+ visibleColCount: visibleColCount,
72
75
  setVisibleColumns: setVisibleColumns,
73
76
  switchColumnPos: switchColumnPos,
74
77
  sorting: sorting,
@@ -79,6 +82,7 @@ var EuiDataGridHeaderRow = exports.EuiDataGridHeaderRow = /*#__PURE__*/(0, _reac
79
82
  return (0, _react2.jsx)(_data_grid_control_header_cell.EuiDataGridControlHeaderCell, {
80
83
  key: controlColumn.id,
81
84
  index: index + leadingControlColumns.length + columns.length,
85
+ visibleColCount: visibleColCount,
82
86
  controlColumn: controlColumn
83
87
  });
84
88
  }));
@@ -372,7 +372,7 @@ var EuiDataGrid = exports.EuiDataGrid = /*#__PURE__*/(0, _react.memo)( /*#__PURE
372
372
  role: "grid",
373
373
  "aria-rowcount": rowCount,
374
374
  id: gridId
375
- }, wrappingDivFocusProps, gridAriaProps), (0, _react2.jsx)(_body.EuiDataGridBody, {
375
+ }, wrappingDivFocusProps, gridAriaProps), (0, _react2.jsx)(_services.OverrideCopiedTabularContent, null, (0, _react2.jsx)(_body.EuiDataGridBody, {
376
376
  columns: orderedVisibleColumns,
377
377
  visibleColCount: visibleColCount,
378
378
  leadingControlColumns: leadingControlColumns,
@@ -400,7 +400,7 @@ var EuiDataGrid = exports.EuiDataGrid = /*#__PURE__*/(0, _react.memo)( /*#__PURE
400
400
  gridItemsRendered: gridItemsRendered,
401
401
  wrapperRef: contentRef,
402
402
  renderCustomGridBody: renderCustomGridBody
403
- })), showPagination && props['aria-labelledby'] && (0, _react2.jsx)("p", {
403
+ }))), showPagination && props['aria-labelledby'] && (0, _react2.jsx)("p", {
404
404
  id: ariaLabelledById,
405
405
  hidden: true
406
406
  }, ariaLabelledBy), showPagination && (0, _react2.jsx)(_pagination2.EuiDataGridPagination, (0, _extends2.default)({}, pagination, {