@react-spectrum/table 3.2.0 → 3.2.1-nightly.3293
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/main.css +1 -1
- package/dist/main.js +689 -36
- package/dist/main.js.map +1 -1
- package/dist/module.js +693 -40
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +27 -27
- package/src/Resizer.tsx +0 -1
- package/src/TableView.tsx +11 -12
- package/src/TableView_DEPRECATED.tsx +3 -3
- package/src/index.ts +1 -1
- package/src/table.css +1 -1
package/dist/main.js
CHANGED
|
@@ -5,12 +5,14 @@ var $3fpzo$reactariautils = require("@react-aria/utils");
|
|
|
5
5
|
var $3fpzo$reactspectrumcheckbox = require("@react-spectrum/checkbox");
|
|
6
6
|
var $3fpzo$reactspectrumutils = require("@react-spectrum/utils");
|
|
7
7
|
var $3fpzo$reactariafocus = require("@react-aria/focus");
|
|
8
|
+
var $3fpzo$reactspectrummenu = require("@react-spectrum/menu");
|
|
8
9
|
var $3fpzo$reactariavirtualizer = require("@react-aria/virtualizer");
|
|
9
10
|
var $3fpzo$reactspectrumprogress = require("@react-spectrum/progress");
|
|
10
11
|
var $3fpzo$react = require("react");
|
|
11
12
|
var $3fpzo$reactstatelyvirtualizer = require("@react-stately/virtualizer");
|
|
12
13
|
var $3fpzo$reactstatelylayout = require("@react-stately/layout");
|
|
13
14
|
var $3fpzo$reactspectrumtooltip = require("@react-spectrum/tooltip");
|
|
15
|
+
var $3fpzo$reactariabutton = require("@react-aria/button");
|
|
14
16
|
var $3fpzo$reactariainteractions = require("@react-aria/interactions");
|
|
15
17
|
var $3fpzo$reactariai18n = require("@react-aria/i18n");
|
|
16
18
|
var $3fpzo$reactspectrumprovider = require("@react-spectrum/provider");
|
|
@@ -25,7 +27,7 @@ function $parcel$interopDefault(a) {
|
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
$parcel$export(module.exports, "Column", () => $4b0b515c47252574$export$816b5d811295e6bc);
|
|
28
|
-
$parcel$export(module.exports, "TableView", () => $
|
|
30
|
+
$parcel$export(module.exports, "TableView", () => $be8a9c035a82f788$export$b3c27e869d856b7);
|
|
29
31
|
$parcel$export(module.exports, "TableHeader", () => $3fpzo$reactstatelytable.TableHeader);
|
|
30
32
|
$parcel$export(module.exports, "TableBody", () => $3fpzo$reactstatelytable.TableBody);
|
|
31
33
|
$parcel$export(module.exports, "Section", () => $3fpzo$reactstatelytable.Section);
|
|
@@ -39,139 +41,139 @@ $parcel$export(module.exports, "Cell", () => $3fpzo$reactstatelytable.Cell);
|
|
|
39
41
|
|
|
40
42
|
var $a89862f958371476$exports = {};
|
|
41
43
|
var $aea5dbc70156d941$exports = {};
|
|
42
|
-
$aea5dbc70156d941$exports = JSON.parse("{\"loading\":\"جارٍ التحميل...\",\"loadingMore\":\"جارٍ تحميل المزيد...\"}");
|
|
44
|
+
$aea5dbc70156d941$exports = JSON.parse("{\"loading\":\"جارٍ التحميل...\",\"loadingMore\":\"جارٍ تحميل المزيد...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
43
45
|
|
|
44
46
|
|
|
45
47
|
var $11f14c1e8be327ec$exports = {};
|
|
46
|
-
$11f14c1e8be327ec$exports = JSON.parse("{\"loading\":\"Зареждане...\",\"loadingMore\":\"Зареждане на още...\"}");
|
|
48
|
+
$11f14c1e8be327ec$exports = JSON.parse("{\"loading\":\"Зареждане...\",\"loadingMore\":\"Зареждане на още...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
47
49
|
|
|
48
50
|
|
|
49
51
|
var $2ecdfa3a3f4780a9$exports = {};
|
|
50
|
-
$2ecdfa3a3f4780a9$exports = JSON.parse("{\"loading\":\"Načítání...\",\"loadingMore\":\"Načítání dalších...\"}");
|
|
52
|
+
$2ecdfa3a3f4780a9$exports = JSON.parse("{\"loading\":\"Načítání...\",\"loadingMore\":\"Načítání dalších...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
51
53
|
|
|
52
54
|
|
|
53
55
|
var $5adae494c3f47d1c$exports = {};
|
|
54
|
-
$5adae494c3f47d1c$exports = JSON.parse("{\"loading\":\"Indlæser ...\",\"loadingMore\":\"Indlæser flere ...\"}");
|
|
56
|
+
$5adae494c3f47d1c$exports = JSON.parse("{\"loading\":\"Indlæser ...\",\"loadingMore\":\"Indlæser flere ...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
55
57
|
|
|
56
58
|
|
|
57
59
|
var $6239e14fe242b5cd$exports = {};
|
|
58
|
-
$6239e14fe242b5cd$exports = JSON.parse("{\"loading\":\"Laden...\",\"loadingMore\":\"Mehr laden ...\"}");
|
|
60
|
+
$6239e14fe242b5cd$exports = JSON.parse("{\"loading\":\"Laden...\",\"loadingMore\":\"Mehr laden ...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
59
61
|
|
|
60
62
|
|
|
61
63
|
var $548083df36594e1d$exports = {};
|
|
62
|
-
$548083df36594e1d$exports = JSON.parse("{\"loading\":\"Φόρτωση...\",\"loadingMore\":\"Φόρτωση περισσότερων...\"}");
|
|
64
|
+
$548083df36594e1d$exports = JSON.parse("{\"loading\":\"Φόρτωση...\",\"loadingMore\":\"Φόρτωση περισσότερων...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
63
65
|
|
|
64
66
|
|
|
65
67
|
var $b5db09171b92c95b$exports = {};
|
|
66
|
-
$b5db09171b92c95b$exports = JSON.parse("{\"loading\":\"Loading…\",\"loadingMore\":\"Loading more…\"}");
|
|
68
|
+
$b5db09171b92c95b$exports = JSON.parse("{\"loading\":\"Loading…\",\"loadingMore\":\"Loading more…\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
67
69
|
|
|
68
70
|
|
|
69
71
|
var $4da957af4062e6c6$exports = {};
|
|
70
|
-
$4da957af4062e6c6$exports = JSON.parse("{\"loading\":\"Cargando…\",\"loadingMore\":\"Cargando más…\"}");
|
|
72
|
+
$4da957af4062e6c6$exports = JSON.parse("{\"loading\":\"Cargando…\",\"loadingMore\":\"Cargando más…\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
71
73
|
|
|
72
74
|
|
|
73
75
|
var $74726a0aedf994f5$exports = {};
|
|
74
|
-
$74726a0aedf994f5$exports = JSON.parse("{\"loading\":\"Laadimine...\",\"loadingMore\":\"Laadi rohkem...\"}");
|
|
76
|
+
$74726a0aedf994f5$exports = JSON.parse("{\"loading\":\"Laadimine...\",\"loadingMore\":\"Laadi rohkem...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
75
77
|
|
|
76
78
|
|
|
77
79
|
var $801f6ae5b3d3b235$exports = {};
|
|
78
|
-
$801f6ae5b3d3b235$exports = JSON.parse("{\"loading\":\"Ladataan…\",\"loadingMore\":\"Ladataan lisää…\"}");
|
|
80
|
+
$801f6ae5b3d3b235$exports = JSON.parse("{\"loading\":\"Ladataan…\",\"loadingMore\":\"Ladataan lisää…\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
79
81
|
|
|
80
82
|
|
|
81
83
|
var $9360047b0141de84$exports = {};
|
|
82
|
-
$9360047b0141de84$exports = JSON.parse("{\"loading\":\"Chargement...\",\"loadingMore\":\"Chargement supplémentaire...\"}");
|
|
84
|
+
$9360047b0141de84$exports = JSON.parse("{\"loading\":\"Chargement...\",\"loadingMore\":\"Chargement supplémentaire...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
83
85
|
|
|
84
86
|
|
|
85
87
|
var $3cf53c7fc4feae86$exports = {};
|
|
86
|
-
$3cf53c7fc4feae86$exports = JSON.parse("{\"loading\":\"טוען...\",\"loadingMore\":\"טוען עוד...\"}");
|
|
88
|
+
$3cf53c7fc4feae86$exports = JSON.parse("{\"loading\":\"טוען...\",\"loadingMore\":\"טוען עוד...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
87
89
|
|
|
88
90
|
|
|
89
91
|
var $450e2334eb2be6c9$exports = {};
|
|
90
|
-
$450e2334eb2be6c9$exports = JSON.parse("{\"loading\":\"Učitavam...\",\"loadingMore\":\"Učitavam još...\"}");
|
|
92
|
+
$450e2334eb2be6c9$exports = JSON.parse("{\"loading\":\"Učitavam...\",\"loadingMore\":\"Učitavam još...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
91
93
|
|
|
92
94
|
|
|
93
95
|
var $858276b4ec508f2f$exports = {};
|
|
94
|
-
$858276b4ec508f2f$exports = JSON.parse("{\"loading\":\"Betöltés folyamatban…\",\"loadingMore\":\"Továbbiak betöltése folyamatban…\"}");
|
|
96
|
+
$858276b4ec508f2f$exports = JSON.parse("{\"loading\":\"Betöltés folyamatban…\",\"loadingMore\":\"Továbbiak betöltése folyamatban…\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
95
97
|
|
|
96
98
|
|
|
97
99
|
var $a7e2289ac11d4bcc$exports = {};
|
|
98
|
-
$a7e2289ac11d4bcc$exports = JSON.parse("{\"loading\":\"Caricamento...\",\"loadingMore\":\"Caricamento altri...\"}");
|
|
100
|
+
$a7e2289ac11d4bcc$exports = JSON.parse("{\"loading\":\"Caricamento...\",\"loadingMore\":\"Caricamento altri...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
99
101
|
|
|
100
102
|
|
|
101
103
|
var $069e94bb941acd04$exports = {};
|
|
102
|
-
$069e94bb941acd04$exports = JSON.parse("{\"loading\":\"読み込み中...\",\"loadingMore\":\"さらに読み込み中...\"}");
|
|
104
|
+
$069e94bb941acd04$exports = JSON.parse("{\"loading\":\"読み込み中...\",\"loadingMore\":\"さらに読み込み中...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
103
105
|
|
|
104
106
|
|
|
105
107
|
var $6df8b1c85e0d6c1c$exports = {};
|
|
106
|
-
$6df8b1c85e0d6c1c$exports = JSON.parse("{\"loading\":\"로드 중\",\"loadingMore\":\"추가 로드 중\"}");
|
|
108
|
+
$6df8b1c85e0d6c1c$exports = JSON.parse("{\"loading\":\"로드 중\",\"loadingMore\":\"추가 로드 중\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
107
109
|
|
|
108
110
|
|
|
109
111
|
var $e339442a63cca57f$exports = {};
|
|
110
|
-
$e339442a63cca57f$exports = JSON.parse("{\"loading\":\"Įkeliama...\",\"loadingMore\":\"Įkeliama daugiau...\"}");
|
|
112
|
+
$e339442a63cca57f$exports = JSON.parse("{\"loading\":\"Įkeliama...\",\"loadingMore\":\"Įkeliama daugiau...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
111
113
|
|
|
112
114
|
|
|
113
115
|
var $8d629efbd88ee34d$exports = {};
|
|
114
|
-
$8d629efbd88ee34d$exports = JSON.parse("{\"loading\":\"Notiek ielāde...\",\"loadingMore\":\"Tiek ielādēts vēl...\"}");
|
|
116
|
+
$8d629efbd88ee34d$exports = JSON.parse("{\"loading\":\"Notiek ielāde...\",\"loadingMore\":\"Tiek ielādēts vēl...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
115
117
|
|
|
116
118
|
|
|
117
119
|
var $c0daac194b2d01a3$exports = {};
|
|
118
|
-
$c0daac194b2d01a3$exports = JSON.parse("{\"loading\":\"Laster inn ...\",\"loadingMore\":\"Laster inn flere ...\"}");
|
|
120
|
+
$c0daac194b2d01a3$exports = JSON.parse("{\"loading\":\"Laster inn ...\",\"loadingMore\":\"Laster inn flere ...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
119
121
|
|
|
120
122
|
|
|
121
123
|
var $39589c06d5afb6db$exports = {};
|
|
122
|
-
$39589c06d5afb6db$exports = JSON.parse("{\"loading\":\"Laden...\",\"loadingMore\":\"Meer laden...\"}");
|
|
124
|
+
$39589c06d5afb6db$exports = JSON.parse("{\"loading\":\"Laden...\",\"loadingMore\":\"Meer laden...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
123
125
|
|
|
124
126
|
|
|
125
127
|
var $4333ec237d5afa31$exports = {};
|
|
126
|
-
$4333ec237d5afa31$exports = JSON.parse("{\"loading\":\"Ładowanie...\",\"loadingMore\":\"Wczytywanie większej liczby...\"}");
|
|
128
|
+
$4333ec237d5afa31$exports = JSON.parse("{\"loading\":\"Ładowanie...\",\"loadingMore\":\"Wczytywanie większej liczby...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
127
129
|
|
|
128
130
|
|
|
129
131
|
var $5aa66c54d994ad4c$exports = {};
|
|
130
|
-
$5aa66c54d994ad4c$exports = JSON.parse("{\"loading\":\"Carregando...\",\"loadingMore\":\"Carregando mais...\"}");
|
|
132
|
+
$5aa66c54d994ad4c$exports = JSON.parse("{\"loading\":\"Carregando...\",\"loadingMore\":\"Carregando mais...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
131
133
|
|
|
132
134
|
|
|
133
135
|
var $d2901017a4a40e5f$exports = {};
|
|
134
|
-
$d2901017a4a40e5f$exports = JSON.parse("{\"loading\":\"A carregar...\",\"loadingMore\":\"A carregar mais...\"}");
|
|
136
|
+
$d2901017a4a40e5f$exports = JSON.parse("{\"loading\":\"A carregar...\",\"loadingMore\":\"A carregar mais...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
135
137
|
|
|
136
138
|
|
|
137
139
|
var $b247d60aff277eee$exports = {};
|
|
138
|
-
$b247d60aff277eee$exports = JSON.parse("{\"loading\":\"Se încarcă...\",\"loadingMore\":\"Se încarcă mai multe...\"}");
|
|
140
|
+
$b247d60aff277eee$exports = JSON.parse("{\"loading\":\"Se încarcă...\",\"loadingMore\":\"Se încarcă mai multe...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
139
141
|
|
|
140
142
|
|
|
141
143
|
var $2f6a66990fe0eb2b$exports = {};
|
|
142
|
-
$2f6a66990fe0eb2b$exports = JSON.parse("{\"loading\":\"Загрузка...\",\"loadingMore\":\"Дополнительная загрузка...\"}");
|
|
144
|
+
$2f6a66990fe0eb2b$exports = JSON.parse("{\"loading\":\"Загрузка...\",\"loadingMore\":\"Дополнительная загрузка...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
143
145
|
|
|
144
146
|
|
|
145
147
|
var $1e8c28cc0013ef8e$exports = {};
|
|
146
|
-
$1e8c28cc0013ef8e$exports = JSON.parse("{\"loading\":\"Načítava sa...\",\"loadingMore\":\"Načítava sa viac...\"}");
|
|
148
|
+
$1e8c28cc0013ef8e$exports = JSON.parse("{\"loading\":\"Načítava sa...\",\"loadingMore\":\"Načítava sa viac...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
147
149
|
|
|
148
150
|
|
|
149
151
|
var $a63729a5f7450d5e$exports = {};
|
|
150
|
-
$a63729a5f7450d5e$exports = JSON.parse("{\"loading\":\"Nalaganje...\",\"loadingMore\":\"Nalaganje več vsebine...\"}");
|
|
152
|
+
$a63729a5f7450d5e$exports = JSON.parse("{\"loading\":\"Nalaganje...\",\"loadingMore\":\"Nalaganje več vsebine...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
151
153
|
|
|
152
154
|
|
|
153
155
|
var $9c992f998f269d4d$exports = {};
|
|
154
|
-
$9c992f998f269d4d$exports = JSON.parse("{\"loading\":\"Učitavam...\",\"loadingMore\":\"Učitavam još...\"}");
|
|
156
|
+
$9c992f998f269d4d$exports = JSON.parse("{\"loading\":\"Učitavam...\",\"loadingMore\":\"Učitavam još...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
155
157
|
|
|
156
158
|
|
|
157
159
|
var $45c12baedb14591e$exports = {};
|
|
158
|
-
$45c12baedb14591e$exports = JSON.parse("{\"loading\":\"Läser in...\",\"loadingMore\":\"Läser in mer...\"}");
|
|
160
|
+
$45c12baedb14591e$exports = JSON.parse("{\"loading\":\"Läser in...\",\"loadingMore\":\"Läser in mer...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
159
161
|
|
|
160
162
|
|
|
161
163
|
var $d960f28e0cef8a8c$exports = {};
|
|
162
|
-
$d960f28e0cef8a8c$exports = JSON.parse("{\"loading\":\"Yükleniyor...\",\"loadingMore\":\"Daha fazla yükleniyor...\"}");
|
|
164
|
+
$d960f28e0cef8a8c$exports = JSON.parse("{\"loading\":\"Yükleniyor...\",\"loadingMore\":\"Daha fazla yükleniyor...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
163
165
|
|
|
164
166
|
|
|
165
167
|
var $693364411fbb8580$exports = {};
|
|
166
|
-
$693364411fbb8580$exports = JSON.parse("{\"loading\":\"Завантаження…\",\"loadingMore\":\"Завантаження інших об’єктів...\"}");
|
|
168
|
+
$693364411fbb8580$exports = JSON.parse("{\"loading\":\"Завантаження…\",\"loadingMore\":\"Завантаження інших об’єктів...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
167
169
|
|
|
168
170
|
|
|
169
171
|
var $85fd0a65720e1eb6$exports = {};
|
|
170
|
-
$85fd0a65720e1eb6$exports = JSON.parse("{\"loading\":\"正在加载...\",\"loadingMore\":\"正在加载更多...\"}");
|
|
172
|
+
$85fd0a65720e1eb6$exports = JSON.parse("{\"loading\":\"正在加载...\",\"loadingMore\":\"正在加载更多...\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
171
173
|
|
|
172
174
|
|
|
173
175
|
var $0624a686d9964a9c$exports = {};
|
|
174
|
-
$0624a686d9964a9c$exports = JSON.parse("{\"loading\":\"正在載入\",\"loadingMore\":\"正在載入更多…\"}");
|
|
176
|
+
$0624a686d9964a9c$exports = JSON.parse("{\"loading\":\"正在載入\",\"loadingMore\":\"正在載入更多…\",\"sortAscending\":\"Sort Ascending\",\"sortDescending\":\"Sort Descending\",\"resizeColumn\":\"Resize column\"}");
|
|
175
177
|
|
|
176
178
|
|
|
177
179
|
$a89862f958371476$exports = {
|
|
@@ -216,6 +218,10 @@ $a89862f958371476$exports = {
|
|
|
216
218
|
|
|
217
219
|
|
|
218
220
|
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
219
225
|
var $982885d0a34882ea$exports = {};
|
|
220
226
|
|
|
221
227
|
$parcel$export($982885d0a34882ea$exports, "spectrum-Table", () => $982885d0a34882ea$export$455c59d2b5bafef0, (v) => $982885d0a34882ea$export$455c59d2b5bafef0 = v);
|
|
@@ -340,6 +346,31 @@ $982885d0a34882ea$export$d35bc1e505d1ebbf = "is-disabled_d0fc74";
|
|
|
340
346
|
$982885d0a34882ea$export$53aa811f86efbfad = "is-next-selected_d0fc74";
|
|
341
347
|
|
|
342
348
|
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
function $2877766f94c67a67$var$Resizer(props, ref) {
|
|
352
|
+
const { item: item } = props;
|
|
353
|
+
let { state: state } = $be8a9c035a82f788$export$3cb274deb6c2d854();
|
|
354
|
+
let { resizerProps: resizerProps } = $3fpzo$reactariatable.useTableColumnResize(state, item, ref);
|
|
355
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactariafocus.FocusRing, {
|
|
356
|
+
focusRingClass: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'focus-ring')
|
|
357
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement("div", {
|
|
358
|
+
ref: ref,
|
|
359
|
+
...resizerProps,
|
|
360
|
+
className: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'spectrum-Table-columnResizer'),
|
|
361
|
+
role: "separator",
|
|
362
|
+
"aria-orientation": "vertical",
|
|
363
|
+
"aria-label": "Resize column",
|
|
364
|
+
"aria-labelledby": item.key,
|
|
365
|
+
"aria-valuenow": state.getColumnWidth(item.key),
|
|
366
|
+
"aria-valuemin": state.getColumnMinWidth(item.key),
|
|
367
|
+
"aria-valuemax": state.getColumnMaxWidth(item.key)
|
|
368
|
+
})));
|
|
369
|
+
}
|
|
370
|
+
const $2877766f94c67a67$export$48a76196cafe3b93 = /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).forwardRef($2877766f94c67a67$var$Resizer);
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
343
374
|
var $4afcd54cfd94dbb9$exports = {};
|
|
344
375
|
|
|
345
376
|
$parcel$export($4afcd54cfd94dbb9$exports, "react-spectrum-Table", () => $4afcd54cfd94dbb9$export$8cc7e6e5f955c192, (v) => $4afcd54cfd94dbb9$export$8cc7e6e5f955c192 = v);
|
|
@@ -369,6 +400,20 @@ $4afcd54cfd94dbb9$export$8bffb31c98aaf8d5 = "react-spectrum-Table-centeredWrappe
|
|
|
369
400
|
|
|
370
401
|
|
|
371
402
|
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
|
|
372
417
|
|
|
373
418
|
|
|
374
419
|
|
|
@@ -422,7 +467,7 @@ function $26e105b1bd39d4b5$var$TableView_DEPRECATED(props, ref) {
|
|
|
422
467
|
let formatMessage = $3fpzo$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($a89862f958371476$exports)));
|
|
423
468
|
let { scale: scale } = $3fpzo$reactspectrumprovider.useProvider();
|
|
424
469
|
let density = props.density || 'regular';
|
|
425
|
-
let layout = $3fpzo$react.useMemo(()=>new $3fpzo$reactstatelylayout.
|
|
470
|
+
let layout = $3fpzo$react.useMemo(()=>new $3fpzo$reactstatelylayout.TableLayout_DEPRECATED({
|
|
426
471
|
// If props.rowHeight is auto, then use estimated heights based on scale, otherwise use fixed heights.
|
|
427
472
|
rowHeight: props.overflowMode === 'wrap' ? null : $26e105b1bd39d4b5$var$ROW_HEIGHTS[density][scale],
|
|
428
473
|
estimatedRowHeight: props.overflowMode === 'wrap' ? $26e105b1bd39d4b5$var$ROW_HEIGHTS[density][scale] : null,
|
|
@@ -877,6 +922,614 @@ function $26e105b1bd39d4b5$var$CenteredWrapper({ children: children }) {
|
|
|
877
922
|
|
|
878
923
|
|
|
879
924
|
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
const $be8a9c035a82f788$var$DEFAULT_HEADER_HEIGHT = {
|
|
933
|
+
medium: 34,
|
|
934
|
+
large: 40
|
|
935
|
+
};
|
|
936
|
+
const $be8a9c035a82f788$var$DEFAULT_HIDE_HEADER_CELL_WIDTH = {
|
|
937
|
+
medium: 36,
|
|
938
|
+
large: 44
|
|
939
|
+
};
|
|
940
|
+
const $be8a9c035a82f788$var$ROW_HEIGHTS = {
|
|
941
|
+
compact: {
|
|
942
|
+
medium: 32,
|
|
943
|
+
large: 40
|
|
944
|
+
},
|
|
945
|
+
regular: {
|
|
946
|
+
medium: 40,
|
|
947
|
+
large: 50
|
|
948
|
+
},
|
|
949
|
+
spacious: {
|
|
950
|
+
medium: 48,
|
|
951
|
+
large: 60
|
|
952
|
+
}
|
|
953
|
+
};
|
|
954
|
+
const $be8a9c035a82f788$var$SELECTION_CELL_DEFAULT_WIDTH = {
|
|
955
|
+
medium: 38,
|
|
956
|
+
large: 48
|
|
957
|
+
};
|
|
958
|
+
const $be8a9c035a82f788$var$TableContext = /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createContext(null);
|
|
959
|
+
function $be8a9c035a82f788$export$3cb274deb6c2d854() {
|
|
960
|
+
return $3fpzo$react.useContext($be8a9c035a82f788$var$TableContext);
|
|
961
|
+
}
|
|
962
|
+
function $be8a9c035a82f788$var$TableView(props, ref) {
|
|
963
|
+
props = $3fpzo$reactspectrumprovider.useProviderProps(props);
|
|
964
|
+
let { isQuiet: isQuiet , onAction: onAction } = props;
|
|
965
|
+
let { styleProps: styleProps } = $3fpzo$reactspectrumutils.useStyleProps(props);
|
|
966
|
+
let [showSelectionCheckboxes, setShowSelectionCheckboxes] = $3fpzo$react.useState(props.selectionStyle !== 'highlight');
|
|
967
|
+
let { scale: scale } = $3fpzo$reactspectrumprovider.useProvider();
|
|
968
|
+
const getDefaultWidth = $3fpzo$react.useCallback(({ hideHeader: hideHeader , isSelectionCell: isSelectionCell , showDivider: showDivider })=>{
|
|
969
|
+
if (hideHeader) {
|
|
970
|
+
let width = $be8a9c035a82f788$var$DEFAULT_HIDE_HEADER_CELL_WIDTH[scale];
|
|
971
|
+
return showDivider ? width + 1 : width;
|
|
972
|
+
} else if (isSelectionCell) return $be8a9c035a82f788$var$SELECTION_CELL_DEFAULT_WIDTH[scale];
|
|
973
|
+
}, [
|
|
974
|
+
scale
|
|
975
|
+
]);
|
|
976
|
+
let state = $3fpzo$reactstatelytable.useTableState({
|
|
977
|
+
...props,
|
|
978
|
+
showSelectionCheckboxes: showSelectionCheckboxes,
|
|
979
|
+
selectionBehavior: props.selectionStyle === 'highlight' ? 'replace' : 'toggle',
|
|
980
|
+
getDefaultWidth: getDefaultWidth
|
|
981
|
+
});
|
|
982
|
+
// If the selection behavior changes in state, we need to update showSelectionCheckboxes here due to the circular dependency...
|
|
983
|
+
let shouldShowCheckboxes = state.selectionManager.selectionBehavior !== 'replace';
|
|
984
|
+
if (shouldShowCheckboxes !== showSelectionCheckboxes) setShowSelectionCheckboxes(shouldShowCheckboxes);
|
|
985
|
+
let domRef = $3fpzo$reactspectrumutils.useDOMRef(ref);
|
|
986
|
+
let bodyRef = $3fpzo$react.useRef();
|
|
987
|
+
let formatMessage = $3fpzo$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($a89862f958371476$exports)));
|
|
988
|
+
let density = props.density || 'regular';
|
|
989
|
+
let layout = $3fpzo$react.useMemo(()=>new $3fpzo$reactstatelylayout.TableLayout({
|
|
990
|
+
// If props.rowHeight is auto, then use estimated heights based on scale, otherwise use fixed heights.
|
|
991
|
+
rowHeight: props.overflowMode === 'wrap' ? null : $be8a9c035a82f788$var$ROW_HEIGHTS[density][scale],
|
|
992
|
+
estimatedRowHeight: props.overflowMode === 'wrap' ? $be8a9c035a82f788$var$ROW_HEIGHTS[density][scale] : null,
|
|
993
|
+
headingHeight: props.overflowMode === 'wrap' ? null : $be8a9c035a82f788$var$DEFAULT_HEADER_HEIGHT[scale],
|
|
994
|
+
estimatedHeadingHeight: props.overflowMode === 'wrap' ? $be8a9c035a82f788$var$DEFAULT_HEADER_HEIGHT[scale] : null
|
|
995
|
+
})
|
|
996
|
+
, [
|
|
997
|
+
props.overflowMode,
|
|
998
|
+
scale,
|
|
999
|
+
density
|
|
1000
|
+
]);
|
|
1001
|
+
let { direction: direction } = $3fpzo$reactariai18n.useLocale();
|
|
1002
|
+
layout.collection = state.collection;
|
|
1003
|
+
layout.getColumnWidth = state.getColumnWidth;
|
|
1004
|
+
let { gridProps: gridProps } = $3fpzo$reactariatable.useTable({
|
|
1005
|
+
...props,
|
|
1006
|
+
isVirtualized: true,
|
|
1007
|
+
layout: layout,
|
|
1008
|
+
onRowAction: onAction
|
|
1009
|
+
}, state, domRef);
|
|
1010
|
+
let renderWrapper = (parent, reusableView, children, renderChildren)=>{
|
|
1011
|
+
let style = $3fpzo$reactariavirtualizer.layoutInfoToStyle(reusableView.layoutInfo, direction, parent && parent.layoutInfo);
|
|
1012
|
+
if (style.overflow === 'hidden') style.overflow = 'visible'; // needed to support position: sticky
|
|
1013
|
+
if (reusableView.viewType === 'rowgroup') return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($be8a9c035a82f788$var$TableRowGroup, {
|
|
1014
|
+
key: reusableView.key,
|
|
1015
|
+
style: style
|
|
1016
|
+
}, renderChildren(children)));
|
|
1017
|
+
if (reusableView.viewType === 'header') return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($be8a9c035a82f788$var$TableHeader, {
|
|
1018
|
+
key: reusableView.key,
|
|
1019
|
+
style: style
|
|
1020
|
+
}, renderChildren(children)));
|
|
1021
|
+
if (reusableView.viewType === 'row') return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($be8a9c035a82f788$var$TableRow, {
|
|
1022
|
+
key: reusableView.key,
|
|
1023
|
+
item: reusableView.content,
|
|
1024
|
+
style: style,
|
|
1025
|
+
hasActions: onAction
|
|
1026
|
+
}, renderChildren(children)));
|
|
1027
|
+
if (reusableView.viewType === 'headerrow') return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($be8a9c035a82f788$var$TableHeaderRow, {
|
|
1028
|
+
key: reusableView.key,
|
|
1029
|
+
style: style,
|
|
1030
|
+
item: reusableView.content
|
|
1031
|
+
}, renderChildren(children)));
|
|
1032
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactariavirtualizer.VirtualizerItem, {
|
|
1033
|
+
key: reusableView.key,
|
|
1034
|
+
reusableView: reusableView,
|
|
1035
|
+
parent: parent,
|
|
1036
|
+
className: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'spectrum-Table-cellWrapper', $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($4afcd54cfd94dbb9$exports)), {
|
|
1037
|
+
'react-spectrum-Table-cellWrapper': !reusableView.layoutInfo.estimatedSize
|
|
1038
|
+
}))
|
|
1039
|
+
}));
|
|
1040
|
+
};
|
|
1041
|
+
let renderView = (type, item)=>{
|
|
1042
|
+
switch(type){
|
|
1043
|
+
case 'header':
|
|
1044
|
+
case 'rowgroup':
|
|
1045
|
+
case 'section':
|
|
1046
|
+
case 'row':
|
|
1047
|
+
case 'headerrow':
|
|
1048
|
+
return null;
|
|
1049
|
+
case 'cell':
|
|
1050
|
+
if (item.props.isSelectionCell) return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($be8a9c035a82f788$var$TableCheckboxCell, {
|
|
1051
|
+
cell: item
|
|
1052
|
+
}));
|
|
1053
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($be8a9c035a82f788$var$TableCell, {
|
|
1054
|
+
cell: item
|
|
1055
|
+
}));
|
|
1056
|
+
case 'placeholder':
|
|
1057
|
+
// TODO: move to react-aria?
|
|
1058
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement("div", {
|
|
1059
|
+
role: "gridcell",
|
|
1060
|
+
"aria-colindex": item.index + 1,
|
|
1061
|
+
"aria-colspan": item.colspan > 1 ? item.colspan : null
|
|
1062
|
+
}));
|
|
1063
|
+
case 'column':
|
|
1064
|
+
if (item.props.isSelectionCell) return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($be8a9c035a82f788$var$TableSelectAllCell, {
|
|
1065
|
+
column: item
|
|
1066
|
+
}));
|
|
1067
|
+
if (item.props.hideHeader) return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactspectrumtooltip.TooltipTrigger, {
|
|
1068
|
+
placement: "top",
|
|
1069
|
+
trigger: "focus"
|
|
1070
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($be8a9c035a82f788$var$TableColumnHeader, {
|
|
1071
|
+
column: item
|
|
1072
|
+
}), /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactspectrumtooltip.Tooltip, {
|
|
1073
|
+
placement: "top"
|
|
1074
|
+
}, item.rendered)));
|
|
1075
|
+
if (item.props.allowsResizing) return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($be8a9c035a82f788$var$ResizableTableColumnHeader, {
|
|
1076
|
+
item: item,
|
|
1077
|
+
state: state
|
|
1078
|
+
}));
|
|
1079
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($be8a9c035a82f788$var$TableColumnHeader, {
|
|
1080
|
+
column: item
|
|
1081
|
+
}));
|
|
1082
|
+
case 'loader':
|
|
1083
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($be8a9c035a82f788$var$CenteredWrapper, null, /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactspectrumprogress.ProgressCircle, {
|
|
1084
|
+
isIndeterminate: true,
|
|
1085
|
+
"aria-label": state.collection.size > 0 ? formatMessage('loadingMore') : formatMessage('loading')
|
|
1086
|
+
})));
|
|
1087
|
+
case 'empty':
|
|
1088
|
+
{
|
|
1089
|
+
let emptyState = props.renderEmptyState ? props.renderEmptyState() : null;
|
|
1090
|
+
if (emptyState == null) return null;
|
|
1091
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($be8a9c035a82f788$var$CenteredWrapper, null, emptyState));
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
};
|
|
1095
|
+
let [isVerticalScrollbarVisible, setVerticalScollbarVisible] = $3fpzo$react.useState(false);
|
|
1096
|
+
let [isHorizontalScrollbarVisible, setHorizontalScollbarVisible] = $3fpzo$react.useState(false);
|
|
1097
|
+
let viewport = $3fpzo$react.useRef({
|
|
1098
|
+
x: 0,
|
|
1099
|
+
y: 0,
|
|
1100
|
+
width: 0,
|
|
1101
|
+
height: 0
|
|
1102
|
+
});
|
|
1103
|
+
let onVisibleRectChange = $3fpzo$react.useCallback((e)=>{
|
|
1104
|
+
if (viewport.current.width === e.width && viewport.current.height === e.height) return;
|
|
1105
|
+
viewport.current = e;
|
|
1106
|
+
if (bodyRef.current) {
|
|
1107
|
+
setVerticalScollbarVisible(bodyRef.current.clientWidth + 2 < bodyRef.current.offsetWidth);
|
|
1108
|
+
setHorizontalScollbarVisible(bodyRef.current.clientHeight + 2 < bodyRef.current.offsetHeight);
|
|
1109
|
+
}
|
|
1110
|
+
}, []);
|
|
1111
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($be8a9c035a82f788$var$TableContext.Provider, {
|
|
1112
|
+
value: {
|
|
1113
|
+
state: state,
|
|
1114
|
+
layout: layout
|
|
1115
|
+
}
|
|
1116
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($be8a9c035a82f788$var$TableVirtualizer, {
|
|
1117
|
+
...gridProps,
|
|
1118
|
+
...styleProps,
|
|
1119
|
+
className: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'spectrum-Table', `spectrum-Table--${density}`, {
|
|
1120
|
+
'spectrum-Table--quiet': isQuiet,
|
|
1121
|
+
'spectrum-Table--wrap': props.overflowMode === 'wrap',
|
|
1122
|
+
'spectrum-Table--loadingMore': state.collection.body.props.loadingState === 'loadingMore',
|
|
1123
|
+
'spectrum-Table--resizingColumn': state.isResizingColumn,
|
|
1124
|
+
'spectrum-Table--isVerticalScrollbarVisible': isVerticalScrollbarVisible,
|
|
1125
|
+
'spectrum-Table--isHorizontalScrollbarVisible': isHorizontalScrollbarVisible
|
|
1126
|
+
}, $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($4afcd54cfd94dbb9$exports)), 'react-spectrum-Table')),
|
|
1127
|
+
layout: layout,
|
|
1128
|
+
collection: state.collection,
|
|
1129
|
+
focusedKey: state.selectionManager.focusedKey,
|
|
1130
|
+
renderView: renderView,
|
|
1131
|
+
renderWrapper: renderWrapper,
|
|
1132
|
+
setTableWidth: state.setTableWidth,
|
|
1133
|
+
onVisibleRectChange: onVisibleRectChange,
|
|
1134
|
+
domRef: domRef,
|
|
1135
|
+
bodyRef: bodyRef,
|
|
1136
|
+
getColumnWidth: state.getColumnWidth
|
|
1137
|
+
})));
|
|
1138
|
+
}
|
|
1139
|
+
// This is a custom Virtualizer that also has a header that syncs its scroll position with the body.
|
|
1140
|
+
function $be8a9c035a82f788$var$TableVirtualizer({ layout: layout , collection: collection , focusedKey: focusedKey , renderView: renderView , renderWrapper: renderWrapper , domRef: domRef , bodyRef: bodyRef , setTableWidth: setTableWidth , getColumnWidth: getColumnWidth , onVisibleRectChange: onVisibleRectChangeProp , ...otherProps }) {
|
|
1141
|
+
var ref;
|
|
1142
|
+
let { direction: direction } = $3fpzo$reactariai18n.useLocale();
|
|
1143
|
+
let headerRef = $3fpzo$react.useRef();
|
|
1144
|
+
let loadingState = collection.body.props.loadingState;
|
|
1145
|
+
let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';
|
|
1146
|
+
let onLoadMore = collection.body.props.onLoadMore;
|
|
1147
|
+
let state = $3fpzo$reactstatelyvirtualizer.useVirtualizerState({
|
|
1148
|
+
layout: layout,
|
|
1149
|
+
collection: collection,
|
|
1150
|
+
renderView: renderView,
|
|
1151
|
+
renderWrapper: renderWrapper,
|
|
1152
|
+
onVisibleRectChange (rect) {
|
|
1153
|
+
bodyRef.current.scrollTop = rect.y;
|
|
1154
|
+
$3fpzo$reactariavirtualizer.setScrollLeft(bodyRef.current, direction, rect.x);
|
|
1155
|
+
},
|
|
1156
|
+
transitionDuration: isLoading ? 160 : 220
|
|
1157
|
+
});
|
|
1158
|
+
let { virtualizerProps: virtualizerProps } = $3fpzo$reactariavirtualizer.useVirtualizer({
|
|
1159
|
+
focusedKey: focusedKey,
|
|
1160
|
+
scrollToItem (key) {
|
|
1161
|
+
let item = collection.getItem(key);
|
|
1162
|
+
let column = collection.columns[0];
|
|
1163
|
+
state.virtualizer.scrollToItem(key, {
|
|
1164
|
+
duration: 0,
|
|
1165
|
+
// Prevent scrolling to the top when clicking on column headers.
|
|
1166
|
+
shouldScrollY: (item === null || item === void 0 ? void 0 : item.type) !== 'column',
|
|
1167
|
+
// Offset scroll position by width of selection cell
|
|
1168
|
+
// (which is sticky and will overlap the cell we're scrolling to).
|
|
1169
|
+
offsetX: column.props.isSelectionCell ? layout.getColumnWidth(column.key) : 0
|
|
1170
|
+
});
|
|
1171
|
+
}
|
|
1172
|
+
}, state, domRef);
|
|
1173
|
+
// If columnwidths change, need to relayout.
|
|
1174
|
+
$3fpzo$reactariautils.useLayoutEffect(()=>{
|
|
1175
|
+
state.virtualizer.relayoutNow({
|
|
1176
|
+
sizeChanged: true
|
|
1177
|
+
});
|
|
1178
|
+
}, [
|
|
1179
|
+
getColumnWidth,
|
|
1180
|
+
state.virtualizer
|
|
1181
|
+
]);
|
|
1182
|
+
let headerHeight = ((ref = layout.getLayoutInfo('header')) === null || ref === void 0 ? void 0 : ref.rect.height) || 0;
|
|
1183
|
+
let visibleRect = state.virtualizer.visibleRect;
|
|
1184
|
+
// Sync the scroll position from the table body to the header container.
|
|
1185
|
+
let onScroll = $3fpzo$react.useCallback(()=>{
|
|
1186
|
+
headerRef.current.scrollLeft = bodyRef.current.scrollLeft;
|
|
1187
|
+
}, [
|
|
1188
|
+
bodyRef
|
|
1189
|
+
]);
|
|
1190
|
+
let onVisibleRectChange = $3fpzo$react.useCallback((rect)=>{
|
|
1191
|
+
// setting the table width will recalculate column widths which we only want to do once the virtualizer is done initializing
|
|
1192
|
+
if (state.virtualizer.contentSize.height > 0) setTableWidth(rect.width);
|
|
1193
|
+
state.setVisibleRect(rect);
|
|
1194
|
+
if (!isLoading && onLoadMore) {
|
|
1195
|
+
let scrollOffset = state.virtualizer.contentSize.height - rect.height * 2;
|
|
1196
|
+
if (rect.y > scrollOffset) onLoadMore();
|
|
1197
|
+
}
|
|
1198
|
+
}, [
|
|
1199
|
+
onLoadMore,
|
|
1200
|
+
isLoading,
|
|
1201
|
+
state.setVisibleRect,
|
|
1202
|
+
state.virtualizer
|
|
1203
|
+
]);
|
|
1204
|
+
$3fpzo$reactariautils.useLayoutEffect(()=>{
|
|
1205
|
+
if (!isLoading && onLoadMore && !state.isAnimating) {
|
|
1206
|
+
if (state.contentSize.height <= state.virtualizer.visibleRect.height) onLoadMore();
|
|
1207
|
+
}
|
|
1208
|
+
}, [
|
|
1209
|
+
state.contentSize,
|
|
1210
|
+
state.virtualizer,
|
|
1211
|
+
state.isAnimating,
|
|
1212
|
+
onLoadMore,
|
|
1213
|
+
isLoading
|
|
1214
|
+
]);
|
|
1215
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement("div", {
|
|
1216
|
+
...$3fpzo$reactariautils.mergeProps(otherProps, virtualizerProps),
|
|
1217
|
+
ref: domRef
|
|
1218
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement("div", {
|
|
1219
|
+
role: "presentation",
|
|
1220
|
+
className: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'spectrum-Table-headWrapper'),
|
|
1221
|
+
style: {
|
|
1222
|
+
width: visibleRect.width,
|
|
1223
|
+
height: headerHeight,
|
|
1224
|
+
overflow: 'hidden',
|
|
1225
|
+
position: 'relative',
|
|
1226
|
+
willChange: state.isScrolling ? 'scroll-position' : '',
|
|
1227
|
+
transition: state.isAnimating ? `none ${state.virtualizer.transitionDuration}ms` : undefined
|
|
1228
|
+
},
|
|
1229
|
+
ref: headerRef
|
|
1230
|
+
}, state.visibleViews[0]), /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactariavirtualizer.ScrollView, {
|
|
1231
|
+
role: "presentation",
|
|
1232
|
+
className: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'spectrum-Table-body'),
|
|
1233
|
+
style: {
|
|
1234
|
+
flex: 1
|
|
1235
|
+
},
|
|
1236
|
+
innerStyle: {
|
|
1237
|
+
overflow: 'visible',
|
|
1238
|
+
transition: state.isAnimating ? `none ${state.virtualizer.transitionDuration}ms` : undefined
|
|
1239
|
+
},
|
|
1240
|
+
ref: bodyRef,
|
|
1241
|
+
contentSize: state.contentSize,
|
|
1242
|
+
onVisibleRectChange: $3fpzo$reactariautils.chain(onVisibleRectChange, onVisibleRectChangeProp),
|
|
1243
|
+
onScrollStart: state.startScrolling,
|
|
1244
|
+
onScrollEnd: state.endScrolling,
|
|
1245
|
+
onScroll: onScroll
|
|
1246
|
+
}, state.visibleViews[1])));
|
|
1247
|
+
}
|
|
1248
|
+
function $be8a9c035a82f788$var$TableHeader({ children: children , ...otherProps }) {
|
|
1249
|
+
let { rowGroupProps: rowGroupProps } = $3fpzo$reactariatable.useTableRowGroup();
|
|
1250
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement("div", {
|
|
1251
|
+
...rowGroupProps,
|
|
1252
|
+
...otherProps,
|
|
1253
|
+
className: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'spectrum-Table-head')
|
|
1254
|
+
}, children));
|
|
1255
|
+
}
|
|
1256
|
+
function $be8a9c035a82f788$var$TableColumnHeader(props) {
|
|
1257
|
+
var ref, ref1, ref2, ref3;
|
|
1258
|
+
let { column: column } = props;
|
|
1259
|
+
let ref4 = $3fpzo$react.useRef();
|
|
1260
|
+
let { state: state } = $be8a9c035a82f788$export$3cb274deb6c2d854();
|
|
1261
|
+
let { columnHeaderProps: columnHeaderProps } = $3fpzo$reactariatable.useTableColumnHeader({
|
|
1262
|
+
node: column,
|
|
1263
|
+
isVirtualized: true
|
|
1264
|
+
}, state, ref4);
|
|
1265
|
+
let { buttonProps: buttonProps } = $3fpzo$reactariabutton.useButton({
|
|
1266
|
+
...props,
|
|
1267
|
+
elementType: 'div'
|
|
1268
|
+
}, ref4);
|
|
1269
|
+
let columnProps = column.props;
|
|
1270
|
+
if (columnProps.width && columnProps.allowsResizing) throw new Error('Controlled state is not yet supported with column resizing. Please use defaultWidth for uncontrolled column resizing or remove the allowsResizing prop.');
|
|
1271
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = $3fpzo$reactariainteractions.useHover({
|
|
1272
|
+
});
|
|
1273
|
+
const allProps = [
|
|
1274
|
+
columnHeaderProps,
|
|
1275
|
+
hoverProps
|
|
1276
|
+
];
|
|
1277
|
+
if (columnProps.allowsResizing) allProps.push(buttonProps);
|
|
1278
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactariafocus.FocusRing, {
|
|
1279
|
+
focusRingClass: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'focus-ring')
|
|
1280
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement("div", {
|
|
1281
|
+
...$3fpzo$reactariautils.mergeProps(...allProps),
|
|
1282
|
+
ref: ref4,
|
|
1283
|
+
className: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'spectrum-Table-headCell', {
|
|
1284
|
+
'is-resizable': columnProps.allowsResizing,
|
|
1285
|
+
'is-sortable': columnProps.allowsSorting,
|
|
1286
|
+
'is-sorted-desc': ((ref = state.sortDescriptor) === null || ref === void 0 ? void 0 : ref.column) === column.key && ((ref1 = state.sortDescriptor) === null || ref1 === void 0 ? void 0 : ref1.direction) === 'descending',
|
|
1287
|
+
'is-sorted-asc': ((ref2 = state.sortDescriptor) === null || ref2 === void 0 ? void 0 : ref2.column) === column.key && ((ref3 = state.sortDescriptor) === null || ref3 === void 0 ? void 0 : ref3.direction) === 'ascending',
|
|
1288
|
+
'is-hovered': isHovered,
|
|
1289
|
+
'spectrum-Table-cell--hideHeader': columnProps.hideHeader
|
|
1290
|
+
}, $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($4afcd54cfd94dbb9$exports)), 'react-spectrum-Table-cell', {
|
|
1291
|
+
'react-spectrum-Table-cell--alignCenter': columnProps.align === 'center' || column.colspan > 1,
|
|
1292
|
+
'react-spectrum-Table-cell--alignEnd': columnProps.align === 'end'
|
|
1293
|
+
}))
|
|
1294
|
+
}, columnProps.hideHeader ? /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactariavisuallyhidden.VisuallyHidden, null, column.rendered) : /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement("div", {
|
|
1295
|
+
className: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'spectrum-Table-headCellContents')
|
|
1296
|
+
}, column.rendered), columnProps.allowsSorting && /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement(($parcel$interopDefault($3fpzo$spectrumiconsuiArrowDownSmall)), {
|
|
1297
|
+
UNSAFE_className: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'spectrum-Table-sortedIcon')
|
|
1298
|
+
}))));
|
|
1299
|
+
}
|
|
1300
|
+
function $be8a9c035a82f788$var$ResizableTableColumnHeader({ item: item , state: state }) {
|
|
1301
|
+
var ref, ref5;
|
|
1302
|
+
let ref6 = $3fpzo$react.useRef();
|
|
1303
|
+
let formatMessage = $3fpzo$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($a89862f958371476$exports)));
|
|
1304
|
+
const onMenuSelect = (key)=>{
|
|
1305
|
+
switch(key){
|
|
1306
|
+
case 'sort-asc':
|
|
1307
|
+
state.sort(item.key, 'ascending');
|
|
1308
|
+
break;
|
|
1309
|
+
case 'sort-desc':
|
|
1310
|
+
state.sort(item.key, 'descending');
|
|
1311
|
+
break;
|
|
1312
|
+
case 'resize':
|
|
1313
|
+
// focusResizer, needs timeout so that it happens after the animation timeout for menu close
|
|
1314
|
+
setTimeout(()=>{
|
|
1315
|
+
$3fpzo$reactariafocus.focusSafely(ref6.current);
|
|
1316
|
+
}, 360);
|
|
1317
|
+
break;
|
|
1318
|
+
}
|
|
1319
|
+
};
|
|
1320
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement(($parcel$interopDefault($3fpzo$react)).Fragment, null, /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactspectrummenu.MenuTrigger, null, /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($be8a9c035a82f788$var$TableColumnHeader, {
|
|
1321
|
+
column: item
|
|
1322
|
+
}), /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactspectrummenu.Menu, {
|
|
1323
|
+
onAction: onMenuSelect,
|
|
1324
|
+
minWidth: "size-2000"
|
|
1325
|
+
}, ((ref = item.props) === null || ref === void 0 ? void 0 : ref.allowsSorting) && /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactspectrummenu.Item, {
|
|
1326
|
+
key: "sort-asc"
|
|
1327
|
+
}, formatMessage('sortAscending')), ((ref5 = item.props) === null || ref5 === void 0 ? void 0 : ref5.allowsSorting) && /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactspectrummenu.Item, {
|
|
1328
|
+
key: "sort-desc"
|
|
1329
|
+
}, formatMessage('sortDescending')), /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactspectrummenu.Item, {
|
|
1330
|
+
key: "resize"
|
|
1331
|
+
}, formatMessage('resizeColumn')))), /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($2877766f94c67a67$export$48a76196cafe3b93, {
|
|
1332
|
+
ref: ref6,
|
|
1333
|
+
item: item
|
|
1334
|
+
})));
|
|
1335
|
+
}
|
|
1336
|
+
function $be8a9c035a82f788$var$TableSelectAllCell({ column: column }) {
|
|
1337
|
+
let ref = $3fpzo$react.useRef();
|
|
1338
|
+
let { state: state } = $be8a9c035a82f788$export$3cb274deb6c2d854();
|
|
1339
|
+
let isSingleSelectionMode = state.selectionManager.selectionMode === 'single';
|
|
1340
|
+
let { columnHeaderProps: columnHeaderProps } = $3fpzo$reactariatable.useTableColumnHeader({
|
|
1341
|
+
node: column,
|
|
1342
|
+
isVirtualized: true
|
|
1343
|
+
}, state, ref);
|
|
1344
|
+
let { checkboxProps: checkboxProps } = $3fpzo$reactariatable.useTableSelectAllCheckbox(state);
|
|
1345
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = $3fpzo$reactariainteractions.useHover({
|
|
1346
|
+
});
|
|
1347
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactariafocus.FocusRing, {
|
|
1348
|
+
focusRingClass: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'focus-ring')
|
|
1349
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement("div", {
|
|
1350
|
+
...$3fpzo$reactariautils.mergeProps(columnHeaderProps, hoverProps),
|
|
1351
|
+
ref: ref,
|
|
1352
|
+
className: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'spectrum-Table-headCell', 'spectrum-Table-checkboxCell', {
|
|
1353
|
+
'is-hovered': isHovered
|
|
1354
|
+
})
|
|
1355
|
+
}, /*
|
|
1356
|
+
In single selection mode, the checkbox will be hidden.
|
|
1357
|
+
So to avoid leaving a column header with no accessible content,
|
|
1358
|
+
we use a VisuallyHidden component to include the aria-label from the checkbox,
|
|
1359
|
+
which for single selection will be "Select."
|
|
1360
|
+
*/ isSingleSelectionMode && /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactariavisuallyhidden.VisuallyHidden, null, checkboxProps['aria-label']), /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactspectrumcheckbox.Checkbox, {
|
|
1361
|
+
...checkboxProps,
|
|
1362
|
+
isDisabled: isSingleSelectionMode,
|
|
1363
|
+
isEmphasized: true,
|
|
1364
|
+
UNSAFE_style: isSingleSelectionMode ? {
|
|
1365
|
+
visibility: 'hidden'
|
|
1366
|
+
} : undefined,
|
|
1367
|
+
UNSAFE_className: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'spectrum-Table-checkbox')
|
|
1368
|
+
}))));
|
|
1369
|
+
}
|
|
1370
|
+
function $be8a9c035a82f788$var$TableRowGroup({ children: children , ...otherProps }) {
|
|
1371
|
+
let { rowGroupProps: rowGroupProps } = $3fpzo$reactariatable.useTableRowGroup();
|
|
1372
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement("div", {
|
|
1373
|
+
...rowGroupProps,
|
|
1374
|
+
...otherProps
|
|
1375
|
+
}, children));
|
|
1376
|
+
}
|
|
1377
|
+
function $be8a9c035a82f788$var$TableRow({ item: item , children: children , hasActions: hasActions , ...otherProps }) {
|
|
1378
|
+
var ref, ref7, ref8;
|
|
1379
|
+
let ref9 = $3fpzo$react.useRef();
|
|
1380
|
+
let { state: state , layout: layout } = $be8a9c035a82f788$export$3cb274deb6c2d854();
|
|
1381
|
+
let allowsInteraction = state.selectionManager.selectionMode !== 'none' || hasActions;
|
|
1382
|
+
let isDisabled = !allowsInteraction || state.disabledKeys.has(item.key);
|
|
1383
|
+
let isSelected = state.selectionManager.isSelected(item.key);
|
|
1384
|
+
let { rowProps: rowProps } = $3fpzo$reactariatable.useTableRow({
|
|
1385
|
+
node: item,
|
|
1386
|
+
isVirtualized: true
|
|
1387
|
+
}, state, ref9);
|
|
1388
|
+
let { pressProps: pressProps , isPressed: isPressed } = $3fpzo$reactariainteractions.usePress({
|
|
1389
|
+
isDisabled: isDisabled
|
|
1390
|
+
});
|
|
1391
|
+
// The row should show the focus background style when any cell inside it is focused.
|
|
1392
|
+
// If the row itself is focused, then it should have a blue focus indicator on the left.
|
|
1393
|
+
let { isFocusVisible: isFocusVisibleWithin , focusProps: focusWithinProps } = $3fpzo$reactariafocus.useFocusRing({
|
|
1394
|
+
within: true
|
|
1395
|
+
});
|
|
1396
|
+
let { isFocusVisible: isFocusVisible , focusProps: focusProps } = $3fpzo$reactariafocus.useFocusRing();
|
|
1397
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = $3fpzo$reactariainteractions.useHover({
|
|
1398
|
+
isDisabled: isDisabled
|
|
1399
|
+
});
|
|
1400
|
+
let props = $3fpzo$reactariautils.mergeProps(rowProps, otherProps, focusWithinProps, focusProps, hoverProps, pressProps);
|
|
1401
|
+
let isFirstRow = ((ref = state.collection.rows.find((row)=>row.level === 1
|
|
1402
|
+
)) === null || ref === void 0 ? void 0 : ref.key) === item.key;
|
|
1403
|
+
let isLastRow = item.nextKey == null;
|
|
1404
|
+
// Figure out if the TableView content is equal or greater in height to the container. If so, we'll need to round the bottom
|
|
1405
|
+
// border corners of the last row when selected.
|
|
1406
|
+
let isFlushWithContainerBottom = false;
|
|
1407
|
+
if (isLastRow) {
|
|
1408
|
+
if (((ref7 = layout.getContentSize()) === null || ref7 === void 0 ? void 0 : ref7.height) >= ((ref8 = layout.virtualizer) === null || ref8 === void 0 ? void 0 : ref8.getVisibleRect().height)) isFlushWithContainerBottom = true;
|
|
1409
|
+
}
|
|
1410
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement("div", {
|
|
1411
|
+
...props,
|
|
1412
|
+
ref: ref9,
|
|
1413
|
+
className: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'spectrum-Table-row', {
|
|
1414
|
+
'is-active': isPressed,
|
|
1415
|
+
'is-selected': isSelected,
|
|
1416
|
+
'spectrum-Table-row--highlightSelection': state.selectionManager.selectionBehavior === 'replace',
|
|
1417
|
+
'is-next-selected': state.selectionManager.isSelected(item.nextKey),
|
|
1418
|
+
'is-focused': isFocusVisibleWithin,
|
|
1419
|
+
'focus-ring': isFocusVisible,
|
|
1420
|
+
'is-hovered': isHovered,
|
|
1421
|
+
'is-disabled': isDisabled,
|
|
1422
|
+
'spectrum-Table-row--firstRow': isFirstRow,
|
|
1423
|
+
'spectrum-Table-row--lastRow': isLastRow,
|
|
1424
|
+
'spectrum-Table-row--isFlushBottom': isFlushWithContainerBottom
|
|
1425
|
+
})
|
|
1426
|
+
}, children));
|
|
1427
|
+
}
|
|
1428
|
+
function $be8a9c035a82f788$var$TableHeaderRow({ item: item , children: children , style: style }) {
|
|
1429
|
+
let { state: state } = $be8a9c035a82f788$export$3cb274deb6c2d854();
|
|
1430
|
+
let ref = $3fpzo$react.useRef();
|
|
1431
|
+
let { rowProps: rowProps } = $3fpzo$reactariatable.useTableHeaderRow({
|
|
1432
|
+
node: item,
|
|
1433
|
+
isVirtualized: true
|
|
1434
|
+
}, state, ref);
|
|
1435
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement("div", {
|
|
1436
|
+
...rowProps,
|
|
1437
|
+
ref: ref,
|
|
1438
|
+
style: style
|
|
1439
|
+
}, children));
|
|
1440
|
+
}
|
|
1441
|
+
function $be8a9c035a82f788$var$TableCheckboxCell({ cell: cell }) {
|
|
1442
|
+
let ref = $3fpzo$react.useRef();
|
|
1443
|
+
let { state: state } = $be8a9c035a82f788$export$3cb274deb6c2d854();
|
|
1444
|
+
let isDisabled = state.disabledKeys.has(cell.parentKey);
|
|
1445
|
+
let { gridCellProps: gridCellProps } = $3fpzo$reactariatable.useTableCell({
|
|
1446
|
+
node: cell,
|
|
1447
|
+
isVirtualized: true
|
|
1448
|
+
}, state, ref);
|
|
1449
|
+
let { checkboxProps: checkboxProps } = $3fpzo$reactariatable.useTableSelectionCheckbox({
|
|
1450
|
+
key: cell.parentKey
|
|
1451
|
+
}, state);
|
|
1452
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactariafocus.FocusRing, {
|
|
1453
|
+
focusRingClass: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'focus-ring')
|
|
1454
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement("div", {
|
|
1455
|
+
...gridCellProps,
|
|
1456
|
+
ref: ref,
|
|
1457
|
+
className: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'spectrum-Table-cell', 'spectrum-Table-checkboxCell', {
|
|
1458
|
+
'is-disabled': isDisabled
|
|
1459
|
+
}, $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($4afcd54cfd94dbb9$exports)), 'react-spectrum-Table-cell'))
|
|
1460
|
+
}, state.selectionManager.selectionMode !== 'none' && /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactspectrumcheckbox.Checkbox, {
|
|
1461
|
+
...checkboxProps,
|
|
1462
|
+
isEmphasized: true,
|
|
1463
|
+
isDisabled: isDisabled,
|
|
1464
|
+
UNSAFE_className: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'spectrum-Table-checkbox')
|
|
1465
|
+
}))));
|
|
1466
|
+
}
|
|
1467
|
+
function $be8a9c035a82f788$var$TableCell({ cell: cell }) {
|
|
1468
|
+
let { state: state } = $be8a9c035a82f788$export$3cb274deb6c2d854();
|
|
1469
|
+
let ref = $3fpzo$react.useRef();
|
|
1470
|
+
let columnProps = cell.column.props;
|
|
1471
|
+
let isDisabled = state.disabledKeys.has(cell.parentKey);
|
|
1472
|
+
let { gridCellProps: gridCellProps } = $3fpzo$reactariatable.useTableCell({
|
|
1473
|
+
node: cell,
|
|
1474
|
+
isVirtualized: true
|
|
1475
|
+
}, state, ref);
|
|
1476
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($3fpzo$reactariafocus.FocusRing, {
|
|
1477
|
+
focusRingClass: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'focus-ring')
|
|
1478
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement("div", {
|
|
1479
|
+
...gridCellProps,
|
|
1480
|
+
ref: ref,
|
|
1481
|
+
className: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'spectrum-Table-cell', {
|
|
1482
|
+
'spectrum-Table-cell--divider': columnProps.showDivider && cell.column.nextKey !== null,
|
|
1483
|
+
'spectrum-Table-cell--hideHeader': columnProps.hideHeader,
|
|
1484
|
+
'is-disabled': isDisabled
|
|
1485
|
+
}, $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($4afcd54cfd94dbb9$exports)), 'react-spectrum-Table-cell', {
|
|
1486
|
+
'react-spectrum-Table-cell--alignStart': columnProps.align === 'start',
|
|
1487
|
+
'react-spectrum-Table-cell--alignCenter': columnProps.align === 'center',
|
|
1488
|
+
'react-spectrum-Table-cell--alignEnd': columnProps.align === 'end'
|
|
1489
|
+
}))
|
|
1490
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement("span", {
|
|
1491
|
+
className: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($982885d0a34882ea$exports)), 'spectrum-Table-cellContents')
|
|
1492
|
+
}, cell.rendered))));
|
|
1493
|
+
}
|
|
1494
|
+
function $be8a9c035a82f788$var$CenteredWrapper({ children: children }) {
|
|
1495
|
+
let { state: state } = $be8a9c035a82f788$export$3cb274deb6c2d854();
|
|
1496
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement("div", {
|
|
1497
|
+
role: "row",
|
|
1498
|
+
"aria-rowindex": state.collection.headerRows.length + state.collection.size + 1,
|
|
1499
|
+
className: $3fpzo$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($4afcd54cfd94dbb9$exports)), 'react-spectrum-Table-centeredWrapper')
|
|
1500
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement("div", {
|
|
1501
|
+
role: "rowheader",
|
|
1502
|
+
"aria-colspan": state.collection.columns.length
|
|
1503
|
+
}, children)));
|
|
1504
|
+
}
|
|
1505
|
+
/**
|
|
1506
|
+
* Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
|
|
1507
|
+
*/ const $be8a9c035a82f788$var$_TableView = /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).forwardRef($be8a9c035a82f788$var$TableView);
|
|
1508
|
+
/*
|
|
1509
|
+
When ready to remove this feature flag, you can remove this whole section of code, delete the _DEPRECATED files, and just replace the export with the _TableView above.
|
|
1510
|
+
*/ function $be8a9c035a82f788$var$FeatureFlaggedTableView(props, ref10) {
|
|
1511
|
+
let state = $3fpzo$reactstatelytable.useTableState({
|
|
1512
|
+
...props
|
|
1513
|
+
});
|
|
1514
|
+
const someColumnsAllowResizing = state.collection.columns.some((c)=>{
|
|
1515
|
+
var ref;
|
|
1516
|
+
return (ref = c.props) === null || ref === void 0 ? void 0 : ref.allowsResizing;
|
|
1517
|
+
});
|
|
1518
|
+
if (someColumnsAllowResizing) return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($be8a9c035a82f788$var$_TableView, {
|
|
1519
|
+
...props,
|
|
1520
|
+
ref: ref10
|
|
1521
|
+
}));
|
|
1522
|
+
else return(/*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).createElement($26e105b1bd39d4b5$export$8790f9f1576000df, {
|
|
1523
|
+
...props,
|
|
1524
|
+
ref: ref10
|
|
1525
|
+
}));
|
|
1526
|
+
}
|
|
1527
|
+
/**
|
|
1528
|
+
* Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
|
|
1529
|
+
*/ const $be8a9c035a82f788$export$b3c27e869d856b7 = /*#__PURE__*/ ($parcel$interopDefault($3fpzo$react)).forwardRef($be8a9c035a82f788$var$FeatureFlaggedTableView);
|
|
1530
|
+
|
|
1531
|
+
|
|
1532
|
+
|
|
880
1533
|
// Override TS for Column to support spectrum specific props.
|
|
881
1534
|
const $4b0b515c47252574$export$816b5d811295e6bc = $3fpzo$reactstatelytable.Column;
|
|
882
1535
|
|