carbon-addons-iot-react 5.6.3 → 5.6.4
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/es/components/Table/Table.js +2 -1
- package/es/components/Table/TableBody/TableBody.js +17 -0
- package/es/components/Table/TableBody/TableBodyRow/TableBodyRow.js +33 -1
- package/es/components/Table/TableBody/TableBodyRow/TableDragHandle.js +39 -3
- package/es/components/Table/TableBody/TableBodyRowRenderer.js +32 -0
- package/lib/components/Table/Table.js +2 -1
- package/lib/components/Table/TableBody/TableBody.js +17 -0
- package/lib/components/Table/TableBody/TableBodyRow/TableBodyRow.js +33 -1
- package/lib/components/Table/TableBody/TableBodyRow/TableDragHandle.js +39 -3
- package/lib/components/Table/TableBody/TableBodyRowRenderer.js +32 -0
- package/package.json +1 -1
- package/umd/carbon-addons-iot-react.js +122 -5
|
@@ -594,6 +594,7 @@ var defaultProps = function defaultProps(baseProps) {
|
|
|
594
594
|
multiSortDescending: 'Descending',
|
|
595
595
|
multiSortOverflowItem: 'Multi-sort',
|
|
596
596
|
multiSortDragHandle: 'Drag handle',
|
|
597
|
+
dragHandleTooltip: 'Click and drag to new location',
|
|
597
598
|
// table error state
|
|
598
599
|
tableErrorStateTitle: 'Unable to load the page',
|
|
599
600
|
buttonLabelOnTableError: 'Refresh the page',
|
|
@@ -1009,7 +1010,7 @@ var Table = function Table(props) {
|
|
|
1009
1010
|
selectedIds: view.table.selectedIds,
|
|
1010
1011
|
loadingMoreIds: view.table.loadingMoreIds,
|
|
1011
1012
|
zIndex: zIndex
|
|
1012
|
-
}, _pick(i18n, 'overflowMenuAria', 'clickToExpandAria', 'clickToCollapseAria', 'inProgressText', 'actionFailedText', 'learnMoreText', 'dismissText', 'selectRowAria', 'loadMoreText'), {
|
|
1013
|
+
}, _pick(i18n, 'overflowMenuAria', 'clickToExpandAria', 'clickToCollapseAria', 'inProgressText', 'actionFailedText', 'learnMoreText', 'dismissText', 'selectRowAria', 'loadMoreText', 'dragHandleTooltip'), {
|
|
1013
1014
|
totalColumns: totalColumns
|
|
1014
1015
|
}, _pick(options, 'hasRowSelection', 'hasRowActions', 'hasRowNesting', 'shouldExpandOnRowClick', 'shouldLazyRender', 'preserveCellWhiteSpace', 'useRadioButtonSingleSelect', 'hasDragAndDrop', 'hasBreadcrumbDrop'), {
|
|
1015
1016
|
hideDragHandles: hideDragHandles,
|
|
@@ -57,6 +57,8 @@ var propTypes = {
|
|
|
57
57
|
dismissText: PropTypes.string,
|
|
58
58
|
/** I18N label for load more */
|
|
59
59
|
loadMoreText: PropTypes.string,
|
|
60
|
+
/** I18N label for drag handle tooltip */
|
|
61
|
+
dragHandleTooltip: PropTypes.string,
|
|
60
62
|
/** since some columns might not be currently visible */
|
|
61
63
|
totalColumns: PropTypes.number,
|
|
62
64
|
hasRowSelection: PropTypes.oneOf(['multi', 'single', false]),
|
|
@@ -154,6 +156,7 @@ var defaultProps = {
|
|
|
154
156
|
inProgressText: 'In progress',
|
|
155
157
|
dismissText: 'Dismiss',
|
|
156
158
|
actionFailedText: 'Action failed',
|
|
159
|
+
dragHandleTooltip: 'Click and drag to new location',
|
|
157
160
|
size: undefined,
|
|
158
161
|
hasDragAndDrop: false,
|
|
159
162
|
hasBreadcrumbDrop: false,
|
|
@@ -179,6 +182,7 @@ var TableBody = function TableBody(_ref) {
|
|
|
179
182
|
dismissText = _ref.dismissText,
|
|
180
183
|
actionFailedText = _ref.actionFailedText,
|
|
181
184
|
loadMoreText = _ref.loadMoreText,
|
|
185
|
+
dragHandleTooltip = _ref.dragHandleTooltip,
|
|
182
186
|
totalColumns = _ref.totalColumns,
|
|
183
187
|
actions = _ref.actions,
|
|
184
188
|
rowActionsState = _ref.rowActionsState,
|
|
@@ -320,6 +324,7 @@ var TableBody = function TableBody(_ref) {
|
|
|
320
324
|
clickToExpandAria: clickToExpandAria,
|
|
321
325
|
columns: columns,
|
|
322
326
|
dismissText: dismissText,
|
|
327
|
+
dragHandleTooltip: dragHandleTooltip,
|
|
323
328
|
expandedIds: expandedIds,
|
|
324
329
|
expandedRows: expandedRows,
|
|
325
330
|
hasRowActions: hasRowActions,
|
|
@@ -329,6 +334,7 @@ var TableBody = function TableBody(_ref) {
|
|
|
329
334
|
useRadioButtonSingleSelect: useRadioButtonSingleSelect,
|
|
330
335
|
indeterminateSelectionIds: getIndeterminateRowSelectionIds(rows, selectedIds),
|
|
331
336
|
inProgressText: inProgressText,
|
|
337
|
+
isDragging: isDragging,
|
|
332
338
|
langDir: langDir,
|
|
333
339
|
learnMoreText: learnMoreText,
|
|
334
340
|
loadingMoreIds: loadingMoreIds,
|
|
@@ -756,6 +762,17 @@ TableBody.__docgenInfo = {
|
|
|
756
762
|
},
|
|
757
763
|
"required": false
|
|
758
764
|
},
|
|
765
|
+
"dragHandleTooltip": {
|
|
766
|
+
"defaultValue": {
|
|
767
|
+
"value": "'Click and drag to new location'",
|
|
768
|
+
"computed": false
|
|
769
|
+
},
|
|
770
|
+
"description": "I18N label for drag handle tooltip",
|
|
771
|
+
"type": {
|
|
772
|
+
"name": "string"
|
|
773
|
+
},
|
|
774
|
+
"required": false
|
|
775
|
+
},
|
|
759
776
|
"size": {
|
|
760
777
|
"defaultValue": {
|
|
761
778
|
"value": "undefined",
|
|
@@ -46,6 +46,8 @@ var propTypes = {
|
|
|
46
46
|
clickToExpandAria: PropTypes.string,
|
|
47
47
|
/** internationalized label */
|
|
48
48
|
clickToCollapseAria: PropTypes.string,
|
|
49
|
+
/** I18N label for drag handle tooltip */
|
|
50
|
+
dragHandleTooltip: PropTypes.string,
|
|
49
51
|
/** List of columns */
|
|
50
52
|
columns: TableColumnsPropTypes.isRequired,
|
|
51
53
|
/** table wide options */
|
|
@@ -137,6 +139,8 @@ var propTypes = {
|
|
|
137
139
|
isDraggable: PropTypes.bool,
|
|
138
140
|
/** If this row is being dragged. */
|
|
139
141
|
isDragRow: PropTypes.bool,
|
|
142
|
+
/** If a drag operation is currently in progress. */
|
|
143
|
+
isDragging: PropTypes.bool,
|
|
140
144
|
/** If all drag handles should be hidden. This happens when an undraggable row is in the selection. */
|
|
141
145
|
hideDragHandles: PropTypes.bool,
|
|
142
146
|
/** Attribute name to identify deleted rows */
|
|
@@ -150,6 +154,7 @@ var defaultProps = {
|
|
|
150
154
|
overflowMenuAria: 'More actions',
|
|
151
155
|
clickToExpandAria: 'Click to expand.',
|
|
152
156
|
clickToCollapseAria: 'Click to collapse.',
|
|
157
|
+
dragHandleTooltip: 'Click and drag to new location',
|
|
153
158
|
rowActions: null,
|
|
154
159
|
rowDetails: null,
|
|
155
160
|
nestingLevel: 0,
|
|
@@ -177,6 +182,7 @@ var defaultProps = {
|
|
|
177
182
|
onDragLeaveRow: null,
|
|
178
183
|
isDraggable: false,
|
|
179
184
|
isDragRow: false,
|
|
185
|
+
isDragging: false,
|
|
180
186
|
deletedAttribute: '_deleted'
|
|
181
187
|
};
|
|
182
188
|
var TableBodyRow = function TableBodyRow(_ref) {
|
|
@@ -210,6 +216,7 @@ var TableBodyRow = function TableBodyRow(_ref) {
|
|
|
210
216
|
overflowMenuAria = _ref.overflowMenuAria,
|
|
211
217
|
clickToExpandAria = _ref.clickToExpandAria,
|
|
212
218
|
clickToCollapseAria = _ref.clickToCollapseAria,
|
|
219
|
+
dragHandleTooltip = _ref.dragHandleTooltip,
|
|
213
220
|
inProgressText = _ref.inProgressText,
|
|
214
221
|
actionFailedText = _ref.actionFailedText,
|
|
215
222
|
learnMoreText = _ref.learnMoreText,
|
|
@@ -233,6 +240,7 @@ var TableBodyRow = function TableBodyRow(_ref) {
|
|
|
233
240
|
onDragLeaveRow = _ref.onDragLeaveRow,
|
|
234
241
|
isDragRow = _ref.isDragRow,
|
|
235
242
|
isDraggable = _ref.isDraggable,
|
|
243
|
+
isDragging = _ref.isDragging,
|
|
236
244
|
hasDragAndDrop = _ref.hasDragAndDrop,
|
|
237
245
|
hideDragHandles = _ref.hideDragHandles,
|
|
238
246
|
deletedAttribute = _ref.deletedAttribute;
|
|
@@ -289,7 +297,9 @@ var TableBodyRow = function TableBodyRow(_ref) {
|
|
|
289
297
|
className: "".concat(iotPrefix, "--table-grab-handle-cell")
|
|
290
298
|
}, !isDraggable || hideDragHandles ? null : /*#__PURE__*/React__default.createElement(TableDragHandle, {
|
|
291
299
|
onStartDrag: onStartDrag,
|
|
292
|
-
rowId: id
|
|
300
|
+
rowId: id,
|
|
301
|
+
isDragging: isDragging,
|
|
302
|
+
tooltipText: dragHandleTooltip
|
|
293
303
|
}));
|
|
294
304
|
var firstVisibleColIndex = ordering.findIndex(function (col) {
|
|
295
305
|
return !col.isHidden;
|
|
@@ -548,6 +558,17 @@ TableBodyRow.__docgenInfo = {
|
|
|
548
558
|
},
|
|
549
559
|
"required": false
|
|
550
560
|
},
|
|
561
|
+
"dragHandleTooltip": {
|
|
562
|
+
"defaultValue": {
|
|
563
|
+
"value": "'Click and drag to new location'",
|
|
564
|
+
"computed": false
|
|
565
|
+
},
|
|
566
|
+
"description": "I18N label for drag handle tooltip",
|
|
567
|
+
"type": {
|
|
568
|
+
"name": "string"
|
|
569
|
+
},
|
|
570
|
+
"required": false
|
|
571
|
+
},
|
|
551
572
|
"rowActions": {
|
|
552
573
|
"defaultValue": {
|
|
553
574
|
"value": "null",
|
|
@@ -937,6 +958,17 @@ TableBodyRow.__docgenInfo = {
|
|
|
937
958
|
},
|
|
938
959
|
"required": false
|
|
939
960
|
},
|
|
961
|
+
"isDragging": {
|
|
962
|
+
"defaultValue": {
|
|
963
|
+
"value": "false",
|
|
964
|
+
"computed": false
|
|
965
|
+
},
|
|
966
|
+
"description": "If a drag operation is currently in progress.",
|
|
967
|
+
"type": {
|
|
968
|
+
"name": "bool"
|
|
969
|
+
},
|
|
970
|
+
"required": false
|
|
971
|
+
},
|
|
940
972
|
"deletedAttribute": {
|
|
941
973
|
"defaultValue": {
|
|
942
974
|
"value": "'_deleted'",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React__default, { forwardRef } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { Tooltip } from '@carbon/react';
|
|
3
4
|
import { settings } from '../../../../constants/Settings.js';
|
|
4
5
|
import { Draggable } from '@carbon/icons-react';
|
|
5
6
|
|
|
@@ -13,7 +14,15 @@ var propTypes = {
|
|
|
13
14
|
/**
|
|
14
15
|
* The ID of the table row this handle is it. This is the row that will be dragged by this handle.
|
|
15
16
|
*/
|
|
16
|
-
rowId: PropTypes.string.isRequired
|
|
17
|
+
rowId: PropTypes.string.isRequired,
|
|
18
|
+
/**
|
|
19
|
+
* If a drag operation is currently in progress. When true, the tooltip is hidden.
|
|
20
|
+
*/
|
|
21
|
+
isDragging: PropTypes.bool.isRequired,
|
|
22
|
+
/**
|
|
23
|
+
* Tooltip text to display on hover.
|
|
24
|
+
*/
|
|
25
|
+
tooltipText: PropTypes.string.isRequired
|
|
17
26
|
};
|
|
18
27
|
|
|
19
28
|
/**
|
|
@@ -21,7 +30,9 @@ var propTypes = {
|
|
|
21
30
|
*/
|
|
22
31
|
var TableDragHandle = /*#__PURE__*/forwardRef(function TableDragHandle(_ref, ref) {
|
|
23
32
|
var onStartDrag = _ref.onStartDrag,
|
|
24
|
-
rowId = _ref.rowId
|
|
33
|
+
rowId = _ref.rowId,
|
|
34
|
+
isDragging = _ref.isDragging,
|
|
35
|
+
tooltipText = _ref.tooltipText;
|
|
25
36
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
26
37
|
className: "".concat(iotPrefix, "--table-drag-handle"),
|
|
27
38
|
ref: ref,
|
|
@@ -31,7 +42,18 @@ var TableDragHandle = /*#__PURE__*/forwardRef(function TableDragHandle(_ref, ref
|
|
|
31
42
|
e.stopPropagation();
|
|
32
43
|
onStartDrag(e, rowId);
|
|
33
44
|
}
|
|
34
|
-
},
|
|
45
|
+
}, isDragging ?
|
|
46
|
+
/*#__PURE__*/
|
|
47
|
+
// During drag, render icon without tooltip
|
|
48
|
+
React__default.createElement("div", {
|
|
49
|
+
className: "".concat(iotPrefix, "--table-drag-handle-icon")
|
|
50
|
+
}, /*#__PURE__*/React__default.createElement(Draggable, null)) :
|
|
51
|
+
/*#__PURE__*/
|
|
52
|
+
// When not dragging, render with tooltip
|
|
53
|
+
React__default.createElement(Tooltip, {
|
|
54
|
+
label: tooltipText,
|
|
55
|
+
autoAlign: true
|
|
56
|
+
}, /*#__PURE__*/React__default.createElement(Draggable, null)));
|
|
35
57
|
});
|
|
36
58
|
TableDragHandle.propTypes = propTypes;
|
|
37
59
|
TableDragHandle.__docgenInfo = {
|
|
@@ -52,6 +74,20 @@ TableDragHandle.__docgenInfo = {
|
|
|
52
74
|
"name": "string"
|
|
53
75
|
},
|
|
54
76
|
"required": true
|
|
77
|
+
},
|
|
78
|
+
"isDragging": {
|
|
79
|
+
"description": "If a drag operation is currently in progress. When true, the tooltip is hidden.",
|
|
80
|
+
"type": {
|
|
81
|
+
"name": "bool"
|
|
82
|
+
},
|
|
83
|
+
"required": true
|
|
84
|
+
},
|
|
85
|
+
"tooltipText": {
|
|
86
|
+
"description": "Tooltip text to display on hover.",
|
|
87
|
+
"type": {
|
|
88
|
+
"name": "string"
|
|
89
|
+
},
|
|
90
|
+
"required": true
|
|
55
91
|
}
|
|
56
92
|
}
|
|
57
93
|
};
|
|
@@ -54,6 +54,10 @@ var propTypes = {
|
|
|
54
54
|
dismissText: PropTypes.string,
|
|
55
55
|
/** I18N label for load more */
|
|
56
56
|
loadMoreText: PropTypes.string,
|
|
57
|
+
/** I18N label for drag handle tooltip */
|
|
58
|
+
dragHandleTooltip: PropTypes.string,
|
|
59
|
+
/** If a drag is currently in progress */
|
|
60
|
+
isDragging: PropTypes.bool,
|
|
57
61
|
/** since some columns might not be currently visible */
|
|
58
62
|
totalColumns: PropTypes.number,
|
|
59
63
|
hasRowSelection: PropTypes.oneOf(['multi', 'single', false]),
|
|
@@ -137,6 +141,7 @@ var defaultProps = {
|
|
|
137
141
|
clickToExpandAria: 'Click to expand.',
|
|
138
142
|
columns: [],
|
|
139
143
|
dismissText: 'Dismiss',
|
|
144
|
+
dragHandleTooltip: 'Click and drag to new location',
|
|
140
145
|
expandedIds: [],
|
|
141
146
|
expandedRows: [],
|
|
142
147
|
hasRowActions: false,
|
|
@@ -146,6 +151,7 @@ var defaultProps = {
|
|
|
146
151
|
useRadioButtonSingleSelect: false,
|
|
147
152
|
indeterminateSelectionIds: [],
|
|
148
153
|
inProgressText: 'In progress',
|
|
154
|
+
isDragging: false,
|
|
149
155
|
langDir: 'ltr',
|
|
150
156
|
learnMoreText: 'Learn more',
|
|
151
157
|
loadingMoreIds: [],
|
|
@@ -184,6 +190,7 @@ function TableBodyRowRenderer(props) {
|
|
|
184
190
|
clickToExpandAria = props.clickToExpandAria,
|
|
185
191
|
columns = props.columns,
|
|
186
192
|
dismissText = props.dismissText,
|
|
193
|
+
dragHandleTooltip = props.dragHandleTooltip,
|
|
187
194
|
expandedIds = props.expandedIds,
|
|
188
195
|
expandedRows = props.expandedRows,
|
|
189
196
|
hasRowActions = props.hasRowActions,
|
|
@@ -193,6 +200,7 @@ function TableBodyRowRenderer(props) {
|
|
|
193
200
|
useRadioButtonSingleSelect = props.useRadioButtonSingleSelect,
|
|
194
201
|
indeterminateSelectionIds = props.indeterminateSelectionIds,
|
|
195
202
|
inProgressText = props.inProgressText,
|
|
203
|
+
isDragging = props.isDragging,
|
|
196
204
|
langDir = props.langDir,
|
|
197
205
|
learnMoreText = props.learnMoreText,
|
|
198
206
|
loadingMoreIds = props.loadingMoreIds,
|
|
@@ -262,6 +270,8 @@ function TableBodyRowRenderer(props) {
|
|
|
262
270
|
onDragEnterRow: canDrop ? onDragEnterRow : null,
|
|
263
271
|
onDragLeaveRow: canDrop ? onDragLeaveRow : null,
|
|
264
272
|
isDragRow: dragRowIds.indexOf(row.id) !== -1,
|
|
273
|
+
isDragging: isDragging,
|
|
274
|
+
dragHandleTooltip: dragHandleTooltip,
|
|
265
275
|
langDir: langDir,
|
|
266
276
|
key: row.id,
|
|
267
277
|
isExpanded: isRowExpanded,
|
|
@@ -422,6 +432,17 @@ TableBodyRowRenderer.__docgenInfo = {
|
|
|
422
432
|
},
|
|
423
433
|
"required": false
|
|
424
434
|
},
|
|
435
|
+
"dragHandleTooltip": {
|
|
436
|
+
"defaultValue": {
|
|
437
|
+
"value": "'Click and drag to new location'",
|
|
438
|
+
"computed": false
|
|
439
|
+
},
|
|
440
|
+
"description": "I18N label for drag handle tooltip",
|
|
441
|
+
"type": {
|
|
442
|
+
"name": "string"
|
|
443
|
+
},
|
|
444
|
+
"required": false
|
|
445
|
+
},
|
|
425
446
|
"expandedIds": {
|
|
426
447
|
"defaultValue": {
|
|
427
448
|
"value": "[]",
|
|
@@ -550,6 +571,17 @@ TableBodyRowRenderer.__docgenInfo = {
|
|
|
550
571
|
},
|
|
551
572
|
"required": false
|
|
552
573
|
},
|
|
574
|
+
"isDragging": {
|
|
575
|
+
"defaultValue": {
|
|
576
|
+
"value": "false",
|
|
577
|
+
"computed": false
|
|
578
|
+
},
|
|
579
|
+
"description": "If a drag is currently in progress",
|
|
580
|
+
"type": {
|
|
581
|
+
"name": "bool"
|
|
582
|
+
},
|
|
583
|
+
"required": false
|
|
584
|
+
},
|
|
553
585
|
"langDir": {
|
|
554
586
|
"defaultValue": {
|
|
555
587
|
"value": "'ltr'",
|
|
@@ -611,6 +611,7 @@ var defaultProps = function defaultProps(baseProps) {
|
|
|
611
611
|
multiSortDescending: 'Descending',
|
|
612
612
|
multiSortOverflowItem: 'Multi-sort',
|
|
613
613
|
multiSortDragHandle: 'Drag handle',
|
|
614
|
+
dragHandleTooltip: 'Click and drag to new location',
|
|
614
615
|
// table error state
|
|
615
616
|
tableErrorStateTitle: 'Unable to load the page',
|
|
616
617
|
buttonLabelOnTableError: 'Refresh the page',
|
|
@@ -1026,7 +1027,7 @@ var Table = function Table(props) {
|
|
|
1026
1027
|
selectedIds: view.table.selectedIds,
|
|
1027
1028
|
loadingMoreIds: view.table.loadingMoreIds,
|
|
1028
1029
|
zIndex: zIndex
|
|
1029
|
-
}, pick(i18n, 'overflowMenuAria', 'clickToExpandAria', 'clickToCollapseAria', 'inProgressText', 'actionFailedText', 'learnMoreText', 'dismissText', 'selectRowAria', 'loadMoreText'), {
|
|
1030
|
+
}, pick(i18n, 'overflowMenuAria', 'clickToExpandAria', 'clickToCollapseAria', 'inProgressText', 'actionFailedText', 'learnMoreText', 'dismissText', 'selectRowAria', 'loadMoreText', 'dragHandleTooltip'), {
|
|
1030
1031
|
totalColumns: totalColumns
|
|
1031
1032
|
}, pick(options, 'hasRowSelection', 'hasRowActions', 'hasRowNesting', 'shouldExpandOnRowClick', 'shouldLazyRender', 'preserveCellWhiteSpace', 'useRadioButtonSingleSelect', 'hasDragAndDrop', 'hasBreadcrumbDrop'), {
|
|
1032
1033
|
hideDragHandles: hideDragHandles,
|
|
@@ -67,6 +67,8 @@ var propTypes = {
|
|
|
67
67
|
dismissText: PropTypes__default.default.string,
|
|
68
68
|
/** I18N label for load more */
|
|
69
69
|
loadMoreText: PropTypes__default.default.string,
|
|
70
|
+
/** I18N label for drag handle tooltip */
|
|
71
|
+
dragHandleTooltip: PropTypes__default.default.string,
|
|
70
72
|
/** since some columns might not be currently visible */
|
|
71
73
|
totalColumns: PropTypes__default.default.number,
|
|
72
74
|
hasRowSelection: PropTypes__default.default.oneOf(['multi', 'single', false]),
|
|
@@ -164,6 +166,7 @@ var defaultProps = {
|
|
|
164
166
|
inProgressText: 'In progress',
|
|
165
167
|
dismissText: 'Dismiss',
|
|
166
168
|
actionFailedText: 'Action failed',
|
|
169
|
+
dragHandleTooltip: 'Click and drag to new location',
|
|
167
170
|
size: undefined,
|
|
168
171
|
hasDragAndDrop: false,
|
|
169
172
|
hasBreadcrumbDrop: false,
|
|
@@ -189,6 +192,7 @@ var TableBody = function TableBody(_ref) {
|
|
|
189
192
|
dismissText = _ref.dismissText,
|
|
190
193
|
actionFailedText = _ref.actionFailedText,
|
|
191
194
|
loadMoreText = _ref.loadMoreText,
|
|
195
|
+
dragHandleTooltip = _ref.dragHandleTooltip,
|
|
192
196
|
totalColumns = _ref.totalColumns,
|
|
193
197
|
actions = _ref.actions,
|
|
194
198
|
rowActionsState = _ref.rowActionsState,
|
|
@@ -330,6 +334,7 @@ var TableBody = function TableBody(_ref) {
|
|
|
330
334
|
clickToExpandAria: clickToExpandAria,
|
|
331
335
|
columns: columns,
|
|
332
336
|
dismissText: dismissText,
|
|
337
|
+
dragHandleTooltip: dragHandleTooltip,
|
|
333
338
|
expandedIds: expandedIds,
|
|
334
339
|
expandedRows: expandedRows,
|
|
335
340
|
hasRowActions: hasRowActions,
|
|
@@ -339,6 +344,7 @@ var TableBody = function TableBody(_ref) {
|
|
|
339
344
|
useRadioButtonSingleSelect: useRadioButtonSingleSelect,
|
|
340
345
|
indeterminateSelectionIds: getIndeterminateRowSelectionIds(rows, selectedIds),
|
|
341
346
|
inProgressText: inProgressText,
|
|
347
|
+
isDragging: isDragging,
|
|
342
348
|
langDir: langDir,
|
|
343
349
|
learnMoreText: learnMoreText,
|
|
344
350
|
loadingMoreIds: loadingMoreIds,
|
|
@@ -766,6 +772,17 @@ TableBody.__docgenInfo = {
|
|
|
766
772
|
},
|
|
767
773
|
"required": false
|
|
768
774
|
},
|
|
775
|
+
"dragHandleTooltip": {
|
|
776
|
+
"defaultValue": {
|
|
777
|
+
"value": "'Click and drag to new location'",
|
|
778
|
+
"computed": false
|
|
779
|
+
},
|
|
780
|
+
"description": "I18N label for drag handle tooltip",
|
|
781
|
+
"type": {
|
|
782
|
+
"name": "string"
|
|
783
|
+
},
|
|
784
|
+
"required": false
|
|
785
|
+
},
|
|
769
786
|
"size": {
|
|
770
787
|
"defaultValue": {
|
|
771
788
|
"value": "undefined",
|
|
@@ -56,6 +56,8 @@ var propTypes = {
|
|
|
56
56
|
clickToExpandAria: PropTypes__default.default.string,
|
|
57
57
|
/** internationalized label */
|
|
58
58
|
clickToCollapseAria: PropTypes__default.default.string,
|
|
59
|
+
/** I18N label for drag handle tooltip */
|
|
60
|
+
dragHandleTooltip: PropTypes__default.default.string,
|
|
59
61
|
/** List of columns */
|
|
60
62
|
columns: TablePropTypes.TableColumnsPropTypes.isRequired,
|
|
61
63
|
/** table wide options */
|
|
@@ -147,6 +149,8 @@ var propTypes = {
|
|
|
147
149
|
isDraggable: PropTypes__default.default.bool,
|
|
148
150
|
/** If this row is being dragged. */
|
|
149
151
|
isDragRow: PropTypes__default.default.bool,
|
|
152
|
+
/** If a drag operation is currently in progress. */
|
|
153
|
+
isDragging: PropTypes__default.default.bool,
|
|
150
154
|
/** If all drag handles should be hidden. This happens when an undraggable row is in the selection. */
|
|
151
155
|
hideDragHandles: PropTypes__default.default.bool,
|
|
152
156
|
/** Attribute name to identify deleted rows */
|
|
@@ -160,6 +164,7 @@ var defaultProps = {
|
|
|
160
164
|
overflowMenuAria: 'More actions',
|
|
161
165
|
clickToExpandAria: 'Click to expand.',
|
|
162
166
|
clickToCollapseAria: 'Click to collapse.',
|
|
167
|
+
dragHandleTooltip: 'Click and drag to new location',
|
|
163
168
|
rowActions: null,
|
|
164
169
|
rowDetails: null,
|
|
165
170
|
nestingLevel: 0,
|
|
@@ -187,6 +192,7 @@ var defaultProps = {
|
|
|
187
192
|
onDragLeaveRow: null,
|
|
188
193
|
isDraggable: false,
|
|
189
194
|
isDragRow: false,
|
|
195
|
+
isDragging: false,
|
|
190
196
|
deletedAttribute: '_deleted'
|
|
191
197
|
};
|
|
192
198
|
var TableBodyRow = function TableBodyRow(_ref) {
|
|
@@ -220,6 +226,7 @@ var TableBodyRow = function TableBodyRow(_ref) {
|
|
|
220
226
|
overflowMenuAria = _ref.overflowMenuAria,
|
|
221
227
|
clickToExpandAria = _ref.clickToExpandAria,
|
|
222
228
|
clickToCollapseAria = _ref.clickToCollapseAria,
|
|
229
|
+
dragHandleTooltip = _ref.dragHandleTooltip,
|
|
223
230
|
inProgressText = _ref.inProgressText,
|
|
224
231
|
actionFailedText = _ref.actionFailedText,
|
|
225
232
|
learnMoreText = _ref.learnMoreText,
|
|
@@ -243,6 +250,7 @@ var TableBodyRow = function TableBodyRow(_ref) {
|
|
|
243
250
|
onDragLeaveRow = _ref.onDragLeaveRow,
|
|
244
251
|
isDragRow = _ref.isDragRow,
|
|
245
252
|
isDraggable = _ref.isDraggable,
|
|
253
|
+
isDragging = _ref.isDragging,
|
|
246
254
|
hasDragAndDrop = _ref.hasDragAndDrop,
|
|
247
255
|
hideDragHandles = _ref.hideDragHandles,
|
|
248
256
|
deletedAttribute = _ref.deletedAttribute;
|
|
@@ -299,7 +307,9 @@ var TableBodyRow = function TableBodyRow(_ref) {
|
|
|
299
307
|
className: "".concat(iotPrefix, "--table-grab-handle-cell")
|
|
300
308
|
}, !isDraggable || hideDragHandles ? null : /*#__PURE__*/React__default.default.createElement(TableDragHandle.TableDragHandle, {
|
|
301
309
|
onStartDrag: onStartDrag,
|
|
302
|
-
rowId: id
|
|
310
|
+
rowId: id,
|
|
311
|
+
isDragging: isDragging,
|
|
312
|
+
tooltipText: dragHandleTooltip
|
|
303
313
|
}));
|
|
304
314
|
var firstVisibleColIndex = ordering.findIndex(function (col) {
|
|
305
315
|
return !col.isHidden;
|
|
@@ -558,6 +568,17 @@ TableBodyRow.__docgenInfo = {
|
|
|
558
568
|
},
|
|
559
569
|
"required": false
|
|
560
570
|
},
|
|
571
|
+
"dragHandleTooltip": {
|
|
572
|
+
"defaultValue": {
|
|
573
|
+
"value": "'Click and drag to new location'",
|
|
574
|
+
"computed": false
|
|
575
|
+
},
|
|
576
|
+
"description": "I18N label for drag handle tooltip",
|
|
577
|
+
"type": {
|
|
578
|
+
"name": "string"
|
|
579
|
+
},
|
|
580
|
+
"required": false
|
|
581
|
+
},
|
|
561
582
|
"rowActions": {
|
|
562
583
|
"defaultValue": {
|
|
563
584
|
"value": "null",
|
|
@@ -947,6 +968,17 @@ TableBodyRow.__docgenInfo = {
|
|
|
947
968
|
},
|
|
948
969
|
"required": false
|
|
949
970
|
},
|
|
971
|
+
"isDragging": {
|
|
972
|
+
"defaultValue": {
|
|
973
|
+
"value": "false",
|
|
974
|
+
"computed": false
|
|
975
|
+
},
|
|
976
|
+
"description": "If a drag operation is currently in progress.",
|
|
977
|
+
"type": {
|
|
978
|
+
"name": "bool"
|
|
979
|
+
},
|
|
980
|
+
"required": false
|
|
981
|
+
},
|
|
950
982
|
"deletedAttribute": {
|
|
951
983
|
"defaultValue": {
|
|
952
984
|
"value": "'_deleted'",
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var PropTypes = require('prop-types');
|
|
5
|
+
var react = require('@carbon/react');
|
|
5
6
|
var Settings = require('../../../../constants/Settings.js');
|
|
6
7
|
var iconsReact = require('@carbon/icons-react');
|
|
7
8
|
|
|
@@ -20,7 +21,15 @@ var propTypes = {
|
|
|
20
21
|
/**
|
|
21
22
|
* The ID of the table row this handle is it. This is the row that will be dragged by this handle.
|
|
22
23
|
*/
|
|
23
|
-
rowId: PropTypes__default.default.string.isRequired
|
|
24
|
+
rowId: PropTypes__default.default.string.isRequired,
|
|
25
|
+
/**
|
|
26
|
+
* If a drag operation is currently in progress. When true, the tooltip is hidden.
|
|
27
|
+
*/
|
|
28
|
+
isDragging: PropTypes__default.default.bool.isRequired,
|
|
29
|
+
/**
|
|
30
|
+
* Tooltip text to display on hover.
|
|
31
|
+
*/
|
|
32
|
+
tooltipText: PropTypes__default.default.string.isRequired
|
|
24
33
|
};
|
|
25
34
|
|
|
26
35
|
/**
|
|
@@ -28,7 +37,9 @@ var propTypes = {
|
|
|
28
37
|
*/
|
|
29
38
|
var TableDragHandle = /*#__PURE__*/React.forwardRef(function TableDragHandle(_ref, ref) {
|
|
30
39
|
var onStartDrag = _ref.onStartDrag,
|
|
31
|
-
rowId = _ref.rowId
|
|
40
|
+
rowId = _ref.rowId,
|
|
41
|
+
isDragging = _ref.isDragging,
|
|
42
|
+
tooltipText = _ref.tooltipText;
|
|
32
43
|
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
33
44
|
className: "".concat(iotPrefix, "--table-drag-handle"),
|
|
34
45
|
ref: ref,
|
|
@@ -38,7 +49,18 @@ var TableDragHandle = /*#__PURE__*/React.forwardRef(function TableDragHandle(_re
|
|
|
38
49
|
e.stopPropagation();
|
|
39
50
|
onStartDrag(e, rowId);
|
|
40
51
|
}
|
|
41
|
-
},
|
|
52
|
+
}, isDragging ?
|
|
53
|
+
/*#__PURE__*/
|
|
54
|
+
// During drag, render icon without tooltip
|
|
55
|
+
React__default.default.createElement("div", {
|
|
56
|
+
className: "".concat(iotPrefix, "--table-drag-handle-icon")
|
|
57
|
+
}, /*#__PURE__*/React__default.default.createElement(iconsReact.Draggable, null)) :
|
|
58
|
+
/*#__PURE__*/
|
|
59
|
+
// When not dragging, render with tooltip
|
|
60
|
+
React__default.default.createElement(react.Tooltip, {
|
|
61
|
+
label: tooltipText,
|
|
62
|
+
autoAlign: true
|
|
63
|
+
}, /*#__PURE__*/React__default.default.createElement(iconsReact.Draggable, null)));
|
|
42
64
|
});
|
|
43
65
|
TableDragHandle.propTypes = propTypes;
|
|
44
66
|
TableDragHandle.__docgenInfo = {
|
|
@@ -59,6 +81,20 @@ TableDragHandle.__docgenInfo = {
|
|
|
59
81
|
"name": "string"
|
|
60
82
|
},
|
|
61
83
|
"required": true
|
|
84
|
+
},
|
|
85
|
+
"isDragging": {
|
|
86
|
+
"description": "If a drag operation is currently in progress. When true, the tooltip is hidden.",
|
|
87
|
+
"type": {
|
|
88
|
+
"name": "bool"
|
|
89
|
+
},
|
|
90
|
+
"required": true
|
|
91
|
+
},
|
|
92
|
+
"tooltipText": {
|
|
93
|
+
"description": "Tooltip text to display on hover.",
|
|
94
|
+
"type": {
|
|
95
|
+
"name": "string"
|
|
96
|
+
},
|
|
97
|
+
"required": true
|
|
62
98
|
}
|
|
63
99
|
}
|
|
64
100
|
};
|
|
@@ -64,6 +64,10 @@ var propTypes = {
|
|
|
64
64
|
dismissText: PropTypes__default.default.string,
|
|
65
65
|
/** I18N label for load more */
|
|
66
66
|
loadMoreText: PropTypes__default.default.string,
|
|
67
|
+
/** I18N label for drag handle tooltip */
|
|
68
|
+
dragHandleTooltip: PropTypes__default.default.string,
|
|
69
|
+
/** If a drag is currently in progress */
|
|
70
|
+
isDragging: PropTypes__default.default.bool,
|
|
67
71
|
/** since some columns might not be currently visible */
|
|
68
72
|
totalColumns: PropTypes__default.default.number,
|
|
69
73
|
hasRowSelection: PropTypes__default.default.oneOf(['multi', 'single', false]),
|
|
@@ -147,6 +151,7 @@ var defaultProps = {
|
|
|
147
151
|
clickToExpandAria: 'Click to expand.',
|
|
148
152
|
columns: [],
|
|
149
153
|
dismissText: 'Dismiss',
|
|
154
|
+
dragHandleTooltip: 'Click and drag to new location',
|
|
150
155
|
expandedIds: [],
|
|
151
156
|
expandedRows: [],
|
|
152
157
|
hasRowActions: false,
|
|
@@ -156,6 +161,7 @@ var defaultProps = {
|
|
|
156
161
|
useRadioButtonSingleSelect: false,
|
|
157
162
|
indeterminateSelectionIds: [],
|
|
158
163
|
inProgressText: 'In progress',
|
|
164
|
+
isDragging: false,
|
|
159
165
|
langDir: 'ltr',
|
|
160
166
|
learnMoreText: 'Learn more',
|
|
161
167
|
loadingMoreIds: [],
|
|
@@ -194,6 +200,7 @@ function TableBodyRowRenderer(props) {
|
|
|
194
200
|
clickToExpandAria = props.clickToExpandAria,
|
|
195
201
|
columns = props.columns,
|
|
196
202
|
dismissText = props.dismissText,
|
|
203
|
+
dragHandleTooltip = props.dragHandleTooltip,
|
|
197
204
|
expandedIds = props.expandedIds,
|
|
198
205
|
expandedRows = props.expandedRows,
|
|
199
206
|
hasRowActions = props.hasRowActions,
|
|
@@ -203,6 +210,7 @@ function TableBodyRowRenderer(props) {
|
|
|
203
210
|
useRadioButtonSingleSelect = props.useRadioButtonSingleSelect,
|
|
204
211
|
indeterminateSelectionIds = props.indeterminateSelectionIds,
|
|
205
212
|
inProgressText = props.inProgressText,
|
|
213
|
+
isDragging = props.isDragging,
|
|
206
214
|
langDir = props.langDir,
|
|
207
215
|
learnMoreText = props.learnMoreText,
|
|
208
216
|
loadingMoreIds = props.loadingMoreIds,
|
|
@@ -272,6 +280,8 @@ function TableBodyRowRenderer(props) {
|
|
|
272
280
|
onDragEnterRow: canDrop ? onDragEnterRow : null,
|
|
273
281
|
onDragLeaveRow: canDrop ? onDragLeaveRow : null,
|
|
274
282
|
isDragRow: dragRowIds.indexOf(row.id) !== -1,
|
|
283
|
+
isDragging: isDragging,
|
|
284
|
+
dragHandleTooltip: dragHandleTooltip,
|
|
275
285
|
langDir: langDir,
|
|
276
286
|
key: row.id,
|
|
277
287
|
isExpanded: isRowExpanded,
|
|
@@ -432,6 +442,17 @@ TableBodyRowRenderer.__docgenInfo = {
|
|
|
432
442
|
},
|
|
433
443
|
"required": false
|
|
434
444
|
},
|
|
445
|
+
"dragHandleTooltip": {
|
|
446
|
+
"defaultValue": {
|
|
447
|
+
"value": "'Click and drag to new location'",
|
|
448
|
+
"computed": false
|
|
449
|
+
},
|
|
450
|
+
"description": "I18N label for drag handle tooltip",
|
|
451
|
+
"type": {
|
|
452
|
+
"name": "string"
|
|
453
|
+
},
|
|
454
|
+
"required": false
|
|
455
|
+
},
|
|
435
456
|
"expandedIds": {
|
|
436
457
|
"defaultValue": {
|
|
437
458
|
"value": "[]",
|
|
@@ -560,6 +581,17 @@ TableBodyRowRenderer.__docgenInfo = {
|
|
|
560
581
|
},
|
|
561
582
|
"required": false
|
|
562
583
|
},
|
|
584
|
+
"isDragging": {
|
|
585
|
+
"defaultValue": {
|
|
586
|
+
"value": "false",
|
|
587
|
+
"computed": false
|
|
588
|
+
},
|
|
589
|
+
"description": "If a drag is currently in progress",
|
|
590
|
+
"type": {
|
|
591
|
+
"name": "bool"
|
|
592
|
+
},
|
|
593
|
+
"required": false
|
|
594
|
+
},
|
|
563
595
|
"langDir": {
|
|
564
596
|
"defaultValue": {
|
|
565
597
|
"value": "'ltr'",
|
package/package.json
CHANGED
|
@@ -219011,7 +219011,15 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
219011
219011
|
/**
|
|
219012
219012
|
* The ID of the table row this handle is it. This is the row that will be dragged by this handle.
|
|
219013
219013
|
*/
|
|
219014
|
-
rowId: PropTypes.string.isRequired
|
|
219014
|
+
rowId: PropTypes.string.isRequired,
|
|
219015
|
+
/**
|
|
219016
|
+
* If a drag operation is currently in progress. When true, the tooltip is hidden.
|
|
219017
|
+
*/
|
|
219018
|
+
isDragging: PropTypes.bool.isRequired,
|
|
219019
|
+
/**
|
|
219020
|
+
* Tooltip text to display on hover.
|
|
219021
|
+
*/
|
|
219022
|
+
tooltipText: PropTypes.string.isRequired
|
|
219015
219023
|
};
|
|
219016
219024
|
|
|
219017
219025
|
/**
|
|
@@ -219019,7 +219027,9 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
219019
219027
|
*/
|
|
219020
219028
|
var TableDragHandle = /*#__PURE__*/React$1.forwardRef(function TableDragHandle(_ref, ref) {
|
|
219021
219029
|
var onStartDrag = _ref.onStartDrag,
|
|
219022
|
-
rowId = _ref.rowId
|
|
219030
|
+
rowId = _ref.rowId,
|
|
219031
|
+
isDragging = _ref.isDragging,
|
|
219032
|
+
tooltipText = _ref.tooltipText;
|
|
219023
219033
|
return /*#__PURE__*/React$1.createElement("div", {
|
|
219024
219034
|
className: "".concat(iotPrefix$1$, "--table-drag-handle"),
|
|
219025
219035
|
ref: ref,
|
|
@@ -219029,7 +219039,18 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
219029
219039
|
e.stopPropagation();
|
|
219030
219040
|
onStartDrag(e, rowId);
|
|
219031
219041
|
}
|
|
219032
|
-
},
|
|
219042
|
+
}, isDragging ?
|
|
219043
|
+
/*#__PURE__*/
|
|
219044
|
+
// During drag, render icon without tooltip
|
|
219045
|
+
React$1.createElement("div", {
|
|
219046
|
+
className: "".concat(iotPrefix$1$, "--table-drag-handle-icon")
|
|
219047
|
+
}, /*#__PURE__*/React$1.createElement(iconsReact.Draggable, null)) :
|
|
219048
|
+
/*#__PURE__*/
|
|
219049
|
+
// When not dragging, render with tooltip
|
|
219050
|
+
React$1.createElement(react.Tooltip, {
|
|
219051
|
+
label: tooltipText,
|
|
219052
|
+
autoAlign: true
|
|
219053
|
+
}, /*#__PURE__*/React$1.createElement(iconsReact.Draggable, null)));
|
|
219033
219054
|
});
|
|
219034
219055
|
TableDragHandle.propTypes = propTypes$25;
|
|
219035
219056
|
TableDragHandle.__docgenInfo = {
|
|
@@ -219050,6 +219071,20 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
219050
219071
|
"name": "string"
|
|
219051
219072
|
},
|
|
219052
219073
|
"required": true
|
|
219074
|
+
},
|
|
219075
|
+
"isDragging": {
|
|
219076
|
+
"description": "If a drag operation is currently in progress. When true, the tooltip is hidden.",
|
|
219077
|
+
"type": {
|
|
219078
|
+
"name": "bool"
|
|
219079
|
+
},
|
|
219080
|
+
"required": true
|
|
219081
|
+
},
|
|
219082
|
+
"tooltipText": {
|
|
219083
|
+
"description": "Tooltip text to display on hover.",
|
|
219084
|
+
"type": {
|
|
219085
|
+
"name": "string"
|
|
219086
|
+
},
|
|
219087
|
+
"required": true
|
|
219053
219088
|
}
|
|
219054
219089
|
}
|
|
219055
219090
|
};
|
|
@@ -219079,6 +219114,8 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
219079
219114
|
clickToExpandAria: PropTypes.string,
|
|
219080
219115
|
/** internationalized label */
|
|
219081
219116
|
clickToCollapseAria: PropTypes.string,
|
|
219117
|
+
/** I18N label for drag handle tooltip */
|
|
219118
|
+
dragHandleTooltip: PropTypes.string,
|
|
219082
219119
|
/** List of columns */
|
|
219083
219120
|
columns: TableColumnsPropTypes.isRequired,
|
|
219084
219121
|
/** table wide options */
|
|
@@ -219170,6 +219207,8 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
219170
219207
|
isDraggable: PropTypes.bool,
|
|
219171
219208
|
/** If this row is being dragged. */
|
|
219172
219209
|
isDragRow: PropTypes.bool,
|
|
219210
|
+
/** If a drag operation is currently in progress. */
|
|
219211
|
+
isDragging: PropTypes.bool,
|
|
219173
219212
|
/** If all drag handles should be hidden. This happens when an undraggable row is in the selection. */
|
|
219174
219213
|
hideDragHandles: PropTypes.bool,
|
|
219175
219214
|
/** Attribute name to identify deleted rows */
|
|
@@ -219183,6 +219222,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
219183
219222
|
overflowMenuAria: 'More actions',
|
|
219184
219223
|
clickToExpandAria: 'Click to expand.',
|
|
219185
219224
|
clickToCollapseAria: 'Click to collapse.',
|
|
219225
|
+
dragHandleTooltip: 'Click and drag to new location',
|
|
219186
219226
|
rowActions: null,
|
|
219187
219227
|
rowDetails: null,
|
|
219188
219228
|
nestingLevel: 0,
|
|
@@ -219210,6 +219250,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
219210
219250
|
onDragLeaveRow: null,
|
|
219211
219251
|
isDraggable: false,
|
|
219212
219252
|
isDragRow: false,
|
|
219253
|
+
isDragging: false,
|
|
219213
219254
|
deletedAttribute: '_deleted'
|
|
219214
219255
|
};
|
|
219215
219256
|
var TableBodyRow = function TableBodyRow(_ref) {
|
|
@@ -219243,6 +219284,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
219243
219284
|
overflowMenuAria = _ref.overflowMenuAria,
|
|
219244
219285
|
clickToExpandAria = _ref.clickToExpandAria,
|
|
219245
219286
|
clickToCollapseAria = _ref.clickToCollapseAria,
|
|
219287
|
+
dragHandleTooltip = _ref.dragHandleTooltip,
|
|
219246
219288
|
inProgressText = _ref.inProgressText,
|
|
219247
219289
|
actionFailedText = _ref.actionFailedText,
|
|
219248
219290
|
learnMoreText = _ref.learnMoreText,
|
|
@@ -219266,6 +219308,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
219266
219308
|
onDragLeaveRow = _ref.onDragLeaveRow,
|
|
219267
219309
|
isDragRow = _ref.isDragRow,
|
|
219268
219310
|
isDraggable = _ref.isDraggable,
|
|
219311
|
+
isDragging = _ref.isDragging,
|
|
219269
219312
|
hasDragAndDrop = _ref.hasDragAndDrop,
|
|
219270
219313
|
hideDragHandles = _ref.hideDragHandles,
|
|
219271
219314
|
deletedAttribute = _ref.deletedAttribute;
|
|
@@ -219322,7 +219365,9 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
219322
219365
|
className: "".concat(iotPrefix$1_, "--table-grab-handle-cell")
|
|
219323
219366
|
}, !isDraggable || hideDragHandles ? null : /*#__PURE__*/React$1.createElement(TableDragHandle, {
|
|
219324
219367
|
onStartDrag: onStartDrag,
|
|
219325
|
-
rowId: id
|
|
219368
|
+
rowId: id,
|
|
219369
|
+
isDragging: isDragging,
|
|
219370
|
+
tooltipText: dragHandleTooltip
|
|
219326
219371
|
}));
|
|
219327
219372
|
var firstVisibleColIndex = ordering.findIndex(function (col) {
|
|
219328
219373
|
return !col.isHidden;
|
|
@@ -219581,6 +219626,17 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
219581
219626
|
},
|
|
219582
219627
|
"required": false
|
|
219583
219628
|
},
|
|
219629
|
+
"dragHandleTooltip": {
|
|
219630
|
+
"defaultValue": {
|
|
219631
|
+
"value": "'Click and drag to new location'",
|
|
219632
|
+
"computed": false
|
|
219633
|
+
},
|
|
219634
|
+
"description": "I18N label for drag handle tooltip",
|
|
219635
|
+
"type": {
|
|
219636
|
+
"name": "string"
|
|
219637
|
+
},
|
|
219638
|
+
"required": false
|
|
219639
|
+
},
|
|
219584
219640
|
"rowActions": {
|
|
219585
219641
|
"defaultValue": {
|
|
219586
219642
|
"value": "null",
|
|
@@ -219970,6 +220026,17 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
219970
220026
|
},
|
|
219971
220027
|
"required": false
|
|
219972
220028
|
},
|
|
220029
|
+
"isDragging": {
|
|
220030
|
+
"defaultValue": {
|
|
220031
|
+
"value": "false",
|
|
220032
|
+
"computed": false
|
|
220033
|
+
},
|
|
220034
|
+
"description": "If a drag operation is currently in progress.",
|
|
220035
|
+
"type": {
|
|
220036
|
+
"name": "bool"
|
|
220037
|
+
},
|
|
220038
|
+
"required": false
|
|
220039
|
+
},
|
|
219973
220040
|
"deletedAttribute": {
|
|
219974
220041
|
"defaultValue": {
|
|
219975
220042
|
"value": "'_deleted'",
|
|
@@ -220570,6 +220637,10 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
220570
220637
|
dismissText: PropTypes.string,
|
|
220571
220638
|
/** I18N label for load more */
|
|
220572
220639
|
loadMoreText: PropTypes.string,
|
|
220640
|
+
/** I18N label for drag handle tooltip */
|
|
220641
|
+
dragHandleTooltip: PropTypes.string,
|
|
220642
|
+
/** If a drag is currently in progress */
|
|
220643
|
+
isDragging: PropTypes.bool,
|
|
220573
220644
|
/** since some columns might not be currently visible */
|
|
220574
220645
|
totalColumns: PropTypes.number,
|
|
220575
220646
|
hasRowSelection: PropTypes.oneOf(['multi', 'single', false]),
|
|
@@ -220653,6 +220724,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
220653
220724
|
clickToExpandAria: 'Click to expand.',
|
|
220654
220725
|
columns: [],
|
|
220655
220726
|
dismissText: 'Dismiss',
|
|
220727
|
+
dragHandleTooltip: 'Click and drag to new location',
|
|
220656
220728
|
expandedIds: [],
|
|
220657
220729
|
expandedRows: [],
|
|
220658
220730
|
hasRowActions: false,
|
|
@@ -220662,6 +220734,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
220662
220734
|
useRadioButtonSingleSelect: false,
|
|
220663
220735
|
indeterminateSelectionIds: [],
|
|
220664
220736
|
inProgressText: 'In progress',
|
|
220737
|
+
isDragging: false,
|
|
220665
220738
|
langDir: 'ltr',
|
|
220666
220739
|
learnMoreText: 'Learn more',
|
|
220667
220740
|
loadingMoreIds: [],
|
|
@@ -220700,6 +220773,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
220700
220773
|
clickToExpandAria = props.clickToExpandAria,
|
|
220701
220774
|
columns = props.columns,
|
|
220702
220775
|
dismissText = props.dismissText,
|
|
220776
|
+
dragHandleTooltip = props.dragHandleTooltip,
|
|
220703
220777
|
expandedIds = props.expandedIds,
|
|
220704
220778
|
expandedRows = props.expandedRows,
|
|
220705
220779
|
hasRowActions = props.hasRowActions,
|
|
@@ -220709,6 +220783,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
220709
220783
|
useRadioButtonSingleSelect = props.useRadioButtonSingleSelect,
|
|
220710
220784
|
indeterminateSelectionIds = props.indeterminateSelectionIds,
|
|
220711
220785
|
inProgressText = props.inProgressText,
|
|
220786
|
+
isDragging = props.isDragging,
|
|
220712
220787
|
langDir = props.langDir,
|
|
220713
220788
|
learnMoreText = props.learnMoreText,
|
|
220714
220789
|
loadingMoreIds = props.loadingMoreIds,
|
|
@@ -220778,6 +220853,8 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
220778
220853
|
onDragEnterRow: canDrop ? onDragEnterRow : null,
|
|
220779
220854
|
onDragLeaveRow: canDrop ? onDragLeaveRow : null,
|
|
220780
220855
|
isDragRow: dragRowIds.indexOf(row.id) !== -1,
|
|
220856
|
+
isDragging: isDragging,
|
|
220857
|
+
dragHandleTooltip: dragHandleTooltip,
|
|
220781
220858
|
langDir: langDir,
|
|
220782
220859
|
key: row.id,
|
|
220783
220860
|
isExpanded: isRowExpanded,
|
|
@@ -220938,6 +221015,17 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
220938
221015
|
},
|
|
220939
221016
|
"required": false
|
|
220940
221017
|
},
|
|
221018
|
+
"dragHandleTooltip": {
|
|
221019
|
+
"defaultValue": {
|
|
221020
|
+
"value": "'Click and drag to new location'",
|
|
221021
|
+
"computed": false
|
|
221022
|
+
},
|
|
221023
|
+
"description": "I18N label for drag handle tooltip",
|
|
221024
|
+
"type": {
|
|
221025
|
+
"name": "string"
|
|
221026
|
+
},
|
|
221027
|
+
"required": false
|
|
221028
|
+
},
|
|
220941
221029
|
"expandedIds": {
|
|
220942
221030
|
"defaultValue": {
|
|
220943
221031
|
"value": "[]",
|
|
@@ -221066,6 +221154,17 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
221066
221154
|
},
|
|
221067
221155
|
"required": false
|
|
221068
221156
|
},
|
|
221157
|
+
"isDragging": {
|
|
221158
|
+
"defaultValue": {
|
|
221159
|
+
"value": "false",
|
|
221160
|
+
"computed": false
|
|
221161
|
+
},
|
|
221162
|
+
"description": "If a drag is currently in progress",
|
|
221163
|
+
"type": {
|
|
221164
|
+
"name": "bool"
|
|
221165
|
+
},
|
|
221166
|
+
"required": false
|
|
221167
|
+
},
|
|
221069
221168
|
"langDir": {
|
|
221070
221169
|
"defaultValue": {
|
|
221071
221170
|
"value": "'ltr'",
|
|
@@ -222192,6 +222291,8 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
222192
222291
|
dismissText: PropTypes.string,
|
|
222193
222292
|
/** I18N label for load more */
|
|
222194
222293
|
loadMoreText: PropTypes.string,
|
|
222294
|
+
/** I18N label for drag handle tooltip */
|
|
222295
|
+
dragHandleTooltip: PropTypes.string,
|
|
222195
222296
|
/** since some columns might not be currently visible */
|
|
222196
222297
|
totalColumns: PropTypes.number,
|
|
222197
222298
|
hasRowSelection: PropTypes.oneOf(['multi', 'single', false]),
|
|
@@ -222289,6 +222390,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
222289
222390
|
inProgressText: 'In progress',
|
|
222290
222391
|
dismissText: 'Dismiss',
|
|
222291
222392
|
actionFailedText: 'Action failed',
|
|
222393
|
+
dragHandleTooltip: 'Click and drag to new location',
|
|
222292
222394
|
size: undefined,
|
|
222293
222395
|
hasDragAndDrop: false,
|
|
222294
222396
|
hasBreadcrumbDrop: false,
|
|
@@ -222314,6 +222416,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
222314
222416
|
dismissText = _ref.dismissText,
|
|
222315
222417
|
actionFailedText = _ref.actionFailedText,
|
|
222316
222418
|
loadMoreText = _ref.loadMoreText,
|
|
222419
|
+
dragHandleTooltip = _ref.dragHandleTooltip,
|
|
222317
222420
|
totalColumns = _ref.totalColumns,
|
|
222318
222421
|
actions = _ref.actions,
|
|
222319
222422
|
rowActionsState = _ref.rowActionsState,
|
|
@@ -222455,6 +222558,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
222455
222558
|
clickToExpandAria: clickToExpandAria,
|
|
222456
222559
|
columns: columns,
|
|
222457
222560
|
dismissText: dismissText,
|
|
222561
|
+
dragHandleTooltip: dragHandleTooltip,
|
|
222458
222562
|
expandedIds: expandedIds,
|
|
222459
222563
|
expandedRows: expandedRows,
|
|
222460
222564
|
hasRowActions: hasRowActions,
|
|
@@ -222464,6 +222568,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
222464
222568
|
useRadioButtonSingleSelect: useRadioButtonSingleSelect,
|
|
222465
222569
|
indeterminateSelectionIds: getIndeterminateRowSelectionIds(rows, selectedIds),
|
|
222466
222570
|
inProgressText: inProgressText,
|
|
222571
|
+
isDragging: isDragging,
|
|
222467
222572
|
langDir: langDir,
|
|
222468
222573
|
learnMoreText: learnMoreText,
|
|
222469
222574
|
loadingMoreIds: loadingMoreIds,
|
|
@@ -222891,6 +222996,17 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
222891
222996
|
},
|
|
222892
222997
|
"required": false
|
|
222893
222998
|
},
|
|
222999
|
+
"dragHandleTooltip": {
|
|
223000
|
+
"defaultValue": {
|
|
223001
|
+
"value": "'Click and drag to new location'",
|
|
223002
|
+
"computed": false
|
|
223003
|
+
},
|
|
223004
|
+
"description": "I18N label for drag handle tooltip",
|
|
223005
|
+
"type": {
|
|
223006
|
+
"name": "string"
|
|
223007
|
+
},
|
|
223008
|
+
"required": false
|
|
223009
|
+
},
|
|
222894
223010
|
"size": {
|
|
222895
223011
|
"defaultValue": {
|
|
222896
223012
|
"value": "undefined",
|
|
@@ -225243,6 +225359,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
225243
225359
|
multiSortDescending: 'Descending',
|
|
225244
225360
|
multiSortOverflowItem: 'Multi-sort',
|
|
225245
225361
|
multiSortDragHandle: 'Drag handle',
|
|
225362
|
+
dragHandleTooltip: 'Click and drag to new location',
|
|
225246
225363
|
// table error state
|
|
225247
225364
|
tableErrorStateTitle: 'Unable to load the page',
|
|
225248
225365
|
buttonLabelOnTableError: 'Refresh the page',
|
|
@@ -225658,7 +225775,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
225658
225775
|
selectedIds: view.table.selectedIds,
|
|
225659
225776
|
loadingMoreIds: view.table.loadingMoreIds,
|
|
225660
225777
|
zIndex: zIndex
|
|
225661
|
-
}, _pick(i18n, 'overflowMenuAria', 'clickToExpandAria', 'clickToCollapseAria', 'inProgressText', 'actionFailedText', 'learnMoreText', 'dismissText', 'selectRowAria', 'loadMoreText'), {
|
|
225778
|
+
}, _pick(i18n, 'overflowMenuAria', 'clickToExpandAria', 'clickToCollapseAria', 'inProgressText', 'actionFailedText', 'learnMoreText', 'dismissText', 'selectRowAria', 'loadMoreText', 'dragHandleTooltip'), {
|
|
225662
225779
|
totalColumns: totalColumns
|
|
225663
225780
|
}, _pick(options, 'hasRowSelection', 'hasRowActions', 'hasRowNesting', 'shouldExpandOnRowClick', 'shouldLazyRender', 'preserveCellWhiteSpace', 'useRadioButtonSingleSelect', 'hasDragAndDrop', 'hasBreadcrumbDrop'), {
|
|
225664
225781
|
hideDragHandles: hideDragHandles,
|