@alepha/ui 0.27.0 → 0.27.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 (542) hide show
  1. package/README.md +56 -15
  2. package/dist/components/account/account-connections.d.ts.map +1 -1
  3. package/dist/components/account/account-connections.js +24 -13
  4. package/dist/components/account/account-connections.js.map +1 -1
  5. package/dist/components/account/account-delete-dialog.d.ts.map +1 -1
  6. package/dist/components/account/account-delete-dialog.js +12 -8
  7. package/dist/components/account/account-delete-dialog.js.map +1 -1
  8. package/dist/components/account/account-header.d.ts.map +1 -1
  9. package/dist/components/account/account-header.js +3 -1
  10. package/dist/components/account/account-header.js.map +1 -1
  11. package/dist/components/account/account-keys.d.ts.map +1 -1
  12. package/dist/components/account/account-keys.js +35 -21
  13. package/dist/components/account/account-keys.js.map +1 -1
  14. package/dist/components/account/account-mfa-dialog.d.ts +20 -0
  15. package/dist/components/account/account-mfa-dialog.d.ts.map +1 -0
  16. package/dist/components/account/account-mfa-dialog.js +149 -0
  17. package/dist/components/account/account-mfa-dialog.js.map +1 -0
  18. package/dist/components/account/account-password-dialog.d.ts.map +1 -1
  19. package/dist/components/account/account-password-dialog.js +15 -10
  20. package/dist/components/account/account-password-dialog.js.map +1 -1
  21. package/dist/components/account/account-profile.d.ts.map +1 -1
  22. package/dist/components/account/account-profile.js +25 -25
  23. package/dist/components/account/account-profile.js.map +1 -1
  24. package/dist/components/account/account-router.d.ts +76 -2
  25. package/dist/components/account/account-router.d.ts.map +1 -1
  26. package/dist/components/account/account-router.js +44 -4
  27. package/dist/components/account/account-router.js.map +1 -1
  28. package/dist/components/account/account-security.d.ts +11 -1
  29. package/dist/components/account/account-security.d.ts.map +1 -1
  30. package/dist/components/account/account-security.js +119 -32
  31. package/dist/components/account/account-security.js.map +1 -1
  32. package/dist/components/account/account-sessions.d.ts.map +1 -1
  33. package/dist/components/account/account-sessions.js +46 -24
  34. package/dist/components/account/account-sessions.js.map +1 -1
  35. package/dist/components/admin/admin-jobs-executions-panel.d.ts.map +1 -1
  36. package/dist/components/admin/admin-jobs-executions-panel.js +4 -9
  37. package/dist/components/admin/admin-jobs-executions-panel.js.map +1 -1
  38. package/dist/components/admin/admin-jobs-status-badge.d.ts.map +1 -1
  39. package/dist/components/admin/admin-jobs-status-badge.js +3 -3
  40. package/dist/components/admin/admin-jobs-status-badge.js.map +1 -1
  41. package/dist/components/admin/admin-jobs-status-labels.d.ts +26 -0
  42. package/dist/components/admin/admin-jobs-status-labels.d.ts.map +1 -0
  43. package/dist/components/admin/admin-jobs-status-labels.js +46 -0
  44. package/dist/components/admin/admin-jobs-status-labels.js.map +1 -0
  45. package/dist/components/admin/admin-layout.d.ts.map +1 -1
  46. package/dist/components/admin/admin-layout.js +5 -3
  47. package/dist/components/admin/admin-layout.js.map +1 -1
  48. package/dist/components/admin/admin-notifications-detail-tabs.d.ts +21 -0
  49. package/dist/components/admin/admin-notifications-detail-tabs.d.ts.map +1 -0
  50. package/dist/components/admin/admin-notifications-detail-tabs.js +122 -0
  51. package/dist/components/admin/admin-notifications-detail-tabs.js.map +1 -0
  52. package/dist/components/admin/admin-notifications-detail.d.ts +23 -0
  53. package/dist/components/admin/admin-notifications-detail.d.ts.map +1 -0
  54. package/dist/components/admin/admin-notifications-detail.js +48 -0
  55. package/dist/components/admin/admin-notifications-detail.js.map +1 -0
  56. package/dist/components/admin/admin-notifications-preview-body.d.ts +13 -0
  57. package/dist/components/admin/admin-notifications-preview-body.d.ts.map +1 -0
  58. package/dist/components/admin/admin-notifications-preview-body.js +64 -0
  59. package/dist/components/admin/admin-notifications-preview-body.js.map +1 -0
  60. package/dist/components/admin/admin-notifications-preview-tab.d.ts +24 -0
  61. package/dist/components/admin/admin-notifications-preview-tab.d.ts.map +1 -0
  62. package/dist/components/admin/admin-notifications-preview-tab.js +35 -0
  63. package/dist/components/admin/admin-notifications-preview-tab.js.map +1 -0
  64. package/dist/components/admin/admin-notifications-raw-tab.d.ts +18 -0
  65. package/dist/components/admin/admin-notifications-raw-tab.d.ts.map +1 -0
  66. package/dist/components/admin/admin-notifications-raw-tab.js +53 -0
  67. package/dist/components/admin/admin-notifications-raw-tab.js.map +1 -0
  68. package/dist/components/admin/admin-notifications-status-badge.d.ts +17 -0
  69. package/dist/components/admin/admin-notifications-status-badge.d.ts.map +1 -0
  70. package/dist/components/admin/admin-notifications-status-badge.js +32 -0
  71. package/dist/components/admin/admin-notifications-status-badge.js.map +1 -0
  72. package/dist/components/admin/admin-notifications-status-labels.d.ts +17 -0
  73. package/dist/components/admin/admin-notifications-status-labels.d.ts.map +1 -0
  74. package/dist/components/admin/admin-notifications-status-labels.js +33 -0
  75. package/dist/components/admin/admin-notifications-status-labels.js.map +1 -0
  76. package/dist/components/admin/admin-notifications-status-tones.d.ts +44 -0
  77. package/dist/components/admin/admin-notifications-status-tones.d.ts.map +1 -0
  78. package/dist/components/admin/admin-notifications-status-tones.js +64 -0
  79. package/dist/components/admin/admin-notifications-status-tones.js.map +1 -0
  80. package/dist/components/admin/admin-notifications-template-label.d.ts +16 -0
  81. package/dist/components/admin/admin-notifications-template-label.d.ts.map +1 -0
  82. package/dist/components/admin/admin-notifications-template-label.js +24 -0
  83. package/dist/components/admin/admin-notifications-template-label.js.map +1 -0
  84. package/dist/components/admin/admin-notifications.d.ts +13 -2
  85. package/dist/components/admin/admin-notifications.d.ts.map +1 -1
  86. package/dist/components/admin/admin-notifications.js +264 -29
  87. package/dist/components/admin/admin-notifications.js.map +1 -1
  88. package/dist/components/admin/admin-router.d.ts +29 -2
  89. package/dist/components/admin/admin-router.d.ts.map +1 -1
  90. package/dist/components/admin/admin-router.js +68 -8
  91. package/dist/components/admin/admin-router.js.map +1 -1
  92. package/dist/components/admin/admin-sessions.d.ts.map +1 -1
  93. package/dist/components/admin/admin-sessions.js +1 -1
  94. package/dist/components/admin/admin-sessions.js.map +1 -1
  95. package/dist/components/admin/admin-user-detail-security-tab.d.ts +12 -2
  96. package/dist/components/admin/admin-user-detail-security-tab.d.ts.map +1 -1
  97. package/dist/components/admin/admin-user-detail-security-tab.js +63 -44
  98. package/dist/components/admin/admin-user-detail-security-tab.js.map +1 -1
  99. package/dist/components/admin/admin-user-detail-sessions-tab.d.ts.map +1 -1
  100. package/dist/components/admin/admin-user-detail-sessions-tab.js +1 -1
  101. package/dist/components/admin/admin-user-detail-sessions-tab.js.map +1 -1
  102. package/dist/components/admin/admin-user-detail.d.ts.map +1 -1
  103. package/dist/components/admin/admin-user-detail.js +20 -15
  104. package/dist/components/admin/admin-user-detail.js.map +1 -1
  105. package/dist/components/admin/admin-users.js +1 -1
  106. package/dist/components/admin/admin-users.js.map +1 -1
  107. package/dist/components/admin/admin-workflows-executions-panel.d.ts.map +1 -1
  108. package/dist/components/admin/admin-workflows-executions-panel.js +4 -12
  109. package/dist/components/admin/admin-workflows-executions-panel.js.map +1 -1
  110. package/dist/components/admin/admin-workflows-status-badge.d.ts.map +1 -1
  111. package/dist/components/admin/admin-workflows-status-badge.js +3 -3
  112. package/dist/components/admin/admin-workflows-status-badge.js.map +1 -1
  113. package/dist/components/admin/admin-workflows-status-labels.d.ts +19 -0
  114. package/dist/components/admin/admin-workflows-status-labels.d.ts.map +1 -0
  115. package/dist/components/admin/admin-workflows-status-labels.js +48 -0
  116. package/dist/components/admin/admin-workflows-status-labels.js.map +1 -0
  117. package/dist/components/alepha-table/alepha-table.d.ts +6 -0
  118. package/dist/components/alepha-table/alepha-table.d.ts.map +1 -1
  119. package/dist/components/alepha-table/alepha-table.js +33 -5
  120. package/dist/components/alepha-table/alepha-table.js.map +1 -1
  121. package/dist/components/auth/auth-login.d.ts.map +1 -1
  122. package/dist/components/auth/auth-login.js +27 -17
  123. package/dist/components/auth/auth-login.js.map +1 -1
  124. package/dist/components/auth/auth-mfa-step.d.ts +25 -0
  125. package/dist/components/auth/auth-mfa-step.d.ts.map +1 -0
  126. package/dist/components/auth/auth-mfa-step.js +122 -0
  127. package/dist/components/auth/auth-mfa-step.js.map +1 -0
  128. package/dist/components/auth/auth-register.js +2 -2
  129. package/dist/components/auth/auth-register.js.map +1 -1
  130. package/dist/components/auth/auth-reset-password.js +2 -2
  131. package/dist/components/auth/auth-router.d.ts +20 -0
  132. package/dist/components/auth/auth-router.d.ts.map +1 -1
  133. package/dist/components/auth/provider-labels.d.ts.map +1 -1
  134. package/dist/components/auth/provider-labels.js +1 -0
  135. package/dist/components/auth/provider-labels.js.map +1 -1
  136. package/dist/components/control/control.d.ts +11 -2
  137. package/dist/components/control/control.d.ts.map +1 -1
  138. package/dist/components/control/control.js +7 -2
  139. package/dist/components/control/control.js.map +1 -1
  140. package/dist/components/control-array/control-array.d.ts.map +1 -1
  141. package/dist/components/control-array/control-array.js +55 -10
  142. package/dist/components/control-array/control-array.js.map +1 -1
  143. package/dist/components/control-number/control-number.d.ts +5 -0
  144. package/dist/components/control-number/control-number.d.ts.map +1 -1
  145. package/dist/components/control-number/control-number.js +1 -0
  146. package/dist/components/control-number/control-number.js.map +1 -1
  147. package/dist/components/control-object/control-object.d.ts +12 -1
  148. package/dist/components/control-object/control-object.d.ts.map +1 -1
  149. package/dist/components/control-object/control-object.js +2 -1
  150. package/dist/components/control-object/control-object.js.map +1 -1
  151. package/dist/components/control-password/control-password.d.ts.map +1 -1
  152. package/dist/components/control-password/control-password.js +1 -0
  153. package/dist/components/control-password/control-password.js.map +1 -1
  154. package/dist/components/detail/detail-layout.d.ts +6 -0
  155. package/dist/components/detail/detail-layout.d.ts.map +1 -1
  156. package/dist/components/detail/detail-layout.js +2 -1
  157. package/dist/components/detail/detail-layout.js.map +1 -1
  158. package/dist/components/email-body-frame/email-body-frame.d.ts +37 -0
  159. package/dist/components/email-body-frame/email-body-frame.d.ts.map +1 -0
  160. package/dist/components/email-body-frame/email-body-frame.js +44 -0
  161. package/dist/components/email-body-frame/email-body-frame.js.map +1 -0
  162. package/dist/components/markdown-view/diagram/DiagramLabel.d.ts +33 -0
  163. package/dist/components/markdown-view/diagram/DiagramLabel.d.ts.map +1 -0
  164. package/dist/components/markdown-view/diagram/{FlowchartDiagramLabel.js → DiagramLabel.js} +15 -6
  165. package/dist/components/markdown-view/diagram/DiagramLabel.js.map +1 -0
  166. package/dist/components/markdown-view/diagram/FlowchartDiagram.d.ts +0 -5
  167. package/dist/components/markdown-view/diagram/FlowchartDiagram.d.ts.map +1 -1
  168. package/dist/components/markdown-view/diagram/FlowchartDiagram.js +2 -6
  169. package/dist/components/markdown-view/diagram/FlowchartDiagram.js.map +1 -1
  170. package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.js +1 -1
  171. package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.js.map +1 -1
  172. package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.d.ts.map +1 -1
  173. package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.js +2 -3
  174. package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.js.map +1 -1
  175. package/dist/components/markdown-view/diagram/FlowchartDiagramNode.d.ts.map +1 -1
  176. package/dist/components/markdown-view/diagram/FlowchartDiagramNode.js +2 -3
  177. package/dist/components/markdown-view/diagram/FlowchartDiagramNode.js.map +1 -1
  178. package/dist/components/markdown-view/diagram/MermaidFence.d.ts +20 -11
  179. package/dist/components/markdown-view/diagram/MermaidFence.d.ts.map +1 -1
  180. package/dist/components/markdown-view/diagram/MermaidFence.js +48 -13
  181. package/dist/components/markdown-view/diagram/MermaidFence.js.map +1 -1
  182. package/dist/components/markdown-view/diagram/SequenceDiagram.d.ts +50 -0
  183. package/dist/components/markdown-view/diagram/SequenceDiagram.d.ts.map +1 -0
  184. package/dist/components/markdown-view/diagram/SequenceDiagram.js +141 -0
  185. package/dist/components/markdown-view/diagram/SequenceDiagram.js.map +1 -0
  186. package/dist/components/markdown-view/diagram/SequenceDiagramFragment.d.ts +23 -0
  187. package/dist/components/markdown-view/diagram/SequenceDiagramFragment.d.ts.map +1 -0
  188. package/dist/components/markdown-view/diagram/SequenceDiagramFragment.js +101 -0
  189. package/dist/components/markdown-view/diagram/SequenceDiagramFragment.js.map +1 -0
  190. package/dist/components/markdown-view/diagram/SequenceDiagramMessage.d.ts +23 -0
  191. package/dist/components/markdown-view/diagram/SequenceDiagramMessage.d.ts.map +1 -0
  192. package/dist/components/markdown-view/diagram/SequenceDiagramMessage.js +77 -0
  193. package/dist/components/markdown-view/diagram/SequenceDiagramMessage.js.map +1 -0
  194. package/dist/components/markdown-view/diagram/SequenceDiagramNote.d.ts +16 -0
  195. package/dist/components/markdown-view/diagram/SequenceDiagramNote.d.ts.map +1 -0
  196. package/dist/components/markdown-view/diagram/SequenceDiagramNote.js +39 -0
  197. package/dist/components/markdown-view/diagram/SequenceDiagramNote.js.map +1 -0
  198. package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.d.ts +20 -0
  199. package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.d.ts.map +1 -0
  200. package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.js +61 -0
  201. package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.js.map +1 -0
  202. package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.d.ts +27 -0
  203. package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.d.ts.map +1 -0
  204. package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.js +65 -0
  205. package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.js.map +1 -0
  206. package/dist/components/markdown-view/diagram/layoutSequence.d.ts +155 -0
  207. package/dist/components/markdown-view/diagram/layoutSequence.d.ts.map +1 -0
  208. package/dist/components/markdown-view/diagram/layoutSequence.js +478 -0
  209. package/dist/components/markdown-view/diagram/layoutSequence.js.map +1 -0
  210. package/dist/components/markdown-view/diagram/sequenceModel.d.ts +132 -0
  211. package/dist/components/markdown-view/diagram/sequenceModel.d.ts.map +1 -0
  212. package/dist/components/markdown-view/diagram/sequenceModel.js +0 -0
  213. package/dist/components/markdown-view/diagram/sequenceParser.d.ts +32 -0
  214. package/dist/components/markdown-view/diagram/sequenceParser.d.ts.map +1 -0
  215. package/dist/components/markdown-view/diagram/sequenceParser.js +312 -0
  216. package/dist/components/markdown-view/diagram/sequenceParser.js.map +1 -0
  217. package/dist/components/markdown-view/markdown-view.css +65 -0
  218. package/dist/components/markdown-view/markdown-view.d.ts +18 -11
  219. package/dist/components/markdown-view/markdown-view.d.ts.map +1 -1
  220. package/dist/components/markdown-view/markdown-view.js +30 -16
  221. package/dist/components/markdown-view/markdown-view.js.map +1 -1
  222. package/dist/components/nav-shell/nav-page.d.ts +7 -0
  223. package/dist/components/nav-shell/nav-page.d.ts.map +1 -1
  224. package/dist/components/nav-shell/nav-page.js.map +1 -1
  225. package/dist/components/nav-shell/nav-tree-util.d.ts +64 -2
  226. package/dist/components/nav-shell/nav-tree-util.d.ts.map +1 -1
  227. package/dist/components/nav-shell/nav-tree-util.js +29 -6
  228. package/dist/components/nav-shell/nav-tree-util.js.map +1 -1
  229. package/dist/components/nav-shell/spotlight.d.ts +3 -2
  230. package/dist/components/nav-shell/spotlight.d.ts.map +1 -1
  231. package/dist/components/nav-shell/spotlight.js +9 -6
  232. package/dist/components/nav-shell/spotlight.js.map +1 -1
  233. package/dist/components/nav-shell/use-nav-breadcrumbs.d.ts.map +1 -1
  234. package/dist/components/nav-shell/use-nav-breadcrumbs.js +9 -2
  235. package/dist/components/nav-shell/use-nav-breadcrumbs.js.map +1 -1
  236. package/dist/components/nav-shell/use-nav-entries.d.ts +6 -0
  237. package/dist/components/nav-shell/use-nav-entries.d.ts.map +1 -1
  238. package/dist/components/nav-shell/use-nav-entries.js +8 -3
  239. package/dist/components/nav-shell/use-nav-entries.js.map +1 -1
  240. package/dist/components/nav-shell/use-nav-tree.d.ts.map +1 -1
  241. package/dist/components/nav-shell/use-nav-tree.js +1 -1
  242. package/dist/components/nav-shell/use-nav-tree.js.map +1 -1
  243. package/dist/components/ui/alert-dialog.d.ts +1 -1
  244. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  245. package/dist/components/ui/alert-dialog.js +1 -0
  246. package/dist/components/ui/alert-dialog.js.map +1 -1
  247. package/dist/components/ui/alert.d.ts +2 -2
  248. package/dist/components/ui/alert.d.ts.map +1 -1
  249. package/dist/components/ui/alert.js +1 -0
  250. package/dist/components/ui/alert.js.map +1 -1
  251. package/dist/components/ui/avatar.d.ts +2 -2
  252. package/dist/components/ui/avatar.d.ts.map +1 -1
  253. package/dist/components/ui/avatar.js +1 -0
  254. package/dist/components/ui/avatar.js.map +1 -1
  255. package/dist/components/ui/breadcrumb.d.ts +2 -2
  256. package/dist/components/ui/breadcrumb.d.ts.map +1 -1
  257. package/dist/components/ui/breadcrumb.js +1 -0
  258. package/dist/components/ui/breadcrumb.js.map +1 -1
  259. package/dist/components/ui/card.d.ts +2 -2
  260. package/dist/components/ui/card.d.ts.map +1 -1
  261. package/dist/components/ui/card.js +1 -0
  262. package/dist/components/ui/card.js.map +1 -1
  263. package/dist/components/ui/checkbox.js +1 -1
  264. package/dist/components/ui/checkbox.js.map +1 -1
  265. package/dist/components/ui/combobox.d.ts +1 -1
  266. package/dist/components/ui/combobox.d.ts.map +1 -1
  267. package/dist/components/ui/combobox.js.map +1 -1
  268. package/dist/components/ui/command.d.ts +2 -2
  269. package/dist/components/ui/command.d.ts.map +1 -1
  270. package/dist/components/ui/command.js +1 -0
  271. package/dist/components/ui/command.js.map +1 -1
  272. package/dist/components/ui/context-menu.d.ts +2 -2
  273. package/dist/components/ui/context-menu.d.ts.map +1 -1
  274. package/dist/components/ui/context-menu.js +1 -0
  275. package/dist/components/ui/context-menu.js.map +1 -1
  276. package/dist/components/ui/dialog.d.ts +1 -1
  277. package/dist/components/ui/dialog.d.ts.map +1 -1
  278. package/dist/components/ui/dialog.js +1 -0
  279. package/dist/components/ui/dialog.js.map +1 -1
  280. package/dist/components/ui/drawer.d.ts +1 -1
  281. package/dist/components/ui/drawer.d.ts.map +1 -1
  282. package/dist/components/ui/drawer.js.map +1 -1
  283. package/dist/components/ui/dropdown-menu.d.ts +2 -2
  284. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  285. package/dist/components/ui/dropdown-menu.js +1 -0
  286. package/dist/components/ui/dropdown-menu.js.map +1 -1
  287. package/dist/components/ui/empty.d.ts +1 -1
  288. package/dist/components/ui/empty.d.ts.map +1 -1
  289. package/dist/components/ui/empty.js.map +1 -1
  290. package/dist/components/ui/hover-card.d.ts +1 -1
  291. package/dist/components/ui/hover-card.js.map +1 -1
  292. package/dist/components/ui/input-group.d.ts +2 -2
  293. package/dist/components/ui/input-group.d.ts.map +1 -1
  294. package/dist/components/ui/input-group.js +1 -0
  295. package/dist/components/ui/input-group.js.map +1 -1
  296. package/dist/components/ui/input-otp.d.ts +1 -1
  297. package/dist/components/ui/input-otp.d.ts.map +1 -1
  298. package/dist/components/ui/input-otp.js.map +1 -1
  299. package/dist/components/ui/input.d.ts +1 -1
  300. package/dist/components/ui/input.d.ts.map +1 -1
  301. package/dist/components/ui/input.js +1 -0
  302. package/dist/components/ui/input.js.map +1 -1
  303. package/dist/components/ui/label.d.ts +1 -1
  304. package/dist/components/ui/label.d.ts.map +1 -1
  305. package/dist/components/ui/label.js +1 -0
  306. package/dist/components/ui/label.js.map +1 -1
  307. package/dist/components/ui/menubar.d.ts +2 -2
  308. package/dist/components/ui/menubar.d.ts.map +1 -1
  309. package/dist/components/ui/menubar.js +1 -0
  310. package/dist/components/ui/menubar.js.map +1 -1
  311. package/dist/components/ui/pagination.d.ts +1 -1
  312. package/dist/components/ui/pagination.d.ts.map +1 -1
  313. package/dist/components/ui/pagination.js +1 -0
  314. package/dist/components/ui/pagination.js.map +1 -1
  315. package/dist/components/ui/popover.d.ts +1 -1
  316. package/dist/components/ui/popover.d.ts.map +1 -1
  317. package/dist/components/ui/popover.js +1 -0
  318. package/dist/components/ui/popover.js.map +1 -1
  319. package/dist/components/ui/progress.d.ts +1 -1
  320. package/dist/components/ui/progress.d.ts.map +1 -1
  321. package/dist/components/ui/progress.js.map +1 -1
  322. package/dist/components/ui/segmented.d.ts +11 -0
  323. package/dist/components/ui/segmented.d.ts.map +1 -1
  324. package/dist/components/ui/segmented.js +6 -2
  325. package/dist/components/ui/segmented.js.map +1 -1
  326. package/dist/components/ui/select.d.ts +1 -1
  327. package/dist/components/ui/select.d.ts.map +1 -1
  328. package/dist/components/ui/select.js +1 -0
  329. package/dist/components/ui/select.js.map +1 -1
  330. package/dist/components/ui/sheet.d.ts +2 -2
  331. package/dist/components/ui/sheet.d.ts.map +1 -1
  332. package/dist/components/ui/sheet.js +1 -0
  333. package/dist/components/ui/sheet.js.map +1 -1
  334. package/dist/components/ui/switch.js +1 -1
  335. package/dist/components/ui/switch.js.map +1 -1
  336. package/dist/components/ui/table.d.ts +2 -2
  337. package/dist/components/ui/table.d.ts.map +1 -1
  338. package/dist/components/ui/table.js +1 -0
  339. package/dist/components/ui/table.js.map +1 -1
  340. package/dist/components/ui/tabs.d.ts +1 -1
  341. package/dist/components/ui/tabs.d.ts.map +1 -1
  342. package/dist/components/ui/tabs.js.map +1 -1
  343. package/dist/components/ui/textarea.d.ts +1 -1
  344. package/dist/components/ui/textarea.d.ts.map +1 -1
  345. package/dist/components/ui/textarea.js +1 -0
  346. package/dist/components/ui/textarea.js.map +1 -1
  347. package/dist/components/ui/tooltip.d.ts +1 -11
  348. package/dist/components/ui/tooltip.d.ts.map +1 -1
  349. package/dist/components/ui/tooltip.js +0 -10
  350. package/dist/components/ui/tooltip.js.map +1 -1
  351. package/dist/hooks/use-mobile.d.ts +1 -1
  352. package/dist/hooks/use-mobile.js +1 -1
  353. package/dist/hooks/use-mobile.js.map +1 -1
  354. package/dist/lib/i18n-fr.d.ts.map +1 -1
  355. package/dist/lib/i18n-fr.js +252 -2
  356. package/dist/lib/i18n-fr.js.map +1 -1
  357. package/package.json +5 -5
  358. package/src/components/account/__tests__/account-router.spec.ts +25 -0
  359. package/src/components/account/__tests__/account-security-mfa-gate.browser.spec.tsx +76 -0
  360. package/src/components/account/account-connections.tsx +50 -18
  361. package/src/components/account/account-delete-dialog.tsx +24 -9
  362. package/src/components/account/account-header.tsx +4 -1
  363. package/src/components/account/account-keys.tsx +73 -29
  364. package/src/components/account/account-mfa-dialog.tsx +233 -0
  365. package/src/components/account/account-password-dialog.tsx +42 -12
  366. package/src/components/account/account-profile.tsx +66 -25
  367. package/src/components/account/account-router.tsx +47 -6
  368. package/src/components/account/account-security.tsx +209 -22
  369. package/src/components/account/account-sessions.tsx +87 -22
  370. package/src/components/action-error-toaster/__tests__/action-error-toaster.browser.spec.tsx +114 -0
  371. package/src/components/admin/__tests__/admin-nav-i18n.browser.spec.tsx +152 -0
  372. package/src/components/admin/__tests__/admin-notifications-preview-body.browser.spec.tsx +128 -0
  373. package/src/components/admin/__tests__/admin-notifications-raw-tab.browser.spec.tsx +76 -0
  374. package/src/components/admin/__tests__/admin-notifications-status-badge.browser.spec.tsx +121 -0
  375. package/src/components/admin/__tests__/admin-router.spec.ts +27 -0
  376. package/src/components/admin/__tests__/admin-status-labels.browser.spec.tsx +152 -0
  377. package/src/components/admin/__tests__/admin-user-detail-security-tab.browser.spec.tsx +92 -0
  378. package/src/components/admin/admin-jobs-executions-panel.tsx +8 -11
  379. package/src/components/admin/admin-jobs-status-badge.tsx +4 -5
  380. package/src/components/admin/admin-jobs-status-labels.ts +46 -0
  381. package/src/components/admin/admin-layout.tsx +9 -3
  382. package/src/components/admin/admin-notifications-detail-tabs.tsx +167 -0
  383. package/src/components/admin/admin-notifications-detail.tsx +100 -0
  384. package/src/components/admin/admin-notifications-preview-body.tsx +104 -0
  385. package/src/components/admin/admin-notifications-preview-tab.tsx +55 -0
  386. package/src/components/admin/admin-notifications-raw-tab.tsx +76 -0
  387. package/src/components/admin/admin-notifications-status-badge.tsx +44 -0
  388. package/src/components/admin/admin-notifications-status-labels.ts +42 -0
  389. package/src/components/admin/admin-notifications-status-tones.ts +85 -0
  390. package/src/components/admin/admin-notifications-template-label.ts +22 -0
  391. package/src/components/admin/admin-notifications.tsx +398 -31
  392. package/src/components/admin/admin-router.tsx +65 -8
  393. package/src/components/admin/admin-sessions.tsx +10 -3
  394. package/src/components/admin/admin-user-detail-security-tab.tsx +70 -5
  395. package/src/components/admin/admin-user-detail-sessions-tab.tsx +10 -3
  396. package/src/components/admin/admin-user-detail.tsx +92 -23
  397. package/src/components/admin/admin-users.tsx +1 -1
  398. package/src/components/admin/admin-workflows-executions-panel.tsx +8 -16
  399. package/src/components/admin/admin-workflows-status-badge.tsx +4 -5
  400. package/src/components/admin/admin-workflows-status-labels.ts +51 -0
  401. package/src/components/alepha-table/__tests__/alepha-table-row-key.browser.spec.tsx +106 -0
  402. package/src/components/alepha-table/alepha-table.tsx +50 -10
  403. package/src/components/auth/auth-login.tsx +37 -18
  404. package/src/components/auth/auth-mfa-step.tsx +177 -0
  405. package/src/components/auth/auth-register.tsx +1 -1
  406. package/src/components/auth/provider-labels.ts +4 -0
  407. package/src/components/control/__tests__/control-autofocus.browser.spec.tsx +107 -0
  408. package/src/components/control/control.tsx +20 -5
  409. package/src/components/control-array/__tests__/control-array-child-change.browser.spec.tsx +90 -0
  410. package/src/components/control-array/control-array.tsx +85 -13
  411. package/src/components/control-number/control-number.tsx +7 -0
  412. package/src/components/control-object/__tests__/control-object-clear.browser.spec.tsx +100 -0
  413. package/src/components/control-object/control-object.tsx +21 -2
  414. package/src/components/control-password/control-password.tsx +2 -1
  415. package/src/components/detail/__tests__/detail-layout.browser.spec.tsx +36 -0
  416. package/src/components/detail/detail-layout.tsx +20 -1
  417. package/src/components/email-body-frame/__tests__/email-body-frame.browser.spec.tsx +52 -0
  418. package/src/components/email-body-frame/email-body-frame.tsx +81 -0
  419. package/src/components/markdown-view/__tests__/markdown-view-mermaid.browser.spec.tsx +65 -2
  420. package/src/components/markdown-view/diagram/{FlowchartDiagramLabel.tsx → DiagramLabel.tsx} +14 -4
  421. package/src/components/markdown-view/diagram/FlowchartDiagram.tsx +1 -6
  422. package/src/components/markdown-view/diagram/FlowchartDiagramCluster.tsx +1 -1
  423. package/src/components/markdown-view/diagram/FlowchartDiagramEdge.tsx +2 -3
  424. package/src/components/markdown-view/diagram/FlowchartDiagramNode.tsx +2 -3
  425. package/src/components/markdown-view/diagram/MermaidFence.tsx +65 -15
  426. package/src/components/markdown-view/diagram/SequenceDiagram.tsx +203 -0
  427. package/src/components/markdown-view/diagram/SequenceDiagramFragment.tsx +120 -0
  428. package/src/components/markdown-view/diagram/SequenceDiagramMessage.tsx +100 -0
  429. package/src/components/markdown-view/diagram/SequenceDiagramNote.tsx +46 -0
  430. package/src/components/markdown-view/diagram/SequenceDiagramParticipant.tsx +80 -0
  431. package/src/components/markdown-view/diagram/SequenceDiagramParticipantActor.tsx +74 -0
  432. package/src/components/markdown-view/diagram/__tests__/sequence-diagram.browser.spec.tsx +267 -0
  433. package/src/components/markdown-view/diagram/layoutSequence.spec.ts +535 -0
  434. package/src/components/markdown-view/diagram/layoutSequence.ts +764 -0
  435. package/src/components/markdown-view/diagram/sequenceModel.ts +141 -0
  436. package/src/components/markdown-view/diagram/sequenceParser.spec.ts +495 -0
  437. package/src/components/markdown-view/diagram/sequenceParser.ts +443 -0
  438. package/src/components/markdown-view/markdown-view.css +65 -0
  439. package/src/components/markdown-view/markdown-view.tsx +34 -16
  440. package/src/components/nav-shell/__tests__/nav-tree-util.spec.ts +107 -1
  441. package/src/components/nav-shell/nav-page.tsx +8 -0
  442. package/src/components/nav-shell/nav-tree-util.ts +95 -2
  443. package/src/components/nav-shell/spotlight.tsx +22 -8
  444. package/src/components/nav-shell/use-nav-breadcrumbs.ts +9 -2
  445. package/src/components/nav-shell/use-nav-entries.ts +18 -2
  446. package/src/components/nav-shell/use-nav-tree.ts +4 -1
  447. package/src/components/ui/alert-dialog.tsx +1 -1
  448. package/src/components/ui/alert.tsx +2 -2
  449. package/src/components/ui/avatar.tsx +3 -3
  450. package/src/components/ui/breadcrumb.tsx +3 -3
  451. package/src/components/ui/card.tsx +5 -5
  452. package/src/components/ui/checkbox.tsx +1 -1
  453. package/src/components/ui/combobox.tsx +8 -8
  454. package/src/components/ui/command.tsx +4 -4
  455. package/src/components/ui/context-menu.tsx +7 -7
  456. package/src/components/ui/dialog.tsx +1 -1
  457. package/src/components/ui/drawer.tsx +6 -6
  458. package/src/components/ui/dropdown-menu.tsx +8 -14
  459. package/src/components/ui/empty.tsx +3 -3
  460. package/src/components/ui/hover-card.tsx +1 -1
  461. package/src/components/ui/input-group.tsx +2 -2
  462. package/src/components/ui/input-otp.tsx +1 -1
  463. package/src/components/ui/input.tsx +1 -1
  464. package/src/components/ui/label.tsx +1 -1
  465. package/src/components/ui/menubar.tsx +9 -9
  466. package/src/components/ui/pagination.tsx +1 -1
  467. package/src/components/ui/popover.tsx +1 -1
  468. package/src/components/ui/progress.tsx +1 -1
  469. package/src/components/ui/segmented.tsx +28 -0
  470. package/src/components/ui/select.tsx +1 -1
  471. package/src/components/ui/sheet.tsx +4 -4
  472. package/src/components/ui/switch.tsx +1 -1
  473. package/src/components/ui/table.tsx +6 -9
  474. package/src/components/ui/tabs.tsx +1 -1
  475. package/src/components/ui/textarea.tsx +1 -1
  476. package/src/components/ui/tooltip.tsx +3 -11
  477. package/src/components/use-dialog/__tests__/use-dialog-providers.browser.spec.tsx +61 -0
  478. package/src/hooks/use-mobile.ts +1 -1
  479. package/src/lib/__tests__/i18n-fr.spec.ts +27 -5
  480. package/src/lib/i18n-fr.ts +308 -1
  481. package/dist/components/language-toggle/language-toggle.d.ts +0 -8
  482. package/dist/components/language-toggle/language-toggle.d.ts.map +0 -1
  483. package/dist/components/language-toggle/language-toggle.js +0 -49
  484. package/dist/components/language-toggle/language-toggle.js.map +0 -1
  485. package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.d.ts +0 -23
  486. package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.d.ts.map +0 -1
  487. package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.js.map +0 -1
  488. package/dist/components/ui/accordion.d.ts +0 -7
  489. package/dist/components/ui/accordion.d.ts.map +0 -1
  490. package/dist/components/ui/accordion.js +0 -55
  491. package/dist/components/ui/accordion.js.map +0 -1
  492. package/dist/components/ui/aspect-ratio.d.ts +0 -5
  493. package/dist/components/ui/aspect-ratio.d.ts.map +0 -1
  494. package/dist/components/ui/aspect-ratio.js +0 -15
  495. package/dist/components/ui/aspect-ratio.js.map +0 -1
  496. package/dist/components/ui/carousel.d.ts +0 -29
  497. package/dist/components/ui/carousel.d.ts.map +0 -1
  498. package/dist/components/ui/carousel.js +0 -144
  499. package/dist/components/ui/carousel.js.map +0 -1
  500. package/dist/components/ui/collapsible.d.ts +0 -6
  501. package/dist/components/ui/collapsible.d.ts.map +0 -1
  502. package/dist/components/ui/collapsible.js +0 -26
  503. package/dist/components/ui/collapsible.js.map +0 -1
  504. package/dist/components/ui/direction.d.ts +0 -2
  505. package/dist/components/ui/direction.d.ts.map +0 -1
  506. package/dist/components/ui/direction.js +0 -3
  507. package/dist/components/ui/item.d.ts +0 -23
  508. package/dist/components/ui/item.d.ts.map +0 -1
  509. package/dist/components/ui/item.js +0 -122
  510. package/dist/components/ui/item.js.map +0 -1
  511. package/dist/components/ui/navigation-menu.d.ts +0 -12
  512. package/dist/components/ui/navigation-menu.d.ts.map +0 -1
  513. package/dist/components/ui/navigation-menu.js +0 -84
  514. package/dist/components/ui/navigation-menu.js.map +0 -1
  515. package/dist/components/ui/radio-group.d.ts +0 -6
  516. package/dist/components/ui/radio-group.d.ts.map +0 -1
  517. package/dist/components/ui/radio-group.js +0 -29
  518. package/dist/components/ui/radio-group.js.map +0 -1
  519. package/dist/components/ui/scroll-area.d.ts +0 -5
  520. package/dist/components/ui/scroll-area.d.ts.map +0 -1
  521. package/dist/components/ui/scroll-area.js +0 -38
  522. package/dist/components/ui/scroll-area.js.map +0 -1
  523. package/dist/components/ui/toggle-group.d.ts +0 -12
  524. package/dist/components/ui/toggle-group.d.ts.map +0 -1
  525. package/dist/components/ui/toggle-group.js +0 -60
  526. package/dist/components/ui/toggle-group.js.map +0 -1
  527. package/dist/components/ui/toggle.d.ts +0 -9
  528. package/dist/components/ui/toggle.d.ts.map +0 -1
  529. package/dist/components/ui/toggle.js +0 -38
  530. package/dist/components/ui/toggle.js.map +0 -1
  531. package/src/components/language-toggle/language-toggle.tsx +0 -66
  532. package/src/components/ui/accordion.tsx +0 -77
  533. package/src/components/ui/aspect-ratio.tsx +0 -22
  534. package/src/components/ui/carousel.tsx +0 -258
  535. package/src/components/ui/collapsible.tsx +0 -21
  536. package/src/components/ui/direction.tsx +0 -6
  537. package/src/components/ui/item.tsx +0 -200
  538. package/src/components/ui/navigation-menu.tsx +0 -170
  539. package/src/components/ui/radio-group.tsx +0 -37
  540. package/src/components/ui/scroll-area.tsx +0 -53
  541. package/src/components/ui/toggle-group.tsx +0 -93
  542. package/src/components/ui/toggle.tsx +0 -44
