@jetbrains/ring-ui-built 6.0.5-beta.0 → 6.0.7-beta.0
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/README.md +10 -6
- package/components/_helpers/input.js +2 -2
- package/components/_helpers/select__filter.js +1 -1
- package/components/alert/alert.js +2 -0
- package/components/alert-service/alert-service.js +2 -0
- package/components/analytics/analytics__custom-plugin.js +1 -2
- package/components/auth/auth.js +3 -0
- package/components/auth/auth__core.js +38 -35
- package/components/auth/background-flow.js +3 -2
- package/components/auth/down-notification.js +2 -0
- package/components/auth/iframe-flow.js +7 -3
- package/components/auth/request-builder.d.ts +1 -0
- package/components/auth/request-builder.js +4 -1
- package/components/auth/response-parser.js +1 -0
- package/components/auth/storage.js +11 -4
- package/components/auth/token-validator.js +5 -3
- package/components/auth/window-flow.js +4 -3
- package/components/auth-dialog/auth-dialog.js +2 -0
- package/components/auth-dialog-service/auth-dialog-service.js +2 -0
- package/components/avatar/avatar.js +3 -0
- package/components/avatar/fallback-avatar.js +1 -0
- package/components/caret/caret.js +5 -4
- package/components/clipboard/clipboard-fallback.js +3 -3
- package/components/clipboard/clipboard.js +2 -0
- package/components/code/code.d.ts +1 -0
- package/components/code/code.js +0 -1
- package/components/confirm/confirm.js +2 -0
- package/components/confirm-service/confirm-service.js +2 -0
- package/components/data-list/data-list.js +7 -2
- package/components/data-list/item.js +1 -0
- package/components/data-list/selection.js +2 -0
- package/components/date-picker/date-picker.js +3 -1
- package/components/date-picker/date-popup.js +2 -2
- package/components/dialog/dialog.js +2 -0
- package/components/dropdown/dropdown.js +2 -2
- package/components/dropdown-menu/dropdown-menu.js +5 -0
- package/components/editable-heading/editable-heading.d.ts +1 -1
- package/components/editable-heading/editable-heading.js +68 -37
- package/components/error-bubble/error-bubble.js +2 -0
- package/components/global/dom.js +1 -0
- package/components/global/focus-sensor-hoc.js +6 -6
- package/components/global/normalize-indent.js +0 -1
- package/components/global/react-dom-renderer.js +1 -0
- package/components/global/schedule-raf.js +1 -1
- package/components/global/theme.js +2 -0
- package/components/global/url.js +1 -0
- package/components/grid/col.js +0 -1
- package/components/grid/grid.js +0 -1
- package/components/grid/row.js +7 -2
- package/components/header/header.js +5 -0
- package/components/header/profile.js +6 -0
- package/components/header/services.js +2 -0
- package/components/header/smart-profile.js +5 -0
- package/components/header/smart-services.js +5 -2
- package/components/http/http.js +1 -0
- package/components/http/http.mock.js +1 -0
- package/components/hub-source/hub-source.js +2 -0
- package/components/hub-source/hub-source__user.js +1 -0
- package/components/hub-source/hub-source__users-groups.js +2 -0
- package/components/island/content.js +1 -1
- package/components/island/header.js +1 -0
- package/components/list/list.d.ts +0 -1
- package/components/list/list.js +10 -3
- package/components/list/list__item.js +3 -0
- package/components/list/list__users-groups-source.js +5 -0
- package/components/loader/loader.js +3 -1
- package/components/loader/loader__core.js +21 -7
- package/components/loader-screen/loader-screen.js +2 -0
- package/components/login-dialog/login-dialog.js +4 -0
- package/components/login-dialog/service.js +4 -0
- package/components/message/message.js +2 -0
- package/components/old-browsers-message/white-list.js +2 -2
- package/components/pager/pager.js +9 -4
- package/components/permissions/permissions.js +1 -0
- package/components/popup/popup.js +5 -0
- package/components/popup/position.js +1 -0
- package/components/popup-menu/popup-menu.js +5 -0
- package/components/progress-bar/progress-bar.d.ts +6 -0
- package/components/progress-bar/progress-bar.js +11 -4
- package/components/query-assist/query-assist.js +18 -12
- package/components/query-assist/query-assist__suggestions.js +5 -0
- package/components/select/select.js +27 -2
- package/components/select/select__filter.js +5 -0
- package/components/select/select__popup.js +5 -0
- package/components/shortcuts/core.js +2 -0
- package/components/shortcuts/shortcuts-hoc.js +2 -0
- package/components/shortcuts/shortcuts.js +2 -0
- package/components/storage/storage.js +3 -0
- package/components/storage/storage__fallback.js +5 -2
- package/components/storage/storage__local.js +2 -0
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +2 -1
- package/components/table/multitable.js +8 -7
- package/components/table/row-with-focus-sensor.js +6 -4
- package/components/table/row.js +2 -0
- package/components/table/selection-shortcuts-hoc.js +12 -11
- package/components/table/selection.js +1 -0
- package/components/table/smart-table.js +4 -0
- package/components/table/table.js +4 -0
- package/components/tabs/collapsible-more.js +5 -0
- package/components/tabs/collapsible-tabs.js +5 -0
- package/components/tabs/dumb-tabs.js +5 -0
- package/components/tabs/smart-tabs.js +5 -0
- package/components/tabs/tabs.js +5 -0
- package/components/tag/tag.js +1 -1
- package/components/tags-input/tags-input.js +12 -7
- package/components/tooltip/tooltip.js +4 -2
- package/components/user-agreement/service.js +3 -0
- package/components/user-agreement/user-agreement.js +2 -0
- package/components/user-card/card.js +4 -0
- package/components/user-card/smart-user-card-tooltip.js +4 -0
- package/components/user-card/tooltip.js +4 -0
- package/components/user-card/user-card.js +4 -0
- package/package.json +4 -13
- package/typings.d.ts +0 -54
- package/babel.config.js +0 -25
- package/jslint-xml.js +0 -38
- package/postcss.config.js +0 -20
- package/webpack.config.js +0 -118
package/README.md
CHANGED
@@ -1,27 +1,31 @@
|
|
1
1
|
# Ring UI — JetBrains Web UI components
|
2
2
|
[![Storybook][storybook-img]][docsite] [![Build Status][ci-img]][ci-bt] [![Storybook][browserstack-img]][browserstack-build-page] [![NPM version][npm-version-img]][npm-package] [![NPM downloads][npm-count-img]][npm-package]
|
3
3
|
|
4
|
-
[](https://
|
4
|
+
[](https://github.com/JetBrains#jetbrains-on-github)
|
5
5
|
|
6
6
|
This collection of UI components aims to provide all the necessary building blocks for web-based products built inside JetBrains, as well as third-party plugins developed for JetBrains' products.
|
7
7
|
|
8
8
|
## Try now
|
9
|
-
* Try the [codesandbox](https://codesandbox.io/
|
9
|
+
* Try the [codesandbox](https://codesandbox.io/p/devbox/ring-ui-6-0-demo-l5v5fk), based on `create-react-app` tooling, to see and try the UI components
|
10
10
|
* Check out [list of examples](https://jetbrains.github.io/ring-ui/master/index.html) for each component
|
11
11
|
|
12
12
|
## Installation
|
13
13
|
|
14
|
-
|
14
|
+
* For Quick Start, use pre-built version:
|
15
|
+
`npm install @jetbrains/ring-ui-built`
|
16
|
+
* For complex projects, use "sources" version
|
17
|
+
`npm install @jetbrains/ring-ui`
|
18
|
+
You will then need to include building Ring UI into your WebPack build (see "Building Ring UI from source via Webpack" below)
|
15
19
|
|
16
20
|
### Quick start
|
17
21
|
|
18
22
|
The easiest way is to import necessary components as ES modules:
|
19
23
|
```js
|
20
24
|
// You need to import RingUI styles once
|
21
|
-
import '@jetbrains/ring-ui/
|
25
|
+
import '@jetbrains/ring-ui-built/components/style.css';
|
22
26
|
|
23
|
-
import alertService from '@jetbrains/ring-ui/
|
24
|
-
import Button from '@jetbrains/ring-ui/
|
27
|
+
import alertService from '@jetbrains/ring-ui-built/components/alert-service/alert-service';
|
28
|
+
import Button from '@jetbrains/ring-ui-built/components/button/button';
|
25
29
|
|
26
30
|
...
|
27
31
|
|
@@ -54,14 +54,14 @@ var Input = /*#__PURE__*/function (_PureComponent) {
|
|
54
54
|
_defineProperty(_assertThisInitialized(_this), "handleInputChange", function (e) {
|
55
55
|
if (!_this.props.multiline) {
|
56
56
|
var _this$props$onChange, _this$props;
|
57
|
-
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0
|
57
|
+
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 || _this$props$onChange.call(_this$props, e);
|
58
58
|
_this.checkValue();
|
59
59
|
}
|
60
60
|
});
|
61
61
|
_defineProperty(_assertThisInitialized(_this), "handleTextareaChange", function (e) {
|
62
62
|
if (_this.props.multiline) {
|
63
63
|
var _this$props$onChange2, _this$props2;
|
64
|
-
(_this$props$onChange2 = (_this$props2 = _this.props).onChange) === null || _this$props$onChange2 === void 0
|
64
|
+
(_this$props$onChange2 = (_this$props2 = _this.props).onChange) === null || _this$props$onChange2 === void 0 || _this$props$onChange2.call(_this$props2, e);
|
65
65
|
_this.checkValue();
|
66
66
|
}
|
67
67
|
});
|
@@ -10,7 +10,7 @@ import sniffr from '../global/sniffer.js';
|
|
10
10
|
import { ActiveItemContext } from '../list/list.js';
|
11
11
|
import { I18nContext } from '../i18n/i18n-context.js';
|
12
12
|
|
13
|
-
var modules_b607bec2 = {"unit":"i__const_unit_0","filterWithTagsFocused":"filterWithTagsFocused_rui_531d","light":"light_rui_2ac4","filterWithTags":"filterWithTags_rui_531d","filterWrapper":"filterWrapper_rui_531d","filterWithTagsInput":"filterWithTagsInput_rui_531d","filter":"filter_rui_531d","filterIcon":"filterIcon_rui_531d","bottomLine":"bottomLine_rui_531d","bottomLineOverItem":"bottomLineOverItem_rui_531d","message":"message_rui_531d","selectAll":"selectAll_rui_531d"};
|
13
|
+
var modules_b607bec2 = {"unit":"i__const_unit_0","filterWithTagsFocused":"filterWithTagsFocused_rui_531d","light":"light_rui_2ac4","filterWithTags":"filterWithTags_rui_531d","filterWrapper":"filterWrapper_rui_531d","filterWithTagsInput":"filterWithTagsInput_rui_531d","filter":"filter_rui_531d","popup":"popup_rui_531d","filterIcon":"filterIcon_rui_531d","bottomLine":"bottomLine_rui_531d","bottomLineOverItem":"bottomLineOverItem_rui_531d","message":"message_rui_531d","selectAll":"selectAll_rui_531d"};
|
14
14
|
|
15
15
|
var _excluded = ["className", "listId"];
|
16
16
|
function noop() {}
|
@@ -29,6 +29,7 @@ import 'core-js/modules/web.dom-collections.iterator.js';
|
|
29
29
|
import 'core-js/modules/es.weak-map.js';
|
30
30
|
import 'core-js/modules/es.array.reduce.js';
|
31
31
|
import 'core-js/modules/es.object.entries.js';
|
32
|
+
import 'core-js/modules/es.object.assign.js';
|
32
33
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
33
34
|
import 'core-js/modules/es.array.filter.js';
|
34
35
|
import 'core-js/modules/es.string.split.js';
|
@@ -51,6 +52,7 @@ import 'core-js/modules/es.string.includes.js';
|
|
51
52
|
import 'core-js/modules/es.array.slice.js';
|
52
53
|
import 'core-js/modules/es.array.splice.js';
|
53
54
|
import 'core-js/modules/es.string.match.js';
|
55
|
+
import 'core-js/modules/es.array.find-index.js';
|
54
56
|
import 'combokeys';
|
55
57
|
import '../global/sniffer.js';
|
56
58
|
import 'sniffr';
|
@@ -33,6 +33,7 @@ import '../global/data-tests.js';
|
|
33
33
|
import 'core-js/modules/es.array.reduce.js';
|
34
34
|
import 'core-js/modules/es.object.entries.js';
|
35
35
|
import '../global/dom.js';
|
36
|
+
import 'core-js/modules/es.object.assign.js';
|
36
37
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
37
38
|
import 'core-js/modules/es.string.split.js';
|
38
39
|
import 'core-js/modules/es.set.js';
|
@@ -53,6 +54,7 @@ import 'core-js/modules/es.string.includes.js';
|
|
53
54
|
import 'core-js/modules/es.array.slice.js';
|
54
55
|
import 'core-js/modules/es.array.splice.js';
|
55
56
|
import 'core-js/modules/es.string.match.js';
|
57
|
+
import 'core-js/modules/es.array.find-index.js';
|
56
58
|
import 'combokeys';
|
57
59
|
import '../global/sniffer.js';
|
58
60
|
import 'sniffr';
|
@@ -64,7 +64,6 @@ var AnalyticsCustomPlugin = /*#__PURE__*/function () {
|
|
64
64
|
if (this._isDevelopment) {
|
65
65
|
console.log('TRACKING DATA = ', category, action, data); // eslint-disable-line no-console
|
66
66
|
}
|
67
|
-
|
68
67
|
var baseSendingData = {
|
69
68
|
category,
|
70
69
|
action,
|
@@ -80,7 +79,7 @@ var AnalyticsCustomPlugin = /*#__PURE__*/function () {
|
|
80
79
|
this._data.push(sendingData);
|
81
80
|
if (this._flushMaxPackSize != null && this._data.length >= this._flushMaxPackSize) {
|
82
81
|
var _this$_flush;
|
83
|
-
(_this$_flush = this._flush) === null || _this$_flush === void 0
|
82
|
+
(_this$_flush = this._flush) === null || _this$_flush === void 0 || _this$_flush.call(this);
|
84
83
|
}
|
85
84
|
}
|
86
85
|
}]);
|
package/components/auth/auth.js
CHANGED
@@ -8,6 +8,7 @@ import 'core-js/modules/es.object.to-string.js';
|
|
8
8
|
import 'core-js/modules/es.promise.js';
|
9
9
|
import './response-parser.js';
|
10
10
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
11
|
+
import 'core-js/modules/es.array.index-of.js';
|
11
12
|
import 'core-js/modules/es.regexp.exec.js';
|
12
13
|
import 'core-js/modules/es.string.replace.js';
|
13
14
|
import 'core-js/modules/es.regexp.to-string.js';
|
@@ -43,6 +44,7 @@ import '../global/data-tests.js';
|
|
43
44
|
import 'core-js/modules/es.array.reduce.js';
|
44
45
|
import 'core-js/modules/es.object.entries.js';
|
45
46
|
import '../global/dom.js';
|
47
|
+
import 'core-js/modules/es.object.assign.js';
|
46
48
|
import 'core-js/modules/es.string.split.js';
|
47
49
|
import 'core-js/modules/es.set.js';
|
48
50
|
import '../button/button.js';
|
@@ -61,6 +63,7 @@ import 'core-js/modules/es.array.includes.js';
|
|
61
63
|
import 'core-js/modules/es.string.includes.js';
|
62
64
|
import 'core-js/modules/es.array.slice.js';
|
63
65
|
import 'core-js/modules/es.array.splice.js';
|
66
|
+
import 'core-js/modules/es.array.find-index.js';
|
64
67
|
import 'combokeys';
|
65
68
|
import '../global/sniffer.js';
|
66
69
|
import 'sniffr';
|
@@ -25,6 +25,7 @@ import AuthRequestBuilder from './request-builder.js';
|
|
25
25
|
import BackgroundFlow from './background-flow.js';
|
26
26
|
import TokenValidator from './token-validator.js';
|
27
27
|
import 'core-js/modules/es.string.match.js';
|
28
|
+
import 'core-js/modules/es.array.index-of.js';
|
28
29
|
import 'core-js/modules/es.map.js';
|
29
30
|
import 'core-js/modules/es.array.map.js';
|
30
31
|
import 'core-js/modules/es.weak-map.js';
|
@@ -57,6 +58,7 @@ import '../global/memoize.js';
|
|
57
58
|
import '../loader-inline/loader-inline.js';
|
58
59
|
import '../global/data-tests.js';
|
59
60
|
import '../global/dom.js';
|
61
|
+
import 'core-js/modules/es.object.assign.js';
|
60
62
|
import 'core-js/modules/es.string.split.js';
|
61
63
|
import '../button/button.js';
|
62
64
|
import '@jetbrains/icons/chevron-10px';
|
@@ -72,6 +74,7 @@ import '../shortcuts/shortcuts.js';
|
|
72
74
|
import '../shortcuts/core.js';
|
73
75
|
import 'core-js/modules/es.array.slice.js';
|
74
76
|
import 'core-js/modules/es.array.splice.js';
|
77
|
+
import 'core-js/modules/es.array.find-index.js';
|
75
78
|
import 'combokeys';
|
76
79
|
import '../global/sniffer.js';
|
77
80
|
import 'sniffr';
|
@@ -316,7 +319,7 @@ var Auth = /*#__PURE__*/function () {
|
|
316
319
|
*/
|
317
320
|
}, {
|
318
321
|
key: "init",
|
319
|
-
value: function () {
|
322
|
+
value: (function () {
|
320
323
|
var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
321
324
|
var _this$_storage3,
|
322
325
|
_this2 = this;
|
@@ -324,7 +327,7 @@ var Auth = /*#__PURE__*/function () {
|
|
324
327
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
325
328
|
while (1) switch (_context3.prev = _context3.next) {
|
326
329
|
case 0:
|
327
|
-
(_this$_storage3 = this._storage) === null || _this$_storage3 === void 0
|
330
|
+
(_this$_storage3 = this._storage) === null || _this$_storage3 === void 0 || _this$_storage3.onTokenChange( /*#__PURE__*/function () {
|
328
331
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(token) {
|
329
332
|
var isGuest;
|
330
333
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
@@ -431,7 +434,7 @@ var Auth = /*#__PURE__*/function () {
|
|
431
434
|
case 23:
|
432
435
|
state = _context3.sent;
|
433
436
|
case 24:
|
434
|
-
(_this$_initDeferred = this._initDeferred) === null || _this$_initDeferred === void 0 || (_this$_initDeferred$r = _this$_initDeferred.resolve) === null || _this$_initDeferred$r === void 0
|
437
|
+
(_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);
|
435
438
|
return _context3.abrupt("return", (_state = state) === null || _state === void 0 ? void 0 : _state.restoreLocation);
|
436
439
|
case 28:
|
437
440
|
_context3.prev = 28;
|
@@ -440,7 +443,7 @@ var Auth = /*#__PURE__*/function () {
|
|
440
443
|
_context3.next = 35;
|
441
444
|
break;
|
442
445
|
}
|
443
|
-
(_this$_initDeferred2 = this._initDeferred) === null || _this$_initDeferred2 === void 0 || (_this$_initDeferred2$ = _this$_initDeferred2.resolve) === null || _this$_initDeferred2$ === void 0
|
446
|
+
(_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
|
444
447
|
_context3.next = 34;
|
445
448
|
return this.requestUser();
|
446
449
|
case 34:
|
@@ -457,7 +460,7 @@ var Auth = /*#__PURE__*/function () {
|
|
457
460
|
return _init.apply(this, arguments);
|
458
461
|
}
|
459
462
|
return init;
|
460
|
-
}()
|
463
|
+
}())
|
461
464
|
}, {
|
462
465
|
key: "sendRedirect",
|
463
466
|
value: function () {
|
@@ -517,7 +520,7 @@ var Auth = /*#__PURE__*/function () {
|
|
517
520
|
break;
|
518
521
|
}
|
519
522
|
state.error = error;
|
520
|
-
(_this$_storage5 = this._storage) === null || _this$_storage5 === void 0
|
523
|
+
(_this$_storage5 = this._storage) === null || _this$_storage5 === void 0 || _this$_storage5.saveState(error.stateId, state);
|
521
524
|
// Return endless promise in the background to avoid service start
|
522
525
|
return _context5.abrupt("return", new Promise(noop));
|
523
526
|
case 9:
|
@@ -576,14 +579,14 @@ var Auth = /*#__PURE__*/function () {
|
|
576
579
|
_context6.next = 13;
|
577
580
|
return (_this$_tokenValidator2 = this._tokenValidator) === null || _this$_tokenValidator2 === void 0 ? void 0 : _this$_tokenValidator2.validateToken();
|
578
581
|
case 13:
|
579
|
-
(_this$_initDeferred3 = this._initDeferred) === null || _this$_initDeferred3 === void 0 || (_this$_initDeferred3$ = _this$_initDeferred3.resolve) === null || _this$_initDeferred3$ === void 0
|
582
|
+
(_this$_initDeferred3 = this._initDeferred) === null || _this$_initDeferred3 === void 0 || (_this$_initDeferred3$ = _this$_initDeferred3.resolve) === null || _this$_initDeferred3$ === void 0 || _this$_initDeferred3$.call(_this$_initDeferred3);
|
580
583
|
return _context6.abrupt("return", undefined);
|
581
584
|
case 17:
|
582
585
|
_context6.prev = 17;
|
583
586
|
_context6.t0 = _context6["catch"](8);
|
584
587
|
return _context6.abrupt("return", _context6.t0 instanceof Error ? this.sendRedirect(_context6.t0) : undefined);
|
585
588
|
case 20:
|
586
|
-
(_this$_initDeferred4 = this._initDeferred) === null || _this$_initDeferred4 === void 0 || (_this$_initDeferred4$ = _this$_initDeferred4.reject) === null || _this$_initDeferred4$ === void 0
|
589
|
+
(_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);
|
587
590
|
throw error;
|
588
591
|
case 22:
|
589
592
|
case "end":
|
@@ -603,7 +606,7 @@ var Auth = /*#__PURE__*/function () {
|
|
603
606
|
*/
|
604
607
|
}, {
|
605
608
|
key: "requestToken",
|
606
|
-
value: function () {
|
609
|
+
value: (function () {
|
607
610
|
var _requestToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
608
611
|
var _this$_initDeferred5, _yield$this$_tokenVal, _this$_tokenValidator3;
|
609
612
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
@@ -666,9 +669,10 @@ var Auth = /*#__PURE__*/function () {
|
|
666
669
|
* Get new token in the background or redirect to the login page.
|
667
670
|
* @return {Promise.<string>}
|
668
671
|
*/
|
672
|
+
)
|
669
673
|
}, {
|
670
674
|
key: "forceTokenUpdate",
|
671
|
-
value: function () {
|
675
|
+
value: (function () {
|
672
676
|
var _forceTokenUpdate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
673
677
|
var _this4 = this;
|
674
678
|
var _yield$this$_backgrou, _this$_backgroundFlow2, _this$_requestBuilder2, authRequest;
|
@@ -791,7 +795,7 @@ var Auth = /*#__PURE__*/function () {
|
|
791
795
|
return _forceTokenUpdate.apply(this, arguments);
|
792
796
|
}
|
793
797
|
return forceTokenUpdate;
|
794
|
-
}()
|
798
|
+
}())
|
795
799
|
}, {
|
796
800
|
key: "loadCurrentService",
|
797
801
|
value: function () {
|
@@ -866,7 +870,7 @@ var Auth = /*#__PURE__*/function () {
|
|
866
870
|
*/
|
867
871
|
}, {
|
868
872
|
key: "requestUser",
|
869
|
-
value: function () {
|
873
|
+
value: (function () {
|
870
874
|
var _requestUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
871
875
|
var accessToken, user;
|
872
876
|
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
@@ -904,7 +908,7 @@ var Auth = /*#__PURE__*/function () {
|
|
904
908
|
return _requestUser.apply(this, arguments);
|
905
909
|
}
|
906
910
|
return requestUser;
|
907
|
-
}()
|
911
|
+
}())
|
908
912
|
}, {
|
909
913
|
key: "updateUser",
|
910
914
|
value: function () {
|
@@ -919,7 +923,7 @@ var Auth = /*#__PURE__*/function () {
|
|
919
923
|
return this.requestToken();
|
920
924
|
case 3:
|
921
925
|
accessToken = _context12.sent;
|
922
|
-
(_this$_storage7 = this._storage) === null || _this$_storage7 === void 0
|
926
|
+
(_this$_storage7 = this._storage) === null || _this$_storage7 === void 0 || _this$_storage7.wipeCachedCurrentUser();
|
923
927
|
_context12.next = 7;
|
924
928
|
return this.getUser(accessToken);
|
925
929
|
case 7:
|
@@ -1026,12 +1030,11 @@ var Auth = /*#__PURE__*/function () {
|
|
1026
1030
|
this._createInitDeferred();
|
1027
1031
|
var closeDialog = function closeDialog() {
|
1028
1032
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
1029
|
-
stopTokenListening === null || stopTokenListening === void 0
|
1030
|
-
stopMessageListening === null || stopMessageListening === void 0
|
1031
|
-
hide === null || hide === void 0
|
1033
|
+
stopTokenListening === null || stopTokenListening === void 0 || stopTokenListening();
|
1034
|
+
stopMessageListening === null || stopMessageListening === void 0 || stopMessageListening();
|
1035
|
+
hide === null || hide === void 0 || hide();
|
1032
1036
|
/* eslint-enable @typescript-eslint/no-use-before-define */
|
1033
1037
|
};
|
1034
|
-
|
1035
1038
|
var onConfirm = function onConfirm() {
|
1036
1039
|
if (!embeddedLogin) {
|
1037
1040
|
closeDialog();
|
@@ -1042,12 +1045,12 @@ var Auth = /*#__PURE__*/function () {
|
|
1042
1045
|
};
|
1043
1046
|
var onCancel = function onCancel() {
|
1044
1047
|
var _this7$_embeddedFlow, _this7$_storage, _this7$user;
|
1045
|
-
(_this7$_embeddedFlow = _this7._embeddedFlow) === null || _this7$_embeddedFlow === void 0
|
1046
|
-
(_this7$_storage = _this7._storage) === null || _this7$_storage === void 0
|
1048
|
+
(_this7$_embeddedFlow = _this7._embeddedFlow) === null || _this7$_embeddedFlow === void 0 || _this7$_embeddedFlow.stop();
|
1049
|
+
(_this7$_storage = _this7._storage) === null || _this7$_storage === void 0 || _this7$_storage.sendMessage(Auth.CLOSE_WINDOW_MESSAGE, Date.now());
|
1047
1050
|
closeDialog();
|
1048
1051
|
if (!cancelable) {
|
1049
1052
|
var _this7$_initDeferred, _this7$_initDeferred$;
|
1050
|
-
(_this7$_initDeferred = _this7._initDeferred) === null || _this7$_initDeferred === void 0 || (_this7$_initDeferred$ = _this7$_initDeferred.resolve) === null || _this7$_initDeferred$ === void 0
|
1053
|
+
(_this7$_initDeferred = _this7._initDeferred) === null || _this7$_initDeferred === void 0 || (_this7$_initDeferred$ = _this7$_initDeferred.resolve) === null || _this7$_initDeferred$ === void 0 || _this7$_initDeferred$.call(_this7$_initDeferred);
|
1051
1054
|
_this7.listeners.trigger(LOGOUT_POSTPONED_EVENT);
|
1052
1055
|
onPostponeLogout();
|
1053
1056
|
return;
|
@@ -1056,7 +1059,7 @@ var Auth = /*#__PURE__*/function () {
|
|
1056
1059
|
_this7.forceTokenUpdate();
|
1057
1060
|
} else {
|
1058
1061
|
var _this7$_initDeferred2, _this7$_initDeferred3;
|
1059
|
-
(_this7$_initDeferred2 = _this7._initDeferred) === null || _this7$_initDeferred2 === void 0 || (_this7$_initDeferred3 = _this7$_initDeferred2.resolve) === null || _this7$_initDeferred3 === void 0
|
1062
|
+
(_this7$_initDeferred2 = _this7._initDeferred) === null || _this7$_initDeferred2 === void 0 || (_this7$_initDeferred3 = _this7$_initDeferred2.resolve) === null || _this7$_initDeferred3 === void 0 || _this7$_initDeferred3.call(_this7$_initDeferred2);
|
1060
1063
|
}
|
1061
1064
|
};
|
1062
1065
|
var onTryAgainClick = /*#__PURE__*/function () {
|
@@ -1093,7 +1096,7 @@ var Auth = /*#__PURE__*/function () {
|
|
1093
1096
|
if (token) {
|
1094
1097
|
var _this7$_initDeferred4, _this7$_initDeferred5;
|
1095
1098
|
closeDialog();
|
1096
|
-
(_this7$_initDeferred4 = _this7._initDeferred) === null || _this7$_initDeferred4 === void 0 || (_this7$_initDeferred5 = _this7$_initDeferred4.resolve) === null || _this7$_initDeferred5 === void 0
|
1099
|
+
(_this7$_initDeferred4 = _this7._initDeferred) === null || _this7$_initDeferred4 === void 0 || (_this7$_initDeferred5 = _this7$_initDeferred4.resolve) === null || _this7$_initDeferred5 === void 0 || _this7$_initDeferred5.call(_this7$_initDeferred4);
|
1097
1100
|
}
|
1098
1101
|
});
|
1099
1102
|
var stopMessageListening = (_this$_storage9 = this._storage) === null || _this$_storage9 === void 0 ? void 0 : _this$_storage9.onMessage(Auth.CLOSE_WINDOW_MESSAGE, function () {
|
@@ -1121,9 +1124,9 @@ var Auth = /*#__PURE__*/function () {
|
|
1121
1124
|
this._createInitDeferred();
|
1122
1125
|
var done = function done() {
|
1123
1126
|
var _this8$_initDeferred, _this8$_initDeferred$;
|
1124
|
-
(_this8$_initDeferred = _this8._initDeferred) === null || _this8$_initDeferred === void 0 || (_this8$_initDeferred$ = _this8$_initDeferred.resolve) === null || _this8$_initDeferred$ === void 0
|
1127
|
+
(_this8$_initDeferred = _this8._initDeferred) === null || _this8$_initDeferred === void 0 || (_this8$_initDeferred$ = _this8$_initDeferred.resolve) === null || _this8$_initDeferred$ === void 0 || _this8$_initDeferred$.call(_this8$_initDeferred);
|
1125
1128
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
1126
|
-
hide === null || hide === void 0
|
1129
|
+
hide === null || hide === void 0 || hide();
|
1127
1130
|
};
|
1128
1131
|
var hide = (_this$_authDialogServ2 = this._authDialogService) === null || _this$_authDialogServ2 === void 0 ? void 0 : _this$_authDialogServ2.call(this, _objectSpread2(_objectSpread2({}, this._service), {}, {
|
1129
1132
|
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 : ''),
|
@@ -1181,13 +1184,13 @@ var Auth = /*#__PURE__*/function () {
|
|
1181
1184
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
1182
1185
|
hide();
|
1183
1186
|
window.removeEventListener('online', onCheckAgain);
|
1184
|
-
stopListeningCloseMessage === null || stopListeningCloseMessage === void 0
|
1187
|
+
stopListeningCloseMessage === null || stopListeningCloseMessage === void 0 || stopListeningCloseMessage();
|
1185
1188
|
/* eslint-enable @typescript-eslint/no-use-before-define */
|
1186
|
-
(_this9$_storage = _this9._storage) === null || _this9$_storage === void 0
|
1189
|
+
(_this9$_storage = _this9._storage) === null || _this9$_storage === void 0 || _this9$_storage.sendMessage(Auth.CLOSE_BACKEND_DOWN_MESSAGE, Date.now());
|
1187
1190
|
clearTimeout(timerId);
|
1188
1191
|
};
|
1189
1192
|
var stopListeningCloseMessage = (_this9$_storage2 = _this9._storage) === null || _this9$_storage2 === void 0 ? void 0 : _this9$_storage2.onMessage(Auth.CLOSE_BACKEND_DOWN_MESSAGE, function () {
|
1190
|
-
stopListeningCloseMessage === null || stopListeningCloseMessage === void 0
|
1193
|
+
stopListeningCloseMessage === null || stopListeningCloseMessage === void 0 || stopListeningCloseMessage();
|
1191
1194
|
done();
|
1192
1195
|
resolve();
|
1193
1196
|
});
|
@@ -1236,7 +1239,7 @@ var Auth = /*#__PURE__*/function () {
|
|
1236
1239
|
*/
|
1237
1240
|
}, {
|
1238
1241
|
key: "logout",
|
1239
|
-
value: function () {
|
1242
|
+
value: (function () {
|
1240
1243
|
var _logout = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(extraParams) {
|
1241
1244
|
var _this$_storage10, _this$_requestBuilder3;
|
1242
1245
|
var requestParams, authRequest;
|
@@ -1274,7 +1277,7 @@ var Auth = /*#__PURE__*/function () {
|
|
1274
1277
|
return _logout.apply(this, arguments);
|
1275
1278
|
}
|
1276
1279
|
return logout;
|
1277
|
-
}()
|
1280
|
+
}())
|
1278
1281
|
}, {
|
1279
1282
|
key: "_runEmbeddedLogin",
|
1280
1283
|
value: function () {
|
@@ -1284,7 +1287,7 @@ var Auth = /*#__PURE__*/function () {
|
|
1284
1287
|
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
1285
1288
|
while (1) switch (_context17.prev = _context17.next) {
|
1286
1289
|
case 0:
|
1287
|
-
(_this$_storage11 = this._storage) === null || _this$_storage11 === void 0
|
1290
|
+
(_this$_storage11 = this._storage) === null || _this$_storage11 === void 0 || _this$_storage11.sendMessage(Auth.CLOSE_WINDOW_MESSAGE, Date.now());
|
1288
1291
|
_context17.prev = 1;
|
1289
1292
|
this._isLoginWindowOpen = true;
|
1290
1293
|
_context17.next = 5;
|
@@ -1316,7 +1319,7 @@ var Auth = /*#__PURE__*/function () {
|
|
1316
1319
|
*/
|
1317
1320
|
}, {
|
1318
1321
|
key: "login",
|
1319
|
-
value: function () {
|
1322
|
+
value: (function () {
|
1320
1323
|
var _login = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
1321
1324
|
var _this$_backgroundFlow3, accessToken, _user;
|
1322
1325
|
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
@@ -1365,7 +1368,7 @@ var Auth = /*#__PURE__*/function () {
|
|
1365
1368
|
return _login.apply(this, arguments);
|
1366
1369
|
}
|
1367
1370
|
return login;
|
1368
|
-
}()
|
1371
|
+
}())
|
1369
1372
|
}, {
|
1370
1373
|
key: "switchUser",
|
1371
1374
|
value: function () {
|
@@ -1424,7 +1427,7 @@ var Auth = /*#__PURE__*/function () {
|
|
1424
1427
|
*/
|
1425
1428
|
}, {
|
1426
1429
|
key: "_checkForAuthResponse",
|
1427
|
-
value: function () {
|
1430
|
+
value: (function () {
|
1428
1431
|
var _checkForAuthResponse2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
|
1429
1432
|
var _this$_storage12;
|
1430
1433
|
var authResponse, _this$config4, defaultScope, defaultExpiresIn, cleanHash, stateId, scope, expiresIn, accessToken, newState, scopes, effectiveExpiresIn, expires, _this$_storage13;
|
@@ -1481,7 +1484,7 @@ var Auth = /*#__PURE__*/function () {
|
|
1481
1484
|
return _checkForAuthResponse2.apply(this, arguments);
|
1482
1485
|
}
|
1483
1486
|
return _checkForAuthResponse;
|
1484
|
-
}()
|
1487
|
+
}())
|
1485
1488
|
}, {
|
1486
1489
|
key: "_checkForStateRestoration",
|
1487
1490
|
value: function () {
|
@@ -4,6 +4,7 @@ import 'core-js/modules/es.object.to-string.js';
|
|
4
4
|
import 'core-js/modules/es.promise.js';
|
5
5
|
import AuthResponseParser from './response-parser.js';
|
6
6
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
7
|
+
import 'core-js/modules/es.array.index-of.js';
|
7
8
|
import 'core-js/modules/es.regexp.exec.js';
|
8
9
|
import 'core-js/modules/es.string.replace.js';
|
9
10
|
import 'core-js/modules/es.regexp.to-string.js';
|
@@ -58,7 +59,7 @@ var BackgroundFlow = /*#__PURE__*/function () {
|
|
58
59
|
*/
|
59
60
|
}, {
|
60
61
|
key: "_load",
|
61
|
-
value: function () {
|
62
|
+
value: (function () {
|
62
63
|
var _load2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
63
64
|
var _this = this;
|
64
65
|
var authRequest;
|
@@ -124,7 +125,7 @@ var BackgroundFlow = /*#__PURE__*/function () {
|
|
124
125
|
return _load2.apply(this, arguments);
|
125
126
|
}
|
126
127
|
return _load;
|
127
|
-
}()
|
128
|
+
}())
|
128
129
|
}, {
|
129
130
|
key: "authorize",
|
130
131
|
value: function authorize() {
|
@@ -37,6 +37,7 @@ import '../global/data-tests.js';
|
|
37
37
|
import 'core-js/modules/es.array.reduce.js';
|
38
38
|
import 'core-js/modules/es.object.entries.js';
|
39
39
|
import '../global/dom.js';
|
40
|
+
import 'core-js/modules/es.object.assign.js';
|
40
41
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
41
42
|
import 'core-js/modules/es.string.split.js';
|
42
43
|
import 'core-js/modules/es.set.js';
|
@@ -56,6 +57,7 @@ import 'core-js/modules/es.string.includes.js';
|
|
56
57
|
import 'core-js/modules/es.array.slice.js';
|
57
58
|
import 'core-js/modules/es.array.splice.js';
|
58
59
|
import 'core-js/modules/es.string.match.js';
|
60
|
+
import 'core-js/modules/es.array.find-index.js';
|
59
61
|
import 'combokeys';
|
60
62
|
import '../global/sniffer.js';
|
61
63
|
import 'sniffr';
|
@@ -32,10 +32,12 @@ import 'core-js/modules/es.array.map.js';
|
|
32
32
|
import '../shortcuts/core.js';
|
33
33
|
import 'core-js/modules/es.array.includes.js';
|
34
34
|
import 'core-js/modules/es.string.includes.js';
|
35
|
+
import 'core-js/modules/es.object.assign.js';
|
35
36
|
import 'core-js/modules/es.array.slice.js';
|
36
37
|
import 'core-js/modules/es.array.splice.js';
|
37
38
|
import 'core-js/modules/es.regexp.exec.js';
|
38
39
|
import 'core-js/modules/es.string.match.js';
|
40
|
+
import 'core-js/modules/es.array.find-index.js';
|
39
41
|
import 'combokeys';
|
40
42
|
import '../global/sniffer.js';
|
41
43
|
import 'sniffr';
|
@@ -66,7 +68,9 @@ import 'scrollbar-width';
|
|
66
68
|
import '../loader-screen/loader-screen.js';
|
67
69
|
import '../loader/loader.js';
|
68
70
|
import '../loader/loader__core.js';
|
71
|
+
import 'core-js/modules/es.array.fill.js';
|
69
72
|
import './background-flow.js';
|
73
|
+
import 'core-js/modules/es.array.index-of.js';
|
70
74
|
import 'es6-error';
|
71
75
|
import '../global/url.js';
|
72
76
|
import '../_helpers/link.js';
|
@@ -96,7 +100,7 @@ var IFrameFlow = /*#__PURE__*/function () {
|
|
96
100
|
*/
|
97
101
|
_createClass(IFrameFlow, [{
|
98
102
|
key: "_load",
|
99
|
-
value: function () {
|
103
|
+
value: (function () {
|
100
104
|
var _load2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
101
105
|
var _this2 = this;
|
102
106
|
var authRequest, renderFallbackLink;
|
@@ -148,7 +152,7 @@ var IFrameFlow = /*#__PURE__*/function () {
|
|
148
152
|
});
|
149
153
|
var cleanUp = function cleanUp() {
|
150
154
|
var _this2$hideDialog;
|
151
|
-
(_this2$hideDialog = _this2.hideDialog) === null || _this2$hideDialog === void 0
|
155
|
+
(_this2$hideDialog = _this2.hideDialog) === null || _this2$hideDialog === void 0 || _this2$hideDialog.call(_this2);
|
152
156
|
removeStateListener();
|
153
157
|
removeTokenListener();
|
154
158
|
};
|
@@ -163,7 +167,7 @@ var IFrameFlow = /*#__PURE__*/function () {
|
|
163
167
|
return _load2.apply(this, arguments);
|
164
168
|
}
|
165
169
|
return _load;
|
166
|
-
}()
|
170
|
+
}())
|
167
171
|
}, {
|
168
172
|
key: "stop",
|
169
173
|
value: function stop() {
|
@@ -1,10 +1,12 @@
|
|
1
1
|
import { _ as _defineProperty, d as _createClass, c as _classCallCheck, h as _asyncToGenerator, i as _regeneratorRuntime } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.map.js';
|
3
|
+
import 'core-js/modules/es.object.assign.js';
|
3
4
|
import uuid from 'simply-uuid';
|
4
5
|
import { encodeURL } from '../global/url.js';
|
5
6
|
import 'core-js/modules/es.array.concat.js';
|
6
7
|
import 'core-js/modules/es.regexp.exec.js';
|
7
8
|
import 'core-js/modules/es.string.match.js';
|
9
|
+
import 'core-js/modules/es.array.index-of.js';
|
8
10
|
import 'core-js/modules/es.string.replace.js';
|
9
11
|
|
10
12
|
var AuthRequestBuilder = /*#__PURE__*/function () {
|
@@ -30,7 +32,7 @@ var AuthRequestBuilder = /*#__PURE__*/function () {
|
|
30
32
|
*/
|
31
33
|
_createClass(AuthRequestBuilder, [{
|
32
34
|
key: "prepareAuthRequest",
|
33
|
-
value:
|
35
|
+
value: (
|
34
36
|
/**
|
35
37
|
* Save state and build an auth server redirect URL.
|
36
38
|
*
|
@@ -87,6 +89,7 @@ var AuthRequestBuilder = /*#__PURE__*/function () {
|
|
87
89
|
* @return {Promise}
|
88
90
|
* @private
|
89
91
|
*/
|
92
|
+
)
|
90
93
|
}, {
|
91
94
|
key: "_saveState",
|
92
95
|
value: function _saveState(id, storedState) {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, k as _assertThisInitialized, d as _createClass, g as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.object.to-string.js';
|
3
3
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
4
|
+
import 'core-js/modules/es.array.index-of.js';
|
4
5
|
import 'core-js/modules/es.regexp.exec.js';
|
5
6
|
import 'core-js/modules/es.string.replace.js';
|
6
7
|
import 'core-js/modules/es.regexp.to-string.js';
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { d as _createClass, c as _classCallCheck, _ as _defineProperty, h as _asyncToGenerator, i as _regeneratorRuntime } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import 'core-js/modules/es.array.index-of.js';
|
2
3
|
import 'core-js/modules/es.array.filter.js';
|
3
4
|
import 'core-js/modules/es.object.to-string.js';
|
4
5
|
import 'core-js/modules/es.array.reduce.js';
|
@@ -37,6 +38,7 @@ import '../loader-inline/loader-inline.js';
|
|
37
38
|
import '../global/data-tests.js';
|
38
39
|
import 'core-js/modules/es.object.entries.js';
|
39
40
|
import '../global/dom.js';
|
41
|
+
import 'core-js/modules/es.object.assign.js';
|
40
42
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
41
43
|
import 'core-js/modules/es.string.split.js';
|
42
44
|
import 'core-js/modules/es.set.js';
|
@@ -57,6 +59,7 @@ import 'core-js/modules/es.string.includes.js';
|
|
57
59
|
import 'core-js/modules/es.array.slice.js';
|
58
60
|
import 'core-js/modules/es.array.splice.js';
|
59
61
|
import 'core-js/modules/es.string.match.js';
|
62
|
+
import 'core-js/modules/es.array.find-index.js';
|
60
63
|
import 'combokeys';
|
61
64
|
import '../global/sniffer.js';
|
62
65
|
import 'sniffr';
|
@@ -173,7 +176,7 @@ var AuthStorage = /*#__PURE__*/function () {
|
|
173
176
|
*/
|
174
177
|
}, {
|
175
178
|
key: "saveState",
|
176
|
-
value: function () {
|
179
|
+
value: (function () {
|
177
180
|
var _saveState = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(id, state, dontCleanAndRetryOnFail) {
|
178
181
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
179
182
|
while (1) switch (_context.prev = _context.next) {
|
@@ -216,9 +219,10 @@ var AuthStorage = /*#__PURE__*/function () {
|
|
216
219
|
*
|
217
220
|
* @return {Promise} promise that is resolved when OLD states [and some selected] are removed
|
218
221
|
*/
|
222
|
+
)
|
219
223
|
}, {
|
220
224
|
key: "cleanStates",
|
221
|
-
value: function () {
|
225
|
+
value: (function () {
|
222
226
|
var _cleanStates = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(removeStateId) {
|
223
227
|
var _this = this;
|
224
228
|
var now, removalResult, currentStates, stateStorageSize, removalPromises;
|
@@ -296,9 +300,10 @@ var AuthStorage = /*#__PURE__*/function () {
|
|
296
300
|
* @param {string} id unique state identifier
|
297
301
|
* @return {Promise.<StoredState>}
|
298
302
|
*/
|
303
|
+
)
|
299
304
|
}, {
|
300
305
|
key: "getState",
|
301
|
-
value: function () {
|
306
|
+
value: (function () {
|
302
307
|
var _getState = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(id) {
|
303
308
|
var result;
|
304
309
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
@@ -335,6 +340,7 @@ var AuthStorage = /*#__PURE__*/function () {
|
|
335
340
|
* @param {StoredToken} token
|
336
341
|
* @return {Promise} promise that is resolved when the token is saved
|
337
342
|
*/
|
343
|
+
)
|
338
344
|
}, {
|
339
345
|
key: "saveToken",
|
340
346
|
value: function saveToken(token) {
|
@@ -363,7 +369,7 @@ var AuthStorage = /*#__PURE__*/function () {
|
|
363
369
|
*/
|
364
370
|
}, {
|
365
371
|
key: "getCachedUser",
|
366
|
-
value: function () {
|
372
|
+
value: (function () {
|
367
373
|
var _getCachedUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(loadUser) {
|
368
374
|
var _this2 = this;
|
369
375
|
var user, loadAndCache;
|
@@ -402,6 +408,7 @@ var AuthStorage = /*#__PURE__*/function () {
|
|
402
408
|
/**
|
403
409
|
* Remove cached user if any
|
404
410
|
*/
|
411
|
+
)
|
405
412
|
}, {
|
406
413
|
key: "wipeCachedCurrentUser",
|
407
414
|
value: function wipeCachedCurrentUser() {
|