@react-stately/table 3.1.2 → 3.1.3-nightly.3113
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.js +53 -53
- package/dist/module.js +47 -47
- package/package.json +7 -7
package/dist/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
1
|
+
var $56JBj$reactstatelycollections = require("@react-stately/collections");
|
|
2
|
+
var $56JBj$reactstatelygrid = require("@react-stately/grid");
|
|
3
|
+
var $56JBj$react = require("react");
|
|
4
4
|
|
|
5
5
|
function $parcel$export(e, n, v, s) {
|
|
6
6
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
@@ -25,15 +25,15 @@ function $parcel$interopDefault(a) {
|
|
|
25
25
|
return a && a.__esModule ? a.default : a;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
$parcel$export(module.exports, "Section", () => $
|
|
29
|
-
var $
|
|
28
|
+
$parcel$export(module.exports, "Section", () => $ecd852c55a4b6fdf$re_export$Section);
|
|
29
|
+
var $e3f7784147dde23d$exports = {};
|
|
30
30
|
|
|
31
|
-
$parcel$export($
|
|
31
|
+
$parcel$export($e3f7784147dde23d$exports, "useTableState", () => $e3f7784147dde23d$export$907bcc6c48325fd6);
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
const $
|
|
36
|
-
function $
|
|
35
|
+
const $7f5a58334d8866a5$var$ROW_HEADER_COLUMN_KEY = 'row-header-column-' + Math.random().toString(36).slice(2);
|
|
36
|
+
function $7f5a58334d8866a5$var$buildHeaderRows(keyMap, columnNodes) {
|
|
37
37
|
let columns = [];
|
|
38
38
|
let seen = new Map();
|
|
39
39
|
for (let column of columnNodes){
|
|
@@ -151,7 +151,7 @@ function $ad3381cb85097bc1$var$buildHeaderRows(keyMap, columnNodes) {
|
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
153
|
var tmp = Symbol.iterator;
|
|
154
|
-
class $
|
|
154
|
+
class $7f5a58334d8866a5$export$596e1b2e2cf93690 extends $56JBj$reactstatelygrid.GridCollection {
|
|
155
155
|
*[tmp]() {
|
|
156
156
|
yield* this.body.childNodes;
|
|
157
157
|
}
|
|
@@ -201,7 +201,7 @@ class $ad3381cb85097bc1$export$596e1b2e2cf93690 extends $3T1Wc$reactstatelygrid.
|
|
|
201
201
|
if (opts === null || opts === void 0 ? void 0 : opts.showSelectionCheckboxes) {
|
|
202
202
|
let rowHeaderColumn = {
|
|
203
203
|
type: 'column',
|
|
204
|
-
key: $
|
|
204
|
+
key: $7f5a58334d8866a5$var$ROW_HEADER_COLUMN_KEY,
|
|
205
205
|
value: null,
|
|
206
206
|
textValue: '',
|
|
207
207
|
level: 0,
|
|
@@ -236,7 +236,7 @@ class $ad3381cb85097bc1$export$596e1b2e2cf93690 extends $3T1Wc$reactstatelygrid.
|
|
|
236
236
|
for (let child of node.childNodes)visit(child);
|
|
237
237
|
};
|
|
238
238
|
for (let node1 of nodes)visit(node1);
|
|
239
|
-
let headerRows = $
|
|
239
|
+
let headerRows = $7f5a58334d8866a5$var$buildHeaderRows(columnKeyMap, columns);
|
|
240
240
|
headerRows.forEach((row, i)=>rows.splice(i, 0, row)
|
|
241
241
|
);
|
|
242
242
|
super({
|
|
@@ -258,13 +258,13 @@ class $ad3381cb85097bc1$export$596e1b2e2cf93690 extends $3T1Wc$reactstatelygrid.
|
|
|
258
258
|
|
|
259
259
|
|
|
260
260
|
|
|
261
|
-
const $
|
|
261
|
+
const $e3f7784147dde23d$var$OPPOSITE_SORT_DIRECTION = {
|
|
262
262
|
ascending: 'descending',
|
|
263
263
|
descending: 'ascending'
|
|
264
264
|
};
|
|
265
|
-
function $
|
|
265
|
+
function $e3f7784147dde23d$export$907bcc6c48325fd6(props) {
|
|
266
266
|
let { selectionMode: selectionMode = 'none' } = props;
|
|
267
|
-
let context = $
|
|
267
|
+
let context = $56JBj$react.useMemo(()=>({
|
|
268
268
|
showSelectionCheckboxes: props.showSelectionCheckboxes && selectionMode !== 'none',
|
|
269
269
|
selectionMode: selectionMode,
|
|
270
270
|
columns: []
|
|
@@ -274,9 +274,9 @@ function $e8a04407cfd5f1b5$export$907bcc6c48325fd6(props) {
|
|
|
274
274
|
props.showSelectionCheckboxes,
|
|
275
275
|
selectionMode
|
|
276
276
|
]);
|
|
277
|
-
let collection = $
|
|
277
|
+
let collection = $56JBj$reactstatelycollections.useCollection(props, (nodes, prev)=>new $7f5a58334d8866a5$export$596e1b2e2cf93690(nodes, prev, context)
|
|
278
278
|
, context);
|
|
279
|
-
let { disabledKeys: disabledKeys , selectionManager: selectionManager } = $
|
|
279
|
+
let { disabledKeys: disabledKeys , selectionManager: selectionManager } = $56JBj$reactstatelygrid.useGridState({
|
|
280
280
|
...props,
|
|
281
281
|
collection: collection
|
|
282
282
|
});
|
|
@@ -290,21 +290,21 @@ function $e8a04407cfd5f1b5$export$907bcc6c48325fd6(props) {
|
|
|
290
290
|
var ref;
|
|
291
291
|
props.onSortChange({
|
|
292
292
|
column: columnKey,
|
|
293
|
-
direction: ((ref = props.sortDescriptor) === null || ref === void 0 ? void 0 : ref.column) === columnKey ? $
|
|
293
|
+
direction: ((ref = props.sortDescriptor) === null || ref === void 0 ? void 0 : ref.column) === columnKey ? $e3f7784147dde23d$var$OPPOSITE_SORT_DIRECTION[props.sortDescriptor.direction] : 'ascending'
|
|
294
294
|
});
|
|
295
295
|
}
|
|
296
296
|
};
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
|
|
300
|
-
var $
|
|
300
|
+
var $f45775f5d6f744fa$exports = {};
|
|
301
301
|
|
|
302
|
-
$parcel$export($
|
|
302
|
+
$parcel$export($f45775f5d6f744fa$exports, "TableHeader", () => $f45775f5d6f744fa$export$f850895b287ef28e);
|
|
303
303
|
|
|
304
|
-
function $
|
|
304
|
+
function $f45775f5d6f744fa$var$TableHeader(props) {
|
|
305
305
|
return null;
|
|
306
306
|
}
|
|
307
|
-
$
|
|
307
|
+
$f45775f5d6f744fa$var$TableHeader.getCollectionNode = function* getCollectionNode(props) {
|
|
308
308
|
let { children: children , columns: columns } = props;
|
|
309
309
|
if (typeof children === 'function') {
|
|
310
310
|
if (!columns) throw new Error('props.children was a function but props.columns is missing');
|
|
@@ -315,7 +315,7 @@ $ab69e241adb4db9a$var$TableHeader.getCollectionNode = function* getCollectionNod
|
|
|
315
315
|
};
|
|
316
316
|
} else {
|
|
317
317
|
let columns = [];
|
|
318
|
-
($parcel$interopDefault($
|
|
318
|
+
($parcel$interopDefault($56JBj$react)).Children.forEach(children, (column)=>{
|
|
319
319
|
columns.push({
|
|
320
320
|
type: 'column',
|
|
321
321
|
element: column
|
|
@@ -328,17 +328,17 @@ $ab69e241adb4db9a$var$TableHeader.getCollectionNode = function* getCollectionNod
|
|
|
328
328
|
* A TableHeader is a container for the Column elements in a Table. Columns can be statically defined
|
|
329
329
|
* as children, or generated dynamically using a function based on the data passed to the `columns` prop.
|
|
330
330
|
*/ // We don't want getCollectionNode to show up in the type definition
|
|
331
|
-
let $
|
|
331
|
+
let $f45775f5d6f744fa$export$f850895b287ef28e = $f45775f5d6f744fa$var$TableHeader;
|
|
332
332
|
|
|
333
333
|
|
|
334
|
-
var $
|
|
334
|
+
var $6ec527db6a3a5692$exports = {};
|
|
335
335
|
|
|
336
|
-
$parcel$export($
|
|
336
|
+
$parcel$export($6ec527db6a3a5692$exports, "TableBody", () => $6ec527db6a3a5692$export$76ccd210b9029917);
|
|
337
337
|
|
|
338
|
-
function $
|
|
338
|
+
function $6ec527db6a3a5692$var$TableBody(props) {
|
|
339
339
|
return null;
|
|
340
340
|
}
|
|
341
|
-
$
|
|
341
|
+
$6ec527db6a3a5692$var$TableBody.getCollectionNode = function* getCollectionNode(props) {
|
|
342
342
|
let { children: children , items: items1 } = props;
|
|
343
343
|
yield {
|
|
344
344
|
type: 'body',
|
|
@@ -354,7 +354,7 @@ $5523918a064f3e82$var$TableBody.getCollectionNode = function* getCollectionNode(
|
|
|
354
354
|
};
|
|
355
355
|
} else {
|
|
356
356
|
let items = [];
|
|
357
|
-
($parcel$interopDefault($
|
|
357
|
+
($parcel$interopDefault($56JBj$react)).Children.forEach(children, (item)=>{
|
|
358
358
|
items.push({
|
|
359
359
|
type: 'item',
|
|
360
360
|
element: item
|
|
@@ -369,23 +369,23 @@ $5523918a064f3e82$var$TableBody.getCollectionNode = function* getCollectionNode(
|
|
|
369
369
|
* A TableBody is a container for the Row elements of a Table. Rows can be statically defined
|
|
370
370
|
* as children, or generated dynamically using a function based on the data passed to the `items` prop.
|
|
371
371
|
*/ // We don't want getCollectionNode to show up in the type definition
|
|
372
|
-
let $
|
|
372
|
+
let $6ec527db6a3a5692$export$76ccd210b9029917 = $6ec527db6a3a5692$var$TableBody;
|
|
373
373
|
|
|
374
374
|
|
|
375
|
-
var $
|
|
375
|
+
var $714483d9f6ca4c55$exports = {};
|
|
376
376
|
|
|
377
|
-
$parcel$export($
|
|
377
|
+
$parcel$export($714483d9f6ca4c55$exports, "Column", () => $714483d9f6ca4c55$export$816b5d811295e6bc);
|
|
378
378
|
|
|
379
|
-
function $
|
|
379
|
+
function $714483d9f6ca4c55$var$Column(props) {
|
|
380
380
|
return null;
|
|
381
381
|
}
|
|
382
|
-
$
|
|
382
|
+
$714483d9f6ca4c55$var$Column.getCollectionNode = function* getCollectionNode(props, context1) {
|
|
383
383
|
let { title: title , children: children , childColumns: childColumns1 } = props;
|
|
384
384
|
let rendered = title || children;
|
|
385
385
|
let textValue = props.textValue || (typeof rendered === 'string' ? rendered : '') || props['aria-label'];
|
|
386
386
|
let fullNodes = yield {
|
|
387
387
|
type: 'column',
|
|
388
|
-
hasChildNodes: !!childColumns1 || title && ($parcel$interopDefault($
|
|
388
|
+
hasChildNodes: !!childColumns1 || title && ($parcel$interopDefault($56JBj$react)).Children.count(children) > 0,
|
|
389
389
|
rendered: rendered,
|
|
390
390
|
textValue: textValue,
|
|
391
391
|
props: props,
|
|
@@ -396,7 +396,7 @@ $7391cc655de6832d$var$Column.getCollectionNode = function* getCollectionNode(pro
|
|
|
396
396
|
};
|
|
397
397
|
else if (title) {
|
|
398
398
|
let childColumns = [];
|
|
399
|
-
($parcel$interopDefault($
|
|
399
|
+
($parcel$interopDefault($56JBj$react)).Children.forEach(children, (child)=>{
|
|
400
400
|
childColumns.push({
|
|
401
401
|
type: 'column',
|
|
402
402
|
element: child
|
|
@@ -424,17 +424,17 @@ $7391cc655de6832d$var$Column.getCollectionNode = function* getCollectionNode(pro
|
|
|
424
424
|
* Column elements to represent column groups. Nested columns can be statically defined as
|
|
425
425
|
* children, or dynamically generated using a function based on the `childColumns` prop.
|
|
426
426
|
*/ // We don't want getCollectionNode to show up in the type definition
|
|
427
|
-
let $
|
|
427
|
+
let $714483d9f6ca4c55$export$816b5d811295e6bc = $714483d9f6ca4c55$var$Column;
|
|
428
428
|
|
|
429
429
|
|
|
430
|
-
var $
|
|
430
|
+
var $9ec6912e32cc0d81$exports = {};
|
|
431
431
|
|
|
432
|
-
$parcel$export($
|
|
432
|
+
$parcel$export($9ec6912e32cc0d81$exports, "Row", () => $9ec6912e32cc0d81$export$b59bdbef9ce70de2);
|
|
433
433
|
|
|
434
|
-
function $
|
|
434
|
+
function $9ec6912e32cc0d81$var$Row(props) {
|
|
435
435
|
return null;
|
|
436
436
|
}
|
|
437
|
-
$
|
|
437
|
+
$9ec6912e32cc0d81$var$Row.getCollectionNode = function* getCollectionNode(props, context) {
|
|
438
438
|
let { children: children , textValue: textValue } = props;
|
|
439
439
|
yield {
|
|
440
440
|
type: 'item',
|
|
@@ -458,7 +458,7 @@ $acd7f2c292e16424$var$Row.getCollectionNode = function* getCollectionNode(props,
|
|
|
458
458
|
};
|
|
459
459
|
else {
|
|
460
460
|
let cells = [];
|
|
461
|
-
($parcel$interopDefault($
|
|
461
|
+
($parcel$interopDefault($56JBj$react)).Children.forEach(children, (cell)=>{
|
|
462
462
|
cells.push({
|
|
463
463
|
type: 'cell',
|
|
464
464
|
element: cell
|
|
@@ -480,16 +480,16 @@ $acd7f2c292e16424$var$Row.getCollectionNode = function* getCollectionNode(props,
|
|
|
480
480
|
* Cells can be statically defined as children, or generated dynamically using a function
|
|
481
481
|
* based on the columns defined in the TableHeader.
|
|
482
482
|
*/ // We don't want getCollectionNode to show up in the type definition
|
|
483
|
-
let $
|
|
483
|
+
let $9ec6912e32cc0d81$export$b59bdbef9ce70de2 = $9ec6912e32cc0d81$var$Row;
|
|
484
484
|
|
|
485
485
|
|
|
486
|
-
var $
|
|
486
|
+
var $ad4ab0a21c733e1f$exports = {};
|
|
487
487
|
|
|
488
|
-
$parcel$export($
|
|
489
|
-
function $
|
|
488
|
+
$parcel$export($ad4ab0a21c733e1f$exports, "Cell", () => $ad4ab0a21c733e1f$export$f6f0c3fe4ec306ea);
|
|
489
|
+
function $ad4ab0a21c733e1f$var$Cell(props) {
|
|
490
490
|
return null;
|
|
491
491
|
}
|
|
492
|
-
$
|
|
492
|
+
$ad4ab0a21c733e1f$var$Cell.getCollectionNode = function* getCollectionNode(props) {
|
|
493
493
|
let { children: children } = props;
|
|
494
494
|
let textValue = props.textValue || (typeof children === 'string' ? children : '') || props['aria-label'] || '';
|
|
495
495
|
yield {
|
|
@@ -504,16 +504,16 @@ $ea5f941262e5426a$var$Cell.getCollectionNode = function* getCollectionNode(props
|
|
|
504
504
|
/**
|
|
505
505
|
* A Cell represents the value of a single Column within a Table Row.
|
|
506
506
|
*/ // We don't want getCollectionNode to show up in the type definition
|
|
507
|
-
let $
|
|
507
|
+
let $ad4ab0a21c733e1f$export$f6f0c3fe4ec306ea = $ad4ab0a21c733e1f$var$Cell;
|
|
508
508
|
|
|
509
509
|
|
|
510
510
|
|
|
511
|
-
$parcel$exportWildcard(module.exports, $
|
|
512
|
-
$parcel$exportWildcard(module.exports, $
|
|
513
|
-
$parcel$exportWildcard(module.exports, $
|
|
514
|
-
$parcel$exportWildcard(module.exports, $
|
|
515
|
-
$parcel$exportWildcard(module.exports, $
|
|
516
|
-
$parcel$exportWildcard(module.exports, $
|
|
511
|
+
$parcel$exportWildcard(module.exports, $e3f7784147dde23d$exports);
|
|
512
|
+
$parcel$exportWildcard(module.exports, $f45775f5d6f744fa$exports);
|
|
513
|
+
$parcel$exportWildcard(module.exports, $6ec527db6a3a5692$exports);
|
|
514
|
+
$parcel$exportWildcard(module.exports, $714483d9f6ca4c55$exports);
|
|
515
|
+
$parcel$exportWildcard(module.exports, $9ec6912e32cc0d81$exports);
|
|
516
|
+
$parcel$exportWildcard(module.exports, $ad4ab0a21c733e1f$exports);
|
|
517
517
|
|
|
518
518
|
|
|
519
519
|
//# sourceMappingURL=main.js.map
|
package/dist/module.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {Section as $
|
|
2
|
-
import {useGridState as $
|
|
3
|
-
import $
|
|
1
|
+
import {Section as $6555104ff085bef4$re_export$Section, useCollection as $1BfjW$useCollection} from "@react-stately/collections";
|
|
2
|
+
import {useGridState as $1BfjW$useGridState, GridCollection as $1BfjW$GridCollection} from "@react-stately/grid";
|
|
3
|
+
import $1BfjW$react, {useMemo as $1BfjW$useMemo} from "react";
|
|
4
4
|
|
|
5
5
|
function $parcel$export(e, n, v, s) {
|
|
6
6
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
7
7
|
}
|
|
8
|
-
var $
|
|
8
|
+
var $4a0dd036d492cee4$exports = {};
|
|
9
9
|
|
|
10
|
-
$parcel$export($
|
|
10
|
+
$parcel$export($4a0dd036d492cee4$exports, "useTableState", () => $4a0dd036d492cee4$export$907bcc6c48325fd6);
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
const $
|
|
15
|
-
function $
|
|
14
|
+
const $788781baa30117fa$var$ROW_HEADER_COLUMN_KEY = 'row-header-column-' + Math.random().toString(36).slice(2);
|
|
15
|
+
function $788781baa30117fa$var$buildHeaderRows(keyMap, columnNodes) {
|
|
16
16
|
let columns = [];
|
|
17
17
|
let seen = new Map();
|
|
18
18
|
for (let column of columnNodes){
|
|
@@ -130,7 +130,7 @@ function $52fd3153b80928bf$var$buildHeaderRows(keyMap, columnNodes) {
|
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
var tmp = Symbol.iterator;
|
|
133
|
-
class $
|
|
133
|
+
class $788781baa30117fa$export$596e1b2e2cf93690 extends $1BfjW$GridCollection {
|
|
134
134
|
*[tmp]() {
|
|
135
135
|
yield* this.body.childNodes;
|
|
136
136
|
}
|
|
@@ -180,7 +180,7 @@ class $52fd3153b80928bf$export$596e1b2e2cf93690 extends $lqH1y$GridCollection {
|
|
|
180
180
|
if (opts === null || opts === void 0 ? void 0 : opts.showSelectionCheckboxes) {
|
|
181
181
|
let rowHeaderColumn = {
|
|
182
182
|
type: 'column',
|
|
183
|
-
key: $
|
|
183
|
+
key: $788781baa30117fa$var$ROW_HEADER_COLUMN_KEY,
|
|
184
184
|
value: null,
|
|
185
185
|
textValue: '',
|
|
186
186
|
level: 0,
|
|
@@ -215,7 +215,7 @@ class $52fd3153b80928bf$export$596e1b2e2cf93690 extends $lqH1y$GridCollection {
|
|
|
215
215
|
for (let child of node.childNodes)visit(child);
|
|
216
216
|
};
|
|
217
217
|
for (let node1 of nodes)visit(node1);
|
|
218
|
-
let headerRows = $
|
|
218
|
+
let headerRows = $788781baa30117fa$var$buildHeaderRows(columnKeyMap, columns);
|
|
219
219
|
headerRows.forEach((row, i)=>rows.splice(i, 0, row)
|
|
220
220
|
);
|
|
221
221
|
super({
|
|
@@ -237,13 +237,13 @@ class $52fd3153b80928bf$export$596e1b2e2cf93690 extends $lqH1y$GridCollection {
|
|
|
237
237
|
|
|
238
238
|
|
|
239
239
|
|
|
240
|
-
const $
|
|
240
|
+
const $4a0dd036d492cee4$var$OPPOSITE_SORT_DIRECTION = {
|
|
241
241
|
ascending: 'descending',
|
|
242
242
|
descending: 'ascending'
|
|
243
243
|
};
|
|
244
|
-
function $
|
|
244
|
+
function $4a0dd036d492cee4$export$907bcc6c48325fd6(props) {
|
|
245
245
|
let { selectionMode: selectionMode = 'none' } = props;
|
|
246
|
-
let context = $
|
|
246
|
+
let context = $1BfjW$useMemo(()=>({
|
|
247
247
|
showSelectionCheckboxes: props.showSelectionCheckboxes && selectionMode !== 'none',
|
|
248
248
|
selectionMode: selectionMode,
|
|
249
249
|
columns: []
|
|
@@ -253,9 +253,9 @@ function $faf2b44c080fba5d$export$907bcc6c48325fd6(props) {
|
|
|
253
253
|
props.showSelectionCheckboxes,
|
|
254
254
|
selectionMode
|
|
255
255
|
]);
|
|
256
|
-
let collection = $
|
|
256
|
+
let collection = $1BfjW$useCollection(props, (nodes, prev)=>new $788781baa30117fa$export$596e1b2e2cf93690(nodes, prev, context)
|
|
257
257
|
, context);
|
|
258
|
-
let { disabledKeys: disabledKeys , selectionManager: selectionManager } = $
|
|
258
|
+
let { disabledKeys: disabledKeys , selectionManager: selectionManager } = $1BfjW$useGridState({
|
|
259
259
|
...props,
|
|
260
260
|
collection: collection
|
|
261
261
|
});
|
|
@@ -269,21 +269,21 @@ function $faf2b44c080fba5d$export$907bcc6c48325fd6(props) {
|
|
|
269
269
|
var ref;
|
|
270
270
|
props.onSortChange({
|
|
271
271
|
column: columnKey,
|
|
272
|
-
direction: ((ref = props.sortDescriptor) === null || ref === void 0 ? void 0 : ref.column) === columnKey ? $
|
|
272
|
+
direction: ((ref = props.sortDescriptor) === null || ref === void 0 ? void 0 : ref.column) === columnKey ? $4a0dd036d492cee4$var$OPPOSITE_SORT_DIRECTION[props.sortDescriptor.direction] : 'ascending'
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
|
|
279
|
-
var $
|
|
279
|
+
var $312ae3b56a94a86e$exports = {};
|
|
280
280
|
|
|
281
|
-
$parcel$export($
|
|
281
|
+
$parcel$export($312ae3b56a94a86e$exports, "TableHeader", () => $312ae3b56a94a86e$export$f850895b287ef28e);
|
|
282
282
|
|
|
283
|
-
function $
|
|
283
|
+
function $312ae3b56a94a86e$var$TableHeader(props) {
|
|
284
284
|
return null;
|
|
285
285
|
}
|
|
286
|
-
$
|
|
286
|
+
$312ae3b56a94a86e$var$TableHeader.getCollectionNode = function* getCollectionNode(props) {
|
|
287
287
|
let { children: children , columns: columns } = props;
|
|
288
288
|
if (typeof children === 'function') {
|
|
289
289
|
if (!columns) throw new Error('props.children was a function but props.columns is missing');
|
|
@@ -294,7 +294,7 @@ $c66ef8364f10cc32$var$TableHeader.getCollectionNode = function* getCollectionNod
|
|
|
294
294
|
};
|
|
295
295
|
} else {
|
|
296
296
|
let columns = [];
|
|
297
|
-
$
|
|
297
|
+
$1BfjW$react.Children.forEach(children, (column)=>{
|
|
298
298
|
columns.push({
|
|
299
299
|
type: 'column',
|
|
300
300
|
element: column
|
|
@@ -307,17 +307,17 @@ $c66ef8364f10cc32$var$TableHeader.getCollectionNode = function* getCollectionNod
|
|
|
307
307
|
* A TableHeader is a container for the Column elements in a Table. Columns can be statically defined
|
|
308
308
|
* as children, or generated dynamically using a function based on the data passed to the `columns` prop.
|
|
309
309
|
*/ // We don't want getCollectionNode to show up in the type definition
|
|
310
|
-
let $
|
|
310
|
+
let $312ae3b56a94a86e$export$f850895b287ef28e = $312ae3b56a94a86e$var$TableHeader;
|
|
311
311
|
|
|
312
312
|
|
|
313
|
-
var $
|
|
313
|
+
var $4ae5314bf50db1a3$exports = {};
|
|
314
314
|
|
|
315
|
-
$parcel$export($
|
|
315
|
+
$parcel$export($4ae5314bf50db1a3$exports, "TableBody", () => $4ae5314bf50db1a3$export$76ccd210b9029917);
|
|
316
316
|
|
|
317
|
-
function $
|
|
317
|
+
function $4ae5314bf50db1a3$var$TableBody(props) {
|
|
318
318
|
return null;
|
|
319
319
|
}
|
|
320
|
-
$
|
|
320
|
+
$4ae5314bf50db1a3$var$TableBody.getCollectionNode = function* getCollectionNode(props) {
|
|
321
321
|
let { children: children , items: items1 } = props;
|
|
322
322
|
yield {
|
|
323
323
|
type: 'body',
|
|
@@ -333,7 +333,7 @@ $6616af99b4843f0d$var$TableBody.getCollectionNode = function* getCollectionNode(
|
|
|
333
333
|
};
|
|
334
334
|
} else {
|
|
335
335
|
let items = [];
|
|
336
|
-
$
|
|
336
|
+
$1BfjW$react.Children.forEach(children, (item)=>{
|
|
337
337
|
items.push({
|
|
338
338
|
type: 'item',
|
|
339
339
|
element: item
|
|
@@ -348,23 +348,23 @@ $6616af99b4843f0d$var$TableBody.getCollectionNode = function* getCollectionNode(
|
|
|
348
348
|
* A TableBody is a container for the Row elements of a Table. Rows can be statically defined
|
|
349
349
|
* as children, or generated dynamically using a function based on the data passed to the `items` prop.
|
|
350
350
|
*/ // We don't want getCollectionNode to show up in the type definition
|
|
351
|
-
let $
|
|
351
|
+
let $4ae5314bf50db1a3$export$76ccd210b9029917 = $4ae5314bf50db1a3$var$TableBody;
|
|
352
352
|
|
|
353
353
|
|
|
354
|
-
var $
|
|
354
|
+
var $1cd244557c2f97d5$exports = {};
|
|
355
355
|
|
|
356
|
-
$parcel$export($
|
|
356
|
+
$parcel$export($1cd244557c2f97d5$exports, "Column", () => $1cd244557c2f97d5$export$816b5d811295e6bc);
|
|
357
357
|
|
|
358
|
-
function $
|
|
358
|
+
function $1cd244557c2f97d5$var$Column(props) {
|
|
359
359
|
return null;
|
|
360
360
|
}
|
|
361
|
-
$
|
|
361
|
+
$1cd244557c2f97d5$var$Column.getCollectionNode = function* getCollectionNode(props, context1) {
|
|
362
362
|
let { title: title , children: children , childColumns: childColumns1 } = props;
|
|
363
363
|
let rendered = title || children;
|
|
364
364
|
let textValue = props.textValue || (typeof rendered === 'string' ? rendered : '') || props['aria-label'];
|
|
365
365
|
let fullNodes = yield {
|
|
366
366
|
type: 'column',
|
|
367
|
-
hasChildNodes: !!childColumns1 || title && $
|
|
367
|
+
hasChildNodes: !!childColumns1 || title && $1BfjW$react.Children.count(children) > 0,
|
|
368
368
|
rendered: rendered,
|
|
369
369
|
textValue: textValue,
|
|
370
370
|
props: props,
|
|
@@ -375,7 +375,7 @@ $ea4ade809d4abb07$var$Column.getCollectionNode = function* getCollectionNode(pro
|
|
|
375
375
|
};
|
|
376
376
|
else if (title) {
|
|
377
377
|
let childColumns = [];
|
|
378
|
-
$
|
|
378
|
+
$1BfjW$react.Children.forEach(children, (child)=>{
|
|
379
379
|
childColumns.push({
|
|
380
380
|
type: 'column',
|
|
381
381
|
element: child
|
|
@@ -403,17 +403,17 @@ $ea4ade809d4abb07$var$Column.getCollectionNode = function* getCollectionNode(pro
|
|
|
403
403
|
* Column elements to represent column groups. Nested columns can be statically defined as
|
|
404
404
|
* children, or dynamically generated using a function based on the `childColumns` prop.
|
|
405
405
|
*/ // We don't want getCollectionNode to show up in the type definition
|
|
406
|
-
let $
|
|
406
|
+
let $1cd244557c2f97d5$export$816b5d811295e6bc = $1cd244557c2f97d5$var$Column;
|
|
407
407
|
|
|
408
408
|
|
|
409
|
-
var $
|
|
409
|
+
var $70d70eb16ea48428$exports = {};
|
|
410
410
|
|
|
411
|
-
$parcel$export($
|
|
411
|
+
$parcel$export($70d70eb16ea48428$exports, "Row", () => $70d70eb16ea48428$export$b59bdbef9ce70de2);
|
|
412
412
|
|
|
413
|
-
function $
|
|
413
|
+
function $70d70eb16ea48428$var$Row(props) {
|
|
414
414
|
return null;
|
|
415
415
|
}
|
|
416
|
-
$
|
|
416
|
+
$70d70eb16ea48428$var$Row.getCollectionNode = function* getCollectionNode(props, context) {
|
|
417
417
|
let { children: children , textValue: textValue } = props;
|
|
418
418
|
yield {
|
|
419
419
|
type: 'item',
|
|
@@ -437,7 +437,7 @@ $e2dc941fd2e6f314$var$Row.getCollectionNode = function* getCollectionNode(props,
|
|
|
437
437
|
};
|
|
438
438
|
else {
|
|
439
439
|
let cells = [];
|
|
440
|
-
$
|
|
440
|
+
$1BfjW$react.Children.forEach(children, (cell)=>{
|
|
441
441
|
cells.push({
|
|
442
442
|
type: 'cell',
|
|
443
443
|
element: cell
|
|
@@ -459,16 +459,16 @@ $e2dc941fd2e6f314$var$Row.getCollectionNode = function* getCollectionNode(props,
|
|
|
459
459
|
* Cells can be statically defined as children, or generated dynamically using a function
|
|
460
460
|
* based on the columns defined in the TableHeader.
|
|
461
461
|
*/ // We don't want getCollectionNode to show up in the type definition
|
|
462
|
-
let $
|
|
462
|
+
let $70d70eb16ea48428$export$b59bdbef9ce70de2 = $70d70eb16ea48428$var$Row;
|
|
463
463
|
|
|
464
464
|
|
|
465
|
-
var $
|
|
465
|
+
var $941d1d9a6a28982a$exports = {};
|
|
466
466
|
|
|
467
|
-
$parcel$export($
|
|
468
|
-
function $
|
|
467
|
+
$parcel$export($941d1d9a6a28982a$exports, "Cell", () => $941d1d9a6a28982a$export$f6f0c3fe4ec306ea);
|
|
468
|
+
function $941d1d9a6a28982a$var$Cell(props) {
|
|
469
469
|
return null;
|
|
470
470
|
}
|
|
471
|
-
$
|
|
471
|
+
$941d1d9a6a28982a$var$Cell.getCollectionNode = function* getCollectionNode(props) {
|
|
472
472
|
let { children: children } = props;
|
|
473
473
|
let textValue = props.textValue || (typeof children === 'string' ? children : '') || props['aria-label'] || '';
|
|
474
474
|
yield {
|
|
@@ -483,11 +483,11 @@ $d002254cbf65adb0$var$Cell.getCollectionNode = function* getCollectionNode(props
|
|
|
483
483
|
/**
|
|
484
484
|
* A Cell represents the value of a single Column within a Table Row.
|
|
485
485
|
*/ // We don't want getCollectionNode to show up in the type definition
|
|
486
|
-
let $
|
|
486
|
+
let $941d1d9a6a28982a$export$f6f0c3fe4ec306ea = $941d1d9a6a28982a$var$Cell;
|
|
487
487
|
|
|
488
488
|
|
|
489
489
|
|
|
490
490
|
|
|
491
491
|
|
|
492
|
-
export {$
|
|
492
|
+
export {$6555104ff085bef4$re_export$Section as Section, $4a0dd036d492cee4$export$907bcc6c48325fd6 as useTableState, $312ae3b56a94a86e$export$f850895b287ef28e as TableHeader, $4ae5314bf50db1a3$export$76ccd210b9029917 as TableBody, $1cd244557c2f97d5$export$816b5d811295e6bc as Column, $70d70eb16ea48428$export$b59bdbef9ce70de2 as Row, $941d1d9a6a28982a$export$f6f0c3fe4ec306ea as Cell};
|
|
493
493
|
//# sourceMappingURL=module.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-stately/table",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.3-nightly.3113+404d41859",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@babel/runtime": "^7.6.2",
|
|
21
|
-
"@react-stately/collections": "
|
|
22
|
-
"@react-stately/grid": "
|
|
23
|
-
"@react-stately/selection": "
|
|
24
|
-
"@react-types/grid": "
|
|
25
|
-
"@react-types/shared": "
|
|
26
|
-
"@react-types/table": "
|
|
21
|
+
"@react-stately/collections": "3.0.0-nightly.1417+404d41859",
|
|
22
|
+
"@react-stately/grid": "3.1.3-nightly.3113+404d41859",
|
|
23
|
+
"@react-stately/selection": "3.0.0-nightly.1417+404d41859",
|
|
24
|
+
"@react-types/grid": "3.0.3-nightly.3113+404d41859",
|
|
25
|
+
"@react-types/shared": "3.0.0-nightly.1417+404d41859",
|
|
26
|
+
"@react-types/table": "3.1.3-nightly.3113+404d41859"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": "^16.8.0 || ^17.0.0-rc.1"
|