@elastic/eui 97.0.0-backport.0 → 97.1.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 (131) hide show
  1. package/es/components/datagrid/body/cell/data_grid_cell.styles.js +4 -2
  2. package/es/components/datagrid/body/cell/focus_utils.js +14 -4
  3. package/es/components/datagrid/body/data_grid_body.js +2 -1
  4. package/es/components/datagrid/body/data_grid_body_custom.js +5 -2
  5. package/es/components/datagrid/body/data_grid_body_virtualized.js +8 -4
  6. package/es/components/datagrid/body/header/column_actions.js +262 -27
  7. package/es/components/datagrid/body/header/{data_grid_column_resizer.js → column_resizer.js} +10 -4
  8. package/es/components/datagrid/body/header/{data_grid_column_resizer.styles.js → column_resizer.styles.js} +6 -1
  9. package/es/components/datagrid/body/header/column_sorting.js +134 -0
  10. package/es/components/datagrid/body/header/data_grid_control_header_cell.js +3 -3
  11. package/es/components/datagrid/body/header/data_grid_header_cell.js +86 -305
  12. package/es/components/datagrid/body/header/data_grid_header_cell.styles.js +1 -1
  13. package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +19 -17
  14. package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -2
  15. package/es/components/datagrid/body/header/data_grid_header_row.js +25 -10
  16. package/es/components/datagrid/body/header/draggable_columns.js +301 -0
  17. package/es/components/datagrid/body/header/draggable_columns.styles.js +38 -0
  18. package/es/components/datagrid/data_grid.js +2 -1
  19. package/es/components/datagrid/data_grid.stories.utils.js +9 -6
  20. package/es/components/datagrid/utils/col_widths.js +17 -13
  21. package/es/components/datagrid/utils/focus.js +2 -2
  22. package/es/components/datagrid/utils/scrolling.js +13 -10
  23. package/es/components/drag_and_drop/draggable.js +13 -5
  24. package/es/components/header/header.styles.js +6 -12
  25. package/es/components/page_template/inner/page_inner.styles.js +3 -4
  26. package/es/components/tabs/tab.js +1 -1
  27. package/eui.d.ts +406 -311
  28. package/i18ntokens.json +123 -123
  29. package/lib/components/datagrid/body/cell/data_grid_cell.styles.js +4 -2
  30. package/lib/components/datagrid/body/cell/focus_utils.js +14 -4
  31. package/lib/components/datagrid/body/data_grid_body.js +2 -1
  32. package/lib/components/datagrid/body/data_grid_body_custom.js +5 -2
  33. package/lib/components/datagrid/body/data_grid_body_virtualized.js +8 -4
  34. package/lib/components/datagrid/body/header/column_actions.js +265 -29
  35. package/lib/components/datagrid/body/header/{data_grid_column_resizer.js → column_resizer.js} +11 -5
  36. package/{optimize/lib/components/datagrid/body/header/data_grid_column_resizer.styles.js → lib/components/datagrid/body/header/column_resizer.styles.js} +6 -1
  37. package/lib/components/datagrid/body/header/column_sorting.js +144 -0
  38. package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +3 -3
  39. package/lib/components/datagrid/body/header/data_grid_header_cell.js +86 -305
  40. package/lib/components/datagrid/body/header/data_grid_header_cell.styles.js +1 -1
  41. package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +19 -17
  42. package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -2
  43. package/lib/components/datagrid/body/header/data_grid_header_row.js +24 -9
  44. package/lib/components/datagrid/body/header/draggable_columns.js +308 -0
  45. package/lib/components/datagrid/body/header/draggable_columns.styles.js +42 -0
  46. package/lib/components/datagrid/data_grid.js +2 -1
  47. package/lib/components/datagrid/data_grid.stories.utils.js +9 -6
  48. package/lib/components/datagrid/utils/col_widths.js +17 -13
  49. package/lib/components/datagrid/utils/focus.js +2 -2
  50. package/lib/components/datagrid/utils/scrolling.js +13 -10
  51. package/lib/components/drag_and_drop/draggable.js +13 -5
  52. package/lib/components/header/header.styles.js +6 -12
  53. package/lib/components/page_template/inner/page_inner.styles.js +3 -4
  54. package/lib/components/tabs/tab.js +1 -1
  55. package/optimize/es/components/datagrid/body/cell/data_grid_cell.styles.js +4 -2
  56. package/optimize/es/components/datagrid/body/cell/focus_utils.js +13 -4
  57. package/optimize/es/components/datagrid/body/data_grid_body_custom.js +3 -1
  58. package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +6 -3
  59. package/optimize/es/components/datagrid/body/header/column_actions.js +250 -26
  60. package/optimize/es/components/datagrid/body/header/{data_grid_column_resizer.js → column_resizer.js} +8 -3
  61. package/optimize/es/components/datagrid/body/header/{data_grid_column_resizer.styles.js → column_resizer.styles.js} +6 -1
  62. package/optimize/es/components/datagrid/body/header/column_sorting.js +134 -0
  63. package/optimize/es/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
  64. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +82 -302
  65. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.styles.js +1 -1
  66. package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +15 -14
  67. package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -2
  68. package/optimize/es/components/datagrid/body/header/data_grid_header_row.js +25 -10
  69. package/optimize/es/components/datagrid/body/header/draggable_columns.js +223 -0
  70. package/optimize/es/components/datagrid/body/header/draggable_columns.styles.js +38 -0
  71. package/optimize/es/components/datagrid/data_grid.js +2 -1
  72. package/optimize/es/components/datagrid/data_grid.stories.utils.js +7 -5
  73. package/optimize/es/components/datagrid/utils/col_widths.js +17 -13
  74. package/optimize/es/components/datagrid/utils/focus.js +2 -2
  75. package/optimize/es/components/datagrid/utils/scrolling.js +13 -10
  76. package/optimize/es/components/drag_and_drop/draggable.js +8 -3
  77. package/optimize/es/components/header/header.styles.js +6 -12
  78. package/optimize/es/components/page_template/inner/page_inner.styles.js +3 -4
  79. package/optimize/es/components/tabs/tab.js +1 -1
  80. package/optimize/lib/components/datagrid/body/cell/data_grid_cell.styles.js +4 -2
  81. package/optimize/lib/components/datagrid/body/cell/focus_utils.js +13 -4
  82. package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +3 -1
  83. package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +6 -3
  84. package/optimize/lib/components/datagrid/body/header/column_actions.js +253 -27
  85. package/optimize/lib/components/datagrid/body/header/{data_grid_column_resizer.js → column_resizer.js} +9 -4
  86. package/{test-env/components/datagrid/body/header/data_grid_column_resizer.styles.js → optimize/lib/components/datagrid/body/header/column_resizer.styles.js} +6 -1
  87. package/optimize/lib/components/datagrid/body/header/column_sorting.js +144 -0
  88. package/optimize/lib/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
  89. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +80 -300
  90. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.styles.js +1 -1
  91. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +15 -14
  92. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -2
  93. package/optimize/lib/components/datagrid/body/header/data_grid_header_row.js +24 -9
  94. package/optimize/lib/components/datagrid/body/header/draggable_columns.js +231 -0
  95. package/optimize/lib/components/datagrid/body/header/draggable_columns.styles.js +43 -0
  96. package/optimize/lib/components/datagrid/data_grid.js +2 -1
  97. package/optimize/lib/components/datagrid/data_grid.stories.utils.js +7 -5
  98. package/optimize/lib/components/datagrid/utils/col_widths.js +17 -13
  99. package/optimize/lib/components/datagrid/utils/focus.js +2 -2
  100. package/optimize/lib/components/datagrid/utils/scrolling.js +13 -10
  101. package/optimize/lib/components/drag_and_drop/draggable.js +8 -3
  102. package/optimize/lib/components/header/header.styles.js +6 -12
  103. package/optimize/lib/components/page_template/inner/page_inner.styles.js +3 -4
  104. package/optimize/lib/components/tabs/tab.js +1 -1
  105. package/package.json +2 -3
  106. package/test-env/components/datagrid/body/cell/data_grid_cell.styles.js +4 -2
  107. package/test-env/components/datagrid/body/cell/focus_utils.js +13 -4
  108. package/test-env/components/datagrid/body/data_grid_body.js +2 -1
  109. package/test-env/components/datagrid/body/data_grid_body_custom.js +5 -2
  110. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +8 -4
  111. package/test-env/components/datagrid/body/header/column_actions.js +261 -27
  112. package/test-env/components/datagrid/body/header/{data_grid_column_resizer.js → column_resizer.js} +11 -5
  113. package/{lib/components/datagrid/body/header/data_grid_column_resizer.styles.js → test-env/components/datagrid/body/header/column_resizer.styles.js} +6 -1
  114. package/test-env/components/datagrid/body/header/column_sorting.js +144 -0
  115. package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +3 -3
  116. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +82 -301
  117. package/test-env/components/datagrid/body/header/data_grid_header_cell.styles.js +1 -1
  118. package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.js +19 -17
  119. package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -2
  120. package/test-env/components/datagrid/body/header/data_grid_header_row.js +24 -9
  121. package/test-env/components/datagrid/body/header/draggable_columns.js +305 -0
  122. package/test-env/components/datagrid/body/header/draggable_columns.styles.js +43 -0
  123. package/test-env/components/datagrid/data_grid.js +2 -1
  124. package/test-env/components/datagrid/data_grid.stories.utils.js +9 -6
  125. package/test-env/components/datagrid/utils/col_widths.js +17 -13
  126. package/test-env/components/datagrid/utils/focus.js +2 -2
  127. package/test-env/components/datagrid/utils/scrolling.js +13 -10
  128. package/test-env/components/drag_and_drop/draggable.js +13 -5
  129. package/test-env/components/header/header.styles.js +6 -12
  130. package/test-env/components/page_template/inner/page_inner.styles.js +3 -4
  131. package/test-env/components/tabs/tab.js +1 -1
