@jetbrains/ring-ui-built 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/_helpers/card.js +4 -3
- package/components/_helpers/{dialog__body-scroll-preventer.js → dialog-body-scroll-preventer.js} +4 -4
- package/components/_helpers/input.js +8 -8
- package/components/_helpers/{select__filter.js → select-filter.js} +1 -1
- package/components/_helpers/services-link.js +3 -3
- package/components/_helpers/theme.js +2 -2
- package/components/alert/alert.d.ts +1 -1
- package/components/alert/alert.js +9 -8
- package/components/alert/container.d.ts +1 -1
- package/components/alert/container.js +2 -2
- package/components/alert-service/alert-service.d.ts +2 -2
- package/components/alert-service/alert-service.js +4 -4
- 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} +18 -22
- package/components/auth/auth.d.ts +2 -2
- package/components/auth/auth.js +8 -8
- package/components/auth/background-flow.d.ts +2 -2
- package/components/auth/background-flow.js +1 -3
- package/components/auth/down-notification.js +6 -6
- package/components/auth/iframe-flow.d.ts +3 -3
- package/components/auth/iframe-flow.js +9 -11
- 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 +9 -11
- package/components/auth/token-validator.d.ts +2 -1
- package/components/auth/token-validator.js +12 -3
- package/components/auth/window-flow.d.ts +3 -3
- package/components/auth/window-flow.js +5 -7
- package/components/auth-dialog/auth-dialog.js +9 -9
- package/components/auth-dialog-service/auth-dialog-service.d.ts +1 -1
- package/components/auth-dialog-service/auth-dialog-service.js +5 -5
- package/components/avatar/avatar-info.d.ts +1 -1
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar/avatar.figma.js +1 -2
- package/components/avatar/avatar.js +16 -17
- package/components/avatar/fallback-avatar.js +17 -18
- package/components/avatar-stack/avatar-stack.d.ts +3 -3
- package/components/avatar-stack/avatar-stack.figma.js +1 -2
- package/components/avatar-stack/avatar-stack.js +12 -12
- package/components/banner/banner.js +4 -4
- package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
- package/components/breadcrumbs/breadcrumbs.figma.js +1 -2
- package/components/button/{button__classes.d.ts → button.classes.d.ts} +1 -1
- package/components/button/button.classes.js +2 -0
- package/components/button/button.d.ts +4 -4
- package/components/button/button.figma.js +1 -2
- package/components/button/button.js +9 -9
- 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.d.ts +1 -1
- package/components/button-toolbar/button-toolbar.d.ts +1 -1
- package/components/caret/caret.js +24 -17
- package/components/checkbox/checkbox-group.figma.js +1 -2
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/checkbox.figma.js +1 -2
- package/components/checkbox/checkbox.js +8 -8
- package/components/clipboard/clipboard.js +8 -8
- package/components/code/code.d.ts +1 -1
- package/components/code/code.js +3 -3
- package/components/collapse/collapse-content.d.ts +3 -3
- package/components/collapse/collapse-control.d.ts +2 -2
- package/components/collapse/collapse.d.ts +3 -3
- package/components/confirm/confirm.d.ts +1 -1
- package/components/confirm/confirm.js +8 -8
- package/components/confirm-service/confirm-service.d.ts +3 -3
- package/components/confirm-service/confirm-service.js +5 -5
- 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.d.ts +1 -1
- package/components/control-label/control-label.d.ts +1 -1
- package/components/data-list/data-list.d.ts +5 -5
- package/components/data-list/data-list.js +8 -8
- package/components/data-list/data-list.mock.d.ts +2 -2
- package/components/data-list/data-list.mock.js +24 -24
- package/components/data-list/item.d.ts +3 -3
- package/components/data-list/item.js +9 -9
- 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/data-list/title.js +3 -3
- 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 +7 -7
- package/components/date-picker/date-picker.d.ts +5 -5
- package/components/date-picker/date-picker.js +27 -22
- package/components/date-picker/date-popup.d.ts +1 -1
- package/components/date-picker/date-popup.js +9 -8
- package/components/date-picker/day.d.ts +2 -2
- package/components/date-picker/day.js +4 -4
- 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} +1 -1
- package/components/dialog/dialog.d.ts +1 -1
- package/components/dialog/dialog.js +15 -15
- package/components/dropdown/anchor.d.ts +1 -1
- package/components/dropdown/anchor.js +4 -4
- package/components/dropdown/dropdown.d.ts +2 -2
- package/components/dropdown/dropdown.js +6 -6
- package/components/dropdown-menu/dropdown-menu.d.ts +5 -5
- package/components/dropdown-menu/dropdown-menu.js +11 -11
- package/components/editable-heading/editable-heading.d.ts +1 -1
- package/components/editable-heading/editable-heading.js +8 -7
- package/components/error-bubble/error-bubble.d.ts +1 -1
- package/components/error-bubble/error-bubble.figma.js +1 -2
- package/components/error-bubble/error-bubble.js +2 -2
- package/components/error-message/error-message.d.ts +2 -2
- package/components/error-message/error-message.js +3 -3
- package/components/footer/footer.d.ts +1 -1
- package/components/footer/footer.js +2 -2
- package/components/global/compose-refs.d.ts +2 -0
- package/components/global/compose-refs.js +19 -0
- package/components/global/composeRefs.d.ts +6 -2
- package/components/global/composeRefs.js +6 -16
- package/components/global/create-stateful-context.d.ts +1 -1
- package/components/global/dom.d.ts +1 -1
- package/components/global/dom.js +2 -3
- 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/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/url.js +3 -3
- package/components/global/use-event-callback.js +1 -1
- package/components/grid/col.d.ts +1 -1
- package/components/grid/col.js +1 -1
- 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.d.ts +1 -1
- package/components/group/group.js +1 -1
- package/components/header/header-icon.d.ts +2 -2
- package/components/header/header-icon.js +4 -4
- package/components/header/header.d.ts +1 -1
- package/components/header/header.js +17 -17
- package/components/header/links.d.ts +1 -1
- package/components/header/logo.d.ts +1 -1
- package/components/header/logo.js +2 -2
- package/components/header/profile.d.ts +5 -5
- package/components/header/profile.js +14 -14
- package/components/header/services-link.d.ts +1 -1
- package/components/header/services-link.js +1 -1
- package/components/header/services.d.ts +2 -2
- package/components/header/services.js +7 -7
- package/components/header/smart-profile.d.ts +3 -3
- package/components/header/smart-profile.js +25 -25
- package/components/header/smart-services.d.ts +3 -3
- package/components/header/smart-services.js +4 -4
- package/components/header/tray.d.ts +1 -1
- 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__svg.js → icon-svg.js} +1 -1
- package/components/icon/icon.d.ts +2 -2
- package/components/icon/icon.js +3 -3
- package/components/icon/index.js +2 -2
- package/components/input/input.d.ts +3 -3
- package/components/input/input.figma.js +1 -2
- package/components/input/input.js +5 -5
- 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.d.ts +1 -1
- package/components/link/clickable-link.d.ts +12 -0
- package/components/link/clickable-link.js +51 -0
- package/components/link/clickableLink.d.ts +11 -12
- package/components/link/clickableLink.js +5 -50
- package/components/link/link.d.ts +2 -2
- package/components/link/link.js +3 -3
- 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} +10 -9
- 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} +3 -3
- 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} +11 -11
- package/components/list/{list__classes.d.ts → list.classes.d.ts} +1 -1
- package/components/list/list.d.ts +7 -7
- package/components/list/list.js +36 -35
- package/components/loader/{loader__core.js → loader-core.js} +3 -2
- package/components/loader/loader.d.ts +2 -2
- package/components/loader/loader.js +1 -1
- package/components/loader-inline/loader-inline.d.ts +1 -1
- package/components/loader-screen/loader-screen.d.ts +1 -1
- package/components/loader-screen/loader-screen.js +1 -1
- package/components/login-dialog/login-dialog.d.ts +1 -1
- package/components/login-dialog/login-dialog.js +9 -9
- package/components/login-dialog/service.d.ts +1 -1
- package/components/login-dialog/service.js +6 -6
- package/components/markdown/markdown.d.ts +1 -1
- package/components/markdown/markdown.js +1 -1
- package/components/message/message.d.ts +4 -4
- package/components/message/message.js +7 -7
- package/components/old-browsers-message/old-browsers-message.js +1 -1
- package/components/pager/pager.d.ts +2 -2
- package/components/pager/pager.js +28 -27
- 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 -4
- package/components/permissions/permissions.d.ts +2 -2
- package/components/permissions/permissions.js +2 -3
- package/components/popup/popup.d.ts +2 -2
- package/components/popup/popup.js +4 -4
- package/components/popup/popup.target.d.ts +1 -1
- package/components/popup/position-css.js +2 -4
- package/components/popup/position.js +10 -9
- package/components/popup-menu/popup-menu.d.ts +4 -4
- package/components/popup-menu/popup-menu.js +10 -10
- 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__suggestions.js → query-assist-suggestions.js} +11 -11
- package/components/query-assist/query-assist.d.ts +4 -4
- package/components/query-assist/query-assist.js +30 -30
- package/components/radio/{radio__item.d.ts → radio-item.d.ts} +1 -1
- package/components/radio/{radio__item.js → radio-item.js} +3 -3
- 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} +12 -12
- package/components/select/{select__popup.d.ts → select-popup.d.ts} +8 -8
- package/components/select/{select__popup.js → select-popup.js} +21 -19
- package/components/select/select.d.ts +6 -6
- package/components/select/select.js +44 -42
- package/components/shortcuts/core.js +4 -4
- package/components/shortcuts/shortcuts-hoc.d.ts +2 -2
- package/components/shortcuts/shortcuts.d.ts +1 -1
- package/components/slider/slider.d.ts +5 -5
- package/components/slider/slider.js +7 -6
- package/components/slider/slider.utils.d.ts +1 -1
- package/components/slider/slider.utils.js +2 -3
- package/components/storage/{storage__local.d.ts → storage-local.d.ts} +1 -1
- package/components/storage/{storage__local.js → storage-local.js} +11 -11
- package/components/storage/storage.d.ts +1 -1
- package/components/storage/storage.js +5 -5
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.d.ts +1 -1
- package/components/tab-trap/tab-trap.js +1 -1
- 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 +3 -3
- package/components/table/header.d.ts +2 -2
- package/components/table/header.js +7 -7
- 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-with-focus-sensor.js +5 -5
- package/components/table/row.d.ts +4 -4
- package/components/table/row.js +5 -5
- 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 -2
- package/components/table/selection.js +5 -6
- package/components/table/simple-table.d.ts +2 -2
- package/components/table/simple-table.js +6 -6
- package/components/table/smart-table.d.ts +2 -2
- package/components/table/smart-table.js +6 -6
- package/components/table/table.d.ts +7 -7
- package/components/table/table.js +11 -11
- package/components/tabs/collapsible-more.d.ts +3 -3
- package/components/tabs/collapsible-more.js +12 -12
- package/components/tabs/collapsible-tab.d.ts +2 -2
- package/components/tabs/collapsible-tab.js +2 -2
- package/components/tabs/collapsible-tabs.d.ts +2 -2
- package/components/tabs/collapsible-tabs.js +18 -18
- package/components/tabs/custom-item.d.ts +2 -2
- package/components/tabs/dumb-tabs.d.ts +3 -3
- package/components/tabs/dumb-tabs.js +14 -14
- package/components/tabs/smart-tabs.d.ts +1 -1
- package/components/tabs/smart-tabs.js +11 -11
- package/components/tabs/tab-link.d.ts +2 -2
- package/components/tabs/tab-link.js +1 -1
- package/components/tabs/tab.d.ts +2 -2
- package/components/tabs/tabs.js +11 -11
- package/components/tag/tag.d.ts +2 -2
- package/components/tag/tag.js +7 -7
- package/components/tags-input/tags-input.d.ts +8 -8
- package/components/tags-input/tags-input.js +26 -20
- package/components/tags-list/tags-list.d.ts +2 -2
- package/components/tags-list/tags-list.js +5 -5
- package/components/text/text.d.ts +1 -1
- package/components/toggle/toggle.d.ts +1 -1
- package/components/toggle/toggle.js +2 -2
- package/components/tooltip/tooltip.d.ts +2 -2
- package/components/tooltip/tooltip.js +1 -1
- package/components/upload/upload.d.ts +3 -3
- package/components/upload/upload.js +7 -7
- package/components/user-agreement/service.d.ts +2 -2
- package/components/user-agreement/service.js +10 -11
- package/components/user-agreement/user-agreement.d.ts +1 -1
- package/components/user-agreement/user-agreement.js +10 -10
- package/components/user-card/card.d.ts +1 -1
- package/components/user-card/card.js +4 -4
- package/components/user-card/smart-user-card-tooltip.d.ts +2 -2
- package/components/user-card/smart-user-card-tooltip.js +4 -4
- package/components/user-card/tooltip.d.ts +3 -3
- package/components/user-card/tooltip.js +4 -4
- package/components/user-card/user-card.js +4 -4
- package/package.json +1 -1
- package/components/button/button__classes.js +0 -2
- /package/components/_helpers/{button__classes.js → button.classes.js} +0 -0
- /package/components/_helpers/{icon__svg.js → icon-svg.js} +0 -0
- /package/components/_helpers/{query-assist__suggestions.js → query-assist-suggestions.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__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
|
@@ -12,7 +12,7 @@ import Icon from '../icon/icon.js';
|
|
|
12
12
|
import { I18nContext } from '../i18n/i18n-context.js';
|
|
13
13
|
import Tooltip from '../tooltip/tooltip.js';
|
|
14
14
|
import { Size } from '../avatar/avatar-size.js';
|
|
15
|
-
import { Size as Size$1 } from '../icon/
|
|
15
|
+
import { Size as Size$1 } from '../icon/icon.constants.js';
|
|
16
16
|
|
|
17
17
|
var styles = {"userCardSpaced":"ring-user-card-userCardSpaced","userInformationContainer":"ring-user-card-userInformationContainer","userAvatar":"ring-user-card-userAvatar","userInformation":"ring-user-card-userInformation","userInformationGeneral":"ring-user-card-userInformationGeneral","userNameLine":"ring-user-card-userNameLine","userName":"ring-user-card-userName","userLogin":"ring-user-card-userLogin","userEmail":"ring-user-card-userEmail","userCopyIcon":"ring-user-card-userCopyIcon","userEmailWrapper":"ring-user-card-userEmailWrapper","unverifiedLabel":"ring-user-card-unverifiedLabel","userNameInfo":"ring-user-card-userNameInfo","userActiveStatus":"ring-user-card-userActiveStatus","online":"ring-user-card-online"};
|
|
18
18
|
|
|
@@ -29,6 +29,7 @@ class UserCard extends PureComponent {
|
|
|
29
29
|
clipboard.copyText(this.props.user.email || '', (_translations$copiedT = translations === null || translations === void 0 ? void 0 : translations.copiedToClipboard) !== null && _translations$copiedT !== void 0 ? _translations$copiedT : translate('copyToClipboard'), (_translations$copingT = translations === null || translations === void 0 ? void 0 : translations.copingToClipboardError) !== null && _translations$copingT !== void 0 ? _translations$copingT : translate('copingToClipboardError'));
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
+
// eslint-disable-next-line complexity
|
|
32
33
|
render() {
|
|
33
34
|
var _translations$online, _translations$offline, _translations$banned, _translations$unverif, _translations$copyToC;
|
|
34
35
|
const _this$props = this.props,
|
|
@@ -67,7 +68,7 @@ class UserCard extends PureComponent {
|
|
|
67
68
|
children: [user.href && jsx(Link, {
|
|
68
69
|
href: user.href,
|
|
69
70
|
className: styles.userName,
|
|
70
|
-
"data-test":
|
|
71
|
+
"data-test": 'user-card-link',
|
|
71
72
|
children: user.name
|
|
72
73
|
}), !user.href && jsx("span", {
|
|
73
74
|
className: styles.userName,
|
|
@@ -93,7 +94,7 @@ class UserCard extends PureComponent {
|
|
|
93
94
|
children: [jsx(Link, {
|
|
94
95
|
href: "mailto:".concat(user.email),
|
|
95
96
|
title: "mailto:".concat(user.email),
|
|
96
|
-
target:
|
|
97
|
+
target: '_blank',
|
|
97
98
|
className: styles.userEmail,
|
|
98
99
|
children: user.email
|
|
99
100
|
}), user.unverifiedEmail && jsx("span", {
|
package/components/_helpers/{dialog__body-scroll-preventer.js → dialog-body-scroll-preventer.js}
RENAMED
|
@@ -20,7 +20,7 @@ const prevent = key => {
|
|
|
20
20
|
scrollbarGutter
|
|
21
21
|
} = getComputedStyle(document.documentElement);
|
|
22
22
|
const documentHasScrollbarGutter = scrollbarGutter === 'stable' || scrollbarGutter === 'both-edges';
|
|
23
|
-
if (documentHasScroll && scrollWidth
|
|
23
|
+
if (documentHasScroll && scrollWidth !== null && scrollWidth !== undefined && scrollWidth > 0 && !documentHasScrollbarGutter) {
|
|
24
24
|
previousDocumentWidth = document.documentElement.style.width;
|
|
25
25
|
document.documentElement.style.width = "calc(100% - ".concat(scrollWidth, "px)");
|
|
26
26
|
}
|
|
@@ -34,7 +34,7 @@ const reset = key => {
|
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
document.documentElement.classList.remove(styles.documentWithoutScroll);
|
|
37
|
-
if (previousDocumentWidth !== null) {
|
|
37
|
+
if (previousDocumentWidth !== null && previousDocumentWidth !== undefined) {
|
|
38
38
|
document.documentElement.style.width = previousDocumentWidth;
|
|
39
39
|
previousDocumentWidth = null;
|
|
40
40
|
}
|
|
@@ -46,6 +46,6 @@ const preventerFactory = key => {
|
|
|
46
46
|
reset: () => reset(preventerKey)
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
|
-
var
|
|
49
|
+
var dialogBodyScrollPreventer = preventerFactory('default-preventer');
|
|
50
50
|
|
|
51
|
-
export {
|
|
51
|
+
export { dialogBodyScrollPreventer as d, preventerFactory as p, styles as s };
|
|
@@ -8,7 +8,7 @@ import { Button } from '../button/button.js';
|
|
|
8
8
|
import getUID from '../global/get-uid.js';
|
|
9
9
|
import Icon from '../icon/icon.js';
|
|
10
10
|
import { I18nContext } from '../i18n/i18n-context.js';
|
|
11
|
-
import { createComposedRef } from '../global/
|
|
11
|
+
import { createComposedRef } from '../global/compose-refs.js';
|
|
12
12
|
import { ControlsHeightContext } from '../global/controls-height.js';
|
|
13
13
|
import { ControlLabel } from '../control-label/control-label.js';
|
|
14
14
|
import ControlHelp from '../control-help/control-help.js';
|
|
@@ -67,7 +67,7 @@ class Input extends PureComponent {
|
|
|
67
67
|
this.adapt();
|
|
68
68
|
}
|
|
69
69
|
componentWillUnmount() {
|
|
70
|
-
if (this.frame
|
|
70
|
+
if (this.frame) {
|
|
71
71
|
cancelAnimationFrame(this.frame);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -79,7 +79,7 @@ class Input extends PureComponent {
|
|
|
79
79
|
this.setState({
|
|
80
80
|
empty: !((_this$input = this.input) !== null && _this$input !== void 0 && _this$input.value)
|
|
81
81
|
});
|
|
82
|
-
if (this.props.multiline && this.props.autogrow && this.input
|
|
82
|
+
if (this.props.multiline && this.props.autogrow && this.input && this.input.scrollHeight >= this.input.clientHeight) {
|
|
83
83
|
this.stretch(this.input);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -130,14 +130,14 @@ class Input extends PureComponent {
|
|
|
130
130
|
const clearable = !!onClear;
|
|
131
131
|
const classes = classNames(className, inputStyles.outerContainer, [inputStyles["size".concat(size)]], [inputStyles["height".concat(height)]], {
|
|
132
132
|
'ring-js-shortcuts': enableShortcuts === true,
|
|
133
|
-
[inputStyles.error]: error
|
|
133
|
+
[inputStyles.error]: error !== null && error !== undefined,
|
|
134
134
|
[inputStyles.empty]: empty,
|
|
135
|
-
[inputStyles.withIcon]: icon
|
|
135
|
+
[inputStyles.withIcon]: icon,
|
|
136
136
|
[inputStyles.clearable]: clearable,
|
|
137
137
|
[inputStyles.borderless]: borderless
|
|
138
138
|
});
|
|
139
139
|
const inputClasses = classNames(inputStyles.input, inputClassName);
|
|
140
|
-
const text = value
|
|
140
|
+
const text = value !== null && value !== void 0 ? value : children;
|
|
141
141
|
const commonProps = {
|
|
142
142
|
ref: this.composedInputRef(this.inputRef, inputRef),
|
|
143
143
|
className: inputClasses,
|
|
@@ -156,7 +156,7 @@ class Input extends PureComponent {
|
|
|
156
156
|
} = _ref;
|
|
157
157
|
return jsxs("div", {
|
|
158
158
|
className: classes,
|
|
159
|
-
"data-test":
|
|
159
|
+
"data-test": 'ring-input',
|
|
160
160
|
children: [label && jsx(ControlLabel, {
|
|
161
161
|
htmlFor: this.getId(),
|
|
162
162
|
disabled: disabled,
|
|
@@ -174,7 +174,7 @@ class Input extends PureComponent {
|
|
|
174
174
|
onChange: this.handleInputChange
|
|
175
175
|
}, commonProps), restProps)), clearable && !disabled && jsx(Button, {
|
|
176
176
|
title: (_translations$clear = translations === null || translations === void 0 ? void 0 : translations.clear) !== null && _translations$clear !== void 0 ? _translations$clear : translate('clear'),
|
|
177
|
-
"data-test":
|
|
177
|
+
"data-test": 'ring-input-clear',
|
|
178
178
|
className: inputStyles.clear,
|
|
179
179
|
icon: closeIcon,
|
|
180
180
|
onClick: this.clear
|
|
@@ -57,7 +57,7 @@ class SelectFilter extends Component {
|
|
|
57
57
|
placeholder: (_restProps$placeholde = restProps.placeholder) !== null && _restProps$placeholde !== void 0 ? _restProps$placeholde : translate('filterItems'),
|
|
58
58
|
"aria-owns": listId,
|
|
59
59
|
"aria-activedescendant": activeItemId,
|
|
60
|
-
autoComplete:
|
|
60
|
+
autoComplete: 'off',
|
|
61
61
|
autoFocus: true,
|
|
62
62
|
borderless: true,
|
|
63
63
|
inputRef: this.inputRef,
|
|
@@ -14,7 +14,7 @@ class ServicesLink extends PureComponent {
|
|
|
14
14
|
} = _this$props,
|
|
15
15
|
props = _objectWithoutProperties(_this$props, _excluded);
|
|
16
16
|
return jsx(Link, _objectSpread2(_objectSpread2({
|
|
17
|
-
target:
|
|
17
|
+
target: '_self',
|
|
18
18
|
href: service.homeUrl
|
|
19
19
|
}, props), {}, {
|
|
20
20
|
children: service.iconUrl ? [jsx("span", {
|
|
@@ -22,9 +22,9 @@ class ServicesLink extends PureComponent {
|
|
|
22
22
|
style: {
|
|
23
23
|
backgroundImage: "url(".concat(service.iconUrl, ")")
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, 'icon'), jsx("div", {
|
|
26
26
|
children: service.name
|
|
27
|
-
},
|
|
27
|
+
}, 'text')] : service.name
|
|
28
28
|
}));
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -83,7 +83,7 @@ const ThemeProvider = /*#__PURE__*/forwardRef(function ThemeProvider(_ref2, ref)
|
|
|
83
83
|
theme: resolvedTheme
|
|
84
84
|
}), [resolvedTheme]);
|
|
85
85
|
useEffect(() => {
|
|
86
|
-
if (target
|
|
86
|
+
if (target) {
|
|
87
87
|
applyTheme(resolvedTheme, target);
|
|
88
88
|
}
|
|
89
89
|
}, [resolvedTheme, target]);
|
|
@@ -93,7 +93,7 @@ const ThemeProvider = /*#__PURE__*/forwardRef(function ThemeProvider(_ref2, ref)
|
|
|
93
93
|
value: themeValue,
|
|
94
94
|
children: jsx(WrapperComponent, _objectSpread2(_objectSpread2({
|
|
95
95
|
ref: ref,
|
|
96
|
-
className: target
|
|
96
|
+
className: target ? undefined : classNames(className, themeClasses)
|
|
97
97
|
}, restProps), {}, {
|
|
98
98
|
children: passToPopups ? jsx(PopupTarget, {
|
|
99
99
|
id: id,
|
|
@@ -14,18 +14,18 @@ import joinDataTestAttributes from '../global/data-tests.js';
|
|
|
14
14
|
import { Button } from '../button/button.js';
|
|
15
15
|
import { T as Theme, a as ThemeProvider } from '../_helpers/theme.js';
|
|
16
16
|
export { default as Container } from './container.js';
|
|
17
|
-
import { Color } from '../icon/
|
|
17
|
+
import { Color } from '../icon/icon.constants.js';
|
|
18
18
|
import 'util-deprecate';
|
|
19
|
-
import '../_helpers/
|
|
19
|
+
import '../_helpers/icon-svg.js';
|
|
20
20
|
import 'core-js/modules/es.regexp.exec.js';
|
|
21
21
|
import 'core-js/modules/es.string.replace.js';
|
|
22
22
|
import '../global/memoize.js';
|
|
23
23
|
import '@jetbrains/icons/chevron-down';
|
|
24
24
|
import '@jetbrains/icons/chevron-12px-down';
|
|
25
|
-
import '../link/
|
|
25
|
+
import '../link/clickable-link.js';
|
|
26
26
|
import '../global/controls-height.js';
|
|
27
27
|
import '../global/configuration.js';
|
|
28
|
-
import '../_helpers/
|
|
28
|
+
import '../_helpers/button.classes.js';
|
|
29
29
|
import 'react-dom';
|
|
30
30
|
import '../popup/popup.target.js';
|
|
31
31
|
import '../popup/popup.js';
|
|
@@ -146,7 +146,7 @@ class Alert extends PureComponent {
|
|
|
146
146
|
}),
|
|
147
147
|
onClick: this._handleCaptionsLinksClick,
|
|
148
148
|
// We only process clicks on `a` elements, see above
|
|
149
|
-
role:
|
|
149
|
+
role: 'presentation',
|
|
150
150
|
children: this.props.children
|
|
151
151
|
});
|
|
152
152
|
}
|
|
@@ -162,7 +162,8 @@ class Alert extends PureComponent {
|
|
|
162
162
|
className: styles.icon,
|
|
163
163
|
color: TypeToIconColor[this.props.type] || Color.DEFAULT
|
|
164
164
|
});
|
|
165
|
-
}
|
|
165
|
+
}
|
|
166
|
+
if (this.props.type === AlertType.LOADING) {
|
|
166
167
|
return jsx(LoaderInline, {
|
|
167
168
|
className: styles.loader
|
|
168
169
|
});
|
|
@@ -203,8 +204,8 @@ class Alert extends PureComponent {
|
|
|
203
204
|
children: [this._getIcon(), this._getCaption(), this.props.closeable ? jsx(Button, {
|
|
204
205
|
icon: closeIcon,
|
|
205
206
|
className: classNames(styles.close, closeButtonClassName),
|
|
206
|
-
"data-test":
|
|
207
|
-
"aria-label":
|
|
207
|
+
"data-test": 'alert-close',
|
|
208
|
+
"aria-label": 'close alert',
|
|
208
209
|
onClick: this.closeRequest
|
|
209
210
|
}) : '']
|
|
210
211
|
});
|
|
@@ -21,9 +21,9 @@ class Alerts extends PureComponent {
|
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
23
|
return /*#__PURE__*/createPortal(jsx("div", _objectSpread2(_objectSpread2({
|
|
24
|
-
"data-test":
|
|
24
|
+
"data-test": 'alert-container',
|
|
25
25
|
className: classes,
|
|
26
|
-
"aria-live":
|
|
26
|
+
"aria-live": 'polite'
|
|
27
27
|
}, restProps), {}, {
|
|
28
28
|
children: Children.map(children, child => {
|
|
29
29
|
if (! /*#__PURE__*/isValidElement(child)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode, Ref } from 'react';
|
|
2
|
-
import Alert, { AlertProps, AlertType } from '../alert/alert';
|
|
1
|
+
import { type ReactNode, type Ref } from 'react';
|
|
2
|
+
import Alert, { type AlertProps, type AlertType } from '../alert/alert';
|
|
3
3
|
export interface AlertItem extends Partial<Omit<AlertProps, 'children'>> {
|
|
4
4
|
key: string | number;
|
|
5
5
|
message: ReactNode;
|
|
@@ -13,8 +13,8 @@ import '@jetbrains/icons/warning';
|
|
|
13
13
|
import '@jetbrains/icons/close';
|
|
14
14
|
import '../icon/icon.js';
|
|
15
15
|
import 'util-deprecate';
|
|
16
|
-
import '../icon/
|
|
17
|
-
import '../_helpers/
|
|
16
|
+
import '../icon/icon.constants.js';
|
|
17
|
+
import '../_helpers/icon-svg.js';
|
|
18
18
|
import 'core-js/modules/es.regexp.exec.js';
|
|
19
19
|
import 'core-js/modules/es.string.replace.js';
|
|
20
20
|
import '../global/memoize.js';
|
|
@@ -24,10 +24,10 @@ import '../global/dom.js';
|
|
|
24
24
|
import '../button/button.js';
|
|
25
25
|
import '@jetbrains/icons/chevron-down';
|
|
26
26
|
import '@jetbrains/icons/chevron-12px-down';
|
|
27
|
-
import '../link/
|
|
27
|
+
import '../link/clickable-link.js';
|
|
28
28
|
import '../global/controls-height.js';
|
|
29
29
|
import '../global/configuration.js';
|
|
30
|
-
import '../_helpers/
|
|
30
|
+
import '../_helpers/button.classes.js';
|
|
31
31
|
import '../_helpers/theme.js';
|
|
32
32
|
import 'react-dom';
|
|
33
33
|
import '../popup/popup.target.js';
|
|
@@ -39,7 +39,7 @@ class AnalyticsCustomPlugin {
|
|
|
39
39
|
var _this$_flush;
|
|
40
40
|
return (_this$_flush = this._flush) === null || _this$_flush === void 0 ? void 0 : _this$_flush.call(this);
|
|
41
41
|
});
|
|
42
|
-
if (this._flush
|
|
42
|
+
if (this._flush) {
|
|
43
43
|
setInterval(this._flush, this._flushInterval);
|
|
44
44
|
}
|
|
45
45
|
this._hasSendSchedule = true;
|
|
@@ -62,7 +62,7 @@ class AnalyticsCustomPlugin {
|
|
|
62
62
|
}
|
|
63
63
|
_addDataToFlushingPack(sendingData) {
|
|
64
64
|
this._data.push(sendingData);
|
|
65
|
-
if (this._flushMaxPackSize
|
|
65
|
+
if (this._flushMaxPackSize && this._data.length >= this._flushMaxPackSize) {
|
|
66
66
|
var _this$_flush2;
|
|
67
67
|
(_this$_flush2 = this._flush) === null || _this$_flush2 === void 0 || _this$_flush2.call(this);
|
|
68
68
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import Listeners, { Handler } from '../global/listeners';
|
|
2
|
-
import HTTP, { HTTPAuth, RequestParams } from '../http/http';
|
|
3
|
-
import type
|
|
4
|
-
import
|
|
5
|
-
import { AuthError, AuthResponse } from './response-parser';
|
|
1
|
+
import Listeners, { type Handler } from '../global/listeners';
|
|
2
|
+
import HTTP, { type HTTPAuth, type RequestParams } from '../http/http';
|
|
3
|
+
import AuthStorage, { type AuthState } from './storage';
|
|
4
|
+
import { type AuthError, type AuthResponse } from './response-parser';
|
|
6
5
|
import AuthRequestBuilder from './request-builder';
|
|
7
6
|
import BackgroundFlow from './background-flow';
|
|
8
|
-
import TokenValidator, { TokenValidationError, TokenValidatorConfig } from './token-validator';
|
|
7
|
+
import TokenValidator, { type TokenValidationError, type TokenValidatorConfig } from './token-validator';
|
|
8
|
+
import type AuthDialogService from '../auth-dialog-service/auth-dialog-service';
|
|
9
9
|
export declare const DEFAULT_EXPIRES_TIMEOUT: number;
|
|
10
10
|
export declare const DEFAULT_BACKGROUND_TIMEOUT: number;
|
|
11
11
|
export declare const USER_CHANGED_EVENT = "userChange";
|
|
@@ -116,7 +116,7 @@ declare global {
|
|
|
116
116
|
pr?: string;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
|
|
119
|
+
declare class Auth implements HTTPAuth {
|
|
120
120
|
static DEFAULT_CONFIG: Omit<AuthConfig, "serverUri">;
|
|
121
121
|
static API_PATH: string;
|
|
122
122
|
static API_AUTH_PATH: string;
|
|
@@ -233,4 +233,5 @@ export default class Auth implements HTTPAuth {
|
|
|
233
233
|
*/
|
|
234
234
|
setHash(hash: string): void;
|
|
235
235
|
}
|
|
236
|
-
export
|
|
236
|
+
export default Auth;
|
|
237
|
+
export { Auth };
|
|
@@ -16,7 +16,7 @@ import AuthRequestBuilder from './request-builder.js';
|
|
|
16
16
|
import BackgroundFlow from './background-flow.js';
|
|
17
17
|
import TokenValidator from './token-validator.js';
|
|
18
18
|
import 'core-js/modules/es.array.sort.js';
|
|
19
|
-
import '../storage/
|
|
19
|
+
import '../storage/storage-local.js';
|
|
20
20
|
import '../alert-service/alert-service.js';
|
|
21
21
|
import 'react/jsx-runtime';
|
|
22
22
|
import 'react-dom/client';
|
|
@@ -30,8 +30,8 @@ import '@jetbrains/icons/warning';
|
|
|
30
30
|
import '@jetbrains/icons/close';
|
|
31
31
|
import '../icon/icon.js';
|
|
32
32
|
import 'util-deprecate';
|
|
33
|
-
import '../icon/
|
|
34
|
-
import '../_helpers/
|
|
33
|
+
import '../icon/icon.constants.js';
|
|
34
|
+
import '../_helpers/icon-svg.js';
|
|
35
35
|
import '../global/memoize.js';
|
|
36
36
|
import '../loader-inline/loader-inline.js';
|
|
37
37
|
import '../global/data-tests.js';
|
|
@@ -39,10 +39,10 @@ import '../global/dom.js';
|
|
|
39
39
|
import '../button/button.js';
|
|
40
40
|
import '@jetbrains/icons/chevron-down';
|
|
41
41
|
import '@jetbrains/icons/chevron-12px-down';
|
|
42
|
-
import '../link/
|
|
42
|
+
import '../link/clickable-link.js';
|
|
43
43
|
import '../global/controls-height.js';
|
|
44
44
|
import '../global/configuration.js';
|
|
45
|
-
import '../_helpers/
|
|
45
|
+
import '../_helpers/button.classes.js';
|
|
46
46
|
import '../_helpers/theme.js';
|
|
47
47
|
import 'react-dom';
|
|
48
48
|
import '../popup/popup.target.js';
|
|
@@ -119,10 +119,10 @@ class Auth {
|
|
|
119
119
|
if (!config) {
|
|
120
120
|
throw new Error('Config is required');
|
|
121
121
|
}
|
|
122
|
-
if (config.serverUri
|
|
122
|
+
if (config.serverUri === null || config.serverUri === undefined) {
|
|
123
123
|
throw new Error('"serverUri" property is required');
|
|
124
124
|
}
|
|
125
|
-
const unsupportedParams = ['redirect_uri', 'request_credentials', 'client_id'].filter(param =>
|
|
125
|
+
const unsupportedParams = ['redirect_uri', 'request_credentials', 'client_id'].filter(param => Object.prototype.hasOwnProperty.call(config, param));
|
|
126
126
|
if (unsupportedParams.length !== 0) {
|
|
127
127
|
throw new Error("The following parameters are no longer supported: ".concat(unsupportedParams.join(', '), ". Please change them from snake_case to camelCase."));
|
|
128
128
|
}
|
|
@@ -250,6 +250,7 @@ class Auth {
|
|
|
250
250
|
* @return {Promise.<string>} absolute URL promise that is resolved to a URL
|
|
251
251
|
* that should be restored after returning back from auth server.
|
|
252
252
|
*/
|
|
253
|
+
// eslint-disable-next-line complexity
|
|
253
254
|
async init() {
|
|
254
255
|
var _this$_storage3;
|
|
255
256
|
(_this$_storage3 = this._storage) === null || _this$_storage3 === void 0 || _this$_storage3.onTokenChange(async token => {
|
|
@@ -336,7 +337,7 @@ class Auth {
|
|
|
336
337
|
async sendRedirect(error) {
|
|
337
338
|
var _this$_requestBuilder;
|
|
338
339
|
const authRequest = await ((_this$_requestBuilder = this._requestBuilder) === null || _this$_requestBuilder === void 0 ? void 0 : _this$_requestBuilder.prepareAuthRequest());
|
|
339
|
-
if (authRequest
|
|
340
|
+
if (authRequest) {
|
|
340
341
|
this._redirectCurrentPage(authRequest.url);
|
|
341
342
|
}
|
|
342
343
|
// HUB-10867 Since we already redirecting the page, there is no actual need to throw an error
|
|
@@ -430,6 +431,7 @@ class Auth {
|
|
|
430
431
|
var _await$this$_backgrou, _this$_backgroundFlow2;
|
|
431
432
|
return (_await$this$_backgrou = await ((_this$_backgroundFlow2 = this._backgroundFlow) === null || _this$_backgroundFlow2 === void 0 ? void 0 : _this$_backgroundFlow2.authorize())) !== null && _await$this$_backgrou !== void 0 ? _await$this$_backgrou : null;
|
|
432
433
|
} catch (error) {
|
|
434
|
+
var _this$_requestBuilder2;
|
|
433
435
|
if (!(error instanceof Error)) {
|
|
434
436
|
return null;
|
|
435
437
|
}
|
|
@@ -457,12 +459,10 @@ class Auth {
|
|
|
457
459
|
onTryAgain
|
|
458
460
|
});
|
|
459
461
|
});
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
this._redirectCurrentPage(authRequest.url);
|
|
465
|
-
}
|
|
462
|
+
}
|
|
463
|
+
const authRequest = await ((_this$_requestBuilder2 = this._requestBuilder) === null || _this$_requestBuilder2 === void 0 ? void 0 : _this$_requestBuilder2.prepareAuthRequest());
|
|
464
|
+
if (authRequest) {
|
|
465
|
+
this._redirectCurrentPage(authRequest.url);
|
|
466
466
|
}
|
|
467
467
|
throw new TokenValidator.TokenValidationError(error.message);
|
|
468
468
|
}
|
|
@@ -494,9 +494,8 @@ class Auth {
|
|
|
494
494
|
if (this.config.cacheCurrentUser) {
|
|
495
495
|
var _this$_storage6;
|
|
496
496
|
return (_this$_storage6 = this._storage) === null || _this$_storage6 === void 0 ? void 0 : _this$_storage6.getCachedUser(() => this.http.authorizedFetch(Auth.API_PROFILE_PATH, accessToken, this.config.userParams));
|
|
497
|
-
} else {
|
|
498
|
-
return this.http.authorizedFetch(Auth.API_PROFILE_PATH, accessToken, this.config.userParams);
|
|
499
497
|
}
|
|
498
|
+
return this.http.authorizedFetch(Auth.API_PROFILE_PATH, accessToken, this.config.userParams);
|
|
500
499
|
}
|
|
501
500
|
/**
|
|
502
501
|
* @return {Promise.<object>}
|
|
@@ -745,7 +744,6 @@ class Auth {
|
|
|
745
744
|
async logout(extraParams) {
|
|
746
745
|
var _this$_storage11, _this$_requestBuilder3;
|
|
747
746
|
const requestParams = _objectSpread2({
|
|
748
|
-
// eslint-disable-next-line camelcase
|
|
749
747
|
request_credentials: 'required'
|
|
750
748
|
}, extraParams);
|
|
751
749
|
await this._checkBackendsStatusesIfEnabled();
|
|
@@ -753,7 +751,7 @@ class Auth {
|
|
|
753
751
|
this._updateDomainUser(null);
|
|
754
752
|
await ((_this$_storage11 = this._storage) === null || _this$_storage11 === void 0 ? void 0 : _this$_storage11.wipeToken());
|
|
755
753
|
const authRequest = await ((_this$_requestBuilder3 = this._requestBuilder) === null || _this$_requestBuilder3 === void 0 ? void 0 : _this$_requestBuilder3.prepareAuthRequest(requestParams));
|
|
756
|
-
if (authRequest
|
|
754
|
+
if (authRequest) {
|
|
757
755
|
this._redirectCurrentPage(authRequest.url);
|
|
758
756
|
}
|
|
759
757
|
}
|
|
@@ -764,8 +762,6 @@ class Auth {
|
|
|
764
762
|
var _this$_embeddedFlow3;
|
|
765
763
|
this._isLoginWindowOpen = true;
|
|
766
764
|
return await ((_this$_embeddedFlow3 = this._embeddedFlow) === null || _this$_embeddedFlow3 === void 0 ? void 0 : _this$_embeddedFlow3.authorize());
|
|
767
|
-
} catch (e) {
|
|
768
|
-
throw e;
|
|
769
765
|
} finally {
|
|
770
766
|
this._isLoginWindowOpen = false;
|
|
771
767
|
}
|
|
@@ -866,7 +862,7 @@ class Auth {
|
|
|
866
862
|
const scopes = scope ? scope.split(' ') : newState.scopes || defaultScope || [];
|
|
867
863
|
const effectiveExpiresIn = expiresIn ? parseInt(expiresIn, 10) : defaultExpiresIn;
|
|
868
864
|
const expires = TokenValidator._epoch() + effectiveExpiresIn;
|
|
869
|
-
if (accessToken
|
|
865
|
+
if (accessToken) {
|
|
870
866
|
var _this$_storage13;
|
|
871
867
|
await ((_this$_storage13 = this._storage) === null || _this$_storage13 === void 0 ? void 0 : _this$_storage13.saveToken({
|
|
872
868
|
accessToken,
|
|
@@ -974,4 +970,4 @@ _defineProperty(Auth, "CLOSE_WINDOW_MESSAGE", 'close-login-window');
|
|
|
974
970
|
_defineProperty(Auth, "shouldRefreshToken", TokenValidator.shouldRefreshToken);
|
|
975
971
|
_defineProperty(Auth, "storageIsUnavailable", !navigator.cookieEnabled);
|
|
976
972
|
|
|
977
|
-
export { DEFAULT_BACKGROUND_TIMEOUT, DEFAULT_EXPIRES_TIMEOUT, DOMAIN_USER_CHANGED_EVENT, LOGOUT_EVENT, LOGOUT_POSTPONED_EVENT, USER_CHANGED_EVENT, USER_CHANGE_POSTPONED_EVENT, Auth as default };
|
|
973
|
+
export { Auth, DEFAULT_BACKGROUND_TIMEOUT, DEFAULT_EXPIRES_TIMEOUT, DOMAIN_USER_CHANGED_EVENT, LOGOUT_EVENT, LOGOUT_POSTPONED_EVENT, USER_CHANGED_EVENT, USER_CHANGE_POSTPONED_EVENT, Auth as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import Auth from './
|
|
2
|
-
export * from './
|
|
1
|
+
import Auth from './auth-core';
|
|
2
|
+
export * from './auth-core';
|
|
3
3
|
export default Auth;
|
package/components/auth/auth.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import WindowFlow from './window-flow.js';
|
|
3
3
|
import onBackendDown from './down-notification.js';
|
|
4
|
-
import Auth from './
|
|
5
|
-
export { DEFAULT_BACKGROUND_TIMEOUT, DEFAULT_EXPIRES_TIMEOUT, DOMAIN_USER_CHANGED_EVENT, LOGOUT_EVENT, LOGOUT_POSTPONED_EVENT, USER_CHANGED_EVENT, USER_CHANGE_POSTPONED_EVENT } from './
|
|
4
|
+
import Auth from './auth-core.js';
|
|
5
|
+
export { DEFAULT_BACKGROUND_TIMEOUT, DEFAULT_EXPIRES_TIMEOUT, DOMAIN_USER_CHANGED_EVENT, LOGOUT_EVENT, LOGOUT_POSTPONED_EVENT, USER_CHANGED_EVENT, USER_CHANGE_POSTPONED_EVENT } from './auth-core.js';
|
|
6
6
|
import './response-parser.js';
|
|
7
7
|
import 'core-js/modules/es.regexp.exec.js';
|
|
8
8
|
import 'core-js/modules/es.string.replace.js';
|
|
@@ -21,8 +21,8 @@ import '@jetbrains/icons/warning';
|
|
|
21
21
|
import '@jetbrains/icons/close';
|
|
22
22
|
import '../icon/icon.js';
|
|
23
23
|
import 'util-deprecate';
|
|
24
|
-
import '../icon/
|
|
25
|
-
import '../_helpers/
|
|
24
|
+
import '../icon/icon.constants.js';
|
|
25
|
+
import '../_helpers/icon-svg.js';
|
|
26
26
|
import '../global/memoize.js';
|
|
27
27
|
import '../loader-inline/loader-inline.js';
|
|
28
28
|
import '../global/data-tests.js';
|
|
@@ -30,10 +30,10 @@ import '../global/dom.js';
|
|
|
30
30
|
import '../button/button.js';
|
|
31
31
|
import '@jetbrains/icons/chevron-down';
|
|
32
32
|
import '@jetbrains/icons/chevron-12px-down';
|
|
33
|
-
import '../link/
|
|
33
|
+
import '../link/clickable-link.js';
|
|
34
34
|
import '../global/controls-height.js';
|
|
35
35
|
import '../global/configuration.js';
|
|
36
|
-
import '../_helpers/
|
|
36
|
+
import '../_helpers/button.classes.js';
|
|
37
37
|
import '../_helpers/theme.js';
|
|
38
38
|
import 'react-dom';
|
|
39
39
|
import '../popup/popup.target.js';
|
|
@@ -61,7 +61,7 @@ import '../http/http.js';
|
|
|
61
61
|
import '../global/promise-with-timeout.js';
|
|
62
62
|
import '../i18n/i18n.js';
|
|
63
63
|
import './storage.js';
|
|
64
|
-
import '../storage/
|
|
64
|
+
import '../storage/storage-local.js';
|
|
65
65
|
import './request-builder.js';
|
|
66
66
|
import 'simply-uuid';
|
|
67
67
|
import './background-flow.js';
|
|
@@ -104,4 +104,4 @@ Auth.DEFAULT_CONFIG = _objectSpread2(_objectSpread2({}, Auth.DEFAULT_CONFIG), {}
|
|
|
104
104
|
onBackendDown: onBackendDown
|
|
105
105
|
});
|
|
106
106
|
|
|
107
|
-
export { Auth as default };
|
|
107
|
+
export { Auth, Auth as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import AuthRequestBuilder from './request-builder';
|
|
2
|
-
import AuthStorage from './storage';
|
|
1
|
+
import type AuthRequestBuilder from './request-builder';
|
|
2
|
+
import type AuthStorage from './storage';
|
|
3
3
|
export declare const HUB_AUTH_PAGE_OPENED = "HUB_AUTH_PAGE_OPENED";
|
|
4
4
|
export default class BackgroundFlow {
|
|
5
5
|
_requestBuilder: AuthRequestBuilder;
|
|
@@ -45,9 +45,7 @@ class BackgroundFlow {
|
|
|
45
45
|
* promise is rejected if no token was received after {@link BackgroundToken.BACKGROUND_TIMEOUT} ms.
|
|
46
46
|
*/
|
|
47
47
|
async _load() {
|
|
48
|
-
const authRequest = await this._requestBuilder
|
|
49
|
-
// eslint-disable-next-line camelcase
|
|
50
|
-
.prepareAuthRequest({
|
|
48
|
+
const authRequest = await this._requestBuilder.prepareAuthRequest({
|
|
51
49
|
request_credentials: 'silent'
|
|
52
50
|
}, {
|
|
53
51
|
nonRedirect: true
|
|
@@ -17,8 +17,8 @@ import '@jetbrains/icons/warning';
|
|
|
17
17
|
import '@jetbrains/icons/close';
|
|
18
18
|
import '../icon/icon.js';
|
|
19
19
|
import 'util-deprecate';
|
|
20
|
-
import '../icon/
|
|
21
|
-
import '../_helpers/
|
|
20
|
+
import '../icon/icon.constants.js';
|
|
21
|
+
import '../_helpers/icon-svg.js';
|
|
22
22
|
import 'core-js/modules/es.regexp.exec.js';
|
|
23
23
|
import 'core-js/modules/es.string.replace.js';
|
|
24
24
|
import '../global/memoize.js';
|
|
@@ -28,10 +28,10 @@ import '../global/dom.js';
|
|
|
28
28
|
import '../button/button.js';
|
|
29
29
|
import '@jetbrains/icons/chevron-down';
|
|
30
30
|
import '@jetbrains/icons/chevron-12px-down';
|
|
31
|
-
import '../link/
|
|
31
|
+
import '../link/clickable-link.js';
|
|
32
32
|
import '../global/controls-height.js';
|
|
33
33
|
import '../global/configuration.js';
|
|
34
|
-
import '../_helpers/
|
|
34
|
+
import '../_helpers/button.classes.js';
|
|
35
35
|
import '../_helpers/theme.js';
|
|
36
36
|
import '../popup/popup.target.js';
|
|
37
37
|
import '../popup/popup.js';
|
|
@@ -75,7 +75,7 @@ function Message(_ref) {
|
|
|
75
75
|
errorMessage
|
|
76
76
|
} = translations;
|
|
77
77
|
return jsxs("div", {
|
|
78
|
-
"data-test":
|
|
78
|
+
"data-test": 'ring-backend-down-notification',
|
|
79
79
|
children: [jsx(Group, {
|
|
80
80
|
children: jsx("div", {
|
|
81
81
|
className: styles.title,
|
|
@@ -86,7 +86,7 @@ function Message(_ref) {
|
|
|
86
86
|
children: [errorMessage, " "]
|
|
87
87
|
}), jsx(Link, {
|
|
88
88
|
onClick: onCheckAgain,
|
|
89
|
-
"data-test":
|
|
89
|
+
"data-test": 'check-again',
|
|
90
90
|
children: checkAgain
|
|
91
91
|
})]
|
|
92
92
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AuthTranslations, LoginFlow } from './
|
|
2
|
-
import AuthRequestBuilder from './request-builder';
|
|
3
|
-
import AuthStorage from './storage';
|
|
1
|
+
import { type AuthTranslations, type LoginFlow } from './auth-core';
|
|
2
|
+
import type AuthRequestBuilder from './request-builder';
|
|
3
|
+
import type AuthStorage from './storage';
|
|
4
4
|
export default class IFrameFlow implements LoginFlow {
|
|
5
5
|
hideDialog: (() => void) | null;
|
|
6
6
|
private _requestBuilder;
|