@cosmicdrift/kumiko-renderer 0.389.0 → 0.390.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/dist/app/projection-detail-body.js +59 -394
  2. package/dist/app/projection-detail-header-model.d.ts +11 -0
  3. package/dist/app/projection-detail-header-model.js +33 -0
  4. package/dist/app/projection-detail-header-region.d.ts +28 -0
  5. package/dist/app/projection-detail-header-region.js +81 -0
  6. package/dist/app/projection-detail-header.d.ts +29 -0
  7. package/dist/app/projection-detail-header.js +84 -0
  8. package/dist/app/projection-detail-navigation.d.ts +13 -0
  9. package/dist/app/projection-detail-navigation.js +91 -0
  10. package/dist/app/projection-detail-states.d.ts +22 -0
  11. package/dist/app/projection-detail-states.js +26 -0
  12. package/dist/app/projection-drawer-host.d.ts +12 -0
  13. package/dist/app/projection-drawer-host.js +10 -0
  14. package/dist/app/projection-list-body.d.ts +1 -1
  15. package/dist/app/projection-list-body.js +69 -189
  16. package/dist/app/projection-list-render-props.d.ts +56 -0
  17. package/dist/app/projection-list-render-props.js +47 -0
  18. package/dist/app/projection-list-render.d.ts +26 -0
  19. package/dist/app/projection-list-render.js +20 -0
  20. package/dist/app/projection-list-row-click.d.ts +12 -0
  21. package/dist/app/projection-list-row-click.js +14 -0
  22. package/dist/app/use-projection-detail-actions.d.ts +35 -0
  23. package/dist/app/use-projection-detail-actions.js +156 -0
  24. package/dist/app/use-projection-detail-data.d.ts +19 -0
  25. package/dist/app/use-projection-detail-data.js +47 -0
  26. package/dist/app/use-projection-detail-layout.d.ts +17 -0
  27. package/dist/app/use-projection-detail-layout.js +23 -0
  28. package/dist/app/use-projection-list-actions.d.ts +31 -0
  29. package/dist/app/use-projection-list-actions.js +73 -0
  30. package/dist/app/use-projection-list-data.d.ts +20 -0
  31. package/dist/app/use-projection-list-data.js +26 -0
  32. package/dist/app/use-projection-list-definitions.d.ts +11 -0
  33. package/dist/app/use-projection-list-definitions.js +20 -0
  34. package/dist/app/use-projection-list-query.d.ts +28 -0
  35. package/dist/app/use-projection-list-query.js +83 -0
  36. package/dist/components/render-edit-banners.d.ts +12 -0
  37. package/dist/components/render-edit-banners.js +90 -0
  38. package/dist/components/render-edit-draft-save-helpers.d.ts +19 -0
  39. package/dist/components/render-edit-draft-save-helpers.js +42 -0
  40. package/dist/components/render-edit-field-grid.d.ts +4 -0
  41. package/dist/components/render-edit-field-grid.js +40 -0
  42. package/dist/components/render-edit-fields-section.d.ts +4 -0
  43. package/dist/components/render-edit-fields-section.js +76 -0
  44. package/dist/components/render-edit-form-actions.d.ts +4 -0
  45. package/dist/components/render-edit-form-actions.js +66 -0
  46. package/dist/components/render-edit-header-actions.d.ts +11 -0
  47. package/dist/components/render-edit-header-actions.js +120 -0
  48. package/dist/components/render-edit-layout-flags.d.ts +29 -0
  49. package/dist/components/render-edit-layout-flags.js +106 -0
  50. package/dist/components/render-edit-layout.d.ts +4 -0
  51. package/dist/components/render-edit-layout.js +79 -0
  52. package/dist/components/render-edit-render-model.d.ts +63 -0
  53. package/dist/components/render-edit-render-model.js +14 -0
  54. package/dist/components/render-edit-section-kinds.d.ts +4 -0
  55. package/dist/components/render-edit-section-kinds.js +115 -0
  56. package/dist/components/render-edit-submit-result.d.ts +8 -0
  57. package/dist/components/render-edit-submit-result.js +77 -0
  58. package/dist/components/render-edit-submit.d.ts +7 -0
  59. package/dist/components/render-edit-submit.js +113 -0
  60. package/dist/components/render-edit-titles.d.ts +17 -0
  61. package/dist/components/render-edit-titles.js +99 -0
  62. package/dist/components/render-edit-wizard-navigation.d.ts +11 -0
  63. package/dist/components/render-edit-wizard-navigation.js +115 -0
  64. package/dist/components/render-edit.d.ts +2 -2
  65. package/dist/components/render-edit.js +63 -1128
  66. package/dist/components/render-field-choice-inputs.d.ts +7 -0
  67. package/dist/components/render-field-choice-inputs.js +52 -0
  68. package/dist/components/render-field-control.d.ts +12 -0
  69. package/dist/components/render-field-control.js +93 -0
  70. package/dist/components/render-field-display-text.d.ts +4 -0
  71. package/dist/components/render-field-display-text.js +48 -0
  72. package/dist/components/render-field-fill-action.d.ts +13 -0
  73. package/dist/components/render-field-fill-action.js +63 -0
  74. package/dist/components/render-field-input-shared.d.ts +39 -0
  75. package/dist/components/render-field-input-shared.js +20 -0
  76. package/dist/components/render-field-input.d.ts +3 -0
  77. package/dist/components/render-field-input.js +34 -0
  78. package/dist/components/render-field-meta.d.ts +6 -0
  79. package/dist/components/render-field-meta.js +51 -0
  80. package/dist/components/render-field-read-only.d.ts +11 -0
  81. package/dist/components/render-field-read-only.js +75 -0
  82. package/dist/components/render-field-reference.d.ts +15 -0
  83. package/dist/components/render-field-reference.js +103 -0
  84. package/dist/components/render-field-scalar-inputs.d.ts +10 -0
  85. package/dist/components/render-field-scalar-inputs.js +35 -0
  86. package/dist/components/render-field-text-inputs.d.ts +3 -0
  87. package/dist/components/render-field-text-inputs.js +34 -0
  88. package/dist/components/render-field-values.d.ts +18 -0
  89. package/dist/components/render-field-values.js +111 -0
  90. package/dist/components/render-field-write-only.d.ts +9 -0
  91. package/dist/components/render-field-write-only.js +29 -0
  92. package/dist/components/render-field.d.ts +2 -2
  93. package/dist/components/render-field.js +39 -670
  94. package/dist/components/render-list-header-slot.d.ts +5 -0
  95. package/dist/components/render-list-header-slot.js +30 -0
  96. package/dist/components/render-list-reference-bridge.d.ts +3 -0
  97. package/dist/components/render-list-reference-bridge.js +25 -0
  98. package/dist/components/render-list-reference-columns.d.ts +25 -0
  99. package/dist/components/render-list-reference-columns.js +137 -0
  100. package/dist/components/render-list-table-props.d.ts +52 -0
  101. package/dist/components/render-list-table-props.js +53 -0
  102. package/dist/components/render-list-toolbar-model.d.ts +42 -0
  103. package/dist/components/render-list-toolbar-model.js +82 -0
  104. package/dist/components/render-list-toolbar.d.ts +38 -0
  105. package/dist/components/render-list-toolbar.js +40 -0
  106. package/dist/components/render-list-types.d.ts +113 -0
  107. package/dist/components/render-list-types.js +1 -0
  108. package/dist/components/render-list.d.ts +4 -113
  109. package/dist/components/render-list.js +91 -307
  110. package/dist/components/use-reference-input-state.d.ts +20 -0
  111. package/dist/components/use-reference-input-state.js +85 -0
  112. package/dist/components/use-render-edit-controlled-sync.d.ts +3 -0
  113. package/dist/components/use-render-edit-controlled-sync.js +26 -0
  114. package/dist/components/use-render-edit-draft-save.d.ts +29 -0
  115. package/dist/components/use-render-edit-draft-save.js +141 -0
  116. package/dist/components/use-render-edit-form.d.ts +10 -0
  117. package/dist/components/use-render-edit-form.js +101 -0
  118. package/dist/components/use-render-edit-sections.d.ts +15 -0
  119. package/dist/components/use-render-edit-sections.js +100 -0
  120. package/dist/components/use-render-edit-state.d.ts +65 -0
  121. package/dist/components/use-render-edit-state.js +158 -0
  122. package/dist/components/use-render-edit-steps.d.ts +13 -0
  123. package/dist/components/use-render-edit-steps.js +52 -0
  124. package/dist/components/use-render-list-columns.d.ts +18 -0
  125. package/dist/components/use-render-list-columns.js +41 -0
  126. package/dist/components/use-render-list-search.d.ts +4 -0
  127. package/dist/components/use-render-list-search.js +50 -0
  128. package/dist/primitives.d.ts +1 -1
  129. package/dist/web/app/dashboard-body.d.ts +1 -1
  130. package/dist/web/app/dashboard-body.js +42 -246
  131. package/dist/web/app/dashboard-header.d.ts +34 -0
  132. package/dist/web/app/dashboard-header.js +58 -0
  133. package/dist/web/app/dashboard-screen-controls.d.ts +11 -0
  134. package/dist/web/app/dashboard-screen-controls.js +42 -0
  135. package/dist/web/app/dashboard-screen-tiles.d.ts +8 -0
  136. package/dist/web/app/dashboard-screen-tiles.js +42 -0
  137. package/dist/web/app/dashboard-visibility.d.ts +42 -0
  138. package/dist/web/app/dashboard-visibility.js +102 -0
  139. package/dist/web/app/use-dashboard-screen-state.d.ts +35 -0
  140. package/dist/web/app/use-dashboard-screen-state.js +69 -0
  141. package/dist/web/primitives/data-table/actions-column.js +6 -5
  142. package/dist/web/primitives/data-table/card-body.d.ts +6 -0
  143. package/dist/web/primitives/data-table/card-body.js +32 -0
  144. package/dist/web/primitives/data-table/card-row.d.ts +5 -0
  145. package/dist/web/primitives/data-table/card-row.js +31 -0
  146. package/dist/web/primitives/data-table/card-view.d.ts +3 -0
  147. package/dist/web/primitives/data-table/card-view.js +13 -0
  148. package/dist/web/primitives/data-table/column-resize-handle.js +3 -1
  149. package/dist/web/primitives/data-table/data-cell-props.d.ts +7 -0
  150. package/dist/web/primitives/data-table/data-cell-props.js +8 -0
  151. package/dist/web/primitives/data-table/row-render-parts.d.ts +8 -0
  152. package/dist/web/primitives/data-table/row-render-parts.js +35 -0
  153. package/dist/web/primitives/data-table/table-body.d.ts +3 -0
  154. package/dist/web/primitives/data-table/table-body.js +32 -0
  155. package/dist/web/primitives/data-table/table-content.d.ts +3 -0
  156. package/dist/web/primitives/data-table/table-content.js +41 -0
  157. package/dist/web/primitives/data-table/table-data-cell.d.ts +4 -0
  158. package/dist/web/primitives/data-table/table-data-cell.js +25 -0
  159. package/dist/web/primitives/data-table/table-header-row.d.ts +3 -0
  160. package/dist/web/primitives/data-table/table-header-row.js +21 -0
  161. package/dist/web/primitives/data-table/table-view.d.ts +3 -0
  162. package/dist/web/primitives/data-table/table-view.js +25 -0
  163. package/dist/web/primitives/data-table/toolbar.d.ts +6 -0
  164. package/dist/web/primitives/data-table/toolbar.js +53 -0
  165. package/dist/web/primitives/data-table/use-data-table-state.d.ts +44 -0
  166. package/dist/web/primitives/data-table/use-data-table-state.js +123 -0
  167. package/dist/web/primitives/data-table.d.ts +3 -4
  168. package/dist/web/primitives/data-table.js +32 -252
  169. package/dist/web/primitives/file-value-list.js +1 -1
  170. package/dist/web/primitives/form-footer-parts.d.ts +25 -0
  171. package/dist/web/primitives/form-footer-parts.js +55 -0
  172. package/dist/web/primitives/form.js +33 -43
  173. package/dist/web/primitives/input-choice-kinds.d.ts +4 -0
  174. package/dist/web/primitives/input-choice-kinds.js +67 -0
  175. package/dist/web/primitives/input-file-kinds.d.ts +3 -0
  176. package/dist/web/primitives/input-file-kinds.js +6 -0
  177. package/dist/web/primitives/input-number-kinds.d.ts +4 -0
  178. package/dist/web/primitives/input-number-kinds.js +16 -0
  179. package/dist/web/primitives/input-optional-props.d.ts +20 -0
  180. package/dist/web/primitives/input-optional-props.js +24 -0
  181. package/dist/web/primitives/input-select-presentation.d.ts +13 -0
  182. package/dist/web/primitives/input-select-presentation.js +19 -0
  183. package/dist/web/primitives/input-shared.d.ts +22 -0
  184. package/dist/web/primitives/input-shared.js +10 -0
  185. package/dist/web/primitives/input-temporal-kinds.d.ts +5 -0
  186. package/dist/web/primitives/input-temporal-kinds.js +10 -0
  187. package/dist/web/primitives/input-text-kinds.d.ts +7 -0
  188. package/dist/web/primitives/input-text-kinds.js +33 -0
  189. package/dist/web/primitives/input.js +35 -161
  190. package/dist/web/widgets/chart-data.d.ts +35 -0
  191. package/dist/web/widgets/chart-data.js +37 -0
  192. package/dist/web/widgets/chart-markers.d.ts +26 -0
  193. package/dist/web/widgets/chart-markers.js +64 -0
  194. package/dist/web/widgets/chart-parts.d.ts +20 -0
  195. package/dist/web/widgets/chart-parts.js +15 -0
  196. package/dist/web/widgets/charts.d.ts +5 -78
  197. package/dist/web/widgets/charts.js +7 -485
  198. package/dist/web/widgets/drawer-panel-class.d.ts +3 -0
  199. package/dist/web/widgets/drawer-panel-class.js +40 -0
  200. package/dist/web/widgets/drawer-resize-controls.d.ts +11 -0
  201. package/dist/web/widgets/drawer-resize-controls.js +12 -0
  202. package/dist/web/widgets/drawer-sizing.d.ts +19 -0
  203. package/dist/web/widgets/drawer-sizing.js +60 -0
  204. package/dist/web/widgets/drawer.js +17 -116
  205. package/dist/web/widgets/stacked-area-brush.d.ts +13 -0
  206. package/dist/web/widgets/stacked-area-brush.js +91 -0
  207. package/dist/web/widgets/stacked-area-chart.d.ts +6 -0
  208. package/dist/web/widgets/stacked-area-chart.js +45 -0
  209. package/dist/web/widgets/stacked-area-chrome.d.ts +7 -0
  210. package/dist/web/widgets/stacked-area-chrome.js +77 -0
  211. package/dist/web/widgets/stacked-area-geometry.d.ts +54 -0
  212. package/dist/web/widgets/stacked-area-geometry.js +83 -0
  213. package/dist/web/widgets/stacked-area-model.d.ts +11 -0
  214. package/dist/web/widgets/stacked-area-model.js +1 -0
  215. package/dist/web/widgets/stacked-area-plot.d.ts +3 -0
  216. package/dist/web/widgets/stacked-area-plot.js +51 -0
  217. package/dist/web/widgets/stacked-area-props.d.ts +83 -0
  218. package/dist/web/widgets/stacked-area-props.js +16 -0
  219. package/dist/web/widgets/stacked-area-svg.d.ts +3 -0
  220. package/dist/web/widgets/stacked-area-svg.js +38 -0
  221. package/dist/web/widgets/stacked-area-tooltip.d.ts +3 -0
  222. package/dist/web/widgets/stacked-area-tooltip.js +86 -0
  223. package/dist/web/widgets/use-drawer-resize.d.ts +22 -0
  224. package/dist/web/widgets/use-drawer-resize.js +52 -0
  225. package/dist/web/widgets/use-stacked-area-tooltip.d.ts +9 -0
  226. package/dist/web/widgets/use-stacked-area-tooltip.js +34 -0
  227. package/dist/web/widgets/use-stacked-area-window.d.ts +20 -0
  228. package/dist/web/widgets/use-stacked-area-window.js +76 -0
  229. package/package.json +9 -9
  230. package/src/changes.json +54 -0
