@elastic/eui 74.0.0 → 74.0.2

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.
@@ -85,7 +85,7 @@ export var EuiCard = function EuiCard(_ref) {
85
85
  var link = null;
86
86
 
87
87
  var outerOnClick = function outerOnClick(e) {
88
- if (link && link !== e.target) {
88
+ if (link && link !== e.target && !link.contains(e.target)) {
89
89
  link.click();
90
90
  }
91
91
  };
@@ -32,11 +32,6 @@ export var EuiModalHeaderTitle = function EuiModalHeaderTitle(_ref) {
32
32
  }, rest), ___EmotionJSX(Component, null, children));
33
33
  };
34
34
  EuiModalHeaderTitle.propTypes = {
35
- className: PropTypes.string,
36
- "aria-label": PropTypes.string,
37
- "data-test-subj": PropTypes.string,
38
- css: PropTypes.any,
39
-
40
35
  /**
41
36
  * The tag to render. Can be changed to a lower heading
42
37
  * level like `h2` or a container `div`.
@@ -276,16 +276,16 @@ export var FieldValueSelectionFilter = /*#__PURE__*/function (_Component) {
276
276
  if (!multiSelect && autoClose) {
277
277
  this.closePopover();
278
278
 
279
- var _query = checked ? this.props.query.removeSimpleFieldClauses(field) : this.props.query.removeSimpleFieldClauses(field).addSimpleFieldValue(field, value, true, operator);
279
+ var _query = checked ? this.props.query.removeSimpleFieldClauses(field).addSimpleFieldValue(field, value, true, operator) : this.props.query.removeSimpleFieldClauses(field);
280
280
 
281
281
  this.props.onChange(_query);
282
282
  } else {
283
283
  if (multiSelect === 'or') {
284
- var _query2 = checked ? this.props.query.removeOrFieldValue(field, value) : this.props.query.addOrFieldValue(field, value, true, operator);
284
+ var _query2 = checked ? this.props.query.addOrFieldValue(field, value, true, operator) : this.props.query.removeOrFieldValue(field, value);
285
285
 
286
286
  this.props.onChange(_query2);
287
287
  } else {
288
- var _query3 = checked ? this.props.query.removeSimpleFieldValue(field, value) : this.props.query.addSimpleFieldValue(field, value, true, operator);
288
+ var _query3 = checked ? this.props.query.addSimpleFieldValue(field, value, true, operator) : this.props.query.removeSimpleFieldValue(field, value);
289
289
 
290
290
  this.props.onChange(_query3);
291
291
  }
@@ -395,13 +395,9 @@ export var FieldValueSelectionFilter = /*#__PURE__*/function (_Component) {
395
395
  listProps: {
396
396
  isVirtualized: isOverSearchThreshold || false
397
397
  },
398
- onChange: function onChange(options) {
399
- var diff = items.find(function (item, index) {
400
- return item.checked !== options[index].checked;
401
- });
402
-
403
- if (diff) {
404
- _this5.onOptionClick(diff.data.optionField, diff.data.value, diff.checked);
398
+ onChange: function onChange(options, event, changedOption) {
399
+ if (changedOption.data) {
400
+ _this5.onOptionClick(changedOption.data.optionField, changedOption.data.value, changedOption.checked);
405
401
  }
406
402
  }
407
403
  }, searchProps), function (list, search) {
@@ -117,6 +117,22 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
117
117
  }
118
118
  });
119
119
 
120
+ _defineProperty(_assertThisInitialized(_this), "ariaSetSize", 0);
121
+
122
+ _defineProperty(_assertThisInitialized(_this), "ariaPosInSetMap", {});
123
+
124
+ _defineProperty(_assertThisInitialized(_this), "calculateAriaSetAttrs", function (optionArray) {
125
+ _this.ariaPosInSetMap = {};
126
+ var latestAriaPosIndex = 0;
127
+ optionArray.forEach(function (option, index) {
128
+ if (!option.isGroupLabel) {
129
+ latestAriaPosIndex++;
130
+ _this.ariaPosInSetMap[index] = latestAriaPosIndex;
131
+ }
132
+ });
133
+ _this.ariaSetSize = latestAriaPosIndex;
134
+ });
135
+
120
136
  _defineProperty(_assertThisInitialized(_this), "ListRow", /*#__PURE__*/memo(function (_ref) {
121
137
  var data = _ref.data,
122
138
  index = _ref.index,
@@ -160,9 +176,6 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
160
176
  }, optionRest), prepend, label, append);
161
177
  }
162
178
 
163
- var labelCount = data.filter(function (option) {
164
- return option.isGroupLabel;
165
- }).length;
166
179
  var id = makeOptionId(index);
167
180
  return ___EmotionJSX(EuiSelectableListItem, _extends({
168
181
  key: id,
@@ -183,8 +196,8 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
183
196
  disabled: disabled,
184
197
  prepend: prepend,
185
198
  append: append,
186
- "aria-posinset": index + 1 - labelCount,
187
- "aria-setsize": data.length - labelCount,
199
+ "aria-posinset": _this.ariaPosInSetMap[index],
200
+ "aria-setsize": _this.ariaSetSize,
188
201
  onFocusBadge: onFocusBadge,
189
202
  allowExclusions: allowExclusions,
190
203
  showIcons: showIcons,
@@ -341,6 +354,7 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
341
354
  rest = _objectWithoutProperties(_this$props7, _excluded3);
342
355
 
343
356
  var optionArray = visibleOptions || options;
357
+ this.calculateAriaSetAttrs(optionArray);
344
358
  var heightIsFull = forcedHeight === 'full';
345
359
  var calculatedHeight = heightIsFull ? false : forcedHeight; // If calculatedHeight is still undefined, then calculate it
346
360
 
package/eui.d.ts CHANGED
@@ -15878,8 +15878,8 @@ declare module '@elastic/eui/src/components/modal/modal_header' {
15878
15878
  }
15879
15879
  declare module '@elastic/eui/src/components/modal/modal_header_title' {
15880
15880
  import { FunctionComponent, HTMLAttributes, ElementType } from 'react';
15881
- import { CommonProps } from '@elastic/eui/src/components/common';
15882
- export type EuiModalHeaderTitleProps = FunctionComponent<HTMLAttributes<HTMLHeadingElement> & CommonProps & {
15881
+ import { EuiTitleProps } from '@elastic/eui/src/components/title';
15882
+ export type EuiModalHeaderTitleProps = FunctionComponent<Omit<EuiTitleProps, 'children'> & HTMLAttributes<HTMLHeadingElement> & {
15883
15883
  /**
15884
15884
  * The tag to render. Can be changed to a lower heading
15885
15885
  * level like `h2` or a container `div`.
@@ -18081,6 +18081,9 @@ declare module '@elastic/eui/src/components/selectable/selectable_list/selectabl
18081
18081
  setListBoxRef: (ref: HTMLUListElement | null) => void;
18082
18082
  componentDidUpdate(): void;
18083
18083
  constructor(props: EuiSelectableListProps<T>);
18084
+ ariaSetSize: number;
18085
+ ariaPosInSetMap: Record<number, number>;
18086
+ calculateAriaSetAttrs: (optionArray: Array<EuiSelectableOption<T>>) => void;
18084
18087
  ListRow: React.MemoExoticComponent<({ data, index, style }: ListChildComponentProps<T>) => JSX.Element>;
18085
18088
  render(): JSX.Element;
18086
18089
  onAddOrRemoveOption: (option: EuiSelectableOption<T>, event: EuiSelectableOnChangeEvent) => void;
@@ -110,7 +110,7 @@ var EuiCard = function EuiCard(_ref) {
110
110
  var link = null;
111
111
 
112
112
  var outerOnClick = function outerOnClick(e) {
113
- if (link && link !== e.target) {
113
+ if (link && link !== e.target && !link.contains(e.target)) {
114
114
  link.click();
115
115
  }
116
116
  };
@@ -41,11 +41,6 @@ var EuiModalHeaderTitle = function EuiModalHeaderTitle(_ref) {
41
41
 
42
42
  exports.EuiModalHeaderTitle = EuiModalHeaderTitle;
43
43
  EuiModalHeaderTitle.propTypes = {
44
- className: _propTypes.default.string,
45
- "aria-label": _propTypes.default.string,
46
- "data-test-subj": _propTypes.default.string,
47
- css: _propTypes.default.any,
48
-
49
44
  /**
50
45
  * The tag to render. Can be changed to a lower heading
51
46
  * level like `h2` or a container `div`.
@@ -292,16 +292,16 @@ var FieldValueSelectionFilter = /*#__PURE__*/function (_Component) {
292
292
  if (!multiSelect && autoClose) {
293
293
  this.closePopover();
294
294
 
295
- var _query = checked ? this.props.query.removeSimpleFieldClauses(field) : this.props.query.removeSimpleFieldClauses(field).addSimpleFieldValue(field, value, true, operator);
295
+ var _query = checked ? this.props.query.removeSimpleFieldClauses(field).addSimpleFieldValue(field, value, true, operator) : this.props.query.removeSimpleFieldClauses(field);
296
296
 
297
297
  this.props.onChange(_query);
298
298
  } else {
299
299
  if (multiSelect === 'or') {
300
- var _query2 = checked ? this.props.query.removeOrFieldValue(field, value) : this.props.query.addOrFieldValue(field, value, true, operator);
300
+ var _query2 = checked ? this.props.query.addOrFieldValue(field, value, true, operator) : this.props.query.removeOrFieldValue(field, value);
301
301
 
302
302
  this.props.onChange(_query2);
303
303
  } else {
304
- var _query3 = checked ? this.props.query.removeSimpleFieldValue(field, value) : this.props.query.addSimpleFieldValue(field, value, true, operator);
304
+ var _query3 = checked ? this.props.query.addSimpleFieldValue(field, value, true, operator) : this.props.query.removeSimpleFieldValue(field, value);
305
305
 
306
306
  this.props.onChange(_query3);
307
307
  }
@@ -409,13 +409,9 @@ var FieldValueSelectionFilter = /*#__PURE__*/function (_Component) {
409
409
  listProps: {
410
410
  isVirtualized: isOverSearchThreshold || false
411
411
  },
412
- onChange: function onChange(options) {
413
- var diff = items.find(function (item, index) {
414
- return item.checked !== options[index].checked;
415
- });
416
-
417
- if (diff) {
418
- _this5.onOptionClick(diff.data.optionField, diff.data.value, diff.checked);
412
+ onChange: function onChange(options, event, changedOption) {
413
+ if (changedOption.data) {
414
+ _this5.onOptionClick(changedOption.data.optionField, changedOption.data.value, changedOption.checked);
419
415
  }
420
416
  }
421
417
  }, searchProps), function (list, search) {
@@ -131,6 +131,22 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
131
131
  }
132
132
  });
133
133
 
134
+ _defineProperty(_assertThisInitialized(_this), "ariaSetSize", 0);
135
+
136
+ _defineProperty(_assertThisInitialized(_this), "ariaPosInSetMap", {});
137
+
138
+ _defineProperty(_assertThisInitialized(_this), "calculateAriaSetAttrs", function (optionArray) {
139
+ _this.ariaPosInSetMap = {};
140
+ var latestAriaPosIndex = 0;
141
+ optionArray.forEach(function (option, index) {
142
+ if (!option.isGroupLabel) {
143
+ latestAriaPosIndex++;
144
+ _this.ariaPosInSetMap[index] = latestAriaPosIndex;
145
+ }
146
+ });
147
+ _this.ariaSetSize = latestAriaPosIndex;
148
+ });
149
+
134
150
  _defineProperty(_assertThisInitialized(_this), "ListRow", /*#__PURE__*/(0, _react.memo)(function (_ref) {
135
151
  var data = _ref.data,
136
152
  index = _ref.index,
@@ -174,9 +190,6 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
174
190
  }, optionRest), prepend, label, append);
175
191
  }
176
192
 
177
- var labelCount = data.filter(function (option) {
178
- return option.isGroupLabel;
179
- }).length;
180
193
  var id = makeOptionId(index);
181
194
  return (0, _react2.jsx)(_selectable_list_item.EuiSelectableListItem, _extends({
182
195
  key: id,
@@ -197,8 +210,8 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
197
210
  disabled: disabled,
198
211
  prepend: prepend,
199
212
  append: append,
200
- "aria-posinset": index + 1 - labelCount,
201
- "aria-setsize": data.length - labelCount,
213
+ "aria-posinset": _this.ariaPosInSetMap[index],
214
+ "aria-setsize": _this.ariaSetSize,
202
215
  onFocusBadge: onFocusBadge,
203
216
  allowExclusions: allowExclusions,
204
217
  showIcons: showIcons,
@@ -355,6 +368,7 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
355
368
  rest = _objectWithoutProperties(_this$props7, _excluded3);
356
369
 
357
370
  var optionArray = visibleOptions || options;
371
+ this.calculateAriaSetAttrs(optionArray);
358
372
  var heightIsFull = forcedHeight === 'full';
359
373
  var calculatedHeight = heightIsFull ? false : forcedHeight; // If calculatedHeight is still undefined, then calculate it
360
374
 
@@ -79,7 +79,7 @@ export var EuiCard = function EuiCard(_ref) {
79
79
  var link = null;
80
80
 
81
81
  var outerOnClick = function outerOnClick(e) {
82
- if (link && link !== e.target) {
82
+ if (link && link !== e.target && !link.contains(e.target)) {
83
83
  link.click();
84
84
  }
85
85
  };
@@ -251,16 +251,16 @@ export var FieldValueSelectionFilter = /*#__PURE__*/function (_Component) {
251
251
  if (!multiSelect && autoClose) {
252
252
  this.closePopover();
253
253
 
254
- var _query = checked ? this.props.query.removeSimpleFieldClauses(field) : this.props.query.removeSimpleFieldClauses(field).addSimpleFieldValue(field, value, true, operator);
254
+ var _query = checked ? this.props.query.removeSimpleFieldClauses(field).addSimpleFieldValue(field, value, true, operator) : this.props.query.removeSimpleFieldClauses(field);
255
255
 
256
256
  this.props.onChange(_query);
257
257
  } else {
258
258
  if (multiSelect === 'or') {
259
- var _query2 = checked ? this.props.query.removeOrFieldValue(field, value) : this.props.query.addOrFieldValue(field, value, true, operator);
259
+ var _query2 = checked ? this.props.query.addOrFieldValue(field, value, true, operator) : this.props.query.removeOrFieldValue(field, value);
260
260
 
261
261
  this.props.onChange(_query2);
262
262
  } else {
263
- var _query3 = checked ? this.props.query.removeSimpleFieldValue(field, value) : this.props.query.addSimpleFieldValue(field, value, true, operator);
263
+ var _query3 = checked ? this.props.query.addSimpleFieldValue(field, value, true, operator) : this.props.query.removeSimpleFieldValue(field, value);
264
264
 
265
265
  this.props.onChange(_query3);
266
266
  }
@@ -370,13 +370,9 @@ export var FieldValueSelectionFilter = /*#__PURE__*/function (_Component) {
370
370
  listProps: {
371
371
  isVirtualized: isOverSearchThreshold || false
372
372
  },
373
- onChange: function onChange(options) {
374
- var diff = items.find(function (item, index) {
375
- return item.checked !== options[index].checked;
376
- });
377
-
378
- if (diff) {
379
- _this5.onOptionClick(diff.data.optionField, diff.data.value, diff.checked);
373
+ onChange: function onChange(options, event, changedOption) {
374
+ if (changedOption.data) {
375
+ _this5.onOptionClick(changedOption.data.optionField, changedOption.data.value, changedOption.checked);
380
376
  }
381
377
  }
382
378
  }, searchProps), function (list, search) {
@@ -99,6 +99,22 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
99
99
  }
100
100
  });
101
101
 
102
+ _defineProperty(_assertThisInitialized(_this), "ariaSetSize", 0);
103
+
104
+ _defineProperty(_assertThisInitialized(_this), "ariaPosInSetMap", {});
105
+
106
+ _defineProperty(_assertThisInitialized(_this), "calculateAriaSetAttrs", function (optionArray) {
107
+ _this.ariaPosInSetMap = {};
108
+ var latestAriaPosIndex = 0;
109
+ optionArray.forEach(function (option, index) {
110
+ if (!option.isGroupLabel) {
111
+ latestAriaPosIndex++;
112
+ _this.ariaPosInSetMap[index] = latestAriaPosIndex;
113
+ }
114
+ });
115
+ _this.ariaSetSize = latestAriaPosIndex;
116
+ });
117
+
102
118
  _defineProperty(_assertThisInitialized(_this), "ListRow", /*#__PURE__*/memo(function (_ref) {
103
119
  var data = _ref.data,
104
120
  index = _ref.index,
@@ -142,9 +158,6 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
142
158
  }, optionRest), prepend, label, append);
143
159
  }
144
160
 
145
- var labelCount = data.filter(function (option) {
146
- return option.isGroupLabel;
147
- }).length;
148
161
  var id = makeOptionId(index);
149
162
  return ___EmotionJSX(EuiSelectableListItem, _extends({
150
163
  key: id,
@@ -165,8 +178,8 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
165
178
  disabled: disabled,
166
179
  prepend: prepend,
167
180
  append: append,
168
- "aria-posinset": index + 1 - labelCount,
169
- "aria-setsize": data.length - labelCount,
181
+ "aria-posinset": _this.ariaPosInSetMap[index],
182
+ "aria-setsize": _this.ariaSetSize,
170
183
  onFocusBadge: onFocusBadge,
171
184
  allowExclusions: allowExclusions,
172
185
  showIcons: showIcons,
@@ -323,6 +336,7 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
323
336
  rest = _objectWithoutProperties(_this$props7, _excluded3);
324
337
 
325
338
  var optionArray = visibleOptions || options;
339
+ this.calculateAriaSetAttrs(optionArray);
326
340
  var heightIsFull = forcedHeight === 'full';
327
341
  var calculatedHeight = heightIsFull ? false : forcedHeight; // If calculatedHeight is still undefined, then calculate it
328
342
 
@@ -105,7 +105,7 @@ var EuiCard = function EuiCard(_ref) {
105
105
  var link = null;
106
106
 
107
107
  var outerOnClick = function outerOnClick(e) {
108
- if (link && link !== e.target) {
108
+ if (link && link !== e.target && !link.contains(e.target)) {
109
109
  link.click();
110
110
  }
111
111
  };
@@ -273,16 +273,16 @@ var FieldValueSelectionFilter = /*#__PURE__*/function (_Component) {
273
273
  if (!multiSelect && autoClose) {
274
274
  this.closePopover();
275
275
 
276
- var _query = checked ? this.props.query.removeSimpleFieldClauses(field) : this.props.query.removeSimpleFieldClauses(field).addSimpleFieldValue(field, value, true, operator);
276
+ var _query = checked ? this.props.query.removeSimpleFieldClauses(field).addSimpleFieldValue(field, value, true, operator) : this.props.query.removeSimpleFieldClauses(field);
277
277
 
278
278
  this.props.onChange(_query);
279
279
  } else {
280
280
  if (multiSelect === 'or') {
281
- var _query2 = checked ? this.props.query.removeOrFieldValue(field, value) : this.props.query.addOrFieldValue(field, value, true, operator);
281
+ var _query2 = checked ? this.props.query.addOrFieldValue(field, value, true, operator) : this.props.query.removeOrFieldValue(field, value);
282
282
 
283
283
  this.props.onChange(_query2);
284
284
  } else {
285
- var _query3 = checked ? this.props.query.removeSimpleFieldValue(field, value) : this.props.query.addSimpleFieldValue(field, value, true, operator);
285
+ var _query3 = checked ? this.props.query.addSimpleFieldValue(field, value, true, operator) : this.props.query.removeSimpleFieldValue(field, value);
286
286
 
287
287
  this.props.onChange(_query3);
288
288
  }
@@ -390,13 +390,9 @@ var FieldValueSelectionFilter = /*#__PURE__*/function (_Component) {
390
390
  listProps: {
391
391
  isVirtualized: isOverSearchThreshold || false
392
392
  },
393
- onChange: function onChange(options) {
394
- var diff = items.find(function (item, index) {
395
- return item.checked !== options[index].checked;
396
- });
397
-
398
- if (diff) {
399
- _this5.onOptionClick(diff.data.optionField, diff.data.value, diff.checked);
393
+ onChange: function onChange(options, event, changedOption) {
394
+ if (changedOption.data) {
395
+ _this5.onOptionClick(changedOption.data.optionField, changedOption.data.value, changedOption.checked);
400
396
  }
401
397
  }
402
398
  }, searchProps), function (list, search) {
@@ -116,6 +116,19 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
116
116
  }
117
117
  }
118
118
  });
119
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "ariaSetSize", 0);
120
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "ariaPosInSetMap", {});
121
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "calculateAriaSetAttrs", function (optionArray) {
122
+ _this.ariaPosInSetMap = {};
123
+ var latestAriaPosIndex = 0;
124
+ optionArray.forEach(function (option, index) {
125
+ if (!option.isGroupLabel) {
126
+ latestAriaPosIndex++;
127
+ _this.ariaPosInSetMap[index] = latestAriaPosIndex;
128
+ }
129
+ });
130
+ _this.ariaSetSize = latestAriaPosIndex;
131
+ });
119
132
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "ListRow", /*#__PURE__*/(0, _react.memo)(function (_ref) {
120
133
  var data = _ref.data,
121
134
  index = _ref.index,
@@ -158,9 +171,6 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
158
171
  }, optionRest), prepend, label, append);
159
172
  }
160
173
 
161
- var labelCount = data.filter(function (option) {
162
- return option.isGroupLabel;
163
- }).length;
164
174
  var id = makeOptionId(index);
165
175
  return (0, _react2.jsx)(_selectable_list_item.EuiSelectableListItem, (0, _extends2.default)({
166
176
  key: id,
@@ -181,8 +191,8 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
181
191
  disabled: disabled,
182
192
  prepend: prepend,
183
193
  append: append,
184
- "aria-posinset": index + 1 - labelCount,
185
- "aria-setsize": data.length - labelCount,
194
+ "aria-posinset": _this.ariaPosInSetMap[index],
195
+ "aria-setsize": _this.ariaSetSize,
186
196
  onFocusBadge: onFocusBadge,
187
197
  allowExclusions: allowExclusions,
188
198
  showIcons: showIcons,
@@ -333,6 +343,7 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
333
343
  textWrap = _this$props7.textWrap,
334
344
  rest = (0, _objectWithoutProperties2.default)(_this$props7, _excluded3);
335
345
  var optionArray = visibleOptions || options;
346
+ this.calculateAriaSetAttrs(optionArray);
336
347
  var heightIsFull = forcedHeight === 'full';
337
348
  var calculatedHeight = heightIsFull ? false : forcedHeight; // If calculatedHeight is still undefined, then calculate it
338
349
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elastic/eui",
3
3
  "description": "Elastic UI Component Library",
4
- "version": "74.0.0",
4
+ "version": "74.0.2",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -107,7 +107,7 @@ var EuiCard = function EuiCard(_ref) {
107
107
  var link = null;
108
108
 
109
109
  var outerOnClick = function outerOnClick(e) {
110
- if (link && link !== e.target) {
110
+ if (link && link !== e.target && !link.contains(e.target)) {
111
111
  link.click();
112
112
  }
113
113
  };
@@ -38,11 +38,6 @@ var EuiModalHeaderTitle = function EuiModalHeaderTitle(_ref) {
38
38
 
39
39
  exports.EuiModalHeaderTitle = EuiModalHeaderTitle;
40
40
  EuiModalHeaderTitle.propTypes = {
41
- className: _propTypes.default.string,
42
- "aria-label": _propTypes.default.string,
43
- "data-test-subj": _propTypes.default.string,
44
- css: _propTypes.default.any,
45
-
46
41
  /**
47
42
  * The tag to render. Can be changed to a lower heading
48
43
  * level like `h2` or a container `div`.
@@ -275,16 +275,16 @@ var FieldValueSelectionFilter = /*#__PURE__*/function (_Component) {
275
275
  if (!multiSelect && autoClose) {
276
276
  this.closePopover();
277
277
 
278
- var _query = checked ? this.props.query.removeSimpleFieldClauses(field) : this.props.query.removeSimpleFieldClauses(field).addSimpleFieldValue(field, value, true, operator);
278
+ var _query = checked ? this.props.query.removeSimpleFieldClauses(field).addSimpleFieldValue(field, value, true, operator) : this.props.query.removeSimpleFieldClauses(field);
279
279
 
280
280
  this.props.onChange(_query);
281
281
  } else {
282
282
  if (multiSelect === 'or') {
283
- var _query2 = checked ? this.props.query.removeOrFieldValue(field, value) : this.props.query.addOrFieldValue(field, value, true, operator);
283
+ var _query2 = checked ? this.props.query.addOrFieldValue(field, value, true, operator) : this.props.query.removeOrFieldValue(field, value);
284
284
 
285
285
  this.props.onChange(_query2);
286
286
  } else {
287
- var _query3 = checked ? this.props.query.removeSimpleFieldValue(field, value) : this.props.query.addSimpleFieldValue(field, value, true, operator);
287
+ var _query3 = checked ? this.props.query.addSimpleFieldValue(field, value, true, operator) : this.props.query.removeSimpleFieldValue(field, value);
288
288
 
289
289
  this.props.onChange(_query3);
290
290
  }
@@ -392,13 +392,9 @@ var FieldValueSelectionFilter = /*#__PURE__*/function (_Component) {
392
392
  listProps: {
393
393
  isVirtualized: isOverSearchThreshold || false
394
394
  },
395
- onChange: function onChange(options) {
396
- var diff = items.find(function (item, index) {
397
- return item.checked !== options[index].checked;
398
- });
399
-
400
- if (diff) {
401
- _this5.onOptionClick(diff.data.optionField, diff.data.value, diff.checked);
395
+ onChange: function onChange(options, event, changedOption) {
396
+ if (changedOption.data) {
397
+ _this5.onOptionClick(changedOption.data.optionField, changedOption.data.value, changedOption.checked);
402
398
  }
403
399
  }
404
400
  }, searchProps), function (list, search) {
@@ -118,6 +118,19 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
118
118
  }
119
119
  }
120
120
  });
121
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "ariaSetSize", 0);
122
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "ariaPosInSetMap", {});
123
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "calculateAriaSetAttrs", function (optionArray) {
124
+ _this.ariaPosInSetMap = {};
125
+ var latestAriaPosIndex = 0;
126
+ optionArray.forEach(function (option, index) {
127
+ if (!option.isGroupLabel) {
128
+ latestAriaPosIndex++;
129
+ _this.ariaPosInSetMap[index] = latestAriaPosIndex;
130
+ }
131
+ });
132
+ _this.ariaSetSize = latestAriaPosIndex;
133
+ });
121
134
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "ListRow", /*#__PURE__*/(0, _react.memo)(function (_ref) {
122
135
  var data = _ref.data,
123
136
  index = _ref.index,
@@ -160,9 +173,6 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
160
173
  }, optionRest), prepend, label, append);
161
174
  }
162
175
 
163
- var labelCount = data.filter(function (option) {
164
- return option.isGroupLabel;
165
- }).length;
166
176
  var id = makeOptionId(index);
167
177
  return (0, _react2.jsx)(_selectable_list_item.EuiSelectableListItem, (0, _extends2.default)({
168
178
  key: id,
@@ -183,8 +193,8 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
183
193
  disabled: disabled,
184
194
  prepend: prepend,
185
195
  append: append,
186
- "aria-posinset": index + 1 - labelCount,
187
- "aria-setsize": data.length - labelCount,
196
+ "aria-posinset": _this.ariaPosInSetMap[index],
197
+ "aria-setsize": _this.ariaSetSize,
188
198
  onFocusBadge: onFocusBadge,
189
199
  allowExclusions: allowExclusions,
190
200
  showIcons: showIcons,
@@ -335,6 +345,7 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
335
345
  textWrap = _this$props7.textWrap,
336
346
  rest = (0, _objectWithoutProperties2.default)(_this$props7, _excluded3);
337
347
  var optionArray = visibleOptions || options;
348
+ this.calculateAriaSetAttrs(optionArray);
338
349
  var heightIsFull = forcedHeight === 'full';
339
350
  var calculatedHeight = heightIsFull ? false : forcedHeight; // If calculatedHeight is still undefined, then calculate it
340
351