@@ -0,0 +1,152 @@
1
+ import { render, screen } from "@testing-library/react";
2
+ import { Alepha } from "alepha";
3
+ import { AlephaContext } from "alepha/react";
4
+ import { $dictionary, AlephaReactI18n, I18nProvider } from "alepha/react/i18n";
5
+ import { AlephaReactRouter, ReactRouter } from "alepha/react/router";
6
+ import { setupJsdomMocks } from "alepha/react/testing";
7
+ import { act } from "react";
8
+ import { afterEach, beforeAll, describe, expect, it } from "vitest";
9
+
10
+ import { uiFr } from "../../../lib/i18n-fr.ts";
11
+ import AdminLayout from "../admin-layout.tsx";
12
+ import { AdminRouter } from "../admin-router.tsx";
13
+
14
+ /**
15
+ * The shell chrome must follow a language switch with no reload.
16
+ *
17
+ * `admin-router.spec.ts` pins that every entry NAMES a catalogue key; this
18
+ * pins that naming one is enough - that the sidebar, the section headings and
19
+ * the brand are resolved inside React rather than frozen at the moment the
20
+ * router's class fields ran. That freeze is the bug: an application in French
21
+ * had a French back office wrapped in an English shell.
22
+ */
23
+ describe("admin shell labels follow the language", () => {
24
+ let alepha: Alepha | undefined;
25
+
26
+ beforeAll(() => {
27
+ setupJsdomMocks();
28
+ });
29
+
30
+ afterEach(async () => {
31
+ await alepha?.stop();
32
+ alepha = undefined;
33
+ });
34
+
35
+ class Catalogues {
36
+ en = $dictionary({ lazy: async () => ({ default: {} }) });
37
+ // The real catalogue, not a fixture: a key renamed on one side only would
38
+ // otherwise pass here and ship English.
39
+ fr = $dictionary({ lazy: async () => ({ default: uiFr }) });
40
+ }
41
+
42
+ const mount = async () => {
43
+ alepha = Alepha.create().with(AlephaReactRouter).with(AlephaReactI18n);
44
+ alepha.inject(AdminRouter);
45
+ alepha.inject(Catalogues);
46
+ await alepha.start();
47
+
48
+ // The registry both gates read: `can` wants the action, `nav.permission`
49
+ // wants the permission. Without it the sidebar is one ungated entry.
50
+ alepha.store.set("alepha.server.request.apiLinks", {
51
+ actions: {
52
+ findUsers: { path: "/users" },
53
+ findSessions: { path: "/sessions" },
54
+ listJobs: { path: "/jobs" },
55
+ },
56
+ permissions: [
57
+ "admin:ui",
58
+ "admin:user:read",
59
+ "admin:session:read",
60
+ "admin:job:read",
61
+ ],
62
+ } as any);
63
+
64
+ const i18n = alepha.inject(I18nProvider);
65
+ await i18n.setLang("en");
66
+
67
+ return render(
68
+ <AlephaContext.Provider value={alepha}>
69
+ <AdminLayout />
70
+ </AlephaContext.Provider>,
71
+ );
72
+ };
73
+
74
+ it("re-labels the sidebar and its section headings on setLang", async () => {
75
+ await mount();
76
+
77
+ // English first - the `label` beside each key, which is also what an
78
+ // application spreading no catalogue keeps seeing.
79
+ expect(screen.getByText("Dashboard")).toBeTruthy();
80
+ expect(screen.getByText("Users")).toBeTruthy();
81
+ expect(screen.getByText("Identity")).toBeTruthy();
82
+ expect(screen.getByText("System")).toBeTruthy();
83
+
84
+ await act(async () => {
85
+ await alepha!.inject(I18nProvider).setLang("fr");
86
+ });
87
+
88
+ // No remount, no navigation: the same tree re-rendered.
89
+ expect(screen.getByText("Tableau de bord")).toBeTruthy();
90
+ expect(screen.getByText("Utilisateurs")).toBeTruthy();
91
+ expect(screen.getByText("Identité")).toBeTruthy();
92
+ expect(screen.getByText("Système")).toBeTruthy();
93
+ expect(screen.queryByText("Dashboard")).toBeNull();
94
+ expect(screen.queryByText("Identity")).toBeNull();
95
+ });
96
+
97
+ /**
98
+ * The breadcrumb trail is the only "title" the shell puts on screen, and it
99
+ * reads the same `navLabel` - including for `userDetail`, which is not a
100
+ * sidebar entry and carries a `nav` purely so its crumb has a key.
101
+ */
102
+ it("re-labels the breadcrumb trail", async () => {
103
+ await mount();
104
+
105
+ // Stand the trail up by hand: `render` does not run a navigation, so the
106
+ // layers a real route resolution would leave in the store are not there.
107
+ const pages = alepha!.inject(ReactRouter).pages;
108
+ const state = alepha!.store.get("alepha.react.router.state");
109
+ const layerFor = (name: string) => ({
110
+ name,
111
+ index: 0,
112
+ path: "/",
113
+ element: null,
114
+ route: pages.find((page) => page.name === name),
115
+ });
116
+
117
+ await act(async () => {
118
+ alepha!.store.set("alepha.react.router.state", {
119
+ ...state,
120
+ layers: [layerFor("admin"), layerFor("userDetail")],
121
+ } as any);
122
+ });
123
+
124
+ // Two matches for the root: the sidebar brand and the first crumb, both
125
+ // of which have to move.
126
+ expect(screen.getAllByText("Admin").length).toBe(2);
127
+ expect(screen.getByText("User")).toBeTruthy();
128
+
129
+ await act(async () => {
130
+ await alepha!.inject(I18nProvider).setLang("fr");
131
+ });
132
+
133
+ expect(screen.getAllByText("Administration").length).toBe(2);
134
+ expect(screen.getByText("Utilisateur")).toBeTruthy();
135
+ });
136
+
137
+ it("re-labels the shell's own chrome", async () => {
138
+ await mount();
139
+
140
+ // The brand and the ⌘K affordance, declared in the layout rather than on
141
+ // a route - the other half of "the chrome is English".
142
+ expect(screen.getByText("Admin")).toBeTruthy();
143
+ expect(screen.getByText("Search…")).toBeTruthy();
144
+
145
+ await act(async () => {
146
+ await alepha!.inject(I18nProvider).setLang("fr");
147
+ });
148
+
149
+ expect(screen.getByText("Administration")).toBeTruthy();
150
+ expect(screen.getByText("Rechercher…")).toBeTruthy();
151
+ });
152
+ });
@@ -0,0 +1,128 @@
1
+ import { render } from "@testing-library/react";
2
+ import { Alepha } from "alepha";
3
+ import type { NotificationPreviewResource } from "alepha/api/notifications";
4
+ import { AlephaContext } from "alepha/react";
5
+ import { AlephaReactI18n } from "alepha/react/i18n";
6
+ import { afterAll, beforeAll, describe, expect, it } from "vitest";
7
+
8
+ import { AdminNotificationsPreviewBody } from "../admin-notifications-preview-body.tsx";
9
+
10
+ /**
11
+ * The preview has four outcomes, three of which show nothing.
12
+ *
13
+ * They are all normal - a purged outbox row, a sensitive template, a template
14
+ * deleted from the code - and an operator has to be able to tell them apart.
15
+ * A single shared "unavailable" would make retention look like a bug, which
16
+ * is the failure these lock down.
17
+ */
18
+ describe("AdminNotificationsPreviewBody", () => {
19
+ let alepha: Alepha;
20
+
21
+ beforeAll(async () => {
22
+ alepha = Alepha.create().with(AlephaReactI18n);
23
+ await alepha.start();
24
+ });
25
+
26
+ afterAll(async () => {
27
+ await alepha.stop();
28
+ });
29
+
30
+ const mount = (preview: Partial<NotificationPreviewResource>) =>
31
+ render(
32
+ <AlephaContext.Provider value={alepha}>
33
+ <AdminNotificationsPreviewBody
34
+ preview={
35
+ {
36
+ available: false,
37
+ channel: "email",
38
+ attachments: [],
39
+ source: "live",
40
+ ...preview,
41
+ } as NotificationPreviewResource
42
+ }
43
+ />
44
+ </AlephaContext.Provider>,
45
+ );
46
+
47
+ it("explains each unavailable reason differently", () => {
48
+ const messages = (
49
+ ["outbox-purged", "sensitive", "template-missing"] as const
50
+ ).map(
51
+ (reason) =>
52
+ mount({ available: false, reason }).container.textContent ?? "",
53
+ );
54
+
55
+ for (const message of messages) {
56
+ expect(message.length).toBeGreaterThan(0);
57
+ }
58
+ expect(new Set(messages).size).toBe(3);
59
+ });
60
+
61
+ it("names retention rather than blaming the reader", () => {
62
+ const { container } = mount({
63
+ available: false,
64
+ reason: "outbox-purged",
65
+ });
66
+ expect(container.textContent).toContain("retention");
67
+ });
68
+
69
+ it("falls back to a generic sentence for a reason it does not know", () => {
70
+ // A newer server could answer with a reason this build predates. An empty
71
+ // panel would read as a broken tab.
72
+ const { container } = mount({
73
+ available: false,
74
+ reason: "something-new" as never,
75
+ });
76
+ expect(container.textContent?.trim().length).toBeGreaterThan(0);
77
+ });
78
+
79
+ it("renders an available email inside the sandboxed frame", () => {
80
+ const { container } = mount({
81
+ available: true,
82
+ channel: "email",
83
+ subject: "Welcome",
84
+ html: "<p>Hi Ada</p>",
85
+ });
86
+
87
+ const frame = container.querySelector("iframe");
88
+ expect(frame).toBeTruthy();
89
+ // The isolation is the point: an email body is untrusted HTML, and it
90
+ // must never be injected into the admin's own document.
91
+ expect(frame?.getAttribute("sandbox")).toBe("");
92
+ expect(frame?.getAttribute("srcdoc")).toContain("Hi Ada");
93
+ expect(container.textContent).toContain("Welcome");
94
+ });
95
+
96
+ it("warns that the body is re-rendered, not replayed", () => {
97
+ // Without this line the preview claims a fidelity it does not have: the
98
+ // template may have changed since the send.
99
+ const { container } = mount({
100
+ available: true,
101
+ channel: "email",
102
+ html: "<p>x</p>",
103
+ });
104
+ expect(container.textContent).toContain("Re-rendered from the template");
105
+ });
106
+
107
+ it("renders an sms as text, with no frame", () => {
108
+ const { container } = mount({
109
+ available: true,
110
+ channel: "sms",
111
+ message: "Your code is 123456",
112
+ });
113
+
114
+ expect(container.querySelector("iframe")).toBeNull();
115
+ expect(container.textContent).toContain("Your code is 123456");
116
+ });
117
+
118
+ it("lists attachment names without trying to load them", () => {
119
+ const { container } = mount({
120
+ available: true,
121
+ channel: "email",
122
+ html: "<p>x</p>",
123
+ attachments: ["invoice-2026-08.pdf"],
124
+ });
125
+
126
+ expect(container.textContent).toContain("invoice-2026-08.pdf");
127
+ });
128
+ });
@@ -0,0 +1,76 @@
1
+ import { render } from "@testing-library/react";
2
+ import { Alepha } from "alepha";
3
+ import type { NotificationDetailResource } from "alepha/api/notifications";
4
+ import { AlephaContext } from "alepha/react";
5
+ import { AlephaReactI18n } from "alepha/react/i18n";
6
+ import { afterAll, beforeAll, describe, expect, it } from "vitest";
7
+
8
+ import { AdminNotificationsRawTab } from "../admin-notifications-raw-tab.tsx";
9
+
10
+ /**
11
+ * `variables`, `rendered` and `logs` were all returned by `getNotification`
12
+ * and none of them was rendered anywhere. They are also the three fields most
13
+ * often absent, for two unrelated and entirely normal reasons: the outbox row
14
+ * is purged at 7 days while the receipt lives 90, and a `sensitive` template
15
+ * withholds its variables for good.
16
+ */
17
+ describe("AdminNotificationsRawTab", () => {
18
+ let alepha: Alepha;
19
+
20
+ beforeAll(async () => {
21
+ alepha = Alepha.create().with(AlephaReactI18n);
22
+ await alepha.start();
23
+ });
24
+
25
+ afterAll(async () => {
26
+ await alepha.stop();
27
+ });
28
+
29
+ const mount = (detail: Partial<NotificationDetailResource>) =>
30
+ render(
31
+ <AlephaContext.Provider value={alepha}>
32
+ <AdminNotificationsRawTab
33
+ detail={
34
+ {
35
+ id: "n-1",
36
+ createdAt: "2026-08-28T10:00:00.000Z",
37
+ executionId: "e-1",
38
+ status: "sent",
39
+ ...detail,
40
+ } as NotificationDetailResource
41
+ }
42
+ />
43
+ </AlephaContext.Provider>,
44
+ );
45
+
46
+ it("renders the variables it was given", () => {
47
+ const { container } = mount({ variables: { username: "Ada" } });
48
+ expect(container.textContent).toContain("username");
49
+ expect(container.textContent).toContain("Ada");
50
+ });
51
+
52
+ it("omits a rendered block that carries nothing", () => {
53
+ // `rendered` is always an object and is empty for a sensitive template.
54
+ // An empty `{}` under a heading reads as data that is not there.
55
+ const { container } = mount({ rendered: {} });
56
+ expect(container.textContent).not.toContain("Rendered");
57
+ });
58
+
59
+ it("renders the rendered block when it holds something", () => {
60
+ const { container } = mount({ rendered: { subject: "Welcome" } });
61
+ expect(container.textContent).toContain("Rendered");
62
+ expect(container.textContent).toContain("Welcome");
63
+ });
64
+
65
+ it("explains a purged outbox row rather than looking empty", () => {
66
+ const { container } = mount({ outboxAvailable: false });
67
+ expect(container.textContent).toContain("retention window");
68
+ });
69
+
70
+ it("says why there is nothing, when the outbox row is still there", () => {
71
+ // Outbox present but every field empty means the template is sensitive.
72
+ // Silence here would read as a rendering failure.
73
+ const { container } = mount({ outboxAvailable: true });
74
+ expect(container.textContent).toContain("sensitive");
75
+ });
76
+ });
@@ -0,0 +1,121 @@
1
+ import { render } from "@testing-library/react";
2
+ import { Alepha } from "alepha";
3
+ import { AlephaContext } from "alepha/react";
4
+ import { AlephaReactI18n } from "alepha/react/i18n";
5
+ import { beforeAll, describe, expect, it } from "vitest";
6
+
7
+ import { AdminNotificationsStatusBadge } from "../admin-notifications-status-badge.tsx";
8
+ import {
9
+ NOTIFICATION_STATUS_ICON,
10
+ NOTIFICATION_STATUS_TONE,
11
+ NOTIFICATION_STATUSES,
12
+ } from "../admin-notifications-status-tones.ts";
13
+
14
+ /**
15
+ * The status column used to render `job_executions.status`, which never wrote
16
+ * `sent`, `delivered` or `bounced` - so every badge fell through to the
17
+ * neutral variant and the column told an operator nothing.
18
+ *
19
+ * It then had three shadcn variants for eight statuses, which left `sent`,
20
+ * `deferred` and `skipped` identical. These assert that every status is
21
+ * distinguishable, and that the two axes carrying the distinction (tone and
22
+ * glyph) are both doing work.
23
+ */
24
+ describe("AdminNotificationsStatusBadge", () => {
25
+ /**
26
+ * The badge reads its labels through `useI18n`, which needs a container in
27
+ * context. `AlephaReactI18n` with no catalogue resolves every key to its
28
+ * English default, which is what these assertions expect.
29
+ */
30
+ let alepha: Alepha;
31
+
32
+ beforeAll(async () => {
33
+ alepha = Alepha.create().with(AlephaReactI18n);
34
+ await alepha.start();
35
+ });
36
+
37
+ const renderBadge = (status?: string) =>
38
+ render(
39
+ <AlephaContext.Provider value={alepha}>
40
+ <AdminNotificationsStatusBadge status={status} />
41
+ </AlephaContext.Provider>,
42
+ );
43
+
44
+ /**
45
+ * Asserted on `data-tone`, never on the markup: the Badge's class list
46
+ * names every tone it supports, so a substring match on `innerHTML` passes
47
+ * for all of them and proves nothing.
48
+ */
49
+ const toneOf = (status?: string): string | null => {
50
+ const { container } = renderBadge(status);
51
+ return container
52
+ .querySelector("[data-slot='badge']")
53
+ ?.getAttribute("data-tone") as string | null;
54
+ };
55
+
56
+ it("gives every status a tone", () => {
57
+ for (const status of NOTIFICATION_STATUSES) {
58
+ expect(toneOf(status)).toBeTruthy();
59
+ }
60
+ });
61
+
62
+ it("marks the states an operator has to act on as danger", () => {
63
+ for (const status of ["bounced", "complained", "failed", "rejected"]) {
64
+ expect(toneOf(status)).toBe("danger");
65
+ }
66
+ });
67
+
68
+ it("does NOT mark a skipped send as a failure", () => {
69
+ // The gate refusing to mail someone who unsubscribed is the system
70
+ // working. Colouring it like a bounce sends operators hunting for a
71
+ // problem that is not there.
72
+ expect(toneOf("skipped")).toBe("neutral");
73
+ });
74
+
75
+ it("distinguishes a confirmed delivery from a mere acceptance", () => {
76
+ expect(toneOf("delivered")).not.toBe(toneOf("sent"));
77
+ });
78
+
79
+ /**
80
+ * Four statuses share the danger tone, so colour alone cannot separate
81
+ * them. The glyph is what carries the distinction, and it is also what
82
+ * keeps the column readable in monochrome.
83
+ */
84
+ it("gives each danger status its own glyph", () => {
85
+ const glyphs = ["bounced", "complained", "failed", "rejected"].map(
86
+ (status) =>
87
+ NOTIFICATION_STATUS_ICON[
88
+ status as keyof typeof NOTIFICATION_STATUS_ICON
89
+ ],
90
+ );
91
+ expect(new Set(glyphs).size).toBe(4);
92
+ });
93
+
94
+ it("covers every status in both maps, with no extras", () => {
95
+ // A status present in one map and missing from the other renders a chip
96
+ // with no colour or no glyph, silently.
97
+ expect(Object.keys(NOTIFICATION_STATUS_TONE).sort()).toEqual(
98
+ [...NOTIFICATION_STATUSES].sort(),
99
+ );
100
+ expect(Object.keys(NOTIFICATION_STATUS_ICON).sort()).toEqual(
101
+ [...NOTIFICATION_STATUSES].sort(),
102
+ );
103
+ });
104
+
105
+ it("renders a label for the status", () => {
106
+ const { getByText } = renderBadge("delivered");
107
+ expect(getByText("Delivered")).toBeTruthy();
108
+ });
109
+
110
+ it("falls back to sent rather than rendering nothing", () => {
111
+ const { getByText } = renderBadge();
112
+ expect(getByText("Sent")).toBeTruthy();
113
+ });
114
+
115
+ it("renders an unknown status as itself rather than blank", () => {
116
+ // A transport could report a status this build does not know about.
117
+ // Showing the raw value beats showing an empty chip.
118
+ const { getByText } = renderBadge("quarantined");
119
+ expect(getByText("quarantined")).toBeTruthy();
120
+ });
121
+ });
@@ -6,6 +6,7 @@ import {
6
6
  } from "alepha/react/router";