package/i18ntokens.json CHANGED
@@ -1067,14 +1067,14 @@
1067
1067
  "highlighting": "string",
1068
1068
  "loc": {
1069
1069
  "start": {
1070
- "line": 187,
1070
+ "line": 192,
1071
1071
  "column": 10,
1072
- "index": 6439
1072
+ "index": 6786
1073
1073
  },
1074
1074
  "end": {
1075
- "line": 191,
1075
+ "line": 196,
1076
1076
  "column": 12,
1077
- "index": 6610
1077
+ "index": 6957
1078
1078
  }
1079
1079
  },
1080
1080
  "filepath": "src/components/datagrid/body/cell/focus_utils.tsx"
@@ -1085,104 +1085,122 @@
1085
1085
  "highlighting": "string",
1086
1086
  "loc": {
1087
1087
  "start": {
1088
- "line": 194,
1088
+ "line": 199,
1089
1089
  "column": 10,
1090
- "index": 6661
1090
+ "index": 7008
1091
1091
  },
1092
1092
  "end": {
1093
- "line": 198,
1093
+ "line": 203,
1094
1094
  "column": 12,
1095
- "index": 6871
1095
+ "index": 7218
1096
1096
  }
1097
1097
  },
1098
1098
  "filepath": "src/components/datagrid/body/cell/focus_utils.tsx"
