@jetbrains/ring-ui-built 7.0.0-beta.1 → 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 (241) 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/header.js +1 -1
  8. package/components/_helpers/icon__svg.js +27 -23
  9. package/components/_helpers/input.js +150 -171
  10. package/components/_helpers/query-assist__suggestions.js +78 -93
  11. package/components/_helpers/select__filter.js +56 -67
  12. package/components/_helpers/services-link.js +23 -29
  13. package/components/_helpers/sidebar.js +91 -93
  14. package/components/_helpers/tab-link.js +8 -6
  15. package/components/_helpers/theme.js +55 -51
  16. package/components/_helpers/title.js +59 -69
  17. package/components/alert/alert.js +112 -156
  18. package/components/alert/container.js +32 -39
  19. package/components/alert-service/alert-service.js +104 -161
  20. package/components/analytics/analytics.js +12 -20
  21. package/components/analytics/analytics__custom-plugin.js +52 -68
  22. package/components/auth/auth.js +2 -27
  23. package/components/auth/auth__core.d.ts +1 -1
  24. package/components/auth/auth__core.js +742 -1428
  25. package/components/auth/background-flow.js +84 -121
  26. package/components/auth/down-notification.js +31 -69
  27. package/components/auth/iframe-flow.js +70 -123
  28. package/components/auth/request-builder.js +46 -77
  29. package/components/auth/response-parser.js +84 -112
  30. package/components/auth/storage.js +160 -318
  31. package/components/auth/token-validator.js +132 -227
  32. package/components/auth/window-flow.js +84 -121
  33. package/components/auth-dialog/auth-dialog.js +99 -150
  34. package/components/auth-dialog-service/auth-dialog-service.js +6 -26
  35. package/components/avatar/avatar-example-datauri.js +1 -1
  36. package/components/avatar/avatar.js +94 -123
  37. package/components/avatar/fallback-avatar.js +20 -34
  38. package/components/badge/badge.js +32 -38
  39. package/components/breadcrumbs/breadcrumbs.js +13 -17
  40. package/components/button/button.js +67 -80
  41. package/components/button-group/button-group.js +27 -36
  42. package/components/button-set/button-set.js +19 -27
  43. package/components/button-toolbar/button-toolbar.js +17 -25
  44. package/components/caret/caret.js +184 -211
  45. package/components/checkbox/checkbox.js +69 -86
  46. package/components/clipboard/clipboard-fallback.js +7 -7
  47. package/components/clipboard/clipboard.js +36 -128
  48. package/components/code/code.js +83 -151
  49. package/components/collapse/collapse-content.js +42 -60
  50. package/components/collapse/collapse-context.js +2 -2
  51. package/components/collapse/collapse-control.js +12 -12
  52. package/components/collapse/collapse.js +12 -17
  53. package/components/collapse/consts.js +4 -4
  54. package/components/collapse/utils.js +1 -3
  55. package/components/confirm/confirm.js +57 -87
  56. package/components/confirm-service/confirm-service.js +23 -44
  57. package/components/content-layout/content-layout.js +41 -56
  58. package/components/content-layout/sidebar.js +1 -1
  59. package/components/contenteditable/contenteditable.js +38 -46
  60. package/components/control-help/control-help.js +5 -3
  61. package/components/control-label/control-label.js +9 -8
  62. package/components/data-list/data-list.js +113 -156
  63. package/components/data-list/data-list.mock.js +3 -5
  64. package/components/data-list/item.js +120 -140
  65. package/components/data-list/selection.js +77 -135
  66. package/components/data-list/title.js +2 -10
  67. package/components/date-picker/consts.js +16 -22
  68. package/components/date-picker/date-input.js +99 -124
  69. package/components/date-picker/date-picker.js +140 -184
  70. package/components/date-picker/date-popup.js +280 -327
  71. package/components/date-picker/day.js +71 -94
  72. package/components/date-picker/month-names.js +41 -59
  73. package/components/date-picker/month-slider.js +42 -61
  74. package/components/date-picker/month.js +17 -24
  75. package/components/date-picker/months.js +44 -49
  76. package/components/date-picker/weekdays.js +12 -21
  77. package/components/date-picker/years.js +77 -98
  78. package/components/dialog/dialog.js +151 -187
  79. package/components/dialog/dialog__body-scroll-preventer.js +0 -3
  80. package/components/dropdown/anchor.js +0 -6
  81. package/components/dropdown/dropdown.js +134 -154
  82. package/components/dropdown-menu/dropdown-menu.js +59 -87
  83. package/components/editable-heading/editable-heading.js +69 -116
  84. package/components/error-bubble/error-bubble.js +29 -54
  85. package/components/error-message/error-message.js +34 -49
  86. package/components/footer/footer.js +27 -28
  87. package/components/global/compose.js +1 -8
  88. package/components/global/composeRefs.d.ts +0 -3
  89. package/components/global/composeRefs.js +8 -15
  90. package/components/global/controls-height.js +2 -2
  91. package/components/global/create-stateful-context.js +14 -13
  92. package/components/global/data-tests.js +7 -12
  93. package/components/global/dom.js +49 -82
  94. package/components/global/focus-sensor-hoc.js +99 -106
  95. package/components/global/fuzzy-highlight.js +23 -34
  96. package/components/global/get-event-key.js +8 -8
  97. package/components/global/get-uid.js +3 -7
  98. package/components/global/inject-styles.js +7 -14
  99. package/components/global/listeners.js +28 -47
  100. package/components/global/memoize.js +6 -10
  101. package/components/global/normalize-indent.js +19 -46
  102. package/components/global/promise-with-timeout.js +6 -8
  103. package/components/global/prop-types.js +3 -5
  104. package/components/global/react-dom-renderer.js +29 -40
  105. package/components/global/rerender-hoc.js +16 -32
  106. package/components/global/schedule-raf.js +4 -4
  107. package/components/global/sniffer.js +1 -1
  108. package/components/global/theme.d.ts +3 -0
  109. package/components/global/theme.js +2 -19
  110. package/components/global/trivial-template-tag.js +4 -9
  111. package/components/global/typescript-utils.js +2 -6
  112. package/components/global/url.js +20 -23
  113. package/components/global/use-event-callback.js +7 -4
  114. package/components/grid/col.js +27 -39
  115. package/components/grid/grid.js +18 -27
  116. package/components/grid/row.js +23 -30
  117. package/components/group/group.js +16 -22
  118. package/components/header/header-icon.js +19 -31
  119. package/components/header/header.d.ts +0 -1
  120. package/components/header/header.js +30 -64
  121. package/components/header/links.d.ts +2 -0
  122. package/components/header/links.js +20 -0
  123. package/components/header/logo.js +15 -26
  124. package/components/header/profile.js +124 -150
  125. package/components/header/services-link.js +1 -3
  126. package/components/header/services.js +64 -97
  127. package/components/header/smart-profile.js +101 -178
  128. package/components/header/smart-services.js +55 -90
  129. package/components/header/tray.js +21 -30
  130. package/components/heading/heading.js +21 -20
  131. package/components/http/http.js +162 -319
  132. package/components/http/http.mock.js +50 -98
  133. package/components/hub-source/hub-source.js +77 -182
  134. package/components/hub-source/hub-source__user.js +9 -37
  135. package/components/hub-source/hub-source__users-groups.js +34 -60
  136. package/components/i18n/i18n-context.js +7 -8
  137. package/components/i18n/i18n.js +3 -6
  138. package/components/icon/icon.js +60 -74
  139. package/components/icon/icon__svg.js +0 -5
  140. package/components/icon/index.js +0 -5
  141. package/components/input/input.js +1 -11
  142. package/components/island/adaptive-island-hoc.js +29 -37
  143. package/components/island/content.js +100 -110
  144. package/components/island/header.js +56 -66
  145. package/components/island/island.js +25 -33
  146. package/components/island-legacy/content-legacy.js +16 -22
  147. package/components/island-legacy/header-legacy.js +19 -25
  148. package/components/island-legacy/island-legacy.js +16 -22
  149. package/components/link/clickableLink.js +33 -42
  150. package/components/link/link.js +47 -55
  151. package/components/list/consts.js +2 -2
  152. package/components/list/list.js +399 -486
  153. package/components/list/list__custom.js +51 -61
  154. package/components/list/list__hint.js +9 -17
  155. package/components/list/list__item.js +147 -178
  156. package/components/list/list__link.js +38 -47
  157. package/components/list/list__separator.js +15 -24
  158. package/components/list/list__title.js +25 -34
  159. package/components/list/list__users-groups-source.js +55 -121
  160. package/components/loader/loader.js +38 -60
  161. package/components/loader/loader__core.js +123 -184
  162. package/components/loader-inline/loader-inline.js +24 -32
  163. package/components/loader-screen/loader-screen.js +24 -40
  164. package/components/login-dialog/login-dialog.js +81 -121
  165. package/components/login-dialog/service.js +6 -29
  166. package/components/markdown/markdown.js +16 -24
  167. package/components/message/message.js +170 -201
  168. package/components/old-browsers-message/old-browsers-message.js +11 -14
  169. package/components/old-browsers-message/old-browsers-message__stop.js +1 -4
  170. package/components/old-browsers-message/white-list.js +8 -13
  171. package/components/pager/pager.js +212 -257
  172. package/components/panel/panel.js +16 -22
  173. package/components/permissions/permissions.js +118 -161
  174. package/components/permissions/permissions__cache.js +191 -218
  175. package/components/popup/popup.consts.js +1 -1
  176. package/components/popup/popup.js +237 -288
  177. package/components/popup/popup.target.js +9 -7
  178. package/components/popup/position.js +94 -101
  179. package/components/popup-menu/popup-menu.js +33 -67
  180. package/components/progress-bar/progress-bar.js +57 -68
  181. package/components/query-assist/query-assist.js +583 -652
  182. package/components/query-assist/query-assist__suggestions.js +2 -26
  183. package/components/radio/radio.js +15 -27
  184. package/components/radio/radio__item.js +52 -62
  185. package/components/scrollable-section/scrollable-section.js +53 -0
  186. package/components/select/select.js +701 -796
  187. package/components/select/select__filter.js +1 -26
  188. package/components/select/select__popup.js +316 -413
  189. package/components/shortcuts/core.js +147 -195
  190. package/components/shortcuts/shortcut-title.js +6 -10
  191. package/components/shortcuts/shortcuts-hoc.js +23 -41
  192. package/components/shortcuts/shortcuts.js +41 -64
  193. package/components/slider/slider.js +93 -112
  194. package/components/slider/slider.utils.js +16 -23
  195. package/components/storage/storage.js +3 -27
  196. package/components/storage/storage__fallback.js +137 -210
  197. package/components/storage/storage__local.js +89 -147
  198. package/components/style.css +1 -1
  199. package/components/tab-trap/tab-trap.js +35 -53
  200. package/components/table/cell.js +11 -21
  201. package/components/table/disable-hover-hoc.js +27 -42
  202. package/components/table/header-cell.js +59 -75
  203. package/components/table/header.js +89 -110
  204. package/components/table/multitable.js +83 -89
  205. package/components/table/row-with-focus-sensor.js +25 -57
  206. package/components/table/row.js +169 -200
  207. package/components/table/selection-adapter.js +2 -2
  208. package/components/table/selection-shortcuts-hoc.js +108 -113
  209. package/components/table/selection.js +150 -217
  210. package/components/table/simple-table.js +19 -55
  211. package/components/table/smart-table.js +42 -76
  212. package/components/table/table.js +267 -327
  213. package/components/tabs/collapsible-more.js +47 -73
  214. package/components/tabs/collapsible-tab.js +32 -36
  215. package/components/tabs/collapsible-tabs.js +89 -148
  216. package/components/tabs/custom-item.js +4 -2
  217. package/components/tabs/dumb-tabs.js +60 -92
  218. package/components/tabs/smart-tabs.js +29 -61
  219. package/components/tabs/tab-link.js +1 -3
  220. package/components/tabs/tab.js +15 -24
  221. package/components/tabs/tabs.js +1 -26
  222. package/components/tag/tag.d.ts +0 -2
  223. package/components/tag/tag.js +120 -162
  224. package/components/tags-input/tags-input.js +222 -304
  225. package/components/tags-list/tags-list.js +45 -61
  226. package/components/text/text.js +28 -37
  227. package/components/toggle/toggle.js +51 -61
  228. package/components/tooltip/tooltip.js +109 -141
  229. package/components/user-agreement/service.js +259 -400
  230. package/components/user-agreement/user-agreement.js +80 -108
  231. package/components/user-card/card.js +1 -25
  232. package/components/user-card/smart-user-card-tooltip.js +52 -103
  233. package/components/user-card/tooltip.js +35 -65
  234. package/components/user-card/user-card.js +1 -25
  235. package/package.json +1 -1
  236. package/components/global/react-render-adapter.d.ts +0 -1
  237. package/components/global/react-render-adapter.js +0 -6
  238. package/components/header/scrollable-section.js +0 -47
  239. package/components/header/tray-icon.d.ts +0 -1
  240. package/components/header/tray-icon.js +0 -26
  241. /package/components/{header → scrollable-section}/scrollable-section.d.ts +0 -0
