@mgamadeus/ddd-admin-ui 0.0.0-stage → 0.1.0-rc.2

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 (638) hide show
  1. package/.claude/skills/ddd-admin-ui-specialist/SKILL.md +159 -0
  2. package/CHANGELOG.md +33 -0
  3. package/LICENSE +21 -0
  4. package/README.md +239 -2
  5. package/STANDARDS.md +385 -0
  6. package/dist/cli/ddd-admin-ui.d.ts +3 -0
  7. package/dist/cli/ddd-admin-ui.d.ts.map +1 -0
  8. package/dist/cli/ddd-admin-ui.js +18 -0
  9. package/dist/cli/ddd-admin-ui.js.map +1 -0
  10. package/dist/cli/linkSkills.d.ts +25 -0
  11. package/dist/cli/linkSkills.d.ts.map +1 -0
  12. package/dist/cli/linkSkills.js +76 -0
  13. package/dist/cli/linkSkills.js.map +1 -0
  14. package/dist/components.css +187 -0
  15. package/dist/form/DrawerFooter.d.ts +18 -0
  16. package/dist/form/DrawerFooter.d.ts.map +1 -0
  17. package/dist/form/DrawerFooter.js +47 -0
  18. package/dist/form/DrawerFooter.js.map +1 -0
  19. package/dist/form/Form.d.ts +28 -0
  20. package/dist/form/Form.d.ts.map +1 -0
  21. package/dist/form/Form.js +20 -0
  22. package/dist/form/Form.js.map +1 -0
  23. package/dist/form/FormActions.d.ts +35 -0
  24. package/dist/form/FormActions.d.ts.map +1 -0
  25. package/dist/form/FormActions.js +80 -0
  26. package/dist/form/FormActions.js.map +1 -0
  27. package/dist/form/FormDrawer.d.ts +36 -0
  28. package/dist/form/FormDrawer.d.ts.map +1 -0
  29. package/dist/form/FormDrawer.js +31 -0
  30. package/dist/form/FormDrawer.js.map +1 -0
  31. package/dist/form/FormErrors.d.ts +22 -0
  32. package/dist/form/FormErrors.d.ts.map +1 -0
  33. package/dist/form/FormErrors.js +46 -0
  34. package/dist/form/FormErrors.js.map +1 -0
  35. package/dist/form/FormField.d.ts +74 -0
  36. package/dist/form/FormField.d.ts.map +1 -0
  37. package/dist/form/FormField.js +46 -0
  38. package/dist/form/FormField.js.map +1 -0
  39. package/dist/form/FormHeader.d.ts +20 -0
  40. package/dist/form/FormHeader.d.ts.map +1 -0
  41. package/dist/form/FormHeader.js +9 -0
  42. package/dist/form/FormHeader.js.map +1 -0
  43. package/dist/form/FormJumpBar.d.ts +20 -0
  44. package/dist/form/FormJumpBar.d.ts.map +1 -0
  45. package/dist/form/FormJumpBar.js +49 -0
  46. package/dist/form/FormJumpBar.js.map +1 -0
  47. package/dist/form/FormSubmitButton.d.ts +17 -0
  48. package/dist/form/FormSubmitButton.d.ts.map +1 -0
  49. package/dist/form/FormSubmitButton.js +14 -0
  50. package/dist/form/FormSubmitButton.js.map +1 -0
  51. package/dist/form/FormWrapper.d.ts +13 -0
  52. package/dist/form/FormWrapper.d.ts.map +1 -0
  53. package/dist/form/FormWrapper.js +15 -0
  54. package/dist/form/FormWrapper.js.map +1 -0
  55. package/dist/form/drawerSlots.d.ts +10 -0
  56. package/dist/form/drawerSlots.d.ts.map +1 -0
  57. package/dist/form/drawerSlots.js +7 -0
  58. package/dist/form/drawerSlots.js.map +1 -0
  59. package/dist/form/fieldLabels.d.ts +17 -0
  60. package/dist/form/fieldLabels.d.ts.map +1 -0
  61. package/dist/form/fieldLabels.js +20 -0
  62. package/dist/form/fieldLabels.js.map +1 -0
  63. package/dist/form/formPanelClasses.d.ts +3 -0
  64. package/dist/form/formPanelClasses.d.ts.map +1 -0
  65. package/dist/form/formPanelClasses.js +3 -0
  66. package/dist/form/formPanelClasses.js.map +1 -0
  67. package/dist/form/index.d.ts +58 -0
  68. package/dist/form/index.d.ts.map +1 -0
  69. package/dist/form/index.js +34 -0
  70. package/dist/form/index.js.map +1 -0
  71. package/dist/form/useConfirmDialog.d.ts +9 -0
  72. package/dist/form/useConfirmDialog.d.ts.map +1 -0
  73. package/dist/form/useConfirmDialog.js +29 -0
  74. package/dist/form/useConfirmDialog.js.map +1 -0
  75. package/dist/glass/ActionRow.d.ts +27 -0
  76. package/dist/glass/ActionRow.d.ts.map +1 -0
  77. package/dist/glass/ActionRow.js +22 -0
  78. package/dist/glass/ActionRow.js.map +1 -0
  79. package/dist/glass/CollapsibleCard.d.ts +36 -0
  80. package/dist/glass/CollapsibleCard.d.ts.map +1 -0
  81. package/dist/glass/CollapsibleCard.js +27 -0
  82. package/dist/glass/CollapsibleCard.js.map +1 -0
  83. package/dist/glass/GlassGroup.d.ts +26 -0
  84. package/dist/glass/GlassGroup.d.ts.map +1 -0
  85. package/dist/glass/GlassGroup.js +34 -0
  86. package/dist/glass/GlassGroup.js.map +1 -0
  87. package/dist/glass/GlassPill.d.ts +23 -0
  88. package/dist/glass/GlassPill.d.ts.map +1 -0
  89. package/dist/glass/GlassPill.js +20 -0
  90. package/dist/glass/GlassPill.js.map +1 -0
  91. package/dist/glass/QuickFilterPills.d.ts +38 -0
  92. package/dist/glass/QuickFilterPills.d.ts.map +1 -0
  93. package/dist/glass/QuickFilterPills.js +30 -0
  94. package/dist/glass/QuickFilterPills.js.map +1 -0
  95. package/dist/glass/index.d.ts +11 -0
  96. package/dist/glass/index.d.ts.map +1 -0
  97. package/dist/glass/index.js +7 -0
  98. package/dist/glass/index.js.map +1 -0
  99. package/dist/i18n/Translate.d.ts +8 -0
  100. package/dist/i18n/Translate.d.ts.map +1 -0
  101. package/dist/i18n/Translate.js +9 -0
  102. package/dist/i18n/Translate.js.map +1 -0
  103. package/dist/i18n/format.d.ts +13 -0
  104. package/dist/i18n/format.d.ts.map +1 -0
  105. package/dist/i18n/format.js +15 -0
  106. package/dist/i18n/format.js.map +1 -0
  107. package/dist/i18n/hints.json +130 -0
  108. package/dist/i18n/index.d.ts +7 -0
  109. package/dist/i18n/index.d.ts.map +1 -0
  110. package/dist/i18n/index.js +7 -0
  111. package/dist/i18n/index.js.map +1 -0
  112. package/dist/i18n/localeFormat.d.ts +10 -0
  113. package/dist/i18n/localeFormat.d.ts.map +1 -0
  114. package/dist/i18n/localeFormat.js +36 -0
  115. package/dist/i18n/localeFormat.js.map +1 -0
  116. package/dist/i18n/plural.d.ts +15 -0
  117. package/dist/i18n/plural.d.ts.map +1 -0
  118. package/dist/i18n/plural.js +95 -0
  119. package/dist/i18n/plural.js.map +1 -0
  120. package/dist/i18n/serverMessages.d.ts +26 -0
  121. package/dist/i18n/serverMessages.d.ts.map +1 -0
  122. package/dist/i18n/serverMessages.js +146 -0
  123. package/dist/i18n/serverMessages.js.map +1 -0
  124. package/dist/i18n/store.d.ts +36 -0
  125. package/dist/i18n/store.d.ts.map +1 -0
  126. package/dist/i18n/store.js +36 -0
  127. package/dist/i18n/store.js.map +1 -0
  128. package/dist/i18n/useTranslate.d.ts +17 -0
  129. package/dist/i18n/useTranslate.d.ts.map +1 -0
  130. package/dist/i18n/useTranslate.js +22 -0
  131. package/dist/i18n/useTranslate.js.map +1 -0
  132. package/dist/i18n-keys.json +1069 -0
  133. package/dist/list/ChipToggleGroup.d.ts +36 -0
  134. package/dist/list/ChipToggleGroup.d.ts.map +1 -0
  135. package/dist/list/ChipToggleGroup.js +34 -0
  136. package/dist/list/ChipToggleGroup.js.map +1 -0
  137. package/dist/list/Combobox.d.ts +32 -0
  138. package/dist/list/Combobox.d.ts.map +1 -0
  139. package/dist/list/Combobox.js +27 -0
  140. package/dist/list/Combobox.js.map +1 -0
  141. package/dist/list/EmptyValue.d.ts +14 -0
  142. package/dist/list/EmptyValue.d.ts.map +1 -0
  143. package/dist/list/EmptyValue.js +11 -0
  144. package/dist/list/EmptyValue.js.map +1 -0
  145. package/dist/list/EntityListBody.d.ts +27 -0
  146. package/dist/list/EntityListBody.d.ts.map +1 -0
  147. package/dist/list/EntityListBody.js +24 -0
  148. package/dist/list/EntityListBody.js.map +1 -0
  149. package/dist/list/EntityListBulkBar.d.ts +38 -0
  150. package/dist/list/EntityListBulkBar.d.ts.map +1 -0
  151. package/dist/list/EntityListBulkBar.js +19 -0
  152. package/dist/list/EntityListBulkBar.js.map +1 -0
  153. package/dist/list/EntityListCard.d.ts +22 -0
  154. package/dist/list/EntityListCard.d.ts.map +1 -0
  155. package/dist/list/EntityListCard.js +15 -0
  156. package/dist/list/EntityListCard.js.map +1 -0
  157. package/dist/list/EntityListEmpty.d.ts +13 -0
  158. package/dist/list/EntityListEmpty.d.ts.map +1 -0
  159. package/dist/list/EntityListEmpty.js +11 -0
  160. package/dist/list/EntityListEmpty.js.map +1 -0
  161. package/dist/list/EntityListGrid.d.ts +29 -0
  162. package/dist/list/EntityListGrid.d.ts.map +1 -0
  163. package/dist/list/EntityListGrid.js +21 -0
  164. package/dist/list/EntityListGrid.js.map +1 -0
  165. package/dist/list/EntityListLoadMore.d.ts +15 -0
  166. package/dist/list/EntityListLoadMore.d.ts.map +1 -0
  167. package/dist/list/EntityListLoadMore.js +27 -0
  168. package/dist/list/EntityListLoadMore.js.map +1 -0
  169. package/dist/list/EntityListStatus.d.ts +11 -0
  170. package/dist/list/EntityListStatus.d.ts.map +1 -0
  171. package/dist/list/EntityListStatus.js +22 -0
  172. package/dist/list/EntityListStatus.js.map +1 -0
  173. package/dist/list/EntityListTable.d.ts +34 -0
  174. package/dist/list/EntityListTable.d.ts.map +1 -0
  175. package/dist/list/EntityListTable.js +43 -0
  176. package/dist/list/EntityListTable.js.map +1 -0
  177. package/dist/list/EntityListToolbar.d.ts +39 -0
  178. package/dist/list/EntityListToolbar.d.ts.map +1 -0
  179. package/dist/list/EntityListToolbar.js +25 -0
  180. package/dist/list/EntityListToolbar.js.map +1 -0
  181. package/dist/list/EntityListViewToggle.d.ts +17 -0
  182. package/dist/list/EntityListViewToggle.d.ts.map +1 -0
  183. package/dist/list/EntityListViewToggle.js +38 -0
  184. package/dist/list/EntityListViewToggle.js.map +1 -0
  185. package/dist/list/MultiSelect.d.ts +33 -0
  186. package/dist/list/MultiSelect.d.ts.map +1 -0
  187. package/dist/list/MultiSelect.js +60 -0
  188. package/dist/list/MultiSelect.js.map +1 -0
  189. package/dist/list/SearchField.d.ts +24 -0
  190. package/dist/list/SearchField.d.ts.map +1 -0
  191. package/dist/list/SearchField.js +42 -0
  192. package/dist/list/SearchField.js.map +1 -0
  193. package/dist/list/StatusBadge.d.ts +34 -0
  194. package/dist/list/StatusBadge.d.ts.map +1 -0
  195. package/dist/list/StatusBadge.js +44 -0
  196. package/dist/list/StatusBadge.js.map +1 -0
  197. package/dist/list/Tag.d.ts +16 -0
  198. package/dist/list/Tag.d.ts.map +1 -0
  199. package/dist/list/Tag.js +15 -0
  200. package/dist/list/Tag.js.map +1 -0
  201. package/dist/list/cells.d.ts +53 -0
  202. package/dist/list/cells.d.ts.map +1 -0
  203. package/dist/list/cells.js +62 -0
  204. package/dist/list/cells.js.map +1 -0
  205. package/dist/list/filterClasses.d.ts +8 -0
  206. package/dist/list/filterClasses.d.ts.map +1 -0
  207. package/dist/list/filterClasses.js +8 -0
  208. package/dist/list/filterClasses.js.map +1 -0
  209. package/dist/list/filterOptions.d.ts +7 -0
  210. package/dist/list/filterOptions.d.ts.map +1 -0
  211. package/dist/list/filterOptions.js +7 -0
  212. package/dist/list/filterOptions.js.map +1 -0
  213. package/dist/list/filters.d.ts +78 -0
  214. package/dist/list/filters.d.ts.map +1 -0
  215. package/dist/list/filters.js +54 -0
  216. package/dist/list/filters.js.map +1 -0
  217. package/dist/list/index.d.ts +89 -0
  218. package/dist/list/index.d.ts.map +1 -0
  219. package/dist/list/index.js +51 -0
  220. package/dist/list/index.js.map +1 -0
  221. package/dist/list/types.d.ts +59 -0
  222. package/dist/list/types.d.ts.map +1 -0
  223. package/dist/list/types.js +3 -0
  224. package/dist/list/types.js.map +1 -0
  225. package/dist/logic/browser/prepareImageFile.d.ts +18 -0
  226. package/dist/logic/browser/prepareImageFile.d.ts.map +1 -0
  227. package/dist/logic/browser/prepareImageFile.js +26 -0
  228. package/dist/logic/browser/prepareImageFile.js.map +1 -0
  229. package/dist/logic/index.d.ts +57 -0
  230. package/dist/logic/index.d.ts.map +1 -0
  231. package/dist/logic/index.js +39 -0
  232. package/dist/logic/index.js.map +1 -0
  233. package/dist/logic/pure/conditions.d.ts +46 -0
  234. package/dist/logic/pure/conditions.d.ts.map +1 -0
  235. package/dist/logic/pure/conditions.js +39 -0
  236. package/dist/logic/pure/conditions.js.map +1 -0
  237. package/dist/logic/pure/confirm.d.ts +19 -0
  238. package/dist/logic/pure/confirm.d.ts.map +1 -0
  239. package/dist/logic/pure/confirm.js +10 -0
  240. package/dist/logic/pure/confirm.js.map +1 -0
  241. package/dist/logic/pure/displayMode.d.ts +12 -0
  242. package/dist/logic/pure/displayMode.d.ts.map +1 -0
  243. package/dist/logic/pure/displayMode.js +11 -0
  244. package/dist/logic/pure/displayMode.js.map +1 -0
  245. package/dist/logic/pure/entityDrawer.d.ts +24 -0
  246. package/dist/logic/pure/entityDrawer.d.ts.map +1 -0
  247. package/dist/logic/pure/entityDrawer.js +3 -0
  248. package/dist/logic/pure/entityDrawer.js.map +1 -0
  249. package/dist/logic/pure/fieldPath.d.ts +9 -0
  250. package/dist/logic/pure/fieldPath.d.ts.map +1 -0
  251. package/dist/logic/pure/fieldPath.js +17 -0
  252. package/dist/logic/pure/fieldPath.js.map +1 -0
  253. package/dist/logic/pure/formValues.d.ts +14 -0
  254. package/dist/logic/pure/formValues.d.ts.map +1 -0
  255. package/dist/logic/pure/formValues.js +82 -0
  256. package/dist/logic/pure/formValues.js.map +1 -0
  257. package/dist/logic/pure/format.d.ts +15 -0
  258. package/dist/logic/pure/format.d.ts.map +1 -0
  259. package/dist/logic/pure/format.js +53 -0
  260. package/dist/logic/pure/format.js.map +1 -0
  261. package/dist/logic/pure/locales.d.ts +27 -0
  262. package/dist/logic/pure/locales.d.ts.map +1 -0
  263. package/dist/logic/pure/locales.js +50 -0
  264. package/dist/logic/pure/locales.js.map +1 -0
  265. package/dist/logic/pure/notify.d.ts +42 -0
  266. package/dist/logic/pure/notify.d.ts.map +1 -0
  267. package/dist/logic/pure/notify.js +52 -0
  268. package/dist/logic/pure/notify.js.map +1 -0
  269. package/dist/logic/pure/rowActivation.d.ts +6 -0
  270. package/dist/logic/pure/rowActivation.d.ts.map +1 -0
  271. package/dist/logic/pure/rowActivation.js +7 -0
  272. package/dist/logic/pure/rowActivation.js.map +1 -0
  273. package/dist/logic/pure/runSequential.d.ts +31 -0
  274. package/dist/logic/pure/runSequential.d.ts.map +1 -0
  275. package/dist/logic/pure/runSequential.js +47 -0
  276. package/dist/logic/pure/runSequential.js.map +1 -0
  277. package/dist/logic/pure/schemas.d.ts +14 -0
  278. package/dist/logic/pure/schemas.d.ts.map +1 -0
  279. package/dist/logic/pure/schemas.js +6 -0
  280. package/dist/logic/pure/schemas.js.map +1 -0
  281. package/dist/logic/pure/serverViolations.d.ts +35 -0
  282. package/dist/logic/pure/serverViolations.d.ts.map +1 -0
  283. package/dist/logic/pure/serverViolations.js +77 -0
  284. package/dist/logic/pure/serverViolations.js.map +1 -0
  285. package/dist/logic/pure/status.d.ts +21 -0
  286. package/dist/logic/pure/status.d.ts.map +1 -0
  287. package/dist/logic/pure/status.js +3 -0
  288. package/dist/logic/pure/status.js.map +1 -0
  289. package/dist/logic/pure/submitError.d.ts +11 -0
  290. package/dist/logic/pure/submitError.d.ts.map +1 -0
  291. package/dist/logic/pure/submitError.js +9 -0
  292. package/dist/logic/pure/submitError.js.map +1 -0
  293. package/dist/logic/pure/translationState.d.ts +29 -0
  294. package/dist/logic/pure/translationState.d.ts.map +1 -0
  295. package/dist/logic/pure/translationState.js +88 -0
  296. package/dist/logic/pure/translationState.js.map +1 -0
  297. package/dist/logic/pure/urlListState.d.ts +18 -0
  298. package/dist/logic/pure/urlListState.d.ts.map +1 -0
  299. package/dist/logic/pure/urlListState.js +3 -0
  300. package/dist/logic/pure/urlListState.js.map +1 -0
  301. package/dist/logic/react/conditionHooks.d.ts +20 -0
  302. package/dist/logic/react/conditionHooks.d.ts.map +1 -0
  303. package/dist/logic/react/conditionHooks.js +51 -0
  304. package/dist/logic/react/conditionHooks.js.map +1 -0
  305. package/dist/logic/react/useCopyToClipboard.d.ts +9 -0
  306. package/dist/logic/react/useCopyToClipboard.d.ts.map +1 -0
  307. package/dist/logic/react/useCopyToClipboard.js +28 -0
  308. package/dist/logic/react/useCopyToClipboard.js.map +1 -0
  309. package/dist/logic/react/useDebouncedValue.d.ts +3 -0
  310. package/dist/logic/react/useDebouncedValue.d.ts.map +1 -0
  311. package/dist/logic/react/useDebouncedValue.js +12 -0
  312. package/dist/logic/react/useDebouncedValue.js.map +1 -0
  313. package/dist/logic/react/useEntityDrawer.d.ts +54 -0
  314. package/dist/logic/react/useEntityDrawer.d.ts.map +1 -0
  315. package/dist/logic/react/useEntityDrawer.js +81 -0
  316. package/dist/logic/react/useEntityDrawer.js.map +1 -0
  317. package/dist/logic/react/useEntityTranslations.d.ts +57 -0
  318. package/dist/logic/react/useEntityTranslations.d.ts.map +1 -0
  319. package/dist/logic/react/useEntityTranslations.js +50 -0
  320. package/dist/logic/react/useEntityTranslations.js.map +1 -0
  321. package/dist/logic/react/useFormDirty.d.ts +15 -0
  322. package/dist/logic/react/useFormDirty.d.ts.map +1 -0
  323. package/dist/logic/react/useFormDirty.js +17 -0
  324. package/dist/logic/react/useFormDirty.js.map +1 -0
  325. package/dist/logic/react/useGrowingWindowList.d.ts +50 -0
  326. package/dist/logic/react/useGrowingWindowList.d.ts.map +1 -0
  327. package/dist/logic/react/useGrowingWindowList.js +38 -0
  328. package/dist/logic/react/useGrowingWindowList.js.map +1 -0
  329. package/dist/logic/react/useHydrated.d.ts +7 -0
  330. package/dist/logic/react/useHydrated.d.ts.map +1 -0
  331. package/dist/logic/react/useHydrated.js +12 -0
  332. package/dist/logic/react/useHydrated.js.map +1 -0
  333. package/dist/logic/react/useInfiniteScrollSentinel.d.ts +6 -0
  334. package/dist/logic/react/useInfiniteScrollSentinel.d.ts.map +1 -0
  335. package/dist/logic/react/useInfiniteScrollSentinel.js +24 -0
  336. package/dist/logic/react/useInfiniteScrollSentinel.js.map +1 -0
  337. package/dist/logic/react/useLocaleName.d.ts +3 -0
  338. package/dist/logic/react/useLocaleName.d.ts.map +1 -0
  339. package/dist/logic/react/useLocaleName.js +10 -0
  340. package/dist/logic/react/useLocaleName.js.map +1 -0
  341. package/dist/logic/react/useRowActivation.d.ts +12 -0
  342. package/dist/logic/react/useRowActivation.d.ts.map +1 -0
  343. package/dist/logic/react/useRowActivation.js +35 -0
  344. package/dist/logic/react/useRowActivation.js.map +1 -0
  345. package/dist/logic/react/useRowSelection.d.ts +40 -0
  346. package/dist/logic/react/useRowSelection.d.ts.map +1 -0
  347. package/dist/logic/react/useRowSelection.js +70 -0
  348. package/dist/logic/react/useRowSelection.js.map +1 -0
  349. package/dist/logic/react/useTranslationRunner.d.ts +27 -0
  350. package/dist/logic/react/useTranslationRunner.d.ts.map +1 -0
  351. package/dist/logic/react/useTranslationRunner.js +57 -0
  352. package/dist/logic/react/useTranslationRunner.js.map +1 -0
  353. package/dist/logic/react/useUnsavedChangesGuard.d.ts +30 -0
  354. package/dist/logic/react/useUnsavedChangesGuard.d.ts.map +1 -0
  355. package/dist/logic/react/useUnsavedChangesGuard.js +66 -0
  356. package/dist/logic/react/useUnsavedChangesGuard.js.map +1 -0
  357. package/dist/logic/react/useUrlListState.d.ts +39 -0
  358. package/dist/logic/react/useUrlListState.d.ts.map +1 -0
  359. package/dist/logic/react/useUrlListState.js +96 -0
  360. package/dist/logic/react/useUrlListState.js.map +1 -0
  361. package/dist/media/FormMediaItemField.d.ts +38 -0
  362. package/dist/media/FormMediaItemField.d.ts.map +1 -0
  363. package/dist/media/FormMediaItemField.js +35 -0
  364. package/dist/media/FormMediaItemField.js.map +1 -0
  365. package/dist/media/MediaItemField.d.ts +20 -0
  366. package/dist/media/MediaItemField.d.ts.map +1 -0
  367. package/dist/media/MediaItemField.js +15 -0
  368. package/dist/media/MediaItemField.js.map +1 -0
  369. package/dist/media/MediaItemPickerDialog.d.ts +48 -0
  370. package/dist/media/MediaItemPickerDialog.d.ts.map +1 -0
  371. package/dist/media/MediaItemPickerDialog.js +36 -0
  372. package/dist/media/MediaItemPickerDialog.js.map +1 -0
  373. package/dist/media/MediaPreview.d.ts +16 -0
  374. package/dist/media/MediaPreview.d.ts.map +1 -0
  375. package/dist/media/MediaPreview.js +20 -0
  376. package/dist/media/MediaPreview.js.map +1 -0
  377. package/dist/media/index.d.ts +18 -0
  378. package/dist/media/index.d.ts.map +1 -0
  379. package/dist/media/index.js +9 -0
  380. package/dist/media/index.js.map +1 -0
  381. package/dist/media/types.d.ts +24 -0
  382. package/dist/media/types.d.ts.map +1 -0
  383. package/dist/media/types.js +2 -0
  384. package/dist/media/types.js.map +1 -0
  385. package/dist/next/index.d.ts +8 -0
  386. package/dist/next/index.d.ts.map +1 -0
  387. package/dist/next/index.js +8 -0
  388. package/dist/next/index.js.map +1 -0
  389. package/dist/next/listViewParam.d.ts +3 -0
  390. package/dist/next/listViewParam.d.ts.map +1 -0
  391. package/dist/next/listViewParam.js +3 -0
  392. package/dist/next/listViewParam.js.map +1 -0
  393. package/dist/next/searchParamsWriter.d.ts +31 -0
  394. package/dist/next/searchParamsWriter.d.ts.map +1 -0
  395. package/dist/next/searchParamsWriter.js +87 -0
  396. package/dist/next/searchParamsWriter.js.map +1 -0
  397. package/dist/next/storage.d.ts +11 -0
  398. package/dist/next/storage.d.ts.map +1 -0
  399. package/dist/next/storage.js +34 -0
  400. package/dist/next/storage.js.map +1 -0
  401. package/dist/next/useListViewParam.d.ts +12 -0
  402. package/dist/next/useListViewParam.d.ts.map +1 -0
  403. package/dist/next/useListViewParam.js +45 -0
  404. package/dist/next/useListViewParam.js.map +1 -0
  405. package/dist/next/useNextDrawerUrlAdapter.d.ts +11 -0
  406. package/dist/next/useNextDrawerUrlAdapter.d.ts.map +1 -0
  407. package/dist/next/useNextDrawerUrlAdapter.js +28 -0
  408. package/dist/next/useNextDrawerUrlAdapter.js.map +1 -0
  409. package/dist/next/useNextUrlStateAdapter.d.ts +20 -0
  410. package/dist/next/useNextUrlStateAdapter.d.ts.map +1 -0
  411. package/dist/next/useNextUrlStateAdapter.js +28 -0
  412. package/dist/next/useNextUrlStateAdapter.js.map +1 -0
  413. package/dist/notify-sonner/Toaster.d.ts +8 -0
  414. package/dist/notify-sonner/Toaster.d.ts.map +1 -0
  415. package/dist/notify-sonner/Toaster.js +24 -0
  416. package/dist/notify-sonner/Toaster.js.map +1 -0
  417. package/dist/notify-sonner/index.d.ts +3 -0
  418. package/dist/notify-sonner/index.d.ts.map +1 -0
  419. package/dist/notify-sonner/index.js +4 -0
  420. package/dist/notify-sonner/index.js.map +1 -0
  421. package/dist/notify-sonner/sonnerNotifications.d.ts +4 -0
  422. package/dist/notify-sonner/sonnerNotifications.d.ts.map +1 -0
  423. package/dist/notify-sonner/sonnerNotifications.js +29 -0
  424. package/dist/notify-sonner/sonnerNotifications.js.map +1 -0
  425. package/dist/page/DefinitionList.d.ts +24 -0
  426. package/dist/page/DefinitionList.d.ts.map +1 -0
  427. package/dist/page/DefinitionList.js +20 -0
  428. package/dist/page/DefinitionList.js.map +1 -0
  429. package/dist/page/DetailHeader.d.ts +26 -0
  430. package/dist/page/DetailHeader.d.ts.map +1 -0
  431. package/dist/page/DetailHeader.js +14 -0
  432. package/dist/page/DetailHeader.js.map +1 -0
  433. package/dist/page/EditableCard.d.ts +39 -0
  434. package/dist/page/EditableCard.d.ts.map +1 -0
  435. package/dist/page/EditableCard.js +21 -0
  436. package/dist/page/EditableCard.js.map +1 -0
  437. package/dist/page/EntityDetailShell.d.ts +48 -0
  438. package/dist/page/EntityDetailShell.d.ts.map +1 -0
  439. package/dist/page/EntityDetailShell.js +25 -0
  440. package/dist/page/EntityDetailShell.js.map +1 -0
  441. package/dist/page/EntityListPage.d.ts +30 -0
  442. package/dist/page/EntityListPage.d.ts.map +1 -0
  443. package/dist/page/EntityListPage.js +12 -0
  444. package/dist/page/EntityListPage.js.map +1 -0
  445. package/dist/page/EntityMetadata.d.ts +21 -0
  446. package/dist/page/EntityMetadata.d.ts.map +1 -0
  447. package/dist/page/EntityMetadata.js +39 -0
  448. package/dist/page/EntityMetadata.js.map +1 -0
  449. package/dist/page/EntityTabs.d.ts +38 -0
  450. package/dist/page/EntityTabs.d.ts.map +1 -0
  451. package/dist/page/EntityTabs.js +51 -0
  452. package/dist/page/EntityTabs.js.map +1 -0
  453. package/dist/page/PageFrame.d.ts +25 -0
  454. package/dist/page/PageFrame.d.ts.map +1 -0
  455. package/dist/page/PageFrame.js +11 -0
  456. package/dist/page/PageFrame.js.map +1 -0
  457. package/dist/page/PageHeader.d.ts +27 -0
  458. package/dist/page/PageHeader.d.ts.map +1 -0
  459. package/dist/page/PageHeader.js +16 -0
  460. package/dist/page/PageHeader.js.map +1 -0
  461. package/dist/page/PageLayout.d.ts +15 -0
  462. package/dist/page/PageLayout.d.ts.map +1 -0
  463. package/dist/page/PageLayout.js +10 -0
  464. package/dist/page/PageLayout.js.map +1 -0
  465. package/dist/page/PageToolbar.d.ts +73 -0
  466. package/dist/page/PageToolbar.d.ts.map +1 -0
  467. package/dist/page/PageToolbar.js +49 -0
  468. package/dist/page/PageToolbar.js.map +1 -0
  469. package/dist/page/SectionHeader.d.ts +27 -0
  470. package/dist/page/SectionHeader.d.ts.map +1 -0
  471. package/dist/page/SectionHeader.js +14 -0
  472. package/dist/page/SectionHeader.js.map +1 -0
  473. package/dist/page/StatusCallout.d.ts +28 -0
  474. package/dist/page/StatusCallout.d.ts.map +1 -0
  475. package/dist/page/StatusCallout.js +35 -0
  476. package/dist/page/StatusCallout.js.map +1 -0
  477. package/dist/page/index.d.ts +29 -0
  478. package/dist/page/index.d.ts.map +1 -0
  479. package/dist/page/index.js +20 -0
  480. package/dist/page/index.js.map +1 -0
  481. package/dist/page/links.d.ts +18 -0
  482. package/dist/page/links.d.ts.map +1 -0
  483. package/dist/page/links.js +4 -0
  484. package/dist/page/links.js.map +1 -0
  485. package/dist/primitives/alert.d.ts +17 -0
  486. package/dist/primitives/alert.d.ts.map +1 -0
  487. package/dist/primitives/alert.js +36 -0
  488. package/dist/primitives/alert.js.map +1 -0
  489. package/dist/primitives/badge.d.ts +10 -0
  490. package/dist/primitives/badge.d.ts.map +1 -0
  491. package/dist/primitives/badge.js +30 -0
  492. package/dist/primitives/badge.js.map +1 -0
  493. package/dist/primitives/breadcrumb.d.ts +12 -0
  494. package/dist/primitives/breadcrumb.d.ts.map +1 -0
  495. package/dist/primitives/breadcrumb.js +33 -0
  496. package/dist/primitives/breadcrumb.js.map +1 -0
  497. package/dist/primitives/button.d.ts +12 -0
  498. package/dist/primitives/button.d.ts.map +1 -0
  499. package/dist/primitives/button.js +51 -0
  500. package/dist/primitives/button.js.map +1 -0
  501. package/dist/primitives/card.d.ts +10 -0
  502. package/dist/primitives/card.d.ts.map +1 -0
  503. package/dist/primitives/card.js +29 -0
  504. package/dist/primitives/card.js.map +1 -0
  505. package/dist/primitives/checkbox.d.ts +5 -0
  506. package/dist/primitives/checkbox.d.ts.map +1 -0
  507. package/dist/primitives/checkbox.js +11 -0
  508. package/dist/primitives/checkbox.js.map +1 -0
  509. package/dist/primitives/cn.d.ts +4 -0
  510. package/dist/primitives/cn.d.ts.map +1 -0
  511. package/dist/primitives/cn.js +5 -0
  512. package/dist/primitives/cn.js.map +1 -0
  513. package/dist/primitives/collapsible.d.ts +6 -0
  514. package/dist/primitives/collapsible.d.ts.map +1 -0
  515. package/dist/primitives/collapsible.js +14 -0
  516. package/dist/primitives/collapsible.js.map +1 -0
  517. package/dist/primitives/command.d.ts +19 -0
  518. package/dist/primitives/command.d.ts.map +1 -0
  519. package/dist/primitives/command.js +38 -0
  520. package/dist/primitives/command.js.map +1 -0
  521. package/dist/primitives/dialog.d.ts +18 -0
  522. package/dist/primitives/dialog.d.ts.map +1 -0
  523. package/dist/primitives/dialog.js +44 -0
  524. package/dist/primitives/dialog.js.map +1 -0
  525. package/dist/primitives/dropdown-menu.d.ts +23 -0
  526. package/dist/primitives/dropdown-menu.d.ts.map +1 -0
  527. package/dist/primitives/dropdown-menu.js +48 -0
  528. package/dist/primitives/dropdown-menu.js.map +1 -0
  529. package/dist/primitives/fieldSurface.d.ts +23 -0
  530. package/dist/primitives/fieldSurface.d.ts.map +1 -0
  531. package/dist/primitives/fieldSurface.js +23 -0
  532. package/dist/primitives/fieldSurface.js.map +1 -0
  533. package/dist/primitives/index.d.ts +26 -0
  534. package/dist/primitives/index.d.ts.map +1 -0
  535. package/dist/primitives/index.js +27 -0
  536. package/dist/primitives/index.js.map +1 -0
  537. package/dist/primitives/input.d.ts +12 -0
  538. package/dist/primitives/input.d.ts.map +1 -0
  539. package/dist/primitives/input.js +20 -0
  540. package/dist/primitives/input.js.map +1 -0
  541. package/dist/primitives/label.d.ts +5 -0
  542. package/dist/primitives/label.d.ts.map +1 -0
  543. package/dist/primitives/label.js +10 -0
  544. package/dist/primitives/label.js.map +1 -0
  545. package/dist/primitives/listSurface.d.ts +8 -0
  546. package/dist/primitives/listSurface.d.ts.map +1 -0
  547. package/dist/primitives/listSurface.js +8 -0
  548. package/dist/primitives/listSurface.js.map +1 -0
  549. package/dist/primitives/popover.d.ts +11 -0
  550. package/dist/primitives/popover.d.ts.map +1 -0
  551. package/dist/primitives/popover.js +31 -0
  552. package/dist/primitives/popover.js.map +1 -0
  553. package/dist/primitives/portal.d.ts +16 -0
  554. package/dist/primitives/portal.d.ts.map +1 -0
  555. package/dist/primitives/portal.js +9 -0
  556. package/dist/primitives/portal.js.map +1 -0
  557. package/dist/primitives/select.d.ts +21 -0
  558. package/dist/primitives/select.d.ts.map +1 -0
  559. package/dist/primitives/select.js +50 -0
  560. package/dist/primitives/select.js.map +1 -0
  561. package/dist/primitives/separator.d.ts +5 -0
  562. package/dist/primitives/separator.d.ts.map +1 -0
  563. package/dist/primitives/separator.js +10 -0
  564. package/dist/primitives/separator.js.map +1 -0
  565. package/dist/primitives/sheet.d.ts +15 -0
  566. package/dist/primitives/sheet.d.ts.map +1 -0
  567. package/dist/primitives/sheet.js +46 -0
  568. package/dist/primitives/sheet.js.map +1 -0
  569. package/dist/primitives/skeleton.d.ts +3 -0
  570. package/dist/primitives/skeleton.d.ts.map +1 -0
  571. package/dist/primitives/skeleton.js +7 -0
  572. package/dist/primitives/skeleton.js.map +1 -0
  573. package/dist/primitives/switch.d.ts +7 -0
  574. package/dist/primitives/switch.d.ts.map +1 -0
  575. package/dist/primitives/switch.js +10 -0
  576. package/dist/primitives/switch.js.map +1 -0
  577. package/dist/primitives/table.d.ts +11 -0
  578. package/dist/primitives/table.d.ts.map +1 -0
  579. package/dist/primitives/table.js +30 -0
  580. package/dist/primitives/table.js.map +1 -0
  581. package/dist/primitives/textarea.d.ts +4 -0
  582. package/dist/primitives/textarea.d.ts.map +1 -0
  583. package/dist/primitives/textarea.js +11 -0
  584. package/dist/primitives/textarea.js.map +1 -0
  585. package/dist/primitives/tooltip.d.ts +8 -0
  586. package/dist/primitives/tooltip.d.ts.map +1 -0
  587. package/dist/primitives/tooltip.js +21 -0
  588. package/dist/primitives/tooltip.js.map +1 -0
  589. package/dist/provider/AdminUiProvider.d.ts +9 -0
  590. package/dist/provider/AdminUiProvider.d.ts.map +1 -0
  591. package/dist/provider/AdminUiProvider.js +47 -0
  592. package/dist/provider/AdminUiProvider.js.map +1 -0
  593. package/dist/provider/adminUiContext.d.ts +6 -0
  594. package/dist/provider/adminUiContext.d.ts.map +1 -0
  595. package/dist/provider/adminUiContext.js +9 -0
  596. package/dist/provider/adminUiContext.js.map +1 -0
  597. package/dist/provider/index.d.ts +5 -0
  598. package/dist/provider/index.d.ts.map +1 -0
  599. package/dist/provider/index.js +5 -0
  600. package/dist/provider/index.js.map +1 -0
  601. package/dist/provider/storageKey.d.ts +4 -0
  602. package/dist/provider/storageKey.d.ts.map +1 -0
  603. package/dist/provider/storageKey.js +3 -0
  604. package/dist/provider/storageKey.js.map +1 -0
  605. package/dist/provider/types.d.ts +65 -0
  606. package/dist/provider/types.d.ts.map +1 -0
  607. package/dist/provider/types.js +2 -0
  608. package/dist/provider/types.js.map +1 -0
  609. package/dist/scripts/build-i18n-manifest.mjs +138 -0
  610. package/dist/scripts/check-radix.mjs +131 -0
  611. package/dist/scripts/check-tokens.mjs +236 -0
  612. package/dist/theme.css +48 -0
  613. package/dist/tokens.json +401 -0
  614. package/dist/translations/FormTranslatableFields.d.ts +30 -0
  615. package/dist/translations/FormTranslatableFields.d.ts.map +1 -0
  616. package/dist/translations/FormTranslatableFields.js +58 -0
  617. package/dist/translations/FormTranslatableFields.js.map +1 -0
  618. package/dist/translations/TranslatableField.d.ts +48 -0
  619. package/dist/translations/TranslatableField.d.ts.map +1 -0
  620. package/dist/translations/TranslatableField.js +44 -0
  621. package/dist/translations/TranslatableField.js.map +1 -0
  622. package/dist/translations/TranslatableInput.d.ts +14 -0
  623. package/dist/translations/TranslatableInput.d.ts.map +1 -0
  624. package/dist/translations/TranslatableInput.js +15 -0
  625. package/dist/translations/TranslatableInput.js.map +1 -0
  626. package/dist/translations/TranslatableMarkdown.d.ts +21 -0
  627. package/dist/translations/TranslatableMarkdown.d.ts.map +1 -0
  628. package/dist/translations/TranslatableMarkdown.js +12 -0
  629. package/dist/translations/TranslatableMarkdown.js.map +1 -0
  630. package/dist/translations/TranslationControls.d.ts +22 -0
  631. package/dist/translations/TranslationControls.d.ts.map +1 -0
  632. package/dist/translations/TranslationControls.js +31 -0
  633. package/dist/translations/TranslationControls.js.map +1 -0
  634. package/dist/translations/index.d.ts +31 -0
  635. package/dist/translations/index.d.ts.map +1 -0
  636. package/dist/translations/index.js +18 -0
  637. package/dist/translations/index.js.map +1 -0
  638. package/package.json +156 -3
