@react-spectrum/table 3.12.10-nightly.4623 → 3.12.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/dist/DragPreview.main.js +5 -5
- package/dist/DragPreview.mjs +5 -5
- package/dist/DragPreview.module.js +5 -5
- package/dist/InsertionIndicator.main.js +6 -6
- package/dist/InsertionIndicator.mjs +6 -6
- package/dist/InsertionIndicator.module.js +6 -6
- package/dist/Resizer.main.js +20 -20
- package/dist/Resizer.mjs +20 -20
- package/dist/Resizer.module.js +20 -20
- package/dist/RootDropIndicator.main.js +4 -4
- package/dist/RootDropIndicator.mjs +4 -4
- package/dist/RootDropIndicator.module.js +4 -4
- package/dist/TableView.main.js +3 -3
- package/dist/TableView.mjs +3 -3
- package/dist/TableView.module.js +3 -3
- package/dist/TableViewBase.main.js +191 -191
- package/dist/TableViewBase.mjs +191 -191
- package/dist/TableViewBase.module.js +191 -191
- package/dist/TreeGridTableView.main.js +3 -3
- package/dist/TreeGridTableView.mjs +3 -3
- package/dist/TreeGridTableView.module.js +3 -3
- package/package.json +29 -29
package/dist/DragPreview.main.js
CHANGED
|
@@ -38,15 +38,15 @@ function $f65d44d222cc509b$export$905ab40ac2179daa(props) {
|
|
|
38
38
|
justifyContent: "space-between",
|
|
39
39
|
height: height,
|
|
40
40
|
maxWidth: maxWidth,
|
|
41
|
-
UNSAFE_className: (0, $4Sj2U$reactspectrumutils.classNames)((0, ($parcel$interopDefault($982885d0a34882ea$exports))),
|
|
42
|
-
|
|
41
|
+
UNSAFE_className: (0, $4Sj2U$reactspectrumutils.classNames)((0, ($parcel$interopDefault($982885d0a34882ea$exports))), 'spectrum-Table-row', (0, $4Sj2U$reactspectrumutils.classNames)((0, ($parcel$interopDefault($4afcd54cfd94dbb9$exports))), 'react-spectrum-Table-row', 'react-spectrum-Table-row-dragPreview', {
|
|
42
|
+
'react-spectrum-Table-row-dragPreview--multiple': isDraggingMultiple
|
|
43
43
|
}))
|
|
44
44
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($4Sj2U$react))).createElement("div", {
|
|
45
|
-
className: (0, $4Sj2U$reactspectrumutils.classNames)((0, ($parcel$interopDefault($982885d0a34882ea$exports))),
|
|
45
|
+
className: (0, $4Sj2U$reactspectrumutils.classNames)((0, ($parcel$interopDefault($982885d0a34882ea$exports))), 'spectrum-Table-cell', (0, $4Sj2U$reactspectrumutils.classNames)((0, ($parcel$interopDefault($4afcd54cfd94dbb9$exports))), 'react-spectrum-Table-cell'))
|
|
46
46
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($4Sj2U$react))).createElement("span", {
|
|
47
|
-
className: (0, $4Sj2U$reactspectrumutils.classNames)((0, ($parcel$interopDefault($982885d0a34882ea$exports))),
|
|
47
|
+
className: (0, $4Sj2U$reactspectrumutils.classNames)((0, ($parcel$interopDefault($982885d0a34882ea$exports))), 'spectrum-Table-cellContents')
|
|
48
48
|
}, itemText)), isDraggingMultiple && /*#__PURE__*/ (0, ($parcel$interopDefault($4Sj2U$react))).createElement("div", {
|
|
49
|
-
className: (0, $4Sj2U$reactspectrumutils.classNames)((0, ($parcel$interopDefault($4afcd54cfd94dbb9$exports))),
|
|
49
|
+
className: (0, $4Sj2U$reactspectrumutils.classNames)((0, ($parcel$interopDefault($4afcd54cfd94dbb9$exports))), 'react-spectrum-Table-row-badge')
|
|
50
50
|
}, itemCount));
|
|
51
51
|
}
|
|
52
52
|
|
package/dist/DragPreview.mjs
CHANGED
|
@@ -32,15 +32,15 @@ function $daa6ead3d9d3506a$export$905ab40ac2179daa(props) {
|
|
|
32
32
|
justifyContent: "space-between",
|
|
33
33
|
height: height,
|
|
34
34
|
maxWidth: maxWidth,
|
|
35
|
-
UNSAFE_className: (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_vars_cssmodulejs))),
|
|
36
|
-
|
|
35
|
+
UNSAFE_className: (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_vars_cssmodulejs))), 'spectrum-Table-row', (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_cssmodulejs))), 'react-spectrum-Table-row', 'react-spectrum-Table-row-dragPreview', {
|
|
36
|
+
'react-spectrum-Table-row-dragPreview--multiple': isDraggingMultiple
|
|
37
37
|
}))
|
|
38
38
|
}, /*#__PURE__*/ (0, $9Othb$react).createElement("div", {
|
|
39
|
-
className: (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_vars_cssmodulejs))),
|
|
39
|
+
className: (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_vars_cssmodulejs))), 'spectrum-Table-cell', (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_cssmodulejs))), 'react-spectrum-Table-cell'))
|
|
40
40
|
}, /*#__PURE__*/ (0, $9Othb$react).createElement("span", {
|
|
41
|
-
className: (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_vars_cssmodulejs))),
|
|
41
|
+
className: (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_vars_cssmodulejs))), 'spectrum-Table-cellContents')
|
|
42
42
|
}, itemText)), isDraggingMultiple && /*#__PURE__*/ (0, $9Othb$react).createElement("div", {
|
|
43
|
-
className: (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_cssmodulejs))),
|
|
43
|
+
className: (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_cssmodulejs))), 'react-spectrum-Table-row-badge')
|
|
44
44
|
}, itemCount));
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -32,15 +32,15 @@ function $daa6ead3d9d3506a$export$905ab40ac2179daa(props) {
|
|
|
32
32
|
justifyContent: "space-between",
|
|
33
33
|
height: height,
|
|
34
34
|
maxWidth: maxWidth,
|
|
35
|
-
UNSAFE_className: (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_vars_cssmodulejs))),
|
|
36
|
-
|
|
35
|
+
UNSAFE_className: (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_vars_cssmodulejs))), 'spectrum-Table-row', (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_cssmodulejs))), 'react-spectrum-Table-row', 'react-spectrum-Table-row-dragPreview', {
|
|
36
|
+
'react-spectrum-Table-row-dragPreview--multiple': isDraggingMultiple
|
|
37
37
|
}))
|
|
38
38
|
}, /*#__PURE__*/ (0, $9Othb$react).createElement("div", {
|
|
39
|
-
className: (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_vars_cssmodulejs))),
|
|
39
|
+
className: (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_vars_cssmodulejs))), 'spectrum-Table-cell', (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_cssmodulejs))), 'react-spectrum-Table-cell'))
|
|
40
40
|
}, /*#__PURE__*/ (0, $9Othb$react).createElement("span", {
|
|
41
|
-
className: (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_vars_cssmodulejs))),
|
|
41
|
+
className: (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_vars_cssmodulejs))), 'spectrum-Table-cellContents')
|
|
42
42
|
}, itemText)), isDraggingMultiple && /*#__PURE__*/ (0, $9Othb$react).createElement("div", {
|
|
43
|
-
className: (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_cssmodulejs))),
|
|
43
|
+
className: (0, $9Othb$classNames)((0, ($parcel$interopDefault($9Othb$table_cssmodulejs))), 'react-spectrum-Table-row-badge')
|
|
44
44
|
}, itemCount));
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -37,19 +37,19 @@ function $c44674ca7612e997$export$2c0bab5914a9d088(props) {
|
|
|
37
37
|
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator(props, dropState, ref);
|
|
38
38
|
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $k3Oqb$reactariavisuallyhidden.useVisuallyHidden)();
|
|
39
39
|
let isDropTarget = dropState.isDropTarget(target);
|
|
40
|
-
if (!isDropTarget && dropIndicatorProps[
|
|
40
|
+
if (!isDropTarget && dropIndicatorProps['aria-hidden']) return null;
|
|
41
41
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($k3Oqb$react))).createElement("div", {
|
|
42
42
|
style: {
|
|
43
|
-
position:
|
|
44
|
-
top: rowProps.style.top + (target.dropPosition ===
|
|
43
|
+
position: 'absolute',
|
|
44
|
+
top: rowProps.style.top + (target.dropPosition === 'after' ? rowProps.style.height : 0),
|
|
45
45
|
width: rowProps.style.width
|
|
46
46
|
},
|
|
47
47
|
role: "row",
|
|
48
|
-
"aria-hidden": dropIndicatorProps[
|
|
48
|
+
"aria-hidden": dropIndicatorProps['aria-hidden']
|
|
49
49
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($k3Oqb$react))).createElement("div", {
|
|
50
50
|
role: "gridcell",
|
|
51
|
-
className: (0, $k3Oqb$reactspectrumutils.classNames)((0, ($parcel$interopDefault($4afcd54cfd94dbb9$exports))),
|
|
52
|
-
|
|
51
|
+
className: (0, $k3Oqb$reactspectrumutils.classNames)((0, ($parcel$interopDefault($4afcd54cfd94dbb9$exports))), 'react-spectrum-Table-InsertionIndicator', {
|
|
52
|
+
'react-spectrum-Table-InsertionIndicator--dropTarget': isDropTarget
|
|
53
53
|
})
|
|
54
54
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($k3Oqb$react))).createElement("div", {
|
|
55
55
|
...visuallyHiddenProps,
|
|
@@ -31,19 +31,19 @@ function $7ee9a922ee4e8032$export$2c0bab5914a9d088(props) {
|
|
|
31
31
|
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator(props, dropState, ref);
|
|
32
32
|
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $khOO8$useVisuallyHidden)();
|
|
33
33
|
let isDropTarget = dropState.isDropTarget(target);
|
|
34
|
-
if (!isDropTarget && dropIndicatorProps[
|
|
34
|
+
if (!isDropTarget && dropIndicatorProps['aria-hidden']) return null;
|
|
35
35
|
return /*#__PURE__*/ (0, $khOO8$react).createElement("div", {
|
|
36
36
|
style: {
|
|
37
|
-
position:
|
|
38
|
-
top: rowProps.style.top + (target.dropPosition ===
|
|
37
|
+
position: 'absolute',
|
|
38
|
+
top: rowProps.style.top + (target.dropPosition === 'after' ? rowProps.style.height : 0),
|
|
39
39
|
width: rowProps.style.width
|
|
40
40
|
},
|
|
41
41
|
role: "row",
|
|
42
|
-
"aria-hidden": dropIndicatorProps[
|
|
42
|
+
"aria-hidden": dropIndicatorProps['aria-hidden']
|
|
43
43
|
}, /*#__PURE__*/ (0, $khOO8$react).createElement("div", {
|
|
44
44
|
role: "gridcell",
|
|
45
|
-
className: (0, $khOO8$classNames)((0, ($parcel$interopDefault($khOO8$table_cssmodulejs))),
|
|
46
|
-
|
|
45
|
+
className: (0, $khOO8$classNames)((0, ($parcel$interopDefault($khOO8$table_cssmodulejs))), 'react-spectrum-Table-InsertionIndicator', {
|
|
46
|
+
'react-spectrum-Table-InsertionIndicator--dropTarget': isDropTarget
|
|
47
47
|
})
|
|
48
48
|
}, /*#__PURE__*/ (0, $khOO8$react).createElement("div", {
|
|
49
49
|
...visuallyHiddenProps,
|
|
@@ -31,19 +31,19 @@ function $7ee9a922ee4e8032$export$2c0bab5914a9d088(props) {
|
|
|
31
31
|
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator(props, dropState, ref);
|
|
32
32
|
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $khOO8$useVisuallyHidden)();
|
|
33
33
|
let isDropTarget = dropState.isDropTarget(target);
|
|
34
|
-
if (!isDropTarget && dropIndicatorProps[
|
|
34
|
+
if (!isDropTarget && dropIndicatorProps['aria-hidden']) return null;
|
|
35
35
|
return /*#__PURE__*/ (0, $khOO8$react).createElement("div", {
|
|
36
36
|
style: {
|
|
37
|
-
position:
|
|
38
|
-
top: rowProps.style.top + (target.dropPosition ===
|
|
37
|
+
position: 'absolute',
|
|
38
|
+
top: rowProps.style.top + (target.dropPosition === 'after' ? rowProps.style.height : 0),
|
|
39
39
|
width: rowProps.style.width
|
|
40
40
|
},
|
|
41
41
|
role: "row",
|
|
42
|
-
"aria-hidden": dropIndicatorProps[
|
|
42
|
+
"aria-hidden": dropIndicatorProps['aria-hidden']
|
|
43
43
|
}, /*#__PURE__*/ (0, $khOO8$react).createElement("div", {
|
|
44
44
|
role: "gridcell",
|
|
45
|
-
className: (0, $khOO8$classNames)((0, ($parcel$interopDefault($khOO8$table_cssmodulejs))),
|
|
46
|
-
|
|
45
|
+
className: (0, $khOO8$classNames)((0, ($parcel$interopDefault($khOO8$table_cssmodulejs))), 'react-spectrum-Table-InsertionIndicator', {
|
|
46
|
+
'react-spectrum-Table-InsertionIndicator--dropTarget': isDropTarget
|
|
47
47
|
})
|
|
48
48
|
}, /*#__PURE__*/ (0, $khOO8$react).createElement("div", {
|
|
49
49
|
...visuallyHiddenProps,
|
package/dist/Resizer.main.js
CHANGED
|
@@ -52,9 +52,9 @@ function $2877766f94c67a67$var$getCursor(svg, fallback) {
|
|
|
52
52
|
else return `url("data:image/svg+xml,${encodeURIComponent(svg)}") 8 8, ${fallback}`;
|
|
53
53
|
}
|
|
54
54
|
const $2877766f94c67a67$var$CURSORS = {
|
|
55
|
-
ew: $2877766f94c67a67$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($3f4aefa9145f889b$exports))),
|
|
56
|
-
w: $2877766f94c67a67$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($955f540cbcd8d857$exports))),
|
|
57
|
-
e: $2877766f94c67a67$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($1ed2399e74febaae$exports))),
|
|
55
|
+
ew: $2877766f94c67a67$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($3f4aefa9145f889b$exports))), 'ew-resize'),
|
|
56
|
+
w: $2877766f94c67a67$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($955f540cbcd8d857$exports))), 'w-resize'),
|
|
57
|
+
e: $2877766f94c67a67$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($1ed2399e74febaae$exports))), 'e-resize')
|
|
58
58
|
};
|
|
59
59
|
function $2877766f94c67a67$var$Resizer(props, ref) {
|
|
60
60
|
let { column: column, showResizer: showResizer } = props;
|
|
@@ -63,56 +63,56 @@ function $2877766f94c67a67$var$Resizer(props, ref) {
|
|
|
63
63
|
// in order to get around that and cause a rerender here, we use context
|
|
64
64
|
// but we don't actually need any value, they are available on the layout object
|
|
65
65
|
(0, $e39c6de4eb69450d$exports.useVirtualizerContext)();
|
|
66
|
-
let stringFormatter = (0, $hxFQC$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($1a3d6ad53eb75d54$exports))),
|
|
66
|
+
let stringFormatter = (0, $hxFQC$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($1a3d6ad53eb75d54$exports))), '@react-spectrum/table');
|
|
67
67
|
let { direction: direction } = (0, $hxFQC$reactariai18n.useLocale)();
|
|
68
68
|
let [isPointerDown, setIsPointerDown] = (0, $hxFQC$react.useState)(false);
|
|
69
69
|
(0, $hxFQC$react.useEffect)(()=>{
|
|
70
70
|
let setDown = (e)=>{
|
|
71
|
-
if (e.pointerType ===
|
|
71
|
+
if (e.pointerType === 'mouse') setIsPointerDown(true);
|
|
72
72
|
};
|
|
73
73
|
let setUp = (e)=>{
|
|
74
|
-
if (e.pointerType ===
|
|
74
|
+
if (e.pointerType === 'mouse') setIsPointerDown(false);
|
|
75
75
|
};
|
|
76
|
-
document.addEventListener(
|
|
76
|
+
document.addEventListener('pointerdown', setDown, {
|
|
77
77
|
capture: true
|
|
78
78
|
});
|
|
79
|
-
document.addEventListener(
|
|
79
|
+
document.addEventListener('pointerup', setUp, {
|
|
80
80
|
capture: true
|
|
81
81
|
});
|
|
82
82
|
return ()=>{
|
|
83
|
-
document.removeEventListener(
|
|
83
|
+
document.removeEventListener('pointerdown', setDown, {
|
|
84
84
|
capture: true
|
|
85
85
|
});
|
|
86
|
-
document.removeEventListener(
|
|
86
|
+
document.removeEventListener('pointerup', setUp, {
|
|
87
87
|
capture: true
|
|
88
88
|
});
|
|
89
89
|
};
|
|
90
90
|
}, []);
|
|
91
91
|
let { inputProps: inputProps, resizerProps: resizerProps } = (0, $hxFQC$reactariatable.useTableColumnResize)((0, $hxFQC$reactariautils.mergeProps)(props, {
|
|
92
|
-
|
|
92
|
+
'aria-label': stringFormatter.format('columnResizer'),
|
|
93
93
|
isDisabled: isEmpty
|
|
94
94
|
}), layout, ref);
|
|
95
95
|
let isEResizable = layout.getColumnMinWidth(column.key) >= layout.getColumnWidth(column.key);
|
|
96
96
|
let isWResizable = layout.getColumnMaxWidth(column.key) <= layout.getColumnWidth(column.key);
|
|
97
97
|
let isResizing = layout.resizingColumn === column.key;
|
|
98
|
-
let cursor =
|
|
99
|
-
if (isEResizable) cursor = direction ===
|
|
100
|
-
else if (isWResizable) cursor = direction ===
|
|
98
|
+
let cursor = '';
|
|
99
|
+
if (isEResizable) cursor = direction === 'rtl' ? $2877766f94c67a67$var$CURSORS.w : $2877766f94c67a67$var$CURSORS.e;
|
|
100
|
+
else if (isWResizable) cursor = direction === 'rtl' ? $2877766f94c67a67$var$CURSORS.e : $2877766f94c67a67$var$CURSORS.w;
|
|
101
101
|
else cursor = $2877766f94c67a67$var$CURSORS.ew;
|
|
102
102
|
let style = {
|
|
103
103
|
...resizerProps.style,
|
|
104
|
-
height:
|
|
105
|
-
display: showResizer ? undefined :
|
|
104
|
+
height: '100%',
|
|
105
|
+
display: showResizer ? undefined : 'none',
|
|
106
106
|
cursor: cursor
|
|
107
107
|
};
|
|
108
108
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($hxFQC$react))).createElement((0, ($parcel$interopDefault($hxFQC$react))).Fragment, null, /*#__PURE__*/ (0, ($parcel$interopDefault($hxFQC$react))).createElement((0, $hxFQC$reactariafocus.FocusRing), {
|
|
109
109
|
within: true,
|
|
110
|
-
focusRingClass: (0, $hxFQC$reactspectrumutils.classNames)((0, ($parcel$interopDefault($982885d0a34882ea$exports))),
|
|
110
|
+
focusRingClass: (0, $hxFQC$reactspectrumutils.classNames)((0, ($parcel$interopDefault($982885d0a34882ea$exports))), 'focus-ring')
|
|
111
111
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($hxFQC$react))).createElement("div", {
|
|
112
112
|
...resizerProps,
|
|
113
113
|
role: "presentation",
|
|
114
114
|
style: style,
|
|
115
|
-
className: (0, $hxFQC$reactspectrumutils.classNames)((0, ($parcel$interopDefault($982885d0a34882ea$exports))),
|
|
115
|
+
className: (0, $hxFQC$reactspectrumutils.classNames)((0, ($parcel$interopDefault($982885d0a34882ea$exports))), 'spectrum-Table-columnResizer')
|
|
116
116
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($hxFQC$react))).createElement("input", {
|
|
117
117
|
ref: ref,
|
|
118
118
|
...(0, $hxFQC$reactariautils.mergeProps)(inputProps, {
|
|
@@ -121,12 +121,12 @@ function $2877766f94c67a67$var$Resizer(props, ref) {
|
|
|
121
121
|
}))), /*#__PURE__*/ (0, ($parcel$interopDefault($hxFQC$react))).createElement("div", {
|
|
122
122
|
"aria-hidden": true,
|
|
123
123
|
role: "presentation",
|
|
124
|
-
className: (0, $hxFQC$reactspectrumutils.classNames)((0, ($parcel$interopDefault($982885d0a34882ea$exports))),
|
|
124
|
+
className: (0, $hxFQC$reactspectrumutils.classNames)((0, ($parcel$interopDefault($982885d0a34882ea$exports))), 'spectrum-Table-columnResizerPlaceholder')
|
|
125
125
|
}), /*#__PURE__*/ (0, ($parcel$interopDefault($hxFQC$react))).createElement($2877766f94c67a67$var$CursorOverlay, {
|
|
126
126
|
show: isResizing && isPointerDown
|
|
127
127
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($hxFQC$react))).createElement("div", {
|
|
128
128
|
style: {
|
|
129
|
-
position:
|
|
129
|
+
position: 'fixed',
|
|
130
130
|
top: 0,
|
|
131
131
|
left: 0,
|
|
132
132
|
bottom: 0,
|
package/dist/Resizer.mjs
CHANGED
|
@@ -46,9 +46,9 @@ function $fc695d2eafc2b351$var$getCursor(svg, fallback) {
|
|
|
46
46
|
else return `url("data:image/svg+xml,${encodeURIComponent(svg)}") 8 8, ${fallback}`;
|
|
47
47
|
}
|
|
48
48
|
const $fc695d2eafc2b351$var$CURSORS = {
|
|
49
|
-
ew: $fc695d2eafc2b351$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($ff1f3562a1be2216$exports))),
|
|
50
|
-
w: $fc695d2eafc2b351$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($58407c2d4eb33511$exports))),
|
|
51
|
-
e: $fc695d2eafc2b351$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($2fc56f9fdd93be52$exports))),
|
|
49
|
+
ew: $fc695d2eafc2b351$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($ff1f3562a1be2216$exports))), 'ew-resize'),
|
|
50
|
+
w: $fc695d2eafc2b351$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($58407c2d4eb33511$exports))), 'w-resize'),
|
|
51
|
+
e: $fc695d2eafc2b351$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($2fc56f9fdd93be52$exports))), 'e-resize')
|
|
52
52
|
};
|
|
53
53
|
function $fc695d2eafc2b351$var$Resizer(props, ref) {
|
|
54
54
|
let { column: column, showResizer: showResizer } = props;
|
|
@@ -57,56 +57,56 @@ function $fc695d2eafc2b351$var$Resizer(props, ref) {
|
|
|
57
57
|
// in order to get around that and cause a rerender here, we use context
|
|
58
58
|
// but we don't actually need any value, they are available on the layout object
|
|
59
59
|
(0, $bd013581c0a4b065$export$3f8f74b6bfd2c5df)();
|
|
60
|
-
let stringFormatter = (0, $dIfdp$useLocalizedStringFormatter)((0, ($parcel$interopDefault($dIfdp$intlStringsmodulejs))),
|
|
60
|
+
let stringFormatter = (0, $dIfdp$useLocalizedStringFormatter)((0, ($parcel$interopDefault($dIfdp$intlStringsmodulejs))), '@react-spectrum/table');
|
|
61
61
|
let { direction: direction } = (0, $dIfdp$useLocale)();
|
|
62
62
|
let [isPointerDown, setIsPointerDown] = (0, $dIfdp$useState)(false);
|
|
63
63
|
(0, $dIfdp$useEffect)(()=>{
|
|
64
64
|
let setDown = (e)=>{
|
|
65
|
-
if (e.pointerType ===
|
|
65
|
+
if (e.pointerType === 'mouse') setIsPointerDown(true);
|
|
66
66
|
};
|
|
67
67
|
let setUp = (e)=>{
|
|
68
|
-
if (e.pointerType ===
|
|
68
|
+
if (e.pointerType === 'mouse') setIsPointerDown(false);
|
|
69
69
|
};
|
|
70
|
-
document.addEventListener(
|
|
70
|
+
document.addEventListener('pointerdown', setDown, {
|
|
71
71
|
capture: true
|
|
72
72
|
});
|
|
73
|
-
document.addEventListener(
|
|
73
|
+
document.addEventListener('pointerup', setUp, {
|
|
74
74
|
capture: true
|
|
75
75
|
});
|
|
76
76
|
return ()=>{
|
|
77
|
-
document.removeEventListener(
|
|
77
|
+
document.removeEventListener('pointerdown', setDown, {
|
|
78
78
|
capture: true
|
|
79
79
|
});
|
|
80
|
-
document.removeEventListener(
|
|
80
|
+
document.removeEventListener('pointerup', setUp, {
|
|
81
81
|
capture: true
|
|
82
82
|
});
|
|
83
83
|
};
|
|
84
84
|
}, []);
|
|
85
85
|
let { inputProps: inputProps, resizerProps: resizerProps } = (0, $dIfdp$useTableColumnResize)((0, $dIfdp$mergeProps)(props, {
|
|
86
|
-
|
|
86
|
+
'aria-label': stringFormatter.format('columnResizer'),
|
|
87
87
|
isDisabled: isEmpty
|
|
88
88
|
}), layout, ref);
|
|
89
89
|
let isEResizable = layout.getColumnMinWidth(column.key) >= layout.getColumnWidth(column.key);
|
|
90
90
|
let isWResizable = layout.getColumnMaxWidth(column.key) <= layout.getColumnWidth(column.key);
|
|
91
91
|
let isResizing = layout.resizingColumn === column.key;
|
|
92
|
-
let cursor =
|
|
93
|
-
if (isEResizable) cursor = direction ===
|
|
94
|
-
else if (isWResizable) cursor = direction ===
|
|
92
|
+
let cursor = '';
|
|
93
|
+
if (isEResizable) cursor = direction === 'rtl' ? $fc695d2eafc2b351$var$CURSORS.w : $fc695d2eafc2b351$var$CURSORS.e;
|
|
94
|
+
else if (isWResizable) cursor = direction === 'rtl' ? $fc695d2eafc2b351$var$CURSORS.e : $fc695d2eafc2b351$var$CURSORS.w;
|
|
95
95
|
else cursor = $fc695d2eafc2b351$var$CURSORS.ew;
|
|
96
96
|
let style = {
|
|
97
97
|
...resizerProps.style,
|
|
98
|
-
height:
|
|
99
|
-
display: showResizer ? undefined :
|
|
98
|
+
height: '100%',
|
|
99
|
+
display: showResizer ? undefined : 'none',
|
|
100
100
|
cursor: cursor
|
|
101
101
|
};
|
|
102
102
|
return /*#__PURE__*/ (0, $dIfdp$react).createElement((0, $dIfdp$react).Fragment, null, /*#__PURE__*/ (0, $dIfdp$react).createElement((0, $dIfdp$FocusRing), {
|
|
103
103
|
within: true,
|
|
104
|
-
focusRingClass: (0, $dIfdp$classNames)((0, ($parcel$interopDefault($dIfdp$table_vars_cssmodulejs))),
|
|
104
|
+
focusRingClass: (0, $dIfdp$classNames)((0, ($parcel$interopDefault($dIfdp$table_vars_cssmodulejs))), 'focus-ring')
|
|
105
105
|
}, /*#__PURE__*/ (0, $dIfdp$react).createElement("div", {
|
|
106
106
|
...resizerProps,
|
|
107
107
|
role: "presentation",
|
|
108
108
|
style: style,
|
|
109
|
-
className: (0, $dIfdp$classNames)((0, ($parcel$interopDefault($dIfdp$table_vars_cssmodulejs))),
|
|
109
|
+
className: (0, $dIfdp$classNames)((0, ($parcel$interopDefault($dIfdp$table_vars_cssmodulejs))), 'spectrum-Table-columnResizer')
|
|
110
110
|
}, /*#__PURE__*/ (0, $dIfdp$react).createElement("input", {
|
|
111
111
|
ref: ref,
|
|
112
112
|
...(0, $dIfdp$mergeProps)(inputProps, {
|
|
@@ -115,12 +115,12 @@ function $fc695d2eafc2b351$var$Resizer(props, ref) {
|
|
|
115
115
|
}))), /*#__PURE__*/ (0, $dIfdp$react).createElement("div", {
|
|
116
116
|
"aria-hidden": true,
|
|
117
117
|
role: "presentation",
|
|
118
|
-
className: (0, $dIfdp$classNames)((0, ($parcel$interopDefault($dIfdp$table_vars_cssmodulejs))),
|
|
118
|
+
className: (0, $dIfdp$classNames)((0, ($parcel$interopDefault($dIfdp$table_vars_cssmodulejs))), 'spectrum-Table-columnResizerPlaceholder')
|
|
119
119
|
}), /*#__PURE__*/ (0, $dIfdp$react).createElement($fc695d2eafc2b351$var$CursorOverlay, {
|
|
120
120
|
show: isResizing && isPointerDown
|
|
121
121
|
}, /*#__PURE__*/ (0, $dIfdp$react).createElement("div", {
|
|
122
122
|
style: {
|
|
123
|
-
position:
|
|
123
|
+
position: 'fixed',
|
|
124
124
|
top: 0,
|
|
125
125
|
left: 0,
|
|
126
126
|
bottom: 0,
|
package/dist/Resizer.module.js
CHANGED
|
@@ -46,9 +46,9 @@ function $fc695d2eafc2b351$var$getCursor(svg, fallback) {
|
|
|
46
46
|
else return `url("data:image/svg+xml,${encodeURIComponent(svg)}") 8 8, ${fallback}`;
|
|
47
47
|
}
|
|
48
48
|
const $fc695d2eafc2b351$var$CURSORS = {
|
|
49
|
-
ew: $fc695d2eafc2b351$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($ff1f3562a1be2216$exports))),
|
|
50
|
-
w: $fc695d2eafc2b351$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($58407c2d4eb33511$exports))),
|
|
51
|
-
e: $fc695d2eafc2b351$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($2fc56f9fdd93be52$exports))),
|
|
49
|
+
ew: $fc695d2eafc2b351$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($ff1f3562a1be2216$exports))), 'ew-resize'),
|
|
50
|
+
w: $fc695d2eafc2b351$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($58407c2d4eb33511$exports))), 'w-resize'),
|
|
51
|
+
e: $fc695d2eafc2b351$var$getCursor((0, (/*@__PURE__*/$parcel$interopDefault($2fc56f9fdd93be52$exports))), 'e-resize')
|
|
52
52
|
};
|
|
53
53
|
function $fc695d2eafc2b351$var$Resizer(props, ref) {
|
|
54
54
|
let { column: column, showResizer: showResizer } = props;
|
|
@@ -57,56 +57,56 @@ function $fc695d2eafc2b351$var$Resizer(props, ref) {
|
|
|
57
57
|
// in order to get around that and cause a rerender here, we use context
|
|
58
58
|
// but we don't actually need any value, they are available on the layout object
|
|
59
59
|
(0, $bd013581c0a4b065$export$3f8f74b6bfd2c5df)();
|
|
60
|
-
let stringFormatter = (0, $dIfdp$useLocalizedStringFormatter)((0, ($parcel$interopDefault($dIfdp$intlStringsmodulejs))),
|
|
60
|
+
let stringFormatter = (0, $dIfdp$useLocalizedStringFormatter)((0, ($parcel$interopDefault($dIfdp$intlStringsmodulejs))), '@react-spectrum/table');
|
|
61
61
|
let { direction: direction } = (0, $dIfdp$useLocale)();
|
|
62
62
|
let [isPointerDown, setIsPointerDown] = (0, $dIfdp$useState)(false);
|
|
63
63
|
(0, $dIfdp$useEffect)(()=>{
|
|
64
64
|
let setDown = (e)=>{
|
|
65
|
-
if (e.pointerType ===
|
|
65
|
+
if (e.pointerType === 'mouse') setIsPointerDown(true);
|
|
66
66
|
};
|
|
67
67
|
let setUp = (e)=>{
|
|
68
|
-
if (e.pointerType ===
|
|
68
|
+
if (e.pointerType === 'mouse') setIsPointerDown(false);
|
|
69
69
|
};
|
|
70
|
-
document.addEventListener(
|
|
70
|
+
document.addEventListener('pointerdown', setDown, {
|
|
71
71
|
capture: true
|
|
72
72
|
});
|
|
73
|
-
document.addEventListener(
|
|
73
|
+
document.addEventListener('pointerup', setUp, {
|
|
74
74
|
capture: true
|
|
75
75
|
});
|
|
76
76
|
return ()=>{
|
|
77
|
-
document.removeEventListener(
|
|
77
|
+
document.removeEventListener('pointerdown', setDown, {
|
|
78
78
|
capture: true
|
|
79
79
|
});
|
|
80
|
-
document.removeEventListener(
|
|
80
|
+
document.removeEventListener('pointerup', setUp, {
|
|
81
81
|
capture: true
|
|
82
82
|
});
|
|
83
83
|
};
|
|
84
84
|
}, []);
|
|
85
85
|
let { inputProps: inputProps, resizerProps: resizerProps } = (0, $dIfdp$useTableColumnResize)((0, $dIfdp$mergeProps)(props, {
|
|
86
|
-
|
|
86
|
+
'aria-label': stringFormatter.format('columnResizer'),
|
|
87
87
|
isDisabled: isEmpty
|
|
88
88
|
}), layout, ref);
|
|
89
89
|
let isEResizable = layout.getColumnMinWidth(column.key) >= layout.getColumnWidth(column.key);
|
|
90
90
|
let isWResizable = layout.getColumnMaxWidth(column.key) <= layout.getColumnWidth(column.key);
|
|
91
91
|
let isResizing = layout.resizingColumn === column.key;
|
|
92
|
-
let cursor =
|
|
93
|
-
if (isEResizable) cursor = direction ===
|
|
94
|
-
else if (isWResizable) cursor = direction ===
|
|
92
|
+
let cursor = '';
|
|
93
|
+
if (isEResizable) cursor = direction === 'rtl' ? $fc695d2eafc2b351$var$CURSORS.w : $fc695d2eafc2b351$var$CURSORS.e;
|
|
94
|
+
else if (isWResizable) cursor = direction === 'rtl' ? $fc695d2eafc2b351$var$CURSORS.e : $fc695d2eafc2b351$var$CURSORS.w;
|
|
95
95
|
else cursor = $fc695d2eafc2b351$var$CURSORS.ew;
|
|
96
96
|
let style = {
|
|
97
97
|
...resizerProps.style,
|
|
98
|
-
height:
|
|
99
|
-
display: showResizer ? undefined :
|
|
98
|
+
height: '100%',
|
|
99
|
+
display: showResizer ? undefined : 'none',
|
|
100
100
|
cursor: cursor
|
|
101
101
|
};
|
|
102
102
|
return /*#__PURE__*/ (0, $dIfdp$react).createElement((0, $dIfdp$react).Fragment, null, /*#__PURE__*/ (0, $dIfdp$react).createElement((0, $dIfdp$FocusRing), {
|
|
103
103
|
within: true,
|
|
104
|
-
focusRingClass: (0, $dIfdp$classNames)((0, ($parcel$interopDefault($dIfdp$table_vars_cssmodulejs))),
|
|
104
|
+
focusRingClass: (0, $dIfdp$classNames)((0, ($parcel$interopDefault($dIfdp$table_vars_cssmodulejs))), 'focus-ring')
|
|
105
105
|
}, /*#__PURE__*/ (0, $dIfdp$react).createElement("div", {
|
|
106
106
|
...resizerProps,
|
|
107
107
|
role: "presentation",
|
|
108
108
|
style: style,
|
|
109
|
-
className: (0, $dIfdp$classNames)((0, ($parcel$interopDefault($dIfdp$table_vars_cssmodulejs))),
|
|
109
|
+
className: (0, $dIfdp$classNames)((0, ($parcel$interopDefault($dIfdp$table_vars_cssmodulejs))), 'spectrum-Table-columnResizer')
|
|
110
110
|
}, /*#__PURE__*/ (0, $dIfdp$react).createElement("input", {
|
|
111
111
|
ref: ref,
|
|
112
112
|
...(0, $dIfdp$mergeProps)(inputProps, {
|
|
@@ -115,12 +115,12 @@ function $fc695d2eafc2b351$var$Resizer(props, ref) {
|
|
|
115
115
|
}))), /*#__PURE__*/ (0, $dIfdp$react).createElement("div", {
|
|
116
116
|
"aria-hidden": true,
|
|
117
117
|
role: "presentation",
|
|
118
|
-
className: (0, $dIfdp$classNames)((0, ($parcel$interopDefault($dIfdp$table_vars_cssmodulejs))),
|
|
118
|
+
className: (0, $dIfdp$classNames)((0, ($parcel$interopDefault($dIfdp$table_vars_cssmodulejs))), 'spectrum-Table-columnResizerPlaceholder')
|
|
119
119
|
}), /*#__PURE__*/ (0, $dIfdp$react).createElement($fc695d2eafc2b351$var$CursorOverlay, {
|
|
120
120
|
show: isResizing && isPointerDown
|
|
121
121
|
}, /*#__PURE__*/ (0, $dIfdp$react).createElement("div", {
|
|
122
122
|
style: {
|
|
123
|
-
position:
|
|
123
|
+
position: 'fixed',
|
|
124
124
|
top: 0,
|
|
125
125
|
left: 0,
|
|
126
126
|
bottom: 0,
|
|
@@ -30,17 +30,17 @@ function $4a98adf416b1ae5d$export$d30a7814cfd4033e() {
|
|
|
30
30
|
let ref = (0, $ijPMf$react.useRef)();
|
|
31
31
|
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator({
|
|
32
32
|
target: {
|
|
33
|
-
type:
|
|
33
|
+
type: 'root'
|
|
34
34
|
}
|
|
35
35
|
}, dropState, ref);
|
|
36
36
|
let isDropTarget = dropState.isDropTarget({
|
|
37
|
-
type:
|
|
37
|
+
type: 'root'
|
|
38
38
|
});
|
|
39
39
|
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $ijPMf$reactariavisuallyhidden.useVisuallyHidden)();
|
|
40
|
-
if (!isDropTarget && dropIndicatorProps[
|
|
40
|
+
if (!isDropTarget && dropIndicatorProps['aria-hidden']) return null;
|
|
41
41
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($ijPMf$react))).createElement("div", {
|
|
42
42
|
role: "row",
|
|
43
|
-
"aria-hidden": dropIndicatorProps[
|
|
43
|
+
"aria-hidden": dropIndicatorProps['aria-hidden']
|
|
44
44
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($ijPMf$react))).createElement("div", {
|
|
45
45
|
role: "gridcell",
|
|
46
46
|
"aria-selected": "false",
|
|
@@ -20,17 +20,17 @@ function $4e6fc36ba71ba405$export$d30a7814cfd4033e() {
|
|
|
20
20
|
let ref = (0, $6tvhl$useRef)();
|
|
21
21
|
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator({
|
|
22
22
|
target: {
|
|
23
|
-
type:
|
|
23
|
+
type: 'root'
|
|
24
24
|
}
|
|
25
25
|
}, dropState, ref);
|
|
26
26
|
let isDropTarget = dropState.isDropTarget({
|
|
27
|
-
type:
|
|
27
|
+
type: 'root'
|
|
28
28
|
});
|
|
29
29
|
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $6tvhl$useVisuallyHidden)();
|
|
30
|
-
if (!isDropTarget && dropIndicatorProps[
|
|
30
|
+
if (!isDropTarget && dropIndicatorProps['aria-hidden']) return null;
|
|
31
31
|
return /*#__PURE__*/ (0, $6tvhl$react).createElement("div", {
|
|
32
32
|
role: "row",
|
|
33
|
-
"aria-hidden": dropIndicatorProps[
|
|
33
|
+
"aria-hidden": dropIndicatorProps['aria-hidden']
|
|
34
34
|
}, /*#__PURE__*/ (0, $6tvhl$react).createElement("div", {
|
|
35
35
|
role: "gridcell",
|
|
36
36
|
"aria-selected": "false",
|
|
@@ -20,17 +20,17 @@ function $4e6fc36ba71ba405$export$d30a7814cfd4033e() {
|
|
|
20
20
|
let ref = (0, $6tvhl$useRef)();
|
|
21
21
|
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator({
|
|
22
22
|
target: {
|
|
23
|
-
type:
|
|
23
|
+
type: 'root'
|
|
24
24
|
}
|
|
25
25
|
}, dropState, ref);
|
|
26
26
|
let isDropTarget = dropState.isDropTarget({
|
|
27
|
-
type:
|
|
27
|
+
type: 'root'
|
|
28
28
|
});
|
|
29
29
|
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $6tvhl$useVisuallyHidden)();
|
|
30
|
-
if (!isDropTarget && dropIndicatorProps[
|
|
30
|
+
if (!isDropTarget && dropIndicatorProps['aria-hidden']) return null;
|
|
31
31
|
return /*#__PURE__*/ (0, $6tvhl$react).createElement("div", {
|
|
32
32
|
role: "row",
|
|
33
|
-
"aria-hidden": dropIndicatorProps[
|
|
33
|
+
"aria-hidden": dropIndicatorProps['aria-hidden']
|
|
34
34
|
}, /*#__PURE__*/ (0, $6tvhl$react).createElement("div", {
|
|
35
35
|
role: "gridcell",
|
|
36
36
|
"aria-selected": "false",
|
package/dist/TableView.main.js
CHANGED
|
@@ -27,16 +27,16 @@ $parcel$export(module.exports, "TableView", () => $be8a9c035a82f788$export$b3c27
|
|
|
27
27
|
|
|
28
28
|
function $be8a9c035a82f788$var$TableView(props, ref) {
|
|
29
29
|
let { selectionStyle: selectionStyle, dragAndDropHooks: dragAndDropHooks } = props;
|
|
30
|
-
let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $3lcIF$react.useState)(selectionStyle !==
|
|
30
|
+
let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $3lcIF$react.useState)(selectionStyle !== 'highlight');
|
|
31
31
|
let isTableDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
|
|
32
32
|
let state = (0, $3lcIF$reactstatelytable.useTableState)({
|
|
33
33
|
...props,
|
|
34
34
|
showSelectionCheckboxes: showSelectionCheckboxes,
|
|
35
35
|
showDragButtons: isTableDraggable,
|
|
36
|
-
selectionBehavior: props.selectionStyle ===
|
|
36
|
+
selectionBehavior: props.selectionStyle === 'highlight' ? 'replace' : 'toggle'
|
|
37
37
|
});
|
|
38
38
|
// If the selection behavior changes in state, we need to update showSelectionCheckboxes here due to the circular dependency...
|
|
39
|
-
let shouldShowCheckboxes = state.selectionManager.selectionBehavior !==
|
|
39
|
+
let shouldShowCheckboxes = state.selectionManager.selectionBehavior !== 'replace';
|
|
40
40
|
if (shouldShowCheckboxes !== showSelectionCheckboxes) setShowSelectionCheckboxes(shouldShowCheckboxes);
|
|
41
41
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($3lcIF$react))).createElement((0, $e39c6de4eb69450d$exports.TableViewBase), {
|
|
42
42
|
...props,
|
package/dist/TableView.mjs
CHANGED
|
@@ -17,16 +17,16 @@ import {useTableState as $9W9sm$useTableState} from "@react-stately/table";
|
|
|
17
17
|
|
|
18
18
|
function $d14697b14e638114$var$TableView(props, ref) {
|
|
19
19
|
let { selectionStyle: selectionStyle, dragAndDropHooks: dragAndDropHooks } = props;
|
|
20
|
-
let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $9W9sm$useState)(selectionStyle !==
|
|
20
|
+
let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $9W9sm$useState)(selectionStyle !== 'highlight');
|
|
21
21
|
let isTableDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
|
|
22
22
|
let state = (0, $9W9sm$useTableState)({
|
|
23
23
|
...props,
|
|
24
24
|
showSelectionCheckboxes: showSelectionCheckboxes,
|
|
25
25
|
showDragButtons: isTableDraggable,
|
|
26
|
-
selectionBehavior: props.selectionStyle ===
|
|
26
|
+
selectionBehavior: props.selectionStyle === 'highlight' ? 'replace' : 'toggle'
|
|
27
27
|
});
|
|
28
28
|
// If the selection behavior changes in state, we need to update showSelectionCheckboxes here due to the circular dependency...
|
|
29
|
-
let shouldShowCheckboxes = state.selectionManager.selectionBehavior !==
|
|
29
|
+
let shouldShowCheckboxes = state.selectionManager.selectionBehavior !== 'replace';
|
|
30
30
|
if (shouldShowCheckboxes !== showSelectionCheckboxes) setShowSelectionCheckboxes(shouldShowCheckboxes);
|
|
31
31
|
return /*#__PURE__*/ (0, $9W9sm$react).createElement((0, $bd013581c0a4b065$export$517e02184d273d69), {
|
|
32
32
|
...props,
|
package/dist/TableView.module.js
CHANGED
|
@@ -17,16 +17,16 @@ import {useTableState as $9W9sm$useTableState} from "@react-stately/table";
|
|
|
17
17
|
|
|
18
18
|
function $d14697b14e638114$var$TableView(props, ref) {
|
|
19
19
|
let { selectionStyle: selectionStyle, dragAndDropHooks: dragAndDropHooks } = props;
|
|
20
|
-
let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $9W9sm$useState)(selectionStyle !==
|
|
20
|
+
let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $9W9sm$useState)(selectionStyle !== 'highlight');
|
|
21
21
|
let isTableDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
|
|
22
22
|
let state = (0, $9W9sm$useTableState)({
|
|
23
23
|
...props,
|
|
24
24
|
showSelectionCheckboxes: showSelectionCheckboxes,
|
|
25
25
|
showDragButtons: isTableDraggable,
|
|
26
|
-
selectionBehavior: props.selectionStyle ===
|
|
26
|
+
selectionBehavior: props.selectionStyle === 'highlight' ? 'replace' : 'toggle'
|
|
27
27
|
});
|
|
28
28
|
// If the selection behavior changes in state, we need to update showSelectionCheckboxes here due to the circular dependency...
|
|
29
|
-
let shouldShowCheckboxes = state.selectionManager.selectionBehavior !==
|
|
29
|
+
let shouldShowCheckboxes = state.selectionManager.selectionBehavior !== 'replace';
|
|
30
30
|
if (shouldShowCheckboxes !== showSelectionCheckboxes) setShowSelectionCheckboxes(shouldShowCheckboxes);
|
|
31
31
|
return /*#__PURE__*/ (0, $9W9sm$react).createElement((0, $bd013581c0a4b065$export$517e02184d273d69), {
|
|
32
32
|
...props,
|