@jetbrains/ring-ui 7.0.62 → 7.0.63
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.css +1 -1
- package/components/alert/alert.d.ts +1 -1
- package/components/alert/alert.js +3 -3
- package/components/alert/container.css +2 -2
- package/components/alert/container.d.ts +1 -1
- package/components/alert/container.js +1 -1
- package/components/alert-service/alert-service.d.ts +2 -2
- package/components/analytics/{analytics__custom-plugin.d.ts → analytics-custom-plugin.d.ts} +1 -1
- package/components/analytics/{analytics__custom-plugin.js → analytics-custom-plugin.js} +2 -2
- package/components/auth/{auth__core.d.ts → auth-core.d.ts} +9 -8
- package/components/auth/{auth__core.js → auth-core.js} +14 -18
- package/components/auth/auth.d.ts +2 -2
- package/components/auth/auth.js +2 -2
- package/components/auth/background-flow.d.ts +2 -2
- package/components/auth/background-flow.js +0 -1
- package/components/auth/down-notification.css +1 -1
- package/components/auth/down-notification.js +1 -1
- package/components/auth/iframe-flow.d.ts +3 -3
- package/components/auth/iframe-flow.js +3 -5
- package/components/auth/request-builder.d.ts +2 -1
- package/components/auth/request-builder.js +1 -2
- package/components/auth/storage.d.ts +3 -3
- package/components/auth/storage.js +4 -8
- package/components/auth/token-validator.d.ts +2 -1
- package/components/auth/token-validator.js +6 -1
- package/components/auth/window-flow.d.ts +3 -3
- package/components/auth/window-flow.js +7 -7
- package/components/auth-dialog/auth-dialog.css +2 -2
- package/components/auth-dialog/auth-dialog.js +1 -1
- package/components/auth-dialog-service/auth-dialog-service.d.ts +1 -1
- package/components/avatar/avatar-info.d.ts +1 -1
- package/components/avatar/avatar.css +1 -1
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar/avatar.figma.js +1 -1
- package/components/avatar/avatar.js +5 -7
- package/components/avatar/fallback-avatar.js +4 -8
- package/components/avatar-stack/avatar-stack.css +1 -1
- package/components/avatar-stack/avatar-stack.d.ts +3 -3
- package/components/avatar-stack/avatar-stack.figma.js +1 -1
- package/components/avatar-stack/avatar-stack.js +1 -1
- package/components/banner/banner.css +2 -2
- package/components/banner/banner.js +1 -1
- package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
- package/components/breadcrumbs/breadcrumbs.figma.js +1 -1
- package/components/button/{button__classes.d.ts → button.classes.d.ts} +1 -1
- package/components/button/button.css +19 -16
- package/components/button/button.d.ts +4 -4
- package/components/button/button.figma.js +1 -1
- package/components/button/button.js +6 -6
- package/components/button-group/button-group.css +6 -6
- package/components/button-group/button-group.d.ts +1 -1
- package/components/button-group/button-group.js +1 -1
- package/components/button-group/caption.d.ts +1 -1
- package/components/button-set/button-set.css +2 -2
- package/components/button-set/button-set.d.ts +1 -1
- package/components/button-toolbar/button-toolbar.css +2 -2
- package/components/button-toolbar/button-toolbar.d.ts +1 -1
- package/components/caret/caret.js +23 -18
- package/components/checkbox/checkbox-group.figma.js +1 -1
- package/components/checkbox/checkbox.css +1 -1
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/checkbox.figma.js +1 -1
- package/components/checkbox/checkbox.js +5 -5
- package/components/clipboard/clipboard.js +2 -2
- package/components/code/code.css +1 -1
- package/components/code/code.d.ts +1 -1
- package/components/code/code.js +5 -3
- package/components/collapse/collapse-content.d.ts +3 -3
- package/components/collapse/collapse-control.d.ts +2 -2
- package/components/collapse/collapse.css +1 -1
- package/components/collapse/collapse.d.ts +3 -3
- package/components/confirm/confirm.d.ts +1 -1
- package/components/confirm/confirm.js +1 -1
- package/components/confirm-service/confirm-service.d.ts +3 -3
- package/components/content-layout/content-layout.css +2 -2
- package/components/content-layout/content-layout.d.ts +1 -1
- package/components/content-layout/content-layout.js +2 -2
- package/components/content-layout/sidebar.d.ts +1 -1
- package/components/contenteditable/contenteditable.d.ts +1 -1
- package/components/contenteditable/contenteditable.js +2 -1
- package/components/control-help/control-help.css +1 -1
- package/components/control-help/control-help.d.ts +1 -1
- package/components/control-label/control-label.d.ts +1 -1
- package/components/data-list/data-list.css +1 -1
- package/components/data-list/data-list.d.ts +5 -5
- package/components/data-list/data-list.js +2 -2
- package/components/data-list/data-list.mock.d.ts +2 -2
- package/components/data-list/data-list.mock.js +20 -20
- package/components/data-list/item.d.ts +3 -3
- package/components/data-list/item.js +2 -2
- package/components/data-list/selection.d.ts +1 -1
- package/components/data-list/selection.js +8 -1
- package/components/data-list/title.d.ts +2 -2
- package/components/date-picker/consts.d.ts +1 -1
- package/components/date-picker/date-input.d.ts +1 -1
- package/components/date-picker/date-input.js +2 -2
- package/components/date-picker/date-picker.css +15 -15
- package/components/date-picker/date-picker.d.ts +5 -5
- package/components/date-picker/date-picker.js +17 -19
- package/components/date-picker/date-popup.d.ts +1 -1
- package/components/date-picker/date-popup.js +5 -3
- package/components/date-picker/day.d.ts +2 -2
- package/components/date-picker/day.js +4 -5
- package/components/date-picker/formats.js +1 -0
- package/components/date-picker/month-names.d.ts +1 -1
- package/components/date-picker/month-names.js +1 -1
- package/components/date-picker/month-slider.d.ts +2 -2
- package/components/date-picker/month-slider.js +1 -1
- package/components/date-picker/month.d.ts +1 -1
- package/components/date-picker/months.d.ts +1 -1
- package/components/date-picker/months.js +2 -2
- package/components/date-picker/years.d.ts +1 -1
- package/components/date-picker/years.js +2 -2
- package/components/dialog/{dialog__body-scroll-preventer.js → dialog-body-scroll-preventer.js} +6 -2
- package/components/dialog/dialog.css +5 -5
- package/components/dialog/dialog.d.ts +1 -1
- package/components/dialog/dialog.js +7 -7
- package/components/dropdown/anchor.d.ts +1 -1
- package/components/dropdown/dropdown.css +1 -1
- package/components/dropdown/dropdown.d.ts +2 -2
- package/components/dropdown/dropdown.js +2 -2
- package/components/dropdown-menu/dropdown-menu.d.ts +5 -5
- package/components/dropdown-menu/dropdown-menu.js +1 -1
- package/components/editable-heading/editable-heading.css +6 -8
- package/components/editable-heading/editable-heading.d.ts +1 -1
- package/components/editable-heading/editable-heading.js +3 -2
- package/components/error-bubble/error-bubble-legacy.css +3 -3
- package/components/error-bubble/error-bubble.css +5 -5
- package/components/error-bubble/error-bubble.d.ts +1 -1
- package/components/error-bubble/error-bubble.figma.js +1 -1
- package/components/error-bubble/error-bubble.js +2 -2
- package/components/error-message/error-message.css +1 -1
- package/components/error-message/error-message.d.ts +2 -2
- package/components/error-message/error-message.js +2 -2
- package/components/error-page/error-page.css +3 -3
- package/components/footer/footer.css +2 -2
- package/components/footer/footer.d.ts +1 -1
- package/components/footer/footer.js +1 -1
- package/components/form/form.css +3 -3
- package/components/global/compose-refs.d.ts +2 -0
- package/components/global/compose-refs.js +14 -0
- package/components/global/composeRefs.d.ts +6 -2
- package/components/global/composeRefs.js +7 -14
- package/components/global/create-stateful-context.d.ts +1 -1
- package/components/global/dom.d.ts +1 -1
- package/components/global/dom.js +2 -4
- package/components/global/focus-sensor-hoc.d.ts +1 -1
- package/components/global/focus-sensor-hoc.js +2 -2
- package/components/global/fuzzy-highlight.d.ts +2 -2
- package/components/global/get-event-key.d.ts +1 -1
- package/components/global/global.css +2 -2
- package/components/global/memoize.js +1 -1
- package/components/global/rerender-hoc.d.ts +1 -1
- package/components/global/rerender-hoc.js +2 -2
- package/components/global/theme.d.ts +1 -1
- package/components/global/theme.js +2 -2
- package/components/global/url.js +3 -3
- package/components/global/use-event-callback.js +1 -1
- package/components/global/variables.css +1 -1
- package/components/grid/col.d.ts +1 -1
- package/components/grid/col.js +1 -1
- package/components/grid/grid.css +4 -4
- package/components/grid/grid.d.ts +1 -1
- package/components/grid/grid.js +1 -1
- package/components/grid/row.d.ts +1 -1
- package/components/grid/row.js +1 -1
- package/components/group/group.css +1 -1
- package/components/group/group.d.ts +1 -1
- package/components/group/group.js +1 -1
- package/components/header/header-icon.d.ts +2 -2
- package/components/header/header.css +4 -4
- package/components/header/header.d.ts +1 -1
- package/components/header/links.d.ts +1 -1
- package/components/header/logo.d.ts +1 -1
- package/components/header/profile.d.ts +5 -5
- package/components/header/profile.js +3 -3
- package/components/header/services-link.d.ts +1 -1
- package/components/header/services-link.js +3 -3
- package/components/header/services.css +1 -1
- package/components/header/services.d.ts +2 -2
- package/components/header/services.js +3 -3
- package/components/header/smart-profile.d.ts +3 -3
- package/components/header/smart-profile.js +2 -1
- package/components/header/smart-services.d.ts +3 -3
- package/components/header/tray.d.ts +1 -1
- package/components/heading/heading.css +2 -2
- package/components/heading/heading.d.ts +1 -1
- package/components/http/http.mock.d.ts +1 -1
- package/components/hub-source/{hub-source__user.d.ts → hub-source-user.d.ts} +3 -2
- package/components/hub-source/{hub-source__users-groups.d.ts → hub-source-users-groups.d.ts} +3 -2
- package/components/hub-source/hub-source.d.ts +2 -2
- package/components/icon/{icon__svg.d.ts → icon-svg.d.ts} +1 -1
- package/components/icon/icon.css +5 -5
- package/components/icon/icon.d.ts +2 -2
- package/components/icon/icon.js +3 -3
- package/components/input/input-legacy.css +2 -2
- package/components/input/input.css +5 -5
- package/components/input/input.d.ts +3 -3
- package/components/input/input.figma.js +1 -1
- package/components/input/input.js +8 -8
- package/components/input-size/input-size.css +1 -1
- package/components/island/adaptive-island-hoc.d.ts +1 -1
- package/components/island/content.d.ts +1 -1
- package/components/island/content.js +2 -2
- package/components/island/header.d.ts +1 -1
- package/components/island/header.js +4 -4
- package/components/island/island.css +3 -3
- package/components/island/island.d.ts +1 -1
- package/components/line/line.css +1 -1
- package/components/link/clickable-link.d.ts +12 -0
- package/components/link/clickable-link.js +25 -0
- package/components/link/clickableLink.d.ts +11 -12
- package/components/link/clickableLink.js +4 -25
- package/components/link/link.css +1 -1
- package/components/link/link.d.ts +2 -2
- package/components/link/link.js +4 -4
- package/components/list/consts.d.ts +4 -5
- package/components/list/{list__custom.d.ts → list-custom.d.ts} +1 -1
- package/components/list/{list__custom.js → list-custom.js} +1 -1
- package/components/list/{list__hint.d.ts → list-hint.d.ts} +1 -1
- package/components/list/{list__hint.js → list-hint.js} +1 -1
- package/components/list/{list__item.d.ts → list-item.d.ts} +2 -2
- package/components/list/{list__item.js → list-item.js} +6 -5
- package/components/list/{list__separator.d.ts → list-separator.d.ts} +1 -1
- package/components/list/{list__separator.js → list-separator.js} +1 -1
- package/components/list/{list__title.d.ts → list-title.d.ts} +1 -1
- package/components/list/{list__title.js → list-title.js} +1 -1
- package/components/list/{list__users-groups-source.d.ts → list-users-groups-source.d.ts} +3 -2
- package/components/list/{list__users-groups-source.js → list-users-groups-source.js} +1 -1
- package/components/list/{list__classes.d.ts → list.classes.d.ts} +1 -1
- package/components/list/list.css +5 -5
- package/components/list/list.d.ts +7 -7
- package/components/list/list.js +34 -28
- package/components/loader/{loader__core.js → loader-core.js} +2 -2
- package/components/loader/loader.css +1 -1
- package/components/loader/loader.d.ts +2 -2
- package/components/loader/loader.js +1 -1
- package/components/loader-inline/loader-inline.css +2 -2
- package/components/loader-inline/loader-inline.d.ts +1 -1
- package/components/loader-screen/loader-screen.css +2 -2
- package/components/loader-screen/loader-screen.d.ts +1 -1
- package/components/login-dialog/login-dialog.css +2 -2
- package/components/login-dialog/login-dialog.d.ts +1 -1
- package/components/login-dialog/login-dialog.js +1 -1
- package/components/login-dialog/service.d.ts +1 -1
- package/components/markdown/markdown.css +3 -3
- package/components/markdown/markdown.d.ts +1 -1
- package/components/markdown/markdown.js +1 -1
- package/components/message/message.css +3 -3
- package/components/message/message.d.ts +4 -4
- package/components/message/message.js +3 -3
- package/components/old-browsers-message/old-browsers-message.css +2 -2
- package/components/old-browsers-message/old-browsers-message.js +1 -1
- package/components/pager/pager.css +1 -1
- package/components/pager/pager.d.ts +2 -2
- package/components/pager/pager.js +11 -12
- package/components/panel/panel.css +1 -1
- package/components/panel/panel.d.ts +1 -1
- package/components/panel/panel.js +1 -1
- package/components/permissions/{permissions__cache.js → permissions-cache.js} +4 -5
- package/components/permissions/permissions.d.ts +2 -2
- package/components/permissions/permissions.js +2 -4
- package/components/popup/popup.css +3 -3
- package/components/popup/popup.d.ts +2 -2
- package/components/popup/popup.js +6 -5
- package/components/popup/popup.target.d.ts +1 -1
- package/components/popup/position-css.js +6 -10
- package/components/popup/position.js +10 -10
- package/components/popup-menu/popup-menu.d.ts +4 -4
- package/components/progress-bar/progress-bar.css +6 -8
- package/components/progress-bar/progress-bar.d.ts +1 -1
- package/components/progress-bar/progress-bar.js +1 -1
- package/components/query-assist/{query-assist__suggestions.d.ts → query-assist-suggestions.d.ts} +1 -1
- package/components/query-assist/query-assist.css +11 -11
- package/components/query-assist/query-assist.d.ts +4 -4
- package/components/query-assist/query-assist.js +11 -11
- package/components/radio/{radio__item.d.ts → radio-item.d.ts} +1 -1
- package/components/radio/{radio__item.js → radio-item.js} +2 -2
- package/components/radio/radio.css +2 -2
- package/components/radio/radio.d.ts +2 -2
- package/components/radio/radio.js +1 -1
- package/components/scrollable-section/scrollable-section.d.ts +1 -1
- package/components/scrollable-section/scrollable-section.js +1 -1
- package/components/select/{select__filter.d.ts → select-filter.d.ts} +2 -2
- package/components/select/{select__filter.js → select-filter.js} +1 -1
- package/components/select/select-popup.css +5 -5
- package/components/select/{select__popup.d.ts → select-popup.d.ts} +8 -8
- package/components/select/{select__popup.js → select-popup.js} +11 -7
- package/components/select/select.css +10 -9
- package/components/select/select.d.ts +6 -6
- package/components/select/select.js +27 -25
- package/components/shortcuts/core.js +7 -7
- package/components/shortcuts/shortcuts-hoc.d.ts +2 -2
- package/components/shortcuts/shortcuts.d.ts +1 -1
- package/components/sidebar/sidebar.css +1 -1
- package/components/slider/slider.css +2 -2
- package/components/slider/slider.d.ts +5 -5
- package/components/slider/slider.js +5 -5
- package/components/slider/slider.utils.d.ts +1 -1
- package/components/slider/slider.utils.js +2 -4
- package/components/storage/{storage__local.d.ts → storage-local.d.ts} +1 -1
- package/components/storage/{storage__local.js → storage-local.js} +7 -7
- package/components/storage/storage.d.ts +1 -1
- package/components/storage/storage.js +1 -1
- package/components/tab-trap/tab-trap.css +1 -1
- package/components/tab-trap/tab-trap.d.ts +1 -1
- package/components/tab-trap/tab-trap.js +2 -5
- package/components/table/cell.d.ts +1 -1
- package/components/table/disable-hover-hoc.d.ts +1 -1
- package/components/table/header-cell.d.ts +1 -1
- package/components/table/header-cell.js +1 -1
- package/components/table/header.d.ts +2 -2
- package/components/table/header.js +2 -2
- package/components/table/multitable.d.ts +3 -3
- package/components/table/multitable.js +1 -1
- package/components/table/row-with-focus-sensor.d.ts +3 -3
- package/components/table/row.d.ts +4 -4
- package/components/table/row.js +1 -1
- package/components/table/selection-adapter.d.ts +2 -1
- package/components/table/selection-shortcuts-hoc.d.ts +4 -3
- package/components/table/selection-shortcuts-hoc.js +1 -3
- package/components/table/selection.js +4 -8
- package/components/table/simple-table.d.ts +2 -2
- package/components/table/smart-table.d.ts +2 -2
- package/components/table/table.css +6 -6
- package/components/table/table.d.ts +7 -7
- package/components/table/table.js +3 -3
- package/components/tabs/collapsible-more.d.ts +3 -3
- package/components/tabs/collapsible-more.js +2 -2
- package/components/tabs/collapsible-tab.d.ts +2 -2
- package/components/tabs/collapsible-tab.js +1 -1
- package/components/tabs/collapsible-tabs.d.ts +2 -2
- package/components/tabs/collapsible-tabs.js +6 -8
- package/components/tabs/custom-item.d.ts +2 -2
- package/components/tabs/dumb-tabs.d.ts +3 -3
- package/components/tabs/dumb-tabs.js +3 -3
- package/components/tabs/smart-tabs.d.ts +1 -1
- package/components/tabs/tab-link.d.ts +2 -2
- package/components/tabs/tab.d.ts +2 -2
- package/components/tabs/tabs.css +6 -6
- package/components/tag/tag.css +5 -5
- package/components/tag/tag.d.ts +2 -2
- package/components/tag/tag.js +2 -2
- package/components/tags-input/tags-input.css +3 -3
- package/components/tags-input/tags-input.d.ts +8 -8
- package/components/tags-input/tags-input.js +13 -7
- package/components/tags-list/tags-list.d.ts +2 -2
- package/components/tags-list/tags-list.js +1 -1
- package/components/text/text.css +1 -1
- package/components/text/text.d.ts +1 -1
- package/components/toggle/toggle.css +2 -2
- package/components/toggle/toggle.d.ts +1 -1
- package/components/toggle/toggle.js +1 -1
- package/components/tooltip/tooltip.css +1 -1
- package/components/tooltip/tooltip.d.ts +2 -2
- package/components/tooltip/tooltip.js +1 -1
- package/components/upload/upload.css +1 -1
- package/components/upload/upload.d.ts +3 -3
- package/components/upload/upload.js +2 -2
- package/components/user-agreement/service.d.ts +2 -2
- package/components/user-agreement/service.js +3 -5
- package/components/user-agreement/user-agreement.css +2 -2
- package/components/user-agreement/user-agreement.d.ts +1 -1
- package/components/user-agreement/user-agreement.js +1 -1
- package/components/user-card/card.d.ts +1 -1
- package/components/user-card/card.js +3 -2
- package/components/user-card/smart-user-card-tooltip.d.ts +2 -2
- package/components/user-card/smart-user-card-tooltip.js +1 -1
- package/components/user-card/tooltip.d.ts +3 -3
- package/components/user-card/user-card.css +1 -1
- package/package.json +4 -1
- /package/components/button/{button__classes.js → button.classes.js} +0 -0
- /package/components/dialog/{dialog__body-scroll-preventer.d.ts → dialog-body-scroll-preventer.d.ts} +0 -0
- /package/components/global/{variables.d.ts → variables.interface.d.ts} +0 -0
- /package/components/global/{variables.js → variables.interface.js} +0 -0
- /package/components/hub-source/{hub-source__user.js → hub-source-user.js} +0 -0
- /package/components/hub-source/{hub-source__users-groups.js → hub-source-users-groups.js} +0 -0
- /package/components/icon/{icon__svg.js → icon-svg.js} +0 -0
- /package/components/icon/{icon__constants.d.ts → icon.constants.d.ts} +0 -0
- /package/components/icon/{icon__constants.js → icon.constants.js} +0 -0
- /package/components/list/{list__classes.js → list.classes.js} +0 -0
- /package/components/loader/{loader__core.d.ts → loader-core.d.ts} +0 -0
- /package/components/old-browsers-message/{old-browsers-message__stop.d.ts → old-browsers-message-stop.d.ts} +0 -0
- /package/components/old-browsers-message/{old-browsers-message__stop.js → old-browsers-message-stop.js} +0 -0
- /package/components/permissions/{permissions__cache.d.ts → permissions-cache.d.ts} +0 -0
- /package/components/query-assist/{query-assist__suggestions.js → query-assist-suggestions.js} +0 -0
|
@@ -8,6 +8,6 @@ import styles from './list.css';
|
|
|
8
8
|
*/
|
|
9
9
|
export default class ListHint extends PureComponent {
|
|
10
10
|
render() {
|
|
11
|
-
return (_jsx("span", { className: classnames(styles.item, styles.hint), "data-test":
|
|
11
|
+
return (_jsx("span", { className: classnames(styles.item, styles.hint), "data-test": 'ring-list-hint', children: this.props.label }));
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PureComponent, SyntheticEvent } from 'react';
|
|
2
|
-
import { ListDataItemProps } from './consts';
|
|
1
|
+
import { PureComponent, type SyntheticEvent } from 'react';
|
|
2
|
+
import { type ListDataItemProps } from './consts';
|
|
3
3
|
export default class ListItem<T> extends PureComponent<ListDataItemProps<T>> {
|
|
4
4
|
id: string;
|
|
5
5
|
stopBubbling: (e: SyntheticEvent) => void;
|
|
@@ -9,7 +9,7 @@ import getUID from '../global/get-uid';
|
|
|
9
9
|
import Link, { linkHOC } from '../link/link';
|
|
10
10
|
import styles from './list.css';
|
|
11
11
|
import { Type } from './consts';
|
|
12
|
-
import { getListClasses } from './
|
|
12
|
+
import { getListClasses } from './list.classes';
|
|
13
13
|
/**
|
|
14
14
|
* @constructor
|
|
15
15
|
* @extends {ReactComponent}
|
|
@@ -21,11 +21,12 @@ export default class ListItem extends PureComponent {
|
|
|
21
21
|
id = getUID('list-item-');
|
|
22
22
|
stopBubbling = (e) => e.stopPropagation();
|
|
23
23
|
_isString = (val) => typeof val === 'string' || val instanceof String;
|
|
24
|
+
// eslint-disable-next-line complexity
|
|
24
25
|
render() {
|
|
25
26
|
const { disabled, checkbox, avatar, subavatar, glyph, icon, rightGlyph, description, label, title, details, hover, level, tabIndex, onClick, onCheckboxChange, onMouseOver, onMouseDown, onMouseUp, rightNodes, leftNodes, showGeneratedAvatar, username, labelWrapper, rgItemType, scrolling, 'data-test': dataTest, className, url, LinkComponent, compact, hoverClassName, children, ...restLinkProps // TODO use an allow list in 8.0
|
|
26
27
|
} = this.props;
|
|
27
28
|
const checkable = checkbox !== undefined;
|
|
28
|
-
const shouldShowGeneratedAvatar = showGeneratedAvatar && username
|
|
29
|
+
const shouldShowGeneratedAvatar = showGeneratedAvatar && !!username;
|
|
29
30
|
const hasLeftNodes = leftNodes || glyph || avatar || shouldShowGeneratedAvatar;
|
|
30
31
|
const showCheckbox = checkable && (checkbox || !hasLeftNodes || (hover && !disabled));
|
|
31
32
|
const classes = getListClasses(this.props);
|
|
@@ -53,7 +54,7 @@ export default class ListItem extends PureComponent {
|
|
|
53
54
|
'ring-list-item-selected': checkbox,
|
|
54
55
|
'ring-list-link': isLink,
|
|
55
56
|
}, dataTest);
|
|
56
|
-
const labelElement = (_jsx("span", { className: styles.label, title: computedTitle, "data-test":
|
|
57
|
+
const labelElement = (_jsx("span", { className: styles.label, title: computedTitle, "data-test": 'ring-list-item-label', children: label ?? children }));
|
|
57
58
|
const commonProps = {
|
|
58
59
|
id: this.id,
|
|
59
60
|
tabIndex,
|
|
@@ -65,9 +66,9 @@ export default class ListItem extends PureComponent {
|
|
|
65
66
|
className: classes,
|
|
66
67
|
style,
|
|
67
68
|
disabled,
|
|
68
|
-
children: (_jsxs(_Fragment, { 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":
|
|
69
|
+
children: (_jsxs(_Fragment, { 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 })] })),
|
|
69
70
|
};
|
|
70
71
|
const LinkComponentToUse = LinkComponent ? linkHOC(LinkComponent) : Link;
|
|
71
|
-
return (_jsxs("div", { className: styles.itemContainer, "data-test": combinedDataTest, children: [showCheckbox && (_jsx("div", { className: styles.checkboxContainer, children: _jsx(Checkbox, { "aria-labelledby": this.id, checked: checkbox, disabled: disabled, onChange: onCheckboxChange, onClick: this.stopBubbling }) })), isLink ? (_jsx(LinkComponentToUse, { pseudo: !restLinkProps.href, ...commonProps, ...restLinkProps })) : (_jsx("button", { type:
|
|
72
|
+
return (_jsxs("div", { className: styles.itemContainer, "data-test": combinedDataTest, children: [showCheckbox && (_jsx("div", { className: styles.checkboxContainer, children: _jsx(Checkbox, { "aria-labelledby": this.id, checked: checkbox, disabled: disabled, onChange: onCheckboxChange, onClick: this.stopBubbling }) })), isLink ? (_jsx(LinkComponentToUse, { pseudo: !restLinkProps.href, ...commonProps, ...restLinkProps })) : (_jsx("button", { type: 'button', ...commonProps }))] }));
|
|
72
73
|
}
|
|
73
74
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
|
-
import { ListDataItemProps } from './consts';
|
|
2
|
+
import { type ListDataItemProps } from './consts';
|
|
3
3
|
export default class ListSeparator<T> extends PureComponent<ListDataItemProps<T>> {
|
|
4
4
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
}
|
|
@@ -8,6 +8,6 @@ export default class ListSeparator extends PureComponent {
|
|
|
8
8
|
const classes = classNames(styles.separator, className, {
|
|
9
9
|
[styles.separator_first]: isFirst,
|
|
10
10
|
});
|
|
11
|
-
return (_jsx("span", { "data-test":
|
|
11
|
+
return (_jsx("span", { "data-test": 'ring-list-separator', className: classes, children: description }));
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
|
-
import { ListDataItemProps } from './consts';
|
|
2
|
+
import { type ListDataItemProps } from './consts';
|
|
3
3
|
export default class ListTitle<T> extends PureComponent<ListDataItemProps<T>> {
|
|
4
4
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
}
|
|
@@ -8,6 +8,6 @@ export default class ListTitle extends PureComponent {
|
|
|
8
8
|
const classes = classnames(styles.title, className, {
|
|
9
9
|
[styles.title_first]: isFirst,
|
|
10
10
|
});
|
|
11
|
-
return (_jsxs("span", { className: classes, "data-test":
|
|
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 })] }));
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import HubSourceUsersGroups, { type HubSourceUsersGroupsOptions, type UserGroup } from '../hub-source/hub-source-users-groups';
|
|
2
|
+
import type Auth from '../auth/auth';
|
|
3
|
+
import type { AuthUser } from '../auth/auth';
|
|
3
4
|
interface ListUsersGroupsSourceOptions extends Partial<HubSourceUsersGroupsOptions> {
|
|
4
5
|
GroupsTitle: string;
|
|
5
6
|
NoGroupsTitle: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import GroupIcon from '@jetbrains/icons/group';
|
|
2
|
-
import HubSourceUsersGroups from '../hub-source/hub-
|
|
2
|
+
import HubSourceUsersGroups from '../hub-source/hub-source-users-groups';
|
|
3
3
|
import List from './list';
|
|
4
4
|
const defaultOptions = {
|
|
5
5
|
GroupsTitle: 'Groups',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ListDataItemProps } from './consts';
|
|
1
|
+
import { type ListDataItemProps } from './consts';
|
|
2
2
|
export declare function getListClasses<T = unknown>({ className, disabled, hover, compact, scrolling, rgItemType, }: Readonly<ListDataItemProps<T>>): string;
|
package/components/list/list.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import '../global/variables.css';
|
|
2
2
|
|
|
3
3
|
/* ensure style order */
|
|
4
|
-
@import
|
|
4
|
+
@import '../link/link.css';
|
|
5
5
|
|
|
6
6
|
.list {
|
|
7
7
|
position: relative;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
margin-top: 0;
|
|
44
44
|
padding-top: 0;
|
|
45
45
|
|
|
46
|
-
border:
|
|
46
|
+
border: 0;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.item {
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
white-space: nowrap;
|
|
108
108
|
text-overflow: ellipsis;
|
|
109
109
|
|
|
110
|
-
[dir=
|
|
110
|
+
[dir='rtl'] & {
|
|
111
111
|
text-align: right;
|
|
112
112
|
direction: ltr;
|
|
113
113
|
}
|
|
@@ -268,7 +268,7 @@
|
|
|
268
268
|
|
|
269
269
|
text-align: left;
|
|
270
270
|
|
|
271
|
-
[dir=
|
|
271
|
+
[dir='rtl'] & {
|
|
272
272
|
text-align: right;
|
|
273
273
|
direction: ltr;
|
|
274
274
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name List
|
|
3
3
|
*/
|
|
4
|
-
import { Component, ReactNode, SyntheticEvent } from 'react';
|
|
5
|
-
import VirtualizedList, { ListRowProps } from 'react-virtualized/dist/es/List';
|
|
6
|
-
import { Size } from 'react-virtualized/dist/es/AutoSizer';
|
|
7
|
-
import { WindowScrollerChildProps } from 'react-virtualized/dist/es/WindowScroller';
|
|
8
|
-
import { ShortcutsMap } from '../shortcuts/core';
|
|
9
|
-
import ListHint from './
|
|
10
|
-
import { ListDataItem, ListDataItemProps, Type } from './consts';
|
|
4
|
+
import { Component, type ReactNode, type SyntheticEvent } from 'react';
|
|
5
|
+
import VirtualizedList, { type ListRowProps } from 'react-virtualized/dist/es/List';
|
|
6
|
+
import { type Size } from 'react-virtualized/dist/es/AutoSizer';
|
|
7
|
+
import { type WindowScrollerChildProps } from 'react-virtualized/dist/es/WindowScroller';
|
|
8
|
+
import { type ShortcutsMap } from '../shortcuts/core';
|
|
9
|
+
import ListHint from './list-hint';
|
|
10
|
+
import { type ListDataItem, type ListDataItemProps, Type } from './consts';
|
|
11
11
|
export type { ListDataItem };
|
|
12
12
|
declare function noop(): void;
|
|
13
13
|
/**
|
package/components/list/list.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { createElement as _createElement } from "react";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
/* eslint-disable max-lines */
|
|
3
4
|
/**
|
|
4
5
|
* @name List
|
|
5
6
|
*/
|
|
6
|
-
import { Component } from 'react';
|
|
7
|
+
import { Component, } from 'react';
|
|
7
8
|
import classNames from 'classnames';
|
|
8
9
|
import VirtualizedList from 'react-virtualized/dist/es/List';
|
|
9
10
|
import AutoSizer from 'react-virtualized/dist/es/AutoSizer';
|
|
10
|
-
import
|
|
11
|
+
import WindowScrollerComponent from 'react-virtualized/dist/es/WindowScroller';
|
|
11
12
|
import { CellMeasurer, CellMeasurerCache } from 'react-virtualized/dist/es/CellMeasurer';
|
|
12
13
|
import deprecate from 'util-deprecate';
|
|
13
14
|
import memoizeOne from 'memoize-one';
|
|
@@ -18,11 +19,11 @@ import memoize from '../global/memoize';
|
|
|
18
19
|
import { preventDefault } from '../global/dom';
|
|
19
20
|
import Shortcuts from '../shortcuts/shortcuts';
|
|
20
21
|
import createStatefulContext from '../global/create-stateful-context';
|
|
21
|
-
import ListItem from './
|
|
22
|
-
import ListCustom from './
|
|
23
|
-
import ListTitle from './
|
|
24
|
-
import ListSeparator from './
|
|
25
|
-
import ListHint from './
|
|
22
|
+
import ListItem from './list-item';
|
|
23
|
+
import ListCustom from './list-custom';
|
|
24
|
+
import ListTitle from './list-title';
|
|
25
|
+
import ListSeparator from './list-separator';
|
|
26
|
+
import ListHint from './list-hint';
|
|
26
27
|
import { DEFAULT_ITEM_TYPE, Dimension, Type } from './consts';
|
|
27
28
|
import styles from './list.css';
|
|
28
29
|
function noop() { }
|
|
@@ -33,14 +34,14 @@ const warnEmptyKey = deprecate(() => { }, 'No key passed for list item with non-
|
|
|
33
34
|
*/
|
|
34
35
|
function isItemType(listItemType, item) {
|
|
35
36
|
let type = item.rgItemType;
|
|
36
|
-
if (type
|
|
37
|
+
if (type === null || type === undefined) {
|
|
37
38
|
type = DEFAULT_ITEM_TYPE;
|
|
38
39
|
}
|
|
39
40
|
return type === listItemType;
|
|
40
41
|
}
|
|
41
42
|
const nonActivatableTypes = [Type.SEPARATOR, Type.TITLE, Type.MARGIN];
|
|
42
43
|
function isActivatable(item) {
|
|
43
|
-
return item
|
|
44
|
+
return item !== null && item !== undefined && !nonActivatableTypes.includes(item.rgItemType) && !item.disabled;
|
|
44
45
|
}
|
|
45
46
|
function getDataHash(data) {
|
|
46
47
|
return data.map(it => `${it.key}-${it.disabled}`).join('-');
|
|
@@ -90,14 +91,14 @@ export default class List extends Component {
|
|
|
90
91
|
activeItem: null,
|
|
91
92
|
});
|
|
92
93
|
}
|
|
93
|
-
if (activeIndex
|
|
94
|
+
if (activeIndex !== null && activeIndex !== undefined && activeIndex !== prevActiveIndex && data[activeIndex]) {
|
|
94
95
|
Object.assign(nextState, {
|
|
95
96
|
activeIndex,
|
|
96
97
|
activeItem: data[activeIndex],
|
|
97
98
|
needScrollToActive: true,
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
|
-
else if (data !== prevData && restoreActiveIndex && activeItem
|
|
101
|
+
else if (data !== prevData && restoreActiveIndex && activeItem && activeItem.key) {
|
|
101
102
|
// Restore active index if there is an item with the same "key" property
|
|
102
103
|
const index = data.findIndex(item => item.key === activeItem.key);
|
|
103
104
|
if (index >= 0) {
|
|
@@ -110,7 +111,8 @@ export default class List extends Component {
|
|
|
110
111
|
return nextState;
|
|
111
112
|
}
|
|
112
113
|
componentDidMount() {
|
|
113
|
-
if (this.props.activeIndex
|
|
114
|
+
if ((this.props.activeIndex === null || this.props.activeIndex === undefined) &&
|
|
115
|
+
shouldActivateFirstItem(this.props)) {
|
|
114
116
|
this.activateFirst();
|
|
115
117
|
}
|
|
116
118
|
}
|
|
@@ -126,7 +128,7 @@ export default class List extends Component {
|
|
|
126
128
|
const isActiveItemRetainedPosition = activeIndex
|
|
127
129
|
? prevProps.data[activeIndex]?.key === this.props.data[activeIndex]?.key
|
|
128
130
|
: false;
|
|
129
|
-
if (this.props.activeIndex
|
|
131
|
+
if ((this.props.activeIndex === null || this.props.activeIndex === undefined) &&
|
|
130
132
|
getDataHash(this.props.data) !== getDataHash(prevProps.data) &&
|
|
131
133
|
shouldActivateFirstItem(this.props) &&
|
|
132
134
|
!isActiveItemRetainedPosition) {
|
|
@@ -253,7 +255,7 @@ export default class List extends Component {
|
|
|
253
255
|
if (this.props.data.length === 0 || !this.hasActivatableItems()) {
|
|
254
256
|
return;
|
|
255
257
|
}
|
|
256
|
-
|
|
258
|
+
if (this.props.data.length < index) {
|
|
257
259
|
correctedIndex = 0;
|
|
258
260
|
}
|
|
259
261
|
else {
|
|
@@ -285,7 +287,7 @@ export default class List extends Component {
|
|
|
285
287
|
const item = this.props.data[this.state.activeIndex];
|
|
286
288
|
this.selectHandler(this.state.activeIndex)(event);
|
|
287
289
|
if (item.href && !event.defaultPrevented) {
|
|
288
|
-
if (shortcut
|
|
290
|
+
if (shortcut !== null && shortcut !== undefined && ['command+enter', 'ctrl+enter'].includes(shortcut)) {
|
|
289
291
|
window.open(item.href, '_blank');
|
|
290
292
|
}
|
|
291
293
|
else if (shortcut === 'shift+enter') {
|
|
@@ -297,15 +299,13 @@ export default class List extends Component {
|
|
|
297
299
|
}
|
|
298
300
|
return false; // do not propagate event
|
|
299
301
|
}
|
|
300
|
-
|
|
301
|
-
return true; // propagate event to the parent component (e.g., QueryAssist)
|
|
302
|
-
}
|
|
302
|
+
return true; // propagate event to the parent component (e.g., QueryAssist)
|
|
303
303
|
};
|
|
304
304
|
getFirst() {
|
|
305
305
|
return this.props.data.find(item => item.rgItemType === Type.ITEM || item.rgItemType === Type.CUSTOM);
|
|
306
306
|
}
|
|
307
307
|
getSelected() {
|
|
308
|
-
return this.state.activeIndex
|
|
308
|
+
return this.state.activeIndex ? this.props.data[this.state.activeIndex] : null;
|
|
309
309
|
}
|
|
310
310
|
defaultItemHeight() {
|
|
311
311
|
return this.props.compact ? Dimension.COMPACT_ITEM_HEIGHT : Dimension.ITEM_HEIGHT;
|
|
@@ -345,8 +345,11 @@ export default class List extends Component {
|
|
|
345
345
|
return `${itemProps.rgItemType}_${identificator}`;
|
|
346
346
|
}
|
|
347
347
|
getId(item) {
|
|
348
|
-
return item
|
|
348
|
+
return item !== null && item !== undefined
|
|
349
|
+
? `${this.id}:${item.key || this._deprecatedGenerateKeyFromContent(item)}`
|
|
350
|
+
: undefined;
|
|
349
351
|
}
|
|
352
|
+
// eslint-disable-next-line complexity
|
|
350
353
|
renderItem = ({ index = 1, style, isScrolling = false, parent, key }) => {
|
|
351
354
|
let itemKey;
|
|
352
355
|
let el;
|
|
@@ -374,7 +377,7 @@ export default class List extends Component {
|
|
|
374
377
|
const itemProps = Object.assign({ rgItemType: DEFAULT_ITEM_TYPE }, restProps);
|
|
375
378
|
itemKey = key || itemId;
|
|
376
379
|
itemProps.hover = isActive;
|
|
377
|
-
if (itemProps.hoverClassName
|
|
380
|
+
if (itemProps.hoverClassName !== null && itemProps.hoverClassName !== undefined && itemProps.hover) {
|
|
378
381
|
itemProps.className = classNames(itemProps.className, itemProps.hoverClassName);
|
|
379
382
|
}
|
|
380
383
|
itemProps.tabIndex = -1;
|
|
@@ -387,7 +390,7 @@ export default class List extends Component {
|
|
|
387
390
|
itemProps.onClick = selectHandler;
|
|
388
391
|
}
|
|
389
392
|
itemProps.onCheckboxChange = this.checkboxHandler(realIndex);
|
|
390
|
-
if (itemProps.compact
|
|
393
|
+
if (itemProps.compact === null || itemProps.compact === undefined) {
|
|
391
394
|
itemProps.compact = this.props.compact;
|
|
392
395
|
}
|
|
393
396
|
let ItemComponent;
|
|
@@ -415,7 +418,7 @@ export default class List extends Component {
|
|
|
415
418
|
}
|
|
416
419
|
el = _createElement(ItemComponent, { ...itemProps, key: itemProps.key });
|
|
417
420
|
}
|
|
418
|
-
return parent ? (_jsx(CellMeasurer, { cache: this._cache, parent: parent, rowIndex: index, columnIndex: 0, children: ({ registerChild }) => (_jsx("div", { ref: registerChild, style: style, role:
|
|
421
|
+
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));
|
|
419
422
|
};
|
|
420
423
|
addItemDataTestToProp = (props) => {
|
|
421
424
|
props['data-test'] = dataTests('ring-list-item', props['data-test']);
|
|
@@ -441,16 +444,19 @@ export default class List extends Component {
|
|
|
441
444
|
this.scrollEndHandler();
|
|
442
445
|
}, scrollTop: scrollTop, rowCount: rowCount, estimatedRowSize: this.defaultItemHeight(), rowHeight: this._cache.rowHeight, rowRenderer: this.renderItem, overscanRowCount: this._bufferSize,
|
|
443
446
|
// ensure rerendering
|
|
444
|
-
noop: () => { }, scrollToIndex: !this.props.disableScrollToActive &&
|
|
447
|
+
noop: () => { }, scrollToIndex: !this.props.disableScrollToActive &&
|
|
448
|
+
this.state.needScrollToActive &&
|
|
449
|
+
this.state.activeIndex !== null &&
|
|
450
|
+
this.state.activeIndex !== undefined
|
|
445
451
|
? this.state.activeIndex + 1
|
|
446
|
-
: undefined, scrollToAlignment:
|
|
452
|
+
: undefined, scrollToAlignment: 'center', deferredMeasurementCache: this._cache, onRowsRendered: this.checkOverflow, containerRole: 'none' // row role is set by rowRenderer
|
|
447
453
|
}) })) }));
|
|
448
454
|
}
|
|
449
455
|
renderVirtualized(maxHeight, rowCount) {
|
|
450
456
|
if (maxHeight) {
|
|
451
457
|
return this.renderVirtualizedInner({ height: maxHeight, maxHeight, rowCount });
|
|
452
458
|
}
|
|
453
|
-
return (_jsx(
|
|
459
|
+
return (_jsx(WindowScrollerComponent, { children: props => this.renderVirtualizedInner({ ...props, rowCount, autoHeight: true }) }));
|
|
454
460
|
}
|
|
455
461
|
renderSimple(maxHeight, rowCount) {
|
|
456
462
|
const items = [];
|
|
@@ -460,7 +466,7 @@ export default class List extends Component {
|
|
|
460
466
|
isScrolling: this.state.scrolling,
|
|
461
467
|
}));
|
|
462
468
|
}
|
|
463
|
-
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:
|
|
469
|
+
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 }) }));
|
|
464
470
|
}
|
|
465
471
|
id = getUID('list-');
|
|
466
472
|
shortcutsScope = this.id;
|
|
@@ -482,7 +488,7 @@ export default class List extends Component {
|
|
|
482
488
|
const rowCount = this.props.data.length + 2;
|
|
483
489
|
const maxHeight = this.props.maxHeight && this.getVisibleListHeight(this.props.maxHeight);
|
|
484
490
|
const classes = classNames(styles.list, this.props.className);
|
|
485
|
-
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":
|
|
491
|
+
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
|
|
486
492
|
? this.renderVirtualized(maxHeight, rowCount)
|
|
487
493
|
: this.renderSimple(maxHeight, rowCount), this.state.hasOverflow && !this.state.scrolledToBottom && _jsx("div", { className: styles.fade, style: fadeStyles }), hint && _jsx(ListHint, { label: hint })] })] }));
|
|
488
494
|
}
|
|
@@ -137,7 +137,7 @@ export default class LoaderCore {
|
|
|
137
137
|
if (coord + radius * 2 + this.baseSpeed >= limit) {
|
|
138
138
|
return -(this.baseSpeed + randomizedSpeedChange);
|
|
139
139
|
}
|
|
140
|
-
|
|
140
|
+
if (coord <= this.baseSpeed) {
|
|
141
141
|
return this.baseSpeed + randomizedSpeedChange;
|
|
142
142
|
}
|
|
143
143
|
return speed;
|
|
@@ -187,7 +187,7 @@ export default class LoaderCore {
|
|
|
187
187
|
}
|
|
188
188
|
draw() {
|
|
189
189
|
const ctx = this.ctx;
|
|
190
|
-
if (ctx
|
|
190
|
+
if (ctx === null) {
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
193
|
ctx.clearRect(0, 0, this.width, this.height);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HTMLAttributes, PureComponent } from 'react';
|
|
2
|
-
import LoaderCore, { LoaderCoreProps } from './
|
|
1
|
+
import { type HTMLAttributes, PureComponent } from 'react';
|
|
2
|
+
import LoaderCore, { type LoaderCoreProps } from './loader-core';
|
|
3
3
|
export interface LoaderProps extends Partial<LoaderCoreProps>, HTMLAttributes<HTMLElement> {
|
|
4
4
|
'data-test'?: string | null | undefined;
|
|
5
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import '../global/variables.css';
|
|
2
2
|
|
|
3
3
|
:root,
|
|
4
4
|
:host {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
width: calc(var(--ring-unit) * 2);
|
|
59
59
|
height: calc(var(--ring-unit) * 2);
|
|
60
60
|
|
|
61
|
-
content:
|
|
61
|
+
content: '';
|
|
62
62
|
animation: pulse 0.85s cubic-bezier(0.68, 0, 0.74, 0.74) infinite alternate;
|
|
63
63
|
|
|
64
64
|
background-image: conic-gradient(var(--ring-loader-inline-stops));
|
|
@@ -61,6 +61,6 @@ export default class LoginDialog extends Component {
|
|
|
61
61
|
const { show, className, url, loadingMessage, renderFallbackLink, onCancel } = this.props;
|
|
62
62
|
const { loading, height, width, loggingIn, showFallbackLink } = this.state;
|
|
63
63
|
const iFrameStyle = { height, width };
|
|
64
|
-
return (_jsxs(Dialog, { "data-test":
|
|
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) })] }));
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LoginDialogAttrs } from './login-dialog';
|
|
1
|
+
import { type LoginDialogAttrs } from './login-dialog';
|
|
2
2
|
export default function showAuthDialog(props?: LoginDialogAttrs): () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import '../global/variables.css';
|
|
2
2
|
|
|
3
3
|
.inline {
|
|
4
4
|
&,
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
.markdown {
|
|
11
11
|
--ring-markdown-p-margin: 10px;
|
|
12
12
|
|
|
13
|
-
composes: font from
|
|
13
|
+
composes: font from '../global/global.css';
|
|
14
14
|
|
|
15
15
|
& ol,
|
|
16
16
|
& ul {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
& hr {
|
|
45
45
|
margin: var(--ring-markdown-p-margin) 0;
|
|
46
46
|
|
|
47
|
-
border:
|
|
47
|
+
border: 0;
|
|
48
48
|
border-bottom: 1px solid var(--ring-line-color);
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -14,6 +14,6 @@ export default class Markdown extends PureComponent {
|
|
|
14
14
|
[styles.markdown]: !inline,
|
|
15
15
|
[styles.inline]: inline,
|
|
16
16
|
});
|
|
17
|
-
return (_jsx("div", { "data-test":
|
|
17
|
+
return (_jsx("div", { "data-test": 'ring-markdown', className: classes, children: children }));
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import '../global/variables.css';
|
|
2
2
|
|
|
3
3
|
/* ensure style order */
|
|
4
|
-
@import
|
|
4
|
+
@import '../popup/popup.css';
|
|
5
5
|
|
|
6
6
|
.container {
|
|
7
7
|
display: inline;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.title {
|
|
32
|
-
composes: font-lower from
|
|
32
|
+
composes: font-lower from '../global/global.css';
|
|
33
33
|
|
|
34
34
|
margin: 0;
|
|
35
35
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Component, ReactNode } from 'react';
|
|
2
|
-
import Popup, { PopupAttrs } from '../popup/popup';
|
|
1
|
+
import { Component, type ReactNode } from 'react';
|
|
2
|
+
import Popup, { type PopupAttrs } from '../popup/popup';
|
|
3
3
|
import { Directions } from '../popup/popup.consts';
|
|
4
|
-
import { IconType } from '../icon/icon';
|
|
5
|
-
import { ButtonAttrs } from '../button/button';
|
|
4
|
+
import { type IconType } from '../icon/icon';
|
|
5
|
+
import { type ButtonAttrs } from '../button/button';
|
|
6
6
|
import Theme from '../global/theme';
|
|
7
7
|
export interface MessageTranslations {
|
|
8
8
|
gotIt: string;
|
|
@@ -76,7 +76,7 @@ export default class Message extends Component {
|
|
|
76
76
|
getTailOffset() {
|
|
77
77
|
const DEFAULT_OFFSET = 32;
|
|
78
78
|
const { popupProps } = this.props;
|
|
79
|
-
if (this.props.tailOffset
|
|
79
|
+
if (this.props.tailOffset) {
|
|
80
80
|
return this.props.tailOffset;
|
|
81
81
|
}
|
|
82
82
|
const anchor = popupProps?.anchorElement || this.popup?.parent;
|
|
@@ -84,7 +84,7 @@ export default class Message extends Component {
|
|
|
84
84
|
return DEFAULT_OFFSET;
|
|
85
85
|
}
|
|
86
86
|
const offset = Math.floor(anchor.offsetWidth / 2);
|
|
87
|
-
const isOpenedToRight = this.state.direction
|
|
87
|
+
const isOpenedToRight = this.state.direction && [Directions.TOP_RIGHT, Directions.BOTTOM_RIGHT].includes(this.state.direction);
|
|
88
88
|
if (popupProps?.left && isOpenedToRight) {
|
|
89
89
|
return offset - popupProps?.left;
|
|
90
90
|
}
|
|
@@ -98,6 +98,6 @@ export default class Message extends Component {
|
|
|
98
98
|
const tailClasses = classNames(styles.tail, tailClassName);
|
|
99
99
|
const popupDirections = this.props.direction ? [this.props.direction] : this.props.directions;
|
|
100
100
|
const { direction } = this.state;
|
|
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":
|
|
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') }))] }) })) })) }));
|
|
102
102
|
}
|
|
103
103
|
}
|