@jetbrains/ring-ui-built 7.0.28 → 7.0.30

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 (96) hide show
  1. package/components/_helpers/_rollupPluginBabelHelpers.js +1 -1
  2. package/components/_helpers/card.js +5 -5
  3. package/components/_helpers/input.js +7 -7
  4. package/components/_helpers/select__filter.js +2 -2
  5. package/components/_helpers/sidebar.js +2 -2
  6. package/components/alert/alert.js +2 -2
  7. package/components/alert-service/alert-service.js +2 -2
  8. package/components/analytics/analytics.js +1 -1
  9. package/components/analytics/analytics__custom-plugin.js +8 -8
  10. package/components/auth/auth__core.js +54 -54
  11. package/components/auth/background-flow.js +4 -4
  12. package/components/auth/iframe-flow.js +7 -7
  13. package/components/auth/request-builder.js +3 -3
  14. package/components/auth/response-parser.js +4 -4
  15. package/components/auth/storage.js +12 -12
  16. package/components/auth/token-validator.js +7 -7
  17. package/components/auth/window-flow.js +7 -7
  18. package/components/auth-dialog/auth-dialog.js +1 -1
  19. package/components/avatar-stack/avatar-stack.js +2 -2
  20. package/components/button/button.js +2 -2
  21. package/components/caret/caret.js +7 -7
  22. package/components/checkbox/checkbox.js +1 -1
  23. package/components/clipboard/clipboard-fallback.js +3 -3
  24. package/components/code/code.js +1 -1
  25. package/components/collapse/collapse-content.js +2 -2
  26. package/components/collapse/collapse.js +1 -1
  27. package/components/data-list/data-list.js +3 -3
  28. package/components/data-list/item.js +1 -1
  29. package/components/date-picker/consts.js +1 -1
  30. package/components/date-picker/date-input.js +5 -5
  31. package/components/date-picker/date-picker.js +9 -9
  32. package/components/date-picker/date-popup.js +4 -4
  33. package/components/date-picker/years.js +1 -1
  34. package/components/dialog/dialog.js +1 -1
  35. package/components/dropdown/dropdown.js +4 -4
  36. package/components/editable-heading/editable-heading.js +4 -4
  37. package/components/global/focus-sensor-hoc.js +10 -10
  38. package/components/global/memoize.js +1 -1
  39. package/components/global/normalize-indent.js +1 -1
  40. package/components/global/react-dom-renderer.js +1 -1
  41. package/components/global/schedule-raf.js +1 -1
  42. package/components/header/profile.js +6 -6
  43. package/components/header/smart-profile.js +2 -2
  44. package/components/header/smart-services.js +4 -4
  45. package/components/http/http.js +9 -9
  46. package/components/http/http.mock.js +3 -3
  47. package/components/hub-source/hub-source.js +6 -6
  48. package/components/hub-source/hub-source__user.js +2 -2
  49. package/components/hub-source/hub-source__users-groups.js +4 -4
  50. package/components/i18n/i18n.js +1 -1
  51. package/components/island/adaptive-island-hoc.js +1 -1
  52. package/components/island/content.js +3 -3
  53. package/components/island/header.js +1 -1
  54. package/components/list/list.js +4 -4
  55. package/components/list/list__item.js +20 -9
  56. package/components/list/list__users-groups-source.js +2 -2
  57. package/components/loader/loader.js +2 -2
  58. package/components/loader/loader__core.js +27 -27
  59. package/components/login-dialog/login-dialog.js +1 -1
  60. package/components/message/message.js +8 -8
  61. package/components/old-browsers-message/white-list.js +1 -1
  62. package/components/pager/pager.js +9 -9
  63. package/components/permissions/permissions.js +7 -7
  64. package/components/permissions/permissions__cache.js +4 -4
  65. package/components/popup/popup.js +8 -8
  66. package/components/popup/position.js +1 -1
  67. package/components/popup-menu/popup-menu.js +1 -1
  68. package/components/progress-bar/progress-bar.js +2 -2
  69. package/components/query-assist/query-assist.js +49 -47
  70. package/components/radio/radio__item.js +2 -2
  71. package/components/select/select.js +27 -27
  72. package/components/select/select__popup.js +9 -9
  73. package/components/shortcuts/core.js +1 -1
  74. package/components/slider/slider.js +8 -8
  75. package/components/slider/slider.utils.js +1 -1
  76. package/components/storage/storage__local.js +1 -1
  77. package/components/style.css +1 -1
  78. package/components/tab-trap/tab-trap.js +4 -4
  79. package/components/table/header-cell.js +2 -2
  80. package/components/table/multitable.js +7 -7
  81. package/components/table/row-with-focus-sensor.js +4 -4
  82. package/components/table/row.js +1 -1
  83. package/components/table/selection-shortcuts-hoc.js +12 -12
  84. package/components/table/selection.js +7 -7
  85. package/components/table/table.js +1 -1
  86. package/components/tabs/collapsible-tab.js +3 -3
  87. package/components/tabs/collapsible-tabs.js +7 -7
  88. package/components/tabs/dumb-tabs.js +1 -1
  89. package/components/tabs/smart-tabs.js +1 -1
  90. package/components/tag/tag.js +2 -2
  91. package/components/tags-input/tags-input.js +17 -17
  92. package/components/tooltip/tooltip.js +8 -8
  93. package/components/upload/upload.js +3 -3
  94. package/components/user-agreement/service.js +3 -3
  95. package/components/user-agreement/user-agreement.js +8 -8
  96. package/package.json +2 -2
