@cnamts/synapse 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DateFilter-BlOpwEVq.js → DateFilter-CHDLz2EO.js} +1 -1
- package/dist/{NumberFilter-BPUXE4wY.js → NumberFilter-DXNQ4Uls.js} +1 -1
- package/dist/{PeriodFilter-B2yx329_.js → PeriodFilter-C8Qf3Jcn.js} +1 -1
- package/dist/{SelectFilter-CedKn1oV.js → SelectFilter-B2Ejs4Cb.js} +1 -1
- package/dist/{TextFilter-DkhJjRtR.js → TextFilter-CfR5_A1S.js} +1 -1
- package/dist/components/Amelipro/AmeliproAccordionGroup/AmeliproAccordionGroup.d.ts +116 -0
- package/dist/components/Amelipro/AmeliproAccordionGroup/types.d.ts +4 -0
- package/dist/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.d.ts +220 -0
- package/dist/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.d.ts +68 -0
- package/dist/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/AmeliproAccordionResultTemplate.d.ts +70 -0
- package/dist/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.d.ts +204 -0
- package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +26 -26
- package/dist/components/Amelipro/AmeliproBadge/AmeliproBadge.d.ts +59 -0
- package/dist/components/Amelipro/AmeliproBtn/AmeliproBtn.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproCaptcha/AmeliproCaptcha.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproCarousel/AmeliproCarousel.d.ts +214 -0
- package/dist/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/AmeliproCarouselItem.d.ts +70 -0
- package/dist/components/Amelipro/AmeliproCarousel/types.d.ts +7 -0
- package/dist/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.d.ts +125 -0
- package/dist/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproIllustratedDataTile/AmeliproIllustratedDataTile.d.ts +2 -2
- package/dist/components/Amelipro/AmeliproResultList/AmeliproResultList.d.ts +164 -0
- package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +27 -27
- package/dist/components/Amelipro/AmeliproStateTile/AmeliproStateTile.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproTable/AmeliproTable.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +32 -32
- package/dist/components/Amelipro/AmeliproTextArea/AmeliproTextArea.d.ts +6 -6
- package/dist/components/Amelipro/AmeliproTextField/AmeliproTextField.d.ts +7 -7
- package/dist/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproTooltips/AmeliproTooltips.d.ts +2 -2
- package/dist/components/ChipList/ChipList.d.ts +4 -0
- package/dist/components/ChipList/locales.d.ts +4 -2
- package/dist/components/CookiesSelection/CookiesInformation/CookiesInformation.d.ts +8 -8
- package/dist/components/Customs/Selects/SySelect/SySelect.d.ts +445 -8
- package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +2 -0
- package/dist/components/Customs/SyTabs/SyTabs.d.ts +71 -0
- package/dist/components/Customs/SyTabs/config.d.ts +17 -0
- package/dist/components/Customs/SyTabs/types.d.ts +11 -0
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +9 -9
- package/dist/components/DataList/DataList.d.ts +1 -1
- package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +4811 -240
- package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +52 -33
- package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +23 -10
- package/dist/components/DatePicker/composables/useDateInputEditing.d.ts +1 -0
- package/dist/components/DatePicker/composables/useTodayButton.d.ts +1 -0
- package/dist/components/DialogBox/DialogBox.d.ts +219 -0
- package/dist/components/HeaderLoading/HeaderLoading.d.ts +27 -0
- package/dist/components/HeaderNavigationBar/HeaderNavigationBar.d.ts +110 -3
- package/dist/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.d.ts +19 -1
- package/dist/components/LangBtn/LangBtn.d.ts +2 -2
- package/dist/components/NirField/NirField.d.ts +18 -18
- package/dist/components/PeriodField/PeriodField.d.ts +10766 -1620
- package/dist/components/PhoneField/PhoneField.d.ts +1866 -2
- package/dist/components/PhoneField/indicatifs.d.ts +1 -0
- package/dist/components/PhoneField/locales.d.ts +1 -0
- package/dist/components/RangeField/RangeField.d.ts +1 -1
- package/dist/components/RangeField/RangeSlider/RangeSlider.d.ts +1 -1
- package/dist/components/SubHeader/SubHeader.d.ts +8 -0
- package/dist/components/SubHeader/locales.d.ts +1 -0
- package/dist/components/SyTextArea/SyTextArea.d.ts +6 -6
- package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +5 -4
- package/dist/components/Tables/SyTable/SyTable.d.ts +5 -4
- package/dist/components/Tables/common/SyTablePagination.d.ts +448 -7
- package/dist/components/Tables/common/organizeColumns/OrganizeColumns.d.ts +2 -2
- package/dist/components/Tables/common/types.d.ts +2 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/design-system-v3.js +173 -164
- package/dist/design-system-v3.umd.cjs +288 -261
- package/dist/{main-BXPFSAB4.js → main-C66C1BkG.js} +12984 -11291
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/assets/amelipro/icons.ts +38 -11
- package/src/components/Amelipro/AmeliproAccordionGroup/AmeliproAccordionGroup.mdx +20 -0
- package/src/components/Amelipro/AmeliproAccordionGroup/AmeliproAccordionGroup.stories.ts +135 -0
- package/src/components/Amelipro/AmeliproAccordionGroup/AmeliproAccordionGroup.vue +107 -0
- package/src/components/Amelipro/AmeliproAccordionGroup/__tests__/AmeliproAccordionGroup.spec.ts +37 -0
- package/src/components/Amelipro/AmeliproAccordionGroup/__tests__/__snapshots__/AmeliproAccordionGroup.spec.ts.snap +513 -0
- package/src/components/Amelipro/AmeliproAccordionGroup/types.d.ts +4 -0
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.mdx +16 -0
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.stories.ts +300 -0
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.vue +288 -0
- package/src/components/Amelipro/AmeliproAccordionList/__tests__/AmeliproAccordionList.spec.ts +38 -0
- package/src/components/Amelipro/AmeliproAccordionList/__tests__/__snapshots__/AmeliproAccordionList.spec.ts.snap +1712 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.mdx +19 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.stories.ts +68 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.vue +66 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/AmeliproAccordionResultTemplate.vue +145 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/__tests__/AmeliproAccordionResultTemplate.spec.ts +24 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/__tests__/__snapshots__/AmeliproAccordionResultTemplate.spec.ts.snap +127 -0
- package/src/components/Amelipro/AmeliproAccordionResult/__tests__/AmeliproAccordionResult.spec.ts +24 -0
- package/src/components/Amelipro/AmeliproAccordionResult/__tests__/__snapshots__/AmeliproAccordionResult.spec.ts.snap +123 -0
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.mdx +20 -0
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.stories.ts +273 -0
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.vue +275 -0
- package/src/components/Amelipro/AmeliproAccordionResultList/__tests__/AmeliproAccordionResultList.spec.ts +38 -0
- package/src/components/Amelipro/AmeliproAccordionResultList/__tests__/__snapshots__/AmeliproAccordionResultList.spec.ts.snap +1593 -0
- package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.mdx +15 -0
- package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.stories.ts +54 -0
- package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.vue +76 -0
- package/src/components/Amelipro/AmeliproBadge/__tests__/AmeliproBadge.spec.ts +20 -0
- package/src/components/Amelipro/AmeliproBadge/__tests__/__snapshots__/AmeliproBadge.spec.ts.snap +19 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.mdx +15 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.stories.ts +191 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.vue +263 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/AmeliproCarouselItem.vue +93 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/__tests__/AmeliproCarouselItem.spec.ts +24 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/__tests__/__snapshots__/AmeliproCarouselItem.spec.ts.snap +43 -0
- package/src/components/Amelipro/AmeliproCarousel/__tests__/AmeliproCarousel.spec.ts +40 -0
- package/src/components/Amelipro/AmeliproCarousel/__tests__/__snapshots__/AmeliproCarousel.spec.ts.snap +342 -0
- package/src/components/Amelipro/AmeliproCarousel/types.d.ts +8 -0
- package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.mdx +18 -0
- package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.stories.ts +67 -0
- package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.vue +233 -0
- package/src/components/Amelipro/AmeliproClickableTile/tests/AmeliproClickableTile.spec.ts +21 -0
- package/src/components/Amelipro/AmeliproClickableTile/tests/__snapshots__/AmeliproClickableTile.spec.ts.snap +140 -0
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeader.vue +7 -1
- package/src/components/Amelipro/AmeliproHeader/tests/__snapshots__/AmeliproHeader.spec.ts.snap +5 -4
- package/src/components/Amelipro/AmeliproIcon/iconList.ts +6 -0
- package/src/components/Amelipro/AmeliproPageLayout/tests/__snapshots__/AmeliproPageLayout.spec.ts.snap +5 -4
- package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.mdx +15 -0
- package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.stories.ts +264 -0
- package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.vue +231 -0
- package/src/components/Amelipro/AmeliproResultList/__tests__/AmeliproResultList.spec.ts +37 -0
- package/src/components/Amelipro/AmeliproResultList/__tests__/__snapshots__/AmeliproResultList.spec.ts.snap +434 -0
- package/src/components/Amelipro/AmeliproTable/AmeliproTable.vue +6 -5
- package/src/components/Amelipro/AmeliproTable/__tests__/__snapshots__/AmeliproTable.spec.ts.snap +23 -26
- package/src/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.stories.ts +2 -2
- package/src/components/ChipList/Accessibilite.stories.ts +4 -0
- package/src/components/ChipList/ChipList.vue +185 -42
- package/src/components/ChipList/locales.ts +4 -2
- package/src/components/ChipList/tests/chipList.spec.ts +7 -4
- package/src/components/Customs/Selects/SelectOverview.mdx +18 -15
- package/src/components/Customs/Selects/SyBtnSelect/SyBtnSelect.stories.ts +10 -10
- package/src/components/Customs/Selects/SySelect/SySelect.stories.ts +13 -5
- package/src/components/Customs/Selects/SySelect/SySelect.vue +108 -37
- package/src/components/Customs/SyCheckbox/SyCheckbox.mdx +3 -1
- package/src/components/Customs/SyCheckbox/SyCheckbox.stories.ts +165 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +28 -9
- package/src/components/Customs/SyTabs/Accessibilite.mdx +309 -0
- package/src/components/Customs/SyTabs/SyTabs.mdx +117 -0
- package/src/components/Customs/SyTabs/SyTabs.stories.ts +354 -0
- package/src/components/Customs/SyTabs/SyTabs.vue +350 -0
- package/src/components/Customs/SyTabs/config.ts +17 -0
- package/src/components/Customs/SyTabs/tests/SyTabs.spec.ts +425 -0
- package/src/components/Customs/SyTabs/types.ts +12 -0
- package/src/components/Customs/SyTextField/SyTextField.mdx +3 -0
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +142 -1
- package/src/components/Customs/SyTextField/SyTextField.vue +19 -16
- package/src/components/DataList/DataList.vue +47 -49
- package/src/components/DataListGroup/DataListGroup.vue +1 -1
- package/src/components/DataListItem/DataListItem.vue +67 -63
- package/src/components/DataListItem/tests/DataListItem.spec.ts +2 -2
- package/src/components/DatePicker/CalendarMode/DatePicker.stories.ts +3 -3
- package/src/components/DatePicker/CalendarMode/DatePicker.vue +49 -13
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +412 -649
- package/src/components/DatePicker/DatePickerValidationExample/CalendarMode.stories.ts +215 -0
- package/src/components/DatePicker/DatePickerValidationExample/ComplexDatePicker.stories.ts +218 -0
- package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.mdx +2 -0
- package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.stories.ts +1 -1
- package/src/components/DatePicker/DatePickerValidationExample/DateTextInput.stories.ts +218 -0
- package/src/components/DatePicker/DatePickerValidationExample/MultiMode.stories.ts +281 -0
- package/src/components/DatePicker/DateTextInput/DateTextInput.events.spec.ts +17 -4
- package/src/components/DatePicker/DateTextInput/DateTextInput.range.spec.ts +111 -18
- package/src/components/DatePicker/DateTextInput/DateTextInput.spec.ts +238 -6
- package/src/components/DatePicker/DateTextInput/DateTextInput.vue +716 -757
- package/src/components/DatePicker/composables/tests/useDateInputEditing.spec.ts +4 -4
- package/src/components/DatePicker/composables/tests/useDisplayedDateString.spec.ts +17 -10
- package/src/components/DatePicker/composables/useDateInputEditing.ts +52 -22
- package/src/components/DatePicker/composables/useDisplayedDateString.ts +18 -4
- package/src/components/DatePicker/composables/useTodayButton.ts +13 -1
- package/src/components/DatePicker/utils/dateFormattingUtils.ts +79 -14
- package/src/components/DialogBox/DialogBox.stories.ts +12 -0
- package/src/components/DialogBox/DialogBox.vue +16 -11
- package/src/components/DialogBox/tests/DialogBox.spec.ts +22 -0
- package/src/components/HeaderLoading/Accessibilite.mdx +429 -8
- package/src/components/HeaderLoading/Accessibilite.stories.ts +4 -0
- package/src/components/HeaderLoading/HeaderLoading.vue +59 -0
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.mdx +17 -2
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.stories.ts +91 -2
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +37 -1
- package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +276 -21
- package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.spec.ts +2 -2
- package/src/components/NirField/NirField.mdx +3 -0
- package/src/components/NirField/NirField.vue +10 -1
- package/src/components/NirField/tests/NirField.spec.ts +81 -0
- package/src/components/PasswordField/PasswordField.mdx +3 -0
- package/src/components/PeriodField/PeriodField.mdx +2 -0
- package/src/components/PeriodField/PeriodField.stories.ts +195 -0
- package/src/components/PhoneField/Accessibilite.stories.ts +4 -0
- package/src/components/PhoneField/PhoneField.mdx +3 -1
- package/src/components/PhoneField/PhoneField.stories.ts +285 -1
- package/src/components/PhoneField/PhoneField.vue +228 -95
- package/src/components/PhoneField/indicatifs.ts +102 -102
- package/src/components/PhoneField/locales.ts +1 -0
- package/src/components/PhoneField/tests/PhoneField.spec.ts +429 -2
- package/src/components/SkipLink/SkipLink.vue +3 -31
- package/src/components/SkipLink/tests/skipLink.spec.ts +0 -21
- package/src/components/SubHeader/Accessibilite.stories.ts +8 -0
- package/src/components/SubHeader/SubHeader.mdx +1 -0
- package/src/components/SubHeader/SubHeader.stories.ts +179 -60
- package/src/components/SubHeader/SubHeader.vue +45 -15
- package/src/components/SubHeader/locales.ts +1 -0
- package/src/components/SyAlert/SyAlert.vue +6 -0
- package/src/components/Tables/SyServerTable/SyServerTable.mdx +3 -10
- package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +242 -0
- package/src/components/Tables/SyServerTable/SyServerTable.vue +29 -10
- package/src/components/Tables/SyTable/SyTable.mdx +3 -10
- package/src/components/Tables/SyTable/SyTable.stories.ts +242 -0
- package/src/components/Tables/SyTable/SyTable.vue +2 -0
- package/src/components/Tables/common/SyTablePagination.vue +13 -6
- package/src/components/Tables/common/tests/SyTablePagination.spec.ts +157 -0
- package/src/components/Tables/common/types.ts +2 -0
- package/src/components/index.ts +9 -0
- package/src/composables/useFilterable/useFilterable.ts +10 -0
- package/src/designTokens/tokens/amelipro/apColors.ts +1 -1
- package/src/designTokens/tokens/cnam/cnamSemantic.ts +3 -3
- package/src/stories/Components/Components.stories.ts +1 -1
- package/src/stories/GuideDuDev/FormValidationGuide.mdx +342 -0
- package/src/stories/Templates/Templates.stories.ts +1 -1
- package/src/utils/functions/ameliproColors/ameliproColors.ts +1 -1
- package/dist/components/DataList/locales.d.ts +0 -3
- package/src/components/DataList/locales.ts +0 -3
- package/src/components/PhoneField/tests/PhoneField.additional.spec.ts +0 -266
package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.stories.ts
ADDED
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import AmeliproAccordionResultList from './AmeliproAccordionResultList.vue'
|
|
3
|
+
import type { IDataListItem } from '../types'
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
argTypes: {
|
|
7
|
+
'`accordionContent-${accordion.id}`': { description: 'Slot individuel pour le contenu des accordéons' },
|
|
8
|
+
'`headingContent-${accordion.id}`': { description: 'Slot individuel pour la partie droite du header des accordéons' },
|
|
9
|
+
'accordionContent': { description: 'Slot générique permettant de donner le même aspect à tout le contenu des accordéons' },
|
|
10
|
+
'change:pagination-select': {
|
|
11
|
+
table: { category: 'events' },
|
|
12
|
+
description: 'Événement émis sur le change du select de nombre de résultat par page',
|
|
13
|
+
},
|
|
14
|
+
'change:sort-select': {
|
|
15
|
+
table: { category: 'events' },
|
|
16
|
+
description: 'Événement émis sur le change du select de tri de la liste',
|
|
17
|
+
},
|
|
18
|
+
'click': {
|
|
19
|
+
table: { category: 'events' },
|
|
20
|
+
description: 'Événement émis au click sur la pagination',
|
|
21
|
+
},
|
|
22
|
+
'counterLabel': { description: 'Label du compteur de résultats en haut de la liste de résultats' },
|
|
23
|
+
'defaultItemOpened': { description: 'Index du bloc dépliant ouvert par défaut' },
|
|
24
|
+
'groupBorderColor': { description: 'Couleur des bordures des blocs dépliants' },
|
|
25
|
+
'groupBordered': { description: 'Défini des bordure sur les blocs dépliants' },
|
|
26
|
+
'groupColor': { description: 'Couleur de fond des blocs dépliants' },
|
|
27
|
+
'headingContent': { description: 'Slot générique permettant de donner le même aspect à toutes les parties droite du header des accordéons' },
|
|
28
|
+
'hiddenLabels': { description: 'Masque les labels des champs select' },
|
|
29
|
+
'hideSeparator': { description: 'Masque le séparateur entre le titre et le contenu des panneaux dépliants' },
|
|
30
|
+
'items': {
|
|
31
|
+
description: 'Tableau comprenant la liste des résultats',
|
|
32
|
+
table: {
|
|
33
|
+
type: {
|
|
34
|
+
detail: `Array<{
|
|
35
|
+
accordionTitle: string,
|
|
36
|
+
id: number,
|
|
37
|
+
[key: string]: string
|
|
38
|
+
}>`,
|
|
39
|
+
summary: 'IDataListItem[]',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
'itemsToDisplayDesktop': { description: 'Nombre d’éléments affichés par page en desktop par défaut' },
|
|
44
|
+
'itemsToDisplayMobile': { description: 'Nombre d’éléments affichés par page en mobile par défaut' },
|
|
45
|
+
'noResultListInfos': { description: 'Masques les informations et les filtres au-dessus de la liste de résultats' },
|
|
46
|
+
'paginationSelectLabel': { description: 'Label du select de pagination' },
|
|
47
|
+
'paginationSelectPlaceholder': { description: 'Placeholder du select de pagination' },
|
|
48
|
+
'sortSelectItems': { description: 'Items du select dédié aux tris' },
|
|
49
|
+
'sortSelectLabel': { description: 'Label du select de tri' },
|
|
50
|
+
'sortSelectPlaceholder': { description: 'Placeholder du select de tri' },
|
|
51
|
+
'title': { description: 'Label de la liste' },
|
|
52
|
+
'uniqueId': { description: 'Identifiant unique de la liste' },
|
|
53
|
+
|
|
54
|
+
},
|
|
55
|
+
component: AmeliproAccordionResultList,
|
|
56
|
+
title: 'Composants/Amelipro/Listes de résultats/AmeliproAccordionResultList',
|
|
57
|
+
} as Meta<typeof AmeliproAccordionResultList>
|
|
58
|
+
|
|
59
|
+
export default meta
|
|
60
|
+
|
|
61
|
+
type Story = StoryObj<typeof AmeliproAccordionResultList>
|
|
62
|
+
|
|
63
|
+
const items: IDataListItem[] = [
|
|
64
|
+
{
|
|
65
|
+
email: 'jean.bernard@gmail.com',
|
|
66
|
+
firstname: 'Jean',
|
|
67
|
+
id: 0,
|
|
68
|
+
name: 'Bernard',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
email: 'simon.pierre@gmail.com',
|
|
72
|
+
firstname: 'Simon',
|
|
73
|
+
id: 1,
|
|
74
|
+
name: 'Pierre',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
email: 'michel.souris@gmail.com',
|
|
78
|
+
firstname: 'Michel',
|
|
79
|
+
id: 2,
|
|
80
|
+
name: 'Souris',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
email: 'amandine.jabot@gmail.com',
|
|
84
|
+
firstname: 'Amandine',
|
|
85
|
+
id: 3,
|
|
86
|
+
name: 'Jabot',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
email: 'jean.bernard@gmail.com',
|
|
90
|
+
firstname: 'Jean',
|
|
91
|
+
id: 4,
|
|
92
|
+
name: 'Bernard',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
email: 'simon.pierre@gmail.com',
|
|
96
|
+
firstname: 'Simon',
|
|
97
|
+
id: 5,
|
|
98
|
+
name: 'Pierre',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
email: 'michel.souris@gmail.com',
|
|
102
|
+
firstname: 'Michel',
|
|
103
|
+
id: 6,
|
|
104
|
+
name: 'Souris',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
email: 'amandine.jabot@gmail.com',
|
|
108
|
+
firstname: 'Amandine',
|
|
109
|
+
id: 7,
|
|
110
|
+
name: 'Jabot',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
email: 'jean.bernard@gmail.com',
|
|
114
|
+
firstname: 'Jean',
|
|
115
|
+
id: 8,
|
|
116
|
+
name: 'Bernard',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
email: 'simon.pierre@gmail.com',
|
|
120
|
+
firstname: 'Simon',
|
|
121
|
+
id: 9,
|
|
122
|
+
name: 'Pierre',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
email: 'michel.souris@gmail.com',
|
|
126
|
+
firstname: 'Michel',
|
|
127
|
+
id: 10,
|
|
128
|
+
name: 'Souris',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
email: 'amandine.jabot@gmail.com',
|
|
132
|
+
firstname: 'Amandine',
|
|
133
|
+
id: 11,
|
|
134
|
+
name: 'Jabot',
|
|
135
|
+
},
|
|
136
|
+
]
|
|
137
|
+
|
|
138
|
+
export const Default: Story = {
|
|
139
|
+
args: {
|
|
140
|
+
items,
|
|
141
|
+
title: 'Exemple de liste de résultats',
|
|
142
|
+
uniqueId: 'amelipro-accordion-result-list-unique-id',
|
|
143
|
+
},
|
|
144
|
+
parameters: {
|
|
145
|
+
sourceCode: [
|
|
146
|
+
{
|
|
147
|
+
name: 'Template',
|
|
148
|
+
code: `<template>
|
|
149
|
+
<AmeliproAccordionResultList
|
|
150
|
+
:items="items"
|
|
151
|
+
title="Exemple de liste de résultats"
|
|
152
|
+
unique-id="amelipro-accordion-result-list-unique-id"
|
|
153
|
+
>
|
|
154
|
+
<template #headingContent="item">
|
|
155
|
+
<p class="mb-0">
|
|
156
|
+
{{ item.firstname }} {{ item.name }}
|
|
157
|
+
</p>
|
|
158
|
+
</template>
|
|
159
|
+
|
|
160
|
+
<template #accordionContent="item">
|
|
161
|
+
<p class="mb-0">
|
|
162
|
+
{{ item.email }}
|
|
163
|
+
</p>
|
|
164
|
+
</template>
|
|
165
|
+
</AmeliproAccordionResultList>
|
|
166
|
+
</template>`,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: 'Script',
|
|
170
|
+
code: `<script setup lang="ts">
|
|
171
|
+
import { AmeliproAccordionResultList } from '@cnamts/synapse'
|
|
172
|
+
|
|
173
|
+
const items = [
|
|
174
|
+
{
|
|
175
|
+
email: 'jean.bernard@gmail.com',
|
|
176
|
+
firstname: 'Jean',
|
|
177
|
+
id: 0,
|
|
178
|
+
name: 'Bernard',
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
email: 'simon.pierre@gmail.com',
|
|
182
|
+
firstname: 'Simon',
|
|
183
|
+
id: 1,
|
|
184
|
+
name: 'Pierre',
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
email: 'michel.souris@gmail.com',
|
|
188
|
+
firstname: 'Michel',
|
|
189
|
+
id: 2,
|
|
190
|
+
name: 'Souris',
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
email: 'amandine.jabot@gmail.com',
|
|
194
|
+
firstname: 'Amandine',
|
|
195
|
+
id: 3,
|
|
196
|
+
name: 'Jabot',
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
email: 'jean.bernard@gmail.com',
|
|
200
|
+
firstname: 'Jean',
|
|
201
|
+
id: 4,
|
|
202
|
+
name: 'Bernard',
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
email: 'simon.pierre@gmail.com',
|
|
206
|
+
firstname: 'Simon',
|
|
207
|
+
id: 5,
|
|
208
|
+
name: 'Pierre',
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
email: 'michel.souris@gmail.com',
|
|
212
|
+
firstname: 'Michel',
|
|
213
|
+
id: 6,
|
|
214
|
+
name: 'Souris',
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
email: 'amandine.jabot@gmail.com',
|
|
218
|
+
firstname: 'Amandine',
|
|
219
|
+
id: 7,
|
|
220
|
+
name: 'Jabot',
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
email: 'jean.bernard@gmail.com',
|
|
224
|
+
firstname: 'Jean',
|
|
225
|
+
id: 8,
|
|
226
|
+
name: 'Bernard',
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
email: 'simon.pierre@gmail.com',
|
|
230
|
+
firstname: 'Simon',
|
|
231
|
+
id: 9,
|
|
232
|
+
name: 'Pierre',
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
email: 'michel.souris@gmail.com',
|
|
236
|
+
firstname: 'Michel',
|
|
237
|
+
id: 10,
|
|
238
|
+
name: 'Souris',
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
email: 'amandine.jabot@gmail.com',
|
|
242
|
+
firstname: 'Amandine',
|
|
243
|
+
id: 11,
|
|
244
|
+
name: 'Jabot',
|
|
245
|
+
},
|
|
246
|
+
]
|
|
247
|
+
</script>`,
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
},
|
|
251
|
+
render: args => ({
|
|
252
|
+
components: { AmeliproAccordionResultList },
|
|
253
|
+
setup() {
|
|
254
|
+
return { args }
|
|
255
|
+
},
|
|
256
|
+
template: `
|
|
257
|
+
<AmeliproAccordionResultList
|
|
258
|
+
v-bind="args"
|
|
259
|
+
>
|
|
260
|
+
<template #headingContent="item">
|
|
261
|
+
<p class="mb-0">
|
|
262
|
+
{{ item.firstname }} {{ item.name }}
|
|
263
|
+
</p>
|
|
264
|
+
</template>
|
|
265
|
+
|
|
266
|
+
<template #accordionContent="item">
|
|
267
|
+
<p class="mb-0">
|
|
268
|
+
{{ item.email }}
|
|
269
|
+
</p>
|
|
270
|
+
</template>
|
|
271
|
+
</AmeliproAccordionResultList>`,
|
|
272
|
+
}),
|
|
273
|
+
}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { type PropType, onMounted, onUpdated, ref, watch } from 'vue'
|
|
3
|
+
import AmeliproAccordionResultTemplate from '../AmeliproAccordionResult/AmeliproAccordionResultTemplate/AmeliproAccordionResultTemplate.vue'
|
|
4
|
+
import type { IDataListItem } from '../types'
|
|
5
|
+
import AmeliproPagination from '../AmeliproPagination/AmeliproPagination.vue'
|
|
6
|
+
import AmeliproSelect from '../AmeliproSelect/AmeliproSelect.vue'
|
|
7
|
+
import type { SelectItem } from '../AmeliproSelect/types'
|
|
8
|
+
import { useDisplay } from 'vuetify'
|
|
9
|
+
import { usePagination } from '../../../composables'
|
|
10
|
+
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
counterLabel: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: 'résultat(s)',
|
|
15
|
+
},
|
|
16
|
+
defaultItemOpened: {
|
|
17
|
+
type: [Number, null] as PropType<number | null>,
|
|
18
|
+
default: null,
|
|
19
|
+
},
|
|
20
|
+
groupBorderColor: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: 'ap-grey',
|
|
23
|
+
},
|
|
24
|
+
groupBordered: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: true,
|
|
27
|
+
},
|
|
28
|
+
groupColor: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: 'ap-white',
|
|
31
|
+
},
|
|
32
|
+
hiddenLabels: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false,
|
|
35
|
+
},
|
|
36
|
+
hideSeparator: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false,
|
|
39
|
+
},
|
|
40
|
+
items: {
|
|
41
|
+
type: Array as PropType<IDataListItem[]>,
|
|
42
|
+
default: () => [],
|
|
43
|
+
},
|
|
44
|
+
itemsToDisplayDesktop: {
|
|
45
|
+
type: Number,
|
|
46
|
+
default: 10,
|
|
47
|
+
},
|
|
48
|
+
itemsToDisplayMobile: {
|
|
49
|
+
type: Number,
|
|
50
|
+
default: 10,
|
|
51
|
+
},
|
|
52
|
+
noResultListInfos: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: false,
|
|
55
|
+
},
|
|
56
|
+
paginationSelectLabel: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: 'Nb lignes/page :',
|
|
59
|
+
},
|
|
60
|
+
paginationSelectPlaceholder: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: 'Nb lignes/page',
|
|
63
|
+
},
|
|
64
|
+
sortSelectItems: {
|
|
65
|
+
type: Array as PropType<SelectItem[]>,
|
|
66
|
+
default: () => [],
|
|
67
|
+
},
|
|
68
|
+
sortSelectLabel: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: 'Trier par :',
|
|
71
|
+
},
|
|
72
|
+
sortSelectPlaceholder: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: 'Trier par',
|
|
75
|
+
},
|
|
76
|
+
title: {
|
|
77
|
+
type: String,
|
|
78
|
+
required: true,
|
|
79
|
+
},
|
|
80
|
+
uniqueId: {
|
|
81
|
+
type: String,
|
|
82
|
+
required: true,
|
|
83
|
+
},
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
const openId = ref<string | null>(null)
|
|
87
|
+
const { mdAndUp } = useDisplay()
|
|
88
|
+
|
|
89
|
+
const {
|
|
90
|
+
currentPage,
|
|
91
|
+
currentPageItems,
|
|
92
|
+
itemToDisplay,
|
|
93
|
+
paginationSelectItems,
|
|
94
|
+
paginationTable,
|
|
95
|
+
setDefaultItemsPerPage,
|
|
96
|
+
updatePagination,
|
|
97
|
+
} = usePagination(props.items, props.itemsToDisplayDesktop, props.itemsToDisplayMobile)
|
|
98
|
+
|
|
99
|
+
const paginationSelectModel = ref(itemToDisplay.value)
|
|
100
|
+
const sortSelectModel = ref()
|
|
101
|
+
|
|
102
|
+
onMounted(() => {
|
|
103
|
+
if (props.defaultItemOpened !== null) {
|
|
104
|
+
openId.value = String(props.items[props.defaultItemOpened].id)
|
|
105
|
+
}
|
|
106
|
+
hideSelectLabel()
|
|
107
|
+
setDefaultItemsPerPage()
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
onUpdated(() => {
|
|
111
|
+
hideSelectLabel()
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
watch(() => props.items, () => {
|
|
115
|
+
updatePagination(props.items, paginationSelectModel.value)
|
|
116
|
+
if (currentPage.value > paginationTable.value.length) {
|
|
117
|
+
currentPage.value = Math.max(1, paginationTable.value.length)
|
|
118
|
+
}
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
const openClose = (id: number): void => {
|
|
122
|
+
openId.value = openId.value === String(id) ? null : String(id)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const hideSelectLabel = (): void => {
|
|
126
|
+
if (props.hiddenLabels) {
|
|
127
|
+
document.getElementById(`${props.uniqueId}-sort-select-label`)?.setAttribute('class', 'd-sr-only')
|
|
128
|
+
document.getElementById(`${props.uniqueId}-pagination-select-label`)?.setAttribute('class', 'd-sr-only')
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const emit = defineEmits(['click', 'change:sort-select', 'change:pagination-select', 'open-close'])
|
|
133
|
+
const emitClickEvent = (newCurrentPage: number): void => {
|
|
134
|
+
emit('click')
|
|
135
|
+
if (newCurrentPage !== null && newCurrentPage !== undefined) {
|
|
136
|
+
currentPage.value = newCurrentPage
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const emitSortSelectChange = (): void => {
|
|
141
|
+
emit('change:sort-select', sortSelectModel.value)
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const emitPaginationSelectChange = (): void => {
|
|
145
|
+
emit('change:pagination-select')
|
|
146
|
+
updatePagination(props.items, paginationSelectModel.value)
|
|
147
|
+
|
|
148
|
+
if ((currentPage.value !== null && currentPage.value !== undefined) && currentPage.value > paginationTable.value.length) {
|
|
149
|
+
currentPage.value = paginationTable.value.length
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (currentPage.value === 0) {
|
|
153
|
+
currentPage.value = 1
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Rendre publique la méthode openClose permet à un bouton ou à un composant externe de fermer/ouvrir l'accordéon
|
|
158
|
+
defineExpose({ openClose })
|
|
159
|
+
</script>
|
|
160
|
+
|
|
161
|
+
<template>
|
|
162
|
+
<div
|
|
163
|
+
:id="`${uniqueId}-container`"
|
|
164
|
+
class="amelipro-accordion-result-list"
|
|
165
|
+
>
|
|
166
|
+
<div
|
|
167
|
+
v-if="!noResultListInfos"
|
|
168
|
+
:id="`${uniqueId}-header`"
|
|
169
|
+
class="amelipro-accordion-result-list__headings d-flex justify-space-between align-end mb-6"
|
|
170
|
+
>
|
|
171
|
+
<p
|
|
172
|
+
:id="`${uniqueId}-result-counter`"
|
|
173
|
+
class="d-inline-block mb-0 total-counter font-weight-semibold"
|
|
174
|
+
>
|
|
175
|
+
<span class="d-sr-only">Nombre de lignes dans la liste ci-après :</span>
|
|
176
|
+
{{ items.length }} {{ counterLabel }}
|
|
177
|
+
</p>
|
|
178
|
+
|
|
179
|
+
<div class="d-inline-flex align-center amelipro-accordion-result-list__selects">
|
|
180
|
+
<AmeliproSelect
|
|
181
|
+
v-if="sortSelectItems.length > 0"
|
|
182
|
+
v-model="sortSelectModel"
|
|
183
|
+
class="ml-2 mb-0 pt-0 amelipro-accordion-result-list__sort-select"
|
|
184
|
+
global-max-width="170px"
|
|
185
|
+
:hide-error-message="true"
|
|
186
|
+
:items="sortSelectItems"
|
|
187
|
+
:label="sortSelectLabel"
|
|
188
|
+
:placeholder="sortSelectPlaceholder"
|
|
189
|
+
:unique-id="`${uniqueId}-sort-select`"
|
|
190
|
+
@update:model-value="emitSortSelectChange"
|
|
191
|
+
/>
|
|
192
|
+
|
|
193
|
+
<AmeliproSelect
|
|
194
|
+
v-if="mdAndUp"
|
|
195
|
+
v-model="paginationSelectModel"
|
|
196
|
+
class="ml-2 mb-0 pt-0 amelipro-accordion-result-list__pagination-select"
|
|
197
|
+
global-max-width="170px"
|
|
198
|
+
:hide-error-message="true"
|
|
199
|
+
:items="paginationSelectItems"
|
|
200
|
+
:label="paginationSelectLabel"
|
|
201
|
+
:placeholder="paginationSelectPlaceholder"
|
|
202
|
+
:unique-id="`${uniqueId}-pagination-select`"
|
|
203
|
+
@update:model-value="emitPaginationSelectChange"
|
|
204
|
+
/>
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
<div class="amelipro-accordion-result-list__list-wrapper">
|
|
208
|
+
<ul
|
|
209
|
+
:id="`${uniqueId}-list`"
|
|
210
|
+
:aria-label="title"
|
|
211
|
+
class="list-style-none amelipro-accordion-result-list__list"
|
|
212
|
+
>
|
|
213
|
+
<li
|
|
214
|
+
v-for="(accordion, index) in currentPageItems(items)"
|
|
215
|
+
:key="index"
|
|
216
|
+
class="amelipro-accordion-result-list__item"
|
|
217
|
+
>
|
|
218
|
+
<AmeliproAccordionResultTemplate
|
|
219
|
+
:border-color="groupBorderColor"
|
|
220
|
+
:bordered="groupBordered"
|
|
221
|
+
:card-color="groupColor"
|
|
222
|
+
:hide-separator="hideSeparator"
|
|
223
|
+
:is-open="`accordion-result-${accordion.id}` === openId"
|
|
224
|
+
:unique-id="`accordion-result-${accordion.id}`"
|
|
225
|
+
@open-close="openClose"
|
|
226
|
+
>
|
|
227
|
+
<template #headingContent>
|
|
228
|
+
<slot
|
|
229
|
+
:name="`headingContent-${accordion.id}`"
|
|
230
|
+
v-bind="accordion"
|
|
231
|
+
>
|
|
232
|
+
<slot
|
|
233
|
+
name="headingContent"
|
|
234
|
+
v-bind="accordion"
|
|
235
|
+
/>
|
|
236
|
+
</slot>
|
|
237
|
+
</template>
|
|
238
|
+
|
|
239
|
+
<template #default>
|
|
240
|
+
<slot
|
|
241
|
+
:name="`accordionContent-${accordion.id}`"
|
|
242
|
+
v-bind="accordion"
|
|
243
|
+
>
|
|
244
|
+
<slot
|
|
245
|
+
name="accordionContent"
|
|
246
|
+
v-bind="accordion"
|
|
247
|
+
/>
|
|
248
|
+
</slot>
|
|
249
|
+
</template>
|
|
250
|
+
</AmeliproAccordionResultTemplate>
|
|
251
|
+
</li>
|
|
252
|
+
</ul>
|
|
253
|
+
</div>
|
|
254
|
+
|
|
255
|
+
<AmeliproPagination
|
|
256
|
+
v-if="paginationTable !== undefined && paginationTable.length > 0"
|
|
257
|
+
:active-page-default="1"
|
|
258
|
+
class="mt-2"
|
|
259
|
+
:items="paginationTable"
|
|
260
|
+
:unique-id="`${uniqueId}-pagination`"
|
|
261
|
+
@click="emitClickEvent"
|
|
262
|
+
/>
|
|
263
|
+
</div>
|
|
264
|
+
</template>
|
|
265
|
+
|
|
266
|
+
<style lang="scss" scoped>
|
|
267
|
+
@use '@/assets/amelipro/apTokens';
|
|
268
|
+
|
|
269
|
+
.total-counter {
|
|
270
|
+
background-color: apTokens.$ap-grey-lighten2;
|
|
271
|
+
border: 1px solid apTokens.$ap-grey-darken1;
|
|
272
|
+
border-radius: apTokens.$btn-radius;
|
|
273
|
+
padding: 0.75rem 1rem;
|
|
274
|
+
}
|
|
275
|
+
</style>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils'
|
|
2
|
+
import { expect, describe, it } from 'vitest'
|
|
3
|
+
import { vuetify } from '@tests/unit/setup'
|
|
4
|
+
import AmeliproAccordionResultList from '../AmeliproAccordionResultList.vue'
|
|
5
|
+
|
|
6
|
+
describe('AmeliproAccordionResultList', () => {
|
|
7
|
+
it('render correctly', async () => {
|
|
8
|
+
const wrapper = mount(AmeliproAccordionResultList, {
|
|
9
|
+
global: {
|
|
10
|
+
plugins: [vuetify],
|
|
11
|
+
},
|
|
12
|
+
props: {
|
|
13
|
+
items: [
|
|
14
|
+
{ id: 0 },
|
|
15
|
+
{ id: 1 },
|
|
16
|
+
{ id: 2 },
|
|
17
|
+
{ id: 3 },
|
|
18
|
+
{ id: 4 },
|
|
19
|
+
{ id: 5 },
|
|
20
|
+
{ id: 6 },
|
|
21
|
+
{ id: 7 },
|
|
22
|
+
{ id: 8 },
|
|
23
|
+
{ id: 9 },
|
|
24
|
+
{ id: 10 },
|
|
25
|
+
{ id: 11 },
|
|
26
|
+
],
|
|
27
|
+
title: 'Exemple de liste de résultats',
|
|
28
|
+
uniqueId: 'amelipro-accordion-list-unique-id',
|
|
29
|
+
},
|
|
30
|
+
slots: {
|
|
31
|
+
accordionContent: '<p>Contenu du dépliant</p>',
|
|
32
|
+
headingContent: '<h3>Titre du dépliant</h3>',
|
|
33
|
+
},
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
37
|
+
})
|
|
38
|
+
})
|