@jetbrains/ring-ui-built 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>;
|
@@ -92,7 +92,7 @@ import '../popup/popup.consts.js';
|
|
92
92
|
import '../popup/popup.target.js';
|
93
93
|
import '../i18n/i18n.js';
|
94
94
|
|
95
|
-
var _excluded = ["className", "activeClassName", "closeOnSelect", "hasUpdates", "onLogout", "user", "profileUrl", "LinkComponent", "onSwitchUser", "renderPopupItems", "onRevertPostponement", "showApplyChangedUser", "showName", "showLogIn", "showLogOut", "showSwitchUser", "renderGuest", "translations", "size", "round", "loading", "onLogin", "menuProps"];
|
95
|
+
var _excluded = ["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"];
|
96
96
|
var rgItemType = PopupMenu.ListProps.Type.LINK;
|
97
97
|
var Profile = /*#__PURE__*/function (_PureComponent) {
|
98
98
|
_inherits(Profile, _PureComponent);
|
@@ -129,6 +129,8 @@ var Profile = /*#__PURE__*/function (_PureComponent) {
|
|
129
129
|
_this$props.loading;
|
130
130
|
_this$props.onLogin;
|
131
131
|
var menuProps = _this$props.menuProps,
|
132
|
+
onShow = _this$props.onShow,
|
133
|
+
onHide = _this$props.onHide,
|
132
134
|
props = _objectWithoutProperties(_this$props, _excluded);
|
133
135
|
var translate = this.context.translate;
|
134
136
|
if (!user) {
|
@@ -183,6 +185,8 @@ var Profile = /*#__PURE__*/function (_PureComponent) {
|
|
183
185
|
onClick: onLogout
|
184
186
|
}].filter(isTruthy);
|
185
187
|
return /*#__PURE__*/React.createElement(DropdownMenu, _extends({}, props, {
|
188
|
+
onShow: onShow,
|
189
|
+
onHide: onHide,
|
186
190
|
title: user.name,
|
187
191
|
anchor: anchor,
|
188
192
|
data: renderPopupItems(items),
|
@@ -233,7 +237,9 @@ _defineProperty(Profile, "propTypes", {
|
|
233
237
|
showApplyChangedUser: PropTypes.bool,
|
234
238
|
onRevertPostponement: PropTypes.func,
|
235
239
|
renderGuest: PropTypes.func,
|
236
|
-
menuProps: PropTypes.object
|
240
|
+
menuProps: PropTypes.object,
|
241
|
+
onShow: PropTypes.func,
|
242
|
+
onHide: PropTypes.func
|
237
243
|
});
|
238
244
|
_defineProperty(Profile, "defaultProps", {
|
239
245
|
closeOnSelect: true,
|