@jetbrains/ring-ui-built 7.0.19 → 7.0.21
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/_rollupPluginBabelHelpers.js +5 -5
- package/components/_helpers/card.js +5 -5
- package/components/_helpers/input.js +7 -7
- package/components/_helpers/list.js +1 -1
- package/components/_helpers/select__filter.js +2 -2
- package/components/_helpers/sidebar.js +2 -2
- package/components/alert/alert.js +2 -2
- package/components/alert-service/alert-service.js +2 -2
- package/components/analytics/analytics.js +1 -1
- package/components/analytics/analytics__custom-plugin.js +8 -8
- package/components/auth/auth__core.js +54 -54
- package/components/auth/background-flow.js +4 -4
- package/components/auth/iframe-flow.js +7 -7
- package/components/auth/request-builder.js +3 -3
- package/components/auth/response-parser.js +4 -4
- package/components/auth/storage.js +12 -12
- package/components/auth/token-validator.js +7 -7
- package/components/auth/window-flow.js +7 -7
- package/components/auth-dialog/auth-dialog.js +1 -1
- package/components/avatar/avatar.d.ts +2 -0
- package/components/avatar/avatar.js +8 -0
- package/components/avatar-stack/avatar-stack.d.ts +15 -0
- package/components/avatar-stack/avatar-stack.js +117 -0
- package/components/button/button.js +2 -2
- package/components/caret/caret.js +6 -6
- package/components/checkbox/checkbox.js +1 -1
- package/components/clipboard/clipboard-fallback.js +3 -3
- package/components/code/code.js +1 -1
- package/components/collapse/collapse-content.js +2 -2
- package/components/collapse/collapse.js +1 -1
- package/components/data-list/data-list.js +3 -3
- package/components/data-list/item.js +1 -1
- package/components/date-picker/consts.js +1 -1
- package/components/date-picker/date-input.js +5 -5
- package/components/date-picker/date-picker.js +9 -9
- package/components/date-picker/date-popup.js +4 -4
- package/components/date-picker/years.js +1 -1
- package/components/dialog/dialog.js +1 -1
- package/components/dropdown/dropdown.js +4 -4
- package/components/editable-heading/editable-heading.js +4 -4
- package/components/global/focus-sensor-hoc.js +10 -10
- package/components/global/memoize.js +1 -1
- package/components/global/normalize-indent.js +1 -1
- package/components/global/react-dom-renderer.js +1 -1
- package/components/global/schedule-raf.js +1 -1
- package/components/header/profile.js +8 -8
- package/components/header/smart-profile.js +2 -2
- package/components/header/smart-services.js +4 -4
- package/components/http/http.js +9 -9
- package/components/http/http.mock.js +3 -3
- package/components/hub-source/hub-source.js +6 -6
- package/components/hub-source/hub-source__user.js +2 -2
- package/components/hub-source/hub-source__users-groups.js +4 -4
- package/components/i18n/i18n.js +1 -1
- package/components/island/adaptive-island-hoc.js +1 -1
- package/components/island/content.js +3 -3
- package/components/island/header.js +1 -1
- package/components/list/list.js +4 -4
- package/components/list/list__item.js +2 -2
- package/components/list/list__link.js +1 -1
- package/components/list/list__users-groups-source.js +2 -2
- package/components/loader/loader.js +2 -2
- package/components/loader/loader__core.js +27 -27
- package/components/login-dialog/login-dialog.js +1 -1
- package/components/message/message.js +14 -14
- package/components/old-browsers-message/white-list.js +3 -3
- package/components/pager/pager.js +9 -9
- package/components/permissions/permissions.js +7 -7
- package/components/permissions/permissions__cache.js +4 -4
- package/components/popup/popup.js +8 -8
- package/components/popup/position.js +1 -1
- package/components/popup-menu/popup-menu.js +1 -1
- package/components/progress-bar/progress-bar.js +2 -2
- package/components/query-assist/query-assist.js +43 -43
- package/components/radio/radio__item.js +2 -2
- package/components/select/select.js +27 -27
- package/components/select/select__popup.js +9 -9
- package/components/shortcuts/core.js +1 -1
- package/components/slider/slider.js +8 -8
- package/components/slider/slider.utils.js +1 -1
- package/components/storage/storage__local.js +1 -1
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +4 -4
- package/components/table/header-cell.js +2 -2
- package/components/table/multitable.js +7 -7
- package/components/table/row-with-focus-sensor.js +4 -4
- package/components/table/row.js +1 -1
- package/components/table/selection-shortcuts-hoc.js +12 -12
- package/components/table/selection.js +7 -7
- package/components/table/table.js +1 -1
- package/components/tabs/collapsible-tab.js +3 -3
- package/components/tabs/collapsible-tabs.js +6 -6
- package/components/tabs/dumb-tabs.js +1 -1
- package/components/tabs/smart-tabs.js +1 -1
- package/components/tag/tag.js +2 -2
- package/components/tags-input/tags-input.js +17 -17
- package/components/tooltip/tooltip.js +10 -10
- package/components/upload/upload.js +3 -3
- package/components/user-agreement/service.js +3 -3
- package/components/user-agreement/user-agreement.js +8 -8
- package/components/user-card/card.js +2 -2
- package/components/user-card/user-card.js +2 -2
- package/package.json +3 -3
- package/typings.d.ts +5 -0
@@ -33,10 +33,10 @@ const Slider = _ref => {
|
|
33
33
|
} = _ref;
|
34
34
|
const ref = useRef(null);
|
35
35
|
const previouslyDragged = useRef(false);
|
36
|
-
const [values, setValues] = useState(defaultValue !== null && defaultValue !==
|
37
|
-
const validValues = useMemo(() => toRange(value !== null && value !==
|
36
|
+
const [values, setValues] = useState(defaultValue !== null && defaultValue !== undefined ? defaultValue : min);
|
37
|
+
const validValues = useMemo(() => toRange(value !== null && value !== undefined ? value : values, min, max), [max, min, value, values]);
|
38
38
|
const validStep = step < 0 ? 0 : step;
|
39
|
-
const isRange = isArray(defaultValue !== null && defaultValue !==
|
39
|
+
const isRange = isArray(defaultValue !== null && defaultValue !== undefined ? defaultValue : value);
|
40
40
|
const [isDragging, setIsDragging] = useState(false);
|
41
41
|
const [draggedIndex, setDraggedIndex] = useState(-1);
|
42
42
|
const [shortcutsScope] = useState(getUID('ring-slider-'));
|
@@ -60,7 +60,7 @@ const Slider = _ref => {
|
|
60
60
|
const trackLength = useMemo(() => toPercent(Math.max(...validValues), min, max) - trackStart, [max, min, trackStart, validValues]);
|
61
61
|
const handleValueChange = useCallback(nextValues => {
|
62
62
|
setValues(nextValues);
|
63
|
-
onChange === null || onChange ===
|
63
|
+
onChange === null || onChange === undefined || onChange(isRange ? nextValues : nextValues[0]);
|
64
64
|
}, [isRange, onChange]);
|
65
65
|
const shortcutsMap = useMemo(() => {
|
66
66
|
const setValueAndSwap = (nextValue, index) => {
|
@@ -70,12 +70,12 @@ const Slider = _ref => {
|
|
70
70
|
var _ref$current;
|
71
71
|
const previousValue = nextValues[index];
|
72
72
|
nextValues.reverse();
|
73
|
-
const thumb = (_ref$current = ref.current) === null || _ref$current ===
|
74
|
-
thumb === null || thumb ===
|
73
|
+
const thumb = (_ref$current = ref.current) === null || _ref$current === undefined ? undefined : _ref$current.querySelector("[role=\"slider\"][data-index=\"".concat(nextValues.indexOf(previousValue), "\"]"));
|
74
|
+
thumb === null || thumb === undefined || thumb.focus();
|
75
75
|
}
|
76
76
|
handleValueChange(nextValues);
|
77
77
|
};
|
78
|
-
const getIndex = target => Number(target === null || target ===
|
78
|
+
const getIndex = target => Number(target === null || target === undefined ? undefined : target.getAttribute('data-index'));
|
79
79
|
const map = {};
|
80
80
|
if (!disabled) {
|
81
81
|
map.left = map.down = _ref2 => {
|
@@ -238,7 +238,7 @@ const Slider = _ref => {
|
|
238
238
|
className: classNames(styles.markValue, {
|
239
239
|
[styles.disabled]: disabled
|
240
240
|
}),
|
241
|
-
children: label !== null && label !==
|
241
|
+
children: label !== null && label !== undefined ? label : markValue
|
242
242
|
}, index);
|
243
243
|
}), tickMarks.map((_ref9, index) => {
|
244
244
|
let {
|
@@ -22,7 +22,7 @@ function calculateValue(ref, x, min, max, step) {
|
|
22
22
|
left
|
23
23
|
} = ref.current.getBoundingClientRect();
|
24
24
|
const value = toValue((x - left) / width, min, max);
|
25
|
-
const precision = (_step$toString$split = step.toString().split('.')) === null || _step$toString$split ===
|
25
|
+
const precision = (_step$toString$split = step.toString().split('.')) === null || _step$toString$split === undefined || (_step$toString$split = _step$toString$split[1]) === null || _step$toString$split === undefined ? undefined : _step$toString$split.length;
|
26
26
|
return Number(roundToStep(value, step, min).toFixed(precision));
|
27
27
|
}
|
28
28
|
function validateValue(value, min, max) {
|
@@ -61,7 +61,7 @@ class LocalStorage {
|
|
61
61
|
}
|
62
62
|
constructor() {
|
63
63
|
let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
64
|
-
_defineProperty(this, "storageType",
|
64
|
+
_defineProperty(this, "storageType", undefined);
|
65
65
|
this.storageType = config.type === 'session' ? 'sessionStorage' : 'localStorage';
|
66
66
|
}
|
67
67
|
/**
|