@jetbrains/ring-ui 4.1.0-beta.3 → 4.1.1
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/CHANGELOG.md +13 -0
- package/README.md +17 -15
- package/babel.config.js +3 -2
- package/components/alert/alert.js +9 -3
- package/components/alert/alert.test.js +21 -48
- package/components/alert/container.css +1 -1
- package/components/alert/container.test.js +3 -13
- package/components/alert-service/alert-service.examples.css +18 -0
- package/components/alert-service/alert-service.examples.js +21 -0
- package/components/alert-service/alert-service.js +10 -3
- package/components/analytics/analytics__fus-plugin.js +3 -3
- package/components/analytics/analytics__ga-plugin.js +2 -2
- package/components/auth/auth.test.js +14 -7
- package/components/auth/auth__core.js +64 -33
- package/components/auth-dialog/auth-dialog.css +2 -3
- package/components/auth-dialog/auth-dialog.js +4 -1
- package/components/auth-dialog/auth-dialog.test.js +3 -19
- package/components/avatar/avatar.css +4 -1
- package/components/avatar/avatar.examples.js +3 -2
- package/components/avatar/avatar.js +34 -6
- package/components/avatar/avatar.test.js +20 -17
- package/components/avatar/fallback-avatar.js +136 -0
- package/components/avatar-editor-ng/avatar-editor-ng.css +2 -2
- package/components/avatar-editor-ng/avatar-editor-ng.js +2 -1
- package/components/avatar-editor-ng/{avatar-editor-ng.html → avatar-editor-ng__template.js} +2 -2
- package/components/badge/badge.test.js +13 -20
- package/components/button/button.css +2 -2
- package/components/button/button.js +4 -1
- package/components/button/button.test.js +32 -33
- package/components/button-group/button-group.js +1 -1
- package/components/button-group/caption.js +1 -1
- package/components/button-ng/button-ng.js +1 -1
- package/components/button-set-ng/button-set-ng.js +3 -1
- package/components/checkbox/checkbox.css +1 -1
- package/components/code/code.js +2 -5
- package/components/confirm/confirm.js +1 -0
- package/components/confirm-service/confirm-service.js +5 -5
- package/components/content-layout/content-layout.css +1 -1
- package/components/data-list/data-list.css +1 -1
- package/components/date-picker/date-input.js +5 -4
- package/components/date-picker/date-picker.css +34 -22
- package/components/date-picker/date-picker.js +16 -14
- package/components/date-picker/date-popup.js +22 -7
- package/components/date-picker/month-names.js +8 -5
- package/components/date-picker/month.js +6 -2
- package/components/date-picker/weekdays.js +10 -2
- package/components/dialog/dialog.examples.js +3 -1
- package/components/dialog/dialog.js +10 -5
- package/components/dialog/dialog.test.js +1 -1
- package/components/dialog/dialog__body-scroll-preventer.js +51 -31
- package/components/dialog-ng/dialog-ng.js +10 -10
- package/components/dialog-ng/{dialog-ng.html → dialog-ng__template.js} +2 -2
- package/components/dropdown/dropdown.examples.js +36 -1
- package/components/dropdown/dropdown.test.js +2 -2
- package/components/dropdown-menu/dropdown-menu.examples.js +47 -0
- package/components/dropdown-menu/dropdown-menu.js +117 -0
- package/components/dropdown-menu/dropdown-menu.test.js +76 -0
- package/components/error-bubble/error-bubble-legacy.css +1 -1
- package/components/error-bubble/error-bubble.css +1 -1
- package/components/error-bubble/error-bubble.examples.js +1 -1
- package/components/error-page/error-page.css +2 -2
- package/components/footer-ng/footer-ng.js +13 -3
- package/components/form/form.css +2 -2
- package/components/form-ng/form-ng.js +3 -1
- package/components/global/global.css +1 -1
- package/components/global/theme.js +1 -1
- package/components/global/variables.css +8 -1
- package/components/grid/grid.css +10 -9
- package/components/header/header.css +1 -1
- package/components/header/header.examples.js +7 -8
- package/components/header/profile.js +10 -11
- package/components/http/http.js +1 -1
- package/components/icon/icon.css +5 -4
- package/components/input/input-legacy.css +7 -7
- package/components/island/header.js +2 -2
- package/components/island/island.css +8 -3
- package/components/island-legacy/island-legacy.css +3 -1
- package/components/list/list.js +6 -1
- package/components/list/list__custom.js +9 -3
- package/components/list/list__item.js +8 -2
- package/components/list/list__link.js +2 -1
- package/components/loader-inline/loader-inline.css +1 -1
- package/components/loader-screen/loader-screen.css +1 -1
- package/components/message/message.css +1 -1
- package/components/message/message.examples.js +8 -7
- package/components/pager/pager.js +5 -3
- package/components/permissions/permissions.js +1 -1
- package/components/popup/popup.js +1 -1
- package/components/popup/popup.test.js +15 -13
- package/components/progress-bar/progress-bar.css +1 -1
- package/components/progress-bar/progress-bar.examples.js +3 -3
- package/components/progress-bar/progress-bar.js +5 -2
- package/components/progress-bar/progress-bar.test.js +12 -13
- package/components/progress-bar-ng/progress-bar-ng.examples.js +3 -3
- package/components/query-assist/query-assist.css +13 -3
- package/components/query-assist/query-assist.examples.js +3 -4
- package/components/query-assist/query-assist.js +56 -12
- package/components/query-assist/query-assist.test.js +37 -5
- package/components/save-field-ng/save-field-ng.css +0 -3
- package/components/save-field-ng/save-field-ng.js +3 -1
- package/components/save-field-ng/{save-field-ng.html → save-field-ng__template.js} +2 -2
- package/components/select/select.css +12 -7
- package/components/select/select.examples.js +13 -0
- package/components/select/select.js +30 -43
- package/components/select/select.test.js +4 -5
- package/components/select/select__popup.js +1 -0
- package/components/shortcuts-hint-ng/shortcuts-hint-ng.css +1 -1
- package/components/shortcuts-hint-ng/shortcuts-hint-ng.js +1 -1
- package/components/shortcuts-hint-ng/{shortcuts-hint-ng.html → shortcuts-hint-ng__template.js} +2 -2
- package/components/sidebar/sidebar.css +1 -0
- package/components/sidebar-ng/sidebar-ng.js +6 -2
- package/components/sidebar-ng/{sidebar-ng__button.html → sidebar-ng__button-template.js} +2 -2
- package/components/sidebar-ng/{sidebar-ng.html → sidebar-ng__template.js} +2 -2
- package/components/table/header.js +9 -1
- package/components/table/row.js +2 -1
- package/components/table/table.css +2 -1
- package/components/table-legacy/table-legacy.css +2 -2
- package/components/table-legacy/table-legacy__toolbar.css +2 -2
- package/components/table-legacy-ng/table-legacy-ng.js +38 -5
- package/components/table-legacy-ng/table-legacy-ng__pager.js +7 -1
- package/components/tabs/collapsible-tab.js +2 -2
- package/components/tabs/collapsible-tabs.js +5 -9
- package/components/tabs/tab-link.js +4 -2
- package/components/tabs/tabs.css +32 -5
- package/components/tabs-ng/tabs-ng.js +4 -2
- package/components/tabs-ng/{tabs-ng.html → tabs-ng__template.js} +6 -2
- package/components/tag/tag.css +5 -2
- package/components/tag/tag.examples.js +3 -0
- package/components/tag/tag.js +19 -16
- package/components/tags-input/tag-input.examples.js +1 -1
- package/components/tags-input/tags-input.js +5 -2
- package/components/template-ng/template-ng.js +1 -1
- package/components/tooltip/tooltip.js +7 -2
- package/components/user-agreement/user-agreement.css +1 -5
- package/components/user-agreement/user-agreement.examples.js +7 -6
- package/components/user-agreement/user-agreement.js +11 -3
- package/package.json +85 -83
- package/webpack.config.js +14 -10
- package/components/button-set-ng/button-set-ng.html +0 -1
- package/components/footer-ng/footer-ng.html +0 -13
- package/components/form-ng/form-ng__error-bubble.html +0 -3
- package/components/table-legacy-ng/table-legacy-ng.html +0 -4
- package/components/table-legacy-ng/table-legacy-ng__column.html +0 -12
- package/components/table-legacy-ng/table-legacy-ng__header.html +0 -4
- package/components/table-legacy-ng/table-legacy-ng__pager.html +0 -7
- package/components/table-legacy-ng/table-legacy-ng__row.html +0 -12
- package/components/table-legacy-ng/table-legacy-ng__title.html +0 -9
- package/dist/_helpers/_rollupPluginBabelHelpers.js +0 -123
- package/dist/_helpers/background-flow.js +0 -232
- package/dist/_helpers/badge.js +0 -3
- package/dist/_helpers/button.js +0 -145
- package/dist/_helpers/clickableLink.js +0 -65
- package/dist/_helpers/data-tests.js +0 -15
- package/dist/_helpers/disable-hover-hoc.js +0 -407
- package/dist/_helpers/dom.js +0 -101
- package/dist/_helpers/get-uid.js +0 -15
- package/dist/_helpers/linear-function.js +0 -17
- package/dist/_helpers/list.js +0 -1327
- package/dist/_helpers/logo.js +0 -36
- package/dist/_helpers/memoize.js +0 -17
- package/dist/_helpers/popup.js +0 -691
- package/dist/_helpers/popup.target.js +0 -27
- package/dist/_helpers/rerender-hoc.js +0 -49
- package/dist/_helpers/schedule-raf.js +0 -31
- package/dist/_helpers/sniffer.js +0 -6
- package/dist/_helpers/theme.js +0 -40
- package/dist/_helpers/url.js +0 -125
- package/dist/alert-service.js +0 -149
- package/dist/alert.js +0 -284
- package/dist/analytics.js +0 -116
- package/dist/auth-dialog-service.js +0 -56
- package/dist/auth-dialog.js +0 -122
- package/dist/auth.js +0 -1744
- package/dist/avatar.js +0 -152
- package/dist/badge.js +0 -52
- package/dist/button-group.js +0 -48
- package/dist/button-set.js +0 -27
- package/dist/button-toolbar.js +0 -30
- package/dist/button.js +0 -12
- package/dist/caret.js +0 -262
- package/dist/checkbox.js +0 -108
- package/dist/confirm-service.js +0 -102
- package/dist/confirm.js +0 -113
- package/dist/content-layout.js +0 -184
- package/dist/contenteditable.js +0 -81
- package/dist/data-list.js +0 -466
- package/dist/date-picker.js +0 -1398
- package/dist/dialog.js +0 -223
- package/dist/dropdown.js +0 -250
- package/dist/error-bubble.js +0 -56
- package/dist/error-message.js +0 -53
- package/dist/footer.js +0 -124
- package/dist/grid.js +0 -148
- package/dist/group.js +0 -34
- package/dist/header.js +0 -658
- package/dist/heading.js +0 -76
- package/dist/http.js +0 -207
- package/dist/hub-source.js +0 -130
- package/dist/icon.js +0 -211
- package/dist/input.js +0 -228
- package/dist/island.js +0 -314
- package/dist/link.js +0 -117
- package/dist/list.js +0 -29
- package/dist/loader-inline.js +0 -165
- package/dist/loader-screen.js +0 -45
- package/dist/loader.js +0 -338
- package/dist/login-dialog.js +0 -173
- package/dist/logo.js +0 -8
- package/dist/message.js +0 -226
- package/dist/old-browsers-message.js +0 -129
- package/dist/pager.js +0 -325
- package/dist/panel.js +0 -34
- package/dist/permissions.js +0 -466
- package/dist/popup-menu.js +0 -93
- package/dist/popup.js +0 -16
- package/dist/progress-bar.js +0 -111
- package/dist/proxy-attrs.js +0 -19
- package/dist/query-assist.js +0 -1081
- package/dist/radio.js +0 -112
- package/dist/select.js +0 -1920
- package/dist/selection.js +0 -213
- package/dist/shortcuts.js +0 -307
- package/dist/storage.js +0 -373
- package/dist/style.css +0 -1
- package/dist/tab-trap.js +0 -174
- package/dist/table.js +0 -903
- package/dist/tabs.js +0 -721
- package/dist/tag.js +0 -187
- package/dist/tags-input.js +0 -440
- package/dist/tags-list.js +0 -91
- package/dist/text.js +0 -38
- package/dist/toggle.js +0 -80
- package/dist/tooltip.js +0 -202
- package/dist/user-card.js +0 -218
package/dist/analytics.js
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @name Analytics
|
|
3
|
-
*/
|
|
4
|
-
class Analytics {
|
|
5
|
-
constructor() {
|
|
6
|
-
this._plugins = [];
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
config(plugins) {
|
|
10
|
-
this._plugins = plugins;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
track(rawTrackingData,
|
|
14
|
-
/* optional */
|
|
15
|
-
additionalData) {
|
|
16
|
-
if (!rawTrackingData) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
let splitIdx = rawTrackingData.indexOf(':');
|
|
21
|
-
|
|
22
|
-
if (splitIdx < 0) {
|
|
23
|
-
splitIdx = rawTrackingData.indexOf('_');
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (splitIdx < 0) {
|
|
27
|
-
splitIdx = rawTrackingData.length;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const category = rawTrackingData.substr(0, splitIdx);
|
|
31
|
-
const subcategory = rawTrackingData.substr(splitIdx + 1);
|
|
32
|
-
this.trackEvent(category, subcategory, additionalData);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
trackPageView(path) {
|
|
36
|
-
this._plugins.forEach(plugin => {
|
|
37
|
-
plugin.trackPageView(path);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
trackEvent(category, action,
|
|
42
|
-
/* optional */
|
|
43
|
-
additionalData) {
|
|
44
|
-
const subaction = additionalData ? action + this._buildSuffix(additionalData) : null;
|
|
45
|
-
|
|
46
|
-
this._plugins.forEach(plugin => {
|
|
47
|
-
if (plugin.serializeAdditionalInfo) {
|
|
48
|
-
plugin.trackEvent(category, action);
|
|
49
|
-
|
|
50
|
-
if (subaction) {
|
|
51
|
-
plugin.trackEvent(category, subaction);
|
|
52
|
-
}
|
|
53
|
-
} else {
|
|
54
|
-
plugin.trackEvent(category, action, additionalData);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
trackShortcutEvent(category, action,
|
|
60
|
-
/* optional */
|
|
61
|
-
additionalData) {
|
|
62
|
-
this.trackEvent(category, action, additionalData);
|
|
63
|
-
this.trackEvent('ring-shortcut', `${category}$${action}`, additionalData);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
trackEntityProperties(entityName, entity, propertiesNames,
|
|
67
|
-
/* optional */
|
|
68
|
-
additionalData) {
|
|
69
|
-
for (let i = 0; i < propertiesNames.length; ++i) {
|
|
70
|
-
const keys = propertiesNames[i].split('.');
|
|
71
|
-
let value = entity;
|
|
72
|
-
|
|
73
|
-
if (!keys.length) {
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
for (let j = 0; j < keys.length; ++j) {
|
|
78
|
-
if (value.hasOwnProperty(keys[j])) {
|
|
79
|
-
value = value[keys[j]];
|
|
80
|
-
} else {
|
|
81
|
-
value = 'no-value';
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
if (typeof value === 'string') {
|
|
87
|
-
value = value.toLowerCase().replace(/[._]+/g, '-');
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
const resultAction = `${keys.join('-')}__${value}`;
|
|
91
|
-
this.trackEvent(entityName, resultAction, additionalData);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
_buildSuffix(additionalData) {
|
|
96
|
-
if (!additionalData) {
|
|
97
|
-
return '';
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
let suffix = '';
|
|
101
|
-
let key;
|
|
102
|
-
|
|
103
|
-
for (key in additionalData) {
|
|
104
|
-
if (additionalData.hasOwnProperty(key)) {
|
|
105
|
-
suffix += `__${key}$${additionalData[key]}`;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
return suffix;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
var analytics = new Analytics();
|
|
115
|
-
|
|
116
|
-
export default analytics;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { c as _objectSpread2 } from './_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { render } from 'react-dom';
|
|
4
|
-
import AuthDialog from './auth-dialog.js';
|
|
5
|
-
import 'prop-types';
|
|
6
|
-
import 'classnames';
|
|
7
|
-
import './island.js';
|
|
8
|
-
import './_helpers/data-tests.js';
|
|
9
|
-
import './_helpers/linear-function.js';
|
|
10
|
-
import 'element-resize-detector';
|
|
11
|
-
import './_helpers/schedule-raf.js';
|
|
12
|
-
import './dialog.js';
|
|
13
|
-
import '@jetbrains/icons/close';
|
|
14
|
-
import './_helpers/get-uid.js';
|
|
15
|
-
import './shortcuts.js';
|
|
16
|
-
import 'combokeys';
|
|
17
|
-
import './_helpers/sniffer.js';
|
|
18
|
-
import 'sniffr';
|
|
19
|
-
import './tab-trap.js';
|
|
20
|
-
import './_helpers/dom.js';
|
|
21
|
-
import './_helpers/button.js';
|
|
22
|
-
import 'focus-visible';
|
|
23
|
-
import '@jetbrains/icons/chevron-10px';
|
|
24
|
-
import './icon.js';
|
|
25
|
-
import 'util-deprecate';
|
|
26
|
-
import './_helpers/memoize.js';
|
|
27
|
-
import './_helpers/theme.js';
|
|
28
|
-
import './_helpers/clickableLink.js';
|
|
29
|
-
import './_helpers/popup.target.js';
|
|
30
|
-
import 'scrollbar-width';
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* @name Auth Dialog Service
|
|
34
|
-
*/
|
|
35
|
-
|
|
36
|
-
const containerElement = document.createElement('div');
|
|
37
|
-
/**
|
|
38
|
-
* Renders AuthDialog into virtual node to skip maintaining container
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
function renderAuthDialog(props) {
|
|
42
|
-
render( /*#__PURE__*/React.createElement(AuthDialog, props), containerElement);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function showAuthDialog(props = {}) {
|
|
46
|
-
renderAuthDialog(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
47
|
-
show: true
|
|
48
|
-
}));
|
|
49
|
-
return () => {
|
|
50
|
-
renderAuthDialog({
|
|
51
|
-
show: false
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export default showAuthDialog;
|
package/dist/auth-dialog.js
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { b as _defineProperty } from './_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React, { Component } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import classNames from 'classnames';
|
|
5
|
-
import { Content as ContentWrapper } from './island.js';
|
|
6
|
-
import Dialog from './dialog.js';
|
|
7
|
-
import { B as Button } from './_helpers/button.js';
|
|
8
|
-
import './_helpers/data-tests.js';
|
|
9
|
-
import './_helpers/linear-function.js';
|
|
10
|
-
import 'element-resize-detector';
|
|
11
|
-
import './_helpers/schedule-raf.js';
|
|
12
|
-
import 'react-dom';
|
|
13
|
-
import '@jetbrains/icons/close';
|
|
14
|
-
import './_helpers/get-uid.js';
|
|
15
|
-
import './shortcuts.js';
|
|
16
|
-
import 'combokeys';
|
|
17
|
-
import './_helpers/sniffer.js';
|
|
18
|
-
import 'sniffr';
|
|
19
|
-
import './tab-trap.js';
|
|
20
|
-
import './_helpers/dom.js';
|
|
21
|
-
import './_helpers/popup.target.js';
|
|
22
|
-
import 'scrollbar-width';
|
|
23
|
-
import 'focus-visible';
|
|
24
|
-
import '@jetbrains/icons/chevron-10px';
|
|
25
|
-
import './icon.js';
|
|
26
|
-
import 'util-deprecate';
|
|
27
|
-
import './_helpers/memoize.js';
|
|
28
|
-
import './_helpers/theme.js';
|
|
29
|
-
import './_helpers/clickableLink.js';
|
|
30
|
-
|
|
31
|
-
var modules_ae521deb = {"unit":"8px","dialog":"authDialog_dialog__e722f7e6","content":"authDialog_content__e722f7e6 global_font__0f8f4370","button":"authDialog_button__e722f7e6","firstButton":"authDialog_firstButton__e722f7e6 authDialog_button__e722f7e6","title":"authDialog_title__e722f7e6","logo":"authDialog_logo__e722f7e6","error":"authDialog_error__e722f7e6"};
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @name Auth Dialog
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
class AuthDialog extends Component {
|
|
38
|
-
constructor(...args) {
|
|
39
|
-
super(...args);
|
|
40
|
-
|
|
41
|
-
_defineProperty(this, "onEscPress", () => {
|
|
42
|
-
if (this.props.cancelOnEsc) {
|
|
43
|
-
this.props.onCancel();
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
render() {
|
|
49
|
-
const {
|
|
50
|
-
show,
|
|
51
|
-
className,
|
|
52
|
-
errorMessage,
|
|
53
|
-
serviceImage,
|
|
54
|
-
serviceName,
|
|
55
|
-
loginCaption,
|
|
56
|
-
loginToCaption,
|
|
57
|
-
confirmLabel,
|
|
58
|
-
cancelLabel,
|
|
59
|
-
onConfirm,
|
|
60
|
-
onCancel
|
|
61
|
-
} = this.props;
|
|
62
|
-
const defaultTitle = serviceName ? loginToCaption : loginCaption;
|
|
63
|
-
const title = (this.props.title || defaultTitle).replace('%serviceName%', serviceName);
|
|
64
|
-
return /*#__PURE__*/React.createElement(Dialog, {
|
|
65
|
-
"data-test": "ring-auth-dialog",
|
|
66
|
-
className: className,
|
|
67
|
-
contentClassName: classNames(className, modules_ae521deb.dialog),
|
|
68
|
-
onEscPress: this.onEscPress,
|
|
69
|
-
show: show,
|
|
70
|
-
trapFocus: true
|
|
71
|
-
}, /*#__PURE__*/React.createElement(ContentWrapper, null, /*#__PURE__*/React.createElement("div", {
|
|
72
|
-
className: modules_ae521deb.content
|
|
73
|
-
}, serviceImage && /*#__PURE__*/React.createElement("img", {
|
|
74
|
-
alt: `${serviceName} logo`,
|
|
75
|
-
className: modules_ae521deb.logo,
|
|
76
|
-
src: serviceImage
|
|
77
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
78
|
-
className: modules_ae521deb.title
|
|
79
|
-
}, title), errorMessage && /*#__PURE__*/React.createElement("div", {
|
|
80
|
-
className: modules_ae521deb.error
|
|
81
|
-
}, errorMessage), /*#__PURE__*/React.createElement(Button, {
|
|
82
|
-
primary: true,
|
|
83
|
-
className: modules_ae521deb.firstButton,
|
|
84
|
-
"data-test": "auth-dialog-confirm-button",
|
|
85
|
-
onClick: onConfirm
|
|
86
|
-
}, confirmLabel), /*#__PURE__*/React.createElement(Button, {
|
|
87
|
-
className: modules_ae521deb.button,
|
|
88
|
-
"data-test": "auth-dialog-cancel-button",
|
|
89
|
-
onClick: onCancel
|
|
90
|
-
}, cancelLabel))));
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
_defineProperty(AuthDialog, "propTypes", {
|
|
96
|
-
className: PropTypes.string,
|
|
97
|
-
title: PropTypes.string,
|
|
98
|
-
errorMessage: PropTypes.string,
|
|
99
|
-
serviceImage: PropTypes.string,
|
|
100
|
-
serviceName: PropTypes.string,
|
|
101
|
-
loginCaption: PropTypes.string,
|
|
102
|
-
loginToCaption: PropTypes.string,
|
|
103
|
-
show: PropTypes.bool,
|
|
104
|
-
cancelOnEsc: PropTypes.bool,
|
|
105
|
-
confirmLabel: PropTypes.string,
|
|
106
|
-
cancelLabel: PropTypes.string,
|
|
107
|
-
onConfirm: PropTypes.func,
|
|
108
|
-
onCancel: PropTypes.func
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
_defineProperty(AuthDialog, "defaultProps", {
|
|
112
|
-
loginCaption: 'Log in',
|
|
113
|
-
loginToCaption: 'Log in to %serviceName%',
|
|
114
|
-
show: false,
|
|
115
|
-
cancelOnEsc: true,
|
|
116
|
-
confirmLabel: 'Log in',
|
|
117
|
-
cancelLabel: 'Remain a guest',
|
|
118
|
-
onConfirm: () => {},
|
|
119
|
-
onCancel: () => {}
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
export default AuthDialog;
|