@mgamadeus/ddd-admin-ui 0.1.0 → 0.2.1

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 (553) hide show
  1. package/.claude/skills/ddd-admin-ui-specialist/SKILL.md +56 -2
  2. package/CHANGELOG.md +217 -0
  3. package/README.md +262 -23
  4. package/STANDARDS.md +171 -2
  5. package/dist/components.css +27 -3
  6. package/dist/data/DeltaText.d.ts +29 -0
  7. package/dist/data/DeltaText.d.ts.map +1 -0
  8. package/dist/data/DeltaText.js +36 -0
  9. package/dist/data/DeltaText.js.map +1 -0
  10. package/dist/data/MetricGrid.d.ts +15 -0
  11. package/dist/data/MetricGrid.d.ts.map +1 -0
  12. package/dist/data/MetricGrid.js +17 -0
  13. package/dist/data/MetricGrid.js.map +1 -0
  14. package/dist/data/MetricTile.d.ts +32 -0
  15. package/dist/data/MetricTile.d.ts.map +1 -0
  16. package/dist/data/MetricTile.js +13 -0
  17. package/dist/data/MetricTile.js.map +1 -0
  18. package/dist/data/NoteList.d.ts +19 -0
  19. package/dist/data/NoteList.d.ts.map +1 -0
  20. package/dist/data/NoteList.js +23 -0
  21. package/dist/data/NoteList.js.map +1 -0
  22. package/dist/data/delta.d.ts +40 -0
  23. package/dist/data/delta.d.ts.map +1 -0
  24. package/dist/data/delta.js +40 -0
  25. package/dist/data/delta.js.map +1 -0
  26. package/dist/data/index.d.ts +6 -0
  27. package/dist/data/index.d.ts.map +1 -0
  28. package/dist/data/index.js +7 -0
  29. package/dist/data/index.js.map +1 -0
  30. package/dist/design-studio/contract.d.ts +162 -0
  31. package/dist/design-studio/contract.d.ts.map +1 -0
  32. package/dist/design-studio/contract.js +2 -0
  33. package/dist/design-studio/contract.js.map +1 -0
  34. package/dist/design-studio/index.d.ts +45 -0
  35. package/dist/design-studio/index.d.ts.map +1 -0
  36. package/dist/design-studio/index.js +47 -0
  37. package/dist/design-studio/index.js.map +1 -0
  38. package/dist/form/ColorValueField.d.ts +37 -0
  39. package/dist/form/ColorValueField.d.ts.map +1 -0
  40. package/dist/form/ColorValueField.js +74 -0
  41. package/dist/form/ColorValueField.js.map +1 -0
  42. package/dist/form/FormDrawer.d.ts +11 -1
  43. package/dist/form/FormDrawer.d.ts.map +1 -1
  44. package/dist/form/FormDrawer.js +7 -2
  45. package/dist/form/FormDrawer.js.map +1 -1
  46. package/dist/form/index.d.ts +2 -0
  47. package/dist/form/index.d.ts.map +1 -1
  48. package/dist/form/index.js +2 -0
  49. package/dist/form/index.js.map +1 -1
  50. package/dist/glass/QuickFilterPills.d.ts +7 -0
  51. package/dist/glass/QuickFilterPills.d.ts.map +1 -1
  52. package/dist/glass/QuickFilterPills.js +4 -3
  53. package/dist/glass/QuickFilterPills.js.map +1 -1
  54. package/dist/i18n/format.d.ts +3 -2
  55. package/dist/i18n/format.d.ts.map +1 -1
  56. package/dist/i18n/format.js +3 -2
  57. package/dist/i18n/format.js.map +1 -1
  58. package/dist/i18n/formatLocale.d.ts +8 -0
  59. package/dist/i18n/formatLocale.d.ts.map +1 -0
  60. package/dist/i18n/formatLocale.js +10 -0
  61. package/dist/i18n/formatLocale.js.map +1 -0
  62. package/dist/i18n/hints.json +498 -1
  63. package/dist/i18n/index.d.ts +1 -0
  64. package/dist/i18n/index.d.ts.map +1 -1
  65. package/dist/i18n/index.js +1 -0
  66. package/dist/i18n/index.js.map +1 -1
  67. package/dist/i18n-keys.json +4444 -351
  68. package/dist/list/ActionsHeaderText.d.ts +5 -0
  69. package/dist/list/ActionsHeaderText.d.ts.map +1 -0
  70. package/dist/list/ActionsHeaderText.js +9 -0
  71. package/dist/list/ActionsHeaderText.js.map +1 -0
  72. package/dist/list/Combobox.d.ts +11 -1
  73. package/dist/list/Combobox.d.ts.map +1 -1
  74. package/dist/list/Combobox.js +10 -7
  75. package/dist/list/Combobox.js.map +1 -1
  76. package/dist/list/EntityListBody.d.ts +9 -1
  77. package/dist/list/EntityListBody.d.ts.map +1 -1
  78. package/dist/list/EntityListBody.js +5 -3
  79. package/dist/list/EntityListBody.js.map +1 -1
  80. package/dist/list/EntityListBulkBar.d.ts +45 -3
  81. package/dist/list/EntityListBulkBar.d.ts.map +1 -1
  82. package/dist/list/EntityListBulkBar.js +31 -5
  83. package/dist/list/EntityListBulkBar.js.map +1 -1
  84. package/dist/list/EntityListEmpty.d.ts +9 -3
  85. package/dist/list/EntityListEmpty.d.ts.map +1 -1
  86. package/dist/list/EntityListEmpty.js +3 -3
  87. package/dist/list/EntityListEmpty.js.map +1 -1
  88. package/dist/list/EntityListTable.d.ts +3 -2
  89. package/dist/list/EntityListTable.d.ts.map +1 -1
  90. package/dist/list/EntityListTable.js +12 -8
  91. package/dist/list/EntityListTable.js.map +1 -1
  92. package/dist/list/EntityListToolbar.d.ts +30 -0
  93. package/dist/list/EntityListToolbar.d.ts.map +1 -1
  94. package/dist/list/EntityListToolbar.js +18 -4
  95. package/dist/list/EntityListToolbar.js.map +1 -1
  96. package/dist/list/EntityListViewToggle.d.ts +4 -1
  97. package/dist/list/EntityListViewToggle.d.ts.map +1 -1
  98. package/dist/list/EntityListViewToggle.js +15 -4
  99. package/dist/list/EntityListViewToggle.js.map +1 -1
  100. package/dist/list/cells.d.ts +10 -2
  101. package/dist/list/cells.d.ts.map +1 -1
  102. package/dist/list/cells.js +15 -6
  103. package/dist/list/cells.js.map +1 -1
  104. package/dist/list/columns.d.ts +85 -0
  105. package/dist/list/columns.d.ts.map +1 -0
  106. package/dist/list/columns.js +88 -0
  107. package/dist/list/columns.js.map +1 -0
  108. package/dist/list/filters.d.ts +19 -1
  109. package/dist/list/filters.d.ts.map +1 -1
  110. package/dist/list/filters.js +47 -3
  111. package/dist/list/filters.js.map +1 -1
  112. package/dist/list/index.d.ts +6 -0
  113. package/dist/list/index.d.ts.map +1 -1
  114. package/dist/list/index.js +3 -0
  115. package/dist/list/index.js.map +1 -1
  116. package/dist/logic/browser/normalizeImage.d.ts +69 -0
  117. package/dist/logic/browser/normalizeImage.d.ts.map +1 -0
  118. package/dist/logic/browser/normalizeImage.js +147 -0
  119. package/dist/logic/browser/normalizeImage.js.map +1 -0
  120. package/dist/logic/index.d.ts +25 -2
  121. package/dist/logic/index.d.ts.map +1 -1
  122. package/dist/logic/index.js +15 -1
  123. package/dist/logic/index.js.map +1 -1
  124. package/dist/logic/pure/colorValue.d.ts +22 -0
  125. package/dist/logic/pure/colorValue.d.ts.map +1 -0
  126. package/dist/logic/pure/colorValue.js +34 -0
  127. package/dist/logic/pure/colorValue.js.map +1 -0
  128. package/dist/logic/pure/dateRangePresets.d.ts +33 -0
  129. package/dist/logic/pure/dateRangePresets.d.ts.map +1 -0
  130. package/dist/logic/pure/dateRangePresets.js +41 -0
  131. package/dist/logic/pure/dateRangePresets.js.map +1 -0
  132. package/dist/logic/pure/format.d.ts +3 -3
  133. package/dist/logic/pure/format.d.ts.map +1 -1
  134. package/dist/logic/pure/format.js +13 -12
  135. package/dist/logic/pure/format.js.map +1 -1
  136. package/dist/logic/pure/imageCrop.d.ts +99 -0
  137. package/dist/logic/pure/imageCrop.d.ts.map +1 -0
  138. package/dist/logic/pure/imageCrop.js +198 -0
  139. package/dist/logic/pure/imageCrop.js.map +1 -0
  140. package/dist/logic/pure/injectedApi.d.ts +83 -0
  141. package/dist/logic/pure/injectedApi.d.ts.map +1 -0
  142. package/dist/logic/pure/injectedApi.js +87 -0
  143. package/dist/logic/pure/injectedApi.js.map +1 -0
  144. package/dist/logic/pure/listTracks.d.ts +14 -2
  145. package/dist/logic/pure/listTracks.d.ts.map +1 -1
  146. package/dist/logic/pure/listTracks.js +15 -4
  147. package/dist/logic/pure/listTracks.js.map +1 -1
  148. package/dist/logic/pure/locales.d.ts +22 -0
  149. package/dist/logic/pure/locales.d.ts.map +1 -1
  150. package/dist/logic/pure/locales.js +43 -0
  151. package/dist/logic/pure/locales.js.map +1 -1
  152. package/dist/logic/pure/navigation.d.ts +159 -0
  153. package/dist/logic/pure/navigation.d.ts.map +1 -0
  154. package/dist/logic/pure/navigation.js +158 -0
  155. package/dist/logic/pure/navigation.js.map +1 -0
  156. package/dist/logic/pure/runSequential.d.ts +42 -0
  157. package/dist/logic/pure/runSequential.d.ts.map +1 -1
  158. package/dist/logic/pure/runSequential.js +65 -13
  159. package/dist/logic/pure/runSequential.js.map +1 -1
  160. package/dist/logic/pure/textLimits.d.ts +18 -0
  161. package/dist/logic/pure/textLimits.d.ts.map +1 -0
  162. package/dist/logic/pure/textLimits.js +14 -0
  163. package/dist/logic/pure/textLimits.js.map +1 -0
  164. package/dist/logic/react/textLimits.d.ts +8 -0
  165. package/dist/logic/react/textLimits.d.ts.map +1 -0
  166. package/dist/logic/react/textLimits.js +9 -0
  167. package/dist/logic/react/textLimits.js.map +1 -0
  168. package/dist/logic/react/useEntityTranslations.d.ts +16 -1
  169. package/dist/logic/react/useEntityTranslations.d.ts.map +1 -1
  170. package/dist/logic/react/useEntityTranslations.js +18 -4
  171. package/dist/logic/react/useEntityTranslations.js.map +1 -1
  172. package/dist/logic/react/useMediaQuery.d.ts +14 -0
  173. package/dist/logic/react/useMediaQuery.d.ts.map +1 -0
  174. package/dist/logic/react/useMediaQuery.js +24 -0
  175. package/dist/logic/react/useMediaQuery.js.map +1 -0
  176. package/dist/logic/react/useMemoryUrlState.d.ts +13 -0
  177. package/dist/logic/react/useMemoryUrlState.d.ts.map +1 -0
  178. package/dist/logic/react/useMemoryUrlState.js +41 -0
  179. package/dist/logic/react/useMemoryUrlState.js.map +1 -0
  180. package/dist/logic/react/useOptimisticRowPatches.d.ts +16 -0
  181. package/dist/logic/react/useOptimisticRowPatches.d.ts.map +1 -0
  182. package/dist/logic/react/useOptimisticRowPatches.js +39 -0
  183. package/dist/logic/react/useOptimisticRowPatches.js.map +1 -0
  184. package/dist/markdown/MarkdownEditor.d.ts +36 -0
  185. package/dist/markdown/MarkdownEditor.d.ts.map +1 -0
  186. package/dist/markdown/MarkdownEditor.js +36 -0
  187. package/dist/markdown/MarkdownEditor.js.map +1 -0
  188. package/dist/markdown/MarkdownPreview.d.ts +15 -0
  189. package/dist/markdown/MarkdownPreview.d.ts.map +1 -0
  190. package/dist/markdown/MarkdownPreview.js +17 -0
  191. package/dist/markdown/MarkdownPreview.js.map +1 -0
  192. package/dist/markdown/index.d.ts +7 -0
  193. package/dist/markdown/index.d.ts.map +1 -0
  194. package/dist/markdown/index.js +9 -0
  195. package/dist/markdown/index.js.map +1 -0
  196. package/dist/markdown/loadMarkdownLibrary.d.ts +28 -0
  197. package/dist/markdown/loadMarkdownLibrary.d.ts.map +1 -0
  198. package/dist/markdown/loadMarkdownLibrary.js +40 -0
  199. package/dist/markdown/loadMarkdownLibrary.js.map +1 -0
  200. package/dist/markdown/markdownPipeline.d.ts +20 -0
  201. package/dist/markdown/markdownPipeline.d.ts.map +1 -0
  202. package/dist/markdown/markdownPipeline.js +50 -0
  203. package/dist/markdown/markdownPipeline.js.map +1 -0
  204. package/dist/markdown/renderMarkdownEditor.d.ts +18 -0
  205. package/dist/markdown/renderMarkdownEditor.d.ts.map +1 -0
  206. package/dist/markdown/renderMarkdownEditor.js +14 -0
  207. package/dist/markdown/renderMarkdownEditor.js.map +1 -0
  208. package/dist/markdown/useMarkdownLibrary.d.ts +24 -0
  209. package/dist/markdown/useMarkdownLibrary.d.ts.map +1 -0
  210. package/dist/markdown/useMarkdownLibrary.js +47 -0
  211. package/dist/markdown/useMarkdownLibrary.js.map +1 -0
  212. package/dist/media/ImageCropDialog.d.ts +48 -0
  213. package/dist/media/ImageCropDialog.d.ts.map +1 -0
  214. package/dist/media/ImageCropDialog.js +203 -0
  215. package/dist/media/ImageCropDialog.js.map +1 -0
  216. package/dist/media/MediaItemField.d.ts.map +1 -1
  217. package/dist/media/MediaItemField.js +3 -1
  218. package/dist/media/MediaItemField.js.map +1 -1
  219. package/dist/media/index.d.ts +2 -0
  220. package/dist/media/index.d.ts.map +1 -1
  221. package/dist/media/index.js +2 -0
  222. package/dist/media/index.js.map +1 -1
  223. package/dist/next/index.d.ts +1 -0
  224. package/dist/next/index.d.ts.map +1 -1
  225. package/dist/next/index.js +1 -0
  226. package/dist/next/index.js.map +1 -1
  227. package/dist/next/useNextPathname.d.ts +7 -0
  228. package/dist/next/useNextPathname.d.ts.map +1 -0
  229. package/dist/next/useNextPathname.js +9 -0
  230. package/dist/next/useNextPathname.js.map +1 -0
  231. package/dist/page/DetailHeader.d.ts.map +1 -1
  232. package/dist/page/DetailHeader.js +3 -1
  233. package/dist/page/DetailHeader.js.map +1 -1
  234. package/dist/page/MaintenanceActionCard.d.ts +29 -0
  235. package/dist/page/MaintenanceActionCard.d.ts.map +1 -0
  236. package/dist/page/MaintenanceActionCard.js +21 -0
  237. package/dist/page/MaintenanceActionCard.js.map +1 -0
  238. package/dist/page/PageHeader.d.ts.map +1 -1
  239. package/dist/page/PageHeader.js +3 -1
  240. package/dist/page/PageHeader.js.map +1 -1
  241. package/dist/page/RouteError.d.ts +26 -0
  242. package/dist/page/RouteError.d.ts.map +1 -0
  243. package/dist/page/RouteError.js +35 -0
  244. package/dist/page/RouteError.js.map +1 -0
  245. package/dist/page/RouteLoading.d.ts +16 -0
  246. package/dist/page/RouteLoading.d.ts.map +1 -0
  247. package/dist/page/RouteLoading.js +17 -0
  248. package/dist/page/RouteLoading.js.map +1 -0
  249. package/dist/page/SectionHeader.d.ts.map +1 -1
  250. package/dist/page/SectionHeader.js +3 -1
  251. package/dist/page/SectionHeader.js.map +1 -1
  252. package/dist/page/index.d.ts +6 -0
  253. package/dist/page/index.d.ts.map +1 -1
  254. package/dist/page/index.js +5 -0
  255. package/dist/page/index.js.map +1 -1
  256. package/dist/primitives/alert.d.ts +1 -1
  257. package/dist/primitives/badge.d.ts +1 -1
  258. package/dist/primitives/index.d.ts +1 -0
  259. package/dist/primitives/index.d.ts.map +1 -1
  260. package/dist/primitives/index.js +1 -0
  261. package/dist/primitives/index.js.map +1 -1
  262. package/dist/primitives/pathname.d.ts +22 -0
  263. package/dist/primitives/pathname.d.ts.map +1 -0
  264. package/dist/primitives/pathname.js +23 -0
  265. package/dist/primitives/pathname.js.map +1 -0
  266. package/dist/primitives/segmented-control.d.ts +37 -3
  267. package/dist/primitives/segmented-control.d.ts.map +1 -1
  268. package/dist/primitives/segmented-control.js +45 -10
  269. package/dist/primitives/segmented-control.js.map +1 -1
  270. package/dist/provider/AdminUiProvider.d.ts +2 -2
  271. package/dist/provider/AdminUiProvider.d.ts.map +1 -1
  272. package/dist/provider/AdminUiProvider.js +14 -3
  273. package/dist/provider/AdminUiProvider.js.map +1 -1
  274. package/dist/provider/index.d.ts +1 -1
  275. package/dist/provider/index.d.ts.map +1 -1
  276. package/dist/provider/types.d.ts +19 -0
  277. package/dist/provider/types.d.ts.map +1 -1
  278. package/dist/scripts/check-contrast.mjs +353 -0
  279. package/dist/shell/AccountMenu.d.ts +51 -0
  280. package/dist/shell/AccountMenu.d.ts.map +1 -0
  281. package/dist/shell/AccountMenu.js +34 -0
  282. package/dist/shell/AccountMenu.js.map +1 -0
  283. package/dist/shell/AppShell.d.ts +68 -0
  284. package/dist/shell/AppShell.d.ts.map +1 -0
  285. package/dist/shell/AppShell.js +56 -0
  286. package/dist/shell/AppShell.js.map +1 -0
  287. package/dist/shell/LanguageMenu.d.ts +36 -0
  288. package/dist/shell/LanguageMenu.d.ts.map +1 -0
  289. package/dist/shell/LanguageMenu.js +33 -0
  290. package/dist/shell/LanguageMenu.js.map +1 -0
  291. package/dist/shell/NavItemMarks.d.ts +21 -0
  292. package/dist/shell/NavItemMarks.d.ts.map +1 -0
  293. package/dist/shell/NavItemMarks.js +30 -0
  294. package/dist/shell/NavItemMarks.js.map +1 -0
  295. package/dist/shell/ShellBreadcrumbs.d.ts +26 -0
  296. package/dist/shell/ShellBreadcrumbs.d.ts.map +1 -0
  297. package/dist/shell/ShellBreadcrumbs.js +78 -0
  298. package/dist/shell/ShellBreadcrumbs.js.map +1 -0
  299. package/dist/shell/ShellDocumentTitle.d.ts +27 -0
  300. package/dist/shell/ShellDocumentTitle.d.ts.map +1 -0
  301. package/dist/shell/ShellDocumentTitle.js +50 -0
  302. package/dist/shell/ShellDocumentTitle.js.map +1 -0
  303. package/dist/shell/ShellMobileMenu.d.ts +33 -0
  304. package/dist/shell/ShellMobileMenu.d.ts.map +1 -0
  305. package/dist/shell/ShellMobileMenu.js +33 -0
  306. package/dist/shell/ShellMobileMenu.js.map +1 -0
  307. package/dist/shell/ShellNavLink.d.ts +18 -0
  308. package/dist/shell/ShellNavLink.d.ts.map +1 -0
  309. package/dist/shell/ShellNavLink.js +16 -0
  310. package/dist/shell/ShellNavLink.js.map +1 -0
  311. package/dist/shell/ShellNavList.d.ts +18 -0
  312. package/dist/shell/ShellNavList.d.ts.map +1 -0
  313. package/dist/shell/ShellNavList.js +45 -0
  314. package/dist/shell/ShellNavList.js.map +1 -0
  315. package/dist/shell/ShellNavRail.d.ts +11 -0
  316. package/dist/shell/ShellNavRail.d.ts.map +1 -0
  317. package/dist/shell/ShellNavRail.js +97 -0
  318. package/dist/shell/ShellNavRail.js.map +1 -0
  319. package/dist/shell/ShellSidebar.d.ts +32 -0
  320. package/dist/shell/ShellSidebar.d.ts.map +1 -0
  321. package/dist/shell/ShellSidebar.js +29 -0
  322. package/dist/shell/ShellSidebar.js.map +1 -0
  323. package/dist/shell/ShellTopBar.d.ts +23 -0
  324. package/dist/shell/ShellTopBar.d.ts.map +1 -0
  325. package/dist/shell/ShellTopBar.js +25 -0
  326. package/dist/shell/ShellTopBar.js.map +1 -0
  327. package/dist/shell/index.d.ts +28 -0
  328. package/dist/shell/index.d.ts.map +1 -0
  329. package/dist/shell/index.js +19 -0
  330. package/dist/shell/index.js.map +1 -0
  331. package/dist/shell/navClasses.d.ts +12 -0
  332. package/dist/shell/navClasses.d.ts.map +1 -0
  333. package/dist/shell/navClasses.js +14 -0
  334. package/dist/shell/navClasses.js.map +1 -0
  335. package/dist/shell/shellContext.d.ts +30 -0
  336. package/dist/shell/shellContext.d.ts.map +1 -0
  337. package/dist/shell/shellContext.js +7 -0
  338. package/dist/shell/shellContext.js.map +1 -0
  339. package/dist/shell/useShellShortcut.d.ts +12 -0
  340. package/dist/shell/useShellShortcut.d.ts.map +1 -0
  341. package/dist/shell/useShellShortcut.js +42 -0
  342. package/dist/shell/useShellShortcut.js.map +1 -0
  343. package/dist/shell/useSidebarCollapsed.d.ts +10 -0
  344. package/dist/shell/useSidebarCollapsed.d.ts.map +1 -0
  345. package/dist/shell/useSidebarCollapsed.js +49 -0
  346. package/dist/shell/useSidebarCollapsed.js.map +1 -0
  347. package/dist/shell-background/ShaderBackground.d.ts +27 -0
  348. package/dist/shell-background/ShaderBackground.d.ts.map +1 -0
  349. package/dist/shell-background/ShaderBackground.js +92 -0
  350. package/dist/shell-background/ShaderBackground.js.map +1 -0
  351. package/dist/shell-background/ShaderCanvas.d.ts +16 -0
  352. package/dist/shell-background/ShaderCanvas.d.ts.map +1 -0
  353. package/dist/shell-background/ShaderCanvas.js +197 -0
  354. package/dist/shell-background/ShaderCanvas.js.map +1 -0
  355. package/dist/shell-background/index.d.ts +5 -0
  356. package/dist/shell-background/index.d.ts.map +1 -0
  357. package/dist/shell-background/index.js +5 -0
  358. package/dist/shell-background/index.js.map +1 -0
  359. package/dist/shell-background/shader.d.ts +81 -0
  360. package/dist/shell-background/shader.d.ts.map +1 -0
  361. package/dist/shell-background/shader.js +194 -0
  362. package/dist/shell-background/shader.js.map +1 -0
  363. package/dist/showcase/Showcase.d.ts +12 -2
  364. package/dist/showcase/Showcase.d.ts.map +1 -1
  365. package/dist/showcase/Showcase.js +24 -6
  366. package/dist/showcase/Showcase.js.map +1 -1
  367. package/dist/showcase/coverage.d.ts.map +1 -1
  368. package/dist/showcase/coverage.js +55 -4
  369. package/dist/showcase/coverage.js.map +1 -1
  370. package/dist/showcase/fixtures.d.ts +9 -0
  371. package/dist/showcase/fixtures.d.ts.map +1 -0
  372. package/dist/showcase/fixtures.js +268 -0
  373. package/dist/showcase/fixtures.js.map +1 -0
  374. package/dist/showcase/index.d.ts +2 -0
  375. package/dist/showcase/index.d.ts.map +1 -1
  376. package/dist/showcase/index.js +1 -0
  377. package/dist/showcase/index.js.map +1 -1
  378. package/dist/showcase/sections/DataShowcase.d.ts +3 -0
  379. package/dist/showcase/sections/DataShowcase.d.ts.map +1 -0
  380. package/dist/showcase/sections/DataShowcase.js +15 -0
  381. package/dist/showcase/sections/DataShowcase.js.map +1 -0
  382. package/dist/showcase/sections/FormAdditionsShowcase.d.ts +3 -0
  383. package/dist/showcase/sections/FormAdditionsShowcase.d.ts.map +1 -0
  384. package/dist/showcase/sections/FormAdditionsShowcase.js +15 -0
  385. package/dist/showcase/sections/FormAdditionsShowcase.js.map +1 -0
  386. package/dist/showcase/sections/FormShowcase.d.ts.map +1 -1
  387. package/dist/showcase/sections/FormShowcase.js +2 -1
  388. package/dist/showcase/sections/FormShowcase.js.map +1 -1
  389. package/dist/showcase/sections/ListAdditionsShowcase.d.ts +3 -0
  390. package/dist/showcase/sections/ListAdditionsShowcase.d.ts.map +1 -0
  391. package/dist/showcase/sections/ListAdditionsShowcase.js +61 -0
  392. package/dist/showcase/sections/ListAdditionsShowcase.js.map +1 -0
  393. package/dist/showcase/sections/ListShowcase.d.ts.map +1 -1
  394. package/dist/showcase/sections/ListShowcase.js +2 -1
  395. package/dist/showcase/sections/ListShowcase.js.map +1 -1
  396. package/dist/showcase/sections/MarkdownShowcase.d.ts +21 -0
  397. package/dist/showcase/sections/MarkdownShowcase.d.ts.map +1 -0
  398. package/dist/showcase/sections/MarkdownShowcase.js +28 -0
  399. package/dist/showcase/sections/MarkdownShowcase.js.map +1 -0
  400. package/dist/showcase/sections/MediaCropShowcase.d.ts +3 -0
  401. package/dist/showcase/sections/MediaCropShowcase.d.ts.map +1 -0
  402. package/dist/showcase/sections/MediaCropShowcase.js +56 -0
  403. package/dist/showcase/sections/MediaCropShowcase.js.map +1 -0
  404. package/dist/showcase/sections/MediaShowcase.d.ts.map +1 -1
  405. package/dist/showcase/sections/MediaShowcase.js +2 -1
  406. package/dist/showcase/sections/MediaShowcase.js.map +1 -1
  407. package/dist/showcase/sections/PageAdditionsShowcase.d.ts +3 -0
  408. package/dist/showcase/sections/PageAdditionsShowcase.d.ts.map +1 -0
  409. package/dist/showcase/sections/PageAdditionsShowcase.js +7 -0
  410. package/dist/showcase/sections/PageAdditionsShowcase.js.map +1 -0
  411. package/dist/showcase/sections/PageShowcase.d.ts.map +1 -1
  412. package/dist/showcase/sections/PageShowcase.js +4 -3
  413. package/dist/showcase/sections/PageShowcase.js.map +1 -1
  414. package/dist/showcase/sections/PrimitivesAdditionsShowcase.d.ts +3 -0
  415. package/dist/showcase/sections/PrimitivesAdditionsShowcase.d.ts.map +1 -0
  416. package/dist/showcase/sections/PrimitivesAdditionsShowcase.js +20 -0
  417. package/dist/showcase/sections/PrimitivesAdditionsShowcase.js.map +1 -0
  418. package/dist/showcase/sections/PrimitivesShowcase.d.ts.map +1 -1
  419. package/dist/showcase/sections/PrimitivesShowcase.js +3 -2
  420. package/dist/showcase/sections/PrimitivesShowcase.js.map +1 -1
  421. package/dist/showcase/sections/ShellShowcase.d.ts +3 -0
  422. package/dist/showcase/sections/ShellShowcase.d.ts.map +1 -0
  423. package/dist/showcase/sections/ShellShowcase.js +71 -0
  424. package/dist/showcase/sections/ShellShowcase.js.map +1 -0
  425. package/dist/showcase/sections/TranslationsShowcase.d.ts +2 -0
  426. package/dist/showcase/sections/TranslationsShowcase.d.ts.map +1 -1
  427. package/dist/showcase/sections/TranslationsShowcase.js +5 -1
  428. package/dist/showcase/sections/TranslationsShowcase.js.map +1 -1
  429. package/dist/showcase/sections/WorkersShowcase.d.ts +3 -0
  430. package/dist/showcase/sections/WorkersShowcase.d.ts.map +1 -0
  431. package/dist/showcase/sections/WorkersShowcase.js +15 -0
  432. package/dist/showcase/sections/WorkersShowcase.js.map +1 -0
  433. package/dist/tokens.json +276 -5
  434. package/dist/translations/AppTranslationKeyDrawer.d.ts +14 -0
  435. package/dist/translations/AppTranslationKeyDrawer.d.ts.map +1 -0
  436. package/dist/translations/AppTranslationKeyDrawer.js +197 -0
  437. package/dist/translations/AppTranslationKeyDrawer.js.map +1 -0
  438. package/dist/translations/AppTranslationsScreen.d.ts +25 -0
  439. package/dist/translations/AppTranslationsScreen.d.ts.map +1 -0
  440. package/dist/translations/AppTranslationsScreen.js +139 -0
  441. package/dist/translations/AppTranslationsScreen.js.map +1 -0
  442. package/dist/translations/ConfigImportCards.d.ts +26 -0
  443. package/dist/translations/ConfigImportCards.d.ts.map +1 -0
  444. package/dist/translations/ConfigImportCards.js +59 -0
  445. package/dist/translations/ConfigImportCards.js.map +1 -0
  446. package/dist/translations/LanguagesScreen.d.ts +20 -0
  447. package/dist/translations/LanguagesScreen.d.ts.map +1 -0
  448. package/dist/translations/LanguagesScreen.js +110 -0
  449. package/dist/translations/LanguagesScreen.js.map +1 -0
  450. package/dist/translations/LocalesScreen.d.ts +22 -0
  451. package/dist/translations/LocalesScreen.d.ts.map +1 -0
  452. package/dist/translations/LocalesScreen.js +92 -0
  453. package/dist/translations/LocalesScreen.js.map +1 -0
  454. package/dist/translations/TranslatableField.d.ts +13 -2
  455. package/dist/translations/TranslatableField.d.ts.map +1 -1
  456. package/dist/translations/TranslatableField.js +23 -5
  457. package/dist/translations/TranslatableField.js.map +1 -1
  458. package/dist/translations/TranslatableInput.d.ts.map +1 -1
  459. package/dist/translations/TranslatableInput.js +4 -1
  460. package/dist/translations/TranslatableInput.js.map +1 -1
  461. package/dist/translations/TranslatableMarkdown.d.ts +2 -0
  462. package/dist/translations/TranslatableMarkdown.d.ts.map +1 -1
  463. package/dist/translations/TranslatableMarkdown.js +12 -7
  464. package/dist/translations/TranslatableMarkdown.js.map +1 -1
  465. package/dist/translations/TranslationCompleteness.d.ts +11 -0
  466. package/dist/translations/TranslationCompleteness.d.ts.map +1 -0
  467. package/dist/translations/TranslationCompleteness.js +73 -0
  468. package/dist/translations/TranslationCompleteness.js.map +1 -0
  469. package/dist/translations/adminFormat.d.ts +27 -0
  470. package/dist/translations/adminFormat.d.ts.map +1 -0
  471. package/dist/translations/adminFormat.js +39 -0
  472. package/dist/translations/adminFormat.js.map +1 -0
  473. package/dist/translations/adminTypes.d.ts +136 -0
  474. package/dist/translations/adminTypes.d.ts.map +1 -0
  475. package/dist/translations/adminTypes.js +9 -0
  476. package/dist/translations/adminTypes.js.map +1 -0
  477. package/dist/translations/api.d.ts +225 -0
  478. package/dist/translations/api.d.ts.map +1 -0
  479. package/dist/translations/api.js +132 -0
  480. package/dist/translations/api.js.map +1 -0
  481. package/dist/translations/focusOverLimit.d.ts +7 -0
  482. package/dist/translations/focusOverLimit.d.ts.map +1 -0
  483. package/dist/translations/focusOverLimit.js +23 -0
  484. package/dist/translations/focusOverLimit.js.map +1 -0
  485. package/dist/translations/index.d.ts +22 -0
  486. package/dist/translations/index.d.ts.map +1 -1
  487. package/dist/translations/index.js +13 -0
  488. package/dist/translations/index.js.map +1 -1
  489. package/dist/translations/useContentLocales.d.ts +17 -0
  490. package/dist/translations/useContentLocales.d.ts.map +1 -0
  491. package/dist/translations/useContentLocales.js +33 -0
  492. package/dist/translations/useContentLocales.js.map +1 -0
  493. package/dist/translations/useEntityTranslator.d.ts +34 -0
  494. package/dist/translations/useEntityTranslator.d.ts.map +1 -0
  495. package/dist/translations/useEntityTranslator.js +49 -0
  496. package/dist/translations/useEntityTranslator.js.map +1 -0
  497. package/dist/workers/WorkerRestartButton.d.ts +19 -0
  498. package/dist/workers/WorkerRestartButton.d.ts.map +1 -0
  499. package/dist/workers/WorkerRestartButton.js +59 -0
  500. package/dist/workers/WorkerRestartButton.js.map +1 -0
  501. package/dist/workers/WorkerTransportScreen.d.ts +24 -0
  502. package/dist/workers/WorkerTransportScreen.d.ts.map +1 -0
  503. package/dist/workers/WorkerTransportScreen.js +121 -0
  504. package/dist/workers/WorkerTransportScreen.js.map +1 -0
  505. package/dist/workers/WorkersOverviewScreen.d.ts +30 -0
  506. package/dist/workers/WorkersOverviewScreen.d.ts.map +1 -0
  507. package/dist/workers/WorkersOverviewScreen.js +61 -0
  508. package/dist/workers/WorkersOverviewScreen.js.map +1 -0
  509. package/dist/workers/api.d.ts +113 -0
  510. package/dist/workers/api.d.ts.map +1 -0
  511. package/dist/workers/api.js +73 -0
  512. package/dist/workers/api.js.map +1 -0
  513. package/dist/workers/charts.d.ts +94 -0
  514. package/dist/workers/charts.d.ts.map +1 -0
  515. package/dist/workers/charts.js +238 -0
  516. package/dist/workers/charts.js.map +1 -0
  517. package/dist/workers/format.d.ts +96 -0
  518. package/dist/workers/format.d.ts.map +1 -0
  519. package/dist/workers/format.js +231 -0
  520. package/dist/workers/format.js.map +1 -0
  521. package/dist/workers/history.d.ts +20 -0
  522. package/dist/workers/history.d.ts.map +1 -0
  523. package/dist/workers/history.js +84 -0
  524. package/dist/workers/history.js.map +1 -0
  525. package/dist/workers/index.d.ts +24 -0
  526. package/dist/workers/index.d.ts.map +1 -0
  527. package/dist/workers/index.js +19 -0
  528. package/dist/workers/index.js.map +1 -0
  529. package/dist/workers/overview.d.ts +72 -0
  530. package/dist/workers/overview.d.ts.map +1 -0
  531. package/dist/workers/overview.js +323 -0
  532. package/dist/workers/overview.js.map +1 -0
  533. package/dist/workers/status.d.ts +11 -0
  534. package/dist/workers/status.d.ts.map +1 -0
  535. package/dist/workers/status.js +106 -0
  536. package/dist/workers/status.js.map +1 -0
  537. package/dist/workers/transport.d.ts +78 -0
  538. package/dist/workers/transport.d.ts.map +1 -0
  539. package/dist/workers/transport.js +407 -0
  540. package/dist/workers/transport.js.map +1 -0
  541. package/dist/workers/types.d.ts +234 -0
  542. package/dist/workers/types.d.ts.map +1 -0
  543. package/dist/workers/types.js +8 -0
  544. package/dist/workers/types.js.map +1 -0
  545. package/dist/workers/useWorkersWindow.d.ts +12 -0
  546. package/dist/workers/useWorkersWindow.d.ts.map +1 -0
  547. package/dist/workers/useWorkersWindow.js +38 -0
  548. package/dist/workers/useWorkersWindow.js.map +1 -0
  549. package/dist/workers/window.d.ts +30 -0
  550. package/dist/workers/window.d.ts.map +1 -0
  551. package/dist/workers/window.js +39 -0
  552. package/dist/workers/window.js.map +1 -0
  553. package/package.json +39 -4
