@cnamts/synapse 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (395) hide show
  1. package/dist/DateFilter-BmRuzQ9Z.js +98 -0
  2. package/dist/NumberFilter-CnIPDHqx.js +121 -0
  3. package/dist/PeriodFilter-CZwZ8CnQ.js +112 -0
  4. package/dist/SelectFilter-Cj-GW2Cc.js +97 -0
  5. package/dist/TextFilter-DTxZHJwX.js +114 -0
  6. package/dist/{components/BackBtn → common}/constants/ExpertiseLevelEnum.d.ts +3 -0
  7. package/dist/components/BackBtn/AccessibiliteItems.d.ts +1 -1
  8. package/dist/components/BackToTopBtn/AccessibiliteItems.d.ts +1 -1
  9. package/dist/components/ChipList/AccessibiliteItems.d.ts +1 -1
  10. package/dist/components/CollapsibleList/AccessibiliteItems.d.ts +1 -1
  11. package/dist/components/ContextualMenu/AccessibiliteItems.d.ts +1 -1
  12. package/dist/components/CookieBanner/AccessibiliteItems.d.ts +1 -1
  13. package/dist/components/CopyBtn/AccessibiliteItems.d.ts +1 -1
  14. package/dist/components/Customs/SyBtnSelect/AccessibiliteItems.d.ts +1 -1
  15. package/dist/components/Customs/SyInputSelect/AccessibiliteItems.d.ts +1 -1
  16. package/dist/components/Customs/SySelect/AccessibiliteItems.d.ts +1 -1
  17. package/dist/components/Customs/SyTextField/AccessibiliteItems.d.ts +1 -1
  18. package/dist/components/DataList/AccessibiliteItems.d.ts +1 -1
  19. package/dist/components/DataListGroup/AccessibiliteItems.d.ts +1 -1
  20. package/dist/components/DatePicker/AccessibiliteItems.d.ts +1 -1
  21. package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +4162 -0
  22. package/dist/components/DatePicker/{DatePicker.d.ts → DatePicker/DatePicker.d.ts} +142 -102
  23. package/dist/components/DatePicker/{DateTextInput.d.ts → DateTextInput/DateTextInput.d.ts} +32 -26
  24. package/dist/components/DatePicker/composables/index.d.ts +15 -0
  25. package/dist/components/DatePicker/composables/useDateFormatValidation.d.ts +25 -0
  26. package/dist/components/DatePicker/composables/useDateInputEditing.d.ts +33 -0
  27. package/dist/components/DatePicker/composables/useDatePickerViewMode.d.ts +16 -0
  28. package/dist/components/DatePicker/composables/useDatePickerVisibility.d.ts +27 -0
  29. package/dist/components/DatePicker/composables/useDateRangeInput.d.ts +29 -0
  30. package/dist/components/DatePicker/composables/useDateRangeValidation.d.ts +11 -0
  31. package/dist/components/DatePicker/composables/useDateSelection.d.ts +10 -0
  32. package/dist/components/DatePicker/composables/useDateValidation.d.ts +35 -0
  33. package/dist/components/DatePicker/composables/useDisplayedDateString.d.ts +16 -0
  34. package/dist/components/DatePicker/composables/useIconState.d.ts +17 -0
  35. package/dist/components/DatePicker/composables/useInputBlurHandler.d.ts +30 -0
  36. package/dist/components/DatePicker/composables/useInputHandler.d.ts +32 -0
  37. package/dist/components/DatePicker/composables/useManualDateValidation.d.ts +33 -0
  38. package/dist/components/DatePicker/composables/useMonthButtonCustomization.d.ts +9 -0
  39. package/dist/components/DatePicker/composables/useTodayButton.d.ts +16 -0
  40. package/dist/components/DatePicker/composables/useWeekendDays.d.ts +11 -0
  41. package/dist/components/DatePicker/constants/messages.d.ts +29 -0
  42. package/dist/components/DatePicker/types.d.ts +13 -0
  43. package/dist/components/DialogBox/AccessibiliteItems.d.ts +1 -1
  44. package/dist/components/DownloadBtn/AccessibiliteItems.d.ts +1 -1
  45. package/dist/components/ErrorPage/AccessibiliteItems.d.ts +1 -1
  46. package/dist/components/ExternalLinks/AccessibiliteItems.d.ts +1 -1
  47. package/dist/components/FileList/AccessibiliteItems.d.ts +1 -1
  48. package/dist/components/FilePreview/AccessibiliteItems.d.ts +1 -1
  49. package/dist/components/FileUpload/AccessibiliteItems.d.ts +1 -1
  50. package/dist/components/FilterInline/AccessibiliteItems.d.ts +1 -1
  51. package/dist/components/FilterSideBar/AccessibiliteItems.d.ts +1 -1
  52. package/dist/components/FilterSideBar/FilterSideBar.d.ts +395 -1
  53. package/dist/components/FooterBar/AccessibiliteItems.d.ts +1 -1
  54. package/dist/components/FranceConnectBtn/AccessibiliteItems.d.ts +1 -1
  55. package/dist/components/HeaderBar/AccessibiliteItems.d.ts +1 -1
  56. package/dist/components/HeaderBar/HeaderBurgerMenu/AccessibiliteItems.d.ts +1 -1
  57. package/dist/components/HeaderLoading/AccessibiliteItems.d.ts +1 -1
  58. package/dist/components/HeaderToolbar/AccessibiliteItems.d.ts +1 -1
  59. package/dist/components/LangBtn/AccessibiliteItems.d.ts +1 -1
  60. package/dist/components/Logo/AccessibiliteItems.d.ts +1 -1
  61. package/dist/components/LogoBrandSection/AccessibiliteItems.d.ts +1 -1
  62. package/dist/components/MaintenancePage/AccessibiliteItems.d.ts +1 -1
  63. package/dist/components/NirField/AccessibiliteItems.d.ts +1 -1
  64. package/dist/components/NotFoundPage/AccessibiliteItems.d.ts +1 -1
  65. package/dist/components/NotificationBar/AccessibiliteItems.d.ts +1 -1
  66. package/dist/components/PageContainer/AccessibiliteItems.d.ts +1 -1
  67. package/dist/components/PaginatedTable/AccessibiliteItems.d.ts +1 -1
  68. package/dist/components/PasswordField/AccessibiliteItems.d.ts +1 -1
  69. package/dist/components/PeriodField/AccessibiliteItems.d.ts +1 -1
  70. package/dist/components/PeriodField/PeriodField.d.ts +171 -37
  71. package/dist/components/PhoneField/AccessibiliteItems.d.ts +1 -1
  72. package/dist/components/RangeField/AccessibiliteItems.d.ts +1 -1
  73. package/dist/components/RatingPicker/AccessibiliteItems.d.ts +1 -1
  74. package/dist/components/SearchListField/AccessibiliteItems.d.ts +1 -1
  75. package/dist/components/SelectBtnField/AccessibiliteItems.d.ts +1 -1
  76. package/dist/components/SkipLink/AccessibiliteItems.d.ts +1 -1
  77. package/dist/components/SocialMediaLinks/AccessibiliteItems.d.ts +1 -1
  78. package/dist/components/SubHeader/AccessibiliteItems.d.ts +1 -1
  79. package/dist/components/SyAlert/AccessibiliteItems.d.ts +1 -1
  80. package/dist/components/TableToolbar/AccessibiliteItems.d.ts +1 -1
  81. package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +647 -0
  82. package/dist/components/Tables/SyTable/SyTable.d.ts +666 -0
  83. package/dist/components/Tables/common/SyTableFilter.d.ts +126 -0
  84. package/dist/components/Tables/common/TableHeader.d.ts +33 -0
  85. package/dist/components/Tables/common/constants/StateEnum.d.ts +6 -0
  86. package/dist/components/Tables/common/filters/DateFilter.d.ts +121 -0
  87. package/dist/components/Tables/common/filters/NumberFilter.d.ts +132 -0
  88. package/dist/components/Tables/common/filters/PeriodFilter.d.ts +135 -0
  89. package/dist/components/Tables/common/filters/SelectFilter.d.ts +120 -0
  90. package/dist/components/Tables/common/filters/TextFilter.d.ts +132 -0
  91. package/dist/components/Tables/common/formatters.d.ts +17 -0
  92. package/dist/components/Tables/common/locales.d.ts +7 -0
  93. package/dist/components/Tables/common/tableAccessibilityUtils.d.ts +8 -0
  94. package/dist/components/Tables/common/tableFilterUtils.d.ts +2 -0
  95. package/dist/components/Tables/common/tableStorageUtils.d.ts +29 -0
  96. package/dist/components/Tables/common/tableUtils.d.ts +42 -0
  97. package/dist/components/Tables/common/types.d.ts +80 -0
  98. package/dist/components/Tables/common/useTableFilter.d.ts +9 -0
  99. package/dist/components/Tables/index.d.ts +2 -0
  100. package/dist/components/UploadWorkflow/AccessibiliteItems.d.ts +1 -1
  101. package/dist/components/UserMenuBtn/AccessibiliteItems.d.ts +1 -1
  102. package/dist/components/index.d.ts +3 -1
  103. package/dist/design-system-v3.js +100 -11944
  104. package/dist/design-system-v3.umd.cjs +22 -4
  105. package/dist/designTokens/index.d.ts +3 -1
  106. package/dist/designTokens/tokens/cnam/cnamFonts.d.ts +140 -0
  107. package/dist/designTokens/tokens/pa/paFonts.d.ts +140 -0
  108. package/dist/designTokens/utils/createFontVariables.d.ts +39 -0
  109. package/dist/designTokens/utils/index.d.ts +2 -1
  110. package/dist/main-WDqeoGM-.js +14788 -0
  111. package/dist/style.css +1 -1
  112. package/dist/utils/rules/isRequired/index.d.ts +1 -1
  113. package/dist/vite-env.d.ts +12 -0
  114. package/package.json +3 -3
  115. package/src/assets/_spacers.scss +37 -1
  116. package/src/assets/_typography.scss +158 -0
  117. package/src/assets/settings.scss +7 -0
  118. package/src/common/constants/ExpertiseLevelEnum.ts +7 -0
  119. package/src/components/BackBtn/AccessibiliteItems.ts +1 -1
  120. package/src/components/BackToTopBtn/AccessibiliteItems.ts +1 -1
  121. package/src/components/ChipList/AccessibiliteItems.ts +1 -1
  122. package/src/components/CollapsibleList/AccessibiliteItems.ts +1 -1
  123. package/src/components/ContextualMenu/AccessibiliteItems.ts +1 -1
  124. package/src/components/CookieBanner/AccessibiliteItems.ts +1 -1
  125. package/src/components/CopyBtn/AccessibiliteItems.ts +1 -1
  126. package/src/components/Customs/SyBtnSelect/AccessibiliteItems.ts +1 -1
  127. package/src/components/Customs/SyInputSelect/AccessibiliteItems.ts +1 -1
  128. package/src/components/Customs/SySelect/AccessibiliteItems.ts +1 -1
  129. package/src/components/Customs/SySelect/SySelect.vue +3 -9
  130. package/src/components/Customs/SySelect/tests/SySelect.spec.ts +4 -2
  131. package/src/components/Customs/SyTextField/AccessibiliteItems.ts +1 -1
  132. package/src/components/DataList/AccessibiliteItems.ts +1 -1
  133. package/src/components/DataListGroup/AccessibiliteItems.ts +1 -1
  134. package/src/components/DatePicker/AccessibiliteItems.ts +1 -1
  135. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.mdx +212 -0
  136. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +1097 -0
  137. package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +497 -180
  138. package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.spec.ts +941 -0
  139. package/src/components/DatePicker/DatePicker/DatePicker.mdx +176 -0
  140. package/src/components/DatePicker/{tests → DatePicker}/DatePicker.spec.ts +1 -1
  141. package/src/components/DatePicker/{DatePicker.stories.ts → DatePicker/DatePicker.stories.ts} +115 -400
  142. package/src/components/DatePicker/{DatePicker.vue → DatePicker/DatePicker.vue} +302 -84
  143. package/src/components/DatePicker/DatePickerOverview.mdx +227 -0
  144. package/src/components/DatePicker/{DatePickerValidation.mdx → DatePickerValidationExample/DatePickerValidation.mdx} +3 -3
  145. package/src/components/DatePicker/{DatePickerValidation.stories.ts → DatePickerValidationExample/DatePickerValidation.stories.ts} +2 -2
  146. package/src/components/DatePicker/DateTextInput/DateRange.stories.ts +310 -0
  147. package/src/components/DatePicker/DateTextInput/DateTextInput.range.spec.ts +278 -0
  148. package/src/components/DatePicker/{tests → DateTextInput}/DateTextInput.spec.ts +8 -7
  149. package/src/components/DatePicker/DateTextInput/DateTextInput.vue +916 -0
  150. package/src/components/DatePicker/DateTextInput/NoCalendar.mdx +64 -0
  151. package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +572 -0
  152. package/src/components/DatePicker/composables/index.ts +22 -0
  153. package/src/components/DatePicker/composables/tests/useDateFormatValidation.spec.ts +165 -0
  154. package/src/components/DatePicker/composables/tests/useDateInputEditing.spec.ts +359 -0
  155. package/src/components/DatePicker/composables/tests/useDatePickerViewMode.spec.ts +160 -0
  156. package/src/components/DatePicker/composables/tests/useDatePickerVisibility.spec.ts +339 -0
  157. package/src/components/DatePicker/composables/tests/useDateRangeInput.spec.ts +277 -0
  158. package/src/components/DatePicker/composables/tests/useDateRangeValidation.spec.ts +107 -0
  159. package/src/components/DatePicker/composables/tests/useDateSelection.spec.ts +171 -0
  160. package/src/components/DatePicker/composables/tests/useDateValidation.spec.ts +245 -0
  161. package/src/components/DatePicker/composables/tests/useDisplayedDateString.spec.ts +98 -0
  162. package/src/components/DatePicker/composables/tests/useIconState.spec.ts +130 -0
  163. package/src/components/DatePicker/composables/tests/useInputBlurHandler.spec.ts +278 -0
  164. package/src/components/DatePicker/composables/tests/useManualDateValidation.spec.ts +233 -0
  165. package/src/components/DatePicker/composables/tests/useMonthButtonCustomization.spec.ts +100 -0
  166. package/src/components/DatePicker/composables/tests/useTodayButton.spec.ts +97 -0
  167. package/src/components/DatePicker/composables/tests/useWeekendDays.spec.ts +28 -0
  168. package/src/components/DatePicker/composables/useDateFormatValidation.ts +95 -0
  169. package/src/components/DatePicker/composables/useDateInputEditing.ts +326 -0
  170. package/src/components/DatePicker/composables/useDatePickerViewMode.ts +61 -0
  171. package/src/components/DatePicker/composables/useDatePickerVisibility.ts +146 -0
  172. package/src/components/DatePicker/composables/useDateRangeInput.ts +375 -0
  173. package/src/components/DatePicker/composables/useDateRangeValidation.ts +48 -0
  174. package/src/components/DatePicker/composables/useDateSelection.ts +121 -0
  175. package/src/components/DatePicker/composables/useDateValidation.ts +225 -0
  176. package/src/components/DatePicker/composables/useDisplayedDateString.ts +58 -0
  177. package/src/components/DatePicker/composables/useIconState.ts +53 -0
  178. package/src/components/DatePicker/composables/useInputBlurHandler.ts +101 -0
  179. package/src/components/DatePicker/composables/useInputHandler.ts +436 -0
  180. package/src/components/DatePicker/composables/useManualDateValidation.ts +161 -0
  181. package/src/components/DatePicker/composables/useMonthButtonCustomization.ts +89 -0
  182. package/src/components/DatePicker/composables/useTodayButton.ts +43 -0
  183. package/src/components/DatePicker/composables/useWeekendDays.ts +21 -0
  184. package/src/components/DatePicker/constants/messages.ts +50 -0
  185. package/src/components/DatePicker/docExamples/DatePickerBidirectionalValidation.vue +4 -4
  186. package/src/components/DatePicker/docExamples/DatePickerValidationExamples.vue +1 -1
  187. package/src/components/DatePicker/playground/ComplexDatePickerPlayground.vue +172 -0
  188. package/src/components/DatePicker/types.ts +15 -0
  189. package/src/components/DialogBox/AccessibiliteItems.ts +1 -1
  190. package/src/components/DownloadBtn/AccessibiliteItems.ts +1 -1
  191. package/src/components/ErrorPage/AccessibiliteItems.ts +1 -1
  192. package/src/components/ExternalLinks/AccessibiliteItems.ts +1 -1
  193. package/src/components/FileList/AccessibiliteItems.ts +1 -1
  194. package/src/components/FilePreview/AccessibiliteItems.ts +1 -1
  195. package/src/components/FileUpload/AccessibiliteItems.ts +1 -1
  196. package/src/components/FilterInline/AccessibiliteItems.ts +1 -1
  197. package/src/components/FilterSideBar/AccessibiliteItems.ts +1 -1
  198. package/src/components/FilterSideBar/FilterSideBar.vue +108 -90
  199. package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +27 -0
  200. package/src/components/FilterSideBar/tests/__snapshots__/FilterSideBar.spec.ts.snap +114 -109
  201. package/src/components/FooterBar/AccessibiliteItems.ts +1 -1
  202. package/src/components/FooterBar/FooterBar.vue +2 -1
  203. package/src/components/FranceConnectBtn/AccessibiliteItems.ts +1 -1
  204. package/src/components/HeaderBar/AccessibiliteItems.ts +1 -1
  205. package/src/components/HeaderBar/HeaderBurgerMenu/AccessibiliteItems.ts +1 -1
  206. package/src/components/HeaderLoading/AccessibiliteItems.ts +1 -1
  207. package/src/components/HeaderToolbar/AccessibiliteItems.ts +1 -1
  208. package/src/components/LangBtn/AccessibiliteItems.ts +1 -1
  209. package/src/components/Logo/Accessibilite.stories.ts +4 -0
  210. package/src/components/Logo/AccessibiliteItems.ts +1 -1
  211. package/src/components/LogoBrandSection/AccessibiliteItems.ts +1 -1
  212. package/src/components/MaintenancePage/AccessibiliteItems.ts +1 -1
  213. package/src/components/NirField/AccessibiliteItems.ts +1 -1
  214. package/src/components/NotFoundPage/AccessibiliteItems.ts +1 -1
  215. package/src/components/NotificationBar/AccessibiliteItems.ts +1 -1
  216. package/src/components/PageContainer/AccessibiliteItems.ts +1 -1
  217. package/src/components/PaginatedTable/AccessibiliteItems.ts +1 -1
  218. package/src/components/PaginatedTable/PaginatedTable.stories.ts +19 -0
  219. package/src/components/PaginatedTable/PaginatedTable.vue +51 -13
  220. package/src/components/PaginatedTable/tests/PaginatedTable.spec.ts +0 -2
  221. package/src/components/PasswordField/AccessibiliteItems.ts +1 -1
  222. package/src/components/PeriodField/AccessibiliteItems.ts +1 -1
  223. package/src/components/PeriodField/PeriodField.vue +13 -1
  224. package/src/components/PhoneField/AccessibiliteItems.ts +1 -1
  225. package/src/components/RangeField/AccessibiliteItems.ts +1 -1
  226. package/src/components/RatingPicker/AccessibiliteItems.ts +1 -1
  227. package/src/components/SearchListField/AccessibiliteItems.ts +1 -1
  228. package/src/components/SelectBtnField/AccessibiliteItems.ts +1 -1
  229. package/src/components/SkipLink/AccessibiliteItems.ts +1 -1
  230. package/src/components/SocialMediaLinks/AccessibiliteItems.ts +1 -1
  231. package/src/components/SubHeader/AccessibiliteItems.ts +1 -1
  232. package/src/components/SyAlert/AccessibiliteItems.ts +1 -1
  233. package/src/components/TableToolbar/AccessibiliteItems.ts +1 -1
  234. package/src/components/TableToolbar/TableToolbar.stories.ts +110 -56
  235. package/src/components/Tables/SyServerTable/FilterRules.stories.ts +83 -0
  236. package/src/components/Tables/SyServerTable/SyServerTable.mdx +160 -0
  237. package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +2887 -0
  238. package/src/components/Tables/SyServerTable/SyServerTable.vue +302 -0
  239. package/src/components/Tables/SyServerTable/tests/SyServerTable.spec.ts +450 -0
  240. package/src/components/Tables/SyServerTable/tests/__snapshots__/SyServerTable.spec.ts.snap +521 -0
  241. package/src/components/Tables/SyTable/FilterRules.stories.ts +235 -0
  242. package/src/components/Tables/SyTable/SyTable.mdx +129 -0
  243. package/src/components/Tables/SyTable/SyTable.stories.ts +1966 -0
  244. package/src/components/Tables/SyTable/SyTable.vue +317 -0
  245. package/src/components/Tables/SyTable/tests/SyTable.spec.ts +345 -0
  246. package/src/components/Tables/SyTable/tests/__snapshots__/SyTable.spec.ts.snap +521 -0
  247. package/src/components/Tables/common/SyTableFilter.vue +342 -0
  248. package/src/components/Tables/common/TableHeader.vue +221 -0
  249. package/src/components/Tables/common/constants/StateEnum.ts +6 -0
  250. package/src/components/Tables/common/filters/DateFilter.vue +140 -0
  251. package/src/components/Tables/common/filters/NumberFilter.vue +234 -0
  252. package/src/components/Tables/common/filters/PeriodFilter.vue +147 -0
  253. package/src/components/Tables/common/filters/SelectFilter.vue +126 -0
  254. package/src/components/Tables/common/filters/TextFilter.vue +191 -0
  255. package/src/components/Tables/common/filters/tests/DateFilter.spec.ts +187 -0
  256. package/src/components/Tables/common/filters/tests/NumberFilter.spec.ts +280 -0
  257. package/src/components/Tables/common/filters/tests/PeriodFilter.spec.ts +192 -0
  258. package/src/components/Tables/common/filters/tests/SelectFilter.spec.ts +219 -0
  259. package/src/components/Tables/common/filters/tests/TextFilter.spec.ts +260 -0
  260. package/src/components/Tables/common/formatters.ts +72 -0
  261. package/src/components/Tables/common/locales.ts +7 -0
  262. package/src/components/Tables/common/tableAccessibilityUtils.ts +61 -0
  263. package/src/components/Tables/common/tableFilterUtils.ts +327 -0
  264. package/src/components/Tables/common/tableStorageUtils.ts +102 -0
  265. package/src/components/Tables/common/tableStyles.scss +54 -0
  266. package/src/components/Tables/common/tableUtils.ts +115 -0
  267. package/src/components/Tables/common/tests/SyTableFilter.spec.ts +312 -0
  268. package/src/components/Tables/common/tests/resize.spec.ts +161 -0
  269. package/src/components/Tables/common/tests/tableFilterUtils.spec.ts +106 -0
  270. package/src/components/Tables/common/tests/tableUtils.spec.ts +272 -0
  271. package/src/components/Tables/common/types.ts +81 -0
  272. package/src/components/Tables/common/useTableFilter.ts +19 -0
  273. package/src/components/Tables/index.ts +3 -0
  274. package/src/components/UploadWorkflow/AccessibiliteItems.ts +1 -1
  275. package/src/components/UserMenuBtn/AccessibiliteItems.ts +1 -1
  276. package/src/components/index.ts +3 -1
  277. package/src/composables/date/useDateFormatDayjs.ts +8 -3
  278. package/src/composables/date/useDateInitializationDayjs.ts +28 -36
  279. package/src/composables/rules/useFieldValidation.ts +1 -2
  280. package/src/designTokens/index.ts +4 -0
  281. package/src/designTokens/tokens/cnam/cnamFonts.ts +140 -0
  282. package/src/designTokens/tokens/pa/paFonts.ts +140 -0
  283. package/src/designTokens/utils/createFontVariables.ts +143 -0
  284. package/src/designTokens/utils/index.ts +2 -1
  285. package/src/stories/Demarrer/Accueil.stories.ts +12 -3
  286. package/src/utils/rules/isHolidayDay/IsHolidayDay.stories.ts +1 -1
  287. package/src/utils/rules/isRequired/index.ts +2 -1
  288. package/src/vite-env.d.ts +12 -0
  289. package/src/vuetifyConfig.ts +10 -3
  290. package/dist/components/BackToTopBtn/constants/ExpertiseLevelEnum.d.ts +0 -4
  291. package/dist/components/ChipList/constants/ExpertiseLevelEnum.d.ts +0 -4
  292. package/dist/components/CollapsibleList/constants/ExpertiseLevelEnum.d.ts +0 -4
  293. package/dist/components/ContextualMenu/constants/ExpertiseLevelEnum.d.ts +0 -4
  294. package/dist/components/CookieBanner/constants/ExpertiseLevelEnum.d.ts +0 -4
  295. package/dist/components/CopyBtn/constants/ExpertiseLevelEnum.d.ts +0 -4
  296. package/dist/components/Customs/SyBtnSelect/constants/ExpertiseLevelEnum.d.ts +0 -4
  297. package/dist/components/Customs/SyInputSelect/constants/ExpertiseLevelEnum.d.ts +0 -4
  298. package/dist/components/Customs/SySelect/constants/ExpertiseLevelEnum.d.ts +0 -4
  299. package/dist/components/Customs/SyTextField/constants/ExpertiseLevelEnum.d.ts +0 -4
  300. package/dist/components/DataList/constants/ExpertiseLevelEnum.d.ts +0 -4
  301. package/dist/components/DataListGroup/constants/ExpertiseLevelEnum.d.ts +0 -4
  302. package/dist/components/DatePicker/constants/ExpertiseLevelEnum.d.ts +0 -4
  303. package/dist/components/DialogBox/constants/ExpertiseLevelEnum.d.ts +0 -4
  304. package/dist/components/DownloadBtn/constants/ExpertiseLevelEnum.d.ts +0 -4
  305. package/dist/components/ErrorPage/constants/ExpertiseLevelEnum.d.ts +0 -4
  306. package/dist/components/ExternalLinks/constants/ExpertiseLevelEnum.d.ts +0 -4
  307. package/dist/components/FileList/constants/ExpertiseLevelEnum.d.ts +0 -4
  308. package/dist/components/FilePreview/constants/ExpertiseLevelEnum.d.ts +0 -4
  309. package/dist/components/FileUpload/constants/ExpertiseLevelEnum.d.ts +0 -4
  310. package/dist/components/FilterInline/constants/ExpertiseLevelEnum.d.ts +0 -4
  311. package/dist/components/FilterSideBar/constants/ExpertiseLevelEnum.d.ts +0 -4
  312. package/dist/components/FooterBar/constants/ExpertiseLevelEnum.d.ts +0 -4
  313. package/dist/components/FranceConnectBtn/constants/ExpertiseLevelEnum.d.ts +0 -4
  314. package/dist/components/HeaderBar/HeaderBurgerMenu/constants/ExpertiseLevelEnum.d.ts +0 -4
  315. package/dist/components/HeaderBar/constants/ExpertiseLevelEnum.d.ts +0 -4
  316. package/dist/components/HeaderLoading/constants/ExpertiseLevelEnum.d.ts +0 -4
  317. package/dist/components/HeaderToolbar/constants/ExpertiseLevelEnum.d.ts +0 -4
  318. package/dist/components/LangBtn/constants/ExpertiseLevelEnum.d.ts +0 -4
  319. package/dist/components/Logo/constants/ExpertiseLevelEnum.d.ts +0 -4
  320. package/dist/components/LogoBrandSection/constants/ExpertiseLevelEnum.d.ts +0 -4
  321. package/dist/components/MaintenancePage/constants/ExpertiseLevelEnum.d.ts +0 -4
  322. package/dist/components/NirField/constants/ExpertiseLevelEnum.d.ts +0 -4
  323. package/dist/components/NotFoundPage/constants/ExpertiseLevelEnum.d.ts +0 -4
  324. package/dist/components/NotificationBar/constants/ExpertiseLevelEnum.d.ts +0 -4
  325. package/dist/components/PageContainer/constants/ExpertiseLevelEnum.d.ts +0 -4
  326. package/dist/components/PaginatedTable/constants/ExpertiseLevelEnum.d.ts +0 -4
  327. package/dist/components/PasswordField/constants/ExpertiseLevelEnum.d.ts +0 -4
  328. package/dist/components/PeriodField/constants/ExpertiseLevelEnum.d.ts +0 -4
  329. package/dist/components/PhoneField/constants/ExpertiseLevelEnum.d.ts +0 -4
  330. package/dist/components/RangeField/constants/ExpertiseLevelEnum.d.ts +0 -4
  331. package/dist/components/RatingPicker/constants/ExpertiseLevelEnum.d.ts +0 -4
  332. package/dist/components/SearchListField/constants/ExpertiseLevelEnum.d.ts +0 -4
  333. package/dist/components/SelectBtnField/constants/ExpertiseLevelEnum.d.ts +0 -4
  334. package/dist/components/SkipLink/constants/ExpertiseLevelEnum.d.ts +0 -4
  335. package/dist/components/SocialMediaLinks/constants/ExpertiseLevelEnum.d.ts +0 -4
  336. package/dist/components/SubHeader/constants/ExpertiseLevelEnum.d.ts +0 -4
  337. package/dist/components/SyAlert/constants/ExpertiseLevelEnum.d.ts +0 -4
  338. package/dist/components/TableToolbar/constants/ExpertiseLevelEnum.d.ts +0 -4
  339. package/dist/components/UploadWorkflow/constants/ExpertiseLevelEnum.d.ts +0 -4
  340. package/dist/components/UserMenuBtn/constants/ExpertiseLevelEnum.d.ts +0 -4
  341. package/src/components/BackBtn/constants/ExpertiseLevelEnum.ts +0 -4
  342. package/src/components/BackToTopBtn/constants/ExpertiseLevelEnum.ts +0 -4
  343. package/src/components/ChipList/constants/ExpertiseLevelEnum.ts +0 -4
  344. package/src/components/CollapsibleList/constants/ExpertiseLevelEnum.ts +0 -4
  345. package/src/components/ContextualMenu/constants/ExpertiseLevelEnum.ts +0 -4
  346. package/src/components/CookieBanner/constants/ExpertiseLevelEnum.ts +0 -4
  347. package/src/components/CopyBtn/constants/ExpertiseLevelEnum.ts +0 -4
  348. package/src/components/Customs/SyBtnSelect/constants/ExpertiseLevelEnum.ts +0 -4
  349. package/src/components/Customs/SyInputSelect/constants/ExpertiseLevelEnum.ts +0 -4
  350. package/src/components/Customs/SySelect/constants/ExpertiseLevelEnum.ts +0 -4
  351. package/src/components/Customs/SyTextField/constants/ExpertiseLevelEnum.ts +0 -4
  352. package/src/components/DataList/constants/ExpertiseLevelEnum.ts +0 -4
  353. package/src/components/DataListGroup/constants/ExpertiseLevelEnum.ts +0 -4
  354. package/src/components/DatePicker/DatePicker.mdx +0 -222
  355. package/src/components/DatePicker/DateTextInput.vue +0 -504
  356. package/src/components/DatePicker/constants/ExpertiseLevelEnum.ts +0 -4
  357. package/src/components/DialogBox/constants/ExpertiseLevelEnum.ts +0 -4
  358. package/src/components/DownloadBtn/constants/ExpertiseLevelEnum.ts +0 -4
  359. package/src/components/ErrorPage/constants/ExpertiseLevelEnum.ts +0 -4
  360. package/src/components/ExternalLinks/constants/ExpertiseLevelEnum.ts +0 -4
  361. package/src/components/FileList/constants/ExpertiseLevelEnum.ts +0 -4
  362. package/src/components/FilePreview/constants/ExpertiseLevelEnum.ts +0 -4
  363. package/src/components/FileUpload/constants/ExpertiseLevelEnum.ts +0 -4
  364. package/src/components/FilterInline/constants/ExpertiseLevelEnum.ts +0 -4
  365. package/src/components/FilterSideBar/constants/ExpertiseLevelEnum.ts +0 -4
  366. package/src/components/FooterBar/constants/ExpertiseLevelEnum.ts +0 -4
  367. package/src/components/FranceConnectBtn/constants/ExpertiseLevelEnum.ts +0 -4
  368. package/src/components/HeaderBar/HeaderBurgerMenu/constants/ExpertiseLevelEnum.ts +0 -4
  369. package/src/components/HeaderBar/constants/ExpertiseLevelEnum.ts +0 -4
  370. package/src/components/HeaderLoading/constants/ExpertiseLevelEnum.ts +0 -4
  371. package/src/components/HeaderToolbar/constants/ExpertiseLevelEnum.ts +0 -4
  372. package/src/components/LangBtn/constants/ExpertiseLevelEnum.ts +0 -4
  373. package/src/components/Logo/constants/ExpertiseLevelEnum.ts +0 -4
  374. package/src/components/LogoBrandSection/constants/ExpertiseLevelEnum.ts +0 -4
  375. package/src/components/MaintenancePage/constants/ExpertiseLevelEnum.ts +0 -4
  376. package/src/components/NirField/constants/ExpertiseLevelEnum.ts +0 -4
  377. package/src/components/NotFoundPage/constants/ExpertiseLevelEnum.ts +0 -4
  378. package/src/components/NotificationBar/constants/ExpertiseLevelEnum.ts +0 -4
  379. package/src/components/PageContainer/constants/ExpertiseLevelEnum.ts +0 -4
  380. package/src/components/PaginatedTable/constants/ExpertiseLevelEnum.ts +0 -4
  381. package/src/components/PasswordField/constants/ExpertiseLevelEnum.ts +0 -4
  382. package/src/components/PeriodField/constants/ExpertiseLevelEnum.ts +0 -4
  383. package/src/components/PhoneField/constants/ExpertiseLevelEnum.ts +0 -4
  384. package/src/components/RangeField/constants/ExpertiseLevelEnum.ts +0 -4
  385. package/src/components/RatingPicker/constants/ExpertiseLevelEnum.ts +0 -4
  386. package/src/components/SearchListField/constants/ExpertiseLevelEnum.ts +0 -4
  387. package/src/components/SelectBtnField/constants/ExpertiseLevelEnum.ts +0 -4
  388. package/src/components/SkipLink/constants/ExpertiseLevelEnum.ts +0 -4
  389. package/src/components/SocialMediaLinks/constants/ExpertiseLevelEnum.ts +0 -4
  390. package/src/components/SubHeader/constants/ExpertiseLevelEnum.ts +0 -4
  391. package/src/components/SyAlert/constants/ExpertiseLevelEnum.ts +0 -4
  392. package/src/components/TableToolbar/constants/ExpertiseLevelEnum.ts +0 -4
  393. package/src/components/UploadWorkflow/constants/ExpertiseLevelEnum.ts +0 -4
  394. package/src/components/UserMenuBtn/constants/ExpertiseLevelEnum.ts +0 -4
  395. /package/src/components/DatePicker/{examples → playground}/DatePickerHolidayRule.vue +0 -0
