@jetbrains/ring-ui-built 7.0.0-beta.2 → 7.0.0-beta.3

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 (236) hide show
  1. package/components/_helpers/_rollupPluginBabelHelpers.js +1 -504
  2. package/components/_helpers/anchor.js +7 -5
  3. package/components/_helpers/button__classes.js +15 -13
  4. package/components/_helpers/caption.js +11 -17
  5. package/components/_helpers/card.js +92 -96
  6. package/components/_helpers/dialog__body-scroll-preventer.js +10 -17
  7. package/components/_helpers/icon__svg.js +27 -23
  8. package/components/_helpers/input.js +150 -171
  9. package/components/_helpers/query-assist__suggestions.js +78 -93
  10. package/components/_helpers/select__filter.js +56 -67
  11. package/components/_helpers/services-link.js +23 -29
  12. package/components/_helpers/sidebar.js +91 -93
  13. package/components/_helpers/tab-link.js +8 -6
  14. package/components/_helpers/theme.js +41 -50
  15. package/components/_helpers/title.js +59 -69
  16. package/components/alert/alert.js +112 -156
  17. package/components/alert/container.js +32 -39
  18. package/components/alert-service/alert-service.js +104 -161
  19. package/components/analytics/analytics.js +12 -20
  20. package/components/analytics/analytics__custom-plugin.js +52 -68
  21. package/components/auth/auth.js +2 -27
  22. package/components/auth/auth__core.d.ts +1 -1
  23. package/components/auth/auth__core.js +742 -1428
  24. package/components/auth/background-flow.js +84 -121
  25. package/components/auth/down-notification.js +31 -69
  26. package/components/auth/iframe-flow.js +70 -123
  27. package/components/auth/request-builder.js +46 -77
  28. package/components/auth/response-parser.js +84 -112
  29. package/components/auth/storage.js +160 -318
  30. package/components/auth/token-validator.js +132 -227
  31. package/components/auth/window-flow.js +84 -121
  32. package/components/auth-dialog/auth-dialog.js +99 -150
  33. package/components/auth-dialog-service/auth-dialog-service.js +6 -26
  34. package/components/avatar/avatar-example-datauri.js +1 -1
  35. package/components/avatar/avatar.js +94 -123
  36. package/components/avatar/fallback-avatar.js +20 -34
  37. package/components/badge/badge.js +32 -38
  38. package/components/breadcrumbs/breadcrumbs.js +13 -17
  39. package/components/button/button.js +67 -80
  40. package/components/button-group/button-group.js +27 -36
  41. package/components/button-set/button-set.js +19 -27
  42. package/components/button-toolbar/button-toolbar.js +17 -25
  43. package/components/caret/caret.js +184 -211
  44. package/components/checkbox/checkbox.js +69 -86
  45. package/components/clipboard/clipboard-fallback.js +7 -7
  46. package/components/clipboard/clipboard.js +36 -128
  47. package/components/code/code.js +83 -151
  48. package/components/collapse/collapse-content.js +42 -60
  49. package/components/collapse/collapse-context.js +2 -2
  50. package/components/collapse/collapse-control.js +12 -12
  51. package/components/collapse/collapse.js +12 -17
  52. package/components/collapse/consts.js +4 -4
  53. package/components/collapse/utils.js +1 -3
  54. package/components/confirm/confirm.js +57 -87
  55. package/components/confirm-service/confirm-service.js +23 -44
  56. package/components/content-layout/content-layout.js +41 -56
  57. package/components/content-layout/sidebar.js +1 -1
  58. package/components/contenteditable/contenteditable.js +38 -46
  59. package/components/control-help/control-help.js +5 -3
  60. package/components/control-label/control-label.js +9 -8
  61. package/components/data-list/data-list.js +113 -156
  62. package/components/data-list/data-list.mock.js +3 -5
  63. package/components/data-list/item.js +120 -140
  64. package/components/data-list/selection.js +77 -135
  65. package/components/data-list/title.js +2 -10
  66. package/components/date-picker/consts.js +16 -22
  67. package/components/date-picker/date-input.js +99 -124
  68. package/components/date-picker/date-picker.js +140 -184
  69. package/components/date-picker/date-popup.js +280 -327
  70. package/components/date-picker/day.js +71 -94
  71. package/components/date-picker/month-names.js +41 -59
  72. package/components/date-picker/month-slider.js +42 -61
  73. package/components/date-picker/month.js +17 -24
  74. package/components/date-picker/months.js +44 -49
  75. package/components/date-picker/weekdays.js +12 -21
  76. package/components/date-picker/years.js +77 -98
  77. package/components/dialog/dialog.js +151 -187
  78. package/components/dialog/dialog__body-scroll-preventer.js +0 -3
  79. package/components/dropdown/anchor.js +0 -6
  80. package/components/dropdown/dropdown.js +134 -154
  81. package/components/dropdown-menu/dropdown-menu.js +59 -87
  82. package/components/editable-heading/editable-heading.js +69 -116
  83. package/components/error-bubble/error-bubble.js +29 -54
  84. package/components/error-message/error-message.js +34 -49
  85. package/components/footer/footer.js +27 -28
  86. package/components/global/compose.js +1 -8
  87. package/components/global/composeRefs.d.ts +0 -3
  88. package/components/global/composeRefs.js +8 -15
  89. package/components/global/controls-height.js +2 -2
  90. package/components/global/create-stateful-context.js +14 -13
  91. package/components/global/data-tests.js +7 -12
  92. package/components/global/dom.js +49 -82
  93. package/components/global/focus-sensor-hoc.js +99 -106
  94. package/components/global/fuzzy-highlight.js +23 -34
  95. package/components/global/get-event-key.js +8 -8
  96. package/components/global/get-uid.js +3 -7
  97. package/components/global/inject-styles.js +7 -14
  98. package/components/global/listeners.js +28 -47
  99. package/components/global/memoize.js +6 -10
  100. package/components/global/normalize-indent.js +19 -46
  101. package/components/global/promise-with-timeout.js +6 -8
  102. package/components/global/prop-types.js +3 -5
  103. package/components/global/react-dom-renderer.js +29 -40
  104. package/components/global/rerender-hoc.js +16 -32
  105. package/components/global/schedule-raf.js +4 -4
  106. package/components/global/sniffer.js +1 -1
  107. package/components/global/theme.js +1 -18
  108. package/components/global/trivial-template-tag.js +4 -9
  109. package/components/global/typescript-utils.js +2 -6
  110. package/components/global/url.js +20 -23
  111. package/components/global/use-event-callback.js +7 -4
  112. package/components/grid/col.js +27 -39
  113. package/components/grid/grid.js +18 -27
  114. package/components/grid/row.js +23 -30
  115. package/components/group/group.js +16 -22
  116. package/components/header/header-icon.js +19 -31
  117. package/components/header/header.d.ts +0 -1
  118. package/components/header/header.js +30 -64
  119. package/components/header/links.js +6 -3
  120. package/components/header/logo.js +15 -26
  121. package/components/header/profile.js +124 -150
  122. package/components/header/services-link.js +1 -3
  123. package/components/header/services.js +64 -97
  124. package/components/header/smart-profile.js +101 -178
  125. package/components/header/smart-services.js +55 -90
  126. package/components/header/tray.js +21 -30
  127. package/components/heading/heading.js +21 -20
  128. package/components/http/http.js +162 -319
  129. package/components/http/http.mock.js +50 -98
  130. package/components/hub-source/hub-source.js +77 -182
  131. package/components/hub-source/hub-source__user.js +9 -37
  132. package/components/hub-source/hub-source__users-groups.js +34 -60
  133. package/components/i18n/i18n-context.js +7 -8
  134. package/components/i18n/i18n.js +3 -6
  135. package/components/icon/icon.js +60 -74
  136. package/components/icon/icon__svg.js +0 -5
  137. package/components/icon/index.js +0 -5
  138. package/components/input/input.js +1 -11
  139. package/components/island/adaptive-island-hoc.js +29 -37
  140. package/components/island/content.js +100 -110
  141. package/components/island/header.js +56 -66
  142. package/components/island/island.js +25 -33
  143. package/components/island-legacy/content-legacy.js +16 -22
  144. package/components/island-legacy/header-legacy.js +19 -25
  145. package/components/island-legacy/island-legacy.js +16 -22
  146. package/components/link/clickableLink.js +33 -42
  147. package/components/link/link.js +47 -55
  148. package/components/list/consts.js +2 -2
  149. package/components/list/list.js +399 -486
  150. package/components/list/list__custom.js +51 -61
  151. package/components/list/list__hint.js +9 -17
  152. package/components/list/list__item.js +147 -178
  153. package/components/list/list__link.js +38 -47
  154. package/components/list/list__separator.js +15 -24
  155. package/components/list/list__title.js +25 -34
  156. package/components/list/list__users-groups-source.js +55 -121
  157. package/components/loader/loader.js +38 -60
  158. package/components/loader/loader__core.js +123 -184
  159. package/components/loader-inline/loader-inline.js +24 -32
  160. package/components/loader-screen/loader-screen.js +24 -40
  161. package/components/login-dialog/login-dialog.js +81 -121
  162. package/components/login-dialog/service.js +6 -29
  163. package/components/markdown/markdown.js +16 -24
  164. package/components/message/message.js +170 -201
  165. package/components/old-browsers-message/old-browsers-message.js +11 -14
  166. package/components/old-browsers-message/old-browsers-message__stop.js +1 -4
  167. package/components/old-browsers-message/white-list.js +8 -13
  168. package/components/pager/pager.js +212 -257
  169. package/components/panel/panel.js +16 -22
  170. package/components/permissions/permissions.js +118 -161
  171. package/components/permissions/permissions__cache.js +191 -218
  172. package/components/popup/popup.consts.js +1 -1
  173. package/components/popup/popup.js +237 -288
  174. package/components/popup/popup.target.js +9 -7
  175. package/components/popup/position.js +94 -101
  176. package/components/popup-menu/popup-menu.js +33 -67
  177. package/components/progress-bar/progress-bar.js +57 -68
  178. package/components/query-assist/query-assist.js +583 -652
  179. package/components/query-assist/query-assist__suggestions.js +2 -26
  180. package/components/radio/radio.js +15 -27
  181. package/components/radio/radio__item.js +52 -62
  182. package/components/scrollable-section/scrollable-section.js +22 -32
  183. package/components/select/select.js +693 -793
  184. package/components/select/select__filter.js +1 -26
  185. package/components/select/select__popup.js +316 -413
  186. package/components/shortcuts/core.js +147 -195
  187. package/components/shortcuts/shortcut-title.js +6 -10
  188. package/components/shortcuts/shortcuts-hoc.js +23 -41
  189. package/components/shortcuts/shortcuts.js +41 -64
  190. package/components/slider/slider.js +93 -112
  191. package/components/slider/slider.utils.js +16 -23
  192. package/components/storage/storage.js +3 -27
  193. package/components/storage/storage__fallback.js +137 -210
  194. package/components/storage/storage__local.js +89 -147
  195. package/components/style.css +1 -1
  196. package/components/tab-trap/tab-trap.js +35 -53
  197. package/components/table/cell.js +11 -21
  198. package/components/table/disable-hover-hoc.js +27 -42
  199. package/components/table/header-cell.js +59 -75
  200. package/components/table/header.js +89 -110
  201. package/components/table/multitable.js +83 -89
  202. package/components/table/row-with-focus-sensor.js +25 -57
  203. package/components/table/row.js +169 -200
  204. package/components/table/selection-adapter.js +2 -2
  205. package/components/table/selection-shortcuts-hoc.js +108 -113
  206. package/components/table/selection.js +150 -217
  207. package/components/table/simple-table.js +19 -55
  208. package/components/table/smart-table.js +42 -76
  209. package/components/table/table.js +267 -327
  210. package/components/tabs/collapsible-more.js +47 -73
  211. package/components/tabs/collapsible-tab.js +32 -36
  212. package/components/tabs/collapsible-tabs.js +89 -148
  213. package/components/tabs/custom-item.js +4 -2
  214. package/components/tabs/dumb-tabs.js +60 -92
  215. package/components/tabs/smart-tabs.js +29 -61
  216. package/components/tabs/tab-link.js +1 -3
  217. package/components/tabs/tab.js +15 -24
  218. package/components/tabs/tabs.js +1 -26
  219. package/components/tag/tag.d.ts +0 -2
  220. package/components/tag/tag.js +120 -162
  221. package/components/tags-input/tags-input.js +222 -304
  222. package/components/tags-list/tags-list.js +45 -61
  223. package/components/text/text.js +28 -37
  224. package/components/toggle/toggle.js +51 -61
  225. package/components/tooltip/tooltip.js +109 -141
  226. package/components/user-agreement/service.js +259 -400
  227. package/components/user-agreement/user-agreement.js +80 -108
  228. package/components/user-card/card.js +1 -25
  229. package/components/user-card/smart-user-card-tooltip.js +52 -103
  230. package/components/user-card/tooltip.js +35 -65
  231. package/components/user-card/user-card.js +1 -25
  232. package/package.json +1 -1
  233. package/components/global/react-render-adapter.d.ts +0 -1
  234. package/components/global/react-render-adapter.js +0 -6
  235. package/components/header/tray-icon.d.ts +0 -1
  236. package/components/header/tray-icon.js +0 -26
