@dxos/react-ui-table 0.4.10-main.c32f430 → 0.4.10-main.c42bfdb

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 (59) hide show
  1. package/dist/lib/browser/index.mjs +435 -283
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/types/src/components/{ColumnMenu.d.ts → ColumnMenu/ColumnMenu.d.ts} +1 -1
  5. package/dist/types/src/components/ColumnMenu/ColumnMenu.d.ts.map +1 -0
  6. package/dist/types/src/components/{ColumnMenu.stories.d.ts → ColumnMenu/ColumnMenu.stories.d.ts} +1 -1
  7. package/dist/types/src/components/ColumnMenu/ColumnMenu.stories.d.ts.map +1 -0
  8. package/dist/types/src/components/{ColumnSettingsForm.d.ts → ColumnMenu/ColumnSettingsForm.d.ts} +5 -4
  9. package/dist/types/src/components/ColumnMenu/ColumnSettingsForm.d.ts.map +1 -0
  10. package/dist/types/src/components/ColumnMenu/index.d.ts +3 -0
  11. package/dist/types/src/components/ColumnMenu/index.d.ts.map +1 -0
  12. package/dist/types/src/components/index.d.ts +1 -1
  13. package/dist/types/src/components/index.d.ts.map +1 -1
  14. package/dist/types/src/helpers.d.ts +4 -0
  15. package/dist/types/src/helpers.d.ts.map +1 -1
  16. package/dist/types/src/hooks/index.d.ts +3 -0
  17. package/dist/types/src/hooks/index.d.ts.map +1 -0
  18. package/dist/types/src/hooks/useColumnSorting.d.ts.map +1 -0
  19. package/dist/types/src/hooks/usePinLastRow.d.ts.map +1 -0
  20. package/dist/types/src/index.d.ts +2 -1
  21. package/dist/types/src/index.d.ts.map +1 -1
  22. package/dist/types/src/schema/SchemaToTable.stories.d.ts +11 -0
  23. package/dist/types/src/schema/SchemaToTable.stories.d.ts.map +1 -0
  24. package/dist/types/src/schema/index.d.ts +3 -0
  25. package/dist/types/src/schema/index.d.ts.map +1 -0
  26. package/dist/types/src/schema/schema.d.ts +5 -0
  27. package/dist/types/src/schema/schema.d.ts.map +1 -0
  28. package/dist/types/src/schema/schema.test.d.ts +2 -0
  29. package/dist/types/src/schema/schema.test.d.ts.map +1 -0
  30. package/dist/types/src/schema/schemaToColumns.d.ts +4 -0
  31. package/dist/types/src/schema/schemaToColumns.d.ts.map +1 -0
  32. package/dist/types/src/{schema.d.ts → schema/types.d.ts} +1 -1
  33. package/dist/types/src/schema/types.d.ts.map +1 -0
  34. package/package.json +18 -15
  35. package/src/components/{ColumnMenu.stories.tsx → ColumnMenu/ColumnMenu.stories.tsx} +1 -1
  36. package/src/components/{ColumnMenu.tsx → ColumnMenu/ColumnMenu.tsx} +2 -2
  37. package/src/components/{ColumnSettingsForm.tsx → ColumnMenu/ColumnSettingsForm.tsx} +14 -12
  38. package/src/components/ColumnMenu/index.ts +6 -0
  39. package/src/components/Table/Table.tsx +1 -1
  40. package/src/components/index.ts +1 -1
  41. package/src/helpers.tsx +22 -0
  42. package/src/hooks/index.ts +6 -0
  43. package/src/index.ts +3 -1
  44. package/src/schema/SchemaToTable.stories.tsx +72 -0
  45. package/src/schema/index.ts +6 -0
  46. package/src/schema/schema.test.ts +148 -0
  47. package/src/schema/schema.ts +93 -0
  48. package/src/schema/schemaToColumns.ts +47 -0
  49. package/dist/types/src/components/ColumnMenu.d.ts.map +0 -1
  50. package/dist/types/src/components/ColumnMenu.stories.d.ts.map +0 -1
  51. package/dist/types/src/components/ColumnSettingsForm.d.ts.map +0 -1
  52. package/dist/types/src/components/hooks/useColumnSorting.d.ts.map +0 -1
  53. package/dist/types/src/components/hooks/usePinLastRow.d.ts.map +0 -1
  54. package/dist/types/src/schema.d.ts.map +0 -1
  55. /package/dist/types/src/{components/hooks → hooks}/useColumnSorting.d.ts +0 -0
  56. /package/dist/types/src/{components/hooks → hooks}/usePinLastRow.d.ts +0 -0
  57. /package/src/{components/hooks → hooks}/useColumnSorting.ts +0 -0
  58. /package/src/{components/hooks → hooks}/usePinLastRow.ts +0 -0
  59. /package/src/{schema.ts → schema/types.ts} +0 -0
