@jetbrains/ring-ui 5.0.127 → 5.0.129

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 (310) hide show
  1. package/components/alert/alert.js +2 -1
  2. package/components/alert/container.js +2 -1
  3. package/components/auth/auth__core.js +2 -1
  4. package/components/auth/request-builder.js +2 -1
  5. package/components/auth/response-parser.js +2 -1
  6. package/components/auth/token-validator.js +2 -1
  7. package/components/auth-dialog/auth-dialog.js +2 -1
  8. package/components/avatar/avatar.js +2 -1
  9. package/components/badge/badge.js +2 -1
  10. package/components/button/button.js +2 -1
  11. package/components/button-group/button-group.js +2 -1
  12. package/components/button-group/caption.js +2 -1
  13. package/components/button-set/button-set.js +2 -1
  14. package/components/button-toolbar/button-toolbar.js +2 -1
  15. package/components/caret/caret.js +2 -1
  16. package/components/checkbox/checkbox.js +2 -1
  17. package/components/code/code.js +2 -1
  18. package/components/confirm/confirm.js +2 -1
  19. package/components/content-layout/content-layout.js +2 -1
  20. package/components/content-layout/sidebar.js +2 -1
  21. package/components/data-list/data-list.js +2 -1
  22. package/components/data-list/item.js +2 -1
  23. package/components/date-picker/date-input.js +2 -1
  24. package/components/date-picker/date-picker.js +2 -1
  25. package/components/date-picker/date-popup.js +2 -1
  26. package/components/date-picker/day.js +2 -1
  27. package/components/date-picker/month-slider.js +2 -1
  28. package/components/date-picker/years.js +2 -1
  29. package/components/dialog/dialog.d.ts +4 -16
  30. package/components/dialog/dialog.js +6 -3
  31. package/components/dropdown/dropdown.js +2 -1
  32. package/components/error-bubble/error-bubble.js +2 -1
  33. package/components/error-message/error-message.js +2 -1
  34. package/components/footer/footer.js +1 -0
  35. package/components/global/react-dom-renderer.js +2 -1
  36. package/components/grid/col.js +2 -1
  37. package/components/grid/grid.js +2 -1
  38. package/components/grid/row.js +2 -1
  39. package/components/group/group.js +2 -1
  40. package/components/header/logo.js +2 -1
  41. package/components/header/profile.js +2 -1
  42. package/components/header/services-link.js +2 -1
  43. package/components/header/services.js +2 -1
  44. package/components/header/smart-profile.js +2 -1
  45. package/components/header/smart-services.js +2 -1
  46. package/components/header/tray-icon.js +2 -1
  47. package/components/header/tray.js +2 -1
  48. package/components/hub-source/hub-source.js +2 -1
  49. package/components/icon/icon.js +2 -1
  50. package/components/input/input.js +2 -1
  51. package/components/island/island.js +2 -1
  52. package/components/island-legacy/content-legacy.js +2 -1
  53. package/components/island-legacy/header-legacy.js +2 -1
  54. package/components/island-legacy/island-legacy.js +2 -1
  55. package/components/link/clickableLink.js +2 -1
  56. package/components/list/list.js +2 -1
  57. package/components/list/list__hint.js +2 -1
  58. package/components/list/list__users-groups-source.js +2 -1
  59. package/components/loader/loader.js +2 -1
  60. package/components/loader/loader__core.js +2 -1
  61. package/components/loader-screen/loader-screen.js +2 -1
  62. package/components/login-dialog/login-dialog.js +2 -1
  63. package/components/message/message.js +2 -1
  64. package/components/pager/pager.js +2 -1
  65. package/components/panel/panel.js +2 -1
  66. package/components/permissions/permissions.js +2 -1
  67. package/components/permissions/permissions__cache.js +2 -1
  68. package/components/popup/popup.js +2 -1
  69. package/components/popup-menu/popup-menu.js +2 -1
  70. package/components/progress-bar/progress-bar.js +2 -1
  71. package/components/query-assist/query-assist.js +4 -3
  72. package/components/radio/radio.js +2 -1
  73. package/components/radio/radio__item.js +2 -1
  74. package/components/select/select.js +2 -1
  75. package/components/select/select__filter.js +2 -1
  76. package/components/select/select__popup.js +4 -2
  77. package/components/shortcuts/shortcuts.js +2 -1
  78. package/components/storage/storage__fallback.js +2 -1
  79. package/components/tab-trap/tab-trap.js +2 -1
  80. package/components/table/cell.js +2 -1
  81. package/components/table/header-cell.js +2 -1
  82. package/components/table/header.js +2 -1
  83. package/components/table/multitable.js +2 -1
  84. package/components/table/row.d.ts +1 -0
  85. package/components/table/row.js +6 -4
  86. package/components/table/smart-table.d.ts +1 -0
  87. package/components/table/table.d.ts +2 -0
  88. package/components/table/table.js +8 -4
  89. package/components/tabs/smart-tabs.js +2 -1
  90. package/components/tabs/tab.js +2 -1
  91. package/components/tag/tag.js +2 -1
  92. package/components/tags-input/tags-input.d.ts +1 -1
  93. package/components/tags-input/tags-input.js +3 -2
  94. package/components/tags-list/tags-list.js +2 -1
  95. package/components/text/text.js +2 -1
  96. package/components/tooltip/tooltip.js +2 -1
  97. package/components/user-agreement/user-agreement.js +2 -1
  98. package/components/user-card/card.js +2 -1
  99. package/components/user-card/smart-user-card-tooltip.d.ts +1 -1
  100. package/components/user-card/smart-user-card-tooltip.js +2 -1
  101. package/components/user-card/tooltip.js +2 -1
  102. package/dist/_helpers/_rollupPluginBabelHelpers.js +1 -29
  103. package/dist/_helpers/anchor.js +1 -1
  104. package/dist/_helpers/card.js +44 -47
  105. package/dist/_helpers/footer.js +1 -0
  106. package/dist/_helpers/select__filter.js +10 -13
  107. package/dist/_helpers/services-link.js +10 -10
  108. package/dist/_helpers/sidebar.js +34 -37
  109. package/dist/_helpers/theme.js +1 -1
  110. package/dist/_helpers/title.js +12 -16
  111. package/dist/alert/alert.js +63 -66
  112. package/dist/alert/container.js +5 -5
  113. package/dist/alert-service/alert-service.js +5 -7
  114. package/dist/analytics/analytics.js +1 -2
  115. package/dist/analytics/analytics__custom-plugin.js +6 -8
  116. package/dist/auth/auth.js +1 -1
  117. package/dist/auth/auth__core.js +26 -26
  118. package/dist/auth/background-flow.js +4 -5
  119. package/dist/auth/iframe-flow.js +12 -12
  120. package/dist/auth/landing.js +1 -1
  121. package/dist/auth/request-builder.js +3 -5
  122. package/dist/auth/response-parser.js +5 -6
  123. package/dist/auth/storage.js +12 -12
  124. package/dist/auth/token-validator.js +13 -16
  125. package/dist/auth/window-flow.js +18 -19
  126. package/dist/auth-dialog/auth-dialog.js +54 -57
  127. package/dist/auth-dialog-service/auth-dialog-service.js +1 -1
  128. package/dist/auth-ng/auth-ng.js +1 -1
  129. package/dist/avatar/avatar.js +30 -33
  130. package/dist/avatar-ng/avatar-ng.js +1 -1
  131. package/dist/badge/badge.js +10 -10
  132. package/dist/badge-ng/badge-ng.js +1 -1
  133. package/dist/breadcrumb-ng/breadcrumb-ng.js +0 -1
  134. package/dist/button/button.js +24 -27
  135. package/dist/button-group/button-group.js +5 -5
  136. package/dist/button-group/caption.js +4 -4
  137. package/dist/button-ng/button-ng.js +68 -69
  138. package/dist/button-set/button-set.js +6 -6
  139. package/dist/button-toolbar/button-toolbar.js +6 -6
  140. package/dist/caret/caret.js +2 -4
  141. package/dist/checkbox/checkbox.js +27 -30
  142. package/dist/checkbox-ng/checkbox-ng.js +0 -1
  143. package/dist/code/code.js +17 -21
  144. package/dist/confirm/confirm.js +31 -34
  145. package/dist/confirm-ng/confirm-ng.js +1 -1
  146. package/dist/confirm-service/confirm-service.js +1 -1
  147. package/dist/content-layout/content-layout.js +17 -20
  148. package/dist/contenteditable/contenteditable.js +11 -11
  149. package/dist/data-list/data-list.js +49 -55
  150. package/dist/data-list/item.js +64 -67
  151. package/dist/data-list/selection.js +0 -1
  152. package/dist/data-list/title.js +1 -1
  153. package/dist/data-list-ng/data-list-ng.js +1 -1
  154. package/dist/date-picker/date-input.js +39 -42
  155. package/dist/date-picker/date-picker.js +162 -165
  156. package/dist/date-picker/date-popup.js +119 -119
  157. package/dist/date-picker/day.js +34 -38
  158. package/dist/date-picker/month-names.js +11 -14
  159. package/dist/date-picker/month-slider.js +24 -28
  160. package/dist/date-picker/month.js +1 -1
  161. package/dist/date-picker/months.js +1 -1
  162. package/dist/date-picker/years.js +9 -13
  163. package/dist/dialog/dialog.d.ts +4 -16
  164. package/dist/dialog/dialog.js +68 -65
  165. package/dist/dialog-ng/dialog-ng.js +21 -22
  166. package/dist/docked-panel-ng/docked-panel-ng.js +0 -1
  167. package/dist/dropdown/dropdown.js +101 -104
  168. package/dist/dropdown-menu/dropdown-menu.js +1 -1
  169. package/dist/editable-heading/editable-heading.js +1 -1
  170. package/dist/error-bubble/error-bubble.js +6 -6
  171. package/dist/error-message/error-message.js +10 -10
  172. package/dist/error-message-ng/error-message-ng.js +0 -1
  173. package/dist/footer-ng/footer-ng.js +19 -21
  174. package/dist/global/angular-component-factory.js +2 -3
  175. package/dist/global/dom.js +1 -5
  176. package/dist/global/focus-sensor-hoc.js +58 -61
  177. package/dist/global/listeners.js +1 -5
  178. package/dist/global/react-dom-renderer.js +8 -12
  179. package/dist/global/rerender-hoc.js +1 -5
  180. package/dist/global/ring-angular-component.js +1 -3
  181. package/dist/grid/col.js +13 -14
  182. package/dist/grid/grid.js +5 -5
  183. package/dist/grid/row.js +16 -17
  184. package/dist/group/group.js +5 -5
  185. package/dist/header/header.js +10 -10
  186. package/dist/header/logo.js +9 -9
  187. package/dist/header/profile.js +58 -58
  188. package/dist/header/services.js +19 -22
  189. package/dist/header/smart-profile.js +40 -43
  190. package/dist/header/smart-services.js +28 -31
  191. package/dist/header/tray-icon.js +6 -6
  192. package/dist/header/tray.js +5 -5
  193. package/dist/heading/heading.js +1 -1
  194. package/dist/heading-ng/heading-ng.js +1 -1
  195. package/dist/http/http.js +111 -107
  196. package/dist/http/http.mock.js +3 -4
  197. package/dist/hub-source/hub-source.js +7 -9
  198. package/dist/hub-source/hub-source__user.js +0 -1
  199. package/dist/hub-source/hub-source__users-groups.js +4 -5
  200. package/dist/icon/icon.js +18 -18
  201. package/dist/icon/icon__svg.js +1 -1
  202. package/dist/icon-ng/icon-ng.js +0 -1
  203. package/dist/input/input.js +35 -38
  204. package/dist/input-ng/input-ng.js +25 -26
  205. package/dist/island/adaptive-island-hoc.js +21 -25
  206. package/dist/island/content.js +62 -65
  207. package/dist/island/header.js +11 -11
  208. package/dist/island/island.js +8 -8
  209. package/dist/island-legacy/content-legacy.js +5 -5
  210. package/dist/island-legacy/header-legacy.js +5 -5
  211. package/dist/island-legacy/island-legacy.js +5 -5
  212. package/dist/link/clickableLink.js +27 -30
  213. package/dist/link/link.js +16 -16
  214. package/dist/list/list.js +389 -391
  215. package/dist/list/list__custom.js +6 -10
  216. package/dist/list/list__hint.js +3 -4
  217. package/dist/list/list__item.js +4 -7
  218. package/dist/list/list__link.js +1 -1
  219. package/dist/list/list__users-groups-source.js +3 -3
  220. package/dist/loader/loader.js +16 -19
  221. package/dist/loader/loader__core.js +62 -62
  222. package/dist/loader-inline/loader-inline.js +6 -6
  223. package/dist/loader-ng/loader-ng.js +3 -4
  224. package/dist/loader-screen/loader-screen.js +6 -6
  225. package/dist/loader-screen-ng/loader-screen-ng.js +0 -1
  226. package/dist/login-dialog/login-dialog.js +55 -58
  227. package/dist/login-dialog/service.js +1 -1
  228. package/dist/markdown/code.js +0 -1
  229. package/dist/markdown/markdown.js +1 -1
  230. package/dist/message/message.js +22 -25
  231. package/dist/old-browsers-message/white-list.js +2 -2
  232. package/dist/pager/pager.js +55 -58
  233. package/dist/pager-ng/pager-ng.js +1 -1
  234. package/dist/panel/panel.js +5 -5
  235. package/dist/panel-ng/panel-ng.js +0 -1
  236. package/dist/permissions/permissions.js +14 -16
  237. package/dist/permissions/permissions__cache.js +4 -6
  238. package/dist/permissions-ng/permissions-ng.js +1 -1
  239. package/dist/place-under-ng/place-under-ng.js +0 -1
  240. package/dist/popup/popup.js +118 -121
  241. package/dist/popup/popup.target.js +1 -1
  242. package/dist/popup/position.js +0 -1
  243. package/dist/popup-menu/popup-menu.js +19 -22
  244. package/dist/progress-bar/progress-bar.js +41 -44
  245. package/dist/progress-bar-ng/progress-bar-ng.js +1 -1
  246. package/dist/promised-click-ng/promised-click-ng.js +0 -1
  247. package/dist/query-assist/query-assist.js +507 -501
  248. package/dist/query-assist/query-assist__suggestions.js +1 -1
  249. package/dist/query-assist-ng/query-assist-ng.js +1 -1
  250. package/dist/radio/radio.js +10 -13
  251. package/dist/radio/radio__item.js +19 -22
  252. package/dist/select/select.js +350 -349
  253. package/dist/select/select__popup.js +148 -152
  254. package/dist/select-ng/select-ng.js +1 -1
  255. package/dist/select-ng/select-ng__lazy.js +4 -4
  256. package/dist/select-ng/select-ng__options.js +14 -15
  257. package/dist/shortcuts/core.js +35 -36
  258. package/dist/shortcuts/shortcuts-hoc.js +7 -11
  259. package/dist/shortcuts/shortcuts.js +10 -11
  260. package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +0 -1
  261. package/dist/shortcuts-ng/shortcuts-ng.js +0 -1
  262. package/dist/sidebar-ng/sidebar-ng.js +0 -1
  263. package/dist/storage/storage.js +1 -1
  264. package/dist/storage/storage__fallback.js +8 -10
  265. package/dist/storage/storage__local.js +2 -2
  266. package/dist/style.css +1 -1
  267. package/dist/tab-trap/tab-trap.js +84 -86
  268. package/dist/table/cell.js +6 -6
  269. package/dist/table/disable-hover-hoc.js +23 -25
  270. package/dist/table/header-cell.js +28 -31
  271. package/dist/table/header.js +58 -61
  272. package/dist/table/multitable.js +91 -95
  273. package/dist/table/row-with-focus-sensor.js +15 -18
  274. package/dist/table/row.d.ts +1 -0
  275. package/dist/table/row.js +54 -55
  276. package/dist/table/selection-shortcuts-hoc.js +145 -147
  277. package/dist/table/selection.js +7 -9
  278. package/dist/table/smart-table.d.ts +1 -0
  279. package/dist/table/smart-table.js +21 -24
  280. package/dist/table/table.d.ts +2 -0
  281. package/dist/table/table.js +107 -109
  282. package/dist/table-legacy-ng/table-legacy-ng.js +1 -1
  283. package/dist/table-legacy-ng/table-legacy-ng__pager.js +1 -1
  284. package/dist/table-legacy-ng/table-legacy-ng__selection.js +1 -3
  285. package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +0 -1
  286. package/dist/table-ng/smart-table-ng.js +1 -1
  287. package/dist/table-ng/table-ng.js +1 -1
  288. package/dist/tabs/collapsible-more.js +1 -1
  289. package/dist/tabs/collapsible-tab.js +1 -1
  290. package/dist/tabs/dumb-tabs.js +46 -49
  291. package/dist/tabs/smart-tabs.js +10 -10
  292. package/dist/tabs/tab.js +7 -8
  293. package/dist/tag/tag.js +42 -45
  294. package/dist/tags-input/tags-input.d.ts +1 -1
  295. package/dist/tags-input/tags-input.js +214 -213
  296. package/dist/tags-input-ng/tags-input-ng.js +1 -1
  297. package/dist/tags-list/tags-list.js +20 -20
  298. package/dist/template-ng/template-ng.js +25 -26
  299. package/dist/text/text.js +6 -6
  300. package/dist/toggle/toggle.js +19 -19
  301. package/dist/toggle-ng/toggle-ng.js +1 -1
  302. package/dist/tooltip/tooltip.js +86 -89
  303. package/dist/tooltip-ng/tooltip-ng.js +1 -1
  304. package/dist/user-agreement/service.js +207 -205
  305. package/dist/user-agreement/user-agreement.js +39 -42
  306. package/dist/user-card/smart-user-card-tooltip.d.ts +1 -1
  307. package/dist/user-card/smart-user-card-tooltip.js +32 -35
  308. package/dist/user-card/tooltip.js +26 -26
  309. package/dist/user-card-ng/user-card-ng.js +1 -1
  310. package/package.json +17 -17
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, a as _extends } from './_rollupPluginBabelHelpers.js';
1
+ import { _ as _extends } from './_rollupPluginBabelHelpers.js';
2
2
  import React, { Component } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