@@ -113,7 +113,7 @@ class Pager extends PureComponent {
113
113
  if (currentPage !== 1) {
114
114
  var _this$props$onPageCha, _this$props;
115
115
  const prevPage = currentPage - 1;
116
- (_this$props$onPageCha = (_this$props = this.props).onPageChange) === null || _this$props$onPageCha === undefined || _this$props$onPageCha.call(_this$props, prevPage);
116
+ (_this$props$onPageCha = (_this$props = this.props).onPageChange) === null || _this$props$onPageCha === void 0 || _this$props$onPageCha.call(_this$props, prevPage);
117
117
  }
118
118
  });
119
119
  _defineProperty(this, "handleNextClick", () => {
@@ -125,14 +125,14 @@ class Pager extends PureComponent {
125
125
  const total = this.getTotalPages();
126
126
  if (currentPage !== total) {
127
127
  var _this$props$onPageCha2, _this$props2;
128
- (_this$props$onPageCha2 = (_this$props2 = this.props).onPageChange) === null || _this$props$onPageCha2 === undefined || _this$props$onPageCha2.call(_this$props2, nextPage);
128
+ (_this$props$onPageCha2 = (_this$props2 = this.props).onPageChange) === null || _this$props$onPageCha2 === void 0 || _this$props$onPageCha2.call(_this$props2, nextPage);
129
129
  } else if (this.props.openTotal) {
130
130
  onLoadPage(nextPage);
131
131
  }
132
132
  });
133
133
  _defineProperty(this, "handlePageChange", memoize(i => event => {
134
134
  var _this$props$onPageCha3, _this$props3;
135
- (_this$props$onPageCha3 = (_this$props3 = this.props).onPageChange) === null || _this$props$onPageCha3 === undefined || _this$props$onPageCha3.call(_this$props3, i, event);
135
+ (_this$props$onPageCha3 = (_this$props3 = this.props).onPageChange) === null || _this$props$onPageCha3 === void 0 || _this$props$onPageCha3.call(_this$props3, i, event);
136
136
  }));
137
137
  _defineProperty(this, "handleLoadMore", memoize(i => () => {
138
138
  this.props.onLoadPage(i);
@@ -150,7 +150,7 @@ class Pager extends PureComponent {
150
150
  var _this$props$translati, _this$props$translati2;
151
151
  return {
152
152
  key: size,
153
- label: "".concat(size, " ").concat((_this$props$translati = (_this$props$translati2 = this.props.translations) === null || _this$props$translati2 === undefined ? undefined : _this$props$translati2.perPage) !== null && _this$props$translati !== undefined ? _this$props$translati : translate('perPage'))
153
+ label: "".concat(size, " ").concat((_this$props$translati = (_this$props$translati2 = this.props.translations) === null || _this$props$translati2 === void 0 ? void 0 : _this$props$translati2.perPage) !== null && _this$props$translati !== void 0 ? _this$props$translati : translate('perPage'))
154
154
  };
155
155
  });
156
156
  const selected = data.find(it => it.key === pageSize);
@@ -220,8 +220,8 @@ class Pager extends PureComponent {
220
220
  const prevIcon = jsx(Icon, {
221
221
  glyph: chevronLeftIcon
222
222
  }, "icon");
223
- const prevText = (_this$props$translati3 = (_this$props$translati4 = this.props.translations) === null || _this$props$translati4 === undefined ? undefined : _this$props$translati4.previousPage) !== null && _this$props$translati3 !== undefined ? _this$props$translati3 : translate('previousPage');
224
- const nextText = (_this$props$translati5 = (_this$props$translati6 = this.props.translations) === null || _this$props$translati6 === undefined ? undefined : _this$props$translati6.nextPage) !== null && _this$props$translati5 !== undefined ? _this$props$translati5 : translate('nextPage');
223
+ const prevText = (_this$props$translati3 = (_this$props$translati4 = this.props.translations) === null || _this$props$translati4 === void 0 ? void 0 : _this$props$translati4.previousPage) !== null && _this$props$translati3 !== void 0 ? _this$props$translati3 : translate('previousPage');
224
+ const nextText = (_this$props$translati5 = (_this$props$translati6 = this.props.translations) === null || _this$props$translati6 === void 0 ? void 0 : _this$props$translati6.nextPage) !== null && _this$props$translati5 !== void 0 ? _this$props$translati5 : translate('nextPage');
225
225
  const nextLinkContent = [jsx("span", {
226
226
  children: nextText
227
227
  }, "text"), nextIcon];
@@ -278,7 +278,7 @@ class Pager extends PureComponent {
278
278
  } = this.context;
279
279
  if (totalPages < this.props.currentPage) {
280
280
  var _this$props$onPageCha4, _this$props4;
281
- (_this$props$onPageCha4 = (_this$props4 = this.props).onPageChange) === null || _this$props$onPageCha4 === undefined || _this$props$onPageCha4.call(_this$props4, totalPages);
281
+ (_this$props$onPageCha4 = (_this$props4 = this.props).onPageChange) === null || _this$props$onPageCha4 === void 0 || _this$props$onPageCha4.call(_this$props4, totalPages);
282
282
  }
283
283
  let start = 1;
284
284
  let end = totalPages;
@@ -310,14 +310,14 @@ class Pager extends PureComponent {
310
310
  children: [this.getPagerLinks(), jsxs("div", {
311
311
  className: style.actions,
312
312
  children: [jsxs(ButtonToolbar, {
313
- children: [start > 1 && this.getButton(1, (_this$props$translati7 = (_this$props$translati8 = this.props.translations) === null || _this$props$translati8 === undefined ? undefined : _this$props$translati8.firstPage) !== null && _this$props$translati7 !== undefined ? _this$props$translati7 : translate('firstPage')), jsxs(ButtonGroup, {
313
+ children: [start > 1 && this.getButton(1, (_this$props$translati7 = (_this$props$translati8 = this.props.translations) === null || _this$props$translati8 === void 0 ? void 0 : _this$props$translati8.firstPage) !== null && _this$props$translati7 !== void 0 ? _this$props$translati7 : translate('firstPage')), jsxs(ButtonGroup, {
314
314
  children: [start > 1 && this.getButton(start - 1, '...'), buttons, end < totalPages && this.getButton(end + 1, '...'), end === totalPages && this.props.openTotal && jsx(Button, _objectSpread2(_objectSpread2({
315
315
  href: this.generateHref(end + 1),
316
316
  disabled: this.props.loader
317
317
  }, this.getClickProps(this.handleLoadMore(end + 1))), {}, {
318
318
  children: '...'
319
319
  }))]
320
- }), lastPageButtonAvailable && this.getButton(this.props.openTotal ? -1 : totalPages, (_this$props$translati9 = (_this$props$translati10 = this.props.translations) === null || _this$props$translati10 === undefined ? undefined : _this$props$translati10.lastPage) !== null && _this$props$translati9 !== undefined ? _this$props$translati9 : translate('lastPage'))]
320
+ }), lastPageButtonAvailable && this.getButton(this.props.openTotal ? -1 : totalPages, (_this$props$translati9 = (_this$props$translati10 = this.props.translations) === null || _this$props$translati10 === void 0 ? void 0 : _this$props$translati10.lastPage) !== null && _this$props$translati9 !== void 0 ? _this$props$translati9 : translate('lastPage'))]
321
321
  }), this.getPageSizeSelector()]
322
322
  })]
323
323
  });
@@ -29,13 +29,13 @@ import PermissionCache from './permissions__cache.js';
29
29
  class Permissions {
30
30
  constructor(auth) {
31
31
  let config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
32
- _defineProperty(this, "query", undefined);
33
- _defineProperty(this, "namesConverter", undefined);
34
- _defineProperty(this, "_auth", undefined);
35
- _defineProperty(this, "_datasource", undefined);
36
- _defineProperty(this, "_promise", undefined);
37
- _defineProperty(this, "_subscribed", undefined);
38
- _defineProperty(this, "_permissionCache", undefined);
32
+ _defineProperty(this, "query", void 0);
33
+ _defineProperty(this, "namesConverter", void 0);
34
+ _defineProperty(this, "_auth", void 0);
35
+ _defineProperty(this, "_datasource", void 0);
36
+ _defineProperty(this, "_promise", void 0);
37
+ _defineProperty(this, "_subscribed", void 0);
38
+ _defineProperty(this, "_permissionCache", void 0);
39
39
  _defineProperty(this, "_defaultDatasource", query => this._auth.http.get(Permissions.API_PERMISSION_CACHE_PATH, {
40
40
  query: {
41
41
  fields: 'permission/key,global,projects(id)',
@@ -32,9 +32,9 @@ class PermissionCache {
32
32
  return projectIdSet;
33
33
  }
34
34
  constructor(permissions, namesConverter) {
35
- _defineProperty(this, "namesConverter", undefined);
36
- _defineProperty(this, "_permissions", undefined);
37
- _defineProperty(this, "permissionCache", undefined);
35
+ _defineProperty(this, "namesConverter", void 0);
36
+ _defineProperty(this, "_permissions", void 0);
37
+ _defineProperty(this, "permissionCache", void 0);
38
38
  this.namesConverter = namesConverter || (key => key);
39
39
  this.set(permissions);
40
40
  }
@@ -206,7 +206,7 @@ class PermissionCache {
206
206
  testPermission(permissionName, projectId) {
207
207
  const permissionCache = this.permissionCache;
208
208
  const convertedName = this.namesConverter(permissionName);
209
- const cachedPermission = (permissionCache === null || permissionCache === undefined ? undefined : permissionCache[permissionName]) || convertedName && (permissionCache === null || permissionCache === undefined ? undefined : permissionCache[convertedName]);
209
+ const cachedPermission = (permissionCache === null || permissionCache === void 0 ? void 0 : permissionCache[permissionName]) || convertedName && (permissionCache === null || permissionCache === void 0 ? void 0 : permissionCache[convertedName]);
210
210
  // Hasn't the permission in any project
211
211
  if (!cachedPermission) {
212
212
  return false;
@@ -71,11 +71,11 @@ class Popup extends PureComponent {
71
71
  _defineProperty(this, "state", {
72
72
  display: Display.SHOWING
73
73
  });
74
- _defineProperty(this, "popup", undefined);
75
- _defineProperty(this, "node", undefined);
76
- _defineProperty(this, "parent", undefined);
77
- _defineProperty(this, "container", undefined);
78
- _defineProperty(this, "ringPopupTarget", undefined);
74
+ _defineProperty(this, "popup", void 0);
75
+ _defineProperty(this, "node", void 0);
76
+ _defineProperty(this, "parent", void 0);
77
+ _defineProperty(this, "container", void 0);
78
+ _defineProperty(this, "ringPopupTarget", void 0);
79
79
  _defineProperty(this, "listeners", new Listeners());
80
80
  _defineProperty(this, "redrawScheduler", scheduleRAF(true));
81
81
  _defineProperty(this, "uid", getUID('popup-'));
@@ -136,8 +136,8 @@ class Popup extends PureComponent {
136
136
  this.redrawScheduler(this._updatePosition);
137
137
  }
138
138
  });
139
- _defineProperty(this, "_listenersEnabled", undefined);
140
- _defineProperty(this, "_prevTimeout", undefined);
139
+ _defineProperty(this, "_listenersEnabled", void 0);
140
+ _defineProperty(this, "_prevTimeout", void 0);
141
141
  _defineProperty(this, "_onEscPress", evt => {
142
142
  this.props.onEscPress(evt);
143
143
  this._onCloseAttempt(evt, true);
@@ -148,7 +148,7 @@ class Popup extends PureComponent {
148
148
  */
149
149
  _defineProperty(this, "_onDocumentClick", evt => {
150
150
  var _this$_getAnchor;
151
- if (this.container && evt.target instanceof Node && this.container.contains(evt.target) || !this._listenersEnabled || this.props.dontCloseOnAnchorClick && evt.target instanceof Node && (_this$_getAnchor = this._getAnchor()) !== null && _this$_getAnchor !== undefined && _this$_getAnchor.contains(evt.target)) {
151
+ if (this.container && evt.target instanceof Node && this.container.contains(evt.target) || !this._listenersEnabled || this.props.dontCloseOnAnchorClick && evt.target instanceof Node && (_this$_getAnchor = this._getAnchor()) !== null && _this$_getAnchor !== void 0 && _this$_getAnchor.contains(evt.target)) {
152
152
  return;
153
153
  }
154
154
  this.props.onOutsideClick(evt);
@@ -249,7 +249,7 @@ function position(attrs) {
249
249
  anchorRect,
250
250
  maxHeight,
251
251
  direction: chosenDirection,
252
- popupScrollHeight: (_popup$scrollHeight = popup === null || popup === undefined ? undefined : popup.scrollHeight) !== null && _popup$scrollHeight !== undefined ? _popup$scrollHeight : 0,
252
+ popupScrollHeight: (_popup$scrollHeight = popup === null || popup === void 0 ? void 0 : popup.scrollHeight) !== null && _popup$scrollHeight !== void 0 ? _popup$scrollHeight : 0,
253
253
  scroll
254
254
  });
255
255
  }
@@ -78,7 +78,7 @@ class PopupMenu extends Popup {
78
78
  }
79
79
  this.props.onSelect(item, event);
80
80
  });
81
- _defineProperty(this, "list", undefined);
81
+ _defineProperty(this, "list", void 0);
82
82
  _defineProperty(this, "listRef", el => {
83
83
  this.list = el;
84
84
  });
@@ -13,11 +13,11 @@ const _excluded = ["className", "global", "max", "value", "label", "staticColor"
13
13
  class ProgressBar extends PureComponent {
14
14
  constructor() {
15
15
  super(...arguments);
16
- _defineProperty(this, "progressbarWrapper", undefined);
16
+ _defineProperty(this, "progressbarWrapper", void 0);
17
17
  _defineProperty(this, "progressbarWrapperRef", el => {
18
18
  this.progressbarWrapper = el;
19
19
  });
20
- _defineProperty(this, "progressbar", undefined);
20
+ _defineProperty(this, "progressbar", void 0);
21
21
  _defineProperty(this, "progressbarRef", el => {
22
22
  this.progressbar = el;
23
23
  });
@@ -161,12 +161,12 @@ class QueryAssist extends Component {
161
161
  suggestions: [],
162
162
  showPopup: false
163
163
  });
164
- _defineProperty(this, "immediateState", undefined);
165
- _defineProperty(this, "requestData", undefined);
164
+ _defineProperty(this, "immediateState", void 0);
165
+ _defineProperty(this, "requestData", void 0);
166
166
  _defineProperty(this, "ngModelStateField", ngModelStateField);
167
167
  // An array of {query: string; caret: number}[]
168
168
  _defineProperty(this, "historyStack", []);
169
- _defineProperty(this, "mouseIsDownOnPopup", undefined);
169
+ _defineProperty(this, "mouseIsDownOnPopup", void 0);
170
170
  _defineProperty(this, "handleFocusChange", e => {
171
171
  // otherwise it's blur and false
172
172
  const focus = e.type === 'focus';
@@ -185,11 +185,13 @@ class QueryAssist extends Component {
185
185
  focus
186
186
  });
187
187
  }
188
- this.setState({
189
- shortcuts: focus
190
- });
188
+ if (this.state.shortcuts !== focus) {
189
+ this.setState({
190
+ shortcuts: focus
191
+ });
192
+ }
191
193
  });
192
- _defineProperty(this, "node", undefined);
194
+ _defineProperty(this, "node", void 0);
193
195
  _defineProperty(this, "nodeRef", node => {
194
196
  this.node = node;
195
197
  });
@@ -204,14 +206,14 @@ class QueryAssist extends Component {
204
206
  if (typeof _this.immediateState.selection === 'number' && Number.isInteger(_this.immediateState.selection) && _this.immediateState.selection > -1) {
205
207
  var _this$caret;
206
208
  // Set to end of field value if newCaretPosition is inappropriate
207
- (_this$caret = _this.caret) === null || _this$caret === undefined || _this$caret.setPosition(newCaretPosition >= 0 ? newCaretPosition : -1);
209
+ (_this$caret = _this.caret) === null || _this$caret === void 0 || _this$caret.setPosition(newCaretPosition >= 0 ? newCaretPosition : -1);
208
210
  _this.scrollInput();
209
211
  } else if (_this.immediateState.selection && typeof _this.immediateState.selection === 'object' && _this.immediateState.selection.startOffset !== undefined) {
210
212
  var _this$caret2;
211
- (_this$caret2 = _this.caret) === null || _this$caret2 === undefined || _this$caret2.setPosition(_this.immediateState.selection);
213
+ (_this$caret2 = _this.caret) === null || _this$caret2 === void 0 || _this$caret2.setPosition(_this.immediateState.selection);
212
214
  } else if (_this.immediateState.selection === undefined || params.forceSetCaret) {
213
215
  var _this$caret3;
214
- (_this$caret3 = _this.caret) === null || _this$caret3 === undefined || _this$caret3.setPosition(-1);
216
+ (_this$caret3 = _this.caret) === null || _this$caret3 === void 0 || _this$caret3.setPosition(-1);
215
217
  }
216
218
  }
217
219
  });
@@ -225,15 +227,15 @@ class QueryAssist extends Component {
225
227
  });
226
228
  }
227
229
  });
228
- _defineProperty(this, "isComposing", undefined);
230
+ _defineProperty(this, "isComposing", void 0);
229
231
  _defineProperty(this, "handleInput", e => {
230
232
  var _this$caret4, _currentCaret$positio;
231
233
  this.togglePlaceholder();
232
- const currentCaret = (_this$caret4 = this.caret) === null || _this$caret4 === undefined ? undefined : _this$caret4.getPosition();
234
+ const currentCaret = (_this$caret4 = this.caret) === null || _this$caret4 === void 0 ? void 0 : _this$caret4.getPosition();
233
235
  const props = {
234
236
  dirty: true,
235
237
  query: this.getQuery(),
236
- caret: typeof currentCaret === 'number' ? currentCaret : (_currentCaret$positio = currentCaret === null || currentCaret === undefined ? undefined : currentCaret.position) !== null && _currentCaret$positio !== undefined ? _currentCaret$positio : 0,
238
+ caret: typeof currentCaret === 'number' ? currentCaret : (_currentCaret$positio = currentCaret === null || currentCaret === void 0 ? void 0 : currentCaret.position) !== null && _currentCaret$positio !== void 0 ? _currentCaret$positio : 0,
237
239
  focus: true
238
240
  };
239
241
  if (this.immediateState.query === props.query && !this.isComposing) {
@@ -252,7 +254,7 @@ class QueryAssist extends Component {
252
254
  }
253
255
  const diff = this.immediateState.query.length - this.state.query.length;
254
256
  const originalIndex = this.immediateState.caret - diff;
255
- const ranges = [...((_this$state$styleRang = this.state.styleRanges) !== null && _this$state$styleRang !== undefined ? _this$state$styleRang : [])];
257
+ const ranges = [...((_this$state$styleRang = this.state.styleRanges) !== null && _this$state$styleRang !== void 0 ? _this$state$styleRang : [])];
256
258
  const range = ranges.find(r => originalIndex >= r.start && originalIndex <= r.start + r.length);
257
259
  if (range) {
258
260
  range.length += diff;
@@ -264,7 +266,7 @@ class QueryAssist extends Component {
264
266
  this.props.onChange(props);
265
267
  if (this.props.autoOpen === 'force' || props.query.length > 0) {
266
268
  var _this$requestData;
267
- (_this$requestData = this.requestData) === null || _this$requestData === undefined || _this$requestData.call(this);
269
+ (_this$requestData = this.requestData) === null || _this$requestData === void 0 || _this$requestData.call(this);
268
270
  }
269
271
  });
270
272
  // It's necessary to prevent new element creation before any other hooks
@@ -292,7 +294,7 @@ class QueryAssist extends Component {
292
294
  _defineProperty(this, "setState", (state, resolve) => {
293
295
  super.setState(state, () => {
294
296
  this._pushHistory(state);
295
- resolve === null || resolve === undefined || resolve();
297
+ resolve === null || resolve === void 0 || resolve();
296
298
  });
297
299
  });
298
300
  _defineProperty(this, "undo", e => {
@@ -304,7 +306,7 @@ class QueryAssist extends Component {
304
306
  query: previous.query
305
307
  }, () => {
306
308
  var _this$caret5;
307
- (_this$caret5 = this.caret) === null || _this$caret5 === undefined || _this$caret5.setPosition(previous.caret);
309
+ (_this$caret5 = this.caret) === null || _this$caret5 === void 0 || _this$caret5.setPosition(previous.caret);
308
310
  this.handleInput(e);
309
311
  });
310
312
  });
@@ -322,8 +324,8 @@ class QueryAssist extends Component {
322
324
  if (this.isComposing) {
323
325
  return;
324
326
  }
325
- const currentCaret = (_this$caret6 = this.caret) === null || _this$caret6 === undefined ? undefined : _this$caret6.getPosition();
326
- const caret = typeof currentCaret === 'number' ? currentCaret : (_currentCaret$positio2 = currentCaret === null || currentCaret === undefined ? undefined : currentCaret.position) !== null && _currentCaret$positio2 !== undefined ? _currentCaret$positio2 : 0;
327
+ const currentCaret = (_this$caret6 = this.caret) === null || _this$caret6 === void 0 ? void 0 : _this$caret6.getPosition();
328
+ const caret = typeof currentCaret === 'number' ? currentCaret : (_currentCaret$positio2 = currentCaret === null || currentCaret === void 0 ? void 0 : currentCaret.position) !== null && _currentCaret$positio2 !== void 0 ? _currentCaret$positio2 : 0;
327
329
  const popupHidden = !this.state.showPopup && e.type === 'click';
328
330
  if (!this.props.disabled && (caret !== this.immediateState.caret || popupHidden)) {
329
331
  this.immediateState.prevCaret = this.immediateState.caret;
@@ -331,7 +333,7 @@ class QueryAssist extends Component {
331
333
  this.scrollInput();
332
334
  if (this.immediateState.query.length > 0) {
333
335
  var _this$requestData2;
334
- (_this$requestData2 = this.requestData) === null || _this$requestData2 === undefined || _this$requestData2.call(this);
336
+ (_this$requestData2 = this.requestData) === null || _this$requestData2 === void 0 || _this$requestData2.call(this);
335
337
  }
336
338
  }
337
339
  if (this.props.autoOpen !== 'force' && this.immediateState.query.length < 1) {
@@ -375,7 +377,7 @@ class QueryAssist extends Component {
375
377
  if (!dequal(_this.state.styleRanges, styleRanges)) {
376
378
  state.styleRanges = styleRanges;
377
379
  }
378
- _this.immediateState.selection = (_this$caret7 = _this.caret) === null || _this$caret7 === undefined ? undefined : _this$caret7.getPosition({
380
+ _this.immediateState.selection = (_this$caret7 = _this.caret) === null || _this$caret7 === void 0 ? void 0 : _this$caret7.getPosition({
379
381
  avoidFocus: true
380
382
  });
381
383
  _this.setState(state, resolve);
@@ -408,13 +410,13 @@ class QueryAssist extends Component {
408
410
  const suffix = suggestion.suffix || '';
409
411
  const state = {
410
412
  prevCaret: currentCaret,
411
- caret: (_suggestion$caret = suggestion.caret) !== null && _suggestion$caret !== undefined ? _suggestion$caret : 0,
412
- selection: (_suggestion$caret2 = suggestion.caret) !== null && _suggestion$caret2 !== undefined ? _suggestion$caret2 : 0,
413
+ caret: (_suggestion$caret = suggestion.caret) !== null && _suggestion$caret !== void 0 ? _suggestion$caret : 0,
414
+ selection: (_suggestion$caret2 = suggestion.caret) !== null && _suggestion$caret2 !== void 0 ? _suggestion$caret2 : 0,
413
415
  query: query.substr(0, suggestion.completionStart) + prefix + suggestion.option + suffix
414
416
  };
415
417
  if (typeof replace === 'boolean' && replace) {
416
418
  var _suggestion$completio;
417
- state.query += this.immediateState.query.substr((_suggestion$completio = suggestion.completionEnd) !== null && _suggestion$completio !== undefined ? _suggestion$completio : 0);
419
+ state.query += this.immediateState.query.substr((_suggestion$completio = suggestion.completionEnd) !== null && _suggestion$completio !== void 0 ? _suggestion$completio : 0);
418
420
  } else {
419
421
  state.query += this.immediateState.query.substr(this.immediateState.caret);
420
422
  }
@@ -435,7 +437,7 @@ class QueryAssist extends Component {
435
437
  this.setCaretPosition();
436
438
  }
437
439
  this.closePopup();
438
- (_this$requestData3 = this.requestData) === null || _this$requestData3 === undefined || _this$requestData3.call(this, true);
440
+ (_this$requestData3 = this.requestData) === null || _this$requestData3 === void 0 || _this$requestData3.call(this, true);
439
441
  });
440
442
  _defineProperty(this, "requestStyleRanges", () => {
441
443
  const {
@@ -469,7 +471,7 @@ class QueryAssist extends Component {
469
471
  preventDefault(e);
470
472
  if (!this.state.showPopup) {
471
473
  var _this$requestData4;
472
- (_this$requestData4 = this.requestData) === null || _this$requestData4 === undefined || _this$requestData4.call(this);
474
+ (_this$requestData4 = this.requestData) === null || _this$requestData4 === void 0 || _this$requestData4.call(this);
473
475
  }
474
476
  });
475
477
  _defineProperty(this, "trackPopupMouseState", e => {
@@ -502,8 +504,8 @@ class QueryAssist extends Component {
502
504
  loading: false
503
505
  });
504
506
  });
505
- _defineProperty(this, "input", undefined);
506
- _defineProperty(this, "caret", undefined);
507
+ _defineProperty(this, "input", void 0);
508
+ _defineProperty(this, "caret", void 0);
507
509
  _defineProperty(this, "inputRef", node => {
508
510
  if (!node) {
509
511
  return;
@@ -511,23 +513,23 @@ class QueryAssist extends Component {
511
513
  this.input = node;
512
514
  this.caret = new Caret(this.input);
513
515
  });
514
- _defineProperty(this, "_popup", undefined);
516
+ _defineProperty(this, "_popup", void 0);
515
517
  _defineProperty(this, "popupRef", node => {
516
518
  this._popup = node;
517
519
  });
518
- _defineProperty(this, "placeholder", undefined);
520
+ _defineProperty(this, "placeholder", void 0);
519
521
  _defineProperty(this, "placeholderRef", node => {
520
522
  this.placeholder = node;
521
523
  });
522
- _defineProperty(this, "glass", undefined);
524
+ _defineProperty(this, "glass", void 0);
523
525
  _defineProperty(this, "glassRef", node => {
524
526
  this.glass = node;
525
527
  });
526
- _defineProperty(this, "loader", undefined);
528
+ _defineProperty(this, "loader", void 0);
527
529
  _defineProperty(this, "loaderRef", node => {
528
530
  this.loader = node;
529
531
  });
530
- _defineProperty(this, "clear", undefined);
532
+ _defineProperty(this, "clear", void 0);
531
533
  _defineProperty(this, "clearRef", node => {
532
534
  this.clear = node;
533
535
  });
@@ -574,7 +576,7 @@ class QueryAssist extends Component {
574
576
  this._pushHistory(this.state);
575
577
  }
576
578
  shouldComponentUpdate(props, state) {
577
- return state.query !== this.state.query || state.dirty !== this.state.dirty || state.loading !== this.state.loading || state.showPopup !== this.state.showPopup || state.suggestions !== this.state.suggestions || state.styleRanges !== this.state.styleRanges || state.placeholderEnabled !== this.state.placeholderEnabled || props.placeholder !== this.props.placeholder || props.disabled !== this.props.disabled || props.clear !== this.props.clear || props.focus !== this.props.focus || props.actions !== this.props.actions || props.loader !== this.props.loader || props.glass !== this.props.glass || props.className !== this.props.className;
579
+ return state.query !== this.state.query || state.dirty !== this.state.dirty || state.loading !== this.state.loading || state.showPopup !== this.state.showPopup || state.suggestions !== this.state.suggestions || state.styleRanges !== this.state.styleRanges || state.placeholderEnabled !== this.state.placeholderEnabled || state.shortcuts !== this.state.shortcuts || props.placeholder !== this.props.placeholder || props.disabled !== this.props.disabled || props.clear !== this.props.clear || props.focus !== this.props.focus || props.actions !== this.props.actions || props.loader !== this.props.loader || props.glass !== this.props.glass || props.className !== this.props.className || props.delay !== this.props.delay;
578
580
  }
579
581
  componentDidUpdate(prevProps) {
580
582
  const {
@@ -594,7 +596,7 @@ class QueryAssist extends Component {
594
596
  this.immediateState.query = query;
595
597
  if (query && (this.props.autoOpen === 'force' || prevProps.autoOpen && query.length > 0)) {
596
598
  var _this$requestData5;
597
- (_this$requestData5 = this.requestData) === null || _this$requestData5 === undefined || _this$requestData5.call(this);
599
+ (_this$requestData5 = this.requestData) === null || _this$requestData5 === void 0 || _this$requestData5.call(this);
598
600
  } else if (query) {
599
601
  this.requestStyleRanges();
600
602
  }
@@ -614,14 +616,14 @@ class QueryAssist extends Component {
614
616
  }
615
617
  scrollInput() {
616
618
  var _this$caret8, _this$input, _this$input2, _this$input3;
617
- const caretOffset = (_this$caret8 = this.caret) === null || _this$caret8 === undefined ? undefined : _this$caret8.getOffset();
618
- if (((_this$input = this.input) === null || _this$input === undefined ? undefined : _this$input.clientWidth) !== ((_this$input2 = this.input) === null || _this$input2 === undefined ? undefined : _this$input2.scrollWidth) && caretOffset != null && ((_this$input3 = this.input) === null || _this$input3 === undefined ? undefined : _this$input3.clientWidth) != null && caretOffset > this.input.clientWidth) {
619
+ const caretOffset = (_this$caret8 = this.caret) === null || _this$caret8 === void 0 ? void 0 : _this$caret8.getOffset();
620
+ if (((_this$input = this.input) === null || _this$input === void 0 ? void 0 : _this$input.clientWidth) !== ((_this$input2 = this.input) === null || _this$input2 === void 0 ? void 0 : _this$input2.scrollWidth) && caretOffset != null && ((_this$input3 = this.input) === null || _this$input3 === void 0 ? void 0 : _this$input3.clientWidth) != null && caretOffset > this.input.clientWidth) {
619
621
  this.input.scrollLeft += caretOffset;
620
622
  }
621
623
  }
622
624
  getQuery() {
623
625
  var _this$input$textConte, _this$input4;
624
- return (_this$input$textConte = (_this$input4 = this.input) === null || _this$input4 === undefined || (_this$input4 = _this$input4.textContent) === null || _this$input4 === undefined ? undefined : _this$input4.replace(/\s/g, ' ')) !== null && _this$input$textConte !== undefined ? _this$input$textConte : '';
626
+ return (_this$input$textConte = (_this$input4 = this.input) === null || _this$input4 === void 0 || (_this$input4 = _this$input4.textContent) === null || _this$input4 === void 0 ? void 0 : _this$input4.replace(/\s/g, ' ')) !== null && _this$input$textConte !== void 0 ? _this$input$textConte : '';
625
627
  }
626
628
  isRenderingGlassOrLoader() {
627
629
  const renderLoader = this.props.loader !== false && this.state.loading;
@@ -630,14 +632,14 @@ class QueryAssist extends Component {
630
632
  _pushHistory(state) {
631
633
  var _this$historyStack$;
632
634
  const queryIsSet = 'query' in state;
633
- const queryIsSame = ((_this$historyStack$ = this.historyStack[0]) === null || _this$historyStack$ === undefined ? undefined : _this$historyStack$.query) === state.query;
635
+ const queryIsSame = ((_this$historyStack$ = this.historyStack[0]) === null || _this$historyStack$ === void 0 ? void 0 : _this$historyStack$.query) === state.query;
634
636
  if (queryIsSet && !queryIsSame) {
635
637
  var _this$caret$getPositi, _this$caret9;
636
638
  this.historyStack.unshift({
637
639
  query: state.query,
638
- caret: (_this$caret$getPositi = (_this$caret9 = this.caret) === null || _this$caret9 === undefined ? undefined : _this$caret9.getPosition({
640
+ caret: (_this$caret$getPositi = (_this$caret9 = this.caret) === null || _this$caret9 === void 0 ? void 0 : _this$caret9.getPosition({
639
641
  avoidFocus: true
640
- })) !== null && _this$caret$getPositi !== undefined ? _this$caret$getPositi : -1
642
+ })) !== null && _this$caret$getPositi !== void 0 ? _this$caret$getPositi : -1
641
643
  });
642
644
  }
643
645
  }
@@ -679,7 +681,7 @@ class QueryAssist extends Component {
679
681
  let offset = completionStartNode && getRect(completionStartNode).right - getRect(this.input).left;
680
682
  if (!offset) {
681
683
  var _this$caret$getOffset, _this$caret10;
682
- const caret = (_this$caret$getOffset = (_this$caret10 = this.caret) === null || _this$caret10 === undefined ? undefined : _this$caret10.getOffset()) !== null && _this$caret$getOffset !== undefined ? _this$caret$getOffset : 0;
684
+ const caret = (_this$caret$getOffset = (_this$caret10 = this.caret) === null || _this$caret10 === void 0 ? void 0 : _this$caret10.getOffset()) !== null && _this$caret$getOffset !== void 0 ? _this$caret$getOffset : 0;
683
685
  // Do not compensate caret in the beginning of field
684
686
  if (caret === 0) {
685
687
  return minOffset;
@@ -694,7 +696,7 @@ class QueryAssist extends Component {
694
696
  this.immediateState.selection = null;
695
697
  if (!this.props.focus) {
696
698
  var _this$caret11;
697
- (_this$caret11 = this.caret) === null || _this$caret11 === undefined || _this$caret11.target.blur();
699
+ (_this$caret11 = this.caret) === null || _this$caret11 === void 0 || _this$caret11.target.blur();
698
700
  }
699
701
  }
700
702
  /**
@@ -802,7 +804,7 @@ class QueryAssist extends Component {
802
804
  return jsx(Button, {
803
805
  icon: closeIcon,
804
806
  className: styles.clear,
805
- title: (_this$props$translati = (_this$props$translati2 = this.props.translations) === null || _this$props$translati2 === undefined ? undefined : _this$props$translati2.clearTitle) !== null && _this$props$translati !== undefined ? _this$props$translati : translate('clearTitle'),
807
+ title: (_this$props$translati = (_this$props$translati2 = this.props.translations) === null || _this$props$translati2 === void 0 ? void 0 : _this$props$translati2.clearTitle) !== null && _this$props$translati !== void 0 ? _this$props$translati : translate('clearTitle'),
806
808
  ref: this.clearRef,
807
809
  onClick: this.clearQuery,
808
810
  "data-test": "query-assist-clear-icon"
@@ -863,7 +865,7 @@ class QueryAssist extends Component {
863
865
  }), renderGlass && !huge && jsx(Icon, {
864
866
  glyph: searchIcon,
865
867
  className: styles.icon,
866
- title: (_translations$searchT = translations === null || translations === undefined ? undefined : translations.searchTitle) !== null && _translations$searchT !== undefined ? _translations$searchT : translate('searchTitle'),
868
+ title: (_translations$searchT = translations === null || translations === void 0 ? void 0 : translations.searchTitle) !== null && _translations$searchT !== void 0 ? _translations$searchT : translate('searchTitle'),
867
869
  ref: this.glassRef,
868
870
  "data-test": "query-assist-search-icon"
869
871
  }), renderLoader && jsx("div", {
@@ -874,7 +876,7 @@ class QueryAssist extends Component {
874
876
  ref: this.loaderRef,
875
877
  children: jsx(LoaderInline, {})
876
878
  }), jsx(ContentEditable, {
877
- "aria-label": (_translations$searchT2 = translations === null || translations === undefined ? undefined : translations.searchTitle) !== null && _translations$searchT2 !== undefined ? _translations$searchT2 : translate('searchTitle'),
879
+ "aria-label": (_translations$searchT2 = translations === null || translations === void 0 ? void 0 : translations.searchTitle) !== null && _translations$searchT2 !== void 0 ? _translations$searchT2 : translate('searchTitle'),
878
880
  className: inputClasses,
879
881
  "data-test": "ring-query-assist-input",
880
882
  inputRef: this.inputRef,
@@ -933,7 +935,7 @@ class QueryAssist extends Component {
933
935
  children: jsx(Icon, {
934
936
  glyph: searchIcon,
935
937
  className: styles.rightSearchIcon,
936
- title: (_translations$searchT3 = translations === null || translations === undefined ? undefined : translations.searchTitle) !== null && _translations$searchT3 !== undefined ? _translations$searchT3 : translate('searchTitle'),
938
+ title: (_translations$searchT3 = translations === null || translations === void 0 ? void 0 : translations.searchTitle) !== null && _translations$searchT3 !== void 0 ? _translations$searchT3 : translate('searchTitle'),
937
939
  onClick: this.handleApply,
938
940
  ref: this.glassRef,
939
941
  "data-test": "query-assist-search-icon"
@@ -16,11 +16,11 @@ class RadioItemInner extends Component {
16
16
  constructor() {
17
17
  super(...arguments);
18
18
  _defineProperty(this, "uid", getUID('ring-radio-item-'));
19
- _defineProperty(this, "input", undefined);
19
+ _defineProperty(this, "input", void 0);
20
20
  _defineProperty(this, "inputRef", el => {
21
21
  this.input = el;
22
22
  });
23
- _defineProperty(this, "label", undefined);
23
+ _defineProperty(this, "label", void 0);
24
24
  _defineProperty(this, "labelRef", el => {
25
25
  this.label = el;
26
26
  });