@jetbrains/ring-ui-built 7.0.27 → 7.0.29
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 +8 -9
- 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/dropdown-menu/dropdown-menu.js +6 -7
- 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/header.js +5 -6
- package/components/header/profile.js +11 -12
- package/components/header/smart-profile.js +5 -6
- 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 +8 -12
- package/components/list/list__item.js +83 -59
- package/components/list/list__users-groups-source.js +8 -9
- 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 +13 -14
- 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 +7 -8
- package/components/progress-bar/progress-bar.js +2 -2
- package/components/query-assist/query-assist.js +55 -54
- package/components/query-assist/query-assist__suggestions.js +6 -7
- package/components/radio/radio__item.js +2 -2
- package/components/select/select.js +32 -33
- package/components/select/select__filter.js +5 -6
- package/components/select/select__popup.js +15 -16
- 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-more.js +6 -7
- package/components/tabs/collapsible-tab.js +3 -3
- package/components/tabs/collapsible-tabs.js +10 -11
- package/components/tabs/dumb-tabs.js +4 -5
- package/components/tabs/smart-tabs.js +4 -5
- package/components/tabs/tabs.js +3 -4
- package/components/tag/tag.js +2 -2
- package/components/tags-input/tags-input.js +22 -23
- 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
- package/components/list/list__link.d.ts +0 -9
- package/components/list/list__link.js +0 -52
@@ -1,7 +1,7 @@
|
|
1
|
-
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
1
|
+
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.symbol.description.js';
|
3
3
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
4
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
4
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
5
5
|
import { PureComponent } from 'react';
|
6
6
|
import classNames from 'classnames';
|
7
7
|
import joinDataTestAttributes from '../global/data-tests.js';
|
@@ -9,7 +9,9 @@ import Avatar from '../avatar/avatar.js';
|
|
9
9
|
import Checkbox from '../checkbox/checkbox.js';
|
10
10
|
import Icon from '../icon/icon.js';
|
11
11
|
import getUID from '../global/get-uid.js';
|
12
|
+
import Link, { linkHOC } from '../link/link.js';
|
12
13
|
import { s as styles } from '../_helpers/list.js';
|
14
|
+
import { Type } from './consts.js';
|
13
15
|
import { getListClasses } from './list__classes.js';
|
14
16
|
import { Size } from '../avatar/avatar-size.js';
|
15
17
|
import 'core-js/modules/es.string.includes.js';
|
@@ -34,8 +36,10 @@ import '../control-help/control-help.js';
|
|
34
36
|
import '../icon/icon__constants.js';
|
35
37
|
import '../_helpers/icon__svg.js';
|
36
38
|
import 'core-js/modules/es.string.starts-with.js';
|
37
|
-
import '
|
39
|
+
import '../link/clickableLink.js';
|
40
|
+
import '../_helpers/link.js';
|
38
41
|
|
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"];
|
39
43
|
/**
|
40
44
|
* @constructor
|
41
45
|
* @extends {ReactComponent}
|
@@ -51,32 +55,43 @@ class ListItem extends PureComponent {
|
|
51
55
|
_defineProperty(this, "_isString", val => typeof val === 'string' || val instanceof String);
|
52
56
|
}
|
53
57
|
render() {
|
54
|
-
const
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
58
|
+
const _this$props = this.props,
|
59
|
+
{
|
60
|
+
disabled,
|
61
|
+
checkbox,
|
62
|
+
avatar,
|
63
|
+
subavatar,
|
64
|
+
glyph,
|
65
|
+
icon,
|
66
|
+
rightGlyph,
|
67
|
+
description,
|
68
|
+
label,
|
69
|
+
title,
|
70
|
+
details,
|
71
|
+
hover,
|
72
|
+
level,
|
73
|
+
tabIndex,
|
74
|
+
onClick,
|
75
|
+
onCheckboxChange,
|
76
|
+
onMouseOver,
|
77
|
+
onMouseDown,
|
78
|
+
onMouseUp,
|
79
|
+
rightNodes,
|
80
|
+
leftNodes,
|
81
|
+
showGeneratedAvatar,
|
82
|
+
username,
|
83
|
+
labelWrapper,
|
84
|
+
rgItemType,
|
85
|
+
scrolling,
|
86
|
+
'data-test': dataTest,
|
87
|
+
className,
|
88
|
+
url,
|
89
|
+
LinkComponent,
|
90
|
+
compact,
|
91
|
+
hoverClassName,
|
92
|
+
children // TODO use an allow list in 8.0
|
93
|
+
} = _this$props,
|
94
|
+
restLinkProps = _objectWithoutProperties(_this$props, _excluded);
|
80
95
|
const checkable = checkbox !== undefined;
|
81
96
|
const shouldShowGeneratedAvatar = showGeneratedAvatar && username != null;
|
82
97
|
const hasLeftNodes = leftNodes || glyph || avatar || shouldShowGeneratedAvatar;
|
@@ -98,41 +113,31 @@ class ListItem extends PureComponent {
|
|
98
113
|
// label can also be an element, use empty string in this case
|
99
114
|
computedTitle = this._isString(label) ? label : '';
|
100
115
|
}
|
101
|
-
const
|
102
|
-
|
116
|
+
const isLink = rgItemType === Type.LINK;
|
117
|
+
const combinedDataTest = joinDataTestAttributes({
|
118
|
+
'ring-list-item': (dataTest || '').indexOf('ring-list-item') === -1,
|
103
119
|
'ring-list-item-action': !disabled,
|
104
|
-
'ring-list-item-selected': checkbox
|
105
|
-
|
120
|
+
'ring-list-item-selected': checkbox,
|
121
|
+
'ring-list-link': isLink
|
122
|
+
}, dataTest);
|
106
123
|
const labelElement = jsx("span", {
|
107
124
|
className: styles.label,
|
108
125
|
title: computedTitle,
|
109
126
|
"data-test": "ring-list-item-label",
|
110
|
-
children: label
|
127
|
+
children: label !== null && label !== void 0 ? label : children
|
111
128
|
});
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
}), jsxs("button", {
|
125
|
-
id: this.id,
|
126
|
-
type: "button",
|
127
|
-
tabIndex: tabIndex,
|
128
|
-
onClick: onClick,
|
129
|
-
onMouseOver: onMouseOver,
|
130
|
-
onMouseDown: onMouseDown,
|
131
|
-
onFocus: onMouseOver,
|
132
|
-
onMouseUp: onMouseUp,
|
133
|
-
className: classes,
|
134
|
-
style: style,
|
135
|
-
disabled: disabled,
|
129
|
+
const commonProps = {
|
130
|
+
id: this.id,
|
131
|
+
tabIndex,
|
132
|
+
onClick,
|
133
|
+
onMouseOver,
|
134
|
+
onMouseDown,
|
135
|
+
onFocus: onMouseOver,
|
136
|
+
onMouseUp,
|
137
|
+
className: classes,
|
138
|
+
style,
|
139
|
+
disabled,
|
140
|
+
children: jsxs(Fragment, {
|
136
141
|
children: [jsxs("div", {
|
137
142
|
className: styles.top,
|
138
143
|
onMouseOut: this.stopBubbling,
|
@@ -173,7 +178,26 @@ class ListItem extends PureComponent {
|
|
173
178
|
className: detailsClasses,
|
174
179
|
children: details
|
175
180
|
})]
|
176
|
-
})
|
181
|
+
})
|
182
|
+
};
|
183
|
+
const LinkComponentToUse = LinkComponent ? linkHOC(LinkComponent) : Link;
|
184
|
+
return jsxs("div", {
|
185
|
+
className: styles.itemContainer,
|
186
|
+
"data-test": combinedDataTest,
|
187
|
+
children: [showCheckbox && jsx("div", {
|
188
|
+
className: styles.checkboxContainer,
|
189
|
+
children: jsx(Checkbox, {
|
190
|
+
"aria-labelledby": this.id,
|
191
|
+
checked: checkbox,
|
192
|
+
disabled: disabled,
|
193
|
+
onChange: onCheckboxChange,
|
194
|
+
onClick: this.stopBubbling
|
195
|
+
})
|
196
|
+
}), isLink ? jsx(LinkComponentToUse, _objectSpread2(_objectSpread2({
|
197
|
+
pseudo: !restLinkProps.href
|
198
|
+
}, commonProps), restLinkProps)) : jsx("button", _objectSpread2({
|
199
|
+
type: "button"
|
200
|
+
}, commonProps))]
|
177
201
|
});
|
178
202
|
}
|
179
203
|
}
|
@@ -33,13 +33,6 @@ import 'combokeys';
|
|
33
33
|
import '../global/sniffer.js';
|
34
34
|
import 'sniffr';
|
35
35
|
import '../global/create-stateful-context.js';
|
36
|
-
import './list__link.js';
|
37
|
-
import '../link/link.js';
|
38
|
-
import '../link/clickableLink.js';
|
39
|
-
import '../_helpers/link.js';
|
40
|
-
import './list__classes.js';
|
41
|
-
import './consts.js';
|
42
|
-
import '../_helpers/list.js';
|
43
36
|
import './list__item.js';
|
44
37
|
import '../avatar/avatar.js';
|
45
38
|
import '../global/url.js';
|
@@ -56,6 +49,12 @@ import '../_helpers/icon__svg.js';
|
|
56
49
|
import 'core-js/modules/es.string.starts-with.js';
|
57
50
|
import '../global/composeRefs.js';
|
58
51
|
import '../control-help/control-help.js';
|
52
|
+
import '../link/link.js';
|
53
|
+
import '../link/clickableLink.js';
|
54
|
+
import '../_helpers/link.js';
|
55
|
+
import '../_helpers/list.js';
|
56
|
+
import './consts.js';
|
57
|
+
import './list__classes.js';
|
59
58
|
import './list__custom.js';
|
60
59
|
import '../global/get-event-key.js';
|
61
60
|
import './list__title.js';
|
@@ -82,7 +81,7 @@ var Filter;
|
|
82
81
|
class ListUsersGroupsSource extends HubSourceUsersGroups {
|
83
82
|
constructor(auth, options) {
|
84
83
|
super(auth, options);
|
85
|
-
_defineProperty(this, "listSourceOptions",
|
84
|
+
_defineProperty(this, "listSourceOptions", void 0);
|
86
85
|
this.listSourceOptions = Object.assign({}, defaultOptions, options);
|
87
86
|
}
|
88
87
|
getGroupsSectionTitle(groups) {
|
@@ -108,7 +107,7 @@ class ListUsersGroupsSource extends HubSourceUsersGroups {
|
|
108
107
|
return items.push(_objectSpread2(_objectSpread2({}, user), {}, {
|
109
108
|
key: user.id,
|
110
109
|
label: user.name,
|
111
|
-
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,
|
112
111
|
description: user.login
|
113
112
|
}));
|
114
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
|
}
|
@@ -68,16 +68,15 @@ import 'react-virtualized/dist/es/WindowScroller';
|
|
68
68
|
import 'react-virtualized/dist/es/CellMeasurer';
|
69
69
|
import 'memoize-one';
|
70
70
|
import '../global/create-stateful-context.js';
|
71
|
-
import '../list/list__link.js';
|
72
|
-
import '../list/list__classes.js';
|
73
|
-
import '../list/consts.js';
|
74
|
-
import '../_helpers/list.js';
|
75
|
-
import '../_helpers/link.js';
|
76
71
|
import '../list/list__item.js';
|
77
72
|
import '../checkbox/checkbox.js';
|
78
73
|
import '@jetbrains/icons/checkmark-12px';
|
79
74
|
import '@jetbrains/icons/remove-12px';
|
80
75
|
import '../global/composeRefs.js';
|
76
|
+
import '../_helpers/list.js';
|
77
|
+
import '../list/consts.js';
|
78
|
+
import '../list/list__classes.js';
|
79
|
+
import '../_helpers/link.js';
|
81
80
|
import '../list/list__custom.js';
|
82
81
|
import '../global/get-event-key.js';
|
83
82
|
import '../list/list__title.js';
|
@@ -114,7 +113,7 @@ class Pager extends PureComponent {
|
|
114
113
|
if (currentPage !== 1) {
|
115
114
|
var _this$props$onPageCha, _this$props;
|
116
115
|
const prevPage = currentPage - 1;
|
117
|
-
(_this$props$onPageCha = (_this$props = this.props).onPageChange) === null || _this$props$onPageCha ===
|
116
|
+
(_this$props$onPageCha = (_this$props = this.props).onPageChange) === null || _this$props$onPageCha === void 0 || _this$props$onPageCha.call(_this$props, prevPage);
|
118
117
|
}
|
119
118
|
});
|
120
119
|
_defineProperty(this, "handleNextClick", () => {
|
@@ -126,14 +125,14 @@ class Pager extends PureComponent {
|
|
126
125
|
const total = this.getTotalPages();
|
127
126
|
if (currentPage !== total) {
|
128
127
|
var _this$props$onPageCha2, _this$props2;
|
129
|
-
(_this$props$onPageCha2 = (_this$props2 = this.props).onPageChange) === null || _this$props$onPageCha2 ===
|
128
|
+
(_this$props$onPageCha2 = (_this$props2 = this.props).onPageChange) === null || _this$props$onPageCha2 === void 0 || _this$props$onPageCha2.call(_this$props2, nextPage);
|
130
129
|
} else if (this.props.openTotal) {
|
131
130
|
onLoadPage(nextPage);
|
132
131
|
}
|
133
132
|
});
|
134
133
|
_defineProperty(this, "handlePageChange", memoize(i => event => {
|
135
134
|
var _this$props$onPageCha3, _this$props3;
|
136
|
-
(_this$props$onPageCha3 = (_this$props3 = this.props).onPageChange) === null || _this$props$onPageCha3 ===
|
135
|
+
(_this$props$onPageCha3 = (_this$props3 = this.props).onPageChange) === null || _this$props$onPageCha3 === void 0 || _this$props$onPageCha3.call(_this$props3, i, event);
|
137
136
|
}));
|
138
137
|
_defineProperty(this, "handleLoadMore", memoize(i => () => {
|
139
138
|
this.props.onLoadPage(i);
|
@@ -151,7 +150,7 @@ class Pager extends PureComponent {
|
|
151
150
|
var _this$props$translati, _this$props$translati2;
|
152
151
|
return {
|
153
152
|
key: size,
|
154
|
-
label: "".concat(size, " ").concat((_this$props$translati = (_this$props$translati2 = this.props.translations) === null || _this$props$translati2 ===
|
153
|
+
label: "".concat(size, " ").concat((_this$props$translati = (_this$props$translati2 = this.props.translations) === null || _this$props$translati2 === void 0 ? void 0 : _this$props$translati2.perPage) !== null && _this$props$translati !== void 0 ? _this$props$translati : translate('perPage'))
|
155
154
|
};
|
156
155
|
});
|
157
156
|
const selected = data.find(it => it.key === pageSize);
|
@@ -221,8 +220,8 @@ class Pager extends PureComponent {
|
|
221
220
|
const prevIcon = jsx(Icon, {
|
222
221
|
glyph: chevronLeftIcon
|
223
222
|
}, "icon");
|
224
|
-
const prevText = (_this$props$translati3 = (_this$props$translati4 = this.props.translations) === null || _this$props$translati4 ===
|
225
|
-
const nextText = (_this$props$translati5 = (_this$props$translati6 = this.props.translations) === null || _this$props$translati6 ===
|
223
|
+
const prevText = (_this$props$translati3 = (_this$props$translati4 = this.props.translations) === null || _this$props$translati4 === void 0 ? void 0 : _this$props$translati4.previousPage) !== null && _this$props$translati3 !== void 0 ? _this$props$translati3 : translate('previousPage');
|
224
|
+
const nextText = (_this$props$translati5 = (_this$props$translati6 = this.props.translations) === null || _this$props$translati6 === void 0 ? void 0 : _this$props$translati6.nextPage) !== null && _this$props$translati5 !== void 0 ? _this$props$translati5 : translate('nextPage');
|
226
225
|
const nextLinkContent = [jsx("span", {
|
227
226
|
children: nextText
|
228
227
|
}, "text"), nextIcon];
|
@@ -279,7 +278,7 @@ class Pager extends PureComponent {
|
|
279
278
|
} = this.context;
|
280
279
|
if (totalPages < this.props.currentPage) {
|
281
280
|
var _this$props$onPageCha4, _this$props4;
|
282
|
-
(_this$props$onPageCha4 = (_this$props4 = this.props).onPageChange) === null || _this$props$onPageCha4 ===
|
281
|
+
(_this$props$onPageCha4 = (_this$props4 = this.props).onPageChange) === null || _this$props$onPageCha4 === void 0 || _this$props$onPageCha4.call(_this$props4, totalPages);
|
283
282
|
}
|
284
283
|
let start = 1;
|
285
284
|
let end = totalPages;
|
@@ -311,14 +310,14 @@ class Pager extends PureComponent {
|
|
311
310
|
children: [this.getPagerLinks(), jsxs("div", {
|
312
311
|
className: style.actions,
|
313
312
|
children: [jsxs(ButtonToolbar, {
|
314
|
-
children: [start > 1 && this.getButton(1, (_this$props$translati7 = (_this$props$translati8 = this.props.translations) === null || _this$props$translati8 ===
|
313
|
+
children: [start > 1 && this.getButton(1, (_this$props$translati7 = (_this$props$translati8 = this.props.translations) === null || _this$props$translati8 === void 0 ? void 0 : _this$props$translati8.firstPage) !== null && _this$props$translati7 !== void 0 ? _this$props$translati7 : translate('firstPage')), jsxs(ButtonGroup, {
|
315
314
|
children: [start > 1 && this.getButton(start - 1, '...'), buttons, end < totalPages && this.getButton(end + 1, '...'), end === totalPages && this.props.openTotal && jsx(Button, _objectSpread2(_objectSpread2({
|
316
315
|
href: this.generateHref(end + 1),
|
317
316
|
disabled: this.props.loader
|
318
317
|
}, this.getClickProps(this.handleLoadMore(end + 1))), {}, {
|
319
318
|
children: '...'
|
320
319
|
}))]
|
321
|
-
}), lastPageButtonAvailable && this.getButton(this.props.openTotal ? -1 : totalPages, (_this$props$translati9 = (_this$props$translati10 = this.props.translations) === null || _this$props$translati10 ===
|
320
|
+
}), lastPageButtonAvailable && this.getButton(this.props.openTotal ? -1 : totalPages, (_this$props$translati9 = (_this$props$translati10 = this.props.translations) === null || _this$props$translati10 === void 0 ? void 0 : _this$props$translati10.lastPage) !== null && _this$props$translati9 !== void 0 ? _this$props$translati9 : translate('lastPage'))]
|
322
321
|
}), this.getPageSizeSelector()]
|
323
322
|
})]
|
324
323
|
});
|
@@ -29,13 +29,13 @@ import PermissionCache from './permissions__cache.js';
|
|
29
29
|
class Permissions {
|
30
30
|
constructor(auth) {
|
31
31
|
let config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
32
|
-
_defineProperty(this, "query",
|
33
|
-
_defineProperty(this, "namesConverter",
|
34
|
-
_defineProperty(this, "_auth",
|
35
|
-
_defineProperty(this, "_datasource",
|
36
|
-
_defineProperty(this, "_promise",
|
37
|
-
_defineProperty(this, "_subscribed",
|
38
|
-
_defineProperty(this, "_permissionCache",
|
32
|
+
_defineProperty(this, "query", void 0);
|
33
|
+
_defineProperty(this, "namesConverter", void 0);
|
34
|
+
_defineProperty(this, "_auth", void 0);
|
35
|
+
_defineProperty(this, "_datasource", void 0);
|
36
|
+
_defineProperty(this, "_promise", void 0);
|
37
|
+
_defineProperty(this, "_subscribed", void 0);
|
38
|
+
_defineProperty(this, "_permissionCache", void 0);
|
39
39
|
_defineProperty(this, "_defaultDatasource", query => this._auth.http.get(Permissions.API_PERMISSION_CACHE_PATH, {
|
40
40
|
query: {
|
41
41
|
fields: 'permission/key,global,projects(id)',
|
@@ -32,9 +32,9 @@ class PermissionCache {
|
|
32
32
|
return projectIdSet;
|
33
33
|
}
|
34
34
|
constructor(permissions, namesConverter) {
|
35
|
-
_defineProperty(this, "namesConverter",
|
36
|
-
_defineProperty(this, "_permissions",
|
37
|
-
_defineProperty(this, "permissionCache",
|
35
|
+
_defineProperty(this, "namesConverter", void 0);
|
36
|
+
_defineProperty(this, "_permissions", void 0);
|
37
|
+
_defineProperty(this, "permissionCache", void 0);
|
38
38
|
this.namesConverter = namesConverter || (key => key);
|
39
39
|
this.set(permissions);
|
40
40
|
}
|
@@ -206,7 +206,7 @@ class PermissionCache {
|
|
206
206
|
testPermission(permissionName, projectId) {
|
207
207
|
const permissionCache = this.permissionCache;
|
208
208
|
const convertedName = this.namesConverter(permissionName);
|
209
|
-
const cachedPermission = (permissionCache === null || permissionCache ===
|
209
|
+
const cachedPermission = (permissionCache === null || permissionCache === void 0 ? void 0 : permissionCache[permissionName]) || convertedName && (permissionCache === null || permissionCache === void 0 ? void 0 : permissionCache[convertedName]);
|
210
210
|
// Hasn't the permission in any project
|
211
211
|
if (!cachedPermission) {
|
212
212
|
return false;
|
@@ -71,11 +71,11 @@ class Popup extends PureComponent {
|
|
71
71
|
_defineProperty(this, "state", {
|
72
72
|
display: Display.SHOWING
|
73
73
|
});
|
74
|
-
_defineProperty(this, "popup",
|
75
|
-
_defineProperty(this, "node",
|
76
|
-
_defineProperty(this, "parent",
|
77
|
-
_defineProperty(this, "container",
|
78
|
-
_defineProperty(this, "ringPopupTarget",
|
74
|
+
_defineProperty(this, "popup", void 0);
|
75
|
+
_defineProperty(this, "node", void 0);
|
76
|
+
_defineProperty(this, "parent", void 0);
|
77
|
+
_defineProperty(this, "container", void 0);
|
78
|
+
_defineProperty(this, "ringPopupTarget", void 0);
|
79
79
|
_defineProperty(this, "listeners", new Listeners());
|
80
80
|
_defineProperty(this, "redrawScheduler", scheduleRAF(true));
|
81
81
|
_defineProperty(this, "uid", getUID('popup-'));
|
@@ -136,8 +136,8 @@ class Popup extends PureComponent {
|
|
136
136
|
this.redrawScheduler(this._updatePosition);
|
137
137
|
}
|
138
138
|
});
|
139
|
-
_defineProperty(this, "_listenersEnabled",
|
140
|
-
_defineProperty(this, "_prevTimeout",
|
139
|
+
_defineProperty(this, "_listenersEnabled", void 0);
|
140
|
+
_defineProperty(this, "_prevTimeout", void 0);
|
141
141
|
_defineProperty(this, "_onEscPress", evt => {
|
142
142
|
this.props.onEscPress(evt);
|
143
143
|
this._onCloseAttempt(evt, true);
|
@@ -148,7 +148,7 @@ class Popup extends PureComponent {
|
|
148
148
|
*/
|
149
149
|
_defineProperty(this, "_onDocumentClick", evt => {
|
150
150
|
var _this$_getAnchor;
|
151
|
-
if (this.container && evt.target instanceof Node && this.container.contains(evt.target) || !this._listenersEnabled || this.props.dontCloseOnAnchorClick && evt.target instanceof Node && (_this$_getAnchor = this._getAnchor()) !== null && _this$_getAnchor !==
|
151
|
+
if (this.container && evt.target instanceof Node && this.container.contains(evt.target) || !this._listenersEnabled || this.props.dontCloseOnAnchorClick && evt.target instanceof Node && (_this$_getAnchor = this._getAnchor()) !== null && _this$_getAnchor !== void 0 && _this$_getAnchor.contains(evt.target)) {
|
152
152
|
return;
|
153
153
|
}
|
154
154
|
this.props.onOutsideClick(evt);
|
@@ -249,7 +249,7 @@ function position(attrs) {
|
|
249
249
|
anchorRect,
|
250
250
|
maxHeight,
|
251
251
|
direction: chosenDirection,
|
252
|
-
popupScrollHeight: (_popup$scrollHeight = popup === null || popup ===
|
252
|
+
popupScrollHeight: (_popup$scrollHeight = popup === null || popup === void 0 ? void 0 : popup.scrollHeight) !== null && _popup$scrollHeight !== void 0 ? _popup$scrollHeight : 0,
|
253
253
|
scroll
|
254
254
|
});
|
255
255
|
}
|
@@ -38,13 +38,6 @@ import 'memoize-one';
|
|
38
38
|
import '../global/memoize.js';
|
39
39
|
import 'core-js/modules/es.weak-map.js';
|
40
40
|
import '../global/create-stateful-context.js';
|
41
|
-
import '../list/list__link.js';
|
42
|
-
import '../link/link.js';
|
43
|
-
import '../link/clickableLink.js';
|
44
|
-
import '../_helpers/link.js';
|
45
|
-
import '../list/list__classes.js';
|
46
|
-
import '../list/consts.js';
|
47
|
-
import '../_helpers/list.js';
|
48
41
|
import '../list/list__item.js';
|
49
42
|
import '../avatar/avatar.js';
|
50
43
|
import '../global/url.js';
|
@@ -60,6 +53,12 @@ import '../_helpers/icon__svg.js';
|
|
60
53
|
import 'core-js/modules/es.string.starts-with.js';
|
61
54
|
import '../global/composeRefs.js';
|
62
55
|
import '../control-help/control-help.js';
|
56
|
+
import '../link/link.js';
|
57
|
+
import '../link/clickableLink.js';
|
58
|
+
import '../_helpers/link.js';
|
59
|
+
import '../_helpers/list.js';
|
60
|
+
import '../list/consts.js';
|
61
|
+
import '../list/list__classes.js';
|
63
62
|
import '../list/list__custom.js';
|
64
63
|
import '../global/get-event-key.js';
|
65
64
|
import '../list/list__title.js';
|
@@ -79,7 +78,7 @@ class PopupMenu extends Popup {
|
|
79
78
|
}
|
80
79
|
this.props.onSelect(item, event);
|
81
80
|
});
|
82
|
-
_defineProperty(this, "list",
|
81
|
+
_defineProperty(this, "list", void 0);
|
83
82
|
_defineProperty(this, "listRef", el => {
|
84
83
|
this.list = el;
|
85
84
|
});
|
@@ -13,11 +13,11 @@ const _excluded = ["className", "global", "max", "value", "label", "staticColor"
|
|
13
13
|
class ProgressBar extends PureComponent {
|
14
14
|
constructor() {
|
15
15
|
super(...arguments);
|
16
|
-
_defineProperty(this, "progressbarWrapper",
|
16
|
+
_defineProperty(this, "progressbarWrapper", void 0);
|
17
17
|
_defineProperty(this, "progressbarWrapperRef", el => {
|
18
18
|
this.progressbarWrapper = el;
|
19
19
|
});
|
20
|
-
_defineProperty(this, "progressbar",
|
20
|
+
_defineProperty(this, "progressbar", void 0);
|
21
21
|
_defineProperty(this, "progressbarRef", el => {
|
22
22
|
this.progressbar = el;
|
23
23
|
});
|