@jetbrains/ring-ui 6.0.14 → 6.0.15

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.
@@ -36,6 +36,8 @@ export interface ProfileProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSe
36
36
  onRevertPostponement?: (() => void) | null | undefined;
37
37
  menuProps?: PopupMenuAttrs | null | undefined;
38
38
  activeClassName?: string | null | undefined;
39
+ onShow?: (() => void);
40
+ onHide?: (() => void);
39
41
  }
40
42
  export default class Profile extends PureComponent<ProfileProps> {
41
43
  static propTypes: {
@@ -72,6 +74,8 @@ export default class Profile extends PureComponent<ProfileProps> {
72
74
  onRevertPostponement: PropTypes.Requireable<(...args: any[]) => any>;
73
75
  renderGuest: PropTypes.Requireable<(...args: any[]) => any>;
74
76
  menuProps: PropTypes.Requireable<object>;
77
+ onShow: PropTypes.Requireable<(...args: any[]) => any>;
78
+ onHide: PropTypes.Requireable<(...args: any[]) => any>;
75
79
  };
76
80
  static defaultProps: ProfileProps;
77
81
  static contextType: React.Context<import("../i18n/i18n-context").I18nContextProps>;
@@ -47,7 +47,9 @@ export default class Profile extends PureComponent {
47
47
  showApplyChangedUser: PropTypes.bool,
48
48
  onRevertPostponement: PropTypes.func,
49
49
  renderGuest: PropTypes.func,
50
- menuProps: PropTypes.object
50
+ menuProps: PropTypes.object,
51
+ onShow: PropTypes.func,
52
+ onHide: PropTypes.func
51
53
  };
52
54
  static defaultProps = {
53
55
  closeOnSelect: true,
@@ -64,7 +66,7 @@ export default class Profile extends PureComponent {
64
66
  static contextType = I18nContext;
65
67
  static Size = Size;
66
68
  render() {
67
- const { className, activeClassName, closeOnSelect, hasUpdates, onLogout, user, profileUrl, LinkComponent, onSwitchUser, renderPopupItems, onRevertPostponement, showApplyChangedUser, showName, showLogIn, showLogOut, showSwitchUser, renderGuest, translations, size, round, loading, onLogin, menuProps, ...props } = this.props;
69
+ const { className, activeClassName, closeOnSelect, hasUpdates, onLogout, user, profileUrl, LinkComponent, onSwitchUser, renderPopupItems, onRevertPostponement, showApplyChangedUser, showName, showLogIn, showLogOut, showSwitchUser, renderGuest, translations, size, round, loading, onLogin, menuProps, onShow, onHide, ...props } = this.props;
68
70
  const { translate } = this.context;
69
71
  if (!user) {
70
72
  return (<div {...props} className={classNames(styles.profileEmpty, className)}>
@@ -115,7 +117,7 @@ export default class Profile extends PureComponent {
115
117
  onClick: onLogout
116
118
  }
117
119
  ].filter(isTruthy);
118
- return (<DropdownMenu {...props} title={user.name} anchor={anchor} data={renderPopupItems(items)} data-test="ring-profile" className={classNames(styles.profile, className)} activeClassName={activeClassName} menuProps={{
120
+ return (<DropdownMenu {...props} onShow={onShow} onHide={onHide} title={user.name} anchor={anchor} data={renderPopupItems(items)} data-test="ring-profile" className={classNames(styles.profile, className)} activeClassName={activeClassName} menuProps={{
119
121
  closeOnSelect,
120
122
  left: -2,
121
123
  top: -8,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "6.0.14",
3
+ "version": "6.0.15",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",