@cnamts/synapse 1.0.10 → 1.0.11
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/dist/{DateFilter-C0wDuzgn.js → DateFilter-QEfKOz0P.js} +1 -1
- package/dist/{NumberFilter-CBj7zdOi.js → NumberFilter-C0h7gVzp.js} +1 -1
- package/dist/{PeriodFilter-DB4wWyKy.js → PeriodFilter-8dVrKjju.js} +1 -1
- package/dist/{SelectFilter-Dces8572.js → SelectFilter-BI3QGbqb.js} +1 -1
- package/dist/{TextFilter-BU9nlkuS.js → TextFilter-UOp1hcPp.js} +1 -1
- package/dist/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.d.ts +9 -0
- package/dist/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.d.ts +9 -0
- package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +6 -24
- package/dist/components/Amelipro/AmeliproCarousel/AmeliproCarousel.d.ts +18 -0
- package/dist/components/Amelipro/AmeliproFooter/AmeliproFooter.d.ts +9 -0
- package/dist/components/Amelipro/AmeliproFooter/locales.d.ts +0 -1
- package/dist/components/Amelipro/AmeliproFooter/types.d.ts +1 -0
- package/dist/components/Amelipro/AmeliproHeader/AmeliproHeader.d.ts +2 -0
- package/dist/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBar.d.ts +6 -2
- package/dist/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/AmeliproHeaderBrandSection.d.ts +8 -4
- package/dist/components/Amelipro/AmeliproPageLayout/AmeliproPageLayout.d.ts +2 -0
- package/dist/components/Amelipro/AmeliproResultList/AmeliproResultList.d.ts +9 -0
- package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +5 -5
- package/dist/components/Amelipro/AmeliproTable/AmeliproTable.d.ts +9 -0
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +6 -6
- package/dist/components/Amelipro/AmeliproTextArea/AmeliproTextArea.d.ts +2 -2
- package/dist/components/Amelipro/AmeliproUpload/types.d.ts +10 -0
- package/dist/components/CookiesSelection/CookiesInformation/CookiesInformation.d.ts +2 -2
- package/dist/components/Customs/Selects/SelectBtnField/SelectBtnField.d.ts +1 -1
- package/dist/components/Customs/Selects/SySelect/SySelect.d.ts +3 -3
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +1 -1
- package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +12 -12
- package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +6 -6
- package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +3 -3
- package/dist/components/DatePicker/tests/setup.d.ts +96 -96
- package/dist/components/LangBtn/LangBtn.d.ts +2 -2
- package/dist/components/NirField/NirField.d.ts +6 -6
- package/dist/components/PeriodField/PeriodField.d.ts +24 -24
- package/dist/components/PhoneField/PhoneField.d.ts +3 -3
- package/dist/components/SearchListField/SearchListField.d.ts +10 -1
- package/dist/components/SyTextArea/SyTextArea.d.ts +2 -2
- package/dist/components/Tables/common/SyTablePagination.d.ts +4 -4
- package/dist/components/Tables/common/TableHeader.d.ts +6 -0
- package/dist/components/Tables/common/organizeColumns/OrganizeColumns.d.ts +2 -2
- package/dist/components/Tables/common/types.d.ts +7 -0
- package/dist/components/Tables/common/useTableHeaders.d.ts +10 -20
- package/dist/design-system-v3.js +1 -1
- package/dist/design-system-v3.umd.cjs +266 -266
- package/dist/main-DyEOPqqn.js +33329 -0
- package/dist/style.css +1 -1
- package/dist/utils/amelipro/rules/uploadFile/index.d.ts +6 -0
- package/dist/utils/amelipro/toKebabCase/toKebabCase.d.ts +1 -0
- package/dist/utils/rules/isRequired/index.d.ts +5 -2
- package/dist/utils/rules/types.d.ts +12 -3
- package/package.json +12 -3
- package/src/assets/amelipro/img/bg-pieces-jointe.svg +28 -0
- package/src/assets/overrides/_btns.scss +1 -0
- package/src/assets/overrides/_forms.scss +5 -0
- package/src/components/Accordion/tests/accordion.spec.ts +0 -55
- package/src/components/Amelipro/AmeliproAccordion/AmeliproAccordionTemplate/__tests__/AmeliproAccordionTemplate.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproAccordion/__tests__/AmeliproAccordion.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproAccordionFrieze/__tests__/AmeliproAccordionFrieze.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproAccordionGroup/__tests__/AmeliproAccordionGroup.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.stories.ts +6 -0
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.vue +5 -1
- package/src/components/Amelipro/AmeliproAccordionList/__tests__/AmeliproAccordionList.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproAccordionList/__tests__/__snapshots__/AmeliproAccordionList.spec.ts.snap +13 -2
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/__tests__/AmeliproAccordionResultTemplate.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproAccordionResult/__tests__/AmeliproAccordionResult.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.stories.ts +6 -0
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.vue +5 -1
- package/src/components/Amelipro/AmeliproAccordionResultList/__tests__/AmeliproAccordionResultList.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproAccordionResultList/__tests__/__snapshots__/AmeliproAccordionResultList.spec.ts.snap +13 -2
- package/src/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.stories.ts +1 -1
- package/src/components/Amelipro/AmeliproAutoCompleteField/__tests__/AmeliproAutoCompleteField.spec.ts +277 -55
- package/src/components/Amelipro/AmeliproAutoCompleteField/__tests__/__snapshots__/AmeliproAutoCompleteField.spec.ts.snap +113 -233
- package/src/components/Amelipro/AmeliproBadge/__tests__/AmeliproBadge.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproBreadcrumb/__tests__/AmeliproBreadcrumb.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproBtn/__tests__/AmeliproBtn.spec.ts +478 -0
- package/src/components/Amelipro/AmeliproBtn/__tests__/__snapshots__/AmeliproBtn.spec.ts.snap +74 -0
- package/src/components/Amelipro/AmeliproCallback/__tests__/AmeliproCallback.spec.ts +100 -0
- package/src/components/Amelipro/AmeliproCallback/__tests__/__snapshots__/AmeliproCallback.spec.ts.snap +50 -0
- package/src/components/Amelipro/AmeliproCaptcha/__tests__/AmeliproCaptcha.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproCaptcha/__tests__/__snapshots__/AmeliproCaptcha.spec.ts.snap +10 -2
- package/src/components/Amelipro/AmeliproCard/__tests__/AmeliproCard.spec.ts +402 -0
- package/src/components/Amelipro/AmeliproCard/__tests__/__snapshots__/AmeliproCard.spec.ts.snap +106 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.stories.ts +2 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.vue +11 -1
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/__tests__/AmeliproCarouselItem.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproCarousel/__tests__/AmeliproCarousel.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproCarousel/__tests__/__snapshots__/AmeliproCarousel.spec.ts.snap +0 -2
- package/src/components/Amelipro/AmeliproCheckbox/tests/AmeliproCheckbox.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproCheckboxGroup/tests/AmeliproCheckboxGroup.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproChips/tests/AmeliproChips.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproClickableTile/tests/AmeliproClickableTile.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproContentLayout/__tests__/AmeliproContentLayout.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproCopyBtn/__tests__/AmeliproCopyBtn.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproCustomSelector/__tests__/AmeliproCustomSelector.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproDentalChart/AmeliproTooth/tests/AmeliproTooth.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproDentalChart/tests/AmeliproDentalChart.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproDialog/tests/AmeliproDialog.spec.ts +0 -2
- package/src/components/Amelipro/AmeliproDisclosure/tests/AmeliproDisclosure.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproErrorTemplate/__tests__/AmeliproErrorTemplate.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproFilePreview/__tests__/AmeliproFilePreview.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproFirstLogin/__tests__/AmeliproFirstLogin.spec.ts +0 -2
- package/src/components/Amelipro/AmeliproFooter/AmeliproFooter.stories.ts +1 -0
- package/src/components/Amelipro/AmeliproFooter/AmeliproFooter.vue +5 -1
- package/src/components/Amelipro/AmeliproFooter/locales.ts +0 -1
- package/src/components/Amelipro/AmeliproFooter/tests/AmeliproFooter.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproFooter/types.d.ts +1 -0
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeader.stories.ts +18 -8
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeader.vue +3 -1
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBar.vue +3 -0
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/AmeliproHeaderBrandSection.vue +10 -2
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/tests/AmeliproHeaderBrandSection.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/tests/__snapshots__/AmeliproHeaderBrandSection.spec.ts.snap +2 -3
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproLogoAm/tests/AmeliproLogoAm.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/tests/AmeliproHeaderBar.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/tests/__snapshots__/AmeliproHeaderBar.spec.ts.snap +2 -3
- package/src/components/Amelipro/AmeliproHeader/tests/AmeliproHeader.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproHeader/tests/__snapshots__/AmeliproHeader.spec.ts.snap +2 -3
- package/src/components/Amelipro/AmeliproIcon/tests/AmeliproIcon.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproIconBtn/tests/AmeliproIconBtn.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproIllustratedDataTile/tests/AmeliproIllustratedDataTile.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproIllustratedRadioGroup/tests/AmeliproIllustratedRadioGroup.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproMailTile/tests/AmeliproMailTile.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproMenu/tests/AmeliproMenu.spec.ts +0 -2
- package/src/components/Amelipro/AmeliproMessage/tests/AmeliproMessage.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproDropdownMenu/AmeliproDropdownMenuBtn/tests/AmeliproDropdownMenuBtn.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproDropdownMenu/tests/AmeliproDropdownMenu.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproMessagingMenuBtn/tests/AmeliproMessagingMenuBtn.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproMessagingLayout/tests/AmeliproMessagingLayout.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproMultipleFoldingCard/tests/AmeliproMultipleFoldingCard.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproNumberedCard/tests/AmeliproNumberedCard.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproOnboarding/tests/AmeliproOnboarding.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproPageLayout/AmeliproPageLayout.stories.ts +9 -2
- package/src/components/Amelipro/AmeliproPageLayout/AmeliproPageLayout.vue +4 -1
- package/src/components/Amelipro/AmeliproPageLayout/tests/AmeliproPageLayout.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproPageLayout/tests/__snapshots__/AmeliproPageLayout.spec.ts.snap +2 -3
- package/src/components/Amelipro/AmeliproPagination/AmeliproPaginationBtn/tests/AmeliproPaginationBtn.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproPagination/tests/AmeliproPagination.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproPatientBanner/tests/AmeliproPatientBanner.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproPatientLogged/__tests__/AmeliproPatientLogged.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproPatientLogged/__tests__/__snapshots__/AmeliproPatientLogged.spec.ts.snap +13 -2
- package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLoginForm/__tests__/AmeliproPatientLoginForm.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproPatientLogin/__tests__/AmeliproPatientLogin.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/__tests__/AmeliproPostalAddressCityRow.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/__tests__/__snapshots__/AmeliproPostalAddressCityRow.spec.ts.snap +24 -4
- package/src/components/Amelipro/AmeliproPostalAddressField/tests/AmeliproPostalAddressField.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproPostalAddressField/tests/__snapshots__/AmeliproPostalAddressField.spec.ts.snap +40 -8
- package/src/components/Amelipro/AmeliproRadioGroup/tests/AmeliproRadioGroup.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.stories.ts +6 -0
- package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.vue +5 -1
- package/src/components/Amelipro/AmeliproResultList/__tests__/AmeliproResultList.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproResultList/__tests__/__snapshots__/AmeliproResultList.spec.ts.snap +13 -2
- package/src/components/Amelipro/AmeliproSelect/tests/AmeliproSelect.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproSelect/tests/__snapshots__/AmeliproSelect.spec.ts.snap +13 -2
- package/src/components/Amelipro/AmeliproStateTile/tests/AmeliproStateTile.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproStatus/tests/AmeliproStatus.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproStepper/AmeliproStepBtn/tests/AmeliproStepBtn.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproStepper/tests/AmeliproStepper.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproTable/AmeliproTable.stories.ts +6 -0
- package/src/components/Amelipro/AmeliproTable/AmeliproTable.vue +5 -1
- package/src/components/Amelipro/AmeliproTable/__tests__/AmeliproTable.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproTable/__tests__/__snapshots__/AmeliproTable.spec.ts.snap +13 -2
- package/src/components/Amelipro/AmeliproTabs/AmeliproTabBtn/tests/AmeliproTabBtn.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproTabs/tests/AmeliproTabs.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproTextArea/AmeliproTextArea.stories.ts +1 -1
- package/src/components/Amelipro/AmeliproTextArea/__tests__/AmeliproTextArea.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproTextArea/__tests__/__snapshots__/AmeliproTextArea.spec.ts.snap +10 -2
- package/src/components/Amelipro/AmeliproTextField/tests/AmeliproTextField.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproTextField/tests/__snapshots__/AmeliproTextField.spec.ts.snap +10 -2
- package/src/components/Amelipro/AmeliproTileBtn/tests/AmeliproTileBtn.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproTooltips/tests/AmeliproTooltips.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproTransmission/tests/AmeliproTransmission.spec.ts +0 -4
- package/src/components/Amelipro/AmeliproUpload/AmeliproUpload.mdx +38 -0
- package/src/components/Amelipro/AmeliproUpload/AmeliproUpload.stories.ts +99 -0
- package/src/components/Amelipro/AmeliproUpload/AmeliproUpload.vue +714 -0
- package/src/components/Amelipro/AmeliproUpload/README.md +66 -0
- package/src/components/Amelipro/AmeliproUpload/__tests__/AmeliproUpload.spec.ts +74 -0
- package/src/components/Amelipro/AmeliproUpload/types.d.ts +10 -0
- package/src/components/Amelipro/ServiceMenu/ServiceBtn/tests/ServiceBtn.spec.ts +0 -4
- package/src/components/Amelipro/ServiceMenu/ServiceList/tests/ServiceList.spec.ts +0 -4
- package/src/components/Amelipro/ServiceMenu/ServiceMenuContent/tests/ServiceMenuContent.spec.ts +0 -4
- package/src/components/Amelipro/ServiceMenu/tests/ServiceMenu.spec.ts +0 -4
- package/src/components/Amelipro/StructureMenu/StructureBtn/tests/StructureBtn.spec.ts +0 -4
- package/src/components/Amelipro/StructureMenu/StructureItem/tests/StructureItem.spec.ts +0 -4
- package/src/components/Amelipro/StructureMenu/StructureList/tests/StructureList.spec.ts +0 -4
- package/src/components/Amelipro/StructureMenu/StructureTabs/tests/StructureTabs.spec.ts +0 -4
- package/src/components/Amelipro/StructureMenu/tests/StructureMenu.spec.ts +0 -2
- package/src/components/Amelipro/UserInformationSummary/tests/UserInformationSummary.spec.ts +0 -4
- package/src/components/Amelipro/UserMenu/UserMenuDetails/tests/UserMenuDetails.spec.ts +0 -4
- package/src/components/Amelipro/UserMenu/tests/UserMenu.spec.ts +0 -4
- package/src/components/BackBtn/BackBtn.vue +2 -1
- package/src/components/BackBtn/tests/BackBtn.spec.ts +1 -23
- package/src/components/BackToTopBtn/tests/BackToTopBtn.spec.ts +3 -34
- package/src/components/ChipList/tests/chipList.spec.ts +0 -38
- package/src/components/CollapsibleList/tests/CollapsibleList.spec.ts +0 -8
- package/src/components/ContextualMenu/tests/ContextualMenu.spec.ts +0 -28
- package/src/components/CookieBanner/tests/CookieBanner.spec.ts +1 -11
- package/src/components/CookiesSelection/CookiesInformation/tests/CookiesInformation.spec.ts +0 -16
- package/src/components/CookiesSelection/CookiesTable/tests/CookiesTable.spec.ts +0 -4
- package/src/components/CookiesSelection/tests/CookiesSelection.spec.ts +0 -16
- package/src/components/CopyBtn/tests/CopyBtn.spec.ts +0 -31
- package/src/components/CopyBtn/tests/__snapshots__/CopyBtn.spec.ts.snap +1 -0
- package/src/components/Customs/Selects/SelectBtnField/tests/SelectBtnField.spec.ts +3 -37
- package/src/components/Customs/Selects/SyBtnSelect/tests/SyBtnSelect.spec.ts +0 -28
- package/src/components/Customs/Selects/SyInputSelect/tests/SyInputSelect.spec.ts +8 -104
- package/src/components/Customs/Selects/SySelect/SySelect.vue +2 -2
- package/src/components/Customs/Selects/SySelect/tests/SySelect.spec.ts +0 -135
- package/src/components/Customs/SyCheckbox/SyCheckbox.stories.ts +1 -1
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +1 -1
- package/src/components/Customs/SyCheckbox/tests/SyCheckbox.spec.ts +0 -20
- package/src/components/Customs/SyForm/SyForm.mdx +1 -3
- package/src/components/Customs/SyForm/SyForm.stories.ts +131 -143
- package/src/components/Customs/SyTabs/tests/SyTabs.spec.ts +0 -2
- package/src/components/Customs/SyTextField/tests/SyTextField.spec.ts +1 -27
- package/src/components/DataList/DataListLoading/tests/DataListLoading.spec.ts +0 -4
- package/src/components/DataList/tests/DataList.spec.ts +0 -26
- package/src/components/DataListGroup/tests/DataListGroup.spec.ts +0 -10
- package/src/components/DataListItem/tests/DataListItem.spec.ts +0 -28
- package/src/components/DatePicker/CalendarMode/tests/DatePicker.events.spec.ts +0 -16
- package/src/components/DatePicker/CalendarMode/tests/DatePicker.spec.ts +4 -34
- package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.events.spec.ts +0 -10
- package/src/components/DatePicker/DateTextInput/DateTextInput.events.spec.ts +0 -13
- package/src/components/DatePicker/DateTextInput/DateTextInput.range.spec.ts +0 -10
- package/src/components/DatePicker/DateTextInput/DateTextInput.spec.ts +0 -52
- package/src/components/DatePicker/tests/DatePicker.validation.spec.ts +0 -543
- package/src/components/DiacriticPicker/tests/DiatriticPicker.spec.ts +0 -6
- package/src/components/DialogBox/tests/DialogBox.spec.ts +0 -63
- package/src/components/DownloadBtn/tests/DownloadBtn.spec.ts +0 -7
- package/src/components/ErrorPage/tests/ErrorPage.spec.ts +0 -7
- package/src/components/ExternalLinks/tests/ExternalLinks.spec.ts +0 -16
- package/src/components/ExternalLinks/tests/__snapshots__/ExternalLinks.spec.ts.snap +1 -0
- package/src/components/FileList/tests/FileList.spec.ts +0 -13
- package/src/components/FilePreview/tests/FilePreview.spec.ts +1 -6
- package/src/components/FileUpload/tests/FileUpload.spec.ts +1 -48
- package/src/components/FilterInline/tests/FilterInline.spec.ts +0 -10
- package/src/components/FilterSideBar/FilterSideBar.stories.ts +2 -0
- package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +0 -10
- package/src/components/FooterBar/tests/FooterBar.spec.ts +7 -19
- package/src/components/FranceConnectBtn/tests/FranceConnectBtn.spec.ts +0 -11
- package/src/components/HeaderBar/HeaderBar.stories.ts +37 -38
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/tests/HeaderSubMenu.spec.ts +0 -6
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/HeaderBurgerMenu.spec.ts +0 -6
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/useHandleSubMenus.spec.ts +0 -13
- package/src/components/HeaderBar/HeaderLogo/tests/HeaderLogo.spec.ts +1 -22
- package/src/components/HeaderBar/HeaderMenuBtn/tests/HeaderMenuBtn.spec.ts +0 -10
- package/src/components/HeaderBar/tests/HeaderBar.spec.ts +0 -16
- package/src/components/HeaderLoading/tests/HeaderLoading.spec.ts +0 -4
- package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +22 -15
- package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.spec.ts +0 -4
- package/src/components/HeaderToolbar/tests/HeaderToolBar.spec.ts +7 -51
- package/src/components/LangBtn/tests/LangBtn.spec.ts +0 -56
- package/src/components/LogoBrandSection/tests/LogoBrandSection.spec.ts +22 -67
- package/src/components/NirField/NirField.stories.ts +2 -0
- package/src/components/NirField/NirField.vue +48 -25
- package/src/components/NirField/tests/NirField.cursor.spec.ts +315 -0
- package/src/components/NirField/tests/NirField.spec.ts +215 -17
- package/src/components/NotFoundPage/tests/NotFoundPage.spec.ts +2 -12
- package/src/components/NotificationBar/NotificationBar.mdx +1 -1
- package/src/components/NotificationBar/NotificationBar.stories.ts +1 -0
- package/src/components/NotificationBar/tests/NotificationBar.spec.ts +5 -44
- package/src/components/PageContainer/tests/PageContainer.spec.ts +1 -15
- package/src/components/PaginatedTable/tests/PaginatedTable.spec.ts +0 -23
- package/src/components/PasswordField/tests/PasswordField.spec.ts +4 -38
- package/src/components/PeriodField/tests/PeriodField.spec.ts +4 -74
- package/src/components/PhoneField/tests/PhoneField.spec.ts +3 -154
- package/src/components/RangeField/RangeSlider/tests/rangeSlider.spec.ts +0 -13
- package/src/components/RangeField/RangeSlider/tests/useThumbKeyboard.spec.ts +0 -34
- package/src/components/RangeField/RangeSlider/tests/useTrack.spec.ts +4 -24
- package/src/components/RangeField/tests/RangeField.spec.ts +0 -31
- package/src/components/RangeField/tests/__snapshots__/RangeField.spec.ts.snap +78 -30
- package/src/components/RatingPicker/EmotionPicker/tests/EmotionPicker.spec.ts +2 -23
- package/src/components/RatingPicker/NumberPicker/tests/NumberPicker.spec.ts +2 -17
- package/src/components/RatingPicker/StarsPicker/tests/StarsPicker.spec.ts +3 -22
- package/src/components/RatingPicker/tests/Rating.spec.ts +0 -10
- package/src/components/RatingPicker/tests/RatingPicker.spec.ts +0 -23
- package/src/components/SearchListField/SearchListField.mdx +3 -4
- package/src/components/SearchListField/SearchListField.stories.ts +103 -3
- package/src/components/SearchListField/SearchListField.vue +34 -9
- package/src/components/SearchListField/tests/SearchListField.spec.ts +98 -44
- package/src/components/SocialMediaLinks/tests/SocialMediaLinks.spec.ts +0 -32
- package/src/components/SubHeader/tests/SubHeader.spec.ts +0 -18
- package/src/components/SyAlert/tests/SyAlert.spec.ts +0 -14
- package/src/components/SyTextArea/tests/SyTextArea.spec.ts +0 -31
- package/src/components/TableToolbar/tests/TableToolbar.spec.ts +0 -31
- package/src/components/TableToolbar/tests/__snapshots__/TableToolbar.spec.ts.snap +72 -24
- package/src/components/Tables/SyServerTable/SyServerTable.vue +15 -3
- package/src/components/Tables/SyServerTable/tests/SyServerTable.spec.ts +0 -58
- package/src/components/Tables/SyTable/SyTable.vue +30 -7
- package/src/components/Tables/SyTable/tests/SyTable.spec.ts +0 -55
- package/src/components/Tables/common/SyTablePagination.vue +1 -1
- package/src/components/Tables/common/TableHeader.vue +57 -2
- package/src/components/Tables/common/filters/tests/DateFilter.spec.ts +0 -11
- package/src/components/Tables/common/filters/tests/NumberFilter.spec.ts +0 -11
- package/src/components/Tables/common/filters/tests/PeriodFilter.spec.ts +0 -11
- package/src/components/Tables/common/filters/tests/SelectFilter.spec.ts +0 -11
- package/src/components/Tables/common/filters/tests/TextFilter.spec.ts +0 -11
- package/src/components/Tables/common/tests/SyTableFilter.spec.ts +0 -31
- package/src/components/Tables/common/tests/SyTablePagination.spec.ts +0 -49
- package/src/components/Tables/common/tests/TableHeader.spec.ts +0 -19
- package/src/components/Tables/common/tests/filterByRange.spec.ts +0 -13
- package/src/components/Tables/common/tests/resize.spec.ts +0 -13
- package/src/components/Tables/common/types.ts +7 -0
- package/src/components/Tables/common/useStoredOptions.ts +1 -1
- package/src/components/Tables/common/useTableHeaders.ts +73 -6
- package/src/components/ToolbarContainer/tests/ToolbarContainer.spec.ts +0 -19
- package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +0 -15
- package/src/components/Usages/tests/Usages.spec.ts +3 -31
- package/src/components/UserMenuBtn/tests/UserMenuBtn.spec.ts +0 -31
- package/src/composables/useFilterable/useFilterable.ts +33 -24
- package/src/stories/GuideDuDev/FormValidationGuide.mdx +746 -114
- package/src/stories/GuideDuDev/UtiliserLesRules.mdx +138 -136
- package/src/utils/amelipro/rules/uploadFile/index.ts +119 -0
- package/src/utils/amelipro/rules/uploadFile/tests/uploadFile.spec.ts +55 -0
- package/src/utils/amelipro/toKebabCase/toKebabCase.ts +11 -0
- package/src/utils/rules/doMatchPattern/index.ts +1 -1
- package/src/utils/rules/isDateValid/index.ts +1 -1
- package/src/utils/rules/isExactLength/index.ts +4 -0
- package/src/utils/rules/isHolidayDay/index.ts +1 -1
- package/src/utils/rules/isHolidayDay/tests/isHolidayDay.spec.ts +24 -14
- package/src/utils/rules/isMaxLength/index.ts +4 -0
- package/src/utils/rules/isMinLength/index.ts +4 -0
- package/src/utils/rules/isNotAfterDate/index.ts +4 -0
- package/src/utils/rules/isNotAfterToday/index.ts +1 -1
- package/src/utils/rules/isNotBeforeDate/index.ts +4 -0
- package/src/utils/rules/isNotBeforeToday/index.ts +1 -1
- package/src/utils/rules/isRequired/index.ts +11 -5
- package/src/utils/rules/isRequired/tests/{isRequred.spec.ts → isRequired.spec.ts} +24 -0
- package/src/utils/rules/isValidEmail/index.ts +1 -1
- package/src/utils/rules/types.d.ts +12 -3
- package/dist/main-Dt4iNotT.js +0 -33147
- package/src/components/Amelipro/AmeliproBtn/tests/AmeliproBtn.spec.ts +0 -22
- package/src/components/Amelipro/AmeliproBtn/tests/__snapshots__/AmeliproBtn.spec.ts.snap +0 -46
- package/src/components/Amelipro/AmeliproCallback/tests/AmeliproCallback.spec.ts +0 -21
- package/src/components/Amelipro/AmeliproCallback/tests/__snapshots__/AmeliproCallback.spec.ts.snap +0 -165
- package/src/components/Amelipro/AmeliproCard/tests/AmeliproCard.spec.ts +0 -23
- package/src/components/Amelipro/AmeliproCard/tests/__snapshots__/AmeliproCard.spec.ts.snap +0 -78
- package/src/components/DialogBox/tests/__snapshots__/DialogBox.spec.ts.snap +0 -204
- /package/src/composables/validation/{AvecVosComposants.mdx → AvecVosComposants.mdx.old} +0 -0
- /package/src/composables/validation/{FormValidation.mdx → FormValidation.mdx.old} +0 -0
- /package/src/composables/validation/{FormValidation.stories.ts → FormValidation.stories.ts.old} +0 -0
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { mount } from '@vue/test-utils'
|
|
2
2
|
import { expect, describe, it } from 'vitest'
|
|
3
3
|
import HeaderToolbar from '../HeaderToolbar.vue'
|
|
4
|
-
import { vuetify } from '@tests/unit/setup'
|
|
5
4
|
|
|
6
5
|
describe('HeaderToolbar', () => {
|
|
7
6
|
it('renders the component with default props', () => {
|
|
8
7
|
const wrapper = mount(HeaderToolbar, {
|
|
9
|
-
global: {
|
|
10
|
-
plugins: [vuetify],
|
|
11
|
-
},
|
|
12
8
|
props: {
|
|
13
9
|
leftMenu: [
|
|
14
10
|
{
|
|
@@ -33,9 +29,6 @@ describe('HeaderToolbar', () => {
|
|
|
33
29
|
|
|
34
30
|
it('returns a link component with href', () => {
|
|
35
31
|
const wrapper = mount(HeaderToolbar, {
|
|
36
|
-
global: {
|
|
37
|
-
plugins: [vuetify],
|
|
38
|
-
},
|
|
39
32
|
props: {
|
|
40
33
|
leftMenu: [
|
|
41
34
|
{
|
|
@@ -52,9 +45,6 @@ describe('HeaderToolbar', () => {
|
|
|
52
45
|
|
|
53
46
|
it('returns a link component with to', () => {
|
|
54
47
|
const wrapper = mount(HeaderToolbar, {
|
|
55
|
-
global: {
|
|
56
|
-
plugins: [vuetify],
|
|
57
|
-
},
|
|
58
48
|
props: {
|
|
59
49
|
leftMenu: [
|
|
60
50
|
{
|
|
@@ -70,22 +60,14 @@ describe('HeaderToolbar', () => {
|
|
|
70
60
|
})
|
|
71
61
|
|
|
72
62
|
it('hides the overlay', async () => {
|
|
73
|
-
const wrapper = mount(HeaderToolbar
|
|
74
|
-
global: {
|
|
75
|
-
plugins: [vuetify],
|
|
76
|
-
},
|
|
77
|
-
})
|
|
63
|
+
const wrapper = mount(HeaderToolbar)
|
|
78
64
|
|
|
79
65
|
await wrapper.vm.hideOverlay()
|
|
80
66
|
expect(wrapper.vm.showOverlay).toBe(false)
|
|
81
67
|
})
|
|
82
68
|
|
|
83
69
|
it('toggles the overlay when handleLink is called', async () => {
|
|
84
|
-
const wrapper = mount(HeaderToolbar
|
|
85
|
-
global: {
|
|
86
|
-
plugins: [vuetify],
|
|
87
|
-
},
|
|
88
|
-
})
|
|
70
|
+
const wrapper = mount(HeaderToolbar)
|
|
89
71
|
|
|
90
72
|
await wrapper.vm.handleLink(1)
|
|
91
73
|
expect(wrapper.vm.showOverlay).toBe(true)
|
|
@@ -95,22 +77,14 @@ describe('HeaderToolbar', () => {
|
|
|
95
77
|
})
|
|
96
78
|
|
|
97
79
|
it('sets the active link correctly', async () => {
|
|
98
|
-
const wrapper = mount(HeaderToolbar
|
|
99
|
-
global: {
|
|
100
|
-
plugins: [vuetify],
|
|
101
|
-
},
|
|
102
|
-
})
|
|
80
|
+
const wrapper = mount(HeaderToolbar)
|
|
103
81
|
|
|
104
82
|
await wrapper.vm.checkActiveLink(1)
|
|
105
83
|
expect(wrapper.vm.activeIndex).toBe(1)
|
|
106
84
|
})
|
|
107
85
|
|
|
108
86
|
it('should set showOverlay to true when handleLink is called', async () => {
|
|
109
|
-
const wrapper = mount(HeaderToolbar
|
|
110
|
-
global: {
|
|
111
|
-
plugins: [vuetify],
|
|
112
|
-
},
|
|
113
|
-
})
|
|
87
|
+
const wrapper = mount(HeaderToolbar)
|
|
114
88
|
|
|
115
89
|
await wrapper.vm.handleLink(1)
|
|
116
90
|
await wrapper.vm.checkActiveLink(1)
|
|
@@ -120,11 +94,7 @@ describe('HeaderToolbar', () => {
|
|
|
120
94
|
})
|
|
121
95
|
|
|
122
96
|
it('hides the overlay when hideOverlay is called', async () => {
|
|
123
|
-
const wrapper = mount(HeaderToolbar
|
|
124
|
-
global: {
|
|
125
|
-
plugins: [vuetify],
|
|
126
|
-
},
|
|
127
|
-
})
|
|
97
|
+
const wrapper = mount(HeaderToolbar)
|
|
128
98
|
|
|
129
99
|
wrapper.vm.showOverlay = true
|
|
130
100
|
await wrapper.vm.hideOverlay()
|
|
@@ -133,11 +103,7 @@ describe('HeaderToolbar', () => {
|
|
|
133
103
|
})
|
|
134
104
|
|
|
135
105
|
it('should set showOverlay to false when handleLink is called', async () => {
|
|
136
|
-
const wrapper = mount(HeaderToolbar
|
|
137
|
-
global: {
|
|
138
|
-
plugins: [vuetify],
|
|
139
|
-
},
|
|
140
|
-
})
|
|
106
|
+
const wrapper = mount(HeaderToolbar)
|
|
141
107
|
|
|
142
108
|
await wrapper.vm.handleLink(0)
|
|
143
109
|
await wrapper.vm.checkActiveLink(0)
|
|
@@ -148,9 +114,6 @@ describe('HeaderToolbar', () => {
|
|
|
148
114
|
|
|
149
115
|
it('should set highlightMenu to false when handleLink is called', async () => {
|
|
150
116
|
const wrapper = mount(HeaderToolbar, {
|
|
151
|
-
global: {
|
|
152
|
-
plugins: [vuetify],
|
|
153
|
-
},
|
|
154
117
|
props: {
|
|
155
118
|
leftMenu: [
|
|
156
119
|
{
|
|
@@ -183,11 +146,7 @@ describe('HeaderToolbar', () => {
|
|
|
183
146
|
})
|
|
184
147
|
|
|
185
148
|
it('should set activeIndex to -1 when deleteActiveLink is called', async () => {
|
|
186
|
-
const wrapper = mount(HeaderToolbar
|
|
187
|
-
global: {
|
|
188
|
-
plugins: [vuetify],
|
|
189
|
-
},
|
|
190
|
-
})
|
|
149
|
+
const wrapper = mount(HeaderToolbar)
|
|
191
150
|
|
|
192
151
|
await wrapper.vm.deleteActiveLink()
|
|
193
152
|
|
|
@@ -196,9 +155,6 @@ describe('HeaderToolbar', () => {
|
|
|
196
155
|
|
|
197
156
|
it('should set highlightMenu to false when activeSelected is equal to Professionnel de santé', async () => {
|
|
198
157
|
const wrapper = mount(HeaderToolbar, {
|
|
199
|
-
global: {
|
|
200
|
-
plugins: [vuetify],
|
|
201
|
-
},
|
|
202
158
|
props: {
|
|
203
159
|
leftMenu: [
|
|
204
160
|
{
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import { mount, VueWrapper } from '@vue/test-utils'
|
|
2
2
|
import LangBtn from '../LangBtn.vue'
|
|
3
3
|
import { describe, it, expect, afterEach, vi } from 'vitest'
|
|
4
|
-
import { createVuetify } from 'vuetify'
|
|
5
|
-
import * as components from 'vuetify/components'
|
|
6
|
-
import * as directives from 'vuetify/directives'
|
|
7
4
|
import ISO6391 from 'iso-639-1'
|
|
8
5
|
|
|
9
|
-
const vuetify = createVuetify({
|
|
10
|
-
components,
|
|
11
|
-
directives,
|
|
12
|
-
})
|
|
13
|
-
|
|
14
6
|
describe('LangBtn', () => {
|
|
15
7
|
let wrapper: VueWrapper
|
|
16
8
|
|
|
@@ -25,9 +17,6 @@ describe('LangBtn', () => {
|
|
|
25
17
|
props: {
|
|
26
18
|
availableLanguages: ['fr', 'co', 'es'],
|
|
27
19
|
},
|
|
28
|
-
global: {
|
|
29
|
-
plugins: [vuetify],
|
|
30
|
-
},
|
|
31
20
|
})
|
|
32
21
|
|
|
33
22
|
expect(wrapper.html()).toMatchSnapshot()
|
|
@@ -38,9 +27,6 @@ describe('LangBtn', () => {
|
|
|
38
27
|
props: {
|
|
39
28
|
availableLanguages: ['fr', 'co', 'es'],
|
|
40
29
|
},
|
|
41
|
-
global: {
|
|
42
|
-
plugins: [vuetify],
|
|
43
|
-
},
|
|
44
30
|
})
|
|
45
31
|
expect(wrapper.find('.vd-lang-btn').text()).toBe('Français')
|
|
46
32
|
})
|
|
@@ -51,9 +37,6 @@ describe('LangBtn', () => {
|
|
|
51
37
|
modelValue: 'co',
|
|
52
38
|
availableLanguages: ['fr', 'co', 'es'],
|
|
53
39
|
},
|
|
54
|
-
global: {
|
|
55
|
-
plugins: [vuetify],
|
|
56
|
-
},
|
|
57
40
|
})
|
|
58
41
|
expect(wrapper.find('.vd-lang-btn').text()).toBe('corsu')
|
|
59
42
|
})
|
|
@@ -64,9 +47,6 @@ describe('LangBtn', () => {
|
|
|
64
47
|
modelValue: 'fr',
|
|
65
48
|
availableLanguages: ['fr', 'co', 'es'],
|
|
66
49
|
},
|
|
67
|
-
global: {
|
|
68
|
-
plugins: [vuetify],
|
|
69
|
-
},
|
|
70
50
|
})
|
|
71
51
|
|
|
72
52
|
expect(wrapper.find('.vd-lang-btn').text()).toBe('Français')
|
|
@@ -83,9 +63,6 @@ describe('LangBtn', () => {
|
|
|
83
63
|
availableLanguages: ['fr', 'co', 'es'],
|
|
84
64
|
modelValue: 'es',
|
|
85
65
|
},
|
|
86
|
-
global: {
|
|
87
|
-
plugins: [vuetify],
|
|
88
|
-
},
|
|
89
66
|
attachTo: document.body,
|
|
90
67
|
})
|
|
91
68
|
|
|
@@ -107,9 +84,6 @@ describe('LangBtn', () => {
|
|
|
107
84
|
props: {
|
|
108
85
|
availableLanguages: ['fr', 'co', 'es'],
|
|
109
86
|
},
|
|
110
|
-
global: {
|
|
111
|
-
plugins: [vuetify],
|
|
112
|
-
},
|
|
113
87
|
attachTo: document.body,
|
|
114
88
|
})
|
|
115
89
|
|
|
@@ -129,9 +103,6 @@ describe('LangBtn', () => {
|
|
|
129
103
|
hideDownArrow: true,
|
|
130
104
|
availableLanguages: ['fr', 'co', 'es'],
|
|
131
105
|
},
|
|
132
|
-
global: {
|
|
133
|
-
plugins: [vuetify],
|
|
134
|
-
},
|
|
135
106
|
})
|
|
136
107
|
expect(wrapper.find('.v-icon').exists()).toBe(false)
|
|
137
108
|
})
|
|
@@ -142,9 +113,6 @@ describe('LangBtn', () => {
|
|
|
142
113
|
hideDownArrow: false,
|
|
143
114
|
availableLanguages: ['fr', 'co', 'es'],
|
|
144
115
|
},
|
|
145
|
-
global: {
|
|
146
|
-
plugins: [vuetify],
|
|
147
|
-
},
|
|
148
116
|
})
|
|
149
117
|
expect(wrapper.find('.v-icon').exists()).toBe(true)
|
|
150
118
|
})
|
|
@@ -154,9 +122,6 @@ describe('LangBtn', () => {
|
|
|
154
122
|
props: {
|
|
155
123
|
availableLanguages: '*',
|
|
156
124
|
},
|
|
157
|
-
global: {
|
|
158
|
-
plugins: [vuetify],
|
|
159
|
-
},
|
|
160
125
|
attachTo: document.body,
|
|
161
126
|
})
|
|
162
127
|
|
|
@@ -177,9 +142,6 @@ describe('LangBtn', () => {
|
|
|
177
142
|
props: {
|
|
178
143
|
availableLanguages: languages,
|
|
179
144
|
},
|
|
180
|
-
global: {
|
|
181
|
-
plugins: [vuetify],
|
|
182
|
-
},
|
|
183
145
|
attachTo: document.body,
|
|
184
146
|
})
|
|
185
147
|
|
|
@@ -205,9 +167,6 @@ describe('LangBtn', () => {
|
|
|
205
167
|
props: {
|
|
206
168
|
availableLanguages: ['fr', 'co', 'es'],
|
|
207
169
|
},
|
|
208
|
-
global: {
|
|
209
|
-
plugins: [vuetify],
|
|
210
|
-
},
|
|
211
170
|
})
|
|
212
171
|
|
|
213
172
|
const button = wrapper.find('.vd-lang-btn')
|
|
@@ -220,9 +179,6 @@ describe('LangBtn', () => {
|
|
|
220
179
|
ariaLabel: 'Language selection',
|
|
221
180
|
availableLanguages: ['fr', 'co', 'es'],
|
|
222
181
|
},
|
|
223
|
-
global: {
|
|
224
|
-
plugins: [vuetify],
|
|
225
|
-
},
|
|
226
182
|
})
|
|
227
183
|
|
|
228
184
|
const button = wrapper.find('.vd-lang-btn')
|
|
@@ -235,9 +191,6 @@ describe('LangBtn', () => {
|
|
|
235
191
|
modelValue: 'unknown',
|
|
236
192
|
availableLanguages: ['fr', 'co', 'es'],
|
|
237
193
|
},
|
|
238
|
-
global: {
|
|
239
|
-
plugins: [vuetify],
|
|
240
|
-
},
|
|
241
194
|
})
|
|
242
195
|
|
|
243
196
|
expect(wrapper.find('.vd-lang-btn').text()).toBe('unknown')
|
|
@@ -254,9 +207,6 @@ describe('LangBtn', () => {
|
|
|
254
207
|
modelValue: 'xx',
|
|
255
208
|
availableLanguages: ['xx'],
|
|
256
209
|
},
|
|
257
|
-
global: {
|
|
258
|
-
plugins: [vuetify],
|
|
259
|
-
},
|
|
260
210
|
})
|
|
261
211
|
|
|
262
212
|
expect(wrapper.find('.vd-lang-btn').text()).toBe('xx')
|
|
@@ -270,9 +220,6 @@ describe('LangBtn', () => {
|
|
|
270
220
|
props: {
|
|
271
221
|
availableLanguages: ['fr', 'co', 'es'],
|
|
272
222
|
},
|
|
273
|
-
global: {
|
|
274
|
-
plugins: [vuetify],
|
|
275
|
-
},
|
|
276
223
|
})
|
|
277
224
|
|
|
278
225
|
expect(wrapper.find('.vd-lang-btn').text()).toBe('Français')
|
|
@@ -290,9 +237,6 @@ describe('LangBtn', () => {
|
|
|
290
237
|
props: {
|
|
291
238
|
availableLanguages: ['fr', 'co', 'es'],
|
|
292
239
|
},
|
|
293
|
-
global: {
|
|
294
|
-
plugins: [vuetify],
|
|
295
|
-
},
|
|
296
240
|
attachTo: document.body,
|
|
297
241
|
})
|
|
298
242
|
|
|
@@ -2,15 +2,12 @@ import { describe, it, expect } from 'vitest'
|
|
|
2
2
|
import { mount } from '@vue/test-utils'
|
|
3
3
|
|
|
4
4
|
import LogoBrandSection from '../LogoBrandSection.vue'
|
|
5
|
-
import { vuetify } from '@tests/unit/setup'
|
|
6
5
|
|
|
7
6
|
describe('LogoBrandSection', () => {
|
|
8
7
|
it('renders correctly', () => {
|
|
9
8
|
const wrapper = mount(LogoBrandSection, {
|
|
10
9
|
global: {
|
|
11
|
-
|
|
12
|
-
stubs: ['RouterLink', 'Logo'],
|
|
13
|
-
},
|
|
10
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
14
11
|
props: {
|
|
15
12
|
theme: 'default',
|
|
16
13
|
serviceTitle: 'Service Title',
|
|
@@ -29,9 +26,7 @@ describe('LogoBrandSection', () => {
|
|
|
29
26
|
it('renders correctly with service computed', () => {
|
|
30
27
|
const wrapper = mount(LogoBrandSection, {
|
|
31
28
|
global: {
|
|
32
|
-
|
|
33
|
-
stubs: ['RouterLink', 'Logo'],
|
|
34
|
-
},
|
|
29
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
35
30
|
props: {
|
|
36
31
|
theme: 'default',
|
|
37
32
|
serviceTitle: 'Service Title',
|
|
@@ -45,9 +40,7 @@ describe('LogoBrandSection', () => {
|
|
|
45
40
|
it('renders correctly with service computed', () => {
|
|
46
41
|
const wrapper = mount(LogoBrandSection, {
|
|
47
42
|
global: {
|
|
48
|
-
|
|
49
|
-
stubs: ['RouterLink', 'Logo'],
|
|
50
|
-
},
|
|
43
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
51
44
|
props: {
|
|
52
45
|
theme: 'compte-entreprise',
|
|
53
46
|
},
|
|
@@ -59,9 +52,7 @@ describe('LogoBrandSection', () => {
|
|
|
59
52
|
it('renders correctly with height', () => {
|
|
60
53
|
const wrapper = mount(LogoBrandSection, {
|
|
61
54
|
global: {
|
|
62
|
-
|
|
63
|
-
stubs: ['RouterLink', 'Logo'],
|
|
64
|
-
},
|
|
55
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
65
56
|
props: {
|
|
66
57
|
theme: 'default',
|
|
67
58
|
serviceTitle: 'Service Title',
|
|
@@ -81,9 +72,7 @@ describe('LogoBrandSection', () => {
|
|
|
81
72
|
it('renders correctly with showServiceSubTitle', () => {
|
|
82
73
|
const wrapper = mount(LogoBrandSection, {
|
|
83
74
|
global: {
|
|
84
|
-
|
|
85
|
-
stubs: ['RouterLink', 'Logo'],
|
|
86
|
-
},
|
|
75
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
87
76
|
props: {
|
|
88
77
|
theme: 'default',
|
|
89
78
|
serviceTitle: 'Service Title',
|
|
@@ -97,9 +86,7 @@ describe('LogoBrandSection', () => {
|
|
|
97
86
|
it('renders correctly with no showServiceSubTitle', () => {
|
|
98
87
|
const wrapper = mount(LogoBrandSection, {
|
|
99
88
|
global: {
|
|
100
|
-
|
|
101
|
-
stubs: ['RouterLink', 'Logo'],
|
|
102
|
-
},
|
|
89
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
103
90
|
props: {
|
|
104
91
|
theme: 'default',
|
|
105
92
|
serviceTitle: 'Service Title',
|
|
@@ -113,9 +100,7 @@ describe('LogoBrandSection', () => {
|
|
|
113
100
|
it('renders correctly with default theme', () => {
|
|
114
101
|
const wrapper = mount(LogoBrandSection, {
|
|
115
102
|
global: {
|
|
116
|
-
|
|
117
|
-
stubs: ['RouterLink', 'Logo'],
|
|
118
|
-
},
|
|
103
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
119
104
|
props: {
|
|
120
105
|
serviceTitle: 'Service Title',
|
|
121
106
|
serviceSubTitle: 'Service Sub Title',
|
|
@@ -129,9 +114,7 @@ describe('LogoBrandSection', () => {
|
|
|
129
114
|
it('renders correctly with cnam theme', () => {
|
|
130
115
|
const wrapper = mount(LogoBrandSection, {
|
|
131
116
|
global: {
|
|
132
|
-
|
|
133
|
-
stubs: ['RouterLink', 'Logo'],
|
|
134
|
-
},
|
|
117
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
135
118
|
props: {
|
|
136
119
|
theme: 'cnam',
|
|
137
120
|
serviceTitle: 'Service Title',
|
|
@@ -146,9 +129,7 @@ describe('LogoBrandSection', () => {
|
|
|
146
129
|
it('renders correctly with compte entreprise theme', () => {
|
|
147
130
|
const wrapper = mount(LogoBrandSection, {
|
|
148
131
|
global: {
|
|
149
|
-
|
|
150
|
-
stubs: ['RouterLink', 'Logo'],
|
|
151
|
-
},
|
|
132
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
152
133
|
props: {
|
|
153
134
|
theme: 'compte-entreprise',
|
|
154
135
|
serviceTitle: 'Service Title',
|
|
@@ -163,9 +144,7 @@ describe('LogoBrandSection', () => {
|
|
|
163
144
|
it('renders correctly with risquePro if no reduceLogo', () => {
|
|
164
145
|
const wrapper = mount(LogoBrandSection, {
|
|
165
146
|
global: {
|
|
166
|
-
|
|
167
|
-
stubs: ['RouterLink', 'Logo'],
|
|
168
|
-
},
|
|
147
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
169
148
|
props: {
|
|
170
149
|
theme: 'risque-pro',
|
|
171
150
|
reduceLogo: false,
|
|
@@ -179,9 +158,7 @@ describe('LogoBrandSection', () => {
|
|
|
179
158
|
it('renders correctly with risquePro', () => {
|
|
180
159
|
const wrapper = mount(LogoBrandSection, {
|
|
181
160
|
global: {
|
|
182
|
-
|
|
183
|
-
stubs: ['RouterLink', 'Logo'],
|
|
184
|
-
},
|
|
161
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
185
162
|
props: {
|
|
186
163
|
theme: 'risque-pro',
|
|
187
164
|
reduceLogo: true,
|
|
@@ -194,9 +171,7 @@ describe('LogoBrandSection', () => {
|
|
|
194
171
|
it('renders correctly with isCompteEntreprise', () => {
|
|
195
172
|
const wrapper = mount(LogoBrandSection, {
|
|
196
173
|
global: {
|
|
197
|
-
|
|
198
|
-
stubs: ['RouterLink', 'Logo'],
|
|
199
|
-
},
|
|
174
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
200
175
|
props: {
|
|
201
176
|
theme: 'compte-entreprise',
|
|
202
177
|
},
|
|
@@ -208,9 +183,7 @@ describe('LogoBrandSection', () => {
|
|
|
208
183
|
it('renders correctly with isCompteAmeliMobile', () => {
|
|
209
184
|
const wrapper = mount(LogoBrandSection, {
|
|
210
185
|
global: {
|
|
211
|
-
|
|
212
|
-
stubs: ['RouterLink', 'Logo'],
|
|
213
|
-
},
|
|
186
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
214
187
|
props: {
|
|
215
188
|
theme: 'compte-ameli',
|
|
216
189
|
mobileVersion: true,
|
|
@@ -224,9 +197,7 @@ describe('LogoBrandSection', () => {
|
|
|
224
197
|
it('renders correctly without signature', () => {
|
|
225
198
|
const wrapper = mount(LogoBrandSection, {
|
|
226
199
|
global: {
|
|
227
|
-
|
|
228
|
-
stubs: ['RouterLink', 'Logo'],
|
|
229
|
-
},
|
|
200
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
230
201
|
props: {
|
|
231
202
|
theme: 'default',
|
|
232
203
|
reduceLogo: true,
|
|
@@ -239,9 +210,7 @@ describe('LogoBrandSection', () => {
|
|
|
239
210
|
it('renders correctly without hideSignature', () => {
|
|
240
211
|
const wrapper = mount(LogoBrandSection, {
|
|
241
212
|
global: {
|
|
242
|
-
|
|
243
|
-
stubs: ['RouterLink', 'Logo'],
|
|
244
|
-
},
|
|
213
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
245
214
|
props: {
|
|
246
215
|
theme: 'default',
|
|
247
216
|
reduceLogo: false,
|
|
@@ -254,9 +223,7 @@ describe('LogoBrandSection', () => {
|
|
|
254
223
|
it('renders correctly with secondaryLogo', () => {
|
|
255
224
|
const wrapper = mount(LogoBrandSection, {
|
|
256
225
|
global: {
|
|
257
|
-
stubs: ['RouterLink', 'Logo'],
|
|
258
|
-
plugins: [vuetify],
|
|
259
|
-
},
|
|
226
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
260
227
|
props: {
|
|
261
228
|
theme: 'compte-ameli',
|
|
262
229
|
},
|
|
@@ -268,9 +235,7 @@ describe('LogoBrandSection', () => {
|
|
|
268
235
|
it('renders correctly with logoContainerComponent', () => {
|
|
269
236
|
const wrapper = mount(LogoBrandSection, {
|
|
270
237
|
global: {
|
|
271
|
-
|
|
272
|
-
stubs: ['RouterLink', 'Logo'],
|
|
273
|
-
},
|
|
238
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
274
239
|
props: {
|
|
275
240
|
theme: 'default',
|
|
276
241
|
homeLink: {
|
|
@@ -285,9 +250,7 @@ describe('LogoBrandSection', () => {
|
|
|
285
250
|
it('renders correctly RouterLink with logoContainerComponent', () => {
|
|
286
251
|
const wrapper = mount(LogoBrandSection, {
|
|
287
252
|
global: {
|
|
288
|
-
|
|
289
|
-
stubs: ['RouterLink', 'Logo'],
|
|
290
|
-
},
|
|
253
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
291
254
|
props: {
|
|
292
255
|
theme: 'default',
|
|
293
256
|
homeLink: {
|
|
@@ -302,9 +265,7 @@ describe('LogoBrandSection', () => {
|
|
|
302
265
|
it('renders correctly with logoContainerComponent', () => {
|
|
303
266
|
const wrapper = mount(LogoBrandSection, {
|
|
304
267
|
global: {
|
|
305
|
-
|
|
306
|
-
stubs: ['RouterLink', 'Logo'],
|
|
307
|
-
},
|
|
268
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
308
269
|
props: {
|
|
309
270
|
theme: 'default',
|
|
310
271
|
homeLink: {
|
|
@@ -320,9 +281,7 @@ describe('LogoBrandSection', () => {
|
|
|
320
281
|
it('renders correctly with secondaryLogoCtnComponent', () => {
|
|
321
282
|
const wrapper = mount(LogoBrandSection, {
|
|
322
283
|
global: {
|
|
323
|
-
|
|
324
|
-
stubs: ['RouterLink', 'Logo'],
|
|
325
|
-
},
|
|
284
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
326
285
|
props: {
|
|
327
286
|
theme: 'default',
|
|
328
287
|
},
|
|
@@ -334,9 +293,7 @@ describe('LogoBrandSection', () => {
|
|
|
334
293
|
it('renders correctly with secondaryLogoCtnComponent', () => {
|
|
335
294
|
const wrapper = mount(LogoBrandSection, {
|
|
336
295
|
global: {
|
|
337
|
-
|
|
338
|
-
stubs: ['RouterLink', 'Logo'],
|
|
339
|
-
},
|
|
296
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
340
297
|
props: {
|
|
341
298
|
theme: 'ameli-pro',
|
|
342
299
|
},
|
|
@@ -348,9 +305,7 @@ describe('LogoBrandSection', () => {
|
|
|
348
305
|
it('renders correctly with secondaryLogoCtnComponent', () => {
|
|
349
306
|
const wrapper = mount(LogoBrandSection, {
|
|
350
307
|
global: {
|
|
351
|
-
|
|
352
|
-
stubs: ['RouterLink', 'Logo'],
|
|
353
|
-
},
|
|
308
|
+
stubs: ['RouterLink', 'Logo'] },
|
|
354
309
|
props: {
|
|
355
310
|
theme: 'ameli',
|
|
356
311
|
homeLink: {
|
|
@@ -1148,6 +1148,7 @@ Cette story montre l'utilisation du NirField dans un formulaire avec validation.
|
|
|
1148
1148
|
v-model="value"
|
|
1149
1149
|
label="NirField"
|
|
1150
1150
|
required
|
|
1151
|
+
:displayKey="false"
|
|
1151
1152
|
showSuccessMessages
|
|
1152
1153
|
ref="nirField"
|
|
1153
1154
|
/>
|
|
@@ -1210,6 +1211,7 @@ const onSubmit = async () => {
|
|
|
1210
1211
|
label="NirField"
|
|
1211
1212
|
required
|
|
1212
1213
|
showSuccessMessages
|
|
1214
|
+
:displayKey="false"
|
|
1213
1215
|
ref="nirField"
|
|
1214
1216
|
/>
|
|
1215
1217
|
<v-btn
|
|
@@ -86,6 +86,9 @@
|
|
|
86
86
|
const numberValue = ref('')
|
|
87
87
|
const keyValue = ref('')
|
|
88
88
|
|
|
89
|
+
// Flag pour éviter les boucles infinies lors de la synchronisation
|
|
90
|
+
const isInternalUpdate = ref(false)
|
|
91
|
+
|
|
89
92
|
// Refs pour les champs
|
|
90
93
|
const keyField = ref<InstanceType<typeof SyTextField> | null>(null)
|
|
91
94
|
const numberField = ref<InstanceType<typeof SyTextField> | null>(null)
|
|
@@ -154,13 +157,15 @@
|
|
|
154
157
|
})
|
|
155
158
|
|
|
156
159
|
watch(unmaskedKeyValue, (newValue) => {
|
|
157
|
-
if (newValue.length === 0) {
|
|
160
|
+
if (newValue.length === 0 && props.displayKey) {
|
|
158
161
|
focusField(numberField)
|
|
159
162
|
}
|
|
160
163
|
})
|
|
161
164
|
|
|
162
165
|
// Watch pour détecter la suppression des chiffres de la clé
|
|
163
166
|
watch(keyValue, (newValue, oldValue) => {
|
|
167
|
+
if (!props.displayKey) return
|
|
168
|
+
|
|
164
169
|
// Si l'ancienne valeur avait des chiffres et la nouvelle est vide ou ne contient que des espaces
|
|
165
170
|
if (oldValue && newValue !== null && oldValue.trim() && !newValue.trim()) {
|
|
166
171
|
focusField(numberField)
|
|
@@ -279,6 +284,9 @@
|
|
|
279
284
|
|
|
280
285
|
// Synchronisation avec modelValue
|
|
281
286
|
watch(modelValueRef, (newValue) => {
|
|
287
|
+
// Ignorer les mises à jour internes pour éviter les boucles infinies
|
|
288
|
+
if (isInternalUpdate.value) return
|
|
289
|
+
|
|
282
290
|
if (newValue === undefined || newValue === null) {
|
|
283
291
|
numberValue.value = ''
|
|
284
292
|
keyValue.value = ''
|
|
@@ -308,12 +316,20 @@
|
|
|
308
316
|
const number = unmaskedNumberValue.value
|
|
309
317
|
const key = unmaskedKeyValue.value
|
|
310
318
|
|
|
319
|
+
// Marquer comme mise à jour interne pour éviter la boucle
|
|
320
|
+
isInternalUpdate.value = true
|
|
321
|
+
|
|
311
322
|
if (!number && !key) {
|
|
312
323
|
emit('update:modelValue', undefined)
|
|
313
|
-
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
emit('update:modelValue', `${number}${key}`)
|
|
314
327
|
}
|
|
315
328
|
|
|
316
|
-
|
|
329
|
+
// Réactiver la synchronisation au prochain tick
|
|
330
|
+
nextTick(() => {
|
|
331
|
+
isInternalUpdate.value = false
|
|
332
|
+
})
|
|
317
333
|
}
|
|
318
334
|
|
|
319
335
|
// État pour suivre si une validation est en cours
|
|
@@ -416,7 +432,7 @@
|
|
|
416
432
|
debouncedValidate()
|
|
417
433
|
|
|
418
434
|
// Si on supprime le contenu de la clé, on revient au champ NIR
|
|
419
|
-
if (unmaskedKeyValue.value.length === 0) {
|
|
435
|
+
if (props.displayKey && unmaskedKeyValue.value.length === 0) {
|
|
420
436
|
nextTick(() => {
|
|
421
437
|
numberField.value?.$el?.querySelector?.('input')?.focus()
|
|
422
438
|
})
|
|
@@ -454,30 +470,37 @@
|
|
|
454
470
|
|
|
455
471
|
// Ajouter des écouteurs d'événements keydown aux champs NIR après le montage du composant
|
|
456
472
|
onMounted(() => {
|
|
457
|
-
//
|
|
458
|
-
|
|
459
|
-
//
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
numberInput.
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
//
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
fieldsetNumberInput.
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
473
|
+
// N'ajouter l'écouteur keydown QUE si on affiche la clé
|
|
474
|
+
if (props.displayKey) {
|
|
475
|
+
// Attendre que les refs soient disponibles
|
|
476
|
+
nextTick(() => {
|
|
477
|
+
// Ajouter l'écouteur d'événement au premier champ NIR
|
|
478
|
+
const numberInput = numberField.value?.$el?.querySelector?.('input')
|
|
479
|
+
if (numberInput) {
|
|
480
|
+
numberInput.addEventListener('keydown', handleNumberKeydown)
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
// Si le composant est en mode withoutFieldset, ajouter l'écouteur au deuxième champ NIR
|
|
484
|
+
if (props.withoutFieldset) {
|
|
485
|
+
// Attendre un peu pour s'assurer que le DOM est complètement rendu
|
|
486
|
+
setTimeout(() => {
|
|
487
|
+
const fieldsetNumberInput = container.value?.querySelector('.number-field input')
|
|
488
|
+
if (fieldsetNumberInput) {
|
|
489
|
+
fieldsetNumberInput.addEventListener('keydown', handleNumberKeydown)
|
|
490
|
+
}
|
|
491
|
+
}, 100)
|
|
492
|
+
}
|
|
493
|
+
})
|
|
494
|
+
}
|
|
476
495
|
})
|
|
477
496
|
|
|
478
497
|
onBeforeUnmount(() => {
|
|
479
|
-
|
|
480
|
-
|
|
498
|
+
if (props.displayKey) {
|
|
499
|
+
const numberInput = numberField.value?.$el?.querySelector?.('input')
|
|
500
|
+
if (numberInput) {
|
|
501
|
+
numberInput.removeEventListener('keydown', handleNumberKeydown)
|
|
502
|
+
}
|
|
503
|
+
}
|
|
481
504
|
})
|
|
482
505
|
|
|
483
506
|
// Rendre le composant auto-validable dans un SyForm
|