@jetbrains/ring-ui 5.0.35 → 5.0.37
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/date-picker/date-popup.js +3 -1
- package/components/editable-heading/editable-heading.css +69 -0
- package/components/editable-heading/editable-heading.d.ts +21 -0
- package/components/editable-heading/editable-heading.js +34 -0
- package/components/input/input.css +2 -0
- package/components/query-assist/query-assist.js +1 -1
- package/dist/_helpers/_rollupPluginBabelHelpers.js +0 -4
- package/dist/_helpers/anchor.js +0 -1
- package/dist/_helpers/card.js +0 -3
- package/dist/_helpers/dialog__body-scroll-preventer.js +0 -11
- package/dist/_helpers/footer.js +2 -13
- package/dist/_helpers/query-assist__suggestions.js +0 -10
- package/dist/_helpers/select__filter.js +0 -11
- package/dist/_helpers/services-link.js +0 -2
- package/dist/_helpers/sidebar.js +0 -12
- package/dist/_helpers/theme.js +0 -3
- package/dist/_helpers/title.js +0 -9
- package/dist/alert/alert.js +2 -32
- package/dist/alert/container.js +0 -5
- package/dist/alert-service/alert-service.js +0 -26
- package/dist/analytics/analytics.js +0 -22
- package/dist/analytics/analytics__custom-plugin.js +0 -38
- package/dist/analytics/analytics__fus-plugin.js +0 -20
- package/dist/analytics/analytics__ga-plugin.js +0 -13
- package/dist/analytics/analytics__plugin-utils.js +0 -8
- package/dist/analytics-ng/analytics-ng.js +3 -9
- package/dist/auth/auth.js +2 -3
- package/dist/auth/auth__core.js +30 -243
- package/dist/auth/background-flow.js +2 -25
- package/dist/auth/down-notification.js +0 -7
- package/dist/auth/iframe-flow.js +2 -26
- package/dist/auth/landing.js +2 -6
- package/dist/auth/request-builder.js +0 -11
- package/dist/auth/response-parser.js +4 -26
- package/dist/auth/storage.js +4 -60
- package/dist/auth/token-validator.js +6 -42
- package/dist/auth/window-flow.js +2 -34
- package/dist/auth-dialog/auth-dialog.js +2 -12
- package/dist/auth-dialog-service/auth-dialog-service.js +2 -4
- package/dist/auth-ng/auth-ng.js +6 -22
- package/dist/auth-ng/auth-ng.mock.js +0 -4
- package/dist/autofocus-ng/autofocus-ng.js +0 -5
- package/dist/avatar/avatar.js +4 -17
- package/dist/avatar/fallback-avatar.js +2 -9
- package/dist/avatar-editor-ng/avatar-editor-ng.js +1 -17
- package/dist/badge/badge.js +0 -3
- package/dist/button/button.js +0 -8
- package/dist/button-group/button-group.js +0 -3
- package/dist/button-group/caption.js +0 -2
- package/dist/button-group-ng/button-group-ng.js +0 -4
- package/dist/button-ng/button-ng.js +3 -21
- package/dist/button-set/button-set.js +0 -3
- package/dist/button-set-ng/button-set-ng.js +0 -2
- package/dist/button-toolbar/button-toolbar.js +0 -3
- package/dist/button-toolbar-ng/button-toolbar-ng.js +0 -2
- package/dist/caret/caret.js +2 -53
- package/dist/checkbox/checkbox.js +0 -12
- package/dist/code/code.js +3 -25
- package/dist/compiler-ng/compiler-ng.js +0 -5
- package/dist/confirm/confirm.js +0 -6
- package/dist/confirm-service/confirm-service.js +10 -8
- package/dist/content-layout/content-layout.js +0 -7
- package/dist/contenteditable/contenteditable.js +6 -13
- package/dist/data-list/data-list.js +4 -28
- package/dist/data-list/item.js +0 -15
- package/dist/data-list/selection.js +0 -27
- package/dist/date-picker/consts.js +0 -7
- package/dist/date-picker/date-input.js +0 -20
- package/dist/date-picker/date-picker.js +2 -36
- package/dist/date-picker/date-popup.js +21 -72
- package/dist/date-picker/day.js +0 -14
- package/dist/date-picker/month-names.js +0 -9
- package/dist/date-picker/month-slider.js +0 -10
- package/dist/date-picker/month.js +2 -4
- package/dist/date-picker/months.js +6 -13
- package/dist/date-picker/years.js +0 -14
- package/dist/dialog/dialog.js +0 -19
- package/dist/dialog-ng/dialog-ng.js +17 -105
- package/dist/docked-panel-ng/docked-panel-ng.js +6 -29
- package/dist/dropdown/dropdown.js +2 -33
- package/dist/dropdown-menu/dropdown-menu.js +4 -8
- package/dist/editable-heading/editable-heading.d.ts +21 -0
- package/dist/editable-heading/editable-heading.js +85 -0
- package/dist/error-bubble/error-bubble.js +2 -4
- package/dist/error-message/error-message.js +0 -3
- package/dist/footer-ng/footer-ng.js +0 -13
- package/dist/form-ng/form-ng.js +1 -21
- package/dist/global/angular-component-factory.js +0 -10
- package/dist/global/compose.js +0 -1
- package/dist/global/composeRefs.js +0 -1
- package/dist/global/controls-height.js +0 -2
- package/dist/global/create-stateful-context.js +0 -5
- package/dist/global/data-tests.js +0 -4
- package/dist/global/dom.js +2 -11
- package/dist/global/focus-sensor-hoc.js +4 -33
- package/dist/global/fuzzy-highlight.js +2 -16
- package/dist/global/get-event-key.js +8 -17
- package/dist/global/get-uid.js +0 -2
- package/dist/global/linear-function.js +0 -2
- package/dist/global/listeners.js +0 -13
- package/dist/global/memoize.js +0 -2
- package/dist/global/normalize-indent.js +2 -5
- package/dist/global/react-dom-renderer.js +0 -8
- package/dist/global/react-render-adapter.js +0 -7
- package/dist/global/rerender-hoc.js +0 -7
- package/dist/global/ring-angular-component.js +0 -5
- package/dist/global/schedule-raf.js +0 -5
- package/dist/global/trivial-template-tag.js +2 -3
- package/dist/global/url.js +0 -27
- package/dist/grid/col.js +0 -4
- package/dist/grid/grid.js +0 -3
- package/dist/grid/row.js +0 -5
- package/dist/group/group.js +0 -3
- package/dist/header/header.js +0 -5
- package/dist/header/logo.js +0 -4
- package/dist/header/profile.js +0 -7
- package/dist/header/services.js +0 -11
- package/dist/header/smart-profile.js +4 -18
- package/dist/header/smart-services.js +0 -17
- package/dist/header/tray-icon.js +2 -3
- package/dist/header/tray.js +0 -3
- package/dist/heading/heading.js +0 -5
- package/dist/http/http.js +20 -65
- package/dist/http/http.mock.js +2 -14
- package/dist/hub-source/hub-source.js +0 -32
- package/dist/hub-source/hub-source__user.js +0 -1
- package/dist/hub-source/hub-source__users-groups.js +0 -12
- package/dist/icon/icon.js +0 -13
- package/dist/icon/icon__constants.js +0 -4
- package/dist/icon/icon__svg.js +0 -10
- package/dist/icon-ng/icon-ng.js +2 -7
- package/dist/input/input.js +0 -30
- package/dist/input-ng/input-ng.js +0 -17
- package/dist/island/adaptive-island-hoc.js +0 -7
- package/dist/island/content.js +0 -25
- package/dist/island/header.js +0 -7
- package/dist/island/island.js +0 -4
- package/dist/island-legacy/content-legacy.js +0 -2
- package/dist/island-legacy/header-legacy.js +0 -2
- package/dist/island-legacy/island-legacy.js +0 -2
- package/dist/island-ng/island-content-ng.js +0 -3
- package/dist/link/clickableLink.js +2 -10
- package/dist/link/link.js +2 -9
- package/dist/link-ng/link-ng.js +0 -2
- package/dist/list/consts.js +0 -4
- package/dist/list/list.js +6 -128
- package/dist/list/list__custom.js +0 -4
- package/dist/list/list__hint.js +0 -3
- package/dist/list/list__item.js +0 -8
- package/dist/list/list__link.js +2 -3
- package/dist/list/list__separator.js +0 -1
- package/dist/list/list__title.js +0 -1
- package/dist/list/list__users-groups-source.js +4 -17
- package/dist/loader/loader.js +0 -10
- package/dist/loader/loader__core.js +6 -70
- package/dist/loader-inline/loader-inline.js +0 -3
- package/dist/loader-ng/loader-ng.js +0 -7
- package/dist/loader-screen/loader-screen.js +0 -3
- package/dist/loader-screen-ng/loader-screen-ng.js +2 -14
- package/dist/login-dialog/login-dialog.js +0 -15
- package/dist/login-dialog/service.js +2 -4
- package/dist/markdown/code.js +0 -2
- package/dist/markdown/heading.js +0 -1
- package/dist/markdown/link.js +0 -1
- package/dist/markdown/markdown.js +0 -2
- package/dist/message/message.js +0 -24
- package/dist/message-bundle-ng/message-bundle-ng.js +2 -45
- package/dist/old-browsers-message/old-browsers-message.js +2 -21
- package/dist/old-browsers-message/white-list.js +2 -6
- package/dist/pager/pager.js +2 -39
- package/dist/panel/panel.js +0 -3
- package/dist/permissions/permissions.js +1 -43
- package/dist/permissions/permissions__cache.js +12 -63
- package/dist/permissions-ng/permissions-ng.js +11 -19
- package/dist/place-under-ng/place-under-ng.js +0 -19
- package/dist/popup/popup.consts.js +0 -11
- package/dist/popup/popup.js +6 -68
- package/dist/popup/position.js +8 -30
- package/dist/popup-menu/popup-menu.js +4 -13
- package/dist/progress-bar/progress-bar.js +0 -14
- package/dist/promised-click-ng/promised-click-ng.js +3 -22
- package/dist/query-assist/query-assist.js +17 -201
- package/dist/radio/radio.js +0 -6
- package/dist/radio/radio__item.js +0 -9
- package/dist/radio-ng/radio-ng.js +0 -4
- package/dist/save-field-ng/save-field-ng.js +1 -37
- package/dist/select/select.js +18 -208
- package/dist/select/select__popup.js +4 -76
- package/dist/select-ng/select-ng.js +18 -74
- package/dist/select-ng/select-ng__lazy.js +2 -17
- package/dist/select-ng/select-ng__options.js +3 -29
- package/dist/shortcuts/core.js +4 -56
- package/dist/shortcuts/shortcuts-hoc.js +0 -4
- package/dist/shortcuts/shortcuts.js +0 -10
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +0 -13
- package/dist/shortcuts-ng/shortcuts-ng.js +16 -46
- package/dist/sidebar-ng/sidebar-ng.js +2 -12
- package/dist/storage/storage.js +2 -5
- package/dist/storage/storage__fallback.js +2 -48
- package/dist/storage/storage__local.js +0 -23
- package/dist/style.css +1 -1
- package/dist/tab-trap/tab-trap.js +0 -37
- package/dist/table/cell.js +0 -2
- package/dist/table/disable-hover-hoc.js +0 -9
- package/dist/table/header-cell.js +0 -8
- package/dist/table/header.js +0 -16
- package/dist/table/multitable.js +0 -23
- package/dist/table/row-with-focus-sensor.js +0 -12
- package/dist/table/row.js +0 -18
- package/dist/table/selection-adapter.js +0 -2
- package/dist/table/selection-shortcuts-hoc.js +8 -42
- package/dist/table/selection.js +0 -50
- package/dist/table/smart-table.js +0 -9
- package/dist/table/table.js +6 -37
- package/dist/table-legacy-ng/table-legacy-ng.js +12 -42
- package/dist/table-legacy-ng/table-legacy-ng__selection-navigate-actions.js +0 -31
- package/dist/table-legacy-ng/table-legacy-ng__selection.js +0 -32
- package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +2 -5
- package/dist/tabs/collapsible-more.js +0 -5
- package/dist/tabs/collapsible-tab.js +0 -4
- package/dist/tabs/collapsible-tabs.js +8 -28
- package/dist/tabs/dumb-tabs.js +0 -8
- package/dist/tabs/smart-tabs.js +0 -6
- package/dist/tabs/tab-link.js +0 -1
- package/dist/tabs/tab.js +0 -2
- package/dist/tabs-ng/tabs-ng.js +13 -29
- package/dist/tag/tag.js +0 -24
- package/dist/tags-input/tags-input.js +0 -76
- package/dist/tags-list/tags-list.js +0 -6
- package/dist/template-ng/template-ng.js +0 -12
- package/dist/text/text.js +0 -3
- package/dist/theme-ng/theme-ng.js +0 -8
- package/dist/title-ng/title-ng.js +6 -17
- package/dist/toggle/toggle.js +0 -4
- package/dist/tooltip/tooltip.js +4 -35
- package/dist/tooltip-ng/tooltip-ng.js +2 -8
- package/dist/user-agreement/service.js +0 -62
- package/dist/user-agreement/user-agreement.js +0 -8
- package/dist/user-card/smart-user-card-tooltip.js +2 -8
- package/dist/user-card/tooltip.js +0 -3
- package/package.json +22 -22
|
@@ -87,7 +87,9 @@ export default class DatePopup extends Component {
|
|
|
87
87
|
isInTimeMode = () => !this.props.range && this.props.withTime || false;
|
|
88
88
|
componentRef = React.createRef();
|
|
89
89
|
handleWheel = (e) => {
|
|
90
|
-
e.
|
|
90
|
+
if (e.cancelable) {
|
|
91
|
+
e.preventDefault();
|
|
92
|
+
}
|
|
91
93
|
};
|
|
92
94
|
parse(text, type) {
|
|
93
95
|
if (type === 'time') {
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
@value unit from "../global/global.css";
|
|
2
|
+
|
|
3
|
+
.editableHeading {
|
|
4
|
+
display: flex;
|
|
5
|
+
gap: unit;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.heading.heading {
|
|
9
|
+
margin-bottom: 0;
|
|
10
|
+
|
|
11
|
+
line-height: 28px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.heading {
|
|
15
|
+
padding: 6px 0;
|
|
16
|
+
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
|
|
19
|
+
border-radius: var(--ring-border-radius);
|
|
20
|
+
|
|
21
|
+
&:hover {
|
|
22
|
+
background-color: var(--ring-hover-background-color);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.input {
|
|
27
|
+
margin-bottom: 2px;
|
|
28
|
+
padding: 0;
|
|
29
|
+
padding-top: 6px;
|
|
30
|
+
padding-bottom: 3px;
|
|
31
|
+
|
|
32
|
+
color: var(--ring-heading-color);
|
|
33
|
+
caret-color: var(--ring-main-color);
|
|
34
|
+
|
|
35
|
+
border: none;
|
|
36
|
+
border-bottom: 1px solid var(--ring-borders-color);
|
|
37
|
+
outline: none;
|
|
38
|
+
|
|
39
|
+
font-family: var(--ring-font-family);
|
|
40
|
+
font-weight: bold;
|
|
41
|
+
line-height: 28px;
|
|
42
|
+
|
|
43
|
+
&::placeholder {
|
|
44
|
+
color: var(--ring-disabled-color);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:focus {
|
|
48
|
+
margin-bottom: 1px;
|
|
49
|
+
|
|
50
|
+
border-bottom-width: 2px;
|
|
51
|
+
border-bottom-color: var(--ring-main-color);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.button {
|
|
56
|
+
margin: 6px 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.level1 {
|
|
60
|
+
font-size: 24px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.level2 {
|
|
64
|
+
font-size: 20px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.level3 {
|
|
68
|
+
font-size: 14px;
|
|
69
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Levels } from '../heading/heading';
|
|
3
|
+
import { Size } from '../input/input';
|
|
4
|
+
export { Levels };
|
|
5
|
+
export interface EditableHeadingProps {
|
|
6
|
+
level?: Levels;
|
|
7
|
+
className?: string | null;
|
|
8
|
+
editing?: boolean;
|
|
9
|
+
edited?: boolean;
|
|
10
|
+
children?: string;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
embedded?: boolean;
|
|
13
|
+
size?: Size;
|
|
14
|
+
onEdit?: () => void;
|
|
15
|
+
onChange?: (text: string) => void;
|
|
16
|
+
onSave?: () => void;
|
|
17
|
+
onCancel?: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const EditableHeading: ({ level, className, editing, edited, children, placeholder, embedded, size, onEdit, onChange, onSave, onCancel }: EditableHeadingProps) => JSX.Element;
|
|
20
|
+
declare const _default: React.MemoExoticComponent<({ level, className, editing, edited, children, placeholder, embedded, size, onEdit, onChange, onSave, onCancel }: EditableHeadingProps) => JSX.Element>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import Heading, { Levels } from '../heading/heading';
|
|
4
|
+
import Button from '../button/button';
|
|
5
|
+
import { Size } from '../input/input';
|
|
6
|
+
import inputStyles from '../input/input.css';
|
|
7
|
+
import { ControlsHeight } from '../global/controls-height';
|
|
8
|
+
import getUID from '../global/get-uid';
|
|
9
|
+
import Shortcuts from '../shortcuts/shortcuts';
|
|
10
|
+
import styles from './editable-heading.css';
|
|
11
|
+
export { Levels };
|
|
12
|
+
function noop() { }
|
|
13
|
+
const shortcutsScope = getUID('ring-editable-heading-');
|
|
14
|
+
export const EditableHeading = ({ level = Levels.H1, className, editing, edited, children, placeholder, embedded = false, size = Size.L, onEdit, onChange, onSave = noop, onCancel = noop }) => {
|
|
15
|
+
const onInputChange = (e) => {
|
|
16
|
+
onChange?.(e.target.value);
|
|
17
|
+
};
|
|
18
|
+
return (<div className={classNames(styles.editableHeading, className)}>
|
|
19
|
+
{editing
|
|
20
|
+
? (<>
|
|
21
|
+
{!embedded && (<Shortcuts map={{ enter: onSave, esc: onCancel }} scope={shortcutsScope}/>)}
|
|
22
|
+
|
|
23
|
+
<input className={classNames('ring-js-shortcuts', styles.input, [inputStyles[`size${size}`], [[styles[`level${level}`]]]])} value={children} onChange={onInputChange} placeholder={placeholder} autoFocus/>
|
|
24
|
+
</>)
|
|
25
|
+
: (<Heading className={classNames(styles.heading, [inputStyles[`size${size}`]])} level={level} onClick={onEdit}>{children}</Heading>)}
|
|
26
|
+
|
|
27
|
+
{editing && !embedded && (<>
|
|
28
|
+
<Button height={ControlsHeight.M} className={styles.button} primary disabled={!edited || !children || children?.trim() === ''} onClick={onSave}>{'Save'}</Button>
|
|
29
|
+
|
|
30
|
+
<Button height={ControlsHeight.M} className={styles.button} onClick={onCancel}>{'Cancel'}</Button>
|
|
31
|
+
</>)}
|
|
32
|
+
</div>);
|
|
33
|
+
};
|
|
34
|
+
export default React.memo(EditableHeading);
|
|
@@ -431,7 +431,7 @@ export default class QueryAssist extends Component {
|
|
|
431
431
|
if (!this.props.disabled && (caret !== this.immediateState.caret || popupHidden)) {
|
|
432
432
|
this.immediateState.caret = caret;
|
|
433
433
|
this.scrollInput();
|
|
434
|
-
if (this.
|
|
434
|
+
if (this.immediateState.query.length > 0) {
|
|
435
435
|
this.requestData?.();
|
|
436
436
|
}
|
|
437
437
|
}
|
|
@@ -9,22 +9,18 @@ function _defineProperty(obj, key, value) {
|
|
|
9
9
|
} else {
|
|
10
10
|
obj[key] = value;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
12
|
return obj;
|
|
14
13
|
}
|
|
15
|
-
|
|
16
14
|
function _extends() {
|
|
17
15
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
18
16
|
for (var i = 1; i < arguments.length; i++) {
|
|
19
17
|
var source = arguments[i];
|
|
20
|
-
|
|
21
18
|
for (var key in source) {
|
|
22
19
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
23
20
|
target[key] = source[key];
|
|
24
21
|
}
|
|
25
22
|
}
|
|
26
23
|
}
|
|
27
|
-
|
|
28
24
|
return target;
|
|
29
25
|
};
|
|
30
26
|
return _extends.apply(this, arguments);
|
package/dist/_helpers/anchor.js
CHANGED
package/dist/_helpers/card.js
CHANGED
|
@@ -41,9 +41,7 @@ class UserCard extends PureComponent {
|
|
|
41
41
|
title: user.online ? wording.online : wording.offline
|
|
42
42
|
}), user.login), user.email && /*#__PURE__*/React.createElement("div", null, user.email))), children);
|
|
43
43
|
}
|
|
44
|
-
|
|
45
44
|
}
|
|
46
|
-
|
|
47
45
|
_defineProperty(UserCard, "propTypes", {
|
|
48
46
|
children: PropTypes.node,
|
|
49
47
|
className: PropTypes.string,
|
|
@@ -63,7 +61,6 @@ _defineProperty(UserCard, "propTypes", {
|
|
|
63
61
|
offline: PropTypes.string.isRequired
|
|
64
62
|
})
|
|
65
63
|
});
|
|
66
|
-
|
|
67
64
|
_defineProperty(UserCard, "defaultProps", {
|
|
68
65
|
wording: {
|
|
69
66
|
banned: 'banned',
|
|
@@ -4,47 +4,36 @@ var modules_5e9b8c03 = {"unit":"8px","header":"header_rui_1d72","container":"con
|
|
|
4
4
|
|
|
5
5
|
const isPrevented = new Set();
|
|
6
6
|
let previousDocumentWidth = null;
|
|
7
|
-
|
|
8
7
|
const prevent = key => {
|
|
9
8
|
if (isPrevented.has(key)) {
|
|
10
9
|
return;
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
isPrevented.add(key);
|
|
14
|
-
|
|
15
12
|
if (isPrevented.size > 1) {
|
|
16
13
|
return;
|
|
17
14
|
}
|
|
18
|
-
|
|
19
15
|
const documentHasScroll = document.documentElement.scrollHeight > window.innerHeight || getComputedStyle(document.documentElement).overflowY === 'scroll';
|
|
20
16
|
document.documentElement.classList.add(modules_5e9b8c03.documentWithoutScroll);
|
|
21
17
|
const scrollWidth = scrollbarWidth();
|
|
22
|
-
|
|
23
18
|
if (documentHasScroll && scrollWidth != null && scrollWidth > 0) {
|
|
24
19
|
previousDocumentWidth = document.documentElement.style.width;
|
|
25
20
|
document.documentElement.style.width = `calc(100% - ${scrollWidth}px)`;
|
|
26
21
|
}
|
|
27
22
|
};
|
|
28
|
-
|
|
29
23
|
const reset = key => {
|
|
30
24
|
if (isPrevented.size === 0) {
|
|
31
25
|
return;
|
|
32
26
|
}
|
|
33
|
-
|
|
34
27
|
isPrevented.delete(key);
|
|
35
|
-
|
|
36
28
|
if (isPrevented.size > 0) {
|
|
37
29
|
return;
|
|
38
30
|
}
|
|
39
|
-
|
|
40
31
|
document.documentElement.classList.remove(modules_5e9b8c03.documentWithoutScroll);
|
|
41
|
-
|
|
42
32
|
if (previousDocumentWidth !== null) {
|
|
43
33
|
document.documentElement.style.width = previousDocumentWidth;
|
|
44
34
|
previousDocumentWidth = null;
|
|
45
35
|
}
|
|
46
36
|
};
|
|
47
|
-
|
|
48
37
|
const preventerFactory = key => {
|
|
49
38
|
const preventerKey = key || Math.random();
|
|
50
39
|
return {
|
package/dist/_helpers/footer.js
CHANGED
|
@@ -30,35 +30,28 @@ FooterColumn.propTypes = {
|
|
|
30
30
|
* @param year {int}
|
|
31
31
|
* @returns {string}
|
|
32
32
|
*/
|
|
33
|
-
|
|
34
33
|
function copyright(year) {
|
|
35
34
|
const currentYear = new Date().getUTCFullYear();
|
|
36
35
|
const ndash = '–';
|
|
37
36
|
let ret = 'Copyright © ';
|
|
38
|
-
|
|
39
37
|
if (year >= currentYear) {
|
|
40
38
|
ret += year;
|
|
41
39
|
} else {
|
|
42
40
|
ret += year + ndash + currentYear;
|
|
43
41
|
}
|
|
44
|
-
|
|
45
42
|
return ret;
|
|
46
43
|
}
|
|
47
44
|
/**
|
|
48
45
|
* @constructor
|
|
49
46
|
* @extends {ReactComponent}
|
|
50
47
|
*/
|
|
51
|
-
|
|
52
48
|
const FooterLine = /*#__PURE__*/memo(function FooterLine(props) {
|
|
53
49
|
const items = Array.isArray(props.item) ? props.item : [props.item];
|
|
54
|
-
|
|
55
50
|
function renderItem(item) {
|
|
56
51
|
if ( /*#__PURE__*/isValidElement(item) || typeof item !== 'object') {
|
|
57
52
|
return item;
|
|
58
53
|
}
|
|
59
|
-
|
|
60
54
|
const element = (item.copyright ? copyright(item.copyright) : '') + (item.label || item);
|
|
61
|
-
|
|
62
55
|
if (item.url) {
|
|
63
56
|
return /*#__PURE__*/React.createElement(Link, {
|
|
64
57
|
href: item.url,
|
|
@@ -67,10 +60,8 @@ const FooterLine = /*#__PURE__*/memo(function FooterLine(props) {
|
|
|
67
60
|
title: item.title
|
|
68
61
|
}, element);
|
|
69
62
|
}
|
|
70
|
-
|
|
71
63
|
return element;
|
|
72
64
|
}
|
|
73
|
-
|
|
74
65
|
return /*#__PURE__*/React.createElement("li", {
|
|
75
66
|
className: modules_7385b3fd.line
|
|
76
67
|
}, items.map(renderItem));
|
|
@@ -86,22 +77,20 @@ const Footer = /*#__PURE__*/memo(function Footer(_ref2) {
|
|
|
86
77
|
center,
|
|
87
78
|
right
|
|
88
79
|
} = _ref2;
|
|
89
|
-
|
|
90
80
|
function content(elements, position) {
|
|
91
81
|
if (!elements) {
|
|
92
82
|
return false;
|
|
93
83
|
}
|
|
94
|
-
|
|
95
84
|
return /*#__PURE__*/React.createElement(FooterColumn, {
|
|
96
85
|
key: position,
|
|
97
86
|
position: position
|
|
98
|
-
}, elements.map((item, idx) => /*#__PURE__*/React.createElement(FooterLine
|
|
87
|
+
}, elements.map((item, idx) => /*#__PURE__*/React.createElement(FooterLine
|
|
88
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
99
89
|
, {
|
|
100
90
|
key: idx,
|
|
101
91
|
item: item
|
|
102
92
|
})));
|
|
103
93
|
}
|
|
104
|
-
|
|
105
94
|
const classes = classNames(modules_7385b3fd.footer, className, {
|
|
106
95
|
[modules_7385b3fd.footerFloating]: floating
|
|
107
96
|
});
|
|
@@ -20,7 +20,6 @@ class QueryAssistSuggestions {
|
|
|
20
20
|
} = suggestion;
|
|
21
21
|
return prefix + option + suffix + group + description + (icon ? icon.substring(icon.length - ICON_ID_LENGTH) : '');
|
|
22
22
|
}
|
|
23
|
-
|
|
24
23
|
static renderLabel(suggestion) {
|
|
25
24
|
const {
|
|
26
25
|
className,
|
|
@@ -33,7 +32,6 @@ class QueryAssistSuggestions {
|
|
|
33
32
|
let wrappedOption;
|
|
34
33
|
let before = '';
|
|
35
34
|
let after = '';
|
|
36
|
-
|
|
37
35
|
if (matchingStart !== matchingEnd) {
|
|
38
36
|
before = option.substring(0, matchingStart);
|
|
39
37
|
wrappedOption = /*#__PURE__*/React.createElement("span", {
|
|
@@ -43,7 +41,6 @@ class QueryAssistSuggestions {
|
|
|
43
41
|
} else {
|
|
44
42
|
wrappedOption = option;
|
|
45
43
|
}
|
|
46
|
-
|
|
47
44
|
const wrappedPrefix = prefix && /*#__PURE__*/React.createElement("span", {
|
|
48
45
|
className: modules_da7ab055.service
|
|
49
46
|
}, prefix);
|
|
@@ -54,7 +51,6 @@ class QueryAssistSuggestions {
|
|
|
54
51
|
className: className
|
|
55
52
|
}, wrappedPrefix, before, wrappedOption, after, wrappedSuffix);
|
|
56
53
|
}
|
|
57
|
-
|
|
58
54
|
static renderGroupSeparator(suggestion, prevSuggestion) {
|
|
59
55
|
const {
|
|
60
56
|
group,
|
|
@@ -63,7 +59,6 @@ class QueryAssistSuggestions {
|
|
|
63
59
|
const {
|
|
64
60
|
SEPARATOR
|
|
65
61
|
} = List.ListProps.Type;
|
|
66
|
-
|
|
67
62
|
if (prevSuggestion !== group) {
|
|
68
63
|
return {
|
|
69
64
|
key: option + group + SEPARATOR,
|
|
@@ -71,25 +66,20 @@ class QueryAssistSuggestions {
|
|
|
71
66
|
rgItemType: SEPARATOR
|
|
72
67
|
};
|
|
73
68
|
}
|
|
74
|
-
|
|
75
69
|
return null;
|
|
76
70
|
}
|
|
77
|
-
|
|
78
71
|
static renderList(suggestions, suggestionRenderer) {
|
|
79
72
|
const renderedSuggestions = [];
|
|
80
73
|
suggestions.forEach((suggestion, index, arr) => {
|
|
81
74
|
const prevSuggestionGroup = arr[index - 1] && arr[index - 1].group;
|
|
82
75
|
const groupSeparator = QueryAssistSuggestions.renderGroupSeparator(suggestion, prevSuggestionGroup);
|
|
83
|
-
|
|
84
76
|
if (groupSeparator) {
|
|
85
77
|
renderedSuggestions.push(groupSeparator);
|
|
86
78
|
}
|
|
87
|
-
|
|
88
79
|
renderedSuggestions.push(suggestionRenderer(suggestion));
|
|
89
80
|
});
|
|
90
81
|
return renderedSuggestions;
|
|
91
82
|
}
|
|
92
|
-
|
|
93
83
|
}
|
|
94
84
|
|
|
95
85
|
export { QueryAssistSuggestions as Q, modules_da7ab055 as m };
|
|
@@ -10,39 +10,31 @@ import { ControlsHeight } from '../global/controls-height.js';
|
|
|
10
10
|
var modules_b607bec2 = {"unit":"8px","filterWithTags":"filterWithTags_rui_531d","filterWrapper":"filterWrapper_rui_531d","filterWithTagsFocused":"filterWithTagsFocused_rui_531d","filter":"filter_rui_531d","filterIcon":"filterIcon_rui_531d","bottomLine":"bottomLine_rui_531d","message":"message_rui_531d","selectAll":"selectAll_rui_531d"};
|
|
11
11
|
|
|
12
12
|
function noop() {}
|
|
13
|
-
|
|
14
13
|
class SelectFilter extends Component {
|
|
15
14
|
constructor() {
|
|
16
15
|
super(...arguments);
|
|
17
|
-
|
|
18
16
|
_defineProperty(this, "input", void 0);
|
|
19
|
-
|
|
20
17
|
_defineProperty(this, "inputRef", el => {
|
|
21
18
|
this.input = el;
|
|
22
19
|
this.props.inputRef(el);
|
|
23
20
|
});
|
|
24
21
|
}
|
|
25
|
-
|
|
26
22
|
componentWillUnmount() {
|
|
27
23
|
this.blur();
|
|
28
24
|
}
|
|
29
|
-
|
|
30
25
|
focus() {
|
|
31
26
|
const {
|
|
32
27
|
input
|
|
33
28
|
} = this;
|
|
34
|
-
|
|
35
29
|
if (input && input !== document.activeElement) {
|
|
36
30
|
sniffr.browser.name === 'firefox' ? input.select() : input.focus();
|
|
37
31
|
}
|
|
38
32
|
}
|
|
39
|
-
|
|
40
33
|
blur() {
|
|
41
34
|
if (this.input && this.input === document.activeElement) {
|
|
42
35
|
this.input.blur();
|
|
43
36
|
}
|
|
44
37
|
}
|
|
45
|
-
|
|
46
38
|
render() {
|
|
47
39
|
const {
|
|
48
40
|
className,
|
|
@@ -61,14 +53,11 @@ class SelectFilter extends Component {
|
|
|
61
53
|
className: classes
|
|
62
54
|
})));
|
|
63
55
|
}
|
|
64
|
-
|
|
65
56
|
}
|
|
66
|
-
|
|
67
57
|
_defineProperty(SelectFilter, "defaultProps", {
|
|
68
58
|
placeholder: 'Filter items',
|
|
69
59
|
inputRef: noop
|
|
70
60
|
});
|
|
71
|
-
|
|
72
61
|
SelectFilter.propTypes = {
|
|
73
62
|
placeholder: PropTypes.string,
|
|
74
63
|
className: PropTypes.string,
|
|
@@ -24,9 +24,7 @@ class ServicesLink extends PureComponent {
|
|
|
24
24
|
key: "text"
|
|
25
25
|
}, /*#__PURE__*/React.createElement(WrapText, null, service.name))] : /*#__PURE__*/React.createElement(WrapText, null, service.name));
|
|
26
26
|
}
|
|
27
|
-
|
|
28
27
|
}
|
|
29
|
-
|
|
30
28
|
_defineProperty(ServicesLink, "propTypes", {
|
|
31
29
|
isActive: PropTypes.bool,
|
|
32
30
|
service: PropTypes.shape({
|
package/dist/_helpers/sidebar.js
CHANGED
|
@@ -11,15 +11,12 @@ const INSIDE = 'inside';
|
|
|
11
11
|
class Sidebar extends Component {
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments);
|
|
14
|
-
|
|
15
14
|
_defineProperty(this, "state", {
|
|
16
15
|
topIsOutside: true,
|
|
17
16
|
bottomIsOutside: true,
|
|
18
17
|
sidebarVisibleHeight: undefined
|
|
19
18
|
});
|
|
20
|
-
|
|
21
19
|
_defineProperty(this, "sidebarNode", void 0);
|
|
22
|
-
|
|
23
20
|
_defineProperty(this, "handleTopWaypoint", _ref => {
|
|
24
21
|
let {
|
|
25
22
|
currentPosition
|
|
@@ -28,7 +25,6 @@ class Sidebar extends Component {
|
|
|
28
25
|
topIsOutside: currentPosition === ABOVE
|
|
29
26
|
});
|
|
30
27
|
});
|
|
31
|
-
|
|
32
28
|
_defineProperty(this, "handleBottomWaypoint", _ref2 => {
|
|
33
29
|
let {
|
|
34
30
|
currentPosition,
|
|
@@ -39,12 +35,10 @@ class Sidebar extends Component {
|
|
|
39
35
|
bottomIsOutside: currentPosition !== INSIDE
|
|
40
36
|
});
|
|
41
37
|
});
|
|
42
|
-
|
|
43
38
|
_defineProperty(this, "sidebarRef", node => {
|
|
44
39
|
this.sidebarNode = node;
|
|
45
40
|
});
|
|
46
41
|
}
|
|
47
|
-
|
|
48
42
|
shouldUseFixation() {
|
|
49
43
|
const {
|
|
50
44
|
contentNode
|
|
@@ -52,14 +46,11 @@ class Sidebar extends Component {
|
|
|
52
46
|
const {
|
|
53
47
|
sidebarNode
|
|
54
48
|
} = this;
|
|
55
|
-
|
|
56
49
|
if (!contentNode || !sidebarNode) {
|
|
57
50
|
return false;
|
|
58
51
|
}
|
|
59
|
-
|
|
60
52
|
return contentNode.offsetHeight >= sidebarNode.offsetHeight;
|
|
61
53
|
}
|
|
62
|
-
|
|
63
54
|
shouldFixateBottom() {
|
|
64
55
|
const {
|
|
65
56
|
topIsOutside,
|
|
@@ -67,7 +58,6 @@ class Sidebar extends Component {
|
|
|
67
58
|
} = this.state;
|
|
68
59
|
return !bottomIsOutside && topIsOutside && this.shouldUseFixation();
|
|
69
60
|
}
|
|
70
|
-
|
|
71
61
|
render() {
|
|
72
62
|
const {
|
|
73
63
|
right,
|
|
@@ -113,9 +103,7 @@ class Sidebar extends Component {
|
|
|
113
103
|
onLeave: this.handleBottomWaypoint
|
|
114
104
|
})));
|
|
115
105
|
}
|
|
116
|
-
|
|
117
106
|
}
|
|
118
|
-
|
|
119
107
|
_defineProperty(Sidebar, "propTypes", {
|
|
120
108
|
right: PropTypes.bool,
|
|
121
109
|
children: PropTypes.node,
|
package/dist/_helpers/theme.js
CHANGED
|
@@ -9,19 +9,16 @@ import getUID from '../global/get-uid.js';
|
|
|
9
9
|
var modules_59717246 = {"dark":"dark_rui_eb55"};
|
|
10
10
|
|
|
11
11
|
var Theme;
|
|
12
|
-
|
|
13
12
|
(function (Theme) {
|
|
14
13
|
Theme["AUTO"] = "auto";
|
|
15
14
|
Theme["LIGHT"] = "light";
|
|
16
15
|
Theme["DARK"] = "dark";
|
|
17
16
|
})(Theme || (Theme = {}));
|
|
18
|
-
|
|
19
17
|
const darkMatcher = window.matchMedia('(prefers-color-scheme: dark)');
|
|
20
18
|
function useTheme() {
|
|
21
19
|
const [dark, setDark] = useState(darkMatcher.matches);
|
|
22
20
|
useEffect(() => {
|
|
23
21
|
const onChange = e => setDark(e.matches);
|
|
24
|
-
|
|
25
22
|
darkMatcher.addEventListener('change', onChange);
|
|
26
23
|
return () => darkMatcher.removeEventListener('change', onChange);
|
|
27
24
|
}, []);
|
package/dist/_helpers/title.js
CHANGED
|
@@ -12,30 +12,24 @@ var modules_09d014b4 = {"unit":"8px","height":"32px","compensate":"2px","dataLis
|
|
|
12
12
|
class Title extends PureComponent {
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
15
|
-
|
|
16
15
|
_defineProperty(this, "id", getUID('data-list-title'));
|
|
17
|
-
|
|
18
16
|
_defineProperty(this, "onCheckboxFocus", () => {
|
|
19
17
|
this.props.onFocusRestore();
|
|
20
18
|
});
|
|
21
|
-
|
|
22
19
|
_defineProperty(this, "onCheckboxChange", () => {
|
|
23
20
|
this.toggleSelection();
|
|
24
21
|
});
|
|
25
22
|
}
|
|
26
|
-
|
|
27
23
|
toggleSelection() {
|
|
28
24
|
const {
|
|
29
25
|
selectable,
|
|
30
26
|
selected,
|
|
31
27
|
onSelect
|
|
32
28
|
} = this.props;
|
|
33
|
-
|
|
34
29
|
if (selectable) {
|
|
35
30
|
onSelect(!selected);
|
|
36
31
|
}
|
|
37
32
|
}
|
|
38
|
-
|
|
39
33
|
render() {
|
|
40
34
|
const {
|
|
41
35
|
className,
|
|
@@ -72,15 +66,12 @@ class Title extends PureComponent {
|
|
|
72
66
|
tabIndex: -1
|
|
73
67
|
})), collapserExpander), title);
|
|
74
68
|
}
|
|
75
|
-
|
|
76
69
|
}
|
|
77
|
-
|
|
78
70
|
_defineProperty(Title, "defaultProps", {
|
|
79
71
|
selectable: false,
|
|
80
72
|
selected: false,
|
|
81
73
|
showFocus: false
|
|
82
74
|
});
|
|
83
|
-
|
|
84
75
|
Title.propTypes = {
|
|
85
76
|
className: PropTypes.string,
|
|
86
77
|
title: PropTypes.node,
|