@jetbrains/ring-ui-built 7.0.50 → 7.0.51
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/_helpers/dialog__body-scroll-preventer.js +5 -5
- package/components/_helpers/icon__svg.js +0 -1
- package/components/_helpers/theme.js +3 -3
- package/components/alert/alert.js +0 -7
- package/components/alert-service/alert-service.js +4 -11
- package/components/auth/auth.js +0 -10
- package/components/auth/auth__core.js +0 -10
- package/components/auth/background-flow.js +0 -3
- package/components/auth/down-notification.js +0 -8
- package/components/auth/iframe-flow.js +0 -8
- package/components/auth/request-builder.js +0 -3
- package/components/auth/response-parser.js +0 -2
- package/components/auth/storage.js +0 -8
- package/components/auth/token-validator.js +0 -4
- package/components/auth/window-flow.js +0 -3
- package/components/auth-dialog/auth-dialog.js +0 -8
- package/components/auth-dialog-service/auth-dialog-service.js +0 -8
- package/components/avatar/avatar.figma.js +0 -1
- package/components/avatar/avatar.js +0 -6
- package/components/avatar/fallback-avatar.js +0 -2
- package/components/avatar-stack/avatar-stack.figma.js +0 -2
- package/components/avatar-stack/avatar-stack.js +0 -8
- package/components/breadcrumbs/breadcrumbs.js +0 -1
- package/components/button/button.js +0 -2
- package/components/button-group/button-group.js +0 -2
- package/components/caret/caret.js +0 -3
- package/components/checkbox/checkbox.js +0 -2
- package/components/clipboard/clipboard.js +2 -10
- package/components/code/code.js +0 -4
- package/components/collapse/collapse-content.js +0 -2
- package/components/confirm/confirm.js +0 -7
- package/components/confirm-service/confirm-service.js +0 -8
- package/components/content-layout/content-layout.js +0 -1
- package/components/data-list/data-list.js +0 -7
- package/components/data-list/data-list.mock.js +0 -2
- package/components/data-list/item.js +0 -3
- package/components/data-list/selection.js +0 -1
- package/components/data-list/title.js +0 -3
- package/components/date-picker/date-input.js +0 -3
- package/components/date-picker/date-picker.js +0 -7
- package/components/date-picker/date-popup.js +0 -4
- package/components/date-picker/day.js +0 -1
- package/components/date-picker/month.js +0 -1
- package/components/date-picker/months.js +0 -1
- package/components/date-picker/weekdays.js +0 -1
- package/components/dialog/dialog.js +0 -7
- package/components/dropdown/anchor.js +0 -2
- package/components/dropdown/dropdown.js +0 -2
- package/components/dropdown-menu/dropdown-menu.js +2 -10
- package/components/editable-heading/editable-heading.js +0 -7
- package/components/error-bubble/error-bubble.js +0 -5
- package/components/error-message/error-message.js +0 -2
- package/components/global/dom.js +0 -2
- package/components/global/fuzzy-highlight.js +1 -1
- package/components/global/get-uid.js +0 -2
- package/components/global/listeners.js +0 -1
- package/components/global/memoize.js +0 -1
- package/components/global/normalize-indent.js +0 -2
- package/components/global/promise-with-timeout.js +0 -2
- package/components/global/rerender-hoc.js +2 -2
- package/components/global/theme.js +0 -5
- package/components/global/url.js +0 -1
- package/components/header/header-icon.js +0 -2
- package/components/header/header.js +0 -11
- package/components/header/logo.js +0 -2
- package/components/header/profile.js +0 -8
- package/components/header/services.js +0 -7
- package/components/header/smart-profile.js +0 -11
- package/components/header/smart-services.js +0 -8
- package/components/http/http.js +0 -3
- package/components/http/http.mock.js +0 -4
- package/components/hub-source/hub-source.js +0 -2
- package/components/hub-source/hub-source__user.js +0 -3
- package/components/hub-source/hub-source__users-groups.js +0 -2
- package/components/icon/icon.js +0 -2
- package/components/icon/icon__svg.js +0 -2
- package/components/icon/index.js +0 -2
- package/components/input/input.js +0 -3
- package/components/list/list.js +0 -7
- package/components/list/list__item.js +0 -7
- package/components/list/list__users-groups-source.js +0 -8
- package/components/loader/loader.js +0 -2
- package/components/loader/loader__core.js +0 -2
- package/components/loader-screen/loader-screen.js +0 -2
- package/components/login-dialog/login-dialog.js +0 -8
- package/components/login-dialog/service.js +0 -8
- package/components/message/message.js +3 -10
- package/components/old-browsers-message/old-browsers-message.js +0 -2
- package/components/old-browsers-message/old-browsers-message__stop.js +0 -2
- package/components/old-browsers-message/white-list.js +2 -4
- package/components/pager/pager.js +0 -8
- package/components/panel/panel.js +1 -1
- package/components/permissions/permissions.js +0 -1
- package/components/popup/popup.js +0 -5
- package/components/popup/position.js +0 -3
- package/components/popup-menu/popup-menu.js +0 -8
- package/components/query-assist/query-assist.js +0 -9
- package/components/query-assist/query-assist__suggestions.js +0 -7
- package/components/radio/radio.js +0 -1
- package/components/radio/radio__item.js +0 -1
- package/components/select/select.d.ts +2 -2
- package/components/select/select.js +41 -55
- package/components/select/select__filter.js +0 -7
- package/components/select/select__popup.js +0 -7
- package/components/shortcuts/core.js +0 -3
- package/components/shortcuts/shortcut-title.js +0 -1
- package/components/shortcuts/shortcuts-hoc.js +0 -4
- package/components/shortcuts/shortcuts.js +0 -3
- package/components/slider/slider.js +0 -5
- package/components/slider/slider.utils.js +0 -2
- package/components/storage/storage.js +0 -8
- package/components/storage/storage__local.js +0 -8
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +0 -2
- package/components/table/header-cell.js +0 -2
- package/components/table/header.js +0 -3
- package/components/table/multitable.js +0 -1
- package/components/table/row-with-focus-sensor.js +0 -7
- package/components/table/row.js +0 -7
- package/components/table/simple-table.js +0 -7
- package/components/table/smart-table.js +0 -7
- package/components/table/table.js +0 -7
- package/components/tabs/collapsible-more.js +0 -8
- package/components/tabs/collapsible-tabs.js +0 -8
- package/components/tabs/dumb-tabs.js +0 -9
- package/components/tabs/smart-tabs.js +0 -9
- package/components/tabs/tabs.js +0 -9
- package/components/tag/tag.js +0 -2
- package/components/tags-input/tags-input.js +0 -8
- package/components/tags-list/tags-list.js +0 -2
- package/components/tooltip/tooltip.js +0 -5
- package/components/upload/upload.js +0 -2
- package/components/user-agreement/service.js +0 -8
- package/components/user-agreement/user-agreement.js +2 -9
- package/components/user-card/card.js +0 -8
- package/components/user-card/smart-user-card-tooltip.js +0 -8
- package/components/user-card/tooltip.js +0 -8
- package/components/user-card/user-card.js +0 -8
- package/package.json +2 -2
@@ -23,15 +23,10 @@ import '../icon/icon__constants.js';
|
|
23
23
|
import '../_helpers/icon__svg.js';
|
24
24
|
import 'core-js/modules/es.regexp.exec.js';
|
25
25
|
import 'core-js/modules/es.string.replace.js';
|
26
|
-
import 'core-js/modules/es.string.starts-with.js';
|
27
|
-
import 'core-js/modules/es.weak-map.js';
|
28
|
-
import 'core-js/modules/es.promise.js';
|
29
|
-
import 'core-js/modules/es.string.split.js';
|
30
26
|
import '../global/data-tests.js';
|
31
27
|
import '../control-label/control-label.js';
|
32
28
|
import '../control-help/control-help.js';
|
33
29
|
import '../_helpers/caption.js';
|
34
|
-
import 'core-js/modules/es.object.assign.js';
|
35
30
|
import 'core-js/modules/es.string.trim.js';
|
36
31
|
import '@jetbrains/icons/close-12px';
|
37
32
|
import 'dequal';
|
@@ -39,15 +34,12 @@ import '../dropdown/dropdown.js';
|
|
39
34
|
import '../global/typescript-utils.js';
|
40
35
|
import '../_helpers/anchor.js';
|
41
36
|
import '../avatar/avatar.js';
|
42
|
-
import 'core-js/modules/es.string.includes.js';
|
43
37
|
import '../global/url.js';
|
44
|
-
import 'core-js/modules/es.string.match.js';
|
45
38
|
import '../global/dom.js';
|
46
39
|
import '../_helpers/avatar-info.js';
|
47
40
|
import '../avatar/avatar-size.js';
|
48
41
|
import '../avatar/fallback-avatar.js';
|
49
42
|
import '../global/get-uid.js';
|
50
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
51
43
|
import '../popup/popup.js';
|
52
44
|
import 'react-dom';
|
53
45
|
import '../global/schedule-raf.js';
|
@@ -3,7 +3,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { PureComponent } from 'react';
|
4
4
|
import classNames from 'classnames';
|
5
5
|
|
6
|
-
var styles = {"panel":"ring-panel-panel
|
6
|
+
var styles = {"panel":"ring-panel-panel"};
|
7
7
|
|
8
8
|
const _excluded = ["className", "children"];
|
9
9
|
/**
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { _ as _defineProperty, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.regexp.exec.js';
|
3
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
4
3
|
import 'core-js/modules/es.string.replace.js';
|
5
4
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
6
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
@@ -16,11 +15,7 @@ import TabTrap from '../tab-trap/tab-trap.js';
|
|
16
15
|
import position from './position.js';
|
17
16
|
import { DEFAULT_DIRECTIONS, MaxHeight, MinWidth, Dimension, Directions, Display } from './popup.consts.js';
|
18
17
|
import { PopupTargetContext, PopupTarget } from './popup.target.js';
|
19
|
-
import 'core-js/modules/es.object.assign.js';
|
20
|
-
import 'core-js/modules/es.string.split.js';
|
21
18
|
import '../shortcuts/core.js';
|
22
|
-
import 'core-js/modules/es.string.includes.js';
|
23
|
-
import 'core-js/modules/es.string.match.js';
|
24
19
|
import 'combokeys';
|
25
20
|
import '../global/sniffer.js';
|
26
21
|
import 'sniffr';
|
@@ -1,11 +1,8 @@
|
|
1
1
|
import { b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.sort.js';
|
3
|
-
import 'core-js/modules/es.string.includes.js';
|
4
3
|
import { getRect, isMounted, getDocumentScrollLeft, getDocumentScrollTop, getWindowHeight } from '../global/dom.js';
|
5
4
|
import { MaxHeight, Dimension, MinWidth, Directions } from './popup.consts.js';
|
6
|
-
import 'core-js/modules/es.object.assign.js';
|
7
5
|
import 'core-js/modules/es.regexp.exec.js';
|
8
|
-
import 'core-js/modules/es.string.split.js';
|
9
6
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
10
7
|
|
11
8
|
function getScrollingCoordinates(container) {
|
@@ -1,11 +1,9 @@
|
|
1
1
|
import { _ as _defineProperty, b as _objectSpread2, a as _objectWithoutProperties } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
-
import 'core-js/modules/es.parse-float.js';
|
3
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
4
3
|
import { jsx } from 'react/jsx-runtime';
|
5
4
|
import Popup from '../popup/popup.js';
|
6
5
|
import List from '../list/list.js';
|
7
6
|
import 'core-js/modules/es.regexp.exec.js';
|
8
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
9
7
|
import 'core-js/modules/es.string.replace.js';
|
10
8
|
import 'react';
|
11
9
|
import 'react-dom';
|
@@ -13,12 +11,8 @@ import 'classnames';
|
|
13
11
|
import '../global/get-uid.js';
|
14
12
|
import '../global/schedule-raf.js';
|
15
13
|
import '../global/dom.js';
|
16
|
-
import 'core-js/modules/es.object.assign.js';
|
17
|
-
import 'core-js/modules/es.string.split.js';
|
18
14
|
import '../shortcuts/shortcuts.js';
|
19
15
|
import '../shortcuts/core.js';
|
20
|
-
import 'core-js/modules/es.string.includes.js';
|
21
|
-
import 'core-js/modules/es.string.match.js';
|
22
16
|
import 'combokeys';
|
23
17
|
import '../global/sniffer.js';
|
24
18
|
import 'sniffr';
|
@@ -37,7 +31,6 @@ import 'react-virtualized/dist/es/CellMeasurer';
|
|
37
31
|
import 'util-deprecate';
|
38
32
|
import 'memoize-one';
|
39
33
|
import '../global/memoize.js';
|
40
|
-
import 'core-js/modules/es.weak-map.js';
|
41
34
|
import '../global/create-stateful-context.js';
|
42
35
|
import '../list/list__item.js';
|
43
36
|
import '../avatar/avatar.js';
|
@@ -51,7 +44,6 @@ import '@jetbrains/icons/remove-12px';
|
|
51
44
|
import '../icon/icon.js';
|
52
45
|
import '../icon/icon__constants.js';
|
53
46
|
import '../_helpers/icon__svg.js';
|
54
|
-
import 'core-js/modules/es.string.starts-with.js';
|
55
47
|
import '../global/composeRefs.js';
|
56
48
|
import '../control-help/control-help.js';
|
57
49
|
import '../link/link.js';
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import { _ as _defineProperty, a as _objectWithoutProperties } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.symbol.description.js';
|
3
|
-
import 'core-js/modules/es.object.assign.js';
|
4
|
-
import 'core-js/modules/es.promise.js';
|
5
3
|
import 'core-js/modules/es.regexp.exec.js';
|
6
4
|
import 'core-js/modules/es.string.replace.js';
|
7
5
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
@@ -27,17 +25,13 @@ import { ControlsHeightContext, ControlsHeight } from '../global/controls-height
|
|
27
25
|
import { S as Size, i as inputStyles } from '../_helpers/input.js';
|
28
26
|
import { I18nContext } from '../i18n/i18n-context.js';
|
29
27
|
import { Q as QueryAssistSuggestions, s as styles } from '../_helpers/query-assist__suggestions.js';
|
30
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
31
|
-
import 'core-js/modules/es.string.split.js';
|
32
28
|
import 'react-dom/server';
|
33
|
-
import 'core-js/modules/es.parse-float.js';
|
34
29
|
import '../popup/popup.js';
|
35
30
|
import 'react-dom';
|
36
31
|
import '../global/schedule-raf.js';
|
37
32
|
import '../tab-trap/tab-trap.js';
|
38
33
|
import '../popup/position.js';
|
39
34
|
import 'core-js/modules/es.array.sort.js';
|
40
|
-
import 'core-js/modules/es.string.includes.js';
|
41
35
|
import '../popup/popup.consts.js';
|
42
36
|
import '../popup/popup.target.js';
|
43
37
|
import '../list/list.js';
|
@@ -49,12 +43,10 @@ import 'react-virtualized/dist/es/CellMeasurer';
|
|
49
43
|
import 'util-deprecate';
|
50
44
|
import 'memoize-one';
|
51
45
|
import '../global/memoize.js';
|
52
|
-
import 'core-js/modules/es.weak-map.js';
|
53
46
|
import '../global/create-stateful-context.js';
|
54
47
|
import '../list/list__item.js';
|
55
48
|
import '../avatar/avatar.js';
|
56
49
|
import '../global/url.js';
|
57
|
-
import 'core-js/modules/es.string.match.js';
|
58
50
|
import '../_helpers/avatar-info.js';
|
59
51
|
import '../avatar/avatar-size.js';
|
60
52
|
import '../avatar/fallback-avatar.js';
|
@@ -71,7 +63,6 @@ import '../list/consts.js';
|
|
71
63
|
import '../list/list__classes.js';
|
72
64
|
import '../icon/icon__constants.js';
|
73
65
|
import '../_helpers/icon__svg.js';
|
74
|
-
import 'core-js/modules/es.string.starts-with.js';
|
75
66
|
import '../list/list__custom.js';
|
76
67
|
import '../global/get-event-key.js';
|
77
68
|
import '../list/list__title.js';
|
@@ -3,8 +3,6 @@ import 'react/jsx-runtime';
|
|
3
3
|
import '../list/list.js';
|
4
4
|
export { Q as default } from '../_helpers/query-assist__suggestions.js';
|
5
5
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
6
|
-
import 'core-js/modules/es.object.assign.js';
|
7
|
-
import 'core-js/modules/es.string.includes.js';
|
8
6
|
import 'core-js/modules/es.string.trim.js';
|
9
7
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
10
8
|
import 'react';
|
@@ -17,16 +15,12 @@ import 'util-deprecate';
|
|
17
15
|
import 'memoize-one';
|
18
16
|
import '../global/data-tests.js';
|
19
17
|
import '../global/get-uid.js';
|
20
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
21
18
|
import '../global/schedule-raf.js';
|
22
19
|
import '../global/memoize.js';
|
23
|
-
import 'core-js/modules/es.weak-map.js';
|
24
20
|
import '../global/dom.js';
|
25
21
|
import 'core-js/modules/es.regexp.exec.js';
|
26
|
-
import 'core-js/modules/es.string.split.js';
|
27
22
|
import '../shortcuts/shortcuts.js';
|
28
23
|
import '../shortcuts/core.js';
|
29
|
-
import 'core-js/modules/es.string.match.js';
|
30
24
|
import 'combokeys';
|
31
25
|
import '../global/sniffer.js';
|
32
26
|
import 'sniffr';
|
@@ -44,7 +38,6 @@ import '@jetbrains/icons/remove-12px';
|
|
44
38
|
import '../icon/icon.js';
|
45
39
|
import '../icon/icon__constants.js';
|
46
40
|
import '../_helpers/icon__svg.js';
|
47
|
-
import 'core-js/modules/es.string.starts-with.js';
|
48
41
|
import '../global/composeRefs.js';
|
49
42
|
import '../control-help/control-help.js';
|
50
43
|
import '../link/link.js';
|
@@ -4,7 +4,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { Component } from 'react';
|
5
5
|
import getUID from '../global/get-uid.js';
|
6
6
|
import RadioItem, { RadioContext } from './radio__item.js';
|
7
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
8
7
|
import 'classnames';
|
9
8
|
import '../control-help/control-help.js';
|
10
9
|
|
@@ -5,7 +5,6 @@ import { forwardRef, createContext, Component } from 'react';
|
|
5
5
|
import classNames from 'classnames';
|
6
6
|
import getUID from '../global/get-uid.js';
|
7
7
|
import ControlHelp from '../control-help/control-help.js';
|
8
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
9
8
|
|
10
9
|
var styles = {"radio":"ring-radio-radio","circle":"ring-radio-circle","input":"ring-radio-input","focus":"ring-radio-focus","label":"ring-radio-label"};
|
11
10
|
|
@@ -138,7 +138,7 @@ export interface SelectState<T = unknown> {
|
|
138
138
|
data: SelectItem<T>[];
|
139
139
|
shownData: SelectItem<T>[];
|
140
140
|
selected: SelectItem<T> | SelectItem<T>[] | null | undefined;
|
141
|
-
|
141
|
+
lastInteractedKey: string | number | null;
|
142
142
|
filterValue: string;
|
143
143
|
shortcutsEnabled: boolean;
|
144
144
|
popupShortcuts: boolean;
|
@@ -226,7 +226,7 @@ export default class Select<T = unknown> extends Component<SelectProps<T>, Selec
|
|
226
226
|
private _onEsc;
|
227
227
|
_inputShortcutHandler: () => void;
|
228
228
|
getValueForFilter(selected: SelectItem<T> | readonly SelectItem<T>[] | null | undefined): string;
|
229
|
-
|
229
|
+
private _getActiveIndex;
|
230
230
|
popupRef: (el: SelectPopup<SelectItemData<T>> | null) => void;
|
231
231
|
_getResetOption(): SelectItem<T> | null;
|
232
232
|
_prependResetOption(shownData: SelectItem<T>[]): SelectItem<T>[];
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { _ as _defineProperty, b as _objectSpread2, a as _objectWithoutProperties, d as _toPropertyKey } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
-
import 'core-js/modules/es.object.assign.js';
|
3
2
|
import 'core-js/modules/es.regexp.exec.js';
|
4
3
|
import 'core-js/modules/es.string.replace.js';
|
5
4
|
import 'core-js/modules/es.string.trim.js';
|
@@ -35,18 +34,12 @@ import 'util-deprecate';
|
|
35
34
|
import '../icon/icon.js';
|
36
35
|
import '../icon/icon__constants.js';
|
37
36
|
import '../_helpers/icon__svg.js';
|
38
|
-
import 'core-js/modules/es.string.starts-with.js';
|
39
|
-
import 'core-js/modules/es.weak-map.js';
|
40
37
|
import '../link/clickableLink.js';
|
41
38
|
import '../_helpers/button__classes.js';
|
42
|
-
import 'core-js/modules/es.string.includes.js';
|
43
39
|
import '../global/url.js';
|
44
|
-
import 'core-js/modules/es.string.match.js';
|
45
40
|
import '../global/dom.js';
|
46
|
-
import 'core-js/modules/es.string.split.js';
|
47
41
|
import '../_helpers/avatar-info.js';
|
48
42
|
import '../avatar/fallback-avatar.js';
|
49
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
50
43
|
import 'react-dom';
|
51
44
|
import '../global/schedule-raf.js';
|
52
45
|
import '../tab-trap/tab-trap.js';
|
@@ -196,22 +189,6 @@ function getListItems(props, state, rawFilterString) {
|
|
196
189
|
addButton
|
197
190
|
};
|
198
191
|
}
|
199
|
-
function getSelectedIndex(selected, data) {
|
200
|
-
const firstSelected = Array.isArray(selected) ? selected[0] : selected;
|
201
|
-
if (firstSelected == null) {
|
202
|
-
return null;
|
203
|
-
}
|
204
|
-
for (let i = 0; i < data.length; i++) {
|
205
|
-
const item = data[i];
|
206
|
-
if (item.key === undefined) {
|
207
|
-
continue;
|
208
|
-
}
|
209
|
-
if (item.key === firstSelected.key) {
|
210
|
-
return i;
|
211
|
-
}
|
212
|
-
}
|
213
|
-
return null;
|
214
|
-
}
|
215
192
|
const getItemLabel = _ref => {
|
216
193
|
let {
|
217
194
|
selectedLabel,
|
@@ -223,16 +200,6 @@ const getItemLabel = _ref => {
|
|
223
200
|
return typeof label === 'string' ? label : '';
|
224
201
|
};
|
225
202
|
const getValueForFilter = (selected, type, filterValue) => selected && !isArray(selected) && isInputMode(type) ? getItemLabel(selected) : filterValue;
|
226
|
-
function isSameSelected(prevSelected, selected) {
|
227
|
-
if (!prevSelected || !selected || prevSelected.length !== selected.length) {
|
228
|
-
return false;
|
229
|
-
}
|
230
|
-
const keysMap = selected.reduce((result, item) => {
|
231
|
-
result[item.key] = true;
|
232
|
-
return result;
|
233
|
-
}, {});
|
234
|
-
return prevSelected.every(it => keysMap[it.key]);
|
235
|
-
}
|
236
203
|
/**
|
237
204
|
* @name Select
|
238
205
|
* @constructor
|
@@ -250,7 +217,7 @@ class Select extends Component {
|
|
250
217
|
data: [],
|
251
218
|
shownData: [],
|
252
219
|
selected: this.props.multiple ? [] : null,
|
253
|
-
|
220
|
+
lastInteractedKey: null,
|
254
221
|
filterValue: this.props.filter && typeof this.props.filter === 'object' && this.props.filter.value || '',
|
255
222
|
shortcutsEnabled: false,
|
256
223
|
popupShortcuts: false,
|
@@ -364,7 +331,8 @@ class Select extends Component {
|
|
364
331
|
if (this.node && this.state.showPopup) {
|
365
332
|
this.setState(prevState => ({
|
366
333
|
showPopup: false,
|
367
|
-
filterValue: this.props.allowAny ? prevState.filterValue : ''
|
334
|
+
filterValue: this.props.allowAny ? prevState.filterValue : '',
|
335
|
+
lastInteractedKey: null
|
368
336
|
}));
|
369
337
|
if (tryFocusAnchor) {
|
370
338
|
this.focus();
|
@@ -414,8 +382,7 @@ class Select extends Component {
|
|
414
382
|
label: filterValue
|
415
383
|
};
|
416
384
|
this.setState({
|
417
|
-
selected: filterValue === '' ? null : fakeSelected
|
418
|
-
selectedIndex: null
|
385
|
+
selected: filterValue === '' ? null : fakeSelected
|
419
386
|
}, () => {
|
420
387
|
this.props.onSelect(fakeSelected, event);
|
421
388
|
this.props.onChange(fakeSelected, event);
|
@@ -442,7 +409,7 @@ class Select extends Component {
|
|
442
409
|
}
|
443
410
|
});
|
444
411
|
_defineProperty(this, "_listSelectHandler", function (selected, event) {
|
445
|
-
var _this$props$tryKeepOp;
|
412
|
+
var _selected$key, _this$props$tryKeepOp;
|
446
413
|
let opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
447
414
|
const isItem = item => List.isItemType(List.ListProps.Type.ITEM, item);
|
448
415
|
const isCustomItem = item => List.isItemType(List.ListProps.Type.CUSTOM, item);
|
@@ -453,14 +420,16 @@ class Select extends Component {
|
|
453
420
|
if (!isItem(selected) && !isCustomItem(selected) || selected.disabled || selected.isResetItem) {
|
454
421
|
return;
|
455
422
|
}
|
423
|
+
const lastInteractedKey = (_selected$key = selected === null || selected === void 0 ? void 0 : selected.key) !== null && _selected$key !== void 0 ? _selected$key : null;
|
456
424
|
const tryKeepOpen = (_this$props$tryKeepOp = _this.props.tryKeepOpen) !== null && _this$props$tryKeepOp !== void 0 ? _this$props$tryKeepOp : opts.tryKeepOpen;
|
457
425
|
if (!_this.props.multiple) {
|
426
|
+
var _selected$key2;
|
458
427
|
if (!tryKeepOpen) {
|
459
428
|
_this._hidePopup(isSelectItemEvent);
|
460
429
|
}
|
461
430
|
_this.setState({
|
462
431
|
selected,
|
463
|
-
|
432
|
+
lastInteractedKey: (_selected$key2 = selected === null || selected === void 0 ? void 0 : selected.key) !== null && _selected$key2 !== void 0 ? _selected$key2 : null
|
464
433
|
}, () => {
|
465
434
|
const newFilterValue = _this.isInputMode() && !_this.props.hideSelected ? getItemLabel(selected) : '';
|
466
435
|
_this.filterValue(newFilterValue);
|
@@ -486,7 +455,7 @@ class Select extends Component {
|
|
486
455
|
const nextState = {
|
487
456
|
filterValue: '',
|
488
457
|
selected: nextSelection,
|
489
|
-
|
458
|
+
lastInteractedKey: tryKeepOpen ? lastInteractedKey : null
|
490
459
|
};
|
491
460
|
if (typeof _this.props.multiple === 'object' && _this.props.multiple.limit && nextSelection.length === _this.props.multiple.limit) {
|
492
461
|
nextState.shownData = prevState.shownData.map(item => nextSelection.find(selectedItem => selectedItem.key === item.key) ? item : _objectSpread2(_objectSpread2({}, item), {}, {
|
@@ -499,11 +468,11 @@ class Select extends Component {
|
|
499
468
|
});
|
500
469
|
} else {
|
501
470
|
const _prevState$multipleMa = prevState.multipleMap,
|
502
|
-
_selected$
|
471
|
+
_selected$key3 = selected.key,
|
503
472
|
{
|
504
|
-
[_selected$
|
473
|
+
[_selected$key3]: _
|
505
474
|
} = _prevState$multipleMa,
|
506
|
-
restMultipleMap = _objectWithoutProperties(_prevState$multipleMa, [_selected$
|
475
|
+
restMultipleMap = _objectWithoutProperties(_prevState$multipleMa, [_selected$key3].map(_toPropertyKey));
|
507
476
|
nextState.multipleMap = restMultipleMap;
|
508
477
|
}
|
509
478
|
return _objectSpread2(_objectSpread2({}, prevState), nextState);
|
@@ -546,7 +515,6 @@ class Select extends Component {
|
|
546
515
|
return {
|
547
516
|
filterValue: '',
|
548
517
|
selected: nextSelection,
|
549
|
-
selectedIndex: isSelectAll ? _this._getSelectedIndex(nextSelection, _this.props.data) : null,
|
550
518
|
shownData: prevState.shownData.map(item => _objectSpread2(_objectSpread2({}, item), {}, {
|
551
519
|
checkbox: isSelectAll
|
552
520
|
})),
|
@@ -579,7 +547,7 @@ class Select extends Component {
|
|
579
547
|
const empty = this.props.multiple ? [] : null;
|
580
548
|
this.setState({
|
581
549
|
selected: empty,
|
582
|
-
|
550
|
+
lastInteractedKey: null,
|
583
551
|
filterValue: ''
|
584
552
|
}, () => {
|
585
553
|
if (this.props.onChange) {
|
@@ -622,23 +590,16 @@ class Select extends Component {
|
|
622
590
|
});
|
623
591
|
if (prevState.selected) {
|
624
592
|
Object.assign(nextState, {
|
625
|
-
selectedIndex: getSelectedIndex(prevState.selected, data),
|
626
593
|
filterValue: getValueForFilter(prevState.selected, type, filterValue)
|
627
594
|
});
|
628
595
|
}
|
629
596
|
}
|
630
597
|
if ('selected' in nextProps && nextProps.selected !== prevSelected) {
|
631
598
|
const selected = nextProps.selected || (multiple ? [] : null);
|
632
|
-
const selectedIndex = getSelectedIndex(selected, data || prevData);
|
633
599
|
Object.assign(nextState, {
|
634
600
|
selected,
|
635
601
|
filterValue: getValueForFilter(selected, type, filterValue)
|
636
602
|
});
|
637
|
-
if (!Array.isArray(prevSelected) || !Array.isArray(selected) || !isSameSelected(prevSelected, selected)) {
|
638
|
-
Object.assign(nextState, {
|
639
|
-
selectedIndex
|
640
|
-
});
|
641
|
-
}
|
642
603
|
}
|
643
604
|
if (prevMultiple !== multiple && !dequal(prevMultiple, multiple)) {
|
644
605
|
nextState.selected = multiple ? [] : null;
|
@@ -660,6 +621,10 @@ class Select extends Component {
|
|
660
621
|
addButton
|
661
622
|
});
|
662
623
|
}
|
624
|
+
const isSelectionEmpty = nextProps.selected == null || Array.isArray(nextProps.selected) && nextProps.selected.length === 0;
|
625
|
+
if (isSelectionEmpty) {
|
626
|
+
nextState.lastInteractedKey = null;
|
627
|
+
}
|
663
628
|
return nextState;
|
664
629
|
}
|
665
630
|
componentDidUpdate(prevProps, prevState) {
|
@@ -685,8 +650,28 @@ class Select extends Component {
|
|
685
650
|
getValueForFilter(selected) {
|
686
651
|
return getValueForFilter(selected, this.props.type, this.state.filterValue);
|
687
652
|
}
|
688
|
-
|
689
|
-
|
653
|
+
_getActiveIndex(items) {
|
654
|
+
const {
|
655
|
+
selected,
|
656
|
+
lastInteractedKey
|
657
|
+
} = this.state;
|
658
|
+
const isNonOptionItem = item => item.isResetItem || List.isItemType(List.ListProps.Type.SEPARATOR, item);
|
659
|
+
if (lastInteractedKey != null) {
|
660
|
+
const index = items.findIndex(item => item.key === lastInteractedKey && !isNonOptionItem(item));
|
661
|
+
if (index >= 0) return index;
|
662
|
+
}
|
663
|
+
let selectedItems = [];
|
664
|
+
if (Array.isArray(selected)) {
|
665
|
+
selectedItems = selected;
|
666
|
+
} else if (selected) {
|
667
|
+
selectedItems = [selected];
|
668
|
+
}
|
669
|
+
if (selectedItems.length > 0) {
|
670
|
+
const lastSelected = selectedItems[selectedItems.length - 1];
|
671
|
+
const index = items.findIndex(item => item.key === lastSelected.key);
|
672
|
+
if (index >= 0) return index;
|
673
|
+
}
|
674
|
+
return items.findIndex(item => !isNonOptionItem(item));
|
690
675
|
}
|
691
676
|
_getResetOption() {
|
692
677
|
const isOptionsSelected = Array.isArray(this.state.selected) && this.state.selected.length;
|
@@ -740,6 +725,7 @@ class Select extends Component {
|
|
740
725
|
shownData
|
741
726
|
} = this.state;
|
742
727
|
const _shownData = this._prependResetOption(shownData);
|
728
|
+
const activeIndex = this._getActiveIndex(_shownData);
|
743
729
|
return jsx(I18nContext.Consumer, {
|
744
730
|
children: _ref2 => {
|
745
731
|
let {
|
@@ -759,7 +745,7 @@ class Select extends Component {
|
|
759
745
|
toolbar: showPopup && this.getToolbar(),
|
760
746
|
topbar: this.getTopbar(),
|
761
747
|
loading: this.props.loading,
|
762
|
-
activeIndex:
|
748
|
+
activeIndex: activeIndex,
|
763
749
|
hidden: !showPopup,
|
764
750
|
ref: this.popupRef,
|
765
751
|
maxHeight: this.props.maxHeight,
|
@@ -18,22 +18,17 @@ import '../icon/icon__constants.js';
|
|
18
18
|
import '../_helpers/icon__svg.js';
|
19
19
|
import 'core-js/modules/es.regexp.exec.js';
|
20
20
|
import 'core-js/modules/es.string.replace.js';
|
21
|
-
import 'core-js/modules/es.string.starts-with.js';
|
22
21
|
import '../global/memoize.js';
|
23
|
-
import 'core-js/modules/es.weak-map.js';
|
24
22
|
import '../link/clickableLink.js';
|
25
23
|
import '../global/controls-height.js';
|
26
24
|
import '../_helpers/button__classes.js';
|
27
25
|
import '../global/get-uid.js';
|
28
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
29
26
|
import '../global/composeRefs.js';
|
30
27
|
import 'memoize-one';
|
31
28
|
import '../control-label/control-label.js';
|
32
29
|
import '../control-help/control-help.js';
|
33
30
|
import 'sniffr';
|
34
31
|
import 'core-js/modules/es.symbol.description.js';
|
35
|
-
import 'core-js/modules/es.object.assign.js';
|
36
|
-
import 'core-js/modules/es.string.includes.js';
|
37
32
|
import 'core-js/modules/es.string.trim.js';
|
38
33
|
import 'react-virtualized/dist/es/List';
|
39
34
|
import 'react-virtualized/dist/es/AutoSizer';
|
@@ -42,10 +37,8 @@ import 'react-virtualized/dist/es/CellMeasurer';
|
|
42
37
|
import '../global/data-tests.js';
|
43
38
|
import '../global/schedule-raf.js';
|
44
39
|
import '../global/dom.js';
|
45
|
-
import 'core-js/modules/es.string.split.js';
|
46
40
|
import '../shortcuts/shortcuts.js';
|
47
41
|
import '../shortcuts/core.js';
|
48
|
-
import 'core-js/modules/es.string.match.js';
|
49
42
|
import 'combokeys';
|
50
43
|
import '../global/create-stateful-context.js';
|
51
44
|
import '../list/list__item.js';
|
@@ -29,17 +29,11 @@ import '../icon/icon__constants.js';
|
|
29
29
|
import '../_helpers/icon__svg.js';
|
30
30
|
import 'core-js/modules/es.regexp.exec.js';
|
31
31
|
import 'core-js/modules/es.string.replace.js';
|
32
|
-
import 'core-js/modules/es.string.starts-with.js';
|
33
|
-
import 'core-js/modules/es.weak-map.js';
|
34
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
35
32
|
import 'react-dom';
|
36
33
|
import '../global/schedule-raf.js';
|
37
34
|
import '../global/data-tests.js';
|
38
35
|
import '../tab-trap/tab-trap.js';
|
39
36
|
import 'core-js/modules/es.array.sort.js';
|
40
|
-
import 'core-js/modules/es.string.includes.js';
|
41
|
-
import 'core-js/modules/es.object.assign.js';
|
42
|
-
import 'core-js/modules/es.string.split.js';
|
43
37
|
import 'core-js/modules/es.symbol.description.js';
|
44
38
|
import 'core-js/modules/es.string.trim.js';
|
45
39
|
import 'react-virtualized/dist/es/List';
|
@@ -50,7 +44,6 @@ import '../global/create-stateful-context.js';
|
|
50
44
|
import '../list/list__item.js';
|
51
45
|
import '../avatar/avatar.js';
|
52
46
|
import '../global/url.js';
|
53
|
-
import 'core-js/modules/es.string.match.js';
|
54
47
|
import '../_helpers/avatar-info.js';
|
55
48
|
import '../avatar/avatar-size.js';
|
56
49
|
import '../avatar/fallback-avatar.js';
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
-
import 'core-js/modules/es.object.assign.js';
|
3
2
|
import 'core-js/modules/es.regexp.exec.js';
|
4
|
-
import 'core-js/modules/es.string.includes.js';
|
5
|
-
import 'core-js/modules/es.string.match.js';
|
6
3
|
import Combokeys from 'combokeys';
|
7
4
|
import sniffr from '../global/sniffer.js';
|
8
5
|
import 'sniffr';
|
@@ -4,12 +4,8 @@ import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { Component } from 'react';
|
5
5
|
import getUID from '../global/get-uid.js';
|
6
6
|
import Shortcuts from './shortcuts.js';
|
7
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
8
7
|
import './core.js';
|
9
|
-
import 'core-js/modules/es.object.assign.js';
|
10
8
|
import 'core-js/modules/es.regexp.exec.js';
|
11
|
-
import 'core-js/modules/es.string.includes.js';
|
12
|
-
import 'core-js/modules/es.string.match.js';
|
13
9
|
import 'combokeys';
|
14
10
|
import '../global/sniffer.js';
|
15
11
|
import 'sniffr';
|
@@ -1,10 +1,7 @@
|
|
1
1
|
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import { PureComponent } from 'react';
|
3
3
|
import shortcuts from './core.js';
|
4
|
-
import 'core-js/modules/es.object.assign.js';
|
5
4
|
import 'core-js/modules/es.regexp.exec.js';
|
6
|
-
import 'core-js/modules/es.string.includes.js';
|
7
|
-
import 'core-js/modules/es.string.match.js';
|
8
5
|
import 'combokeys';
|
9
6
|
import '../global/sniffer.js';
|
10
7
|
import 'sniffr';
|
@@ -9,15 +9,10 @@ import Shortcuts from '../shortcuts/shortcuts.js';
|
|
9
9
|
import getUID from '../global/get-uid.js';
|
10
10
|
import { HUNDRED, toRange, validateValue, calculateMarks, toPercent, calculateValue, adjustValues } from './slider.utils.js';
|
11
11
|
import '../shortcuts/core.js';
|
12
|
-
import 'core-js/modules/es.object.assign.js';
|
13
12
|
import 'core-js/modules/es.regexp.exec.js';
|
14
|
-
import 'core-js/modules/es.string.includes.js';
|
15
|
-
import 'core-js/modules/es.string.match.js';
|
16
13
|
import 'combokeys';
|
17
14
|
import '../global/sniffer.js';
|
18
15
|
import 'sniffr';
|
19
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
20
|
-
import 'core-js/modules/es.number.to-fixed.js';
|
21
16
|
|
22
17
|
var styles = {"slider":"ring-slider-slider","disabled":"ring-slider-disabled","marked":"ring-slider-marked","rail":"ring-slider-rail","rounded":"ring-slider-rounded","track":"ring-slider-track","thumb":"ring-slider-thumb ring-global-resetButton","dragged":"ring-slider-dragged","tick":"ring-slider-tick","active":"ring-slider-active","markValue":"ring-slider-markValue","tag":"ring-slider-tag"};
|
23
18
|
|
@@ -1,12 +1,10 @@
|
|
1
1
|
import LocalStorage from './storage__local.js';
|
2
2
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
3
|
-
import 'core-js/modules/es.promise.js';
|
4
3
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
5
4
|
import '../alert-service/alert-service.js';
|
6
5
|
import 'react/jsx-runtime';
|
7
6
|
import 'react-dom/client';
|
8
7
|
import '../global/get-uid.js';
|
9
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
10
8
|
import '../alert/alert.js';
|
11
9
|
import 'react';
|
12
10
|
import 'classnames';
|
@@ -20,14 +18,10 @@ import '../icon/icon__constants.js';
|
|
20
18
|
import '../_helpers/icon__svg.js';
|
21
19
|
import 'core-js/modules/es.regexp.exec.js';
|
22
20
|
import 'core-js/modules/es.string.replace.js';
|
23
|
-
import 'core-js/modules/es.string.starts-with.js';
|
24
21
|
import '../global/memoize.js';
|
25
|
-
import 'core-js/modules/es.weak-map.js';
|
26
22
|
import '../loader-inline/loader-inline.js';
|
27
23
|
import '../global/data-tests.js';
|
28
24
|
import '../global/dom.js';
|
29
|
-
import 'core-js/modules/es.object.assign.js';
|
30
|
-
import 'core-js/modules/es.string.split.js';
|
31
25
|
import '../button/button.js';
|
32
26
|
import '@jetbrains/icons/chevron-down';
|
33
27
|
import '@jetbrains/icons/chevron-12px-down';
|
@@ -41,8 +35,6 @@ import '../popup/popup.js';
|
|
41
35
|
import '../global/schedule-raf.js';
|
42
36
|
import '../shortcuts/shortcuts.js';
|
43
37
|
import '../shortcuts/core.js';
|
44
|
-
import 'core-js/modules/es.string.includes.js';
|
45
|
-
import 'core-js/modules/es.string.match.js';
|
46
38
|
import 'combokeys';
|
47
39
|
import '../global/sniffer.js';
|
48
40
|
import 'sniffr';
|