7
7
  import { describe, expect, it } from "vitest";
8
8
 
9
+ import type { NavMeta } from "../../nav-shell/nav-tree-util.ts";
9
10
  import { AdminRouter } from "../admin-router.tsx";
10
11
 
11
12
  /**
@@ -233,6 +234,32 @@ describe("AdminRouter", () => {
233
234
  }
234
235
  });
235
236
 
237
+ /**
238
+ * A class field is evaluated once, at construction, outside React - so the
239
+ * label a page declares here can never follow a language switch on its own.
240
+ * The `labelKey` beside it is what the sidebar, breadcrumbs and palette
241
+ * resolve at render time, and a page added without one is silently
242
+ * English-only in every application.
243
+ */
244
+ it("names a catalogue key for every label and every group heading", async () => {
245
+ const alepha = Alepha.create().with(AlephaReactRouter);
246
+ alepha.inject(AdminRouter);
247
+ await alepha.start();
248
+
249
+ const navs = alepha
250
+ .primitives($page)
251
+ .map((page) => page.options.nav as NavMeta | undefined)
252
+ .filter((nav): nav is NavMeta => nav !== undefined);
253
+
254
+ expect(navs.length).toBeGreaterThan(0);
255
+ for (const nav of navs) {
256
+ expect(nav.labelKey).toMatch(/^admin\.nav\./);
257
+ if (nav.group) {
258
+ expect(nav.groupKey).toMatch(/^admin\.nav\.group\./);
259
+ }
260
+ }
261
+ });
262
+
236
263
  it("leads with an ungrouped dashboard", async () => {
237
264
  const alepha = Alepha.create().with(AlephaReactRouter);
238
265
  const router = alepha.inject(AdminRouter);
@@ -0,0 +1,152 @@
1
+ import { render } from "@testing-library/react";
2
+ import { Alepha } from "alepha";
3
+ import { jobExecutionEntity } from "alepha/api/jobs";
4
+ import { notificationQuerySchema } from "alepha/api/notifications";
5
+ import {
6
+ workflowExecutions,
7
+ workflowStepExecutions,
8
+ } from "alepha/api/workflows";
9
+ import { AlephaContext } from "alepha/react";
10
+ import { $dictionary, AlephaReactI18n, I18nProvider } from "alepha/react/i18n";
11
+ import { describe, expect, it } from "vitest";
12
+
13
+ import { uiFr } from "../../../lib/i18n-fr.ts";
14
+ import {
15
+ JOB_EXECUTION_STATUSES,
16
+ useJobStatusLabels,
17
+ } from "../admin-jobs-status-labels.ts";
18
+ import { useNotificationStatusLabels } from "../admin-notifications-status-labels.ts";
19
+ import { NOTIFICATION_STATUSES } from "../admin-notifications-status-tones.ts";
20
+ import {
21
+ useWorkflowStatusLabels,
22
+ WORKFLOW_EXECUTION_STATUSES,
23
+ } from "../admin-workflows-status-labels.ts";
24
+
25
+ /**
26
+ * The status vocabularies are the one place where a translation can go
27
+ * missing without anything noticing.
28
+ *
29
+ * They used to be looked up with `tr(\`admin.jobs.status.${status}\`)`, a
30
+ * computed key: `i18n-fr.spec.ts` matches a literal after `tr(`, so those
31
+ * keys were invisible to it in BOTH directions - nothing reported them as
32
+ * untranslated, and adding the French would have been reported as a
33
+ * translation nothing asks for. French users read `ok`, `error`,
34
+ * `compensation_failed` raw.
35
+ *
36
+ * With the keys literal the catalogue check covers them again. What it still
37
+ * cannot see is a status added to the entity enum and forgotten here, which
38
+ * is what the first two cases below are for.
39
+ */
40
+ const statusesOf = (entity: { schema: any }): string[] =>
41
+ entity.schema.shape.status.options;
42
+
43
+ describe("admin status labels", () => {
44
+ /**
45
+ * Render the hook and read its record back out of the DOM.
46
+ *
47
+ * Through the DOM rather than a captured variable: assigning to an outer
48
+ * binding during render is a side effect, and the lint rule that says so is
49
+ * right - the point here is what the component actually rendered.
50
+ */
51
+ const renderWith = async (
52
+ useLabels: () => Record<string, string>,
53
+ lang: string,
54
+ ): Promise<Record<string, string>> => {
55
+ const Probe = () => (
56
+ <div data-testid="labels">{JSON.stringify(useLabels())}</div>
57
+ );
58
+
59
+ class Catalogues {
60
+ en = $dictionary({ lazy: async () => ({ default: {} }) });
61
+ fr = $dictionary({ lazy: async () => ({ default: uiFr }) });
62
+ }
63
+
64
+ const alepha = Alepha.create().with(AlephaReactI18n);
65
+ alepha.inject(Catalogues);
66
+ await alepha.start();
67
+ await alepha.inject(I18nProvider).setLang(lang);
68
+
69
+ const ui = render(
70
+ <AlephaContext.Provider value={alepha}>
71
+ <Probe />
72
+ </AlephaContext.Provider>,
73
+ );
74
+ const labels = JSON.parse(ui.getByTestId("labels").textContent ?? "{}");
75
+ await alepha.stop();
76
+ return labels;
77
+ };
78
+
79
+ it("offers every job status the entity can hold", () => {
80
+ expect(JOB_EXECUTION_STATUSES).toEqual(statusesOf(jobExecutionEntity));
81
+ });
82
+
83
+ /**
84
+ * Compared against the query schema rather than the entity: the
85
+ * notifications module's browser entry exports its schemas only, so the
86
+ * entity is not reachable from here at all. `statusFilter.spec.ts` holds
87
+ * that query schema equal to the entity, which closes the chain.
88
+ */
89
+ const deliveryStatuses = (): string[] =>
90
+ (notificationQuerySchema.shape.status as any).unwrap().options;
91
+
92
+ it("offers every delivery status the receipt can hold", () => {
93
+ // Order differs on purpose - the filter lists the happy path first - so
94
+ // compare the sets, not the sequences.
95
+ expect([...NOTIFICATION_STATUSES].sort()).toEqual(
96
+ deliveryStatuses().sort(),
97
+ );
98
+ });
99
+
100
+ it("translates every delivery status into French", async () => {
101
+ const labels = await renderWith(useNotificationStatusLabels, "fr");
102
+
103
+ for (const status of deliveryStatuses()) {
104
+ const label = labels[status as keyof typeof labels];
105
+ expect(label).toBeTruthy();
106
+ expect(label).not.toBe(status);
107
+ }
108
+ expect(labels.skipped).toBe("Ignorée");
109
+ });
110
+
111
+ it("offers every workflow EXECUTION status, and no step-only one", () => {
112
+ expect(WORKFLOW_EXECUTION_STATUSES).toEqual(statusesOf(workflowExecutions));
113
+ // `skipped` is a step status: offering it as an execution filter would be
114
+ // a value the query can never match.
115
+ expect(WORKFLOW_EXECUTION_STATUSES).not.toContain("skipped");
116
+ });
117
+
118
+ it("translates every job status into French", async () => {
119
+ const labels = await renderWith(useJobStatusLabels, "fr");
120
+
121
+ for (const status of statusesOf(jobExecutionEntity)) {
122
+ const label = labels[status as keyof typeof labels];
123
+ expect(label).toBeTruthy();
124
+ // The failure this exists for: a missing key falls back to the raw
125
+ // status, which reads as a value rather than as a missing translation.
126
+ expect(label).not.toBe(status);
127
+ }
128
+ expect(labels.ok).toBe("Réussie");
129
+ });
130
+
131
+ it("translates both workflow vocabularies into French", async () => {
132
+ const labels = await renderWith(useWorkflowStatusLabels, "fr");
133
+
134
+ // The badge takes either an execution or a step status, so the labels
135
+ // have to span the union - the two enums differ on `timed_out`/`skipped`.
136
+ const union = new Set([
137
+ ...statusesOf(workflowExecutions),
138
+ ...statusesOf(workflowStepExecutions),
139
+ ]);
140
+ for (const status of union) {
141
+ expect(labels[status]).toBeTruthy();
142
+ expect(labels[status]).not.toBe(status);
143
+ }
144
+ expect(labels.compensation_failed).toBe("Échec de la compensation");
145
+ });
146
+
147
+ it("falls back to the English default when no catalogue defines the key", async () => {
148
+ const labels = await renderWith(useJobStatusLabels, "en");
149
+ expect(labels.ok).toBe("Succeeded");
150
+ expect(labels.error).toBe("Failed");
151
+ });
152
+ });