@cnamts/synapse 1.0.13 → 1.0.15
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.
- package/README.md +72 -72
- package/dist/{DateFilter-_EFzsvvM.js → DateFilter-isr8mXVb.js} +1 -1
- package/dist/{NumberFilter-CUxEbKJh.js → NumberFilter-BOe7DqWX.js} +1 -1
- package/dist/{PeriodFilter-D5ueqtKy.js → PeriodFilter-WTprpO40.js} +1 -1
- package/dist/{SelectFilter-BciBNydy.js → SelectFilter-CqlG5dmI.js} +1 -1
- package/dist/{TextFilter-DMN_WAQB.js → TextFilter-fVW5bsRw.js} +1 -1
- package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +60 -28
- package/dist/components/Amelipro/AmeliproFilePreview/AmeliproFilePreview.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +60 -28
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +61 -29
- package/dist/components/Amelipro/AmeliproTextArea/AmeliproTextArea.d.ts +5 -1
- package/dist/components/Amelipro/AmeliproTextField/AmeliproTextField.d.ts +3 -1
- package/dist/components/Amelipro/StructureMenu/StructureTabs/StructureTabs.d.ts +1 -1
- package/dist/components/Captcha/Captcha.d.ts +2 -0
- package/dist/components/Captcha/CaptchaBase.d.ts +1 -0
- package/dist/components/Customs/Selects/SySelect/SySelect.d.ts +29 -17
- package/dist/components/Customs/SyTabs/SyTabs.d.ts +20 -0
- package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +100 -10
- package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +108 -21
- package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +6 -6
- package/dist/components/DatePicker/composables/useDateFormatDisplay.d.ts +3 -0
- package/dist/components/DatePicker/tests/setup.d.ts +768 -48
- package/dist/components/FilterSideBar/FilterSideBar.d.ts +8 -0
- package/dist/components/HeaderToolbar/HeaderToolbar.d.ts +58 -34
- package/dist/components/LangBtn/LangBtn.d.ts +4 -0
- package/dist/components/PeriodField/PeriodField.d.ts +192 -12
- package/dist/components/RatingPicker/RatingPicker.d.ts +9 -0
- package/dist/components/SearchListField/SearchListField.d.ts +42 -413
- package/dist/components/SearchListField/locales.d.ts +1 -2
- package/dist/components/SyAlert/SyAlert.d.ts +1 -1
- package/dist/components/SyTextArea/SyTextArea.d.ts +2 -0
- package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +15 -8
- package/dist/components/Tables/SyTable/SyTable.d.ts +15 -8
- package/dist/components/Tables/common/SyTablePagination.d.ts +29 -17
- package/dist/components/Tables/common/organizeColumns/OrganizeColumns.d.ts +4 -0
- package/dist/components/Tables/common/types.d.ts +2 -0
- package/dist/design-system-v3.js +1 -1
- package/dist/design-system-v3.umd.cjs +32 -16
- package/dist/{main-DISHlqcd.js → main-CbBVJ_le.js} +9911 -9751
- package/dist/style.css +1 -1
- package/package.json +5 -2
- package/src/assets/amelipro/icons.ts +17 -0
- package/src/components/Amelipro/AmeliproAccordionFrieze/AmeliproAccordionFrieze.stories.ts +40 -36
- package/src/components/Amelipro/AmeliproAccordionGroup/__tests__/AmeliproAccordionGroup.spec.ts +226 -26
- package/src/components/Amelipro/AmeliproAccordionGroup/__tests__/__snapshots__/AmeliproAccordionGroup.spec.ts.snap +55 -506
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.stories.ts +1 -1
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.vue +7 -2
- package/src/components/Amelipro/AmeliproAccordionList/__tests__/__snapshots__/AmeliproAccordionList.spec.ts.snap +2 -1
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/__tests__/__snapshots__/AmeliproAccordionResultTemplate.spec.ts.snap +4 -1
- package/src/components/Amelipro/AmeliproAccordionResult/__tests__/__snapshots__/AmeliproAccordionResult.spec.ts.snap +4 -1
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.stories.ts +1 -1
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.vue +9 -3
- package/src/components/Amelipro/AmeliproAccordionResultList/__tests__/__snapshots__/AmeliproAccordionResultList.spec.ts.snap +42 -11
- package/src/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.stories.ts +4 -4
- package/src/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.vue +7 -5
- package/src/components/Amelipro/AmeliproAutoCompleteField/__tests__/__snapshots__/AmeliproAutoCompleteField.spec.ts.snap +4 -2
- package/src/components/Amelipro/AmeliproBtn/AmeliproBtn.stories.ts +1 -40
- package/src/components/Amelipro/AmeliproBtn/AmeliproBtn.vue +4 -0
- package/src/components/Amelipro/AmeliproCallback/AmeliproCallback.stories.ts +4 -2
- package/src/components/Amelipro/AmeliproCaptcha/__tests__/__snapshots__/AmeliproCaptcha.spec.ts.snap +2 -1
- package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.stories.ts +39 -29
- package/src/components/Amelipro/AmeliproCopyBtn/__tests__/__snapshots__/AmeliproCopyBtn.spec.ts.snap +4 -1
- package/src/components/Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.vue +3 -3
- package/src/components/Amelipro/AmeliproCustomSelector/__tests__/__snapshots__/AmeliproCustomSelector.spec.ts.snap +8 -6
- package/src/components/Amelipro/AmeliproFilePreview/AmeliproFilePreview.mdx +3 -1
- package/src/components/Amelipro/AmeliproFilePreview/AmeliproFilePreview.stories.ts +23 -5
- package/src/components/Amelipro/AmeliproFilePreview/AmeliproFilePreview.vue +5 -6
- package/src/components/Amelipro/AmeliproFilePreview/__tests__/AmeliproFilePreview.spec.ts +2 -2
- package/src/components/Amelipro/AmeliproFilePreview/__tests__/__snapshots__/AmeliproFilePreview.spec.ts.snap +5 -6
- package/src/components/Amelipro/AmeliproFirstLogin/__tests__/__snapshots__/AmeliproFirstLogin.spec.ts.snap +4 -1
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeader.vue +1 -2
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproLogoAm/__tests__/AmeliproLogoAm.spec.ts +78 -0
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproLogoAm/{tests → __tests__}/__snapshots__/AmeliproLogoAm.spec.ts.snap +64 -2
- package/src/components/Amelipro/AmeliproIcon/__tests__/AmeliproIcon.spec.ts +358 -0
- package/src/components/Amelipro/AmeliproIcon/{tests → __tests__}/__snapshots__/AmeliproIcon.spec.ts.snap +30 -3
- package/src/components/Amelipro/AmeliproIcon/iconList.ts +1 -0
- package/src/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.vue +1 -1
- package/src/components/Amelipro/AmeliproIconBtn/__tests__/AmeliproIconBtn.spec.ts +459 -0
- package/src/components/Amelipro/AmeliproIconBtn/__tests__/__snapshots__/AmeliproIconBtn.spec.ts.snap +58 -0
- package/src/components/Amelipro/AmeliproIllustratedDataTile/AmeliproIllustratedDataTile.stories.ts +38 -26
- package/src/components/Amelipro/AmeliproIllustratedDataTile/__tests__/AmeliproIllustratedDataTile.spec.ts +321 -0
- package/src/components/Amelipro/AmeliproIllustratedDataTile/__tests__/__snapshots__/AmeliproIllustratedDataTile.spec.ts.snap +148 -0
- package/src/components/Amelipro/AmeliproIllustratedRadioGroup/AmeliproIllustratedRadioGroup.stories.ts +14 -5
- package/src/components/Amelipro/AmeliproIllustratedRadioGroup/AmeliproIllustratedRadioGroup.vue +1 -1
- package/src/components/Amelipro/AmeliproIllustratedRadioGroup/__tests__/AmeliproIllustratedRadioGroup.spec.ts +498 -0
- package/src/components/Amelipro/AmeliproIllustratedRadioGroup/__tests__/__snapshots__/AmeliproIllustratedRadioGroup.spec.ts.snap +325 -0
- package/src/components/Amelipro/AmeliproMailTile/__tests__/AmeliproMailTile.spec.ts +210 -0
- package/src/components/Amelipro/AmeliproMailTile/__tests__/__snapshots__/AmeliproMailTile.spec.ts.snap +98 -0
- package/src/components/Amelipro/AmeliproMessage/__tests__/AmeliproMessage.spec.ts +446 -0
- package/src/components/Amelipro/AmeliproMessage/__tests__/__snapshots__/AmeliproMessage.spec.ts.snap +60 -0
- package/src/components/Amelipro/AmeliproMessagingLayout/__tests__/AmeliproMessagingLayout.spec.ts +300 -0
- package/src/components/Amelipro/AmeliproMessagingLayout/__tests__/__snapshots__/AmeliproMessagingLayout.spec.ts.snap +197 -0
- package/src/components/Amelipro/AmeliproNumberedCard/__tests__/AmeliproNumberedCard.spec.ts +117 -0
- package/src/components/Amelipro/AmeliproNumberedCard/{tests → __tests__}/__snapshots__/AmeliproNumberedCard.spec.ts.snap +47 -45
- package/src/components/Amelipro/AmeliproOnboarding/__tests__/AmeliproOnboarding.spec.ts +219 -0
- package/src/components/Amelipro/AmeliproOnboarding/__tests__/__snapshots__/AmeliproOnboarding.spec.ts.snap +41 -0
- package/src/components/Amelipro/AmeliproPageLayout/__tests__/AmeliproPageLayout.spec.ts +129 -0
- package/src/components/Amelipro/AmeliproPageLayout/__tests__/__snapshots__/AmeliproPageLayout.spec.ts.snap +189 -0
- package/src/components/Amelipro/AmeliproPagination/AmeliproPaginationBtn/__tests__/AmeliproPaginationBtn.spec.ts +92 -0
- package/src/components/Amelipro/AmeliproPagination/AmeliproPaginationBtn/__tests__/__snapshots__/AmeliproPaginationBtn.spec.ts.snap +56 -0
- package/src/components/Amelipro/AmeliproPagination/__tests__/AmeliproPagination.spec.ts +165 -0
- package/src/components/Amelipro/AmeliproPagination/__tests__/__snapshots__/AmeliproPagination.spec.ts.snap +83 -0
- package/src/components/Amelipro/AmeliproPatientBanner/__tests__/AmeliproPatientBanner.spec.ts +208 -0
- package/src/components/Amelipro/AmeliproPatientBanner/__tests__/__snapshots__/AmeliproPatientBanner.spec.ts.snap +285 -0
- package/src/components/Amelipro/AmeliproPatientLogged/__tests__/__snapshots__/AmeliproPatientLogged.spec.ts.snap +26 -7
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/__tests__/__snapshots__/AmeliproPostalAddressCityRow.spec.ts.snap +12 -4
- package/src/components/Amelipro/AmeliproRadioGroup/AmeliproRadioGroup.stories.ts +28 -8
- package/src/components/Amelipro/AmeliproRadioGroup/__tests__/AmeliproRadioGroup.spec.ts +332 -0
- package/src/components/Amelipro/AmeliproRadioGroup/__tests__/__snapshots__/AmeliproRadioGroup.spec.ts.snap +255 -0
- package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.stories.ts +1 -2
- package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.vue +3 -1
- package/src/components/Amelipro/AmeliproResultList/__tests__/__snapshots__/AmeliproResultList.spec.ts.snap +2 -1
- package/src/components/Amelipro/AmeliproSelect/AmeliproSelect.vue +11 -5
- package/src/components/Amelipro/AmeliproSelect/__tests__/AmeliproSelect.spec.ts +481 -0
- package/src/components/Amelipro/AmeliproSelect/__tests__/__snapshots__/AmeliproSelect.spec.ts.snap +117 -0
- package/src/components/Amelipro/AmeliproStateTile/AmeliproStateTile.vue +5 -2
- package/src/components/Amelipro/AmeliproStateTile/__tests__/AmeliproStateTile.spec.ts +206 -0
- package/src/components/Amelipro/AmeliproStateTile/__tests__/__snapshots__/AmeliproStateTile.spec.ts.snap +158 -0
- package/src/components/Amelipro/AmeliproStatus/__tests__/AmeliproStatus.spec.ts +120 -0
- package/src/components/Amelipro/AmeliproStatus/__tests__/__snapshots__/AmeliproStatus.spec.ts.snap +39 -0
- package/src/components/Amelipro/AmeliproStepper/AmeliproStepBtn/__tests__/AmeliproStepBtn.spec.ts +97 -0
- package/src/components/Amelipro/AmeliproStepper/AmeliproStepBtn/__tests__/__snapshots__/AmeliproStepBtn.spec.ts.snap +61 -0
- package/src/components/Amelipro/AmeliproStepper/__tests__/AmeliproStepper.spec.ts +248 -0
- package/src/components/Amelipro/AmeliproStepper/__tests__/__snapshots__/AmeliproStepper.spec.ts.snap +179 -0
- package/src/components/Amelipro/AmeliproTable/AmeliproTable.stories.ts +14 -13
- package/src/components/Amelipro/AmeliproTable/AmeliproTable.vue +2 -1
- package/src/components/Amelipro/AmeliproTable/__tests__/__snapshots__/AmeliproTable.spec.ts.snap +10 -3
- package/src/components/Amelipro/AmeliproTabs/AmeliproTabBtn/__tests__/AmeliproTabBtn.spec.ts +129 -0
- package/src/components/Amelipro/AmeliproTabs/AmeliproTabBtn/__tests__/__snapshots__/AmeliproTabBtn.spec.ts.snap +81 -0
- package/src/components/Amelipro/AmeliproTabs/AmeliproTabs.vue +2 -2
- package/src/components/Amelipro/AmeliproTabs/__tests__/AmeliproTabs.spec.ts +234 -0
- package/src/components/Amelipro/AmeliproTabs/__tests__/__snapshots__/AmeliproTabs.spec.ts.snap +122 -0
- package/src/components/Amelipro/AmeliproTextArea/AmeliproTextArea.vue +7 -5
- package/src/components/Amelipro/AmeliproTextArea/__tests__/AmeliproTextArea.spec.ts +265 -9
- package/src/components/Amelipro/AmeliproTextArea/__tests__/__snapshots__/AmeliproTextArea.spec.ts.snap +98 -155
- package/src/components/Amelipro/AmeliproTextField/AmeliproTextField.vue +7 -5
- package/src/components/Amelipro/AmeliproTextField/__tests__/AmeliproTextField.spec.ts +375 -0
- package/src/components/Amelipro/AmeliproTextField/__tests__/__snapshots__/AmeliproTextField.spec.ts.snap +143 -0
- package/src/components/Amelipro/AmeliproTileBtn/__tests__/AmeliproTileBtn.spec.ts +241 -0
- package/src/components/Amelipro/AmeliproTileBtn/__tests__/__snapshots__/AmeliproTileBtn.spec.ts.snap +74 -0
- package/src/components/Amelipro/AmeliproTooltips/__tests__/AmeliproTooltips.spec.ts +212 -0
- package/src/components/Amelipro/AmeliproTooltips/__tests__/__snapshots__/AmeliproTooltips.spec.ts.snap +71 -0
- package/src/components/Amelipro/AmeliproTransmission/__tests__/AmeliproTransmission.spec.ts +155 -0
- package/src/components/Amelipro/AmeliproTransmission/__tests__/__snapshots__/AmeliproTransmission.spec.ts.snap +240 -0
- package/src/components/Amelipro/AmeliproUpload/AmeliproUpload.stories.ts +0 -1
- package/src/components/Amelipro/ServiceMenu/tests/__snapshots__/ServiceMenu.spec.ts.snap +4 -1
- package/src/components/Amelipro/StructureMenu/StructureBtn/StructureBtn.vue +4 -0
- package/src/components/Amelipro/StructureMenu/StructureTabs/StructureTabs.vue +4 -5
- package/src/components/Amelipro/StructureMenu/StructureTabs/tests/__snapshots__/StructureTabs.spec.ts.snap +5 -4
- package/src/components/Amelipro/StructureMenu/tests/__snapshots__/StructureMenu.spec.ts.snap +13 -6
- package/src/components/Amelipro/UserMenu/UserMenu.vue +2 -1
- package/src/components/Amelipro/UserMenu/tests/__snapshots__/UserMenu.spec.ts.snap +4 -1
- package/src/components/Captcha/Captcha.mdx +4 -4
- package/src/components/Captcha/Captcha.stories.ts +8 -1
- package/src/components/Captcha/Captcha.vue +3 -0
- package/src/components/Captcha/CaptchaBase.vue +3 -0
- package/src/components/Captcha/captchaApi.ts +0 -1
- package/src/components/Customs/Selects/SySelect/SySelect.vue +2 -2
- package/src/components/Customs/SyCheckbox/SyCheckbox.stories.ts +5 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +1 -1
- package/src/components/Customs/SyTabs/SyTabs.stories.ts +174 -10
- package/src/components/Customs/SyTabs/SyTabs.vue +62 -0
- package/src/components/Customs/SyTabs/tests/SyTabs.spec.ts +98 -0
- package/src/components/DatePicker/CalendarMode/DatePicker.stories.ts +13 -13
- package/src/components/DatePicker/CalendarMode/DatePicker.vue +13 -0
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +11 -11
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +5 -0
- package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.mdx +7 -0
- package/src/components/DatePicker/DateTextInput/DateTextInput.range.spec.ts +1 -1
- package/src/components/DatePicker/DateTextInput/DateTextInput.spec.ts +3 -3
- package/src/components/DatePicker/DateTextInput/DateTextInput.vue +50 -2
- package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +15 -15
- package/src/components/DatePicker/composables/tests/useDateFormatValidation.spec.ts +2 -2
- package/src/components/DatePicker/composables/tests/useManualDateValidation.spec.ts +1 -1
- package/src/components/DatePicker/composables/useDateFormatDisplay.ts +25 -0
- package/src/components/DatePicker/composables/useDateFormatValidation.ts +5 -2
- package/src/components/DatePicker/composables/useManualDateValidation.ts +5 -1
- package/src/components/DatePicker/tests/DatePicker.validation.spec.ts +1 -1
- package/src/components/ErrorPage/ErrorPage.vue +54 -7
- package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +6 -2
- package/src/components/ExternalLinks/ExternalLinks.vue +2 -4
- package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +6 -2
- package/src/components/PasswordField/PasswordField.vue +6 -6
- package/src/components/RangeField/RangeSlider/RangeSlider.vue +3 -2
- package/src/components/RatingPicker/EmotionPicker/EmotionPicker.vue +2 -1
- package/src/components/RatingPicker/NumberPicker/NumberPicker.vue +2 -0
- package/src/components/RatingPicker/RatingPicker.stories.ts +10 -0
- package/src/components/RatingPicker/RatingPicker.vue +23 -1
- package/src/components/RatingPicker/StarsPicker/StarsPicker.vue +2 -0
- package/src/components/SearchListField/Accessibilite.stories.ts +4 -0
- package/src/components/SearchListField/SearchListField.stories.ts +16 -0
- package/src/components/SearchListField/SearchListField.vue +121 -109
- package/src/components/SearchListField/locales.ts +11 -2
- package/src/components/SearchListField/tests/SearchListField.spec.ts +91 -25
- package/src/components/SyAlert/SyAlert.vue +8 -0
- package/src/components/SyAlert/tests/SyAlert.spec.ts +1 -22
- package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +304 -0
- package/src/components/Tables/SyServerTable/SyServerTable.vue +12 -4
- package/src/components/Tables/SyServerTable/tests/SyServerTable.spec.ts +67 -0
- package/src/components/Tables/SyTable/SyTable.stories.ts +186 -0
- package/src/components/Tables/SyTable/SyTable.vue +12 -4
- package/src/components/Tables/SyTable/tests/SyTable.spec.ts +65 -1
- package/src/components/Tables/common/types.ts +2 -0
- package/src/composables/rules/useFieldValidation.ts +47 -7
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproLogoAm/tests/AmeliproLogoAm.spec.ts +0 -15
- package/src/components/Amelipro/AmeliproIcon/tests/AmeliproIcon.spec.ts +0 -19
- package/src/components/Amelipro/AmeliproIconBtn/tests/AmeliproIconBtn.spec.ts +0 -22
- package/src/components/Amelipro/AmeliproIconBtn/tests/__snapshots__/AmeliproIconBtn.spec.ts.snap +0 -87
- package/src/components/Amelipro/AmeliproIllustratedDataTile/tests/AmeliproIllustratedDataTile.spec.ts +0 -20
- package/src/components/Amelipro/AmeliproIllustratedDataTile/tests/__snapshots__/AmeliproIllustratedDataTile.spec.ts.snap +0 -69
- package/src/components/Amelipro/AmeliproIllustratedRadioGroup/tests/AmeliproIllustratedRadioGroup.spec.ts +0 -53
- package/src/components/Amelipro/AmeliproIllustratedRadioGroup/tests/__snapshots__/AmeliproIllustratedRadioGroup.spec.ts.snap +0 -544
- package/src/components/Amelipro/AmeliproMailTile/tests/AmeliproMailTile.spec.ts +0 -25
- package/src/components/Amelipro/AmeliproMailTile/tests/__snapshots__/AmeliproMailTile.spec.ts.snap +0 -164
- package/src/components/Amelipro/AmeliproMessage/tests/AmeliproMessage.spec.ts +0 -18
- package/src/components/Amelipro/AmeliproMessage/tests/__snapshots__/AmeliproMessage.spec.ts.snap +0 -94
- package/src/components/Amelipro/AmeliproMessagingLayout/tests/AmeliproMessagingLayout.spec.ts +0 -30
- package/src/components/Amelipro/AmeliproMessagingLayout/tests/__snapshots__/AmeliproMessagingLayout.spec.ts.snap +0 -439
- package/src/components/Amelipro/AmeliproNumberedCard/tests/AmeliproNumberedCard.spec.ts +0 -23
- package/src/components/Amelipro/AmeliproOnboarding/tests/AmeliproOnboarding.spec.ts +0 -41
- package/src/components/Amelipro/AmeliproOnboarding/tests/__snapshots__/AmeliproOnboarding.spec.ts.snap +0 -3
- package/src/components/Amelipro/AmeliproPageLayout/tests/AmeliproPageLayout.spec.ts +0 -183
- package/src/components/Amelipro/AmeliproPageLayout/tests/__snapshots__/AmeliproPageLayout.spec.ts.snap +0 -1602
- package/src/components/Amelipro/AmeliproPagination/AmeliproPaginationBtn/tests/AmeliproPaginationBtn.spec.ts +0 -15
- package/src/components/Amelipro/AmeliproPagination/AmeliproPaginationBtn/tests/__snapshots__/AmeliproPaginationBtn.spec.ts.snap +0 -46
- package/src/components/Amelipro/AmeliproPagination/tests/AmeliproPagination.spec.ts +0 -15
- package/src/components/Amelipro/AmeliproPagination/tests/__snapshots__/AmeliproPagination.spec.ts.snap +0 -116
- package/src/components/Amelipro/AmeliproPatientBanner/tests/AmeliproPatientBanner.spec.ts +0 -24
- package/src/components/Amelipro/AmeliproPatientBanner/tests/__snapshots__/AmeliproPatientBanner.spec.ts.snap +0 -268
- package/src/components/Amelipro/AmeliproRadioGroup/tests/AmeliproRadioGroup.spec.ts +0 -43
- package/src/components/Amelipro/AmeliproRadioGroup/tests/__snapshots__/AmeliproRadioGroup.spec.ts.snap +0 -262
- package/src/components/Amelipro/AmeliproSelect/tests/AmeliproSelect.spec.ts +0 -38
- package/src/components/Amelipro/AmeliproSelect/tests/__snapshots__/AmeliproSelect.spec.ts.snap +0 -196
- package/src/components/Amelipro/AmeliproStateTile/tests/AmeliproStateTile.spec.ts +0 -20
- package/src/components/Amelipro/AmeliproStateTile/tests/__snapshots__/AmeliproStateTile.spec.ts.snap +0 -90
- package/src/components/Amelipro/AmeliproStatus/tests/AmeliproStatus.spec.ts +0 -16
- package/src/components/Amelipro/AmeliproStatus/tests/__snapshots__/AmeliproStatus.spec.ts.snap +0 -21
- package/src/components/Amelipro/AmeliproStepper/AmeliproStepBtn/tests/AmeliproStepBtn.spec.ts +0 -18
- package/src/components/Amelipro/AmeliproStepper/AmeliproStepBtn/tests/__snapshots__/AmeliproStepBtn.spec.ts.snap +0 -34
- package/src/components/Amelipro/AmeliproStepper/tests/AmeliproStepper.spec.ts +0 -36
- package/src/components/Amelipro/AmeliproStepper/tests/__snapshots__/AmeliproStepper.spec.ts.snap +0 -354
- package/src/components/Amelipro/AmeliproTabs/AmeliproTabBtn/tests/AmeliproTabBtn.spec.ts +0 -20
- package/src/components/Amelipro/AmeliproTabs/AmeliproTabBtn/tests/__snapshots__/AmeliproTabBtn.spec.ts.snap +0 -34
- package/src/components/Amelipro/AmeliproTabs/tests/AmeliproTabs.spec.ts +0 -39
- package/src/components/Amelipro/AmeliproTabs/tests/__snapshots__/AmeliproTabs.spec.ts.snap +0 -217
- package/src/components/Amelipro/AmeliproTextField/tests/AmeliproTextField.spec.ts +0 -16
- package/src/components/Amelipro/AmeliproTextField/tests/__snapshots__/AmeliproTextField.spec.ts.snap +0 -162
- package/src/components/Amelipro/AmeliproTileBtn/tests/AmeliproTileBtn.spec.ts +0 -17
- package/src/components/Amelipro/AmeliproTileBtn/tests/__snapshots__/AmeliproTileBtn.spec.ts.snap +0 -65
- package/src/components/Amelipro/AmeliproTooltips/tests/AmeliproTooltips.spec.ts +0 -16
- package/src/components/Amelipro/AmeliproTooltips/tests/__snapshots__/AmeliproTooltips.spec.ts.snap +0 -105
- package/src/components/Amelipro/AmeliproTransmission/tests/AmeliproTransmission.spec.ts +0 -16
- package/src/components/Amelipro/AmeliproTransmission/tests/__snapshots__/AmeliproTransmission.spec.ts.snap +0 -246
- package/src/components/SyAlert/tests/__snapshots__/SyAlert.spec.ts.snap +0 -99
|
@@ -793,7 +793,7 @@ export const WithDateFormatReturn: Story = {
|
|
|
793
793
|
<div class="d-flex flex-column">
|
|
794
794
|
<DatePicker
|
|
795
795
|
v-model="date"
|
|
796
|
-
placeholder="Format d'affichage:
|
|
796
|
+
placeholder="Format d'affichage: JJ/MM/AAAA, Format de retour: AAAA-MM-JJ"
|
|
797
797
|
format="DD/MM/YYYY"
|
|
798
798
|
dateFormatReturn="YYYY-MM-DD"
|
|
799
799
|
class="mb-4"
|
|
@@ -828,7 +828,7 @@ export const WithDateFormatReturn: Story = {
|
|
|
828
828
|
<div class="d-flex flex-column pa-4">
|
|
829
829
|
<DatePicker
|
|
830
830
|
v-model="date"
|
|
831
|
-
placeholder="Format d'affichage:
|
|
831
|
+
placeholder="Format d'affichage: JJ/MM/AAAA, Format de retour: AAAA-MM-JJ"
|
|
832
832
|
format="DD/MM/YYYY"
|
|
833
833
|
dateFormatReturn="YYYY-MM-DD"
|
|
834
834
|
class="mb-4"
|
|
@@ -960,8 +960,8 @@ export const CustomDateFormat: Story = {
|
|
|
960
960
|
<template>
|
|
961
961
|
<DatePicker
|
|
962
962
|
v-model="date"
|
|
963
|
-
placeholder="Format
|
|
964
|
-
format="
|
|
963
|
+
placeholder="Format AAAA.MM.JJ"
|
|
964
|
+
format="AAAA.MM.JJ"
|
|
965
965
|
useCombinedMode
|
|
966
966
|
/>
|
|
967
967
|
</template>
|
|
@@ -981,7 +981,7 @@ export const CustomDateFormat: Story = {
|
|
|
981
981
|
],
|
|
982
982
|
},
|
|
983
983
|
args: {
|
|
984
|
-
placeholder: 'Format
|
|
984
|
+
placeholder: 'Format AAAA.MM.JJ',
|
|
985
985
|
format: 'YYYY.MM.DD',
|
|
986
986
|
useCombinedMode: true,
|
|
987
987
|
},
|
|
@@ -1307,7 +1307,7 @@ export const AutoClampFeature: Story = {
|
|
|
1307
1307
|
<div class="d-flex flex-column">
|
|
1308
1308
|
<h3>Démonstration de l'auto clamp avec différents formats</h3>
|
|
1309
1309
|
|
|
1310
|
-
<h4 class="mt-4">Format
|
|
1310
|
+
<h4 class="mt-4">Format JJ/MM/AAAA (séparateur /)</h4>
|
|
1311
1311
|
<DatePicker
|
|
1312
1312
|
v-model="dateSlash"
|
|
1313
1313
|
placeholder="Saisie avec auto clamp - séparateur /"
|
|
@@ -1316,7 +1316,7 @@ export const AutoClampFeature: Story = {
|
|
|
1316
1316
|
autoClamp
|
|
1317
1317
|
/>
|
|
1318
1318
|
|
|
1319
|
-
<h4 class="mt-4">Format
|
|
1319
|
+
<h4 class="mt-4">Format JJ-MM-AAAA (séparateur -)</h4>
|
|
1320
1320
|
<DatePicker
|
|
1321
1321
|
v-model="dateDash"
|
|
1322
1322
|
placeholder="Saisie avec auto clamp - séparateur -"
|
|
@@ -1325,7 +1325,7 @@ export const AutoClampFeature: Story = {
|
|
|
1325
1325
|
autoClamp
|
|
1326
1326
|
/>
|
|
1327
1327
|
|
|
1328
|
-
<h4 class="mt-4">Format
|
|
1328
|
+
<h4 class="mt-4">Format AAAA.MM.JJ (séparateur .)</h4>
|
|
1329
1329
|
<DatePicker
|
|
1330
1330
|
v-model="dateDot"
|
|
1331
1331
|
placeholder="Saisie avec auto clamp - séparateur ."
|
|
@@ -1366,7 +1366,7 @@ export const AutoClampFeature: Story = {
|
|
|
1366
1366
|
<h3>Démonstration de l'auto clamp avec différents formats</h3>
|
|
1367
1367
|
<div class="mb-4 mt-2">Saisissez uniquement des chiffres - les séparateurs seront ajoutés automatiquement selon le format défini</div>
|
|
1368
1368
|
|
|
1369
|
-
<h4 class="mb-2">Format
|
|
1369
|
+
<h4 class="mb-2">Format JJ/MM/AAAA (séparateur /)</h4>
|
|
1370
1370
|
<DatePicker
|
|
1371
1371
|
v-model="dateSlash"
|
|
1372
1372
|
placeholder="Saisie avec auto clamp - séparateur /"
|
|
@@ -1376,7 +1376,7 @@ export const AutoClampFeature: Story = {
|
|
|
1376
1376
|
/>
|
|
1377
1377
|
<div class="caption mb-4">Valeur actuelle: {{ dateSlash || 'aucune date saisie' }}</div>
|
|
1378
1378
|
|
|
1379
|
-
<h4 class="mb-2">Format
|
|
1379
|
+
<h4 class="mb-2">Format JJ-MM-AAAA (séparateur -)</h4>
|
|
1380
1380
|
<DatePicker
|
|
1381
1381
|
v-model="dateDash"
|
|
1382
1382
|
placeholder="Saisie avec auto clamp - séparateur -"
|
|
@@ -1386,7 +1386,7 @@ export const AutoClampFeature: Story = {
|
|
|
1386
1386
|
/>
|
|
1387
1387
|
<div class="caption mb-4">Valeur actuelle: {{ dateDash || 'aucune date saisie' }}</div>
|
|
1388
1388
|
|
|
1389
|
-
<h4 class="mb-2">Format
|
|
1389
|
+
<h4 class="mb-2">Format AAAA.MM.JJ (séparateur .)</h4>
|
|
1390
1390
|
<DatePicker
|
|
1391
1391
|
v-model="dateDot"
|
|
1392
1392
|
placeholder="Saisie avec auto clamp - séparateur ."
|
|
@@ -982,6 +982,11 @@
|
|
|
982
982
|
hasInteracted.value = false
|
|
983
983
|
isManualInputActive.value = false
|
|
984
984
|
|
|
985
|
+
if (props.disabled) {
|
|
986
|
+
fieldKey.value++
|
|
987
|
+
return
|
|
988
|
+
}
|
|
989
|
+
|
|
985
990
|
// 2) Réinitialiser la valeur et la sélection SANS déclencher
|
|
986
991
|
// de validation "required" interactive
|
|
987
992
|
withInternalUpdate(() => {
|
|
@@ -7,6 +7,7 @@ import '../../../stories/styles/shared.css';
|
|
|
7
7
|
<div className="header">
|
|
8
8
|
<h1>Documentations des règles de validation du DatePicker</h1>
|
|
9
9
|
<p>Le composant DatePicker prend en charge plusieurs types de règles de validation qui permettent de contrôler les dates saisies par l'utilisateur. Cette documentation décrit toutes les règles disponibles et comment les utiliser.</p>
|
|
10
|
+
<p>Pour les règles <code>notBeforeDate</code>, <code>notAfterDate</code> et <code>dateExact</code>, lorsque la date de référence est vide (valeur <code>null</code> ou chaîne vide), la règle est ignorée pour cette validation. Le message technique « Configuration de la règle invalide » n'est affiché que si l'option <code>date</code> est totalement absente de la configuration de la règle.</p>
|
|
10
11
|
</div>
|
|
11
12
|
|
|
12
13
|
> Pour en savoir plus sur le système global de gestion de validation, consultez la page <a href="/?path=/docs/guide-du-dev-utiliser-le-syst%C3%A8me-de-validation--docs">Utiliser le système de validation</a>.
|
|
@@ -157,6 +158,12 @@ Vérifie que la date sélectionnée est exactement égale à une date de référ
|
|
|
157
158
|
/>
|
|
158
159
|
`}/>
|
|
159
160
|
|
|
161
|
+
#### Notes sur les dates de référence dynamiques
|
|
162
|
+
|
|
163
|
+
Lorsque l'option `date` d'une règle `notBeforeDate`, `notAfterDate` ou `dateExact` est fournie mais que sa valeur est vide (`null` ou chaîne vide), la règle est considérée comme inactive pour cette validation : aucun message d'erreur ou d'avertissement n'est affiché.
|
|
164
|
+
|
|
165
|
+
L'erreur technique « Configuration de la règle invalide » n'est affichée que si l'option `date` est totalement absente de la configuration de la règle (par exemple `{ type: 'notBeforeDate', options: {} }`).
|
|
166
|
+
|
|
160
167
|
### 8. `custom`
|
|
161
168
|
|
|
162
169
|
Permet de créer une règle de validation personnalisée avec une fonction de validation.
|
|
@@ -60,7 +60,7 @@ describe('DateTextInput.vue - Range Mode', () => {
|
|
|
60
60
|
await input.trigger('blur')
|
|
61
61
|
await wrapper.vm.$nextTick()
|
|
62
62
|
const textField = wrapper.findComponent(SyTextField)
|
|
63
|
-
expect(textField.props('errorMessages')).toContain('Format de date invalide (
|
|
63
|
+
expect(textField.props('errorMessages')).toContain('Format de date invalide (JJ/MM/AAAA)')
|
|
64
64
|
})
|
|
65
65
|
|
|
66
66
|
// Test modifié pour vérifier le comportement réel du composant
|
|
@@ -35,7 +35,7 @@ describe('DateTextInput.vue', () => {
|
|
|
35
35
|
await wrapper.vm.$nextTick()
|
|
36
36
|
const textField = wrapper.findComponent(SyTextField)
|
|
37
37
|
|
|
38
|
-
expect(textField.props('errorMessages')).toContain('Format de date invalide (
|
|
38
|
+
expect(textField.props('errorMessages')).toContain('Format de date invalide (JJ/MM/AAAA)')
|
|
39
39
|
})
|
|
40
40
|
|
|
41
41
|
it('accepts valid date format', async () => {
|
|
@@ -129,7 +129,7 @@ describe('DateTextInput.vue', () => {
|
|
|
129
129
|
await input.trigger('blur')
|
|
130
130
|
await wrapper.vm.$nextTick()
|
|
131
131
|
const textField = wrapper.findComponent(SyTextField)
|
|
132
|
-
expect(textField.props('errorMessages')).toContain('Format de date invalide (
|
|
132
|
+
expect(textField.props('errorMessages')).toContain('Format de date invalide (JJ/MM/AAAA)')
|
|
133
133
|
})
|
|
134
134
|
|
|
135
135
|
it('formats input while typing', async () => {
|
|
@@ -162,7 +162,7 @@ describe('DateTextInput.vue', () => {
|
|
|
162
162
|
const input = wrapper.find('input')
|
|
163
163
|
await input.trigger('blur')
|
|
164
164
|
await wrapper.vm.$nextTick()
|
|
165
|
-
expect(textField.props('errorMessages')).toContain('Format de date invalide (
|
|
165
|
+
expect(textField.props('errorMessages')).toContain('Format de date invalide (JJ/MM/AAAA)')
|
|
166
166
|
})
|
|
167
167
|
|
|
168
168
|
it('formats date during input', async () => {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
persistentHint?: boolean
|
|
55
55
|
externalErrorMessages?: string[]
|
|
56
56
|
}>(), {
|
|
57
|
-
modelValue:
|
|
57
|
+
modelValue: undefined,
|
|
58
58
|
placeholder: DATE_PICKER_MESSAGES.PLACEHOLDER_DEFAULT,
|
|
59
59
|
format: DATE_PICKER_MESSAGES.FORMAT_DEFAULT,
|
|
60
60
|
dateFormatReturn: undefined,
|
|
@@ -690,6 +690,49 @@
|
|
|
690
690
|
* =====================
|
|
691
691
|
*/
|
|
692
692
|
watch(inputValue, async (nv, ov) => {
|
|
693
|
+
if (props.disabled) {
|
|
694
|
+
const isEmpty = !nv || nv.trim() === '' || /^[_/\-.\s]+$/.test(nv)
|
|
695
|
+
|
|
696
|
+
if (isEmpty && ov && props.modelValue) {
|
|
697
|
+
isFormatting.value = true
|
|
698
|
+
|
|
699
|
+
const mv = props.modelValue
|
|
700
|
+
|
|
701
|
+
// --- RANGE ---
|
|
702
|
+
if (isRange.value && Array.isArray(mv) && mv.length === 2) {
|
|
703
|
+
const [start, end] = mv
|
|
704
|
+
const sd = parseDate(start, returnFormat.value)
|
|
705
|
+
const ed = parseDate(end, returnFormat.value)
|
|
706
|
+
|
|
707
|
+
if (sd && ed) {
|
|
708
|
+
initializeWithDates(sd, ed)
|
|
709
|
+
selectedDates.value = [sd, ed]
|
|
710
|
+
inputValue.value = formatRangeForDisplay(sd, ed)
|
|
711
|
+
runRules(inputValue.value)
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
// --- SINGLE ---
|
|
716
|
+
else {
|
|
717
|
+
const raw = typeof mv === 'string' ? mv : ''
|
|
718
|
+
const parsed = dayjs(raw, displayFormat.value, true)
|
|
719
|
+
|
|
720
|
+
if (parsed.isValid()) {
|
|
721
|
+
inputValue.value = parsed.format(displayFormat.value)
|
|
722
|
+
runRules(inputValue.value)
|
|
723
|
+
}
|
|
724
|
+
else {
|
|
725
|
+
inputValue.value = raw
|
|
726
|
+
runRules(raw)
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
isFormatting.value = false
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
return
|
|
734
|
+
}
|
|
735
|
+
|
|
693
736
|
// Prevent infinite loops but allow formatting
|
|
694
737
|
if (isFormatting.value || nv === ov || isHandlingBackspace.value || isBootstrapping.value) return
|
|
695
738
|
try {
|
|
@@ -871,7 +914,7 @@
|
|
|
871
914
|
}
|
|
872
915
|
})
|
|
873
916
|
|
|
874
|
-
watch(() => props.modelValue, (nv
|
|
917
|
+
watch(() => props.modelValue, (nv) => {
|
|
875
918
|
if (isFormatting.value) return
|
|
876
919
|
if (!nv) {
|
|
877
920
|
inputValue.value = ''
|
|
@@ -953,6 +996,11 @@
|
|
|
953
996
|
isFocused.value = false
|
|
954
997
|
hasInteracted.value = false
|
|
955
998
|
|
|
999
|
+
if (props.disabled) {
|
|
1000
|
+
fieldKey.value++
|
|
1001
|
+
return
|
|
1002
|
+
}
|
|
1003
|
+
|
|
956
1004
|
// 2) Réinitialiser la valeur sans déclencher de validation interactive
|
|
957
1005
|
isFormatting.value = true
|
|
958
1006
|
inputValue.value = ''
|
|
@@ -681,7 +681,7 @@ export const AutoClampFeature: Story = {
|
|
|
681
681
|
<div class="d-flex flex-column">
|
|
682
682
|
<h3>Démonstration de l'auto clamp dans DateTextInput</h3>
|
|
683
683
|
|
|
684
|
-
<h4 class="mt-4">Format
|
|
684
|
+
<h4 class="mt-4">Format JJ/MM/AAAA (séparateur /)</h4>
|
|
685
685
|
<DatePicker
|
|
686
686
|
v-model="dateSlash"
|
|
687
687
|
placeholder="Saisie avec auto clamp - séparateur /"
|
|
@@ -690,7 +690,7 @@ export const AutoClampFeature: Story = {
|
|
|
690
690
|
autoClamp
|
|
691
691
|
/>
|
|
692
692
|
|
|
693
|
-
<h4 class="mt-4">Format
|
|
693
|
+
<h4 class="mt-4">Format JJ-MM-AAAA (séparateur -)</h4>
|
|
694
694
|
<DatePicker
|
|
695
695
|
v-model="dateDash"
|
|
696
696
|
placeholder="Saisie avec auto clamp - séparateur -"
|
|
@@ -753,7 +753,7 @@ export const AutoClampFeature: Story = {
|
|
|
753
753
|
<h3>Démonstration de l'auto clamp dans DateTextInput</h3>
|
|
754
754
|
<div class="mb-4 mt-2">Saisissez uniquement des chiffres - les séparateurs seront ajoutés automatiquement selon le format défini</div>
|
|
755
755
|
|
|
756
|
-
<h4 class="mb-2">Format
|
|
756
|
+
<h4 class="mb-2">Format JJ/MM/AAAA (séparateur /)</h4>
|
|
757
757
|
<DatePicker
|
|
758
758
|
v-model="dateSlash"
|
|
759
759
|
placeholder="Saisie avec auto clamp - séparateur /"
|
|
@@ -763,7 +763,7 @@ export const AutoClampFeature: Story = {
|
|
|
763
763
|
/>
|
|
764
764
|
<div class="caption mb-4">Valeur actuelle: {{ dateSlash || 'aucune date saisie' }}</div>
|
|
765
765
|
|
|
766
|
-
<h4 class="mb-2">Format
|
|
766
|
+
<h4 class="mb-2">Format JJ-MM-AAAA (séparateur -)</h4>
|
|
767
767
|
<DatePicker
|
|
768
768
|
v-model="dateDash"
|
|
769
769
|
placeholder="Saisie avec auto clamp - séparateur -"
|
|
@@ -773,7 +773,7 @@ export const AutoClampFeature: Story = {
|
|
|
773
773
|
/>
|
|
774
774
|
<div class="caption mb-4">Valeur actuelle: {{ dateDash || 'aucune date saisie' }}</div>
|
|
775
775
|
|
|
776
|
-
<h4 class="mb-2">Format
|
|
776
|
+
<h4 class="mb-2">Format AAAA.MM.JJ (séparateur .)</h4>
|
|
777
777
|
<DatePicker
|
|
778
778
|
v-model="dateDot"
|
|
779
779
|
placeholder="Saisie avec auto clamp - séparateur ."
|
|
@@ -809,31 +809,31 @@ export const DifferentFormats: Story = {
|
|
|
809
809
|
<div class="d-flex flex-column gap-4">
|
|
810
810
|
<DatePicker
|
|
811
811
|
v-model="value1"
|
|
812
|
-
placeholder="Format
|
|
812
|
+
placeholder="Format JJ/MM/AAAA"
|
|
813
813
|
format="DD/MM/YYYY"
|
|
814
814
|
no-calendar
|
|
815
815
|
/>
|
|
816
816
|
<DatePicker
|
|
817
817
|
v-model="value2"
|
|
818
|
-
placeholder="Format MM/
|
|
818
|
+
placeholder="Format MM/JJ/AAAA"
|
|
819
819
|
format="MM/DD/YYYY"
|
|
820
820
|
no-calendar
|
|
821
821
|
/>
|
|
822
822
|
<DatePicker
|
|
823
823
|
v-model="value3"
|
|
824
|
-
placeholder="Format
|
|
824
|
+
placeholder="Format AAAA-MM-JJ"
|
|
825
825
|
format="YYYY-MM-DD"
|
|
826
826
|
no-calendar
|
|
827
827
|
/>
|
|
828
828
|
<DatePicker
|
|
829
829
|
v-model="value4"
|
|
830
|
-
placeholder="Format
|
|
830
|
+
placeholder="Format JJ-MM-AA"
|
|
831
831
|
format="DD-MM-YY"
|
|
832
832
|
no-calendar
|
|
833
833
|
/>
|
|
834
834
|
<DatePicker
|
|
835
835
|
v-model="value5"
|
|
836
|
-
placeholder="Format
|
|
836
|
+
placeholder="Format JJ.MM.AAAA"
|
|
837
837
|
format="DD.MM.YYYY"
|
|
838
838
|
no-calendar
|
|
839
839
|
/>
|
|
@@ -873,35 +873,35 @@ export const DifferentFormats: Story = {
|
|
|
873
873
|
<div class="d-flex flex-column gap-4 pa-4">
|
|
874
874
|
<DatePicker
|
|
875
875
|
v-model="value1"
|
|
876
|
-
placeholder="Format
|
|
876
|
+
placeholder="Format JJ/MM/AAAA"
|
|
877
877
|
format="DD/MM/YYYY"
|
|
878
878
|
no-calendar
|
|
879
879
|
class="py-4"
|
|
880
880
|
/>
|
|
881
881
|
<DatePicker
|
|
882
882
|
v-model="value2"
|
|
883
|
-
placeholder="Format MM/
|
|
883
|
+
placeholder="Format MM/JJ/AAAA"
|
|
884
884
|
format="MM/DD/YYYY"
|
|
885
885
|
no-calendar
|
|
886
886
|
class="py-4"
|
|
887
887
|
/>
|
|
888
888
|
<DatePicker
|
|
889
889
|
v-model="value3"
|
|
890
|
-
placeholder="Format
|
|
890
|
+
placeholder="Format AAAA-MM-JJ"
|
|
891
891
|
format="YYYY-MM-DD"
|
|
892
892
|
no-calendar
|
|
893
893
|
class="py-4"
|
|
894
894
|
/>
|
|
895
895
|
<DatePicker
|
|
896
896
|
v-model="value4"
|
|
897
|
-
placeholder="Format
|
|
897
|
+
placeholder="Format JJ-MM-AA"
|
|
898
898
|
format="DD-MM-YY"
|
|
899
899
|
no-calendar
|
|
900
900
|
class="py-4"
|
|
901
901
|
/>
|
|
902
902
|
<DatePicker
|
|
903
903
|
v-model="value5"
|
|
904
|
-
placeholder="Format
|
|
904
|
+
placeholder="Format JJ.MM.AAAA"
|
|
905
905
|
format="DD.MM.YYYY"
|
|
906
906
|
no-calendar
|
|
907
907
|
class="py-4"
|
|
@@ -29,7 +29,7 @@ describe('useDateFormatValidation', () => {
|
|
|
29
29
|
|
|
30
30
|
const result = validateDateFormat('32/12/2023')
|
|
31
31
|
expect(result.isValid).toBe(false)
|
|
32
|
-
expect(result.message).toBe('Format de date invalide (
|
|
32
|
+
expect(result.message).toBe('Format de date invalide (JJ/MM/AAAA)')
|
|
33
33
|
})
|
|
34
34
|
|
|
35
35
|
it('devrait retourner isValid=true pour une date vide si non requis', () => {
|
|
@@ -78,7 +78,7 @@ describe('useDateFormatValidation', () => {
|
|
|
78
78
|
|
|
79
79
|
const result = validateDateFormat('25/12/2023a')
|
|
80
80
|
expect(result.isValid).toBe(false)
|
|
81
|
-
expect(result.message).toBe('Format de date invalide (
|
|
81
|
+
expect(result.message).toBe('Format de date invalide (JJ/MM/AAAA)')
|
|
82
82
|
})
|
|
83
83
|
|
|
84
84
|
it('devrait valider une date au format alternatif si dateFormatReturn est spécifié', () => {
|
|
@@ -161,7 +161,7 @@ describe('useManualDateValidation', () => {
|
|
|
161
161
|
const result = validateManualInput('01/01/2023')
|
|
162
162
|
|
|
163
163
|
expect(result).toBe(false)
|
|
164
|
-
expect(errors.value).toContain('Format de date invalide (
|
|
164
|
+
expect(errors.value).toContain('Format de date invalide (JJ/MM/AAAA)')
|
|
165
165
|
})
|
|
166
166
|
|
|
167
167
|
it('devrait appeler validateField avec les règles personnalisées', () => {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const useDateFormatDisplay = () => {
|
|
2
|
+
const getDisplayFormat = (format: string): string => {
|
|
3
|
+
if (!format) return ''
|
|
4
|
+
|
|
5
|
+
return format.replace(/[DMY]+/gi, (token) => {
|
|
6
|
+
const upper = token.toUpperCase()
|
|
7
|
+
const firstChar = upper.charAt(0)
|
|
8
|
+
|
|
9
|
+
switch (firstChar) {
|
|
10
|
+
case 'D':
|
|
11
|
+
return 'J'.repeat(token.length)
|
|
12
|
+
case 'M':
|
|
13
|
+
return 'M'.repeat(token.length)
|
|
14
|
+
case 'Y':
|
|
15
|
+
return 'A'.repeat(token.length)
|
|
16
|
+
default:
|
|
17
|
+
return token
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return {
|
|
23
|
+
getDisplayFormat,
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -2,6 +2,7 @@ import { computed, type Ref } from 'vue'
|
|
|
2
2
|
import dayjs from 'dayjs'
|
|
3
3
|
import customParseFormat from 'dayjs/plugin/customParseFormat'
|
|
4
4
|
import { DATE_PICKER_MESSAGES } from '../constants/messages'
|
|
5
|
+
import { useDateFormatDisplay } from './useDateFormatDisplay'
|
|
5
6
|
|
|
6
7
|
// Initialiser le plugin dayjs nécessaire pour la validation des formats de date
|
|
7
8
|
dayjs.extend(customParseFormat)
|
|
@@ -25,6 +26,8 @@ export const useDateFormatValidation = (options: {
|
|
|
25
26
|
disableErrorHandling?: boolean
|
|
26
27
|
}) => {
|
|
27
28
|
const { format, dateFormatReturn, required = false, hasInteracted, disableErrorHandling = false } = options
|
|
29
|
+
const { getDisplayFormat } = useDateFormatDisplay()
|
|
30
|
+
const displayFormat = getDisplayFormat(format)
|
|
28
31
|
|
|
29
32
|
/**
|
|
30
33
|
* Valide le format d'une chaîne de date
|
|
@@ -43,7 +46,7 @@ export const useDateFormatValidation = (options: {
|
|
|
43
46
|
if (!/^[\d/.-]*$/.test(dateStr)) {
|
|
44
47
|
return {
|
|
45
48
|
isValid: disableErrorHandling,
|
|
46
|
-
message: disableErrorHandling ? '' : `Format de date invalide (${
|
|
49
|
+
message: disableErrorHandling ? '' : `Format de date invalide (${displayFormat})`,
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
52
|
|
|
@@ -53,7 +56,7 @@ export const useDateFormatValidation = (options: {
|
|
|
53
56
|
if (!isValid) {
|
|
54
57
|
return {
|
|
55
58
|
isValid: disableErrorHandling,
|
|
56
|
-
message: disableErrorHandling ? '' : `Format de date invalide (${
|
|
59
|
+
message: disableErrorHandling ? '' : `Format de date invalide (${displayFormat})`,
|
|
57
60
|
}
|
|
58
61
|
}
|
|
59
62
|
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
validateEmptyOrIncompleteDate,
|
|
7
7
|
type CustomRule,
|
|
8
8
|
} from '../utils/validationUtils'
|
|
9
|
+
import { useDateFormatDisplay } from './useDateFormatDisplay'
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Composable pour la validation manuelle des dates saisies
|
|
@@ -47,6 +48,9 @@ export const useManualDateValidation = (options: {
|
|
|
47
48
|
validateField,
|
|
48
49
|
} = options
|
|
49
50
|
|
|
51
|
+
const { getDisplayFormat } = useDateFormatDisplay()
|
|
52
|
+
const displayFormat = getDisplayFormat(format)
|
|
53
|
+
|
|
50
54
|
/**
|
|
51
55
|
* Valide une saisie manuelle de date
|
|
52
56
|
*
|
|
@@ -89,7 +93,7 @@ export const useManualDateValidation = (options: {
|
|
|
89
93
|
if (!date) {
|
|
90
94
|
// La date n'a pas pu être parsée
|
|
91
95
|
if (!disableErrorHandling) {
|
|
92
|
-
errors.value.push(`Format de date invalide (${
|
|
96
|
+
errors.value.push(`Format de date invalide (${displayFormat})`)
|
|
93
97
|
}
|
|
94
98
|
return false
|
|
95
99
|
}
|
|
@@ -2634,7 +2634,7 @@ describe('DatePicker - Tests de Validation Complets', () => {
|
|
|
2634
2634
|
const endTime = performance.now()
|
|
2635
2635
|
|
|
2636
2636
|
expect(wrapper.exists()).toBe(true)
|
|
2637
|
-
expect(endTime - startTime).toBeLessThan(
|
|
2637
|
+
expect(endTime - startTime).toBeLessThan(1000) // Moins de 1 seconde sans lag
|
|
2638
2638
|
})
|
|
2639
2639
|
})
|
|
2640
2640
|
|
|
@@ -3,10 +3,45 @@
|
|
|
3
3
|
import { locales } from './locales'
|
|
4
4
|
import PageContainer from '../PageContainer/PageContainer.vue'
|
|
5
5
|
|
|
6
|
+
type MessagePart =
|
|
7
|
+
| { type: 'text', value: string }
|
|
8
|
+
| { type: 'phone', value: string }
|
|
9
|
+
|
|
6
10
|
// Fonction pour formater le message et ajouter des liens tel: aux numéros de téléphone
|
|
7
|
-
const
|
|
8
|
-
// Regex pour détecter les numéros de téléphone
|
|
9
|
-
|
|
11
|
+
const splitMessage = (message?: string): MessagePart[] => {
|
|
12
|
+
// Regex pour détecter les numéros de téléphone
|
|
13
|
+
if (!message)
|
|
14
|
+
return []
|
|
15
|
+
|
|
16
|
+
const regex = /\b(\d{4}|\d{10})\b/g
|
|
17
|
+
const parts: MessagePart[] = []
|
|
18
|
+
let lastIndex = 0
|
|
19
|
+
let match: RegExpExecArray | null
|
|
20
|
+
|
|
21
|
+
while ((match = regex.exec(message)) !== null) {
|
|
22
|
+
if (match.index > lastIndex) {
|
|
23
|
+
parts.push({
|
|
24
|
+
type: 'text',
|
|
25
|
+
value: message.slice(lastIndex, match.index),
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
parts.push({
|
|
30
|
+
type: 'phone',
|
|
31
|
+
value: match[1],
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
lastIndex = regex.lastIndex
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (lastIndex < message.length) {
|
|
38
|
+
parts.push({
|
|
39
|
+
type: 'text',
|
|
40
|
+
value: message.slice(lastIndex),
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return parts
|
|
10
45
|
}
|
|
11
46
|
|
|
12
47
|
withDefaults(defineProps<{
|
|
@@ -57,10 +92,22 @@
|
|
|
57
92
|
{{ pageTitle }}
|
|
58
93
|
</h1>
|
|
59
94
|
|
|
60
|
-
<p
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
95
|
+
<p v-if="message">
|
|
96
|
+
<template
|
|
97
|
+
v-for="(part, index) in splitMessage(message)"
|
|
98
|
+
:key="index"
|
|
99
|
+
>
|
|
100
|
+
<span v-if="part.type === 'text'">
|
|
101
|
+
{{ part.value }}
|
|
102
|
+
</span>
|
|
103
|
+
<a
|
|
104
|
+
v-else
|
|
105
|
+
:href="`tel:${part.value}`"
|
|
106
|
+
>
|
|
107
|
+
{{ part.value }}
|
|
108
|
+
</a>
|
|
109
|
+
</template>
|
|
110
|
+
</p>
|
|
64
111
|
|
|
65
112
|
<slot name="additional-content" />
|
|
66
113
|
|
|
@@ -103,7 +103,9 @@ exports[`ErrorPage > renders correctly 1`] = `
|
|
|
103
103
|
Something went wrong
|
|
104
104
|
</h1>
|
|
105
105
|
<p>
|
|
106
|
-
|
|
106
|
+
<span>
|
|
107
|
+
Error message
|
|
108
|
+
</span>
|
|
107
109
|
</p>
|
|
108
110
|
<!-- v-if -->
|
|
109
111
|
</div>
|
|
@@ -229,7 +231,9 @@ exports[`ErrorPage > renders correctly with undefined route 1`] = `
|
|
|
229
231
|
Error
|
|
230
232
|
</h1>
|
|
231
233
|
<p>
|
|
232
|
-
|
|
234
|
+
<span>
|
|
235
|
+
Error message
|
|
236
|
+
</span>
|
|
233
237
|
</p>
|
|
234
238
|
<a
|
|
235
239
|
class="
|
|
@@ -145,9 +145,7 @@
|
|
|
145
145
|
class="sy-external-links-list-item py-2"
|
|
146
146
|
v-bind="options.listItem"
|
|
147
147
|
>
|
|
148
|
-
<div
|
|
149
|
-
class="w-100 h-100 d-flex justify-space-between align-center"
|
|
150
|
-
>
|
|
148
|
+
<div class="w-100 h-100 d-flex justify-space-between align-center">
|
|
151
149
|
<div v-bind="options.listItemTitle">
|
|
152
150
|
{{ item.text }}
|
|
153
151
|
</div>
|
|
@@ -183,6 +181,7 @@ $list-max-height: 248px;
|
|
|
183
181
|
// Allow overgrow on mobile
|
|
184
182
|
max-width: none;
|
|
185
183
|
border-radius: 0 !important;
|
|
184
|
+
box-shadow: none !important;
|
|
186
185
|
|
|
187
186
|
:deep(.v-btn__content) {
|
|
188
187
|
flex-direction: inherit;
|
|
@@ -244,7 +243,6 @@ $list-max-height: 248px;
|
|
|
244
243
|
width: 100%;
|
|
245
244
|
font-size: 1rem;
|
|
246
245
|
font-weight: 400;
|
|
247
|
-
letter-spacing: 0.0094em;
|
|
248
246
|
}
|
|
249
247
|
|
|
250
248
|
@media only screen and (height <= 340px) {
|
|
@@ -112,7 +112,9 @@ exports[`NotFoundPage > display the support ID if provided in the url 1`] = `
|
|
|
112
112
|
Page non trouvée
|
|
113
113
|
</h1>
|
|
114
114
|
<p>
|
|
115
|
-
|
|
115
|
+
<span>
|
|
116
|
+
Cette page n’existe pas ou a été déplacée.
|
|
117
|
+
</span>
|
|
116
118
|
</p>
|
|
117
119
|
<p class="mt-4">
|
|
118
120
|
Votre identifiant de support est
|
|
@@ -257,7 +259,9 @@ exports[`NotFoundPage > renders correctly 1`] = `
|
|
|
257
259
|
Page non trouvée
|
|
258
260
|
</h1>
|
|
259
261
|
<p>
|
|
260
|
-
|
|
262
|
+
<span>
|
|
263
|
+
Cette page n’existe pas ou a été déplacée.
|
|
264
|
+
</span>
|
|
261
265
|
</p>
|
|
262
266
|
<!-- v-if -->
|
|
263
267
|
</div>
|