@@ -9,36 +9,38 @@ var modules_b8a9dd4f = {"unit":"i__const_unit_0","extra-small-screen-media":"i__
9
9
  const ABOVE = 'above';
10
10
  const INSIDE = 'inside';
11
11
  class Sidebar extends Component {
12
- constructor() {
13
- super(...arguments);
14
- _defineProperty(this, "state", {
15
- topIsOutside: true,
16
- bottomIsOutside: true,
17
- sidebarVisibleHeight: undefined
12
+ static propTypes = {
13
+ right: PropTypes.bool,
14
+ children: PropTypes.node,
15
+ className: PropTypes.string,
16
+ containerClassName: PropTypes.string,
17
+ fixedClassName: PropTypes.string,
18
+ contentNode: PropTypes.object
19
+ };
20
+ state = {
21
+ topIsOutside: true,
22
+ bottomIsOutside: true,
23
+ sidebarVisibleHeight: undefined
24
+ };
25
+ sidebarNode;
26
+ handleTopWaypoint = _ref => {
27
+ let {
28
+ currentPosition
29
+ } = _ref;
30
+ this.setState({
31
+ topIsOutside: currentPosition === ABOVE
18
32
  });
19
- _defineProperty(this, "sidebarNode", void 0);
20
- _defineProperty(this, "handleTopWaypoint", _ref => {
21
- let {
22
- currentPosition
23
- } = _ref;
24
- this.setState({
25
- topIsOutside: currentPosition === ABOVE
26
- });
33
+ };
34
+ handleBottomWaypoint = _ref2 => {
35
+ let {
36
+ currentPosition,
37
+ waypointTop
38
+ } = _ref2;
39
+ this.setState({
40
+ sidebarVisibleHeight: waypointTop,
41
+ bottomIsOutside: currentPosition !== INSIDE
27
42
  });
28
- _defineProperty(this, "handleBottomWaypoint", _ref2 => {
29
- let {
30
- currentPosition,
31
- waypointTop
32
- } = _ref2;
33
- this.setState({
34
- sidebarVisibleHeight: waypointTop,
35
- bottomIsOutside: currentPosition !== INSIDE
36
- });
37
- });
38
- _defineProperty(this, "sidebarRef", node => {
39
- this.sidebarNode = node;
40
- });
41
- }
43
+ };
42
44
  shouldUseFixation() {
43
45
  const {
44
46
  contentNode
@@ -58,6 +60,9 @@ class Sidebar extends Component {
58
60
  } = this.state;
59
61
  return !bottomIsOutside && topIsOutside && this.shouldUseFixation();
60
62
  }
63
+ sidebarRef = node => {
64
+ this.sidebarNode = node;
65
+ };
61
66
  render() {
62
67
  const {
63
68
  right,
@@ -104,13 +109,5 @@ class Sidebar extends Component {
104
109
  })));
105
110
  }
106
111
  }
107
- _defineProperty(Sidebar, "propTypes", {
108
- right: PropTypes.bool,
109
- children: PropTypes.node,
110
- className: PropTypes.string,
111
- containerClassName: PropTypes.string,
112
- fixedClassName: PropTypes.string,
113
- contentNode: PropTypes.object
114
- });
115
112
 
116
113
  export { Sidebar as S, modules_b8a9dd4f as m };
@@ -1,4 +1,4 @@
1
- import { a as _extends } from './_rollupPluginBabelHelpers.js';
1
+ import { _ as _extends } from './_rollupPluginBabelHelpers.js';
2
2
  import React, { useState, useEffect, forwardRef, useMemo, useContext } from 'react';
3
3
  import classNames from 'classnames';
4
4
  import { createPortal } from 'react-dom';
@@ -1,4 +1,3 @@
1
- import { _ as _defineProperty } from './_rollupPluginBabelHelpers.js';
2
1
  import React, { PureComponent } from 'react';
3
2
  import PropTypes from 'prop-types';
4
3
  import classNames from 'classnames';
@@ -10,16 +9,18 @@ import { refObject } from '../global/prop-types.js';
10
9
  var modules_09d014b4 = {"unit":"i__const_unit_0","height":"i__const_height_1","compensate":"i__const_compensate_2","light":"light_rui_9f76","dataListWrapper":"dataListWrapper_rui_9f76","dataList":"dataList_rui_9f76","itemContent":"itemContent_rui_9f76","title":"title_rui_9f76","disabledHover":"disabledHover_rui_9f76","titleSelected":"titleSelected_rui_9f76","titleFocused":"titleFocused_rui_9f76","showMore":"showMore_rui_9f76","boxes":"boxes_rui_9f76","checkboxBox":"checkboxBox_rui_9f76","collapseButton":"collapseButton_rui_9f76","collapseIcon":"collapseIcon_rui_9f76","loadingOverlay":"loadingOverlay_rui_9f76","showMoreLoader":"showMoreLoader_rui_9f76"};
11
10
 
12
11
  class Title extends PureComponent {
13
- constructor() {
14
- super(...arguments);
15
- _defineProperty(this, "id", getUID('data-list-title'));
16
- _defineProperty(this, "onCheckboxFocus", () => {
17
- this.props.onFocusRestore();
18
- });
19
- _defineProperty(this, "onCheckboxChange", () => {
20
- this.toggleSelection();
21
- });
22
- }
12
+ static defaultProps = {
13
+ selectable: false,
14
+ selected: false,
15
+ showFocus: false
16
+ };
17
+ id = getUID('data-list-title');
18
+ onCheckboxFocus = () => {
19
+ this.props.onFocusRestore();
20
+ };
21
+ onCheckboxChange = () => {
22
+ this.toggleSelection();
23
+ };
23
24
  toggleSelection() {
24
25
  const {
25
26
  selectable,
@@ -67,11 +68,6 @@ class Title extends PureComponent {
67
68
  })), collapserExpander), title);
68
69
  }
69
70
  }
70
- _defineProperty(Title, "defaultProps", {
71
- selectable: false,
72
- selected: false,
73
- showFocus: false
74
- });
75
71
  Title.propTypes = {
76
72
  className: PropTypes.string,
77
73
  title: PropTypes.node,
@@ -1,4 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import React, { PureComponent } from 'react';
3
2
  import classNames from 'classnames';
4
3
  import PropTypes from 'prop-types';
@@ -14,6 +13,7 @@ import { Button } from '../button/button.js';
14
13
  import { T as Theme, a as ThemeProvider } from '../_helpers/theme.js';
15
14
  export { default as Container } from './container.js';
16
15
  import { Color } from '../icon/icon__constants.js';
16
+ import '../_helpers/_rollupPluginBabelHelpers.js';
17
17
  import 'util-deprecate';
18
18
  import '../_helpers/icon.js';
19
19
  import '../icon/icon__svg.js';
@@ -83,36 +83,45 @@ const TypeToIconColor = {
83
83
  * **Alert** is a component for displaying contextual notifications. If you want to display a stack of notifications, use **Alerts** instead.
84
84
  */
85
85
  class Alert extends PureComponent {
86
- constructor() {
87
- super(...arguments);
88
- _defineProperty(this, "state", {
89
- height: null
90
- });
91
- _defineProperty(this, "node", void 0);
92
- _defineProperty(this, "hideTimeout", void 0);
93
- _defineProperty(this, "closeRequest", event => {
94
- this.startCloseAnimation();
95
- return this.props.onCloseRequest(event);
96
- });
97
- _defineProperty(this, "startCloseAnimation", () => {
98
- const height = getRect(this.node).height;
99
- this.setState({
100
- height
101
- });
102
- });
86
+ static propTypes = {
87
+ timeout: PropTypes.number,
103
88
  /**
104
- * @param {SyntheticEvent} evt
105
- * @private
89
+ * Fires when alert starts closing if timeout is out or user clicks "Close" button
106
90
  */
107
- _defineProperty(this, "_handleCaptionsLinksClick", evt => {
108
- if (evt.target instanceof Element && evt.target.matches('a')) {
109
- this.closeRequest(evt);
110
- }
111
- });
112
- _defineProperty(this, "storeAlertRef", node => {
113
- this.node = node;
114
- });
115
- }
91
+ onCloseRequest: PropTypes.func,
92
+ onClose: PropTypes.func,
93
+ isShaking: PropTypes.bool,
94
+ isClosing: PropTypes.bool,
95
+ /**
96
+ * Whether an alert is rendered inside an **Alerts** container
97
+ * or standalone.
98
+ */
99
+ inline: PropTypes.bool,
100
+ showWithAnimation: PropTypes.bool,
101
+ closeable: PropTypes.bool,
102
+ type: PropTypes.oneOf(Object.values(AlertType)),
103
+ children: PropTypes.node,
104
+ className: PropTypes.string,
105
+ captionClassName: PropTypes.string,
106
+ closeButtonClassName: PropTypes.string,
107
+ 'data-test': PropTypes.string
108
+ };
109
+ /** @override */
110
+ static defaultProps = {
111
+ theme: Theme.DARK,
112
+ closeable: true,
113
+ showWithAnimation: true,
114
+ type: AlertType.MESSAGE,
115
+ inline: true,
116
+ isClosing: false,
117
+ isShaking: false,
118
+ timeout: 0,
119
+ onClose: () => {},
120
+ onCloseRequest: () => {}
121
+ };
122
+ state = {
123
+ height: null
124
+ };
116
125
  componentDidMount() {
117
126
  if (this.props.timeout > 0) {
118
127
  this.hideTimeout = window.setTimeout(this.closeRequest, this.props.timeout);
@@ -126,12 +135,34 @@ class Alert extends PureComponent {
126
135
  componentWillUnmount() {
127
136
  clearTimeout(this.hideTimeout);
128
137
  }
138
+ node;
139
+ hideTimeout;
140
+ static Type = AlertType;
141
+ closeRequest = event => {
142
+ this.startCloseAnimation();
143
+ return this.props.onCloseRequest(event);
144
+ };
145
+ startCloseAnimation = () => {
146
+ const height = getRect(this.node).height;
147
+ this.setState({
148
+ height
149
+ });
150
+ };
129
151
  _close() {
130
152
  this.startCloseAnimation();
131
153
  setTimeout(() => {
132
154
  this.props.onClose();
133
155
  }, ANIMATION_TIME);
134
156
  }
157
+ /**
158
+ * @param {SyntheticEvent} evt
159
+ * @private
160
+ */
161
+ _handleCaptionsLinksClick = evt => {
162
+ if (evt.target instanceof Element && evt.target.matches('a')) {
163
+ this.closeRequest(evt);
164
+ }
165
+ };
135
166
  /**
136
167
  * @private
137
168
  */
@@ -165,6 +196,9 @@ class Alert extends PureComponent {
165
196
  }
166
197
  return '';
167
198
  }
199
+ storeAlertRef = node => {
200
+ this.node = node;
201
+ };
168
202
  render() {
169
203
  const {
170
204
  type,
@@ -205,42 +239,5 @@ class Alert extends PureComponent {
205
239
  }) : '');
206
240
  }
207
241
  }
208
- _defineProperty(Alert, "propTypes", {
209
- timeout: PropTypes.number,
210
- /**
211
- * Fires when alert starts closing if timeout is out or user clicks "Close" button
212
- */
213
- onCloseRequest: PropTypes.func,
214
- onClose: PropTypes.func,
215
- isShaking: PropTypes.bool,
216
- isClosing: PropTypes.bool,
217
- /**
218
- * Whether an alert is rendered inside an **Alerts** container
219
- * or standalone.
220
- */
221
- inline: PropTypes.bool,
222
- showWithAnimation: PropTypes.bool,
223
- closeable: PropTypes.bool,
224
- type: PropTypes.oneOf(Object.values(AlertType)),
225
- children: PropTypes.node,
226
- className: PropTypes.string,
227
- captionClassName: PropTypes.string,
228
- closeButtonClassName: PropTypes.string,
229
- 'data-test': PropTypes.string
230
- });
231
- /** @override */
232
- _defineProperty(Alert, "defaultProps", {
233
- theme: Theme.DARK,
234
- closeable: true,
235
- showWithAnimation: true,
236
- type: AlertType.MESSAGE,
237
- inline: true,
238
- isClosing: false,
239
- isShaking: false,
240
- timeout: 0,
241
- onClose: () => {},
242
- onCloseRequest: () => {}
243
- });
244
- _defineProperty(Alert, "Type", AlertType);
245
242
 
246
243
  export { ANIMATION_TIME, AlertType, Alert as default };
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import React, { PureComponent, Children, isValidElement, cloneElement } from 'react';
3
3
  import { createPortal } from 'react-dom';
4
4
  import classNames from 'classnames';
@@ -7,6 +7,10 @@ import PropTypes from 'prop-types';
7
7
  var modules_fc8df42d = {"unit":"i__const_unit_0","light":"light_rui_a9a3","alertContainer":"alertContainer_rui_a9a3","alertInContainer":"alertInContainer_rui_a9a3 alert_rui_2b32"};
8
8
 
9
9
  class Alerts extends PureComponent {
10
+ static propTypes = {
11
+ children: PropTypes.node,
12
+ className: PropTypes.string
13
+ };
10
14
  render() {
11
15
  const {
12
16
  children,
@@ -33,9 +37,5 @@ class Alerts extends PureComponent {
33
37
  })), document.body);
34
38
  }
35
39
  }
36
- _defineProperty(Alerts, "propTypes", {
37
- children: PropTypes.node,
38
- className: PropTypes.string
39
- });
40
40
 
41
41
  export { Alerts as default };
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import React from 'react';
3
3
  import { render } from '../global/react-render-adapter.js';
4
4
  import getUID from '../global/get-uid.js';
@@ -44,12 +44,10 @@ import '../popup/popup.consts.js';
44
44
  * @name Alert Service
45
45
  */
46
46
  class AlertService {
47
- constructor() {
48
- _defineProperty(this, "defaultTimeout", 0);
49
- // This alerts are stored in inverse order (last shown is first in array)
50
- _defineProperty(this, "showingAlerts", []);
51
- _defineProperty(this, "containerElement", document.createElement('div'));
52
- }
47
+ defaultTimeout = 0;
48
+ // This alerts are stored in inverse order (last shown is first in array)
49
+ showingAlerts = [];
50
+ containerElement = document.createElement('div');
53
51
  _getShowingAlerts() {
54
52
  return [...this.showingAlerts];
55
53
  }
@@ -1,4 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import deprecate from 'util-deprecate';
3
2
 
4
3
  const warnOnDeprecationOfAnalyticsMethod = methodName => deprecate(() => {}, `Method analytics::${methodName} is deprecated, use analytics::trackEvent instead`)();
@@ -6,8 +5,8 @@ const warnOnDeprecationOfAnalyticsMethod = methodName => deprecate(() => {}, `Me
6
5
  * @name Analytics
7
6
  */
8
7
  class Analytics {
8
+ _plugins;
9
9
  constructor() {
10
- _defineProperty(this, "_plugins", void 0);
11
10
  this._plugins = [];
12
11
  }
13
12
  config(plugins) {
@@ -1,15 +1,13 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
-
3
1
  const DEFAULT_FLUSH_INTERVAL = 10000;
4
2
  const DEFAULT_FLUSH_MAX_PACK_SIZE = 100;
5
3
  class AnalyticsCustomPlugin {
4
+ _data;
5
+ _flush;
6
+ _isDevelopment;
7
+ _flushInterval;
8
+ _flushMaxPackSize;
9
+ _hasSendSchedule;
6
10
  constructor(send, isDevelopment, flushInterval) {
7
- _defineProperty(this, "_data", void 0);
8
- _defineProperty(this, "_flush", void 0);
9
- _defineProperty(this, "_isDevelopment", void 0);
10
- _defineProperty(this, "_flushInterval", void 0);
11
- _defineProperty(this, "_flushMaxPackSize", void 0);
12
- _defineProperty(this, "_hasSendSchedule", void 0);
13
11
  this._data = [];
14
12
  this.config({
15
13
  send,
package/dist/auth/auth.js CHANGED
@@ -2,13 +2,13 @@ import WindowFlow from './window-flow.js';
2
2
  import onBackendDown from './down-notification.js';
3
3
  import Auth from './auth__core.js';
4
4
  export { DEFAULT_BACKGROUND_TIMEOUT, DEFAULT_EXPIRES_TIMEOUT, DOMAIN_USER_CHANGED_EVENT, LOGOUT_EVENT, LOGOUT_POSTPONED_EVENT, USER_CHANGED_EVENT, USER_CHANGE_POSTPONED_EVENT } from './auth__core.js';
5
- import '../_helpers/_rollupPluginBabelHelpers.js';
6
5
  import './response-parser.js';
7
6
  import 'es6-error';
8
7
  import '../global/url.js';
9
8
  import 'react';
10
9
  import 'prop-types';
11
10
  import '../alert-service/alert-service.js';
11
+ import '../_helpers/_rollupPluginBabelHelpers.js';
12
12
  import '../global/react-render-adapter.js';
13
13
  import 'react-dom';
14
14
  import '../global/get-uid.js';
@@ -1,4 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import { getAbsoluteBaseURL, fixUrl } from '../global/url.js';
3
2
  import Listeners from '../global/listeners.js';
4
3
  import HTTP from '../http/http.js';
@@ -12,6 +11,7 @@ import 'es6-error';
12
11
  import '../storage/storage.js';
13
12
  import '../storage/storage__local.js';
14
13
  import '../alert-service/alert-service.js';
14
+ import '../_helpers/_rollupPluginBabelHelpers.js';
15
15
  import 'react';
16
16
  import '../global/react-render-adapter.js';
17
17
  import 'react-dom';
@@ -106,24 +106,32 @@ const DEFAULT_CONFIG = {
106
106
  }
107
107
  };
108
108
  class Auth {
109
+ static DEFAULT_CONFIG = DEFAULT_CONFIG;
110
+ static API_PATH = 'api/rest/';
111
+ static API_AUTH_PATH = 'oauth2/auth';
112
+ static API_PROFILE_PATH = 'users/me';
113
+ static CLOSE_BACKEND_DOWN_MESSAGE = 'backend-check-succeeded';
114
+ static CLOSE_WINDOW_MESSAGE = 'close-login-window';
115
+ static shouldRefreshToken = TokenValidator.shouldRefreshToken;
116
+ static storageIsUnavailable = !navigator.cookieEnabled;
117
+ config;
118
+ listeners = new Listeners();
119
+ http;
120
+ _service = {};
121
+ _storage = null;
122
+ _responseParser = new AuthResponseParser();
123
+ _requestBuilder = null;
124
+ _backgroundFlow;
125
+ _embeddedFlow = null;
126
+ _tokenValidator = null;
127
+ _postponed = false;
128
+ _backendCheckPromise = null;
129
+ _authDialogService = undefined;
130
+ _domainStorage;
131
+ user = null;
132
+ _initDeferred;
133
+ _isLoginWindowOpen;
109
134
  constructor(config) {
110
- _defineProperty(this, "config", void 0);
111
- _defineProperty(this, "listeners", new Listeners());
112
- _defineProperty(this, "http", void 0);
113
- _defineProperty(this, "_service", {});
114
- _defineProperty(this, "_storage", null);
115
- _defineProperty(this, "_responseParser", new AuthResponseParser());
116
- _defineProperty(this, "_requestBuilder", null);
117
- _defineProperty(this, "_backgroundFlow", void 0);
118
- _defineProperty(this, "_embeddedFlow", null);
119
- _defineProperty(this, "_tokenValidator", null);
120
- _defineProperty(this, "_postponed", false);
121
- _defineProperty(this, "_backendCheckPromise", null);
122
- _defineProperty(this, "_authDialogService", undefined);
123
- _defineProperty(this, "_domainStorage", void 0);
124
- _defineProperty(this, "user", null);
125
- _defineProperty(this, "_initDeferred", void 0);
126
- _defineProperty(this, "_isLoginWindowOpen", void 0);
127
135
  if (!config) {
128
136
  throw new Error('Config is required');
129
137
  }
@@ -906,13 +914,5 @@ class Auth {
906
914
  }
907
915
  }
908
916
  }
909
- _defineProperty(Auth, "DEFAULT_CONFIG", DEFAULT_CONFIG);
910
- _defineProperty(Auth, "API_PATH", 'api/rest/');
911
- _defineProperty(Auth, "API_AUTH_PATH", 'oauth2/auth');
912
- _defineProperty(Auth, "API_PROFILE_PATH", 'users/me');
913
- _defineProperty(Auth, "CLOSE_BACKEND_DOWN_MESSAGE", 'backend-check-succeeded');
914
- _defineProperty(Auth, "CLOSE_WINDOW_MESSAGE", 'close-login-window');
915
- _defineProperty(Auth, "shouldRefreshToken", TokenValidator.shouldRefreshToken);
916
- _defineProperty(Auth, "storageIsUnavailable", !navigator.cookieEnabled);
917
917
 
918
918
  export { DEFAULT_BACKGROUND_TIMEOUT, DEFAULT_EXPIRES_TIMEOUT, DOMAIN_USER_CHANGED_EVENT, LOGOUT_EVENT, LOGOUT_POSTPONED_EVENT, USER_CHANGED_EVENT, USER_CHANGE_POSTPONED_EVENT, Auth as default };
@@ -1,15 +1,14 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import AuthResponseParser from './response-parser.js';
3
2
  import 'es6-error';
4
3
  import '../global/url.js';
5
4
 
6
5
  const HUB_AUTH_PAGE_OPENED = 'HUB_AUTH_PAGE_OPENED';
7
6
  class BackgroundFlow {
7
+ _requestBuilder;
8
+ _storage;
9
+ _timeout;
10
+ _promise;
8
11
  constructor(requestBuilder, storage, timeout) {
9
- _defineProperty(this, "_requestBuilder", void 0);
10
- _defineProperty(this, "_storage", void 0);
11
- _defineProperty(this, "_timeout", void 0);
12
- _defineProperty(this, "_promise", void 0);
13
12
  this._requestBuilder = requestBuilder;
14
13
  this._storage = storage;
15
14
  this._timeout = timeout;
@@ -1,4 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import React from 'react';
3
2
  import showAuthDialog from '../login-dialog/service.js';
4
3
  import Link from '../link/link.js';
@@ -9,6 +8,7 @@ import '../global/controls-height.js';
9
8
  import '../login-dialog/login-dialog.js';
10
9
  import 'prop-types';
11
10
  import '../dialog/dialog.js';
11
+ import '../_helpers/_rollupPluginBabelHelpers.js';
12
12
  import 'classnames';
13
13
  import '@jetbrains/icons/close';
14
14
  import '../island/island.js';
@@ -52,18 +52,14 @@ import '../global/url.js';
52
52
  import '../_helpers/link.js';
53
53
 
54
54
  class IFrameFlow {
55
+ hideDialog = null;
56
+ _requestBuilder;
57
+ _storage;
58
+ _translations;
59
+ reject;
60
+ _promise;
61
+ _loginWindow;
55
62
  constructor(requestBuilder, storage, translations) {
56
- _defineProperty(this, "hideDialog", null);
57
- _defineProperty(this, "_requestBuilder", void 0);
58
- _defineProperty(this, "_storage", void 0);
59
- _defineProperty(this, "_translations", void 0);
60
- _defineProperty(this, "reject", void 0);
61
- _defineProperty(this, "_promise", void 0);
62
- _defineProperty(this, "_loginWindow", void 0);
63
- _defineProperty(this, "_reset", () => {
64
- this._promise = null;
65
- this.hideDialog = null;
66
- });
67
63
  this._requestBuilder = requestBuilder;
68
64
  this._storage = storage;
69
65
  this._translations = translations;
@@ -118,6 +114,10 @@ class IFrameFlow {
118
114
  };
119
115
  });
120
116
  }
117
+ _reset = () => {
118
+ this._promise = null;
119
+ this.hideDialog = null;
120
+ };
121
121
  stop() {
122
122
  if (this.hideDialog) {
123
123
  this.hideDialog();
@@ -3,7 +3,6 @@ import AuthResponseParser from './response-parser.js';
3
3
  import './auth.js';
4
4
  import AuthStorage from './storage.js';
5
5
  import { DEFAULT_EXPIRES_TIMEOUT } from './auth__core.js';
6
- import '../_helpers/_rollupPluginBabelHelpers.js';
7
6
  import 'es6-error';
8
7
  import '../http/http.js';
9
8
  import '../global/url.js';
@@ -12,6 +11,7 @@ import './down-notification.js';
12
11
  import 'react';
13
12
  import 'prop-types';
14
13
  import '../alert-service/alert-service.js';
14
+ import '../_helpers/_rollupPluginBabelHelpers.js';
15
15
  import '../global/react-render-adapter.js';
16
16
  import 'react-dom';
17
17
  import '../global/get-uid.js';
@@ -1,8 +1,9 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import uuid from 'simply-uuid';
3
2
  import { encodeURL } from '../global/url.js';
4
3
 
5
4
  class AuthRequestBuilder {
5
+ config;
6
+ storage;
6
7
  /**
7
8
  * @param {{
8
9
  * authorization: string,
@@ -14,15 +15,13 @@ class AuthRequestBuilder {
14
15
  * @param {AuthStorage} storage
15
16
  */
16
17
  constructor(config, storage) {
17
- _defineProperty(this, "config", void 0);
18
- _defineProperty(this, "storage", void 0);
19
18
  this.config = config;
20
19
  this.storage = storage;
21
20
  }
22
21
  /**
23
22
  * @return {string} random string used for state
24
23
  */
25
-
24
+ static _uuid = uuid.generate;
26
25
  /**
27
26
  * Save state and build an auth server redirect URL.
28
27
  *
@@ -64,6 +63,5 @@ class AuthRequestBuilder {
64
63
  return this.storage?.saveState(id, storedState);
65
64
  }
66
65
  }
67
- _defineProperty(AuthRequestBuilder, "_uuid", uuid.generate);
68
66
 
69
67
  export { AuthRequestBuilder as default };
@@ -1,15 +1,14 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import ExtendableError from 'es6-error';
3
2
  import { parseQueryString } from '../global/url.js';
4
3
 
5
4
  class AuthError extends ExtendableError {
5
+ code;
6
+ uri;
7
+ stateId;
6
8
  // Supports weird IE 11 failing test issue
7
9
  constructor() {
8
10
  let authResponse = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9
11
  super(authResponse.errorDescription);
10
- _defineProperty(this, "code", void 0);
11
- _defineProperty(this, "uri", void 0);
12
- _defineProperty(this, "stateId", void 0);
13
12
  this.code = authResponse.error;
14
13
  this.uri = authResponse.errorUri;
15
14
  this.stateId = authResponse.state;
@@ -25,10 +24,11 @@ class AuthError extends ExtendableError {
25
24
  * @property {?string} error
26
25
  */
27
26
  class AuthResponseParser {
27
+ _authResponse;
28
28
  constructor() {
29
- _defineProperty(this, "_authResponse", void 0);
30
29
  this._authResponse = this.readAuthResponseFromURL();
31
30
  }
31
+ static AuthError = AuthError;
32
32
  static convertKey(key) {
33
33
  return key.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase());
34
34
  }
@@ -102,6 +102,5 @@ class AuthResponseParser {
102
102
  return window.location.toString();
103
103
  }
104
104
  }
105
- _defineProperty(AuthResponseParser, "AuthError", AuthError);
106
105
 
107
106
  export { AuthError, AuthResponseParser as default };