@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
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
urlCreate: string
|
|
15
15
|
urlGetImage: string
|
|
16
16
|
urlGetAudio: string
|
|
17
|
+
locale: string
|
|
17
18
|
locales: typeof defaultLocales
|
|
18
19
|
}>()
|
|
19
20
|
|
|
@@ -81,6 +82,7 @@
|
|
|
81
82
|
state.value = 'resolved'
|
|
82
83
|
},
|
|
83
84
|
onCreateCaptchaError,
|
|
85
|
+
props.locale,
|
|
84
86
|
)
|
|
85
87
|
}
|
|
86
88
|
|
|
@@ -106,6 +108,7 @@
|
|
|
106
108
|
state.value = 'resolved'
|
|
107
109
|
},
|
|
108
110
|
onCreateCaptchaError,
|
|
111
|
+
props.locale,
|
|
109
112
|
)
|
|
110
113
|
}
|
|
111
114
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
defineOptions({
|
|
4
4
|
inheritAttrs: false,
|
|
5
5
|
})
|
|
6
|
-
import {
|
|
6
|
+
import { mdiAlertCircle, mdiChevronDown, mdiCloseCircle } from '@mdi/js'
|
|
7
7
|
import { ref, watch, onMounted, computed, nextTick, type PropType } from 'vue'
|
|
8
8
|
import { useSySelectKeyboard } from './composables/useSySelectKeyboard'
|
|
9
9
|
import { vRgaaSvgFix } from '../../../../directives/rgaaSvgFix'
|
|
@@ -816,7 +816,7 @@
|
|
|
816
816
|
v-if="hasError"
|
|
817
817
|
class="mr-6"
|
|
818
818
|
color="error"
|
|
819
|
-
:icon="
|
|
819
|
+
:icon="mdiAlertCircle"
|
|
820
820
|
:decorative="false"
|
|
821
821
|
label="Information"
|
|
822
822
|
role="img"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
2
|
import SyCheckbox from '@/components/Customs/SyCheckbox/SyCheckbox.vue'
|
|
3
3
|
import { ref, watch } from 'vue'
|
|
4
|
+
import { fn } from '@storybook/test'
|
|
4
5
|
|
|
5
6
|
// Interface pour typer correctement le composant SyCheckbox avec sa méthode validateOnSubmit
|
|
6
7
|
interface SyCheckboxInstance {
|
|
@@ -109,6 +110,10 @@ export const Default: Story = {
|
|
|
109
110
|
},
|
|
110
111
|
],
|
|
111
112
|
},
|
|
113
|
+
args: {
|
|
114
|
+
'onUpdate:modelValue': fn(),
|
|
115
|
+
'onUpdate:indeterminate': fn(),
|
|
116
|
+
},
|
|
112
117
|
render: args => ({
|
|
113
118
|
components: { SyCheckbox },
|
|
114
119
|
setup() {
|
|
@@ -2,6 +2,7 @@ import type { Meta, StoryObj } from '@storybook/vue3'
|
|
|
2
2
|
|
|
3
3
|
import SyTabs from './SyTabs.vue'
|
|
4
4
|
import { ref } from 'vue'
|
|
5
|
+
import { mdiHome } from '@mdi/js'
|
|
5
6
|
|
|
6
7
|
// Plus d'informations sur la configuration de Storybook pour Vue:
|
|
7
8
|
// https://storybook.js.org/docs/vue/writing-stories/introduction
|
|
@@ -165,7 +166,177 @@ const items = [
|
|
|
165
166
|
}
|
|
166
167
|
|
|
167
168
|
/**
|
|
168
|
-
* Exemple avec
|
|
169
|
+
* Exemple avec slot tabs prepend
|
|
170
|
+
*/
|
|
171
|
+
export const WithTabsPrependSlot: Story = {
|
|
172
|
+
render: args => ({
|
|
173
|
+
components: { SyTabs },
|
|
174
|
+
setup() {
|
|
175
|
+
return { args }
|
|
176
|
+
},
|
|
177
|
+
template: `
|
|
178
|
+
<SyTabs :items="args.items">
|
|
179
|
+
<template #tabs-prepend>
|
|
180
|
+
<div class="p-4 bg-info-light rounded">
|
|
181
|
+
<p class="mr-4">Tabs prepend content</p>
|
|
182
|
+
</div>
|
|
183
|
+
</template>
|
|
184
|
+
</SyTabs>
|
|
185
|
+
`,
|
|
186
|
+
}),
|
|
187
|
+
parameters: {
|
|
188
|
+
sourceCode: [
|
|
189
|
+
{
|
|
190
|
+
name: 'Template',
|
|
191
|
+
code: `
|
|
192
|
+
<SyTabs :items="args.items">
|
|
193
|
+
<template #tabs-prepend>
|
|
194
|
+
<div class="p-4 bg-info-light rounded">
|
|
195
|
+
<p class="mr-4">Tabs prepend content</p>
|
|
196
|
+
</div>
|
|
197
|
+
</template>
|
|
198
|
+
</SyTabs>
|
|
199
|
+
`,
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
|
+
},
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Exemple avec slot tabs append
|
|
207
|
+
*/
|
|
208
|
+
export const WithTabsAppendSlot: Story = {
|
|
209
|
+
render: args => ({
|
|
210
|
+
components: { SyTabs },
|
|
211
|
+
setup() {
|
|
212
|
+
return { args }
|
|
213
|
+
},
|
|
214
|
+
template: `
|
|
215
|
+
<SyTabs :items="args.items">
|
|
216
|
+
<template #tabs-append>
|
|
217
|
+
<div class="p-4 bg-info-light rounded">
|
|
218
|
+
<p class="mr-4">Tabs append content</p>
|
|
219
|
+
</div>
|
|
220
|
+
</template>
|
|
221
|
+
</SyTabs>
|
|
222
|
+
`,
|
|
223
|
+
}),
|
|
224
|
+
parameters: {
|
|
225
|
+
sourceCode: [
|
|
226
|
+
{
|
|
227
|
+
name: 'Template',
|
|
228
|
+
code: `
|
|
229
|
+
<SyTabs :items="args.items">
|
|
230
|
+
<template #tabs-append>
|
|
231
|
+
<div class="p-4 bg-info-light rounded">
|
|
232
|
+
<p class="mr-4">Tabs append content</p>
|
|
233
|
+
</div>
|
|
234
|
+
</template>
|
|
235
|
+
</SyTabs>
|
|
236
|
+
`,
|
|
237
|
+
},
|
|
238
|
+
],
|
|
239
|
+
},
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Exemple avec slot tab prepend
|
|
244
|
+
*/
|
|
245
|
+
export const WithTabPrependSlot: Story = {
|
|
246
|
+
render: args => ({
|
|
247
|
+
components: { SyTabs },
|
|
248
|
+
setup() {
|
|
249
|
+
return { args, mdiHome }
|
|
250
|
+
},
|
|
251
|
+
template: `
|
|
252
|
+
<SyTabs :items="args.items">
|
|
253
|
+
<template #tab-prepend="{ item, index, isActive }">
|
|
254
|
+
<VIcon
|
|
255
|
+
v-if="index === 0"
|
|
256
|
+
class="mr-2"
|
|
257
|
+
:color="isActive ? 'primary' : 'grey'"
|
|
258
|
+
:icon="mdiHome"
|
|
259
|
+
/>
|
|
260
|
+
</template>
|
|
261
|
+
</SyTabs>
|
|
262
|
+
`,
|
|
263
|
+
}),
|
|
264
|
+
parameters: {
|
|
265
|
+
sourceCode: [
|
|
266
|
+
{
|
|
267
|
+
name: 'Template',
|
|
268
|
+
code: `
|
|
269
|
+
<SyTabs :items="args.items">
|
|
270
|
+
<template #tab-prepend="{ item, index, isActive }">
|
|
271
|
+
<VIcon
|
|
272
|
+
v-if="index === 0"
|
|
273
|
+
class="mr-2"
|
|
274
|
+
:color="isActive ? 'primary' : 'grey'"
|
|
275
|
+
:icon="mdiHome"
|
|
276
|
+
/>
|
|
277
|
+
</template>
|
|
278
|
+
</SyTabs>
|
|
279
|
+
`,
|
|
280
|
+
script: `
|
|
281
|
+
<script setup>
|
|
282
|
+
import { mdiHome } from '@mdi/js'
|
|
283
|
+
</script>
|
|
284
|
+
`,
|
|
285
|
+
},
|
|
286
|
+
],
|
|
287
|
+
},
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Exemple avec slot tab append
|
|
292
|
+
*/
|
|
293
|
+
export const WithTabAppendSlot: Story = {
|
|
294
|
+
render: args => ({
|
|
295
|
+
components: { SyTabs },
|
|
296
|
+
setup() {
|
|
297
|
+
return { args, mdiHome }
|
|
298
|
+
},
|
|
299
|
+
template: `
|
|
300
|
+
<SyTabs :items="args.items">
|
|
301
|
+
<template #tab-append="{ item, index, isActive }">
|
|
302
|
+
<VIcon
|
|
303
|
+
v-if="index === 0"
|
|
304
|
+
class="ml-2"
|
|
305
|
+
:color="isActive ? 'primary' : 'grey'"
|
|
306
|
+
:icon="mdiHome"
|
|
307
|
+
/>
|
|
308
|
+
</template>
|
|
309
|
+
</SyTabs>
|
|
310
|
+
`,
|
|
311
|
+
}),
|
|
312
|
+
parameters: {
|
|
313
|
+
sourceCode: [
|
|
314
|
+
{
|
|
315
|
+
name: 'Template',
|
|
316
|
+
code: `
|
|
317
|
+
<SyTabs :items="args.items">
|
|
318
|
+
<template #tab-append="{ item, index, isActive }">
|
|
319
|
+
<VIcon
|
|
320
|
+
v-if="index === 0"
|
|
321
|
+
class="ml-2"
|
|
322
|
+
:color="isActive ? 'primary' : 'grey'"
|
|
323
|
+
:icon="mdiHome"
|
|
324
|
+
/>
|
|
325
|
+
</template>
|
|
326
|
+
</SyTabs>
|
|
327
|
+
`,
|
|
328
|
+
script: `
|
|
329
|
+
<script setup>
|
|
330
|
+
import { mdiHome } from '@mdi/js'
|
|
331
|
+
</script>
|
|
332
|
+
`,
|
|
333
|
+
},
|
|
334
|
+
],
|
|
335
|
+
},
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Exemple avec slot pannel
|
|
169
340
|
*/
|
|
170
341
|
export const WithCustomContent: Story = {
|
|
171
342
|
render: args => ({
|
|
@@ -183,7 +354,7 @@ export const WithCustomContent: Story = {
|
|
|
183
354
|
</template>
|
|
184
355
|
<template #panel-1>
|
|
185
356
|
<div class="p-4 bg-success-light rounded">
|
|
186
|
-
<h3 class="text-h6 font-weight-bold">Contenu personnalisé pour l'onglet 2</h3>
|
|
357
|
+
<h3 class="text-h6 font-weight-bold text-secondary">Contenu personnalisé pour l'onglet 2</h3>
|
|
187
358
|
<p>Ce panneau utilise un style différent.</p>
|
|
188
359
|
</div>
|
|
189
360
|
</template>
|
|
@@ -204,20 +375,13 @@ export const WithCustomContent: Story = {
|
|
|
204
375
|
</template>
|
|
205
376
|
<template #panel-1>
|
|
206
377
|
<div class="p-4 bg-success-light rounded">
|
|
207
|
-
<h3 class="text-h6 font-weight-bold">Contenu personnalisé pour l'onglet 2</h3>
|
|
378
|
+
<h3 class="text-h6 font-weight-bold text-secondary">Contenu personnalisé pour l'onglet 2</h3>
|
|
208
379
|
<p>Ce panneau utilise un style différent.</p>
|
|
209
380
|
</div>
|
|
210
381
|
</template>
|
|
211
382
|
</SyTabs>
|
|
212
383
|
`,
|
|
213
384
|
},
|
|
214
|
-
{
|
|
215
|
-
name: 'Script',
|
|
216
|
-
code: `
|
|
217
|
-
|
|
218
|
-
`,
|
|
219
|
-
|
|
220
|
-
},
|
|
221
385
|
],
|
|
222
386
|
},
|
|
223
387
|
}
|
|
@@ -49,6 +49,8 @@
|
|
|
49
49
|
'tabs-prepend': () => unknown
|
|
50
50
|
'tabs-append': () => unknown
|
|
51
51
|
'default': () => unknown
|
|
52
|
+
'tab-prepend': (props: { item: TabItem, index: number, isActive: boolean }) => unknown
|
|
53
|
+
'tab-append': (props: { item: TabItem, index: number, isActive: boolean }) => unknown
|
|
52
54
|
}>()
|
|
53
55
|
|
|
54
56
|
const options = useCustomizableOptions(config, { vuetifyOptions: props.vuetifyOptions })
|
|
@@ -355,7 +357,19 @@
|
|
|
355
357
|
}
|
|
356
358
|
}"
|
|
357
359
|
>
|
|
360
|
+
<slot
|
|
361
|
+
name="tab-prepend"
|
|
362
|
+
:item="item"
|
|
363
|
+
:index="index"
|
|
364
|
+
:is-active="activeItemIndex === index"
|
|
365
|
+
/>
|
|
358
366
|
{{ item.label.toUpperCase() }}
|
|
367
|
+
<slot
|
|
368
|
+
name="tab-append"
|
|
369
|
+
:item="item"
|
|
370
|
+
:index="index"
|
|
371
|
+
:is-active="activeItemIndex === index"
|
|
372
|
+
/>
|
|
359
373
|
</RouterLink>
|
|
360
374
|
<!-- Use regular anchor for external links -->
|
|
361
375
|
<a
|
|
@@ -387,7 +401,19 @@
|
|
|
387
401
|
}
|
|
388
402
|
}"
|
|
389
403
|
>
|
|
404
|
+
<slot
|
|
405
|
+
name="tab-prepend"
|
|
406
|
+
:item="item"
|
|
407
|
+
:index="index"
|
|
408
|
+
:is-active="activeItemIndex === index"
|
|
409
|
+
/>
|
|
390
410
|
{{ item.label.toUpperCase() }}
|
|
411
|
+
<slot
|
|
412
|
+
name="tab-append"
|
|
413
|
+
:item="item"
|
|
414
|
+
:index="index"
|
|
415
|
+
:is-active="activeItemIndex === index"
|
|
416
|
+
/>
|
|
391
417
|
</a>
|
|
392
418
|
<!-- Fallback button for items without navigation -->
|
|
393
419
|
<!-- Version désactivée du RouterLink -->
|
|
@@ -406,7 +432,19 @@
|
|
|
406
432
|
tabindex="-1"
|
|
407
433
|
disabled
|
|
408
434
|
>
|
|
435
|
+
<slot
|
|
436
|
+
name="tab-prepend"
|
|
437
|
+
:item="item"
|
|
438
|
+
:index="index"
|
|
439
|
+
:is-active="activeItemIndex === index"
|
|
440
|
+
/>
|
|
409
441
|
{{ item.label.toUpperCase() }}
|
|
442
|
+
<slot
|
|
443
|
+
name="tab-append"
|
|
444
|
+
:item="item"
|
|
445
|
+
:index="index"
|
|
446
|
+
:is-active="activeItemIndex === index"
|
|
447
|
+
/>
|
|
410
448
|
</button>
|
|
411
449
|
<!-- Version désactivée du lien -->
|
|
412
450
|
<button
|
|
@@ -424,7 +462,19 @@
|
|
|
424
462
|
tabindex="-1"
|
|
425
463
|
disabled
|
|
426
464
|
>
|
|
465
|
+
<slot
|
|
466
|
+
name="tab-prepend"
|
|
467
|
+
:item="item"
|
|
468
|
+
:index="index"
|
|
469
|
+
:is-active="activeItemIndex === index"
|
|
470
|
+
/>
|
|
427
471
|
{{ item.label.toUpperCase() }}
|
|
472
|
+
<slot
|
|
473
|
+
name="tab-append"
|
|
474
|
+
:item="item"
|
|
475
|
+
:index="index"
|
|
476
|
+
:is-active="activeItemIndex === index"
|
|
477
|
+
/>
|
|
428
478
|
</button>
|
|
429
479
|
<!-- Fallback button pour les onglets standards -->
|
|
430
480
|
<button
|
|
@@ -449,7 +499,19 @@
|
|
|
449
499
|
}
|
|
450
500
|
}"
|
|
451
501
|
>
|
|
502
|
+
<slot
|
|
503
|
+
name="tab-prepend"
|
|
504
|
+
:item="item"
|
|
505
|
+
:index="index"
|
|
506
|
+
:is-active="activeItemIndex === index"
|
|
507
|
+
/>
|
|
452
508
|
{{ item.label.toUpperCase() }}
|
|
509
|
+
<slot
|
|
510
|
+
name="tab-append"
|
|
511
|
+
:item="item"
|
|
512
|
+
:index="index"
|
|
513
|
+
:is-active="activeItemIndex === index"
|
|
514
|
+
/>
|
|
453
515
|
</button>
|
|
454
516
|
</li>
|
|
455
517
|
</ul>
|
|
@@ -438,4 +438,102 @@ describe('SyTabs', () => {
|
|
|
438
438
|
expect(tabItems.length).toBe(testItems.length)
|
|
439
439
|
})
|
|
440
440
|
})
|
|
441
|
+
|
|
442
|
+
// Tests des slots
|
|
443
|
+
describe('Slots', () => {
|
|
444
|
+
it('doit afficher le contenu du slot tabs-prepend', () => {
|
|
445
|
+
const wrapper = createWrapper({
|
|
446
|
+
slots: {
|
|
447
|
+
'tabs-prepend': '<div data-test="tabs-prepend">prepend</div>',
|
|
448
|
+
},
|
|
449
|
+
})
|
|
450
|
+
|
|
451
|
+
const prepend = wrapper.find('[data-test="tabs-prepend"]')
|
|
452
|
+
expect(prepend.exists()).toBe(true)
|
|
453
|
+
expect(prepend.text()).toBe('prepend')
|
|
454
|
+
})
|
|
455
|
+
|
|
456
|
+
it('doit afficher le contenu du slot tabs-append', () => {
|
|
457
|
+
const wrapper = createWrapper({
|
|
458
|
+
slots: {
|
|
459
|
+
'tabs-append': '<div data-test="tabs-append">append</div>',
|
|
460
|
+
},
|
|
461
|
+
})
|
|
462
|
+
|
|
463
|
+
const append = wrapper.find('[data-test="tabs-append"]')
|
|
464
|
+
expect(append.exists()).toBe(true)
|
|
465
|
+
expect(append.text()).toBe('append')
|
|
466
|
+
})
|
|
467
|
+
|
|
468
|
+
it('doit passer correctement item, index et isActive au slot tab-prepend', async () => {
|
|
469
|
+
const wrapper = createWrapper({
|
|
470
|
+
slots: {
|
|
471
|
+
'tab-prepend': `
|
|
472
|
+
<template #default="{ item, index, isActive }">
|
|
473
|
+
<span
|
|
474
|
+
data-test="tab-prepend-slot"
|
|
475
|
+
:data-index="index"
|
|
476
|
+
:data-value="item.value"
|
|
477
|
+
:data-active="isActive"
|
|
478
|
+
/>
|
|
479
|
+
</template>
|
|
480
|
+
`,
|
|
481
|
+
},
|
|
482
|
+
})
|
|
483
|
+
|
|
484
|
+
// Vérifier l'état initial : premier onglet actif
|
|
485
|
+
let markers = wrapper.findAll('[data-test="tab-prepend-slot"]')
|
|
486
|
+
expect(markers.length).toBe(testItems.length)
|
|
487
|
+
// Premier onglet actif, les autres inactifs
|
|
488
|
+
expect(markers[0].attributes('data-active')).toBe('true')
|
|
489
|
+
for (let i = 1; i < markers.length; i++) {
|
|
490
|
+
expect(markers[i].attributes('data-active')).toBe('false')
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
// Changer d'onglet actif
|
|
494
|
+
const secondTab = wrapper.findAll('.sy-tabs__button')[1]
|
|
495
|
+
await secondTab.trigger('click')
|
|
496
|
+
await nextTick()
|
|
497
|
+
|
|
498
|
+
// Recalcule des marqueurs
|
|
499
|
+
markers = wrapper.findAll('[data-test="tab-prepend-slot"]')
|
|
500
|
+
expect(markers[1].attributes('data-active')).toBe('true')
|
|
501
|
+
expect(markers[0].attributes('data-active')).toBe('false')
|
|
502
|
+
})
|
|
503
|
+
|
|
504
|
+
it('doit passer correctement item, index et isActive au slot tab-append', async () => {
|
|
505
|
+
const wrapper = createWrapper({
|
|
506
|
+
slots: {
|
|
507
|
+
'tab-append': `
|
|
508
|
+
<template #default="{ item, index, isActive }">
|
|
509
|
+
<span
|
|
510
|
+
data-test="tab-append-slot"
|
|
511
|
+
:data-index="index"
|
|
512
|
+
:data-value="item.value"
|
|
513
|
+
:data-active="isActive"
|
|
514
|
+
/>
|
|
515
|
+
</template>
|
|
516
|
+
`,
|
|
517
|
+
},
|
|
518
|
+
})
|
|
519
|
+
|
|
520
|
+
// Vérifier l'état initial : premier onglet actif
|
|
521
|
+
let markers = wrapper.findAll('[data-test="tab-append-slot"]')
|
|
522
|
+
expect(markers.length).toBe(testItems.length)
|
|
523
|
+
expect(markers[0].attributes('data-active')).toBe('true')
|
|
524
|
+
for (let i = 1; i < markers.length; i++) {
|
|
525
|
+
expect(markers[i].attributes('data-active')).toBe('false')
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
// Changer d'onglet actif
|
|
529
|
+
const thirdTab = wrapper.findAll('.sy-tabs__button')[2]
|
|
530
|
+
await thirdTab.trigger('click')
|
|
531
|
+
await nextTick()
|
|
532
|
+
|
|
533
|
+
// Recalcule des marqueurs
|
|
534
|
+
markers = wrapper.findAll('[data-test="tab-append-slot"]')
|
|
535
|
+
expect(markers[2].attributes('data-active')).toBe('true')
|
|
536
|
+
expect(markers[0].attributes('data-active')).toBe('false')
|
|
537
|
+
})
|
|
538
|
+
})
|
|
441
539
|
})
|
|
@@ -1037,27 +1037,27 @@ export const DifferentFormats: Story = {
|
|
|
1037
1037
|
<div class="d-flex flex-column gap-4">
|
|
1038
1038
|
<DatePicker
|
|
1039
1039
|
v-model="value1"
|
|
1040
|
-
placeholder="Format
|
|
1040
|
+
placeholder="Format JJ/MM/AAAA"
|
|
1041
1041
|
format="DD/MM/YYYY"
|
|
1042
1042
|
/>
|
|
1043
1043
|
<DatePicker
|
|
1044
1044
|
v-model="value2"
|
|
1045
|
-
placeholder="Format MM/
|
|
1045
|
+
placeholder="Format MM/JJ/AAAA"
|
|
1046
1046
|
format="MM/DD/YYYY"
|
|
1047
1047
|
/>
|
|
1048
1048
|
<DatePicker
|
|
1049
1049
|
v-model="value3"
|
|
1050
|
-
placeholder="Format
|
|
1050
|
+
placeholder="Format AAAA-MM-JJ"
|
|
1051
1051
|
format="YYYY-MM-DD"
|
|
1052
1052
|
/>
|
|
1053
1053
|
<DatePicker
|
|
1054
1054
|
v-model="value4"
|
|
1055
|
-
placeholder="Format
|
|
1055
|
+
placeholder="Format JJ-MM-AA"
|
|
1056
1056
|
format="DD-MM-YY"
|
|
1057
1057
|
/>
|
|
1058
1058
|
<DatePicker
|
|
1059
1059
|
v-model="value5"
|
|
1060
|
-
placeholder="Format
|
|
1060
|
+
placeholder="Format JJ.MM.AAAA"
|
|
1061
1061
|
format="DD.MM.YYYY"
|
|
1062
1062
|
/>
|
|
1063
1063
|
</div>
|
|
@@ -1096,13 +1096,13 @@ export const DifferentFormats: Story = {
|
|
|
1096
1096
|
<div class="d-flex flex-column gap-4 pa-4">
|
|
1097
1097
|
<DatePicker
|
|
1098
1098
|
v-model="value1"
|
|
1099
|
-
placeholder="Format
|
|
1099
|
+
placeholder="Format JJ/MM/AAAA"
|
|
1100
1100
|
format="DD/MM/YYYY"
|
|
1101
1101
|
class="py-4"
|
|
1102
1102
|
/>
|
|
1103
1103
|
<DatePicker
|
|
1104
1104
|
v-model="value2"
|
|
1105
|
-
placeholder="Format MM/
|
|
1105
|
+
placeholder="Format MM/JJ/AAAA"
|
|
1106
1106
|
format="MM/DD/YYYY"
|
|
1107
1107
|
class="py-4"
|
|
1108
1108
|
/>
|
|
@@ -1141,14 +1141,14 @@ export const WithDateFormatReturn: Story = {
|
|
|
1141
1141
|
<span class="mb-4">Date de retour : {{ value1 }}</span>
|
|
1142
1142
|
<DatePicker
|
|
1143
1143
|
v-model="value1"
|
|
1144
|
-
placeholder="Format
|
|
1144
|
+
placeholder="Format JJ/MM/AAAA, retour par défaut"
|
|
1145
1145
|
format="DD/MM/YYYY"
|
|
1146
1146
|
/>
|
|
1147
1147
|
|
|
1148
1148
|
<span class="mb-4">Date de retour : {{ value2 }}</span>
|
|
1149
1149
|
<DatePicker
|
|
1150
1150
|
v-model="value2"
|
|
1151
|
-
placeholder="Format
|
|
1151
|
+
placeholder="Format JJ/MM/AAAA, retour MM/DD/YYYY"
|
|
1152
1152
|
format="DD/MM/YYYY"
|
|
1153
1153
|
date-format-return="MM/DD/YYYY"
|
|
1154
1154
|
/>
|
|
@@ -1156,7 +1156,7 @@ export const WithDateFormatReturn: Story = {
|
|
|
1156
1156
|
<span class="mb-4">Date de retour : {{ value3 }}</span>
|
|
1157
1157
|
<DatePicker
|
|
1158
1158
|
v-model="value3"
|
|
1159
|
-
placeholder="Format
|
|
1159
|
+
placeholder="Format JJ/MM/AAAA, retour YYYY-MM-DD"
|
|
1160
1160
|
format="DD/MM/YYYY"
|
|
1161
1161
|
date-format-return="YYYY-MM-DD"
|
|
1162
1162
|
/>
|
|
@@ -1212,14 +1212,14 @@ export const WithDateFormatReturn: Story = {
|
|
|
1212
1212
|
<span class="mb-4">Date de retour : {{ value1 }}</span>
|
|
1213
1213
|
<DatePicker
|
|
1214
1214
|
v-model="value1"
|
|
1215
|
-
placeholder="Format
|
|
1215
|
+
placeholder="Format JJ/MM/AAAA, retour par défaut"
|
|
1216
1216
|
format="DD/MM/YYYY"
|
|
1217
1217
|
/>
|
|
1218
1218
|
|
|
1219
1219
|
<span class="mb-4">Date de retour : {{ value2 }}</span>
|
|
1220
1220
|
<DatePicker
|
|
1221
1221
|
v-model="value2"
|
|
1222
|
-
placeholder="Format
|
|
1222
|
+
placeholder="Format JJ/MM/AAAA, retour MM/DD/YYYY"
|
|
1223
1223
|
format="DD/MM/YYYY"
|
|
1224
1224
|
date-format-return="MM/DD/YYYY"
|
|
1225
1225
|
/>
|
|
@@ -1228,7 +1228,7 @@ export const WithDateFormatReturn: Story = {
|
|
|
1228
1228
|
<span class="mb-4">Date de retour : {{ value3 }}</span>
|
|
1229
1229
|
<DatePicker
|
|
1230
1230
|
v-model="value3"
|
|
1231
|
-
placeholder="Format
|
|
1231
|
+
placeholder="Format JJ/MM/AAAA, retour YYYY-MM-DD"
|
|
1232
1232
|
format="DD/MM/YYYY"
|
|
1233
1233
|
date-format-return="YYYY-MM-DD"
|
|
1234
1234
|
/>
|
|
@@ -516,6 +516,19 @@
|
|
|
516
516
|
}
|
|
517
517
|
})
|
|
518
518
|
|
|
519
|
+
watch(displayFormattedDate, (newValue, oldValue) => {
|
|
520
|
+
if (
|
|
521
|
+
props.disabled
|
|
522
|
+
&& !props.noCalendar
|
|
523
|
+
&& !props.useCombinedMode
|
|
524
|
+
&& !newValue
|
|
525
|
+
&& !!oldValue
|
|
526
|
+
&& props.modelValue
|
|
527
|
+
) {
|
|
528
|
+
syncFromModelValue(props.modelValue)
|
|
529
|
+
}
|
|
530
|
+
})
|
|
531
|
+
|
|
519
532
|
// Fonction pour mettre à jour displayFormattedDate quand le VDatePicker change
|
|
520
533
|
const updateDisplayFormattedDate = () => {
|
|
521
534
|
if (displayFormattedDateComputed.value) {
|