@jetbrains/ring-ui 4.1.1 → 4.1.2
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/dist/_helpers/_rollupPluginBabelHelpers.js +34 -0
- package/dist/_helpers/anchor.js +32 -0
- package/dist/_helpers/badge.js +3 -0
- package/dist/_helpers/button-group.js +3 -0
- package/dist/_helpers/button-set.js +3 -0
- package/dist/_helpers/button-toolbar.js +3 -0
- package/dist/_helpers/button__classes.js +39 -0
- package/dist/_helpers/card.js +75 -0
- package/dist/_helpers/checkbox.js +3 -0
- package/dist/_helpers/date-picker.js +3 -0
- package/dist/_helpers/dialog__body-scroll-preventer.js +57 -0
- package/dist/_helpers/error-message.js +3 -0
- package/dist/_helpers/footer.js +121 -0
- package/dist/_helpers/grid.js +3 -0
- package/dist/_helpers/group.js +3 -0
- package/dist/_helpers/header.js +3 -0
- package/dist/_helpers/icon.js +3 -0
- package/dist/_helpers/inject-styles.js +22 -0
- package/dist/_helpers/input.js +3 -0
- package/dist/_helpers/island.js +3 -0
- package/dist/_helpers/link.js +3 -0
- package/dist/_helpers/list.js +3 -0
- package/dist/_helpers/loader-screen.js +3 -0
- package/dist/_helpers/panel.js +3 -0
- package/dist/_helpers/query-assist__suggestions.js +95 -0
- package/dist/_helpers/radio.js +3 -0
- package/dist/_helpers/select__filter.js +76 -0
- package/dist/_helpers/services-link.js +40 -0
- package/dist/_helpers/sidebar.js +125 -0
- package/dist/_helpers/table.js +3 -0
- package/dist/_helpers/tabs.js +3 -0
- package/dist/_helpers/title.js +99 -0
- package/dist/alert/alert.js +260 -0
- package/dist/alert/container.js +48 -0
- package/dist/alert-service/alert-service.js +170 -0
- package/dist/analytics/analytics.js +116 -0
- package/dist/analytics/analytics__custom-plugin.js +127 -0
- package/dist/analytics/analytics__fus-plugin.js +101 -0
- package/dist/analytics/analytics__ga-plugin.js +66 -0
- package/dist/analytics/analytics__plugin-utils.js +79 -0
- package/dist/analytics-ng/analytics-ng.js +94 -0
- package/dist/auth/auth.js +93 -0
- package/dist/auth/auth__core.js +1025 -0
- package/dist/auth/background-flow.js +122 -0
- package/dist/auth/down-notification.js +114 -0
- package/dist/auth/iframe-flow.js +150 -0
- package/dist/auth/landing-entry.js +5 -0
- package/dist/auth/landing.js +87 -0
- package/dist/auth/request-builder.js +75 -0
- package/dist/auth/response-parser.js +117 -0
- package/dist/auth/storage.js +280 -0
- package/dist/auth/token-validator.js +176 -0
- package/dist/auth/window-flow.js +133 -0
- package/dist/auth-dialog/auth-dialog.js +134 -0
- package/dist/auth-dialog-service/auth-dialog-service.js +68 -0
- package/dist/auth-ng/auth-ng.js +203 -0
- package/dist/auth-ng/auth-ng.mock.js +33 -0
- package/dist/autofocus-ng/autofocus-ng.js +50 -0
- package/dist/avatar/avatar-example-datauri.js +26 -0
- package/dist/avatar/avatar.js +161 -0
- package/dist/avatar/fallback-avatar.js +141 -0
- package/dist/avatar-editor-ng/avatar-editor-ng.js +164 -0
- package/dist/avatar-editor-ng/avatar-editor-ng__template.js +30 -0
- package/dist/avatar-ng/avatar-ng.js +18 -0
- package/dist/badge/badge.js +50 -0
- package/dist/badge-ng/badge-ng.js +16 -0
- package/dist/breadcrumb-ng/breadcrumb-ng.js +61 -0
- package/dist/button/button.js +123 -0
- package/dist/button/button__classes.js +5 -0
- package/dist/button-group/button-group.js +30 -0
- package/dist/button-group/caption.js +24 -0
- package/dist/button-group-ng/button-group-ng.js +38 -0
- package/dist/button-ng/button-ng.js +223 -0
- package/dist/button-set/button-set.js +26 -0
- package/dist/button-set-ng/button-set-ng.js +19 -0
- package/dist/button-toolbar/button-toolbar.js +29 -0
- package/dist/button-toolbar-ng/button-toolbar-ng.js +23 -0
- package/dist/caret/caret.js +264 -0
- package/dist/checkbox/checkbox.js +108 -0
- package/dist/checkbox-ng/checkbox-ng.js +55 -0
- package/dist/code/code.js +136 -0
- package/dist/compiler-ng/compiler-ng.js +53 -0
- package/dist/confirm/confirm.js +125 -0
- package/dist/confirm-ng/confirm-ng.js +66 -0
- package/dist/confirm-service/confirm-service.js +114 -0
- package/dist/content-layout/content-layout.js +65 -0
- package/dist/content-layout/sidebar.js +6 -0
- package/dist/contenteditable/contenteditable.js +78 -0
- package/dist/data-list/data-list.js +206 -0
- package/dist/data-list/data-list.mock.js +190 -0
- package/dist/data-list/item.js +227 -0
- package/dist/data-list/selection.js +101 -0
- package/dist/data-list/title.js +18 -0
- package/dist/data-list-ng/data-list-ng.js +59 -0
- package/dist/date-picker/consts.js +69 -0
- package/dist/date-picker/date-input.js +173 -0
- package/dist/date-picker/date-picker.js +365 -0
- package/dist/date-picker/date-popup.js +482 -0
- package/dist/date-picker/day.js +119 -0
- package/dist/date-picker/formats.js +3 -0
- package/dist/date-picker/month-names.js +99 -0
- package/dist/date-picker/month-slider.js +83 -0
- package/dist/date-picker/month.js +54 -0
- package/dist/date-picker/months.js +121 -0
- package/dist/date-picker/weekdays.js +32 -0
- package/dist/date-picker/years.js +109 -0
- package/dist/dialog/dialog.js +200 -0
- package/dist/dialog/dialog__body-scroll-preventer.js +2 -0
- package/dist/dialog-ng/dialog-ng.js +601 -0
- package/dist/dialog-ng/dialog-ng__template.js +71 -0
- package/dist/docked-panel-ng/docked-panel-ng.js +170 -0
- package/dist/dropdown/anchor.js +17 -0
- package/dist/dropdown/dropdown.js +234 -0
- package/dist/dropdown-menu/dropdown-menu.js +175 -0
- package/dist/error-bubble/error-bubble.js +57 -0
- package/dist/error-message/error-message.js +55 -0
- package/dist/error-message-ng/error-message-ng.js +53 -0
- package/dist/footer/footer.js +11 -0
- package/dist/footer-ng/footer-ng.js +75 -0
- package/dist/form-ng/form-ng.js +169 -0
- package/dist/global/angular-component-factory.js +82 -0
- package/dist/global/compose.js +9 -0
- package/dist/global/composeRefs.js +15 -0
- package/dist/global/conic-gradient.js +35 -0
- package/dist/global/create-stateful-context.js +54 -0
- package/dist/global/data-tests.js +22 -0
- package/dist/global/dom.js +124 -0
- package/dist/global/focus-sensor-hoc.js +145 -0
- package/dist/global/fuzzy-highlight.js +67 -0
- package/dist/global/get-event-key.js +111 -0
- package/dist/global/get-uid.js +15 -0
- package/dist/global/inject-styles.js +17 -0
- package/dist/global/linear-function.js +17 -0
- package/dist/global/listeners.js +42 -0
- package/dist/global/memoize.js +18 -0
- package/dist/global/normalize-indent.js +28 -0
- package/dist/global/promise-with-timeout.js +13 -0
- package/dist/global/radial-gradient-mask.js +49 -0
- package/dist/global/react-dom-renderer.js +45 -0
- package/dist/global/rerender-hoc.js +51 -0
- package/dist/global/ring-angular-component.js +24 -0
- package/dist/global/schedule-raf.js +31 -0
- package/dist/global/sniffer.js +6 -0
- package/dist/global/supports-css.js +20 -0
- package/dist/global/theme.js +54 -0
- package/dist/global/trivial-template-tag.js +15 -0
- package/dist/global/url.js +163 -0
- package/dist/global/variables_dark.js +57 -0
- package/dist/grid/col.js +60 -0
- package/dist/grid/grid.js +33 -0
- package/dist/grid/row.js +64 -0
- package/dist/group/group.js +31 -0
- package/dist/group-ng/group-ng.js +11 -0
- package/dist/header/header.js +147 -0
- package/dist/header/logo.js +38 -0
- package/dist/header/profile.js +217 -0
- package/dist/header/services-link.js +11 -0
- package/dist/header/services.js +136 -0
- package/dist/header/smart-profile.js +230 -0
- package/dist/header/smart-services.js +160 -0
- package/dist/header/tray-icon.js +45 -0
- package/dist/header/tray.js +31 -0
- package/dist/heading/heading.js +73 -0
- package/dist/http/http.js +216 -0
- package/dist/http/http.mock.js +65 -0
- package/dist/hub-source/hub-source.js +130 -0
- package/dist/hub-source/hub-source__user.js +28 -0
- package/dist/hub-source/hub-source__users-groups.js +62 -0
- package/dist/icon/icon.js +105 -0
- package/dist/icon/icon__constants.js +33 -0
- package/dist/icon/icon__svg.js +81 -0
- package/dist/icon/index.js +10 -0
- package/dist/icon-ng/icon-ng.js +89 -0
- package/dist/input/input.js +228 -0
- package/dist/input-ng/input-ng.js +166 -0
- package/dist/island/adaptive-island-hoc.js +47 -0
- package/dist/island/content.js +156 -0
- package/dist/island/header.js +83 -0
- package/dist/island/island.js +50 -0
- package/dist/island-legacy/content-legacy.js +26 -0
- package/dist/island-legacy/header-legacy.js +28 -0
- package/dist/island-legacy/island-legacy.js +28 -0
- package/dist/island-ng/island-content-ng.js +56 -0
- package/dist/island-ng/island-header-ng.js +32 -0
- package/dist/island-ng/island-ng-class-fixer.js +9 -0
- package/dist/island-ng/island-ng.js +31 -0
- package/dist/link/clickableLink.js +63 -0
- package/dist/link/link.js +114 -0
- package/dist/link-ng/link-ng.js +25 -0
- package/dist/list/consts.js +26 -0
- package/dist/list/list.js +812 -0
- package/dist/list/list__custom.js +85 -0
- package/dist/list/list__hint.js +26 -0
- package/dist/list/list__item.js +204 -0
- package/dist/list/list__link.js +64 -0
- package/dist/list/list__separator.js +30 -0
- package/dist/list/list__title.js +39 -0
- package/dist/list/list__users-groups-source.js +128 -0
- package/dist/loader/loader.js +70 -0
- package/dist/loader/loader__core.js +272 -0
- package/dist/loader-inline/inject-styles.js +11 -0
- package/dist/loader-inline/loader-inline.js +56 -0
- package/dist/loader-inline-ng/loader-inline-ng.js +42 -0
- package/dist/loader-ng/loader-ng.js +43 -0
- package/dist/loader-screen/loader-screen.js +43 -0
- package/dist/loader-screen-ng/loader-screen-ng.js +99 -0
- package/dist/login-dialog/login-dialog.js +186 -0
- package/dist/login-dialog/service.js +69 -0
- package/dist/markdown/code.js +30 -0
- package/dist/markdown/heading.js +23 -0
- package/dist/markdown/link.js +30 -0
- package/dist/markdown/markdown.js +73 -0
- package/dist/message/message.js +233 -0
- package/dist/message-bundle-ng/message-bundle-ng.js +111 -0
- package/dist/old-browsers-message/old-browsers-message.js +100 -0
- package/dist/old-browsers-message/old-browsers-message__stop.js +4 -0
- package/dist/old-browsers-message/white-list.js +33 -0
- package/dist/pager/pager.js +361 -0
- package/dist/pager-ng/pager-ng.js +96 -0
- package/dist/panel/panel.js +31 -0
- package/dist/panel-ng/panel-ng.js +16 -0
- package/dist/permissions/permissions.js +200 -0
- package/dist/permissions/permissions__cache.js +272 -0
- package/dist/permissions-ng/permissions-ng.js +274 -0
- package/dist/place-under-ng/place-under-ng.js +157 -0
- package/dist/popup/popup.consts.js +41 -0
- package/dist/popup/popup.js +389 -0
- package/dist/popup/popup.target.js +26 -0
- package/dist/popup/position.js +279 -0
- package/dist/popup-menu/popup-menu.js +115 -0
- package/dist/progress-bar/progress-bar.js +113 -0
- package/dist/progress-bar-ng/progress-bar-ng.js +15 -0
- package/dist/promised-click-ng/promised-click-ng.js +126 -0
- package/dist/proxy-attrs/proxy-attrs.js +19 -0
- package/dist/query-assist/query-assist.js +1092 -0
- package/dist/query-assist/query-assist__suggestions.js +47 -0
- package/dist/query-assist-ng/query-assist-ng.js +82 -0
- package/dist/radio/radio.js +41 -0
- package/dist/radio/radio__item.js +77 -0
- package/dist/radio-ng/radio-ng.js +63 -0
- package/dist/save-field-ng/save-field-ng.js +335 -0
- package/dist/save-field-ng/save-field-ng__template.js +34 -0
- package/dist/select/select.js +1336 -0
- package/dist/select/select__filter.js +54 -0
- package/dist/select/select__popup.js +546 -0
- package/dist/select-ng/select-ng.js +621 -0
- package/dist/select-ng/select-ng__lazy.js +150 -0
- package/dist/select-ng/select-ng__options.js +145 -0
- package/dist/shortcuts/core.js +245 -0
- package/dist/shortcuts/shortcut-title.js +51 -0
- package/dist/shortcuts/shortcuts-hoc.js +41 -0
- package/dist/shortcuts/shortcuts.js +72 -0
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +120 -0
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng__template.js +50 -0
- package/dist/shortcuts-ng/shortcuts-ng.js +261 -0
- package/dist/sidebar-ng/sidebar-ng.js +111 -0
- package/dist/sidebar-ng/sidebar-ng__button-template.js +20 -0
- package/dist/sidebar-ng/sidebar-ng__template.js +12 -0
- package/dist/storage/storage.js +56 -0
- package/dist/storage/storage__fallback.js +214 -0
- package/dist/storage/storage__local.js +151 -0
- package/dist/style.css +1 -0
- package/dist/tab-trap/tab-trap.js +176 -0
- package/dist/table/cell.js +25 -0
- package/dist/table/disable-hover-hoc.js +53 -0
- package/dist/table/header-cell.js +90 -0
- package/dist/table/header.js +191 -0
- package/dist/table/multitable.js +140 -0
- package/dist/table/row-with-focus-sensor.js +81 -0
- package/dist/table/row.js +271 -0
- package/dist/table/selection-adapter.js +14 -0
- package/dist/table/selection-shortcuts-hoc.js +214 -0
- package/dist/table/selection.js +221 -0
- package/dist/table/smart-table.js +119 -0
- package/dist/table/table.js +404 -0
- package/dist/table-legacy-ng/table-legacy-ng.js +501 -0
- package/dist/table-legacy-ng/table-legacy-ng__pager.js +122 -0
- package/dist/table-legacy-ng/table-legacy-ng__selection-navigate-actions.js +123 -0
- package/dist/table-legacy-ng/table-legacy-ng__selection.js +179 -0
- package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +56 -0
- package/dist/table-ng/smart-table-ng.js +65 -0
- package/dist/table-ng/table-ng.js +64 -0
- package/dist/tabs/collapsible-more.js +196 -0
- package/dist/tabs/collapsible-tab.js +90 -0
- package/dist/tabs/collapsible-tabs.js +360 -0
- package/dist/tabs/custom-item.js +13 -0
- package/dist/tabs/dumb-tabs.js +161 -0
- package/dist/tabs/smart-tabs.js +104 -0
- package/dist/tabs/tab-link.js +41 -0
- package/dist/tabs/tab.js +32 -0
- package/dist/tabs/tabs.js +69 -0
- package/dist/tabs-ng/tabs-ng.js +193 -0
- package/dist/tabs-ng/tabs-ng__template.js +40 -0
- package/dist/tag/tag.js +196 -0
- package/dist/tags-input/tags-input.js +478 -0
- package/dist/tags-input-ng/tags-input-ng.js +89 -0
- package/dist/tags-list/tags-list.js +93 -0
- package/dist/template-ng/template-ng.js +70 -0
- package/dist/text/text.js +36 -0
- package/dist/theme-ng/theme-ng.js +44 -0
- package/dist/title-ng/title-ng.js +114 -0
- package/dist/toggle/toggle.js +77 -0
- package/dist/toggle-ng/toggle-ng.js +16 -0
- package/dist/tooltip/tooltip.js +207 -0
- package/dist/tooltip-ng/tooltip-ng.js +98 -0
- package/dist/user-agreement/service.js +409 -0
- package/dist/user-agreement/toolbox.eula.js +162 -0
- package/dist/user-agreement/user-agreement.js +167 -0
- package/dist/user-card/card.js +17 -0
- package/dist/user-card/smart-user-card-tooltip.js +112 -0
- package/dist/user-card/tooltip.js +93 -0
- package/dist/user-card/user-card.js +49 -0
- package/dist/user-card-ng/user-card-ng.js +59 -0
- package/package.json +2 -2
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React, { PureComponent } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import Icon from '../icon/icon.js';
|
|
6
|
+
import { m as modules_47759f5e } from '../_helpers/header.js';
|
|
7
|
+
import { Size } from '../icon/icon__constants.js';
|
|
8
|
+
import 'util-deprecate';
|
|
9
|
+
import '../_helpers/icon.js';
|
|
10
|
+
import '../icon/icon__svg.js';
|
|
11
|
+
import '../global/memoize.js';
|
|
12
|
+
|
|
13
|
+
class Logo extends PureComponent {
|
|
14
|
+
render() {
|
|
15
|
+
const {
|
|
16
|
+
className,
|
|
17
|
+
...restProps
|
|
18
|
+
} = this.props;
|
|
19
|
+
const classes = classNames(modules_47759f5e.logo, className);
|
|
20
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
21
|
+
className: classes
|
|
22
|
+
}, /*#__PURE__*/React.createElement(Icon, restProps));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
_defineProperty(Logo, "propTypes", {
|
|
28
|
+
className: PropTypes.string
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
_defineProperty(Logo, "defaultProps", {
|
|
32
|
+
size: Size.Size48,
|
|
33
|
+
suppressSizeWarning: true
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
_defineProperty(Logo, "Size", Size);
|
|
37
|
+
|
|
38
|
+
export { Logo as default };
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React, { Component, PureComponent } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import Avatar, { Size } from '../avatar/avatar.js';
|
|
6
|
+
import Button from '../button/button.js';
|
|
7
|
+
import DropdownMenu from '../dropdown-menu/dropdown-menu.js';
|
|
8
|
+
import PopupMenu from '../popup-menu/popup-menu.js';
|
|
9
|
+
import { m as modules_47759f5e } from '../_helpers/header.js';
|
|
10
|
+
import '../global/url.js';
|
|
11
|
+
import '../global/dom.js';
|
|
12
|
+
import '../avatar/fallback-avatar.js';
|
|
13
|
+
import '../global/get-uid.js';
|
|
14
|
+
import 'focus-visible';
|
|
15
|
+
import '@jetbrains/icons/chevron-10px';
|
|
16
|
+
import '../icon/icon.js';
|
|
17
|
+
import 'util-deprecate';
|
|
18
|
+
import '../icon/icon__constants.js';
|
|
19
|
+
import '../_helpers/icon.js';
|
|
20
|
+
import '../icon/icon__svg.js';
|
|
21
|
+
import '../global/memoize.js';
|
|
22
|
+
import '../global/theme.js';
|
|
23
|
+
import '../link/clickableLink.js';
|
|
24
|
+
import '../_helpers/button__classes.js';
|
|
25
|
+
import '../list/list.js';
|
|
26
|
+
import 'react-virtualized/dist/es/List';
|
|
27
|
+
import 'react-virtualized/dist/es/AutoSizer';
|
|
28
|
+
import 'react-virtualized/dist/es/WindowScroller';
|
|
29
|
+
import 'react-virtualized/dist/es/CellMeasurer';
|
|
30
|
+
import 'memoize-one';
|
|
31
|
+
import '../global/data-tests.js';
|
|
32
|
+
import '../global/schedule-raf.js';
|
|
33
|
+
import '../shortcuts/shortcuts.js';
|
|
34
|
+
import '../shortcuts/core.js';
|
|
35
|
+
import 'combokeys';
|
|
36
|
+
import '../global/sniffer.js';
|
|
37
|
+
import 'sniffr';
|
|
38
|
+
import '../global/create-stateful-context.js';
|
|
39
|
+
import '../list/list__link.js';
|
|
40
|
+
import '../link/link.js';
|
|
41
|
+
import '../_helpers/link.js';
|
|
42
|
+
import '../_helpers/list.js';
|
|
43
|
+
import '../list/list__item.js';
|
|
44
|
+
import '../checkbox/checkbox.js';
|
|
45
|
+
import '@jetbrains/icons/checkmark';
|
|
46
|
+
import '@jetbrains/icons/remove-10px';
|
|
47
|
+
import '../_helpers/checkbox.js';
|
|
48
|
+
import '../list/list__custom.js';
|
|
49
|
+
import '../global/get-event-key.js';
|
|
50
|
+
import '../list/list__title.js';
|
|
51
|
+
import '../list/list__separator.js';
|
|
52
|
+
import '../list/list__hint.js';
|
|
53
|
+
import '../list/consts.js';
|
|
54
|
+
import '../dropdown/dropdown.js';
|
|
55
|
+
import '../_helpers/anchor.js';
|
|
56
|
+
import '../popup/popup.js';
|
|
57
|
+
import 'react-dom';
|
|
58
|
+
import '../tab-trap/tab-trap.js';
|
|
59
|
+
import '../popup/position.js';
|
|
60
|
+
import '../popup/popup.consts.js';
|
|
61
|
+
import '../popup/popup.target.js';
|
|
62
|
+
|
|
63
|
+
const rgItemType = PopupMenu.ListProps.Type.LINK;
|
|
64
|
+
class Profile extends PureComponent {
|
|
65
|
+
render() {
|
|
66
|
+
const {
|
|
67
|
+
className,
|
|
68
|
+
closeOnSelect,
|
|
69
|
+
hasUpdates,
|
|
70
|
+
onLogout,
|
|
71
|
+
user,
|
|
72
|
+
profileUrl,
|
|
73
|
+
LinkComponent,
|
|
74
|
+
onSwitchUser,
|
|
75
|
+
renderPopupItems,
|
|
76
|
+
onRevertPostponement,
|
|
77
|
+
showApplyChangedUser,
|
|
78
|
+
showLogIn,
|
|
79
|
+
showLogOut,
|
|
80
|
+
showSwitchUser,
|
|
81
|
+
renderGuest,
|
|
82
|
+
translations,
|
|
83
|
+
size,
|
|
84
|
+
round,
|
|
85
|
+
loading,
|
|
86
|
+
onLogin,
|
|
87
|
+
...props
|
|
88
|
+
} = this.props;
|
|
89
|
+
|
|
90
|
+
if (!user) {
|
|
91
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
92
|
+
className: classNames(modules_47759f5e.profileEmpty, className)
|
|
93
|
+
}), /*#__PURE__*/React.createElement(Avatar, {
|
|
94
|
+
size: size,
|
|
95
|
+
round: round
|
|
96
|
+
}));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (user.guest) {
|
|
100
|
+
return renderGuest(this.props);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const anchorClassName = classNames(modules_47759f5e.avatarWrapper, {
|
|
104
|
+
[modules_47759f5e.hasUpdates]: hasUpdates
|
|
105
|
+
});
|
|
106
|
+
const anchor = /*#__PURE__*/React.createElement("button", {
|
|
107
|
+
type: "button",
|
|
108
|
+
className: anchorClassName
|
|
109
|
+
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
110
|
+
url: user.profile && user.profile.avatar && user.profile.avatar.url,
|
|
111
|
+
size: size,
|
|
112
|
+
round: round
|
|
113
|
+
}));
|
|
114
|
+
const items = [showApplyChangedUser && {
|
|
115
|
+
rgItemType,
|
|
116
|
+
label: translations.applyChangedUser || 'Apply changed user',
|
|
117
|
+
className: modules_47759f5e.profileMenuItem,
|
|
118
|
+
onClick: onRevertPostponement
|
|
119
|
+
}, showLogIn && {
|
|
120
|
+
rgItemType,
|
|
121
|
+
label: translations.login || 'Log in',
|
|
122
|
+
className: modules_47759f5e.profileMenuItem,
|
|
123
|
+
onClick: onRevertPostponement
|
|
124
|
+
}, {
|
|
125
|
+
rgItemType: PopupMenu.ListProps.Type.LINK,
|
|
126
|
+
label: translations.profile || 'Profile',
|
|
127
|
+
target: '_self',
|
|
128
|
+
// Full page reload in Angular
|
|
129
|
+
href: profileUrl,
|
|
130
|
+
LinkComponent
|
|
131
|
+
}, showSwitchUser && {
|
|
132
|
+
rgItemType,
|
|
133
|
+
label: translations.switchUser || 'Switch user',
|
|
134
|
+
className: modules_47759f5e.profileMenuItem,
|
|
135
|
+
onClick: onSwitchUser
|
|
136
|
+
}, showLogOut && {
|
|
137
|
+
rgItemType,
|
|
138
|
+
label: translations.logout || 'Log out',
|
|
139
|
+
onClick: onLogout
|
|
140
|
+
}].filter(it => !!it);
|
|
141
|
+
return /*#__PURE__*/React.createElement(DropdownMenu, _extends({}, props, {
|
|
142
|
+
title: user.name,
|
|
143
|
+
anchor: anchor,
|
|
144
|
+
data: renderPopupItems(items),
|
|
145
|
+
"data-test": "ring-profile",
|
|
146
|
+
className: classNames(modules_47759f5e.profile, className),
|
|
147
|
+
menuProps: {
|
|
148
|
+
closeOnSelect,
|
|
149
|
+
left: -2,
|
|
150
|
+
top: -8,
|
|
151
|
+
sidePadding: 32
|
|
152
|
+
}
|
|
153
|
+
}));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
_defineProperty(Profile, "propTypes", {
|
|
159
|
+
className: PropTypes.string,
|
|
160
|
+
closeOnSelect: PropTypes.bool,
|
|
161
|
+
hasUpdates: PropTypes.bool,
|
|
162
|
+
loading: PropTypes.bool,
|
|
163
|
+
onLogin: PropTypes.func,
|
|
164
|
+
onLogout: PropTypes.func,
|
|
165
|
+
onSwitchUser: PropTypes.func,
|
|
166
|
+
profileUrl: PropTypes.string,
|
|
167
|
+
renderPopupItems: PropTypes.func,
|
|
168
|
+
LinkComponent: PropTypes.oneOfType([PropTypes.instanceOf(Component), PropTypes.func, PropTypes.string]),
|
|
169
|
+
translations: PropTypes.shape({
|
|
170
|
+
profile: PropTypes.string,
|
|
171
|
+
login: PropTypes.string,
|
|
172
|
+
logout: PropTypes.string,
|
|
173
|
+
applyChangedUser: PropTypes.string,
|
|
174
|
+
switchUser: PropTypes.string
|
|
175
|
+
}),
|
|
176
|
+
user: PropTypes.shape({
|
|
177
|
+
guest: PropTypes.bool,
|
|
178
|
+
profile: PropTypes.object,
|
|
179
|
+
name: PropTypes.string
|
|
180
|
+
}),
|
|
181
|
+
size: PropTypes.number,
|
|
182
|
+
round: PropTypes.bool,
|
|
183
|
+
showLogIn: PropTypes.bool,
|
|
184
|
+
showLogOut: PropTypes.bool,
|
|
185
|
+
showSwitchUser: PropTypes.bool,
|
|
186
|
+
showApplyChangedUser: PropTypes.bool,
|
|
187
|
+
onRevertPostponement: PropTypes.func,
|
|
188
|
+
renderGuest: PropTypes.func
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
_defineProperty(Profile, "defaultProps", {
|
|
192
|
+
closeOnSelect: true,
|
|
193
|
+
renderPopupItems: items => items,
|
|
194
|
+
translations: {},
|
|
195
|
+
size: Size.Size32,
|
|
196
|
+
renderGuest: _ref => {
|
|
197
|
+
let {
|
|
198
|
+
loading,
|
|
199
|
+
onLogin,
|
|
200
|
+
className,
|
|
201
|
+
translations
|
|
202
|
+
} = _ref;
|
|
203
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
204
|
+
className: classNames(modules_47759f5e.profileEmpty, className)
|
|
205
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
206
|
+
primary: true,
|
|
207
|
+
"data-test": "ring-header-login-button",
|
|
208
|
+
disabled: loading,
|
|
209
|
+
loader: loading,
|
|
210
|
+
onClick: onLogin
|
|
211
|
+
}, translations.login || 'Log in...'));
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
_defineProperty(Profile, "Size", Size);
|
|
216
|
+
|
|
217
|
+
export { Profile as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'prop-types';
|
|
4
|
+
import '../link/link.js';
|
|
5
|
+
export { S as default } from '../_helpers/services-link.js';
|
|
6
|
+
import 'focus-visible';
|
|
7
|
+
import 'classnames';
|
|
8
|
+
import '../global/memoize.js';
|
|
9
|
+
import '../global/data-tests.js';
|
|
10
|
+
import '../link/clickableLink.js';
|
|
11
|
+
import '../_helpers/link.js';
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React, { PureComponent } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import servicesIcon from '@jetbrains/icons/services-20px';
|
|
5
|
+
import Dropdown from '../dropdown/dropdown.js';
|
|
6
|
+
import Popup from '../popup/popup.js';
|
|
7
|
+
import TrayIcon from './tray-icon.js';
|
|
8
|
+
import { S as ServicesLink, m as modules_74a7bf8b } from '../_helpers/services-link.js';
|
|
9
|
+
import 'classnames';
|
|
10
|
+
import '../global/data-tests.js';
|
|
11
|
+
import '../_helpers/anchor.js';
|
|
12
|
+
import '@jetbrains/icons/chevron-10px';
|
|
13
|
+
import '../icon/icon.js';
|
|
14
|
+
import 'util-deprecate';
|
|
15
|
+
import '../icon/icon__constants.js';
|
|
16
|
+
import '../_helpers/icon.js';
|
|
17
|
+
import '../icon/icon__svg.js';
|
|
18
|
+
import '../global/memoize.js';
|
|
19
|
+
import '../button/button.js';
|
|
20
|
+
import 'focus-visible';
|
|
21
|
+
import '../global/theme.js';
|
|
22
|
+
import '../link/clickableLink.js';
|
|
23
|
+
import '../_helpers/button__classes.js';
|
|
24
|
+
import 'react-dom';
|
|
25
|
+
import '../global/get-uid.js';
|
|
26
|
+
import '../global/schedule-raf.js';
|
|
27
|
+
import '../global/dom.js';
|
|
28
|
+
import '../shortcuts/shortcuts.js';
|
|
29
|
+
import '../shortcuts/core.js';
|
|
30
|
+
import 'combokeys';
|
|
31
|
+
import '../global/sniffer.js';
|
|
32
|
+
import 'sniffr';
|
|
33
|
+
import '../tab-trap/tab-trap.js';
|
|
34
|
+
import '../popup/position.js';
|
|
35
|
+
import '../popup/popup.consts.js';
|
|
36
|
+
import '../popup/popup.target.js';
|
|
37
|
+
import '../_helpers/header.js';
|
|
38
|
+
import '../link/link.js';
|
|
39
|
+
import '../_helpers/link.js';
|
|
40
|
+
|
|
41
|
+
const makeAnchor = loading => {
|
|
42
|
+
const Anchor = _ref => {
|
|
43
|
+
let {
|
|
44
|
+
active
|
|
45
|
+
} = _ref;
|
|
46
|
+
return /*#__PURE__*/React.createElement(TrayIcon, {
|
|
47
|
+
loader: loading,
|
|
48
|
+
active: active,
|
|
49
|
+
icon: servicesIcon,
|
|
50
|
+
"aria-label": "Services"
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
Anchor.propTypes = {
|
|
55
|
+
active: PropTypes.bool
|
|
56
|
+
};
|
|
57
|
+
return Anchor;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
class Services extends PureComponent {
|
|
61
|
+
constructor() {
|
|
62
|
+
super(...arguments);
|
|
63
|
+
|
|
64
|
+
_defineProperty(this, "serviceIsActive", service => service.id === this.props.clientId);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
render() {
|
|
68
|
+
const {
|
|
69
|
+
clientId,
|
|
70
|
+
loading,
|
|
71
|
+
services,
|
|
72
|
+
initShown,
|
|
73
|
+
...props
|
|
74
|
+
} = this.props;
|
|
75
|
+
|
|
76
|
+
if (!services) {
|
|
77
|
+
return /*#__PURE__*/React.createElement(TrayIcon, _extends({}, props, {
|
|
78
|
+
loader: loading,
|
|
79
|
+
active: loading,
|
|
80
|
+
icon: servicesIcon,
|
|
81
|
+
"aria-label": "Services"
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const sortedServices = [...services].sort(Services.sort);
|
|
86
|
+
const servicesWithIcons = sortedServices.filter(service => service.iconUrl);
|
|
87
|
+
const servicesWithOutIcons = sortedServices.filter(service => !service.iconUrl);
|
|
88
|
+
const separatorIsRequired = servicesWithIcons.length !== 0 && servicesWithOutIcons.length !== 0;
|
|
89
|
+
return /*#__PURE__*/React.createElement(Dropdown, _extends({}, props, {
|
|
90
|
+
anchor: makeAnchor(loading),
|
|
91
|
+
initShown: initShown
|
|
92
|
+
}), /*#__PURE__*/React.createElement(Popup, {
|
|
93
|
+
className: modules_74a7bf8b.services,
|
|
94
|
+
top: -3
|
|
95
|
+
}, servicesWithIcons.map(service => {
|
|
96
|
+
const isActive = this.serviceIsActive(service);
|
|
97
|
+
return /*#__PURE__*/React.createElement(Services.Link, {
|
|
98
|
+
active: isActive,
|
|
99
|
+
className: isActive ? modules_74a7bf8b.activeItem : modules_74a7bf8b.item,
|
|
100
|
+
key: service.id,
|
|
101
|
+
service: service
|
|
102
|
+
});
|
|
103
|
+
}), separatorIsRequired && /*#__PURE__*/React.createElement("div", {
|
|
104
|
+
className: modules_74a7bf8b.line,
|
|
105
|
+
key: "separator"
|
|
106
|
+
}), servicesWithOutIcons.map(service => {
|
|
107
|
+
const isActive = this.serviceIsActive(service);
|
|
108
|
+
return /*#__PURE__*/React.createElement(Services.Link, {
|
|
109
|
+
active: isActive,
|
|
110
|
+
className: isActive ? modules_74a7bf8b.activeItemStacked : modules_74a7bf8b.itemStacked,
|
|
111
|
+
key: service.id,
|
|
112
|
+
service: service
|
|
113
|
+
});
|
|
114
|
+
})));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
_defineProperty(Services, "sort", (a, b) => {
|
|
120
|
+
const aApplicationName = a.applicationName || '';
|
|
121
|
+
const bApplicationName = b.applicationName || '';
|
|
122
|
+
return aApplicationName.localeCompare(bApplicationName) || a.name.localeCompare(b.name);
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
_defineProperty(Services, "propTypes", {
|
|
126
|
+
className: PropTypes.string,
|
|
127
|
+
clientId: PropTypes.string,
|
|
128
|
+
initShown: PropTypes.bool,
|
|
129
|
+
loading: PropTypes.bool,
|
|
130
|
+
onClick: PropTypes.func,
|
|
131
|
+
services: PropTypes.arrayOf(ServicesLink.propTypes.service)
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
_defineProperty(Services, "Link", ServicesLink);
|
|
135
|
+
|
|
136
|
+
export { Services as default };
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React, { PureComponent } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import '../auth/auth.js';
|
|
5
|
+
import alertService from '../alert-service/alert-service.js';
|
|
6
|
+
import Profile from './profile.js';
|
|
7
|
+
import Auth, { USER_CHANGED_EVENT, LOGOUT_POSTPONED_EVENT, USER_CHANGE_POSTPONED_EVENT } from '../auth/auth__core.js';
|
|
8
|
+
import '../auth/window-flow.js';
|
|
9
|
+
import '../auth/response-parser.js';
|
|
10
|
+
import 'es6-error';
|
|
11
|
+
import '../global/url.js';
|
|
12
|
+
import '../auth/down-notification.js';
|
|
13
|
+
import '../alert/alert.js';
|
|
14
|
+
import 'classnames';
|
|
15
|
+
import '@jetbrains/icons/exception';
|
|
16
|
+
import '@jetbrains/icons/checkmark';
|
|
17
|
+
import '@jetbrains/icons/warning';
|
|
18
|
+
import '@jetbrains/icons/close';
|
|
19
|
+
import '../icon/icon.js';
|
|
20
|
+
import 'util-deprecate';
|
|
21
|
+
import '../icon/icon__constants.js';
|
|
22
|
+
import '../_helpers/icon.js';
|
|
23
|
+
import '../icon/icon__svg.js';
|
|
24
|
+
import '../global/memoize.js';
|
|
25
|
+
import '../loader-inline/loader-inline.js';
|
|
26
|
+
import '../global/theme.js';
|
|
27
|
+
import '../global/data-tests.js';
|
|
28
|
+
import '../_helpers/inject-styles.js';
|
|
29
|
+
import '../global/conic-gradient.js';
|
|
30
|
+
import 'conic-gradient';
|
|
31
|
+
import '../global/supports-css.js';
|
|
32
|
+
import '../global/inject-styles.js';
|
|
33
|
+
import '../global/radial-gradient-mask.js';
|
|
34
|
+
import '../global/get-uid.js';
|
|
35
|
+
import '../global/dom.js';
|
|
36
|
+
import '../alert/container.js';
|
|
37
|
+
import 'react-dom';
|
|
38
|
+
import '../link/link.js';
|
|
39
|
+
import 'focus-visible';
|
|
40
|
+
import '../link/clickableLink.js';
|
|
41
|
+
import '../_helpers/link.js';
|
|
42
|
+
import '../group/group.js';
|
|
43
|
+
import '../_helpers/group.js';
|
|
44
|
+
import '../global/listeners.js';
|
|
45
|
+
import '../http/http.js';
|
|
46
|
+
import '../global/promise-with-timeout.js';
|
|
47
|
+
import '../auth/storage.js';
|
|
48
|
+
import '../storage/storage.js';
|
|
49
|
+
import '../storage/storage__local.js';
|
|
50
|
+
import '../storage/storage__fallback.js';
|
|
51
|
+
import 'deep-equal';
|
|
52
|
+
import '../auth/request-builder.js';
|
|
53
|
+
import 'simply-uuid';
|
|
54
|
+
import '../auth/background-flow.js';
|
|
55
|
+
import '../auth/token-validator.js';
|
|
56
|
+
import '../avatar/avatar.js';
|
|
57
|
+
import '../avatar/fallback-avatar.js';
|
|
58
|
+
import '../button/button.js';
|
|
59
|
+
import '@jetbrains/icons/chevron-10px';
|
|
60
|
+
import '../_helpers/button__classes.js';
|
|
61
|
+
import '../dropdown-menu/dropdown-menu.js';
|
|
62
|
+
import '../list/list.js';
|
|
63
|
+
import 'react-virtualized/dist/es/List';
|
|
64
|
+
import 'react-virtualized/dist/es/AutoSizer';
|
|
65
|
+
import 'react-virtualized/dist/es/WindowScroller';
|
|
66
|
+
import 'react-virtualized/dist/es/CellMeasurer';
|
|
67
|
+
import 'memoize-one';
|
|
68
|
+
import '../global/schedule-raf.js';
|
|
69
|
+
import '../shortcuts/shortcuts.js';
|
|
70
|
+
import '../shortcuts/core.js';
|
|
71
|
+
import 'combokeys';
|
|
72
|
+
import '../global/sniffer.js';
|
|
73
|
+
import 'sniffr';
|
|
74
|
+
import '../global/create-stateful-context.js';
|
|
75
|
+
import '../list/list__link.js';
|
|
76
|
+
import '../_helpers/list.js';
|
|
77
|
+
import '../list/list__item.js';
|
|
78
|
+
import '../checkbox/checkbox.js';
|
|
79
|
+
import '@jetbrains/icons/remove-10px';
|
|
80
|
+
import '../_helpers/checkbox.js';
|
|
81
|
+
import '../list/list__custom.js';
|
|
82
|
+
import '../global/get-event-key.js';
|
|
83
|
+
import '../list/list__title.js';
|
|
84
|
+
import '../list/list__separator.js';
|
|
85
|
+
import '../list/list__hint.js';
|
|
86
|
+
import '../list/consts.js';
|
|
87
|
+
import '../dropdown/dropdown.js';
|
|
88
|
+
import '../_helpers/anchor.js';
|
|
89
|
+
import '../popup-menu/popup-menu.js';
|
|
90
|
+
import '../popup/popup.js';
|
|
91
|
+
import '../tab-trap/tab-trap.js';
|
|
92
|
+
import '../popup/position.js';
|
|
93
|
+
import '../popup/popup.consts.js';
|
|
94
|
+
import '../popup/popup.target.js';
|
|
95
|
+
import '../_helpers/header.js';
|
|
96
|
+
|
|
97
|
+
const CERTIFICATE_MISMATCH_HEADER = 'x-client-certificate-token-mismatch';
|
|
98
|
+
class SmartProfile extends PureComponent {
|
|
99
|
+
constructor() {
|
|
100
|
+
super(...arguments);
|
|
101
|
+
|
|
102
|
+
_defineProperty(this, "state", {
|
|
103
|
+
user: null,
|
|
104
|
+
size: Profile.defaultProps.size,
|
|
105
|
+
isLogoutPostponed: false,
|
|
106
|
+
isUserChangePostponed: false
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
_defineProperty(this, "login", async () => {
|
|
110
|
+
this.setState({
|
|
111
|
+
loading: true
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
try {
|
|
115
|
+
await this.props.auth.login();
|
|
116
|
+
} catch (err) {// do nothing
|
|
117
|
+
} finally {
|
|
118
|
+
this.setState({
|
|
119
|
+
loading: false
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
_defineProperty(this, "logout", () => this.props.auth.logout());
|
|
125
|
+
|
|
126
|
+
_defineProperty(this, "switchUser", () => this.props.auth.switchUser());
|
|
127
|
+
|
|
128
|
+
_defineProperty(this, "onRevertPostponement", () => {
|
|
129
|
+
if (this.state.isLogoutPostponed) {
|
|
130
|
+
this.props.auth.login();
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (this.state.isUserChangePostponed) {
|
|
134
|
+
this.props.auth.updateUser();
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
componentDidMount() {
|
|
140
|
+
this.requestUser();
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
async requestUser() {
|
|
144
|
+
try {
|
|
145
|
+
const {
|
|
146
|
+
auth
|
|
147
|
+
} = this.props;
|
|
148
|
+
const user = await auth.requestUser();
|
|
149
|
+
this.checkUserCertificateMismatch(user);
|
|
150
|
+
this.setState({
|
|
151
|
+
user
|
|
152
|
+
});
|
|
153
|
+
auth.addListener(USER_CHANGED_EVENT, newUser => {
|
|
154
|
+
this.setState({
|
|
155
|
+
user: newUser,
|
|
156
|
+
isLogoutPostponed: false,
|
|
157
|
+
isUserChangePostponed: false
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
auth.addListener(LOGOUT_POSTPONED_EVENT, () => {
|
|
161
|
+
this.setState({
|
|
162
|
+
isLogoutPostponed: true
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
auth.addListener(USER_CHANGE_POSTPONED_EVENT, () => {
|
|
166
|
+
this.setState({
|
|
167
|
+
isUserChangePostponed: true
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
} catch (e) {// noop
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
checkUserCertificateMismatch(user) {
|
|
175
|
+
var _userMeta$headers;
|
|
176
|
+
|
|
177
|
+
const {
|
|
178
|
+
auth,
|
|
179
|
+
translations
|
|
180
|
+
} = this.props;
|
|
181
|
+
const userMeta = auth.http.getMetaForResponse(user);
|
|
182
|
+
|
|
183
|
+
if (userMeta !== null && userMeta !== void 0 && (_userMeta$headers = userMeta.headers) !== null && _userMeta$headers !== void 0 && _userMeta$headers.has(CERTIFICATE_MISMATCH_HEADER)) {
|
|
184
|
+
const message = (translations === null || translations === void 0 ? void 0 : translations.certificateMismatch) || `You are authenticated as ${user.login || user.name}. To authenticate with the client certificate for your account, log out, then click the "Log in with certificate" option on the login page.`;
|
|
185
|
+
alertService.warning(message, 0);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
render() {
|
|
190
|
+
const {
|
|
191
|
+
user,
|
|
192
|
+
loading,
|
|
193
|
+
isLogoutPostponed,
|
|
194
|
+
isUserChangePostponed
|
|
195
|
+
} = this.state;
|
|
196
|
+
const {
|
|
197
|
+
auth,
|
|
198
|
+
profileUrl,
|
|
199
|
+
...props
|
|
200
|
+
} = this.props;
|
|
201
|
+
const url = profileUrl || (user ? `${auth.config.serverUri}users/${user.id}` : '');
|
|
202
|
+
return /*#__PURE__*/React.createElement(Profile, _extends({
|
|
203
|
+
onLogin: this.login,
|
|
204
|
+
onLogout: this.logout,
|
|
205
|
+
onSwitchUser: this.switchUser,
|
|
206
|
+
loading: loading,
|
|
207
|
+
user: user,
|
|
208
|
+
profileUrl: url,
|
|
209
|
+
showApplyChangedUser: isUserChangePostponed,
|
|
210
|
+
showLogIn: isLogoutPostponed,
|
|
211
|
+
showLogOut: !isLogoutPostponed,
|
|
212
|
+
showSwitchUser: auth._canShowDialogs() && !isLogoutPostponed && !isUserChangePostponed,
|
|
213
|
+
onRevertPostponement: this.onRevertPostponement
|
|
214
|
+
}, props));
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
_defineProperty(SmartProfile, "propTypes", {
|
|
220
|
+
auth: PropTypes.instanceOf(Auth).isRequired,
|
|
221
|
+
className: PropTypes.string,
|
|
222
|
+
translations: PropTypes.object,
|
|
223
|
+
profileUrl: PropTypes.string,
|
|
224
|
+
size: Profile.propTypes.size,
|
|
225
|
+
round: Profile.propTypes.round
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
_defineProperty(SmartProfile, "Size", Profile.Size);
|
|
229
|
+
|
|
230
|
+
export { SmartProfile as default };
|