@@ -0,0 +1,130 @@
1
+ {
2
+ "{count, plural, one {# validation error} other {# validation errors}}": "Second line of the red error toast after a failed save: how many fields the server rejected (the list is shown above the form).",
3
+ "{count, plural, one {This collection should contain # element or less.} other {This collection should contain # elements or less.}}": "Validation message from the server shown next to a form field (or in the error list above a form) after a failed save. The list field holds too many entries; # is the maximum number of entries.",
4
+ "{count, plural, one {This collection should contain # element or more.} other {This collection should contain # elements or more.}}": "Validation message from the server shown next to a form field (or in the error list above a form) after a failed save. The list field holds too few entries; # is the minimum number of entries.",
5
+ "{count, plural, one {This value is too long. It should have # character or less.} other {This value is too long. It should have # characters or less.}}": "Validation message from the server shown next to a form field (or in the error list above a form) after a failed save. The text entered is too long; # is the maximum number of characters.",
6
+ "{count, plural, one {This value is too short. It should have # character or more.} other {This value is too short. It should have # characters or more.}}": "Validation message from the server shown next to a form field (or in the error list above a form) after a failed save. The text entered is too short; # is the minimum number of characters.",
7
+ "{count, plural, one {This value should have exactly # character.} other {This value should have exactly # characters.}}": "Validation message from the server shown next to a form field (or in the error list above a form) after a failed save. The text must have exactly this many characters (e.g. a code).",
8
+ "{count, plural, other {# selected}}": "Label in the bulk-action bar of a list showing how many rows the user has ticked, e.g. '3 selected'. # is the number of selected rows.",
9
+ "%done% %count% %noun%": "Success toast after a bulk action finished on all selected rows. %done% is a past-tense verb like Deleted, %count% a number like 5, %noun% the item name like tracks.",
10
+ "%done% %succeeded% of %total% %noun% · %failed% failed": "Error toast after a bulk action where some rows failed. %done% is a verb like Deleted, %succeeded% e.g. 3, %total% e.g. 5, %noun% like tracks, %failed% e.g. 2.",
11
+ "%entity% not found or current authenticated Account is not authorized to access it": "Error message from the server when a record cannot be loaded: it does not exist or the signed-in user may not see it. %entity% is the technical English record type name (e.g. Campaign, Challenge) and stays as it is.",
12
+ "%label% (%count%)": "Button text of a bulk action in a list's selection bar: the action name followed by the number of selected rows, e.g. 'Delete (3)'. %label% is the action name, %count% the number of selected rows.",
13
+ "%label% from": "Accessible label of the start-date input in a date-range filter. %label% is the filter caption, e.g. \"Starts at\", so the result reads \"Starts at from\".",
14
+ "%label% to": "Accessible label of the end-date input in a date-range filter. %label% is the filter caption, e.g. \"Ends at\", so the result reads \"Ends at to\".",
15
+ "%name% is not an image": "Error message shown when a picked file is not an image during upload. %name% is the file name, for example holiday-photo.pdf.",
16
+ "%progress% %nouns%… %done%/%total%": "Progress toast of a bulk action running on many selected rows. %progress% is a verb like Deleting, %nouns% the plural item name like tracks, %done%/%total% e.g. 2/5.",
17
+ "%title% sections": "Accessible name (screen reader label) of the sub-tab bar below a section heading. %title% is the section title, e.g. Top riders.",
18
+ "Account not found or current Auth Account is not authorized to access it": "Error message from the server when a user account cannot be loaded: it does not exist or the signed-in user may not see it.",
19
+ "Add %entity%": "Label of the primary button at the top right of a list page that creates a new item. %entity% is the singular item name, e.g. World or Push Notification. Imperative.",
20
+ "All__filter-option": "On the admin UI Showcase page (Maintenance), label of the quick-filter pill that clears the status filter and shows every item. Single word.",
21
+ "Auto-translate": "Button next to a translatable text field that fills the other languages automatically from the current text by AI. Imperative.",
22
+ "breadcrumb__navigation": "Accessible name (screen reader label) of the breadcrumb navigation trail at the top of admin pages; use a short lowercase noun like the English.",
23
+ "Bulk actions": "Accessible name (screen-reader label) of the toolbar that appears above a list when rows are selected, holding actions that apply to all selected rows.",
24
+ "Cancel": "Button at the bottom of the world form that discards the entries and returns to the world list; asks for confirmation if there are unsaved changes.",
25
+ "Cancel__confirm-dialog": "Button on the left of a generic confirmation dialog that dismisses it without doing the action. Shown when the caller did not set its own label.",
26
+ "Cancel__media-picker": "Footer button of the media picker dialog; click to close the dialog without changing the chosen media item.",
27
+ "Cancelled": "Status badge label (short pill) in lists, cards and detail views, describing the state of a partner contract. Keep it short, like a status word.",
28
+ "Change__media-field-action": "Button label under a media field preview; click to open the picker and replace the currently chosen image. Shown only when an image is already set.",
29
+ "Clear %label%": "Accessible label of the small X button inside a text filter that empties it. %label% is the filter name, e.g. Name or Account ID.",
30
+ "Clear all": "Button at the bottom of a multi-select dropdown that deselects every option in the list.",
31
+ "Clear all translations": "Tooltip and accessible label of the small trash-can icon button in the label row of a translatable text field in an admin form; it deletes the text of every language of that field after a confirmation.",
32
+ "Clear all translations?": "Title of a confirmation dialog in translatable text fields of admin forms; asks whether to delete the texts of every language of the field.",
33
+ "Clear all__translations-action": "Button that deletes the text of every language of one translatable field, and the confirm button of the dialog that follows. Imperative.",
34
+ "Clear filters": "Button in a list toolbar that resets all active filters at once. It only appears while at least one filter is set.",
35
+ "Clear search": "Outlined button in the empty state of a list when a search or filter found nothing; it resets the search so all rows show again. Imperative.",
36
+ "Clear__selection-action": "Link-style button in the bulk-action bar that deselects all currently selected list rows. Imperative, short.",
37
+ "Close__dialog-close-button": "Close button of a popup dialog, either an icon with screen-reader text in the top corner or a footer button. Imperative: dismisses the dialog.",
38
+ "Close__drawer-close-button": "Accessible label (screen reader and tooltip) of the small X icon button in the corner of a right-side form drawer. Closes the drawer and may ask to discard unsaved changes.",
39
+ "Close__sheet-close-button": "Screen-reader label of the X icon in the corner of a side panel (sheet) that slides in from the screen edge. Imperative: closes the panel.",
40
+ "Collapse %title%": "Accessible label (screen reader and tooltip) of the round chevron button that collapses a group panel on a dashboard. %title% is the group name, for example 'Running'.",
41
+ "Command Palette": "Hidden (screen-reader only) title of the command palette dialog, a search popup for jumping to pages and actions in the admin app.",
42
+ "Confirm__confirm-dialog": "Button on the right of a generic confirmation dialog that carries out the action asked about. Shown when the caller did not set its own label.",
43
+ "Copy ID": "Tooltip of the small copy icon button next to an ID in a list table; copies the ID to the clipboard. Imperative.",
44
+ "Copy ID %id%": "Accessible label (screen reader and tooltip) of the small button that copies the record ID to the clipboard, shown in the metadata block of every detail screen. %id% is the record ID, for example 4711 or a UUID. Imperative tone.",
45
+ "Created__entity-metadata": "Label in the metadata block of a detail screen, placed before the date and time the record was created, for example 'Created 12 Nov 2026, 10:15'. Keep it short.",
46
+ "Discard changes?": "Title of the confirmation dialog shown when the user closes a form drawer that has unsaved edits. Phrased as a question.",
47
+ "Discard__unsaved-changes-confirm": "Destructive confirm button of the discard dialog; clicking it closes the form and loses the unsaved edits. Imperative verb.",
48
+ "Dismiss": "Button in the AI translation panel that hides the finished progress list of the last translation run. Imperative.",
49
+ "Done": "Status badge of one language in the translation progress list: the translation finished successfully.",
50
+ "Edit__action": "Default accessible name and tooltip of the small pencil icon button in the top-right corner of a settings card; clicking it opens the edit form for that card. Imperative verb.",
51
+ "Enter %language% text…": "Placeholder of a text input in a translatable field; %language% is the name of the active language tab, e.g. 'German'.",
52
+ "Export to Excel": "Sample text of the outline button specimen in the UI showcase; imperative, exports a list as a spreadsheet. Maintenance UI showcase screen, Buttons section.",
53
+ "Failed": "Status badge label (short pill) in lists, cards and detail views, describing the state of a push notification or mail delivery attempt. Keep it short, like a status word. Also used for other status families.",
54
+ "Filters": "Button text in a list toolbar that opens or closes the collapsible panel with extra filters. Hidden on phones, where only the icon shows.",
55
+ "Form sections": "Accessible label (aria-label) of the small sticky navigation bar at the top of a long admin form (challenge, campaign) that jumps between its panels.",
56
+ "Grid view": "Tooltip and accessible label of the icon button in a list toolbar that switches the list to a grid of cards.",
57
+ "ID__entity-id": "Label in the metadata block of a detail screen, placed before the record's unique identifier, for example 'ID 4711'. Keep it short, uppercase-friendly.",
58
+ "Informal__writing-style": "Writing style option: texts address the user informally (German 'du', French 'tu'). Shown in the language menu and account forms. One word, an adjective.",
59
+ "Keep editing": "Cancel button of the discard dialog; clicking it returns the user to the open form so no edits are lost. Imperative.",
60
+ "Languages": "Navigation menu entry in the admin sidebar that opens the Languages area. Keep it short, as it is a single menu label.",
61
+ "Loading": "Accessible label of a spinning loader shown while a chart on the activity statistics screens is loading. Screen readers announce it.",
62
+ "Loading more": "Accessible name (screen-reader label) of the spinner at the end of a list while the next page of rows is being loaded during infinite scroll.",
63
+ "More actions": "Accessible label (tooltip for screen readers) of an icon-only button showing three dots that opens more actions. Sample in the UI showcase, Buttons section.",
64
+ "More__breadcrumb-ellipsis": "Screen reader only text next to the '...' icon in a shortened breadcrumb trail; announces that further, hidden path levels exist.",
65
+ "No": "Option of a yes/no filter in the filter panel of a list; selecting it shows only records where the flag is not set.",
66
+ "No changes": "Status text next to the Save and Cancel buttons of an edit form, shown while nothing has been changed since the form was loaded or saved.",
67
+ "No image": "Empty-state text inside a dashed placeholder box where an image preview would be, shown when a media item has no image or the file fails to load.",
68
+ "No media items found": "Empty-state message in the media picker dialog when the search or filter returns no media items (images) to choose from.",
69
+ "No results": "Empty-state message inside an opened dropdown picker when the typed search matches none of the options.",
70
+ "No__boolean-flag": "Default label of a yes/no flag cell in a list table, shown with a grey minus when the flag is off, e.g. Active column.",
71
+ "Nothing here yet": "Empty-state message shown in a list or table that contains no entries at all, before any search or filter is applied.",
72
+ "Nothing matches your search": "Empty-state message shown in a list or table when the current search or filters return no rows. A Clear search button is shown below it.",
73
+ "One or more of the given values is invalid.": "Validation message from the server shown next to a form field (or in the error list above a form) after a failed save. A multi-select field contains a value that is not one of the allowed options.",
74
+ "Open original of %title%": "Screen-reader label of the small link on a media tile that opens the full-size original in a new tab; %title% is the item's title, e.g. 'Logo'.",
75
+ "Property \"%propertyName%\" in class \"%className%\" has to be unique but value \"%value%\" is already in use": "Validation message from the server shown next to a form field (or in the error list above a form) after a failed save. Another record already uses this value for a field that must be unique. %propertyName% and %className% are technical English names, %value% is the entered value; all stay as they are.",
76
+ "Refresh token invalid": "Error message from the server when the stored login session can no longer be renewed; the user has to sign in again.",
77
+ "Refreshing list": "Accessible name (screen-reader label) of the thin loading bar shown over a list's toolbar while the list reloads in the background.",
78
+ "Remove %label%": "Accessible label of the small X button on a chip in a multi-select, removing that choice. %label% is the chosen value, for example German.",
79
+ "Remove__media-field-action": "Button label next to a media field; click to clear the chosen image reference from the form. Takes effect only after the form is saved.",
80
+ "Request contains invalid data": "Title of the red error toast and error box above a form after the server rejected a save because one or more fields are invalid (the fields are listed below it).",
81
+ "Save changes": "Sample text of the primary button specimen in the UI showcase; imperative, a typical save action. Maintenance UI showcase screen, Buttons section.",
82
+ "Search": "Accessible label of a search input field in a list toolbar, read by screen readers. Use the plain noun or verb for searching.",
83
+ "Search for a command to run...": "Hidden (screen-reader only) description of the command palette dialog, telling the user to search for a command or page to run.",
84
+ "Search…": "Placeholder text inside a search box above a list or table, and the generic placeholder of a dropdown's search field. Ends with an ellipsis.",
85
+ "Sections": "Accessible name (screen reader label) of the sub-tab bar below a section heading when the heading is not plain text.",
86
+ "Sections__tab-navigation": "Default accessible name (screen reader label, not visible) of the tab bar under the header of a detail screen, whose tabs switch between sections of the record such as General, Teams or Rides. Plural noun.",
87
+ "Select %title%": "Screen-reader label of a media tile button in the picker dialog; %title% is the media item's title, e.g. 'Summer campaign banner'.",
88
+ "Select all": "Button at the bottom of a multi-select dropdown that selects every option in the list at once.",
89
+ "Select all loaded": "Tooltip and accessible label of the checkbox in the table header that selects every row currently loaded in the list. Used for bulk actions.",
90
+ "Select row %rowKey%": "Accessible label of a row checkbox in a selectable table, read by screen readers. %rowKey% is the row's technical ID, for example 1042.",
91
+ "Select__media-field-action": "Button label under an empty media field; click to open the picker and choose an existing media item (image). Shown when nothing is chosen yet.",
92
+ "Select…": "Placeholder of a multi-select dropdown while nothing is picked. Prompts the user to open the list and choose values. Ends with an ellipsis.",
93
+ "Show all (%count%)": "Small floating pill button at the bottom edge of a group panel; clicking it reveals all rows. %count% is the total number of rows, for example 12.",
94
+ "Show less": "Small floating pill button at the bottom edge of an expanded group panel; clicking it shows only the first few rows again.",
95
+ "Sort by__media-picker": "Small label above the sort dropdown in the media picker dialog; the dropdown picks the order of the media tiles, e.g. newest first.",
96
+ "Sort__media-picker": "Fallback label of the sort dropdown button in the media picker dialog, shown when no sort option is currently selected.",
97
+ "Table view": "Tooltip and accessible label of the icon button in a list toolbar that switches the list to a table with rows and columns.",
98
+ "The file is not an image this browser can read": "Error message shown when a picked file cannot be decoded as an image by the browser while preparing an upload in the media picker.",
99
+ "The value you selected is not a valid choice.": "Validation message from the server shown next to a form field (or in the error list above a form) after a failed save. A dropdown field contains a value that is not one of the allowed options.",
100
+ "This removes the text for every language. It is gone once you save.": "Body of the confirmation dialog for clearing all translations of one field; warns that the removal becomes permanent after saving the form.",
101
+ "This value is not a valid email address.": "Validation message from the server shown next to a form field (or in the error list above a form) after a failed save. The entered e-mail address is not a valid e-mail address.",
102
+ "This value is not a valid URL.": "Validation message from the server shown next to a form field (or in the error list above a form) after a failed save. The entered web address (link) is not a valid URL.",
103
+ "This value should be %limit% or less.": "Validation message from the server shown next to a form field (or in the error list above a form) after a failed save. The number is above the allowed maximum %limit%.",
104
+ "This value should be %limit% or more.": "Validation message from the server shown next to a form field (or in the error list above a form) after a failed save. The number is below the allowed minimum %limit%.",
105
+ "This value should be a valid number.": "Validation message from the server shown next to a form field (or in the error list above a form) after a failed save. A number field contains something that is not a number.",
106
+ "This value should be between %min% and %max%.": "Validation message from the server shown next to a form field (or in the error list above a form) after a failed save. The number is outside the allowed range; %min% and %max% are the limits.",
107
+ "This value should not be blank.": "Validation message from the server shown next to a form field (or in the error list above a form) after a failed save. A required text field was left empty or contains only spaces.",
108
+ "This value should not be null.": "Validation message from the server shown next to a form field (or in the error list above a form) after a failed save. A required field was left empty.",
109
+ "Toggle filters": "Accessible label of the Filters button in a list toolbar that opens or closes the filter panel while no filter is set.",
110
+ "Toggle filters (%count% active)": "Accessible label of the Filters button in a list toolbar when filters are set. %count% is the number of active filters, for example 3.",
111
+ "Token authentication failed": "Error message from the server when the login session token is invalid or expired; the user has to sign in again.",
112
+ "Translate to": "Form label above the language chips in the AI translation panel of an admin form; the chips are the target languages.",
113
+ "Translate to selected locales": "Button in the AI translation panel that starts translating the texts into all language chips the user selected. Imperative.",
114
+ "Translating": "Status badge of one language in the translation progress list: the translation request is running right now.",
115
+ "Translating…": "Label of a button while the automatic AI translation is running for the selected languages; progress state, keep the ellipsis.",
116
+ "Translation failed": "Fallback error message shown in the tooltip of a failed language in the translation progress list when the server gave no message.",
117
+ "Unauthorized": "Short error message from the server when the request needs a valid login (session expired or missing); the user has to sign in again.",
118
+ "Unknown error": "Fallback text for a single server-side validation message that arrived without any error text. Shown in the error list above a form after a failed save.",
119
+ "Unreadable file": "Error message shown when a picked file could not be read by the browser during an image upload in the media picker.",
120
+ "Unsaved changes": "Status text next to the Save and Cancel buttons of an edit form, shown while the user has changed fields that are not saved yet.",
121
+ "Updated__entity-metadata": "Label in the metadata block of a detail screen, placed before the date and time the record was last modified, for example 'Updated 12 Nov 2026, 10:15'. Keep it short.",
122
+ "Upload__media-picker": "Button in the media picker dialog header; click to choose image files from the computer and upload them as new media items.",
123
+ "Uploading…__media-picker": "Button label in the media picker dialog while selected image files are being uploaded; the button is disabled meanwhile.",
124
+ "View": "Label and accessible name of the toggle on the Home screen that switches between the Timeline and Kanban views.",
125
+ "Waiting": "Short form of the status 'Waiting for Customer', on a compact status button in the support ticket sidebar. Keep it to one short word.",
126
+ "Wrong credentials.": "Error message on the login page when the e-mail address / username or the password is wrong.",
127
+ "Yes": "Option of a yes/no filter in the filter panel of a list; selecting it shows only records where the flag is set.",
128
+ "Yes__boolean-flag": "Default label of a yes/no flag cell in a list table, shown with a green check when the flag is on, e.g. Active column.",
129
+ "You have unsaved changes. Closing now will lose them.": "Body text of the discard confirmation dialog, warning that closing the form drawer throws away the user's unsaved edits."
130
+ }
@@ -0,0 +1,7 @@
1
+ export { formatIcuPlural, isIcuPlural } from './plural.js';
2
+ export { getTranslationState, m, setTranslations, subscribeTranslations, type TranslateOptions, translateText, translationKeyOf, type WritingStyle, } from './store.js';
3
+ export { Translate, type TranslateProps } from './Translate.js';
4
+ export { type TranslateFn, useTranslate } from './useTranslate.js';
5
+ export { formatUiNumber, getUiLocale, uiDateTimeFormat, uiNumberFormat, uiRelativeTimeFormat } from './format.js';
6
+ export { FRAMEWORK_STATIC_MESSAGES, type ServerMessagePattern, translateDddErrorBody, translateDddRequestError, translateServerMessage, } from './serverMessages.js';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EACL,mBAAmB,EACnB,CAAC,EACD,eAAe,EACf,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,aAAa,EACb,gBAAgB,EAChB,KAAK,YAAY,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,KAAK,WAAW,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,gBAAgB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAClH,OAAO,EACL,yBAAyB,EACzB,KAAK,oBAAoB,EACzB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { formatIcuPlural, isIcuPlural } from "./plural.js";
2
+ export { getTranslationState, m, setTranslations, subscribeTranslations, translateText, translationKeyOf, } from "./store.js";
3
+ export { Translate } from "./Translate.js";
4
+ export { useTranslate } from "./useTranslate.js";
5
+ export { formatUiNumber, getUiLocale, uiDateTimeFormat, uiNumberFormat, uiRelativeTimeFormat } from "./format.js";
6
+ export { FRAMEWORK_STATIC_MESSAGES, translateDddErrorBody, translateDddRequestError, translateServerMessage, } from "./serverMessages.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EACL,mBAAmB,EACnB,CAAC,EACD,eAAe,EACf,qBAAqB,EAErB,aAAa,EACb,gBAAgB,GAEjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,SAAS,EAAuB,MAAM,gBAAiB,CAAC;AACjE,OAAO,EAAoB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,gBAAgB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAClH,OAAO,EACL,yBAAyB,EAEzB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Locale-bound `Intl` formatters, cached per locale and options (pure: no store, testable under plain Node). The app
3
+ * calls the UI-language wrappers in `./format` instead.
4
+ */
5
+ /** The `Intl` locale of a UI language code: English prints as `en-GB` (24-hour clock, day before month). */
6
+ export declare const toIntlLocale: (languageCode: string | null | undefined) => string;
7
+ export declare const dateTimeFormatFor: (locale: string, options?: Intl.DateTimeFormatOptions) => Intl.DateTimeFormat;
8
+ export declare const numberFormatFor: (locale: string, options?: Intl.NumberFormatOptions) => Intl.NumberFormat;
9
+ export declare const relativeTimeFormatFor: (locale: string, options?: Intl.RelativeTimeFormatOptions) => Intl.RelativeTimeFormat;
10
+ //# sourceMappingURL=localeFormat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localeFormat.d.ts","sourceRoot":"","sources":["../../src/i18n/localeFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,4GAA4G;AAC5G,eAAO,MAAM,YAAY,GAAI,cAAc,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAQtE,CAAC;AAuBF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM,EAAE,UAAS,IAAI,CAAC,qBAA0B,KAAG,IAAI,CAAC,cACb,CAAC;AAEtF,eAAO,MAAM,eAAe,GAAI,QAAQ,MAAM,EAAE,UAAS,IAAI,CAAC,mBAAwB,KAAG,IAAI,CAAC,YACT,CAAC;AAEtF,eAAO,MAAM,qBAAqB,GAChC,QAAQ,MAAM,EACd,UAAS,IAAI,CAAC,yBAA8B,KAC3C,IAAI,CAAC,kBAAiH,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Locale-bound `Intl` formatters, cached per locale and options (pure: no store, testable under plain Node). The app
3
+ * calls the UI-language wrappers in `./format` instead.
4
+ */
5
+ /** The `Intl` locale of a UI language code: English prints as `en-GB` (24-hour clock, day before month). */
6
+ export const toIntlLocale = (languageCode) => {
7
+ const code = (languageCode ?? '').trim();
8
+ if (!code || code === 'en')
9
+ return 'en-GB';
10
+ try {
11
+ return Intl.getCanonicalLocales(code)[0] ?? 'en-GB';
12
+ }
13
+ catch {
14
+ return 'en-GB';
15
+ }
16
+ };
17
+ const cache = new Map();
18
+ const cached = (kind, locale, options, create) => {
19
+ const key = `${kind}|${locale}|${JSON.stringify(options)}`;
20
+ const existing = cache.get(key);
21
+ if (existing)
22
+ return existing;
23
+ let format;
24
+ try {
25
+ format = create(locale);
26
+ }
27
+ catch {
28
+ format = create('en-GB');
29
+ }
30
+ cache.set(key, format);
31
+ return format;
32
+ };
33
+ export const dateTimeFormatFor = (locale, options = {}) => cached('date', locale, options, target => new Intl.DateTimeFormat(target, options));
34
+ export const numberFormatFor = (locale, options = {}) => cached('number', locale, options, target => new Intl.NumberFormat(target, options));
35
+ export const relativeTimeFormatFor = (locale, options = {}) => cached('relative', locale, options, target => new Intl.RelativeTimeFormat(target, options));
36
+ //# sourceMappingURL=localeFormat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localeFormat.js","sourceRoot":"","sources":["../../src/i18n/localeFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,4GAA4G;AAC5G,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,YAAuC,EAAU,EAAE;IAC9E,MAAM,IAAI,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACzC,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,OAAO,CAAC;IAC3C,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC;IACtD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,KAAK,GAAG,IAAI,GAAG,EAA6E,CAAC;AAEnG,MAAM,MAAM,GAAG,CACb,IAAY,EACZ,MAAc,EACd,OA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
+ /**
2
+ * ICU plural formatting.
3
+ *
4
+ * One key carries every plural form: `{count, plural, one {# item} other {# items}}`.
5
+ * Pure TypeScript with no imports.
6
+ */
7
+ /** True when `message` holds exactly one ICU plural block with an `other` branch (text around it is allowed). */
8
+ export declare const isIcuPlural: (message: string) => boolean;
9
+ /**
10
+ * Picks the plural branch for `count` in `locale` and substitutes `#`.
11
+ * An exact `=N` branch wins, then the CLDR category, then `other`.
12
+ * Text before and after the block is kept. Any message without a plural block is returned unchanged.
13
+ */
14
+ export declare const formatIcuPlural: (message: string, count: number, locale: string) => string;
15
+ //# sourceMappingURL=plural.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plural.d.ts","sourceRoot":"","sources":["../../src/i18n/plural.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAoEH,iHAAiH;AACjH,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,KAAG,OACZ,CAAC;AAEnC;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,SAAS,MAAM,EACf,OAAO,MAAM,EACb,QAAQ,MAAM,KACb,MAoBF,CAAC"}
@@ -0,0 +1,95 @@
1
+ /**
2
+ * ICU plural formatting.
3
+ *
4
+ * One key carries every plural form: `{count, plural, one {# item} other {# items}}`.
5
+ * Pure TypeScript with no imports.
6
+ */
7
+ const PLURAL_HEAD = /^\{\s*[A-Za-z_][\w]*\s*,\s*plural\s*,/;
8
+ /** Reads `{ ... }` starting at `start` (which must point at `{`); returns the inner text and the index after `}`. */
9
+ const readBraced = (source, start) => {
10
+ let depth = 0;
11
+ for (let index = start; index < source.length; index += 1) {
12
+ const char = source[index];
13
+ if (char === '{')
14
+ depth += 1;
15
+ else if (char === '}') {
16
+ depth -= 1;
17
+ if (depth === 0) {
18
+ return { inner: source.slice(start + 1, index), end: index + 1 };
19
+ }
20
+ }
21
+ }
22
+ return null;
23
+ };
24
+ /** Parses `<category> {text} <category> {text} ...`; null when the shape is not a plural body. */
25
+ const parseBranches = (body) => {
26
+ const branches = {};
27
+ let cursor = 0;
28
+ while (cursor < body.length) {
29
+ const selector = /^\s*(=\d+|zero|one|two|few|many|other)\s*\{/.exec(body.slice(cursor));
30
+ if (!selector) {
31
+ return body.slice(cursor).trim() === '' ? branches : null;
32
+ }
33
+ const braceStart = cursor + selector[0].length - 1;
34
+ const braced = readBraced(body, braceStart);
35
+ if (!braced)
36
+ return null;
37
+ branches[selector[1]] = braced.inner;
38
+ cursor = braced.end;
39
+ }
40
+ return branches;
41
+ };
42
+ const PLURAL_START = /\{\s*[A-Za-z_][\w]*\s*,\s*plural\s*,/;
43
+ /**
44
+ * Finds the one ICU plural block in `message` and splits it into the text before it, its
45
+ * branches and the text after it (`%name%: {count, plural, one {# order} other {# orders}}`).
46
+ * Null when there is no plural block, more than one, or the block has no `other` branch.
47
+ */
48
+ const parseIcuPlural = (message) => {
49
+ const start = PLURAL_START.exec(message);
50
+ if (!start)
51
+ return null;
52
+ const braced = readBraced(message, start.index);
53
+ if (!braced)
54
+ return null;
55
+ const head = PLURAL_HEAD.exec(message.slice(start.index));
56
+ if (!head)
57
+ return null;
58
+ const branches = parseBranches(braced.inner.slice(head[0].length - 1));
59
+ if (!branches || !('other' in branches))
60
+ return null;
61
+ const suffix = message.slice(braced.end);
62
+ if (PLURAL_START.test(suffix))
63
+ return null;
64
+ return { prefix: message.slice(0, start.index), branches, suffix };
65
+ };
66
+ /** True when `message` holds exactly one ICU plural block with an `other` branch (text around it is allowed). */
67
+ export const isIcuPlural = (message) => parseIcuPlural(message) !== null;
68
+ /**
69
+ * Picks the plural branch for `count` in `locale` and substitutes `#`.
70
+ * An exact `=N` branch wins, then the CLDR category, then `other`.
71
+ * Text before and after the block is kept. Any message without a plural block is returned unchanged.
72
+ */
73
+ export const formatIcuPlural = (message, count, locale) => {
74
+ const parts = parseIcuPlural(message);
75
+ if (!parts)
76
+ return message;
77
+ const { prefix, branches, suffix } = parts;
78
+ let category = 'other';
79
+ try {
80
+ category = new Intl.PluralRules(locale).select(count);
81
+ }
82
+ catch {
83
+ category = 'other';
84
+ }
85
+ const branch = branches[`=${count}`] ?? branches[category] ?? branches.other;
86
+ let formattedCount = String(count);
87
+ try {
88
+ formattedCount = new Intl.NumberFormat(locale).format(count);
89
+ }
90
+ catch {
91
+ formattedCount = String(count);
92
+ }
93
+ return prefix + branch.replace(/#/g, formattedCount) + suffix;
94
+ };
95
+ //# sourceMappingURL=plural.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plural.js","sourceRoot":"","sources":["../../src/i18n/plural.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,GAAG,uCAAuC,CAAC;AAI5D,qHAAqH;AACrH,MAAM,UAAU,GAAG,CACjB,MAAc,EACd,KAAa,EAC0B,EAAE;IACzC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,IAAI,KAAK,GAAG,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QAC1D,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC3B,IAAI,IAAI,KAAK,GAAG;YAAE,KAAK,IAAI,CAAC,CAAC;aACxB,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACtB,KAAK,IAAI,CAAC,CAAC;YACX,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;gBAChB,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE,KAAK,CAAC,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC;YACnE,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,kGAAkG;AAClG,MAAM,aAAa,GAAG,CAAC,IAAY,EAAyB,EAAE;IAC5D,MAAM,QAAQ,GAAmB,EAAE,CAAC;IACpC,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,OAAO,MAAM,GAAG,IAAI,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;IAE7E,IAAI,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACnC,IAAI,CAAC;QACH,cAAc,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/D,CAAC;IAAC,MAAM,CAAC;QACP,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IACD,OAAO,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,cAAc,CAAC,GAAG,MAAM,CAAC;AAChE,CAAC,CAAC"}
@@ -0,0 +1,26 @@
1
+ export interface ServerMessagePattern {
2
+ /** Matches the whole English message; the capture groups are the values, in `names` order. */
3
+ pattern: RegExp;
4
+ /** The UI text key (`%name%` placeholders, or an ICU plural with `count`). */
5
+ template: string;
6
+ names: readonly string[];
7
+ }
8
+ /** Framework messages without a variable part: exported as keys, translated by their text. */
9
+ export declare const FRAMEWORK_STATIC_MESSAGES: readonly ["Request contains invalid data", "This value should not be null.", "This value should not be blank.", "The value you selected is not a valid choice.", "One or more of the given values is invalid.", "This value is not a valid email address.", "This value is not a valid URL.", "This value should be a valid number.", "Account not found or current Auth Account is not authorized to access it", "Wrong credentials.", "Refresh token invalid", "Token authentication failed", "Unauthorized"];
10
+ /**
11
+ * One server message in the UI language: the template with its values when the server sent one, else a message
12
+ * recognised by `patterns` (the caller's own, e.g. a screen's diagnostic texts) or a framework message, else the English
13
+ * text as key (unknown → the text itself).
14
+ */
15
+ export declare const translateServerMessage: (message: string, messageTemplate?: unknown, messageValues?: unknown, patterns?: readonly ServerMessagePattern[]) => string;
16
+ /**
17
+ * A DDD error body with `error` and every validation violation's `errorMessage` in the UI language (a new object; the
18
+ * English message stays in `errorEnglish`). Anything that is not a DDD error body comes back unchanged.
19
+ */
20
+ export declare const translateDddErrorBody: (body: unknown) => unknown;
21
+ /**
22
+ * An RTK Query error (`{ status, data }`) with its DDD body translated; anything else unchanged. Base queries apply it
23
+ * to every failed request, so every screen's error toast, banner and inline message shows the UI language.
24
+ */
25
+ export declare const translateDddRequestError: <TError>(error: TError) => TError;
26
+ //# sourceMappingURL=serverMessages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverMessages.d.ts","sourceRoot":"","sources":["../../src/i18n/serverMessages.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,oBAAoB;IACnC,8FAA8F;IAC9F,OAAO,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B;AAED,8FAA8F;AAC9F,eAAO,MAAM,yBAAyB,ifAc5B,CAAC;AAgFX;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,SAAS,MAAM,EACf,kBAAkB,OAAO,EACzB,gBAAgB,OAAO,EACvB,WAAU,SAAS,oBAAoB,EAAO,KAC7C,MAcF,CAAC;AAqBF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM,OAAO,KAAG,OASrD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,MAAM,EAAE,OAAO,MAAM,KAAG,MAIhE,CAAC"}
@@ -0,0 +1,146 @@
1
+ import { m, translateText } from "./store.js";
2
+ /** Framework messages without a variable part: exported as keys, translated by their text. */
3
+ export const FRAMEWORK_STATIC_MESSAGES = [
4
+ m('Request contains invalid data'),
5
+ m('This value should not be null.'),
6
+ m('This value should not be blank.'),
7
+ m('The value you selected is not a valid choice.'),
8
+ m('One or more of the given values is invalid.'),
9
+ m('This value is not a valid email address.'),
10
+ m('This value is not a valid URL.'),
11
+ m('This value should be a valid number.'),
12
+ m('Account not found or current Auth Account is not authorized to access it'),
13
+ m('Wrong credentials.'),
14
+ m('Refresh token invalid'),
15
+ m('Token authentication failed'),
16
+ m('Unauthorized'),
17
+ ];
18
+ const FRAMEWORK_MESSAGE_PATTERNS = [
19
+ {
20
+ pattern: /^(.+?) not found or current authenticated Account is not authorized to access it$/,
21
+ template: m('%entity% not found or current authenticated Account is not authorized to access it'),
22
+ names: ['entity'],
23
+ },
24
+ {
25
+ pattern: /^This value is too long\. It should have (\d+) characters? or less\.$/,
26
+ template: m('{count, plural, one {This value is too long. It should have # character or less.} other {This value is too long. It should have # characters or less.}}'),
27
+ names: ['count'],
28
+ },
29
+ {
30
+ pattern: /^This value is too short\. It should have (\d+) characters? or more\.$/,
31
+ template: m('{count, plural, one {This value is too short. It should have # character or more.} other {This value is too short. It should have # characters or more.}}'),
32
+ names: ['count'],
33
+ },
34
+ {
35
+ pattern: /^This value should have exactly (\d+) characters?\.$/,
36
+ template: m('{count, plural, one {This value should have exactly # character.} other {This value should have exactly # characters.}}'),
37
+ names: ['count'],
38
+ },
39
+ {
40
+ pattern: /^This collection should contain (\d+) elements? or more\.$/,
41
+ template: m('{count, plural, one {This collection should contain # element or more.} other {This collection should contain # elements or more.}}'),
42
+ names: ['count'],
43
+ },
44
+ {
45
+ pattern: /^This collection should contain (\d+) elements? or less\.$/,
46
+ template: m('{count, plural, one {This collection should contain # element or less.} other {This collection should contain # elements or less.}}'),
47
+ names: ['count'],
48
+ },
49
+ {
50
+ pattern: /^This value should be between (.+) and (.+)\.$/,
51
+ template: m('This value should be between %min% and %max%.'),
52
+ names: ['min', 'max'],
53
+ },
54
+ { pattern: /^This value should be (.+) or more\.$/, template: m('This value should be %limit% or more.'), names: ['limit'] },
55
+ { pattern: /^This value should be (.+) or less\.$/, template: m('This value should be %limit% or less.'), names: ['limit'] },
56
+ {
57
+ pattern: /^Property "(.+)" in class "(.+)" has to be unique but value "(.*)" is already in use$/,
58
+ template: m('Property "%propertyName%" in class "%className%" has to be unique but value "%value%" is already in use'),
59
+ names: ['propertyName', 'className', 'value'],
60
+ },
61
+ ];
62
+ const isRecord = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
63
+ /** The template values as `translateText` replacements (strings and finite numbers only; anything else is dropped). */
64
+ const toReplacements = (values) => {
65
+ if (!isRecord(values))
66
+ return {};
67
+ const replacements = {};
68
+ for (const [name, value] of Object.entries(values)) {
69
+ if (typeof value === 'string' || (typeof value === 'number' && Number.isFinite(value)))
70
+ replacements[name] = value;
71
+ else if (typeof value === 'boolean')
72
+ replacements[name] = String(value);
73
+ }
74
+ return replacements;
75
+ };
76
+ const translateTemplate = (template, values) => {
77
+ const { count, ...replacements } = values;
78
+ const numericCount = typeof count === 'number' ? count : typeof count === 'string' && /^\d+$/.test(count) ? Number(count) : undefined;
79
+ return translateText(template, {
80
+ replacements: numericCount === undefined ? values : replacements,
81
+ ...(numericCount === undefined ? {} : { count: numericCount }),
82
+ });
83
+ };
84
+ /**
85
+ * One server message in the UI language: the template with its values when the server sent one, else a message
86
+ * recognised by `patterns` (the caller's own, e.g. a screen's diagnostic texts) or a framework message, else the English
87
+ * text as key (unknown → the text itself).
88
+ */
89
+ export const translateServerMessage = (message, messageTemplate, messageValues, patterns = []) => {
90
+ if (typeof messageTemplate === 'string' && messageTemplate) {
91
+ return translateTemplate(messageTemplate, toReplacements(messageValues));
92
+ }
93
+ for (const { pattern, template, names } of [...patterns, ...FRAMEWORK_MESSAGE_PATTERNS]) {
94
+ const match = pattern.exec(message);
95
+ if (!match)
96
+ continue;
97
+ const values = {};
98
+ names.forEach((name, index) => {
99
+ values[name] = match[index + 1] ?? '';
100
+ });
101
+ return translateTemplate(template, values);
102
+ }
103
+ return translateText(message);
104
+ };
105
+ const translateViolations = (validationErrors) => {
106
+ if (!isRecord(validationErrors) || !Array.isArray(validationErrors.elements))
107
+ return validationErrors;
108
+ return {
109
+ ...validationErrors,
110
+ elements: validationErrors.elements.map(group => isRecord(group) && Array.isArray(group.elements)
111
+ ? {
112
+ ...group,
113
+ elements: group.elements.map(violation => isRecord(violation) && typeof violation.errorMessage === 'string' && violation.errorMessage
114
+ ? { ...violation, errorMessage: translateServerMessage(violation.errorMessage) }
115
+ : violation),
116
+ }
117
+ : group),
118
+ };
119
+ };
120
+ /**
121
+ * A DDD error body with `error` and every validation violation's `errorMessage` in the UI language (a new object; the
122
+ * English message stays in `errorEnglish`). Anything that is not a DDD error body comes back unchanged.
123
+ */
124
+ export const translateDddErrorBody = (body) => {
125
+ if (!isRecord(body) || typeof body.error !== 'string' || !body.error)
126
+ return body;
127
+ const translated = {
128
+ ...body,
129
+ error: translateServerMessage(body.error, body.messageTemplate, body.messageValues),
130
+ errorEnglish: body.error,
131
+ };
132
+ if ('validationErrors' in body)
133
+ translated.validationErrors = translateViolations(body.validationErrors);
134
+ return translated;
135
+ };
136
+ /**
137
+ * An RTK Query error (`{ status, data }`) with its DDD body translated; anything else unchanged. Base queries apply it
138
+ * to every failed request, so every screen's error toast, banner and inline message shows the UI language.
139
+ */
140
+ export const translateDddRequestError = (error) => {
141
+ if (!isRecord(error) || !('data' in error))
142
+ return error;
143
+ const data = translateDddErrorBody(error.data);
144
+ return data === error.data ? error : { ...error, data };
145
+ };
146
+ //# sourceMappingURL=serverMessages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverMessages.js","sourceRoot":"","sources":["../../src/i18n/serverMessages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAuB9C,8FAA8F;AAC9F,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,CAAC,CAAC,+BAA+B,CAAC;IAClC,CAAC,CAAC,gCAAgC,CAAC;IACnC,CAAC,CAAC,iCAAiC,CAAC;IACpC,CAAC,CAAC,+CAA+C,CAAC;IAClD,CAAC,CAAC,6CAA6C,CAAC;IAChD,CAAC,CAAC,0CAA0C,CAAC;IAC7C,CAAC,CAAC,gCAAgC,CAAC;IACnC,CAAC,CAAC,sCAAsC,CAAC;IACzC,CAAC,CAAC,0EAA0E,CAAC;IAC7E,CAAC,CAAC,oBAAoB,CAAC;IACvB,CAAC,CAAC,uBAAuB,CAAC;IAC1B,CAAC,CAAC,6BAA6B,CAAC;IAChC,CAAC,CAAC,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AAG,CAAS,KAAa,EAAU,EAAE;IACxE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACzD,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/C,OAAO,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC;AAC1D,CAAC,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * UI text store: the key is the English text, an ambiguous word adds a
3
+ * context (`Open` + `bill-status` → key `Open__bill-status`). The bundle of the active language is a flat map
4
+ * `key → text`; a key without a translation shows its English text. Module state with subscribers, so `useTranslate`
5
+ * re-renders on a language or bundle change.
6
+ */
7
+ export type WritingStyle = 'FORMAL' | 'INFORMAL';
8
+ export interface TranslateOptions {
9
+ /** Disambiguates a short word (`Open` as a status vs. as an action); the key becomes `<text>__<context>`. */
10
+ context?: string;
11
+ /** Selects the branch of an ICU plural message and fills `#` and `%count%`. */
12
+ count?: number;
13
+ /** Values for `%name%` placeholders. */
14
+ replacements?: Record<string, string | number>;
15
+ }
16
+ interface TranslationState {
17
+ languageCode: string;
18
+ writingStyle: WritingStyle;
19
+ translations: Readonly<Record<string, string>>;
20
+ version: number;
21
+ }
22
+ export declare const subscribeTranslations: (listener: () => void) => (() => void);
23
+ export declare const getTranslationState: () => TranslationState;
24
+ /** Replaces the active bundle (the loader calls it once the language's map arrived; English = empty map). */
25
+ export declare const setTranslations: (languageCode: string, writingStyle: WritingStyle, translations: Readonly<Record<string, string>>) => void;
26
+ /** The store key of a text with its optional context. */
27
+ export declare const translationKeyOf: (text: string, context?: string) => string;
28
+ /** Translates `text` in the active language (English text when no translation exists). */
29
+ export declare const translateText: (text: string, options?: TranslateOptions) => string;
30
+ /**
31
+ * Marks an English UI text that is defined outside a component (status maps, column definitions, option lists) for
32
+ * the key export, unchanged. The component that renders it translates it with `t(value)`.
33
+ */
34
+ export declare const m: <TText extends string>(text: TText) => TText;
35
+ export {};
36
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/i18n/store.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEjD,MAAM,WAAW,gBAAgB;IAC/B,6GAA6G;IAC7G,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CAChD;AAED,UAAU,gBAAgB;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C,OAAO,EAAE,MAAM,CAAC;CACjB;AASD,eAAO,MAAM,qBAAqB,GAAI,UAAU,MAAM,IAAI,KAAG,CAAC,MAAM,IAAI,CAGvE,CAAC;AAEF,eAAO,MAAM,mBAAmB,QAAO,gBAAyB,CAAC;AAEjE,6GAA6G;AAC7G,eAAO,MAAM,eAAe,GAC1B,cAAc,MAAM,EACpB,cAAc,YAAY,EAC1B,cAAc,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAC7C,IAGF,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,EAAE,UAAU,MAAM,KAAG,MAAkD,CAAC;AAOrH,0FAA0F;AAC1F,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,EAAE,UAAS,gBAAqB,KAAG,MAQ5E,CAAC;AAEF;;;GAGG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