@@ -1,15 +1,10 @@
1
- import { b as _createClass, j as _toConsumableArray, c as _objectWithoutProperties, d as _objectSpread2, e as _classCallCheck, _ as _defineProperty } 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';
5
- import 'core-js/modules/es.object.to-string.js';
1
+ import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
6
3
  import { createRoot } from 'react-dom/client';
7
4
  import getUID from '../global/get-uid.js';
8
5
  import Alert, { ANIMATION_TIME } from '../alert/alert.js';
9
6
  import { jsx } from 'react/jsx-runtime';
10
7
  import Alerts from '../alert/container.js';
11
- import 'core-js/modules/es.regexp.to-string.js';
12
- import 'core-js/modules/es.object.values.js';
13
8
  import 'react';
14
9
  import 'classnames';
15
10
  import 'prop-types';
@@ -23,21 +18,11 @@ import '../icon/icon__constants.js';
23
18
  import '../_helpers/icon__svg.js';
24
19
  import 'core-js/modules/es.regexp.exec.js';
25
20
  import 'core-js/modules/es.string.replace.js';
26
- import 'core-js/modules/es.string.starts-with.js';
27
21
  import '../global/memoize.js';
28
- import 'core-js/modules/es.array.iterator.js';
29
- import 'core-js/modules/es.map.js';
30
- import 'core-js/modules/es.weak-map.js';
31
- import 'core-js/modules/web.dom-collections.iterator.js';
32
22
  import '../loader-inline/loader-inline.js';
