@jetbrains/ring-ui 5.0.113 → 5.0.115
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/input/input.css +3 -1
- package/components/input-ng/input-ng.examples.js +3 -1
- package/components/query-assist/query-assist.css +4 -0
- package/components/query-assist/query-assist.js +2 -1
- package/components/select/select.css +4 -0
- package/components/select/select.js +2 -1
- package/components/user-card/card.js +1 -1
- package/dist/_helpers/card.js +2 -1
- package/dist/_helpers/query-assist__suggestions.js +1 -1
- package/dist/alert/alert.js +5 -5
- package/dist/alert-service/alert-service.js +1 -0
- package/dist/auth/iframe-flow.js +1 -1
- package/dist/auth/landing.js +2 -2
- package/dist/auth/token-validator.js +7 -0
- package/dist/data-list/data-list.js +1 -0
- package/dist/http/http.js +16 -5
- package/dist/list/list.js +3 -0
- package/dist/popup/popup.js +4 -0
- package/dist/query-assist/query-assist.js +4 -1
- package/dist/select/select.js +3 -2
- package/dist/select/select__popup.js +5 -0
- package/dist/style.css +1 -1
- package/dist/table/row-with-focus-sensor.js +1 -0
- package/dist/table/table.js +1 -0
- package/package.json +10 -10
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
.outerContainer {
|
|
7
7
|
--ring-input-icon-offset: calc(unit * 2.5);
|
|
8
8
|
--ring-input-padding-inline: unit;
|
|
9
|
+
--ring-input-background-color: var(--ring-content-background-color);
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
.borderless {
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
border: 1px solid var(--ring-borders-color);
|
|
45
46
|
border-radius: var(--ring-border-radius);
|
|
46
47
|
outline: none;
|
|
47
|
-
background:
|
|
48
|
+
background-color: var(--ring-input-background-color);
|
|
48
49
|
|
|
49
50
|
font: inherit;
|
|
50
51
|
|
|
@@ -94,6 +95,7 @@
|
|
|
94
95
|
|
|
95
96
|
.borderless .input {
|
|
96
97
|
border-color: transparent;
|
|
98
|
+
background-color: transparent;
|
|
97
99
|
}
|
|
98
100
|
|
|
99
101
|
.withIcon .input {
|
|
@@ -2,6 +2,8 @@ import angular from 'angular';
|
|
|
2
2
|
|
|
3
3
|
import angularDecorator, {APP_NAME} from '../../.storybook/angular-decorator';
|
|
4
4
|
|
|
5
|
+
import darkStyles from '../global/variables_dark.css';
|
|
6
|
+
|
|
5
7
|
import InputNG from './input-ng';
|
|
6
8
|
|
|
7
9
|
export default {
|
|
@@ -89,7 +91,7 @@ export const basic = () => {
|
|
|
89
91
|
multiline="true"
|
|
90
92
|
></rg-input>
|
|
91
93
|
|
|
92
|
-
<div class="dark">
|
|
94
|
+
<div class="dark ${darkStyles.dark}">
|
|
93
95
|
<rg-input
|
|
94
96
|
label="Input on dark background"
|
|
95
97
|
placeholder="Hint on dark background"
|
|
@@ -799,6 +799,7 @@ export default class QueryAssist extends Component {
|
|
|
799
799
|
});
|
|
800
800
|
const placeholderStyles = classNames({
|
|
801
801
|
[styles.placeholder]: true,
|
|
802
|
+
[styles.hugePlaceholder]: huge,
|
|
802
803
|
[styles.withoutGlass]: !glass || (!renderLoader && huge)
|
|
803
804
|
});
|
|
804
805
|
return (<ControlsHeightContext.Provider value={ControlsHeight.M}>
|
|
@@ -808,7 +809,7 @@ export default class QueryAssist extends Component {
|
|
|
808
809
|
{renderGlass && !huge && (<Icon glyph={searchIcon} className={styles.icon} title={this.props.translations.searchTitle} ref={this.glassRef} data-test="query-assist-search-icon"/>)}
|
|
809
810
|
|
|
810
811
|
{renderLoader && (<div className={classNames(styles.icon, styles.loader, {
|
|
811
|
-
[styles.loaderOnTheRight]: !glass
|
|
812
|
+
[styles.loaderOnTheRight]: !glass && !huge,
|
|
812
813
|
[styles.loaderActive]: renderLoader
|
|
813
814
|
})} ref={this.loaderRef}>
|
|
814
815
|
<LoaderInline />
|
|
@@ -818,7 +818,8 @@ export default class Select extends Component {
|
|
|
818
818
|
{shortcutsEnabled && (<Shortcuts map={this.getShortcutsMap()} scope={this.shortcutsScope}/>)}
|
|
819
819
|
<div className={styles.buttonContainer}>
|
|
820
820
|
<Button {...ariaProps} height={this.props.height} id={this.props.id} onClick={this._clickHandler} className={classNames(this.props.buttonClassName, styles.buttonValue, {
|
|
821
|
-
[styles.buttonValueOpen]: this.state.showPopup
|
|
821
|
+
[styles.buttonValueOpen]: this.state.showPopup,
|
|
822
|
+
[styles.buttonValueEmpty]: this._selectionIsEmpty()
|
|
822
823
|
})} disabled={this.props.disabled} style={style} data-test="ring-select__button ring-select__focus">
|
|
823
824
|
{this._getAvatar()}
|
|
824
825
|
{this._getPlaceholder()}
|
|
@@ -57,7 +57,7 @@ export default class UserCard extends PureComponent {
|
|
|
57
57
|
return (<div className={classes} {...restProps}>
|
|
58
58
|
<div className={styles.userInformationContainer}>
|
|
59
59
|
<div className={styles.userAvatar}>
|
|
60
|
-
<Avatar size={AvatarSize.Size56} url={user.avatarUrl}/>
|
|
60
|
+
<Avatar size={AvatarSize.Size56} url={user.avatarUrl} round/>
|
|
61
61
|
{!!avatarInfo && avatarInfo}
|
|
62
62
|
</div>
|
|
63
63
|
<div className={styles.userInformation}>
|
package/dist/_helpers/card.js
CHANGED
|
@@ -46,7 +46,8 @@ class UserCard extends PureComponent {
|
|
|
46
46
|
className: modules_a4196c17.userAvatar
|
|
47
47
|
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
48
48
|
size: Size.Size56,
|
|
49
|
-
url: user.avatarUrl
|
|
49
|
+
url: user.avatarUrl,
|
|
50
|
+
round: true
|
|
50
51
|
}), !!avatarInfo && avatarInfo), /*#__PURE__*/React.createElement("div", {
|
|
51
52
|
className: modules_a4196c17.userInformation
|
|
52
53
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import List from '../list/list.js';
|
|
3
3
|
|
|
4
|
-
var modules_da7ab055 = {"unit":"8px","button-shadow":"inset 0 0 0 1px","height":"var(--ring-button-height)","loaderWidth":"64px","overInputZIndex":"2","inputGap":"24px","light":"light_rui_d22e","heightS":"heightS_rui_d22e","heightM":"heightM_rui_d22e","heightL":"heightL_rui_d22e","button":"button_rui_d22e","active":"active_rui_d22e","withIcon":"withIcon_rui_d22e","icon":"icon_rui_d22e","primary":"primary_rui_d22e","loader":"loader_rui_d22e","loaderBackground":"loaderBackground_rui_d22e","danger":"danger_rui_d22e","text":"text_rui_d22e","content":"content_rui_d22e","text-loading":"text-loading_rui_d22e","inline":"inline_rui_d22e","withNormalIcon":"withNormalIcon_rui_d22e","withDangerIcon":"withDangerIcon_rui_d22e","progress":"progress_rui_d22e","delayed":"delayed_rui_d22e","short":"short_rui_d22e","dropdownIcon":"dropdownIcon_rui_d22e","queryAssist":"queryAssist_rui_d22e","error":"error_rui_d22e","queryAssistDisabled":"queryAssistDisabled_rui_d22e","huge":"huge_rui_d22e","actions":"actions_rui_d22e","input":"input_rui_d22e","letter-text":"letter-text_rui_d22e","letterDefault":"letterDefault_rui_d22e","letter-field-name":"letter-field-name_rui_d22e","letter-field-value":"letter-field-value_rui_d22e","letter-operator":"letter-operator_rui_d22e","letter-error":"letter-error_rui_d22e","highlight":"highlight_rui_d22e","service":"service_rui_d22e","placeholder":"placeholder_rui_d22e resetButton_rui_8bff","letter":"letter_rui_d22e","rightSearchButton":"rightSearchButton_rui_d22e","clear":"clear_rui_d22e","withoutGlass":"withoutGlass_rui_d22e","loaderActive":"loaderActive_rui_d22e","loaderOnTheRight":"loaderOnTheRight_rui_d22e","inputRevertOrder":"inputRevertOrder_rui_d22e"};
|
|
4
|
+
var modules_da7ab055 = {"unit":"8px","button-shadow":"inset 0 0 0 1px","height":"var(--ring-button-height)","loaderWidth":"64px","overInputZIndex":"2","inputGap":"24px","light":"light_rui_d22e","heightS":"heightS_rui_d22e","heightM":"heightM_rui_d22e","heightL":"heightL_rui_d22e","button":"button_rui_d22e","active":"active_rui_d22e","withIcon":"withIcon_rui_d22e","icon":"icon_rui_d22e","primary":"primary_rui_d22e","loader":"loader_rui_d22e","loaderBackground":"loaderBackground_rui_d22e","danger":"danger_rui_d22e","text":"text_rui_d22e","content":"content_rui_d22e","text-loading":"text-loading_rui_d22e","inline":"inline_rui_d22e","withNormalIcon":"withNormalIcon_rui_d22e","withDangerIcon":"withDangerIcon_rui_d22e","progress":"progress_rui_d22e","delayed":"delayed_rui_d22e","short":"short_rui_d22e","dropdownIcon":"dropdownIcon_rui_d22e","queryAssist":"queryAssist_rui_d22e","error":"error_rui_d22e","queryAssistDisabled":"queryAssistDisabled_rui_d22e","huge":"huge_rui_d22e","actions":"actions_rui_d22e","input":"input_rui_d22e","letter-text":"letter-text_rui_d22e","letterDefault":"letterDefault_rui_d22e","letter-field-name":"letter-field-name_rui_d22e","letter-field-value":"letter-field-value_rui_d22e","letter-operator":"letter-operator_rui_d22e","letter-error":"letter-error_rui_d22e","highlight":"highlight_rui_d22e","service":"service_rui_d22e","placeholder":"placeholder_rui_d22e resetButton_rui_8bff","hugePlaceholder":"hugePlaceholder_rui_d22e","letter":"letter_rui_d22e","rightSearchButton":"rightSearchButton_rui_d22e","clear":"clear_rui_d22e","withoutGlass":"withoutGlass_rui_d22e","loaderActive":"loaderActive_rui_d22e","loaderOnTheRight":"loaderOnTheRight_rui_d22e","inputRevertOrder":"inputRevertOrder_rui_d22e"};
|
|
5
5
|
|
|
6
6
|
const ICON_ID_LENGTH = 44;
|
|
7
7
|
class QueryAssistSuggestions {
|
package/dist/alert/alert.js
CHANGED
|
@@ -100,6 +100,10 @@ class Alert extends PureComponent {
|
|
|
100
100
|
height
|
|
101
101
|
});
|
|
102
102
|
});
|
|
103
|
+
/**
|
|
104
|
+
* @param {SyntheticEvent} evt
|
|
105
|
+
* @private
|
|
106
|
+
*/
|
|
103
107
|
_defineProperty(this, "_handleCaptionsLinksClick", evt => {
|
|
104
108
|
if (evt.target instanceof Element && evt.target.matches('a')) {
|
|
105
109
|
this.closeRequest(evt);
|
|
@@ -128,11 +132,6 @@ class Alert extends PureComponent {
|
|
|
128
132
|
this.props.onClose();
|
|
129
133
|
}, ANIMATION_TIME);
|
|
130
134
|
}
|
|
131
|
-
/**
|
|
132
|
-
* @param {SyntheticEvent} evt
|
|
133
|
-
* @private
|
|
134
|
-
*/
|
|
135
|
-
|
|
136
135
|
/**
|
|
137
136
|
* @private
|
|
138
137
|
*/
|
|
@@ -229,6 +228,7 @@ _defineProperty(Alert, "propTypes", {
|
|
|
229
228
|
closeButtonClassName: PropTypes.string,
|
|
230
229
|
'data-test': PropTypes.string
|
|
231
230
|
});
|
|
231
|
+
/** @override */
|
|
232
232
|
_defineProperty(Alert, "defaultProps", {
|
|
233
233
|
theme: Theme.DARK,
|
|
234
234
|
closeable: true,
|
|
@@ -46,6 +46,7 @@ import '../popup/popup.consts.js';
|
|
|
46
46
|
class AlertService {
|
|
47
47
|
constructor() {
|
|
48
48
|
_defineProperty(this, "defaultTimeout", 0);
|
|
49
|
+
// This alerts are stored in inverse order (last shown is first in array)
|
|
49
50
|
_defineProperty(this, "showingAlerts", []);
|
|
50
51
|
_defineProperty(this, "containerElement", document.createElement('div'));
|
|
51
52
|
}
|
package/dist/auth/iframe-flow.js
CHANGED
|
@@ -47,9 +47,9 @@ import '../loader/loader.js';
|
|
|
47
47
|
import '../loader/loader__core.js';
|
|
48
48
|
import '../_helpers/loader-screen.js';
|
|
49
49
|
import './background-flow.js';
|
|
50
|
+
import '../_helpers/link.js';
|
|
50
51
|
import 'es6-error';
|
|
51
52
|
import '../global/url.js';
|
|
52
|
-
import '../_helpers/link.js';
|
|
53
53
|
|
|
54
54
|
class IFrameFlow {
|
|
55
55
|
constructor(requestBuilder, storage, translations) {
|
package/dist/auth/landing.js
CHANGED
|
@@ -54,12 +54,12 @@ import '../link/link.js';
|
|
|
54
54
|
import '../_helpers/link.js';
|
|
55
55
|
import '../group/group.js';
|
|
56
56
|
import '../_helpers/group.js';
|
|
57
|
-
import '../global/listeners.js';
|
|
58
|
-
import '../global/promise-with-timeout.js';
|
|
59
57
|
import '../storage/storage.js';
|
|
60
58
|
import '../storage/storage__local.js';
|
|
61
59
|
import '../storage/storage__fallback.js';
|
|
62
60
|
import 'deep-equal';
|
|
61
|
+
import '../global/listeners.js';
|
|
62
|
+
import '../global/promise-with-timeout.js';
|
|
63
63
|
import './request-builder.js';
|
|
64
64
|
import 'simply-uuid';
|
|
65
65
|
import './background-flow.js';
|
|
@@ -153,6 +153,13 @@ class TokenValidator {
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
_defineProperty(TokenValidator, "DEFAULT_REFRESH_BEFORE", 10 * 60);
|
|
156
|
+
// 20 min in s
|
|
157
|
+
/**
|
|
158
|
+
* Error class for auth token validation
|
|
159
|
+
*
|
|
160
|
+
* @param {string} message Error message
|
|
161
|
+
* @param {Error=} cause Error that caused this error
|
|
162
|
+
*/
|
|
156
163
|
_defineProperty(TokenValidator, "TokenValidationError", TokenValidationError);
|
|
157
164
|
|
|
158
165
|
export { TokenValidationError, TokenValidator as default };
|
|
@@ -192,6 +192,7 @@ const getContainer = () => disableHoverHOC(selectionShortcutsHOC(focusSensorHOC(
|
|
|
192
192
|
class DataListContainer extends Component {
|
|
193
193
|
constructor() {
|
|
194
194
|
super(...arguments);
|
|
195
|
+
// https://stackoverflow.com/a/53882322/6304152
|
|
195
196
|
_defineProperty(this, "DataList", getContainer());
|
|
196
197
|
}
|
|
197
198
|
render() {
|
package/dist/http/http.js
CHANGED
|
@@ -49,6 +49,8 @@ class HTTP {
|
|
|
49
49
|
_defineProperty(this, "setBaseUrl", baseUrl => {
|
|
50
50
|
this.baseUrl = baseUrl;
|
|
51
51
|
});
|
|
52
|
+
// TODO: Replace any to never/unknown in next release and remove eslint-disable
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
52
54
|
_defineProperty(this, "fetch", async function (url) {
|
|
53
55
|
let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
54
56
|
const {
|
|
@@ -63,6 +65,8 @@ class HTTP {
|
|
|
63
65
|
});
|
|
64
66
|
return _this._processResponse(response);
|
|
65
67
|
});
|
|
68
|
+
// TODO: Replace any to never/unknown in next release and remove eslint-disable
|
|
69
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
66
70
|
_defineProperty(this, "request", async (url, params) => {
|
|
67
71
|
let token = await this.requestToken?.();
|
|
68
72
|
let response = await this._performRequest(url, token, params);
|
|
@@ -83,22 +87,34 @@ class HTTP {
|
|
|
83
87
|
}
|
|
84
88
|
});
|
|
85
89
|
_defineProperty(this, "getMetaForResponse", response => this._requestsMeta.get(response));
|
|
90
|
+
// TODO: Replace any to never/unknown in next release and remove eslint-disable
|
|
91
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
86
92
|
_defineProperty(this, "get", (url, params) => this.request(url, {
|
|
87
93
|
...params,
|
|
88
94
|
method: 'GET'
|
|
89
95
|
}));
|
|
96
|
+
// TODO: Replace any to never/unknown in next release and remove eslint-disable
|
|
97
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
90
98
|
_defineProperty(this, "post", (url, params) => this.request(url, {
|
|
91
99
|
...params,
|
|
92
100
|
method: 'POST'
|
|
93
101
|
}));
|
|
102
|
+
// TODO: Replace any to never/unknown in next release and remove eslint-disable
|
|
103
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
94
104
|
_defineProperty(this, "delete", (url, params) => this.request(url, {
|
|
95
105
|
...params,
|
|
96
106
|
method: 'DELETE'
|
|
97
107
|
}));
|
|
108
|
+
// TODO: Replace any to never/unknown in next release and remove eslint-disable
|
|
109
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
98
110
|
_defineProperty(this, "put", (url, params) => this.request(url, {
|
|
99
111
|
...params,
|
|
100
112
|
method: 'PUT'
|
|
101
113
|
}));
|
|
114
|
+
/**
|
|
115
|
+
* Usage: const {promise, abort} = http.abortify(http.get<{id: string}>)('http://test.com');
|
|
116
|
+
* @param method
|
|
117
|
+
*/
|
|
102
118
|
_defineProperty(this, "abortify", method => function () {
|
|
103
119
|
for (var _len = arguments.length, _ref = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
104
120
|
_ref[_key] = arguments[_key];
|
|
@@ -217,15 +233,10 @@ class HTTP {
|
|
|
217
233
|
static _isErrorStatus(status) {
|
|
218
234
|
return status < STATUS_OK_IF_MORE_THAN || status >= STATUS_BAD_IF_MORE_THAN;
|
|
219
235
|
}
|
|
220
|
-
// TODO: Replace any to never/unknown in next release and remove eslint-disable
|
|
221
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
222
|
-
|
|
223
236
|
async authorizedFetch() {
|
|
224
237
|
const response = await this._performRequest(...arguments);
|
|
225
238
|
return this._processResponse(response);
|
|
226
239
|
}
|
|
227
|
-
// TODO: Replace any to never/unknown in next release and remove eslint-disable
|
|
228
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
229
240
|
}
|
|
230
241
|
|
|
231
242
|
export { CODE, HTTPError, HTTP as default, defaultFetchConfig };
|
package/dist/list/list.js
CHANGED
|
@@ -110,7 +110,10 @@ class List extends Component {
|
|
|
110
110
|
}
|
|
111
111
|
})));
|
|
112
112
|
_defineProperty(this, "_activatableItems", false);
|
|
113
|
+
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
113
114
|
_defineProperty(this, "_bufferSize", 10);
|
|
115
|
+
// keep X items above and below of the visible area
|
|
116
|
+
// reuse size cache for similar items
|
|
114
117
|
_defineProperty(this, "sizeCacheKey", index => {
|
|
115
118
|
if (index === 0 || index === this.props.data.length + 1) {
|
|
116
119
|
return Type.MARGIN;
|
package/dist/popup/popup.js
CHANGED
|
@@ -103,6 +103,10 @@ class Popup extends PureComponent {
|
|
|
103
103
|
this.props.onEscPress(evt);
|
|
104
104
|
this._onCloseAttempt(evt, true);
|
|
105
105
|
});
|
|
106
|
+
/**
|
|
107
|
+
* @param {jQuery.Event} evt
|
|
108
|
+
* @private
|
|
109
|
+
*/
|
|
106
110
|
_defineProperty(this, "_onDocumentClick", evt => {
|
|
107
111
|
if (this.container && evt.target instanceof Node && this.container.contains(evt.target) || !this._listenersEnabled || this.props.dontCloseOnAnchorClick && evt.target instanceof Node && this._getAnchor()?.contains(evt.target)) {
|
|
108
112
|
return;
|
|
@@ -150,6 +150,7 @@ class QueryAssist extends Component {
|
|
|
150
150
|
_defineProperty(this, "immediateState", void 0);
|
|
151
151
|
_defineProperty(this, "requestData", void 0);
|
|
152
152
|
_defineProperty(this, "ngModelStateField", ngModelStateField);
|
|
153
|
+
// An array of {query: string; caret: number}[]
|
|
153
154
|
_defineProperty(this, "historyStack", []);
|
|
154
155
|
_defineProperty(this, "mouseIsDownOnPopup", void 0);
|
|
155
156
|
_defineProperty(this, "handleFocusChange", e => {
|
|
@@ -248,6 +249,7 @@ class QueryAssist extends Component {
|
|
|
248
249
|
this.requestData?.();
|
|
249
250
|
}
|
|
250
251
|
});
|
|
252
|
+
// It's necessary to prevent new element creation before any other hooks
|
|
251
253
|
_defineProperty(this, "handleEnter", e => {
|
|
252
254
|
if (e.key === 'Enter') {
|
|
253
255
|
preventDefault(e);
|
|
@@ -798,6 +800,7 @@ class QueryAssist extends Component {
|
|
|
798
800
|
});
|
|
799
801
|
const placeholderStyles = classNames({
|
|
800
802
|
[modules_da7ab055.placeholder]: true,
|
|
803
|
+
[modules_da7ab055.hugePlaceholder]: huge,
|
|
801
804
|
[modules_da7ab055.withoutGlass]: !glass || !renderLoader && huge
|
|
802
805
|
});
|
|
803
806
|
return /*#__PURE__*/React.createElement(ControlsHeightContext.Provider, {
|
|
@@ -818,7 +821,7 @@ class QueryAssist extends Component {
|
|
|
818
821
|
"data-test": "query-assist-search-icon"
|
|
819
822
|
}), renderLoader && /*#__PURE__*/React.createElement("div", {
|
|
820
823
|
className: classNames(modules_da7ab055.icon, modules_da7ab055.loader, {
|
|
821
|
-
[modules_da7ab055.loaderOnTheRight]: !glass
|
|
824
|
+
[modules_da7ab055.loaderOnTheRight]: !glass && !huge,
|
|
822
825
|
[modules_da7ab055.loaderActive]: renderLoader
|
|
823
826
|
}),
|
|
824
827
|
ref: this.loaderRef
|
package/dist/select/select.js
CHANGED
|
@@ -79,7 +79,7 @@ import '../caret/caret.js';
|
|
|
79
79
|
import '../text/text.js';
|
|
80
80
|
import '../_helpers/select__filter.js';
|
|
81
81
|
|
|
82
|
-
var modules_9d0de074 = {"unit":"8px","button-shadow":"inset 0 0 0 1px","select":"select_rui_11de","value":"value_rui_11de ellipsis_rui_8bff font_rui_8bff","icons":"icons_rui_11de","light":"light_rui_11de","toolbar":"toolbar_rui_11de","button":"button_rui_11de","buttonSpaced":"buttonSpaced_rui_11de","inputMode":"inputMode_rui_11de","selectedIcon":"selectedIcon_rui_11de resetButton_rui_8bff","clearIcon":"clearIcon_rui_11de","sizeS":"sizeS_rui_11de","sizeM":"sizeM_rui_11de","sizeL":"sizeL_rui_11de","sizeFULL":"sizeFULL_rui_11de","sizeAUTO":"sizeAUTO_rui_11de","buttonMode":"buttonMode_rui_11de","open":"open_rui_11de","buttonContainer":"buttonContainer_rui_11de","buttonValue":"buttonValue_rui_11de ellipsis_rui_8bff","buttonValueOpen":"buttonValueOpen_rui_11de","heightS":"heightS_rui_11de","label":"label_rui_11de","disabled":"disabled_rui_11de","avatar":"avatar_rui_11de","popup":"popup_rui_11de","chevron":"chevron_rui_11de","chevronIcon":"chevronIcon_rui_11de"};
|
|
82
|
+
var modules_9d0de074 = {"unit":"8px","button-shadow":"inset 0 0 0 1px","select":"select_rui_11de","value":"value_rui_11de ellipsis_rui_8bff font_rui_8bff","icons":"icons_rui_11de","light":"light_rui_11de","toolbar":"toolbar_rui_11de","button":"button_rui_11de","buttonSpaced":"buttonSpaced_rui_11de","inputMode":"inputMode_rui_11de","selectedIcon":"selectedIcon_rui_11de resetButton_rui_8bff","clearIcon":"clearIcon_rui_11de","sizeS":"sizeS_rui_11de","sizeM":"sizeM_rui_11de","sizeL":"sizeL_rui_11de","sizeFULL":"sizeFULL_rui_11de","sizeAUTO":"sizeAUTO_rui_11de","buttonMode":"buttonMode_rui_11de","open":"open_rui_11de","buttonContainer":"buttonContainer_rui_11de","buttonValue":"buttonValue_rui_11de ellipsis_rui_8bff","buttonValueOpen":"buttonValueOpen_rui_11de","buttonValueEmpty":"buttonValueEmpty_rui_11de","heightS":"heightS_rui_11de","label":"label_rui_11de","disabled":"disabled_rui_11de","avatar":"avatar_rui_11de","popup":"popup_rui_11de","chevron":"chevron_rui_11de","chevronIcon":"chevronIcon_rui_11de"};
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* @name Select
|
|
@@ -995,7 +995,8 @@ class Select extends Component {
|
|
|
995
995
|
id: this.props.id,
|
|
996
996
|
onClick: this._clickHandler,
|
|
997
997
|
className: classNames(this.props.buttonClassName, modules_9d0de074.buttonValue, {
|
|
998
|
-
[modules_9d0de074.buttonValueOpen]: this.state.showPopup
|
|
998
|
+
[modules_9d0de074.buttonValueOpen]: this.state.showPopup,
|
|
999
|
+
[modules_9d0de074.buttonValueEmpty]: this._selectionIsEmpty()
|
|
999
1000
|
}),
|
|
1000
1001
|
disabled: this.props.disabled,
|
|
1001
1002
|
style: style,
|
|
@@ -85,6 +85,7 @@ class SelectPopup extends PureComponent {
|
|
|
85
85
|
tagsActiveIndex: null
|
|
86
86
|
});
|
|
87
87
|
_defineProperty(this, "isClickingPopup", false);
|
|
88
|
+
// This flag is set to true while an item in the popup is being clicked
|
|
88
89
|
_defineProperty(this, "filter", void 0);
|
|
89
90
|
_defineProperty(this, "caret", void 0);
|
|
90
91
|
_defineProperty(this, "onFilterFocus", () => {
|
|
@@ -150,6 +151,10 @@ class SelectPopup extends PureComponent {
|
|
|
150
151
|
info: true
|
|
151
152
|
}, `${this.props.selected.length} selected`));
|
|
152
153
|
});
|
|
154
|
+
// Cache the value because this method is called
|
|
155
|
+
// inside `render` function which can be called N times
|
|
156
|
+
// and should be fast as possible.
|
|
157
|
+
// Cache invalidates each time hidden or userDefinedMaxHeight changes
|
|
153
158
|
_defineProperty(this, "_adjustListMaxHeight", memoizeOne((hidden, userDefinedMaxHeight, ringPopupTarget) => {
|
|
154
159
|
if (hidden) {
|
|
155
160
|
return userDefinedMaxHeight;
|