@stackcraftmx/calcita 0.47.0 → 0.51.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 (488) hide show
  1. package/README.md +173 -12
  2. package/cli/calcita.js +15 -0
  3. package/cli/checkTexts.js +209 -0
  4. package/cli/packageVersions.js +6 -1
  5. package/cli/projectFiles.js +4 -2
  6. package/cli/templates/project/README.md.tpl +21 -1
  7. package/cli/templates/project/eslint.config.js.tpl +27 -0
  8. package/cli/templates/project/src/app/appTexts.js.tpl +2 -1
  9. package/cli/templates/project/src/core/publicPaths.js.tpl +10 -2
  10. package/cli/templates/project/vite.config.js.tpl +8 -1
  11. package/dist/DataTable/AuditTrailDialog.js +3 -2
  12. package/dist/DataTable/AuditTrailDialog.js.map +1 -1
  13. package/dist/DataTable/ColumnFilters/HeaderFilterPopover.js +3 -2
  14. package/dist/DataTable/ColumnFilters/HeaderFilterPopover.js.map +1 -1
  15. package/dist/DataTable/ColumnFilters/MultiSelectColumnFilter.js +3 -2
  16. package/dist/DataTable/ColumnFilters/MultiSelectColumnFilter.js.map +1 -1
  17. package/dist/DataTable/ColumnFilters/SortableFilterHeader.js +3 -2
  18. package/dist/DataTable/ColumnFilters/SortableFilterHeader.js.map +1 -1
  19. package/dist/DataTable/EmptyState.js +3 -2
  20. package/dist/DataTable/EmptyState.js.map +1 -1
  21. package/dist/DataTable/FilterChips.js +3 -2
  22. package/dist/DataTable/FilterChips.js.map +1 -1
  23. package/dist/DataTable/GoToPage.js +3 -2
  24. package/dist/DataTable/GoToPage.js.map +1 -1
  25. package/dist/DataTable/ServerTable.js +95 -28
  26. package/dist/DataTable/ServerTable.js.map +1 -1
  27. package/dist/DataTable/ServerTableFilterDrawer.js +8 -3
  28. package/dist/DataTable/ServerTableFilterDrawer.js.map +1 -1
  29. package/dist/DataTable/StackedCell.js +60 -0
  30. package/dist/DataTable/StackedCell.js.map +1 -0
  31. package/dist/DataTable/TableCardsView.js +88 -0
  32. package/dist/DataTable/TableCardsView.js.map +1 -0
  33. package/dist/DataTable/columnWidths.js +30 -0
  34. package/dist/DataTable/columnWidths.js.map +1 -0
  35. package/dist/DataTable/columns.js +47 -1
  36. package/dist/DataTable/columns.js.map +1 -1
  37. package/dist/DataTable/fixedColumns.js +24 -0
  38. package/dist/DataTable/fixedColumns.js.map +1 -0
  39. package/dist/DataTable/useTableView.js +29 -0
  40. package/dist/DataTable/useTableView.js.map +1 -0
  41. package/dist/access/PermissionMatrix.js +3 -2
  42. package/dist/access/PermissionMatrix.js.map +1 -1
  43. package/dist/account/AccountProvider.js +1 -1
  44. package/dist/account/AccountSecuritySection.js +3 -2
  45. package/dist/account/AccountSecuritySection.js.map +1 -1
  46. package/dist/account/DemoTotpCodeButton.js +3 -2
  47. package/dist/account/DemoTotpCodeButton.js.map +1 -1
  48. package/dist/account/ProfileScreen.js +3 -2
  49. package/dist/account/ProfileScreen.js.map +1 -1
  50. package/dist/account/SignInScreen.js +3 -2
  51. package/dist/account/SignInScreen.js.map +1 -1
  52. package/dist/appShell/AccountMenu.js +3 -2
  53. package/dist/appShell/AccountMenu.js.map +1 -1
  54. package/dist/appShell/AppLayout.js +3 -2
  55. package/dist/appShell/AppLayout.js.map +1 -1
  56. package/dist/appShell/AppearanceSettings.js +3 -2
  57. package/dist/appShell/AppearanceSettings.js.map +1 -1
  58. package/dist/appShell/AuthLayout.js +3 -2
  59. package/dist/appShell/AuthLayout.js.map +1 -1
  60. package/dist/appShell/BarActionButton.js +11 -4
  61. package/dist/appShell/BarActionButton.js.map +1 -1
  62. package/dist/appShell/BarActions.js +3 -2
  63. package/dist/appShell/BarActions.js.map +1 -1
  64. package/dist/appShell/BarCapsule.js +3 -2
  65. package/dist/appShell/BarCapsule.js.map +1 -1
  66. package/dist/appShell/BarSearch.js +3 -2
  67. package/dist/appShell/BarSearch.js.map +1 -1
  68. package/dist/appShell/HeaderTools.js +3 -2
  69. package/dist/appShell/HeaderTools.js.map +1 -1
  70. package/dist/appShell/MobileTabBar.js +3 -2
  71. package/dist/appShell/MobileTabBar.js.map +1 -1
  72. package/dist/appShell/SettingsMenu.js +3 -2
  73. package/dist/appShell/SettingsMenu.js.map +1 -1
  74. package/dist/appShell/SideMenu.js +3 -2
  75. package/dist/appShell/SideMenu.js.map +1 -1
  76. package/dist/appShell/SideMenuEntry.js +3 -2
  77. package/dist/appShell/SideMenuEntry.js.map +1 -1
  78. package/dist/appShell/SubmenuActionsMenu.js +3 -2
  79. package/dist/appShell/SubmenuActionsMenu.js.map +1 -1
  80. package/dist/appShell/TabBarEditor.js +3 -2
  81. package/dist/appShell/TabBarEditor.js.map +1 -1
  82. package/dist/appShell/TopMenu.js +3 -2
  83. package/dist/appShell/TopMenu.js.map +1 -1
  84. package/dist/appShell/Wordmark.js +3 -2
  85. package/dist/appShell/Wordmark.js.map +1 -1
  86. package/dist/auth/PasswordChecklist.js +3 -2
  87. package/dist/auth/PasswordChecklist.js.map +1 -1
  88. package/dist/calendar/EventCalendar.js +3 -2
  89. package/dist/calendar/EventCalendar.js.map +1 -1
  90. package/dist/calendar/EventDetails.js +3 -2
  91. package/dist/calendar/EventDetails.js.map +1 -1
  92. package/dist/datePickers/DateInput.js +28 -22
  93. package/dist/datePickers/DateInput.js.map +1 -1
  94. package/dist/datePickers/DateTimeInput.js +33 -27
  95. package/dist/datePickers/DateTimeInput.js.map +1 -1
  96. package/dist/datePickers/MonthInput.js +27 -21
  97. package/dist/datePickers/MonthInput.js.map +1 -1
  98. package/dist/datePickers/TimeInput.js +26 -20
  99. package/dist/datePickers/TimeInput.js.map +1 -1
  100. package/dist/datePickers/usePickerField.js +5 -4
  101. package/dist/datePickers/usePickerField.js.map +1 -1
  102. package/dist/downloads/DownloadManager.js +3 -2
  103. package/dist/downloads/DownloadManager.js.map +1 -1
  104. package/dist/feedback/ConfirmDialog.js +3 -2
  105. package/dist/feedback/ConfirmDialog.js.map +1 -1
  106. package/dist/feedback/ModalWaiting.js +3 -2
  107. package/dist/feedback/ModalWaiting.js.map +1 -1
  108. package/dist/feedback/NewBuildNotice.js +3 -2
  109. package/dist/feedback/NewBuildNotice.js.map +1 -1
  110. package/dist/filepond/FileDropzone.js +3 -2
  111. package/dist/filepond/FileDropzone.js.map +1 -1
  112. package/dist/forms/FormProblemAlert.js +3 -2
  113. package/dist/forms/FormProblemAlert.js.map +1 -1
  114. package/dist/forms/SubmitButton.js +7 -2
  115. package/dist/forms/SubmitButton.js.map +1 -1
  116. package/dist/forms/auth/SignInForm.js +3 -2
  117. package/dist/forms/auth/SignInForm.js.map +1 -1
  118. package/dist/forms/fieldRules.js +30 -0
  119. package/dist/forms/fieldRules.js.map +1 -0
  120. package/dist/forms/security/SecondStepForm.js +3 -2
  121. package/dist/forms/security/SecondStepForm.js.map +1 -1
  122. package/dist/forms/security/TwoStepVerificationCard.js +3 -2
  123. package/dist/forms/security/TwoStepVerificationCard.js.map +1 -1
  124. package/dist/forms/useValidationText.js +18 -0
  125. package/dist/forms/useValidationText.js.map +1 -0
  126. package/dist/forms/validation.js +35 -31
  127. package/dist/forms/validation.js.map +1 -1
  128. package/dist/forms/validationMessages.js +64 -7
  129. package/dist/forms/validationMessages.js.map +1 -1
  130. package/dist/forms.js +3 -0
  131. package/dist/forms.js.map +1 -1
  132. package/dist/hookForm/FormProblemAlert.js +3 -2
  133. package/dist/hookForm/FormProblemAlert.js.map +1 -1
  134. package/dist/hookForm/SubmitButton.js +7 -2
  135. package/dist/hookForm/SubmitButton.js.map +1 -1
  136. package/dist/inbox/InboxLayout.js +3 -2
  137. package/dist/inbox/InboxLayout.js.map +1 -1
  138. package/dist/inbox/MessageList.js +3 -2
  139. package/dist/inbox/MessageList.js.map +1 -1
  140. package/dist/inbox/MessageView.js +3 -2
  141. package/dist/inbox/MessageView.js.map +1 -1
  142. package/dist/index.js +186 -163
  143. package/dist/index.js.map +1 -1
  144. package/dist/inputs/CatalogInput.js +32 -25
  145. package/dist/inputs/CatalogInput.js.map +1 -1
  146. package/dist/inputs/CheckboxGroupInput.js +8 -5
  147. package/dist/inputs/CheckboxGroupInput.js.map +1 -1
  148. package/dist/inputs/ColorInput.js +7 -4
  149. package/dist/inputs/ColorInput.js.map +1 -1
  150. package/dist/inputs/FieldFrame.js +10 -4
  151. package/dist/inputs/FieldFrame.js.map +1 -1
  152. package/dist/inputs/FormSection.js +1 -1
  153. package/dist/inputs/MaskedInput.js +1 -0
  154. package/dist/inputs/MaskedInput.js.map +1 -1
  155. package/dist/inputs/NumberInput.js +29 -24
  156. package/dist/inputs/NumberInput.js.map +1 -1
  157. package/dist/inputs/RepeatingFields.js +8 -5
  158. package/dist/inputs/RepeatingFields.js.map +1 -1
  159. package/dist/inputs/SelectInput.js +8 -5
  160. package/dist/inputs/SelectInput.js.map +1 -1
  161. package/dist/inputs/TextInput.js +5 -3
  162. package/dist/inputs/TextInput.js.map +1 -1
  163. package/dist/inputs/TransferListInput.js +8 -5
  164. package/dist/inputs/TransferListInput.js.map +1 -1
  165. package/dist/inputs/WizardLayout.js +3 -2
  166. package/dist/inputs/WizardLayout.js.map +1 -1
  167. package/dist/kanban/KanbanBoard.js +3 -2
  168. package/dist/kanban/KanbanBoard.js.map +1 -1
  169. package/dist/legal/CookieNotice.js +3 -2
  170. package/dist/legal/CookieNotice.js.map +1 -1
  171. package/dist/legal/TermsAcceptanceDialog.js +3 -2
  172. package/dist/legal/TermsAcceptanceDialog.js.map +1 -1
  173. package/dist/locales/en.js +24 -0
  174. package/dist/locales/en.js.map +1 -1
  175. package/dist/locales/es.js +24 -0
  176. package/dist/locales/es.js.map +1 -1
  177. package/dist/maps/MapView.js +3 -2
  178. package/dist/maps/MapView.js.map +1 -1
  179. package/dist/mexico/CfdiSummary.js +3 -2
  180. package/dist/mexico/CfdiSummary.js.map +1 -1
  181. package/dist/mexico/EfirmaFields.js +3 -2
  182. package/dist/mexico/EfirmaFields.js.map +1 -1
  183. package/dist/mexico/mexicoIdentifiers.js +5 -0
  184. package/dist/mexico/mexicoIdentifiers.js.map +1 -1
  185. package/dist/mexico/mexicoRules.js +9 -4
  186. package/dist/mexico/mexicoRules.js.map +1 -1
  187. package/dist/mexico.js +4 -2
  188. package/dist/pwa/InstallAppSetting.js +3 -2
  189. package/dist/pwa/InstallAppSetting.js.map +1 -1
  190. package/dist/pwa/InstallInstructionsDialog.js +3 -2
  191. package/dist/pwa/InstallInstructionsDialog.js.map +1 -1
  192. package/dist/pwa/InstallPromptBanner.js +3 -2
  193. package/dist/pwa/InstallPromptBanner.js.map +1 -1
  194. package/dist/react-hook-form.js +3 -0
  195. package/dist/react-hook-form.js.map +1 -1
  196. package/dist/richText/RichTextEditor.js +7 -4
  197. package/dist/richText/RichTextEditor.js.map +1 -1
  198. package/dist/richText/RichTextView.js +3 -2
  199. package/dist/richText/RichTextView.js.map +1 -1
  200. package/dist/security/ActivityLog.js +3 -2
  201. package/dist/security/ActivityLog.js.map +1 -1
  202. package/dist/security/RecoveryCodesDialog.js +3 -2
  203. package/dist/security/RecoveryCodesDialog.js.map +1 -1
  204. package/dist/security/SessionsCard.js +3 -2
  205. package/dist/security/SessionsCard.js.map +1 -1
  206. package/dist/table.js +21 -2
  207. package/dist/table.js.map +1 -1
  208. package/dist/theme/themePieces.js +70 -4
  209. package/dist/theme/themePieces.js.map +1 -1
  210. package/dist/toolkit/ToolkitProvider.js +8 -1
  211. package/dist/toolkit/ToolkitProvider.js.map +1 -1
  212. package/dist/toolkit/browserNavigation.js +19 -4
  213. package/dist/toolkit/browserNavigation.js.map +1 -1
  214. package/dist/toolkit/combineTexts.js +32 -0
  215. package/dist/toolkit/combineTexts.js.map +1 -0
  216. package/dist/toolkit/hashNavigation.js +17 -3
  217. package/dist/toolkit/hashNavigation.js.map +1 -1
  218. package/dist/toolkit/navigationPaths.js +15 -0
  219. package/dist/toolkit/navigationPaths.js.map +1 -1
  220. package/dist/toolkit/pathIndex.js +66 -0
  221. package/dist/toolkit/pathIndex.js.map +1 -0
  222. package/dist/toolkit/toolkitSettings.js +19 -1
  223. package/dist/toolkit/toolkitSettings.js.map +1 -1
  224. package/dist/types/DataTable/AuditTrailDialog.d.ts +6 -17
  225. package/dist/types/DataTable/ColumnFilters/HeaderFilterPopover.d.ts +6 -5
  226. package/dist/types/DataTable/ColumnFilters/MultiSelectColumnFilter.d.ts +6 -9
  227. package/dist/types/DataTable/ColumnFilters/SortableFilterHeader.d.ts +6 -14
  228. package/dist/types/DataTable/EmptyState.d.ts +6 -9
  229. package/dist/types/DataTable/FilterChips.d.ts +6 -11
  230. package/dist/types/DataTable/GoToPage.d.ts +6 -9
  231. package/dist/types/DataTable/ServerTable.d.ts +16 -80
  232. package/dist/types/DataTable/ServerTableFilterDrawer.d.ts +6 -13
  233. package/dist/types/DataTable/StackedCell.d.ts +12 -0
  234. package/dist/types/DataTable/TableCardsView.d.ts +27 -0
  235. package/dist/types/DataTable/columnWidths.d.ts +21 -0
  236. package/dist/types/DataTable/columns.d.ts +111 -0
  237. package/dist/types/DataTable/fixedColumns.d.ts +29 -0
  238. package/dist/types/DataTable/index.d.ts +6 -1
  239. package/dist/types/DataTable/useTableView.d.ts +22 -0
  240. package/dist/types/access/PermissionMatrix.d.ts +6 -10
  241. package/dist/types/account/AccountSecuritySection.d.ts +6 -7
  242. package/dist/types/account/DemoTotpCodeButton.d.ts +6 -5
  243. package/dist/types/account/ProfileScreen.d.ts +6 -18
  244. package/dist/types/account/SignInScreen.d.ts +6 -13
  245. package/dist/types/appShell/AccountMenu.d.ts +6 -11
  246. package/dist/types/appShell/AppLayout.d.ts +3 -40
  247. package/dist/types/appShell/AppearanceSettings.d.ts +6 -12
  248. package/dist/types/appShell/AuthLayout.d.ts +3 -11
  249. package/dist/types/appShell/BarActionButton.d.ts +6 -10
  250. package/dist/types/appShell/BarActions.d.ts +6 -15
  251. package/dist/types/appShell/BarCapsule.d.ts +6 -9
  252. package/dist/types/appShell/BarSearch.d.ts +6 -15
  253. package/dist/types/appShell/HeaderTools.d.ts +6 -16
  254. package/dist/types/appShell/MobileTabBar.d.ts +6 -13
  255. package/dist/types/appShell/SettingsMenu.d.ts +6 -10
  256. package/dist/types/appShell/SideMenu.d.ts +6 -20
  257. package/dist/types/appShell/SideMenuEntry.d.ts +6 -11
  258. package/dist/types/appShell/SubmenuActionsMenu.d.ts +6 -12
  259. package/dist/types/appShell/TabBarEditor.d.ts +6 -9
  260. package/dist/types/appShell/TopMenu.d.ts +6 -5
  261. package/dist/types/appShell/Wordmark.d.ts +6 -7
  262. package/dist/types/auth/PasswordChecklist.d.ts +6 -9
  263. package/dist/types/calendar/EventCalendar.d.ts +6 -23
  264. package/dist/types/calendar/EventDetails.d.ts +6 -10
  265. package/dist/types/datePickers/DateInput.d.ts +7 -22
  266. package/dist/types/datePickers/DateTimeInput.d.ts +7 -27
  267. package/dist/types/datePickers/MonthInput.d.ts +7 -21
  268. package/dist/types/datePickers/TimeInput.d.ts +7 -21
  269. package/dist/types/datePickers/usePickerField.d.ts +5 -1
  270. package/dist/types/downloads/DownloadManager.d.ts +6 -6
  271. package/dist/types/feedback/ConfirmDialog.d.ts +6 -18
  272. package/dist/types/feedback/ModalWaiting.d.ts +6 -9
  273. package/dist/types/feedback/NewBuildNotice.d.ts +6 -10
  274. package/dist/types/filepond/FileDropzone.d.ts +6 -29
  275. package/dist/types/forms/FormProblemAlert.d.ts +6 -5
  276. package/dist/types/forms/SubmitButton.d.ts +6 -6
  277. package/dist/types/forms/auth/SignInForm.d.ts +6 -11
  278. package/dist/types/forms/fieldRules.d.ts +44 -0
  279. package/dist/types/forms/index.d.ts +1 -0
  280. package/dist/types/forms/security/SecondStepForm.d.ts +6 -14
  281. package/dist/types/forms/security/TwoStepVerificationCard.d.ts +6 -21
  282. package/dist/types/forms/useValidationText.d.ts +12 -0
  283. package/dist/types/forms/validation.d.ts +117 -174
  284. package/dist/types/forms/validationMessages.d.ts +54 -6
  285. package/dist/types/forms.d.ts +1 -1
  286. package/dist/types/hookForm/FormProblemAlert.d.ts +6 -5
  287. package/dist/types/hookForm/SubmitButton.d.ts +6 -13
  288. package/dist/types/inbox/InboxLayout.d.ts +6 -17
  289. package/dist/types/inbox/MessageList.d.ts +6 -18
  290. package/dist/types/inbox/MessageView.d.ts +6 -14
  291. package/dist/types/index.d.ts +8 -1
  292. package/dist/types/inputs/CatalogInput.d.ts +7 -24
  293. package/dist/types/inputs/CheckboxGroupInput.d.ts +7 -18
  294. package/dist/types/inputs/ColorInput.d.ts +7 -16
  295. package/dist/types/inputs/FieldFrame.d.ts +6 -10
  296. package/dist/types/inputs/MaskedInput.d.ts +3 -0
  297. package/dist/types/inputs/NumberInput.d.ts +7 -20
  298. package/dist/types/inputs/RepeatingFields.d.ts +7 -28
  299. package/dist/types/inputs/SelectInput.d.ts +7 -20
  300. package/dist/types/inputs/TextInput.d.ts +3 -0
  301. package/dist/types/inputs/TransferListInput.d.ts +7 -20
  302. package/dist/types/inputs/WizardLayout.d.ts +6 -19
  303. package/dist/types/kanban/KanbanBoard.d.ts +6 -25
  304. package/dist/types/legal/CookieNotice.d.ts +6 -16
  305. package/dist/types/legal/TermsAcceptanceDialog.d.ts +6 -18
  306. package/dist/types/locales/en.d.ts +24 -0
  307. package/dist/types/locales/es.d.ts +24 -0
  308. package/dist/types/maps/MapView.d.ts +6 -17
  309. package/dist/types/mexico/CfdiSummary.d.ts +6 -11
  310. package/dist/types/mexico/EfirmaFields.d.ts +6 -16
  311. package/dist/types/mexico/mexicoIdentifiers.d.ts +7 -0
  312. package/dist/types/mexico/mexicoRules.d.ts +19 -3
  313. package/dist/types/mexico.d.ts +2 -2
  314. package/dist/types/pwa/InstallAppSetting.d.ts +6 -6
  315. package/dist/types/pwa/InstallInstructionsDialog.d.ts +6 -9
  316. package/dist/types/pwa/InstallPromptBanner.d.ts +6 -11
  317. package/dist/types/react-hook-form.d.ts +1 -0
  318. package/dist/types/richText/RichTextEditor.d.ts +7 -22
  319. package/dist/types/richText/RichTextView.d.ts +6 -9
  320. package/dist/types/security/ActivityLog.d.ts +6 -9
  321. package/dist/types/security/RecoveryCodesDialog.d.ts +6 -11
  322. package/dist/types/security/SessionsCard.d.ts +6 -11
  323. package/dist/types/table.d.ts +3 -1
  324. package/dist/types/theme/themePieces.d.ts +55 -3
  325. package/dist/types/toolkit/ToolkitProvider.d.ts +13 -1
  326. package/dist/types/toolkit/browserNavigation.d.ts +7 -3
  327. package/dist/types/toolkit/combineTexts.d.ts +6 -0
  328. package/dist/types/toolkit/hashNavigation.d.ts +4 -2
  329. package/dist/types/toolkit/navigationPaths.d.ts +35 -0
  330. package/dist/types/toolkit/pathIndex.d.ts +27 -0
  331. package/dist/types/toolkit/toolkitSettings.d.ts +7 -4
  332. package/dist/types/ui/actions/ActionsMenu.d.ts +9 -11
  333. package/dist/types/ui/actions/CopyButton.d.ts +6 -12
  334. package/dist/types/ui/actions/DownloadMenu.d.ts +6 -29
  335. package/dist/types/ui/actions/SecretField.d.ts +6 -11
  336. package/dist/types/ui/actions/SelectionActions.d.ts +6 -13
  337. package/dist/types/ui/cards/RecordCard.d.ts +6 -31
  338. package/dist/types/ui/cards/RecordCardSkeleton.d.ts +6 -11
  339. package/dist/types/ui/countdown/Countdown.d.ts +6 -15
  340. package/dist/types/ui/documents/PdfViewerDialog.d.ts +6 -13
  341. package/dist/types/ui/filters/DateRangeFilter.d.ts +6 -10
  342. package/dist/types/ui/filters/FilterDrawer.d.ts +6 -17
  343. package/dist/types/ui/filters/PeriodRangeSelector.d.ts +6 -13
  344. package/dist/types/ui/filters/QuickFilters.d.ts +6 -12
  345. package/dist/types/ui/help/HelpButton.d.ts +6 -10
  346. package/dist/types/ui/help/HelpCarouselDialog.d.ts +6 -14
  347. package/dist/types/ui/labels/MarkedText.d.ts +10 -0
  348. package/dist/types/ui/labels/Tag.d.ts +6 -12
  349. package/dist/types/ui/labels/markedTextPieces.d.ts +22 -0
  350. package/dist/types/ui/layout/CollapsibleSection.d.ts +6 -12
  351. package/dist/types/ui/layout/ContentDialog.d.ts +6 -10
  352. package/dist/types/ui/layout/DefinitionList.d.ts +6 -9
  353. package/dist/types/ui/layout/DetailHeader.d.ts +6 -10
  354. package/dist/types/ui/layout/ErrorPage.d.ts +6 -17
  355. package/dist/types/ui/layout/FullPageLoader.d.ts +6 -6
  356. package/dist/types/ui/layout/GlassPanel.d.ts +6 -8
  357. package/dist/types/ui/layout/PageHeader.d.ts +6 -10
  358. package/dist/types/ui/layout/PageHeading.d.ts +6 -11
  359. package/dist/types/ui/layout/ProfileHeader.d.ts +6 -11
  360. package/dist/types/ui/layout/ScrollableRow.d.ts +6 -13
  361. package/dist/types/ui/layout/SectionCard.d.ts +6 -8
  362. package/dist/types/ui/metrics/BarList.d.ts +6 -12
  363. package/dist/types/ui/metrics/CalendarHeatmap.d.ts +6 -19
  364. package/dist/types/ui/metrics/ChartTooltip.d.ts +6 -6
  365. package/dist/types/ui/metrics/ColumnChart.d.ts +6 -25
  366. package/dist/types/ui/metrics/LineChart.d.ts +6 -20
  367. package/dist/types/ui/metrics/MetricCard.d.ts +6 -17
  368. package/dist/types/ui/metrics/TableToggle.d.ts +6 -6
  369. package/dist/types/ui/metrics/chartParts.d.ts +15 -30
  370. package/dist/types/ui/navigation/BackButton.d.ts +6 -9
  371. package/dist/types/ui/navigation/ColorSchemeToggle.d.ts +6 -9
  372. package/dist/types/ui/navigation/FontSizeToggle.d.ts +6 -8
  373. package/dist/types/ui/navigation/LanguageToggle.d.ts +6 -8
  374. package/dist/types/ui/navigation/PageBreadcrumbs.d.ts +6 -7
  375. package/dist/types/ui/navigation/RouteTabs.d.ts +7 -12
  376. package/dist/types/ui/timeline/GroupedTimeline.d.ts +6 -23
  377. package/dist/types/upload/AttachmentsInput.d.ts +11 -1
  378. package/dist/types/upload/FileDropzone.d.ts +6 -21
  379. package/dist/types/upload/FileInput.d.ts +7 -24
  380. package/dist/types/upload/FileUploadInput.d.ts +7 -31
  381. package/dist/types/upload/ImageInput.d.ts +7 -25
  382. package/dist/types/upload/TemplateDownloadButton.d.ts +6 -18
  383. package/dist/ui/actions/ActionsMenu.js +14 -5
  384. package/dist/ui/actions/ActionsMenu.js.map +1 -1
  385. package/dist/ui/actions/CopyButton.js +8 -3
  386. package/dist/ui/actions/CopyButton.js.map +1 -1
  387. package/dist/ui/actions/DownloadMenu.js +3 -2
  388. package/dist/ui/actions/DownloadMenu.js.map +1 -1
  389. package/dist/ui/actions/SecretField.js +8 -3
  390. package/dist/ui/actions/SecretField.js.map +1 -1
  391. package/dist/ui/actions/SelectionActions.js +3 -2
  392. package/dist/ui/actions/SelectionActions.js.map +1 -1
  393. package/dist/ui/cards/RecordCard.js +4 -3
  394. package/dist/ui/cards/RecordCard.js.map +1 -1
  395. package/dist/ui/cards/RecordCardSkeleton.js +8 -3
  396. package/dist/ui/cards/RecordCardSkeleton.js.map +1 -1
  397. package/dist/ui/countdown/Countdown.js +3 -2
  398. package/dist/ui/countdown/Countdown.js.map +1 -1
  399. package/dist/ui/documents/PdfViewerDialog.js +3 -2
  400. package/dist/ui/documents/PdfViewerDialog.js.map +1 -1
  401. package/dist/ui/filters/DateRangeFilter.js +3 -2
  402. package/dist/ui/filters/DateRangeFilter.js.map +1 -1
  403. package/dist/ui/filters/FilterDrawer.js +3 -2
  404. package/dist/ui/filters/FilterDrawer.js.map +1 -1
  405. package/dist/ui/filters/PeriodRangeSelector.js +3 -2
  406. package/dist/ui/filters/PeriodRangeSelector.js.map +1 -1
  407. package/dist/ui/filters/QuickFilters.js +3 -2
  408. package/dist/ui/filters/QuickFilters.js.map +1 -1
  409. package/dist/ui/help/HelpButton.js +8 -3
  410. package/dist/ui/help/HelpButton.js.map +1 -1
  411. package/dist/ui/help/HelpCarouselDialog.js +3 -2
  412. package/dist/ui/help/HelpCarouselDialog.js.map +1 -1
  413. package/dist/ui/labels/MarkedText.js +31 -0
  414. package/dist/ui/labels/MarkedText.js.map +1 -0
  415. package/dist/ui/labels/Tag.js +3 -2
  416. package/dist/ui/labels/Tag.js.map +1 -1
  417. package/dist/ui/labels/markedTextPieces.js +64 -0
  418. package/dist/ui/labels/markedTextPieces.js.map +1 -0
  419. package/dist/ui/layout/CollapsibleSection.js +3 -2
  420. package/dist/ui/layout/CollapsibleSection.js.map +1 -1
  421. package/dist/ui/layout/ContentDialog.js +3 -2
  422. package/dist/ui/layout/ContentDialog.js.map +1 -1
  423. package/dist/ui/layout/DefinitionList.js +3 -2
  424. package/dist/ui/layout/DefinitionList.js.map +1 -1
  425. package/dist/ui/layout/DetailHeader.js +3 -2
  426. package/dist/ui/layout/DetailHeader.js.map +1 -1
  427. package/dist/ui/layout/ErrorPage.js +3 -2
  428. package/dist/ui/layout/ErrorPage.js.map +1 -1
  429. package/dist/ui/layout/FullPageLoader.js +3 -2
  430. package/dist/ui/layout/FullPageLoader.js.map +1 -1
  431. package/dist/ui/layout/GlassPanel.js +3 -2
  432. package/dist/ui/layout/GlassPanel.js.map +1 -1
  433. package/dist/ui/layout/PageHeader.js +3 -2
  434. package/dist/ui/layout/PageHeader.js.map +1 -1
  435. package/dist/ui/layout/PageHeading.js +3 -2
  436. package/dist/ui/layout/PageHeading.js.map +1 -1
  437. package/dist/ui/layout/ProfileHeader.js +3 -2
  438. package/dist/ui/layout/ProfileHeader.js.map +1 -1
  439. package/dist/ui/layout/ScrollableRow.js +3 -2
  440. package/dist/ui/layout/ScrollableRow.js.map +1 -1
  441. package/dist/ui/layout/SectionCard.js +3 -2
  442. package/dist/ui/layout/SectionCard.js.map +1 -1
  443. package/dist/ui/metrics/BarList.js +3 -2
  444. package/dist/ui/metrics/BarList.js.map +1 -1
  445. package/dist/ui/metrics/CalendarHeatmap.js +3 -2
  446. package/dist/ui/metrics/CalendarHeatmap.js.map +1 -1
  447. package/dist/ui/metrics/ChartTooltip.js +3 -2
  448. package/dist/ui/metrics/ChartTooltip.js.map +1 -1
  449. package/dist/ui/metrics/ColumnChart.js +3 -2
  450. package/dist/ui/metrics/ColumnChart.js.map +1 -1
  451. package/dist/ui/metrics/LineChart.js +3 -2
  452. package/dist/ui/metrics/LineChart.js.map +1 -1
  453. package/dist/ui/metrics/MetricCard.js +3 -2
  454. package/dist/ui/metrics/MetricCard.js.map +1 -1
  455. package/dist/ui/metrics/TableToggle.js +3 -2
  456. package/dist/ui/metrics/TableToggle.js.map +1 -1
  457. package/dist/ui/metrics/chartParts.js +7 -4
  458. package/dist/ui/metrics/chartParts.js.map +1 -1
  459. package/dist/ui/navigation/BackButton.js +7 -2
  460. package/dist/ui/navigation/BackButton.js.map +1 -1
  461. package/dist/ui/navigation/ColorSchemeToggle.js +3 -2
  462. package/dist/ui/navigation/ColorSchemeToggle.js.map +1 -1
  463. package/dist/ui/navigation/FontSizeToggle.js +3 -2
  464. package/dist/ui/navigation/FontSizeToggle.js.map +1 -1
  465. package/dist/ui/navigation/LanguageToggle.js +3 -2
  466. package/dist/ui/navigation/LanguageToggle.js.map +1 -1
  467. package/dist/ui/navigation/PageBreadcrumbs.js +3 -2
  468. package/dist/ui/navigation/PageBreadcrumbs.js.map +1 -1
  469. package/dist/ui/navigation/RouteTabs.js +8 -4
  470. package/dist/ui/navigation/RouteTabs.js.map +1 -1
  471. package/dist/ui/timeline/GroupedTimeline.js +3 -2
  472. package/dist/ui/timeline/GroupedTimeline.js.map +1 -1
  473. package/dist/upload/AttachmentsInput.js +9 -6
  474. package/dist/upload/AttachmentsInput.js.map +1 -1
  475. package/dist/upload/FileChip.js +2 -1
  476. package/dist/upload/FileChip.js.map +1 -1
  477. package/dist/upload/FileDropzone.js +5 -4
  478. package/dist/upload/FileDropzone.js.map +1 -1
  479. package/dist/upload/FileInput.js +9 -6
  480. package/dist/upload/FileInput.js.map +1 -1
  481. package/dist/upload/FileUploadInput.js +9 -6
  482. package/dist/upload/FileUploadInput.js.map +1 -1
  483. package/dist/upload/ImageInput.js +8 -5
  484. package/dist/upload/ImageInput.js.map +1 -1
  485. package/dist/upload/TemplateDownloadButton.js +3 -2
  486. package/dist/upload/TemplateDownloadButton.js.map +1 -1
  487. package/package.json +1 -1
  488. package/cli/templates/project/src/app/combineTexts.js.tpl +0 -31
