@cosmicdrift/kumiko-renderer 0.413.0 → 0.414.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/action-form-support.js +4 -0
- package/dist/app/content-previews.d.ts +39 -0
- package/dist/app/content-previews.js +28 -0
- package/dist/app/entity-edit-screen.js +2 -5
- package/dist/app/entity-list-screen.js +30 -50
- package/dist/app/form-schema.d.ts +1 -0
- package/dist/app/form-schema.js +24 -0
- package/dist/app/list-sort-options.d.ts +4 -0
- package/dist/app/list-sort-options.js +11 -0
- package/dist/app/named-filter-facet.d.ts +17 -3
- package/dist/app/named-filter-facet.js +88 -5
- package/dist/app/projection-detail-body.d.ts +2 -4
- package/dist/app/projection-detail-body.js +7 -1
- package/dist/app/projection-detail-guidance-data.d.ts +7 -0
- package/dist/app/projection-detail-guidance-data.js +101 -0
- package/dist/app/projection-detail-guidance.d.ts +13 -0
- package/dist/app/projection-detail-guidance.js +197 -0
- package/dist/app/projection-detail-header-model.d.ts +1 -3
- package/dist/app/projection-detail-header-model.js +4 -8
- package/dist/app/projection-detail-header-region.d.ts +2 -1
- package/dist/app/projection-detail-header-region.js +63 -23
- package/dist/app/projection-detail-header.d.ts +6 -1
- package/dist/app/projection-detail-header.js +75 -18
- package/dist/app/projection-detail-states.d.ts +3 -3
- package/dist/app/projection-list-body.js +4 -2
- package/dist/app/projection-list-render.js +3 -1
- package/dist/app/projection-list-shim.d.ts +4 -1
- package/dist/app/projection-list-shim.js +35 -8
- package/dist/app/reference-link.d.ts +3 -2
- package/dist/app/reference-link.js +19 -4
- package/dist/app/row-actions.js +3 -3
- package/dist/app/screen-access.d.ts +4 -0
- package/dist/app/screen-access.js +19 -0
- package/dist/app/screen-shared.js +3 -1
- package/dist/app/unique-label-keys.d.ts +1 -0
- package/dist/app/unique-label-keys.js +9 -0
- package/dist/app/use-entity-list-payload.d.ts +25 -0
- package/dist/app/use-entity-list-payload.js +57 -0
- package/dist/app/use-entity-range-facets.js +2 -3
- package/dist/app/use-facet-counts.d.ts +5 -0
- package/dist/app/use-facet-counts.js +7 -0
- package/dist/app/use-list-summary-row.d.ts +10 -0
- package/dist/app/use-list-summary-row.js +33 -0
- package/dist/app/use-named-filter-queue.d.ts +20 -0
- package/dist/app/use-named-filter-queue.js +9 -0
- package/dist/app/use-projection-detail-actions.d.ts +4 -4
- package/dist/app/use-projection-detail-actions.js +30 -1
- package/dist/app/use-projection-list-data.d.ts +5 -0
- package/dist/app/use-projection-list-data.js +35 -6
- package/dist/app/use-projection-list-query.d.ts +2 -0
- package/dist/app/use-projection-list-query.js +29 -16
- package/dist/app/use-related-list-tab-counts.js +5 -1
- package/dist/app/use-row-decoration.d.ts +11 -0
- package/dist/app/use-row-decoration.js +55 -0
- package/dist/app/use-screen-list-rows.d.ts +4 -1
- package/dist/app/use-screen-list-rows.js +14 -5
- package/dist/app/use-screen-list-table.d.ts +3 -1
- package/dist/app/use-screen-list-table.js +10 -1
- package/dist/app/write-failed-error.d.ts +1 -0
- package/dist/app/write-failed-error.js +10 -0
- package/dist/compact-tap-classes.d.ts +1 -0
- package/dist/compact-tap-classes.js +3 -0
- package/dist/components/embedded-list-field.js +13 -12
- package/dist/components/form-pending-uploads.d.ts +8 -0
- package/dist/components/form-pending-uploads.js +27 -0
- package/dist/components/list-empty-state.d.ts +8 -1
- package/dist/components/list-empty-state.js +4 -1
- package/dist/components/list-group-page-bridges.d.ts +1 -1
- package/dist/components/list-group-page-bridges.js +2 -2
- package/dist/components/related-list-section.js +4 -22
- package/dist/components/render-edit-action-button.d.ts +3 -1
- package/dist/components/render-edit-action-button.js +5 -3
- package/dist/components/render-edit-form-actions.js +6 -3
- package/dist/components/render-edit-layout.js +2 -1
- package/dist/components/render-edit-render-model.d.ts +2 -2
- package/dist/components/render-edit-submit.js +2 -1
- package/dist/components/render-edit-types.d.ts +4 -2
- package/dist/components/render-edit.js +3 -1
- package/dist/components/render-list-hint-columns.d.ts +8 -0
- package/dist/components/render-list-hint-columns.js +77 -0
- package/dist/components/render-list-reference-columns.js +4 -2
- package/dist/components/render-list-row-tone.d.ts +3 -0
- package/dist/components/render-list-row-tone.js +10 -0
- package/dist/components/render-list-table-props.d.ts +9 -1
- package/dist/components/render-list-table-props.js +4 -1
- package/dist/components/render-list-toolbar-action.d.ts +1 -2
- package/dist/components/render-list-toolbar-model.d.ts +3 -0
- package/dist/components/render-list-toolbar-model.js +21 -6
- package/dist/components/render-list-toolbar.d.ts +3 -2
- package/dist/components/render-list-toolbar.js +8 -6
- package/dist/components/render-list-types.d.ts +6 -1
- package/dist/components/render-list.js +26 -7
- package/dist/components/use-render-edit-controlled-sync.js +5 -4
- package/dist/components/use-render-edit-draft-save.js +7 -9
- package/dist/components/use-render-edit-schema.d.ts +3 -0
- package/dist/components/use-render-edit-schema.js +15 -0
- package/dist/components/use-render-edit-state.d.ts +4 -0
- package/dist/components/use-render-edit-state.js +9 -1
- package/dist/components/use-render-edit-steps.js +2 -3
- package/dist/components/use-render-list-columns.d.ts +3 -1
- package/dist/components/use-render-list-columns.js +22 -10
- package/dist/context/screen-focus-context.d.ts +14 -0
- package/dist/context/screen-focus-context.js +28 -0
- package/dist/data-table-facet-types.d.ts +2 -0
- package/dist/data-table-view-types.d.ts +20 -1
- package/dist/headless/form/form-controller.js +3 -1
- package/dist/headless/form/zod-bridge.d.ts +7 -1
- package/dist/headless/form/zod-bridge.js +10 -0
- package/dist/headless/index.d.ts +2 -1
- package/dist/headless/index.js +1 -0
- package/dist/headless/pwa-service-worker-meta.d.ts +1 -0
- package/dist/headless/pwa-service-worker-meta.js +3 -0
- package/dist/headless/view-model/index.d.ts +1 -1
- package/dist/headless/view-model/list-file-display.js +3 -2
- package/dist/headless/view-model/list.js +16 -0
- package/dist/headless/view-model/types.d.ts +33 -0
- package/dist/hooks/list-column-layout.js +2 -1
- package/dist/hooks/list-server-groups.js +14 -1
- package/dist/hooks/list-state-schema.d.ts +1 -0
- package/dist/hooks/list-state-schema.js +9 -1
- package/dist/hooks/use-debounced-value.d.ts +1 -0
- package/dist/hooks/use-debounced-value.js +11 -0
- package/dist/hooks/use-list-aggregates.d.ts +5 -1
- package/dist/hooks/use-list-aggregates.js +9 -5
- package/dist/hooks/use-list-table.d.ts +2 -1
- package/dist/hooks/use-list-table.js +3 -9
- package/dist/hooks/use-list-url-state.d.ts +2 -0
- package/dist/hooks/use-list-url-state.js +12 -4
- package/dist/hooks/use-list-view-state.js +23 -3
- package/dist/hooks/use-reference-lookup.js +7 -2
- package/dist/hooks/use-remembered-list-params.d.ts +6 -2
- package/dist/hooks/use-remembered-list-params.js +18 -3
- package/dist/hooks/use-store.js +0 -1
- package/dist/i18n-defaults.js +37 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +5 -1
- package/dist/live/dispatcher-live.js +2 -0
- package/dist/metric-types.d.ts +2 -0
- package/dist/primitives-record-guidance.d.ts +53 -0
- package/dist/primitives-record-guidance.js +1 -0
- package/dist/primitives.d.ts +41 -31
- package/dist/server-clock.d.ts +6 -0
- package/dist/server-clock.js +20 -0
- package/dist/session/session-ended.d.ts +1 -0
- package/dist/session/session-ended.js +2 -2
- package/dist/status-tone.d.ts +1 -0
- package/dist/status-tone.js +5 -0
- package/dist/web/app/browser-locale.js +1 -1
- package/dist/web/app/client-plugin.d.ts +6 -1
- package/dist/web/app/create-app.d.ts +2 -1
- package/dist/web/app/create-app.js +15 -5
- package/dist/web/app/dashboard-body.js +25 -11
- package/dist/web/app/dashboard-header.d.ts +2 -1
- package/dist/web/app/dashboard-header.js +19 -7
- package/dist/web/app/dashboard-list-panel.d.ts +12 -0
- package/dist/web/app/dashboard-list-panel.js +149 -0
- package/dist/web/app/dashboard-narrow-gate.d.ts +6 -0
- package/dist/web/app/dashboard-narrow-gate.js +6 -0
- package/dist/web/app/dashboard-narrow-order.d.ts +3 -0
- package/dist/web/app/dashboard-narrow-order.js +6 -0
- package/dist/web/app/dashboard-navigation-link.d.ts +12 -0
- package/dist/web/app/dashboard-navigation-link.js +21 -0
- package/dist/web/app/dashboard-panels.d.ts +6 -23
- package/dist/web/app/dashboard-panels.js +53 -123
- package/dist/web/app/dashboard-reference-list-table.d.ts +5 -1
- package/dist/web/app/dashboard-reference-list-table.js +12 -4
- package/dist/web/app/dashboard-shared.d.ts +23 -7
- package/dist/web/app/dashboard-shared.js +44 -17
- package/dist/web/app/dashboard-stat-group-panel.d.ts +13 -0
- package/dist/web/app/dashboard-stat-group-panel.js +67 -0
- package/dist/web/app/dashboard-text-panel.d.ts +12 -0
- package/dist/web/app/dashboard-text-panel.js +163 -0
- package/dist/web/app/dashboard-text.d.ts +2 -0
- package/dist/web/app/dashboard-text.js +1 -1
- package/dist/web/app/dashboard-visibility.js +1 -1
- package/dist/web/app/relative-time.js +2 -1
- package/dist/web/editor/editor-footer.d.ts +28 -0
- package/dist/web/editor/editor-footer.js +23 -0
- package/dist/web/editor/editor-frame.d.ts +23 -0
- package/dist/web/editor/editor-frame.js +24 -0
- package/dist/web/editor/editor-header.d.ts +36 -0
- package/dist/web/editor/editor-header.js +30 -0
- package/dist/web/editor/editor-rail.d.ts +32 -0
- package/dist/web/editor/editor-rail.js +37 -0
- package/dist/web/editor/editor-workbench.d.ts +34 -0
- package/dist/web/editor/editor-workbench.js +19 -0
- package/dist/web/editor/index.d.ts +6 -0
- package/dist/web/editor/index.js +6 -0
- package/dist/web/editor/relative-when.d.ts +1 -0
- package/dist/web/editor/relative-when.js +18 -0
- package/dist/web/index.d.ts +7 -1
- package/dist/web/index.js +5 -1
- package/dist/web/layout/default-app-shell.js +6 -4
- package/dist/web/layout/focus-aware-sidebar.d.ts +4 -7
- package/dist/web/layout/focus-aware-sidebar.js +5 -7
- package/dist/web/layout/header-action-pinned.d.ts +8 -0
- package/dist/web/layout/header-action-pinned.js +25 -0
- package/dist/web/layout/nav-collapse-state.d.ts +5 -0
- package/dist/web/layout/nav-collapse-state.js +66 -0
- package/dist/web/layout/nav-tree.js +25 -5
- package/dist/web/layout/page-header-slot.d.ts +2 -0
- package/dist/web/layout/page-header-slot.js +4 -0
- package/dist/web/layout/screen-focus.d.ts +8 -0
- package/dist/web/layout/screen-focus.js +42 -0
- package/dist/web/layout/shell-focus.d.ts +6 -5
- package/dist/web/layout/shell-focus.js +12 -9
- package/dist/web/layout/shell-header.js +38 -10
- package/dist/web/layout/sidebar-open-state.d.ts +6 -0
- package/dist/web/layout/sidebar-open-state.js +28 -0
- package/dist/web/layout/uniform-bar-controls.d.ts +2 -2
- package/dist/web/layout/uniform-bar-controls.js +4 -3
- package/dist/web/layout/use-in-app-inbox.js +8 -1
- package/dist/web/layout/workspace-shell.js +6 -4
- package/dist/web/lib/upload-file-ref.d.ts +2 -2
- package/dist/web/lib/upload-file-ref.js +4 -9
- package/dist/web/presence/use-presence.js +7 -2
- package/dist/web/primitives/banner.d.ts +1 -1
- package/dist/web/primitives/banner.js +14 -6
- package/dist/web/primitives/calendar-day-picker.js +24 -5
- package/dist/web/primitives/card.js +1 -1
- package/dist/web/primitives/code-input.js +6 -1
- package/dist/web/primitives/data-table/actions-column.d.ts +1 -0
- package/dist/web/primitives/data-table/actions-column.js +4 -2
- package/dist/web/primitives/data-table/card-body.d.ts +5 -0
- package/dist/web/primitives/data-table/card-body.js +47 -5
- package/dist/web/primitives/data-table/card-frame.d.ts +8 -0
- package/dist/web/primitives/data-table/card-frame.js +9 -0
- package/dist/web/primitives/data-table/card-row.js +40 -7
- package/dist/web/primitives/data-table/card-sort-select.d.ts +6 -2
- package/dist/web/primitives/data-table/card-sort-select.js +10 -7
- package/dist/web/primitives/data-table/card-view.js +12 -2
- package/dist/web/primitives/data-table/column-picker-section.js +9 -2
- package/dist/web/primitives/data-table/column-resize-handle.js +3 -4
- package/dist/web/primitives/data-table/column-role.d.ts +1 -0
- package/dist/web/primitives/data-table/column-role.js +1 -0
- package/dist/web/primitives/data-table/data-cell-props.d.ts +5 -0
- package/dist/web/primitives/data-table/data-cell-props.js +5 -0
- package/dist/web/primitives/data-table/density.js +1 -0
- package/dist/web/primitives/data-table/facet-cluster.d.ts +2 -1
- package/dist/web/primitives/data-table/facet-cluster.js +2 -2
- package/dist/web/primitives/data-table/group-band.js +4 -0
- package/dist/web/primitives/data-table/hint-cell.d.ts +16 -0
- package/dist/web/primitives/data-table/hint-cell.js +74 -0
- package/dist/web/primitives/data-table/hint-column-width.d.ts +3 -0
- package/dist/web/primitives/data-table/hint-column-width.js +11 -0
- package/dist/web/primitives/data-table/measure-value.js +2 -3
- package/dist/web/primitives/data-table/row-action-column.d.ts +3 -0
- package/dist/web/primitives/data-table/row-action-column.js +4 -0
- package/dist/web/primitives/data-table/sort-options-select.d.ts +22 -0
- package/dist/web/primitives/data-table/sort-options-select.js +46 -0
- package/dist/web/primitives/data-table/sortable-header.d.ts +3 -1
- package/dist/web/primitives/data-table/sortable-header.js +5 -3
- package/dist/web/primitives/data-table/table-body.d.ts +1 -1
- package/dist/web/primitives/data-table/table-body.js +5 -3
- package/dist/web/primitives/data-table/table-chrome.js +3 -1
- package/dist/web/primitives/data-table/table-content.js +10 -5
- package/dist/web/primitives/data-table/table-data-cell.js +9 -3
- package/dist/web/primitives/data-table/table-header-row.js +5 -2
- package/dist/web/primitives/data-table/table-view.js +17 -3
- package/dist/web/primitives/data-table/toolbar-end-cluster.js +1 -1
- package/dist/web/primitives/data-table/toolbar.js +31 -3
- package/dist/web/primitives/data-table/totals-footer.d.ts +20 -0
- package/dist/web/primitives/data-table/totals-footer.js +40 -9
- package/dist/web/primitives/data-table/use-bulk-selection.js +2 -1
- package/dist/web/primitives/data-table/use-column-pins.js +4 -0
- package/dist/web/primitives/data-table/use-data-table-state.d.ts +1 -0
- package/dist/web/primitives/data-table/use-data-table-state.js +9 -5
- package/dist/web/primitives/data-table/use-measured-column-widths.js +5 -4
- package/dist/web/primitives/data-table/use-row-selection.js +22 -11
- package/dist/web/primitives/data-table/view-menu.js +7 -1
- package/dist/web/primitives/data-table-cell.d.ts +21 -2
- package/dist/web/primitives/data-table-cell.js +96 -19
- package/dist/web/primitives/embedded-file-cell.js +10 -6
- package/dist/web/primitives/embedded-list-cards.js +3 -4
- package/dist/web/primitives/facet-filter.d.ts +4 -2
- package/dist/web/primitives/facet-filter.js +26 -3
- package/dist/web/primitives/facet-search-filter.js +1 -1
- package/dist/web/primitives/file-thumbnail.d.ts +6 -2
- package/dist/web/primitives/file-thumbnail.js +13 -6
- package/dist/web/primitives/file-upload.js +15 -11
- package/dist/web/primitives/file-view-action.d.ts +6 -0
- package/dist/web/primitives/file-view-action.js +19 -0
- package/dist/web/primitives/files-dropzone.js +18 -4
- package/dist/web/primitives/form-footer-parts.d.ts +0 -1
- package/dist/web/primitives/form.js +0 -1
- package/dist/web/primitives/hint-reason-row.d.ts +32 -0
- package/dist/web/primitives/hint-reason-row.js +45 -0
- package/dist/web/primitives/index.js +6 -0
- package/dist/web/primitives/layout-elements.d.ts +1 -1
- package/dist/web/primitives/layout-elements.js +2 -2
- package/dist/web/primitives/metric.js +8 -6
- package/dist/web/primitives/page-header.d.ts +1 -1
- package/dist/web/primitives/page-header.js +8 -1
- package/dist/web/primitives/pager.js +29 -18
- package/dist/web/primitives/reason-box.d.ts +20 -0
- package/dist/web/primitives/reason-box.js +13 -0
- package/dist/web/primitives/record-breadcrumb.d.ts +3 -0
- package/dist/web/primitives/record-breadcrumb.js +11 -0
- package/dist/web/primitives/record-steps.d.ts +3 -0
- package/dist/web/primitives/record-steps.js +45 -0
- package/dist/web/primitives/record-summary.d.ts +3 -0
- package/dist/web/primitives/record-summary.js +18 -0
- package/dist/web/primitives/row-actions.d.ts +3 -1
- package/dist/web/primitives/row-actions.js +14 -5
- package/dist/web/primitives/segmented-select.js +5 -7
- package/dist/web/pwa/pwa-support.d.ts +4 -0
- package/dist/web/pwa/pwa-support.js +113 -0
- package/dist/web/sse/live-events.js +2 -2
- package/dist/web/tokens.js +0 -3
- package/dist/web/widgets/chart-parts.d.ts +7 -1
- package/dist/web/widgets/chart-parts.js +10 -4
- package/dist/web/widgets/collapsible-section.js +1 -1
- package/dist/web/widgets/dashboard-list-cards.d.ts +17 -0
- package/dist/web/widgets/dashboard-list-cards.js +54 -0
- package/dist/web/widgets/dashboard-list.d.ts +37 -5
- package/dist/web/widgets/dashboard-list.js +95 -20
- package/dist/web/widgets/drawer-sizing.js +1 -1
- package/dist/web/widgets/floating-panel.js +4 -2
- package/dist/web/widgets/index.d.ts +2 -0
- package/dist/web/widgets/index.js +2 -0
- package/dist/web/widgets/infinity-list.js +18 -11
- package/dist/web/widgets/preview-width-frame.d.ts +7 -0
- package/dist/web/widgets/preview-width-frame.js +10 -0
- package/dist/web/widgets/section-card.d.ts +1 -1
- package/dist/web/widgets/stacked-area-chrome.js +3 -3
- package/dist/web/widgets/stacked-area-tooltip.js +2 -10
- package/dist/web/widgets/stat-box-cell.d.ts +19 -0
- package/dist/web/widgets/stat-box-cell.js +10 -0
- package/dist/web/widgets/stat.d.ts +10 -1
- package/dist/web/widgets/stat.js +14 -5
- package/dist/web/widgets/status-badge.d.ts +7 -5
- package/dist/web/widgets/status-badge.js +2 -2
- package/dist/web/widgets/step-bar.d.ts +1 -1
- package/dist/web/widgets/step-bar.js +37 -7
- package/dist/web/widgets/upload-zone.d.ts +8 -1
- package/dist/web/widgets/upload-zone.js +13 -3
- package/package.json +5 -5
- package/src/changes.json +223 -0
- package/src/web/styles.css +9 -0
|
@@ -4,5 +4,10 @@ export function columnCellPresentationProps(col) {
|
|
|
4
4
|
...(col.optionLabels !== undefined && { optionLabels: col.optionLabels }),
|
|
5
5
|
...(col.optionTones !== undefined && { optionTones: col.optionTones }),
|
|
6
6
|
...(col.grouping !== undefined && { grouping: col.grouping }),
|
|
7
|
+
...(col.hint !== undefined && { hint: col.hint }),
|
|
8
|
+
...(col.display !== undefined && { display: col.display }),
|
|
9
|
+
...(col.badgeToneField !== undefined && { badgeToneField: col.badgeToneField }),
|
|
10
|
+
...(col.badgeDot !== undefined && { badgeDot: col.badgeDot }),
|
|
11
|
+
...(col.emptyPlaceholder !== undefined && { emptyPlaceholder: col.emptyPlaceholder }),
|
|
7
12
|
};
|
|
8
13
|
}
|
|
@@ -3,6 +3,7 @@ const NO_DENSITY_CLASSES = { row: "", cell: "", header: "", card: "" };
|
|
|
3
3
|
const FILL_EDGE_INSET = " first:pl-6! last:pr-6!";
|
|
4
4
|
const DENSITY_CLASSES = {
|
|
5
5
|
comfortable: NO_DENSITY_CLASSES,
|
|
6
|
+
relaxed: { row: "", cell: "sm:py-3!", header: "", card: "" },
|
|
6
7
|
compact: { row: "h-8", cell: "p-1!", header: "px-1!", card: "min-h-14 py-2" },
|
|
7
8
|
};
|
|
8
9
|
/** Comfortable (and a table without `view`) adds no class at all, so the markup stays as it was. */
|
|
@@ -2,7 +2,8 @@ import type { ReactNode } from "react";
|
|
|
2
2
|
import { type DataTableProps } from "../../../index.ts";
|
|
3
3
|
type FacetClusterProps = Pick<DataTableProps, "filterFacets" | "filterValues" | "onFilterChange" | "onFilterReset" | "dateRangeFacets" | "onDateRangeChange" | "rangeFacets" | "onRangeChange" | "resetAll" | "notice"> & {
|
|
4
4
|
readonly dense: boolean;
|
|
5
|
+
readonly pills: boolean;
|
|
5
6
|
};
|
|
6
7
|
/** The toolbar's filter controls; undefined when the list has none. */
|
|
7
|
-
export declare function buildFacetCluster({ filterFacets, filterValues, onFilterChange, onFilterReset, dateRangeFacets, onDateRangeChange, rangeFacets, onRangeChange, resetAll, notice, dense, }: FacetClusterProps): ReactNode | undefined;
|
|
8
|
+
export declare function buildFacetCluster({ filterFacets, filterValues, onFilterChange, onFilterReset, dateRangeFacets, onDateRangeChange, rangeFacets, onRangeChange, resetAll, notice, dense, pills, }: FacetClusterProps): ReactNode | undefined;
|
|
8
9
|
export {};
|
|
@@ -17,7 +17,7 @@ function FacetResetButton({ onReset }) {
|
|
|
17
17
|
return (_jsxs(UiButton, { variant: "ghost", size: "sm", className: "h-9 px-2", onClick: onReset, "data-testid": "facet-reset", children: [translate?.("kumiko.list.filter.reset") ?? "Reset", _jsx(X, {})] }));
|
|
18
18
|
}
|
|
19
19
|
/** The toolbar's filter controls; undefined when the list has none. */
|
|
20
|
-
export function buildFacetCluster({ filterFacets, filterValues, onFilterChange, onFilterReset, dateRangeFacets, onDateRangeChange, rangeFacets, onRangeChange, resetAll, notice, dense, }) {
|
|
20
|
+
export function buildFacetCluster({ filterFacets, filterValues, onFilterChange, onFilterReset, dateRangeFacets, onDateRangeChange, rangeFacets, onRangeChange, resetAll, notice, dense, pills, }) {
|
|
21
21
|
const hasFacets = filterFacets !== undefined && filterFacets.length > 0 && onFilterChange !== undefined;
|
|
22
22
|
const hasDateRangeFacets = dateRangeFacets !== undefined && dateRangeFacets.length > 0 && onDateRangeChange !== undefined;
|
|
23
23
|
const hasRangeFacets = rangeFacets !== undefined && rangeFacets.length > 0 && onRangeChange !== undefined;
|
|
@@ -31,7 +31,7 @@ export function buildFacetCluster({ filterFacets, filterValues, onFilterChange,
|
|
|
31
31
|
return undefined;
|
|
32
32
|
}
|
|
33
33
|
return (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [hasFacets &&
|
|
34
|
-
filterFacets.map((facet) => (_jsx(FacetFilter, { facet: facet, selected: filterValues?.[facet.field] ?? [], onChange: onFilterChange, dense: dense }, facet.field))), hasDateRangeFacets &&
|
|
34
|
+
filterFacets.map((facet) => (_jsx(FacetFilter, { facet: facet, selected: filterValues?.[facet.field] ?? [], onChange: onFilterChange, dense: dense, pill: pills }, facet.field))), hasDateRangeFacets &&
|
|
35
35
|
dateRangeFacets.map((facet) => (_jsx(DateRangeFacetFilter, { facet: facet, onChange: onDateRangeChange }, facet.field))), hasRangeFacets &&
|
|
36
36
|
rangeFacets.map((facet) => (_jsx(NumberRangeFacetFilter, { facet: facet, onChange: onRangeChange }, facet.field))), resetAll === undefined && hasActiveFilters && onFilterReset !== undefined && (_jsx(FacetResetButton, { onReset: onFilterReset })), showsResetAll && _jsx(ResetAllButton, { onReset: resetAll.onReset }), notice !== undefined && _jsx(ListNotice, { notice: notice })] }));
|
|
37
37
|
}
|
|
@@ -49,5 +49,9 @@ export function GroupBand({ item, columnOf, }) {
|
|
|
49
49
|
return (_jsx(ServerGroupHeader, { group: item.group, groupColumn: columnOf(item.owner.field), columnOf: columnOf, onToggle: item.owner.onToggle, onVisible: item.owner.onHeaderVisible }));
|
|
50
50
|
case "groupMore":
|
|
51
51
|
return _jsx(GroupLoadMore, { item: item });
|
|
52
|
+
default: {
|
|
53
|
+
const exhaustiveCheck = item;
|
|
54
|
+
return exhaustiveCheck;
|
|
55
|
+
}
|
|
52
56
|
}
|
|
53
57
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SelectOptionTone } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import type { ListColumnHintViewModel } from "../../../headless/index.ts";
|
|
4
|
+
export declare const HINT_TONE_TEXT_CLASS: Readonly<Record<SelectOptionTone, string>>;
|
|
5
|
+
/** Tone `neutral` dims the sentence like an empty label (muted, not bold); `plainSentence` opts out. */
|
|
6
|
+
export declare function isDimmedHintSentence(tone: SelectOptionTone | undefined, plainSentence: boolean | undefined): boolean;
|
|
7
|
+
export declare const DIMMED_HINT_SENTENCE_CLASS = "font-normal text-muted-foreground";
|
|
8
|
+
/** "To do" cell: an emphasized sentence in the row tone with an optional muted second line. */
|
|
9
|
+
export declare function HintCell({ value, row, hint, onOpen, leading, }: {
|
|
10
|
+
readonly value: unknown;
|
|
11
|
+
readonly row: Readonly<Record<string, unknown>>;
|
|
12
|
+
readonly hint: ListColumnHintViewModel;
|
|
13
|
+
/** Drawn in front of the sentence on its line (a badge or tone dot); the detail line starts below it, at the left edge. */
|
|
14
|
+
readonly leading?: ReactNode;
|
|
15
|
+
readonly onOpen?: () => void;
|
|
16
|
+
}): ReactNode;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId, useState } from "react";
|
|
3
|
+
import { isSelectOptionTone } from "../../../status-tone.js";
|
|
4
|
+
import { cn } from "../../lib/cn.js";
|
|
5
|
+
import { hintReasonOf, nonEmptyText, useHintReasonRowControl } from "../hint-reason-row.js";
|
|
6
|
+
import { ReasonBox, ReasonInfoButton } from "../reason-box.js";
|
|
7
|
+
export const HINT_TONE_TEXT_CLASS = {
|
|
8
|
+
bad: "text-status-bad",
|
|
9
|
+
warn: "text-status-warn",
|
|
10
|
+
critical: "text-status-critical",
|
|
11
|
+
ok: "text-status-ok",
|
|
12
|
+
accent: "text-primary",
|
|
13
|
+
neutral: "",
|
|
14
|
+
};
|
|
15
|
+
/** Tone `neutral` dims the sentence like an empty label (muted, not bold); `plainSentence` opts out. */
|
|
16
|
+
export function isDimmedHintSentence(tone, plainSentence) {
|
|
17
|
+
return tone === "neutral" && plainSentence !== true;
|
|
18
|
+
}
|
|
19
|
+
export const DIMMED_HINT_SENTENCE_CLASS = "font-normal text-muted-foreground";
|
|
20
|
+
const OPEN_SENTENCE_CLASS = "min-w-0 cursor-pointer bg-transparent p-0 text-left font-medium hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring";
|
|
21
|
+
function SentenceText({ text, className, onOpen, }) {
|
|
22
|
+
if (onOpen === undefined)
|
|
23
|
+
return _jsx("span", { className: className, children: text });
|
|
24
|
+
return (_jsx("button", { type: "button", className: cn(OPEN_SENTENCE_CLASS, className), onClick: (event) => {
|
|
25
|
+
event.stopPropagation();
|
|
26
|
+
onOpen();
|
|
27
|
+
}, onKeyDown: (event) => {
|
|
28
|
+
if (event.key !== "Enter")
|
|
29
|
+
return;
|
|
30
|
+
event.preventDefault();
|
|
31
|
+
event.stopPropagation();
|
|
32
|
+
onOpen();
|
|
33
|
+
}, children: text }));
|
|
34
|
+
}
|
|
35
|
+
// Without a sentence the empty label is the only element of the first cell, so it must stay
|
|
36
|
+
// the keyboard opener of a clickable row.
|
|
37
|
+
function EmptyHint({ label, onOpen, }) {
|
|
38
|
+
if (onOpen === undefined) {
|
|
39
|
+
return (_jsx("span", { "data-hint-empty": "true", className: "text-muted-foreground", children: label }));
|
|
40
|
+
}
|
|
41
|
+
return (_jsx("button", { type: "button", "data-hint-empty": "true", className: cn(OPEN_SENTENCE_CLASS, DIMMED_HINT_SENTENCE_CLASS), onClick: (event) => {
|
|
42
|
+
event.stopPropagation();
|
|
43
|
+
onOpen();
|
|
44
|
+
}, children: label }));
|
|
45
|
+
}
|
|
46
|
+
function useHintReason(hint, row) {
|
|
47
|
+
const [ownOpen, setOwnOpen] = useState(false);
|
|
48
|
+
const ownBoxId = useId();
|
|
49
|
+
const rowReason = useHintReasonRowControl(hint);
|
|
50
|
+
return {
|
|
51
|
+
reason: hintReasonOf(hint, row),
|
|
52
|
+
reasonOpen: rowReason?.open ?? ownOpen,
|
|
53
|
+
toggleReason: rowReason?.onToggle ?? (() => setOwnOpen((open) => !open)),
|
|
54
|
+
boxInRow: rowReason !== undefined,
|
|
55
|
+
boxId: rowReason?.boxId ?? ownBoxId,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function hintSentenceClass(tone, plainSentence) {
|
|
59
|
+
if (isDimmedHintSentence(tone, plainSentence))
|
|
60
|
+
return DIMMED_HINT_SENTENCE_CLASS;
|
|
61
|
+
return cn("font-medium", plainSentence !== true && tone !== undefined && HINT_TONE_TEXT_CLASS[tone]);
|
|
62
|
+
}
|
|
63
|
+
/** "To do" cell: an emphasized sentence in the row tone with an optional muted second line. */
|
|
64
|
+
export function HintCell({ value, row, hint, onOpen, leading, }) {
|
|
65
|
+
const { reason, reasonOpen, toggleReason, boxInRow, boxId } = useHintReason(hint, row);
|
|
66
|
+
const sentence = nonEmptyText(value);
|
|
67
|
+
if (sentence === undefined)
|
|
68
|
+
return _jsx(EmptyHint, { label: hint.emptyLabel, onOpen: onOpen });
|
|
69
|
+
const toneValue = hint.toneField === undefined ? undefined : row[hint.toneField];
|
|
70
|
+
const tone = isSelectOptionTone(toneValue) ? toneValue : undefined;
|
|
71
|
+
const detail = hint.detailField === undefined ? undefined : nonEmptyText(row[hint.detailField]);
|
|
72
|
+
const sentenceClass = hintSentenceClass(tone, hint.plainSentence);
|
|
73
|
+
return (_jsxs("span", { "data-hint-tone": tone, className: "flex min-w-0 flex-col gap-0.5", children: [_jsxs("span", { className: "flex items-start gap-2", children: [leading !== undefined && (_jsx("span", { className: "flex h-[1lh] shrink-0 items-center", children: leading })), _jsx(SentenceText, { text: sentence, className: sentenceClass, onOpen: onOpen }), reason !== undefined && (_jsx(ReasonInfoButton, { label: hint.reasonLabel, open: reasonOpen, onToggle: toggleReason, controls: boxId, "data-hint-reason-toggle": "true" }))] }), detail !== undefined && _jsx("small", { className: "text-xs text-muted-foreground", children: detail }), reason !== undefined && reasonOpen && !boxInRow && (_jsx(ReasonBox, { id: boxId, "data-hint-reason": "true", ...(reason.title !== undefined && { title: reason.title }), children: reason.text }))] }));
|
|
74
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// A hint column states its width itself; the resizing layout already owns widths through <col>.
|
|
2
|
+
export function hintColumnWidthStyle(col, resizing) {
|
|
3
|
+
if (resizing || col.hint === undefined)
|
|
4
|
+
return undefined;
|
|
5
|
+
if (col.width === undefined && col.minWidth === undefined)
|
|
6
|
+
return undefined;
|
|
7
|
+
return {
|
|
8
|
+
...(col.width !== undefined && { width: col.width }),
|
|
9
|
+
...(col.minWidth !== undefined && { minWidth: col.minWidth }),
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { isListAggregateCurrencyAmounts } from "@cosmicdrift/kumiko-types/list-aggregate-types";
|
|
3
|
+
import { toMajorUnits } from "@cosmicdrift/kumiko-types/minor-units";
|
|
3
4
|
import { useOptionalLocale, useOptionalTranslation } from "../../../index.js";
|
|
4
5
|
import { DataTableCell } from "../data-table-cell.js";
|
|
5
|
-
// Money measures arrive in the storage scale (minor units, ×100), one entry per currency.
|
|
6
|
-
const MONEY_STORAGE_SCALE = 100;
|
|
7
6
|
const NO_ROW = {};
|
|
8
7
|
function cellTypeOf(measure, column) {
|
|
9
8
|
return measure.kind === "count" ? "number" : (column?.type ?? "number");
|
|
@@ -24,5 +23,5 @@ export function MeasureValue({ measure, column, }) {
|
|
|
24
23
|
const { value } = measure;
|
|
25
24
|
if (!isListAggregateCurrencyAmounts(value))
|
|
26
25
|
return cell(value, measure.kind);
|
|
27
|
-
return (_jsx("span", { className: "inline-flex flex-col items-end", children: value.map((entry) => cell({ amount: entry.value
|
|
26
|
+
return (_jsx("span", { className: "inline-flex flex-col items-end", children: value.map((entry) => cell({ amount: toMajorUnits(entry.value), currency: entry.currency }, entry.currency)) }));
|
|
28
27
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { DataTableProps, DataTableSort } from "../../../index.ts";
|
|
3
|
+
import type { DataTableModel } from "./use-data-table-state.ts";
|
|
4
|
+
type SortOptions = NonNullable<DataTableProps["sortOptions"]>;
|
|
5
|
+
export declare function sortOptionValue(option: DataTableSort): string;
|
|
6
|
+
export declare function activeSortOption(options: SortOptions, sort: DataTableSort | null | undefined): SortOptions[number] | undefined;
|
|
7
|
+
export declare function hasSortOptionsSelect(options: DataTableProps["sortOptions"], onSortChange: DataTableProps["onSortChange"]): options is SortOptions;
|
|
8
|
+
export declare function sortSummaryText(m: DataTableModel): string | undefined;
|
|
9
|
+
export declare function SortOptionsSelect({ options, sort, onSortChange, testId, className, summary, bordered, chevron, }: {
|
|
10
|
+
readonly options: SortOptions;
|
|
11
|
+
readonly sort: DataTableSort | null | undefined;
|
|
12
|
+
readonly onSortChange: (next: DataTableSort | null) => void;
|
|
13
|
+
readonly testId: string;
|
|
14
|
+
readonly className?: string;
|
|
15
|
+
/** Replaces the label text, e.g. with the sentence that also names the list size. */
|
|
16
|
+
readonly summary?: string;
|
|
17
|
+
/** Draws the select like the filter-row selects: bordered, same height. */
|
|
18
|
+
readonly bordered?: boolean;
|
|
19
|
+
/** `false` leaves the trailing chevron out, so a summary sentence reads as plain text. */
|
|
20
|
+
readonly chevron?: boolean;
|
|
21
|
+
}): ReactNode;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDown } from "lucide-react";
|
|
3
|
+
import { useOptionalTranslation } from "../../../index.js";
|
|
4
|
+
import { cn } from "../../lib/cn.js";
|
|
5
|
+
export function sortOptionValue(option) {
|
|
6
|
+
return `${option.field}:${option.dir}`;
|
|
7
|
+
}
|
|
8
|
+
export function activeSortOption(options, sort) {
|
|
9
|
+
if (sort === undefined || sort === null)
|
|
10
|
+
return undefined;
|
|
11
|
+
return options.find((option) => option.field === sort.field && option.dir === sort.dir);
|
|
12
|
+
}
|
|
13
|
+
export function hasSortOptionsSelect(options, onSortChange) {
|
|
14
|
+
return onSortChange !== undefined && options !== undefined && options.length > 0;
|
|
15
|
+
}
|
|
16
|
+
// "Sorted by Urgency ↓ · 26 contracts": one sentence with the order and the size of the list.
|
|
17
|
+
// Undefined while no sort option is active, so the plain label stays.
|
|
18
|
+
export function sortSummaryText(m) {
|
|
19
|
+
if (m.sortOptions === undefined)
|
|
20
|
+
return undefined;
|
|
21
|
+
const active = activeSortOption(m.sortOptions, m.sort);
|
|
22
|
+
if (active === undefined)
|
|
23
|
+
return undefined;
|
|
24
|
+
const total = m.pager?.total ?? m.rows.length;
|
|
25
|
+
const noun = m.itemNoun?.(total) ?? "";
|
|
26
|
+
const direction = active.dir === "asc" ? "↑" : "↓";
|
|
27
|
+
const count = total.toLocaleString();
|
|
28
|
+
return (m.tableTranslate?.("kumiko.list.sort.summary", {
|
|
29
|
+
sort: active.label,
|
|
30
|
+
direction,
|
|
31
|
+
count,
|
|
32
|
+
noun,
|
|
33
|
+
}) ?? `Sorted by ${active.label} ${direction} · ${count} ${noun}`).trim();
|
|
34
|
+
}
|
|
35
|
+
// "Sorted by: <active label>" over a native select; with no matching option only the prefix shows
|
|
36
|
+
// so the control never claims an order the list is not in.
|
|
37
|
+
export function SortOptionsSelect({ options, sort, onSortChange, testId, className, summary, bordered = false, chevron = true, }) {
|
|
38
|
+
const translate = useOptionalTranslation();
|
|
39
|
+
const active = activeSortOption(options, sort);
|
|
40
|
+
const prefix = translate?.("kumiko.list.sort.prefix") ?? "Sorted by";
|
|
41
|
+
return (_jsxs("div", { className: cn("relative flex h-9 items-center gap-1.5 rounded-md text-[13px] text-foreground-secondary focus-within:ring-1 focus-within:ring-ring", bordered && "rounded-md border border-border-strong bg-background px-2.5 text-foreground", className), children: [_jsx("span", { "aria-hidden": "true", "data-testid": `${testId}-label`, children: summary ?? (active !== undefined ? `${prefix}: ${active.label}` : prefix) }), chevron && _jsx(ChevronDown, { className: "size-3.5", "aria-hidden": "true" }), _jsxs("select", { "aria-label": prefix, "data-testid": testId, value: active !== undefined ? sortOptionValue(active) : "", onChange: (e) => {
|
|
42
|
+
const picked = options.find((option) => sortOptionValue(option) === e.target.value);
|
|
43
|
+
if (picked !== undefined)
|
|
44
|
+
onSortChange({ field: picked.field, dir: picked.dir });
|
|
45
|
+
}, className: "absolute inset-0 size-full cursor-pointer opacity-0", children: [active === undefined && _jsx("option", { value: "", children: prefix }), options.map((option) => (_jsx("option", { value: sortOptionValue(option), children: option.label }, sortOptionValue(option))))] })] }));
|
|
46
|
+
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode } from "react";
|
|
2
2
|
import type { DataTableSort } from "../../../index.ts";
|
|
3
3
|
export declare const COMPACT_HEADER_CLASS = "text-xs font-semibold";
|
|
4
|
-
export declare function SortableHeader({ field, label, sortable, highlighted, numeric, fitContent, compact, className, sort, onSortChange, style, columnField, trailing, }: {
|
|
4
|
+
export declare function SortableHeader({ field, label, sortable, highlighted, numeric, actionColumn, fitContent, compact, className, sort, onSortChange, style, columnField, trailing, }: {
|
|
5
5
|
readonly field: string;
|
|
6
6
|
readonly label: string;
|
|
7
7
|
readonly sortable: boolean;
|
|
8
8
|
readonly highlighted?: boolean;
|
|
9
9
|
readonly numeric?: boolean;
|
|
10
|
+
/** Per-row action column: from sm right-aligned and without visible header text. */
|
|
11
|
+
readonly actionColumn?: boolean;
|
|
10
12
|
readonly fitContent?: boolean;
|
|
11
13
|
readonly compact?: boolean;
|
|
12
14
|
readonly className?: string;
|
|
@@ -4,6 +4,8 @@ import { cn } from "../../lib/cn.js";
|
|
|
4
4
|
import { TableHead } from "../../ui/table.js";
|
|
5
5
|
import { FIT_CONTENT_CELL_CLASS } from "../data-table-cell.js";
|
|
6
6
|
export const COMPACT_HEADER_CLASS = "text-xs font-semibold";
|
|
7
|
+
/** Small-caps look of column headers from sm up: 11px keeps dense tables inside 1280px. */
|
|
8
|
+
const SMALL_CAPS_HEADER_CLASS = "sm:text-[11px] sm:uppercase sm:tracking-[0.05em]";
|
|
7
9
|
// SortableHeader: renders the th header per column, with or without
|
|
8
10
|
// click-sort. Three paths:
|
|
9
11
|
// (a) sortable=false OR no onSortChange -> plain label, no cursor
|
|
@@ -13,7 +15,7 @@ export const COMPACT_HEADER_CLASS = "text-xs font-semibold";
|
|
|
13
15
|
// (c) sortable=true in the schema but no onSortChange prop -> still
|
|
14
16
|
// label-only, but data-sortable=true stays so tests that know the
|
|
15
17
|
// schema view keep working.
|
|
16
|
-
export function SortableHeader({ field, label, sortable, highlighted, numeric, fitContent, compact, className, sort, onSortChange, style, columnField, trailing, }) {
|
|
18
|
+
export function SortableHeader({ field, label, sortable, highlighted, numeric, actionColumn, fitContent, compact, className, sort, onSortChange, style, columnField, trailing, }) {
|
|
17
19
|
const active = sort?.field === field ? sort : undefined;
|
|
18
20
|
const ariaSort = active?.dir === "asc" ? "ascending" : active?.dir === "desc" ? "descending" : "none";
|
|
19
21
|
const cellExtras = {
|
|
@@ -21,13 +23,13 @@ export function SortableHeader({ field, label, sortable, highlighted, numeric, f
|
|
|
21
23
|
...(columnField !== undefined && { "data-column-field": columnField }),
|
|
22
24
|
};
|
|
23
25
|
if (!sortable || onSortChange === undefined) {
|
|
24
|
-
return (_jsxs(TableHead, { "data-testid": `column-${field}`, "data-sortable": sortable === true ? true : undefined, "data-highlighted": highlighted === true ? "true" : undefined, className: cn("font-medium whitespace-normal text-muted-foreground", numeric === true && "text-right", fitContent === true && FIT_CONTENT_CELL_CLASS, highlighted === true && "bg-accent/40", trailing !== undefined && "group/header relative", compact === true && COMPACT_HEADER_CLASS, className), ...cellExtras, children: [label, trailing] }));
|
|
26
|
+
return (_jsxs(TableHead, { "data-testid": `column-${field}`, "data-sortable": sortable === true ? true : undefined, "data-highlighted": highlighted === true ? "true" : undefined, className: cn("font-medium whitespace-normal text-muted-foreground", SMALL_CAPS_HEADER_CLASS, numeric === true && "text-right", actionColumn === true && "sm:text-right", fitContent === true && FIT_CONTENT_CELL_CLASS, highlighted === true && "bg-accent/40", trailing !== undefined && "group/header relative", compact === true && COMPACT_HEADER_CLASS, className), ...cellExtras, children: [actionColumn === true ? _jsx("span", { className: "sm:sr-only", children: label }) : label, trailing] }));
|
|
25
27
|
}
|
|
26
28
|
const Icon = active?.dir === "asc" ? ArrowUp : active?.dir === "desc" ? ArrowDown : ArrowUpDown;
|
|
27
29
|
const next = nextSortState(active?.dir, field);
|
|
28
30
|
return (_jsxs(TableHead, { "data-testid": `column-${field}`, "data-sortable": "true", "data-highlighted": highlighted === true ? "true" : undefined, "aria-sort": ariaSort, className: cn(active !== undefined
|
|
29
31
|
? "font-semibold text-foreground"
|
|
30
|
-
: "font-medium text-muted-foreground", "whitespace-normal", numeric === true && "text-right", fitContent === true && FIT_CONTENT_CELL_CLASS, highlighted === true && "bg-accent/40", trailing !== undefined && "group/header relative", compact === true && COMPACT_HEADER_CLASS, className), ...cellExtras, children: [_jsxs("button", { type: "button", onClick: () => onSortChange(next), className: cn("group/sort inline-flex h-8 items-center gap-1.5 rounded-sm px-2 -mx-2 text-sm [font-weight:inherit]", "hover:bg-accent hover:text-accent-foreground", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", active !== undefined && "text-foreground", compact === true && "text-xs"), children: [_jsx("span", { children: label }), _jsx(Icon, { "data-sort-icon": active === undefined ? "idle" : "active", className: cn("size-3.5", active === undefined &&
|
|
32
|
+
: "font-medium text-muted-foreground", "whitespace-normal", SMALL_CAPS_HEADER_CLASS, numeric === true && "text-right", fitContent === true && FIT_CONTENT_CELL_CLASS, highlighted === true && "bg-accent/40", trailing !== undefined && "group/header relative", compact === true && COMPACT_HEADER_CLASS, className), ...cellExtras, children: [_jsxs("button", { type: "button", onClick: () => onSortChange(next), className: cn("group/sort inline-flex h-8 items-center gap-1.5 rounded-sm px-2 -mx-2 text-sm [font-weight:inherit]", SMALL_CAPS_HEADER_CLASS, "hover:bg-accent hover:text-accent-foreground", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", active !== undefined && "text-foreground", compact === true && "text-xs"), children: [_jsx("span", { children: label }), _jsx(Icon, { "data-sort-icon": active === undefined ? "idle" : "active", className: cn("size-3.5", active === undefined &&
|
|
31
33
|
"opacity-0 group-hover/sort:opacity-40 group-focus-visible/sort:opacity-40"), "aria-hidden": "true" })] }), trailing] }));
|
|
32
34
|
}
|
|
33
35
|
// 3-state toggle: no sort -> asc -> desc -> no sort. Idiomatic for
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Fragment } from "react";
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
2
|
import { cn } from "../../lib/cn.js";
|
|
4
3
|
import { TableBody, TableCell, TableRow } from "../../ui/table.js";
|
|
5
4
|
import { rowToneClass } from "../data-table-cell.js";
|
|
5
|
+
import { HintReasonRowScope, hintReasonOf } from "../hint-reason-row.js";
|
|
6
6
|
import { RowActionsCell } from "../row-actions.js";
|
|
7
7
|
import { ActionsBodyCell } from "./actions-column.js";
|
|
8
8
|
import { bandClassName, bandReactKey, bandTestId } from "./group-band.js";
|
|
@@ -25,7 +25,9 @@ function renderDataRow(m, row) {
|
|
|
25
25
|
const openRow = m.rowOpener(row);
|
|
26
26
|
const opensOnClick = openRow !== undefined;
|
|
27
27
|
const keyboard = m.keyboardRow(row.id, openRow);
|
|
28
|
-
|
|
28
|
+
const reasonHint = m.columns.find((col) => col.hint !== undefined && hintReasonOf(col.hint, row.values) !== undefined)?.hint;
|
|
29
|
+
const rowElements = (_jsxs(_Fragment, { children: [_jsxs(TableRow, { "data-testid": m.rowTestId(row), "data-tone": rowTone?.(row), onClick: openRow, className: cn(rowToneClass(rowTone?.(row)), opensOnClick && "cursor-pointer", "[&:has(+[data-reason-row])]:border-b-0", m.fillsHeight && "h-10 border-border-row hover:bg-muted", density.row, keyboard.className), ...keyboard.props, children: [m.selection.bodyCell(row, m.pins.bodyCell(SELECT_COLUMN_KEY)), m.expansion !== undefined && renderExpandCell(m, row), m.columns.map((col, colIndex) => renderDataCell(m, row, col, colIndex, opensOnClick)), m.hasTableActions && tableActions !== undefined && renderActionsCell(m, row, tableActions)] }), renderExpansion(m, row, "row", m.fullColSpan)] }));
|
|
30
|
+
return (_jsx(HintReasonRowScope, { hint: reasonHint, row: row.values, renderBoxRow: (box) => (_jsx(TableRow, { "data-testid": `${m.rowTestId(row)}-reason`, "data-reason-row": "true", children: _jsx(TableCell, { colSpan: m.fullColSpan, children: box }) })), children: rowElements }, row.id));
|
|
29
31
|
}
|
|
30
32
|
export function renderTableBody(m) {
|
|
31
33
|
return (_jsx(TableBody, { children: m.tableItems.map((item) => item.kind === "row" ? renderDataRow(m, item.row) : renderBandRow(m, item)) }));
|
|
@@ -14,7 +14,9 @@ export function FlushTable({ className, ...props }) {
|
|
|
14
14
|
// in SortableHeader: a `[&_th]:font-*` rule here would outrank it.
|
|
15
15
|
// Child selectors only: an expanded row nests a whole table inside a cell, and
|
|
16
16
|
// descendant selectors would make its header sticky and re-pad its cells.
|
|
17
|
-
export const FILL_TABLE_CLASS = cn("[&>thead>tr>th]:sticky [&>thead>tr>th]:top-0 [&>thead>tr>th]:z-10 [&>thead>tr>th]:h-9 [&>thead>tr>th]:bg-muted [&>thead>tr>th]:px-2 [&>thead>tr>th]:text-[13px]", "[&>thead>tr>th]:shadow-[inset_0_-1px_0_var(--color-border)] [&>thead>tr>th_button]:text-[13px] [&>tbody>tr>td]:px-2 [&>tbody>tr>td]:py-0",
|
|
17
|
+
export const FILL_TABLE_CLASS = cn("[&>thead>tr>th]:sticky [&>thead>tr>th]:top-0 [&>thead>tr>th]:z-10 [&>thead>tr>th]:h-9 [&>thead>tr>th]:bg-muted [&>thead>tr>th]:px-2 [&>thead>tr>th]:text-[13px]", "[&>thead>tr>th]:shadow-[inset_0_-1px_0_var(--color-border)] [&>thead>tr>th_button]:text-[13px] [&>tbody>tr>td]:px-2 [&>tbody>tr>td]:py-0",
|
|
18
|
+
// The small-caps header size of SortableHeader; the child selectors above would outrank it.
|
|
19
|
+
"sm:[&>thead>tr>th]:text-[11px] sm:[&>thead>tr>th_button]:text-[11px]", "[&>*>tr>:first-child]:pl-6 [&>*>tr>:last-child]:pr-6");
|
|
18
20
|
// `!`: beats the first/last-child padding of FILL_TABLE_CLASS, which would
|
|
19
21
|
// otherwise widen the narrow toggle column / pad the full-width expansion cell.
|
|
20
22
|
// The nested table's sticky actions cell (last td) gets the muted surface
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../lib/cn.js";
|
|
2
3
|
import { InfiniteSentinel, Pager } from "../pager.js";
|
|
4
|
+
import { CARD_SURFACE_CLASS, isInsideCardFrame } from "./card-frame.js";
|
|
3
5
|
import { renderCardsView } from "./card-view.js";
|
|
4
6
|
import { renderEmptyBlock } from "./row-render-parts.js";
|
|
5
7
|
import { DataTableFooter } from "./table-footer.js";
|
|
@@ -12,7 +14,7 @@ function renderPager(m) {
|
|
|
12
14
|
const { pager, serverGroups, itemNoun, testId } = m;
|
|
13
15
|
if (pager === undefined || !(pager.total > 0) || serverGroups !== undefined)
|
|
14
16
|
return undefined;
|
|
15
|
-
return (_jsx(Pager, { page: pager.page, limit: pager.limit, total: pager.total, onPageChange: pager.onPageChange, ...(pager.pageSizeOptions !== undefined && { pageSizeOptions: pager.pageSizeOptions }), ...(pager.onPageSizeChange !== undefined && { onPageSizeChange: pager.onPageSizeChange }), ...(itemNoun !== undefined && { itemNoun }), testId: testId !== undefined ? `${testId}-pager` : "render-list-pager", pinned: m.fillsHeight }));
|
|
17
|
+
return (_jsx(Pager, { page: pager.page, limit: pager.limit, total: pager.total, onPageChange: pager.onPageChange, ...(pager.pageSizeOptions !== undefined && { pageSizeOptions: pager.pageSizeOptions }), ...(pager.onPageSizeChange !== undefined && { onPageSizeChange: pager.onPageSizeChange }), ...(itemNoun !== undefined && { itemNoun }), testId: testId !== undefined ? `${testId}-pager` : "render-list-pager", pinned: m.fillsHeight || isInsideCardFrame(m) }));
|
|
16
18
|
}
|
|
17
19
|
function renderSentinel(m, pagerElement) {
|
|
18
20
|
const { onReachEnd, serverGroups, testId } = m;
|
|
@@ -31,11 +33,14 @@ export function renderTableContent(m) {
|
|
|
31
33
|
const tableContent = renderTableBodyContent(m);
|
|
32
34
|
const pagerElement = renderPager(m);
|
|
33
35
|
const sentinelElement = renderSentinel(m, pagerElement);
|
|
36
|
+
const framed = isInsideCardFrame(m);
|
|
34
37
|
// With scrollBody the footer (pager, else the entry count) sits OUTSIDE the
|
|
35
38
|
// scroll surface so it stays put at any row count; the infinite sentinel
|
|
36
39
|
// stays INSIDE, or it would never intersect the scrollport.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
const content = m.fillsHeight ? (_jsxs("div", { "data-testid": testId !== undefined ? `${testId}-scroll` : "render-list-scroll", className: cn("min-h-0 flex-1 overflow-auto bg-card", !framed && "border-t border-border"), children: [tableContent, sentinelElement] })) : (_jsxs(_Fragment, { children: [tableContent, sentinelElement] }));
|
|
41
|
+
const footer = pagerElement ??
|
|
42
|
+
(m.fillsHeight ? (_jsx(DataTableFooter, { count: serverGroups?.totalCount ?? m.rows.length, ...(itemNoun !== undefined && { itemNoun }), testId: testId !== undefined ? `${testId}-footer` : "render-list-footer" })) : undefined);
|
|
43
|
+
// Frame card: content and footer share one bordered card. A fill-height card is as tall as
|
|
44
|
+
// its rows and shrinks into the scroll container; the 24px sides match the toolbar's inset.
|
|
45
|
+
return (_jsxs(_Fragment, { children: [m.selection.bar, framed ? (_jsxs("div", { "data-testid": testId !== undefined ? `${testId}-frame` : "render-list-frame", className: cn(CARD_SURFACE_CLASS, "overflow-hidden", m.fillsHeight && "mx-6 mb-6 flex min-h-0 flex-col"), children: [content, footer] })) : (_jsxs(_Fragment, { children: [content, footer] }))] }));
|
|
41
46
|
}
|
|
@@ -3,6 +3,8 @@ import { cn } from "../../lib/cn.js";
|
|
|
3
3
|
import { TableCell } from "../../ui/table.js";
|
|
4
4
|
import { cellLinkProp, cellTitle, DataTableCell, FIT_CONTENT_CELL_CLASS, FirstCellLink, isEmptyCellValue, NUMERIC_COLUMN_TYPES, TABULAR_COLUMN_TYPES, } from "../data-table-cell.js";
|
|
5
5
|
import { columnCellPresentationProps } from "./data-cell-props.js";
|
|
6
|
+
import { hintColumnWidthStyle } from "./hint-column-width.js";
|
|
7
|
+
import { isRowActionColumn } from "./row-action-column.js";
|
|
6
8
|
// Text wraps instead of truncating: nowrap cells keep their
|
|
7
9
|
// full width, so a wide table scrolled sideways and its
|
|
8
10
|
// last column slid under the sticky actions column with
|
|
@@ -28,6 +30,9 @@ function isDateColumn(col) {
|
|
|
28
30
|
function autoLayoutCellClassName(m, col, colIndex) {
|
|
29
31
|
if (m.sizing !== undefined && isDateColumn(col))
|
|
30
32
|
return "whitespace-nowrap";
|
|
33
|
+
// max-w-xs would cap a hint column that states a wider width.
|
|
34
|
+
if (col.hint !== undefined && col.width !== undefined)
|
|
35
|
+
return "whitespace-normal break-words";
|
|
31
36
|
return colIndex === 0 && m.sizing !== undefined
|
|
32
37
|
? "whitespace-normal [overflow-wrap:anywhere]"
|
|
33
38
|
: "max-w-xs whitespace-normal break-words";
|
|
@@ -37,15 +42,16 @@ function dataCellClassName(m, col, colIndex, pinClassName) {
|
|
|
37
42
|
? m.sizing?.fixed === true
|
|
38
43
|
? "overflow-hidden whitespace-normal break-words"
|
|
39
44
|
: autoLayoutCellClassName(m, col, colIndex)
|
|
40
|
-
: 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);
|
|
45
|
+
: FIT_CONTENT_CELL_CLASS, colIndex === 0 ? "font-medium text-foreground" : "text-foreground-secondary", NUMERIC_COLUMN_TYPES.has(col.type) && "text-right", isRowActionColumn(col) && "sm:text-right", TABULAR_COLUMN_TYPES.has(col.type) && "tabular-nums", col.highlighted === true && "bg-accent/40", m.density.cell, pinClassName);
|
|
41
46
|
}
|
|
42
47
|
export function renderDataCell(m, row, col, colIndex, opensOnClick) {
|
|
43
48
|
const { getCellTestId, onCellChange, onRowClick, tableTranslate, tableLocale } = m;
|
|
44
49
|
const bodyPin = m.pins.bodyCell(col.field);
|
|
45
50
|
const linksFirstCell = colIndex === 0 && opensOnClick && onCellChange === undefined;
|
|
46
|
-
|
|
51
|
+
const wrapsCellInOpener = linksFirstCell && col.hint === undefined;
|
|
52
|
+
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, ...hintColumnWidthStyle(col, m.sizing !== undefined) }, title: cellTitle(row.values[col.field]), children: _jsx(FirstCellLink, { enabled: wrapsCellInOpener, onOpen: () => onRowClick?.(row), empty: col.hint === undefined && 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 && {
|
|
47
53
|
fileDisplay: col.fileDisplay,
|
|
48
54
|
}), ...(onCellChange !== undefined && {
|
|
49
55
|
onChange: (value) => onCellChange(row.id, col.field, value),
|
|
50
|
-
}), ...cellLinkProp(col, row, !linksFirstCell) }) }) }, col.field));
|
|
56
|
+
}), ...cellLinkProp(col, row, !linksFirstCell), ...(linksFirstCell && !wrapsCellInOpener && { onOpenRow: () => onRowClick?.(row) }) }) }) }, col.field));
|
|
51
57
|
}
|
|
@@ -4,17 +4,20 @@ import { TableHead, TableHeader, TableRow } from "../../ui/table.js";
|
|
|
4
4
|
import { NUMERIC_COLUMN_TYPES } from "../data-table-cell.js";
|
|
5
5
|
import { ActionsHeaderCell } from "./actions-column.js";
|
|
6
6
|
import { ColumnResizeHandle } from "./column-resize-handle.js";
|
|
7
|
+
import { COLUMN_ROLE_ATTRIBUTE } from "./column-role.js";
|
|
8
|
+
import { hintColumnWidthStyle } from "./hint-column-width.js";
|
|
9
|
+
import { isRowActionColumn } from "./row-action-column.js";
|
|
7
10
|
import { SortableHeader } from "./sortable-header.js";
|
|
8
11
|
import { EXPAND_TOGGLE_CELL_CLASS } from "./table-chrome.js";
|
|
9
12
|
import { EXPAND_COLUMN_KEY, SELECT_COLUMN_KEY } from "./use-column-pins.js";
|
|
10
13
|
function renderColumnHeader(m, col) {
|
|
11
14
|
const { sizing, sort, onSortChange } = m;
|
|
12
15
|
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, compact: m.compactHeader === true, 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));
|
|
16
|
+
return (_jsx(SortableHeader, { field: col.field, label: col.label, sortable: col.sortable === true, highlighted: col.highlighted === true, numeric: NUMERIC_COLUMN_TYPES.has(col.type), actionColumn: isRowActionColumn(col), fitContent: col.fileDisplay !== undefined, compact: m.compactHeader === true, className: cn(m.density.header, headerPin.className), style: { ...headerPin.style, ...hintColumnWidthStyle(col, sizing !== undefined) }, 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
17
|
}
|
|
15
18
|
function renderExpandHeaderCell(m) {
|
|
16
19
|
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 }));
|
|
20
|
+
return (_jsx(TableHead, { "data-testid": "column-expand", [COLUMN_ROLE_ATTRIBUTE]: "expand", className: cn(EXPAND_TOGGLE_CELL_CLASS, expandHeaderPin.className), style: expandHeaderPin.style }));
|
|
18
21
|
}
|
|
19
22
|
export function renderTableHeader(m) {
|
|
20
23
|
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?.fixed === true }))] }) }));
|
|
@@ -1,25 +1,39 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../lib/cn.js";
|
|
3
|
-
import { Table } from "../../ui/table.js";
|
|
3
|
+
import { Table, TableFooter } from "../../ui/table.js";
|
|
4
|
+
import { isInsideCardFrame } from "./card-frame.js";
|
|
4
5
|
import { ColumnWidthGroup } from "./column-resize-handle.js";
|
|
5
6
|
import { renderTableBody } from "./table-body.js";
|
|
6
7
|
import { FILL_TABLE_CLASS, FlushTable } from "./table-chrome.js";
|
|
7
8
|
import { renderTableHeader } from "./table-header-row.js";
|
|
8
|
-
import { TotalsFooterRow } from "./totals-footer.js";
|
|
9
|
+
import { SummaryFooterRow, TotalsFooterRow } from "./totals-footer.js";
|
|
9
10
|
function renderColumnWidths(m) {
|
|
10
11
|
const { sizing } = m;
|
|
11
12
|
if (sizing === undefined || !sizing.fixed)
|
|
12
13
|
return null;
|
|
13
14
|
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
|
}
|
|
16
|
+
function renderSummaryRow(m) {
|
|
17
|
+
if (m.summaryRow === undefined)
|
|
18
|
+
return null;
|
|
19
|
+
return (_jsx(SummaryFooterRow, { summary: m.summaryRow, colSpan: m.fullColSpan, cellClassName: m.density.cell, columns: m.columns, cellPin: m.pins.bodyCell, leadingCells: { select: m.selection.active, expand: m.expansion !== undefined }, actionsCell: m.hasTableActions ? { fillsHeight: m.fillsHeight } : undefined }));
|
|
20
|
+
}
|
|
15
21
|
function renderTotalsRow(m) {
|
|
16
22
|
const { totals } = m;
|
|
17
23
|
if (totals === undefined)
|
|
18
24
|
return null;
|
|
19
25
|
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
26
|
}
|
|
27
|
+
// Both rows share one tfoot; a second tfoot is invalid HTML.
|
|
28
|
+
function renderTableFooter(m) {
|
|
29
|
+
const summary = renderSummaryRow(m);
|
|
30
|
+
const totals = renderTotalsRow(m);
|
|
31
|
+
if (summary === null && totals === null)
|
|
32
|
+
return null;
|
|
33
|
+
return (_jsxs(TableFooter, { children: [summary, totals] }));
|
|
34
|
+
}
|
|
21
35
|
export function renderTableView(m) {
|
|
22
36
|
const { fillsHeight, chromeless, sizing, testId } = m;
|
|
23
37
|
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?.tableStyle !== undefined && { style: sizing.tableStyle }), children: [renderColumnWidths(m), renderTableHeader(m), renderTableBody(m),
|
|
38
|
+
return (_jsx("div", { className: cn(!fillsHeight && "overflow-hidden", !fillsHeight && chromeless !== true && !isInsideCardFrame(m) && "rounded-lg border bg-card"), children: _jsxs(TableRoot, { "data-testid": testId, className: fillsHeight ? FILL_TABLE_CLASS : undefined, ...(sizing?.tableStyle !== undefined && { style: sizing.tableStyle }), children: [renderColumnWidths(m), renderTableHeader(m), renderTableBody(m), renderTableFooter(m)] }) }));
|
|
25
39
|
}
|
|
@@ -9,5 +9,5 @@ export function ToolbarEndCluster({ view, columnLabels, exportList, toolbarEnd,
|
|
|
9
9
|
if (!toolbarEndHasContent(view, exportList, toolbarEnd))
|
|
10
10
|
return null;
|
|
11
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] }));
|
|
12
|
+
return (_jsxs("div", { className: "flex flex-wrap items-center gap-2 ml-auto", children: [showsViewMenu && (_jsx("div", { className: "max-sm:hidden", children: _jsx(ViewMenu, { view: view, columnLabels: columnLabels }) })), exportList !== undefined && (_jsx("div", { className: "max-sm:hidden", children: _jsx(ExportButton, { source: exportList }) })), toolbarEnd] }));
|
|
13
13
|
}
|