@cnamts/synapse 1.0.24 → 1.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -5
- package/dist/{AutocompleteFilter-BWLR3U7W.js → AutocompleteFilter-D7qBuCAP.js} +1 -1
- package/dist/{AutocompleteFilter-D9jzRzAL.cjs → AutocompleteFilter-Df9i5mAl.cjs} +1 -1
- package/dist/{DateFilter-DTUl8hb1.cjs → DateFilter-BJD6FMev.cjs} +1 -1
- package/dist/{DateFilter-BpwFexzi.js → DateFilter-BitMWrMU.js} +1 -1
- package/dist/{NumberFilter-Bz_NTdX9.js → NumberFilter-BTLUxw0a.js} +1 -1
- package/dist/{NumberFilter-MAEojdk0.cjs → NumberFilter-DGCzCXzI.cjs} +1 -1
- package/dist/{PeriodFilter-DX_wy9g-.js → PeriodFilter-B5rUIPAC.js} +1 -1
- package/dist/{PeriodFilter-CC4WgIhl.cjs → PeriodFilter-DO_ecTZW.cjs} +1 -1
- package/dist/{SelectFilter-BR3fvl-a.cjs → SelectFilter-CGwcKWLm.cjs} +1 -1
- package/dist/{SelectFilter-xqiPtPgX.js → SelectFilter-l4QnRcuk.js} +2 -2
- package/dist/{TextFilter-CCfYFl5F.cjs → TextFilter-B8nf7xoK.cjs} +1 -1
- package/dist/{TextFilter-BBl3JFqK.js → TextFilter-C9hj6Qrp.js} +1 -1
- package/dist/apLightTheme-CEK4iY3f.cjs +1 -0
- package/dist/{apLightTheme-D1P4jcD0.js → apLightTheme-DnIM24Lv.js} +441 -722
- package/dist/components/Customs/Selects/SyAutocomplete/SyAutocomplete.d.ts +10 -6
- package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +3 -0
- package/dist/components/Customs/SyTabs/SyTabs.d.ts +13 -11
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +4 -4
- package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +4 -24
- package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +2 -12
- package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +1 -6
- package/dist/components/DatePicker/composables/useDatePickerState.d.ts +1 -0
- package/dist/components/FileList/FileList.d.ts +6 -0
- package/dist/components/FilterSideBar/FilterSideBar.d.ts +2 -0
- package/dist/components/HeaderNavigationBar/HeaderNavigationBar.d.ts +13 -13
- package/dist/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.d.ts +3 -3
- package/dist/components/MonthPicker/MonthPicker.d.ts +1 -6
- package/dist/components/MonthPicker/MonthPickerText/MonthPickerInput.d.ts +1 -6
- package/dist/components/NirField/NirField.d.ts +4 -16
- package/dist/components/PeriodField/PeriodField.d.ts +8 -48
- package/dist/components/PhoneField/PhoneField.d.ts +1 -6
- package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +1 -0
- package/dist/components/Tables/SyTable/SyTable.d.ts +1 -0
- package/dist/components/Tables/common/SyTablePagination.d.ts +2 -0
- package/dist/components/Tables/common/TableHeader.d.ts +5 -0
- package/dist/components/Tables/common/locales.d.ts +3 -0
- package/dist/components/Tables/common/types.d.ts +2 -0
- package/dist/components/UploadWorkflow/UploadWorkflow.d.ts +1 -0
- package/dist/composables/unifyValidation/documentationValidationProps.d.ts +230 -0
- package/dist/composables/validation/useValidation.d.ts +5 -1
- package/dist/design-system-v3.js +2 -2
- package/dist/design-system-v3.umd.cjs +1 -1
- package/dist/designTokens/tokens/amelipro/apColors.d.ts +10 -10
- package/dist/designTokens/tokens/amelipro/apColors2026.d.ts +1 -2
- package/dist/designTokens/tokens/amelipro/apContextual.d.ts +44 -0
- package/dist/designTokens/tokens/amelipro/apSemantic.d.ts +1 -1
- package/dist/designTokens/tokens/baseColors.d.ts +127 -0
- package/dist/designTokens/tokens/baseContextualTokens.d.ts +50 -0
- package/dist/designTokens/tokens/cnam/cnamColors.d.ts +10 -10
- package/dist/designTokens/tokens/cnam/cnamSemantic.d.ts +1 -1
- package/dist/designTokens/tokens/pa/paColors.d.ts +1 -166
- package/dist/designTokens/tokens/pa/paSemantic.d.ts +1 -1
- package/dist/designTokens/utils/buildColorClassMap.d.ts +12 -0
- package/dist/designTokens/utils/createFlattenTheme.d.ts +1 -3
- package/dist/designTokens/utils/index.d.ts +2 -2
- package/dist/main-ByDPHpae.cjs +1067 -0
- package/dist/main-Cpx8Co6H.js +38869 -0
- package/dist/synapse.css +1 -1
- package/dist/utils/functions/classToHex.d.ts +1 -1
- package/dist/utils/functions/createHexResolver.d.ts +16 -0
- package/dist/vuetifyConfig.js +113 -152
- package/dist/vuetifyConfig.umd.cjs +1 -1
- package/package.json +29 -18
- package/src/assets/amelipro/apTokens2026.scss +5 -5
- package/src/assets/overrides/_breakpoints.scss +25 -0
- package/src/assets/overrides/_btns.scss +0 -2
- package/src/assets/overrides/_forms.scss +1 -3
- package/src/assets/overrides/_icons.scss +7 -11
- package/src/assets/overrides/_otp.scss +41 -0
- package/src/assets/overrides/_tables.scss +11 -20
- package/src/assets/overrides/_tooltips.scss +17 -7
- package/src/assets/overrides/_typography.scss +35 -37
- package/src/assets/overrides/_utilities.scss +43 -47
- package/src/assets/themes.scss +1 -0
- package/src/components/Amelipro/AmeliproAccordion/AmeliproAccordionTemplate/AmeliproAccordionTemplate.vue +20 -20
- package/src/components/Amelipro/AmeliproAccordionFrieze/AmeliproAccordionFrieze.vue +12 -14
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.vue +4 -6
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/AmeliproAccordionResultTemplate.vue +5 -5
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.vue +4 -6
- package/src/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.vue +4 -6
- package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.vue +4 -6
- package/src/components/Amelipro/AmeliproBreadcrumb/AmeliproBreadcrumb.vue +1 -3
- package/src/components/Amelipro/AmeliproBtn/AmeliproBtn.vue +4 -6
- package/src/components/Amelipro/AmeliproCallback/AmeliproCallback.vue +2 -2
- package/src/components/Amelipro/AmeliproCard/AmeliproCard.vue +31 -31
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.vue +5 -7
- package/src/components/Amelipro/AmeliproCheckbox/AmeliproCheckbox.vue +13 -15
- package/src/components/Amelipro/AmeliproCheckboxGroup/AmeliproCheckboxGroup.vue +23 -23
- package/src/components/Amelipro/AmeliproChips/AmeliproChips.vue +1 -3
- package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.vue +17 -12
- package/src/components/Amelipro/AmeliproClickableTile/tests/__snapshots__/AmeliproClickableTile.spec.ts.snap +2 -2
- package/src/components/Amelipro/AmeliproCopyBtn/AmeliproCopyBtn.vue +4 -6
- package/src/components/Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.vue +13 -13
- package/src/components/Amelipro/AmeliproDentalChart/AmeliproDentalChart.vue +4 -2
- package/src/components/Amelipro/AmeliproDentalChart/AmeliproTooth/AmeliproTooth.vue +4 -4
- package/src/components/Amelipro/AmeliproDialog/AmeliproDialog.vue +5 -7
- package/src/components/Amelipro/AmeliproDisclosure/AmeliproDisclosure.vue +1 -3
- package/src/components/Amelipro/AmeliproErrorTemplate/AmeliproErrorTemplate.vue +2 -4
- package/src/components/Amelipro/AmeliproFilePreview/AmeliproFilePreview.vue +4 -6
- package/src/components/Amelipro/AmeliproFilters/AmeliproFilters.vue +13 -13
- package/src/components/Amelipro/AmeliproFirstLogin/AmeliproFirstLogin.vue +3 -5
- package/src/components/Amelipro/AmeliproFooter/AmeliproFooter.vue +1 -3
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeader.vue +2 -4
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBar.vue +1 -3
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/AmeliproHeaderBrandSection.vue +20 -16
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/__tests__/__snapshots__/AmeliproHeaderBrandSection.spec.ts.snap +1 -1
- package/src/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.vue +2 -4
- package/src/components/Amelipro/AmeliproIllustratedDataTile/AmeliproIllustratedDataTile.vue +5 -7
- package/src/components/Amelipro/AmeliproIllustratedRadioGroup/AmeliproIllustratedRadioGroup.vue +6 -8
- package/src/components/Amelipro/AmeliproMailTile/AmeliproMailTile.vue +14 -14
- package/src/components/Amelipro/AmeliproMenu/AmeliproMenu.vue +11 -13
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproDropdownMenu/AmeliproDropdownMenu.vue +2 -4
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproMessagingLayout.vue +8 -8
- package/src/components/Amelipro/AmeliproMultipleFoldingCard/AmeliproMultipleFoldingCard.vue +40 -40
- package/src/components/Amelipro/AmeliproNumberedCard/AmeliproNumberedCard.vue +27 -27
- package/src/components/Amelipro/AmeliproOnboarding/AmeliproOnboarding.vue +3 -5
- package/src/components/Amelipro/AmeliproPageLayout/AmeliproPageLayout.vue +2 -4
- package/src/components/Amelipro/AmeliproPagination/AmeliproPagination.vue +2 -4
- package/src/components/Amelipro/AmeliproPagination/AmeliproPaginationBtn/AmeliproPaginationBtn.vue +3 -5
- package/src/components/Amelipro/AmeliproPatientBanner/AmeliproPatientBanner.vue +1 -3
- package/src/components/Amelipro/AmeliproPatientLogged/AmeliproPatientLogged.vue +2 -4
- package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLogin.vue +4 -4
- package/src/components/Amelipro/AmeliproPatientLogin/AmeliproPatientLoginForm/AmeliproPatientLoginForm.vue +1 -3
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/AmeliproPostalAddressCityRow.vue +3 -5
- package/src/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.vue +3 -5
- package/src/components/Amelipro/AmeliproRadioGroup/AmeliproRadioGroup.vue +23 -23
- package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.vue +4 -6
- package/src/components/Amelipro/AmeliproSelect/AmeliproSelect.vue +12 -22
- package/src/components/Amelipro/AmeliproStateTile/AmeliproStateTile.vue +10 -12
- package/src/components/Amelipro/AmeliproStepper/AmeliproStepper.vue +17 -17
- package/src/components/Amelipro/AmeliproTable/AmeliproTable.vue +8 -10
- package/src/components/Amelipro/AmeliproTabs/AmeliproTabBtn/AmeliproTabBtn.vue +6 -8
- package/src/components/Amelipro/AmeliproTabs/AmeliproTabs.vue +4 -4
- package/src/components/Amelipro/AmeliproTextArea/AmeliproTextArea.vue +4 -6
- package/src/components/Amelipro/AmeliproTextField/AmeliproTextField.vue +7 -9
- package/src/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.vue +3 -5
- package/src/components/Amelipro/AmeliproTooltips/AmeliproTooltips.vue +0 -2
- package/src/components/Amelipro/AmeliproUpload/AmeliproUpload.vue +6 -6
- package/src/components/Amelipro/ServiceMenu/ServiceMenu.vue +2 -2
- package/src/components/Amelipro/StructureMenu/StructureBtn/StructureBtn.vue +4 -4
- package/src/components/Amelipro/StructureMenu/StructureItem/StructureItem.vue +4 -6
- package/src/components/Amelipro/StructureMenu/StructureMenu.vue +2 -2
- package/src/components/Amelipro/StructureMenu/StructureTabs/StructureTabs.vue +2 -2
- package/src/components/Amelipro/UserMenu/UserMenu.vue +1 -3
- package/src/components/BackBtn/tests/BackBtn.visual.cy.ts +43 -0
- package/src/components/BackBtn/tests/__snapshots__/back-btn-custom-bg.snap.png +0 -0
- package/src/components/BackBtn/tests/__snapshots__/back-btn-dark-mode.snap.png +0 -0
- package/src/components/BackBtn/tests/__snapshots__/back-btn-default.snap.png +0 -0
- package/src/components/BackBtn/tests/__snapshots__/back-btn-no-icon.snap.png +0 -0
- package/src/components/Captcha/Captcha.vue +1 -3
- package/src/components/ChipList/ChipList.vue +14 -16
- package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +0 -2
- package/src/components/CopyBtn/CopyBtn.vue +1 -3
- package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.vue +17 -17
- package/src/components/Customs/Selects/SelectBtnField/tests/SelectBtnField.spec.ts +31 -0
- package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.stories.ts +66 -0
- package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.vue +7 -3
- package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.a11y.spec.ts +18 -0
- package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.spec.ts +66 -0
- package/src/components/Customs/Selects/SyInputSelect/SyInputSelect.vue +4 -6
- package/src/components/Customs/Selects/SySelect/SySelect.stories.ts +1 -39
- package/src/components/Customs/Selects/SySelect/SySelect.vue +263 -63
- package/src/components/Customs/Selects/SySelect/accessibilite/Accessibility.mdx +199 -269
- package/src/components/Customs/Selects/SySelect/tests/SySelect.spec.ts +35 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.mdx +5 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +29 -0
- package/src/components/Customs/SyCheckbox/accessibilite/Accessibility.mdx +18 -3
- package/src/components/Customs/SyPagination/SyPagination.vue +0 -2
- package/src/components/Customs/SyTabs/SyTabs.mdx +0 -58
- package/src/components/Customs/SyTabs/SyTabs.stories.ts +32 -33
- package/src/components/Customs/SyTabs/SyTabs.vue +87 -67
- package/src/components/Customs/SyTabs/accessibilite/Accessibility.mdx +83 -23
- package/src/components/Customs/SyTabs/tests/SyTabs.a11y.spec.ts +88 -0
- package/src/components/Customs/SyTabs/tests/SyTabs.spec.ts +46 -1
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +21 -41
- package/src/components/Customs/SyTextField/SyTextField.vue +4 -6
- package/src/components/DatePicker/CalendarMode/DatePicker.vue +12 -14
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +20 -16
- package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.spec.ts +23 -0
- package/src/components/DatePicker/DateTextInput/DateTextInput.vue +8 -10
- package/src/components/DatePicker/composables/tests/useDatePickerState.spec.ts +53 -0
- package/src/components/DatePicker/composables/useDatePickerState.ts +24 -0
- package/src/components/DatePicker/composables/useDateTextField.ts +0 -1
- package/src/components/DatePicker/composables/useMonthButtonCustomization.ts +9 -8
- package/src/components/DatePicker/playground/DatePickerHolidayRule.vue +1 -1
- package/src/components/DialogBox/DialogBox.vue +3 -5
- package/src/components/DialogBox/tests/DialogBox.visual.cy.ts +76 -0
- package/src/components/DialogBox/tests/__snapshots__/dialog-box-custom-texts.snap.png +0 -0
- package/src/components/DialogBox/tests/__snapshots__/dialog-box-default.snap.png +0 -0
- package/src/components/DialogBox/tests/__snapshots__/dialog-box-no-actions.snap.png +0 -0
- package/src/components/FileList/FileList.vue +9 -2
- package/src/components/FileList/UploadItem/UploadItem.vue +11 -13
- package/src/components/FileList/tests/FileList.spec.ts +47 -0
- package/src/components/FileUpload/FileUpload.vue +3 -5
- package/src/components/FileUpload/FileUploadContent.vue +3 -5
- package/src/components/FilterInline/FilterInline.vue +1 -3
- package/src/components/FilterSideBar/FilterSideBar.mdx +44 -1
- package/src/components/FilterSideBar/FilterSideBar.stories.ts +105 -1
- package/src/components/FilterSideBar/FilterSideBar.vue +7 -0
- package/src/components/FilterSideBar/tests/FilterSideBar.a11y.spec.ts +54 -1
- package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +42 -0
- package/src/components/FooterBar/FooterBar.vue +9 -13
- package/src/components/FranceConnectBtn/FranceConnectBtn.vue +1 -1
- package/src/components/HeaderBar/HeaderBar.vue +2 -3
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.vue +2 -3
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.vue +2 -3
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.vue +0 -1
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.vue +8 -9
- package/src/components/HeaderBar/HeaderBurgerMenu/menu.scss +0 -8
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/HeaderBurgerMenu.visual.cy.ts +196 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/header-burger-menu-generated-submenu-open.snap.png +0 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/header-burger-menu-generated.snap.png +0 -0
- package/src/components/HeaderBar/HeaderLogo/HeaderLogo.vue +0 -1
- package/src/components/HeaderBar/HeaderMenuBtn/HeaderMenuBtn.vue +6 -7
- package/src/components/HeaderBar/tests/HeaderBar.visual.cy.ts +81 -0
- package/src/components/HeaderBar/tests/__snapshots__/header-bar-custom-width.snap.png +0 -0
- package/src/components/HeaderBar/tests/__snapshots__/header-bar-default.snap.png +0 -0
- package/src/components/HeaderBar/tests/__snapshots__/header-bar-no-sticky.snap.png +0 -0
- package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-prepend.snap.png +0 -0
- package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-side.snap.png +0 -0
- package/src/components/HeaderBar/tests/__snapshots__/header-bar-with-subtitle.snap.png +0 -0
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +12 -3
- package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +15 -8
- package/src/components/HeaderToolbar/HeaderToolbar.vue +6 -7
- package/src/components/LangBtn/LangBtn.vue +2 -4
- package/src/components/Logo/tests/Logo.visual.cy.ts +57 -0
- package/src/components/Logo/tests/__snapshots__/logo-avatar.snap.png +0 -0
- package/src/components/Logo/tests/__snapshots__/logo-dark.snap.png +0 -0
- package/src/components/Logo/tests/__snapshots__/logo-default.snap.png +0 -0
- package/src/components/Logo/tests/__snapshots__/logo-no-organism.snap.png +0 -0
- package/src/components/Logo/tests/__snapshots__/logo-no-signature.snap.png +0 -0
- package/src/components/Logo/tests/__snapshots__/logo-risque-pro.snap.png +0 -0
- package/src/components/LogoBrandSection/LogoBrandSection.vue +2 -2
- package/src/components/MonthPicker/MonthPickerVisual/VisualPickerHeader.vue +1 -1
- package/src/components/NirField/NirField.stories.ts +2 -2
- package/src/components/NirField/NirField.vue +3 -5
- package/src/components/NirField/accessibilite/Accessibility.mdx +100 -5
- package/src/components/NirField/tests/NirField.spec.ts +118 -0
- package/src/components/NirField/tests/useNirValidation.spec.ts +449 -0
- package/src/components/NirField/useNirValidation.ts +38 -32
- package/src/components/NotificationBar/Notification/Notification.vue +5 -7
- package/src/components/NotificationBar/NotificationBar.vue +1 -3
- package/src/components/PaginatedTable/PaginatedTable.vue +2 -3
- package/src/components/PaginatedTable/Pagination.vue +3 -5
- package/src/components/PasswordField/PasswordField.vue +8 -10
- package/src/components/PhoneField/PhoneField.vue +3 -3
- package/src/components/RangeField/RangeSlider/RangeSlider.vue +0 -2
- package/src/components/RangeField/RangeSlider/Tooltip/Tooltip.vue +1 -1
- package/src/components/RangeField/tests/RangeField.visual.cy.ts +65 -0
- package/src/components/RangeField/tests/__snapshots__/range-field-custom-bg.snap.png +0 -0
- package/src/components/RangeField/tests/__snapshots__/range-field-custom-range.snap.png +0 -0
- package/src/components/RangeField/tests/__snapshots__/range-field-default.snap.png +0 -0
- package/src/components/RangeField/tests/__snapshots__/range-field-step.snap.png +0 -0
- package/src/components/RangeField/tests/__snapshots__/range-field-with-label.snap.png +0 -0
- package/src/components/RatingPicker/EmotionPicker/EmotionPicker.vue +6 -8
- package/src/components/RatingPicker/StarsPicker/StarsPicker.vue +3 -5
- package/src/components/SearchListField/SearchListField.vue +0 -2
- package/src/components/SkipLink/SkipLink.vue +2 -4
- package/src/components/SocialMediaLinks/SocialMediaLinks.vue +6 -6
- package/src/components/SubHeader/SubHeader.vue +1 -1
- package/src/components/SyAlert/SyAlert.vue +7 -9
- package/src/components/SyAlert/tests/SyAlert.visual.cy.ts +46 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-closable.snap.png +0 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-error.snap.png +0 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-info.snap.png +0 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-success.snap.png +0 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-variant-outlined.snap.png +0 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-variant-tonal.snap.png +0 -0
- package/src/components/SyAlert/tests/__snapshots__/sy-alert-warning.snap.png +0 -0
- package/src/components/SyBtnMenu/SyBtnMenu.vue +2 -4
- package/src/components/TableToolbar/TableToolbar.vue +6 -8
- package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +166 -0
- package/src/components/Tables/SyServerTable/SyServerTable.vue +9 -7
- package/src/components/Tables/SyServerTable/tests/SyServerTable.a11y.spec.ts +23 -0
- package/src/components/Tables/SyServerTable/tests/SyServerTable.spec.ts +268 -0
- package/src/components/Tables/SyTable/SyTable.stories.ts +104 -0
- package/src/components/Tables/SyTable/SyTable.vue +9 -7
- package/src/components/Tables/SyTable/tests/SyTable.a11y.spec.ts +22 -0
- package/src/components/Tables/SyTable/tests/SyTable.spec.ts +274 -0
- package/src/components/Tables/common/SyTableFilter.vue +27 -2
- package/src/components/Tables/common/SyTablePagination.vue +142 -19
- package/src/components/Tables/common/TableHeader.vue +40 -3
- package/src/components/Tables/common/filters/SelectFilter.vue +1 -1
- package/src/components/Tables/common/locales.ts +3 -0
- package/src/components/Tables/common/tableStyles.scss +16 -19
- package/src/components/Tables/common/tests/SyTablePagination.spec.ts +18 -0
- package/src/components/Tables/common/tests/TableHeader.spec.ts +39 -0
- package/src/components/Tables/common/types.ts +2 -0
- package/src/components/Tables/common/useTableHeaders.ts +49 -27
- package/src/components/UploadWorkflow/UploadWorkflow.vue +1 -0
- package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +23 -0
- package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +66 -0
- package/src/components/UploadWorkflow/useFileList.ts +3 -0
- package/src/components/UserMenuBtn/UserMenuBtn.vue +1 -3
- package/src/composables/unifyValidation/documentationValidationProps.ts +235 -0
- package/src/composables/validation/useValidation.ts +17 -1
- package/src/composantsVuetify/VBreadcrumbs/VBreadcrumbs.mdx +28 -0
- package/src/composantsVuetify/VBreadcrumbs/v-breadcrumbs.stories.ts +108 -0
- package/src/composantsVuetify/VOtpInput/VOtpInput.mdx +39 -0
- package/src/composantsVuetify/VOtpInput/v-otp-input.stories.ts +56 -0
- package/src/composantsVuetify/VSkeletonLoader/VSkeletonLoader.mdx +42 -0
- package/src/composantsVuetify/VSkeletonLoader/v-skeleton-loader.stories.ts +77 -0
- package/src/composantsVuetify/VSwitch/VSwitch.mdx +47 -0
- package/src/composantsVuetify/VSwitch/v-switch.stories.ts +166 -0
- package/src/designTokens/tests/buildColorClassMap.spec.ts +31 -0
- package/src/designTokens/tests/generateScssTokens.spec.ts +12 -0
- package/src/designTokens/tests/themeUtils.spec.ts +53 -0
- package/src/designTokens/tokens/amelipro/apColors.ts +8 -130
- package/src/designTokens/tokens/amelipro/apColors2026.ts +3 -15
- package/src/designTokens/tokens/amelipro/apContextual.ts +55 -47
- package/src/designTokens/tokens/amelipro/apLightTheme.ts +1 -1
- package/src/designTokens/tokens/amelipro/apSemantic.ts +1 -1
- package/src/designTokens/tokens/baseColors.ts +129 -0
- package/src/designTokens/tokens/baseContextualTokens.ts +52 -0
- package/src/designTokens/tokens/cnam/cnamColors.ts +3 -125
- package/src/designTokens/tokens/cnam/cnamContextual.ts +4 -48
- package/src/designTokens/tokens/cnam/cnamLightTheme.ts +1 -1
- package/src/designTokens/tokens/cnam/cnamSemantic.ts +1 -1
- package/src/designTokens/tokens/pa/paColors.ts +2 -166
- package/src/designTokens/tokens/pa/paContextual.ts +3 -48
- package/src/designTokens/tokens/pa/paLightTheme.ts +1 -1
- package/src/designTokens/tokens/pa/paSemantic.ts +2 -2
- package/src/designTokens/utils/buildColorClassMap.ts +34 -0
- package/src/designTokens/utils/convertSemanticsToken.ts +8 -11
- package/src/designTokens/utils/createFlattenTheme.ts +15 -7
- package/src/designTokens/utils/index.ts +2 -2
- package/src/stories/Accessibilite/AuditDesignSystem.mdx +0 -11
- package/src/stories/Accessibilite/DesignSystem/Avancement.mdx +433 -0
- package/src/stories/Accessibilite/DesignSystem/a11y-status.json +692 -0
- package/src/stories/Accessibilite/KitDePreAudit/Echantillonnage.mdx +8 -1
- package/src/stories/Accessibilite/KitDePreAudit/Introduction.mdx +51 -10
- package/src/stories/Accessibilite/KitDePreAudit/Outils/Introduction.mdx +16 -9
- package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +48 -58
- package/src/stories/Components/Components.stories.ts +40 -1
- package/src/stories/Demarrer/EnrichirLeDesignSystem.mdx +4 -9
- package/src/stories/Demarrer/EnrichirLeDesignSystem.stories.ts +28 -0
- package/src/stories/Demarrer/Releases.stories.ts +48 -5
- package/src/stories/DesignTokens/ColorDisplay.vue +6 -5
- package/src/stories/DesignTokens/ColorIntegrationExample.vue +2 -4
- package/src/stories/DesignTokens/colors.stories.ts +5 -6
- package/src/stories/GuideDuDev/CreateVuetifyInstance.mdx +95 -0
- package/src/stories/GuideDuDev/Theme.mdx +36 -26
- package/src/stories/GuideDuDev/moduleDeNotification.mdx +3 -2
- package/src/stories/styles/accessibility-guide.css +3 -3
- package/src/utils/functions/classToHex.ts +6 -34
- package/src/utils/functions/createHexResolver.ts +45 -0
- package/src/utils/functions/tests/classToHex.spec.ts +36 -0
- package/src/utils/functions/tests/convertToHex.spec.ts +31 -0
- package/src/utils/functions/tests/createHexResolver.spec.ts +66 -0
- package/src/utils/functions/tests/isCssColor.spec.ts +48 -0
- package/dist/apLightTheme-CFSRrjv2.cjs +0 -1
- package/dist/designTokens/utils/convertGaps.d.ts +0 -5
- package/dist/main-BtTqyn4z.js +0 -38648
- package/dist/main-C1e3eoxd.cjs +0 -1067
- package/src/assets/apTokens.scss +0 -343
- package/src/assets/overrides/_container.scss +0 -36
- package/src/assets/tokens.scss +0 -388
- package/src/designTokens/apColors.md +0 -66
- package/src/designTokens/cnamColors.md +0 -193
- package/src/designTokens/paColors.md +0 -66
- package/src/designTokens/tokens/json/contextual-tokens.json +0 -156
- package/src/designTokens/tokens/json/primitives.json +0 -209
- package/src/designTokens/tokens/json/semantic.json +0 -120
- package/src/designTokens/utils/convertGaps.ts +0 -11
- package/src/stories/Accessibilite/Avancement/Avancement.mdx +0 -533
- package/src/stories/Accessibilite/Avancement/Avancement.stories.ts +0 -306
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
top: 1px;
|
|
226
226
|
left: 12px;
|
|
227
227
|
color: rgb(0 0 0 / 60%);
|
|
228
|
-
font-size:
|
|
228
|
+
font-size: var(--v-fontSize-liensEtLibelles);
|
|
229
229
|
line-height: 36px; /* Adjust based on your select height */
|
|
230
230
|
pointer-events: none;
|
|
231
231
|
width: calc(100% - 40px); /* Leave space for the dropdown icon */
|
|
@@ -19,6 +19,9 @@ export const locales = {
|
|
|
19
19
|
pageAriaLabel: (page: number) => `Page ${page}`,
|
|
20
20
|
currentPageAriaLabel: (page: number) => `Page courante, Page ${page}`,
|
|
21
21
|
paginationNavAriaLabel: 'Navigation de pagination',
|
|
22
|
+
pageInputLabel: 'Aller à la page',
|
|
23
|
+
pageInputAriaLabel: (pageCount: number) => `Aller à la page, entre 1 et ${pageCount}`,
|
|
24
|
+
pageOf: (pageCount: number) => `sur ${pageCount}`,
|
|
22
25
|
},
|
|
23
26
|
reorganizeColumns: 'Gestion des colonnes',
|
|
24
27
|
close: 'Fermer',
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
@use 'sass:color';
|
|
2
|
-
@use '@/assets/tokens';
|
|
3
|
-
|
|
4
1
|
@mixin tablestyles {
|
|
5
2
|
.v-table {
|
|
6
|
-
border: 1px solid
|
|
3
|
+
border: 1px solid rgb(var(--v-theme-grey-lighten80));
|
|
7
4
|
|
|
8
|
-
--sy-table-header-bg-pinned:
|
|
5
|
+
--sy-table-header-bg-pinned: color-mix(in srgb, rgb(var(--v-theme-blue-lighten80)) 20%, white);
|
|
9
6
|
|
|
10
7
|
// Standardisation des z-index pour les tableaux
|
|
11
8
|
--sy-table-z-base: 1;
|
|
@@ -20,13 +17,13 @@
|
|
|
20
17
|
|
|
21
18
|
table thead tr.filters,
|
|
22
19
|
table thead tr.reset {
|
|
23
|
-
background-color:
|
|
20
|
+
background-color: rgb(var(--v-theme-blue-lighten90));
|
|
24
21
|
}
|
|
25
22
|
|
|
26
23
|
caption,
|
|
27
24
|
table thead tr.headers,
|
|
28
25
|
table thead tr.reset {
|
|
29
|
-
background-color: rgba(
|
|
26
|
+
background-color: rgba(var(--v-theme-blue-lighten80), 0.2);
|
|
30
27
|
}
|
|
31
28
|
|
|
32
29
|
&.fixed-min-height {
|
|
@@ -47,44 +44,44 @@
|
|
|
47
44
|
.v-field__append-inner > .v-icon,
|
|
48
45
|
.v-field__clearable > .v-icon {
|
|
49
46
|
opacity: 1;
|
|
50
|
-
color:
|
|
47
|
+
color: rgb(var(--v-theme-primary));
|
|
51
48
|
}
|
|
52
49
|
}
|
|
53
50
|
|
|
54
51
|
&--focused {
|
|
55
|
-
border-color:
|
|
56
|
-
color:
|
|
52
|
+
border-color: rgb(var(--v-theme-primary));
|
|
53
|
+
color: rgb(var(--v-theme-primary));
|
|
57
54
|
}
|
|
58
55
|
}
|
|
59
56
|
|
|
60
57
|
// Override Vuetify's checkbox styles to use primary color
|
|
61
58
|
.v-table .v-selection-control {
|
|
62
|
-
color: rgb(var(--v-theme-
|
|
59
|
+
color: rgb(var(--v-theme-borderAccentPrimary)) !important;
|
|
63
60
|
}
|
|
64
61
|
|
|
65
62
|
.v-table .v-selection-control--dirty .v-selection-control__input::before {
|
|
66
|
-
background-color: rgb(var(--v-theme-
|
|
67
|
-
border-color: rgb(var(--v-theme-
|
|
63
|
+
background-color: rgb(var(--v-theme-borderAccentPrimary)) !important;
|
|
64
|
+
border-color: rgb(var(--v-theme-borderAccentPrimary)) !important;
|
|
68
65
|
}
|
|
69
66
|
|
|
70
67
|
// Target the header checkbox specifically
|
|
71
68
|
.v-data-table-header__checkbox .v-selection-control {
|
|
72
|
-
color: rgb(var(--v-theme-
|
|
69
|
+
color: rgb(var(--v-theme-borderAccentPrimary)) !important;
|
|
73
70
|
}
|
|
74
71
|
|
|
75
72
|
// Target the row checkboxes specifically
|
|
76
73
|
.v-data-table-row__checkbox .v-selection-control {
|
|
77
|
-
color: rgb(var(--v-theme-
|
|
74
|
+
color: rgb(var(--v-theme-borderAccentPrimary)) !important;
|
|
78
75
|
}
|
|
79
76
|
|
|
80
77
|
// Add a global style for all checkboxes in the table
|
|
81
78
|
.v-checkbox .v-selection-control__input::before,
|
|
82
79
|
.v-checkbox-btn .v-selection-control__input::before {
|
|
83
|
-
border-color: rgb(var(--v-theme-
|
|
80
|
+
border-color: rgb(var(--v-theme-borderAccentPrimary)) !important;
|
|
84
81
|
}
|
|
85
82
|
|
|
86
83
|
.v-data-table-rows-no-data {
|
|
87
|
-
color:
|
|
84
|
+
color: rgb(var(--v-theme-grey-base));
|
|
88
85
|
}
|
|
89
86
|
|
|
90
87
|
// Ensure loading progress bar appears above sticky/pinned header cells
|
|
@@ -104,7 +101,7 @@
|
|
|
104
101
|
|
|
105
102
|
.v-table tbody > tr.sy-table__clickable-row:focus-visible,
|
|
106
103
|
.v-data-table__tbody > tr.sy-table__clickable-row:focus-visible {
|
|
107
|
-
outline: 2px solid
|
|
104
|
+
outline: 2px solid rgb(var(--v-theme-primary));
|
|
108
105
|
}
|
|
109
106
|
|
|
110
107
|
.v-table tbody > tr.sy-table__clickable-row > td,
|
|
@@ -123,6 +120,6 @@
|
|
|
123
120
|
.v-data-table__tbody > tr.sy-table__clickable-row:hover > .v-data-table__td,
|
|
124
121
|
.v-data-table__tbody > tr.sy-table__clickable-row:focus-visible > td,
|
|
125
122
|
.v-data-table__tbody > tr.sy-table__clickable-row:focus-visible > .v-data-table__td {
|
|
126
|
-
background-color: rgba(
|
|
123
|
+
background-color: rgba(var(--v-theme-primary), 0.08) !important;
|
|
127
124
|
}
|
|
128
125
|
}
|
|
@@ -135,6 +135,24 @@ describe('SyTablePagination.vue', () => {
|
|
|
135
135
|
expect(wrapper.emitted('update:page')![0]).toEqual([2])
|
|
136
136
|
})
|
|
137
137
|
|
|
138
|
+
it('groups page input with pagination controls', () => {
|
|
139
|
+
const wrapper = mount(SyTablePagination, {
|
|
140
|
+
props: {
|
|
141
|
+
headingLevel: 2,
|
|
142
|
+
page: 3,
|
|
143
|
+
itemsPerPage: 10,
|
|
144
|
+
itemsLength: 100,
|
|
145
|
+
pageCount: 10,
|
|
146
|
+
pageInput: true,
|
|
147
|
+
},
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
const controls = wrapper.find('.pagination-controls')
|
|
151
|
+
expect(controls.exists()).toBe(true)
|
|
152
|
+
expect(controls.find('.pagination').exists()).toBe(true)
|
|
153
|
+
expect(controls.find('.page-input').exists()).toBe(true)
|
|
154
|
+
})
|
|
155
|
+
|
|
138
156
|
it('has the correct structure for items per page selection', () => {
|
|
139
157
|
const wrapper = mount(SyTablePagination, {
|
|
140
158
|
props: {
|
|
@@ -135,6 +135,45 @@ describe('TableHeader', () => {
|
|
|
135
135
|
expect(wrapper.find('.sort-order-indicator').exists()).toBe(false)
|
|
136
136
|
})
|
|
137
137
|
|
|
138
|
+
it('wraps the column title when resizable columns are enabled', () => {
|
|
139
|
+
const column = {
|
|
140
|
+
title: 'A very long column title',
|
|
141
|
+
key: 'test',
|
|
142
|
+
value: 'test',
|
|
143
|
+
sortable: true,
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const wrapper = mount(TableHeader, {
|
|
147
|
+
props: {
|
|
148
|
+
column,
|
|
149
|
+
headerParams: {
|
|
150
|
+
sortBy: [],
|
|
151
|
+
getSortIcon: () => 'mdi-arrow-up',
|
|
152
|
+
toggleSort: () => {},
|
|
153
|
+
columns: [
|
|
154
|
+
{
|
|
155
|
+
key: 'test',
|
|
156
|
+
value: 'test',
|
|
157
|
+
title: 'A very long column title',
|
|
158
|
+
sortable: true,
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
headers: [],
|
|
162
|
+
someSelected: false,
|
|
163
|
+
allSelected: false,
|
|
164
|
+
selectAll: () => {},
|
|
165
|
+
isSorted: () => false,
|
|
166
|
+
},
|
|
167
|
+
table: { $el: { offsetWidth: 800 } } as unknown as VDataTable,
|
|
168
|
+
wrapTitle: true,
|
|
169
|
+
},
|
|
170
|
+
})
|
|
171
|
+
|
|
172
|
+
expect(wrapper.find('.col-title').classes()).toContain('col-title--wrap')
|
|
173
|
+
expect(wrapper.find('.v-data-table-header__content').classes()).toContain('v-data-table-header__content--wrap')
|
|
174
|
+
expect(wrapper.find('.v-data-table-header__content').classes()).not.toContain('h-100')
|
|
175
|
+
})
|
|
176
|
+
|
|
138
177
|
// Test for correct sort order when multiple columns are sorted
|
|
139
178
|
it('displays correct sort order numbers for multiple sorted columns', async () => {
|
|
140
179
|
const columns = [
|
|
@@ -105,6 +105,7 @@ export type SyTableProps = {
|
|
|
105
105
|
pinnedColumns?: Array<string | { key: string, side?: 'left' | 'right' }>
|
|
106
106
|
pinnedColumnKey?: string
|
|
107
107
|
clickableRow?: boolean
|
|
108
|
+
pageInput?: boolean
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
export type SyServerTableProps = {
|
|
@@ -132,4 +133,5 @@ export type SyServerTableProps = {
|
|
|
132
133
|
pinnedColumns?: Array<string | { key: string, side?: 'left' | 'right' }>
|
|
133
134
|
pinnedColumnKey?: string
|
|
134
135
|
clickableRow?: boolean
|
|
136
|
+
pageInput?: boolean
|
|
135
137
|
}
|
|
@@ -18,8 +18,38 @@ export function useTableHeaders({
|
|
|
18
18
|
storedHeaders?: DataTableHeaders[]
|
|
19
19
|
filterInputConfig?: Record<string, unknown>
|
|
20
20
|
}) {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
function normalizeHeader(header: DataTableHeaders): DataTableHeaders {
|
|
22
|
+
const mapped = {
|
|
23
|
+
...header,
|
|
24
|
+
title: header.title ?? header.text,
|
|
25
|
+
} as TableColumnHeader
|
|
26
|
+
|
|
27
|
+
// Si maxWidth est défini sans width → applique-le à width
|
|
28
|
+
if (mapped.maxWidth != null && mapped.width == null) {
|
|
29
|
+
mapped.width = mapped.maxWidth
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Si maxWidth est défini → l'appliquer aussi aux <td> via cellProps
|
|
33
|
+
if (mapped.maxWidth != null) {
|
|
34
|
+
const existingCellProps = (mapped.cellProps ?? {}) as Record<string, unknown>
|
|
35
|
+
const existingStyle = (existingCellProps.style ?? {}) as Record<string, unknown>
|
|
36
|
+
const multilineStyle = {
|
|
37
|
+
...existingStyle,
|
|
38
|
+
maxWidth: mapped.maxWidth,
|
|
39
|
+
whiteSpace: 'normal',
|
|
40
|
+
overflowWrap: 'anywhere',
|
|
41
|
+
wordBreak: 'break-word',
|
|
42
|
+
}
|
|
43
|
+
const baseProps = { ...existingCellProps, style: multilineStyle }
|
|
44
|
+
mapped.cellProps = () => ({
|
|
45
|
+
...baseProps,
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return mapped as unknown as DataTableHeaders
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const mergedHeaders = computed(() => {
|
|
23
53
|
const incoming = headersProp?.value
|
|
24
54
|
const stored = Array.isArray(storedHeaders) ? storedHeaders : undefined
|
|
25
55
|
|
|
@@ -61,27 +91,11 @@ export function useTableHeaders({
|
|
|
61
91
|
headers = (stored ?? incoming) as DataTableHeaders[]
|
|
62
92
|
}
|
|
63
93
|
|
|
64
|
-
|
|
65
|
-
return headers.map((header) => {
|
|
66
|
-
const mapped = {
|
|
67
|
-
...header,
|
|
68
|
-
title: header.title ?? header.text,
|
|
69
|
-
} as TableColumnHeader
|
|
70
|
-
|
|
71
|
-
// Si maxWidth est défini sans width → applique-le à width
|
|
72
|
-
if (mapped.maxWidth != null && mapped.width == null) {
|
|
73
|
-
mapped.width = mapped.maxWidth
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return mapped as unknown as DataTableHeaders
|
|
77
|
-
})
|
|
94
|
+
return headers
|
|
78
95
|
})
|
|
79
96
|
|
|
80
|
-
//
|
|
81
|
-
const
|
|
82
|
-
if (!normalizedHeaders.value) return []
|
|
83
|
-
return normalizedHeaders.value.filter(header => header.filterable)
|
|
84
|
-
})
|
|
97
|
+
// Process headers to ensure they have title property and regenerate cellProps after reordering
|
|
98
|
+
const normalizedHeaders = computed(() => mergedHeaders.value?.map(normalizeHeader))
|
|
85
99
|
|
|
86
100
|
/**
|
|
87
101
|
* Enhance header with filter type and configuration
|
|
@@ -112,27 +126,35 @@ export function useTableHeaders({
|
|
|
112
126
|
internalHeaders.value = newHeaders
|
|
113
127
|
}, { immediate: true, deep: true })
|
|
114
128
|
|
|
129
|
+
const normalizedInternalHeaders = computed(() => internalHeaders.value?.map(normalizeHeader))
|
|
130
|
+
|
|
131
|
+
// Get filterable headers
|
|
132
|
+
const filterableHeaders = computed(() => {
|
|
133
|
+
if (!normalizedInternalHeaders.value) return []
|
|
134
|
+
return normalizedInternalHeaders.value.filter(header => header.filterable)
|
|
135
|
+
})
|
|
136
|
+
|
|
115
137
|
/**
|
|
116
138
|
* Get header by key
|
|
117
139
|
*/
|
|
118
140
|
function getHeaderByKey(key: string): TableColumnHeader | undefined {
|
|
119
|
-
return
|
|
141
|
+
return normalizedInternalHeaders.value?.find(header => header.key === key)
|
|
120
142
|
}
|
|
121
143
|
|
|
122
144
|
/**
|
|
123
145
|
* Get original header from a rendered column (match by key or value)
|
|
124
146
|
*/
|
|
125
147
|
function getHeaderForColumn(column: TableColumnHeader): TableColumnHeader | undefined {
|
|
126
|
-
if (!
|
|
148
|
+
if (!normalizedInternalHeaders.value) return undefined
|
|
127
149
|
const key = column.key ?? undefined
|
|
128
150
|
if (key) {
|
|
129
|
-
const byKey =
|
|
151
|
+
const byKey = normalizedInternalHeaders.value.find(h => h.key === key)
|
|
130
152
|
if (byKey) return byKey
|
|
131
153
|
}
|
|
132
154
|
// Fallback: try matching by value when key is not present or didn't match
|
|
133
155
|
const val = typeof column.value === 'string' ? column.value : undefined
|
|
134
156
|
if (val) {
|
|
135
|
-
const byValue =
|
|
157
|
+
const byValue = normalizedInternalHeaders.value.find(h => h.value === val)
|
|
136
158
|
if (byValue) return byValue
|
|
137
159
|
}
|
|
138
160
|
return undefined
|
|
@@ -142,8 +164,8 @@ export function useTableHeaders({
|
|
|
142
164
|
* The headers filtered by visibility and sorted by order
|
|
143
165
|
*/
|
|
144
166
|
const displayHeaders = computed(() => {
|
|
145
|
-
if (!
|
|
146
|
-
const filteredHeaders =
|
|
167
|
+
if (!normalizedInternalHeaders.value) return undefined
|
|
168
|
+
const filteredHeaders = normalizedInternalHeaders.value.filter(header => header.hidden !== true)
|
|
147
169
|
return sortHeaders(filteredHeaders)
|
|
148
170
|
})
|
|
149
171
|
|
|
@@ -35,6 +35,29 @@ describe('UploadWorkflow', () => {
|
|
|
35
35
|
expect(wrapper.find('.sy-file-upload').isVisible()).toBeTruthy()
|
|
36
36
|
})
|
|
37
37
|
|
|
38
|
+
it('handles empty upload list without crashing', async () => {
|
|
39
|
+
const wrapper = mount(UploadWorkflow, {
|
|
40
|
+
props: {
|
|
41
|
+
uploadList: [],
|
|
42
|
+
},
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
46
|
+
expect(wrapper.findAll('.file-item')).toHaveLength(0)
|
|
47
|
+
expect(wrapper.find('.sy-file-upload').exists()).toBeFalsy()
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
it('handles undefined upload list without crashing', async () => {
|
|
51
|
+
const wrapper = mount(UploadWorkflow, {
|
|
52
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
53
|
+
props: {} as any,
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
57
|
+
expect(wrapper.findAll('.file-item')).toHaveLength(0)
|
|
58
|
+
expect(wrapper.find('.sy-file-upload').exists()).toBeFalsy()
|
|
59
|
+
})
|
|
60
|
+
|
|
38
61
|
it('shows the file in the list when set with the list button', async () => {
|
|
39
62
|
const wrapper = mount(UploadWorkflow, {
|
|
40
63
|
props: {
|
|
@@ -1,5 +1,71 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
+
exports[`UploadWorkflow > handles empty upload list without crashing 1`] = `
|
|
4
|
+
<div
|
|
5
|
+
class="
|
|
6
|
+
sy-upload-workflow
|
|
7
|
+
white
|
|
8
|
+
"
|
|
9
|
+
style="width: 100%;"
|
|
10
|
+
>
|
|
11
|
+
<h4 class="
|
|
12
|
+
mb-2
|
|
13
|
+
sy-heading
|
|
14
|
+
text-h6
|
|
15
|
+
">
|
|
16
|
+
Document à nous transmettre
|
|
17
|
+
</h4>
|
|
18
|
+
<ul
|
|
19
|
+
class="upload-list"
|
|
20
|
+
style="width: 100%;"
|
|
21
|
+
></ul>
|
|
22
|
+
<transition-stub
|
|
23
|
+
appear="false"
|
|
24
|
+
css="true"
|
|
25
|
+
persisted="false"
|
|
26
|
+
>
|
|
27
|
+
<!-- v-if -->
|
|
28
|
+
</transition-stub>
|
|
29
|
+
<!---->
|
|
30
|
+
<!---->
|
|
31
|
+
<!---->
|
|
32
|
+
<!---->
|
|
33
|
+
</div>
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
exports[`UploadWorkflow > handles undefined upload list without crashing 1`] = `
|
|
37
|
+
<div
|
|
38
|
+
class="
|
|
39
|
+
sy-upload-workflow
|
|
40
|
+
white
|
|
41
|
+
"
|
|
42
|
+
style="width: 100%;"
|
|
43
|
+
>
|
|
44
|
+
<h4 class="
|
|
45
|
+
mb-2
|
|
46
|
+
sy-heading
|
|
47
|
+
text-h6
|
|
48
|
+
">
|
|
49
|
+
Document à nous transmettre
|
|
50
|
+
</h4>
|
|
51
|
+
<ul
|
|
52
|
+
class="upload-list"
|
|
53
|
+
style="width: 100%;"
|
|
54
|
+
></ul>
|
|
55
|
+
<transition-stub
|
|
56
|
+
appear="false"
|
|
57
|
+
css="true"
|
|
58
|
+
persisted="false"
|
|
59
|
+
>
|
|
60
|
+
<!-- v-if -->
|
|
61
|
+
</transition-stub>
|
|
62
|
+
<!---->
|
|
63
|
+
<!---->
|
|
64
|
+
<!---->
|
|
65
|
+
<!---->
|
|
66
|
+
</div>
|
|
67
|
+
`;
|
|
68
|
+
|
|
3
69
|
exports[`UploadWorkflow > render the upload list 1`] = `
|
|
4
70
|
<div
|
|
5
71
|
class="
|
|
@@ -72,6 +72,9 @@ export default function useFileList(
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
const filledUploadList = computed<FileItem[]>(() => {
|
|
75
|
+
if (!uploadList.value) {
|
|
76
|
+
return []
|
|
77
|
+
}
|
|
75
78
|
return uploadList.value.map((uploadItem) => {
|
|
76
79
|
const matchingUploadedItem = findSelectedFile(uploadItem.id)
|
|
77
80
|
const error = errorSelectedFiles.value.includes(uploadItem.id)
|
|
@@ -94,12 +94,10 @@
|
|
|
94
94
|
</template>
|
|
95
95
|
|
|
96
96
|
<style scoped lang="scss">
|
|
97
|
-
@use '@/assets/tokens';
|
|
98
|
-
|
|
99
97
|
.vd-user-icon {
|
|
100
98
|
width: 40px;
|
|
101
99
|
height: 40px;
|
|
102
|
-
background:
|
|
100
|
+
background: rgb(var(--v-theme-grey-lighten90));
|
|
103
101
|
border-radius: 50%;
|
|
104
102
|
|
|
105
103
|
svg,
|