@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
@@ -74,17 +74,17 @@ class AuthStorage {
74
74
  * @param {{stateKeyPrefix: string, tokenKey: string, onTokenRemove: Function}} config
75
75
  */
76
76
  constructor(config) {
77
- _defineProperty(this, "messagePrefix", undefined);
78
- _defineProperty(this, "stateKeyPrefix", undefined);
79
- _defineProperty(this, "tokenKey", undefined);
80
- _defineProperty(this, "userKey", undefined);
81
- _defineProperty(this, "stateTTL", undefined);
82
- _defineProperty(this, "stateQuota", undefined);
83
- _defineProperty(this, "_lastMessage", undefined);
84
- _defineProperty(this, "_stateStorage", undefined);
85
- _defineProperty(this, "_tokenStorage", undefined);
86
- _defineProperty(this, "_messagesStorage", undefined);
87
- _defineProperty(this, "_currentUserStorage", undefined);
77
+ _defineProperty(this, "messagePrefix", void 0);
78
+ _defineProperty(this, "stateKeyPrefix", void 0);
79
+ _defineProperty(this, "tokenKey", void 0);
80
+ _defineProperty(this, "userKey", void 0);
81
+ _defineProperty(this, "stateTTL", void 0);
82
+ _defineProperty(this, "stateQuota", void 0);
83
+ _defineProperty(this, "_lastMessage", void 0);
84
+ _defineProperty(this, "_stateStorage", void 0);
85
+ _defineProperty(this, "_tokenStorage", void 0);
86
+ _defineProperty(this, "_messagesStorage", void 0);
87
+ _defineProperty(this, "_currentUserStorage", void 0);
88
88
  this.messagePrefix = config.messagePrefix || '';
89
89
  this.stateKeyPrefix = config.stateKeyPrefix || '';
90
90
  this.tokenKey = config.tokenKey || '';
@@ -177,7 +177,7 @@ class AuthStorage {
177
177
  var _state$created;
178
178
  // Clean old states
179
179
  const state = value;
180
- const created = (_state$created = state.created) !== null && _state$created !== undefined ? _state$created : Date.now();
180
+ const created = (_state$created = state.created) !== null && _state$created !== void 0 ? _state$created : Date.now();
181
181
  if (created + this.stateTTL < now) {
182
182
  return this._stateStorage.remove(key);
183
183
  }
@@ -13,17 +13,17 @@ import 'core-js/modules/es.string.replace.js';
13
13
  class TokenValidationError extends ExtendableError {
14
14
  constructor(message, cause) {
15
15
  super(message);
16
- _defineProperty(this, "cause", undefined);
17
- _defineProperty(this, "authRedirect", undefined);
16
+ _defineProperty(this, "cause", void 0);
17
+ _defineProperty(this, "authRedirect", void 0);
18
18
  this.cause = cause;
19
19
  this.authRedirect = true;
20
20
  }
21
21
  }
22
22
  class TokenValidator {
23
23
  constructor(config, getUser, storage) {
24
- _defineProperty(this, "_getUser", undefined);
25
- _defineProperty(this, "_config", undefined);
26
- _defineProperty(this, "_storage", undefined);
24
+ _defineProperty(this, "_getUser", void 0);
25
+ _defineProperty(this, "_config", void 0);
26
+ _defineProperty(this, "_storage", void 0);
27
27
  this._getUser = getUser;
28
28
  this._config = config;
29
29
  this._storage = storage;
@@ -99,7 +99,7 @@ class TokenValidator {
99
99
  const requiredScopes = optionalScopes ? scope.filter(scopeId => !optionalScopes.includes(scopeId)) : scope;
100
100
  const hasAllScopes = requiredScopes.every(scopeId => {
101
101
  var _storedToken$scopes;
102
- return (_storedToken$scopes = storedToken.scopes) === null || _storedToken$scopes === undefined ? undefined : _storedToken$scopes.includes(scopeId);
102
+ return (_storedToken$scopes = storedToken.scopes) === null || _storedToken$scopes === void 0 ? void 0 : _storedToken$scopes.includes(scopeId);
103
103
  });
104
104
  if (!hasAllScopes) {
105
105
  throw new TokenValidator.TokenValidationError("Token doesn't match required scopes");
@@ -133,7 +133,7 @@ class TokenValidator {
133
133
  if (errorResponse.status === CODE.UNAUTHORIZED || TokenValidator.shouldRefreshToken(response.error)) {
134
134
  var _errorResponse$data, _errorResponse$data2;
135
135
  // Token expired
136
- throw new TokenValidator.TokenValidationError(response.error || errorResponse.message, (_errorResponse$data = errorResponse.data) !== null && _errorResponse$data !== undefined && _errorResponse$data.error ? new Error((_errorResponse$data2 = errorResponse.data) === null || _errorResponse$data2 === undefined ? undefined : _errorResponse$data2.error) : undefined);
136
+ throw new TokenValidator.TokenValidationError(response.error || errorResponse.message, (_errorResponse$data = errorResponse.data) !== null && _errorResponse$data !== void 0 && _errorResponse$data.error ? new Error((_errorResponse$data2 = errorResponse.data) === null || _errorResponse$data2 === void 0 ? void 0 : _errorResponse$data2.error) : undefined);
137
137
  }
138
138
  // Request unexpectedly failed
139
139
  throw errorResponse;
@@ -13,14 +13,14 @@ const CLOSED_CHECK_INTERVAL = 200;
13
13
  class WindowFlow {
14
14
  constructor(requestBuilder, storage) {
15
15
  _defineProperty(this, "_timeoutId", undefined);
16
- _defineProperty(this, "_requestBuilder", undefined);
17
- _defineProperty(this, "_storage", undefined);
18
- _defineProperty(this, "reject", undefined);
19
- _defineProperty(this, "_loginWindow", undefined);
20
- _defineProperty(this, "_promise", undefined);
16
+ _defineProperty(this, "_requestBuilder", void 0);
17
+ _defineProperty(this, "_storage", void 0);
18
+ _defineProperty(this, "reject", void 0);
19
+ _defineProperty(this, "_loginWindow", void 0);
20
+ _defineProperty(this, "_promise", void 0);
21
21
  _defineProperty(this, "checkIsClosed", () => {
22
22
  var _this$_loginWindow;
23
- if ((_this$_loginWindow = this._loginWindow) !== null && _this$_loginWindow !== undefined && _this$_loginWindow.closed) {
23
+ if ((_this$_loginWindow = this._loginWindow) !== null && _this$_loginWindow !== void 0 && _this$_loginWindow.closed) {
24
24
  this.stop();
25
25
  return;
26
26
  }
@@ -73,7 +73,7 @@ class WindowFlow {
73
73
  removeStateListener();
74
74
  removeTokenListener();
75
75
  /* eslint-enable @typescript-eslint/no-use-before-define */
76
- (_this$_loginWindow2 = this._loginWindow) === null || _this$_loginWindow2 === undefined || _this$_loginWindow2.close();
76
+ (_this$_loginWindow2 = this._loginWindow) === null || _this$_loginWindow2 === void 0 || _this$_loginWindow2.close();
77
77
  clearTimeout(this._timeoutId);
78
78
  };
79
79
  const removeTokenListener = this._storage.onTokenChange(token => {
@@ -111,7 +111,7 @@ class AuthDialog extends Component {
111
111
  retrying
112
112
  } = this.state;
113
113
  const defaultTitle = serviceName ? loginToCaption : loginCaption;
114
- const title = (this.props.title || defaultTitle).replace('%serviceName%', serviceName !== null && serviceName !== undefined ? serviceName : '').replace('{{serviceName}}', serviceName !== null && serviceName !== undefined ? serviceName : '');
114
+ const title = (this.props.title || defaultTitle).replace('%serviceName%', serviceName !== null && serviceName !== void 0 ? serviceName : '').replace('{{serviceName}}', serviceName !== null && serviceName !== void 0 ? serviceName : '');
115
115
  return jsx(Dialog, {
116
116
  label: title,
117
117
  "data-test": "ring-auth-dialog",
@@ -32,13 +32,6 @@ import 'combokeys';
32
32
  import '../global/sniffer.js';
33
33
  import 'sniffr';
34
34
  import '../global/create-stateful-context.js';
35
- import '../list/list__link.js';
36
- import '../link/link.js';
37
- import '../link/clickableLink.js';
38
- import '../_helpers/link.js';
39
- import '../list/list__classes.js';
40
- import '../list/consts.js';
41
- import '../_helpers/list.js';
42
35
  import '../list/list__item.js';
43
36
  import '../checkbox/checkbox.js';
44
37
  import '@jetbrains/icons/checkmark-12px';
@@ -50,6 +43,12 @@ import 'core-js/modules/es.string.replace.js';
50
43
  import 'core-js/modules/es.string.starts-with.js';
51
44
  import '../global/composeRefs.js';
52
45
  import '../control-help/control-help.js';
46
+ import '../link/link.js';
47
+ import '../link/clickableLink.js';
48
+ import '../_helpers/link.js';
49
+ import '../_helpers/list.js';
50
+ import '../list/consts.js';
51
+ import '../list/list__classes.js';
53
52
  import '../global/url.js';
54
53
  import '../_helpers/avatar-info.js';
55
54
  import '../avatar/fallback-avatar.js';
@@ -100,7 +99,7 @@ function AvatarStack(_ref) {
100
99
  '--ring-avatar-stack-index': index
101
100
  },
102
101
  children: child
103
- })), extraItems !== null && extraItems !== undefined && extraItems.length ? jsx(DropdownMenu, _objectSpread2({
102
+ })), extraItems !== null && extraItems !== void 0 && extraItems.length ? jsx(DropdownMenu, _objectSpread2({
104
103
  hoverMode: true,
105
104
  hoverShowTimeOut: 10,
106
105
  onShow: () => setDropdownOpen(true),
@@ -119,7 +118,7 @@ function AvatarStack(_ref) {
119
118
  data: extraItems,
120
119
  menuProps: _objectSpread2({
121
120
  offset: 4
122
- }, dropdownMenuProps === null || dropdownMenuProps === undefined ? undefined : dropdownMenuProps.menuProps)
121
+ }, dropdownMenuProps === null || dropdownMenuProps === void 0 ? void 0 : dropdownMenuProps.menuProps)
123
122
  }, dropdownMenuProps)) : null]
124
123
  }));
125
124
  }
@@ -59,13 +59,13 @@ class Button extends PureComponent {
59
59
  inline
60
60
  } = _this$props,
61
61
  props = _objectWithoutProperties(_this$props, _excluded);
62
- const isInline = (_ref = inline !== null && inline !== undefined ? inline : text) !== null && _ref !== undefined ? _ref : icon != null;
62
+ const isInline = (_ref = inline !== null && inline !== void 0 ? inline : text) !== null && _ref !== void 0 ? _ref : icon != null;
63
63
  if (text != null) {
64
64
  warnText();
65
65
  }
66
66
  const classes = getButtonClasses(_objectSpread2(_objectSpread2({}, this.props), {}, {
67
67
  inline: isInline,
68
- height: height !== null && height !== undefined ? height : this.context
68
+ height: height !== null && height !== void 0 ? height : this.context
69
69
  }));
70
70
  const content = jsxs(Fragment, {
71
71
  children: [icon && jsx(Icon, {
@@ -22,11 +22,11 @@ class Caret {
22
22
  return typeof value === 'string' ? value.replace(this.returnRE, '') : value;
23
23
  }
24
24
  constructor(target) {
25
- _defineProperty(this, "target", undefined);
25
+ _defineProperty(this, "target", void 0);
26
26
  this.target = target;
27
27
  }
28
28
  isContentEditable() {
29
- return this.target.contentEditable === 'true';
29
+ return this.target.contentEditable === 'true' || this.target.getAttribute('contenteditable') === 'true'; // workaround for https://github.com/jsdom/jsdom/issues/1670
30
30
  }
31
31
  /**
32
32
  * Set focus on target if possible
@@ -46,7 +46,7 @@ class Caret {
46
46
  while (_curNode != null && _curNode !== this.target) {
47
47
  while (_curNode.previousSibling) {
48
48
  var _curNode$previousSibl, _curNode$previousSibl2;
49
- curPos += (_curNode$previousSibl = (_curNode$previousSibl2 = _curNode.previousSibling.textContent) === null || _curNode$previousSibl2 === undefined ? undefined : _curNode$previousSibl2.length) !== null && _curNode$previousSibl !== undefined ? _curNode$previousSibl : 0;
49
+ curPos += (_curNode$previousSibl = (_curNode$previousSibl2 = _curNode.previousSibling.textContent) === null || _curNode$previousSibl2 === void 0 ? void 0 : _curNode$previousSibl2.length) !== null && _curNode$previousSibl !== void 0 ? _curNode$previousSibl : 0;
50
50
  _curNode = _curNode.previousSibling;
51
51
  }
52
52
  _curNode = _curNode.parentNode;
@@ -66,7 +66,7 @@ class Caret {
66
66
  this.focus();
67
67
  }
68
68
  const selection = window.getSelection();
69
- if (!(selection !== null && selection !== undefined && selection.rangeCount)) {
69
+ if (!(selection !== null && selection !== void 0 && selection.rangeCount)) {
70
70
  return 0;
71
71
  }
72
72
  const range1 = selection.getRangeAt(0);
@@ -137,11 +137,11 @@ class Caret {
137
137
  i++;
138
138
  if (_curNode.childNodes[i] != null) {
139
139
  var _curNode$childNodes$i, _curNode$childNodes$i2;
140
- curPos += (_curNode$childNodes$i = (_curNode$childNodes$i2 = _curNode.childNodes[i].textContent) === null || _curNode$childNodes$i2 === undefined ? undefined : _curNode$childNodes$i2.length) !== null && _curNode$childNodes$i !== undefined ? _curNode$childNodes$i : 0;
140
+ curPos += (_curNode$childNodes$i = (_curNode$childNodes$i2 = _curNode.childNodes[i].textContent) === null || _curNode$childNodes$i2 === void 0 ? void 0 : _curNode$childNodes$i2.length) !== null && _curNode$childNodes$i !== void 0 ? _curNode$childNodes$i : 0;
141
141
  if (curPos >= position) {
142
142
  var _curNode$textContent$, _curNode$textContent;
143
143
  _curNode = _curNode.childNodes[i];
144
- curPos -= (_curNode$textContent$ = (_curNode$textContent = _curNode.textContent) === null || _curNode$textContent === undefined ? undefined : _curNode$textContent.length) !== null && _curNode$textContent$ !== undefined ? _curNode$textContent$ : 0;
144
+ curPos -= (_curNode$textContent$ = (_curNode$textContent = _curNode.textContent) === null || _curNode$textContent === void 0 ? void 0 : _curNode$textContent.length) !== null && _curNode$textContent$ !== void 0 ? _curNode$textContent$ : 0;
145
145
  i = -1;
146
146
  }
147
147
  } else {
@@ -175,7 +175,7 @@ class Caret {
175
175
  } else if (position === -1) {
176
176
  var _value$length;
177
177
  const value = isContentEditable ? this.target.textContent : Caret.normalizeNewlines('value' in this.target ? this.target.value : undefined);
178
- correctedPosition = (_value$length = value === null || value === undefined ? undefined : value.length) !== null && _value$length !== undefined ? _value$length : 0;
178
+ correctedPosition = (_value$length = value === null || value === void 0 ? void 0 : value.length) !== null && _value$length !== void 0 ? _value$length : 0;
179
179
  } else {
180
180
  const {
181
181
  _curNode,
@@ -30,7 +30,7 @@ const _excluded = ["children", "label", "className", "containerClassName", "cont
30
30
  class Checkbox extends PureComponent {
31
31
  constructor() {
32
32
  super(...arguments);
33
- _defineProperty(this, "input", undefined);
33
+ _defineProperty(this, "input", void 0);
34
34
  _defineProperty(this, "inputRef", el => {
35
35
  if (el != null) {
36
36
  el.indeterminate = this.props.indeterminate;
@@ -26,12 +26,12 @@ function copyHTMLToClipboard(str) {
26
26
  const selection = document.getSelection();
27
27
  // Should restore previous selection
28
28
  const selected = selection && selection.rangeCount > 0 ? selection.getRangeAt(0) : false;
29
- selection === null || selection === undefined || selection.removeAllRanges();
29
+ selection === null || selection === void 0 || selection.removeAllRanges();
30
30
  const range = document.createRange();
31
31
  range.selectNode(el);
32
- selection === null || selection === undefined || selection.addRange(range);
32
+ selection === null || selection === void 0 || selection.addRange(range);
33
33
  document.execCommand('copy');
34
- selection === null || selection === undefined || selection.removeAllRanges();
34
+ selection === null || selection === void 0 || selection.removeAllRanges();
35
35
  document.execCommand('copy');
36
36
  document.body.removeChild(el);
37
37
  if (selected && selection) {
@@ -29,7 +29,7 @@ const registerLanguage = memoize(async language => {
29
29
  class Code extends PureComponent {
30
30
  constructor() {
31
31
  super(...arguments);
32
- _defineProperty(this, "code", undefined);
32
+ _defineProperty(this, "code", void 0);
33
33
  }
34
34
  componentDidMount() {
35
35
  this.highlight();
@@ -51,9 +51,9 @@ const CollapseContent = _ref => {
51
51
  }
52
52
  }
53
53
  const container = containerRef.current;
54
- container === null || container === undefined || container.addEventListener('transitionend', onTransitionEnd);
54
+ container === null || container === void 0 || container.addEventListener('transitionend', onTransitionEnd);
55
55
  return () => {
56
- container === null || container === undefined || container.removeEventListener('transitionend', onTransitionEnd);
56
+ container === null || container === void 0 || container.removeEventListener('transitionend', onTransitionEnd);
57
57
  };
58
58
  }, [collapsed]);
59
59
  useEffect(() => {
@@ -19,7 +19,7 @@ const Collapse = _ref => {
19
19
  } = _ref;
20
20
  const [innerCollapsed, setInnerCollapsed] = useState(defaultCollapsed);
21
21
  const id = useId();
22
- const finalCollapsedValue = useMemo(() => collapsed !== null && collapsed !== undefined ? collapsed : innerCollapsed, [innerCollapsed, collapsed]);
22
+ const finalCollapsedValue = useMemo(() => collapsed !== null && collapsed !== void 0 ? collapsed : innerCollapsed, [innerCollapsed, collapsed]);
23
23
  const setCollapsed = useCallback(() => {
24
24
  setInnerCollapsed(!finalCollapsedValue);
25
25
  onChange(!finalCollapsedValue);
@@ -84,10 +84,10 @@ class DataList extends PureComponent {
84
84
  const item = itemFormatter(focused);
85
85
  if (item.collapsed) {
86
86
  var _item$onExpand;
87
- (_item$onExpand = item.onExpand) === null || _item$onExpand === undefined || _item$onExpand.call(item);
87
+ (_item$onExpand = item.onExpand) === null || _item$onExpand === void 0 || _item$onExpand.call(item);
88
88
  } else {
89
89
  var _item$onCollapse;
90
- (_item$onCollapse = item.onCollapse) === null || _item$onCollapse === undefined || _item$onCollapse.call(item);
90
+ (_item$onCollapse = item.onCollapse) === null || _item$onCollapse === void 0 || _item$onCollapse.call(item);
91
91
  }
92
92
  });
93
93
  _defineProperty(this, "shortcutsMap", {
@@ -145,7 +145,7 @@ class DataList extends PureComponent {
145
145
  title,
146
146
  items
147
147
  } = item;
148
- const showMoreLessButton = (_this$props$itemMoreL = (_this$props = this.props).itemMoreLessState) === null || _this$props$itemMoreL === undefined ? undefined : _this$props$itemMoreL.call(_this$props, item);
148
+ const showMoreLessButton = (_this$props$itemMoreL = (_this$props = this.props).itemMoreLessState) === null || _this$props$itemMoreL === void 0 ? void 0 : _this$props$itemMoreL.call(_this$props, item);
149
149
  return jsx(Item, {
150
150
  item: model,
151
151
  title: title,
@@ -165,7 +165,7 @@ class Item extends PureComponent {
165
165
  });
166
166
  }
167
167
  }
168
- const itemIsEmpty = !(items !== null && items !== undefined && items.length) || collapsible && collapsed;
168
+ const itemIsEmpty = !(items !== null && items !== void 0 && items.length) || collapsible && collapsed;
169
169
  const offset = level * LIST_LEFT_OFFSET + ITEM_LEFT_OFFSET + parentShift;
170
170
  return jsxs("li", {
171
171
  children: [jsx(Title, {
@@ -45,7 +45,7 @@ function shiftWeekArray(arr, startOfWeek) {
45
45
  }
46
46
  function getWeekStartsOn(locale) {
47
47
  var _locale$options$weekS, _locale$options;
48
- return (_locale$options$weekS = locale === null || locale === undefined || (_locale$options = locale.options) === null || _locale$options === undefined ? undefined : _locale$options.weekStartsOn) !== null && _locale$options$weekS !== undefined ? _locale$options$weekS : weekdays.MO;
48
+ return (_locale$options$weekS = locale === null || locale === void 0 || (_locale$options = locale.options) === null || _locale$options === void 0 ? void 0 : _locale$options.weekStartsOn) !== null && _locale$options$weekS !== void 0 ? _locale$options$weekS : weekdays.MO;
49
49
  }
50
50
  function getDayNumInWeek(locale, day) {
51
51
  const weekDays = shiftWeekArray(Object.values(weekdays), getWeekStartsOn(locale));
@@ -33,7 +33,7 @@ import '../i18n/i18n.js';
33
33
  class DateInput extends React.PureComponent {
34
34
  constructor() {
35
35
  super(...arguments);
36
- _defineProperty(this, "input", undefined);
36
+ _defineProperty(this, "input", void 0);
37
37
  _defineProperty(this, "inputRef", el => {
38
38
  this.input = el;
39
39
  });
@@ -116,13 +116,13 @@ class DateInput extends React.PureComponent {
116
116
  const placeholder = ((_translations$addFirs, _translations$addSeco, _translations$addTime, _translations$selectN) => {
117
117
  switch (name) {
118
118
  case 'from':
119
- return fromPlaceholder || ((_translations$addFirs = translations === null || translations === undefined ? undefined : translations.addFirstDate) !== null && _translations$addFirs !== undefined ? _translations$addFirs : translate('addFirstDate'));
119
+ return fromPlaceholder || ((_translations$addFirs = translations === null || translations === void 0 ? void 0 : translations.addFirstDate) !== null && _translations$addFirs !== void 0 ? _translations$addFirs : translate('addFirstDate'));
120
120
  case 'to':
121
- return toPlaceholder || ((_translations$addSeco = translations === null || translations === undefined ? undefined : translations.addSecondDate) !== null && _translations$addSeco !== undefined ? _translations$addSeco : translate('addSecondDate'));
121
+ return toPlaceholder || ((_translations$addSeco = translations === null || translations === void 0 ? void 0 : translations.addSecondDate) !== null && _translations$addSeco !== void 0 ? _translations$addSeco : translate('addSecondDate'));
122
122
  case 'time':
123
- return timePlaceholder || ((_translations$addTime = translations === null || translations === undefined ? undefined : translations.addTime) !== null && _translations$addTime !== undefined ? _translations$addTime : translate('addTime'));
123
+ return timePlaceholder || ((_translations$addTime = translations === null || translations === void 0 ? void 0 : translations.addTime) !== null && _translations$addTime !== void 0 ? _translations$addTime : translate('addTime'));
124
124
  default:
125
- return ((_translations$selectN = translations === null || translations === undefined ? undefined : translations.selectName) !== null && _translations$selectN !== undefined ? _translations$selectN : translate('selectName')).replace('%name%', name).replace('{{name}}', name);
125
+ return ((_translations$selectN = translations === null || translations === void 0 ? void 0 : translations.selectName) !== null && _translations$selectN !== void 0 ? _translations$selectN : translate('selectName')).replace('%name%', name).replace('{{name}}', name);
126
126
  }
127
127
  })();
128
128
  const classes = classNames(styles.filter, styles["".concat(name, "Input")], divider && styles["".concat(name, "InputWithDivider")], 'ring-js-shortcuts');
@@ -135,7 +135,7 @@ class DatePicker extends PureComponent {
135
135
  withTime,
136
136
  applyTimeInput
137
137
  } = this.props;
138
- const adjustedChange = withTime && !(change instanceof Date) && (change === null || change === undefined ? undefined : change.date) != null ? applyTimeInput(change.date, change.time) : change;
138
+ const adjustedChange = withTime && !(change instanceof Date) && (change === null || change === void 0 ? void 0 : change.date) != null ? applyTimeInput(change.date, change.time) : change;
139
139
  onChange(adjustedChange);
140
140
  });
141
141
  _defineProperty(this, "clear", () => {
@@ -148,13 +148,13 @@ class DatePicker extends PureComponent {
148
148
  }
149
149
  this.handleChange(change);
150
150
  });
151
- _defineProperty(this, "popup", undefined);
151
+ _defineProperty(this, "popup", void 0);
152
152
  _defineProperty(this, "popupRef", el => {
153
153
  this.popup = el;
154
154
  });
155
155
  _defineProperty(this, "closePopup", () => {
156
156
  var _this$popup;
157
- (_this$popup = this.popup) === null || _this$popup === undefined || _this$popup._onCloseAttempt();
157
+ (_this$popup = this.popup) === null || _this$popup === void 0 || _this$popup._onCloseAttempt();
158
158
  });
159
159
  _defineProperty(this, "parse", memoize(date => {
160
160
  const {
@@ -190,11 +190,11 @@ class DatePicker extends PureComponent {
190
190
  const time = this.formatTime();
191
191
  if (!range && !withTime) {
192
192
  var _ref2;
193
- return date ? displayFormat(date, locale) : (_ref2 = datePlaceholder !== null && datePlaceholder !== undefined ? datePlaceholder : translations === null || translations === undefined ? undefined : translations.setDate) !== null && _ref2 !== undefined ? _ref2 : translate('setDate');
193
+ return date ? displayFormat(date, locale) : (_ref2 = datePlaceholder !== null && datePlaceholder !== void 0 ? datePlaceholder : translations === null || translations === void 0 ? void 0 : translations.setDate) !== null && _ref2 !== void 0 ? _ref2 : translate('setDate');
194
194
  } else if (!range && withTime) {
195
195
  if (!date && !time) {
196
196
  var _ref3;
197
- return (_ref3 = dateTimePlaceholder !== null && dateTimePlaceholder !== undefined ? dateTimePlaceholder : translations === null || translations === undefined ? undefined : translations.setDateTime) !== null && _ref3 !== undefined ? _ref3 : translate('setDateTime');
197
+ return (_ref3 = dateTimePlaceholder !== null && dateTimePlaceholder !== void 0 ? dateTimePlaceholder : translations === null || translations === void 0 ? void 0 : translations.setDateTime) !== null && _ref3 !== void 0 ? _ref3 : translate('setDateTime');
198
198
  } else {
199
199
  return "".concat(date && displayFormat(date, locale) || '—', ", ").concat(time || '—');
200
200
  }
@@ -214,7 +214,7 @@ class DatePicker extends PureComponent {
214
214
  return "\u2014 ".concat(displayFormat(to, locale));
215
215
  } else {
216
216
  var _ref4;
217
- return (_ref4 = rangePlaceholder !== null && rangePlaceholder !== undefined ? rangePlaceholder : translations === null || translations === undefined ? undefined : translations.setPeriod) !== null && _ref4 !== undefined ? _ref4 : translate('setPeriod');
217
+ return (_ref4 = rangePlaceholder !== null && rangePlaceholder !== void 0 ? rangePlaceholder : translations === null || translations === void 0 ? void 0 : translations.setPeriod) !== null && _ref4 !== void 0 ? _ref4 : translate('setPeriod');
218
218
  }
219
219
  });
220
220
  }
@@ -261,14 +261,14 @@ class DatePicker extends PureComponent {
261
261
  anchor: inline ? jsx(Link, {
262
262
  "data-test-ring-dropdown-anchor": true,
263
263
  className: styles.anchor,
264
- disabled: (_this$props$disabled = this.props.disabled) !== null && _this$props$disabled !== undefined ? _this$props$disabled : false,
264
+ disabled: (_this$props$disabled = this.props.disabled) !== null && _this$props$disabled !== void 0 ? _this$props$disabled : false,
265
265
  pseudo: true,
266
266
  children: this.getAnchorText()
267
267
  }) : jsx(Button, _objectSpread2(_objectSpread2({
268
268
  "data-test-ring-dropdown-anchor": true,
269
269
  className: styles.anchor,
270
270
  inline: false,
271
- disabled: (_this$props$disabled2 = this.props.disabled) !== null && _this$props$disabled2 !== undefined ? _this$props$disabled2 : false
271
+ disabled: (_this$props$disabled2 = this.props.disabled) !== null && _this$props$disabled2 !== void 0 ? _this$props$disabled2 : false
272
272
  }, this.props.buttonAttributes), {}, {
273
273
  children: anchorContent
274
274
  }))
@@ -315,7 +315,7 @@ _defineProperty(DatePicker, "defaultProps", {
315
315
  onChange() {},
316
316
  applyTimeInput(date, timeString) {
317
317
  var _timeString$split$map;
318
- const [hours, minutes] = (_timeString$split$map = timeString === null || timeString === undefined ? undefined : timeString.split(':').map(Number)) !== null && _timeString$split$map !== undefined ? _timeString$split$map : [];
318
+ const [hours, minutes] = (_timeString$split$map = timeString === null || timeString === void 0 ? void 0 : timeString.split(':').map(Number)) !== null && _timeString$split$map !== void 0 ? _timeString$split$map : [];
319
319
  return minutes != null ? set(date, {
320
320
  hours,
321
321
  minutes
@@ -81,8 +81,8 @@ class DatePopup extends Component {
81
81
  }
82
82
  constructor(props) {
83
83
  super(props);
84
- _defineProperty(this, "_scrollDate", undefined);
85
- _defineProperty(this, "_scrollTS", undefined);
84
+ _defineProperty(this, "_scrollDate", void 0);
85
+ _defineProperty(this, "_scrollTS", void 0);
86
86
  _defineProperty(this, "isInTimeMode", () => !this.props.range && this.props.withTime || false);
87
87
  _defineProperty(this, "componentRef", /*#__PURE__*/React.createRef());
88
88
  _defineProperty(this, "handleWheel", e => {
@@ -172,8 +172,8 @@ class DatePopup extends Component {
172
172
  };
173
173
  }
174
174
  this.select(changes);
175
- (_this$props$onClear = (_this$props = this.props).onClear) === null || _this$props$onClear === undefined || _this$props$onClear.call(_this$props, e);
176
- (_this$componentRef$cu = this.componentRef.current) === null || _this$componentRef$cu === undefined || (_this$componentRef$cu = _this$componentRef$cu.querySelector('input')) === null || _this$componentRef$cu === undefined || _this$componentRef$cu.focus();
175
+ (_this$props$onClear = (_this$props = this.props).onClear) === null || _this$props$onClear === void 0 || _this$props$onClear.call(_this$props, e);
176
+ (_this$componentRef$cu = this.componentRef.current) === null || _this$componentRef$cu === void 0 || (_this$componentRef$cu = _this$componentRef$cu.querySelector('input')) === null || _this$componentRef$cu === void 0 || _this$componentRef$cu.focus();
177
177
  });
178
178
  const defaultState = {
179
179
  text: null,
@@ -30,7 +30,7 @@ class Years extends PureComponent {
30
30
  _defineProperty(this, "state", {
31
31
  scrollDate: null
32
32
  });
33
- _defineProperty(this, "stoppedScrolling", undefined);
33
+ _defineProperty(this, "stoppedScrolling", void 0);
34
34
  _defineProperty(this, "componentRef", /*#__PURE__*/createRef());
35
35
  _defineProperty(this, "handleWheel", e => {
36
36
  const {
@@ -82,7 +82,7 @@ class Dialog extends PureComponent {
82
82
  esc: onEscape
83
83
  };
84
84
  });
85
- _defineProperty(this, "dialog", undefined);
85
+ _defineProperty(this, "dialog", void 0);
86
86
  _defineProperty(this, "dialogRef", tabTrap => {
87
87
  this.dialog = tabTrap && tabTrap.node;
88
88
  });
@@ -64,14 +64,14 @@ class Dropdown extends Component {
64
64
  }
65
65
  this._toggle(false, nextPinned);
66
66
  });
67
- _defineProperty(this, "hoverTimer", undefined);
67
+ _defineProperty(this, "hoverTimer", void 0);
68
68
  _defineProperty(this, "onMouseEnter", event => {
69
69
  var _this$props$onMouseEn, _this$props;
70
70
  if (this.props.disabled) {
71
71
  return;
72
72
  }
73
73
  this._clearTimer();
74
- (_this$props$onMouseEn = (_this$props = this.props).onMouseEnter) === null || _this$props$onMouseEn === undefined || _this$props$onMouseEn.call(_this$props, event);
74
+ (_this$props$onMouseEn = (_this$props = this.props).onMouseEnter) === null || _this$props$onMouseEn === void 0 || _this$props$onMouseEn.call(_this$props, event);
75
75
  this.hoverTimer = window.setTimeout(() => {
76
76
  if (!this.state.show) {
77
77
  this._toggle(true);
@@ -83,7 +83,7 @@ class Dropdown extends Component {
83
83
  if (this.props.disabled) {
84
84
  return;
85
85
  }
86
- (_this$props$onMouseLe = (_this$props2 = this.props).onMouseLeave) === null || _this$props$onMouseLe === undefined || _this$props$onMouseLe.call(_this$props2, event);
86
+ (_this$props$onMouseLe = (_this$props2 = this.props).onMouseLeave) === null || _this$props$onMouseLe === void 0 || _this$props$onMouseLe.call(_this$props2, event);
87
87
  if (this.state.pinned) {
88
88
  return;
89
89
  }
@@ -145,7 +145,7 @@ class Dropdown extends Component {
145
145
  } = _this$props3,
146
146
  restProps = _objectWithoutProperties(_this$props3, _excluded);
147
147
  const classes = classNames(styles.dropdown, className, {
148
- [activeClassName !== null && activeClassName !== undefined ? activeClassName : '']: activeClassName != null && show
148
+ [activeClassName !== null && activeClassName !== void 0 ? activeClassName : '']: activeClassName != null && show
149
149
  });
150
150
  let anchorElement;
151
151
  const active = hoverMode ? pinned : show;
@@ -32,13 +32,6 @@ import 'combokeys';
32
32
  import '../global/sniffer.js';
33
33
  import 'sniffr';
34
34
  import '../global/create-stateful-context.js';
35
- import '../list/list__link.js';
36
- import '../link/link.js';
37
- import '../link/clickableLink.js';
38
- import '../_helpers/link.js';
39
- import '../list/list__classes.js';
40
- import '../list/consts.js';
41
- import '../_helpers/list.js';
42
35
  import '../list/list__item.js';
43
36
  import '../avatar/avatar.js';
44
37
  import '../global/url.js';
@@ -56,6 +49,12 @@ import '../_helpers/icon__svg.js';
56
49
  import 'core-js/modules/es.string.starts-with.js';
57
50
  import '../global/composeRefs.js';
58
51
  import '../control-help/control-help.js';
52
+ import '../link/link.js';
53
+ import '../link/clickableLink.js';
54
+ import '../_helpers/link.js';
55
+ import '../_helpers/list.js';
56
+ import '../list/consts.js';
57
+ import '../list/list__classes.js';
59
58
  import '../list/list__custom.js';
60
59
  import '../global/get-event-key.js';
61
60
  import '../list/list__title.js';
@@ -153,20 +153,20 @@ const EditableHeading = props => {
153
153
  setIsInFocus(true);
154
154
  checkValue(e.target);
155
155
  checkOverflow(e.target);
156
- onFocus === null || onFocus === undefined || onFocus(e);
156
+ onFocus === null || onFocus === void 0 || onFocus(e);
157
157
  }, [onFocus, checkOverflow, checkValue]);
158
158
  const onInputChange = React.useCallback(e => {
159
159
  checkValue(e.target);
160
160
  checkOverflow(e.target);
161
- onChange === null || onChange === undefined || onChange(e);
161
+ onChange === null || onChange === void 0 || onChange(e);
162
162
  }, [onChange, checkOverflow, checkValue]);
163
163
  const onInputScroll = React.useCallback(e => {
164
164
  checkOverflow(e.target);
165
- onScroll === null || onScroll === undefined || onScroll(e);
165
+ onScroll === null || onScroll === void 0 || onScroll(e);
166
166
  }, [onScroll, checkOverflow]);
167
167
  const onInputBlur = React.useCallback(e => {
168
168
  setIsInFocus(false);
169
- onBlur === null || onBlur === undefined || onBlur(e);
169
+ onBlur === null || onBlur === void 0 || onBlur(e);
170
170
  }, [onBlur]);
171
171
  useEffect(() => {
172
172
  window.addEventListener('mousemove', onMouseMove);