@jetbrains/ring-ui-built 7.0.0-beta.1 → 7.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/_helpers/_rollupPluginBabelHelpers.js +1 -504
- package/components/_helpers/anchor.js +7 -5
- package/components/_helpers/button__classes.js +15 -13
- package/components/_helpers/caption.js +11 -17
- package/components/_helpers/card.js +92 -96
- package/components/_helpers/dialog__body-scroll-preventer.js +10 -17
- package/components/_helpers/header.js +1 -1
- package/components/_helpers/icon__svg.js +27 -23
- package/components/_helpers/input.js +150 -171
- package/components/_helpers/query-assist__suggestions.js +78 -93
- package/components/_helpers/select__filter.js +56 -67
- package/components/_helpers/services-link.js +23 -29
- package/components/_helpers/sidebar.js +91 -93
- package/components/_helpers/tab-link.js +8 -6
- package/components/_helpers/theme.js +55 -51
- package/components/_helpers/title.js +59 -69
- package/components/alert/alert.js +112 -156
- package/components/alert/container.js +32 -39
- package/components/alert-service/alert-service.js +104 -161
- package/components/analytics/analytics.js +12 -20
- package/components/analytics/analytics__custom-plugin.js +52 -68
- package/components/auth/auth.js +2 -27
- package/components/auth/auth__core.d.ts +1 -1
- package/components/auth/auth__core.js +742 -1428
- package/components/auth/background-flow.js +84 -121
- package/components/auth/down-notification.js +31 -69
- package/components/auth/iframe-flow.js +70 -123
- package/components/auth/request-builder.js +46 -77
- package/components/auth/response-parser.js +84 -112
- package/components/auth/storage.js +160 -318
- package/components/auth/token-validator.js +132 -227
- package/components/auth/window-flow.js +84 -121
- package/components/auth-dialog/auth-dialog.js +99 -150
- package/components/auth-dialog-service/auth-dialog-service.js +6 -26
- package/components/avatar/avatar-example-datauri.js +1 -1
- package/components/avatar/avatar.js +94 -123
- package/components/avatar/fallback-avatar.js +20 -34
- package/components/badge/badge.js +32 -38
- package/components/breadcrumbs/breadcrumbs.js +13 -17
- package/components/button/button.js +67 -80
- package/components/button-group/button-group.js +27 -36
- package/components/button-set/button-set.js +19 -27
- package/components/button-toolbar/button-toolbar.js +17 -25
- package/components/caret/caret.js +184 -211
- package/components/checkbox/checkbox.js +69 -86
- package/components/clipboard/clipboard-fallback.js +7 -7
- package/components/clipboard/clipboard.js +36 -128
- package/components/code/code.js +83 -151
- package/components/collapse/collapse-content.js +42 -60
- package/components/collapse/collapse-context.js +2 -2
- package/components/collapse/collapse-control.js +12 -12
- package/components/collapse/collapse.js +12 -17
- package/components/collapse/consts.js +4 -4
- package/components/collapse/utils.js +1 -3
- package/components/confirm/confirm.js +57 -87
- package/components/confirm-service/confirm-service.js +23 -44
- package/components/content-layout/content-layout.js +41 -56
- package/components/content-layout/sidebar.js +1 -1
- package/components/contenteditable/contenteditable.js +38 -46
- package/components/control-help/control-help.js +5 -3
- package/components/control-label/control-label.js +9 -8
- package/components/data-list/data-list.js +113 -156
- package/components/data-list/data-list.mock.js +3 -5
- package/components/data-list/item.js +120 -140
- package/components/data-list/selection.js +77 -135
- package/components/data-list/title.js +2 -10
- package/components/date-picker/consts.js +16 -22
- package/components/date-picker/date-input.js +99 -124
- package/components/date-picker/date-picker.js +140 -184
- package/components/date-picker/date-popup.js +280 -327
- package/components/date-picker/day.js +71 -94
- package/components/date-picker/month-names.js +41 -59
- package/components/date-picker/month-slider.js +42 -61
- package/components/date-picker/month.js +17 -24
- package/components/date-picker/months.js +44 -49
- package/components/date-picker/weekdays.js +12 -21
- package/components/date-picker/years.js +77 -98
- package/components/dialog/dialog.js +151 -187
- package/components/dialog/dialog__body-scroll-preventer.js +0 -3
- package/components/dropdown/anchor.js +0 -6
- package/components/dropdown/dropdown.js +134 -154
- package/components/dropdown-menu/dropdown-menu.js +59 -87
- package/components/editable-heading/editable-heading.js +69 -116
- package/components/error-bubble/error-bubble.js +29 -54
- package/components/error-message/error-message.js +34 -49
- package/components/footer/footer.js +27 -28
- package/components/global/compose.js +1 -8
- package/components/global/composeRefs.d.ts +0 -3
- package/components/global/composeRefs.js +8 -15
- package/components/global/controls-height.js +2 -2
- package/components/global/create-stateful-context.js +14 -13
- package/components/global/data-tests.js +7 -12
- package/components/global/dom.js +49 -82
- package/components/global/focus-sensor-hoc.js +99 -106
- package/components/global/fuzzy-highlight.js +23 -34
- package/components/global/get-event-key.js +8 -8
- package/components/global/get-uid.js +3 -7
- package/components/global/inject-styles.js +7 -14
- package/components/global/listeners.js +28 -47
- package/components/global/memoize.js +6 -10
- package/components/global/normalize-indent.js +19 -46
- package/components/global/promise-with-timeout.js +6 -8
- package/components/global/prop-types.js +3 -5
- package/components/global/react-dom-renderer.js +29 -40
- package/components/global/rerender-hoc.js +16 -32
- package/components/global/schedule-raf.js +4 -4
- package/components/global/sniffer.js +1 -1
- package/components/global/theme.d.ts +3 -0
- package/components/global/theme.js +2 -19
- package/components/global/trivial-template-tag.js +4 -9
- package/components/global/typescript-utils.js +2 -6
- package/components/global/url.js +20 -23
- package/components/global/use-event-callback.js +7 -4
- package/components/grid/col.js +27 -39
- package/components/grid/grid.js +18 -27
- package/components/grid/row.js +23 -30
- package/components/group/group.js +16 -22
- package/components/header/header-icon.js +19 -31
- package/components/header/header.d.ts +0 -1
- package/components/header/header.js +30 -64
- package/components/header/links.d.ts +2 -0
- package/components/header/links.js +20 -0
- package/components/header/logo.js +15 -26
- package/components/header/profile.js +124 -150
- package/components/header/services-link.js +1 -3
- package/components/header/services.js +64 -97
- package/components/header/smart-profile.js +101 -178
- package/components/header/smart-services.js +55 -90
- package/components/header/tray.js +21 -30
- package/components/heading/heading.js +21 -20
- package/components/http/http.js +162 -319
- package/components/http/http.mock.js +50 -98
- package/components/hub-source/hub-source.js +77 -182
- package/components/hub-source/hub-source__user.js +9 -37
- package/components/hub-source/hub-source__users-groups.js +34 -60
- package/components/i18n/i18n-context.js +7 -8
- package/components/i18n/i18n.js +3 -6
- package/components/icon/icon.js +60 -74
- package/components/icon/icon__svg.js +0 -5
- package/components/icon/index.js +0 -5
- package/components/input/input.js +1 -11
- package/components/island/adaptive-island-hoc.js +29 -37
- package/components/island/content.js +100 -110
- package/components/island/header.js +56 -66
- package/components/island/island.js +25 -33
- package/components/island-legacy/content-legacy.js +16 -22
- package/components/island-legacy/header-legacy.js +19 -25
- package/components/island-legacy/island-legacy.js +16 -22
- package/components/link/clickableLink.js +33 -42
- package/components/link/link.js +47 -55
- package/components/list/consts.js +2 -2
- package/components/list/list.js +399 -486
- package/components/list/list__custom.js +51 -61
- package/components/list/list__hint.js +9 -17
- package/components/list/list__item.js +147 -178
- package/components/list/list__link.js +38 -47
- package/components/list/list__separator.js +15 -24
- package/components/list/list__title.js +25 -34
- package/components/list/list__users-groups-source.js +55 -121
- package/components/loader/loader.js +38 -60
- package/components/loader/loader__core.js +123 -184
- package/components/loader-inline/loader-inline.js +24 -32
- package/components/loader-screen/loader-screen.js +24 -40
- package/components/login-dialog/login-dialog.js +81 -121
- package/components/login-dialog/service.js +6 -29
- package/components/markdown/markdown.js +16 -24
- package/components/message/message.js +170 -201
- package/components/old-browsers-message/old-browsers-message.js +11 -14
- package/components/old-browsers-message/old-browsers-message__stop.js +1 -4
- package/components/old-browsers-message/white-list.js +8 -13
- package/components/pager/pager.js +212 -257
- package/components/panel/panel.js +16 -22
- package/components/permissions/permissions.js +118 -161
- package/components/permissions/permissions__cache.js +191 -218
- package/components/popup/popup.consts.js +1 -1
- package/components/popup/popup.js +237 -288
- package/components/popup/popup.target.js +9 -7
- package/components/popup/position.js +94 -101
- package/components/popup-menu/popup-menu.js +33 -67
- package/components/progress-bar/progress-bar.js +57 -68
- package/components/query-assist/query-assist.js +583 -652
- package/components/query-assist/query-assist__suggestions.js +2 -26
- package/components/radio/radio.js +15 -27
- package/components/radio/radio__item.js +52 -62
- package/components/scrollable-section/scrollable-section.js +53 -0
- package/components/select/select.js +701 -796
- package/components/select/select__filter.js +1 -26
- package/components/select/select__popup.js +316 -413
- package/components/shortcuts/core.js +147 -195
- package/components/shortcuts/shortcut-title.js +6 -10
- package/components/shortcuts/shortcuts-hoc.js +23 -41
- package/components/shortcuts/shortcuts.js +41 -64
- package/components/slider/slider.js +93 -112
- package/components/slider/slider.utils.js +16 -23
- package/components/storage/storage.js +3 -27
- package/components/storage/storage__fallback.js +137 -210
- package/components/storage/storage__local.js +89 -147
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +35 -53
- package/components/table/cell.js +11 -21
- package/components/table/disable-hover-hoc.js +27 -42
- package/components/table/header-cell.js +59 -75
- package/components/table/header.js +89 -110
- package/components/table/multitable.js +83 -89
- package/components/table/row-with-focus-sensor.js +25 -57
- package/components/table/row.js +169 -200
- package/components/table/selection-adapter.js +2 -2
- package/components/table/selection-shortcuts-hoc.js +108 -113
- package/components/table/selection.js +150 -217
- package/components/table/simple-table.js +19 -55
- package/components/table/smart-table.js +42 -76
- package/components/table/table.js +267 -327
- package/components/tabs/collapsible-more.js +47 -73
- package/components/tabs/collapsible-tab.js +32 -36
- package/components/tabs/collapsible-tabs.js +89 -148
- package/components/tabs/custom-item.js +4 -2
- package/components/tabs/dumb-tabs.js +60 -92
- package/components/tabs/smart-tabs.js +29 -61
- package/components/tabs/tab-link.js +1 -3
- package/components/tabs/tab.js +15 -24
- package/components/tabs/tabs.js +1 -26
- package/components/tag/tag.d.ts +0 -2
- package/components/tag/tag.js +120 -162
- package/components/tags-input/tags-input.js +222 -304
- package/components/tags-list/tags-list.js +45 -61
- package/components/text/text.js +28 -37
- package/components/toggle/toggle.js +51 -61
- package/components/tooltip/tooltip.js +109 -141
- package/components/user-agreement/service.js +259 -400
- package/components/user-agreement/user-agreement.js +80 -108
- package/components/user-card/card.js +1 -25
- package/components/user-card/smart-user-card-tooltip.js +52 -103
- package/components/user-card/tooltip.js +35 -65
- package/components/user-card/user-card.js +1 -25
- package/package.json +1 -1
- package/components/global/react-render-adapter.d.ts +0 -1
- package/components/global/react-render-adapter.js +0 -6
- package/components/header/scrollable-section.js +0 -47
- package/components/header/tray-icon.d.ts +0 -1
- package/components/header/tray-icon.js +0 -26
- /package/components/{header → scrollable-section}/scrollable-section.d.ts +0 -0
@@ -1,15 +1,10 @@
|
|
1
|
-
import {
|
2
|
-
import 'core-js/modules/
|
3
|
-
import 'core-js/modules/es.array.filter.js';
|
4
|
-
import 'core-js/modules/es.array.map.js';
|
5
|
-
import 'core-js/modules/es.object.to-string.js';
|
1
|
+
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
6
3
|
import { createRoot } from 'react-dom/client';
|
7
4
|
import getUID from '../global/get-uid.js';
|
8
5
|
import Alert, { ANIMATION_TIME } from '../alert/alert.js';
|
9
6
|
import { jsx } from 'react/jsx-runtime';
|
10
7
|
import Alerts from '../alert/container.js';
|
11
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
12
|
-
import 'core-js/modules/es.object.values.js';
|
13
8
|
import 'react';
|
14
9
|
import 'classnames';
|
15
10
|
import 'prop-types';
|
@@ -23,21 +18,11 @@ import '../icon/icon__constants.js';
|
|
23
18
|
import '../_helpers/icon__svg.js';
|
24
19
|
import 'core-js/modules/es.regexp.exec.js';
|
25
20
|
import 'core-js/modules/es.string.replace.js';
|
26
|
-
import 'core-js/modules/es.string.starts-with.js';
|
27
21
|
import '../global/memoize.js';
|
28
|
-
import 'core-js/modules/es.array.iterator.js';
|
29
|
-
import 'core-js/modules/es.map.js';
|
30
|
-
import 'core-js/modules/es.weak-map.js';
|
31
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
32
22
|
import '../loader-inline/loader-inline.js';
|
33
23
|
import '../global/data-tests.js';
|
34
24
|
import 'core-js/modules/es.array.reduce.js';
|
35
|
-
import 'core-js/modules/es.object.entries.js';
|
36
25
|
import '../global/dom.js';
|
37
|
-
import 'core-js/modules/es.object.assign.js';
|
38
|
-
import 'core-js/modules/es.set.js';
|
39
|
-
import 'core-js/modules/es.string.split.js';
|
40
|
-
import 'core-js/modules/web.dom-collections.for-each.js';
|
41
26
|
import '../button/button.js';
|
42
27
|
import '@jetbrains/icons/chevron-down';
|
43
28
|
import '../link/clickableLink.js';
|
@@ -50,12 +35,6 @@ import '../popup/popup.js';
|
|
50
35
|
import '../global/schedule-raf.js';
|
51
36
|
import '../shortcuts/shortcuts.js';
|
52
37
|
import '../shortcuts/core.js';
|
53
|
-
import 'core-js/modules/es.array.find-index.js';
|
54
|
-
import 'core-js/modules/es.array.includes.js';
|
55
|
-
import 'core-js/modules/es.array.slice.js';
|
56
|
-
import 'core-js/modules/es.array.splice.js';
|
57
|
-
import 'core-js/modules/es.string.includes.js';
|
58
|
-
import 'core-js/modules/es.string.match.js';
|
59
38
|
import 'combokeys';
|
60
39
|
import '../global/sniffer.js';
|
61
40
|
import 'sniffr';
|
@@ -64,156 +43,120 @@ import '../popup/position.js';
|
|
64
43
|
import 'core-js/modules/es.array.sort.js';
|
65
44
|
import '../popup/popup.consts.js';
|
66
45
|
|
67
|
-
|
46
|
+
const _excluded = ["message", "key"],
|
68
47
|
_excluded2 = ["onCloseRequest", "onClose"];
|
69
|
-
|
70
|
-
|
71
|
-
_classCallCheck(this, AlertService);
|
48
|
+
class AlertService {
|
49
|
+
constructor() {
|
72
50
|
_defineProperty(this, "defaultTimeout", 0);
|
73
51
|
// This alerts are stored in inverse order (last shown is first in array)
|
74
52
|
_defineProperty(this, "showingAlerts", []);
|
75
53
|
_defineProperty(this, "containerElement", document.createElement('div'));
|
76
54
|
_defineProperty(this, "reactRoot", createRoot(this.containerElement));
|
77
55
|
}
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
key: "renderAlertContainer",
|
85
|
-
value: function renderAlertContainer(alerts) {
|
86
|
-
if (alerts.length === 0) {
|
87
|
-
return /*#__PURE__*/jsx("span", {});
|
88
|
-
}
|
89
|
-
return /*#__PURE__*/jsx(Alerts, {
|
90
|
-
children: alerts.map(function (alert) {
|
91
|
-
var message = alert.message,
|
92
|
-
key = alert.key,
|
93
|
-
rest = _objectWithoutProperties(alert, _excluded);
|
94
|
-
return /*#__PURE__*/jsx(Alert, _objectSpread2(_objectSpread2({}, rest), {}, {
|
95
|
-
children: message
|
96
|
-
}), key);
|
97
|
-
})
|
98
|
-
});
|
99
|
-
}
|
100
|
-
/**
|
101
|
-
* Renders alert container into virtual node to skip maintaining container
|
102
|
-
*/
|
103
|
-
}, {
|
104
|
-
key: "renderAlerts",
|
105
|
-
value: function renderAlerts() {
|
106
|
-
this.reactRoot.render(this.renderAlertContainer(this.showingAlerts));
|
56
|
+
_getShowingAlerts() {
|
57
|
+
return [...this.showingAlerts];
|
58
|
+
}
|
59
|
+
renderAlertContainer(alerts) {
|
60
|
+
if (alerts.length === 0) {
|
61
|
+
return /*#__PURE__*/jsx("span", {});
|
107
62
|
}
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
63
|
+
return /*#__PURE__*/jsx(Alerts, {
|
64
|
+
children: alerts.map(alert => {
|
65
|
+
const {
|
66
|
+
message,
|
67
|
+
key
|
68
|
+
} = alert,
|
69
|
+
rest = _objectWithoutProperties(alert, _excluded);
|
70
|
+
return /*#__PURE__*/jsx(Alert, _objectSpread2(_objectSpread2({}, rest), {}, {
|
71
|
+
children: message
|
72
|
+
}), key);
|
73
|
+
})
|
74
|
+
});
|
75
|
+
}
|
76
|
+
/**
|
77
|
+
* Renders alert container into virtual node to skip maintaining container
|
78
|
+
*/
|
79
|
+
renderAlerts() {
|
80
|
+
this.reactRoot.render(this.renderAlertContainer(this.showingAlerts));
|
81
|
+
}
|
82
|
+
findSameAlert(message, type) {
|
83
|
+
return this.showingAlerts.filter(it => it.type === type && it.message === message)[0];
|
84
|
+
}
|
85
|
+
startAlertClosing(alert) {
|
86
|
+
alert.isClosing = true;
|
87
|
+
this.renderAlerts();
|
88
|
+
}
|
89
|
+
remove(key) {
|
90
|
+
const alertToClose = this.showingAlerts.filter(alert => alert.key === key)[0];
|
91
|
+
if (!alertToClose) {
|
92
|
+
return;
|
114
93
|
}
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
94
|
+
this.startAlertClosing(alertToClose);
|
95
|
+
}
|
96
|
+
removeWithoutAnimation(key) {
|
97
|
+
this.showingAlerts = this.showingAlerts.filter(alert => alert.key !== key);
|
98
|
+
this.renderAlerts();
|
99
|
+
}
|
100
|
+
stopShakingWhenAnimationDone(shakingAlert) {
|
101
|
+
setTimeout(() => {
|
102
|
+
shakingAlert.showWithAnimation = false;
|
103
|
+
shakingAlert.isShaking = false;
|
119
104
|
this.renderAlerts();
|
120
|
-
}
|
121
|
-
}
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
key: "removeWithoutAnimation",
|
134
|
-
value: function removeWithoutAnimation(key) {
|
135
|
-
this.showingAlerts = this.showingAlerts.filter(function (alert) {
|
136
|
-
return alert.key !== key;
|
137
|
-
});
|
105
|
+
}, ANIMATION_TIME);
|
106
|
+
}
|
107
|
+
addAlert(message, type) {
|
108
|
+
let timeout = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.defaultTimeout;
|
109
|
+
let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
110
|
+
const {
|
111
|
+
onCloseRequest,
|
112
|
+
onClose
|
113
|
+
} = options,
|
114
|
+
restOptions = _objectWithoutProperties(options, _excluded2);
|
115
|
+
const sameAlert = this.findSameAlert(message, type);
|
116
|
+
if (sameAlert) {
|
117
|
+
sameAlert.isShaking = true;
|
138
118
|
this.renderAlerts();
|
119
|
+
this.stopShakingWhenAnimationDone(sameAlert);
|
120
|
+
return sameAlert.key;
|
139
121
|
}
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
var _this2 = this;
|
154
|
-
var timeout = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.defaultTimeout;
|
155
|
-
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
156
|
-
var _onCloseRequest = options.onCloseRequest,
|
157
|
-
_onClose = options.onClose,
|
158
|
-
restOptions = _objectWithoutProperties(options, _excluded2);
|
159
|
-
var sameAlert = this.findSameAlert(message, type);
|
160
|
-
if (sameAlert) {
|
161
|
-
sameAlert.isShaking = true;
|
162
|
-
this.renderAlerts();
|
163
|
-
this.stopShakingWhenAnimationDone(sameAlert);
|
164
|
-
return sameAlert.key;
|
122
|
+
const alert = _objectSpread2({
|
123
|
+
key: getUID('alert-service-'),
|
124
|
+
message,
|
125
|
+
type,
|
126
|
+
timeout,
|
127
|
+
isClosing: false,
|
128
|
+
onCloseRequest: () => {
|
129
|
+
onCloseRequest === null || onCloseRequest === void 0 || onCloseRequest();
|
130
|
+
this.startAlertClosing(alert);
|
131
|
+
},
|
132
|
+
onClose: () => {
|
133
|
+
onClose === null || onClose === void 0 || onClose();
|
134
|
+
this.removeWithoutAnimation(alert.key);
|
165
135
|
}
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
}
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
key: "error",
|
192
|
-
value: function error(message, timeout) {
|
193
|
-
return this.addAlert(message, Alert.Type.ERROR, timeout);
|
194
|
-
}
|
195
|
-
}, {
|
196
|
-
key: "message",
|
197
|
-
value: function message(_message, timeout) {
|
198
|
-
return this.addAlert(_message, Alert.Type.MESSAGE, timeout);
|
199
|
-
}
|
200
|
-
}, {
|
201
|
-
key: "warning",
|
202
|
-
value: function warning(message, timeout) {
|
203
|
-
return this.addAlert(message, Alert.Type.WARNING, timeout);
|
204
|
-
}
|
205
|
-
}, {
|
206
|
-
key: "successMessage",
|
207
|
-
value: function successMessage(message, timeout) {
|
208
|
-
return this.addAlert(message, Alert.Type.SUCCESS, timeout);
|
209
|
-
}
|
210
|
-
}, {
|
211
|
-
key: "loadingMessage",
|
212
|
-
value: function loadingMessage(message, timeout) {
|
213
|
-
return this.addAlert(message, Alert.Type.LOADING, timeout);
|
214
|
-
}
|
215
|
-
}]);
|
216
|
-
}();
|
217
|
-
var alertService = new AlertService();
|
136
|
+
}, restOptions);
|
137
|
+
this.showingAlerts = [alert, ...this.showingAlerts];
|
138
|
+
this.renderAlerts();
|
139
|
+
return alert.key;
|
140
|
+
}
|
141
|
+
setDefaultTimeout(timeout) {
|
142
|
+
this.defaultTimeout = timeout;
|
143
|
+
}
|
144
|
+
error(message, timeout) {
|
145
|
+
return this.addAlert(message, Alert.Type.ERROR, timeout);
|
146
|
+
}
|
147
|
+
message(message, timeout) {
|
148
|
+
return this.addAlert(message, Alert.Type.MESSAGE, timeout);
|
149
|
+
}
|
150
|
+
warning(message, timeout) {
|
151
|
+
return this.addAlert(message, Alert.Type.WARNING, timeout);
|
152
|
+
}
|
153
|
+
successMessage(message, timeout) {
|
154
|
+
return this.addAlert(message, Alert.Type.SUCCESS, timeout);
|
155
|
+
}
|
156
|
+
loadingMessage(message, timeout) {
|
157
|
+
return this.addAlert(message, Alert.Type.LOADING, timeout);
|
158
|
+
}
|
159
|
+
}
|
160
|
+
const alertService = new AlertService();
|
218
161
|
|
219
162
|
export { alertService as default };
|
@@ -1,30 +1,22 @@
|
|
1
|
-
import {
|
2
|
-
import 'core-js/modules/es.object.to-string.js';
|
3
|
-
import 'core-js/modules/web.dom-collections.for-each.js';
|
1
|
+
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
4
2
|
|
5
3
|
/**
|
6
4
|
* @name Analytics
|
7
5
|
*/
|
8
|
-
|
9
|
-
|
10
|
-
_classCallCheck(this, Analytics);
|
6
|
+
class Analytics {
|
7
|
+
constructor() {
|
11
8
|
_defineProperty(this, "_plugins", void 0);
|
12
9
|
this._plugins = [];
|
13
10
|
}
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
plugin.trackEvent(category, action, additionalData);
|
24
|
-
});
|
25
|
-
}
|
26
|
-
}]);
|
27
|
-
}();
|
11
|
+
config(plugins) {
|
12
|
+
this._plugins = plugins;
|
13
|
+
}
|
14
|
+
trackEvent(category, action, additionalData) {
|
15
|
+
this._plugins.forEach(plugin => {
|
16
|
+
plugin.trackEvent(category, action, additionalData);
|
17
|
+
});
|
18
|
+
}
|
19
|
+
}
|
28
20
|
var analytics = new Analytics();
|
29
21
|
|
30
22
|
export { Analytics, analytics as default };
|
@@ -1,10 +1,9 @@
|
|
1
|
-
import {
|
1
|
+
import { _ as _defineProperty, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
_classCallCheck(this, AnalyticsCustomPlugin);
|
3
|
+
const DEFAULT_FLUSH_INTERVAL = 10000;
|
4
|
+
const DEFAULT_FLUSH_MAX_PACK_SIZE = 100;
|
5
|
+
class AnalyticsCustomPlugin {
|
6
|
+
constructor(send, isDevelopment, flushInterval) {
|
8
7
|
_defineProperty(this, "_data", void 0);
|
9
8
|
_defineProperty(this, "_flush", void 0);
|
10
9
|
_defineProperty(this, "_isDevelopment", void 0);
|
@@ -18,71 +17,56 @@ var AnalyticsCustomPlugin = /*#__PURE__*/function () {
|
|
18
17
|
flushInterval
|
19
18
|
});
|
20
19
|
}
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
if (_this._data.length > 0) {
|
27
|
-
_config.send(_this._data);
|
28
|
-
_this._data = [];
|
29
|
-
}
|
30
|
-
};
|
31
|
-
this._isDevelopment = _config.isDevelopment;
|
32
|
-
this._flushInterval = _config.flushInterval || DEFAULT_FLUSH_INTERVAL;
|
33
|
-
this._flushMaxPackSize = _config.flushMaxPackSize || DEFAULT_FLUSH_MAX_PACK_SIZE;
|
34
|
-
}
|
35
|
-
}, {
|
36
|
-
key: "trackEvent",
|
37
|
-
value: function trackEvent(category, action, additionalData) {
|
38
|
-
this._processEvent(category, action, additionalData);
|
39
|
-
}
|
40
|
-
}, {
|
41
|
-
key: "trackPageView",
|
42
|
-
value: function trackPageView(path, data) {
|
43
|
-
this._processEvent('page', 'view', data);
|
44
|
-
}
|
45
|
-
}, {
|
46
|
-
key: "_initSendSchedule",
|
47
|
-
value: function _initSendSchedule() {
|
48
|
-
var _this2 = this;
|
49
|
-
window.addEventListener('beforeunload', function () {
|
50
|
-
var _this2$_flush;
|
51
|
-
return (_this2$_flush = _this2._flush) === null || _this2$_flush === void 0 ? void 0 : _this2$_flush.call(_this2);
|
52
|
-
});
|
53
|
-
if (this._flush != null) {
|
54
|
-
setInterval(this._flush, this._flushInterval);
|
20
|
+
config(config) {
|
21
|
+
this._flush = () => {
|
22
|
+
if (this._data.length > 0) {
|
23
|
+
config.send(this._data);
|
24
|
+
this._data = [];
|
55
25
|
}
|
56
|
-
|
26
|
+
};
|
27
|
+
this._isDevelopment = config.isDevelopment;
|
28
|
+
this._flushInterval = config.flushInterval || DEFAULT_FLUSH_INTERVAL;
|
29
|
+
this._flushMaxPackSize = config.flushMaxPackSize || DEFAULT_FLUSH_MAX_PACK_SIZE;
|
30
|
+
}
|
31
|
+
trackEvent(category, action, additionalData) {
|
32
|
+
this._processEvent(category, action, additionalData);
|
33
|
+
}
|
34
|
+
trackPageView(path, data) {
|
35
|
+
this._processEvent('page', 'view', data);
|
36
|
+
}
|
37
|
+
_initSendSchedule() {
|
38
|
+
window.addEventListener('beforeunload', () => {
|
39
|
+
var _this$_flush;
|
40
|
+
return (_this$_flush = this._flush) === null || _this$_flush === void 0 ? void 0 : _this$_flush.call(this);
|
41
|
+
});
|
42
|
+
if (this._flush != null) {
|
43
|
+
setInterval(this._flush, this._flushInterval);
|
57
44
|
}
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
}
|
64
|
-
if (this._isDevelopment) {
|
65
|
-
console.log('TRACKING DATA = ', category, action, data); // eslint-disable-line no-console
|
66
|
-
}
|
67
|
-
var baseSendingData = {
|
68
|
-
category,
|
69
|
-
action,
|
70
|
-
timestamp: Date.now()
|
71
|
-
};
|
72
|
-
this._addDataToFlushingPack(data ? _objectSpread2(_objectSpread2({}, baseSendingData), {}, {
|
73
|
-
data
|
74
|
-
}) : baseSendingData);
|
45
|
+
this._hasSendSchedule = true;
|
46
|
+
}
|
47
|
+
_processEvent(category, action, data) {
|
48
|
+
if (!this._hasSendSchedule && this._flush) {
|
49
|
+
this._initSendSchedule();
|
75
50
|
}
|
76
|
-
|
77
|
-
|
78
|
-
value: function _addDataToFlushingPack(sendingData) {
|
79
|
-
this._data.push(sendingData);
|
80
|
-
if (this._flushMaxPackSize != null && this._data.length >= this._flushMaxPackSize) {
|
81
|
-
var _this$_flush;
|
82
|
-
(_this$_flush = this._flush) === null || _this$_flush === void 0 || _this$_flush.call(this);
|
83
|
-
}
|
51
|
+
if (this._isDevelopment) {
|
52
|
+
console.log('TRACKING DATA = ', category, action, data); // eslint-disable-line no-console
|
84
53
|
}
|
85
|
-
|
86
|
-
|
54
|
+
const baseSendingData = {
|
55
|
+
category,
|
56
|
+
action,
|
57
|
+
timestamp: Date.now()
|
58
|
+
};
|
59
|
+
this._addDataToFlushingPack(data ? _objectSpread2(_objectSpread2({}, baseSendingData), {}, {
|
60
|
+
data
|
61
|
+
}) : baseSendingData);
|
62
|
+
}
|
63
|
+
_addDataToFlushingPack(sendingData) {
|
64
|
+
this._data.push(sendingData);
|
65
|
+
if (this._flushMaxPackSize != null && this._data.length >= this._flushMaxPackSize) {
|
66
|
+
var _this$_flush2;
|
67
|
+
(_this$_flush2 = this._flush) === null || _this$_flush2 === void 0 || _this$_flush2.call(this);
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
87
71
|
|
88
72
|
export { AnalyticsCustomPlugin as default };
|
package/components/auth/auth.js
CHANGED
@@ -1,29 +1,20 @@
|
|
1
|
-
import {
|
1
|
+
import { b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import WindowFlow from './window-flow.js';
|
3
3
|
import onBackendDown from './down-notification.js';
|
4
4
|
import Auth from './auth__core.js';
|
5
5
|
export { DEFAULT_BACKGROUND_TIMEOUT, DEFAULT_EXPIRES_TIMEOUT, DOMAIN_USER_CHANGED_EVENT, LOGOUT_EVENT, LOGOUT_POSTPONED_EVENT, USER_CHANGED_EVENT, USER_CHANGE_POSTPONED_EVENT } from './auth__core.js';
|
6
|
-
import 'core-js/modules/es.array.concat.js';
|
7
|
-
import 'core-js/modules/es.object.to-string.js';
|
8
|
-
import 'core-js/modules/es.promise.js';
|
9
6
|
import './response-parser.js';
|
10
|
-
import 'core-js/modules/es.array.index-of.js';
|
11
7
|
import 'core-js/modules/es.regexp.exec.js';
|
12
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
13
8
|
import 'core-js/modules/es.string.replace.js';
|
14
|
-
import 'core-js/modules/web.dom-collections.for-each.js';
|
15
9
|
import 'es6-error';
|
16
10
|
import '../global/url.js';
|
17
|
-
import 'core-js/modules/es.string.match.js';
|
18
|
-
import 'core-js/modules/es.array.filter.js';
|
19
11
|
import 'react';
|
20
12
|
import 'prop-types';
|
21
13
|
import '../alert-service/alert-service.js';
|
22
|
-
import 'core-js/modules/
|
14
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
23
15
|
import 'react-dom/client';
|
24
16
|
import '../global/get-uid.js';
|
25
17
|
import '../alert/alert.js';
|
26
|
-
import 'core-js/modules/es.object.values.js';
|
27
18
|
import 'classnames';
|
28
19
|
import '@jetbrains/icons/exception';
|
29
20
|
import '@jetbrains/icons/checkmark';
|
@@ -33,21 +24,12 @@ import '../icon/icon.js';
|
|
33
24
|
import 'util-deprecate';
|
34
25
|
import '../icon/icon__constants.js';
|
35
26
|
import '../_helpers/icon__svg.js';
|
36
|
-
import 'core-js/modules/es.string.starts-with.js';
|
37
27
|
import '../global/memoize.js';
|
38
|
-
import 'core-js/modules/es.array.iterator.js';
|
39
|
-
import 'core-js/modules/es.map.js';
|
40
|
-
import 'core-js/modules/es.weak-map.js';
|
41
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
42
28
|
import 'react/jsx-runtime';
|
43
29
|
import '../loader-inline/loader-inline.js';
|
44
30
|
import '../global/data-tests.js';
|
45
31
|
import 'core-js/modules/es.array.reduce.js';
|
46
|
-
import 'core-js/modules/es.object.entries.js';
|
47
32
|
import '../global/dom.js';
|
48
|
-
import 'core-js/modules/es.object.assign.js';
|
49
|
-
import 'core-js/modules/es.set.js';
|
50
|
-
import 'core-js/modules/es.string.split.js';
|
51
33
|
import '../button/button.js';
|
52
34
|
import '@jetbrains/icons/chevron-down';
|
53
35
|
import '../link/clickableLink.js';
|
@@ -60,11 +42,6 @@ import '../popup/popup.js';
|
|
60
42
|
import '../global/schedule-raf.js';
|
61
43
|
import '../shortcuts/shortcuts.js';
|
62
44
|
import '../shortcuts/core.js';
|
63
|
-
import 'core-js/modules/es.array.find-index.js';
|
64
|
-
import 'core-js/modules/es.array.includes.js';
|
65
|
-
import 'core-js/modules/es.array.slice.js';
|
66
|
-
import 'core-js/modules/es.array.splice.js';
|
67
|
-
import 'core-js/modules/es.string.includes.js';
|
68
45
|
import 'combokeys';
|
69
46
|
import '../global/sniffer.js';
|
70
47
|
import 'sniffr';
|
@@ -76,13 +53,11 @@ import '../alert/container.js';
|
|
76
53
|
import '../link/link.js';
|
77
54
|
import '../_helpers/link.js';
|
78
55
|
import '../group/group.js';
|
79
|
-
import 'core-js/modules/es.string.search.js';
|
80
56
|
import 'core-js/modules/web.url.js';
|
81
57
|
import 'core-js/modules/web.url.to-json.js';
|
82
58
|
import 'core-js/modules/web.url-search-params.js';
|
83
59
|
import '../global/listeners.js';
|
84
60
|
import '../http/http.js';
|
85
|
-
import 'core-js/modules/es.reflect.delete-property.js';
|
86
61
|
import '../global/promise-with-timeout.js';
|
87
62
|
import '../i18n/i18n.js';
|
88
63
|
import './storage.js';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import Listeners, { Handler } from '../global/listeners';
|
2
2
|
import HTTP, { HTTPAuth, RequestParams } from '../http/http';
|
3
|
-
import AuthDialogService from '../auth-dialog-service/auth-dialog-service';
|
3
|
+
import type AuthDialogService from '../auth-dialog-service/auth-dialog-service';
|
4
4
|
import AuthStorage, { AuthState } from './storage';
|
5
5
|
import { AuthError, AuthResponse } from './response-parser';
|
6
6
|
import AuthRequestBuilder from './request-builder';
|