@react-stately/table 3.15.4 → 3.16.0

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.
Files changed (76) hide show
  1. package/dist/import.mjs +6 -18
  2. package/dist/main.js +18 -30
  3. package/dist/main.js.map +1 -1
  4. package/dist/module.js +6 -18
  5. package/dist/module.js.map +1 -1
  6. package/dist/types/src/index.d.ts +9 -0
  7. package/package.json +17 -20
  8. package/src/index.ts +9 -16
  9. package/dist/Cell.main.js +0 -38
  10. package/dist/Cell.main.js.map +0 -1
  11. package/dist/Cell.mjs +0 -33
  12. package/dist/Cell.module.js +0 -33
  13. package/dist/Cell.module.js.map +0 -1
  14. package/dist/Column.main.js +0 -75
  15. package/dist/Column.main.js.map +0 -1
  16. package/dist/Column.mjs +0 -66
  17. package/dist/Column.module.js +0 -66
  18. package/dist/Column.module.js.map +0 -1
  19. package/dist/Row.main.js +0 -102
  20. package/dist/Row.main.js.map +0 -1
  21. package/dist/Row.mjs +0 -93
  22. package/dist/Row.module.js +0 -93
  23. package/dist/Row.module.js.map +0 -1
  24. package/dist/TableBody.main.js +0 -61
  25. package/dist/TableBody.main.js.map +0 -1
  26. package/dist/TableBody.mjs +0 -52
  27. package/dist/TableBody.module.js +0 -52
  28. package/dist/TableBody.module.js.map +0 -1
  29. package/dist/TableCollection.main.js +0 -308
  30. package/dist/TableCollection.main.js.map +0 -1
  31. package/dist/TableCollection.mjs +0 -302
  32. package/dist/TableCollection.module.js +0 -302
  33. package/dist/TableCollection.module.js.map +0 -1
  34. package/dist/TableColumnLayout.main.js +0 -113
  35. package/dist/TableColumnLayout.main.js.map +0 -1
  36. package/dist/TableColumnLayout.mjs +0 -108
  37. package/dist/TableColumnLayout.module.js +0 -108
  38. package/dist/TableColumnLayout.module.js.map +0 -1
  39. package/dist/TableHeader.main.js +0 -56
  40. package/dist/TableHeader.main.js.map +0 -1
  41. package/dist/TableHeader.mjs +0 -47
  42. package/dist/TableHeader.module.js +0 -47
  43. package/dist/TableHeader.module.js.map +0 -1
  44. package/dist/TableUtils.main.js +0 -182
  45. package/dist/TableUtils.main.js.map +0 -1
  46. package/dist/TableUtils.mjs +0 -175
  47. package/dist/TableUtils.module.js +0 -175
  48. package/dist/TableUtils.module.js.map +0 -1
  49. package/dist/types.d.ts +0 -194
  50. package/dist/types.d.ts.map +0 -1
  51. package/dist/useTableColumnResizeState.main.js +0 -109
  52. package/dist/useTableColumnResizeState.main.js.map +0 -1
  53. package/dist/useTableColumnResizeState.mjs +0 -104
  54. package/dist/useTableColumnResizeState.module.js +0 -104
  55. package/dist/useTableColumnResizeState.module.js.map +0 -1
  56. package/dist/useTableState.main.js +0 -86
  57. package/dist/useTableState.main.js.map +0 -1
  58. package/dist/useTableState.mjs +0 -80
  59. package/dist/useTableState.module.js +0 -80
  60. package/dist/useTableState.module.js.map +0 -1
  61. package/dist/useTreeGridState.main.js +0 -207
  62. package/dist/useTreeGridState.main.js.map +0 -1
  63. package/dist/useTreeGridState.mjs +0 -202
  64. package/dist/useTreeGridState.module.js +0 -202
  65. package/dist/useTreeGridState.module.js.map +0 -1
  66. package/src/Cell.ts +0 -40
  67. package/src/Column.ts +0 -83
  68. package/src/Row.ts +0 -121
  69. package/src/TableBody.ts +0 -61
  70. package/src/TableCollection.ts +0 -367
  71. package/src/TableColumnLayout.ts +0 -127
  72. package/src/TableHeader.ts +0 -59
  73. package/src/TableUtils.ts +0 -266
  74. package/src/useTableColumnResizeState.ts +0 -147
  75. package/src/useTableState.ts +0 -124
  76. package/src/useTreeGridState.ts +0 -278
package/dist/import.mjs CHANGED
@@ -1,14 +1,8 @@
1
- import {useTableColumnResizeState as $292bc4e09cd0eb62$export$cb895dcf85db1319} from "./useTableColumnResizeState.mjs";
2
- import {UNSTABLE_useFilteredTableState as $4a0dd036d492cee4$export$31447e17397b15c2, useTableState as $4a0dd036d492cee4$export$907bcc6c48325fd6} from "./useTableState.mjs";
3
- import {TableHeader as $312ae3b56a94a86e$export$f850895b287ef28e} from "./TableHeader.mjs";
4
- import {TableBody as $4ae5314bf50db1a3$export$76ccd210b9029917} from "./TableBody.mjs";
5
- import {Column as $1cd244557c2f97d5$export$816b5d811295e6bc} from "./Column.mjs";
6
- import {Row as $70d70eb16ea48428$export$b59bdbef9ce70de2} from "./Row.mjs";
7
- import {Cell as $941d1d9a6a28982a$export$f6f0c3fe4ec306ea} from "./Cell.mjs";
8
- import {buildHeaderRows as $788781baa30117fa$export$7c127db850d4e81e, TableCollection as $788781baa30117fa$export$596e1b2e2cf93690} from "./TableCollection.mjs";
9
- import {TableColumnLayout as $a9e7ae544a4e41dd$export$7ff77a162970b30e} from "./TableColumnLayout.mjs";
10
- import {UNSTABLE_useTreeGridState as $ee65a0057fd99531$export$34dfa8a1622185a4} from "./useTreeGridState.mjs";
11
- import {Section as $6555104ff085bef4$re_export$Section} from "@react-stately/collections";
1
+ import {useTableColumnResizeState as $4fc02e0ff7a01391$re_export$useTableColumnResizeState, useTableState as $4fc02e0ff7a01391$re_export$useTableState, UNSTABLE_useFilteredTableState as $4fc02e0ff7a01391$re_export$UNSTABLE_useFilteredTableState, TableHeader as $4fc02e0ff7a01391$re_export$TableHeader, TableBody as $4fc02e0ff7a01391$re_export$TableBody, Column as $4fc02e0ff7a01391$re_export$Column, Row as $4fc02e0ff7a01391$re_export$Row, Cell as $4fc02e0ff7a01391$re_export$Cell} from "react-stately/useTableState";
2
+ import {TableCollection as $4fc02e0ff7a01391$re_export$TableCollection, buildHeaderRows as $4fc02e0ff7a01391$re_export$buildHeaderRows} from "react-stately/private/table/TableCollection";
3
+ import {TableColumnLayout as $4fc02e0ff7a01391$re_export$TableColumnLayout} from "react-stately/private/table/TableColumnLayout";
4
+ import {UNSTABLE_useTreeGridState as $4fc02e0ff7a01391$re_export$UNSTABLE_useTreeGridState} from "react-stately/private/table/useTreeGridState";
5
+ import {Section as $4fc02e0ff7a01391$re_export$Section} from "react-stately/Section";
12
6
 