1099
1099
  },
1100
1100
  {
1101
- "token": "euiColumnActions.hideColumn",
1102
- "defString": "Hide column",
1101
+ "token": "euiDataGridHeaderCell.actionsButtonAriaLabel",
1102
+ "defString": "{title}. Click to view column header actions.",
1103
1103
  "highlighting": "string",
1104
1104
  "loc": {
1105
1105
  "start": {
1106
- "line": 122,
1107
- "column": 6,
1108
- "index": 3246
1106
+ "line": 120,
1107
+ "column": 35,
1108
+ "index": 3558
1109
1109
  },
1110
1110
  "end": {
1111
- "line": 122,
1112
- "column": 75,
1113
- "index": 3315
1111
+ "line": 124,
1112
+ "column": 5,
1113
+ "index": 3700
1114
1114
  }
1115
1115
  },
1116
1116
  "filepath": "src/components/datagrid/body/header/column_actions.tsx"
1117
1117
  },
1118
1118
  {
1119
- "token": "euiColumnActions.moveLeft",
1120
- "defString": "Move left",
1119
+ "token": "euiDataGridHeaderCell.actionsEnterKeyInstructions",
1120
+ "defString": "Press the Enter key to view this column's actions",
1121
1121
  "highlighting": "string",
1122
1122
  "loc": {
1123
1123
  "start": {
1124
- "line": 178,
1125
- "column": 13,
1126
- "index": 4719
1124
+ "line": 125,
1125
+ "column": 40,
1126
+ "index": 3742
1127
1127
  },
1128
1128
  "end": {
1129
- "line": 178,
1130
- "column": 78,
1131
- "index": 4784
1129
+ "line": 128,
1130
+ "column": 5,
1131
+ "index": 3876
1132
1132
  }
1133
1133
  },
1134
1134
  "filepath": "src/components/datagrid/body/header/column_actions.tsx"
1135
1135
  },
