@jetbrains/ring-ui-built 7.0.0-beta.1 → 7.0.0-beta.11
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/_helpers/_rollupPluginBabelHelpers.js +1 -504
- package/components/_helpers/anchor.js +7 -10
- package/components/_helpers/button__classes.js +23 -20
- package/components/_helpers/caption.js +11 -21
- package/components/_helpers/card.js +91 -123
- package/components/_helpers/dialog__body-scroll-preventer.js +10 -17
- package/components/_helpers/header.js +1 -1
- package/components/_helpers/icon__svg.js +27 -29
- package/components/_helpers/input.js +151 -193
- package/components/_helpers/query-assist__suggestions.js +79 -94
- package/components/_helpers/select__filter.js +56 -75
- package/components/_helpers/services-link.js +23 -39
- package/components/_helpers/sidebar.js +91 -102
- package/components/_helpers/tab-link.js +8 -12
- package/components/_helpers/theme.js +61 -51
- package/components/_helpers/title.js +59 -84
- package/components/alert/alert.d.ts +7 -24
- package/components/alert/alert.js +111 -179
- package/components/alert/container.d.ts +0 -5
- package/components/alert/container.js +32 -44
- package/components/alert-service/alert-service.js +104 -162
- package/components/analytics/analytics.js +12 -20
- package/components/analytics/analytics__custom-plugin.js +52 -68
- package/components/auth/auth.js +2 -31
- package/components/auth/auth__core.d.ts +4 -4
- package/components/auth/auth__core.js +755 -1433
- package/components/auth/background-flow.js +84 -121
- package/components/auth/down-notification.js +32 -79
- package/components/auth/iframe-flow.js +71 -125
- package/components/auth/request-builder.js +46 -77
- package/components/auth/response-parser.js +84 -112
- package/components/auth/storage.js +162 -324
- package/components/auth/token-validator.js +132 -227
- package/components/auth/window-flow.js +84 -121
- package/components/auth-dialog/auth-dialog.d.ts +0 -18
- package/components/auth-dialog/auth-dialog.js +107 -176
- package/components/auth-dialog-service/auth-dialog-service.js +12 -33
- package/components/avatar/avatar-example-datauri.js +1 -1
- package/components/avatar/avatar.d.ts +0 -13
- package/components/avatar/avatar.js +94 -136
- package/components/avatar/fallback-avatar.d.ts +1 -10
- package/components/avatar/fallback-avatar.js +20 -40
- package/components/badge/badge.d.ts +0 -10
- package/components/badge/badge.js +32 -48
- package/components/breadcrumbs/breadcrumbs.js +13 -17
- package/components/button/button.d.ts +0 -21
- package/components/button/button.js +68 -104
- package/components/button/button__classes.d.ts +1 -1
- package/components/button-group/button-group.d.ts +0 -5
- package/components/button-group/button-group.js +27 -41
- package/components/button-group/caption.d.ts +0 -4
- package/components/button-group/caption.js +0 -1
- package/components/button-set/button-set.d.ts +0 -6
- package/components/button-set/button-set.js +19 -33
- package/components/button-toolbar/button-toolbar.d.ts +0 -6
- package/components/button-toolbar/button-toolbar.js +17 -31
- package/components/caret/caret.js +184 -211
- package/components/checkbox/checkbox.d.ts +0 -19
- package/components/checkbox/checkbox.js +69 -104
- package/components/clipboard/clipboard-fallback.js +7 -7
- package/components/clipboard/clipboard.js +36 -129
- package/components/code/code.d.ts +0 -12
- package/components/code/code.js +83 -163
- package/components/collapse/collapse-content.js +42 -60
- package/components/collapse/collapse-context.js +2 -2
- package/components/collapse/collapse-control.js +12 -12
- package/components/collapse/collapse.js +12 -17
- package/components/collapse/consts.js +4 -4
- package/components/collapse/utils.js +1 -3
- package/components/confirm/confirm.d.ts +0 -14
- package/components/confirm/confirm.js +68 -112
- package/components/confirm-service/confirm-service.js +25 -47
- package/components/content-layout/content-layout.d.ts +0 -7
- package/components/content-layout/content-layout.js +41 -63
- package/components/content-layout/sidebar.d.ts +0 -9
- package/components/content-layout/sidebar.js +1 -2
- package/components/contenteditable/contenteditable.d.ts +1 -22
- package/components/contenteditable/contenteditable.js +37 -60
- package/components/control-help/control-help.js +5 -3
- package/components/control-label/control-label.js +9 -14
- package/components/data-list/data-list.d.ts +0 -2
- package/components/data-list/data-list.js +115 -179
- package/components/data-list/data-list.mock.js +3 -6
- package/components/data-list/item.js +119 -165
- package/components/data-list/selection.js +77 -135
- package/components/data-list/title.d.ts +2 -2
- package/components/data-list/title.js +2 -12
- package/components/date-picker/consts.d.ts +0 -2
- package/components/date-picker/consts.js +16 -24
- package/components/date-picker/date-input.d.ts +0 -20
- package/components/date-picker/date-input.js +100 -148
- package/components/date-picker/date-picker.d.ts +0 -29
- package/components/date-picker/date-picker.js +143 -224
- package/components/date-picker/date-popup.d.ts +0 -22
- package/components/date-picker/date-popup.js +282 -352
- package/components/date-picker/day.d.ts +0 -14
- package/components/date-picker/day.js +72 -109
- package/components/date-picker/month-names.d.ts +1 -11
- package/components/date-picker/month-names.js +42 -72
- package/components/date-picker/month-slider.d.ts +0 -9
- package/components/date-picker/month-slider.js +43 -71
- package/components/date-picker/month.d.ts +1 -9
- package/components/date-picker/month.js +18 -30
- package/components/date-picker/months.d.ts +1 -9
- package/components/date-picker/months.js +45 -55
- package/components/date-picker/weekdays.d.ts +2 -8
- package/components/date-picker/weekdays.js +12 -25
- package/components/date-picker/years.d.ts +0 -6
- package/components/date-picker/years.js +77 -104
- package/components/dialog/dialog.d.ts +0 -20
- package/components/dialog/dialog.js +153 -211
- package/components/dialog/dialog__body-scroll-preventer.js +0 -3
- package/components/dropdown/anchor.d.ts +1 -8
- package/components/dropdown/anchor.js +0 -7
- package/components/dropdown/dropdown.d.ts +4 -22
- package/components/dropdown/dropdown.js +134 -176
- package/components/dropdown-menu/dropdown-menu.js +51 -103
- package/components/editable-heading/editable-heading.js +69 -118
- package/components/error-bubble/error-bubble.d.ts +0 -6
- package/components/error-bubble/error-bubble.js +30 -60
- package/components/error-message/error-message.d.ts +0 -10
- package/components/error-message/error-message.js +34 -59
- package/components/footer/footer.js +28 -44
- package/components/form/form.js +1 -1
- package/components/global/compose.js +1 -8
- package/components/global/composeRefs.d.ts +0 -3
- package/components/global/composeRefs.js +8 -15
- package/components/global/controls-height.js +2 -2
- package/components/global/create-stateful-context.d.ts +0 -4
- package/components/global/create-stateful-context.js +14 -17
- package/components/global/data-tests.js +7 -12
- package/components/global/dom.js +49 -82
- package/components/global/focus-sensor-hoc.js +95 -122
- package/components/global/fuzzy-highlight.js +23 -34
- package/components/global/get-event-key.js +8 -8
- package/components/global/get-uid.js +3 -7
- package/components/global/inject-styles.js +7 -14
- package/components/global/listeners.js +28 -47
- package/components/global/memoize.js +6 -10
- package/components/global/normalize-indent.js +19 -46
- package/components/global/promise-with-timeout.js +6 -8
- package/components/global/react-dom-renderer.d.ts +0 -5
- package/components/global/react-dom-renderer.js +29 -45
- package/components/global/rerender-hoc.d.ts +2 -2
- package/components/global/rerender-hoc.js +16 -32
- package/components/global/schedule-raf.js +4 -4
- package/components/global/sniffer.js +1 -1
- package/components/global/theme.d.ts +8 -2
- package/components/global/theme.js +2 -20
- package/components/global/trivial-template-tag.js +4 -9
- package/components/global/typescript-utils.js +2 -6
- package/components/global/url.js +20 -23
- package/components/global/use-event-callback.js +7 -4
- package/components/grid/col.d.ts +0 -14
- package/components/grid/col.js +27 -53
- package/components/grid/grid.d.ts +0 -5
- package/components/grid/grid.js +20 -32
- package/components/grid/row.d.ts +0 -18
- package/components/grid/row.js +23 -47
- package/components/group/group.d.ts +0 -5
- package/components/group/group.js +18 -27
- package/components/header/header-icon.d.ts +0 -22
- package/components/header/header-icon.js +20 -37
- package/components/header/header.d.ts +0 -7
- package/components/header/header.js +30 -74
- package/components/header/links.d.ts +2 -0
- package/components/header/links.js +20 -0
- package/components/header/logo.d.ts +0 -4
- package/components/header/logo.js +15 -30
- package/components/header/profile.d.ts +1 -39
- package/components/header/profile.js +126 -191
- package/components/header/services-link.d.ts +0 -10
- package/components/header/services-link.js +1 -4
- package/components/header/services.d.ts +0 -14
- package/components/header/services.js +65 -110
- package/components/header/smart-profile.d.ts +0 -9
- package/components/header/smart-profile.js +116 -205
- package/components/header/smart-services.d.ts +0 -4
- package/components/header/smart-services.js +72 -141
- package/components/header/tray.d.ts +0 -5
- package/components/header/tray.js +21 -35
- package/components/heading/heading.js +21 -26
- package/components/http/http.js +162 -319
- package/components/http/http.mock.js +50 -98
- package/components/hub-source/hub-source.js +77 -182
- package/components/hub-source/hub-source__user.js +9 -37
- package/components/hub-source/hub-source__users-groups.js +34 -60
- package/components/i18n/i18n-context.js +7 -8
- package/components/i18n/i18n.js +3 -6
- package/components/icon/icon.d.ts +0 -11
- package/components/icon/icon.js +60 -85
- package/components/icon/icon__svg.d.ts +0 -8
- package/components/icon/icon__svg.js +0 -6
- package/components/icon/index.js +0 -6
- package/components/input/input-legacy.js +1 -1
- package/components/input/input.js +2 -14
- package/components/input-size/input-size.js +1 -1
- package/components/island/adaptive-island-hoc.d.ts +0 -1
- package/components/island/adaptive-island-hoc.js +30 -39
- package/components/island/content.d.ts +0 -10
- package/components/island/content.js +99 -119
- package/components/island/header.js +55 -73
- package/components/island/island.d.ts +0 -9
- package/components/island/island.js +25 -41
- package/components/island-legacy/content-legacy.d.ts +0 -5
- package/components/island-legacy/content-legacy.js +16 -27
- package/components/island-legacy/header-legacy.d.ts +0 -5
- package/components/island-legacy/header-legacy.js +19 -30
- package/components/island-legacy/island-legacy.d.ts +0 -5
- package/components/island-legacy/island-legacy.js +16 -27
- package/components/link/clickableLink.d.ts +0 -9
- package/components/link/clickableLink.js +33 -51
- package/components/link/link.d.ts +0 -25
- package/components/link/link.js +47 -68
- package/components/list/consts.js +2 -2
- package/components/list/list.d.ts +0 -32
- package/components/list/list.js +399 -516
- package/components/list/list__custom.js +51 -78
- package/components/list/list__hint.d.ts +0 -4
- package/components/list/list__hint.js +8 -21
- package/components/list/list__item.js +147 -211
- package/components/list/list__link.js +39 -59
- package/components/list/list__separator.js +15 -30
- package/components/list/list__title.js +25 -41
- package/components/list/list__users-groups-source.js +55 -123
- package/components/loader/loader.d.ts +0 -10
- package/components/loader/loader.js +38 -70
- package/components/loader/loader__core.js +123 -184
- package/components/loader-inline/loader-inline.d.ts +0 -6
- package/components/loader-inline/loader-inline.js +24 -38
- package/components/loader-screen/loader-screen.d.ts +0 -6
- package/components/loader-screen/loader-screen.js +24 -46
- package/components/login-dialog/login-dialog.d.ts +0 -11
- package/components/login-dialog/login-dialog.js +94 -145
- package/components/login-dialog/service.js +11 -33
- package/components/markdown/markdown.js +16 -29
- package/components/message/message.js +171 -218
- package/components/old-browsers-message/old-browsers-message.js +11 -14
- package/components/old-browsers-message/old-browsers-message__stop.js +1 -4
- package/components/old-browsers-message/white-list.js +8 -13
- package/components/pager/pager.js +211 -275
- package/components/panel/panel.d.ts +0 -5
- package/components/panel/panel.js +16 -27
- package/components/permissions/permissions.js +118 -161
- package/components/permissions/permissions__cache.js +191 -218
- package/components/popup/popup.consts.js +1 -1
- package/components/popup/popup.js +237 -329
- package/components/popup/popup.target.js +9 -12
- package/components/popup/position.js +94 -101
- package/components/popup-menu/popup-menu.js +31 -76
- package/components/progress-bar/progress-bar.d.ts +19 -33
- package/components/progress-bar/progress-bar.js +55 -99
- package/components/query-assist/query-assist.d.ts +63 -93
- package/components/query-assist/query-assist.js +585 -748
- package/components/query-assist/query-assist__suggestions.js +2 -28
- package/components/radio/radio.d.ts +0 -8
- package/components/radio/radio.js +15 -35
- package/components/radio/radio__item.d.ts +0 -9
- package/components/radio/radio__item.js +52 -72
- package/components/scrollable-section/scrollable-section.js +53 -0
- package/components/select/select.d.ts +3 -0
- package/components/select/select.js +714 -863
- package/components/select/select__filter.js +2 -29
- package/components/select/select__popup.js +317 -465
- package/components/shortcuts/core.js +147 -195
- package/components/shortcuts/shortcut-title.js +6 -10
- package/components/shortcuts/shortcuts-hoc.d.ts +0 -5
- package/components/shortcuts/shortcuts-hoc.js +23 -46
- package/components/shortcuts/shortcuts.d.ts +0 -8
- package/components/shortcuts/shortcuts.js +41 -72
- package/components/slider/slider.js +93 -113
- package/components/slider/slider.utils.js +16 -23
- package/components/storage/storage.d.ts +2 -3
- package/components/storage/storage.js +2 -46
- package/components/storage/storage__local.js +89 -148
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +35 -61
- package/components/table/cell.d.ts +0 -6
- package/components/table/cell.js +11 -27
- package/components/table/disable-hover-hoc.d.ts +0 -1
- package/components/table/disable-hover-hoc.js +27 -42
- package/components/table/header-cell.d.ts +0 -10
- package/components/table/header-cell.js +59 -85
- package/components/table/header.d.ts +1 -23
- package/components/table/header.js +89 -126
- package/components/table/multitable.d.ts +0 -4
- package/components/table/multitable.js +83 -93
- package/components/table/row-with-focus-sensor.d.ts +2 -2
- package/components/table/row-with-focus-sensor.js +26 -60
- package/components/table/row.js +170 -235
- package/components/table/selection-adapter.js +2 -2
- package/components/table/selection-shortcuts-hoc.js +102 -126
- package/components/table/selection.js +150 -217
- package/components/table/simple-table.d.ts +0 -44
- package/components/table/simple-table.js +18 -59
- package/components/table/smart-table.d.ts +0 -48
- package/components/table/smart-table.js +41 -83
- package/components/table/table.d.ts +0 -2
- package/components/table/table.js +269 -377
- package/components/tabs/collapsible-more.d.ts +1 -9
- package/components/tabs/collapsible-more.js +47 -97
- package/components/tabs/collapsible-tab.js +32 -44
- package/components/tabs/collapsible-tabs.d.ts +2 -29
- package/components/tabs/collapsible-tabs.js +89 -161
- package/components/tabs/custom-item.d.ts +1 -7
- package/components/tabs/custom-item.js +4 -7
- package/components/tabs/dumb-tabs.d.ts +0 -11
- package/components/tabs/dumb-tabs.js +60 -104
- package/components/tabs/smart-tabs.d.ts +0 -6
- package/components/tabs/smart-tabs.js +29 -68
- package/components/tabs/tab-link.d.ts +0 -8
- package/components/tabs/tab-link.js +1 -4
- package/components/tabs/tab.d.ts +0 -8
- package/components/tabs/tab.js +14 -32
- package/components/tabs/tabs.js +1 -28
- package/components/tag/tag.d.ts +0 -19
- package/components/tag/tag.js +120 -179
- package/components/tags-input/tags-input.d.ts +7 -33
- package/components/tags-input/tags-input.js +224 -339
- package/components/tags-list/tags-list.d.ts +0 -13
- package/components/tags-list/tags-list.js +45 -74
- package/components/text/text.d.ts +0 -7
- package/components/text/text.js +27 -43
- package/components/toggle/toggle.d.ts +0 -15
- package/components/toggle/toggle.js +52 -77
- package/components/tooltip/tooltip.d.ts +4 -10
- package/components/tooltip/tooltip.js +105 -137
- package/components/user-agreement/service.d.ts +2 -1
- package/components/user-agreement/service.js +260 -405
- package/components/user-agreement/user-agreement.d.ts +0 -18
- package/components/user-agreement/user-agreement.js +92 -138
- package/components/user-card/card.d.ts +0 -35
- package/components/user-card/card.js +2 -27
- package/components/user-card/smart-user-card-tooltip.d.ts +0 -5
- package/components/user-card/smart-user-card-tooltip.js +52 -108
- package/components/user-card/tooltip.d.ts +0 -9
- package/components/user-card/tooltip.js +35 -74
- package/components/user-card/user-card.js +1 -26
- package/package.json +4 -6
- package/components/global/prop-types.d.ts +0 -4
- package/components/global/prop-types.js +0 -9
- package/components/global/react-render-adapter.d.ts +0 -1
- package/components/global/react-render-adapter.js +0 -6
- package/components/header/scrollable-section.js +0 -47
- package/components/header/tray-icon.d.ts +0 -1
- package/components/header/tray-icon.js +0 -26
- package/components/storage/storage__fallback.d.ts +0 -79
- package/components/storage/storage__fallback.js +0 -253
- /package/components/{header → scrollable-section}/scrollable-section.d.ts +0 -0
@@ -1,22 +1,17 @@
|
|
1
|
-
import { _ as _defineProperty, a as
|
2
|
-
import 'core-js/modules/es.array.concat.js';
|
3
|
-
import 'core-js/modules/es.array.filter.js';
|
4
|
-
import 'core-js/modules/es.array.map.js';
|
1
|
+
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
5
2
|
import 'core-js/modules/es.array.sort.js';
|
6
|
-
import 'core-js/modules/
|
3
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
7
4
|
import { PureComponent } from 'react';
|
8
|
-
import PropTypes from 'prop-types';
|
9
5
|
import servicesIcon from '@jetbrains/icons/services-20px';
|
10
6
|
import classNames from 'classnames';
|
11
7
|
import Dropdown from '../dropdown/dropdown.js';
|
12
8
|
import Popup from '../popup/popup.js';
|
13
9
|
import { T as Theme, m as modules_59717246 } from '../_helpers/theme.js';
|
14
10
|
import HeaderIcon from './header-icon.js';
|
15
|
-
import {
|
11
|
+
import { m as modules_74a7bf8b, S as ServicesLink } from '../_helpers/services-link.js';
|
16
12
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
17
13
|
import '../global/data-tests.js';
|
18
14
|
import 'core-js/modules/es.array.reduce.js';
|
19
|
-
import 'core-js/modules/es.object.entries.js';
|
20
15
|
import '../global/typescript-utils.js';
|
21
16
|
import '../_helpers/anchor.js';
|
22
17
|
import '@jetbrains/icons/chevron-10px';
|
@@ -26,34 +21,18 @@ import '../icon/icon__constants.js';
|
|
26
21
|
import '../_helpers/icon__svg.js';
|
27
22
|
import 'core-js/modules/es.regexp.exec.js';
|
28
23
|
import 'core-js/modules/es.string.replace.js';
|
29
|
-
import 'core-js/modules/es.string.starts-with.js';
|
30
24
|
import '../global/memoize.js';
|
31
|
-
import 'core-js/modules/es.array.iterator.js';
|
32
|
-
import 'core-js/modules/es.map.js';
|
33
|
-
import 'core-js/modules/es.weak-map.js';
|
34
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
35
25
|
import '../button/button.js';
|
36
26
|
import '@jetbrains/icons/chevron-down';
|
37
27
|
import '../link/clickableLink.js';
|
38
28
|
import '../global/controls-height.js';
|
39
29
|
import '../_helpers/button__classes.js';
|
40
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
41
|
-
import 'core-js/modules/web.dom-collections.for-each.js';
|
42
30
|
import 'react-dom';
|
43
31
|
import '../global/get-uid.js';
|
44
32
|
import '../global/schedule-raf.js';
|
45
33
|
import '../global/dom.js';
|
46
|
-
import 'core-js/modules/es.object.assign.js';
|
47
|
-
import 'core-js/modules/es.set.js';
|
48
|
-
import 'core-js/modules/es.string.split.js';
|
49
34
|
import '../shortcuts/shortcuts.js';
|
50
35
|
import '../shortcuts/core.js';
|
51
|
-
import 'core-js/modules/es.array.find-index.js';
|
52
|
-
import 'core-js/modules/es.array.includes.js';
|
53
|
-
import 'core-js/modules/es.array.slice.js';
|
54
|
-
import 'core-js/modules/es.array.splice.js';
|
55
|
-
import 'core-js/modules/es.string.includes.js';
|
56
|
-
import 'core-js/modules/es.string.match.js';
|
57
36
|
import 'combokeys';
|
58
37
|
import '../global/sniffer.js';
|
59
38
|
import 'sniffr';
|
@@ -65,10 +44,12 @@ import '../_helpers/header.js';
|
|
65
44
|
import '../link/link.js';
|
66
45
|
import '../_helpers/link.js';
|
67
46
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
47
|
+
const _excluded = ["clientId", "loading", "services", "initShown", "theme"];
|
48
|
+
const makeAnchor = loading => {
|
49
|
+
const Anchor = _ref => {
|
50
|
+
let {
|
51
|
+
active
|
52
|
+
} = _ref;
|
72
53
|
return /*#__PURE__*/jsx(HeaderIcon, {
|
73
54
|
loader: loading,
|
74
55
|
active: active,
|
@@ -76,95 +57,69 @@ var makeAnchor = function makeAnchor(loading) {
|
|
76
57
|
"aria-label": "Services"
|
77
58
|
});
|
78
59
|
};
|
79
|
-
Anchor.propTypes = {
|
80
|
-
active: PropTypes.bool
|
81
|
-
};
|
82
60
|
return Anchor;
|
83
61
|
};
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
89
|
-
args[_key] = arguments[_key];
|
90
|
-
}
|
91
|
-
_this = _callSuper(this, Services, [].concat(args));
|
92
|
-
_defineProperty(_this, "serviceIsActive", function (service) {
|
93
|
-
return service.id === _this.props.clientId;
|
94
|
-
});
|
95
|
-
return _this;
|
62
|
+
class Services extends PureComponent {
|
63
|
+
constructor() {
|
64
|
+
super(...arguments);
|
65
|
+
_defineProperty(this, "serviceIsActive", service => service.id === this.props.clientId);
|
96
66
|
}
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
icon: servicesIcon,
|
114
|
-
"aria-label": "Services"
|
115
|
-
}));
|
116
|
-
}
|
117
|
-
var sortedServices = _toConsumableArray(services).sort(Services.sort);
|
118
|
-
var servicesWithIcons = sortedServices.filter(function (service) {
|
119
|
-
return service.iconUrl && service.homeUrl;
|
120
|
-
});
|
121
|
-
var servicesWithOutIcons = sortedServices.filter(function (service) {
|
122
|
-
return !service.iconUrl && service.homeUrl;
|
123
|
-
});
|
124
|
-
var separatorIsRequired = servicesWithIcons.length !== 0 && servicesWithOutIcons.length !== 0;
|
125
|
-
return /*#__PURE__*/jsx(Dropdown, _objectSpread2(_objectSpread2({}, props), {}, {
|
126
|
-
anchor: makeAnchor(loading),
|
127
|
-
initShown: initShown,
|
128
|
-
children: /*#__PURE__*/jsxs(Popup, {
|
129
|
-
className: classNames(modules_74a7bf8b.services, {
|
130
|
-
[modules_59717246.dark]: theme === Theme.DARK
|
131
|
-
}),
|
132
|
-
top: -3,
|
133
|
-
children: [servicesWithIcons.map(function (service) {
|
134
|
-
var isActive = _this2.serviceIsActive(service);
|
135
|
-
return /*#__PURE__*/jsx(Services.Link, {
|
136
|
-
active: isActive,
|
137
|
-
className: isActive ? modules_74a7bf8b.activeItem : modules_74a7bf8b.item,
|
138
|
-
service: service
|
139
|
-
}, service.id);
|
140
|
-
}), separatorIsRequired && /*#__PURE__*/jsx("div", {
|
141
|
-
className: modules_74a7bf8b.line
|
142
|
-
}, "separator"), servicesWithOutIcons.map(function (service) {
|
143
|
-
var isActive = _this2.serviceIsActive(service);
|
144
|
-
return /*#__PURE__*/jsx(Services.Link, {
|
145
|
-
active: isActive,
|
146
|
-
className: isActive ? modules_74a7bf8b.activeItemStacked : modules_74a7bf8b.itemStacked,
|
147
|
-
service: service
|
148
|
-
}, service.id);
|
149
|
-
})]
|
150
|
-
})
|
67
|
+
render() {
|
68
|
+
const _this$props = this.props,
|
69
|
+
{
|
70
|
+
clientId,
|
71
|
+
loading,
|
72
|
+
services,
|
73
|
+
initShown,
|
74
|
+
theme
|
75
|
+
} = _this$props,
|
76
|
+
props = _objectWithoutProperties(_this$props, _excluded);
|
77
|
+
if (!services) {
|
78
|
+
return /*#__PURE__*/jsx(HeaderIcon, _objectSpread2(_objectSpread2({}, props), {}, {
|
79
|
+
loader: loading,
|
80
|
+
active: loading,
|
81
|
+
icon: servicesIcon,
|
82
|
+
"aria-label": "Services"
|
151
83
|
}));
|
152
84
|
}
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
85
|
+
const sortedServices = [...services].sort(Services.sort);
|
86
|
+
const servicesWithIcons = sortedServices.filter(service => service.iconUrl && service.homeUrl);
|
87
|
+
const servicesWithOutIcons = sortedServices.filter(service => !service.iconUrl && service.homeUrl);
|
88
|
+
const separatorIsRequired = servicesWithIcons.length !== 0 && servicesWithOutIcons.length !== 0;
|
89
|
+
return /*#__PURE__*/jsx(Dropdown, _objectSpread2(_objectSpread2({}, props), {}, {
|
90
|
+
anchor: makeAnchor(loading),
|
91
|
+
initShown: initShown,
|
92
|
+
children: /*#__PURE__*/jsxs(Popup, {
|
93
|
+
className: classNames(modules_74a7bf8b.services, {
|
94
|
+
[modules_59717246.dark]: theme === Theme.DARK
|
95
|
+
}),
|
96
|
+
top: -3,
|
97
|
+
children: [servicesWithIcons.map(service => {
|
98
|
+
const isActive = this.serviceIsActive(service);
|
99
|
+
return /*#__PURE__*/jsx(Services.Link, {
|
100
|
+
active: isActive,
|
101
|
+
className: isActive ? modules_74a7bf8b.activeItem : modules_74a7bf8b.item,
|
102
|
+
service: service
|
103
|
+
}, service.id);
|
104
|
+
}), separatorIsRequired && /*#__PURE__*/jsx("div", {
|
105
|
+
className: modules_74a7bf8b.line
|
106
|
+
}, "separator"), servicesWithOutIcons.map(service => {
|
107
|
+
const isActive = this.serviceIsActive(service);
|
108
|
+
return /*#__PURE__*/jsx(Services.Link, {
|
109
|
+
active: isActive,
|
110
|
+
className: isActive ? modules_74a7bf8b.activeItemStacked : modules_74a7bf8b.itemStacked,
|
111
|
+
service: service
|
112
|
+
}, service.id);
|
113
|
+
})]
|
114
|
+
})
|
115
|
+
}));
|
116
|
+
}
|
117
|
+
}
|
118
|
+
_defineProperty(Services, "sort", (a, b) => {
|
119
|
+
const aApplicationName = a.applicationName || '';
|
120
|
+
const bApplicationName = b.applicationName || '';
|
158
121
|
return aApplicationName.localeCompare(bApplicationName) || a.name.localeCompare(b.name);
|
159
122
|
});
|
160
|
-
_defineProperty(Services, "propTypes", {
|
161
|
-
className: PropTypes.string,
|
162
|
-
clientId: PropTypes.string,
|
163
|
-
initShown: PropTypes.bool,
|
164
|
-
loading: PropTypes.bool,
|
165
|
-
onClick: PropTypes.func,
|
166
|
-
services: PropTypes.arrayOf(ServicesLink.propTypes.service)
|
167
|
-
});
|
168
123
|
_defineProperty(Services, "defaultProps", {
|
169
124
|
theme: Theme.DARK
|
170
125
|
});
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { PureComponent } from 'react';
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
import Auth, { AuthUser } from '../auth/auth';
|
4
3
|
import { Size } from '../avatar/avatar';
|
5
4
|
import { ProfileAttrs } from './profile';
|
@@ -14,14 +13,6 @@ interface SmartProfileState {
|
|
14
13
|
loading?: boolean;
|
15
14
|
}
|
16
15
|
export default class SmartProfile extends PureComponent<SmartProfileProps, SmartProfileState> {
|
17
|
-
static propTypes: {
|
18
|
-
auth: PropTypes.Validator<Auth>;
|
19
|
-
className: PropTypes.Requireable<string>;
|
20
|
-
translations: PropTypes.Requireable<object>;
|
21
|
-
profileUrl: PropTypes.Requireable<string>;
|
22
|
-
size: PropTypes.Requireable<number>;
|
23
|
-
round: PropTypes.Requireable<boolean>;
|
24
|
-
};
|
25
16
|
state: SmartProfileState;
|
26
17
|
componentDidMount(): void;
|
27
18
|
static Size: typeof Size;
|
@@ -1,28 +1,19 @@
|
|
1
|
-
import { _ as _defineProperty, a as
|
2
|
-
import 'core-js/modules/
|
1
|
+
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
3
3
|
import { PureComponent } from 'react';
|
4
|
-
import PropTypes from 'prop-types';
|
5
4
|
import '../auth/auth.js';
|
6
5
|
import alertService from '../alert-service/alert-service.js';
|
7
6
|
import Profile from './profile.js';
|
8
7
|
import { jsx } from 'react/jsx-runtime';
|
9
|
-
import
|
8
|
+
import { USER_CHANGED_EVENT, LOGOUT_POSTPONED_EVENT, USER_CHANGE_POSTPONED_EVENT } from '../auth/auth__core.js';
|
10
9
|
import '../auth/window-flow.js';
|
11
|
-
import 'core-js/modules/es.object.to-string.js';
|
12
|
-
import 'core-js/modules/es.promise.js';
|
13
10
|
import '../auth/response-parser.js';
|
14
|
-
import 'core-js/modules/es.array.index-of.js';
|
15
11
|
import 'core-js/modules/es.regexp.exec.js';
|
16
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
17
12
|
import 'core-js/modules/es.string.replace.js';
|
18
|
-
import 'core-js/modules/web.dom-collections.for-each.js';
|
19
13
|
import 'es6-error';
|
20
14
|
import '../global/url.js';
|
21
|
-
import 'core-js/modules/es.string.match.js';
|
22
15
|
import '../auth/down-notification.js';
|
23
|
-
import 'core-js/modules/es.array.filter.js';
|
24
16
|
import '../alert/alert.js';
|
25
|
-
import 'core-js/modules/es.object.values.js';
|
26
17
|
import 'classnames';
|
27
18
|
import '@jetbrains/icons/exception';
|
28
19
|
import '@jetbrains/icons/checkmark';
|
@@ -32,20 +23,11 @@ import '../icon/icon.js';
|
|
32
23
|
import 'util-deprecate';
|
33
24
|
import '../icon/icon__constants.js';
|
34
25
|
import '../_helpers/icon__svg.js';
|
35
|
-
import 'core-js/modules/es.string.starts-with.js';
|
36
26
|
import '../global/memoize.js';
|
37
|
-
import 'core-js/modules/es.array.iterator.js';
|
38
|
-
import 'core-js/modules/es.map.js';
|
39
|
-
import 'core-js/modules/es.weak-map.js';
|
40
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
41
27
|
import '../loader-inline/loader-inline.js';
|
42
28
|
import '../global/data-tests.js';
|
43
29
|
import 'core-js/modules/es.array.reduce.js';
|
44
|
-
import 'core-js/modules/es.object.entries.js';
|
45
30
|
import '../global/dom.js';
|
46
|
-
import 'core-js/modules/es.object.assign.js';
|
47
|
-
import 'core-js/modules/es.set.js';
|
48
|
-
import 'core-js/modules/es.string.split.js';
|
49
31
|
import '../button/button.js';
|
50
32
|
import '@jetbrains/icons/chevron-down';
|
51
33
|
import '../link/clickableLink.js';
|
@@ -58,13 +40,7 @@ import '../popup/popup.js';
|
|
58
40
|
import '../global/get-uid.js';
|
59
41
|
import '../global/schedule-raf.js';
|
60
42
|
import '../shortcuts/shortcuts.js';
|
61
|
-
import 'core-js/modules/es.array.map.js';
|
62
43
|
import '../shortcuts/core.js';
|
63
|
-
import 'core-js/modules/es.array.find-index.js';
|
64
|
-
import 'core-js/modules/es.array.includes.js';
|
65
|
-
import 'core-js/modules/es.array.slice.js';
|
66
|
-
import 'core-js/modules/es.array.splice.js';
|
67
|
-
import 'core-js/modules/es.string.includes.js';
|
68
44
|
import 'combokeys';
|
69
45
|
import '../global/sniffer.js';
|
70
46
|
import 'sniffr';
|
@@ -77,32 +53,11 @@ import '../link/link.js';
|
|
77
53
|
import '../_helpers/link.js';
|
78
54
|
import '../group/group.js';
|
79
55
|
import 'react-dom/client';
|
80
|
-
import 'core-js/modules/es.string.search.js';
|
81
|
-
import 'core-js/modules/web.url.js';
|
82
|
-
import 'core-js/modules/web.url.to-json.js';
|
83
|
-
import 'core-js/modules/web.url-search-params.js';
|
84
|
-
import '../global/listeners.js';
|
85
|
-
import '../http/http.js';
|
86
|
-
import 'core-js/modules/es.reflect.delete-property.js';
|
87
|
-
import '../global/promise-with-timeout.js';
|
88
|
-
import '../i18n/i18n.js';
|
89
|
-
import '../auth/storage.js';
|
90
|
-
import '../storage/storage.js';
|
91
|
-
import '../storage/storage__local.js';
|
92
|
-
import '../storage/storage__fallback.js';
|
93
|
-
import 'deep-equal';
|
94
|
-
import '../auth/request-builder.js';
|
95
|
-
import 'simply-uuid';
|
96
|
-
import '../auth/background-flow.js';
|
97
|
-
import '../auth/token-validator.js';
|
98
56
|
import '../avatar/avatar.js';
|
99
57
|
import '../avatar/fallback-avatar.js';
|
100
|
-
import 'core-js/modules/es.array.from.js';
|
101
58
|
import '../dropdown-menu/dropdown-menu.js';
|
102
59
|
import '../list/list.js';
|
103
|
-
import 'core-js/modules/es.symbol.js';
|
104
60
|
import 'core-js/modules/es.symbol.description.js';
|
105
|
-
import 'core-js/modules/es.array.find.js';
|
106
61
|
import 'react-virtualized/dist/es/List';
|
107
62
|
import 'react-virtualized/dist/es/AutoSizer';
|
108
63
|
import 'react-virtualized/dist/es/WindowScroller';
|
@@ -115,7 +70,6 @@ import '../list/list__item.js';
|
|
115
70
|
import '../checkbox/checkbox.js';
|
116
71
|
import '@jetbrains/icons/checkmark-12px';
|
117
72
|
import '@jetbrains/icons/remove-12px';
|
118
|
-
import '../global/prop-types.js';
|
119
73
|
import '../global/composeRefs.js';
|
120
74
|
import '../control-help/control-help.js';
|
121
75
|
import '../list/list__custom.js';
|
@@ -130,176 +84,133 @@ import '../_helpers/anchor.js';
|
|
130
84
|
import '@jetbrains/icons/chevron-10px';
|
131
85
|
import '../popup-menu/popup-menu.js';
|
132
86
|
import '../i18n/i18n-context.js';
|
87
|
+
import '../i18n/i18n.js';
|
133
88
|
import '../_helpers/header.js';
|
89
|
+
import 'core-js/modules/web.url.js';
|
90
|
+
import 'core-js/modules/web.url.to-json.js';
|
91
|
+
import 'core-js/modules/web.url-search-params.js';
|
92
|
+
import '../global/listeners.js';
|
93
|
+
import '../http/http.js';
|
94
|
+
import '../global/promise-with-timeout.js';
|
95
|
+
import '../auth/storage.js';
|
96
|
+
import '../storage/storage__local.js';
|
97
|
+
import '../auth/request-builder.js';
|
98
|
+
import 'simply-uuid';
|
99
|
+
import '../auth/background-flow.js';
|
100
|
+
import '../auth/token-validator.js';
|
134
101
|
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
142
|
-
args[_key] = arguments[_key];
|
143
|
-
}
|
144
|
-
_this = _callSuper(this, SmartProfile, [].concat(args));
|
145
|
-
_defineProperty(_this, "state", {
|
102
|
+
const _excluded = ["auth", "profileUrl"];
|
103
|
+
const CERTIFICATE_MISMATCH_HEADER = 'x-client-certificate-token-mismatch';
|
104
|
+
class SmartProfile extends PureComponent {
|
105
|
+
constructor() {
|
106
|
+
super(...arguments);
|
107
|
+
_defineProperty(this, "state", {
|
146
108
|
user: null,
|
147
109
|
size: Profile.defaultProps.size,
|
148
110
|
isLogoutPostponed: false,
|
149
111
|
isUserChangePostponed: false
|
150
112
|
});
|
151
|
-
_defineProperty(
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
_context.prev = 6;
|
166
|
-
_context.t0 = _context["catch"](1);
|
167
|
-
case 8:
|
168
|
-
_context.prev = 8;
|
169
|
-
_this.setState({
|
170
|
-
loading: false
|
171
|
-
});
|
172
|
-
return _context.finish(8);
|
173
|
-
case 11:
|
174
|
-
case "end":
|
175
|
-
return _context.stop();
|
176
|
-
}
|
177
|
-
}, _callee, null, [[1, 6, 8, 11]]);
|
178
|
-
})));
|
179
|
-
_defineProperty(_this, "logout", function () {
|
180
|
-
return _this.props.auth.logout();
|
181
|
-
});
|
182
|
-
_defineProperty(_this, "switchUser", function () {
|
183
|
-
return _this.props.auth.switchUser();
|
113
|
+
_defineProperty(this, "login", async () => {
|
114
|
+
this.setState({
|
115
|
+
loading: true
|
116
|
+
});
|
117
|
+
try {
|
118
|
+
await this.props.auth.login();
|
119
|
+
} catch (err) {
|
120
|
+
// eslint-disable-next-line no-console
|
121
|
+
console.debug('Profile login errored', err);
|
122
|
+
} finally {
|
123
|
+
this.setState({
|
124
|
+
loading: false
|
125
|
+
});
|
126
|
+
}
|
184
127
|
});
|
185
|
-
_defineProperty(
|
186
|
-
|
187
|
-
|
128
|
+
_defineProperty(this, "logout", () => this.props.auth.logout());
|
129
|
+
_defineProperty(this, "switchUser", () => this.props.auth.switchUser());
|
130
|
+
_defineProperty(this, "onRevertPostponement", () => {
|
131
|
+
if (this.state.isLogoutPostponed) {
|
132
|
+
this.props.auth.login();
|
188
133
|
}
|
189
|
-
if (
|
190
|
-
|
134
|
+
if (this.state.isUserChangePostponed) {
|
135
|
+
this.props.auth.updateUser();
|
191
136
|
}
|
192
137
|
});
|
193
|
-
return _this;
|
194
138
|
}
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
auth.addListener(LOGOUT_POSTPONED_EVENT, function () {
|
228
|
-
_this2.setState({
|
229
|
-
isLogoutPostponed: true
|
230
|
-
});
|
231
|
-
});
|
232
|
-
auth.addListener(USER_CHANGE_POSTPONED_EVENT, function () {
|
233
|
-
_this2.setState({
|
234
|
-
isUserChangePostponed: true
|
235
|
-
});
|
236
|
-
});
|
237
|
-
_context2.next = 14;
|
238
|
-
break;
|
239
|
-
case 12:
|
240
|
-
_context2.prev = 12;
|
241
|
-
_context2.t0 = _context2["catch"](0);
|
242
|
-
case 14:
|
243
|
-
case "end":
|
244
|
-
return _context2.stop();
|
245
|
-
}
|
246
|
-
}, _callee2, this, [[0, 12]]);
|
247
|
-
}));
|
248
|
-
function requestUser() {
|
249
|
-
return _requestUser.apply(this, arguments);
|
250
|
-
}
|
251
|
-
return requestUser;
|
252
|
-
}()
|
253
|
-
}, {
|
254
|
-
key: "checkUserCertificateMismatch",
|
255
|
-
value: function checkUserCertificateMismatch(user) {
|
256
|
-
var _userMeta$headers;
|
257
|
-
var _this$props = this.props,
|
258
|
-
auth = _this$props.auth,
|
259
|
-
translations = _this$props.translations;
|
260
|
-
var userMeta = auth.http.getMetaForResponse(user);
|
261
|
-
if (userMeta !== null && userMeta !== void 0 && (_userMeta$headers = userMeta.headers) !== null && _userMeta$headers !== void 0 && _userMeta$headers.has(CERTIFICATE_MISMATCH_HEADER)) {
|
262
|
-
var message = (translations === null || translations === void 0 ? void 0 : translations.certificateMismatch) || "You are authenticated as ".concat(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.");
|
263
|
-
alertService.warning(message, 0);
|
264
|
-
}
|
139
|
+
componentDidMount() {
|
140
|
+
this.requestUser();
|
141
|
+
}
|
142
|
+
async requestUser() {
|
143
|
+
try {
|
144
|
+
const {
|
145
|
+
auth
|
146
|
+
} = this.props;
|
147
|
+
const user = await auth.requestUser();
|
148
|
+
this.checkUserCertificateMismatch(user);
|
149
|
+
this.setState({
|
150
|
+
user
|
151
|
+
});
|
152
|
+
auth.addListener(USER_CHANGED_EVENT, newUser => {
|
153
|
+
this.setState({
|
154
|
+
user: newUser,
|
155
|
+
isLogoutPostponed: false,
|
156
|
+
isUserChangePostponed: false
|
157
|
+
});
|
158
|
+
});
|
159
|
+
auth.addListener(LOGOUT_POSTPONED_EVENT, () => {
|
160
|
+
this.setState({
|
161
|
+
isLogoutPostponed: true
|
162
|
+
});
|
163
|
+
});
|
164
|
+
auth.addListener(USER_CHANGE_POSTPONED_EVENT, () => {
|
165
|
+
this.setState({
|
166
|
+
isUserChangePostponed: true
|
167
|
+
});
|
168
|
+
});
|
169
|
+
} catch (e) {
|
170
|
+
// noop
|
265
171
|
}
|
266
|
-
}
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
props = _objectWithoutProperties(_this$props2, _excluded);
|
278
|
-
var url = profileUrl || (user ? "".concat(auth.config.serverUri, "users/").concat(user.id) : '');
|
279
|
-
return /*#__PURE__*/jsx(Profile, _objectSpread2({
|
280
|
-
onLogin: this.login,
|
281
|
-
onLogout: this.logout,
|
282
|
-
onSwitchUser: this.switchUser,
|
283
|
-
loading: loading,
|
284
|
-
user: user,
|
285
|
-
profileUrl: url,
|
286
|
-
showApplyChangedUser: isUserChangePostponed,
|
287
|
-
showLogIn: isLogoutPostponed,
|
288
|
-
showLogOut: !isLogoutPostponed,
|
289
|
-
showSwitchUser: auth._canShowDialogs() && !isLogoutPostponed && !isUserChangePostponed,
|
290
|
-
onRevertPostponement: this.onRevertPostponement
|
291
|
-
}, props));
|
172
|
+
}
|
173
|
+
checkUserCertificateMismatch(user) {
|
174
|
+
var _userMeta$headers;
|
175
|
+
const {
|
176
|
+
auth,
|
177
|
+
translations
|
178
|
+
} = this.props;
|
179
|
+
const userMeta = auth.http.getMetaForResponse(user);
|
180
|
+
if (userMeta !== null && userMeta !== void 0 && (_userMeta$headers = userMeta.headers) !== null && _userMeta$headers !== void 0 && _userMeta$headers.has(CERTIFICATE_MISMATCH_HEADER)) {
|
181
|
+
const message = (translations === null || translations === void 0 ? void 0 : translations.certificateMismatch) || "You are authenticated as ".concat(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.");
|
182
|
+
alertService.warning(message, 0);
|
292
183
|
}
|
293
|
-
}
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
184
|
+
}
|
185
|
+
render() {
|
186
|
+
const {
|
187
|
+
user,
|
188
|
+
loading,
|
189
|
+
isLogoutPostponed,
|
190
|
+
isUserChangePostponed
|
191
|
+
} = this.state;
|
192
|
+
const _this$props = this.props,
|
193
|
+
{
|
194
|
+
auth,
|
195
|
+
profileUrl
|
196
|
+
} = _this$props,
|
197
|
+
props = _objectWithoutProperties(_this$props, _excluded);
|
198
|
+
const url = profileUrl || (user ? "".concat(auth.config.serverUri, "users/").concat(user.id) : '');
|
199
|
+
return /*#__PURE__*/jsx(Profile, _objectSpread2({
|
200
|
+
onLogin: this.login,
|
201
|
+
onLogout: this.logout,
|
202
|
+
onSwitchUser: this.switchUser,
|
203
|
+
loading: loading,
|
204
|
+
user: user,
|
205
|
+
profileUrl: url,
|
206
|
+
showApplyChangedUser: isUserChangePostponed,
|
207
|
+
showLogIn: isLogoutPostponed,
|
208
|
+
showLogOut: !isLogoutPostponed,
|
209
|
+
showSwitchUser: auth._canShowDialogs() && !isLogoutPostponed && !isUserChangePostponed,
|
210
|
+
onRevertPostponement: this.onRevertPostponement
|
211
|
+
}, props));
|
212
|
+
}
|
213
|
+
}
|
303
214
|
_defineProperty(SmartProfile, "Size", Profile.Size);
|
304
215
|
|
305
216
|
export { SmartProfile as default };
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { Component, HTMLAttributes } from 'react';
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
import Auth from '../auth/auth';
|
4
3
|
import HTTP from '../http/http';
|
5
4
|
import { Service } from './services-link';
|
@@ -7,9 +6,6 @@ export interface SmartServicesProps extends HTMLAttributes<HTMLElement> {
|
|
7
6
|
auth: Auth;
|
8
7
|
}
|
9
8
|
export default class SmartServices extends Component<SmartServicesProps> {
|
10
|
-
static propTypes: {
|
11
|
-
auth: PropTypes.Validator<Auth>;
|
12
|
-
};
|
13
9
|
state: {
|
14
10
|
visible: boolean;
|
15
11
|
loading: boolean;
|