@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,7 +1,7 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import ActualStorage from '../storage/storage.js';
3
2
  import '../storage/storage__local.js';
4
3
  import '../alert-service/alert-service.js';
4
+ import '../_helpers/_rollupPluginBabelHelpers.js';
5
5
  import 'react';
6
6
  import '../global/react-render-adapter.js';
7
7
  import 'react-dom';
@@ -62,22 +62,22 @@ const DEFAULT_STATE_QUOTA = 102400; // 100 kb ~~ 200 tabs with a large list of s
62
62
  const DEFAULT_STATE_TTL = 1000 * 60 * 60 * 24; // nobody will need auth state after a day
63
63
  const UPDATE_USER_TIMEOUT = 1000;
64
64
  class AuthStorage {
65
+ messagePrefix;
66
+ stateKeyPrefix;
67
+ tokenKey;
68
+ userKey;
69
+ stateTTL;
70
+ stateQuota;
71
+ _lastMessage;
72
+ _stateStorage;
73
+ _tokenStorage;
74
+ _messagesStorage;
75
+ _currentUserStorage;
65
76
  /**
66
77
  * Custom storage for Auth
67
78
  * @param {{stateKeyPrefix: string, tokenKey: string, onTokenRemove: Function}} config
68
79
  */
69
80
  constructor(config) {
70
- _defineProperty(this, "messagePrefix", void 0);
71
- _defineProperty(this, "stateKeyPrefix", void 0);
72
- _defineProperty(this, "tokenKey", void 0);
73
- _defineProperty(this, "userKey", void 0);
74
- _defineProperty(this, "stateTTL", void 0);
75
- _defineProperty(this, "stateQuota", void 0);
76
- _defineProperty(this, "_lastMessage", void 0);
77
- _defineProperty(this, "_stateStorage", void 0);
78
- _defineProperty(this, "_tokenStorage", void 0);
79
- _defineProperty(this, "_messagesStorage", void 0);
80
- _defineProperty(this, "_currentUserStorage", void 0);
81
81
  this.messagePrefix = config.messagePrefix || '';
82
82
  this.stateKeyPrefix = config.stateKeyPrefix || '';
83
83
  this.tokenKey = config.tokenKey || '';
@@ -1,22 +1,21 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import ExtendableError from 'es6-error';
3
2
  import { CODE } from '../http/http.js';
4
3
  import '../global/url.js';
5
4
 
6
5
  class TokenValidationError extends ExtendableError {
6
+ cause;
7
+ authRedirect;
7
8
  constructor(message, cause) {
8
9
  super(message);
9
- _defineProperty(this, "cause", void 0);
10
- _defineProperty(this, "authRedirect", void 0);
11
10
  this.cause = cause;
12
11
  this.authRedirect = true;
13
12
  }
14
13
  }
15
14
  class TokenValidator {
15
+ _getUser;
16
+ _config;
17
+ _storage;
16
18
  constructor(config, getUser, storage) {
17
- _defineProperty(this, "_getUser", void 0);
18
- _defineProperty(this, "_config", void 0);
19
- _defineProperty(this, "_storage", void 0);
20
19
  this._getUser = getUser;
21
20
  this._config = config;
22
21
  this._storage = storage;
@@ -35,7 +34,14 @@ class TokenValidator {
35
34
  * @const {number}
36
35
  */
37
36
  // eslint-disable-next-line @typescript-eslint/no-magic-numbers
38
-
37
+ static DEFAULT_REFRESH_BEFORE = 10 * 60; // 20 min in s
38
+ /**
39
+ * Error class for auth token validation
40
+ *
41
+ * @param {string} message Error message
42
+ * @param {Error=} cause Error that caused this error
43
+ */
44
+ static TokenValidationError = TokenValidationError;
39
45
  /**
40
46
  * Check token validity against all conditions.
41
47
  * @returns {Promise.<string>}
@@ -152,14 +158,5 @@ class TokenValidator {
152
158
  return storedToken.accessToken;
153
159
  }
154
160
  }
155
- _defineProperty(TokenValidator, "DEFAULT_REFRESH_BEFORE", 10 * 60);
156
- // 20 min in s
157
- /**
158
- * Error class for auth token validation
159
- *
160
- * @param {string} message Error message
161
- * @param {Error=} cause Error that caused this error
162
- */
163
- _defineProperty(TokenValidator, "TokenValidationError", TokenValidationError);
164
161
 
165
162
  export { TokenValidationError, TokenValidator as default };
@@ -1,4 +1,3 @@
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';
@@ -6,25 +5,13 @@ import '../global/url.js';
6
5
  const NAVBAR_HEIGHT = 50;
7
6
  const CLOSED_CHECK_INTERVAL = 200;
8
7
  class WindowFlow {
8
+ _timeoutId = undefined;
9
+ _requestBuilder;
10
+ _storage;
11
+ reject;
12
+ _loginWindow;
13
+ _promise;
9
14
  constructor(requestBuilder, storage) {
10
- _defineProperty(this, "_timeoutId", undefined);
11
- _defineProperty(this, "_requestBuilder", void 0);
12
- _defineProperty(this, "_storage", void 0);
13
- _defineProperty(this, "reject", void 0);
14
- _defineProperty(this, "_loginWindow", void 0);
15
- _defineProperty(this, "_promise", void 0);
16
- _defineProperty(this, "checkIsClosed", () => {
17
- if (this._loginWindow?.closed) {
18
- this.stop();
19
- return;
20
- }
21
- this._timeoutId = window.setTimeout(this.checkIsClosed, CLOSED_CHECK_INTERVAL);
22
- });
23
- _defineProperty(this, "_reset", () => {
24
- this._promise = null;
25
- this._loginWindow = null;
26
- clearTimeout(this._timeoutId);
27
- });
28
15
  this._requestBuilder = requestBuilder;
29
16
  this._storage = storage;
30
17
  this._reset();
@@ -89,6 +76,18 @@ class WindowFlow {
89
76
  this.checkIsClosed();
90
77
  });
91
78
  }
79
+ checkIsClosed = () => {
80
+ if (this._loginWindow?.closed) {
81
+ this.stop();
82
+ return;
83
+ }
84
+ this._timeoutId = window.setTimeout(this.checkIsClosed, CLOSED_CHECK_INTERVAL);
85
+ };
86
+ _reset = () => {
87
+ this._promise = null;
88
+ this._loginWindow = null;
89
+ clearTimeout(this._timeoutId);
90
+ };
92
91
  stop() {
93
92
  if (this._loginWindow != null) {
94
93
  this._loginWindow.close();
@@ -1,4 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import React, { Component } from 'react';
3
2
  import PropTypes from 'prop-types';
4
3
  import classNames from 'classnames';
@@ -7,6 +6,7 @@ import Dialog from '../dialog/dialog.js';
7
6
  import { Button } from '../button/button.js';
8
7
  import { H2 } from '../heading/heading.js';
9
8
  import ContentWrapper from '../island/content.js';
9
+ import '../_helpers/_rollupPluginBabelHelpers.js';
10
10
  import '../global/data-tests.js';
11
11
  import '../island/adaptive-island-hoc.js';
12
12
  import '../global/linear-function.js';
@@ -42,40 +42,65 @@ import '../_helpers/button__classes.js';
42
42
  var modules_ae521deb = {"unit":"i__const_unit_0","light":"light_rui_159b","dialog":"dialog_rui_159b","content":"content_rui_159b font_rui_8bff","button":"button_rui_159b","firstButton":"firstButton_rui_159b button_rui_159b","title":"title_rui_159b","logo":"logo_rui_159b","error":"error_rui_159b"};
43
43
 
44
44
  class AuthDialog extends Component {
45
- constructor() {
46
- super(...arguments);
47
- _defineProperty(this, "state", {
48
- retrying: false
49
- });
50
- _defineProperty(this, "onEscPress", () => {
51
- if (this.props.cancelOnEsc) {
52
- this.props.onCancel();
53
- }
54
- });
55
- _defineProperty(this, "onRetryPress", async () => {
56
- if (!this.props.onTryAgain || this.state.retrying) {
57
- return;
58
- }
59
- this.setState({
60
- retrying: true
61
- });
62
- try {
63
- await this.props.onTryAgain();
64
- } catch (e) {
65
- // do nothing, error is handled in onTryAgain
66
- } finally {
67
- this.setState({
68
- retrying: false
69
- });
70
- }
71
- });
72
- }
45
+ static propTypes = {
46
+ className: PropTypes.string,
47
+ title: PropTypes.string,
48
+ errorMessage: PropTypes.string,
49
+ serviceImage: PropTypes.string,
50
+ serviceName: PropTypes.string,
51
+ loginCaption: PropTypes.string,
52
+ loginToCaption: PropTypes.string,
53
+ show: PropTypes.bool,
54
+ cancelOnEsc: PropTypes.bool,
55
+ confirmLabel: PropTypes.string,
56
+ cancelLabel: PropTypes.string,
57
+ tryAgainLabel: PropTypes.string,
58
+ onConfirm: PropTypes.func,
59
+ onCancel: PropTypes.func,
60
+ onTryAgain: PropTypes.func
61
+ };
62
+ static defaultProps = {
63
+ loginCaption: 'Log in',
64
+ loginToCaption: 'Log in to %serviceName%',
65
+ tryAgainLabel: 'Try again',
66
+ show: false,
67
+ cancelOnEsc: true,
68
+ confirmLabel: 'Log in',
69
+ cancelLabel: 'Remain a guest',
70
+ onConfirm: () => {},
71
+ onCancel: () => {}
72
+ };
73
+ state = {
74
+ retrying: false
75
+ };
73
76
  componentDidMount() {
74
77
  window.addEventListener('online', this.onRetryPress);
75
78
  }
76
79
  componentWillUnmount() {
77
80
  window.removeEventListener('online', this.onRetryPress);
78
81
  }
82
+ onEscPress = () => {
83
+ if (this.props.cancelOnEsc) {
84
+ this.props.onCancel();
85
+ }
86
+ };
87
+ onRetryPress = async () => {
88
+ if (!this.props.onTryAgain || this.state.retrying) {
89
+ return;
90
+ }
91
+ this.setState({
92
+ retrying: true
93
+ });
94
+ try {
95
+ await this.props.onTryAgain();
96
+ } catch (e) {
97
+ // do nothing, error is handled in onTryAgain
98
+ } finally {
99
+ this.setState({
100
+ retrying: false
101
+ });
102
+ }
103
+ };
79
104
  render() {
80
105
  const {
81
106
  show,
@@ -133,33 +158,5 @@ class AuthDialog extends Component {
133
158
  }, cancelLabel))));
134
159
  }
135
160
  }
136
- _defineProperty(AuthDialog, "propTypes", {
137
- className: PropTypes.string,
138
- title: PropTypes.string,
139
- errorMessage: PropTypes.string,
140
- serviceImage: PropTypes.string,
141
- serviceName: PropTypes.string,
142
- loginCaption: PropTypes.string,
143
- loginToCaption: PropTypes.string,
144
- show: PropTypes.bool,
145
- cancelOnEsc: PropTypes.bool,
146
- confirmLabel: PropTypes.string,
147
- cancelLabel: PropTypes.string,
148
- tryAgainLabel: PropTypes.string,
149
- onConfirm: PropTypes.func,
150
- onCancel: PropTypes.func,
151
- onTryAgain: PropTypes.func
152
- });
153
- _defineProperty(AuthDialog, "defaultProps", {
154
- loginCaption: 'Log in',
155
- loginToCaption: 'Log in to %serviceName%',
156
- tryAgainLabel: 'Try again',
157
- show: false,
158
- cancelOnEsc: true,
159
- confirmLabel: 'Log in',
160
- cancelLabel: 'Remain a guest',
161
- onConfirm: () => {},
162
- onCancel: () => {}
163
- });
164
161
 
165
162
  export { AuthDialog as default };
@@ -3,10 +3,10 @@ import { ControlsHeightContext, getGlobalControlsHeight } from '../global/contro
3
3
  import { render } from '../global/react-render-adapter.js';
4
4
  import AuthDialog from '../auth-dialog/auth-dialog.js';
5
5
  import 'react-dom';
6
- import '../_helpers/_rollupPluginBabelHelpers.js';
7
6
  import 'prop-types';
8
7
  import 'classnames';
9
8
  import '../island/island.js';
9
+ import '../_helpers/_rollupPluginBabelHelpers.js';
10
10
  import '../global/data-tests.js';
11
11
  import '../island/adaptive-island-hoc.js';
12
12
  import '../global/linear-function.js';
@@ -2,7 +2,6 @@ import angular from 'angular';
2
2
  import '../auth/auth.js';
3
3
  import Auth from '../auth/auth__core.js';
4
4
  import '../auth/window-flow.js';
5
- import '../_helpers/_rollupPluginBabelHelpers.js';
6
5
  import '../auth/response-parser.js';
7
6
  import 'es6-error';
8
7
  import '../global/url.js';
@@ -10,6 +9,7 @@ import '../auth/down-notification.js';
10
9
  import 'react';
11
10
  import 'prop-types';
12
11
  import '../alert-service/alert-service.js';
12
+ import '../_helpers/_rollupPluginBabelHelpers.js';
13
13
  import '../global/react-render-adapter.js';
14
14
  import 'react-dom';
15
15
  import '../global/get-uid.js';
@@ -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 } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
@@ -24,22 +24,37 @@ var Size;
24
24
  Size[Size["Size56"] = 56] = "Size56";
25
25
  })(Size || (Size = {}));
26
26
  class Avatar extends PureComponent {
27
- constructor() {
28
- super(...arguments);
29
- _defineProperty(this, "state", {
30
- errorUrl: ''
31
- });
32
- _defineProperty(this, "handleError", () => {
33
- this.setState({
34
- errorUrl: this.props.url
35
- });
27
+ static propTypes = {
28
+ dpr: PropTypes.number,
29
+ className: PropTypes.string,
30
+ size: PropTypes.number,
31
+ style: PropTypes.object,
32
+ url: PropTypes.string,
33
+ round: PropTypes.bool,
34
+ subavatar: PropTypes.string,
35
+ subavatarSize: PropTypes.number,
36
+ username: PropTypes.string,
37
+ skipParams: PropTypes.bool
38
+ };
39
+ static defaultProps = {
40
+ dpr: getPixelRatio(),
41
+ size: Size.Size20,
42
+ subavatarSize: Size.Size20 / 2,
43
+ style: {}
44
+ };
45
+ state = {
46
+ errorUrl: ''
47
+ };
48
+ handleError = () => {
49
+ this.setState({
50
+ errorUrl: this.props.url
36
51
  });
37
- _defineProperty(this, "handleSuccess", () => {
38
- this.setState({
39
- errorUrl: ''
40
- });
52
+ };
53
+ handleSuccess = () => {
54
+ this.setState({
55
+ errorUrl: ''
41
56
  });
42
- }
57
+ };
43
58
  render() {
44
59
  const {
45
60
  size,
@@ -129,23 +144,5 @@ class Avatar extends PureComponent {
129
144
  }
130
145
  }
131
146
  }
132
- _defineProperty(Avatar, "propTypes", {
133
- dpr: PropTypes.number,
134
- className: PropTypes.string,
135
- size: PropTypes.number,
136
- style: PropTypes.object,
137
- url: PropTypes.string,
138
- round: PropTypes.bool,
139
- subavatar: PropTypes.string,
140
- subavatarSize: PropTypes.number,
141
- username: PropTypes.string,
142
- skipParams: PropTypes.bool
143
- });
144
- _defineProperty(Avatar, "defaultProps", {
145
- dpr: getPixelRatio(),
146
- size: Size.Size20,
147
- subavatarSize: Size.Size20 / 2,
148
- style: {}
149
- });
150
147
 
151
148
  export { Size, Avatar as default };
@@ -1,6 +1,5 @@
1
1
  import angularComponentFactory from '../global/angular-component-factory.js';
2
2
  import Avatar from '../avatar/avatar.js';
3
- import '../_helpers/_rollupPluginBabelHelpers.js';
4
3
  import 'angular';
5
4
  import 'react';
6
5
  import '../global/react-render-adapter.js';
@@ -8,6 +7,7 @@ import 'react-dom';
8
7
  import '../global/ring-angular-component.js';
9
8
  import '../global/react-dom-renderer.js';
10
9
  import 'prop-types';
10
+ import '../_helpers/_rollupPluginBabelHelpers.js';
11
11
  import 'classnames';
12
12
  import '../global/url.js';
13
13
  import '../global/dom.js';
@@ -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 } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
@@ -9,6 +9,15 @@ import { m as modules_6c9187df } from '../_helpers/badge.js';
9
9
  * @name Badge
10
10
  */
11
11
  class Badge extends PureComponent {
12
+ static propTypes = {
13
+ gray: PropTypes.bool,
14
+ valid: PropTypes.bool,
15
+ invalid: PropTypes.bool,
16
+ disabled: PropTypes.bool,
17
+ className: PropTypes.string,
18
+ children: PropTypes.node,
19
+ 'data-test': PropTypes.string
20
+ };
12
21
  render() {
13
22
  const {
14
23
  // Modifiers
@@ -34,14 +43,5 @@ class Badge extends PureComponent {
34
43
  }), children);
35
44
  }
36
45
  }
37
- _defineProperty(Badge, "propTypes", {
38
- gray: PropTypes.bool,
39
- valid: PropTypes.bool,
40
- invalid: PropTypes.bool,
41
- disabled: PropTypes.bool,
42
- className: PropTypes.string,
43
- children: PropTypes.node,
44
- 'data-test': PropTypes.string
45
- });
46
46
 
47
47
  export { Badge as default };
@@ -1,6 +1,5 @@
1
1
  import angularComponentFactory from '../global/angular-component-factory.js';
2
2
  import Badge from '../badge/badge.js';
3
- import '../_helpers/_rollupPluginBabelHelpers.js';
4
3
  import 'angular';
5
4
  import 'react';
6
5
  import '../global/react-render-adapter.js';
@@ -8,6 +7,7 @@ import 'react-dom';
8
7
  import '../global/ring-angular-component.js';
9
8
  import '../global/react-dom-renderer.js';
10
9
  import 'prop-types';
10
+ import '../_helpers/_rollupPluginBabelHelpers.js';
11
11
  import 'classnames';
12
12
  import '../global/data-tests.js';
13
13
  import '../_helpers/badge.js';
@@ -5,7 +5,6 @@ import IconNG from '../icon-ng/icon-ng.js';
5
5
  import '../_helpers/link.js';
6
6
  import '../icon/icon__constants.js';
7
7
  import '../template-ng/template-ng.js';
8
- import '../_helpers/_rollupPluginBabelHelpers.js';
9
8
  import '../global/ring-angular-component.js';
10
9
  import '../_helpers/icon.js';
11
10
 
@@ -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 'focus-visible';
3
3
  import React, { PureComponent, createRef } from 'react';
4
4
  import PropTypes from 'prop-types';
@@ -21,10 +21,29 @@ import '../global/memoize.js';
21
21
  * A component for displaying variously styled buttons.
22
22
  */
23
23
  class Button extends PureComponent {
24
- constructor() {
25
- super(...arguments);
26
- _defineProperty(this, "buttonRef", /*#__PURE__*/createRef());
27
- }
24
+ static propTypes = {
25
+ active: PropTypes.bool,
26
+ danger: PropTypes.bool,
27
+ delayed: PropTypes.bool,
28
+ loader: PropTypes.bool,
29
+ primary: PropTypes.bool,
30
+ short: PropTypes.bool,
31
+ text: PropTypes.bool,
32
+ inline: PropTypes.bool,
33
+ dropdown: PropTypes.bool,
34
+ href: PropTypes.string,
35
+ target: PropTypes.string,
36
+ icon: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
37
+ iconSize: PropTypes.number,
38
+ iconClassName: PropTypes.string,
39
+ iconSuppressSizeWarning: PropTypes.bool,
40
+ className: PropTypes.string,
41
+ children: PropTypes.node,
42
+ onClick: PropTypes.func
43
+ };
44
+ static IconSize = Size;
45
+ static contextType = ControlsHeightContext;
46
+ buttonRef = /*#__PURE__*/createRef();
28
47
  render() {
29
48
  const {
30
49
  // Modifiers
@@ -87,27 +106,5 @@ class Button extends PureComponent {
87
106
  }, commonProps));
88
107
  }
89
108
  }
90
- _defineProperty(Button, "propTypes", {
91
- active: PropTypes.bool,
92
- danger: PropTypes.bool,
93
- delayed: PropTypes.bool,
94
- loader: PropTypes.bool,
95
- primary: PropTypes.bool,
96
- short: PropTypes.bool,
97
- text: PropTypes.bool,
98
- inline: PropTypes.bool,
99
- dropdown: PropTypes.bool,
100
- href: PropTypes.string,
101
- target: PropTypes.string,
102
- icon: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
103
- iconSize: PropTypes.number,
104
- iconClassName: PropTypes.string,
105
- iconSuppressSizeWarning: PropTypes.bool,
106
- className: PropTypes.string,
107
- children: PropTypes.node,
108
- onClick: PropTypes.func
109
- });
110
- _defineProperty(Button, "IconSize", Size);
111
- _defineProperty(Button, "contextType", ControlsHeightContext);
112
109
 
113
110
  export { Button, Size as IconSize, Button 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 } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
@@ -10,6 +10,10 @@ import { m as modules_1068e447 } from '../_helpers/button-group.js';
10
10
  * @name Button Group
11
11
  */
12
12
  class ButtonGroup extends PureComponent {
13
+ static propTypes = {
14
+ children: PropTypes.node,
15
+ className: PropTypes.string
16
+ };
13
17
  render() {
14
18
  const {
15
19
  className,
@@ -24,9 +28,5 @@ class ButtonGroup extends PureComponent {
24
28
  }));
25
29
  }
26
30
  }
27
- _defineProperty(ButtonGroup, "propTypes", {
28
- children: PropTypes.node,
29
- className: PropTypes.string
30
- });
31
31
 
32
32
  export { ButtonGroup as default };
@@ -1,10 +1,13 @@
1
- import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import React, { PureComponent } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
5
5
  import { m as modules_1068e447 } from '../_helpers/button-group.js';
6
6
 
7
7
  class Caption extends PureComponent {
8
+ static propTypes = {
9
+ className: PropTypes.node
10
+ };
8
11
  render() {
9
12
  const {
10
13
  className
@@ -15,8 +18,5 @@ class Caption extends PureComponent {
15
18
  }));
16
19
  }
17
20
  }
18
- _defineProperty(Caption, "propTypes", {
19
- className: PropTypes.node
20
- });
21
21
 
22
22
  export { Caption as default };