@@ -1 +1 @@
1
- {"inputs":{"packages/ui/react-ui-table/src/translations.ts":{"bytes":2343,"imports":[],"format":"esm"},"packages/ui/react-ui-table/src/components/ColumnSettingsForm.tsx":{"bytes":23567,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-table/src/translations.ts","kind":"import-statement","original":"../translations"}],"format":"esm"},"packages/ui/react-ui-table/src/components/hooks/useColumnSorting.ts":{"bytes":5080,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-table/src/components/ColumnMenu.tsx":{"bytes":18609,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-table/src/components/ColumnSettingsForm.tsx","kind":"import-statement","original":"./ColumnSettingsForm"},{"path":"packages/ui/react-ui-table/src/components/hooks/useColumnSorting.ts","kind":"import-statement","original":"./hooks/useColumnSorting"}],"format":"esm"},"packages/ui/react-ui-table/src/components/Table/TableContext.tsx":{"bytes":3140,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-table/src/theme.ts":{"bytes":10262,"imports":[{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-table/src/components/Cell/Cell.tsx":{"bytes":4842,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-table/src/theme.ts","kind":"import-statement","original":"../../theme"},{"path":"packages/ui/react-ui-table/src/components/Table/TableContext.tsx","kind":"import-statement","original":"../Table/TableContext"}],"format":"esm"},"packages/ui/react-ui-table/src/components/Table/TableBody.tsx":{"bytes":8051,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-table/src/components/Table/TableContext.tsx","kind":"import-statement","original":"./TableContext"},{"path":"packages/ui/react-ui-table/src/theme.ts","kind":"import-statement","original":"../../theme"},{"path":"packages/ui/react-ui-table/src/components/Cell/Cell.tsx","kind":"import-statement","original":"../Cell/Cell"}],"format":"esm"},"packages/ui/react-ui-table/src/components/Table/TableFooter.tsx":{"bytes":4638,"imports":[{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-table/src/components/Table/TableContext.tsx","kind":"import-statement","original":"./TableContext"},{"path":"packages/ui/react-ui-table/src/theme.ts","kind":"import-statement","original":"../../theme"}],"format":"esm"},"packages/ui/react-ui-table/src/components/Table/TableHead.tsx":{"bytes":7863,"imports":[{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-table/src/components/Table/TableContext.tsx","kind":"import-statement","original":"./TableContext"},{"path":"packages/ui/react-ui-table/src/theme.ts","kind":"import-statement","original":"../../theme"}],"format":"esm"},"packages/ui/react-ui-table/src/components/hooks/usePinLastRow.ts":{"bytes":3993,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-table/src/components/Table/Table.tsx":{"bytes":32122,"imports":[{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"@tanstack/react-virtual","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-table/src/components/Table/TableBody.tsx","kind":"import-statement","original":"./TableBody"},{"path":"packages/ui/react-ui-table/src/components/Table/TableContext.tsx","kind":"import-statement","original":"./TableContext"},{"path":"packages/ui/react-ui-table/src/components/Table/TableFooter.tsx","kind":"import-statement","original":"./TableFooter"},{"path":"packages/ui/react-ui-table/src/components/Table/TableHead.tsx","kind":"import-statement","original":"./TableHead"},{"path":"packages/ui/react-ui-table/src/theme.ts","kind":"import-statement","original":"../../theme"},{"path":"packages/ui/react-ui-table/src/components/hooks/usePinLastRow.ts","kind":"import-statement","original":"../hooks/usePinLastRow"}],"format":"esm"},"packages/ui/react-ui-table/src/components/Table/props.ts":{"bytes":3075,"imports":[],"format":"esm"},"packages/ui/react-ui-table/src/components/Table/index.ts":{"bytes":557,"imports":[{"path":"packages/ui/react-ui-table/src/components/Table/Table.tsx","kind":"import-statement","original":"./Table"},{"path":"packages/ui/react-ui-table/src/components/Table/props.ts","kind":"import-statement","original":"./props"}],"format":"esm"},"packages/ui/react-ui-table/src/components/Cell/CellCombobox.tsx":{"bytes":11696,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-table/src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"packages/ui/react-ui-table/src/components/Cell/index.ts":{"bytes":494,"imports":[{"path":"packages/ui/react-ui-table/src/components/Cell/CellCombobox.tsx","kind":"import-statement","original":"./CellCombobox"}],"format":"esm"},"packages/ui/react-ui-table/src/components/index.ts":{"bytes":644,"imports":[{"path":"packages/ui/react-ui-table/src/components/ColumnMenu.tsx","kind":"import-statement","original":"./ColumnMenu"},{"path":"packages/ui/react-ui-table/src/components/Table/index.ts","kind":"import-statement","original":"./Table"},{"path":"packages/ui/react-ui-table/src/components/Cell/index.ts","kind":"import-statement","original":"./Cell"}],"format":"esm"},"packages/ui/react-ui-table/src/helpers.tsx":{"bytes":51734,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"date-fns/format","kind":"import-statement","external":true},{"path":"date-fns/formatDistanceToNow","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-table/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-table/src/components/Table/TableContext.tsx","kind":"import-statement","original":"./components/Table/TableContext"},{"path":"packages/ui/react-ui-table/src/theme.ts","kind":"import-statement","original":"./theme"}],"format":"esm"},"packages/ui/react-ui-table/src/schema.ts":{"bytes":1111,"imports":[],"format":"esm"},"packages/ui/react-ui-table/src/types.ts":{"bytes":1830,"imports":[],"format":"esm"},"packages/ui/react-ui-table/src/index.ts":{"bytes":1017,"imports":[{"path":"packages/ui/react-ui-table/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-table/src/helpers.tsx","kind":"import-statement","original":"./helpers"},{"path":"packages/ui/react-ui-table/src/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/ui/react-ui-table/src/theme.ts","kind":"import-statement","original":"./theme"},{"path":"packages/ui/react-ui-table/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/ui/react-ui-table/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"}},"outputs":{"packages/ui/react-ui-table/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":99128},"packages/ui/react-ui-table/dist/lib/browser/index.mjs":{"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"@tanstack/react-virtual","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"date-fns/format","kind":"import-statement","external":true},{"path":"date-fns/formatDistanceToNow","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["CellCombobox","ColumnBuilder","ColumnMenu","ColumnSettingsPanel","MemoizedVirtualisedTableContent","SortIndicator","Table","createColumnBuilder","currentRow","flushPadding","gridCellFocusRing","groupTh","headPadding","selectedRow","tableRoot","tbodyRoot","tbodyTr","tdContent","tdRoot","textPadding","tfootRoot","tfootTh","tfootTr","theadResizeRoot","theadRoot","theadTh","theadTr","translations"],"entryPoint":"packages/ui/react-ui-table/src/index.ts","inputs":{"packages/ui/react-ui-table/src/components/ColumnMenu.tsx":{"bytesInOutput":5303},"packages/ui/react-ui-table/src/components/ColumnSettingsForm.tsx":{"bytesInOutput":6544},"packages/ui/react-ui-table/src/translations.ts":{"bytesInOutput":611},"packages/ui/react-ui-table/src/components/hooks/useColumnSorting.ts":{"bytesInOutput":1082},"packages/ui/react-ui-table/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-table/src/components/Table/Table.tsx":{"bytesInOutput":8325},"packages/ui/react-ui-table/src/components/Table/TableBody.tsx":{"bytesInOutput":1825},"packages/ui/react-ui-table/src/components/Table/TableContext.tsx":{"bytesInOutput":358},"packages/ui/react-ui-table/src/theme.ts":{"bytesInOutput":2205},"packages/ui/react-ui-table/src/components/Cell/Cell.tsx":{"bytesInOutput":973},"packages/ui/react-ui-table/src/components/Table/TableFooter.tsx":{"bytesInOutput":1015},"packages/ui/react-ui-table/src/components/Table/TableHead.tsx":{"bytesInOutput":1739},"packages/ui/react-ui-table/src/components/hooks/usePinLastRow.ts":{"bytesInOutput":896},"packages/ui/react-ui-table/src/components/Table/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-table/src/components/Cell/CellCombobox.tsx":{"bytesInOutput":3110},"packages/ui/react-ui-table/src/components/Cell/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-table/src/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-table/src/helpers.tsx":{"bytesInOutput":12651}},"bytes":48262}}}
1
+ {"inputs":{"packages/ui/react-ui-table/src/translations.ts":{"bytes":2343,"imports":[],"format":"esm"},"packages/ui/react-ui-table/src/components/Cell/CellCombobox.tsx":{"bytes":11696,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-table/src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"packages/ui/react-ui-table/src/components/Cell/index.ts":{"bytes":494,"imports":[{"path":"packages/ui/react-ui-table/src/components/Cell/CellCombobox.tsx","kind":"import-statement","original":"./CellCombobox"}],"format":"esm"},"packages/ui/react-ui-table/src/components/ColumnMenu/ColumnSettingsForm.tsx":{"bytes":23695,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-table/src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"packages/ui/react-ui-table/src/hooks/useColumnSorting.ts":{"bytes":5069,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-table/src/hooks/usePinLastRow.ts":{"bytes":3982,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-table/src/hooks/index.ts":{"bytes":597,"imports":[{"path":"packages/ui/react-ui-table/src/hooks/useColumnSorting.ts","kind":"import-statement","original":"./useColumnSorting"},{"path":"packages/ui/react-ui-table/src/hooks/usePinLastRow.ts","kind":"import-statement","original":"./usePinLastRow"}],"format":"esm"},"packages/ui/react-ui-table/src/components/ColumnMenu/ColumnMenu.tsx":{"bytes":18591,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-table/src/components/ColumnMenu/ColumnSettingsForm.tsx","kind":"import-statement","original":"./ColumnSettingsForm"},{"path":"packages/ui/react-ui-table/src/hooks/index.ts","kind":"import-statement","original":"../../hooks"}],"format":"esm"},"packages/ui/react-ui-table/src/components/ColumnMenu/index.ts":{"bytes":608,"imports":[{"path":"packages/ui/react-ui-table/src/components/ColumnMenu/ColumnMenu.tsx","kind":"import-statement","original":"./ColumnMenu"},{"path":"packages/ui/react-ui-table/src/components/ColumnMenu/ColumnSettingsForm.tsx","kind":"import-statement","original":"./ColumnSettingsForm"}],"format":"esm"},"packages/ui/react-ui-table/src/components/Table/TableContext.tsx":{"bytes":3140,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-table/src/theme.ts":{"bytes":10262,"imports":[{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-table/src/components/Cell/Cell.tsx":{"bytes":4842,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-table/src/theme.ts","kind":"import-statement","original":"../../theme"},{"path":"packages/ui/react-ui-table/src/components/Table/TableContext.tsx","kind":"import-statement","original":"../Table/TableContext"}],"format":"esm"},"packages/ui/react-ui-table/src/components/Table/TableBody.tsx":{"bytes":8051,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-table/src/components/Table/TableContext.tsx","kind":"import-statement","original":"./TableContext"},{"path":"packages/ui/react-ui-table/src/theme.ts","kind":"import-statement","original":"../../theme"},{"path":"packages/ui/react-ui-table/src/components/Cell/Cell.tsx","kind":"import-statement","original":"../Cell/Cell"}],"format":"esm"},"packages/ui/react-ui-table/src/components/Table/TableFooter.tsx":{"bytes":4638,"imports":[{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-table/src/components/Table/TableContext.tsx","kind":"import-statement","original":"./TableContext"},{"path":"packages/ui/react-ui-table/src/theme.ts","kind":"import-statement","original":"../../theme"}],"format":"esm"},"packages/ui/react-ui-table/src/components/Table/TableHead.tsx":{"bytes":7863,"imports":[{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-table/src/components/Table/TableContext.tsx","kind":"import-statement","original":"./TableContext"},{"path":"packages/ui/react-ui-table/src/theme.ts","kind":"import-statement","original":"../../theme"}],"format":"esm"},"packages/ui/react-ui-table/src/components/Table/Table.tsx":{"bytes":32095,"imports":[{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"@tanstack/react-virtual","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-table/src/components/Table/TableBody.tsx","kind":"import-statement","original":"./TableBody"},{"path":"packages/ui/react-ui-table/src/components/Table/TableContext.tsx","kind":"import-statement","original":"./TableContext"},{"path":"packages/ui/react-ui-table/src/components/Table/TableFooter.tsx","kind":"import-statement","original":"./TableFooter"},{"path":"packages/ui/react-ui-table/src/components/Table/TableHead.tsx","kind":"import-statement","original":"./TableHead"},{"path":"packages/ui/react-ui-table/src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"packages/ui/react-ui-table/src/theme.ts","kind":"import-statement","original":"../../theme"}],"format":"esm"},"packages/ui/react-ui-table/src/components/Table/props.ts":{"bytes":3075,"imports":[],"format":"esm"},"packages/ui/react-ui-table/src/components/Table/index.ts":{"bytes":557,"imports":[{"path":"packages/ui/react-ui-table/src/components/Table/Table.tsx","kind":"import-statement","original":"./Table"},{"path":"packages/ui/react-ui-table/src/components/Table/props.ts","kind":"import-statement","original":"./props"}],"format":"esm"},"packages/ui/react-ui-table/src/components/index.ts":{"bytes":644,"imports":[{"path":"packages/ui/react-ui-table/src/components/Cell/index.ts","kind":"import-statement","original":"./Cell"},{"path":"packages/ui/react-ui-table/src/components/ColumnMenu/index.ts","kind":"import-statement","original":"./ColumnMenu"},{"path":"packages/ui/react-ui-table/src/components/Table/index.ts","kind":"import-statement","original":"./Table"}],"format":"esm"},"packages/ui/react-ui-table/src/helpers.tsx":{"bytes":54314,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"date-fns/format","kind":"import-statement","external":true},{"path":"date-fns/formatDistanceToNow","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-table/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-table/src/components/Table/TableContext.tsx","kind":"import-statement","original":"./components/Table/TableContext"},{"path":"packages/ui/react-ui-table/src/theme.ts","kind":"import-statement","original":"./theme"}],"format":"esm"},"packages/ui/react-ui-table/src/schema/schema.ts":{"bytes":9040,"imports":[{"path":"@effect/schema","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-table/src/schema/schemaToColumns.ts":{"bytes":5164,"imports":[{"path":"packages/ui/react-ui-table/src/schema/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/ui/react-ui-table/src/helpers.tsx","kind":"import-statement","original":"../helpers"}],"format":"esm"},"packages/ui/react-ui-table/src/schema/types.ts":{"bytes":1117,"imports":[],"format":"esm"},"packages/ui/react-ui-table/src/schema/index.ts":{"bytes":573,"imports":[{"path":"packages/ui/react-ui-table/src/schema/schemaToColumns.ts","kind":"import-statement","original":"./schemaToColumns"},{"path":"packages/ui/react-ui-table/src/schema/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/ui/react-ui-table/src/types.ts":{"bytes":1830,"imports":[],"format":"esm"},"packages/ui/react-ui-table/src/index.ts":{"bytes":1102,"imports":[{"path":"packages/ui/react-ui-table/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/ui/react-ui-table/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-table/src/helpers.tsx","kind":"import-statement","original":"./helpers"},{"path":"packages/ui/react-ui-table/src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"packages/ui/react-ui-table/src/schema/index.ts","kind":"import-statement","original":"./schema"},{"path":"packages/ui/react-ui-table/src/theme.ts","kind":"import-statement","original":"./theme"},{"path":"packages/ui/react-ui-table/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"}},"outputs":{"packages/ui/react-ui-table/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":107763},"packages/ui/react-ui-table/dist/lib/browser/index.mjs":{"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"@tanstack/react-virtual","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"@tanstack/react-table","kind":"import-statement","external":true},{"path":"date-fns/format","kind":"import-statement","external":true},{"path":"date-fns/formatDistanceToNow","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@effect/schema","kind":"import-statement","external":true}],"exports":["CellCombobox","ColumnBuilder","ColumnMenu","ColumnSettingsForm","ColumnSettingsPanel","MemoizedVirtualisedTableContent","SortIndicator","Table","createColumnBuilder","currentRow","flushPadding","gridCellFocusRing","groupTh","headPadding","schemaToColumnDefs","selectedRow","tableRoot","tbodyRoot","tbodyTr","tdContent","tdRoot","textPadding","tfootRoot","tfootTh","tfootTr","theadResizeRoot","theadRoot","theadTh","theadTr","translations","useColumnSorting","usePinLastRow"],"entryPoint":"packages/ui/react-ui-table/src/index.ts","inputs":{"packages/ui/react-ui-table/src/translations.ts":{"bytesInOutput":611},"packages/ui/react-ui-table/src/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-table/src/components/Cell/CellCombobox.tsx":{"bytesInOutput":2989},"packages/ui/react-ui-table/src/components/Cell/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-table/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-table/src/components/ColumnMenu/ColumnMenu.tsx":{"bytesInOutput":5354},"packages/ui/react-ui-table/src/components/ColumnMenu/ColumnSettingsForm.tsx":{"bytesInOutput":6669},"packages/ui/react-ui-table/src/hooks/useColumnSorting.ts":{"bytesInOutput":1082},"packages/ui/react-ui-table/src/hooks/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-table/src/hooks/usePinLastRow.ts":{"bytesInOutput":896},"packages/ui/react-ui-table/src/components/ColumnMenu/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-table/src/components/Table/Table.tsx":{"bytesInOutput":8325},"packages/ui/react-ui-table/src/components/Table/TableBody.tsx":{"bytesInOutput":1825},"packages/ui/react-ui-table/src/components/Table/TableContext.tsx":{"bytesInOutput":358},"packages/ui/react-ui-table/src/theme.ts":{"bytesInOutput":2205},"packages/ui/react-ui-table/src/components/Cell/Cell.tsx":{"bytesInOutput":973},"packages/ui/react-ui-table/src/components/Table/TableFooter.tsx":{"bytesInOutput":1015},"packages/ui/react-ui-table/src/components/Table/TableHead.tsx":{"bytesInOutput":1739},"packages/ui/react-ui-table/src/components/Table/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-table/src/helpers.tsx":{"bytesInOutput":13425},"packages/ui/react-ui-table/src/schema/schema.ts":{"bytesInOutput":1924},"packages/ui/react-ui-table/src/schema/schemaToColumns.ts":{"bytesInOutput":1047},"packages/ui/react-ui-table/src/schema/index.ts":{"bytesInOutput":0}},"bytes":52198}}}
@@ -1,5 +1,5 @@
1
1
  import { type SortDirection, type HeaderContext, type RowData } from '@tanstack/react-table';
2
- import { type TableDef, type ColumnProps } from '../schema';
2
+ import { type TableDef, type ColumnProps } from '../../schema';
3
3
  export type ColumnMenuProps<TData extends RowData, TValue> = {
4
4
  context: HeaderContext<TData, TValue>;
5
5
  tableDefs: TableDef[];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColumnMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/ColumnMenu/ColumnMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,KAAK,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAQ7F,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAE/D,MAAM,MAAM,eAAe,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM,IAAI;IAC3D,OAAO,EAAE,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACtC,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACrD,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,UAAU,sGAqFtB,CAAC;AAEF,eAAO,MAAM,mBAAmB;aAOe,MAAM,IAAI;iBAkBxD,CAAC;AAEF,eAAO,MAAM,aAAa;eAIb,aAAa,GAAG,KAAK;iBACnB,GAAG,KAAK,IAAI;wBAsB1B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import '@dxosTheme';
2
- import { type ColumnProps } from '../schema';
2
+ import { type ColumnProps } from '../../schema';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: <TData extends unknown, TValue>({ column, ...props }: import("./ColumnMenu").ColumnMenuProps<TData, TValue>) => JSX.Element;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColumnMenu.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ColumnMenu/ColumnMenu.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAQpB,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;;;;;;AAEhD,wBAIE;AAEF,eAAO,MAAM,OAAO;;;;;;;2CAUa,OAAO;;;;;;;yBAY5B,GAAG;;;;CASd,CAAC;AAEF,eAAO,MAAM,YAAY;;CA2CxB,CAAC"}
@@ -1,10 +1,11 @@
1
- import { type TableDef, type ColumnProps } from '../schema';
2
- export declare const ColumnSettingsForm: ({ column, tableDef, tableDefs, onUpdate, onDelete, onClose, }: {
1
+ import { type TableDef, type ColumnProps } from '../../schema';
2
+ export type ColumnSettingsFormProps = {
3
3
  column: ColumnProps;
4
4
  tableDef: TableDef;
5
5
  tableDefs: TableDef[];
6
6
  onUpdate?: ((id: string, column: ColumnProps) => void) | undefined;
7
7
  onDelete?: ((id: string) => void) | undefined;
8
- onClose: () => void;
9
- }) => JSX.Element;
8
+ onClose?: () => void;
9
+ };
10
+ export declare const ColumnSettingsForm: ({ column, tableDef, tableDefs, onUpdate, onDelete, onClose, }: ColumnSettingsFormProps) => JSX.Element;
10
11
  //# sourceMappingURL=ColumnSettingsForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColumnSettingsForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/ColumnMenu/ColumnSettingsForm.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAmB,MAAM,cAAc,CAAC;AAShF,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACnE,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC9C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,kBAAkB,kEAO5B,uBAAuB,gBA2KzB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './ColumnMenu';
2
+ export * from './ColumnSettingsForm';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ColumnMenu/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC"}
@@ -1,4 +1,4 @@
1
+ export * from './Cell';
1
2
  export * from './ColumnMenu';
2
3
  export * from './Table';
3
- export * from './Cell';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -83,5 +83,9 @@ export declare class ColumnBuilder<TData extends RowData> {
83
83
  * Icon based on boolean value.
84
84
  */
85
85
  icon({ label, size, on, off, ...props }?: IconColumnOptions<TData>): Partial<ColumnDef<TData, boolean>>;
86
+ /**
87
+ * This display column type is for nested/unhandled data to appear as JSON.
88
+ */
89
+ display({ label, classNames, ...props }?: KeyColumnOptions<TData>): Partial<ColumnDef<TData, PublicKey>>;
86
90
  }
87
91
  //# sourceMappingURL=helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/helpers.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAwB,KAAK,IAAI,EA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G,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,GAAE,gBAAgB,CAAC,KAAK,CAAM,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAyCjH;;OAEG;IACH,SAAS,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAgB,EAAE,GAAE,sBAAsB,CAAC,KAAK,CAAM,GAAG,UAAU,CACnG,YAAY,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAC/B,CAAC,CAAC,CAAC;IA2BJ;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,GAAE,mBAAmB,CAAC,KAAK,CAAM,GAAG,OAAO,CACzF,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAC1B;IAaD;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,GAAE,iBAAiB,CAAC,KAAK,CAAM,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAsB3G;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,GAAE,gBAAgB,CAAC,KAAK,CAAM,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;CAkB7G"}
@@ -0,0 +1,3 @@
1
+ export * from './useColumnSorting';
2
+ export * from './usePinLastRow';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useColumnSorting.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useColumnSorting.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGxE,eAAO,MAAM,gBAAgB,WAAY,OAAO,GAAG,CAAC;;;8BAoCjB,aAAa;;;CAU/C,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePinLastRow.d.ts","sourceRoot":"","sources":["../../../../src/hooks/usePinLastRow.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAGnD,eAAO,MAAM,aAAa,eACZ,OAAO,GAAG,SAAS,SACxB,MAAM,GAAG,CAAC,QACX,GAAG,qBACU,MAAM,OAAO,GAAG,IAAI,SA+BxC,CAAC"}
@@ -1,7 +1,8 @@
1
+ export { default as translations } from './translations';
1
2
  export * from './components';
2
3
  export * from './helpers';
4
+ export * from './hooks';
3
5
  export * from './schema';
4
6
  export * from './theme';
5
- export { default as translations } from './translations';
6
7
  export * from './types';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEzD,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,11 @@
1
+ import '@dxosTheme';
2
+ declare const _default: {
3
+ title: string;
4
+ args: {};
5
+ decorators: import("@storybook/react").Decorator[];
6
+ };
7
+ export default _default;
8
+ export declare const SchemaTable: {
9
+ render: () => JSX.Element;
10
+ };
11
+ //# sourceMappingURL=SchemaToTable.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaToTable.stories.d.ts","sourceRoot":"","sources":["../../../../src/schema/SchemaToTable.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;;;;;;AAapB,wBAWE;AAuBF,eAAO,MAAM,WAAW;;CAoBvB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './schemaToColumns';
2
+ export * from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/index.ts"],"names":[],"mappings":"AAIA,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type * as S from '@effect/schema/Schema';
2
+ import { type ColumnType } from './types';
3
+ export type ClassifiedColumnType = ColumnType | 'display';
4
+ export declare const classifySchemaProperties: (schema: S.Schema<any, any>) => [string, ClassifiedColumnType][];
5
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/schema/schema.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,SAAS,CAAC;AA2D1D,eAAO,MAAM,wBAAwB,WAAY,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,qCAwBlE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=schema.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.test.d.ts","sourceRoot":"","sources":["../../../../src/schema/schema.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type * as S from '@effect/schema/Schema';
2
+ import { type ColumnDef } from '@tanstack/react-table';
3
+ export declare const schemaToColumnDefs: <T>(schema: S.Schema<T, any, never>) => ColumnDef<T, any>[];
4
+ //# sourceMappingURL=schemaToColumns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaToColumns.d.ts","sourceRoot":"","sources":["../../../../src/schema/schemaToColumns.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAKvD,eAAO,MAAM,kBAAkB,6DAoC9B,CAAC"}
@@ -17,4 +17,4 @@ export type ColumnProps = {
17
17
  editable?: boolean;
18
18
  resizable?: boolean;
19
19
  };
20
- //# sourceMappingURL=schema.d.ts.map
20
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/schema/types.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAE1E,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui-table",
3
- "version": "0.4.10-main.c32f430",
3
+ "version": "0.4.10-main.c42bfdb",
4
4
  "description": "A table component.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -16,34 +16,37 @@
16
16
  "src"
17
17
  ],
18
18
  "dependencies": {
19
+ "@effect/schema": "0.64.7",
19
20
  "@fluentui/react-tabster": "^9.19.0",
20
21
  "@radix-ui/react-context": "^1.0.0",
21
22
  "@radix-ui/react-use-controllable-state": "^1.0.0",
22
23
  "@tanstack/react-table": "^8.13.2",
23
24
  "@tanstack/react-virtual": "^3.0.1",
24
25
  "date-fns": "^3.3.1",
25
- "@dxos/async": "0.4.10-main.c32f430",
26
- "@dxos/invariant": "0.4.10-main.c32f430",
27
- "@dxos/keys": "0.4.10-main.c32f430",
28
- "@dxos/react-ui": "0.4.10-main.c32f430",
29
- "@dxos/log": "0.4.10-main.c32f430",
30
- "@dxos/react-ui-theme": "0.4.10-main.c32f430",
31
- "@dxos/react-ui-searchlist": "0.4.10-main.c32f430",
32
- "@dxos/react-ui-types": "0.4.10-main.c32f430",
33
- "@dxos/util": "0.4.10-main.c32f430"
26
+ "effect": "2.4.9",
27
+ "@dxos/invariant": "0.4.10-main.c42bfdb",
28
+ "@dxos/keys": "0.4.10-main.c42bfdb",
29
+ "@dxos/log": "0.4.10-main.c42bfdb",
30
+ "@dxos/react-ui-searchlist": "0.4.10-main.c42bfdb",
31
+ "@dxos/async": "0.4.10-main.c42bfdb",
32
+ "@dxos/react-ui-theme": "0.4.10-main.c42bfdb",
33
+ "@dxos/react-ui": "0.4.10-main.c42bfdb",
34
+ "@dxos/react-ui-types": "0.4.10-main.c42bfdb",
35
+ "@dxos/util": "0.4.10-main.c42bfdb"
34
36
  },
35
37
  "devDependencies": {
36
38
  "@phosphor-icons/react": "^2.0.5",
37
39
  "@types/react": "^18.0.21",
38
40
  "@types/react-dom": "^18.0.6",
41
+ "fast-check": "^3.15.1",
39
42
  "react": "^18.2.0",
40
43
  "react-dom": "^18.2.0",
41
- "vite": "^5.1.5",
44
+ "vite": "^5.1.7",
42
45
  "vite-plugin-turbosnap": "^1.0.2",
43
- "@dxos/echo-schema": "0.4.10-main.c32f430",
44
- "@dxos/random": "0.4.10-main.c32f430",
45
- "@dxos/react-ui-theme": "0.4.10-main.c32f430",
46
- "@dxos/storybook-utils": "0.4.10-main.c32f430"
46
+ "@dxos/echo-schema": "0.4.10-main.c42bfdb",
47
+ "@dxos/react-ui-theme": "0.4.10-main.c42bfdb",
48
+ "@dxos/random": "0.4.10-main.c42bfdb",
49
+ "@dxos/storybook-utils": "0.4.10-main.c42bfdb"
47
50
  },
48
51
  "peerDependencies": {
49
52
  "@phosphor-icons/react": "^2.0.5",
@@ -10,7 +10,7 @@ import React from 'react';
10
10
  import { withTheme } from '@dxos/storybook-utils';
11
11
 
12
12
  import { ColumnMenu } from './ColumnMenu';
13
- import { type ColumnProps } from '../schema';
13
+ import { type ColumnProps } from '../../schema';
14
14
 
15
15
  export default {
16
16
  title: 'react-ui-table/ColumnMenu',
@@ -10,8 +10,8 @@ import { Button, DensityProvider, Popover, DropdownMenu } from '@dxos/react-ui';
10
10
  import { getSize, mx } from '@dxos/react-ui-theme';
11
11
 
12
12
  import { ColumnSettingsForm } from './ColumnSettingsForm';
13
- import { useColumnSorting } from './hooks/useColumnSorting';
14
- import { type TableDef, type ColumnProps } from '../schema';
13
+ import { useColumnSorting } from '../../hooks';
14
+ import { type TableDef, type ColumnProps } from '../../schema';
15
15
 
16
16
  export type ColumnMenuProps<TData extends RowData, TValue> = {
17
17
  context: HeaderContext<TData, TValue>;
@@ -9,8 +9,8 @@ import { Button, Input, Select, Separator, useTranslation } from '@dxos/react-ui
9
9
  import { getSize, mx } from '@dxos/react-ui-theme';
10
10
  import { safeParseInt } from '@dxos/util';
11
11
 
12
- import { type TableDef, type ColumnProps, type ColumnType } from '../schema';
13
- import { translationKey } from '../translations';
12
+ import { type TableDef, type ColumnProps, type ColumnType } from '../../schema';
13
+ import { translationKey } from '../../translations';
14
14
 
15
15
  const Section: FC<PropsWithChildren & { className?: string }> = ({ children, className }) => (
16
16
  <div role='none' className={mx('p-2', className)}>
@@ -18,6 +18,15 @@ const Section: FC<PropsWithChildren & { className?: string }> = ({ children, cla
18
18
  </div>
19
19
  );
20
20
 
21
+ export type ColumnSettingsFormProps = {
22
+ column: ColumnProps;
23
+ tableDef: TableDef;
24
+ tableDefs: TableDef[];
25
+ onUpdate?: ((id: string, column: ColumnProps) => void) | undefined;
26
+ onDelete?: ((id: string) => void) | undefined;
27
+ onClose?: () => void;
28
+ };
29
+
21
30
  export const ColumnSettingsForm = ({
22
31
  column,
23
32
  tableDef,
@@ -25,14 +34,7 @@ export const ColumnSettingsForm = ({
25
34
  onUpdate,
26
35
  onDelete,
27
36
  onClose,
28
- }: {
29
- column: ColumnProps;
30
- tableDef: TableDef;
31
- tableDefs: TableDef[];
32
- onUpdate?: ((id: string, column: ColumnProps) => void) | undefined;
33
- onDelete?: ((id: string) => void) | undefined;
34
- onClose: () => void;
35
- }) => {
37
+ }: ColumnSettingsFormProps) => {
36
38
  const [prop, setProp] = useState(column.id);
37
39
  const [refTable, setRefTable] = useState(column.refTable);
38
40
  const [refProp, setRefProp] = useState(column.refProp);
@@ -44,7 +46,7 @@ export const ColumnSettingsForm = ({
44
46
 
45
47
  const handleCancel = () => {
46
48
  setProp(column.id);
47
- onClose;
49
+ onClose?.();
48
50
  };
49
51
 
50
52
  const handleSave = () => {
@@ -76,7 +78,7 @@ export const ColumnSettingsForm = ({
76
78
  digits: safeParseInt(digits),
77
79
  });
78
80
 
79
- onClose();
81
+ onClose?.();
80
82
  };
81
83
 
82
84
  return (
@@ -0,0 +1,6 @@
1
+ //
2
+ // Copyright 2022 DXOS.org
3
+ //
4
+
5
+ export * from './ColumnMenu';
6
+ export * from './ColumnSettingsForm';
@@ -26,8 +26,8 @@ import { type TypedTableProvider, TableProvider as UntypedTableProvider, useTabl
26
26
  import { TableFooter } from './TableFooter';
27
27
  import { TableHead } from './TableHead';
28
28
  import { type TableProps } from './props';
29
+ import { usePinLastRow } from '../../hooks';
29
30
  import { groupTh, tableRoot } from '../../theme';
30
- import { usePinLastRow } from '../hooks/usePinLastRow';
31
31
 
32
32
  export const Table = <TData extends RowData>(props: TableProps<TData>) => {
33
33
  const {
@@ -2,6 +2,6 @@
2
2
  // Copyright 2022 DXOS.org
3
3
  //
4
4
 
5
+ export * from './Cell';
5
6
  export * from './ColumnMenu';
6
7
  export * from './Table';
7
- export * from './Cell';
package/src/helpers.tsx CHANGED
@@ -498,4 +498,26 @@ export class ColumnBuilder<TData extends RowData> {
498
498
  ...props,
499
499
  };
500
500
  }
501
+
502
+ /**
503
+ * This display column type is for nested/unhandled data to appear as JSON.
504
+ */
505
+ display({ label, classNames, ...props }: KeyColumnOptions<TData> = {}): Partial<ColumnDef<TData, PublicKey>> {
506
+ return {
507
+ size: 120,
508
+ minSize: 120,
509
+ header: (cell) => label ?? cell.header.id,
510
+ cell: (cell) => {
511
+ const value = cell.getValue();
512
+
513
+ return (
514
+ <div className='overflow-scroll'>
515
+ <code className='text-xs'>{JSON.stringify(value)}</code>
516
+ </div>
517
+ );
518
+ },
519
+ ...props,
520
+ meta: { ...props.meta, cell: { ...props.meta?.cell, classNames: ['font-mono', textPadding, classNames] } },
521
+ };
522
+ }
501
523
  }
@@ -0,0 +1,6 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ export * from './useColumnSorting';
6
+ export * from './usePinLastRow';
package/src/index.ts CHANGED
@@ -2,9 +2,11 @@
2
2
  // Copyright 2022 DXOS.org
3
3
  //
4
4
 
5
+ export { default as translations } from './translations';
6
+
5
7
  export * from './components';
6
8
  export * from './helpers';
9
+ export * from './hooks';
7
10
  export * from './schema';
8
11
  export * from './theme';
9
- export { default as translations } from './translations';
10
12
  export * from './types';
@@ -0,0 +1,72 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import '@dxosTheme';
6
+
7
+ import * as Arbitrary from '@effect/schema/Arbitrary';
8
+ import * as S from '@effect/schema/Schema';
9
+ import * as fc from 'fast-check';
10
+ import React, { useRef } from 'react';
11
+
12
+ import { DensityProvider } from '@dxos/react-ui';
13
+ import { withTheme } from '@dxos/storybook-utils';
14
+
15
+ import { schemaToColumnDefs } from './schemaToColumns';
16
+ import { Table } from '../components';
17
+
18
+ export default {
19
+ title: 'react-ui-table/SchemaTable',
20
+ args: {},
21
+ decorators: [
22
+ withTheme,
23
+ (Story: any) => (
24
+ <DensityProvider density='fine'>
25
+ <Story />
26
+ </DensityProvider>
27
+ ),
28
+ ],
29
+ };
30
+
31
+ const exampleSchema = S.struct({
32
+ field1: S.string,
33
+ field2: S.number,
34
+ field3: S.Date,
35
+ field4: S.optional(S.string.pipe(S.length(10))),
36
+ field5: S.optional(
37
+ S.struct({
38
+ innerField1: S.string,
39
+ innerField2: S.number,
40
+ }),
41
+ ),
42
+ });
43
+
44
+ type ExampleSchema = S.Schema.Type<typeof exampleSchema>;
45
+
46
+ const columns = schemaToColumnDefs(exampleSchema);
47
+
48
+ const exampleSchemaArbitrary = Arbitrary.make(exampleSchema)(fc);
49
+
50
+ const items = fc.sample(exampleSchemaArbitrary, 10);
51
+
52
+ export const SchemaTable = {
53
+ render: () => {
54
+ const containerRef = useRef<HTMLDivElement | null>(null);
55
+
56
+ return (
57
+ <div ref={containerRef} className='fixed inset-0 overflow-auto'>
58
+ <Table<ExampleSchema>
59
+ role='grid'
60
+ rowsSelectable='multi'
61
+ keyAccessor={(row) => JSON.stringify(row)}
62
+ columns={columns}
63
+ data={items}
64
+ fullWidth
65
+ stickyHeader
66
+ border
67
+ getScrollElement={() => containerRef.current}
68
+ />
69
+ </div>
70
+ );
71
+ },
72
+ };