@jetbrains/ring-ui 5.0.148 → 5.0.149
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/select/select.js +1 -1
- package/dist/_helpers/card.js +5 -5
- package/dist/analytics/analytics__custom-plugin.js +2 -6
- package/dist/analytics/analytics__ga-plugin.js +1 -2
- package/dist/auth/auth__core.js +63 -100
- package/dist/auth/iframe-flow.js +1 -2
- package/dist/auth/landing.js +1 -2
- package/dist/auth/request-builder.js +1 -2
- package/dist/auth/token-validator.js +2 -6
- package/dist/auth/window-flow.js +2 -4
- package/dist/caret/caret.js +13 -16
- package/dist/clipboard/clipboard-fallback.js +3 -3
- package/dist/data-list/data-list.js +3 -6
- package/dist/data-list/item.js +1 -1
- package/dist/date-picker/date-input.js +5 -6
- package/dist/date-picker/date-picker.js +6 -7
- package/dist/date-picker/date-popup.js +2 -3
- package/dist/dialog-ng/dialog-ng.js +2 -3
- package/dist/dropdown/dropdown.js +2 -4
- package/dist/editable-heading/editable-heading.js +2 -2
- package/dist/global/focus-sensor-hoc.js +8 -13
- package/dist/global/normalize-indent.js +2 -2
- package/dist/global/react-render-adapter.js +1 -4
- package/dist/global/rerender-hoc.js +1 -2
- package/dist/global/schedule-raf.js +1 -2
- package/dist/header/profile.js +6 -6
- package/dist/header/smart-profile.js +2 -3
- package/dist/header/smart-services.js +3 -6
- package/dist/http/http.js +7 -13
- package/dist/hub-source/hub-source__user.js +2 -3
- package/dist/input/input.js +4 -7
- package/dist/island/content.js +1 -2
- package/dist/list/list__users-groups-source.js +7 -10
- package/dist/loader/loader.js +1 -2
- package/dist/loader/loader__core.js +1 -2
- package/dist/markdown/code.js +2 -3
- package/dist/message/message.js +6 -8
- package/dist/pager/pager.js +12 -16
- package/dist/permissions/permissions__cache.js +1 -1
- package/dist/popup/popup.js +1 -2
- package/dist/popup/position.js +1 -1
- package/dist/query-assist/query-assist.js +34 -46
- package/dist/select/select.js +11 -18
- package/dist/select/select__popup.js +3 -10
- package/dist/select-ng/select-ng.js +1 -2
- package/dist/select-ng/select-ng__lazy.js +1 -2
- package/dist/shortcuts/core.js +1 -2
- package/dist/tab-trap/tab-trap.js +2 -4
- package/dist/table/header.js +2 -2
- package/dist/table/multitable.js +7 -14
- package/dist/table/row-with-focus-sensor.js +4 -8
- package/dist/table/selection-shortcuts-hoc.js +11 -11
- package/dist/tabs/collapsible-tabs.js +1 -1
- package/dist/tag/tag.js +1 -2
- package/dist/tags-input/tags-input.js +13 -23
- package/dist/tooltip/tooltip.js +2 -4
- package/dist/user-agreement/user-agreement.js +8 -8
- package/package.json +27 -27
|
@@ -114,10 +114,7 @@ class SelectPopup extends PureComponent {
|
|
|
114
114
|
isClickingPopup = false; // This flag is set to true while an item in the popup is being clicked
|
|
115
115
|
filter;
|
|
116
116
|
focusFilter() {
|
|
117
|
-
setTimeout(() =>
|
|
118
|
-
var _this$filter;
|
|
119
|
-
return (_this$filter = this.filter) === null || _this$filter === void 0 ? void 0 : _this$filter.focus();
|
|
120
|
-
});
|
|
117
|
+
setTimeout(() => this.filter?.focus());
|
|
121
118
|
}
|
|
122
119
|
isEventTargetFilter(event) {
|
|
123
120
|
return event.target instanceof Element && event.target.matches('input,textarea');
|
|
@@ -221,10 +218,7 @@ class SelectPopup extends PureComponent {
|
|
|
221
218
|
tabPress = event => {
|
|
222
219
|
this.props.onCloseAttempt(event, true);
|
|
223
220
|
};
|
|
224
|
-
onClickHandler = () =>
|
|
225
|
-
var _this$filter2;
|
|
226
|
-
return (_this$filter2 = this.filter) === null || _this$filter2 === void 0 ? void 0 : _this$filter2.focus();
|
|
227
|
-
};
|
|
221
|
+
onClickHandler = () => this.filter?.focus();
|
|
228
222
|
getFilter() {
|
|
229
223
|
if (this.props.filter || this.props.tags) {
|
|
230
224
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -341,7 +335,6 @@ class SelectPopup extends PureComponent {
|
|
|
341
335
|
}
|
|
342
336
|
};
|
|
343
337
|
getSelectAll = () => {
|
|
344
|
-
var _multiple$renderSelec;
|
|
345
338
|
const multiple = this.props.multiple;
|
|
346
339
|
const activeFilters = this.props.data.filter(item => !item.disabled);
|
|
347
340
|
return Array.isArray(this.props.selected) && /*#__PURE__*/React.createElement("div", {
|
|
@@ -350,7 +343,7 @@ class SelectPopup extends PureComponent {
|
|
|
350
343
|
text: true,
|
|
351
344
|
inline: true,
|
|
352
345
|
onClick: this.handleSelectAll
|
|
353
|
-
}, activeFilters.length !== this.props.selected.length ? multiple.selectAllLabel || 'Select all' : multiple.deselectAllLabel || 'Deselect all'),
|
|
346
|
+
}, activeFilters.length !== this.props.selected.length ? multiple.selectAllLabel || 'Select all' : multiple.deselectAllLabel || 'Deselect all'), multiple.renderSelectedItemsDescription?.(this.props.selected, activeFilters.length) || /*#__PURE__*/React.createElement(Text, {
|
|
354
347
|
info: true
|
|
355
348
|
}, `${this.props.selected.length} selected`));
|
|
356
349
|
};
|
|
@@ -408,8 +408,7 @@ angularModule.directive('rgSelect', function rgSelectDirective() {
|
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
function reRenderSelect(props) {
|
|
411
|
-
|
|
412
|
-
if ((_ctrl$selectInstance = ctrl.selectInstance) !== null && _ctrl$selectInstance !== void 0 && _ctrl$selectInstance.node) {
|
|
411
|
+
if (ctrl.selectInstance?.node) {
|
|
413
412
|
ctrl.selectInstance.rerender({
|
|
414
413
|
...props,
|
|
415
414
|
ref: selectRef
|
|
@@ -141,9 +141,8 @@ class SelectLazy {
|
|
|
141
141
|
if (this.type === 'dropdown') {
|
|
142
142
|
render( /*#__PURE__*/cloneElement(this.reactSelect, {
|
|
143
143
|
ref: node => {
|
|
144
|
-
var _node$_openPopupIfClo;
|
|
145
144
|
this.selectRef(node);
|
|
146
|
-
node
|
|
145
|
+
node?._openPopupIfClosed?.();
|
|
147
146
|
}
|
|
148
147
|
}), this.container);
|
|
149
148
|
} else {
|
package/dist/shortcuts/core.js
CHANGED
|
@@ -158,8 +158,7 @@ class Shortcuts {
|
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
160
|
hasKey(key, scope) {
|
|
161
|
-
|
|
162
|
-
return !!((_this$_scopes$scope = this._scopes[scope]) !== null && _this$_scopes$scope !== void 0 && _this$_scopes$scope[key]);
|
|
161
|
+
return !!this._scopes[scope]?.[key];
|
|
163
162
|
}
|
|
164
163
|
_defaultFilter = (e, element, key) => {
|
|
165
164
|
// if the element or its parents have the class "ring-js-shortcuts" then no need to stop
|
|
@@ -28,9 +28,8 @@ class TabTrap extends Component {
|
|
|
28
28
|
if (this.props.autoFocusFirst) {
|
|
29
29
|
this.focusFirst();
|
|
30
30
|
} else if (!this.props.trapDisabled && (!this.node || !this.node.contains(this.previousFocusedNode))) {
|
|
31
|
-
var _this$trapButtonNode;
|
|
32
31
|
this.trapWithoutFocus = true;
|
|
33
|
-
|
|
32
|
+
this.trapButtonNode?.focus();
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
componentWillUnmount() {
|
|
@@ -90,7 +89,6 @@ class TabTrap extends Component {
|
|
|
90
89
|
}
|
|
91
90
|
};
|
|
92
91
|
handleBlurIfWithoutFocus = event => {
|
|
93
|
-
var _this$node;
|
|
94
92
|
if (!this.trapWithoutFocus) {
|
|
95
93
|
return;
|
|
96
94
|
}
|
|
@@ -99,7 +97,7 @@ class TabTrap extends Component {
|
|
|
99
97
|
if (!newFocused) {
|
|
100
98
|
return;
|
|
101
99
|
}
|
|
102
|
-
if (newFocused instanceof Element &&
|
|
100
|
+
if (newFocused instanceof Element && this.node?.contains(newFocused)) {
|
|
103
101
|
return;
|
|
104
102
|
}
|
|
105
103
|
this.focusLast();
|
package/dist/table/header.js
CHANGED
|
@@ -85,8 +85,8 @@ class Header extends PureComponent {
|
|
|
85
85
|
calculateColumnsWidths(columnsRowNode) {
|
|
86
86
|
var _columnsRowNode$child;
|
|
87
87
|
this.setState({
|
|
88
|
-
headerWidth: columnsRowNode
|
|
89
|
-
widths: [...((_columnsRowNode$child = columnsRowNode
|
|
88
|
+
headerWidth: columnsRowNode?.clientWidth,
|
|
89
|
+
widths: [...((_columnsRowNode$child = columnsRowNode?.childNodes) !== null && _columnsRowNode$child !== void 0 ? _columnsRowNode$child : [])].map(column => column instanceof Element ? column.clientWidth : 0)
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
createCells() {
|
package/dist/table/multitable.js
CHANGED
|
@@ -13,8 +13,7 @@ class MultiTable extends PureComponent {
|
|
|
13
13
|
const currentSelections = this.props.children.map(element => element.props.selection);
|
|
14
14
|
const currentFocused = currentSelections.filter(selection => selection.getFocused());
|
|
15
15
|
if (currentFocused.includes(prevFocused)) {
|
|
16
|
-
|
|
17
|
-
(_prevProps$children$p = (_prevProps$children$p2 = prevProps.children[prevFocusedIndex].props).onSelect) === null || _prevProps$children$p === void 0 ? void 0 : _prevProps$children$p.call(_prevProps$children$p2, prevFocused.resetFocus());
|
|
16
|
+
prevProps.children[prevFocusedIndex].props.onSelect?.(prevFocused.resetFocus());
|
|
18
17
|
}
|
|
19
18
|
}
|
|
20
19
|
}
|
|
@@ -34,15 +33,12 @@ class MultiTable extends PureComponent {
|
|
|
34
33
|
const prevTable = tables[tableIndex - 1] ? tables[tableIndex - 1].props : null;
|
|
35
34
|
let newSelection = currentTable.selection.moveUp();
|
|
36
35
|
if (newSelection) {
|
|
37
|
-
|
|
38
|
-
(_currentTable$onSelec = currentTable.onSelect) === null || _currentTable$onSelec === void 0 ? void 0 : _currentTable$onSelec.call(currentTable, newSelection);
|
|
36
|
+
currentTable.onSelect?.(newSelection);
|
|
39
37
|
} else if (prevTable) {
|
|
40
|
-
|
|
41
|
-
(_currentTable$onSelec2 = currentTable.onSelect) === null || _currentTable$onSelec2 === void 0 ? void 0 : _currentTable$onSelec2.call(currentTable, currentTable.selection.resetFocus());
|
|
38
|
+
currentTable.onSelect?.(currentTable.selection.resetFocus());
|
|
42
39
|
newSelection = prevTable.selection.moveUp();
|
|
43
40
|
if (newSelection) {
|
|
44
|
-
|
|
45
|
-
(_prevTable$onSelect = prevTable.onSelect) === null || _prevTable$onSelect === void 0 ? void 0 : _prevTable$onSelect.call(prevTable, newSelection);
|
|
41
|
+
prevTable.onSelect?.(newSelection);
|
|
46
42
|
}
|
|
47
43
|
}
|
|
48
44
|
return false;
|
|
@@ -63,15 +59,12 @@ class MultiTable extends PureComponent {
|
|
|
63
59
|
const nextTable = tables[tableIndex + 1] ? tables[tableIndex + 1].props : null;
|
|
64
60
|
let newSelection = currentTable.selection.moveDown();
|
|
65
61
|
if (newSelection) {
|
|
66
|
-
|
|
67
|
-
(_currentTable$onSelec3 = currentTable.onSelect) === null || _currentTable$onSelec3 === void 0 ? void 0 : _currentTable$onSelec3.call(currentTable, newSelection);
|
|
62
|
+
currentTable.onSelect?.(newSelection);
|
|
68
63
|
} else if (nextTable) {
|
|
69
|
-
|
|
70
|
-
(_currentTable$onSelec4 = currentTable.onSelect) === null || _currentTable$onSelec4 === void 0 ? void 0 : _currentTable$onSelec4.call(currentTable, currentTable.selection.resetFocus());
|
|
64
|
+
currentTable.onSelect?.(currentTable.selection.resetFocus());
|
|
71
65
|
newSelection = nextTable.selection.moveDown();
|
|
72
66
|
if (newSelection) {
|
|
73
|
-
|
|
74
|
-
(_nextTable$onSelect = nextTable.onSelect) === null || _nextTable$onSelect === void 0 ? void 0 : _nextTable$onSelect.call(nextTable, newSelection);
|
|
67
|
+
nextTable.onSelect?.(newSelection);
|
|
75
68
|
}
|
|
76
69
|
}
|
|
77
70
|
return false;
|
|
@@ -48,20 +48,16 @@ class RowWithFocusSensorCallbacks extends PureComponent {
|
|
|
48
48
|
// https://stackoverflow.com/a/53882322/6304152
|
|
49
49
|
RowWithFocusSensor = getContainer();
|
|
50
50
|
onFocus = () => {
|
|
51
|
-
|
|
52
|
-
(_this$props$onFocus = (_this$props = this.props).onFocus) === null || _this$props$onFocus === void 0 ? void 0 : _this$props$onFocus.call(_this$props, this.props.item);
|
|
51
|
+
this.props.onFocus?.(this.props.item);
|
|
53
52
|
};
|
|
54
53
|
onSelect = (item, selected) => {
|
|
55
|
-
|
|
56
|
-
(_this$props$onSelect = (_this$props2 = this.props).onSelect) === null || _this$props$onSelect === void 0 ? void 0 : _this$props$onSelect.call(_this$props2, item, selected);
|
|
54
|
+
this.props.onSelect?.(item, selected);
|
|
57
55
|
};
|
|
58
56
|
onCollapse = () => {
|
|
59
|
-
|
|
60
|
-
(_this$props$onCollaps = (_this$props3 = this.props).onCollapse) === null || _this$props$onCollaps === void 0 ? void 0 : _this$props$onCollaps.call(_this$props3, this.props.item);
|
|
57
|
+
this.props.onCollapse?.(this.props.item);
|
|
61
58
|
};
|
|
62
59
|
onExpand = () => {
|
|
63
|
-
|
|
64
|
-
(_this$props$onExpand = (_this$props4 = this.props).onExpand) === null || _this$props$onExpand === void 0 ? void 0 : _this$props$onExpand.call(_this$props4, this.props.item);
|
|
60
|
+
this.props.onExpand?.(this.props.item);
|
|
65
61
|
};
|
|
66
62
|
render() {
|
|
67
63
|
return /*#__PURE__*/React.createElement(this.RowWithFocusSensor, _extends({}, this.props, {
|
|
@@ -28,7 +28,7 @@ function selectionShortcutsHOC(ComposedComponent) {
|
|
|
28
28
|
} = this.props;
|
|
29
29
|
const newSelection = selection.moveUp();
|
|
30
30
|
if (newSelection) {
|
|
31
|
-
onSelect
|
|
31
|
+
onSelect?.(newSelection);
|
|
32
32
|
}
|
|
33
33
|
return false;
|
|
34
34
|
};
|
|
@@ -39,7 +39,7 @@ function selectionShortcutsHOC(ComposedComponent) {
|
|
|
39
39
|
} = this.props;
|
|
40
40
|
const newSelection = selection.moveDown();
|
|
41
41
|
if (newSelection) {
|
|
42
|
-
onSelect
|
|
42
|
+
onSelect?.(newSelection);
|
|
43
43
|
}
|
|
44
44
|
return false;
|
|
45
45
|
};
|
|
@@ -74,9 +74,9 @@ function selectionShortcutsHOC(ComposedComponent) {
|
|
|
74
74
|
const newSelection = this.shiftSelect(selection);
|
|
75
75
|
const newMovedSelection = newSelection.moveUp();
|
|
76
76
|
if (newMovedSelection) {
|
|
77
|
-
onSelect
|
|
77
|
+
onSelect?.(newMovedSelection);
|
|
78
78
|
} else {
|
|
79
|
-
onSelect
|
|
79
|
+
onSelect?.(newSelection);
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
82
|
onShiftDownPress = e => {
|
|
@@ -92,9 +92,9 @@ function selectionShortcutsHOC(ComposedComponent) {
|
|
|
92
92
|
const newSelection = this.shiftSelect(selection);
|
|
93
93
|
const newMovedSelection = newSelection.moveDown();
|
|
94
94
|
if (newMovedSelection) {
|
|
95
|
-
onSelect
|
|
95
|
+
onSelect?.(newMovedSelection);
|
|
96
96
|
} else {
|
|
97
|
-
onSelect
|
|
97
|
+
onSelect?.(newSelection);
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
100
|
onHomePress = () => {
|
|
@@ -104,7 +104,7 @@ function selectionShortcutsHOC(ComposedComponent) {
|
|
|
104
104
|
} = this.props;
|
|
105
105
|
const newSelection = selection.moveStart();
|
|
106
106
|
if (newSelection) {
|
|
107
|
-
onSelect
|
|
107
|
+
onSelect?.(newSelection);
|
|
108
108
|
}
|
|
109
109
|
return false;
|
|
110
110
|
};
|
|
@@ -115,7 +115,7 @@ function selectionShortcutsHOC(ComposedComponent) {
|
|
|
115
115
|
} = this.props;
|
|
116
116
|
const newSelection = selection.moveEnd();
|
|
117
117
|
if (newSelection) {
|
|
118
|
-
onSelect
|
|
118
|
+
onSelect?.(newSelection);
|
|
119
119
|
}
|
|
120
120
|
return false;
|
|
121
121
|
};
|
|
@@ -128,7 +128,7 @@ function selectionShortcutsHOC(ComposedComponent) {
|
|
|
128
128
|
if (!selectable) {
|
|
129
129
|
return true;
|
|
130
130
|
}
|
|
131
|
-
onSelect
|
|
131
|
+
onSelect?.(selection.toggleSelection());
|
|
132
132
|
return false;
|
|
133
133
|
};
|
|
134
134
|
onEscPress = () => {
|
|
@@ -136,7 +136,7 @@ function selectionShortcutsHOC(ComposedComponent) {
|
|
|
136
136
|
selection,
|
|
137
137
|
onSelect
|
|
138
138
|
} = this.props;
|
|
139
|
-
onSelect
|
|
139
|
+
onSelect?.(selection.reset());
|
|
140
140
|
//this.restoreFocusWithoutScroll();
|
|
141
141
|
};
|
|
142
142
|
|
|
@@ -149,7 +149,7 @@ function selectionShortcutsHOC(ComposedComponent) {
|
|
|
149
149
|
if (!selectable) {
|
|
150
150
|
return true;
|
|
151
151
|
}
|
|
152
|
-
onSelect
|
|
152
|
+
onSelect?.(selection.selectAll());
|
|
153
153
|
return false;
|
|
154
154
|
};
|
|
155
155
|
shortcutsMap = {
|
|
@@ -205,7 +205,7 @@ const CollapsibleTabs = _ref => {
|
|
|
205
205
|
const measureTask = fastdom.measure(() => {
|
|
206
206
|
var _container$children;
|
|
207
207
|
const container = measureRef.current;
|
|
208
|
-
const descendants = [...((_container$children = container
|
|
208
|
+
const descendants = [...((_container$children = container?.children) !== null && _container$children !== void 0 ? _container$children : [])];
|
|
209
209
|
const moreButton = descendants.pop();
|
|
210
210
|
let moreButtonWidth = moreButton.offsetWidth;
|
|
211
211
|
const {
|
package/dist/tag/tag.js
CHANGED
|
@@ -58,8 +58,7 @@ class Tag extends PureComponent {
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
if (this.state.focused) {
|
|
61
|
-
|
|
62
|
-
(_this$tagNode = this.tagNode) === null || _this$tagNode === void 0 ? void 0 : _this$tagNode.focus();
|
|
61
|
+
this.tagNode?.focus();
|
|
63
62
|
}
|
|
64
63
|
this.setDocumentClickListener(this.state.focused);
|
|
65
64
|
}
|
|
@@ -170,10 +170,9 @@ class TagsInput extends PureComponent {
|
|
|
170
170
|
}
|
|
171
171
|
componentDidMount() {
|
|
172
172
|
if (this.props.autoOpen && !this.props.disabled) {
|
|
173
|
-
var _this$select;
|
|
174
173
|
this.focusInput();
|
|
175
174
|
this.loadSuggestions();
|
|
176
|
-
|
|
175
|
+
this.select?._showPopup();
|
|
177
176
|
}
|
|
178
177
|
}
|
|
179
178
|
static ngModelStateField = 'tags';
|
|
@@ -188,8 +187,7 @@ class TagsInput extends PureComponent {
|
|
|
188
187
|
caret;
|
|
189
188
|
getInputNode() {
|
|
190
189
|
if (!this.input) {
|
|
191
|
-
|
|
192
|
-
this.input = (_this$select2 = this.select) === null || _this$select2 === void 0 ? void 0 : _this$select2.filter;
|
|
190
|
+
this.input = this.select?.filter;
|
|
193
191
|
if (this.input) {
|
|
194
192
|
this.caret = new Caret(this.input);
|
|
195
193
|
}
|
|
@@ -202,17 +200,15 @@ class TagsInput extends PureComponent {
|
|
|
202
200
|
});
|
|
203
201
|
}
|
|
204
202
|
focusInput = () => {
|
|
205
|
-
|
|
206
|
-
(_this$getInputNode = this.getInputNode()) === null || _this$getInputNode === void 0 ? void 0 : _this$getInputNode.focus();
|
|
203
|
+
this.getInputNode()?.focus();
|
|
207
204
|
};
|
|
208
205
|
addTag = tag => {
|
|
209
|
-
var _this$select3, _this$select4;
|
|
210
206
|
if (tag == null) {
|
|
211
207
|
return;
|
|
212
208
|
}
|
|
213
209
|
const isUniqueTag = this.state.tags.filter(item => tag.key === item.key).length === 0;
|
|
214
|
-
|
|
215
|
-
|
|
210
|
+
this.select?.clear();
|
|
211
|
+
this.select?.filterValue('');
|
|
216
212
|
if (isUniqueTag) {
|
|
217
213
|
this.setState(prevState => ({
|
|
218
214
|
tags: prevState.tags.concat([tag])
|
|
@@ -238,11 +234,10 @@ class TagsInput extends PureComponent {
|
|
|
238
234
|
}, this.focusInput);
|
|
239
235
|
}
|
|
240
236
|
clickHandler = event => {
|
|
241
|
-
var _this$select5;
|
|
242
237
|
if (event.target !== this.node && event.target.parentElement !== this.node) {
|
|
243
238
|
return;
|
|
244
239
|
}
|
|
245
|
-
|
|
240
|
+
this.select?._clickHandler();
|
|
246
241
|
};
|
|
247
242
|
filterExistingTags = suggestions => {
|
|
248
243
|
const tagsMap = new Map(this.state.tags.map(tag => [tag.key, tag]));
|
|
@@ -300,22 +295,20 @@ class TagsInput extends PureComponent {
|
|
|
300
295
|
}
|
|
301
296
|
};
|
|
302
297
|
handleKeyDown = event => {
|
|
303
|
-
var _this$select6, _this$select6$_popup;
|
|
304
298
|
const key = getEventKey(event);
|
|
305
299
|
const isInputFocused = () => {
|
|
306
|
-
var _this$getInputNode$ta
|
|
307
|
-
return event.target instanceof Element && event.target.matches((_this$getInputNode$ta =
|
|
300
|
+
var _this$getInputNode$ta;
|
|
301
|
+
return event.target instanceof Element && event.target.matches((_this$getInputNode$ta = this.getInputNode()?.tagName) !== null && _this$getInputNode$ta !== void 0 ? _this$getInputNode$ta : '');
|
|
308
302
|
};
|
|
309
303
|
if (key === ' ' && this.props.allowAddNewTags) {
|
|
310
|
-
var _this$getInputNode3;
|
|
311
304
|
event.stopPropagation();
|
|
312
|
-
const value =
|
|
305
|
+
const value = this.getInputNode()?.value;
|
|
313
306
|
if (value != null && value !== '') {
|
|
314
307
|
this.handleTagCreation(value);
|
|
315
308
|
}
|
|
316
309
|
return true;
|
|
317
310
|
}
|
|
318
|
-
if (
|
|
311
|
+
if (this.select?._popup?.isVisible()) {
|
|
319
312
|
return true;
|
|
320
313
|
}
|
|
321
314
|
if (key === 'ArrowLeft') {
|
|
@@ -328,8 +321,7 @@ class TagsInput extends PureComponent {
|
|
|
328
321
|
if (key === 'ArrowRight' && !isInputFocused()) {
|
|
329
322
|
if (this.state.activeIndex === this.state.tags.length - 1) {
|
|
330
323
|
if (!this.props.disabled) {
|
|
331
|
-
|
|
332
|
-
(_this$getInputNode4 = this.getInputNode()) === null || _this$getInputNode4 === void 0 ? void 0 : _this$getInputNode4.focus();
|
|
324
|
+
this.getInputNode()?.focus();
|
|
333
325
|
this.setActiveIndex();
|
|
334
326
|
}
|
|
335
327
|
} else {
|
|
@@ -338,12 +330,10 @@ class TagsInput extends PureComponent {
|
|
|
338
330
|
return false;
|
|
339
331
|
}
|
|
340
332
|
if (!this.props.disabled) {
|
|
341
|
-
|
|
342
|
-
if (key === 'Backspace' && !((_this$getInputNode5 = this.getInputNode()) !== null && _this$getInputNode5 !== void 0 && _this$getInputNode5.value)) {
|
|
343
|
-
var _this$select7;
|
|
333
|
+
if (key === 'Backspace' && !this.getInputNode()?.value) {
|
|
344
334
|
event.preventDefault();
|
|
345
335
|
const tagsLength = this.state.tags.length;
|
|
346
|
-
|
|
336
|
+
this.select?._hidePopup(true); // otherwise confirmation may be overlapped by popup
|
|
347
337
|
this.onRemoveTag(this.state.tags[tagsLength - 1]);
|
|
348
338
|
return false;
|
|
349
339
|
}
|
package/dist/tooltip/tooltip.js
CHANGED
|
@@ -82,7 +82,6 @@ class Tooltip extends Component {
|
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
84
|
showPopup = () => {
|
|
85
|
-
var _this$context;
|
|
86
85
|
if (this.props.selfOverflowOnly) {
|
|
87
86
|
const {
|
|
88
87
|
containerNode
|
|
@@ -102,15 +101,14 @@ class Tooltip extends Component {
|
|
|
102
101
|
return;
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
|
-
|
|
104
|
+
this.context?.onNestedTooltipShow();
|
|
106
105
|
this.setState({
|
|
107
106
|
showPopup: true
|
|
108
107
|
});
|
|
109
108
|
};
|
|
110
109
|
hidePopup = () => {
|
|
111
|
-
var _this$context2;
|
|
112
110
|
clearTimeout(this.timeout);
|
|
113
|
-
|
|
111
|
+
this.context?.onNestedTooltipHide();
|
|
114
112
|
this.setState({
|
|
115
113
|
showPopup: false
|
|
116
114
|
});
|
|
@@ -113,38 +113,38 @@ class UserAgreement extends PureComponent {
|
|
|
113
113
|
translate
|
|
114
114
|
} = _ref;
|
|
115
115
|
return /*#__PURE__*/React.createElement(Dialog, {
|
|
116
|
-
label: (_translations$userAgr = translations
|
|
116
|
+
label: (_translations$userAgr = translations?.userAgreement) !== null && _translations$userAgr !== void 0 ? _translations$userAgr : translate('userAgreement'),
|
|
117
117
|
show: show,
|
|
118
118
|
className: classNames(modules_f5ed85cf.agreementDialog, className),
|
|
119
119
|
contentClassName: modules_f5ed85cf.dialogContent,
|
|
120
120
|
trapFocus: true,
|
|
121
121
|
autoFocusFirst: false,
|
|
122
122
|
"data-test": "user-agreement"
|
|
123
|
-
}, /*#__PURE__*/React.createElement(HeaderWrapper, null, (_translations$userAgr2 = translations
|
|
123
|
+
}, /*#__PURE__*/React.createElement(HeaderWrapper, null, (_translations$userAgr2 = translations?.userAgreement) !== null && _translations$userAgr2 !== void 0 ? _translations$userAgr2 : translate('userAgreement')), /*#__PURE__*/React.createElement(ContentWrapper, {
|
|
124
124
|
fade: true,
|
|
125
125
|
onScrollToBottom: this.onScrollToBottom
|
|
126
126
|
}, /*#__PURE__*/React.createElement(Markdown, null, text)), !preview && /*#__PURE__*/React.createElement(Panel, null, onRemindLater && !scrolledDown && /*#__PURE__*/React.createElement("div", {
|
|
127
127
|
className: modules_f5ed85cf.suggestion
|
|
128
|
-
}, (_translations$scrollT = translations
|
|
128
|
+
}, (_translations$scrollT = translations?.scrollToAccept) !== null && _translations$scrollT !== void 0 ? _translations$scrollT : translate('scrollToAccept')), /*#__PURE__*/React.createElement(Button, {
|
|
129
129
|
primary: true,
|
|
130
130
|
disabled: !scrolledDown,
|
|
131
131
|
onClick: onAccept,
|
|
132
132
|
"data-test": "accept"
|
|
133
|
-
}, (_translations$accept = translations
|
|
133
|
+
}, (_translations$accept = translations?.accept) !== null && _translations$accept !== void 0 ? _translations$accept : translate('accept')), /*#__PURE__*/React.createElement(Button, {
|
|
134
134
|
onClick: onDecline,
|
|
135
135
|
autoFocus: true,
|
|
136
136
|
"data-test": "decline"
|
|
137
|
-
}, (_translations$decline = translations
|
|
137
|
+
}, (_translations$decline = translations?.decline) !== null && _translations$decline !== void 0 ? _translations$decline : translate('decline')), !onRemindLater && !scrolledDown && /*#__PURE__*/React.createElement("span", {
|
|
138
138
|
className: modules_f5ed85cf.suggestion
|
|
139
|
-
}, (_translations$scrollT2 = translations
|
|
139
|
+
}, (_translations$scrollT2 = translations?.scrollToAccept) !== null && _translations$scrollT2 !== void 0 ? _translations$scrollT2 : translate('scrollToAccept')), onRemindLater && /*#__PURE__*/React.createElement(Button, {
|
|
140
140
|
className: modules_f5ed85cf.remindLaterButton,
|
|
141
141
|
onClick: onRemindLater,
|
|
142
142
|
"data-test": "later"
|
|
143
|
-
}, (_translations$remindL = translations
|
|
143
|
+
}, (_translations$remindL = translations?.remindLater) !== null && _translations$remindL !== void 0 ? _translations$remindL : translate('remindLater'))), preview && /*#__PURE__*/React.createElement(Panel, null, /*#__PURE__*/React.createElement(Button, {
|
|
144
144
|
onClick: onClose,
|
|
145
145
|
autoFocus: true,
|
|
146
146
|
"data-test": "close"
|
|
147
|
-
}, (_translations$close = translations
|
|
147
|
+
}, (_translations$close = translations?.close) !== null && _translations$close !== void 0 ? _translations$close : translate('close'))));
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
150
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.149",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
},
|
|
76
76
|
"readmeFilename": "README.md",
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@babel/cli": "^7.22.
|
|
79
|
-
"@babel/eslint-parser": "^7.22.
|
|
78
|
+
"@babel/cli": "^7.22.6",
|
|
79
|
+
"@babel/eslint-parser": "^7.22.6",
|
|
80
80
|
"@csstools/stylelint-no-at-nest-rule": "^1.0.0",
|
|
81
81
|
"@jetbrains/eslint-config": "^5.4.1",
|
|
82
82
|
"@jetbrains/stylelint-config": "^4.0.1",
|
|
@@ -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.
|
|
88
|
+
"@storybook/addon-a11y": "7.0.26",
|
|
89
|
+
"@storybook/addon-docs": "7.0.25",
|
|
90
|
+
"@storybook/addon-essentials": "7.0.24",
|
|
91
91
|
"@storybook/addon-storyshots": "7.0.21",
|
|
92
|
-
"@storybook/addon-storyshots-puppeteer": "7.0.
|
|
93
|
-
"@storybook/addon-storysource": "7.0.
|
|
94
|
-
"@storybook/addons": "7.0.
|
|
92
|
+
"@storybook/addon-storyshots-puppeteer": "7.0.25",
|
|
93
|
+
"@storybook/addon-storysource": "7.0.24",
|
|
94
|
+
"@storybook/addons": "7.0.24",
|
|
95
95
|
"@storybook/html": "7.0.21",
|
|
96
|
-
"@storybook/html-webpack5": "^7.0.
|
|
96
|
+
"@storybook/html-webpack5": "^7.0.24",
|
|
97
97
|
"@storybook/preview-api": "7.0.21",
|
|
98
|
-
"@storybook/react": "7.0.
|
|
99
|
-
"@storybook/source-loader": "7.0.
|
|
100
|
-
"@storybook/theming": "7.0.
|
|
98
|
+
"@storybook/react": "7.0.25",
|
|
99
|
+
"@storybook/source-loader": "7.0.25",
|
|
100
|
+
"@storybook/theming": "7.0.24",
|
|
101
101
|
"@testing-library/react": "^14.0.0",
|
|
102
102
|
"@testing-library/user-event": "^14.4.3",
|
|
103
103
|
"@types/chai": "^4.3.5",
|
|
@@ -105,12 +105,12 @@
|
|
|
105
105
|
"@types/chai-dom": "0.0.10",
|
|
106
106
|
"@types/chai-enzyme": "^0.6.8",
|
|
107
107
|
"@types/enzyme": "^3.10.13",
|
|
108
|
-
"@types/react": "^18.2.
|
|
108
|
+
"@types/react": "^18.2.14",
|
|
109
109
|
"@types/react-dom": "^18.2.6",
|
|
110
110
|
"@types/sinon": "^10.0.15",
|
|
111
111
|
"@types/sinon-chai": "^3.2.9",
|
|
112
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
113
|
-
"@typescript-eslint/parser": "^5.
|
|
112
|
+
"@typescript-eslint/eslint-plugin": "^5.61.0",
|
|
113
|
+
"@typescript-eslint/parser": "^5.61.0",
|
|
114
114
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
|
|
115
115
|
"acorn": "^8.9.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.30001511",
|
|
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.0",
|
|
128
128
|
"cpy-cli": "^3.1.1",
|
|
129
129
|
"enzyme": "^3.11.0",
|
|
130
|
-
"eslint": "^8.
|
|
130
|
+
"eslint": "^8.44.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",
|
|
@@ -150,34 +150,34 @@
|
|
|
150
150
|
"karma-sourcemap-loader": "^0.4.0",
|
|
151
151
|
"karma-teamcity-reporter": "^2.0.0",
|
|
152
152
|
"karma-webpack": "^5.0.0",
|
|
153
|
-
"lint-staged": "^13.2.
|
|
153
|
+
"lint-staged": "^13.2.3",
|
|
154
154
|
"merge-options": "^3.0.4",
|
|
155
155
|
"mocha": "^10.2.0",
|
|
156
156
|
"pinst": "^3.0.0",
|
|
157
157
|
"prettier": "^2.8.8",
|
|
158
|
-
"puppeteer": "^20.7.
|
|
158
|
+
"puppeteer": "^20.7.4",
|
|
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.
|
|
165
|
+
"rollup": "^3.26.1",
|
|
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.0.25",
|
|
172
172
|
"storybook-addon-themes": "^6.1.0",
|
|
173
173
|
"storybook-zeplin": "^2.0.1",
|
|
174
174
|
"stylelint": "^15.9.0",
|
|
175
175
|
"svg-inline-loader": "^0.8.2",
|
|
176
176
|
"teamcity-service-messages": "^0.1.14",
|
|
177
177
|
"terser-webpack-plugin": "^5.3.9",
|
|
178
|
-
"typescript": "~5.1.
|
|
178
|
+
"typescript": "~5.1.6",
|
|
179
179
|
"wallaby-webpack": "^3.9.16",
|
|
180
|
-
"webpack": "^5.88.
|
|
180
|
+
"webpack": "^5.88.1",
|
|
181
181
|
"webpack-cli": "^5.1.4",
|
|
182
182
|
"xmlappend": "^1.0.4"
|
|
183
183
|
},
|
|
@@ -201,7 +201,7 @@
|
|
|
201
201
|
}
|
|
202
202
|
},
|
|
203
203
|
"dependencies": {
|
|
204
|
-
"@babel/core": "^7.22.
|
|
204
|
+
"@babel/core": "^7.22.6",
|
|
205
205
|
"@babel/preset-typescript": "^7.22.5",
|
|
206
206
|
"@jetbrains/babel-preset-jetbrains": "^2.3.2",
|
|
207
207
|
"@jetbrains/icons": "^3.21.0",
|
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
"extricate-loader": "^3.0.0",
|
|
233
233
|
"fastdom": "^1.0.11",
|
|
234
234
|
"file-loader": "^6.2.0",
|
|
235
|
-
"focus-trap": "^7.
|
|
235
|
+
"focus-trap": "^7.5.1",
|
|
236
236
|
"highlight.js": "^10.7.2",
|
|
237
237
|
"html-loader": "^4.2.0",
|
|
238
238
|
"interpolate-loader": "^2.0.1",
|
|
@@ -244,7 +244,7 @@
|
|
|
244
244
|
"postcss-font-family-system-ui": "^5.0.0",
|
|
245
245
|
"postcss-loader": "^7.3.3",
|
|
246
246
|
"postcss-modules-values-replace": "^4.1.0",
|
|
247
|
-
"postcss-preset-env": "^
|
|
247
|
+
"postcss-preset-env": "^9.0.0",
|
|
248
248
|
"prop-types": "^15.8.1",
|
|
249
249
|
"react-markdown": "^8.0.7",
|
|
250
250
|
"react-movable": "^3.0.4",
|