@cosmicdrift/kumiko-renderer 0.413.1 → 0.415.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 +42 -59
- package/dist/app/form-schema.d.ts +1 -0
- package/dist/app/form-schema.js +24 -0
- package/dist/app/list-facets.d.ts +1 -0
- package/dist/app/list-facets.js +10 -1
- 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 +16 -3
- package/dist/app/named-filter-facet.js +97 -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 +103 -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 +76 -18
- package/dist/app/projection-detail-navigation.d.ts +2 -0
- package/dist/app/projection-detail-navigation.js +13 -3
- 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 +18 -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 +26 -0
- package/dist/app/use-entity-list-payload.js +59 -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 +5 -4
- package/dist/app/use-projection-detail-actions.js +42 -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 +13 -0
- package/dist/app/use-row-decoration.js +103 -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/card-options.d.ts +25 -0
- package/dist/card-options.js +1 -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/list-empty-state.d.ts +13 -1
- package/dist/components/list-empty-state.js +20 -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-render-model.d.ts +2 -2
- 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 +9 -0
- package/dist/components/render-list-hint-columns.js +87 -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 +4 -1
- 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 +3 -5
- 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 +1 -0
- package/dist/components/use-render-edit-state.js +4 -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 +6 -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 +4 -0
- package/dist/headless/pwa-service-worker-meta.js +13 -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 +37 -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 +39 -3
- package/dist/index.d.ts +7 -2
- package/dist/index.js +4 -1
- package/dist/live/dispatcher-live.js +2 -0
- package/dist/metric-types.d.ts +4 -0
- package/dist/primitives-record-guidance.d.ts +55 -0
- package/dist/primitives-record-guidance.js +1 -0
- package/dist/primitives.d.ts +47 -54
- 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 +144 -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 +7 -23
- package/dist/web/app/dashboard-panels.js +55 -123
- package/dist/web/app/dashboard-reference-list-table.d.ts +5 -1
- package/dist/web/app/dashboard-reference-list-table.js +13 -4
- package/dist/web/app/dashboard-shared.d.ts +23 -7
- package/dist/web/app/dashboard-shared.js +45 -17
- package/dist/web/app/dashboard-stat-group-panel.d.ts +14 -0
- package/dist/web/app/dashboard-stat-group-panel.js +74 -0
- package/dist/web/app/dashboard-text-panel.d.ts +12 -0
- package/dist/web/app/dashboard-text-panel.js +167 -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/drawn-icons.d.ts +6 -0
- package/dist/web/drawn-icons.js +30 -0
- 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/icons.js +6 -5
- package/dist/web/index.d.ts +9 -1
- package/dist/web/index.js +7 -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 +7 -0
- package/dist/web/layout/nav-collapse-state.js +76 -0
- package/dist/web/layout/nav-tree.js +71 -28
- package/dist/web/layout/notification-bell.d.ts +7 -2
- package/dist/web/layout/notification-bell.js +16 -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 +5 -4
- package/dist/web/layout/shell-focus.js +14 -7
- package/dist/web/layout/shell-header.d.ts +2 -1
- package/dist/web/layout/shell-header.js +84 -27
- package/dist/web/layout/shell-style.d.ts +3 -0
- package/dist/web/layout/shell-style.js +6 -0
- 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.d.ts +11 -1
- package/dist/web/layout/workspace-shell.js +9 -5
- 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 +22 -9
- package/dist/web/primitives/calendar-day-picker.js +24 -5
- package/dist/web/primitives/card.js +18 -8
- package/dist/web/primitives/code-input.js +6 -1
- package/dist/web/primitives/data-table/actions-column.d.ts +2 -1
- package/dist/web/primitives/data-table/actions-column.js +7 -3
- package/dist/web/primitives/data-table/card-body.d.ts +6 -1
- package/dist/web/primitives/data-table/card-body.js +53 -6
- 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 +44 -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 +14 -0
- package/dist/web/primitives/data-table/hint-cell.js +68 -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/row-render-parts.d.ts +1 -1
- package/dist/web/primitives/data-table/row-render-parts.js +3 -2
- 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 +12 -7
- 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 +22 -3
- package/dist/web/primitives/data-table/toolbar-end-cluster.js +1 -1
- package/dist/web/primitives/data-table/toolbar.d.ts +2 -0
- package/dist/web/primitives/data-table/toolbar.js +70 -7
- package/dist/web/primitives/data-table/totals-footer.d.ts +20 -0
- package/dist/web/primitives/data-table/totals-footer.js +41 -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 +129 -26
- package/dist/web/primitives/embedded-file-cell.js +3 -2
- package/dist/web/primitives/embedded-list-cards.js +3 -4
- package/dist/web/primitives/facet-filter.d.ts +5 -3
- package/dist/web/primitives/facet-filter.js +36 -5
- package/dist/web/primitives/facet-search-filter.d.ts +2 -1
- package/dist/web/primitives/facet-search-filter.js +3 -2
- package/dist/web/primitives/facet-trigger-label.d.ts +8 -0
- package/dist/web/primitives/facet-trigger-label.js +9 -0
- 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 +3 -2
- package/dist/web/primitives/file-view-action.d.ts +6 -0
- package/dist/web/primitives/file-view-action.js +22 -0
- package/dist/web/primitives/files-dropzone.js +20 -9
- 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 +3 -3
- package/dist/web/primitives/metric.js +20 -6
- package/dist/web/primitives/page-header.d.ts +1 -1
- package/dist/web/primitives/page-header.js +10 -2
- package/dist/web/primitives/pager.d.ts +3 -2
- package/dist/web/primitives/pager.js +31 -24
- 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 +50 -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 +10 -9
- package/dist/web/primitives/tabs.js +6 -1
- package/dist/web/pwa/pwa-support.d.ts +4 -0
- package/dist/web/pwa/pwa-support.js +131 -0
- package/dist/web/sse/live-events.js +2 -2
- package/dist/web/tokens.js +0 -3
- package/dist/web/ui/sidebar.d.ts +2 -1
- package/dist/web/ui/sidebar.js +4 -3
- package/dist/web/widgets/ai-text-field.js +3 -2
- 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 +46 -0
- package/dist/web/widgets/dashboard-list.d.ts +45 -5
- package/dist/web/widgets/dashboard-list.js +126 -25
- package/dist/web/widgets/drawer-panel-class.d.ts +1 -0
- package/dist/web/widgets/drawer-panel-class.js +9 -1
- package/dist/web/widgets/drawer-sizing.js +1 -1
- package/dist/web/widgets/drawer.js +2 -2
- 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/pdf-viewer-toolbar.js +3 -2
- 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/sheet-parts.js +3 -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 +16 -1
- package/dist/web/widgets/stat.js +24 -7
- 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/step-list-row.d.ts +4 -0
- package/dist/web/widgets/step-list-row.js +22 -14
- package/dist/web/widgets/step-list.d.ts +12 -4
- package/dist/web/widgets/step-list.js +38 -20
- 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 +289 -0
- package/src/web/styles.css +15 -0
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { normalizeListColumn } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
3
2
|
import { DASHBOARD_STAT_TONES } from "@cosmicdrift/kumiko-types/screen";
|
|
4
3
|
import { isOneOf } from "@cosmicdrift/kumiko-types/type-guards";
|
|
5
4
|
import { useEffect, useState } from "react";
|
|
5
|
+
import { namedFilterNavigateAllows, navigateTargetAllows } from "../../app/screen-access.js";
|
|
6
6
|
import { rendererWarn } from "../../dev-console.js";
|
|
7
7
|
import { EMPTY_VALUE_PLACEHOLDER } from "../../headless/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import { extensionSectionName, lastSegment, useExtensionSectionComponent, useNav, usePrimitives, useTranslation, useUserRoles, } from "../../index.js";
|
|
8
|
+
import { extensionSectionName, useAppFeatures, useExtensionSectionComponent, useNav, useTranslation, useUserRoles, } from "../../index.js";
|
|
10
9
|
import { initialWindowSelection, } from "../widgets/chart-window.js";
|
|
11
10
|
import { chartToneColor, SegmentBarChart, StackedAreaChart, StackedBarChart, TimeseriesChart, } from "../widgets/charts.js";
|
|
12
11
|
import { FeedList } from "../widgets/feed-list.js";
|
|
13
12
|
import { ModeSwitch } from "../widgets/mode-switch.js";
|
|
14
13
|
import { ProgressList } from "../widgets/progress-list.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
14
|
+
import { StatCard, StatStripCell, } from "../widgets/stat.js";
|
|
15
|
+
import { StatBoxCell } from "../widgets/stat-box-cell.js";
|
|
17
16
|
import { EmptyState, LoadingState } from "../widgets/states.js";
|
|
18
|
-
import {
|
|
19
|
-
import { DAY_MS, HOUR_MS, PanelError,
|
|
17
|
+
import { optionalDashboardNavigationLink } from "./dashboard-navigation-link.js";
|
|
18
|
+
import { DAY_MS, HOUR_MS, PanelError, panelPayload, QueryPanel, useDashboardFormats, useDashboardQuery, useReportPanelLoaded, } from "./dashboard-shared.js";
|
|
20
19
|
import { isRecord, resolveDashboardText } from "./dashboard-text.js";
|
|
21
20
|
function isSparkPoint(value) {
|
|
22
21
|
return (typeof value === "object" &&
|
|
@@ -40,10 +39,24 @@ function fallbackText(raw, placeholder) {
|
|
|
40
39
|
return placeholder;
|
|
41
40
|
return String(raw);
|
|
42
41
|
}
|
|
43
|
-
|
|
42
|
+
// Hidden before any query hook runs: the tile's own count query would be refused for this user.
|
|
43
|
+
export function useStatNavigateAllowed() {
|
|
44
|
+
const appFeatures = useAppFeatures();
|
|
45
|
+
const userRoles = useUserRoles();
|
|
46
|
+
return ({ navigate }) => navigate === undefined ||
|
|
47
|
+
(navigateTargetAllows({ screen: navigate.screen }, appFeatures, userRoles) &&
|
|
48
|
+
namedFilterNavigateAllows(navigate, appFeatures, userRoles));
|
|
49
|
+
}
|
|
50
|
+
export function StatPanelBody(props) {
|
|
51
|
+
const navigateAllowed = useStatNavigateAllowed();
|
|
52
|
+
if (!navigateAllowed(props.panel))
|
|
53
|
+
return null;
|
|
54
|
+
return _jsx(StatPanelContent, { ...props });
|
|
55
|
+
}
|
|
56
|
+
function StatPanelContent({ panel, label, screenId, screenParams, translate, variant, }) {
|
|
44
57
|
const formats = useDashboardFormats();
|
|
45
58
|
const nav = useNav();
|
|
46
|
-
const link =
|
|
59
|
+
const link = optionalDashboardNavigationLink(nav, panel.navigate);
|
|
47
60
|
// Resolved HERE (not in a separate always-rendered child) so `icon` on
|
|
48
61
|
// <StatCard> is `undefined` — not a React element that renders empty —
|
|
49
62
|
// when the icon name isn't registered. StatCard gates its accent chip on
|
|
@@ -60,7 +73,7 @@ export function StatPanelBody({ panel, label, screenId, screenParams, translate,
|
|
|
60
73
|
const { data, error, loading, refetch } = useDashboardQuery(panel.query,
|
|
61
74
|
// A navigate tile counts exactly what its target list can reproduce from the URL.
|
|
62
75
|
panel.navigate === undefined ? panelPayload(panel, screenParams) : (panel.params ?? {}));
|
|
63
|
-
useReportPanelLoaded(data);
|
|
76
|
+
useReportPanelLoaded(data, loading);
|
|
64
77
|
if (loading && data === null)
|
|
65
78
|
return _jsx(LoadingState, { rows: 2 });
|
|
66
79
|
if (error !== null) {
|
|
@@ -72,40 +85,45 @@ export function StatPanelBody({ panel, label, screenId, screenParams, translate,
|
|
|
72
85
|
// A fixed tone must not paint an all-clear "0" as an alarm.
|
|
73
86
|
(rawValue === 0 ? undefined : panel.tone);
|
|
74
87
|
const sub = panel.subField !== undefined ? record[panel.subField] : undefined;
|
|
88
|
+
const dynamicLabel = panel.labelField !== undefined ? record[panel.labelField] : undefined;
|
|
89
|
+
const shownLabel = typeof dynamicLabel === "string" && dynamicLabel !== "" ? dynamicLabel : label;
|
|
75
90
|
const delta = readDelta(panel, record);
|
|
76
|
-
const
|
|
77
|
-
let value;
|
|
78
|
-
if (typeof rawValue !== "number") {
|
|
79
|
-
value =
|
|
80
|
-
resolveDashboardText(rawValue, translate, formats) ??
|
|
81
|
-
fallbackText(rawValue, EMPTY_VALUE_PLACEHOLDER);
|
|
82
|
-
}
|
|
83
|
-
else if (valueFormat?.kind === "relativeTime") {
|
|
84
|
-
value = formats.formatRelative(rawValue);
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
value = formats.formatPanelValue(valueFormat)(rawValue);
|
|
88
|
-
}
|
|
91
|
+
const value = statValueText(rawValue, panel.valueFormat, translate, formats);
|
|
89
92
|
const spark = readSparkline(panel, record);
|
|
90
93
|
const testId = `dashboard-panel-${panel.id}`;
|
|
91
94
|
const subText = resolveDashboardText(sub, translate, formats) ?? fallbackText(sub, undefined);
|
|
92
95
|
const icon = Icon !== undefined ? (_jsx(Icon, { entityName: screenId, entityId: null, screenId: screenId, filterParams: screenParams.filterParams })) : undefined;
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
const narrowLabel = panel.narrowLabel !== undefined ? translate(panel.narrowLabel) : undefined;
|
|
97
|
+
return (_jsx(StatVariantCell, { variant: variant, cell: {
|
|
98
|
+
icon,
|
|
99
|
+
label: shownLabel,
|
|
100
|
+
value,
|
|
101
|
+
tone: tone ?? "default",
|
|
102
|
+
testId,
|
|
103
|
+
...(narrowLabel !== undefined && { narrowLabel }),
|
|
104
|
+
...(Icon !== undefined && { accentColor: panel.accentColor }),
|
|
105
|
+
...(subText !== undefined && { sub: subText }),
|
|
106
|
+
...(delta !== undefined && { delta }),
|
|
107
|
+
...(spark !== undefined && { spark }),
|
|
108
|
+
...(link !== undefined && { link }),
|
|
109
|
+
} }));
|
|
110
|
+
}
|
|
111
|
+
function StatVariantCell({ variant, cell, }) {
|
|
112
|
+
if (variant === "strip-compact") {
|
|
113
|
+
const { accentColor: _unused, ...boxCell } = cell;
|
|
114
|
+
return _jsx(StatBoxCell, { ...boxCell });
|
|
95
115
|
}
|
|
96
|
-
|
|
116
|
+
const { narrowLabel: _narrow, ...tileCell } = cell;
|
|
117
|
+
return variant === "strip" ? _jsx(StatStripCell, { ...tileCell }) : _jsx(StatCard, { ...tileCell, inset: true });
|
|
97
118
|
}
|
|
98
|
-
function
|
|
99
|
-
if (
|
|
100
|
-
return
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
return
|
|
106
|
-
href: nav.hrefFor(target, options),
|
|
107
|
-
onPress: () => nav.navigate(target, options),
|
|
108
|
-
};
|
|
119
|
+
function statValueText(rawValue, valueFormat, translate, formats) {
|
|
120
|
+
if (typeof rawValue !== "number") {
|
|
121
|
+
return (resolveDashboardText(rawValue, translate, formats) ??
|
|
122
|
+
fallbackText(rawValue, EMPTY_VALUE_PLACEHOLDER));
|
|
123
|
+
}
|
|
124
|
+
if (valueFormat?.kind === "relativeTime")
|
|
125
|
+
return formats.formatRelative(rawValue);
|
|
126
|
+
return formats.formatPanelValue(valueFormat)(rawValue);
|
|
109
127
|
}
|
|
110
128
|
function readDelta(panel, record) {
|
|
111
129
|
if (panel.deltaField === undefined || panel.deltaDirectionField === undefined)
|
|
@@ -119,13 +137,6 @@ function readDelta(panel, record) {
|
|
|
119
137
|
const tone = readTone(panel.deltaToneField !== undefined ? record[panel.deltaToneField] : undefined);
|
|
120
138
|
return { value: String(value), direction, ...(tone !== undefined && { tone }) };
|
|
121
139
|
}
|
|
122
|
-
export function StatGroupPanelBody({ panel, label, screenId, screenParams, translate, }) {
|
|
123
|
-
const testId = `dashboard-panel-${panel.id}`;
|
|
124
|
-
if (label === undefined) {
|
|
125
|
-
return (_jsx("div", { "data-testid": testId, className: "grid grid-cols-2 gap-y-2 rounded-lg border border-border bg-card py-1 lg:auto-cols-fr lg:grid-flow-col lg:divide-x lg:divide-border-row", children: panel.stats.map((stat) => (_jsx(StatPanelBody, { panel: stat, label: translate(stat.label), screenId: screenId, screenParams: screenParams, translate: translate, variant: "strip" }, stat.id))) }));
|
|
126
|
-
}
|
|
127
|
-
return (_jsx(SectionCard, { title: label, ...(panel.subtitle !== undefined && { subtitle: translate(panel.subtitle) }), testId: testId, children: _jsx("section", { className: STAT_CARD_GRID_CLASSES, children: panel.stats.map((stat) => (_jsx(StatPanelBody, { panel: stat, label: translate(stat.label), screenId: screenId, screenParams: screenParams, translate: translate, variant: "card" }, stat.id))) }) }));
|
|
128
|
-
}
|
|
129
140
|
function markerKindColor(kind) {
|
|
130
141
|
if (kind === undefined)
|
|
131
142
|
return undefined;
|
|
@@ -239,29 +250,6 @@ export function ChartPanelBody({ panel, label, screenParams, translate, }) {
|
|
|
239
250
|
}), ariaLabel: label, testId: testId }));
|
|
240
251
|
} }));
|
|
241
252
|
}
|
|
242
|
-
export function ListPanelBody({ panel, label, featureName, screenParams, translate, }) {
|
|
243
|
-
const { formatPercent, formatNumber, formatDateTime } = useDashboardFormats();
|
|
244
|
-
const columns = panel.columns.map((c) => {
|
|
245
|
-
const normalized = normalizeListColumn(c);
|
|
246
|
-
return {
|
|
247
|
-
field: normalized.field,
|
|
248
|
-
label: translate(normalized.label ?? normalized.field),
|
|
249
|
-
...(normalized.display !== undefined && { display: normalized.display }),
|
|
250
|
-
...(normalized.badgeToneField !== undefined && {
|
|
251
|
-
badgeToneField: normalized.badgeToneField,
|
|
252
|
-
}),
|
|
253
|
-
...(normalized.refEntity !== undefined && {
|
|
254
|
-
reference: {
|
|
255
|
-
refEntity: normalized.refEntity,
|
|
256
|
-
...(normalized.refLabelField !== undefined && {
|
|
257
|
-
refLabelField: normalized.refLabelField,
|
|
258
|
-
}),
|
|
259
|
-
},
|
|
260
|
-
}),
|
|
261
|
-
};
|
|
262
|
-
});
|
|
263
|
-
return (_jsx(QueryPanel, { panel: panel, label: label, screenParams: screenParams, translate: translate, skeleton: "rows", isEmpty: (data) => (data.rows ?? []).length === 0, children: (data) => (_jsx(DashboardReferenceListTable, { columns: columns, rows: data.rows ?? [], featureName: featureName, formatPercent: formatPercent, formatNumber: formatNumber, formatDateTime: formatDateTime, translate: translate })) }));
|
|
264
|
-
}
|
|
265
253
|
export function FeedPanelBody({ panel, label, screenParams, translate, }) {
|
|
266
254
|
return (_jsx(QueryPanel, { panel: panel, label: label, screenParams: screenParams, translate: translate, skeleton: "rows", isEmpty: (data) => (data.rows ?? []).length === 0, children: (data, formats) => {
|
|
267
255
|
const rows = (data.rows ?? []).map((row, i) => {
|
|
@@ -327,62 +315,6 @@ export function ProgressListPanelBody({ panel, label, screenParams, translate, }
|
|
|
327
315
|
return _jsx(ProgressList, { rows: rows });
|
|
328
316
|
} }));
|
|
329
317
|
}
|
|
330
|
-
function TextBlockView({ block, translate, }) {
|
|
331
|
-
switch (block.kind) {
|
|
332
|
-
case "heading":
|
|
333
|
-
return (_jsx("h3", { "data-block": "heading", className: "text-sm font-semibold text-foreground", children: translate(block.text) }));
|
|
334
|
-
case "paragraph":
|
|
335
|
-
return (_jsx("p", { "data-block": "paragraph", className: block.emphasis === "strong"
|
|
336
|
-
? "text-sm font-medium text-foreground"
|
|
337
|
-
: "text-sm text-muted-foreground", children: translate(block.text) }));
|
|
338
|
-
case "list":
|
|
339
|
-
return (_jsx("ul", { "data-block": "list", className: "list-disc space-y-1 pl-5 text-sm text-muted-foreground", children: withOccurrenceKeys(block.items, (item) => item).map(({ entry, key }) => (_jsx("li", { children: translate(entry) }, key))) }));
|
|
340
|
-
case "code":
|
|
341
|
-
return (_jsx("pre", { "data-block": "code", className: "overflow-x-auto rounded-md bg-muted p-3 text-xs", children: _jsx("code", { children: block.code }) }));
|
|
342
|
-
case "hint":
|
|
343
|
-
return (_jsx("p", { "data-block": "hint", className: "text-xs text-muted-foreground", children: translate(block.text) }));
|
|
344
|
-
case "link":
|
|
345
|
-
return _jsx(TextBlockLink, { block: block, translate: translate });
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
function TextBlockLink({ block, translate, }) {
|
|
349
|
-
const { Link } = usePrimitives();
|
|
350
|
-
const nav = useNav();
|
|
351
|
-
const userRoles = useUserRoles();
|
|
352
|
-
if (block.roles !== undefined && !block.roles.some((role) => userRoles?.includes(role))) {
|
|
353
|
-
return null;
|
|
354
|
-
}
|
|
355
|
-
const target = { screenId: lastSegment(block.screen) };
|
|
356
|
-
return (_jsx(Link, { href: nav.hrefFor(target), onPress: () => nav.navigate(target), testId: `dashboard-text-link-${target.screenId}`, children: translate(block.text) }));
|
|
357
|
-
}
|
|
358
|
-
// Content-derived keys collide for identical entries; the occurrence count keeps them unique.
|
|
359
|
-
function withOccurrenceKeys(entries, contentKey) {
|
|
360
|
-
const seen = new Map();
|
|
361
|
-
return entries.map((entry) => {
|
|
362
|
-
const content = contentKey(entry);
|
|
363
|
-
const occurrence = seen.get(content) ?? 0;
|
|
364
|
-
seen.set(content, occurrence + 1);
|
|
365
|
-
return { entry, key: `${content}#${occurrence}` };
|
|
366
|
-
});
|
|
367
|
-
}
|
|
368
|
-
function textBlockKey(block) {
|
|
369
|
-
switch (block.kind) {
|
|
370
|
-
case "list":
|
|
371
|
-
return `list:${block.items.join("|")}`;
|
|
372
|
-
case "code":
|
|
373
|
-
return `code:${block.code}`;
|
|
374
|
-
default:
|
|
375
|
-
return `${block.kind}:${block.text}`;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
export function TextPanelBody({ panel, label, translate, }) {
|
|
379
|
-
const blocks = (_jsx("div", { className: "flex flex-col gap-3", children: withOccurrenceKeys(panel.blocks, textBlockKey).map(({ entry, key }) => (_jsx(TextBlockView, { block: entry, translate: translate }, key))) }));
|
|
380
|
-
const testId = `dashboard-panel-${panel.id}`;
|
|
381
|
-
if (label !== undefined) {
|
|
382
|
-
return (_jsx(PanelShell, { testId: testId, title: label, children: blocks }));
|
|
383
|
-
}
|
|
384
|
-
return (_jsx("section", { "data-testid": testId, className: "h-full rounded-lg border border-border bg-card p-4 text-card-foreground", children: blocks }));
|
|
385
|
-
}
|
|
386
318
|
// Resolves panel.component through the same extensionSectionComponents
|
|
387
319
|
// registry as entityEdit extension sections and list header slots; it
|
|
388
320
|
// stays at its array position instead of moving into a separate slot (see
|
|
@@ -12,6 +12,10 @@ type Props = Omit<ComponentProps<typeof DashboardListTable>, "columns"> & {
|
|
|
12
12
|
readonly columns: readonly DashboardListTableColumn[];
|
|
13
13
|
readonly featureName: string;
|
|
14
14
|
readonly translate: Translate;
|
|
15
|
+
/** Phone layout: one card per row instead of the table. */
|
|
16
|
+
readonly narrowCards?: boolean;
|
|
17
|
+
/** Row field whose text replaces the card title in the phone layout. */
|
|
18
|
+
readonly titleField?: string;
|
|
15
19
|
};
|
|
16
|
-
export declare function DashboardReferenceListTable({ columns, rows, featureName, translate, ...tableProps }: Props): ReactNode;
|
|
20
|
+
export declare function DashboardReferenceListTable({ columns, rows, featureName, translate, narrowCards, titleField, ...tableProps }: Props): ReactNode;
|
|
17
21
|
export {};
|
|
@@ -6,6 +6,7 @@ import { renderReferenceLookupBridges } from "../../components/render-list-refer
|
|
|
6
6
|
import { enrichReferenceColumns, selectReferenceColumns, } from "../../components/render-list-reference-columns.js";
|
|
7
7
|
import { useReferenceColumnLookups } from "../../components/use-reference-column-lookups.js";
|
|
8
8
|
import { DashboardListTable } from "../widgets/dashboard-list.js";
|
|
9
|
+
import { DashboardListCards } from "../widgets/dashboard-list-cards.js";
|
|
9
10
|
function toReferenceViewColumn(column, featureName) {
|
|
10
11
|
if (column.reference === undefined)
|
|
11
12
|
return undefined;
|
|
@@ -18,11 +19,12 @@ function toReferenceViewColumn(column, featureName) {
|
|
|
18
19
|
refEntity: target.entityName,
|
|
19
20
|
refFeature: target.featureName,
|
|
20
21
|
refLabelField: column.reference.refLabelField ?? "id",
|
|
22
|
+
...(column.emptyPlaceholder !== undefined && { emptyPlaceholder: column.emptyPlaceholder }),
|
|
21
23
|
};
|
|
22
24
|
}
|
|
23
25
|
// Dashboard list rows carry raw ids; reference columns resolve them to the target's label
|
|
24
26
|
// the way entity lists do.
|
|
25
|
-
export function DashboardReferenceListTable({ columns, rows, featureName, translate, ...tableProps }) {
|
|
27
|
+
export function DashboardReferenceListTable({ columns, rows, featureName, translate, narrowCards = false, titleField, ...tableProps }) {
|
|
26
28
|
const viewColumns = useMemo(() => columns.flatMap((column) => {
|
|
27
29
|
const viewColumn = toReferenceViewColumn(column, featureName);
|
|
28
30
|
return viewColumn === undefined ? [] : [viewColumn];
|
|
@@ -39,9 +41,16 @@ export function DashboardReferenceListTable({ columns, rows, featureName, transl
|
|
|
39
41
|
translate,
|
|
40
42
|
}), [viewColumns, referenceColumns, referenceLookups, resolveReferenceLink, featureName, translate]);
|
|
41
43
|
const tableColumns = columns.map((column) => {
|
|
42
|
-
const
|
|
44
|
+
const enrichedColumn = enriched.find((c) => c.field === column.field);
|
|
45
|
+
const renderer = enrichedColumn?.renderer;
|
|
43
46
|
const { reference: _reference, ...base } = column;
|
|
44
|
-
|
|
47
|
+
if (typeof renderer !== "function")
|
|
48
|
+
return base;
|
|
49
|
+
return {
|
|
50
|
+
...base,
|
|
51
|
+
renderValue: renderer,
|
|
52
|
+
...(enrichedColumn?.linkFor !== undefined && { linkFor: enrichedColumn.linkFor }),
|
|
53
|
+
};
|
|
45
54
|
});
|
|
46
|
-
return (_jsxs(_Fragment, { children: [renderReferenceLookupBridges(referenceRequests, handleLookupMap), _jsx(DashboardListTable, { columns: tableColumns, rows: rows, translate: translate, ...tableProps })] }));
|
|
55
|
+
return (_jsxs(_Fragment, { children: [renderReferenceLookupBridges(referenceRequests, handleLookupMap), narrowCards ? (_jsx(DashboardListCards, { columns: tableColumns, rows: rows, translate: translate, formatPercent: tableProps.formatPercent, formatNumber: tableProps.formatNumber, formatDateTime: tableProps.formatDateTime, ...(tableProps.testId !== undefined && { testId: tableProps.testId }), ...(tableProps.rowToneField !== undefined && { rowToneField: tableProps.rowToneField }), ...(titleField !== undefined && { titleField }) })) : (_jsx(DashboardListTable, { columns: tableColumns, rows: rows, translate: translate, ...tableProps }))] }));
|
|
47
56
|
}
|
|
@@ -2,8 +2,11 @@ import type { DashboardCurrencyFormat, DashboardPanelEmptyState, DashboardPanelQ
|
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
3
|
import { type Translate } from "../../headless/index.ts";
|
|
4
4
|
import { dispatcherErrorText, type UseQueryResult } from "../../index.ts";
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
5
|
+
export declare const STAT_PANEL = "lg:col-span-3";
|
|
6
|
+
export declare const WIDE_PANEL = "sm:col-span-2 lg:col-span-12";
|
|
7
|
+
export declare const HALF_PANEL = "sm:col-span-2 lg:col-span-6";
|
|
8
|
+
export declare const THIRD_PANEL = "lg:col-span-4";
|
|
9
|
+
export declare const TWO_THIRDS_PANEL = "sm:col-span-2 lg:col-span-8";
|
|
7
10
|
export declare const HOUR_MS = 3600000;
|
|
8
11
|
export declare const DAY_MS: number;
|
|
9
12
|
export type ScreenParams = {
|
|
@@ -41,6 +44,8 @@ export type DashboardFormats = {
|
|
|
41
44
|
readonly formatMonth: (atMs: number) => string;
|
|
42
45
|
readonly formatHour: (atMs: number) => string;
|
|
43
46
|
readonly formatDateTime: (atMs: number) => string;
|
|
47
|
+
/** Weekday and full date, no time: "Tuesday, 3 November 2026". */
|
|
48
|
+
readonly formatLongDate: (atMs: number) => string;
|
|
44
49
|
readonly formatMedium: (atMs: number) => string;
|
|
45
50
|
readonly formatMinor: (amountMinor: number, currency: string, fractionDigits?: number) => string;
|
|
46
51
|
/** "5 minutes ago"; the component that called `useDashboardFormats` redraws on a
|
|
@@ -52,11 +57,13 @@ export type DashboardFormats = {
|
|
|
52
57
|
readonly formatPanelAxisValue: (valueFormat: DashboardCurrencyFormat | undefined) => (value: number) => string;
|
|
53
58
|
};
|
|
54
59
|
export declare function useDashboardFormats(): DashboardFormats;
|
|
55
|
-
export declare function PanelShell({ testId, title, subtitle, action, children, }: {
|
|
60
|
+
export declare function PanelShell({ testId, title, subtitle, action, footer, children, }: {
|
|
56
61
|
readonly testId: string;
|
|
57
|
-
|
|
62
|
+
/** Without a title the panel has no header (a titleless stat-group). */
|
|
63
|
+
readonly title?: string;
|
|
58
64
|
readonly subtitle?: string;
|
|
59
65
|
readonly action?: ReactNode;
|
|
66
|
+
readonly footer?: ReactNode;
|
|
60
67
|
readonly children: ReactNode;
|
|
61
68
|
}): ReactNode;
|
|
62
69
|
export declare function PanelError({ label, error, onRetry, testId, }: {
|
|
@@ -66,14 +73,23 @@ export declare function PanelError({ label, error, onRetry, testId, }: {
|
|
|
66
73
|
readonly testId?: string;
|
|
67
74
|
}): ReactNode;
|
|
68
75
|
type SkeletonShape = "bars" | "segments" | "rows";
|
|
76
|
+
export declare function PanelSkeleton({ shape }: {
|
|
77
|
+
readonly shape: SkeletonShape;
|
|
78
|
+
}): ReactNode;
|
|
69
79
|
type QueryPanelProps<TData> = {
|
|
70
80
|
readonly panel: DashboardPanelQueryOptions & DashboardPanelEmptyState & {
|
|
71
81
|
readonly id: string;
|
|
72
82
|
readonly query: string;
|
|
73
83
|
};
|
|
74
84
|
readonly label: string;
|
|
75
|
-
|
|
85
|
+
/** A function derives the line from the loaded data (e.g. "n of m"); `staticSubtitle` stands in until then. */
|
|
86
|
+
readonly subtitle?: string | ((data: TData) => string | undefined);
|
|
87
|
+
readonly staticSubtitle?: string;
|
|
76
88
|
readonly action?: ReactNode;
|
|
89
|
+
/** Rendered under the body, only once data is shown. */
|
|
90
|
+
readonly footer?: (data: TData) => ReactNode;
|
|
91
|
+
/** Replaces the whole panel shell once data is shown, e.g. a one-line summary on phones. */
|
|
92
|
+
readonly replaceShell?: (data: TData) => ReactNode;
|
|
77
93
|
readonly screenParams: ScreenParams;
|
|
78
94
|
readonly translate: Translate;
|
|
79
95
|
readonly skeleton: SkeletonShape;
|
|
@@ -82,11 +98,11 @@ type QueryPanelProps<TData> = {
|
|
|
82
98
|
* redraws this panel and nothing else. */
|
|
83
99
|
readonly children: (data: TData, formats: DashboardFormats) => ReactNode;
|
|
84
100
|
};
|
|
85
|
-
export declare function QueryPanel<TData>({ panel, label, subtitle, action, screenParams, translate, skeleton, isEmpty, children, }: QueryPanelProps<TData>): ReactNode;
|
|
101
|
+
export declare function QueryPanel<TData>({ panel, label, subtitle, staticSubtitle, action, footer, replaceShell, screenParams, translate, skeleton, isEmpty, children, }: QueryPanelProps<TData>): ReactNode;
|
|
86
102
|
export declare function useLoadedAt(screenParams: ScreenParams): {
|
|
87
103
|
readonly loadedAtMs: number;
|
|
88
104
|
readonly reportLoaded: (atMs: number) => void;
|
|
89
105
|
};
|
|
90
106
|
export declare const PanelLoadedContext: import("react").Context<(atMs: number) => void>;
|
|
91
|
-
export declare function useReportPanelLoaded(data: unknown): void;
|
|
107
|
+
export declare function useReportPanelLoaded(data: unknown, loading: boolean): void;
|
|
92
108
|
export {};
|
|
@@ -2,14 +2,20 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { createContext, useCallback, useContext, useEffect, useRef, useState, } from "react";
|
|
3
3
|
import { currencyDecimals } from "../../headless/index.js";
|
|
4
4
|
import { dispatcherErrorText, useLocale, usePrimitives, useQuery, useTranslation, } from "../../index.js";
|
|
5
|
+
import { serverNowMs } from "../../server-clock.js";
|
|
6
|
+
import { cn } from "../lib/cn.js";
|
|
5
7
|
import { resolveSafeLocale } from "../primitives/locale-number.js";
|
|
6
8
|
import { formatMoney } from "../primitives/money-input.js";
|
|
7
9
|
import { Skeleton } from "../ui/skeleton.js";
|
|
8
10
|
import { EmptyState, LoadingState } from "../widgets/states.js";
|
|
9
11
|
import { useRelativeTimeFormatter } from "./relative-time.js";
|
|
10
12
|
const SKELETON_SEGMENT_WIDTHS = ["100%", "72%", "48%"];
|
|
11
|
-
|
|
12
|
-
export const
|
|
13
|
+
// The dashboard grid has twelve columns on wide screens, so a stat tile is a quarter of the row.
|
|
14
|
+
export const STAT_PANEL = "lg:col-span-3";
|
|
15
|
+
export const WIDE_PANEL = "sm:col-span-2 lg:col-span-12";
|
|
16
|
+
export const HALF_PANEL = "sm:col-span-2 lg:col-span-6";
|
|
17
|
+
export const THIRD_PANEL = "lg:col-span-4";
|
|
18
|
+
export const TWO_THIRDS_PANEL = "sm:col-span-2 lg:col-span-8";
|
|
13
19
|
const CURRENCY_CODE_PATTERN = /^[A-Za-z]{3}$/;
|
|
14
20
|
export const HOUR_MS = 3_600_000;
|
|
15
21
|
export const DAY_MS = 24 * HOUR_MS;
|
|
@@ -80,6 +86,7 @@ export function useDashboardFormats() {
|
|
|
80
86
|
timeStyle: "short",
|
|
81
87
|
timeZone,
|
|
82
88
|
});
|
|
89
|
+
const longDate = new Intl.DateTimeFormat(locale, { dateStyle: "full", timeZone });
|
|
83
90
|
const medium = new Intl.DateTimeFormat(locale, { dateStyle: "medium", timeZone });
|
|
84
91
|
const formatMinor = (amountMinor, currency, fractionDigits) => formatMoney(amountMinor, currency, locale, fractionDigits);
|
|
85
92
|
return {
|
|
@@ -108,17 +115,18 @@ export function useDashboardFormats() {
|
|
|
108
115
|
formatMonth: (atMs) => month.format(atMs),
|
|
109
116
|
formatHour: (atMs) => hour.format(atMs),
|
|
110
117
|
formatDateTime: (atMs) => dateTime.format(atMs),
|
|
118
|
+
formatLongDate: (atMs) => longDate.format(atMs),
|
|
111
119
|
};
|
|
112
120
|
}
|
|
113
|
-
export function PanelShell({ testId, title, subtitle, action, children, }) {
|
|
114
|
-
return (_jsxs("section", { "data-testid": testId, className: "flex h-full flex-col rounded-lg border border-border bg-card text-card-foreground", children: [_jsxs("header", { className: "flex
|
|
121
|
+
export function PanelShell({ testId, title, subtitle, action, footer, children, }) {
|
|
122
|
+
return (_jsxs("section", { "data-testid": testId, className: "flex h-full flex-col rounded-lg border border-border bg-card text-card-foreground shadow-[var(--card-shadow)]", children: [(title !== undefined || action !== undefined) && (_jsxs("header", { className: "flex shrink-0 flex-wrap items-baseline justify-between gap-x-3 gap-y-2 px-4 pt-3.5", children: [_jsxs("div", { className: "flex min-w-0 flex-col gap-0.5 sm:flex-row sm:flex-wrap sm:items-baseline sm:gap-x-2.5", children: [title !== undefined && _jsx("h2", { className: "text-sm font-semibold break-words", children: title }), subtitle !== undefined && (_jsx("p", { className: "text-[12.5px] text-muted-foreground", children: subtitle }))] }), action !== undefined && _jsx("div", { className: "shrink-0", children: action })] })), _jsx("div", { className: cn("grow px-4 pt-3", footer === undefined && "pb-4"), children: children }), footer !== undefined && (_jsx("footer", { className: "mx-4 mb-4 mt-2.5 flex shrink-0 flex-wrap items-center gap-x-1 border-t border-border-row pt-2.5 text-[12.5px] text-muted-foreground", children: footer }))] }));
|
|
115
123
|
}
|
|
116
124
|
export function PanelError({ label, error, onRetry, testId, }) {
|
|
117
125
|
const { Button } = usePrimitives();
|
|
118
126
|
const t = useTranslation();
|
|
119
127
|
return (_jsxs("div", { role: "alert", "data-testid": testId, className: "flex flex-col items-start gap-2 rounded-lg border border-dashed border-status-bad/40 px-4 py-6 text-sm", children: [_jsx("div", { className: "font-medium text-status-bad", children: t("kumiko.dashboard.panel.error.title", { label }) }), _jsx("div", { className: "text-muted-foreground", children: dispatcherErrorText(error, t) }), _jsx(Button, { variant: "secondary", onClick: onRetry, children: t("kumiko.dashboard.panel.error.retry") }), _jsx("div", { className: "text-xs text-muted-foreground", children: t("kumiko.dashboard.panel.error.isolated") })] }));
|
|
120
128
|
}
|
|
121
|
-
function PanelSkeleton({ shape }) {
|
|
129
|
+
export function PanelSkeleton({ shape }) {
|
|
122
130
|
const t = useTranslation();
|
|
123
131
|
if (shape === "rows")
|
|
124
132
|
return _jsx(LoadingState, { rows: 3 });
|
|
@@ -127,11 +135,19 @@ function PanelSkeleton({ shape }) {
|
|
|
127
135
|
}
|
|
128
136
|
return (_jsx("output", { "aria-label": t("kumiko.widget.loading"), className: "flex h-40 items-end gap-1", children: SKELETON_BAR_HEIGHTS.map((height) => (_jsx(Skeleton, { className: "flex-1", style: { height } }, height))) }));
|
|
129
137
|
}
|
|
130
|
-
|
|
138
|
+
// Without loaded data the derived line cannot be computed; the static line keeps the header height
|
|
139
|
+
// from jumping when the data arrives.
|
|
140
|
+
function resolveSubtitle(subtitle, fallback, data) {
|
|
141
|
+
if (typeof subtitle !== "function")
|
|
142
|
+
return subtitle;
|
|
143
|
+
return data === undefined ? fallback : subtitle(data);
|
|
144
|
+
}
|
|
145
|
+
export function QueryPanel({ panel, label, subtitle, staticSubtitle, action, footer, replaceShell, screenParams, translate, skeleton, isEmpty, children, }) {
|
|
131
146
|
const formats = useDashboardFormats();
|
|
132
147
|
const { data, error, loading, refetch } = useDashboardQuery(panel.query, panelPayload(panel, screenParams));
|
|
133
|
-
useReportPanelLoaded(data);
|
|
148
|
+
useReportPanelLoaded(data, loading);
|
|
134
149
|
let body;
|
|
150
|
+
let shown;
|
|
135
151
|
if (loading && data === null) {
|
|
136
152
|
body = _jsx(PanelSkeleton, { shape: skeleton });
|
|
137
153
|
}
|
|
@@ -142,30 +158,42 @@ export function QueryPanel({ panel, label, subtitle, action, screenParams, trans
|
|
|
142
158
|
body = (_jsx(EmptyState, { title: translate(panel.emptyLabel ?? "kumiko.list.no-entries"), description: panel.emptyHint !== undefined ? translate(panel.emptyHint) : undefined }));
|
|
143
159
|
}
|
|
144
160
|
else {
|
|
161
|
+
shown = data;
|
|
145
162
|
body = children(data, formats);
|
|
146
163
|
}
|
|
147
|
-
|
|
164
|
+
if (shown !== undefined && replaceShell !== undefined)
|
|
165
|
+
return replaceShell(shown);
|
|
166
|
+
return (_jsx(PanelShell, { testId: `dashboard-panel-${panel.id}`, title: label, subtitle: resolveSubtitle(subtitle, staticSubtitle, shown), action: action, footer: shown !== undefined ? footer?.(shown) : undefined, children: body }));
|
|
148
167
|
}
|
|
149
168
|
// Starts at render time and restarts whenever the merged query params change;
|
|
150
169
|
// panels additionally report each successful (re)load, so live refetches and
|
|
151
|
-
// retries keep the stamp current.
|
|
170
|
+
// retries keep the stamp current. An older report never replaces a newer answer-based stamp;
|
|
171
|
+
// the render-time stamp is only a guess from the device clock until the first answer, so
|
|
172
|
+
// that answer wins even when the app clock is pinned behind the device.
|
|
152
173
|
export function useLoadedAt(screenParams) {
|
|
153
174
|
const paramsKey = JSON.stringify([
|
|
154
175
|
screenParams.filterParams,
|
|
155
176
|
screenParams.rangeParams,
|
|
156
177
|
screenParams.recordParams,
|
|
157
178
|
]);
|
|
158
|
-
const [loaded, setLoaded] = useState(() => ({
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
179
|
+
const [loaded, setLoaded] = useState(() => ({
|
|
180
|
+
paramsKey,
|
|
181
|
+
atMs: serverNowMs(),
|
|
182
|
+
answered: false,
|
|
183
|
+
}));
|
|
184
|
+
if (loaded.paramsKey !== paramsKey) {
|
|
185
|
+
setLoaded({ paramsKey, atMs: serverNowMs(), answered: false });
|
|
186
|
+
}
|
|
187
|
+
const reportLoaded = useCallback((atMs) => setLoaded((prev) => prev.answered && prev.atMs >= atMs ? prev : { ...prev, atMs, answered: true }), []);
|
|
162
188
|
return { loadedAtMs: loaded.atMs, reportLoaded };
|
|
163
189
|
}
|
|
164
190
|
export const PanelLoadedContext = createContext(() => { });
|
|
165
|
-
|
|
191
|
+
// While `loading`, `data` still holds the answer to the previous params (useQuery keeps it
|
|
192
|
+
// until the new one lands), so only a settled answer may stamp the header.
|
|
193
|
+
export function useReportPanelLoaded(data, loading) {
|
|
166
194
|
const reportLoaded = useContext(PanelLoadedContext);
|
|
167
195
|
useEffect(() => {
|
|
168
|
-
if (data !== null)
|
|
169
|
-
reportLoaded(
|
|
170
|
-
}, [data, reportLoaded]);
|
|
196
|
+
if (data !== null && !loading)
|
|
197
|
+
reportLoaded(serverNowMs());
|
|
198
|
+
}, [data, loading, reportLoaded]);
|
|
171
199
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DashboardStatGroupPanel } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import type { Translate } from "../../headless/index.ts";
|
|
4
|
+
import "../react-css-custom-properties.ts";
|
|
5
|
+
import { type ScreenParams } from "./dashboard-shared.tsx";
|
|
6
|
+
type StatGroupProps = {
|
|
7
|
+
readonly panel: DashboardStatGroupPanel;
|
|
8
|
+
readonly label: string | undefined;
|
|
9
|
+
readonly screenId: string;
|
|
10
|
+
readonly screenParams: ScreenParams;
|
|
11
|
+
readonly translate: Translate;
|
|
12
|
+
};
|
|
13
|
+
export declare function StatGroupPanelBody(props: StatGroupProps): ReactNode;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronRight } from "lucide-react";
|
|
3
|
+
import { useNav } from "../../app/nav.js";
|
|
4
|
+
import { navigateTargetAllows } from "../../app/screen-access.js";
|
|
5
|
+
import { extensionSectionName, useAppFeatures, useExtensionSectionComponent, usePrimitives, useUserRoles, } from "../../index.js";
|
|
6
|
+
import { cn } from "../lib/cn.js";
|
|
7
|
+
import "../react-css-custom-properties.js";
|
|
8
|
+
import { STAT_CARD_GRID_CLASSES } from "../widgets/stat.js";
|
|
9
|
+
import { dashboardNavigationLink } from "./dashboard-navigation-link.js";
|
|
10
|
+
import { StatPanelBody, useStatNavigateAllowed } from "./dashboard-panels.js";
|
|
11
|
+
import { PanelShell } from "./dashboard-shared.js";
|
|
12
|
+
// Literal class strings: Tailwind only emits classes it can read in the source.
|
|
13
|
+
const STAT_CARD_COLUMN_CLASSES = {
|
|
14
|
+
2: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
15
|
+
3: "grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3",
|
|
16
|
+
4: "grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-4",
|
|
17
|
+
};
|
|
18
|
+
// Literal class strings: Tailwind only emits classes it can read in the source.
|
|
19
|
+
const PHONE_STRIP_TONE_CLASS = {
|
|
20
|
+
accent: "max-sm:border-transparent max-sm:bg-primary/10",
|
|
21
|
+
ok: "max-sm:border-transparent max-sm:bg-status-ok-surface",
|
|
22
|
+
warn: "max-sm:border-transparent max-sm:bg-status-warn-surface",
|
|
23
|
+
bad: "max-sm:border-transparent max-sm:bg-status-bad-surface",
|
|
24
|
+
critical: "max-sm:border-transparent max-sm:bg-status-critical-surface",
|
|
25
|
+
neutral: "",
|
|
26
|
+
};
|
|
27
|
+
function StatGroupLink({ link, translate, stretchOnNarrow, }) {
|
|
28
|
+
const { Link } = usePrimitives();
|
|
29
|
+
const nav = useNav();
|
|
30
|
+
const appFeatures = useAppFeatures();
|
|
31
|
+
const userRoles = useUserRoles();
|
|
32
|
+
if (!navigateTargetAllows({ screen: link.screen }, appFeatures, userRoles))
|
|
33
|
+
return null;
|
|
34
|
+
const target = dashboardNavigationLink(nav, link);
|
|
35
|
+
return (_jsxs(Link, { href: target.href, onPress: target.onPress, testId: "dashboard-stat-group-link", className: stretchOnNarrow
|
|
36
|
+
? "ml-auto flex shrink-0 items-center gap-1 text-sm font-medium max-sm:after:absolute max-sm:after:inset-0"
|
|
37
|
+
: "ml-auto flex shrink-0 items-center gap-1 text-sm font-medium", children: [_jsx("span", { className: stretchOnNarrow ? "max-sm:sr-only" : undefined, children: translate(link.label) }), _jsx(ChevronRight, { className: "size-4", "aria-hidden": "true" })] }));
|
|
38
|
+
}
|
|
39
|
+
function StatCells({ panel, screenId, screenParams, translate, variant, }) {
|
|
40
|
+
return panel.stats.map((stat) => (_jsx(StatPanelBody, { panel: stat, label: translate(stat.label), screenId: screenId, screenParams: screenParams, translate: translate, variant: variant }, stat.id)));
|
|
41
|
+
}
|
|
42
|
+
function FlatStatStrip(props) {
|
|
43
|
+
const { panel, translate } = props;
|
|
44
|
+
return (_jsxs("div", { "data-testid": `dashboard-panel-${panel.id}`, className: "rounded-lg border border-border bg-card py-1 lg:flex lg:items-center", children: [_jsx("div", { className: "grid grow grid-cols-2 gap-y-2 lg:auto-cols-fr lg:grid-flow-col lg:divide-x lg:divide-border-row", children: _jsx(StatCells, { ...props, variant: "strip" }) }), panel.link !== undefined && (_jsx("div", { className: "flex px-4 max-lg:pt-1 lg:shrink-0", children: _jsx(StatGroupLink, { link: panel.link, translate: translate, stretchOnNarrow: false }) }))] }));
|
|
45
|
+
}
|
|
46
|
+
function PhoneStripIcon({ panel, screenId, screenParams, }) {
|
|
47
|
+
const Icon = useExtensionSectionComponent(panel.icon !== undefined ? extensionSectionName(panel.icon) : undefined);
|
|
48
|
+
if (Icon === undefined)
|
|
49
|
+
return null;
|
|
50
|
+
return (_jsx("span", { className: "flex shrink-0 items-center self-center sm:hidden", children: _jsx(Icon, { entityName: screenId, entityId: null, screenId: screenId, filterParams: screenParams.filterParams }) }));
|
|
51
|
+
}
|
|
52
|
+
function TitledStatStrip(props) {
|
|
53
|
+
const { panel, label, translate } = props;
|
|
54
|
+
const navigateAllowed = useStatNavigateAllowed();
|
|
55
|
+
const stats = panel.stats.filter(navigateAllowed);
|
|
56
|
+
return (_jsxs("div", { "data-testid": `dashboard-panel-${panel.id}`, "data-narrow-tone": panel.narrow?.tone, style: { "--stat-count": stats.length }, className: cn(
|
|
57
|
+
// Board grid: title column, one equal column per stat, link column.
|
|
58
|
+
panel.link === undefined
|
|
59
|
+
? "sm:[grid-template-columns:190px_repeat(var(--stat-count),minmax(0,1fr))]"
|
|
60
|
+
: "sm:[grid-template-columns:190px_repeat(var(--stat-count),minmax(0,1fr))_auto]", "relative flex items-center gap-x-4 rounded-lg border border-border bg-card px-4 py-3 shadow-[var(--card-shadow)] sm:grid sm:gap-x-3 max-sm:items-baseline max-sm:gap-x-2 max-sm:overflow-hidden max-sm:py-2 max-sm:font-medium", panel.narrow?.tone !== undefined && PHONE_STRIP_TONE_CLASS[panel.narrow.tone]), children: [_jsx(PhoneStripIcon, { panel: panel, screenId: props.screenId, screenParams: props.screenParams }), _jsxs("div", { className: "flex min-w-0 shrink-0 flex-col max-sm:flex-row max-sm:items-baseline", children: [_jsx("h2", { className: "text-sm font-semibold max-sm:after:ml-2 max-sm:after:font-normal max-sm:after:text-muted-foreground max-sm:after:content-['\u00B7']", children: label }), panel.subtitle !== undefined && (_jsx("p", { className: "text-xs text-muted-foreground max-sm:hidden", children: translate(panel.subtitle) }))] }), _jsx("div", { className: "flex min-w-0 items-stretch gap-3 sm:contents max-sm:block max-sm:grow max-sm:truncate max-sm:text-sm", children: stats.map((stat) => (_jsx("div", { className: `flex min-w-0 max-sm:inline max-sm:[&_a]:inline max-sm:[&:not(:last-child)]:after:mx-1.5 max-sm:[&:not(:last-child)]:after:text-muted-foreground max-sm:[&:not(:last-child)]:after:content-['·'] [&>*]:min-w-0${stat.navigate !== undefined ? " max-sm:relative max-sm:z-10" : ""}`, children: _jsx(StatPanelBody, { panel: stat, label: translate(stat.label), screenId: props.screenId, screenParams: props.screenParams, translate: translate, variant: "strip-compact" }) }, stat.id))) }), panel.link !== undefined && (_jsx(StatGroupLink, { link: panel.link, translate: translate, stretchOnNarrow: true }))] }));
|
|
61
|
+
}
|
|
62
|
+
export function StatGroupPanelBody(props) {
|
|
63
|
+
const { panel, label, translate } = props;
|
|
64
|
+
const layout = panel.layout ?? (label === undefined ? "strip" : "cards");
|
|
65
|
+
if (layout === "strip") {
|
|
66
|
+
return label === undefined ? (_jsx(FlatStatStrip, { ...props })) : (_jsx(TitledStatStrip, { ...props, label: label }));
|
|
67
|
+
}
|
|
68
|
+
const cells = (_jsx("section", { className: panel.columns === undefined
|
|
69
|
+
? STAT_CARD_GRID_CLASSES
|
|
70
|
+
: STAT_CARD_COLUMN_CLASSES[panel.columns], children: _jsx(StatCells, { ...props, variant: "card" }) }));
|
|
71
|
+
return (_jsx(PanelShell, { testId: `dashboard-panel-${panel.id}`, ...(label !== undefined && { title: label }), ...(panel.subtitle !== undefined && { subtitle: translate(panel.subtitle) }), ...(panel.link !== undefined && {
|
|
72
|
+
action: _jsx(StatGroupLink, { link: panel.link, translate: translate, stretchOnNarrow: false }),
|
|
73
|
+
}), children: cells }));
|
|
74
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DashboardTextPanel } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import type { Translate } from "../../headless/index.ts";
|
|
4
|
+
import { type ScreenParams } from "./dashboard-shared.tsx";
|
|
5
|
+
type TextPanelBodyProps = {
|
|
6
|
+
readonly panel: DashboardTextPanel;
|
|
7
|
+
readonly label: string | undefined;
|
|
8
|
+
readonly screenParams: ScreenParams;
|
|
9
|
+
readonly translate: Translate;
|
|
10
|
+
};
|
|
11
|
+
export declare function TextPanelBody(props: TextPanelBodyProps): ReactNode;
|
|
12
|
+
export {};
|