@jetbrains/ring-ui-built 7.0.115 → 8.0.0-beta.3
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 +1 -1
- package/components/_helpers/icon-svg.js +1 -1
- 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.js +1 -1
- package/components/alert-service/alert-service.js +1 -1
- package/components/auth/auth-core.js +1 -1
- package/components/auth/auth.js +1 -1
- package/components/auth/down-notification.js +1 -1
- package/components/auth/iframe-flow.js +1 -1
- package/components/auth/storage.js +1 -1
- package/components/auth-dialog/auth-dialog.js +1 -1
- package/components/auth-dialog-service/auth-dialog-service.js +2 -2
- package/components/avatar/avatar-info.js +1 -1
- package/components/avatar/avatar.js +1 -1
- package/components/avatar/fallback-avatar.js +1 -1
- package/components/avatar-stack/avatar-stack.js +1 -1
- package/components/banner/banner.js +1 -1
- package/components/button/button.js +1 -1
- package/components/button-group/button-group.js +1 -1
- package/components/checkbox/checkbox.js +1 -1
- package/components/clipboard/clipboard.js +1 -1
- package/components/collapse/collapse-content.js +5 -5
- package/components/collapse/collapse-control.js +5 -5
- package/components/collapse/collapse.js +4 -4
- package/components/confirm/confirm.js +1 -1
- package/components/confirm-service/confirm-service.js +2 -2
- package/components/contenteditable/contenteditable.js +1 -1
- 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 +3 -3
- package/components/data-list/data-list.mock.d.ts +1 -1
- package/components/data-list/data-list.mock.js +1 -1
- package/components/data-list/item.d.ts +1 -1
- package/components/data-list/item.js +1 -1
- package/components/data-list/selection.d.ts +1 -1
- package/components/data-list/selection.js +2 -2
- package/components/data-list/title.js +1 -1
- package/components/date-picker/date-input.js +1 -1
- package/components/date-picker/date-picker.js +2 -3
- package/components/date-picker/date-popup.js +2 -3
- 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 -35
- package/components/date-picker/use-intersection-observer.js +1 -1
- package/components/date-picker/use-scroll-behavior.js +45 -44
- package/components/date-picker/weekdays.js +1 -1
- package/components/date-picker/years.js +61 -54
- package/components/dialog/dialog.d.ts +2 -2
- package/components/dialog/dialog.js +3 -3
- package/components/dropdown/anchor.js +1 -1
- package/components/dropdown/dropdown.js +1 -1
- package/components/dropdown-menu/dropdown-menu.d.ts +4 -4
- package/components/dropdown-menu/dropdown-menu.js +62 -57
- package/components/editable-heading/editable-heading.d.ts +1 -2
- package/components/editable-heading/editable-heading.js +13 -12
- package/components/error-bubble/error-bubble.js +1 -1
- package/components/error-message/error-message.js +1 -1
- package/components/expand/collapsible-group.d.ts +5 -1
- package/components/expand/collapsible-group.js +15 -14
- package/components/footer/footer.js +1 -1
- package/components/global/create-stateful-context.js +11 -11
- package/components/global/intersection-observer-context.d.ts +26 -0
- package/components/global/intersection-observer-context.js +140 -0
- package/components/global/rerender-hoc.d.ts +4 -2
- package/components/global/rerender-hoc.js +10 -24
- package/components/{table/selection.d.ts → global/table-selection.d.ts} +15 -15
- package/components/{table/selection.js → global/table-selection.js} +4 -4
- package/components/global/theme.d.ts +4 -3
- package/components/global/theme.js +1 -1
- package/components/header/header-icon.js +1 -1
- package/components/header/header.js +1 -1
- package/components/header/links.js +1 -1
- package/components/header/logo.js +1 -1
- package/components/header/profile.js +1 -1
- package/components/header/services.js +1 -1
- package/components/header/smart-profile.js +1 -1
- package/components/header/smart-services.js +1 -1
- package/components/heading/heading.js +1 -1
- package/components/i18n/i18n-context.js +4 -4
- package/components/icon/icon-svg.js +1 -1
- package/components/icon/icon.js +1 -1
- package/components/icon/index.js +1 -1
- package/components/input/input.js +1 -1
- 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 +4 -4
- package/components/{table → legacy-table}/header.js +2 -2
- package/components/{table → legacy-table}/multitable.d.ts +1 -1
- package/components/{table → legacy-table}/row-with-focus-sensor.js +2 -2
- package/components/{table → legacy-table}/row.js +4 -4
- 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 +4 -4
- package/components/{table → legacy-table}/smart-table.d.ts +5 -5
- package/components/{table → legacy-table}/smart-table.js +5 -5
- package/components/legacy-table/table.d.ts +109 -0
- package/components/legacy-table/table.js +369 -0
- package/components/list/list-item.js +1 -1
- package/components/list/list-users-groups-source.js +1 -1
- package/components/list/list.js +1 -1
- package/components/login-dialog/login-dialog.js +1 -1
- package/components/login-dialog/service.js +2 -2
- package/components/message/message.js +1 -1
- package/components/old-browsers-message/white-list.js +2 -2
- package/components/pager/pager.js +1 -1
- 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 -1
- 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 +32 -18
- 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 +1 -1
- package/components/select/select-filter.js +1 -1
- package/components/select/select-popup.js +1 -1
- package/components/select/select.d.ts +3 -1
- package/components/select/select.js +1 -1
- package/components/slider/slider.js +100 -96
- package/components/storage/storage-local.js +1 -1
- package/components/storage/storage.js +1 -1
- 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 +36 -0
- package/components/table/default-item-renderer.js +182 -0
- package/components/table/table-component.d.ts +80 -0
- package/components/table/table-component.js +290 -0
- package/components/table/table-const.d.ts +8 -0
- package/components/table/table-const.js +11 -0
- package/components/table/table-primitives.d.ts +28 -0
- package/components/table/table-primitives.js +323 -0
- package/components/table/table-row-focus.d.ts +4 -0
- package/components/table/table-row-focus.js +41 -0
- package/components/table/table-virtualize.d.ts +32 -0
- package/components/table/table-virtualize.js +329 -0
- package/components/table/table.d.ts +206 -104
- package/components/table/table.js +19 -362
- 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 +1 -1
- package/components/tags-list/tags-list.js +1 -1
- package/components/toggle/toggle.js +1 -1
- package/components/tooltip/tooltip.js +2 -2
- package/components/upload/upload.d.ts +4 -3
- package/components/upload/upload.js +7 -29
- package/components/user-agreement/service.js +2 -2
- package/components/user-agreement/user-agreement.js +1 -1
- package/components/user-card/card.js +1 -1
- package/components/user-card/smart-user-card-tooltip.js +1 -1
- package/components/user-card/tooltip.js +1 -1
- package/components/user-card/user-card.js +1 -1
- package/package.json +6 -6
- package/components/global/use-event-callback.d.ts +0 -1
- package/components/global/use-event-callback.js +0 -44
- 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}/row.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,369 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import '
|
|
15
|
-
import '
|
|
16
|
-
import '
|
|
17
|
-
import 'core-js/modules/es.array.includes.js';
|
|
18
|
-
import 'combokeys';
|
|
19
|
-
import '../global/sniffer.js';
|
|
20
|
-
import 'sniffr';
|
|
21
|
-
import '../_helpers/loader-core.js';
|
|
22
|
-
import '../global/dom.js';
|
|
23
|
-
import '../checkbox/checkbox.js';
|
|
24
|
-
import '@jetbrains/icons/checkmark-12px';
|
|
25
|
-
import '@jetbrains/icons/remove-12px';
|
|
1
|
+
import Table from './table-component.js';
|
|
2
|
+
import 'react/compiler-runtime';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'classnames';
|
|
5
|
+
import 'react-merge-refs';
|
|
6
|
+
import '../global/intersection-observer-context.js';
|
|
7
|
+
import './table-virtualize.js';
|
|
8
|
+
import '../_helpers/table.js';
|
|
9
|
+
import 'react/jsx-runtime';
|
|
10
|
+
import './default-item-renderer.js';
|
|
11
|
+
import './table-const.js';
|
|
12
|
+
import './table-primitives.js';
|
|
13
|
+
import '@jetbrains/icons/unsorted-12px';
|
|
14
|
+
import '@jetbrains/icons/arrow-12px-down';
|
|
15
|
+
import '@jetbrains/icons/arrow-12px-up';
|
|
16
|
+
import '@jetbrains/icons/trash-12px';
|
|
26
17
|
import '../icon/icon.js';
|
|
27
18
|
import 'util-deprecate';
|
|
28
19
|
import '../icon/icon.constants.js';
|
|
29
20
|
import '../_helpers/icon-svg.js';
|
|
30
|
-
import 'react-compiler-runtime';
|
|
31
21
|
import '../global/memoize.js';
|
|
32
|
-
import '
|
|
33
|
-
|
|
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';
|
|
22
|
+
import './table-row-focus.js';
|
|
23
|
+
|
|
57
24
|
|
|
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
25
|
|
|
369
|
-
export { Table
|
|
26
|
+
export { Table as default };
|
|
@@ -8,7 +8,7 @@ import CollapsibleTabs from './collapsible-tabs.js';
|
|
|
8
8
|
import { CustomItem } from './custom-item.js';
|
|
9
9
|
import { getTabId } from './tabs.utils.js';
|
|
10
10
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
|
-
import 'react
|
|
11
|
+
import 'react/compiler-runtime';
|
|
12
12
|
import '../link/link.js';
|
|
13
13
|
import '../link/clickable-link.js';
|
|
14
14
|
import '../_helpers/link.js';
|
|
@@ -5,7 +5,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
5
5
|
import 'classnames';
|
|
6
6
|
import '../global/memoize.js';
|
|
7
7
|
import '../_helpers/tab-link.js';
|
|
8
|
-
import 'react
|
|
8
|
+
import 'react/compiler-runtime';
|
|
9
9
|
import '../link/link.js';
|
|
10
10
|
import '../link/clickable-link.js';
|
|
11
11
|
import '../_helpers/link.js';
|
package/components/tabs/tabs.js
CHANGED
|
@@ -7,7 +7,7 @@ import 'classnames';
|
|
|
7
7
|
import '../global/memoize.js';
|
|
8
8
|
import '../global/data-tests.js';
|
|
9
9
|
import '../_helpers/tab-link.js';
|
|
10
|
-
import 'react
|
|
10
|
+
import 'react/compiler-runtime';
|
|
11
11
|
import '../link/link.js';
|
|
12
12
|
import '../link/clickable-link.js';
|
|
13
13
|
import 'react/jsx-runtime';
|
package/components/tag/tag.js
CHANGED
|
@@ -10,7 +10,7 @@ import { ControlsHeight } from '../global/configuration.js';
|
|
|
10
10
|
import 'util-deprecate';
|
|
11
11
|
import '../icon/icon.constants.js';
|
|
12
12
|
import '../_helpers/icon-svg.js';
|
|
13
|
-
import 'react
|
|
13
|
+
import 'react/compiler-runtime';
|
|
14
14
|
import '../global/memoize.js';
|
|
15
15
|
import '@jetbrains/icons/chevron-down';
|
|
16
16
|
import '@jetbrains/icons/chevron-12px-down';
|
|
@@ -110,6 +110,8 @@ export default class TagsInput extends PureComponent<TagsInputProps, TagsInputSt
|
|
|
110
110
|
selectRef: (el: Select | null) => void;
|
|
111
111
|
render(): React.JSX.Element;
|
|
112
112
|
}
|
|
113
|
-
export declare const RerenderableTagsInput:
|
|
113
|
+
export declare const RerenderableTagsInput: ({ ref, ...props }: TagsInputProps & {
|
|
114
|
+
ref?: React.Ref<TagsInput> | undefined;
|
|
115
|
+
}) => React.JSX.Element;
|
|
114
116
|
export type TagsInputAttrs = React.JSX.LibraryManagedAttributes<typeof TagsInput, TagsInputProps>;
|
|
115
117
|
export {};
|
|
@@ -17,7 +17,7 @@ import 'dequal';
|
|
|
17
17
|
import '../global/data-tests.js';
|
|
18
18
|
import '../global/typescript-utils.js';
|
|
19
19
|
import '../_helpers/anchor.js';
|
|
20
|
-
import 'react
|
|
20
|
+
import 'react/compiler-runtime';
|
|
21
21
|
import '../button/button.js';
|
|
22
22
|
import '@jetbrains/icons/chevron-down';
|
|
23
23
|
import '@jetbrains/icons/chevron-12px-down';
|
|
@@ -7,7 +7,7 @@ import '../icon/icon.js';
|
|
|
7
7
|
import 'util-deprecate';
|
|
8
8
|
import '../icon/icon.constants.js';
|
|
9
9
|
import '../_helpers/icon-svg.js';
|
|
10
|
-
import 'react
|
|
10
|
+
import 'react/compiler-runtime';
|
|
11
11
|
import '../global/memoize.js';
|
|
12
12
|
import '../button/button.js';
|
|
13
13
|
import '@jetbrains/icons/chevron-down';
|
|
@@ -3,7 +3,7 @@ import classNames from 'classnames';
|
|
|
3
3
|
import joinDataTestAttributes from '../global/data-tests.js';
|
|
4
4
|
import ControlHelp from '../control-help/control-help.js';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
-
import 'react
|
|
6
|
+
import 'react/compiler-runtime';
|
|
7
7
|
|
|
8
8
|
var styles = {"toggle":"ring-toggle-toggle","switch":"ring-toggle-switch","disabled":"ring-toggle-disabled","label":"ring-toggle-label","help":"ring-toggle-help","leftLabel":"ring-toggle-leftLabel","switchWrapper":"ring-toggle-switchWrapper","input":"ring-toggle-input","size16":"ring-toggle-size16","size14":"ring-toggle-size14","size20":"ring-toggle-size20"};
|
|
9
9
|
|
|
@@ -15,7 +15,7 @@ import 'combokeys';
|
|
|
15
15
|
import '../global/sniffer.js';
|
|
16
16
|
import 'sniffr';
|
|
17
17
|
import '../tab-trap/tab-trap.js';
|
|
18
|
-
import 'react
|
|
18
|
+
import 'react/compiler-runtime';
|
|
19
19
|
import '../global/configuration.js';
|
|
20
20
|
import '../popup/position.js';
|
|
21
21
|
import '../popup/popup.consts.js';
|
|
@@ -200,7 +200,7 @@ class Tooltip extends Component {
|
|
|
200
200
|
}, popupProps?.className),
|
|
201
201
|
children: title
|
|
202
202
|
});
|
|
203
|
-
return /*#__PURE__*/jsx(TooltipContext
|
|
203
|
+
return /*#__PURE__*/jsx(TooltipContext, {
|
|
204
204
|
value: {
|
|
205
205
|
onNestedTooltipShow,
|
|
206
206
|
onNestedTooltipHide
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import { type ReactNode, type Ref } from 'react';
|
|
2
2
|
export type UploadVariant = 'empty' | 'error' | 'success';
|
|
3
3
|
interface Props {
|
|
4
4
|
className?: string;
|
|
@@ -10,10 +10,11 @@ interface Props {
|
|
|
10
10
|
accept?: HTMLInputElement['accept'];
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
variant?: UploadVariant;
|
|
13
|
+
ref?: Ref<UploadHandle>;
|
|
13
14
|
children?: ReactNode;
|
|
14
15
|
}
|
|
15
16
|
export interface UploadHandle {
|
|
16
17
|
openFilePicker: () => void;
|
|
17
18
|
}
|
|
18
|
-
export
|
|
19
|
-
export
|
|
19
|
+
export default function UploadInner({ children, className, onFilesSelected, onFilesRejected, validate, variant, multiple, renderIcon, accept, disabled, ref, }: Props): import("react").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c } from 'react
|
|
2
|
-
import {
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import { useRef, useState, useImperativeHandle } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import attachmentIcon from '@jetbrains/icons/attachment';
|
|
5
5
|
import Icon from '../icon/icon.js';
|
|
@@ -17,11 +17,11 @@ const defaultRenderIcon = () => /*#__PURE__*/jsx(Icon, {
|
|
|
17
17
|
});
|
|
18
18
|
function UploadInner(t0) {
|
|
19
19
|
const $ = c(29);
|
|
20
|
-
if ($[0] !== "
|
|
20
|
+
if ($[0] !== "d58de564c5913f5a17e892bfa80bc62db12ed2c472d455b1315750c6d5bfd08f") {
|
|
21
21
|
for (let $i = 0; $i < 29; $i += 1) {
|
|
22
22
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
23
23
|
}
|
|
24
|
-
$[0] = "
|
|
24
|
+
$[0] = "d58de564c5913f5a17e892bfa80bc62db12ed2c472d455b1315750c6d5bfd08f";
|
|
25
25
|
}
|
|
26
26
|
const {
|
|
27
27
|
children,
|
|
@@ -34,7 +34,7 @@ function UploadInner(t0) {
|
|
|
34
34
|
renderIcon: t3,
|
|
35
35
|
accept,
|
|
36
36
|
disabled,
|
|
37
|
-
|
|
37
|
+
ref
|
|
38
38
|
} = t0;
|
|
39
39
|
const validate = t1 === undefined ? _temp : t1;
|
|
40
40
|
const variant = t2 === undefined ? "empty" : t2;
|
|
@@ -54,7 +54,7 @@ function UploadInner(t0) {
|
|
|
54
54
|
t4 = $[1];
|
|
55
55
|
t5 = $[2];
|
|
56
56
|
}
|
|
57
|
-
useImperativeHandle(
|
|
57
|
+
useImperativeHandle(ref, t4, t5);
|
|
58
58
|
let t6;
|
|
59
59
|
if ($[3] !== onFilesRejected || $[4] !== onFilesSelected || $[5] !== validate) {
|
|
60
60
|
t6 = files => {
|
|
@@ -182,27 +182,5 @@ function _temp2(e) {
|
|
|
182
182
|
function _temp() {
|
|
183
183
|
return true;
|
|
184
184
|
}
|
|
185
|
-
const Upload = /*#__PURE__*/forwardRef(function Upload(props, ref) {
|
|
186
|
-
const $ = c(4);
|
|
187
|
-
if ($[0] !== "7d5a4ecc65f01d46fa3e08e16dbed39a1cd6f740a025c62cc404b96900b00084") {
|
|
188
|
-
for (let $i = 0; $i < 4; $i += 1) {
|
|
189
|
-
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
190
|
-
}
|
|
191
|
-
$[0] = "7d5a4ecc65f01d46fa3e08e16dbed39a1cd6f740a025c62cc404b96900b00084";
|
|
192
|
-
}
|
|
193
|
-
let t0;
|
|
194
|
-
if ($[1] !== props || $[2] !== ref) {
|
|
195
|
-
t0 = /*#__PURE__*/jsx(UploadInner, {
|
|
196
|
-
...props,
|
|
197
|
-
forwardedRef: ref
|
|
198
|
-
});
|
|
199
|
-
$[1] = props;
|
|
200
|
-
$[2] = ref;
|
|
201
|
-
$[3] = t0;
|
|
202
|
-
} else {
|
|
203
|
-
t0 = $[3];
|
|
204
|
-
}
|
|
205
|
-
return t0;
|
|
206
|
-
});
|
|
207
185
|
|
|
208
|
-
export {
|
|
186
|
+
export { UploadInner as default };
|
|
@@ -23,7 +23,7 @@ import '../icon/icon.js';
|
|
|
23
23
|
import 'util-deprecate';
|
|
24
24
|
import '../icon/icon.constants.js';
|
|
25
25
|
import '../_helpers/icon-svg.js';
|
|
26
|
-
import 'react
|
|
26
|
+
import 'react/compiler-runtime';
|
|
27
27
|
import '../global/memoize.js';
|
|
28
28
|
import '../loader-inline/loader-inline.js';
|
|
29
29
|
import '../global/dom.js';
|
|
@@ -277,7 +277,7 @@ class UserAgreementService {
|
|
|
277
277
|
preview,
|
|
278
278
|
...restOptions
|
|
279
279
|
};
|
|
280
|
-
this.reactRoot.render(/*#__PURE__*/jsx(ControlsHeightContext
|
|
280
|
+
this.reactRoot.render(/*#__PURE__*/jsx(ControlsHeightContext, {
|
|
281
281
|
value: getGlobalControlsHeight(),
|
|
282
282
|
children: /*#__PURE__*/jsx(UserAgreement, {
|
|
283
283
|
...props
|
|
@@ -14,7 +14,7 @@ import '../island/island.js';
|
|
|
14
14
|
import '../global/data-tests.js';
|
|
15
15
|
import '../island/adaptive-island-hoc.js';
|
|
16
16
|
import '../global/linear-function.js';
|
|
17
|
-
import 'react
|
|
17
|
+
import 'react/compiler-runtime';
|
|
18
18
|
import 'element-resize-detector';
|
|
19
19
|
import '../global/schedule-raf.js';
|
|
20
20
|
import '../global/get-uid.js';
|
|
@@ -18,7 +18,7 @@ import '../global/url.js';
|
|
|
18
18
|
import '../global/dom.js';
|
|
19
19
|
import '../global/memoize.js';
|
|
20
20
|
import '../avatar/fallback-avatar.js';
|
|
21
|
-
import 'react
|
|
21
|
+
import 'react/compiler-runtime';
|
|
22
22
|
import '../global/get-uid.js';
|
|
23
23
|
import '../_helpers/avatar-info.js';
|
|
24
24
|
import '../global/data-tests.js';
|
|
@@ -8,7 +8,7 @@ import '../global/data-tests.js';
|
|
|
8
8
|
import '../dropdown/dropdown.js';
|
|
9
9
|
import '../global/typescript-utils.js';
|
|
10
10
|
import '../_helpers/anchor.js';
|
|
11
|
-
import 'react
|
|
11
|
+
import 'react/compiler-runtime';
|
|
12
12
|
import '../button/button.js';
|
|
13
13
|
import '@jetbrains/icons/chevron-down';
|
|
14
14
|
import '@jetbrains/icons/chevron-12px-down';
|
|
@@ -7,7 +7,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
7
7
|
import '../global/data-tests.js';
|
|
8
8
|
import '../global/typescript-utils.js';
|
|
9
9
|
import '../_helpers/anchor.js';
|
|
10
|
-
import 'react
|
|
10
|
+
import 'react/compiler-runtime';
|
|
11
11
|
import '../button/button.js';
|
|
12
12
|
import '@jetbrains/icons/chevron-down';
|
|
13
13
|
import '@jetbrains/icons/chevron-12px-down';
|