@cosmicdrift/kumiko-renderer 0.388.0 → 0.390.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/base-path-context.d.ts +9 -0
- package/dist/app/base-path-context.js +13 -0
- package/dist/app/base-path.d.ts +3 -0
- package/dist/app/base-path.js +27 -0
- package/dist/app/config-edit-body.d.ts +1 -1
- package/dist/app/config-edit-body.js +15 -6
- package/dist/app/config-edit-without-secret-fields.d.ts +2 -0
- package/dist/app/config-edit-without-secret-fields.js +28 -0
- package/dist/app/entity-list-facet-specs.d.ts +3 -0
- package/dist/app/entity-list-facet-specs.js +65 -0
- package/dist/app/entity-list-screen.js +74 -206
- package/dist/app/kumiko-screen.js +6 -14
- package/dist/app/list-bulk-actions.d.ts +18 -0
- package/dist/app/list-bulk-actions.js +54 -0
- package/dist/app/locked-screen-header.d.ts +9 -0
- package/dist/app/locked-screen-header.js +33 -0
- package/dist/app/projection-detail-body.js +59 -394
- package/dist/app/projection-detail-header-model.d.ts +11 -0
- package/dist/app/projection-detail-header-model.js +33 -0
- package/dist/app/projection-detail-header-region.d.ts +28 -0
- package/dist/app/projection-detail-header-region.js +81 -0
- package/dist/app/projection-detail-header.d.ts +29 -0
- package/dist/app/projection-detail-header.js +84 -0
- package/dist/app/projection-detail-navigation.d.ts +13 -0
- package/dist/app/projection-detail-navigation.js +91 -0
- package/dist/app/projection-detail-states.d.ts +22 -0
- package/dist/app/projection-detail-states.js +26 -0
- package/dist/app/projection-drawer-host.d.ts +12 -0
- package/dist/app/projection-drawer-host.js +10 -0
- package/dist/app/projection-list-body.d.ts +1 -1
- package/dist/app/projection-list-body.js +82 -197
- package/dist/app/projection-list-render-props.d.ts +56 -0
- package/dist/app/projection-list-render-props.js +47 -0
- package/dist/app/projection-list-render.d.ts +26 -0
- package/dist/app/projection-list-render.js +20 -0
- package/dist/app/projection-list-row-click.d.ts +12 -0
- package/dist/app/projection-list-row-click.js +14 -0
- package/dist/app/row-actions.d.ts +3 -0
- package/dist/app/row-actions.js +10 -5
- package/dist/app/screen-shared.js +9 -2
- package/dist/app/use-entity-range-facets.d.ts +24 -0
- package/dist/app/use-entity-range-facets.js +64 -0
- package/dist/app/use-projection-date-range.d.ts +12 -0
- package/dist/app/use-projection-date-range.js +21 -0
- package/dist/app/use-projection-detail-actions.d.ts +35 -0
- package/dist/app/use-projection-detail-actions.js +156 -0
- package/dist/app/use-projection-detail-data.d.ts +19 -0
- package/dist/app/use-projection-detail-data.js +47 -0
- package/dist/app/use-projection-detail-layout.d.ts +17 -0
- package/dist/app/use-projection-detail-layout.js +23 -0
- package/dist/app/use-projection-list-actions.d.ts +31 -0
- package/dist/app/use-projection-list-actions.js +73 -0
- package/dist/app/use-projection-list-data.d.ts +20 -0
- package/dist/app/use-projection-list-data.js +26 -0
- package/dist/app/use-projection-list-definitions.d.ts +11 -0
- package/dist/app/use-projection-list-definitions.js +20 -0
- package/dist/app/use-projection-list-query.d.ts +28 -0
- package/dist/app/use-projection-list-query.js +83 -0
- package/dist/app/use-screen-list-rows.d.ts +37 -0
- package/dist/app/use-screen-list-rows.js +104 -0
- package/dist/app/use-screen-list-table.d.ts +24 -0
- package/dist/app/use-screen-list-table.js +46 -0
- package/dist/components/list-group-page-bridges.d.ts +3 -0
- package/dist/components/list-group-page-bridges.js +31 -0
- package/dist/components/list-state-store.d.ts +16 -0
- package/dist/components/list-state-store.js +31 -0
- package/dist/components/related-list-section.js +37 -89
- package/dist/components/render-edit-banners.d.ts +12 -0
- package/dist/components/render-edit-banners.js +90 -0
- package/dist/components/render-edit-draft-save-helpers.d.ts +19 -0
- package/dist/components/render-edit-draft-save-helpers.js +42 -0
- package/dist/components/render-edit-field-grid.d.ts +4 -0
- package/dist/components/render-edit-field-grid.js +40 -0
- package/dist/components/render-edit-fields-section.d.ts +4 -0
- package/dist/components/render-edit-fields-section.js +76 -0
- package/dist/components/render-edit-form-actions.d.ts +4 -0
- package/dist/components/render-edit-form-actions.js +66 -0
- package/dist/components/render-edit-header-actions.d.ts +11 -0
- package/dist/components/render-edit-header-actions.js +120 -0
- package/dist/components/render-edit-layout-flags.d.ts +29 -0
- package/dist/components/render-edit-layout-flags.js +106 -0
- package/dist/components/render-edit-layout.d.ts +4 -0
- package/dist/components/render-edit-layout.js +79 -0
- package/dist/components/render-edit-render-model.d.ts +63 -0
- package/dist/components/render-edit-render-model.js +14 -0
- package/dist/components/render-edit-section-kinds.d.ts +4 -0
- package/dist/components/render-edit-section-kinds.js +115 -0
- package/dist/components/render-edit-submit-result.d.ts +8 -0
- package/dist/components/render-edit-submit-result.js +77 -0
- package/dist/components/render-edit-submit.d.ts +7 -0
- package/dist/components/render-edit-submit.js +113 -0
- package/dist/components/render-edit-titles.d.ts +17 -0
- package/dist/components/render-edit-titles.js +99 -0
- package/dist/components/render-edit-wizard-navigation.d.ts +11 -0
- package/dist/components/render-edit-wizard-navigation.js +115 -0
- package/dist/components/render-edit.d.ts +2 -2
- package/dist/components/render-edit.js +63 -1128
- package/dist/components/render-field-choice-inputs.d.ts +7 -0
- package/dist/components/render-field-choice-inputs.js +52 -0
- package/dist/components/render-field-control.d.ts +12 -0
- package/dist/components/render-field-control.js +93 -0
- package/dist/components/render-field-display-text.d.ts +4 -0
- package/dist/components/render-field-display-text.js +48 -0
- package/dist/components/render-field-fill-action.d.ts +13 -0
- package/dist/components/render-field-fill-action.js +63 -0
- package/dist/components/render-field-input-shared.d.ts +39 -0
- package/dist/components/render-field-input-shared.js +20 -0
- package/dist/components/render-field-input.d.ts +3 -0
- package/dist/components/render-field-input.js +34 -0
- package/dist/components/render-field-meta.d.ts +6 -0
- package/dist/components/render-field-meta.js +51 -0
- package/dist/components/render-field-read-only.d.ts +11 -0
- package/dist/components/render-field-read-only.js +75 -0
- package/dist/components/render-field-reference.d.ts +15 -0
- package/dist/components/render-field-reference.js +103 -0
- package/dist/components/render-field-scalar-inputs.d.ts +10 -0
- package/dist/components/render-field-scalar-inputs.js +35 -0
- package/dist/components/render-field-text-inputs.d.ts +3 -0
- package/dist/components/render-field-text-inputs.js +34 -0
- package/dist/components/render-field-values.d.ts +18 -0
- package/dist/components/render-field-values.js +111 -0
- package/dist/components/render-field-write-only.d.ts +9 -0
- package/dist/components/render-field-write-only.js +29 -0
- package/dist/components/render-field.d.ts +2 -2
- package/dist/components/render-field.js +39 -669
- package/dist/components/render-list-header-slot.d.ts +5 -0
- package/dist/components/render-list-header-slot.js +30 -0
- package/dist/components/render-list-reference-bridge.d.ts +3 -0
- package/dist/components/render-list-reference-bridge.js +25 -0
- package/dist/components/render-list-reference-columns.d.ts +25 -0
- package/dist/components/render-list-reference-columns.js +137 -0
- package/dist/components/render-list-table-props.d.ts +52 -0
- package/dist/components/render-list-table-props.js +53 -0
- package/dist/components/render-list-toolbar-action.d.ts +27 -0
- package/dist/components/render-list-toolbar-action.js +40 -0
- package/dist/components/render-list-toolbar-model.d.ts +42 -0
- package/dist/components/render-list-toolbar-model.js +82 -0
- package/dist/components/render-list-toolbar.d.ts +38 -0
- package/dist/components/render-list-toolbar.js +40 -0
- package/dist/components/render-list-types.d.ts +113 -0
- package/dist/components/render-list-types.js +1 -0
- package/dist/components/render-list.d.ts +5 -130
- package/dist/components/render-list.js +95 -319
- package/dist/components/use-reference-input-state.d.ts +20 -0
- package/dist/components/use-reference-input-state.js +85 -0
- package/dist/components/use-render-edit-controlled-sync.d.ts +3 -0
- package/dist/components/use-render-edit-controlled-sync.js +26 -0
- package/dist/components/use-render-edit-draft-save.d.ts +29 -0
- package/dist/components/use-render-edit-draft-save.js +141 -0
- package/dist/components/use-render-edit-form.d.ts +10 -0
- package/dist/components/use-render-edit-form.js +101 -0
- package/dist/components/use-render-edit-sections.d.ts +15 -0
- package/dist/components/use-render-edit-sections.js +100 -0
- package/dist/components/use-render-edit-state.d.ts +65 -0
- package/dist/components/use-render-edit-state.js +158 -0
- package/dist/components/use-render-edit-steps.d.ts +13 -0
- package/dist/components/use-render-edit-steps.js +52 -0
- package/dist/components/use-render-list-columns.d.ts +18 -0
- package/dist/components/use-render-list-columns.js +41 -0
- package/dist/components/use-render-list-search.d.ts +4 -0
- package/dist/components/use-render-list-search.js +50 -0
- package/dist/current-user.d.ts +2 -0
- package/dist/data-table-aggregate-types.d.ts +47 -0
- package/dist/data-table-aggregate-types.js +1 -0
- package/dist/data-table-bulk-types.d.ts +27 -0
- package/dist/data-table-bulk-types.js +1 -0
- package/dist/data-table-facet-types.d.ts +36 -0
- package/dist/data-table-facet-types.js +1 -0
- package/dist/data-table-view-types.d.ts +73 -0
- package/dist/data-table-view-types.js +1 -0
- package/dist/headless/view-model/edit.js +3 -1
- package/dist/headless/view-model/types.d.ts +4 -2
- package/dist/hooks/list-column-layout.d.ts +19 -0
- package/dist/hooks/list-column-layout.js +36 -0
- package/dist/hooks/list-group-pages.d.ts +26 -0
- package/dist/hooks/list-group-pages.js +37 -0
- package/dist/hooks/list-reset.d.ts +8 -0
- package/dist/hooks/list-reset.js +15 -0
- package/dist/hooks/list-server-groups.d.ts +39 -0
- package/dist/hooks/list-server-groups.js +84 -0
- package/dist/hooks/list-state-schema.d.ts +28 -0
- package/dist/hooks/list-state-schema.js +76 -0
- package/dist/hooks/use-bulk-run.d.ts +41 -0
- package/dist/hooks/use-bulk-run.js +65 -0
- package/dist/hooks/use-group-load-state.d.ts +11 -0
- package/dist/hooks/use-group-load-state.js +31 -0
- package/dist/hooks/use-list-aggregates.d.ts +38 -0
- package/dist/hooks/use-list-aggregates.js +107 -0
- package/dist/hooks/use-list-table.d.ts +38 -0
- package/dist/hooks/use-list-table.js +91 -0
- package/dist/hooks/use-list-view-state.d.ts +43 -0
- package/dist/hooks/use-list-view-state.js +161 -0
- package/dist/hooks/use-related-list-rows.d.ts +27 -0
- package/dist/hooks/use-related-list-rows.js +81 -0
- package/dist/hooks/use-related-list-state.d.ts +15 -0
- package/dist/hooks/use-related-list-state.js +31 -0
- package/dist/hooks/use-remembered-list-params.d.ts +13 -0
- package/dist/hooks/use-remembered-list-params.js +53 -0
- package/dist/hooks/use-remembered-local-list-state.d.ts +26 -0
- package/dist/hooks/use-remembered-local-list-state.js +63 -0
- package/dist/i18n-defaults.js +53 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -0
- package/dist/primitives.d.ts +11 -47
- package/dist/web/app/create-app.d.ts +5 -0
- package/dist/web/app/create-app.js +7 -4
- package/dist/web/app/dashboard-body.d.ts +1 -1
- package/dist/web/app/dashboard-body.js +42 -246
- package/dist/web/app/dashboard-header.d.ts +34 -0
- package/dist/web/app/dashboard-header.js +58 -0
- package/dist/web/app/dashboard-screen-controls.d.ts +11 -0
- package/dist/web/app/dashboard-screen-controls.js +42 -0
- package/dist/web/app/dashboard-screen-tiles.d.ts +8 -0
- package/dist/web/app/dashboard-screen-tiles.js +42 -0
- package/dist/web/app/dashboard-visibility.d.ts +42 -0
- package/dist/web/app/dashboard-visibility.js +102 -0
- package/dist/web/app/history-leave-guard.d.ts +6 -0
- package/dist/web/app/history-leave-guard.js +115 -0
- package/dist/web/app/list-state-store-boot.d.ts +6 -0
- package/dist/web/app/list-state-store-boot.js +15 -0
- package/dist/web/app/nav.js +7 -54
- package/dist/web/app/session-list-state-store.d.ts +15 -0
- package/dist/web/app/session-list-state-store.js +117 -0
- package/dist/web/app/use-dashboard-screen-state.d.ts +35 -0
- package/dist/web/app/use-dashboard-screen-state.js +69 -0
- package/dist/web/index.d.ts +1 -0
- package/dist/web/index.js +1 -0
- package/dist/web/lib/export-xlsx-request.d.ts +11 -0
- package/dist/web/lib/export-xlsx-request.js +46 -0
- package/dist/web/primitives/data-table/actions-column.d.ts +16 -0
- package/dist/web/primitives/data-table/actions-column.js +35 -0
- package/dist/web/primitives/data-table/bulk-selection-bar.d.ts +20 -0
- package/dist/web/primitives/data-table/bulk-selection-bar.js +37 -0
- package/dist/web/primitives/data-table/card-body.d.ts +6 -0
- package/dist/web/primitives/data-table/card-body.js +32 -0
- package/dist/web/primitives/data-table/card-row.d.ts +5 -0
- package/dist/web/primitives/data-table/card-row.js +31 -0
- package/dist/web/primitives/data-table/card-sort-select.d.ts +14 -0
- package/dist/web/primitives/data-table/card-sort-select.js +40 -0
- package/dist/web/primitives/data-table/card-view.d.ts +3 -0
- package/dist/web/primitives/data-table/card-view.js +13 -0
- package/dist/web/primitives/data-table/column-layout-mode.d.ts +5 -0
- package/dist/web/primitives/data-table/column-layout-mode.js +10 -0
- package/dist/web/primitives/data-table/column-picker-section.d.ts +7 -0
- package/dist/web/primitives/data-table/column-picker-section.js +35 -0
- package/dist/web/primitives/data-table/column-resize-handle.d.ts +14 -0
- package/dist/web/primitives/data-table/column-resize-handle.js +48 -0
- package/dist/web/primitives/data-table/data-cell-props.d.ts +7 -0
- package/dist/web/primitives/data-table/data-cell-props.js +8 -0
- package/dist/web/primitives/data-table/density.d.ts +14 -0
- package/dist/web/primitives/data-table/density.js +20 -0
- package/dist/web/primitives/data-table/export-button.d.ts +5 -0
- package/dist/web/primitives/data-table/export-button.js +37 -0
- package/dist/web/primitives/data-table/facet-cluster.d.ts +8 -0
- package/dist/web/primitives/data-table/facet-cluster.js +37 -0
- package/dist/web/primitives/data-table/group-band.d.ts +28 -0
- package/dist/web/primitives/data-table/group-band.js +53 -0
- package/dist/web/primitives/data-table/measure-value.d.ts +10 -0
- package/dist/web/primitives/data-table/measure-value.js +28 -0
- package/dist/web/primitives/data-table/pin-section.d.ts +8 -0
- package/dist/web/primitives/data-table/pin-section.js +20 -0
- package/dist/web/primitives/data-table/reset-all-button.d.ts +4 -0
- package/dist/web/primitives/data-table/reset-all-button.js +8 -0
- package/dist/web/primitives/data-table/row-render-parts.d.ts +8 -0
- package/dist/web/primitives/data-table/row-render-parts.js +35 -0
- package/dist/web/primitives/data-table/server-group-header.d.ts +11 -0
- package/dist/web/primitives/data-table/server-group-header.js +51 -0
- package/dist/web/primitives/data-table/sortable-header.d.ts +17 -0
- package/dist/web/primitives/data-table/sortable-header.js +41 -0
- package/dist/web/primitives/data-table/table-body.d.ts +3 -0
- package/dist/web/primitives/data-table/table-body.js +32 -0
- package/dist/web/primitives/data-table/table-chrome.d.ts +13 -0
- package/dist/web/primitives/data-table/table-chrome.js +30 -0
- package/dist/web/primitives/data-table/table-content.d.ts +3 -0
- package/dist/web/primitives/data-table/table-content.js +41 -0
- package/dist/web/primitives/data-table/table-data-cell.d.ts +4 -0
- package/dist/web/primitives/data-table/table-data-cell.js +25 -0
- package/dist/web/primitives/data-table/table-footer.d.ts +7 -0
- package/dist/web/primitives/data-table/table-footer.js +20 -0
- package/dist/web/primitives/data-table/table-header-row.d.ts +3 -0
- package/dist/web/primitives/data-table/table-header-row.js +21 -0
- package/dist/web/primitives/data-table/table-view.d.ts +3 -0
- package/dist/web/primitives/data-table/table-view.js +25 -0
- package/dist/web/primitives/data-table/toolbar-end-cluster.d.ts +10 -0
- package/dist/web/primitives/data-table/toolbar-end-cluster.js +13 -0
- package/dist/web/primitives/data-table/toolbar.d.ts +6 -0
- package/dist/web/primitives/data-table/toolbar.js +53 -0
- package/dist/web/primitives/data-table/totals-footer.d.ts +24 -0
- package/dist/web/primitives/data-table/totals-footer.js +48 -0
- package/dist/web/primitives/data-table/use-bulk-selection.d.ts +21 -0
- package/dist/web/primitives/data-table/use-bulk-selection.js +66 -0
- package/dist/web/primitives/data-table/use-column-pins.d.ts +32 -0
- package/dist/web/primitives/data-table/use-column-pins.js +117 -0
- package/dist/web/primitives/data-table/use-column-sizing.d.ts +22 -0
- package/dist/web/primitives/data-table/use-column-sizing.js +44 -0
- package/dist/web/primitives/data-table/use-data-table-state.d.ts +44 -0
- package/dist/web/primitives/data-table/use-data-table-state.js +123 -0
- package/dist/web/primitives/data-table/use-measured-column-widths.d.ts +15 -0
- package/dist/web/primitives/data-table/use-measured-column-widths.js +83 -0
- package/dist/web/primitives/data-table/use-row-keyboard-navigation.d.ts +22 -0
- package/dist/web/primitives/data-table/use-row-keyboard-navigation.js +65 -0
- package/dist/web/primitives/data-table/use-row-selection.d.ts +14 -0
- package/dist/web/primitives/data-table/use-row-selection.js +48 -0
- package/dist/web/primitives/data-table/use-view-columns.d.ts +6 -0
- package/dist/web/primitives/data-table/use-view-columns.js +17 -0
- package/dist/web/primitives/data-table/view-menu.d.ts +8 -0
- package/dist/web/primitives/data-table/view-menu.js +45 -0
- package/dist/web/primitives/data-table-cell.d.ts +0 -22
- package/dist/web/primitives/data-table-cell.js +1 -58
- package/dist/web/primitives/data-table.d.ts +3 -4
- package/dist/web/primitives/data-table.js +30 -272
- package/dist/web/primitives/file-value-list.d.ts +1 -1
- package/dist/web/primitives/file-value-list.js +5 -5
- package/dist/web/primitives/form-footer-parts.d.ts +25 -0
- package/dist/web/primitives/form-footer-parts.js +55 -0
- package/dist/web/primitives/form.js +33 -43
- package/dist/web/primitives/input-choice-kinds.d.ts +4 -0
- package/dist/web/primitives/input-choice-kinds.js +67 -0
- package/dist/web/primitives/input-file-kinds.d.ts +3 -0
- package/dist/web/primitives/input-file-kinds.js +6 -0
- package/dist/web/primitives/input-number-kinds.d.ts +4 -0
- package/dist/web/primitives/input-number-kinds.js +16 -0
- package/dist/web/primitives/input-optional-props.d.ts +20 -0
- package/dist/web/primitives/input-optional-props.js +24 -0
- package/dist/web/primitives/input-select-presentation.d.ts +13 -0
- package/dist/web/primitives/input-select-presentation.js +19 -0
- package/dist/web/primitives/input-shared.d.ts +22 -0
- package/dist/web/primitives/input-shared.js +10 -0
- package/dist/web/primitives/input-temporal-kinds.d.ts +5 -0
- package/dist/web/primitives/input-temporal-kinds.js +10 -0
- package/dist/web/primitives/input-text-kinds.d.ts +7 -0
- package/dist/web/primitives/input-text-kinds.js +33 -0
- package/dist/web/primitives/input.js +35 -161
- package/dist/web/primitives/number-range-facet.d.ts +7 -0
- package/dist/web/primitives/number-range-facet.js +33 -0
- package/dist/web/widgets/bounded-load-cache.d.ts +5 -1
- package/dist/web/widgets/bounded-load-cache.js +48 -26
- package/dist/web/widgets/chart-data.d.ts +35 -0
- package/dist/web/widgets/chart-data.js +37 -0
- package/dist/web/widgets/chart-markers.d.ts +26 -0
- package/dist/web/widgets/chart-markers.js +64 -0
- package/dist/web/widgets/chart-parts.d.ts +20 -0
- package/dist/web/widgets/chart-parts.js +15 -0
- package/dist/web/widgets/charts.d.ts +5 -78
- package/dist/web/widgets/charts.js +7 -485
- package/dist/web/widgets/drawer-panel-class.d.ts +3 -0
- package/dist/web/widgets/drawer-panel-class.js +40 -0
- package/dist/web/widgets/drawer-resize-controls.d.ts +11 -0
- package/dist/web/widgets/drawer-resize-controls.js +12 -0
- package/dist/web/widgets/drawer-sizing.d.ts +19 -0
- package/dist/web/widgets/drawer-sizing.js +60 -0
- package/dist/web/widgets/drawer.js +17 -116
- package/dist/web/widgets/pdf-preview.js +9 -4
- package/dist/web/widgets/stacked-area-brush.d.ts +13 -0
- package/dist/web/widgets/stacked-area-brush.js +91 -0
- package/dist/web/widgets/stacked-area-chart.d.ts +6 -0
- package/dist/web/widgets/stacked-area-chart.js +45 -0
- package/dist/web/widgets/stacked-area-chrome.d.ts +7 -0
- package/dist/web/widgets/stacked-area-chrome.js +77 -0
- package/dist/web/widgets/stacked-area-geometry.d.ts +54 -0
- package/dist/web/widgets/stacked-area-geometry.js +83 -0
- package/dist/web/widgets/stacked-area-model.d.ts +11 -0
- package/dist/web/widgets/stacked-area-model.js +1 -0
- package/dist/web/widgets/stacked-area-plot.d.ts +3 -0
- package/dist/web/widgets/stacked-area-plot.js +51 -0
- package/dist/web/widgets/stacked-area-props.d.ts +83 -0
- package/dist/web/widgets/stacked-area-props.js +16 -0
- package/dist/web/widgets/stacked-area-svg.d.ts +3 -0
- package/dist/web/widgets/stacked-area-svg.js +38 -0
- package/dist/web/widgets/stacked-area-tooltip.d.ts +3 -0
- package/dist/web/widgets/stacked-area-tooltip.js +86 -0
- package/dist/web/widgets/use-drawer-resize.d.ts +22 -0
- package/dist/web/widgets/use-drawer-resize.js +52 -0
- package/dist/web/widgets/use-stacked-area-tooltip.d.ts +9 -0
- package/dist/web/widgets/use-stacked-area-tooltip.js +34 -0
- package/dist/web/widgets/use-stacked-area-window.d.ts +20 -0
- package/dist/web/widgets/use-stacked-area-window.js +76 -0
- package/package.json +9 -9
- package/src/changes.json +163 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../lib/cn.js";
|
|
3
|
+
import { TableCell } from "../../ui/table.js";
|
|
4
|
+
import { cellLinkProp, cellTitle, DataTableCell, FIT_CONTENT_CELL_CLASS, FirstCellLink, isEmptyCellValue, NUMERIC_COLUMN_TYPES, TABULAR_COLUMN_TYPES, } from "../data-table-cell.js";
|
|
5
|
+
import { columnCellPresentationProps } from "./data-cell-props.js";
|
|
6
|
+
// Text wraps instead of truncating: nowrap cells keep their
|
|
7
|
+
// full width, so a wide table scrolled sideways and its
|
|
8
|
+
// last column slid under the sticky actions column with
|
|
9
|
+
// nothing visibly cut off. max-w-xs bounds a single column;
|
|
10
|
+
// badges and dates stay nowrap by their own classes.
|
|
11
|
+
function dataCellClassName(m, col, colIndex, pinClassName) {
|
|
12
|
+
return cn(col.fileDisplay === undefined
|
|
13
|
+
? cn(m.sizing ? "overflow-hidden" : "max-w-xs", "whitespace-normal break-words")
|
|
14
|
+
: FIT_CONTENT_CELL_CLASS, colIndex === 0 ? "font-medium text-foreground" : "text-foreground-secondary", NUMERIC_COLUMN_TYPES.has(col.type) && "text-right", TABULAR_COLUMN_TYPES.has(col.type) && "tabular-nums", col.highlighted === true && "bg-accent/40", m.density.cell, pinClassName);
|
|
15
|
+
}
|
|
16
|
+
export function renderDataCell(m, row, col, colIndex, opensOnClick) {
|
|
17
|
+
const { getCellTestId, onCellChange, onRowClick, tableTranslate, tableLocale } = m;
|
|
18
|
+
const bodyPin = m.pins.bodyCell(col.field);
|
|
19
|
+
const linksFirstCell = colIndex === 0 && opensOnClick && onCellChange === undefined;
|
|
20
|
+
return (_jsx(TableCell, { "data-testid": getCellTestId?.(row, col.field) ?? `cell-${row.id}-${col.field}`, "data-highlighted": col.highlighted === true ? "true" : undefined, className: dataCellClassName(m, col, colIndex, bodyPin.className), style: bodyPin.style, title: cellTitle(row.values[col.field]), children: _jsx(FirstCellLink, { enabled: linksFirstCell, onOpen: () => onRowClick?.(row), empty: isEmptyCellValue(row.values[col.field]), emptyLabel: m.rowClickLabel, children: _jsx(DataTableCell, { value: row.values[col.field], row: row.values, field: col.field, type: col.type, renderer: col.renderer, translate: tableTranslate, locale: tableLocale, ...columnCellPresentationProps(col), ...(col.fileDisplay !== undefined && {
|
|
21
|
+
fileDisplay: col.fileDisplay,
|
|
22
|
+
}), ...(onCellChange !== undefined && {
|
|
23
|
+
onChange: (value) => onCellChange(row.id, col.field, value),
|
|
24
|
+
}), ...cellLinkProp(col, row, !linksFirstCell) }) }) }, col.field));
|
|
25
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PointerEvent, ReactNode } from "react";
|
|
2
|
+
export declare function DataTableFooter({ count, itemNoun, testId, }: {
|
|
3
|
+
readonly count: number;
|
|
4
|
+
readonly itemNoun?: (count: number) => string;
|
|
5
|
+
readonly testId: string;
|
|
6
|
+
}): ReactNode;
|
|
7
|
+
export declare function showFullTextOnHover(event: PointerEvent<HTMLElement>): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useOptionalTranslation } from "../../../index.js";
|
|
3
|
+
import { TABLE_FOOTER_BAR_CLASS } from "../pager.js";
|
|
4
|
+
export function DataTableFooter({ count, itemNoun, testId, }) {
|
|
5
|
+
const t = useOptionalTranslation();
|
|
6
|
+
const noun = itemNoun?.(count);
|
|
7
|
+
const label = noun !== undefined
|
|
8
|
+
? (t?.("kumiko.list.count.noun", { count: count.toLocaleString(), noun }) ??
|
|
9
|
+
`${count.toLocaleString()} ${noun}`)
|
|
10
|
+
: count === 1
|
|
11
|
+
? (t?.("kumiko.list.count.one") ?? "1 entry")
|
|
12
|
+
: (t?.("kumiko.list.count.other", { count: count.toLocaleString() }) ??
|
|
13
|
+
`${count.toLocaleString()} entries`);
|
|
14
|
+
return (_jsx("div", { "data-testid": testId, className: TABLE_FOOTER_BAR_CLASS, children: _jsx("span", { "data-testid": `${testId}-count`, children: label }) }));
|
|
15
|
+
}
|
|
16
|
+
// Cell content is a ReactNode, so the tooltip text is read from the rendered DOM.
|
|
17
|
+
export function showFullTextOnHover(event) {
|
|
18
|
+
const element = event.currentTarget;
|
|
19
|
+
element.title = element.scrollWidth > element.clientWidth ? (element.textContent ?? "") : "";
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../lib/cn.js";
|
|
3
|
+
import { TableHead, TableHeader, TableRow } from "../../ui/table.js";
|
|
4
|
+
import { NUMERIC_COLUMN_TYPES } from "../data-table-cell.js";
|
|
5
|
+
import { ActionsHeaderCell } from "./actions-column.js";
|
|
6
|
+
import { ColumnResizeHandle } from "./column-resize-handle.js";
|
|
7
|
+
import { SortableHeader } from "./sortable-header.js";
|
|
8
|
+
import { EXPAND_TOGGLE_CELL_CLASS } from "./table-chrome.js";
|
|
9
|
+
import { EXPAND_COLUMN_KEY, SELECT_COLUMN_KEY } from "./use-column-pins.js";
|
|
10
|
+
function renderColumnHeader(m, col) {
|
|
11
|
+
const { sizing, sort, onSortChange } = m;
|
|
12
|
+
const headerPin = m.pins.headerCell(col.field);
|
|
13
|
+
return (_jsx(SortableHeader, { field: col.field, label: col.label, sortable: col.sortable === true, highlighted: col.highlighted === true, numeric: NUMERIC_COLUMN_TYPES.has(col.type), fitContent: col.fileDisplay !== undefined, className: cn(m.density.header, headerPin.className), style: headerPin.style, columnField: headerPin.columnField, trailing: sizing && _jsx(ColumnResizeHandle, { field: col.field, label: col.label, sizing: sizing }), ...(sort !== undefined && sort !== null && { sort }), ...(onSortChange !== undefined && { onSortChange }) }, col.field));
|
|
14
|
+
}
|
|
15
|
+
function renderExpandHeaderCell(m) {
|
|
16
|
+
const expandHeaderPin = m.pins.headerCell(EXPAND_COLUMN_KEY);
|
|
17
|
+
return (_jsx(TableHead, { "data-testid": "column-expand", className: cn(EXPAND_TOGGLE_CELL_CLASS, expandHeaderPin.className), style: expandHeaderPin.style }));
|
|
18
|
+
}
|
|
19
|
+
export function renderTableHeader(m) {
|
|
20
|
+
return (_jsx(TableHeader, { className: "bg-muted", children: _jsxs(TableRow, { ref: m.headerRowRef, className: "hover:bg-transparent", children: [m.selection.headerCell(m.pins.headerCell(SELECT_COLUMN_KEY)), m.expansion !== undefined && renderExpandHeaderCell(m), m.columns.map((col) => renderColumnHeader(m, col)), m.hasTableActions && (_jsx(ActionsHeaderCell, { label: m.tableTranslate?.("kumiko.list.actions") ?? "Actions", style: m.pins.actionsHeaderStyle, absorbsLeftover: m.sizing !== undefined }))] }) }));
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../lib/cn.js";
|
|
3
|
+
import { Table } from "../../ui/table.js";
|
|
4
|
+
import { ColumnWidthGroup } from "./column-resize-handle.js";
|
|
5
|
+
import { renderTableBody } from "./table-body.js";
|
|
6
|
+
import { FILL_TABLE_CLASS, FlushTable } from "./table-chrome.js";
|
|
7
|
+
import { renderTableHeader } from "./table-header-row.js";
|
|
8
|
+
import { TotalsFooterRow } from "./totals-footer.js";
|
|
9
|
+
function renderColumnWidths(m) {
|
|
10
|
+
const { sizing } = m;
|
|
11
|
+
if (sizing === undefined)
|
|
12
|
+
return null;
|
|
13
|
+
return (_jsx(ColumnWidthGroup, { fields: m.columns.map((col) => col.field), sizing: sizing, hasExpandColumn: m.expansion !== undefined, hasSelectColumn: m.selection.active, hasActionsColumn: m.hasTableActions }));
|
|
14
|
+
}
|
|
15
|
+
function renderTotalsRow(m) {
|
|
16
|
+
const { totals } = m;
|
|
17
|
+
if (totals === undefined)
|
|
18
|
+
return null;
|
|
19
|
+
return (_jsx(TotalsFooterRow, { totals: totals, columns: m.columns, cellPin: m.pins.bodyCell, leadingCells: { select: m.selection.active, expand: m.expansion !== undefined }, actionsCell: m.hasTableActions ? { fillsHeight: m.fillsHeight } : undefined, cellClassName: m.density.cell }));
|
|
20
|
+
}
|
|
21
|
+
export function renderTableView(m) {
|
|
22
|
+
const { fillsHeight, chromeless, sizing, testId } = m;
|
|
23
|
+
const TableRoot = fillsHeight ? FlushTable : Table;
|
|
24
|
+
return (_jsx("div", { className: cn(!fillsHeight && "overflow-hidden", !fillsHeight && chromeless !== true && "rounded-lg border bg-card"), children: _jsxs(TableRoot, { "data-testid": testId, className: fillsHeight ? FILL_TABLE_CLASS : undefined, ...(sizing !== undefined && { style: sizing.tableStyle }), children: [renderColumnWidths(m), renderTableHeader(m), renderTableBody(m), renderTotalsRow(m)] }) }));
|
|
25
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { DataTableExport, DataTableViewOptions } from "../../../data-table-view-types.ts";
|
|
3
|
+
export declare function toolbarEndHasContent(view: DataTableViewOptions | undefined, exportList: DataTableExport | undefined, toolbarEnd: ReactNode): boolean;
|
|
4
|
+
/** Right-hand toolbar group: view menu, export button, then the caller's own end content. */
|
|
5
|
+
export declare function ToolbarEndCluster({ view, columnLabels, exportList, toolbarEnd, }: {
|
|
6
|
+
readonly view: DataTableViewOptions | undefined;
|
|
7
|
+
readonly columnLabels: ReadonlyMap<string, string>;
|
|
8
|
+
readonly exportList: DataTableExport | undefined;
|
|
9
|
+
readonly toolbarEnd: ReactNode;
|
|
10
|
+
}): ReactNode;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ExportButton } from "./export-button.js";
|
|
3
|
+
import { ViewMenu, viewHasMenu } from "./view-menu.js";
|
|
4
|
+
export function toolbarEndHasContent(view, exportList, toolbarEnd) {
|
|
5
|
+
return toolbarEnd !== undefined || viewHasMenu(view) || exportList !== undefined;
|
|
6
|
+
}
|
|
7
|
+
/** Right-hand toolbar group: view menu, export button, then the caller's own end content. */
|
|
8
|
+
export function ToolbarEndCluster({ view, columnLabels, exportList, toolbarEnd, }) {
|
|
9
|
+
if (!toolbarEndHasContent(view, exportList, toolbarEnd))
|
|
10
|
+
return null;
|
|
11
|
+
const showsViewMenu = viewHasMenu(view);
|
|
12
|
+
return (_jsxs("div", { className: "flex flex-wrap items-center gap-2 ml-auto", children: [showsViewMenu && _jsx(ViewMenu, { view: view, columnLabels: columnLabels }), exportList !== undefined && _jsx(ExportButton, { source: exportList }), toolbarEnd] }));
|
|
13
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { DataTableModel } from "./use-data-table-state.ts";
|
|
3
|
+
export declare function buildModelFacetCluster(m: DataTableModel): ReactNode;
|
|
4
|
+
export declare function hasToolbarContent(m: DataTableModel, facetCluster: ReactNode): boolean;
|
|
5
|
+
export declare function renderToolbar(m: DataTableModel, facetCluster: ReactNode): ReactNode;
|
|
6
|
+
export declare function renderToolbarDescription(m: DataTableModel, hasToolbar: boolean): ReactNode;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Search, SlidersHorizontal } from "lucide-react";
|
|
3
|
+
import { UNIFORM_BAR_CONTROLS_CLASSES } from "../../layout/uniform-bar-controls.js";
|
|
4
|
+
import { cn } from "../../lib/cn.js";
|
|
5
|
+
import { Button as UiButton } from "../../ui/button.js";
|
|
6
|
+
import { buildFacetCluster } from "./facet-cluster.js";
|
|
7
|
+
import { ToolbarEndCluster, toolbarEndHasContent } from "./toolbar-end-cluster.js";
|
|
8
|
+
export function buildModelFacetCluster(m) {
|
|
9
|
+
return buildFacetCluster({
|
|
10
|
+
filterFacets: m.filterFacets,
|
|
11
|
+
filterValues: m.filterValues,
|
|
12
|
+
onFilterChange: m.onFilterChange,
|
|
13
|
+
onFilterReset: m.onFilterReset,
|
|
14
|
+
dateRangeFacets: m.dateRangeFacets,
|
|
15
|
+
onDateRangeChange: m.onDateRangeChange,
|
|
16
|
+
rangeFacets: m.rangeFacets,
|
|
17
|
+
onRangeChange: m.onRangeChange,
|
|
18
|
+
resetAll: m.resetAll,
|
|
19
|
+
notice: m.notice,
|
|
20
|
+
dense: m.fillsHeight,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
export function hasToolbarContent(m, facetCluster) {
|
|
24
|
+
return (m.toolbarStart !== undefined ||
|
|
25
|
+
facetCluster !== undefined ||
|
|
26
|
+
toolbarEndHasContent(m.view, m.exportList, m.toolbarEnd));
|
|
27
|
+
}
|
|
28
|
+
function toolbarClassName({ fillsHeight, isNarrow }) {
|
|
29
|
+
if (!fillsHeight)
|
|
30
|
+
return cn("flex flex-wrap items-center", UNIFORM_BAR_CONTROLS_CLASSES, "gap-3");
|
|
31
|
+
return cn("flex flex-wrap items-center", UNIFORM_BAR_CONTROLS_CLASSES, isNarrow ? "shrink-0 gap-2 p-3" : "min-h-13 shrink-0 gap-2 px-6 py-2 md:py-0");
|
|
32
|
+
}
|
|
33
|
+
// min-w-48: without a floor, flex shrinks the search instead of wrapping the facet cluster onto its own line.
|
|
34
|
+
function renderToolbarStart(m, toolbarStart) {
|
|
35
|
+
return (_jsxs("div", { className: cn(m.fillsHeight
|
|
36
|
+
? "relative w-full md:w-[300px] max-md:flex-1 [&_input]:border-border-strong [&_input]:pl-8 [&_input]:max-md:h-11"
|
|
37
|
+
: "flex-1 min-w-48 max-w-sm"), children: [m.fillsHeight && (_jsx(Search, { className: "pointer-events-none absolute left-2.5 top-1/2 z-10 size-4 -translate-y-1/2 text-muted-foreground", "aria-hidden": "true" })), toolbarStart] }));
|
|
38
|
+
}
|
|
39
|
+
function renderFacetToggle(m, facetCluster) {
|
|
40
|
+
const { testId, facetsOpenNarrow, setFacetsOpenNarrow } = m;
|
|
41
|
+
return (_jsxs(_Fragment, { children: [_jsx(UiButton, { type: "button", variant: "outline", size: "icon", className: "size-11", "aria-label": m.tableTranslate?.("kumiko.list.filter.toggle") ?? "Filter", "aria-expanded": facetsOpenNarrow, "data-testid": testId !== undefined ? `${testId}-filter-toggle` : "filter-toggle", onClick: () => setFacetsOpenNarrow((open) => !open), children: _jsx(SlidersHorizontal, { className: "size-4", "aria-hidden": "true" }) }), facetsOpenNarrow && _jsx("div", { className: "w-full", children: facetCluster })] }));
|
|
42
|
+
}
|
|
43
|
+
export function renderToolbar(m, facetCluster) {
|
|
44
|
+
const { testId, toolbarStart } = m;
|
|
45
|
+
const collapsesFacetsBehindButton = m.isNarrow && m.fillsHeight && facetCluster !== undefined;
|
|
46
|
+
return (_jsxs("div", { "data-testid": testId !== undefined ? `${testId}-toolbar` : "render-list-toolbar", className: toolbarClassName(m), children: [toolbarStart !== undefined && renderToolbarStart(m, toolbarStart), collapsesFacetsBehindButton ? renderFacetToggle(m, facetCluster) : facetCluster, _jsx(ToolbarEndCluster, { view: m.view, columnLabels: new Map(m.schemaColumns.map((col) => [col.field, col.label])), exportList: m.exportList, toolbarEnd: m.toolbarEnd })] }));
|
|
47
|
+
}
|
|
48
|
+
export function renderToolbarDescription(m, hasToolbar) {
|
|
49
|
+
const { testId, toolbarDescription, fillsHeight, isNarrow } = m;
|
|
50
|
+
if (toolbarDescription === undefined)
|
|
51
|
+
return null;
|
|
52
|
+
return (_jsx("p", { "data-testid": testId !== undefined ? `${testId}-description` : "render-list-description", className: cn("m-0 pb-2 text-sm text-muted-foreground", fillsHeight && (isNarrow ? "px-3" : "px-6"), fillsHeight && !hasToolbar && "pt-4"), children: toolbarDescription }));
|
|
53
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { DataTableTotals } from "../../../data-table-aggregate-types.ts";
|
|
3
|
+
import type { ListColumnViewModel } from "../../../headless/index.ts";
|
|
4
|
+
import { type PinnedCellProps } from "./use-column-pins.ts";
|
|
5
|
+
/** Footer row under the table body, one cell per visible column. */
|
|
6
|
+
export declare function TotalsFooterRow({ totals, columns, cellPin, leadingCells, actionsCell, cellClassName, }: {
|
|
7
|
+
readonly totals: DataTableTotals;
|
|
8
|
+
readonly columns: readonly ListColumnViewModel[];
|
|
9
|
+
readonly cellPin: (field: string) => PinnedCellProps;
|
|
10
|
+
readonly leadingCells: {
|
|
11
|
+
readonly select: boolean;
|
|
12
|
+
readonly expand: boolean;
|
|
13
|
+
};
|
|
14
|
+
/** Present when the table has an actions column; the cell then sticks like that column. */
|
|
15
|
+
readonly actionsCell: {
|
|
16
|
+
readonly fillsHeight: boolean;
|
|
17
|
+
} | undefined;
|
|
18
|
+
readonly cellClassName?: string;
|
|
19
|
+
}): ReactNode;
|
|
20
|
+
/** Card layout: the totals as a labelled list under the cards. */
|
|
21
|
+
export declare function TotalsCard({ totals, columnOf, }: {
|
|
22
|
+
readonly totals: DataTableTotals;
|
|
23
|
+
readonly columnOf: (field: string) => ListColumnViewModel | undefined;
|
|
24
|
+
}): ReactNode;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useOptionalTranslation } from "../../../index.js";
|
|
3
|
+
import { cn } from "../../lib/cn.js";
|
|
4
|
+
import { TableCell, TableFooter, TableRow } from "../../ui/table.js";
|
|
5
|
+
import { NUMERIC_COLUMN_TYPES } from "../data-table-cell.js";
|
|
6
|
+
import { stickyActionsCellClass } from "./actions-column.js";
|
|
7
|
+
import { MeasureValue, measureKindLabel, measureLabel } from "./measure-value.js";
|
|
8
|
+
import { EXPAND_COLUMN_KEY, SELECT_COLUMN_KEY } from "./use-column-pins.js";
|
|
9
|
+
function measuresOf(totals, field) {
|
|
10
|
+
return totals.measures.filter((measure) => measure.field === field);
|
|
11
|
+
}
|
|
12
|
+
// Same order as the body row: select before expand.
|
|
13
|
+
function leadingCellKeys(leading) {
|
|
14
|
+
return [
|
|
15
|
+
...(leading.select ? [SELECT_COLUMN_KEY] : []),
|
|
16
|
+
...(leading.expand ? [EXPAND_COLUMN_KEY] : []),
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
function totalsLabel(translate) {
|
|
20
|
+
return translate?.("kumiko.list.totals.label") ?? "Total";
|
|
21
|
+
}
|
|
22
|
+
function FooterMeasures({ measures, column, }) {
|
|
23
|
+
const translate = useOptionalTranslation();
|
|
24
|
+
if (measures.length === 1 && measures[0]?.kind === "sum") {
|
|
25
|
+
return _jsx(MeasureValue, { measure: measures[0], column: column });
|
|
26
|
+
}
|
|
27
|
+
return (_jsx("span", { className: "inline-flex flex-col gap-0.5", children: measures.map((measure) => (_jsxs("span", { className: "inline-flex items-baseline justify-end gap-1.5", children: [_jsx("span", { className: "text-xs font-normal text-muted-foreground", children: measureKindLabel(measure.kind, translate) }), _jsx(MeasureValue, { measure: measure, column: column })] }, measure.kind))) }));
|
|
28
|
+
}
|
|
29
|
+
/** Footer row under the table body, one cell per visible column. */
|
|
30
|
+
export function TotalsFooterRow({ totals, columns, cellPin, leadingCells, actionsCell, cellClassName, }) {
|
|
31
|
+
const translate = useOptionalTranslation();
|
|
32
|
+
return (_jsx(TableFooter, { "data-testid": "list-totals", children: _jsxs(TableRow, { className: "hover:bg-transparent", children: [leadingCellKeys(leadingCells).map((key) => {
|
|
33
|
+
const pin = cellPin(key);
|
|
34
|
+
return (_jsx(TableCell, { "data-testid": `list-totals-${key}`, className: pin.className, style: pin.style }, key));
|
|
35
|
+
}), columns.map((column, index) => {
|
|
36
|
+
const measures = measuresOf(totals, column.field);
|
|
37
|
+
const pin = cellPin(column.field);
|
|
38
|
+
return (_jsx(TableCell, { "data-testid": `list-totals-${column.field}`, className: cn("tabular-nums", NUMERIC_COLUMN_TYPES.has(column.type) && "text-right", cellClassName, pin.className), style: pin.style, children: measures.length > 0 ? (_jsx(FooterMeasures, { measures: measures, column: column })) : index === 0 ? (totalsLabel(translate)) : null }, column.field));
|
|
39
|
+
}), actionsCell !== undefined && (_jsx(TableCell, { className: stickyActionsCellClass(actionsCell.fillsHeight) }))] }) }));
|
|
40
|
+
}
|
|
41
|
+
/** Card layout: the totals as a labelled list under the cards. */
|
|
42
|
+
export function TotalsCard({ totals, columnOf, }) {
|
|
43
|
+
const translate = useOptionalTranslation();
|
|
44
|
+
return (_jsx("dl", { "data-testid": "list-totals", className: "m-0 flex flex-col gap-1 border-b border-border-row bg-muted/50 px-4 py-3 text-sm", children: totals.measures.map((measure) => {
|
|
45
|
+
const column = columnOf(measure.field);
|
|
46
|
+
return (_jsxs("div", { "data-testid": `list-totals-${measure.field}`, className: "flex items-baseline justify-between gap-3", children: [_jsx("dt", { className: "text-muted-foreground", children: measureLabel(measure, column, translate) }), _jsx("dd", { className: "m-0 font-medium tabular-nums", children: _jsx(MeasureValue, { measure: measure, column: column }) })] }, `${measure.kind}-${measure.field}`));
|
|
47
|
+
}) }));
|
|
48
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { DataTableBulk } from "../../../data-table-bulk-types.ts";
|
|
3
|
+
import type { ListRowViewModel } from "../../../headless/index.ts";
|
|
4
|
+
import type { PinnedCellProps } from "./use-column-pins.ts";
|
|
5
|
+
export type BulkSelection = {
|
|
6
|
+
readonly active: boolean;
|
|
7
|
+
readonly bar: ReactNode;
|
|
8
|
+
readonly onKeyboardSelect: ((rowId: string) => void) | undefined;
|
|
9
|
+
readonly headerCell: (pin: PinnedCellProps) => ReactNode;
|
|
10
|
+
readonly bodyCell: (row: ListRowViewModel, pin: PinnedCellProps) => ReactNode;
|
|
11
|
+
readonly cardCheckbox: (row: ListRowViewModel) => ReactNode;
|
|
12
|
+
};
|
|
13
|
+
/** Row checkboxes, the selection bar and the run flow of a table with bulk actions. */
|
|
14
|
+
export declare function useBulkSelection({ bulk, rows, titleField, rowTestId, flush, }: {
|
|
15
|
+
readonly bulk: DataTableBulk | undefined;
|
|
16
|
+
readonly rows: readonly ListRowViewModel[];
|
|
17
|
+
readonly titleField: string | undefined;
|
|
18
|
+
readonly rowTestId: (row: ListRowViewModel) => string;
|
|
19
|
+
/** The table has no frame (scrollBody): the bar spans its full width. */
|
|
20
|
+
readonly flush: boolean;
|
|
21
|
+
}): BulkSelection;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { useBulkRun } from "../../../hooks/use-bulk-run.js";
|
|
4
|
+
import { useOptionalTranslation } from "../../../i18n.js";
|
|
5
|
+
import { cn } from "../../lib/cn.js";
|
|
6
|
+
import { Checkbox } from "../../ui/checkbox.js";
|
|
7
|
+
import { TableCell, TableHead } from "../../ui/table.js";
|
|
8
|
+
import { cellTitle } from "../data-table-cell.js";
|
|
9
|
+
import { BulkSelectionBar } from "./bulk-selection-bar.js";
|
|
10
|
+
import { EXPAND_TOGGLE_CELL_CLASS } from "./table-chrome.js";
|
|
11
|
+
import { useRowSelection } from "./use-row-selection.js";
|
|
12
|
+
const INACTIVE = {
|
|
13
|
+
active: false,
|
|
14
|
+
bar: null,
|
|
15
|
+
onKeyboardSelect: undefined,
|
|
16
|
+
headerCell: () => null,
|
|
17
|
+
bodyCell: () => null,
|
|
18
|
+
cardCheckbox: () => null,
|
|
19
|
+
};
|
|
20
|
+
const keyAsText = (key) => key;
|
|
21
|
+
// The checkbox sits inside a clickable row; its click must not open the row.
|
|
22
|
+
function stopRowClick(event) {
|
|
23
|
+
event.stopPropagation();
|
|
24
|
+
}
|
|
25
|
+
/** Row checkboxes, the selection bar and the run flow of a table with bulk actions. */
|
|
26
|
+
export function useBulkSelection({ bulk, rows, titleField, rowTestId, flush, }) {
|
|
27
|
+
const t = useOptionalTranslation() ?? keyAsText;
|
|
28
|
+
const selection = useRowSelection(rows);
|
|
29
|
+
const run = useBulkRun();
|
|
30
|
+
const [pendingAction, setPendingAction] = useState(undefined);
|
|
31
|
+
const [resultActionLabel, setResultActionLabel] = useState("");
|
|
32
|
+
if (bulk === undefined)
|
|
33
|
+
return INACTIVE;
|
|
34
|
+
const isRunning = run.state.phase === "running";
|
|
35
|
+
const reload = bulk.reload;
|
|
36
|
+
async function execute(action) {
|
|
37
|
+
setPendingAction(undefined);
|
|
38
|
+
setResultActionLabel(action.label);
|
|
39
|
+
const result = await run.start(action, selection.selectedRows);
|
|
40
|
+
// Failed rows stay selected for a retry; so do rows a cancel kept from running.
|
|
41
|
+
selection.retainOnly(new Set([...result.failedIds, ...result.notStartedIds]));
|
|
42
|
+
await reload();
|
|
43
|
+
}
|
|
44
|
+
function rowCheckbox(row) {
|
|
45
|
+
const checked = selection.isSelected(row.id);
|
|
46
|
+
const title = (titleField !== undefined ? cellTitle(row.values[titleField]) : undefined) ?? "";
|
|
47
|
+
return (_jsx(Checkbox, { checked: checked, disabled: isRunning || (!checked && selection.isFull), onCheckedChange: () => selection.toggle(row.id), onClick: stopRowClick, "aria-label": t("kumiko.list.bulk.select-row", { title }), "data-testid": `${rowTestId(row)}-select` }));
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
active: true,
|
|
51
|
+
bar: (_jsx(BulkSelectionBar, { flush: flush, actions: bulk.actions, selectedCount: selection.selectedRows.length, isFull: selection.isFull, runState: run.state, resultActionLabel: resultActionLabel, pendingAction: pendingAction, t: t, onRequest: (action) => {
|
|
52
|
+
if (action.confirmText !== undefined)
|
|
53
|
+
setPendingAction(action);
|
|
54
|
+
else
|
|
55
|
+
void execute(action);
|
|
56
|
+
}, onConfirm: (action) => void execute(action), onConfirmClose: () => setPendingAction(undefined), onCancel: run.cancel, onClear: selection.clear, onDismissResult: run.dismissResult })),
|
|
57
|
+
onKeyboardSelect: isRunning ? undefined : selection.toggle,
|
|
58
|
+
headerCell: (pin) => (_jsx(TableHead, { "data-testid": "column-select", className: cn(EXPAND_TOGGLE_CELL_CLASS, "text-center", pin.className), style: pin.style, children: _jsx(Checkbox, { checked: selection.allState === "all"
|
|
59
|
+
? true
|
|
60
|
+
: selection.allState === "some"
|
|
61
|
+
? "indeterminate"
|
|
62
|
+
: false, disabled: isRunning || rows.length === 0, onCheckedChange: selection.toggleAll, "aria-label": t("kumiko.list.bulk.select-all"), "data-testid": "select-all" }) })),
|
|
63
|
+
bodyCell: (row, pin) => (_jsx(TableCell, { "data-testid": `cell-${row.id}-select`, className: cn(EXPAND_TOGGLE_CELL_CLASS, "text-center", pin.className), style: pin.style, children: rowCheckbox(row) })),
|
|
64
|
+
cardCheckbox: (row) => (_jsx("div", { className: "flex size-11 shrink-0 items-center justify-center", children: rowCheckbox(row) })),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type CSSProperties } from "react";
|
|
2
|
+
import type { DataTableViewOptions } from "../../../data-table-view-types.ts";
|
|
3
|
+
import type { MeasuredColumnWidths } from "./use-measured-column-widths.ts";
|
|
4
|
+
export declare const EXPAND_COLUMN_KEY = "__expand";
|
|
5
|
+
export declare const SELECT_COLUMN_KEY = "__select";
|
|
6
|
+
export type PinnedCellProps = {
|
|
7
|
+
readonly style?: CSSProperties;
|
|
8
|
+
readonly className?: string;
|
|
9
|
+
};
|
|
10
|
+
export type PinnedHeaderCellProps = PinnedCellProps & {
|
|
11
|
+
readonly columnField?: string;
|
|
12
|
+
};
|
|
13
|
+
export type ColumnPins<TColumn> = {
|
|
14
|
+
readonly columns: readonly TColumn[];
|
|
15
|
+
readonly headerCell: (field: string) => PinnedHeaderCellProps;
|
|
16
|
+
readonly bodyCell: (field: string) => PinnedCellProps;
|
|
17
|
+
readonly actionsHeaderStyle: CSSProperties | undefined;
|
|
18
|
+
};
|
|
19
|
+
/** Reorders columns (left pins first, right pins last) and computes the sticky
|
|
20
|
+
* styles of pinned cells. Inactive: columns unchanged, no styles. */
|
|
21
|
+
export declare function useColumnPins<TColumn extends {
|
|
22
|
+
readonly field: string;
|
|
23
|
+
}>({ columns, view, isNarrow, measured, hasActionsColumn, hasExpandColumn, hasSelectColumn, fillsHeight, }: {
|
|
24
|
+
readonly columns: readonly TColumn[];
|
|
25
|
+
readonly view: DataTableViewOptions | undefined;
|
|
26
|
+
readonly isNarrow: boolean;
|
|
27
|
+
readonly measured: MeasuredColumnWidths | undefined;
|
|
28
|
+
readonly hasActionsColumn: boolean;
|
|
29
|
+
readonly hasExpandColumn: boolean;
|
|
30
|
+
readonly hasSelectColumn?: boolean;
|
|
31
|
+
readonly fillsHeight: boolean;
|
|
32
|
+
}): ColumnPins<TColumn>;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { cn } from "../../lib/cn.js";
|
|
3
|
+
import { isPinningActive } from "./column-layout-mode.js";
|
|
4
|
+
import { ROW_FOCUS_RING_CELL_CLASS } from "./use-row-keyboard-navigation.js";
|
|
5
|
+
export const EXPAND_COLUMN_KEY = "__expand";
|
|
6
|
+
export const SELECT_COLUMN_KEY = "__select";
|
|
7
|
+
// Header over pins over actions (10) over cells. Header z-index 30 also lifts
|
|
8
|
+
// the sticky scrollBody header, whose class selector would otherwise set 10.
|
|
9
|
+
const HEADER_Z_INDEX = 30;
|
|
10
|
+
const PINNED_HEADER_Z_INDEX = 40;
|
|
11
|
+
const PINNED_BODY_Z_INDEX = 20;
|
|
12
|
+
function pinOf(view, field) {
|
|
13
|
+
return view?.pins?.[field];
|
|
14
|
+
}
|
|
15
|
+
function placePins(columns, pinOfField, measured, leading, hasActionsColumn) {
|
|
16
|
+
const placements = new Map();
|
|
17
|
+
const widthOf = (field) => measured.fields[field] ?? 0;
|
|
18
|
+
const leftFields = columns.filter((c) => pinOfField(c.field) === "left").map((c) => c.field);
|
|
19
|
+
const rightFields = columns.filter((c) => pinOfField(c.field) === "right").map((c) => c.field);
|
|
20
|
+
let left = 0;
|
|
21
|
+
// Leading select and expand columns stick ahead of left pins so they stay with their row.
|
|
22
|
+
if (leftFields.length > 0 && leading.hasSelectColumn) {
|
|
23
|
+
placements.set(SELECT_COLUMN_KEY, { side: "left", offset: left, onInnerEdge: false });
|
|
24
|
+
left += measured.select;
|
|
25
|
+
}
|
|
26
|
+
if (leftFields.length > 0 && leading.hasExpandColumn) {
|
|
27
|
+
placements.set(EXPAND_COLUMN_KEY, { side: "left", offset: left, onInnerEdge: false });
|
|
28
|
+
left += measured.expand;
|
|
29
|
+
}
|
|
30
|
+
leftFields.forEach((field, index) => {
|
|
31
|
+
placements.set(field, {
|
|
32
|
+
side: "left",
|
|
33
|
+
offset: left,
|
|
34
|
+
onInnerEdge: index === leftFields.length - 1,
|
|
35
|
+
});
|
|
36
|
+
left += widthOf(field);
|
|
37
|
+
});
|
|
38
|
+
let right = hasActionsColumn ? measured.actions : 0;
|
|
39
|
+
for (let index = rightFields.length - 1; index >= 0; index--) {
|
|
40
|
+
const field = rightFields[index];
|
|
41
|
+
if (field === undefined)
|
|
42
|
+
continue;
|
|
43
|
+
placements.set(field, { side: "right", offset: right, onInnerEdge: index === 0 });
|
|
44
|
+
right += widthOf(field);
|
|
45
|
+
}
|
|
46
|
+
return placements;
|
|
47
|
+
}
|
|
48
|
+
function pinnedStyle(placement, part, fillsHeight) {
|
|
49
|
+
const edgeLine = placement.side === "left" ? "inset -1px 0 0" : "inset 1px 0 0";
|
|
50
|
+
const shadows = [];
|
|
51
|
+
if (placement.onInnerEdge)
|
|
52
|
+
shadows.push(`${edgeLine} var(--color-border)`);
|
|
53
|
+
if (part === "header" && fillsHeight)
|
|
54
|
+
shadows.push("inset 0 -1px 0 var(--color-border)");
|
|
55
|
+
return {
|
|
56
|
+
position: "sticky",
|
|
57
|
+
[placement.side]: placement.offset,
|
|
58
|
+
zIndex: part === "header" ? PINNED_HEADER_Z_INDEX : PINNED_BODY_Z_INDEX,
|
|
59
|
+
...(shadows.length > 0 && { boxShadow: shadows.join(", ") }),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function pinnedClassName(part, fillsHeight) {
|
|
63
|
+
if (part === "header")
|
|
64
|
+
return "bg-muted";
|
|
65
|
+
return cn(fillsHeight ? "bg-card" : "bg-background", ROW_FOCUS_RING_CELL_CLASS);
|
|
66
|
+
}
|
|
67
|
+
/** Reorders columns (left pins first, right pins last) and computes the sticky
|
|
68
|
+
* styles of pinned cells. Inactive: columns unchanged, no styles. */
|
|
69
|
+
export function useColumnPins({ columns, view, isNarrow, measured, hasActionsColumn, hasExpandColumn, hasSelectColumn = false, fillsHeight, }) {
|
|
70
|
+
const active = isPinningActive(view, isNarrow);
|
|
71
|
+
const pins = view?.pins;
|
|
72
|
+
const ordered = useMemo(() => {
|
|
73
|
+
if (!active)
|
|
74
|
+
return columns;
|
|
75
|
+
const pinFor = (column) => pins?.[column.field];
|
|
76
|
+
return [
|
|
77
|
+
...columns.filter((c) => pinFor(c) === "left"),
|
|
78
|
+
...columns.filter((c) => pinFor(c) === undefined),
|
|
79
|
+
...columns.filter((c) => pinFor(c) === "right"),
|
|
80
|
+
];
|
|
81
|
+
}, [active, columns, pins]);
|
|
82
|
+
return useMemo(() => {
|
|
83
|
+
const placements = active
|
|
84
|
+
? placePins(ordered, (field) => pinOf(view, field), measured ?? { fields: {}, select: 0, expand: 0, actions: 0 }, { hasSelectColumn, hasExpandColumn }, hasActionsColumn)
|
|
85
|
+
: new Map();
|
|
86
|
+
const cellProps = (field, part) => {
|
|
87
|
+
if (!active)
|
|
88
|
+
return {};
|
|
89
|
+
const placement = placements.get(field);
|
|
90
|
+
if (placement === undefined) {
|
|
91
|
+
return part === "header" ? { style: { zIndex: HEADER_Z_INDEX } } : {};
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
style: pinnedStyle(placement, part, fillsHeight),
|
|
95
|
+
className: pinnedClassName(part, fillsHeight),
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
return {
|
|
99
|
+
columns: ordered,
|
|
100
|
+
headerCell: (field) => ({
|
|
101
|
+
...cellProps(field, "header"),
|
|
102
|
+
...(measured !== undefined && { columnField: field }),
|
|
103
|
+
}),
|
|
104
|
+
bodyCell: (field) => cellProps(field, "body"),
|
|
105
|
+
actionsHeaderStyle: active ? { zIndex: HEADER_Z_INDEX } : undefined,
|
|
106
|
+
};
|
|
107
|
+
}, [
|
|
108
|
+
active,
|
|
109
|
+
ordered,
|
|
110
|
+
view,
|
|
111
|
+
measured,
|
|
112
|
+
hasSelectColumn,
|
|
113
|
+
hasExpandColumn,
|
|
114
|
+
hasActionsColumn,
|
|
115
|
+
fillsHeight,
|
|
116
|
+
]);
|
|
117
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type CSSProperties } from "react";
|
|
2
|
+
import type { DataTableViewOptions } from "../../../data-table-view-types.ts";
|
|
3
|
+
import { type MeasuredColumnWidths } from "./use-measured-column-widths.ts";
|
|
4
|
+
export type ColumnSizing = {
|
|
5
|
+
readonly widthOf: (field: string) => number;
|
|
6
|
+
readonly minWidthOf: (field: string) => number;
|
|
7
|
+
readonly tableStyle: CSSProperties;
|
|
8
|
+
/** Live width while a drag is in progress; nothing reaches the view state until `commit`. */
|
|
9
|
+
readonly setLiveWidth: (field: string, width: number) => void;
|
|
10
|
+
readonly commit: (field: string, width: number) => void;
|
|
11
|
+
};
|
|
12
|
+
/** Fixed-layout sizing for resizable columns; undefined when resizing is off. */
|
|
13
|
+
export declare function useColumnSizing({ columns, view, isNarrow, measured, hasExpandColumn, hasSelectColumn, }: {
|
|
14
|
+
readonly columns: readonly {
|
|
15
|
+
readonly field: string;
|
|
16
|
+
}[];
|
|
17
|
+
readonly view: DataTableViewOptions | undefined;
|
|
18
|
+
readonly isNarrow: boolean;
|
|
19
|
+
readonly measured: MeasuredColumnWidths | undefined;
|
|
20
|
+
readonly hasExpandColumn: boolean;
|
|
21
|
+
readonly hasSelectColumn?: boolean;
|
|
22
|
+
}): ColumnSizing | undefined;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { useCallback, useMemo, useState } from "react";
|
|
2
|
+
import { isResizingActive } from "./column-layout-mode.js";
|
|
3
|
+
import { EXPAND_COLUMN_WIDTH_PX, SELECT_COLUMN_WIDTH_PX, } from "./use-measured-column-widths.js";
|
|
4
|
+
/** Fixed-layout sizing for resizable columns; undefined when resizing is off. */
|
|
5
|
+
export function useColumnSizing({ columns, view, isNarrow, measured, hasExpandColumn, hasSelectColumn = false, }) {
|
|
6
|
+
const [live, setLive] = useState(null);
|
|
7
|
+
const active = isResizingActive(view, isNarrow);
|
|
8
|
+
const widths = view?.widths;
|
|
9
|
+
const minWidths = view?.minWidths;
|
|
10
|
+
const onWidthChange = view?.onWidthChange;
|
|
11
|
+
const commit = useCallback((field, width) => {
|
|
12
|
+
setLive(null);
|
|
13
|
+
onWidthChange?.(field, width);
|
|
14
|
+
}, [onWidthChange]);
|
|
15
|
+
return useMemo(() => {
|
|
16
|
+
if (!active || widths === undefined || minWidths === undefined)
|
|
17
|
+
return undefined;
|
|
18
|
+
const minWidthOf = (field) => minWidths[field] ?? 0;
|
|
19
|
+
const widthOf = (field) => live?.field === field ? live.width : (widths[field] ?? minWidthOf(field));
|
|
20
|
+
// The actions column keeps no width of its own: it absorbs the leftover space,
|
|
21
|
+
// so a dragged width holds exactly while the table is wider than its container.
|
|
22
|
+
const total = columns.reduce((sum, column) => sum + widthOf(column.field), 0) +
|
|
23
|
+
(hasExpandColumn ? EXPAND_COLUMN_WIDTH_PX : 0) +
|
|
24
|
+
(hasSelectColumn ? SELECT_COLUMN_WIDTH_PX : 0) +
|
|
25
|
+
(measured?.actions ?? 0);
|
|
26
|
+
return {
|
|
27
|
+
widthOf,
|
|
28
|
+
minWidthOf,
|
|
29
|
+
tableStyle: { tableLayout: "fixed", width: `max(100%, ${total}px)` },
|
|
30
|
+
setLiveWidth: (field, width) => setLive({ field, width }),
|
|
31
|
+
commit,
|
|
32
|
+
};
|
|
33
|
+
}, [
|
|
34
|
+
active,
|
|
35
|
+
widths,
|
|
36
|
+
minWidths,
|
|
37
|
+
live,
|
|
38
|
+
columns,
|
|
39
|
+
hasExpandColumn,
|
|
40
|
+
hasSelectColumn,
|
|
41
|
+
measured,
|
|
42
|
+
commit,
|
|
43
|
+
]);
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type Dispatch, type SetStateAction } from "react";
|
|
2
|
+
import type { ListColumnViewModel, ListRowViewModel } from "../../../headless/index.ts";
|
|
3
|
+
import { type DataTableProps, useOptionalLocale, useOptionalTranslation } from "../../../index.ts";
|
|
4
|
+
import { densityClasses } from "./density.ts";
|
|
5
|
+
import { buildDataTableItems } from "./group-band.tsx";
|
|
6
|
+
import { useBulkSelection } from "./use-bulk-selection.tsx";
|
|
7
|
+
import { type ColumnPins } from "./use-column-pins.ts";
|
|
8
|
+
import { useColumnSizing } from "./use-column-sizing.ts";
|
|
9
|
+
import { useMeasuredColumnWidths } from "./use-measured-column-widths.ts";
|
|
10
|
+
import { useRowKeyboardNavigation } from "./use-row-keyboard-navigation.ts";
|
|
11
|
+
type RowExpansion = {
|
|
12
|
+
readonly renderExpandedRow: NonNullable<DataTableProps["renderExpandedRow"]>;
|
|
13
|
+
readonly onToggleRowExpanded: NonNullable<DataTableProps["onToggleRowExpanded"]>;
|
|
14
|
+
};
|
|
15
|
+
export type DataTableModel = Omit<DataTableProps, "columns"> & {
|
|
16
|
+
readonly schemaColumns: readonly ListColumnViewModel[];
|
|
17
|
+
readonly columns: ColumnPins<ListColumnViewModel>["columns"];
|
|
18
|
+
readonly tableTranslate: ReturnType<typeof useOptionalTranslation>;
|
|
19
|
+
readonly tableLocale: ReturnType<typeof useOptionalLocale>;
|
|
20
|
+
readonly isNarrow: boolean;
|
|
21
|
+
readonly density: ReturnType<typeof densityClasses>;
|
|
22
|
+
readonly facetsOpenNarrow: boolean;
|
|
23
|
+
readonly setFacetsOpenNarrow: Dispatch<SetStateAction<boolean>>;
|
|
24
|
+
readonly menuActions: DataTableProps["rowActions"];
|
|
25
|
+
readonly tableActions: DataTableProps["rowActions"];
|
|
26
|
+
readonly rowClickLabel: string | undefined;
|
|
27
|
+
readonly rowOpener: (row: ListRowViewModel) => (() => void) | undefined;
|
|
28
|
+
readonly hasTableActions: boolean;
|
|
29
|
+
readonly isEmpty: boolean;
|
|
30
|
+
readonly rowTestId: (row: ListRowViewModel) => string;
|
|
31
|
+
readonly expansion: RowExpansion | undefined;
|
|
32
|
+
readonly fillsHeight: boolean;
|
|
33
|
+
readonly selection: ReturnType<typeof useBulkSelection>;
|
|
34
|
+
readonly headerRowRef: ReturnType<typeof useMeasuredColumnWidths>["headerRowRef"];
|
|
35
|
+
readonly pins: ColumnPins<ListColumnViewModel>;
|
|
36
|
+
readonly sizing: ReturnType<typeof useColumnSizing>;
|
|
37
|
+
readonly fullColSpan: number;
|
|
38
|
+
readonly expansionDomId: (row: ListRowViewModel) => string;
|
|
39
|
+
readonly tableItems: ReturnType<typeof buildDataTableItems>;
|
|
40
|
+
readonly keyboardRow: ReturnType<typeof useRowKeyboardNavigation>;
|
|
41
|
+
readonly columnOf: (field: string) => ListColumnViewModel | undefined;
|
|
42
|
+
};
|
|
43
|
+
export declare function useDataTableState(props: DataTableProps): DataTableModel;
|
|
44
|
+
export {};
|