@jetbrains/ring-ui-built 7.0.19 → 7.0.20
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 +5 -5
- 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/avatar.d.ts +2 -0
- package/components/avatar/avatar.js +8 -0
- package/components/avatar-stack/avatar-stack.d.ts +15 -0
- package/components/avatar-stack/avatar-stack.js +117 -0
- package/components/button/button.js +2 -2
- package/components/caret/caret.js +6 -6
- 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 +8 -8
- 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 +2 -2
- package/components/list/list__link.js +1 -1
- 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 +14 -14
- package/components/old-browsers-message/white-list.js +3 -3
- 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 +43 -43
- 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 +6 -6
- 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 +7 -7
- 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/components/user-card/card.js +2 -2
- package/components/user-card/user-card.js +2 -2
- package/package.json +2 -2
- package/typings.d.ts +5 -0
@@ -62,14 +62,14 @@ class Dropdown extends Component {
|
|
62
62
|
}
|
63
63
|
this._toggle(false, nextPinned);
|
64
64
|
});
|
65
|
-
_defineProperty(this, "hoverTimer",
|
65
|
+
_defineProperty(this, "hoverTimer", undefined);
|
66
66
|
_defineProperty(this, "onMouseEnter", event => {
|
67
67
|
var _this$props$onMouseEn, _this$props;
|
68
68
|
if (this.props.disabled) {
|
69
69
|
return;
|
70
70
|
}
|
71
71
|
this._clearTimer();
|
72
|
-
(_this$props$onMouseEn = (_this$props = this.props).onMouseEnter) === null || _this$props$onMouseEn ===
|
72
|
+
(_this$props$onMouseEn = (_this$props = this.props).onMouseEnter) === null || _this$props$onMouseEn === undefined || _this$props$onMouseEn.call(_this$props, event);
|
73
73
|
this.hoverTimer = window.setTimeout(() => {
|
74
74
|
if (!this.state.show) {
|
75
75
|
this._toggle(true);
|
@@ -81,7 +81,7 @@ class Dropdown extends Component {
|
|
81
81
|
if (this.props.disabled) {
|
82
82
|
return;
|
83
83
|
}
|
84
|
-
(_this$props$onMouseLe = (_this$props2 = this.props).onMouseLeave) === null || _this$props$onMouseLe ===
|
84
|
+
(_this$props$onMouseLe = (_this$props2 = this.props).onMouseLeave) === null || _this$props$onMouseLe === undefined || _this$props$onMouseLe.call(_this$props2, event);
|
85
85
|
if (this.state.pinned) {
|
86
86
|
return;
|
87
87
|
}
|
@@ -143,7 +143,7 @@ class Dropdown extends Component {
|
|
143
143
|
} = _this$props3,
|
144
144
|
restProps = _objectWithoutProperties(_this$props3, _excluded);
|
145
145
|
const classes = classNames(styles.dropdown, className, {
|
146
|
-
[activeClassName !== null && activeClassName !==
|
146
|
+
[activeClassName !== null && activeClassName !== undefined ? activeClassName : '']: activeClassName != null && show
|
147
147
|
});
|
148
148
|
let anchorElement;
|
149
149
|
const active = hoverMode ? pinned : show;
|
@@ -147,20 +147,20 @@ const EditableHeading = props => {
|
|
147
147
|
setIsInFocus(true);
|
148
148
|
checkValue(e.target);
|
149
149
|
checkOverflow(e.target);
|
150
|
-
onFocus === null || onFocus ===
|
150
|
+
onFocus === null || onFocus === undefined || onFocus(e);
|
151
151
|
}, [onFocus, checkOverflow, checkValue]);
|
152
152
|
const onInputChange = React.useCallback(e => {
|
153
153
|
checkValue(e.target);
|
154
154
|
checkOverflow(e.target);
|
155
|
-
onChange === null || onChange ===
|
155
|
+
onChange === null || onChange === undefined || onChange(e);
|
156
156
|
}, [onChange, checkOverflow, checkValue]);
|
157
157
|
const onInputScroll = React.useCallback(e => {
|
158
158
|
checkOverflow(e.target);
|
159
|
-
onScroll === null || onScroll ===
|
159
|
+
onScroll === null || onScroll === undefined || onScroll(e);
|
160
160
|
}, [onScroll, checkOverflow]);
|
161
161
|
const onInputBlur = React.useCallback(e => {
|
162
162
|
setIsInFocus(false);
|
163
|
-
onBlur === null || onBlur ===
|
163
|
+
onBlur === null || onBlur === undefined || onBlur(e);
|
164
164
|
}, [onBlur]);
|
165
165
|
useEffect(() => {
|
166
166
|
window.addEventListener('mousemove', onMouseMove);
|
@@ -13,7 +13,7 @@ function focusSensorHOC(ComposedComponent) {
|
|
13
13
|
_defineProperty(this, "state", {
|
14
14
|
focused: this.props.focused
|
15
15
|
});
|
16
|
-
_defineProperty(this, "node",
|
16
|
+
_defineProperty(this, "node", undefined);
|
17
17
|
_defineProperty(this, "_skipNextCapture", false);
|
18
18
|
_defineProperty(this, "onRefUpdate", node => {
|
19
19
|
if (node) {
|
@@ -30,13 +30,13 @@ function focusSensorHOC(ComposedComponent) {
|
|
30
30
|
this._skipNextCapture = false;
|
31
31
|
return;
|
32
32
|
}
|
33
|
-
const focused = target instanceof Node && ((_this$node = this.node) === null || _this$node ===
|
33
|
+
const focused = target instanceof Node && ((_this$node = this.node) === null || _this$node === undefined ? undefined : _this$node.contains(target));
|
34
34
|
if (focused && !this.state.focused) {
|
35
35
|
var _this$props$onFocus, _this$props;
|
36
36
|
this.setState({
|
37
37
|
focused: true
|
38
38
|
});
|
39
|
-
(_this$props$onFocus = (_this$props = this.props).onFocus) === null || _this$props$onFocus ===
|
39
|
+
(_this$props$onFocus = (_this$props = this.props).onFocus) === null || _this$props$onFocus === undefined || _this$props$onFocus.call(_this$props);
|
40
40
|
}
|
41
41
|
});
|
42
42
|
_defineProperty(this, "onBlurCapture", _ref2 => {
|
@@ -51,13 +51,13 @@ function focusSensorHOC(ComposedComponent) {
|
|
51
51
|
} = this;
|
52
52
|
if (focused) {
|
53
53
|
setTimeout(() => {
|
54
|
-
const blurred = target instanceof Node && (node === null || node ===
|
54
|
+
const blurred = target instanceof Node && (node === null || node === undefined ? undefined : node.contains(target)) && !node.contains(document.activeElement);
|
55
55
|
if (blurred) {
|
56
56
|
var _this$props$onBlur, _this$props2;
|
57
57
|
this.setState({
|
58
58
|
focused: false
|
59
59
|
});
|
60
|
-
(_this$props$onBlur = (_this$props2 = this.props).onBlur) === null || _this$props$onBlur ===
|
60
|
+
(_this$props$onBlur = (_this$props2 = this.props).onBlur) === null || _this$props$onBlur === undefined || _this$props$onBlur.call(_this$props2);
|
61
61
|
}
|
62
62
|
}, 1);
|
63
63
|
}
|
@@ -65,13 +65,13 @@ function focusSensorHOC(ComposedComponent) {
|
|
65
65
|
_defineProperty(this, "onFocusRestore", () => {
|
66
66
|
var _this$node2;
|
67
67
|
this._skipNextCapture = true;
|
68
|
-
(_this$node2 = this.node) === null || _this$node2 ===
|
68
|
+
(_this$node2 = this.node) === null || _this$node2 === undefined || _this$node2.focus({
|
69
69
|
preventScroll: !this.props.scrollOnTableFocus
|
70
70
|
});
|
71
71
|
});
|
72
72
|
_defineProperty(this, "onFocusReset", () => {
|
73
73
|
var _this$node3;
|
74
|
-
(_this$node3 = this.node) === null || _this$node3 ===
|
74
|
+
(_this$node3 = this.node) === null || _this$node3 === undefined || _this$node3.blur();
|
75
75
|
});
|
76
76
|
}
|
77
77
|
componentDidMount() {
|
@@ -82,14 +82,14 @@ function focusSensorHOC(ComposedComponent) {
|
|
82
82
|
},
|
83
83
|
node
|
84
84
|
} = this;
|
85
|
-
node === null || node ===
|
85
|
+
node === null || node === undefined || node.setAttribute('tabindex', '0');
|
86
86
|
if (node != null) {
|
87
87
|
node.style.outline = 'none';
|
88
88
|
}
|
89
89
|
document.addEventListener('focus', this.onFocusCapture, true);
|
90
90
|
document.addEventListener('blur', this.onBlurCapture, true);
|
91
91
|
if (autofocus) {
|
92
|
-
node === null || node ===
|
92
|
+
node === null || node === undefined || node.focus({
|
93
93
|
preventScroll: !scrollOnTableFocus
|
94
94
|
});
|
95
95
|
}
|
@@ -99,7 +99,7 @@ function focusSensorHOC(ComposedComponent) {
|
|
99
99
|
const {
|
100
100
|
focused
|
101
101
|
} = this.props;
|
102
|
-
const isInFocus = (_this$node4 = this.node) === null || _this$node4 ===
|
102
|
+
const isInFocus = (_this$node4 = this.node) === null || _this$node4 === undefined ? undefined : _this$node4.contains(document.activeElement);
|
103
103
|
if (focused && (!isInFocus || !prevProps.focused)) {
|
104
104
|
this.onFocusRestore();
|
105
105
|
} else if (!focused && prevProps.focused) {
|
@@ -4,7 +4,7 @@ function memoize(fn) {
|
|
4
4
|
const primitiveCache = new Map();
|
5
5
|
const objectCache = new WeakMap();
|
6
6
|
return function memoized(arg) {
|
7
|
-
const key = arg !== null && arg !==
|
7
|
+
const key = arg !== null && arg !== undefined ? arg : '__singleValue__';
|
8
8
|
const cache = key instanceof Object ? objectCache : primitiveCache;
|
9
9
|
const cached = cache.get(key);
|
10
10
|
if (cached != null) {
|
@@ -24,7 +24,7 @@ function normalizeIndent(string) {
|
|
24
24
|
}
|
25
25
|
const indents = lines.filter(line => nonemptyRE.test(line)).map(line => {
|
26
26
|
var _line$match$0$length, _line$match;
|
27
|
-
return (_line$match$0$length = (_line$match = line.match(indentRE)) === null || _line$match ===
|
27
|
+
return (_line$match$0$length = (_line$match = line.match(indentRE)) === null || _line$match === undefined ? undefined : _line$match[0].length) !== null && _line$match$0$length !== undefined ? _line$match$0$length : 0;
|
28
28
|
});
|
29
29
|
const minIndent = Math.min(...indents);
|
30
30
|
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", undefined);
|
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 === undefined || _scheduledCb();
|
9
9
|
if (trailingCallScheduled) {
|
10
10
|
trailingCallScheduled = false;
|
11
11
|
doSchedule();
|
@@ -10,19 +10,19 @@ import { I18nContext } from '../i18n/i18n-context.js';
|
|
10
10
|
import { isTruthy } from '../global/typescript-utils.js';
|
11
11
|
import { s as styles } from '../_helpers/header.js';
|
12
12
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
13
|
+
import 'util-deprecate';
|
13
14
|
import '../global/url.js';
|
14
15
|
import 'core-js/modules/es.regexp.exec.js';
|
15
16
|
import 'core-js/modules/es.string.replace.js';
|
16
17
|
import '../global/dom.js';
|
18
|
+
import '../global/memoize.js';
|
17
19
|
import '../avatar/fallback-avatar.js';
|
18
20
|
import '../global/get-uid.js';
|
19
21
|
import '@jetbrains/icons/chevron-down';
|
20
22
|
import '@jetbrains/icons/chevron-12px-down';
|
21
|
-
import 'util-deprecate';
|
22
23
|
import '../icon/icon.js';
|
23
24
|
import '../icon/icon__constants.js';
|
24
25
|
import '../_helpers/icon__svg.js';
|
25
|
-
import '../global/memoize.js';
|
26
26
|
import '../link/clickableLink.js';
|
27
27
|
import '../global/controls-height.js';
|
28
28
|
import '../_helpers/button__classes.js';
|
@@ -138,29 +138,29 @@ class Profile extends PureComponent {
|
|
138
138
|
});
|
139
139
|
const items = [showApplyChangedUser && {
|
140
140
|
rgItemType,
|
141
|
-
label: (_translations$applyCh = translations === null || translations ===
|
141
|
+
label: (_translations$applyCh = translations === null || translations === undefined ? undefined : translations.applyChangedUser) !== null && _translations$applyCh !== undefined ? _translations$applyCh : translate('applyChangedUser'),
|
142
142
|
className: styles.profileMenuItem,
|
143
143
|
onClick: onRevertPostponement
|
144
144
|
}, showLogIn && {
|
145
145
|
rgItemType,
|
146
|
-
label: (_translations$login = translations === null || translations ===
|
146
|
+
label: (_translations$login = translations === null || translations === undefined ? undefined : translations.login) !== null && _translations$login !== undefined ? _translations$login : translate('login'),
|
147
147
|
className: styles.profileMenuItem,
|
148
148
|
onClick: onRevertPostponement
|
149
149
|
}, {
|
150
150
|
rgItemType: PopupMenu.ListProps.Type.LINK,
|
151
|
-
label: (_translations$profile = translations === null || translations ===
|
151
|
+
label: (_translations$profile = translations === null || translations === undefined ? undefined : translations.profile) !== null && _translations$profile !== undefined ? _translations$profile : translate('profile'),
|
152
152
|
target: '_self',
|
153
153
|
// Full page reload in Angular
|
154
154
|
href: profileUrl,
|
155
155
|
LinkComponent
|
156
156
|
}, showSwitchUser && {
|
157
157
|
rgItemType,
|
158
|
-
label: (_translations$switchU = translations === null || translations ===
|
158
|
+
label: (_translations$switchU = translations === null || translations === undefined ? undefined : translations.switchUser) !== null && _translations$switchU !== undefined ? _translations$switchU : translate('switchUser'),
|
159
159
|
className: styles.profileMenuItem,
|
160
160
|
onClick: onSwitchUser
|
161
161
|
}, showLogOut && {
|
162
162
|
rgItemType,
|
163
|
-
label: (_translations$logout = translations === null || translations ===
|
163
|
+
label: (_translations$logout = translations === null || translations === undefined ? undefined : translations.logout) !== null && _translations$logout !== undefined ? _translations$logout : translate('logout'),
|
164
164
|
onClick: onLogout
|
165
165
|
}].filter(isTruthy);
|
166
166
|
return jsx(DropdownMenu, _objectSpread2(_objectSpread2({}, props), {}, {
|
@@ -206,7 +206,7 @@ _defineProperty(Profile, "defaultProps", {
|
|
206
206
|
disabled: loading,
|
207
207
|
loader: loading,
|
208
208
|
onClick: onLogin,
|
209
|
-
children: (_translations$login2 = translations === null || translations ===
|
209
|
+
children: (_translations$login2 = translations === null || translations === undefined ? undefined : translations.login) !== null && _translations$login2 !== undefined ? _translations$login2 : translate('login')
|
210
210
|
})
|
211
211
|
});
|
212
212
|
}
|
@@ -177,8 +177,8 @@ class SmartProfile extends PureComponent {
|
|
177
177
|
translations
|
178
178
|
} = this.props;
|
179
179
|
const userMeta = auth.http.getMetaForResponse(user);
|
180
|
-
if (userMeta !== null && userMeta !==
|
181
|
-
const message = (translations === null || translations ===
|
180
|
+
if (userMeta !== null && userMeta !== undefined && (_userMeta$headers = userMeta.headers) !== null && _userMeta$headers !== undefined && _userMeta$headers.has(CERTIFICATE_MISMATCH_HEADER)) {
|
181
|
+
const message = (translations === null || translations === undefined ? undefined : 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.");
|
182
182
|
alertService.warning(message, 0);
|
183
183
|
}
|
184
184
|
}
|
@@ -57,7 +57,7 @@ class SmartServices extends Component {
|
|
57
57
|
loading: false,
|
58
58
|
services: null
|
59
59
|
});
|
60
|
-
_defineProperty(this, "http",
|
60
|
+
_defineProperty(this, "http", undefined);
|
61
61
|
_defineProperty(this, "stopLoading", () => {
|
62
62
|
this.setState({
|
63
63
|
loading: false
|
@@ -68,7 +68,7 @@ class SmartServices extends Component {
|
|
68
68
|
this.setState({
|
69
69
|
loading: true
|
70
70
|
});
|
71
|
-
(_this$getServices = this.getServices(SmartServices.allFields)) === null || _this$getServices ===
|
71
|
+
(_this$getServices = this.getServices(SmartServices.allFields)) === null || _this$getServices === undefined || _this$getServices.then(services => {
|
72
72
|
this.setState({
|
73
73
|
services
|
74
74
|
});
|
@@ -82,7 +82,7 @@ class SmartServices extends Component {
|
|
82
82
|
auth
|
83
83
|
} = this.props;
|
84
84
|
this.http = new HTTP(auth, auth.getAPIPath());
|
85
|
-
(_this$getServices2 = this.getServices(SmartServices.countFields)) === null || _this$getServices2 ===
|
85
|
+
(_this$getServices2 = this.getServices(SmartServices.countFields)) === null || _this$getServices2 === undefined || _this$getServices2.then(services => {
|
86
86
|
if (!services.length) {
|
87
87
|
this.setState({
|
88
88
|
visible: false
|
@@ -92,7 +92,7 @@ class SmartServices extends Component {
|
|
92
92
|
}
|
93
93
|
getServices(fields) {
|
94
94
|
var _this$http;
|
95
|
-
return (_this$http = this.http) === null || _this$http ===
|
95
|
+
return (_this$http = this.http) === null || _this$http === undefined ? undefined : _this$http.get("services/header?fields=".concat(fields));
|
96
96
|
}
|
97
97
|
render() {
|
98
98
|
const {
|
package/components/http/http.js
CHANGED
@@ -23,8 +23,8 @@ class HTTPError extends ExtendableError {
|
|
23
23
|
constructor(response) {
|
24
24
|
let data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
25
25
|
super("".concat(response.status, " ").concat(response.statusText || ''));
|
26
|
-
_defineProperty(this, "data",
|
27
|
-
_defineProperty(this, "status",
|
26
|
+
_defineProperty(this, "data", undefined);
|
27
|
+
_defineProperty(this, "status", undefined);
|
28
28
|
this.data = data;
|
29
29
|
this.status = response.status;
|
30
30
|
}
|
@@ -41,10 +41,10 @@ class HTTP {
|
|
41
41
|
let _fetchConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
42
42
|
_defineProperty(this, "baseUrl", null);
|
43
43
|
_defineProperty(this, "_requestsMeta", new WeakMap());
|
44
|
-
_defineProperty(this, "fetchConfig",
|
45
|
-
_defineProperty(this, "requestToken",
|
46
|
-
_defineProperty(this, "shouldRefreshToken",
|
47
|
-
_defineProperty(this, "forceTokenUpdate",
|
44
|
+
_defineProperty(this, "fetchConfig", undefined);
|
45
|
+
_defineProperty(this, "requestToken", undefined);
|
46
|
+
_defineProperty(this, "shouldRefreshToken", undefined);
|
47
|
+
_defineProperty(this, "forceTokenUpdate", undefined);
|
48
48
|
_defineProperty(this, "setAuth", auth => {
|
49
49
|
this.requestToken = () => auth.requestToken();
|
50
50
|
this.shouldRefreshToken = auth.constructor.shouldRefreshToken;
|
@@ -68,7 +68,7 @@ class HTTP {
|
|
68
68
|
});
|
69
69
|
_defineProperty(this, "request", async (url, params) => {
|
70
70
|
var _this$requestToken;
|
71
|
-
let token = await ((_this$requestToken = this.requestToken) === null || _this$requestToken ===
|
71
|
+
let token = await ((_this$requestToken = this.requestToken) === null || _this$requestToken === undefined ? undefined : _this$requestToken.call(this));
|
72
72
|
let response = await this._performRequest(url, token, params);
|
73
73
|
try {
|
74
74
|
// Wait for result to catch an HTTP error
|
@@ -78,10 +78,10 @@ class HTTP {
|
|
78
78
|
if (!(error instanceof HTTPError)) {
|
79
79
|
throw error;
|
80
80
|
}
|
81
|
-
const shouldRefreshToken = typeof error.data.error === 'string' ? (_this$shouldRefreshTo = this.shouldRefreshToken) === null || _this$shouldRefreshTo ===
|
81
|
+
const shouldRefreshToken = typeof error.data.error === 'string' ? (_this$shouldRefreshTo = this.shouldRefreshToken) === null || _this$shouldRefreshTo === undefined ? undefined : _this$shouldRefreshTo.call(this, error.data.error) : false;
|
82
82
|
if (shouldRefreshToken) {
|
83
83
|
var _this$forceTokenUpdat;
|
84
|
-
token = await ((_this$forceTokenUpdat = this.forceTokenUpdate) === null || _this$forceTokenUpdat ===
|
84
|
+
token = await ((_this$forceTokenUpdat = this.forceTokenUpdate) === null || _this$forceTokenUpdat === undefined ? undefined : _this$forceTokenUpdat.call(this));
|
85
85
|
response = await this._performRequest(url, token, params);
|
86
86
|
return this._processResponse(response);
|
87
87
|
}
|
@@ -15,9 +15,9 @@ const authMock = {
|
|
15
15
|
class HTTPMock extends HTTP {
|
16
16
|
constructor() {
|
17
17
|
super(authMock);
|
18
|
-
_defineProperty(this, "defaultResponse",
|
19
|
-
_defineProperty(this, "requests",
|
20
|
-
_defineProperty(this, "responsesByUrlMap",
|
18
|
+
_defineProperty(this, "defaultResponse", undefined);
|
19
|
+
_defineProperty(this, "requests", undefined);
|
20
|
+
_defineProperty(this, "responsesByUrlMap", undefined);
|
21
21
|
this.defaultResponse = null;
|
22
22
|
this.requests = [];
|
23
23
|
this.responsesByUrlMap = new Map();
|
@@ -13,12 +13,12 @@ const defaultOptions = {
|
|
13
13
|
*/
|
14
14
|
class HubSource {
|
15
15
|
constructor(auth, relativeUrl, options) {
|
16
|
-
_defineProperty(this, "http",
|
17
|
-
_defineProperty(this, "relativeUrl",
|
18
|
-
_defineProperty(this, "options",
|
19
|
-
_defineProperty(this, "storedData",
|
20
|
-
_defineProperty(this, "isClientSideSearch",
|
21
|
-
_defineProperty(this, "filterFn",
|
16
|
+
_defineProperty(this, "http", undefined);
|
17
|
+
_defineProperty(this, "relativeUrl", undefined);
|
18
|
+
_defineProperty(this, "options", undefined);
|
19
|
+
_defineProperty(this, "storedData", undefined);
|
20
|
+
_defineProperty(this, "isClientSideSearch", undefined);
|
21
|
+
_defineProperty(this, "filterFn", undefined);
|
22
22
|
this.http = auth.http;
|
23
23
|
this.relativeUrl = relativeUrl;
|
24
24
|
this.options = Object.assign({}, defaultOptions, options);
|
@@ -15,8 +15,8 @@ function convertUserForCard(hubUser) {
|
|
15
15
|
login: hubUser.login,
|
16
16
|
banned: hubUser.banned,
|
17
17
|
banReason: hubUser.banReason,
|
18
|
-
email: (_hubUser$profile = hubUser.profile) === null || _hubUser$profile ===
|
19
|
-
avatarUrl: (_hubUser$profile2 = hubUser.profile) === null || _hubUser$profile2 ===
|
18
|
+
email: (_hubUser$profile = hubUser.profile) === null || _hubUser$profile === undefined || (_hubUser$profile = _hubUser$profile.email) === null || _hubUser$profile === undefined ? undefined : _hubUser$profile.email,
|
19
|
+
avatarUrl: (_hubUser$profile2 = hubUser.profile) === null || _hubUser$profile2 === undefined || (_hubUser$profile2 = _hubUser$profile2.avatar) === null || _hubUser$profile2 === undefined ? undefined : _hubUser$profile2.url,
|
20
20
|
href: "".concat(serverUri, "users/").concat(hubUser.id)
|
21
21
|
};
|
22
22
|
}
|
@@ -8,10 +8,10 @@ const defaultOptions = {
|
|
8
8
|
};
|
9
9
|
class HubSourceUsersGroups {
|
10
10
|
constructor(auth, options) {
|
11
|
-
_defineProperty(this, "auth",
|
12
|
-
_defineProperty(this, "options",
|
13
|
-
_defineProperty(this, "usersSource",
|
14
|
-
_defineProperty(this, "groupsSource",
|
11
|
+
_defineProperty(this, "auth", undefined);
|
12
|
+
_defineProperty(this, "options", undefined);
|
13
|
+
_defineProperty(this, "usersSource", undefined);
|
14
|
+
_defineProperty(this, "groupsSource", undefined);
|
15
15
|
this.auth = auth;
|
16
16
|
this.options = Object.assign({}, defaultOptions, options);
|
17
17
|
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 !== undefined ? _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 !== undefined ? _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", undefined);
|
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 === undefined || _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", undefined);
|
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 !== undefined ? _this$props$phase : 0);
|
35
35
|
}
|
36
36
|
render() {
|
37
37
|
const _this$props = this.props,
|
package/components/list/list.js
CHANGED
@@ -95,9 +95,9 @@ class List extends Component {
|
|
95
95
|
scrolledToBottom: false
|
96
96
|
});
|
97
97
|
_defineProperty(this, "scheduleScrollListener", scheduleRAF());
|
98
|
-
_defineProperty(this, "virtualizedList",
|
99
|
-
_defineProperty(this, "unmounted",
|
100
|
-
_defineProperty(this, "container",
|
98
|
+
_defineProperty(this, "virtualizedList", undefined);
|
99
|
+
_defineProperty(this, "unmounted", undefined);
|
100
|
+
_defineProperty(this, "container", undefined);
|
101
101
|
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
102
102
|
_defineProperty(this, "_bufferSize", 10);
|
103
103
|
// keep X items above and below of the visible area
|
@@ -377,7 +377,7 @@ class List extends Component {
|
|
377
377
|
_defineProperty(this, "containerRef", el => {
|
378
378
|
this.container = el;
|
379
379
|
});
|
380
|
-
_defineProperty(this, "_inner",
|
380
|
+
_defineProperty(this, "_inner", undefined);
|
381
381
|
_defineProperty(this, "id", getUID('list-'));
|
382
382
|
_defineProperty(this, "shortcutsScope", this.id);
|
383
383
|
_defineProperty(this, "shortcutsMap", {
|
@@ -10,20 +10,20 @@ import Checkbox from '../checkbox/checkbox.js';
|
|
10
10
|
import Icon from '../icon/icon.js';
|
11
11
|
import getUID from '../global/get-uid.js';
|
12
12
|
import { s as styles } from '../_helpers/list.js';
|
13
|
+
import 'util-deprecate';
|
13
14
|
import '../global/url.js';
|
14
15
|
import 'core-js/modules/es.regexp.exec.js';
|
15
16
|
import 'core-js/modules/es.string.replace.js';
|
16
17
|
import '../global/dom.js';
|
18
|
+
import '../global/memoize.js';
|
17
19
|
import '../avatar/fallback-avatar.js';
|
18
20
|
import '@jetbrains/icons/checkmark-12px';
|
19
21
|
import '@jetbrains/icons/remove-12px';
|
20
22
|
import '../global/composeRefs.js';
|
21
23
|
import 'memoize-one';
|
22
24
|
import '../control-help/control-help.js';
|
23
|
-
import 'util-deprecate';
|
24
25
|
import '../icon/icon__constants.js';
|
25
26
|
import '../_helpers/icon__svg.js';
|
26
|
-
import '../global/memoize.js';
|
27
27
|
|
28
28
|
var globalStyles = {"breakpoint-small":"640px","breakpoint-middle":"960px","breakpoint-large":"1200px","extra-small-screen-media":"(max-width: 639px)","small-screen-media":"(min-width: 640px) and (max-width: 959px)","middle-screen-media":"(min-width: 960px) and (max-width: 1199px)","large-screen-media":"(min-width: 1200px)","clearfix":"clearfix_rui_8bff","font":"font_rui_8bff","font-lower":"font-lower_rui_8bff font_rui_8bff","font-smaller":"font-smaller_rui_8bff font-lower_rui_8bff font_rui_8bff","font-smaller-lower":"font-smaller-lower_rui_8bff font-smaller_rui_8bff font-lower_rui_8bff font_rui_8bff","font-larger-lower":"font-larger-lower_rui_8bff font-lower_rui_8bff font_rui_8bff","font-larger":"font-larger_rui_8bff font-larger-lower_rui_8bff font-lower_rui_8bff font_rui_8bff","thin-font":"thin-font_rui_8bff","monospace-font":"monospace-font_rui_8bff","ellipsis":"ellipsis_rui_8bff","resetButton":"resetButton_rui_8bff"};
|
29
29
|
|
@@ -47,7 +47,7 @@ class ListLink extends PureComponent {
|
|
47
47
|
hover: hover && !disabled,
|
48
48
|
className: classes,
|
49
49
|
"data-test": joinDataTestAttributes('ring-list-link', dataTest),
|
50
|
-
children: label !== null && label !==
|
50
|
+
children: label !== null && label !== undefined ? label : children
|
51
51
|
}));
|
52
52
|
}
|
53
53
|
}
|
@@ -72,7 +72,7 @@ var Filter;
|
|
72
72
|
class ListUsersGroupsSource extends HubSourceUsersGroups {
|
73
73
|
constructor(auth, options) {
|
74
74
|
super(auth, options);
|
75
|
-
_defineProperty(this, "listSourceOptions",
|
75
|
+
_defineProperty(this, "listSourceOptions", undefined);
|
76
76
|
this.listSourceOptions = Object.assign({}, defaultOptions, options);
|
77
77
|
}
|
78
78
|
getGroupsSectionTitle(groups) {
|
@@ -98,7 +98,7 @@ class ListUsersGroupsSource extends HubSourceUsersGroups {
|
|
98
98
|
return items.push(_objectSpread2(_objectSpread2({}, user), {}, {
|
99
99
|
key: user.id,
|
100
100
|
label: user.name,
|
101
|
-
avatar: user.profile ? (_user$profile$avatar = user.profile.avatar) === null || _user$profile$avatar ===
|
101
|
+
avatar: user.profile ? (_user$profile$avatar = user.profile.avatar) === null || _user$profile$avatar === undefined ? undefined : _user$profile$avatar.url : null,
|
102
102
|
description: user.login
|
103
103
|
}));
|
104
104
|
});
|
@@ -17,7 +17,7 @@ const _excluded = ["message", "size", "colors", "data-test", "stop", "determinis
|
|
17
17
|
class Loader extends PureComponent {
|
18
18
|
constructor() {
|
19
19
|
super(...arguments);
|
20
|
-
_defineProperty(this, "loader",
|
20
|
+
_defineProperty(this, "loader", undefined);
|
21
21
|
_defineProperty(this, "initLoader", el => {
|
22
22
|
if (el) {
|
23
23
|
this.loader = new LoaderCore(el, this.props);
|
@@ -35,7 +35,7 @@ class Loader extends PureComponent {
|
|
35
35
|
}
|
36
36
|
componentWillUnmount() {
|
37
37
|
var _this$loader;
|
38
|
-
(_this$loader = this.loader) === null || _this$loader ===
|
38
|
+
(_this$loader = this.loader) === null || _this$loader === undefined || _this$loader.destroy();
|
39
39
|
}
|
40
40
|
render() {
|
41
41
|
const _this$props = this.props,
|