@@ -1,9 +1,9 @@
1
- /**
2
- * @param {{children: import('react').ReactNode, disabled?: boolean, isPending?: boolean} & Omit<import('@mui/material/Button').ButtonProps, 'type'|'children'>} props
3
- * lo demás va al Button de MUI (sx, size, fullWidth…)
4
- */
5
- export default function SubmitButton({ children, disabled, isPending, ...buttonProps }: {
1
+ declare const SubmitButton: (props: {
6
2
  children: import('react').ReactNode;
7
3
  disabled?: boolean;
8
4
  isPending?: boolean;
9
- } & Omit<import('@mui/material/Button').ButtonProps, 'type' | 'children'>): import("react").JSX.Element;
5
+ } & Omit<import("@mui/material/Button").ButtonProps<"button", {}>, "children" | "type"> & {
6
+ slots?: Record<string, import('react').ElementType>;
7
+ slotProps?: Record<string, object | ((partProps: object) => object)>;
8
+ }) => import("react").JSX.Element;
9
+ export default SubmitButton;
@@ -1,13 +1,4 @@
1
- /**
2
- * @param {object} props
3
- * @param {(values: {email: string, password: string, remember: boolean}) => Promise<unknown>} props.onSubmit entra; si
4
- * el servidor dice que no, truena con su problema
5
- * @param {string} [props.forgotPasswordPath] sin ella no sale la liga de «¿Olvidó su contraseña?»
6
- * @param {boolean} [props.showRememberMe] por omisión sí
7
- * @param {string} [props.initialEmail]
8
- * @param {object} [props.texts] los textos que cambian, con la forma de `auth` en los textos del paquete
9
- */
10
- export default function SignInForm(props: {
1
+ declare const SignInForm: (props: {
11
2
  onSubmit: (values: {
12
3
  email: string;
13
4
  password: string;
@@ -17,4 +8,8 @@ export default function SignInForm(props: {
17
8
  showRememberMe?: boolean;
18
9
  initialEmail?: string;
19
10
  texts?: object;
20
- }): import("react").JSX.Element;
11
+ } & {
12
+ slots?: Record<string, import('react').ElementType>;
13
+ slotProps?: Record<string, object | ((partProps: object) => object)>;
14
+ }) => import("react").JSX.Element;
15
+ export default SignInForm;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Igual a otro campo del mismo formulario (o del mismo renglón de una lista): la confirmación de una contraseña, de una CLABE
3
+ * o de un correo.
4
+ *
5
+ * @param {string} otherField el campo con el que se compara, en el mismo objeto ('password')
6
+ * @param {object} [options]
7
+ * @param {string} [options.otherLabel] cómo se llama ese campo en el mensaje («Debe ser igual a la contraseña»); sin él,
8
+ * «No coincide»
9
+ * @returns {{name: string, message: {key: string, values: object, rule: string}, test: (value: unknown, context: {parent?: object}) => boolean}}
10
+ */
11
+ export declare function sameAsFieldRule(otherField: string, { otherLabel }?: {
12
+ otherLabel?: string;
13
+ }): {
14
+ name: string;
15
+ message: {
16
+ key: string;
17
+ values: object;
18
+ rule: string;
19
+ };
20
+ test: (value: unknown, context: {
21
+ parent?: object;
22
+ }) => boolean;
23
+ };
24
+ /**
25
+ * Un porcentaje: un número entre min y max (por omisión 0 y 100), con decimales. Acepta el texto que deja NumberInput
26
+ * ('12.5') o un número.
27
+ *
28
+ * @param {object} [options]
29
+ * @param {number} [options.min] por omisión 0
30
+ * @param {number} [options.max] por omisión 100
31
+ * @returns {{name: string, message: {key: string, values: object, rule: string}, test: (value: unknown) => boolean}}
32
+ */
33
+ export declare function percentRule({ min, max }?: {
34
+ min?: number;
35
+ max?: number;
36
+ }): {
37
+ name: string;
38
+ message: {
39
+ key: string;
40
+ values: object;
41
+ rule: string;
42
+ };
43
+ test: (value: unknown) => boolean;
44
+ };
@@ -11,6 +11,7 @@ export { default as FormProblemAlert } from './FormProblemAlert.js';
11
11
  export { default as FormRepeatingFields } from './FormRepeatingFields.js';
12
12
  export { default as FormTransferListField } from './FormTransferListField.js';
13
13
  export { listTotalAtMostRule, listTotalOf, orderedInListRule, uniqueInListRule } from './listRules.js';
14
+ export { percentRule, sameAsFieldRule } from './fieldRules.js';
14
15
  export { default as FormSelectField } from './FormSelectField.js';
15
16
  export { default as FormServerProblem } from './FormServerProblem.js';
16
17
  export { default as FormTextField } from './FormTextField.js';
@@ -4,19 +4,7 @@ export declare const SECOND_STEP_METHOD: Readonly<{
4
4
  totp: "totp";
5
5
  recoveryCode: "recoveryCode";
6
6
  }>;
7
- /**
8
- * @param {object} props
9
- * @param {string[]} props.methods los que tiene la cuenta (SECOND_STEP_METHOD), como los mandó el servidor
10
- * @param {boolean} [props.canUsePasskeys] passkeysSupported() de /passkeys
11
- * @param {() => Promise<unknown>} [props.onUsePasskey] firma con la llave y termina de entrar; truena si no se pudo
12
- * @param {(input: {method: string, code: string}) => Promise<unknown>} props.onSubmitCode manda el código ya limpio y
13
- * termina de entrar; truena con el ApiError si no
14
- * @param {(message: string|null) => void} props.onCancel regresa a escribir la contraseña (con el motivo, si lo hay)
15
- * @param {import('react').ReactNode} [props.footer] abajo del botón, dentro del formulario: puede llenar el código con
16
- * useFormikContext (p. ej. el atajo de los ejemplos)
17
- * @param {object} [props.texts] los textos que cambian, con la forma de `security` en los textos del paquete
18
- */
19
- export default function SecondStepForm(props: {
7
+ declare const SecondStepForm: (props: {
20
8
  methods: string[];
21
9
  canUsePasskeys?: boolean;
22
10
  onUsePasskey?: () => Promise<unknown>;
@@ -27,4 +15,8 @@ export default function SecondStepForm(props: {
27
15
  onCancel: (message: string | null) => void;
28
16
  footer?: import('react').ReactNode;
29
17
  texts?: object;
30
- }): import("react").JSX.Element;
18
+ } & {
19
+ slots?: Record<string, import('react').ElementType>;
20
+ slotProps?: Record<string, object | ((partProps: object) => object)>;
21
+ }) => import("react").JSX.Element;
22
+ export default SecondStepForm;
@@ -1,23 +1,4 @@
1
- /**
2
- * @param {object} props
3
- * @param {{isEnabled: boolean, enabledAt?: string|null, passkeys: Array<{id: string, name: string, createdAt: string, lastUsedAt?: string|null}>, totp: {isEnabled: boolean, enabledAt?: string|null}, recoveryCodesRemaining: number}} props.security
4
- * @param {(security: {isEnabled: boolean, enabledAt?: string|null, passkeys: Array<{id: string, name: string, createdAt: string, lastUsedAt?: string|null}>, totp: {isEnabled: boolean, enabledAt?: string|null}, recoveryCodesRemaining: number}) => void} props.onSecurityChange
5
- * @param {object} props.actions lo que hace el proyecto en cada caso; cada una regresa {security, recoveryCodes?}
6
- * @param {(name: string) => Promise<{security: object, recoveryCodes?: string[]}>} props.actions.addPasskey crea la llave
7
- * (createPasskey) y la guarda en el servidor
8
- * @param {(passkey: {id: string, name: string}, password: string) => Promise<{security: object}>} props.actions.removePasskey
9
- * @param {() => Promise<{secret: string, qrImageUrl: string, extra?: import('react').ReactNode}>} props.actions.startTotp
10
- * la clave y su QR; extra va abajo del campo (p. ej. un atajo de los ejemplos)
11
- * @param {(code: string) => Promise<{security: object, recoveryCodes?: string[]}>} props.actions.confirmTotp
12
- * @param {(password: string) => Promise<{security: object}>} props.actions.disableTotp
13
- * @param {(password: string) => Promise<{security: object, recoveryCodes: string[]}>} props.actions.regenerateRecoveryCodes
14
- * @param {boolean} [props.canUsePasskeys] passkeysSupported() de /passkeys; sin él no se ofrece agregar llaves
15
- * @param {string} [props.account] la cuenta (el correo), para el archivo de los códigos
16
- * @param {import('react').ReactNode} [props.passkeyNotice] un aviso en el diálogo de crear la llave, antes de que el
17
- * navegador la guarde (p. ej. el de la demostración: la llave queda de verdad en el llavero de la persona)
18
- * @param {object} [props.texts] los textos que cambian, con la forma de `security` en los textos del paquete
19
- */
20
- export default function TwoStepVerificationCard(props: {
1
+ declare const TwoStepVerificationCard: (props: {
21
2
  security: {
22
3
  isEnabled: boolean;
23
4
  enabledAt?: string | null;
@@ -80,4 +61,8 @@ export default function TwoStepVerificationCard(props: {
80
61
  account?: string;
81
62
  passkeyNotice?: import('react').ReactNode;
82
63
  texts?: object;
83
- }): import("react").JSX.Element;
64
+ } & {
65
+ slots?: Record<string, import('react').ElementType>;
66
+ slotProps?: Record<string, object | ((partProps: object) => object)>;
67
+ }) => import("react").JSX.Element;
68
+ export default TwoStepVerificationCard;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @param {object} [options]
3
+ * @param {string} [options.name] el name del campo: para su texto propio (validation:fields.<campo>.<regla>)
4
+ * @param {string} [options.label] el nombre del campo, para los textos que lo dicen ({{label}})
5
+ * @param {Record<string, string|object>} [options.messages] los textos de la pantalla para este campo, por regla
6
+ * @returns {(error: unknown) => string|undefined}
7
+ */
8
+ export declare function useValidationText({ name, label, messages }?: {
9
+ name?: string;
10
+ label?: string;
11
+ messages?: Record<string, string | object>;
12
+ }): (error: unknown) => string | undefined;
@@ -1,245 +1,188 @@
1
1
  import * as Yup from 'yup';
2
- /** El locale de yup: cada mensaje por defecto es una llave del namespace validation. */
2
+ /** El locale de yup: cada mensaje por defecto es una llave del namespace validation, con su regla y su campo. */
3
3
  export declare const YUP_LOCALE: Readonly<{
4
4
  mixed: {
5
- default: {
5
+ default: (params?: object) => {
6
6
  key: string;
7
- values?: undefined;
8
- } | {
9
- key: string;
10
- values: any;
7
+ values: object;
8
+ rule: string;
9
+ path?: string;
11
10
  };
12
- required: {
13
- key: string;
14
- values?: undefined;
15
- } | {
11
+ required: (params?: object) => {
16
12
  key: string;
17
- values: any;
13
+ values: object;
14
+ rule: string;
15
+ path?: string;
18
16
  };
19
- defined: {
17
+ defined: (params?: object) => {
20
18
  key: string;
21
- values?: undefined;
22
- } | {
23
- key: string;
24
- values: any;
19
+ values: object;
20
+ rule: string;
21
+ path?: string;
25
22
  };
26
- notNull: {
27
- key: string;
28
- values?: undefined;
29
- } | {
23
+ notNull: (params?: object) => {
30
24
  key: string;
31
- values: any;
25
+ values: object;
26
+ rule: string;
27
+ path?: string;
32
28
  };
33
- notType: {
29
+ notType: (params?: object) => {
34
30
  key: string;
35
- values?: undefined;
36
- } | {
37
- key: string;
38
- values: any;
31
+ values: object;
32
+ rule: string;
33
+ path?: string;
39
34
  };
40
- oneOf: ({ values }: {
41
- values: any;
42
- }) => {
43
- key: string;
44
- values?: undefined;
45
- } | {
35
+ oneOf: (params?: object) => {
46
36
  key: string;
47
- values: any;
37
+ values: object;
38
+ rule: string;
39
+ path?: string;
48
40
  };
49
- notOneOf: ({ values }: {
50
- values: any;
51
- }) => {
41
+ notOneOf: (params?: object) => {
52
42
  key: string;
53
- values?: undefined;
54
- } | {
55
- key: string;
56
- values: any;
43
+ values: object;
44
+ rule: string;
45
+ path?: string;
57
46
  };
58
47
  };
59
48
  string: {
60
- length: ({ length }: {
61
- length: any;
62
- }) => {
63
- key: string;
64
- values?: undefined;
65
- } | {
49
+ length: (params?: object) => {
66
50
  key: string;
67
- values: any;
51
+ values: object;
52
+ rule: string;
53
+ path?: string;
68
54
  };
69
- min: ({ min }: {
70
- min: any;
71
- }) => {
55
+ min: (params?: object) => {
72
56
  key: string;
73
- values?: undefined;
74
- } | {
75
- key: string;
76
- values: any;
57
+ values: object;
58
+ rule: string;
59
+ path?: string;
77
60
  };
78
- max: ({ max }: {
79
- max: any;
80
- }) => {
81
- key: string;
82
- values?: undefined;
83
- } | {
61
+ max: (params?: object) => {
84
62
  key: string;
85
- values: any;
63
+ values: object;
64
+ rule: string;
65
+ path?: string;
86
66
  };
87
- matches: {
67
+ matches: (params?: object) => {
88
68
  key: string;
89
- values?: undefined;
90
- } | {
91
- key: string;
92
- values: any;
69
+ values: object;
70
+ rule: string;
71
+ path?: string;
93
72
  };
94
- email: {
95
- key: string;
96
- values?: undefined;
97
- } | {
73
+ email: (params?: object) => {
98
74
  key: string;
99
- values: any;
75
+ values: object;
76
+ rule: string;
77
+ path?: string;
100
78
  };
101
- url: {
79
+ url: (params?: object) => {
102
80
  key: string;
103
- values?: undefined;
104
- } | {
105
- key: string;
106
- values: any;
81
+ values: object;
82
+ rule: string;
83
+ path?: string;
107
84
  };
108
- uuid: {
109
- key: string;
110
- values?: undefined;
111
- } | {
85
+ uuid: (params?: object) => {
112
86
  key: string;
113
- values: any;
87
+ values: object;
88
+ rule: string;
89
+ path?: string;
114
90
  };
115
- trim: {
116
- key: string;
117
- values?: undefined;
118
- } | {
91
+ trim: (params?: object) => {
119
92
  key: string;
120
- values: any;
93
+ values: object;
94
+ rule: string;
95
+ path?: string;
121
96
  };
122
- lowercase: {
97
+ lowercase: (params?: object) => {
123
98
  key: string;
124
- values?: undefined;
125
- } | {
126
- key: string;
127
- values: any;
99
+ values: object;
100
+ rule: string;
101
+ path?: string;
128
102
  };
129
- uppercase: {
130
- key: string;
131
- values?: undefined;
132
- } | {
103
+ uppercase: (params?: object) => {
133
104
  key: string;
134
- values: any;
105
+ values: object;
106
+ rule: string;
107
+ path?: string;
135
108
  };
136
109
  };
137
110
  number: {
138
- min: ({ min }: {
139
- min: any;
140
- }) => {
111
+ min: (params?: object) => {
141
112
  key: string;
142
- values?: undefined;
143
- } | {
144
- key: string;
145
- values: any;
113
+ values: object;
114
+ rule: string;
115
+ path?: string;
146
116
  };
147
- max: ({ max }: {
148
- max: any;
149
- }) => {
150
- key: string;
151
- values?: undefined;
152
- } | {
117
+ max: (params?: object) => {
153
118
  key: string;
154
- values: any;
119
+ values: object;
120
+ rule: string;
121
+ path?: string;
155
122
  };
156
- lessThan: ({ less }: {
157
- less: any;
158
- }) => {
123
+ lessThan: (params?: object) => {
159
124
  key: string;
160
- values?: undefined;
161
- } | {
162
- key: string;
163
- values: any;
125
+ values: object;
126
+ rule: string;
127
+ path?: string;
164
128
  };
165
- moreThan: ({ more }: {
166
- more: any;
167
- }) => {
168
- key: string;
169
- values?: undefined;
170
- } | {
129
+ moreThan: (params?: object) => {
171
130
  key: string;
172
- values: any;
131
+ values: object;
132
+ rule: string;
133
+ path?: string;
173
134
  };
174
- positive: {
175
- key: string;
176
- values?: undefined;
177
- } | {
135
+ positive: (params?: object) => {
178
136
  key: string;
179
- values: any;
137
+ values: object;
138
+ rule: string;
139
+ path?: string;
180
140
  };
181
- negative: {
141
+ negative: (params?: object) => {
182
142
  key: string;
183
- values?: undefined;
184
- } | {
185
- key: string;
186
- values: any;
143
+ values: object;
144
+ rule: string;
145
+ path?: string;
187
146
  };
188
- integer: {
189
- key: string;
190
- values?: undefined;
191
- } | {
147
+ integer: (params?: object) => {
192
148
  key: string;
193
- values: any;
149
+ values: object;
150
+ rule: string;
151
+ path?: string;
194
152
  };
195
153
  };
196
154
  date: {
197
- min: ({ min }: {
198
- min: any;
199
- }) => {
155
+ min: (params?: object) => {
200
156
  key: string;
201
- values?: undefined;
202
- } | {
203
- key: string;
204
- values: any;
157
+ values: object;
158
+ rule: string;
159
+ path?: string;
205
160
  };
206
- max: ({ max }: {
207
- max: any;
208
- }) => {
209
- key: string;
210
- values?: undefined;
211
- } | {
161
+ max: (params?: object) => {
212
162
  key: string;
213
- values: any;
163
+ values: object;
164
+ rule: string;
165
+ path?: string;
214
166
  };
215
167
  };
216
168
  array: {
217
- min: ({ min }: {
218
- min: any;
219
- }) => {
169
+ min: (params?: object) => {
220
170
  key: string;
221
- values?: undefined;
222
- } | {
223
- key: string;
224
- values: any;
171
+ values: object;
172
+ rule: string;
173
+ path?: string;
225
174
  };
226
- max: ({ max }: {
227
- max: any;
228
- }) => {
229
- key: string;
230
- values?: undefined;
231
- } | {
175
+ max: (params?: object) => {
232
176
  key: string;
233
- values: any;
177
+ values: object;
178
+ rule: string;
179
+ path?: string;
234
180
  };
235
- length: ({ length }: {
236
- length: any;
237
- }) => {
238
- key: string;
239
- values?: undefined;
240
- } | {
181
+ length: (params?: object) => {
241
182
  key: string;
242
- values: any;
183
+ values: object;
184
+ rule: string;
185
+ path?: string;
243
186
  };
244
187
  };
245
188
  }>;
@@ -1,12 +1,60 @@
1
+ /**
2
+ * El campo sin índices de lista, para buscar su texto propio: 'contacts[2].email' y 'contacts.2.email' son 'contacts.email'.
3
+ *
4
+ * @param {string} path
5
+ * @returns {string}
6
+ */
7
+ export declare function fieldKeyOf(path: string): string;
8
+ /**
9
+ * Un mensaje en la forma de Calcita, venga como venga.
10
+ *
11
+ * @param {unknown} error
12
+ * @returns {{text: string}|{key: string, values: object, rule?: string, path?: string}|null} null: no se entendió
13
+ */
14
+ export declare function normalizedValidationMessage(error: unknown): {
15
+ text: string;
16
+ } | {
17
+ key: string;
18
+ values: object;
19
+ rule?: string;
20
+ path?: string;
21
+ } | null;
1
22
  /**
2
23
  * Texto de un error de validación en el idioma activo.
3
- * Acepta las dos formas que llegan: {key, values} de yup (buildYupLocale), o un texto ya traducido (los del backend).
4
24
  *
5
- * @param {(key: string, values?: object) => string} translate el t de useToolkitTranslation
6
- * @param {string|{key: string, values?: object}|undefined|null} error
25
+ * @param {(key: string, values?: object) => string} translate el t de useToolkitTranslation (respeta `defaultValue`, como el
26
+ * de i18next: con él busca los textos opcionales sin avisar que faltan)
27
+ * @param {unknown} error lo que dejó la validación en el campo
28
+ * @param {object} [options]
29
+ * @param {string} [options.label] el nombre del campo, para los textos que lo dicen ({{label}}: «Escriba {{label}}»)
30
+ * @param {Record<string, string|object>} [options.messages] los textos de la pantalla para este campo, por regla
31
+ * ({required: 'Escriba el RFC', matches: 'El RFC lleva 12 o 13 caracteres'}); ya traducidos o como {key, values}
32
+ * @param {((error: unknown) => unknown)|null} [options.readMessage] cómo leer el mensaje de un sistema que ya existe
33
+ * (readValidationMessage de ToolkitProvider): regresa un texto, {key, values} o undefined para la lectura de siempre
34
+ * @param {string} [options.fieldName] el name del campo que pinta el error: para el texto propio de ese campo cuando el
35
+ * mensaje no trae su campo (las reglas propias, los de un sistema que ya existe)
7
36
  * @returns {string|undefined}
8
37
  */
9
- export declare function translateValidationMessage(translate: (key: string, values?: object) => string, error: string | {
38
+ export declare function translateValidationMessage(translate: (key: string, values?: object) => string, error: unknown, { label, messages, readMessage, fieldName }?: {
39
+ label?: string;
40
+ messages?: Record<string, string | object>;
41
+ readMessage?: ((error: unknown) => unknown) | null;
42
+ fieldName?: string;
43
+ }): string | undefined;
44
+ /**
45
+ * El mensaje de una regla propia (.test) como lo dejan las de Calcita: su llave, sus valores y el nombre de la regla, para
46
+ * que la pantalla (messages del campo) o los textos del proyecto (validation:fields.<campo>.<regla>) pongan el suyo sin
47
+ * tocar el esquema. Es un objeto fijo: quien lo lea (rule.message.key) lo encuentra como siempre.
48
+ *
49
+ * {name: 'percent', message: ruleMessageOf('validation:percent', 'percent', {min: 0, max: 100}), test: …}
50
+ *
51
+ * @param {string} key la llave del texto ('validation:percent')
52
+ * @param {string} rule el nombre de la regla
53
+ * @param {object} [values] los valores del texto
54
+ * @returns {{key: string, values: object, rule: string}}
55
+ */
56
+ export declare function ruleMessageOf(key: string, rule: string, values?: object): {
10
57
  key: string;
11
- values?: object;
12
- } | undefined | null): string | undefined;
58
+ values: object;
59
+ rule: string;
60
+ };
@@ -1,2 +1,2 @@
1
1
  export { FieldArray, Form, Formik, useField, useFormikContext } from 'formik';
2
- export { ChangePasswordForm, ForgotPasswordForm, FormAttachmentsField, FormCatalogField, FormCheckboxGroupField, FormColorField, FormFileField, FormFileUploadField, FormImageField, FormMaskedField, FormNumberField, FormProblemAlert, FormRepeatingFields, FormSelectField, FormServerProblem, FormTransferListField, FormTextField, FormWizard, RECOVERY_CODE_PATTERN, SECOND_STEP_METHOD, SecondStepForm, SignInForm, SubmitButton, TOTP_CODE_PATTERN, TwoStepVerificationCard, Yup, applyServerProblem, buildYupLocale, formLevelMessageOf, normalizeRecoveryCode, normalizeTotpCode, listTotalAtMostRule, listTotalOf, orderedInListRule, splitRowFieldErrors, splitServerFieldErrors, translateValidationMessage, uniqueInListRule, useFormikField, } from './forms/index.js';
2
+ export { ChangePasswordForm, ForgotPasswordForm, FormAttachmentsField, FormCatalogField, FormCheckboxGroupField, FormColorField, FormFileField, FormFileUploadField, FormImageField, FormMaskedField, FormNumberField, FormProblemAlert, FormRepeatingFields, FormSelectField, FormServerProblem, FormTransferListField, FormTextField, FormWizard, RECOVERY_CODE_PATTERN, SECOND_STEP_METHOD, SecondStepForm, SignInForm, SubmitButton, TOTP_CODE_PATTERN, TwoStepVerificationCard, Yup, applyServerProblem, buildYupLocale, formLevelMessageOf, normalizeRecoveryCode, normalizeTotpCode, listTotalAtMostRule, listTotalOf, orderedInListRule, percentRule, sameAsFieldRule, splitRowFieldErrors, splitServerFieldErrors, translateValidationMessage, uniqueInListRule, useFormikField, } from './forms/index.js';
@@ -1,7 +1,8 @@
1
- /**
2
- * @param {{control?: object, sx?: object}} props control: el de useForm, si la pantalla no usa FormProvider
3
- */
4
- export default function FormProblemAlert({ control, sx, ...unknownProps }: {
1
+ declare const FormProblemAlert: (props: {
5
2
  control?: object;
6
3
  sx?: object;
7
- }): import("react").JSX.Element | null;
4
+ } & {
5
+ slots?: Record<string, import('react').ElementType>;
6
+ slotProps?: Record<string, object | ((partProps: object) => object)>;
7
+ }) => import("react").JSX.Element | null;
8
+ export default FormProblemAlert;
@@ -1,15 +1,4 @@
1
- /**
2
- * @param {object} props
3
- * @param {import('react').ReactNode} props.children
4
- * @param {boolean} [props.disabled]
5
- * @param {boolean} [props.isPending] cuando el envío lo lleva una máquina de estados y no el handleSubmit
6
- * @param {object} [props.control] el de useForm, si la pantalla no usa FormProvider
7
- * @param {object} [props.sx] (y lo demás del Button de MUI: size, fullWidth, startIcon…)
8
- * @param {'small'|'medium'|'large'} [props.size]
9
- * @param {boolean} [props.fullWidth]
10
- * @param {import('react').ReactNode} [props.startIcon]
11
- */
12
- export default function SubmitButton({ children, disabled, isPending, control, ...buttonProps }: {
1
+ declare const SubmitButton: (props: {
13
2
  children: import('react').ReactNode;
14
3
  disabled?: boolean;
15
4
  isPending?: boolean;
@@ -18,4 +7,8 @@ export default function SubmitButton({ children, disabled, isPending, control, .
18
7
  size?: 'small' | 'medium' | 'large';
19
8
  fullWidth?: boolean;
20
9
  startIcon?: import('react').ReactNode;
21
- }): import("react").JSX.Element;
10
+ } & {
11
+ slots?: Record<string, import('react').ElementType>;
12
+ slotProps?: Record<string, object | ((partProps: object) => object)>;
13
+ }) => import("react").JSX.Element;
14
+ export default SubmitButton;