@jetbrains/ring-ui 5.0.158 → 5.0.160
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/list/consts.js +3 -0
- package/components/select/select.d.ts +1 -0
- package/components/select/select.js +5 -2
- package/dist/auth/auth__core.js +9 -9
- package/dist/auth/storage.js +1 -1
- package/dist/date-picker/date-popup.js +2 -2
- package/dist/http/http.mock.js +1 -0
- package/dist/hub-source/hub-source__user.js +3 -3
- package/dist/list/consts.js +3 -0
- package/dist/markdown/code.js +1 -1
- package/dist/query-assist/query-assist.js +2 -2
- package/dist/select/select.d.ts +1 -0
- package/dist/select/select.js +8 -4
- package/dist/select-ng/select-ng__lazy.js +1 -1
- package/dist/storage/storage.js +1 -1
- package/dist/storage/storage__fallback.js +1 -0
- package/dist/storage/storage__local.js +1 -1
- package/dist/tags-input/tags-input.js +2 -2
- package/dist/user-agreement/service.js +1 -1
- package/package.json +19 -19
|
@@ -11,16 +11,19 @@ export var Type;
|
|
|
11
11
|
Type[Type["TITLE"] = 5] = "TITLE";
|
|
12
12
|
Type[Type["MARGIN"] = 6] = "MARGIN";
|
|
13
13
|
})(Type || (Type = {}));
|
|
14
|
+
// TODO refactor to plain object in 6.0
|
|
14
15
|
export var Dimension;
|
|
15
16
|
(function (Dimension) {
|
|
16
17
|
Dimension[Dimension["ITEM_PADDING"] = 16] = "ITEM_PADDING";
|
|
17
18
|
Dimension[Dimension["ITEM_HEIGHT"] = 32] = "ITEM_HEIGHT";
|
|
18
19
|
Dimension[Dimension["COMPACT_ITEM_HEIGHT"] = 24] = "COMPACT_ITEM_HEIGHT";
|
|
19
20
|
Dimension[Dimension["SEPARATOR_HEIGHT"] = 25] = "SEPARATOR_HEIGHT";
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
20
22
|
Dimension[Dimension["SEPARATOR_FIRST_HEIGHT"] = 16] = "SEPARATOR_FIRST_HEIGHT";
|
|
21
23
|
Dimension[Dimension["SEPARATOR_TEXT_HEIGHT"] = 18] = "SEPARATOR_TEXT_HEIGHT";
|
|
22
24
|
Dimension[Dimension["TITLE_HEIGHT"] = 42] = "TITLE_HEIGHT";
|
|
23
25
|
Dimension[Dimension["INNER_PADDING"] = 8] = "INNER_PADDING";
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
24
27
|
Dimension[Dimension["MARGIN"] = 8] = "MARGIN";
|
|
25
28
|
})(Dimension || (Dimension = {}));
|
|
26
29
|
export const DEFAULT_ITEM_TYPE = Type.ITEM;
|
|
@@ -584,8 +584,11 @@ export default class Select extends Component {
|
|
|
584
584
|
selected.isResetItem) {
|
|
585
585
|
return;
|
|
586
586
|
}
|
|
587
|
+
const tryKeepOpen = this.props.tryKeepOpen ?? opts.tryKeepOpen;
|
|
587
588
|
if (!this.props.multiple) {
|
|
588
|
-
|
|
589
|
+
if (!tryKeepOpen) {
|
|
590
|
+
this._hidePopup(isSelectItemEvent);
|
|
591
|
+
}
|
|
589
592
|
this.setState({
|
|
590
593
|
selected,
|
|
591
594
|
selectedIndex: this._getSelectedIndex(selected, this.props.data)
|
|
@@ -600,7 +603,6 @@ export default class Select extends Component {
|
|
|
600
603
|
});
|
|
601
604
|
}
|
|
602
605
|
else {
|
|
603
|
-
const { tryKeepOpen } = opts;
|
|
604
606
|
if (!tryKeepOpen) {
|
|
605
607
|
this._hidePopup(isSelectItemEvent);
|
|
606
608
|
}
|
|
@@ -933,6 +935,7 @@ Select.propTypes = {
|
|
|
933
935
|
clear: PropTypes.bool,
|
|
934
936
|
hideArrow: PropTypes.bool,
|
|
935
937
|
showPopup: PropTypes.bool,
|
|
938
|
+
tryKeepOpen: PropTypes.bool,
|
|
936
939
|
compact: PropTypes.bool,
|
|
937
940
|
size: PropTypes.oneOf(Object.values(Size)),
|
|
938
941
|
customAnchor: PropTypes.func,
|
package/dist/auth/auth__core.js
CHANGED
|
@@ -37,6 +37,7 @@ import 'core-js/modules/es.array.reduce.js';
|
|
|
37
37
|
import 'core-js/modules/es.array.sort.js';
|
|
38
38
|
import '../storage/storage.js';
|
|
39
39
|
import '../storage/storage__local.js';
|
|
40
|
+
import 'core-js/modules/es.object.keys.js';
|
|
40
41
|
import '../alert-service/alert-service.js';
|
|
41
42
|
import 'react';
|
|
42
43
|
import '../global/react-render-adapter.js';
|
|
@@ -63,7 +64,6 @@ import '../_helpers/loader-inline.js';
|
|
|
63
64
|
import '../global/dom.js';
|
|
64
65
|
import 'core-js/modules/es.object.assign.js';
|
|
65
66
|
import 'core-js/modules/es.string.split.js';
|
|
66
|
-
import 'core-js/modules/es.object.keys.js';
|
|
67
67
|
import '../button/button.js';
|
|
68
68
|
import '@jetbrains/icons/chevron-10px';
|
|
69
69
|
import '../link/clickableLink.js';
|
|
@@ -437,7 +437,7 @@ var Auth = /*#__PURE__*/function () {
|
|
|
437
437
|
case 23:
|
|
438
438
|
state = _context3.sent;
|
|
439
439
|
case 24:
|
|
440
|
-
(_this$_initDeferred = this._initDeferred) === null || _this$_initDeferred === void 0
|
|
440
|
+
(_this$_initDeferred = this._initDeferred) === null || _this$_initDeferred === void 0 || (_this$_initDeferred$r = _this$_initDeferred.resolve) === null || _this$_initDeferred$r === void 0 ? void 0 : _this$_initDeferred$r.call(_this$_initDeferred, state && state.restoreLocation);
|
|
441
441
|
return _context3.abrupt("return", (_state = state) === null || _state === void 0 ? void 0 : _state.restoreLocation);
|
|
442
442
|
case 28:
|
|
443
443
|
_context3.prev = 28;
|
|
@@ -446,7 +446,7 @@ var Auth = /*#__PURE__*/function () {
|
|
|
446
446
|
_context3.next = 35;
|
|
447
447
|
break;
|
|
448
448
|
}
|
|
449
|
-
(_this$_initDeferred2 = this._initDeferred) === null || _this$_initDeferred2 === void 0
|
|
449
|
+
(_this$_initDeferred2 = this._initDeferred) === null || _this$_initDeferred2 === void 0 || (_this$_initDeferred2$ = _this$_initDeferred2.resolve) === null || _this$_initDeferred2$ === void 0 ? void 0 : _this$_initDeferred2$.call(_this$_initDeferred2); // No way to handle if cookies are disabled
|
|
450
450
|
_context3.next = 34;
|
|
451
451
|
return this.requestUser();
|
|
452
452
|
case 34:
|
|
@@ -582,14 +582,14 @@ var Auth = /*#__PURE__*/function () {
|
|
|
582
582
|
_context6.next = 13;
|
|
583
583
|
return (_this$_tokenValidator2 = this._tokenValidator) === null || _this$_tokenValidator2 === void 0 ? void 0 : _this$_tokenValidator2.validateToken();
|
|
584
584
|
case 13:
|
|
585
|
-
(_this$_initDeferred3 = this._initDeferred) === null || _this$_initDeferred3 === void 0
|
|
585
|
+
(_this$_initDeferred3 = this._initDeferred) === null || _this$_initDeferred3 === void 0 || (_this$_initDeferred3$ = _this$_initDeferred3.resolve) === null || _this$_initDeferred3$ === void 0 ? void 0 : _this$_initDeferred3$.call(_this$_initDeferred3);
|
|
586
586
|
return _context6.abrupt("return", undefined);
|
|
587
587
|
case 17:
|
|
588
588
|
_context6.prev = 17;
|
|
589
589
|
_context6.t0 = _context6["catch"](8);
|
|
590
590
|
return _context6.abrupt("return", _context6.t0 instanceof Error ? this.sendRedirect(_context6.t0) : undefined);
|
|
591
591
|
case 20:
|
|
592
|
-
(_this$_initDeferred4 = this._initDeferred) === null || _this$_initDeferred4 === void 0
|
|
592
|
+
(_this$_initDeferred4 = this._initDeferred) === null || _this$_initDeferred4 === void 0 || (_this$_initDeferred4$ = _this$_initDeferred4.reject) === null || _this$_initDeferred4$ === void 0 ? void 0 : _this$_initDeferred4$.call(_this$_initDeferred4, error);
|
|
593
593
|
throw error;
|
|
594
594
|
case 22:
|
|
595
595
|
case "end":
|
|
@@ -1053,7 +1053,7 @@ var Auth = /*#__PURE__*/function () {
|
|
|
1053
1053
|
closeDialog();
|
|
1054
1054
|
if (!cancelable) {
|
|
1055
1055
|
var _this7$_initDeferred, _this7$_initDeferred$;
|
|
1056
|
-
(_this7$_initDeferred = _this7._initDeferred) === null || _this7$_initDeferred === void 0
|
|
1056
|
+
(_this7$_initDeferred = _this7._initDeferred) === null || _this7$_initDeferred === void 0 || (_this7$_initDeferred$ = _this7$_initDeferred.resolve) === null || _this7$_initDeferred$ === void 0 ? void 0 : _this7$_initDeferred$.call(_this7$_initDeferred);
|
|
1057
1057
|
_this7.listeners.trigger(LOGOUT_POSTPONED_EVENT);
|
|
1058
1058
|
onPostponeLogout();
|
|
1059
1059
|
return;
|
|
@@ -1062,7 +1062,7 @@ var Auth = /*#__PURE__*/function () {
|
|
|
1062
1062
|
_this7.forceTokenUpdate();
|
|
1063
1063
|
} else {
|
|
1064
1064
|
var _this7$_initDeferred2, _this7$_initDeferred3;
|
|
1065
|
-
(_this7$_initDeferred2 = _this7._initDeferred) === null || _this7$_initDeferred2 === void 0
|
|
1065
|
+
(_this7$_initDeferred2 = _this7._initDeferred) === null || _this7$_initDeferred2 === void 0 || (_this7$_initDeferred3 = _this7$_initDeferred2.resolve) === null || _this7$_initDeferred3 === void 0 ? void 0 : _this7$_initDeferred3.call(_this7$_initDeferred2);
|
|
1066
1066
|
}
|
|
1067
1067
|
};
|
|
1068
1068
|
var onTryAgainClick = /*#__PURE__*/function () {
|
|
@@ -1099,7 +1099,7 @@ var Auth = /*#__PURE__*/function () {
|
|
|
1099
1099
|
if (token) {
|
|
1100
1100
|
var _this7$_initDeferred4, _this7$_initDeferred5;
|
|
1101
1101
|
closeDialog();
|
|
1102
|
-
(_this7$_initDeferred4 = _this7._initDeferred) === null || _this7$_initDeferred4 === void 0
|
|
1102
|
+
(_this7$_initDeferred4 = _this7._initDeferred) === null || _this7$_initDeferred4 === void 0 || (_this7$_initDeferred5 = _this7$_initDeferred4.resolve) === null || _this7$_initDeferred5 === void 0 ? void 0 : _this7$_initDeferred5.call(_this7$_initDeferred4);
|
|
1103
1103
|
}
|
|
1104
1104
|
});
|
|
1105
1105
|
var stopMessageListening = (_this$_storage9 = this._storage) === null || _this$_storage9 === void 0 ? void 0 : _this$_storage9.onMessage(Auth.CLOSE_WINDOW_MESSAGE, function () {
|
|
@@ -1127,7 +1127,7 @@ var Auth = /*#__PURE__*/function () {
|
|
|
1127
1127
|
this._createInitDeferred();
|
|
1128
1128
|
var done = function done() {
|
|
1129
1129
|
var _this8$_initDeferred, _this8$_initDeferred$;
|
|
1130
|
-
(_this8$_initDeferred = _this8._initDeferred) === null || _this8$_initDeferred === void 0
|
|
1130
|
+
(_this8$_initDeferred = _this8._initDeferred) === null || _this8$_initDeferred === void 0 || (_this8$_initDeferred$ = _this8$_initDeferred.resolve) === null || _this8$_initDeferred$ === void 0 ? void 0 : _this8$_initDeferred$.call(_this8$_initDeferred);
|
|
1131
1131
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
1132
1132
|
hide === null || hide === void 0 ? void 0 : hide();
|
|
1133
1133
|
};
|
package/dist/auth/storage.js
CHANGED
|
@@ -11,6 +11,7 @@ import 'core-js/modules/es.string.iterator.js';
|
|
|
11
11
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
12
12
|
import ActualStorage from '../storage/storage.js';
|
|
13
13
|
import '../storage/storage__local.js';
|
|
14
|
+
import 'core-js/modules/es.object.keys.js';
|
|
14
15
|
import '../alert-service/alert-service.js';
|
|
15
16
|
import 'core-js/modules/es.array.concat.js';
|
|
16
17
|
import 'react';
|
|
@@ -45,7 +46,6 @@ import '../global/dom.js';
|
|
|
45
46
|
import 'core-js/modules/es.object.assign.js';
|
|
46
47
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
|
47
48
|
import 'core-js/modules/es.string.split.js';
|
|
48
|
-
import 'core-js/modules/es.object.keys.js';
|
|
49
49
|
import 'core-js/modules/es.set.js';
|
|
50
50
|
import '../button/button.js';
|
|
51
51
|
import '@jetbrains/icons/chevron-10px';
|
|
@@ -184,7 +184,7 @@ var DatePopup = /*#__PURE__*/function (_Component) {
|
|
|
184
184
|
});
|
|
185
185
|
});
|
|
186
186
|
_defineProperty(_assertThisInitialized(_this), "onClear", function (e) {
|
|
187
|
-
var _this$props$onClear, _this$props, _this$componentRef$cu
|
|
187
|
+
var _this$props$onClear, _this$props, _this$componentRef$cu;
|
|
188
188
|
var changes;
|
|
189
189
|
if (_this.props.range) {
|
|
190
190
|
changes = {
|
|
@@ -198,7 +198,7 @@ var DatePopup = /*#__PURE__*/function (_Component) {
|
|
|
198
198
|
}
|
|
199
199
|
_this.select(changes);
|
|
200
200
|
(_this$props$onClear = (_this$props = _this.props).onClear) === null || _this$props$onClear === void 0 ? void 0 : _this$props$onClear.call(_this$props, e);
|
|
201
|
-
(_this$componentRef$cu = _this.componentRef.current) === null || _this$componentRef$cu === void 0
|
|
201
|
+
(_this$componentRef$cu = _this.componentRef.current) === null || _this$componentRef$cu === void 0 || (_this$componentRef$cu = _this$componentRef$cu.querySelector('input')) === null || _this$componentRef$cu === void 0 ? void 0 : _this$componentRef$cu.focus();
|
|
202
202
|
});
|
|
203
203
|
var defaultState = {
|
|
204
204
|
text: null,
|
package/dist/http/http.mock.js
CHANGED
|
@@ -6,6 +6,7 @@ import 'core-js/modules/es.map.js';
|
|
|
6
6
|
import 'core-js/modules/es.string.iterator.js';
|
|
7
7
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
8
8
|
import 'core-js/modules/es.array.concat.js';
|
|
9
|
+
import 'core-js/modules/es.object.keys.js';
|
|
9
10
|
import 'core-js/modules/es.regexp.constructor.js';
|
|
10
11
|
import 'core-js/modules/es.regexp.exec.js';
|
|
11
12
|
import 'core-js/modules/es.regexp.to-string.js';
|
|
@@ -19,15 +19,15 @@ import 'core-js/modules/es.string.replace.js';
|
|
|
19
19
|
|
|
20
20
|
var DEFAULT_FIELDS = 'id,name,login,banned,banReason,profile(email/email,avatar/url)';
|
|
21
21
|
function convertUserForCard(hubUser) {
|
|
22
|
-
var _hubUser$profile, _hubUser$
|
|
22
|
+
var _hubUser$profile, _hubUser$profile2;
|
|
23
23
|
var serverUri = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
24
24
|
return {
|
|
25
25
|
name: hubUser.name,
|
|
26
26
|
login: hubUser.login,
|
|
27
27
|
banned: hubUser.banned,
|
|
28
28
|
banReason: hubUser.banReason,
|
|
29
|
-
email: (_hubUser$profile = hubUser.profile) === null || _hubUser$profile === void 0
|
|
30
|
-
avatarUrl: (_hubUser$profile2 = hubUser.profile) === null || _hubUser$profile2 === void 0
|
|
29
|
+
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,
|
|
30
|
+
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,
|
|
31
31
|
href: "".concat(serverUri, "users/").concat(hubUser.id)
|
|
32
32
|
};
|
|
33
33
|
}
|
package/dist/list/consts.js
CHANGED
|
@@ -11,16 +11,19 @@ var Type;
|
|
|
11
11
|
Type[Type["TITLE"] = 5] = "TITLE";
|
|
12
12
|
Type[Type["MARGIN"] = 6] = "MARGIN";
|
|
13
13
|
})(Type || (Type = {}));
|
|
14
|
+
// TODO refactor to plain object in 6.0
|
|
14
15
|
var Dimension;
|
|
15
16
|
(function (Dimension) {
|
|
16
17
|
Dimension[Dimension["ITEM_PADDING"] = 16] = "ITEM_PADDING";
|
|
17
18
|
Dimension[Dimension["ITEM_HEIGHT"] = 32] = "ITEM_HEIGHT";
|
|
18
19
|
Dimension[Dimension["COMPACT_ITEM_HEIGHT"] = 24] = "COMPACT_ITEM_HEIGHT";
|
|
19
20
|
Dimension[Dimension["SEPARATOR_HEIGHT"] = 25] = "SEPARATOR_HEIGHT";
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
20
22
|
Dimension[Dimension["SEPARATOR_FIRST_HEIGHT"] = 16] = "SEPARATOR_FIRST_HEIGHT";
|
|
21
23
|
Dimension[Dimension["SEPARATOR_TEXT_HEIGHT"] = 18] = "SEPARATOR_TEXT_HEIGHT";
|
|
22
24
|
Dimension[Dimension["TITLE_HEIGHT"] = 42] = "TITLE_HEIGHT";
|
|
23
25
|
Dimension[Dimension["INNER_PADDING"] = 8] = "INNER_PADDING";
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
24
27
|
Dimension[Dimension["MARGIN"] = 8] = "MARGIN";
|
|
25
28
|
})(Dimension || (Dimension = {}));
|
|
26
29
|
var DEFAULT_ITEM_TYPE = Type.ITEM;
|
package/dist/markdown/code.js
CHANGED
|
@@ -35,7 +35,7 @@ var MarkdownCode = function MarkdownCode(_ref) {
|
|
|
35
35
|
inline = _ref.inline,
|
|
36
36
|
className = _ref.className;
|
|
37
37
|
// Hack for updated react-markdown RG-2193
|
|
38
|
-
var lang = language !== null && language !== void 0 ? language : className === null || className === void 0
|
|
38
|
+
var lang = language !== null && language !== void 0 ? language : className === null || className === void 0 || (_className$split$find = className.split(' ').find(function (name) {
|
|
39
39
|
return name.startsWith('language-');
|
|
40
40
|
})) === null || _className$split$find === void 0 ? void 0 : _className$split$find.replace('language-', '');
|
|
41
41
|
return /*#__PURE__*/React.createElement(Code, {
|
|
@@ -644,8 +644,8 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
|
644
644
|
}, {
|
|
645
645
|
key: "getQuery",
|
|
646
646
|
value: function getQuery() {
|
|
647
|
-
var _this$input$textConte, _this$input4
|
|
648
|
-
return (_this$input$textConte = (_this$input4 = this.input) === null || _this$input4 === void 0
|
|
647
|
+
var _this$input$textConte, _this$input4;
|
|
648
|
+
return (_this$input$textConte = (_this$input4 = this.input) === null || _this$input4 === void 0 || (_this$input4 = _this$input4.textContent) === null || _this$input4 === void 0 ? void 0 : _this$input4.replace(/\s/g, ' ')) !== null && _this$input$textConte !== void 0 ? _this$input$textConte : '';
|
|
649
649
|
}
|
|
650
650
|
}, {
|
|
651
651
|
key: "isRenderingGlassOrLoader",
|
package/dist/select/select.d.ts
CHANGED
package/dist/select/select.js
CHANGED
|
@@ -452,6 +452,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
452
452
|
}
|
|
453
453
|
});
|
|
454
454
|
_defineProperty(_assertThisInitialized(_this), "_listSelectHandler", function (selected, event) {
|
|
455
|
+
var _this$props$tryKeepOp;
|
|
455
456
|
var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
456
457
|
var isItem = function isItem(item) {
|
|
457
458
|
return List.isItemType(List.ListProps.Type.ITEM, item);
|
|
@@ -466,8 +467,11 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
466
467
|
if (!isItem(selected) && !isCustomItem(selected) || selected.disabled || selected.isResetItem) {
|
|
467
468
|
return;
|
|
468
469
|
}
|
|
470
|
+
var tryKeepOpen = (_this$props$tryKeepOp = _this.props.tryKeepOpen) !== null && _this$props$tryKeepOp !== void 0 ? _this$props$tryKeepOp : opts.tryKeepOpen;
|
|
469
471
|
if (!_this.props.multiple) {
|
|
470
|
-
|
|
472
|
+
if (!tryKeepOpen) {
|
|
473
|
+
_this._hidePopup(isSelectItemEvent);
|
|
474
|
+
}
|
|
471
475
|
_this.setState({
|
|
472
476
|
selected: selected,
|
|
473
477
|
selectedIndex: _this._getSelectedIndex(selected, _this.props.data)
|
|
@@ -479,7 +483,6 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
479
483
|
_this.props.onChange(selected, event);
|
|
480
484
|
});
|
|
481
485
|
} else {
|
|
482
|
-
var tryKeepOpen = opts.tryKeepOpen;
|
|
483
486
|
if (!tryKeepOpen) {
|
|
484
487
|
_this._hidePopup(isSelectItemEvent);
|
|
485
488
|
}
|
|
@@ -974,7 +977,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
974
977
|
}, {
|
|
975
978
|
key: "renderSelect",
|
|
976
979
|
value: function renderSelect(activeItemId) {
|
|
977
|
-
var _classNames2, _this$props$label3, _this$props$label4, _this$_popup5,
|
|
980
|
+
var _classNames2, _this$props$label3, _this$props$label4, _this$_popup5, _classNames3, _this$props$buttonCla;
|
|
978
981
|
var dataTest = this.props['data-test'];
|
|
979
982
|
var selectedLabel = this.props.selectedLabel;
|
|
980
983
|
var shortcutsEnabled = this.state.shortcutsEnabled;
|
|
@@ -1022,7 +1025,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
1022
1025
|
placeholder: this.props.inputPlaceholder,
|
|
1023
1026
|
onKeyDown: this.props.onKeyDown,
|
|
1024
1027
|
"data-test": "ring-select__focus",
|
|
1025
|
-
enableShortcuts: shortcutsEnabled ? Object.keys(_objectSpread2(_objectSpread2({}, this.getShortcutsMap()), (_this$_popup5 = this._popup) === null || _this$_popup5 === void 0
|
|
1028
|
+
enableShortcuts: shortcutsEnabled ? Object.keys(_objectSpread2(_objectSpread2({}, this.getShortcutsMap()), (_this$_popup5 = this._popup) === null || _this$_popup5 === void 0 || (_this$_popup5 = _this$_popup5.list) === null || _this$_popup5 === void 0 ? void 0 : _this$_popup5.shortcutsMap)) : undefined,
|
|
1026
1029
|
afterInput: this.props.type === Type.INPUT && iconsNode
|
|
1027
1030
|
})), this._renderPopup()), this.props.error && /*#__PURE__*/React.createElement("div", {
|
|
1028
1031
|
className: classNames(modules_88cfaf40.errorText, modules_88cfaf40["size".concat(this.props.size)])
|
|
@@ -1262,6 +1265,7 @@ Select.propTypes = {
|
|
|
1262
1265
|
clear: PropTypes.bool,
|
|
1263
1266
|
hideArrow: PropTypes.bool,
|
|
1264
1267
|
showPopup: PropTypes.bool,
|
|
1268
|
+
tryKeepOpen: PropTypes.bool,
|
|
1265
1269
|
compact: PropTypes.bool,
|
|
1266
1270
|
size: PropTypes.oneOf(Object.values(Size)),
|
|
1267
1271
|
customAnchor: PropTypes.func,
|
|
@@ -192,7 +192,7 @@ var SelectLazy = /*#__PURE__*/function () {
|
|
|
192
192
|
ref: function ref(node) {
|
|
193
193
|
var _node$_openPopupIfClo;
|
|
194
194
|
_this2.selectRef(node);
|
|
195
|
-
node === null || node === void 0
|
|
195
|
+
node === null || node === void 0 || (_node$_openPopupIfClo = node._openPopupIfClosed) === null || _node$_openPopupIfClo === void 0 ? void 0 : _node$_openPopupIfClo.call(node);
|
|
196
196
|
}
|
|
197
197
|
}), this.container);
|
|
198
198
|
} else {
|
package/dist/storage/storage.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import LocalStorage from './storage__local.js';
|
|
2
2
|
import FallbackStorage from './storage__fallback.js';
|
|
3
3
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
4
|
+
import 'core-js/modules/es.object.keys.js';
|
|
4
5
|
import 'core-js/modules/es.object.to-string.js';
|
|
5
6
|
import 'core-js/modules/es.promise.js';
|
|
6
7
|
import 'core-js/modules/es.array.iterator.js';
|
|
@@ -43,7 +44,6 @@ import '../global/dom.js';
|
|
|
43
44
|
import 'core-js/modules/es.object.assign.js';
|
|
44
45
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
|
45
46
|
import 'core-js/modules/es.string.split.js';
|
|
46
|
-
import 'core-js/modules/es.object.keys.js';
|
|
47
47
|
import 'core-js/modules/es.set.js';
|
|
48
48
|
import '../button/button.js';
|
|
49
49
|
import '@jetbrains/icons/chevron-10px';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { c as _defineProperty, _ as _createClass, b as _classCallCheck, e as _asyncToGenerator, f as _regeneratorRuntime } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import 'core-js/modules/es.object.to-string.js';
|
|
3
3
|
import 'core-js/modules/es.promise.js';
|
|
4
|
+
import 'core-js/modules/es.object.keys.js';
|
|
4
5
|
import 'core-js/modules/es.reflect.delete-property.js';
|
|
5
6
|
import 'core-js/modules/es.array.iterator.js';
|
|
6
7
|
import 'core-js/modules/es.string.iterator.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { _ as _createClass, b as _classCallCheck, c as _defineProperty, e as _asyncToGenerator, f as _regeneratorRuntime } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import 'core-js/modules/es.object.keys.js';
|
|
2
3
|
import 'core-js/modules/es.object.to-string.js';
|
|
3
4
|
import 'core-js/modules/es.promise.js';
|
|
4
5
|
import 'core-js/modules/es.array.iterator.js';
|
|
@@ -41,7 +42,6 @@ import '../global/dom.js';
|
|
|
41
42
|
import 'core-js/modules/es.object.assign.js';
|
|
42
43
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
|
43
44
|
import 'core-js/modules/es.string.split.js';
|
|
44
|
-
import 'core-js/modules/es.object.keys.js';
|
|
45
45
|
import 'core-js/modules/es.set.js';
|
|
46
46
|
import '../button/button.js';
|
|
47
47
|
import '@jetbrains/icons/chevron-10px';
|
|
@@ -264,7 +264,7 @@ var TagsInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
264
264
|
}
|
|
265
265
|
});
|
|
266
266
|
_defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (event) {
|
|
267
|
-
var _this$select4
|
|
267
|
+
var _this$select4;
|
|
268
268
|
var key = getEventKey(event);
|
|
269
269
|
var isInputFocused = function isInputFocused() {
|
|
270
270
|
var _this$getInputNode$ta, _this$getInputNode2;
|
|
@@ -279,7 +279,7 @@ var TagsInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
279
279
|
}
|
|
280
280
|
return true;
|
|
281
281
|
}
|
|
282
|
-
if ((_this$select4 = _this.select) !== null && _this$select4 !== void 0 && (_this$select4
|
|
282
|
+
if ((_this$select4 = _this.select) !== null && _this$select4 !== void 0 && (_this$select4 = _this$select4._popup) !== null && _this$select4 !== void 0 && _this$select4.isVisible()) {
|
|
283
283
|
return true;
|
|
284
284
|
}
|
|
285
285
|
if (key === 'ArrowLeft') {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { _ as _createClass, b as _classCallCheck, c as _defineProperty, e as _asyncToGenerator, a as _objectSpread2, f as _regeneratorRuntime, l as _slicedToArray } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import 'core-js/modules/es.object.keys.js';
|
|
2
3
|
import 'core-js/modules/es.array.iterator.js';
|
|
3
4
|
import 'core-js/modules/es.object.to-string.js';
|
|
4
5
|
import 'core-js/modules/es.promise.js';
|
|
@@ -47,7 +48,6 @@ import '../global/dom.js';
|
|
|
47
48
|
import 'core-js/modules/es.object.assign.js';
|
|
48
49
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
|
49
50
|
import 'core-js/modules/es.string.split.js';
|
|
50
|
-
import 'core-js/modules/es.object.keys.js';
|
|
51
51
|
import 'core-js/modules/es.set.js';
|
|
52
52
|
import '../button/button.js';
|
|
53
53
|
import '@jetbrains/icons/chevron-10px';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.160",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -85,19 +85,19 @@
|
|
|
85
85
|
"@rollup/plugin-json": "^6.0.0",
|
|
86
86
|
"@rollup/plugin-node-resolve": "^15.1.0",
|
|
87
87
|
"@rollup/plugin-replace": "^5.0.2",
|
|
88
|
-
"@storybook/addon-a11y": "7.0
|
|
89
|
-
"@storybook/addon-docs": "7.0
|
|
90
|
-
"@storybook/addon-essentials": "7.0
|
|
91
|
-
"@storybook/addon-storyshots": "7.0.
|
|
92
|
-
"@storybook/addon-storyshots-puppeteer": "7.0
|
|
88
|
+
"@storybook/addon-a11y": "7.1.0",
|
|
89
|
+
"@storybook/addon-docs": "7.1.0",
|
|
90
|
+
"@storybook/addon-essentials": "7.1.0",
|
|
91
|
+
"@storybook/addon-storyshots": "7.0.27",
|
|
92
|
+
"@storybook/addon-storyshots-puppeteer": "7.1.0",
|
|
93
93
|
"@storybook/addon-storysource": "7.0.27",
|
|
94
94
|
"@storybook/addons": "7.0.27",
|
|
95
|
-
"@storybook/html": "7.0.
|
|
96
|
-
"@storybook/html-webpack5": "^7.0
|
|
97
|
-
"@storybook/preview-api": "7.0.
|
|
95
|
+
"@storybook/html": "7.0.27",
|
|
96
|
+
"@storybook/html-webpack5": "^7.1.0",
|
|
97
|
+
"@storybook/preview-api": "7.0.27",
|
|
98
98
|
"@storybook/react": "7.0.27",
|
|
99
|
-
"@storybook/source-loader": "7.0
|
|
100
|
-
"@storybook/theming": "7.0
|
|
99
|
+
"@storybook/source-loader": "7.1.0",
|
|
100
|
+
"@storybook/theming": "7.1.0",
|
|
101
101
|
"@testing-library/react": "^14.0.0",
|
|
102
102
|
"@testing-library/user-event": "^14.4.3",
|
|
103
103
|
"@types/chai": "^4.3.5",
|
|
@@ -109,8 +109,8 @@
|
|
|
109
109
|
"@types/react-dom": "^18.2.7",
|
|
110
110
|
"@types/sinon": "^10.0.15",
|
|
111
111
|
"@types/sinon-chai": "^3.2.9",
|
|
112
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
113
|
-
"@typescript-eslint/parser": "^6.
|
|
112
|
+
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
|
113
|
+
"@typescript-eslint/parser": "^6.1.0",
|
|
114
114
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
|
|
115
115
|
"acorn": "^8.10.0",
|
|
116
116
|
"angular": "^1.8.3",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"angular-route": "^1.8.3",
|
|
119
119
|
"babel-plugin-react-docgen": "^4.2.1",
|
|
120
120
|
"babel-plugin-require-context-hook": "^1.0.0",
|
|
121
|
-
"caniuse-lite": "^1.0.
|
|
121
|
+
"caniuse-lite": "^1.0.30001517",
|
|
122
122
|
"chai": "^4.3.7",
|
|
123
123
|
"chai-as-promised": "^7.1.1",
|
|
124
124
|
"chai-dom": "^1.10.0",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"core-js": "^3.31.1",
|
|
128
128
|
"cpy-cli": "^3.1.1",
|
|
129
129
|
"enzyme": "^3.11.0",
|
|
130
|
-
"eslint": "^8.
|
|
130
|
+
"eslint": "^8.45.0",
|
|
131
131
|
"eslint-import-resolver-webpack": "^0.13.2",
|
|
132
132
|
"eslint-plugin-angular": "^4.1.0",
|
|
133
133
|
"eslint-plugin-bdd": "^2.1.1",
|
|
@@ -155,20 +155,20 @@
|
|
|
155
155
|
"mocha": "^10.2.0",
|
|
156
156
|
"pinst": "^3.0.0",
|
|
157
157
|
"prettier": "^3.0.0",
|
|
158
|
-
"puppeteer": "^20.8.
|
|
158
|
+
"puppeteer": "^20.8.3",
|
|
159
159
|
"raw-loader": "^4.0.2",
|
|
160
160
|
"react": "^18.2.0",
|
|
161
161
|
"react-dom": "^18.2.0",
|
|
162
162
|
"react-test-renderer": "^18.2.0",
|
|
163
163
|
"regenerator-runtime": "^0.13.11",
|
|
164
164
|
"rimraf": "^5.0.1",
|
|
165
|
-
"rollup": "^3.26.
|
|
165
|
+
"rollup": "^3.26.3",
|
|
166
166
|
"rollup-plugin-clear": "^2.0.7",
|
|
167
167
|
"rollup-plugin-styles": "^4.0.0",
|
|
168
168
|
"sinon": "^15.2.0",
|
|
169
169
|
"sinon-chai": "^3.7.0",
|
|
170
170
|
"storage-mock": "^2.1.0",
|
|
171
|
-
"storybook": "^7.0
|
|
171
|
+
"storybook": "^7.1.0",
|
|
172
172
|
"storybook-addon-themes": "^6.1.0",
|
|
173
173
|
"storybook-zeplin": "^2.0.2",
|
|
174
174
|
"stylelint": "^15.10.1",
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
"terser-webpack-plugin": "^5.3.9",
|
|
178
178
|
"typescript": "~5.1.6",
|
|
179
179
|
"wallaby-webpack": "^3.9.16",
|
|
180
|
-
"webpack": "^5.88.
|
|
180
|
+
"webpack": "^5.88.2",
|
|
181
181
|
"webpack-cli": "^5.1.4",
|
|
182
182
|
"xmlappend": "^1.0.4"
|
|
183
183
|
},
|