@m4l/components 9.84.1 → 9.85.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 (233) hide show
  1. package/components/CheckableList/CheckableList.d.ts.map +1 -1
  2. package/components/CheckableList/CheckableList.js +250 -219
  3. package/components/CheckableList/CheckableList.styles.d.ts.map +1 -1
  4. package/components/CheckableList/CheckableList.styles.js +12 -0
  5. package/components/CheckableList/constants.d.ts +1 -1
  6. package/components/CheckableList/constants.d.ts.map +1 -1
  7. package/components/CheckableList/dictionary.d.ts +4 -2
  8. package/components/CheckableList/dictionary.d.ts.map +1 -1
  9. package/components/CheckableList/dictionary.js +6 -1
  10. package/components/CheckableList/dictionaryDefaults.d.ts +26 -0
  11. package/components/CheckableList/dictionaryDefaults.d.ts.map +1 -0
  12. package/components/CheckableList/dictionaryDefaults.js +31 -0
  13. package/components/CheckableList/hooks/types.d.ts +9 -0
  14. package/components/CheckableList/hooks/types.d.ts.map +1 -1
  15. package/components/CheckableList/hooks/useCheckableListHandlers.d.ts +2 -1
  16. package/components/CheckableList/hooks/useCheckableListHandlers.d.ts.map +1 -1
  17. package/components/CheckableList/hooks/useCheckableListHandlers.js +54 -40
  18. package/components/CheckableList/hooks/useCheckableListValue.d.ts +4 -0
  19. package/components/CheckableList/hooks/useCheckableListValue.d.ts.map +1 -0
  20. package/components/CheckableList/hooks/useCheckableListValue.js +28 -0
  21. package/components/CheckableList/index.d.ts +2 -0
  22. package/components/CheckableList/index.d.ts.map +1 -1
  23. package/components/CheckableList/slots/slots.d.ts +1 -0
  24. package/components/CheckableList/slots/slots.d.ts.map +1 -1
  25. package/components/CheckableList/slots/slots.js +1 -1
  26. package/components/CheckableList/slots/styled.d.ts +3 -0
  27. package/components/CheckableList/slots/styled.d.ts.map +1 -1
  28. package/components/CheckableList/slots/styled.js +62 -58
  29. package/components/CheckableList/types.d.ts +4 -0
  30. package/components/CheckableList/types.d.ts.map +1 -1
  31. package/components/DragResizeWindowRND/DragResizeWindowRND.d.ts.map +1 -1
  32. package/components/DragResizeWindowRND/DragResizeWindowRND.js +132 -118
  33. package/components/DragResizeWindowRND/constants.d.ts +1 -0
  34. package/components/DragResizeWindowRND/constants.d.ts.map +1 -1
  35. package/components/DragResizeWindowRND/constants.js +3 -2
  36. package/components/DragResizeWindowRND/hooks/types.d.ts +15 -0
  37. package/components/DragResizeWindowRND/hooks/types.d.ts.map +1 -0
  38. package/components/DragResizeWindowRND/hooks/useRNDCollapse.d.ts +4 -0
  39. package/components/DragResizeWindowRND/hooks/useRNDCollapse.d.ts.map +1 -0
  40. package/components/DragResizeWindowRND/hooks/useRNDCollapse.js +41 -0
  41. package/components/DragResizeWindowRND/hooks/useRNDDimensionEffects.d.ts +1 -0
  42. package/components/DragResizeWindowRND/hooks/useRNDDimensionEffects.d.ts.map +1 -1
  43. package/components/DragResizeWindowRND/hooks/useRNDDimensionEffects.js +21 -19
  44. package/components/DragResizeWindowRND/hooks/useRNDDragOptions.d.ts +2 -0
  45. package/components/DragResizeWindowRND/hooks/useRNDDragOptions.d.ts.map +1 -1
  46. package/components/DragResizeWindowRND/hooks/useRNDDragOptions.js +55 -54
  47. package/components/DragResizeWindowRND/types.d.ts +4 -0
  48. package/components/DragResizeWindowRND/types.d.ts.map +1 -1
  49. package/components/Label/Label.d.ts +2 -5
  50. package/components/Label/Label.d.ts.map +1 -1
  51. package/components/Label/Label.js +34 -35
  52. package/components/SortableList/dictionaryDefaults.d.ts +7 -0
  53. package/components/SortableList/dictionaryDefaults.d.ts.map +1 -0
  54. package/components/SortableList/dictionaryDefaults.js +34 -0
  55. package/components/SortableList/index.d.ts +1 -0
  56. package/components/SortableList/index.d.ts.map +1 -1
  57. package/components/Stepper/helpers/focusFirstErrorField/index.d.ts +1 -1
  58. package/components/Stepper/helpers/focusFirstErrorField/index.d.ts.map +1 -1
  59. package/components/Stepper/helpers/focusFirstErrorField/index.js +29 -14
  60. package/components/Stepper/helpers/getStepFocusTargets/constants.d.ts +4 -0
  61. package/components/Stepper/helpers/getStepFocusTargets/constants.d.ts.map +1 -0
  62. package/components/Stepper/helpers/getStepFocusTargets/constants.js +32 -0
  63. package/components/Stepper/helpers/getStepFocusTargets/index.d.ts +10 -0
  64. package/components/Stepper/helpers/getStepFocusTargets/index.d.ts.map +1 -0
  65. package/components/Stepper/helpers/getStepFocusTargets/index.js +34 -0
  66. package/components/Stepper/helpers/getStepFocusTargets/types.d.ts +6 -0
  67. package/components/Stepper/helpers/getStepFocusTargets/types.d.ts.map +1 -0
  68. package/components/Stepper/hooks/useStepEntryFocus/index.d.ts +4 -0
  69. package/components/Stepper/hooks/useStepEntryFocus/index.d.ts.map +1 -0
  70. package/components/Stepper/hooks/useStepEntryFocus/index.js +59 -0
  71. package/components/Stepper/hooks/useStepEntryFocus/types.d.ts +9 -0
  72. package/components/Stepper/hooks/useStepEntryFocus/types.d.ts.map +1 -0
  73. package/components/Stepper/hooks/useStepperActions/index.d.ts.map +1 -1
  74. package/components/Stepper/hooks/useStepperActions/index.js +53 -43
  75. package/components/Stepper/index.d.ts +1 -0
  76. package/components/Stepper/index.d.ts.map +1 -1
  77. package/components/Stepper/store/StepperContext/index.d.ts.map +1 -1
  78. package/components/Stepper/store/StepperContext/index.js +37 -35
  79. package/components/Stepper/store/StepperFocusContext/index.d.ts +5 -0
  80. package/components/Stepper/store/StepperFocusContext/index.d.ts.map +1 -0
  81. package/components/Stepper/store/StepperFocusContext/index.js +9 -0
  82. package/components/Stepper/store/StepperFocusContext/types.d.ts +8 -0
  83. package/components/Stepper/store/StepperFocusContext/types.d.ts.map +1 -0
  84. package/components/Stepper/subcomponents/StepArea/hooks/useStepArea.d.ts.map +1 -1
  85. package/components/Stepper/subcomponents/StepArea/hooks/useStepArea.js +74 -57
  86. package/components/Stepper/subcomponents/StepperContent/subcomponents/Step/index.d.ts.map +1 -1
  87. package/components/Stepper/subcomponents/StepperContent/subcomponents/Step/index.js +21 -6
  88. package/components/Stepper/tests/focus/fixtures.d.ts +8 -0
  89. package/components/Stepper/tests/focus/fixtures.d.ts.map +1 -0
  90. package/components/Stepper/tests/focus/types.d.ts +63 -0
  91. package/components/Stepper/tests/focus/types.d.ts.map +1 -0
  92. package/components/Stepper/types.d.ts +8 -0
  93. package/components/Stepper/types.d.ts.map +1 -1
  94. package/components/WindowBase/WindowBase.d.ts.map +1 -1
  95. package/components/WindowBase/WindowBase.js +74 -64
  96. package/components/WindowBase/WindowBase.styles.d.ts.map +1 -1
  97. package/components/WindowBase/WindowBase.styles.js +16 -5
  98. package/components/WindowBase/subcomponents/Header/HeaderWindowBase.d.ts.map +1 -1
  99. package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +59 -58
  100. package/components/WindowBase/subcomponents/Header/types.d.ts +1 -1
  101. package/components/WindowBase/subcomponents/Header/types.d.ts.map +1 -1
  102. package/components/WindowBase/subcomponents/Header/useButtonActions.d.ts.map +1 -1
  103. package/components/WindowBase/subcomponents/Header/useButtonActions.js +13 -12
  104. package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.d.ts +1 -1
  105. package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.d.ts.map +1 -1
  106. package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.js +5 -5
  107. package/components/WindowBase/subcomponents/MemoizedIconButton/types.d.ts +2 -0
  108. package/components/WindowBase/subcomponents/MemoizedIconButton/types.d.ts.map +1 -1
  109. package/components/WindowBase/types.d.ts +7 -1
  110. package/components/WindowBase/types.d.ts.map +1 -1
  111. package/components/areas/types.d.ts +1 -1
  112. package/components/areas/types.d.ts.map +1 -1
  113. package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +2 -2
  114. package/components/extended/mui/Autocomplete/hooks/useAutocomplete/useAutocomplete.d.ts +1 -1
  115. package/components/extended/mui/Autocomplete/hooks/useEndAdornments.d.ts +2 -1
  116. package/components/extended/mui/Autocomplete/hooks/useEndAdornments.d.ts.map +1 -1
  117. package/components/extended/mui/Autocomplete/hooks/useEndAdornments.js +65 -58
  118. package/components/extended/mui/Autocomplete/hooks/useValuesAndHandlers.d.ts +1 -1
  119. package/components/extended/mui/Autocomplete/hooks/useValuesAndHandlers.d.ts.map +1 -1
  120. package/components/extended/mui/Autocomplete/hooks/useValuesAndHandlers.js +51 -51
  121. package/components/extended/mui/Autocomplete/tests/keyboard/AutocompleteKeyboardFixture.d.ts +5 -0
  122. package/components/extended/mui/Autocomplete/tests/keyboard/AutocompleteKeyboardFixture.d.ts.map +1 -0
  123. package/components/extended/mui/Autocomplete/tests/keyboard/constants.d.ts +3 -0
  124. package/components/extended/mui/Autocomplete/tests/keyboard/constants.d.ts.map +1 -0
  125. package/components/extended/mui/Autocomplete/tests/keyboard/types.d.ts +17 -0
  126. package/components/extended/mui/Autocomplete/tests/keyboard/types.d.ts.map +1 -0
  127. package/components/extended/mui/Select/Select.d.ts.map +1 -1
  128. package/components/extended/mui/Select/Select.js +99 -94
  129. package/components/extended/mui/Select/Select.styles.d.ts.map +1 -1
  130. package/components/extended/mui/Select/Select.styles.js +48 -39
  131. package/components/extended/mui/Select/tests/keyboard/SelectKeyboardFixture.d.ts +4 -0
  132. package/components/extended/mui/Select/tests/keyboard/SelectKeyboardFixture.d.ts.map +1 -0
  133. package/components/extended/mui/Select/tests/keyboard/types.d.ts +6 -0
  134. package/components/extended/mui/Select/tests/keyboard/types.d.ts.map +1 -0
  135. package/components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.d.ts +2 -6
  136. package/components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.d.ts.map +1 -1
  137. package/components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.js +18 -17
  138. package/components/formatters/DistanceToNowFormatter/dictionary.d.ts +18 -0
  139. package/components/formatters/DistanceToNowFormatter/dictionary.d.ts.map +1 -1
  140. package/components/formatters/DistanceToNowFormatter/dictionary.js +19 -1
  141. package/components/formatters/DistanceToNowFormatter/dictionaryDefaults.d.ts +96 -0
  142. package/components/formatters/DistanceToNowFormatter/dictionaryDefaults.d.ts.map +1 -0
  143. package/components/formatters/DistanceToNowFormatter/dictionaryDefaults.js +101 -0
  144. package/components/formatters/DistanceToNowFormatter/hooks/useDistanceToNowFormatter.d.ts +4 -9
  145. package/components/formatters/DistanceToNowFormatter/hooks/useDistanceToNowFormatter.d.ts.map +1 -1
  146. package/components/formatters/DistanceToNowFormatter/hooks/useDistanceToNowFormatter.js +41 -15
  147. package/components/formatters/DistanceToNowFormatter/index.d.ts +1 -0
  148. package/components/formatters/DistanceToNowFormatter/index.d.ts.map +1 -1
  149. package/components/formatters/DistanceToNowFormatter/types.d.ts +10 -3
  150. package/components/formatters/DistanceToNowFormatter/types.d.ts.map +1 -1
  151. package/components/hook-form/RHFActionsGroup/RHFActionsGroup.d.ts.map +1 -1
  152. package/components/hook-form/RHFActionsGroup/RHFActionsGroup.js +43 -40
  153. package/components/hook-form/RHFCheckableList/RHFCheckableList.d.ts.map +1 -1
  154. package/components/hook-form/RHFCheckableList/RHFCheckableList.js +82 -73
  155. package/components/hook-form/RHFCheckbox/RHFCheckbox.d.ts.map +1 -1
  156. package/components/hook-form/RHFCheckbox/RHFCheckbox.js +62 -53
  157. package/components/hook-form/RHFDatePicker/RHFDatePicker.d.ts.map +1 -1
  158. package/components/hook-form/RHFDatePicker/RHFDatePicker.js +35 -32
  159. package/components/hook-form/RHFDateTime/RHFDateTime.d.ts.map +1 -1
  160. package/components/hook-form/RHFDateTime/RHFDateTime.js +42 -39
  161. package/components/hook-form/RHFMultiCheckbox/index.d.ts.map +1 -1
  162. package/components/hook-form/RHFMultiCheckbox/index.js +20 -17
  163. package/components/hook-form/RHFNumberInput/RHFNumberInput.d.ts.map +1 -1
  164. package/components/hook-form/RHFNumberInput/RHFNumberInput.js +46 -43
  165. package/components/hook-form/RHFPeriod/RHFPeriod.d.ts.map +1 -1
  166. package/components/hook-form/RHFPeriod/RHFPeriod.js +41 -39
  167. package/components/hook-form/RHFRadioGroup/RHFRadioGroup.d.ts.map +1 -1
  168. package/components/hook-form/RHFRadioGroup/RHFRadioGroup.js +62 -59
  169. package/components/hook-form/RHFSelect/RHFSelect.d.ts.map +1 -1
  170. package/components/hook-form/RHFSelect/RHFSelect.js +89 -73
  171. package/components/hook-form/RHFSelect/test/focus/SelectFocusFixture.d.ts +4 -0
  172. package/components/hook-form/RHFSelect/test/focus/SelectFocusFixture.d.ts.map +1 -0
  173. package/components/hook-form/RHFSelect/test/focus/constants.d.ts +3 -0
  174. package/components/hook-form/RHFSelect/test/focus/constants.d.ts.map +1 -0
  175. package/components/hook-form/RHFSelect/test/focus/types.d.ts +13 -0
  176. package/components/hook-form/RHFSelect/test/focus/types.d.ts.map +1 -0
  177. package/components/hook-form/RHFSelect/types.d.ts +5 -0
  178. package/components/hook-form/RHFSelect/types.d.ts.map +1 -1
  179. package/components/hook-form/RHFTextField/RHFTextField.d.ts.map +1 -1
  180. package/components/hook-form/RHFTextField/RHFTextField.js +55 -52
  181. package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.d.ts.map +1 -1
  182. package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.js +93 -85
  183. package/components/hook-form/RHFUpload/RHFUploaMultipleFile/components/UploadMultiple/index.d.ts +1 -1
  184. package/components/hook-form/RHFUpload/RHFUploaMultipleFile/components/UploadMultiple/index.d.ts.map +1 -1
  185. package/components/hook-form/RHFUpload/RHFUploaMultipleFile/index.d.ts +1 -1
  186. package/components/hook-form/RHFUpload/RHFUploaMultipleFile/index.d.ts.map +1 -1
  187. package/components/hook-form/RHFUpload/RHFUploaMultipleFile/types.d.ts +2 -0
  188. package/components/hook-form/RHFUpload/RHFUploaMultipleFile/types.d.ts.map +1 -1
  189. package/components/hook-form/RHFUpload/RHFUploadImage/RHFUploadImage.d.ts.map +1 -1
  190. package/components/hook-form/RHFUpload/RHFUploadImage/RHFUploadImage.js +74 -66
  191. package/components/hook-form/RHFUpload/RHFUploadImage/RHFUploadImage.styles.d.ts.map +1 -1
  192. package/components/hook-form/RHFUpload/RHFUploadImage/RHFUploadImage.styles.js +52 -32
  193. package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/UploadImage.d.ts.map +1 -1
  194. package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/UploadImage.js +1 -0
  195. package/components/hook-form/RHFUpload/RHFUploadImage/tests/focus/UploadImageFocusFixture.d.ts +4 -0
  196. package/components/hook-form/RHFUpload/RHFUploadImage/tests/focus/UploadImageFocusFixture.d.ts.map +1 -0
  197. package/components/hook-form/RHFUpload/RHFUploadImage/tests/focus/types.d.ts +13 -0
  198. package/components/hook-form/RHFUpload/RHFUploadImage/tests/focus/types.d.ts.map +1 -0
  199. package/components/hook-form/RHFUpload/RHFUploadSingleFile/RHFUploadSingleFile.d.ts.map +1 -1
  200. package/components/hook-form/RHFUpload/RHFUploadSingleFile/RHFUploadSingleFile.js +34 -32
  201. package/components/hook-form/RHFUpload/RHFUploadSingleFile/subcomponents/UploadSingleFile/index.js +13 -13
  202. package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.d.ts.map +1 -1
  203. package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.js +16 -16
  204. package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +4 -2
  205. package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts.map +1 -1
  206. package/components/popups/components/PopupsProvider/hooks/types.d.ts +5 -0
  207. package/components/popups/components/PopupsProvider/hooks/types.d.ts.map +1 -0
  208. package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups.d.ts +3 -14
  209. package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups.d.ts.map +1 -1
  210. package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups.js +34 -33
  211. package/components/popups/components/PopupsViewer/subcomponents/Popup/Popup.d.ts.map +1 -1
  212. package/components/popups/components/PopupsViewer/subcomponents/Popup/Popup.js +125 -118
  213. package/components/popups/components/PopupsViewer/subcomponents/Popup/usePopupHeaderHeight.d.ts +3 -0
  214. package/components/popups/components/PopupsViewer/subcomponents/Popup/usePopupHeaderHeight.d.ts.map +1 -0
  215. package/components/popups/components/PopupsViewer/subcomponents/Popup/usePopupHeaderHeight.js +21 -0
  216. package/components/popups/dictionaryDefaults.d.ts +4 -0
  217. package/components/popups/dictionaryDefaults.d.ts.map +1 -0
  218. package/components/popups/dictionaryDefaults.js +16 -0
  219. package/components/popups/index.d.ts +1 -0
  220. package/components/popups/index.d.ts.map +1 -1
  221. package/hocs/withRHFController/index.d.ts.map +1 -1
  222. package/hocs/withRHFController/index.js +71 -61
  223. package/index.js +823 -813
  224. package/package.json +12 -12
  225. package/test/mocks/dictionary-mock.d.ts +71 -23
  226. package/test/mocks/dictionary-mock.d.ts.map +1 -1
  227. package/utils/formatDistanceToNow/formatDistanteToNow.d.ts +2 -2
  228. package/utils/formatDistanceToNow/formatDistanteToNow.d.ts.map +1 -1
  229. package/utils/formatDistanceToNow/formatDistanteToNow.js +40 -23
  230. package/utils/formatDistanceToNow/index.d.ts +1 -1
  231. package/utils/formatDistanceToNow/index.d.ts.map +1 -1
  232. package/utils/formatDistanceToNow/types.d.ts +12 -6
  233. package/utils/formatDistanceToNow/types.d.ts.map +1 -1