1136
1136
  {
1137
- "token": "euiColumnActions.moveRight",
1138
- "defString": "Move right",
1137
+ "token": "euiDataGridHeaderCell.actionsPopoverScreenReaderText",
1138
+ "defString": "To navigate through the list of column actions, press the Tab or Up and Down arrow keys.",
1139
1139
  "highlighting": "string",
1140
1140
  "loc": {
1141
1141
  "start": {
1142
- "line": 199,
1142
+ "line": 294,
1143
+ "column": 6,
1144
+ "index": 8661
1145
+ },
1146
+ "end": {
1147
+ "line": 297,
1143
1148
  "column": 8,
1144
- "index": 5340
1149
+ "index": 8854
1150
+ }
1151
+ },
1152
+ "filepath": "src/components/datagrid/body/header/column_actions.tsx"
1153
+ },
1154
+ {
1155
+ "token": "euiColumnActions.hideColumn",
1156
+ "defString": "Hide column",
1157
+ "highlighting": "string",
1158
+ "loc": {
1159
+ "start": {
1160
+ "line": 405,
1161
+ "column": 6,
1162
+ "index": 11442
1145
1163
  },
1146
1164
  "end": {
1147
- "line": 199,
1165
+ "line": 405,
1148
1166
  "column": 75,
1149
- "index": 5407
1167
+ "index": 11511
1150
1168
  }
1151
1169
  },
1152
1170
  "filepath": "src/components/datagrid/body/header/column_actions.tsx"
1153
1171
  },
1154
1172
  {
1155
- "token": "euiColumnActions.unsort",
1156
- "defString": "Unsort {schemaLabel}",
1173
+ "token": "euiColumnActions.moveLeft",
1174
+ "defString": "Move left",
1157
1175
  "highlighting": "string",
1158
1176
  "loc": {
1159
1177
  "start": {
1160
- "line": 283,
1161
- "column": 8,
1162
- "index": 7566
1178
+ "line": 470,
1179
+ "column": 13,
1180
+ "index": 13216
1163
1181
  },
1164
1182
  "end": {
1165
- "line": 287,
1166
- "column": 10,
1167
- "index": 7710
1183
+ "line": 470,
1184
+ "column": 78,
1185
+ "index": 13281
1168
1186
  }
1169
1187
  },
1170
1188
  "filepath": "src/components/datagrid/body/header/column_actions.tsx"
1171
1189
  },
1172
1190
  {
1173
- "token": "euiColumnActions.sort",
1174
- "defString": "Sort {schemaLabel}",
1191
+ "token": "euiColumnActions.moveRight",
1192
+ "defString": "Move right",
1175
1193
  "highlighting": "string",
1176
1194
  "loc": {
1177
1195
  "start": {
1178
- "line": 289,
1196
+ "line": 492,
1179
1197
  "column": 8,
1180
- "index": 7731
1198
+ "index": 13869
1181
1199
  },
1182
1200
  "end": {
1183
- "line": 293,
1184
- "column": 10,
1185
- "index": 7871
1201
+ "line": 492,
1202
+ "column": 75,
1203
+ "index": 13936
1186
1204
  }
1187
1205
  },
1188
1206
  "filepath": "src/components/datagrid/body/header/column_actions.tsx"
@@ -1193,14 +1211,14 @@
1193
1211
  "highlighting": "string",
1194
1212
  "loc": {
1195
1213
  "start": {
1196
- "line": 319,
1214
+ "line": 576,
1197
1215
  "column": 8,
1198
- "index": 8519
1216
+ "index": 16095
1199
1217
  },
1200
1218
  "end": {
1201
- "line": 323,
1219
+ "line": 580,
1202
1220
  "column": 10,
1203
- "index": 8663
1221
+ "index": 16239
1204
1222
  }
1205
1223
  },
1206
1224
  "filepath": "src/components/datagrid/body/header/column_actions.tsx"
@@ -1211,53 +1229,53 @@
1211
1229
  "highlighting": "string",
1212
1230
  "loc": {
1213
1231
  "start": {
1214
- "line": 325,
1232
+ "line": 582,
1215
1233
  "column": 8,
1216
- "index": 8684
1234
+ "index": 16260
1217
1235
  },
1218
1236
  "end": {
1219
- "line": 329,
1237
+ "line": 586,
1220
1238
  "column": 10,
1221
- "index": 8824
1239
+ "index": 16400
1222
1240
  }
1223
1241
  },
1224
1242
  "filepath": "src/components/datagrid/body/header/column_actions.tsx"
1225
1243
  },
