@jetbrains/ring-ui-built 7.0.27 → 7.0.29

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 (104) 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 +8 -9
  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/dropdown-menu/dropdown-menu.js +6 -7
  37. package/components/editable-heading/editable-heading.js +4 -4
  38. package/components/global/focus-sensor-hoc.js +10 -10
  39. package/components/global/memoize.js +1 -1
  40. package/components/global/normalize-indent.js +1 -1
  41. package/components/global/react-dom-renderer.js +1 -1
  42. package/components/global/schedule-raf.js +1 -1
  43. package/components/header/header.js +5 -6
  44. package/components/header/profile.js +11 -12
  45. package/components/header/smart-profile.js +5 -6
  46. package/components/header/smart-services.js +4 -4
  47. package/components/http/http.js +9 -9
  48. package/components/http/http.mock.js +3 -3
  49. package/components/hub-source/hub-source.js +6 -6
  50. package/components/hub-source/hub-source__user.js +2 -2
  51. package/components/hub-source/hub-source__users-groups.js +4 -4
  52. package/components/i18n/i18n.js +1 -1
  53. package/components/island/adaptive-island-hoc.js +1 -1
  54. package/components/island/content.js +3 -3
  55. package/components/island/header.js +1 -1
  56. package/components/list/list.js +8 -12
  57. package/components/list/list__item.js +83 -59
  58. package/components/list/list__users-groups-source.js +8 -9
  59. package/components/loader/loader.js +2 -2
  60. package/components/loader/loader__core.js +27 -27
  61. package/components/login-dialog/login-dialog.js +1 -1
  62. package/components/message/message.js +8 -8
  63. package/components/old-browsers-message/white-list.js +1 -1
  64. package/components/pager/pager.js +13 -14
  65. package/components/permissions/permissions.js +7 -7
  66. package/components/permissions/permissions__cache.js +4 -4
  67. package/components/popup/popup.js +8 -8
  68. package/components/popup/position.js +1 -1
  69. package/components/popup-menu/popup-menu.js +7 -8
  70. package/components/progress-bar/progress-bar.js +2 -2
  71. package/components/query-assist/query-assist.js +55 -54
  72. package/components/query-assist/query-assist__suggestions.js +6 -7
  73. package/components/radio/radio__item.js +2 -2
  74. package/components/select/select.js +32 -33
  75. package/components/select/select__filter.js +5 -6
  76. package/components/select/select__popup.js +15 -16
  77. package/components/shortcuts/core.js +1 -1
  78. package/components/slider/slider.js +8 -8
  79. package/components/slider/slider.utils.js +1 -1
  80. package/components/storage/storage__local.js +1 -1
  81. package/components/style.css +1 -1
  82. package/components/tab-trap/tab-trap.js +4 -4
  83. package/components/table/header-cell.js +2 -2
  84. package/components/table/multitable.js +7 -7
  85. package/components/table/row-with-focus-sensor.js +4 -4
  86. package/components/table/row.js +1 -1
  87. package/components/table/selection-shortcuts-hoc.js +12 -12
  88. package/components/table/selection.js +7 -7
  89. package/components/table/table.js +1 -1
  90. package/components/tabs/collapsible-more.js +6 -7
  91. package/components/tabs/collapsible-tab.js +3 -3
  92. package/components/tabs/collapsible-tabs.js +10 -11
  93. package/components/tabs/dumb-tabs.js +4 -5
  94. package/components/tabs/smart-tabs.js +4 -5
  95. package/components/tabs/tabs.js +3 -4
  96. package/components/tag/tag.js +2 -2
  97. package/components/tags-input/tags-input.js +22 -23
  98. package/components/tooltip/tooltip.js +8 -8
  99. package/components/upload/upload.js +3 -3
  100. package/components/user-agreement/service.js +3 -3
  101. package/components/user-agreement/user-agreement.js +8 -8
  102. package/package.json +2 -2
  103. package/components/list/list__link.d.ts +0 -9
  104. package/components/list/list__link.js +0 -52
