@cnamts/synapse 0.0.10-alpha → 0.0.12-alpha
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/design-system-v3.js +5081 -3916
- package/dist/design-system-v3.umd.cjs +1 -1
- package/dist/src/components/Amelipro/types/languages.d.ts +6 -0
- package/dist/src/components/Amelipro/types/types.d.ts +65 -0
- package/dist/src/components/BackBtn/AccessibiliteItems.d.ts +29 -0
- package/dist/src/components/BackBtn/BackBtn.d.ts +14 -0
- package/dist/src/components/BackBtn/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/BackBtn/locales.d.ts +3 -0
- package/dist/src/components/BackBtn/tests/BackBtn.spec.d.ts +1 -0
- package/dist/src/components/BackToTopBtn/AccessibiliteItems.d.ts +29 -0
- package/dist/src/components/BackToTopBtn/BackToTopBtn.d.ts +23 -0
- package/dist/src/components/BackToTopBtn/config.d.ts +12 -0
- package/dist/src/components/BackToTopBtn/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/BackToTopBtn/locales.d.ts +3 -0
- package/dist/src/components/BackToTopBtn/tests/BackToTopBtn.spec.d.ts +1 -0
- package/dist/src/components/ChipList/AccessibiliteItems.d.ts +29 -0
- package/dist/src/components/ChipList/ChipList.d.ts +47 -0
- package/dist/src/components/ChipList/config.d.ts +8 -0
- package/dist/src/components/ChipList/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/ChipList/locales.d.ts +6 -0
- package/dist/src/components/ChipList/tests/chipList.spec.d.ts +1 -0
- package/dist/src/components/ChipList/types.d.ts +6 -0
- package/dist/src/components/CollapsibleList/AccessibiliteItems.d.ts +46 -0
- package/dist/src/components/CollapsibleList/CollapsibleList.d.ts +7 -0
- package/dist/src/components/CollapsibleList/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/CollapsibleList/tests/CollapsibleList.spec.d.ts +1 -0
- package/dist/src/components/CollapsibleList/types.d.ts +5 -0
- package/dist/src/components/ContextualMenu/AccessibiliteItems.d.ts +46 -0
- package/dist/src/components/ContextualMenu/ContextualMenu.d.ts +13 -0
- package/dist/src/components/ContextualMenu/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/ContextualMenu/tests/ContextualMenu.spec.d.ts +1 -0
- package/dist/src/components/ContextualMenu/types.d.ts +5 -0
- package/dist/src/components/CookieBanner/AccessibiliteItems.d.ts +79 -0
- package/dist/src/components/CookieBanner/CookieBanner.d.ts +28 -0
- package/dist/src/components/CookieBanner/config.d.ts +40 -0
- package/dist/src/components/CookieBanner/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/CookieBanner/locales.d.ts +11 -0
- package/dist/src/components/CookieBanner/tests/CookieBanner.spec.d.ts +1 -0
- package/dist/src/components/CookiesSelection/CookiesInformation/CookiesInformation.d.ts +19 -0
- package/dist/src/components/CookiesSelection/CookiesInformation/locales.d.ts +19 -0
- package/dist/src/components/CookiesSelection/CookiesInformation/tests/CookiesInformation.spec.d.ts +1 -0
- package/dist/src/components/CookiesSelection/CookiesTable/CookiesTable.d.ts +13 -0
- package/dist/src/components/CookiesSelection/CookiesTable/headers.d.ts +10 -0
- package/dist/src/components/CookiesSelection/CookiesTable/tests/CookiesTable.spec.d.ts +1 -0
- package/dist/src/components/CookiesSelection/locales.d.ts +8 -0
- package/dist/src/components/CookiesSelection/tests/CookiesSelection.spec.d.ts +1 -0
- package/dist/src/components/CookiesSelection/types.d.ts +12 -0
- package/dist/src/components/CopyBtn/AccessibiliteItems.d.ts +29 -0
- package/dist/src/components/CopyBtn/CopyBtn.d.ts +28 -0
- package/dist/src/components/CopyBtn/config.d.ts +17 -0
- package/dist/src/components/CopyBtn/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/CopyBtn/locales.d.ts +3 -0
- package/dist/src/components/CopyBtn/tests/CopyBtn.spec.d.ts +1 -0
- package/dist/src/components/Customs/SyBtnSelect/AccessibiliteItems.d.ts +29 -0
- package/dist/src/components/Customs/SyBtnSelect/SyBtnSelect.d.ts +164 -0
- package/dist/src/components/Customs/SyBtnSelect/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/Customs/SyBtnSelect/tests/SyBtnSelect.spec.d.ts +1 -0
- package/dist/src/components/Customs/SyInputSelect/AccessibiliteItems.d.ts +29 -0
- package/dist/src/components/Customs/SyInputSelect/SyInputSelect.d.ts +38 -0
- package/dist/src/components/Customs/SyInputSelect/config.d.ts +9 -0
- package/dist/src/components/Customs/SyInputSelect/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/Customs/SyInputSelect/tests/SyInputSelect.spec.d.ts +1 -0
- package/dist/src/components/Customs/SySelect/AccessibiliteItems.d.ts +54 -0
- package/dist/src/components/Customs/SySelect/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/Customs/SySelect/tests/SySelect.spec.d.ts +1 -0
- package/dist/src/components/Customs/SyTextField/AccessibiliteItems.d.ts +70 -0
- package/dist/src/components/Customs/SyTextField/SyTextField.d.ts +166 -0
- package/dist/src/components/Customs/SyTextField/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/Customs/SyTextField/tests/SyTextField.spec.d.ts +1 -0
- package/dist/src/components/Customs/SyTextField/types.d.ts +4 -0
- package/dist/src/components/DataList/AccessibiliteItems.d.ts +29 -0
- package/dist/src/components/DataList/DataList.d.ts +134 -0
- package/dist/src/components/DataList/DataListLoading/DataListLoading.d.ts +32 -0
- package/dist/src/components/DataList/DataListLoading/tests/DataListLoading.spec.d.ts +1 -0
- package/dist/src/components/DataList/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/DataList/locales.d.ts +3 -0
- package/dist/src/components/DataList/tests/DataList.spec.d.ts +1 -0
- package/dist/src/components/DataList/types.d.ts +22 -0
- package/dist/src/components/DataListGroup/AccessibiliteItems.d.ts +29 -0
- package/dist/src/components/DataListGroup/DataListGroup.d.ts +56 -0
- package/dist/src/components/DataListGroup/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/DataListGroup/tests/DataListGroup.spec.d.ts +1 -0
- package/dist/src/components/DataListGroup/tests/data/dataListGroupItems.d.ts +5 -0
- package/dist/src/components/DataListGroup/types.d.ts +14 -0
- package/dist/src/components/DataListItem/DataListItem.d.ts +37 -0
- package/dist/src/components/DataListItem/config.d.ts +16 -0
- package/dist/src/components/DataListItem/locales.d.ts +3 -0
- package/dist/src/components/DataListItem/tests/DataListItem.spec.d.ts +1 -0
- package/dist/src/components/DataListItem/types.d.ts +22 -0
- package/dist/src/components/DatePicker/AccessibiliteItems.d.ts +54 -0
- package/dist/src/components/DatePicker/DatePicker.d.ts +605 -0
- package/dist/src/components/DatePicker/DateTextInput.d.ts +473 -0
- package/dist/src/components/DatePicker/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/DatePicker/tests/DatePicker.spec.d.ts +1 -0
- package/dist/src/components/DatePicker/tests/DateTextInput.spec.d.ts +1 -0
- package/dist/src/components/DialogBox/AccessibiliteItems.d.ts +54 -0
- package/dist/src/components/DialogBox/config.d.ts +25 -0
- package/dist/src/components/DialogBox/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/DialogBox/locales.d.ts +5 -0
- package/dist/src/components/DialogBox/tests/DialogBox.spec.d.ts +1 -0
- package/dist/src/components/DownloadBtn/AccessibiliteItems.d.ts +29 -0
- package/dist/src/components/DownloadBtn/DownloadBtn.d.ts +39 -0
- package/dist/src/components/DownloadBtn/config.d.ts +13 -0
- package/dist/src/components/DownloadBtn/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/DownloadBtn/tests/DownloadBtn.spec.d.ts +1 -0
- package/dist/src/components/DownloadBtn/tests/data/filePromise.d.ts +5 -0
- package/dist/src/components/ErrorPage/AccessibiliteItems.d.ts +65 -0
- package/dist/src/components/ErrorPage/ErrorPage.d.ts +31 -0
- package/dist/src/components/ErrorPage/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/ErrorPage/locales.d.ts +5 -0
- package/dist/src/components/ErrorPage/tests/ErrorPage.spec.d.ts +1 -0
- package/dist/src/components/ExternalLinks/AccessibiliteItems.d.ts +55 -0
- package/dist/src/components/ExternalLinks/ExternalLinks.d.ts +31 -0
- package/dist/src/components/ExternalLinks/config.d.ts +32 -0
- package/dist/src/components/ExternalLinks/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/ExternalLinks/locales.d.ts +4 -0
- package/dist/src/components/ExternalLinks/tests/ExternalLinks.spec.d.ts +1 -0
- package/dist/src/components/FileList/AccessibiliteItems.d.ts +29 -0
- package/dist/src/components/FileList/FileList.d.ts +45 -0
- package/dist/src/components/FileList/UploadItem/UploadItem.d.ts +58 -0
- package/dist/src/components/FileList/UploadItem/locales.d.ts +9 -0
- package/dist/src/components/FileList/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/FileList/tests/FileList.spec.d.ts +1 -0
- package/dist/src/components/FilePreview/AccessibiliteItems.d.ts +16 -0
- package/dist/src/components/FilePreview/FilePreview.d.ts +28 -0
- package/dist/src/components/FilePreview/config.d.ts +9 -0
- package/dist/src/components/FilePreview/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/FilePreview/locales.d.ts +4 -0
- package/dist/src/components/FilePreview/tests/FilePreview.spec.d.ts +1 -0
- package/dist/src/components/FileUpload/AccessibiliteItems.d.ts +16 -0
- package/dist/src/components/FileUpload/FileUpload.d.ts +49 -0
- package/dist/src/components/FileUpload/FileUploadContent.d.ts +20 -0
- package/dist/src/components/FileUpload/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/FileUpload/locales.d.ts +9 -0
- package/dist/src/components/FileUpload/tests/FileUpload.spec.d.ts +1 -0
- package/dist/src/components/FileUpload/useFileDrop.d.ts +2 -0
- package/dist/src/components/FileUpload/validateFiles.d.ts +4 -0
- package/dist/src/components/FilterInline/FilterInline.d.ts +28 -0
- package/dist/src/components/FilterInline/locales.d.ts +3 -0
- package/dist/src/components/FilterInline/tests/FilterInline.spec.d.ts +1 -0
- package/dist/src/components/FilterSideBar/FilterSideBar.d.ts +31 -0
- package/dist/src/components/FilterSideBar/locales.d.ts +7 -0
- package/dist/src/components/FilterSideBar/tests/FilterSideBar.spec.d.ts +1 -0
- package/dist/src/components/FooterBar/A11yCompliance.d.ts +3 -0
- package/dist/src/components/FooterBar/AccessibiliteItems.d.ts +110 -0
- package/dist/src/components/FooterBar/FooterBar.d.ts +57 -0
- package/dist/src/components/FooterBar/config.d.ts +18 -0
- package/dist/src/components/FooterBar/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/FooterBar/defaultSocialMediaLinks.d.ts +2 -0
- package/dist/src/components/FooterBar/locales.d.ts +11 -0
- package/dist/src/components/FooterBar/tests/FooterBar.spec.d.ts +1 -0
- package/dist/src/components/FooterBar/tests/FooterBarConfig.spec.d.ts +1 -0
- package/dist/src/components/FooterBar/types.d.ts +9 -0
- package/dist/src/components/FranceConnectBtn/AccessibiliteItems.d.ts +45 -0
- package/dist/src/components/FranceConnectBtn/FranceConnectBtn.d.ts +10 -0
- package/dist/src/components/FranceConnectBtn/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/FranceConnectBtn/locales.d.ts +4 -0
- package/dist/src/components/FranceConnectBtn/tests/FranceConnectBtn.spec.d.ts +1 -0
- package/dist/src/components/HeaderBar/AccessibiliteItems.d.ts +91 -0
- package/dist/src/components/HeaderBar/HeaderBar.d.ts +67 -0
- package/dist/src/components/HeaderBar/HeaderBurgerMenu/AccessibiliteItems.d.ts +77 -0
- package/dist/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.d.ts +67 -0
- package/dist/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.d.ts +9 -0
- package/dist/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/tests/HeaderMenuItem.spec.d.ts +1 -0
- package/dist/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.d.ts +13 -0
- package/dist/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/tests/HeaderMenuSection.spec.d.ts +1 -0
- package/dist/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.d.ts +10 -0
- package/dist/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/tests/HeaderSubMenu.spec.d.ts +1 -0
- package/dist/src/components/HeaderBar/HeaderBurgerMenu/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/HeaderBar/HeaderBurgerMenu/conts.d.ts +1 -0
- package/dist/src/components/HeaderBar/HeaderBurgerMenu/locals.d.ts +5 -0
- package/dist/src/components/HeaderBar/HeaderBurgerMenu/tests/HeaderBurgerMenu.spec.d.ts +1 -0
- package/dist/src/components/HeaderBar/HeaderBurgerMenu/tests/useHandleSubMenus.spec.d.ts +1 -0
- package/dist/src/components/HeaderBar/HeaderBurgerMenu/useHandleSubMenus.d.ts +4 -0
- package/dist/src/components/HeaderBar/HeaderLogo/HeaderLogo.d.ts +31 -0
- package/dist/src/components/HeaderBar/HeaderLogo/locales.d.ts +3 -0
- package/dist/src/components/HeaderBar/HeaderLogo/logos/Logo-mobile.d.ts +2 -0
- package/dist/src/components/HeaderBar/HeaderLogo/logos/Logo.d.ts +2 -0
- package/dist/src/components/HeaderBar/HeaderLogo/tests/HeaderLogo.spec.d.ts +1 -0
- package/dist/src/components/HeaderBar/HeaderMenuBtn/HeaderMenuBtn.d.ts +14 -0
- package/dist/src/components/HeaderBar/HeaderMenuBtn/locals.d.ts +5 -0
- package/dist/src/components/HeaderBar/HeaderMenuBtn/tests/HeaderMenuBtn.spec.d.ts +1 -0
- package/dist/src/components/HeaderBar/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/HeaderBar/consts.d.ts +2 -0
- package/dist/src/components/HeaderBar/locales.d.ts +3 -0
- package/dist/src/components/HeaderBar/tests/HeaderBar.spec.d.ts +1 -0
- package/dist/src/components/HeaderBar/tests/useHeaderResponsiveMode.spec.d.ts +1 -0
- package/dist/src/components/HeaderBar/tests/useScrollDirection.spec.d.ts +1 -0
- package/dist/src/components/HeaderBar/useHeaderResponsiveMode.d.ts +3 -0
- package/dist/src/components/HeaderBar/useScrollDirection.d.ts +3 -0
- package/dist/src/components/HeaderLoading/AccessibiliteItems.d.ts +16 -0
- package/dist/src/components/HeaderLoading/HeaderLoading.d.ts +23 -0
- package/dist/src/components/HeaderLoading/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/HeaderLoading/tests/HeaderLoading.spec.d.ts +1 -0
- package/dist/src/components/HeaderNavigationBar/HeaderNavigationBar.d.ts +84 -0
- package/dist/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.d.ts +20 -0
- package/dist/src/components/HeaderNavigationBar/HorizontalNavbar/config.d.ts +16 -0
- package/dist/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.spec.d.ts +1 -0
- package/dist/src/components/HeaderNavigationBar/types.d.ts +6 -0
- package/dist/src/components/HeaderToolbar/AccessibiliteItems.d.ts +46 -0
- package/dist/src/components/HeaderToolbar/HeaderToolbar.d.ts +103 -0
- package/dist/src/components/HeaderToolbar/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/HeaderToolbar/tests/HeaderToolbar.spec.d.ts +1 -0
- package/dist/src/components/HeaderToolbar/types.d.ts +19 -0
- package/dist/src/components/LangBtn/AccessibiliteItems.d.ts +16 -0
- package/dist/src/components/LangBtn/LangBtn.d.ts +31 -0
- package/dist/src/components/LangBtn/config.d.ts +15 -0
- package/dist/src/components/LangBtn/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/LangBtn/locales.d.ts +3 -0
- package/dist/src/components/LangBtn/tests/Config.spec.d.ts +1 -0
- package/dist/src/components/LangBtn/tests/LangBtn.spec.d.ts +1 -0
- package/dist/src/components/LangBtn/types.d.ts +7 -0
- package/dist/src/components/Logo/AccessibiliteItems.d.ts +65 -0
- package/dist/src/components/Logo/Logo.d.ts +71 -0
- package/dist/src/components/Logo/LogoSize.d.ts +6 -0
- package/dist/src/components/Logo/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/Logo/locales.d.ts +6 -0
- package/dist/src/components/Logo/logoDimensionsMapping.d.ts +3 -0
- package/dist/src/components/Logo/tests/Logo.spec.d.ts +1 -0
- package/dist/src/components/Logo/types.d.ts +7 -0
- package/dist/src/components/LogoBrandSection/AccessibiliteItems.d.ts +91 -0
- package/dist/src/components/LogoBrandSection/LogoBrandSection.d.ts +38 -0
- package/dist/src/components/LogoBrandSection/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/LogoBrandSection/dividerDimensionsMapping.d.ts +14 -0
- package/dist/src/components/LogoBrandSection/locales.d.ts +14 -0
- package/dist/src/components/LogoBrandSection/secondaryLogoMapping.d.ts +18 -0
- package/dist/src/components/LogoBrandSection/tests/LogoBrandSection.spec.d.ts +1 -0
- package/dist/src/components/LogoBrandSection/types.d.ts +1 -0
- package/dist/src/components/MaintenancePage/AccessibiliteItems.d.ts +65 -0
- package/dist/src/components/MaintenancePage/MaintenancePage.d.ts +2 -0
- package/dist/src/components/MaintenancePage/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/MaintenancePage/index.d.ts +2 -0
- package/dist/src/components/MaintenancePage/locales.d.ts +4 -0
- package/dist/src/components/MaintenancePage/tests/MaintenancePage.spec.d.ts +1 -0
- package/dist/src/components/NirField/AccessibiliteItems.d.ts +79 -0
- package/dist/src/components/NirField/NirField.d.ts +940 -0
- package/dist/src/components/NirField/config.d.ts +15 -0
- package/dist/src/components/NirField/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/NirField/locales.d.ts +12 -0
- package/dist/src/components/NirField/nirValidation.d.ts +5 -0
- package/dist/src/components/NirField/tests/NirField.spec.d.ts +1 -0
- package/dist/src/components/NotFoundPage/AccessibiliteItems.d.ts +65 -0
- package/dist/src/components/NotFoundPage/NotFoundPage.d.ts +14 -0
- package/dist/src/components/NotFoundPage/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/NotFoundPage/locales.d.ts +6 -0
- package/dist/src/components/NotFoundPage/tests/NotFoundPage.spec.d.ts +1 -0
- package/dist/src/components/NotificationBar/AccessibiliteItems.d.ts +29 -0
- package/dist/src/components/NotificationBar/NotificationBar.d.ts +37 -0
- package/dist/src/components/NotificationBar/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/NotificationBar/options.d.ts +13 -0
- package/dist/src/components/NotificationBar/tests/NotificationBar.spec.d.ts +1 -0
- package/dist/src/components/NotificationBar/types.d.ts +7 -0
- package/dist/src/components/PageContainer/AccessibiliteItems.d.ts +29 -0
- package/dist/src/components/PageContainer/PageContainer.d.ts +21 -0
- package/dist/src/components/PageContainer/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/PageContainer/tests/PageContainer.spec.d.ts +1 -0
- package/dist/src/components/PaginatedTable/AccessibiliteItems.d.ts +97 -0
- package/dist/src/components/PaginatedTable/PaginatedTable.d.ts +57 -0
- package/dist/src/components/PaginatedTable/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/PaginatedTable/constants/StateEnum.d.ts +6 -0
- package/dist/src/components/PaginatedTable/tests/PaginatedTable.spec.d.ts +1 -0
- package/dist/src/components/PaginatedTable/types.d.ts +26 -0
- package/dist/src/components/PasswordField/AccessibiliteItems.d.ts +54 -0
- package/dist/src/components/PasswordField/PasswordField.d.ts +57 -0
- package/dist/src/components/PasswordField/config.d.ts +9 -0
- package/dist/src/components/PasswordField/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/PasswordField/locales.d.ts +4 -0
- package/dist/src/components/PasswordField/tests/PasswordField.spec.d.ts +1 -0
- package/dist/src/components/PeriodField/AccessibiliteItems.d.ts +54 -0
- package/dist/src/components/PeriodField/PeriodField.d.ts +1403 -0
- package/dist/src/components/PeriodField/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/PeriodField/tests/PeriodField.spec.d.ts +1 -0
- package/dist/src/components/PhoneField/AccessibiliteItems.d.ts +94 -0
- package/dist/src/components/PhoneField/PhoneField.d.ts +138 -0
- package/dist/src/components/PhoneField/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/PhoneField/indicatifs.d.ts +7 -0
- package/dist/src/components/PhoneField/locales.d.ts +4 -0
- package/dist/src/components/PhoneField/tests/PhoneField.spec.d.ts +1 -0
- package/dist/src/components/RangeField/AccessibiliteItems.d.ts +54 -0
- package/dist/src/components/RangeField/RangeField.d.ts +19 -0
- package/dist/src/components/RangeField/RangeSlider/RangeSlider.d.ts +286 -0
- package/dist/src/components/RangeField/RangeSlider/Tooltip/Tooltip.d.ts +20 -0
- package/dist/src/components/RangeField/RangeSlider/tests/rangeSlider.spec.d.ts +1 -0
- package/dist/src/components/RangeField/RangeSlider/tests/useDoubleSlider.spec.d.ts +1 -0
- package/dist/src/components/RangeField/RangeSlider/tests/useMouseSlide.spec.d.ts +1 -0
- package/dist/src/components/RangeField/RangeSlider/tests/useThumb.spec.d.ts +1 -0
- package/dist/src/components/RangeField/RangeSlider/tests/useThumbKeyboard.spec.d.ts +1 -0
- package/dist/src/components/RangeField/RangeSlider/tests/useTooltipsNudge.spec.d.ts +1 -0
- package/dist/src/components/RangeField/RangeSlider/tests/useTrack.spec.d.ts +1 -0
- package/dist/src/components/RangeField/RangeSlider/tests/vAnimateClick.spec.d.ts +1 -0
- package/dist/src/components/RangeField/RangeSlider/types.d.ts +13 -0
- package/dist/src/components/RangeField/RangeSlider/useMouseSlide.d.ts +18 -0
- package/dist/src/components/RangeField/RangeSlider/useRangeSlider.d.ts +17 -0
- package/dist/src/components/RangeField/RangeSlider/useThumb.d.ts +6 -0
- package/dist/src/components/RangeField/RangeSlider/useThumbKeyboard.d.ts +12 -0
- package/dist/src/components/RangeField/RangeSlider/useTooltipsNudge.d.ts +16 -0
- package/dist/src/components/RangeField/RangeSlider/useTrack.d.ts +13 -0
- package/dist/src/components/RangeField/RangeSlider/vAnimateClick.d.ts +3 -0
- package/dist/src/components/RangeField/config.d.ts +6 -0
- package/dist/src/components/RangeField/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/RangeField/locales.d.ts +4 -0
- package/dist/src/components/RangeField/tests/RangeField.spec.d.ts +1 -0
- package/dist/src/components/RatingPicker/AccessibiliteItems.d.ts +80 -0
- package/dist/src/components/RatingPicker/EmotionPicker/EmotionPicker.d.ts +65 -0
- package/dist/src/components/RatingPicker/EmotionPicker/locales.d.ts +3 -0
- package/dist/src/components/RatingPicker/EmotionPicker/tests/EmotionPicker.spec.d.ts +1 -0
- package/dist/src/components/RatingPicker/NumberPicker/NumberPicker.d.ts +64 -0
- package/dist/src/components/RatingPicker/NumberPicker/locales.d.ts +3 -0
- package/dist/src/components/RatingPicker/NumberPicker/tests/NumberPicker.spec.d.ts +1 -0
- package/dist/src/components/RatingPicker/Rating.d.ts +25 -0
- package/dist/src/components/RatingPicker/RatingPicker.d.ts +82 -0
- package/dist/src/components/RatingPicker/StarsPicker/StarsPicker.d.ts +54 -0
- package/dist/src/components/RatingPicker/StarsPicker/tests/StarsPicker.spec.d.ts +1 -0
- package/dist/src/components/RatingPicker/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/RatingPicker/locales.d.ts +3 -0
- package/dist/src/components/RatingPicker/tests/Rating.spec.d.ts +1 -0
- package/dist/src/components/RatingPicker/tests/RatingPicker.spec.d.ts +1 -0
- package/dist/src/components/SearchListField/AccessibiliteItems.d.ts +90 -0
- package/dist/src/components/SearchListField/SearchListField.d.ts +42 -0
- package/dist/src/components/SearchListField/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/SearchListField/locales.d.ts +5 -0
- package/dist/src/components/SearchListField/tests/SearchListField.spec.d.ts +1 -0
- package/dist/src/components/SearchListField/types.d.ts +4 -0
- package/dist/src/components/SelectBtnField/AccessibiliteItems.d.ts +79 -0
- package/dist/src/components/SelectBtnField/SelectBtnField.d.ts +33 -0
- package/dist/src/components/SelectBtnField/config.d.ts +11 -0
- package/dist/src/components/SelectBtnField/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/SelectBtnField/tests/SelectBtnField.spec.d.ts +1 -0
- package/dist/src/components/SelectBtnField/types.d.ts +11 -0
- package/dist/src/components/SkipLink/AccessibiliteItems.d.ts +16 -0
- package/dist/src/components/SkipLink/SkipLink.d.ts +18 -0
- package/dist/src/components/SkipLink/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/SkipLink/locales.d.ts +3 -0
- package/dist/src/components/SkipLink/tests/skipLink.spec.d.ts +1 -0
- package/dist/src/components/SocialMediaLinks/AccessibiliteItems.d.ts +46 -0
- package/dist/src/components/SocialMediaLinks/DefaultSocialMediaLinks.d.ts +2 -0
- package/dist/src/components/SocialMediaLinks/SocialMediaLinks.d.ts +16 -0
- package/dist/src/components/SocialMediaLinks/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/SocialMediaLinks/locales.d.ts +3 -0
- package/dist/src/components/SocialMediaLinks/tests/DefaultSocialMediaLinks.spec.d.ts +1 -0
- package/dist/src/components/SocialMediaLinks/tests/SocialMediaLinks.spec.d.ts +1 -0
- package/dist/src/components/SocialMediaLinks/types.d.ts +5 -0
- package/dist/src/components/SubHeader/AccessibiliteItems.d.ts +29 -0
- package/dist/src/components/SubHeader/SubHeader.d.ts +40 -0
- package/dist/src/components/SubHeader/config.d.ts +11 -0
- package/dist/src/components/SubHeader/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/SubHeader/locales.d.ts +3 -0
- package/dist/src/components/SubHeader/tests/SubHeader.spec.d.ts +1 -0
- package/dist/src/components/SyAlert/AccessibiliteItems.d.ts +29 -0
- package/dist/src/components/SyAlert/SyAlert.d.ts +32 -0
- package/dist/src/components/SyAlert/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/SyAlert/locales.d.ts +3 -0
- package/dist/src/components/SyAlert/tests/SyAlert.spec.d.ts +1 -0
- package/dist/src/components/TableToolbar/AccessibiliteItems.d.ts +71 -0
- package/dist/src/components/TableToolbar/TableToolbar.d.ts +40 -0
- package/dist/src/components/TableToolbar/config.d.ts +24 -0
- package/dist/src/components/TableToolbar/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/TableToolbar/locales.d.ts +5 -0
- package/dist/src/components/TableToolbar/tests/TableToolbar.spec.d.ts +1 -0
- package/dist/src/components/UploadWorkflow/config.d.ts +29 -0
- package/dist/src/components/UploadWorkflow/locales.d.ts +7 -0
- package/dist/src/components/UploadWorkflow/tests/UploadWorkflow.spec.d.ts +1 -0
- package/dist/src/components/UploadWorkflow/types.d.ts +19 -0
- package/dist/src/components/UploadWorkflow/useFileList.d.ts +10 -0
- package/dist/src/components/UploadWorkflow/useFileUploadJourney.d.ts +9 -0
- package/dist/src/components/UserMenuBtn/AccessibiliteItems.d.ts +54 -0
- package/dist/src/components/UserMenuBtn/UserMenuBtn.d.ts +32 -0
- package/dist/src/components/UserMenuBtn/config.d.ts +24 -0
- package/dist/src/components/UserMenuBtn/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/UserMenuBtn/tests/UserMenuBtn.spec.d.ts +1 -0
- package/dist/src/components/index.d.ts +65 -0
- package/dist/src/composables/index.d.ts +3 -0
- package/dist/src/composables/rules/tests/useFieldValidation.spec.d.ts +1 -0
- package/dist/src/composables/rules/useFieldValidation.d.ts +28 -0
- package/dist/src/composables/useCustomizableOptions.d.ts +13 -0
- package/dist/src/composables/useFilterable/useFilterable.d.ts +32 -0
- package/dist/src/composables/useFilterable/useFilterable.spec.d.ts +1 -0
- package/dist/src/composables/validation/tests/useValidation.spec.d.ts +1 -0
- package/dist/src/composables/validation/useValidation.d.ts +39 -0
- package/dist/src/composables/widthable/index.d.ts +13 -0
- package/dist/src/composables/widthable/tests/widthable.spec.d.ts +1 -0
- package/dist/src/constants/icons.d.ts +3 -0
- package/dist/src/designTokens/index.d.ts +11 -0
- package/dist/src/designTokens/tokens/cnam/cnamColors.d.ts +171 -0
- package/dist/src/designTokens/tokens/cnam/cnamContextual.d.ts +58 -0
- package/dist/src/designTokens/tokens/cnam/cnamDarkTheme.d.ts +3 -0
- package/dist/src/designTokens/tokens/cnam/cnamLightTheme.d.ts +90 -0
- package/dist/src/designTokens/tokens/cnam/cnamSemantic.d.ts +87 -0
- package/dist/src/designTokens/tokens/pa/paColors.d.ts +171 -0
- package/dist/src/designTokens/tokens/pa/paContextual.d.ts +58 -0
- package/dist/src/designTokens/tokens/pa/paDarkTheme.d.ts +3 -0
- package/dist/src/designTokens/tokens/pa/paLightTheme.d.ts +120 -0
- package/dist/src/designTokens/tokens/pa/paSemantic.d.ts +87 -0
- package/dist/src/designTokens/utils/convertGaps.d.ts +5 -0
- package/dist/src/designTokens/utils/convertSemanticsToken.d.ts +12 -0
- package/dist/src/designTokens/utils/createFlattenTheme.d.ts +7 -0
- package/dist/src/designTokens/utils/index.d.ts +3 -0
- package/dist/src/directives/clickOutside.d.ts +1 -0
- package/dist/src/main.d.ts +3 -0
- package/dist/src/modules.d.ts +4 -0
- package/dist/src/services/NotificationService.d.ts +19 -0
- package/dist/src/services/index.d.ts +1 -0
- package/dist/src/stories/Accessibilite/Vuetify/VuetifyItems.d.ts +58 -0
- package/dist/src/stories/EcoConception/ecoDesignItems.d.ts +4 -0
- package/dist/src/types/vuetifyTypes.d.ts +3 -0
- package/dist/src/utils/calcHumanFileSize/index.d.ts +2 -0
- package/dist/src/utils/calcHumanFileSize/tests/calcHumanFileSize.spec.d.ts +1 -0
- package/dist/src/utils/convertToUnit/index.d.ts +2 -0
- package/dist/src/utils/convertToUnit/test/convertToUnit.spec.d.ts +1 -0
- package/dist/src/utils/functions/copyToClipboard/index.d.ts +2 -0
- package/dist/src/utils/functions/copyToClipboard/tests/copyToClipboard.spec.d.ts +1 -0
- package/dist/src/utils/functions/deepCopy/index.d.ts +4 -0
- package/dist/src/utils/functions/deepCopy/tests/deepCopy.spec.d.ts +1 -0
- package/dist/src/utils/functions/downloadFile/index.d.ts +3 -0
- package/dist/src/utils/functions/downloadFile/tests/downloadFile.spec.d.ts +1 -0
- package/dist/src/utils/functions/downloadFile/types.d.ts +1 -0
- package/dist/src/utils/functions/isEmailValid/index.d.ts +4 -0
- package/dist/src/utils/functions/isEmailValid/tests/isEmailValid.spec.d.ts +1 -0
- package/dist/src/utils/functions/throttleDisplayFn/tests/throttleDisplayFn.spec.d.ts +1 -0
- package/dist/src/utils/functions/throttleDisplayFn/throttleDisplayFn.d.ts +4 -0
- package/dist/src/utils/localStorageUtility/index.d.ts +28 -0
- package/dist/src/utils/localStorageUtility/tests/localStorageUtility.spec.d.ts +1 -0
- package/dist/src/utils/propValidator/index.d.ts +2 -0
- package/dist/src/utils/propValidator/tests/propValidator.spec.d.ts +1 -0
- package/dist/src/utils/ruleMessage/index.d.ts +3 -0
- package/dist/src/utils/ruleMessage/tests/ruleMessages.spec.d.ts +1 -0
- package/dist/src/utils/rules/email/index.d.ts +4 -0
- package/dist/src/utils/rules/email/locales.d.ts +2 -0
- package/dist/src/utils/rules/email/tests/email.spec.d.ts +1 -0
- package/dist/src/utils/rules/exactLength/index.d.ts +4 -0
- package/dist/src/utils/rules/exactLength/locales.d.ts +2 -0
- package/dist/src/utils/rules/required/index.d.ts +4 -0
- package/dist/src/utils/rules/required/locales.d.ts +2 -0
- package/dist/src/utils/rules/required/ruleMessageHelper.d.ts +3 -0
- package/dist/src/utils/rules/required/tests/index.spec.d.ts +1 -0
- package/dist/src/utils/rules/required/tests/rulesMessageHelper.spec.d.ts +1 -0
- package/dist/src/utils/rules/types.d.ts +15 -0
- package/dist/src/vuetifyConfig.d.ts +81 -0
- package/dist/style.css +1 -1
- package/package.json +23 -21
- package/src/assets/_elevations.scss +89 -0
- package/src/assets/_fonts.scss +6 -0
- package/src/assets/_radius.scss +86 -0
- package/src/assets/_spacers.scss +149 -0
- package/src/assets/settings.scss +18 -3
- package/src/assets/tokens.scss +32 -29
- package/src/components/Amelipro/types/languages.d.ts +6 -0
- package/src/components/Amelipro/types/types.d.ts +65 -0
- package/src/components/BackBtn/Usages.mdx +9 -0
- package/src/components/BackBtn/Usages.stories.ts +37 -0
- package/src/components/BackToTopBtn/Usages.mdx +9 -0
- package/src/components/BackToTopBtn/Usages.stories.ts +41 -0
- package/src/components/ChipList/Accessibilite.mdx +14 -0
- package/src/components/ChipList/Accessibilite.stories.ts +216 -0
- package/src/components/ChipList/AccessibiliteItems.ts +119 -0
- package/src/components/ChipList/ChipList.mdx +59 -0
- package/src/components/ChipList/ChipList.stories.ts +1257 -0
- package/src/components/ChipList/ChipList.vue +246 -0
- package/src/components/ChipList/config.ts +27 -0
- package/src/{stories/Guidelines/Accessibilite → components/ChipList}/constants/ExpertiseLevelEnum.ts +0 -1
- package/src/components/ChipList/locales.ts +6 -0
- package/src/components/ChipList/tests/chipList.spec.ts +300 -0
- package/src/components/ChipList/types.ts +7 -0
- package/src/components/ContextualMenu/Usages.mdx +9 -0
- package/src/components/ContextualMenu/Usages.stories.ts +38 -0
- package/src/components/CopyBtn/Usages.mdx +9 -0
- package/src/components/CopyBtn/Usages.stories.ts +41 -0
- package/src/components/Customs/SyInputSelect/SyInputSelect.stories.ts +65 -0
- package/src/components/Customs/SyInputSelect/SyInputSelect.vue +13 -3
- package/src/components/Customs/SySelect/SySelect.stories.ts +88 -5
- package/src/components/Customs/SySelect/SySelect.vue +40 -11
- package/src/components/Customs/SySelect/Usages.mdx +9 -0
- package/src/components/Customs/SySelect/Usages.stories.ts +41 -0
- package/src/components/Customs/SySelect/tests/SySelect.spec.ts +135 -2
- package/src/components/Customs/SyTextField/SyTextField.mdx +21 -0
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +906 -244
- package/src/components/Customs/SyTextField/SyTextField.vue +259 -33
- package/src/components/Customs/SyTextField/Usages.mdx +9 -0
- package/src/components/Customs/SyTextField/Usages.stories.ts +41 -0
- package/src/components/Customs/SyTextField/tests/SyTextField.spec.ts +193 -40
- package/src/components/Customs/SyTextField/tests/__snapshots__/SyTextField.spec.ts.snap +23 -25
- package/src/components/Customs/SyTextField/types.d.ts +1 -0
- package/src/components/DatePicker/DatePicker.mdx +37 -1
- package/src/components/DatePicker/DatePicker.stories.ts +374 -5
- package/src/components/DatePicker/DatePicker.vue +506 -166
- package/src/components/DatePicker/DateTextInput.vue +581 -289
- package/src/components/DatePicker/Usages.mdx +9 -0
- package/src/components/DatePicker/Usages.stories.ts +43 -0
- package/src/components/DatePicker/tests/DatePicker.spec.ts +13 -20
- package/src/components/DatePicker/tests/DateTextInput.spec.ts +282 -0
- package/src/components/DialogBox/DialogBox.mdx +1 -1
- package/src/components/DialogBox/Usages.mdx +9 -0
- package/src/components/DialogBox/Usages.stories.ts +45 -0
- package/src/components/ErrorPage/ErrorPage.mdx +1 -1
- package/src/components/ExternalLinks/Usages.mdx +9 -0
- package/src/components/ExternalLinks/Usages.stories.ts +40 -0
- package/src/components/FileList/Accessibilite.mdx +14 -0
- package/src/components/FileList/Accessibilite.stories.ts +216 -0
- package/src/components/FileList/AccessibiliteItems.ts +110 -0
- package/src/components/FileList/FileList.vue +2 -1
- package/src/components/FileList/UploadItem/UploadItem.vue +10 -0
- package/src/components/FileList/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/FilePreview/Accessibilite.mdx +14 -0
- package/src/components/FilePreview/Accessibilite.stories.ts +216 -0
- package/src/components/FilePreview/AccessibiliteItems.ts +27 -0
- package/src/components/FilePreview/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/FileUpload/Accessibilite.mdx +14 -0
- package/src/components/FileUpload/Accessibilite.stories.ts +216 -0
- package/src/components/FileUpload/AccessibiliteItems.ts +27 -0
- package/src/components/FileUpload/FileUpload.stories.ts +84 -0
- package/src/components/FileUpload/FileUpload.vue +1 -0
- package/src/components/FileUpload/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/FileUpload/tests/FileUpload.spec.ts +4 -4
- package/src/components/FilterInline/FilterInline.mdx +237 -0
- package/src/components/FilterInline/FilterInline.stories.ts +763 -0
- package/src/components/FilterInline/FilterInline.vue +108 -0
- package/src/components/FilterInline/locales.ts +4 -0
- package/src/components/FilterInline/tests/FilterInline.spec.ts +68 -0
- package/src/components/FilterInline/tests/__snapshots__/FilterInline.spec.ts.snap +38 -0
- package/src/components/FilterSideBar/FilterSideBar.mdx +237 -0
- package/src/components/FilterSideBar/FilterSideBar.stories.ts +798 -0
- package/src/components/FilterSideBar/FilterSideBar.vue +193 -0
- package/src/components/FilterSideBar/locales.ts +8 -0
- package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +305 -0
- package/src/components/FilterSideBar/tests/__snapshots__/FilterSideBar.spec.ts.snap +39 -0
- package/src/components/HeaderBar/Usages.mdx +7 -2
- package/src/components/HeaderBar/Usages.stories.ts +39 -0
- package/src/components/NirField/NirField.stories.ts +574 -30
- package/src/components/NirField/NirField.vue +400 -356
- package/src/components/NirField/Usages.mdx +9 -0
- package/src/components/NirField/Usages.stories.ts +42 -0
- package/src/components/NirField/tests/NirField.spec.ts +88 -52
- package/src/components/NirField/tests//342/200/257dataset/342/200/257.md +12 -0
- package/src/components/NotificationBar/Accessibilite.stories.ts +4 -0
- package/src/components/NotificationBar/NotificationBar.stories.ts +18 -13
- package/src/components/NotificationBar/Usages.mdx +9 -0
- package/src/components/NotificationBar/Usages.stories.ts +41 -0
- package/src/components/PaginatedTable/Accessibilite.mdx +14 -0
- package/src/components/PaginatedTable/Accessibilite.stories.ts +216 -0
- package/src/components/PaginatedTable/AccessibiliteItems.ts +352 -0
- package/src/components/PaginatedTable/PaginatedTable.mdx +54 -0
- package/src/components/PaginatedTable/PaginatedTable.stories.ts +591 -0
- package/src/components/PaginatedTable/PaginatedTable.vue +243 -0
- package/src/components/PaginatedTable/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/PaginatedTable/constants/StateEnum.ts +6 -0
- package/src/components/PaginatedTable/tests/PaginatedTable.spec.ts +257 -0
- package/src/components/PaginatedTable/tests/__snapshots__/PaginatedTable.spec.ts.snap +249 -0
- package/src/components/PaginatedTable/types.ts +30 -0
- package/src/components/PasswordField/PasswordField.mdx +129 -47
- package/src/components/PasswordField/PasswordField.stories.ts +924 -120
- package/src/components/PasswordField/PasswordField.vue +209 -99
- package/src/components/PasswordField/tests/PasswordField.spec.ts +138 -9
- package/src/components/PeriodField/Accessibilite.mdx +14 -0
- package/src/components/PeriodField/Accessibilite.stories.ts +216 -0
- package/src/components/PeriodField/AccessibiliteItems.ts +269 -0
- package/src/components/PeriodField/PeriodField.vue +64 -78
- package/src/components/PeriodField/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/PeriodField/tests/PeriodField.spec.ts +11 -19
- package/src/components/PhoneField/PhoneField.mdx +1 -1
- package/src/components/PhoneField/PhoneField.stories.ts +69 -0
- package/src/components/PhoneField/PhoneField.vue +3 -0
- package/src/components/PhoneField/Usages.mdx +9 -0
- package/src/components/PhoneField/Usages.stories.ts +38 -0
- package/src/components/PhoneField/indicatifs.ts +1 -1
- package/src/components/RangeField/RangeField.vue +0 -4
- package/src/components/SearchListField/SearchListField.mdx +1 -2
- package/src/components/SelectBtnField/Usages.mdx +9 -0
- package/src/components/SelectBtnField/Usages.stories.ts +40 -0
- package/src/components/SkipLink/Usages.mdx +9 -0
- package/src/components/SkipLink/Usages.stories.ts +41 -0
- package/src/components/SyAlert/Usages.mdx +9 -0
- package/src/components/SyAlert/Usages.stories.ts +40 -0
- package/src/components/TableToolbar/Accessibilite.mdx +14 -0
- package/src/components/TableToolbar/Accessibilite.stories.ts +216 -0
- package/src/components/TableToolbar/AccessibiliteItems.ts +283 -0
- package/src/components/TableToolbar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/UploadWorkflow/UploadWorkflow.mdx +75 -0
- package/src/components/UploadWorkflow/UploadWorkflow.stories.ts +943 -0
- package/src/components/UploadWorkflow/UploadWorkflow.vue +230 -0
- package/src/components/UploadWorkflow/config.ts +29 -0
- package/src/components/UploadWorkflow/locales.ts +8 -0
- package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +257 -0
- package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +54 -0
- package/src/components/UploadWorkflow/types.ts +21 -0
- package/src/components/UploadWorkflow/useFileList.ts +84 -0
- package/src/components/UploadWorkflow/useFileUploadJourney.ts +18 -0
- package/src/components/Usages/Usages.vue +95 -0
- package/src/components/index.ts +5 -0
- package/src/composables/rules/useFieldValidation.ts +89 -14
- package/src/composables/useFilterable/useFilterable.spec.ts +635 -0
- package/src/composables/useFilterable/useFilterable.ts +196 -0
- package/src/composables/validation/tests/useValidation.spec.ts +154 -0
- package/src/composables/validation/useValidation.ts +165 -0
- package/src/constants/icons.ts +5 -0
- package/src/designTokens/index.ts +4 -0
- package/src/designTokens/tokens/cnam/cnamLightTheme.ts +3 -3
- package/src/stories/Accessibilite/Aculturation/SensibilisationAccessibilite.mdx +63 -0
- package/src/stories/Accessibilite/Audit/RGAA.mdx +29 -0
- package/src/stories/Accessibilite/Introduction.mdx +27 -0
- package/src/stories/Accessibilite/KitDePreAudit/Echantillonnage.mdx +40 -0
- package/src/stories/Accessibilite/KitDePreAudit/Introduction.mdx +32 -0
- package/src/stories/Accessibilite/KitDePreAudit/Outils/Introduction.mdx +33 -0
- package/src/stories/Accessibilite/KitDePreAudit/Outils/Tanaguru.mdx +33 -0
- package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +100 -0
- package/src/stories/{Guidelines → Accessibilite}/Vuetify/Vuetify.mdx +1 -1
- package/src/stories/{Guidelines → Accessibilite}/Vuetify/Vuetify.stories.ts +1 -1
- package/src/stories/Components/Components.mdx +8 -0
- package/src/stories/Components/Components.stories.ts +398 -0
- package/src/stories/Demarrer/Accueil.mdx +8 -3
- package/src/stories/Demarrer/Accueil.stories.ts +126 -16
- package/src/stories/Demarrer/Introduction.mdx +12 -0
- package/src/stories/Demarrer/Introduction.stories.ts +151 -0
- package/src/stories/{GuideDuDev → Demarrer}/components.stories.ts +2 -2
- package/src/stories/{Fondamentaux → DesignTokens}/Arrondis.mdx +1 -1
- package/src/stories/{Fondamentaux → DesignTokens}/Colors.mdx +4 -4
- package/src/stories/DesignTokens/Conteneurs.mdx +18 -0
- package/src/stories/DesignTokens/Conteneurs.stories.ts +103 -0
- package/src/stories/{Fondamentaux → DesignTokens}/Elevations.mdx +1 -1
- package/src/stories/{Fondamentaux → DesignTokens}/Espacements.mdx +1 -1
- package/src/stories/{Fondamentaux → DesignTokens}/Introduction.mdx +1 -1
- package/src/stories/{Fondamentaux → DesignTokens}/StylesTypographiques.mdx +1 -1
- package/src/stories/DesignTokens/ThemePA.mdx +35 -0
- package/src/stories/{Fondamentaux → DesignTokens}/Typographie.mdx +14 -1
- package/src/stories/{Guidelines/EcoConception/EcoConception.mdx → EcoConception/Introduction.mdx} +2 -2
- package/src/stories/{Guidelines/EcoConception/Econception.stories.ts → EcoConception/econception.stories.ts} +2 -2
- package/src/stories/GuideDuDev/MigrationDepuisBridge.mdx +432 -0
- package/src/stories/GuideDuDev/MigrationDepuisVue2.mdx +415 -0
- package/src/stories/GuideDuDev/UtiliserLesRules.mdx +314 -83
- package/src/stories/GuideDuDev/moduleDeNotification.mdx +1 -1
- package/src/stories/Templates/Templates.mdx +8 -0
- package/src/stories/Templates/Templates.stories.ts +85 -0
- package/src/utils/functions/deepCopy/index.ts +20 -0
- package/src/utils/functions/deepCopy/tests/deepCopy.spec.ts +58 -0
- package/src/utils/functions/isEmailValid/index.ts +8 -0
- package/src/utils/functions/isEmailValid/tests/isEmailValid.spec.ts +22 -0
- package/src/utils/localStorageUtility/index.ts +201 -0
- package/src/utils/localStorageUtility/tests/localStorageUtility.spec.ts +180 -0
- package/src/utils/ruleMessage/index.ts +14 -0
- package/src/utils/ruleMessage/tests/ruleMessages.spec.ts +28 -0
- package/src/utils/rules/email/index.ts +26 -0
- package/src/utils/rules/email/locales.ts +5 -0
- package/src/utils/rules/email/tests/email.spec.ts +24 -0
- package/src/vuetifyConfig.ts +61 -0
- package/dist/design-system-v3.d.ts +0 -2925
- package/src/stories/Fondamentaux/Conteneurs.mdx +0 -7
- package/src/stories/Fondamentaux/CustomisationEtThemes.mdx +0 -57
- package/src/stories/Guidelines/Accessibilite/Accessibilite.mdx +0 -51
- package/src/stories/Guidelines/Accessibilite/Accessibilite.stories.ts +0 -36
- package/src/stories/Guidelines/Accessibilite/AccessibiliteItems.ts +0 -706
- package/src/stories/Guidelines/Accessibilite/constants/RGAALevelEnum.ts +0 -4
- /package/src/stories/{Guidelines → Accessibilite}/Vuetify/VuetifyItems.ts +0 -0
- /package/src/stories/{GuideDuDev → Demarrer}/CreerUneIssue.mdx +0 -0
- /package/src/stories/{Guidelines/EcoConception → EcoConception}/ecoDesignItems.ts +0 -0
|
@@ -1,451 +1,495 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { ref, watch, computed, nextTick } from 'vue'
|
|
3
|
-
import { useFieldValidation } from '@/composables/rules/useFieldValidation'
|
|
2
|
+
import { ref, watch, computed, nextTick, toRef } from 'vue'
|
|
4
3
|
import { vMaska } from 'maska/vue'
|
|
5
4
|
import { checkNIR, isNIRKeyValid } from './nirValidation'
|
|
6
|
-
import useCustomizableOptions, { type CustomizableOptions } from '@/composables/useCustomizableOptions'
|
|
5
|
+
// import useCustomizableOptions, { type CustomizableOptions } from '@/composables/useCustomizableOptions'
|
|
6
|
+
import { type CustomizableOptions } from '@/composables/useCustomizableOptions'
|
|
7
7
|
import SyTextField from '../Customs/SyTextField/SyTextField.vue'
|
|
8
|
-
import { mdiInformationOutline } from '@mdi/js'
|
|
9
8
|
import { locales } from './locales'
|
|
10
|
-
import defaultOptions from './config'
|
|
11
|
-
|
|
12
|
-
type Rule = (value: string) => { error?: string, success?: string }
|
|
13
|
-
|
|
9
|
+
// import defaultOptions from './config'
|
|
10
|
+
import { useValidation, type ValidationRule } from '@/composables/validation/useValidation'
|
|
14
11
|
const props = withDefaults(defineProps<CustomizableOptions & {
|
|
15
12
|
modelValue?: string | undefined
|
|
16
|
-
|
|
17
|
-
required?: boolean
|
|
18
|
-
nirTooltip?: string
|
|
19
|
-
keyTooltip?: string
|
|
13
|
+
label?: string
|
|
20
14
|
numberLabel?: string
|
|
21
15
|
keyLabel?: string
|
|
22
16
|
displayKey?: boolean
|
|
17
|
+
outlined?: boolean
|
|
18
|
+
nirTooltip?: string
|
|
19
|
+
keyTooltip?: string
|
|
20
|
+
nirTooltipPosition?: 'prepend' | 'append'
|
|
21
|
+
keyTooltipPosition?: 'prepend' | 'append'
|
|
22
|
+
required?: boolean
|
|
23
|
+
displayAsterisk?: boolean
|
|
24
|
+
customNumberRules?: ValidationRule[]
|
|
25
|
+
customKeyRules?: ValidationRule[]
|
|
26
|
+
customNumberWarningRules?: ValidationRule[]
|
|
27
|
+
customKeyWarningRules?: ValidationRule[]
|
|
23
28
|
showSuccessMessages?: boolean
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
width?: string
|
|
30
|
+
bgColor?: string
|
|
31
|
+
isDisabled?: boolean
|
|
32
|
+
density?: 'default' | 'comfortable' | 'compact'
|
|
33
|
+
hideDetails?: boolean | 'auto'
|
|
34
|
+
hideSpinButtons?: boolean
|
|
35
|
+
placeholder?: string
|
|
36
|
+
readonly?: boolean
|
|
37
|
+
variant?: 'filled' | 'outlined' | 'plain' | 'underlined' | 'solo'
|
|
38
|
+
clearable?: boolean
|
|
39
|
+
counter?: boolean | number | string
|
|
40
|
+
hint?: string
|
|
41
|
+
persistentHint?: boolean
|
|
42
|
+
persistentPlaceholder?: boolean
|
|
28
43
|
}>(), {
|
|
29
44
|
modelValue: undefined,
|
|
30
|
-
|
|
31
|
-
required: false,
|
|
32
|
-
nirTooltip: undefined,
|
|
33
|
-
keyTooltip: undefined,
|
|
45
|
+
label: undefined,
|
|
34
46
|
numberLabel: 'Numéro de sécurité sociale',
|
|
35
47
|
keyLabel: 'Clé',
|
|
36
48
|
displayKey: true,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
49
|
+
outlined: true,
|
|
50
|
+
nirTooltip: undefined,
|
|
51
|
+
keyTooltip: undefined,
|
|
52
|
+
nirTooltipPosition: 'append',
|
|
53
|
+
keyTooltipPosition: 'append',
|
|
54
|
+
required: false,
|
|
55
|
+
displayAsterisk: false,
|
|
56
|
+
customNumberRules: () => [],
|
|
57
|
+
customKeyRules: () => [],
|
|
58
|
+
customNumberWarningRules: () => [],
|
|
59
|
+
customKeyWarningRules: () => [],
|
|
60
|
+
showSuccessMessages: true,
|
|
61
|
+
width: '100%',
|
|
62
|
+
bgColor: undefined,
|
|
63
|
+
isDisabled: false,
|
|
64
|
+
density: 'default',
|
|
65
|
+
hideDetails: false,
|
|
66
|
+
hideSpinButtons: false,
|
|
67
|
+
placeholder: undefined,
|
|
68
|
+
readonly: false,
|
|
69
|
+
variant: 'outlined',
|
|
70
|
+
clearable: false,
|
|
71
|
+
counter: false,
|
|
72
|
+
hint: undefined,
|
|
73
|
+
persistentHint: false,
|
|
74
|
+
persistentPlaceholder: false,
|
|
40
75
|
})
|
|
41
76
|
|
|
42
77
|
const emit = defineEmits(['update:modelValue'])
|
|
43
|
-
const
|
|
44
|
-
const
|
|
78
|
+
const modelValueRef = toRef(props, 'modelValue')
|
|
79
|
+
// const options = useCustomizableOptions(defaultOptions, props)
|
|
45
80
|
|
|
46
81
|
// Champs
|
|
47
82
|
const numberValue = ref('')
|
|
48
83
|
const keyValue = ref('')
|
|
49
|
-
const keyDeleted = ref(false)
|
|
50
84
|
|
|
51
85
|
// Refs pour les champs
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a generic type
|
|
55
|
-
const numberField = ref<any | null>(null)
|
|
86
|
+
const keyField = ref<InstanceType<typeof SyTextField> | null>(null)
|
|
87
|
+
const numberField = ref<InstanceType<typeof SyTextField> | null>(null)
|
|
56
88
|
|
|
89
|
+
// Valeurs non masquées
|
|
57
90
|
const unmaskedNumberValue = computed(() => numberValue.value.replace(/\s/g, ''))
|
|
58
|
-
|
|
59
|
-
watch(() => props.modelValue, async (value) => {
|
|
60
|
-
numberValue.value = value?.slice(0, 13) ?? ''
|
|
61
|
-
keyValue.value = value?.slice(13, 15) ?? ''
|
|
62
|
-
}, { immediate: true })
|
|
63
|
-
|
|
64
|
-
// Etats d’erreur/succès
|
|
65
|
-
const errors = ref<string[]>([])
|
|
66
|
-
const successes = ref<string[]>([])
|
|
67
|
-
|
|
68
|
-
// Flags de validation
|
|
69
|
-
const isValidating = ref(false)
|
|
91
|
+
const unmaskedKeyValue = computed(() => keyValue.value.replace(/\s/g, ''))
|
|
70
92
|
|
|
71
93
|
// Masques
|
|
72
94
|
const numberMask = {
|
|
73
95
|
mask: '# ## ## #C ### ###',
|
|
74
96
|
preProcess: (value: string) => value.toUpperCase(),
|
|
75
97
|
tokens: {
|
|
76
|
-
|
|
98
|
+
'#': {
|
|
99
|
+
pattern: /[0-9]/,
|
|
100
|
+
},
|
|
101
|
+
'C': {
|
|
77
102
|
pattern: /[0-9AB]/,
|
|
78
103
|
transform: (char: string) => char.toUpperCase(),
|
|
79
104
|
},
|
|
80
105
|
},
|
|
81
106
|
}
|
|
82
|
-
const keyMask = {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const defaultNumberRules = [
|
|
88
|
-
{
|
|
89
|
-
type: 'exactLength',
|
|
90
|
-
options: { length: 13, message: locales.errorLengthNumber(13), ignoreSpace: true, fieldIdentifier: 'numéro' },
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
type: 'custom',
|
|
94
|
-
options: {
|
|
95
|
-
validate: checkNIR,
|
|
96
|
-
message: 'Le numéro de sécurité sociale est invalide.',
|
|
97
|
-
successMessage: 'Le numéro de sécurité sociale est valide.',
|
|
98
|
-
fieldIdentifier: 'numéro',
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
...(props.required
|
|
102
|
-
? [{
|
|
103
|
-
type: 'required',
|
|
104
|
-
options: { message: 'Le numéro de sécurité sociale est requis.', fieldIdentifier: 'numéro' },
|
|
105
|
-
}]
|
|
106
|
-
: []),
|
|
107
|
-
]
|
|
108
|
-
|
|
109
|
-
const defaultKeyRules = [
|
|
110
|
-
{
|
|
111
|
-
type: 'exactLength',
|
|
112
|
-
options: { length: 2, message: locales.errorLengthKey(2), ignoreSpace: true, fieldIdentifier: 'clé' },
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
type: 'custom',
|
|
116
|
-
options: {
|
|
117
|
-
validate: () => isNIRKeyValid(`${numberValue.value}${keyValue.value}`),
|
|
118
|
-
message: 'La clé du numéro de sécurité sociale est invalide.',
|
|
119
|
-
successMessage: 'Le champ clé est valide.',
|
|
120
|
-
fieldIdentifier: 'clé',
|
|
107
|
+
const keyMask = {
|
|
108
|
+
mask: '##',
|
|
109
|
+
tokens: {
|
|
110
|
+
'#': {
|
|
111
|
+
pattern: /[0-9]/,
|
|
121
112
|
},
|
|
122
113
|
},
|
|
123
|
-
|
|
124
|
-
? [{
|
|
125
|
-
type: 'required',
|
|
126
|
-
options: { message: 'La clé est requise.', fieldIdentifier: 'clé' },
|
|
127
|
-
}]
|
|
128
|
-
: []),
|
|
129
|
-
]
|
|
114
|
+
}
|
|
130
115
|
|
|
131
|
-
//
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
: generateRules(defaultNumberRules)
|
|
144
|
-
|
|
145
|
-
const keyRules = props.displayKey
|
|
146
|
-
? (props.customKeyRules?.length
|
|
147
|
-
? generateRules(props.customKeyRules)
|
|
148
|
-
: generateRules(defaultKeyRules))
|
|
149
|
-
: []
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Valide une liste de règles sur une valeur et met à jour les tableaux d'erreurs et de succès.
|
|
153
|
-
* @param value Valeur du champ à valider
|
|
154
|
-
* @param rules Ensemble de règles
|
|
155
|
-
*/
|
|
156
|
-
function validateFieldSet(value: string, rules: Rule[]) {
|
|
157
|
-
rules.forEach((rule) => {
|
|
158
|
-
const { error, success } = rule(value)
|
|
159
|
-
if (error) errors.value.push(error)
|
|
160
|
-
if (success && success !== 'Le champ est valide.') successes.value.push(success)
|
|
116
|
+
// Fonction pour gérer le focus des champs
|
|
117
|
+
const focusField = (field: typeof numberField | typeof keyField) => {
|
|
118
|
+
nextTick(() => {
|
|
119
|
+
const input = field.value?.$el.querySelector('input')
|
|
120
|
+
if (input) {
|
|
121
|
+
// Focus and select all text
|
|
122
|
+
input.focus()
|
|
123
|
+
// Adding a slight delay to ensure focus is applied
|
|
124
|
+
setTimeout(() => {
|
|
125
|
+
input.click()
|
|
126
|
+
}, 50)
|
|
127
|
+
}
|
|
161
128
|
})
|
|
162
129
|
}
|
|
163
130
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
function validateFields(onBlur = false) {
|
|
169
|
-
errors.value = []
|
|
170
|
-
successes.value = []
|
|
171
|
-
|
|
172
|
-
const shouldValidateNumber = onBlur || isValidating.value || numberValue.value.length === 18
|
|
173
|
-
const shouldValidateKey = props.displayKey && (onBlur || isValidating.value || keyValue.value.length === 2)
|
|
174
|
-
|
|
175
|
-
if (shouldValidateNumber) {
|
|
176
|
-
validateFieldSet(numberValue.value, numberRules)
|
|
131
|
+
// Watch sur la valeur non masquée du numéro pour gérer le focus automatique
|
|
132
|
+
watch(unmaskedNumberValue, (newValue) => {
|
|
133
|
+
if (newValue.length === 13 && props.displayKey) {
|
|
134
|
+
focusField(keyField)
|
|
177
135
|
}
|
|
178
|
-
|
|
179
|
-
if (shouldValidateKey) {
|
|
180
|
-
validateFieldSet(keyValue.value, keyRules)
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
// Unicité des succès
|
|
184
|
-
successes.value = Array.from(new Set(successes.value))
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
// Compteurs
|
|
188
|
-
const numberCounter = computed(() => {
|
|
189
|
-
const length = numberValue.value.replace(/\s/g, '').length
|
|
190
|
-
return `${Math.min(length, 13)}/13`
|
|
191
136
|
})
|
|
192
137
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
138
|
+
watch(unmaskedKeyValue, (newValue) => {
|
|
139
|
+
if (newValue.length === 0) {
|
|
140
|
+
focusField(numberField)
|
|
141
|
+
}
|
|
196
142
|
})
|
|
197
143
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
144
|
+
// Watch pour détecter la suppression des chiffres de la clé
|
|
145
|
+
watch(keyValue, (newValue, oldValue) => {
|
|
146
|
+
// Si l'ancienne valeur avait des chiffres et la nouvelle est vide ou ne contient que des espaces
|
|
147
|
+
if (oldValue.trim() && !newValue.trim()) {
|
|
148
|
+
focusField(numberField)
|
|
202
149
|
}
|
|
203
150
|
})
|
|
204
151
|
|
|
205
|
-
|
|
206
|
-
|
|
152
|
+
// Initialisation des validations
|
|
153
|
+
const numberValidation = useValidation({
|
|
154
|
+
showSuccessMessages: props.showSuccessMessages,
|
|
155
|
+
fieldIdentifier: props.numberLabel,
|
|
207
156
|
})
|
|
208
157
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
158
|
+
const keyValidation = useValidation({
|
|
159
|
+
showSuccessMessages: props.showSuccessMessages,
|
|
160
|
+
fieldIdentifier: props.keyLabel,
|
|
213
161
|
})
|
|
214
162
|
|
|
215
|
-
//
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
163
|
+
// Règles de validation
|
|
164
|
+
const defaultNumberRules = computed(() => {
|
|
165
|
+
const rules: ValidationRule[] = []
|
|
166
|
+
|
|
167
|
+
if (props.required) {
|
|
168
|
+
rules.push({
|
|
169
|
+
type: 'required',
|
|
170
|
+
options: {
|
|
171
|
+
message: `Le champ ${props.numberLabel} est requis.`,
|
|
172
|
+
fieldIdentifier: props.numberLabel,
|
|
173
|
+
},
|
|
174
|
+
})
|
|
224
175
|
}
|
|
225
|
-
return null
|
|
226
|
-
})
|
|
227
176
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
177
|
+
rules.push({
|
|
178
|
+
type: 'custom',
|
|
179
|
+
options: {
|
|
180
|
+
validate: (value: string) => {
|
|
181
|
+
if (!value) return true
|
|
182
|
+
// Ne valider que si tous les caractères sont saisis
|
|
183
|
+
if (value.length < 13) {
|
|
184
|
+
return 'Le numéro de sécurité sociale est invalide.'
|
|
185
|
+
}
|
|
186
|
+
const result = checkNIR(value)
|
|
187
|
+
return result === true ? true : 'Le numéro de sécurité sociale est invalide.'
|
|
188
|
+
},
|
|
189
|
+
message: 'Le numéro de sécurité sociale est invalide.',
|
|
190
|
+
successMessage: 'Le numéro de sécurité sociale est valide.',
|
|
191
|
+
fieldIdentifier: props.numberLabel,
|
|
192
|
+
},
|
|
231
193
|
})
|
|
232
|
-
})
|
|
233
194
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
195
|
+
// Ajout des règles personnalisées
|
|
196
|
+
if (props.customNumberRules) {
|
|
197
|
+
rules.push(...props.customNumberRules.map(rule => ({
|
|
198
|
+
...rule,
|
|
199
|
+
options: rule.options || {},
|
|
200
|
+
})))
|
|
201
|
+
}
|
|
239
202
|
|
|
240
|
-
|
|
241
|
-
validateOnSubmit,
|
|
203
|
+
return rules
|
|
242
204
|
})
|
|
243
|
-
</script>
|
|
244
205
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
<v-input
|
|
248
|
-
ref="vInput"
|
|
249
|
-
:class="{
|
|
250
|
-
'v-messages__message--success': successes.length > 0 && props.showSuccessMessages,
|
|
251
|
-
'v-messages__message--error': errors.length > 0
|
|
252
|
-
}"
|
|
253
|
-
:error-messages="errors"
|
|
254
|
-
:label="numberLabel"
|
|
255
|
-
:max-errors="3"
|
|
256
|
-
:messages="props.showSuccessMessages ? successes : []"
|
|
257
|
-
:model-value="[numberValue, keyValue]"
|
|
258
|
-
class="vd-nir-field__fields-wrapper multi-line"
|
|
259
|
-
validate-on="blur lazy"
|
|
260
|
-
>
|
|
261
|
-
<VTooltip v-if="nirTooltip">
|
|
262
|
-
<template #activator="{ props: iconProps }">
|
|
263
|
-
<VIcon
|
|
264
|
-
class="vd-tooltip-icon mt-4 mr-4"
|
|
265
|
-
v-bind="{ ...iconProps, ...options.tooltip }"
|
|
266
|
-
>
|
|
267
|
-
{{ infoIcon }}
|
|
268
|
-
</VIcon>
|
|
269
|
-
</template>
|
|
270
|
-
<slot name="nirTooltip">
|
|
271
|
-
{{ nirTooltip }}
|
|
272
|
-
</slot>
|
|
273
|
-
</VTooltip>
|
|
274
|
-
<SyTextField
|
|
275
|
-
ref="numberField"
|
|
276
|
-
v-model="numberValue"
|
|
277
|
-
v-maska="numberMask"
|
|
278
|
-
:append-inner-icon="hasNumberErrors ? 'error' : (hasNumberSuccess ? 'success' : undefined)"
|
|
279
|
-
:aria-errormessage="hasNumberErrors ? 'number-field-errors' : undefined"
|
|
280
|
-
:aria-invalid="hasNumberErrors"
|
|
281
|
-
:aria-required="required"
|
|
282
|
-
:color="hasNumberErrors ? 'error' : 'primary'"
|
|
283
|
-
:error="hasNumberErrors"
|
|
284
|
-
:hint="locales.numberHint"
|
|
285
|
-
:label="numberLabel"
|
|
286
|
-
:variant="outlined ? 'outlined' : 'underlined'"
|
|
287
|
-
class="vd-number-field"
|
|
288
|
-
title="nirField"
|
|
289
|
-
@blur="validateFields(true)"
|
|
290
|
-
>
|
|
291
|
-
<template #details>
|
|
292
|
-
<span class="custom-counter">
|
|
293
|
-
{{ numberCounter }}
|
|
294
|
-
</span>
|
|
295
|
-
</template>
|
|
296
|
-
</SyTextField>
|
|
297
|
-
|
|
298
|
-
<template v-if="displayKey">
|
|
299
|
-
<SyTextField
|
|
300
|
-
ref="keyField"
|
|
301
|
-
v-model="keyValue"
|
|
302
|
-
v-maska="keyMask"
|
|
303
|
-
:append-inner-icon="hasKeyErrors ? 'error' : (hasKeySuccess ? 'success' : undefined)"
|
|
304
|
-
:aria-errormessage="hasKeyErrors ? 'key-field-errors' : undefined"
|
|
305
|
-
:aria-invalid="hasKeyErrors"
|
|
306
|
-
:aria-required="required"
|
|
307
|
-
:color="hasKeyErrors ? 'error' : 'primary'"
|
|
308
|
-
:error="hasKeyErrors"
|
|
309
|
-
:hint="locales.keyHint"
|
|
310
|
-
:label="keyLabel"
|
|
311
|
-
:variant="outlined ? 'outlined' : 'underlined'"
|
|
312
|
-
class="vd-key-field"
|
|
313
|
-
title="nirKeyField"
|
|
314
|
-
@blur="validateFields(true)"
|
|
315
|
-
>
|
|
316
|
-
<template #details>
|
|
317
|
-
<span class="custom-counter">
|
|
318
|
-
{{ keyCounter }}
|
|
319
|
-
</span>
|
|
320
|
-
</template>
|
|
321
|
-
</SyTextField>
|
|
322
|
-
|
|
323
|
-
<VTooltip v-if="keyTooltip">
|
|
324
|
-
<template #activator="{ props: iconProps }">
|
|
325
|
-
<VIcon
|
|
326
|
-
class="vd-tooltip-icon mt-4 ml-4"
|
|
327
|
-
v-bind="{ ...iconProps, ...options.icon }"
|
|
328
|
-
>
|
|
329
|
-
{{ infoIcon }}
|
|
330
|
-
</VIcon>
|
|
331
|
-
</template>
|
|
332
|
-
<slot name="keyTooltip">
|
|
333
|
-
{{ keyTooltip }}
|
|
334
|
-
</slot>
|
|
335
|
-
</VTooltip>
|
|
336
|
-
</template>
|
|
337
|
-
</v-input>
|
|
338
|
-
</div>
|
|
339
|
-
</template>
|
|
206
|
+
const defaultKeyRules = computed(() => {
|
|
207
|
+
const rules: ValidationRule[] = []
|
|
340
208
|
|
|
341
|
-
|
|
342
|
-
|
|
209
|
+
if (props.required) {
|
|
210
|
+
rules.push({
|
|
211
|
+
type: 'required',
|
|
212
|
+
options: {
|
|
213
|
+
message: `Le champ ${props.keyLabel} est requis.`,
|
|
214
|
+
fieldIdentifier: props.keyLabel,
|
|
215
|
+
},
|
|
216
|
+
})
|
|
217
|
+
}
|
|
343
218
|
|
|
344
|
-
|
|
345
|
-
|
|
219
|
+
const validateKey = (value: string) => {
|
|
220
|
+
if (!value) return true
|
|
221
|
+
if (!unmaskedNumberValue.value) return true
|
|
222
|
+
const fullNir = unmaskedNumberValue.value + value
|
|
223
|
+
return isNIRKeyValid(fullNir)
|
|
224
|
+
}
|
|
346
225
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}
|
|
226
|
+
// Ajout des règles personnalisées
|
|
227
|
+
if (props.customKeyRules) {
|
|
228
|
+
rules.push(...props.customKeyRules)
|
|
229
|
+
}
|
|
351
230
|
|
|
352
|
-
|
|
353
|
-
|
|
231
|
+
// Ajout de la règle de validation par défaut si pas de règle personnalisée avec validation de clé
|
|
232
|
+
if (!props.customKeyRules?.some(rule => rule.options.validate)) {
|
|
233
|
+
rules.push({
|
|
234
|
+
type: 'custom',
|
|
235
|
+
options: {
|
|
236
|
+
validate: validateKey,
|
|
237
|
+
message: 'La clé du numéro de sécurité sociale est invalide.',
|
|
238
|
+
successMessage: `Le champ ${props.keyLabel} est valide.`,
|
|
239
|
+
fieldIdentifier: props.keyLabel,
|
|
240
|
+
},
|
|
241
|
+
})
|
|
242
|
+
}
|
|
354
243
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
}
|
|
358
|
-
}
|
|
244
|
+
return rules
|
|
245
|
+
})
|
|
359
246
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
247
|
+
// Synchronisation avec modelValue
|
|
248
|
+
watch(modelValueRef, (newValue) => {
|
|
249
|
+
if (newValue === undefined) {
|
|
250
|
+
numberValue.value = ''
|
|
251
|
+
keyValue.value = ''
|
|
252
|
+
return
|
|
253
|
+
}
|
|
254
|
+
if (newValue.length === 15) {
|
|
255
|
+
const number = newValue.slice(0, -2)
|
|
256
|
+
const key = newValue.slice(-2)
|
|
257
|
+
numberValue.value = number
|
|
258
|
+
keyValue.value = key
|
|
259
|
+
}
|
|
260
|
+
if (newValue.length === 14) {
|
|
261
|
+
const number = newValue.slice(0, -1)
|
|
262
|
+
const key = newValue.slice(-1)
|
|
263
|
+
numberValue.value = number
|
|
264
|
+
keyValue.value = key
|
|
265
|
+
}
|
|
266
|
+
if (newValue.length === 13) {
|
|
267
|
+
const number = newValue
|
|
268
|
+
numberValue.value = number
|
|
269
|
+
keyValue.value = ''
|
|
270
|
+
}
|
|
271
|
+
}, { immediate: true })
|
|
363
272
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
273
|
+
// Émission de la valeur
|
|
274
|
+
const emitValue = () => {
|
|
275
|
+
const number = unmaskedNumberValue.value
|
|
276
|
+
const key = unmaskedKeyValue.value
|
|
367
277
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
278
|
+
if (!number && !key) {
|
|
279
|
+
emit('update:modelValue', undefined)
|
|
280
|
+
return
|
|
281
|
+
}
|
|
371
282
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
flex: none;
|
|
375
|
-
margin-left: 2%;
|
|
376
|
-
}
|
|
283
|
+
emit('update:modelValue', `${number}${key}`)
|
|
284
|
+
}
|
|
377
285
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
286
|
+
// Validation des champs
|
|
287
|
+
const validateFields = async (onBlur = false) => {
|
|
288
|
+
// Valider le numéro
|
|
289
|
+
const numberResult = numberValidation.validateField(
|
|
290
|
+
unmaskedNumberValue.value,
|
|
291
|
+
defaultNumberRules.value,
|
|
292
|
+
// N'appliquer les warnings que si le numéro est complet
|
|
293
|
+
unmaskedNumberValue.value?.length === 13 ? props.customNumberWarningRules : [],
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
// Valider la clé si elle est affichée
|
|
297
|
+
let keyResult = { hasError: false }
|
|
298
|
+
if (props.displayKey) {
|
|
299
|
+
keyResult = keyValidation.validateField(
|
|
300
|
+
keyValue.value,
|
|
301
|
+
defaultKeyRules.value,
|
|
302
|
+
// N'appliquer les warnings que si la clé est complète
|
|
303
|
+
keyValue.value?.length === 2 ? props.customKeyWarningRules : [],
|
|
304
|
+
)
|
|
305
|
+
}
|
|
381
306
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
307
|
+
// Si on est en mode blur et qu'il y a des erreurs, focus sur le premier champ en erreur
|
|
308
|
+
if (onBlur) {
|
|
309
|
+
await nextTick()
|
|
310
|
+
if (numberResult.hasError) {
|
|
311
|
+
numberField.value?.$el.querySelector('input')?.focus()
|
|
312
|
+
}
|
|
313
|
+
else if (keyResult.hasError) {
|
|
314
|
+
keyField.value?.$el.querySelector('input')?.focus()
|
|
315
|
+
}
|
|
316
|
+
}
|
|
387
317
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}
|
|
318
|
+
return !numberResult.hasError && !keyResult.hasError
|
|
319
|
+
}
|
|
391
320
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
}
|
|
321
|
+
const validateOnSubmit = () => {
|
|
322
|
+
return validateFields(true)
|
|
323
|
+
}
|
|
395
324
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
325
|
+
// Computed pour statut des champs
|
|
326
|
+
const hasNumberErrors = computed(() => numberValidation.hasError.value)
|
|
327
|
+
const hasNumberWarning = computed(() => !hasNumberErrors.value && numberValidation.hasWarning.value)
|
|
328
|
+
const hasNumberSuccess = computed(() => !hasNumberErrors.value && !hasNumberWarning.value && numberValidation.hasSuccess.value)
|
|
399
329
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
330
|
+
const hasKeyErrors = computed(() => keyValidation.hasError.value)
|
|
331
|
+
const hasKeyWarning = computed(() => !hasKeyErrors.value && keyValidation.hasWarning.value)
|
|
332
|
+
const hasKeySuccess = computed(() => !hasKeyErrors.value && !hasKeyWarning.value && keyValidation.hasSuccess.value)
|
|
403
333
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
}
|
|
334
|
+
// Labels avec astérisque si nécessaire
|
|
335
|
+
const numberLabelWithAsterisk = computed(() => {
|
|
336
|
+
return props.required && props.displayAsterisk ? `${props.numberLabel} *` : props.numberLabel
|
|
337
|
+
})
|
|
407
338
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
339
|
+
const keyLabelWithAsterisk = computed(() => {
|
|
340
|
+
return props.required && props.displayAsterisk ? `${props.keyLabel} *` : props.keyLabel
|
|
341
|
+
})
|
|
342
|
+
|
|
343
|
+
// Gestion des événements
|
|
344
|
+
const handleNumberInput = () => {
|
|
345
|
+
emitValue()
|
|
346
|
+
validateFields()
|
|
411
347
|
}
|
|
412
|
-
}
|
|
413
348
|
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
}
|
|
349
|
+
const handleKeyInput = () => {
|
|
350
|
+
emitValue()
|
|
351
|
+
validateFields()
|
|
418
352
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
353
|
+
// Si on supprime le contenu de la clé, on revient au champ NIR
|
|
354
|
+
if (unmaskedKeyValue.value.length === 0) {
|
|
355
|
+
nextTick(() => {
|
|
356
|
+
numberField.value?.$el.querySelector('input')?.focus()
|
|
357
|
+
})
|
|
358
|
+
}
|
|
359
|
+
}
|
|
422
360
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
flex-wrap: wrap;
|
|
427
|
-
gap: 4px;
|
|
428
|
-
margin-bottom: 4px;
|
|
361
|
+
const handleNumberBlur = () => {
|
|
362
|
+
validateFields(true)
|
|
363
|
+
}
|
|
429
364
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
}
|
|
365
|
+
const handleKeyBlur = () => {
|
|
366
|
+
validateFields(true)
|
|
433
367
|
}
|
|
434
|
-
}
|
|
435
368
|
|
|
436
|
-
|
|
437
|
-
|
|
369
|
+
defineExpose({
|
|
370
|
+
validateOnSubmit,
|
|
371
|
+
numberMask,
|
|
372
|
+
keyMask,
|
|
373
|
+
numberValidation,
|
|
374
|
+
keyValidation,
|
|
375
|
+
} satisfies {
|
|
376
|
+
validateOnSubmit: () => Promise<boolean>
|
|
377
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a generic type
|
|
378
|
+
numberMask: { mask: string, preProcess: (value: string) => string, tokens: Record<string, any> }
|
|
379
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a generic type
|
|
380
|
+
keyMask: { mask: string, tokens: Record<string, any> }
|
|
381
|
+
numberValidation: ReturnType<typeof useValidation>
|
|
382
|
+
keyValidation: ReturnType<typeof useValidation>
|
|
383
|
+
})
|
|
384
|
+
</script>
|
|
385
|
+
|
|
386
|
+
<template>
|
|
387
|
+
<div
|
|
388
|
+
class="nir-field"
|
|
389
|
+
>
|
|
390
|
+
<div class="number-field-container">
|
|
391
|
+
<SyTextField
|
|
392
|
+
ref="numberField"
|
|
393
|
+
v-model="numberValue"
|
|
394
|
+
v-maska="numberMask"
|
|
395
|
+
:label="numberLabelWithAsterisk"
|
|
396
|
+
:variant-style="outlined ? 'outlined' : 'underlined'"
|
|
397
|
+
:prepend-icon="nirTooltip && nirTooltipPosition === 'prepend' ? 'info' : undefined"
|
|
398
|
+
:append-icon="nirTooltip && nirTooltipPosition === 'append' ? 'info' : undefined"
|
|
399
|
+
:prepend-tooltip="nirTooltip && nirTooltipPosition === 'prepend' ? nirTooltip : undefined"
|
|
400
|
+
:append-tooltip="nirTooltip && nirTooltipPosition === 'append' ? nirTooltip : undefined"
|
|
401
|
+
:max-errors="2"
|
|
402
|
+
:error-messages="[...numberValidation.errors.value, ...keyValidation.errors.value]"
|
|
403
|
+
:warning-messages="numberValidation.warnings.value"
|
|
404
|
+
:success-messages="numberValidation.successes.value"
|
|
405
|
+
:show-success-messages="showSuccessMessages"
|
|
406
|
+
:has-warning="hasNumberWarning"
|
|
407
|
+
:has-success="hasNumberSuccess"
|
|
408
|
+
:error="hasNumberErrors"
|
|
409
|
+
:messages="hasNumberErrors ? numberValidation.errors.value : (hasNumberWarning ? numberValidation.warnings.value : (hasNumberSuccess ? numberValidation.successes.value : []))"
|
|
410
|
+
:has-error="hasNumberErrors"
|
|
411
|
+
:required="required"
|
|
412
|
+
:is-disabled="isDisabled"
|
|
413
|
+
:bg-color="bgColor"
|
|
414
|
+
:density="props.density"
|
|
415
|
+
:hide-details="props.hideDetails"
|
|
416
|
+
:hide-spin-buttons="props.hideSpinButtons"
|
|
417
|
+
:placeholder="props.placeholder"
|
|
418
|
+
:readonly="props.readonly"
|
|
419
|
+
:variant="props.variant"
|
|
420
|
+
:clearable="props.clearable"
|
|
421
|
+
:counter="props.counter"
|
|
422
|
+
:persistent-hint="props.persistentHint"
|
|
423
|
+
:persistent-placeholder="props.persistentPlaceholder"
|
|
424
|
+
:hint="props.hint || locales.numberHint"
|
|
425
|
+
class="number-field"
|
|
426
|
+
:display-asterisk="false"
|
|
427
|
+
@input="handleNumberInput"
|
|
428
|
+
@blur="handleNumberBlur"
|
|
429
|
+
/>
|
|
430
|
+
</div>
|
|
431
|
+
<div
|
|
432
|
+
v-if="displayKey"
|
|
433
|
+
class="key-field-container"
|
|
434
|
+
>
|
|
435
|
+
<SyTextField
|
|
436
|
+
ref="keyField"
|
|
437
|
+
v-model="keyValue"
|
|
438
|
+
v-maska="keyMask"
|
|
439
|
+
:label="keyLabelWithAsterisk"
|
|
440
|
+
:variant-style="outlined ? 'outlined' : 'underlined'"
|
|
441
|
+
:prepend-icon="keyTooltip && keyTooltipPosition === 'prepend' ? 'info' : undefined"
|
|
442
|
+
:append-icon="keyTooltip && keyTooltipPosition === 'append' ? 'info' : undefined"
|
|
443
|
+
:prepend-tooltip="keyTooltip && keyTooltipPosition === 'prepend' ? keyTooltip : undefined"
|
|
444
|
+
:append-tooltip="keyTooltip && keyTooltipPosition === 'append' ? keyTooltip : undefined"
|
|
445
|
+
:error-messages="keyValidation.errors.value.length > 0 ? [''] : []"
|
|
446
|
+
:warning-messages="keyValidation.warnings.value"
|
|
447
|
+
:success-messages="keyValidation.successes.value"
|
|
448
|
+
:show-success-messages="showSuccessMessages"
|
|
449
|
+
:has-warning="hasKeyWarning"
|
|
450
|
+
:has-success="hasKeySuccess"
|
|
451
|
+
:hint="props.hint || locales.keyHint"
|
|
452
|
+
:messages="hasKeyErrors ? keyValidation.errors.value : (hasKeyWarning ? keyValidation.warnings.value : (hasKeySuccess ? keyValidation.successes.value : []))"
|
|
453
|
+
:has-error="hasKeyErrors"
|
|
454
|
+
:is-disabled="isDisabled"
|
|
455
|
+
:bg-color="bgColor"
|
|
456
|
+
:density="props.density"
|
|
457
|
+
:hide-details="props.hideDetails"
|
|
458
|
+
:hide-spin-buttons="props.hideSpinButtons"
|
|
459
|
+
:placeholder="props.placeholder"
|
|
460
|
+
:readonly="props.readonly"
|
|
461
|
+
:variant="props.variant"
|
|
462
|
+
:clearable="props.clearable"
|
|
463
|
+
:counter="props.counter"
|
|
464
|
+
:persistent-hint="props.persistentHint"
|
|
465
|
+
:persistent-placeholder="props.persistentPlaceholder"
|
|
466
|
+
class="key-field"
|
|
467
|
+
:display-asterisk="false"
|
|
468
|
+
@input="handleKeyInput"
|
|
469
|
+
@blur="handleKeyBlur"
|
|
470
|
+
/>
|
|
471
|
+
</div>
|
|
472
|
+
</div>
|
|
473
|
+
</template>
|
|
474
|
+
|
|
475
|
+
<style lang="scss" scoped>
|
|
476
|
+
.nir-field {
|
|
477
|
+
display: flex;
|
|
478
|
+
gap: 16px;
|
|
479
|
+
width: v-bind('props.width');
|
|
480
|
+
align-items: flex-start;
|
|
438
481
|
}
|
|
439
482
|
|
|
440
|
-
|
|
441
|
-
|
|
483
|
+
.number-field-container {
|
|
484
|
+
flex: 0 0 80%;
|
|
442
485
|
}
|
|
443
486
|
|
|
444
|
-
.
|
|
445
|
-
|
|
487
|
+
.key-field-container {
|
|
488
|
+
flex: 0 0 20%;
|
|
446
489
|
}
|
|
447
490
|
|
|
448
|
-
|
|
449
|
-
|
|
491
|
+
.number-field,
|
|
492
|
+
.key-field {
|
|
493
|
+
width: 100%;
|
|
450
494
|
}
|
|
451
495
|
</style>
|