1226
1244
  {
1227
- "token": "euiDataGridHeaderCell.actionsButtonAriaLabel",
1228
- "defString": "{title}. Click to view column header actions.",
1245
+ "token": "euiColumnActions.unsort",
1246
+ "defString": "Unsort {schemaLabel}",
1229
1247
  "highlighting": "string",
1230
1248
  "loc": {
1231
1249
  "start": {
1232
- "line": 113,
1233
- "column": 37,
1234
- "index": 3516
1250
+ "line": 612,
1251
+ "column": 8,
1252
+ "index": 17048
1235
1253
  },
1236
1254
  "end": {
1237
- "line": 117,
1238
- "column": 7,
1239
- "index": 3666
1255
+ "line": 616,
1256
+ "column": 10,
1257
+ "index": 17192
1240
1258
  }
1241
1259
  },
1242
- "filepath": "src/components/datagrid/body/header/data_grid_header_cell.tsx"
1260
+ "filepath": "src/components/datagrid/body/header/column_actions.tsx"
1243
1261
  },
1244
1262
  {
1245
- "token": "euiDataGridHeaderCell.actionsEnterKeyInstructions",
1246
- "defString": "Press the Enter key to view this column's actions",
1263
+ "token": "euiColumnActions.sort",
1264
+ "defString": "Sort {schemaLabel}",
1247
1265
  "highlighting": "string",
1248
1266
  "loc": {
1249
1267
  "start": {
1250
- "line": 118,
1251
- "column": 42,
1252
- "index": 3710
1268
+ "line": 618,
1269
+ "column": 8,
1270
+ "index": 17213
1253
1271
  },
1254
1272
  "end": {
1255
- "line": 121,
1256
- "column": 7,
1257
- "index": 3850
1273
+ "line": 622,
1274
+ "column": 10,
1275
+ "index": 17353
1258
1276
  }
1259
1277
  },
1260
- "filepath": "src/components/datagrid/body/header/data_grid_header_cell.tsx"
1278
+ "filepath": "src/components/datagrid/body/header/column_actions.tsx"
1261
1279
  },
1262
1280
  {
1263
1281
  "token": "euiDataGridHeaderCell.sortedByAscendingSingle",
@@ -1265,17 +1283,17 @@
1265
1283
  "highlighting": "string",
1266
1284
  "loc": {
1267
1285
  "start": {
1268
- "line": 304,
1286
+ "line": 82,
1269
1287
  "column": 16,
1270
- "index": 9963
1288
+ "index": 2747
1271
1289
  },
1272
1290
  "end": {
1273
- "line": 308,
1291
+ "line": 86,
1274
1292
  "column": 18,
1275
- "index": 10137
1293
+ "index": 2921
1276
1294
  }
1277
1295
  },
1278
- "filepath": "src/components/datagrid/body/header/data_grid_header_cell.tsx"
1296
+ "filepath": "src/components/datagrid/body/header/column_sorting.tsx"
1279
1297
  },
1280
1298
  {
1281
1299
  "token": "euiDataGridHeaderCell.sortedByDescendingSingle",
@@ -1283,17 +1301,17 @@
1283
1301
  "highlighting": "string",
1284
1302
  "loc": {
1285
1303
  "start": {
1286
- "line": 312,
1304
+ "line": 90,
1287
1305
  "column": 16,
1288
- "index": 10215
1306
+ "index": 2999
1289
1307
  },
1290
1308
  "end": {
1291
- "line": 316,
1309
+ "line": 94,
1292
1310
  "column": 18,
1293
- "index": 10391
1311
+ "index": 3175
1294
1312
  }
1295
1313
  },
1296
- "filepath": "src/components/datagrid/body/header/data_grid_header_cell.tsx"
1314
+ "filepath": "src/components/datagrid/body/header/column_sorting.tsx"
1297
1315
  },
1298
1316
  {
1299
1317
  "token": "euiDataGridHeaderCell.sortedByAscendingFirst",
@@ -1301,17 +1319,17 @@
1301
1319
  "highlighting": "string",
1302
1320
  "loc": {
1303
1321
  "start": {
1304
- "line": 322,
1322
+ "line": 100,
1305
1323
  "column": 16,
1306
- "index": 10537
1324
+ "index": 3321
1307
1325
  },
1308
1326
  "end": {
1309
- "line": 327,
1327
+ "line": 105,
1310
1328
  "column": 18,
1311
- "index": 10765
1329
+ "index": 3549
1312
1330
  }
1313
1331
  },
1314
- "filepath": "src/components/datagrid/body/header/data_grid_header_cell.tsx"
1332
+ "filepath": "src/components/datagrid/body/header/column_sorting.tsx"
1315
1333
  },
