@jetbrains/ring-ui-built 7.0.28 → 7.0.30
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/_helpers/_rollupPluginBabelHelpers.js +1 -1
- package/components/_helpers/card.js +5 -5
- package/components/_helpers/input.js +7 -7
- package/components/_helpers/select__filter.js +2 -2
- package/components/_helpers/sidebar.js +2 -2
- package/components/alert/alert.js +2 -2
- package/components/alert-service/alert-service.js +2 -2
- package/components/analytics/analytics.js +1 -1
- package/components/analytics/analytics__custom-plugin.js +8 -8
- package/components/auth/auth__core.js +54 -54
- package/components/auth/background-flow.js +4 -4
- package/components/auth/iframe-flow.js +7 -7
- package/components/auth/request-builder.js +3 -3
- package/components/auth/response-parser.js +4 -4
- package/components/auth/storage.js +12 -12
- package/components/auth/token-validator.js +7 -7
- package/components/auth/window-flow.js +7 -7
- package/components/auth-dialog/auth-dialog.js +1 -1
- package/components/avatar-stack/avatar-stack.js +2 -2
- package/components/button/button.js +2 -2
- package/components/caret/caret.js +7 -7
- package/components/checkbox/checkbox.js +1 -1
- package/components/clipboard/clipboard-fallback.js +3 -3
- package/components/code/code.js +1 -1
- package/components/collapse/collapse-content.js +2 -2
- package/components/collapse/collapse.js +1 -1
- package/components/data-list/data-list.js +3 -3
- package/components/data-list/item.js +1 -1
- package/components/date-picker/consts.js +1 -1
- package/components/date-picker/date-input.js +5 -5
- package/components/date-picker/date-picker.js +9 -9
- package/components/date-picker/date-popup.js +4 -4
- package/components/date-picker/years.js +1 -1
- package/components/dialog/dialog.js +1 -1
- package/components/dropdown/dropdown.js +4 -4
- package/components/editable-heading/editable-heading.js +4 -4
- package/components/global/focus-sensor-hoc.js +10 -10
- package/components/global/memoize.js +1 -1
- package/components/global/normalize-indent.js +1 -1
- package/components/global/react-dom-renderer.js +1 -1
- package/components/global/schedule-raf.js +1 -1
- package/components/header/profile.js +6 -6
- package/components/header/smart-profile.js +2 -2
- package/components/header/smart-services.js +4 -4
- package/components/http/http.js +9 -9
- package/components/http/http.mock.js +3 -3
- package/components/hub-source/hub-source.js +6 -6
- package/components/hub-source/hub-source__user.js +2 -2
- package/components/hub-source/hub-source__users-groups.js +4 -4
- package/components/i18n/i18n.js +1 -1
- package/components/island/adaptive-island-hoc.js +1 -1
- package/components/island/content.js +3 -3
- package/components/island/header.js +1 -1
- package/components/list/list.js +4 -4
- package/components/list/list__item.js +20 -9
- package/components/list/list__users-groups-source.js +2 -2
- package/components/loader/loader.js +2 -2
- package/components/loader/loader__core.js +27 -27
- package/components/login-dialog/login-dialog.js +1 -1
- package/components/message/message.js +8 -8
- package/components/old-browsers-message/white-list.js +1 -1
- package/components/pager/pager.js +9 -9
- package/components/permissions/permissions.js +7 -7
- package/components/permissions/permissions__cache.js +4 -4
- package/components/popup/popup.js +8 -8
- package/components/popup/position.js +1 -1
- package/components/popup-menu/popup-menu.js +1 -1
- package/components/progress-bar/progress-bar.js +2 -2
- package/components/query-assist/query-assist.js +49 -47
- package/components/radio/radio__item.js +2 -2
- package/components/select/select.js +27 -27
- package/components/select/select__popup.js +9 -9
- package/components/shortcuts/core.js +1 -1
- package/components/slider/slider.js +8 -8
- package/components/slider/slider.utils.js +1 -1
- package/components/storage/storage__local.js +1 -1
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +4 -4
- package/components/table/header-cell.js +2 -2
- package/components/table/multitable.js +7 -7
- package/components/table/row-with-focus-sensor.js +4 -4
- package/components/table/row.js +1 -1
- package/components/table/selection-shortcuts-hoc.js +12 -12
- package/components/table/selection.js +7 -7
- package/components/table/table.js +1 -1
- package/components/tabs/collapsible-tab.js +3 -3
- package/components/tabs/collapsible-tabs.js +7 -7
- package/components/tabs/dumb-tabs.js +1 -1
- package/components/tabs/smart-tabs.js +1 -1
- package/components/tag/tag.js +2 -2
- package/components/tags-input/tags-input.js +17 -17
- package/components/tooltip/tooltip.js +8 -8
- package/components/upload/upload.js +3 -3
- package/components/user-agreement/service.js +3 -3
- package/components/user-agreement/user-agreement.js +8 -8
- package/package.json +2 -2
@@ -25,7 +25,7 @@ function normalizeIndent(string) {
|
|
25
25
|
}
|
26
26
|
const indents = lines.filter(line => nonemptyRE.test(line)).map(line => {
|
27
27
|
var _line$match$0$length, _line$match;
|
28
|
-
return (_line$match$0$length = (_line$match = line.match(indentRE)) === null || _line$match ===
|
28
|
+
return (_line$match$0$length = (_line$match = line.match(indentRE)) === null || _line$match === void 0 ? void 0 : _line$match[0].length) !== null && _line$match$0$length !== void 0 ? _line$match$0$length : 0;
|
29
29
|
});
|
30
30
|
const minIndent = Math.min(...indents);
|
31
31
|
return lines.map(line => line.slice(minIndent)).join('\n');
|
@@ -6,7 +6,7 @@ import { Component } from 'react';
|
|
6
6
|
class Renderer extends Component {
|
7
7
|
constructor() {
|
8
8
|
super(...arguments);
|
9
|
-
_defineProperty(this, "node",
|
9
|
+
_defineProperty(this, "node", void 0);
|
10
10
|
_defineProperty(this, "nodeRef", node => {
|
11
11
|
this.node = node;
|
12
12
|
});
|
@@ -5,7 +5,7 @@ function scheduleRAF(trailingCall) {
|
|
5
5
|
function doSchedule() {
|
6
6
|
RAF = window.requestAnimationFrame(() => {
|
7
7
|
var _scheduledCb;
|
8
|
-
(_scheduledCb = scheduledCb) === null || _scheduledCb ===
|
8
|
+
(_scheduledCb = scheduledCb) === null || _scheduledCb === void 0 || _scheduledCb();
|
9
9
|
if (trailingCallScheduled) {
|
10
10
|
trailingCallScheduled = false;
|
11
11
|
doSchedule();
|
@@ -147,29 +147,29 @@ class Profile extends PureComponent {
|
|
147
147
|
});
|
148
148
|
const items = [showApplyChangedUser && {
|
149
149
|
rgItemType,
|
150
|
-
label: (_translations$applyCh = translations === null || translations ===
|
150
|
+
label: (_translations$applyCh = translations === null || translations === void 0 ? void 0 : translations.applyChangedUser) !== null && _translations$applyCh !== void 0 ? _translations$applyCh : translate('applyChangedUser'),
|
151
151
|
className: styles.profileMenuItem,
|
152
152
|
onClick: onRevertPostponement
|
153
153
|
}, showLogIn && {
|
154
154
|
rgItemType,
|
155
|
-
label: (_translations$login = translations === null || translations ===
|
155
|
+
label: (_translations$login = translations === null || translations === void 0 ? void 0 : translations.login) !== null && _translations$login !== void 0 ? _translations$login : translate('login'),
|
156
156
|
className: styles.profileMenuItem,
|
157
157
|
onClick: onRevertPostponement
|
158
158
|
}, {
|
159
159
|
rgItemType: PopupMenu.ListProps.Type.LINK,
|
160
|
-
label: (_translations$profile = translations === null || translations ===
|
160
|
+
label: (_translations$profile = translations === null || translations === void 0 ? void 0 : translations.profile) !== null && _translations$profile !== void 0 ? _translations$profile : translate('profile'),
|
161
161
|
target: '_self',
|
162
162
|
// Full page reload in Angular
|
163
163
|
href: profileUrl,
|
164
164
|
LinkComponent
|
165
165
|
}, showSwitchUser && {
|
166
166
|
rgItemType,
|
167
|
-
label: (_translations$switchU = translations === null || translations ===
|
167
|
+
label: (_translations$switchU = translations === null || translations === void 0 ? void 0 : translations.switchUser) !== null && _translations$switchU !== void 0 ? _translations$switchU : translate('switchUser'),
|
168
168
|
className: styles.profileMenuItem,
|
169
169
|
onClick: onSwitchUser
|
170
170
|
}, showLogOut && {
|
171
171
|
rgItemType,
|
172
|
-
label: (_translations$logout = translations === null || translations ===
|
172
|
+
label: (_translations$logout = translations === null || translations === void 0 ? void 0 : translations.logout) !== null && _translations$logout !== void 0 ? _translations$logout : translate('logout'),
|
173
173
|
onClick: onLogout
|
174
174
|
}].filter(isTruthy);
|
175
175
|
return jsx(DropdownMenu, _objectSpread2(_objectSpread2({}, props), {}, {
|
@@ -215,7 +215,7 @@ _defineProperty(Profile, "defaultProps", {
|
|
215
215
|
disabled: loading,
|
216
216
|
loader: loading,
|
217
217
|
onClick: onLogin,
|
218
|
-
children: (_translations$login2 = translations === null || translations ===
|
218
|
+
children: (_translations$login2 = translations === null || translations === void 0 ? void 0 : translations.login) !== null && _translations$login2 !== void 0 ? _translations$login2 : translate('login')
|
219
219
|
})
|
220
220
|
});
|
221
221
|
}
|
@@ -189,8 +189,8 @@ class SmartProfile extends PureComponent {
|
|
189
189
|
translations
|
190
190
|
} = this.props;
|
191
191
|
const userMeta = auth.http.getMetaForResponse(user);
|
192
|
-
if (userMeta !== null && userMeta !==
|
193
|
-
const message = (translations === null || translations ===
|
192
|
+
if (userMeta !== null && userMeta !== void 0 && (_userMeta$headers = userMeta.headers) !== null && _userMeta$headers !== void 0 && _userMeta$headers.has(CERTIFICATE_MISMATCH_HEADER)) {
|
193
|
+
const message = (translations === null || translations === void 0 ? void 0 : translations.certificateMismatch) || "You are authenticated as ".concat(user.login || user.name, ". To authenticate with the client certificate for your account, log out, then click the \"Log in with certificate\" option on the login page.");
|
194
194
|
alertService.warning(message, 0);
|
195
195
|
}
|
196
196
|
}
|
@@ -65,7 +65,7 @@ class SmartServices extends Component {
|
|
65
65
|
loading: false,
|
66
66
|
services: null
|
67
67
|
});
|
68
|
-
_defineProperty(this, "http",
|
68
|
+
_defineProperty(this, "http", void 0);
|
69
69
|
_defineProperty(this, "stopLoading", () => {
|
70
70
|
this.setState({
|
71
71
|
loading: false
|
@@ -76,7 +76,7 @@ class SmartServices extends Component {
|
|
76
76
|
this.setState({
|
77
77
|
loading: true
|
78
78
|
});
|
79
|
-
(_this$getServices = this.getServices(SmartServices.allFields)) === null || _this$getServices ===
|
79
|
+
(_this$getServices = this.getServices(SmartServices.allFields)) === null || _this$getServices === void 0 || _this$getServices.then(services => {
|
80
80
|
this.setState({
|
81
81
|
services
|
82
82
|
});
|
@@ -90,7 +90,7 @@ class SmartServices extends Component {
|
|
90
90
|
auth
|
91
91
|
} = this.props;
|
92
92
|
this.http = new HTTP(auth, auth.getAPIPath());
|
93
|
-
(_this$getServices2 = this.getServices(SmartServices.countFields)) === null || _this$getServices2 ===
|
93
|
+
(_this$getServices2 = this.getServices(SmartServices.countFields)) === null || _this$getServices2 === void 0 || _this$getServices2.then(services => {
|
94
94
|
if (!services.length) {
|
95
95
|
this.setState({
|
96
96
|
visible: false
|
@@ -100,7 +100,7 @@ class SmartServices extends Component {
|
|
100
100
|
}
|
101
101
|
getServices(fields) {
|
102
102
|
var _this$http;
|
103
|
-
return (_this$http = this.http) === null || _this$http ===
|
103
|
+
return (_this$http = this.http) === null || _this$http === void 0 ? void 0 : _this$http.get("services/header?fields=".concat(fields));
|
104
104
|
}
|
105
105
|
render() {
|
106
106
|
const {
|
package/components/http/http.js
CHANGED
@@ -26,8 +26,8 @@ class HTTPError extends ExtendableError {
|
|
26
26
|
constructor(response) {
|
27
27
|
let data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
28
28
|
super("".concat(response.status, " ").concat(response.statusText || ''));
|
29
|
-
_defineProperty(this, "data",
|
30
|
-
_defineProperty(this, "status",
|
29
|
+
_defineProperty(this, "data", void 0);
|
30
|
+
_defineProperty(this, "status", void 0);
|
31
31
|
this.data = data;
|
32
32
|
this.status = response.status;
|
33
33
|
}
|
@@ -44,10 +44,10 @@ class HTTP {
|
|
44
44
|
let _fetchConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
45
45
|
_defineProperty(this, "baseUrl", null);
|
46
46
|
_defineProperty(this, "_requestsMeta", new WeakMap());
|
47
|
-
_defineProperty(this, "fetchConfig",
|
48
|
-
_defineProperty(this, "requestToken",
|
49
|
-
_defineProperty(this, "shouldRefreshToken",
|
50
|
-
_defineProperty(this, "forceTokenUpdate",
|
47
|
+
_defineProperty(this, "fetchConfig", void 0);
|
48
|
+
_defineProperty(this, "requestToken", void 0);
|
49
|
+
_defineProperty(this, "shouldRefreshToken", void 0);
|
50
|
+
_defineProperty(this, "forceTokenUpdate", void 0);
|
51
51
|
_defineProperty(this, "setAuth", auth => {
|
52
52
|
this.requestToken = () => auth.requestToken();
|
53
53
|
this.shouldRefreshToken = auth.constructor.shouldRefreshToken;
|
@@ -71,7 +71,7 @@ class HTTP {
|
|
71
71
|
});
|
72
72
|
_defineProperty(this, "request", async (url, params) => {
|
73
73
|
var _this$requestToken;
|
74
|
-
let token = await ((_this$requestToken = this.requestToken) === null || _this$requestToken ===
|
74
|
+
let token = await ((_this$requestToken = this.requestToken) === null || _this$requestToken === void 0 ? void 0 : _this$requestToken.call(this));
|
75
75
|
let response = await this._performRequest(url, token, params);
|
76
76
|
try {
|
77
77
|
// Wait for result to catch an HTTP error
|
@@ -81,10 +81,10 @@ class HTTP {
|
|
81
81
|
if (!(error instanceof HTTPError)) {
|
82
82
|
throw error;
|
83
83
|
}
|
84
|
-
const shouldRefreshToken = typeof error.data.error === 'string' ? (_this$shouldRefreshTo = this.shouldRefreshToken) === null || _this$shouldRefreshTo ===
|
84
|
+
const shouldRefreshToken = typeof error.data.error === 'string' ? (_this$shouldRefreshTo = this.shouldRefreshToken) === null || _this$shouldRefreshTo === void 0 ? void 0 : _this$shouldRefreshTo.call(this, error.data.error) : false;
|
85
85
|
if (shouldRefreshToken) {
|
86
86
|
var _this$forceTokenUpdat;
|
87
|
-
token = await ((_this$forceTokenUpdat = this.forceTokenUpdate) === null || _this$forceTokenUpdat ===
|
87
|
+
token = await ((_this$forceTokenUpdat = this.forceTokenUpdate) === null || _this$forceTokenUpdat === void 0 ? void 0 : _this$forceTokenUpdat.call(this));
|
88
88
|
response = await this._performRequest(url, token, params);
|
89
89
|
return this._processResponse(response);
|
90
90
|
}
|
@@ -19,9 +19,9 @@ const authMock = {
|
|
19
19
|
class HTTPMock extends HTTP {
|
20
20
|
constructor() {
|
21
21
|
super(authMock);
|
22
|
-
_defineProperty(this, "defaultResponse",
|
23
|
-
_defineProperty(this, "requests",
|
24
|
-
_defineProperty(this, "responsesByUrlMap",
|
22
|
+
_defineProperty(this, "defaultResponse", void 0);
|
23
|
+
_defineProperty(this, "requests", void 0);
|
24
|
+
_defineProperty(this, "responsesByUrlMap", void 0);
|
25
25
|
this.defaultResponse = null;
|
26
26
|
this.requests = [];
|
27
27
|
this.responsesByUrlMap = new Map();
|
@@ -15,12 +15,12 @@ const defaultOptions = {
|
|
15
15
|
*/
|
16
16
|
class HubSource {
|
17
17
|
constructor(auth, relativeUrl, options) {
|
18
|
-
_defineProperty(this, "http",
|
19
|
-
_defineProperty(this, "relativeUrl",
|
20
|
-
_defineProperty(this, "options",
|
21
|
-
_defineProperty(this, "storedData",
|
22
|
-
_defineProperty(this, "isClientSideSearch",
|
23
|
-
_defineProperty(this, "filterFn",
|
18
|
+
_defineProperty(this, "http", void 0);
|
19
|
+
_defineProperty(this, "relativeUrl", void 0);
|
20
|
+
_defineProperty(this, "options", void 0);
|
21
|
+
_defineProperty(this, "storedData", void 0);
|
22
|
+
_defineProperty(this, "isClientSideSearch", void 0);
|
23
|
+
_defineProperty(this, "filterFn", void 0);
|
24
24
|
this.http = auth.http;
|
25
25
|
this.relativeUrl = relativeUrl;
|
26
26
|
this.options = Object.assign({}, defaultOptions, options);
|
@@ -18,8 +18,8 @@ function convertUserForCard(hubUser) {
|
|
18
18
|
login: hubUser.login,
|
19
19
|
banned: hubUser.banned,
|
20
20
|
banReason: hubUser.banReason,
|
21
|
-
email: (_hubUser$profile = hubUser.profile) === null || _hubUser$profile ===
|
22
|
-
avatarUrl: (_hubUser$profile2 = hubUser.profile) === null || _hubUser$profile2 ===
|
21
|
+
email: (_hubUser$profile = hubUser.profile) === null || _hubUser$profile === void 0 || (_hubUser$profile = _hubUser$profile.email) === null || _hubUser$profile === void 0 ? void 0 : _hubUser$profile.email,
|
22
|
+
avatarUrl: (_hubUser$profile2 = hubUser.profile) === null || _hubUser$profile2 === void 0 || (_hubUser$profile2 = _hubUser$profile2.avatar) === null || _hubUser$profile2 === void 0 ? void 0 : _hubUser$profile2.url,
|
23
23
|
href: "".concat(serverUri, "users/").concat(hubUser.id)
|
24
24
|
};
|
25
25
|
}
|
@@ -10,10 +10,10 @@ const defaultOptions = {
|
|
10
10
|
};
|
11
11
|
class HubSourceUsersGroups {
|
12
12
|
constructor(auth, options) {
|
13
|
-
_defineProperty(this, "auth",
|
14
|
-
_defineProperty(this, "options",
|
15
|
-
_defineProperty(this, "usersSource",
|
16
|
-
_defineProperty(this, "groupsSource",
|
13
|
+
_defineProperty(this, "auth", void 0);
|
14
|
+
_defineProperty(this, "options", void 0);
|
15
|
+
_defineProperty(this, "usersSource", void 0);
|
16
|
+
_defineProperty(this, "groupsSource", void 0);
|
17
17
|
this.auth = auth;
|
18
18
|
this.options = Object.assign({}, defaultOptions, options);
|
19
19
|
this.usersSource = new HubSource(auth, 'users', {
|
package/components/i18n/i18n.js
CHANGED
@@ -130,7 +130,7 @@ function translate(key) {
|
|
130
130
|
if (!(key in messages)) {
|
131
131
|
warnMissedKeyOnce(key);
|
132
132
|
}
|
133
|
-
return (_messages$key = messages[key]) !== null && _messages$key !==
|
133
|
+
return (_messages$key = messages[key]) !== null && _messages$key !== void 0 ? _messages$key : defaultMessages[key];
|
134
134
|
}
|
135
135
|
|
136
136
|
export { getTranslations, getTranslationsWithFallback, setTranslations, translate };
|
@@ -22,7 +22,7 @@ function adaptiveIslandHOC(ComposedComponent) {
|
|
22
22
|
scrollHeight,
|
23
23
|
clientHeight
|
24
24
|
} = _ref;
|
25
|
-
if (scrollHeight - clientHeight >= interpolateLinear(TITLE_RESIZE_THRESHOLD, TITLE_RESIZE_END, (_this$state$phase = this.state.phase) !== null && _this$state$phase !==
|
25
|
+
if (scrollHeight - clientHeight >= interpolateLinear(TITLE_RESIZE_THRESHOLD, TITLE_RESIZE_END, (_this$state$phase = this.state.phase) !== null && _this$state$phase !== void 0 ? _this$state$phase : 0)) {
|
26
26
|
const phase = Math.min(1, scrollTop / TITLE_RESIZE_END);
|
27
27
|
this.setState({
|
28
28
|
phase
|
@@ -23,7 +23,7 @@ class Content extends Component {
|
|
23
23
|
_defineProperty(this, "resizeDetector", createResizeDetector({
|
24
24
|
strategy: 'scroll'
|
25
25
|
}));
|
26
|
-
_defineProperty(this, "wrapperNode",
|
26
|
+
_defineProperty(this, "wrapperNode", void 0);
|
27
27
|
_defineProperty(this, "setWrapper", node => {
|
28
28
|
if (!node) {
|
29
29
|
return;
|
@@ -48,14 +48,14 @@ class Content extends Component {
|
|
48
48
|
const scrolledToBottom = offsetHeight + scrollTop >= scrollHeight - END_DISTANCE;
|
49
49
|
if (scrolledToBottom) {
|
50
50
|
var _this$props$onScrollT, _this$props;
|
51
|
-
(_this$props$onScrollT = (_this$props = this.props).onScrollToBottom) === null || _this$props$onScrollT ===
|
51
|
+
(_this$props$onScrollT = (_this$props = this.props).onScrollToBottom) === null || _this$props$onScrollT === void 0 || _this$props$onScrollT.call(_this$props);
|
52
52
|
}
|
53
53
|
this.setState({
|
54
54
|
scrolledToTop,
|
55
55
|
scrolledToBottom
|
56
56
|
});
|
57
57
|
}));
|
58
|
-
_defineProperty(this, "scrollableNode",
|
58
|
+
_defineProperty(this, "scrollableNode", void 0);
|
59
59
|
_defineProperty(this, "setScrollableNodeAndCalculatePosition", node => {
|
60
60
|
if (!node) {
|
61
61
|
return;
|
@@ -31,7 +31,7 @@ const BORDER_APPEAR_PHASE = 0.5;
|
|
31
31
|
class Header extends Component {
|
32
32
|
style(name) {
|
33
33
|
var _this$props$phase;
|
34
|
-
return interpolateLinear(Start[name], End[name], (_this$props$phase = this.props.phase) !== null && _this$props$phase !==
|
34
|
+
return interpolateLinear(Start[name], End[name], (_this$props$phase = this.props.phase) !== null && _this$props$phase !== void 0 ? _this$props$phase : 0);
|
35
35
|
}
|
36
36
|
render() {
|
37
37
|
const _this$props = this.props,
|
package/components/list/list.js
CHANGED
@@ -103,9 +103,9 @@ class List extends Component {
|
|
103
103
|
scrolledToBottom: false
|
104
104
|
});
|
105
105
|
_defineProperty(this, "scheduleScrollListener", scheduleRAF());
|
106
|
-
_defineProperty(this, "virtualizedList",
|
107
|
-
_defineProperty(this, "unmounted",
|
108
|
-
_defineProperty(this, "container",
|
106
|
+
_defineProperty(this, "virtualizedList", void 0);
|
107
|
+
_defineProperty(this, "unmounted", void 0);
|
108
|
+
_defineProperty(this, "container", void 0);
|
109
109
|
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
110
110
|
_defineProperty(this, "_bufferSize", 10);
|
111
111
|
// keep X items above and below of the visible area
|
@@ -386,7 +386,7 @@ class List extends Component {
|
|
386
386
|
_defineProperty(this, "containerRef", el => {
|
387
387
|
this.container = el;
|
388
388
|
});
|
389
|
-
_defineProperty(this, "_inner",
|
389
|
+
_defineProperty(this, "_inner", void 0);
|
390
390
|
_defineProperty(this, "id", getUID('list-'));
|
391
391
|
_defineProperty(this, "shortcutsScope", this.id);
|
392
392
|
_defineProperty(this, "shortcutsMap", {
|
@@ -39,7 +39,7 @@ import 'core-js/modules/es.string.starts-with.js';
|
|
39
39
|
import '../link/clickableLink.js';
|
40
40
|
import '../_helpers/link.js';
|
41
41
|
|
42
|
-
const _excluded = ["disabled", "checkbox", "avatar", "subavatar", "glyph", "icon", "rightGlyph", "description", "label", "title", "details", "hover", "level", "onCheckboxChange", "rightNodes", "leftNodes", "showGeneratedAvatar", "username", "labelWrapper", "rgItemType", "scrolling", "data-test", "className", "url", "LinkComponent", "compact", "hoverClassName", "children"];
|
42
|
+
const _excluded = ["disabled", "checkbox", "avatar", "subavatar", "glyph", "icon", "rightGlyph", "description", "label", "title", "details", "hover", "level", "tabIndex", "onClick", "onCheckboxChange", "onMouseOver", "onMouseDown", "onMouseUp", "rightNodes", "leftNodes", "showGeneratedAvatar", "username", "labelWrapper", "rgItemType", "scrolling", "data-test", "className", "url", "LinkComponent", "compact", "hoverClassName", "children"];
|
43
43
|
/**
|
44
44
|
* @constructor
|
45
45
|
* @extends {ReactComponent}
|
@@ -70,7 +70,12 @@ class ListItem extends PureComponent {
|
|
70
70
|
details,
|
71
71
|
hover,
|
72
72
|
level,
|
73
|
+
tabIndex,
|
74
|
+
onClick,
|
73
75
|
onCheckboxChange,
|
76
|
+
onMouseOver,
|
77
|
+
onMouseDown,
|
78
|
+
onMouseUp,
|
74
79
|
rightNodes,
|
75
80
|
leftNodes,
|
76
81
|
showGeneratedAvatar,
|
@@ -84,9 +89,9 @@ class ListItem extends PureComponent {
|
|
84
89
|
LinkComponent,
|
85
90
|
compact,
|
86
91
|
hoverClassName,
|
87
|
-
children
|
92
|
+
children // TODO use an allow list in 8.0
|
88
93
|
} = _this$props,
|
89
|
-
|
94
|
+
restLinkProps = _objectWithoutProperties(_this$props, _excluded);
|
90
95
|
const checkable = checkbox !== undefined;
|
91
96
|
const shouldShowGeneratedAvatar = showGeneratedAvatar && username != null;
|
92
97
|
const hasLeftNodes = leftNodes || glyph || avatar || shouldShowGeneratedAvatar;
|
@@ -119,10 +124,16 @@ class ListItem extends PureComponent {
|
|
119
124
|
className: styles.label,
|
120
125
|
title: computedTitle,
|
121
126
|
"data-test": "ring-list-item-label",
|
122
|
-
children: label !== null && label !==
|
127
|
+
children: label !== null && label !== void 0 ? label : children
|
123
128
|
});
|
124
|
-
const commonProps =
|
129
|
+
const commonProps = {
|
125
130
|
id: this.id,
|
131
|
+
tabIndex,
|
132
|
+
onClick,
|
133
|
+
onMouseOver,
|
134
|
+
onMouseDown,
|
135
|
+
onFocus: onMouseOver,
|
136
|
+
onMouseUp,
|
126
137
|
className: classes,
|
127
138
|
style,
|
128
139
|
disabled,
|
@@ -168,7 +179,7 @@ class ListItem extends PureComponent {
|
|
168
179
|
children: details
|
169
180
|
})]
|
170
181
|
})
|
171
|
-
}
|
182
|
+
};
|
172
183
|
const LinkComponentToUse = LinkComponent ? linkHOC(LinkComponent) : Link;
|
173
184
|
return jsxs("div", {
|
174
185
|
className: styles.itemContainer,
|
@@ -182,9 +193,9 @@ class ListItem extends PureComponent {
|
|
182
193
|
onChange: onCheckboxChange,
|
183
194
|
onClick: this.stopBubbling
|
184
195
|
})
|
185
|
-
}), isLink ? jsx(LinkComponentToUse, _objectSpread2({
|
186
|
-
pseudo: !
|
187
|
-
}, commonProps)) : jsx("button", _objectSpread2({
|
196
|
+
}), isLink ? jsx(LinkComponentToUse, _objectSpread2(_objectSpread2({
|
197
|
+
pseudo: !restLinkProps.href
|
198
|
+
}, commonProps), restLinkProps)) : jsx("button", _objectSpread2({
|
188
199
|
type: "button"
|
189
200
|
}, commonProps))]
|
190
201
|
});
|
@@ -81,7 +81,7 @@ var Filter;
|
|
81
81
|
class ListUsersGroupsSource extends HubSourceUsersGroups {
|
82
82
|
constructor(auth, options) {
|
83
83
|
super(auth, options);
|
84
|
-
_defineProperty(this, "listSourceOptions",
|
84
|
+
_defineProperty(this, "listSourceOptions", void 0);
|
85
85
|
this.listSourceOptions = Object.assign({}, defaultOptions, options);
|
86
86
|
}
|
87
87
|
getGroupsSectionTitle(groups) {
|
@@ -107,7 +107,7 @@ class ListUsersGroupsSource extends HubSourceUsersGroups {
|
|
107
107
|
return items.push(_objectSpread2(_objectSpread2({}, user), {}, {
|
108
108
|
key: user.id,
|
109
109
|
label: user.name,
|
110
|
-
avatar: user.profile ? (_user$profile$avatar = user.profile.avatar) === null || _user$profile$avatar ===
|
110
|
+
avatar: user.profile ? (_user$profile$avatar = user.profile.avatar) === null || _user$profile$avatar === void 0 ? void 0 : _user$profile$avatar.url : null,
|
111
111
|
description: user.login
|
112
112
|
}));
|
113
113
|
});
|
@@ -19,7 +19,7 @@ const _excluded = ["message", "size", "colors", "data-test", "stop", "determinis
|
|
19
19
|
class Loader extends PureComponent {
|
20
20
|
constructor() {
|
21
21
|
super(...arguments);
|
22
|
-
_defineProperty(this, "loader",
|
22
|
+
_defineProperty(this, "loader", void 0);
|
23
23
|
_defineProperty(this, "initLoader", el => {
|
24
24
|
if (el) {
|
25
25
|
this.loader = new LoaderCore(el, this.props);
|
@@ -37,7 +37,7 @@ class Loader extends PureComponent {
|
|
37
37
|
}
|
38
38
|
componentWillUnmount() {
|
39
39
|
var _this$loader;
|
40
|
-
(_this$loader = this.loader) === null || _this$loader ===
|
40
|
+
(_this$loader = this.loader) === null || _this$loader === void 0 || _this$loader.destroy();
|
41
41
|
}
|
42
42
|
render() {
|
43
43
|
const _this$props = this.props,
|
@@ -16,12 +16,12 @@ class Particle {
|
|
16
16
|
radius,
|
17
17
|
color
|
18
18
|
} = _ref;
|
19
|
-
_defineProperty(this, "radius",
|
20
|
-
_defineProperty(this, "x",
|
21
|
-
_defineProperty(this, "y",
|
22
|
-
_defineProperty(this, "color",
|
23
|
-
_defineProperty(this, "decay",
|
24
|
-
_defineProperty(this, "life",
|
19
|
+
_defineProperty(this, "radius", void 0);
|
20
|
+
_defineProperty(this, "x", void 0);
|
21
|
+
_defineProperty(this, "y", void 0);
|
22
|
+
_defineProperty(this, "color", void 0);
|
23
|
+
_defineProperty(this, "decay", void 0);
|
24
|
+
_defineProperty(this, "life", void 0);
|
25
25
|
this.radius = radius;
|
26
26
|
this.x = x;
|
27
27
|
this.y = y;
|
@@ -58,26 +58,26 @@ class LoaderCore {
|
|
58
58
|
}
|
59
59
|
constructor(containerNode, props) {
|
60
60
|
var _this$ctx;
|
61
|
-
_defineProperty(this, "props",
|
62
|
-
_defineProperty(this, "canvas",
|
63
|
-
_defineProperty(this, "textNode",
|
64
|
-
_defineProperty(this, "ctx",
|
65
|
-
_defineProperty(this, "height",
|
66
|
-
_defineProperty(this, "width",
|
67
|
-
_defineProperty(this, "particles",
|
68
|
-
_defineProperty(this, "baseSpeed",
|
69
|
-
_defineProperty(this, "colorIndex",
|
70
|
-
_defineProperty(this, "maxRadius",
|
71
|
-
_defineProperty(this, "minRadius",
|
72
|
-
_defineProperty(this, "colorChangeTick",
|
73
|
-
_defineProperty(this, "x",
|
74
|
-
_defineProperty(this, "y",
|
75
|
-
_defineProperty(this, "radius",
|
76
|
-
_defineProperty(this, "hSpeed",
|
77
|
-
_defineProperty(this, "vSpeed",
|
78
|
-
_defineProperty(this, "radiusSpeed",
|
79
|
-
_defineProperty(this, "tick",
|
80
|
-
_defineProperty(this, "isRunning",
|
61
|
+
_defineProperty(this, "props", void 0);
|
62
|
+
_defineProperty(this, "canvas", void 0);
|
63
|
+
_defineProperty(this, "textNode", void 0);
|
64
|
+
_defineProperty(this, "ctx", void 0);
|
65
|
+
_defineProperty(this, "height", void 0);
|
66
|
+
_defineProperty(this, "width", void 0);
|
67
|
+
_defineProperty(this, "particles", void 0);
|
68
|
+
_defineProperty(this, "baseSpeed", void 0);
|
69
|
+
_defineProperty(this, "colorIndex", void 0);
|
70
|
+
_defineProperty(this, "maxRadius", void 0);
|
71
|
+
_defineProperty(this, "minRadius", void 0);
|
72
|
+
_defineProperty(this, "colorChangeTick", void 0);
|
73
|
+
_defineProperty(this, "x", void 0);
|
74
|
+
_defineProperty(this, "y", void 0);
|
75
|
+
_defineProperty(this, "radius", void 0);
|
76
|
+
_defineProperty(this, "hSpeed", void 0);
|
77
|
+
_defineProperty(this, "vSpeed", void 0);
|
78
|
+
_defineProperty(this, "radiusSpeed", void 0);
|
79
|
+
_defineProperty(this, "tick", void 0);
|
80
|
+
_defineProperty(this, "isRunning", void 0);
|
81
81
|
this.props = Object.assign({}, LoaderCore.defaultProps, props);
|
82
82
|
this.canvas = document.createElement('canvas');
|
83
83
|
this.canvas.dataset.test = 'ring-loader';
|
@@ -96,7 +96,7 @@ class LoaderCore {
|
|
96
96
|
this.canvas.style.width = "".concat(this.props.size, "px");
|
97
97
|
this.canvas.style.height = "".concat(this.props.size, "px");
|
98
98
|
this.ctx = this.canvas.getContext('2d');
|
99
|
-
(_this$ctx = this.ctx) === null || _this$ctx ===
|
99
|
+
(_this$ctx = this.ctx) === null || _this$ctx === void 0 || _this$ctx.scale(pixelRatio, pixelRatio);
|
100
100
|
this.height = this.props.size;
|
101
101
|
this.width = this.props.size;
|
102
102
|
this.particles = [];
|
@@ -79,7 +79,7 @@ class LoginDialog extends Component {
|
|
79
79
|
height: DEFAULT_HEIGHT,
|
80
80
|
width: DEFAULT_WIDTH
|
81
81
|
});
|
82
|
-
_defineProperty(this, "showFallbackTimout",
|
82
|
+
_defineProperty(this, "showFallbackTimout", void 0);
|
83
83
|
_defineProperty(this, "onMessage", event => {
|
84
84
|
const {
|
85
85
|
data
|
@@ -124,12 +124,12 @@ class Message extends Component {
|
|
124
124
|
_defineProperty(this, "_onDirectionChange", direction => this.setState({
|
125
125
|
direction
|
126
126
|
}));
|
127
|
-
_defineProperty(this, "popup",
|
128
|
-
_defineProperty(this, "node",
|
127
|
+
_defineProperty(this, "popup", void 0);
|
128
|
+
_defineProperty(this, "node", void 0);
|
129
129
|
_defineProperty(this, "popupRef", el => {
|
130
130
|
var _this$popup;
|
131
131
|
this.popup = el;
|
132
|
-
this.node = (_this$popup = this.popup) === null || _this$popup ===
|
132
|
+
this.node = (_this$popup = this.popup) === null || _this$popup === void 0 ? void 0 : _this$popup.node;
|
133
133
|
});
|
134
134
|
}
|
135
135
|
getTailOffset() {
|
@@ -141,14 +141,14 @@ class Message extends Component {
|
|
141
141
|
if (this.props.tailOffset != null) {
|
142
142
|
return this.props.tailOffset;
|
143
143
|
}
|
144
|
-
const anchor = (popupProps === null || popupProps ===
|
144
|
+
const anchor = (popupProps === null || popupProps === void 0 ? void 0 : popupProps.anchorElement) || ((_this$popup2 = this.popup) === null || _this$popup2 === void 0 ? void 0 : _this$popup2.parent);
|
145
145
|
if (!anchor) {
|
146
146
|
return DEFAULT_OFFSET;
|
147
147
|
}
|
148
148
|
const offset = Math.floor(anchor.offsetWidth / 2);
|
149
149
|
const isOpenedToRight = this.state.direction != null && [Directions.TOP_RIGHT, Directions.BOTTOM_RIGHT].includes(this.state.direction);
|
150
|
-
if (popupProps !== null && popupProps !==
|
151
|
-
return offset - (popupProps === null || popupProps ===
|
150
|
+
if (popupProps !== null && popupProps !== void 0 && popupProps.left && isOpenedToRight) {
|
151
|
+
return offset - (popupProps === null || popupProps === void 0 ? void 0 : popupProps.left);
|
152
152
|
}
|
153
153
|
return offset;
|
154
154
|
}
|
@@ -212,11 +212,11 @@ class Message extends Component {
|
|
212
212
|
onClick: onClose,
|
213
213
|
primary: true
|
214
214
|
}, buttonProps), {}, {
|
215
|
-
children: (_translations$gotIt = translations === null || translations ===
|
215
|
+
children: (_translations$gotIt = translations === null || translations === void 0 ? void 0 : translations.gotIt) !== null && _translations$gotIt !== void 0 ? _translations$gotIt : translate('gotIt')
|
216
216
|
})), onDismiss && jsx(Button, {
|
217
217
|
onClick: onDismiss,
|
218
218
|
inline: true,
|
219
|
-
children: (_translations$dismiss = translations === null || translations ===
|
219
|
+
children: (_translations$dismiss = translations === null || translations === void 0 ? void 0 : translations.dismiss) !== null && _translations$dismiss !== void 0 ? _translations$dismiss : translate('dismiss')
|
220
220
|
})]
|
221
221
|
})
|
222
222
|
}));
|
@@ -18,7 +18,7 @@ const SUPPORTED = ["and_chr 132", "chrome 132", "chrome 131", "chrome 109", "edg
|
|
18
18
|
const WHITE_LISTED_BROWSERS = ['chrome', 'firefox', 'safari', 'edge'];
|
19
19
|
const WHITE_LIST = SUPPORTED.reduce((acc, item) => {
|
20
20
|
var _item$match;
|
21
|
-
const [, browserName, version] = (_item$match = item.match(/(\S+)\s(\S+)/)) !== null && _item$match !==
|
21
|
+
const [, browserName, version] = (_item$match = item.match(/(\S+)\s(\S+)/)) !== null && _item$match !== void 0 ? _item$match : [];
|
22
22
|
if (!WHITE_LISTED_BROWSERS.includes(browserName)) {
|
23
23
|
return acc;
|
24
24
|
}
|