13
7
  /*
14
8
  * Copyright 2020 Adobe. All rights reserved.
@@ -27,11 +21,5 @@ import {Section as $6555104ff085bef4$re_export$Section} from "@react-stately/col
27
21
 
28
22
 
29
23
 
30
-
31
-
32
-
33
-
34
-
35
-
36
- export {$292bc4e09cd0eb62$export$cb895dcf85db1319 as useTableColumnResizeState, $4a0dd036d492cee4$export$907bcc6c48325fd6 as useTableState, $4a0dd036d492cee4$export$31447e17397b15c2 as UNSTABLE_useFilteredTableState, $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, $6555104ff085bef4$re_export$Section as Section, $788781baa30117fa$export$596e1b2e2cf93690 as TableCollection, $788781baa30117fa$export$7c127db850d4e81e as buildHeaderRows, $a9e7ae544a4e41dd$export$7ff77a162970b30e as TableColumnLayout, $ee65a0057fd99531$export$34dfa8a1622185a4 as UNSTABLE_useTreeGridState};
24
+ export {$4fc02e0ff7a01391$re_export$useTableColumnResizeState as useTableColumnResizeState, $4fc02e0ff7a01391$re_export$useTableState as useTableState, $4fc02e0ff7a01391$re_export$UNSTABLE_useFilteredTableState as UNSTABLE_useFilteredTableState, $4fc02e0ff7a01391$re_export$TableHeader as TableHeader, $4fc02e0ff7a01391$re_export$TableBody as TableBody, $4fc02e0ff7a01391$re_export$Column as Column, $4fc02e0ff7a01391$re_export$Row as Row, $4fc02e0ff7a01391$re_export$Cell as Cell, $4fc02e0ff7a01391$re_export$TableCollection as TableCollection, $4fc02e0ff7a01391$re_export$buildHeaderRows as buildHeaderRows, $4fc02e0ff7a01391$re_export$TableColumnLayout as TableColumnLayout, $4fc02e0ff7a01391$re_export$UNSTABLE_useTreeGridState as UNSTABLE_useTreeGridState, $4fc02e0ff7a01391$re_export$Section as Section};
37
25
  //# sourceMappingURL=module.js.map
package/dist/main.js CHANGED
@@ -1,33 +1,27 @@
1
- var $7aa22d80cd4ca621$exports = require("./useTableColumnResizeState.main.js");
2
- var $e3f7784147dde23d$exports = require("./useTableState.main.js");
3
- var $f45775f5d6f744fa$exports = require("./TableHeader.main.js");
4
- var $6ec527db6a3a5692$exports = require("./TableBody.main.js");
5
- var $714483d9f6ca4c55$exports = require("./Column.main.js");
6
- var $9ec6912e32cc0d81$exports = require("./Row.main.js");
7
- var $ad4ab0a21c733e1f$exports = require("./Cell.main.js");
8
- var $7f5a58334d8866a5$exports = require("./TableCollection.main.js");
9
- var $2240a72410c17d51$exports = require("./TableColumnLayout.main.js");
10
- var $ed4e0b68b470dcfd$exports = require("./useTreeGridState.main.js");
11
- var $56JBj$reactstatelycollections = require("@react-stately/collections");
1
+ var $5Y2ZV$reactstatelyuseTableState = require("react-stately/useTableState");
2
+ var $5Y2ZV$reactstatelyprivatetableTableCollection = require("react-stately/private/table/TableCollection");
3
+ var $5Y2ZV$reactstatelyprivatetableTableColumnLayout = require("react-stately/private/table/TableColumnLayout");
4
+ var $5Y2ZV$reactstatelyprivatetableuseTreeGridState = require("react-stately/private/table/useTreeGridState");
5
+ var $5Y2ZV$reactstatelySection = require("react-stately/Section");
12
6
 
13
7
 
14
8
  function $parcel$export(e, n, v, s) {
15
9
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
16
10
  }
17
11
 
18
- $parcel$export(module.exports, "useTableColumnResizeState", () => $7aa22d80cd4ca621$exports.useTableColumnResizeState);
19
- $parcel$export(module.exports, "useTableState", () => $e3f7784147dde23d$exports.useTableState);
20
- $parcel$export(module.exports, "UNSTABLE_useFilteredTableState", () => $e3f7784147dde23d$exports.UNSTABLE_useFilteredTableState);
21
- $parcel$export(module.exports, "TableHeader", () => $f45775f5d6f744fa$exports.TableHeader);
22
- $parcel$export(module.exports, "TableBody", () => $6ec527db6a3a5692$exports.TableBody);
23
- $parcel$export(module.exports, "Column", () => $714483d9f6ca4c55$exports.Column);
24
- $parcel$export(module.exports, "Row", () => $9ec6912e32cc0d81$exports.Row);
25
- $parcel$export(module.exports, "Cell", () => $ad4ab0a21c733e1f$exports.Cell);
26
- $parcel$export(module.exports, "Section", () => $56JBj$reactstatelycollections.Section);
27
- $parcel$export(module.exports, "TableCollection", () => $7f5a58334d8866a5$exports.TableCollection);
28
- $parcel$export(module.exports, "buildHeaderRows", () => $7f5a58334d8866a5$exports.buildHeaderRows);
29
- $parcel$export(module.exports, "TableColumnLayout", () => $2240a72410c17d51$exports.TableColumnLayout);
30
- $parcel$export(module.exports, "UNSTABLE_useTreeGridState", () => $ed4e0b68b470dcfd$exports.UNSTABLE_useTreeGridState);
12
+ $parcel$export(module.exports, "useTableColumnResizeState", function () { return $5Y2ZV$reactstatelyuseTableState.useTableColumnResizeState; });
13
+ $parcel$export(module.exports, "useTableState", function () { return $5Y2ZV$reactstatelyuseTableState.useTableState; });
14
+ $parcel$export(module.exports, "UNSTABLE_useFilteredTableState", function () { return $5Y2ZV$reactstatelyuseTableState.UNSTABLE_useFilteredTableState; });
15
+ $parcel$export(module.exports, "TableHeader", function () { return $5Y2ZV$reactstatelyuseTableState.TableHeader; });
16
+ $parcel$export(module.exports, "TableBody", function () { return $5Y2ZV$reactstatelyuseTableState.TableBody; });
17
+ $parcel$export(module.exports, "Column", function () { return $5Y2ZV$reactstatelyuseTableState.Column; });
18
+ $parcel$export(module.exports, "Row", function () { return $5Y2ZV$reactstatelyuseTableState.Row; });
19
+ $parcel$export(module.exports, "Cell", function () { return $5Y2ZV$reactstatelyuseTableState.Cell; });
20
+ $parcel$export(module.exports, "TableCollection", function () { return $5Y2ZV$reactstatelyprivatetableTableCollection.TableCollection; });
21
+ $parcel$export(module.exports, "buildHeaderRows", function () { return $5Y2ZV$reactstatelyprivatetableTableCollection.buildHeaderRows; });
22
+ $parcel$export(module.exports, "TableColumnLayout", function () { return $5Y2ZV$reactstatelyprivatetableTableColumnLayout.TableColumnLayout; });
23
+ $parcel$export(module.exports, "UNSTABLE_useTreeGridState", function () { return $5Y2ZV$reactstatelyprivatetableuseTreeGridState.UNSTABLE_useTreeGridState; });
24
+ $parcel$export(module.exports, "Section", function () { return $5Y2ZV$reactstatelySection.Section; });
31
25
  /*
32
26
  * Copyright 2020 Adobe. All rights reserved.
33
27
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -45,10 +39,4 @@ $parcel$export(module.exports, "UNSTABLE_useTreeGridState", () => $ed4e0b68b470d
45
39
 
46
40
 
47
41
 
48
-
49
-
50
-
51
-
52
-
53
-
54
42
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-stately/table/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport type {TableColumnResizeState, TableColumnResizeStateProps} from './useTableColumnResizeState';\nexport type {TableState, CollectionBuilderContext, TableStateProps} from './useTableState';\nexport type {TableHeaderProps, TableBodyProps, ColumnProps, RowProps, CellProps} from '@react-types/table';\nexport type {TreeGridState, TreeGridStateProps} from './useTreeGridState';\n\nexport {useTableColumnResizeState} from './useTableColumnResizeState';\nexport {useTableState, UNSTABLE_useFilteredTableState} from './useTableState';\nexport {TableHeader} from './TableHeader';\nexport {TableBody} from './TableBody';\nexport {Column} from './Column';\nexport {Row} from './Row';\nexport {Cell} from './Cell';\nexport {Section} from '@react-stately/collections';\nexport {TableCollection, buildHeaderRows} from './TableCollection';\nexport {TableColumnLayout} from './TableColumnLayout';\nexport {UNSTABLE_useTreeGridState} from './useTreeGridState';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-stately/table/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useTableColumnResizeState, useTableState, UNSTABLE_useFilteredTableState, TableHeader, TableBody, Column, Row, Cell} from 'react-stately/useTableState';\nexport {TableCollection, buildHeaderRows} from 'react-stately/private/table/TableCollection';\nexport {TableColumnLayout} from 'react-stately/private/table/TableColumnLayout';\nexport {UNSTABLE_useTreeGridState} from 'react-stately/private/table/useTreeGridState';\nexport type {TableColumnResizeState, TableColumnResizeStateProps, TableProps, TableState, TableStateProps, ColumnProps, ColumnSize, ColumnDynamicSize, ColumnStaticSize, ColumnElement, ColumnRenderer, TableHeaderProps, TableBodyProps, RowProps, RowElement, CellProps, CellElement, CellRenderer} from 'react-stately/useTableState';\nexport type {CollectionBuilderContext} from 'react-stately/private/table/useTableState';\nexport type {TreeGridState, TreeGridStateProps} from 'react-stately/private/table/useTreeGridState';\nexport type {ITableCollection} from 'react-stately/private/table/TableCollection';\nexport {Section} from 'react-stately/Section';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,14 +1,8 @@
1
- import {useTableColumnResizeState as $292bc4e09cd0eb62$export$cb895dcf85db1319} from "./useTableColumnResizeState.module.js";
2
- import {UNSTABLE_useFilteredTableState as $4a0dd036d492cee4$export$31447e17397b15c2, useTableState as $4a0dd036d492cee4$export$907bcc6c48325fd6} from "./useTableState.module.js";
3
- import {TableHeader as $312ae3b56a94a86e$export$f850895b287ef28e} from "./TableHeader.module.js";
4
- import {TableBody as $4ae5314bf50db1a3$export$76ccd210b9029917} from "./TableBody.module.js";
5
- import {Column as $1cd244557c2f97d5$export$816b5d811295e6bc} from "./Column.module.js";
6
- import {Row as $70d70eb16ea48428$export$b59bdbef9ce70de2} from "./Row.module.js";
7
- import {Cell as $941d1d9a6a28982a$export$f6f0c3fe4ec306ea} from "./Cell.module.js";
8
- import {buildHeaderRows as $788781baa30117fa$export$7c127db850d4e81e, TableCollection as $788781baa30117fa$export$596e1b2e2cf93690} from "./TableCollection.module.js";
9
- import {TableColumnLayout as $a9e7ae544a4e41dd$export$7ff77a162970b30e} from "./TableColumnLayout.module.js";
10
- import {UNSTABLE_useTreeGridState as $ee65a0057fd99531$export$34dfa8a1622185a4} from "./useTreeGridState.module.js";
11
- import {Section as $6555104ff085bef4$re_export$Section} from "@react-stately/collections";
1
+ import {useTableColumnResizeState as $4fc02e0ff7a01391$re_export$useTableColumnResizeState, useTableState as $4fc02e0ff7a01391$re_export$useTableState, UNSTABLE_useFilteredTableState as $4fc02e0ff7a01391$re_export$UNSTABLE_useFilteredTableState, TableHeader as $4fc02e0ff7a01391$re_export$TableHeader, TableBody as $4fc02e0ff7a01391$re_export$TableBody, Column as $4fc02e0ff7a01391$re_export$Column, Row as $4fc02e0ff7a01391$re_export$Row, Cell as $4fc02e0ff7a01391$re_export$Cell} from "react-stately/useTableState";
2
+ import {TableCollection as $4fc02e0ff7a01391$re_export$TableCollection, buildHeaderRows as $4fc02e0ff7a01391$re_export$buildHeaderRows} from "react-stately/private/table/TableCollection";
3
+ import {TableColumnLayout as $4fc02e0ff7a01391$re_export$TableColumnLayout} from "react-stately/private/table/TableColumnLayout";
4
+ import {UNSTABLE_useTreeGridState as $4fc02e0ff7a01391$re_export$UNSTABLE_useTreeGridState} from "react-stately/private/table/useTreeGridState";
5
+ import {Section as $4fc02e0ff7a01391$re_export$Section} from "react-stately/Section";
12
6
 
13
7
  /*
14
8
  * Copyright 2020 Adobe. All rights reserved.
@@ -27,11 +21,5 @@ import {Section as $6555104ff085bef4$re_export$Section} from "@react-stately/col
27
21
 
28
22
 
29
23
 
30
-
31
-
32
-
33
-
34
-
35
-
36
- export {$292bc4e09cd0eb62$export$cb895dcf85db1319 as useTableColumnResizeState, $4a0dd036d492cee4$export$907bcc6c48325fd6 as useTableState, $4a0dd036d492cee4$export$31447e17397b15c2 as UNSTABLE_useFilteredTableState, $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, $6555104ff085bef4$re_export$Section as Section, $788781baa30117fa$export$596e1b2e2cf93690 as TableCollection, $788781baa30117fa$export$7c127db850d4e81e as buildHeaderRows, $a9e7ae544a4e41dd$export$7ff77a162970b30e as TableColumnLayout, $ee65a0057fd99531$export$34dfa8a1622185a4 as UNSTABLE_useTreeGridState};
24
+ export {$4fc02e0ff7a01391$re_export$useTableColumnResizeState as useTableColumnResizeState, $4fc02e0ff7a01391$re_export$useTableState as useTableState, $4fc02e0ff7a01391$re_export$UNSTABLE_useFilteredTableState as UNSTABLE_useFilteredTableState, $4fc02e0ff7a01391$re_export$TableHeader as TableHeader, $4fc02e0ff7a01391$re_export$TableBody as TableBody, $4fc02e0ff7a01391$re_export$Column as Column, $4fc02e0ff7a01391$re_export$Row as Row, $4fc02e0ff7a01391$re_export$Cell as Cell, $4fc02e0ff7a01391$re_export$TableCollection as TableCollection, $4fc02e0ff7a01391$re_export$buildHeaderRows as buildHeaderRows, $4fc02e0ff7a01391$re_export$TableColumnLayout as TableColumnLayout, $4fc02e0ff7a01391$re_export$UNSTABLE_useTreeGridState as UNSTABLE_useTreeGridState, $4fc02e0ff7a01391$re_export$Section as Section};
37
25
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-stately/table/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport type {TableColumnResizeState, TableColumnResizeStateProps} from './useTableColumnResizeState';\nexport type {TableState, CollectionBuilderContext, TableStateProps} from './useTableState';\nexport type {TableHeaderProps, TableBodyProps, ColumnProps, RowProps, CellProps} from '@react-types/table';\nexport type {TreeGridState, TreeGridStateProps} from './useTreeGridState';\n\nexport {useTableColumnResizeState} from './useTableColumnResizeState';\nexport {useTableState, UNSTABLE_useFilteredTableState} from './useTableState';\nexport {TableHeader} from './TableHeader';\nexport {TableBody} from './TableBody';\nexport {Column} from './Column';\nexport {Row} from './Row';\nexport {Cell} from './Cell';\nexport {Section} from '@react-stately/collections';\nexport {TableCollection, buildHeaderRows} from './TableCollection';\nexport {TableColumnLayout} from './TableColumnLayout';\nexport {UNSTABLE_useTreeGridState} from './useTreeGridState';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-stately/table/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useTableColumnResizeState, useTableState, UNSTABLE_useFilteredTableState, TableHeader, TableBody, Column, Row, Cell} from 'react-stately/useTableState';\nexport {TableCollection, buildHeaderRows} from 'react-stately/private/table/TableCollection';\nexport {TableColumnLayout} from 'react-stately/private/table/TableColumnLayout';\nexport {UNSTABLE_useTreeGridState} from 'react-stately/private/table/useTreeGridState';\nexport type {TableColumnResizeState, TableColumnResizeStateProps, TableProps, TableState, TableStateProps, ColumnProps, ColumnSize, ColumnDynamicSize, ColumnStaticSize, ColumnElement, ColumnRenderer, TableHeaderProps, TableBodyProps, RowProps, RowElement, CellProps, CellElement, CellRenderer} from 'react-stately/useTableState';\nexport type {CollectionBuilderContext} from 'react-stately/private/table/useTableState';\nexport type {TreeGridState, TreeGridStateProps} from 'react-stately/private/table/useTreeGridState';\nexport type {ITableCollection} from 'react-stately/private/table/TableCollection';\nexport {Section} from 'react-stately/Section';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -0,0 +1,9 @@
1
+ export { useTableColumnResizeState, useTableState, UNSTABLE_useFilteredTableState, TableHeader, TableBody, Column, Row, Cell } from 'react-stately/useTableState';
2
+ export { TableCollection, buildHeaderRows } from 'react-stately/private/table/TableCollection';
3
+ export { TableColumnLayout } from 'react-stately/private/table/TableColumnLayout';
4
+ export { UNSTABLE_useTreeGridState } from 'react-stately/private/table/useTreeGridState';
5
+ export type { TableColumnResizeState, TableColumnResizeStateProps, TableProps, TableState, TableStateProps, ColumnProps, ColumnSize, ColumnDynamicSize, ColumnStaticSize, ColumnElement, ColumnRenderer, TableHeaderProps, TableBodyProps, RowProps, RowElement, CellProps, CellElement, CellRenderer } from 'react-stately/useTableState';
6
+ export type { CollectionBuilderContext } from 'react-stately/private/table/useTableState';
7
+ export type { TreeGridState, TreeGridStateProps } from 'react-stately/private/table/useTreeGridState';
8
+ export type { ITableCollection } from 'react-stately/private/table/TableCollection';
9
+ export { Section } from 'react-stately/Section';
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@react-stately/table",
3
- "version": "3.15.4",
3
+ "version": "3.16.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
7
7
  "module": "dist/module.js",
8
8
  "exports": {
9
- "source": "./src/index.ts",
10
- "types": [
11
- "./dist/types.d.ts",
12
- "./src/index.ts"
13
- ],
14
- "import": "./dist/import.mjs",
15
- "require": "./dist/main.js"
9
+ ".": {
10
+ "source": "./src/index.ts",
11
+ "types": "./dist/types/src/index.d.ts",
12
+ "import": "./dist/import.mjs",
13
+ "require": "./dist/main.js"
14
+ },
15
+ "./package.json": "./package.json"
16
16
  },
17
- "types": "dist/types.d.ts",
17
+ "types": "dist/types/src/index.d.ts",
18
18
  "source": "src/index.ts",
19
19
  "files": [
20
20
  "dist",
@@ -26,21 +26,18 @@
26
26
  "url": "https://github.com/adobe/react-spectrum"
27
27
  },
28
28
  "dependencies": {
29
- "@react-stately/collections": "^3.12.10",
30
- "@react-stately/flags": "^3.1.2",
31
- "@react-stately/grid": "^3.11.9",
32
- "@react-stately/selection": "^3.20.9",
33
- "@react-stately/utils": "^3.11.0",
34
- "@react-types/grid": "^3.3.8",
35
- "@react-types/shared": "^3.33.1",
36
- "@react-types/table": "^3.13.6",
37
- "@swc/helpers": "^0.5.0"
29
+ "@swc/helpers": "^0.5.0",
30
+ "react-stately": "3.46.0"
38
31
  },
39
32
  "peerDependencies": {
40
- "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
33
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
34
+ "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
41
35
  },
42
36
  "publishConfig": {
43
37
  "access": "public"
44
38
  },
45
- "gitHead": "8df187370053aa35f553cb388ad670f65e1ab371"
39
+ "targets": {
40
+ "types": false
41
+ },
42
+ "gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
46
43
  }
package/src/index.ts CHANGED
@@ -10,19 +10,12 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- export type {TableColumnResizeState, TableColumnResizeStateProps} from './useTableColumnResizeState';
14
- export type {TableState, CollectionBuilderContext, TableStateProps} from './useTableState';
15
- export type {TableHeaderProps, TableBodyProps, ColumnProps, RowProps, CellProps} from '@react-types/table';
16
- export type {TreeGridState, TreeGridStateProps} from './useTreeGridState';
17
-
18
- export {useTableColumnResizeState} from './useTableColumnResizeState';
19
- export {useTableState, UNSTABLE_useFilteredTableState} from './useTableState';
20
- export {TableHeader} from './TableHeader';
21
- export {TableBody} from './TableBody';
22
- export {Column} from './Column';
23
- export {Row} from './Row';
24
- export {Cell} from './Cell';
25
- export {Section} from '@react-stately/collections';
26
- export {TableCollection, buildHeaderRows} from './TableCollection';
27
- export {TableColumnLayout} from './TableColumnLayout';
28
- export {UNSTABLE_useTreeGridState} from './useTreeGridState';
13
+ export {useTableColumnResizeState, useTableState, UNSTABLE_useFilteredTableState, TableHeader, TableBody, Column, Row, Cell} from 'react-stately/useTableState';
14
+ export {TableCollection, buildHeaderRows} from 'react-stately/private/table/TableCollection';
15
+ export {TableColumnLayout} from 'react-stately/private/table/TableColumnLayout';
16
+ export {UNSTABLE_useTreeGridState} from 'react-stately/private/table/useTreeGridState';
17
+ export type {TableColumnResizeState, TableColumnResizeStateProps, TableProps, TableState, TableStateProps, ColumnProps, ColumnSize, ColumnDynamicSize, ColumnStaticSize, ColumnElement, ColumnRenderer, TableHeaderProps, TableBodyProps, RowProps, RowElement, CellProps, CellElement, CellRenderer} from 'react-stately/useTableState';
18
+ export type {CollectionBuilderContext} from 'react-stately/private/table/useTableState';
19
+ export type {TreeGridState, TreeGridStateProps} from 'react-stately/private/table/useTreeGridState';
20
+ export type {ITableCollection} from 'react-stately/private/table/TableCollection';
21
+ export {Section} from 'react-stately/Section';
package/dist/Cell.main.js DELETED
@@ -1,38 +0,0 @@
1
-
2
- function $parcel$export(e, n, v, s) {
3
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
4
- }
5
-
6
- $parcel$export(module.exports, "Cell", () => $ad4ab0a21c733e1f$export$f6f0c3fe4ec306ea);
7
- /*
8
- * Copyright 2020 Adobe. All rights reserved.
9
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License. You may obtain a copy
11
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software distributed under
14
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
15
- * OF ANY KIND, either express or implied. See the License for the specific language
16
- * governing permissions and limitations under the License.
17
- */ function $ad4ab0a21c733e1f$var$Cell(props) {
18
- return null;
19
- }
20
- $ad4ab0a21c733e1f$var$Cell.getCollectionNode = function* getCollectionNode(props) {
21
- let { children: children } = props;
22
- let textValue = props.textValue || (typeof children === 'string' ? children : '') || props['aria-label'] || '';
23
- yield {
24
- type: 'cell',
25
- props: props,
26
- rendered: children,
27
- textValue: textValue,
28
- 'aria-label': props['aria-label'],
29
- hasChildNodes: false
30
- };
31
- };
32
- /**
33
- * A Cell represents the value of a single Column within a Table Row.
34
- */ // We don't want getCollectionNode to show up in the type definition
35
- let $ad4ab0a21c733e1f$export$f6f0c3fe4ec306ea = $ad4ab0a21c733e1f$var$Cell;
36
-
37
-
38
- //# sourceMappingURL=Cell.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAMD,SAAS,2BAAK,KAAgB;IAC5B,OAAO;AACT;AAEA,2BAAK,iBAAiB,GAAG,UAAU,kBAAqB,KAAgB;IACtE,IAAI,YAAC,QAAQ,EAAC,GAAG;IAEjB,IAAI,YAAY,MAAM,SAAS,IAAK,CAAA,OAAO,aAAa,WAAW,WAAW,EAAC,KAAM,KAAK,CAAC,aAAa,IAAI;IAC5G,MAAM;QACJ,MAAM;QACN,OAAO;QACP,UAAU;mBACV;QACA,cAAc,KAAK,CAAC,aAAa;QACjC,eAAe;IACjB;AACF;AAEA;;CAEC,GACD,oEAAoE;AACpE,IAAI,4CAAQ","sources":["packages/@react-stately/table/src/Cell.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CellProps} from '@react-types/table';\nimport {JSX, ReactElement} from 'react';\nimport {PartialNode} from '@react-stately/collections';\n\nfunction Cell(props: CellProps): ReactElement | null { // eslint-disable-line @typescript-eslint/no-unused-vars\n return null;\n}\n\nCell.getCollectionNode = function* getCollectionNode<T>(props: CellProps): Generator<PartialNode<T>> {\n let {children} = props;\n\n let textValue = props.textValue || (typeof children === 'string' ? children : '') || props['aria-label'] || '';\n yield {\n type: 'cell',\n props: props,\n rendered: children,\n textValue,\n 'aria-label': props['aria-label'],\n hasChildNodes: false\n };\n};\n\n/**\n * A Cell represents the value of a single Column within a Table Row.\n */\n// We don't want getCollectionNode to show up in the type definition\nlet _Cell = Cell as (props: CellProps) => JSX.Element;\nexport {_Cell as Cell};\n"],"names":[],"version":3,"file":"Cell.main.js.map"}
package/dist/Cell.mjs DELETED
@@ -1,33 +0,0 @@
1
- /*
2
- * Copyright 2020 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */ function $941d1d9a6a28982a$var$Cell(props) {
12
- return null;
13
- }
14
- $941d1d9a6a28982a$var$Cell.getCollectionNode = function* getCollectionNode(props) {
15
- let { children: children } = props;
16
- let textValue = props.textValue || (typeof children === 'string' ? children : '') || props['aria-label'] || '';
17
- yield {
18
- type: 'cell',
19
- props: props,
20
- rendered: children,
21
- textValue: textValue,
22
- 'aria-label': props['aria-label'],
23
- hasChildNodes: false
24
- };
25
- };
26
- /**
27
- * A Cell represents the value of a single Column within a Table Row.
28
- */ // We don't want getCollectionNode to show up in the type definition
29
- let $941d1d9a6a28982a$export$f6f0c3fe4ec306ea = $941d1d9a6a28982a$var$Cell;
30
-
31
-
32
- export {$941d1d9a6a28982a$export$f6f0c3fe4ec306ea as Cell};
33
- //# sourceMappingURL=Cell.module.js.map
@@ -1,33 +0,0 @@
1
- /*
2
- * Copyright 2020 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */ function $941d1d9a6a28982a$var$Cell(props) {
12
- return null;
13
- }
14
- $941d1d9a6a28982a$var$Cell.getCollectionNode = function* getCollectionNode(props) {
15
- let { children: children } = props;
16
- let textValue = props.textValue || (typeof children === 'string' ? children : '') || props['aria-label'] || '';
17
- yield {
18
- type: 'cell',
19
- props: props,
20
- rendered: children,
21
- textValue: textValue,
22
- 'aria-label': props['aria-label'],
23
- hasChildNodes: false
24
- };
25
- };
26
- /**
27
- * A Cell represents the value of a single Column within a Table Row.
28
- */ // We don't want getCollectionNode to show up in the type definition
29
- let $941d1d9a6a28982a$export$f6f0c3fe4ec306ea = $941d1d9a6a28982a$var$Cell;
30
-
31
-
32
- export {$941d1d9a6a28982a$export$f6f0c3fe4ec306ea as Cell};
33
- //# sourceMappingURL=Cell.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":"AAAA;;;;;;;;;;CAUC,GAMD,SAAS,2BAAK,KAAgB;IAC5B,OAAO;AACT;AAEA,2BAAK,iBAAiB,GAAG,UAAU,kBAAqB,KAAgB;IACtE,IAAI,YAAC,QAAQ,EAAC,GAAG;IAEjB,IAAI,YAAY,MAAM,SAAS,IAAK,CAAA,OAAO,aAAa,WAAW,WAAW,EAAC,KAAM,KAAK,CAAC,aAAa,IAAI;IAC5G,MAAM;QACJ,MAAM;QACN,OAAO;QACP,UAAU;mBACV;QACA,cAAc,KAAK,CAAC,aAAa;QACjC,eAAe;IACjB;AACF;AAEA;;CAEC,GACD,oEAAoE;AACpE,IAAI,4CAAQ","sources":["packages/@react-stately/table/src/Cell.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CellProps} from '@react-types/table';\nimport {JSX, ReactElement} from 'react';\nimport {PartialNode} from '@react-stately/collections';\n\nfunction Cell(props: CellProps): ReactElement | null { // eslint-disable-line @typescript-eslint/no-unused-vars\n return null;\n}\n\nCell.getCollectionNode = function* getCollectionNode<T>(props: CellProps): Generator<PartialNode<T>> {\n let {children} = props;\n\n let textValue = props.textValue || (typeof children === 'string' ? children : '') || props['aria-label'] || '';\n yield {\n type: 'cell',\n props: props,\n rendered: children,\n textValue,\n 'aria-label': props['aria-label'],\n hasChildNodes: false\n };\n};\n\n/**\n * A Cell represents the value of a single Column within a Table Row.\n */\n// We don't want getCollectionNode to show up in the type definition\nlet _Cell = Cell as (props: CellProps) => JSX.Element;\nexport {_Cell as Cell};\n"],"names":[],"version":3,"file":"Cell.module.js.map"}
@@ -1,75 +0,0 @@
1
- var $kykIu$react = require("react");
2
-
3
-
4
- function $parcel$interopDefault(a) {
5
- return a && a.__esModule ? a.default : a;
6
- }
7
-
8
- function $parcel$export(e, n, v, s) {
9
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
10
- }
11
-
12
- $parcel$export(module.exports, "Column", () => $714483d9f6ca4c55$export$816b5d811295e6bc);
13
- /*
14
- * Copyright 2020 Adobe. All rights reserved.
15
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
16
- * you may not use this file except in compliance with the License. You may obtain a copy
17
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
18
- *
19
- * Unless required by applicable law or agreed to in writing, software distributed under
20
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
21
- * OF ANY KIND, either express or implied. See the License for the specific language
22
- * governing permissions and limitations under the License.
23
- */
24
- function $714483d9f6ca4c55$var$Column(props) {
25
- return null;
26
- }
27
- $714483d9f6ca4c55$var$Column.getCollectionNode = function* getCollectionNode(props, context) {
28
- let { title: title, children: children, childColumns: childColumns } = props;
29
- let rendered = title || children;
30
- let textValue = props.textValue || (typeof rendered === 'string' ? rendered : '') || props['aria-label'];
31
- let fullNodes = yield {
32
- type: 'column',
33
- hasChildNodes: !!childColumns || !!title && (0, ($parcel$interopDefault($kykIu$react))).Children.count(children) > 0,
34
- rendered: rendered,
35
- textValue: textValue,
36
- props: props,
37
- *childNodes () {
38
- if (childColumns) for (let child of childColumns)yield {
39
- type: 'column',
40
- value: child
41
- };
42
- else if (title) {
43
- let childColumns = [];
44
- (0, ($parcel$interopDefault($kykIu$react))).Children.forEach(children, (child)=>{
45
- childColumns.push({
46
- type: 'column',
47
- element: child
48
- });
49
- });
50
- yield* childColumns;
51
- }
52
- },
53
- shouldInvalidate (newContext) {
54
- // This is a bit of a hack, but it works.
55
- // If this method is called, then there's a cached version of this node available.
56
- // But, we need to keep the list of columns in the new context up to date.
57
- updateContext(newContext);
58
- return false;
59
- }
60
- };
61
- let updateContext = (context)=>{
62
- // register leaf columns on the context so that <Row> can access them
63
- for (let node of fullNodes)if (!node.hasChildNodes) context.columns.push(node);
64
- };
65
- updateContext(context);
66
- };
67
- /**
68
- * A Column represents a field of each item within a Table. Columns may also contain nested
69
- * Column elements to represent column groups. Nested columns can be statically defined as
70
- * children, or dynamically generated using a function based on the `childColumns` prop.
71
- */ // We don't want getCollectionNode to show up in the type definition
72
- let $714483d9f6ca4c55$export$816b5d811295e6bc = $714483d9f6ca4c55$var$Column;
73
-
74
-
75
- //# sourceMappingURL=Column.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;AAQD,SAAS,6BAAU,KAAqB;IACtC,OAAO;AACT;AAEA,6BAAO,iBAAiB,GAAG,UAAU,kBAAqB,KAAqB,EAAE,OAAoC;IACnH,IAAI,SAAC,KAAK,YAAE,QAAQ,gBAAE,YAAY,EAAC,GAAG;IAEtC,IAAI,WAAW,SAAS;IACxB,IAAI,YAAY,MAAM,SAAS,IAAK,CAAA,OAAO,aAAa,WAAW,WAAW,EAAC,KAAM,KAAK,CAAC,aAAa;IAExG,IAAI,YAAY,MAAM;QACpB,MAAM;QACN,eAAe,CAAC,CAAC,gBAAiB,CAAC,CAAC,SAAS,CAAA,GAAA,sCAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,YAAY;kBAC9E;mBACA;eACA;QACA,CAAC;YACC,IAAI,cACF,KAAK,IAAI,SAAS,aAChB,MAAM;gBACJ,MAAM;gBACN,OAAO;YACT;iBAEG,IAAI,OAAO;gBAChB,IAAI,eAAiC,EAAE;gBACvC,CAAA,GAAA,sCAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAA;oBAC/B,aAAa,IAAI,CAAC;wBAChB,MAAM;wBACN,SAAS;oBACX;gBACF;gBAEA,OAAO;YACT;QACF;QACA,kBAAiB,UAAuC;YACtD,yCAAyC;YACzC,kFAAkF;YAClF,0EAA0E;YAC1E,cAAc;YACd,OAAO;QACT;IACF;IAEA,IAAI,gBAAgB,CAAC;QACnB,qEAAqE;QACrE,KAAK,IAAI,QAAQ,UACf,IAAI,CAAC,KAAK,aAAa,EACrB,QAAQ,OAAO,CAAC,IAAI,CAAC;IAG3B;IAEA,cAAc;AAChB;AAEA;;;;CAIC,GACD,oEAAoE;AACpE,IAAI,4CAAU","sources":["packages/@react-stately/table/src/Column.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CollectionBuilderContext} from './useTableState';\nimport {ColumnProps} from '@react-types/table';\nimport {GridNode} from '@react-types/grid';\nimport {PartialNode} from '@react-stately/collections';\nimport React, {JSX, ReactElement} from 'react';\n\nfunction Column<T>(props: ColumnProps<T>): ReactElement | null { // eslint-disable-line @typescript-eslint/no-unused-vars\n return null;\n}\n\nColumn.getCollectionNode = function* getCollectionNode<T>(props: ColumnProps<T>, context: CollectionBuilderContext<T>): Generator<PartialNode<T>, void, GridNode<T>[]> {\n let {title, children, childColumns} = props;\n\n let rendered = title || children;\n let textValue = props.textValue || (typeof rendered === 'string' ? rendered : '') || props['aria-label'];\n\n let fullNodes = yield {\n type: 'column',\n hasChildNodes: !!childColumns || (!!title && React.Children.count(children) > 0),\n rendered,\n textValue,\n props,\n *childNodes() {\n if (childColumns) {\n for (let child of childColumns) {\n yield {\n type: 'column',\n value: child\n };\n }\n } else if (title) {\n let childColumns: PartialNode<T>[] = [];\n React.Children.forEach(children, child => {\n childColumns.push({\n type: 'column',\n element: child as ReactElement<ColumnProps<T>>\n });\n });\n\n yield* childColumns;\n }\n },\n shouldInvalidate(newContext: CollectionBuilderContext<T>) {\n // This is a bit of a hack, but it works.\n // If this method is called, then there's a cached version of this node available.\n // But, we need to keep the list of columns in the new context up to date.\n updateContext(newContext);\n return false;\n }\n };\n\n let updateContext = (context: CollectionBuilderContext<T>) => {\n // register leaf columns on the context so that <Row> can access them\n for (let node of fullNodes) {\n if (!node.hasChildNodes) {\n context.columns.push(node);\n }\n }\n };\n\n updateContext(context);\n};\n\n/**\n * A Column represents a field of each item within a Table. Columns may also contain nested\n * Column elements to represent column groups. Nested columns can be statically defined as\n * children, or dynamically generated using a function based on the `childColumns` prop.\n */\n// We don't want getCollectionNode to show up in the type definition\nlet _Column = Column as <T>(props: ColumnProps<T>) => JSX.Element;\nexport {_Column as Column};\n"],"names":[],"version":3,"file":"Column.main.js.map"}
package/dist/Column.mjs DELETED
@@ -1,66 +0,0 @@
1
- import $kIQ5E$react from "react";
2
-
3
- /*
4
- * Copyright 2020 Adobe. All rights reserved.
5
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License. You may obtain a copy
7
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
8
- *
9
- * Unless required by applicable law or agreed to in writing, software distributed under
10
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
11
- * OF ANY KIND, either express or implied. See the License for the specific language
12
- * governing permissions and limitations under the License.
13
- */
14
- function $1cd244557c2f97d5$var$Column(props) {
15
- return null;
16
- }
17
- $1cd244557c2f97d5$var$Column.getCollectionNode = function* getCollectionNode(props, context) {
18
- let { title: title, children: children, childColumns: childColumns } = props;
19
- let rendered = title || children;
20
- let textValue = props.textValue || (typeof rendered === 'string' ? rendered : '') || props['aria-label'];
21
- let fullNodes = yield {
22
- type: 'column',
23
- hasChildNodes: !!childColumns || !!title && (0, $kIQ5E$react).Children.count(children) > 0,
24
- rendered: rendered,
25
- textValue: textValue,
26
- props: props,
27
- *childNodes () {
28
- if (childColumns) for (let child of childColumns)yield {
29
- type: 'column',
30
- value: child
31
- };
32
- else if (title) {
33
- let childColumns = [];
34
- (0, $kIQ5E$react).Children.forEach(children, (child)=>{
35
- childColumns.push({
36
- type: 'column',
37
- element: child
38
- });
39
- });
40
- yield* childColumns;
41
- }
42
- },
43
- shouldInvalidate (newContext) {
44
- // This is a bit of a hack, but it works.
45
- // If this method is called, then there's a cached version of this node available.
46
- // But, we need to keep the list of columns in the new context up to date.
47
- updateContext(newContext);
48
- return false;
49
- }
50
- };
51
- let updateContext = (context)=>{
52
- // register leaf columns on the context so that <Row> can access them
53
- for (let node of fullNodes)if (!node.hasChildNodes) context.columns.push(node);
54
- };
55
- updateContext(context);
56
- };
57
- /**
58
- * A Column represents a field of each item within a Table. Columns may also contain nested
59
- * Column elements to represent column groups. Nested columns can be statically defined as
60
- * children, or dynamically generated using a function based on the `childColumns` prop.
61
- */ // We don't want getCollectionNode to show up in the type definition
62
- let $1cd244557c2f97d5$export$816b5d811295e6bc = $1cd244557c2f97d5$var$Column;
63
-
64
-
65
- export {$1cd244557c2f97d5$export$816b5d811295e6bc as Column};
66
- //# sourceMappingURL=Column.module.js.map
@@ -1,66 +0,0 @@
1
- import $kIQ5E$react from "react";
2
-
3
- /*
4
- * Copyright 2020 Adobe. All rights reserved.
5
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License. You may obtain a copy
7
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
8
- *
9
- * Unless required by applicable law or agreed to in writing, software distributed under
10
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
11
- * OF ANY KIND, either express or implied. See the License for the specific language
12
- * governing permissions and limitations under the License.
13
- */
14
- function $1cd244557c2f97d5$var$Column(props) {
15
- return null;
16
- }
17
- $1cd244557c2f97d5$var$Column.getCollectionNode = function* getCollectionNode(props, context) {
18
- let { title: title, children: children, childColumns: childColumns } = props;
19
- let rendered = title || children;
20
- let textValue = props.textValue || (typeof rendered === 'string' ? rendered : '') || props['aria-label'];
21
- let fullNodes = yield {
22
- type: 'column',
23
- hasChildNodes: !!childColumns || !!title && (0, $kIQ5E$react).Children.count(children) > 0,
24
- rendered: rendered,
25
- textValue: textValue,
26
- props: props,
27
- *childNodes () {
28
- if (childColumns) for (let child of childColumns)yield {
29
- type: 'column',
30
- value: child
31
- };
32
- else if (title) {
33
- let childColumns = [];
34
- (0, $kIQ5E$react).Children.forEach(children, (child)=>{
35
- childColumns.push({
36
- type: 'column',
37
- element: child
38
- });
39
- });
40
- yield* childColumns;
41
- }
42
- },
43
- shouldInvalidate (newContext) {
44
- // This is a bit of a hack, but it works.
45
- // If this method is called, then there's a cached version of this node available.
46
- // But, we need to keep the list of columns in the new context up to date.
47
- updateContext(newContext);
48
- return false;
49
- }
50
- };
51
- let updateContext = (context)=>{
52
- // register leaf columns on the context so that <Row> can access them
53
- for (let node of fullNodes)if (!node.hasChildNodes) context.columns.push(node);
54
- };
55
- updateContext(context);
56
- };
57
- /**
58
- * A Column represents a field of each item within a Table. Columns may also contain nested
59
- * Column elements to represent column groups. Nested columns can be statically defined as
60
- * children, or dynamically generated using a function based on the `childColumns` prop.
61
- */ // We don't want getCollectionNode to show up in the type definition
62
- let $1cd244557c2f97d5$export$816b5d811295e6bc = $1cd244557c2f97d5$var$Column;
63
-
64
-
65
- export {$1cd244557c2f97d5$export$816b5d811295e6bc as Column};
66
- //# sourceMappingURL=Column.module.js.map