@@ -1,13 +1,16 @@
1
- import { c as _objectWithoutProperties, d as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import classNames from 'classnames';
3
3
  import ScrollableSection from '../scrollable-section/scrollable-section.js';
4
4
  import { m as modules_47759f5e } from '../_helpers/header.js';
5
5
  import { jsx } from 'react/jsx-runtime';
6
+ import 'core-js/modules/web.dom-collections.iterator.js';
6
7
  import 'react';
7
8
 
8
- var _excluded = ["className"];
9
+ const _excluded = ["className"];
9
10
  function Links(_ref) {
10
- var className = _ref.className,
11
+ let {
12
+ className
13
+ } = _ref,
11
14
  restProps = _objectWithoutProperties(_ref, _excluded);
12
15
  return /*#__PURE__*/jsx(ScrollableSection, _objectSpread2(_objectSpread2({}, restProps), {}, {
13
16
  className: classNames(modules_47759f5e.links, className)
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, d as _objectSpread2, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import { PureComponent } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
@@ -10,35 +10,24 @@ import 'util-deprecate';
10
10
  import '../_helpers/icon__svg.js';
11
11
  import 'core-js/modules/es.regexp.exec.js';
12
12
  import 'core-js/modules/es.string.replace.js';
13
- import 'core-js/modules/es.string.starts-with.js';
14
13
  import '../global/memoize.js';
15
- import 'core-js/modules/es.array.iterator.js';
16
- import 'core-js/modules/es.map.js';
17
- import 'core-js/modules/es.object.to-string.js';
18
- import 'core-js/modules/es.weak-map.js';
19
14
  import 'core-js/modules/web.dom-collections.iterator.js';
20
15
 
21
- var _excluded = ["className"];
22
- var Logo = /*#__PURE__*/function (_PureComponent) {
23
- function Logo() {
24
- _classCallCheck(this, Logo);
25
- return _callSuper(this, Logo, arguments);
16
+ const _excluded = ["className"];
17
+ class Logo extends PureComponent {
18
+ render() {
19
+ const _this$props = this.props,
20
+ {
21
+ className
22
+ } = _this$props,
23
+ restProps = _objectWithoutProperties(_this$props, _excluded);
24
+ const classes = classNames(modules_47759f5e.logo, className);
25
+ return /*#__PURE__*/jsx("div", {
26
+ className: classes,
27
+ children: /*#__PURE__*/jsx(Icon, _objectSpread2({}, restProps))
28
+ });
26
29
  }
27
- _inherits(Logo, _PureComponent);
28
- return _createClass(Logo, [{
29
- key: "render",
30
- value: function render() {
31
- var _this$props = this.props,
32
- className = _this$props.className,
33
- restProps = _objectWithoutProperties(_this$props, _excluded);
34
- var classes = classNames(modules_47759f5e.logo, className);
35
- return /*#__PURE__*/jsx("div", {
36
- className: classes,
37
- children: /*#__PURE__*/jsx(Icon, _objectSpread2({}, restProps))
38
- });
39
- }
40
- }]);
41
- }(PureComponent);
30
+ }
42
31
  _defineProperty(Logo, "propTypes", {
43
32
  className: PropTypes.string
44
33
  });
@@ -1,6 +1,4 @@
1
- import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, d as _objectSpread2, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/es.array.filter.js';
3
- import 'core-js/modules/es.object.to-string.js';
1
+ import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
4
2
  import { Component, PureComponent } from 'react';
5
3
  import PropTypes from 'prop-types';
6
4
  import classNames from 'classnames';
@@ -12,45 +10,24 @@ import { I18nContext } from '../i18n/i18n-context.js';
12
10
  import { isTruthy } from '../global/typescript-utils.js';
13
11
  import { m as modules_47759f5e } from '../_helpers/header.js';
14
12
  import { jsx, jsxs } from 'react/jsx-runtime';
15
- import 'core-js/modules/es.array.concat.js';
13
+ import 'core-js/modules/web.dom-collections.iterator.js';
16
14
  import '../global/url.js';
17
- import 'core-js/modules/es.array.index-of.js';
18
15
  import 'core-js/modules/es.regexp.exec.js';
19
- import 'core-js/modules/es.string.match.js';
20
16
  import 'core-js/modules/es.string.replace.js';
21
17
  import '../global/dom.js';
22
- import 'core-js/modules/es.array.iterator.js';
23
- import 'core-js/modules/es.object.assign.js';
24
- import 'core-js/modules/es.object.entries.js';
25
- import 'core-js/modules/es.set.js';
26
- import 'core-js/modules/es.string.split.js';
27
- import 'core-js/modules/web.dom-collections.for-each.js';
28
- import 'core-js/modules/web.dom-collections.iterator.js';
29
18
  import '../avatar/fallback-avatar.js';
30
- import 'core-js/modules/es.array.from.js';
31
- import 'core-js/modules/es.array.map.js';
32
- import 'core-js/modules/es.array.slice.js';
33
19
  import '../global/get-uid.js';
34
- import 'core-js/modules/es.regexp.to-string.js';
35
20
  import '@jetbrains/icons/chevron-down';
36
21
  import '../icon/icon.js';
37
22
  import 'util-deprecate';
38
23
  import '../icon/icon__constants.js';
39
24
  import '../_helpers/icon__svg.js';
40
- import 'core-js/modules/es.string.starts-with.js';
41
25
  import '../global/memoize.js';
42
- import 'core-js/modules/es.map.js';
43
- import 'core-js/modules/es.weak-map.js';
44
26
  import '../link/clickableLink.js';
45
27
  import '../global/controls-height.js';
46
28
  import '../_helpers/button__classes.js';
47
29
  import '../list/list.js';
48
- import 'core-js/modules/es.symbol.js';
49
30
  import 'core-js/modules/es.symbol.description.js';
50
- import 'core-js/modules/es.array.find.js';
51
- import 'core-js/modules/es.array.find-index.js';
52
- import 'core-js/modules/es.array.includes.js';
53
- import 'core-js/modules/es.string.includes.js';
54
31
  import 'react-virtualized/dist/es/List';
55
32
  import 'react-virtualized/dist/es/AutoSizer';
56
33
  import 'react-virtualized/dist/es/WindowScroller';
@@ -61,7 +38,6 @@ import 'core-js/modules/es.array.reduce.js';
61
38
  import '../global/schedule-raf.js';
62
39
  import '../shortcuts/shortcuts.js';
63
40
  import '../shortcuts/core.js';
64
- import 'core-js/modules/es.array.splice.js';
65
41
  import 'combokeys';
66
42
  import '../global/sniffer.js';
67
43
  import 'sniffr';
@@ -95,122 +71,118 @@ import '../popup/popup.consts.js';
95
71
  import '../popup/popup.target.js';
96
72
  import '../i18n/i18n.js';
97
73
 
98
- var _excluded = ["className", "activeClassName", "closeOnSelect", "hasUpdates", "onLogout", "user", "profileUrl", "LinkComponent", "onSwitchUser", "renderPopupItems", "onRevertPostponement", "showApplyChangedUser", "showName", "showLogIn", "showLogOut", "showSwitchUser", "renderGuest", "translations", "size", "round", "loading", "onLogin", "menuProps", "onShow", "onHide"];
99
- var rgItemType = PopupMenu.ListProps.Type.LINK;
100
- var Profile = /*#__PURE__*/function (_PureComponent) {
101
- function Profile() {
102
- _classCallCheck(this, Profile);
103
- return _callSuper(this, Profile, arguments);
104
- }
105
- _inherits(Profile, _PureComponent);
106
- return _createClass(Profile, [{
107
- key: "render",
108
- value: function render() {
109
- var _translations$applyCh, _translations$login, _translations$profile, _translations$switchU, _translations$logout;
110
- var _this$props = this.props,
111
- className = _this$props.className,
112
- activeClassName = _this$props.activeClassName,
113
- closeOnSelect = _this$props.closeOnSelect,
114
- hasUpdates = _this$props.hasUpdates,
115
- onLogout = _this$props.onLogout,
116
- user = _this$props.user,
117
- profileUrl = _this$props.profileUrl,
118
- LinkComponent = _this$props.LinkComponent,
119
- onSwitchUser = _this$props.onSwitchUser,
120
- renderPopupItems = _this$props.renderPopupItems,
121
- onRevertPostponement = _this$props.onRevertPostponement,
122
- showApplyChangedUser = _this$props.showApplyChangedUser,
123
- showName = _this$props.showName,
124
- showLogIn = _this$props.showLogIn,
125
- showLogOut = _this$props.showLogOut,
126
- showSwitchUser = _this$props.showSwitchUser,
127
- renderGuest = _this$props.renderGuest,
128
- translations = _this$props.translations,
129
- size = _this$props.size,
130
- round = _this$props.round;
131
- _this$props.loading;
132
- _this$props.onLogin;
133
- var menuProps = _this$props.menuProps,
134
- onShow = _this$props.onShow,
135
- onHide = _this$props.onHide,
136
- props = _objectWithoutProperties(_this$props, _excluded);
137
- var translate = this.context.translate;
138
- if (!user) {
139
- return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, props), {}, {
140
- className: classNames(modules_47759f5e.profileEmpty, className),
141
- children: /*#__PURE__*/jsx(Avatar, {
142
- size: size,
143
- round: round
144
- })
145
- }));
146
- }
147
- if (user.guest) {
148
- return renderGuest(this.props);
149
- }
150
- var avatarWrapper = classNames(modules_47759f5e.avatarWrapper, {
151
- [modules_47759f5e.hasUpdates]: hasUpdates
152
- });
153
- var anchor = /*#__PURE__*/jsxs("button", {
154
- type: "button",
155
- className: modules_47759f5e.anchorClassName,
156
- children: [/*#__PURE__*/jsx("span", {
157
- className: avatarWrapper,
158
- children: /*#__PURE__*/jsx(Avatar, {
159
- url: user.profile && user.profile.avatar && user.profile.avatar.url,
160
- size: size,
161
- round: round,
162
- username: user.name
163
- })
164
- }), showName && /*#__PURE__*/jsx("span", {
165
- children: user.name
166
- })]
167
- });
168
- var items = [showApplyChangedUser && {
169
- rgItemType,
170
- label: (_translations$applyCh = translations === null || translations === void 0 ? void 0 : translations.applyChangedUser) !== null && _translations$applyCh !== void 0 ? _translations$applyCh : translate('applyChangedUser'),
171
- className: modules_47759f5e.profileMenuItem,
172
- onClick: onRevertPostponement
173
- }, showLogIn && {
174
- rgItemType,
175
- label: (_translations$login = translations === null || translations === void 0 ? void 0 : translations.login) !== null && _translations$login !== void 0 ? _translations$login : translate('login'),
176
- className: modules_47759f5e.profileMenuItem,
177
- onClick: onRevertPostponement
178
- }, {
179
- rgItemType: PopupMenu.ListProps.Type.LINK,
180
- label: (_translations$profile = translations === null || translations === void 0 ? void 0 : translations.profile) !== null && _translations$profile !== void 0 ? _translations$profile : translate('profile'),
181
- target: '_self',
182
- // Full page reload in Angular
183
- href: profileUrl,
184
- LinkComponent
185
- }, showSwitchUser && {
186
- rgItemType,
187
- label: (_translations$switchU = translations === null || translations === void 0 ? void 0 : translations.switchUser) !== null && _translations$switchU !== void 0 ? _translations$switchU : translate('switchUser'),
188
- className: modules_47759f5e.profileMenuItem,
189
- onClick: onSwitchUser
190
- }, showLogOut && {
191
- rgItemType,
192
- label: (_translations$logout = translations === null || translations === void 0 ? void 0 : translations.logout) !== null && _translations$logout !== void 0 ? _translations$logout : translate('logout'),
193
- onClick: onLogout
194
- }].filter(isTruthy);
195
- return /*#__PURE__*/jsx(DropdownMenu, _objectSpread2(_objectSpread2({}, props), {}, {
196
- onShow: onShow,
197
- onHide: onHide,
198
- title: user.name,
199
- anchor: anchor,
200
- data: renderPopupItems(items),
201
- "data-test": "ring-profile",
202
- className: classNames(modules_47759f5e.profile, className),
203
- activeClassName: activeClassName,
204
- menuProps: _objectSpread2({
205
- closeOnSelect,
206
- left: -2,
207
- top: -8,
208
- sidePadding: 32
209
- }, menuProps)
74
+ const _excluded = ["className", "activeClassName", "closeOnSelect", "hasUpdates", "onLogout", "user", "profileUrl", "LinkComponent", "onSwitchUser", "renderPopupItems", "onRevertPostponement", "showApplyChangedUser", "showName", "showLogIn", "showLogOut", "showSwitchUser", "renderGuest", "translations", "size", "round", "loading", "onLogin", "menuProps", "onShow", "onHide"];
75
+ const rgItemType = PopupMenu.ListProps.Type.LINK;
76
+ class Profile extends PureComponent {
77
+ render() {
78
+ var _translations$applyCh, _translations$login, _translations$profile, _translations$switchU, _translations$logout;
79
+ const _this$props = this.props,
80
+ {
81
+ className,
82
+ activeClassName,
83
+ closeOnSelect,
84
+ hasUpdates,
85
+ onLogout,
86
+ user,
87
+ profileUrl,
88
+ LinkComponent,
89
+ onSwitchUser,
90
+ renderPopupItems,
91
+ onRevertPostponement,
92
+ showApplyChangedUser,
93
+ showName,
94
+ showLogIn,
95
+ showLogOut,
96
+ showSwitchUser,
97
+ renderGuest,
98
+ translations,
99
+ size,
100
+ round,
101
+ loading,
102
+ onLogin,
103
+ menuProps,
104
+ onShow,
105
+ onHide
106
+ } = _this$props,
107
+ props = _objectWithoutProperties(_this$props, _excluded);
108
+ const {
109
+ translate
110
+ } = this.context;
111
+ if (!user) {
112
+ return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, props), {}, {
113
+ className: classNames(modules_47759f5e.profileEmpty, className),
114
+ children: /*#__PURE__*/jsx(Avatar, {
115
+ size: size,
116
+ round: round
117
+ })
210
118
  }));
211
119
  }
212
- }]);
213
- }(PureComponent);
120
+ if (user.guest) {
121
+ return renderGuest(this.props);
122
+ }
123
+ const avatarWrapper = classNames(modules_47759f5e.avatarWrapper, {
124
+ [modules_47759f5e.hasUpdates]: hasUpdates
125
+ });
126
+ const anchor = /*#__PURE__*/jsxs("button", {
127
+ type: "button",
128
+ className: modules_47759f5e.anchorClassName,
129
+ children: [/*#__PURE__*/jsx("span", {
130
+ className: avatarWrapper,
131
+ children: /*#__PURE__*/jsx(Avatar, {
132
+ url: user.profile && user.profile.avatar && user.profile.avatar.url,
133
+ size: size,
134
+ round: round,
135
+ username: user.name
136
+ })
137
+ }), showName && /*#__PURE__*/jsx("span", {
138
+ children: user.name
139
+ })]
140
+ });
141
+ const items = [showApplyChangedUser && {
142
+ rgItemType,
143
+ label: (_translations$applyCh = translations === null || translations === void 0 ? void 0 : translations.applyChangedUser) !== null && _translations$applyCh !== void 0 ? _translations$applyCh : translate('applyChangedUser'),
144
+ className: modules_47759f5e.profileMenuItem,
145
+ onClick: onRevertPostponement
146
+ }, showLogIn && {
147
+ rgItemType,
148
+ label: (_translations$login = translations === null || translations === void 0 ? void 0 : translations.login) !== null && _translations$login !== void 0 ? _translations$login : translate('login'),
149
+ className: modules_47759f5e.profileMenuItem,
150
+ onClick: onRevertPostponement
151
+ }, {
152
+ rgItemType: PopupMenu.ListProps.Type.LINK,
153
+ label: (_translations$profile = translations === null || translations === void 0 ? void 0 : translations.profile) !== null && _translations$profile !== void 0 ? _translations$profile : translate('profile'),
154
+ target: '_self',
155
+ // Full page reload in Angular
156
+ href: profileUrl,
157
+ LinkComponent
158
+ }, showSwitchUser && {
159
+ rgItemType,
160
+ label: (_translations$switchU = translations === null || translations === void 0 ? void 0 : translations.switchUser) !== null && _translations$switchU !== void 0 ? _translations$switchU : translate('switchUser'),
161
+ className: modules_47759f5e.profileMenuItem,
162
+ onClick: onSwitchUser
163
+ }, showLogOut && {
164
+ rgItemType,
165
+ label: (_translations$logout = translations === null || translations === void 0 ? void 0 : translations.logout) !== null && _translations$logout !== void 0 ? _translations$logout : translate('logout'),
166
+ onClick: onLogout
167
+ }].filter(isTruthy);
168
+ return /*#__PURE__*/jsx(DropdownMenu, _objectSpread2(_objectSpread2({}, props), {}, {
169
+ onShow: onShow,
170
+ onHide: onHide,
171
+ title: user.name,
172
+ anchor: anchor,
173
+ data: renderPopupItems(items),
174
+ "data-test": "ring-profile",
175
+ className: classNames(modules_47759f5e.profile, className),
176
+ activeClassName: activeClassName,
177
+ menuProps: _objectSpread2({
178
+ closeOnSelect,
179
+ left: -2,
180
+ top: -8,
181
+ sidePadding: 32
182
+ }, menuProps)
183
+ }));
184
+ }
185
+ }
214
186
  _defineProperty(Profile, "propTypes", {
215
187
  className: PropTypes.string,
216
188
  activeClassName: PropTypes.string,
@@ -250,19 +222,21 @@ _defineProperty(Profile, "propTypes", {
250
222
  });
251
223
  _defineProperty(Profile, "defaultProps", {
252
224
  closeOnSelect: true,
253
- renderPopupItems: function renderPopupItems(items) {
254
- return items;
255
- },
225
+ renderPopupItems: items => items,
256
226
  size: Size.Size32,
257
- renderGuest: function renderGuest(_ref) {
258
- var loading = _ref.loading,
259
- onLogin = _ref.onLogin,
260
- className = _ref.className,
261
- translations = _ref.translations;
227
+ renderGuest: _ref => {
228
+ let {
229
+ loading,
230
+ onLogin,
231
+ className,
232
+ translations
233
+ } = _ref;
262
234
  return /*#__PURE__*/jsx(I18nContext.Consumer, {
263
- children: function children(_ref2) {
235
+ children: _ref2 => {
264
236
  var _translations$login2;
265
- var translate = _ref2.translate;
237
+ let {
238
+ translate
239
+ } = _ref2;
266
240
  return /*#__PURE__*/jsx("div", {
267
241
  className: classNames(modules_47759f5e.profileEmpty, className),
268
242
  children: /*#__PURE__*/jsx(Button, {
@@ -6,9 +6,7 @@ export { S as default } from '../_helpers/services-link.js';
6
6
  import 'react/jsx-runtime';
7
7
  import 'classnames';
8
8
  import '../global/data-tests.js';
9
- import 'core-js/modules/es.array.concat.js';
10
9
  import 'core-js/modules/es.array.reduce.js';
11
- import 'core-js/modules/es.object.entries.js';
12
- import 'core-js/modules/es.object.to-string.js';
10
+ import 'core-js/modules/web.dom-collections.iterator.js';
13
11
  import '../link/clickableLink.js';
14
12
  import '../_helpers/link.js';
@@ -1,9 +1,6 @@
1
- import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, d as _objectSpread2, j as _toConsumableArray, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/es.array.concat.js';
3
- import 'core-js/modules/es.array.filter.js';
4
- import 'core-js/modules/es.array.map.js';
1
+ import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
5
2
  import 'core-js/modules/es.array.sort.js';
6
- import 'core-js/modules/es.object.to-string.js';
3
+ import 'core-js/modules/web.dom-collections.iterator.js';
7
4
  import { PureComponent } from 'react';
8
5
  import PropTypes from 'prop-types';
9
6
  import servicesIcon from '@jetbrains/icons/services-20px';
@@ -16,7 +13,6 @@ import { S as ServicesLink, m as modules_74a7bf8b } from '../_helpers/services-l
16
13
  import { jsx, jsxs } from 'react/jsx-runtime';
17
14
  import '../global/data-tests.js';
18
15
  import 'core-js/modules/es.array.reduce.js';
19
- import 'core-js/modules/es.object.entries.js';
20
16
  import '../global/typescript-utils.js';
21
17
  import '../_helpers/anchor.js';
22
18
  import '@jetbrains/icons/chevron-10px';
@@ -26,34 +22,18 @@ import '../icon/icon__constants.js';
26
22
  import '../_helpers/icon__svg.js';
27
23
  import 'core-js/modules/es.regexp.exec.js';
28
24
  import 'core-js/modules/es.string.replace.js';
29
- import 'core-js/modules/es.string.starts-with.js';
30
25
  import '../global/memoize.js';
31
- import 'core-js/modules/es.array.iterator.js';
32
- import 'core-js/modules/es.map.js';
33
- import 'core-js/modules/es.weak-map.js';
34
- import 'core-js/modules/web.dom-collections.iterator.js';
35
26
  import '../button/button.js';
36
27
  import '@jetbrains/icons/chevron-down';
37
28
  import '../link/clickableLink.js';
38
29
  import '../global/controls-height.js';
39
30
  import '../_helpers/button__classes.js';
40
- import 'core-js/modules/es.regexp.to-string.js';
41
- import 'core-js/modules/web.dom-collections.for-each.js';
42
31
  import 'react-dom';
43
32
  import '../global/get-uid.js';
44
33
  import '../global/schedule-raf.js';
45
34
  import '../global/dom.js';
46
- import 'core-js/modules/es.object.assign.js';
47
- import 'core-js/modules/es.set.js';
48
- import 'core-js/modules/es.string.split.js';
49
35
  import '../shortcuts/shortcuts.js';
50
36
  import '../shortcuts/core.js';
51
- import 'core-js/modules/es.array.find-index.js';
52
- import 'core-js/modules/es.array.includes.js';
53
- import 'core-js/modules/es.array.slice.js';
54
- import 'core-js/modules/es.array.splice.js';
55
- import 'core-js/modules/es.string.includes.js';
56
- import 'core-js/modules/es.string.match.js';
57
37
  import 'combokeys';
58
38
  import '../global/sniffer.js';
59
39
  import 'sniffr';
@@ -65,10 +45,12 @@ import '../_helpers/header.js';
65
45
  import '../link/link.js';
66
46
  import '../_helpers/link.js';
67
47
 
68
- var _excluded = ["clientId", "loading", "services", "initShown", "theme"];
69
- var makeAnchor = function makeAnchor(loading) {
70
- var Anchor = function Anchor(_ref) {
71
- var active = _ref.active;
48
+ const _excluded = ["clientId", "loading", "services", "initShown", "theme"];
49
+ const makeAnchor = loading => {
50
+ const Anchor = _ref => {
51
+ let {
52
+ active
53
+ } = _ref;
72
54
  return /*#__PURE__*/jsx(HeaderIcon, {
73
55
  loader: loading,
74
56
  active: active,
@@ -81,80 +63,65 @@ var makeAnchor = function makeAnchor(loading) {
81
63
  };
82
64
  return Anchor;
83
65
  };
84
- var Services = /*#__PURE__*/function (_PureComponent) {
85
- function Services() {
86
- var _this;
87
- _classCallCheck(this, Services);
88
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
89
- args[_key] = arguments[_key];
90
- }
91
- _this = _callSuper(this, Services, [].concat(args));
92
- _defineProperty(_this, "serviceIsActive", function (service) {
93
- return service.id === _this.props.clientId;
94
- });
95
- return _this;
66
+ class Services extends PureComponent {
67
+ constructor() {
68
+ super(...arguments);
69
+ _defineProperty(this, "serviceIsActive", service => service.id === this.props.clientId);
96
70
  }
97
- _inherits(Services, _PureComponent);
98
- return _createClass(Services, [{
99
- key: "render",
100
- value: function render() {
101
- var _this2 = this;
102
- var _this$props = this.props;
103
- _this$props.clientId;
104
- var loading = _this$props.loading,
105
- services = _this$props.services,
106
- initShown = _this$props.initShown,
107
- theme = _this$props.theme,
108
- props = _objectWithoutProperties(_this$props, _excluded);
109
- if (!services) {
110
- return /*#__PURE__*/jsx(HeaderIcon, _objectSpread2(_objectSpread2({}, props), {}, {
111
- loader: loading,
112
- active: loading,
113
- icon: servicesIcon,
114
- "aria-label": "Services"
115
- }));
116
- }
117
- var sortedServices = _toConsumableArray(services).sort(Services.sort);
118
- var servicesWithIcons = sortedServices.filter(function (service) {
119
- return service.iconUrl && service.homeUrl;
120
- });
121
- var servicesWithOutIcons = sortedServices.filter(function (service) {
122
- return !service.iconUrl && service.homeUrl;
123
- });
124
- var separatorIsRequired = servicesWithIcons.length !== 0 && servicesWithOutIcons.length !== 0;
125
- return /*#__PURE__*/jsx(Dropdown, _objectSpread2(_objectSpread2({}, props), {}, {
126
- anchor: makeAnchor(loading),
127
- initShown: initShown,
128
- children: /*#__PURE__*/jsxs(Popup, {
129
- className: classNames(modules_74a7bf8b.services, {
130
- [modules_59717246.dark]: theme === Theme.DARK
131
- }),
132
- top: -3,
133
- children: [servicesWithIcons.map(function (service) {
134
- var isActive = _this2.serviceIsActive(service);
135
- return /*#__PURE__*/jsx(Services.Link, {
136
- active: isActive,
137
- className: isActive ? modules_74a7bf8b.activeItem : modules_74a7bf8b.item,
138
- service: service
139
- }, service.id);
140
- }), separatorIsRequired && /*#__PURE__*/jsx("div", {
141
- className: modules_74a7bf8b.line
142
- }, "separator"), servicesWithOutIcons.map(function (service) {
143
- var isActive = _this2.serviceIsActive(service);
144
- return /*#__PURE__*/jsx(Services.Link, {
145
- active: isActive,
146
- className: isActive ? modules_74a7bf8b.activeItemStacked : modules_74a7bf8b.itemStacked,
147
- service: service
148
- }, service.id);
149
- })]
150
- })
71
+ render() {
72
+ const _this$props = this.props,
73
+ {
74
+ clientId,
75
+ loading,
76
+ services,
77
+ initShown,
78
+ theme
79
+ } = _this$props,
80
+ props = _objectWithoutProperties(_this$props, _excluded);
81
+ if (!services) {
82
+ return /*#__PURE__*/jsx(HeaderIcon, _objectSpread2(_objectSpread2({}, props), {}, {
83
+ loader: loading,
84
+ active: loading,
85
+ icon: servicesIcon,
86
+ "aria-label": "Services"
151
87
  }));
152
88
  }
153
- }]);
154
- }(PureComponent);
155
- _defineProperty(Services, "sort", function (a, b) {
156
- var aApplicationName = a.applicationName || '';
157
- var bApplicationName = b.applicationName || '';
89
+ const sortedServices = [...services].sort(Services.sort);
90
+ const servicesWithIcons = sortedServices.filter(service => service.iconUrl && service.homeUrl);
91
+ const servicesWithOutIcons = sortedServices.filter(service => !service.iconUrl && service.homeUrl);
92
+ const separatorIsRequired = servicesWithIcons.length !== 0 && servicesWithOutIcons.length !== 0;
93
+ return /*#__PURE__*/jsx(Dropdown, _objectSpread2(_objectSpread2({}, props), {}, {
94
+ anchor: makeAnchor(loading),
95
+ initShown: initShown,
96
+ children: /*#__PURE__*/jsxs(Popup, {
97
+ className: classNames(modules_74a7bf8b.services, {
98
+ [modules_59717246.dark]: theme === Theme.DARK
99
+ }),
100
+ top: -3,
101
+ children: [servicesWithIcons.map(service => {
102
+ const isActive = this.serviceIsActive(service);
103
+ return /*#__PURE__*/jsx(Services.Link, {
104
+ active: isActive,
105
+ className: isActive ? modules_74a7bf8b.activeItem : modules_74a7bf8b.item,
106
+ service: service
107
+ }, service.id);
108
+ }), separatorIsRequired && /*#__PURE__*/jsx("div", {
109
+ className: modules_74a7bf8b.line
110
+ }, "separator"), servicesWithOutIcons.map(service => {
111
+ const isActive = this.serviceIsActive(service);
112
+ return /*#__PURE__*/jsx(Services.Link, {
113
+ active: isActive,
114
+ className: isActive ? modules_74a7bf8b.activeItemStacked : modules_74a7bf8b.itemStacked,
115
+ service: service
116
+ }, service.id);
117
+ })]
118
+ })
119
+ }));
120
+ }
121
+ }
122
+ _defineProperty(Services, "sort", (a, b) => {
123
+ const aApplicationName = a.applicationName || '';
124
+ const bApplicationName = b.applicationName || '';
158
125
  return aApplicationName.localeCompare(bApplicationName) || a.name.localeCompare(b.name);
159
126
  });
160
127
  _defineProperty(Services, "propTypes", {