@dxos/react-ui-table 0.4.10-main.dfa0529 → 0.4.10-main.e17362e

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.
@@ -1 +1 @@
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":24959,"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":5948,"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":33669,"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":9419,"imports":[{"path":"@effect/schema/AST","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-table/src/schema/schemaToColumns.ts":{"bytes":5160,"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":109927},"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/AST","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":6917},"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":1318},"packages/ui/react-ui-table/src/components/ColumnMenu/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-table/src/components/Table/Table.tsx":{"bytesInOutput":8534},"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":1957},"packages/ui/react-ui-table/src/schema/schemaToColumns.ts":{"bytesInOutput":1047},"packages/ui/react-ui-table/src/schema/index.ts":{"bytesInOutput":0}},"bytes":53110}}}
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":9419,"imports":[{"path":"@effect/schema/AST","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-table/src/schema/schemaToColumns.ts":{"bytes":5160,"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":107867},"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/AST","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":1957},"packages/ui/react-ui-table/src/schema/schemaToColumns.ts":{"bytesInOutput":1047},"packages/ui/react-ui-table/src/schema/index.ts":{"bytesInOutput":0}},"bytes":52231}}}
@@ -8,6 +8,7 @@ declare const _default: {
8
8
  export default _default;
9
9
  export declare const Default: {
10
10
  args: {
11
+ column: ColumnProps;
11
12
  context: {
12
13
  header: {
13
14
  column: {
@@ -18,11 +19,6 @@ export declare const Default: {
18
19
  };
19
20
  };
20
21
  };
21
- onUpdate?: ((id: string, column: ColumnProps) => void) | undefined;
22
- onDelete?: ((id: string) => void) | undefined;
23
- tableDef: import("../../schema").TableDef;
24
- tableDefs: import("../../schema").TableDef[];
25
- column: ColumnProps;
26
22
  };
27
23
  decorators: ((Story: any) => JSX.Element)[];
28
24
  parameters: {
@@ -1 +1 @@
1
- {"version":3,"file":"ColumnMenu.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ColumnMenu/ColumnMenu.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AASpB,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;;;;;;AAEhD,wBAIE;AA2BF,eAAO,MAAM,OAAO;;;;;;2CAca,OAAO;;;;;;;;;;;;yBAY5B,GAAG;;;;CASd,CAAC;AAEF,eAAO,MAAM,YAAY;;CA2CxB,CAAC"}
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 +1 @@
1
- {"version":3,"file":"ColumnSettingsForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/ColumnMenu/ColumnSettingsForm.tsx"],"names":[],"mappings":"AAUA,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,gBAkLzB,CAAC"}
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"}
@@ -1 +1 @@
1
- {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAkB,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,KAAqD,MAAM,OAAO,CAAC;AAS1E,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C,eAAO,MAAM,KAAK,kEA6IjB,CAAC;AA8GF,eAAO,MAAM,+BAA+B,oDAlDzC,KAAK,mBAAmB,OAAO,EAAE,OAAO,CAAC,EAAE,kBAAkB,CAAC,iBAkDiB,CAAC"}
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAkB,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,KAAqD,MAAM,OAAO,CAAC;AAS1E,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C,eAAO,MAAM,KAAK,kEA6IjB,CAAC;AAgGF,eAAO,MAAM,+BAA+B,oDA1CzC,KAAK,mBAAmB,OAAO,EAAE,OAAO,CAAC,EAAE,kBAAkB,CAAC,iBA0CiB,CAAC"}
@@ -93,9 +93,6 @@ export declare const Editable: {
93
93
  export declare const PinnedLastRow: {
94
94
  render: () => JSX.Element;
95
95
  };
96
- export declare const InsertDelete: {
97
- render: () => JSX.Element;
98
- };
99
96
  export declare const Resizable: {
100
97
  render: () => JSX.Element;
101
98
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/Table.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAMpB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAQvC,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAKlD,KAAK,IAAI,GAAG;IACV,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;;;;;;4BA4FsB,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAL5B,wBAuCE;AAEF,eAAO,MAAM,OAAO;;;;;CAKnB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;CAKrB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;CAMtB,CAAC;AAEF,eAAO,MAAM,KAAK;;;;CAIjB,CAAC;AAEF,eAAO,MAAM,OAAO;;CAmCnB,CAAC;AAEF,eAAO,MAAM,QAAQ;;CA4BpB,CAAC;AAEF,eAAO,MAAM,aAAa;;CA6BzB,CAAC;AAEF,eAAO,MAAM,YAAY;;CAqDxB,CAAC;AAEF,eAAO,MAAM,SAAS;;CAyBrB,CAAC;AAEF,eAAO,MAAM,eAAe;;CA4B3B,CAAC"}
1
+ {"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/Table.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAMpB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAQvC,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAKlD,KAAK,IAAI,GAAG;IACV,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;;;;;;4BA4FsB,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAL5B,wBAuCE;AAEF,eAAO,MAAM,OAAO;;;;;CAKnB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;CAKrB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;CAMtB,CAAC;AAEF,eAAO,MAAM,KAAK;;;;CAIjB,CAAC;AAEF,eAAO,MAAM,OAAO;;CAmCnB,CAAC;AAEF,eAAO,MAAM,QAAQ;;CA4BpB,CAAC;AAEF,eAAO,MAAM,aAAa;;CA6BzB,CAAC;AAEF,eAAO,MAAM,SAAS;;CAyBrB,CAAC;AAEF,eAAO,MAAM,eAAe;;CA4B3B,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { type Table } from '@tanstack/react-table';
2
- export declare const usePinLastRow: (pinLastRow: boolean | undefined, table: Table<any>, data: any[], getScrollElement?: () => Element | null) => void;
2
+ export declare const usePinLastRow: (pinLastRow: boolean | undefined, table: Table<any>, data: any, getScrollElement?: () => Element | null) => void;
3
3
  //# sourceMappingURL=usePinLastRow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePinLastRow.d.ts","sourceRoot":"","sources":["../../../../src/hooks/usePinLastRow.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAG7D,eAAO,MAAM,aAAa,eACZ,OAAO,GAAG,SAAS,SACxB,MAAM,GAAG,CAAC,QACX,GAAG,EAAE,qBACQ,MAAM,OAAO,GAAG,IAAI,SAoDxC,CAAC"}
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui-table",
3
- "version": "0.4.10-main.dfa0529",
3
+ "version": "0.4.10-main.e17362e",
4
4
  "description": "A table component.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -24,15 +24,15 @@
24
24
  "@tanstack/react-virtual": "^3.0.1",
25
25
  "date-fns": "^3.3.1",
26
26
  "effect": "2.4.9",
27
- "@dxos/async": "0.4.10-main.dfa0529",
28
- "@dxos/invariant": "0.4.10-main.dfa0529",
29
- "@dxos/keys": "0.4.10-main.dfa0529",
30
- "@dxos/react-ui-theme": "0.4.10-main.dfa0529",
31
- "@dxos/react-ui-searchlist": "0.4.10-main.dfa0529",
32
- "@dxos/react-ui": "0.4.10-main.dfa0529",
33
- "@dxos/log": "0.4.10-main.dfa0529",
34
- "@dxos/react-ui-types": "0.4.10-main.dfa0529",
35
- "@dxos/util": "0.4.10-main.dfa0529"
27
+ "@dxos/async": "0.4.10-main.e17362e",
28
+ "@dxos/keys": "0.4.10-main.e17362e",
29
+ "@dxos/log": "0.4.10-main.e17362e",
30
+ "@dxos/invariant": "0.4.10-main.e17362e",
31
+ "@dxos/react-ui": "0.4.10-main.e17362e",
32
+ "@dxos/react-ui-searchlist": "0.4.10-main.e17362e",
33
+ "@dxos/react-ui-types": "0.4.10-main.e17362e",
34
+ "@dxos/util": "0.4.10-main.e17362e",
35
+ "@dxos/react-ui-theme": "0.4.10-main.e17362e"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@phosphor-icons/react": "^2.0.5",
@@ -43,10 +43,10 @@
43
43
  "react-dom": "^18.2.0",
44
44
  "vite": "^5.2.9",
45
45
  "vite-plugin-turbosnap": "^1.0.2",
46
- "@dxos/echo-schema": "0.4.10-main.dfa0529",
47
- "@dxos/random": "0.4.10-main.dfa0529",
48
- "@dxos/react-ui-theme": "0.4.10-main.dfa0529",
49
- "@dxos/storybook-utils": "0.4.10-main.dfa0529"
46
+ "@dxos/echo-schema": "0.4.10-main.e17362e",
47
+ "@dxos/random": "0.4.10-main.e17362e",
48
+ "@dxos/storybook-utils": "0.4.10-main.e17362e",
49
+ "@dxos/react-ui-theme": "0.4.10-main.e17362e"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@phosphor-icons/react": "^2.0.5",
@@ -10,7 +10,6 @@ import React from 'react';
10
10
  import { withTheme } from '@dxos/storybook-utils';
11
11
 
12
12
  import { ColumnMenu } from './ColumnMenu';
13
- import { type ColumnSettingsFormProps } from './ColumnSettingsForm';
14
13
  import { type ColumnProps } from '../../schema';
15
14
 
16
15
  export default {
@@ -19,41 +18,12 @@ export default {
19
18
  decorators: [withTheme],
20
19
  };
21
20
 
22
- const defs: Pick<ColumnSettingsFormProps, 'tableDef' | 'tableDefs'> = {
23
- tableDef: {
24
- id: '1',
25
- name: 'table 1',
26
- columns: [{ id: 'col-1', prop: 'one-foo', type: 'string' }],
27
- },
28
- tableDefs: [
29
- {
30
- id: '1',
31
- name: 'table 1',
32
- columns: [{ id: 'col-1', prop: 'one-foo', type: 'string' }],
33
- },
34
- {
35
- id: '2',
36
- name: 'table 2',
37
- columns: [{ id: 'col-1', prop: 'two-foo', type: 'string' }],
38
- },
39
- ],
40
- };
41
-
42
- const funcs: Pick<ColumnSettingsFormProps, 'onUpdate' | 'onDelete'> = {
43
- onUpdate: (...args: any) => console.log('onUpdate args', args),
44
- onDelete: (...args: any) => console.log('onDelete args', args),
45
- };
46
-
47
21
  export const Default = {
48
22
  args: {
49
23
  column: {
50
24
  id: 'test',
51
25
  label: 'test',
52
26
  } as ColumnProps,
53
-
54
- ...defs,
55
- ...funcs,
56
-
57
27
  context: {
58
28
  header: {
59
29
  column: {
@@ -1,6 +1,7 @@
1
1
  //
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
+
4
5
  import { Check, Trash, X } from '@phosphor-icons/react';
5
6
  import React, { type FC, type PropsWithChildren, useRef, useState } from 'react';
6
7
 
@@ -34,25 +35,21 @@ export const ColumnSettingsForm = ({
34
35
  onDelete,
35
36
  onClose,
36
37
  }: ColumnSettingsFormProps) => {
37
- const [formState, setFormState] = useState({
38
- prop: column.id,
39
- refTable: column.refTable,
40
- refProp: column.refProp,
41
- type: String(column.type),
42
- label: column.label,
43
- digits: String(column.digits ?? '0'),
44
- });
45
-
38
+ const [prop, setProp] = useState(column.id);
39
+ const [refTable, setRefTable] = useState(column.refTable);
40
+ const [refProp, setRefProp] = useState(column.refProp);
41
+ const [type, setType] = useState(String(column.type));
42
+ const [label, setLabel] = useState(column.label);
43
+ const [digits, setDigits] = useState(String(column.digits ?? '0'));
46
44
  const propRef = useRef<HTMLInputElement>(null);
47
45
  const { t } = useTranslation(translationKey);
48
46
 
49
47
  const handleCancel = () => {
48
+ setProp(column.id);
50
49
  onClose?.();
51
50
  };
52
51
 
53
52
  const handleSave = () => {
54
- const { prop, refTable, refProp, type, label, digits } = formState;
55
-
56
53
  // Check valid.
57
54
  if (!prop.length || !prop.match(/^[a-zA-Z_].+/i)) {
58
55
  propRef.current?.focus();
@@ -61,6 +58,7 @@ export const ColumnSettingsForm = ({
61
58
 
62
59
  // If already exists then check same type.
63
60
  const current = tableDef.columns.find((c) => c.id !== column.id && c.id === prop);
61
+
64
62
  if (current) {
65
63
  // TODO(burdon): Allow multiple columns with different refProps. Ensure correct table prop is updated.
66
64
  if (current.type !== 'ref' /* || current.ref !== refTable */) {
@@ -70,7 +68,7 @@ export const ColumnSettingsForm = ({
70
68
  }
71
69
  }
72
70
 
73
- onUpdate?.(column.id, {
71
+ onUpdate?.(prop, {
74
72
  id: prop, // TODO(burdon): Make unique.
75
73
  prop,
76
74
  label,
@@ -79,6 +77,7 @@ export const ColumnSettingsForm = ({
79
77
  refProp,
80
78
  digits: safeParseInt(digits),
81
79
  });
80
+
82
81
  onClose?.();
83
82
  };
84
83
 
@@ -89,8 +88,8 @@ export const ColumnSettingsForm = ({
89
88
  <Input.Label classNames='mbe-1'>{t('column label label')}</Input.Label>
90
89
  <Input.TextInput
91
90
  placeholder='Column label'
92
- value={formState.label ?? ''}
93
- onChange={(event) => setFormState((prevState) => ({ ...prevState, label: event.target.value }))}
91
+ value={label ?? ''}
92
+ onChange={(event) => setLabel(event.target.value)}
94
93
  autoFocus
95
94
  />
96
95
  </Input.Root>
@@ -99,18 +98,14 @@ export const ColumnSettingsForm = ({
99
98
  <Input.TextInput
100
99
  ref={propRef}
101
100
  placeholder='Property key'
102
- value={formState.prop ?? ''}
103
- onChange={(event) =>
104
- setFormState((prevState) => ({ ...prevState, prop: event.target.value.replace(/[^\w_]/g, '') }))
105
- }
101
+ // TODO(burdon): Provide hooks for value normalization, ENTER, ESC, etc.
102
+ value={prop ?? ''}
103
+ onChange={(event) => setProp(event.target.value.replace(/[^\w_]/g, ''))}
106
104
  />
107
105
  </Input.Root>
108
106
  <Input.Root>
109
107
  <Input.Label classNames='mbe-1 mbs-3'>{t('column type label')}</Input.Label>
110
- <Select.Root
111
- value={formState.type}
112
- onValueChange={(value) => setFormState((prevState) => ({ ...prevState, type: value }))}
113
- >
108
+ <Select.Root value={type} onValueChange={setType}>
114
109
  <Select.TriggerButton placeholder='Type' classNames='is-full' />
115
110
  <Select.Portal>
116
111
  <Select.Content>
@@ -126,59 +121,35 @@ export const ColumnSettingsForm = ({
126
121
  </Select.Root>
127
122
  </Input.Root>
128
123
  </Section>
129
- {formState.type === 'number' && (
130
- <Section>
131
- <Input.Root>
132
- <Input.Label classNames='mbe-1 mbs-3'>{t('digits label')}</Input.Label>
133
- <Input.TextInput
134
- value={formState.digits ?? ''}
135
- onChange={(event) => setFormState((prevState) => ({ ...prevState, digits: event.target.value }))}
136
- />
137
- </Input.Root>
138
- </Section>
124
+
125
+ {type === 'number' && (
126
+ <>
127
+ <Section>
128
+ <Input.Root>
129
+ <Input.Label classNames='mbe-1 mbs-3'>{t('digits label')}</Input.Label>
130
+ {/* TODO(burdon): Constrain input to numbers. */}
131
+ <Input.TextInput value={digits ?? ''} onChange={(event) => setDigits(event.target.value)} />
132
+ </Input.Root>
133
+ </Section>
134
+ </>
139
135
  )}
140
136
 
141
- {formState.type === 'ref' && (
142
- <Section>
143
- <Input.Root>
144
- <Input.Label classNames='mbe-1 mbs-3'>Table</Input.Label>
145
- <Select.Root
146
- value={formState.refTable}
147
- onValueChange={(value) => setFormState((prevState) => ({ ...prevState, refTable: value }))}
148
- >
149
- <Select.TriggerButton placeholder='Table' classNames='is-full' />
150
- <Select.Portal>
151
- <Select.Content>
152
- <Select.Viewport>
153
- {tableDefs
154
- .filter((t) => t.id !== tableDef.id)
155
- .map(({ id, name }) => (
156
- <Select.Option key={id} value={id}>
157
- {name ?? id}
158
- </Select.Option>
159
- ))}
160
- </Select.Viewport>
161
- </Select.Content>
162
- </Select.Portal>
163
- </Select.Root>
164
- </Input.Root>
165
-
166
- {formState.refTable && (
137
+ {/* TODO(burdon): Selectors on same line. */}
138
+ {type === 'ref' && (
139
+ <>
140
+ <Section>
167
141
  <Input.Root>
168
- <Input.Label classNames='mbe-1 mbs-3'>Table property</Input.Label>
169
- <Select.Root
170
- value={formState.refProp}
171
- onValueChange={(value) => setFormState((prevState) => ({ ...prevState, refProp: value }))}
172
- >
173
- <Select.TriggerButton placeholder='Property' classNames='is-full' />
142
+ <Input.Label classNames='mbe-1 mbs-3'>Table</Input.Label>
143
+ <Select.Root value={refTable} onValueChange={setRefTable}>
144
+ <Select.TriggerButton placeholder='Table' classNames='is-full' />
174
145
  <Select.Portal>
175
146
  <Select.Content>
176
147
  <Select.Viewport>
177
148
  {tableDefs
178
- .find((tableDef) => tableDef.id === formState.refTable)
179
- ?.columns.map(({ id, label }) => (
149
+ .filter((t) => t.id !== tableDef.id)
150
+ .map(({ id, name }) => (
180
151
  <Select.Option key={id} value={id}>
181
- {label ?? id}
152
+ {name ?? id}
182
153
  </Select.Option>
183
154
  ))}
184
155
  </Select.Viewport>
@@ -186,13 +157,36 @@ export const ColumnSettingsForm = ({
186
157
  </Select.Portal>
187
158
  </Select.Root>
188
159
  </Input.Root>
189
- )}
190
- </Section>
160
+
161
+ {refTable && (
162
+ <Input.Root>
163
+ <Input.Label classNames='mbe-1 mbs-3'>Table property</Input.Label>
164
+ <Select.Root value={refProp} onValueChange={setRefProp}>
165
+ <Select.TriggerButton placeholder='Property' classNames='is-full' />
166
+ <Select.Portal>
167
+ <Select.Content>
168
+ <Select.Viewport>
169
+ {tableDefs
170
+ .find((tableDef) => tableDef.id === refTable)
171
+ ?.columns.map(({ id, label }) => (
172
+ <Select.Option key={id} value={id}>
173
+ {label ?? id}
174
+ </Select.Option>
175
+ ))}
176
+ </Select.Viewport>
177
+ </Select.Content>
178
+ </Select.Portal>
179
+ </Select.Root>
180
+ </Input.Root>
181
+ )}
182
+ </Section>
183
+ </>
191
184
  )}
192
185
 
193
186
  <Separator classNames='mli-2' />
194
187
 
195
188
  <Section className='space-b-1.5'>
189
+ {/* TODO(burdon): Style as DropdownMenuItem. */}
196
190
  <Button variant='primary' classNames='is-full flex gap-2' onClick={handleSave}>
197
191
  <span>{t('save label')}</span>
198
192
  <div className='grow' />
@@ -10,7 +10,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
10
10
  import { create } from '@dxos/echo-schema/schema';
11
11
  import { PublicKey } from '@dxos/keys';
12
12
  import { faker } from '@dxos/random';
13
- import { AnchoredOverflow, Button, DensityProvider } from '@dxos/react-ui';
13
+ import { AnchoredOverflow, DensityProvider } from '@dxos/react-ui';
14
14
  import { withTheme } from '@dxos/storybook-utils';
15
15
  import { range } from '@dxos/util';
16
16
 
@@ -282,61 +282,6 @@ export const PinnedLastRow = {
282
282
  },
283
283
  };
284
284
 
285
- export const InsertDelete = {
286
- render: () => {
287
- const containerRef = useRef<HTMLDivElement | null>(null);
288
- const [items, setItems] = useState<Item[]>(createItems(10));
289
-
290
- const onUpdate: ValueUpdater<Item, any> = useCallback(
291
- (item, prop, value) => setItems((items) => updateItems(items, item.publicKey, prop, value)),
292
- [setItems],
293
- );
294
-
295
- const columns = useMemo(() => makeColumns(onUpdate), [onUpdate]);
296
-
297
- const onInsertFirst = () => {
298
- setItems((items) => [...createItems(1), ...items]);
299
- };
300
-
301
- const onInsertLast = () => {
302
- setItems((items) => [...items, ...createItems(1)]);
303
- };
304
-
305
- const onDeleteFirst = () => {
306
- setItems(([_first, ...rest]) => rest);
307
- };
308
-
309
- const onDeleteLast = () => {
310
- setItems((items) => [...items.slice(0, items.length - 1)]);
311
- };
312
-
313
- return (
314
- <div>
315
- <div className='flex flex-row gap-2'>
316
- <Button onClick={onInsertFirst}>Insert first</Button>
317
- <Button onClick={onInsertLast}>Insert last</Button>
318
- <Button onClick={onDeleteFirst}>Delete first</Button>
319
- <Button onClick={onDeleteLast}>Delete last</Button>
320
- </div>
321
- <div ref={containerRef} className='fixed inset-0 top-[72px] overflow-auto'>
322
- <Table<Item>
323
- role='grid'
324
- rowsSelectable='multi'
325
- keyAccessor={(row) => row.publicKey.toHex()}
326
- columns={columns}
327
- data={items}
328
- fullWidth
329
- stickyHeader
330
- border
331
- getScrollElement={() => containerRef.current}
332
- pinLastRow
333
- />
334
- </div>
335
- </div>
336
- );
337
- },
338
- };
339
-
340
285
  export const Resizable = {
341
286
  render: () => {
342
287
  const containerRef = useRef<HTMLDivElement | null>(null);