@cnamts/synapse 1.0.1 → 1.0.2
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 +1 -1
- package/dist/{DateFilter-BmRuzQ9Z.js → DateFilter-YWOTbfeL.js} +1 -1
- package/dist/{NumberFilter-CnIPDHqx.js → NumberFilter-DMmMgALM.js} +1 -1
- package/dist/{PeriodFilter-CZwZ8CnQ.js → PeriodFilter-Bok5BHcn.js} +1 -1
- package/dist/SelectFilter-BKud2WhN.js +136 -0
- package/dist/{TextFilter-DTxZHJwX.js → TextFilter-DvMf2thH.js} +1 -1
- package/dist/components/Accordion/Accordion.d.ts +2 -1
- package/dist/components/Accordion/composables/useAccordionGroupCommunication.d.ts +5 -0
- package/dist/components/Accordion/composables/useAccordionKeyboardNavigation.d.ts +12 -0
- package/dist/components/Accordion/composables/useAccordionState.d.ts +13 -0
- package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +85 -0
- package/dist/components/Customs/SyInputSelect/SyInputSelect.d.ts +2 -0
- package/dist/components/Customs/SySelect/SySelect.d.ts +33 -13
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +2 -2
- package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +1585 -1452
- package/dist/components/DatePicker/DatePicker/DatePicker.d.ts +16 -2
- package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +3 -1
- package/dist/components/DatePicker/composables/index.d.ts +2 -0
- package/dist/components/DatePicker/composables/useAsteriskDisplay.d.ts +14 -0
- package/dist/components/DatePicker/composables/useDateAutoClamp.d.ts +16 -0
- package/dist/components/DatePicker/composables/useDateRangeInput.d.ts +1 -1
- package/dist/components/DatePicker/composables/useDisplayedDateString.d.ts +3 -0
- package/dist/components/DatePicker/composables/useInputBlurHandler.d.ts +1 -0
- package/dist/components/DatePicker/composables/useMonthButtonCustomization.d.ts +5 -2
- package/dist/components/NirField/NirField.d.ts +7 -3
- package/dist/components/NirField/nirValidation.d.ts +1 -1
- package/dist/components/PasswordField/PasswordField.d.ts +2 -0
- package/dist/components/PeriodField/PeriodField.d.ts +52 -8
- package/dist/components/PhoneField/PhoneField.d.ts +2 -2
- package/dist/components/RangeField/RangeField.d.ts +2 -0
- package/dist/components/SearchListField/SearchListField.d.ts +9 -0
- package/dist/components/SyTextArea/SyTextArea.d.ts +2 -0
- package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +14 -9
- package/dist/components/Tables/SyTable/SyTable.d.ts +12 -7
- package/dist/components/Tables/common/SyTablePagination.d.ts +1636 -0
- package/dist/components/Tables/common/TableHeader.d.ts +2 -20
- package/dist/components/Tables/common/filters/SelectFilter.d.ts +5 -5
- package/dist/components/Tables/common/filters/getFilterComponent.d.ts +1 -0
- package/dist/components/Tables/common/filters/locales.d.ts +4 -0
- package/dist/components/Tables/common/filters/logics/date.d.ts +1 -0
- package/dist/components/Tables/common/filters/logics/number.d.ts +1 -0
- package/dist/components/Tables/common/filters/logics/period.d.ts +1 -0
- package/dist/components/Tables/common/filters/logics/select.d.ts +1 -0
- package/dist/components/Tables/common/filters/logics/text.d.ts +1 -0
- package/dist/components/Tables/common/locales.d.ts +21 -0
- package/dist/components/Tables/common/organizeColumns/OrganizeColumns.d.ts +267 -0
- package/dist/components/Tables/common/organizeColumns/sortHeaders.d.ts +2 -0
- package/dist/components/Tables/common/tableFilterUtils.d.ts +1 -0
- package/dist/components/Tables/common/tableStorageUtils.d.ts +41 -1
- package/dist/components/Tables/common/tableUtils.d.ts +42 -5
- package/dist/components/Tables/common/types.d.ts +19 -8
- package/dist/components/Tables/common/usePagination.d.ts +22 -0
- package/dist/components/Tables/common/useTableCheckbox.d.ts +20 -0
- package/dist/components/Tables/common/useTableHeaders.d.ts +76 -0
- package/dist/components/Tables/common/useTableItems.d.ts +24 -0
- package/dist/components/Tables/common/useTableOptions.d.ts +18 -0
- package/dist/components/ToolbarContainer/ToolbarContainer.d.ts +11 -0
- package/dist/components/UserMenuBtn/UserMenuBtn.d.ts +9 -2
- package/dist/components/index.d.ts +8 -6
- package/dist/design-system-v3.js +58 -56
- package/dist/design-system-v3.umd.cjs +22 -22
- package/dist/main-Cx8qG7YR.js +16344 -0
- package/dist/stories/Accessibilite/Vuetify/VuetifyItems.d.ts +14 -2
- package/dist/stories/DesignTokens/StylesTypographiques.stories.new.d.ts +8 -0
- package/dist/stories/DesignTokens/TypographyDisplay.d.ts +28 -0
- package/dist/stories/DesignTokens/vue-shims.d.ts +6 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/common/imgs/accessibility-svgrepo-com.svg +4 -0
- package/src/components/Accordion/Accessibilite/AccessibilityGuide.mdx +249 -0
- package/src/components/Accordion/Accordion.vue +48 -76
- package/src/components/Accordion/composables/__tests__/useAccordionGroupCommunication.spec.ts +146 -0
- package/src/components/Accordion/composables/__tests__/useAccordionKeyboardNavigation.spec.ts +209 -0
- package/src/components/Accordion/composables/__tests__/useAccordionState.spec.ts +144 -0
- package/src/components/Accordion/composables/useAccordionGroupCommunication.ts +52 -0
- package/src/components/Accordion/composables/useAccordionKeyboardNavigation.ts +111 -0
- package/src/components/Accordion/composables/useAccordionState.ts +59 -0
- package/src/components/Accordion/tests/__snapshots__/accordion.spec.ts.snap +3 -0
- package/src/components/Customs/SyCheckbox/Accessibilite.mdx +303 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.mdx +50 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.stories.ts +630 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +326 -0
- package/src/components/Customs/SyCheckbox/tests/SyCheckbox.spec.ts +201 -0
- package/src/components/Customs/SyInputSelect/SyInputSelect.stories.ts +1 -0
- package/src/components/Customs/SyInputSelect/SyInputSelect.vue +8 -1
- package/src/components/Customs/SySelect/SySelect.stories.ts +160 -0
- package/src/components/Customs/SySelect/SySelect.vue +291 -32
- package/src/components/Customs/SySelect/tests/SySelect.spec.ts +230 -0
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +3 -2
- package/src/components/Customs/SyTextField/SyTextField.vue +19 -8
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +241 -31
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +305 -57
- package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.events.spec.ts +161 -0
- package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.spec.ts +4 -2
- package/src/components/DatePicker/DatePicker/DatePicker.stories.ts +259 -137
- package/src/components/DatePicker/DatePicker/DatePicker.vue +153 -25
- package/src/components/DatePicker/DatePicker/tests/DatePicker.events.spec.ts +189 -0
- package/src/components/DatePicker/DatePicker/{DatePicker.spec.ts → tests/DatePicker.spec.ts} +1 -15
- package/src/components/DatePicker/DateTextInput/DateRange.stories.ts +24 -14
- package/src/components/DatePicker/DateTextInput/DateTextInput.events.spec.ts +148 -0
- package/src/components/DatePicker/DateTextInput/DateTextInput.spec.ts +3 -1
- package/src/components/DatePicker/DateTextInput/DateTextInput.vue +200 -5
- package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +241 -31
- package/src/components/DatePicker/composables/index.ts +2 -0
- package/src/components/DatePicker/composables/tests/useDateAutoClamp.spec.ts +190 -0
- package/src/components/DatePicker/composables/tests/useInputBlurHandler.spec.ts +182 -4
- package/src/components/DatePicker/composables/tests/useMonthButtonCustomization.spec.ts +105 -80
- package/src/components/DatePicker/composables/useAsteriskDisplay.ts +31 -0
- package/src/components/DatePicker/composables/useDateAutoClamp.ts +136 -0
- package/src/components/DatePicker/composables/useDateRangeInput.ts +21 -18
- package/src/components/DatePicker/composables/useDisplayedDateString.ts +13 -1
- package/src/components/DatePicker/composables/useInputBlurHandler.ts +84 -20
- package/src/components/DatePicker/composables/useMonthButtonCustomization.ts +149 -51
- package/src/components/DiacriticPicker/DiacriticPicker.stories.ts +10 -0
- package/src/components/ErrorPage/Accessibilite.stories.ts +8 -0
- package/src/components/ErrorPage/ErrorPage.vue +12 -6
- package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +4 -4
- package/src/components/NirField/NirField.mdx +22 -9
- package/src/components/NirField/NirField.stories.ts +26 -2
- package/src/components/NirField/NirField.vue +209 -22
- package/src/components/NirField/nirValidation.ts +17 -3
- package/src/components/NirField/tests/NirField.spec.ts +2 -2
- package/src/components/NotFoundPage/Accessibilite.stories.ts +8 -0
- package/src/components/NotFoundPage/NotFoundPage.vue +2 -1
- package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +8 -6
- package/src/components/PaginatedTable/PaginatedTable.mdx +2 -0
- package/src/components/PasswordField/PasswordField.stories.ts +4 -0
- package/src/components/PasswordField/PasswordField.vue +3 -0
- package/src/components/PeriodField/PeriodField.vue +2 -0
- package/src/components/PhoneField/PhoneField.stories.ts +15 -15
- package/src/components/PhoneField/PhoneField.vue +1 -1
- package/src/components/RangeField/RangeField.stories.ts +9 -0
- package/src/components/RangeField/RangeField.vue +4 -0
- package/src/components/RangeField/tests/__snapshots__/RangeField.spec.ts.snap +12 -0
- package/src/components/SearchListField/SearchListField.vue +5 -0
- package/src/components/SyTextArea/SyTextArea.vue +3 -0
- package/src/components/SyTextArea/tests/SyTextArea.spec.ts +0 -1
- package/src/components/Tables/SyServerTable/FilterRules.stories.ts +632 -15
- package/src/components/Tables/SyServerTable/SyServerTable.mdx +15 -5
- package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +2844 -1377
- package/src/components/Tables/SyServerTable/SyServerTable.vue +155 -66
- package/src/components/Tables/SyServerTable/tests/SyServerTable.spec.ts +256 -4
- package/src/components/Tables/SyTable/FilterRules.stories.ts +183 -0
- package/src/components/Tables/SyTable/SyTable.mdx +14 -4
- package/src/components/Tables/SyTable/SyTable.stories.ts +1265 -477
- package/src/components/Tables/SyTable/SyTable.vue +152 -72
- package/src/components/Tables/SyTable/tests/SyTable.spec.ts +366 -4
- package/src/components/Tables/common/SyTableFilter.vue +3 -56
- package/src/components/Tables/common/SyTablePagination.vue +375 -0
- package/src/components/Tables/common/TableHeader.vue +10 -26
- package/src/components/Tables/common/filters/SelectFilter.vue +131 -22
- package/src/components/Tables/common/filters/getFilterComponent.ts +54 -0
- package/src/components/Tables/common/filters/locales.ts +4 -0
- package/src/components/Tables/common/filters/logics/date.ts +12 -0
- package/src/components/Tables/common/filters/logics/number.ts +48 -0
- package/src/components/Tables/common/filters/logics/period.ts +25 -0
- package/src/components/Tables/common/filters/logics/select.ts +27 -0
- package/src/components/Tables/common/filters/logics/tests/TextFilterLogic.spec.ts +177 -0
- package/src/components/Tables/common/filters/logics/text.ts +62 -0
- package/src/components/Tables/common/filters/tests/TextFilter.spec.ts +11 -11
- package/src/components/Tables/common/locales.ts +24 -0
- package/src/components/Tables/common/organizeColumns/OrganizeColumns.vue +269 -0
- package/src/components/Tables/common/organizeColumns/sortHeaders.ts +9 -0
- package/src/components/Tables/common/tableFilterUtils.ts +43 -295
- package/src/components/Tables/common/tableStorageUtils.ts +27 -2
- package/src/components/Tables/common/tableStyles.scss +26 -0
- package/src/components/Tables/common/tableUtils.ts +3 -16
- package/src/components/Tables/common/tests/SyTablePagination.spec.ts +170 -0
- package/src/components/Tables/common/tests/filterByRange.spec.ts +215 -0
- package/src/components/Tables/common/tests/tableFilterUtils.spec.ts +0 -14
- package/src/components/Tables/common/tests/tableUtils.spec.ts +7 -51
- package/src/components/Tables/common/types.ts +17 -6
- package/src/components/Tables/common/usePagination.ts +83 -0
- package/src/components/Tables/common/useTableCheckbox.ts +58 -0
- package/src/components/Tables/common/useTableHeaders.ts +88 -0
- package/src/components/Tables/common/useTableItems.ts +87 -0
- package/src/components/Tables/common/useTableOptions.ts +93 -0
- package/src/components/ToolbarContainer/ToolbarContainer.mdx +16 -0
- package/src/components/ToolbarContainer/ToolbarContainer.stories.ts +675 -0
- package/src/components/ToolbarContainer/ToolbarContainer.vue +128 -0
- package/src/components/ToolbarContainer/tests/ToolbarContainer.spec.ts +156 -0
- package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +74 -0
- package/src/components/UserMenuBtn/UserMenuBtn.vue +19 -17
- package/src/components/index.ts +8 -6
- package/src/stories/Accessibilite/Aculturation/AuditDesignSystem.mdx +293 -20
- package/src/stories/Accessibilite/Aculturation/SensibilisationAccessibilite.mdx +448 -54
- package/src/stories/Accessibilite/Audit/RGAA.mdx +231 -23
- package/src/stories/Accessibilite/Avancement/Avancement.mdx +591 -7
- package/src/stories/Accessibilite/Avancement/Avancement.stories.ts +139 -38
- package/src/stories/Accessibilite/Introduction.mdx +258 -18
- package/src/stories/Accessibilite/KitDePreAudit/Echantillonnage.mdx +221 -31
- package/src/stories/Accessibilite/KitDePreAudit/Introduction.mdx +204 -22
- package/src/stories/Accessibilite/KitDePreAudit/Outils/Introduction.mdx +537 -24
- package/src/stories/Accessibilite/KitDePreAudit/Outils/LecteursDEcran.mdx +577 -70
- package/src/stories/Accessibilite/KitDePreAudit/Outils/Tanaguru.mdx +382 -31
- package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +419 -81
- package/src/stories/Accessibilite/Vuetify/Vuetify.mdx +132 -6
- package/src/stories/Accessibilite/Vuetify/Vuetify.stories.ts +370 -146
- package/src/stories/Accessibilite/Vuetify/VuetifyItems.ts +35 -57
- package/src/stories/Demarrer/Accueil.stories.ts +20 -5
- package/src/stories/DesignTokens/StylesTypographiques.mdx +10 -9
- package/src/stories/DesignTokens/StylesTypographiques.stories.new.ts +397 -0
- package/src/stories/DesignTokens/StylesTypographiques.stories.ts +397 -0
- package/src/stories/DesignTokens/TypographyDisplay.vue +155 -0
- package/src/stories/DesignTokens/vue-shims.d.ts +6 -0
- package/src/stories/GuideDuDev/LesBreackingChanges.mdx +0 -2
- package/src/stories/GuideDuDev/MigrationDepuisBridge.mdx +1 -1
- package/src/stories/GuideDuDev/MigrationDepuisVue2.mdx +1 -1
- package/src/stories/GuideDuDev/PortailAgent.mdx +10 -0
- package/src/stories/GuideDuDev/PortailAgent.stories.ts +506 -0
- package/src/stories/GuideDuDev/Theme.mdx +41 -0
- package/dist/SelectFilter-Cj-GW2Cc.js +0 -97
- package/dist/main-WDqeoGM-.js +0 -14788
- package/src/components/PaginatedTable/tests/__snapshots__/PaginatedTable.spec.ts.snap +0 -886
- package/src/components/Tables/SyServerTable/tests/__snapshots__/SyServerTable.spec.ts.snap +0 -521
- package/src/components/Tables/SyTable/tests/__snapshots__/SyTable.spec.ts.snap +0 -521
- package/src/stories/DesignTokens/ThemePA.mdx +0 -35
|
@@ -1,182 +1,406 @@
|
|
|
1
|
-
import { VExpansionPanels, VExpansionPanel, VExpansionPanelTitle, VExpansionPanelText, VDataTable, VIcon, VRow, VCol, VSelect, VBtn, VCombobox, VContainer, VListItem } from 'vuetify/components'
|
|
1
|
+
import { VExpansionPanels, VExpansionPanel, VExpansionPanelTitle, VExpansionPanelText, VDataTable, VIcon, VRow, VCol, VSelect, VBtn, VCombobox, VContainer, VListItem, VChip, VDivider, VSheet, VCard, VCardItem, VCardTitle, VCardText, VBadge, VTooltip } from 'vuetify/components'
|
|
2
2
|
import type { StoryObj } from '@storybook/vue3'
|
|
3
3
|
import { VuetifyItems, itemsChips } from './VuetifyItems'
|
|
4
|
-
import { mdiCheckboxMarkedCircleOutline, mdiLinkVariant, mdiAlertCircleOutline } from '@mdi/js'
|
|
5
|
-
import { computed, ref } from 'vue'
|
|
4
|
+
import { mdiCheckboxMarkedCircleOutline, mdiLinkVariant, mdiAlertCircleOutline, mdiMagnify, mdiFilterVariant, mdiInformationOutline } from '@mdi/js'
|
|
5
|
+
import { computed, ref, watch } from 'vue'
|
|
6
6
|
|
|
7
7
|
const checkIcon = mdiCheckboxMarkedCircleOutline
|
|
8
|
-
const
|
|
8
|
+
const linkIcon = mdiLinkVariant
|
|
9
9
|
const iconAlert = mdiAlertCircleOutline
|
|
10
|
+
const searchIcon = mdiMagnify
|
|
11
|
+
const filterIcon = mdiFilterVariant
|
|
12
|
+
const infoIcon = mdiInformationOutline
|
|
10
13
|
|
|
11
14
|
export default {
|
|
12
|
-
title: 'Accessibilité/Vuetify',
|
|
15
|
+
title: 'Accessibilité/Design System/Vuetify',
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
export const VuetifyPanel: StoryObj = {
|
|
16
19
|
render: () => {
|
|
17
20
|
return {
|
|
18
|
-
components: {
|
|
21
|
+
components: {
|
|
22
|
+
VExpansionPanels, VExpansionPanel, VExpansionPanelTitle, VExpansionPanelText,
|
|
23
|
+
VListItem, VDataTable, VIcon, VContainer, VSelect, VBtn, VCombobox,
|
|
24
|
+
VChip, VDivider, VSheet, VCard, VCardItem, VCardTitle, VCardText, VBadge, VTooltip, VRow, VCol,
|
|
25
|
+
},
|
|
19
26
|
setup() {
|
|
27
|
+
// Configuration de base
|
|
20
28
|
const menuProps = ref({ top: false })
|
|
21
29
|
const itemValue = ref(0)
|
|
22
30
|
const activeBtnIndex = ref('null')
|
|
23
31
|
const search = ref([])
|
|
24
32
|
const searchString = ref('')
|
|
33
|
+
|
|
34
|
+
// Filtrage par conformité
|
|
35
|
+
const conformityFilter = ref('all')
|
|
36
|
+
const conformityOptions = [
|
|
37
|
+
{ title: 'Tous les composants', value: 'all' },
|
|
38
|
+
{ title: 'Natifs Conformes', value: 'conform' },
|
|
39
|
+
{ title: 'Natifs Non conformes', value: 'non-conform' },
|
|
40
|
+
{ title: 'Alternatifs Conformes', value: 'alternative' },
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
// Tri des items par ordre alphabétique
|
|
25
44
|
const items = computed(() => {
|
|
26
45
|
return itemsChips.sort((a, b) => a.text.toLowerCase().localeCompare(b.text.toLowerCase()))
|
|
27
|
-
}
|
|
28
|
-
)
|
|
46
|
+
})
|
|
29
47
|
|
|
30
48
|
const itemsString = computed(() => {
|
|
31
|
-
const
|
|
32
|
-
return
|
|
33
|
-
}
|
|
34
|
-
)
|
|
49
|
+
const sortedItems = itemsChips.sort((a, b) => a.text.toLowerCase().localeCompare(b.text.toLowerCase()))
|
|
50
|
+
return sortedItems.map(o => o.text)
|
|
51
|
+
})
|
|
35
52
|
|
|
53
|
+
// Récupération du composant sélectionné
|
|
36
54
|
const cardItem = computed(() => {
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
55
|
+
return itemValue.value > 0
|
|
56
|
+
? VuetifyItems[0].items[itemValue.value - 1]
|
|
57
|
+
: {
|
|
58
|
+
name: '',
|
|
59
|
+
value: 0,
|
|
60
|
+
errorImportants: [],
|
|
61
|
+
errorIndeterminated: [],
|
|
62
|
+
errorSolutionImportant: [],
|
|
63
|
+
errorSolutionIndeterminated: [],
|
|
64
|
+
solution: [],
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
// Vérification si un composant est conforme ou non
|
|
69
|
+
const isComponentConform = (item) => {
|
|
70
|
+
return item && (item.errorImportants.length === 0 && item.errorIndeterminated.length === 0)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Vérification si un composant a une solution alternative avec href
|
|
74
|
+
const hasAlternativeSolution = (item) => {
|
|
75
|
+
return item && item.solution && item.solution.some(sol => sol.href)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Détermine le statut du composant (conforme, alternatif, non conforme)
|
|
79
|
+
const getComponentStatus = (item) => {
|
|
80
|
+
if (isComponentConform(item)) return 'conform'
|
|
81
|
+
if (hasAlternativeSolution(item)) return 'alternative'
|
|
82
|
+
return 'non-conform'
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Détermine la couleur du composant selon son statut
|
|
86
|
+
const getComponentColor = (item) => {
|
|
87
|
+
const status = getComponentStatus(item)
|
|
88
|
+
if (status === 'conform') return 'success'
|
|
89
|
+
if (status === 'alternative') return '#a05bb6'
|
|
90
|
+
return 'error'
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Détermine l'icône du composant selon son statut
|
|
94
|
+
const getComponentIcon = (item) => {
|
|
95
|
+
return getComponentStatus(item) === 'conform' ? checkIcon : iconAlert
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Filtrage des composants par conformité
|
|
99
|
+
const filteredComponents = computed(() => {
|
|
100
|
+
// Si on veut tous les composants
|
|
101
|
+
if (conformityFilter.value === 'all') {
|
|
102
|
+
return items.value
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Filtrer selon la conformité sélectionnée
|
|
106
|
+
return items.value.filter((item) => {
|
|
107
|
+
const component = VuetifyItems[0].items.find(c => c.value === item.value)
|
|
108
|
+
const status = getComponentStatus(component)
|
|
109
|
+
|
|
110
|
+
switch (conformityFilter.value) {
|
|
111
|
+
case 'conform':
|
|
112
|
+
return status === 'conform'
|
|
113
|
+
case 'non-conform':
|
|
114
|
+
return status === 'non-conform'
|
|
115
|
+
case 'alternative':
|
|
116
|
+
return status === 'alternative'
|
|
117
|
+
default:
|
|
118
|
+
return true
|
|
119
|
+
}
|
|
120
|
+
})
|
|
121
|
+
})
|
|
122
|
+
|
|
123
|
+
// Liste des composants filtrés pour affichage
|
|
124
|
+
const displayedComponents = computed(() => {
|
|
125
|
+
return VuetifyItems[0].items.filter((component) => {
|
|
126
|
+
// Filtrage par conformité
|
|
127
|
+
if (conformityFilter.value !== 'all') {
|
|
128
|
+
const status = getComponentStatus(component)
|
|
129
|
+
|
|
130
|
+
switch (conformityFilter.value) {
|
|
131
|
+
case 'conform':
|
|
132
|
+
return status === 'conform'
|
|
133
|
+
case 'non-conform':
|
|
134
|
+
return status === 'non-conform'
|
|
135
|
+
case 'alternative':
|
|
136
|
+
return status === 'alternative'
|
|
137
|
+
default:
|
|
138
|
+
return true
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return true
|
|
142
|
+
})
|
|
143
|
+
})
|
|
144
|
+
|
|
145
|
+
// Surveillance des changements de filtre
|
|
146
|
+
watch(conformityFilter, () => {
|
|
147
|
+
// Réinitialiser la sélection quand on change de filtre
|
|
148
|
+
itemValue.value = 0
|
|
149
|
+
search.value = []
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
return {
|
|
153
|
+
VuetifyItems, menuProps, items: filteredComponents, itemsString,
|
|
154
|
+
checkIcon, iconAlert, linkIcon, searchIcon, filterIcon, infoIcon,
|
|
155
|
+
itemValue, cardItem, activeBtnIndex, search, searchString,
|
|
156
|
+
conformityFilter, conformityOptions, isComponentConform,
|
|
157
|
+
hasAlternativeSolution, getComponentStatus, getComponentColor, getComponentIcon,
|
|
158
|
+
displayedComponents,
|
|
159
|
+
// Les propriétés filterIcon et searchIcon sont déjà définies à la ligne 115
|
|
160
|
+
}
|
|
41
161
|
},
|
|
42
162
|
template: `
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
163
|
+
<div class="vuetify-audit-dashboard">
|
|
164
|
+
<!-- En-tête avec filtres et recherche -->
|
|
165
|
+
<VSheet :elevation="2" class="mt-4 pa-4 rounded" style="background: linear-gradient(to right, #f5f7fa, #eef2f7);">
|
|
166
|
+
<h2 class="text-h5 mb-4" style="color: #1867c0; font-weight: 600;">Audit d'accessibilité des composants Vuetify</h2>
|
|
167
|
+
|
|
168
|
+
<VRow>
|
|
169
|
+
<!-- Filtres -->
|
|
170
|
+
<VCol cols="12" sm="6" md="4">
|
|
171
|
+
<VSelect
|
|
172
|
+
v-model="conformityFilter"
|
|
173
|
+
:items="conformityOptions"
|
|
174
|
+
item-title="title"
|
|
175
|
+
item-value="value"
|
|
176
|
+
label="Filtrer par conformité"
|
|
177
|
+
variant="outlined"
|
|
178
|
+
dense
|
|
179
|
+
color="primary"
|
|
180
|
+
prepend-inner-icon="mdi-filter-variant"
|
|
181
|
+
></VSelect>
|
|
182
|
+
</VCol>
|
|
183
|
+
|
|
184
|
+
<!-- Recherche -->
|
|
185
|
+
<VCol cols="12" sm="6" md="8">
|
|
186
|
+
<v-combobox
|
|
187
|
+
:menu-props="menuProps"
|
|
188
|
+
variant="outlined"
|
|
189
|
+
color="primary"
|
|
190
|
+
v-model="search"
|
|
191
|
+
clearable
|
|
192
|
+
dense
|
|
193
|
+
:items="items"
|
|
194
|
+
item-value="value"
|
|
195
|
+
item-title="text"
|
|
196
|
+
:selected="search ? itemValue = search.value : itemValue = 0"
|
|
197
|
+
label="Rechercher un composant"
|
|
198
|
+
hide-selected
|
|
199
|
+
return-object
|
|
200
|
+
prepend-inner-icon="mdi-magnify"
|
|
201
|
+
></v-combobox>
|
|
202
|
+
</VCol>
|
|
203
|
+
</VRow>
|
|
204
|
+
|
|
205
|
+
<!-- Légende -->
|
|
206
|
+
<div class="d-flex flex-wrap mt-4">
|
|
207
|
+
<VChip class="mr-2 mb-2" color="success" variant="outlined">
|
|
208
|
+
<VIcon size="small" class="mr-1" :icon="checkIcon"></VIcon>
|
|
209
|
+
Composant natif conforme
|
|
210
|
+
</VChip>
|
|
211
|
+
<VChip class="mr-2 mb-2" color="error" variant="outlined">
|
|
212
|
+
<VIcon size="small" class="mr-1" :icon="iconAlert"></VIcon>
|
|
213
|
+
Composant natif non conforme
|
|
214
|
+
</VChip>
|
|
215
|
+
<VChip class="mr-2 mb-2" color="#a05bb6" variant="outlined">
|
|
216
|
+
<VIcon size="small" class="mr-1" :icon="iconAlert"></VIcon>
|
|
217
|
+
Composant alternatif conforme
|
|
218
|
+
</VChip>
|
|
219
|
+
</div>
|
|
220
|
+
</VSheet>
|
|
221
|
+
|
|
222
|
+
<!-- Liste des composants filtrés -->
|
|
223
|
+
<div class="mt-6">
|
|
224
|
+
<h3 class="text-h6 mb-4">Composants {{ conformityFilter === 'all' ? '' : conformityFilter === 'conform' ? 'conformes' : 'non conformes' }}</h3>
|
|
225
|
+
|
|
226
|
+
<div v-if="displayedComponents.length === 0" class="text-center pa-4 grey lighten-3 rounded">
|
|
227
|
+
Aucun composant ne correspond aux critères de filtrage.
|
|
228
|
+
</div>
|
|
229
|
+
|
|
230
|
+
<div v-else class="d-flex flex-wrap gap-2">
|
|
231
|
+
<VChip
|
|
232
|
+
v-for="component in displayedComponents"
|
|
233
|
+
:key="component.value"
|
|
234
|
+
:color="getComponentColor(component)"
|
|
235
|
+
variant="outlined"
|
|
236
|
+
class="ma-1"
|
|
237
|
+
@click="itemValue = component.value; search = items.find(item => item.value === component.value)"
|
|
238
|
+
style="cursor: pointer;"
|
|
239
|
+
>
|
|
240
|
+
<VIcon size="x-small" class="mr-1" :icon="getComponentIcon(component)"></VIcon>
|
|
241
|
+
{{ component.name }}
|
|
242
|
+
</VChip>
|
|
243
|
+
</div>
|
|
244
|
+
</div>
|
|
245
|
+
|
|
246
|
+
<!-- Affichage du composant sélectionné -->
|
|
247
|
+
<div class="d-flex justify-center mt-8" v-if="itemValue !== 0">
|
|
248
|
+
<VCard class="w-100 w-md-75" :elevation="3" :class="{'border-success': getComponentStatus(cardItem) === 'conform', 'border-error': getComponentStatus(cardItem) === 'non-conform', 'border-alternative': getComponentStatus(cardItem) === 'alternative'}" style="border-top: 4px solid; border-radius: 8px; overflow: hidden;">
|
|
249
|
+
<VCardItem>
|
|
250
|
+
<VCardTitle class="d-flex align-center">
|
|
251
|
+
<h3 class="text-h5 font-weight-bold">{{ cardItem.name }}</h3>
|
|
252
|
+
<VChip
|
|
253
|
+
class="ml-auto"
|
|
254
|
+
:color="getComponentColor(cardItem)"
|
|
255
|
+
:text="getComponentStatus(cardItem) === 'conform' ? 'Conforme' : getComponentStatus(cardItem) === 'alternative' ? 'Alternative conforme' : 'Non conforme'"
|
|
256
|
+
variant="tonal"
|
|
257
|
+
size="small"
|
|
258
|
+
>
|
|
259
|
+
<template v-slot:prepend>
|
|
260
|
+
<VIcon size="x-small" :icon="getComponentIcon(cardItem)"></VIcon>
|
|
261
|
+
</template>
|
|
262
|
+
</VChip>
|
|
263
|
+
</VCardTitle>
|
|
264
|
+
|
|
265
|
+
<VCardText class="pt-4">
|
|
266
|
+
<!-- Statistiques du composant -->
|
|
267
|
+
<div class="d-flex flex-wrap gap-4 mb-6">
|
|
268
|
+
<VCard variant="outlined" class="flex-grow-1">
|
|
269
|
+
<VCardItem>
|
|
270
|
+
<template v-slot:prepend>
|
|
271
|
+
<VAvatar size="36" :color="cardItem.errorImportants.length > 0 ? 'error' : 'success'" variant="tonal">
|
|
272
|
+
<VIcon :icon="cardItem.errorImportants.length > 0 ? iconAlert : checkIcon"></VIcon>
|
|
273
|
+
</VAvatar>
|
|
274
|
+
</template>
|
|
275
|
+
<VCardTitle>Erreurs bloquantes</VCardTitle>
|
|
276
|
+
<VCardSubtitle>{{ cardItem.errorImportants.length }} erreur(s)</VCardSubtitle>
|
|
277
|
+
</VCardItem>
|
|
278
|
+
</VCard>
|
|
279
|
+
|
|
280
|
+
<VCard variant="outlined" class="flex-grow-1">
|
|
281
|
+
<VCardItem>
|
|
282
|
+
<template v-slot:prepend>
|
|
283
|
+
<VAvatar size="36" :color="cardItem.errorIndeterminated.length > 0 ? 'warning' : 'success'" variant="tonal">
|
|
284
|
+
<VIcon :icon="cardItem.errorIndeterminated.length > 0 ? iconAlert : checkIcon"></VIcon>
|
|
285
|
+
</VAvatar>
|
|
286
|
+
</template>
|
|
287
|
+
<VCardTitle>Erreurs indéterminées</VCardTitle>
|
|
288
|
+
<VCardSubtitle>{{ cardItem.errorIndeterminated.length }} erreur(s)</VCardSubtitle>
|
|
289
|
+
</VCardItem>
|
|
290
|
+
</VCard>
|
|
291
|
+
</div>
|
|
292
|
+
|
|
293
|
+
<!-- Panneaux d'expansion pour les détails -->
|
|
294
|
+
<VExpansionPanels multiple variant="accordion">
|
|
295
|
+
<!-- Erreurs bloquantes -->
|
|
296
|
+
<VExpansionPanel>
|
|
297
|
+
<VExpansionPanelTitle>
|
|
298
|
+
<div class="d-flex align-center">
|
|
299
|
+
<VIcon :color="cardItem.errorImportants.length > 0 ? 'error' : 'success'" class="mr-2" :icon="cardItem.errorImportants.length > 0 ? iconAlert : checkIcon"></VIcon>
|
|
300
|
+
Erreurs bloquantes
|
|
301
|
+
<VChip class="ml-2" size="x-small" color="primary" variant="tonal">TANAGURU</VChip>
|
|
104
302
|
</div>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
303
|
+
</VExpansionPanelTitle>
|
|
304
|
+
<VExpansionPanelText>
|
|
305
|
+
<div v-if="cardItem.errorImportants.length === 0" class="pa-2 rounded bg-success-lighten-5">
|
|
306
|
+
<p class="text-body-2 mb-0">
|
|
307
|
+
<VIcon size="small" color="success" class="mr-1" :icon="checkIcon"></VIcon>
|
|
308
|
+
Pas d'erreur d'accessibilité bloquante relevée à ce jour
|
|
111
309
|
</p>
|
|
112
310
|
</div>
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
<v-btn variant="tonal" size="x-small"
|
|
132
|
-
style="margin-left: 3px;font-size: 9px;" rounded> Tanaguru
|
|
133
|
-
</v-btn>
|
|
134
|
-
|
|
135
|
-
</v-expansion-panel-title>
|
|
136
|
-
<v-expansion-panel-text>
|
|
137
|
-
<div v-if="cardItem.errorIndeterminated.length == 0">
|
|
138
|
-
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 12px;">Pas
|
|
139
|
-
d'erreur
|
|
140
|
-
d'accessibilité relevée à ce jour</p>
|
|
311
|
+
|
|
312
|
+
<VList v-else density="compact" class="bg-error-lighten-5 rounded">
|
|
313
|
+
<VListItem v-for="(item, i) in cardItem.errorImportants" :key="i" class="py-1">
|
|
314
|
+
<VListItemTitle class="text-body-2">
|
|
315
|
+
<span class="font-weight-bold">{{ item.match('[0-9.]+')?.join('') || '' }}</span>
|
|
316
|
+
{{ item.replace(/[0-9.]/g, '') }}
|
|
317
|
+
</VListItemTitle>
|
|
318
|
+
</VListItem>
|
|
319
|
+
</VList>
|
|
320
|
+
|
|
321
|
+
<VDivider class="my-3" v-if="cardItem.errorSolutionImportant.length !== 0"></VDivider>
|
|
322
|
+
|
|
323
|
+
<div v-if="cardItem.errorSolutionImportant.length !== 0" class="pa-2 rounded bg-info-lighten-5">
|
|
324
|
+
<p class="text-body-2 mb-0">
|
|
325
|
+
<VIcon size="small" color="info" class="mr-1" :icon="infoIcon"></VIcon>
|
|
326
|
+
<span class="font-weight-bold">Solution : </span>
|
|
327
|
+
{{ cardItem.errorSolutionImportant[0] }}
|
|
328
|
+
</p>
|
|
141
329
|
</div>
|
|
142
|
-
|
|
143
|
-
|
|
330
|
+
</VExpansionPanelText>
|
|
331
|
+
</VExpansionPanel>
|
|
144
332
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
333
|
+
<VExpansionPanel>
|
|
334
|
+
<VExpansionPanelTitle>
|
|
335
|
+
<div class="d-flex align-center">
|
|
336
|
+
<VIcon :color="cardItem.errorIndeterminated.length > 0 ? iconAlert : checkIcon" class="mr-2" :icon="cardItem.errorIndeterminated.length > 0 ? iconAlert : checkIcon"></VIcon>
|
|
337
|
+
Erreurs indéterminées
|
|
338
|
+
<VChip class="ml-2" size="x-small" color="primary" variant="tonal">TANAGURU</VChip>
|
|
339
|
+
</div>
|
|
340
|
+
</VExpansionPanelTitle>
|
|
341
|
+
<VExpansionPanelText>
|
|
342
|
+
<div v-if="cardItem.errorIndeterminated.length === 0" class="pa-2 rounded bg-success-lighten-5">
|
|
343
|
+
<p class="text-body-2 mb-0">
|
|
344
|
+
<VIcon size="small" color="success" class="mr-1" :icon="checkIcon"></VIcon>
|
|
345
|
+
Pas d'erreur d'accessibilité indéterminée relevée à ce jour
|
|
149
346
|
</p>
|
|
150
347
|
</div>
|
|
151
|
-
|
|
152
|
-
<v-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
348
|
+
|
|
349
|
+
<VList v-else density="compact" class="bg-warning-lighten-5 rounded">
|
|
350
|
+
<VListItem v-for="(item, i) in cardItem.errorIndeterminated" :key="i" class="py-1">
|
|
351
|
+
<VListItemTitle class="text-body-2">
|
|
352
|
+
<span class="font-weight-bold">{{ item.match('[0-9.]+')?.join('') || '' }}</span>
|
|
353
|
+
{{ item.replace(/[0-9.]/g, '') }}
|
|
354
|
+
</VListItemTitle>
|
|
355
|
+
</VListItem>
|
|
356
|
+
</VList>
|
|
357
|
+
|
|
358
|
+
<VDivider class="my-3" v-if="cardItem.errorSolutionIndeterminated && cardItem.errorSolutionIndeterminated.length > 0"></VDivider>
|
|
359
|
+
|
|
360
|
+
<div v-if="cardItem.errorSolutionIndeterminated && cardItem.errorSolutionIndeterminated.length > 0" class="pa-2 rounded bg-info-lighten-5">
|
|
361
|
+
<p class="text-body-2 mb-0">
|
|
362
|
+
<VIcon size="small" color="info" class="mr-1" :icon="infoIcon"></VIcon>
|
|
363
|
+
<span class="font-weight-bold">Solution : </span>
|
|
364
|
+
{{ cardItem.errorSolutionIndeterminated[0] }}
|
|
365
|
+
</p>
|
|
163
366
|
</div>
|
|
164
|
-
</
|
|
165
|
-
</
|
|
166
|
-
</
|
|
167
|
-
|
|
168
|
-
</
|
|
169
|
-
<
|
|
170
|
-
|
|
171
|
-
<
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
367
|
+
</VExpansionPanelText>
|
|
368
|
+
</VExpansionPanel>
|
|
369
|
+
</VExpansionPanels>
|
|
370
|
+
|
|
371
|
+
</VCardText>
|
|
372
|
+
<VDivider class="mb-2"></VDivider>
|
|
373
|
+
<VCardActions>
|
|
374
|
+
<VCard variant="flat" class="w-100 bg-primary-lighten-5 pa-3">
|
|
375
|
+
<VCardTitle class="text-h6 pb-2">
|
|
376
|
+
<VIcon color="primary" class="mr-2" icon="mdi-lightbulb-outline"></VIcon>
|
|
377
|
+
Solutions recommandées
|
|
378
|
+
</VCardTitle>
|
|
379
|
+
|
|
380
|
+
<div v-if="cardItem.solution.length === 0" class="text-body-2 text-grey">
|
|
381
|
+
Aucune solution recommandée pour le moment.
|
|
382
|
+
</div>
|
|
383
|
+
|
|
384
|
+
<VChipGroup v-else>
|
|
385
|
+
<VChip
|
|
386
|
+
v-for="(item, index) in cardItem.solution"
|
|
387
|
+
:key="index"
|
|
388
|
+
color="primary"
|
|
389
|
+
variant="elevated"
|
|
390
|
+
class="ma-1"
|
|
391
|
+
link
|
|
392
|
+
:href="item.href"
|
|
393
|
+
target="_blank"
|
|
394
|
+
>
|
|
395
|
+
<VIcon start size="small" :icon="linkIcon"></VIcon>
|
|
396
|
+
{{ item.name }}
|
|
397
|
+
</VChip>
|
|
398
|
+
</VChipGroup>
|
|
399
|
+
</VCard>
|
|
400
|
+
</VCardActions>
|
|
401
|
+
</VCardItem>
|
|
402
|
+
</VCard>
|
|
403
|
+
</div>
|
|
180
404
|
</div>
|
|
181
405
|
`,
|
|
182
406
|
}
|
|
@@ -194,7 +418,7 @@ export const Legende: StoryObj = {
|
|
|
194
418
|
return { args, checkIcon, iconAlert }
|
|
195
419
|
},
|
|
196
420
|
template: `
|
|
197
|
-
<p class="mb-2" style="color: grey;font-size: 11px;">L'étude porte sur 25 composants à date du
|
|
421
|
+
<p class="mb-2" style="color: grey;font-size: 11px;">L'étude porte sur 25 composants à date du 19/06/2025</p>
|
|
198
422
|
|
|
199
423
|
<VRow >
|
|
200
424
|
<VCol cols="12" sm="12">
|