@@ -46,13 +46,6 @@ import 'react-virtualized/dist/es/AutoSizer';
46
46
  import 'react-virtualized/dist/es/WindowScroller';
47
47
  import 'react-virtualized/dist/es/CellMeasurer';
48
48
  import '../global/create-stateful-context.js';
49
- import '../list/list__link.js';
50
- import '../link/link.js';
51
- import '../link/clickableLink.js';
52
- import '../_helpers/link.js';
53
- import '../list/list__classes.js';
54
- import '../list/consts.js';
55
- import '../_helpers/list.js';
56
49
  import '../list/list__item.js';
57
50
  import '../avatar/avatar.js';
58
51
  import '../global/url.js';
@@ -64,6 +57,12 @@ import '../checkbox/checkbox.js';
64
57
  import '@jetbrains/icons/checkmark-12px';
65
58
  import '@jetbrains/icons/remove-12px';
66
59
  import '../control-help/control-help.js';
60
+ import '../link/link.js';
61
+ import '../link/clickableLink.js';
62
+ import '../_helpers/link.js';
63
+ import '../_helpers/list.js';
64
+ import '../list/consts.js';
65
+ import '../list/list__classes.js';
67
66
  import '../list/list__custom.js';
68
67
  import '../global/get-event-key.js';
69
68
  import '../list/list__title.js';
@@ -99,8 +98,8 @@ class SelectPopup extends PureComponent {
99
98
  });
100
99
  _defineProperty(this, "isClickingPopup", false);
101
100
  // This flag is set to true while an item in the popup is being clicked
