@jetbrains/ring-ui 5.1.21 → 5.1.23
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/package.json +25 -25
- package/components/alert/alert.css +0 -147
- package/components/alert/alert.d.ts +0 -113
- package/components/alert/alert.js +0 -186
- package/components/alert/container.css +0 -28
- package/components/alert/container.d.ts +0 -15
- package/components/alert/container.js +0 -30
- package/components/alert-service/alert-service.d.ts +0 -34
- package/components/alert-service/alert-service.js +0 -107
- package/components/alert-service/alert-service.stories.css +0 -20
- package/components/analytics/analytics.d.ts +0 -38
- package/components/analytics/analytics.js +0 -82
- package/components/analytics/analytics__custom-plugin.d.ts +0 -29
- package/components/analytics/analytics__custom-plugin.js +0 -61
- package/components/analytics/analytics__fus-plugin.d.ts +0 -52
- package/components/analytics/analytics__fus-plugin.js +0 -22
- package/components/analytics/analytics__ga-plugin.d.ts +0 -27
- package/components/analytics/analytics__ga-plugin.js +0 -89
- package/components/analytics/analytics__plugin-utils.d.ts +0 -31
- package/components/analytics/analytics__plugin-utils.js +0 -92
- package/components/auth/auth.d.ts +0 -3
- package/components/auth/auth.js +0 -42
- package/components/auth/auth__core.d.ts +0 -236
- package/components/auth/auth__core.js +0 -834
- package/components/auth/background-flow.d.ts +0 -31
- package/components/auth/background-flow.js +0 -97
- package/components/auth/down-notification.css +0 -17
- package/components/auth/down-notification.d.ts +0 -15
- package/components/auth/down-notification.js +0 -52
- package/components/auth/iframe-flow.d.ts +0 -20
- package/components/auth/iframe-flow.js +0 -81
- package/components/auth/landing-entry.d.ts +0 -3
- package/components/auth/landing-entry.js +0 -2
- package/components/auth/landing.d.ts +0 -2
- package/components/auth/landing.html +0 -12
- package/components/auth/landing.js +0 -26
- package/components/auth/request-builder.d.ts +0 -48
- package/components/auth/request-builder.js +0 -64
- package/components/auth/response-parser.d.ts +0 -70
- package/components/auth/response-parser.js +0 -99
- package/components/auth/storage.d.ts +0 -112
- package/components/auth/storage.js +0 -224
- package/components/auth/token-validator.d.ts +0 -93
- package/components/auth/token-validator.js +0 -169
- package/components/auth/window-flow.d.ts +0 -26
- package/components/auth/window-flow.js +0 -102
- package/components/auth-dialog/auth-dialog.css +0 -56
- package/components/auth-dialog/auth-dialog.d.ts +0 -60
- package/components/auth-dialog/auth-dialog.js +0 -93
- package/components/auth-dialog-service/auth-dialog-service.d.ts +0 -5
- package/components/auth-dialog-service/auth-dialog-service.js +0 -25
- package/components/auth-ng/auth-ng.js +0 -143
- package/components/auth-ng/auth-ng.mock.js +0 -28
- package/components/auth-ng/auth-ng.stories.js +0 -41
- package/components/autofocus-ng/autofocus-ng.js +0 -51
- package/components/autofocus-ng/autofocus-ng.stories.js +0 -41
- package/components/autofocus-ng/autofocus-ng.test.js +0 -49
- package/components/avatar/avatar-example-datauri.d.ts +0 -1
- package/components/avatar/avatar-example-datauri.js +0 -24
- package/components/avatar/avatar.css +0 -27
- package/components/avatar/avatar.d.ts +0 -52
- package/components/avatar/avatar.js +0 -98
- package/components/avatar/fallback-avatar.d.ts +0 -17
- package/components/avatar/fallback-avatar.js +0 -113
- package/components/avatar-editor-ng/avatar-editor-ng.css +0 -104
- package/components/avatar-editor-ng/avatar-editor-ng.js +0 -133
- package/components/avatar-editor-ng/avatar-editor-ng.stories.js +0 -41
- package/components/avatar-editor-ng/avatar-editor-ng__template.js +0 -28
- package/components/avatar-ng/avatar-ng.js +0 -7
- package/components/avatar-ng/avatar-ng.stories.js +0 -33
- package/components/badge/badge.css +0 -44
- package/components/badge/badge.d.ts +0 -24
- package/components/badge/badge.js +0 -35
- package/components/badge-ng/badge-ng.js +0 -8
- package/components/badge-ng/badge-ng.stories.js +0 -32
- package/components/breadcrumb-ng/breadcrumb-ng.js +0 -60
- package/components/breadcrumb-ng/breadcrumb-ng.stories.js +0 -33
- package/components/breadcrumb-ng/breadcrumb.css +0 -70
- package/components/button/button.css +0 -398
- package/components/button/button.d.ts +0 -67
- package/components/button/button.js +0 -70
- package/components/button/button__classes.d.ts +0 -2
- package/components/button/button__classes.js +0 -18
- package/components/button-group/button-group.css +0 -235
- package/components/button-group/button-group.d.ts +0 -18
- package/components/button-group/button-group.js +0 -21
- package/components/button-group/caption.d.ts +0 -8
- package/components/button-group/caption.js +0 -14
- package/components/button-group-ng/button-group-ng.css +0 -4
- package/components/button-group-ng/button-group-ng.js +0 -43
- package/components/button-group-ng/button-group-ng.stories.js +0 -30
- package/components/button-ng/button-ng.css +0 -23
- package/components/button-ng/button-ng.js +0 -192
- package/components/button-ng/button-ng.stories.js +0 -114
- package/components/button-ng/button-ng.test.js +0 -95
- package/components/button-set/button-set.css +0 -22
- package/components/button-set/button-set.d.ts +0 -16
- package/components/button-set/button-set.js +0 -22
- package/components/button-set-ng/button-set-ng.js +0 -22
- package/components/button-set-ng/button-set-ng.stories.js +0 -30
- package/components/button-toolbar/button-toolbar.css +0 -26
- package/components/button-toolbar/button-toolbar.d.ts +0 -16
- package/components/button-toolbar/button-toolbar.js +0 -20
- package/components/button-toolbar-ng/button-toolbar-ng.js +0 -23
- package/components/button-toolbar-ng/button-toolbar-ng.stories.js +0 -35
- package/components/caret/caret.d.ts +0 -66
- package/components/caret/caret.js +0 -216
- package/components/checkbox/checkbox.css +0 -146
- package/components/checkbox/checkbox.d.ts +0 -45
- package/components/checkbox/checkbox.js +0 -72
- package/components/checkbox-ng/checkbox-ng.js +0 -64
- package/components/checkbox-ng/checkbox-ng.stories.js +0 -80
- package/components/checkbox-ng/checkbox-ng.test.js +0 -61
- package/components/clipboard/clipboard-fallback.d.ts +0 -2
- package/components/clipboard/clipboard-fallback.js +0 -44
- package/components/clipboard/clipboard.d.ts +0 -5
- package/components/clipboard/clipboard.js +0 -41
- package/components/code/code.css +0 -31
- package/components/code/code.d.ts +0 -44
- package/components/code/code.js +0 -94
- package/components/code/highlight.css +0 -112
- package/components/compiler-ng/compiler-ng.js +0 -63
- package/components/compiler-ng/compiler-ng.stories.js +0 -32
- package/components/compiler-ng/compiler-ng.test.js +0 -207
- package/components/confirm/confirm.css +0 -9
- package/components/confirm/confirm.d.ts +0 -48
- package/components/confirm/confirm.js +0 -59
- package/components/confirm-ng/confirm-ng.js +0 -30
- package/components/confirm-ng/confirm-ng.stories.js +0 -43
- package/components/confirm-service/confirm-service.d.ts +0 -21
- package/components/confirm-service/confirm-service.js +0 -51
- package/components/content-layout/content-layout.css +0 -108
- package/components/content-layout/content-layout.d.ts +0 -26
- package/components/content-layout/content-layout.js +0 -45
- package/components/content-layout/sidebar.d.ts +0 -31
- package/components/content-layout/sidebar.js +0 -76
- package/components/contenteditable/contenteditable.d.ts +0 -47
- package/components/contenteditable/contenteditable.js +0 -47
- package/components/control-label/control-label.css +0 -23
- package/components/control-label/control-label.d.ts +0 -11
- package/components/control-label/control-label.js +0 -22
- package/components/data-list/data-list.css +0 -98
- package/components/data-list/data-list.d.ts +0 -85
- package/components/data-list/data-list.js +0 -119
- package/components/data-list/data-list.mock.d.ts +0 -16
- package/components/data-list/data-list.mock.js +0 -207
- package/components/data-list/item.d.ts +0 -50
- package/components/data-list/item.js +0 -114
- package/components/data-list/selection.d.ts +0 -16
- package/components/data-list/selection.js +0 -81
- package/components/data-list/title.d.ts +0 -26
- package/components/data-list/title.js +0 -65
- package/components/data-list-ng/data-list-ng.js +0 -7
- package/components/data-list-ng/data-list-ng.stories.js +0 -54
- package/components/date-picker/consts.d.ts +0 -98
- package/components/date-picker/consts.js +0 -44
- package/components/date-picker/date-input.d.ts +0 -47
- package/components/date-picker/date-input.js +0 -91
- package/components/date-picker/date-picker.css +0 -603
- package/components/date-picker/date-picker.d.ts +0 -77
- package/components/date-picker/date-picker.js +0 -218
- package/components/date-picker/date-popup.d.ts +0 -55
- package/components/date-picker/date-popup.js +0 -347
- package/components/date-picker/day.d.ts +0 -30
- package/components/date-picker/day.js +0 -88
- package/components/date-picker/formats.d.ts +0 -2
- package/components/date-picker/formats.js +0 -1
- package/components/date-picker/month-names.d.ts +0 -13
- package/components/date-picker/month-names.js +0 -62
- package/components/date-picker/month-slider.d.ts +0 -29
- package/components/date-picker/month-slider.js +0 -56
- package/components/date-picker/month.d.ts +0 -14
- package/components/date-picker/month.js +0 -33
- package/components/date-picker/months.d.ts +0 -11
- package/components/date-picker/months.js +0 -101
- package/components/date-picker/weekdays.d.ts +0 -13
- package/components/date-picker/weekdays.js +0 -24
- package/components/date-picker/years.d.ts +0 -25
- package/components/date-picker/years.js +0 -87
- package/components/dialog/dialog.css +0 -134
- package/components/dialog/dialog.d.ts +0 -64
- package/components/dialog/dialog.js +0 -128
- package/components/dialog/dialog__body-scroll-preventer.d.ts +0 -9
- package/components/dialog/dialog__body-scroll-preventer.js +0 -43
- package/components/dialog-ng/dialog-ng.css +0 -98
- package/components/dialog-ng/dialog-ng.js +0 -606
- package/components/dialog-ng/dialog-ng.stories.js +0 -240
- package/components/dialog-ng/dialog-ng.test.js +0 -829
- package/components/dialog-ng/dialog-ng__template.js +0 -70
- package/components/docked-panel-ng/docked-panel-ng.css +0 -28
- package/components/docked-panel-ng/docked-panel-ng.js +0 -169
- package/components/docked-panel-ng/docked-panel-ng.stories.js +0 -39
- package/components/dropdown/anchor.d.ts +0 -11
- package/components/dropdown/anchor.js +0 -16
- package/components/dropdown/dropdown.css +0 -18
- package/components/dropdown/dropdown.d.ts +0 -87
- package/components/dropdown/dropdown.js +0 -159
- package/components/dropdown-menu/dropdown-menu.d.ts +0 -26
- package/components/dropdown-menu/dropdown-menu.js +0 -56
- package/components/editable-heading/editable-heading.css +0 -198
- package/components/editable-heading/editable-heading.d.ts +0 -32
- package/components/editable-heading/editable-heading.js +0 -141
- package/components/error-bubble/error-bubble-legacy.css +0 -79
- package/components/error-bubble/error-bubble.css +0 -56
- package/components/error-bubble/error-bubble.d.ts +0 -18
- package/components/error-bubble/error-bubble.js +0 -28
- package/components/error-message/error-message.css +0 -37
- package/components/error-message/error-message.d.ts +0 -27
- package/components/error-message/error-message.js +0 -37
- package/components/error-message-ng/error-message-ng.js +0 -50
- package/components/error-message-ng/error-message-ng.stories.js +0 -33
- package/components/error-page/error-page.css +0 -24
- package/components/error-page/error-page.gif +0 -0
- package/components/error-page-ng/error-page-ng.css +0 -6
- package/components/error-page-ng/error-page-ng.js +0 -269
- package/components/error-page-ng/error-page-ng.stories.js +0 -31
- package/components/error-page-ng/error-page-ng.test.js +0 -138
- package/components/footer/footer.css +0 -85
- package/components/footer/footer.d.ts +0 -28
- package/components/footer/footer.js +0 -97
- package/components/footer-ng/footer-ng.js +0 -61
- package/components/footer-ng/footer-ng.stories.js +0 -35
- package/components/footer-ng/footer-ng.test.js +0 -41
- package/components/form/form.css +0 -268
- package/components/form/form.stories.js +0 -128
- package/components/form-ng/error-bubble-ng.css +0 -7
- package/components/form-ng/form-ng.js +0 -176
- package/components/form-ng/form-ng.stories.js +0 -73
- package/components/global/angular-component-factory.js +0 -93
- package/components/global/angular-component-factory.test.js +0 -138
- package/components/global/compose.d.ts +0 -7
- package/components/global/compose.js +0 -4
- package/components/global/composeRefs.d.ts +0 -3
- package/components/global/composeRefs.js +0 -8
- package/components/global/controls-height.d.ts +0 -9
- package/components/global/controls-height.js +0 -16
- package/components/global/create-stateful-context.d.ts +0 -27
- package/components/global/create-stateful-context.js +0 -38
- package/components/global/data-tests.d.ts +0 -3
- package/components/global/data-tests.js +0 -17
- package/components/global/dom.d.ts +0 -37
- package/components/global/dom.js +0 -83
- package/components/global/focus-sensor-hoc.d.ts +0 -19
- package/components/global/focus-sensor-hoc.js +0 -102
- package/components/global/fuzzy-highlight.d.ts +0 -11
- package/components/global/fuzzy-highlight.js +0 -58
- package/components/global/get-event-key.d.ts +0 -2
- package/components/global/get-event-key.js +0 -100
- package/components/global/get-uid.d.ts +0 -1
- package/components/global/get-uid.js +0 -16
- package/components/global/global.css +0 -107
- package/components/global/inject-styles.d.ts +0 -3
- package/components/global/inject-styles.js +0 -12
- package/components/global/linear-function.d.ts +0 -6
- package/components/global/linear-function.js +0 -13
- package/components/global/listeners.d.ts +0 -8
- package/components/global/listeners.js +0 -27
- package/components/global/memoize.d.ts +0 -1
- package/components/global/memoize.js +0 -15
- package/components/global/normalize-indent.d.ts +0 -1
- package/components/global/normalize-indent.js +0 -30
- package/components/global/promise-with-timeout.d.ts +0 -5
- package/components/global/promise-with-timeout.js +0 -11
- package/components/global/prop-types.d.ts +0 -4
- package/components/global/prop-types.js +0 -4
- package/components/global/react-dom-renderer.d.ts +0 -16
- package/components/global/react-dom-renderer.js +0 -25
- package/components/global/react-render-adapter.d.ts +0 -29
- package/components/global/react-render-adapter.js +0 -24
- package/components/global/rerender-hoc.d.ts +0 -41
- package/components/global/rerender-hoc.js +0 -28
- package/components/global/ring-angular-component.js +0 -13
- package/components/global/ring-angular-component.test.js +0 -32
- package/components/global/schedule-raf.d.ts +0 -1
- package/components/global/schedule-raf.js +0 -27
- package/components/global/sniffer.d.ts +0 -3
- package/components/global/sniffer.js +0 -4
- package/components/global/theme.d.ts +0 -21
- package/components/global/theme.js +0 -70
- package/components/global/trivial-template-tag.d.ts +0 -1
- package/components/global/trivial-template-tag.js +0 -9
- package/components/global/typescript-utils.d.ts +0 -2
- package/components/global/typescript-utils.js +0 -2
- package/components/global/url.d.ts +0 -57
- package/components/global/url.js +0 -136
- package/components/global/use-event-callback.d.ts +0 -1
- package/components/global/use-event-callback.js +0 -14
- package/components/global/variables.css +0 -180
- package/components/global/variables.d.ts +0 -90
- package/components/global/variables.js +0 -1
- package/components/global/variables_dark.css +0 -128
- package/components/grid/col.d.ts +0 -31
- package/components/grid/col.js +0 -49
- package/components/grid/grid.css +0 -915
- package/components/grid/grid.d.ts +0 -14
- package/components/grid/grid.js +0 -22
- package/components/grid/row.d.ts +0 -40
- package/components/grid/row.js +0 -51
- package/components/group/group.css +0 -9
- package/components/group/group.d.ts +0 -12
- package/components/group/group.js +0 -20
- package/components/group-ng/group-ng.js +0 -16
- package/components/group-ng/group.stories.js +0 -29
- package/components/header/header.css +0 -171
- package/components/header/header.d.ts +0 -34
- package/components/header/header.js +0 -46
- package/components/header/logo.d.ts +0 -14
- package/components/header/logo.js +0 -22
- package/components/header/profile.d.ts +0 -75
- package/components/header/profile.js +0 -119
- package/components/header/services-link.d.ts +0 -25
- package/components/header/services-link.js +0 -28
- package/components/header/services.css +0 -99
- package/components/header/services.d.ts +0 -33
- package/components/header/services.js +0 -62
- package/components/header/smart-profile.d.ts +0 -36
- package/components/header/smart-profile.js +0 -86
- package/components/header/smart-services.d.ts +0 -25
- package/components/header/smart-services.js +0 -49
- package/components/header/tray-icon.d.ts +0 -32
- package/components/header/tray-icon.js +0 -20
- package/components/header/tray.d.ts +0 -9
- package/components/header/tray.js +0 -18
- package/components/heading/heading.css +0 -50
- package/components/heading/heading.d.ts +0 -25
- package/components/heading/heading.js +0 -52
- package/components/heading-ng/heading-ng.js +0 -8
- package/components/heading-ng/heading-ng.stories.js +0 -29
- package/components/http/http.d.ts +0 -61
- package/components/http/http.js +0 -204
- package/components/http/http.mock.d.ts +0 -20
- package/components/http/http.mock.js +0 -52
- package/components/hub-source/hub-source.d.ts +0 -42
- package/components/hub-source/hub-source.js +0 -107
- package/components/hub-source/hub-source__user.d.ts +0 -4
- package/components/hub-source/hub-source__user.js +0 -20
- package/components/hub-source/hub-source__users-groups.d.ts +0 -24
- package/components/hub-source/hub-source__users-groups.js +0 -53
- package/components/i18n/README.md +0 -46
- package/components/i18n/i18n-context.d.ts +0 -13
- package/components/i18n/i18n-context.js +0 -14
- package/components/i18n/i18n.d.ts +0 -59
- package/components/i18n/i18n.js +0 -26
- package/components/i18n/messages.json +0 -53
- package/components/icon/icon.css +0 -102
- package/components/icon/icon.d.ts +0 -43
- package/components/icon/icon.js +0 -69
- package/components/icon/icon__constants.d.ts +0 -30
- package/components/icon/icon__constants.js +0 -32
- package/components/icon/icon__svg.d.ts +0 -15
- package/components/icon/icon__svg.js +0 -58
- package/components/icon/index.d.ts +0 -2
- package/components/icon/index.js +0 -2
- package/components/icon-ng/icon-ng.js +0 -89
- package/components/icon-ng/icon-ng.stories.js +0 -34
- package/components/input/input-legacy.css +0 -125
- package/components/input/input.css +0 -196
- package/components/input/input.d.ts +0 -77
- package/components/input/input.js +0 -165
- package/components/input-ng/input-ng.css +0 -7
- package/components/input-ng/input-ng.js +0 -160
- package/components/input-ng/input-ng.stories.js +0 -127
- package/components/input-ng/input-ng.test.js +0 -32
- package/components/input-size/input-size.css +0 -84
- package/components/input-size/input-size.stories.js +0 -219
- package/components/island/adaptive-island-hoc.d.ts +0 -61
- package/components/island/adaptive-island-hoc.js +0 -28
- package/components/island/content.d.ts +0 -43
- package/components/island/content.js +0 -100
- package/components/island/header.d.ts +0 -8
- package/components/island/header.js +0 -78
- package/components/island/island.css +0 -132
- package/components/island/island.d.ts +0 -78
- package/components/island/island.js +0 -31
- package/components/island-legacy/content-legacy.d.ts +0 -10
- package/components/island-legacy/content-legacy.js +0 -17
- package/components/island-legacy/header-legacy.d.ts +0 -10
- package/components/island-legacy/header-legacy.js +0 -19
- package/components/island-legacy/island-legacy.css +0 -100
- package/components/island-legacy/island-legacy.d.ts +0 -12
- package/components/island-legacy/island-legacy.js +0 -19
- package/components/island-ng/island-content-ng.js +0 -56
- package/components/island-ng/island-header-ng.js +0 -34
- package/components/island-ng/island-ng-class-fixer.js +0 -7
- package/components/island-ng/island-ng.js +0 -35
- package/components/island-ng/island-ng.stories.js +0 -54
- package/components/line/line.css +0 -16
- package/components/link/clickableLink.d.ts +0 -20
- package/components/link/clickableLink.js +0 -33
- package/components/link/link.css +0 -88
- package/components/link/link.d.ts +0 -148
- package/components/link/link.js +0 -73
- package/components/link/link__legacy.css +0 -29
- package/components/link-ng/link-ng.js +0 -26
- package/components/link-ng/link-ng.stories.js +0 -22
- package/components/link-ng/link-ng.test.js +0 -29
- package/components/list/consts.d.ts +0 -77
- package/components/list/consts.js +0 -29
- package/components/list/list.css +0 -301
- package/components/list/list.d.ts +0 -196
- package/components/list/list.js +0 -591
- package/components/list/list.stories.css +0 -3
- package/components/list/list__custom.d.ts +0 -6
- package/components/list/list__custom.js +0 -52
- package/components/list/list__hint.d.ts +0 -15
- package/components/list/list__hint.js +0 -16
- package/components/list/list__item.d.ts +0 -8
- package/components/list/list__item.js +0 -130
- package/components/list/list__link.d.ts +0 -9
- package/components/list/list__link.js +0 -43
- package/components/list/list__separator.d.ts +0 -5
- package/components/list/list__separator.js +0 -21
- package/components/list/list__title.d.ts +0 -5
- package/components/list/list__title.js +0 -28
- package/components/list/list__users-groups-source.d.ts +0 -27
- package/components/list/list__users-groups-source.js +0 -74
- package/components/loader/loader.css +0 -29
- package/components/loader/loader.d.ts +0 -28
- package/components/loader/loader.js +0 -44
- package/components/loader/loader__core.d.ts +0 -75
- package/components/loader/loader__core.js +0 -219
- package/components/loader-inline/loader-inline.css +0 -74
- package/components/loader-inline/loader-inline.d.ts +0 -18
- package/components/loader-inline/loader-inline.js +0 -27
- package/components/loader-inline-ng/loader-inline-ng.js +0 -17
- package/components/loader-inline-ng/loader-inline-ng.stories.js +0 -28
- package/components/loader-inline-ng/loader-inline-ng.test.js +0 -28
- package/components/loader-ng/loader-ng.js +0 -37
- package/components/loader-ng/loader-ng.stories.js +0 -27
- package/components/loader-ng/loader-ng.test.js +0 -41
- package/components/loader-screen/loader-screen.css +0 -29
- package/components/loader-screen/loader-screen.d.ts +0 -17
- package/components/loader-screen/loader-screen.js +0 -25
- package/components/loader-screen-ng/loader-screen-ng.js +0 -95
- package/components/loader-screen-ng/loader-screen-ng.stories.js +0 -30
- package/components/login-dialog/login-dialog.css +0 -25
- package/components/login-dialog/login-dialog.d.ts +0 -47
- package/components/login-dialog/login-dialog.js +0 -84
- package/components/login-dialog/service.d.ts +0 -2
- package/components/login-dialog/service.js +0 -23
- package/components/markdown/code.d.ts +0 -7
- package/components/markdown/code.js +0 -17
- package/components/markdown/heading.d.ts +0 -11
- package/components/markdown/heading.js +0 -9
- package/components/markdown/link.d.ts +0 -12
- package/components/markdown/link.js +0 -10
- package/components/markdown/markdown.css +0 -76
- package/components/markdown/markdown.d.ts +0 -15
- package/components/markdown/markdown.js +0 -44
- package/components/message/message.css +0 -64
- package/components/message/message.d.ts +0 -55
- package/components/message/message.js +0 -129
- package/components/message-bundle-ng/message-bundle-ng.js +0 -67
- package/components/old-browsers-message/old-browsers-message.css +0 -28
- package/components/old-browsers-message/old-browsers-message.d.ts +0 -2
- package/components/old-browsers-message/old-browsers-message.js +0 -83
- package/components/old-browsers-message/old-browsers-message__stop.d.ts +0 -1
- package/components/old-browsers-message/old-browsers-message__stop.js +0 -2
- package/components/old-browsers-message/white-list.d.ts +0 -2
- package/components/old-browsers-message/white-list.js +0 -25
- package/components/pager/pager.css +0 -21
- package/components/pager/pager.d.ts +0 -78
- package/components/pager/pager.js +0 -229
- package/components/pager-ng/pager-ng.js +0 -7
- package/components/pager-ng/pager-ng.stories.js +0 -37
- package/components/palette/palette.css +0 -216
- package/components/palette/palette.stories.js +0 -63
- package/components/panel/panel.css +0 -22
- package/components/panel/panel.d.ts +0 -12
- package/components/panel/panel.js +0 -20
- package/components/panel-ng/panel-ng.js +0 -20
- package/components/permissions/permissions.d.ts +0 -111
- package/components/permissions/permissions.js +0 -177
- package/components/permissions/permissions__cache.d.ts +0 -93
- package/components/permissions/permissions__cache.js +0 -228
- package/components/permissions-ng/permissions-ng.css +0 -5
- package/components/permissions-ng/permissions-ng.js +0 -246
- package/components/permissions-ng/permissions-ng.stories.js +0 -49
- package/components/permissions-ng/permissions-ng.test.js +0 -82
- package/components/place-under-ng/place-under-ng.js +0 -190
- package/components/place-under-ng/place-under-ng.stories.js +0 -94
- package/components/place-under-ng/place-under-ng.test.js +0 -182
- package/components/popup/popup.consts.d.ts +0 -37
- package/components/popup/popup.consts.js +0 -45
- package/components/popup/popup.css +0 -34
- package/components/popup/popup.d.ts +0 -147
- package/components/popup/popup.js +0 -312
- package/components/popup/popup.target.d.ts +0 -7
- package/components/popup/popup.target.js +0 -15
- package/components/popup/position.d.ts +0 -30
- package/components/popup/position.js +0 -202
- package/components/popup-menu/popup-menu.d.ts +0 -60
- package/components/popup-menu/popup-menu.js +0 -41
- package/components/progress-bar/progress-bar.css +0 -83
- package/components/progress-bar/progress-bar.d.ts +0 -64
- package/components/progress-bar/progress-bar.js +0 -76
- package/components/progress-bar-ng/progress-bar-ng.js +0 -7
- package/components/progress-bar-ng/progress-bar-ng.stories.js +0 -52
- package/components/promised-click-ng/promised-click-ng.js +0 -118
- package/components/promised-click-ng/promised-click-ng.stories.js +0 -42
- package/components/promised-click-ng/promised-click-ng.test.js +0 -166
- package/components/proxy-attrs/proxy-attrs.js +0 -24
- package/components/proxy-attrs/proxy-attrs.test.js +0 -102
- package/components/query-assist/query-assist.css +0 -276
- package/components/query-assist/query-assist.d.ts +0 -333
- package/components/query-assist/query-assist.js +0 -847
- package/components/query-assist/query-assist__suggestions.d.ts +0 -29
- package/components/query-assist/query-assist__suggestions.js +0 -60
- package/components/query-assist-ng/query-assist-ng.js +0 -7
- package/components/query-assist-ng/query-assist-ng.stories.js +0 -89
- package/components/radio/radio.css +0 -125
- package/components/radio/radio.d.ts +0 -18
- package/components/radio/radio.js +0 -27
- package/components/radio/radio__item.d.ts +0 -28
- package/components/radio/radio__item.js +0 -41
- package/components/radio-ng/radio-ng.js +0 -61
- package/components/radio-ng/radio-ng.stories.js +0 -31
- package/components/radio-ng/radio-ng.test.js +0 -55
- package/components/save-field-ng/save-field-ng.css +0 -13
- package/components/save-field-ng/save-field-ng.js +0 -358
- package/components/save-field-ng/save-field-ng.stories.js +0 -221
- package/components/save-field-ng/save-field-ng__template.js +0 -32
- package/components/select/select-popup.css +0 -105
- package/components/select/select.css +0 -236
- package/components/select/select.d.ts +0 -303
- package/components/select/select.js +0 -957
- package/components/select/select__filter.d.ts +0 -19
- package/components/select/select__filter.js +0 -49
- package/components/select/select__popup.d.ts +0 -166
- package/components/select/select__popup.js +0 -408
- package/components/select-ng/select-ng.js +0 -561
- package/components/select-ng/select-ng.stories.js +0 -483
- package/components/select-ng/select-ng.test.js +0 -620
- package/components/select-ng/select-ng__lazy.js +0 -83
- package/components/select-ng/select-ng__lazy.test.js +0 -81
- package/components/select-ng/select-ng__options.js +0 -147
- package/components/shortcuts/core.d.ts +0 -74
- package/components/shortcuts/core.js +0 -191
- package/components/shortcuts/shortcut-title.d.ts +0 -1
- package/components/shortcuts/shortcut-title.js +0 -50
- package/components/shortcuts/shortcuts-hoc.d.ts +0 -65
- package/components/shortcuts/shortcuts-hoc.js +0 -19
- package/components/shortcuts/shortcuts.d.ts +0 -28
- package/components/shortcuts/shortcuts.js +0 -50
- package/components/shortcuts-hint-ng/shortcuts-hint-ng.css +0 -116
- package/components/shortcuts-hint-ng/shortcuts-hint-ng.js +0 -101
- package/components/shortcuts-hint-ng/shortcuts-hint-ng.stories.js +0 -126
- package/components/shortcuts-hint-ng/shortcuts-hint-ng.test.js +0 -113
- package/components/shortcuts-hint-ng/shortcuts-hint-ng__template.js +0 -48
- package/components/shortcuts-ng/shortcuts-ng.js +0 -285
- package/components/sidebar/sidebar.css +0 -159
- package/components/sidebar-ng/sidebar-ng.js +0 -99
- package/components/sidebar-ng/sidebar-ng.stories.js +0 -94
- package/components/sidebar-ng/sidebar-ng.test.js +0 -37
- package/components/sidebar-ng/sidebar-ng__button-template.js +0 -18
- package/components/sidebar-ng/sidebar-ng__template.js +0 -10
- package/components/storage/storage.d.ts +0 -18
- package/components/storage/storage.js +0 -22
- package/components/storage/storage__fallback.d.ts +0 -79
- package/components/storage/storage__fallback.js +0 -181
- package/components/storage/storage__local.d.ts +0 -38
- package/components/storage/storage__local.js +0 -119
- package/components/tab-trap/tab-trap.css +0 -6
- package/components/tab-trap/tab-trap.d.ts +0 -43
- package/components/tab-trap/tab-trap.js +0 -125
- package/components/table/cell.d.ts +0 -13
- package/components/table/cell.js +0 -16
- package/components/table/disable-hover-hoc.d.ts +0 -64
- package/components/table/disable-hover-hoc.js +0 -32
- package/components/table/header-cell.d.ts +0 -43
- package/components/table/header-cell.js +0 -56
- package/components/table/header.d.ts +0 -56
- package/components/table/header.js +0 -67
- package/components/table/multitable.d.ts +0 -25
- package/components/table/multitable.js +0 -81
- package/components/table/row-with-focus-sensor.d.ts +0 -18
- package/components/table/row-with-focus-sensor.js +0 -25
- package/components/table/row.d.ts +0 -59
- package/components/table/row.js +0 -154
- package/components/table/selection-adapter.d.ts +0 -5
- package/components/table/selection-adapter.js +0 -10
- package/components/table/selection-shortcuts-hoc.d.ts +0 -17
- package/components/table/selection-shortcuts-hoc.js +0 -146
- package/components/table/selection.d.ts +0 -47
- package/components/table/selection.js +0 -150
- package/components/table/smart-table.d.ts +0 -64
- package/components/table/smart-table.js +0 -40
- package/components/table/table.css +0 -261
- package/components/table/table.d.ts +0 -159
- package/components/table/table.examples2.json +0 -19
- package/components/table/table.js +0 -231
- package/components/table/table.stories.json +0 -45
- package/components/table-legacy/table-legacy.css +0 -348
- package/components/table-legacy/table-legacy__toolbar.css +0 -27
- package/components/table-legacy-ng/table-legacy-ng.js +0 -433
- package/components/table-legacy-ng/table-legacy-ng.stories.js +0 -192
- package/components/table-legacy-ng/table-legacy-ng.test.js +0 -296
- package/components/table-legacy-ng/table-legacy-ng__pager.js +0 -32
- package/components/table-legacy-ng/table-legacy-ng__selection-navigate-actions.js +0 -105
- package/components/table-legacy-ng/table-legacy-ng__selection.js +0 -165
- package/components/table-legacy-ng/table-legacy-ng__toolbar.js +0 -58
- package/components/table-ng/smart-table-ng.js +0 -7
- package/components/table-ng/table-ng.js +0 -7
- package/components/table-ng/table-ng.stories.js +0 -84
- package/components/tabs/collapsible-more.d.ts +0 -29
- package/components/tabs/collapsible-more.js +0 -97
- package/components/tabs/collapsible-tab.d.ts +0 -16
- package/components/tabs/collapsible-tab.js +0 -34
- package/components/tabs/collapsible-tabs.d.ts +0 -43
- package/components/tabs/collapsible-tabs.js +0 -196
- package/components/tabs/custom-item.d.ts +0 -9
- package/components/tabs/custom-item.js +0 -5
- package/components/tabs/dumb-tabs.d.ts +0 -35
- package/components/tabs/dumb-tabs.js +0 -56
- package/components/tabs/smart-tabs.d.ts +0 -20
- package/components/tabs/smart-tabs.js +0 -25
- package/components/tabs/tab-link.d.ts +0 -18
- package/components/tabs/tab-link.js +0 -24
- package/components/tabs/tab.d.ts +0 -27
- package/components/tabs/tab.js +0 -19
- package/components/tabs/tabs.css +0 -224
- package/components/tabs/tabs.d.ts +0 -7
- package/components/tabs/tabs.js +0 -7
- package/components/tabs-ng/tabs-ng.js +0 -206
- package/components/tabs-ng/tabs-ng.stories.js +0 -30
- package/components/tabs-ng/tabs-ng.test.js +0 -76
- package/components/tabs-ng/tabs-ng__template.js +0 -38
- package/components/tag/tag.css +0 -185
- package/components/tag/tag.d.ts +0 -64
- package/components/tag/tag.js +0 -130
- package/components/tags-input/tags-input.css +0 -101
- package/components/tags-input/tags-input.d.ts +0 -165
- package/components/tags-input/tags-input.js +0 -275
- package/components/tags-input-ng/tags-input-ng.js +0 -7
- package/components/tags-input-ng/tags-input-ng.stories.js +0 -41
- package/components/tags-list/tags-list.d.ts +0 -46
- package/components/tags-list/tags-list.js +0 -45
- package/components/template-ng/template-ng.js +0 -57
- package/components/template-ng/template-ng.stories.js +0 -32
- package/components/template-ng/template-ng.test.js +0 -97
- package/components/text/text.css +0 -21
- package/components/text/text.d.ts +0 -23
- package/components/text/text.js +0 -31
- package/components/title-ng/title-ng.js +0 -120
- package/components/title-ng/title-ng.stories.js +0 -30
- package/components/title-ng/title-ng.test.js +0 -47
- package/components/toggle/toggle.css +0 -201
- package/components/toggle/toggle.d.ts +0 -39
- package/components/toggle/toggle.js +0 -46
- package/components/toggle-ng/toggle-ng.js +0 -8
- package/components/toggle-ng/toggle-ng.stories.js +0 -22
- package/components/tooltip/tooltip.css +0 -19
- package/components/tooltip/tooltip.d.ts +0 -65
- package/components/tooltip/tooltip.js +0 -126
- package/components/tooltip-ng/tooltip-ng.css +0 -25
- package/components/tooltip-ng/tooltip-ng.js +0 -100
- package/components/tooltip-ng/tooltip-ng.stories.js +0 -36
- package/components/tooltip-ng/tooltip-ng.test.js +0 -69
- package/components/user-agreement/service.d.ts +0 -67
- package/components/user-agreement/service.js +0 -241
- package/components/user-agreement/toolbox.eula.d.ts +0 -2
- package/components/user-agreement/toolbox.eula.js +0 -160
- package/components/user-agreement/user-agreement.css +0 -29
- package/components/user-agreement/user-agreement.d.ts +0 -61
- package/components/user-agreement/user-agreement.js +0 -82
- package/components/user-card/card.d.ts +0 -71
- package/components/user-card/card.js +0 -89
- package/components/user-card/smart-user-card-tooltip.d.ts +0 -20
- package/components/user-card/smart-user-card-tooltip.js +0 -47
- package/components/user-card/tooltip.d.ts +0 -36
- package/components/user-card/tooltip.js +0 -43
- package/components/user-card/user-card.css +0 -125
- package/components/user-card/user-card.d.ts +0 -11
- package/components/user-card/user-card.js +0 -11
- package/components/user-card-ng/user-card-ng.js +0 -16
- package/components/user-card-ng/user-card-ng.stories.js +0 -66
- package/dist/_helpers/_rollupPluginBabelHelpers.js +0 -648
- package/dist/_helpers/anchor.js +0 -31
- package/dist/_helpers/badge.js +0 -3
- package/dist/_helpers/button-group.js +0 -3
- package/dist/_helpers/button-set.js +0 -3
- package/dist/_helpers/button-toolbar.js +0 -3
- package/dist/_helpers/button__classes.js +0 -34
- package/dist/_helpers/card.js +0 -132
- package/dist/_helpers/checkbox.js +0 -3
- package/dist/_helpers/control-label.js +0 -3
- package/dist/_helpers/date-picker.js +0 -3
- package/dist/_helpers/dialog__body-scroll-preventer.js +0 -54
- package/dist/_helpers/error-message.js +0 -3
- package/dist/_helpers/footer.js +0 -110
- package/dist/_helpers/grid.js +0 -3
- package/dist/_helpers/group.js +0 -3
- package/dist/_helpers/header.js +0 -3
- package/dist/_helpers/icon.js +0 -3
- package/dist/_helpers/input.js +0 -3
- package/dist/_helpers/island.js +0 -3
- package/dist/_helpers/link.js +0 -3
- package/dist/_helpers/list.js +0 -3
- package/dist/_helpers/loader-inline.js +0 -3
- package/dist/_helpers/loader-screen.js +0 -3
- package/dist/_helpers/panel.js +0 -3
- package/dist/_helpers/query-assist__suggestions.js +0 -102
- package/dist/_helpers/radio.js +0 -3
- package/dist/_helpers/select__filter.js +0 -94
- package/dist/_helpers/services-link.js +0 -50
- package/dist/_helpers/sidebar.js +0 -123
- package/dist/_helpers/table.js +0 -3
- package/dist/_helpers/tabs.js +0 -3
- package/dist/_helpers/theme.js +0 -95
- package/dist/_helpers/title.js +0 -103
- package/dist/alert/alert.d.ts +0 -113
- package/dist/alert/alert.js +0 -294
- package/dist/alert/container.d.ts +0 -15
- package/dist/alert/container.js +0 -52
- package/dist/alert-service/alert-service.d.ts +0 -34
- package/dist/alert-service/alert-service.js +0 -219
- package/dist/analytics/analytics.d.ts +0 -38
- package/dist/analytics/analytics.js +0 -107
- package/dist/analytics/analytics__custom-plugin.d.ts +0 -29
- package/dist/analytics/analytics__custom-plugin.js +0 -94
- package/dist/analytics/analytics__fus-plugin.d.ts +0 -52
- package/dist/analytics/analytics__fus-plugin.js +0 -38
- package/dist/analytics/analytics__ga-plugin.d.ts +0 -27
- package/dist/analytics/analytics__ga-plugin.js +0 -116
- package/dist/analytics/analytics__plugin-utils.d.ts +0 -31
- package/dist/analytics/analytics__plugin-utils.js +0 -100
- package/dist/auth/auth.d.ts +0 -3
- package/dist/auth/auth.js +0 -133
- package/dist/auth/auth__core.d.ts +0 -236
- package/dist/auth/auth__core.js +0 -1652
- package/dist/auth/background-flow.d.ts +0 -31
- package/dist/auth/background-flow.js +0 -146
- package/dist/auth/down-notification.d.ts +0 -15
- package/dist/auth/down-notification.js +0 -158
- package/dist/auth/iframe-flow.d.ts +0 -20
- package/dist/auth/iframe-flow.js +0 -194
- package/dist/auth/landing-entry.d.ts +0 -3
- package/dist/auth/landing-entry.js +0 -5
- package/dist/auth/landing.d.ts +0 -2
- package/dist/auth/landing.js +0 -155
- package/dist/auth/request-builder.d.ts +0 -48
- package/dist/auth/request-builder.js +0 -102
- package/dist/auth/response-parser.d.ts +0 -70
- package/dist/auth/response-parser.js +0 -137
- package/dist/auth/storage.d.ts +0 -112
- package/dist/auth/storage.js +0 -428
- package/dist/auth/token-validator.d.ts +0 -93
- package/dist/auth/token-validator.js +0 -268
- package/dist/auth/window-flow.d.ts +0 -26
- package/dist/auth/window-flow.js +0 -153
- package/dist/auth-dialog/auth-dialog.d.ts +0 -60
- package/dist/auth-dialog/auth-dialog.js +0 -219
- package/dist/auth-dialog-service/auth-dialog-service.d.ts +0 -5
- package/dist/auth-dialog-service/auth-dialog-service.js +0 -89
- package/dist/auth-ng/auth-ng.js +0 -229
- package/dist/auth-ng/auth-ng.mock.js +0 -29
- package/dist/autofocus-ng/autofocus-ng.js +0 -57
- package/dist/avatar/avatar-example-datauri.d.ts +0 -1
- package/dist/avatar/avatar-example-datauri.js +0 -4
- package/dist/avatar/avatar.d.ts +0 -52
- package/dist/avatar/avatar.js +0 -180
- package/dist/avatar/fallback-avatar.d.ts +0 -17
- package/dist/avatar/fallback-avatar.js +0 -150
- package/dist/avatar-editor-ng/avatar-editor-ng.js +0 -188
- package/dist/avatar-editor-ng/avatar-editor-ng__template.js +0 -3
- package/dist/avatar-ng/avatar-ng.js +0 -35
- package/dist/badge/badge.d.ts +0 -24
- package/dist/badge/badge.js +0 -59
- package/dist/badge-ng/badge-ng.js +0 -26
- package/dist/breadcrumb-ng/breadcrumb-ng.js +0 -45
- package/dist/button/button.d.ts +0 -67
- package/dist/button/button.js +0 -132
- package/dist/button/button__classes.d.ts +0 -2
- package/dist/button/button__classes.js +0 -2
- package/dist/button-group/button-group.d.ts +0 -18
- package/dist/button-group/button-group.js +0 -48
- package/dist/button-group/caption.d.ts +0 -8
- package/dist/button-group/caption.js +0 -30
- package/dist/button-group-ng/button-group-ng.js +0 -45
- package/dist/button-ng/button-ng.js +0 -199
- package/dist/button-set/button-set.d.ts +0 -16
- package/dist/button-set/button-set.js +0 -46
- package/dist/button-set-ng/button-set-ng.js +0 -17
- package/dist/button-toolbar/button-toolbar.d.ts +0 -16
- package/dist/button-toolbar/button-toolbar.js +0 -45
- package/dist/button-toolbar-ng/button-toolbar-ng.js +0 -23
- package/dist/caret/caret.d.ts +0 -66
- package/dist/caret/caret.js +0 -258
- package/dist/checkbox/checkbox.d.ts +0 -45
- package/dist/checkbox/checkbox.js +0 -130
- package/dist/checkbox-ng/checkbox-ng.js +0 -51
- package/dist/clipboard/clipboard-fallback.d.ts +0 -2
- package/dist/clipboard/clipboard-fallback.js +0 -42
- package/dist/clipboard/clipboard.d.ts +0 -5
- package/dist/clipboard/clipboard.js +0 -185
- package/dist/code/code.d.ts +0 -44
- package/dist/code/code.js +0 -192
- package/dist/compiler-ng/compiler-ng.js +0 -51
- package/dist/confirm/confirm.d.ts +0 -48
- package/dist/confirm/confirm.js +0 -153
- package/dist/confirm-ng/confirm-ng.js +0 -91
- package/dist/confirm-service/confirm-service.d.ts +0 -21
- package/dist/confirm-service/confirm-service.js +0 -140
- package/dist/content-layout/content-layout.d.ts +0 -26
- package/dist/content-layout/content-layout.js +0 -79
- package/dist/content-layout/sidebar.d.ts +0 -31
- package/dist/content-layout/sidebar.js +0 -7
- package/dist/contenteditable/contenteditable.d.ts +0 -47
- package/dist/contenteditable/contenteditable.js +0 -84
- package/dist/control-label/control-label.d.ts +0 -11
- package/dist/control-label/control-label.js +0 -35
- package/dist/data-list/data-list.d.ts +0 -85
- package/dist/data-list/data-list.js +0 -249
- package/dist/data-list/data-list.mock.d.ts +0 -16
- package/dist/data-list/data-list.mock.js +0 -197
- package/dist/data-list/item.d.ts +0 -50
- package/dist/data-list/item.js +0 -237
- package/dist/data-list/selection.d.ts +0 -16
- package/dist/data-list/selection.js +0 -146
- package/dist/data-list/title.d.ts +0 -26
- package/dist/data-list/title.js +0 -30
- package/dist/data-list-ng/data-list-ng.js +0 -78
- package/dist/date-picker/consts.d.ts +0 -98
- package/dist/date-picker/consts.js +0 -46
- package/dist/date-picker/date-input.d.ts +0 -47
- package/dist/date-picker/date-input.js +0 -180
- package/dist/date-picker/date-picker.d.ts +0 -77
- package/dist/date-picker/date-picker.js +0 -405
- package/dist/date-picker/date-popup.d.ts +0 -55
- package/dist/date-picker/date-popup.js +0 -491
- package/dist/date-picker/day.d.ts +0 -30
- package/dist/date-picker/day.js +0 -133
- package/dist/date-picker/formats.d.ts +0 -2
- package/dist/date-picker/formats.js +0 -3
- package/dist/date-picker/month-names.d.ts +0 -13
- package/dist/date-picker/month-names.js +0 -110
- package/dist/date-picker/month-slider.d.ts +0 -29
- package/dist/date-picker/month-slider.js +0 -93
- package/dist/date-picker/month.d.ts +0 -14
- package/dist/date-picker/month.js +0 -58
- package/dist/date-picker/months.d.ts +0 -11
- package/dist/date-picker/months.js +0 -133
- package/dist/date-picker/weekdays.d.ts +0 -13
- package/dist/date-picker/weekdays.js +0 -39
- package/dist/date-picker/years.d.ts +0 -25
- package/dist/date-picker/years.js +0 -134
- package/dist/dialog/dialog.d.ts +0 -64
- package/dist/dialog/dialog.js +0 -239
- package/dist/dialog/dialog__body-scroll-preventer.d.ts +0 -9
- package/dist/dialog/dialog__body-scroll-preventer.js +0 -6
- package/dist/dialog-ng/dialog-ng.js +0 -618
- package/dist/dialog-ng/dialog-ng__template.js +0 -3
- package/dist/docked-panel-ng/docked-panel-ng.js +0 -158
- package/dist/dropdown/anchor.d.ts +0 -11
- package/dist/dropdown/anchor.js +0 -25
- package/dist/dropdown/dropdown.d.ts +0 -87
- package/dist/dropdown/dropdown.js +0 -248
- package/dist/dropdown-menu/dropdown-menu.d.ts +0 -26
- package/dist/dropdown-menu/dropdown-menu.js +0 -196
- package/dist/editable-heading/editable-heading.d.ts +0 -32
- package/dist/editable-heading/editable-heading.js +0 -276
- package/dist/error-bubble/error-bubble.d.ts +0 -18
- package/dist/error-bubble/error-bubble.js +0 -86
- package/dist/error-message/error-message.d.ts +0 -27
- package/dist/error-message/error-message.js +0 -78
- package/dist/error-message-ng/error-message-ng.js +0 -40
- package/dist/footer/footer.d.ts +0 -28
- package/dist/footer/footer.js +0 -19
- package/dist/footer-ng/footer-ng.js +0 -86
- package/dist/form-ng/form-ng.js +0 -155
- package/dist/global/angular-component-factory.js +0 -98
- package/dist/global/compose.d.ts +0 -7
- package/dist/global/compose.js +0 -17
- package/dist/global/composeRefs.d.ts +0 -3
- package/dist/global/composeRefs.js +0 -19
- package/dist/global/controls-height.d.ts +0 -9
- package/dist/global/controls-height.js +0 -19
- package/dist/global/create-stateful-context.d.ts +0 -27
- package/dist/global/create-stateful-context.js +0 -49
- package/dist/global/data-tests.d.ts +0 -3
- package/dist/global/data-tests.js +0 -30
- package/dist/global/dom.d.ts +0 -37
- package/dist/global/dom.js +0 -150
- package/dist/global/focus-sensor-hoc.d.ts +0 -19
- package/dist/global/focus-sensor-hoc.js +0 -165
- package/dist/global/fuzzy-highlight.d.ts +0 -11
- package/dist/global/fuzzy-highlight.js +0 -90
- package/dist/global/get-event-key.d.ts +0 -2
- package/dist/global/get-event-key.js +0 -101
- package/dist/global/get-uid.d.ts +0 -1
- package/dist/global/get-uid.js +0 -22
- package/dist/global/inject-styles.d.ts +0 -3
- package/dist/global/inject-styles.js +0 -22
- package/dist/global/linear-function.d.ts +0 -6
- package/dist/global/linear-function.js +0 -15
- package/dist/global/listeners.d.ts +0 -8
- package/dist/global/listeners.js +0 -58
- package/dist/global/memoize.d.ts +0 -1
- package/dist/global/memoize.js +0 -23
- package/dist/global/normalize-indent.d.ts +0 -1
- package/dist/global/normalize-indent.js +0 -61
- package/dist/global/promise-with-timeout.d.ts +0 -5
- package/dist/global/promise-with-timeout.js +0 -19
- package/dist/global/prop-types.d.ts +0 -4
- package/dist/global/prop-types.js +0 -9
- package/dist/global/react-dom-renderer.d.ts +0 -16
- package/dist/global/react-dom-renderer.js +0 -53
- package/dist/global/react-render-adapter.d.ts +0 -29
- package/dist/global/react-render-adapter.js +0 -35
- package/dist/global/rerender-hoc.d.ts +0 -41
- package/dist/global/rerender-hoc.js +0 -56
- package/dist/global/ring-angular-component.js +0 -27
- package/dist/global/schedule-raf.d.ts +0 -1
- package/dist/global/schedule-raf.js +0 -28
- package/dist/global/sniffer.d.ts +0 -3
- package/dist/global/sniffer.js +0 -6
- package/dist/global/theme.d.ts +0 -21
- package/dist/global/theme.js +0 -40
- package/dist/global/trivial-template-tag.d.ts +0 -1
- package/dist/global/trivial-template-tag.js +0 -21
- package/dist/global/typescript-utils.d.ts +0 -2
- package/dist/global/typescript-utils.js +0 -8
- package/dist/global/url.d.ts +0 -57
- package/dist/global/url.js +0 -141
- package/dist/global/use-event-callback.d.ts +0 -1
- package/dist/global/use-event-callback.js +0 -17
- package/dist/global/variables.d.ts +0 -90
- package/dist/global/variables.js +0 -1
- package/dist/grid/col.d.ts +0 -31
- package/dist/grid/col.js +0 -81
- package/dist/grid/grid.d.ts +0 -14
- package/dist/grid/grid.js +0 -47
- package/dist/grid/row.d.ts +0 -40
- package/dist/grid/row.js +0 -76
- package/dist/group/group.d.ts +0 -12
- package/dist/group/group.js +0 -38
- package/dist/group-ng/group-ng.js +0 -11
- package/dist/header/header.d.ts +0 -34
- package/dist/header/header.js +0 -188
- package/dist/header/logo.d.ts +0 -14
- package/dist/header/logo.js +0 -52
- package/dist/header/profile.d.ts +0 -75
- package/dist/header/profile.js +0 -255
- package/dist/header/services-link.d.ts +0 -25
- package/dist/header/services-link.js +0 -18
- package/dist/header/services.d.ts +0 -33
- package/dist/header/services.js +0 -173
- package/dist/header/smart-profile.d.ts +0 -36
- package/dist/header/smart-profile.js +0 -302
- package/dist/header/smart-services.d.ts +0 -25
- package/dist/header/smart-services.js +0 -192
- package/dist/header/tray-icon.d.ts +0 -32
- package/dist/header/tray-icon.js +0 -58
- package/dist/header/tray.d.ts +0 -9
- package/dist/header/tray.js +0 -41
- package/dist/heading/heading.d.ts +0 -25
- package/dist/heading/heading.js +0 -70
- package/dist/heading-ng/heading-ng.js +0 -23
- package/dist/http/http.d.ts +0 -61
- package/dist/http/http.js +0 -397
- package/dist/http/http.mock.d.ts +0 -20
- package/dist/http/http.mock.js +0 -112
- package/dist/hub-source/hub-source.d.ts +0 -42
- package/dist/hub-source/hub-source.js +0 -215
- package/dist/hub-source/hub-source__user.d.ts +0 -4
- package/dist/hub-source/hub-source__user.js +0 -59
- package/dist/hub-source/hub-source__users-groups.d.ts +0 -24
- package/dist/hub-source/hub-source__users-groups.js +0 -84
- package/dist/i18n/i18n-context.d.ts +0 -13
- package/dist/i18n/i18n-context.js +0 -27
- package/dist/i18n/i18n.d.ts +0 -59
- package/dist/i18n/i18n.js +0 -139
- package/dist/icon/icon.d.ts +0 -43
- package/dist/icon/icon.js +0 -110
- package/dist/icon/icon__constants.d.ts +0 -30
- package/dist/icon/icon__constants.js +0 -34
- package/dist/icon/icon__svg.d.ts +0 -15
- package/dist/icon/icon__svg.js +0 -79
- package/dist/icon/index.d.ts +0 -2
- package/dist/icon/index.js +0 -18
- package/dist/icon-ng/icon-ng.js +0 -94
- package/dist/input/input.d.ts +0 -77
- package/dist/input/input.js +0 -255
- package/dist/input-ng/input-ng.js +0 -126
- package/dist/island/adaptive-island-hoc.d.ts +0 -61
- package/dist/island/adaptive-island-hoc.js +0 -53
- package/dist/island/content.d.ts +0 -43
- package/dist/island/content.js +0 -151
- package/dist/island/header.d.ts +0 -8
- package/dist/island/header.js +0 -100
- package/dist/island/island.d.ts +0 -78
- package/dist/island/island.js +0 -60
- package/dist/island-legacy/content-legacy.d.ts +0 -10
- package/dist/island-legacy/content-legacy.js +0 -34
- package/dist/island-legacy/header-legacy.d.ts +0 -10
- package/dist/island-legacy/header-legacy.js +0 -36
- package/dist/island-legacy/island-legacy.d.ts +0 -12
- package/dist/island-legacy/island-legacy.js +0 -36
- package/dist/island-ng/island-content-ng.js +0 -44
- package/dist/island-ng/island-header-ng.js +0 -29
- package/dist/island-ng/island-ng-class-fixer.js +0 -12
- package/dist/island-ng/island-ng.js +0 -27
- package/dist/link/clickableLink.d.ts +0 -20
- package/dist/link/clickableLink.js +0 -69
- package/dist/link/link.d.ts +0 -148
- package/dist/link/link.js +0 -126
- package/dist/link-ng/link-ng.js +0 -21
- package/dist/list/consts.d.ts +0 -77
- package/dist/list/consts.js +0 -31
- package/dist/list/list.d.ts +0 -196
- package/dist/list/list.js +0 -800
- package/dist/list/list__custom.d.ts +0 -6
- package/dist/list/list__custom.js +0 -92
- package/dist/list/list__hint.d.ts +0 -15
- package/dist/list/list__hint.js +0 -33
- package/dist/list/list__item.d.ts +0 -8
- package/dist/list/list__item.js +0 -236
- package/dist/list/list__link.d.ts +0 -9
- package/dist/list/list__link.js +0 -81
- package/dist/list/list__separator.d.ts +0 -5
- package/dist/list/list__separator.js +0 -39
- package/dist/list/list__title.d.ts +0 -5
- package/dist/list/list__title.js +0 -48
- package/dist/list/list__users-groups-source.d.ts +0 -27
- package/dist/list/list__users-groups-source.js +0 -192
- package/dist/loader/loader.d.ts +0 -28
- package/dist/loader/loader.js +0 -91
- package/dist/loader/loader__core.d.ts +0 -75
- package/dist/loader/loader__core.js +0 -325
- package/dist/loader-inline/loader-inline.d.ts +0 -18
- package/dist/loader-inline/loader-inline.js +0 -49
- package/dist/loader-inline-ng/loader-inline-ng.js +0 -14
- package/dist/loader-ng/loader-ng.js +0 -58
- package/dist/loader-screen/loader-screen.d.ts +0 -17
- package/dist/loader-screen/loader-screen.js +0 -61
- package/dist/loader-screen-ng/loader-screen-ng.js +0 -96
- package/dist/login-dialog/login-dialog.d.ts +0 -47
- package/dist/login-dialog/login-dialog.js +0 -214
- package/dist/login-dialog/service.d.ts +0 -2
- package/dist/login-dialog/service.js +0 -95
- package/dist/markdown/code.d.ts +0 -7
- package/dist/markdown/code.js +0 -52
- package/dist/markdown/heading.d.ts +0 -11
- package/dist/markdown/heading.js +0 -20
- package/dist/markdown/link.d.ts +0 -12
- package/dist/markdown/link.js +0 -34
- package/dist/markdown/markdown.d.ts +0 -15
- package/dist/markdown/markdown.js +0 -102
- package/dist/message/message.d.ts +0 -55
- package/dist/message/message.js +0 -266
- package/dist/message-bundle-ng/message-bundle-ng.js +0 -151
- package/dist/old-browsers-message/old-browsers-message.d.ts +0 -2
- package/dist/old-browsers-message/old-browsers-message.js +0 -92
- package/dist/old-browsers-message/old-browsers-message__stop.d.ts +0 -1
- package/dist/old-browsers-message/old-browsers-message__stop.js +0 -11
- package/dist/old-browsers-message/white-list.d.ts +0 -2
- package/dist/old-browsers-message/white-list.js +0 -37
- package/dist/pager/pager.d.ts +0 -78
- package/dist/pager/pager.js +0 -397
- package/dist/pager-ng/pager-ng.js +0 -126
- package/dist/panel/panel.d.ts +0 -12
- package/dist/panel/panel.js +0 -38
- package/dist/panel-ng/panel-ng.js +0 -25
- package/dist/permissions/permissions.d.ts +0 -111
- package/dist/permissions/permissions.js +0 -220
- package/dist/permissions/permissions__cache.d.ts +0 -93
- package/dist/permissions/permissions__cache.js +0 -257
- package/dist/permissions-ng/permissions-ng.js +0 -324
- package/dist/place-under-ng/place-under-ng.js +0 -156
- package/dist/popup/popup.consts.d.ts +0 -37
- package/dist/popup/popup.consts.js +0 -44
- package/dist/popup/popup.d.ts +0 -147
- package/dist/popup/popup.js +0 -422
- package/dist/popup/popup.target.d.ts +0 -7
- package/dist/popup/popup.target.js +0 -24
- package/dist/popup/position.d.ts +0 -30
- package/dist/popup/position.js +0 -270
- package/dist/popup-menu/popup-menu.d.ts +0 -60
- package/dist/popup-menu/popup-menu.js +0 -138
- package/dist/progress-bar/progress-bar.d.ts +0 -64
- package/dist/progress-bar/progress-bar.js +0 -120
- package/dist/progress-bar-ng/progress-bar-ng.js +0 -22
- package/dist/promised-click-ng/promised-click-ng.js +0 -136
- package/dist/proxy-attrs/proxy-attrs.js +0 -27
- package/dist/query-assist/query-assist.d.ts +0 -333
- package/dist/query-assist/query-assist.js +0 -1099
- package/dist/query-assist/query-assist__suggestions.d.ts +0 -29
- package/dist/query-assist/query-assist__suggestions.js +0 -72
- package/dist/query-assist-ng/query-assist-ng.js +0 -112
- package/dist/radio/radio.d.ts +0 -18
- package/dist/radio/radio.js +0 -49
- package/dist/radio/radio__item.d.ts +0 -28
- package/dist/radio/radio__item.js +0 -87
- package/dist/radio-ng/radio-ng.js +0 -47
- package/dist/save-field-ng/save-field-ng.js +0 -318
- package/dist/save-field-ng/save-field-ng__template.js +0 -3
- package/dist/select/select.d.ts +0 -303
- package/dist/select/select.js +0 -1311
- package/dist/select/select__filter.d.ts +0 -19
- package/dist/select/select__filter.js +0 -84
- package/dist/select/select__popup.d.ts +0 -166
- package/dist/select/select__popup.js +0 -631
- package/dist/select-ng/select-ng.js +0 -620
- package/dist/select-ng/select-ng__lazy.js +0 -198
- package/dist/select-ng/select-ng__options.js +0 -143
- package/dist/shortcuts/core.d.ts +0 -74
- package/dist/shortcuts/core.js +0 -247
- package/dist/shortcuts/shortcut-title.d.ts +0 -1
- package/dist/shortcuts/shortcut-title.js +0 -56
- package/dist/shortcuts/shortcuts-hoc.d.ts +0 -65
- package/dist/shortcuts/shortcuts-hoc.js +0 -59
- package/dist/shortcuts/shortcuts.d.ts +0 -28
- package/dist/shortcuts/shortcuts.js +0 -90
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +0 -151
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng__template.js +0 -3
- package/dist/shortcuts-ng/shortcuts-ng.js +0 -259
- package/dist/sidebar-ng/sidebar-ng.js +0 -126
- package/dist/sidebar-ng/sidebar-ng__button-template.js +0 -3
- package/dist/sidebar-ng/sidebar-ng__template.js +0 -3
- package/dist/storage/storage.d.ts +0 -18
- package/dist/storage/storage.js +0 -91
- package/dist/storage/storage__fallback.d.ts +0 -79
- package/dist/storage/storage__fallback.js +0 -253
- package/dist/storage/storage__local.d.ts +0 -38
- package/dist/storage/storage__local.js +0 -217
- package/dist/style.css +0 -1
- package/dist/tab-trap/tab-trap.d.ts +0 -43
- package/dist/tab-trap/tab-trap.js +0 -179
- package/dist/table/cell.d.ts +0 -13
- package/dist/table/cell.js +0 -37
- package/dist/table/disable-hover-hoc.d.ts +0 -64
- package/dist/table/disable-hover-hoc.js +0 -62
- package/dist/table/header-cell.d.ts +0 -43
- package/dist/table/header-cell.js +0 -110
- package/dist/table/header.d.ts +0 -56
- package/dist/table/header.js +0 -153
- package/dist/table/multitable.d.ts +0 -25
- package/dist/table/multitable.js +0 -139
- package/dist/table/row-with-focus-sensor.d.ts +0 -18
- package/dist/table/row-with-focus-sensor.js +0 -117
- package/dist/table/row.d.ts +0 -59
- package/dist/table/row.js +0 -299
- package/dist/table/selection-adapter.d.ts +0 -5
- package/dist/table/selection-adapter.js +0 -14
- package/dist/table/selection-shortcuts-hoc.d.ts +0 -17
- package/dist/table/selection-shortcuts-hoc.js +0 -204
- package/dist/table/selection.d.ts +0 -47
- package/dist/table/selection.js +0 -256
- package/dist/table/smart-table.d.ts +0 -64
- package/dist/table/smart-table.js +0 -147
- package/dist/table/table.d.ts +0 -159
- package/dist/table/table.js +0 -461
- package/dist/table-legacy-ng/table-legacy-ng.js +0 -480
- package/dist/table-legacy-ng/table-legacy-ng__pager.js +0 -149
- package/dist/table-legacy-ng/table-legacy-ng__selection-navigate-actions.js +0 -115
- package/dist/table-legacy-ng/table-legacy-ng__selection.js +0 -193
- package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +0 -64
- package/dist/table-ng/smart-table-ng.js +0 -88
- package/dist/table-ng/table-ng.js +0 -87
- package/dist/tabs/collapsible-more.d.ts +0 -29
- package/dist/tabs/collapsible-more.js +0 -221
- package/dist/tabs/collapsible-tab.d.ts +0 -16
- package/dist/tabs/collapsible-tab.js +0 -95
- package/dist/tabs/collapsible-tabs.d.ts +0 -43
- package/dist/tabs/collapsible-tabs.js +0 -352
- package/dist/tabs/custom-item.d.ts +0 -9
- package/dist/tabs/custom-item.js +0 -11
- package/dist/tabs/dumb-tabs.d.ts +0 -35
- package/dist/tabs/dumb-tabs.js +0 -188
- package/dist/tabs/smart-tabs.d.ts +0 -20
- package/dist/tabs/smart-tabs.js +0 -139
- package/dist/tabs/tab-link.d.ts +0 -18
- package/dist/tabs/tab-link.js +0 -48
- package/dist/tabs/tab.d.ts +0 -27
- package/dist/tabs/tab.js +0 -41
- package/dist/tabs/tabs.d.ts +0 -7
- package/dist/tabs/tabs.js +0 -97
- package/dist/tabs-ng/tabs-ng.js +0 -185
- package/dist/tabs-ng/tabs-ng__template.js +0 -3
- package/dist/tag/tag.d.ts +0 -64
- package/dist/tag/tag.js +0 -214
- package/dist/tags-input/tags-input.d.ts +0 -165
- package/dist/tags-input/tags-input.js +0 -535
- package/dist/tags-input-ng/tags-input-ng.js +0 -120
- package/dist/tags-list/tags-list.d.ts +0 -46
- package/dist/tags-list/tags-list.js +0 -103
- package/dist/template-ng/template-ng.js +0 -68
- package/dist/text/text.d.ts +0 -23
- package/dist/text/text.js +0 -57
- package/dist/title-ng/title-ng.js +0 -108
- package/dist/toggle/toggle.d.ts +0 -39
- package/dist/toggle/toggle.js +0 -86
- package/dist/toggle-ng/toggle-ng.js +0 -26
- package/dist/tooltip/tooltip.d.ts +0 -65
- package/dist/tooltip/tooltip.js +0 -227
- package/dist/tooltip-ng/tooltip-ng.js +0 -118
- package/dist/user-agreement/service.d.ts +0 -67
- package/dist/user-agreement/service.js +0 -500
- package/dist/user-agreement/toolbox.eula.d.ts +0 -2
- package/dist/user-agreement/toolbox.eula.js +0 -3
- package/dist/user-agreement/user-agreement.d.ts +0 -61
- package/dist/user-agreement/user-agreement.js +0 -189
- package/dist/user-card/card.d.ts +0 -71
- package/dist/user-card/card.js +0 -78
- package/dist/user-card/smart-user-card-tooltip.d.ts +0 -20
- package/dist/user-card/smart-user-card-tooltip.js +0 -170
- package/dist/user-card/tooltip.d.ts +0 -36
- package/dist/user-card/tooltip.js +0 -142
- package/dist/user-card/user-card.d.ts +0 -11
- package/dist/user-card/user-card.js +0 -83
- package/dist/user-card-ng/user-card-ng.js +0 -93
package/dist/auth/auth__core.js
DELETED
|
@@ -1,1652 +0,0 @@
|
|
|
1
|
-
import { _ as _defineProperty, d as _createClass, g as _objectSpread2, c as _classCallCheck, l as _toConsumableArray, h as _asyncToGenerator, i as _regeneratorRuntime } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/es.object.to-string.js';
|
|
3
|
-
import 'core-js/modules/es.promise.js';
|
|
4
|
-
import 'core-js/modules/es.array.filter.js';
|
|
5
|
-
import 'core-js/modules/es.array.iterator.js';
|
|
6
|
-
import 'core-js/modules/es.set.js';
|
|
7
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
8
|
-
import 'core-js/modules/es.array.concat.js';
|
|
9
|
-
import 'core-js/modules/es.array.includes.js';
|
|
10
|
-
import 'core-js/modules/es.string.includes.js';
|
|
11
|
-
import 'core-js/modules/es.regexp.exec.js';
|
|
12
|
-
import 'core-js/modules/es.string.replace.js';
|
|
13
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
|
14
|
-
import 'core-js/modules/web.url.js';
|
|
15
|
-
import 'core-js/modules/web.url-search-params.js';
|
|
16
|
-
import 'core-js/modules/es.string.search.js';
|
|
17
|
-
import { getAbsoluteBaseURL, fixUrl } from '../global/url.js';
|
|
18
|
-
import Listeners from '../global/listeners.js';
|
|
19
|
-
import HTTP from '../http/http.js';
|
|
20
|
-
import promiseWithTimeout from '../global/promise-with-timeout.js';
|
|
21
|
-
import { translate, getTranslationsWithFallback, getTranslations } from '../i18n/i18n.js';
|
|
22
|
-
import AuthStorage from './storage.js';
|
|
23
|
-
import AuthResponseParser from './response-parser.js';
|
|
24
|
-
import AuthRequestBuilder from './request-builder.js';
|
|
25
|
-
import BackgroundFlow from './background-flow.js';
|
|
26
|
-
import TokenValidator from './token-validator.js';
|
|
27
|
-
import 'core-js/modules/es.string.match.js';
|
|
28
|
-
import 'core-js/modules/es.map.js';
|
|
29
|
-
import 'core-js/modules/es.array.map.js';
|
|
30
|
-
import 'core-js/modules/es.weak-map.js';
|
|
31
|
-
import 'core-js/modules/web.dom-collections.for-each.js';
|
|
32
|
-
import 'core-js/modules/es.object.entries.js';
|
|
33
|
-
import 'core-js/modules/es.reflect.delete-property.js';
|
|
34
|
-
import 'es6-error';
|
|
35
|
-
import 'core-js/modules/es.array.reduce.js';
|
|
36
|
-
import 'core-js/modules/es.array.sort.js';
|
|
37
|
-
import '../storage/storage.js';
|
|
38
|
-
import '../storage/storage__local.js';
|
|
39
|
-
import '../alert-service/alert-service.js';
|
|
40
|
-
import 'react';
|
|
41
|
-
import '../global/react-render-adapter.js';
|
|
42
|
-
import 'react-dom';
|
|
43
|
-
import '../global/get-uid.js';
|
|
44
|
-
import '../alert/alert.js';
|
|
45
|
-
import 'core-js/modules/es.object.values.js';
|
|
46
|
-
import 'classnames';
|
|
47
|
-
import 'prop-types';
|
|
48
|
-
import '@jetbrains/icons/exception';
|
|
49
|
-
import '@jetbrains/icons/checkmark';
|
|
50
|
-
import '@jetbrains/icons/warning';
|
|
51
|
-
import '@jetbrains/icons/close';
|
|
52
|
-
import '../icon/icon.js';
|
|
53
|
-
import 'util-deprecate';
|
|
54
|
-
import '../icon/icon__constants.js';
|
|
55
|
-
import '../_helpers/icon.js';
|
|
56
|
-
import '../icon/icon__svg.js';
|
|
57
|
-
import 'core-js/modules/es.string.starts-with.js';
|
|
58
|
-
import '../global/memoize.js';
|
|
59
|
-
import '../loader-inline/loader-inline.js';
|
|
60
|
-
import '../global/data-tests.js';
|
|
61
|
-
import '../_helpers/loader-inline.js';
|
|
62
|
-
import '../global/dom.js';
|
|
63
|
-
import 'core-js/modules/es.string.split.js';
|
|
64
|
-
import '../button/button.js';
|
|
65
|
-
import '@jetbrains/icons/chevron-10px';
|
|
66
|
-
import '../link/clickableLink.js';
|
|
67
|
-
import '../global/controls-height.js';
|
|
68
|
-
import '../_helpers/button__classes.js';
|
|
69
|
-
import '../_helpers/theme.js';
|
|
70
|
-
import '../popup/popup.target.js';
|
|
71
|
-
import '../popup/popup.js';
|
|
72
|
-
import '../global/schedule-raf.js';
|
|
73
|
-
import '../shortcuts/shortcuts.js';
|
|
74
|
-
import '../shortcuts/core.js';
|
|
75
|
-
import 'core-js/modules/es.array.slice.js';
|
|
76
|
-
import 'core-js/modules/es.array.splice.js';
|
|
77
|
-
import 'combokeys';
|
|
78
|
-
import '../global/sniffer.js';
|
|
79
|
-
import 'sniffr';
|
|
80
|
-
import '../tab-trap/tab-trap.js';
|
|
81
|
-
import '../popup/position.js';
|
|
82
|
-
import '../popup/popup.consts.js';
|
|
83
|
-
import '../alert/container.js';
|
|
84
|
-
import '../storage/storage__fallback.js';
|
|
85
|
-
import 'deep-equal';
|
|
86
|
-
import 'simply-uuid';
|
|
87
|
-
|
|
88
|
-
/* eslint-disable @typescript-eslint/no-magic-numbers */
|
|
89
|
-
var DEFAULT_EXPIRES_TIMEOUT = 40 * 60;
|
|
90
|
-
var DEFAULT_BACKGROUND_TIMEOUT = 10 * 1000;
|
|
91
|
-
var DEFAULT_BACKEND_CHECK_TIMEOUT = 10 * 1000;
|
|
92
|
-
var BACKGROUND_REDIRECT_TIMEOUT = 20 * 1000;
|
|
93
|
-
var DEFAULT_WAIT_FOR_REDIRECT_TIMEOUT = 5 * 1000;
|
|
94
|
-
/* eslint-enable @typescript-eslint/no-magic-numbers */
|
|
95
|
-
var USER_CHANGED_EVENT = 'userChange';
|
|
96
|
-
var DOMAIN_USER_CHANGED_EVENT = 'domainUser';
|
|
97
|
-
var LOGOUT_EVENT = 'logout';
|
|
98
|
-
var LOGOUT_POSTPONED_EVENT = 'logoutPostponed';
|
|
99
|
-
var USER_CHANGE_POSTPONED_EVENT = 'changePostponed';
|
|
100
|
-
function noop() {}
|
|
101
|
-
var DEFAULT_CONFIG = {
|
|
102
|
-
cacheCurrentUser: false,
|
|
103
|
-
reloadOnUserChange: true,
|
|
104
|
-
embeddedLogin: false,
|
|
105
|
-
EmbeddedLoginFlow: null,
|
|
106
|
-
clientId: '0-0-0-0-0',
|
|
107
|
-
redirectUri: getAbsoluteBaseURL(),
|
|
108
|
-
redirect: false,
|
|
109
|
-
requestCredentials: 'default',
|
|
110
|
-
backgroundRefreshTimeout: null,
|
|
111
|
-
scope: [],
|
|
112
|
-
userFields: ['guest', 'id', 'name', 'login', 'profile/avatar/url'],
|
|
113
|
-
cleanHash: true,
|
|
114
|
-
onLogout: noop,
|
|
115
|
-
onPostponeChangedUser: function onPostponeChangedUser() {},
|
|
116
|
-
onPostponeLogout: function onPostponeLogout() {},
|
|
117
|
-
enableBackendStatusCheck: true,
|
|
118
|
-
backendCheckTimeout: DEFAULT_BACKEND_CHECK_TIMEOUT,
|
|
119
|
-
checkBackendIsUp: function checkBackendIsUp() {
|
|
120
|
-
return Promise.resolve(null);
|
|
121
|
-
},
|
|
122
|
-
onBackendDown: function onBackendDown() {
|
|
123
|
-
return function () {};
|
|
124
|
-
},
|
|
125
|
-
defaultExpiresIn: DEFAULT_EXPIRES_TIMEOUT,
|
|
126
|
-
waitForRedirectTimeout: DEFAULT_WAIT_FOR_REDIRECT_TIMEOUT,
|
|
127
|
-
translations: null
|
|
128
|
-
};
|
|
129
|
-
var Auth = /*#__PURE__*/function () {
|
|
130
|
-
function Auth(config) {
|
|
131
|
-
var _this = this;
|
|
132
|
-
_classCallCheck(this, Auth);
|
|
133
|
-
_defineProperty(this, "config", void 0);
|
|
134
|
-
_defineProperty(this, "listeners", new Listeners());
|
|
135
|
-
_defineProperty(this, "http", void 0);
|
|
136
|
-
_defineProperty(this, "_service", {});
|
|
137
|
-
_defineProperty(this, "_storage", null);
|
|
138
|
-
_defineProperty(this, "_responseParser", new AuthResponseParser());
|
|
139
|
-
_defineProperty(this, "_requestBuilder", null);
|
|
140
|
-
_defineProperty(this, "_backgroundFlow", void 0);
|
|
141
|
-
_defineProperty(this, "_embeddedFlow", null);
|
|
142
|
-
_defineProperty(this, "_tokenValidator", null);
|
|
143
|
-
_defineProperty(this, "_postponed", false);
|
|
144
|
-
_defineProperty(this, "_backendCheckPromise", null);
|
|
145
|
-
_defineProperty(this, "_authDialogService", undefined);
|
|
146
|
-
_defineProperty(this, "_domainStorage", void 0);
|
|
147
|
-
_defineProperty(this, "user", null);
|
|
148
|
-
_defineProperty(this, "_initDeferred", void 0);
|
|
149
|
-
_defineProperty(this, "_isLoginWindowOpen", void 0);
|
|
150
|
-
if (!config) {
|
|
151
|
-
throw new Error('Config is required');
|
|
152
|
-
}
|
|
153
|
-
if (config.serverUri == null) {
|
|
154
|
-
throw new Error('\"serverUri\" property is required');
|
|
155
|
-
}
|
|
156
|
-
var unsupportedParams = ['redirect_uri', 'request_credentials', 'client_id'].filter(function (param) {
|
|
157
|
-
return config.hasOwnProperty(param);
|
|
158
|
-
});
|
|
159
|
-
if (unsupportedParams.length !== 0) {
|
|
160
|
-
throw new Error("The following parameters are no longer supported: ".concat(unsupportedParams.join(', '), ". Please change them from snake_case to camelCase."));
|
|
161
|
-
}
|
|
162
|
-
config.userFields = config.userFields || [];
|
|
163
|
-
this.config = _objectSpread2(_objectSpread2({}, Auth.DEFAULT_CONFIG), config);
|
|
164
|
-
var _this$config = this.config,
|
|
165
|
-
clientId = _this$config.clientId,
|
|
166
|
-
redirect = _this$config.redirect,
|
|
167
|
-
redirectUri = _this$config.redirectUri,
|
|
168
|
-
requestCredentials = _this$config.requestCredentials,
|
|
169
|
-
scope = _this$config.scope;
|
|
170
|
-
var serverUriLength = this.config.serverUri.length;
|
|
171
|
-
if (serverUriLength > 0 && this.config.serverUri.charAt(serverUriLength - 1) !== '/') {
|
|
172
|
-
this.config.serverUri += '/';
|
|
173
|
-
}
|
|
174
|
-
this.config.userParams = {
|
|
175
|
-
query: {
|
|
176
|
-
fields: _toConsumableArray(new Set(Auth.DEFAULT_CONFIG.userFields.concat(config.userFields))).join()
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
if (!scope.includes(Auth.DEFAULT_CONFIG.clientId)) {
|
|
180
|
-
scope.push(Auth.DEFAULT_CONFIG.clientId);
|
|
181
|
-
}
|
|
182
|
-
this._storage = new AuthStorage({
|
|
183
|
-
messagePrefix: "".concat(clientId, "-message-"),
|
|
184
|
-
stateKeyPrefix: "".concat(clientId, "-states-"),
|
|
185
|
-
tokenKey: "".concat(clientId, "-token"),
|
|
186
|
-
userKey: "".concat(clientId, "-user-")
|
|
187
|
-
});
|
|
188
|
-
this._domainStorage = new AuthStorage({
|
|
189
|
-
messagePrefix: 'domain-message-'
|
|
190
|
-
});
|
|
191
|
-
this._requestBuilder = new AuthRequestBuilder({
|
|
192
|
-
authorization: this.config.serverUri + Auth.API_PATH + Auth.API_AUTH_PATH,
|
|
193
|
-
clientId,
|
|
194
|
-
redirect,
|
|
195
|
-
redirectUri,
|
|
196
|
-
requestCredentials,
|
|
197
|
-
scopes: scope
|
|
198
|
-
}, this._storage);
|
|
199
|
-
var backgroundRefreshTimeout = this.config.backgroundRefreshTimeout;
|
|
200
|
-
if (!backgroundRefreshTimeout) {
|
|
201
|
-
backgroundRefreshTimeout = this.config.embeddedLogin ? DEFAULT_BACKGROUND_TIMEOUT : BACKGROUND_REDIRECT_TIMEOUT;
|
|
202
|
-
}
|
|
203
|
-
this._backgroundFlow = new BackgroundFlow(this._requestBuilder, this._storage, backgroundRefreshTimeout);
|
|
204
|
-
if (this.config.EmbeddedLoginFlow) {
|
|
205
|
-
var _this$config$translat;
|
|
206
|
-
this._embeddedFlow = new this.config.EmbeddedLoginFlow(this._requestBuilder, this._storage, (_this$config$translat = this.config.translations) !== null && _this$config$translat !== void 0 ? _this$config$translat : getTranslationsWithFallback());
|
|
207
|
-
}
|
|
208
|
-
var API_BASE = this.config.serverUri + Auth.API_PATH;
|
|
209
|
-
var fetchConfig = config.fetchCredentials ? {
|
|
210
|
-
credentials: config.fetchCredentials
|
|
211
|
-
} : undefined;
|
|
212
|
-
this.http = new HTTP(this, API_BASE, fetchConfig);
|
|
213
|
-
var getUser = /*#__PURE__*/function () {
|
|
214
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(token) {
|
|
215
|
-
var user;
|
|
216
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
217
|
-
while (1) switch (_context.prev = _context.next) {
|
|
218
|
-
case 0:
|
|
219
|
-
_context.next = 2;
|
|
220
|
-
return _this.getUser(token);
|
|
221
|
-
case 2:
|
|
222
|
-
user = _context.sent;
|
|
223
|
-
_this.user = user;
|
|
224
|
-
return _context.abrupt("return", user);
|
|
225
|
-
case 5:
|
|
226
|
-
case "end":
|
|
227
|
-
return _context.stop();
|
|
228
|
-
}
|
|
229
|
-
}, _callee);
|
|
230
|
-
}));
|
|
231
|
-
return function getUser(_x) {
|
|
232
|
-
return _ref.apply(this, arguments);
|
|
233
|
-
};
|
|
234
|
-
}();
|
|
235
|
-
this._tokenValidator = new TokenValidator(this.config, getUser, this._storage);
|
|
236
|
-
if (this.config.onLogout) {
|
|
237
|
-
this.addListener(LOGOUT_EVENT, this.config.onLogout);
|
|
238
|
-
}
|
|
239
|
-
if (this.config.reloadOnUserChange) {
|
|
240
|
-
this.addListener(USER_CHANGED_EVENT, function () {
|
|
241
|
-
return _this._reloadCurrentPage();
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
this.addListener(LOGOUT_POSTPONED_EVENT, function () {
|
|
245
|
-
return _this._setPostponed(true);
|
|
246
|
-
});
|
|
247
|
-
this.addListener(USER_CHANGE_POSTPONED_EVENT, function () {
|
|
248
|
-
return _this._setPostponed(true);
|
|
249
|
-
});
|
|
250
|
-
this.addListener(USER_CHANGED_EVENT, function () {
|
|
251
|
-
return _this._setPostponed(false);
|
|
252
|
-
});
|
|
253
|
-
this.addListener(USER_CHANGED_EVENT, function (user) {
|
|
254
|
-
if (user) {
|
|
255
|
-
_this._updateDomainUser(user.id);
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
if (this.config.cacheCurrentUser) {
|
|
259
|
-
this.addListener(LOGOUT_EVENT, function () {
|
|
260
|
-
var _this$_storage;
|
|
261
|
-
return (_this$_storage = _this._storage) === null || _this$_storage === void 0 ? void 0 : _this$_storage.wipeCachedCurrentUser();
|
|
262
|
-
});
|
|
263
|
-
this.addListener(USER_CHANGED_EVENT, function () {
|
|
264
|
-
var _this$_storage2;
|
|
265
|
-
return (_this$_storage2 = _this._storage) === null || _this$_storage2 === void 0 ? void 0 : _this$_storage2.onUserChanged();
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
this._createInitDeferred();
|
|
269
|
-
this.setUpPreconnect(config.serverUri);
|
|
270
|
-
}
|
|
271
|
-
_createClass(Auth, [{
|
|
272
|
-
key: "_setPostponed",
|
|
273
|
-
value: function _setPostponed() {
|
|
274
|
-
var postponed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
275
|
-
this._postponed = postponed;
|
|
276
|
-
}
|
|
277
|
-
}, {
|
|
278
|
-
key: "_updateDomainUser",
|
|
279
|
-
value: function _updateDomainUser(userID) {
|
|
280
|
-
this._domainStorage.sendMessage(DOMAIN_USER_CHANGED_EVENT, {
|
|
281
|
-
userID,
|
|
282
|
-
serviceID: this.config.clientId
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
}, {
|
|
286
|
-
key: "addListener",
|
|
287
|
-
value: function addListener(event, handler) {
|
|
288
|
-
this.listeners.add(event, handler);
|
|
289
|
-
}
|
|
290
|
-
}, {
|
|
291
|
-
key: "removeListener",
|
|
292
|
-
value: function removeListener(event, handler) {
|
|
293
|
-
this.listeners.remove(event, handler);
|
|
294
|
-
}
|
|
295
|
-
}, {
|
|
296
|
-
key: "setAuthDialogService",
|
|
297
|
-
value: function setAuthDialogService(authDialogService) {
|
|
298
|
-
this._authDialogService = authDialogService;
|
|
299
|
-
}
|
|
300
|
-
}, {
|
|
301
|
-
key: "setCurrentService",
|
|
302
|
-
value: function setCurrentService(service) {
|
|
303
|
-
this._service = service;
|
|
304
|
-
}
|
|
305
|
-
}, {
|
|
306
|
-
key: "_createInitDeferred",
|
|
307
|
-
value: function _createInitDeferred() {
|
|
308
|
-
var deferred = {};
|
|
309
|
-
deferred.promise = new Promise(function (resolve, reject) {
|
|
310
|
-
deferred.resolve = resolve;
|
|
311
|
-
deferred.reject = reject;
|
|
312
|
-
});
|
|
313
|
-
this._initDeferred = deferred;
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* @return {Promise.<string>} absolute URL promise that is resolved to a URL
|
|
317
|
-
* that should be restored after returning back from auth server.
|
|
318
|
-
*/
|
|
319
|
-
}, {
|
|
320
|
-
key: "init",
|
|
321
|
-
value: (function () {
|
|
322
|
-
var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
323
|
-
var _this$_storage3,
|
|
324
|
-
_this2 = this;
|
|
325
|
-
var state, _this$_tokenValidator, _this$_initDeferred, _this$_initDeferred$r, _state, message, _this$user, userID, serviceID, _this$_initDeferred2, _this$_initDeferred2$;
|
|
326
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
327
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
328
|
-
case 0:
|
|
329
|
-
(_this$_storage3 = this._storage) === null || _this$_storage3 === void 0 || _this$_storage3.onTokenChange( /*#__PURE__*/function () {
|
|
330
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(token) {
|
|
331
|
-
var isGuest;
|
|
332
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
333
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
334
|
-
case 0:
|
|
335
|
-
isGuest = _this2.user ? _this2.user.guest : false;
|
|
336
|
-
if (!(isGuest && !token)) {
|
|
337
|
-
_context2.next = 3;
|
|
338
|
-
break;
|
|
339
|
-
}
|
|
340
|
-
return _context2.abrupt("return");
|
|
341
|
-
case 3:
|
|
342
|
-
if (token) {
|
|
343
|
-
_context2.next = 7;
|
|
344
|
-
break;
|
|
345
|
-
}
|
|
346
|
-
_this2.logout();
|
|
347
|
-
_context2.next = 17;
|
|
348
|
-
break;
|
|
349
|
-
case 7:
|
|
350
|
-
_context2.prev = 7;
|
|
351
|
-
_context2.next = 10;
|
|
352
|
-
return _this2._detectUserChange(token.accessToken);
|
|
353
|
-
case 10:
|
|
354
|
-
_context2.next = 17;
|
|
355
|
-
break;
|
|
356
|
-
case 12:
|
|
357
|
-
_context2.prev = 12;
|
|
358
|
-
_context2.t0 = _context2["catch"](7);
|
|
359
|
-
if (_context2.t0 instanceof Error) {
|
|
360
|
-
_context2.next = 16;
|
|
361
|
-
break;
|
|
362
|
-
}
|
|
363
|
-
throw _context2.t0;
|
|
364
|
-
case 16:
|
|
365
|
-
if (_this2._canShowDialogs()) {
|
|
366
|
-
_this2._showAuthDialog({
|
|
367
|
-
nonInteractive: true,
|
|
368
|
-
error: _context2.t0
|
|
369
|
-
});
|
|
370
|
-
}
|
|
371
|
-
case 17:
|
|
372
|
-
case "end":
|
|
373
|
-
return _context2.stop();
|
|
374
|
-
}
|
|
375
|
-
}, _callee2, null, [[7, 12]]);
|
|
376
|
-
}));
|
|
377
|
-
return function (_x2) {
|
|
378
|
-
return _ref2.apply(this, arguments);
|
|
379
|
-
};
|
|
380
|
-
}());
|
|
381
|
-
this._domainStorage.onMessage(DOMAIN_USER_CHANGED_EVENT, function (message) {
|
|
382
|
-
var _ref3 = message || {},
|
|
383
|
-
userID = _ref3.userID,
|
|
384
|
-
serviceID = _ref3.serviceID;
|
|
385
|
-
if (serviceID === _this2.config.clientId) {
|
|
386
|
-
return;
|
|
387
|
-
}
|
|
388
|
-
if (_this2.user && userID === _this2.user.id) {
|
|
389
|
-
return;
|
|
390
|
-
}
|
|
391
|
-
_this2.forceTokenUpdate();
|
|
392
|
-
});
|
|
393
|
-
_context3.prev = 2;
|
|
394
|
-
_context3.next = 5;
|
|
395
|
-
return this._checkForAuthResponse();
|
|
396
|
-
case 5:
|
|
397
|
-
state = _context3.sent;
|
|
398
|
-
_context3.next = 11;
|
|
399
|
-
break;
|
|
400
|
-
case 8:
|
|
401
|
-
_context3.prev = 8;
|
|
402
|
-
_context3.t0 = _context3["catch"](2);
|
|
403
|
-
return _context3.abrupt("return", _context3.t0 instanceof Error ? this.handleInitError(_context3.t0) : undefined);
|
|
404
|
-
case 11:
|
|
405
|
-
if (!(state && state.nonRedirect)) {
|
|
406
|
-
_context3.next = 13;
|
|
407
|
-
break;
|
|
408
|
-
}
|
|
409
|
-
return _context3.abrupt("return", new Promise(noop));
|
|
410
|
-
case 13:
|
|
411
|
-
_context3.prev = 13;
|
|
412
|
-
_context3.next = 16;
|
|
413
|
-
return (_this$_tokenValidator = this._tokenValidator) === null || _this$_tokenValidator === void 0 ? void 0 : _this$_tokenValidator.validateToken();
|
|
414
|
-
case 16:
|
|
415
|
-
_context3.next = 18;
|
|
416
|
-
return this._domainStorage._messagesStorage.get("domain-message-".concat(DOMAIN_USER_CHANGED_EVENT));
|
|
417
|
-
case 18:
|
|
418
|
-
message = _context3.sent;
|
|
419
|
-
if (message) {
|
|
420
|
-
userID = message.userID, serviceID = message.serviceID;
|
|
421
|
-
if (serviceID !== this.config.clientId && (!userID || ((_this$user = this.user) === null || _this$user === void 0 ? void 0 : _this$user.id) !== userID)) {
|
|
422
|
-
this.forceTokenUpdate();
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
// Access token appears to be valid.
|
|
426
|
-
// We may resolve restoreLocation URL now
|
|
427
|
-
if (state) {
|
|
428
|
-
_context3.next = 24;
|
|
429
|
-
break;
|
|
430
|
-
}
|
|
431
|
-
_context3.next = 23;
|
|
432
|
-
return this._checkForStateRestoration();
|
|
433
|
-
case 23:
|
|
434
|
-
state = _context3.sent;
|
|
435
|
-
case 24:
|
|
436
|
-
(_this$_initDeferred = this._initDeferred) === null || _this$_initDeferred === void 0 || (_this$_initDeferred$r = _this$_initDeferred.resolve) === null || _this$_initDeferred$r === void 0 || _this$_initDeferred$r.call(_this$_initDeferred, state && state.restoreLocation);
|
|
437
|
-
return _context3.abrupt("return", (_state = state) === null || _state === void 0 ? void 0 : _state.restoreLocation);
|
|
438
|
-
case 28:
|
|
439
|
-
_context3.prev = 28;
|
|
440
|
-
_context3.t1 = _context3["catch"](13);
|
|
441
|
-
if (!Auth.storageIsUnavailable) {
|
|
442
|
-
_context3.next = 35;
|
|
443
|
-
break;
|
|
444
|
-
}
|
|
445
|
-
(_this$_initDeferred2 = this._initDeferred) === null || _this$_initDeferred2 === void 0 || (_this$_initDeferred2$ = _this$_initDeferred2.resolve) === null || _this$_initDeferred2$ === void 0 || _this$_initDeferred2$.call(_this$_initDeferred2); // No way to handle if cookies are disabled
|
|
446
|
-
_context3.next = 34;
|
|
447
|
-
return this.requestUser();
|
|
448
|
-
case 34:
|
|
449
|
-
return _context3.abrupt("return", null);
|
|
450
|
-
case 35:
|
|
451
|
-
return _context3.abrupt("return", _context3.t1 instanceof Error ? this.handleInitValidationError(_context3.t1) : undefined);
|
|
452
|
-
case 36:
|
|
453
|
-
case "end":
|
|
454
|
-
return _context3.stop();
|
|
455
|
-
}
|
|
456
|
-
}, _callee3, this, [[2, 8], [13, 28]]);
|
|
457
|
-
}));
|
|
458
|
-
function init() {
|
|
459
|
-
return _init.apply(this, arguments);
|
|
460
|
-
}
|
|
461
|
-
return init;
|
|
462
|
-
}())
|
|
463
|
-
}, {
|
|
464
|
-
key: "sendRedirect",
|
|
465
|
-
value: function () {
|
|
466
|
-
var _sendRedirect = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(error) {
|
|
467
|
-
var _this$_requestBuilder,
|
|
468
|
-
_this3 = this;
|
|
469
|
-
var authRequest;
|
|
470
|
-
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
471
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
472
|
-
case 0:
|
|
473
|
-
_context4.next = 2;
|
|
474
|
-
return (_this$_requestBuilder = this._requestBuilder) === null || _this$_requestBuilder === void 0 ? void 0 : _this$_requestBuilder.prepareAuthRequest();
|
|
475
|
-
case 2:
|
|
476
|
-
authRequest = _context4.sent;
|
|
477
|
-
if (authRequest != null) {
|
|
478
|
-
this._redirectCurrentPage(authRequest.url);
|
|
479
|
-
}
|
|
480
|
-
// HUB-10867 Since we already redirecting the page, there is no actual need to throw an error
|
|
481
|
-
// and scare user with flashing error
|
|
482
|
-
// But let's keep it just in case redirect was not successful
|
|
483
|
-
_context4.next = 6;
|
|
484
|
-
return new Promise(function (resolve) {
|
|
485
|
-
return setTimeout(resolve, _this3.config.waitForRedirectTimeout);
|
|
486
|
-
});
|
|
487
|
-
case 6:
|
|
488
|
-
throw error;
|
|
489
|
-
case 7:
|
|
490
|
-
case "end":
|
|
491
|
-
return _context4.stop();
|
|
492
|
-
}
|
|
493
|
-
}, _callee4, this);
|
|
494
|
-
}));
|
|
495
|
-
function sendRedirect(_x3) {
|
|
496
|
-
return _sendRedirect.apply(this, arguments);
|
|
497
|
-
}
|
|
498
|
-
return sendRedirect;
|
|
499
|
-
}()
|
|
500
|
-
}, {
|
|
501
|
-
key: "handleInitError",
|
|
502
|
-
value: function () {
|
|
503
|
-
var _handleInitError = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(error) {
|
|
504
|
-
var _this$_storage4, state, _this$_storage5;
|
|
505
|
-
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
506
|
-
while (1) switch (_context5.prev = _context5.next) {
|
|
507
|
-
case 0:
|
|
508
|
-
if (!('stateId' in error && error.stateId)) {
|
|
509
|
-
_context5.next = 13;
|
|
510
|
-
break;
|
|
511
|
-
}
|
|
512
|
-
_context5.prev = 1;
|
|
513
|
-
_context5.next = 4;
|
|
514
|
-
return (_this$_storage4 = this._storage) === null || _this$_storage4 === void 0 ? void 0 : _this$_storage4.getState(error.stateId);
|
|
515
|
-
case 4:
|
|
516
|
-
state = _context5.sent;
|
|
517
|
-
if (!(state && state.nonRedirect)) {
|
|
518
|
-
_context5.next = 9;
|
|
519
|
-
break;
|
|
520
|
-
}
|
|
521
|
-
state.error = error;
|
|
522
|
-
(_this$_storage5 = this._storage) === null || _this$_storage5 === void 0 || _this$_storage5.saveState(error.stateId, state);
|
|
523
|
-
// Return endless promise in the background to avoid service start
|
|
524
|
-
return _context5.abrupt("return", new Promise(noop));
|
|
525
|
-
case 9:
|
|
526
|
-
_context5.next = 13;
|
|
527
|
-
break;
|
|
528
|
-
case 11:
|
|
529
|
-
_context5.prev = 11;
|
|
530
|
-
_context5.t0 = _context5["catch"](1);
|
|
531
|
-
case 13:
|
|
532
|
-
throw error;
|
|
533
|
-
case 14:
|
|
534
|
-
case "end":
|
|
535
|
-
return _context5.stop();
|
|
536
|
-
}
|
|
537
|
-
}, _callee5, this, [[1, 11]]);
|
|
538
|
-
}));
|
|
539
|
-
function handleInitError(_x4) {
|
|
540
|
-
return _handleInitError.apply(this, arguments);
|
|
541
|
-
}
|
|
542
|
-
return handleInitError;
|
|
543
|
-
}()
|
|
544
|
-
}, {
|
|
545
|
-
key: "handleInitValidationError",
|
|
546
|
-
value: function () {
|
|
547
|
-
var _handleInitValidationError = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(error) {
|
|
548
|
-
var _error$cause, _this$_initDeferred4, _this$_initDeferred4$;
|
|
549
|
-
var _this$_backgroundFlow, _this$_tokenValidator2, _this$_initDeferred3, _this$_initDeferred3$;
|
|
550
|
-
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
551
|
-
while (1) switch (_context6.prev = _context6.next) {
|
|
552
|
-
case 0:
|
|
553
|
-
if (!('cause' in error && error.cause instanceof Error && ((_error$cause = error.cause) === null || _error$cause === void 0 ? void 0 : _error$cause.message) === 'invalid_client')) {
|
|
554
|
-
_context6.next = 5;
|
|
555
|
-
break;
|
|
556
|
-
}
|
|
557
|
-
// eslint-disable-next-line no-console
|
|
558
|
-
console.error('RingUI Auth: invalid client detected. Logging out', error);
|
|
559
|
-
_context6.next = 4;
|
|
560
|
-
return this.logout();
|
|
561
|
-
case 4:
|
|
562
|
-
return _context6.abrupt("return", undefined);
|
|
563
|
-
case 5:
|
|
564
|
-
if (!('authRedirect' in error && error.authRedirect && this.config.redirect)) {
|
|
565
|
-
_context6.next = 7;
|
|
566
|
-
break;
|
|
567
|
-
}
|
|
568
|
-
return _context6.abrupt("return", this.sendRedirect(error));
|
|
569
|
-
case 7:
|
|
570
|
-
if (!('authRedirect' in error && error.authRedirect && !this.config.redirect)) {
|
|
571
|
-
_context6.next = 20;
|
|
572
|
-
break;
|
|
573
|
-
}
|
|
574
|
-
_context6.prev = 8;
|
|
575
|
-
_context6.next = 11;
|
|
576
|
-
return (_this$_backgroundFlow = this._backgroundFlow) === null || _this$_backgroundFlow === void 0 ? void 0 : _this$_backgroundFlow.authorize();
|
|
577
|
-
case 11:
|
|
578
|
-
_context6.next = 13;
|
|
579
|
-
return (_this$_tokenValidator2 = this._tokenValidator) === null || _this$_tokenValidator2 === void 0 ? void 0 : _this$_tokenValidator2.validateToken();
|
|
580
|
-
case 13:
|
|
581
|
-
(_this$_initDeferred3 = this._initDeferred) === null || _this$_initDeferred3 === void 0 || (_this$_initDeferred3$ = _this$_initDeferred3.resolve) === null || _this$_initDeferred3$ === void 0 || _this$_initDeferred3$.call(_this$_initDeferred3);
|
|
582
|
-
return _context6.abrupt("return", undefined);
|
|
583
|
-
case 17:
|
|
584
|
-
_context6.prev = 17;
|
|
585
|
-
_context6.t0 = _context6["catch"](8);
|
|
586
|
-
return _context6.abrupt("return", _context6.t0 instanceof Error ? this.sendRedirect(_context6.t0) : undefined);
|
|
587
|
-
case 20:
|
|
588
|
-
(_this$_initDeferred4 = this._initDeferred) === null || _this$_initDeferred4 === void 0 || (_this$_initDeferred4$ = _this$_initDeferred4.reject) === null || _this$_initDeferred4$ === void 0 || _this$_initDeferred4$.call(_this$_initDeferred4, error);
|
|
589
|
-
throw error;
|
|
590
|
-
case 22:
|
|
591
|
-
case "end":
|
|
592
|
-
return _context6.stop();
|
|
593
|
-
}
|
|
594
|
-
}, _callee6, this, [[8, 17]]);
|
|
595
|
-
}));
|
|
596
|
-
function handleInitValidationError(_x5) {
|
|
597
|
-
return _handleInitValidationError.apply(this, arguments);
|
|
598
|
-
}
|
|
599
|
-
return handleInitValidationError;
|
|
600
|
-
}()
|
|
601
|
-
/**
|
|
602
|
-
* Get token from local storage or request it if necessary.
|
|
603
|
-
* Can redirect to login page.
|
|
604
|
-
* @return {Promise.<string>}
|
|
605
|
-
*/
|
|
606
|
-
}, {
|
|
607
|
-
key: "requestToken",
|
|
608
|
-
value: (function () {
|
|
609
|
-
var _requestToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
610
|
-
var _this$_initDeferred5, _yield$this$_tokenVal, _this$_tokenValidator3;
|
|
611
|
-
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
612
|
-
while (1) switch (_context7.prev = _context7.next) {
|
|
613
|
-
case 0:
|
|
614
|
-
if (!this._postponed) {
|
|
615
|
-
_context7.next = 2;
|
|
616
|
-
break;
|
|
617
|
-
}
|
|
618
|
-
throw new Error('You should log in to be able to make requests');
|
|
619
|
-
case 2:
|
|
620
|
-
_context7.prev = 2;
|
|
621
|
-
_context7.next = 5;
|
|
622
|
-
return (_this$_initDeferred5 = this._initDeferred) === null || _this$_initDeferred5 === void 0 ? void 0 : _this$_initDeferred5.promise;
|
|
623
|
-
case 5:
|
|
624
|
-
if (!Auth.storageIsUnavailable) {
|
|
625
|
-
_context7.next = 7;
|
|
626
|
-
break;
|
|
627
|
-
}
|
|
628
|
-
return _context7.abrupt("return", null);
|
|
629
|
-
case 7:
|
|
630
|
-
_context7.next = 9;
|
|
631
|
-
return (_this$_tokenValidator3 = this._tokenValidator) === null || _this$_tokenValidator3 === void 0 ? void 0 : _this$_tokenValidator3.validateTokenLocally();
|
|
632
|
-
case 9:
|
|
633
|
-
_context7.t1 = _yield$this$_tokenVal = _context7.sent;
|
|
634
|
-
_context7.t0 = _context7.t1 !== null;
|
|
635
|
-
if (!_context7.t0) {
|
|
636
|
-
_context7.next = 13;
|
|
637
|
-
break;
|
|
638
|
-
}
|
|
639
|
-
_context7.t0 = _yield$this$_tokenVal !== void 0;
|
|
640
|
-
case 13:
|
|
641
|
-
if (!_context7.t0) {
|
|
642
|
-
_context7.next = 17;
|
|
643
|
-
break;
|
|
644
|
-
}
|
|
645
|
-
_context7.t2 = _yield$this$_tokenVal;
|
|
646
|
-
_context7.next = 18;
|
|
647
|
-
break;
|
|
648
|
-
case 17:
|
|
649
|
-
_context7.t2 = null;
|
|
650
|
-
case 18:
|
|
651
|
-
return _context7.abrupt("return", _context7.t2);
|
|
652
|
-
case 21:
|
|
653
|
-
_context7.prev = 21;
|
|
654
|
-
_context7.t3 = _context7["catch"](2);
|
|
655
|
-
return _context7.abrupt("return", this.forceTokenUpdate());
|
|
656
|
-
case 24:
|
|
657
|
-
case "end":
|
|
658
|
-
return _context7.stop();
|
|
659
|
-
}
|
|
660
|
-
}, _callee7, this, [[2, 21]]);
|
|
661
|
-
}));
|
|
662
|
-
function requestToken() {
|
|
663
|
-
return _requestToken.apply(this, arguments);
|
|
664
|
-
}
|
|
665
|
-
return requestToken;
|
|
666
|
-
}()
|
|
667
|
-
/**
|
|
668
|
-
* Get new token in the background or redirect to the login page.
|
|
669
|
-
* @return {Promise.<string>}
|
|
670
|
-
*/
|
|
671
|
-
)
|
|
672
|
-
}, {
|
|
673
|
-
key: "forceTokenUpdate",
|
|
674
|
-
value: (function () {
|
|
675
|
-
var _forceTokenUpdate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
676
|
-
var _this4 = this;
|
|
677
|
-
var _yield$this$_backgrou, _this$_backgroundFlow2, _this$_requestBuilder2, authRequest;
|
|
678
|
-
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
679
|
-
while (1) switch (_context9.prev = _context9.next) {
|
|
680
|
-
case 0:
|
|
681
|
-
_context9.prev = 0;
|
|
682
|
-
if (!this._backendCheckPromise) {
|
|
683
|
-
this._backendCheckPromise = this._checkBackendsStatusesIfEnabled();
|
|
684
|
-
}
|
|
685
|
-
_context9.next = 4;
|
|
686
|
-
return this._backendCheckPromise;
|
|
687
|
-
case 4:
|
|
688
|
-
_context9.next = 9;
|
|
689
|
-
break;
|
|
690
|
-
case 6:
|
|
691
|
-
_context9.prev = 6;
|
|
692
|
-
_context9.t0 = _context9["catch"](0);
|
|
693
|
-
throw new Error('Cannot refresh token: backend is not available. Postponed by user.');
|
|
694
|
-
case 9:
|
|
695
|
-
_context9.prev = 9;
|
|
696
|
-
this._backendCheckPromise = null;
|
|
697
|
-
return _context9.finish(9);
|
|
698
|
-
case 12:
|
|
699
|
-
_context9.prev = 12;
|
|
700
|
-
_context9.next = 15;
|
|
701
|
-
return (_this$_backgroundFlow2 = this._backgroundFlow) === null || _this$_backgroundFlow2 === void 0 ? void 0 : _this$_backgroundFlow2.authorize();
|
|
702
|
-
case 15:
|
|
703
|
-
_context9.t2 = _yield$this$_backgrou = _context9.sent;
|
|
704
|
-
_context9.t1 = _context9.t2 !== null;
|
|
705
|
-
if (!_context9.t1) {
|
|
706
|
-
_context9.next = 19;
|
|
707
|
-
break;
|
|
708
|
-
}
|
|
709
|
-
_context9.t1 = _yield$this$_backgrou !== void 0;
|
|
710
|
-
case 19:
|
|
711
|
-
if (!_context9.t1) {
|
|
712
|
-
_context9.next = 23;
|
|
713
|
-
break;
|
|
714
|
-
}
|
|
715
|
-
_context9.t3 = _yield$this$_backgrou;
|
|
716
|
-
_context9.next = 24;
|
|
717
|
-
break;
|
|
718
|
-
case 23:
|
|
719
|
-
_context9.t3 = null;
|
|
720
|
-
case 24:
|
|
721
|
-
return _context9.abrupt("return", _context9.t3);
|
|
722
|
-
case 27:
|
|
723
|
-
_context9.prev = 27;
|
|
724
|
-
_context9.t4 = _context9["catch"](12);
|
|
725
|
-
if (_context9.t4 instanceof Error) {
|
|
726
|
-
_context9.next = 31;
|
|
727
|
-
break;
|
|
728
|
-
}
|
|
729
|
-
return _context9.abrupt("return", null);
|
|
730
|
-
case 31:
|
|
731
|
-
if (!this._canShowDialogs()) {
|
|
732
|
-
_context9.next = 35;
|
|
733
|
-
break;
|
|
734
|
-
}
|
|
735
|
-
return _context9.abrupt("return", new Promise(function (resolve) {
|
|
736
|
-
var onTryAgain = /*#__PURE__*/function () {
|
|
737
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
738
|
-
var _this4$_backgroundFlo, result;
|
|
739
|
-
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
740
|
-
while (1) switch (_context8.prev = _context8.next) {
|
|
741
|
-
case 0:
|
|
742
|
-
_context8.prev = 0;
|
|
743
|
-
_context8.next = 3;
|
|
744
|
-
return (_this4$_backgroundFlo = _this4._backgroundFlow) === null || _this4$_backgroundFlo === void 0 ? void 0 : _this4$_backgroundFlo.authorize();
|
|
745
|
-
case 3:
|
|
746
|
-
result = _context8.sent;
|
|
747
|
-
resolve(result !== null && result !== void 0 ? result : null);
|
|
748
|
-
_context8.next = 11;
|
|
749
|
-
break;
|
|
750
|
-
case 7:
|
|
751
|
-
_context8.prev = 7;
|
|
752
|
-
_context8.t0 = _context8["catch"](0);
|
|
753
|
-
if (_context8.t0 instanceof Error) {
|
|
754
|
-
_this4._showAuthDialog({
|
|
755
|
-
nonInteractive: true,
|
|
756
|
-
error: _context8.t0,
|
|
757
|
-
onTryAgain
|
|
758
|
-
});
|
|
759
|
-
}
|
|
760
|
-
throw _context8.t0;
|
|
761
|
-
case 11:
|
|
762
|
-
case "end":
|
|
763
|
-
return _context8.stop();
|
|
764
|
-
}
|
|
765
|
-
}, _callee8, null, [[0, 7]]);
|
|
766
|
-
}));
|
|
767
|
-
return function onTryAgain() {
|
|
768
|
-
return _ref4.apply(this, arguments);
|
|
769
|
-
};
|
|
770
|
-
}();
|
|
771
|
-
_this4._showAuthDialog({
|
|
772
|
-
nonInteractive: true,
|
|
773
|
-
error: _context9.t4,
|
|
774
|
-
onTryAgain
|
|
775
|
-
});
|
|
776
|
-
}));
|
|
777
|
-
case 35:
|
|
778
|
-
_context9.next = 37;
|
|
779
|
-
return (_this$_requestBuilder2 = this._requestBuilder) === null || _this$_requestBuilder2 === void 0 ? void 0 : _this$_requestBuilder2.prepareAuthRequest();
|
|
780
|
-
case 37:
|
|
781
|
-
authRequest = _context9.sent;
|
|
782
|
-
if (authRequest != null) {
|
|
783
|
-
this._redirectCurrentPage(authRequest.url);
|
|
784
|
-
}
|
|
785
|
-
case 39:
|
|
786
|
-
throw new TokenValidator.TokenValidationError(_context9.t4.message);
|
|
787
|
-
case 40:
|
|
788
|
-
case "end":
|
|
789
|
-
return _context9.stop();
|
|
790
|
-
}
|
|
791
|
-
}, _callee9, this, [[0, 6, 9, 12], [12, 27]]);
|
|
792
|
-
}));
|
|
793
|
-
function forceTokenUpdate() {
|
|
794
|
-
return _forceTokenUpdate.apply(this, arguments);
|
|
795
|
-
}
|
|
796
|
-
return forceTokenUpdate;
|
|
797
|
-
}())
|
|
798
|
-
}, {
|
|
799
|
-
key: "loadCurrentService",
|
|
800
|
-
value: function () {
|
|
801
|
-
var _loadCurrentService = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
802
|
-
var _ref5, serviceName, serviceImage;
|
|
803
|
-
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
804
|
-
while (1) switch (_context10.prev = _context10.next) {
|
|
805
|
-
case 0:
|
|
806
|
-
if (!this._service.serviceName) {
|
|
807
|
-
_context10.next = 2;
|
|
808
|
-
break;
|
|
809
|
-
}
|
|
810
|
-
return _context10.abrupt("return");
|
|
811
|
-
case 2:
|
|
812
|
-
_context10.prev = 2;
|
|
813
|
-
_context10.next = 5;
|
|
814
|
-
return this.http.get("oauth2/interactive/login/settings?client_id=".concat(this.config.clientId));
|
|
815
|
-
case 5:
|
|
816
|
-
_context10.t0 = _context10.sent;
|
|
817
|
-
if (_context10.t0) {
|
|
818
|
-
_context10.next = 8;
|
|
819
|
-
break;
|
|
820
|
-
}
|
|
821
|
-
_context10.t0 = {};
|
|
822
|
-
case 8:
|
|
823
|
-
_ref5 = _context10.t0;
|
|
824
|
-
serviceName = _ref5.serviceName;
|
|
825
|
-
serviceImage = _ref5.iconUrl;
|
|
826
|
-
this.setCurrentService({
|
|
827
|
-
serviceImage,
|
|
828
|
-
serviceName
|
|
829
|
-
});
|
|
830
|
-
_context10.next = 16;
|
|
831
|
-
break;
|
|
832
|
-
case 14:
|
|
833
|
-
_context10.prev = 14;
|
|
834
|
-
_context10.t1 = _context10["catch"](2);
|
|
835
|
-
case 16:
|
|
836
|
-
case "end":
|
|
837
|
-
return _context10.stop();
|
|
838
|
-
}
|
|
839
|
-
}, _callee10, this, [[2, 14]]);
|
|
840
|
-
}));
|
|
841
|
-
function loadCurrentService() {
|
|
842
|
-
return _loadCurrentService.apply(this, arguments);
|
|
843
|
-
}
|
|
844
|
-
return loadCurrentService;
|
|
845
|
-
}()
|
|
846
|
-
}, {
|
|
847
|
-
key: "getAPIPath",
|
|
848
|
-
value: function getAPIPath() {
|
|
849
|
-
return this.config.serverUri + Auth.API_PATH;
|
|
850
|
-
}
|
|
851
|
-
/**
|
|
852
|
-
* @return {Promise.<object>}
|
|
853
|
-
*/
|
|
854
|
-
}, {
|
|
855
|
-
key: "getUser",
|
|
856
|
-
value: function getUser(accessToken) {
|
|
857
|
-
var _this5 = this;
|
|
858
|
-
if (this.config.cacheCurrentUser) {
|
|
859
|
-
var _this$_storage6;
|
|
860
|
-
return (_this$_storage6 = this._storage) === null || _this$_storage6 === void 0 ? void 0 : _this$_storage6.getCachedUser(function () {
|
|
861
|
-
return _this5.http.authorizedFetch(Auth.API_PROFILE_PATH, accessToken, _this5.config.userParams);
|
|
862
|
-
});
|
|
863
|
-
} else {
|
|
864
|
-
return this.http.authorizedFetch(Auth.API_PROFILE_PATH, accessToken, this.config.userParams);
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
/**
|
|
868
|
-
* @return {Promise.<object>}
|
|
869
|
-
*/
|
|
870
|
-
}, {
|
|
871
|
-
key: "requestUser",
|
|
872
|
-
value: (function () {
|
|
873
|
-
var _requestUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
874
|
-
var accessToken, user;
|
|
875
|
-
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
876
|
-
while (1) switch (_context11.prev = _context11.next) {
|
|
877
|
-
case 0:
|
|
878
|
-
if (!this.user) {
|
|
879
|
-
_context11.next = 2;
|
|
880
|
-
break;
|
|
881
|
-
}
|
|
882
|
-
return _context11.abrupt("return", this.user);
|
|
883
|
-
case 2:
|
|
884
|
-
_context11.next = 4;
|
|
885
|
-
return this.requestToken();
|
|
886
|
-
case 4:
|
|
887
|
-
accessToken = _context11.sent;
|
|
888
|
-
if (!this.user) {
|
|
889
|
-
_context11.next = 7;
|
|
890
|
-
break;
|
|
891
|
-
}
|
|
892
|
-
return _context11.abrupt("return", this.user);
|
|
893
|
-
case 7:
|
|
894
|
-
_context11.next = 9;
|
|
895
|
-
return this.getUser(accessToken);
|
|
896
|
-
case 9:
|
|
897
|
-
user = _context11.sent;
|
|
898
|
-
this.user = user;
|
|
899
|
-
return _context11.abrupt("return", user);
|
|
900
|
-
case 12:
|
|
901
|
-
case "end":
|
|
902
|
-
return _context11.stop();
|
|
903
|
-
}
|
|
904
|
-
}, _callee11, this);
|
|
905
|
-
}));
|
|
906
|
-
function requestUser() {
|
|
907
|
-
return _requestUser.apply(this, arguments);
|
|
908
|
-
}
|
|
909
|
-
return requestUser;
|
|
910
|
-
}())
|
|
911
|
-
}, {
|
|
912
|
-
key: "updateUser",
|
|
913
|
-
value: function () {
|
|
914
|
-
var _updateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
915
|
-
var _this$_storage7;
|
|
916
|
-
var accessToken, user;
|
|
917
|
-
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
918
|
-
while (1) switch (_context12.prev = _context12.next) {
|
|
919
|
-
case 0:
|
|
920
|
-
this._setPostponed(false);
|
|
921
|
-
_context12.next = 3;
|
|
922
|
-
return this.requestToken();
|
|
923
|
-
case 3:
|
|
924
|
-
accessToken = _context12.sent;
|
|
925
|
-
(_this$_storage7 = this._storage) === null || _this$_storage7 === void 0 || _this$_storage7.wipeCachedCurrentUser();
|
|
926
|
-
_context12.next = 7;
|
|
927
|
-
return this.getUser(accessToken);
|
|
928
|
-
case 7:
|
|
929
|
-
user = _context12.sent;
|
|
930
|
-
this.user = user;
|
|
931
|
-
this.listeners.trigger(USER_CHANGED_EVENT, user);
|
|
932
|
-
case 10:
|
|
933
|
-
case "end":
|
|
934
|
-
return _context12.stop();
|
|
935
|
-
}
|
|
936
|
-
}, _callee12, this);
|
|
937
|
-
}));
|
|
938
|
-
function updateUser() {
|
|
939
|
-
return _updateUser.apply(this, arguments);
|
|
940
|
-
}
|
|
941
|
-
return updateUser;
|
|
942
|
-
}()
|
|
943
|
-
}, {
|
|
944
|
-
key: "_detectUserChange",
|
|
945
|
-
value: function () {
|
|
946
|
-
var _detectUserChange2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(accessToken) {
|
|
947
|
-
var _this6 = this;
|
|
948
|
-
var windowWasOpen, user, onApply;
|
|
949
|
-
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
950
|
-
while (1) switch (_context13.prev = _context13.next) {
|
|
951
|
-
case 0:
|
|
952
|
-
windowWasOpen = this._isLoginWindowOpen;
|
|
953
|
-
_context13.next = 3;
|
|
954
|
-
return this.getUser(accessToken);
|
|
955
|
-
case 3:
|
|
956
|
-
user = _context13.sent;
|
|
957
|
-
onApply = function onApply() {
|
|
958
|
-
_this6.user = user;
|
|
959
|
-
_this6.listeners.trigger(USER_CHANGED_EVENT, user);
|
|
960
|
-
};
|
|
961
|
-
if (!(user && this.user && this.user.id !== user.id)) {
|
|
962
|
-
_context13.next = 14;
|
|
963
|
-
break;
|
|
964
|
-
}
|
|
965
|
-
if (!(!this._canShowDialogs() || this.user.guest || windowWasOpen)) {
|
|
966
|
-
_context13.next = 9;
|
|
967
|
-
break;
|
|
968
|
-
}
|
|
969
|
-
onApply();
|
|
970
|
-
return _context13.abrupt("return");
|
|
971
|
-
case 9:
|
|
972
|
-
if (!user.guest) {
|
|
973
|
-
_context13.next = 12;
|
|
974
|
-
break;
|
|
975
|
-
}
|
|
976
|
-
this._showAuthDialog({
|
|
977
|
-
nonInteractive: true
|
|
978
|
-
});
|
|
979
|
-
return _context13.abrupt("return");
|
|
980
|
-
case 12:
|
|
981
|
-
_context13.next = 14;
|
|
982
|
-
return this._showUserChangedDialog({
|
|
983
|
-
newUser: user,
|
|
984
|
-
onApply,
|
|
985
|
-
onPostpone: function onPostpone() {
|
|
986
|
-
_this6.listeners.trigger(USER_CHANGE_POSTPONED_EVENT);
|
|
987
|
-
_this6.config.onPostponeChangedUser(_this6.user, user);
|
|
988
|
-
}
|
|
989
|
-
});
|
|
990
|
-
case 14:
|
|
991
|
-
case "end":
|
|
992
|
-
return _context13.stop();
|
|
993
|
-
}
|
|
994
|
-
}, _callee13, this);
|
|
995
|
-
}));
|
|
996
|
-
function _detectUserChange(_x6) {
|
|
997
|
-
return _detectUserChange2.apply(this, arguments);
|
|
998
|
-
}
|
|
999
|
-
return _detectUserChange;
|
|
1000
|
-
}()
|
|
1001
|
-
}, {
|
|
1002
|
-
key: "_beforeLogout",
|
|
1003
|
-
value: function _beforeLogout(params) {
|
|
1004
|
-
if (this._canShowDialogs()) {
|
|
1005
|
-
this._showAuthDialog(params);
|
|
1006
|
-
return;
|
|
1007
|
-
}
|
|
1008
|
-
this.logout();
|
|
1009
|
-
}
|
|
1010
|
-
}, {
|
|
1011
|
-
key: "_showAuthDialog",
|
|
1012
|
-
value: function _showAuthDialog() {
|
|
1013
|
-
var _this$user2,
|
|
1014
|
-
_this7 = this,
|
|
1015
|
-
_this$_authDialogServ,
|
|
1016
|
-
_this$_storage8,
|
|
1017
|
-
_this$_storage9;
|
|
1018
|
-
var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
1019
|
-
nonInteractive = _ref6.nonInteractive,
|
|
1020
|
-
error = _ref6.error,
|
|
1021
|
-
canCancel = _ref6.canCancel,
|
|
1022
|
-
onTryAgain = _ref6.onTryAgain;
|
|
1023
|
-
var _this$config2 = this.config,
|
|
1024
|
-
embeddedLogin = _this$config2.embeddedLogin,
|
|
1025
|
-
onPostponeLogout = _this$config2.onPostponeLogout,
|
|
1026
|
-
translations = _this$config2.translations;
|
|
1027
|
-
var cancelable = ((_this$user2 = this.user) === null || _this$user2 === void 0 ? void 0 : _this$user2.guest) || canCancel;
|
|
1028
|
-
var actualTranslations = translations !== null && translations !== void 0 ? translations : getTranslations();
|
|
1029
|
-
this._createInitDeferred();
|
|
1030
|
-
var closeDialog = function closeDialog() {
|
|
1031
|
-
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
1032
|
-
stopTokenListening === null || stopTokenListening === void 0 || stopTokenListening();
|
|
1033
|
-
stopMessageListening === null || stopMessageListening === void 0 || stopMessageListening();
|
|
1034
|
-
hide === null || hide === void 0 || hide();
|
|
1035
|
-
/* eslint-enable @typescript-eslint/no-use-before-define */
|
|
1036
|
-
};
|
|
1037
|
-
var onConfirm = function onConfirm() {
|
|
1038
|
-
if (!embeddedLogin) {
|
|
1039
|
-
closeDialog();
|
|
1040
|
-
_this7.logout();
|
|
1041
|
-
return;
|
|
1042
|
-
}
|
|
1043
|
-
_this7._runEmbeddedLogin();
|
|
1044
|
-
};
|
|
1045
|
-
var onCancel = function onCancel() {
|
|
1046
|
-
var _this7$_embeddedFlow, _this7$_storage, _this7$user;
|
|
1047
|
-
(_this7$_embeddedFlow = _this7._embeddedFlow) === null || _this7$_embeddedFlow === void 0 || _this7$_embeddedFlow.stop();
|
|
1048
|
-
(_this7$_storage = _this7._storage) === null || _this7$_storage === void 0 || _this7$_storage.sendMessage(Auth.CLOSE_WINDOW_MESSAGE, Date.now());
|
|
1049
|
-
closeDialog();
|
|
1050
|
-
if (!cancelable) {
|
|
1051
|
-
var _this7$_initDeferred, _this7$_initDeferred$;
|
|
1052
|
-
(_this7$_initDeferred = _this7._initDeferred) === null || _this7$_initDeferred === void 0 || (_this7$_initDeferred$ = _this7$_initDeferred.resolve) === null || _this7$_initDeferred$ === void 0 || _this7$_initDeferred$.call(_this7$_initDeferred);
|
|
1053
|
-
_this7.listeners.trigger(LOGOUT_POSTPONED_EVENT);
|
|
1054
|
-
onPostponeLogout();
|
|
1055
|
-
return;
|
|
1056
|
-
}
|
|
1057
|
-
if ((_this7$user = _this7.user) !== null && _this7$user !== void 0 && _this7$user.guest && nonInteractive) {
|
|
1058
|
-
_this7.forceTokenUpdate();
|
|
1059
|
-
} else {
|
|
1060
|
-
var _this7$_initDeferred2, _this7$_initDeferred3;
|
|
1061
|
-
(_this7$_initDeferred2 = _this7._initDeferred) === null || _this7$_initDeferred2 === void 0 || (_this7$_initDeferred3 = _this7$_initDeferred2.resolve) === null || _this7$_initDeferred3 === void 0 || _this7$_initDeferred3.call(_this7$_initDeferred2);
|
|
1062
|
-
}
|
|
1063
|
-
};
|
|
1064
|
-
var onTryAgainClick = /*#__PURE__*/function () {
|
|
1065
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
|
|
1066
|
-
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
1067
|
-
while (1) switch (_context14.prev = _context14.next) {
|
|
1068
|
-
case 0:
|
|
1069
|
-
_context14.next = 2;
|
|
1070
|
-
return onTryAgain === null || onTryAgain === void 0 ? void 0 : onTryAgain();
|
|
1071
|
-
case 2:
|
|
1072
|
-
closeDialog();
|
|
1073
|
-
case 3:
|
|
1074
|
-
case "end":
|
|
1075
|
-
return _context14.stop();
|
|
1076
|
-
}
|
|
1077
|
-
}, _callee14);
|
|
1078
|
-
}));
|
|
1079
|
-
return function onTryAgainClick() {
|
|
1080
|
-
return _ref7.apply(this, arguments);
|
|
1081
|
-
};
|
|
1082
|
-
}();
|
|
1083
|
-
var hide = (_this$_authDialogServ = this._authDialogService) === null || _this$_authDialogServ === void 0 ? void 0 : _this$_authDialogServ.call(this, _objectSpread2(_objectSpread2({}, this._service), {}, {
|
|
1084
|
-
loginCaption: actualTranslations.login,
|
|
1085
|
-
loginToCaption: actualTranslations.loginTo,
|
|
1086
|
-
confirmLabel: actualTranslations.login,
|
|
1087
|
-
tryAgainLabel: actualTranslations.tryAgainLabel,
|
|
1088
|
-
cancelLabel: cancelable ? actualTranslations.cancel : actualTranslations.postpone,
|
|
1089
|
-
errorMessage: this._extractErrorMessage(error, true),
|
|
1090
|
-
onConfirm,
|
|
1091
|
-
onCancel,
|
|
1092
|
-
onTryAgain: onTryAgain ? onTryAgainClick : undefined
|
|
1093
|
-
}));
|
|
1094
|
-
var stopTokenListening = (_this$_storage8 = this._storage) === null || _this$_storage8 === void 0 ? void 0 : _this$_storage8.onTokenChange(function (token) {
|
|
1095
|
-
if (token) {
|
|
1096
|
-
var _this7$_initDeferred4, _this7$_initDeferred5;
|
|
1097
|
-
closeDialog();
|
|
1098
|
-
(_this7$_initDeferred4 = _this7._initDeferred) === null || _this7$_initDeferred4 === void 0 || (_this7$_initDeferred5 = _this7$_initDeferred4.resolve) === null || _this7$_initDeferred5 === void 0 || _this7$_initDeferred5.call(_this7$_initDeferred4);
|
|
1099
|
-
}
|
|
1100
|
-
});
|
|
1101
|
-
var stopMessageListening = (_this$_storage9 = this._storage) === null || _this$_storage9 === void 0 ? void 0 : _this$_storage9.onMessage(Auth.CLOSE_WINDOW_MESSAGE, function () {
|
|
1102
|
-
var _this7$_embeddedFlow2;
|
|
1103
|
-
return (_this7$_embeddedFlow2 = _this7._embeddedFlow) === null || _this7$_embeddedFlow2 === void 0 ? void 0 : _this7$_embeddedFlow2.stop();
|
|
1104
|
-
});
|
|
1105
|
-
}
|
|
1106
|
-
}, {
|
|
1107
|
-
key: "_showUserChangedDialog",
|
|
1108
|
-
value: function _showUserChangedDialog(_ref8) {
|
|
1109
|
-
var _this8 = this,
|
|
1110
|
-
_this$_authDialogServ2,
|
|
1111
|
-
_translations$youHave,
|
|
1112
|
-
_newUser$name,
|
|
1113
|
-
_newUser$name2,
|
|
1114
|
-
_translations$login,
|
|
1115
|
-
_translations$loginTo,
|
|
1116
|
-
_translations$applyCh,
|
|
1117
|
-
_translations$tryAgai,
|
|
1118
|
-
_translations$postpon;
|
|
1119
|
-
var newUser = _ref8.newUser,
|
|
1120
|
-
onApply = _ref8.onApply,
|
|
1121
|
-
onPostpone = _ref8.onPostpone;
|
|
1122
|
-
var translations = this.config.translations;
|
|
1123
|
-
this._createInitDeferred();
|
|
1124
|
-
var done = function done() {
|
|
1125
|
-
var _this8$_initDeferred, _this8$_initDeferred$;
|
|
1126
|
-
(_this8$_initDeferred = _this8._initDeferred) === null || _this8$_initDeferred === void 0 || (_this8$_initDeferred$ = _this8$_initDeferred.resolve) === null || _this8$_initDeferred$ === void 0 || _this8$_initDeferred$.call(_this8$_initDeferred);
|
|
1127
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
1128
|
-
hide === null || hide === void 0 || hide();
|
|
1129
|
-
};
|
|
1130
|
-
var hide = (_this$_authDialogServ2 = this._authDialogService) === null || _this$_authDialogServ2 === void 0 ? void 0 : _this$_authDialogServ2.call(this, _objectSpread2(_objectSpread2({}, this._service), {}, {
|
|
1131
|
-
title: (_translations$youHave = translations === null || translations === void 0 ? void 0 : translations.youHaveLoggedInAs) !== null && _translations$youHave !== void 0 ? _translations$youHave : translate('youHaveLoggedInAs').replace('%userName%', (_newUser$name = newUser.name) !== null && _newUser$name !== void 0 ? _newUser$name : '').replace('{{userName}}', (_newUser$name2 = newUser.name) !== null && _newUser$name2 !== void 0 ? _newUser$name2 : ''),
|
|
1132
|
-
loginCaption: (_translations$login = translations === null || translations === void 0 ? void 0 : translations.login) !== null && _translations$login !== void 0 ? _translations$login : translate('login'),
|
|
1133
|
-
loginToCaption: (_translations$loginTo = translations === null || translations === void 0 ? void 0 : translations.loginTo) !== null && _translations$loginTo !== void 0 ? _translations$loginTo : translate('loginTo'),
|
|
1134
|
-
confirmLabel: (_translations$applyCh = translations === null || translations === void 0 ? void 0 : translations.applyChange) !== null && _translations$applyCh !== void 0 ? _translations$applyCh : translate('applyChange'),
|
|
1135
|
-
tryAgainLabel: (_translations$tryAgai = translations === null || translations === void 0 ? void 0 : translations.tryAgainLabel) !== null && _translations$tryAgai !== void 0 ? _translations$tryAgai : translate('tryAgainLabel'),
|
|
1136
|
-
cancelLabel: (_translations$postpon = translations === null || translations === void 0 ? void 0 : translations.postpone) !== null && _translations$postpon !== void 0 ? _translations$postpon : translate('postpone'),
|
|
1137
|
-
onConfirm: function onConfirm() {
|
|
1138
|
-
done();
|
|
1139
|
-
onApply();
|
|
1140
|
-
},
|
|
1141
|
-
onCancel: function onCancel() {
|
|
1142
|
-
done();
|
|
1143
|
-
onPostpone();
|
|
1144
|
-
}
|
|
1145
|
-
}));
|
|
1146
|
-
}
|
|
1147
|
-
}, {
|
|
1148
|
-
key: "_extractErrorMessage",
|
|
1149
|
-
value: function _extractErrorMessage(error) {
|
|
1150
|
-
var logError = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1151
|
-
if (!error) {
|
|
1152
|
-
return null;
|
|
1153
|
-
}
|
|
1154
|
-
if (logError) {
|
|
1155
|
-
// eslint-disable-next-line no-console
|
|
1156
|
-
console.error('RingUI Auth error', error);
|
|
1157
|
-
}
|
|
1158
|
-
try {
|
|
1159
|
-
// We've got some error from this list
|
|
1160
|
-
// https://www.jetbrains.com/help/youtrack/devportal/OAuth-2.0-Errors.html
|
|
1161
|
-
if ('code' in error && error.code && typeof error.code === 'object' && 'code' in error.code && typeof error.code.code === 'string') {
|
|
1162
|
-
var readableCode = error.code.code.split('_').join(' ');
|
|
1163
|
-
return "Authorization error: ".concat(readableCode);
|
|
1164
|
-
}
|
|
1165
|
-
} catch (_unused) {
|
|
1166
|
-
// noop
|
|
1167
|
-
}
|
|
1168
|
-
return error.toString ? error.toString() : null;
|
|
1169
|
-
}
|
|
1170
|
-
}, {
|
|
1171
|
-
key: "_showBackendDownDialog",
|
|
1172
|
-
value: function _showBackendDownDialog(backendError) {
|
|
1173
|
-
var _this9 = this;
|
|
1174
|
-
var _this$config3 = this.config,
|
|
1175
|
-
onBackendDown = _this$config3.onBackendDown,
|
|
1176
|
-
translations = _this$config3.translations;
|
|
1177
|
-
var REPEAT_TIMEOUT = 5000;
|
|
1178
|
-
var timerId;
|
|
1179
|
-
return new Promise(function (resolve, reject) {
|
|
1180
|
-
var _this9$_storage2;
|
|
1181
|
-
var done = function done() {
|
|
1182
|
-
var _this9$_storage;
|
|
1183
|
-
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
1184
|
-
hide();
|
|
1185
|
-
window.removeEventListener('online', onCheckAgain);
|
|
1186
|
-
stopListeningCloseMessage === null || stopListeningCloseMessage === void 0 || stopListeningCloseMessage();
|
|
1187
|
-
/* eslint-enable @typescript-eslint/no-use-before-define */
|
|
1188
|
-
(_this9$_storage = _this9._storage) === null || _this9$_storage === void 0 || _this9$_storage.sendMessage(Auth.CLOSE_BACKEND_DOWN_MESSAGE, Date.now());
|
|
1189
|
-
clearTimeout(timerId);
|
|
1190
|
-
};
|
|
1191
|
-
var stopListeningCloseMessage = (_this9$_storage2 = _this9._storage) === null || _this9$_storage2 === void 0 ? void 0 : _this9$_storage2.onMessage(Auth.CLOSE_BACKEND_DOWN_MESSAGE, function () {
|
|
1192
|
-
stopListeningCloseMessage === null || stopListeningCloseMessage === void 0 || stopListeningCloseMessage();
|
|
1193
|
-
done();
|
|
1194
|
-
resolve();
|
|
1195
|
-
});
|
|
1196
|
-
var onCheckAgain = /*#__PURE__*/function () {
|
|
1197
|
-
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
|
|
1198
|
-
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
1199
|
-
while (1) switch (_context15.prev = _context15.next) {
|
|
1200
|
-
case 0:
|
|
1201
|
-
_context15.next = 2;
|
|
1202
|
-
return _this9._checkBackendsAreUp();
|
|
1203
|
-
case 2:
|
|
1204
|
-
done();
|
|
1205
|
-
resolve();
|
|
1206
|
-
case 4:
|
|
1207
|
-
case "end":
|
|
1208
|
-
return _context15.stop();
|
|
1209
|
-
}
|
|
1210
|
-
}, _callee15);
|
|
1211
|
-
}));
|
|
1212
|
-
return function onCheckAgain() {
|
|
1213
|
-
return _ref9.apply(this, arguments);
|
|
1214
|
-
};
|
|
1215
|
-
}();
|
|
1216
|
-
var onPostpone = function onPostpone() {
|
|
1217
|
-
done();
|
|
1218
|
-
reject(new Error('Auth(@jetbrains/ring-ui): postponed by user'));
|
|
1219
|
-
};
|
|
1220
|
-
var hide = onBackendDown({
|
|
1221
|
-
onCheckAgain,
|
|
1222
|
-
onPostpone,
|
|
1223
|
-
backendError,
|
|
1224
|
-
translations: translations !== null && translations !== void 0 ? translations : getTranslationsWithFallback()
|
|
1225
|
-
});
|
|
1226
|
-
window.addEventListener('online', onCheckAgain);
|
|
1227
|
-
function networkWatchdog() {
|
|
1228
|
-
if (navigator && navigator.onLine) {
|
|
1229
|
-
onCheckAgain();
|
|
1230
|
-
}
|
|
1231
|
-
timerId = window.setTimeout(networkWatchdog, REPEAT_TIMEOUT);
|
|
1232
|
-
}
|
|
1233
|
-
timerId = window.setTimeout(networkWatchdog, REPEAT_TIMEOUT);
|
|
1234
|
-
});
|
|
1235
|
-
}
|
|
1236
|
-
/**
|
|
1237
|
-
* Wipe accessToken and redirect to auth page with required authorization
|
|
1238
|
-
*/
|
|
1239
|
-
}, {
|
|
1240
|
-
key: "logout",
|
|
1241
|
-
value: (function () {
|
|
1242
|
-
var _logout = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(extraParams) {
|
|
1243
|
-
var _this$_storage10, _this$_requestBuilder3;
|
|
1244
|
-
var requestParams, authRequest;
|
|
1245
|
-
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
1246
|
-
while (1) switch (_context16.prev = _context16.next) {
|
|
1247
|
-
case 0:
|
|
1248
|
-
requestParams = _objectSpread2({
|
|
1249
|
-
// eslint-disable-next-line camelcase
|
|
1250
|
-
request_credentials: 'required'
|
|
1251
|
-
}, extraParams);
|
|
1252
|
-
_context16.next = 3;
|
|
1253
|
-
return this._checkBackendsStatusesIfEnabled();
|
|
1254
|
-
case 3:
|
|
1255
|
-
_context16.next = 5;
|
|
1256
|
-
return this.listeners.trigger('logout');
|
|
1257
|
-
case 5:
|
|
1258
|
-
this._updateDomainUser(null);
|
|
1259
|
-
_context16.next = 8;
|
|
1260
|
-
return (_this$_storage10 = this._storage) === null || _this$_storage10 === void 0 ? void 0 : _this$_storage10.wipeToken();
|
|
1261
|
-
case 8:
|
|
1262
|
-
_context16.next = 10;
|
|
1263
|
-
return (_this$_requestBuilder3 = this._requestBuilder) === null || _this$_requestBuilder3 === void 0 ? void 0 : _this$_requestBuilder3.prepareAuthRequest(requestParams);
|
|
1264
|
-
case 10:
|
|
1265
|
-
authRequest = _context16.sent;
|
|
1266
|
-
if (authRequest != null) {
|
|
1267
|
-
this._redirectCurrentPage(authRequest.url);
|
|
1268
|
-
}
|
|
1269
|
-
case 12:
|
|
1270
|
-
case "end":
|
|
1271
|
-
return _context16.stop();
|
|
1272
|
-
}
|
|
1273
|
-
}, _callee16, this);
|
|
1274
|
-
}));
|
|
1275
|
-
function logout(_x7) {
|
|
1276
|
-
return _logout.apply(this, arguments);
|
|
1277
|
-
}
|
|
1278
|
-
return logout;
|
|
1279
|
-
}())
|
|
1280
|
-
}, {
|
|
1281
|
-
key: "_runEmbeddedLogin",
|
|
1282
|
-
value: function () {
|
|
1283
|
-
var _runEmbeddedLogin2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
|
|
1284
|
-
var _this$_storage11;
|
|
1285
|
-
var _this$_embeddedFlow;
|
|
1286
|
-
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
1287
|
-
while (1) switch (_context17.prev = _context17.next) {
|
|
1288
|
-
case 0:
|
|
1289
|
-
(_this$_storage11 = this._storage) === null || _this$_storage11 === void 0 || _this$_storage11.sendMessage(Auth.CLOSE_WINDOW_MESSAGE, Date.now());
|
|
1290
|
-
_context17.prev = 1;
|
|
1291
|
-
this._isLoginWindowOpen = true;
|
|
1292
|
-
_context17.next = 5;
|
|
1293
|
-
return (_this$_embeddedFlow = this._embeddedFlow) === null || _this$_embeddedFlow === void 0 ? void 0 : _this$_embeddedFlow.authorize();
|
|
1294
|
-
case 5:
|
|
1295
|
-
return _context17.abrupt("return", _context17.sent);
|
|
1296
|
-
case 8:
|
|
1297
|
-
_context17.prev = 8;
|
|
1298
|
-
_context17.t0 = _context17["catch"](1);
|
|
1299
|
-
throw _context17.t0;
|
|
1300
|
-
case 11:
|
|
1301
|
-
_context17.prev = 11;
|
|
1302
|
-
this._isLoginWindowOpen = false;
|
|
1303
|
-
return _context17.finish(11);
|
|
1304
|
-
case 14:
|
|
1305
|
-
case "end":
|
|
1306
|
-
return _context17.stop();
|
|
1307
|
-
}
|
|
1308
|
-
}, _callee17, this, [[1, 8, 11, 14]]);
|
|
1309
|
-
}));
|
|
1310
|
-
function _runEmbeddedLogin() {
|
|
1311
|
-
return _runEmbeddedLogin2.apply(this, arguments);
|
|
1312
|
-
}
|
|
1313
|
-
return _runEmbeddedLogin;
|
|
1314
|
-
}()
|
|
1315
|
-
/**
|
|
1316
|
-
* Wipe accessToken and redirect to auth page to obtain authorization data
|
|
1317
|
-
* if user is logged in or log her in otherwise
|
|
1318
|
-
*/
|
|
1319
|
-
}, {
|
|
1320
|
-
key: "login",
|
|
1321
|
-
value: (function () {
|
|
1322
|
-
var _login = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
|
1323
|
-
var _this$_backgroundFlow3, accessToken, _user;
|
|
1324
|
-
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
1325
|
-
while (1) switch (_context18.prev = _context18.next) {
|
|
1326
|
-
case 0:
|
|
1327
|
-
if (!this.config.embeddedLogin) {
|
|
1328
|
-
_context18.next = 4;
|
|
1329
|
-
break;
|
|
1330
|
-
}
|
|
1331
|
-
_context18.next = 3;
|
|
1332
|
-
return this._runEmbeddedLogin();
|
|
1333
|
-
case 3:
|
|
1334
|
-
return _context18.abrupt("return");
|
|
1335
|
-
case 4:
|
|
1336
|
-
_context18.next = 6;
|
|
1337
|
-
return this._checkBackendsStatusesIfEnabled();
|
|
1338
|
-
case 6:
|
|
1339
|
-
_context18.prev = 6;
|
|
1340
|
-
_context18.next = 9;
|
|
1341
|
-
return (_this$_backgroundFlow3 = this._backgroundFlow) === null || _this$_backgroundFlow3 === void 0 ? void 0 : _this$_backgroundFlow3.authorize();
|
|
1342
|
-
case 9:
|
|
1343
|
-
accessToken = _context18.sent;
|
|
1344
|
-
_context18.next = 12;
|
|
1345
|
-
return this.getUser(accessToken);
|
|
1346
|
-
case 12:
|
|
1347
|
-
_user = _context18.sent;
|
|
1348
|
-
if (_user.guest) {
|
|
1349
|
-
this._beforeLogout();
|
|
1350
|
-
} else {
|
|
1351
|
-
this.user = _user;
|
|
1352
|
-
this.listeners.trigger(USER_CHANGED_EVENT, _user);
|
|
1353
|
-
}
|
|
1354
|
-
_context18.next = 19;
|
|
1355
|
-
break;
|
|
1356
|
-
case 16:
|
|
1357
|
-
_context18.prev = 16;
|
|
1358
|
-
_context18.t0 = _context18["catch"](6);
|
|
1359
|
-
this._beforeLogout();
|
|
1360
|
-
case 19:
|
|
1361
|
-
case "end":
|
|
1362
|
-
return _context18.stop();
|
|
1363
|
-
}
|
|
1364
|
-
}, _callee18, this, [[6, 16]]);
|
|
1365
|
-
}));
|
|
1366
|
-
function login() {
|
|
1367
|
-
return _login.apply(this, arguments);
|
|
1368
|
-
}
|
|
1369
|
-
return login;
|
|
1370
|
-
}())
|
|
1371
|
-
}, {
|
|
1372
|
-
key: "switchUser",
|
|
1373
|
-
value: function () {
|
|
1374
|
-
var _switchUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
|
|
1375
|
-
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
1376
|
-
while (1) switch (_context19.prev = _context19.next) {
|
|
1377
|
-
case 0:
|
|
1378
|
-
if (this.config.embeddedLogin) {
|
|
1379
|
-
_context19.next = 2;
|
|
1380
|
-
break;
|
|
1381
|
-
}
|
|
1382
|
-
throw new Error('Auth: switchUser only supported for "embeddedLogin" mode');
|
|
1383
|
-
case 2:
|
|
1384
|
-
_context19.next = 4;
|
|
1385
|
-
return this._runEmbeddedLogin();
|
|
1386
|
-
case 4:
|
|
1387
|
-
case "end":
|
|
1388
|
-
return _context19.stop();
|
|
1389
|
-
}
|
|
1390
|
-
}, _callee19, this);
|
|
1391
|
-
}));
|
|
1392
|
-
function switchUser() {
|
|
1393
|
-
return _switchUser.apply(this, arguments);
|
|
1394
|
-
}
|
|
1395
|
-
return switchUser;
|
|
1396
|
-
}()
|
|
1397
|
-
}, {
|
|
1398
|
-
key: "_makeStateFromResponse",
|
|
1399
|
-
value: function _makeStateFromResponse(authResponse) {
|
|
1400
|
-
var state = authResponse.state;
|
|
1401
|
-
if (!state) {
|
|
1402
|
-
return {};
|
|
1403
|
-
}
|
|
1404
|
-
var defaultScope = this.config.scope;
|
|
1405
|
-
try {
|
|
1406
|
-
var urlFromState = new URL(state); // checking if state contains valid URL on same origin, see HUB-11514
|
|
1407
|
-
if (urlFromState.origin !== window.location.origin) {
|
|
1408
|
-
return {};
|
|
1409
|
-
}
|
|
1410
|
-
return {
|
|
1411
|
-
restoreLocation: state,
|
|
1412
|
-
created: Date.now(),
|
|
1413
|
-
scopes: defaultScope
|
|
1414
|
-
};
|
|
1415
|
-
} catch (e) {
|
|
1416
|
-
return {};
|
|
1417
|
-
}
|
|
1418
|
-
}
|
|
1419
|
-
/**
|
|
1420
|
-
* Check if the hash contains an access token.
|
|
1421
|
-
* If it does, extract the state, compare with
|
|
1422
|
-
* config, and store the auth response for later use.
|
|
1423
|
-
*
|
|
1424
|
-
* @return {Promise} promise that is resolved to restoreLocation URL, or rejected
|
|
1425
|
-
* @private
|
|
1426
|
-
*/
|
|
1427
|
-
}, {
|
|
1428
|
-
key: "_checkForAuthResponse",
|
|
1429
|
-
value: (function () {
|
|
1430
|
-
var _checkForAuthResponse2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
|
|
1431
|
-
var _this$_storage12;
|
|
1432
|
-
var authResponse, _this$config4, defaultScope, defaultExpiresIn, cleanHash, stateId, scope, expiresIn, accessToken, newState, scopes, effectiveExpiresIn, expires, _this$_storage13;
|
|
1433
|
-
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
1434
|
-
while (1) switch (_context20.prev = _context20.next) {
|
|
1435
|
-
case 0:
|
|
1436
|
-
// getAuthResponseURL may throw an exception
|
|
1437
|
-
authResponse = this._responseParser.getAuthResponseFromURL();
|
|
1438
|
-
_this$config4 = this.config, defaultScope = _this$config4.scope, defaultExpiresIn = _this$config4.defaultExpiresIn, cleanHash = _this$config4.cleanHash;
|
|
1439
|
-
if (authResponse && cleanHash) {
|
|
1440
|
-
this.setHash('');
|
|
1441
|
-
}
|
|
1442
|
-
if (authResponse) {
|
|
1443
|
-
_context20.next = 5;
|
|
1444
|
-
break;
|
|
1445
|
-
}
|
|
1446
|
-
return _context20.abrupt("return", undefined);
|
|
1447
|
-
case 5:
|
|
1448
|
-
stateId = authResponse.state, scope = authResponse.scope, expiresIn = authResponse.expiresIn, accessToken = authResponse.accessToken;
|
|
1449
|
-
_context20.next = 8;
|
|
1450
|
-
return stateId && ((_this$_storage12 = this._storage) === null || _this$_storage12 === void 0 ? void 0 : _this$_storage12.getState(stateId));
|
|
1451
|
-
case 8:
|
|
1452
|
-
_context20.t0 = _context20.sent;
|
|
1453
|
-
if (_context20.t0) {
|
|
1454
|
-
_context20.next = 11;
|
|
1455
|
-
break;
|
|
1456
|
-
}
|
|
1457
|
-
_context20.t0 = this._makeStateFromResponse(authResponse);
|
|
1458
|
-
case 11:
|
|
1459
|
-
newState = _context20.t0;
|
|
1460
|
-
scopes = scope ? scope.split(' ') : newState.scopes || defaultScope || [];
|
|
1461
|
-
effectiveExpiresIn = expiresIn ? parseInt(expiresIn, 10) : defaultExpiresIn;
|
|
1462
|
-
expires = TokenValidator._epoch() + effectiveExpiresIn;
|
|
1463
|
-
if (!(accessToken != null)) {
|
|
1464
|
-
_context20.next = 18;
|
|
1465
|
-
break;
|
|
1466
|
-
}
|
|
1467
|
-
_context20.next = 18;
|
|
1468
|
-
return (_this$_storage13 = this._storage) === null || _this$_storage13 === void 0 ? void 0 : _this$_storage13.saveToken({
|
|
1469
|
-
accessToken,
|
|
1470
|
-
scopes,
|
|
1471
|
-
expires,
|
|
1472
|
-
lifeTime: effectiveExpiresIn
|
|
1473
|
-
});
|
|
1474
|
-
case 18:
|
|
1475
|
-
return _context20.abrupt("return", newState);
|
|
1476
|
-
case 19:
|
|
1477
|
-
case "end":
|
|
1478
|
-
return _context20.stop();
|
|
1479
|
-
}
|
|
1480
|
-
}, _callee20, this);
|
|
1481
|
-
}));
|
|
1482
|
-
function _checkForAuthResponse() {
|
|
1483
|
-
return _checkForAuthResponse2.apply(this, arguments);
|
|
1484
|
-
}
|
|
1485
|
-
return _checkForAuthResponse;
|
|
1486
|
-
}())
|
|
1487
|
-
}, {
|
|
1488
|
-
key: "_checkForStateRestoration",
|
|
1489
|
-
value: function () {
|
|
1490
|
-
var _checkForStateRestoration2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
|
|
1491
|
-
var _this$_storage14;
|
|
1492
|
-
var authResponse, stateId;
|
|
1493
|
-
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
1494
|
-
while (1) switch (_context21.prev = _context21.next) {
|
|
1495
|
-
case 0:
|
|
1496
|
-
authResponse = this._responseParser._authResponse;
|
|
1497
|
-
if (authResponse && this.config.cleanHash) {
|
|
1498
|
-
this.setHash('');
|
|
1499
|
-
}
|
|
1500
|
-
stateId = authResponse === null || authResponse === void 0 ? void 0 : authResponse.restoreAuthState;
|
|
1501
|
-
_context21.next = 5;
|
|
1502
|
-
return stateId && ((_this$_storage14 = this._storage) === null || _this$_storage14 === void 0 ? void 0 : _this$_storage14.getState(stateId));
|
|
1503
|
-
case 5:
|
|
1504
|
-
_context21.t0 = _context21.sent;
|
|
1505
|
-
if (_context21.t0) {
|
|
1506
|
-
_context21.next = 8;
|
|
1507
|
-
break;
|
|
1508
|
-
}
|
|
1509
|
-
_context21.t0 = {};
|
|
1510
|
-
case 8:
|
|
1511
|
-
return _context21.abrupt("return", _context21.t0);
|
|
1512
|
-
case 9:
|
|
1513
|
-
case "end":
|
|
1514
|
-
return _context21.stop();
|
|
1515
|
-
}
|
|
1516
|
-
}, _callee21, this);
|
|
1517
|
-
}));
|
|
1518
|
-
function _checkForStateRestoration() {
|
|
1519
|
-
return _checkForStateRestoration2.apply(this, arguments);
|
|
1520
|
-
}
|
|
1521
|
-
return _checkForStateRestoration;
|
|
1522
|
-
}()
|
|
1523
|
-
}, {
|
|
1524
|
-
key: "_checkBackendsAreUp",
|
|
1525
|
-
value: function _checkBackendsAreUp() {
|
|
1526
|
-
var abortCtrl = new AbortController();
|
|
1527
|
-
var backendCheckTimeout = this.config.backendCheckTimeout;
|
|
1528
|
-
return Promise.all([promiseWithTimeout(this.http.fetch('settings/public?fields=id', {
|
|
1529
|
-
signal: abortCtrl.signal
|
|
1530
|
-
}), backendCheckTimeout, {
|
|
1531
|
-
error: new Error('The authorization server is taking too long to respond. Please try again later.'),
|
|
1532
|
-
onTimeout: function onTimeout() {
|
|
1533
|
-
return abortCtrl.abort();
|
|
1534
|
-
}
|
|
1535
|
-
}), this.config.checkBackendIsUp()]).catch(function (err) {
|
|
1536
|
-
if (err instanceof TypeError) {
|
|
1537
|
-
throw new TypeError('Could not connect to the server due to network error. Please check your connection and try again.');
|
|
1538
|
-
}
|
|
1539
|
-
throw err;
|
|
1540
|
-
});
|
|
1541
|
-
}
|
|
1542
|
-
}, {
|
|
1543
|
-
key: "_checkBackendsStatusesIfEnabled",
|
|
1544
|
-
value: function () {
|
|
1545
|
-
var _checkBackendsStatusesIfEnabled2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
|
|
1546
|
-
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
1547
|
-
while (1) switch (_context22.prev = _context22.next) {
|
|
1548
|
-
case 0:
|
|
1549
|
-
if (this.config.enableBackendStatusCheck) {
|
|
1550
|
-
_context22.next = 2;
|
|
1551
|
-
break;
|
|
1552
|
-
}
|
|
1553
|
-
return _context22.abrupt("return");
|
|
1554
|
-
case 2:
|
|
1555
|
-
_context22.prev = 2;
|
|
1556
|
-
_context22.next = 5;
|
|
1557
|
-
return this._checkBackendsAreUp();
|
|
1558
|
-
case 5:
|
|
1559
|
-
_context22.next = 12;
|
|
1560
|
-
break;
|
|
1561
|
-
case 7:
|
|
1562
|
-
_context22.prev = 7;
|
|
1563
|
-
_context22.t0 = _context22["catch"](2);
|
|
1564
|
-
if (!(_context22.t0 instanceof Error)) {
|
|
1565
|
-
_context22.next = 12;
|
|
1566
|
-
break;
|
|
1567
|
-
}
|
|
1568
|
-
_context22.next = 12;
|
|
1569
|
-
return this._showBackendDownDialog(_context22.t0);
|
|
1570
|
-
case 12:
|
|
1571
|
-
case "end":
|
|
1572
|
-
return _context22.stop();
|
|
1573
|
-
}
|
|
1574
|
-
}, _callee22, this, [[2, 7]]);
|
|
1575
|
-
}));
|
|
1576
|
-
function _checkBackendsStatusesIfEnabled() {
|
|
1577
|
-
return _checkBackendsStatusesIfEnabled2.apply(this, arguments);
|
|
1578
|
-
}
|
|
1579
|
-
return _checkBackendsStatusesIfEnabled;
|
|
1580
|
-
}()
|
|
1581
|
-
/**
|
|
1582
|
-
* Adds preconnect tag to help browser to establish connection to URL.
|
|
1583
|
-
* See https://w3c.github.io/resource-hints/
|
|
1584
|
-
* @param url Url to preconnect to.
|
|
1585
|
-
*/
|
|
1586
|
-
}, {
|
|
1587
|
-
key: "setUpPreconnect",
|
|
1588
|
-
value: function setUpPreconnect(url) {
|
|
1589
|
-
var linkNode = document.createElement('link');
|
|
1590
|
-
linkNode.rel = 'preconnect';
|
|
1591
|
-
linkNode.href = url;
|
|
1592
|
-
linkNode.pr = '1.0';
|
|
1593
|
-
linkNode.crossOrigin = 'use-credentials';
|
|
1594
|
-
document.head.appendChild(linkNode);
|
|
1595
|
-
}
|
|
1596
|
-
/**
|
|
1597
|
-
* Redirects current page to the given URL
|
|
1598
|
-
* @param {string} url
|
|
1599
|
-
* @private
|
|
1600
|
-
*/
|
|
1601
|
-
}, {
|
|
1602
|
-
key: "_redirectCurrentPage",
|
|
1603
|
-
value: function _redirectCurrentPage(url) {
|
|
1604
|
-
{
|
|
1605
|
-
window.location.href = fixUrl(url);
|
|
1606
|
-
}
|
|
1607
|
-
}
|
|
1608
|
-
/**
|
|
1609
|
-
* Reloads current page
|
|
1610
|
-
*/
|
|
1611
|
-
}, {
|
|
1612
|
-
key: "_reloadCurrentPage",
|
|
1613
|
-
value: function _reloadCurrentPage() {
|
|
1614
|
-
this._redirectCurrentPage(window.location.href);
|
|
1615
|
-
}
|
|
1616
|
-
}, {
|
|
1617
|
-
key: "_canShowDialogs",
|
|
1618
|
-
value: function _canShowDialogs() {
|
|
1619
|
-
return this.config.embeddedLogin && this._authDialogService;
|
|
1620
|
-
}
|
|
1621
|
-
/**
|
|
1622
|
-
* Sets the location hash
|
|
1623
|
-
* @param {string} hash
|
|
1624
|
-
*/
|
|
1625
|
-
}, {
|
|
1626
|
-
key: "setHash",
|
|
1627
|
-
value: function setHash(hash) {
|
|
1628
|
-
if (history.replaceState) {
|
|
1629
|
-
// NB! History.replaceState is used here, because Firefox saves
|
|
1630
|
-
// a record in history.
|
|
1631
|
-
// NB! URL to redirect is formed manually because baseURI could be messed up,
|
|
1632
|
-
// in which case it's not obvious where redirect will lead.
|
|
1633
|
-
var cleanedUrl = [window.location.pathname, window.location.search].join('');
|
|
1634
|
-
var hashIfExist = hash ? "#".concat(hash) : '';
|
|
1635
|
-
history.replaceState(undefined, '', "".concat(cleanedUrl).concat(hashIfExist));
|
|
1636
|
-
} else {
|
|
1637
|
-
window.location.hash = hash;
|
|
1638
|
-
}
|
|
1639
|
-
}
|
|
1640
|
-
}]);
|
|
1641
|
-
return Auth;
|
|
1642
|
-
}();
|
|
1643
|
-
_defineProperty(Auth, "DEFAULT_CONFIG", DEFAULT_CONFIG);
|
|
1644
|
-
_defineProperty(Auth, "API_PATH", 'api/rest/');
|
|
1645
|
-
_defineProperty(Auth, "API_AUTH_PATH", 'oauth2/auth');
|
|
1646
|
-
_defineProperty(Auth, "API_PROFILE_PATH", 'users/me');
|
|
1647
|
-
_defineProperty(Auth, "CLOSE_BACKEND_DOWN_MESSAGE", 'backend-check-succeeded');
|
|
1648
|
-
_defineProperty(Auth, "CLOSE_WINDOW_MESSAGE", 'close-login-window');
|
|
1649
|
-
_defineProperty(Auth, "shouldRefreshToken", TokenValidator.shouldRefreshToken);
|
|
1650
|
-
_defineProperty(Auth, "storageIsUnavailable", !navigator.cookieEnabled);
|
|
1651
|
-
|
|
1652
|
-
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 };
|