@jetbrains/ring-ui-built 6.0.5-beta.0 → 6.0.7-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/README.md +10 -6
  2. package/components/_helpers/input.js +2 -2
  3. package/components/_helpers/select__filter.js +1 -1
  4. package/components/alert/alert.js +2 -0
  5. package/components/alert-service/alert-service.js +2 -0
  6. package/components/analytics/analytics__custom-plugin.js +1 -2
  7. package/components/auth/auth.js +3 -0
  8. package/components/auth/auth__core.js +38 -35
  9. package/components/auth/background-flow.js +3 -2
  10. package/components/auth/down-notification.js +2 -0
  11. package/components/auth/iframe-flow.js +7 -3
  12. package/components/auth/request-builder.d.ts +1 -0
  13. package/components/auth/request-builder.js +4 -1
  14. package/components/auth/response-parser.js +1 -0
  15. package/components/auth/storage.js +11 -4
  16. package/components/auth/token-validator.js +5 -3
  17. package/components/auth/window-flow.js +4 -3
  18. package/components/auth-dialog/auth-dialog.js +2 -0
  19. package/components/auth-dialog-service/auth-dialog-service.js +2 -0
  20. package/components/avatar/avatar.js +3 -0
  21. package/components/avatar/fallback-avatar.js +1 -0
  22. package/components/caret/caret.js +5 -4
  23. package/components/clipboard/clipboard-fallback.js +3 -3
  24. package/components/clipboard/clipboard.js +2 -0
  25. package/components/code/code.d.ts +1 -0
  26. package/components/code/code.js +0 -1
  27. package/components/confirm/confirm.js +2 -0
  28. package/components/confirm-service/confirm-service.js +2 -0
  29. package/components/data-list/data-list.js +7 -2
  30. package/components/data-list/item.js +1 -0
  31. package/components/data-list/selection.js +2 -0
  32. package/components/date-picker/date-picker.js +3 -1
  33. package/components/date-picker/date-popup.js +2 -2
  34. package/components/dialog/dialog.js +2 -0
  35. package/components/dropdown/dropdown.js +2 -2
  36. package/components/dropdown-menu/dropdown-menu.js +5 -0
  37. package/components/editable-heading/editable-heading.d.ts +1 -1
  38. package/components/editable-heading/editable-heading.js +68 -37
  39. package/components/error-bubble/error-bubble.js +2 -0
  40. package/components/global/dom.js +1 -0
  41. package/components/global/focus-sensor-hoc.js +6 -6
  42. package/components/global/normalize-indent.js +0 -1
  43. package/components/global/react-dom-renderer.js +1 -0
  44. package/components/global/schedule-raf.js +1 -1
  45. package/components/global/theme.js +2 -0
  46. package/components/global/url.js +1 -0
  47. package/components/grid/col.js +0 -1
  48. package/components/grid/grid.js +0 -1
  49. package/components/grid/row.js +7 -2
  50. package/components/header/header.js +5 -0
  51. package/components/header/profile.js +6 -0
  52. package/components/header/services.js +2 -0
  53. package/components/header/smart-profile.js +5 -0
  54. package/components/header/smart-services.js +5 -2
  55. package/components/http/http.js +1 -0
  56. package/components/http/http.mock.js +1 -0
  57. package/components/hub-source/hub-source.js +2 -0
  58. package/components/hub-source/hub-source__user.js +1 -0
  59. package/components/hub-source/hub-source__users-groups.js +2 -0
  60. package/components/island/content.js +1 -1
  61. package/components/island/header.js +1 -0
  62. package/components/list/list.d.ts +0 -1
  63. package/components/list/list.js +10 -3
  64. package/components/list/list__item.js +3 -0
  65. package/components/list/list__users-groups-source.js +5 -0
  66. package/components/loader/loader.js +3 -1
  67. package/components/loader/loader__core.js +21 -7
  68. package/components/loader-screen/loader-screen.js +2 -0
  69. package/components/login-dialog/login-dialog.js +4 -0
  70. package/components/login-dialog/service.js +4 -0
  71. package/components/message/message.js +2 -0
  72. package/components/old-browsers-message/white-list.js +2 -2
  73. package/components/pager/pager.js +9 -4
  74. package/components/permissions/permissions.js +1 -0
  75. package/components/popup/popup.js +5 -0
  76. package/components/popup/position.js +1 -0
  77. package/components/popup-menu/popup-menu.js +5 -0
  78. package/components/progress-bar/progress-bar.d.ts +6 -0
  79. package/components/progress-bar/progress-bar.js +11 -4
  80. package/components/query-assist/query-assist.js +18 -12
  81. package/components/query-assist/query-assist__suggestions.js +5 -0
  82. package/components/select/select.js +27 -2
  83. package/components/select/select__filter.js +5 -0
  84. package/components/select/select__popup.js +5 -0
  85. package/components/shortcuts/core.js +2 -0
  86. package/components/shortcuts/shortcuts-hoc.js +2 -0
  87. package/components/shortcuts/shortcuts.js +2 -0
  88. package/components/storage/storage.js +3 -0
  89. package/components/storage/storage__fallback.js +5 -2
  90. package/components/storage/storage__local.js +2 -0
  91. package/components/style.css +1 -1
  92. package/components/tab-trap/tab-trap.js +2 -1
  93. package/components/table/multitable.js +8 -7
  94. package/components/table/row-with-focus-sensor.js +6 -4
  95. package/components/table/row.js +2 -0
  96. package/components/table/selection-shortcuts-hoc.js +12 -11
  97. package/components/table/selection.js +1 -0
  98. package/components/table/smart-table.js +4 -0
  99. package/components/table/table.js +4 -0
  100. package/components/tabs/collapsible-more.js +5 -0
  101. package/components/tabs/collapsible-tabs.js +5 -0
  102. package/components/tabs/dumb-tabs.js +5 -0
  103. package/components/tabs/smart-tabs.js +5 -0
  104. package/components/tabs/tabs.js +5 -0
  105. package/components/tag/tag.js +1 -1
  106. package/components/tags-input/tags-input.js +12 -7
  107. package/components/tooltip/tooltip.js +4 -2
  108. package/components/user-agreement/service.js +3 -0
  109. package/components/user-agreement/user-agreement.js +2 -0
  110. package/components/user-card/card.js +4 -0
  111. package/components/user-card/smart-user-card-tooltip.js +4 -0
  112. package/components/user-card/tooltip.js +4 -0
  113. package/components/user-card/user-card.js +4 -0
  114. package/package.json +4 -13
  115. package/typings.d.ts +0 -54
  116. package/babel.config.js +0 -25
  117. package/jslint-xml.js +0 -38
  118. package/postcss.config.js +0 -20
  119. package/webpack.config.js +0 -118
