@jetbrains/ring-ui-built 6.0.10 → 6.0.11
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.
@@ -1,2 +1,2 @@
|
|
1
1
|
export declare const isArray: (arg: unknown) => arg is readonly unknown[];
|
2
|
-
export declare const isTruthy: <T>(arg:
|
2
|
+
export declare const isTruthy: <T>(arg: T | false | '' | 0 | null | undefined) => arg is T;
|
@@ -53,9 +53,9 @@ export default class HTTP implements Partial<HTTPAuth> {
|
|
53
53
|
* Usage: const {promise, abort} = http.abortify(http.get<{id: string}>)('http://test.com');
|
54
54
|
* @param method
|
55
55
|
*/
|
56
|
-
abortify: <T>(method: Method<T>) => (url: string, params?: RequestParams<boolean> | undefined) => {
|
56
|
+
abortify: <T>(method: Method<T>) => (url: string, params?: RequestParams<boolean> | undefined) => ({
|
57
57
|
promise: Promise<T>;
|
58
58
|
abort: () => void;
|
59
|
-
};
|
59
|
+
});
|
60
60
|
}
|
61
61
|
export {};
|
@@ -224,8 +224,8 @@ export default class Select<T = unknown> extends Component<SelectProps<T>, Selec
|
|
224
224
|
_getResetOption(): SelectItem<T> | null;
|
225
225
|
_prependResetOption(shownData: SelectItem<T>[]): SelectItem<T>[];
|
226
226
|
private _renderPopup;
|
227
|
-
_showPopup()
|
228
|
-
_hidePopup(tryFocusAnchor?: boolean)
|
227
|
+
_showPopup: () => void;
|
228
|
+
_hidePopup: (tryFocusAnchor?: boolean) => void;
|
229
229
|
addHandler: () => void;
|
230
230
|
getToolbar(): React.JSX.Element | null;
|
231
231
|
getTopbar(): React.ReactNode;
|
@@ -382,6 +382,29 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
382
382
|
_defineProperty(_assertThisInitialized(_this), "popupRef", function (el) {
|
383
383
|
_this._popup = el;
|
384
384
|
});
|
385
|
+
_defineProperty(_assertThisInitialized(_this), "_showPopup", function () {
|
386
|
+
if (!_this.node) {
|
387
|
+
return;
|
388
|
+
}
|
389
|
+
var shownData = _this.getListItems(_this.filterValue());
|
390
|
+
_this.setState({
|
391
|
+
showPopup: true,
|
392
|
+
shownData
|
393
|
+
});
|
394
|
+
});
|
395
|
+
_defineProperty(_assertThisInitialized(_this), "_hidePopup", function (tryFocusAnchor) {
|
396
|
+
if (_this.node && _this.state.showPopup) {
|
397
|
+
_this.setState(function (prevState) {
|
398
|
+
return {
|
399
|
+
showPopup: false,
|
400
|
+
filterValue: _this.props.allowAny ? prevState.filterValue : ''
|
401
|
+
};
|
402
|
+
});
|
403
|
+
if (tryFocusAnchor) {
|
404
|
+
_this.focus();
|
405
|
+
}
|
406
|
+
}
|
407
|
+
});
|
385
408
|
_defineProperty(_assertThisInitialized(_this), "addHandler", function () {
|
386
409
|
var value = _this.filterValue();
|
387
410
|
_this._hidePopup();
|
@@ -759,34 +782,6 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
759
782
|
});
|
760
783
|
});
|
761
784
|
}
|
762
|
-
}, {
|
763
|
-
key: "_showPopup",
|
764
|
-
value: function _showPopup() {
|
765
|
-
if (!this.node) {
|
766
|
-
return;
|
767
|
-
}
|
768
|
-
var shownData = this.getListItems(this.filterValue());
|
769
|
-
this.setState({
|
770
|
-
showPopup: true,
|
771
|
-
shownData
|
772
|
-
});
|
773
|
-
}
|
774
|
-
}, {
|
775
|
-
key: "_hidePopup",
|
776
|
-
value: function _hidePopup(tryFocusAnchor) {
|
777
|
-
var _this4 = this;
|
778
|
-
if (this.node && this.state.showPopup) {
|
779
|
-
this.setState(function (prevState) {
|
780
|
-
return {
|
781
|
-
showPopup: false,
|
782
|
-
filterValue: _this4.props.allowAny ? prevState.filterValue : ''
|
783
|
-
};
|
784
|
-
});
|
785
|
-
if (tryFocusAnchor) {
|
786
|
-
this.focus();
|
787
|
-
}
|
788
|
-
}
|
789
|
-
}
|
790
785
|
}, {
|
791
786
|
key: "getToolbar",
|
792
787
|
value: function getToolbar() {
|
@@ -1105,9 +1100,9 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
1105
1100
|
}, {
|
1106
1101
|
key: "render",
|
1107
1102
|
value: function render() {
|
1108
|
-
var
|
1103
|
+
var _this4 = this;
|
1109
1104
|
return /*#__PURE__*/React.createElement(ActiveItemContext.Provider, null, /*#__PURE__*/React.createElement(ActiveItemContext.ValueContext.Consumer, null, function (activeItemId) {
|
1110
|
-
return
|
1105
|
+
return _this4.renderSelect(activeItemId);
|
1111
1106
|
}));
|
1112
1107
|
}
|
1113
1108
|
}], [{
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@jetbrains/ring-ui-built",
|
3
|
-
"version": "6.0.
|
3
|
+
"version": "6.0.11",
|
4
4
|
"description": "JetBrains UI library",
|
5
5
|
"author": "JetBrains",
|
6
6
|
"license": "Apache-2.0",
|
@@ -88,7 +88,7 @@
|
|
88
88
|
}
|
89
89
|
},
|
90
90
|
"dependencies": {
|
91
|
-
"@jetbrains/icons": "^4.0
|
91
|
+
"@jetbrains/icons": "^4.1.0",
|
92
92
|
"@jetbrains/logos": "^2.2.25",
|
93
93
|
"change-case": "^4.1.1",
|
94
94
|
"classnames": "^2.5.1",
|