1316
1334
  {
1317
1335
  "token": "euiDataGridHeaderCell.sortedByDescendingFirst",
@@ -1319,17 +1337,17 @@
1319
1337
  "highlighting": "string",
1320
1338
  "loc": {
1321
1339
  "start": {
1322
- "line": 331,
1340
+ "line": 109,
1323
1341
  "column": 16,
1324
- "index": 10843
1342
+ "index": 3627
1325
1343
  },
1326
1344
  "end": {
1327
- "line": 336,
1345
+ "line": 114,
1328
1346
  "column": 18,
1329
- "index": 11073
1347
+ "index": 3857
1330
1348
  }
1331
1349
  },
1332
- "filepath": "src/components/datagrid/body/header/data_grid_header_cell.tsx"
1350
+ "filepath": "src/components/datagrid/body/header/column_sorting.tsx"
1333
1351
  },
1334
1352
  {
1335
1353
  "token": "euiDataGridHeaderCell.sortedByAscendingMultiple",
@@ -1337,17 +1355,17 @@
1337
1355
  "highlighting": "string",
1338
1356
  "loc": {
1339
1357
  "start": {
1340
- "line": 342,
1358
+ "line": 120,
1341
1359
  "column": 16,
1342
- "index": 11202
1360
+ "index": 3986
1343
1361
  },
1344
1362
  "end": {
1345
- "line": 347,
1363
+ "line": 125,
1346
1364
  "column": 18,
1347
- "index": 11440
1365
+ "index": 4224
1348
1366
  }
1349
1367
  },
1350
- "filepath": "src/components/datagrid/body/header/data_grid_header_cell.tsx"
1368
+ "filepath": "src/components/datagrid/body/header/column_sorting.tsx"
1351
1369
  },
1352
1370
  {
1353
1371
  "token": "euiDataGridHeaderCell.sortedByDescendingMultiple",
@@ -1355,35 +1373,17 @@
1355
1373
  "highlighting": "string",
1356
1374
  "loc": {
1357
1375
  "start": {
1358
- "line": 351,
1376
+ "line": 129,
1359
1377
  "column": 16,
1360
- "index": 11518
1378
+ "index": 4302
1361
1379
  },
1362
1380
  "end": {
1363
- "line": 356,
1381
+ "line": 134,
1364
1382
  "column": 18,
1365
- "index": 11758
1383
+ "index": 4542
1366
1384
  }
1367
1385
  },
1368
- "filepath": "src/components/datagrid/body/header/data_grid_header_cell.tsx"
1369
- },
1370
- {
1371
- "token": "euiDataGridHeaderCell.actionsPopoverScreenReaderText",
1372
- "defString": "To navigate through the list of column actions, press the Tab or Up and Down arrow keys.",
1373
- "highlighting": "string",
1374
- "loc": {
1375
- "start": {
1376
- "line": 421,
1377
- "column": 6,
1378
- "index": 13604
1379
- },
1380
- "end": {
1381
- "line": 424,
1382
- "column": 8,
1383
- "index": 13797
1384
- }
1385
- },
1386
- "filepath": "src/components/datagrid/body/header/data_grid_header_cell.tsx"
1386
+ "filepath": "src/components/datagrid/body/header/column_sorting.tsx"
1387
1387
  },
1388
1388
  {
1389
1389
  "token": "euiColumnSelector.dragHandleAriaLabel",
@@ -2471,14 +2471,14 @@
2471
2471
  "highlighting": "string",
2472
2472
  "loc": {
2473
2473
  "start": {
2474
- "line": 549,
2474
+ "line": 552,
2475
2475
  "column": 18,
2476
- "index": 17131
2476
+ "index": 17264
2477
2477
  },
2478
2478
  "end": {
2479
- "line": 552,
2479
+ "line": 555,
2480
2480
  "column": 20,
2481
- "index": 17284
2481
+ "index": 17417
2482
2482
  }
2483
2483
  },
2484
2484
  "filepath": "src/components/datagrid/data_grid.tsx"
@@ -47,6 +47,7 @@ var euiDataGridCellOutlineSelectors = exports.euiDataGridCellOutlineSelectors =
47
47
 
48
48
  // Cell header specific selectors
49
49
  var headerActionsOpen = '.euiDataGridHeaderCell--isActionsPopoverOpen';
50
+ var isMoving = '[data-column-moving]'; // prevents the header column actions hover animation from replaying on column move
50
51
 
51
52
  // Utils
52
53
  var selectors = function selectors() {
@@ -80,10 +81,11 @@ var euiDataGridCellOutlineSelectors = exports.euiDataGridCellOutlineSelectors =
80
81
  hoverAnimation: hoverNot(selectors(focus, isOpen, isClosing))
81
82
  },
82
83
  header: {
83
- focus: is(selectors(focus, focusWithin, headerActionsOpen)),
84
+ focus: is(selectors(focus, focusWithin, headerActionsOpen, isMoving)),
84
85
  // :focus-within here is primarily intended for when the column actions button has been clicked twice
85
86
  focusTrapped: _(isEntered),
86
- hideActions: not(selectors(hover, focusWithin, headerActionsOpen))
87
+ showActions: is(selectors(hover, focusWithin, headerActionsOpen, isMoving)),
88
+ hideActions: not(selectors(hover, focusWithin, headerActionsOpen, isMoving))
87
89
  }
88
90
  };