33
23
  import '../global/data-tests.js';
34
24
  import 'core-js/modules/es.array.reduce.js';
35
- import 'core-js/modules/es.object.entries.js';
36
25
  import '../global/dom.js';
37
- import 'core-js/modules/es.object.assign.js';
38
- import 'core-js/modules/es.set.js';
39
- import 'core-js/modules/es.string.split.js';
40
- import 'core-js/modules/web.dom-collections.for-each.js';
41
26
  import '../button/button.js';
42
27
  import '@jetbrains/icons/chevron-down';
43
28
  import '../link/clickableLink.js';
@@ -50,12 +35,6 @@ import '../popup/popup.js';
50
35
  import '../global/schedule-raf.js';
51
36
  import '../shortcuts/shortcuts.js';
52
37
  import '../shortcuts/core.js';
53
- import 'core-js/modules/es.array.find-index.js';
54
- import 'core-js/modules/es.array.includes.js';
55
- import 'core-js/modules/es.array.slice.js';
56
- import 'core-js/modules/es.array.splice.js';
57
- import 'core-js/modules/es.string.includes.js';
58
- import 'core-js/modules/es.string.match.js';
59
38
  import 'combokeys';
60
39
  import '../global/sniffer.js';
61
40
  import 'sniffr';
@@ -64,156 +43,120 @@ import '../popup/position.js';
64
43
  import 'core-js/modules/es.array.sort.js';
