@endora-commerce/admin-shell 0.0.0-stage → 0.100.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (428) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +49 -2
  3. package/dist/AdminRoot.d.ts +45 -0
  4. package/dist/AdminRoot.d.ts.map +1 -0
  5. package/dist/AdminRoot.js +39 -0
  6. package/dist/AdminRoot.js.map +1 -0
  7. package/dist/App.d.ts +42 -0
  8. package/dist/App.d.ts.map +1 -0
  9. package/dist/App.js +94 -0
  10. package/dist/App.js.map +1 -0
  11. package/dist/components/AppShell.d.ts +5 -0
  12. package/dist/components/AppShell.d.ts.map +1 -0
  13. package/dist/components/AppShell.js +1259 -0
  14. package/dist/components/AppShell.js.map +1 -0
  15. package/dist/components/BrandLogo.d.ts +21 -0
  16. package/dist/components/BrandLogo.d.ts.map +1 -0
  17. package/dist/components/BrandLogo.js +21 -0
  18. package/dist/components/BrandLogo.js.map +1 -0
  19. package/dist/components/FederatedSignIn.d.ts +42 -0
  20. package/dist/components/FederatedSignIn.d.ts.map +1 -0
  21. package/dist/components/FederatedSignIn.js +56 -0
  22. package/dist/components/FederatedSignIn.js.map +1 -0
  23. package/dist/components/FileDropzone.d.ts +17 -0
  24. package/dist/components/FileDropzone.d.ts.map +1 -0
  25. package/dist/components/FileDropzone.js +17 -0
  26. package/dist/components/FileDropzone.js.map +1 -0
  27. package/dist/components/IdleLogout.d.ts +2 -0
  28. package/dist/components/IdleLogout.d.ts.map +1 -0
  29. package/dist/components/IdleLogout.js +90 -0
  30. package/dist/components/IdleLogout.js.map +1 -0
  31. package/dist/components/ImpersonationBanner.d.ts +13 -0
  32. package/dist/components/ImpersonationBanner.d.ts.map +1 -0
  33. package/dist/components/ImpersonationBanner.js +10 -0
  34. package/dist/components/ImpersonationBanner.js.map +1 -0
  35. package/dist/components/LanguagePicker.d.ts +3 -0
  36. package/dist/components/LanguagePicker.d.ts.map +1 -0
  37. package/dist/components/LanguagePicker.js +127 -0
  38. package/dist/components/LanguagePicker.js.map +1 -0
  39. package/dist/components/LoginPage.d.ts +11 -0
  40. package/dist/components/LoginPage.d.ts.map +1 -0
  41. package/dist/components/LoginPage.js +44 -0
  42. package/dist/components/LoginPage.js.map +1 -0
  43. package/dist/components/PaginationFooter.d.ts +18 -0
  44. package/dist/components/PaginationFooter.d.ts.map +1 -0
  45. package/dist/components/PaginationFooter.js +17 -0
  46. package/dist/components/PaginationFooter.js.map +1 -0
  47. package/dist/components/ResponsiveTable.d.ts +18 -0
  48. package/dist/components/ResponsiveTable.d.ts.map +1 -0
  49. package/dist/components/ResponsiveTable.js +17 -0
  50. package/dist/components/ResponsiveTable.js.map +1 -0
  51. package/dist/components/RowActionMenu.d.ts +18 -0
  52. package/dist/components/RowActionMenu.d.ts.map +1 -0
  53. package/dist/components/RowActionMenu.js +17 -0
  54. package/dist/components/RowActionMenu.js.map +1 -0
  55. package/dist/components/SpeechToTextButton.d.ts +14 -0
  56. package/dist/components/SpeechToTextButton.d.ts.map +1 -0
  57. package/dist/components/SpeechToTextButton.js +19 -0
  58. package/dist/components/SpeechToTextButton.js.map +1 -0
  59. package/dist/components/StickyFormActions.d.ts +18 -0
  60. package/dist/components/StickyFormActions.d.ts.map +1 -0
  61. package/dist/components/StickyFormActions.js +17 -0
  62. package/dist/components/StickyFormActions.js.map +1 -0
  63. package/dist/components/TouchReorderButtons.d.ts +18 -0
  64. package/dist/components/TouchReorderButtons.d.ts.map +1 -0
  65. package/dist/components/TouchReorderButtons.js +17 -0
  66. package/dist/components/TouchReorderButtons.js.map +1 -0
  67. package/dist/components/admin-user-picker/AdminUserPicker.d.ts +18 -0
  68. package/dist/components/admin-user-picker/AdminUserPicker.d.ts.map +1 -0
  69. package/dist/components/admin-user-picker/AdminUserPicker.js +17 -0
  70. package/dist/components/admin-user-picker/AdminUserPicker.js.map +1 -0
  71. package/dist/components/asset-picker/AssetFieldPicker.d.ts +21 -0
  72. package/dist/components/asset-picker/AssetFieldPicker.d.ts.map +1 -0
  73. package/dist/components/asset-picker/AssetFieldPicker.js +20 -0
  74. package/dist/components/asset-picker/AssetFieldPicker.js.map +1 -0
  75. package/dist/components/category-picker/CategorySelect.d.ts +18 -0
  76. package/dist/components/category-picker/CategorySelect.d.ts.map +1 -0
  77. package/dist/components/category-picker/CategorySelect.js +17 -0
  78. package/dist/components/category-picker/CategorySelect.js.map +1 -0
  79. package/dist/components/category-tree-picker/CategoryTreePicker.d.ts +18 -0
  80. package/dist/components/category-tree-picker/CategoryTreePicker.d.ts.map +1 -0
  81. package/dist/components/category-tree-picker/CategoryTreePicker.js +17 -0
  82. package/dist/components/category-tree-picker/CategoryTreePicker.js.map +1 -0
  83. package/dist/components/category-tree-picker/category-tree-utils.d.ts +18 -0
  84. package/dist/components/category-tree-picker/category-tree-utils.d.ts.map +1 -0
  85. package/dist/components/category-tree-picker/category-tree-utils.js +17 -0
  86. package/dist/components/category-tree-picker/category-tree-utils.js.map +1 -0
  87. package/dist/components/category-tree-picker/index.d.ts +18 -0
  88. package/dist/components/category-tree-picker/index.d.ts.map +1 -0
  89. package/dist/components/category-tree-picker/index.js +17 -0
  90. package/dist/components/category-tree-picker/index.js.map +1 -0
  91. package/dist/components/charts/echart.d.ts +18 -0
  92. package/dist/components/charts/echart.d.ts.map +1 -0
  93. package/dist/components/charts/echart.js +17 -0
  94. package/dist/components/charts/echart.js.map +1 -0
  95. package/dist/components/cms-picker/CmsBlockPicker.d.ts +19 -0
  96. package/dist/components/cms-picker/CmsBlockPicker.d.ts.map +1 -0
  97. package/dist/components/cms-picker/CmsBlockPicker.js +18 -0
  98. package/dist/components/cms-picker/CmsBlockPicker.js.map +1 -0
  99. package/dist/components/cms-picker/CmsPagePicker.d.ts +19 -0
  100. package/dist/components/cms-picker/CmsPagePicker.d.ts.map +1 -0
  101. package/dist/components/cms-picker/CmsPagePicker.js +18 -0
  102. package/dist/components/cms-picker/CmsPagePicker.js.map +1 -0
  103. package/dist/components/country-select/index.d.ts +18 -0
  104. package/dist/components/country-select/index.d.ts.map +1 -0
  105. package/dist/components/country-select/index.js +17 -0
  106. package/dist/components/country-select/index.js.map +1 -0
  107. package/dist/components/customer-group-picker/CustomerGroupPicker.d.ts +18 -0
  108. package/dist/components/customer-group-picker/CustomerGroupPicker.d.ts.map +1 -0
  109. package/dist/components/customer-group-picker/CustomerGroupPicker.js +17 -0
  110. package/dist/components/customer-group-picker/CustomerGroupPicker.js.map +1 -0
  111. package/dist/components/customer-picker/CustomerPicker.d.ts +18 -0
  112. package/dist/components/customer-picker/CustomerPicker.d.ts.map +1 -0
  113. package/dist/components/customer-picker/CustomerPicker.js +17 -0
  114. package/dist/components/customer-picker/CustomerPicker.js.map +1 -0
  115. package/dist/components/hooks/useFocusTrap.d.ts +17 -0
  116. package/dist/components/hooks/useFocusTrap.d.ts.map +1 -0
  117. package/dist/components/hooks/useFocusTrap.js +17 -0
  118. package/dist/components/hooks/useFocusTrap.js.map +1 -0
  119. package/dist/components/hooks/useSpeechToText.d.ts +15 -0
  120. package/dist/components/hooks/useSpeechToText.d.ts.map +1 -0
  121. package/dist/components/hooks/useSpeechToText.js +63 -0
  122. package/dist/components/hooks/useSpeechToText.js.map +1 -0
  123. package/dist/components/hooks/useViewportTier.d.ts +18 -0
  124. package/dist/components/hooks/useViewportTier.d.ts.map +1 -0
  125. package/dist/components/hooks/useViewportTier.js +17 -0
  126. package/dist/components/hooks/useViewportTier.js.map +1 -0
  127. package/dist/components/notifications/NotificationBell.d.ts +13 -0
  128. package/dist/components/notifications/NotificationBell.d.ts.map +1 -0
  129. package/dist/components/notifications/NotificationBell.js +154 -0
  130. package/dist/components/notifications/NotificationBell.js.map +1 -0
  131. package/dist/components/notifications/index.d.ts +3 -0
  132. package/dist/components/notifications/index.d.ts.map +1 -0
  133. package/dist/components/notifications/index.js +3 -0
  134. package/dist/components/notifications/index.js.map +1 -0
  135. package/dist/components/notifications/useAdminNotifications.d.ts +41 -0
  136. package/dist/components/notifications/useAdminNotifications.d.ts.map +1 -0
  137. package/dist/components/notifications/useAdminNotifications.js +86 -0
  138. package/dist/components/notifications/useAdminNotifications.js.map +1 -0
  139. package/dist/components/organization-picker/OrganizationPicker.d.ts +19 -0
  140. package/dist/components/organization-picker/OrganizationPicker.d.ts.map +1 -0
  141. package/dist/components/organization-picker/OrganizationPicker.js +18 -0
  142. package/dist/components/organization-picker/OrganizationPicker.js.map +1 -0
  143. package/dist/components/organization-picker/OrganizationPickerMulti.d.ts +19 -0
  144. package/dist/components/organization-picker/OrganizationPickerMulti.d.ts.map +1 -0
  145. package/dist/components/organization-picker/OrganizationPickerMulti.js +18 -0
  146. package/dist/components/organization-picker/OrganizationPickerMulti.js.map +1 -0
  147. package/dist/components/organization-picker/OrganizationStatusBadge.d.ts +19 -0
  148. package/dist/components/organization-picker/OrganizationStatusBadge.d.ts.map +1 -0
  149. package/dist/components/organization-picker/OrganizationStatusBadge.js +18 -0
  150. package/dist/components/organization-picker/OrganizationStatusBadge.js.map +1 -0
  151. package/dist/components/organization-picker/index.d.ts +19 -0
  152. package/dist/components/organization-picker/index.d.ts.map +1 -0
  153. package/dist/components/organization-picker/index.js +18 -0
  154. package/dist/components/organization-picker/index.js.map +1 -0
  155. package/dist/components/organization-picker/useOrganizationsQuery.d.ts +19 -0
  156. package/dist/components/organization-picker/useOrganizationsQuery.d.ts.map +1 -0
  157. package/dist/components/organization-picker/useOrganizationsQuery.js +18 -0
  158. package/dist/components/organization-picker/useOrganizationsQuery.js.map +1 -0
  159. package/dist/components/payment-method-availability/MethodAvailabilityCell.d.ts +17 -0
  160. package/dist/components/payment-method-availability/MethodAvailabilityCell.d.ts.map +1 -0
  161. package/dist/components/payment-method-availability/MethodAvailabilityCell.js +17 -0
  162. package/dist/components/payment-method-availability/MethodAvailabilityCell.js.map +1 -0
  163. package/dist/components/prompt-actions/PromptModePanel.d.ts +24 -0
  164. package/dist/components/prompt-actions/PromptModePanel.d.ts.map +1 -0
  165. package/dist/components/prompt-actions/PromptModePanel.js +115 -0
  166. package/dist/components/prompt-actions/PromptModePanel.js.map +1 -0
  167. package/dist/components/prompt-actions/PromptPlanPreview.d.ts +20 -0
  168. package/dist/components/prompt-actions/PromptPlanPreview.d.ts.map +1 -0
  169. package/dist/components/prompt-actions/PromptPlanPreview.js +12 -0
  170. package/dist/components/prompt-actions/PromptPlanPreview.js.map +1 -0
  171. package/dist/components/reorder/ReorderAnnouncer.d.ts +18 -0
  172. package/dist/components/reorder/ReorderAnnouncer.d.ts.map +1 -0
  173. package/dist/components/reorder/ReorderAnnouncer.js +17 -0
  174. package/dist/components/reorder/ReorderAnnouncer.js.map +1 -0
  175. package/dist/components/reorder/useReorderList.d.ts +18 -0
  176. package/dist/components/reorder/useReorderList.d.ts.map +1 -0
  177. package/dist/components/reorder/useReorderList.js +17 -0
  178. package/dist/components/reorder/useReorderList.js.map +1 -0
  179. package/dist/components/rule-builder/RuleBuilder.d.ts +18 -0
  180. package/dist/components/rule-builder/RuleBuilder.d.ts.map +1 -0
  181. package/dist/components/rule-builder/RuleBuilder.js +17 -0
  182. package/dist/components/rule-builder/RuleBuilder.js.map +1 -0
  183. package/dist/components/sales-channel-picker/SalesChannelPicker.d.ts +19 -0
  184. package/dist/components/sales-channel-picker/SalesChannelPicker.d.ts.map +1 -0
  185. package/dist/components/sales-channel-picker/SalesChannelPicker.js +18 -0
  186. package/dist/components/sales-channel-picker/SalesChannelPicker.js.map +1 -0
  187. package/dist/components/scope-notice/ScopeNotice.d.ts +18 -0
  188. package/dist/components/scope-notice/ScopeNotice.d.ts.map +1 -0
  189. package/dist/components/scope-notice/ScopeNotice.js +17 -0
  190. package/dist/components/scope-notice/ScopeNotice.js.map +1 -0
  191. package/dist/components/ui/alert.d.ts +18 -0
  192. package/dist/components/ui/alert.d.ts.map +1 -0
  193. package/dist/components/ui/alert.js +17 -0
  194. package/dist/components/ui/alert.js.map +1 -0
  195. package/dist/components/ui/badge.d.ts +18 -0
  196. package/dist/components/ui/badge.d.ts.map +1 -0
  197. package/dist/components/ui/badge.js +17 -0
  198. package/dist/components/ui/badge.js.map +1 -0
  199. package/dist/components/ui/button.d.ts +18 -0
  200. package/dist/components/ui/button.d.ts.map +1 -0
  201. package/dist/components/ui/button.js +17 -0
  202. package/dist/components/ui/button.js.map +1 -0
  203. package/dist/components/ui/card.d.ts +17 -0
  204. package/dist/components/ui/card.d.ts.map +1 -0
  205. package/dist/components/ui/card.js +17 -0
  206. package/dist/components/ui/card.js.map +1 -0
  207. package/dist/components/ui/checkbox.d.ts +17 -0
  208. package/dist/components/ui/checkbox.d.ts.map +1 -0
  209. package/dist/components/ui/checkbox.js +17 -0
  210. package/dist/components/ui/checkbox.js.map +1 -0
  211. package/dist/components/ui/collapsible.d.ts +5 -0
  212. package/dist/components/ui/collapsible.d.ts.map +1 -0
  213. package/dist/components/ui/collapsible.js +5 -0
  214. package/dist/components/ui/collapsible.js.map +1 -0
  215. package/dist/components/ui/color-picker.d.ts +17 -0
  216. package/dist/components/ui/color-picker.d.ts.map +1 -0
  217. package/dist/components/ui/color-picker.js +17 -0
  218. package/dist/components/ui/color-picker.js.map +1 -0
  219. package/dist/components/ui/combobox.d.ts +18 -0
  220. package/dist/components/ui/combobox.d.ts.map +1 -0
  221. package/dist/components/ui/combobox.js +17 -0
  222. package/dist/components/ui/combobox.js.map +1 -0
  223. package/dist/components/ui/input.d.ts +17 -0
  224. package/dist/components/ui/input.d.ts.map +1 -0
  225. package/dist/components/ui/input.js +17 -0
  226. package/dist/components/ui/input.js.map +1 -0
  227. package/dist/components/ui/label.d.ts +17 -0
  228. package/dist/components/ui/label.d.ts.map +1 -0
  229. package/dist/components/ui/label.js +17 -0
  230. package/dist/components/ui/label.js.map +1 -0
  231. package/dist/components/ui/multi-select.d.ts +18 -0
  232. package/dist/components/ui/multi-select.d.ts.map +1 -0
  233. package/dist/components/ui/multi-select.js +17 -0
  234. package/dist/components/ui/multi-select.js.map +1 -0
  235. package/dist/components/ui/page-header.d.ts +18 -0
  236. package/dist/components/ui/page-header.d.ts.map +1 -0
  237. package/dist/components/ui/page-header.js +17 -0
  238. package/dist/components/ui/page-header.js.map +1 -0
  239. package/dist/components/ui/route-tabs.d.ts +18 -0
  240. package/dist/components/ui/route-tabs.d.ts.map +1 -0
  241. package/dist/components/ui/route-tabs.js +17 -0
  242. package/dist/components/ui/route-tabs.js.map +1 -0
  243. package/dist/components/ui/save-button-group.d.ts +18 -0
  244. package/dist/components/ui/save-button-group.d.ts.map +1 -0
  245. package/dist/components/ui/save-button-group.js +17 -0
  246. package/dist/components/ui/save-button-group.js.map +1 -0
  247. package/dist/components/ui/select.d.ts +17 -0
  248. package/dist/components/ui/select.d.ts.map +1 -0
  249. package/dist/components/ui/select.js +17 -0
  250. package/dist/components/ui/select.js.map +1 -0
  251. package/dist/components/ui/separator.d.ts +17 -0
  252. package/dist/components/ui/separator.d.ts.map +1 -0
  253. package/dist/components/ui/separator.js +17 -0
  254. package/dist/components/ui/separator.js.map +1 -0
  255. package/dist/components/ui/table.d.ts +17 -0
  256. package/dist/components/ui/table.d.ts.map +1 -0
  257. package/dist/components/ui/table.js +17 -0
  258. package/dist/components/ui/table.js.map +1 -0
  259. package/dist/components/ui/textarea.d.ts +17 -0
  260. package/dist/components/ui/textarea.d.ts.map +1 -0
  261. package/dist/components/ui/textarea.js +17 -0
  262. package/dist/components/ui/textarea.js.map +1 -0
  263. package/dist/i18n/TranslationProvider.d.ts +18 -0
  264. package/dist/i18n/TranslationProvider.d.ts.map +1 -0
  265. package/dist/i18n/TranslationProvider.js +17 -0
  266. package/dist/i18n/TranslationProvider.js.map +1 -0
  267. package/dist/i18n/app-language-context.d.ts +18 -0
  268. package/dist/i18n/app-language-context.d.ts.map +1 -0
  269. package/dist/i18n/app-language-context.js +17 -0
  270. package/dist/i18n/app-language-context.js.map +1 -0
  271. package/dist/i18n/interpolate.d.ts +17 -0
  272. package/dist/i18n/interpolate.d.ts.map +1 -0
  273. package/dist/i18n/interpolate.js +17 -0
  274. package/dist/i18n/interpolate.js.map +1 -0
  275. package/dist/i18n/language-storage.d.ts +17 -0
  276. package/dist/i18n/language-storage.d.ts.map +1 -0
  277. package/dist/i18n/language-storage.js +17 -0
  278. package/dist/i18n/language-storage.js.map +1 -0
  279. package/dist/i18n/preauth-login-copy.d.ts +36 -0
  280. package/dist/i18n/preauth-login-copy.d.ts.map +1 -0
  281. package/dist/i18n/preauth-login-copy.js +36 -0
  282. package/dist/i18n/preauth-login-copy.js.map +1 -0
  283. package/dist/i18n/resolver.d.ts +18 -0
  284. package/dist/i18n/resolver.d.ts.map +1 -0
  285. package/dist/i18n/resolver.js +17 -0
  286. package/dist/i18n/resolver.js.map +1 -0
  287. package/dist/i18n/types.d.ts +17 -0
  288. package/dist/i18n/types.d.ts.map +1 -0
  289. package/dist/i18n/types.js +2 -0
  290. package/dist/i18n/types.js.map +1 -0
  291. package/dist/i18n/useTranslation.d.ts +17 -0
  292. package/dist/i18n/useTranslation.d.ts.map +1 -0
  293. package/dist/i18n/useTranslation.js +17 -0
  294. package/dist/i18n/useTranslation.js.map +1 -0
  295. package/dist/index.d.ts +55 -0
  296. package/dist/index.d.ts.map +1 -0
  297. package/dist/index.js +51 -0
  298. package/dist/index.js.map +1 -0
  299. package/dist/lib/admin-actions/AdminActionsProvider.d.ts +29 -0
  300. package/dist/lib/admin-actions/AdminActionsProvider.d.ts.map +1 -0
  301. package/dist/lib/admin-actions/AdminActionsProvider.js +51 -0
  302. package/dist/lib/admin-actions/AdminActionsProvider.js.map +1 -0
  303. package/dist/lib/admin-actions/api.d.ts +10 -0
  304. package/dist/lib/admin-actions/api.d.ts.map +1 -0
  305. package/dist/lib/admin-actions/api.js +13 -0
  306. package/dist/lib/admin-actions/api.js.map +1 -0
  307. package/dist/lib/admin-actions/icon-map.d.ts +17 -0
  308. package/dist/lib/admin-actions/icon-map.d.ts.map +1 -0
  309. package/dist/lib/admin-actions/icon-map.js +17 -0
  310. package/dist/lib/admin-actions/icon-map.js.map +1 -0
  311. package/dist/lib/admin-actions/useAdminActions.d.ts +17 -0
  312. package/dist/lib/admin-actions/useAdminActions.d.ts.map +1 -0
  313. package/dist/lib/admin-actions/useAdminActions.js +34 -0
  314. package/dist/lib/admin-actions/useAdminActions.js.map +1 -0
  315. package/dist/lib/api-client.d.ts +17 -0
  316. package/dist/lib/api-client.d.ts.map +1 -0
  317. package/dist/lib/api-client.js +17 -0
  318. package/dist/lib/api-client.js.map +1 -0
  319. package/dist/lib/auth.d.ts +18 -0
  320. package/dist/lib/auth.d.ts.map +1 -0
  321. package/dist/lib/auth.js +17 -0
  322. package/dist/lib/auth.js.map +1 -0
  323. package/dist/lib/federated-sign-in/api.d.ts +4 -0
  324. package/dist/lib/federated-sign-in/api.d.ts.map +1 -0
  325. package/dist/lib/federated-sign-in/api.js +38 -0
  326. package/dist/lib/federated-sign-in/api.js.map +1 -0
  327. package/dist/lib/federated-sign-in/index.d.ts +4 -0
  328. package/dist/lib/federated-sign-in/index.d.ts.map +1 -0
  329. package/dist/lib/federated-sign-in/index.js +4 -0
  330. package/dist/lib/federated-sign-in/index.js.map +1 -0
  331. package/dist/lib/federated-sign-in/resolve.d.ts +47 -0
  332. package/dist/lib/federated-sign-in/resolve.d.ts.map +1 -0
  333. package/dist/lib/federated-sign-in/resolve.js +24 -0
  334. package/dist/lib/federated-sign-in/resolve.js.map +1 -0
  335. package/dist/lib/federated-sign-in/useFederatedSignIn.d.ts +15 -0
  336. package/dist/lib/federated-sign-in/useFederatedSignIn.d.ts.map +1 -0
  337. package/dist/lib/federated-sign-in/useFederatedSignIn.js +37 -0
  338. package/dist/lib/federated-sign-in/useFederatedSignIn.js.map +1 -0
  339. package/dist/lib/format.d.ts +17 -0
  340. package/dist/lib/format.d.ts.map +1 -0
  341. package/dist/lib/format.js +17 -0
  342. package/dist/lib/format.js.map +1 -0
  343. package/dist/lib/module-presence/index.d.ts +19 -0
  344. package/dist/lib/module-presence/index.d.ts.map +1 -0
  345. package/dist/lib/module-presence/index.js +18 -0
  346. package/dist/lib/module-presence/index.js.map +1 -0
  347. package/dist/lib/module-registry/index.d.ts +84 -0
  348. package/dist/lib/module-registry/index.d.ts.map +1 -0
  349. package/dist/lib/module-registry/index.js +104 -0
  350. package/dist/lib/module-registry/index.js.map +1 -0
  351. package/dist/lib/money.d.ts +17 -0
  352. package/dist/lib/money.d.ts.map +1 -0
  353. package/dist/lib/money.js +17 -0
  354. package/dist/lib/money.js.map +1 -0
  355. package/dist/lib/prompt-actions/api.d.ts +10 -0
  356. package/dist/lib/prompt-actions/api.d.ts.map +1 -0
  357. package/dist/lib/prompt-actions/api.js +41 -0
  358. package/dist/lib/prompt-actions/api.js.map +1 -0
  359. package/dist/lib/prompt-actions/usePromptRequest.d.ts +26 -0
  360. package/dist/lib/prompt-actions/usePromptRequest.d.ts.map +1 -0
  361. package/dist/lib/prompt-actions/usePromptRequest.js +113 -0
  362. package/dist/lib/prompt-actions/usePromptRequest.js.map +1 -0
  363. package/dist/lib/surface-visibility.d.ts +15 -0
  364. package/dist/lib/surface-visibility.d.ts.map +1 -0
  365. package/dist/lib/surface-visibility.js +14 -0
  366. package/dist/lib/surface-visibility.js.map +1 -0
  367. package/dist/lib/text-normalization.d.ts +17 -0
  368. package/dist/lib/text-normalization.d.ts.map +1 -0
  369. package/dist/lib/text-normalization.js +17 -0
  370. package/dist/lib/text-normalization.js.map +1 -0
  371. package/dist/lib/use-page-size-preference.d.ts +16 -0
  372. package/dist/lib/use-page-size-preference.d.ts.map +1 -0
  373. package/dist/lib/use-page-size-preference.js +15 -0
  374. package/dist/lib/use-page-size-preference.js.map +1 -0
  375. package/dist/lib/use-unsaved-changes-prompt.d.ts +17 -0
  376. package/dist/lib/use-unsaved-changes-prompt.d.ts.map +1 -0
  377. package/dist/lib/use-unsaved-changes-prompt.js +17 -0
  378. package/dist/lib/use-unsaved-changes-prompt.js.map +1 -0
  379. package/dist/lib/utils.d.ts +17 -0
  380. package/dist/lib/utils.d.ts.map +1 -0
  381. package/dist/lib/utils.js +17 -0
  382. package/dist/lib/utils.js.map +1 -0
  383. package/dist/lib/uuid.d.ts +17 -0
  384. package/dist/lib/uuid.d.ts.map +1 -0
  385. package/dist/lib/uuid.js +17 -0
  386. package/dist/lib/uuid.js.map +1 -0
  387. package/dist/modules/home/HomePage.d.ts +3 -0
  388. package/dist/modules/home/HomePage.d.ts.map +1 -0
  389. package/dist/modules/home/HomePage.js +137 -0
  390. package/dist/modules/home/HomePage.js.map +1 -0
  391. package/dist/modules/home/RecentActivityCard.d.ts +3 -0
  392. package/dist/modules/home/RecentActivityCard.d.ts.map +1 -0
  393. package/dist/modules/home/RecentActivityCard.js +94 -0
  394. package/dist/modules/home/RecentActivityCard.js.map +1 -0
  395. package/dist/modules/home/activity-render.d.ts +69 -0
  396. package/dist/modules/home/activity-render.d.ts.map +1 -0
  397. package/dist/modules/home/activity-render.js +53 -0
  398. package/dist/modules/home/activity-render.js.map +1 -0
  399. package/dist/modules/home/useRecentActivity.d.ts +41 -0
  400. package/dist/modules/home/useRecentActivity.d.ts.map +1 -0
  401. package/dist/modules/home/useRecentActivity.js +57 -0
  402. package/dist/modules/home/useRecentActivity.js.map +1 -0
  403. package/dist/modules/platform/ModuleActivationControl.d.ts +28 -0
  404. package/dist/modules/platform/ModuleActivationControl.d.ts.map +1 -0
  405. package/dist/modules/platform/ModuleActivationControl.js +88 -0
  406. package/dist/modules/platform/ModuleActivationControl.js.map +1 -0
  407. package/dist/modules/platform/ModulesPage.d.ts +76 -0
  408. package/dist/modules/platform/ModulesPage.d.ts.map +1 -0
  409. package/dist/modules/platform/ModulesPage.js +175 -0
  410. package/dist/modules/platform/ModulesPage.js.map +1 -0
  411. package/dist/modules/platform/RecentActivityVisibilityControl.d.ts +38 -0
  412. package/dist/modules/platform/RecentActivityVisibilityControl.d.ts.map +1 -0
  413. package/dist/modules/platform/RecentActivityVisibilityControl.js +26 -0
  414. package/dist/modules/platform/RecentActivityVisibilityControl.js.map +1 -0
  415. package/dist/modules/platform/api.d.ts +27 -0
  416. package/dist/modules/platform/api.d.ts.map +1 -0
  417. package/dist/modules/platform/api.js +33 -0
  418. package/dist/modules/platform/api.js.map +1 -0
  419. package/dist/modules/profile/ProfilePage.d.ts +11 -0
  420. package/dist/modules/profile/ProfilePage.d.ts.map +1 -0
  421. package/dist/modules/profile/ProfilePage.js +140 -0
  422. package/dist/modules/profile/ProfilePage.js.map +1 -0
  423. package/dist/registerSw.d.ts +7 -0
  424. package/dist/registerSw.d.ts.map +1 -0
  425. package/dist/registerSw.js +20 -0
  426. package/dist/registerSw.js.map +1 -0
  427. package/package.json +74 -3
  428. package/tailwind.css +14 -0
