@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,11 +1,11 @@
1
1
  import { createContext } from 'react';
2
2
  import { BASE_ANIMATION_DURATION } from './consts.js';
3
3
 
4
- var CollapseContext = /*#__PURE__*/createContext({
4
+ const CollapseContext = /*#__PURE__*/createContext({
5
5
  collapsed: true,
6
6
  duration: BASE_ANIMATION_DURATION,
7
7
  disableAnimation: false,
8
- setCollapsed: function setCollapsed() {},
8
+ setCollapsed: () => {},
9
9
  id: ''
10
10
  });
11
11
 
@@ -3,20 +3,20 @@ import joinDataTestAttributes from '../global/data-tests.js';
3
3
  import { CollapseContext } from './collapse-context.js';
4
4
  import { COLLAPSE_CONTROL_TEST_ID } from './consts.js';
5
5
  import { jsx } from 'react/jsx-runtime';
6
- import '../_helpers/_rollupPluginBabelHelpers.js';
7
- import 'core-js/modules/es.array.concat.js';
8
6
  import 'core-js/modules/es.array.reduce.js';
9
- import 'core-js/modules/es.object.entries.js';
10
- import 'core-js/modules/es.object.to-string.js';
7
+ import 'core-js/modules/web.dom-collections.iterator.js';
11
8
 
12
- var CollapseControl = function CollapseControl(_ref) {
13
- var children = _ref.children,
14
- dataTest = _ref['data-test'];
15
- var _useContext = useContext(CollapseContext),
16
- setCollapsed = _useContext.setCollapsed,
17
- collapsed = _useContext.collapsed,
18
- id = _useContext.id;
19
- var child = useMemo(function () {
9
+ const CollapseControl = _ref => {
10
+ let {
11
+ children,
12
+ 'data-test': dataTest
13
+ } = _ref;
14
+ const {
15
+ setCollapsed,
16
+ collapsed,
17
+ id
18
+ } = useContext(CollapseContext);
19
+ const child = useMemo(() => {
20
20
  if (typeof children === 'function') {
21
21
  return children(collapsed);
22
22
  }
@@ -1,25 +1,20 @@
1
- import { i as _slicedToArray } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import 'core-js/modules/web.dom-collections.iterator.js';
2
2
  import { useState, useId, useCallback } from 'react';
3
3
  import { CollapseContext } from './collapse-context.js';
4
4
  import { BASE_ANIMATION_DURATION } from './consts.js';
5
5
  import { jsx } from 'react/jsx-runtime';
6
6
 
7
- var Collapse = function Collapse(_ref) {
8
- var children = _ref.children,
9
- _ref$duration = _ref.duration,
10
- duration = _ref$duration === void 0 ? BASE_ANIMATION_DURATION : _ref$duration,
11
- _ref$disableAnimation = _ref.disableAnimation,
12
- disableAnimation = _ref$disableAnimation === void 0 ? false : _ref$disableAnimation,
13
- _ref$className = _ref.className,
14
- className = _ref$className === void 0 ? '' : _ref$className,
15
- _ref$onChange = _ref.onChange,
16
- onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange;
17
- var _useState = useState(true),
18
- _useState2 = _slicedToArray(_useState, 2),
19
- collapsed = _useState2[0],
20
- toggle = _useState2[1];
21
- var id = useId();
22
- var setCollapsed = useCallback(function () {
7
+ const Collapse = _ref => {
8
+ let {
9
+ children,
10
+ duration = BASE_ANIMATION_DURATION,
11
+ disableAnimation = false,
12
+ className = '',
13
+ onChange = () => {}
14
+ } = _ref;
15
+ const [collapsed, toggle] = useState(true);
16
+ const id = useId();
17
+ const setCollapsed = useCallback(() => {
23
18
  toggle(!collapsed);
24
19
  onChange(!collapsed);
25
20
  }, [toggle, onChange, collapsed]);
@@ -1,6 +1,6 @@
1
- var COLLAPSE_CONTROL_TEST_ID = 'ring-collapse-control';
2
- var COLLAPSE_CONTENT_CONTAINER_TEST_ID = 'ring-collapse-content-container';
3
- var COLLAPSE_CONTENT_TEST_ID = 'ring-collapse-content';
4
- var BASE_ANIMATION_DURATION = 200;
1
+ const COLLAPSE_CONTROL_TEST_ID = 'ring-collapse-control';
2
+ const COLLAPSE_CONTENT_CONTAINER_TEST_ID = 'ring-collapse-content-container';
3
+ const COLLAPSE_CONTENT_TEST_ID = 'ring-collapse-content';
4
+ const BASE_ANIMATION_DURATION = 200;
5
5
 
6
6
  export { BASE_ANIMATION_DURATION, COLLAPSE_CONTENT_CONTAINER_TEST_ID, COLLAPSE_CONTENT_TEST_ID, COLLAPSE_CONTROL_TEST_ID };
@@ -1,5 +1,3 @@
1
- var toPx = function toPx(value) {
2
- return "".concat(value, "px");
3
- };
1
+ const toPx = value => "".concat(value, "px");
4
2
 
5
3
  export { toPx };
@@ -1,7 +1,6 @@
1
- import { _ as _defineProperty, a as _inherits, b as _createClass, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/es.symbol.js';
1
+ import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
3
2
  import 'core-js/modules/es.symbol.description.js';
4
- import 'core-js/modules/es.array.concat.js';
3
+ import 'core-js/modules/web.dom-collections.iterator.js';
5
4
  import { PureComponent } from 'react';
6
5
  import PropTypes from 'prop-types';
7
6
  import Dialog from '../dialog/dialog.js';
@@ -15,33 +14,16 @@ import 'react-dom';
15
14
  import 'classnames';
16
15
  import '@jetbrains/icons/close';
17
16
  import '../global/get-uid.js';
18
- import 'core-js/modules/es.object.to-string.js';
19
- import 'core-js/modules/es.regexp.to-string.js';
20
17
  import '../global/data-tests.js';
21
18
  import 'core-js/modules/es.array.reduce.js';
22
- import 'core-js/modules/es.object.entries.js';
23
19
  import '../shortcuts/shortcuts.js';
24
- import 'core-js/modules/es.array.map.js';
25
20
  import '../shortcuts/core.js';
26
- import 'core-js/modules/es.array.find-index.js';
27
- import 'core-js/modules/es.array.includes.js';
28
- import 'core-js/modules/es.array.slice.js';
29
- import 'core-js/modules/es.array.splice.js';
30
- import 'core-js/modules/es.object.assign.js';
31
21
  import 'core-js/modules/es.regexp.exec.js';
32
- import 'core-js/modules/es.string.includes.js';
33
- import 'core-js/modules/es.string.match.js';
34
22
  import 'combokeys';
35
23
  import '../global/sniffer.js';
36
24
  import 'sniffr';
37
25
  import '../tab-trap/tab-trap.js';
38
- import 'core-js/modules/es.array.filter.js';
39
26
  import '../global/dom.js';
40
- import 'core-js/modules/es.array.iterator.js';
41
- import 'core-js/modules/es.set.js';
42
- import 'core-js/modules/es.string.split.js';
43
- import 'core-js/modules/web.dom-collections.for-each.js';
44
- import 'core-js/modules/web.dom-collections.iterator.js';
45
27
  import '../popup/popup.target.js';
46
28
  import '../_helpers/dialog__body-scroll-preventer.js';
47
29
  import 'scrollbar-width';
@@ -56,82 +38,70 @@ import 'util-deprecate';
56
38
  import '../icon/icon__constants.js';
57
39
  import '../_helpers/icon__svg.js';
58
40
  import 'core-js/modules/es.string.replace.js';
59
- import 'core-js/modules/es.string.starts-with.js';
60
41
  import '../global/memoize.js';
61
- import 'core-js/modules/es.map.js';
62
- import 'core-js/modules/es.weak-map.js';
63
42
  import '../link/clickableLink.js';
64
43
  import '../global/controls-height.js';
65
44
  import '../_helpers/button__classes.js';
66
45
 
67
46
  var modules_4c9c3a3a = {"light":"light_rui_2ac4","description":"description_rui_f040"};
68
47
 
69
- var Confirm = /*#__PURE__*/function (_PureComponent) {
70
- function Confirm() {
71
- var _this;
72
- _classCallCheck(this, Confirm);
73
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
74
- args[_key] = arguments[_key];
75
- }
76
- _this = _callSuper(this, Confirm, [].concat(args));
77
- _defineProperty(_this, "onEscPress", function () {
78
- if (_this.props.rejectOnEsc) {
79
- _this.props.onReject();
48
+ class Confirm extends PureComponent {
49
+ constructor() {
50
+ super(...arguments);
51
+ _defineProperty(this, "onEscPress", () => {
52
+ if (this.props.rejectOnEsc) {
53
+ this.props.onReject();
80
54
  }
81
55
  });
82
- return _this;
83
56
  }
84
- _inherits(Confirm, _PureComponent);
85
- return _createClass(Confirm, [{
86
- key: "render",
87
- value: function render() {
88
- var _this$props = this.props,
89
- show = _this$props.show,
90
- className = _this$props.className,
91
- inProgress = _this$props.inProgress,
92
- cancelIsDefault = _this$props.cancelIsDefault,
93
- text = _this$props.text,
94
- description = _this$props.description,
95
- confirmLabel = _this$props.confirmLabel,
96
- rejectLabel = _this$props.rejectLabel,
97
- onConfirm = _this$props.onConfirm,
98
- onReject = _this$props.onReject,
99
- native = _this$props.native;
100
- return /*#__PURE__*/jsxs(Dialog, {
101
- label: text || (typeof description === 'string' ? description : undefined),
102
- className: className,
103
- onEscPress: this.onEscPress,
104
- show: show,
105
- trapFocus: true,
106
- "data-test": "ring-confirm",
107
- native: native,
108
- children: [text && /*#__PURE__*/jsx(HeaderWrapper, {
109
- children: text
110
- }), description && /*#__PURE__*/jsx(ContentWrapper, {
111
- children: /*#__PURE__*/jsx("div", {
112
- className: modules_4c9c3a3a.description,
113
- children: description
114
- })
115
- }), /*#__PURE__*/jsxs(Panel, {
116
- children: [/*#__PURE__*/jsx(Button, {
117
- "data-test": "confirm-ok-button",
118
- primary: !cancelIsDefault,
119
- loader: inProgress,
120
- disabled: inProgress,
121
- onClick: onConfirm,
122
- children: confirmLabel
123
- }), /*#__PURE__*/jsx(Button, {
124
- "data-test": "confirm-reject-button",
125
- onClick: onReject,
126
- disabled: inProgress,
127
- primary: cancelIsDefault,
128
- children: rejectLabel
129
- })]
57
+ render() {
58
+ const {
59
+ show,
60
+ className,
61
+ inProgress,
62
+ cancelIsDefault,
63
+ text,
64
+ description,
65
+ confirmLabel,
66
+ rejectLabel,
67
+ onConfirm,
68
+ onReject,
69
+ native
70
+ } = this.props;
71
+ return /*#__PURE__*/jsxs(Dialog, {
72
+ label: text || (typeof description === 'string' ? description : undefined),
73
+ className: className,
74
+ onEscPress: this.onEscPress,
75
+ show: show,
76
+ trapFocus: true,
77
+ "data-test": "ring-confirm",
78
+ native: native,
79
+ children: [text && /*#__PURE__*/jsx(HeaderWrapper, {
80
+ children: text
81
+ }), description && /*#__PURE__*/jsx(ContentWrapper, {
82
+ children: /*#__PURE__*/jsx("div", {
83
+ className: modules_4c9c3a3a.description,
84
+ children: description
85
+ })
86
+ }), /*#__PURE__*/jsxs(Panel, {
87
+ children: [/*#__PURE__*/jsx(Button, {
88
+ "data-test": "confirm-ok-button",
89
+ primary: !cancelIsDefault,
90
+ loader: inProgress,
91
+ disabled: inProgress,
92
+ onClick: onConfirm,
93
+ children: confirmLabel
94
+ }), /*#__PURE__*/jsx(Button, {
95
+ "data-test": "confirm-reject-button",
96
+ onClick: onReject,
97
+ disabled: inProgress,
98
+ primary: cancelIsDefault,
99
+ children: rejectLabel
130
100
  })]
131
- });
132
- }
133
- }]);
134
- }(PureComponent);
101
+ })]
102
+ });
103
+ }
104
+ }
135
105
  _defineProperty(Confirm, "propTypes", {
136
106
  className: PropTypes.string,
137
107
  text: PropTypes.string,
@@ -154,8 +124,8 @@ _defineProperty(Confirm, "defaultProps", {
154
124
  cancelIsDefault: false,
155
125
  confirmLabel: 'OK',
156
126
  rejectLabel: 'Cancel',
157
- onConfirm: function onConfirm() {},
158
- onReject: function onReject() {}
127
+ onConfirm: () => {},
128
+ onReject: () => {}
159
129
  });
160
130
 
161
131
  export { Confirm as default };
@@ -1,13 +1,10 @@
1
- import { c as _objectWithoutProperties, d as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/es.symbol.js';
1
+ import { a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
3
2
  import 'core-js/modules/es.symbol.description.js';
4
- import 'core-js/modules/es.object.to-string.js';
5
- import 'core-js/modules/es.promise.js';
6
3
  import { createRoot } from 'react-dom/client';
7
4
  import Confirm from '../confirm/confirm.js';
8
5
  import { ControlsHeightContext, getGlobalControlsHeight } from '../global/controls-height.js';
9
6
  import { jsx } from 'react/jsx-runtime';
10
- import 'core-js/modules/es.array.concat.js';
7
+ import 'core-js/modules/web.dom-collections.iterator.js';
11
8
  import 'react';
12
9
  import 'prop-types';
13
10
  import '../dialog/dialog.js';
@@ -17,7 +14,6 @@ import '@jetbrains/icons/close';
17
14
  import '../island/island.js';
18
15
  import '../global/data-tests.js';
19
16
  import 'core-js/modules/es.array.reduce.js';
20
- import 'core-js/modules/es.object.entries.js';
21
17
  import '../island/adaptive-island-hoc.js';
22
18
  import '../global/linear-function.js';
23
19
  import '../_helpers/island.js';
@@ -26,29 +22,14 @@ import '../island/content.js';
26
22
  import 'element-resize-detector';
27
23
  import '../global/schedule-raf.js';
28
24
  import '../global/get-uid.js';
29
- import 'core-js/modules/es.regexp.to-string.js';
30
25
  import '../shortcuts/shortcuts.js';
31
- import 'core-js/modules/es.array.map.js';
32
26
  import '../shortcuts/core.js';
33
- import 'core-js/modules/es.array.find-index.js';
34
- import 'core-js/modules/es.array.includes.js';
35
- import 'core-js/modules/es.array.slice.js';
36
- import 'core-js/modules/es.array.splice.js';
37
- import 'core-js/modules/es.object.assign.js';
38
27
  import 'core-js/modules/es.regexp.exec.js';
39
- import 'core-js/modules/es.string.includes.js';
40
- import 'core-js/modules/es.string.match.js';
41
28
  import 'combokeys';
42
29
  import '../global/sniffer.js';
43
30
  import 'sniffr';
44
31
  import '../tab-trap/tab-trap.js';
45
- import 'core-js/modules/es.array.filter.js';
46
32
  import '../global/dom.js';
47
- import 'core-js/modules/es.array.iterator.js';
48
- import 'core-js/modules/es.set.js';
49
- import 'core-js/modules/es.string.split.js';
50
- import 'core-js/modules/web.dom-collections.for-each.js';
51
- import 'core-js/modules/web.dom-collections.iterator.js';
52
33
  import '../button/button.js';
53
34
  import '@jetbrains/icons/chevron-down';
54
35
  import '../icon/icon.js';
@@ -56,10 +37,7 @@ import 'util-deprecate';
56
37
  import '../icon/icon__constants.js';
57
38
  import '../_helpers/icon__svg.js';
58
39
  import 'core-js/modules/es.string.replace.js';
59
- import 'core-js/modules/es.string.starts-with.js';
60
40
  import '../global/memoize.js';
61
- import 'core-js/modules/es.map.js';
62
- import 'core-js/modules/es.weak-map.js';
63
41
  import '../link/clickableLink.js';
64
42
  import '../_helpers/button__classes.js';
65
43
  import '../popup/popup.target.js';
@@ -67,15 +45,16 @@ import '../_helpers/dialog__body-scroll-preventer.js';
67
45
  import 'scrollbar-width';
68
46
  import '../panel/panel.js';
69
47
 
70
- var _excluded = ["buttonsHeight"];
71
- var containerElement = document.createElement('div');
72
- var reactRoot = createRoot(containerElement);
48
+ const _excluded = ["buttonsHeight"];
49
+ const containerElement = document.createElement('div');
50
+ const reactRoot = createRoot(containerElement);
73
51
  /**
74
52
  * Renders Confirm into virtual node to skip maintaining container
75
53
  */
76
54
  function renderConfirm(props) {
77
- var _props$buttonsHeight = props.buttonsHeight,
78
- buttonsHeight = _props$buttonsHeight === void 0 ? getGlobalControlsHeight() : _props$buttonsHeight,
55
+ const {
56
+ buttonsHeight = getGlobalControlsHeight()
57
+ } = props,
79
58
  restProps = _objectWithoutProperties(props, _excluded);
80
59
  reactRoot.render( /*#__PURE__*/jsx(ControlsHeightContext.Provider, {
81
60
  value: buttonsHeight,
@@ -83,17 +62,17 @@ function renderConfirm(props) {
83
62
  }));
84
63
  }
85
64
  function confirm(_ref) {
86
- var text = _ref.text,
87
- description = _ref.description,
88
- _ref$confirmLabel = _ref.confirmLabel,
89
- confirmLabel = _ref$confirmLabel === void 0 ? 'OK' : _ref$confirmLabel,
90
- _ref$rejectLabel = _ref.rejectLabel,
91
- rejectLabel = _ref$rejectLabel === void 0 ? 'Cancel' : _ref$rejectLabel,
92
- cancelIsDefault = _ref.cancelIsDefault,
93
- onBeforeConfirm = _ref.onBeforeConfirm,
94
- buttonsHeight = _ref.buttonsHeight;
95
- return new Promise(function (resolve, reject) {
96
- var props = {
65
+ let {
66
+ text,
67
+ description,
68
+ confirmLabel = 'OK',
69
+ rejectLabel = 'Cancel',
70
+ cancelIsDefault,
71
+ onBeforeConfirm,
72
+ buttonsHeight
73
+ } = _ref;
74
+ return new Promise((resolve, reject) => {
75
+ const props = {
97
76
  text,
98
77
  description,
99
78
  confirmLabel,
@@ -101,17 +80,17 @@ function confirm(_ref) {
101
80
  cancelIsDefault,
102
81
  buttonsHeight,
103
82
  show: true,
104
- onConfirm: function onConfirm() {
83
+ onConfirm: () => {
105
84
  if (onBeforeConfirm) {
106
85
  renderConfirm(_objectSpread2(_objectSpread2({}, props), {}, {
107
86
  inProgress: true
108
87
  }));
109
- return Promise.resolve(onBeforeConfirm()).then(function () {
88
+ return Promise.resolve(onBeforeConfirm()).then(() => {
110
89
  renderConfirm(_objectSpread2(_objectSpread2({}, props), {}, {
111
90
  show: false
112
91
  }));
113
92
  resolve();
114
- }).catch(function (err) {
93
+ }).catch(err => {
115
94
  renderConfirm(_objectSpread2(_objectSpread2({}, props), {}, {
116
95
  show: false
117
96
  }));
@@ -123,7 +102,7 @@ function confirm(_ref) {
123
102
  }));
124
103
  return resolve();
125
104
  },
126
- onReject: function onReject() {
105
+ onReject: () => {
127
106
  renderConfirm(_objectSpread2(_objectSpread2({}, props), {}, {
128
107
  show: false
129
108
  }));
@@ -1,71 +1,56 @@
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.concat.js';
3
- import 'core-js/modules/es.array.filter.js';
4
- import 'core-js/modules/es.object.to-string.js';
5
- import 'core-js/modules/es.promise.js';
6
- import { Children, cloneElement, Component } from 'react';
1
+ import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
3
+ import { Component, Children, cloneElement } from 'react';
7
4
  import PropTypes from 'prop-types';
8
5
  import classNames from 'classnames';
9
6
  import { m as modules_b8a9dd4f, S as Sidebar } from '../_helpers/sidebar.js';
10
7
  import { jsxs, jsx } from 'react/jsx-runtime';
11
8
  import 'react-waypoint';
12
9
 
13
- var _excluded = ["children", "className", "contentClassName", "responsive"];
14
- var ContentLayout = /*#__PURE__*/function (_Component) {
15
- function ContentLayout() {
16
- var _this;
17
- _classCallCheck(this, ContentLayout);
18
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
19
- args[_key] = arguments[_key];
20
- }
21
- _this = _callSuper(this, ContentLayout, [].concat(args));
22
- _defineProperty(_this, "state", {
10
+ const _excluded = ["children", "className", "contentClassName", "responsive"];
11
+ class ContentLayout extends Component {
12
+ constructor() {
13
+ super(...arguments);
14
+ _defineProperty(this, "state", {
23
15
  contentNode: null
24
16
  });
25
- _defineProperty(_this, "saveContentNode", function (contentNode) {
26
- _this.setState({
17
+ _defineProperty(this, "saveContentNode", contentNode => {
18
+ this.setState({
27
19
  contentNode
28
20
  });
29
21
  });
30
- return _this;
31
22
  }
32
- _inherits(ContentLayout, _Component);
33
- return _createClass(ContentLayout, [{
34
- key: "render",
35
- value: function render() {
36
- var _this$props = this.props,
37
- children = _this$props.children,
38
- className = _this$props.className,
39
- contentClassName = _this$props.contentClassName,
40
- responsive = _this$props.responsive,
41
- restProps = _objectWithoutProperties(_this$props, _excluded);
42
- var classes = classNames(modules_b8a9dd4f.contentLayout, className, {
43
- [modules_b8a9dd4f.contentLayoutResponsive]: responsive
44
- });
45
- var contentClasses = classNames(modules_b8a9dd4f.contentLayoutContent, contentClassName);
46
- var childrenArray = Children.toArray(children);
47
- var sidebarChild = childrenArray.filter(function (child) {
48
- return child != null && typeof child === 'object' && 'type' in child && child.type === Sidebar;
49
- })[0];
50
- var sidebar = sidebarChild && /*#__PURE__*/cloneElement(sidebarChild, {
51
- contentNode: this.state.contentNode
52
- });
53
- var contentChildren = childrenArray.filter(function (child) {
54
- return child !== sidebarChild;
55
- });
56
- return /*#__PURE__*/jsxs("div", _objectSpread2(_objectSpread2({
57
- "data-test": "content-layout"
58
- }, restProps), {}, {
59
- className: classes,
60
- children: [sidebar, /*#__PURE__*/jsx("main", {
61
- className: contentClasses,
62
- ref: this.saveContentNode,
63
- children: contentChildren
64
- })]
65
- }));
66
- }
67
- }]);
68
- }(Component);
23
+ render() {
24
+ const _this$props = this.props,
25
+ {
26
+ children,
27
+ className,
28
+ contentClassName,
29
+ responsive
30
+ } = _this$props,
31
+ restProps = _objectWithoutProperties(_this$props, _excluded);
32
+ const classes = classNames(modules_b8a9dd4f.contentLayout, className, {
33
+ [modules_b8a9dd4f.contentLayoutResponsive]: responsive
34
+ });
35
+ const contentClasses = classNames(modules_b8a9dd4f.contentLayoutContent, contentClassName);
36
+ const childrenArray = Children.toArray(children);
37
+ const sidebarChild = childrenArray.filter(child => child != null && typeof child === 'object' && 'type' in child && child.type === Sidebar)[0];
38
+ const sidebar = sidebarChild && /*#__PURE__*/cloneElement(sidebarChild, {
39
+ contentNode: this.state.contentNode
40
+ });
41
+ const contentChildren = childrenArray.filter(child => child !== sidebarChild);
42
+ return /*#__PURE__*/jsxs("div", _objectSpread2(_objectSpread2({
43
+ "data-test": "content-layout"
44
+ }, restProps), {}, {
45
+ className: classes,
46
+ children: [sidebar, /*#__PURE__*/jsx("main", {
47
+ className: contentClasses,
48
+ ref: this.saveContentNode,
49
+ children: contentChildren
50
+ })]
51
+ }));
52
+ }
53
+ }
69
54
  _defineProperty(ContentLayout, "propTypes", {
70
55
  children: PropTypes.node,
71
56
  className: PropTypes.string,
@@ -1,5 +1,5 @@
1
1
  import '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/es.array.concat.js';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
3
3
  import 'react';
4
4
  import 'prop-types';
5
5
  import 'classnames';