@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
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import { createContext, useRef, useState, useEffect } from 'react';
|
|
3
|
+
import { useIntersectionObserverHandle } from '../global/intersection-observer-context.js';
|
|
4
|
+
import { setTimeoutWithCleanup } from '../global/schedule-with-cleanup.js';
|
|
5
|
+
import { s as styles } from '../_helpers/table.js';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
const VirtualizationContext = /*#__PURE__*/createContext({
|
|
9
|
+
intersectionObserverHandle: {
|
|
10
|
+
observe: () => () => {}
|
|
11
|
+
},
|
|
12
|
+
collapseItemIntoSpacer: () => {}
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* RAF is somewhat too frequent. Most updates happen on virtualization boundaries
|
|
16
|
+
* within the invisible overscroll area, so they don't require such a high update rate.
|
|
17
|
+
* Therefore, we throttle with a custom delay.
|
|
18
|
+
*/
|
|
19
|
+
const virtualizationThrottleDelay = 50;
|
|
20
|
+
function useVirtualItems(t0) {
|
|
21
|
+
const $ = c(43);
|
|
22
|
+
if ($[0] !== "22c57a068d0e63509a04fa6cf4f7cf2a8bbbdc9b615fb1a7fae4fb9998ef4721") {
|
|
23
|
+
for (let $i = 0; $i < 43; $i += 1) {
|
|
24
|
+
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
25
|
+
}
|
|
26
|
+
$[0] = "22c57a068d0e63509a04fa6cf4f7cf2a8bbbdc9b615fb1a7fae4fb9998ef4721";
|
|
27
|
+
}
|
|
28
|
+
const {
|
|
29
|
+
enabled,
|
|
30
|
+
data,
|
|
31
|
+
data: t1,
|
|
32
|
+
scrollerRef,
|
|
33
|
+
tableRef,
|
|
34
|
+
estimateHeight,
|
|
35
|
+
lookaheadPx,
|
|
36
|
+
retentionMarginPx,
|
|
37
|
+
minScrollAndResizeDeltaPx
|
|
38
|
+
} = t0;
|
|
39
|
+
const {
|
|
40
|
+
length
|
|
41
|
+
} = t1;
|
|
42
|
+
let t2;
|
|
43
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
44
|
+
t2 = [];
|
|
45
|
+
$[1] = t2;
|
|
46
|
+
} else {
|
|
47
|
+
t2 = $[1];
|
|
48
|
+
}
|
|
49
|
+
const itemsMaterialization = useRef(t2);
|
|
50
|
+
let t3;
|
|
51
|
+
if ($[2] !== data || $[3] !== enabled || $[4] !== estimateHeight) {
|
|
52
|
+
t3 = () => enabled ? getAllVirtualizedItems(data, estimateHeight) : [];
|
|
53
|
+
$[2] = data;
|
|
54
|
+
$[3] = enabled;
|
|
55
|
+
$[4] = estimateHeight;
|
|
56
|
+
$[5] = t3;
|
|
57
|
+
} else {
|
|
58
|
+
t3 = $[5];
|
|
59
|
+
}
|
|
60
|
+
const [virtualItems, setVirtualItems] = useState(t3);
|
|
61
|
+
let t4;
|
|
62
|
+
if ($[6] !== data || $[7] !== estimateHeight || $[8] !== lookaheadPx || $[9] !== scrollerRef || $[10] !== tableRef) {
|
|
63
|
+
t4 = () => {
|
|
64
|
+
var _scrollerRect$top;
|
|
65
|
+
if (!tableRef.current) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const scrollerRect = scrollerRef?.current?.getBoundingClientRect();
|
|
69
|
+
const visibleStart = (_scrollerRect$top = scrollerRect?.top) !== null && _scrollerRect$top !== void 0 ? _scrollerRect$top : 0;
|
|
70
|
+
const visibleEnd = scrollerRect ? Math.min(scrollerRect.bottom, window.innerHeight) : window.innerHeight;
|
|
71
|
+
const materializeStart = visibleStart - lookaheadPx;
|
|
72
|
+
const materializeEnd = visibleEnd + lookaheadPx;
|
|
73
|
+
for (const spacerRow of tableRef.current.querySelectorAll(`.${styles.spacerRow}`)) {
|
|
74
|
+
const spacerRect = spacerRow.getBoundingClientRect();
|
|
75
|
+
if (spacerRect.bottom < materializeStart || spacerRect.top > materializeEnd) {
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
const from = Number(spacerRow.dataset.from);
|
|
79
|
+
const to = Number(spacerRow.dataset.to);
|
|
80
|
+
let currentTop = spacerRect.top;
|
|
81
|
+
for (let i = from; i < to; i++) {
|
|
82
|
+
const itemMaterialization = itemsMaterialization.current[i];
|
|
83
|
+
const itemHeight = typeof itemMaterialization === "number" ? itemMaterialization : estimateHeight(data[i], i, data);
|
|
84
|
+
const itemTop = currentTop;
|
|
85
|
+
const itemBottom = currentTop + itemHeight;
|
|
86
|
+
if (itemBottom >= materializeStart && itemTop <= materializeEnd) {
|
|
87
|
+
itemsMaterialization.current[i] = true;
|
|
88
|
+
} else {
|
|
89
|
+
if (itemTop > materializeEnd) {
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
currentTop = currentTop + itemHeight;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
$[6] = data;
|
|
98
|
+
$[7] = estimateHeight;
|
|
99
|
+
$[8] = lookaheadPx;
|
|
100
|
+
$[9] = scrollerRef;
|
|
101
|
+
$[10] = tableRef;
|
|
102
|
+
$[11] = t4;
|
|
103
|
+
} else {
|
|
104
|
+
t4 = $[11];
|
|
105
|
+
}
|
|
106
|
+
const materializeVisibleSpacerItems = t4;
|
|
107
|
+
let t5;
|
|
108
|
+
if ($[12] !== data || $[13] !== estimateHeight || $[14] !== length) {
|
|
109
|
+
t5 = () => {
|
|
110
|
+
const newVirtualItems = [];
|
|
111
|
+
let spacerCounter = 0;
|
|
112
|
+
for (let i_0 = 0; i_0 < length; i_0++) {
|
|
113
|
+
const itemMaterialization_0 = itemsMaterialization.current[i_0];
|
|
114
|
+
if (itemMaterialization_0 === true) {
|
|
115
|
+
newVirtualItems.push({
|
|
116
|
+
type: "materialized",
|
|
117
|
+
index: i_0
|
|
118
|
+
});
|
|
119
|
+
} else {
|
|
120
|
+
const lastItemOrSpacer = newVirtualItems[newVirtualItems.length - 1];
|
|
121
|
+
const lastSpacer = lastItemOrSpacer?.type === "spacer" ? lastItemOrSpacer : undefined;
|
|
122
|
+
const height = typeof itemMaterialization_0 === "number" ? itemMaterialization_0 : estimateHeight(data[i_0], i_0, data);
|
|
123
|
+
if (lastSpacer) {
|
|
124
|
+
lastSpacer.to = i_0 + 1;
|
|
125
|
+
lastSpacer.height = lastSpacer.height + height;
|
|
126
|
+
} else {
|
|
127
|
+
newVirtualItems.push({
|
|
128
|
+
type: "spacer",
|
|
129
|
+
from: i_0,
|
|
130
|
+
to: i_0 + 1,
|
|
131
|
+
height,
|
|
132
|
+
key: spacerKey(spacerCounter++)
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
setVirtualItems(newVirtualItems);
|
|
138
|
+
};
|
|
139
|
+
$[12] = data;
|
|
140
|
+
$[13] = estimateHeight;
|
|
141
|
+
$[14] = length;
|
|
142
|
+
$[15] = t5;
|
|
143
|
+
} else {
|
|
144
|
+
t5 = $[15];
|
|
145
|
+
}
|
|
146
|
+
const recomputeVirtualItems = t5;
|
|
147
|
+
const timerIdRef = useRef(null);
|
|
148
|
+
const callbacksRef = useRef(null);
|
|
149
|
+
let t6;
|
|
150
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
151
|
+
t6 = (...t7) => {
|
|
152
|
+
const callbacks = t7;
|
|
153
|
+
if (timerIdRef.current != null) {
|
|
154
|
+
callbacks.forEach(cb => {
|
|
155
|
+
callbacksRef.current.delete(cb);
|
|
156
|
+
callbacksRef.current.add(cb);
|
|
157
|
+
});
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
callbacksRef.current = new Set(callbacks);
|
|
161
|
+
timerIdRef.current = window.setTimeout(() => {
|
|
162
|
+
callbacksRef.current.forEach(_temp);
|
|
163
|
+
timerIdRef.current = null;
|
|
164
|
+
callbacksRef.current = null;
|
|
165
|
+
}, virtualizationThrottleDelay);
|
|
166
|
+
};
|
|
167
|
+
$[16] = t6;
|
|
168
|
+
} else {
|
|
169
|
+
t6 = $[16];
|
|
170
|
+
}
|
|
171
|
+
const throttle = t6;
|
|
172
|
+
const prevEnabledRef = useRef(enabled);
|
|
173
|
+
let t7;
|
|
174
|
+
if ($[17] !== data || $[18] !== enabled || $[19] !== estimateHeight || $[20] !== materializeVisibleSpacerItems || $[21] !== minScrollAndResizeDeltaPx || $[22] !== recomputeVirtualItems || $[23] !== scrollerRef) {
|
|
175
|
+
t7 = () => {
|
|
176
|
+
const prevEnabled = prevEnabledRef.current;
|
|
177
|
+
prevEnabledRef.current = enabled;
|
|
178
|
+
if (!enabled) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
const scroller = scrollerRef?.current;
|
|
182
|
+
let lastHandledScrollTop = -Infinity;
|
|
183
|
+
let lastHandledHeight = -Infinity;
|
|
184
|
+
let lastHandledWidth = -Infinity;
|
|
185
|
+
const handleViewportChange = function handleViewportChange() {
|
|
186
|
+
const scrollTop = scroller ? scroller.scrollTop : window.scrollY;
|
|
187
|
+
const height_0 = scroller ? scroller.clientHeight : window.innerHeight;
|
|
188
|
+
const width = scroller ? scroller.clientWidth : window.innerWidth;
|
|
189
|
+
if (Math.abs(scrollTop - lastHandledScrollTop) >= minScrollAndResizeDeltaPx || Math.abs(height_0 - lastHandledHeight) >= minScrollAndResizeDeltaPx || Math.abs(width - lastHandledWidth) >= minScrollAndResizeDeltaPx) {
|
|
190
|
+
lastHandledScrollTop = scrollTop;
|
|
191
|
+
lastHandledHeight = height_0;
|
|
192
|
+
lastHandledWidth = width;
|
|
193
|
+
throttle(materializeVisibleSpacerItems, recomputeVirtualItems);
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
const scrollTarget = scroller !== null && scroller !== void 0 ? scroller : window;
|
|
197
|
+
scrollTarget.addEventListener("scroll", handleViewportChange, {
|
|
198
|
+
passive: true
|
|
199
|
+
});
|
|
200
|
+
const resizeObserver = new ResizeObserver(handleViewportChange);
|
|
201
|
+
const resizeTarget = scroller !== null && scroller !== void 0 ? scroller : document.documentElement;
|
|
202
|
+
resizeObserver.observe(resizeTarget);
|
|
203
|
+
let timeoutCleanup;
|
|
204
|
+
if (!prevEnabled) {
|
|
205
|
+
timeoutCleanup = setTimeoutWithCleanup(() => {
|
|
206
|
+
itemsMaterialization.current = [];
|
|
207
|
+
setVirtualItems(getAllVirtualizedItems(data, estimateHeight));
|
|
208
|
+
handleViewportChange();
|
|
209
|
+
});
|
|
210
|
+
} else {
|
|
211
|
+
handleViewportChange();
|
|
212
|
+
}
|
|
213
|
+
return () => {
|
|
214
|
+
timeoutCleanup?.();
|
|
215
|
+
scrollTarget.removeEventListener("scroll", handleViewportChange);
|
|
216
|
+
resizeObserver.unobserve(resizeTarget);
|
|
217
|
+
resizeObserver.disconnect();
|
|
218
|
+
if (timerIdRef.current != null) {
|
|
219
|
+
window.clearTimeout(timerIdRef.current);
|
|
220
|
+
timerIdRef.current = null;
|
|
221
|
+
callbacksRef.current = null;
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
$[17] = data;
|
|
226
|
+
$[18] = enabled;
|
|
227
|
+
$[19] = estimateHeight;
|
|
228
|
+
$[20] = materializeVisibleSpacerItems;
|
|
229
|
+
$[21] = minScrollAndResizeDeltaPx;
|
|
230
|
+
$[22] = recomputeVirtualItems;
|
|
231
|
+
$[23] = scrollerRef;
|
|
232
|
+
$[24] = t7;
|
|
233
|
+
} else {
|
|
234
|
+
t7 = $[24];
|
|
235
|
+
}
|
|
236
|
+
let t8;
|
|
237
|
+
if ($[25] !== data || $[26] !== enabled || $[27] !== estimateHeight || $[28] !== length || $[29] !== materializeVisibleSpacerItems || $[30] !== minScrollAndResizeDeltaPx || $[31] !== recomputeVirtualItems || $[32] !== scrollerRef) {
|
|
238
|
+
t8 = [data, enabled, estimateHeight, length, materializeVisibleSpacerItems, minScrollAndResizeDeltaPx, recomputeVirtualItems, scrollerRef, throttle];
|
|
239
|
+
$[25] = data;
|
|
240
|
+
$[26] = enabled;
|
|
241
|
+
$[27] = estimateHeight;
|
|
242
|
+
$[28] = length;
|
|
243
|
+
$[29] = materializeVisibleSpacerItems;
|
|
244
|
+
$[30] = minScrollAndResizeDeltaPx;
|
|
245
|
+
$[31] = recomputeVirtualItems;
|
|
246
|
+
$[32] = scrollerRef;
|
|
247
|
+
$[33] = t8;
|
|
248
|
+
} else {
|
|
249
|
+
t8 = $[33];
|
|
250
|
+
}
|
|
251
|
+
useEffect(t7, t8);
|
|
252
|
+
const intersectionObserverHandle = useIntersectionObserverHandle(scrollerRef, scrollerRef ? retentionMarginPx : undefined, !scrollerRef ? retentionMarginPx : undefined);
|
|
253
|
+
let t9;
|
|
254
|
+
if ($[34] !== enabled || $[35] !== recomputeVirtualItems) {
|
|
255
|
+
t9 = function collapseItemIntoSpacer(index, height_1) {
|
|
256
|
+
if (!enabled) {
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
itemsMaterialization.current[index] = height_1;
|
|
260
|
+
throttle(recomputeVirtualItems);
|
|
261
|
+
};
|
|
262
|
+
$[34] = enabled;
|
|
263
|
+
$[35] = recomputeVirtualItems;
|
|
264
|
+
$[36] = t9;
|
|
265
|
+
} else {
|
|
266
|
+
t9 = $[36];
|
|
267
|
+
}
|
|
268
|
+
const collapseItemIntoSpacer = t9;
|
|
269
|
+
let t10;
|
|
270
|
+
if ($[37] !== collapseItemIntoSpacer || $[38] !== intersectionObserverHandle) {
|
|
271
|
+
t10 = {
|
|
272
|
+
intersectionObserverHandle,
|
|
273
|
+
collapseItemIntoSpacer
|
|
274
|
+
};
|
|
275
|
+
$[37] = collapseItemIntoSpacer;
|
|
276
|
+
$[38] = intersectionObserverHandle;
|
|
277
|
+
$[39] = t10;
|
|
278
|
+
} else {
|
|
279
|
+
t10 = $[39];
|
|
280
|
+
}
|
|
281
|
+
let t11;
|
|
282
|
+
if ($[40] !== t10 || $[41] !== virtualItems) {
|
|
283
|
+
t11 = {
|
|
284
|
+
virtualItems,
|
|
285
|
+
virtualizationContextValue: t10
|
|
286
|
+
};
|
|
287
|
+
$[40] = t10;
|
|
288
|
+
$[41] = virtualItems;
|
|
289
|
+
$[42] = t11;
|
|
290
|
+
} else {
|
|
291
|
+
t11 = $[42];
|
|
292
|
+
}
|
|
293
|
+
return t11;
|
|
294
|
+
}
|
|
295
|
+
function _temp(cb_0) {
|
|
296
|
+
return cb_0();
|
|
297
|
+
}
|
|
298
|
+
function getAllVirtualizedItems(data, estimateHeight) {
|
|
299
|
+
return [{
|
|
300
|
+
type: 'spacer',
|
|
301
|
+
from: 0,
|
|
302
|
+
to: data.length,
|
|
303
|
+
height: data.reduce((acc, item, index, items) => acc + estimateHeight(item, index, items), 0),
|
|
304
|
+
key: spacerKey(0)
|
|
305
|
+
}];
|
|
306
|
+
}
|
|
307
|
+
function spacerKey(index) {
|
|
308
|
+
return `__${styles.spacerRow}-${index}`;
|
|
309
|
+
}
|
|
310
|
+
function SpacerRow(t0) {
|
|
311
|
+
const $ = c(10);
|
|
312
|
+
if ($[0] !== "22c57a068d0e63509a04fa6cf4f7cf2a8bbbdc9b615fb1a7fae4fb9998ef4721") {
|
|
313
|
+
for (let $i = 0; $i < 10; $i += 1) {
|
|
314
|
+
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
315
|
+
}
|
|
316
|
+
$[0] = "22c57a068d0e63509a04fa6cf4f7cf2a8bbbdc9b615fb1a7fae4fb9998ef4721";
|
|
317
|
+
}
|
|
318
|
+
const {
|
|
319
|
+
spacer: t1,
|
|
320
|
+
colSpan
|
|
321
|
+
} = t0;
|
|
322
|
+
const {
|
|
323
|
+
from,
|
|
324
|
+
to,
|
|
325
|
+
height
|
|
326
|
+
} = t1;
|
|
327
|
+
let t2;
|
|
328
|
+
if ($[1] !== height) {
|
|
329
|
+
t2 = {
|
|
330
|
+
height
|
|
331
|
+
};
|
|
332
|
+
$[1] = height;
|
|
333
|
+
$[2] = t2;
|
|
334
|
+
} else {
|
|
335
|
+
t2 = $[2];
|
|
336
|
+
}
|
|
337
|
+
let t3;
|
|
338
|
+
if ($[3] !== colSpan || $[4] !== t2) {
|
|
339
|
+
t3 = /*#__PURE__*/jsx("td", {
|
|
340
|
+
className: styles.spacerCell,
|
|
341
|
+
colSpan: colSpan,
|
|
342
|
+
style: t2
|
|
343
|
+
});
|
|
344
|
+
$[3] = colSpan;
|
|
345
|
+
$[4] = t2;
|
|
346
|
+
$[5] = t3;
|
|
347
|
+
} else {
|
|
348
|
+
t3 = $[5];
|
|
349
|
+
}
|
|
350
|
+
let t4;
|
|
351
|
+
if ($[6] !== from || $[7] !== t3 || $[8] !== to) {
|
|
352
|
+
t4 = /*#__PURE__*/jsx("tr", {
|
|
353
|
+
className: styles.spacerRow,
|
|
354
|
+
"data-from": from,
|
|
355
|
+
"data-to": to,
|
|
356
|
+
children: t3
|
|
357
|
+
});
|
|
358
|
+
$[6] = from;
|
|
359
|
+
$[7] = t3;
|
|
360
|
+
$[8] = to;
|
|
361
|
+
$[9] = t4;
|
|
362
|
+
} else {
|
|
363
|
+
t4 = $[9];
|
|
364
|
+
}
|
|
365
|
+
return t4;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export { SpacerRow, VirtualizationContext, useVirtualItems };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Component, createContext } from 'react';
|
|
2
2
|
import { interpolateLinear } from '../global/linear-function.js';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
@@ -25,9 +25,9 @@ function adaptiveIslandHOC(ComposedComponent) {
|
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
render() {
|
|
28
|
-
return /*#__PURE__*/jsx(PhaseContext
|
|
28
|
+
return /*#__PURE__*/jsx(PhaseContext, {
|
|
29
29
|
value: this.state.phase,
|
|
30
|
-
children: /*#__PURE__*/jsx(ScrollHandlerContext
|
|
30
|
+
children: /*#__PURE__*/jsx(ScrollHandlerContext, {
|
|
31
31
|
value: this.onContentScroll,
|
|
32
32
|
children: /*#__PURE__*/jsx(ComposedComponent, {
|
|
33
33
|
...this.props
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { Component, type HTMLAttributes } from 'react';
|
|
1
|
+
import { Component, type Ref, type HTMLAttributes } from 'react';
|
|
2
2
|
import createResizeDetector from 'element-resize-detector';
|
|
3
3
|
export interface IslandContentProps extends Omit<HTMLAttributes<HTMLElement>, 'onScroll'> {
|
|
4
|
+
ref?: Ref<Content>;
|
|
4
5
|
fade?: boolean | null | undefined;
|
|
5
6
|
onScrollToBottom?: (() => void) | null | undefined;
|
|
6
7
|
scrollableWrapperClassName?: string | null | undefined;
|
|
7
8
|
}
|
|
8
9
|
export interface IslandContentInnerProps extends IslandContentProps {
|
|
10
|
+
ref?: Ref<Content>;
|
|
9
11
|
onScroll: (node: HTMLElement) => void;
|
|
10
12
|
bottomBorder: boolean;
|
|
11
13
|
}
|
|
@@ -29,5 +31,8 @@ declare class Content extends Component<IslandContentInnerProps> {
|
|
|
29
31
|
setScrollableNodeAndCalculatePosition: (node: HTMLElement | null) => void;
|
|
30
32
|
render(): import("react").JSX.Element;
|
|
31
33
|
}
|
|
32
|
-
declare const ContentWrapper:
|
|
34
|
+
declare const ContentWrapper: {
|
|
35
|
+
({ ...props }: IslandContentProps): import("react").JSX.Element;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
33
38
|
export default ContentWrapper;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c } from 'react
|
|
2
|
-
import {
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import { Component } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import createResizeDetector from 'element-resize-detector';
|
|
5
5
|
import scheduleRAF from '../global/schedule-raf.js';
|
|
@@ -73,6 +73,7 @@ class Content extends Component {
|
|
|
73
73
|
};
|
|
74
74
|
render() {
|
|
75
75
|
const {
|
|
76
|
+
ref,
|
|
76
77
|
children,
|
|
77
78
|
className,
|
|
78
79
|
bottomBorder,
|
|
@@ -111,17 +112,27 @@ class Content extends Component {
|
|
|
111
112
|
});
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
|
-
const ContentWrapper =
|
|
115
|
-
const $ = c(
|
|
116
|
-
if ($[0] !== "
|
|
117
|
-
for (let $i = 0; $i <
|
|
115
|
+
const ContentWrapper = t0 => {
|
|
116
|
+
const $ = c(5);
|
|
117
|
+
if ($[0] !== "e4db06b946c16f75a9eac1dc4434adb1fda7cf8013533176d779915994c312c4") {
|
|
118
|
+
for (let $i = 0; $i < 5; $i += 1) {
|
|
118
119
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
119
120
|
}
|
|
120
|
-
$[0] = "
|
|
121
|
+
$[0] = "e4db06b946c16f75a9eac1dc4434adb1fda7cf8013533176d779915994c312c4";
|
|
121
122
|
}
|
|
122
|
-
let
|
|
123
|
-
if ($[1] !==
|
|
124
|
-
|
|
123
|
+
let props;
|
|
124
|
+
if ($[1] !== t0) {
|
|
125
|
+
({
|
|
126
|
+
...props
|
|
127
|
+
} = t0);
|
|
128
|
+
$[1] = t0;
|
|
129
|
+
$[2] = props;
|
|
130
|
+
} else {
|
|
131
|
+
props = $[2];
|
|
132
|
+
}
|
|
133
|
+
let t1;
|
|
134
|
+
if ($[3] !== props) {
|
|
135
|
+
t1 = /*#__PURE__*/jsx(ScrollHandlerContext.Consumer, {
|
|
125
136
|
children: onScroll => {
|
|
126
137
|
const addProps = onScroll ? {
|
|
127
138
|
onScroll,
|
|
@@ -129,19 +140,17 @@ const ContentWrapper = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
129
140
|
} : {};
|
|
130
141
|
return /*#__PURE__*/jsx(Content, {
|
|
131
142
|
...props,
|
|
132
|
-
...addProps
|
|
133
|
-
ref: ref
|
|
143
|
+
...addProps
|
|
134
144
|
});
|
|
135
145
|
}
|
|
136
146
|
});
|
|
137
|
-
$[
|
|
138
|
-
$[
|
|
139
|
-
$[3] = t0;
|
|
147
|
+
$[3] = props;
|
|
148
|
+
$[4] = t1;
|
|
140
149
|
} else {
|
|
141
|
-
|
|
150
|
+
t1 = $[4];
|
|
142
151
|
}
|
|
143
|
-
return
|
|
144
|
-
}
|
|
152
|
+
return t1;
|
|
153
|
+
};
|
|
145
154
|
ContentWrapper.displayName = 'ContentWrapper';
|
|
146
155
|
|
|
147
156
|
export { ContentWrapper as default };
|
|
@@ -7,7 +7,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
7
7
|
export { default as Header } from './header.js';
|
|
8
8
|
export { default as Content } from './content.js';
|
|
9
9
|
import '../global/linear-function.js';
|
|
10
|
-
import 'react
|
|
10
|
+
import 'react/compiler-runtime';
|
|
11
11
|
import 'element-resize-detector';
|
|
12
12
|
import '../global/schedule-raf.js';
|
|
13
13
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import joinDataTestAttributes from '../global/data-tests.js';
|
|
4
|
-
import { s as style } from '../_helpers/table.js';
|
|
4
|
+
import { s as style } from '../_helpers/legacy-table.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
class Cell extends PureComponent {
|
|
@@ -4,13 +4,12 @@ import sortableIcon from '@jetbrains/icons/unsorted-12px';
|
|
|
4
4
|
import chevron12pxDown from '@jetbrains/icons/chevron-12px-down';
|
|
5
5
|
import Icon from '../icon/icon.js';
|
|
6
6
|
import joinDataTestAttributes from '../global/data-tests.js';
|
|
7
|
-
import { s as style } from '../_helpers/table.js';
|
|
7
|
+
import { s as style } from '../_helpers/legacy-table.js';
|
|
8
8
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
9
9
|
import 'util-deprecate';
|
|
10
10
|
import '../icon/icon.constants.js';
|
|
11
11
|
import '../_helpers/icon-svg.js';
|
|
12
|
-
import 'react
|
|
13
|
-
import '../global/configuration.js';
|
|
12
|
+
import 'react/compiler-runtime';
|
|
14
13
|
import '../global/memoize.js';
|
|
15
14
|
|
|
16
15
|
class HeaderCell extends PureComponent {
|
|
@@ -3,7 +3,7 @@ import classNames from 'classnames';
|
|
|
3
3
|
import Checkbox from '../checkbox/checkbox.js';
|
|
4
4
|
import getUID from '../global/get-uid.js';
|
|
5
5
|
import HeaderCell from './header-cell.js';
|
|
6
|
-
import { s as style } from '../_helpers/table.js';
|
|
6
|
+
import { s as style } from '../_helpers/legacy-table.js';
|
|
7
7
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
8
|
import '@jetbrains/icons/checkmark-12px';
|
|
9
9
|
import '@jetbrains/icons/remove-12px';
|
|
@@ -11,8 +11,7 @@ import '../icon/icon.js';
|
|
|
11
11
|
import 'util-deprecate';
|
|
12
12
|
import '../icon/icon.constants.js';
|
|
13
13
|
import '../_helpers/icon-svg.js';
|
|
14
|
-
import 'react
|
|
15
|
-
import '../global/configuration.js';
|
|
14
|
+
import 'react/compiler-runtime';
|
|
16
15
|
import '../global/memoize.js';
|
|
17
16
|
import '../global/compose-refs.js';
|
|
18
17
|
import 'memoize-one';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PureComponent, type ReactElement } from 'react';
|
|
2
2
|
import { type TableAttrs } from './table';
|
|
3
|
-
import { type SelectionItem } from '
|
|
3
|
+
import { type SelectionItem } from '../global/table-selection';
|
|
4
4
|
type TableComponent = ReactElement<TableAttrs<SelectionItem>>;
|
|
5
5
|
export interface MultiTableProps {
|
|
6
6
|
children: TableComponent[];
|
|
@@ -3,8 +3,8 @@ import focusSensorHOC from '../global/focus-sensor-hoc.js';
|
|
|
3
3
|
import Row from './row.js';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
import '../global/compose-refs.js';
|
|
6
|
+
import 'react/compiler-runtime';
|
|
6
7
|
import 'memoize-one';
|
|
7
|
-
import 'react-compiler-runtime';
|
|
8
8
|
import 'classnames';
|
|
9
9
|
import '@jetbrains/icons/chevron-right';
|
|
10
10
|
import '@jetbrains/icons/chevron-down';
|
|
@@ -16,7 +16,6 @@ import '../icon/icon.js';
|
|
|
16
16
|
import 'util-deprecate';
|
|
17
17
|
import '../icon/icon.constants.js';
|
|
18
18
|
import '../_helpers/icon-svg.js';
|
|
19
|
-
import '../global/configuration.js';
|
|
20
19
|
import '../global/memoize.js';
|
|
21
20
|
import '../control-help/control-help.js';
|
|
22
21
|
import '../global/data-tests.js';
|
|
@@ -24,6 +23,7 @@ import '../button/button.js';
|
|
|
24
23
|
import '@jetbrains/icons/chevron-12px-down';
|
|
25
24
|
import '../link/clickable-link.js';
|
|
26
25
|
import '../global/controls-height.js';
|
|
26
|
+
import '../global/configuration.js';
|
|
27
27
|
import '../_helpers/button.classes.js';
|
|
28
28
|
import '../tooltip/tooltip.js';
|
|
29
29
|
import '../popup/popup.js';
|
|
@@ -44,7 +44,7 @@ import '../popup/popup.target.js';
|
|
|
44
44
|
import '../popup/position-css.js';
|
|
45
45
|
import '../_helpers/theme.js';
|
|
46
46
|
import './cell.js';
|
|
47
|
-
import '../_helpers/table.js';
|
|
47
|
+
import '../_helpers/legacy-table.js';
|
|
48
48
|
|
|
49
49
|
const getContainer = () => focusSensorHOC(Row);
|
|
50
50
|
class RowWithFocusSensorCallbacks extends PureComponent {
|
|
@@ -55,7 +55,7 @@ export default class Row<T extends object> extends PureComponent<RowProps<T>> {
|
|
|
55
55
|
onDoubleClick: () => void;
|
|
56
56
|
row?: HTMLElement | null;
|
|
57
57
|
rowRef: (el: HTMLElement | null) => void;
|
|
58
|
-
composedRowRef: import("memoize-one").MemoizedFn<(...refs: (React.Ref<HTMLElement> | undefined)[]) => (value: T_1 | null) => void>;
|
|
58
|
+
composedRowRef: import("memoize-one").MemoizedFn<(...refs: (React.Ref<HTMLElement> | undefined)[]) => (value: T_1 | null) => () => void>;
|
|
59
59
|
render(): React.JSX.Element;
|
|
60
60
|
}
|
|
61
61
|
export type RowAttrs<T extends object> = React.JSX.LibraryManagedAttributes<typeof Row, RowProps<T>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c } from 'react
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import { PureComponent } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import chevronRightIcon from '@jetbrains/icons/chevron-right';
|
|
@@ -11,7 +11,7 @@ import joinDataTestAttributes from '../global/data-tests.js';
|
|
|
11
11
|
import getUID from '../global/get-uid.js';
|
|
12
12
|
import { createComposedRef } from '../global/compose-refs.js';
|
|
13
13
|
import Cell from './cell.js';
|
|
14
|
-
import { s as style } from '../_helpers/table.js';
|
|
14
|
+
import { s as style } from '../_helpers/legacy-table.js';
|
|
15
15
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
16
16
|
import '@jetbrains/icons/checkmark-12px';
|
|
17
17
|
import '@jetbrains/icons/remove-12px';
|
|
@@ -19,12 +19,12 @@ import '../icon/icon.js';
|
|
|
19
19
|
import 'util-deprecate';
|
|
20
20
|
import '../icon/icon.constants.js';
|
|
21
21
|
import '../_helpers/icon-svg.js';
|
|
22
|
-
import '../global/configuration.js';
|
|
23
22
|
import '../global/memoize.js';
|
|
24
23
|
import '../control-help/control-help.js';
|
|
25
24
|
import '@jetbrains/icons/chevron-12px-down';
|
|
26
25
|
import '../link/clickable-link.js';
|
|
27
26
|
import '../global/controls-height.js';
|
|
27
|
+
import '../global/configuration.js';
|
|
28
28
|
import '../_helpers/button.classes.js';
|
|
29
29
|
import '../popup/popup.js';
|
|
30
30
|
import 'react-dom';
|
|
@@ -46,11 +46,11 @@ import 'memoize-one';
|
|
|
46
46
|
|
|
47
47
|
const DragHandle = t0 => {
|
|
48
48
|
const $ = c(6);
|
|
49
|
-
if ($[0] !== "
|
|
49
|
+
if ($[0] !== "6d181a7b79d6c43c9efeb4fa43b5ac2047952f3bf582e26f319cda89e9e36280") {
|
|
50
50
|
for (let $i = 0; $i < 6; $i += 1) {
|
|
51
51
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
52
52
|
}
|
|
53
|
-
$[0] = "
|
|
53
|
+
$[0] = "6d181a7b79d6c43c9efeb4fa43b5ac2047952f3bf582e26f319cda89e9e36280";
|
|
54
54
|
}
|
|
55
55
|
const {
|
|
56
56
|
alwaysShowDragHandle,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type TableSelection from '../global/table-selection';
|
|
2
|
+
import type { SelectionItem } from '../global/table-selection';
|
|
3
|
+
export default function selectionAdapter(getSelection: () => TableSelection<SelectionItem>): {
|
|
4
|
+
readonly size: number;
|
|
5
|
+
readonly items: SelectionItem[];
|
|
6
|
+
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { type ComponentClass } from 'react';
|
|
2
2
|
import { type ShortcutsMap } from '../shortcuts/core';
|
|
3
|
-
import type
|
|
3
|
+
import type TableSelection from '../global/table-selection';
|
|
4
4
|
export interface SelectionShortcutsOuterProps<T extends object> {
|
|
5
|
-
selection:
|
|
5
|
+
selection: TableSelection<T>;
|
|
6
6
|
selectable?: boolean | undefined;
|
|
7
|
-
onSelect?: ((selection:
|
|
7
|
+
onSelect?: ((selection: TableSelection<T>) => void) | undefined;
|
|
8
8
|
shortcuts?: ShortcutsMap | undefined;
|
|
9
9
|
}
|
|
10
10
|
export interface SelectionShortcutsAddProps<T extends object> {
|
|
11
|
-
selection:
|
|
11
|
+
selection: TableSelection<T>;
|
|
12
12
|
selectable: boolean;
|
|
13
|
-
onSelect: (selection:
|
|
13
|
+
onSelect: (selection: TableSelection<T>) => void;
|
|
14
14
|
shortcutsMap: ShortcutsMap;
|
|
15
15
|
}
|
|
16
16
|
export type SelectionShortcutsProps<T extends object, P> = Omit<P, keyof SelectionShortcutsAddProps<T>> & SelectionShortcutsOuterProps<T>;
|