@jetbrains/ring-ui-built 7.0.124 → 8.0.0-beta.10
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 +1 -1
- package/components/_helpers/avatar-info.js +3 -5
- package/components/_helpers/caption.js +1 -1
- package/components/_helpers/icon-svg.js +37 -52
- package/components/_helpers/legacy-table.js +3 -0
- package/components/_helpers/tab-link.js +1 -1
- package/components/_helpers/table.js +2 -2
- package/components/_helpers/theme.js +49 -37
- package/components/alert/alert-actions.js +1 -1
- package/components/alert/alert-heading.js +1 -1
- package/components/alert/alert.js +2 -2
- package/components/alert-service/alert-service.js +2 -2
- package/components/auth/auth-core.js +2 -2
- package/components/auth/auth.js +2 -2
- package/components/auth/down-notification.js +2 -2
- package/components/auth/iframe-flow.js +1 -1
- package/components/auth/storage.js +2 -2
- package/components/auth-dialog/auth-dialog.js +2 -2
- package/components/auth-dialog-service/auth-dialog-service.js +2 -2
- package/components/avatar/avatar-info.js +1 -1
- package/components/avatar/avatar-size.d.ts +0 -4
- package/components/avatar/avatar-size.js +0 -4
- package/components/avatar/avatar.js +1 -8
- package/components/avatar/fallback-avatar.js +3 -48
- package/components/avatar-stack/avatar-stack.js +5 -5
- package/components/banner/banner.js +2 -2
- package/components/button/button.d.ts +0 -4
- package/components/button/button.js +4 -10
- package/components/button-group/button-group.js +1 -1
- package/components/button-toolbar/button-toolbar.js +1 -1
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/checkbox.js +1 -2
- package/components/clipboard/clipboard.js +2 -2
- package/components/collapse/collapse-content.js +35 -43
- package/components/collapse/collapse-context.d.ts +1 -0
- package/components/collapse/collapse-context.js +1 -0
- package/components/collapse/collapse-control.js +5 -5
- package/components/collapse/collapse.js +34 -25
- package/components/collapsible-group/collapsible-group.d.ts +5 -1
- package/components/collapsible-group/collapsible-group.js +80 -98
- package/components/components/util-stories.js +63 -1
- package/components/confirm/confirm.js +2 -2
- package/components/confirm-service/confirm-service.js +4 -4
- package/components/contenteditable/contenteditable.js +4 -5
- package/components/control-help/control-help.js +1 -1
- package/components/control-label/control-label.js +1 -1
- package/components/data-list/data-list.d.ts +4 -4
- package/components/data-list/data-list.js +5 -5
- package/components/data-list/data-list.mock.d.ts +1 -1
- package/components/data-list/data-list.mock.js +2 -2
- package/components/data-list/item.d.ts +1 -1
- package/components/data-list/item.js +3 -3
- package/components/data-list/selection.d.ts +1 -1
- package/components/data-list/selection.js +2 -2
- package/components/data-list/title.js +1 -2
- package/components/date-picker/date-input.js +2 -2
- package/components/date-picker/date-picker.js +2 -3
- package/components/date-picker/date-popup.js +4 -5
- package/components/date-picker/month-names.js +1 -1
- package/components/date-picker/month-slider.js +1 -1
- package/components/date-picker/month.d.ts +0 -2
- package/components/date-picker/month.js +17 -18
- package/components/date-picker/months.js +43 -36
- package/components/date-picker/use-scroll-behavior.js +45 -45
- package/components/date-picker/weekdays.js +1 -1
- package/components/date-picker/years.js +61 -55
- package/components/dialog/dialog.d.ts +2 -2
- package/components/dialog/dialog.js +5 -5
- package/components/dropdown/anchor.js +3 -3
- package/components/dropdown/dropdown.js +3 -3
- package/components/dropdown-menu/dropdown-menu.d.ts +4 -4
- package/components/dropdown-menu/dropdown-menu.js +63 -58
- package/components/editable-heading/editable-heading.d.ts +1 -2
- package/components/editable-heading/editable-heading.js +14 -13
- package/components/error-bubble/error-bubble.js +1 -1
- package/components/error-message/error-message.js +1 -2
- package/components/footer/footer.js +1 -1
- package/components/global/compose-refs.d.ts +2 -1
- package/components/global/compose-refs.js +44 -8
- package/components/global/configuration.d.ts +0 -5
- package/components/global/configuration.js +2 -10
- package/components/global/controls-height.js +1 -1
- package/components/global/create-stateful-context.js +11 -11
- package/components/global/focus-sensor-hoc.js +1 -0
- package/components/global/focus-with-temporary-tabindex.d.ts +11 -0
- package/components/global/focus-with-temporary-tabindex.js +23 -0
- package/components/global/intersection-observer-context.d.ts +46 -0
- package/components/global/intersection-observer-context.js +138 -0
- package/components/global/is-within-interactive-element.d.ts +6 -0
- package/components/global/is-within-interactive-element.js +11 -0
- package/components/global/is-within-navigable-element.d.ts +6 -0
- package/components/global/is-within-navigable-element.js +11 -0
- package/components/global/parse-css-duration.d.ts +5 -0
- package/components/global/parse-css-duration.js +14 -0
- package/components/global/rerender-hoc.d.ts +4 -2
- package/components/global/rerender-hoc.js +11 -24
- package/components/global/schedule-with-cleanup.d.ts +12 -0
- package/components/global/schedule-with-cleanup.js +36 -0
- package/components/{table/selection.d.ts → global/table-selection.d.ts} +15 -15
- package/components/{table/selection.js → global/table-selection.js} +5 -5
- package/components/global/theme.d.ts +4 -3
- package/components/global/theme.js +1 -1
- package/components/global/variables.interface.d.ts +0 -4
- package/components/header/header-icon.js +3 -3
- package/components/header/header.js +3 -3
- package/components/header/links.js +1 -1
- package/components/header/logo.js +1 -2
- package/components/header/profile.js +5 -5
- package/components/header/services.js +3 -3
- package/components/header/smart-profile.js +3 -3
- package/components/header/smart-services.js +3 -3
- package/components/heading/heading.js +1 -1
- package/components/i18n/i18n-context.js +4 -4
- package/components/icon/icon-svg.js +1 -2
- package/components/icon/icon.d.ts +0 -1
- package/components/icon/icon.js +2 -6
- package/components/icon/index.js +1 -2
- package/components/input/input.d.ts +1 -1
- package/components/input/input.js +3 -3
- package/components/internal/reorder-animation-context.js +159 -0
- package/components/internal/reorder-handle.js +750 -0
- package/components/internal/reorder-layout-context.js +141 -0
- package/components/internal/table-header.js +685 -0
- package/components/internal/virtualization.js +368 -0
- package/components/island/adaptive-island-hoc.js +3 -3
- package/components/island/content.d.ts +7 -2
- package/components/island/content.js +27 -18
- package/components/island/header.js +1 -1
- package/components/island/island.js +1 -1
- package/components/{table → legacy-table}/cell.js +1 -1
- package/components/{table → legacy-table}/header-cell.js +2 -3
- package/components/{table → legacy-table}/header.js +2 -3
- package/components/{table → legacy-table}/multitable.d.ts +1 -1
- package/components/{table → legacy-table}/row-with-focus-sensor.js +3 -3
- package/components/{table → legacy-table}/row.d.ts +1 -1
- package/components/{table → legacy-table}/row.js +5 -5
- package/components/legacy-table/selection-adapter.d.ts +6 -0
- package/components/{table → legacy-table}/selection-shortcuts-hoc.d.ts +5 -5
- package/components/{table → legacy-table}/simple-table.d.ts +2 -2
- package/components/{table → legacy-table}/simple-table.js +5 -5
- package/components/{table → legacy-table}/smart-table.d.ts +5 -5
- package/components/{table → legacy-table}/smart-table.js +6 -6
- package/components/legacy-table/table.d.ts +109 -0
- package/components/legacy-table/table.js +369 -0
- package/components/list/consts.d.ts +0 -1
- package/components/list/consts.js +0 -1
- package/components/list/list-item.js +3 -5
- package/components/list/list-users-groups-source.js +1 -2
- package/components/list/list.d.ts +0 -4
- package/components/list/list.js +1 -2
- package/components/login-dialog/login-dialog.js +3 -3
- package/components/login-dialog/service.js +2 -2
- package/components/message/message.js +1 -1
- package/components/pager/pager.js +3 -3
- package/components/popup/popup.js +1 -1
- package/components/popup/popup.target.d.ts +3 -2
- package/components/popup/popup.target.js +32 -28
- package/components/popup-menu/popup-menu.js +1 -1
- package/components/query-assist/query-assist-suggestions.js +1 -2
- package/components/query-assist/query-assist.d.ts +3 -1
- package/components/query-assist/query-assist.js +2 -2
- package/components/radio/radio-item.d.ts +3 -3
- package/components/radio/radio-item.js +33 -19
- package/components/radio/radio.d.ts +2 -2
- package/components/radio/radio.js +2 -2
- package/components/scrollable-section/scrollable-section.js +1 -1
- package/components/select/chevron-button.js +3 -3
- package/components/select/select-filter.js +3 -3
- package/components/select/select-popup.d.ts +3 -2
- package/components/select/select-popup.js +9 -4
- package/components/select/select.d.ts +6 -2
- package/components/select/select.js +5 -4
- package/components/selection-toolbar/selection-toolbar.d.ts +11 -0
- package/components/selection-toolbar/selection-toolbar.js +200 -0
- package/components/slider/slider.js +100 -97
- package/components/storage/storage-local.js +2 -2
- package/components/storage/storage.js +2 -2
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.d.ts +3 -3
- package/components/tab-trap/tab-trap.js +83 -80
- package/components/table/default-item-renderer.d.ts +55 -0
- package/components/table/default-item-renderer.js +240 -0
- package/components/table/internal/reorder-animation-context.d.ts +21 -0
- package/components/table/internal/reorder-handle.d.ts +9 -0
- package/components/table/internal/reorder-layout-context.d.ts +16 -0
- package/components/table/internal/table-header.d.ts +1 -0
- package/components/table/internal/virtualization.d.ts +41 -0
- package/components/table/item-virtualization.d.ts +37 -0
- package/components/table/item-virtualization.js +73 -0
- package/components/table/reorder-animation.d.ts +37 -0
- package/components/table/reorder-animation.js +18 -0
- package/components/table/reorder-item-layout.d.ts +32 -0
- package/components/table/reorder-item-layout.js +57 -0
- package/components/table/table-const.d.ts +10 -0
- package/components/table/table-const.js +13 -0
- package/components/table/table-primitives.d.ts +64 -0
- package/components/table/table-primitives.js +180 -0
- package/components/table/table-props.d.ts +304 -0
- package/components/table/table-props.js +1 -0
- package/components/table/table.d.ts +231 -107
- package/components/table/table.js +351 -346
- package/components/tabs/collapsible-more.js +1 -1
- package/components/tabs/collapsible-tab.js +1 -1
- package/components/tabs/collapsible-tabs.js +1 -1
- package/components/tabs/dumb-tabs.js +1 -1
- package/components/tabs/smart-tabs.js +1 -1
- package/components/tabs/tab-link.js +1 -1
- package/components/tabs/tabs.js +1 -1
- package/components/tag/tag.js +1 -1
- package/components/tags-input/tags-input.d.ts +3 -1
- package/components/tags-input/tags-input.js +4 -4
- package/components/tags-list/tags-list.js +2 -2
- package/components/toggle/toggle.js +1 -1
- package/components/tooltip/tooltip.d.ts +2 -1
- package/components/tooltip/tooltip.js +5 -3
- package/components/upload/upload.d.ts +4 -3
- package/components/upload/upload.js +7 -30
- package/components/user-agreement/service.js +3 -3
- package/components/user-agreement/user-agreement.js +2 -2
- package/components/user-card/card.js +4 -4
- package/components/user-card/smart-user-card-tooltip.js +3 -3
- package/components/user-card/tooltip.js +3 -3
- package/components/user-card/user-card.js +5 -5
- package/components/util-stories.d.ts +26 -0
- package/package.json +8 -9
- package/components/__mocks__/old-browsers-message.js +0 -3
- package/components/_helpers/grid.js +0 -3
- package/components/_helpers/sidebar.js +0 -110
- package/components/content-layout/content-layout.d.ts +0 -20
- package/components/content-layout/content-layout.js +0 -50
- package/components/content-layout/sidebar.d.ts +0 -26
- package/components/content-layout/sidebar.js +0 -5
- package/components/date-picker/use-intersection-observer.d.ts +0 -6
- package/components/date-picker/use-intersection-observer.js +0 -93
- package/components/expand/collapsible-group.d.ts +0 -8
- package/components/expand/collapsible-group.js +0 -52
- package/components/global/composeRefs.d.ts +0 -6
- package/components/global/composeRefs.js +0 -9
- package/components/global/use-event-callback.d.ts +0 -4
- package/components/global/use-event-callback.js +0 -49
- package/components/grid/col.d.ts +0 -16
- package/components/grid/col.js +0 -63
- package/components/grid/grid.d.ts +0 -13
- package/components/grid/grid.js +0 -27
- package/components/grid/row.d.ts +0 -21
- package/components/grid/row.js +0 -72
- package/components/old-browsers-message/old-browsers-message-stop.d.ts +0 -1
- package/components/old-browsers-message/old-browsers-message-stop.js +0 -5
- package/components/old-browsers-message/old-browsers-message.d.ts +0 -5
- package/components/old-browsers-message/old-browsers-message.js +0 -89
- package/components/old-browsers-message/white-list.d.ts +0 -2
- package/components/old-browsers-message/white-list.js +0 -30
- package/components/table/selection-adapter.d.ts +0 -6
- /package/components/{table → legacy-table}/cell.d.ts +0 -0
- /package/components/{table → legacy-table}/disable-hover-hoc.d.ts +0 -0
- /package/components/{table → legacy-table}/disable-hover-hoc.js +0 -0
- /package/components/{table → legacy-table}/header-cell.d.ts +0 -0
- /package/components/{table → legacy-table}/header.d.ts +0 -0
- /package/components/{table → legacy-table}/multitable.js +0 -0
- /package/components/{table → legacy-table}/row-with-focus-sensor.d.ts +0 -0
- /package/components/{table → legacy-table}/selection-adapter.js +0 -0
- /package/components/{table → legacy-table}/selection-shortcuts-hoc.js +0 -0
|
@@ -10,18 +10,18 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
10
10
|
import '../global/data-tests.js';
|
|
11
11
|
import '../global/typescript-utils.js';
|
|
12
12
|
import '../_helpers/anchor.js';
|
|
13
|
-
import 'react
|
|
13
|
+
import 'react/compiler-runtime';
|
|
14
14
|
import '../button/button.js';
|
|
15
15
|
import '@jetbrains/icons/chevron-down';
|
|
16
16
|
import '@jetbrains/icons/chevron-12px-down';
|
|
17
|
-
import 'util-deprecate';
|
|
18
17
|
import '../icon/icon.js';
|
|
18
|
+
import 'util-deprecate';
|
|
19
19
|
import '../icon/icon.constants.js';
|
|
20
20
|
import '../_helpers/icon-svg.js';
|
|
21
|
-
import '../global/configuration.js';
|
|
22
21
|
import '../global/memoize.js';
|
|
23
22
|
import '../link/clickable-link.js';
|
|
24
23
|
import '../global/controls-height.js';
|
|
24
|
+
import '../global/configuration.js';
|
|
25
25
|
import '../_helpers/button.classes.js';
|
|
26
26
|
import 'react-dom';
|
|
27
27
|
import '../global/get-uid.js';
|
|
@@ -17,8 +17,7 @@ import '../icon/icon.js';
|
|
|
17
17
|
import 'util-deprecate';
|
|
18
18
|
import '../icon/icon.constants.js';
|
|
19
19
|
import '../_helpers/icon-svg.js';
|
|
20
|
-
import 'react
|
|
21
|
-
import '../global/configuration.js';
|
|
20
|
+
import 'react/compiler-runtime';
|
|
22
21
|
import '../global/memoize.js';
|
|
23
22
|
import '../loader-inline/loader-inline.js';
|
|
24
23
|
import '../global/data-tests.js';
|
|
@@ -28,6 +27,7 @@ import '@jetbrains/icons/chevron-down';
|
|
|
28
27
|
import '@jetbrains/icons/chevron-12px-down';
|
|
29
28
|
import '../link/clickable-link.js';
|
|
30
29
|
import '../global/controls-height.js';
|
|
30
|
+
import '../global/configuration.js';
|
|
31
31
|
import '../_helpers/button.classes.js';
|
|
32
32
|
import '../_helpers/theme.js';
|
|
33
33
|
import '../alert/alert-heading.js';
|
|
@@ -38,13 +38,13 @@ import '../alert/alert-actions.js';
|
|
|
38
38
|
import '../alert/container.js';
|
|
39
39
|
import 'react-dom';
|
|
40
40
|
import '../avatar/avatar.js';
|
|
41
|
-
import 'core-js/modules/es.array.includes.js';
|
|
42
41
|
import '../global/url.js';
|
|
43
42
|
import '../avatar/fallback-avatar.js';
|
|
44
43
|
import '../avatar/avatar-size.js';
|
|
45
44
|
import '../_helpers/avatar-info.js';
|
|
46
45
|
import '../dropdown-menu/dropdown-menu.js';
|
|
47
46
|
import '../list/list.js';
|
|
47
|
+
import 'core-js/modules/es.array.includes.js';
|
|
48
48
|
import 'react-virtualized/dist/es/List';
|
|
49
49
|
import 'react-virtualized/dist/es/AutoSizer';
|
|
50
50
|
import 'react-virtualized/dist/es/WindowScroller';
|
|
@@ -9,18 +9,18 @@ import '../dropdown/dropdown.js';
|
|
|
9
9
|
import '../global/data-tests.js';
|
|
10
10
|
import '../global/typescript-utils.js';
|
|
11
11
|
import '../_helpers/anchor.js';
|
|
12
|
-
import 'react
|
|
12
|
+
import 'react/compiler-runtime';
|
|
13
13
|
import '../button/button.js';
|
|
14
14
|
import '@jetbrains/icons/chevron-down';
|
|
15
15
|
import '@jetbrains/icons/chevron-12px-down';
|
|
16
|
-
import 'util-deprecate';
|
|
17
16
|
import '../icon/icon.js';
|
|
17
|
+
import 'util-deprecate';
|
|
18
18
|
import '../icon/icon.constants.js';
|
|
19
19
|
import '../_helpers/icon-svg.js';
|
|
20
|
-
import '../global/configuration.js';
|
|
21
20
|
import '../global/memoize.js';
|
|
22
21
|
import '../link/clickable-link.js';
|
|
23
22
|
import '../global/controls-height.js';
|
|
23
|
+
import '../global/configuration.js';
|
|
24
24
|
import '../_helpers/button.classes.js';
|
|
25
25
|
import '../popup/popup.js';
|
|
26
26
|
import 'react-dom';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c } from 'react
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useEffect } from 'react';
|
|
4
4
|
import { translate, getTranslations, setTranslations } from './i18n.js';
|
|
@@ -10,11 +10,11 @@ const I18nContext = /*#__PURE__*/React.createContext({
|
|
|
10
10
|
});
|
|
11
11
|
const I18nContextHolder = t0 => {
|
|
12
12
|
const $ = c(9);
|
|
13
|
-
if ($[0] !== "
|
|
13
|
+
if ($[0] !== "a2018c2c34e104bb25f29b4f924dc1f30d92611151a999bc264d56ee3cdb5c56") {
|
|
14
14
|
for (let $i = 0; $i < 9; $i += 1) {
|
|
15
15
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
16
16
|
}
|
|
17
|
-
$[0] = "
|
|
17
|
+
$[0] = "a2018c2c34e104bb25f29b4f924dc1f30d92611151a999bc264d56ee3cdb5c56";
|
|
18
18
|
}
|
|
19
19
|
const {
|
|
20
20
|
children,
|
|
@@ -48,7 +48,7 @@ const I18nContextHolder = t0 => {
|
|
|
48
48
|
}
|
|
49
49
|
let t4;
|
|
50
50
|
if ($[6] !== children || $[7] !== t3) {
|
|
51
|
-
t4 = /*#__PURE__*/jsx(I18nContext
|
|
51
|
+
t4 = /*#__PURE__*/jsx(I18nContext, {
|
|
52
52
|
value: t3,
|
|
53
53
|
children: children
|
|
54
54
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import 'react
|
|
1
|
+
import 'react/compiler-runtime';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
|
-
import '../global/configuration.js';
|
|
5
4
|
import '../global/memoize.js';
|
|
6
5
|
export { I as default } from '../_helpers/icon-svg.js';
|
|
7
6
|
import 'react/jsx-runtime';
|
|
@@ -19,7 +19,6 @@ export interface IconProps extends HTMLAttributes<HTMLElement> {
|
|
|
19
19
|
* @deprecated Use icons with appropriate intrinsic sizes instead
|
|
20
20
|
*/
|
|
21
21
|
width?: number | undefined;
|
|
22
|
-
loading?: boolean | null | undefined;
|
|
23
22
|
suppressSizeWarning?: boolean | null | undefined;
|
|
24
23
|
}
|
|
25
24
|
export default class Icon extends PureComponent<IconProps> {
|
package/components/icon/icon.js
CHANGED
|
@@ -4,8 +4,7 @@ import deprecate from 'util-deprecate';
|
|
|
4
4
|
import { Color, Size } from './icon.constants.js';
|
|
5
5
|
import { s as styles, I as IconSVG } from '../_helpers/icon-svg.js';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
|
-
import 'react
|
|
8
|
-
import '../global/configuration.js';
|
|
7
|
+
import 'react/compiler-runtime';
|
|
9
8
|
import '../global/memoize.js';
|
|
10
9
|
|
|
11
10
|
const warnSize = deprecate(() => {}, `\`size\`, \`width\` and \`height\` props are not recommended to use in Ring UI \`Icon\` component. The intrinsic sizes of SVG icon (\`width\` and \`height\` SVG attributes) are used instead.
|
|
@@ -55,7 +54,6 @@ class Icon extends PureComponent {
|
|
|
55
54
|
className,
|
|
56
55
|
size,
|
|
57
56
|
color,
|
|
58
|
-
loading,
|
|
59
57
|
glyph: Glyph,
|
|
60
58
|
width,
|
|
61
59
|
height,
|
|
@@ -65,9 +63,7 @@ class Icon extends PureComponent {
|
|
|
65
63
|
if (!Glyph) {
|
|
66
64
|
return null;
|
|
67
65
|
}
|
|
68
|
-
const classes = classNames(styles.icon, color && styles[color],
|
|
69
|
-
[styles.loading]: loading
|
|
70
|
-
}, className);
|
|
66
|
+
const classes = classNames(styles.icon, color && styles[color], className);
|
|
71
67
|
return /*#__PURE__*/jsx("span", {
|
|
72
68
|
"data-test": "ring-icon",
|
|
73
69
|
...restProps,
|
package/components/icon/index.js
CHANGED
|
@@ -4,7 +4,6 @@ import 'react';
|
|
|
4
4
|
import 'classnames';
|
|
5
5
|
import 'util-deprecate';
|
|
6
6
|
import '../_helpers/icon-svg.js';
|
|
7
|
-
import 'react
|
|
8
|
-
import '../global/configuration.js';
|
|
7
|
+
import 'react/compiler-runtime';
|
|
9
8
|
import '../global/memoize.js';
|
|
10
9
|
import 'react/jsx-runtime';
|
|
@@ -69,7 +69,7 @@ export declare class Input extends PureComponent<InputProps> {
|
|
|
69
69
|
stretch(el: HTMLElement | null | undefined): void;
|
|
70
70
|
adapt(): void;
|
|
71
71
|
inputRef: (el: HTMLInputElement | HTMLTextAreaElement | null) => void;
|
|
72
|
-
composedInputRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement | HTMLTextAreaElement> | undefined)[]) => (value: T | null) => void>;
|
|
72
|
+
composedInputRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement | HTMLTextAreaElement> | undefined)[]) => (value: T | null) => () => void>;
|
|
73
73
|
clear: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
74
74
|
handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
75
75
|
handleTextareaChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
@@ -13,13 +13,13 @@ export { I as Input, S as Size, I as default } from '../_helpers/input.js';
|
|
|
13
13
|
import 'react/jsx-runtime';
|
|
14
14
|
import '@jetbrains/icons/chevron-down';
|
|
15
15
|
import '@jetbrains/icons/chevron-12px-down';
|
|
16
|
-
import 'util-deprecate';
|
|
17
16
|
import '../link/clickable-link.js';
|
|
18
17
|
import '../_helpers/button.classes.js';
|
|
19
18
|
import '../icon/icon.constants.js';
|
|
19
|
+
import 'util-deprecate';
|
|
20
20
|
import '../_helpers/icon-svg.js';
|
|
21
|
-
import 'react
|
|
22
|
-
import '../global/configuration.js';
|
|
21
|
+
import 'react/compiler-runtime';
|
|
23
22
|
import '../global/memoize.js';
|
|
23
|
+
import '../global/configuration.js';
|
|
24
24
|
import '../i18n/i18n.js';
|
|
25
25
|
import 'memoize-one';
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import { createContext, useState, useRef, useEffect } from 'react';
|
|
3
|
+
import { parseCssDuration } from '../global/parse-css-duration.js';
|
|
4
|
+
import { requestAnimationFrameWithCleanup, setTimeoutWithCleanup } from '../global/schedule-with-cleanup.js';
|
|
5
|
+
import { s as styles } from '../_helpers/table.js';
|
|
6
|
+
|
|
7
|
+
/** How long to wait for the data to change after {@link expectReorder} is called. */
|
|
8
|
+
const pendingReorderTimeoutMs = 1000;
|
|
9
|
+
const ReorderAnimationContext = /*#__PURE__*/createContext({
|
|
10
|
+
reorderAnimation: null,
|
|
11
|
+
expectReorder: () => {}
|
|
12
|
+
});
|
|
13
|
+
function useReorderAnimationContextValue(t0) {
|
|
14
|
+
const $ = c(20);
|
|
15
|
+
if ($[0] !== "669a1fb3f5ac9a1cdad72a7fc204b97d9b35bce2182bb3bb8f0bd0acb524b958") {
|
|
16
|
+
for (let $i = 0; $i < 20; $i += 1) {
|
|
17
|
+
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
18
|
+
}
|
|
19
|
+
$[0] = "669a1fb3f5ac9a1cdad72a7fc204b97d9b35bce2182bb3bb8f0bd0acb524b958";
|
|
20
|
+
}
|
|
21
|
+
const {
|
|
22
|
+
noColumnReorderAnimation,
|
|
23
|
+
noItemReorderAnimation,
|
|
24
|
+
tableRef,
|
|
25
|
+
data,
|
|
26
|
+
columns
|
|
27
|
+
} = t0;
|
|
28
|
+
const [reorderAnimation, setReorderAnimation] = useState(null);
|
|
29
|
+
const pendingReorderRef = useRef(null);
|
|
30
|
+
let t1;
|
|
31
|
+
if ($[1] !== columns || $[2] !== data || $[3] !== noColumnReorderAnimation || $[4] !== noItemReorderAnimation) {
|
|
32
|
+
t1 = function expectReorder(reorderSpec) {
|
|
33
|
+
const isColumn = reorderSpec.direction === "columns";
|
|
34
|
+
if (isColumn && noColumnReorderAnimation || !isColumn && noItemReorderAnimation) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (pendingReorderRef.current) {
|
|
38
|
+
window.clearTimeout(pendingReorderRef.current.timerId);
|
|
39
|
+
}
|
|
40
|
+
const timerId = window.setTimeout(() => {
|
|
41
|
+
pendingReorderRef.current = null;
|
|
42
|
+
}, pendingReorderTimeoutMs);
|
|
43
|
+
pendingReorderRef.current = {
|
|
44
|
+
...reorderSpec,
|
|
45
|
+
timerId,
|
|
46
|
+
columns,
|
|
47
|
+
data
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
$[1] = columns;
|
|
51
|
+
$[2] = data;
|
|
52
|
+
$[3] = noColumnReorderAnimation;
|
|
53
|
+
$[4] = noItemReorderAnimation;
|
|
54
|
+
$[5] = t1;
|
|
55
|
+
} else {
|
|
56
|
+
t1 = $[5];
|
|
57
|
+
}
|
|
58
|
+
const expectReorder = t1;
|
|
59
|
+
let t2;
|
|
60
|
+
let t3;
|
|
61
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
62
|
+
t2 = () => () => {
|
|
63
|
+
if (pendingReorderRef.current) {
|
|
64
|
+
window.clearTimeout(pendingReorderRef.current.timerId);
|
|
65
|
+
pendingReorderRef.current = null;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
t3 = [];
|
|
69
|
+
$[6] = t2;
|
|
70
|
+
$[7] = t3;
|
|
71
|
+
} else {
|
|
72
|
+
t2 = $[6];
|
|
73
|
+
t3 = $[7];
|
|
74
|
+
}
|
|
75
|
+
useEffect(t2, t3);
|
|
76
|
+
let t4;
|
|
77
|
+
let t5;
|
|
78
|
+
if ($[8] !== columns || $[9] !== data || $[10] !== tableRef) {
|
|
79
|
+
t4 = () => {
|
|
80
|
+
const table = tableRef.current;
|
|
81
|
+
const pendingReorder = pendingReorderRef.current;
|
|
82
|
+
if (!table || !pendingReorder) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const {
|
|
86
|
+
direction,
|
|
87
|
+
data: pendingData,
|
|
88
|
+
columns: pendingColumns
|
|
89
|
+
} = pendingReorder;
|
|
90
|
+
const isColumn_0 = direction === "columns";
|
|
91
|
+
if (isColumn_0 && columns === pendingColumns || !isColumn_0 && data === pendingData) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
pendingReorderRef.current = null;
|
|
95
|
+
const {
|
|
96
|
+
fromIndex,
|
|
97
|
+
insertionIndex
|
|
98
|
+
} = pendingReorder;
|
|
99
|
+
const index = fromIndex < insertionIndex ? insertionIndex - 1 : insertionIndex;
|
|
100
|
+
return requestAnimationFrameWithCleanup(() => setReorderAnimation(prev => prev == null ? {
|
|
101
|
+
direction,
|
|
102
|
+
index,
|
|
103
|
+
phase: "initial",
|
|
104
|
+
className: styles.reorderAnimationInitial
|
|
105
|
+
} : prev));
|
|
106
|
+
};
|
|
107
|
+
t5 = [data, columns, tableRef];
|
|
108
|
+
$[8] = columns;
|
|
109
|
+
$[9] = data;
|
|
110
|
+
$[10] = tableRef;
|
|
111
|
+
$[11] = t4;
|
|
112
|
+
$[12] = t5;
|
|
113
|
+
} else {
|
|
114
|
+
t4 = $[11];
|
|
115
|
+
t5 = $[12];
|
|
116
|
+
}
|
|
117
|
+
useEffect(t4, t5);
|
|
118
|
+
let t6;
|
|
119
|
+
let t7;
|
|
120
|
+
if ($[13] !== reorderAnimation || $[14] !== tableRef) {
|
|
121
|
+
t6 = () => {
|
|
122
|
+
if (reorderAnimation?.phase === "initial") {
|
|
123
|
+
return requestAnimationFrameWithCleanup(() => setReorderAnimation(prev_0 => prev_0 === reorderAnimation ? {
|
|
124
|
+
...prev_0,
|
|
125
|
+
phase: "fade-out",
|
|
126
|
+
className: styles.reorderAnimationFadeOut
|
|
127
|
+
} : prev_0));
|
|
128
|
+
}
|
|
129
|
+
if (reorderAnimation?.phase === "fade-out") {
|
|
130
|
+
const fadeOutMs = parseCssDuration(window.getComputedStyle(tableRef.current).getPropertyValue("--reorder-animation-fade-out-duration"));
|
|
131
|
+
return setTimeoutWithCleanup(() => setReorderAnimation(prev_1 => prev_1 === reorderAnimation ? null : prev_1), fadeOutMs);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
t7 = [reorderAnimation, tableRef];
|
|
135
|
+
$[13] = reorderAnimation;
|
|
136
|
+
$[14] = tableRef;
|
|
137
|
+
$[15] = t6;
|
|
138
|
+
$[16] = t7;
|
|
139
|
+
} else {
|
|
140
|
+
t6 = $[15];
|
|
141
|
+
t7 = $[16];
|
|
142
|
+
}
|
|
143
|
+
useEffect(t6, t7);
|
|
144
|
+
let t8;
|
|
145
|
+
if ($[17] !== expectReorder || $[18] !== reorderAnimation) {
|
|
146
|
+
t8 = {
|
|
147
|
+
reorderAnimation,
|
|
148
|
+
expectReorder
|
|
149
|
+
};
|
|
150
|
+
$[17] = expectReorder;
|
|
151
|
+
$[18] = reorderAnimation;
|
|
152
|
+
$[19] = t8;
|
|
153
|
+
} else {
|
|
154
|
+
t8 = $[19];
|
|
155
|
+
}
|
|
156
|
+
return t8;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export { ReorderAnimationContext, useReorderAnimationContextValue };
|