@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.
Files changed (369) hide show
  1. package/dist/app/action-form-support.js +4 -0
  2. package/dist/app/content-previews.d.ts +39 -0
  3. package/dist/app/content-previews.js +28 -0
  4. package/dist/app/entity-edit-screen.js +2 -5
  5. package/dist/app/entity-list-screen.js +42 -59
  6. package/dist/app/form-schema.d.ts +1 -0
  7. package/dist/app/form-schema.js +24 -0
  8. package/dist/app/list-facets.d.ts +1 -0
  9. package/dist/app/list-facets.js +10 -1
  10. package/dist/app/list-sort-options.d.ts +4 -0
  11. package/dist/app/list-sort-options.js +11 -0
  12. package/dist/app/named-filter-facet.d.ts +16 -3
  13. package/dist/app/named-filter-facet.js +97 -5
  14. package/dist/app/projection-detail-body.d.ts +2 -4
  15. package/dist/app/projection-detail-body.js +7 -1
  16. package/dist/app/projection-detail-guidance-data.d.ts +7 -0
  17. package/dist/app/projection-detail-guidance-data.js +103 -0
  18. package/dist/app/projection-detail-guidance.d.ts +13 -0
  19. package/dist/app/projection-detail-guidance.js +197 -0
  20. package/dist/app/projection-detail-header-model.d.ts +1 -3
  21. package/dist/app/projection-detail-header-model.js +4 -8
  22. package/dist/app/projection-detail-header-region.d.ts +2 -1
  23. package/dist/app/projection-detail-header-region.js +63 -23
  24. package/dist/app/projection-detail-header.d.ts +6 -1
  25. package/dist/app/projection-detail-header.js +76 -18
  26. package/dist/app/projection-detail-navigation.d.ts +2 -0
  27. package/dist/app/projection-detail-navigation.js +13 -3
  28. package/dist/app/projection-detail-states.d.ts +3 -3
  29. package/dist/app/projection-list-body.js +4 -2
  30. package/dist/app/projection-list-render.js +3 -1
  31. package/dist/app/projection-list-shim.d.ts +4 -1
  32. package/dist/app/projection-list-shim.js +35 -8
  33. package/dist/app/reference-link.d.ts +3 -2
  34. package/dist/app/reference-link.js +19 -4
  35. package/dist/app/row-actions.js +3 -3
  36. package/dist/app/screen-access.d.ts +4 -0
  37. package/dist/app/screen-access.js +18 -0
  38. package/dist/app/screen-shared.js +3 -1
  39. package/dist/app/unique-label-keys.d.ts +1 -0
  40. package/dist/app/unique-label-keys.js +9 -0
  41. package/dist/app/use-entity-list-payload.d.ts +26 -0
  42. package/dist/app/use-entity-list-payload.js +59 -0
  43. package/dist/app/use-entity-range-facets.js +2 -3
  44. package/dist/app/use-facet-counts.d.ts +5 -0
  45. package/dist/app/use-facet-counts.js +7 -0
  46. package/dist/app/use-list-summary-row.d.ts +10 -0
  47. package/dist/app/use-list-summary-row.js +33 -0
  48. package/dist/app/use-named-filter-queue.d.ts +20 -0
  49. package/dist/app/use-named-filter-queue.js +9 -0
  50. package/dist/app/use-projection-detail-actions.d.ts +5 -4
  51. package/dist/app/use-projection-detail-actions.js +42 -1
  52. package/dist/app/use-projection-list-data.d.ts +5 -0
  53. package/dist/app/use-projection-list-data.js +35 -6
  54. package/dist/app/use-projection-list-query.d.ts +2 -0
  55. package/dist/app/use-projection-list-query.js +29 -16
  56. package/dist/app/use-related-list-tab-counts.js +5 -1
  57. package/dist/app/use-row-decoration.d.ts +13 -0
  58. package/dist/app/use-row-decoration.js +103 -0
  59. package/dist/app/use-screen-list-rows.d.ts +4 -1
  60. package/dist/app/use-screen-list-rows.js +14 -5
  61. package/dist/app/use-screen-list-table.d.ts +3 -1
  62. package/dist/app/use-screen-list-table.js +10 -1
  63. package/dist/app/write-failed-error.d.ts +1 -0
  64. package/dist/app/write-failed-error.js +10 -0
  65. package/dist/card-options.d.ts +25 -0
  66. package/dist/card-options.js +1 -0
  67. package/dist/compact-tap-classes.d.ts +1 -0
  68. package/dist/compact-tap-classes.js +3 -0
  69. package/dist/components/embedded-list-field.js +13 -12
  70. package/dist/components/list-empty-state.d.ts +13 -1
  71. package/dist/components/list-empty-state.js +20 -1
  72. package/dist/components/list-group-page-bridges.d.ts +1 -1
  73. package/dist/components/list-group-page-bridges.js +2 -2
  74. package/dist/components/related-list-section.js +4 -22
  75. package/dist/components/render-edit-action-button.d.ts +3 -1
  76. package/dist/components/render-edit-action-button.js +5 -3
  77. package/dist/components/render-edit-render-model.d.ts +2 -2
  78. package/dist/components/render-edit-types.d.ts +4 -2
  79. package/dist/components/render-edit.js +3 -1
  80. package/dist/components/render-list-hint-columns.d.ts +9 -0
  81. package/dist/components/render-list-hint-columns.js +87 -0
  82. package/dist/components/render-list-reference-columns.js +4 -2
  83. package/dist/components/render-list-row-tone.d.ts +3 -0
  84. package/dist/components/render-list-row-tone.js +10 -0
  85. package/dist/components/render-list-table-props.d.ts +9 -1
  86. package/dist/components/render-list-table-props.js +4 -1
  87. package/dist/components/render-list-toolbar-action.d.ts +1 -2
  88. package/dist/components/render-list-toolbar-model.d.ts +4 -1
  89. package/dist/components/render-list-toolbar-model.js +21 -6
  90. package/dist/components/render-list-toolbar.d.ts +3 -2
  91. package/dist/components/render-list-toolbar.js +8 -6
  92. package/dist/components/render-list-types.d.ts +6 -1
  93. package/dist/components/render-list.js +26 -7
  94. package/dist/components/use-render-edit-controlled-sync.js +3 -5
  95. package/dist/components/use-render-edit-draft-save.js +7 -9
  96. package/dist/components/use-render-edit-schema.d.ts +3 -0
  97. package/dist/components/use-render-edit-schema.js +15 -0
  98. package/dist/components/use-render-edit-state.d.ts +1 -0
  99. package/dist/components/use-render-edit-state.js +4 -1
  100. package/dist/components/use-render-edit-steps.js +2 -3
  101. package/dist/components/use-render-list-columns.d.ts +3 -1
  102. package/dist/components/use-render-list-columns.js +22 -10
  103. package/dist/context/screen-focus-context.d.ts +14 -0
  104. package/dist/context/screen-focus-context.js +28 -0
  105. package/dist/data-table-facet-types.d.ts +6 -0
  106. package/dist/data-table-view-types.d.ts +20 -1
  107. package/dist/headless/form/form-controller.js +3 -1
  108. package/dist/headless/form/zod-bridge.d.ts +7 -1
  109. package/dist/headless/form/zod-bridge.js +10 -0
  110. package/dist/headless/index.d.ts +2 -1
  111. package/dist/headless/index.js +1 -0
  112. package/dist/headless/pwa-service-worker-meta.d.ts +4 -0
  113. package/dist/headless/pwa-service-worker-meta.js +13 -0
  114. package/dist/headless/view-model/index.d.ts +1 -1
  115. package/dist/headless/view-model/list-file-display.js +3 -2
  116. package/dist/headless/view-model/list.js +16 -0
  117. package/dist/headless/view-model/types.d.ts +37 -0
  118. package/dist/hooks/list-column-layout.js +2 -1
  119. package/dist/hooks/list-server-groups.js +14 -1
  120. package/dist/hooks/list-state-schema.d.ts +1 -0
  121. package/dist/hooks/list-state-schema.js +9 -1
  122. package/dist/hooks/use-debounced-value.d.ts +1 -0
  123. package/dist/hooks/use-debounced-value.js +11 -0
  124. package/dist/hooks/use-list-aggregates.d.ts +5 -1
  125. package/dist/hooks/use-list-aggregates.js +9 -5
  126. package/dist/hooks/use-list-table.d.ts +2 -1
  127. package/dist/hooks/use-list-table.js +3 -9
  128. package/dist/hooks/use-list-url-state.d.ts +2 -0
  129. package/dist/hooks/use-list-url-state.js +12 -4
  130. package/dist/hooks/use-list-view-state.js +23 -3
  131. package/dist/hooks/use-reference-lookup.js +7 -2
  132. package/dist/hooks/use-remembered-list-params.d.ts +6 -2
  133. package/dist/hooks/use-remembered-list-params.js +18 -3
  134. package/dist/hooks/use-store.js +0 -1
  135. package/dist/i18n-defaults.js +39 -3
  136. package/dist/index.d.ts +7 -2
  137. package/dist/index.js +4 -1
  138. package/dist/live/dispatcher-live.js +2 -0
  139. package/dist/metric-types.d.ts +4 -0
  140. package/dist/primitives-record-guidance.d.ts +55 -0
  141. package/dist/primitives-record-guidance.js +1 -0
  142. package/dist/primitives.d.ts +47 -54
  143. package/dist/server-clock.d.ts +6 -0
  144. package/dist/server-clock.js +20 -0
  145. package/dist/session/session-ended.d.ts +1 -0
  146. package/dist/session/session-ended.js +2 -2
  147. package/dist/status-tone.d.ts +1 -0
  148. package/dist/status-tone.js +5 -0
  149. package/dist/web/app/browser-locale.js +1 -1
  150. package/dist/web/app/client-plugin.d.ts +6 -1
  151. package/dist/web/app/create-app.d.ts +2 -1
  152. package/dist/web/app/create-app.js +15 -5
  153. package/dist/web/app/dashboard-body.js +25 -11
  154. package/dist/web/app/dashboard-header.d.ts +2 -1
  155. package/dist/web/app/dashboard-header.js +19 -7
  156. package/dist/web/app/dashboard-list-panel.d.ts +12 -0
  157. package/dist/web/app/dashboard-list-panel.js +144 -0
  158. package/dist/web/app/dashboard-narrow-gate.d.ts +6 -0
  159. package/dist/web/app/dashboard-narrow-gate.js +6 -0
  160. package/dist/web/app/dashboard-narrow-order.d.ts +3 -0
  161. package/dist/web/app/dashboard-narrow-order.js +6 -0
  162. package/dist/web/app/dashboard-navigation-link.d.ts +12 -0
  163. package/dist/web/app/dashboard-navigation-link.js +21 -0
  164. package/dist/web/app/dashboard-panels.d.ts +7 -23
  165. package/dist/web/app/dashboard-panels.js +55 -123
  166. package/dist/web/app/dashboard-reference-list-table.d.ts +5 -1
  167. package/dist/web/app/dashboard-reference-list-table.js +13 -4
  168. package/dist/web/app/dashboard-shared.d.ts +23 -7
  169. package/dist/web/app/dashboard-shared.js +45 -17
  170. package/dist/web/app/dashboard-stat-group-panel.d.ts +14 -0
  171. package/dist/web/app/dashboard-stat-group-panel.js +74 -0
  172. package/dist/web/app/dashboard-text-panel.d.ts +12 -0
  173. package/dist/web/app/dashboard-text-panel.js +167 -0
  174. package/dist/web/app/dashboard-text.d.ts +2 -0
  175. package/dist/web/app/dashboard-text.js +1 -1
  176. package/dist/web/app/dashboard-visibility.js +1 -1
  177. package/dist/web/app/relative-time.js +2 -1
  178. package/dist/web/drawn-icons.d.ts +6 -0
  179. package/dist/web/drawn-icons.js +30 -0
  180. package/dist/web/editor/editor-footer.d.ts +28 -0
  181. package/dist/web/editor/editor-footer.js +23 -0
  182. package/dist/web/editor/editor-frame.d.ts +23 -0
  183. package/dist/web/editor/editor-frame.js +24 -0
  184. package/dist/web/editor/editor-header.d.ts +36 -0
  185. package/dist/web/editor/editor-header.js +30 -0
  186. package/dist/web/editor/editor-rail.d.ts +32 -0
  187. package/dist/web/editor/editor-rail.js +37 -0
  188. package/dist/web/editor/editor-workbench.d.ts +34 -0
  189. package/dist/web/editor/editor-workbench.js +19 -0
  190. package/dist/web/editor/index.d.ts +6 -0
  191. package/dist/web/editor/index.js +6 -0
  192. package/dist/web/editor/relative-when.d.ts +1 -0
  193. package/dist/web/editor/relative-when.js +18 -0
  194. package/dist/web/icons.js +6 -5
  195. package/dist/web/index.d.ts +9 -1
  196. package/dist/web/index.js +7 -1
  197. package/dist/web/layout/default-app-shell.js +6 -4
  198. package/dist/web/layout/focus-aware-sidebar.d.ts +4 -7
  199. package/dist/web/layout/focus-aware-sidebar.js +5 -7
  200. package/dist/web/layout/header-action-pinned.d.ts +8 -0
  201. package/dist/web/layout/header-action-pinned.js +25 -0
  202. package/dist/web/layout/nav-collapse-state.d.ts +7 -0
  203. package/dist/web/layout/nav-collapse-state.js +76 -0
  204. package/dist/web/layout/nav-tree.js +71 -28
  205. package/dist/web/layout/notification-bell.d.ts +7 -2
  206. package/dist/web/layout/notification-bell.js +16 -5
  207. package/dist/web/layout/page-header-slot.d.ts +2 -0
  208. package/dist/web/layout/page-header-slot.js +4 -0
  209. package/dist/web/layout/screen-focus.d.ts +8 -0
  210. package/dist/web/layout/screen-focus.js +42 -0
  211. package/dist/web/layout/shell-focus.d.ts +5 -4
  212. package/dist/web/layout/shell-focus.js +14 -7
  213. package/dist/web/layout/shell-header.d.ts +2 -1
  214. package/dist/web/layout/shell-header.js +84 -27
  215. package/dist/web/layout/shell-style.d.ts +3 -0
  216. package/dist/web/layout/shell-style.js +6 -0
  217. package/dist/web/layout/sidebar-open-state.d.ts +6 -0
  218. package/dist/web/layout/sidebar-open-state.js +28 -0
  219. package/dist/web/layout/uniform-bar-controls.d.ts +2 -2
  220. package/dist/web/layout/uniform-bar-controls.js +4 -3
  221. package/dist/web/layout/use-in-app-inbox.js +8 -1
  222. package/dist/web/layout/workspace-shell.d.ts +11 -1
  223. package/dist/web/layout/workspace-shell.js +9 -5
  224. package/dist/web/lib/upload-file-ref.d.ts +2 -2
  225. package/dist/web/lib/upload-file-ref.js +4 -9
  226. package/dist/web/presence/use-presence.js +7 -2
  227. package/dist/web/primitives/banner.d.ts +1 -1
  228. package/dist/web/primitives/banner.js +22 -9
  229. package/dist/web/primitives/calendar-day-picker.js +24 -5
  230. package/dist/web/primitives/card.js +18 -8
  231. package/dist/web/primitives/code-input.js +6 -1
  232. package/dist/web/primitives/data-table/actions-column.d.ts +2 -1
  233. package/dist/web/primitives/data-table/actions-column.js +7 -3
  234. package/dist/web/primitives/data-table/card-body.d.ts +6 -1
  235. package/dist/web/primitives/data-table/card-body.js +53 -6
  236. package/dist/web/primitives/data-table/card-frame.d.ts +8 -0
  237. package/dist/web/primitives/data-table/card-frame.js +9 -0
  238. package/dist/web/primitives/data-table/card-row.js +44 -7
  239. package/dist/web/primitives/data-table/card-sort-select.d.ts +6 -2
  240. package/dist/web/primitives/data-table/card-sort-select.js +10 -7
  241. package/dist/web/primitives/data-table/card-view.js +12 -2
  242. package/dist/web/primitives/data-table/column-picker-section.js +9 -2
  243. package/dist/web/primitives/data-table/column-resize-handle.js +3 -4
  244. package/dist/web/primitives/data-table/column-role.d.ts +1 -0
  245. package/dist/web/primitives/data-table/column-role.js +1 -0
  246. package/dist/web/primitives/data-table/data-cell-props.d.ts +5 -0
  247. package/dist/web/primitives/data-table/data-cell-props.js +5 -0
  248. package/dist/web/primitives/data-table/density.js +1 -0
  249. package/dist/web/primitives/data-table/facet-cluster.d.ts +2 -1
  250. package/dist/web/primitives/data-table/facet-cluster.js +2 -2
  251. package/dist/web/primitives/data-table/group-band.js +4 -0
  252. package/dist/web/primitives/data-table/hint-cell.d.ts +14 -0
  253. package/dist/web/primitives/data-table/hint-cell.js +68 -0
  254. package/dist/web/primitives/data-table/hint-column-width.d.ts +3 -0
  255. package/dist/web/primitives/data-table/hint-column-width.js +11 -0
  256. package/dist/web/primitives/data-table/measure-value.js +2 -3
  257. package/dist/web/primitives/data-table/row-action-column.d.ts +3 -0
  258. package/dist/web/primitives/data-table/row-action-column.js +4 -0
  259. package/dist/web/primitives/data-table/row-render-parts.d.ts +1 -1
  260. package/dist/web/primitives/data-table/row-render-parts.js +3 -2
  261. package/dist/web/primitives/data-table/sort-options-select.d.ts +22 -0
  262. package/dist/web/primitives/data-table/sort-options-select.js +46 -0
  263. package/dist/web/primitives/data-table/sortable-header.d.ts +3 -1
  264. package/dist/web/primitives/data-table/sortable-header.js +5 -3
  265. package/dist/web/primitives/data-table/table-body.d.ts +1 -1
  266. package/dist/web/primitives/data-table/table-body.js +5 -3
  267. package/dist/web/primitives/data-table/table-chrome.js +3 -1
  268. package/dist/web/primitives/data-table/table-content.js +12 -7
  269. package/dist/web/primitives/data-table/table-data-cell.js +9 -3
  270. package/dist/web/primitives/data-table/table-header-row.js +5 -2
  271. package/dist/web/primitives/data-table/table-view.js +22 -3
  272. package/dist/web/primitives/data-table/toolbar-end-cluster.js +1 -1
  273. package/dist/web/primitives/data-table/toolbar.d.ts +2 -0
  274. package/dist/web/primitives/data-table/toolbar.js +70 -7
  275. package/dist/web/primitives/data-table/totals-footer.d.ts +20 -0
  276. package/dist/web/primitives/data-table/totals-footer.js +41 -9
  277. package/dist/web/primitives/data-table/use-bulk-selection.js +2 -1
  278. package/dist/web/primitives/data-table/use-column-pins.js +4 -0
  279. package/dist/web/primitives/data-table/use-data-table-state.d.ts +1 -0
  280. package/dist/web/primitives/data-table/use-data-table-state.js +9 -5
  281. package/dist/web/primitives/data-table/use-measured-column-widths.js +5 -4
  282. package/dist/web/primitives/data-table/use-row-selection.js +22 -11
  283. package/dist/web/primitives/data-table/view-menu.js +7 -1
  284. package/dist/web/primitives/data-table-cell.d.ts +21 -2
  285. package/dist/web/primitives/data-table-cell.js +129 -26
  286. package/dist/web/primitives/embedded-file-cell.js +3 -2
  287. package/dist/web/primitives/embedded-list-cards.js +3 -4
  288. package/dist/web/primitives/facet-filter.d.ts +5 -3
  289. package/dist/web/primitives/facet-filter.js +36 -5
  290. package/dist/web/primitives/facet-search-filter.d.ts +2 -1
  291. package/dist/web/primitives/facet-search-filter.js +3 -2
  292. package/dist/web/primitives/facet-trigger-label.d.ts +8 -0
  293. package/dist/web/primitives/facet-trigger-label.js +9 -0
  294. package/dist/web/primitives/file-thumbnail.d.ts +6 -2
  295. package/dist/web/primitives/file-thumbnail.js +13 -6
  296. package/dist/web/primitives/file-upload.js +3 -2
  297. package/dist/web/primitives/file-view-action.d.ts +6 -0
  298. package/dist/web/primitives/file-view-action.js +22 -0
  299. package/dist/web/primitives/files-dropzone.js +20 -9
  300. package/dist/web/primitives/form-footer-parts.d.ts +0 -1
  301. package/dist/web/primitives/form.js +0 -1
  302. package/dist/web/primitives/hint-reason-row.d.ts +32 -0
  303. package/dist/web/primitives/hint-reason-row.js +45 -0
  304. package/dist/web/primitives/index.js +6 -0
  305. package/dist/web/primitives/layout-elements.d.ts +1 -1
  306. package/dist/web/primitives/layout-elements.js +3 -3
  307. package/dist/web/primitives/metric.js +20 -6
  308. package/dist/web/primitives/page-header.d.ts +1 -1
  309. package/dist/web/primitives/page-header.js +10 -2
  310. package/dist/web/primitives/pager.d.ts +3 -2
  311. package/dist/web/primitives/pager.js +31 -24
  312. package/dist/web/primitives/reason-box.d.ts +20 -0
  313. package/dist/web/primitives/reason-box.js +13 -0
  314. package/dist/web/primitives/record-breadcrumb.d.ts +3 -0
  315. package/dist/web/primitives/record-breadcrumb.js +11 -0
  316. package/dist/web/primitives/record-steps.d.ts +3 -0
  317. package/dist/web/primitives/record-steps.js +50 -0
  318. package/dist/web/primitives/record-summary.d.ts +3 -0
  319. package/dist/web/primitives/record-summary.js +18 -0
  320. package/dist/web/primitives/row-actions.d.ts +3 -1
  321. package/dist/web/primitives/row-actions.js +14 -5
  322. package/dist/web/primitives/segmented-select.js +10 -9
  323. package/dist/web/primitives/tabs.js +6 -1
  324. package/dist/web/pwa/pwa-support.d.ts +4 -0
  325. package/dist/web/pwa/pwa-support.js +131 -0
  326. package/dist/web/sse/live-events.js +2 -2
  327. package/dist/web/tokens.js +0 -3
  328. package/dist/web/ui/sidebar.d.ts +2 -1
  329. package/dist/web/ui/sidebar.js +4 -3
  330. package/dist/web/widgets/ai-text-field.js +3 -2
  331. package/dist/web/widgets/chart-parts.d.ts +7 -1
  332. package/dist/web/widgets/chart-parts.js +10 -4
  333. package/dist/web/widgets/collapsible-section.js +1 -1
  334. package/dist/web/widgets/dashboard-list-cards.d.ts +17 -0
  335. package/dist/web/widgets/dashboard-list-cards.js +46 -0
  336. package/dist/web/widgets/dashboard-list.d.ts +45 -5
  337. package/dist/web/widgets/dashboard-list.js +126 -25
  338. package/dist/web/widgets/drawer-panel-class.d.ts +1 -0
  339. package/dist/web/widgets/drawer-panel-class.js +9 -1
  340. package/dist/web/widgets/drawer-sizing.js +1 -1
  341. package/dist/web/widgets/drawer.js +2 -2
  342. package/dist/web/widgets/floating-panel.js +4 -2
  343. package/dist/web/widgets/index.d.ts +2 -0
  344. package/dist/web/widgets/index.js +2 -0
  345. package/dist/web/widgets/infinity-list.js +18 -11
  346. package/dist/web/widgets/pdf-viewer-toolbar.js +3 -2
  347. package/dist/web/widgets/preview-width-frame.d.ts +7 -0
  348. package/dist/web/widgets/preview-width-frame.js +10 -0
  349. package/dist/web/widgets/section-card.d.ts +1 -1
  350. package/dist/web/widgets/sheet-parts.js +3 -1
  351. package/dist/web/widgets/stacked-area-chrome.js +3 -3
  352. package/dist/web/widgets/stacked-area-tooltip.js +2 -10
  353. package/dist/web/widgets/stat-box-cell.d.ts +19 -0
  354. package/dist/web/widgets/stat-box-cell.js +10 -0
  355. package/dist/web/widgets/stat.d.ts +16 -1
  356. package/dist/web/widgets/stat.js +24 -7
  357. package/dist/web/widgets/status-badge.d.ts +7 -5
  358. package/dist/web/widgets/status-badge.js +2 -2
  359. package/dist/web/widgets/step-bar.d.ts +1 -1
  360. package/dist/web/widgets/step-bar.js +37 -7
  361. package/dist/web/widgets/step-list-row.d.ts +4 -0
  362. package/dist/web/widgets/step-list-row.js +22 -14
  363. package/dist/web/widgets/step-list.d.ts +12 -4
  364. package/dist/web/widgets/step-list.js +38 -20
  365. package/dist/web/widgets/upload-zone.d.ts +8 -1
  366. package/dist/web/widgets/upload-zone.js +13 -3
  367. package/package.json +5 -5
  368. package/src/changes.json +289 -0
  369. package/src/web/styles.css +15 -0