@@ -0,0 +1,28 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { ModulePresence } from '@endora-commerce/contracts';
3
+ /**
4
+ * A module's one activation control — Constitution XVII, relocated by D-36.
5
+ *
6
+ * It used to render on the Settings screen. That put the control that switches
7
+ * modules on and off inside a module, so switching Settings off took the
8
+ * control that would switch it back on with it. The three binding requirements
9
+ * are unchanged — exactly one control per module, declared by the owning
10
+ * module's manifest, reachable without CLI access — and only the surface moved.
11
+ *
12
+ * The write goes to `POST /admin/modules/:id/activation`, whose audited Command
13
+ * is the only door: the ordinary settings write path refuses activation codes.
14
+ * No optimistic update — the flip is re-read from the server's projection, so
15
+ * what the operator sees is what the platform resolved rather than what this
16
+ * component assumed.
17
+ */
18
+ interface Props {
19
+ moduleId: string;
20
+ moduleName: string;
21
+ presence: ModulePresence;
22
+ t: (key: string, params?: Record<string, string | number>) => string;
23
+ onError: (message: string) => void;
24
+ }
25
+ export declare function activationErrorMessage(err: unknown, moduleName: string, t: Props['t']): string;
26
+ export declare function ModuleActivationControl({ moduleId, moduleName, presence, t, onError, }: Props): ReactNode;
27
+ export {};
28
+ //# sourceMappingURL=ModuleActivationControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModuleActivationControl.d.ts","sourceRoot":"","sources":["../../../src/modules/platform/ModuleActivationControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAKjE;;;;;;;;;;;;;;GAcG;AAEH,UAAU,KAAK;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,cAAc,CAAC;IACzB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAC;IACrE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AA2BD,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,OAAO,EACZ,UAAU,EAAE,MAAM,EAClB,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GACZ,MAAM,CAiCR;AAED,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,CAAC,EACD,OAAO,GACR,EAAE,KAAK,GAAG,SAAS,CAyCnB"}
@@ -0,0 +1,88 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useState } from 'react';
3
+ import { Power, PowerOff } from 'lucide-react';
4
+ import { Button } from '../../components/ui/button.js';
5
+ import { ApiError } from '../../lib/api-client.js';
6
+ import { setModuleActivation, useModulePresence } from '../../lib/module-presence/index.js';
7
+ /**
8
+ * The two dependency refusals (FR-008), by envelope code and by the field of
9
+ * `details` that names the modules to act on.
10
+ *
11
+ * They are translated here rather than shown as the server's sentence because
12
+ * the sentence is the only part that is copy: the module ids are data, and
13
+ * carrying them separately means no bundle can drop or reorder them — the same
14
+ * treatment the version-drift numbers get on this screen.
15
+ *
16
+ * Every other refusal keeps the server's message. `MODULE_NOT_DEACTIVATABLE`
17
+ * carries the module's **own declared reason**, and replacing that with a
18
+ * generic sentence would be the hard-coded exception list Constitution XVII
19
+ * prohibits, spelled in the bundle instead of in the code.
20
+ */
21
+ const DEPENDENCY_REFUSALS = {
22
+ MODULE_DEPENDENTS_PRESENT: {
23
+ key: 'platform.modules.error.dependentsPresent',
24
+ field: 'blockedBy',
25
+ },
26
+ MODULE_DEPENDENCIES_ABSENT: {
27
+ key: 'platform.modules.error.dependenciesAbsent',
28
+ field: 'missing',
29
+ },
30
+ };
31
+ export function activationErrorMessage(err, moduleName, t) {
32
+ if (!(err instanceof ApiError))
33
+ return String(err);
34
+ const code = err.envelope.error.code;
35
+ const details = err.envelope.error.details;
36
+ if (code === 'PIM_CONNECTOR_ALREADY_ACTIVE' && details && !Array.isArray(details)) {
37
+ const activeModuleId = details['activeModuleId'];
38
+ if (typeof activeModuleId === 'string' && activeModuleId.length > 0) {
39
+ return t('platform.modules.error.pimConnectorAlreadyActive', {
40
+ name: moduleName,
41
+ activeModuleId,
42
+ });
43
+ }
44
+ }
45
+ if (code === 'ERP_CONNECTOR_ALREADY_ACTIVE' && details && !Array.isArray(details)) {
46
+ const activeModuleId = details['activeModuleId'];
47
+ if (typeof activeModuleId === 'string' && activeModuleId.length > 0) {
48
+ return t('platform.modules.error.erpConnectorAlreadyActive', {
49
+ name: moduleName,
50
+ activeModuleId,
51
+ });
52
+ }
53
+ }
54
+ const refusal = DEPENDENCY_REFUSALS[code];
55
+ if (refusal && details && !Array.isArray(details)) {
56
+ const named = details[refusal.field];
57
+ if (Array.isArray(named) && named.length > 0) {
58
+ return t(refusal.key, { name: moduleName, modules: named.join(', ') });
59
+ }
60
+ }
61
+ return err.envelope.error.message;
62
+ }
63
+ export function ModuleActivationControl({ moduleId, moduleName, presence, t, onError, }) {
64
+ const { refresh } = useModulePresence();
65
+ const [pending, setPending] = useState(false);
66
+ const activated = presence.activated;
67
+ const toggle = useCallback(async () => {
68
+ if (activated &&
69
+ !window.confirm(t('platform.modules.action.confirmDisable', { name: moduleName }))) {
70
+ return;
71
+ }
72
+ setPending(true);
73
+ try {
74
+ await setModuleActivation(moduleId, !activated);
75
+ await refresh();
76
+ }
77
+ catch (err) {
78
+ onError(activationErrorMessage(err, moduleName, t));
79
+ }
80
+ finally {
81
+ setPending(false);
82
+ }
83
+ }, [activated, moduleId, moduleName, onError, refresh, t]);
84
+ return (_jsxs(Button, { type: "button", variant: activated ? 'outline' : 'default', size: "sm", disabled: pending, onClick: () => void toggle(), children: [activated ? (_jsx(PowerOff, { className: "mr-1 size-3.5" })) : (_jsx(Power, { className: "mr-1 size-3.5" })), activated
85
+ ? t('platform.modules.action.disable')
86
+ : t('platform.modules.action.enable')] }));
87
+ }
88
+ //# sourceMappingURL=ModuleActivationControl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModuleActivationControl.js","sourceRoot":"","sources":["../../../src/modules/platform/ModuleActivationControl.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AA0B5F;;;;;;;;;;;;;GAaG;AACH,MAAM,mBAAmB,GAA6D;IACpF,yBAAyB,EAAE;QACzB,GAAG,EAAE,0CAA0C;QAC/C,KAAK,EAAE,WAAW;KACnB;IACD,0BAA0B,EAAE;QAC1B,GAAG,EAAE,2CAA2C;QAChD,KAAK,EAAE,SAAS;KACjB;CACF,CAAC;AAEF,MAAM,UAAU,sBAAsB,CACpC,GAAY,EACZ,UAAkB,EAClB,CAAa;IAEb,IAAI,CAAC,CAAC,GAAG,YAAY,QAAQ,CAAC;QAAE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;IACnD,MAAM,IAAI,GAAG,GAAG,CAAC,QAAQ,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C,IAAI,EACT,QAAQ,EAAE,OAAO,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,MAAM,EAAE,aAE3B,SAAS,CAAC,CAAC,CAAC,CACX,KAAC,QAAQ,IAAC,SAAS,EAAC,eAAe,GAAG,CACvC,CAAC,CAAC,CAAC,CACF,KAAC,KAAK,IAAC,SAAS,EAAC,eAAe,GAAG,CACpC,EACA,SAAS;gBACR,CAAC,CAAC,CAAC,CAAC,iCAAiC,CAAC;gBACtC,CAAC,CAAC,CAAC,CAAC,gCAAgC,CAAC,IAChC,CACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,76 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { ModuleListItem, ModulePresence } from '@endora-commerce/contracts';
3
+ /**
4
+ * `/platform/modules` — the platform's own view of its modules (feature 073,
5
+ * US5).
6
+ *
7
+ * It composes the two presence axes, which are deliberately never combined
8
+ * anywhere else in this app:
9
+ *
10
+ * - the **platform axis** from `GET /api/v1/admin/modules` — is this module
11
+ * installed on this deployment, at which version, with which dependency and
12
+ * orphan flags. Changing it is deployment work and stays CLI-only;
13
+ * - the **operator axis** from the effective presence projection — did the
14
+ * business switch this capability on.
15
+ *
16
+ * Keeping them side by side is the point of the screen: "not installed here",
17
+ * "we turned it off" and "cannot be turned off" have to read differently
18
+ * (Constitution XVII), and each has a different person who can change it.
19
+ *
20
+ * The screen belongs to no module (D-36). Its backing routes are kernel
21
+ * resident, and its sidebar entry carries no `module` attribution — a surface
22
+ * that reports on module presence cannot be gated on module presence without
23
+ * becoming circular.
24
+ *
25
+ * Since feature 080's T042j it carries a **second** per-module operator choice
26
+ * beside activation: whether an eligible module's entries reach the home
27
+ * dashboard's Recent Activity card (D-163.1). It is a different question with a
28
+ * different answer — a client can want stock management and not want stock
29
+ * movements on their home screen — and it is here for the same reason the
30
+ * activation control is: it is the operator's, and this is the surface they
31
+ * already use for per-module choices. It renders only for modules whose
32
+ * manifest declares eligibility, which this app learns from the server and
33
+ * could not hold a list of.
34
+ */
35
+ /** One table row: the platform record plus whatever the projection knows. */
36
+ interface ModuleRow {
37
+ item: ModuleListItem;
38
+ presence: ModulePresence | undefined;
39
+ /** Absent for a module that declares no recent-activity eligibility. */
40
+ activityVisible: boolean | undefined;
41
+ }
42
+ type ActivationKind = 'on' | 'off' | 'locked' | 'always-on' | 'unknown';
43
+ /**
44
+ * Five operator-axis renderings, and the difference between `locked` and
45
+ * `always-on` is the whole reason this is a function rather than a boolean.
46
+ *
47
+ * `deactivatable: false` **with** a reason is a module that declared itself
48
+ * non-deactivatable — the platform's functional base, and the sentence is its
49
+ * own. The same flag **without** one is a module that declares no activation
50
+ * block at all, which since feature 074 means one thing only: it owns no seam
51
+ * either presence axis could close, so there is nothing for a control to do.
52
+ * Both are "you cannot switch this", and both render the locked affordance;
53
+ * the difference is carried by the sentence rather than by a third visual
54
+ * state.
55
+ *
56
+ * The selection is on the **absent declaration**, never on a module id. That is
57
+ * what keeps this from being the hard-coded exception list Constitution XVII
58
+ * prohibits. **No module this repository ships is in that position any more** —
59
+ * `health_checks` was the last and D-229 dissolved it into the platform, and
60
+ * `test/unit/_lifecycle/non-deactivatable-set.test.ts` now pins the class as
61
+ * empty. The branch stays regardless: this app renders whatever presence
62
+ * projection a deployment serves it, and a module package from outside this
63
+ * repository can still arrive with no activation block. A missing branch would
64
+ * render that module as switchable and offer an operator a control that does
65
+ * nothing.
66
+ *
67
+ * `unknown` is the remaining case and is not a decision: the presence
68
+ * projection carried no row for this module, so this app knows nothing about
69
+ * its operator axis and says so with a dash.
70
+ */
71
+ export declare function activationKindOf(presence: ModulePresence | undefined): ActivationKind;
72
+ /** Whether the deployment offers this module at all. */
73
+ export declare function isPlatformAvailable(row: ModuleRow): boolean;
74
+ export declare function ModulesPage(): ReactNode;
75
+ export {};
76
+ //# sourceMappingURL=ModulesPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModulesPage.d.ts","sourceRoot":"","sources":["../../../src/modules/platform/ModulesPage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElF,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EAEf,MAAM,4BAA4B,CAAC;AAqBpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,6EAA6E;AAC7E,UAAU,SAAS;IACjB,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAC;IACrC,wEAAwE;IACxE,eAAe,EAAE,OAAO,GAAG,SAAS,CAAC;CACtC;AAED,KAAK,cAAc,GAAG,IAAI,GAAG,KAAK,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,cAAc,GAAG,SAAS,GAAG,cAAc,CAMrF;AAED,wDAAwD;AACxD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAG3D;AAiBD,wBAAgB,WAAW,IAAI,SAAS,CAyHvC"}
@@ -0,0 +1,175 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useMemo, useState } from 'react';
3
+ import { AlertTriangle, Lock } from 'lucide-react';
4
+ import { ApiError } from '../../lib/api-client.js';
5
+ import { Alert, AlertDescription } from '../../components/ui/alert.js';
6
+ import { Badge } from '../../components/ui/badge.js';
7
+ import { Button } from '../../components/ui/button.js';
8
+ import { Card, CardContent } from '../../components/ui/card.js';
9
+ import { PageHeader } from '../../components/ui/page-header.js';
10
+ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '../../components/ui/table.js';
11
+ import { useTranslation } from '../../i18n/useTranslation.js';
12
+ import { useModulePresence } from '../../lib/module-presence/index.js';
13
+ import { ModuleActivationControl } from './ModuleActivationControl.js';
14
+ import { RecentActivityVisibilityControl } from './RecentActivityVisibilityControl.js';
15
+ import { listModules, listRecentActivityVisibility } from './api.js';
16
+ /**
17
+ * Five operator-axis renderings, and the difference between `locked` and
18
+ * `always-on` is the whole reason this is a function rather than a boolean.
19
+ *
20
+ * `deactivatable: false` **with** a reason is a module that declared itself
21
+ * non-deactivatable — the platform's functional base, and the sentence is its
22
+ * own. The same flag **without** one is a module that declares no activation
23
+ * block at all, which since feature 074 means one thing only: it owns no seam
24
+ * either presence axis could close, so there is nothing for a control to do.
25
+ * Both are "you cannot switch this", and both render the locked affordance;
26
+ * the difference is carried by the sentence rather than by a third visual
27
+ * state.
28
+ *
29
+ * The selection is on the **absent declaration**, never on a module id. That is
30
+ * what keeps this from being the hard-coded exception list Constitution XVII
31
+ * prohibits. **No module this repository ships is in that position any more** —
32
+ * `health_checks` was the last and D-229 dissolved it into the platform, and
33
+ * `test/unit/_lifecycle/non-deactivatable-set.test.ts` now pins the class as
34
+ * empty. The branch stays regardless: this app renders whatever presence
35
+ * projection a deployment serves it, and a module package from outside this
36
+ * repository can still arrive with no activation block. A missing branch would
37
+ * render that module as switchable and offer an operator a control that does
38
+ * nothing.
39
+ *
40
+ * `unknown` is the remaining case and is not a decision: the presence
41
+ * projection carried no row for this module, so this app knows nothing about
42
+ * its operator axis and says so with a dash.
43
+ */
44
+ export function activationKindOf(presence) {
45
+ if (!presence)
46
+ return 'unknown';
47
+ if (!presence.deactivatable) {
48
+ return presence.nonDeactivatableReason ? 'locked' : 'always-on';
49
+ }
50
+ return presence.activated ? 'on' : 'off';
51
+ }
52
+ /** Whether the deployment offers this module at all. */
53
+ export function isPlatformAvailable(row) {
54
+ const state = row.presence?.platformState ?? row.item.state;
55
+ return state === 'installed';
56
+ }
57
+ const STATE_LABEL_KEY = {
58
+ installing: 'platform.modules.state.installing',
59
+ installed: 'platform.modules.state.installed',
60
+ disabled: 'platform.modules.state.disabled',
61
+ uninstalled: 'platform.modules.state.uninstalled',
62
+ 'not-installed': 'platform.modules.state.notInstalled',
63
+ };
64
+ const FLAG_LABEL_KEY = {
65
+ orphan: 'platform.modules.flag.orphan',
66
+ 'pending-upgrade': 'platform.modules.flag.pendingUpgrade',
67
+ 'dep-missing': 'platform.modules.flag.depMissing',
68
+ 'dep-disabled': 'platform.modules.flag.depDisabled',
69
+ };
70
+ export function ModulesPage() {
71
+ const t = useTranslation('core');
72
+ const { presenceOf, degraded } = useModulePresence();
73
+ const [items, setItems] = useState([]);
74
+ const [activityVisibility, setActivityVisibility] = useState([]);
75
+ const [loading, setLoading] = useState(true);
76
+ const [error, setError] = useState(null);
77
+ const load = useCallback(async () => {
78
+ setLoading(true);
79
+ try {
80
+ const res = await listModules();
81
+ setItems(res.modules);
82
+ setError(null);
83
+ }
84
+ catch (err) {
85
+ setError(err instanceof ApiError ? err.message : String(err));
86
+ }
87
+ finally {
88
+ setLoading(false);
89
+ }
90
+ }, []);
91
+ /**
92
+ * The eligible set, fetched separately and **tolerantly**: a deployment whose
93
+ * `audit_logs` route is unreachable, or an admin without
94
+ * `platform.modules.activate`, gets the module table without the dashboard
95
+ * controls rather than an error banner over the screen they came here for.
96
+ */
97
+ const loadActivityVisibility = useCallback(async () => {
98
+ try {
99
+ const res = await listRecentActivityVisibility();
100
+ setActivityVisibility(res.modules);
101
+ }
102
+ catch {
103
+ setActivityVisibility([]);
104
+ }
105
+ }, []);
106
+ useEffect(() => {
107
+ void load();
108
+ void loadActivityVisibility();
109
+ }, [load, loadActivityVisibility]);
110
+ const onActivityVisibilityChanged = useCallback((moduleId, visible) => {
111
+ setActivityVisibility((current) => current.map((entry) => (entry.moduleId === moduleId ? { ...entry, visible } : entry)));
112
+ }, []);
113
+ const rows = useMemo(() => items.map((item) => ({
114
+ item,
115
+ presence: presenceOf(item.id),
116
+ activityVisible: activityVisibility.find((entry) => entry.moduleId === item.id)?.visible,
117
+ })), [activityVisibility, items, presenceOf]);
118
+ return (_jsxs(_Fragment, { children: [_jsx(PageHeader, { title: t('platform.modules.title'), description: t('platform.modules.description') }), degraded && (_jsxs(Alert, { variant: "warning", className: "mb-4", children: [_jsx(AlertTriangle, { className: "size-4" }), _jsx(AlertDescription, { children: t('platform.modules.degraded') })] })), error && (_jsx(Alert, { variant: "destructive", className: "mb-4", children: _jsx(AlertDescription, { children: error }) })), _jsx("p", { className: "mb-4 text-sm text-muted-foreground", children: t('platform.modules.cliHint') }), _jsx(Card, { children: _jsx(CardContent, { className: "pt-6", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: t('platform.modules.column.module') }), _jsx(TableHead, { children: t('platform.modules.column.platform') }), _jsx(TableHead, { children: t('platform.modules.column.activation') }), _jsx(TableHead, { children: t('platform.modules.column.version') }), _jsx(TableHead, { children: t('platform.modules.column.flags') }), _jsx(TableHead, { className: "text-right", children: t('platform.modules.column.actions') })] }) }), _jsxs(TableBody, { children: [rows.map((row) => (_jsx(ModuleTableRow, { row: row, t: t, onError: setError, onActivityVisibilityChanged: onActivityVisibilityChanged }, row.item.id))), !loading && rows.length === 0 && (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: 6, className: "text-sm text-muted-foreground", children: t('platform.modules.empty') }) }))] })] }) }) })] }));
119
+ }
120
+ function ModuleTableRow({ row, t, onError, onActivityVisibilityChanged, }) {
121
+ const { item, presence } = row;
122
+ const state = presence?.platformState ?? item.state;
123
+ const kind = activationKindOf(presence);
124
+ const available = isPlatformAvailable(row);
125
+ const drift = item.version.registered !== null &&
126
+ item.version.onDisk !== null &&
127
+ item.version.registered !== item.version.onDisk;
128
+ return (_jsxs(TableRow, { "data-module-id": item.id, children: [_jsxs(TableCell, { children: [_jsx("div", { className: "font-medium", children: item.name }), _jsx("div", { className: "text-xs text-muted-foreground", children: item.id }), item.description && (_jsx("div", { className: "mt-1 max-w-prose text-xs text-muted-foreground", children: item.description }))] }), _jsx(TableCell, { children: _jsx(Badge, { variant: state === 'installed' ? 'success' : 'outline', children: t(STATE_LABEL_KEY[state]) }) }), _jsx(TableCell, { children: _jsx(ActivationCell, { kind: kind, available: available, t: t }) }), _jsx(TableCell, { className: "whitespace-nowrap text-xs", children: drift ? (
129
+ // The two numbers are data, not copy: they stay outside the
130
+ // translated string so no bundle can drop or reorder them.
131
+ _jsxs("span", { className: "text-amber-700", children: [item.version.registered, " \u2192 ", item.version.onDisk, _jsx("span", { className: "mt-0.5 block text-[11px] text-muted-foreground", children: t('platform.modules.versionDrift') })] })) : (_jsx("span", { className: "text-muted-foreground", children: item.version.onDisk ?? item.version.registered ?? '—' })) }), _jsx(TableCell, { children: _jsx("div", { className: "flex flex-wrap gap-1", children: item.flags.map((flag) => (_jsx(Badge, { variant: "warning", children: t(FLAG_LABEL_KEY[flag] ?? flag) }, flag))) }) }), _jsxs(TableCell, { className: "text-right", children: [available && row.activityVisible !== undefined && (_jsx("div", { className: "mb-1", children: _jsx(RecentActivityVisibilityControl, { moduleId: item.id, moduleName: item.name, visible: row.activityVisible, t: t, onChanged: onActivityVisibilityChanged, onError: onError }) })), available && presence && (kind === 'on' || kind === 'off') && (_jsx(ModuleActivationControl, { moduleId: item.id, moduleName: item.name, presence: presence, t: t, onError: onError })), available && (kind === 'locked' || kind === 'always-on') && (
132
+ // T063: the control is present and visibly locked rather than absent,
133
+ // so the answer to "why can I not switch this off" is on screen. For a
134
+ // core module the wording is its own declared reason, carried by the
135
+ // projection from its manifest — this app holds no list of module ids
136
+ // that may not be switched off (SC-012). For a module that declares no
137
+ // control the wording is the platform's, because there is no manifest
138
+ // sentence to carry: what it says is that the module's only surface is
139
+ // never gated, so neither axis has anything to close (feature 074,
140
+ // FR-016).
141
+ _jsxs("div", { className: "flex flex-col items-end gap-1", children: [_jsxs(Button, { type: "button", variant: "outline", size: "sm", disabled: true, title: kind === 'locked'
142
+ ? (presence?.nonDeactivatableReason ?? undefined)
143
+ : t('platform.modules.activation.alwaysOnReason'), children: [_jsx(Lock, { className: "mr-1 size-3.5", "aria-hidden": "true" }), kind === 'locked'
144
+ ? t('platform.modules.activation.locked')
145
+ : t('platform.modules.activation.alwaysOn')] }), _jsx("p", { className: "max-w-prose text-right text-xs text-muted-foreground", children: kind === 'locked'
146
+ ? presence?.nonDeactivatableReason
147
+ : t('platform.modules.activation.alwaysOnReason') })] }))] })] }));
148
+ }
149
+ /**
150
+ * The operator axis. A module the deployment does not offer renders neither
151
+ * "on" nor "off": that state is not the operator's doing and not theirs to
152
+ * undo, and showing it as switched off would invite them to look for a switch
153
+ * that is not on this screen.
154
+ */
155
+ function ActivationCell({ kind, available, t, }) {
156
+ if (!available) {
157
+ return _jsx("span", { className: "text-xs text-muted-foreground", children: "\u2014" });
158
+ }
159
+ if (kind === 'locked' || kind === 'always-on') {
160
+ // Neither can be switched off, and both are on and stay on — the effective
161
+ // state forces the operator axis true for a core module, and a module with
162
+ // no declaration has no axis to resolve. So the state column says "on" like
163
+ // any other, and the *control* is where the lock and its sentence live.
164
+ return _jsx(Badge, { variant: "success", children: t('platform.modules.activation.on') });
165
+ }
166
+ if (kind === 'unknown') {
167
+ // No projection row for this module: nothing to report, and inventing "off"
168
+ // would be worse than a dash.
169
+ return _jsx("span", { className: "text-xs text-muted-foreground", children: "\u2014" });
170
+ }
171
+ return (_jsx(Badge, { variant: kind === 'on' ? 'success' : 'secondary', children: kind === 'on'
172
+ ? t('platform.modules.activation.on')
173
+ : t('platform.modules.activation.off') }));
174
+ }
175
+ //# sourceMappingURL=ModulesPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModulesPage.js","sourceRoot":"","sources":["../../../src/modules/platform/ModulesPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAMnD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACvE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,CAAC,GAKF;IACC,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,eAAM,SAAS,EAAC,+BAA+B,uBAAS,CAAC;IAClE,CAAC;IACD,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;QAC9C,2EAA2E;QAC3E,2EAA2E;QAC3E,4EAA4E;QAC5E,wEAAwE;QACxE,OAAO,KAAC,KAAK,IAAC,OAAO,EAAC,SAAS,YAAE,CAAC,CAAC,gCAAgC,CAAC,GAAS,CAAC;IAChF,CAAC;IACD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,4EAA4E;QAC5E,8BAA8B;QAC9B,OAAO,eAAM,SAAS,EAAC,+BAA+B,uBAAS,CAAC;IAClE,CAAC;IACD,OAAO,CACL,KAAC,KAAK,IAAC,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,YACpD,IAAI,KAAK,IAAI;YACZ,CAAC,CAAC,CAAC,CAAC,gCAAgC,CAAC;YACrC,CAAC,CAAC,CAAC,CAAC,iCAAiC,CAAC,GAClC,CACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { type ReactNode } from 'react';
2
+ /**
3
+ * A module's dashboard-activity control — feature 080, T042j / D-163.1.
4
+ *
5
+ * **The second axis of a narrower object.** The module's `manifest.ts` declares
6
+ * that its activity is *eligible* for the home dashboard's Recent Activity
7
+ * card; this is where the operator decides whether it *appears*, and the
8
+ * default is that it does. Neither axis overwrites the other, and neither is
9
+ * derivable from the other — Constitution XVII's shape, applied to one card
10
+ * instead of to a whole module.
11
+ *
12
+ * **Why it renders here and not on the module's own screen.** It is the
13
+ * operator's per-module choice, and `/platform/modules` is the surface they
14
+ * already use for exactly that; a card the operator did not configure appearing
15
+ * on their home screen is the surprise the ruling exists to prevent, and a
16
+ * switch they cannot find is the same surprise one click further away. The
17
+ * screen belongs to no module (D-36), so hosting a second per-module control
18
+ * costs it nothing.
19
+ *
20
+ * Only eligible modules get one: `listRecentActivityVisibility()` returns the
21
+ * declaring set, and a module absent from it renders nothing. That is the
22
+ * declaration axis showing through — this app holds no list of which modules
23
+ * contribute activity, and could not: a packaged module is one of them.
24
+ *
25
+ * No optimistic update, for the reason the activation control has none: the
26
+ * server's re-read is what the operator sees, not what this component assumed.
27
+ */
28
+ interface Props {
29
+ moduleId: string;
30
+ moduleName: string;
31
+ visible: boolean;
32
+ t: (key: string, params?: Record<string, string | number>) => string;
33
+ onChanged: (moduleId: string, visible: boolean) => void;
34
+ onError: (message: string) => void;
35
+ }
36
+ export declare function RecentActivityVisibilityControl({ moduleId, moduleName, visible, t, onChanged, onError, }: Props): ReactNode;
37
+ export {};
38
+ //# sourceMappingURL=RecentActivityVisibilityControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecentActivityVisibilityControl.d.ts","sourceRoot":"","sources":["../../../src/modules/platform/RecentActivityVisibilityControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAM9D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,UAAU,KAAK;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAC;IACrE,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,wBAAgB,+BAA+B,CAAC,EAC9C,QAAQ,EACR,UAAU,EACV,OAAO,EACP,CAAC,EACD,SAAS,EACT,OAAO,GACR,EAAE,KAAK,GAAG,SAAS,CAoCnB"}
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useState } from 'react';
3
+ import { Eye, EyeOff } from 'lucide-react';
4
+ import { Button } from '../../components/ui/button.js';
5
+ import { ApiError } from '../../lib/api-client.js';
6
+ import { setRecentActivityVisibility } from './api.js';
7
+ export function RecentActivityVisibilityControl({ moduleId, moduleName, visible, t, onChanged, onError, }) {
8
+ const [pending, setPending] = useState(false);
9
+ const toggle = useCallback(async () => {
10
+ setPending(true);
11
+ try {
12
+ const res = await setRecentActivityVisibility(moduleId, !visible);
13
+ onChanged(res.module.moduleId, res.module.visible);
14
+ }
15
+ catch (err) {
16
+ onError(err instanceof ApiError ? err.envelope.error.message : String(err));
17
+ }
18
+ finally {
19
+ setPending(false);
20
+ }
21
+ }, [moduleId, onChanged, onError, visible]);
22
+ return (_jsxs(Button, { type: "button", variant: "ghost", size: "sm", disabled: pending, onClick: () => void toggle(), title: t('platform.modules.recentActivity.hint', { name: moduleName }), "data-testid": `recent-activity-visibility-${moduleId}`, "data-visible": visible ? 'true' : 'false', children: [visible ? (_jsx(Eye, { className: "mr-1 size-3.5", "aria-hidden": "true" })) : (_jsx(EyeOff, { className: "mr-1 size-3.5", "aria-hidden": "true" })), visible
23
+ ? t('platform.modules.recentActivity.shown')
24
+ : t('platform.modules.recentActivity.hidden')] }));
25
+ }
26
+ //# sourceMappingURL=RecentActivityVisibilityControl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecentActivityVisibilityControl.js","sourceRoot":"","sources":["../../../src/modules/platform/RecentActivityVisibilityControl.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,Q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AM,CAAC,CAAC,CAAC,OAAO,aAEvC,OAAO,CAAC,CAAC,CAAC,CACT,KAAC,GAAG,IAAC,SAAS,EAAC,eAAe,iBAAa,MAAM,GAAG,CACrD,CAAC,CAAC,CAAC,CACF,KAAC,MAAM,IAAC,SAAS,EAAC,eAAe,iBAAa,MAAM,GAAG,CACxD,EACA,OAAO;gBACN,CAAC,CAAC,CAAC,CAAC,uCAAuC,CAAC;gBAC5C,CAAC,CAAC,CAAC,CAAC,wCAAwC,CAAC,IACxC,CACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { ModuleListResponse, RecentActivityVisibilityList, RecentActivityVisibilityResponse } from '@endora-commerce/contracts';
2
+ /**
3
+ * The platform axis, as the lifecycle orchestrator sees it — registered vs
4
+ * on-disk version, registry state, dependency and orphan flags.
5
+ *
6
+ * Gated on `platform.modules.read`. The effective projection this screen pairs
7
+ * it with (`/admin/module-presence`) carries no permission code, because every
8
+ * admin needs that one to render their own navigation.
9
+ */
10
+ export declare function listModules(): Promise<ModuleListResponse>;
11
+ /**
12
+ * The second per-module operator axis this screen carries — feature 080, T042j
13
+ * / D-163.1: which eligible modules' entries reach the home dashboard's Recent
14
+ * Activity card.
15
+ *
16
+ * It is a different question from activation ("does this client want this
17
+ * capability at all") and it lives here for the reason D-163.1 gives: the
18
+ * switch is the operator's and belongs in the surface they already use for
19
+ * per-module choices. Only modules whose manifest declares eligibility appear
20
+ * — a module author declares, an operator decides.
21
+ *
22
+ * Gated on `platform.modules.activate`, the same code as the activation write,
23
+ * so an admin who sees one control sees both or neither.
24
+ */
25
+ export declare function listRecentActivityVisibility(): Promise<RecentActivityVisibilityList>;
26
+ export declare function setRecentActivityVisibility(moduleId: string, visible: boolean): Promise<RecentActivityVisibilityResponse>;
27
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/modules/platform/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,4BAA4B,EAC5B,gCAAgC,EACjC,MAAM,4BAA4B,CAAC;AAGpC;;;;;;;GAOG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAE/D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,4BAA4B,IAAI,OAAO,CAAC,4BAA4B,CAAC,CAI1F;AAED,wBAAsB,2BAA2B,CAC/C,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,gCAAgC,CAAC,CAK3C"}
@@ -0,0 +1,33 @@
1
+ import { apiClient } from '../../lib/api-client.js';
2
+ /**
3
+ * The platform axis, as the lifecycle orchestrator sees it — registered vs
4
+ * on-disk version, registry state, dependency and orphan flags.
5
+ *
6
+ * Gated on `platform.modules.read`. The effective projection this screen pairs
7
+ * it with (`/admin/module-presence`) carries no permission code, because every
8
+ * admin needs that one to render their own navigation.
9
+ */
10
+ export async function listModules() {
11
+ return apiClient.get('/api/v1/admin/modules');
12
+ }
13
+ /**
14
+ * The second per-module operator axis this screen carries — feature 080, T042j
15
+ * / D-163.1: which eligible modules' entries reach the home dashboard's Recent
16
+ * Activity card.
17
+ *
18
+ * It is a different question from activation ("does this client want this
19
+ * capability at all") and it lives here for the reason D-163.1 gives: the
20
+ * switch is the operator's and belongs in the surface they already use for
21
+ * per-module choices. Only modules whose manifest declares eligibility appear
22
+ * — a module author declares, an operator decides.
23
+ *
24
+ * Gated on `platform.modules.activate`, the same code as the activation write,
25
+ * so an admin who sees one control sees both or neither.
26
+ */
27
+ export async function listRecentActivityVisibility() {
28
+ return apiClient.get('/api/v1/admin/audit-log/recent-activity/visibility');
29
+ }
30
+ export async function setRecentActivityVisibility(moduleId, visible) {
31
+ return apiClient.post(`/api/v1/admin/audit-log/recent-activity/visibility/${encodeURIComponent(moduleId)}`, { visible });
32
+ }
33
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/modules/platform/api.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW;IAC/B,OAAO,SAAS,CAAC,GAAG,CAAqB,uBAAuB,CAAC,CAAC;AACpE,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B;IAChD,OAAO,SAAS,CAAC,GAAG,CAClB,oDAAoD,CACrD,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,QAAgB,EAChB,OAAgB;IAEhB,OAAO,SAAS,CAAC,IAAI,CACnB,sDAAsD,kBAAkB,CAAC,QAAQ,CAAC,EAAE,EACpF,EAAE,OAAO,EAAE,CACZ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { type ReactNode } from 'react';
2
+ /**
3
+ * ProfilePage — feature 010 admin polish.
4
+ *
5
+ * Self-edit form for the logged-in admin user. Hits
6
+ * `PATCH /api/v1/admin/me`, which any authenticated admin can call
7
+ * without holding `admin_users:manage`. Linked from the avatar in the
8
+ * top-right corner of the AppShell.
9
+ */
10
+ export declare function ProfilePage(): ReactNode;
11
+ //# sourceMappingURL=ProfilePage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProfilePage.d.ts","sourceRoot":"","sources":["../../../src/modules/profile/ProfilePage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAQ5E;;;;;;;GAOG;AACH,wBAAgB,WAAW,IAAI,SAAS,CAwKvC"}