@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.
- package/components/alert/alert.js +2 -1
- package/components/alert/container.js +2 -1
- package/components/auth/auth__core.js +2 -1
- package/components/auth/request-builder.js +2 -1
- package/components/auth/response-parser.js +2 -1
- package/components/auth/token-validator.js +2 -1
- package/components/auth-dialog/auth-dialog.js +2 -1
- package/components/avatar/avatar.js +2 -1
- package/components/badge/badge.js +2 -1
- package/components/button/button.js +2 -1
- package/components/button-group/button-group.js +2 -1
- package/components/button-group/caption.js +2 -1
- package/components/button-set/button-set.js +2 -1
- package/components/button-toolbar/button-toolbar.js +2 -1
- package/components/caret/caret.js +2 -1
- package/components/checkbox/checkbox.js +2 -1
- package/components/code/code.js +2 -1
- package/components/confirm/confirm.js +2 -1
- package/components/content-layout/content-layout.js +2 -1
- package/components/content-layout/sidebar.js +2 -1
- package/components/data-list/data-list.js +2 -1
- package/components/data-list/item.js +2 -1
- package/components/date-picker/date-input.js +2 -1
- package/components/date-picker/date-picker.js +2 -1
- package/components/date-picker/date-popup.js +2 -1
- package/components/date-picker/day.js +2 -1
- package/components/date-picker/month-slider.js +2 -1
- package/components/date-picker/years.js +2 -1
- package/components/dialog/dialog.d.ts +4 -16
- package/components/dialog/dialog.js +6 -3
- package/components/dropdown/dropdown.js +2 -1
- package/components/error-bubble/error-bubble.js +2 -1
- package/components/error-message/error-message.js +2 -1
- package/components/footer/footer.js +1 -0
- package/components/global/react-dom-renderer.js +2 -1
- package/components/grid/col.js +2 -1
- package/components/grid/grid.js +2 -1
- package/components/grid/row.js +2 -1
- package/components/group/group.js +2 -1
- package/components/header/logo.js +2 -1
- package/components/header/profile.js +2 -1
- package/components/header/services-link.js +2 -1
- package/components/header/services.js +2 -1
- package/components/header/smart-profile.js +2 -1
- package/components/header/smart-services.js +2 -1
- package/components/header/tray-icon.js +2 -1
- package/components/header/tray.js +2 -1
- package/components/hub-source/hub-source.js +2 -1
- package/components/icon/icon.js +2 -1
- package/components/input/input.js +2 -1
- package/components/island/island.js +2 -1
- package/components/island-legacy/content-legacy.js +2 -1
- package/components/island-legacy/header-legacy.js +2 -1
- package/components/island-legacy/island-legacy.js +2 -1
- package/components/link/clickableLink.js +2 -1
- package/components/list/list.js +2 -1
- package/components/list/list__hint.js +2 -1
- package/components/list/list__users-groups-source.js +2 -1
- package/components/loader/loader.js +2 -1
- package/components/loader/loader__core.js +2 -1
- package/components/loader-screen/loader-screen.js +2 -1
- package/components/login-dialog/login-dialog.js +2 -1
- package/components/message/message.js +2 -1
- package/components/pager/pager.js +2 -1
- package/components/panel/panel.js +2 -1
- package/components/permissions/permissions.js +2 -1
- package/components/permissions/permissions__cache.js +2 -1
- package/components/popup/popup.js +2 -1
- package/components/popup-menu/popup-menu.js +2 -1
- package/components/progress-bar/progress-bar.js +2 -1
- package/components/query-assist/query-assist.js +4 -3
- package/components/radio/radio.js +2 -1
- package/components/radio/radio__item.js +2 -1
- package/components/select/select.js +2 -1
- package/components/select/select__filter.js +2 -1
- package/components/select/select__popup.js +4 -2
- package/components/shortcuts/shortcuts.js +2 -1
- package/components/storage/storage__fallback.js +2 -1
- package/components/tab-trap/tab-trap.js +2 -1
- package/components/table/cell.js +2 -1
- package/components/table/header-cell.js +2 -1
- package/components/table/header.js +2 -1
- package/components/table/multitable.js +2 -1
- package/components/table/row.d.ts +1 -0
- package/components/table/row.js +6 -4
- package/components/table/smart-table.d.ts +1 -0
- package/components/table/table.d.ts +2 -0
- package/components/table/table.js +8 -4
- package/components/tabs/smart-tabs.js +2 -1
- package/components/tabs/tab.js +2 -1
- package/components/tag/tag.js +2 -1
- package/components/tags-input/tags-input.d.ts +1 -1
- package/components/tags-input/tags-input.js +3 -2
- package/components/tags-list/tags-list.js +2 -1
- package/components/text/text.js +2 -1
- package/components/tooltip/tooltip.js +2 -1
- package/components/user-agreement/user-agreement.js +2 -1
- package/components/user-card/card.js +2 -1
- package/components/user-card/smart-user-card-tooltip.d.ts +1 -1
- package/components/user-card/smart-user-card-tooltip.js +2 -1
- package/components/user-card/tooltip.js +2 -1
- package/dist/_helpers/_rollupPluginBabelHelpers.js +1 -29
- package/dist/_helpers/anchor.js +1 -1
- package/dist/_helpers/card.js +44 -47
- package/dist/_helpers/footer.js +1 -0
- package/dist/_helpers/select__filter.js +10 -13
- package/dist/_helpers/services-link.js +10 -10
- package/dist/_helpers/sidebar.js +34 -37
- package/dist/_helpers/theme.js +1 -1
- package/dist/_helpers/title.js +12 -16
- package/dist/alert/alert.js +63 -66
- package/dist/alert/container.js +5 -5
- package/dist/alert-service/alert-service.js +5 -7
- package/dist/analytics/analytics.js +1 -2
- package/dist/analytics/analytics__custom-plugin.js +6 -8
- package/dist/auth/auth.js +1 -1
- package/dist/auth/auth__core.js +26 -26
- package/dist/auth/background-flow.js +4 -5
- package/dist/auth/iframe-flow.js +12 -12
- package/dist/auth/landing.js +1 -1
- package/dist/auth/request-builder.js +3 -5
- package/dist/auth/response-parser.js +5 -6
- package/dist/auth/storage.js +12 -12
- package/dist/auth/token-validator.js +13 -16
- package/dist/auth/window-flow.js +18 -19
- package/dist/auth-dialog/auth-dialog.js +54 -57
- package/dist/auth-dialog-service/auth-dialog-service.js +1 -1
- package/dist/auth-ng/auth-ng.js +1 -1
- package/dist/avatar/avatar.js +30 -33
- package/dist/avatar-ng/avatar-ng.js +1 -1
- package/dist/badge/badge.js +10 -10
- package/dist/badge-ng/badge-ng.js +1 -1
- package/dist/breadcrumb-ng/breadcrumb-ng.js +0 -1
- package/dist/button/button.js +24 -27
- package/dist/button-group/button-group.js +5 -5
- package/dist/button-group/caption.js +4 -4
- package/dist/button-ng/button-ng.js +68 -69
- package/dist/button-set/button-set.js +6 -6
- package/dist/button-toolbar/button-toolbar.js +6 -6
- package/dist/caret/caret.js +2 -4
- package/dist/checkbox/checkbox.js +27 -30
- package/dist/checkbox-ng/checkbox-ng.js +0 -1
- package/dist/code/code.js +17 -21
- package/dist/confirm/confirm.js +31 -34
- package/dist/confirm-ng/confirm-ng.js +1 -1
- package/dist/confirm-service/confirm-service.js +1 -1
- package/dist/content-layout/content-layout.js +17 -20
- package/dist/contenteditable/contenteditable.js +11 -11
- package/dist/data-list/data-list.js +49 -55
- package/dist/data-list/item.js +64 -67
- package/dist/data-list/selection.js +0 -1
- package/dist/data-list/title.js +1 -1
- package/dist/data-list-ng/data-list-ng.js +1 -1
- package/dist/date-picker/date-input.js +39 -42
- package/dist/date-picker/date-picker.js +162 -165
- package/dist/date-picker/date-popup.js +119 -119
- package/dist/date-picker/day.js +34 -38
- package/dist/date-picker/month-names.js +11 -14
- package/dist/date-picker/month-slider.js +24 -28
- package/dist/date-picker/month.js +1 -1
- package/dist/date-picker/months.js +1 -1
- package/dist/date-picker/years.js +9 -13
- package/dist/dialog/dialog.d.ts +4 -16
- package/dist/dialog/dialog.js +68 -65
- package/dist/dialog-ng/dialog-ng.js +21 -22
- package/dist/docked-panel-ng/docked-panel-ng.js +0 -1
- package/dist/dropdown/dropdown.js +101 -104
- package/dist/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/editable-heading/editable-heading.js +1 -1
- package/dist/error-bubble/error-bubble.js +6 -6
- package/dist/error-message/error-message.js +10 -10
- package/dist/error-message-ng/error-message-ng.js +0 -1
- package/dist/footer-ng/footer-ng.js +19 -21
- package/dist/global/angular-component-factory.js +2 -3
- package/dist/global/dom.js +1 -5
- package/dist/global/focus-sensor-hoc.js +58 -61
- package/dist/global/listeners.js +1 -5
- package/dist/global/react-dom-renderer.js +8 -12
- package/dist/global/rerender-hoc.js +1 -5
- package/dist/global/ring-angular-component.js +1 -3
- package/dist/grid/col.js +13 -14
- package/dist/grid/grid.js +5 -5
- package/dist/grid/row.js +16 -17
- package/dist/group/group.js +5 -5
- package/dist/header/header.js +10 -10
- package/dist/header/logo.js +9 -9
- package/dist/header/profile.js +58 -58
- package/dist/header/services.js +19 -22
- package/dist/header/smart-profile.js +40 -43
- package/dist/header/smart-services.js +28 -31
- package/dist/header/tray-icon.js +6 -6
- package/dist/header/tray.js +5 -5
- package/dist/heading/heading.js +1 -1
- package/dist/heading-ng/heading-ng.js +1 -1
- package/dist/http/http.js +111 -107
- package/dist/http/http.mock.js +3 -4
- package/dist/hub-source/hub-source.js +7 -9
- package/dist/hub-source/hub-source__user.js +0 -1
- package/dist/hub-source/hub-source__users-groups.js +4 -5
- package/dist/icon/icon.js +18 -18
- package/dist/icon/icon__svg.js +1 -1
- package/dist/icon-ng/icon-ng.js +0 -1
- package/dist/input/input.js +35 -38
- package/dist/input-ng/input-ng.js +25 -26
- package/dist/island/adaptive-island-hoc.js +21 -25
- package/dist/island/content.js +62 -65
- package/dist/island/header.js +11 -11
- package/dist/island/island.js +8 -8
- package/dist/island-legacy/content-legacy.js +5 -5
- package/dist/island-legacy/header-legacy.js +5 -5
- package/dist/island-legacy/island-legacy.js +5 -5
- package/dist/link/clickableLink.js +27 -30
- package/dist/link/link.js +16 -16
- package/dist/list/list.js +389 -391
- package/dist/list/list__custom.js +6 -10
- package/dist/list/list__hint.js +3 -4
- package/dist/list/list__item.js +4 -7
- package/dist/list/list__link.js +1 -1
- package/dist/list/list__users-groups-source.js +3 -3
- package/dist/loader/loader.js +16 -19
- package/dist/loader/loader__core.js +62 -62
- package/dist/loader-inline/loader-inline.js +6 -6
- package/dist/loader-ng/loader-ng.js +3 -4
- package/dist/loader-screen/loader-screen.js +6 -6
- package/dist/loader-screen-ng/loader-screen-ng.js +0 -1
- package/dist/login-dialog/login-dialog.js +55 -58
- package/dist/login-dialog/service.js +1 -1
- package/dist/markdown/code.js +0 -1
- package/dist/markdown/markdown.js +1 -1
- package/dist/message/message.js +22 -25
- package/dist/old-browsers-message/white-list.js +2 -2
- package/dist/pager/pager.js +55 -58
- package/dist/pager-ng/pager-ng.js +1 -1
- package/dist/panel/panel.js +5 -5
- package/dist/panel-ng/panel-ng.js +0 -1
- package/dist/permissions/permissions.js +14 -16
- package/dist/permissions/permissions__cache.js +4 -6
- package/dist/permissions-ng/permissions-ng.js +1 -1
- package/dist/place-under-ng/place-under-ng.js +0 -1
- package/dist/popup/popup.js +118 -121
- package/dist/popup/popup.target.js +1 -1
- package/dist/popup/position.js +0 -1
- package/dist/popup-menu/popup-menu.js +19 -22
- package/dist/progress-bar/progress-bar.js +41 -44
- package/dist/progress-bar-ng/progress-bar-ng.js +1 -1
- package/dist/promised-click-ng/promised-click-ng.js +0 -1
- package/dist/query-assist/query-assist.js +507 -501
- package/dist/query-assist/query-assist__suggestions.js +1 -1
- package/dist/query-assist-ng/query-assist-ng.js +1 -1
- package/dist/radio/radio.js +10 -13
- package/dist/radio/radio__item.js +19 -22
- package/dist/select/select.js +350 -349
- package/dist/select/select__popup.js +148 -152
- package/dist/select-ng/select-ng.js +1 -1
- package/dist/select-ng/select-ng__lazy.js +4 -4
- package/dist/select-ng/select-ng__options.js +14 -15
- package/dist/shortcuts/core.js +35 -36
- package/dist/shortcuts/shortcuts-hoc.js +7 -11
- package/dist/shortcuts/shortcuts.js +10 -11
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +0 -1
- package/dist/shortcuts-ng/shortcuts-ng.js +0 -1
- package/dist/sidebar-ng/sidebar-ng.js +0 -1
- package/dist/storage/storage.js +1 -1
- package/dist/storage/storage__fallback.js +8 -10
- package/dist/storage/storage__local.js +2 -2
- package/dist/style.css +1 -1
- package/dist/tab-trap/tab-trap.js +84 -86
- package/dist/table/cell.js +6 -6
- package/dist/table/disable-hover-hoc.js +23 -25
- package/dist/table/header-cell.js +28 -31
- package/dist/table/header.js +58 -61
- package/dist/table/multitable.js +91 -95
- package/dist/table/row-with-focus-sensor.js +15 -18
- package/dist/table/row.d.ts +1 -0
- package/dist/table/row.js +54 -55
- package/dist/table/selection-shortcuts-hoc.js +145 -147
- package/dist/table/selection.js +7 -9
- package/dist/table/smart-table.d.ts +1 -0
- package/dist/table/smart-table.js +21 -24
- package/dist/table/table.d.ts +2 -0
- package/dist/table/table.js +107 -109
- package/dist/table-legacy-ng/table-legacy-ng.js +1 -1
- package/dist/table-legacy-ng/table-legacy-ng__pager.js +1 -1
- package/dist/table-legacy-ng/table-legacy-ng__selection.js +1 -3
- package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +0 -1
- package/dist/table-ng/smart-table-ng.js +1 -1
- package/dist/table-ng/table-ng.js +1 -1
- package/dist/tabs/collapsible-more.js +1 -1
- package/dist/tabs/collapsible-tab.js +1 -1
- package/dist/tabs/dumb-tabs.js +46 -49
- package/dist/tabs/smart-tabs.js +10 -10
- package/dist/tabs/tab.js +7 -8
- package/dist/tag/tag.js +42 -45
- package/dist/tags-input/tags-input.d.ts +1 -1
- package/dist/tags-input/tags-input.js +214 -213
- package/dist/tags-input-ng/tags-input-ng.js +1 -1
- package/dist/tags-list/tags-list.js +20 -20
- package/dist/template-ng/template-ng.js +25 -26
- package/dist/text/text.js +6 -6
- package/dist/toggle/toggle.js +19 -19
- package/dist/toggle-ng/toggle-ng.js +1 -1
- package/dist/tooltip/tooltip.js +86 -89
- package/dist/tooltip-ng/tooltip-ng.js +1 -1
- package/dist/user-agreement/service.js +207 -205
- package/dist/user-agreement/user-agreement.js +39 -42
- package/dist/user-card/smart-user-card-tooltip.d.ts +1 -1
- package/dist/user-card/smart-user-card-tooltip.js +32 -35
- package/dist/user-card/tooltip.js +26 -26
- package/dist/user-card-ng/user-card-ng.js +1 -1
- package/package.json +17 -17
package/dist/auth/storage.js
CHANGED
|
@@ -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 };
|
package/dist/auth/window-flow.js
CHANGED
|
@@ -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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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';
|
package/dist/auth-ng/auth-ng.js
CHANGED
|
@@ -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';
|
package/dist/avatar/avatar.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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';
|
package/dist/badge/badge.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as
|
|
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
|
|
package/dist/button/button.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
|
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
|
|
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 };
|