89
91
  };
@@ -17,6 +17,8 @@ var _react2 = require("@emotion/react");
17
17
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
18
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
19
19
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
+ function _toArray(r) { return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest(); }
21
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
20
22
  function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
21
23
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
22
24
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
@@ -110,16 +112,24 @@ var FocusTrappedChildren = exports.FocusTrappedChildren = function FocusTrappedC
110
112
 
111
113
  // direct DOM manipulation as workaround to attach required hints
112
114
  (0, _react.useEffect)(function () {
115
+ var _currentAriaDescribed;
113
116
  var currentAriaDescribedbyId = cellEl.getAttribute('aria-describedby');
114
- cellEl.setAttribute('aria-describedby', (0, _classnames.default)(currentAriaDescribedbyId, ariaDescribedById));
117
+ // A11y: splitting ids to be able to append the first hint (sorting)
118
+ // while other hints should follow the keyboard navigation hints
119
+ var _ref3 = (_currentAriaDescribed = currentAriaDescribedbyId === null || currentAriaDescribedbyId === void 0 ? void 0 : currentAriaDescribedbyId.split(' ')) !== null && _currentAriaDescribed !== void 0 ? _currentAriaDescribed : [],
120
+ _ref4 = _toArray(_ref3),
121
+ sortingId = _ref4[0],
122
+ rest = _ref4.slice(1);
123
+ var remainingIds = rest.join(' ');
124
+ cellEl.setAttribute('aria-describedby', (0, _classnames.default)(sortingId, ariaDescribedById, !isCellEntered && remainingIds));
115
125
  return function () {
116
126
  if (currentAriaDescribedbyId) {
117
- cellEl.setAttribute('aria-descibedby', currentAriaDescribedbyId);
127
+ cellEl.setAttribute('aria-describedby', currentAriaDescribedbyId);
118
128
  } else {
119
129
  cellEl.removeAttribute('aria-describedby');
120
130
  }
121
131
  };
122
- }, [cellEl, ariaDescribedById]);
132
+ }, [cellEl, ariaDescribedById, isCellEntered]);
123
133
  (0, _react.useEffect)(function () {
124
134
  if (isCellEntered) {
125
135
  enableAndFocusInteractives(cellEl);
@@ -147,7 +157,7 @@ var FocusTrappedChildren = exports.FocusTrappedChildren = function FocusTrappedC
147
157
  } else if (
148
158
  // when opened content is closed, we don't want Escape to return to the cell
149
159
  // immediately but instead return focus to a trigger as expected
150
- isCellEntered === false && (0, _utils.isDOMNode)(event.target) && (0, _utils.isDOMNode)(event.currentTarget) && event.currentTarget.contains(event.target)) {
160
+ isCellEntered === false && (0, _utils.isDOMNode)(event.target) && (0, _utils.isDOMNode)(event.currentTarget) && event.currentTarget !== event.target && event.currentTarget.contains(event.target)) {
151
161
  return true;
152
162
  }
153
163
  return isCellEntered;
@@ -659,5 +659,6 @@ EuiDataGridBody.propTypes = {
659
659
  gridRef: _propTypes.default.any.isRequired,
660
660
  gridItemsRendered: _propTypes.default.any.isRequired,
661
661
  wrapperRef: _propTypes.default.any.isRequired,
662
- className: _propTypes.default.string
662
+ className: _propTypes.default.string,
663
+ canDragAndDropColumns: _propTypes.default.bool
663
664
  };
@@ -56,6 +56,7 @@ var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = /*#__PUR
56
56
  columns = _ref.columns,
57
57
  setVisibleColumns = _ref.setVisibleColumns,
58
58
  switchColumnPos = _ref.switchColumnPos,
59
+ canDragAndDropColumns = _ref.canDragAndDropColumns,
59
60
  onColumnResize = _ref.onColumnResize,
60
61
  schema = _ref.schema,
61
62
  schemaDetectors = _ref.schemaDetectors,
@@ -109,12 +110,13 @@ var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = /*#__PUR
109
110
  setVisibleColumns: setVisibleColumns,
110
111
  visibleColCount: visibleColCount,
111
112
  switchColumnPos: switchColumnPos,
113
+ canDragAndDropColumns: canDragAndDropColumns,
112
114
  sorting: sorting,
113
115
  schema: schema,
114
116
  schemaDetectors: schemaDetectors,
115
117
  gridStyles: gridStyles
116
118
  };
117
- }, [leadingControlColumns, trailingControlColumns, columns, columnWidths, defaultColumnWidth, setColumnWidth, visibleColCount, setVisibleColumns, switchColumnPos, sorting, schema, schemaDetectors, gridStyles]);
119
+ }, [leadingControlColumns, trailingControlColumns, columns, columnWidths, defaultColumnWidth, setColumnWidth, visibleColCount, setVisibleColumns, switchColumnPos, canDragAndDropColumns, sorting, schema, schemaDetectors, gridStyles]);
118
120
 
119
121
  /**
120
122
  * Header & footer
@@ -823,6 +825,7 @@ EuiDataGridBodyCustomRender.propTypes = {
823
825
  gridRef: _propTypes.default.any.isRequired,
824
826
  gridItemsRendered: _propTypes.default.any.isRequired,
825
827
  wrapperRef: _propTypes.default.any.isRequired,
826
- className: _propTypes.default.string
828
+ className: _propTypes.default.string,
829
+ canDragAndDropColumns: _propTypes.default.bool
827
830
  };
828
831
  EuiDataGridBodyCustomRender.displayName = 'EuiDataGridBodyCustomRender';
@@ -116,7 +116,8 @@ var EuiDataGridBodyVirtualized = exports.EuiDataGridBodyVirtualized = /*#__PURE_
116
116
  gridRef = _ref3.gridRef,
117
117
  gridItemsRendered = _ref3.gridItemsRendered,
118
118
  wrapperRef = _ref3.wrapperRef,
119
- className = _ref3.className;
119
+ className = _ref3.className,
120
+ canDragAndDropColumns = _ref3.canDragAndDropColumns;
120
121
  /**
121
122
  * Grid refs & observers
122
123
  */
@@ -167,7 +168,8 @@ var EuiDataGridBodyVirtualized = exports.EuiDataGridBodyVirtualized = /*#__PURE_
167
168
  sorting: sorting,
168
169
  schema: schema,
169
170
  schemaDetectors: schemaDetectors,
170
- gridStyles: gridStyles
171
+ gridStyles: gridStyles,
172
+ canDragAndDropColumns: canDragAndDropColumns
171
173
  }),
172
174
  headerRow = _useDataGridHeader.headerRow,
173
175
  headerRowHeight = _useDataGridHeader.headerRowHeight;
@@ -199,7 +201,8 @@ var EuiDataGridBodyVirtualized = exports.EuiDataGridBodyVirtualized = /*#__PURE_
199
201
  headerRowHeight: headerRowHeight,
200
202
  footerRowHeight: footerRowHeight,
201
203
  visibleRowCount: visibleRowCount,
202
- hasStickyFooter: !!(renderFooterCellValue && gridStyles.stickyFooter)
204
+ hasStickyFooter: !!(renderFooterCellValue && gridStyles.stickyFooter),
205
+ canDragAndDropColumns: canDragAndDropColumns
203
206
  });
204
207
 
205
208
  /**
@@ -947,6 +950,7 @@ EuiDataGridBodyVirtualized.propTypes = {
947
950
  gridRef: _propTypes.default.any.isRequired,
948
951
  gridItemsRendered: _propTypes.default.any.isRequired,
949
952
  wrapperRef: _propTypes.default.any.isRequired,
950
- className: _propTypes.default.string
953
+ className: _propTypes.default.string,
954
+ canDragAndDropColumns: _propTypes.default.bool
951
955
  };
952
956
  EuiDataGridBodyVirtualized.displayName = 'EuiDataGridBodyVirtualized';