@@ -0,0 +1,121 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { getErrorStatus, normalizeDddError } from '@mgamadeus/ddd-web/contract';
4
+ import { m } from "../i18n/store.js";
5
+ import { useTranslate } from "../i18n/useTranslate.js";
6
+ import { EntityListCard } from "../list/EntityListCard.js";
7
+ import { StatusBadge } from "../list/StatusBadge.js";
8
+ import { useMemoryUrlState } from "../logic/react/useMemoryUrlState.js";
9
+ import { useUrlListState } from "../logic/react/useUrlListState.js";
10
+ import { DefinitionList } from "../page/DefinitionList.js";
11
+ import { EntityDetailShell } from "../page/EntityDetailShell.js";
12
+ import { EntityTabs } from "../page/EntityTabs.js";
13
+ import { SectionHeader } from "../page/SectionHeader.js";
14
+ import { StatusCallout } from "../page/StatusCallout.js";
15
+ import { Card, CardContent } from "../primitives/card.js";
16
+ import { Skeleton } from "../primitives/skeleton.js";
17
+ import { formatClockTime, formatCount, formatDurationMs, shortClassName, waitingStateContext, waitingStateLabel } from "./format.js";
18
+ import { WorkersWindowSwitch } from "./history.js";
19
+ import { WorkerProcessRange } from "./overview.js";
20
+ import { toWorkerTransportState, WORKER_TRANSPORT_STATE } from "./status.js";
21
+ import { toWorkerProcessFilter, toWorkerRunOutcomeFilter, WorkerMessageClassesTable, WorkerMessageRunsTab, WorkerProcessesTab, WorkerProcessesTable, WorkerTransportCharts, } from "./transport.js";
22
+ import { usePageVisible, useWorkersWindow } from "./useWorkersWindow.js";
23
+ import { WorkerRestartButton } from "./WorkerRestartButton.js";
24
+ import { DEFAULT_WORKERS_WINDOW, toWorkersWindowPreset, WORKERS_LIST_POLL_MS } from "./window.js";
25
+ const TABS = [
26
+ { id: 'overview', label: m('Overview') },
27
+ { id: 'runs', label: m('Message runs') },
28
+ { id: 'processes', label: m('Processes') },
29
+ ];
30
+ const toTransportTab = (value) => (value === 'runs' || value === 'processes' ? value : 'overview');
31
+ const LIST_KEYS = ['window', 'tab', 'outcome', 'process'];
32
+ /** One line of the worker list entry: scaling, limits, message log. */
33
+ const definitionText = (overview, t) => {
34
+ if (!overview)
35
+ return null;
36
+ const definition = overview.definition;
37
+ if (!overview.isDefined || !definition)
38
+ return t('No entry in the worker list');
39
+ return [
40
+ overview.isAutoscaled
41
+ ? t('Autoscaled %min%–%max%', { replacements: { min: overview.effectiveMin ?? 0, max: overview.effectiveMax ?? '?' } })
42
+ : t('Fixed at %max%', { replacements: { max: overview.effectiveMax ?? definition.replicas ?? '?' } }),
43
+ definition.limit ? t('restarts after %count% messages', { replacements: { count: formatCount(definition.limit) } }) : null,
44
+ definition.memoryLimit ? t('memory limit %limit%', { replacements: { limit: definition.memoryLimit } }) : null,
45
+ definition.scaleDownAfter ? t('scales down after %seconds% s idle', { replacements: { seconds: definition.scaleDownAfter } }) : null,
46
+ definition.messageLog ? t('message log: %value%', { replacements: { value: definition.messageLog } }) : null,
47
+ ]
48
+ .filter((part) => Boolean(part))
49
+ .join(' · ');
50
+ };
51
+ const TransportFacts = ({ overview, recentWindowSeconds }) => {
52
+ const { t } = useTranslate();
53
+ const failed = (overview.thrownCount ?? 0) + (overview.caughtCount ?? 0);
54
+ const minutes = Math.round(recentWindowSeconds / 60);
55
+ return (_jsx(Card, { className: "gap-0 py-0", children: _jsx(CardContent, { className: "p-4 sm:p-6", children: _jsx(DefinitionList, { columns: 4, items: [
56
+ {
57
+ label: m('State'),
58
+ value: _jsx(StatusBadge, { value: toWorkerTransportState(overview.state), map: WORKER_TRANSPORT_STATE }),
59
+ hint: overview.stuckSince ? t('Stuck since %time%', { replacements: { time: formatClockTime(overview.stuckSince) ?? '' } }) : undefined,
60
+ },
61
+ {
62
+ label: t('Waiting', { context: 'live-stat' }),
63
+ value: overview.waiting === null || overview.waiting === undefined
64
+ ? t(waitingStateLabel(overview.waitingState), waitingStateContext(overview.waitingState))
65
+ : formatCount(overview.waiting),
66
+ hint: overview.waitingSampledAt ? t('Counted at %time%', { replacements: { time: formatClockTime(overview.waitingSampledAt) ?? '' } }) : undefined,
67
+ },
68
+ { label: t('In work', { context: 'live-stat' }), value: formatCount(overview.inFlight ?? 0) },
69
+ {
70
+ label: m('Processes'),
71
+ value: (_jsx(WorkerProcessRange, { live: overview.liveProcessCount ?? 0, min: overview.effectiveMin, max: overview.effectiveMax, isAutoscaled: overview.isAutoscaled ?? false })),
72
+ },
73
+ { label: t('Handled (%minutes% min)', { replacements: { minutes } }), value: formatCount(overview.handledCount ?? 0) },
74
+ {
75
+ label: t('Failed (%minutes% min)', { replacements: { minutes } }),
76
+ value: formatCount(failed),
77
+ hint: failed > 0
78
+ ? t('%thrown% thrown · %caught% caught', { replacements: { thrown: formatCount(overview.thrownCount), caught: formatCount(overview.caughtCount) } })
79
+ : undefined,
80
+ },
81
+ { label: t('Avg duration (%minutes% min)', { replacements: { minutes } }), value: formatDurationMs(overview.durationAverageMs) },
82
+ {
83
+ label: t('Avg wait (%minutes% min)', { replacements: { minutes } }),
84
+ value: formatDurationMs(overview.waitAverageMs),
85
+ hint: overview.waitAverageMs === null || overview.waitAverageMs === undefined ? t('no dispatch times') : undefined,
86
+ },
87
+ ...(overview.lastErrorClass
88
+ ? [
89
+ {
90
+ label: m('Last error'),
91
+ wide: true,
92
+ value: (_jsxs("span", { className: "text-sm", children: [_jsx("span", { className: "font-medium text-destructive", children: shortClassName(overview.lastErrorClass) }), overview.lastErrorMessage ? ` · ${overview.lastErrorMessage}` : ''] })),
93
+ hint: overview.lastErrorAt ? t('at %time%', { replacements: { time: formatClockTime(overview.lastErrorAt) ?? '' } }) : undefined,
94
+ },
95
+ ]
96
+ : []),
97
+ ] }) }) }));
98
+ };
99
+ /**
100
+ * One transport: state and worker list entry, the restart request, and three tabs — Overview (facts, charts over a
101
+ * window, message classes, live processes), Message runs and Processes. With a URL adapter every view is a link.
102
+ */
103
+ export const WorkerTransportScreen = ({ api, transport, backHref, urlStateAdapter, initialTab, pollingIntervalMs = WORKERS_LIST_POLL_MS, historyAnchorMs, }) => {
104
+ const { t } = useTranslate();
105
+ const visible = usePageVisible();
106
+ const memory = useMemoryUrlState(initialTab && initialTab !== 'overview' ? { tab: initialTab } : {});
107
+ const { values, setValue } = useUrlListState(LIST_KEYS, { adapter: urlStateAdapter ?? memory.urlStateAdapter, uncounted: LIST_KEYS });
108
+ const tab = toTransportTab(values.tab);
109
+ const windowPreset = toWorkersWindowPreset(values.window);
110
+ const workersWindow = useWorkersWindow(windowPreset, historyAnchorMs);
111
+ const detailQuery = api.useTransportDetailQuery({ transport, from: workersWindow.from, to: workersWindow.to, stepSeconds: workersWindow.stepSeconds }, { skip: !transport, pollingInterval: visible ? pollingIntervalMs : 0 });
112
+ const detail = detailQuery.currentData?.workerTransportDetail ?? detailQuery.data?.workerTransportDetail;
113
+ const overview = detail?.transport;
114
+ const shellError = detailQuery.isError && !detail
115
+ ? getErrorStatus(detailQuery.error) === 404
116
+ ? t('There is no transport “%transport%”.', { replacements: { transport } })
117
+ : normalizeDddError(detailQuery.error, t('The transport could not be loaded.')).message
118
+ : undefined;
119
+ return (_jsx("div", { "data-slot": "worker-transport-screen", children: _jsxs(EntityDetailShell, { title: transport, fallbackTitle: t('Transport'), description: definitionText(overview, t), back: { href: backHref, label: t('Back to workers') }, isLoading: !detail && !shellError, error: shellError, actions: _jsx(WorkerRestartButton, { api: api, transport: transport, liveProcessCount: overview?.liveProcessCount }), children: [_jsx(EntityTabs, { "aria-label": t('Transport sections'), tabs: TABS, activeId: tab, onSelect: id => setValue('tab', id === 'overview' ? '' : id), align: "center", className: "mb-6" }), tab === 'overview' && (_jsxs("div", { className: "space-y-10", children: [overview ? _jsx(TransportFacts, { overview: overview, recentWindowSeconds: detail?.recentWindowSeconds ?? 900 }) : _jsx(Skeleton, { className: "h-40 rounded-2xl" }), _jsxs("section", { children: [_jsx(SectionHeader, { title: t('History', { context: 'workers-section' }), description: t('The transport over the window; point at a chart to read one step.'), actions: _jsx(WorkersWindowSwitch, { value: windowPreset, onChange: preset => setValue('window', preset === DEFAULT_WORKERS_WINDOW ? '' : preset) }) }), detail ? (_jsx(WorkerTransportCharts, { detail: detail, windowMs: workersWindow.windowMs, isRefreshing: detailQuery.isFetching && !detailQuery.isLoading })) : detailQuery.isError ? (_jsx(StatusCallout, { tone: "destructive", title: t('The history could not be loaded.') })) : (_jsx("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: Array.from({ length: 4 }, (_, index) => (_jsx(Skeleton, { className: "h-[290px] rounded-2xl" }, index))) }))] }), _jsxs("section", { children: [_jsx(SectionHeader, { title: t('Message classes'), description: t('What the workers did per message class in the window.') }), _jsx(EntityListCard, { label: m('Message classes'), children: detail ? _jsx(WorkerMessageClassesTable, { messageClasses: detail.messageClasses?.elements ?? [] }) : _jsx(Skeleton, { className: "m-4 h-24 rounded-xl" }) })] }), _jsxs("section", { children: [_jsx(SectionHeader, { title: t('Live processes'), description: t('Running or busy now. A busy process is inside a handler and cannot report until it returns.') }), _jsx(EntityListCard, { label: m('Live processes'), children: _jsx(WorkerProcessesTable, { processes: detail?.processes?.elements ?? [], isLoading: !detail, emptyMessage: t('No live process right now.'), live: true }) })] })] })), tab === 'runs' && (_jsx(WorkerMessageRunsTab, { api: api, transport: transport, outcome: toWorkerRunOutcomeFilter(values.outcome), onOutcomeChange: outcome => setValue('outcome', outcome), messageLog: overview?.definition?.messageLog })), tab === 'processes' && (_jsx(WorkerProcessesTab, { api: api, transport: transport, filter: toWorkerProcessFilter(values.process), onFilterChange: filter => setValue('process', filter) }))] }) }));
120
+ };
121
+ //# sourceMappingURL=WorkerTransportScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkerTransportScreen.js","sourceRoot":"","sources":["../../src/workers/WorkerTransportScreen.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhF,OAAO,EAAE,C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MAAM,EAAE,SAAS,EAAE,QAAQ,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC,4BAA4B,CAAC,EAAE,IAAI,SAAG,GAC/H,IACT,IACN,CACP,EAEA,GAAG,KAAK,MAAM,IAAI,CACjB,KAAC,oBAAoB,IACnB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,OAAO,CAAC,EACjD,eAAe,EAAE,OAAO,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC,EACxD,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,GAC5C,CACH,EAEA,GAAG,KAAK,WAAW,IAAI,CACtB,KAAC,kBAAkB,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,qBAAqB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,GAAI,CAC7J,IACiB,GAChB,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { UrlStateAdapter } from '../logic/pure/urlListState.js';
3
+ import type { WorkersApi } from './api.js';
4
+ import { type WorkerTransportHref } from './overview.js';
5
+ export interface WorkersOverviewScreenProps {
6
+ /** The hooks of `createWorkersApi`. */
7
+ api: WorkersApi;
8
+ /** The link of a transport's page (the host's route of `WorkerTransportScreen`). */
9
+ transportHref: WorkerTransportHref;
10
+ /**
11
+ * Where the window and the transport search live (`window`, `q`): the host's URL adapter, e.g.
12
+ * `useNextUrlStateAdapter({ listId: 'workers' })`. Without one they live in component state.
13
+ */
14
+ urlStateAdapter?: UrlStateAdapter;
15
+ title?: ReactNode;
16
+ description?: ReactNode;
17
+ /** Overview refresh in ms while the tab is visible (default 10 s; 0 = off). */
18
+ pollingIntervalMs?: number;
19
+ /** Pins the end of the history window (a showcase, a test); default: the current minute, sliding. */
20
+ historyAnchorMs?: number;
21
+ }
22
+ /**
23
+ * The workers of the application, read from the worker monitoring (`WorkersControllerTrait`): totals as tiles, two
24
+ * banners (monitoring off, sampler not running), the live row per transport with its processes, the throughput table,
25
+ * the history of every transport over a window, every transport with its state and the loops of the worker list. The
26
+ * overview refreshes every 10 s and the history every minute while the tab is visible. The only action is the restart
27
+ * request; there are no scaling controls.
28
+ */
29
+ export declare const WorkersOverviewScreen: ({ api, transportHref, urlStateAdapter, title, description, pollingIntervalMs, historyAnchorMs, }: WorkersOverviewScreenProps) => import("react").JSX.Element;
30
+ //# sourceMappingURL=WorkersOverviewScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkersOverviewScreen.d.ts","sourceRoot":"","sources":["../../src/workers/WorkersOverviewScreen.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAMhD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAQrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG3C,OAAO,EAML,KAAK,mBAAmB,EAEzB,MAAM,gBAAgB,CAAC;AAOxB,MAAM,WAAW,0BAA0B;IACzC,uCAAuC;IACvC,GAAG,EAAE,UAAU,CAAC;IAChB,oFAAoF;IACpF,aAAa,EAAE,mBAAmB,CAAC;IACnC;;;OAGG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qGAAqG;IACrG,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAAI,kGAQnC,0BAA0B,gCAkJ5B,CAAC"}
@@ -0,0 +1,61 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { normalizeDddError } from '@mgamadeus/ddd-web/contract';
4
+ import { RefreshCw } from 'lucide-react';
5
+ import { useMemo } from 'react';
6
+ import { m } from "../i18n/store.js";
7
+ import { useTranslate } from "../i18n/useTranslate.js";
8
+ import { EntityListCard } from "../list/EntityListCard.js";
9
+ import { EntityListToolbar } from "../list/EntityListToolbar.js";
10
+ import { useMemoryUrlState } from "../logic/react/useMemoryUrlState.js";
11
+ import { useUrlListState } from "../logic/react/useUrlListState.js";
12
+ import { PageSections } from "../page/PageLayout.js";
13
+ import { PageHeader } from "../page/PageHeader.js";
14
+ import { SectionHeader } from "../page/SectionHeader.js";
15
+ import { StatusCallout, StatusCalloutAction } from "../page/StatusCallout.js";
16
+ import { cn } from "../primitives/cn.js";
17
+ import { formatClockTime, parseWorkersTime, sortTransports } from "./format.js";
18
+ import { WorkersHistoryCharts, WorkersWindowSwitch } from "./history.js";
19
+ import { WorkerKpiTiles, WorkerKpiTilesSkeleton, WorkerLoopsCard, WorkersLivePanel, WorkersThroughputTable, WorkerTransportsTable, } from "./overview.js";
20
+ import { usePageVisible, useWorkersWindow } from "./useWorkersWindow.js";
21
+ import { WorkerRestartButton } from "./WorkerRestartButton.js";
22
+ import { DEFAULT_WORKERS_WINDOW, toWorkersWindowPreset, WORKERS_OVERVIEW_POLL_MS } from "./window.js";
23
+ const LIST_KEYS = ['window', 'q'];
24
+ /**
25
+ * The workers of the application, read from the worker monitoring (`WorkersControllerTrait`): totals as tiles, two
26
+ * banners (monitoring off, sampler not running), the live row per transport with its processes, the throughput table,
27
+ * the history of every transport over a window, every transport with its state and the loops of the worker list. The
28
+ * overview refreshes every 10 s and the history every minute while the tab is visible. The only action is the restart
29
+ * request; there are no scaling controls.
30
+ */
31
+ export const WorkersOverviewScreen = ({ api, transportHref, urlStateAdapter, title, description, pollingIntervalMs = WORKERS_OVERVIEW_POLL_MS, historyAnchorMs, }) => {
32
+ const { t } = useTranslate();
33
+ const visible = usePageVisible();
34
+ const memory = useMemoryUrlState();
35
+ const listState = useUrlListState(LIST_KEYS, { adapter: urlStateAdapter ?? memory.urlStateAdapter, uncounted: LIST_KEYS });
36
+ const { values, debounced, setValue } = listState;
37
+ const windowPreset = toWorkersWindowPreset(values.window);
38
+ const workersWindow = useWorkersWindow(windowPreset, historyAnchorMs);
39
+ const overviewQuery = api.useOverviewQuery(undefined, {
40
+ pollingInterval: visible ? pollingIntervalMs : 0,
41
+ refetchOnMountOrArgChange: true,
42
+ });
43
+ const overview = overviewQuery.data?.workersOverview;
44
+ const monitoringEnabled = overview?.monitoringEnabled ?? true;
45
+ const allTransports = useMemo(() => overview?.transports?.elements ?? [], [overview?.transports?.elements]);
46
+ const search = debounced.q.trim().toLowerCase();
47
+ const transports = useMemo(() => {
48
+ const sorted = sortTransports(allTransports);
49
+ return search ? sorted.filter(transport => (transport.transport ?? '').toLowerCase().includes(search)) : sorted;
50
+ }, [allTransports, search]);
51
+ const updatedAt = formatClockTime(overview?.generatedAt);
52
+ const nowMs = parseWorkersTime(overview?.generatedAt) ?? 0;
53
+ const overviewError = overviewQuery.isError ? normalizeDddError(overviewQuery.error, t('The worker overview could not be loaded.')).message : undefined;
54
+ return (_jsxs("div", { "data-slot": "workers-overview-screen", children: [_jsx(PageHeader, { title: title ?? t('Workers'), description: _jsxs(_Fragment, { children: [description ?? t('Messenger workers: queues, processes and message runs.'), updatedAt && (_jsxs("span", { className: "ml-2 inline-flex items-center gap-1 whitespace-nowrap", children: [_jsx(RefreshCw, { className: cn('size-3', overviewQuery.isFetching && 'animate-spin motion-reduce:animate-none'), "aria-hidden": true }), t('Updated %time%', { replacements: { time: updatedAt } })] }))] }), actions: _jsx(WorkerRestartButton, { api: api, liveProcessCount: overview?.totals?.liveProcessCount, monitoringEnabled: monitoringEnabled }) }), _jsxs(PageSections, { children: [_jsxs("div", { className: "space-y-4", children: [overviewError && !overview && (_jsx(StatusCallout, { tone: "destructive", title: t('The worker overview could not be loaded.'), description: overviewError, actions: _jsx(StatusCalloutAction, { onClick: () => void overviewQuery.refetch(), children: t('Retry') }) })), overview && overview.monitoringEnabled === false && (_jsx(StatusCallout, { tone: "warning", title: t('The worker monitoring is off'), description: t('Only the worker list and the live queue counts are shown: no processes, history or message runs. Switch it on and restart the workers.') })), overview?.monitoringEnabled && overview.samplerActive === false && (_jsx(StatusCallout, { tone: "warning", title: t('The sampler is not running'), description: t('The queue history has holes and lost processes are closed late. app:workers:sample must run every minute.') })), overview ? _jsx(WorkerKpiTiles, { overview: overview }) : !overviewError && _jsx(WorkerKpiTilesSkeleton, {})] }), overview && (_jsxs("section", { children: [_jsx(SectionHeader, { title: t('Live', { context: 'workers-section' }), description: t('Workers running against the configured range, messages in work and waiting.') }), _jsx(WorkersLivePanel, { transports: allTransports, processes: overview.processes?.elements ?? [], nowMs: nowMs, showProcesses: monitoringEnabled, transportHref: transportHref })] })), overview?.monitoringEnabled && (_jsxs("section", { children: [_jsx(SectionHeader, { title: t('Throughput'), description: t('Messages finished per transport in the last 5 and 15 minutes, the last hour and the last 24 hours, with the rate and what one worker finished per minute.') }), _jsx(WorkersThroughputTable, { transports: allTransports, totals: overview.totals, transportHref: transportHref })] })), monitoringEnabled && (_jsxs("section", { children: [_jsx(SectionHeader, { title: t('History', { context: 'workers-section' }), description: t('Every transport over the window; point at a chart to read one step.'), actions: _jsx(WorkersWindowSwitch, { value: windowPreset, onChange: preset => setValue('window', preset === DEFAULT_WORKERS_WINDOW ? '' : preset) }) }), _jsx(WorkersHistoryCharts, { api: api, window: workersWindow })] })), _jsxs("section", { children: [_jsx(SectionHeader, { title: t('Transports'), description: t('Most urgent first. Open a transport for its history, message runs and processes.') }), _jsx(EntityListCard, { label: m('Transports'), isRefetching: overviewQuery.isFetching && !overviewQuery.isLoading, toolbar: _jsx(EntityListToolbar, { search: {
55
+ value: values.q,
56
+ onChange: value => setValue('q', value),
57
+ placeholder: t('Search transports…'),
58
+ 'aria-label': t('Search transports'),
59
+ } }), children: _jsx(WorkerTransportsTable, { api: api, transports: transports, recentWindowSeconds: overview?.recentWindowSeconds, isLoading: overviewQuery.isLoading, error: overview ? undefined : overviewError, monitoringEnabled: monitoringEnabled, isSearchActive: Boolean(search), onClearSearch: () => setValue('q', ''), transportHref: transportHref }) })] }), overview && _jsx(WorkerLoopsCard, { loops: overview.loops?.elements ?? [] })] })] }));
60
+ };
61
+ //# sourceMappingURL=WorkersOverviewScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkersOverviewScreen.js","sourceRoot":"","sources":["../../src/workers/WorkersOverviewScreen.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAkB,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA4B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA+B,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAwB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAwB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA2B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,0BAA2B,CAAC;AAC/E,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AAEzC,OAAO,EAAE,eAAe,EA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ure/injectedApi.js';
2
+ import type { WorkerMessageRunsResponse, WorkerProcessesResponse, WorkersHistoryResponse, WorkersOverviewResponse, WorkersRestartArg, WorkersRestartResponse, WorkersWindowArg, WorkerTransportArg, WorkerTransportDetailResponse, WorkerTransportListArg } from './types.js';
3
+ /** The cache tag type of the workers operations (one per api; ids `LIVE`, `HISTORY`, `RUNS`). */
4
+ export declare const WORKERS_TAG = "AdminUiWorkers";
5
+ /** The hooks `createWorkersApi` returns; every workers screen takes them as its `api`. */
6
+ export interface WorkersApi {
7
+ /** `GET /overview`: every transport, the totals, the live processes, the loops. */
8
+ useOverviewQuery: ApiQueryHook<void, WorkersOverviewResponse>;
9
+ /** `GET /history?from&to&stepSeconds`: per transport and in total, over a window. */
10
+ useHistoryQuery: ApiQueryHook<WorkersWindowArg, WorkersHistoryResponse>;
11
+ /** `GET /transports/{transport}?from&to&stepSeconds` (404: unknown transport). */
12
+ useTransportDetailQuery: ApiQueryHook<WorkerTransportArg, WorkerTransportDetailResponse>;
13
+ /** `GET /transports/{transport}/messageRuns` (QueryOptions; newest first by default). */
14
+ useMessageRunsQuery: ApiQueryHook<WorkerTransportListArg, WorkerMessageRunsResponse>;
15
+ /** `GET /transports/{transport}/processes` (QueryOptions; newest first by default). */
16
+ useProcessesQuery: ApiQueryHook<WorkerTransportListArg, WorkerProcessesResponse>;
17
+ /** `POST /restart`: asks the live processes (of one transport, or all) to stop after their current message. */
18
+ useRestartMutation: ApiMutationHook<WorkersRestartArg, WorkersRestartResponse>;
19
+ }
20
+ export interface CreateWorkersApiOptions {
21
+ /** The host's RTK Query api (`createApi` with the React hooks module). */
22
+ baseApi: InjectableBaseApi;
23
+ /** Where the host mounts `WorkersControllerTrait`, without a trailing slash (`/api/admin/maintenance/workers`). */
24
+ apiPrefix: string;
25
+ }
26
+ /** The request of every operation, on `apiPrefix`. Pure: no RTK runtime. */
27
+ export declare const buildWorkersRequests: (apiPrefix: string) => {
28
+ overview: () => InjectedRequest;
29
+ history: (arg: WorkersWindowArg) => InjectedRequest;
30
+ transportDetail: ({ transport, ...window }: WorkerTransportArg) => InjectedRequest;
31
+ messageRuns: (arg: WorkerTransportListArg) => InjectedRequest;
32
+ processes: (arg: WorkerTransportListArg) => InjectedRequest;
33
+ restart: ({ transport }: WorkersRestartArg) => InjectedRequest;
34
+ };
35
+ /**
36
+ * The operations as injected (endpoint name → definition). Cache: the overview, the transport detail and the process
37
+ * lists provide `LIVE`, the history `HISTORY`, the message runs `RUNS`; the restart request invalidates `LIVE` (it
38
+ * changes `restartPending` and the processes' `restartRequestedAt`).
39
+ */
40
+ export declare const workersEndpointDefinitions: (apiPrefix: string) => {
41
+ readonly adminUiWorkersOverview: {
42
+ readonly kind: "query";
43
+ readonly request: () => InjectedRequest;
44
+ readonly providesTags: readonly [{
45
+ readonly type: "AdminUiWorkers";
46
+ readonly id: "LIVE";
47
+ }];
48
+ };
49
+ readonly adminUiWorkersHistory: {
50
+ readonly kind: "query";
51
+ readonly request: (arg: WorkersWindowArg) => InjectedRequest;
52
+ readonly providesTags: readonly [{
53
+ readonly type: "AdminUiWorkers";
54
+ readonly id: "HISTORY";
55
+ }];
56
+ };
57
+ readonly adminUiWorkerTransportDetail: {
58
+ readonly kind: "query";
59
+ readonly request: ({ transport, ...window }: WorkerTransportArg) => InjectedRequest;
60
+ readonly providesTags: readonly [{
61
+ readonly type: "AdminUiWorkers";
62
+ readonly id: "LIVE";
63
+ }, {
64
+ readonly type: "AdminUiWorkers";
65
+ readonly id: "HISTORY";
66
+ }];
67
+ };
68
+ readonly adminUiWorkerMessageRuns: {
69
+ readonly kind: "query";
70
+ readonly request: (arg: WorkerTransportListArg) => InjectedRequest;
71
+ readonly providesTags: readonly [{
72
+ readonly type: "AdminUiWorkers";
73
+ readonly id: "RUNS";
74
+ }];
75
+ };
76
+ readonly adminUiWorkerProcesses: {
77
+ readonly kind: "query";
78
+ readonly request: (arg: WorkerTransportListArg) => InjectedRequest;
79
+ readonly providesTags: readonly [{
80
+ readonly type: "AdminUiWorkers";
81
+ readonly id: "LIVE";
82
+ }];
83
+ };
84
+ readonly adminUiWorkersRestart: {
85
+ readonly kind: "mutation";
86
+ readonly request: ({ transport }: WorkersRestartArg) => InjectedRequest;
87
+ readonly invalidatesTags: readonly [{
88
+ readonly type: "AdminUiWorkers";
89
+ readonly id: "LIVE";
90
+ }];
91
+ };
92
+ };
93
+ /**
94
+ * Injects the workers operations into the host's RTK Query api and returns their hooks. Call it once at module scope;
95
+ * a second call with the same api and prefix returns the first result.
96
+ *
97
+ * ```ts
98
+ * export const workersApi = createWorkersApi({ baseApi: adminApi, apiPrefix: '/api/admin/maintenance/workers' });
99
+ * ```
100
+ */
101
+ export declare const createWorkersApi: ({ baseApi, apiPrefix }: CreateWorkersApiOptions) => WorkersApi;
102
+ /** Fixed answers of a `createStaticWorkersApi`; an operation without one stays loading. */
103
+ export interface StaticWorkersData {
104
+ overview?: WorkersOverviewResponse;
105
+ history?: (arg: WorkersWindowArg) => WorkersHistoryResponse | undefined;
106
+ transportDetail?: (arg: WorkerTransportArg) => WorkerTransportDetailResponse | undefined;
107
+ messageRuns?: (arg: WorkerTransportListArg) => WorkerMessageRunsResponse | undefined;
108
+ processes?: (arg: WorkerTransportListArg) => WorkerProcessesResponse | undefined;
109
+ restart?: (arg: WorkersRestartArg) => WorkersRestartResponse | Promise<WorkersRestartResponse>;
110
+ }
111
+ /** A `WorkersApi` answering fixed payloads, without a store or a request: for showcases, tests and design reviews. */
112
+ export declare const createStaticWorkersApi: (data: StaticWorkersData) => WorkersApi;
113
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/workers/api.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EAEtB,KAAK,eAAe,EAMrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACV,yBAAyB,EACzB,uBAAuB,EACvB,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;;gCAG7D,sBAAsB,KAAG,eAAe;;;;;;;;gCAG1C,sBAAsB,KAAG,eAAe;;;;;;;;0CAGhC,iBAAiB,KAAG,eAAe;;;;;;CA2B/D,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAAI,wBAAwB,uBAAuB,KAAG,UAQ9E,CAAC;AAEN,2FAA2F;AAC3F,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,uBAAuB,CAAC;IACnC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,sBAAsB,GAAG,SAAS,CAAC;IACxE,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,kBAAkB,KAAK,6BAA6B,GAAG,SAAS,CAAC;IACzF,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,sBAAsB,KAAK,yBAAyB,GAAG,SAAS,CAAC;IACrF,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,sBAAsB,KAAK,uBAAuB,GAAG,SAAS,CAAC;IACjF,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;CAChG;AAED,sHAAsH;AACtH,eAAO,MAAM,sBAAsB,GAAI,MAAM,iBAAiB,KAAG,UAS/D,CAAC"}
@@ -0,0 +1,73 @@
1
+ import { injectEndpointsOnce, staticMutationHook, staticQueryHook, toQueryString, trimApiPrefix, } from "../logic/pure/injectedApi.js";
2
+ /** The cache tag type of the workers operations (one per api; ids `LIVE`, `HISTORY`, `RUNS`). */
3
+ export const WORKERS_TAG = 'AdminUiWorkers';
4
+ const windowQuery = ({ from, to, stepSeconds }) => toQueryString({ from, to, stepSeconds });
5
+ const listQuery = ({ filters, orderBy, top, skip }) => toQueryString({ filters, orderBy, top, skip });
6
+ const transportPath = (transport) => `/transports/${encodeURIComponent(transport)}`;
7
+ /** The request of every operation, on `apiPrefix`. Pure: no RTK runtime. */
8
+ export const buildWorkersRequests = (apiPrefix) => {
9
+ const prefix = trimApiPrefix(apiPrefix);
10
+ return {
11
+ overview: () => ({ url: `${prefix}/overview` }),
12
+ history: (arg) => ({ url: `${prefix}/history${windowQuery(arg)}` }),
13
+ transportDetail: ({ transport, ...window }) => ({
14
+ url: `${prefix}${transportPath(transport)}${windowQuery(window)}`,
15
+ }),
16
+ messageRuns: (arg) => ({
17
+ url: `${prefix}${transportPath(arg.transport)}/messageRuns${listQuery(arg)}`,
18
+ }),
19
+ processes: (arg) => ({
20
+ url: `${prefix}${transportPath(arg.transport)}/processes${listQuery(arg)}`,
21
+ }),
22
+ restart: ({ transport }) => ({
23
+ url: `${prefix}/restart`,
24
+ method: 'POST',
25
+ body: transport ? { transport } : {},
26
+ }),
27
+ };
28
+ };
29
+ const LIVE = { type: WORKERS_TAG, id: 'LIVE' };
30
+ const HISTORY = { type: WORKERS_TAG, id: 'HISTORY' };
31
+ const RUNS = { type: WORKERS_TAG, id: 'RUNS' };
32
+ /**
33
+ * The operations as injected (endpoint name → definition). Cache: the overview, the transport detail and the process
34
+ * lists provide `LIVE`, the history `HISTORY`, the message runs `RUNS`; the restart request invalidates `LIVE` (it
35
+ * changes `restartPending` and the processes' `restartRequestedAt`).
36
+ */
37
+ export const workersEndpointDefinitions = (apiPrefix) => {
38
+ const requests = buildWorkersRequests(apiPrefix);
39
+ return {
40
+ adminUiWorkersOverview: { kind: 'query', request: requests.overview, providesTags: [LIVE] },
41
+ adminUiWorkersHistory: { kind: 'query', request: requests.history, providesTags: [HISTORY] },
42
+ adminUiWorkerTransportDetail: { kind: 'query', request: requests.transportDetail, providesTags: [LIVE, HISTORY] },
43
+ adminUiWorkerMessageRuns: { kind: 'query', request: requests.messageRuns, providesTags: [RUNS] },
44
+ adminUiWorkerProcesses: { kind: 'query', request: requests.processes, providesTags: [LIVE] },
45
+ adminUiWorkersRestart: { kind: 'mutation', request: requests.restart, invalidatesTags: [LIVE] },
46
+ };
47
+ };
48
+ /**
49
+ * Injects the workers operations into the host's RTK Query api and returns their hooks. Call it once at module scope;
50
+ * a second call with the same api and prefix returns the first result.
51
+ *
52
+ * ```ts
53
+ * export const workersApi = createWorkersApi({ baseApi: adminApi, apiPrefix: '/api/admin/maintenance/workers' });
54
+ * ```
55
+ */
56
+ export const createWorkersApi = ({ baseApi, apiPrefix }) => injectEndpointsOnce(baseApi, `workers:${trimApiPrefix(apiPrefix)}`, [WORKERS_TAG], workersEndpointDefinitions(apiPrefix), hookOf => ({
57
+ useOverviewQuery: hookOf('adminUiWorkersOverview'),
58
+ useHistoryQuery: hookOf('adminUiWorkersHistory'),
59
+ useTransportDetailQuery: hookOf('adminUiWorkerTransportDetail'),
60
+ useMessageRunsQuery: hookOf('adminUiWorkerMessageRuns'),
61
+ useProcessesQuery: hookOf('adminUiWorkerProcesses'),
62
+ useRestartMutation: hookOf('adminUiWorkersRestart'),
63
+ }));
64
+ /** A `WorkersApi` answering fixed payloads, without a store or a request: for showcases, tests and design reviews. */
65
+ export const createStaticWorkersApi = (data) => ({
66
+ useOverviewQuery: staticQueryHook(() => data.overview),
67
+ useHistoryQuery: staticQueryHook(arg => data.history?.(arg)),
68
+ useTransportDetailQuery: staticQueryHook(arg => data.transportDetail?.(arg)),
69
+ useMessageRunsQuery: staticQueryHook(arg => data.messageRuns?.(arg)),
70
+ useProcessesQuery: staticQueryHook(arg => data.processes?.(arg)),
71
+ useRestartMutation: staticMutationHook(arg => data.restart ? data.restart(arg) : { requestedProcessCount: 0, workerProcesses: { elements: [] } }),
72
+ });
73
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/workers/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,aAAa,GACd,MAAM,8BAA8B,CAAC;AActC,iGAAiG;AACjG,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAyB5C,MAAM,WAAW,GA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C,IAAI,CAAC,eAAe,EAAE,CAAC,GAAG,CAAC,CAAC;IAC5E,mBAAmB,EAAE,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC;IACpE,iBAAiB,EAAE,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC;IAChE,kBAAkB,EAAE,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAC3C,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,CAAC,EAAE,eAAe,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CACnG;CACF,CAAC,CAAC"}
@@ -0,0 +1,94 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type ChartRow } from './format.js';
3
+ /**
4
+ * The workers charts, drawn as SVG without a chart library (no optional peer, server-rendered at a default width and
5
+ * measured in the browser). One time chart for every form (stacked step areas, lines, bars, combined), one sparkline.
6
+ * Colours are colour roles of the host contract (`var(--primary)`, `var(--destructive)`); axes, grid and tooltip use the
7
+ * text, border and popover roles. A `null` value is a gap, never a 0.
8
+ */
9
+ export interface ChartLegendItem {
10
+ key: string;
11
+ label: string;
12
+ color: string;
13
+ /** `line` draws a short stroke (dashed when `dashed`), otherwise a square swatch. */
14
+ shape?: 'swatch' | 'line';
15
+ dashed?: boolean;
16
+ }
17
+ /** The legend of a chart: colour mark and label, wrapping. */
18
+ export declare const ChartLegend: ({ items, className }: {
19
+ items: readonly ChartLegendItem[];
20
+ className?: string;
21
+ }) => import("react").JSX.Element;
22
+ export interface WorkerChartCardProps {
23
+ title: string;
24
+ description?: ReactNode;
25
+ /** Shown for two or more items. */
26
+ legend?: readonly ChartLegendItem[];
27
+ actions?: ReactNode;
28
+ children: ReactNode;
29
+ className?: string;
30
+ }
31
+ /** A chart in a card: section-label title, muted description, legend, then the plot. */
32
+ export declare const WorkerChartCard: ({ title, description, legend, actions, children, className }: WorkerChartCardProps) => import("react").JSX.Element;
33
+ export interface ChartBodyProps {
34
+ height: number;
35
+ isLoading?: boolean;
36
+ /** No point to draw: the empty message instead of a flat chart. */
37
+ isEmpty?: boolean;
38
+ emptyMessage?: string;
39
+ /** A background refetch: the chart dims a little. */
40
+ isRefreshing?: boolean;
41
+ children: ReactNode;
42
+ }
43
+ /** A fixed-height slot for a chart: skeleton while loading, an empty state, the chart otherwise. */
44
+ export declare const ChartBody: ({ height, isLoading, isEmpty, emptyMessage, isRefreshing, children }: ChartBodyProps) => import("react").JSX.Element;
45
+ export interface WorkerChartSeries {
46
+ key: string;
47
+ label: string;
48
+ /** A colour role: `var(--primary)`, `var(--destructive)`. */
49
+ color: string;
50
+ kind: 'area' | 'line' | 'bar';
51
+ /** Series with the same id stack (in the order given, the first at the bottom). */
52
+ stackId?: string;
53
+ /** `step` for counts that hold until the next sample (processes, queue), `linear` for rates (default). */
54
+ curve?: 'step' | 'linear';
55
+ dashed?: boolean;
56
+ }
57
+ export interface WorkerChartReferenceLine {
58
+ y: number;
59
+ label: string;
60
+ }
61
+ export interface WorkerTimeChartProps {
62
+ rows: readonly ChartRow[];
63
+ series: readonly WorkerChartSeries[];
64
+ windowMs: number;
65
+ stepSeconds: number;
66
+ height: number;
67
+ /** Axis tick text of the values (default: counts). */
68
+ formatTick?: (value: number) => string;
69
+ /** Tooltip value text (default: counts). */
70
+ formatValue?: (value: number) => string;
71
+ /** Logarithmic value axis, for maxima that dwarf the averages (a value ≤ 0 is a gap there). */
72
+ logScale?: boolean;
73
+ /** Dashed horizontal lines (a configured minimum and maximum). */
74
+ referenceLines?: readonly WorkerChartReferenceLine[];
75
+ /** Adds a "Total" line to the tooltip (stacked charts). */
76
+ showTotal?: boolean;
77
+ /** Accessible description of the chart. */
78
+ ariaLabel: string;
79
+ }
80
+ /** Round ticks from 0 to at least `maximum` (about four steps). */
81
+ export declare const niceTicks: (maximum: number, count?: number) => number[];
82
+ /** A time chart of one window: every series in its own form, on one value axis. */
83
+ export declare const WorkerTimeChart: ({ rows, series, windowMs, stepSeconds, height, formatTick, formatValue, logScale, referenceLines, showTotal, ariaLabel, }: WorkerTimeChartProps) => import("react").JSX.Element;
84
+ export interface WorkerSparklineProps {
85
+ rows: readonly ChartRow[];
86
+ valueKey: string;
87
+ color: string;
88
+ /** Accessible description (`handled in the last hour`). */
89
+ label: string;
90
+ height?: number;
91
+ }
92
+ /** The last hour of one value in a tile or a table row: a thin line over a soft wash, no axes; gaps stay gaps. */
93
+ export declare const WorkerSparkline: ({ rows, valueKey, color, label, height }: WorkerSparklineProps) => import("react").JSX.Element;
94
+ //# sourceMappingURL=charts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"charts.d.ts","sourceRoot":"","sources":["../../src/workers/charts.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAqB,KAAK,SAAS,EAA+C,MAAM,OAAO,CAAC;AAMvG,OAAO,EAAE,KAAK,QAAQ,EAAoD,MAAM,aAAa,CAAC;AAE9F;;;;;GAKG;AAEH,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,qFAAqF;IACrF,KAAK,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,8DAA8D;AAC9D,eAAO,MAAM,WAAW,GAAI,sBAAsB;IAAE,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,gCAiB1G,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,mCAAmC;IACnC,MAAM,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACpC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