@@ -0,0 +1,113 @@
1
+ import type { EntityDefinition, EntityListScreenDefinition } from "@cosmicdrift/kumiko-framework/ui-types";
2
+ import type { ReactNode } from "react";
3
+ import type { ListRowViewModel, Translate } from "../headless/index.ts";
4
+ import type { ListSort } from "../hooks/use-list-url-state.ts";
5
+ import type { DataTableDateRangeFacet, DataTableFacet, DataTableProps, DataTableRowAction, DataTableRowActionMode, DataTableTableBlockProps } from "../primitives.tsx";
6
+ import type { ListEmptyStateContent } from "./list-empty-state.tsx";
7
+ import type { ToolbarActionButton } from "./render-list-toolbar-action.tsx";
8
+ export type RenderListProps = {
9
+ readonly screen: EntityListScreenDefinition;
10
+ readonly entity: Pick<EntityDefinition, "fields" | "derivedFields">;
11
+ readonly rows: readonly Readonly<Record<string, unknown>>[];
12
+ readonly featureName: string;
13
+ readonly translate?: Translate;
14
+ readonly onRowClick?: (row: ListRowViewModel) => void;
15
+ /** Overrides the default empty box. When set, the automatic CTA via
16
+ * `onCreate` is ignored; the caller's content takes precedence. */
17
+ readonly emptyState?: ReactNode;
18
+ /** Adds a "+ New" button to the toolbar and uses it as the CTA in the
19
+ * default empty box. The caller provides the action (for example,
20
+ * navigation to the edit screen). */
21
+ readonly onCreate?: () => void;
22
+ /** Label for the + New button. Defaults to the i18n bundle key
23
+ * (`kumiko.actions.create`). The caller can override it. */
24
+ readonly createLabel?: string;
25
+ /** Enables a search input in the toolbar. Filtering is server-side via
26
+ * the caller's onSearchChange; RenderList does not filter locally. */
27
+ readonly searchable?: boolean;
28
+ /** Placeholder for the search input. Defaults to the i18n bundle key
29
+ * (`kumiko.list.search-placeholder`). */
30
+ readonly searchPlaceholder?: string;
31
+ /** Hint at the left of the toolbar (already translated). */
32
+ readonly description?: string;
33
+ /** Author-declared replacement for the default empty box (already translated). */
34
+ readonly emptyContent?: ListEmptyStateContent;
35
+ /** Search or filters changed the result; the empty box then says "no matches". */
36
+ readonly narrowed?: boolean;
37
+ /** Nothing was narrowed by the user, but a default filter is still on; the empty box then offers "show all" instead of "create the first one". */
38
+ readonly defaultFilterActive?: boolean;
39
+ /** Plural-forms key for the footer count noun; default is the entity's `:noun` convention key. */
40
+ readonly itemNounKey?: string;
41
+ /** Current search term (from URL state / the parent). RenderList buffers
42
+ * typing locally with a 300ms debounce before calling onSearchChange;
43
+ * otherwise every keystroke would trigger a server round trip. */
44
+ readonly searchValue?: string;
45
+ /** Called when the debounced search term changes. The caller uses it to
46
+ * set URL state (?<id>.q=…) and trigger a refetch. */
47
+ readonly onSearchChange?: (next: string) => void;
48
+ /** Current sorting, or null for the server's default order. */
49
+ readonly sort?: ListSort | null;
50
+ /** Called with the next sort state after a header click. */
51
+ readonly onSortChange?: (next: ListSort | null) => void;
52
+ /** Pager props for pagination="pages". If undefined, no pager UI is
53
+ * rendered; the default or infinite mode is used. KumikoScreen supplies
54
+ * this according to screen.pagination. */
55
+ readonly pager?: {
56
+ readonly page: number;
57
+ readonly limit: number;
58
+ readonly total: number;
59
+ readonly onPageChange: (next: number) => void;
60
+ };
61
+ /** Infinite-scroll wiring for pagination="infinite". KumikoScreen keeps
62
+ * the accumulated rows and cursor; RenderList passes the callbacks
63
+ * through to DataTable. */
64
+ readonly onReachEnd?: () => void;
65
+ readonly loadingMore?: boolean;
66
+ readonly hasMore?: boolean;
67
+ /** Per-row actions in resolved form. KumikoScreen builds them from
68
+ * EntityListScreenDefinition.rowActions: handler-QN becomes a dispatcher
69
+ * call, and i18n keys become translated strings. */
70
+ readonly rowActions?: readonly DataTableRowAction[];
71
+ /** How the row-action column renders (see `DataTableProps.rowActionMode`). KumikoScreen
72
+ * derives it from the actions; without it the DataTable uses its adaptive default. */
73
+ readonly rowActionMode?: DataTableRowActionMode;
74
+ /** Forwarded to `DataTableProps.bulk` / `rowTone`. */
75
+ readonly bulk?: DataTableProps["bulk"];
76
+ readonly rowTone?: DataTableProps["rowTone"];
77
+ /** Toolbar actions in the list header in resolved form. KumikoScreen
78
+ * builds them from EntityListScreenDefinition.toolbarActions:
79
+ * navigate targets use useNav and handler-QN uses a dispatcher call.
80
+ * RenderList renders the buttons on the right side of the toolbar,
81
+ * before "+ New". */
82
+ readonly toolbarActions?: readonly ToolbarActionButton[];
83
+ /** Faceted filter dropdowns. KumikoScreen builds them from filterable
84
+ * select/boolean fields; RenderList passes them through to DataTable. */
85
+ readonly filterFacets?: readonly DataTableFacet[];
86
+ /** Currently selected facet values by field (from URL state). */
87
+ readonly filterValues?: Readonly<Record<string, readonly string[]>>;
88
+ /** Toggles a facet value (sets URL state and refetches). */
89
+ readonly onFilterChange?: (field: string, values: readonly string[]) => void;
90
+ /** Reset aller aktiven Facets. */
91
+ readonly onFilterReset?: () => void;
92
+ /** Time-range filters — forwarded to the DataTable. */
93
+ readonly dateRangeFacets?: readonly DataTableDateRangeFacet[];
94
+ /** One bound changed (set URL state + refetch). */
95
+ readonly onDateRangeChange?: (field: string, bound: "from" | "to", value: string) => void;
96
+ /** Forwarded to `DataTableProps.chromeless` — drops the table's own card frame for a
97
+ * host that already provides one (relatedList in a tabs-mode section). Default false. */
98
+ readonly chromeless?: boolean;
99
+ /** Forwarded to `DataTableProps.scrollBody` — bounds the table height and scrolls rows
100
+ * internally instead of growing the page (relatedList in a tabs-mode section). Default false. */
101
+ readonly scrollBody?: boolean;
102
+ /** Forwarded to `DataTableProps.screenPadding` — `true`: the table carries
103
+ * the shared screen padding because it is the screen body (entityList/
104
+ * projectionList). Explicit `false`: no padding at all — the host already
105
+ * pads its own children (relatedList in a tabs-mode Card). Omitted: legacy
106
+ * `p-6` fallback for a standalone table with no padded host. */
107
+ readonly screenPadding?: boolean;
108
+ /** Forwarded to `DataTableProps.expandedRowIds` / `onToggleRowExpanded` /
109
+ * `renderExpandedRow` (entityList `expandableRow`). */
110
+ readonly expandedRowIds?: ReadonlySet<string>;
111
+ readonly onToggleRowExpanded?: (rowId: string) => void;
112
+ readonly renderExpandedRow?: (row: ListRowViewModel) => ReactNode;
113
+ } & DataTableTableBlockProps;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,115 +1,6 @@
1
- import { type EntityDefinition, type EntityListScreenDefinition } from "@cosmicdrift/kumiko-framework/ui-types";
2
- import { type ReactNode } from "react";
3
- import type { ListRowViewModel, Translate } from "../headless/index.ts";
4
- import type { ListSort } from "../hooks/use-list-url-state.ts";
5
- import { type DataTableDateRangeFacet, type DataTableFacet, type DataTableProps, type DataTableRowAction, type DataTableRowActionMode, type DataTableTableBlockProps } from "../primitives.tsx";
6
- import { type ListEmptyStateContent } from "./list-empty-state.tsx";
7
- import { type ToolbarActionButton } from "./render-list-toolbar-action.tsx";
1
+ import type { ReactNode } from "react";
2
+ import type { ToolbarActionButton } from "./render-list-toolbar-action.tsx";
3
+ import type { RenderListProps } from "./render-list-types.ts";
8
4
  export type { ToolbarActionButton };