@@ -27,5 +27,23 @@ export declare const DTNF_DICCTIONARY: {
27
27
  readonly LABEL_UNIT_TIME_YEARS_SHORT: "distance_to_now_formmater.label_unit_time_years_short";
28
28
  readonly LABEL_SEPARATOR_TIME: "distance_to_now_formmater.label_separator_time";
29
29
  readonly LABEL_SEPARATOR_DATE: "distance_to_now_formmater.label_separator_date";
30
+ readonly LABEL_SHORT_SENTENCE_PAST_SECONDS: "distance_to_now_formmater.label_short_sentence_past_seconds";
31
+ readonly LABEL_SHORT_SENTENCE_PAST_OTHERS: "distance_to_now_formmater.label_short_sentence_past_others";
32
+ readonly LABEL_SHORT_SENTENCE_FUTURE_SECONDS: "distance_to_now_formmater.label_short_sentence_future_seconds";
33
+ readonly LABEL_SHORT_SENTENCE_FUTURE_OTHERS: "distance_to_now_formmater.label_short_sentence_future_others";
34
+ readonly LABEL_SHORT_SENTENCE_PRESENT_SECONDS: "distance_to_now_formmater.label_short_sentence_present_seconds";
35
+ readonly LABEL_SHORT_SENTENCE_PRESENT_OTHERS: "distance_to_now_formmater.label_short_sentence_present_others";
36
+ readonly LABEL_SHORT_UNIT_TIME_SECOND: "distance_to_now_formmater.label_short_unit_time_second";
37
+ readonly LABEL_SHORT_UNIT_TIME_SECONDS: "distance_to_now_formmater.label_short_unit_time_seconds";
38
+ readonly LABEL_SHORT_UNIT_TIME_MINUTE: "distance_to_now_formmater.label_short_unit_time_minute";
39
+ readonly LABEL_SHORT_UNIT_TIME_MINUTES: "distance_to_now_formmater.label_short_unit_time_minutes";
40
+ readonly LABEL_SHORT_UNIT_TIME_HOUR: "distance_to_now_formmater.label_short_unit_time_hour";
41
+ readonly LABEL_SHORT_UNIT_TIME_HOURS: "distance_to_now_formmater.label_short_unit_time_hours";
42
+ readonly LABEL_SHORT_UNIT_TIME_DAY: "distance_to_now_formmater.label_short_unit_time_day";
43
+ readonly LABEL_SHORT_UNIT_TIME_DAYS: "distance_to_now_formmater.label_short_unit_time_days";
44
+ readonly LABEL_SHORT_UNIT_TIME_MONTH: "distance_to_now_formmater.label_short_unit_time_month";
45
+ readonly LABEL_SHORT_UNIT_TIME_MONTHS: "distance_to_now_formmater.label_short_unit_time_months";
46
+ readonly LABEL_SHORT_UNIT_TIME_YEAR: "distance_to_now_formmater.label_short_unit_time_year";
47
+ readonly LABEL_SHORT_UNIT_TIME_YEARS: "distance_to_now_formmater.label_short_unit_time_years";
30
48
  };
