@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,7 +1,5 @@
|
|
|
1
1
|
import alertService from '../alert-service/alert-service.js';
|
|
2
2
|
import { copyHTMLToClipboard, copyTextToClipboard } from './clipboard-fallback.js';
|
|
3
|
-
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
4
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
3
|
import 'react/jsx-runtime';
|
|
6
4
|
import 'react-dom/client';
|
|
7
5
|
import '../global/get-uid.js';
|
|
@@ -16,8 +14,6 @@ import '../icon/icon.js';
|
|
|
16
14
|
import 'util-deprecate';
|
|
17
15
|
import '../icon/icon.constants.js';
|
|
18
16
|
import '../_helpers/icon-svg.js';
|
|
19
|
-
import 'core-js/modules/es.regexp.exec.js';
|
|
20
|
-
import 'core-js/modules/es.string.replace.js';
|
|
21
17
|
import '../global/memoize.js';
|
|
22
18
|
import '../loader-inline/loader-inline.js';
|
|
23
19
|
import '../global/data-tests.js';
|
|
@@ -41,7 +37,6 @@ import '../global/sniffer.js';
|
|
|
41
37
|
import 'sniffr';
|
|
42
38
|
import '../tab-trap/tab-trap.js';
|
|
43
39
|
import '../popup/position.js';
|
|
44
|
-
import 'core-js/modules/es.array.sort.js';
|
|
45
40
|
import '../popup/popup.consts.js';
|
|
46
41
|
import '../popup/position-css.js';
|
|
47
42
|
import '../alert/container.js';
|
|
@@ -63,9 +58,7 @@ function getClipboardImplementation() {
|
|
|
63
58
|
copyHTML: html => Promise.resolve(copyHTMLToClipboard(html))
|
|
64
59
|
};
|
|
65
60
|
}
|
|
66
|
-
async function copy(text, successMessage, errorMessage) {
|
|
67
|
-
let delay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ALERT_DELAY;
|
|
68
|
-
let isHtml = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
61
|
+
async function copy(text, successMessage, errorMessage, delay = ALERT_DELAY, isHtml = false) {
|
|
69
62
|
try {
|
|
70
63
|
const clipboardImpl = getClipboardImplementation();
|
|
71
64
|
const copyMethod = isHtml ? clipboardImpl.copyHTML : clipboardImpl.copy;
|
|
@@ -82,14 +75,8 @@ async function copy(text, successMessage, errorMessage) {
|
|
|
82
75
|
}
|
|
83
76
|
}
|
|
84
77
|
const clipboard = {
|
|
85
|
-
copyText:
|
|
86
|
-
|
|
87
|
-
return copy(text, successMessage, errorMessage, delay);
|
|
88
|
-
},
|
|
89
|
-
copyHTML: function (html, successMessage, errorMessage) {
|
|
90
|
-
let delay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ALERT_DELAY;
|
|
91
|
-
return copy(html, successMessage, errorMessage, delay, true);
|
|
92
|
-
}
|
|
78
|
+
copyText: (text, successMessage, errorMessage, delay = ALERT_DELAY) => copy(text, successMessage, errorMessage, delay),
|
|
79
|
+
copyHTML: (html, successMessage, errorMessage, delay = ALERT_DELAY) => copy(html, successMessage, errorMessage, delay, true)
|
|
93
80
|
};
|
|
94
81
|
|
|
95
82
|
export { clipboard as default };
|
package/components/code/code.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { _ as _defineProperty } 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 classNames from 'classnames';
|
|
@@ -8,8 +6,6 @@ export { default as highlight } from 'highlight.js/lib/core';
|
|
|
8
6
|
import normalizeIndent from '../global/normalize-indent.js';
|
|
9
7
|
import trivialTemplateTag from '../global/trivial-template-tag.js';
|
|
10
8
|
import memoize from '../global/memoize.js';
|
|
11
|
-
import 'core-js/modules/es.array.reverse.js';
|
|
12
|
-
import 'core-js/modules/es.regexp.exec.js';
|
|
13
9
|
|
|
14
10
|
var styles = {"code":"ring-code-code","inline":"ring-code-inline","softWrap":"ring-code-softWrap"};
|
|
15
11
|
|
|
@@ -17,23 +13,26 @@ var highlightStyles = {"highlightContainer":"ring-highlight-highlightContainer"}
|
|
|
17
13
|
|
|
18
14
|
function noop() {}
|
|
19
15
|
const registerLanguage = memoize(async language => {
|
|
20
|
-
const languageExports = await import(/* webpackChunkName: "highlight-[request]" */
|
|
16
|
+
const languageExports = await import(/* webpackChunkName: "highlight-[request]" */
|
|
17
|
+
`highlight.js/lib/languages/${language}.js`);
|
|
21
18
|
highlight.registerLanguage(language, languageExports.default);
|
|
22
19
|
});
|
|
23
20
|
/**
|
|
24
21
|
* @name Code
|
|
25
22
|
*/
|
|
26
23
|
class Code extends PureComponent {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
static defaultProps = {
|
|
25
|
+
inline: false,
|
|
26
|
+
softWrap: false,
|
|
27
|
+
replacer: noop
|
|
28
|
+
};
|
|
31
29
|
componentDidMount() {
|
|
32
30
|
this.highlight();
|
|
33
31
|
}
|
|
34
32
|
componentDidUpdate() {
|
|
35
33
|
this.highlight();
|
|
36
34
|
}
|
|
35
|
+
code;
|
|
37
36
|
async highlight() {
|
|
38
37
|
const codeRef = this.codeRef;
|
|
39
38
|
if (!codeRef) {
|
|
@@ -100,11 +99,6 @@ class Code extends PureComponent {
|
|
|
100
99
|
});
|
|
101
100
|
}
|
|
102
101
|
}
|
|
103
|
-
_defineProperty(Code, "defaultProps", {
|
|
104
|
-
inline: false,
|
|
105
|
-
softWrap: false,
|
|
106
|
-
replacer: noop
|
|
107
|
-
});
|
|
108
102
|
const code = trivialTemplateTag(source => jsx(Code, {
|
|
109
103
|
code: source
|
|
110
104
|
}));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
2
|
import { useContext, useRef, useState, useEffect, useMemo } from 'react';
|
|
4
3
|
import classNames from 'classnames';
|
|
@@ -7,8 +6,6 @@ import { getRect } from '../global/dom.js';
|
|
|
7
6
|
import { toPx } from './utils.js';
|
|
8
7
|
import { CollapseContext } from './collapse-context.js';
|
|
9
8
|
import { COLLAPSE_CONTENT_TEST_ID, COLLAPSE_CONTENT_CONTAINER_TEST_ID } from './consts.js';
|
|
10
|
-
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
11
|
-
import 'core-js/modules/es.regexp.exec.js';
|
|
12
9
|
|
|
13
10
|
var styles = {"container":"ring-collapse-container","transition":"ring-collapse-transition","summary":"ring-collapse-summary","trigger":"ring-collapse-trigger","fade":"ring-collapse-fade"};
|
|
14
11
|
|
|
@@ -19,12 +16,11 @@ const HIDDEN = 0;
|
|
|
19
16
|
/**
|
|
20
17
|
* @name CollapseContent
|
|
21
18
|
*/
|
|
22
|
-
const CollapseContent =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} = _ref;
|
|
19
|
+
const CollapseContent = ({
|
|
20
|
+
children,
|
|
21
|
+
minHeight = DEFAULT_HEIGHT,
|
|
22
|
+
'data-test': dataTest
|
|
23
|
+
}) => {
|
|
28
24
|
const {
|
|
29
25
|
collapsed,
|
|
30
26
|
duration,
|
|
@@ -49,9 +45,9 @@ const CollapseContent = _ref => {
|
|
|
49
45
|
}
|
|
50
46
|
}
|
|
51
47
|
const container = containerRef.current;
|
|
52
|
-
container
|
|
48
|
+
container?.addEventListener('transitionend', onTransitionEnd);
|
|
53
49
|
return () => {
|
|
54
|
-
container
|
|
50
|
+
container?.removeEventListener('transitionend', onTransitionEnd);
|
|
55
51
|
};
|
|
56
52
|
}, [collapsed]);
|
|
57
53
|
useEffect(() => {
|
|
@@ -69,8 +65,7 @@ const CollapseContent = _ref => {
|
|
|
69
65
|
}, [collapsed, dimensions.height]);
|
|
70
66
|
useEffect(() => {
|
|
71
67
|
if (contentRef.current) {
|
|
72
|
-
const observer = new ResizeObserver(
|
|
73
|
-
let [entry] = _ref2;
|
|
68
|
+
const observer = new ResizeObserver(([entry]) => {
|
|
74
69
|
if (entry && entry.borderBoxSize) {
|
|
75
70
|
const {
|
|
76
71
|
inlineSize,
|
|
@@ -88,7 +83,7 @@ const CollapseContent = _ref => {
|
|
|
88
83
|
const style = useMemo(() => {
|
|
89
84
|
const calculatedDuration = duration + contentHeight.current * DURATION_FACTOR;
|
|
90
85
|
return {
|
|
91
|
-
'--duration':
|
|
86
|
+
'--duration': `${calculatedDuration}ms`,
|
|
92
87
|
height,
|
|
93
88
|
opacity: collapsed && !minHeight ? HIDDEN : VISIBLE
|
|
94
89
|
};
|
|
@@ -97,7 +92,7 @@ const CollapseContent = _ref => {
|
|
|
97
92
|
const shouldRenderContent = disableAnimation ? !collapsed : !shouldHideContent;
|
|
98
93
|
return jsxs("div", {
|
|
99
94
|
ref: containerRef,
|
|
100
|
-
id:
|
|
95
|
+
id: `collapse-content-${id}`,
|
|
101
96
|
"data-test": joinDataTestAttributes(COLLAPSE_CONTENT_CONTAINER_TEST_ID),
|
|
102
97
|
className: classNames(styles.container, {
|
|
103
98
|
[styles.transition]: !disableAnimation
|
|
@@ -3,16 +3,14 @@ import { useContext, useMemo, cloneElement } from 'react';
|
|
|
3
3
|
import joinDataTestAttributes from '../global/data-tests.js';
|
|
4
4
|
import { CollapseContext } from './collapse-context.js';
|
|
5
5
|
import { COLLAPSE_CONTROL_TEST_ID } from './consts.js';
|
|
6
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* @name CollapseControl
|
|
10
9
|
*/
|
|
11
|
-
const CollapseControl =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = _ref;
|
|
10
|
+
const CollapseControl = ({
|
|
11
|
+
children,
|
|
12
|
+
'data-test': dataTest
|
|
13
|
+
}) => {
|
|
16
14
|
const {
|
|
17
15
|
setCollapsed,
|
|
18
16
|
collapsed,
|
|
@@ -29,7 +27,7 @@ const CollapseControl = _ref => {
|
|
|
29
27
|
"data-test": joinDataTestAttributes(COLLAPSE_CONTROL_TEST_ID, dataTest),
|
|
30
28
|
children: /*#__PURE__*/cloneElement(child, {
|
|
31
29
|
onClick: setCollapsed,
|
|
32
|
-
'aria-controls':
|
|
30
|
+
'aria-controls': `collapse-content-${id}`,
|
|
33
31
|
'aria-expanded': String(!collapsed)
|
|
34
32
|
})
|
|
35
33
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
1
|
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import { useState, useId, useMemo, useCallback } from 'react';
|
|
4
3
|
import { CollapseContext } from './collapse-context.js';
|
|
@@ -7,16 +6,15 @@ import { BASE_ANIMATION_DURATION } from './consts.js';
|
|
|
7
6
|
/**
|
|
8
7
|
* @name Collapse
|
|
9
8
|
*/
|
|
10
|
-
const Collapse =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} = _ref;
|
|
9
|
+
const Collapse = ({
|
|
10
|
+
children,
|
|
11
|
+
duration = BASE_ANIMATION_DURATION,
|
|
12
|
+
disableAnimation = false,
|
|
13
|
+
className = '',
|
|
14
|
+
onChange = () => {},
|
|
15
|
+
defaultCollapsed = true,
|
|
16
|
+
collapsed = null
|
|
17
|
+
}) => {
|
|
20
18
|
const [innerCollapsed, setInnerCollapsed] = useState(defaultCollapsed);
|
|
21
19
|
const id = useId();
|
|
22
20
|
const finalCollapsedValue = useMemo(() => collapsed !== null && collapsed !== void 0 ? collapsed : innerCollapsed, [innerCollapsed, collapsed]);
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/es.symbol.description.js';
|
|
3
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
4
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
2
|
import { PureComponent } from 'react';
|
|
6
3
|
import Dialog from '../dialog/dialog.js';
|
|
@@ -21,7 +18,6 @@ import '../global/schedule-raf.js';
|
|
|
21
18
|
import '../global/get-uid.js';
|
|
22
19
|
import '../shortcuts/shortcuts.js';
|
|
23
20
|
import '../shortcuts/core.js';
|
|
24
|
-
import 'core-js/modules/es.regexp.exec.js';
|
|
25
21
|
import 'combokeys';
|
|
26
22
|
import '../global/sniffer.js';
|
|
27
23
|
import 'sniffr';
|
|
@@ -29,10 +25,8 @@ import '../tab-trap/tab-trap.js';
|
|
|
29
25
|
import '../global/dom.js';
|
|
30
26
|
import '../popup/popup.target.js';
|
|
31
27
|
import '../popup/popup.js';
|
|
32
|
-
import 'core-js/modules/es.string.replace.js';
|
|
33
28
|
import '../global/configuration.js';
|
|
34
29
|
import '../popup/position.js';
|
|
35
|
-
import 'core-js/modules/es.array.sort.js';
|
|
36
30
|
import '../popup/popup.consts.js';
|
|
37
31
|
import '../popup/position-css.js';
|
|
38
32
|
import '../_helpers/dialog-body-scroll-preventer.js';
|
|
@@ -52,14 +46,23 @@ import '../_helpers/button.classes.js';
|
|
|
52
46
|
* @name Confirm
|
|
53
47
|
*/
|
|
54
48
|
class Confirm extends PureComponent {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
49
|
+
static defaultProps = {
|
|
50
|
+
text: null,
|
|
51
|
+
description: null,
|
|
52
|
+
show: false,
|
|
53
|
+
rejectOnEsc: true,
|
|
54
|
+
inProgress: false,
|
|
55
|
+
cancelIsDefault: false,
|
|
56
|
+
confirmLabel: 'OK',
|
|
57
|
+
rejectLabel: 'Cancel',
|
|
58
|
+
onConfirm: () => {},
|
|
59
|
+
onReject: () => {}
|
|
60
|
+
};
|
|
61
|
+
onEscPress = () => {
|
|
62
|
+
if (this.props.rejectOnEsc) {
|
|
63
|
+
this.props.onReject();
|
|
64
|
+
}
|
|
65
|
+
};
|
|
63
66
|
render() {
|
|
64
67
|
const {
|
|
65
68
|
show,
|
|
@@ -105,17 +108,5 @@ class Confirm extends PureComponent {
|
|
|
105
108
|
});
|
|
106
109
|
}
|
|
107
110
|
}
|
|
108
|
-
_defineProperty(Confirm, "defaultProps", {
|
|
109
|
-
text: null,
|
|
110
|
-
description: null,
|
|
111
|
-
show: false,
|
|
112
|
-
rejectOnEsc: true,
|
|
113
|
-
inProgress: false,
|
|
114
|
-
cancelIsDefault: false,
|
|
115
|
-
confirmLabel: 'OK',
|
|
116
|
-
rejectLabel: 'Cancel',
|
|
117
|
-
onConfirm: () => {},
|
|
118
|
-
onReject: () => {}
|
|
119
|
-
});
|
|
120
111
|
|
|
121
112
|
export { Confirm as default };
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/es.symbol.description.js';
|
|
3
1
|
import { jsx } from 'react/jsx-runtime';
|
|
4
2
|
import { createRoot } from 'react-dom/client';
|
|
5
3
|
import Confirm from '../confirm/confirm.js';
|
|
6
4
|
import { getGlobalControlsHeight, ControlsHeightContext } from '../global/controls-height.js';
|
|
7
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
8
5
|
import 'react';
|
|
9
6
|
import '../dialog/dialog.js';
|
|
10
7
|
import 'react-dom';
|
|
@@ -22,7 +19,6 @@ import '../global/schedule-raf.js';
|
|
|
22
19
|
import '../global/get-uid.js';
|
|
23
20
|
import '../shortcuts/shortcuts.js';
|
|
24
21
|
import '../shortcuts/core.js';
|
|
25
|
-
import 'core-js/modules/es.regexp.exec.js';
|
|
26
22
|
import 'combokeys';
|
|
27
23
|
import '../global/sniffer.js';
|
|
28
24
|
import 'sniffr';
|
|
@@ -35,7 +31,6 @@ import 'util-deprecate';
|
|
|
35
31
|
import '../icon/icon.js';
|
|
36
32
|
import '../icon/icon.constants.js';
|
|
37
33
|
import '../_helpers/icon-svg.js';
|
|
38
|
-
import 'core-js/modules/es.string.replace.js';
|
|
39
34
|
import '../global/memoize.js';
|
|
40
35
|
import '../link/clickable-link.js';
|
|
41
36
|
import '../_helpers/button.classes.js';
|
|
@@ -43,14 +38,12 @@ import '../global/configuration.js';
|
|
|
43
38
|
import '../popup/popup.target.js';
|
|
44
39
|
import '../popup/popup.js';
|
|
45
40
|
import '../popup/position.js';
|
|
46
|
-
import 'core-js/modules/es.array.sort.js';
|
|
47
41
|
import '../popup/popup.consts.js';
|
|
48
42
|
import '../popup/position-css.js';
|
|
49
43
|
import '../_helpers/dialog-body-scroll-preventer.js';
|
|
50
44
|
import 'scrollbar-width';
|
|
51
45
|
import '../panel/panel.js';
|
|
52
46
|
|
|
53
|
-
const _excluded = ["buttonsHeight"];
|
|
54
47
|
const containerElement = document.createElement('div');
|
|
55
48
|
const reactRoot = createRoot(containerElement);
|
|
56
49
|
/**
|
|
@@ -58,24 +51,25 @@ const reactRoot = createRoot(containerElement);
|
|
|
58
51
|
*/
|
|
59
52
|
function renderConfirm(props) {
|
|
60
53
|
const {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
54
|
+
buttonsHeight = getGlobalControlsHeight(),
|
|
55
|
+
...restProps
|
|
56
|
+
} = props;
|
|
64
57
|
reactRoot.render(jsx(ControlsHeightContext.Provider, {
|
|
65
58
|
value: buttonsHeight,
|
|
66
|
-
children: jsx(Confirm,
|
|
59
|
+
children: jsx(Confirm, {
|
|
60
|
+
...restProps
|
|
61
|
+
})
|
|
67
62
|
}));
|
|
68
63
|
}
|
|
69
|
-
function confirm(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
} = _ref;
|
|
64
|
+
function confirm({
|
|
65
|
+
text,
|
|
66
|
+
description,
|
|
67
|
+
confirmLabel = 'OK',
|
|
68
|
+
rejectLabel = 'Cancel',
|
|
69
|
+
cancelIsDefault,
|
|
70
|
+
onBeforeConfirm,
|
|
71
|
+
buttonsHeight
|
|
72
|
+
}) {
|
|
79
73
|
return new Promise((resolve, reject) => {
|
|
80
74
|
const props = {
|
|
81
75
|
text,
|
|
@@ -87,30 +81,35 @@ function confirm(_ref) {
|
|
|
87
81
|
show: true,
|
|
88
82
|
onConfirm: () => {
|
|
89
83
|
if (onBeforeConfirm) {
|
|
90
|
-
renderConfirm(
|
|
84
|
+
renderConfirm({
|
|
85
|
+
...props,
|
|
91
86
|
inProgress: true
|
|
92
|
-
})
|
|
87
|
+
});
|
|
93
88
|
return Promise.resolve(onBeforeConfirm()).then(() => {
|
|
94
|
-
renderConfirm(
|
|
89
|
+
renderConfirm({
|
|
90
|
+
...props,
|
|
95
91
|
show: false
|
|
96
|
-
})
|
|
92
|
+
});
|
|
97
93
|
resolve();
|
|
98
94
|
}).catch(err => {
|
|
99
|
-
renderConfirm(
|
|
95
|
+
renderConfirm({
|
|
96
|
+
...props,
|
|
100
97
|
show: false
|
|
101
|
-
})
|
|
98
|
+
});
|
|
102
99
|
reject(err);
|
|
103
100
|
});
|
|
104
101
|
}
|
|
105
|
-
renderConfirm(
|
|
102
|
+
renderConfirm({
|
|
103
|
+
...props,
|
|
106
104
|
show: false
|
|
107
|
-
})
|
|
105
|
+
});
|
|
108
106
|
return resolve();
|
|
109
107
|
},
|
|
110
108
|
onReject: () => {
|
|
111
|
-
renderConfirm(
|
|
109
|
+
renderConfirm({
|
|
110
|
+
...props,
|
|
112
111
|
show: false
|
|
113
|
-
})
|
|
112
|
+
});
|
|
114
113
|
reject(new Error('Confirm(@jetbrains/ring-ui): null exception'));
|
|
115
114
|
}
|
|
116
115
|
};
|
|
@@ -1,36 +1,32 @@
|
|
|
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 { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
2
|
import { Component, Children, cloneElement } from 'react';
|
|
5
3
|
import classNames from 'classnames';
|
|
6
4
|
import { s as styles, S as Sidebar } from '../_helpers/sidebar.js';
|
|
7
5
|
import 'react-waypoint';
|
|
8
6
|
|
|
9
|
-
const _excluded = ["children", "className", "contentClassName", "responsive"];
|
|
10
7
|
/**
|
|
11
8
|
* @name Content Layout
|
|
12
9
|
*/
|
|
13
10
|
class ContentLayout extends Component {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
static defaultProps = {
|
|
12
|
+
responsive: true
|
|
13
|
+
};
|
|
14
|
+
state = {
|
|
15
|
+
contentNode: null
|
|
16
|
+
};
|
|
17
|
+
saveContentNode = contentNode => {
|
|
18
|
+
this.setState({
|
|
19
|
+
contentNode
|
|
18
20
|
});
|
|
19
|
-
|
|
20
|
-
this.setState({
|
|
21
|
-
contentNode
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
}
|
|
21
|
+
};
|
|
25
22
|
render() {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
restProps = _objectWithoutProperties(_this$props, _excluded);
|
|
23
|
+
const {
|
|
24
|
+
children,
|
|
25
|
+
className,
|
|
26
|
+
contentClassName,
|
|
27
|
+
responsive,
|
|
28
|
+
...restProps
|
|
29
|
+
} = this.props;
|
|
34
30
|
const classes = classNames(styles.contentLayout, className, {
|
|
35
31
|
[styles.contentLayoutResponsive]: responsive
|
|
36
32
|
});
|
|
@@ -41,20 +37,17 @@ class ContentLayout extends Component {
|
|
|
41
37
|
contentNode: this.state.contentNode
|
|
42
38
|
});
|
|
43
39
|
const contentChildren = childrenArray.filter(child => child !== sidebarChild);
|
|
44
|
-
return jsxs("div",
|
|
45
|
-
"data-test": 'content-layout'
|
|
46
|
-
|
|
40
|
+
return jsxs("div", {
|
|
41
|
+
"data-test": 'content-layout',
|
|
42
|
+
...restProps,
|
|
47
43
|
className: classes,
|
|
48
44
|
children: [sidebar, jsx("main", {
|
|
49
45
|
className: contentClasses,
|
|
50
46
|
ref: this.saveContentNode,
|
|
51
47
|
children: contentChildren
|
|
52
48
|
})]
|
|
53
|
-
})
|
|
49
|
+
});
|
|
54
50
|
}
|
|
55
51
|
}
|
|
56
|
-
_defineProperty(ContentLayout, "defaultProps", {
|
|
57
|
-
responsive: true
|
|
58
|
-
});
|
|
59
52
|
|
|
60
53
|
export { Sidebar, ContentLayout as default };
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import { Component } from 'react';
|
|
4
3
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
5
4
|
|
|
6
|
-
const _excluded = ["__html", "onComponentUpdate", "disabled", "tabIndex", "inputRef"],
|
|
7
|
-
_excluded2 = ["children"];
|
|
8
5
|
/**
|
|
9
6
|
* @name ContentEditable
|
|
10
7
|
*/
|
|
11
8
|
function noop() {}
|
|
12
9
|
class ContentEditableBase extends Component {
|
|
10
|
+
static defaultProps = {
|
|
11
|
+
disabled: false,
|
|
12
|
+
tabIndex: 0,
|
|
13
|
+
onInput: noop,
|
|
14
|
+
onComponentUpdate: noop
|
|
15
|
+
};
|
|
13
16
|
shouldComponentUpdate(nextProps) {
|
|
14
17
|
// eslint-disable-next-line no-underscore-dangle
|
|
15
18
|
return nextProps.disabled !== this.props.disabled || nextProps.__html !== this.props.__html;
|
|
@@ -18,16 +21,16 @@ class ContentEditableBase extends Component {
|
|
|
18
21
|
this.props.onComponentUpdate(prevProps);
|
|
19
22
|
}
|
|
20
23
|
render() {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
const {
|
|
25
|
+
__html,
|
|
26
|
+
onComponentUpdate,
|
|
27
|
+
disabled,
|
|
28
|
+
tabIndex,
|
|
29
|
+
inputRef,
|
|
30
|
+
...props
|
|
31
|
+
} = this.props;
|
|
32
|
+
return jsx("div", {
|
|
33
|
+
...props,
|
|
31
34
|
ref: inputRef,
|
|
32
35
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
33
36
|
// @ts-ignore
|
|
@@ -38,23 +41,15 @@ class ContentEditableBase extends Component {
|
|
|
38
41
|
dangerouslySetInnerHTML: {
|
|
39
42
|
__html
|
|
40
43
|
}
|
|
41
|
-
})
|
|
44
|
+
});
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
const ContentEditable = ({
|
|
48
|
+
children,
|
|
49
|
+
...props
|
|
50
|
+
}) => jsx(ContentEditableBase, {
|
|
51
|
+
...props,
|
|
52
|
+
__html: renderToStaticMarkup(children)
|
|
49
53
|
});
|
|
50
|
-
const ContentEditable = _ref => {
|
|
51
|
-
let {
|
|
52
|
-
children
|
|
53
|
-
} = _ref,
|
|
54
|
-
props = _objectWithoutProperties(_ref, _excluded2);
|
|
55
|
-
return jsx(ContentEditableBase, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
56
|
-
__html: renderToStaticMarkup(children)
|
|
57
|
-
}));
|
|
58
|
-
};
|
|
59
54
|
|
|
60
55
|
export { ContentEditable as default };
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import { a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
|
|
5
4
|
var styles = {"help":"ring-control-help-help"};
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}, restProps));
|
|
6
|
+
function ControlHelp({
|
|
7
|
+
className,
|
|
8
|
+
...restProps
|
|
9
|
+
}) {
|
|
10
|
+
return jsx("div", {
|
|
11
|
+
className: classNames(className, styles.help),
|
|
12
|
+
...restProps
|
|
13
|
+
});
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
export { ControlHelp as default };
|