@jetbrains/ring-ui-built 7.0.91 → 7.0.93
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/theme.js +1 -1
- package/components/auth/auth-core.js +1 -1
- package/components/auth/auth.js +1 -1
- package/components/avatar-stack/avatar-stack.js +2 -2
- package/components/data-list/data-list.mock.js +1 -1
- package/components/editable-heading/editable-heading.js +1 -1
- package/components/global/theme.js +1 -1
- package/components/old-browsers-message/white-list.js +2 -2
- package/components/popup/popup.js +1 -1
- package/components/popup/position-css.d.ts +1 -1
- package/components/popup/position-css.js +12 -4
- package/components/query-assist/query-assist.js +2 -2
- package/components/select/select-popup.d.ts +1 -0
- package/components/select/select-popup.js +2 -2
- package/components/select/select.d.ts +1 -2
- package/components/select/select.js +27 -9
- package/components/style.css +1 -1
- package/components/user-agreement/service.js +1 -1
- package/package.json +3 -3
|
@@ -278,4 +278,4 @@ const ThemeProvider = /*#__PURE__*/forwardRef(function ThemeProvider(props, ref)
|
|
|
278
278
|
});
|
|
279
279
|
var Theme$1 = Theme;
|
|
280
280
|
|
|
281
|
-
export { GLOBAL_DARK_CLASS_NAME as G, Theme$1 as T, WithThemeClasses as W, ThemeProvider as a, ThemeContext as b,
|
|
281
|
+
export { GLOBAL_DARK_CLASS_NAME as G, Theme$1 as T, WithThemeClasses as W, ThemeProvider as a, ThemeContext as b, applyTheme as c, darkStyles as d, useThemeClasses as e, useTheme as u };
|
|
@@ -2,7 +2,7 @@ import { getAbsoluteBaseURL, fixUrl } from '../global/url.js';
|
|
|
2
2
|
import Listeners from '../global/listeners.js';
|
|
3
3
|
import HTTP from '../http/http.js';
|
|
4
4
|
import promiseWithTimeout from '../global/promise-with-timeout.js';
|
|
5
|
-
import { getTranslationsWithFallback,
|
|
5
|
+
import { getTranslationsWithFallback, translate, getTranslations } from '../i18n/i18n.js';
|
|
6
6
|
import AuthStorage from './storage.js';
|
|
7
7
|
import AuthResponseParser from './response-parser.js';
|
|
8
8
|
import AuthRequestBuilder from './request-builder.js';
|
package/components/auth/auth.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import WindowFlow from './window-flow.js';
|
|
2
2
|
import onBackendDown from './down-notification.js';
|
|
3
|
-
import Auth from './auth-core.js';
|
|
3
|
+
import { Auth } from './auth-core.js';
|
|
4
4
|
export { DEFAULT_BACKGROUND_TIMEOUT, DEFAULT_EXPIRES_TIMEOUT, DOMAIN_USER_CHANGED_EVENT, LOGOUT_EVENT, LOGOUT_POSTPONED_EVENT, USER_CHANGED_EVENT, USER_CHANGE_POSTPONED_EVENT } from './auth-core.js';
|
|
5
5
|
import './response-parser.js';
|
|
6
6
|
import '../global/url.js';
|
|
@@ -69,11 +69,11 @@ var styles = {"avatarStack":"ring-avatar-stack-avatarStack","extraText":"ring-av
|
|
|
69
69
|
|
|
70
70
|
function AvatarStack(t0) {
|
|
71
71
|
const $ = c(28);
|
|
72
|
-
if ($[0] !== "
|
|
72
|
+
if ($[0] !== "ff0a7d0ce1f64ba19b02b705828ff79b7d7a691c2134fe54a0faaf545335d4f7") {
|
|
73
73
|
for (let $i = 0; $i < 28; $i += 1) {
|
|
74
74
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
75
75
|
}
|
|
76
|
-
$[0] = "
|
|
76
|
+
$[0] = "ff0a7d0ce1f64ba19b02b705828ff79b7d7a691c2134fe54a0faaf545335d4f7";
|
|
77
77
|
}
|
|
78
78
|
let children;
|
|
79
79
|
let className;
|
|
@@ -8,7 +8,7 @@ import { S as Size, i as inputStyles } from '../_helpers/input.js';
|
|
|
8
8
|
import getUID from '../global/get-uid.js';
|
|
9
9
|
import Shortcuts from '../shortcuts/shortcuts.js';
|
|
10
10
|
import useEventCallback from '../global/use-event-callback.js';
|
|
11
|
-
import { jsxs,
|
|
11
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
12
12
|
import 'util-deprecate';
|
|
13
13
|
import '../_helpers/heading.js';
|
|
14
14
|
import '@jetbrains/icons/chevron-down';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'react-compiler-runtime';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
|
-
export { G as GLOBAL_DARK_CLASS_NAME, b as ThemeContext, a as ThemeProvider, W as WithThemeClasses,
|
|
4
|
+
export { G as GLOBAL_DARK_CLASS_NAME, b as ThemeContext, a as ThemeProvider, W as WithThemeClasses, c as applyTheme, T as default, u as useTheme, e as useThemeClasses } from '../_helpers/theme.js';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
@@ -5,11 +5,11 @@ const MAJOR_VERSION_INDEX = 0;
|
|
|
5
5
|
/**
|
|
6
6
|
* SUPPORTED_BROWSERS are defined by Babel plugin, see babel config
|
|
7
7
|
*/
|
|
8
|
-
if (!["and_chr
|
|
8
|
+
if (!["and_chr 144", "and_ff 147", "and_qq 14.9", "and_uc 15.5", "android 144", "chrome 144", "chrome 143", "chrome 142", "chrome 141", "chrome 140", "chrome 139", "chrome 138", "chrome 137", "chrome 136", "chrome 135", "chrome 134", "chrome 133", "chrome 132", "chrome 131", "chrome 130", "chrome 129", "chrome 128", "chrome 127", "chrome 126", "chrome 125", "chrome 124", "chrome 123", "chrome 122", "chrome 121", "chrome 120", "chrome 119", "chrome 118", "chrome 117", "chrome 116", "chrome 115", "chrome 112", "chrome 109", "edge 144", "edge 143", "edge 142", "edge 141", "edge 140", "edge 139", "edge 138", "edge 137", "edge 136", "edge 135", "edge 134", "edge 133", "edge 132", "edge 131", "edge 130", "edge 129", "edge 128", "edge 127", "edge 126", "edge 125", "edge 124", "edge 123", "edge 122", "edge 121", "edge 120", "edge 119", "edge 118", "edge 117", "edge 116", "edge 115", "firefox 147", "firefox 146", "firefox 145", "firefox 144", "firefox 143", "firefox 142", "firefox 141", "firefox 140", "firefox 139", "firefox 138", "firefox 137", "firefox 136", "firefox 135", "firefox 134", "firefox 133", "firefox 132", "firefox 131", "firefox 130", "firefox 129", "firefox 128", "firefox 127", "firefox 126", "firefox 125", "firefox 124", "firefox 123", "firefox 122", "firefox 121", "firefox 120", "firefox 119", "firefox 118", "firefox 117", "firefox 116", "ios_saf 26.2", "ios_saf 26.1", "ios_saf 26.0", "ios_saf 18.5-18.7", "ios_saf 18.4", "ios_saf 18.3", "ios_saf 18.2", "ios_saf 18.1", "ios_saf 18.0", "ios_saf 17.6-17.7", "ios_saf 17.5", "ios_saf 17.4", "ios_saf 17.3", "ios_saf 17.2", "ios_saf 17.1", "ios_saf 17.0", "ios_saf 16.6-16.7", "ios_saf 16.5", "ios_saf 16.4", "kaios 3.0-3.1", "kaios 2.5", "op_mini all", "op_mob 80", "opera 125", "opera 124", "safari 26.2", "safari 26.1", "safari 26.0", "safari 18.5-18.6", "safari 18.4", "safari 18.3", "safari 18.2", "safari 18.1", "safari 18.0", "safari 17.6", "safari 17.5", "safari 17.4", "safari 17.3", "safari 17.2", "safari 17.1", "safari 17.0", "safari 16.6", "safari 16.5", "safari 16.4", "samsung 29", "samsung 28"]) {
|
|
9
9
|
// eslint-disable-next-line no-console
|
|
10
10
|
console.warn('Ring UI: no SUPPORTED_BROWSERS passed. Please check babel config.');
|
|
11
11
|
}
|
|
12
|
-
const SUPPORTED = ["and_chr
|
|
12
|
+
const SUPPORTED = ["and_chr 144", "and_ff 147", "and_qq 14.9", "and_uc 15.5", "android 144", "chrome 144", "chrome 143", "chrome 142", "chrome 141", "chrome 140", "chrome 139", "chrome 138", "chrome 137", "chrome 136", "chrome 135", "chrome 134", "chrome 133", "chrome 132", "chrome 131", "chrome 130", "chrome 129", "chrome 128", "chrome 127", "chrome 126", "chrome 125", "chrome 124", "chrome 123", "chrome 122", "chrome 121", "chrome 120", "chrome 119", "chrome 118", "chrome 117", "chrome 116", "chrome 115", "chrome 112", "chrome 109", "edge 144", "edge 143", "edge 142", "edge 141", "edge 140", "edge 139", "edge 138", "edge 137", "edge 136", "edge 135", "edge 134", "edge 133", "edge 132", "edge 131", "edge 130", "edge 129", "edge 128", "edge 127", "edge 126", "edge 125", "edge 124", "edge 123", "edge 122", "edge 121", "edge 120", "edge 119", "edge 118", "edge 117", "edge 116", "edge 115", "firefox 147", "firefox 146", "firefox 145", "firefox 144", "firefox 143", "firefox 142", "firefox 141", "firefox 140", "firefox 139", "firefox 138", "firefox 137", "firefox 136", "firefox 135", "firefox 134", "firefox 133", "firefox 132", "firefox 131", "firefox 130", "firefox 129", "firefox 128", "firefox 127", "firefox 126", "firefox 125", "firefox 124", "firefox 123", "firefox 122", "firefox 121", "firefox 120", "firefox 119", "firefox 118", "firefox 117", "firefox 116", "ios_saf 26.2", "ios_saf 26.1", "ios_saf 26.0", "ios_saf 18.5-18.7", "ios_saf 18.4", "ios_saf 18.3", "ios_saf 18.2", "ios_saf 18.1", "ios_saf 18.0", "ios_saf 17.6-17.7", "ios_saf 17.5", "ios_saf 17.4", "ios_saf 17.3", "ios_saf 17.2", "ios_saf 17.1", "ios_saf 17.0", "ios_saf 16.6-16.7", "ios_saf 16.5", "ios_saf 16.4", "kaios 3.0-3.1", "kaios 2.5", "op_mini all", "op_mob 80", "opera 125", "opera 124", "safari 26.2", "safari 26.1", "safari 26.0", "safari 18.5-18.6", "safari 18.4", "safari 18.3", "safari 18.2", "safari 18.1", "safari 18.0", "safari 17.6", "safari 17.5", "safari 17.4", "safari 17.3", "safari 17.2", "safari 17.1", "safari 17.0", "safari 16.6", "safari 16.5", "safari 16.4", "samsung 29", "samsung 28"] || [];
|
|
13
13
|
const WHITE_LISTED_BROWSERS = ['chrome', 'firefox', 'safari', 'edge'];
|
|
14
14
|
const WHITE_LIST = SUPPORTED.reduce((acc, item) => {
|
|
15
15
|
var _item$match;
|
|
@@ -160,7 +160,7 @@ class Popup extends PureComponent {
|
|
|
160
160
|
};
|
|
161
161
|
shouldUseCssPositioning() {
|
|
162
162
|
var _ref, _this$props$cssPositi;
|
|
163
|
-
if (!supportsCSSAnchorPositioning
|
|
163
|
+
if (!supportsCSSAnchorPositioning) {
|
|
164
164
|
return false;
|
|
165
165
|
}
|
|
166
166
|
return (_ref = (_this$props$cssPositi = this.props.cssPositioning) !== null && _this$props$cssPositi !== void 0 ? _this$props$cssPositi : this.cssPositioningFromContext) !== null && _ref !== void 0 ? _ref : getConfiguration().popupsCssPositioning;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { getRect } from '../global/dom.js';
|
|
2
2
|
import { calculateMinWidth } from './position.js';
|
|
3
3
|
import { Dimension, MaxHeight, Directions } from './popup.consts.js';
|
|
4
|
+
import sniffr from '../global/sniffer.js';
|
|
5
|
+
import 'sniffr';
|
|
4
6
|
|
|
5
|
-
const
|
|
7
|
+
const doesSupportCSSAnchorPositioning = () => {
|
|
8
|
+
const isSafari = sniffr.browser.name === 'safari';
|
|
9
|
+
return !isSafari && CSS?.supports?.('anchor-name', 'none');
|
|
10
|
+
};
|
|
11
|
+
const supportsCSSAnchorPositioning = doesSupportCSSAnchorPositioning();
|
|
6
12
|
const getPositionArea = direction => {
|
|
7
13
|
switch (direction) {
|
|
8
14
|
case Directions.BOTTOM_RIGHT:
|
|
@@ -62,15 +68,17 @@ const setCSSAnchorPositioning = ({
|
|
|
62
68
|
}
|
|
63
69
|
// When all directions are BOTTOM, the `max-height: 100%` from CSS should stay applied so popup doesn't overflow the anchor RG-2754
|
|
64
70
|
const SHOULD_AUTO_SHRINK = directions.every(d => d.startsWith('BOTTOM'));
|
|
65
|
-
if (
|
|
71
|
+
if (SHOULD_AUTO_SHRINK) {
|
|
72
|
+
popup.style.removeProperty('max-height'); // Reset to 100% from CSS to allow shrinking based on viewport height
|
|
73
|
+
} else {
|
|
66
74
|
const screenWithMargin = `calc(100vh - ${Dimension.MARGIN * 2}px)`;
|
|
67
75
|
if (maxHeight === 'screen' || maxHeight === MaxHeight.SCREEN) {
|
|
68
76
|
popup.style.maxHeight = screenWithMargin;
|
|
69
77
|
} else if (typeof maxHeight === 'number' && maxHeight > 0) {
|
|
70
78
|
popup.style.maxHeight = `min(${screenWithMargin}, ${maxHeight}px)`;
|
|
79
|
+
} else {
|
|
80
|
+
popup.style.maxHeight = 'none';
|
|
71
81
|
}
|
|
72
|
-
} else {
|
|
73
|
-
popup.style.maxHeight = '';
|
|
74
82
|
}
|
|
75
83
|
const [initialPositionStyle, initialPositionName] = getPositionArea(directions[0]);
|
|
76
84
|
popup.style.setProperty('position-area', initialPositionStyle);
|
|
@@ -32,6 +32,8 @@ import '../popup/position.js';
|
|
|
32
32
|
import '../popup/popup.consts.js';
|
|
33
33
|
import '../popup/popup.target.js';
|
|
34
34
|
import '../popup/position-css.js';
|
|
35
|
+
import '../global/sniffer.js';
|
|
36
|
+
import 'sniffr';
|
|
35
37
|
import '../_helpers/theme.js';
|
|
36
38
|
import '../list/list.js';
|
|
37
39
|
import 'react-virtualized/dist/es/List';
|
|
@@ -68,8 +70,6 @@ import '../list/list-separator.js';
|
|
|
68
70
|
import '../list/list-hint.js';
|
|
69
71
|
import '../shortcuts/core.js';
|
|
70
72
|
import 'combokeys';
|
|
71
|
-
import '../global/sniffer.js';
|
|
72
|
-
import 'sniffr';
|
|
73
73
|
import '@jetbrains/icons/chevron-down';
|
|
74
74
|
import '@jetbrains/icons/chevron-12px-down';
|
|
75
75
|
import '../_helpers/button.classes.js';
|
|
@@ -15,6 +15,7 @@ import { type SelectItem } from './select';
|
|
|
15
15
|
export type FilterFn<T> = (itemToCheck: SelectItem<T>, checkString: string, data: readonly SelectItem<T>[]) => boolean;
|
|
16
16
|
export interface Filter<T = unknown> {
|
|
17
17
|
fn?: FilterFn<T> | null | undefined;
|
|
18
|
+
preserveSeparators?: boolean | null | undefined;
|
|
18
19
|
fuzzy?: boolean | null | undefined;
|
|
19
20
|
value?: string | null | undefined;
|
|
20
21
|
placeholder?: string | undefined;
|
|
@@ -32,6 +32,8 @@ import '../global/schedule-raf.js';
|
|
|
32
32
|
import '../global/data-tests.js';
|
|
33
33
|
import '../tab-trap/tab-trap.js';
|
|
34
34
|
import '../popup/position-css.js';
|
|
35
|
+
import '../global/sniffer.js';
|
|
36
|
+
import 'sniffr';
|
|
35
37
|
import '../_helpers/theme.js';
|
|
36
38
|
import 'react-virtualized/dist/es/List';
|
|
37
39
|
import 'react-virtualized/dist/es/AutoSizer';
|
|
@@ -61,8 +63,6 @@ import '../list/list-separator.js';
|
|
|
61
63
|
import '../list/list-hint.js';
|
|
62
64
|
import '../shortcuts/core.js';
|
|
63
65
|
import 'combokeys';
|
|
64
|
-
import '../global/sniffer.js';
|
|
65
|
-
import 'sniffr';
|
|
66
66
|
import '../tag/tag.js';
|
|
67
67
|
import '@jetbrains/icons/close-12px';
|
|
68
68
|
import '@jetbrains/icons/chevron-down';
|
|
@@ -6,7 +6,7 @@ import { type LabelType } from '../control-label/control-label';
|
|
|
6
6
|
import { type ListDataItem } from '../list/consts';
|
|
7
7
|
import { type Directions } from '../popup/popup.consts';
|
|
8
8
|
import { ControlsHeight, ControlsHeightContext } from '../global/controls-height';
|
|
9
|
-
import SelectPopup, { type Filter, type
|
|
9
|
+
import SelectPopup, { type Filter, type Multiple, type Tags } from './select-popup';
|
|
10
10
|
/**
|
|
11
11
|
* @name Select
|
|
12
12
|
*/
|
|
@@ -240,7 +240,6 @@ export default class Select<T = unknown> extends Component<SelectProps<T>, Selec
|
|
|
240
240
|
getTopbar(): ReactNode;
|
|
241
241
|
getLowerCaseLabel: typeof getLowerCaseLabel;
|
|
242
242
|
doesLabelMatch: typeof doesLabelMatch;
|
|
243
|
-
getFilterFn(): FilterFn<T>;
|
|
244
243
|
getListItems(rawFilterString: string, data?: SelectItem<T>[]): SelectItem<T>[];
|
|
245
244
|
filterValue(): string;
|
|
246
245
|
filterValue(setValue: string): void;
|
|
@@ -37,11 +37,11 @@ import '../popup/position.js';
|
|
|
37
37
|
import '../popup/popup.consts.js';
|
|
38
38
|
import '../popup/popup.target.js';
|
|
39
39
|
import '../popup/position-css.js';
|
|
40
|
+
import '../global/sniffer.js';
|
|
41
|
+
import 'sniffr';
|
|
40
42
|
import '../_helpers/theme.js';
|
|
41
43
|
import '../shortcuts/core.js';
|
|
42
44
|
import 'combokeys';
|
|
43
|
-
import '../global/sniffer.js';
|
|
44
|
-
import 'sniffr';
|
|
45
45
|
import 'react-virtualized/dist/es/List';
|
|
46
46
|
import 'react-virtualized/dist/es/AutoSizer';
|
|
47
47
|
import 'react-virtualized/dist/es/WindowScroller';
|
|
@@ -113,15 +113,27 @@ function doesLabelMatch(itemToCheck, fn) {
|
|
|
113
113
|
return fn(lowerCaseLabel);
|
|
114
114
|
}
|
|
115
115
|
function getFilterFn(filter) {
|
|
116
|
+
const preserveSeparators = filter === false || typeof filter === 'object' && filter.preserveSeparators;
|
|
116
117
|
if (typeof filter === 'object') {
|
|
117
118
|
if (filter.fn) {
|
|
118
|
-
return
|
|
119
|
+
return {
|
|
120
|
+
check: filter.fn,
|
|
121
|
+
preserveSeparators
|
|
122
|
+
};
|
|
119
123
|
}
|
|
120
124
|
if (filter.fuzzy) {
|
|
121
|
-
|
|
125
|
+
const check = (itemToCheck, checkString) => doesLabelMatch(itemToCheck, lowerCaseLabel => fuzzyHighlight(checkString, lowerCaseLabel).matched);
|
|
126
|
+
return {
|
|
127
|
+
check,
|
|
128
|
+
preserveSeparators
|
|
129
|
+
};
|
|
122
130
|
}
|
|
123
131
|
}
|
|
124
|
-
|
|
132
|
+
const check = (itemToCheck, checkString) => doesLabelMatch(itemToCheck, lowerCaseLabel => lowerCaseLabel.indexOf(checkString) >= 0);
|
|
133
|
+
return {
|
|
134
|
+
check,
|
|
135
|
+
preserveSeparators
|
|
136
|
+
};
|
|
125
137
|
}
|
|
126
138
|
function buildMultipleMap(selected) {
|
|
127
139
|
return selected.reduce((acc, item) => {
|
|
@@ -138,12 +150,18 @@ function getListItems(props, state, rawFilterString, data = props.data) {
|
|
|
138
150
|
const lowerCaseString = filterString.toLowerCase();
|
|
139
151
|
const filteredData = [];
|
|
140
152
|
let exactMatch = false;
|
|
141
|
-
const
|
|
153
|
+
const {
|
|
154
|
+
check,
|
|
155
|
+
preserveSeparators
|
|
156
|
+
} = getFilterFn(props.filter);
|
|
142
157
|
for (let i = 0; i < data.length; i++) {
|
|
143
158
|
const item = {
|
|
144
159
|
...data[i]
|
|
145
160
|
};
|
|
146
161
|
if (check(item, lowerCaseString, data)) {
|
|
162
|
+
if (!preserveSeparators && List.isItemType(List.ListProps.Type.SEPARATOR, item) && (!filteredData.length || List.isItemType(List.ListProps.Type.SEPARATOR, filteredData[filteredData.length - 1]))) {
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
147
165
|
exactMatch = item.label === filterString;
|
|
148
166
|
if (props.multiple && !(typeof props.multiple === 'object' && props.multiple.removeSelectedItems)) {
|
|
149
167
|
item.checkbox = !!state.multipleMap?.[item.key];
|
|
@@ -157,6 +175,9 @@ function getListItems(props, state, rawFilterString, data = props.data) {
|
|
|
157
175
|
}
|
|
158
176
|
}
|
|
159
177
|
}
|
|
178
|
+
if (!preserveSeparators && filteredData.length && List.isItemType(List.ListProps.Type.SEPARATOR, filteredData[filteredData.length - 1])) {
|
|
179
|
+
filteredData.pop();
|
|
180
|
+
}
|
|
160
181
|
let addButton = null;
|
|
161
182
|
const {
|
|
162
183
|
add
|
|
@@ -661,9 +682,6 @@ class Select extends Component {
|
|
|
661
682
|
}
|
|
662
683
|
getLowerCaseLabel = getLowerCaseLabel;
|
|
663
684
|
doesLabelMatch = doesLabelMatch;
|
|
664
|
-
getFilterFn() {
|
|
665
|
-
return getFilterFn(this.props.filter);
|
|
666
|
-
}
|
|
667
685
|
getListItems(rawFilterString, data) {
|
|
668
686
|
const {
|
|
669
687
|
filteredData,
|