@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
2
|
import { type TableAttrs } from './table';
|
|
3
|
-
import
|
|
3
|
+
import TableSelection, { type SelectionItem } from '../global/table-selection';
|
|
4
4
|
export interface SimpleTableProps<T extends SelectionItem> extends Omit<TableAttrs<T>, 'selection' | 'onSelect' | 'selectable'> {
|
|
5
5
|
}
|
|
6
6
|
declare class SimpleTable<T extends SelectionItem> extends PureComponent<SimpleTableProps<T>> {
|
|
@@ -9,7 +9,7 @@ declare class SimpleTable<T extends SelectionItem> extends PureComponent<SimpleT
|
|
|
9
9
|
wideFirstColumn: boolean;
|
|
10
10
|
};
|
|
11
11
|
state: {
|
|
12
|
-
selection:
|
|
12
|
+
selection: TableSelection<T>;
|
|
13
13
|
};
|
|
14
14
|
classes: string;
|
|
15
15
|
render(): import("react").JSX.Element;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import TableContainer from './table.js';
|
|
4
|
-
import
|
|
5
|
-
import { s as style } from '../_helpers/table.js';
|
|
4
|
+
import TableSelection from '../global/table-selection.js';
|
|
5
|
+
import { s as style } from '../_helpers/legacy-table.js';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
import 'react-movable';
|
|
8
8
|
import '../global/focus-sensor-hoc.js';
|
|
9
9
|
import '../global/compose-refs.js';
|
|
10
|
+
import 'react/compiler-runtime';
|
|
10
11
|
import 'memoize-one';
|
|
11
12
|
import '../global/get-uid.js';
|
|
12
13
|
import '../shortcuts/shortcuts.js';
|
|
@@ -26,8 +27,6 @@ import '../icon/icon.js';
|
|
|
26
27
|
import 'util-deprecate';
|
|
27
28
|
import '../icon/icon.constants.js';
|
|
28
29
|
import '../_helpers/icon-svg.js';
|
|
29
|
-
import 'react-compiler-runtime';
|
|
30
|
-
import '../global/configuration.js';
|
|
31
30
|
import '../global/memoize.js';
|
|
32
31
|
import '../control-help/control-help.js';
|
|
33
32
|
import '../global/data-tests.js';
|
|
@@ -44,6 +43,7 @@ import '@jetbrains/icons/drag';
|
|
|
44
43
|
import '../button/button.js';
|
|
45
44
|
import '../link/clickable-link.js';
|
|
46
45
|
import '../global/controls-height.js';
|
|
46
|
+
import '../global/configuration.js';
|
|
47
47
|
import '../_helpers/button.classes.js';
|
|
48
48
|
import '../tooltip/tooltip.js';
|
|
49
49
|
import '../popup/popup.js';
|
|
@@ -63,7 +63,7 @@ class SimpleTable extends PureComponent {
|
|
|
63
63
|
wideFirstColumn: false
|
|
64
64
|
};
|
|
65
65
|
state = {
|
|
66
|
-
selection: new
|
|
66
|
+
selection: new TableSelection({
|
|
67
67
|
data: this.props.data
|
|
68
68
|
})
|
|
69
69
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
2
|
import { type TableAttrs } from './table';
|
|
3
|
-
import
|
|
3
|
+
import TableSelection, { type SelectionItem } from '../global/table-selection';
|
|
4
4
|
export interface SmartTableProps<T extends SelectionItem> extends Omit<TableAttrs<T>, 'selection' | 'onSelect'> {
|
|
5
|
-
onSelectionChange: (selection:
|
|
6
|
-
selection?:
|
|
5
|
+
onSelectionChange: (selection: TableSelection<T>) => void;
|
|
6
|
+
selection?: TableSelection<T>;
|
|
7
7
|
}
|
|
8
8
|
declare class SmartTable<T extends SelectionItem> extends PureComponent<SmartTableProps<T>> {
|
|
9
9
|
static defaultProps: {
|
|
10
10
|
onSelectionChange: () => void;
|
|
11
11
|
};
|
|
12
12
|
state: {
|
|
13
|
-
selection:
|
|
13
|
+
selection: TableSelection<T>;
|
|
14
14
|
};
|
|
15
15
|
UNSAFE_componentWillReceiveProps(nextProps: SmartTableProps<T>): void;
|
|
16
|
-
onSelect: (selection:
|
|
16
|
+
onSelect: (selection: TableSelection<T>) => void;
|
|
17
17
|
render(): import("react").JSX.Element;
|
|
18
18
|
}
|
|
19
19
|
export default SmartTable;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
2
|
import TableContainer from './table.js';
|
|
3
|
-
import
|
|
3
|
+
import TableSelection from '../global/table-selection.js';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
import 'classnames';
|
|
6
6
|
import 'react-movable';
|
|
7
7
|
import '../global/focus-sensor-hoc.js';
|
|
8
8
|
import '../global/compose-refs.js';
|
|
9
|
+
import 'react/compiler-runtime';
|
|
9
10
|
import 'memoize-one';
|
|
10
11
|
import '../global/get-uid.js';
|
|
11
12
|
import '../shortcuts/shortcuts.js';
|
|
@@ -25,15 +26,13 @@ import '../icon/icon.js';
|
|
|
25
26
|
import 'util-deprecate';
|
|
26
27
|
import '../icon/icon.constants.js';
|
|
27
28
|
import '../_helpers/icon-svg.js';
|
|
28
|
-
import 'react-compiler-runtime';
|
|
29
|
-
import '../global/configuration.js';
|
|
30
29
|
import '../global/memoize.js';
|
|
31
30
|
import '../control-help/control-help.js';
|
|
32
31
|
import '../global/data-tests.js';
|
|
33
32
|
import './header-cell.js';
|
|
34
33
|
import '@jetbrains/icons/unsorted-12px';
|
|
35
34
|
import '@jetbrains/icons/chevron-12px-down';
|
|
36
|
-
import '../_helpers/table.js';
|
|
35
|
+
import '../_helpers/legacy-table.js';
|
|
37
36
|
import './selection-shortcuts-hoc.js';
|
|
38
37
|
import './disable-hover-hoc.js';
|
|
39
38
|
import './row-with-focus-sensor.js';
|
|
@@ -44,6 +43,7 @@ import '@jetbrains/icons/drag';
|
|
|
44
43
|
import '../button/button.js';
|
|
45
44
|
import '../link/clickable-link.js';
|
|
46
45
|
import '../global/controls-height.js';
|
|
46
|
+
import '../global/configuration.js';
|
|
47
47
|
import '../_helpers/button.classes.js';
|
|
48
48
|
import '../tooltip/tooltip.js';
|
|
49
49
|
import '../popup/popup.js';
|
|
@@ -62,7 +62,7 @@ class SmartTable extends PureComponent {
|
|
|
62
62
|
onSelectionChange: () => {}
|
|
63
63
|
};
|
|
64
64
|
state = {
|
|
65
|
-
selection: new
|
|
65
|
+
selection: new TableSelection({
|
|
66
66
|
data: this.props.data,
|
|
67
67
|
isItemSelectable: this.props.isItemSelectable
|
|
68
68
|
})
|
|
@@ -79,7 +79,7 @@ class SmartTable extends PureComponent {
|
|
|
79
79
|
});
|
|
80
80
|
} else if (this.props.data !== data || this.props.isItemSelectable !== isItemSelectable) {
|
|
81
81
|
this.setState({
|
|
82
|
-
selection: new
|
|
82
|
+
selection: new TableSelection({
|
|
83
83
|
data,
|
|
84
84
|
isItemSelectable
|
|
85
85
|
})
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name Table
|
|
3
|
+
*/
|
|
4
|
+
import { Component, PureComponent, type ReactNode, type SyntheticEvent } from 'react';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { type OnChangeMeta } from 'react-movable/lib/types';
|
|
7
|
+
import { type FocusSensorAddProps, type FocusSensorProps } from '../global/focus-sensor-hoc';
|
|
8
|
+
import { type SelectionShortcutsAddProps, type SelectionShortcutsProps } from './selection-shortcuts-hoc';
|
|
9
|
+
import { type DisableHoverAddProps, type DisableHoverProps } from './disable-hover-hoc';
|
|
10
|
+
import Row from './row-with-focus-sensor';
|
|
11
|
+
import { type Column, type SortParams } from './header-cell';
|
|
12
|
+
export interface ReorderParams<T> {
|
|
13
|
+
data: T[];
|
|
14
|
+
oldIndex: number;
|
|
15
|
+
newIndex: number;
|
|
16
|
+
}
|
|
17
|
+
export interface TableProps<T extends object> extends FocusSensorAddProps<HTMLTableRowElement>, SelectionShortcutsAddProps<T>, DisableHoverAddProps {
|
|
18
|
+
data: readonly T[];
|
|
19
|
+
columns: readonly Column<T>[] | ((item: T | null) => readonly Column<T>[]);
|
|
20
|
+
isItemSelectable: (item: T) => boolean;
|
|
21
|
+
loading: boolean;
|
|
22
|
+
onSort: (params: SortParams) => void;
|
|
23
|
+
onReorder: (params: ReorderParams<T>) => void;
|
|
24
|
+
getItemKey: (item: T) => string | number;
|
|
25
|
+
sortKey: string;
|
|
26
|
+
sortOrder: boolean;
|
|
27
|
+
draggable: boolean;
|
|
28
|
+
alwaysShowDragHandle: boolean;
|
|
29
|
+
dragHandleTitle?: string;
|
|
30
|
+
stickyHeader: boolean;
|
|
31
|
+
wideFirstColumn: boolean;
|
|
32
|
+
getItemLevel: (item: T) => number;
|
|
33
|
+
getItemClassName: (item: T) => string | null | undefined;
|
|
34
|
+
getMetaColumnClassName: (item: T) => string | null | undefined;
|
|
35
|
+
getItemDataTest: (item: T) => string | null | undefined;
|
|
36
|
+
isItemCollapsible: (item: T) => boolean;
|
|
37
|
+
isParentCollapsible: (item: T) => boolean;
|
|
38
|
+
isItemCollapsed: (item: T) => boolean;
|
|
39
|
+
onItemCollapse: (item: T) => void;
|
|
40
|
+
onItemExpand: (item: T) => void;
|
|
41
|
+
onItemDoubleClick: (item: T) => void;
|
|
42
|
+
onItemClick: (item: T, e: React.MouseEvent<HTMLTableRowElement>) => void;
|
|
43
|
+
remoteSelection: boolean;
|
|
44
|
+
isDisabledSelectionVisible: (item: T) => boolean;
|
|
45
|
+
getCheckboxTooltip: (item: T) => string | undefined;
|
|
46
|
+
className?: string | null | undefined;
|
|
47
|
+
wrapperClassName?: string | null | undefined;
|
|
48
|
+
headerClassName?: string | null | undefined;
|
|
49
|
+
cellClassName?: string | null | undefined;
|
|
50
|
+
loaderClassName?: string | undefined;
|
|
51
|
+
caption?: string | null | undefined;
|
|
52
|
+
stickyHeaderOffset?: string | undefined;
|
|
53
|
+
renderEmpty?: (() => ReactNode) | null | undefined;
|
|
54
|
+
RowComponent: typeof Row;
|
|
55
|
+
renderLoader?: ((loaderClassName?: string) => ReactNode) | null | undefined;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Interactive table with selection and keyboard navigation support.
|
|
59
|
+
*/
|
|
60
|
+
export declare class Table<T extends object> extends PureComponent<TableProps<T>> {
|
|
61
|
+
static defaultProps: {
|
|
62
|
+
isItemSelectable: () => boolean;
|
|
63
|
+
loading: boolean;
|
|
64
|
+
onSort: () => void;
|
|
65
|
+
onReorder: () => void;
|
|
66
|
+
getItemKey: (item: object) => string | number;
|
|
67
|
+
sortKey: string;
|
|
68
|
+
sortOrder: boolean;
|
|
69
|
+
draggable: boolean;
|
|
70
|
+
alwaysShowDragHandle: boolean;
|
|
71
|
+
stickyHeader: boolean;
|
|
72
|
+
getItemLevel: () => number;
|
|
73
|
+
getItemClassName: () => null;
|
|
74
|
+
getMetaColumnClassName: () => null;
|
|
75
|
+
getItemDataTest: () => null;
|
|
76
|
+
isItemCollapsible: () => boolean;
|
|
77
|
+
isParentCollapsible: () => boolean;
|
|
78
|
+
isItemCollapsed: () => boolean;
|
|
79
|
+
onItemCollapse: () => void;
|
|
80
|
+
onItemExpand: () => void;
|
|
81
|
+
onItemDoubleClick: () => void;
|
|
82
|
+
onItemClick: () => void;
|
|
83
|
+
remoteSelection: boolean;
|
|
84
|
+
isDisabledSelectionVisible: () => boolean;
|
|
85
|
+
getCheckboxTooltip: () => undefined;
|
|
86
|
+
RowComponent: typeof Row;
|
|
87
|
+
wideFirstColumn: boolean;
|
|
88
|
+
};
|
|
89
|
+
state: {
|
|
90
|
+
shortcutsScope: string;
|
|
91
|
+
userSelectNone: boolean;
|
|
92
|
+
};
|
|
93
|
+
componentDidMount(): void;
|
|
94
|
+
componentDidUpdate({ data, selection, onSelect, selectable, remoteSelection }: TableProps<T>): void;
|
|
95
|
+
componentWillUnmount(): void;
|
|
96
|
+
onMouseDown: (e: React.MouseEvent) => void;
|
|
97
|
+
onMouseUp: () => void;
|
|
98
|
+
onRowFocus: (row: T) => void;
|
|
99
|
+
onRowSelect: (row: T, selected: boolean) => void;
|
|
100
|
+
onSortEnd: ({ oldIndex, newIndex }: OnChangeMeta) => void;
|
|
101
|
+
onCheckboxChange: (e: SyntheticEvent<HTMLInputElement>) => void;
|
|
102
|
+
restoreFocusWithoutScroll: () => void;
|
|
103
|
+
render(): React.JSX.Element;
|
|
104
|
+
}
|
|
105
|
+
export type TableAttrs<T extends object> = DisableHoverProps<SelectionShortcutsProps<T, FocusSensorProps<TableProps<T>, HTMLTableRowElement, typeof Table>>>;
|
|
106
|
+
export default class TableContainer<T extends object> extends Component<TableAttrs<T>> {
|
|
107
|
+
Table: React.ComponentClass<DisableHoverProps<SelectionShortcutsProps<T, FocusSensorProps<TableProps<T>, HTMLTableRowElement, typeof Table>>>, any>;
|
|
108
|
+
render(): React.JSX.Element;
|
|
109
|
+
}
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
import { Component, PureComponent, createElement } from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { arrayMove, List } from 'react-movable';
|
|
4
|
+
import focusSensorHOC from '../global/focus-sensor-hoc.js';
|
|
5
|
+
import getUID from '../global/get-uid.js';
|
|
6
|
+
import Shortcuts from '../shortcuts/shortcuts.js';
|
|
7
|
+
import Loader from '../loader/loader.js';
|
|
8
|
+
import Header from './header.js';
|
|
9
|
+
import selectionShortcutsHOC from './selection-shortcuts-hoc.js';
|
|
10
|
+
import disableHoverHOC from './disable-hover-hoc.js';
|
|
11
|
+
import RowWithFocusSensorCallbacks from './row-with-focus-sensor.js';
|
|
12
|
+
import { s as style } from '../_helpers/legacy-table.js';
|
|
13
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
14
|
+
import '../global/compose-refs.js';
|
|
15
|
+
import 'react/compiler-runtime';
|
|
16
|
+
import 'memoize-one';
|
|
17
|
+
import '../shortcuts/core.js';
|
|
18
|
+
import 'core-js/modules/es.array.includes.js';
|
|
19
|
+
import 'combokeys';
|
|
20
|
+
import '../global/sniffer.js';
|
|
21
|
+
import 'sniffr';
|
|
22
|
+
import '../_helpers/loader-core.js';
|
|
23
|
+
import '../global/dom.js';
|
|
24
|
+
import '../checkbox/checkbox.js';
|
|
25
|
+
import '@jetbrains/icons/checkmark-12px';
|
|
26
|
+
import '@jetbrains/icons/remove-12px';
|
|
27
|
+
import '../icon/icon.js';
|
|
28
|
+
import 'util-deprecate';
|
|
29
|
+
import '../icon/icon.constants.js';
|
|
30
|
+
import '../_helpers/icon-svg.js';
|
|
31
|
+
import '../global/memoize.js';
|
|
32
|
+
import '../control-help/control-help.js';
|
|
33
|
+
import '../global/data-tests.js';
|
|
34
|
+
import './header-cell.js';
|
|
35
|
+
import '@jetbrains/icons/unsorted-12px';
|
|
36
|
+
import '@jetbrains/icons/chevron-12px-down';
|
|
37
|
+
import './row.js';
|
|
38
|
+
import '@jetbrains/icons/chevron-right';
|
|
39
|
+
import '@jetbrains/icons/chevron-down';
|
|
40
|
+
import '@jetbrains/icons/drag';
|
|
41
|
+
import '../button/button.js';
|
|
42
|
+
import '../link/clickable-link.js';
|
|
43
|
+
import '../global/controls-height.js';
|
|
44
|
+
import '../global/configuration.js';
|
|
45
|
+
import '../_helpers/button.classes.js';
|
|
46
|
+
import '../tooltip/tooltip.js';
|
|
47
|
+
import '../popup/popup.js';
|
|
48
|
+
import 'react-dom';
|
|
49
|
+
import '../global/schedule-raf.js';
|
|
50
|
+
import '../tab-trap/tab-trap.js';
|
|
51
|
+
import '../popup/position.js';
|
|
52
|
+
import '../popup/popup.consts.js';
|
|
53
|
+
import '../popup/popup.target.js';
|
|
54
|
+
import '../popup/position-css.js';
|
|
55
|
+
import '../_helpers/theme.js';
|
|
56
|
+
import './cell.js';
|
|
57
|
+
|
|
58
|
+
class Table extends PureComponent {
|
|
59
|
+
static defaultProps = {
|
|
60
|
+
isItemSelectable: () => true,
|
|
61
|
+
loading: false,
|
|
62
|
+
onSort: () => {},
|
|
63
|
+
onReorder: () => {},
|
|
64
|
+
getItemKey: item => {
|
|
65
|
+
// Default behavior stays backward compatible: use item's "id" if present
|
|
66
|
+
if ('id' in item) {
|
|
67
|
+
return item.id;
|
|
68
|
+
}
|
|
69
|
+
// If there's no id provided on item and no getKey supplied, fail fast with a clear message
|
|
70
|
+
throw new Error('Table: getItemKey is required when items have no "id" property');
|
|
71
|
+
},
|
|
72
|
+
sortKey: 'id',
|
|
73
|
+
sortOrder: true,
|
|
74
|
+
draggable: false,
|
|
75
|
+
alwaysShowDragHandle: false,
|
|
76
|
+
stickyHeader: true,
|
|
77
|
+
getItemLevel: () => 0,
|
|
78
|
+
getItemClassName: () => null,
|
|
79
|
+
getMetaColumnClassName: () => null,
|
|
80
|
+
getItemDataTest: () => null,
|
|
81
|
+
isItemCollapsible: () => false,
|
|
82
|
+
isParentCollapsible: () => false,
|
|
83
|
+
isItemCollapsed: () => false,
|
|
84
|
+
onItemCollapse: () => {},
|
|
85
|
+
onItemExpand: () => {},
|
|
86
|
+
onItemDoubleClick: () => {},
|
|
87
|
+
onItemClick: () => {},
|
|
88
|
+
remoteSelection: false,
|
|
89
|
+
isDisabledSelectionVisible: () => false,
|
|
90
|
+
getCheckboxTooltip: () => undefined,
|
|
91
|
+
RowComponent: RowWithFocusSensorCallbacks,
|
|
92
|
+
wideFirstColumn: false
|
|
93
|
+
};
|
|
94
|
+
state = {
|
|
95
|
+
shortcutsScope: getUID('ring-table-'),
|
|
96
|
+
userSelectNone: false
|
|
97
|
+
};
|
|
98
|
+
componentDidMount() {
|
|
99
|
+
document.addEventListener('mouseup', this.onMouseUp);
|
|
100
|
+
}
|
|
101
|
+
componentDidUpdate({
|
|
102
|
+
data,
|
|
103
|
+
selection,
|
|
104
|
+
onSelect,
|
|
105
|
+
selectable,
|
|
106
|
+
remoteSelection
|
|
107
|
+
}) {
|
|
108
|
+
if (data !== this.props.data && remoteSelection) {
|
|
109
|
+
onSelect(selection.cloneWith({
|
|
110
|
+
data: this.props.data
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
if (!this.props.selectable && this.props.selectable !== selectable) {
|
|
114
|
+
onSelect(selection.resetSelection());
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
componentWillUnmount() {
|
|
118
|
+
document.removeEventListener('mouseup', this.onMouseUp);
|
|
119
|
+
}
|
|
120
|
+
onMouseDown = e => {
|
|
121
|
+
if (e.shiftKey) {
|
|
122
|
+
this.setState({
|
|
123
|
+
userSelectNone: true
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
onMouseUp = () => {
|
|
128
|
+
if (this.state.userSelectNone) {
|
|
129
|
+
this.setState({
|
|
130
|
+
userSelectNone: false
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
onRowFocus = row => {
|
|
135
|
+
const {
|
|
136
|
+
selection,
|
|
137
|
+
onSelect
|
|
138
|
+
} = this.props;
|
|
139
|
+
onSelect(selection.focus(row));
|
|
140
|
+
};
|
|
141
|
+
onRowSelect = (row, selected) => {
|
|
142
|
+
const {
|
|
143
|
+
selection,
|
|
144
|
+
onSelect
|
|
145
|
+
} = this.props;
|
|
146
|
+
if (selected) {
|
|
147
|
+
onSelect(selection.select(row));
|
|
148
|
+
} else {
|
|
149
|
+
onSelect(selection.deselect(row));
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
onSortEnd = ({
|
|
153
|
+
oldIndex,
|
|
154
|
+
newIndex
|
|
155
|
+
}) => {
|
|
156
|
+
const data = arrayMove(this.props.data, oldIndex, newIndex);
|
|
157
|
+
this.props.onReorder({
|
|
158
|
+
data,
|
|
159
|
+
oldIndex,
|
|
160
|
+
newIndex
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
onCheckboxChange = e => {
|
|
164
|
+
const {
|
|
165
|
+
checked
|
|
166
|
+
} = e.currentTarget;
|
|
167
|
+
const {
|
|
168
|
+
selection,
|
|
169
|
+
onSelect
|
|
170
|
+
} = this.props;
|
|
171
|
+
if (checked) {
|
|
172
|
+
onSelect(selection.selectAll());
|
|
173
|
+
} else {
|
|
174
|
+
onSelect(selection.reset());
|
|
175
|
+
}
|
|
176
|
+
this.restoreFocusWithoutScroll();
|
|
177
|
+
};
|
|
178
|
+
restoreFocusWithoutScroll = () => {
|
|
179
|
+
const {
|
|
180
|
+
scrollX,
|
|
181
|
+
scrollY
|
|
182
|
+
} = window;
|
|
183
|
+
this.props.onFocusRestore();
|
|
184
|
+
window.scrollTo(scrollX, scrollY);
|
|
185
|
+
};
|
|
186
|
+
render() {
|
|
187
|
+
const {
|
|
188
|
+
data,
|
|
189
|
+
selection,
|
|
190
|
+
columns,
|
|
191
|
+
caption,
|
|
192
|
+
getItemKey,
|
|
193
|
+
selectable,
|
|
194
|
+
focused,
|
|
195
|
+
isItemSelectable,
|
|
196
|
+
getItemLevel,
|
|
197
|
+
getItemClassName,
|
|
198
|
+
getMetaColumnClassName,
|
|
199
|
+
getItemDataTest,
|
|
200
|
+
draggable,
|
|
201
|
+
alwaysShowDragHandle,
|
|
202
|
+
dragHandleTitle,
|
|
203
|
+
loading,
|
|
204
|
+
onSort,
|
|
205
|
+
sortKey,
|
|
206
|
+
sortOrder,
|
|
207
|
+
loaderClassName,
|
|
208
|
+
stickyHeader,
|
|
209
|
+
stickyHeaderOffset,
|
|
210
|
+
isItemCollapsible,
|
|
211
|
+
isParentCollapsible,
|
|
212
|
+
isItemCollapsed,
|
|
213
|
+
onItemCollapse,
|
|
214
|
+
onItemExpand,
|
|
215
|
+
isDisabledSelectionVisible,
|
|
216
|
+
getCheckboxTooltip,
|
|
217
|
+
onItemDoubleClick,
|
|
218
|
+
onItemClick,
|
|
219
|
+
renderEmpty,
|
|
220
|
+
RowComponent,
|
|
221
|
+
renderLoader
|
|
222
|
+
} = this.props;
|
|
223
|
+
// NOTE: Do not construct new object per render because it causes all rows rerendering
|
|
224
|
+
const columnsArray = typeof columns === 'function' ? columns(null) : columns;
|
|
225
|
+
const headerProps = {
|
|
226
|
+
caption,
|
|
227
|
+
selectable,
|
|
228
|
+
draggable,
|
|
229
|
+
columns: columnsArray,
|
|
230
|
+
onSort,
|
|
231
|
+
sortKey,
|
|
232
|
+
sortOrder,
|
|
233
|
+
sticky: stickyHeader,
|
|
234
|
+
topStickOffset: stickyHeaderOffset,
|
|
235
|
+
className: this.props.headerClassName
|
|
236
|
+
};
|
|
237
|
+
const selectedSize = selection.getSelected().size;
|
|
238
|
+
const allSelectedSize = selection.selectAll().getSelected().size;
|
|
239
|
+
headerProps.checked = selectedSize > 0 && selectedSize === allSelectedSize;
|
|
240
|
+
headerProps.onCheckboxChange = this.onCheckboxChange;
|
|
241
|
+
headerProps.checkboxDisabled = this.props.data.length === 0;
|
|
242
|
+
const wrapperClasses = classNames(style.tableWrapper, this.props.wrapperClassName);
|
|
243
|
+
const classes = classNames(this.props.className, {
|
|
244
|
+
[style.table]: true,
|
|
245
|
+
[style.wideFirstColumn]: this.props.wideFirstColumn,
|
|
246
|
+
[style.userSelectNone]: this.state.userSelectNone,
|
|
247
|
+
[style.disabledHover]: this.props.disabledHover
|
|
248
|
+
});
|
|
249
|
+
const renderList = ({
|
|
250
|
+
children,
|
|
251
|
+
props
|
|
252
|
+
}) => {
|
|
253
|
+
const empty = /*#__PURE__*/jsx("tr", {
|
|
254
|
+
children: /*#__PURE__*/jsx("td", {
|
|
255
|
+
colSpan: columnsArray.length || 1,
|
|
256
|
+
className: style.tableMessage,
|
|
257
|
+
children: renderEmpty ? renderEmpty() : null
|
|
258
|
+
})
|
|
259
|
+
});
|
|
260
|
+
const tbody = Array.isArray(children) && children.length > 0 ? children : empty;
|
|
261
|
+
return /*#__PURE__*/jsxs("table", {
|
|
262
|
+
className: classes,
|
|
263
|
+
"data-test": "ring-table",
|
|
264
|
+
children: [/*#__PURE__*/jsx(Header, {
|
|
265
|
+
...headerProps
|
|
266
|
+
}), /*#__PURE__*/jsx("tbody", {
|
|
267
|
+
...props,
|
|
268
|
+
"data-test": "ring-table-body",
|
|
269
|
+
children: tbody
|
|
270
|
+
})]
|
|
271
|
+
});
|
|
272
|
+
};
|
|
273
|
+
const renderItem = ({
|
|
274
|
+
value,
|
|
275
|
+
props = {},
|
|
276
|
+
isDragged
|
|
277
|
+
}) => {
|
|
278
|
+
var _restProps$key;
|
|
279
|
+
if (value === null || value === undefined) {
|
|
280
|
+
return null;
|
|
281
|
+
}
|
|
282
|
+
const {
|
|
283
|
+
ref,
|
|
284
|
+
...restProps
|
|
285
|
+
} = props;
|
|
286
|
+
const row = /*#__PURE__*/createElement(RowComponent, {
|
|
287
|
+
innerRef: ref,
|
|
288
|
+
level: getItemLevel(value),
|
|
289
|
+
item: value,
|
|
290
|
+
showFocus: selection.isFocused(value),
|
|
291
|
+
autofocus: selection.isFocused(value),
|
|
292
|
+
focused: focused && selection.isFocused(value),
|
|
293
|
+
selectable: selectable && isItemSelectable(value),
|
|
294
|
+
selected: selectable && selection.isSelected(value),
|
|
295
|
+
onFocus: this.onRowFocus,
|
|
296
|
+
onSelect: this.onRowSelect,
|
|
297
|
+
onDoubleClick: onItemDoubleClick,
|
|
298
|
+
onClick: onItemClick,
|
|
299
|
+
collapsible: isItemCollapsible(value),
|
|
300
|
+
parentCollapsible: isParentCollapsible(value),
|
|
301
|
+
collapsed: isItemCollapsed(value),
|
|
302
|
+
onCollapse: onItemCollapse,
|
|
303
|
+
onExpand: onItemExpand,
|
|
304
|
+
showDisabledSelection: isDisabledSelectionVisible(value),
|
|
305
|
+
checkboxTooltip: getCheckboxTooltip(value),
|
|
306
|
+
className: classNames(getItemClassName(value), {
|
|
307
|
+
[style.draggingRow]: isDragged
|
|
308
|
+
}),
|
|
309
|
+
metaColumnClassName: getMetaColumnClassName(value),
|
|
310
|
+
draggable: draggable,
|
|
311
|
+
alwaysShowDragHandle: alwaysShowDragHandle,
|
|
312
|
+
dragHandleTitle: dragHandleTitle,
|
|
313
|
+
columns: columns,
|
|
314
|
+
"data-test": getItemDataTest(value),
|
|
315
|
+
cellClassName: this.props.cellClassName,
|
|
316
|
+
...restProps,
|
|
317
|
+
key: (_restProps$key = restProps.key) !== null && _restProps$key !== void 0 ? _restProps$key : getItemKey(value)
|
|
318
|
+
});
|
|
319
|
+
return isDragged ? /*#__PURE__*/jsx("table", {
|
|
320
|
+
style: {
|
|
321
|
+
...props.style
|
|
322
|
+
},
|
|
323
|
+
className: style.draggingTable,
|
|
324
|
+
children: /*#__PURE__*/jsx("tbody", {
|
|
325
|
+
children: row
|
|
326
|
+
})
|
|
327
|
+
}) : row;
|
|
328
|
+
};
|
|
329
|
+
return /*#__PURE__*/jsxs("div", {
|
|
330
|
+
className: wrapperClasses,
|
|
331
|
+
"data-test": "ring-table-wrapper",
|
|
332
|
+
ref: this.props.innerRef,
|
|
333
|
+
children: [focused && /*#__PURE__*/jsx(Shortcuts, {
|
|
334
|
+
map: this.props.shortcutsMap,
|
|
335
|
+
scope: this.state.shortcutsScope
|
|
336
|
+
}), /*#__PURE__*/jsx("div", {
|
|
337
|
+
role: "presentation",
|
|
338
|
+
onMouseDown: this.onMouseDown,
|
|
339
|
+
children: draggable ? /*#__PURE__*/jsx(List, {
|
|
340
|
+
values: data,
|
|
341
|
+
renderList: renderList,
|
|
342
|
+
renderItem: renderItem,
|
|
343
|
+
onChange: this.onSortEnd
|
|
344
|
+
}) : renderList({
|
|
345
|
+
children: data.map((value, index) => renderItem({
|
|
346
|
+
value}))
|
|
347
|
+
})
|
|
348
|
+
}), loading && /*#__PURE__*/jsx("div", {
|
|
349
|
+
className: style.loadingOverlay,
|
|
350
|
+
children: renderLoader ? renderLoader(loaderClassName) : /*#__PURE__*/jsx(Loader, {
|
|
351
|
+
className: loaderClassName
|
|
352
|
+
})
|
|
353
|
+
})]
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
const getContainer = () => disableHoverHOC(selectionShortcutsHOC(focusSensorHOC(Table)));
|
|
358
|
+
// eslint-disable-next-line react/no-multi-comp
|
|
359
|
+
class TableContainer extends Component {
|
|
360
|
+
// https://stackoverflow.com/a/53882322/6304152
|
|
361
|
+
Table = getContainer();
|
|
362
|
+
render() {
|
|
363
|
+
return /*#__PURE__*/jsx(this.Table, {
|
|
364
|
+
...this.props
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export { Table, TableContainer as default };
|
|
@@ -6,7 +6,6 @@ var Type;
|
|
|
6
6
|
Type[Type["SEPARATOR"] = 0] = "SEPARATOR";
|
|
7
7
|
Type[Type["LINK"] = 1] = "LINK";
|
|
8
8
|
Type[Type["ITEM"] = 2] = "ITEM";
|
|
9
|
-
Type[Type["HINT"] = 3] = "HINT";
|
|
10
9
|
Type[Type["CUSTOM"] = 4] = "CUSTOM";
|
|
11
10
|
Type[Type["TITLE"] = 5] = "TITLE";
|
|
12
11
|
Type[Type["MARGIN"] = 6] = "MARGIN";
|
|
@@ -11,22 +11,20 @@ import { getListClasses } from './list.classes.js';
|
|
|
11
11
|
import { s as styles } from '../_helpers/list.js';
|
|
12
12
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
13
|
import { Size } from '../avatar/avatar-size.js';
|
|
14
|
-
import 'core-js/modules/es.array.includes.js';
|
|
15
|
-
import 'util-deprecate';
|
|
16
14
|
import '../global/url.js';
|
|
17
15
|
import '../global/dom.js';
|
|
18
|
-
import '../global/memoize.js';
|
|
19
16
|
import '../avatar/fallback-avatar.js';
|
|
20
|
-
import 'react
|
|
17
|
+
import 'react/compiler-runtime';
|
|
21
18
|
import '../_helpers/avatar-info.js';
|
|
22
19
|
import '@jetbrains/icons/checkmark-12px';
|
|
23
20
|
import '@jetbrains/icons/remove-12px';
|
|
24
21
|
import '../global/compose-refs.js';
|
|
25
22
|
import 'memoize-one';
|
|
26
23
|
import '../control-help/control-help.js';
|
|
24
|
+
import 'util-deprecate';
|
|
27
25
|
import '../icon/icon.constants.js';
|
|
28
26
|
import '../_helpers/icon-svg.js';
|
|
29
|
-
import '../global/
|
|
27
|
+
import '../global/memoize.js';
|
|
30
28
|
import '../link/clickable-link.js';
|
|
31
29
|
import '../_helpers/link.js';
|
|
32
30
|
|
|
@@ -22,7 +22,7 @@ import 'combokeys';
|
|
|
22
22
|
import '../global/sniffer.js';
|
|
23
23
|
import 'sniffr';
|
|
24
24
|
import '../global/create-stateful-context.js';
|
|
25
|
-
import 'react
|
|
25
|
+
import 'react/compiler-runtime';
|
|
26
26
|
import 'react/jsx-runtime';
|
|
27
27
|
import './list-item.js';
|
|
28
28
|
import '../avatar/avatar.js';
|
|
@@ -36,7 +36,6 @@ import '@jetbrains/icons/remove-12px';
|
|
|
36
36
|
import '../icon/icon.js';
|
|
37
37
|
import '../icon/icon.constants.js';
|
|
38
38
|
import '../_helpers/icon-svg.js';
|
|
39
|
-
import '../global/configuration.js';
|
|
40
39
|
import '../global/compose-refs.js';
|
|
41
40
|
import '../control-help/control-help.js';
|
|
42
41
|
import '../link/link.js';
|