@@ -1,6 +1,6 @@
1
1
  import { nextTick } from 'vue';
2
- import { ValidationRule } from '../../composables/validation/useValidation';
3
- type DateValue = string | null;
2
+ import { ValidationRule, ValidationResult } from '../../../composables/validation/useValidation';
3
+ import { DateValue } from '../../../composables/date/useDateInitializationDayjs';
4
4
  type __VLS_Props = {
5
5
  modelValue?: DateValue;
6
6
  placeholder?: string;
@@ -20,6 +20,7 @@ type __VLS_Props = {
20
20
  disableErrorHandling?: boolean;
21
21
  showSuccessMessages?: boolean;
22
22
  bgColor?: string;
23
+ displayRange?: boolean;
23
24
  };
24
25
  declare const _default: import('vue').DefineComponent<__VLS_Props, {
25
26
  validateOnSubmit: () => Promise<boolean>;
@@ -28,11 +29,15 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
28
29
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
29
30
  blur: () => any;
30
31
  focus: () => any;
32
+ input: (value: string) => any;
31
33
  "update:model-value": (value: DateValue) => any;
34
+ "date-selected": (value: DateValue) => any;
32
35
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
33
36
  onBlur?: (() => any) | undefined;
34
37
  onFocus?: (() => any) | undefined;
38
+ onInput?: ((value: string) => any) | undefined;
35
39
  "onUpdate:model-value"?: ((value: DateValue) => any) | undefined;
40
+ "onDate-selected"?: ((value: DateValue) => any) | undefined;
36
41
  }>, {
37
42
  required: boolean;
38
43
  modelValue: DateValue;
@@ -47,6 +52,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
47
52
  showSuccessMessages: boolean;
48
53
  disableErrorHandling: boolean;
49
54
  format: string;
55
+ displayRange: boolean;
50
56
  dateFormatReturn: string;
51
57
  isOutlined: boolean;
52
58
  displayIcon: boolean;
@@ -58,15 +64,15 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
58
64
  $data: {};
59
65
  $props: {
60
66
  readonly modelValue?: string | number | null | undefined;
61
- readonly prependIcon?: import('../Customs/SyTextField/types').IconType;
62
- readonly appendIcon?: import('../Customs/SyTextField/types').IconType;
63
- readonly prependInnerIcon?: import('../Customs/SyTextField/types').IconType;
64
- readonly appendInnerIcon?: import('../Customs/SyTextField/types').IconType;
67
+ readonly prependIcon?: import('../../Customs/SyTextField/types').IconType;
68
+ readonly appendIcon?: import('../../Customs/SyTextField/types').IconType;
69
+ readonly prependInnerIcon?: import('../../Customs/SyTextField/types').IconType;
70
+ readonly appendInnerIcon?: import('../../Customs/SyTextField/types').IconType;
65
71
  readonly prependTooltip?: string | undefined;
66
72
  readonly appendTooltip?: string | undefined;
67
73
  readonly tooltipLocation?: "top" | "bottom" | "start" | "end" | undefined;
68
- readonly variantStyle?: import('../Customs/SyTextField/types').VariantStyle | undefined;
69
- readonly color?: import('../Customs/SyTextField/types').ColorType | undefined;
74
+ readonly variantStyle?: import('../../Customs/SyTextField/types').VariantStyle | undefined;
75
+ readonly color?: import('../../Customs/SyTextField/types').ColorType | undefined;
70
76
  readonly isClearable?: boolean | undefined;
71
77
  readonly showDivider?: boolean | undefined;
72
78
  readonly label?: string | undefined;
@@ -1529,15 +1535,15 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
1529
1535
  $el: any;
1530
1536
  $options: import('vue').ComponentOptionsBase<Readonly<{
1531
1537
  modelValue?: string | number | null | undefined;
1532
- prependIcon?: import('../Customs/SyTextField/types').IconType;
1533
- appendIcon?: import('../Customs/SyTextField/types').IconType;
1534
- prependInnerIcon?: import('../Customs/SyTextField/types').IconType;
1535
- appendInnerIcon?: import('../Customs/SyTextField/types').IconType;
1538
+ prependIcon?: import('../../Customs/SyTextField/types').IconType;
1539
+ appendIcon?: import('../../Customs/SyTextField/types').IconType;
1540
+ prependInnerIcon?: import('../../Customs/SyTextField/types').IconType;
1541
+ appendInnerIcon?: import('../../Customs/SyTextField/types').IconType;
1536
1542
  prependTooltip?: string | undefined;
1537
1543
  appendTooltip?: string | undefined;
1538
1544
  tooltipLocation?: "top" | "bottom" | "start" | "end" | undefined;
1539
- variantStyle?: import('../Customs/SyTextField/types').VariantStyle | undefined;
1540
- color?: import('../Customs/SyTextField/types').ColorType | undefined;
1545
+ variantStyle?: import('../../Customs/SyTextField/types').VariantStyle | undefined;
1546
+ color?: import('../../Customs/SyTextField/types').ColorType | undefined;
1541
1547
  isClearable?: boolean | undefined;
1542
1548
  showDivider?: boolean | undefined;
1543
1549
  label?: string | undefined;
@@ -1607,7 +1613,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
1607
1613
  hasError: import('vue').ComputedRef<boolean>;
1608
1614
  hasWarning: import('vue').ComputedRef<boolean>;
1609
1615
  hasSuccess: import('vue').ComputedRef<boolean>;
1610
- validateField: (value: unknown, rules?: ValidationRule[], warningRules?: ValidationRule[], successRules?: ValidationRule[]) => import('../../composables/validation/useValidation').ValidationResult;
1616
+ validateField: (value: unknown, rules?: ValidationRule[], warningRules?: ValidationRule[], successRules?: ValidationRule[]) => ValidationResult;
1611
1617
  validateOnSubmit: () => Promise<boolean>;
1612
1618
  clearValidation: () => void;
1613
1619
  };
@@ -1627,8 +1633,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
1627
1633
  prependTooltip: string;
1628
1634
  appendTooltip: string;
1629
1635
  tooltipLocation: "top" | "bottom" | "start" | "end";
1630
- variantStyle: import('../Customs/SyTextField/types').VariantStyle;
1631
- color: import('../Customs/SyTextField/types').ColorType;
1636
+ variantStyle: import('../../Customs/SyTextField/types').VariantStyle;
1637
+ color: import('../../Customs/SyTextField/types').ColorType;
1632
1638
  isClearable: boolean;
1633
1639
  label: string;
1634
1640
  errorMessages: string[] | null;
@@ -1712,8 +1718,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
1712
1718
  prependTooltip: string;
1713
1719
  appendTooltip: string;
1714
1720
  tooltipLocation: "top" | "bottom" | "start" | "end";
1715
- variantStyle: import('../Customs/SyTextField/types').VariantStyle;
1716
- color: import('../Customs/SyTextField/types').ColorType;
1721
+ variantStyle: import('../../Customs/SyTextField/types').VariantStyle;
1722
+ color: import('../../Customs/SyTextField/types').ColorType;
1717
1723
  isClearable: boolean;
1718
1724
  label: string;
1719
1725
  errorMessages: string[] | null;
@@ -1770,15 +1776,15 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
1770
1776
  autocomplete: string;
1771
1777
  }> & Omit<Readonly<{
1772
1778
  modelValue?: string | number | null | undefined;
1773
- prependIcon?: import('../Customs/SyTextField/types').IconType;
1774
- appendIcon?: import('../Customs/SyTextField/types').IconType;
1775
- prependInnerIcon?: import('../Customs/SyTextField/types').IconType;
1776
- appendInnerIcon?: import('../Customs/SyTextField/types').IconType;
1779
+ prependIcon?: import('../../Customs/SyTextField/types').IconType;
1780
+ appendIcon?: import('../../Customs/SyTextField/types').IconType;
1781
+ prependInnerIcon?: import('../../Customs/SyTextField/types').IconType;
1782
+ appendInnerIcon?: import('../../Customs/SyTextField/types').IconType;
1777
1783
  prependTooltip?: string | undefined;
1778
1784
  appendTooltip?: string | undefined;
1779
1785
  tooltipLocation?: "top" | "bottom" | "start" | "end" | undefined;
1780
- variantStyle?: import('../Customs/SyTextField/types').VariantStyle | undefined;
1781
- color?: import('../Customs/SyTextField/types').ColorType | undefined;
1786
+ variantStyle?: import('../../Customs/SyTextField/types').VariantStyle | undefined;
1787
+ color?: import('../../Customs/SyTextField/types').ColorType | undefined;
1782
1788
  isClearable?: boolean | undefined;
1783
1789
  showDivider?: boolean | undefined;
1784
1790
  label?: string | undefined;
@@ -1848,7 +1854,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
1848
1854
  hasError: import('vue').ComputedRef<boolean>;
1849
1855
  hasWarning: import('vue').ComputedRef<boolean>;
1850
1856
  hasSuccess: import('vue').ComputedRef<boolean>;
1851
- validateField: (value: unknown, rules?: ValidationRule[], warningRules?: ValidationRule[], successRules?: ValidationRule[]) => import('../../composables/validation/useValidation').ValidationResult;
1857
+ validateField: (value: unknown, rules?: ValidationRule[], warningRules?: ValidationRule[], successRules?: ValidationRule[]) => ValidationResult;
1852
1858
  validateOnSubmit: () => Promise<boolean>;
1853
1859
  clearValidation: () => void;
1854
1860
  };
@@ -0,0 +1,15 @@
1
+ export { useDateInputEditing } from './useDateInputEditing';
2
+ export { useDateRangeInput } from './useDateRangeInput';
3
+ export { useDateSelection } from './useDateSelection';
4
+ export { useDateValidation } from './useDateValidation';
5
+ export { useDateFormatValidation } from './useDateFormatValidation';
6
+ export { useDateRangeValidation } from './useDateRangeValidation';
7
+ export { useManualDateValidation } from './useManualDateValidation';
8
+ export { useDatePickerViewMode } from './useDatePickerViewMode';
9
+ export { useDatePickerVisibility } from './useDatePickerVisibility';
10
+ export { useDisplayedDateString } from './useDisplayedDateString';
11
+ export { useIconState } from './useIconState';
12
+ export { useInputBlurHandler } from './useInputBlurHandler';
13
+ export { useTodayButton } from './useTodayButton';
14
+ export { useWeekendDays } from './useWeekendDays';
15
+ export { useMonthButtonCustomization } from './useMonthButtonCustomization';
@@ -0,0 +1,25 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * Composable pour la validation du format des dates
4
+ *
5
+ * @param options - Options de configuration
6
+ * @param options.format - Format d'affichage de la date (ex: 'DD/MM/YYYY')
7
+ * @param options.dateFormatReturn - Format de retour de la date (optionnel)
8
+ * @param options.required - Indique si le champ est requis
9
+ * @param options.hasInteracted - Ref indiquant si l'utilisateur a interagi avec le champ
10
+ * @param options.disableErrorHandling - Désactive la gestion des erreurs
11
+ * @returns Fonctions et propriétés pour la validation du format des dates
12
+ */
13
+ export declare const useDateFormatValidation: (options: {
14
+ format: string;
15
+ dateFormatReturn?: string;
16
+ required?: boolean;
17
+ hasInteracted: Ref<boolean>;
18
+ disableErrorHandling?: boolean;
19
+ }) => {
20
+ validateDateFormat: (dateStr: string) => {
21
+ isValid: boolean;
22
+ message: string;
23
+ };
24
+ isDateComplete: import('vue').ComputedRef<(dateStr: string) => boolean>;
25
+ };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Options pour le composable useDateInputEditing
3
+ */
4
+ export interface DateInputEditingOptions {
5
+ format: string;
6
+ updateDisplayValue: (value: string) => void;
7
+ updateAriaLabel?: (value: string) => void;
8
+ placeholderChar?: string;
9
+ accessiblePlaceholders?: boolean;
10
+ }
11
+ /**
12
+ * Résultat du formatage d'une date
13
+ */
14
+ export interface FormatDateInputResult {
15
+ formatted: string;
16
+ cursorPos: number;
17
+ }
18
+ /**
19
+ * Composable pour gérer l'édition manuelle des dates
20
+ * Ce composable fournit des fonctions pour formater les dates pendant la saisie
21
+ * et gérer les touches spéciales comme Backspace et les flèches
22
+ *
23
+ * @param options - Options de configuration
24
+ * @returns Fonctions pour gérer l'édition manuelle des dates
25
+ */
26
+ export declare const useDateInputEditing: (options: DateInputEditingOptions) => {
27
+ formatDateInput: (input: string, cursorPosition?: number) => FormatDateInputResult;
28
+ handleKeydown: (event: KeyboardEvent & {
29
+ target: HTMLInputElement;
30
+ }) => void;
31
+ handlePaste: (event: ClipboardEvent) => void;
32
+ getDateDescription: (dateStr: string, format: string) => string;
33
+ };
@@ -0,0 +1,16 @@
1
+ import { Ref } from 'vue';
2
+ export type ViewMode = 'month' | 'year' | 'months' | undefined;
3
+ export interface ViewModeReturn {
4
+ currentViewMode: Ref<ViewMode>;
5
+ handleViewModeUpdate: (newMode: ViewMode) => void;
6
+ handleYearUpdate: () => void;
7
+ handleMonthUpdate: () => void;
8
+ resetViewMode: () => void;
9
+ }
10
+ /**
11
+ * Composable pour gérer le mode d'affichage du DatePicker (année, mois, jour)
12
+ * Utilisé pour contrôler le comportement du DatePicker, notamment pour les dates de naissance
13
+ *
14
+ * @param isBirthDateGetter - Une fonction qui retourne la valeur actuelle de isBirthDate
15
+ */
16
+ export declare function useDatePickerViewMode(isBirthDateGetter: () => boolean): ViewModeReturn;
@@ -0,0 +1,27 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * Composable pour gérer la visibilité et les interactions avec le DatePicker
4
+ *
5
+ * @param options - Options de configuration
6
+ * @returns Fonctions pour gérer la visibilité du DatePicker
7
+ */
8
+ export declare const useDatePickerVisibility: (options: {
9
+ disabled?: boolean;
10
+ readonly?: boolean;
11
+ textFieldActivator?: boolean;
12
+ isDatePickerVisible: Ref<boolean>;
13
+ isManualInputActive: Ref<boolean>;
14
+ hasInteracted: Ref<boolean>;
15
+ updateAccessibility: () => void;
16
+ validateDates: () => void;
17
+ emitClosed: () => void;
18
+ emitFocus: () => void;
19
+ }) => {
20
+ toggleDatePicker: () => void;
21
+ openDatePicker: () => void;
22
+ openDatePickerOnClick: () => void;
23
+ openDatePickerOnFocus: () => void;
24
+ openDatePickerOnIconClick: () => void;
25
+ handleClickOutside: (event: MouseEvent) => void;
26
+ handleKeyboardNavigation: (event: KeyboardEvent) => boolean;
27
+ };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Composable pour gérer la saisie manuelle des plages de dates
3
+ * Permet de saisir et formater correctement une plage de dates au format "date1 - date2"
4
+ */
5
+ export declare function useDateRangeInput(format: string, isRangeMode: boolean, parseDate: (dateStr: string, format: string) => Date | null, formatDate: (date: Date, format: string) => string): {
6
+ isEditingSecondDate: import('vue').Ref<boolean, boolean>;
7
+ firstDate: import('vue').Ref<Date | null, Date | null>;
8
+ secondDate: import('vue').Ref<Date | null, Date | null>;
9
+ rangeSeparator: string;
10
+ hasRangeSeparator: (value: string) => boolean;
11
+ extractRangeParts: (value: string) => [string, string];
12
+ formatRangeForDisplay: (startDate: Date | null, endDate: Date | null) => string;
13
+ parseRangeInput: (value: string) => [Date | null, Date | null];
14
+ handleRangeInput: (inputValue: string, newValue: string, cursorPosition?: number) => {
15
+ formattedValue: string;
16
+ dates: [Date | null, Date | null];
17
+ isComplete: boolean;
18
+ justCompletedFirstDate?: boolean | undefined;
19
+ cursorPosition?: number | undefined;
20
+ };
21
+ initializeWithDates: (startDate: Date | null, endDate: Date | null) => void;
22
+ resetState: () => void;
23
+ isValidRange: (startDate: Date | null, endDate: Date | null) => boolean;
24
+ currentRangeIsValid: import('vue').ComputedRef<boolean>;
25
+ handleKeydown: (event: KeyboardEvent & {
26
+ target: HTMLInputElement;
27
+ }) => void;
28
+ handlePaste: (event: ClipboardEvent) => void;
29
+ };
@@ -0,0 +1,11 @@
1
+ import { Ref } from 'vue';
2
+ import { DateObjectValue } from '../types';
3
+ /**
4
+ * Composable pour gérer la validation des plages de dates
5
+ * Permet de vérifier si une plage de dates est valide (date de début avant date de fin)
6
+ */
7
+ export declare function useDateRangeValidation(selectedDates: Ref<DateObjectValue>, displayRange: boolean): {
8
+ isRangeValid: (startDate: Date | null, endDate: Date | null) => boolean;
9
+ currentRangeIsValid: import('vue').ComputedRef<boolean>;
10
+ getRangeValidationError: import('vue').ComputedRef<string>;
11
+ };
@@ -0,0 +1,10 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * Composable pour gérer la sélection de dates dans les composants DatePicker
4
+ * Gère les plages de dates et la génération des dates intermédiaires
5
+ */
6
+ export declare function useDateSelection(parseDate: (dateStr: string, format: string) => Date | null, selectedDates: Ref<Date | (Date | null)[] | null>, format: string, displayRange: boolean): {
7
+ updateSelectedDates: (input: Date | Date[] | string | string[] | null | undefined) => void;
8
+ rangeBoundaryDates: Ref<[Date | null, Date | null] | null, [Date | null, Date | null] | null>;
9
+ generateDateRange: (start: Date, end: Date) => Date[];
10
+ };
@@ -0,0 +1,35 @@
1
+ import { Ref } from 'vue';
2
+ import { ValidationResult } from '../../../composables/validation/useValidation';
3
+ import { DateObjectValue } from '../types';
4
+ /**
5
+ * Composable pour la validation des dates
6
+ *
7
+ * @param options - Options de configuration
8
+ * @returns Fonctions pour la validation des dates
9
+ */
10
+ export declare const useDateValidation: (options: {
11
+ noCalendar?: boolean | undefined;
12
+ required?: boolean | undefined;
13
+ displayRange?: boolean | undefined;
14
+ disableErrorHandling?: boolean | undefined;
15
+ customRules?: {
16
+ type: string;
17
+ options: any;
18
+ }[] | undefined;
19
+ customWarningRules?: {
20
+ type: string;
21
+ options: any;
22
+ }[] | undefined;
23
+ selectedDates: Ref<DateObjectValue>;
24
+ isUpdatingFromInternal: Ref<boolean>;
25
+ currentRangeIsValid: Ref<boolean>;
26
+ getRangeValidationError: Ref<string>;
27
+ clearValidation: () => void;
28
+ validateField: (value: any, rules?: any[], warningRules?: any[]) => ValidationResult;
29
+ errors: Ref<string[]>;
30
+ warnings: Ref<string[]>;
31
+ successes: Ref<string[]>;
32
+ }) => {
33
+ validateDates: (forceValidation?: boolean) => ValidationResult;
34
+ validateOnSubmit: () => ValidationResult;
35
+ };
@@ -0,0 +1,16 @@
1
+ import { ComputedRef } from 'vue';
2
+ import { DateObjectValue } from '../types';
3
+ export interface DisplayedDateStringProps {
4
+ selectedDates: {
5
+ value: DateObjectValue;
6
+ };
7
+ todayInString: ComputedRef<string>;
8
+ }
9
+ export interface DisplayedDateStringReturn {
10
+ displayedDateString: ComputedRef<string>;
11
+ }
12
+ /**
13
+ * Composable pour formater l'affichage des dates sélectionnées
14
+ * Gère à la fois les dates uniques et les plages de dates
15
+ */
16
+ export declare function useDisplayedDateString(props: DisplayedDateStringProps): DisplayedDateStringReturn;
@@ -0,0 +1,17 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * Composable pour déterminer l'icône à afficher en fonction de l'état de validation
4
+ *
5
+ * @param options - Options de configuration
6
+ * @returns Fonction pour obtenir l'icône appropriée
7
+ */
8
+ export declare const useIconState: (options: {
9
+ noCalendar?: boolean;
10
+ disableErrorHandling?: boolean;
11
+ errorMessages: Ref<string[]>;
12
+ warningMessages: Ref<string[]>;
13
+ successMessages: Ref<string[]>;
14
+ }) => {
15
+ getIcon: import('vue').ComputedRef<"success" | "warning" | "error" | undefined>;
16
+ getIconValue: import('vue').ComputedRef<"success" | "warning" | "error" | undefined>;
17
+ };
@@ -0,0 +1,30 @@
1
+ import { Ref } from 'vue';
2
+ import { DateValue } from '../../../composables/date/useDateInitializationDayjs';
3
+ import { DateObjectValue } from '../types';
4
+ /**
5
+ * Composable pour gérer le comportement lors de la perte de focus d'un champ de date
6
+ *
7
+ * @param options - Options de configuration
8
+ * @returns Fonction pour gérer la perte de focus
9
+ */
10
+ export declare const useInputBlurHandler: (options: {
11
+ format: string;
12
+ dateFormatReturn?: string | undefined;
13
+ required?: boolean | undefined;
14
+ displayFormattedDate: Ref<string>;
15
+ hasInteracted: Ref<boolean>;
16
+ isManualInputActive: Ref<boolean>;
17
+ isUpdatingFromInternal: Ref<boolean>;
18
+ selectedDates: Ref<DateObjectValue>;
19
+ validateDateFormat: (dateStr: string) => {
20
+ isValid: boolean;
21
+ message: string;
22
+ };
23
+ parseDate: (dateStr: string, format: string) => Date | null;
24
+ formatDate: (date: Date, format: string) => string;
25
+ updateModel: (value: DateValue) => void;
26
+ validateManualInput: (value: string) => boolean;
27
+ emitBlur: () => void;
28
+ }) => {
29
+ handleInputBlur: () => void;
30
+ };
@@ -0,0 +1,32 @@
1
+ import { Ref, ComponentPublicInstance } from 'vue';
2
+ import { DateObjectValue } from '../types';
3
+ export interface InputHandlerOptions {
4
+ format: string;
5
+ displayRange: boolean;
6
+ dateFormatReturn?: string;
7
+ disableErrorHandling?: boolean;
8
+ parseDate: (dateStr: string, format: string) => Date | null;
9
+ formatDate: (date: Date, format: string) => string;
10
+ generateDateRange: (startDate: Date, endDate: Date) => Date[];
11
+ isDateComplete: (value: string) => boolean;
12
+ displayFormattedDate: Ref<string>;
13
+ selectedDates: Ref<DateObjectValue>;
14
+ isFormatting: Ref<boolean>;
15
+ isManualInputActive: Ref<boolean>;
16
+ isUpdatingFromInternal: Ref<boolean>;
17
+ clearValidation: () => void;
18
+ validateField: (value: unknown, rules?: unknown[], warningRules?: unknown[]) => unknown;
19
+ updateModel: (value: unknown) => void;
20
+ emitInput: (value: string) => void;
21
+ inputRef: Ref<ComponentPublicInstance | null>;
22
+ }
23
+ export declare function useInputHandler(options: InputHandlerOptions): {
24
+ handleInput: (event: Event) => void;
25
+ updateModelFromSelectedDates: () => void;
26
+ updateCursorPosition: (inputElement: HTMLInputElement | null, position: number) => void;
27
+ formatRangeInput: (value: string, cursorPos: number) => {
28
+ formattedInput: string;
29
+ newCursorPos: number;
30
+ };
31
+ updateSelectedDatesFromFormattedValue: (formattedInput: string) => void;
32
+ };
@@ -0,0 +1,33 @@
1
+ import { Ref } from 'vue';
2
+ import { ValidationResult } from '../../../composables/validation/useValidation';
3
+ /**
4
+ * Composable pour la validation manuelle des dates saisies
5
+ *
6
+ * @param options - Options de configuration
7
+ * @returns Fonction pour valider la saisie manuelle de date
8
+ */
9
+ export declare const useManualDateValidation: (options: {
10
+ format: string;
11
+ required?: boolean | undefined;
12
+ disableErrorHandling?: boolean | undefined;
13
+ customRules?: {
14
+ type: string;
15
+ options: any;
16
+ }[] | undefined;
17
+ customWarningRules?: {
18
+ type: string;
19
+ options: any;
20
+ }[] | undefined;
21
+ hasInteracted: Ref<boolean>;
22
+ errors: Ref<string[]>;
23
+ clearValidation: () => void;
24
+ validateDateFormat: (dateStr: string) => {
25
+ isValid: boolean;
26
+ message: string;
27
+ };
28
+ isDateComplete: (value: string) => boolean;
29
+ parseDate: (dateStr: string, format: string) => Date | null;
30
+ validateField: (value: any, rules?: any[], warningRules?: any[]) => ValidationResult;
31
+ }) => {
32
+ validateManualInput: (value: string) => boolean;
33
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Composable pour personnaliser les boutons du mois et de l'année dans les composants DatePicker
3
+ * @param isPickerVisibleGetter - Fonction qui retourne l'état de visibilité du DatePicker
4
+ */
5
+ export declare function useMonthButtonCustomization(isPickerVisibleGetter: () => boolean): {
6
+ monthButtonText: import('vue').Ref<string, string>;
7
+ customizeMonthButton: () => void;
8
+ setupMonthButtonObserver: () => void;
9
+ };
@@ -0,0 +1,16 @@
1
+ import { ComputedRef } from 'vue';
2
+ import { DateObjectValue } from '../types';
3
+ export interface TodayButtonProps {
4
+ displayTodayButton?: boolean;
5
+ displayRange?: boolean;
6
+ }
7
+ export interface TodayButtonReturn {
8
+ todayInString: ComputedRef<string>;
9
+ selectToday: (selectedDates: {
10
+ value: DateObjectValue;
11
+ }) => void;
12
+ }
13
+ /**
14
+ * Composable pour gérer le bouton "Aujourd'hui" dans le DatePicker
15
+ */
16
+ export declare function useTodayButton(props: TodayButtonProps): TodayButtonReturn;
@@ -0,0 +1,11 @@
1
+ import { ComputedRef } from 'vue';
2
+ export interface WeekendDaysProps {
3
+ displayWeekendDays?: boolean;
4
+ }
5
+ export interface WeekendDaysReturn {
6
+ displayWeekendDays: ComputedRef<boolean>;
7
+ }
8
+ /**
9
+ * Composable pour gérer l'affichage des jours de weekend dans le DatePicker
10
+ */
11
+ export declare function useWeekendDays(props: WeekendDaysProps): WeekendDaysReturn;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Fichier contenant toutes les constantes de textes utilisées dans les composants/composables DatePicker
3
+ */
4
+ export declare const DATE_PICKER_MESSAGES: {
5
+ LABEL_DEFAULT: string;
6
+ PLACEHOLDER_DEFAULT: string;
7
+ ERROR_REQUIRED: string;
8
+ ERROR_INVALID_FORMAT: string;
9
+ ERROR_INVALID_DATE: string;
10
+ ERROR_INCOMPLETE_DATE: string;
11
+ ERROR_INVALID_RANGE: string;
12
+ ERROR_START_DATE_MISSING: string;
13
+ ERROR_END_DATE_MISSING: string;
14
+ ERROR_END_BEFORE_START: string;
15
+ ERROR_INVALID_FORMAT_START: string;
16
+ ERROR_INVALID_FORMAT_END: string;
17
+ SUCCESS_VALID_DATE: string;
18
+ ARIA_DATE_INPUT: string;
19
+ ARIA_CALENDAR_BUTTON: string;
20
+ ARIA_TODAY_BUTTON: string;
21
+ BUTTON_TODAY: string;
22
+ BUTTON_CLEAR: string;
23
+ BUTTON_CLOSE: string;
24
+ FORMAT_DEFAULT: string;
25
+ MONTH_NAMES: string[];
26
+ DAY_NAMES: string[];
27
+ DATE_SEPARATOR: string;
28
+ RANGE_SEPARATOR: string;
29
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Types pour les composants DatePicker
3
+ */
4
+ /**
5
+ * Type représentant une valeur de date qui peut être une Date, un tableau de Dates ou null
6
+ * Utilisé pour les opérations internes du DatePicker avec des objets Date
7
+ */
8
+ export type DateObjectValue = Date | (Date | null)[] | null;
9
+ /**
10
+ * Alias pour maintenir la compatibilité avec le code existant
11
+ * @deprecated Utilisez DateObjectValue pour les objets Date ou importez DateValue depuis useDateInitializationDayjs pour les chaînes
12
+ */
13
+ export type DateValue = DateObjectValue;
@@ -1,4 +1,4 @@
1
- import { ExpertiseLevelEnum } from './constants/ExpertiseLevelEnum';
1
+ import { ExpertiseLevelEnum } from '../../common/constants/ExpertiseLevelEnum';
2
2
  export declare const AccessibiliteItemsIndeterminate: ({
3
3
  title: string;
4
4
  subtitle: string;
@@ -1,4 +1,4 @@
1
- import { ExpertiseLevelEnum } from './constants/ExpertiseLevelEnum';
1
+ import { ExpertiseLevelEnum } from '../../common/constants/ExpertiseLevelEnum';
2
2
  export declare const AccessibiliteItemsIndeterminate: {
3
3
  title: string;
4
4
  subtitle: string;
@@ -1,4 +1,4 @@
1
- import { ExpertiseLevelEnum } from './constants/ExpertiseLevelEnum';
1
+ import { ExpertiseLevelEnum } from '../../common/constants/ExpertiseLevelEnum';
2
2
  export declare const AccessibiliteItemsIndeterminate: ({
3
3
  title: string;
4
4
  subtitle: string;
@@ -1,4 +1,4 @@
1
- import { ExpertiseLevelEnum } from './constants/ExpertiseLevelEnum';
1
+ import { ExpertiseLevelEnum } from '../../common/constants/ExpertiseLevelEnum';
2
2
  export declare const AccessibiliteItemsIndeterminate: ({
3
3
  title: string;
4
4
  subtitle: string;
@@ -1,4 +1,4 @@
1
- import { ExpertiseLevelEnum } from './constants/ExpertiseLevelEnum';
1
+ import { ExpertiseLevelEnum } from '../../common/constants/ExpertiseLevelEnum';
2
2
  export declare const AccessibiliteItemsIndeterminate: {
3
3
  title: string;
4
4
  subtitle: string;
@@ -1,4 +1,4 @@
1
- import { ExpertiseLevelEnum } from './constants/ExpertiseLevelEnum';
1
+ import { ExpertiseLevelEnum } from '../../common/constants/ExpertiseLevelEnum';
2
2
  export declare const AccessibiliteItemsIndeterminate: never[];
3
3
  export declare const AccessibiliteItemsValidated: {
4
4
  title: string;
@@ -1,4 +1,4 @@
1
- import { ExpertiseLevelEnum } from './constants/ExpertiseLevelEnum';
1
+ import { ExpertiseLevelEnum } from '../../common/constants/ExpertiseLevelEnum';
2
2
  export declare const AccessibiliteItemsIndeterminate: never[];
3
3
  export declare const AccessibiliteItemsValidated: {
4
4
  title: string;
@@ -1,4 +1,4 @@
1
- import { ExpertiseLevelEnum } from './constants/ExpertiseLevelEnum';
1
+ import { ExpertiseLevelEnum } from '../../common/constants/ExpertiseLevelEnum';
2
2
  export declare const AccessibiliteItemsIndeterminate: {
3
3
  title: string;
4
4
  subtitle: string;