@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
package/components/list/list.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { createElement as _createElement } from "react";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
3
|
/**
|
|
2
4
|
* @name List
|
|
3
5
|
*/
|
|
@@ -351,7 +353,7 @@ export default class List extends Component {
|
|
|
351
353
|
// top and bottom margins
|
|
352
354
|
if (index === 0 || index === this.props.data.length + 1 || item.rgItemType === Type.MARGIN) {
|
|
353
355
|
itemKey = key || `${Type.MARGIN}_${index}`;
|
|
354
|
-
el =
|
|
356
|
+
el = _jsx("div", { style: { height: Dimension.MARGIN } });
|
|
355
357
|
}
|
|
356
358
|
else {
|
|
357
359
|
// Hack around SelectNG implementation
|
|
@@ -408,15 +410,9 @@ export default class List extends Component {
|
|
|
408
410
|
default:
|
|
409
411
|
throw new Error(`Unknown menu element type: ${itemProps.rgItemType}`);
|
|
410
412
|
}
|
|
411
|
-
el =
|
|
413
|
+
el = _createElement(ItemComponent, { ...itemProps, key: itemProps.key });
|
|
412
414
|
}
|
|
413
|
-
return parent ? (
|
|
414
|
-
{({ registerChild }) => (<div ref={registerChild} style={style} role="row" aria-selected={isActive} id={itemId}>
|
|
415
|
-
<div role="cell">{el}</div>
|
|
416
|
-
</div>)}
|
|
417
|
-
</CellMeasurer>) : (<div role="row" aria-selected={isActive} id={itemId} key={itemKey}>
|
|
418
|
-
<div role="cell">{el}</div>
|
|
419
|
-
</div>);
|
|
415
|
+
return parent ? (_jsx(CellMeasurer, { cache: this._cache, parent: parent, rowIndex: index, columnIndex: 0, children: ({ registerChild }) => (_jsx("div", { ref: registerChild, style: style, role: "row", "aria-selected": isActive, id: itemId, children: _jsx("div", { role: "cell", children: el }) })) }, itemKey)) : (_jsx("div", { role: "row", "aria-selected": isActive, id: itemId, children: _jsx("div", { role: "cell", children: el }) }, itemKey));
|
|
420
416
|
};
|
|
421
417
|
addItemDataTestToProp = (props) => {
|
|
422
418
|
props['data-test'] = dataTests('ring-list-item', props['data-test']);
|
|
@@ -437,24 +433,20 @@ export default class List extends Component {
|
|
|
437
433
|
}
|
|
438
434
|
renderVirtualizedInner({ height, maxHeight, autoHeight = false, rowCount, isScrolling, onChildScroll = noop, scrollTop, registerChild, }) {
|
|
439
435
|
const dirOverride = { direction: 'inherit' }; // Virtualized sets "direction: ltr" by default https://github.com/bvaughn/react-virtualized/issues/457
|
|
440
|
-
return (
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
? this.state.activeIndex + 1
|
|
449
|
-
: undefined} scrollToAlignment="center" deferredMeasurementCache={this._cache} onRowsRendered={this.checkOverflow}/>
|
|
450
|
-
</div>)}
|
|
451
|
-
</AutoSizer>);
|
|
436
|
+
return (_jsx(AutoSizer, { disableHeight: true, onResize: this.props.onResize, children: ({ width }) => (_jsx("div", { ref: registerChild, children: _jsx(VirtualizedList, { "aria-label": this.props.ariaLabel, ref: this.virtualizedListRef, className: classNames('ring-list__i', { [styles.overscrollNone]: this.props.preventListOverscroll }), autoHeight: autoHeight, style: maxHeight ? { maxHeight, height: 'auto', ...dirOverride } : dirOverride, autoContainerWidth: true, height: height, width: width, isScrolling: isScrolling, onScroll: e => {
|
|
437
|
+
onChildScroll(e);
|
|
438
|
+
this.scrollEndHandler();
|
|
439
|
+
}, scrollTop: scrollTop, rowCount: rowCount, estimatedRowSize: this.defaultItemHeight(), rowHeight: this._cache.rowHeight, rowRenderer: this.renderItem, overscanRowCount: this._bufferSize,
|
|
440
|
+
// ensure rerendering
|
|
441
|
+
noop: () => { }, scrollToIndex: !this.props.disableScrollToActive && this.state.needScrollToActive && this.state.activeIndex != null
|
|
442
|
+
? this.state.activeIndex + 1
|
|
443
|
+
: undefined, scrollToAlignment: "center", deferredMeasurementCache: this._cache, onRowsRendered: this.checkOverflow }) })) }));
|
|
452
444
|
}
|
|
453
445
|
renderVirtualized(maxHeight, rowCount) {
|
|
454
446
|
if (maxHeight) {
|
|
455
447
|
return this.renderVirtualizedInner({ height: maxHeight, maxHeight, rowCount });
|
|
456
448
|
}
|
|
457
|
-
return (
|
|
449
|
+
return (_jsx(WindowScroller, { children: props => this.renderVirtualizedInner({ ...props, rowCount, autoHeight: true }) }));
|
|
458
450
|
}
|
|
459
451
|
renderSimple(maxHeight, rowCount) {
|
|
460
452
|
const items = [];
|
|
@@ -464,11 +456,7 @@ export default class List extends Component {
|
|
|
464
456
|
isScrolling: this.state.scrolling,
|
|
465
457
|
}));
|
|
466
458
|
}
|
|
467
|
-
return (
|
|
468
|
-
<div aria-label={this.props.ariaLabel} role="grid" style={maxHeight ? { maxHeight: this.getVisibleListHeight(maxHeight) } : undefined}>
|
|
469
|
-
{items}
|
|
470
|
-
</div>
|
|
471
|
-
</div>);
|
|
459
|
+
return (_jsx("div", { className: classNames('ring-list__i', styles.simpleInner), onScroll: this.scrollHandler, onMouseMove: this.mouseHandler, children: _jsx("div", { "aria-label": this.props.ariaLabel, role: "grid", style: maxHeight ? { maxHeight: this.getVisibleListHeight(maxHeight) } : undefined, children: items }) }));
|
|
472
460
|
}
|
|
473
461
|
id = getUID('list-');
|
|
474
462
|
shortcutsScope = this.id;
|
|
@@ -490,16 +478,8 @@ export default class List extends Component {
|
|
|
490
478
|
const rowCount = this.props.data.length + 2;
|
|
491
479
|
const maxHeight = this.props.maxHeight && this.getVisibleListHeight(this.props.maxHeight);
|
|
492
480
|
const classes = classNames(styles.list, this.props.className);
|
|
493
|
-
return (
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
{this.props.shortcuts && (<Shortcuts map={this.props.shortcutsMap ? { ...this.shortcutsMap, ...this.props.shortcutsMap } : this.shortcutsMap} scope={this.shortcutsScope}/>)}
|
|
497
|
-
{this.props.renderOptimization
|
|
498
|
-
? this.renderVirtualized(maxHeight, rowCount)
|
|
499
|
-
: this.renderSimple(maxHeight, rowCount)}
|
|
500
|
-
{this.state.hasOverflow && !this.state.scrolledToBottom && <div className={styles.fade} style={fadeStyles}/>}
|
|
501
|
-
{hint && <ListHint label={hint}/>}
|
|
502
|
-
</div>
|
|
503
|
-
</>);
|
|
481
|
+
return (_jsxs(_Fragment, { children: [_jsx(ActiveItemContext.Updater, { value: this.getId(this.state.activeItem), skipUpdate: this.props.hidden || !isActivatable(this.state.activeItem) }), _jsxs("div", { id: this.props.id, ref: this.containerRef, className: classes, onMouseOut: this.props.onMouseOut, onBlur: this.props.onMouseOut, "data-test": "ring-list", children: [this.props.shortcuts && (_jsx(Shortcuts, { map: this.props.shortcutsMap ? { ...this.shortcutsMap, ...this.props.shortcutsMap } : this.shortcutsMap, scope: this.shortcutsScope })), this.props.renderOptimization
|
|
482
|
+
? this.renderVirtualized(maxHeight, rowCount)
|
|
483
|
+
: this.renderSimple(maxHeight, rowCount), this.state.hasOverflow && !this.state.scrolledToBottom && _jsx("div", { className: styles.fade, style: fadeStyles }), hint && _jsx(ListHint, { label: hint })] })] }));
|
|
504
484
|
}
|
|
505
485
|
}
|
|
@@ -3,5 +3,5 @@ import * as React from 'react';
|
|
|
3
3
|
import { ListDataItemProps } from './consts';
|
|
4
4
|
export default class ListCustom<T> extends PureComponent<ListDataItemProps<T>> {
|
|
5
5
|
handleKeyPress: (event: React.KeyboardEvent) => void;
|
|
6
|
-
render():
|
|
6
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { PureComponent } from 'react';
|
|
2
|
-
import * as React from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import dataTests from '../global/data-tests';
|
|
5
5
|
import getEventKey from '../global/get-event-key';
|
|
@@ -23,8 +23,6 @@ export default class ListCustom extends PureComponent {
|
|
|
23
23
|
}, restProps['data-test']);
|
|
24
24
|
const content = typeof template === 'function' ? template(this.props) : template;
|
|
25
25
|
const TagName = tagName || 'span';
|
|
26
|
-
return (
|
|
27
|
-
{content}
|
|
28
|
-
</TagName>);
|
|
26
|
+
return (_jsx(TagName, { role: role || 'button', tabIndex: tabIndex, onClick: onClick, onKeyPress: this.handleKeyPress, onMouseOver: onMouseOver, onFocus: onMouseOver, onMouseUp: onMouseUp, className: classes, "data-test": dataTest, children: content }));
|
|
29
27
|
}
|
|
30
28
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { PureComponent } from 'react';
|
|
2
3
|
import classnames from 'classnames';
|
|
3
4
|
import styles from './list.css';
|
|
@@ -7,8 +8,6 @@ import styles from './list.css';
|
|
|
7
8
|
*/
|
|
8
9
|
export default class ListHint extends PureComponent {
|
|
9
10
|
render() {
|
|
10
|
-
return (
|
|
11
|
-
{this.props.label}
|
|
12
|
-
</span>);
|
|
11
|
+
return (_jsx("span", { className: classnames(styles.item, styles.hint), "data-test": "ring-list-hint", children: this.props.label }));
|
|
13
12
|
}
|
|
14
13
|
}
|
|
@@ -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 classNames from 'classnames';
|
|
3
4
|
import dataTests from '../global/data-tests';
|
|
@@ -53,36 +54,7 @@ export default class ListItem extends PureComponent {
|
|
|
53
54
|
'ring-list-item-action': !disabled,
|
|
54
55
|
'ring-list-item-selected': checkbox,
|
|
55
56
|
}, restProps['data-test']);
|
|
56
|
-
const labelElement = (
|
|
57
|
-
{
|
|
58
|
-
</span>);
|
|
59
|
-
return (<div className={styles.itemContainer} data-test={dataTest}>
|
|
60
|
-
{showCheckbox && (<div className={styles.checkboxContainer}>
|
|
61
|
-
<Checkbox aria-labelledby={this.id} checked={checkbox} disabled={disabled} onChange={onCheckboxChange} onClick={this.stopBubbling}/>
|
|
62
|
-
</div>)}
|
|
63
|
-
<button id={this.id} type="button" tabIndex={tabIndex} onClick={onClick} onMouseOver={onMouseOver} onMouseDown={onMouseDown} onFocus={onMouseOver} onMouseUp={onMouseUp} className={classes} style={style} disabled={disabled}>
|
|
64
|
-
<div className={styles.top} onMouseOut={this.stopBubbling} onBlur={this.stopBubbling}>
|
|
65
|
-
{!showCheckbox && (<div className={styles.left}>
|
|
66
|
-
{leftNodes}
|
|
67
|
-
{glyph && (<Icon className={styles.glyph} glyph={glyph} size={this.props.iconSize} suppressSizeWarning={this.props.suppressSizeWarning}/>)}
|
|
68
|
-
{(avatar || shouldShowGeneratedAvatar) && (<Avatar className={styles.avatar} url={avatar} size={AvatarSize.Size20} subavatar={subavatar} username={username}/>)}
|
|
69
|
-
</div>)}
|
|
70
|
-
|
|
71
|
-
{labelWrapper ? labelWrapper(labelElement) : labelElement}
|
|
72
|
-
|
|
73
|
-
{description && (<span className={styles.description} data-test="ring-list-item-description">
|
|
74
|
-
{description}
|
|
75
|
-
</span>)}
|
|
76
|
-
|
|
77
|
-
<div className={styles.right}>
|
|
78
|
-
{rightGlyph && (<Icon className={styles.rightGlyph} glyph={rightGlyph} suppressSizeWarning={this.props.suppressSizeWarning} size={this.props.iconSize}/>)}
|
|
79
|
-
{icon && <div className={styles.icon} style={{ backgroundImage: `url("${icon}")` }}/>}
|
|
80
|
-
{rightNodes}
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
|
|
84
|
-
{details && <div className={detailsClasses}>{details}</div>}
|
|
85
|
-
</button>
|
|
86
|
-
</div>);
|
|
57
|
+
const labelElement = (_jsx("span", { className: styles.label, title: computedTitle, "data-test": "ring-list-item-label", children: label }));
|
|
58
|
+
return (_jsxs("div", { className: styles.itemContainer, "data-test": dataTest, children: [showCheckbox && (_jsx("div", { className: styles.checkboxContainer, children: _jsx(Checkbox, { "aria-labelledby": this.id, checked: checkbox, disabled: disabled, onChange: onCheckboxChange, onClick: this.stopBubbling }) })), _jsxs("button", { id: this.id, type: "button", tabIndex: tabIndex, onClick: onClick, onMouseOver: onMouseOver, onMouseDown: onMouseDown, onFocus: onMouseOver, onMouseUp: onMouseUp, className: classes, style: style, disabled: disabled, children: [_jsxs("div", { className: styles.top, onMouseOut: this.stopBubbling, onBlur: this.stopBubbling, children: [!showCheckbox && (_jsxs("div", { className: styles.left, children: [leftNodes, glyph && (_jsx(Icon, { className: styles.glyph, glyph: glyph, size: this.props.iconSize, suppressSizeWarning: this.props.suppressSizeWarning })), (avatar || shouldShowGeneratedAvatar) && (_jsx(Avatar, { className: styles.avatar, url: avatar, size: AvatarSize.Size20, subavatar: subavatar, username: username }))] })), labelWrapper ? labelWrapper(labelElement) : labelElement, description && (_jsx("span", { className: styles.description, "data-test": "ring-list-item-description", children: description })), _jsxs("div", { className: styles.right, children: [rightGlyph && (_jsx(Icon, { className: styles.rightGlyph, glyph: rightGlyph, suppressSizeWarning: this.props.suppressSizeWarning, size: this.props.iconSize })), icon && _jsx("div", { className: styles.icon, style: { backgroundImage: `url("${icon}")` } }), rightNodes] })] }), details && _jsx("div", { className: detailsClasses, children: details })] })] }));
|
|
87
59
|
}
|
|
88
60
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { PureComponent } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import Link, { linkHOC } from '../link/link';
|
|
@@ -16,8 +17,6 @@ export default class ListLink extends PureComponent {
|
|
|
16
17
|
[styles.scrolling]: scrolling,
|
|
17
18
|
});
|
|
18
19
|
const Comp = LinkComponent ? linkHOC(LinkComponent) : Link;
|
|
19
|
-
return (
|
|
20
|
-
{label ?? children}
|
|
21
|
-
</Comp>);
|
|
20
|
+
return (_jsx(Comp, { pseudo: !this.props.href, ...restProps, hover: hover && !disabled, className: classes, "data-test": dataTests('ring-list-link', dataTest), children: label ?? children }));
|
|
22
21
|
}
|
|
23
22
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
2
|
import { ListDataItemProps } from './consts';
|
|
3
3
|
export default class ListSeparator<T> extends PureComponent<ListDataItemProps<T>> {
|
|
4
|
-
render(): import("react").JSX.Element;
|
|
4
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { PureComponent } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import styles from './list.css';
|
|
@@ -7,8 +8,6 @@ export default class ListSeparator extends PureComponent {
|
|
|
7
8
|
const classes = classNames(styles.separator, className, {
|
|
8
9
|
[styles.separator_first]: isFirst,
|
|
9
10
|
});
|
|
10
|
-
return (
|
|
11
|
-
{description}
|
|
12
|
-
</span>);
|
|
11
|
+
return (_jsx("span", { "data-test": "ring-list-separator", className: classes, children: description }));
|
|
13
12
|
}
|
|
14
13
|
}
|
|
@@ -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 classnames from 'classnames';
|
|
3
4
|
import styles from './list.css';
|
|
@@ -7,13 +8,6 @@ export default class ListTitle extends PureComponent {
|
|
|
7
8
|
const classes = classnames(styles.title, className, {
|
|
8
9
|
[styles.title_first]: isFirst,
|
|
9
10
|
});
|
|
10
|
-
return (
|
|
11
|
-
<span className={classnames(styles.label, styles.text)} data-test="ring-list-title-label">
|
|
12
|
-
{label}
|
|
13
|
-
</span>
|
|
14
|
-
<div className={styles.description} data-test="ring-list-title-description">
|
|
15
|
-
{description}
|
|
16
|
-
</div>
|
|
17
|
-
</span>);
|
|
11
|
+
return (_jsxs("span", { className: classes, "data-test": "ring-list-title", children: [_jsx("span", { className: classnames(styles.label, styles.text), "data-test": "ring-list-title-label", children: label }), _jsx("div", { className: styles.description, "data-test": "ring-list-title-description", children: description })] }));
|
|
18
12
|
}
|
|
19
13
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { PureComponent } from 'react';
|
|
2
3
|
import dataTests from '../global/data-tests';
|
|
3
4
|
import LoaderCore from './loader__core';
|
|
@@ -29,6 +30,6 @@ export default class Loader extends PureComponent {
|
|
|
29
30
|
};
|
|
30
31
|
render() {
|
|
31
32
|
const { message, size, colors, 'data-test': dataTest, stop, deterministic, ...restProps } = this.props;
|
|
32
|
-
return
|
|
33
|
+
return _jsx("div", { "data-test": dataTests('ring-loader', dataTest), ...restProps, ref: this.initLoader });
|
|
33
34
|
}
|
|
34
35
|
}
|
|
@@ -6,7 +6,7 @@ export interface LoaderInlineProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
* @name Loader Inline
|
|
7
7
|
*/
|
|
8
8
|
declare class LoaderInline extends PureComponent<LoaderInlineProps> {
|
|
9
|
-
render(): import("react").JSX.Element;
|
|
9
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
}
|
|
11
11
|
export type LoaderInlineAtrrs = JSX.LibraryManagedAttributes<typeof LoaderInline, LoaderInlineProps>;
|
|
12
12
|
export default LoaderInline;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { PureComponent } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import dataTests from '../global/data-tests';
|
|
@@ -9,11 +10,8 @@ class LoaderInline extends PureComponent {
|
|
|
9
10
|
render() {
|
|
10
11
|
const { className, 'data-test': dataTest, children, ...restProps } = this.props;
|
|
11
12
|
const classes = classNames(styles.loader, className);
|
|
12
|
-
const loader =
|
|
13
|
-
return children ? (
|
|
14
|
-
{loader}
|
|
15
|
-
<span className={styles.children}>{children}</span>
|
|
16
|
-
</>) : (loader);
|
|
13
|
+
const loader = _jsx("div", { ...restProps, "data-test": dataTests('ring-loader-inline', dataTest), className: classes });
|
|
14
|
+
return children ? (_jsxs(_Fragment, { children: [loader, _jsx("span", { className: styles.children, children: children })] })) : (loader);
|
|
17
15
|
}
|
|
18
16
|
}
|
|
19
17
|
export default LoaderInline;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { PureComponent } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import Loader from '../loader/loader';
|
|
@@ -12,8 +13,6 @@ export default class LoaderScreen extends PureComponent {
|
|
|
12
13
|
const loaderClasses = classNames(className, styles.loader, {
|
|
13
14
|
[styles.loaderWithoutSpacing]: !message,
|
|
14
15
|
});
|
|
15
|
-
return (
|
|
16
|
-
<Loader {...restProps} message={message} className={loaderClasses}/>
|
|
17
|
-
</div>);
|
|
16
|
+
return (_jsx("div", { className: containerClasses, children: _jsx(Loader, { ...restProps, message: message, className: loaderClasses }) }));
|
|
18
17
|
}
|
|
19
18
|
}
|
|
@@ -31,6 +31,6 @@ export default class LoginDialog extends Component<LoginDialogProps> {
|
|
|
31
31
|
showFallbackTimout?: number;
|
|
32
32
|
startFallbackCountdown(): void;
|
|
33
33
|
onMessage: (event: MessageEvent) => void;
|
|
34
|
-
render(): import("react").JSX.Element;
|
|
34
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
35
35
|
}
|
|
36
36
|
export type LoginDialogAttrs = JSX.LibraryManagedAttributes<typeof LoginDialog, LoginDialogProps>;
|
|
@@ -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 Dialog from '../dialog/dialog';
|
|
3
4
|
import { Content } from '../island/island';
|
|
@@ -60,14 +61,6 @@ export default class LoginDialog extends Component {
|
|
|
60
61
|
const { show, className, url, loadingMessage, renderFallbackLink, onCancel } = this.props;
|
|
61
62
|
const { loading, height, width, loggingIn, showFallbackLink } = this.state;
|
|
62
63
|
const iFrameStyle = { height, width };
|
|
63
|
-
return (
|
|
64
|
-
<Content>
|
|
65
|
-
<iframe title="Login dialog" style={iFrameStyle} src={url} className={styles.iFrame} scrolling="no"/>
|
|
66
|
-
</Content>
|
|
67
|
-
|
|
68
|
-
{loading && <LoaderScreen message={loadingMessage} containerClassName={styles.nonOpaqueLoader}/>}
|
|
69
|
-
|
|
70
|
-
{showFallbackLink && <div className={styles.fallbackLinkContainer}>{renderFallbackLink(loggingIn)}</div>}
|
|
71
|
-
</Dialog>);
|
|
64
|
+
return (_jsxs(Dialog, { "data-test": "ring-login-dialog", className: className, contentClassName: styles.dialogContent, trapFocus: true, autoFocusFirst: false, show: show, showCloseButton: true, onCloseAttempt: onCancel, children: [_jsx(Content, { children: _jsx("iframe", { title: "Login dialog", style: iFrameStyle, src: url, className: styles.iFrame, scrolling: "no" }) }), loading && _jsx(LoaderScreen, { message: loadingMessage, containerClassName: styles.nonOpaqueLoader }), showFallbackLink && _jsx("div", { className: styles.fallbackLinkContainer, children: renderFallbackLink(loggingIn) })] }));
|
|
72
65
|
}
|
|
73
66
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { createRoot } from 'react-dom/client';
|
|
2
3
|
import { ControlsHeightContext, getGlobalControlsHeight } from '../global/controls-height';
|
|
3
4
|
import LoginDialog from './login-dialog';
|
|
@@ -7,9 +8,7 @@ const reactRoot = createRoot(containerElement);
|
|
|
7
8
|
* Renders LoginDialog into virtual node to skip maintaining container
|
|
8
9
|
*/
|
|
9
10
|
function renderLoginDialog(props) {
|
|
10
|
-
reactRoot.render(
|
|
11
|
-
<LoginDialog {...props}/>
|
|
12
|
-
</ControlsHeightContext.Provider>);
|
|
11
|
+
reactRoot.render(_jsx(ControlsHeightContext.Provider, { value: getGlobalControlsHeight(), children: _jsx(LoginDialog, { ...props }) }));
|
|
13
12
|
}
|
|
14
13
|
function noop() { }
|
|
15
14
|
export default function showAuthDialog(props = { onCancel: noop }) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { PureComponent } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import headingStyles from '../heading/heading.css';
|
|
@@ -13,8 +14,6 @@ export default class Markdown extends PureComponent {
|
|
|
13
14
|
[styles.markdown]: !inline,
|
|
14
15
|
[styles.inline]: inline,
|
|
15
16
|
});
|
|
16
|
-
return (
|
|
17
|
-
{children}
|
|
18
|
-
</div>);
|
|
17
|
+
return (_jsx("div", { "data-test": "ring-markdown", className: classes, children: children }));
|
|
19
18
|
}
|
|
20
19
|
}
|
|
@@ -49,7 +49,7 @@ export default class Message extends Component<MessageProps> {
|
|
|
49
49
|
node?: HTMLElement | null;
|
|
50
50
|
popupRef: (el: Popup | null) => void;
|
|
51
51
|
getTailOffset(): number;
|
|
52
|
-
render(): import("react").JSX.Element;
|
|
52
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
53
53
|
}
|
|
54
54
|
export type MessageAttrs = JSX.LibraryManagedAttributes<typeof Message, MessageProps>;
|
|
55
55
|
export {};
|
|
@@ -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 gift from '@jetbrains/icons/gift';
|
|
@@ -97,26 +98,6 @@ export default class Message extends Component {
|
|
|
97
98
|
const tailClasses = classNames(styles.tail, tailClassName);
|
|
98
99
|
const popupDirections = this.props.direction ? [this.props.direction] : this.props.directions;
|
|
99
100
|
const { direction } = this.state;
|
|
100
|
-
return (
|
|
101
|
-
{({ translate }) => (<WithThemeClasses theme={theme}>
|
|
102
|
-
{themeClasses => (<Popup ref={this.popupRef} hidden={false} directions={popupDirections} className={classNames(classes, themeClasses)} offset={UNIT * 2} onDirectionChange={this._onDirectionChange} {...popupProps}>
|
|
103
|
-
<ThemeProvider theme={theme} passToPopups>
|
|
104
|
-
{direction && <div className={tailClasses} style={getTailOffsets(this.getTailOffset())[direction]}/>}
|
|
105
|
-
|
|
106
|
-
{icon && <Icon className={styles.icon} glyph={icon}/>}
|
|
107
|
-
{title && (<h1 data-test="rgMessageTitle" className={styles.title}>
|
|
108
|
-
{title}
|
|
109
|
-
</h1>)}
|
|
110
|
-
{children && <div className={styles.description}>{children}</div>}
|
|
111
|
-
{(onClose || buttonProps) && (<Button className={styles.gotIt} onClick={onClose} primary {...buttonProps}>
|
|
112
|
-
{translations?.gotIt ?? translate('gotIt')}
|
|
113
|
-
</Button>)}
|
|
114
|
-
{onDismiss && (<Button onClick={onDismiss} inline>
|
|
115
|
-
{translations?.dismiss ?? translate('dismiss')}
|
|
116
|
-
</Button>)}
|
|
117
|
-
</ThemeProvider>
|
|
118
|
-
</Popup>)}
|
|
119
|
-
</WithThemeClasses>)}
|
|
120
|
-
</I18nContext.Consumer>);
|
|
101
|
+
return (_jsx(I18nContext.Consumer, { children: ({ translate }) => (_jsx(WithThemeClasses, { theme: theme, children: themeClasses => (_jsx(Popup, { ref: this.popupRef, hidden: false, directions: popupDirections, className: classNames(classes, themeClasses), offset: UNIT * 2, onDirectionChange: this._onDirectionChange, ...popupProps, children: _jsxs(ThemeProvider, { theme: theme, passToPopups: true, children: [direction && _jsx("div", { className: tailClasses, style: getTailOffsets(this.getTailOffset())[direction] }), icon && _jsx(Icon, { className: styles.icon, glyph: icon }), title && (_jsx("h1", { "data-test": "rgMessageTitle", className: styles.title, children: title })), children && _jsx("div", { className: styles.description, children: children }), (onClose || buttonProps) && (_jsx(Button, { className: styles.gotIt, onClick: onClose, primary: true, ...buttonProps, children: translations?.gotIt ?? translate('gotIt') })), onDismiss && (_jsx(Button, { onClick: onDismiss, inline: true, children: translations?.dismiss ?? translate('dismiss') }))] }) })) })) }));
|
|
121
102
|
}
|
|
122
103
|
}
|
|
@@ -59,7 +59,7 @@ export default class Pager extends PureComponent<PagerProps> {
|
|
|
59
59
|
handleNextClick: () => void;
|
|
60
60
|
handlePageChange: (arg: number) => (event: React.MouseEvent) => void;
|
|
61
61
|
handleLoadMore: (arg: number) => () => void;
|
|
62
|
-
getButton(page: number, content: ReactNode, key?: number, active?: boolean):
|
|
62
|
+
getButton(page: number, content: ReactNode, key?: number, active?: boolean): import("react/jsx-runtime").JSX.Element;
|
|
63
63
|
getClickProps(onClick: (e: React.MouseEvent) => void): {
|
|
64
64
|
onPlainLeftClick?: undefined;
|
|
65
65
|
onClick?: undefined;
|
|
@@ -70,11 +70,11 @@ export default class Pager extends PureComponent<PagerProps> {
|
|
|
70
70
|
onClick: (e: React.MouseEvent) => void;
|
|
71
71
|
onPlainLeftClick?: undefined;
|
|
72
72
|
};
|
|
73
|
-
getPageSizeSelector(): false |
|
|
74
|
-
getPagerLinks():
|
|
73
|
+
getPageSizeSelector(): false | import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
getPagerLinks(): import("react/jsx-runtime").JSX.Element;
|
|
75
75
|
generateHref(page: number): string | undefined;
|
|
76
|
-
getPagerContent():
|
|
77
|
-
render():
|
|
76
|
+
getPagerContent(): import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
78
78
|
}
|
|
79
79
|
export type PagerAttrs = JSX.LibraryManagedAttributes<typeof Pager, PagerProps>;
|
|
80
80
|
export {};
|