@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
|
@@ -31,16 +31,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
31
31
|
// rule that NavDefinition.access follows)
|
|
32
32
|
import { isUiAccessGranted } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
33
33
|
import { useCallback, useLayoutEffect, useMemo } from "react";
|
|
34
|
-
import { qualifyNavId, toAppSchema, UserRolesProvider, useNav, useTranslation, } from "../../index.js";
|
|
34
|
+
import { qualifyNavId, ScreenFocusProvider, toAppSchema, UserRolesProvider, useNav, useTranslation, } from "../../index.js";
|
|
35
35
|
import { useResolvers } from "../app/resolvers-context.js";
|
|
36
36
|
import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarInset, SidebarProvider, SidebarRail, } from "../ui/sidebar.js";
|
|
37
37
|
import { EditorPanel } from "./editor-panel.js";
|
|
38
38
|
import { fillClasses } from "./fill-classes.js";
|
|
39
|
-
import { FocusAwareSidebarBody,
|
|
39
|
+
import { FocusAwareSidebarBody, sidebarProviderProps } from "./focus-aware-sidebar.js";
|
|
40
40
|
import { lastSegment, NavTree } from "./nav-tree.js";
|
|
41
41
|
import { PageHeaderSlotProvider } from "./page-header-slot.js";
|
|
42
42
|
import { ShellFocusProvider, useShellFocusHost } from "./shell-focus.js";
|
|
43
43
|
import { ShellHeader } from "./shell-header.js";
|
|
44
|
+
import { usePersistedSidebarOpen } from "./sidebar-open-state.js";
|
|
44
45
|
import { SidebarPanelProvider, useSidebarPanelHost } from "./sidebar-panel.js";
|
|
45
46
|
import { parseTargetFromSearchParams } from "./target-url.js";
|
|
46
47
|
import { WorkspaceSwitcher } from "./workspace-switcher.js";
|
|
@@ -152,8 +153,9 @@ export function WorkspaceShell({ brand, schema, topbarActions, user, initialWork
|
|
|
152
153
|
// The second column appears only when a screen fills it (sidebar-09 pattern);
|
|
153
154
|
// otherwise every other screen would have an empty strip beside the navigation.
|
|
154
155
|
const panel = useSidebarPanelHost();
|
|
155
|
-
const focus = useShellFocusHost();
|
|
156
|
-
|
|
156
|
+
const focus = useShellFocusHost(topbarActions);
|
|
157
|
+
const sidebarOpen = usePersistedSidebarOpen();
|
|
158
|
+
return (_jsx(ScreenFocusProvider, { children: _jsx(SidebarProvider, { ...fillCls.provider, ...sidebarProviderProps(focus, sidebarOpen), children: _jsx(ShellFocusProvider, { value: focus.value, children: _jsxs(SidebarPanelProvider, { value: panel.value, children: [_jsxs(Sidebar, { collapsible: "icon", mobileTitle: t("kumiko.sidebar.title"), mobileDescription: t("kumiko.sidebar.description"), children: [_jsxs(FocusAwareSidebarBody, { focused: focus.focused, brand: brand, schema: app, user: user, allowedNavQns: allowedNavQns, railNavQns: focusRailNavQns, footer: sidebarFooter, children: [_jsxs(SidebarHeader, { "data-kumiko-layout": "sidebar-header", children: [brand, switcher] }), _jsx(SidebarContent, { "data-kumiko-layout": "sidebar-nav", children: sidebarContent }), sidebarFooter !== undefined && (_jsx(SidebarFooter, { "data-kumiko-layout": "sidebar-footer", className: "border-t border-sidebar-border", children: sidebarFooter }))] }), _jsx(SidebarRail, { "aria-label": t("kumiko.sidebar.toggle"), title: t("kumiko.sidebar.toggle") })] }), _jsx("div", { ref: panel.ref, "data-kumiko-layout": "sidebar-panel", className: panel.occupied ? "flex h-svh shrink-0 flex-col" : "hidden" }), _jsx(SidebarInset, { className: fillCls.inset, children: _jsxs(PageHeaderSlotProvider, { children: [_jsx(ShellHeader, { schema: app, ...(user !== undefined && { user }), ...(allowedNavQns !== undefined && { allowedNavQns }), ...(topbarActions !== undefined && { headerActions: topbarActions }) }), _jsx("main", { className: fillCls.main, children: activeTarget !== undefined ? (_jsx(EditorPanel, { resolvers: resolvers })) : (_jsx(UserRolesProvider, { roles: user?.roles, children: children })) })] }) })] }) }) }) }));
|
|
157
159
|
}
|
|
158
160
|
// --- helpers (exported for tests) ---
|
|
159
161
|
export function filterByAccess(workspaces, userRoles) {
|
|
@@ -7,6 +7,6 @@ export declare class FileUploadFailedError extends Error {
|
|
|
7
7
|
readonly code?: string | undefined;
|
|
8
8
|
constructor(message: string, fromServer: boolean, httpStatus?: number | undefined, code?: string | undefined);
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
/** Posts one file to the stack's file endpoint (double-submit CSRF) and returns the new FileRef id,
|
|
11
|
+
* or the claim handle when the server issued one (anonymous uploads), which a save must submit. */
|
|
12
12
|
export declare function uploadFileRef(file: Blob, target?: FileRefTarget): Promise<string>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { propertyOf } from "@cosmicdrift/kumiko-types/type-guards";
|
|
2
2
|
import { CSRF_HEADER_NAME, readCsrfToken } from "../../live/index.js";
|
|
3
|
-
import { isSessionEndedError } from "../../session/session-ended.js";
|
|
4
3
|
import { buildFileUploadFormData } from "./file-upload-form-data.js";
|
|
5
4
|
/** Carries the server's own `error` message when the upload endpoint sent one. */
|
|
6
5
|
export class FileUploadFailedError extends Error {
|
|
@@ -14,13 +13,8 @@ export class FileUploadFailedError extends Error {
|
|
|
14
13
|
this.code = code;
|
|
15
14
|
}
|
|
16
15
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
cause.code !== undefined &&
|
|
20
|
-
cause.httpStatus !== undefined &&
|
|
21
|
-
isSessionEndedError({ code: cause.code, httpStatus: cause.httpStatus }));
|
|
22
|
-
}
|
|
23
|
-
/** Posts one file to the stack's file endpoint (double-submit CSRF) and returns the new FileRef id. */
|
|
16
|
+
/** Posts one file to the stack's file endpoint (double-submit CSRF) and returns the new FileRef id,
|
|
17
|
+
* or the claim handle when the server issued one (anonymous uploads), which a save must submit. */
|
|
24
18
|
export async function uploadFileRef(file, target) {
|
|
25
19
|
const csrf = readCsrfToken();
|
|
26
20
|
const res = await fetch("/api/files", {
|
|
@@ -30,6 +24,7 @@ export async function uploadFileRef(file, target) {
|
|
|
30
24
|
});
|
|
31
25
|
const json = await res.json().catch(() => ({}));
|
|
32
26
|
const id = propertyOf(json, "id");
|
|
27
|
+
const handle = propertyOf(json, "handle");
|
|
33
28
|
if (!res.ok || typeof id !== "string") {
|
|
34
29
|
const message = propertyOf(json, "error");
|
|
35
30
|
const code = propertyOf(json, "code");
|
|
@@ -37,5 +32,5 @@ export async function uploadFileRef(file, target) {
|
|
|
37
32
|
? new FileUploadFailedError(message, true, res.status, typeof code === "string" ? code : undefined)
|
|
38
33
|
: new FileUploadFailedError(`upload failed (${res.status})`, false, res.status);
|
|
39
34
|
}
|
|
40
|
-
return id;
|
|
35
|
+
return typeof handle === "string" ? handle : id;
|
|
41
36
|
}
|
|
@@ -25,6 +25,7 @@ export function usePresence({ entity, id, activity, focus, enabled = true, }) {
|
|
|
25
25
|
return;
|
|
26
26
|
let stopped = false;
|
|
27
27
|
let timer;
|
|
28
|
+
let latestRequest = 0;
|
|
28
29
|
const stop = () => {
|
|
29
30
|
stopped = true;
|
|
30
31
|
if (timer !== undefined)
|
|
@@ -37,6 +38,7 @@ export function usePresence({ entity, id, activity, focus, enabled = true, }) {
|
|
|
37
38
|
return;
|
|
38
39
|
const current = latest.current;
|
|
39
40
|
lastSentKey.current = stateKey(current.activity, current.focus);
|
|
41
|
+
const request = ++latestRequest;
|
|
40
42
|
const result = await dispatcher.write(PRESENCE_WRITES.heartbeat, {
|
|
41
43
|
entity,
|
|
42
44
|
id,
|
|
@@ -46,8 +48,11 @@ export function usePresence({ entity, id, activity, focus, enabled = true, }) {
|
|
|
46
48
|
// skip: the answer belongs to a record that is no longer open
|
|
47
49
|
if (stopped)
|
|
48
50
|
return;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
// An older answer arriving after a newer one would show a stale roster until the next beat.
|
|
52
|
+
if (result.isSuccess) {
|
|
53
|
+
if (request === latestRequest)
|
|
54
|
+
setOthers(result.data.others);
|
|
55
|
+
}
|
|
51
56
|
else if (isPermanentPresenceFailure(result.error))
|
|
52
57
|
stop();
|
|
53
58
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { BannerProps } from "../../index.ts";
|
|
3
3
|
import "../react-css-custom-properties.ts";
|
|
4
|
-
export declare function DefaultBanner({ variant, density, icon, title, titleTestId, children, parts, actions, actionsPlacement, padded, testId, id, }: BannerProps): ReactNode;
|
|
4
|
+
export declare function DefaultBanner({ variant, density, icon, title, titleTestId, children, parts, actions, actionsPlacement, padded, inline, testId, id, }: BannerProps): ReactNode;
|
|
@@ -31,11 +31,19 @@ function variantClass(variant, compact) {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
function BannerParts({ parts }) {
|
|
34
|
-
|
|
34
|
+
// Parts are a static ordered list; the occurrence counter keeps repeated texts (separators) unique.
|
|
35
|
+
const seen = new Map();
|
|
36
|
+
return parts?.map((part) => {
|
|
37
|
+
const base = `${part.strong === true ? "strong" : "plain"}:${part.text}`;
|
|
38
|
+
const occurrence = seen.get(base) ?? 0;
|
|
39
|
+
seen.set(base, occurrence + 1);
|
|
40
|
+
const key = `${base}:${occurrence}`;
|
|
41
|
+
return part.strong === true ? (_jsx("strong", { className: "font-semibold", children: part.text }, key)) : (_jsx("span", { children: part.text }, key));
|
|
42
|
+
});
|
|
35
43
|
}
|
|
36
|
-
function BannerText({ compact, title, titleTestId, children, parts, actionsBelow, }) {
|
|
37
|
-
if (compact) {
|
|
38
|
-
return (_jsxs("div", { className: "min-w-0 grow", children: [title !== undefined && (_jsxs(_Fragment, { children: [_jsx("strong", { "data-testid": titleTestId, className: "font-semibold", children: title }), " "] })), children, _jsx(BannerParts, { parts: parts })] }));
|
|
44
|
+
function BannerText({ compact, title, titleTestId, children, parts, actionsBelow, inline, }) {
|
|
45
|
+
if (compact || inline) {
|
|
46
|
+
return (_jsxs("div", { className: "min-w-0 grow", children: [title !== undefined && (_jsxs(_Fragment, { children: [_jsx("strong", { "data-testid": titleTestId, className: "font-semibold", children: title }), " "] })), _jsxs("span", { className: cn(inline && "max-sm:hidden"), children: [children, _jsx(BannerParts, { parts: parts })] })] }));
|
|
39
47
|
}
|
|
40
48
|
return (_jsxs("div", { className: "flex-1", children: [title !== undefined && (_jsx("div", { "data-testid": titleTestId, className: "font-semibold", children: title })), children, _jsx(BannerParts, { parts: parts }), actionsBelow] }));
|
|
41
49
|
}
|
|
@@ -47,7 +55,7 @@ function bannerLayoutClass(variant, compact, actionsBelow) {
|
|
|
47
55
|
variant === "primary" &&
|
|
48
56
|
"flex-col items-start sm:flex-row sm:items-center", actionsBelow && "items-start", variantClass(variant, compact));
|
|
49
57
|
}
|
|
50
|
-
export function DefaultBanner({ variant = "info", density = "default", icon, title, titleTestId, children, parts, actions, actionsPlacement = "end", padded, testId, id, }) {
|
|
58
|
+
export function DefaultBanner({ variant = "info", density = "default", icon, title, titleTestId, children, parts, actions, actionsPlacement = "end", padded, inline = false, testId, id, }) {
|
|
51
59
|
const isError = variant === "error";
|
|
52
60
|
const compact = density === "compact";
|
|
53
61
|
// A compact banner is one line, so its actions always stay at the end.
|
|
@@ -57,7 +65,7 @@ export function DefaultBanner({ variant = "info", density = "default", icon, tit
|
|
|
57
65
|
// at it is inert for screen readers — role="group" + aria-labelledby is
|
|
58
66
|
// the actual mechanism, pointed at the label id Field emits (fieldLabelId).
|
|
59
67
|
const bannerRole = id !== undefined ? "group" : isError ? "alert" : undefined;
|
|
60
|
-
const banner = (_jsxs("div", { role: bannerRole, ...(id !== undefined && { "aria-labelledby": fieldLabelId(id) }), "data-testid": testId, "data-variant": variant, "data-density": density, className: bannerLayoutClass(variant, compact, actionsBelow), children: [icon !== undefined && (_jsx(Icon, { name: icon, className: cn("size-3.5 shrink-0", ICON_COLOR_CLASS[variant]) })), _jsx(BannerText, { compact: compact, title: title, titleTestId: titleTestId, parts: parts, actionsBelow: actionsBelow ? (_jsx("div", { "data-slot": "actions", className: "mt-3 flex flex-wrap gap-2", children: actions })) : undefined, children: children }), !actionsBelow && actions !== undefined && (_jsx("div", { "data-slot": "actions", className: cn(compact && "shrink-0"), children: actions }))] }));
|
|
68
|
+
const banner = (_jsxs("div", { role: bannerRole, ...(id !== undefined && { "aria-labelledby": fieldLabelId(id) }), "data-testid": testId, "data-variant": variant, "data-density": density, className: bannerLayoutClass(variant, compact, actionsBelow), children: [icon !== undefined && (_jsx(Icon, { name: icon, className: cn("size-3.5 shrink-0", ICON_COLOR_CLASS[variant]) })), _jsx(BannerText, { compact: compact, inline: inline, title: title, titleTestId: titleTestId, parts: parts, actionsBelow: actionsBelow ? (_jsx("div", { "data-slot": "actions", className: "mt-3 flex flex-wrap gap-2", children: actions })) : undefined, children: children }), !actionsBelow && actions !== undefined && (_jsx("div", { "data-slot": "actions", className: cn(compact && "shrink-0"), children: actions }))] }));
|
|
61
69
|
// Page state: the banner sits alone in main (which no longer has padding).
|
|
62
70
|
// The wrapper adds 24px outer spacing so the banner does not stick
|
|
63
71
|
// edge-to-edge to the sidebar/browser.
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { DayPicker } from "react-day-picker";
|
|
3
|
+
import { de } from "react-day-picker/locale/de";
|
|
4
|
+
import { enUS } from "react-day-picker/locale/en-US";
|
|
5
|
+
import { es } from "react-day-picker/locale/es";
|
|
6
|
+
import { fr } from "react-day-picker/locale/fr";
|
|
7
|
+
import { it } from "react-day-picker/locale/it";
|
|
8
|
+
import { useLocale } from "../../index.js";
|
|
3
9
|
import { cn } from "../lib/cn.js";
|
|
4
10
|
const dropdownSelectClass = "rounded-sm border border-input bg-transparent px-1.5 py-0.5 text-sm font-medium " +
|
|
5
11
|
"cursor-pointer focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring";
|
|
@@ -10,16 +16,28 @@ const dropdownSelectClass = "rounded-sm border border-input bg-transparent px-1.
|
|
|
10
16
|
function SelectDropdown({ options, className, ...selectProps }) {
|
|
11
17
|
return (_jsx("select", { className: cn(dropdownSelectClass, className), ...selectProps, children: options?.map((opt) => (_jsx("option", { value: opt.value, disabled: opt.disabled, children: opt.label }, opt.value))) }));
|
|
12
18
|
}
|
|
19
|
+
const dayPickerLocales = { de, es, fr, it, en: enUS };
|
|
20
|
+
// The rdp locale carries month/weekday names and the week start (de → Monday).
|
|
21
|
+
function dayPickerLocaleFor(appLocale) {
|
|
22
|
+
const language = appLocale.split("-")[0]?.toLowerCase() ?? "";
|
|
23
|
+
return dayPickerLocales[language] ?? enUS;
|
|
24
|
+
}
|
|
25
|
+
const navButtonClass = "inline-flex h-7 w-7 items-center justify-center rounded-sm text-muted-foreground " +
|
|
26
|
+
"hover:bg-accent hover:text-foreground " +
|
|
27
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring";
|
|
28
|
+
// navLayout="around" renders prev/next as siblings of the caption inside
|
|
29
|
+
// `month`; the 3-column grid keeps them beside the dropdowns instead of on top.
|
|
13
30
|
// Month/year selects come from SelectDropdown (components prop), so only the dropdowns container is styled here.
|
|
14
31
|
const dayPickerClasses = {
|
|
15
32
|
root: "rdp-root",
|
|
16
33
|
months: "flex flex-col gap-2",
|
|
17
|
-
month: "
|
|
34
|
+
month: "grid grid-cols-[auto_1fr_auto] items-center gap-x-1 gap-y-2",
|
|
18
35
|
month_caption: "flex justify-center items-center h-7 text-sm font-medium",
|
|
36
|
+
month_grid: "col-span-3",
|
|
19
37
|
dropdowns: "flex items-center gap-1 text-sm font-medium",
|
|
20
|
-
|
|
21
|
-
button_previous:
|
|
22
|
-
button_next:
|
|
38
|
+
chevron: "h-4 w-4 fill-current",
|
|
39
|
+
button_previous: navButtonClass,
|
|
40
|
+
button_next: navButtonClass,
|
|
23
41
|
weekdays: "flex",
|
|
24
42
|
weekday: "w-8 text-xs font-normal text-muted-foreground",
|
|
25
43
|
week: "flex mt-1",
|
|
@@ -32,7 +50,8 @@ const dayPickerClasses = {
|
|
|
32
50
|
disabled: "text-muted-foreground/30 pointer-events-none",
|
|
33
51
|
};
|
|
34
52
|
export default function CalendarDayPicker({ selected, onSelect, startMonth, endMonth, disabledMatchers, }) {
|
|
35
|
-
|
|
53
|
+
const appLocale = useLocale().locale();
|
|
54
|
+
return (_jsx(DayPicker, { mode: "single", captionLayout: "dropdown", navLayout: "around", locale: dayPickerLocaleFor(appLocale), startMonth: startMonth, endMonth: endMonth, selected: selected,
|
|
36
55
|
// Without defaultMonth DayPicker opens on today, not on the chosen date.
|
|
37
56
|
defaultMonth: selected, ...(disabledMatchers.length > 0 && { disabled: [...disabledMatchers] }), onSelect: (d) => onSelect(d), classNames: dayPickerClasses, components: { Dropdown: SelectDropdown } }));
|
|
38
57
|
}
|
|
@@ -19,7 +19,7 @@ export function DefaultCard({ slots, options, className, testId, dataAttributes,
|
|
|
19
19
|
const defaultHeader = s.title !== undefined ||
|
|
20
20
|
s.subtitle !== undefined ||
|
|
21
21
|
s.headerContent !== undefined ||
|
|
22
|
-
s.headerActions !== undefined ? (_jsxs("div", { className: cn("flex flex-col gap-3 px-[var(--card-padding)] pt-6 pb-4", fillHeight && "shrink-0"), children: [(s.title !== undefined || s.subtitle !== undefined || s.headerActions !== undefined) && (_jsxs("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [_jsxs("div", { className: "flex flex-col gap-1", children: [s.title !== undefined && (_jsx("h3", { className: "text-base font-semibold leading-none tracking-tight", children: s.title })), s.subtitle !== undefined && (_jsx("
|
|
22
|
+
s.headerActions !== undefined ? (_jsxs("div", { className: cn("flex flex-col gap-3 px-[var(--card-padding)] pt-6 pb-4", fillHeight && "shrink-0"), children: [(s.title !== undefined || s.subtitle !== undefined || s.headerActions !== undefined) && (_jsxs("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [_jsxs("div", { className: "flex flex-col gap-1", children: [s.title !== undefined && (_jsx("h3", { className: "text-base font-semibold leading-none tracking-tight", children: s.title })), s.subtitle !== undefined && (_jsx("div", { className: "text-sm text-muted-foreground", children: s.subtitle }))] }), s.headerActions] })), s.headerContent] })) : null;
|
|
23
23
|
const header = s.header ?? defaultHeader;
|
|
24
24
|
const hasHeader = header !== null && header !== undefined;
|
|
25
25
|
const card = (_jsxs("div", { ...dataAttributes, "data-slot": "card", "data-testid": testId, className: cn(framed ? cardSurface({ radius }) : "flex flex-col",
|
|
@@ -11,7 +11,12 @@ export function CodeInput(props) {
|
|
|
11
11
|
const activeIndex = Math.min(value.length, length - 1);
|
|
12
12
|
const hasSeparator = length >= MIN_LENGTH_FOR_SEPARATOR && length % 2 === 0;
|
|
13
13
|
const handleChange = (e) => {
|
|
14
|
-
const
|
|
14
|
+
const digits = e.target.value.replace(/\D/g, "");
|
|
15
|
+
// The caret is hidden and the active cell is always the end, so an insertion into a full code
|
|
16
|
+
// would shift digits the user never typed and auto-submit them.
|
|
17
|
+
if (value.length === length && digits.length > length)
|
|
18
|
+
return;
|
|
19
|
+
const next = digits.slice(0, length);
|
|
15
20
|
props.onChange(next);
|
|
16
21
|
if (next.length === length && next !== value)
|
|
17
22
|
props.onComplete?.(next);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode } from "react";
|
|
2
|
+
import "../../react-css-custom-properties.ts";
|
|
2
3
|
export declare const ACTIONS_CONTENT_ATTRIBUTE = "data-actions-content";
|
|
3
4
|
export declare function stickyActionsCellClass(fillsHeight: boolean): string;
|
|
4
5
|
export declare function ActionsHeaderCell({ label, style, absorbsLeftover, }: {
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../lib/cn.js";
|
|
3
3
|
import { TableCell, TableHead } from "../../ui/table.js";
|
|
4
|
+
import { COLUMN_ROLE_ATTRIBUTE } from "./column-role.js";
|
|
4
5
|
import { ROW_FOCUS_RING_CELL_CLASS } from "./use-row-keyboard-navigation.js";
|
|
6
|
+
import "../../react-css-custom-properties.js";
|
|
5
7
|
export const ACTIONS_CONTENT_ATTRIBUTE = "data-actions-content";
|
|
6
8
|
export function stickyActionsCellClass(fillsHeight) {
|
|
7
|
-
return cn("md:sticky md:right-0 md:z-10 md:bg-
|
|
9
|
+
return cn("md:sticky md:right-0 md:z-10", fillsHeight ? "md:bg-card" : "md:bg-background");
|
|
8
10
|
}
|
|
9
11
|
export function ActionsHeaderCell({ label, style, absorbsLeftover, }) {
|
|
10
|
-
return (_jsx(TableHead, { "data-testid": "column-actions",
|
|
12
|
+
return (_jsx(TableHead, { "data-testid": "column-actions", [COLUMN_ROLE_ATTRIBUTE]: "actions",
|
|
11
13
|
// From md: sticky right-0 + bg-muted (= header tone) so the
|
|
12
14
|
// action column stays at the right edge during horizontal
|
|
13
15
|
// scroll on wider screens. Below md, actions scroll in
|
|
@@ -3,4 +3,9 @@ import type { ReactNode } from "react";
|
|
|
3
3
|
import type { ListColumnViewModel, ListRowViewModel } from "../../../headless/index.ts";
|
|
4
4
|
import type { DataTableModel } from "./use-data-table-state.ts";
|
|
5
5
|
export type CardRoles = ReturnType<typeof cardColumnRoles<ListColumnViewModel>>;
|
|
6
|
+
export declare function splitLinkColumns(m: DataTableModel, row: ListRowViewModel, roles: CardRoles): {
|
|
7
|
+
readonly bodyRoles: CardRoles;
|
|
8
|
+
readonly linkColumns: readonly ListColumnViewModel[];
|
|
9
|
+
};
|
|
10
|
+
export declare function renderCardLinks(m: DataTableModel, row: ListRowViewModel, linkColumns: readonly ListColumnViewModel[]): ReactNode;
|
|
6
11
|
export declare function renderCardBody(m: DataTableModel, row: ListRowViewModel, roles: CardRoles): ReactNode;
|
|
@@ -4,20 +4,62 @@ import { cellLinkProp, DataTableCell, isBadgeColumn, isEmptyCellValue, isUnlabel
|
|
|
4
4
|
import { CardLeadingImage } from "../file-thumbnail.js";
|
|
5
5
|
import { columnCellPresentationProps } from "./data-cell-props.js";
|
|
6
6
|
import { showFullTextOnHover } from "./table-footer.js";
|
|
7
|
-
|
|
7
|
+
// The phone card shows the sentence and its (narrow) detail; the reason toggle stays a table feature.
|
|
8
|
+
function cardHint(hint) {
|
|
9
|
+
const { reasonField: _reason, reasonOpenField: _reasonOpen, reasonTitleField: _reasonTitle, detailField: _detail, narrowDetailField, ...rest } = hint;
|
|
10
|
+
const detailField = narrowDetailField ?? _detail;
|
|
11
|
+
return { ...rest, ...(detailField !== undefined && { detailField }) };
|
|
12
|
+
}
|
|
13
|
+
function cardCell(m, row, col, { linksAllowed } = { linksAllowed: false }) {
|
|
8
14
|
const { onCellChange } = m;
|
|
15
|
+
const opensRow = m.rowOpener(row) !== undefined;
|
|
9
16
|
// A bare check mark in the subtitle line says nothing without its column.
|
|
10
17
|
if (showsBareCheckMark(col.type, row.values[col.field], col.renderer))
|
|
11
18
|
return col.label;
|
|
12
|
-
return (_jsx(DataTableCell, { value: row.values[col.field], row: row.values, field: col.field, type: col.type, renderer: col.renderer, translate: m.tableTranslate, locale: m.tableLocale, ...columnCellPresentationProps(col), ...(col.fileDisplay !== undefined && { fileDisplay: col.fileDisplay, compactFile: true }), ...(onCellChange !== undefined && {
|
|
19
|
+
return (_jsx(DataTableCell, { value: row.values[col.field], row: row.values, field: col.field, type: col.type, renderer: col.renderer, translate: m.tableTranslate, locale: m.tableLocale, ...columnCellPresentationProps(col), ...(col.hint !== undefined && { hint: cardHint(col.hint) }), ...(col.fileDisplay !== undefined && { fileDisplay: col.fileDisplay, compactFile: true }), ...(onCellChange !== undefined && {
|
|
13
20
|
onChange: (value) => onCellChange(row.id, col.field, value),
|
|
14
|
-
}), ...
|
|
21
|
+
}), ...(col.rowActionLink === true &&
|
|
22
|
+
col.display === undefined && { display: "button" }), ...cellLinkProp(col, row, linksAllowed || !opensRow) }));
|
|
15
23
|
}
|
|
16
24
|
function cellTestIdOf(m, row, field) {
|
|
17
25
|
return m.getCellTestId?.(row, field) ?? `cell-${row.id}-${field}`;
|
|
18
26
|
}
|
|
27
|
+
function hasCardLink(row, col) {
|
|
28
|
+
return (!isEmptyCellValue(row.values[col.field]) && cellLinkProp(col, row, true).link !== undefined);
|
|
29
|
+
}
|
|
30
|
+
function needsControlOutsideOpener(row, col) {
|
|
31
|
+
return hasCardLink(row, col);
|
|
32
|
+
}
|
|
33
|
+
// A link inside the row's opener button would be an <a> or <button> in a
|
|
34
|
+
// <button>, so such columns of an openable card move out of the body and render below it.
|
|
35
|
+
export function splitLinkColumns(m, row, roles) {
|
|
36
|
+
if (m.rowOpener(row) === undefined)
|
|
37
|
+
return { bodyRoles: roles, linkColumns: [] };
|
|
38
|
+
const lead = roles.lead;
|
|
39
|
+
const leadColumn = lead !== undefined && needsControlOutsideOpener(row, lead) ? lead : undefined;
|
|
40
|
+
const linkMeta = roles.meta.filter((col) => needsControlOutsideOpener(row, col));
|
|
41
|
+
if (leadColumn === undefined && linkMeta.length === 0) {
|
|
42
|
+
return { bodyRoles: roles, linkColumns: [] };
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
bodyRoles: {
|
|
46
|
+
...roles,
|
|
47
|
+
lead: leadColumn === undefined ? lead : undefined,
|
|
48
|
+
meta: roles.meta.filter((col) => !linkMeta.includes(col)),
|
|
49
|
+
},
|
|
50
|
+
linkColumns: [...(leadColumn !== undefined ? [leadColumn] : []), ...linkMeta],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export function renderCardLinks(m, row, linkColumns) {
|
|
54
|
+
return (_jsx("div", { "data-testid": `card-links-${row.id}`, className: "flex flex-wrap items-center gap-x-3 text-[13px] leading-5", children: linkColumns.map((col) => (_jsx("span", { "data-testid": cellTestIdOf(m, row, col.field), children: cardCell(m, row, col, { linksAllowed: true }) }, col.field))) }));
|
|
55
|
+
}
|
|
19
56
|
function renderCardMeta(m, row, metaColumns) {
|
|
20
|
-
return (_jsx("div", { className: "min-w-0
|
|
57
|
+
return (_jsx("div", { className: "min-w-0", children: _jsx("div", { "data-testid": `card-meta-${row.id}`, className: "flex min-w-0 flex-col text-[13px] leading-5 tabular-nums text-foreground-secondary", children: metaColumns.map((col) => (_jsx("div", { className: "flex h-5 min-w-0 max-w-full items-center", children: _jsx("div", { "data-testid": cellTestIdOf(m, row, col.field), className: "min-w-0 truncate leading-5", onPointerEnter: showFullTextOnHover, children: isBadgeColumn(col) ? (_jsx("span", { className: "inline-flex align-middle", children: cardCell(m, row, col) })) : (cardCell(m, row, col)) }) }, col.field))) }) }));
|
|
58
|
+
}
|
|
59
|
+
function renderCardLead(m, row, lead) {
|
|
60
|
+
if (lead === undefined || isEmptyCellValue(row.values[lead.field]))
|
|
61
|
+
return null;
|
|
62
|
+
return (_jsx("div", { "data-testid": cellTestIdOf(m, row, lead.field), className: "min-w-0 text-[13px] leading-5", children: cardCell(m, row, lead) }));
|
|
21
63
|
}
|
|
22
64
|
function renderCardHeading(m, row, roles) {
|
|
23
65
|
const { title: cardTitleColumn, status: cardStatusColumn } = roles;
|
|
@@ -28,5 +70,5 @@ export function renderCardBody(m, row, roles) {
|
|
|
28
70
|
const { image: cardImageColumn, meta: cardMetaColumns } = roles;
|
|
29
71
|
const metaColumns = cardMetaColumns.filter((col) => !isEmptyCellValue(row.values[col.field]) &&
|
|
30
72
|
!isUnlabeledFalse(col.type, row.values[col.field], col.renderer));
|
|
31
|
-
return (_jsxs(_Fragment, { children: [cardImageColumn?.fileDisplay !== undefined && (_jsx("div", { "data-testid": `card-image-${row.id}`, className: "shrink-0", children: _jsx(CardLeadingImage, { value: row.values[cardImageColumn.field], display: cardImageColumn.fileDisplay }) })), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [renderCardHeading(m, row, roles), metaColumns.length > 0 && renderCardMeta(m, row, metaColumns)] }), m.rowOpener(row) !== undefined && (_jsx(ChevronRight, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": "true" }))] }));
|
|
73
|
+
return (_jsxs(_Fragment, { children: [cardImageColumn?.fileDisplay !== undefined && (_jsx("div", { "data-testid": `card-image-${row.id}`, className: "shrink-0", children: _jsx(CardLeadingImage, { value: row.values[cardImageColumn.field], display: cardImageColumn.fileDisplay }) })), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [renderCardLead(m, row, roles.lead), renderCardHeading(m, row, roles), metaColumns.length > 0 && renderCardMeta(m, row, metaColumns)] }), m.rowOpener(row) !== undefined && (_jsx(ChevronRight, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": "true" }))] }));
|
|
32
74
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DataTableModel } from "./use-data-table-state.ts";
|
|
2
|
+
type FrameInput = Pick<DataTableModel, "frame" | "belowSm">;
|
|
3
|
+
/** `frame: "card"` from sm: one bordered card around table or card list, summary row and pager. */
|
|
4
|
+
export declare function isInsideCardFrame(m: FrameInput): boolean;
|
|
5
|
+
/** `frame: "card"` below sm: every card of the card layout is bordered and rounded, with a gap. */
|
|
6
|
+
export declare function hasSeparateCardRows(m: FrameInput): boolean;
|
|
7
|
+
export declare const CARD_SURFACE_CLASS = "rounded-lg border border-border bg-card";
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** `frame: "card"` from sm: one bordered card around table or card list, summary row and pager. */
|
|
2
|
+
export function isInsideCardFrame(m) {
|
|
3
|
+
return m.frame === "card" && !m.belowSm;
|
|
4
|
+
}
|
|
5
|
+
/** `frame: "card"` below sm: every card of the card layout is bordered and rounded, with a gap. */
|
|
6
|
+
export function hasSeparateCardRows(m) {
|
|
7
|
+
return m.frame === "card" && m.belowSm;
|
|
8
|
+
}
|
|
9
|
+
export const CARD_SURFACE_CLASS = "rounded-lg border border-border bg-card";
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Fragment } from "react";
|
|
3
3
|
import { cn } from "../../lib/cn.js";
|
|
4
|
-
import {
|
|
4
|
+
import { cardToneClass } from "../data-table-cell.js";
|
|
5
5
|
import { RowActionsCell } from "../row-actions.js";
|
|
6
|
-
import { renderCardBody } from "./card-body.js";
|
|
6
|
+
import { renderCardBody, renderCardLinks, splitLinkColumns } from "./card-body.js";
|
|
7
|
+
import { CARD_SURFACE_CLASS, hasSeparateCardRows } from "./card-frame.js";
|
|
7
8
|
import { renderExpandToggle, renderExpansion } from "./row-render-parts.js";
|
|
9
|
+
// The card's <li> opens the row on click; controls inside must not reach it.
|
|
10
|
+
function renderStopPropagation(className, testId, children) {
|
|
11
|
+
return (_jsx("div", { className: className, "data-testid": testId, onClick: (e) => e.stopPropagation(), onKeyDown: (e) => e.stopPropagation(), children: children }));
|
|
12
|
+
}
|
|
8
13
|
function renderCardMenu(m, row, menuActions) {
|
|
9
|
-
return (
|
|
14
|
+
return renderStopPropagation("shrink-0", undefined, _jsx(RowActionsCell, { row: row, actions: menuActions, mode: m.rowActionMode, rowIsLink: m.onRowClick !== undefined, compact: true }));
|
|
10
15
|
}
|
|
11
16
|
function renderCardOpenButton(openRow, body) {
|
|
12
17
|
return (_jsx("button", { type: "button", className: "flex min-w-0 flex-1 cursor-pointer items-center gap-2 bg-transparent p-0 text-left", onKeyDown: (e) => {
|
|
@@ -17,12 +22,40 @@ function renderCardOpenButton(openRow, body) {
|
|
|
17
22
|
openRow();
|
|
18
23
|
}, children: body }));
|
|
19
24
|
}
|
|
25
|
+
function renderCardButtons(m, row, buttonActions) {
|
|
26
|
+
return renderStopPropagation("flex justify-start", `row-${row.id}-card-buttons`, _jsx(RowActionsCell, { row: row, actions: buttonActions, mode: m.rowActionMode, compact: true, small: true }));
|
|
27
|
+
}
|
|
28
|
+
function cardLeftPadding(compact, toned) {
|
|
29
|
+
if (compact)
|
|
30
|
+
return toned ? "pl-[5px]" : "pl-2";
|
|
31
|
+
return toned ? "pl-[13px]" : "pl-4";
|
|
32
|
+
}
|
|
33
|
+
function cardRowBaseClass(m) {
|
|
34
|
+
return hasSeparateCardRows(m)
|
|
35
|
+
? `flex min-h-[72px] items-center gap-2 py-3 ${CARD_SURFACE_CLASS}`
|
|
36
|
+
: "flex min-h-[72px] items-center gap-2 border-b border-border-row py-3";
|
|
37
|
+
}
|
|
20
38
|
export function renderCard(m, row, roles) {
|
|
21
|
-
const { rowTone
|
|
22
|
-
const
|
|
39
|
+
const { rowTone } = m;
|
|
40
|
+
const allActions = m.menuActions ?? [];
|
|
23
41
|
const openRow = m.rowOpener(row);
|
|
24
|
-
|
|
25
|
-
|
|
42
|
+
// "menu" mode keeps every action in the table's kebab; a phone card opens the row instead,
|
|
43
|
+
// unless the row cannot be opened, then the actions would be unreachable.
|
|
44
|
+
const cardActions = m.rowActionMode === "menu" && openRow !== undefined ? [] : allActions;
|
|
45
|
+
const menuMode = m.rowActionMode === "menu";
|
|
46
|
+
const buttonActions = cardActions.filter((a) => !menuMode &&
|
|
47
|
+
(a.display === "button" || a.display === "link") &&
|
|
48
|
+
(a.isVisible === undefined || a.isVisible(row)));
|
|
49
|
+
const menuActions = cardActions.filter((a) => menuMode || (a.display !== "button" && a.display !== "link"));
|
|
50
|
+
const hasMenu = menuActions.length > 0;
|
|
51
|
+
const hasButtons = buttonActions.length > 0;
|
|
52
|
+
const { bodyRoles, linkColumns } = splitLinkColumns(m, row, roles);
|
|
53
|
+
const body = renderCardBody(m, row, bodyRoles);
|
|
54
|
+
const main = openRow !== undefined ? renderCardOpenButton(openRow, body) : body;
|
|
55
|
+
const toned = cardToneClass(rowTone?.(row)) !== "";
|
|
56
|
+
const rowItem = (_jsxs("li", { "data-testid": m.rowTestId(row), "data-tone": rowTone?.(row), className: cn(cardRowBaseClass(m), cardToneClass(rowTone?.(row)),
|
|
57
|
+
// The 3px tone border sits inside the box, so the inner padding gives it up to keep the content aligned.
|
|
58
|
+
cardLeftPadding(m.expansion !== undefined || m.selection.active, toned), hasMenu ? "pr-2" : "pr-4", m.density.card), ...(openRow !== undefined && { onClick: openRow }), children: [m.selection.cardCheckbox(row), renderExpandToggle(m, row), linkColumns.length > 0 || hasButtons ? (_jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [main, linkColumns.length > 0 && renderCardLinks(m, row, linkColumns), hasButtons && renderCardButtons(m, row, buttonActions)] })) : (main), hasMenu && renderCardMenu(m, row, menuActions)] }, row.id));
|
|
26
59
|
if (m.expansion === undefined)
|
|
27
60
|
return rowItem;
|
|
28
61
|
// The expansion is a sibling <li>, outside the row's click target, so
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
import type { DataTableSort } from "../../../index.ts";
|
|
2
|
+
import type { DataTableProps, DataTableSort } from "../../../index.ts";
|
|
3
3
|
type SortableColumn = {
|
|
4
4
|
readonly field: string;
|
|
5
5
|
readonly label: string;
|
|
6
6
|
readonly sortable?: boolean;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type CardSortSelectProps = {
|
|
9
9
|
readonly columns: readonly SortableColumn[];
|
|
10
10
|
readonly sort: DataTableSort | null | undefined;
|
|
11
11
|
readonly onSortChange: ((next: DataTableSort | null) => void) | undefined;
|
|
12
12
|
readonly testId: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
export declare function CardSortSelect({ sortOptions, summary, ...props }: CardSortSelectProps & {
|
|
15
|
+
readonly sortOptions?: DataTableProps["sortOptions"];
|
|
16
|
+
readonly summary?: string | undefined;
|
|
13
17
|
}): ReactNode;
|
|
14
18
|
export {};
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ArrowDown, ArrowUp } from "lucide-react";
|
|
3
3
|
import { useOptionalTranslation } from "../../../index.js";
|
|
4
|
-
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
import { hasSortOptionsSelect, SortOptionsSelect } from "./sort-options-select.js";
|
|
5
|
+
// Screen-declared sortOptions replace the per-column entries.
|
|
6
|
+
export function CardSortSelect({ sortOptions, summary, ...props }) {
|
|
7
|
+
const { sort, onSortChange, testId } = props;
|
|
8
|
+
if (onSortChange !== undefined && hasSortOptionsSelect(sortOptions, onSortChange)) {
|
|
9
|
+
return (_jsx(SortOptionsSelect, { options: sortOptions, sort: sort, onSortChange: onSortChange, testId: testId !== undefined ? `${testId}-sort` : "render-list-sort", className: "px-4", chevron: summary === undefined, ...(summary !== undefined && { summary }) }));
|
|
10
|
+
}
|
|
11
|
+
return _jsx(ColumnSortSelect, { ...props });
|
|
12
|
+
}
|
|
13
|
+
function ColumnSortSelect({ columns, sort, onSortChange, testId }) {
|
|
11
14
|
const translate = useOptionalTranslation();
|
|
12
15
|
const sortableColumns = columns.filter((col) => col.sortable);
|
|
13
16
|
if (onSortChange === undefined || sortableColumns.length === 0)
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cardColumnRoles } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
3
3
|
import { cn } from "../../lib/cn.js";
|
|
4
|
+
import { hasSeparateCardRows, isInsideCardFrame } from "./card-frame.js";
|
|
4
5
|
import { renderCard } from "./card-row.js";
|
|
5
6
|
import { CardSortSelect } from "./card-sort-select.js";
|
|
6
7
|
import { bandClassName, bandReactKey, bandTestId } from "./group-band.js";
|
|
7
8
|
import { renderBand } from "./row-render-parts.js";
|
|
8
|
-
import {
|
|
9
|
+
import { hasSortOptionsSelect, sortSummaryText } from "./sort-options-select.js";
|
|
10
|
+
import { SummaryCard, TotalsCard } from "./totals-footer.js";
|
|
9
11
|
export function renderCardsView(m) {
|
|
10
12
|
const { testId, totals, columns } = m;
|
|
11
13
|
const roles = cardColumnRoles(columns);
|
|
12
|
-
|
|
14
|
+
// Below sm the card sort line also carries the list size; from sm up the toolbar shows it.
|
|
15
|
+
const toolbarOwnsSort = m.toolbarSort === true && !m.belowSm && hasSortOptionsSelect(m.sortOptions, m.onSortChange);
|
|
16
|
+
const summary = m.belowSm ? sortSummaryText(m) : undefined;
|
|
17
|
+
const separateCards = hasSeparateCardRows(m);
|
|
18
|
+
return (_jsx("div", { "data-testid": testId, className: "contents", children: _jsxs("div", { "data-testid": testId !== undefined ? `${testId}-cards` : "render-list-cards", className: "flex flex-col", children: [!toolbarOwnsSort && (_jsx(CardSortSelect, { columns: columns, sort: m.sort, onSortChange: m.onSortChange, testId: testId, summary: summary, ...(m.sortOptions !== undefined && { sortOptions: m.sortOptions }) })), _jsx("ul", { className: separateCards
|
|
19
|
+
? cn("m-0 flex list-none flex-col gap-2 p-0 pb-2", m.fillsHeight && "px-4")
|
|
20
|
+
: isInsideCardFrame(m)
|
|
21
|
+
? "m-0 list-none p-0"
|
|
22
|
+
: "m-0 list-none border-t border-border-row p-0", children: m.tableItems.map((item) => item.kind === "row" ? (renderCard(m, item.row, roles)) : (_jsx("li", { "data-testid": bandTestId(item), className: cn("border-b border-border-row", bandClassName(item)), children: renderBand(m, item) }, bandReactKey(item)))) }), m.summaryRow !== undefined && !m.belowSm && _jsx(SummaryCard, { summary: m.summaryRow }), totals !== undefined && _jsx(TotalsCard, { totals: totals, columnOf: m.columnOf })] }) }));
|
|
13
23
|
}
|
|
@@ -20,8 +20,15 @@ function PickerRow({ columns, index, label, isLastVisible, onChange }) {
|
|
|
20
20
|
const column = columns[index];
|
|
21
21
|
// Positions are relative to the order at pointer-down, so every move is idempotent.
|
|
22
22
|
const drag = usePointerDrag({
|
|
23
|
-
onStart: () => ({ snapshot: columns, from: index }),
|
|
24
|
-
onMove: (start, { dy }) =>
|
|
23
|
+
onStart: () => ({ snapshot: columns, from: index, lastTarget: index }),
|
|
24
|
+
onMove: (start, { dy }) => {
|
|
25
|
+
const target = start.from + Math.round(dy / ROW_HEIGHT_PX);
|
|
26
|
+
// Each onChange is a storage write plus a table re-render; skip pointer moves that stay on the same row.
|
|
27
|
+
if (target === start.lastTarget)
|
|
28
|
+
return;
|
|
29
|
+
start.lastTarget = target;
|
|
30
|
+
onChange(moveColumn(start.snapshot, start.from, target));
|
|
31
|
+
},
|
|
25
32
|
});
|
|
26
33
|
if (column === undefined)
|
|
27
34
|
return null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useRef } from "react";
|
|
3
|
-
import { MAX_COLUMN_WIDTH_PX } from "../../../hooks/list-column-layout.js";
|
|
3
|
+
import { clampWidth, MAX_COLUMN_WIDTH_PX } from "../../../hooks/list-column-layout.js";
|
|
4
4
|
import { useOptionalTranslation } from "../../../index.js";
|
|
5
5
|
import { arrowKeyDelta, usePointerDrag } from "../../widgets/use-pointer-drag.js";
|
|
6
6
|
import { EXPAND_COLUMN_WIDTH_PX, SELECT_COLUMN_WIDTH_PX } from "./use-measured-column-widths.js";
|
|
@@ -16,11 +16,10 @@ export function ColumnResizeHandle({ field, label, sizing, }) {
|
|
|
16
16
|
const width = sizing.widthOf(field);
|
|
17
17
|
const minWidth = sizing.minWidthOf(field);
|
|
18
18
|
const draggedWidth = useRef(null);
|
|
19
|
-
const clampToBounds = (value) => Math.min(MAX_COLUMN_WIDTH_PX, Math.max(minWidth, value));
|
|
20
19
|
const drag = usePointerDrag({
|
|
21
20
|
onStart: () => width,
|
|
22
21
|
onMove: (startWidth, { dx }) => {
|
|
23
|
-
const next =
|
|
22
|
+
const next = clampWidth(startWidth + dx, minWidth);
|
|
24
23
|
draggedWidth.current = next;
|
|
25
24
|
sizing.setLiveWidth(field, next);
|
|
26
25
|
},
|
|
@@ -37,7 +36,7 @@ export function ColumnResizeHandle({ field, label, sizing, }) {
|
|
|
37
36
|
if (delta === undefined || delta.dx === 0)
|
|
38
37
|
return;
|
|
39
38
|
event.preventDefault();
|
|
40
|
-
sizing.commit(field,
|
|
39
|
+
sizing.commit(field, clampWidth(width + delta.dx, minWidth));
|
|
41
40
|
};
|
|
42
41
|
return (_jsx("hr", { "aria-orientation": "vertical", "aria-valuenow": Math.round(width), "aria-valuemin": minWidth, "aria-valuemax": MAX_COLUMN_WIDTH_PX,
|
|
43
42
|
// title, not aria-label: getByLabel("<column>") would match a resize handle for every column.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const COLUMN_ROLE_ATTRIBUTE = "data-column-role";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const COLUMN_ROLE_ATTRIBUTE = "data-column-role";
|
|
@@ -4,4 +4,9 @@ export declare function columnCellPresentationProps(col: ListColumnViewModel): {
|
|
|
4
4
|
optionLabels?: Readonly<Record<string, string>> | undefined;
|
|
5
5
|
optionTones?: Readonly<Partial<Record<string, "accent" | "bad" | "critical" | "neutral" | "ok" | "warn">>> | undefined;
|
|
6
6
|
grouping?: boolean | undefined;
|
|
7
|
+
hint?: import("../../../headless/index.ts").ListColumnHintViewModel | undefined;
|
|
8
|
+
display?: import("../../../headless/index.ts").ListColumnCellDisplay | undefined;
|
|
9
|
+
badgeToneField?: string | undefined;
|
|
10
|
+
badgeDot?: false | undefined;
|
|
11
|
+
emptyPlaceholder?: false | undefined;
|
|
7
12
|
};
|