@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
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { VueWrapper, mount, shallowMount } from '@vue/test-utils'
|
|
2
|
+
import { beforeEach, describe, expect, it } from 'vitest'
|
|
3
|
+
import AmeliproTransmission from '../AmeliproTransmission.vue'
|
|
4
|
+
import type { ComponentProps } from 'vue-component-type-helpers'
|
|
5
|
+
import type { ExpectedPropOptions } from '@tests/types'
|
|
6
|
+
import type { PropType } from 'vue'
|
|
7
|
+
import type { RouteLocationRaw } from 'vue-router'
|
|
8
|
+
import TestHelper from '@tests/helpers/TestHelper'
|
|
9
|
+
|
|
10
|
+
const expectedPropOptions: ExpectedPropOptions<typeof AmeliproTransmission> = {
|
|
11
|
+
alternateButtonLabel: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: 'Modifier',
|
|
14
|
+
},
|
|
15
|
+
confirmButtonLabel: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: 'Transmettre',
|
|
18
|
+
},
|
|
19
|
+
confirmHref: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: undefined,
|
|
22
|
+
},
|
|
23
|
+
confirmTo: {
|
|
24
|
+
type: [Array, Object, String] as PropType<RouteLocationRaw>,
|
|
25
|
+
default: undefined,
|
|
26
|
+
},
|
|
27
|
+
modifyHref: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: undefined,
|
|
30
|
+
},
|
|
31
|
+
modifyTo: {
|
|
32
|
+
type: [Array, Object, String] as PropType<RouteLocationRaw>,
|
|
33
|
+
default: undefined,
|
|
34
|
+
},
|
|
35
|
+
printHref: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: undefined,
|
|
38
|
+
},
|
|
39
|
+
printTo: {
|
|
40
|
+
type: [Array, Object, String] as PropType<RouteLocationRaw>,
|
|
41
|
+
default: undefined,
|
|
42
|
+
},
|
|
43
|
+
transmissionActions: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: true,
|
|
46
|
+
},
|
|
47
|
+
transmissionCardTitle: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: undefined,
|
|
50
|
+
},
|
|
51
|
+
uniqueId: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: undefined,
|
|
54
|
+
},
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Values pour les props "required"
|
|
58
|
+
const requiredPropValues = (): ComponentProps<typeof AmeliproTransmission> => ({})
|
|
59
|
+
|
|
60
|
+
const modifiedPropValues = (): ComponentProps<typeof AmeliproTransmission> => ({
|
|
61
|
+
alternateButtonLabel: 'Modified alternate button label',
|
|
62
|
+
confirmButtonLabel: 'Modified confirm button label',
|
|
63
|
+
confirmHref: '/modified-confirm-href',
|
|
64
|
+
confirmTo: '/modified-confirm-to',
|
|
65
|
+
modifyHref: '/modified-modify-href',
|
|
66
|
+
modifyTo: '/modified-modify-to',
|
|
67
|
+
printHref: '/modified-print-href',
|
|
68
|
+
printTo: '/modified-print-to',
|
|
69
|
+
transmissionActions: false,
|
|
70
|
+
transmissionCardTitle: 'Modified transmission card title',
|
|
71
|
+
uniqueId: 'modified-unique-id',
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
const testHelper = new TestHelper(AmeliproTransmission)
|
|
75
|
+
testHelper.setExpectedPropOptions(expectedPropOptions)
|
|
76
|
+
.setRequiredPropValues(requiredPropValues)
|
|
77
|
+
.setModifiedPropValues(modifiedPropValues)
|
|
78
|
+
|
|
79
|
+
describe('AmeliproTransmission', () => {
|
|
80
|
+
describe('Snapshots', () => {
|
|
81
|
+
testHelper.snapshots()
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
describe('Properties', () => {
|
|
85
|
+
testHelper.properties()
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
describe('Setting props should update attributes of inner tags', () => {
|
|
89
|
+
let vueWrapper: VueWrapper<InstanceType<typeof AmeliproTransmission>>
|
|
90
|
+
beforeEach(() => {
|
|
91
|
+
vueWrapper = shallowMount(AmeliproTransmission, { props: requiredPropValues() })
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
it('prop uniqueId sets attribute id on .amelipro-transmission', async () => {
|
|
95
|
+
expect(vueWrapper.find('.amelipro-transmission').attributes('id')).toBe(testHelper.default('uniqueId'))
|
|
96
|
+
const { uniqueId } = modifiedPropValues()
|
|
97
|
+
await vueWrapper.setProps({ uniqueId })
|
|
98
|
+
expect(vueWrapper.find('.amelipro-transmission').attributes('id')).toBe(`${testHelper.modified('uniqueId')}-container`)
|
|
99
|
+
})
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
describe.skip('Setting props should update props or attributes of inner components', () => {
|
|
103
|
+
// À compléter selon la structure interne du composant si besoin
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
describe('Setting props should update visibility of actions', () => {
|
|
107
|
+
let vueWrapper: VueWrapper<InstanceType<typeof AmeliproTransmission>>
|
|
108
|
+
beforeEach(() => {
|
|
109
|
+
vueWrapper = shallowMount(AmeliproTransmission, { props: requiredPropValues() })
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
it('prop transmissionActions sets .amelipro-transmission__actions visibility', async () => {
|
|
113
|
+
// À revoir, son affichage dépend aussi du slot actions
|
|
114
|
+
expect(vueWrapper.find('.amelipro-transmission__actions').exists()).toBe(true)
|
|
115
|
+
const { transmissionActions } = modifiedPropValues()
|
|
116
|
+
await vueWrapper.setProps({ transmissionActions })
|
|
117
|
+
expect(vueWrapper.find('.amelipro-transmission__actions').exists()).toBe(true)
|
|
118
|
+
})
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
describe('Slots', () => {
|
|
122
|
+
it('displays slot content in actions', () => {
|
|
123
|
+
const vueWrapper = shallowMount(AmeliproTransmission, {
|
|
124
|
+
props: { ...requiredPropValues(), transmissionActions: false },
|
|
125
|
+
slots: { actions: '<div id="slot-content">Slot Content</div>' },
|
|
126
|
+
})
|
|
127
|
+
expect(vueWrapper.find('#slot-content').text()).toBe('Slot Content')
|
|
128
|
+
})
|
|
129
|
+
})
|
|
130
|
+
|
|
131
|
+
describe('Events', () => {
|
|
132
|
+
let vueWrapper: VueWrapper<InstanceType<typeof AmeliproTransmission>>
|
|
133
|
+
beforeEach(() => {
|
|
134
|
+
vueWrapper = mount(AmeliproTransmission, { props: modifiedPropValues() })
|
|
135
|
+
})
|
|
136
|
+
|
|
137
|
+
it('click on .amelipro-transmission__print-btn emits click:print', async () => {
|
|
138
|
+
expect(vueWrapper.emitted('click:print')).toBeUndefined()
|
|
139
|
+
await vueWrapper.find('.amelipro-transmission__print-btn').trigger('click')
|
|
140
|
+
expect(vueWrapper.emitted('click:print')).toStrictEqual([[]])
|
|
141
|
+
})
|
|
142
|
+
|
|
143
|
+
it('click on .amelipro-transmission__alternate-btn emits click:modify', async () => {
|
|
144
|
+
expect(vueWrapper.emitted('click:modify')).toBeUndefined()
|
|
145
|
+
await vueWrapper.find('.amelipro-transmission__alternate-btn').trigger('click')
|
|
146
|
+
expect(vueWrapper.emitted('click:modify')).toStrictEqual([[]])
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
it('click on .amelipro-transmission__confirm-btn emits click:confirm', async () => {
|
|
150
|
+
expect(vueWrapper.emitted('click:confirm')).toBeUndefined()
|
|
151
|
+
await vueWrapper.find('.amelipro-transmission__confirm-btn').trigger('click')
|
|
152
|
+
expect(vueWrapper.emitted('click:confirm')).toStrictEqual([[]])
|
|
153
|
+
})
|
|
154
|
+
})
|
|
155
|
+
})
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`AmeliproTransmission > Snapshots > renders the component with all properties filled in 1`] = `
|
|
4
|
+
<div
|
|
5
|
+
class="
|
|
6
|
+
amelipro-transmission
|
|
7
|
+
w-100
|
|
8
|
+
"
|
|
9
|
+
id="modified-unique-id-container"
|
|
10
|
+
>
|
|
11
|
+
<div class="
|
|
12
|
+
amelipro-transmission__wrapper
|
|
13
|
+
w-100
|
|
14
|
+
">
|
|
15
|
+
<amelipro-card-stub
|
|
16
|
+
bordercolor="ap-grey-lighten-2"
|
|
17
|
+
bordered="true"
|
|
18
|
+
cardcolor="ap-white"
|
|
19
|
+
cardtitle="Modified transmission card title"
|
|
20
|
+
classes="mb-6 amelipro-transmission__card"
|
|
21
|
+
divider="true"
|
|
22
|
+
headerrightwidth="50%"
|
|
23
|
+
nocardheader="false"
|
|
24
|
+
rightpart="false"
|
|
25
|
+
rightpartwidth="25%"
|
|
26
|
+
titlecolor="ap-grey-darken-1"
|
|
27
|
+
titlelevel="2"
|
|
28
|
+
uniqueid="modified-unique-id-card"
|
|
29
|
+
></amelipro-card-stub>
|
|
30
|
+
</div>
|
|
31
|
+
<div
|
|
32
|
+
class="
|
|
33
|
+
align-center
|
|
34
|
+
amelipro-transmission__actions
|
|
35
|
+
d-flex
|
|
36
|
+
justify-space-between
|
|
37
|
+
"
|
|
38
|
+
id="modified-unique-id-action-wrapper"
|
|
39
|
+
>
|
|
40
|
+
<div class="amelipro-transmission__actions__left">
|
|
41
|
+
<amelipro-btn-stub
|
|
42
|
+
badge="false"
|
|
43
|
+
badgebgcolor="ap-pink"
|
|
44
|
+
badgecolor="ap-white"
|
|
45
|
+
bordered="false"
|
|
46
|
+
class="
|
|
47
|
+
amelipro-transmission__print-btn
|
|
48
|
+
mb-4
|
|
49
|
+
text-none
|
|
50
|
+
"
|
|
51
|
+
color="ap-blue-darken-1"
|
|
52
|
+
disabled="false"
|
|
53
|
+
hovercolor="ap-blue-darken-2"
|
|
54
|
+
hoverunderline="true"
|
|
55
|
+
href="/modified-print-href"
|
|
56
|
+
iconbgcolor="transparent"
|
|
57
|
+
iconbordered="false"
|
|
58
|
+
iconleft="false"
|
|
59
|
+
infoblock="false"
|
|
60
|
+
minheight="2.5rem"
|
|
61
|
+
size="60px"
|
|
62
|
+
text="true"
|
|
63
|
+
textcolor="ap-white"
|
|
64
|
+
to="/modified-print-to"
|
|
65
|
+
type="button"
|
|
66
|
+
underline="false"
|
|
67
|
+
uniqueid="modified-unique-id-print-btn"
|
|
68
|
+
></amelipro-btn-stub>
|
|
69
|
+
</div>
|
|
70
|
+
<div class="
|
|
71
|
+
amelipro-transmission__actions__right
|
|
72
|
+
d-flex
|
|
73
|
+
justify-end
|
|
74
|
+
">
|
|
75
|
+
<amelipro-btn-stub
|
|
76
|
+
badge="false"
|
|
77
|
+
badgebgcolor="ap-pink"
|
|
78
|
+
badgecolor="ap-white"
|
|
79
|
+
bordered="true"
|
|
80
|
+
class="
|
|
81
|
+
amelipro-transmission__alternate-btn
|
|
82
|
+
mr-2
|
|
83
|
+
"
|
|
84
|
+
color="ap-white"
|
|
85
|
+
disabled="false"
|
|
86
|
+
hovercolor="ap-blue-lighten-3"
|
|
87
|
+
hoverunderline="false"
|
|
88
|
+
href="/modified-modify-href"
|
|
89
|
+
iconbgcolor="transparent"
|
|
90
|
+
iconbordered="false"
|
|
91
|
+
iconleft="false"
|
|
92
|
+
infoblock="false"
|
|
93
|
+
minheight="2.5rem"
|
|
94
|
+
size="60px"
|
|
95
|
+
text="false"
|
|
96
|
+
textcolor="ap-blue-darken-1"
|
|
97
|
+
to="/modified-modify-to"
|
|
98
|
+
type="button"
|
|
99
|
+
underline="false"
|
|
100
|
+
uniqueid="modified-unique-id-alternate-btn"
|
|
101
|
+
></amelipro-btn-stub>
|
|
102
|
+
<amelipro-btn-stub
|
|
103
|
+
badge="false"
|
|
104
|
+
badgebgcolor="ap-pink"
|
|
105
|
+
badgecolor="ap-white"
|
|
106
|
+
bordered="false"
|
|
107
|
+
class="amelipro-transmission__confirm-btn"
|
|
108
|
+
color="ap-blue-darken-1"
|
|
109
|
+
disabled="false"
|
|
110
|
+
hovercolor="ap-blue-darken-2"
|
|
111
|
+
hoverunderline="false"
|
|
112
|
+
href="/modified-confirm-href"
|
|
113
|
+
iconbgcolor="transparent"
|
|
114
|
+
iconbordered="false"
|
|
115
|
+
iconleft="false"
|
|
116
|
+
infoblock="false"
|
|
117
|
+
minheight="2.5rem"
|
|
118
|
+
size="60px"
|
|
119
|
+
text="false"
|
|
120
|
+
textcolor="ap-white"
|
|
121
|
+
to="/modified-confirm-to"
|
|
122
|
+
type="button"
|
|
123
|
+
underline="false"
|
|
124
|
+
uniqueid="modified-unique-id-confirm-btn"
|
|
125
|
+
></amelipro-btn-stub>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
`;
|
|
130
|
+
|
|
131
|
+
exports[`AmeliproTransmission > Snapshots > renders the component with only required properties filled in 1`] = `
|
|
132
|
+
<div class="
|
|
133
|
+
amelipro-transmission
|
|
134
|
+
w-100
|
|
135
|
+
">
|
|
136
|
+
<div class="
|
|
137
|
+
amelipro-transmission__wrapper
|
|
138
|
+
w-100
|
|
139
|
+
">
|
|
140
|
+
<amelipro-card-stub
|
|
141
|
+
bordercolor="ap-grey-lighten-2"
|
|
142
|
+
bordered="true"
|
|
143
|
+
cardcolor="ap-white"
|
|
144
|
+
classes="mb-6 amelipro-transmission__card"
|
|
145
|
+
divider="true"
|
|
146
|
+
headerrightwidth="50%"
|
|
147
|
+
nocardheader="false"
|
|
148
|
+
rightpart="false"
|
|
149
|
+
rightpartwidth="25%"
|
|
150
|
+
titlecolor="ap-grey-darken-1"
|
|
151
|
+
titlelevel="2"
|
|
152
|
+
></amelipro-card-stub>
|
|
153
|
+
</div>
|
|
154
|
+
<div class="
|
|
155
|
+
align-center
|
|
156
|
+
amelipro-transmission__actions
|
|
157
|
+
d-flex
|
|
158
|
+
justify-space-between
|
|
159
|
+
">
|
|
160
|
+
<div class="amelipro-transmission__actions__left">
|
|
161
|
+
<amelipro-btn-stub
|
|
162
|
+
badge="false"
|
|
163
|
+
badgebgcolor="ap-pink"
|
|
164
|
+
badgecolor="ap-white"
|
|
165
|
+
bordered="false"
|
|
166
|
+
class="
|
|
167
|
+
amelipro-transmission__print-btn
|
|
168
|
+
mb-4
|
|
169
|
+
text-none
|
|
170
|
+
"
|
|
171
|
+
color="ap-blue-darken-1"
|
|
172
|
+
disabled="false"
|
|
173
|
+
hovercolor="ap-blue-darken-2"
|
|
174
|
+
hoverunderline="true"
|
|
175
|
+
iconbgcolor="transparent"
|
|
176
|
+
iconbordered="false"
|
|
177
|
+
iconleft="false"
|
|
178
|
+
infoblock="false"
|
|
179
|
+
minheight="2.5rem"
|
|
180
|
+
size="60px"
|
|
181
|
+
text="true"
|
|
182
|
+
textcolor="ap-white"
|
|
183
|
+
type="button"
|
|
184
|
+
underline="false"
|
|
185
|
+
></amelipro-btn-stub>
|
|
186
|
+
</div>
|
|
187
|
+
<div class="
|
|
188
|
+
amelipro-transmission__actions__right
|
|
189
|
+
d-flex
|
|
190
|
+
justify-end
|
|
191
|
+
">
|
|
192
|
+
<amelipro-btn-stub
|
|
193
|
+
badge="false"
|
|
194
|
+
badgebgcolor="ap-pink"
|
|
195
|
+
badgecolor="ap-white"
|
|
196
|
+
bordered="true"
|
|
197
|
+
class="
|
|
198
|
+
amelipro-transmission__alternate-btn
|
|
199
|
+
mr-2
|
|
200
|
+
"
|
|
201
|
+
color="ap-white"
|
|
202
|
+
disabled="false"
|
|
203
|
+
hovercolor="ap-blue-lighten-3"
|
|
204
|
+
hoverunderline="false"
|
|
205
|
+
iconbgcolor="transparent"
|
|
206
|
+
iconbordered="false"
|
|
207
|
+
iconleft="false"
|
|
208
|
+
infoblock="false"
|
|
209
|
+
minheight="2.5rem"
|
|
210
|
+
size="60px"
|
|
211
|
+
text="false"
|
|
212
|
+
textcolor="ap-blue-darken-1"
|
|
213
|
+
type="button"
|
|
214
|
+
underline="false"
|
|
215
|
+
></amelipro-btn-stub>
|
|
216
|
+
<amelipro-btn-stub
|
|
217
|
+
badge="false"
|
|
218
|
+
badgebgcolor="ap-pink"
|
|
219
|
+
badgecolor="ap-white"
|
|
220
|
+
bordered="false"
|
|
221
|
+
class="amelipro-transmission__confirm-btn"
|
|
222
|
+
color="ap-blue-darken-1"
|
|
223
|
+
disabled="false"
|
|
224
|
+
hovercolor="ap-blue-darken-2"
|
|
225
|
+
hoverunderline="false"
|
|
226
|
+
iconbgcolor="transparent"
|
|
227
|
+
iconbordered="false"
|
|
228
|
+
iconleft="false"
|
|
229
|
+
infoblock="false"
|
|
230
|
+
minheight="2.5rem"
|
|
231
|
+
size="60px"
|
|
232
|
+
text="false"
|
|
233
|
+
textcolor="ap-white"
|
|
234
|
+
type="button"
|
|
235
|
+
underline="false"
|
|
236
|
+
></amelipro-btn-stub>
|
|
237
|
+
</div>
|
|
238
|
+
</div>
|
|
239
|
+
</div>
|
|
240
|
+
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { IStructureTabs, StructureTab } from './types'
|
|
3
|
-
import {
|
|
3
|
+
import { computed, nextTick, type PropType, ref } from 'vue'
|
|
4
4
|
import StructureBtn from '../StructureBtn/StructureBtn.vue'
|
|
5
5
|
import StructureList from '../StructureList/StructureList.vue'
|
|
6
6
|
import { locales } from './locales'
|
|
@@ -109,14 +109,13 @@
|
|
|
109
109
|
>
|
|
110
110
|
{{ locales.label }}
|
|
111
111
|
</p>
|
|
112
|
-
|
|
113
|
-
<div class="d-flex flex-column flex-sm-row">
|
|
112
|
+
<div class="d-flex flex-column flex-sm-row flex-sm-wrap">
|
|
114
113
|
<StructureBtn
|
|
115
114
|
v-for="(item, index) in tabs"
|
|
116
115
|
:key="index"
|
|
117
116
|
ref="structureBtns"
|
|
118
117
|
:aria-selected="selected === index ? 'true' : 'false'"
|
|
119
|
-
class="mr-0 mr-sm-3 mb-2 mb-sm-
|
|
118
|
+
class="mr-0 mr-sm-3 mb-2 mb-sm-1"
|
|
120
119
|
:controls="`structure-panel-${index}`"
|
|
121
120
|
role="tab"
|
|
122
121
|
:selected="index === selected"
|
|
@@ -135,7 +134,7 @@
|
|
|
135
134
|
v-for="(tab, index) in tabs"
|
|
136
135
|
:id="`structure-panel-${index}`"
|
|
137
136
|
:key="index"
|
|
138
|
-
class="mt-
|
|
137
|
+
class="mt-3"
|
|
139
138
|
:role="tabs.length > 1 ? 'tabpanel' : undefined"
|
|
140
139
|
:tabindex="selected === index && tabs.length > 1 ? 0 : -1"
|
|
141
140
|
>
|
|
@@ -27,6 +27,7 @@ exports[`StructureTabs > render correctly 1`] = `
|
|
|
27
27
|
d-flex
|
|
28
28
|
flex-column
|
|
29
29
|
flex-sm-row
|
|
30
|
+
flex-sm-wrap
|
|
30
31
|
">
|
|
31
32
|
<button
|
|
32
33
|
aria-controls="structure-panel-0"
|
|
@@ -35,7 +36,7 @@ exports[`StructureTabs > render correctly 1`] = `
|
|
|
35
36
|
bg-ap-blue-darken-2
|
|
36
37
|
elevation-0
|
|
37
38
|
mb-2
|
|
38
|
-
mb-sm-
|
|
39
|
+
mb-sm-1
|
|
39
40
|
mr-0
|
|
40
41
|
mr-sm-3
|
|
41
42
|
structure-btn
|
|
@@ -71,7 +72,7 @@ exports[`StructureTabs > render correctly 1`] = `
|
|
|
71
72
|
bg-ap-grey-lighten-3
|
|
72
73
|
elevation-0
|
|
73
74
|
mb-2
|
|
74
|
-
mb-sm-
|
|
75
|
+
mb-sm-1
|
|
75
76
|
mr-0
|
|
76
77
|
mr-sm-3
|
|
77
78
|
structure-btn
|
|
@@ -103,7 +104,7 @@ exports[`StructureTabs > render correctly 1`] = `
|
|
|
103
104
|
</div>
|
|
104
105
|
</div>
|
|
105
106
|
<div
|
|
106
|
-
class="mt-
|
|
107
|
+
class="mt-3"
|
|
107
108
|
id="structure-panel-0"
|
|
108
109
|
role="tabpanel"
|
|
109
110
|
tabindex="0"
|
|
@@ -461,7 +462,7 @@ exports[`StructureTabs > render correctly 1`] = `
|
|
|
461
462
|
</div>
|
|
462
463
|
</div>
|
|
463
464
|
<div
|
|
464
|
-
class="mt-
|
|
465
|
+
class="mt-3"
|
|
465
466
|
id="structure-panel-1"
|
|
466
467
|
role="tabpanel"
|
|
467
468
|
tabindex="-1"
|
package/src/components/Amelipro/StructureMenu/tests/__snapshots__/StructureMenu.spec.ts.snap
CHANGED
|
@@ -71,7 +71,10 @@ exports[`StructureMenu > render correctly 1`] = `
|
|
|
71
71
|
data-no-activator=""
|
|
72
72
|
>
|
|
73
73
|
<span
|
|
74
|
-
class="
|
|
74
|
+
class="
|
|
75
|
+
amelipro-btn__label
|
|
76
|
+
d-sr-only
|
|
77
|
+
"
|
|
75
78
|
id="my-structure-menu-id-structure-menu-close-btn-btn-label"
|
|
76
79
|
>
|
|
77
80
|
Fermer la fenêtre modale
|
|
@@ -309,6 +312,7 @@ exports[`StructureMenu > render correctly 1`] = `
|
|
|
309
312
|
d-flex
|
|
310
313
|
flex-column
|
|
311
314
|
flex-sm-row
|
|
315
|
+
flex-sm-wrap
|
|
312
316
|
">
|
|
313
317
|
<button
|
|
314
318
|
aria-controls="structure-panel-0"
|
|
@@ -317,7 +321,7 @@ exports[`StructureMenu > render correctly 1`] = `
|
|
|
317
321
|
bg-ap-blue-darken-2
|
|
318
322
|
elevation-0
|
|
319
323
|
mb-2
|
|
320
|
-
mb-sm-
|
|
324
|
+
mb-sm-1
|
|
321
325
|
mr-0
|
|
322
326
|
mr-sm-3
|
|
323
327
|
structure-btn
|
|
@@ -353,7 +357,7 @@ exports[`StructureMenu > render correctly 1`] = `
|
|
|
353
357
|
bg-ap-grey-lighten-3
|
|
354
358
|
elevation-0
|
|
355
359
|
mb-2
|
|
356
|
-
mb-sm-
|
|
360
|
+
mb-sm-1
|
|
357
361
|
mr-0
|
|
358
362
|
mr-sm-3
|
|
359
363
|
structure-btn
|
|
@@ -385,7 +389,7 @@ exports[`StructureMenu > render correctly 1`] = `
|
|
|
385
389
|
</div>
|
|
386
390
|
</div>
|
|
387
391
|
<div
|
|
388
|
-
class="mt-
|
|
392
|
+
class="mt-3"
|
|
389
393
|
id="structure-panel-0"
|
|
390
394
|
role="tabpanel"
|
|
391
395
|
tabindex="0"
|
|
@@ -743,7 +747,7 @@ exports[`StructureMenu > render correctly 1`] = `
|
|
|
743
747
|
</div>
|
|
744
748
|
</div>
|
|
745
749
|
<div
|
|
746
|
-
class="mt-
|
|
750
|
+
class="mt-3"
|
|
747
751
|
id="structure-panel-1"
|
|
748
752
|
role="tabpanel"
|
|
749
753
|
tabindex="-1"
|
|
@@ -1189,7 +1193,10 @@ exports[`StructureMenu > render correctly 1`] = `
|
|
|
1189
1193
|
data-no-activator=""
|
|
1190
1194
|
>
|
|
1191
1195
|
<span
|
|
1192
|
-
class="
|
|
1196
|
+
class="
|
|
1197
|
+
amelipro-btn__label
|
|
1198
|
+
d-sr-only
|
|
1199
|
+
"
|
|
1193
1200
|
id="my-structure-menu-id-default-structure-switch-description-btn-btn-label"
|
|
1194
1201
|
>
|
|
1195
1202
|
plus d’informations
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { type PropType,
|
|
2
|
+
import { computed, type PropType, ref } from 'vue'
|
|
3
3
|
import AmeliproBtn from '../AmeliproBtn/AmeliproBtn.vue'
|
|
4
4
|
import AmeliproIconBtn from '../AmeliproIconBtn/AmeliproIconBtn.vue'
|
|
5
5
|
import UserMenuDetails from './UserMenuDetails/UserMenuDetails.vue'
|
|
@@ -146,6 +146,7 @@
|
|
|
146
146
|
|
|
147
147
|
.user-menu {
|
|
148
148
|
position: relative;
|
|
149
|
+
overflow-wrap: break-word;
|
|
149
150
|
}
|
|
150
151
|
|
|
151
152
|
.user-menu-popover {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {Controls, Canvas, Meta,
|
|
1
|
+
import {Controls, Canvas, Meta, Story} from '@storybook/blocks';
|
|
2
2
|
import * as CaptchaStories from './Captcha.stories';
|
|
3
3
|
|
|
4
4
|
<Meta of={CaptchaStories} />
|
|
@@ -46,16 +46,16 @@ import * as CaptchaStories from './Captcha.stories';
|
|
|
46
46
|
|
|
47
47
|
## Context d'utilisation
|
|
48
48
|
|
|
49
|
-
Le composant Captcha permet d'
|
|
49
|
+
Le composant Captcha permet d'interagir avec l'api d'OBS <a href="https://www.orange-business.com/fr/solutions/securite/live-identity-captcha" target="_blank" rel="noopener noreferrer">Live Identity Captcha</a>.
|
|
50
50
|
|
|
51
|
-
Pour
|
|
51
|
+
Pour implémenter le composant avec l'api OBS, se référer à <a href="http://pad-st.cnamts.fr/pad-ddst/catalogue/products.html?product=captcha&division=dait" target="_blank" rel="noopener noreferrer">la documentation DDST</a>.
|
|
52
52
|
|
|
53
53
|
### Détails d'implementation
|
|
54
54
|
|
|
55
55
|
Les api Captcha d'OBS sont exposées en https.
|
|
56
56
|
|
|
57
57
|
Pour les appels réalisés depuis un back-end, il est nécessaire d'ajouter le root CA (autorité de certifications racine) au niveau du truststore du serveur hébergeant ce back-end.
|
|
58
|
-
Pour la production et la pré-production, le root CA "DigiCert Global Root CA" est accessible (voir informations de sécurité) depuis le site :
|
|
58
|
+
Pour la production et la pré-production, le root CA "DigiCert Global Root CA" est accessible (voir informations de sécurité) depuis le site : <a href="https://captcha.liveidentity.com/documentation" target="_blank" rel="noopener noreferrer">https://captcha.liveidentity.com/documentation</a>.
|
|
59
59
|
|
|
60
60
|
De plus, les api Captcha d'OBS sont externes / non hébergées par la CNAM.
|
|
61
61
|
Il est donc nécessaire :
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
},
|
|
14
14
|
argTypes: {
|
|
15
15
|
'urlCreate': {
|
|
16
|
-
description: 'URL de création du captcha (retourne
|
|
16
|
+
description: 'URL de création du captcha (retourne l\'identifiant du captcha image audio).',
|
|
17
17
|
control: false,
|
|
18
18
|
table: {
|
|
19
19
|
type: { summary: 'string' },
|
|
@@ -61,6 +61,13 @@ export default {
|
|
|
61
61
|
'helpDesk': {
|
|
62
62
|
description: 'Le numéro de téléphone du support pour garantir l\'accessibilité du parcours aux personnes en situation de handicap.',
|
|
63
63
|
},
|
|
64
|
+
'locale': {
|
|
65
|
+
description: 'La locale (langue) à utiliser pour la génération du captcha. Par défaut, la langue du navigateur est utilisée.',
|
|
66
|
+
control: 'text',
|
|
67
|
+
table: {
|
|
68
|
+
type: { summary: 'string' },
|
|
69
|
+
},
|
|
70
|
+
},
|
|
64
71
|
'locales': {
|
|
65
72
|
description: 'Les locales à utiliser pour le composant. Voir le fichier locales.ts pour l\'exemple des clés disponibles.',
|
|
66
73
|
control: false,
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
type?: CaptchaType
|
|
21
21
|
tagTitle?: string
|
|
22
22
|
helpDesk?: string | false
|
|
23
|
+
locale?: string
|
|
23
24
|
locales?: typeof defaultLocales
|
|
24
25
|
}>(), {
|
|
25
26
|
modelValue: undefined,
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
type: 'image',
|
|
28
29
|
helpDesk: '3648',
|
|
29
30
|
tagTitle: 'h3',
|
|
31
|
+
locale: navigator.language,
|
|
30
32
|
locales: () => defaultLocales,
|
|
31
33
|
})
|
|
32
34
|
|
|
@@ -101,6 +103,7 @@
|
|
|
101
103
|
:url-get-image="urlGetImage"
|
|
102
104
|
:url-get-audio="urlGetAudio"
|
|
103
105
|
:locales
|
|
106
|
+
:locale
|
|
104
107
|
@update:model-value="emitChangeTypeEvent"
|
|
105
108
|
@create-captcha:init="createCaptchaInit"
|
|
106
109
|
@create-captcha:success="createCaptchaSuccess"
|