102
- _defineProperty(this, "filter", undefined);
103
- _defineProperty(this, "caret", undefined);
101
+ _defineProperty(this, "filter", void 0);
102
+ _defineProperty(this, "caret", void 0);
104
103
  _defineProperty(this, "onFilterFocus", () => {
105
104
  this._togglePopupFilterShortcuts(false);
106
105
  this.setState({
@@ -118,7 +117,7 @@ class SelectPopup extends PureComponent {
118
117
  _defineProperty(this, "mouseUpHandler", () => {
119
118
  this.isClickingPopup = false;
120
119
  });
121
- _defineProperty(this, "popup", undefined);
120
+ _defineProperty(this, "popup", void 0);
122
121
  _defineProperty(this, "onListSelect", (selected, event, opts) => {
123
122
  const getSelectItemEvent = () => {
124
123
  const customEvent = document.createEvent('Event');
@@ -136,7 +135,7 @@ class SelectPopup extends PureComponent {
136
135
  });
137
136
  _defineProperty(this, "onClickHandler", () => {
138
137
  var _this$filter;
139
- return (_this$filter = this.filter) === null || _this$filter === undefined ? undefined : _this$filter.focus();
138
+ return (_this$filter = this.filter) === null || _this$filter === void 0 ? void 0 : _this$filter.focus();
140
139
  });
141
140
  _defineProperty(this, "handleRemoveTag", memoize(tag => event => this.removeTag(tag, event)));
142
141
  _defineProperty(this, "handleTagClick", memoize(tag => () => {
@@ -164,7 +163,7 @@ class SelectPopup extends PureComponent {
164
163
  inline: true,
165
164
  onClick: this.handleSelectAll,
166
165
  children: activeFilters.length !== this.props.selected.length ? multiple.selectAllLabel || 'Select all' : multiple.deselectAllLabel || 'Deselect all'
167
- }), ((_multiple$renderSelec = multiple.renderSelectedItemsDescription) === null || _multiple$renderSelec === undefined ? undefined : _multiple$renderSelec.call(multiple, this.props.selected, activeFilters.length)) || jsx(Text, {
166
+ }), ((_multiple$renderSelec = multiple.renderSelectedItemsDescription) === null || _multiple$renderSelec === void 0 ? void 0 : _multiple$renderSelec.call(multiple, this.props.selected, activeFilters.length)) || jsx(Text, {
168
167
  info: true,
169
168
  children: "".concat(this.props.selected.length, " selected")
170
169
  })]
@@ -190,13 +189,13 @@ class SelectPopup extends PureComponent {
190
189
  const containerNode = getPopupContainer(ringPopupTarget) || document.documentElement;
191
190
  return anchorNode != null ? Math.min(directions.reduce((maxHeight, direction) => {
192
191
  var _maxHeightForDirectio;
193
- return Math.max(maxHeight, (_maxHeightForDirectio = maxHeightForDirection(direction, anchorNode, getStyles(containerNode).position !== 'static' ? containerNode : null)) !== null && _maxHeightForDirectio !== undefined ? _maxHeightForDirectio : 0);
192
+ return Math.max(maxHeight, (_maxHeightForDirectio = maxHeightForDirection(direction, anchorNode, getStyles(containerNode).position !== 'static' ? containerNode : null)) !== null && _maxHeightForDirectio !== void 0 ? _maxHeightForDirectio : 0);
194
193
  }, minMaxHeight), userDefinedMaxHeight) : userDefinedMaxHeight;
195
194
  }));
196
195
  _defineProperty(this, "popupRef", el => {
197
196
  this.popup = el;
198
197
  });
199
- _defineProperty(this, "list", undefined);
198
+ _defineProperty(this, "list", void 0);
200
199
  _defineProperty(this, "listRef", el => {
201
200
  this.list = el;
202
201
  });
@@ -232,7 +231,7 @@ class SelectPopup extends PureComponent {
232
231
  focusFilter() {
233
232
  setTimeout(() => {
234
233
  var _this$filter2;
235
- return (_this$filter2 = this.filter) === null || _this$filter2 === undefined ? undefined : _this$filter2.focus();
234
+ return (_this$filter2 = this.filter) === null || _this$filter2 === void 0 ? void 0 : _this$filter2.focus();
236
235
  });
237
236
  }
238
237
  isEventTargetFilter(event) {
@@ -310,7 +309,7 @@ class SelectPopup extends PureComponent {
310
309
  className: styles.filterWrapper,
311
310
  "data-test": "ring-select-popup-filter",
312
311
  children: [!this.props.tags && jsx(Icon, {
313
- glyph: (_this$props$filterIco = this.props.filterIcon) !== null && _this$props$filterIco !== undefined ? _this$props$filterIco : searchIcon,
312
+ glyph: (_this$props$filterIco = this.props.filterIcon) !== null && _this$props$filterIco !== void 0 ? _this$props$filterIco : searchIcon,
314
313
  className: styles.filterIcon,
315
314
  "data-test-custom": "ring-select-popup-filter-icon"
316
315
  }), jsx(FilterWithShortcuts, {
@@ -174,7 +174,7 @@ class Shortcuts {
174
174
  }
175
175
  hasKey(key, scope) {
176
176
  var _this$_scopes$scope;
177
- return !!((_this$_scopes$scope = this._scopes[scope]) !== null && _this$_scopes$scope !== undefined && _this$_scopes$scope[key]);
177
+ return !!((_this$_scopes$scope = this._scopes[scope]) !== null && _this$_scopes$scope !== void 0 && _this$_scopes$scope[key]);
178
178
  }
179
179
  _getKeyboardEventType(params) {
180
180
  if (!params.type && sniffr.os.name === 'windows') {
@@ -37,10 +37,10 @@ const Slider = _ref => {
37
37
  } = _ref;
38
38
  const ref = useRef(null);
39
39
  const previouslyDragged = useRef(false);
40
- const [values, setValues] = useState(defaultValue !== null && defaultValue !== undefined ? defaultValue : min);
41
- const validValues = useMemo(() => toRange(value !== null && value !== undefined ? value : values, min, max), [max, min, value, values]);
40
+ const [values, setValues] = useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : min);
41
+ const validValues = useMemo(() => toRange(value !== null && value !== void 0 ? value : values, min, max), [max, min, value, values]);
42
42
  const validStep = step < 0 ? 0 : step;
43
- const isRange = isArray(defaultValue !== null && defaultValue !== undefined ? defaultValue : value);
43
+ const isRange = isArray(defaultValue !== null && defaultValue !== void 0 ? defaultValue : value);
44
44
  const [isDragging, setIsDragging] = useState(false);
45
45
  const [draggedIndex, setDraggedIndex] = useState(-1);
46
46
  const [shortcutsScope] = useState(getUID('ring-slider-'));
@@ -64,7 +64,7 @@ const Slider = _ref => {
64
64
  const trackLength = useMemo(() => toPercent(Math.max(...validValues), min, max) - trackStart, [max, min, trackStart, validValues]);
65
65
  const handleValueChange = useCallback(nextValues => {
66
66
  setValues(nextValues);
67
- onChange === null || onChange === undefined || onChange(isRange ? nextValues : nextValues[0]);
67
+ onChange === null || onChange === void 0 || onChange(isRange ? nextValues : nextValues[0]);
68
68
  }, [isRange, onChange]);
69
69
  const shortcutsMap = useMemo(() => {
70
70
  const setValueAndSwap = (nextValue, index) => {
@@ -74,12 +74,12 @@ const Slider = _ref => {
74
74
  var _ref$current;
75
75
  const previousValue = nextValues[index];
76
76
  nextValues.reverse();
77
- const thumb = (_ref$current = ref.current) === null || _ref$current === undefined ? undefined : _ref$current.querySelector("[role=\"slider\"][data-index=\"".concat(nextValues.indexOf(previousValue), "\"]"));
78
- thumb === null || thumb === undefined || thumb.focus();
77
+ const thumb = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.querySelector("[role=\"slider\"][data-index=\"".concat(nextValues.indexOf(previousValue), "\"]"));
78
+ thumb === null || thumb === void 0 || thumb.focus();
79
79
  }
80
80
  handleValueChange(nextValues);
81
81
  };
82
- const getIndex = target => Number(target === null || target === undefined ? undefined : target.getAttribute('data-index'));
82
+ const getIndex = target => Number(target === null || target === void 0 ? void 0 : target.getAttribute('data-index'));
83
83
  const map = {};
84
84
  if (!disabled) {
85
85
  map.left = map.down = _ref2 => {
@@ -242,7 +242,7 @@ const Slider = _ref => {
242
242
  className: classNames(styles.markValue, {
243
243
  [styles.disabled]: disabled
244
244
  }),
245
- children: label !== null && label !== undefined ? label : markValue
245
+ children: label !== null && label !== void 0 ? label : markValue
246
246
  }, index);
247
247
  }), tickMarks.map((_ref9, index) => {
248
248
  let {
@@ -23,7 +23,7 @@ function calculateValue(ref, x, min, max, step) {
23
23
  left
24
24
  } = ref.current.getBoundingClientRect();
25
25
  const value = toValue((x - left) / width, min, max);
26
- const precision = (_step$toString$split = step.toString().split('.')) === null || _step$toString$split === undefined || (_step$toString$split = _step$toString$split[1]) === null || _step$toString$split === undefined ? undefined : _step$toString$split.length;
26
+ const precision = (_step$toString$split = step.toString().split('.')) === null || _step$toString$split === void 0 || (_step$toString$split = _step$toString$split[1]) === null || _step$toString$split === void 0 ? void 0 : _step$toString$split.length;
27
27
  return Number(roundToStep(value, step, min).toFixed(precision));
28
28
  }
29
29
  function validateValue(value, min, max) {
@@ -69,7 +69,7 @@ class LocalStorage {
69
69
  }
70
70
  constructor() {
71
71
  let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
72
- _defineProperty(this, "storageType", undefined);
72
+ _defineProperty(this, "storageType", void 0);
73
73
  this.storageType = config.type === 'session' ? 'sessionStorage' : 'localStorage';
74
74
  }
75
75
  /**