@react-spectrum/table 3.10.1-nightly.4028 → 3.10.1-nightly.4038
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/import.mjs +282 -105
- package/dist/main.css +1 -1
- package/dist/main.js +279 -102
- package/dist/main.js.map +1 -1
- package/dist/module.js +282 -105
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +28 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +32 -31
- package/src/InsertionIndicator.tsx +1 -1
- package/src/Resizer.tsx +1 -1
- package/src/RootDropIndicator.tsx +1 -1
- package/src/TableView.tsx +12 -1418
- package/src/TableViewBase.tsx +1493 -0
- package/src/TableViewWrapper.tsx +101 -0
- package/src/TreeGridTableView.tsx +47 -0
- package/src/index.ts +2 -2
- package/src/table.css +7 -0
package/dist/main.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
require("./main.css");
|
|
2
2
|
var $3fpzo$reactstatelytable = require("@react-stately/table");
|
|
3
|
+
var $3fpzo$react = require("react");
|
|
4
|
+
var $3fpzo$reactstatelyflags = require("@react-stately/flags");
|
|
3
5
|
var $3fpzo$spectrumiconsuiArrowDownSmall = require("@spectrum-icons/ui/ArrowDownSmall");
|
|
4
6
|
var $3fpzo$reactariautils = require("@react-aria/utils");
|
|
5
7
|
var $3fpzo$reactspectrumcheckbox = require("@react-spectrum/checkbox");
|
|
6
8
|
var $3fpzo$spectrumiconsuiChevronDownMedium = require("@spectrum-icons/ui/ChevronDownMedium");
|
|
9
|
+
var $3fpzo$spectrumiconsuiChevronLeftMedium = require("@spectrum-icons/ui/ChevronLeftMedium");
|
|
10
|
+
var $3fpzo$spectrumiconsuiChevronRightMedium = require("@spectrum-icons/ui/ChevronRightMedium");
|
|
7
11
|
var $3fpzo$reactspectrumutils = require("@react-spectrum/utils");
|
|
8
12
|
var $3fpzo$reactariafocus = require("@react-aria/focus");
|
|
9
13
|
var $3fpzo$reactariainteractions = require("@react-aria/interactions");
|
|
@@ -11,7 +15,6 @@ var $3fpzo$reactspectrummenu = require("@react-spectrum/menu");
|
|
|
11
15
|
var $3fpzo$reactariavirtualizer = require("@react-aria/virtualizer");
|
|
12
16
|
var $3fpzo$spectrumiconsuiListGripper = require("@spectrum-icons/ui/ListGripper");
|
|
13
17
|
var $3fpzo$reactspectrumprogress = require("@react-spectrum/progress");
|
|
14
|
-
var $3fpzo$react = require("react");
|
|
15
18
|
var $3fpzo$reactstatelyvirtualizer = require("@react-stately/virtualizer");
|
|
16
19
|
var $3fpzo$reactstatelylayout = require("@react-stately/layout");
|
|
17
20
|
var $3fpzo$reactspectrumtooltip = require("@react-spectrum/tooltip");
|
|
@@ -31,7 +34,7 @@ function $parcel$interopDefault(a) {
|
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
$parcel$export(module.exports, "Column", () => $4b0b515c47252574$export$816b5d811295e6bc);
|
|
34
|
-
$parcel$export(module.exports, "TableView", () => $
|
|
37
|
+
$parcel$export(module.exports, "TableView", () => $9802a0717549c6f1$export$b3c27e869d856b7);
|
|
35
38
|
$parcel$export(module.exports, "TableHeader", () => $3fpzo$reactstatelytable.TableHeader);
|
|
36
39
|
$parcel$export(module.exports, "TableBody", () => $3fpzo$reactstatelytable.TableBody);
|
|
37
40
|
$parcel$export(module.exports, "Section", () => $3fpzo$reactstatelytable.Section);
|
|
@@ -49,7 +52,30 @@ $parcel$export(module.exports, "Cell", () => $3fpzo$reactstatelytable.Cell);
|
|
|
49
52
|
* governing permissions and limitations under the License.
|
|
50
53
|
*/ /// <reference types="css-module-types" />
|
|
51
54
|
/*
|
|
52
|
-
* Copyright
|
|
55
|
+
* Copyright 2023 Adobe. All rights reserved.
|
|
56
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
57
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
58
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
59
|
+
*
|
|
60
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
61
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
62
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
63
|
+
* governing permissions and limitations under the License.
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
/*
|
|
67
|
+
* Copyright 2023 Adobe. All rights reserved.
|
|
68
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
69
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
70
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
71
|
+
*
|
|
72
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
73
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
74
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
75
|
+
* governing permissions and limitations under the License.
|
|
76
|
+
*/
|
|
77
|
+
/*
|
|
78
|
+
* Copyright 2023 Adobe. All rights reserved.
|
|
53
79
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
54
80
|
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
55
81
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -65,6 +91,8 @@ $parcel$export(module.exports, "Cell", () => $3fpzo$reactstatelytable.Cell);
|
|
|
65
91
|
|
|
66
92
|
|
|
67
93
|
|
|
94
|
+
|
|
95
|
+
|
|
68
96
|
/*
|
|
69
97
|
* Copyright 2023 Adobe. All rights reserved.
|
|
70
98
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -81,6 +109,7 @@ var $4afcd54cfd94dbb9$exports = {};
|
|
|
81
109
|
|
|
82
110
|
$parcel$export($4afcd54cfd94dbb9$exports, "react-spectrum-Table", () => $4afcd54cfd94dbb9$export$8cc7e6e5f955c192, (v) => $4afcd54cfd94dbb9$export$8cc7e6e5f955c192 = v);
|
|
83
111
|
$parcel$export($4afcd54cfd94dbb9$exports, "react-spectrum-Table-cell", () => $4afcd54cfd94dbb9$export$19015e98090cea63, (v) => $4afcd54cfd94dbb9$export$19015e98090cea63 = v);
|
|
112
|
+
$parcel$export($4afcd54cfd94dbb9$exports, "react-spectrum-Table-cell--hasExpandCollapseButton", () => $4afcd54cfd94dbb9$export$54c344ff0a219615, (v) => $4afcd54cfd94dbb9$export$54c344ff0a219615 = v);
|
|
84
113
|
$parcel$export($4afcd54cfd94dbb9$exports, "react-spectrum-Table-cellWrapper", () => $4afcd54cfd94dbb9$export$ea1d9f40910c509, (v) => $4afcd54cfd94dbb9$export$ea1d9f40910c509 = v);
|
|
85
114
|
$parcel$export($4afcd54cfd94dbb9$exports, "react-spectrum-Table-cell--alignStart", () => $4afcd54cfd94dbb9$export$25d7f56ba6d0d442, (v) => $4afcd54cfd94dbb9$export$25d7f56ba6d0d442 = v);
|
|
86
115
|
$parcel$export($4afcd54cfd94dbb9$exports, "react-spectrum-Table-cell--alignCenter", () => $4afcd54cfd94dbb9$export$14101ea2699002fc, (v) => $4afcd54cfd94dbb9$export$14101ea2699002fc = v);
|
|
@@ -103,6 +132,7 @@ $parcel$export($4afcd54cfd94dbb9$exports, "react-spectrum-Table-row--dropTarget"
|
|
|
103
132
|
$parcel$export($4afcd54cfd94dbb9$exports, "react-spectrum-Table-cellWrapper--dropTarget", () => $4afcd54cfd94dbb9$export$374244a7e6e6e484, (v) => $4afcd54cfd94dbb9$export$374244a7e6e6e484 = v);
|
|
104
133
|
var $4afcd54cfd94dbb9$export$8cc7e6e5f955c192;
|
|
105
134
|
var $4afcd54cfd94dbb9$export$19015e98090cea63;
|
|
135
|
+
var $4afcd54cfd94dbb9$export$54c344ff0a219615;
|
|
106
136
|
var $4afcd54cfd94dbb9$export$ea1d9f40910c509;
|
|
107
137
|
var $4afcd54cfd94dbb9$export$25d7f56ba6d0d442;
|
|
108
138
|
var $4afcd54cfd94dbb9$export$14101ea2699002fc;
|
|
@@ -125,6 +155,7 @@ var $4afcd54cfd94dbb9$export$5e4ce8d9f081b812;
|
|
|
125
155
|
var $4afcd54cfd94dbb9$export$374244a7e6e6e484;
|
|
126
156
|
$4afcd54cfd94dbb9$export$8cc7e6e5f955c192 = "react-spectrum-Table_e844a7";
|
|
127
157
|
$4afcd54cfd94dbb9$export$19015e98090cea63 = "react-spectrum-Table-cell_e844a7";
|
|
158
|
+
$4afcd54cfd94dbb9$export$54c344ff0a219615 = "react-spectrum-Table-cell--hasExpandCollapseButton_e844a7";
|
|
128
159
|
$4afcd54cfd94dbb9$export$ea1d9f40910c509 = "react-spectrum-Table-cellWrapper_e844a7";
|
|
129
160
|
$4afcd54cfd94dbb9$export$25d7f56ba6d0d442 = "react-spectrum-Table-cell--alignStart_e844a7";
|
|
130
161
|
$4afcd54cfd94dbb9$export$14101ea2699002fc = "react-spectrum-Table-cell--alignCenter_e844a7";
|
|
@@ -150,7 +181,7 @@ $4afcd54cfd94dbb9$export$374244a7e6e6e484 = "react-spectrum-Table-cellWrapper--d
|
|
|
150
181
|
|
|
151
182
|
|
|
152
183
|
function $c44674ca7612e997$export$2c0bab5914a9d088(props) {
|
|
153
|
-
let { dropState: dropState , dragAndDropHooks: dragAndDropHooks } = (0, $
|
|
184
|
+
let { dropState: dropState , dragAndDropHooks: dragAndDropHooks } = (0, $e39c6de4eb69450d$export$3cb274deb6c2d854)();
|
|
154
185
|
const { target: target , rowProps: rowProps } = props;
|
|
155
186
|
let ref = (0, $3fpzo$react.useRef)();
|
|
156
187
|
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator(props, dropState, ref);
|
|
@@ -188,7 +219,9 @@ $aea5dbc70156d941$exports = {
|
|
|
188
219
|
"loadingMore": `جارٍ تحميل المزيد...`,
|
|
189
220
|
"resizeColumn": `تغيير حجم العمود`,
|
|
190
221
|
"sortAscending": `فرز بترتيب تصاعدي`,
|
|
191
|
-
"sortDescending": `فرز بترتيب
|
|
222
|
+
"sortDescending": `فرز بترتيب تنازلي`,
|
|
223
|
+
"expand": `Expand`,
|
|
224
|
+
"collapse": `Collapse`
|
|
192
225
|
};
|
|
193
226
|
|
|
194
227
|
|
|
@@ -260,7 +293,9 @@ $b5db09171b92c95b$exports = {
|
|
|
260
293
|
"sortDescending": `Sort Descending`,
|
|
261
294
|
"resizeColumn": `Resize column`,
|
|
262
295
|
"columnResizer": `Column resizer`,
|
|
263
|
-
"drag": `Drag
|
|
296
|
+
"drag": `Drag`,
|
|
297
|
+
"expand": `Expand`,
|
|
298
|
+
"collapse": `Collapse`
|
|
264
299
|
};
|
|
265
300
|
|
|
266
301
|
|
|
@@ -719,9 +754,12 @@ $parcel$export($982885d0a34882ea$exports, "spectrum-Table-row", () => $982885d0a
|
|
|
719
754
|
$parcel$export($982885d0a34882ea$exports, "spectrum-Table-body--resizerAtTableEdge", () => $982885d0a34882ea$export$ec8d96850ac2415e, (v) => $982885d0a34882ea$export$ec8d96850ac2415e = v);
|
|
720
755
|
$parcel$export($982885d0a34882ea$exports, "spectrum-Table--quiet", () => $982885d0a34882ea$export$80f179961079d85e, (v) => $982885d0a34882ea$export$80f179961079d85e = v);
|
|
721
756
|
$parcel$export($982885d0a34882ea$exports, "spectrum-Table-cell", () => $982885d0a34882ea$export$c073926c283bb618, (v) => $982885d0a34882ea$export$c073926c283bb618 = v);
|
|
757
|
+
$parcel$export($982885d0a34882ea$exports, "spectrum-Table--regular", () => $982885d0a34882ea$export$3be3e4ba813e9589, (v) => $982885d0a34882ea$export$3be3e4ba813e9589 = v);
|
|
722
758
|
$parcel$export($982885d0a34882ea$exports, "spectrum-Table--compact", () => $982885d0a34882ea$export$bcb43fe016211cab, (v) => $982885d0a34882ea$export$bcb43fe016211cab = v);
|
|
723
759
|
$parcel$export($982885d0a34882ea$exports, "spectrum-Table--spacious", () => $982885d0a34882ea$export$eef21b0715bc0914, (v) => $982885d0a34882ea$export$eef21b0715bc0914 = v);
|
|
724
760
|
$parcel$export($982885d0a34882ea$exports, "spectrum-Table-cellContents", () => $982885d0a34882ea$export$683061182a3353d3, (v) => $982885d0a34882ea$export$683061182a3353d3 = v);
|
|
761
|
+
$parcel$export($982885d0a34882ea$exports, "spectrum-Table-expandButton", () => $982885d0a34882ea$export$ce10510e27df0512, (v) => $982885d0a34882ea$export$ce10510e27df0512 = v);
|
|
762
|
+
$parcel$export($982885d0a34882ea$exports, "is-open", () => $982885d0a34882ea$export$a9781837241c946d, (v) => $982885d0a34882ea$export$a9781837241c946d = v);
|
|
725
763
|
$parcel$export($982885d0a34882ea$exports, "spectrum-Table-cell--hideHeader", () => $982885d0a34882ea$export$8ff2ab45f5f0045d, (v) => $982885d0a34882ea$export$8ff2ab45f5f0045d = v);
|
|
726
764
|
$parcel$export($982885d0a34882ea$exports, "spectrum-Table--wrap", () => $982885d0a34882ea$export$9d4c255d6285f0ec, (v) => $982885d0a34882ea$export$9d4c255d6285f0ec = v);
|
|
727
765
|
$parcel$export($982885d0a34882ea$exports, "is-focused", () => $982885d0a34882ea$export$e7dc768d35940237, (v) => $982885d0a34882ea$export$e7dc768d35940237 = v);
|
|
@@ -772,9 +810,12 @@ var $982885d0a34882ea$export$fefa57dcd4648052;
|
|
|
772
810
|
var $982885d0a34882ea$export$ec8d96850ac2415e;
|
|
773
811
|
var $982885d0a34882ea$export$80f179961079d85e;
|
|
774
812
|
var $982885d0a34882ea$export$c073926c283bb618;
|
|
813
|
+
var $982885d0a34882ea$export$3be3e4ba813e9589;
|
|
775
814
|
var $982885d0a34882ea$export$bcb43fe016211cab;
|
|
776
815
|
var $982885d0a34882ea$export$eef21b0715bc0914;
|
|
777
816
|
var $982885d0a34882ea$export$683061182a3353d3;
|
|
817
|
+
var $982885d0a34882ea$export$ce10510e27df0512;
|
|
818
|
+
var $982885d0a34882ea$export$a9781837241c946d;
|
|
778
819
|
var $982885d0a34882ea$export$8ff2ab45f5f0045d;
|
|
779
820
|
var $982885d0a34882ea$export$9d4c255d6285f0ec;
|
|
780
821
|
var $982885d0a34882ea$export$e7dc768d35940237;
|
|
@@ -825,9 +866,12 @@ $982885d0a34882ea$export$fefa57dcd4648052 = "spectrum-Table-row_d0fc74";
|
|
|
825
866
|
$982885d0a34882ea$export$ec8d96850ac2415e = "spectrum-Table-body--resizerAtTableEdge_d0fc74";
|
|
826
867
|
$982885d0a34882ea$export$80f179961079d85e = "spectrum-Table--quiet_d0fc74";
|
|
827
868
|
$982885d0a34882ea$export$c073926c283bb618 = "spectrum-Table-cell_d0fc74";
|
|
869
|
+
$982885d0a34882ea$export$3be3e4ba813e9589 = "spectrum-Table--regular_d0fc74";
|
|
828
870
|
$982885d0a34882ea$export$bcb43fe016211cab = "spectrum-Table--compact_d0fc74";
|
|
829
871
|
$982885d0a34882ea$export$eef21b0715bc0914 = "spectrum-Table--spacious_d0fc74";
|
|
830
872
|
$982885d0a34882ea$export$683061182a3353d3 = "spectrum-Table-cellContents_d0fc74";
|
|
873
|
+
$982885d0a34882ea$export$ce10510e27df0512 = "spectrum-Table-expandButton_d0fc74";
|
|
874
|
+
$982885d0a34882ea$export$a9781837241c946d = "is-open_d0fc74";
|
|
831
875
|
$982885d0a34882ea$export$8ff2ab45f5f0045d = "spectrum-Table-cell--hideHeader_d0fc74";
|
|
832
876
|
$982885d0a34882ea$export$9d4c255d6285f0ec = "spectrum-Table--wrap_d0fc74";
|
|
833
877
|
$982885d0a34882ea$export$e7dc768d35940237 = "is-focused_d0fc74";
|
|
@@ -878,11 +922,11 @@ const $2877766f94c67a67$var$CURSORS = {
|
|
|
878
922
|
};
|
|
879
923
|
function $2877766f94c67a67$var$Resizer(props, ref) {
|
|
880
924
|
let { column: column , showResizer: showResizer } = props;
|
|
881
|
-
let { isEmpty: isEmpty , layout: layout } = (0, $
|
|
925
|
+
let { isEmpty: isEmpty , layout: layout } = (0, $e39c6de4eb69450d$export$3cb274deb6c2d854)();
|
|
882
926
|
// Virtualizer re-renders, but these components are all cached
|
|
883
927
|
// in order to get around that and cause a rerender here, we use context
|
|
884
928
|
// but we don't actually need any value, they are available on the layout object
|
|
885
|
-
(0, $
|
|
929
|
+
(0, $e39c6de4eb69450d$export$3f8f74b6bfd2c5df)();
|
|
886
930
|
let stringFormatter = (0, $3fpzo$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($1a3d6ad53eb75d54$exports))));
|
|
887
931
|
let { direction: direction } = (0, $3fpzo$reactariai18n.useLocale)();
|
|
888
932
|
let [isPointerDown, setIsPointerDown] = (0, $3fpzo$react.useState)(false);
|
|
@@ -976,7 +1020,7 @@ const $2877766f94c67a67$export$48a76196cafe3b93 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
976
1020
|
|
|
977
1021
|
|
|
978
1022
|
function $4a98adf416b1ae5d$export$d30a7814cfd4033e() {
|
|
979
|
-
let { dropState: dropState , dragAndDropHooks: dragAndDropHooks , state: state } = (0, $
|
|
1023
|
+
let { dropState: dropState , dragAndDropHooks: dragAndDropHooks , state: state } = (0, $e39c6de4eb69450d$export$3cb274deb6c2d854)();
|
|
980
1024
|
let ref = (0, $3fpzo$react.useRef)();
|
|
981
1025
|
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator({
|
|
982
1026
|
target: {
|
|
@@ -1049,15 +1093,15 @@ function $f65d44d222cc509b$export$905ab40ac2179daa(props) {
|
|
|
1049
1093
|
|
|
1050
1094
|
|
|
1051
1095
|
|
|
1052
|
-
const $
|
|
1096
|
+
const $e39c6de4eb69450d$var$DEFAULT_HEADER_HEIGHT = {
|
|
1053
1097
|
medium: 34,
|
|
1054
1098
|
large: 40
|
|
1055
1099
|
};
|
|
1056
|
-
const $
|
|
1100
|
+
const $e39c6de4eb69450d$var$DEFAULT_HIDE_HEADER_CELL_WIDTH = {
|
|
1057
1101
|
medium: 38,
|
|
1058
1102
|
large: 46
|
|
1059
1103
|
};
|
|
1060
|
-
const $
|
|
1104
|
+
const $e39c6de4eb69450d$var$ROW_HEIGHTS = {
|
|
1061
1105
|
compact: {
|
|
1062
1106
|
medium: 32,
|
|
1063
1107
|
large: 40
|
|
@@ -1071,26 +1115,30 @@ const $be8a9c035a82f788$var$ROW_HEIGHTS = {
|
|
|
1071
1115
|
large: 60
|
|
1072
1116
|
}
|
|
1073
1117
|
};
|
|
1074
|
-
const $
|
|
1118
|
+
const $e39c6de4eb69450d$var$SELECTION_CELL_DEFAULT_WIDTH = {
|
|
1075
1119
|
medium: 38,
|
|
1076
1120
|
large: 48
|
|
1077
1121
|
};
|
|
1078
|
-
const $
|
|
1122
|
+
const $e39c6de4eb69450d$var$DRAG_BUTTON_CELL_DEFAULT_WIDTH = {
|
|
1123
|
+
medium: 16,
|
|
1124
|
+
large: 20
|
|
1125
|
+
};
|
|
1126
|
+
const $e39c6de4eb69450d$var$LEVEL_OFFSET_WIDTH = {
|
|
1079
1127
|
medium: 16,
|
|
1080
1128
|
large: 20
|
|
1081
1129
|
};
|
|
1082
|
-
const $
|
|
1083
|
-
function $
|
|
1084
|
-
return (0, $3fpzo$react.useContext)($
|
|
1130
|
+
const $e39c6de4eb69450d$export$93e4b0b2cc49b648 = /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createContext(null);
|
|
1131
|
+
function $e39c6de4eb69450d$export$3cb274deb6c2d854() {
|
|
1132
|
+
return (0, $3fpzo$react.useContext)($e39c6de4eb69450d$export$93e4b0b2cc49b648);
|
|
1085
1133
|
}
|
|
1086
|
-
const $
|
|
1087
|
-
function $
|
|
1088
|
-
return (0, $3fpzo$react.useContext)($
|
|
1134
|
+
const $e39c6de4eb69450d$export$d288a7dd40372bc = /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createContext(null);
|
|
1135
|
+
function $e39c6de4eb69450d$export$3f8f74b6bfd2c5df() {
|
|
1136
|
+
return (0, $3fpzo$react.useContext)($e39c6de4eb69450d$export$d288a7dd40372bc);
|
|
1089
1137
|
}
|
|
1090
|
-
function $
|
|
1138
|
+
function $e39c6de4eb69450d$var$TableViewBase(props, ref) {
|
|
1091
1139
|
var _dropState_target;
|
|
1092
1140
|
props = (0, $3fpzo$reactspectrumprovider.useProviderProps)(props);
|
|
1093
|
-
let { isQuiet: isQuiet , onAction: onAction , onResizeStart: propsOnResizeStart , onResizeEnd: propsOnResizeEnd , dragAndDropHooks: dragAndDropHooks } = props;
|
|
1141
|
+
let { isQuiet: isQuiet , onAction: onAction , onResizeStart: propsOnResizeStart , onResizeEnd: propsOnResizeEnd , dragAndDropHooks: dragAndDropHooks , state: state } = props;
|
|
1094
1142
|
let isTableDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
|
|
1095
1143
|
let isTableDroppable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDroppableCollectionState);
|
|
1096
1144
|
let dragHooksProvided = (0, $3fpzo$react.useRef)(isTableDraggable);
|
|
@@ -1098,29 +1146,30 @@ function $be8a9c035a82f788$var$TableView(props, ref) {
|
|
|
1098
1146
|
(0, $3fpzo$react.useEffect)(()=>{
|
|
1099
1147
|
if (dragHooksProvided.current !== isTableDraggable) console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.");
|
|
1100
1148
|
if (dropHooksProvided.current !== isTableDroppable) console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.");
|
|
1149
|
+
if ("expandedKeys" in state && (isTableDraggable || isTableDroppable)) console.warn("Drag and drop is not yet fully supported with expandable rows and may produce unexpected results.");
|
|
1101
1150
|
}, [
|
|
1102
1151
|
isTableDraggable,
|
|
1103
|
-
isTableDroppable
|
|
1152
|
+
isTableDroppable,
|
|
1153
|
+
state
|
|
1104
1154
|
]);
|
|
1105
1155
|
let { styleProps: styleProps } = (0, $3fpzo$reactspectrumutils.useStyleProps)(props);
|
|
1106
|
-
let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $3fpzo$react.useState)(props.selectionStyle !== "highlight");
|
|
1107
1156
|
let { direction: direction } = (0, $3fpzo$reactariai18n.useLocale)();
|
|
1108
1157
|
let { scale: scale } = (0, $3fpzo$reactspectrumprovider.useProvider)();
|
|
1109
1158
|
const getDefaultWidth = (0, $3fpzo$react.useCallback)(({ props: { hideHeader: hideHeader , isSelectionCell: isSelectionCell , showDivider: showDivider , isDragButtonCell: isDragButtonCell } })=>{
|
|
1110
1159
|
if (hideHeader) {
|
|
1111
|
-
let width = $
|
|
1160
|
+
let width = $e39c6de4eb69450d$var$DEFAULT_HIDE_HEADER_CELL_WIDTH[scale];
|
|
1112
1161
|
return showDivider ? width + 1 : width;
|
|
1113
|
-
} else if (isSelectionCell) return $
|
|
1114
|
-
else if (isDragButtonCell) return $
|
|
1162
|
+
} else if (isSelectionCell) return $e39c6de4eb69450d$var$SELECTION_CELL_DEFAULT_WIDTH[scale];
|
|
1163
|
+
else if (isDragButtonCell) return $e39c6de4eb69450d$var$DRAG_BUTTON_CELL_DEFAULT_WIDTH[scale];
|
|
1115
1164
|
}, [
|
|
1116
1165
|
scale
|
|
1117
1166
|
]);
|
|
1118
1167
|
const getDefaultMinWidth = (0, $3fpzo$react.useCallback)(({ props: { hideHeader: hideHeader , isSelectionCell: isSelectionCell , showDivider: showDivider , isDragButtonCell: isDragButtonCell } })=>{
|
|
1119
1168
|
if (hideHeader) {
|
|
1120
|
-
let width = $
|
|
1169
|
+
let width = $e39c6de4eb69450d$var$DEFAULT_HIDE_HEADER_CELL_WIDTH[scale];
|
|
1121
1170
|
return showDivider ? width + 1 : width;
|
|
1122
|
-
} else if (isSelectionCell) return $
|
|
1123
|
-
else if (isDragButtonCell) return $
|
|
1171
|
+
} else if (isSelectionCell) return $e39c6de4eb69450d$var$SELECTION_CELL_DEFAULT_WIDTH[scale];
|
|
1172
|
+
else if (isDragButtonCell) return $e39c6de4eb69450d$var$DRAG_BUTTON_CELL_DEFAULT_WIDTH[scale];
|
|
1124
1173
|
return 75;
|
|
1125
1174
|
}, [
|
|
1126
1175
|
scale
|
|
@@ -1132,15 +1181,6 @@ function $be8a9c035a82f788$var$TableView(props, ref) {
|
|
|
1132
1181
|
// entering resizing/exiting resizing doesn't trigger a render
|
|
1133
1182
|
// with table layout, so we need to track it here
|
|
1134
1183
|
let [, setIsResizing] = (0, $3fpzo$react.useState)(false);
|
|
1135
|
-
let state = (0, $3fpzo$reactstatelytable.useTableState)({
|
|
1136
|
-
...props,
|
|
1137
|
-
showSelectionCheckboxes: showSelectionCheckboxes,
|
|
1138
|
-
showDragButtons: isTableDraggable,
|
|
1139
|
-
selectionBehavior: props.selectionStyle === "highlight" ? "replace" : "toggle"
|
|
1140
|
-
});
|
|
1141
|
-
// If the selection behavior changes in state, we need to update showSelectionCheckboxes here due to the circular dependency...
|
|
1142
|
-
let shouldShowCheckboxes = state.selectionManager.selectionBehavior !== "replace";
|
|
1143
|
-
if (shouldShowCheckboxes !== showSelectionCheckboxes) setShowSelectionCheckboxes(shouldShowCheckboxes);
|
|
1144
1184
|
let domRef = (0, $3fpzo$reactspectrumutils.useDOMRef)(ref);
|
|
1145
1185
|
let headerRef = (0, $3fpzo$react.useRef)();
|
|
1146
1186
|
let bodyRef = (0, $3fpzo$react.useRef)();
|
|
@@ -1155,10 +1195,10 @@ function $be8a9c035a82f788$var$TableView(props, ref) {
|
|
|
1155
1195
|
]);
|
|
1156
1196
|
let tableLayout = (0, $3fpzo$react.useMemo)(()=>new (0, $3fpzo$reactstatelylayout.TableLayout)({
|
|
1157
1197
|
// If props.rowHeight is auto, then use estimated heights based on scale, otherwise use fixed heights.
|
|
1158
|
-
rowHeight: props.overflowMode === "wrap" ? null : $
|
|
1159
|
-
estimatedRowHeight: props.overflowMode === "wrap" ? $
|
|
1160
|
-
headingHeight: props.overflowMode === "wrap" ? null : $
|
|
1161
|
-
estimatedHeadingHeight: props.overflowMode === "wrap" ? $
|
|
1198
|
+
rowHeight: props.overflowMode === "wrap" ? null : $e39c6de4eb69450d$var$ROW_HEIGHTS[density][scale],
|
|
1199
|
+
estimatedRowHeight: props.overflowMode === "wrap" ? $e39c6de4eb69450d$var$ROW_HEIGHTS[density][scale] : null,
|
|
1200
|
+
headingHeight: props.overflowMode === "wrap" ? null : $e39c6de4eb69450d$var$DEFAULT_HEADER_HEIGHT[scale],
|
|
1201
|
+
estimatedHeadingHeight: props.overflowMode === "wrap" ? $e39c6de4eb69450d$var$DEFAULT_HEADER_HEIGHT[scale] : null,
|
|
1162
1202
|
columnLayout: columnLayout,
|
|
1163
1203
|
initialCollection: state.collection
|
|
1164
1204
|
}), // don't recompute when state.collection changes, only used for initial value
|
|
@@ -1220,17 +1260,17 @@ function $be8a9c035a82f788$var$TableView(props, ref) {
|
|
|
1220
1260
|
let renderWrapper = (parent, reusableView, children, renderChildren)=>{
|
|
1221
1261
|
let style = (0, $3fpzo$reactariavirtualizer.layoutInfoToStyle)(reusableView.layoutInfo, direction, parent && parent.layoutInfo);
|
|
1222
1262
|
if (style.overflow === "hidden") style.overflow = "visible"; // needed to support position: sticky
|
|
1223
|
-
if (reusableView.viewType === "rowgroup") return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
1263
|
+
if (reusableView.viewType === "rowgroup") return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$TableRowGroup, {
|
|
1224
1264
|
key: reusableView.key,
|
|
1225
1265
|
style: style
|
|
1226
1266
|
}, isTableDroppable && /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement((0, $4a98adf416b1ae5d$export$d30a7814cfd4033e), {
|
|
1227
1267
|
key: "root"
|
|
1228
1268
|
}), renderChildren(children));
|
|
1229
|
-
if (reusableView.viewType === "header") return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
1269
|
+
if (reusableView.viewType === "header") return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$TableHeader, {
|
|
1230
1270
|
key: reusableView.key,
|
|
1231
1271
|
style: style
|
|
1232
1272
|
}, renderChildren(children));
|
|
1233
|
-
if (reusableView.viewType === "row") return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
1273
|
+
if (reusableView.viewType === "row") return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$TableRow, {
|
|
1234
1274
|
key: reusableView.key,
|
|
1235
1275
|
item: reusableView.content,
|
|
1236
1276
|
style: style,
|
|
@@ -1238,7 +1278,7 @@ function $be8a9c035a82f788$var$TableView(props, ref) {
|
|
|
1238
1278
|
isTableDroppable: isTableDroppable,
|
|
1239
1279
|
isTableDraggable: isTableDraggable
|
|
1240
1280
|
}, renderChildren(children));
|
|
1241
|
-
if (reusableView.viewType === "headerrow") return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
1281
|
+
if (reusableView.viewType === "headerrow") return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$TableHeaderRow, {
|
|
1242
1282
|
onHoverChange: setHeaderRowHovered,
|
|
1243
1283
|
key: reusableView.key,
|
|
1244
1284
|
style: style,
|
|
@@ -1276,13 +1316,13 @@ function $be8a9c035a82f788$var$TableView(props, ref) {
|
|
|
1276
1316
|
case "headerrow":
|
|
1277
1317
|
return null;
|
|
1278
1318
|
case "cell":
|
|
1279
|
-
if (item.props.isSelectionCell) return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
1319
|
+
if (item.props.isSelectionCell) return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$TableCheckboxCell, {
|
|
1280
1320
|
cell: item
|
|
1281
1321
|
});
|
|
1282
|
-
if (item.props.isDragButtonCell) return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
1322
|
+
if (item.props.isDragButtonCell) return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$TableDragCell, {
|
|
1283
1323
|
cell: item
|
|
1284
1324
|
});
|
|
1285
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
1325
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$TableCell, {
|
|
1286
1326
|
cell: item
|
|
1287
1327
|
});
|
|
1288
1328
|
case "placeholder":
|
|
@@ -1293,30 +1333,30 @@ function $be8a9c035a82f788$var$TableView(props, ref) {
|
|
|
1293
1333
|
"aria-colspan": item.colspan > 1 ? item.colspan : null
|
|
1294
1334
|
});
|
|
1295
1335
|
case "column":
|
|
1296
|
-
if (item.props.isSelectionCell) return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
1336
|
+
if (item.props.isSelectionCell) return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$TableSelectAllCell, {
|
|
1297
1337
|
column: item
|
|
1298
1338
|
});
|
|
1299
|
-
if (item.props.isDragButtonCell) return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
1339
|
+
if (item.props.isDragButtonCell) return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$TableDragHeaderCell, {
|
|
1300
1340
|
column: item
|
|
1301
1341
|
});
|
|
1302
1342
|
// TODO: consider this case, what if we have hidden headers and a empty table
|
|
1303
1343
|
if (item.props.hideHeader) return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement((0, $3fpzo$reactspectrumtooltip.TooltipTrigger), {
|
|
1304
1344
|
placement: "top",
|
|
1305
1345
|
trigger: "focus"
|
|
1306
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
1346
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$TableColumnHeader, {
|
|
1307
1347
|
column: item
|
|
1308
1348
|
}), /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement((0, $3fpzo$reactspectrumtooltip.Tooltip), {
|
|
1309
1349
|
placement: "top"
|
|
1310
1350
|
}, item.rendered));
|
|
1311
|
-
if (item.props.allowsResizing && !item.hasChildNodes) return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
1351
|
+
if (item.props.allowsResizing && !item.hasChildNodes) return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$ResizableTableColumnHeader, {
|
|
1312
1352
|
tableRef: domRef,
|
|
1313
1353
|
column: item
|
|
1314
1354
|
});
|
|
1315
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
1355
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$TableColumnHeader, {
|
|
1316
1356
|
column: item
|
|
1317
1357
|
});
|
|
1318
1358
|
case "loader":
|
|
1319
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
1359
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$CenteredWrapper, null, /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement((0, $3fpzo$reactspectrumprogress.ProgressCircle), {
|
|
1320
1360
|
isIndeterminate: true,
|
|
1321
1361
|
"aria-label": state.collection.size > 0 ? stringFormatter.format("loadingMore") : stringFormatter.format("loading")
|
|
1322
1362
|
}));
|
|
@@ -1324,7 +1364,7 @@ function $be8a9c035a82f788$var$TableView(props, ref) {
|
|
|
1324
1364
|
{
|
|
1325
1365
|
let emptyState = props.renderEmptyState ? props.renderEmptyState() : null;
|
|
1326
1366
|
if (emptyState == null) return null;
|
|
1327
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
1367
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$CenteredWrapper, null, emptyState);
|
|
1328
1368
|
}
|
|
1329
1369
|
}
|
|
1330
1370
|
};
|
|
@@ -1370,7 +1410,7 @@ function $be8a9c035a82f788$var$TableView(props, ref) {
|
|
|
1370
1410
|
let mergedProps = (0, $3fpzo$reactariautils.mergeProps)(isTableDroppable && (droppableCollection === null || droppableCollection === void 0 ? void 0 : droppableCollection.collectionProps), gridProps, focusProps, (dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.isVirtualDragging()) && {
|
|
1371
1411
|
tabIndex: null
|
|
1372
1412
|
});
|
|
1373
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
1413
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$export$93e4b0b2cc49b648.Provider, {
|
|
1374
1414
|
value: {
|
|
1375
1415
|
state: state,
|
|
1376
1416
|
dragState: dragState,
|
|
@@ -1388,10 +1428,9 @@ function $be8a9c035a82f788$var$TableView(props, ref) {
|
|
|
1388
1428
|
isEmpty: isEmpty,
|
|
1389
1429
|
onFocusedResizer: onFocusedResizer,
|
|
1390
1430
|
headerMenuOpen: headerMenuOpen,
|
|
1391
|
-
setHeaderMenuOpen: setHeaderMenuOpen
|
|
1392
|
-
shouldShowCheckboxes: shouldShowCheckboxes
|
|
1431
|
+
setHeaderMenuOpen: setHeaderMenuOpen
|
|
1393
1432
|
}
|
|
1394
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
1433
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$TableVirtualizer, {
|
|
1395
1434
|
...mergedProps,
|
|
1396
1435
|
...styleProps,
|
|
1397
1436
|
className: (0, $3fpzo$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports))), "spectrum-Table", `spectrum-Table--${density}`, {
|
|
@@ -1419,7 +1458,7 @@ function $be8a9c035a82f788$var$TableView(props, ref) {
|
|
|
1419
1458
|
if (dragAndDropHooks.renderPreview) return dragAndDropHooks.renderPreview(dragState.draggingKeys, dragState.draggedKey);
|
|
1420
1459
|
let itemCount = dragState.draggingKeys.size;
|
|
1421
1460
|
let maxWidth = bodyRef.current.getBoundingClientRect().width;
|
|
1422
|
-
let height = $
|
|
1461
|
+
let height = $e39c6de4eb69450d$var$ROW_HEIGHTS[density][scale];
|
|
1423
1462
|
let itemText = state.collection.getTextValue(dragState.draggedKey);
|
|
1424
1463
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement((0, $f65d44d222cc509b$export$905ab40ac2179daa), {
|
|
1425
1464
|
itemText: itemText,
|
|
@@ -1430,7 +1469,7 @@ function $be8a9c035a82f788$var$TableView(props, ref) {
|
|
|
1430
1469
|
}));
|
|
1431
1470
|
}
|
|
1432
1471
|
// This is a custom Virtualizer that also has a header that syncs its scroll position with the body.
|
|
1433
|
-
function $
|
|
1472
|
+
function $e39c6de4eb69450d$var$TableVirtualizer(props) {
|
|
1434
1473
|
var _layout_getLayoutInfo;
|
|
1435
1474
|
let { layout: layout , collection: collection , focusedKey: focusedKey , renderView: renderView , renderWrapper: renderWrapper , domRef: domRef , bodyRef: bodyRef , headerRef: headerRef , onVisibleRectChange: onVisibleRectChangeProp , isFocusVisible: isFocusVisible , isVirtualDragging: isVirtualDragging , isRootDropTarget: isRootDropTarget , ...otherProps } = props;
|
|
1436
1475
|
let { direction: direction } = (0, $3fpzo$reactariai18n.useLocale)();
|
|
@@ -1532,7 +1571,7 @@ function $be8a9c035a82f788$var$TableVirtualizer(props) {
|
|
|
1532
1571
|
let mergedProps = (0, $3fpzo$reactariautils.mergeProps)(otherProps, virtualizerProps, isVirtualDragging && {
|
|
1533
1572
|
tabIndex: null
|
|
1534
1573
|
});
|
|
1535
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
1574
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$export$d288a7dd40372bc.Provider, {
|
|
1536
1575
|
value: resizingColumn
|
|
1537
1576
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement((0, $3fpzo$reactariafocus.FocusScope), null, /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement("div", {
|
|
1538
1577
|
...mergedProps,
|
|
@@ -1580,7 +1619,7 @@ function $be8a9c035a82f788$var$TableVirtualizer(props) {
|
|
|
1580
1619
|
}
|
|
1581
1620
|
})))));
|
|
1582
1621
|
}
|
|
1583
|
-
function $
|
|
1622
|
+
function $e39c6de4eb69450d$var$TableHeader({ children: children , ...otherProps }) {
|
|
1584
1623
|
let { rowGroupProps: rowGroupProps } = (0, $3fpzo$reactariatable.useTableRowGroup)();
|
|
1585
1624
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement("div", {
|
|
1586
1625
|
...rowGroupProps,
|
|
@@ -1588,11 +1627,11 @@ function $be8a9c035a82f788$var$TableHeader({ children: children , ...otherProps
|
|
|
1588
1627
|
className: (0, $3fpzo$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports))), "spectrum-Table-head")
|
|
1589
1628
|
}, children);
|
|
1590
1629
|
}
|
|
1591
|
-
function $
|
|
1630
|
+
function $e39c6de4eb69450d$var$TableColumnHeader(props) {
|
|
1592
1631
|
var _state_sortDescriptor, _state_sortDescriptor1, _state_sortDescriptor2, _state_sortDescriptor3;
|
|
1593
1632
|
let { column: column } = props;
|
|
1594
1633
|
let ref = (0, $3fpzo$react.useRef)(null);
|
|
1595
|
-
let { state: state , isEmpty: isEmpty } = $
|
|
1634
|
+
let { state: state , isEmpty: isEmpty } = $e39c6de4eb69450d$export$3cb274deb6c2d854();
|
|
1596
1635
|
let { pressProps: pressProps , isPressed: isPressed } = (0, $3fpzo$reactariainteractions.usePress)({
|
|
1597
1636
|
isDisabled: isEmpty
|
|
1598
1637
|
});
|
|
@@ -1639,9 +1678,9 @@ function $be8a9c035a82f788$var$TableColumnHeader(props) {
|
|
|
1639
1678
|
className: (0, $3fpzo$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports))), "spectrum-Table-headCellContents")
|
|
1640
1679
|
}, column.rendered)));
|
|
1641
1680
|
}
|
|
1642
|
-
let $
|
|
1681
|
+
let $e39c6de4eb69450d$var$_TableColumnHeaderButton = (props, ref)=>{
|
|
1643
1682
|
let { focusProps: focusProps , alignment: alignment , ...otherProps } = props;
|
|
1644
|
-
let { isEmpty: isEmpty } = $
|
|
1683
|
+
let { isEmpty: isEmpty } = $e39c6de4eb69450d$export$3cb274deb6c2d854();
|
|
1645
1684
|
let domRef = (0, $3fpzo$reactspectrumutils.useFocusableRef)(ref);
|
|
1646
1685
|
let { buttonProps: buttonProps } = (0, $3fpzo$reactariabutton.useButton)({
|
|
1647
1686
|
...otherProps,
|
|
@@ -1667,14 +1706,14 @@ let $be8a9c035a82f788$var$_TableColumnHeaderButton = (props, ref)=>{
|
|
|
1667
1706
|
ref: domRef
|
|
1668
1707
|
}, props.children));
|
|
1669
1708
|
};
|
|
1670
|
-
let $
|
|
1671
|
-
function $
|
|
1709
|
+
let $e39c6de4eb69450d$var$TableColumnHeaderButton = /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).forwardRef($e39c6de4eb69450d$var$_TableColumnHeaderButton);
|
|
1710
|
+
function $e39c6de4eb69450d$var$ResizableTableColumnHeader(props) {
|
|
1672
1711
|
var _column_props, _state_sortDescriptor, _state_sortDescriptor1, _state_sortDescriptor2, _state_sortDescriptor3;
|
|
1673
1712
|
let { column: column } = props;
|
|
1674
1713
|
let ref = (0, $3fpzo$react.useRef)(null);
|
|
1675
1714
|
let triggerRef = (0, $3fpzo$react.useRef)(null);
|
|
1676
1715
|
let resizingRef = (0, $3fpzo$react.useRef)(null);
|
|
1677
|
-
let { state: state , layout: layout , onResizeStart: onResizeStart , onResize: onResize , onResizeEnd: onResizeEnd , headerRowHovered: headerRowHovered , setIsInResizeMode: setIsInResizeMode , isEmpty: isEmpty , onFocusedResizer: onFocusedResizer , isInResizeMode: isInResizeMode , headerMenuOpen: headerMenuOpen , setHeaderMenuOpen: setHeaderMenuOpen } = $
|
|
1716
|
+
let { state: state , layout: layout , onResizeStart: onResizeStart , onResize: onResize , onResizeEnd: onResizeEnd , headerRowHovered: headerRowHovered , setIsInResizeMode: setIsInResizeMode , isEmpty: isEmpty , onFocusedResizer: onFocusedResizer , isInResizeMode: isInResizeMode , headerMenuOpen: headerMenuOpen , setHeaderMenuOpen: setHeaderMenuOpen } = $e39c6de4eb69450d$export$3cb274deb6c2d854();
|
|
1678
1717
|
let stringFormatter = (0, $3fpzo$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($1a3d6ad53eb75d54$exports))));
|
|
1679
1718
|
let { pressProps: pressProps , isPressed: isPressed } = (0, $3fpzo$reactariainteractions.usePress)({
|
|
1680
1719
|
isDisabled: isEmpty
|
|
@@ -1793,7 +1832,7 @@ function $be8a9c035a82f788$var$ResizableTableColumnHeader(props) {
|
|
|
1793
1832
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement((0, $3fpzo$reactspectrummenu.MenuTrigger), {
|
|
1794
1833
|
onOpenChange: setHeaderMenuOpen,
|
|
1795
1834
|
align: menuAlign
|
|
1796
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
1835
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$TableColumnHeaderButton, {
|
|
1797
1836
|
alignment: alignment,
|
|
1798
1837
|
ref: triggerRef,
|
|
1799
1838
|
focusProps: focusProps
|
|
@@ -1827,9 +1866,9 @@ function $be8a9c035a82f788$var$ResizableTableColumnHeader(props) {
|
|
|
1827
1866
|
})
|
|
1828
1867
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement((0, $18b3deb5c431fa13$export$d9658cdf8c86807), null)))));
|
|
1829
1868
|
}
|
|
1830
|
-
function $
|
|
1869
|
+
function $e39c6de4eb69450d$var$TableSelectAllCell({ column: column }) {
|
|
1831
1870
|
let ref = (0, $3fpzo$react.useRef)();
|
|
1832
|
-
let { state: state } = $
|
|
1871
|
+
let { state: state } = $e39c6de4eb69450d$export$3cb274deb6c2d854();
|
|
1833
1872
|
let isSingleSelectionMode = state.selectionManager.selectionMode === "single";
|
|
1834
1873
|
let { columnHeaderProps: columnHeaderProps } = (0, $3fpzo$reactariatable.useTableColumnHeader)({
|
|
1835
1874
|
node: column,
|
|
@@ -1859,9 +1898,9 @@ function $be8a9c035a82f788$var$TableSelectAllCell({ column: column }) {
|
|
|
1859
1898
|
UNSAFE_className: (0, $3fpzo$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports))), "spectrum-Table-checkbox")
|
|
1860
1899
|
})));
|
|
1861
1900
|
}
|
|
1862
|
-
function $
|
|
1901
|
+
function $e39c6de4eb69450d$var$TableDragHeaderCell({ column: column }) {
|
|
1863
1902
|
let ref = (0, $3fpzo$react.useRef)();
|
|
1864
|
-
let { state: state } = $
|
|
1903
|
+
let { state: state } = $e39c6de4eb69450d$export$3cb274deb6c2d854();
|
|
1865
1904
|
let { columnHeaderProps: columnHeaderProps } = (0, $3fpzo$reactariatable.useTableColumnHeader)({
|
|
1866
1905
|
node: column,
|
|
1867
1906
|
isVirtualized: true
|
|
@@ -1875,15 +1914,15 @@ function $be8a9c035a82f788$var$TableDragHeaderCell({ column: column }) {
|
|
|
1875
1914
|
className: (0, $3fpzo$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports))), "spectrum-Table-headCell", (0, $3fpzo$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($4afcd54cfd94dbb9$exports))), "react-spectrum-Table-headCell", "react-spectrum-Table-dragButtonHeadCell"))
|
|
1876
1915
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement((0, $3fpzo$reactariavisuallyhidden.VisuallyHidden), null, stringFormatter.format("drag"))));
|
|
1877
1916
|
}
|
|
1878
|
-
function $
|
|
1917
|
+
function $e39c6de4eb69450d$var$TableRowGroup({ children: children , ...otherProps }) {
|
|
1879
1918
|
let { rowGroupProps: rowGroupProps } = (0, $3fpzo$reactariatable.useTableRowGroup)();
|
|
1880
1919
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement("div", {
|
|
1881
1920
|
...rowGroupProps,
|
|
1882
1921
|
...otherProps
|
|
1883
1922
|
}, children);
|
|
1884
1923
|
}
|
|
1885
|
-
function $
|
|
1886
|
-
let { dragButtonProps: dragButtonProps , dragButtonRef: dragButtonRef , isFocusVisibleWithin: isFocusVisibleWithin } = $
|
|
1924
|
+
function $e39c6de4eb69450d$var$DragButton() {
|
|
1925
|
+
let { dragButtonProps: dragButtonProps , dragButtonRef: dragButtonRef , isFocusVisibleWithin: isFocusVisibleWithin } = $e39c6de4eb69450d$export$cd7c5802f9e21187();
|
|
1887
1926
|
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $3fpzo$reactariavisuallyhidden.useVisuallyHidden)();
|
|
1888
1927
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement((0, $3fpzo$reactariafocus.FocusRing), {
|
|
1889
1928
|
focusRingClass: (0, $3fpzo$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($4afcd54cfd94dbb9$exports))), "focus-ring")
|
|
@@ -1899,14 +1938,14 @@ function $be8a9c035a82f788$var$DragButton() {
|
|
|
1899
1938
|
UNSAFE_className: (0, $3fpzo$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($4afcd54cfd94dbb9$exports))))
|
|
1900
1939
|
})));
|
|
1901
1940
|
}
|
|
1902
|
-
const $
|
|
1903
|
-
function $
|
|
1904
|
-
return (0, $3fpzo$react.useContext)($
|
|
1941
|
+
const $e39c6de4eb69450d$var$TableRowContext = /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createContext(null);
|
|
1942
|
+
function $e39c6de4eb69450d$export$cd7c5802f9e21187() {
|
|
1943
|
+
return (0, $3fpzo$react.useContext)($e39c6de4eb69450d$var$TableRowContext);
|
|
1905
1944
|
}
|
|
1906
|
-
function $
|
|
1945
|
+
function $e39c6de4eb69450d$var$TableRow({ item: item , children: children , hasActions: hasActions , isTableDraggable: isTableDraggable , isTableDroppable: isTableDroppable , ...otherProps }) {
|
|
1907
1946
|
var _state_collection_rows_find, _layout_getContentSize, _layout_virtualizer;
|
|
1908
1947
|
let ref = (0, $3fpzo$react.useRef)();
|
|
1909
|
-
let { state: state , layout: layout , dragAndDropHooks: dragAndDropHooks , dragState: dragState , dropState: dropState } = $
|
|
1948
|
+
let { state: state , layout: layout , dragAndDropHooks: dragAndDropHooks , dragState: dragState , dropState: dropState } = $e39c6de4eb69450d$export$3cb274deb6c2d854();
|
|
1910
1949
|
let allowsInteraction = state.selectionManager.selectionMode !== "none" || hasActions;
|
|
1911
1950
|
let isDisabled = !allowsInteraction || state.disabledKeys.has(item.key);
|
|
1912
1951
|
let isDroppable = isTableDroppable && !isDisabled;
|
|
@@ -1975,7 +2014,7 @@ function $be8a9c035a82f788$var$TableRow({ item: item , children: children , hasA
|
|
|
1975
2014
|
"aria-hidden": droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.dropProps["aria-hidden"]
|
|
1976
2015
|
};
|
|
1977
2016
|
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $3fpzo$reactariavisuallyhidden.useVisuallyHidden)();
|
|
1978
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
2017
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$TableRowContext.Provider, {
|
|
1979
2018
|
value: {
|
|
1980
2019
|
dragButtonProps: dragButtonProps,
|
|
1981
2020
|
dragButtonRef: dragButtonRef,
|
|
@@ -2026,8 +2065,8 @@ function $be8a9c035a82f788$var$TableRow({ item: item , children: children , hasA
|
|
|
2026
2065
|
}
|
|
2027
2066
|
}));
|
|
2028
2067
|
}
|
|
2029
|
-
function $
|
|
2030
|
-
let { state: state , headerMenuOpen: headerMenuOpen } = $
|
|
2068
|
+
function $e39c6de4eb69450d$var$TableHeaderRow({ item: item , children: children , style: style , ...props }) {
|
|
2069
|
+
let { state: state , headerMenuOpen: headerMenuOpen } = $e39c6de4eb69450d$export$3cb274deb6c2d854();
|
|
2031
2070
|
let ref = (0, $3fpzo$react.useRef)();
|
|
2032
2071
|
let { rowProps: rowProps } = (0, $3fpzo$reactariatable.useTableHeaderRow)({
|
|
2033
2072
|
node: item,
|
|
@@ -2043,9 +2082,9 @@ function $be8a9c035a82f788$var$TableHeaderRow({ item: item , children: children
|
|
|
2043
2082
|
style: style
|
|
2044
2083
|
}, children);
|
|
2045
2084
|
}
|
|
2046
|
-
function $
|
|
2085
|
+
function $e39c6de4eb69450d$var$TableDragCell({ cell: cell }) {
|
|
2047
2086
|
let ref = (0, $3fpzo$react.useRef)();
|
|
2048
|
-
let { state: state , isTableDraggable: isTableDraggable } = $
|
|
2087
|
+
let { state: state , isTableDraggable: isTableDraggable } = $e39c6de4eb69450d$export$3cb274deb6c2d854();
|
|
2049
2088
|
let isDisabled = state.disabledKeys.has(cell.parentKey);
|
|
2050
2089
|
let { gridCellProps: gridCellProps } = (0, $3fpzo$reactariatable.useTableCell)({
|
|
2051
2090
|
node: cell,
|
|
@@ -2059,11 +2098,11 @@ function $be8a9c035a82f788$var$TableDragCell({ cell: cell }) {
|
|
|
2059
2098
|
className: (0, $3fpzo$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports))), "spectrum-Table-cell", {
|
|
2060
2099
|
"is-disabled": isDisabled
|
|
2061
2100
|
}, (0, $3fpzo$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($4afcd54cfd94dbb9$exports))), "react-spectrum-Table-cell", "react-spectrum-Table-dragButtonCell"))
|
|
2062
|
-
}, isTableDraggable && !isDisabled && /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($
|
|
2101
|
+
}, isTableDraggable && !isDisabled && /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$DragButton, null)));
|
|
2063
2102
|
}
|
|
2064
|
-
function $
|
|
2103
|
+
function $e39c6de4eb69450d$var$TableCheckboxCell({ cell: cell }) {
|
|
2065
2104
|
let ref = (0, $3fpzo$react.useRef)();
|
|
2066
|
-
let { state: state } = $
|
|
2105
|
+
let { state: state } = $e39c6de4eb69450d$export$3cb274deb6c2d854();
|
|
2067
2106
|
let isDisabled = state.disabledKeys.has(cell.parentKey);
|
|
2068
2107
|
let { gridCellProps: gridCellProps } = (0, $3fpzo$reactariatable.useTableCell)({
|
|
2069
2108
|
node: cell,
|
|
@@ -2087,8 +2126,10 @@ function $be8a9c035a82f788$var$TableCheckboxCell({ cell: cell }) {
|
|
|
2087
2126
|
UNSAFE_className: (0, $3fpzo$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports))), "spectrum-Table-checkbox")
|
|
2088
2127
|
})));
|
|
2089
2128
|
}
|
|
2090
|
-
function $
|
|
2091
|
-
let {
|
|
2129
|
+
function $e39c6de4eb69450d$var$TableCell({ cell: cell }) {
|
|
2130
|
+
let { scale: scale } = (0, $3fpzo$reactspectrumprovider.useProvider)();
|
|
2131
|
+
let { state: state } = $e39c6de4eb69450d$export$3cb274deb6c2d854();
|
|
2132
|
+
let isExpandableTable = "expandedKeys" in state;
|
|
2092
2133
|
let ref = (0, $3fpzo$react.useRef)();
|
|
2093
2134
|
let columnProps = cell.column.props;
|
|
2094
2135
|
let isDisabled = state.disabledKeys.has(cell.parentKey);
|
|
@@ -2096,11 +2137,27 @@ function $be8a9c035a82f788$var$TableCell({ cell: cell }) {
|
|
|
2096
2137
|
node: cell,
|
|
2097
2138
|
isVirtualized: true
|
|
2098
2139
|
}, state, ref);
|
|
2140
|
+
let { id: id , ...otherGridCellProps } = gridCellProps;
|
|
2141
|
+
let isFirstRowHeaderCell = state.collection.rowHeaderColumnKeys.keys().next().value === cell.column.key;
|
|
2142
|
+
let isRowExpandable = false;
|
|
2143
|
+
let showExpandCollapseButton = false;
|
|
2144
|
+
let levelOffset = 0;
|
|
2145
|
+
if ("expandedKeys" in state) {
|
|
2146
|
+
var _state_keyMap_get_props_UNSTABLE_childItems, _state_keyMap_get, _state_keyMap_get1, _state_keyMap_get_props, _state_keyMap_get_props_children;
|
|
2147
|
+
isRowExpandable = ((_state_keyMap_get_props_UNSTABLE_childItems = (_state_keyMap_get = state.keyMap.get(cell.parentKey)) === null || _state_keyMap_get === void 0 ? void 0 : _state_keyMap_get.props.UNSTABLE_childItems) === null || _state_keyMap_get_props_UNSTABLE_childItems === void 0 ? void 0 : _state_keyMap_get_props_UNSTABLE_childItems.length) > 0 || ((_state_keyMap_get1 = state.keyMap.get(cell.parentKey)) === null || _state_keyMap_get1 === void 0 ? void 0 : (_state_keyMap_get_props = _state_keyMap_get1.props) === null || _state_keyMap_get_props === void 0 ? void 0 : (_state_keyMap_get_props_children = _state_keyMap_get_props.children) === null || _state_keyMap_get_props_children === void 0 ? void 0 : _state_keyMap_get_props_children.length) > state.userColumnCount;
|
|
2148
|
+
showExpandCollapseButton = isFirstRowHeaderCell && isRowExpandable;
|
|
2149
|
+
// Offset based on level, and add additional offset if there is no expand/collapse button on a row
|
|
2150
|
+
levelOffset = (cell.level - 2) * $e39c6de4eb69450d$var$LEVEL_OFFSET_WIDTH[scale] + (!showExpandCollapseButton ? $e39c6de4eb69450d$var$LEVEL_OFFSET_WIDTH[scale] * 2 : 0);
|
|
2151
|
+
}
|
|
2099
2152
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement((0, $3fpzo$reactariafocus.FocusRing), {
|
|
2100
2153
|
focusRingClass: (0, $3fpzo$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports))), "focus-ring")
|
|
2101
2154
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement("div", {
|
|
2102
|
-
...
|
|
2155
|
+
...otherGridCellProps,
|
|
2156
|
+
"aria-labelledby": id,
|
|
2103
2157
|
ref: ref,
|
|
2158
|
+
style: isExpandableTable && isFirstRowHeaderCell ? {
|
|
2159
|
+
paddingInlineStart: levelOffset
|
|
2160
|
+
} : {},
|
|
2104
2161
|
className: (0, $3fpzo$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports))), "spectrum-Table-cell", {
|
|
2105
2162
|
"spectrum-Table-cell--divider": columnProps.showDivider && cell.column.nextKey !== null,
|
|
2106
2163
|
"spectrum-Table-cell--hideHeader": columnProps.hideHeader,
|
|
@@ -2108,26 +2165,146 @@ function $be8a9c035a82f788$var$TableCell({ cell: cell }) {
|
|
|
2108
2165
|
}, (0, $3fpzo$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($4afcd54cfd94dbb9$exports))), "react-spectrum-Table-cell", {
|
|
2109
2166
|
"react-spectrum-Table-cell--alignStart": columnProps.align === "start",
|
|
2110
2167
|
"react-spectrum-Table-cell--alignCenter": columnProps.align === "center",
|
|
2111
|
-
"react-spectrum-Table-cell--alignEnd": columnProps.align === "end"
|
|
2168
|
+
"react-spectrum-Table-cell--alignEnd": columnProps.align === "end",
|
|
2169
|
+
"react-spectrum-Table-cell--hasExpandCollapseButton": showExpandCollapseButton
|
|
2112
2170
|
}))
|
|
2113
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement(
|
|
2171
|
+
}, showExpandCollapseButton && /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement($e39c6de4eb69450d$var$ExpandableRowChevron, {
|
|
2172
|
+
cell: cell
|
|
2173
|
+
}), /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement("span", {
|
|
2174
|
+
id: id,
|
|
2114
2175
|
className: (0, $3fpzo$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports))), "spectrum-Table-cellContents")
|
|
2115
2176
|
}, cell.rendered)));
|
|
2116
2177
|
}
|
|
2117
|
-
function $
|
|
2118
|
-
|
|
2178
|
+
function $e39c6de4eb69450d$var$ExpandableRowChevron({ cell: cell }) {
|
|
2179
|
+
// TODO: move some/all of the chevron button setup into a separate hook?
|
|
2180
|
+
let { direction: direction } = (0, $3fpzo$reactariai18n.useLocale)();
|
|
2181
|
+
let { state: state } = $e39c6de4eb69450d$export$3cb274deb6c2d854();
|
|
2182
|
+
let expandButtonRef = (0, $3fpzo$react.useRef)();
|
|
2183
|
+
let stringFormatter = (0, $3fpzo$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($1a3d6ad53eb75d54$exports))));
|
|
2184
|
+
let isExpanded;
|
|
2185
|
+
if ("expandedKeys" in state) isExpanded = state.expandedKeys === "all" || state.expandedKeys.has(cell.parentKey);
|
|
2186
|
+
// Will need to keep the chevron as a button for iOS VO at all times since VO doesn't focus the cell. Also keep as button if cellAction is defined by the user in the future
|
|
2187
|
+
let { buttonProps: buttonProps } = (0, $3fpzo$reactariabutton.useButton)({
|
|
2188
|
+
// Desktop and mobile both toggle expansion of a native expandable row on mouse/touch up
|
|
2189
|
+
onPress: ()=>{
|
|
2190
|
+
state.toggleKey(cell.parentKey);
|
|
2191
|
+
if (!(0, $3fpzo$reactariainteractions.isFocusVisible)()) {
|
|
2192
|
+
state.selectionManager.setFocused(true);
|
|
2193
|
+
state.selectionManager.setFocusedKey(cell.parentKey);
|
|
2194
|
+
}
|
|
2195
|
+
},
|
|
2196
|
+
elementType: "span",
|
|
2197
|
+
"aria-label": isExpanded ? stringFormatter.format("collapse") : stringFormatter.format("expand")
|
|
2198
|
+
}, expandButtonRef);
|
|
2199
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement("span", {
|
|
2200
|
+
...buttonProps,
|
|
2201
|
+
ref: expandButtonRef,
|
|
2202
|
+
// Override tabindex so that grid keyboard nav skips over it. Needs -1 so android talkback can actually "focus" it
|
|
2203
|
+
tabIndex: (0, $3fpzo$reactariautils.isAndroid)() ? -1 : undefined,
|
|
2204
|
+
className: (0, $3fpzo$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports))), "spectrum-Table-expandButton", {
|
|
2205
|
+
"is-open": isExpanded
|
|
2206
|
+
})
|
|
2207
|
+
}, direction === "ltr" ? /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement((0, ($parcel$interopDefault($3fpzo$spectrumiconsuiChevronRightMedium))), null) : /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement((0, ($parcel$interopDefault($3fpzo$spectrumiconsuiChevronLeftMedium))), null));
|
|
2208
|
+
}
|
|
2209
|
+
function $e39c6de4eb69450d$var$CenteredWrapper({ children: children }) {
|
|
2210
|
+
let { state: state } = $e39c6de4eb69450d$export$3cb274deb6c2d854();
|
|
2211
|
+
let rowProps;
|
|
2212
|
+
if ("expandedKeys" in state) {
|
|
2213
|
+
let topLevelRowCount = [
|
|
2214
|
+
...state.keyMap.get(state.collection.body.key).childNodes
|
|
2215
|
+
].length;
|
|
2216
|
+
rowProps = {
|
|
2217
|
+
"aria-level": 1,
|
|
2218
|
+
"aria-posinset": topLevelRowCount + 1,
|
|
2219
|
+
"aria-setsize": topLevelRowCount + 1
|
|
2220
|
+
};
|
|
2221
|
+
} else rowProps = {
|
|
2222
|
+
"aria-rowindex": state.collection.headerRows.length + state.collection.size + 1
|
|
2223
|
+
};
|
|
2119
2224
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement("div", {
|
|
2120
2225
|
role: "row",
|
|
2121
|
-
|
|
2226
|
+
...rowProps,
|
|
2122
2227
|
className: (0, $3fpzo$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($4afcd54cfd94dbb9$exports))), "react-spectrum-Table-centeredWrapper")
|
|
2123
2228
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement("div", {
|
|
2124
2229
|
role: "rowheader",
|
|
2125
2230
|
"aria-colspan": state.collection.columns.length
|
|
2126
2231
|
}, children));
|
|
2127
2232
|
}
|
|
2233
|
+
const $e39c6de4eb69450d$export$517e02184d273d69 = /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).forwardRef($e39c6de4eb69450d$var$TableViewBase);
|
|
2234
|
+
|
|
2235
|
+
|
|
2236
|
+
|
|
2237
|
+
function $be8a9c035a82f788$var$TableView(props, ref) {
|
|
2238
|
+
let { selectionStyle: selectionStyle , dragAndDropHooks: dragAndDropHooks } = props;
|
|
2239
|
+
let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $3fpzo$react.useState)(selectionStyle !== "highlight");
|
|
2240
|
+
let isTableDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
|
|
2241
|
+
let state = (0, $3fpzo$reactstatelytable.useTableState)({
|
|
2242
|
+
...props,
|
|
2243
|
+
showSelectionCheckboxes: showSelectionCheckboxes,
|
|
2244
|
+
showDragButtons: isTableDraggable,
|
|
2245
|
+
selectionBehavior: props.selectionStyle === "highlight" ? "replace" : "toggle"
|
|
2246
|
+
});
|
|
2247
|
+
// If the selection behavior changes in state, we need to update showSelectionCheckboxes here due to the circular dependency...
|
|
2248
|
+
let shouldShowCheckboxes = state.selectionManager.selectionBehavior !== "replace";
|
|
2249
|
+
if (shouldShowCheckboxes !== showSelectionCheckboxes) setShowSelectionCheckboxes(shouldShowCheckboxes);
|
|
2250
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement((0, $e39c6de4eb69450d$export$517e02184d273d69), {
|
|
2251
|
+
...props,
|
|
2252
|
+
state: state,
|
|
2253
|
+
ref: ref
|
|
2254
|
+
});
|
|
2255
|
+
}
|
|
2256
|
+
const $be8a9c035a82f788$export$b3c27e869d856b7 = /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).forwardRef($be8a9c035a82f788$var$TableView);
|
|
2257
|
+
|
|
2258
|
+
|
|
2259
|
+
/*
|
|
2260
|
+
* Copyright 2023 Adobe. All rights reserved.
|
|
2261
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
2262
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
2263
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
2264
|
+
*
|
|
2265
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
2266
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
2267
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
2268
|
+
* governing permissions and limitations under the License.
|
|
2269
|
+
*/
|
|
2270
|
+
|
|
2271
|
+
|
|
2272
|
+
function $e770cde7e93c7e49$var$TreeGridTableView(props, ref) {
|
|
2273
|
+
let { selectionStyle: selectionStyle , dragAndDropHooks: dragAndDropHooks } = props;
|
|
2274
|
+
let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $3fpzo$react.useState)(selectionStyle !== "highlight");
|
|
2275
|
+
let isTableDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
|
|
2276
|
+
let state = (0, $3fpzo$reactstatelytable.UNSTABLE_useTreeGridState)({
|
|
2277
|
+
...props,
|
|
2278
|
+
showSelectionCheckboxes: showSelectionCheckboxes,
|
|
2279
|
+
showDragButtons: isTableDraggable,
|
|
2280
|
+
selectionBehavior: props.selectionStyle === "highlight" ? "replace" : "toggle"
|
|
2281
|
+
});
|
|
2282
|
+
// If the selection behavior changes in state, we need to update showSelectionCheckboxes here due to the circular dependency...
|
|
2283
|
+
let shouldShowCheckboxes = state.selectionManager.selectionBehavior !== "replace";
|
|
2284
|
+
if (shouldShowCheckboxes !== showSelectionCheckboxes) setShowSelectionCheckboxes(shouldShowCheckboxes);
|
|
2285
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement((0, $e39c6de4eb69450d$export$517e02184d273d69), {
|
|
2286
|
+
...props,
|
|
2287
|
+
state: state,
|
|
2288
|
+
ref: ref
|
|
2289
|
+
});
|
|
2290
|
+
}
|
|
2291
|
+
const $e770cde7e93c7e49$export$5669566ac2c90964 = /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).forwardRef($e770cde7e93c7e49$var$TreeGridTableView);
|
|
2292
|
+
|
|
2293
|
+
|
|
2294
|
+
function $9802a0717549c6f1$var$TableViewWrapper(props, ref) {
|
|
2295
|
+
let { UNSTABLE_allowsExpandableRows: UNSTABLE_allowsExpandableRows , ...otherProps } = props;
|
|
2296
|
+
if ((0, $3fpzo$reactstatelyflags.tableNestedRows)() && UNSTABLE_allowsExpandableRows) return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement((0, $e770cde7e93c7e49$export$5669566ac2c90964), {
|
|
2297
|
+
...otherProps,
|
|
2298
|
+
ref: ref
|
|
2299
|
+
});
|
|
2300
|
+
else return /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).createElement((0, $be8a9c035a82f788$export$b3c27e869d856b7), {
|
|
2301
|
+
...otherProps,
|
|
2302
|
+
ref: ref
|
|
2303
|
+
});
|
|
2304
|
+
}
|
|
2128
2305
|
/**
|
|
2129
2306
|
* Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
|
|
2130
|
-
*/ const $
|
|
2307
|
+
*/ const $9802a0717549c6f1$export$b3c27e869d856b7 = /*#__PURE__*/ (0, ($parcel$interopDefault($3fpzo$react))).forwardRef($9802a0717549c6f1$var$TableViewWrapper);
|
|
2131
2308
|
|
|
2132
2309
|
|
|
2133
2310
|
|