@@ -22,6 +22,7 @@ export type ListColumnFileDisplay = {
22
22
  readonly variant?: string;
23
23
  } | {
24
24
  readonly kind: "file";
25
+ readonly viewInDrawer?: true;
25
26
  };
26
27
  export type ListColumnViewModel = {
27
28
  readonly field: string;
@@ -29,6 +30,8 @@ export type ListColumnViewModel = {
29
30
  readonly type: string;
30
31
  readonly renderer?: FieldRenderer | RuntimeRenderer;
31
32
  readonly linkFor?: RuntimeCellLink;
33
+ /** Per-row action link column: a text link right-aligned without header text from sm, a small outline button on cards. */
34
+ readonly rowActionLink?: boolean;
32
35
  readonly linkItemsFor?: RuntimeCellLinkItems;
33
36
  readonly sortable: boolean;
34
37
  /** Only for `type: "select"` or `type: "multiSelect"` — translated option
@@ -55,6 +58,10 @@ export type ListColumnViewModel = {
55
58
  readonly highlighted?: boolean;
56
59
  /** Mirrors `ListColumnSpec.hideOnNarrow`: card layout skips the column. */
57
60
  readonly hideOnNarrow?: boolean;
61
+ /** Mirrors `ListColumnSpec.showOnNarrowOnly`: the table layout skips the column. */
62
+ readonly showOnNarrowOnly?: boolean;
63
+ /** Mirrors `ListColumnSpec.narrowInline`: the card draws consecutive such columns on one line. */
64
+ readonly narrowInline?: boolean;
58
65
  /** Only for `type: "number"` — mirrors `NumberFieldDef.grouping` (default
59
66
  * `true`). `false` renders without thousands-separators (e.g. a model
60
67
  * year). */
@@ -63,6 +70,36 @@ export type ListColumnViewModel = {
63
70
  * `{ format: "image" | "file" }` renderer. The cell shows a thumbnail or the
64
71
  * file name instead of the FileRef UUID. */
65
72
  readonly fileDisplay?: ListColumnFileDisplay;
73
+ /** "To do" cell (`ListColumnSpec.hint`), `emptyLabel` already translated. */
74
+ readonly hint?: ListColumnHintViewModel;
75
+ /** Start width and floor in px of a hint column; unlike other columns they apply without `table.resizing`. */
76
+ readonly width?: number;
77
+ readonly minWidth?: number;
78
+ /** `ListColumnSpec.display` for list tables: a status pill or a link drawn as a button. */
79
+ readonly display?: ListColumnCellDisplay;
80
+ /** Row field naming the pill tone; only with `display: "badge"`. */
81
+ readonly badgeToneField?: string;
82
+ /** `false`: the pill has no leading dot. */
83
+ readonly badgeDot?: false;
84
+ /** `false`: an empty cell stays blank instead of showing "—". */
85
+ readonly emptyPlaceholder?: false;
86
+ };
87
+ export type ListColumnCellDisplay = "badge" | "button";
88
+ export type ListColumnHintViewModel = {
89
+ readonly detailField?: string;
90
+ /** `ListColumnHint.narrowDetailField`: replaces `detailField` in the phone card. */
91
+ readonly narrowDetailField?: string;
92
+ /** `ListColumnHint.narrowField`: replaces the sentence value in the phone card. */
93
+ readonly narrowField?: string;
94
+ readonly toneField?: string;
95
+ readonly reasonField?: string;
96
+ readonly reasonOpenField?: string;
97
+ readonly reasonTitleField?: string;
98
+ /** `ListColumnHint.plainSentence`: the sentence keeps the normal text color. */
99
+ readonly plainSentence?: boolean;
100
+ readonly emptyLabel: string;
101
+ /** Label of the reason toggle, already translated. */
102
+ readonly reasonLabel: string;
66
103
  };
67
104
  export type ListRowViewModel = {
68
105
  readonly id: string;
@@ -1,7 +1,8 @@
1
+ import { LIST_COLUMN_MAX_WIDTH_PX } from "@cosmicdrift/kumiko-types/screen";
1
2
  export const DEFAULT_COLUMN_WIDTH_PX = 160;
2
3
  export const DEFAULT_MIN_COLUMN_WIDTH_PX = 64;
3
4
  /** Upper bound so a tampered stored width cannot blow the table up. */
4
- export const MAX_COLUMN_WIDTH_PX = 2000;
5
+ export const MAX_COLUMN_WIDTH_PX = LIST_COLUMN_MAX_WIDTH_PX;
5
6
  export function defaultPins(schema) {
6
7
  const pins = {};
7
8
  for (const column of schema) {
@@ -1,4 +1,5 @@
1
1
  import { relatedListGroupHeaderLabel, relatedListGroupKey, } from "@cosmicdrift/kumiko-types/screen";
2
+ import { rendererWarn } from "../dev-console.js";
2
3
  import { groupPageKey, groupPagePayload, loadedGroupPages, } from "./list-group-pages.js";
3
4
  export function freshLoadState(resetKey) {
4
5
  return {
@@ -19,12 +20,24 @@ export function measuresOf(totals, group) {
19
20
  function startsCollapsed(declared, key) {
20
21
  return (declared?.collapsedWhen !== undefined && key === relatedListGroupKey(declared.collapsedWhen));
21
22
  }
23
+ // Groupings declared before the dateField/{lastDate} placeholder was removed still carry it in app texts.
24
+ const REMOVED_LAST_DATE_PLACEHOLDER = "{lastDate}";
25
+ const warnedRemovedPlaceholderKeys = new Set();
26
+ function withoutRemovedPlaceholder(text, labelKey) {
27
+ if (!text.includes(REMOVED_LAST_DATE_PLACEHOLDER))
28
+ return text;
29
+ if (!warnedRemovedPlaceholderKeys.has(labelKey)) {
30
+ warnedRemovedPlaceholderKeys.add(labelKey);
31
+ rendererWarn(`[kumiko] Translation "${labelKey}" uses ${REMOVED_LAST_DATE_PLACEHOLDER}, which grouping no longer provides; use a max measure in table.totals instead.`);
32
+ }
33
+ return text.replaceAll(REMOVED_LAST_DATE_PLACEHOLDER, "").trim();
34
+ }
22
35
  function headerLabel(input, key, group) {
23
36
  const serverLabel = group.label ?? undefined;
24
37
  const labelKey = input.declared === undefined ? undefined : relatedListGroupHeaderLabel(input.declared, key);
25
38
  if (labelKey === undefined)
26
39
  return serverLabel;
27
- return input.translate(labelKey, { count: group.count, value: serverLabel ?? key });
40
+ return withoutRemovedPlaceholder(input.translate(labelKey, { count: group.count, value: serverLabel ?? key }), labelKey);
28
41
  }
29
42
  function pageRequests(input, group, key, pages, requestedPages) {
30
43
  const requests = [];
@@ -23,6 +23,7 @@ export type KnownListFields = {
23
23
  readonly columnFields: readonly string[];
24
24
  readonly filterFields: readonly string[];
25
25
  };
26
+ export declare const NAMED_FILTER_PARAM_SUFFIX = "filter";
26
27
  /** Drops what the screen no longer has (renamed field, removed column) so an old
27
28
  * session never feeds dead keys into the URL or the column picker. */
28
29
  export declare function sanitizeStoredListState(raw: unknown, known: KnownListFields): StoredListState | undefined;
@@ -25,7 +25,15 @@ export function parseStoredListStateJson(text) {
25
25
  return undefined;
26
26
  }
27
27
  }
28
- const PLAIN_PARAM_SUFFIXES = new Set(["sort", "dir", "q", "page", "size"]);
28
+ export const NAMED_FILTER_PARAM_SUFFIX = "filter";
29
+ const PLAIN_PARAM_SUFFIXES = new Set([
30
+ "sort",
31
+ "dir",
32
+ "q",
33
+ "page",
34
+ "size",
35
+ NAMED_FILTER_PARAM_SUFFIX,
36
+ ]);
29
37
  const FILTER_PREFIX = "f.";
30
38
  const RANGE_BOUND_SUFFIXES = [".from", ".to", ".min", ".max"];
31
39
  function isKnownParamSuffix(suffix, filterFields) {
@@ -0,0 +1 @@
1
+ export declare function useDebouncedValue<T>(value: T, delayMs: number): T;
@@ -0,0 +1,11 @@
1
+ import { useEffect, useState } from "react";
2
+ // Unlike useDeferredValue this waits for a quiet period, so a burst of
3
+ // keystrokes triggers one server round-trip instead of one per keystroke.
4
+ export function useDebouncedValue(value, delayMs) {
5
+ const [debounced, setDebounced] = useState(value);
6
+ useEffect(() => {
7
+ const timer = setTimeout(() => setDebounced(value), delayMs);
8
+ return () => clearTimeout(timer);
9
+ }, [value, delayMs]);
10
+ return debounced;
11
+ }
@@ -11,12 +11,16 @@ type ListAggregatesArgs = {
11
11
  readonly pageSize: number;
12
12
  readonly paging: ListGroupPaging;
13
13
  readonly translate: Translate;
14
+ /** Holds the aggregate queries, e.g. while remembered params are restored. */
15
+ readonly paused?: boolean;
14
16
  };
15
17
  export type ListGroupPagesProps = {
16
18
  readonly queryType: string;
17
19
  readonly requests: readonly ListGroupPageRequest[];
18
20
  readonly onResult: (pageKey: string, result: ListGroupPageResult) => void;
19
21
  readonly refreshNonce: number;
22
+ /** Bridges remount when it changes: useQuery keeps the previous payload's data. */
23
+ readonly resetKey: string;
20
24
  };
21
25
  export type ListAggregates = {
22
26
  readonly grouped: boolean;
@@ -34,5 +38,5 @@ export type ListAggregates = {
34
38
  };
35
39
  /** Server-side grouping and totals of a list: groups are the load unit, each open
36
40
  * and visible group pages through its own rows; nothing is summed on the client. */
37
- export declare function useListAggregates({ queryType, payload, table, groupField, pageSize, paging, translate, }: ListAggregatesArgs): ListAggregates;
41
+ export declare function useListAggregates({ queryType, payload, table, groupField, pageSize, paging, translate, paused, }: ListAggregatesArgs): ListAggregates;
38
42
  export {};
@@ -18,15 +18,18 @@ function noticeOf(groups, totals) {
18
18
  }
19
19
  /** The groups and totals aggregate queries plus a refresh that reloads both. */
20
20
  function useAggregateQueries(args) {
21
- const { queryType, base, groupField, measures } = args;
21
+ const { queryType, base, groupField, measures, paused } = args;
22
22
  const grouped = groupField !== undefined;
23
23
  const withTotals = measures.length > 0;
24
24
  const groupsPayload = useMemo(() => ({ ...base, aggregate: { groupBy: groupField, measures } }), [base, groupField, measures]);
25
25
  const totalsPayload = useMemo(() => ({ ...base, aggregate: { measures } }), [base, measures]);
26
- const groupsQuery = useQuery(queryType, groupsPayload, { live: true, enabled: grouped });
26
+ const groupsQuery = useQuery(queryType, groupsPayload, {
27
+ live: true,
28
+ enabled: grouped && !paused,
29
+ });
27
30
  const totalsQuery = useQuery(queryType, totalsPayload, {
28
31
  live: true,
29
- enabled: withTotals,
32
+ enabled: withTotals && !paused,
30
33
  });
31
34
  const [refreshNonce, setRefreshNonce] = useState(0);
32
35
  const refetchGroups = groupsQuery.refetch;
@@ -51,7 +54,7 @@ function useAggregateQueries(args) {
51
54
  }
52
55
  /** Server-side grouping and totals of a list: groups are the load unit, each open
53
56
  * and visible group pages through its own rows; nothing is summed on the client. */
54
- export function useListAggregates({ queryType, payload, table, groupField, pageSize, paging, translate, }) {
57
+ export function useListAggregates({ queryType, payload, table, groupField, pageSize, paging, translate, paused = false, }) {
55
58
  const grouping = table?.grouping;
56
59
  const totalSpecs = useMemo(() => table?.totals ?? [], [table?.totals]);
57
60
  const base = useMemo(() => withoutListPaging(payload), [payload]);
@@ -63,6 +66,7 @@ export function useListAggregates({ queryType, payload, table, groupField, pageS
63
66
  base,
64
67
  groupField,
65
68
  measures,
69
+ paused,
66
70
  });
67
71
  const { state, onToggle, onHeaderVisible, onLoadMore, onResult } = useGroupLoadState(`${groupField ?? ""}|${baseKey}`);
68
72
  const active = groupField !== undefined && groupsAnswer !== undefined;
@@ -99,7 +103,7 @@ export function useListAggregates({ queryType, payload, table, groupField, pageS
99
103
  ...(serverGroups !== undefined && { serverGroups }),
100
104
  ...(totals !== undefined && { totals }),
101
105
  ...(notice !== undefined && { notice }),
102
- groupPages: { queryType, requests, onResult, refreshNonce },
106
+ groupPages: { queryType, requests, onResult, refreshNonce, resetKey: state.resetKey },
103
107
  refresh,
104
108
  loading: grouped && groupsAnswer === undefined && groupsError === null,
105
109
  error: groupsError,
@@ -1,4 +1,4 @@
1
- import type { ListTableOptions } from "@cosmicdrift/kumiko-types/screen";
1
+ import type { ListTableFrame, ListTableOptions } from "@cosmicdrift/kumiko-types/screen";
2
2
  import type { DataTableExport, DataTableResetAll, DataTableViewOptions } from "../data-table-view-types.ts";
3
3
  import { type ListViewSchemaColumn } from "./use-list-view-state.ts";
4
4
  type ListTableArgs = {
@@ -28,6 +28,7 @@ export type ListTableProps = {
28
28
  readonly resetAll?: DataTableResetAll;
29
29
  readonly exportList?: DataTableExport;
30
30
  readonly compactHeader?: boolean;
31
+ readonly frame?: ListTableFrame;
31
32
  };
32
33
  export type ListTableState = {
33
34
  readonly props: ListTableProps;
@@ -4,13 +4,6 @@ import { useListStateStore } from "../components/list-state-store.js";
4
4
  import { isListStateAtDefault, listResetUpdates } from "./list-reset.js";
5
5
  import { useListViewState } from "./use-list-view-state.js";
6
6
  const NO_TABLE_OPTIONS = {};
7
- const PAGING_PAYLOAD_KEYS = ["limit", "offset", "cursor", "totalCount", "filter"];
8
- function withoutPaging(payload) {
9
- const kept = { ...payload };
10
- for (const key of PAGING_PAYLOAD_KEYS)
11
- delete kept[key];
12
- return kept;
13
- }
14
7
  /** Props for the DataTable's `view` / `resetAll` from a screen's `table` block. */
15
8
  export function useListTable({ storeKey, table, schemaColumns, url, local, exportSource, }) {
16
9
  const nav = useNav();
@@ -79,14 +72,15 @@ export function useListTable({ storeKey, table, schemaColumns, url, local, expor
79
72
  return undefined;
80
73
  const ordered = viewColumns?.filter((column) => column.visible).map((column) => column.field) ??
81
74
  schemaColumns.map((column) => column.field);
82
- return { ...exportSource, payload: withoutPaging(exportSource.payload), columns: ordered };
75
+ return { ...exportSource, columns: ordered };
83
76
  }, [exportEnabled, exportSource, viewColumns, schemaColumns]);
84
77
  const props = useMemo(() => ({
85
78
  ...(view !== undefined && { view }),
86
79
  ...(resetAll !== undefined && { resetAll }),
87
80
  ...(exportList !== undefined && { exportList }),
88
81
  ...(options.compactHeader === true && { compactHeader: true }),
89
- }), [view, resetAll, exportList, options.compactHeader]);
82
+ ...(options.frame !== undefined && { frame: options.frame }),
83
+ }), [view, resetAll, exportList, options.compactHeader, options.frame]);
90
84
  const groupField = options.grouping !== undefined && viewState.groupBy !== "" ? viewState.groupBy : undefined;
91
85
  return { props, groupField };
92
86
  }
@@ -17,6 +17,8 @@ export type ListUrlState = {
17
17
  readonly filters: Readonly<Record<string, readonly string[]>>;
18
18
  /** Id of the active named list filter; undefined when none is set. */
19
19
  readonly namedFilter: string | undefined;
20
+ /** The facet filters the list sends while `namedFilter` is the active named filter: author defaults apply only without one. */
21
+ readonly filtersFor: (namedFilter: string | undefined) => Readonly<Record<string, readonly string[]>>;
20
22
  };
21
23
  export type ListUrlStateApi = ListUrlState & {
22
24
  /** Atomically sets sort + dir. null means unsorted and clears both keys. */
@@ -18,6 +18,7 @@
18
18
  // flood the browser history.
19
19
  import { useCallback, useMemo } from "react";
20
20
  import { useNav } from "../app/nav.js";
21
+ import { NAMED_FILTER_PARAM_SUFFIX } from "./list-state-schema.js";
21
22
  // A facet with a `defaultFilters` entry falls back to that default whenever
22
23
  // its URL key is absent. Clearing it therefore has to leave a marker, or the
23
24
  // default would come straight back.
@@ -42,7 +43,7 @@ export function listFilterUrlKey(screenId, field) {
42
43
  }
43
44
  /** URL key of the named list filter id. Distinct from the `f.` facet prefix. */
44
45
  export function listNamedFilterUrlKey(screenId) {
45
- return key(screenId, "filter");
46
+ return key(screenId, NAMED_FILTER_PARAM_SUFFIX);
46
47
  }
47
48
  function parseDir(value) {
48
49
  return value === "asc" || value === "desc" ? value : undefined;
@@ -71,7 +72,7 @@ export function useListUrlState(screenId, defaultFilters) {
71
72
  // The named filter defines the view, so author defaults must not narrow it further.
72
73
  const effectiveDefaultFilters = namedFilter === undefined ? defaultFilters : undefined;
73
74
  const filterPrefix = listFilterUrlKey(screenId, "");
74
- const filters = useMemo(() => {
75
+ const urlFilters = useMemo(() => {
75
76
  const out = {};
76
77
  for (const [k, v] of Object.entries(params)) {
77
78
  if (!k.startsWith(filterPrefix) || v === "")
@@ -83,12 +84,18 @@ export function useListUrlState(screenId, defaultFilters) {
83
84
  // commas; use repeated keys if comma-containing values are ever needed.
84
85
  out[field] = v === NO_FILTER_URL_VALUE ? [] : v.split(",").filter((s) => s !== "");
85
86
  }
86
- for (const [field, values] of Object.entries(effectiveDefaultFilters ?? {})) {
87
+ return out;
88
+ }, [params, filterPrefix]);
89
+ const filtersWithDefaults = useMemo(() => {
90
+ const out = { ...urlFilters };
91
+ for (const [field, values] of Object.entries(defaultFilters ?? {})) {
87
92
  if (!Object.hasOwn(out, field))
88
93
  out[field] = values;
89
94
  }
90
95
  return out;
91
- }, [params, filterPrefix, effectiveDefaultFilters]);
96
+ }, [urlFilters, defaultFilters]);
97
+ const filtersFor = useCallback((forNamedFilter) => forNamedFilter === undefined ? filtersWithDefaults : urlFilters, [filtersWithDefaults, urlFilters]);
98
+ const filters = filtersFor(namedFilter);
92
99
  const clearedFilterValue = useCallback((field) => effectiveDefaultFilters !== undefined && Object.hasOwn(effectiveDefaultFilters, field)
93
100
  ? NO_FILTER_URL_VALUE
94
101
  : null, [effectiveDefaultFilters]);
@@ -157,6 +164,7 @@ export function useListUrlState(screenId, defaultFilters) {
157
164
  pageSize,
158
165
  filters,
159
166
  namedFilter,
167
+ filtersFor,
160
168
  setSort,
161
169
  setQ,
162
170
  setPage,
@@ -36,6 +36,14 @@ function mergeSavedColumns(schema, saved) {
36
36
  });
37
37
  return merged;
38
38
  }
39
+ // Only what differs from the schema defaults is stored, so a later schema change to
40
+ // an untouched pin or width still reaches users who merely changed something else.
41
+ function widthsDifferingFrom(widths, defaults) {
42
+ return Object.fromEntries(Object.entries(widths).filter(([field, w]) => defaults[field] !== w));
43
+ }
44
+ function hasEntries(record) {
45
+ return Object.keys(record).length > 0;
46
+ }
39
47
  function sameColumns(a, b) {
40
48
  return (a.length === b.length &&
41
49
  a.every((c, i) => c.field === b[i]?.field && c.visible === b[i]?.visible));
@@ -110,12 +118,24 @@ export function useListViewState(args) {
110
118
  view: {
111
119
  ...(columnPicker && { columns: next.columns }),
112
120
  ...(userChoosesDensity && { density: next.density }),
113
- ...(pinning && { pins: next.pins }),
114
- ...(resizing && { widths: next.widths }),
121
+ ...(pinning && !sameRecord(next.pins, defaults.pins) && { pins: next.pins }),
122
+ ...(resizing &&
123
+ hasEntries(widthsDifferingFrom(next.widths, defaults.widths)) && {
124
+ widths: widthsDifferingFrom(next.widths, defaults.widths),
125
+ }),
115
126
  ...(userChoosesGroupBy && { groupBy: next.groupBy }),
116
127
  },
117
128
  });
118
- }, [store, storeKey, columnPicker, userChoosesDensity, pinning, resizing, userChoosesGroupBy]);
129
+ }, [
130
+ store,
131
+ storeKey,
132
+ defaults,
133
+ columnPicker,
134
+ userChoosesDensity,
135
+ pinning,
136
+ resizing,
137
+ userChoosesGroupBy,
138
+ ]);
119
139
  const setColumns = useCallback((next) => {
120
140
  // skip: a view must keep at least one visible column
121
141
  if (!hasVisibleColumn(next))
@@ -40,13 +40,18 @@ export function referenceOptionSource(field, refFeature, refEntity) {
40
40
  }
41
41
  return referenceLookupSource(refFeature, refEntity, field.refLabelField ?? "id");
42
42
  }
43
+ // The server rejects a list `limit` above its hard maximum, which would blank every
44
+ // label of a field holding more ids than that; the first page still resolves.
45
+ function byIdsLimit(ids, capLimit) {
46
+ return Math.min(Math.max(ids.length, capLimit), REFERENCE_LIST_LOOKUP_LIMIT);
47
+ }
43
48
  // Asks a label source for exactly these rows, so a stored id cannot fall beyond a
44
49
  // lookup cap: `ids` is the by-id input of directory sources, `filters` that of entity
45
50
  // list handlers. Both only narrow the caller's own read scope. A hand-written handler
46
51
  // that knows neither still answers its first `capLimit` rows, as before.
47
52
  export function referenceRowsByIdsPayload(ids, capLimit) {
48
53
  return {
49
- limit: Math.max(ids.length, capLimit),
54
+ limit: byIdsLimit(ids, capLimit),
50
55
  ids,
51
56
  filters: [{ field: "id", op: "in", value: ids }],
52
57
  };
@@ -63,7 +68,7 @@ export function withUnlistedSelectedRows(listedRows, selectedRows) {
63
68
  export function storedReferenceRowsPayload(field, ids, capLimit) {
64
69
  return field.refOptionsQuery === undefined
65
70
  ? referenceRowsByIdsPayload(ids, capLimit)
66
- : { limit: Math.max(ids.length, capLimit), ids };
71
+ : { limit: byIdsLimit(ids, capLimit), ids };
67
72
  }
68
73
  // A page with a continuation cursor is only a prefix of the referenced rows,
69
74
  // so a missing id in it proves nothing about the row's existence.
@@ -8,6 +8,10 @@ type RememberedListParamsArgs = {
8
8
  };
9
9
  /** URL stays the source of truth: the stored list params are copied into the
10
10
  * URL once when the screen opens without any, and every later URL change is
11
- * written back. A link that already carries list params is never overridden. */
12
- export declare function useRememberedListParams({ screenId, enabled, store, known, }: RememberedListParamsArgs): void;
11
+ * written back. A link that already carries list params is never overridden.
12
+ * Returns `restoring` while that copy is outstanding, so the list holds its
13
+ * queries instead of fetching once with the defaults. */
14
+ export declare function useRememberedListParams({ screenId, enabled, store, known, }: RememberedListParamsArgs): {
15
+ readonly restoring: boolean;
16
+ };
13
17
  export {};
@@ -9,17 +9,31 @@ function stripScreenPrefix(params, screenId) {
9
9
  return value === undefined ? [] : [[key.slice(prefix.length), value]];
10
10
  }));
11
11
  }
12
+ function storedParamsOf(store, screenId, known) {
13
+ const stored = sanitizeStoredListState(store.read(screenId), known)?.params;
14
+ return stored !== undefined && Object.keys(stored).length > 0 ? stored : undefined;
15
+ }
16
+ function hasRestorableParams(store, screenId, known) {
17
+ return storedParamsOf(store, screenId, known) !== undefined;
18
+ }
12
19
  function sameParams(a, b) {
13
20
  const keys = Object.keys(a);
14
21
  return keys.length === Object.keys(b).length && keys.every((key) => a[key] === b[key]);
15
22
  }
16
23
  /** URL stays the source of truth: the stored list params are copied into the
17
24
  * URL once when the screen opens without any, and every later URL change is
18
- * written back. A link that already carries list params is never overridden. */
25
+ * written back. A link that already carries list params is never overridden.
26
+ * Returns `restoring` while that copy is outstanding, so the list holds its
27
+ * queries instead of fetching once with the defaults. */
19
28
  export function useRememberedListParams({ screenId, enabled, store, known, }) {
20
29
  const nav = useNav();
21
30
  const current = useMemo(() => stripScreenPrefix(nav.searchParams, screenId), [nav.searchParams, screenId]);
22
31
  const phaseRef = useRef({ screenId, phase: "pending" });
32
+ const phaseNow = phaseRef.current.screenId === screenId ? phaseRef.current.phase : "pending";
33
+ const restoring = enabled &&
34
+ phaseNow !== "live" &&
35
+ Object.keys(current).length === 0 &&
36
+ hasRestorableParams(store, screenId, known);
23
37
  useEffect(() => {
24
38
  // skip: remembering is not enabled
25
39
  if (!enabled)
@@ -29,8 +43,8 @@ export function useRememberedListParams({ screenId, enabled, store, known, }) {
29
43
  const state = phaseRef.current;
30
44
  const currentIsEmpty = Object.keys(current).length === 0;
31
45
  if (state.phase === "pending" && currentIsEmpty) {
32
- const stored = sanitizeStoredListState(store.read(screenId), known)?.params;
33
- if (stored !== undefined && Object.keys(stored).length > 0) {
46
+ const stored = storedParamsOf(store, screenId, known);
47
+ if (stored !== undefined) {
34
48
  state.phase = "restoring";
35
49
  nav.setSearchParams(Object.fromEntries(Object.entries(stored).map(([k, v]) => [`${screenId}.${k}`, v])));
36
50
  // skip: restore started, effect reruns with the restored URL
@@ -50,4 +64,5 @@ export function useRememberedListParams({ screenId, enabled, store, known, }) {
50
64
  return;
51
65
  store.write(screenId, { ...existing, params: current });
52
66
  }, [enabled, screenId, current, known, store, nav]);
67
+ return { restoring };
53
68
  }
@@ -12,7 +12,6 @@ import { useRef, useSyncExternalStore } from "react";
12
12
  // render — useSyncExternalStore would interpret this as a change and enter
13
13
  // a re-render loop. The `equals` argument handles this case: when the
14
14
  // selection is equal, the cached identity is returned and no re-render occurs.
15
- // @wrapper-known semantic-alias
16
15
  export function useStore(store) {
17
16
  return useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);
18
17
  }
@@ -29,6 +29,10 @@ export const kumikoDefaultTranslations = {
29
29
  "kumiko.wizard.up-next": "Up next",
30
30
  "kumiko.wizard.step-with-title": "Step {current} of {total} · {title}",
31
31
  "kumiko.version.update-available": "A new version is available.",
32
+ "kumiko.pwa.dismiss": "Not now",
33
+ "kumiko.pwa.install": "Install",
34
+ "kumiko.pwa.install-hint": "Install this app on your device to open it like any other app.",
35
+ "kumiko.pwa.install-hint-ios": "To install this app, tap Share and then “Add to Home Screen”.",
32
36
  "kumiko.toast.learn-more": "Learn more",
33
37
  "kumiko.field.open-calendar": "Open calendar",
34
38
  "kumiko.field.dateField.placeholderYear": "Y",
@@ -42,6 +46,7 @@ export const kumikoDefaultTranslations = {
42
46
  "kumiko.field.file-list.download": "Download",
43
47
  "kumiko.field.file-list.hidePreview": "Hide preview",
44
48
  "kumiko.field.file-list.preview": "Preview",
49
+ "kumiko.field.file-list.view": "View",
45
50
  "kumiko.field.fillAction.failed": "Could not fetch a suggestion.",
46
51
  "kumiko.field.writeOnly.remove": "Remove stored value",
47
52
  "kumiko.field.writeOnly.set": "Set",
@@ -78,10 +83,22 @@ export const kumikoDefaultTranslations = {
78
83
  "kumiko.field.multiSelect.select-all": "Select all",
79
84
  "kumiko.field.multiSelect.deselect-all": "Deselect all",
80
85
  "kumiko.list.search-placeholder": "Search…",
86
+ "kumiko.list.hint.empty": "Nothing open",
87
+ "kumiko.list.hint.reason": "Why?",
88
+ "kumiko.detail.steps.title": "Next steps",
89
+ "kumiko.detail.steps.empty": "Nothing to do",
90
+ "kumiko.detail.progress.step-of": "Step {current} of {total}",
91
+ "kumiko.detail.steps.less": "Show fewer steps",
92
+ "kumiko.detail.steps.more.one": "1 more step",
93
+ "kumiko.detail.steps.more.other": "{count} more steps",
94
+ "kumiko.detail.steps.reason": "Why?",
95
+ "kumiko.detail.breadcrumb": "Path",
81
96
  "kumiko.list.empty.title": "No entries yet.",
82
97
  "kumiko.list.empty.filtered": "No entries match the current search or filters.",
83
98
  "kumiko.list.empty.defaultFiltered": "No entries match the default filter. Show all to include entries outside it.",
84
99
  "kumiko.list.empty.showAll": "Show all",
100
+ "kumiko.list.empty.resetFilter": "Reset filter",
101
+ "kumiko.list.named-filter.all": "All",
85
102
  "kumiko.list.empty.hint": "Create the first one to get started.",
86
103
  "kumiko.list.no-entries": "No entries.",
87
104
  "kumiko.record.not-found.title": "This record was not found.",
@@ -90,6 +107,7 @@ export const kumikoDefaultTranslations = {
90
107
  "kumiko.list.end-of-list": "— End of list —",
91
108
  "kumiko.list.sort.label": "Sort",
92
109
  "kumiko.list.sort.unsorted": "Unsorted",
110
+ "kumiko.list.filter.all": "All",
93
111
  "kumiko.list.filter.reset": "Reset",
94
112
  "kumiko.list.filter.toggle": "Filters",
95
113
  "kumiko.list.reset-all": "Reset",
@@ -102,6 +120,7 @@ export const kumikoDefaultTranslations = {
102
120
  "kumiko.list.view.density": "Density",
103
121
  "kumiko.list.view.density.comfortable": "Comfortable",
104
122
  "kumiko.list.view.density.compact": "Compact",
123
+ "kumiko.list.view.density.relaxed": "Relaxed",
105
124
  "kumiko.list.view.reset": "Reset view",
106
125
  "kumiko.list.group.by": "Group by",
107
126
  "kumiko.list.group.none": "None",
@@ -135,9 +154,8 @@ export const kumikoDefaultTranslations = {
135
154
  "kumiko.reference.system-user": "System",
136
155
  "kumiko.reference.unknown-user": "Unknown",
137
156
  "kumiko.pager.status": "{from}–{to} of {total}",
138
- "kumiko.pager.pageOf": "Page {page} of {pages}",
157
+ "kumiko.pager.goToPage": "Page {page}",
139
158
  "kumiko.form.all-required": "All fields are required.",
140
- "kumiko.pager.status.noun": "{from}–{to} of {total} {noun}",
141
159
  "kumiko.pager.pageSize": "{size} per page",
142
160
  "kumiko.pager.pageSizeLabel": "Entries per page",
143
161
  "kumiko.list.count.noun": "{count} {noun}",
@@ -172,6 +190,8 @@ export const kumikoDefaultTranslations = {
172
190
  "kumiko.list.bulk.result.not-started": "Not run: {count}",
173
191
  "kumiko.list.bulk.result.dismiss": "Dismiss",
174
192
  "kumiko.list.sort.by": "Sorted by {column}",
193
+ "kumiko.list.sort.prefix": "Sorted by",
194
+ "kumiko.list.sort.summary": "Sorted by {sort} {direction} · {count} {noun}",
175
195
  "kumiko.form.changed": "changed",
176
196
  "kumiko.form.on-this-page": "On this page",
177
197
  "kumiko.form.noUnsavedChanges": "No unsaved changes",
@@ -192,6 +212,10 @@ export const kumikoDefaultTranslations = {
192
212
  "kumiko.dashboard.chart.forecast": "Forecast",
193
213
  "kumiko.dashboard.chart.markers": "Events",
194
214
  "kumiko.dashboard.filter.all": "All",
215
+ "kumiko.dashboard.list.line-more": "{count} more",
216
+ "kumiko.dashboard.list.more": "{count} more",
217
+ "kumiko.dashboard.list.open-row": "Open",
218
+ "kumiko.dashboard.list.shown-of-total": "{shown} of {total}",
195
219
  "kumiko.dashboard.panel.error.isolated": "The other panels are not affected.",
196
220
  "kumiko.dashboard.panel.error.retry": "Try again",
197
221
  "kumiko.dashboard.panel.error.title": "{label} could not be loaded",
@@ -204,7 +228,6 @@ export const kumikoDefaultTranslations = {
204
228
  "kumiko.dashboard.brush-end": "Window end",
205
229
  "kumiko.dashboard.brush-start": "Window start",
206
230
  "kumiko.dashboard.today": "Today",
207
- "kumiko.dashboard.updated-at": "As of {time}",
208
231
  "kumiko.app-boot.loading": "Loading…",
209
232
  "kumiko.app-boot.unauthorized": "You need to sign in to see this.",
210
233
  "kumiko.app-boot.failed": "Couldn't load the app. Check your connection and try again.",
@@ -231,6 +254,7 @@ export const kumikoDefaultTranslations = {
231
254
  "kumiko.widget.upload.remove": "Remove file",
232
255
  "kumiko.field.dropzone.title": "Drop files here or click to choose",
233
256
  "kumiko.field.dropzone.limit-size": "up to {size} per file",
257
+ "kumiko.field.dropzone.file-unavailable": "File no longer available",
234
258
  "kumiko.field.dropzone.limit-count": "up to {count} files",
235
259
  "kumiko.widget.pdf-preview.loading": "Loading PDF…",
236
260
  "kumiko.widget.pdf-preview.pageOf": "Page {page} of {pages}",
@@ -259,6 +283,8 @@ export const kumikoDefaultTranslations = {
259
283
  "kumiko.widget.message-thread.showImages": "Load images",
260
284
  "kumiko.widget.message-reader.mail": "Mail",
261
285
  "kumiko.widget.step-list.progress": "{done} of {total} done",
286
+ "kumiko.widget.step-list.total.one": "1 step",
287
+ "kumiko.widget.step-list.total.other": "{count} steps",
262
288
  "kumiko.widget.step-list.progressLabel": "Progress",
263
289
  "kumiko.widget.step-list.moreSteps": "and {count} more steps",
264
290
  "kumiko.widget.step-list.waitingFor": "Waiting for: {reason}",
@@ -347,6 +373,16 @@ export const kumikoDefaultTranslations = {
347
373
  "kumiko.contentEditor.heading2": "Heading 2",
348
374
  "kumiko.contentEditor.bulletList": "Bullet list",
349
375
  "kumiko.contentEditor.orderedList": "Numbered list",
376
+ "kumiko.editor.unsavedChanges": "Unsaved changes",
377
+ "kumiko.editor.savedAt": "Last saved {when}",
378
+ "kumiko.editor.publish": "Publish",
379
+ "kumiko.editor.noChanges": "No unsaved changes",
380
+ "kumiko.editor.modeSwitch": "Mode",
381
+ "kumiko.editor.localeSwitch": "Language",
382
+ "kumiko.editor.discard": "Discard changes",
383
+ "kumiko.editor.deviceSwitch": "Preview width",
384
+ "kumiko.editor.device.mobile": "Mobile 375 px",
385
+ "kumiko.editor.device.desktop": "Desktop",
350
386
  "kumiko.config.source.user": "Your value",
351
387
  "kumiko.config.source.tenant": "Tenant",
352
388
  "kumiko.config.source.system": "Platform",