31
49
  //# sourceMappingURL=dictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/formatters/DistanceToNowFormatter/dictionary.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,8BAA8B,CAAC;AAC9D,wBAAgB,6CAA6C,aAE5D;AACD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BnB,CAAC"}
1
+ {"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/formatters/DistanceToNowFormatter/dictionary.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,8BAA8B,CAAC;AAC9D,wBAAgB,6CAA6C,aAE5D;AACD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CnB,CAAC"}
@@ -28,7 +28,25 @@ const E = {
28
28
  LABEL_UNIT_TIME_MONTHS_SHORT: `${_}.label_unit_time_months_short`,
29
29
  LABEL_UNIT_TIME_YEARS_SHORT: `${_}.label_unit_time_years_short`,
30
30
  LABEL_SEPARATOR_TIME: `${_}.label_separator_time`,
31
- LABEL_SEPARATOR_DATE: `${_}.label_separator_date`
31
+ LABEL_SEPARATOR_DATE: `${_}.label_separator_date`,
32
+ LABEL_SHORT_SENTENCE_PAST_SECONDS: `${_}.label_short_sentence_past_seconds`,
33
+ LABEL_SHORT_SENTENCE_PAST_OTHERS: `${_}.label_short_sentence_past_others`,
34
+ LABEL_SHORT_SENTENCE_FUTURE_SECONDS: `${_}.label_short_sentence_future_seconds`,
35
+ LABEL_SHORT_SENTENCE_FUTURE_OTHERS: `${_}.label_short_sentence_future_others`,
36
+ LABEL_SHORT_SENTENCE_PRESENT_SECONDS: `${_}.label_short_sentence_present_seconds`,
37
+ LABEL_SHORT_SENTENCE_PRESENT_OTHERS: `${_}.label_short_sentence_present_others`,
38
+ LABEL_SHORT_UNIT_TIME_SECOND: `${_}.label_short_unit_time_second`,
39
+ LABEL_SHORT_UNIT_TIME_SECONDS: `${_}.label_short_unit_time_seconds`,
40
+ LABEL_SHORT_UNIT_TIME_MINUTE: `${_}.label_short_unit_time_minute`,
41
+ LABEL_SHORT_UNIT_TIME_MINUTES: `${_}.label_short_unit_time_minutes`,
42
+ LABEL_SHORT_UNIT_TIME_HOUR: `${_}.label_short_unit_time_hour`,
43
+ LABEL_SHORT_UNIT_TIME_HOURS: `${_}.label_short_unit_time_hours`,
44
+ LABEL_SHORT_UNIT_TIME_DAY: `${_}.label_short_unit_time_day`,
45
+ LABEL_SHORT_UNIT_TIME_DAYS: `${_}.label_short_unit_time_days`,
46
+ LABEL_SHORT_UNIT_TIME_MONTH: `${_}.label_short_unit_time_month`,
47
+ LABEL_SHORT_UNIT_TIME_MONTHS: `${_}.label_short_unit_time_months`,
48
+ LABEL_SHORT_UNIT_TIME_YEAR: `${_}.label_short_unit_time_year`,
49
+ LABEL_SHORT_UNIT_TIME_YEARS: `${_}.label_short_unit_time_years`
32
50
  };