65
44
  import '../popup/popup.consts.js';
66
45
 
67
- var _excluded = ["message", "key"],
46
+ const _excluded = ["message", "key"],
68
47
  _excluded2 = ["onCloseRequest", "onClose"];
69
- var AlertService = /*#__PURE__*/function () {
70
- function AlertService() {
71
- _classCallCheck(this, AlertService);
48
+ class AlertService {
49
+ constructor() {
72
50
  _defineProperty(this, "defaultTimeout", 0);
73
51
  // This alerts are stored in inverse order (last shown is first in array)
74
52
  _defineProperty(this, "showingAlerts", []);
75
53
  _defineProperty(this, "containerElement", document.createElement('div'));
76
54
  _defineProperty(this, "reactRoot", createRoot(this.containerElement));
77
55
  }
78
- return _createClass(AlertService, [{
79
- key: "_getShowingAlerts",
80
- value: function _getShowingAlerts() {
81
- return _toConsumableArray(this.showingAlerts);
82
- }
83
- }, {
84
- key: "renderAlertContainer",
85
- value: function renderAlertContainer(alerts) {
86
- if (alerts.length === 0) {
87
- return /*#__PURE__*/jsx("span", {});
88
- }
89
- return /*#__PURE__*/jsx(Alerts, {
90
- children: alerts.map(function (alert) {
91
- var message = alert.message,
92
- key = alert.key,
93
- rest = _objectWithoutProperties(alert, _excluded);
94
- return /*#__PURE__*/jsx(Alert, _objectSpread2(_objectSpread2({}, rest), {}, {
95
- children: message
96
- }), key);
97
- })
98
- });
99
- }
100
- /**
101
- * Renders alert container into virtual node to skip maintaining container
102
- */
103
- }, {
104
- key: "renderAlerts",
105
- value: function renderAlerts() {
106
- this.reactRoot.render(this.renderAlertContainer(this.showingAlerts));
56
+ _getShowingAlerts() {
57
+ return [...this.showingAlerts];
58
+ }
59
+ renderAlertContainer(alerts) {
60
+ if (alerts.length === 0) {
61
+ return /*#__PURE__*/jsx("span", {});
107
62
  }
108
- }, {
109
- key: "findSameAlert",
110
- value: function findSameAlert(message, type) {
111
- return this.showingAlerts.filter(function (it) {
112
- return it.type === type && it.message === message;
113
- })[0];
63
+ return /*#__PURE__*/jsx(Alerts, {
64
+ children: alerts.map(alert => {
65
+ const {
66
+ message,
67
+ key
68
+ } = alert,
69
+ rest = _objectWithoutProperties(alert, _excluded);
70
+ return /*#__PURE__*/jsx(Alert, _objectSpread2(_objectSpread2({}, rest), {}, {
71
+ children: message
72
+ }), key);
73
+ })
74
+ });
75
+ }
76
+ /**
77
+ * Renders alert container into virtual node to skip maintaining container
78
+ */
79
+ renderAlerts() {
80
+ this.reactRoot.render(this.renderAlertContainer(this.showingAlerts));
81
+ }
82
+ findSameAlert(message, type) {
83
+ return this.showingAlerts.filter(it => it.type === type && it.message === message)[0];
84
+ }
85
+ startAlertClosing(alert) {
86
+ alert.isClosing = true;
87
+ this.renderAlerts();
88
+ }
89
+ remove(key) {
90
+ const alertToClose = this.showingAlerts.filter(alert => alert.key === key)[0];
91
+ if (!alertToClose) {
92
+ return;
114
93
  }
115
- }, {
116
- key: "startAlertClosing",
117
- value: function startAlertClosing(alert) {
118
- alert.isClosing = true;
94
+ this.startAlertClosing(alertToClose);
95
+ }
96
+ removeWithoutAnimation(key) {
97
+ this.showingAlerts = this.showingAlerts.filter(alert => alert.key !== key);
98
+ this.renderAlerts();
99
+ }
100
+ stopShakingWhenAnimationDone(shakingAlert) {
101
+ setTimeout(() => {
102
+ shakingAlert.showWithAnimation = false;
103
+ shakingAlert.isShaking = false;
119
104
  this.renderAlerts();
120
- }
121
- }, {
122
- key: "remove",
123
- value: function remove(key) {
124
- var alertToClose = this.showingAlerts.filter(function (alert) {
125
- return alert.key === key;
126
- })[0];
127
- if (!alertToClose) {
128
- return;
129
- }
130
- this.startAlertClosing(alertToClose);
131
- }
132
- }, {
133
- key: "removeWithoutAnimation",
134
- value: function removeWithoutAnimation(key) {
135
- this.showingAlerts = this.showingAlerts.filter(function (alert) {
136
- return alert.key !== key;
137
- });
105
+ }, ANIMATION_TIME);
106
+ }
107
+ addAlert(message, type) {
108
+ let timeout = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.defaultTimeout;
109
+ let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
110
+ const {
111
+ onCloseRequest,
112
+ onClose
113
+ } = options,
114
+ restOptions = _objectWithoutProperties(options, _excluded2);
115
+ const sameAlert = this.findSameAlert(message, type);
116
+ if (sameAlert) {
117
+ sameAlert.isShaking = true;
138
118
  this.renderAlerts();
119
+ this.stopShakingWhenAnimationDone(sameAlert);
120
+ return sameAlert.key;
139
121
  }
140
- }, {
141
- key: "stopShakingWhenAnimationDone",
142
- value: function stopShakingWhenAnimationDone(shakingAlert) {
143
- var _this = this;
144
- setTimeout(function () {
145
- shakingAlert.showWithAnimation = false;
146
- shakingAlert.isShaking = false;
147
- _this.renderAlerts();
148
- }, ANIMATION_TIME);
149
- }
150
- }, {
151
- key: "addAlert",
152
- value: function addAlert(message, type) {
153
- var _this2 = this;
154
- var timeout = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.defaultTimeout;
155
- var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
156
- var _onCloseRequest = options.onCloseRequest,
157
- _onClose = options.onClose,
158
- restOptions = _objectWithoutProperties(options, _excluded2);
159
- var sameAlert = this.findSameAlert(message, type);
160
- if (sameAlert) {
161
- sameAlert.isShaking = true;
162
- this.renderAlerts();
163
- this.stopShakingWhenAnimationDone(sameAlert);
164
- return sameAlert.key;
122
+ const alert = _objectSpread2({
123
+ key: getUID('alert-service-'),
124
+ message,
125
+ type,
126
+ timeout,
127
+ isClosing: false,
128
+ onCloseRequest: () => {
129
+ onCloseRequest === null || onCloseRequest === void 0 || onCloseRequest();
130
+ this.startAlertClosing(alert);
131
+ },
132
+ onClose: () => {
133
+ onClose === null || onClose === void 0 || onClose();
134
+ this.removeWithoutAnimation(alert.key);
165
135
  }
166
- var alert = _objectSpread2({
167
- key: getUID('alert-service-'),
168
- message,
169
- type,
170
- timeout,
171
- isClosing: false,
172
- onCloseRequest: function onCloseRequest() {
173
- _onCloseRequest && _onCloseRequest();
174
- _this2.startAlertClosing(alert);
175
- },
176
- onClose: function onClose() {
177
- _onClose && _onClose();
178
- _this2.removeWithoutAnimation(alert.key);
179
- }
180
- }, restOptions);
181
- this.showingAlerts = [alert].concat(_toConsumableArray(this.showingAlerts));
182
- this.renderAlerts();
183
- return alert.key;
184
- }
185
- }, {
186
- key: "setDefaultTimeout",
187
- value: function setDefaultTimeout(timeout) {
188
- this.defaultTimeout = timeout;
189
- }
190
- }, {
191
- key: "error",
192
- value: function error(message, timeout) {
193
- return this.addAlert(message, Alert.Type.ERROR, timeout);
194
- }
195
- }, {
196
- key: "message",
197
- value: function message(_message, timeout) {
198
- return this.addAlert(_message, Alert.Type.MESSAGE, timeout);
199
- }
200
- }, {
201
- key: "warning",
202
- value: function warning(message, timeout) {
203
- return this.addAlert(message, Alert.Type.WARNING, timeout);
204
- }
205
- }, {
206
- key: "successMessage",
207
- value: function successMessage(message, timeout) {
208
- return this.addAlert(message, Alert.Type.SUCCESS, timeout);
209
- }
210
- }, {
211
- key: "loadingMessage",
212
- value: function loadingMessage(message, timeout) {
213
- return this.addAlert(message, Alert.Type.LOADING, timeout);
214
- }
215
- }]);
216
- }();
217
- var alertService = new AlertService();
136
+ }, restOptions);
137
+ this.showingAlerts = [alert, ...this.showingAlerts];
138
+ this.renderAlerts();
139
+ return alert.key;
140
+ }
141
+ setDefaultTimeout(timeout) {
142
+ this.defaultTimeout = timeout;
143
+ }
144
+ error(message, timeout) {
145
+ return this.addAlert(message, Alert.Type.ERROR, timeout);
146
+ }
147
+ message(message, timeout) {
148
+ return this.addAlert(message, Alert.Type.MESSAGE, timeout);
149
+ }
150
+ warning(message, timeout) {
151
+ return this.addAlert(message, Alert.Type.WARNING, timeout);
152
+ }
153
+ successMessage(message, timeout) {
154
+ return this.addAlert(message, Alert.Type.SUCCESS, timeout);
155
+ }
156
+ loadingMessage(message, timeout) {
157
+ return this.addAlert(message, Alert.Type.LOADING, timeout);
158
+ }
159
+ }
160
+ const alertService = new AlertService();
218
161
 
219
162
  export { alertService as default };
@@ -1,30 +1,22 @@
1
- import { b as _createClass, e as _classCallCheck, _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/es.object.to-string.js';
3
- import 'core-js/modules/web.dom-collections.for-each.js';
1
+ import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
4
2
 
5
3
  /**
6
4
  * @name Analytics
7
5
  */
8
- var Analytics = /*#__PURE__*/function () {
9
- function Analytics() {
10
- _classCallCheck(this, Analytics);
6
+ class Analytics {
7
+ constructor() {
11
8
  _defineProperty(this, "_plugins", void 0);
12
9
  this._plugins = [];
13
10
  }
14
- return _createClass(Analytics, [{
15
- key: "config",
16
- value: function config(plugins) {
17
- this._plugins = plugins;
18
- }
19
- }, {
20
- key: "trackEvent",
21
- value: function trackEvent(category, action, additionalData) {
22
- this._plugins.forEach(function (plugin) {
23
- plugin.trackEvent(category, action, additionalData);
24
- });
25
- }
26
- }]);
27
- }();
11
+ config(plugins) {
12
+ this._plugins = plugins;
13
+ }
14
+ trackEvent(category, action, additionalData) {
15
+ this._plugins.forEach(plugin => {
16
+ plugin.trackEvent(category, action, additionalData);
17
+ });
18
+ }
19
+ }
28
20
  var analytics = new Analytics();
29
21
 
30
22
  export { Analytics, analytics as default };
@@ -1,10 +1,9 @@
1
- import { b as _createClass, d as _objectSpread2, e as _classCallCheck, _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { _ as _defineProperty, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
 
3
- var DEFAULT_FLUSH_INTERVAL = 10000;
4
- var DEFAULT_FLUSH_MAX_PACK_SIZE = 100;
5
- var AnalyticsCustomPlugin = /*#__PURE__*/function () {
6
- function AnalyticsCustomPlugin(send, isDevelopment, flushInterval) {
7
- _classCallCheck(this, AnalyticsCustomPlugin);
3
+ const DEFAULT_FLUSH_INTERVAL = 10000;
4
+ const DEFAULT_FLUSH_MAX_PACK_SIZE = 100;
5
+ class AnalyticsCustomPlugin {
6
+ constructor(send, isDevelopment, flushInterval) {
8
7
  _defineProperty(this, "_data", void 0);
9
8
  _defineProperty(this, "_flush", void 0);
10
9
  _defineProperty(this, "_isDevelopment", void 0);
@@ -18,71 +17,56 @@ var AnalyticsCustomPlugin = /*#__PURE__*/function () {
18
17
  flushInterval
19
18
  });
20
19
  }
21
- return _createClass(AnalyticsCustomPlugin, [{
22
- key: "config",
23
- value: function config(_config) {
24
- var _this = this;
25
- this._flush = function () {
26
- if (_this._data.length > 0) {
27
- _config.send(_this._data);
28
- _this._data = [];
29
- }
30
- };
31
- this._isDevelopment = _config.isDevelopment;
32
- this._flushInterval = _config.flushInterval || DEFAULT_FLUSH_INTERVAL;
33
- this._flushMaxPackSize = _config.flushMaxPackSize || DEFAULT_FLUSH_MAX_PACK_SIZE;
34
- }
35
- }, {
36
- key: "trackEvent",
37
- value: function trackEvent(category, action, additionalData) {
38
- this._processEvent(category, action, additionalData);
39
- }
40
- }, {
41
- key: "trackPageView",
42
- value: function trackPageView(path, data) {
43
- this._processEvent('page', 'view', data);
44
- }
45
- }, {
46
- key: "_initSendSchedule",
47
- value: function _initSendSchedule() {
48
- var _this2 = this;
49
- window.addEventListener('beforeunload', function () {
50
- var _this2$_flush;
51
- return (_this2$_flush = _this2._flush) === null || _this2$_flush === void 0 ? void 0 : _this2$_flush.call(_this2);
52
- });
53
- if (this._flush != null) {
54
- setInterval(this._flush, this._flushInterval);
20
+ config(config) {
21
+ this._flush = () => {
22
+ if (this._data.length > 0) {
23
+ config.send(this._data);
24
+ this._data = [];
55
25
  }
56
- this._hasSendSchedule = true;
26
+ };
27
+ this._isDevelopment = config.isDevelopment;
28
+ this._flushInterval = config.flushInterval || DEFAULT_FLUSH_INTERVAL;
29
+ this._flushMaxPackSize = config.flushMaxPackSize || DEFAULT_FLUSH_MAX_PACK_SIZE;
30
+ }
31
+ trackEvent(category, action, additionalData) {
32
+ this._processEvent(category, action, additionalData);
33
+ }
34
+ trackPageView(path, data) {
35
+ this._processEvent('page', 'view', data);
36
+ }
37
+ _initSendSchedule() {
38
+ window.addEventListener('beforeunload', () => {
39
+ var _this$_flush;
40
+ return (_this$_flush = this._flush) === null || _this$_flush === void 0 ? void 0 : _this$_flush.call(this);
41
+ });
42
+ if (this._flush != null) {
43
+ setInterval(this._flush, this._flushInterval);
57
44
  }
58
- }, {
59
- key: "_processEvent",
60
- value: function _processEvent(category, action, data) {
61
- if (!this._hasSendSchedule && this._flush) {
62
- this._initSendSchedule();
63
- }
64
- if (this._isDevelopment) {
65
- console.log('TRACKING DATA = ', category, action, data); // eslint-disable-line no-console
66
- }
67
- var baseSendingData = {
68
- category,
69
- action,
70
- timestamp: Date.now()
71
- };
72
- this._addDataToFlushingPack(data ? _objectSpread2(_objectSpread2({}, baseSendingData), {}, {
73
- data
74
- }) : baseSendingData);
45
+ this._hasSendSchedule = true;
46
+ }
47
+ _processEvent(category, action, data) {
48
+ if (!this._hasSendSchedule && this._flush) {
49
+ this._initSendSchedule();
75
50
  }
76
- }, {
77
- key: "_addDataToFlushingPack",
78
- value: function _addDataToFlushingPack(sendingData) {
79
- this._data.push(sendingData);
80
- if (this._flushMaxPackSize != null && this._data.length >= this._flushMaxPackSize) {
81
- var _this$_flush;
82
- (_this$_flush = this._flush) === null || _this$_flush === void 0 || _this$_flush.call(this);
83
- }
51
+ if (this._isDevelopment) {
52
+ console.log('TRACKING DATA = ', category, action, data); // eslint-disable-line no-console
84
53
  }
85
- }]);
86
- }();
54
+ const baseSendingData = {
55
+ category,
56
+ action,
57
+ timestamp: Date.now()
58
+ };
59
+ this._addDataToFlushingPack(data ? _objectSpread2(_objectSpread2({}, baseSendingData), {}, {
60
+ data
61
+ }) : baseSendingData);
62
+ }
63
+ _addDataToFlushingPack(sendingData) {
64
+ this._data.push(sendingData);
65
+ if (this._flushMaxPackSize != null && this._data.length >= this._flushMaxPackSize) {
66
+ var _this$_flush2;
67
+ (_this$_flush2 = this._flush) === null || _this$_flush2 === void 0 || _this$_flush2.call(this);
68
+ }
69
+ }
70
+ }
87
71
 
88
72
  export { AnalyticsCustomPlugin as default };
@@ -1,29 +1,20 @@
1
- import { d as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import WindowFlow from './window-flow.js';
3
3
  import onBackendDown from './down-notification.js';
4
4
  import Auth from './auth__core.js';
5
5
  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';
6
- import 'core-js/modules/es.array.concat.js';
7
- import 'core-js/modules/es.object.to-string.js';
8
- import 'core-js/modules/es.promise.js';
9
6
  import './response-parser.js';
10
- import 'core-js/modules/es.array.index-of.js';
11
7
  import 'core-js/modules/es.regexp.exec.js';
12
- import 'core-js/modules/es.regexp.to-string.js';
13
8
  import 'core-js/modules/es.string.replace.js';
14
- import 'core-js/modules/web.dom-collections.for-each.js';
15
9
  import 'es6-error';
16
10
  import '../global/url.js';
17
- import 'core-js/modules/es.string.match.js';
18
- import 'core-js/modules/es.array.filter.js';
19
11
  import 'react';
20
12
  import 'prop-types';
21
13
  import '../alert-service/alert-service.js';
22
- import 'core-js/modules/es.array.map.js';
14
+ import 'core-js/modules/web.dom-collections.iterator.js';
23
15
  import 'react-dom/client';
24
16
  import '../global/get-uid.js';
25
17
  import '../alert/alert.js';
26
- import 'core-js/modules/es.object.values.js';
27
18
  import 'classnames';
28
19
  import '@jetbrains/icons/exception';
29
20
  import '@jetbrains/icons/checkmark';
@@ -33,21 +24,12 @@ import '../icon/icon.js';
33
24
  import 'util-deprecate';
34
25
  import '../icon/icon__constants.js';
35
26
  import '../_helpers/icon__svg.js';
36
- import 'core-js/modules/es.string.starts-with.js';
37
27
  import '../global/memoize.js';
38
- import 'core-js/modules/es.array.iterator.js';
39
- import 'core-js/modules/es.map.js';
40
- import 'core-js/modules/es.weak-map.js';
41
- import 'core-js/modules/web.dom-collections.iterator.js';
42
28
  import 'react/jsx-runtime';
43
29
  import '../loader-inline/loader-inline.js';
44
30
  import '../global/data-tests.js';
45
31
  import 'core-js/modules/es.array.reduce.js';
46
- import 'core-js/modules/es.object.entries.js';
47
32
  import '../global/dom.js';
48
- import 'core-js/modules/es.object.assign.js';
49
- import 'core-js/modules/es.set.js';
50
- import 'core-js/modules/es.string.split.js';
51
33
  import '../button/button.js';
52
34
  import '@jetbrains/icons/chevron-down';
53
35
  import '../link/clickableLink.js';
@@ -60,11 +42,6 @@ import '../popup/popup.js';
60
42
  import '../global/schedule-raf.js';
61
43
  import '../shortcuts/shortcuts.js';
62
44
  import '../shortcuts/core.js';
63
- import 'core-js/modules/es.array.find-index.js';
64
- import 'core-js/modules/es.array.includes.js';
65
- import 'core-js/modules/es.array.slice.js';
66
- import 'core-js/modules/es.array.splice.js';
67
- import 'core-js/modules/es.string.includes.js';
68
45
  import 'combokeys';
69
46
  import '../global/sniffer.js';
70
47
  import 'sniffr';
@@ -76,13 +53,11 @@ import '../alert/container.js';
76
53
  import '../link/link.js';
77
54
  import '../_helpers/link.js';
78
55
  import '../group/group.js';
79
- import 'core-js/modules/es.string.search.js';
80
56
  import 'core-js/modules/web.url.js';
81
57
  import 'core-js/modules/web.url.to-json.js';
82
58
  import 'core-js/modules/web.url-search-params.js';
83
59
  import '../global/listeners.js';
84
60
  import '../http/http.js';
85
- import 'core-js/modules/es.reflect.delete-property.js';
86
61
  import '../global/promise-with-timeout.js';
87
62
  import '../i18n/i18n.js';
88
63
  import './storage.js';
@@ -1,6 +1,6 @@
1
1
  import Listeners, { Handler } from '../global/listeners';
2
2
  import HTTP, { HTTPAuth, RequestParams } from '../http/http';
3
- import AuthDialogService from '../auth-dialog-service/auth-dialog-service';
3
+ import type AuthDialogService from '../auth-dialog-service/auth-dialog-service';
4
4
  import AuthStorage, { AuthState } from './storage';
5
5
  import { AuthError, AuthResponse } from './response-parser';
6
6
  import AuthRequestBuilder from './request-builder';