@jetbrains/ring-ui-built 6.0.9 → 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.
- package/components/global/typescript-utils.d.ts +1 -1
- package/components/http/http.d.ts +2 -2
- package/components/input/input.d.ts +0 -1
- package/components/old-browsers-message/white-list.js +2 -2
- package/components/select/select.d.ts +2 -2
- package/components/select/select.js +25 -31
- package/package.json +2 -2
@@ -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 {};
|
@@ -26,7 +26,6 @@ export interface InputBaseProps {
|
|
26
26
|
error?: ReactNode | null | undefined;
|
27
27
|
borderless?: boolean | null | undefined;
|
28
28
|
onClear?: ((e: React.MouseEvent<HTMLButtonElement>) => void) | null | undefined;
|
29
|
-
loading?: boolean | null | undefined;
|
30
29
|
icon?: string | ComponentType | null | undefined;
|
31
30
|
height?: ControlsHeight | undefined;
|
32
31
|
afterInput?: ReactNode;
|
@@ -11,11 +11,11 @@ var MAJOR_VERSION_INDEX = 0;
|
|
11
11
|
/**
|
12
12
|
* SUPPORTED_BROWSERS are defined by Babel plugin, see babel config
|
13
13
|
*/
|
14
|
-
if (!["and_chr
|
14
|
+
if (!["and_chr 122", "chrome 122", "chrome 121", "chrome 120", "chrome 119", "chrome 109", "edge 121", "firefox 122", "ios_saf 17.3", "ios_saf 17.2", "ios_saf 16.6-16.7", "op_mob 73", "samsung 23"]) {
|
15
15
|
// eslint-disable-next-line no-console
|
16
16
|
console.warn('Ring UI: no SUPPORTED_BROWSERS passed. Please check babel config.');
|
17
17
|
}
|
18
|
-
var SUPPORTED = ["and_chr
|
18
|
+
var SUPPORTED = ["and_chr 122", "chrome 122", "chrome 121", "chrome 120", "chrome 119", "chrome 109", "edge 121", "firefox 122", "ios_saf 17.3", "ios_saf 17.2", "ios_saf 16.6-16.7", "op_mob 73", "samsung 23"] || [];
|
19
19
|
var WHITE_LISTED_BROWSERS = ['chrome', 'firefox', 'safari', 'edge'];
|
20
20
|
var WHITE_LIST = SUPPORTED.reduce(function (acc, item) {
|
21
21
|
var _item$match;
|
@@ -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() {
|
@@ -1007,7 +1002,6 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
1007
1002
|
map: this.getShortcutsMap(),
|
1008
1003
|
scope: this.shortcutsScope
|
1009
1004
|
}), /*#__PURE__*/React.createElement(Input, _extends({}, ariaProps, {
|
1010
|
-
loading: this.props.loading,
|
1011
1005
|
height: this.props.height,
|
1012
1006
|
autoComplete: "off",
|
1013
1007
|
id: this.props.id,
|
@@ -1106,9 +1100,9 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
1106
1100
|
}, {
|
1107
1101
|
key: "render",
|
1108
1102
|
value: function render() {
|
1109
|
-
var
|
1103
|
+
var _this4 = this;
|
1110
1104
|
return /*#__PURE__*/React.createElement(ActiveItemContext.Provider, null, /*#__PURE__*/React.createElement(ActiveItemContext.ValueContext.Consumer, null, function (activeItemId) {
|
1111
|
-
return
|
1105
|
+
return _this4.renderSelect(activeItemId);
|
1112
1106
|
}));
|
1113
1107
|
}
|
1114
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",
|