33
51
  export {
34
52
  E as DTNF_DICCTIONARY,
@@ -0,0 +1,96 @@
1
+ /** Provide the complete English and Spanish elapsed-time dictionary defaults. */
2
+ export declare function getDistanceToNowFormatterDictionaryDefaults(): {
3
+ readonly en: {
4
+ readonly "distance_to_now_formmater.label_sentence_past_seconds": "$1 seconds ago";
5
+ readonly "distance_to_now_formmater.label_sentence_past_others": "More than $1 $2 ago";
6
+ readonly "distance_to_now_formmater.label_sentence_future_seconds": "In $1 s";
7
+ readonly "distance_to_now_formmater.label_sentence_future_others": "In more than $1 $2";
8
+ readonly "distance_to_now_formmater.label_sentence_present_seconds": "$1 $2";
9
+ readonly "distance_to_now_formmater.label_sentence_present_others": "$1 $2";
10
+ readonly "distance_to_now_formmater.label_unit_time_second": "s";
11
+ readonly "distance_to_now_formmater.label_unit_time_seconds": "s";
12
+ readonly "distance_to_now_formmater.label_unit_time_minute": "min";
13
+ readonly "distance_to_now_formmater.label_unit_time_minutes": "minutes";
14
+ readonly "distance_to_now_formmater.label_unit_time_hour": "hour";
15
+ readonly "distance_to_now_formmater.label_unit_time_hours": "hours";
16
+ readonly "distance_to_now_formmater.label_unit_time_day": "day";
17
+ readonly "distance_to_now_formmater.label_unit_time_days": "days";
18
+ readonly "distance_to_now_formmater.label_unit_time_month": "month";
19
+ readonly "distance_to_now_formmater.label_unit_time_months": "months";
20
+ readonly "distance_to_now_formmater.label_unit_time_year": "year";
21
+ readonly "distance_to_now_formmater.label_unit_time_years": "years";
22
+ readonly "distance_to_now_formmater.label_unit_time_seconds_short": "ss";
23
+ readonly "distance_to_now_formmater.label_unit_time_minutes_short": "mm";
24
+ readonly "distance_to_now_formmater.label_unit_time_hours_short": "hh";
25
+ readonly "distance_to_now_formmater.label_unit_time_days_short": "DD";
26
+ readonly "distance_to_now_formmater.label_unit_time_months_short": "MM";
27
+ readonly "distance_to_now_formmater.label_unit_time_years_short": "YY";
28
+ readonly "distance_to_now_formmater.label_separator_time": ":";
29
+ readonly "distance_to_now_formmater.label_separator_date": "-";
30
+ readonly "distance_to_now_formmater.label_short_sentence_past_seconds": "$1 $2 ago";
31
+ readonly "distance_to_now_formmater.label_short_sentence_past_others": "$1 $2 ago";
32
+ readonly "distance_to_now_formmater.label_short_sentence_future_seconds": "In $1 $2";
33
+ readonly "distance_to_now_formmater.label_short_sentence_future_others": "In $1 $2";
34
+ readonly "distance_to_now_formmater.label_short_sentence_present_seconds": "$1 $2";
35
+ readonly "distance_to_now_formmater.label_short_sentence_present_others": "$1 $2";
36
+ readonly "distance_to_now_formmater.label_short_unit_time_second": "s";
37
+ readonly "distance_to_now_formmater.label_short_unit_time_seconds": "s";
38
+ readonly "distance_to_now_formmater.label_short_unit_time_minute": "min";
39
+ readonly "distance_to_now_formmater.label_short_unit_time_minutes": "min";
40
+ readonly "distance_to_now_formmater.label_short_unit_time_hour": "h";
41
+ readonly "distance_to_now_formmater.label_short_unit_time_hours": "h";
42
+ readonly "distance_to_now_formmater.label_short_unit_time_day": "d";
43
+ readonly "distance_to_now_formmater.label_short_unit_time_days": "d";
44
+ readonly "distance_to_now_formmater.label_short_unit_time_month": "mo";
45
+ readonly "distance_to_now_formmater.label_short_unit_time_months": "mo";
46
+ readonly "distance_to_now_formmater.label_short_unit_time_year": "y";
47
+ readonly "distance_to_now_formmater.label_short_unit_time_years": "y";
48
+ };
49
+ readonly es: {
50
+ readonly "distance_to_now_formmater.label_sentence_past_seconds": "Hace $1 seg";
51
+ readonly "distance_to_now_formmater.label_sentence_past_others": "Hace más de $1 $2";
52
+ readonly "distance_to_now_formmater.label_sentence_future_seconds": "En $1 s";
53
+ readonly "distance_to_now_formmater.label_sentence_future_others": "En más de $1 $2";
54
+ readonly "distance_to_now_formmater.label_sentence_present_seconds": "$1 $2";
55
+ readonly "distance_to_now_formmater.label_sentence_present_others": "$1 $2";
56
+ readonly "distance_to_now_formmater.label_unit_time_second": "s";
57
+ readonly "distance_to_now_formmater.label_unit_time_seconds": "s";
58
+ readonly "distance_to_now_formmater.label_unit_time_minute": "min";
59
+ readonly "distance_to_now_formmater.label_unit_time_minutes": "minutos";
60
+ readonly "distance_to_now_formmater.label_unit_time_hour": "hora";
61
+ readonly "distance_to_now_formmater.label_unit_time_hours": "horas";
62
+ readonly "distance_to_now_formmater.label_unit_time_day": "día";
63
+ readonly "distance_to_now_formmater.label_unit_time_days": "días";
64
+ readonly "distance_to_now_formmater.label_unit_time_month": "mes";
65
+ readonly "distance_to_now_formmater.label_unit_time_months": "meses";
66
+ readonly "distance_to_now_formmater.label_unit_time_year": "año";
67
+ readonly "distance_to_now_formmater.label_unit_time_years": "años";
68
+ readonly "distance_to_now_formmater.label_unit_time_seconds_short": "ss";
69
+ readonly "distance_to_now_formmater.label_unit_time_minutes_short": "mm";
70
+ readonly "distance_to_now_formmater.label_unit_time_hours_short": "hh";
71
+ readonly "distance_to_now_formmater.label_unit_time_days_short": "DD";
72
+ readonly "distance_to_now_formmater.label_unit_time_months_short": "MM";
73
+ readonly "distance_to_now_formmater.label_unit_time_years_short": "YY";
74
+ readonly "distance_to_now_formmater.label_separator_time": ":";
75
+ readonly "distance_to_now_formmater.label_separator_date": "-";
76
+ readonly "distance_to_now_formmater.label_short_sentence_past_seconds": "Hace $1 $2";
77
+ readonly "distance_to_now_formmater.label_short_sentence_past_others": "Hace $1 $2";
78
+ readonly "distance_to_now_formmater.label_short_sentence_future_seconds": "En $1 $2";
79
+ readonly "distance_to_now_formmater.label_short_sentence_future_others": "En $1 $2";
80
+ readonly "distance_to_now_formmater.label_short_sentence_present_seconds": "$1 $2";
81
+ readonly "distance_to_now_formmater.label_short_sentence_present_others": "$1 $2";
82
+ readonly "distance_to_now_formmater.label_short_unit_time_second": "s";
83
+ readonly "distance_to_now_formmater.label_short_unit_time_seconds": "s";
84
+ readonly "distance_to_now_formmater.label_short_unit_time_minute": "min";
85
+ readonly "distance_to_now_formmater.label_short_unit_time_minutes": "min";
86
+ readonly "distance_to_now_formmater.label_short_unit_time_hour": "h";
87
+ readonly "distance_to_now_formmater.label_short_unit_time_hours": "h";
88
+ readonly "distance_to_now_formmater.label_short_unit_time_day": "d";
89
+ readonly "distance_to_now_formmater.label_short_unit_time_days": "d";
90
+ readonly "distance_to_now_formmater.label_short_unit_time_month": "mes";
91
+ readonly "distance_to_now_formmater.label_short_unit_time_months": "mes";
92
+ readonly "distance_to_now_formmater.label_short_unit_time_year": "a";
93
+ readonly "distance_to_now_formmater.label_short_unit_time_years": "a";
94
+ };
95
+ };
96
+ //# sourceMappingURL=dictionaryDefaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dictionaryDefaults.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/formatters/DistanceToNowFormatter/dictionaryDefaults.ts"],"names":[],"mappings":"AAkGA,iFAAiF;AACjF,wBAAgB,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE1D"}
@@ -0,0 +1,101 @@
1
+ import { DTNF_DICCTIONARY as E } from "./dictionary.js";
2
+ const _ = {
3
+ en: {
4
+ [E.LABEL_SENTENCE_PAST_SECONDS]: "$1 seconds ago",
5
+ [E.LABEL_SENTENCE_PAST_OTHERS]: "More than $1 $2 ago",
6
+ [E.LABEL_SENTENCE_FUTURE_SECONDS]: "In $1 s",
7
+ [E.LABEL_SENTENCE_FUTURE_OTHERS]: "In more than $1 $2",
8
+ [E.LABEL_SENTENCE_PRESENT_SECONDS]: "$1 $2",
9
+ [E.LABEL_SENTENCE_PRESENT_OTHERS]: "$1 $2",
10
+ [E.LABEL_UNIT_TIME_SECOND]: "s",
11
+ [E.LABEL_UNIT_TIME_SECONDS]: "s",
12
+ [E.LABEL_UNIT_TIME_MINUTE]: "min",
13
+ [E.LABEL_UNIT_TIME_MINUTES]: "minutes",
14
+ [E.LABEL_UNIT_TIME_HOUR]: "hour",
15
+ [E.LABEL_UNIT_TIME_HOURS]: "hours",
16
+ [E.LABEL_UNIT_TIME_DAY]: "day",
17
+ [E.LABEL_UNIT_TIME_DAYS]: "days",
18
+ [E.LABEL_UNIT_TIME_MONTH]: "month",
19
+ [E.LABEL_UNIT_TIME_MONTHS]: "months",
20
+ [E.LABEL_UNIT_TIME_YEAR]: "year",
21
+ [E.LABEL_UNIT_TIME_YEARS]: "years",
22
+ [E.LABEL_UNIT_TIME_SECONDS_SHORT]: "ss",
23
+ [E.LABEL_UNIT_TIME_MINUTES_SHORT]: "mm",
24
+ [E.LABEL_UNIT_TIME_HOURS_SHORT]: "hh",
25
+ [E.LABEL_UNIT_TIME_DAYS_SHORT]: "DD",
26
+ [E.LABEL_UNIT_TIME_MONTHS_SHORT]: "MM",
27
+ [E.LABEL_UNIT_TIME_YEARS_SHORT]: "YY",
28
+ [E.LABEL_SEPARATOR_TIME]: ":",
29
+ [E.LABEL_SEPARATOR_DATE]: "-",
30
+ [E.LABEL_SHORT_SENTENCE_PAST_SECONDS]: "$1 $2 ago",
31
+ [E.LABEL_SHORT_SENTENCE_PAST_OTHERS]: "$1 $2 ago",
32
+ [E.LABEL_SHORT_SENTENCE_FUTURE_SECONDS]: "In $1 $2",
33
+ [E.LABEL_SHORT_SENTENCE_FUTURE_OTHERS]: "In $1 $2",
34
+ [E.LABEL_SHORT_SENTENCE_PRESENT_SECONDS]: "$1 $2",
35
+ [E.LABEL_SHORT_SENTENCE_PRESENT_OTHERS]: "$1 $2",
36
+ [E.LABEL_SHORT_UNIT_TIME_SECOND]: "s",
37
+ [E.LABEL_SHORT_UNIT_TIME_SECONDS]: "s",
38
+ [E.LABEL_SHORT_UNIT_TIME_MINUTE]: "min",
39
+ [E.LABEL_SHORT_UNIT_TIME_MINUTES]: "min",
40
+ [E.LABEL_SHORT_UNIT_TIME_HOUR]: "h",
41
+ [E.LABEL_SHORT_UNIT_TIME_HOURS]: "h",
42
+ [E.LABEL_SHORT_UNIT_TIME_DAY]: "d",
43
+ [E.LABEL_SHORT_UNIT_TIME_DAYS]: "d",
44
+ [E.LABEL_SHORT_UNIT_TIME_MONTH]: "mo",
45
+ [E.LABEL_SHORT_UNIT_TIME_MONTHS]: "mo",
46
+ [E.LABEL_SHORT_UNIT_TIME_YEAR]: "y",
47
+ [E.LABEL_SHORT_UNIT_TIME_YEARS]: "y"
48
+ },
49
+ es: {
50
+ [E.LABEL_SENTENCE_PAST_SECONDS]: "Hace $1 seg",
51
+ [E.LABEL_SENTENCE_PAST_OTHERS]: "Hace más de $1 $2",
52
+ [E.LABEL_SENTENCE_FUTURE_SECONDS]: "En $1 s",
53
+ [E.LABEL_SENTENCE_FUTURE_OTHERS]: "En más de $1 $2",
54
+ [E.LABEL_SENTENCE_PRESENT_SECONDS]: "$1 $2",
55
+ [E.LABEL_SENTENCE_PRESENT_OTHERS]: "$1 $2",
56
+ [E.LABEL_UNIT_TIME_SECOND]: "s",
57
+ [E.LABEL_UNIT_TIME_SECONDS]: "s",
58
+ [E.LABEL_UNIT_TIME_MINUTE]: "min",
59
+ [E.LABEL_UNIT_TIME_MINUTES]: "minutos",
60
+ [E.LABEL_UNIT_TIME_HOUR]: "hora",
61
+ [E.LABEL_UNIT_TIME_HOURS]: "horas",
62
+ [E.LABEL_UNIT_TIME_DAY]: "día",
63
+ [E.LABEL_UNIT_TIME_DAYS]: "días",
64
+ [E.LABEL_UNIT_TIME_MONTH]: "mes",
65
+ [E.LABEL_UNIT_TIME_MONTHS]: "meses",
66
+ [E.LABEL_UNIT_TIME_YEAR]: "año",
67
+ [E.LABEL_UNIT_TIME_YEARS]: "años",
68
+ [E.LABEL_UNIT_TIME_SECONDS_SHORT]: "ss",
69
+ [E.LABEL_UNIT_TIME_MINUTES_SHORT]: "mm",
70
+ [E.LABEL_UNIT_TIME_HOURS_SHORT]: "hh",
71
+ [E.LABEL_UNIT_TIME_DAYS_SHORT]: "DD",
72
+ [E.LABEL_UNIT_TIME_MONTHS_SHORT]: "MM",
73
+ [E.LABEL_UNIT_TIME_YEARS_SHORT]: "YY",
74
+ [E.LABEL_SEPARATOR_TIME]: ":",
75
+ [E.LABEL_SEPARATOR_DATE]: "-",
76
+ [E.LABEL_SHORT_SENTENCE_PAST_SECONDS]: "Hace $1 $2",
77
+ [E.LABEL_SHORT_SENTENCE_PAST_OTHERS]: "Hace $1 $2",
78
+ [E.LABEL_SHORT_SENTENCE_FUTURE_SECONDS]: "En $1 $2",
79
+ [E.LABEL_SHORT_SENTENCE_FUTURE_OTHERS]: "En $1 $2",
80
+ [E.LABEL_SHORT_SENTENCE_PRESENT_SECONDS]: "$1 $2",
81
+ [E.LABEL_SHORT_SENTENCE_PRESENT_OTHERS]: "$1 $2",
82
+ [E.LABEL_SHORT_UNIT_TIME_SECOND]: "s",
83
+ [E.LABEL_SHORT_UNIT_TIME_SECONDS]: "s",
84
+ [E.LABEL_SHORT_UNIT_TIME_MINUTE]: "min",
85
+ [E.LABEL_SHORT_UNIT_TIME_MINUTES]: "min",
86
+ [E.LABEL_SHORT_UNIT_TIME_HOUR]: "h",
87
+ [E.LABEL_SHORT_UNIT_TIME_HOURS]: "h",
88
+ [E.LABEL_SHORT_UNIT_TIME_DAY]: "d",
89
+ [E.LABEL_SHORT_UNIT_TIME_DAYS]: "d",
90
+ [E.LABEL_SHORT_UNIT_TIME_MONTH]: "mes",
91
+ [E.LABEL_SHORT_UNIT_TIME_MONTHS]: "mes",
92
+ [E.LABEL_SHORT_UNIT_TIME_YEAR]: "a",
93
+ [E.LABEL_SHORT_UNIT_TIME_YEARS]: "a"
94
+ }
95
+ };
96
+ function L() {
97
+ return _;
98
+ }
99
+ export {
100
+ L as getDistanceToNowFormatterDictionaryDefaults
101
+ };
@@ -1,14 +1,9 @@
1
1
  import { default as React } from 'react';
2
- import { DistanceToNowFormatterProps } from '../types';
3
- import { FormatDistanceToNowReturn } from '../../../../utils/formatDistanceToNow/types';
2
+ import { DistanceToNowFormatterProps, DistanceToNowFormatterResult } from '../types';
4
3
  /**
5
- * "useDistanceToNowFormatter" que se encarga de retornar el tiempo transcurrido desde una fecha hasta la fecha actual.
6
- * Actualizando cada delay configurable a través de props
7
- * Tiene 3 tipos de presentaciones:
8
- * En tiempo pasado
9
- * En tiempo presente
10
- * En tiempo futuro
4
+ * Return elapsed time, refreshed at the configured delay, in past, present or future wording.
5
+ * Preserve full wording alongside an optional short unit presentation.
11
6
  *
12
7
  */
13
- export declare function useDistanceToNowFormatter<T extends React.ElementType>(props: DistanceToNowFormatterProps<T>): FormatDistanceToNowReturn;
8
+ export declare function useDistanceToNowFormatter<T extends React.ElementType>(props: DistanceToNowFormatterProps<T>): DistanceToNowFormatterResult;
14
9
  //# sourceMappingURL=useDistanceToNowFormatter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDistanceToNowFormatter.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/formatters/DistanceToNowFormatter/hooks/useDistanceToNowFormatter.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAOjF,OAAO,EAAG,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAOxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AACxF;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAE,CAAC,SAAS,KAAK,CAAC,WAAW,EAAE,KAAK,EAAE,2BAA2B,CAAC,CAAC,CAAC,6BAyD5G"}
1
+ {"version":3,"file":"useDistanceToNowFormatter.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/formatters/DistanceToNowFormatter/hooks/useDistanceToNowFormatter.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAOjF,OAAO,EAAE,2BAA2B,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAOrF;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAE,CAAC,SAAS,KAAK,CAAC,WAAW,EAAE,KAAK,EAAE,2BAA2B,CAAC,CAAC,CAAC,gCAyF5G"}
@@ -1,10 +1,10 @@
1
- import { useMemo as m, useState as N, useRef as L, useCallback as c, useEffect as I } from "react";
2
- import { useModuleDictionary as b } from "@m4l/core";
3
- import { useInterval as S } from "../../../../hooks/useInterval/index.js";
1
+ import { useMemo as I, useCallback as N, useState as A, useRef as c, useEffect as b } from "react";
2
+ import { useModuleDictionary as O } from "@m4l/core";
3
+ import { useInterval as R } from "../../../../hooks/useInterval/index.js";
4
4
  import { DTNF_DICCTIONARY as e } from "../dictionary.js";
5
- import { formatDistanceToNow as r } from "../../../../utils/formatDistanceToNow/formatDistanteToNow.js";
6
- function D(o) {
7
- const { presentationTime: n = "present", date: E, delay: T } = o, { getLabel: _ } = b(), s = m(() => ({
5
+ import { formatDistanceToNow as L } from "../../../../utils/formatDistanceToNow/formatDistanteToNow.js";
6
+ function C(S) {
7
+ const { presentationTime: n = "present", date: a, delay: u, format: E = "long" } = S, { getLabel: _ } = O(), l = I(() => ({
8
8
  label_sentence_past_seconds: _(e.LABEL_SENTENCE_PAST_SECONDS),
9
9
  label_sentence_past_others: _(e.LABEL_SENTENCE_PAST_OTHERS),
10
10
  label_sentence_present_seconds: _(e.LABEL_SENTENCE_PRESENT_SECONDS),
@@ -37,16 +37,42 @@ function D(o) {
37
37
  // getLabel(DTNF_DICCTIONARY.LABEL_UNIT_TIME_YEARS_SHORT),
38
38
  label_separator_time: ":",
39
39
  // getLabel(DTNF_DICCTIONARY.LABEL_SEPARATOR_TIME),
40
- label_separator_date: "-"
40
+ label_separator_date: "-",
41
41
  // getLabel(DTNF_DICCTIONARY.LABEL_SEPARATOR_DATE),
42
- }), [_]), [a, u] = N(r(n, new Date(E), s)), i = L({ ...a }), l = c(() => {
43
- const t = r(n, new Date(E), s);
44
- (i.current.value !== t.value || i.current.unit !== t.unit) && (i.current = t, u(t));
45
- }, [E, s, n]);
46
- return I(() => {
47
- l();
48
- }, [l]), S(l, T), a;
42
+ short: E === "short" ? {
43
+ label_sentence_past_seconds: _(e.LABEL_SHORT_SENTENCE_PAST_SECONDS),
44
+ label_sentence_past_others: _(e.LABEL_SHORT_SENTENCE_PAST_OTHERS),
45
+ label_sentence_future_seconds: _(e.LABEL_SHORT_SENTENCE_FUTURE_SECONDS),
46
+ label_sentence_future_others: _(e.LABEL_SHORT_SENTENCE_FUTURE_OTHERS),
47
+ label_sentence_present_seconds: _(e.LABEL_SHORT_SENTENCE_PRESENT_SECONDS),
48
+ label_sentence_present_others: _(e.LABEL_SHORT_SENTENCE_PRESENT_OTHERS),
49
+ label_unit_time_second: _(e.LABEL_SHORT_UNIT_TIME_SECOND),
50
+ label_unit_time_seconds: _(e.LABEL_SHORT_UNIT_TIME_SECONDS),
51
+ label_unit_time_minute: _(e.LABEL_SHORT_UNIT_TIME_MINUTE),
52
+ label_unit_time_minutes: _(e.LABEL_SHORT_UNIT_TIME_MINUTES),
53
+ label_unit_time_hour: _(e.LABEL_SHORT_UNIT_TIME_HOUR),
54
+ label_unit_time_hours: _(e.LABEL_SHORT_UNIT_TIME_HOURS),
55
+ label_unit_time_day: _(e.LABEL_SHORT_UNIT_TIME_DAY),
56
+ label_unit_time_days: _(e.LABEL_SHORT_UNIT_TIME_DAYS),
57
+ label_unit_time_month: _(e.LABEL_SHORT_UNIT_TIME_MONTH),
58
+ label_unit_time_months: _(e.LABEL_SHORT_UNIT_TIME_MONTHS),
59
+ label_unit_time_year: _(e.LABEL_SHORT_UNIT_TIME_YEAR),
60
+ label_unit_time_years: _(e.LABEL_SHORT_UNIT_TIME_YEARS)
61
+ } : void 0
62
+ }), [_, E]), s = N(() => {
63
+ const t = new Date(a), r = L(n, t, l);
64
+ return {
65
+ ...E === "short" ? L(n, t, l, E) : r,
66
+ longTime: r.time
67
+ };
68
+ }, [a, l, n, E]), [o, m] = A(s), T = c({ ...o }), i = N(() => {
69
+ const t = s();
70
+ (T.current.value !== t.value || T.current.unit !== t.unit || T.current.time !== t.time || T.current.longTime !== t.longTime) && (T.current = t, m(t));
71
+ }, [s]);
72
+ return b(() => {
73
+ i();
74
+ }, [i]), R(i, u), o;
49
75
  }
50
76
  export {
51
- D as useDistanceToNowFormatter
77
+ C as useDistanceToNowFormatter
52
78
  };
@@ -1,4 +1,5 @@
1
1
  export * from './DistanceToNowFormatter';
2
2
  export * from './hooks/useDistanceToNowFormatter';
3
3
  export { DTNF_DICCTIONARY, getDistanceToNowFormatterComponentsDictionary, } from './dictionary';
4
+ export { getDistanceToNowFormatterDictionaryDefaults } from './dictionaryDefaults';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/formatters/DistanceToNowFormatter/index.tsx"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,OAAO,EACL,gBAAgB,EAChB,6CAA6C,GAC9C,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/formatters/DistanceToNowFormatter/index.tsx"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,OAAO,EACL,gBAAgB,EAChB,6CAA6C,GAC9C,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,2CAA2C,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { Theme } from '@mui/material/styles';
2
- import { PresentationTimeType } from '../../../utils/formatDistanceToNow';
2
+ import { DistanceToNowFormat, PresentationTimeType } from '../../../utils/formatDistanceToNow';
3
+ import { FormatDistanceToNowReturn } from '../../../utils/formatDistanceToNow/types';
3
4
  import { COMPONET_KEY_COMPONENT } from './constants';
4
5
  import { DistanceToNowFormatterSlots } from './slots/slots';
5
6
  import { M4LOverridesStyleRules } from '../../../@types/augmentations';
@@ -7,18 +8,24 @@ import { RootStyled } from './slots/DistanceToNowFormatterSlots';
7
8
  export type DistanceToNowFormatterProps<T extends React.ElementType = typeof RootStyled> = {
8
9
  Component?: T;
9
10
  /**
10
- * Props para el componente personalizado.
11
+ * Props for the custom presentation component.
11
12
  */
12
13
  componentProps?: React.ComponentPropsWithoutRef<T>;
13
14
  presentationTime: PresentationTimeType;
15
+ /** Opt into compact unit symbols; long wording remains the default. */
16
+ format?: DistanceToNowFormat;
14
17
  /**
15
- * Se maneja en string, para evitar re-renderizaciones innecesarias debido a que Date es un objeto y se crea un nuevo objeto cada vez que se pasa como prop.
18
+ * A stable date string avoids unnecessary rerenders caused by new Date objects.
16
19
  */
17
20
  date: string;
18
21
  delay?: number;
19
22
  dataTestId?: string;
20
23
  className?: string;
21
24
  };
25
+ /** Keep the full localized wording available alongside the selected presentation. */
26
+ export type DistanceToNowFormatterResult = FormatDistanceToNowReturn & {
27
+ longTime: string;
28
+ };
22
29
  export type DistanceToNowFormatterSlotsType = keyof typeof DistanceToNowFormatterSlots;
23
30
  export type DistanceToNowFormatterOwnerState = {};
24
31
  export type DistanceToNowFormatterStyles = M4LOverridesStyleRules<DistanceToNowFormatterSlotsType, typeof COMPONET_KEY_COMPONENT, Theme>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/formatters/DistanceToNowFormatter/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,MAAM,MAAM,2BAA2B,CAAE,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,OAAO,UAAU,IAAI;IAI1F,SAAS,CAAC,EAAE,CAAC,CAAC;IACd;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC;IACnD,gBAAgB,EAAE,oBAAoB,CAAC;IACvC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IAIf,UAAU,CAAC,EAAE,MAAM,CAAC;IAIpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,+BAA+B,GAAG,MAAM,OAAO,2BAA2B,CAAC;AACvF,MAAM,MAAM,gCAAgC,GAAG,EAAE,CAAC;AAClD,MAAM,MAAM,4BAA4B,GAAG,sBAAsB,CAAC,+BAA+B,EAAE,OAAO,sBAAsB,EAAE,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/formatters/DistanceToNowFormatter/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC/F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,MAAM,MAAM,2BAA2B,CAAE,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,OAAO,UAAU,IAAI;IAI1F,SAAS,CAAC,EAAE,CAAC,CAAC;IACd;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC;IACnD,gBAAgB,EAAE,oBAAoB,CAAC;IACvC,uEAAuE;IACvE,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IAIf,UAAU,CAAC,EAAE,MAAM,CAAC;IAIpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AACF,qFAAqF;AACrF,MAAM,MAAM,4BAA4B,GAAG,yBAAyB,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAC5F,MAAM,MAAM,+BAA+B,GAAG,MAAM,OAAO,2BAA2B,CAAC;AACvF,MAAM,MAAM,gCAAgC,GAAG,EAAE,CAAC;AAClD,MAAM,MAAM,4BAA4B,GAAG,sBAAsB,CAAC,+BAA+B,EAAE,OAAO,sBAAsB,EAAE,KAAK,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RHFActionsGroup.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/hook-form/RHFActionsGroup/RHFActionsGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAM/C;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,qBAAqB,EAC7D,OAAO,oBAAoB,CAAC,CAAC,CAAC,KAC7B,GAAG,CAAC,OAyEN,CAAC"}
1
+ {"version":3,"file":"RHFActionsGroup.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/hook-form/RHFActionsGroup/RHFActionsGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAM/C;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,qBAAqB,EAC7D,OAAO,oBAAoB,CAAC,CAAC,CAAC,KAC7B,GAAG,CAAC,OA0EN,CAAC"}
@@ -2,72 +2,75 @@ import { jsx as o, jsxs as I, Fragment as v } from "@emotion/react/jsx-runtime";
2
2
  import { useId as n } from "react";
3
3
  import { useFormContext as L, Controller as R } from "react-hook-form";
4
4
  import { ActionsGroup as j } from "../../ActionsGroup/ActionsGroup.js";
5
- import { rhfActionsGroupClasses as H } from "./constants.js";
6
- import { useComponentSize as M } from "../../../hooks/useComponentSize/index.js";
7
- import N from "clsx";
8
- import { ActionsGroupRootStyled as V } from "./slots/RHFActionsGroupSlots.js";
9
- import { Label as k } from "../../Label/Label.js";
10
- import { HelperError as B } from "../../HelperError/HelperError.js";
5
+ import { rhfActionsGroupClasses as B } from "./constants.js";
6
+ import { useComponentSize as H } from "../../../hooks/useComponentSize/index.js";
7
+ import M from "clsx";
8
+ import { ActionsGroupRootStyled as N } from "./slots/RHFActionsGroupSlots.js";
9
+ import { Label as V } from "../../Label/Label.js";
10
+ import { HelperError as k } from "../../HelperError/HelperError.js";
11
11
  const W = (i) => {
12
12
  const {
13
- name: l,
14
- actions: c,
15
- label: e,
16
- disabled: t,
17
- readOnly: s = !1,
18
- className: d,
19
- ariaLabel: p,
20
- ariaLabelledBy: u,
21
- size: a = "medium",
22
- variant: f,
13
+ name: a,
14
+ actions: d,
15
+ label: s,
16
+ disabled: r,
17
+ readOnly: e = !1,
18
+ className: c,
19
+ ariaLabel: f,
20
+ ariaLabelledBy: p,
21
+ size: l = "medium",
22
+ variant: u,
23
23
  mandatory: h,
24
24
  mandatoryMessage: b,
25
25
  helperMessage: g,
26
- id: F
27
- } = i, { control: x } = L(), { currentSize: m } = M(a), y = n(), z = n(), G = F || z;
26
+ id: y
27
+ } = i, { control: F } = L(), { currentSize: m } = H(l), x = n(), z = n(), G = y || z;
28
28
  return /* @__PURE__ */ o(
29
- V,
29
+ N,
30
30
  {
31
- className: N(d, H.actionsGroupRoot),
31
+ "data-rhf-field": a,
32
+ "data-rhf-disabled": !!r,
33
+ "data-rhf-readonly": e,
34
+ className: M(c, B.actionsGroupRoot),
32
35
  children: /* @__PURE__ */ o(
33
36
  R,
34
37
  {
35
- name: l,
36
- control: x,
37
- render: ({ field: { value: S, onChange: A }, fieldState: { error: r }, formState: { isSubmitting: C } }) => /* @__PURE__ */ I(v, { children: [
38
- e && /* @__PURE__ */ o(
39
- k,
38
+ name: a,
39
+ control: F,
40
+ render: ({ field: { value: S, onChange: A }, fieldState: { error: t }, formState: { isSubmitting: C } }) => /* @__PURE__ */ I(v, { children: [
41
+ s && /* @__PURE__ */ o(
42
+ V,
40
43
  {
41
44
  size: m,
42
- label: e,
43
- htmlFor: s ? void 0 : G,
45
+ label: s,
46
+ htmlFor: e ? void 0 : G,
44
47
  mandatory: h,
45
48
  mandatoryMessage: b,
46
49
  helperMessage: g,
47
- disabled: t,
48
- error: !!r
50
+ disabled: r,
51
+ error: !!t
49
52
  }
50
53
  ),
51
54
  /* @__PURE__ */ o(
52
55
  j,
53
56
  {
54
- actions: c,
57
+ actions: d,
55
58
  value: S ?? null,
56
59
  onChange: A,
57
- disabled: t || C,
58
- readOnly: s,
59
- ariaLabel: p,
60
- ariaLabelledBy: u,
61
- size: a,
62
- variant: f
60
+ disabled: r || C,
61
+ readOnly: e,
62
+ ariaLabel: f,
63
+ ariaLabelledBy: p,
64
+ size: l,
65
+ variant: u
63
66
  }
64
67
  ),
65
- r?.message && /* @__PURE__ */ o(
66
- B,
68
+ t?.message && /* @__PURE__ */ o(
69
+ k,
67
70
  {
68
- htmlFor: y,
71
+ htmlFor: x,
69
72
  size: m,
70
- message: r.message
73
+ message: t.message
71
74
  }
72
75
  )
73
76
  ] })
@@ -1 +1 @@
1
- {"version":3,"file":"RHFCheckableList.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/hook-form/RHFCheckableList/RHFCheckableList.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,qBAAqB,KAAG,GAAG,CAAC,OAuFnE,CAAC"}
1
+ {"version":3,"file":"RHFCheckableList.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/hook-form/RHFCheckableList/RHFCheckableList.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,qBAAqB,KAAG,GAAG,CAAC,OAwFnE,CAAC"}