@@ -24,6 +24,7 @@ import 'react-dom';
24
24
  import '../global/get-uid.js';
25
25
  import '../global/schedule-raf.js';
26
26
  import '../global/dom.js';
27
+ import 'core-js/modules/es.object.assign.js';
27
28
  import 'core-js/modules/es.array.filter.js';
28
29
  import 'core-js/modules/es.string.split.js';
29
30
  import 'core-js/modules/es.array.iterator.js';
@@ -35,6 +36,7 @@ import '../shortcuts/core.js';
35
36
  import 'core-js/modules/es.array.slice.js';
36
37
  import 'core-js/modules/es.array.splice.js';
37
38
  import 'core-js/modules/es.string.match.js';
39
+ import 'core-js/modules/es.array.find-index.js';
38
40
  import 'combokeys';
39
41
  import '../global/sniffer.js';
40
42
  import 'sniffr';
@@ -11,11 +11,11 @@ var MAJOR_VERSION_INDEX = 0;
11
11
  /**
12
12
  * SUPPORTED_BROWSERS are defined by Babel plugin, see babel config
13
13
  */
14
- if (!["and_chr 119", "chrome 118", "chrome 117", "chrome 116", "chrome 109", "edge 118", "edge 117", "firefox 118", "ios_saf 17.0", "ios_saf 16.6-16.7", "op_mob 73", "opera 102", "safari 16.6", "samsung 22"]) {
14
+ if (!["and_chr 119", "chrome 119", "chrome 118", "chrome 109", "edge 119", "firefox 119", "ios_saf 17.1", "ios_saf 17.0", "ios_saf 16.6-16.7", "op_mob 73", "safari 16.6", "samsung 23"]) {
15
15
  // eslint-disable-next-line no-console
16
16
  console.warn('Ring UI: no SUPPORTED_BROWSERS passed. Please check babel config.');
17
17
  }
18
- var SUPPORTED = ["and_chr 119", "chrome 118", "chrome 117", "chrome 116", "chrome 109", "edge 118", "edge 117", "firefox 118", "ios_saf 17.0", "ios_saf 16.6-16.7", "op_mob 73", "opera 102", "safari 16.6", "samsung 22"] || [];
18
+ var SUPPORTED = ["and_chr 119", "chrome 119", "chrome 118", "chrome 109", "edge 119", "firefox 119", "ios_saf 17.1", "ios_saf 17.0", "ios_saf 16.6-16.7", "op_mob 73", "safari 16.6", "samsung 23"] || [];
19
19
  var WHITE_LISTED_BROWSERS = ['chrome', 'firefox', 'safari', 'edge'];
20
20
  var WHITE_LIST = SUPPORTED.reduce(function (acc, item) {
21
21
  var _item$match;
@@ -1,6 +1,7 @@
1
1
  import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, k as _assertThisInitialized, d as _createClass, f as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import 'core-js/modules/es.array.concat.js';
3
3
  import 'core-js/modules/es.array.map.js';
4
+ import 'core-js/modules/es.array.find.js';
4
5
  import 'core-js/modules/es.object.to-string.js';
5
6
  import React, { PureComponent } from 'react';
6
7
  import PropTypes from 'prop-types';
@@ -34,10 +35,12 @@ import '../global/data-tests.js';
34
35
  import 'core-js/modules/es.array.reduce.js';
35
36
  import 'core-js/modules/es.object.entries.js';
36
37
  import '../_helpers/caption.js';
38
+ import 'core-js/modules/es.array.index-of.js';
37
39
  import 'core-js/modules/es.string.trim.js';
38
40
  import 'core-js/modules/es.array.filter.js';
39
41
  import 'core-js/modules/web.dom-collections.for-each.js';
40
42
  import 'core-js/modules/es.array.slice.js';
43
+ import 'core-js/modules/es.object.assign.js';
41
44
  import 'core-js/modules/es.object.values.js';
42
45
  import '@jetbrains/icons/chevron-down';
43
46
  import '@jetbrains/icons/close-12px';
@@ -51,6 +54,7 @@ import 'core-js/modules/es.string.match.js';
51
54
  import '../global/dom.js';
52
55
  import 'core-js/modules/es.set.js';
53
56
  import '../avatar/fallback-avatar.js';
57
+ import 'core-js/modules/es.array.from.js';
54
58
  import '../global/get-uid.js';
55
59
  import 'core-js/modules/es.regexp.to-string.js';
56
60
  import '../popup/popup.js';
@@ -61,6 +65,7 @@ import '../shortcuts/core.js';
61
65
  import 'core-js/modules/es.array.includes.js';
62
66
  import 'core-js/modules/es.string.includes.js';
63
67
  import 'core-js/modules/es.array.splice.js';
68
+ import 'core-js/modules/es.array.find-index.js';
64
69
  import 'combokeys';
65
70
  import '../global/sniffer.js';
66
71
  import 'sniffr';
@@ -130,7 +135,7 @@ var Pager = /*#__PURE__*/function (_PureComponent) {
130
135
  if (currentPage !== 1) {
131
136
  var _this$props$onPageCha, _this$props;
132
137
  var prevPage = currentPage - 1;
133
- (_this$props$onPageCha = (_this$props = _this.props).onPageChange) === null || _this$props$onPageCha === void 0 ? void 0 : _this$props$onPageCha.call(_this$props, prevPage);
138
+ (_this$props$onPageCha = (_this$props = _this.props).onPageChange) === null || _this$props$onPageCha === void 0 || _this$props$onPageCha.call(_this$props, prevPage);
134
139
  }
135
140
  });
136
141
  _defineProperty(_assertThisInitialized(_this), "handleNextClick", function () {
@@ -141,7 +146,7 @@ var Pager = /*#__PURE__*/function (_PureComponent) {
141
146
  var total = _this.getTotalPages();
142
147
  if (currentPage !== total) {
143
148
  var _this$props$onPageCha2, _this$props3;
144
- (_this$props$onPageCha2 = (_this$props3 = _this.props).onPageChange) === null || _this$props$onPageCha2 === void 0 ? void 0 : _this$props$onPageCha2.call(_this$props3, nextPage);
149
+ (_this$props$onPageCha2 = (_this$props3 = _this.props).onPageChange) === null || _this$props$onPageCha2 === void 0 || _this$props$onPageCha2.call(_this$props3, nextPage);
145
150
  } else if (_this.props.openTotal) {
146
151
  onLoadPage(nextPage);
147
152
  }
@@ -149,7 +154,7 @@ var Pager = /*#__PURE__*/function (_PureComponent) {
149
154
  _defineProperty(_assertThisInitialized(_this), "handlePageChange", memoize(function (i) {
150
155
  return function (event) {
151
156
  var _this$props$onPageCha3, _this$props4;
152
- (_this$props$onPageCha3 = (_this$props4 = _this.props).onPageChange) === null || _this$props$onPageCha3 === void 0 ? void 0 : _this$props$onPageCha3.call(_this$props4, i, event);
157
+ (_this$props$onPageCha3 = (_this$props4 = _this.props).onPageChange) === null || _this$props$onPageCha3 === void 0 || _this$props$onPageCha3.call(_this$props4, i, event);
153
158
  };
154
159
  }));
155
160
  _defineProperty(_assertThisInitialized(_this), "handleLoadMore", memoize(function (i) {
@@ -303,7 +308,7 @@ var Pager = /*#__PURE__*/function (_PureComponent) {
303
308
  var translate = this.context.translate;
304
309
  if (totalPages < this.props.currentPage) {
305
310
  var _this$props$onPageCha4, _this$props9;
306
- (_this$props$onPageCha4 = (_this$props9 = this.props).onPageChange) === null || _this$props$onPageCha4 === void 0 ? void 0 : _this$props$onPageCha4.call(_this$props9, totalPages);
311
+ (_this$props$onPageCha4 = (_this$props9 = this.props).onPageChange) === null || _this$props$onPageCha4 === void 0 || _this$props$onPageCha4.call(_this$props9, totalPages);
307
312
  }
308
313
  var start = 1;
309
314
  var end = totalPages;
@@ -1,6 +1,7 @@
1
1
  import { _ as _defineProperty, d as _createClass, c as _classCallCheck } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import 'core-js/modules/es.object.to-string.js';
3
3
  import 'core-js/modules/es.promise.js';
4
+ import 'core-js/modules/es.array.index-of.js';
4
5
  import 'core-js/modules/es.array.map.js';
5
6
  import PermissionCache from './permissions__cache.js';
6
7
  import 'core-js/modules/es.array.reduce.js';
@@ -19,6 +19,7 @@ import TabTrap from '../tab-trap/tab-trap.js';
19
19
  import position from './position.js';
20
20
  import { Display, DEFAULT_DIRECTIONS, Directions, Dimension, MinWidth, MaxHeight } from './popup.consts.js';
21
21
  import { PopupTargetContext, PopupTarget } from './popup.target.js';
22
+ import 'core-js/modules/es.object.assign.js';
22
23
  import 'core-js/modules/es.array.filter.js';
23
24
  import 'core-js/modules/es.string.split.js';
24
25
  import 'core-js/modules/es.array.iterator.js';
@@ -31,6 +32,7 @@ import 'core-js/modules/es.string.includes.js';
31
32
  import 'core-js/modules/es.array.slice.js';
32
33
  import 'core-js/modules/es.array.splice.js';
33
34
  import 'core-js/modules/es.string.match.js';
35
+ import 'core-js/modules/es.array.find-index.js';
34
36
  import 'combokeys';
35
37
  import '../global/sniffer.js';
36
38
  import 'sniffr';
@@ -393,8 +395,10 @@ Popup.propTypes = {
393
395
  dontCloseOnAnchorClick: PropTypes.bool,
394
396
  shortcuts: PropTypes.bool,
395
397
  keepMounted: PropTypes.bool,
398
+ // pass this prop to preserve the popup's DOM state while hidden
396
399
  'data-test': PropTypes.string,
397
400
  client: PropTypes.bool,
401
+ // true means that it's never used in SSR
398
402
  directions: PropTypes.arrayOf(PropTypes.string),
399
403
  autoPositioning: PropTypes.bool,
400
404
  autoCorrectTopOverflow: PropTypes.bool,
@@ -404,6 +408,7 @@ Popup.propTypes = {
404
408
  minWidth: PropTypes.number,
405
409
  sidePadding: PropTypes.number,
406
410
  attached: PropTypes.bool,
411
+ // Popup adjacent to an input, without upper border and shadow
407
412
  onMouseDown: PropTypes.func,
408
413
  onMouseUp: PropTypes.func,
409
414
  onMouseOver: PropTypes.func,
@@ -8,6 +8,7 @@ import 'core-js/modules/es.object.to-string.js';
8
8
  import 'core-js/modules/es.array.concat.js';
9
9
  import { getRect, isMounted, getDocumentScrollTop, getDocumentScrollLeft, getWindowHeight } from '../global/dom.js';
10
10
  import { MaxHeight, Dimension, MinWidth, Directions } from './popup.consts.js';
11
+ import 'core-js/modules/es.object.assign.js';
11
12
  import 'core-js/modules/web.dom-collections.for-each.js';
12
13
  import 'core-js/modules/es.regexp.exec.js';
13
14
  import 'core-js/modules/es.string.split.js';
@@ -15,6 +15,7 @@ import 'classnames';
15
15
  import '../global/get-uid.js';
16
16
  import '../global/schedule-raf.js';
17
17
  import '../global/dom.js';
18
+ import 'core-js/modules/es.object.assign.js';
18
19
  import 'core-js/modules/es.array.filter.js';
19
20
  import 'core-js/modules/es.string.split.js';
20
21
  import 'core-js/modules/es.array.iterator.js';
@@ -28,6 +29,7 @@ import 'core-js/modules/es.string.includes.js';
28
29
  import 'core-js/modules/es.array.slice.js';
29
30
  import 'core-js/modules/es.array.splice.js';
30
31
  import 'core-js/modules/es.string.match.js';
32
+ import 'core-js/modules/es.array.find-index.js';
31
33
  import 'combokeys';
32
34
  import '../global/sniffer.js';
33
35
  import 'sniffr';
@@ -40,6 +42,7 @@ import '../popup/popup.consts.js';
40
42
  import '../popup/popup.target.js';
41
43
  import 'core-js/modules/es.symbol.js';
42
44
  import 'core-js/modules/es.symbol.description.js';
45
+ import 'core-js/modules/es.array.find.js';
43
46
  import 'react-virtualized/dist/es/List';
44
47
  import 'react-virtualized/dist/es/AutoSizer';
45
48
  import 'react-virtualized/dist/es/WindowScroller';
@@ -56,9 +59,11 @@ import '../link/clickableLink.js';
56
59
  import '../_helpers/link.js';
57
60
  import '../_helpers/list.js';
58
61
  import '../list/list__item.js';
62
+ import 'core-js/modules/es.array.index-of.js';
59
63
  import '../avatar/avatar.js';
60
64
  import '../global/url.js';
61
65
  import '../avatar/fallback-avatar.js';
66
+ import 'core-js/modules/es.array.from.js';
62
67
  import '../checkbox/checkbox.js';
63
68
  import '@jetbrains/icons/checkmark-14px';
64
69
  import '@jetbrains/icons/remove-14px';
@@ -5,6 +5,7 @@ export interface ProgressBarProps extends HTMLAttributes<HTMLElement> {
5
5
  value: number;
6
6
  label: string;
7
7
  global?: boolean | null | undefined;
8
+ staticColor?: boolean;
8
9
  }
9
10
  /**
10
11
  * @name Progress Bar
@@ -43,6 +44,11 @@ export default class ProgressBar extends PureComponent<ProgressBarProps> {
43
44
  * @type {number}
44
45
  */
45
46
  value: PropTypes.Requireable<number>;
47
+ /**
48
+ * Disables Disabled progress bar color animation and sets it to static color.
49
+ * @type {boolean}
50
+ */
51
+ staticColor: PropTypes.Requireable<boolean>;
46
52
  };
47
53
  static defaultProps: {
48
54
  max: number;
@@ -4,9 +4,9 @@ import React, { PureComponent } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import classNames from 'classnames';
6
6
 
7
- var modules_fb7af416 = {"dark":"dark_rui_eb55","unit":"i__const_unit_1","light":"light_rui_2ac4","progressBar":"progressBar_rui_5875","globalMode":"globalMode_rui_5875","line":"line_rui_5875","progress-bar":"progress-bar_rui_5875"};
7
+ var modules_fb7af416 = {"dark":"dark_rui_eb55","unit":"i__const_unit_1","light":"light_rui_2ac4","progressBar":"progressBar_rui_5875","globalMode":"globalMode_rui_5875","line":"line_rui_5875","progress-bar":"progress-bar_rui_5875","staticLineColor":"staticLineColor_rui_5875"};
8
8
 
9
- var _excluded = ["className", "global", "max", "value", "label"];
9
+ var _excluded = ["className", "global", "max", "value", "label", "staticColor"];
10
10
  /**
11
11
  * @name Progress Bar
12
12
  */
@@ -39,10 +39,12 @@ var ProgressBar = /*#__PURE__*/function (_PureComponent) {
39
39
  max = _this$props.max,
40
40
  value = _this$props.value,
41
41
  label = _this$props.label,
42
+ staticColor = _this$props.staticColor,
42
43
  otherProps = _objectWithoutProperties(_this$props, _excluded);
43
44
  var width = value ? "".concat(ProgressBar.toPercent(value, max), "%") : undefined;
44
45
  var classes = classNames(modules_fb7af416.progressBar, className, {
45
- [modules_fb7af416.globalMode]: global
46
+ [modules_fb7af416.globalMode]: global,
47
+ [modules_fb7af416.staticLineColor]: staticColor
46
48
  });
47
49
  return /*#__PURE__*/React.createElement("div", _extends({}, otherProps, {
48
50
  className: classes,
@@ -102,7 +104,12 @@ _defineProperty(ProgressBar, "propTypes", {
102
104
  * A floating point number that specifies current task completion rate.
103
105
  * @type {number}
104
106
  */
105
- value: PropTypes.number
107
+ value: PropTypes.number,
108
+ /**
109
+ * Disables Disabled progress bar color animation and sets it to static color.
110
+ * @type {boolean}
111
+ */
112
+ staticColor: PropTypes.bool
106
113
  });
107
114
  _defineProperty(ProgressBar, "defaultProps", {
108
115
  max: 1.0,
@@ -1,14 +1,18 @@
1
1
  import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, k as _assertThisInitialized, l as _toConsumableArray, n as _get, o as _getPrototypeOf, e as _objectWithoutProperties, d as _createClass } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import 'core-js/modules/es.regexp.exec.js';
3
3
  import 'core-js/modules/es.string.replace.js';
4
+ import 'core-js/modules/es.array.find.js';
4
5
  import 'core-js/modules/es.object.to-string.js';
5
6
  import 'core-js/modules/web.dom-collections.for-each.js';
6
7
  import 'core-js/modules/es.array.filter.js';
7
8
  import 'core-js/modules/es.array.splice.js';
8
9
  import 'core-js/modules/es.promise.js';
10
+ import 'core-js/modules/es.object.assign.js';
9
11
  import 'core-js/modules/es.symbol.js';
10
12
  import 'core-js/modules/es.symbol.description.js';
13
+ import 'core-js/modules/es.array.concat.js';
11
14
  import 'core-js/modules/es.array.map.js';
15
+ import 'core-js/modules/es.array.from.js';
12
16
  import React, { Component } from 'react';
13
17
  import PropTypes from 'prop-types';
14
18
  import debounce from 'just-debounce-it';
@@ -32,7 +36,6 @@ import { S as Size, m as modules_88cfaf40 } from '../_helpers/input.js';
32
36
  import { I18nContext } from '../i18n/i18n-context.js';
33
37
  import { Q as QueryAssistSuggestions, m as modules_da7ab055 } from '../_helpers/query-assist__suggestions.js';
34
38
  import 'core-js/modules/es.regexp.to-string.js';
35
- import 'core-js/modules/es.array.concat.js';
36
39
  import 'core-js/modules/es.array.reduce.js';
37
40
  import 'core-js/modules/es.object.entries.js';
38
41
  import 'core-js/modules/es.string.split.js';
@@ -51,6 +54,7 @@ import 'core-js/modules/es.array.sort.js';
51
54
  import '../popup/popup.consts.js';
52
55
  import '../popup/popup.target.js';
53
56
  import '../list/list.js';
57
+ import 'core-js/modules/es.array.find-index.js';
54
58
  import 'react-virtualized/dist/es/List';
55
59
  import 'react-virtualized/dist/es/AutoSizer';
56
60
  import 'react-virtualized/dist/es/WindowScroller';
@@ -67,6 +71,7 @@ import '../link/clickableLink.js';
67
71
  import '../_helpers/link.js';
68
72
  import '../_helpers/list.js';
69
73
  import '../list/list__item.js';
74
+ import 'core-js/modules/es.array.index-of.js';
70
75
  import '../avatar/avatar.js';
71
76
  import '../global/url.js';
72
77
  import 'core-js/modules/es.string.match.js';
@@ -200,14 +205,14 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
200
205
  if (typeof _this.immediateState.selection === 'number' && Number.isInteger(_this.immediateState.selection) && _this.immediateState.selection > -1) {
201
206
  var _this$caret;
202
207
  // Set to end of field value if newCaretPosition is inappropriate
203
- (_this$caret = _this.caret) === null || _this$caret === void 0 ? void 0 : _this$caret.setPosition(newCaretPosition >= 0 ? newCaretPosition : -1);
208
+ (_this$caret = _this.caret) === null || _this$caret === void 0 || _this$caret.setPosition(newCaretPosition >= 0 ? newCaretPosition : -1);
204
209
  _this.scrollInput();
205
210
  } else if (_this.immediateState.selection && typeof _this.immediateState.selection === 'object' && _this.immediateState.selection.startOffset !== undefined) {
206
211
  var _this$caret2;
207
- (_this$caret2 = _this.caret) === null || _this$caret2 === void 0 ? void 0 : _this$caret2.setPosition(_this.immediateState.selection);
212
+ (_this$caret2 = _this.caret) === null || _this$caret2 === void 0 || _this$caret2.setPosition(_this.immediateState.selection);
208
213
  } else if (_this.immediateState.selection === undefined || params.forceSetCaret) {
209
214
  var _this$caret3;
210
- (_this$caret3 = _this.caret) === null || _this$caret3 === void 0 ? void 0 : _this$caret3.setPosition(-1);
215
+ (_this$caret3 = _this.caret) === null || _this$caret3 === void 0 || _this$caret3.setPosition(-1);
211
216
  }
212
217
  }
213
218
  });
@@ -264,7 +269,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
264
269
  _this.props.onChange(props);
265
270
  if (_this.props.autoOpen === 'force' || props.query.length > 0) {
266
271
  var _this$requestData, _this2;
267
- (_this$requestData = (_this2 = _this).requestData) === null || _this$requestData === void 0 ? void 0 : _this$requestData.call(_this2);
272
+ (_this$requestData = (_this2 = _this).requestData) === null || _this$requestData === void 0 || _this$requestData.call(_this2);
268
273
  }
269
274
  });
270
275
  // It's necessary to prevent new element creation before any other hooks
@@ -292,7 +297,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
292
297
  _defineProperty(_assertThisInitialized(_this), "setState", function (state, resolve) {
293
298
  _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(QueryAssist.prototype)), "setState", _thisSuper).call(_thisSuper, state, function () {
294
299
  _this._pushHistory(state);
295
- resolve === null || resolve === void 0 ? void 0 : resolve();
300
+ resolve === null || resolve === void 0 || resolve();
296
301
  });
297
302
  });
298
303
  _defineProperty(_assertThisInitialized(_this), "undo", function (e) {
@@ -304,7 +309,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
304
309
  query: previous.query
305
310
  }, function () {
306
311
  var _this$caret5;
307
- (_this$caret5 = _this.caret) === null || _this$caret5 === void 0 ? void 0 : _this$caret5.setPosition(previous.caret);
312
+ (_this$caret5 = _this.caret) === null || _this$caret5 === void 0 || _this$caret5.setPosition(previous.caret);
308
313
  _this.handleInput(e);
309
314
  });
310
315
  });
@@ -331,7 +336,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
331
336
  _this.scrollInput();
332
337
  if (_this.immediateState.query.length > 0) {
333
338
  var _this$requestData2, _this3;
334
- (_this$requestData2 = (_this3 = _this).requestData) === null || _this$requestData2 === void 0 ? void 0 : _this$requestData2.call(_this3);
339
+ (_this$requestData2 = (_this3 = _this).requestData) === null || _this$requestData2 === void 0 || _this$requestData2.call(_this3);
335
340
  }
336
341
  }
337
342
  if (_this.props.autoOpen !== 'force' && _this.immediateState.query.length < 1) {
@@ -434,7 +439,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
434
439
  _this.setCaretPosition();
435
440
  }
436
441
  _this.closePopup();
437
- (_this$requestData3 = (_this4 = _this).requestData) === null || _this$requestData3 === void 0 ? void 0 : _this$requestData3.call(_this4, true);
442
+ (_this$requestData3 = (_this4 = _this).requestData) === null || _this$requestData3 === void 0 || _this$requestData3.call(_this4, true);
438
443
  });
439
444
  _defineProperty(_assertThisInitialized(_this), "requestStyleRanges", function () {
440
445
  var _this$immediateState = _this.immediateState,
@@ -468,7 +473,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
468
473
  preventDefault(e);
469
474
  if (!_this.state.showPopup) {
470
475
  var _this$requestData4, _this5;
471
- (_this$requestData4 = (_this5 = _this).requestData) === null || _this$requestData4 === void 0 ? void 0 : _this$requestData4.call(_this5);
476
+ (_this$requestData4 = (_this5 = _this).requestData) === null || _this$requestData4 === void 0 || _this$requestData4.call(_this5);
472
477
  }
473
478
  });
474
479
  _defineProperty(_assertThisInitialized(_this), "trackPopupMouseState", function (e) {
@@ -605,7 +610,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
605
610
  this.immediateState.query = query;
606
611
  if (query && (this.props.autoOpen === 'force' || prevProps.autoOpen && query.length > 0)) {
607
612
  var _this$requestData5;
608
- (_this$requestData5 = this.requestData) === null || _this$requestData5 === void 0 ? void 0 : _this$requestData5.call(this);
613
+ (_this$requestData5 = this.requestData) === null || _this$requestData5 === void 0 || _this$requestData5.call(this);
609
614
  } else if (query) {
610
615
  this.requestStyleRanges();
611
616
  }
@@ -722,7 +727,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
722
727
  this.immediateState.selection = null;
723
728
  if (!this.props.focus) {
724
729
  var _this$caret11;
725
- (_this$caret11 = this.caret) === null || _this$caret11 === void 0 ? void 0 : _this$caret11.target.blur();
730
+ (_this$caret11 = this.caret) === null || _this$caret11 === void 0 || _this$caret11.target.blur();
726
731
  }
727
732
  }
728
733
  /**
@@ -871,6 +876,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
871
876
  ["".concat(modules_da7ab055.input, " ring-js-shortcuts")]: true,
872
877
  [modules_da7ab055.inputGap]: actions.length || this.isRenderingGlassOrLoader() && !glass,
873
878
  [modules_da7ab055.inputGap2]: actions.length === 2,
879
+ // TODO: replace with flex-box layout
874
880
  [modules_da7ab055.inputRevertOrder]: !glass || huge
875
881
  });
876
882
  var placeholderStyles = classNames({
@@ -10,6 +10,9 @@ import 'core-js/modules/es.array.includes.js';
10
10
  import 'core-js/modules/es.string.includes.js';
11
11
  import 'core-js/modules/es.array.map.js';
12
12
  import 'core-js/modules/es.array.concat.js';
13
+ import 'core-js/modules/es.array.find-index.js';
14
+ import 'core-js/modules/es.object.assign.js';
15
+ import 'core-js/modules/es.array.find.js';
13
16
  import 'prop-types';
14
17
  import 'classnames';
15
18
  import 'react-virtualized/dist/es/List';
@@ -49,10 +52,12 @@ import '../link/clickableLink.js';
49
52
  import '../_helpers/link.js';
50
53
  import '../_helpers/list.js';
51
54
  import '../list/list__item.js';
55
+ import 'core-js/modules/es.array.index-of.js';
52
56
  import '../avatar/avatar.js';
53
57
  import '../global/url.js';
54
58
  import 'core-js/modules/es.string.replace.js';
55
59
  import '../avatar/fallback-avatar.js';
60
+ import 'core-js/modules/es.array.from.js';
56
61
  import '../checkbox/checkbox.js';
57
62
  import '@jetbrains/icons/checkmark-14px';
58
63
  import '@jetbrains/icons/remove-14px';
@@ -1,14 +1,17 @@
1
1
  import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, k as _assertThisInitialized, g as _objectSpread2, e as _objectWithoutProperties, p as _toPropertyKey, d as _createClass, f as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
2
+ import 'core-js/modules/es.array.index-of.js';
2
3
  import 'core-js/modules/es.array.reduce.js';
3
4
  import 'core-js/modules/es.object.to-string.js';
4
5
  import 'core-js/modules/es.string.trim.js';
5
6
  import 'core-js/modules/es.array.filter.js';
6
7
  import 'core-js/modules/es.regexp.exec.js';
8
+ import 'core-js/modules/es.array.find.js';
7
9
  import 'core-js/modules/es.array.concat.js';
8
10
  import 'core-js/modules/es.string.replace.js';
9
11
  import 'core-js/modules/es.array.map.js';
10
12
  import 'core-js/modules/web.dom-collections.for-each.js';
11
13
  import 'core-js/modules/es.array.slice.js';
14
+ import 'core-js/modules/es.object.assign.js';
12
15
  import 'core-js/modules/es.object.values.js';
13
16
  import React, { Fragment, Component } from 'react';
14
17
  import classNames from 'classnames';
@@ -55,6 +58,7 @@ import '../global/dom.js';
55
58
  import 'core-js/modules/es.string.split.js';
56
59
  import 'core-js/modules/es.set.js';
57
60
  import '../avatar/fallback-avatar.js';
61
+ import 'core-js/modules/es.array.from.js';
58
62
  import 'core-js/modules/es.regexp.to-string.js';
59
63
  import 'react-dom';
60
64
  import '../global/schedule-raf.js';
@@ -67,6 +71,7 @@ import '../popup/popup.consts.js';
67
71
  import '../popup/popup.target.js';
68
72
  import '../shortcuts/core.js';
69
73
  import 'core-js/modules/es.array.splice.js';
74
+ import 'core-js/modules/es.array.find-index.js';
70
75
  import 'combokeys';
71
76
  import '../global/sniffer.js';
72
77
  import 'sniffr';
@@ -173,7 +178,6 @@ function _getListItems(props, state, rawFilterString) {
173
178
  if (_isInputMode(props.type) && !props.allowAny && state.selected && !Array.isArray(state.selected) && filterString === state.selected.label) {
174
179
  filterString = ''; // ignore multiple if it is exactly the selected item
175
180
  }
176
-
177
181
  var lowerCaseString = filterString.toLowerCase();
178
182
  var filteredData = [];
179
183
  var exactMatch = false;
@@ -337,7 +341,7 @@ var Select = /*#__PURE__*/function (_Component) {
337
341
  var _this$node;
338
342
  var focusableSelectExists = (_this$node = _this.node) === null || _this$node === void 0 ? void 0 : _this$node.querySelector('[data-test~=ring-select__focus]');
339
343
  var restoreFocusNode = _this.props.targetElement || focusableSelectExists;
340
- restoreFocusNode === null || restoreFocusNode === void 0 ? void 0 : restoreFocusNode.focus();
344
+ restoreFocusNode === null || restoreFocusNode === void 0 || restoreFocusNode.focus();
341
345
  });
342
346
  _defineProperty(_assertThisInitialized(_this), "_onEnter", function () {
343
347
  var _this$_popup2;
@@ -1175,40 +1179,61 @@ var Select = /*#__PURE__*/function (_Component) {
1175
1179
  _defineProperty(Select, "defaultProps", {
1176
1180
  data: [],
1177
1181
  filter: false,
1182
+ // enable filter (not in INPUT modes)
1178
1183
  filterIcon: null,
1179
1184
  filterRef: noop,
1180
1185
  multiple: false,
1186
+ // multiple can be an object - see demo for more information
1181
1187
  clear: false,
1188
+ // enable clear button that clears the "selected" state
1182
1189
  loading: false,
1190
+ // show a loading indicator while data is loading
1183
1191
  disabled: false,
1192
+ // disable select
1184
1193
  type: Type.BUTTON,
1185
1194
  size: Size.M,
1186
1195
  targetElement: null,
1196
+ // element to bind the popup to (select BUTTON or INPUT by default)
1187
1197
  hideSelected: false,
1198
+ // INPUT mode: clears the input after an option is selected (useful when the selection is displayed in some custom way elsewhere)
1188
1199
  allowAny: false,
1200
+ // INPUT mode: allows any value to be entered
1189
1201
  hideArrow: false,
1202
+ // hide dropdown arrow icon
1190
1203
  showPopup: false,
1191
1204
  maxHeight: 600,
1205
+ // height of the options list, including the filter and the 'Add' button
1192
1206
  directions: [Popup.PopupProps.Directions.BOTTOM_RIGHT, Popup.PopupProps.Directions.BOTTOM_LEFT, Popup.PopupProps.Directions.TOP_LEFT, Popup.PopupProps.Directions.TOP_RIGHT],
1193
1207
  selected: null,
1208
+ // current selection (item / array of items)
1194
1209
  label: null,
1210
+ // BUTTON or INPUT label (nothing selected)
1195
1211
  selectedLabel: null,
1212
+ // BUTTON or INPUT label (something selected)
1196
1213
  inputPlaceholder: '',
1214
+ // Placeholder for input modes
1197
1215
  hint: null,
1216
+ // hint text to display under the list
1198
1217
  shortcutsEnabled: false,
1199
1218
  onBeforeOpen: noop,
1200
1219
  onLoadMore: noop,
1201
1220
  onOpen: noop,
1202
1221
  onClose: noop,
1203
1222
  onFilter: noop,
1223
+ // search string as first argument
1204
1224
  onFocus: noop,
1205
1225
  onBlur: noop,
1206
1226
  onKeyDown: noop,
1207
1227
  onSelect: noop,
1228
+ // single + multi
1208
1229
  onDeselect: noop,
1230
+ // multi
1209
1231
  onOutsideClick: noop,
1232
+ // multi
1210
1233
  onChange: noop,
1234
+ // multi
1211
1235
  onAdd: noop,
1236
+ // search string as first argument
1212
1237
  onDone: noop,
1213
1238
  onReset: noop,
1214
1239
  tags: null,
@@ -41,6 +41,9 @@ import 'core-js/modules/es.string.includes.js';
41
41
  import 'core-js/modules/es.array.map.js';
42
42
  import 'core-js/modules/es.symbol.js';
43
43
  import 'core-js/modules/es.symbol.description.js';
44
+ import 'core-js/modules/es.array.find-index.js';
45
+ import 'core-js/modules/es.object.assign.js';
46
+ import 'core-js/modules/es.array.find.js';
44
47
  import 'react-virtualized/dist/es/List';
45
48
  import 'react-virtualized/dist/es/AutoSizer';
46
49
  import 'react-virtualized/dist/es/WindowScroller';
@@ -65,9 +68,11 @@ import '../link/link.js';
65
68
  import '../_helpers/link.js';
66
69
  import '../_helpers/list.js';
67
70
  import '../list/list__item.js';
71
+ import 'core-js/modules/es.array.index-of.js';
68
72
  import '../avatar/avatar.js';
69
73
  import '../global/url.js';
70
74
  import '../avatar/fallback-avatar.js';
75
+ import 'core-js/modules/es.array.from.js';
71
76
  import '../checkbox/checkbox.js';
72
77
  import '@jetbrains/icons/checkmark-14px';
73
78
  import '@jetbrains/icons/remove-14px';
@@ -2,6 +2,7 @@ import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCal
2
2
  import 'core-js/modules/es.array.concat.js';
3
3
  import 'core-js/modules/es.array.filter.js';
4
4
  import 'core-js/modules/es.object.to-string.js';
5
+ import 'core-js/modules/es.array.index-of.js';
5
6
  import 'core-js/modules/es.array.reduce.js';
6
7
  import 'core-js/modules/es.array.slice.js';
7
8
  import React, { PureComponent } from 'react';
@@ -46,12 +47,15 @@ import 'core-js/modules/es.array.includes.js';
46
47
  import 'core-js/modules/es.string.includes.js';
47
48
  import 'core-js/modules/es.array.sort.js';
48
49
  import 'core-js/modules/es.array.map.js';
50
+ import 'core-js/modules/es.object.assign.js';
49
51
  import 'core-js/modules/es.string.split.js';
50
52
  import 'core-js/modules/es.array.iterator.js';
51
53
  import 'core-js/modules/es.set.js';
52
54
  import 'core-js/modules/web.dom-collections.iterator.js';
53
55
  import 'core-js/modules/es.symbol.js';
54
56
  import 'core-js/modules/es.symbol.description.js';
57
+ import 'core-js/modules/es.array.find-index.js';
58
+ import 'core-js/modules/es.array.find.js';
55
59
  import 'react-virtualized/dist/es/List';
56
60
  import 'react-virtualized/dist/es/AutoSizer';
57
61
  import 'react-virtualized/dist/es/WindowScroller';
@@ -67,6 +71,7 @@ import '../avatar/avatar.js';
67
71
  import '../global/url.js';
68
72
  import 'core-js/modules/es.string.match.js';
69
73
  import '../avatar/fallback-avatar.js';
74
+ import 'core-js/modules/es.array.from.js';
70
75
  import '../checkbox/checkbox.js';
71
76
  import '@jetbrains/icons/checkmark-14px';
72
77
  import '@jetbrains/icons/remove-14px';
@@ -1,12 +1,14 @@
1
1
  import { d as _createClass, c as _classCallCheck, _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import 'core-js/modules/es.array.includes.js';
3
3
  import 'core-js/modules/es.string.includes.js';
4
+ import 'core-js/modules/es.object.assign.js';
4
5
  import 'core-js/modules/es.array.slice.js';
5
6
  import 'core-js/modules/es.array.splice.js';
6
7
  import 'core-js/modules/es.array.map.js';
7
8
  import 'core-js/modules/es.array.concat.js';
8
9
  import 'core-js/modules/es.regexp.exec.js';
9
10
  import 'core-js/modules/es.string.match.js';
11
+ import 'core-js/modules/es.array.find-index.js';
10
12
  import Combokeys from 'combokeys';
11
13
  import sniffr from '../global/sniffer.js';
12
14
  import 'sniffr';
@@ -10,10 +10,12 @@ import 'core-js/modules/es.array.map.js';
10
10
  import './core.js';
11
11
  import 'core-js/modules/es.array.includes.js';
12
12
  import 'core-js/modules/es.string.includes.js';
13
+ import 'core-js/modules/es.object.assign.js';
13
14
  import 'core-js/modules/es.array.slice.js';
14
15
  import 'core-js/modules/es.array.splice.js';
15
16
  import 'core-js/modules/es.regexp.exec.js';
16
17
  import 'core-js/modules/es.string.match.js';
18
+ import 'core-js/modules/es.array.find-index.js';
17
19
  import 'combokeys';
18
20
  import '../global/sniffer.js';
19
21
  import 'sniffr';
@@ -5,11 +5,13 @@ import PropTypes from 'prop-types';
5
5
  import shortcuts from './core.js';
6
6
  import 'core-js/modules/es.array.includes.js';
7
7
  import 'core-js/modules/es.string.includes.js';
8
+ import 'core-js/modules/es.object.assign.js';
8
9
  import 'core-js/modules/es.array.slice.js';
9
10
  import 'core-js/modules/es.array.splice.js';
10
11
  import 'core-js/modules/es.array.concat.js';
11
12
  import 'core-js/modules/es.regexp.exec.js';
12
13
  import 'core-js/modules/es.string.match.js';
14
+ import 'core-js/modules/es.array.find-index.js';
13
15
  import 'combokeys';
14
16
  import '../global/sniffer.js';
15
17
  import 'sniffr';