9
- export type RenderListProps = {
10
- readonly screen: EntityListScreenDefinition;
11
- readonly entity: Pick<EntityDefinition, "fields" | "derivedFields">;
12
- readonly rows: readonly Readonly<Record<string, unknown>>[];
13
- readonly featureName: string;
14
- readonly translate?: Translate;
15
- readonly onRowClick?: (row: ListRowViewModel) => void;
16
- /** Overrides the default empty box. When set, the automatic CTA via
17
- * `onCreate` is ignored; the caller's content takes precedence. */
18
- readonly emptyState?: ReactNode;
19
- /** Adds a "+ New" button to the toolbar and uses it as the CTA in the
20
- * default empty box. The caller provides the action (for example,
21
- * navigation to the edit screen). */
22
- readonly onCreate?: () => void;
23
- /** Label for the + New button. Defaults to the i18n bundle key
24
- * (`kumiko.actions.create`). The caller can override it. */
25
- readonly createLabel?: string;
26
- /** Enables a search input in the toolbar. Filtering is server-side via
27
- * the caller's onSearchChange; RenderList does not filter locally. */
28
- readonly searchable?: boolean;
29
- /** Placeholder for the search input. Defaults to the i18n bundle key
30
- * (`kumiko.list.search-placeholder`). */
31
- readonly searchPlaceholder?: string;
32
- /** Hint at the left of the toolbar (already translated). */
33
- readonly description?: string;
34
- /** Author-declared replacement for the default empty box (already translated). */
35
- readonly emptyContent?: ListEmptyStateContent;
36
- /** Search or filters changed the result; the empty box then says "no matches". */
37
- readonly narrowed?: boolean;
38
- /** Nothing was narrowed by the user, but a default filter is still on; the empty box then offers "show all" instead of "create the first one". */
39
- readonly defaultFilterActive?: boolean;
40
- /** Plural-forms key for the footer count noun; default is the entity's `:noun` convention key. */
41
- readonly itemNounKey?: string;
42
- /** Current search term (from URL state / the parent). RenderList buffers
43
- * typing locally with a 300ms debounce before calling onSearchChange;
44
- * otherwise every keystroke would trigger a server round trip. */
45
- readonly searchValue?: string;
46
- /** Called when the debounced search term changes. The caller uses it to
47
- * set URL state (?<id>.q=…) and trigger a refetch. */
48
- readonly onSearchChange?: (next: string) => void;
49
- /** Current sorting, or null for the server's default order. */
50
- readonly sort?: ListSort | null;
51
- /** Called with the next sort state after a header click. */
52
- readonly onSortChange?: (next: ListSort | null) => void;
53
- /** Pager props for pagination="pages". If undefined, no pager UI is
54
- * rendered; the default or infinite mode is used. KumikoScreen supplies
55
- * this according to screen.pagination. */
56
- readonly pager?: {
57
- readonly page: number;
58
- readonly limit: number;
59
- readonly total: number;
60
- readonly onPageChange: (next: number) => void;
61
- };
62
- /** Infinite-scroll wiring for pagination="infinite". KumikoScreen keeps
63
- * the accumulated rows and cursor; RenderList passes the callbacks
64
- * through to DataTable. */
65
- readonly onReachEnd?: () => void;
66
- readonly loadingMore?: boolean;
67
- readonly hasMore?: boolean;
68
- /** Per-row actions in resolved form. KumikoScreen builds them from
69
- * EntityListScreenDefinition.rowActions: handler-QN becomes a dispatcher
70
- * call, and i18n keys become translated strings. */
71
- readonly rowActions?: readonly DataTableRowAction[];
72
- /** How the row-action column renders (see `DataTableProps.rowActionMode`). KumikoScreen
73
- * derives it from the actions; without it the DataTable uses its adaptive default. */
74
- readonly rowActionMode?: DataTableRowActionMode;
75
- /** Forwarded to `DataTableProps.bulk` / `rowTone`. */
76
- readonly bulk?: DataTableProps["bulk"];
77
- readonly rowTone?: DataTableProps["rowTone"];
78
- /** Toolbar actions in the list header in resolved form. KumikoScreen
79
- * builds them from EntityListScreenDefinition.toolbarActions:
80
- * navigate targets use useNav and handler-QN uses a dispatcher call.
81
- * RenderList renders the buttons on the right side of the toolbar,
82
- * before "+ New". */
83
- readonly toolbarActions?: readonly ToolbarActionButton[];
84
- /** Faceted filter dropdowns. KumikoScreen builds them from filterable
85
- * select/boolean fields; RenderList passes them through to DataTable. */
86
- readonly filterFacets?: readonly DataTableFacet[];
87
- /** Currently selected facet values by field (from URL state). */
88
- readonly filterValues?: Readonly<Record<string, readonly string[]>>;
89
- /** Toggles a facet value (sets URL state and refetches). */
90
- readonly onFilterChange?: (field: string, values: readonly string[]) => void;
91
- /** Reset aller aktiven Facets. */
92
- readonly onFilterReset?: () => void;
93
- /** Time-range filters — forwarded to the DataTable. */
94
- readonly dateRangeFacets?: readonly DataTableDateRangeFacet[];
95
- /** One bound changed (set URL state + refetch). */
96
- readonly onDateRangeChange?: (field: string, bound: "from" | "to", value: string) => void;
97
- /** Forwarded to `DataTableProps.chromeless` — drops the table's own card frame for a
98
- * host that already provides one (relatedList in a tabs-mode section). Default false. */
99
- readonly chromeless?: boolean;
100
- /** Forwarded to `DataTableProps.scrollBody` — bounds the table height and scrolls rows
101
- * internally instead of growing the page (relatedList in a tabs-mode section). Default false. */
102
- readonly scrollBody?: boolean;
103
- /** Forwarded to `DataTableProps.screenPadding` — `true`: the table carries
104
- * the shared screen padding because it is the screen body (entityList/
105
- * projectionList). Explicit `false`: no padding at all — the host already
106
- * pads its own children (relatedList in a tabs-mode Card). Omitted: legacy
107
- * `p-6` fallback for a standalone table with no padded host. */
108
- readonly screenPadding?: boolean;
109
- /** Forwarded to `DataTableProps.expandedRowIds` / `onToggleRowExpanded` /
110
- * `renderExpandedRow` (entityList `expandableRow`). */
111
- readonly expandedRowIds?: ReadonlySet<string>;
112
- readonly onToggleRowExpanded?: (rowId: string) => void;
113
- readonly renderExpandedRow?: (row: ListRowViewModel) => ReactNode;
114
- } & DataTableTableBlockProps;
5
+ export type { RenderListProps } from "./render-list-types.ts";
115
6
  export declare function RenderList(props: RenderListProps): ReactNode;