@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,35 +1,20 @@
|
|
|
1
1
|
import { mount, VueWrapper } from '@vue/test-utils'
|
|
2
2
|
import PhoneField from '../PhoneField.vue'
|
|
3
3
|
import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest'
|
|
4
|
-
import { createVuetify } from 'vuetify'
|
|
5
|
-
import * as components from 'vuetify/components'
|
|
6
|
-
import * as directives from 'vuetify/directives'
|
|
7
4
|
import { indicatifs } from '../indicatifs'
|
|
8
5
|
|
|
9
|
-
const vuetify = createVuetify({
|
|
10
|
-
components,
|
|
11
|
-
directives,
|
|
12
|
-
})
|
|
13
6
|
describe('PhoneField', () => {
|
|
14
7
|
afterEach(() => {
|
|
15
8
|
vi.clearAllMocks()
|
|
16
9
|
document.body.innerHTML = ''
|
|
17
10
|
})
|
|
18
11
|
it('renders correctly with default props', () => {
|
|
19
|
-
const wrapper = mount(PhoneField
|
|
20
|
-
global: {
|
|
21
|
-
plugins: [vuetify],
|
|
22
|
-
},
|
|
23
|
-
})
|
|
12
|
+
const wrapper = mount(PhoneField)
|
|
24
13
|
expect(wrapper.exists()).toBe(true)
|
|
25
14
|
})
|
|
26
15
|
|
|
27
16
|
it('emits update:modelValue and change events on phone input', async () => {
|
|
28
|
-
const wrapper = mount(PhoneField
|
|
29
|
-
global: {
|
|
30
|
-
plugins: [vuetify],
|
|
31
|
-
},
|
|
32
|
-
})
|
|
17
|
+
const wrapper = mount(PhoneField)
|
|
33
18
|
const input = wrapper.find('input')
|
|
34
19
|
await input.setValue('1234567890')
|
|
35
20
|
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
@@ -38,9 +23,6 @@ describe('PhoneField', () => {
|
|
|
38
23
|
|
|
39
24
|
it('cleans spaces from phone number before validation', async () => {
|
|
40
25
|
const wrapper = mount(PhoneField, {
|
|
41
|
-
global: {
|
|
42
|
-
plugins: [vuetify],
|
|
43
|
-
},
|
|
44
26
|
props: {
|
|
45
27
|
required: true,
|
|
46
28
|
modelValue: '01 23 45 67 89',
|
|
@@ -55,9 +37,6 @@ describe('PhoneField', () => {
|
|
|
55
37
|
|
|
56
38
|
it('validates phone number and country code on blur', async () => {
|
|
57
39
|
const wrapper = mount(PhoneField, {
|
|
58
|
-
global: {
|
|
59
|
-
plugins: [vuetify],
|
|
60
|
-
},
|
|
61
40
|
props: {
|
|
62
41
|
required: true,
|
|
63
42
|
modelValue: '',
|
|
@@ -76,9 +55,6 @@ describe('PhoneField', () => {
|
|
|
76
55
|
|
|
77
56
|
it('applies default phone mask correctly', async () => {
|
|
78
57
|
const wrapper = mount(PhoneField, {
|
|
79
|
-
global: {
|
|
80
|
-
plugins: [vuetify],
|
|
81
|
-
},
|
|
82
58
|
props: { modelValue: '0619123456' },
|
|
83
59
|
})
|
|
84
60
|
expect(wrapper.vm.computedValue).toBe('06 19 12 34 56')
|
|
@@ -86,9 +62,6 @@ describe('PhoneField', () => {
|
|
|
86
62
|
|
|
87
63
|
it('renders SySelect when withCountryCode is true', () => {
|
|
88
64
|
const wrapper = mount(PhoneField, {
|
|
89
|
-
global: {
|
|
90
|
-
plugins: [vuetify],
|
|
91
|
-
},
|
|
92
65
|
props: { withCountryCode: true },
|
|
93
66
|
})
|
|
94
67
|
expect(wrapper.findComponent({ name: 'SySelect' }).exists()).toBe(true)
|
|
@@ -96,9 +69,6 @@ describe('PhoneField', () => {
|
|
|
96
69
|
|
|
97
70
|
it('validates country code when countryCodeRequired is true', async () => {
|
|
98
71
|
const wrapper = mount(PhoneField, {
|
|
99
|
-
global: {
|
|
100
|
-
plugins: [vuetify],
|
|
101
|
-
},
|
|
102
72
|
props: {
|
|
103
73
|
withCountryCode: true,
|
|
104
74
|
countryCodeRequired: true,
|
|
@@ -117,9 +87,6 @@ describe('PhoneField', () => {
|
|
|
117
87
|
|
|
118
88
|
it('updates phone mask and counter when dialCode changes', async () => {
|
|
119
89
|
const wrapper = mount(PhoneField, {
|
|
120
|
-
global: {
|
|
121
|
-
plugins: [vuetify],
|
|
122
|
-
},
|
|
123
90
|
props: { withCountryCode: true },
|
|
124
91
|
})
|
|
125
92
|
wrapper.vm.dialCode = { code: '+1', phoneLength: 10, mask: '###-###-####' }
|
|
@@ -130,9 +97,6 @@ describe('PhoneField', () => {
|
|
|
130
97
|
|
|
131
98
|
it('validates phone number with country code on blur', async () => {
|
|
132
99
|
const wrapper = mount(PhoneField, {
|
|
133
|
-
global: {
|
|
134
|
-
plugins: [vuetify],
|
|
135
|
-
},
|
|
136
100
|
props: {
|
|
137
101
|
required: true,
|
|
138
102
|
countryCodeRequired: true,
|
|
@@ -154,9 +118,6 @@ describe('PhoneField', () => {
|
|
|
154
118
|
it('uses only custom indicatifs when useCustomIndicatifsOnly is true', () => {
|
|
155
119
|
const customIndicatifs = [{ code: '+99', abbreviation: 'XX', country: 'Testland', phoneLength: 10 }]
|
|
156
120
|
const wrapper = mount(PhoneField, {
|
|
157
|
-
global: {
|
|
158
|
-
plugins: [vuetify],
|
|
159
|
-
},
|
|
160
121
|
props: {
|
|
161
122
|
useCustomIndicatifsOnly: true,
|
|
162
123
|
customIndicatifs,
|
|
@@ -168,9 +129,6 @@ describe('PhoneField', () => {
|
|
|
168
129
|
|
|
169
130
|
it('validates phone number with valid country code on blur', async () => {
|
|
170
131
|
const wrapper = mount(PhoneField, {
|
|
171
|
-
global: {
|
|
172
|
-
plugins: [vuetify],
|
|
173
|
-
},
|
|
174
132
|
props: {
|
|
175
133
|
required: true,
|
|
176
134
|
countryCodeRequired: true,
|
|
@@ -191,9 +149,6 @@ describe('PhoneField', () => {
|
|
|
191
149
|
|
|
192
150
|
it('renders VTextField with outlined variant when outlined prop is true', () => {
|
|
193
151
|
const wrapper = mount(PhoneField, {
|
|
194
|
-
global: {
|
|
195
|
-
plugins: [vuetify],
|
|
196
|
-
},
|
|
197
152
|
props: {
|
|
198
153
|
outlined: true,
|
|
199
154
|
},
|
|
@@ -205,9 +160,6 @@ describe('PhoneField', () => {
|
|
|
205
160
|
|
|
206
161
|
it('renders VTextField with underlined variant when outlined prop is false', () => {
|
|
207
162
|
const wrapper = mount(PhoneField, {
|
|
208
|
-
global: {
|
|
209
|
-
plugins: [vuetify],
|
|
210
|
-
},
|
|
211
163
|
props: {
|
|
212
164
|
outlined: false,
|
|
213
165
|
},
|
|
@@ -221,9 +173,6 @@ describe('PhoneField', () => {
|
|
|
221
173
|
const dialCodeModelValue = { code: '+33', abbreviation: 'FR', country: 'France', phoneLength: 10, mask: '## ## ## ## ##' }
|
|
222
174
|
|
|
223
175
|
const wrapper = mount(PhoneField, {
|
|
224
|
-
global: {
|
|
225
|
-
plugins: [vuetify],
|
|
226
|
-
},
|
|
227
176
|
props: {
|
|
228
177
|
withCountryCode: true,
|
|
229
178
|
dialCodeModel: dialCodeModelValue,
|
|
@@ -257,9 +206,6 @@ describe('PhoneField', () => {
|
|
|
257
206
|
|
|
258
207
|
it('formats phone number correctly', () => {
|
|
259
208
|
const wrapper = mount(PhoneField, {
|
|
260
|
-
global: {
|
|
261
|
-
plugins: [vuetify],
|
|
262
|
-
},
|
|
263
209
|
props: {
|
|
264
210
|
modelValue: '0123456789',
|
|
265
211
|
},
|
|
@@ -270,9 +216,6 @@ describe('PhoneField', () => {
|
|
|
270
216
|
|
|
271
217
|
it('emits update:selectedDialCode when dialCode changes', async () => {
|
|
272
218
|
const wrapper = mount(PhoneField, {
|
|
273
|
-
global: {
|
|
274
|
-
plugins: [vuetify],
|
|
275
|
-
},
|
|
276
219
|
props: {
|
|
277
220
|
withCountryCode: true,
|
|
278
221
|
},
|
|
@@ -289,9 +232,6 @@ describe('PhoneField', () => {
|
|
|
289
232
|
|
|
290
233
|
it('validates phone number on submit', async () => {
|
|
291
234
|
const wrapper = mount(PhoneField, {
|
|
292
|
-
global: {
|
|
293
|
-
plugins: [vuetify],
|
|
294
|
-
},
|
|
295
235
|
props: {
|
|
296
236
|
required: true,
|
|
297
237
|
modelValue: '',
|
|
@@ -308,9 +248,6 @@ describe('PhoneField', () => {
|
|
|
308
248
|
|
|
309
249
|
it('validates phone number successfully on submit with valid input', async () => {
|
|
310
250
|
const wrapper = mount(PhoneField, {
|
|
311
|
-
global: {
|
|
312
|
-
plugins: [vuetify],
|
|
313
|
-
},
|
|
314
251
|
props: {
|
|
315
252
|
required: true,
|
|
316
253
|
modelValue: '0123456789',
|
|
@@ -324,11 +261,7 @@ describe('PhoneField', () => {
|
|
|
324
261
|
})
|
|
325
262
|
|
|
326
263
|
it('exposes necessary properties and methods', () => {
|
|
327
|
-
const wrapper = mount(PhoneField
|
|
328
|
-
global: {
|
|
329
|
-
plugins: [vuetify],
|
|
330
|
-
},
|
|
331
|
-
})
|
|
264
|
+
const wrapper = mount(PhoneField)
|
|
332
265
|
|
|
333
266
|
expect(wrapper.vm.computedValue).toBeDefined()
|
|
334
267
|
expect(wrapper.vm.dialCode).toBeDefined()
|
|
@@ -343,9 +276,6 @@ describe('PhoneField', () => {
|
|
|
343
276
|
|
|
344
277
|
it('updates validation rules when counter changes', async () => {
|
|
345
278
|
const wrapper = mount(PhoneField, {
|
|
346
|
-
global: {
|
|
347
|
-
plugins: [vuetify],
|
|
348
|
-
},
|
|
349
279
|
props: {
|
|
350
280
|
withCountryCode: true,
|
|
351
281
|
modelValue: '0123456789',
|
|
@@ -362,9 +292,6 @@ describe('PhoneField', () => {
|
|
|
362
292
|
|
|
363
293
|
it('handles disabled state correctly', async () => {
|
|
364
294
|
const wrapper = mount(PhoneField, {
|
|
365
|
-
global: {
|
|
366
|
-
plugins: [vuetify],
|
|
367
|
-
},
|
|
368
295
|
props: {
|
|
369
296
|
disabled: true,
|
|
370
297
|
withCountryCode: true,
|
|
@@ -380,9 +307,6 @@ describe('PhoneField', () => {
|
|
|
380
307
|
|
|
381
308
|
it('handles readonly state correctly', async () => {
|
|
382
309
|
const wrapper = mount(PhoneField, {
|
|
383
|
-
global: {
|
|
384
|
-
plugins: [vuetify],
|
|
385
|
-
},
|
|
386
310
|
props: {
|
|
387
311
|
readonly: true,
|
|
388
312
|
withCountryCode: true,
|
|
@@ -398,9 +322,6 @@ describe('PhoneField', () => {
|
|
|
398
322
|
|
|
399
323
|
it('verifies SyTextField and SySelect props are correctly passed', async () => {
|
|
400
324
|
const wrapper = mount(PhoneField, {
|
|
401
|
-
global: {
|
|
402
|
-
plugins: [vuetify],
|
|
403
|
-
},
|
|
404
325
|
props: {
|
|
405
326
|
withCountryCode: true,
|
|
406
327
|
dialCodeModel: { code: '+33', abbreviation: 'FR', country: 'France', phoneLength: 10, mask: '## ## ## ## ##' },
|
|
@@ -424,9 +345,6 @@ describe('PhoneField', () => {
|
|
|
424
345
|
|
|
425
346
|
it('updates dialCode when dialCodeModel changes after mount', async () => {
|
|
426
347
|
const wrapper = mount(PhoneField, {
|
|
427
|
-
global: {
|
|
428
|
-
plugins: [vuetify],
|
|
429
|
-
},
|
|
430
348
|
props: {
|
|
431
349
|
withCountryCode: true,
|
|
432
350
|
},
|
|
@@ -469,9 +387,6 @@ describe('PhoneField', () => {
|
|
|
469
387
|
}
|
|
470
388
|
|
|
471
389
|
const wrapper = mount(PhoneField, {
|
|
472
|
-
global: {
|
|
473
|
-
plugins: [vuetify],
|
|
474
|
-
},
|
|
475
390
|
props: {
|
|
476
391
|
withCountryCode: true,
|
|
477
392
|
dialCodeModel: indicatifSansDisplayText,
|
|
@@ -502,9 +417,6 @@ describe('PhoneField', () => {
|
|
|
502
417
|
|
|
503
418
|
it('should display helpText below by default when helpText is provided', async () => {
|
|
504
419
|
const wrapper = mount(PhoneField, {
|
|
505
|
-
global: {
|
|
506
|
-
plugins: [vuetify],
|
|
507
|
-
},
|
|
508
420
|
props: {
|
|
509
421
|
modelValue: '',
|
|
510
422
|
required: true,
|
|
@@ -523,9 +435,6 @@ describe('PhoneField', () => {
|
|
|
523
435
|
|
|
524
436
|
it('should display helpText below even when field has valid value', async () => {
|
|
525
437
|
const wrapper = mount(PhoneField, {
|
|
526
|
-
global: {
|
|
527
|
-
plugins: [vuetify],
|
|
528
|
-
},
|
|
529
438
|
props: {
|
|
530
439
|
modelValue: '01 23 45 67 89',
|
|
531
440
|
required: true,
|
|
@@ -543,9 +452,6 @@ describe('PhoneField', () => {
|
|
|
543
452
|
|
|
544
453
|
it('should not display helpText below when helpText is not provided', async () => {
|
|
545
454
|
const wrapper = mount(PhoneField, {
|
|
546
|
-
global: {
|
|
547
|
-
plugins: [vuetify],
|
|
548
|
-
},
|
|
549
455
|
props: {
|
|
550
456
|
modelValue: '',
|
|
551
457
|
required: true,
|
|
@@ -565,9 +471,6 @@ describe('PhoneField', () => {
|
|
|
565
471
|
|
|
566
472
|
it('should apply default autocomplete attributes correctly', async () => {
|
|
567
473
|
const wrapper = mount(PhoneField, {
|
|
568
|
-
global: {
|
|
569
|
-
plugins: [vuetify],
|
|
570
|
-
},
|
|
571
474
|
props: {
|
|
572
475
|
modelValue: '',
|
|
573
476
|
withCountryCode: true,
|
|
@@ -587,9 +490,6 @@ describe('PhoneField', () => {
|
|
|
587
490
|
|
|
588
491
|
it('should apply custom autocomplete attributes when provided', async () => {
|
|
589
492
|
const wrapper = mount(PhoneField, {
|
|
590
|
-
global: {
|
|
591
|
-
plugins: [vuetify],
|
|
592
|
-
},
|
|
593
493
|
props: {
|
|
594
494
|
modelValue: '',
|
|
595
495
|
withCountryCode: true,
|
|
@@ -611,9 +511,6 @@ describe('PhoneField', () => {
|
|
|
611
511
|
|
|
612
512
|
it('should verify autocomplete attributes are present in the actual DOM', async () => {
|
|
613
513
|
const wrapper = mount(PhoneField, {
|
|
614
|
-
global: {
|
|
615
|
-
plugins: [vuetify],
|
|
616
|
-
},
|
|
617
514
|
props: {
|
|
618
515
|
modelValue: '',
|
|
619
516
|
withCountryCode: true,
|
|
@@ -639,9 +536,6 @@ describe('PhoneField', () => {
|
|
|
639
536
|
|
|
640
537
|
it('should apply autocomplete to phone field only when no country code', async () => {
|
|
641
538
|
const wrapper = mount(PhoneField, {
|
|
642
|
-
global: {
|
|
643
|
-
plugins: [vuetify],
|
|
644
|
-
},
|
|
645
539
|
props: {
|
|
646
540
|
modelValue: '',
|
|
647
541
|
withCountryCode: false,
|
|
@@ -665,9 +559,6 @@ describe('PhoneField', () => {
|
|
|
665
559
|
expect(franceIndicatif).toBeDefined()
|
|
666
560
|
|
|
667
561
|
const wrapper = mount(PhoneField, {
|
|
668
|
-
global: {
|
|
669
|
-
plugins: [vuetify],
|
|
670
|
-
},
|
|
671
562
|
props: {
|
|
672
563
|
withCountryCode: true,
|
|
673
564
|
dialCodeModel: franceIndicatif,
|
|
@@ -698,9 +589,6 @@ describe('PhoneField', () => {
|
|
|
698
589
|
|
|
699
590
|
it('disables error handling when readonly is true', async () => {
|
|
700
591
|
const wrapper = mount(PhoneField, {
|
|
701
|
-
global: {
|
|
702
|
-
plugins: [vuetify],
|
|
703
|
-
},
|
|
704
592
|
props: {
|
|
705
593
|
required: true,
|
|
706
594
|
modelValue: '',
|
|
@@ -716,9 +604,6 @@ describe('PhoneField', () => {
|
|
|
716
604
|
|
|
717
605
|
expect(wrapper.vm.hasError).toBe(false)
|
|
718
606
|
const wrapperNotReadonly = mount(PhoneField, {
|
|
719
|
-
global: {
|
|
720
|
-
plugins: [vuetify],
|
|
721
|
-
},
|
|
722
607
|
props: {
|
|
723
608
|
required: true,
|
|
724
609
|
modelValue: '',
|
|
@@ -739,9 +624,6 @@ describe('PhoneField', () => {
|
|
|
739
624
|
|
|
740
625
|
beforeEach(() => {
|
|
741
626
|
wrapper = mount(PhoneField, {
|
|
742
|
-
global: {
|
|
743
|
-
plugins: [vuetify],
|
|
744
|
-
},
|
|
745
627
|
props: {
|
|
746
628
|
withCountryCode: true,
|
|
747
629
|
displayFormat: 'code',
|
|
@@ -793,9 +675,6 @@ describe('PhoneField', () => {
|
|
|
793
675
|
it('initializes with a default dialCode object', async () => {
|
|
794
676
|
const defaultDialCode = { code: '+44', abbreviation: 'UK', country: 'United Kingdom', phoneLength: 11, mask: '#### ### ####' }
|
|
795
677
|
const wrapper = mount(PhoneField, {
|
|
796
|
-
global: {
|
|
797
|
-
plugins: [vuetify],
|
|
798
|
-
},
|
|
799
678
|
props: {
|
|
800
679
|
withCountryCode: true,
|
|
801
680
|
dialCodeModel: defaultDialCode,
|
|
@@ -816,9 +695,6 @@ describe('PhoneField', () => {
|
|
|
816
695
|
|
|
817
696
|
it('initializes with a default dialCode string', async () => {
|
|
818
697
|
const wrapper = mount(PhoneField, {
|
|
819
|
-
global: {
|
|
820
|
-
plugins: [vuetify],
|
|
821
|
-
},
|
|
822
698
|
props: {
|
|
823
699
|
withCountryCode: true,
|
|
824
700
|
dialCodeModel: '+33',
|
|
@@ -836,9 +712,6 @@ describe('PhoneField', () => {
|
|
|
836
712
|
describe('Error handling', () => {
|
|
837
713
|
it('displays error messages by default when validation fails', async () => {
|
|
838
714
|
const wrapper = mount(PhoneField, {
|
|
839
|
-
global: {
|
|
840
|
-
plugins: [vuetify],
|
|
841
|
-
},
|
|
842
715
|
props: {
|
|
843
716
|
required: true,
|
|
844
717
|
modelValue: '',
|
|
@@ -861,9 +734,6 @@ describe('PhoneField', () => {
|
|
|
861
734
|
|
|
862
735
|
it('initializes with disableErrorHandling prop', async () => {
|
|
863
736
|
const wrapper = mount(PhoneField, {
|
|
864
|
-
global: {
|
|
865
|
-
plugins: [vuetify],
|
|
866
|
-
},
|
|
867
737
|
props: {
|
|
868
738
|
required: true,
|
|
869
739
|
modelValue: '',
|
|
@@ -882,9 +752,6 @@ describe('PhoneField', () => {
|
|
|
882
752
|
describe('Form validation', () => {
|
|
883
753
|
it('validates as part of a form submission', async () => {
|
|
884
754
|
const wrapper = mount(PhoneField, {
|
|
885
|
-
global: {
|
|
886
|
-
plugins: [vuetify],
|
|
887
|
-
},
|
|
888
755
|
props: {
|
|
889
756
|
required: true,
|
|
890
757
|
modelValue: '',
|
|
@@ -903,9 +770,6 @@ describe('PhoneField', () => {
|
|
|
903
770
|
|
|
904
771
|
it('validates country code as part of form submission', async () => {
|
|
905
772
|
const wrapper = mount(PhoneField, {
|
|
906
|
-
global: {
|
|
907
|
-
plugins: [vuetify],
|
|
908
|
-
},
|
|
909
773
|
props: {
|
|
910
774
|
required: true,
|
|
911
775
|
modelValue: '0123456789',
|
|
@@ -932,9 +796,6 @@ describe('PhoneField', () => {
|
|
|
932
796
|
it('merges custom indicatifs with standard ones by default', () => {
|
|
933
797
|
const customIndicatifs = [{ code: '+999', abbreviation: 'XX', country: 'Test Country', phoneLength: 8, mask: '## ## ## ##' }]
|
|
934
798
|
const wrapper = mount(PhoneField, {
|
|
935
|
-
global: {
|
|
936
|
-
plugins: [vuetify],
|
|
937
|
-
},
|
|
938
799
|
props: {
|
|
939
800
|
customIndicatifs,
|
|
940
801
|
withCountryCode: true,
|
|
@@ -949,9 +810,6 @@ describe('PhoneField', () => {
|
|
|
949
810
|
it('uses only custom indicatifs when useCustomIndicatifsOnly is true', () => {
|
|
950
811
|
const customIndicatifs = [{ code: '+999', abbreviation: 'XX', country: 'Test Country', phoneLength: 8, mask: '## ## ## ##' }]
|
|
951
812
|
const wrapper = mount(PhoneField, {
|
|
952
|
-
global: {
|
|
953
|
-
plugins: [vuetify],
|
|
954
|
-
},
|
|
955
813
|
props: {
|
|
956
814
|
customIndicatifs,
|
|
957
815
|
useCustomIndicatifsOnly: true,
|
|
@@ -967,9 +825,6 @@ describe('PhoneField', () => {
|
|
|
967
825
|
it('updates phone mask and counter based on selected custom indicatif', async () => {
|
|
968
826
|
const customIndicatifs = [{ code: '+999', abbreviation: 'XX', country: 'Test Country', phoneLength: 8, mask: '## ## ## ##' }]
|
|
969
827
|
const wrapper = mount(PhoneField, {
|
|
970
|
-
global: {
|
|
971
|
-
plugins: [vuetify],
|
|
972
|
-
},
|
|
973
828
|
props: {
|
|
974
829
|
customIndicatifs,
|
|
975
830
|
withCountryCode: true,
|
|
@@ -989,9 +844,6 @@ describe('PhoneField', () => {
|
|
|
989
844
|
describe('Fieldset rendering', () => {
|
|
990
845
|
it('renders with fieldset and legend by default', () => {
|
|
991
846
|
const wrapper = mount(PhoneField, {
|
|
992
|
-
global: {
|
|
993
|
-
plugins: [vuetify],
|
|
994
|
-
},
|
|
995
847
|
props: {
|
|
996
848
|
// withoutFieldset par défaut est false
|
|
997
849
|
},
|
|
@@ -1010,9 +862,6 @@ describe('PhoneField', () => {
|
|
|
1010
862
|
|
|
1011
863
|
it('renders without fieldset and legend when withoutFieldset is true', () => {
|
|
1012
864
|
const wrapper = mount(PhoneField, {
|
|
1013
|
-
global: {
|
|
1014
|
-
plugins: [vuetify],
|
|
1015
|
-
},
|
|
1016
865
|
props: {
|
|
1017
866
|
withoutFieldset: true,
|
|
1018
867
|
},
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { describe, expect, it, vi } from 'vitest'
|
|
2
2
|
import { mount } from '@vue/test-utils'
|
|
3
|
-
import { vuetify } from '@tests/unit/setup'
|
|
4
3
|
import RangeSlider from '../RangeSlider.vue'
|
|
5
4
|
|
|
6
5
|
describe('RangeField component', () => {
|
|
7
6
|
it('should render the component', () => {
|
|
8
7
|
const wrapper = mount(RangeSlider, {
|
|
9
|
-
global: {
|
|
10
|
-
plugins: [vuetify],
|
|
11
|
-
},
|
|
12
8
|
props: {
|
|
13
9
|
min: 0,
|
|
14
10
|
max: 100,
|
|
@@ -31,9 +27,6 @@ describe('RangeField component', () => {
|
|
|
31
27
|
|
|
32
28
|
it('should update the model value on thumb drag', async () => {
|
|
33
29
|
const wrapper = mount(RangeSlider, {
|
|
34
|
-
global: {
|
|
35
|
-
plugins: [vuetify],
|
|
36
|
-
},
|
|
37
30
|
props: {
|
|
38
31
|
min: 0,
|
|
39
32
|
max: 100,
|
|
@@ -50,9 +43,6 @@ describe('RangeField component', () => {
|
|
|
50
43
|
|
|
51
44
|
it('should update the range when the modelValue is updated', async () => {
|
|
52
45
|
const wrapper = mount(RangeSlider, {
|
|
53
|
-
global: {
|
|
54
|
-
plugins: [vuetify],
|
|
55
|
-
},
|
|
56
46
|
props: {
|
|
57
47
|
min: 0,
|
|
58
48
|
max: 100,
|
|
@@ -75,9 +65,6 @@ describe('RangeField component', () => {
|
|
|
75
65
|
|
|
76
66
|
it('emit an event when the track is clicked', async () => {
|
|
77
67
|
const wrapper = mount(RangeSlider, {
|
|
78
|
-
global: {
|
|
79
|
-
plugins: [vuetify],
|
|
80
|
-
},
|
|
81
68
|
props: {
|
|
82
69
|
min: 0,
|
|
83
70
|
max: 100,
|
|
@@ -2,7 +2,6 @@ import { defineComponent, ref, type Ref } from 'vue'
|
|
|
2
2
|
import useThumbKeyboard from '../useThumbKeyboard'
|
|
3
3
|
import { describe, expect, it, vi, afterEach } from 'vitest'
|
|
4
4
|
import { mount } from '@vue/test-utils'
|
|
5
|
-
import { vuetify } from '@tests/unit/setup'
|
|
6
5
|
|
|
7
6
|
describe('useThumbKeyboard', () => {
|
|
8
7
|
let setValue = vi.fn()
|
|
@@ -36,9 +35,6 @@ describe('useThumbKeyboard', () => {
|
|
|
36
35
|
|
|
37
36
|
it('should handle ArrowLeft key', async () => {
|
|
38
37
|
const wrapper = mount(TestComponent, {
|
|
39
|
-
global: {
|
|
40
|
-
plugins: [vuetify],
|
|
41
|
-
},
|
|
42
38
|
props: {
|
|
43
39
|
step: 5,
|
|
44
40
|
},
|
|
@@ -54,9 +50,6 @@ describe('useThumbKeyboard', () => {
|
|
|
54
50
|
|
|
55
51
|
it('should handle ArrowDown key', async () => {
|
|
56
52
|
const wrapper = mount(TestComponent, {
|
|
57
|
-
global: {
|
|
58
|
-
plugins: [vuetify],
|
|
59
|
-
},
|
|
60
53
|
props: {
|
|
61
54
|
step: 5,
|
|
62
55
|
},
|
|
@@ -72,9 +65,6 @@ describe('useThumbKeyboard', () => {
|
|
|
72
65
|
|
|
73
66
|
it('should handle ArrowRight key', async () => {
|
|
74
67
|
const wrapper = mount(TestComponent, {
|
|
75
|
-
global: {
|
|
76
|
-
plugins: [vuetify],
|
|
77
|
-
},
|
|
78
68
|
props: {
|
|
79
69
|
step: 5,
|
|
80
70
|
},
|
|
@@ -90,9 +80,6 @@ describe('useThumbKeyboard', () => {
|
|
|
90
80
|
|
|
91
81
|
it('should handle ArrowUp key', async () => {
|
|
92
82
|
const wrapper = mount(TestComponent, {
|
|
93
|
-
global: {
|
|
94
|
-
plugins: [vuetify],
|
|
95
|
-
},
|
|
96
83
|
props: {
|
|
97
84
|
step: 5,
|
|
98
85
|
},
|
|
@@ -108,9 +95,6 @@ describe('useThumbKeyboard', () => {
|
|
|
108
95
|
|
|
109
96
|
it('should set a value that is a multiple of the step', async () => {
|
|
110
97
|
const wrapper = mount(TestComponent, {
|
|
111
|
-
global: {
|
|
112
|
-
plugins: [vuetify],
|
|
113
|
-
},
|
|
114
98
|
props: {
|
|
115
99
|
step: 6,
|
|
116
100
|
},
|
|
@@ -125,9 +109,6 @@ describe('useThumbKeyboard', () => {
|
|
|
125
109
|
|
|
126
110
|
it('should handle Home key', async () => {
|
|
127
111
|
const wrapper = mount(TestComponent, {
|
|
128
|
-
global: {
|
|
129
|
-
plugins: [vuetify],
|
|
130
|
-
},
|
|
131
112
|
props: {
|
|
132
113
|
step: 9,
|
|
133
114
|
},
|
|
@@ -143,9 +124,6 @@ describe('useThumbKeyboard', () => {
|
|
|
143
124
|
|
|
144
125
|
it('should handle End key', async () => {
|
|
145
126
|
const wrapper = mount(TestComponent, {
|
|
146
|
-
global: {
|
|
147
|
-
plugins: [vuetify],
|
|
148
|
-
},
|
|
149
127
|
props: {
|
|
150
128
|
step: 9,
|
|
151
129
|
},
|
|
@@ -161,9 +139,6 @@ describe('useThumbKeyboard', () => {
|
|
|
161
139
|
|
|
162
140
|
it('should handle PageDown key', async () => {
|
|
163
141
|
const wrapper = mount(TestComponent, {
|
|
164
|
-
global: {
|
|
165
|
-
plugins: [vuetify],
|
|
166
|
-
},
|
|
167
142
|
props: {
|
|
168
143
|
step: 2,
|
|
169
144
|
},
|
|
@@ -179,9 +154,6 @@ describe('useThumbKeyboard', () => {
|
|
|
179
154
|
|
|
180
155
|
it('should handle PageUp key', async () => {
|
|
181
156
|
const wrapper = mount(TestComponent, {
|
|
182
|
-
global: {
|
|
183
|
-
plugins: [vuetify],
|
|
184
|
-
},
|
|
185
157
|
props: {
|
|
186
158
|
step: 2,
|
|
187
159
|
},
|
|
@@ -197,9 +169,6 @@ describe('useThumbKeyboard', () => {
|
|
|
197
169
|
|
|
198
170
|
it('should handle PageDown key with overflow', async () => {
|
|
199
171
|
const wrapper = mount(TestComponent, {
|
|
200
|
-
global: {
|
|
201
|
-
plugins: [vuetify],
|
|
202
|
-
},
|
|
203
172
|
props: {
|
|
204
173
|
step: 9,
|
|
205
174
|
},
|
|
@@ -215,9 +184,6 @@ describe('useThumbKeyboard', () => {
|
|
|
215
184
|
|
|
216
185
|
it('should handle PageUp key with overflow', async () => {
|
|
217
186
|
const wrapper = mount(TestComponent, {
|
|
218
|
-
global: {
|
|
219
|
-
plugins: [vuetify],
|
|
220
|
-
},
|
|
221
187
|
props: {
|
|
222
188
|
step: 9,
|
|
223
189
|
},
|
|
@@ -3,7 +3,6 @@ import { defineComponent, onMounted, ref, toRef, type Ref } from 'vue'
|
|
|
3
3
|
import useTrack from '../useTrack'
|
|
4
4
|
import { describe, expect, it, vi } from 'vitest'
|
|
5
5
|
import { mount } from '@vue/test-utils'
|
|
6
|
-
import { vuetify } from '@tests/unit/setup'
|
|
7
6
|
|
|
8
7
|
describe('useTrack', () => {
|
|
9
8
|
it('should return the track object', async () => {
|
|
@@ -40,11 +39,7 @@ describe('useTrack', () => {
|
|
|
40
39
|
</div>`,
|
|
41
40
|
})
|
|
42
41
|
|
|
43
|
-
const wrapper = mount(TestElement
|
|
44
|
-
global: {
|
|
45
|
-
plugins: [vuetify],
|
|
46
|
-
},
|
|
47
|
-
})
|
|
42
|
+
const wrapper = mount(TestElement)
|
|
48
43
|
|
|
49
44
|
await wrapper.find('div.track').trigger('click', {
|
|
50
45
|
clientX: 30,
|
|
@@ -105,11 +100,7 @@ describe('useTrack', () => {
|
|
|
105
100
|
</div>`,
|
|
106
101
|
})
|
|
107
102
|
|
|
108
|
-
const wrapper = mount(TestElement
|
|
109
|
-
global: {
|
|
110
|
-
plugins: [vuetify],
|
|
111
|
-
},
|
|
112
|
-
})
|
|
103
|
+
const wrapper = mount(TestElement)
|
|
113
104
|
|
|
114
105
|
await wrapper.find('div.track').trigger('click', {
|
|
115
106
|
clientX: 33,
|
|
@@ -160,11 +151,7 @@ describe('useTrack', () => {
|
|
|
160
151
|
</div>`,
|
|
161
152
|
})
|
|
162
153
|
|
|
163
|
-
const wrapper = mount(TestElement
|
|
164
|
-
global: {
|
|
165
|
-
plugins: [vuetify],
|
|
166
|
-
},
|
|
167
|
-
})
|
|
154
|
+
const wrapper = mount(TestElement)
|
|
168
155
|
|
|
169
156
|
await wrapper.find('div.track').trigger('click', {
|
|
170
157
|
clientX: 121,
|
|
@@ -224,9 +211,6 @@ describe('useTrack', () => {
|
|
|
224
211
|
})
|
|
225
212
|
|
|
226
213
|
const wrapper = mount(TestElement, {
|
|
227
|
-
global: {
|
|
228
|
-
plugins: [vuetify],
|
|
229
|
-
},
|
|
230
214
|
props: {
|
|
231
215
|
disable: true,
|
|
232
216
|
},
|
|
@@ -291,11 +275,7 @@ describe('useTrack', () => {
|
|
|
291
275
|
</div>`,
|
|
292
276
|
})
|
|
293
277
|
|
|
294
|
-
const wrapper = mount(TestElement
|
|
295
|
-
global: {
|
|
296
|
-
plugins: [vuetify],
|
|
297
|
-
},
|
|
298
|
-
})
|
|
278
|
+
const wrapper = mount(TestElement)
|
|
299
279
|
|
|
300
280
|
await wrapper.find('div.track').trigger('click', {
|
|
301
281
|
clientX: 90,
|