@cnamts/synapse 1.0.11 → 1.0.13
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-QEfKOz0P.js → DateFilter-_EFzsvvM.js} +1 -1
- package/dist/{NumberFilter-C0h7gVzp.js → NumberFilter-CUxEbKJh.js} +1 -1
- package/dist/{PeriodFilter-8dVrKjju.js → PeriodFilter-D5ueqtKy.js} +1 -1
- package/dist/{SelectFilter-BI3QGbqb.js → SelectFilter-BciBNydy.js} +1 -1
- package/dist/{TextFilter-UOp1hcPp.js → TextFilter-DMN_WAQB.js} +1 -1
- package/dist/components/Amelipro/AmeliproAccordion/AmeliproAccordion.d.ts +7 -3
- package/dist/components/Amelipro/AmeliproAccordion/AmeliproAccordionTemplate/AmeliproAccordionTemplate.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.d.ts +2 -0
- package/dist/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.d.ts +7 -3
- package/dist/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/AmeliproAccordionResultTemplate.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +50 -68
- package/dist/components/Amelipro/AmeliproCard/AmeliproCard.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproIcon/AmeliproIcon.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.d.ts +5 -5
- package/dist/components/Amelipro/AmeliproMultipleFoldingCard/AmeliproMultipleFoldingCard.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproNumberedCard/AmeliproNumberedCard.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressCityRow/AmeliproPostalAddressCityRow.d.ts +24 -32
- package/dist/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.d.ts +36 -48
- package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +50 -68
- package/dist/components/Amelipro/AmeliproTable/AmeliproTable.d.ts +4 -0
- package/dist/components/Amelipro/AmeliproTable/types.d.ts +11 -0
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +50 -68
- package/dist/components/Amelipro/AmeliproTextArea/AmeliproTextArea.d.ts +0 -4
- package/dist/components/Amelipro/AmeliproTextField/AmeliproTextField.d.ts +12 -16
- package/dist/components/Captcha/Captcha.d.ts +68 -0
- package/dist/components/Captcha/CaptchaAlert.d.ts +13 -0
- package/dist/components/Captcha/CaptchaBase.d.ts +55 -0
- package/dist/components/Captcha/CaptchaBtn.d.ts +12 -0
- package/dist/components/Captcha/CaptchaForm.d.ts +16 -0
- package/dist/components/Captcha/CaptchaImg.d.ts +12 -0
- package/dist/components/Captcha/CaptchaInformation.d.ts +20 -0
- package/dist/components/Captcha/captchaApi.d.ts +41 -0
- package/dist/components/Captcha/icons/volumeUp.d.ts +2 -0
- package/dist/components/Captcha/locales.d.ts +35 -0
- package/dist/components/Captcha/types.d.ts +2 -0
- package/dist/components/ChipList/ChipList.d.ts +2 -2
- package/dist/components/CookiesSelection/CookiesInformation/CookiesInformation.d.ts +14 -14
- package/dist/components/Customs/Selects/SySelect/SySelect.d.ts +5 -5
- package/dist/components/Customs/SyForm/SyForm.d.ts +6 -3
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +12 -16
- package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +96 -68
- package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +63 -38
- package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +23 -27
- package/dist/components/DatePicker/composables/useDatePickerViewMode.d.ts +2 -1
- package/dist/components/DatePicker/tests/setup.d.ts +816 -520
- package/dist/components/HeaderToolbar/HeaderToolbar.d.ts +10 -10
- package/dist/components/NirField/NirField.d.ts +31 -34
- package/dist/components/NirField/locales.d.ts +1 -3
- package/dist/components/PasswordField/PasswordField.d.ts +2 -0
- package/dist/components/PeriodField/PeriodField.d.ts +192 -128
- package/dist/components/PhoneField/PhoneField.d.ts +13 -17
- package/dist/components/SearchListField/SearchListField.d.ts +5 -5
- package/dist/components/SyTextArea/SyTextArea.d.ts +0 -4
- package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +5 -8
- package/dist/components/Tables/SyTable/SyTable.d.ts +5 -8
- package/dist/components/Tables/common/SyTablePagination.d.ts +5 -5
- package/dist/components/Tables/common/types.d.ts +4 -0
- package/dist/components/Tables/common/usePagination.d.ts +3 -4
- package/dist/components/Tables/common/useTableCheckbox.d.ts +10 -6
- package/dist/components/index.d.ts +1 -0
- package/dist/composables/validation/useFormValidation.d.ts +10 -0
- package/dist/composables/validation/useValidatable.d.ts +10 -2
- package/dist/design-system-v3.js +126 -125
- package/dist/design-system-v3.umd.cjs +265 -265
- package/dist/main-DISHlqcd.js +34217 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/assets/overrides/_forms.scss +2 -0
- package/src/components/Amelipro/AmeliproAccordion/AmeliproAccordion.stories.ts +7 -4
- package/src/components/Amelipro/AmeliproAccordion/AmeliproAccordion.vue +2 -0
- package/src/components/Amelipro/AmeliproAccordionFrieze/AmeliproAccordionFrieze.vue +1 -0
- package/src/components/Amelipro/AmeliproAccordionFrieze/__tests__/__snapshots__/AmeliproAccordionFrieze.spec.ts.snap +574 -112
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.stories.ts +5 -2
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.vue +2 -1
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.stories.ts +6 -3
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.vue +2 -0
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.stories.ts +5 -2
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.vue +2 -1
- package/src/components/Amelipro/AmeliproCheckbox/__tests__/AmeliproCheckbox.spec.ts +175 -0
- package/src/components/Amelipro/AmeliproCheckbox/__tests__/__snapshots__/AmeliproCheckbox.spec.ts.snap +88 -0
- package/src/components/Amelipro/AmeliproCheckboxGroup/__tests__/AmeliproCheckboxGroup.spec.ts +423 -0
- package/src/components/Amelipro/AmeliproCheckboxGroup/{tests → __tests__}/__snapshots__/AmeliproCheckboxGroup.spec.ts.snap +112 -78
- package/src/components/Amelipro/AmeliproChips/__tests__/AmeliproChips.spec.ts +92 -0
- package/src/components/Amelipro/AmeliproChips/__tests__/__snapshots__/AmeliproChips.spec.ts.snap +81 -0
- package/src/components/Amelipro/AmeliproDialog/__tests__/AmeliproDialog.spec.ts +257 -0
- package/src/components/Amelipro/AmeliproDialog/__tests__/__snapshots__/AmeliproDialog.spec.ts.snap +61 -0
- package/src/components/Amelipro/AmeliproDisclosure/__tests__/AmeliproDisclosure.spec.ts +79 -0
- package/src/components/Amelipro/AmeliproDisclosure/__tests__/__snapshots__/AmeliproDisclosure.spec.ts.snap +89 -0
- package/src/components/Amelipro/AmeliproFooter/AmeliproFooter.vue +6 -7
- package/src/components/Amelipro/AmeliproFooter/__tests__/AmeliproFooter.spec.ts +787 -0
- package/src/components/Amelipro/AmeliproFooter/__tests__/__snapshots__/AmeliproFooter.spec.ts.snap +318 -0
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/__tests__/AmeliproHeaderBrandSection.spec.ts +167 -0
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/__tests__/__snapshots__/AmeliproHeaderBrandSection.spec.ts.snap +100 -0
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/__tests__/AmeliproHeaderBar.spec.ts +312 -0
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/__tests__/__snapshots__/AmeliproHeaderBar.spec.ts.snap +98 -0
- package/src/components/Amelipro/AmeliproHeader/__tests__/AmeliproHeader.spec.ts +361 -0
- package/src/components/Amelipro/AmeliproHeader/__tests__/__snapshots__/AmeliproHeader.spec.ts.snap +22 -0
- package/src/components/Amelipro/AmeliproMenu/__tests__/AmeliproMenu.spec.ts +168 -0
- package/src/components/Amelipro/AmeliproMenu/__tests__/__snapshots__/AmeliproMenu.spec.ts.snap +295 -0
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproDropdownMenu/AmeliproDropdownMenuBtn/__tests__/AmeliproDropdownMenuBtn.spec.ts +128 -0
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproDropdownMenu/AmeliproDropdownMenuBtn/__tests__/__snapshots__/AmeliproDropdownMenuBtn.spec.ts.snap +67 -0
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproDropdownMenu/__tests__/AmeliproDropdownMenu.spec.ts +266 -0
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproDropdownMenu/__tests__/__snapshots__/AmeliproDropdownMenu.spec.ts.snap +134 -0
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproMessagingMenuBtn/__tests__/AmeliproMessagingMenuBtn.spec.ts +72 -0
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproMessagingMenuBtn/__tests__/__snapshots__/AmeliproMessagingMenuBtn.spec.ts.snap +71 -0
- package/src/components/Amelipro/AmeliproPageLayout/tests/__snapshots__/AmeliproPageLayout.spec.ts.snap +12 -0
- package/src/components/Amelipro/AmeliproTable/AmeliproTable.stories.ts +81 -9
- package/src/components/Amelipro/AmeliproTable/AmeliproTable.vue +139 -61
- package/src/components/Amelipro/AmeliproTable/__tests__/AmeliproTable.spec.ts +10 -0
- package/src/components/Amelipro/AmeliproTable/__tests__/__snapshots__/AmeliproTable.spec.ts.snap +361 -187
- package/src/components/Amelipro/AmeliproTable/types.d.ts +11 -0
- package/src/components/Captcha/Captcha.mdx +72 -0
- package/src/components/Captcha/Captcha.stories.ts +276 -0
- package/src/components/Captcha/Captcha.vue +325 -0
- package/src/components/Captcha/CaptchaAlert.vue +60 -0
- package/src/components/Captcha/CaptchaBase.vue +219 -0
- package/src/components/Captcha/CaptchaBtn.vue +35 -0
- package/src/components/Captcha/CaptchaForm.vue +58 -0
- package/src/components/Captcha/CaptchaImg.vue +41 -0
- package/src/components/Captcha/CaptchaInformation.vue +64 -0
- package/src/components/Captcha/captchaApi.ts +111 -0
- package/src/components/Captcha/icons/volumeUp.vue +11 -0
- package/src/components/Captcha/locales.ts +35 -0
- package/src/components/Captcha/readme.md +5 -0
- package/src/components/Captcha/tests/Captcha.spec.ts +298 -0
- package/src/components/Captcha/tests/__snapshots__/Captcha.spec.ts.snap +716 -0
- package/src/components/Captcha/types.ts +2 -0
- package/src/components/Customs/Selects/SySelect/SySelect.vue +2 -2
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +4 -0
- package/src/components/Customs/SyForm/SyForm.stories.ts +133 -23
- package/src/components/Customs/SyForm/SyForm.vue +17 -1
- package/src/components/Customs/SyTextField/SyTextField.vue +29 -7
- package/src/components/DatePicker/CalendarMode/DatePicker.vue +32 -9
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +154 -18
- package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.spec.ts +2 -2
- package/src/components/DatePicker/DateTextInput/DateTextInput.vue +35 -4
- package/src/components/DatePicker/composables/tests/useDatePickerViewMode.spec.ts +107 -72
- package/src/components/DatePicker/composables/tests/useMonthButtonCustomization.spec.ts +6 -6
- package/src/components/DatePicker/composables/useDatePickerViewMode.ts +57 -7
- package/src/components/DatePicker/composables/useMonthButtonCustomization.ts +14 -14
- package/src/components/DatePicker/tests/navigation.regression.spec.ts +74 -0
- package/src/components/DatePicker/tests/navigation.simple.spec.ts +137 -0
- package/src/components/NirField/NirField.stories.ts +85 -2
- package/src/components/NirField/NirField.vue +55 -18
- package/src/components/NirField/locales.ts +1 -3
- package/src/components/PasswordField/PasswordField.vue +39 -7
- package/src/components/PhoneField/PhoneField.vue +43 -10
- package/src/components/RangeField/tests/RangeField.spec.ts +0 -3
- package/src/components/Tables/SyServerTable/SyServerTable.mdx +15 -0
- package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +309 -0
- package/src/components/Tables/SyServerTable/SyServerTable.vue +18 -3
- package/src/components/Tables/SyServerTable/tests/SyServerTable.spec.ts +67 -0
- package/src/components/Tables/SyTable/SyTable.mdx +15 -0
- package/src/components/Tables/SyTable/SyTable.stories.ts +228 -0
- package/src/components/Tables/SyTable/SyTable.vue +18 -3
- package/src/components/Tables/SyTable/tests/SyTable.spec.ts +63 -0
- package/src/components/Tables/common/SyTablePagination.vue +10 -8
- package/src/components/Tables/common/types.ts +4 -0
- package/src/components/Tables/common/usePagination.ts +11 -20
- package/src/components/Tables/common/useTableCheckbox.ts +23 -11
- package/src/components/index.ts +1 -0
- package/src/composables/validation/AvecVosComposants.mdx.old +1 -1
- package/src/composables/validation/FormValidation.stories.ts.old +5 -5
- package/src/composables/validation/useFormValidation.ts +46 -8
- package/src/composables/validation/useValidatable.ts +19 -8
- package/src/stories/Accessibilite/Introduction.mdx +1 -1
- package/src/stories/Demarrer/EnrichirLeDesignSystem.mdx +43 -0
- package/src/stories/Demarrer/EnrichirLeDesignSystem.stories.ts +239 -0
- package/src/stories/Demarrer/SignalerUneAnomalie.mdx +39 -0
- package/src/stories/Demarrer/SignalerUneAnomalie.stories.ts +261 -0
- package/dist/main-DyEOPqqn.js +0 -33329
- package/src/components/Amelipro/AmeliproCheckbox/tests/AmeliproCheckbox.spec.ts +0 -19
- package/src/components/Amelipro/AmeliproCheckbox/tests/__snapshots__/AmeliproCheckbox.spec.ts.snap +0 -40
- package/src/components/Amelipro/AmeliproCheckboxGroup/tests/AmeliproCheckboxGroup.spec.ts +0 -46
- package/src/components/Amelipro/AmeliproChips/tests/AmeliproChips.spec.ts +0 -16
- package/src/components/Amelipro/AmeliproChips/tests/__snapshots__/AmeliproChips.spec.ts.snap +0 -97
- package/src/components/Amelipro/AmeliproDialog/tests/AmeliproDialog.spec.ts +0 -24
- package/src/components/Amelipro/AmeliproDialog/tests/__snapshots__/AmeliproDialog.spec.ts.snap +0 -134
- package/src/components/Amelipro/AmeliproDisclosure/tests/AmeliproDisclosure.spec.ts +0 -19
- package/src/components/Amelipro/AmeliproDisclosure/tests/__snapshots__/AmeliproDisclosure.spec.ts.snap +0 -104
- package/src/components/Amelipro/AmeliproFooter/tests/AmeliproFooter.spec.ts +0 -15
- package/src/components/Amelipro/AmeliproFooter/tests/__snapshots__/AmeliproFooter.spec.ts.snap +0 -432
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/tests/AmeliproHeaderBrandSection.spec.ts +0 -15
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/tests/__snapshots__/AmeliproHeaderBrandSection.spec.ts.snap +0 -131
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/tests/AmeliproHeaderBar.spec.ts +0 -15
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/tests/__snapshots__/AmeliproHeaderBar.spec.ts.snap +0 -172
- package/src/components/Amelipro/AmeliproHeader/tests/AmeliproHeader.spec.ts +0 -159
- package/src/components/Amelipro/AmeliproHeader/tests/__snapshots__/AmeliproHeader.spec.ts.snap +0 -841
- package/src/components/Amelipro/AmeliproMenu/tests/AmeliproMenu.spec.ts +0 -85
- package/src/components/Amelipro/AmeliproMenu/tests/__snapshots__/AmeliproMenu.spec.ts.snap +0 -537
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproDropdownMenu/AmeliproDropdownMenuBtn/tests/AmeliproDropdownMenuBtn.spec.ts +0 -16
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproDropdownMenu/AmeliproDropdownMenuBtn/tests/__snapshots__/AmeliproDropdownMenuBtn.spec.ts.snap +0 -56
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproDropdownMenu/tests/AmeliproDropdownMenu.spec.ts +0 -28
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproDropdownMenu/tests/__snapshots__/AmeliproDropdownMenu.spec.ts.snap +0 -300
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproMessagingMenuBtn/tests/AmeliproMessagingMenuBtn.spec.ts +0 -16
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproMessagingMenuBtn/tests/__snapshots__/AmeliproMessagingMenuBtn.spec.ts.snap +0 -89
- package/src/components/BackBtn/tests/__snapshots__/BackBtn.spec.ts.snap +0 -45
- package/src/components/RangeField/tests/__snapshots__/RangeField.spec.ts.snap +0 -1270
- package/src/stories/Demarrer/CreerUneIssue.mdx +0 -67
- package/src/stories/Demarrer/components.stories.ts +0 -25
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`AmeliproCheckboxGroup >
|
|
4
|
-
<div id="
|
|
3
|
+
exports[`AmeliproCheckboxGroup > Snapshots > renders the component with all properties filled in 1`] = `
|
|
4
|
+
<div id="modified-unique-id-container">
|
|
5
5
|
<div class="
|
|
6
|
+
align-md-start
|
|
6
7
|
amelipro-checkbox-group
|
|
7
|
-
classic
|
|
8
8
|
d-flex
|
|
9
9
|
flex-column
|
|
10
|
+
flex-md-row
|
|
11
|
+
pills
|
|
10
12
|
">
|
|
11
13
|
<div class="
|
|
12
14
|
align-center
|
|
@@ -18,37 +20,49 @@ exports[`AmeliproCheckboxGroup > render correctly 1`] = `
|
|
|
18
20
|
class="
|
|
19
21
|
amelipro-checkbox-group__label
|
|
20
22
|
d-inline-flex
|
|
21
|
-
|
|
23
|
+
margin-label
|
|
24
|
+
mb-0
|
|
25
|
+
mb-md-4
|
|
22
26
|
"
|
|
23
|
-
id="
|
|
27
|
+
id="modified-unique-id"
|
|
24
28
|
>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
Modified group label
|
|
30
|
+
<span
|
|
31
|
+
aria-hidden="true"
|
|
32
|
+
class="d-inline-flex"
|
|
33
|
+
>
|
|
34
|
+
*
|
|
35
|
+
</span>
|
|
36
|
+
<span class="d-sr-only">
|
|
37
|
+
Champ obligatoire
|
|
38
|
+
</span>
|
|
28
39
|
</p>
|
|
29
40
|
</div>
|
|
30
41
|
<div
|
|
31
|
-
aria-
|
|
32
|
-
aria-
|
|
33
|
-
|
|
42
|
+
aria-disabled="true"
|
|
43
|
+
aria-labelledby="modified-unique-id"
|
|
44
|
+
aria-required="true"
|
|
45
|
+
class="
|
|
46
|
+
amelipro-checkbox-group__wrapper
|
|
47
|
+
mt-2
|
|
48
|
+
"
|
|
34
49
|
role="group"
|
|
35
50
|
>
|
|
36
51
|
<ul
|
|
37
52
|
class="
|
|
38
53
|
amelipro-checkbox-group__list
|
|
39
54
|
d-flex
|
|
40
|
-
flex-column
|
|
41
55
|
flex-wrap
|
|
42
56
|
list-style-none
|
|
43
57
|
"
|
|
44
|
-
id="
|
|
58
|
+
id="modified-unique-id-list"
|
|
45
59
|
>
|
|
46
60
|
<li
|
|
47
61
|
class="
|
|
48
62
|
amelipro-checkbox-group__item
|
|
49
|
-
mb-
|
|
63
|
+
mb-2
|
|
50
64
|
"
|
|
51
|
-
id="
|
|
65
|
+
id="modified-unique-id-item-0"
|
|
52
66
|
>
|
|
53
67
|
<div class="
|
|
54
68
|
align-center
|
|
@@ -56,28 +70,31 @@ exports[`AmeliproCheckboxGroup > render correctly 1`] = `
|
|
|
56
70
|
d-flex
|
|
57
71
|
">
|
|
58
72
|
<div
|
|
59
|
-
aria-checked="
|
|
73
|
+
aria-checked="false"
|
|
74
|
+
aria-describedby="Modified item description 1"
|
|
60
75
|
aria-disabled="true"
|
|
61
76
|
class="
|
|
62
77
|
align-center
|
|
63
78
|
amelipro-checkbox-group__item-input
|
|
64
79
|
d-inline-flex
|
|
65
80
|
flex-row
|
|
81
|
+
mr-0
|
|
66
82
|
mr-2
|
|
83
|
+
mr-md-2
|
|
67
84
|
text-body-1
|
|
68
85
|
"
|
|
69
|
-
id="
|
|
86
|
+
id="modified-unique-id-input-0"
|
|
70
87
|
role="checkbox"
|
|
71
88
|
tabindex="-1"
|
|
72
89
|
>
|
|
73
90
|
<span
|
|
74
91
|
class="
|
|
75
92
|
checkbox-label
|
|
76
|
-
text-ap-grey
|
|
93
|
+
text-ap-grey-darken-1
|
|
77
94
|
"
|
|
78
|
-
id="
|
|
95
|
+
id="modified-unique-id-label-text-0"
|
|
79
96
|
>
|
|
80
|
-
1
|
|
97
|
+
Modified item label 1
|
|
81
98
|
</span>
|
|
82
99
|
</div>
|
|
83
100
|
</div>
|
|
@@ -86,9 +103,9 @@ exports[`AmeliproCheckboxGroup > render correctly 1`] = `
|
|
|
86
103
|
<li
|
|
87
104
|
class="
|
|
88
105
|
amelipro-checkbox-group__item
|
|
89
|
-
mb-
|
|
106
|
+
mb-2
|
|
90
107
|
"
|
|
91
|
-
id="
|
|
108
|
+
id="modified-unique-id-item-1"
|
|
92
109
|
>
|
|
93
110
|
<div class="
|
|
94
111
|
align-center
|
|
@@ -96,68 +113,31 @@ exports[`AmeliproCheckboxGroup > render correctly 1`] = `
|
|
|
96
113
|
d-flex
|
|
97
114
|
">
|
|
98
115
|
<div
|
|
99
|
-
aria-checked="
|
|
100
|
-
aria-describedby="
|
|
116
|
+
aria-checked="true"
|
|
117
|
+
aria-describedby="Modified item description 2"
|
|
101
118
|
aria-disabled="true"
|
|
102
119
|
class="
|
|
103
120
|
align-center
|
|
104
121
|
amelipro-checkbox-group__item-input
|
|
105
122
|
d-inline-flex
|
|
106
123
|
flex-row
|
|
124
|
+
mr-0
|
|
107
125
|
mr-2
|
|
126
|
+
mr-md-2
|
|
108
127
|
text-body-1
|
|
109
128
|
"
|
|
110
|
-
id="
|
|
129
|
+
id="modified-unique-id-input-1"
|
|
111
130
|
role="checkbox"
|
|
112
131
|
tabindex="-1"
|
|
113
|
-
>
|
|
114
|
-
<span
|
|
115
|
-
class="
|
|
116
|
-
checkbox-label
|
|
117
|
-
text-ap-grey
|
|
118
|
-
"
|
|
119
|
-
id="my-checkbox-group-id-label-text-1"
|
|
120
|
-
>
|
|
121
|
-
2
|
|
122
|
-
</span>
|
|
123
|
-
</div>
|
|
124
|
-
</div>
|
|
125
|
-
<!-- v-if -->
|
|
126
|
-
</li>
|
|
127
|
-
<li
|
|
128
|
-
class="
|
|
129
|
-
amelipro-checkbox-group__item
|
|
130
|
-
mb-4
|
|
131
|
-
"
|
|
132
|
-
id="my-checkbox-group-id-item-2"
|
|
133
|
-
>
|
|
134
|
-
<div class="
|
|
135
|
-
align-center
|
|
136
|
-
amelipro-checkbox-group__item__wrapper
|
|
137
|
-
d-flex
|
|
138
|
-
">
|
|
139
|
-
<div
|
|
140
|
-
aria-checked="false"
|
|
141
|
-
class="
|
|
142
|
-
align-center
|
|
143
|
-
amelipro-checkbox-group__item-input
|
|
144
|
-
d-inline-flex
|
|
145
|
-
flex-row
|
|
146
|
-
mr-2
|
|
147
|
-
text-body-1
|
|
148
|
-
"
|
|
149
|
-
id="my-checkbox-group-id-input-2"
|
|
150
|
-
role="checkbox"
|
|
151
|
-
tabindex="0"
|
|
152
132
|
>
|
|
153
133
|
<span
|
|
154
134
|
class="
|
|
155
135
|
checkbox-label
|
|
156
136
|
text-ap-grey-darken-1
|
|
157
137
|
"
|
|
158
|
-
id="
|
|
138
|
+
id="modified-unique-id-label-text-1"
|
|
159
139
|
>
|
|
160
|
-
|
|
140
|
+
Modified item label 2
|
|
161
141
|
</span>
|
|
162
142
|
</div>
|
|
163
143
|
</div>
|
|
@@ -166,9 +146,9 @@ exports[`AmeliproCheckboxGroup > render correctly 1`] = `
|
|
|
166
146
|
<li
|
|
167
147
|
class="
|
|
168
148
|
amelipro-checkbox-group__item
|
|
169
|
-
mb-
|
|
149
|
+
mb-2
|
|
170
150
|
"
|
|
171
|
-
id="
|
|
151
|
+
id="modified-unique-id-item-2"
|
|
172
152
|
>
|
|
173
153
|
<div class="
|
|
174
154
|
align-center
|
|
@@ -176,38 +156,92 @@ exports[`AmeliproCheckboxGroup > render correctly 1`] = `
|
|
|
176
156
|
d-flex
|
|
177
157
|
">
|
|
178
158
|
<div
|
|
179
|
-
aria-checked="
|
|
159
|
+
aria-checked="true"
|
|
160
|
+
aria-describedby="Modified item description 3"
|
|
161
|
+
aria-disabled="true"
|
|
180
162
|
class="
|
|
181
163
|
align-center
|
|
182
164
|
amelipro-checkbox-group__item-input
|
|
183
165
|
d-inline-flex
|
|
184
166
|
flex-row
|
|
167
|
+
mr-0
|
|
185
168
|
mr-2
|
|
169
|
+
mr-md-2
|
|
186
170
|
text-body-1
|
|
187
171
|
"
|
|
188
|
-
id="
|
|
172
|
+
id="modified-unique-id-input-2"
|
|
189
173
|
role="checkbox"
|
|
190
|
-
tabindex="
|
|
174
|
+
tabindex="-1"
|
|
191
175
|
>
|
|
192
176
|
<span
|
|
193
177
|
class="
|
|
194
178
|
checkbox-label
|
|
195
179
|
text-ap-grey-darken-1
|
|
196
180
|
"
|
|
197
|
-
id="
|
|
181
|
+
id="modified-unique-id-label-text-2"
|
|
198
182
|
>
|
|
199
|
-
|
|
183
|
+
Modified item label 3
|
|
200
184
|
</span>
|
|
201
185
|
</div>
|
|
202
186
|
</div>
|
|
203
187
|
<!-- v-if -->
|
|
204
188
|
</li>
|
|
189
|
+
</ul>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
<!-- v-if -->
|
|
193
|
+
</div>
|
|
194
|
+
`;
|
|
195
|
+
|
|
196
|
+
exports[`AmeliproCheckboxGroup > Snapshots > renders the component with only required properties filled in 1`] = `
|
|
197
|
+
<div id="required-unique-id-container">
|
|
198
|
+
<div class="
|
|
199
|
+
amelipro-checkbox-group
|
|
200
|
+
classic
|
|
201
|
+
d-flex
|
|
202
|
+
flex-column
|
|
203
|
+
">
|
|
204
|
+
<div class="
|
|
205
|
+
align-center
|
|
206
|
+
amelipro-checkbox-group__label-wrapper
|
|
207
|
+
d-flex
|
|
208
|
+
mr-2
|
|
209
|
+
">
|
|
210
|
+
<p
|
|
211
|
+
class="
|
|
212
|
+
amelipro-checkbox-group__label
|
|
213
|
+
d-inline-flex
|
|
214
|
+
mb-1
|
|
215
|
+
"
|
|
216
|
+
id="required-unique-id"
|
|
217
|
+
>
|
|
218
|
+
required-group-label
|
|
219
|
+
<!-- v-if -->
|
|
220
|
+
<!-- v-if -->
|
|
221
|
+
</p>
|
|
222
|
+
</div>
|
|
223
|
+
<div
|
|
224
|
+
aria-labelledby="required-unique-id"
|
|
225
|
+
aria-required="false"
|
|
226
|
+
class="amelipro-checkbox-group__wrapper"
|
|
227
|
+
role="group"
|
|
228
|
+
>
|
|
229
|
+
<ul
|
|
230
|
+
class="
|
|
231
|
+
amelipro-checkbox-group__list
|
|
232
|
+
d-flex
|
|
233
|
+
flex-column
|
|
234
|
+
flex-wrap
|
|
235
|
+
list-style-none
|
|
236
|
+
"
|
|
237
|
+
id="required-unique-id-list"
|
|
238
|
+
>
|
|
205
239
|
<li
|
|
206
240
|
class="
|
|
207
241
|
amelipro-checkbox-group__item
|
|
208
242
|
mb-4
|
|
209
243
|
"
|
|
210
|
-
id="
|
|
244
|
+
id="required-unique-id-item-0"
|
|
211
245
|
>
|
|
212
246
|
<div class="
|
|
213
247
|
align-center
|
|
@@ -215,7 +249,7 @@ exports[`AmeliproCheckboxGroup > render correctly 1`] = `
|
|
|
215
249
|
d-flex
|
|
216
250
|
">
|
|
217
251
|
<div
|
|
218
|
-
aria-checked="
|
|
252
|
+
aria-checked="true"
|
|
219
253
|
class="
|
|
220
254
|
align-center
|
|
221
255
|
amelipro-checkbox-group__item-input
|
|
@@ -224,7 +258,7 @@ exports[`AmeliproCheckboxGroup > render correctly 1`] = `
|
|
|
224
258
|
mr-2
|
|
225
259
|
text-body-1
|
|
226
260
|
"
|
|
227
|
-
id="
|
|
261
|
+
id="required-unique-id-input-0"
|
|
228
262
|
role="checkbox"
|
|
229
263
|
tabindex="0"
|
|
230
264
|
>
|
|
@@ -233,9 +267,9 @@ exports[`AmeliproCheckboxGroup > render correctly 1`] = `
|
|
|
233
267
|
checkbox-label
|
|
234
268
|
text-ap-grey-darken-1
|
|
235
269
|
"
|
|
236
|
-
id="
|
|
270
|
+
id="required-unique-id-label-text-0"
|
|
237
271
|
>
|
|
238
|
-
|
|
272
|
+
Required item label
|
|
239
273
|
</span>
|
|
240
274
|
</div>
|
|
241
275
|
</div>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { VueWrapper, mount, shallowMount } from '@vue/test-utils'
|
|
2
|
+
import { beforeEach, describe, expect, it } from 'vitest'
|
|
3
|
+
import AmeliproChips from '../AmeliproChips.vue'
|
|
4
|
+
import { AmeliproIconBtn } from '@/components'
|
|
5
|
+
import type { ComponentProps } from 'vue-component-type-helpers'
|
|
6
|
+
import type { ExpectedPropOptions } from '@tests/types'
|
|
7
|
+
import TestHelper from '@tests/helpers/TestHelper'
|
|
8
|
+
|
|
9
|
+
const expectedPropOptions: ExpectedPropOptions<typeof AmeliproChips> = {
|
|
10
|
+
text: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
uniqueId: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Values pour les props "required"
|
|
21
|
+
const requiredPropValues = (): ComponentProps<typeof AmeliproChips> => ({
|
|
22
|
+
text: 'Required text',
|
|
23
|
+
uniqueId: 'required-unique-id',
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
// Valeurs pour les props "modified"
|
|
27
|
+
const modifiedPropValues = (): ComponentProps<typeof AmeliproChips> => ({
|
|
28
|
+
text: 'Modified text',
|
|
29
|
+
uniqueId: 'modified-unique-id',
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
const testHelper = new TestHelper(AmeliproChips)
|
|
33
|
+
testHelper.setExpectedPropOptions(expectedPropOptions)
|
|
34
|
+
.setRequiredPropValues(requiredPropValues)
|
|
35
|
+
.setModifiedPropValues(modifiedPropValues)
|
|
36
|
+
|
|
37
|
+
describe('AmeliproChips', () => {
|
|
38
|
+
describe('Snapshots', () => {
|
|
39
|
+
testHelper.snapshots()
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
describe('Properties', () => {
|
|
43
|
+
testHelper.properties()
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
describe('Setting props should update attributes of inner tags', () => {
|
|
47
|
+
let vueWrapper: VueWrapper<InstanceType<typeof AmeliproChips>>
|
|
48
|
+
|
|
49
|
+
describe('root', () => {
|
|
50
|
+
beforeEach(() => {
|
|
51
|
+
vueWrapper = shallowMount(AmeliproChips, { props: requiredPropValues() })
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
it('prop uniqueId sets attribute id', async () => {
|
|
55
|
+
expect(vueWrapper.attributes('id')).toBe(testHelper.default('uniqueId'))
|
|
56
|
+
|
|
57
|
+
const { uniqueId } = modifiedPropValues()
|
|
58
|
+
await vueWrapper.setProps({ uniqueId })
|
|
59
|
+
expect(vueWrapper.attributes('id')).toBe(testHelper.modified('uniqueId'))
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
describe('Setting props should update props or attributes of inner components', () => {
|
|
65
|
+
let vueWrapper: VueWrapper<InstanceType<typeof AmeliproChips>>
|
|
66
|
+
|
|
67
|
+
describe('AmeliproIconBtn', () => {
|
|
68
|
+
beforeEach(() => {
|
|
69
|
+
vueWrapper = shallowMount(AmeliproChips, { props: requiredPropValues() })
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
it('prop text sets prop btnLabel & attribute title', async () => {
|
|
73
|
+
expect(vueWrapper.findComponent(AmeliproIconBtn).props('btnLabel')).toBe(`supprimer ${testHelper.default('text')}`)
|
|
74
|
+
expect(vueWrapper.findComponent(AmeliproIconBtn).attributes('title')).toBe(`supprimer ${testHelper.default('text')}`)
|
|
75
|
+
|
|
76
|
+
const { text } = modifiedPropValues()
|
|
77
|
+
await vueWrapper.setProps({ text })
|
|
78
|
+
expect(vueWrapper.findComponent(AmeliproIconBtn).props('btnLabel')).toBe(`supprimer ${testHelper.modified('text')}`)
|
|
79
|
+
expect(vueWrapper.findComponent(AmeliproIconBtn).attributes('title')).toBe(`supprimer ${testHelper.modified('text')}`)
|
|
80
|
+
})
|
|
81
|
+
})
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
describe('Events', () => {
|
|
85
|
+
it('emit click on click', async () => {
|
|
86
|
+
const wrapper = mount(AmeliproChips, { props: modifiedPropValues() })
|
|
87
|
+
expect(wrapper.emitted('click')).toBeUndefined()
|
|
88
|
+
await wrapper.findComponent(AmeliproIconBtn).trigger('click')
|
|
89
|
+
expect(wrapper.emitted('click')).toStrictEqual([[testHelper.modified('uniqueId')]])
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
})
|
package/src/components/Amelipro/AmeliproChips/__tests__/__snapshots__/AmeliproChips.spec.ts.snap
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`AmeliproChips > Snapshots > renders the component with all properties filled in 1`] = `
|
|
4
|
+
<div
|
|
5
|
+
class="
|
|
6
|
+
amelipro-chips
|
|
7
|
+
d-inline-block
|
|
8
|
+
"
|
|
9
|
+
id="modified-unique-id"
|
|
10
|
+
>
|
|
11
|
+
<p class="
|
|
12
|
+
amelipro-chips__text
|
|
13
|
+
d-inline-block
|
|
14
|
+
mb-0
|
|
15
|
+
">
|
|
16
|
+
<span class="truncate-text">
|
|
17
|
+
Modified text
|
|
18
|
+
</span>
|
|
19
|
+
</p>
|
|
20
|
+
<amelipro-icon-btn-stub
|
|
21
|
+
badge="false"
|
|
22
|
+
bordered="false"
|
|
23
|
+
btnlabel="supprimer Modified text"
|
|
24
|
+
class="
|
|
25
|
+
amelipro-chips__btn
|
|
26
|
+
ml-4
|
|
27
|
+
"
|
|
28
|
+
icon="closeNoCircle"
|
|
29
|
+
iconbgcolor="transparent"
|
|
30
|
+
iconcolor="ap-blue-darken-1"
|
|
31
|
+
iconhoverbgcolor="transparent"
|
|
32
|
+
iconhovercolor="ap-blue-darken-2"
|
|
33
|
+
large="true"
|
|
34
|
+
medium="false"
|
|
35
|
+
small="false"
|
|
36
|
+
title="supprimer Modified text"
|
|
37
|
+
uniqueid="modified-unique-id-btn"
|
|
38
|
+
xlarge="false"
|
|
39
|
+
></amelipro-icon-btn-stub>
|
|
40
|
+
</div>
|
|
41
|
+
`;
|
|
42
|
+
|
|
43
|
+
exports[`AmeliproChips > Snapshots > renders the component with only required properties filled in 1`] = `
|
|
44
|
+
<div
|
|
45
|
+
class="
|
|
46
|
+
amelipro-chips
|
|
47
|
+
d-inline-block
|
|
48
|
+
"
|
|
49
|
+
id="required-unique-id"
|
|
50
|
+
>
|
|
51
|
+
<p class="
|
|
52
|
+
amelipro-chips__text
|
|
53
|
+
d-inline-block
|
|
54
|
+
mb-0
|
|
55
|
+
">
|
|
56
|
+
<span class="truncate-text">
|
|
57
|
+
Required text
|
|
58
|
+
</span>
|
|
59
|
+
</p>
|
|
60
|
+
<amelipro-icon-btn-stub
|
|
61
|
+
badge="false"
|
|
62
|
+
bordered="false"
|
|
63
|
+
btnlabel="supprimer Required text"
|
|
64
|
+
class="
|
|
65
|
+
amelipro-chips__btn
|
|
66
|
+
ml-4
|
|
67
|
+
"
|
|
68
|
+
icon="closeNoCircle"
|
|
69
|
+
iconbgcolor="transparent"
|
|
70
|
+
iconcolor="ap-blue-darken-1"
|
|
71
|
+
iconhoverbgcolor="transparent"
|
|
72
|
+
iconhovercolor="ap-blue-darken-2"
|
|
73
|
+
large="true"
|
|
74
|
+
medium="false"
|
|
75
|
+
small="false"
|
|
76
|
+
title="supprimer Required text"
|
|
77
|
+
uniqueid="required-unique-id-btn"
|
|
78
|
+
xlarge="false"
|
|
79
|
+
></amelipro-icon-btn-stub>
|
|
80
|
+
</div>
|
|
81
|
+
`;
|