@jetbrains/ring-ui-built 7.0.66 → 7.0.71
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/anchor.js +12 -17
- package/components/_helpers/avatar-info.js +4 -5
- package/components/_helpers/button.classes.js +20 -21
- package/components/_helpers/caption.js +3 -3
- package/components/_helpers/card.js +26 -32
- package/components/_helpers/dialog-body-scroll-preventer.js +1 -2
- package/components/_helpers/icon-svg.js +9 -12
- package/components/_helpers/input.js +78 -86
- package/components/_helpers/loader-core.js +260 -0
- package/components/_helpers/query-assist-suggestions.js +0 -1
- package/components/_helpers/select-filter.js +19 -26
- package/components/_helpers/services-link.js +9 -12
- package/components/_helpers/sidebar.js +36 -44
- package/components/_helpers/tab-link.js +9 -11
- package/components/_helpers/theme.js +20 -24
- package/components/_helpers/title.js +12 -17
- package/components/alert/alert.js +41 -49
- package/components/alert/container.js +9 -12
- package/components/alert-service/alert-service.js +23 -32
- package/components/analytics/analytics-custom-plugin.js +12 -17
- package/components/analytics/analytics.js +1 -3
- package/components/auth/auth-core.js +128 -170
- package/components/auth/auth.js +3 -10
- package/components/auth/background-flow.js +5 -8
- package/components/auth/down-notification.js +9 -17
- package/components/auth/iframe-flow.js +13 -19
- package/components/auth/request-builder.js +4 -9
- package/components/auth/response-parser.js +9 -12
- package/components/auth/storage.js +12 -18
- package/components/auth/token-validator.js +19 -30
- package/components/auth/window-flow.js +22 -27
- package/components/auth-dialog/auth-dialog.js +40 -48
- package/components/auth-dialog-service/auth-dialog-service.js +10 -13
- package/components/avatar/avatar.figma.js +6 -6
- package/components/avatar/avatar.js +58 -59
- package/components/avatar/fallback-avatar.js +8 -11
- package/components/avatar-stack/avatar-stack.figma.js +10 -11
- package/components/avatar-stack/avatar-stack.js +25 -31
- package/components/banner/banner.js +0 -6
- package/components/breadcrumbs/breadcrumbs.figma.js +8 -6
- package/components/breadcrumbs/breadcrumbs.js +4 -5
- package/components/button/button.figma.js +15 -10
- package/components/button/button.js +59 -64
- package/components/button-group/button-group.js +11 -15
- package/components/button-group/caption.js +0 -1
- package/components/button-set/button-set.js +9 -12
- package/components/button-toolbar/button-toolbar.js +8 -11
- package/components/caret/caret.js +20 -28
- package/components/checkbox/checkbox-group.figma.js +8 -10
- package/components/checkbox/checkbox.figma.js +5 -5
- package/components/checkbox/checkbox.js +27 -35
- package/components/clipboard/clipboard-fallback.js +3 -3
- package/components/clipboard/clipboard.js +3 -16
- package/components/code/code.js +8 -14
- package/components/collapse/collapse-content.js +10 -15
- package/components/collapse/collapse-control.js +5 -7
- package/components/collapse/collapse.js +9 -11
- package/components/collapse/utils.js +1 -1
- package/components/confirm/confirm.js +17 -26
- package/components/confirm-service/confirm-service.js +30 -31
- package/components/content-layout/content-layout.js +21 -28
- package/components/content-layout/sidebar.js +0 -2
- package/components/contenteditable/contenteditable.js +23 -28
- package/components/control-help/control-help.js +8 -10
- package/components/control-label/control-label.js +12 -17
- package/components/data-list/data-list.js +57 -65
- package/components/data-list/data-list.mock.js +0 -4
- package/components/data-list/item.js +65 -72
- package/components/data-list/selection.js +11 -19
- package/components/data-list/title.js +0 -4
- package/components/date-picker/consts.js +3 -4
- package/components/date-picker/date-input.js +25 -33
- package/components/date-picker/date-picker.js +179 -193
- package/components/date-picker/date-popup.js +135 -127
- package/components/date-picker/day.d.ts +1 -1
- package/components/date-picker/day.js +24 -30
- package/components/date-picker/month-names.js +7 -12
- package/components/date-picker/month-slider.js +16 -22
- package/components/date-picker/month.js +3 -5
- package/components/date-picker/months.js +6 -6
- package/components/date-picker/weekdays.js +0 -1
- package/components/date-picker/years.js +20 -26
- package/components/dialog/dialog-body-scroll-preventer.js +0 -1
- package/components/dialog/dialog.js +73 -83
- package/components/dropdown/anchor.js +0 -4
- package/components/dropdown/dropdown.js +98 -114
- package/components/dropdown-menu/dropdown-menu.js +80 -79
- package/components/editable-heading/editable-heading.js +48 -54
- package/components/error-bubble/error-bubble.figma.js +4 -4
- package/components/error-bubble/error-bubble.js +9 -13
- package/components/error-message/error-message.js +1 -6
- package/components/footer/footer.js +11 -15
- package/components/global/compose-refs.js +1 -4
- package/components/global/compose.js +1 -4
- package/components/global/configuration.js +3 -3
- package/components/global/controls-height.js +0 -1
- package/components/global/create-stateful-context.js +10 -14
- package/components/global/data-tests.js +2 -10
- package/components/global/dom.js +6 -19
- package/components/global/focus-sensor-hoc.js +74 -87
- package/components/global/fuzzy-highlight.js +3 -8
- package/components/global/get-uid.js +1 -1
- package/components/global/inject-styles.js +5 -6
- package/components/global/listeners.js +2 -11
- package/components/global/memoize.js +0 -2
- package/components/global/normalize-indent.js +2 -6
- package/components/global/promise-with-timeout.js +4 -5
- package/components/global/react-dom-renderer.js +4 -9
- package/components/global/rerender-hoc.js +8 -11
- package/components/global/schedule-raf.js +1 -2
- package/components/global/theme.js +0 -5
- package/components/global/trivial-template-tag.js +1 -6
- package/components/global/url.js +2 -6
- package/components/global/use-event-callback.js +2 -3
- package/components/grid/col.js +7 -18
- package/components/grid/grid.js +9 -14
- package/components/grid/row.js +7 -11
- package/components/group/group.js +9 -12
- package/components/header/header-icon.js +8 -13
- package/components/header/header.js +16 -27
- package/components/header/links.js +7 -10
- package/components/header/logo.js +12 -16
- package/components/header/profile.js +73 -83
- package/components/header/services-link.js +0 -2
- package/components/header/services.js +32 -43
- package/components/header/smart-profile.js +44 -59
- package/components/header/smart-services.js +33 -45
- package/components/header/tray.js +8 -10
- package/components/heading/heading.js +27 -27
- package/components/http/http.js +120 -125
- package/components/http/http.mock.js +6 -10
- package/components/hub-source/hub-source-user.js +6 -13
- package/components/hub-source/hub-source-users-groups.js +8 -12
- package/components/hub-source/hub-source.js +8 -10
- package/components/i18n/i18n-context.js +4 -7
- package/components/i18n/i18n.js +5 -5
- package/components/icon/icon-svg.js +0 -4
- package/components/icon/icon.js +28 -32
- package/components/icon/index.js +0 -4
- package/components/input/input.figma.js +8 -8
- package/components/input/input.js +0 -4
- package/components/island/adaptive-island-hoc.js +19 -23
- package/components/island/content.js +70 -75
- package/components/island/header.js +21 -21
- package/components/island/island.js +11 -14
- package/components/link/clickable-link.js +30 -37
- package/components/link/link.js +27 -29
- package/components/list/list-custom.js +6 -11
- package/components/list/list-item.js +49 -56
- package/components/list/list-separator.js +0 -1
- package/components/list/list-title.js +0 -1
- package/components/list/list-users-groups-source.js +14 -22
- package/components/list/list.classes.js +8 -9
- package/components/list/list.js +387 -404
- package/components/loader/loader-core.js +2 -265
- package/components/loader/loader.d.ts +8 -0
- package/components/loader/loader.js +43 -29
- package/components/loader-inline/loader-inline.js +9 -12
- package/components/loader-screen/loader-screen.js +10 -14
- package/components/login-dialog/login-dialog.js +46 -54
- package/components/login-dialog/service.js +13 -15
- package/components/message/message.js +65 -79
- package/components/old-browsers-message/old-browsers-message-stop.js +0 -3
- package/components/old-browsers-message/old-browsers-message.js +1 -4
- package/components/old-browsers-message/white-list.js +5 -7
- package/components/pager/pager.js +73 -88
- package/components/panel/panel.js +9 -12
- package/components/permissions/permissions-cache.js +6 -8
- package/components/permissions/permissions.js +19 -21
- package/components/popup/popup.js +136 -145
- package/components/popup/popup.target.js +8 -10
- package/components/popup/position-css.js +19 -27
- package/components/popup/position.js +22 -28
- package/components/popup-menu/popup-menu.js +27 -37
- package/components/progress-bar/progress-bar.js +26 -32
- package/components/query-assist/query-assist-suggestions.js +0 -6
- package/components/query-assist/query-assist.js +432 -468
- package/components/radio/radio-item.js +30 -40
- package/components/radio/radio.js +6 -10
- package/components/scrollable-section/scrollable-section.js +7 -10
- package/components/select/select-filter.js +0 -6
- package/components/select/select-popup.js +155 -174
- package/components/select/select.js +464 -479
- package/components/shortcuts/core.js +40 -45
- package/components/shortcuts/shortcut-title.js +0 -1
- package/components/shortcuts/shortcuts-hoc.js +9 -15
- package/components/shortcuts/shortcuts.js +3 -5
- package/components/slider/slider.js +53 -66
- package/components/slider/slider.utils.js +1 -4
- package/components/storage/storage-local.js +2 -8
- package/components/storage/storage.js +0 -5
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +21 -30
- package/components/table/cell.js +3 -4
- package/components/table/disable-hover-hoc.js +24 -28
- package/components/table/header-cell.js +30 -38
- package/components/table/header.js +20 -28
- package/components/table/multitable.js +81 -101
- package/components/table/row-with-focus-sensor.js +17 -28
- package/components/table/row.js +89 -99
- package/components/table/selection-adapter.js +0 -2
- package/components/table/selection-shortcuts-hoc.js +159 -161
- package/components/table/selection.js +23 -31
- package/components/table/simple-table.js +16 -22
- package/components/table/smart-table.js +19 -26
- package/components/table/table.js +137 -146
- package/components/tabs/collapsible-more.js +34 -47
- package/components/tabs/collapsible-tab.js +28 -33
- package/components/tabs/collapsible-tabs.js +16 -24
- package/components/tabs/custom-item.js +3 -6
- package/components/tabs/dumb-tabs.js +48 -64
- package/components/tabs/smart-tabs.js +14 -23
- package/components/tabs/tab-link.js +0 -2
- package/components/tabs/tab.js +0 -1
- package/components/tabs/tabs.js +0 -7
- package/components/tag/tag.js +30 -35
- package/components/tags-input/tags-input.js +192 -218
- package/components/tags-list/tags-list.js +26 -31
- package/components/text/text.js +16 -19
- package/components/toggle/toggle.js +19 -23
- package/components/tooltip/tooltip.js +110 -121
- package/components/upload/upload.js +19 -28
- package/components/user-agreement/service.js +247 -252
- package/components/user-agreement/toolbox.eula.js +160 -1
- package/components/user-agreement/user-agreement.js +23 -32
- package/components/user-card/card.js +0 -5
- package/components/user-card/smart-user-card-tooltip.js +41 -50
- package/components/user-card/tooltip.js +32 -38
- package/components/user-card/user-card.js +0 -5
- package/package.json +9 -3
- package/components/_helpers/_rollupPluginBabelHelpers.js +0 -72
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
1
|
import { jsx } from 'react/jsx-runtime';
|
|
4
2
|
import { PureComponent } from 'react';
|
|
5
3
|
import alertService from '../alert-service/alert-service.js';
|
|
@@ -18,8 +16,6 @@ import '../icon/icon.js';
|
|
|
18
16
|
import 'util-deprecate';
|
|
19
17
|
import '../icon/icon.constants.js';
|
|
20
18
|
import '../_helpers/icon-svg.js';
|
|
21
|
-
import 'core-js/modules/es.regexp.exec.js';
|
|
22
|
-
import 'core-js/modules/es.string.replace.js';
|
|
23
19
|
import '../global/memoize.js';
|
|
24
20
|
import '../loader-inline/loader-inline.js';
|
|
25
21
|
import '../global/data-tests.js';
|
|
@@ -43,7 +39,6 @@ import '../global/sniffer.js';
|
|
|
43
39
|
import 'sniffr';
|
|
44
40
|
import '../tab-trap/tab-trap.js';
|
|
45
41
|
import '../popup/position.js';
|
|
46
|
-
import 'core-js/modules/es.array.sort.js';
|
|
47
42
|
import '../popup/popup.consts.js';
|
|
48
43
|
import '../popup/position-css.js';
|
|
49
44
|
import '../alert/container.js';
|
|
@@ -54,8 +49,6 @@ import '../avatar/avatar-size.js';
|
|
|
54
49
|
import '../avatar/fallback-avatar.js';
|
|
55
50
|
import '../dropdown-menu/dropdown-menu.js';
|
|
56
51
|
import '../list/list.js';
|
|
57
|
-
import 'core-js/modules/es.symbol.description.js';
|
|
58
|
-
import 'core-js/modules/es.string.trim.js';
|
|
59
52
|
import 'react-virtualized/dist/es/List';
|
|
60
53
|
import 'react-virtualized/dist/es/AutoSizer';
|
|
61
54
|
import 'react-virtualized/dist/es/WindowScroller';
|
|
@@ -89,9 +82,6 @@ import '../auth/window-flow.js';
|
|
|
89
82
|
import '../auth/response-parser.js';
|
|
90
83
|
import '../auth/down-notification.js';
|
|
91
84
|
import '../group/group.js';
|
|
92
|
-
import 'core-js/modules/web.url.js';
|
|
93
|
-
import 'core-js/modules/web.url.to-json.js';
|
|
94
|
-
import 'core-js/modules/web.url-search-params.js';
|
|
95
85
|
import '../global/listeners.js';
|
|
96
86
|
import '../http/http.js';
|
|
97
87
|
import '../global/promise-with-timeout.js';
|
|
@@ -102,46 +92,43 @@ import 'simply-uuid';
|
|
|
102
92
|
import '../auth/background-flow.js';
|
|
103
93
|
import '../auth/token-validator.js';
|
|
104
94
|
|
|
105
|
-
const _excluded = ["auth", "profileUrl"];
|
|
106
95
|
const CERTIFICATE_MISMATCH_HEADER = 'x-client-certificate-token-mismatch';
|
|
107
96
|
class SmartProfile extends PureComponent {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
isUserChangePostponed: false
|
|
115
|
-
});
|
|
116
|
-
_defineProperty(this, "login", async () => {
|
|
117
|
-
this.setState({
|
|
118
|
-
loading: true
|
|
119
|
-
});
|
|
120
|
-
try {
|
|
121
|
-
await this.props.auth.login();
|
|
122
|
-
} catch (err) {
|
|
123
|
-
// eslint-disable-next-line no-console
|
|
124
|
-
console.debug('Profile login errored', err);
|
|
125
|
-
} finally {
|
|
126
|
-
this.setState({
|
|
127
|
-
loading: false
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
_defineProperty(this, "logout", () => this.props.auth.logout());
|
|
132
|
-
_defineProperty(this, "switchUser", () => this.props.auth.switchUser());
|
|
133
|
-
_defineProperty(this, "onRevertPostponement", () => {
|
|
134
|
-
if (this.state.isLogoutPostponed) {
|
|
135
|
-
this.props.auth.login();
|
|
136
|
-
}
|
|
137
|
-
if (this.state.isUserChangePostponed) {
|
|
138
|
-
this.props.auth.updateUser();
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
}
|
|
97
|
+
state = {
|
|
98
|
+
user: null,
|
|
99
|
+
size: Profile.defaultProps.size,
|
|
100
|
+
isLogoutPostponed: false,
|
|
101
|
+
isUserChangePostponed: false
|
|
102
|
+
};
|
|
142
103
|
componentDidMount() {
|
|
143
104
|
this.requestUser();
|
|
144
105
|
}
|
|
106
|
+
static Size = Profile.Size;
|
|
107
|
+
login = async () => {
|
|
108
|
+
this.setState({
|
|
109
|
+
loading: true
|
|
110
|
+
});
|
|
111
|
+
try {
|
|
112
|
+
await this.props.auth.login();
|
|
113
|
+
} catch (err) {
|
|
114
|
+
// eslint-disable-next-line no-console
|
|
115
|
+
console.debug('Profile login errored', err);
|
|
116
|
+
} finally {
|
|
117
|
+
this.setState({
|
|
118
|
+
loading: false
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
logout = () => this.props.auth.logout();
|
|
123
|
+
switchUser = () => this.props.auth.switchUser();
|
|
124
|
+
onRevertPostponement = () => {
|
|
125
|
+
if (this.state.isLogoutPostponed) {
|
|
126
|
+
this.props.auth.login();
|
|
127
|
+
}
|
|
128
|
+
if (this.state.isUserChangePostponed) {
|
|
129
|
+
this.props.auth.updateUser();
|
|
130
|
+
}
|
|
131
|
+
};
|
|
145
132
|
async requestUser() {
|
|
146
133
|
try {
|
|
147
134
|
const {
|
|
@@ -174,14 +161,13 @@ class SmartProfile extends PureComponent {
|
|
|
174
161
|
}
|
|
175
162
|
}
|
|
176
163
|
checkUserCertificateMismatch(user) {
|
|
177
|
-
var _userMeta$headers;
|
|
178
164
|
const {
|
|
179
165
|
auth,
|
|
180
166
|
translations
|
|
181
167
|
} = this.props;
|
|
182
168
|
const userMeta = auth.http.getMetaForResponse(user);
|
|
183
|
-
if (userMeta
|
|
184
|
-
const message =
|
|
169
|
+
if (userMeta?.headers?.has(CERTIFICATE_MISMATCH_HEADER)) {
|
|
170
|
+
const message = translations?.certificateMismatch || `You are authenticated as ${user.login || user.name}. To authenticate with the client certificate for your account, log out, then click the "Log in with certificate" option on the login page.`;
|
|
185
171
|
alertService.warning(message, 0);
|
|
186
172
|
}
|
|
187
173
|
}
|
|
@@ -192,14 +178,13 @@ class SmartProfile extends PureComponent {
|
|
|
192
178
|
isLogoutPostponed,
|
|
193
179
|
isUserChangePostponed
|
|
194
180
|
} = this.state;
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
return jsx(Profile, _objectSpread2({
|
|
181
|
+
const {
|
|
182
|
+
auth,
|
|
183
|
+
profileUrl,
|
|
184
|
+
...props
|
|
185
|
+
} = this.props;
|
|
186
|
+
const url = profileUrl || (user ? `${auth.config.serverUri}users/${user.id}` : '');
|
|
187
|
+
return jsx(Profile, {
|
|
203
188
|
onLogin: this.login,
|
|
204
189
|
onLogout: this.logout,
|
|
205
190
|
onSwitchUser: this.switchUser,
|
|
@@ -210,10 +195,10 @@ class SmartProfile extends PureComponent {
|
|
|
210
195
|
showLogIn: isLogoutPostponed,
|
|
211
196
|
showLogOut: !isLogoutPostponed,
|
|
212
197
|
showSwitchUser: auth._canShowDialogs() && !isLogoutPostponed && !isUserChangePostponed,
|
|
213
|
-
onRevertPostponement: this.onRevertPostponement
|
|
214
|
-
|
|
198
|
+
onRevertPostponement: this.onRevertPostponement,
|
|
199
|
+
...props
|
|
200
|
+
});
|
|
215
201
|
}
|
|
216
202
|
}
|
|
217
|
-
_defineProperty(SmartProfile, "Size", Profile.Size);
|
|
218
203
|
|
|
219
204
|
export { SmartProfile as default };
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
1
|
import { jsx } from 'react/jsx-runtime';
|
|
4
2
|
import { Component } from 'react';
|
|
5
3
|
import HTTP from '../http/http.js';
|
|
6
4
|
import Services from './services.js';
|
|
7
5
|
import '../global/url.js';
|
|
8
|
-
import 'core-js/modules/es.regexp.exec.js';
|
|
9
|
-
import 'core-js/modules/es.string.replace.js';
|
|
10
|
-
import 'core-js/modules/es.array.sort.js';
|
|
11
6
|
import '@jetbrains/icons/services-20px';
|
|
12
7
|
import 'classnames';
|
|
13
8
|
import '../dropdown/dropdown.js';
|
|
@@ -48,42 +43,19 @@ import '../_helpers/services-link.js';
|
|
|
48
43
|
import '../link/link.js';
|
|
49
44
|
import '../_helpers/link.js';
|
|
50
45
|
|
|
51
|
-
const _excluded = ["auth"];
|
|
52
46
|
function noop() {}
|
|
53
47
|
class SmartServices extends Component {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
services: null
|
|
60
|
-
});
|
|
61
|
-
_defineProperty(this, "http", void 0);
|
|
62
|
-
_defineProperty(this, "stopLoading", () => {
|
|
63
|
-
this.setState({
|
|
64
|
-
loading: false
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
_defineProperty(this, "getServicesContent", () => {
|
|
68
|
-
var _this$getServices;
|
|
69
|
-
this.setState({
|
|
70
|
-
loading: true
|
|
71
|
-
});
|
|
72
|
-
(_this$getServices = this.getServices(SmartServices.allFields)) === null || _this$getServices === void 0 || _this$getServices.then(services => {
|
|
73
|
-
this.setState({
|
|
74
|
-
services
|
|
75
|
-
});
|
|
76
|
-
this.stopLoading();
|
|
77
|
-
}).catch(this.stopLoading);
|
|
78
|
-
});
|
|
79
|
-
}
|
|
48
|
+
state = {
|
|
49
|
+
visible: true,
|
|
50
|
+
loading: false,
|
|
51
|
+
services: null
|
|
52
|
+
};
|
|
80
53
|
componentDidMount() {
|
|
81
|
-
var _this$getServices2;
|
|
82
54
|
const {
|
|
83
55
|
auth
|
|
84
56
|
} = this.props;
|
|
85
57
|
this.http = new HTTP(auth, auth.getAPIPath());
|
|
86
|
-
|
|
58
|
+
this.getServices(SmartServices.countFields)?.then(services => {
|
|
87
59
|
if (!services.length) {
|
|
88
60
|
this.setState({
|
|
89
61
|
visible: false
|
|
@@ -91,9 +63,27 @@ class SmartServices extends Component {
|
|
|
91
63
|
}
|
|
92
64
|
}).catch(noop);
|
|
93
65
|
}
|
|
66
|
+
static allFields = 'id,name,applicationName,homeUrl,iconUrl';
|
|
67
|
+
static countFields = 'key';
|
|
68
|
+
http;
|
|
69
|
+
stopLoading = () => {
|
|
70
|
+
this.setState({
|
|
71
|
+
loading: false
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
getServicesContent = () => {
|
|
75
|
+
this.setState({
|
|
76
|
+
loading: true
|
|
77
|
+
});
|
|
78
|
+
this.getServices(SmartServices.allFields)?.then(services => {
|
|
79
|
+
this.setState({
|
|
80
|
+
services
|
|
81
|
+
});
|
|
82
|
+
this.stopLoading();
|
|
83
|
+
}).catch(this.stopLoading);
|
|
84
|
+
};
|
|
94
85
|
getServices(fields) {
|
|
95
|
-
|
|
96
|
-
return (_this$http = this.http) === null || _this$http === void 0 ? void 0 : _this$http.get("services/header?fields=".concat(fields));
|
|
86
|
+
return this.http?.get(`services/header?fields=${fields}`);
|
|
97
87
|
}
|
|
98
88
|
render() {
|
|
99
89
|
const {
|
|
@@ -101,24 +91,22 @@ class SmartServices extends Component {
|
|
|
101
91
|
visible,
|
|
102
92
|
loading
|
|
103
93
|
} = this.state;
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
props = _objectWithoutProperties(_this$props, _excluded);
|
|
94
|
+
const {
|
|
95
|
+
auth,
|
|
96
|
+
...props
|
|
97
|
+
} = this.props;
|
|
109
98
|
if (!visible) {
|
|
110
99
|
return null;
|
|
111
100
|
}
|
|
112
|
-
return jsx(Services,
|
|
101
|
+
return jsx(Services, {
|
|
102
|
+
...props,
|
|
113
103
|
clientId: auth.config.clientId,
|
|
114
104
|
initShown: true,
|
|
115
105
|
loading: loading,
|
|
116
106
|
onClick: this.getServicesContent,
|
|
117
107
|
services: services
|
|
118
|
-
})
|
|
108
|
+
});
|
|
119
109
|
}
|
|
120
110
|
}
|
|
121
|
-
_defineProperty(SmartServices, "allFields", 'id,name,applicationName,homeUrl,iconUrl');
|
|
122
|
-
_defineProperty(SmartServices, "countFields", 'key');
|
|
123
111
|
|
|
124
112
|
export { SmartServices as default };
|
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
import { a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import { Component, Children } from 'react';
|
|
4
3
|
import classNames from 'classnames';
|
|
5
4
|
import { s as styles } from '../_helpers/header.js';
|
|
6
5
|
|
|
7
|
-
const _excluded = ["children", "className"];
|
|
8
6
|
const wrapChild = child => child && jsx("div", {
|
|
9
7
|
className: styles.trayItem,
|
|
10
8
|
children: child
|
|
11
9
|
});
|
|
12
10
|
class Tray extends Component {
|
|
13
11
|
render() {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
restProps = _objectWithoutProperties(_this$props, _excluded);
|
|
12
|
+
const {
|
|
13
|
+
children,
|
|
14
|
+
className,
|
|
15
|
+
...restProps
|
|
16
|
+
} = this.props;
|
|
20
17
|
const classes = classNames(styles.tray, className);
|
|
21
|
-
return jsx("div",
|
|
18
|
+
return jsx("div", {
|
|
19
|
+
...restProps,
|
|
22
20
|
className: classes,
|
|
23
21
|
children: Children.map(children, wrapChild)
|
|
24
|
-
})
|
|
22
|
+
});
|
|
25
23
|
}
|
|
26
24
|
}
|
|
27
25
|
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import { memo } from 'react';
|
|
4
3
|
import classNames from 'classnames';
|
|
5
4
|
import deprecate from 'util-deprecate';
|
|
6
5
|
import { s as styles } from '../_helpers/heading.js';
|
|
7
6
|
|
|
8
|
-
const _excluded = ["children", "className", "level"],
|
|
9
|
-
_excluded2 = ["className", "bold"];
|
|
10
7
|
/**
|
|
11
8
|
* @name Heading
|
|
12
9
|
*/
|
|
@@ -18,50 +15,53 @@ var Levels;
|
|
|
18
15
|
Levels[Levels["H4"] = 4] = "H4";
|
|
19
16
|
})(Levels || (Levels = {}));
|
|
20
17
|
const fallbackHeading = deprecate(() => 'h3', 'Headings of level 5 and higher are replaced with h3');
|
|
21
|
-
const HeadingMemo = /*#__PURE__*/memo(function Heading(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
+
const HeadingMemo = /*#__PURE__*/memo(function Heading({
|
|
19
|
+
children,
|
|
20
|
+
className,
|
|
21
|
+
level = Levels.H1,
|
|
22
|
+
...restProps
|
|
23
|
+
}) {
|
|
28
24
|
const classes = classNames(styles.heading, className);
|
|
29
|
-
const Tag = level <= Levels.H4 ?
|
|
30
|
-
return jsx(Tag,
|
|
25
|
+
const Tag = level <= Levels.H4 ? `h${level}` : fallbackHeading();
|
|
26
|
+
return jsx(Tag, {
|
|
27
|
+
...restProps,
|
|
31
28
|
className: classes,
|
|
32
29
|
children: children
|
|
33
|
-
})
|
|
30
|
+
});
|
|
34
31
|
});
|
|
35
32
|
const Heading = HeadingMemo;
|
|
36
33
|
Heading.Levels = Levels;
|
|
37
34
|
const H1 = /*#__PURE__*/memo(function H1(props) {
|
|
38
|
-
return jsx(Heading,
|
|
35
|
+
return jsx(Heading, {
|
|
36
|
+
...props,
|
|
39
37
|
level: Levels.H1
|
|
40
|
-
})
|
|
38
|
+
});
|
|
41
39
|
});
|
|
42
40
|
const H2 = /*#__PURE__*/memo(function H2(props) {
|
|
43
|
-
return jsx(Heading,
|
|
41
|
+
return jsx(Heading, {
|
|
42
|
+
...props,
|
|
44
43
|
level: Levels.H2
|
|
45
|
-
})
|
|
44
|
+
});
|
|
46
45
|
});
|
|
47
46
|
const H3 = /*#__PURE__*/memo(function H3(props) {
|
|
48
|
-
return jsx(Heading,
|
|
47
|
+
return jsx(Heading, {
|
|
48
|
+
...props,
|
|
49
49
|
level: Levels.H3
|
|
50
|
-
})
|
|
50
|
+
});
|
|
51
51
|
});
|
|
52
|
-
const H4 = /*#__PURE__*/memo(function H4(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
restProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
52
|
+
const H4 = /*#__PURE__*/memo(function H4({
|
|
53
|
+
className,
|
|
54
|
+
bold,
|
|
55
|
+
...restProps
|
|
56
|
+
}) {
|
|
58
57
|
const classes = classNames(className, {
|
|
59
58
|
[styles.bold]: bold
|
|
60
59
|
});
|
|
61
|
-
return jsx(Heading,
|
|
60
|
+
return jsx(Heading, {
|
|
61
|
+
...restProps,
|
|
62
62
|
className: classes,
|
|
63
63
|
level: Levels.H4
|
|
64
|
-
})
|
|
64
|
+
});
|
|
65
65
|
});
|
|
66
66
|
|
|
67
67
|
export { H1, H2, H3, H4, Levels, Heading as default };
|