@jetbrains/ring-ui 7.0.10 → 7.0.12
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/alert/alert.d.ts +1 -1
- package/components/alert/alert.js +8 -14
- package/components/alert/container.js +3 -4
- package/components/alert-service/alert-service.d.ts +1 -1
- package/components/alert-service/alert-service.js +5 -8
- package/components/auth/down-notification.js +4 -12
- package/components/auth/iframe-flow.js +2 -3
- package/components/auth-dialog/auth-dialog.d.ts +1 -1
- package/components/auth-dialog/auth-dialog.js +2 -18
- package/components/auth-dialog-service/auth-dialog-service.js +2 -3
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar/avatar.js +4 -8
- package/components/avatar/fallback-avatar.d.ts +1 -1
- package/components/avatar/fallback-avatar.js +2 -18
- package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
- package/components/breadcrumbs/breadcrumbs.js +2 -4
- package/components/button/button.css +1 -1
- package/components/button/button.d.ts +1 -1
- package/components/button/button.js +4 -11
- package/components/button-group/button-group.d.ts +1 -1
- package/components/button-group/button-group.js +2 -5
- package/components/button-group/caption.d.ts +1 -1
- package/components/button-group/caption.js +2 -1
- package/components/button-set/button-set.d.ts +1 -1
- package/components/button-set/button-set.js +2 -3
- package/components/button-toolbar/button-toolbar.d.ts +1 -1
- package/components/button-toolbar/button-toolbar.js +2 -1
- package/components/checkbox/checkbox.css +11 -3
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/checkbox.js +2 -13
- package/components/code/code.d.ts +1 -1
- package/components/code/code.js +5 -8
- package/components/collapse/collapse-content.js +3 -7
- package/components/collapse/collapse-control.js +3 -5
- package/components/collapse/collapse.js +8 -12
- package/components/confirm/confirm.d.ts +1 -1
- package/components/confirm/confirm.js +2 -15
- package/components/confirm-service/confirm-service.js +2 -3
- package/components/content-layout/content-layout.d.ts +1 -1
- package/components/content-layout/content-layout.js +2 -6
- package/components/content-layout/sidebar.d.ts +1 -1
- package/components/content-layout/sidebar.js +2 -11
- package/components/contenteditable/contenteditable.d.ts +2 -2
- package/components/contenteditable/contenteditable.js +6 -5
- package/components/control-help/control-help.d.ts +1 -1
- package/components/control-help/control-help.js +2 -1
- package/components/control-label/control-label.js +3 -5
- package/components/data-list/data-list.d.ts +3 -3
- package/components/data-list/data-list.js +8 -17
- package/components/data-list/data-list.mock.d.ts +1 -1
- package/components/data-list/data-list.mock.js +27 -72
- package/components/data-list/item.d.ts +2 -2
- package/components/data-list/item.js +7 -23
- package/components/data-list/title.d.ts +1 -1
- package/components/data-list/title.js +2 -11
- package/components/date-picker/date-input.d.ts +1 -1
- package/components/date-picker/date-input.js +2 -1
- package/components/date-picker/date-picker.d.ts +1 -1
- package/components/date-picker/date-picker.js +11 -23
- package/components/date-picker/date-popup.d.ts +1 -1
- package/components/date-picker/date-popup.js +9 -20
- package/components/date-picker/day.d.ts +1 -1
- package/components/date-picker/day.js +3 -4
- package/components/date-picker/month-names.d.ts +1 -1
- package/components/date-picker/month-names.js +7 -12
- package/components/date-picker/month-slider.d.ts +1 -1
- package/components/date-picker/month-slider.js +3 -4
- package/components/date-picker/month.d.ts +1 -1
- package/components/date-picker/month.js +3 -4
- package/components/date-picker/months.d.ts +1 -1
- package/components/date-picker/months.js +5 -8
- package/components/date-picker/weekdays.d.ts +1 -1
- package/components/date-picker/weekdays.js +3 -6
- package/components/date-picker/years.d.ts +1 -1
- package/components/date-picker/years.js +5 -8
- package/components/dialog/dialog.d.ts +1 -1
- package/components/dialog/dialog.js +12 -33
- package/components/dropdown/anchor.d.ts +1 -1
- package/components/dropdown/anchor.js +2 -3
- package/components/dropdown/dropdown.d.ts +1 -1
- package/components/dropdown/dropdown.js +7 -10
- package/components/dropdown-menu/dropdown-menu.js +4 -9
- package/components/editable-heading/editable-heading.d.ts +2 -2
- package/components/editable-heading/editable-heading.js +2 -30
- package/components/error-bubble/error-bubble.d.ts +1 -1
- package/components/error-bubble/error-bubble.js +2 -8
- package/components/error-message/error-message.d.ts +1 -1
- package/components/error-message/error-message.js +2 -10
- package/components/footer/footer.js +7 -14
- package/components/global/create-stateful-context.d.ts +1 -1
- package/components/global/create-stateful-context.js +2 -3
- package/components/global/focus-sensor-hoc.js +2 -1
- package/components/global/react-dom-renderer.d.ts +1 -1
- package/components/global/react-dom-renderer.js +2 -1
- package/components/global/rerender-hoc.js +3 -2
- package/components/global/theme.js +3 -11
- package/components/global/variables.css +2 -0
- package/components/global/variables_dark.css +2 -0
- package/components/grid/col.d.ts +1 -1
- package/components/grid/col.js +2 -3
- package/components/grid/grid.d.ts +1 -1
- package/components/grid/grid.js +2 -3
- package/components/grid/row.d.ts +1 -1
- package/components/grid/row.js +2 -3
- package/components/group/group.d.ts +1 -1
- package/components/group/group.js +2 -3
- package/components/header/header-icon.d.ts +1 -1
- package/components/header/header-icon.js +2 -1
- package/components/header/header.d.ts +1 -1
- package/components/header/header.js +3 -4
- package/components/header/links.d.ts +1 -1
- package/components/header/links.js +2 -1
- package/components/header/logo.d.ts +1 -1
- package/components/header/logo.js +2 -3
- package/components/header/profile.d.ts +1 -1
- package/components/header/profile.js +6 -19
- package/components/header/services-link.d.ts +1 -1
- package/components/header/services-link.js +5 -6
- package/components/header/services.d.ts +1 -1
- package/components/header/services.js +10 -15
- package/components/header/smart-profile.d.ts +1 -1
- package/components/header/smart-profile.js +2 -1
- package/components/header/smart-services.d.ts +1 -1
- package/components/header/smart-services.js +2 -1
- package/components/header/tray.d.ts +1 -1
- package/components/header/tray.js +3 -4
- package/components/heading/heading.js +6 -7
- package/components/i18n/i18n-context.js +2 -1
- package/components/icon/icon.d.ts +1 -1
- package/components/icon/icon.js +2 -3
- package/components/icon/icon__svg.d.ts +1 -1
- package/components/icon/icon__svg.js +3 -2
- package/components/input/input.d.ts +1 -1
- package/components/input/input.js +2 -15
- package/components/island/adaptive-island-hoc.d.ts +2 -2
- package/components/island/adaptive-island-hoc.js +2 -5
- package/components/island/content.d.ts +1 -1
- package/components/island/content.js +5 -12
- package/components/island/header.d.ts +1 -1
- package/components/island/header.js +5 -12
- package/components/island/island.d.ts +3 -3
- package/components/island/island.js +2 -3
- package/components/link/clickableLink.d.ts +1 -1
- package/components/link/clickableLink.js +2 -4
- package/components/link/link.d.ts +4 -4
- package/components/link/link.js +3 -6
- package/components/list/list.d.ts +6 -6
- package/components/list/list.js +18 -38
- package/components/list/list__custom.d.ts +1 -1
- package/components/list/list__custom.js +2 -4
- package/components/list/list__hint.d.ts +1 -1
- package/components/list/list__hint.js +2 -3
- package/components/list/list__item.d.ts +1 -1
- package/components/list/list__item.js +3 -31
- package/components/list/list__link.d.ts +1 -1
- package/components/list/list__link.js +2 -3
- package/components/list/list__separator.d.ts +1 -1
- package/components/list/list__separator.js +2 -3
- package/components/list/list__title.d.ts +1 -1
- package/components/list/list__title.js +2 -8
- package/components/loader/loader.d.ts +1 -1
- package/components/loader/loader.js +2 -1
- package/components/loader-inline/loader-inline.d.ts +1 -1
- package/components/loader-inline/loader-inline.js +3 -5
- package/components/loader-screen/loader-screen.d.ts +1 -1
- package/components/loader-screen/loader-screen.js +2 -3
- package/components/login-dialog/login-dialog.d.ts +1 -1
- package/components/login-dialog/login-dialog.js +2 -9
- package/components/login-dialog/service.js +2 -3
- package/components/markdown/markdown.d.ts +1 -1
- package/components/markdown/markdown.js +2 -3
- package/components/message/message.d.ts +1 -1
- package/components/message/message.js +2 -21
- package/components/pager/pager.d.ts +5 -5
- package/components/pager/pager.js +11 -55
- package/components/panel/panel.d.ts +1 -1
- package/components/panel/panel.js +2 -3
- package/components/popup/popup.d.ts +2 -2
- package/components/popup/popup.js +13 -25
- package/components/popup/popup.target.js +3 -6
- package/components/popup-menu/popup-menu.d.ts +1 -1
- package/components/popup-menu/popup-menu.js +2 -3
- package/components/progress-bar/progress-bar.d.ts +1 -1
- package/components/progress-bar/progress-bar.js +2 -3
- package/components/query-assist/query-assist.d.ts +2 -2
- package/components/query-assist/query-assist.js +7 -45
- package/components/query-assist/query-assist__suggestions.d.ts +1 -1
- package/components/query-assist/query-assist__suggestions.js +5 -10
- package/components/radio/radio.css +3 -2
- package/components/radio/radio.d.ts +1 -1
- package/components/radio/radio.js +2 -1
- package/components/radio/radio__item.d.ts +1 -1
- package/components/radio/radio__item.js +3 -11
- package/components/scrollable-section/scrollable-section.d.ts +1 -1
- package/components/scrollable-section/scrollable-section.js +3 -2
- package/components/select/select.d.ts +3 -3
- package/components/select/select.js +43 -91
- package/components/select/select__filter.d.ts +1 -1
- package/components/select/select__filter.js +2 -5
- package/components/select/select__popup.d.ts +7 -7
- package/components/select/select__popup.js +13 -43
- package/components/shortcuts/shortcuts-hoc.d.ts +2 -2
- package/components/shortcuts/shortcuts-hoc.js +2 -3
- package/components/slider/slider.css +3 -3
- package/components/slider/slider.js +31 -49
- package/components/tab-trap/tab-trap.js +9 -15
- package/components/table/cell.d.ts +1 -1
- package/components/table/cell.js +2 -3
- package/components/table/disable-hover-hoc.d.ts +2 -2
- package/components/table/disable-hover-hoc.js +2 -1
- package/components/table/header-cell.d.ts +1 -1
- package/components/table/header-cell.js +2 -12
- package/components/table/header.d.ts +2 -2
- package/components/table/header.js +5 -18
- package/components/table/multitable.d.ts +1 -1
- package/components/table/multitable.js +3 -4
- package/components/table/row-with-focus-sensor.d.ts +1 -1
- package/components/table/row-with-focus-sensor.js +2 -1
- package/components/table/row.d.ts +1 -1
- package/components/table/row.js +5 -24
- package/components/table/selection-shortcuts-hoc.js +2 -1
- package/components/table/simple-table.d.ts +1 -1
- package/components/table/simple-table.js +2 -1
- package/components/table/smart-table.d.ts +1 -1
- package/components/table/smart-table.js +2 -1
- package/components/table/table.d.ts +4 -4
- package/components/table/table.js +8 -29
- package/components/tabs/collapsible-more.d.ts +3 -3
- package/components/tabs/collapsible-more.js +6 -13
- package/components/tabs/collapsible-tab.d.ts +1 -1
- package/components/tabs/collapsible-tab.js +3 -2
- package/components/tabs/collapsible-tabs.d.ts +2 -2
- package/components/tabs/collapsible-tabs.js +2 -10
- package/components/tabs/dumb-tabs.d.ts +2 -3
- package/components/tabs/dumb-tabs.js +3 -9
- package/components/tabs/smart-tabs.d.ts +1 -1
- package/components/tabs/smart-tabs.js +2 -3
- package/components/tabs/tab-link.d.ts +1 -1
- package/components/tabs/tab-link.js +2 -9
- package/components/tabs/tab.d.ts +1 -1
- package/components/tabs/tab.js +2 -3
- package/components/tag/tag.d.ts +5 -5
- package/components/tag/tag.js +15 -23
- package/components/tags-input/tags-input.d.ts +1 -1
- package/components/tags-input/tags-input.js +4 -12
- package/components/tags-list/tags-list.d.ts +2 -2
- package/components/tags-list/tags-list.js +4 -8
- package/components/text/text.d.ts +1 -1
- package/components/text/text.js +2 -3
- package/components/toggle/toggle.css +1 -1
- package/components/toggle/toggle.d.ts +1 -1
- package/components/toggle/toggle.js +2 -17
- package/components/tooltip/tooltip.d.ts +1 -1
- package/components/tooltip/tooltip.js +2 -11
- package/components/user-agreement/service.js +3 -12
- package/components/user-agreement/user-agreement.d.ts +1 -1
- package/components/user-agreement/user-agreement.js +2 -29
- package/components/user-card/card.d.ts +1 -1
- package/components/user-card/card.js +4 -37
- package/components/user-card/smart-user-card-tooltip.d.ts +2 -2
- package/components/user-card/smart-user-card-tooltip.js +3 -6
- package/components/user-card/tooltip.d.ts +2 -2
- package/components/user-card/tooltip.js +9 -12
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { useMemo, useContext, cloneElement } from 'react';
|
|
2
|
-
import * as React from 'react';
|
|
3
3
|
import dataTests from '../global/data-tests';
|
|
4
4
|
import { CollapseContext } from './collapse-context';
|
|
5
5
|
import { COLLAPSE_CONTROL_TEST_ID } from './consts';
|
|
@@ -14,12 +14,10 @@ export const CollapseControl = ({ children, 'data-test': dataTest }) => {
|
|
|
14
14
|
}
|
|
15
15
|
return children;
|
|
16
16
|
}, [children, collapsed]);
|
|
17
|
-
return (
|
|
18
|
-
{cloneElement(child, {
|
|
17
|
+
return (_jsx("p", { "data-test": dataTests(COLLAPSE_CONTROL_TEST_ID, dataTest), children: cloneElement(child, {
|
|
19
18
|
onClick: setCollapsed,
|
|
20
19
|
'aria-controls': `collapse-content-${id}`,
|
|
21
20
|
'aria-expanded': String(!collapsed),
|
|
22
|
-
})}
|
|
23
|
-
</p>);
|
|
21
|
+
}) }));
|
|
24
22
|
};
|
|
25
23
|
export default CollapseControl;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { useCallback, useId, useMemo, useState } from 'react';
|
|
2
|
-
import * as React from 'react';
|
|
3
3
|
import { CollapseContext } from './collapse-context';
|
|
4
4
|
import { BASE_ANIMATION_DURATION } from './consts';
|
|
5
5
|
/**
|
|
@@ -13,16 +13,12 @@ export const Collapse = ({ children, duration = BASE_ANIMATION_DURATION, disable
|
|
|
13
13
|
setInnerCollapsed(!finalCollapsedValue);
|
|
14
14
|
onChange(!finalCollapsedValue);
|
|
15
15
|
}, [setInnerCollapsed, onChange, finalCollapsedValue]);
|
|
16
|
-
return (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}}>
|
|
24
|
-
{children}
|
|
25
|
-
</CollapseContext.Provider>
|
|
26
|
-
</div>);
|
|
16
|
+
return (_jsx("div", { className: className, children: _jsx(CollapseContext.Provider, { value: {
|
|
17
|
+
collapsed: finalCollapsedValue,
|
|
18
|
+
setCollapsed,
|
|
19
|
+
duration,
|
|
20
|
+
disableAnimation,
|
|
21
|
+
id,
|
|
22
|
+
}, children: children }) }));
|
|
27
23
|
};
|
|
28
24
|
export default Collapse;
|
|
@@ -31,6 +31,6 @@ export default class Confirm extends PureComponent<ConfirmProps> {
|
|
|
31
31
|
onReject: () => void;
|
|
32
32
|
};
|
|
33
33
|
onEscPress: () => void;
|
|
34
|
-
render():
|
|
34
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
35
35
|
}
|
|
36
36
|
export type ConfirmAttributes = JSX.LibraryManagedAttributes<typeof Confirm, ConfirmProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { PureComponent } from 'react';
|
|
2
|
-
import * as React from 'react';
|
|
3
3
|
import Dialog from '../dialog/dialog';
|
|
4
4
|
import Button from '../button/button';
|
|
5
5
|
import { Content, Header } from '../island/island';
|
|
@@ -28,19 +28,6 @@ export default class Confirm extends PureComponent {
|
|
|
28
28
|
};
|
|
29
29
|
render() {
|
|
30
30
|
const { show, className, inProgress, cancelIsDefault, text, description, confirmLabel, rejectLabel, onConfirm, onReject, native, } = this.props;
|
|
31
|
-
return (
|
|
32
|
-
{text && <Header>{text}</Header>}
|
|
33
|
-
{description && (<Content>
|
|
34
|
-
<div className={styles.description}>{description}</div>
|
|
35
|
-
</Content>)}
|
|
36
|
-
<Panel>
|
|
37
|
-
<Button data-test="confirm-ok-button" primary={!cancelIsDefault} loader={inProgress} disabled={inProgress} onClick={onConfirm}>
|
|
38
|
-
{confirmLabel}
|
|
39
|
-
</Button>
|
|
40
|
-
<Button data-test="confirm-reject-button" onClick={onReject} disabled={inProgress} primary={cancelIsDefault}>
|
|
41
|
-
{rejectLabel}
|
|
42
|
-
</Button>
|
|
43
|
-
</Panel>
|
|
44
|
-
</Dialog>);
|
|
31
|
+
return (_jsxs(Dialog, { label: text || (typeof description === 'string' ? description : undefined), className: className, onEscPress: this.onEscPress, show: show, trapFocus: true, "data-test": "ring-confirm", native: native, children: [text && _jsx(Header, { children: text }), description && (_jsx(Content, { children: _jsx("div", { className: styles.description, children: description }) })), _jsxs(Panel, { children: [_jsx(Button, { "data-test": "confirm-ok-button", primary: !cancelIsDefault, loader: inProgress, disabled: inProgress, onClick: onConfirm, children: confirmLabel }), _jsx(Button, { "data-test": "confirm-reject-button", onClick: onReject, disabled: inProgress, primary: cancelIsDefault, children: rejectLabel })] })] }));
|
|
45
32
|
}
|
|
46
33
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { createRoot } from 'react-dom/client';
|
|
2
3
|
import Confirm from '../confirm/confirm';
|
|
3
4
|
import { ControlsHeightContext, getGlobalControlsHeight } from '../global/controls-height';
|
|
@@ -8,9 +9,7 @@ export const reactRoot = createRoot(containerElement);
|
|
|
8
9
|
*/
|
|
9
10
|
function renderConfirm(props) {
|
|
10
11
|
const { buttonsHeight = getGlobalControlsHeight(), ...restProps } = props;
|
|
11
|
-
reactRoot.render(
|
|
12
|
-
<Confirm {...restProps}/>
|
|
13
|
-
</ControlsHeightContext.Provider>);
|
|
12
|
+
reactRoot.render(_jsx(ControlsHeightContext.Provider, { value: buttonsHeight, children: _jsx(Confirm, { ...restProps }) }));
|
|
14
13
|
}
|
|
15
14
|
export default function confirm({ text, description, confirmLabel = 'OK', rejectLabel = 'Cancel', cancelIsDefault, onBeforeConfirm, buttonsHeight, }) {
|
|
16
15
|
return new Promise((resolve, reject) => {
|
|
@@ -14,6 +14,6 @@ export default class ContentLayout extends Component<ContentLayoutProps> {
|
|
|
14
14
|
contentNode: null;
|
|
15
15
|
};
|
|
16
16
|
saveContentNode: (contentNode: HTMLElement | null) => void;
|
|
17
|
-
render(): import("react").JSX.Element;
|
|
17
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
}
|
|
19
19
|
export { default as Sidebar } from './sidebar';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { Children, cloneElement, Component } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import Sidebar from './sidebar';
|
|
@@ -28,12 +29,7 @@ export default class ContentLayout extends Component {
|
|
|
28
29
|
contentNode: this.state.contentNode,
|
|
29
30
|
});
|
|
30
31
|
const contentChildren = childrenArray.filter(child => child !== sidebarChild);
|
|
31
|
-
return (
|
|
32
|
-
{sidebar}
|
|
33
|
-
<main className={contentClasses} ref={this.saveContentNode}>
|
|
34
|
-
{contentChildren}
|
|
35
|
-
</main>
|
|
36
|
-
</div>);
|
|
32
|
+
return (_jsxs("div", { "data-test": "content-layout", ...restProps, className: classes, children: [sidebar, _jsx("main", { className: contentClasses, ref: this.saveContentNode, children: contentChildren })] }));
|
|
37
33
|
}
|
|
38
34
|
}
|
|
39
35
|
export { default as Sidebar } from './sidebar';
|
|
@@ -18,5 +18,5 @@ export default class Sidebar extends Component<SidebarProps> {
|
|
|
18
18
|
shouldUseFixation(): boolean;
|
|
19
19
|
shouldFixateBottom(): boolean;
|
|
20
20
|
sidebarRef: (node: HTMLElement | null) => void;
|
|
21
|
-
render(): import("react").JSX.Element;
|
|
21
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { Component } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import { Waypoint } from 'react-waypoint';
|
|
@@ -52,16 +53,6 @@ export default class Sidebar extends Component {
|
|
|
52
53
|
const style = {
|
|
53
54
|
maxHeight: shouldFixateBottom && sidebarVisibleHeight ? `${sidebarVisibleHeight}px` : undefined,
|
|
54
55
|
};
|
|
55
|
-
return (
|
|
56
|
-
<Waypoint onEnter={this.handleTopWaypoint} onLeave={this.handleTopWaypoint}/>
|
|
57
|
-
|
|
58
|
-
<div {...restProps} style={style} className={classes}>
|
|
59
|
-
{children}
|
|
60
|
-
</div>
|
|
61
|
-
|
|
62
|
-
<div className={styles.bottomMarker}>
|
|
63
|
-
<Waypoint onEnter={this.handleBottomWaypoint} onLeave={this.handleBottomWaypoint}/>
|
|
64
|
-
</div>
|
|
65
|
-
</aside>);
|
|
56
|
+
return (_jsxs("aside", { className: containerClasses, ref: this.sidebarRef, children: [_jsx(Waypoint, { onEnter: this.handleTopWaypoint, onLeave: this.handleTopWaypoint }), _jsx("div", { ...restProps, style: style, className: classes, children: children }), _jsx("div", { className: styles.bottomMarker, children: _jsx(Waypoint, { onEnter: this.handleBottomWaypoint, onLeave: this.handleBottomWaypoint }) })] }));
|
|
66
57
|
}
|
|
67
58
|
}
|
|
@@ -18,9 +18,9 @@ declare class ContentEditableBase extends Component<ContentEditableBaseProps> {
|
|
|
18
18
|
};
|
|
19
19
|
shouldComponentUpdate(nextProps: ContentEditableBaseProps): boolean;
|
|
20
20
|
componentDidUpdate(prevProps: ContentEditableBaseProps): void;
|
|
21
|
-
render(): import("react").JSX.Element;
|
|
21
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
}
|
|
23
23
|
type ContentEditableBaseAttrs = JSX.LibraryManagedAttributes<typeof ContentEditableBase, ContentEditableBaseProps>;
|
|
24
24
|
export type ContentEditableProps = Omit<ContentEditableBaseAttrs, '__html'>;
|
|
25
|
-
declare const ContentEditable: ({ children, ...props }: ContentEditableProps) => import("react").JSX.Element;
|
|
25
|
+
declare const ContentEditable: ({ children, ...props }: ContentEditableProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
export default ContentEditable;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { Component } from 'react';
|
|
2
3
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
3
4
|
/**
|
|
@@ -19,11 +20,11 @@ class ContentEditableBase extends Component {
|
|
|
19
20
|
}
|
|
20
21
|
render() {
|
|
21
22
|
const { __html, onComponentUpdate, disabled, tabIndex, inputRef, ...props } = this.props;
|
|
22
|
-
return (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
return (_jsx("div", { ...props, ref: inputRef,
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
disabled: disabled, role: "textbox", tabIndex: disabled ? undefined : tabIndex, contentEditable: !this.props.disabled, dangerouslySetInnerHTML: { __html } }));
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
|
-
const ContentEditable = ({ children, ...props }) => (
|
|
29
|
+
const ContentEditable = ({ children, ...props }) => (_jsx(ContentEditableBase, { ...props, __html: renderToStaticMarkup(children) }));
|
|
29
30
|
export default ContentEditable;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
type ControlHelpProps = HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
export default function ControlHelp({ className, ...restProps }: ControlHelpProps): import("react").JSX.Element;
|
|
3
|
+
export default function ControlHelp({ className, ...restProps }: ControlHelpProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import classNames from 'classnames';
|
|
2
3
|
import styles from './control-help.css';
|
|
3
4
|
export default function ControlHelp({ className, ...restProps }) {
|
|
4
|
-
return
|
|
5
|
+
return _jsx("div", { className: classNames(className, styles.help), ...restProps });
|
|
5
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import styles from './control-label.css';
|
|
4
4
|
export var LabelType;
|
|
@@ -10,9 +10,7 @@ const classNameByType = {
|
|
|
10
10
|
[LabelType.SECONDARY]: styles.secondaryLabel,
|
|
11
11
|
[LabelType.FORM]: styles.formLabel,
|
|
12
12
|
};
|
|
13
|
-
export const ControlLabel = ({ children, type = LabelType.SECONDARY, disabled, ...rest }) => (
|
|
13
|
+
export const ControlLabel = ({ children, type = LabelType.SECONDARY, disabled, ...rest }) => (_jsx("label", { className: classNames(styles.label, classNameByType[type], {
|
|
14
14
|
[styles.disabledLabel]: disabled,
|
|
15
|
-
})
|
|
16
|
-
{children}
|
|
17
|
-
</label>);
|
|
15
|
+
}), ...rest, children: children }));
|
|
18
16
|
export default ControlLabel;
|
|
@@ -29,7 +29,7 @@ export default class DataListContainer<T extends SelectionItem> extends Componen
|
|
|
29
29
|
componentWillUnmount(): void;
|
|
30
30
|
onMouseMove: () => void;
|
|
31
31
|
onKeyDown: (e: KeyboardEvent) => void;
|
|
32
|
-
render(): import("react").JSX.Element;
|
|
32
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
33
33
|
context: unknown;
|
|
34
34
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
35
35
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -56,7 +56,7 @@ export default class DataListContainer<T extends SelectionItem> extends Componen
|
|
|
56
56
|
componentWillUnmount(): void;
|
|
57
57
|
onMouseMove: () => void;
|
|
58
58
|
onKeyDown: (e: KeyboardEvent) => void;
|
|
59
|
-
render(): import("react").JSX.Element;
|
|
59
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
60
60
|
context: unknown;
|
|
61
61
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
62
62
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -78,6 +78,6 @@ export default class DataListContainer<T extends SelectionItem> extends Componen
|
|
|
78
78
|
defaultProps: Partial<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>> | undefined;
|
|
79
79
|
contextType?: import("react").Context<any> | undefined;
|
|
80
80
|
};
|
|
81
|
-
render(): import("react").JSX.Element;
|
|
81
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
82
82
|
}
|
|
83
83
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
/**
|
|
2
3
|
* @name Data List
|
|
3
4
|
*/
|
|
@@ -66,22 +67,12 @@ class DataList extends PureComponent {
|
|
|
66
67
|
[styles.disabledHover]: disabledHover,
|
|
67
68
|
[styles.multiSelection]: selection.getSelected().size > 0,
|
|
68
69
|
});
|
|
69
|
-
return (
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const { id, key, title, items } = item;
|
|
76
|
-
const showMoreLessButton = this.props.itemMoreLessState?.(item);
|
|
77
|
-
return (<Item key={key || id} item={model} title={title} items={items} itemFormatter={itemFormatter} collapsible={item.collapsible} collapsed={item.collapsed} onCollapse={item.onCollapse} onExpand={item.onExpand} showFocus={selection.isFocused(model)} onFocus={this.onItemFocus} selection={selection} selectable={item.selectable} selected={selection.isSelected(model)} onSelect={this.onItemSelect} showMoreLessButton={showMoreLessButton} onItemMoreLess={this.props.onItemMoreLess}/>);
|
|
78
|
-
})}
|
|
79
|
-
</ul>
|
|
80
|
-
|
|
81
|
-
{loading && (<div className={data.length > 0 ? styles.loadingOverlay : undefined}>
|
|
82
|
-
<Loader />
|
|
83
|
-
</div>)}
|
|
84
|
-
</div>);
|
|
70
|
+
return (_jsxs("div", { className: styles.dataListWrapper, "data-test": "ring-data-list", ref: innerRef, children: [focused && _jsx(Shortcuts, { map: shortcutsMap, scope: this.shortcutsScope }), _jsx("ul", { className: classes, children: data.map(model => {
|
|
71
|
+
const item = itemFormatter(model);
|
|
72
|
+
const { id, key, title, items } = item;
|
|
73
|
+
const showMoreLessButton = this.props.itemMoreLessState?.(item);
|
|
74
|
+
return (_jsx(Item, { item: model, title: title, items: items, itemFormatter: itemFormatter, collapsible: item.collapsible, collapsed: item.collapsed, onCollapse: item.onCollapse, onExpand: item.onExpand, showFocus: selection.isFocused(model), onFocus: this.onItemFocus, selection: selection, selectable: item.selectable, selected: selection.isSelected(model), onSelect: this.onItemSelect, showMoreLessButton: showMoreLessButton, onItemMoreLess: this.props.onItemMoreLess }, key || id));
|
|
75
|
+
}) }), loading && (_jsx("div", { className: data.length > 0 ? styles.loadingOverlay : undefined, children: _jsx(Loader, {}) }))] }));
|
|
85
76
|
}
|
|
86
77
|
}
|
|
87
78
|
const getContainer = () => disableHoverHOC(selectionShortcutsHOC(focusSensorHOC(DataList)));
|
|
@@ -90,6 +81,6 @@ export default class DataListContainer extends Component {
|
|
|
90
81
|
// https://stackoverflow.com/a/53882322/6304152
|
|
91
82
|
DataList = getContainer();
|
|
92
83
|
render() {
|
|
93
|
-
return
|
|
84
|
+
return _jsx(this.DataList, { ...this.props });
|
|
94
85
|
}
|
|
95
86
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import Link from '../link/link';
|
|
2
3
|
import Tag from '../tag/tag';
|
|
3
4
|
const items = [
|
|
4
5
|
{
|
|
5
6
|
id: 1,
|
|
6
|
-
title: (
|
|
7
|
-
<strong>Assigner</strong> in 60 projects
|
|
8
|
-
</span>),
|
|
7
|
+
title: (_jsxs("span", { children: [_jsx("strong", { children: "Assigner" }), " in 60 projects"] })),
|
|
9
8
|
collapsible: true,
|
|
10
9
|
selectable: true,
|
|
11
10
|
items: [
|
|
@@ -18,27 +17,27 @@ const items = [
|
|
|
18
17
|
{
|
|
19
18
|
id: 111,
|
|
20
19
|
selectable: true,
|
|
21
|
-
title:
|
|
20
|
+
title: _jsx(Link, { href: "#", children: "TeamCity" }),
|
|
22
21
|
},
|
|
23
22
|
{
|
|
24
23
|
id: 112,
|
|
25
24
|
selectable: true,
|
|
26
|
-
title:
|
|
25
|
+
title: _jsx(Link, { href: "#", children: "YouTrack" }),
|
|
27
26
|
},
|
|
28
27
|
{
|
|
29
28
|
id: 113,
|
|
30
29
|
selectable: true,
|
|
31
|
-
title:
|
|
30
|
+
title: _jsx(Link, { href: "#", children: "Sandbox" }),
|
|
32
31
|
},
|
|
33
32
|
{
|
|
34
33
|
id: 114,
|
|
35
34
|
selectable: true,
|
|
36
|
-
title:
|
|
35
|
+
title: _jsx(Link, { href: "#", children: "Exception Analyzer" }),
|
|
37
36
|
},
|
|
38
37
|
{
|
|
39
38
|
id: 115,
|
|
40
39
|
selectable: true,
|
|
41
|
-
title:
|
|
40
|
+
title: _jsx(Link, { href: "#", children: "MPS" }),
|
|
42
41
|
},
|
|
43
42
|
],
|
|
44
43
|
},
|
|
@@ -46,20 +45,14 @@ const items = [
|
|
|
46
45
|
},
|
|
47
46
|
{
|
|
48
47
|
id: 2,
|
|
49
|
-
title: (
|
|
50
|
-
<strong>Code Reviewer</strong> in 5 projects
|
|
51
|
-
</span>),
|
|
48
|
+
title: (_jsxs("span", { children: [_jsx("strong", { children: "Code Reviewer" }), " in 5 projects"] })),
|
|
52
49
|
selectable: true,
|
|
53
50
|
collapsible: true,
|
|
54
51
|
items: [
|
|
55
52
|
{
|
|
56
53
|
id: 21,
|
|
57
54
|
selectable: true,
|
|
58
|
-
title: (
|
|
59
|
-
<Link href="#">JetProfile</Link>
|
|
60
|
-
<span> </span>
|
|
61
|
-
<Tag>duplicate</Tag>
|
|
62
|
-
</span>),
|
|
55
|
+
title: (_jsxs("span", { children: [_jsx(Link, { href: "#", children: "JetProfile" }), _jsx("span", { children: " " }), _jsx(Tag, { children: "duplicate" })] })),
|
|
63
56
|
},
|
|
64
57
|
{
|
|
65
58
|
id: 22,
|
|
@@ -69,123 +62,93 @@ const items = [
|
|
|
69
62
|
{
|
|
70
63
|
id: 221,
|
|
71
64
|
collapsible: true,
|
|
72
|
-
title:
|
|
65
|
+
title: _jsx(Link, { href: "#", children: "TeamCity" }),
|
|
73
66
|
},
|
|
74
67
|
{
|
|
75
68
|
id: 222,
|
|
76
69
|
collapsible: true,
|
|
77
|
-
title:
|
|
70
|
+
title: _jsx(Link, { href: "#", children: "YouTrack" }),
|
|
78
71
|
},
|
|
79
72
|
{
|
|
80
73
|
id: 223,
|
|
81
74
|
collapsible: true,
|
|
82
|
-
title:
|
|
75
|
+
title: _jsx(Link, { href: "#", children: "Sandbox" }),
|
|
83
76
|
},
|
|
84
77
|
{
|
|
85
78
|
id: 224,
|
|
86
79
|
collapsible: true,
|
|
87
|
-
title:
|
|
80
|
+
title: _jsx(Link, { href: "#", children: "Exception Analyzer" }),
|
|
88
81
|
},
|
|
89
82
|
{
|
|
90
83
|
id: 225,
|
|
91
84
|
collapsible: true,
|
|
92
|
-
title:
|
|
85
|
+
title: _jsx(Link, { href: "#", children: "MPS" }),
|
|
93
86
|
},
|
|
94
87
|
],
|
|
95
88
|
},
|
|
96
89
|
{
|
|
97
90
|
id: 23,
|
|
98
91
|
collapsible: true,
|
|
99
|
-
title: (
|
|
100
|
-
<Link href="#">CustomJDK</Link>
|
|
101
|
-
<span>: as a member of ide-developers</span>
|
|
102
|
-
</span>),
|
|
92
|
+
title: (_jsxs("span", { children: [_jsx(Link, { href: "#", children: "CustomJDK" }), _jsx("span", { children: ": as a member of ide-developers" })] })),
|
|
103
93
|
},
|
|
104
94
|
],
|
|
105
95
|
},
|
|
106
96
|
{
|
|
107
97
|
id: 3,
|
|
108
|
-
title: (
|
|
109
|
-
<strong>Code Viewer</strong> in 5 projects
|
|
110
|
-
</span>),
|
|
98
|
+
title: (_jsxs("span", { children: [_jsx("strong", { children: "Code Viewer" }), " in 5 projects"] })),
|
|
111
99
|
selectable: true,
|
|
112
100
|
collapsible: true,
|
|
113
101
|
items: [
|
|
114
102
|
{
|
|
115
103
|
id: 31,
|
|
116
104
|
collapsible: true,
|
|
117
|
-
title: (
|
|
118
|
-
<Link href="#">ide-frontend</Link>
|
|
119
|
-
<span>: as a member of ide-developers</span>
|
|
120
|
-
</span>),
|
|
105
|
+
title: (_jsxs("span", { children: [_jsx(Link, { href: "#", children: "ide-frontend" }), _jsx("span", { children: ": as a member of ide-developers" })] })),
|
|
121
106
|
},
|
|
122
107
|
{
|
|
123
108
|
id: 32,
|
|
124
109
|
collapsible: true,
|
|
125
|
-
title: (
|
|
126
|
-
<Link href="#">ide-frontend</Link>
|
|
127
|
-
<span>: as a member of ide-frontend Code Viewers</span>
|
|
128
|
-
</span>),
|
|
110
|
+
title: (_jsxs("span", { children: [_jsx(Link, { href: "#", children: "ide-frontend" }), _jsx("span", { children: ": as a member of ide-frontend Code Viewers" })] })),
|
|
129
111
|
},
|
|
130
112
|
],
|
|
131
113
|
},
|
|
132
114
|
{
|
|
133
115
|
id: 4,
|
|
134
|
-
title: (
|
|
135
|
-
<strong>Commenter</strong> in 12 projects
|
|
136
|
-
</span>),
|
|
116
|
+
title: (_jsxs("span", { children: [_jsx("strong", { children: "Commenter" }), " in 12 projects"] })),
|
|
137
117
|
collapsible: true,
|
|
138
118
|
items: [
|
|
139
119
|
{
|
|
140
120
|
id: 41,
|
|
141
121
|
collapsible: true,
|
|
142
|
-
title: (
|
|
143
|
-
<Link href="#">Intellij IDEA</Link>
|
|
144
|
-
<span>: as a member of Registered Users</span>
|
|
145
|
-
</span>),
|
|
122
|
+
title: (_jsxs("span", { children: [_jsx(Link, { href: "#", children: "Intellij IDEA" }), _jsx("span", { children: ": as a member of Registered Users" })] })),
|
|
146
123
|
},
|
|
147
124
|
{
|
|
148
125
|
id: 42,
|
|
149
126
|
collapsible: true,
|
|
150
|
-
title: (
|
|
151
|
-
<Link href="#">YouTrack Backlog</Link>
|
|
152
|
-
<span>: as a member of jetbrains-team</span>
|
|
153
|
-
</span>),
|
|
127
|
+
title: (_jsxs("span", { children: [_jsx(Link, { href: "#", children: "YouTrack Backlog" }), _jsx("span", { children: ": as a member of jetbrains-team" })] })),
|
|
154
128
|
},
|
|
155
129
|
],
|
|
156
130
|
},
|
|
157
131
|
{
|
|
158
132
|
id: 5,
|
|
159
133
|
collapsible: true,
|
|
160
|
-
title: (
|
|
161
|
-
<strong>Developer</strong>
|
|
162
|
-
<span> in 57 projects </span>
|
|
163
|
-
<Tag>team role</Tag>
|
|
164
|
-
</span>),
|
|
134
|
+
title: (_jsxs("span", { children: [_jsx("strong", { children: "Developer" }), _jsx("span", { children: " in 57 projects " }), _jsx(Tag, { children: "team role" })] })),
|
|
165
135
|
items: [
|
|
166
136
|
{
|
|
167
137
|
id: 51,
|
|
168
138
|
selectable: true,
|
|
169
139
|
collapsible: true,
|
|
170
|
-
title:
|
|
140
|
+
title: _jsx(Link, { href: "#", children: "Wasabi" }),
|
|
171
141
|
},
|
|
172
142
|
],
|
|
173
143
|
},
|
|
174
144
|
{
|
|
175
145
|
id: 6,
|
|
176
146
|
collapsible: true,
|
|
177
|
-
title: (
|
|
178
|
-
<strong>Git Hosting Admin</strong>
|
|
179
|
-
<span> in project </span>
|
|
180
|
-
<Link href="#">Hackathon 2016</Link>
|
|
181
|
-
<span>: as a member of jetbrains-team</span>
|
|
182
|
-
</span>),
|
|
147
|
+
title: (_jsxs("span", { children: [_jsx("strong", { children: "Git Hosting Admin" }), _jsx("span", { children: " in project " }), _jsx(Link, { href: "#", children: "Hackathon 2016" }), _jsx("span", { children: ": as a member of jetbrains-team" })] })),
|
|
183
148
|
},
|
|
184
149
|
{
|
|
185
150
|
id: 7,
|
|
186
|
-
title: (
|
|
187
|
-
<strong>Git Hosting Checkout</strong> in 7 projects
|
|
188
|
-
</span>),
|
|
151
|
+
title: (_jsxs("span", { children: [_jsx("strong", { children: "Git Hosting Checkout" }), " in 7 projects"] })),
|
|
189
152
|
selectable: true,
|
|
190
153
|
collapsible: true,
|
|
191
154
|
},
|
|
@@ -195,21 +158,13 @@ export const moreItems = [
|
|
|
195
158
|
id: 91,
|
|
196
159
|
selectable: true,
|
|
197
160
|
collapsible: true,
|
|
198
|
-
title: (
|
|
199
|
-
<Link href="#">More item 1</Link>
|
|
200
|
-
<span> </span>
|
|
201
|
-
<Tag>duplicate</Tag>
|
|
202
|
-
</span>),
|
|
161
|
+
title: (_jsxs("span", { children: [_jsx(Link, { href: "#", children: "More item 1" }), _jsx("span", { children: " " }), _jsx(Tag, { children: "duplicate" })] })),
|
|
203
162
|
},
|
|
204
163
|
{
|
|
205
164
|
id: 92,
|
|
206
165
|
selectable: true,
|
|
207
166
|
collapsible: true,
|
|
208
|
-
title: (
|
|
209
|
-
<Link href="#">More item 2</Link>
|
|
210
|
-
<span> </span>
|
|
211
|
-
<Tag>duplicate</Tag>
|
|
212
|
-
</span>),
|
|
167
|
+
title: (_jsxs("span", { children: [_jsx(Link, { href: "#", children: "More item 2" }), _jsx("span", { children: " " }), _jsx(Tag, { children: "duplicate" })] })),
|
|
213
168
|
},
|
|
214
169
|
];
|
|
215
170
|
export default items;
|
|
@@ -45,6 +45,6 @@ export default class Item<T extends SelectionItem> extends PureComponent<ItemPro
|
|
|
45
45
|
onShowLess: () => void;
|
|
46
46
|
onFocus: () => void;
|
|
47
47
|
onSelect: (selected: boolean) => void;
|
|
48
|
-
renderItem: (model: T, parentShift: number) => import("react").JSX.Element;
|
|
49
|
-
render(): import("react").JSX.Element;
|
|
48
|
+
renderItem: (model: T, parentShift: number) => import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
50
50
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { PureComponent } from 'react';
|
|
2
3
|
import chevronRightIcon from '@jetbrains/icons/chevron-right';
|
|
3
4
|
import chevronDownIcon from '@jetbrains/icons/chevron-down';
|
|
@@ -43,45 +44,28 @@ export default class Item extends PureComponent {
|
|
|
43
44
|
renderItem = (model, parentShift) => {
|
|
44
45
|
const { onFocus, onSelect, selection, level, itemFormatter } = this.props;
|
|
45
46
|
const item = itemFormatter(model);
|
|
46
|
-
return (
|
|
47
|
+
return (_jsx(Item, { item: model, title: item.title, items: item.items, level: level + 1, parentShift: parentShift, itemFormatter: itemFormatter, collapsible: item.collapsible, collapsed: item.collapsed, onCollapse: item.onCollapse, onExpand: item.onExpand, showFocus: selection.isFocused(model), onFocus: onFocus, selection: selection, selectable: item.selectable, selected: selection.isSelected(model), onSelect: onSelect }, item.key || item.id));
|
|
47
48
|
};
|
|
48
49
|
render() {
|
|
49
50
|
const { title, items, showMoreLessButton, level, parentShift, showFocus, selectable, selected, collapsible, collapsed, onCollapse, onExpand, } = this.props;
|
|
50
51
|
let moreLessButton;
|
|
51
52
|
if (showMoreLessButton === moreLessButtonStates.MORE || showMoreLessButton === moreLessButtonStates.MORE_LOADING) {
|
|
52
|
-
moreLessButton = (
|
|
53
|
-
<Link inherit pseudo onClick={this.onShowMore}>
|
|
54
|
-
{'Show more'}
|
|
55
|
-
</Link>
|
|
56
|
-
{showMoreLessButton === moreLessButtonStates.MORE_LOADING && (<LoaderInline className={styles.showMoreLoader}/>)}
|
|
57
|
-
</Text>);
|
|
53
|
+
moreLessButton = (_jsxs(Text, { info: true, children: [_jsx(Link, { inherit: true, pseudo: true, onClick: this.onShowMore, children: 'Show more' }), showMoreLessButton === moreLessButtonStates.MORE_LOADING && (_jsx(LoaderInline, { className: styles.showMoreLoader }))] }));
|
|
58
54
|
}
|
|
59
55
|
else if (showMoreLessButton === moreLessButtonStates.LESS) {
|
|
60
|
-
moreLessButton = (
|
|
61
|
-
<Link inherit pseudo onClick={this.onShowLess}>
|
|
62
|
-
{'Show less'}
|
|
63
|
-
</Link>
|
|
64
|
-
</Text>);
|
|
56
|
+
moreLessButton = (_jsx(Text, { info: true, children: _jsx(Link, { inherit: true, pseudo: true, onClick: this.onShowLess, children: 'Show less' }) }));
|
|
65
57
|
}
|
|
66
58
|
let collapserExpander = null;
|
|
67
59
|
if (collapsible) {
|
|
68
60
|
if (collapsed) {
|
|
69
|
-
collapserExpander = (
|
|
61
|
+
collapserExpander = (_jsx(Button, { title: "Expand", onClick: onExpand, icon: chevronRightIcon, className: styles.collapseButton, iconClassName: styles.collapseIcon, "data-test": "ring-data-list-expand" }));
|
|
70
62
|
}
|
|
71
63
|
else {
|
|
72
|
-
collapserExpander = (
|
|
64
|
+
collapserExpander = (_jsx(Button, { title: "Collapse", onClick: onCollapse, icon: chevronDownIcon, className: styles.collapseButton, iconClassName: styles.collapseIcon, "data-test": "ring-data-list-collapse" }));
|
|
73
65
|
}
|
|
74
66
|
}
|
|
75
67
|
const itemIsEmpty = !items?.length || (collapsible && collapsed);
|
|
76
68
|
const offset = level * LIST_LEFT_OFFSET + ITEM_LEFT_OFFSET + parentShift;
|
|
77
|
-
return (
|
|
78
|
-
<Title title={title} focused={showFocus} showFocus={showFocus} selectable={selectable} selected={selected} collapserExpander={collapserExpander} onFocus={this.onFocus} onSelect={this.onSelect} offset={offset}/>
|
|
79
|
-
|
|
80
|
-
{!itemIsEmpty ? (<ul className={styles.itemContent}>
|
|
81
|
-
{items.map(model => this.renderItem(model, parentShift))}
|
|
82
|
-
|
|
83
|
-
{showMoreLessButton !== moreLessButtonStates.UNUSED ? (<li className={styles.showMore}>{moreLessButton}</li>) : null}
|
|
84
|
-
</ul>) : null}
|
|
85
|
-
</li>);
|
|
69
|
+
return (_jsxs("li", { children: [_jsx(Title, { title: title, focused: showFocus, showFocus: showFocus, selectable: selectable, selected: selected, collapserExpander: collapserExpander, onFocus: this.onFocus, onSelect: this.onSelect, offset: offset }), !itemIsEmpty ? (_jsxs("ul", { className: styles.itemContent, children: [items.map(model => this.renderItem(model, parentShift)), showMoreLessButton !== moreLessButtonStates.UNUSED ? (_jsx("li", { className: styles.showMore, children: moreLessButton })) : null] })) : null] }));
|
|
86
70
|
}
|
|
87
71
|
}
|