be3d88ed45
## Problème Sur la famille Date editable, le masque maska n'imposait que la *forme* (`##/##/####`). Une valeur structurellement absurde comme `99/99/9999` était donc **saisissable**, puis rejetée *a posteriori* par la validation. Le métier veut que ce soit **impossible à taper**. ## Solution (masque borné + validation en filet) - `composables/maskTemplate.ts` — `buildBoundedMask(template)` : borne le **premier chiffre de chaque champ** (jour `0-3`, mois `0-1`, heure `0-2`, minute `0-5`). Distingue le mois des minutes (même lettre `M`) selon la présence d'heures dans le gabarit, pour ne pas brider la saisie des minutes du DateTime. - `internal/CalendarField.vue` — branche le builder dans `maskaOptions` (remplace le `replace(/[A-Za-z]/g, '#')`). Les impossibilités plus fines (`31/02`, 29/02 non bissextile, hors `min`/`max`) restent captées par la **validation** (`invalidMessage` + `update:valid=false`). ## Tests - `maskTemplate.test.ts` (5) — bornes par champ, structure du masque, non-confusion mois/minutes. - `Date.test.ts` — test `invalidMessage` adapté (`32/13/2026`, typable→invalide) + garde de non-régression : `99/99/9999` ne s'inscrit jamais et n'émet aucune date. - Suite complète : **1004/1004 verte** (DateTime 36 incluse → saisie d'heure intacte). Doc : `COMPONENTS.md` (MalioDate) + `CHANGELOG.md` (Fixed) à jour. Reviewed-on: #79 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
81 lines
2.8 KiB
TypeScript
81 lines
2.8 KiB
TypeScript
import type {SidebarSection} from '../app/components/malio/sidebar/Sidebar.vue'
|
|
|
|
export const navSections: SidebarSection[] = [
|
|
{
|
|
label: 'BOUTONS',
|
|
icon: 'mdi:gesture-tap-button',
|
|
items: [
|
|
{label: 'Button', to: '/composant/button/button'},
|
|
{label: 'Button Icon', to: '/composant/button/buttonIcon'},
|
|
],
|
|
},
|
|
{
|
|
label: 'CHAMPS',
|
|
icon: 'mdi:form-textbox',
|
|
items: [
|
|
{label: 'Texte', to: '/composant/input/inputText'},
|
|
{label: 'Nombre', to: '/composant/input/inputNumber'},
|
|
{label: 'Montant', to: '/composant/input/inputAmount'},
|
|
{label: 'Email', to: '/composant/input/inputEmail'},
|
|
{label: 'Mot de passe', to: '/composant/input/inputPassword'},
|
|
{label: 'Téléphone', to: '/composant/input/inputPhone'},
|
|
{label: 'Zone de texte', to: '/composant/input/inputTextArea'},
|
|
{label: 'Saisie assistée', to: '/composant/input/inputAutocomplete'},
|
|
{label: 'Upload', to: '/composant/input/inputUpload'},
|
|
{label: 'Éditeur riche', to: '/composant/input/inputRichText'},
|
|
],
|
|
},
|
|
{
|
|
label: 'DATES & HEURES',
|
|
icon: 'mdi:calendar-clock',
|
|
items: [
|
|
{label: 'Date', to: '/composant/date/date'},
|
|
{label: 'Plage de dates', to: '/composant/date/dateRange'},
|
|
{label: 'Semaine', to: '/composant/date/dateWeek'},
|
|
{label: 'Date & heure', to: '/composant/date/datetime'},
|
|
{label: 'Heure', to: '/composant/time/time'},
|
|
{label: 'Sélecteur d\'heure', to: '/composant/time/timePicker'},
|
|
],
|
|
},
|
|
{
|
|
label: 'SÉLECTIONS',
|
|
icon: 'mdi:form-dropdown',
|
|
items: [
|
|
{label: 'Select', to: '/composant/select/select'},
|
|
{label: 'Select Checkbox', to: '/composant/select/selectCheckbox'},
|
|
{label: 'Checkbox', to: '/composant/checkbox/checkbox'},
|
|
{label: 'Radio', to: '/composant/radio/radioButton'},
|
|
],
|
|
},
|
|
{
|
|
label: 'NAVIGATION',
|
|
icon: 'mdi:navigation-variant',
|
|
items: [
|
|
{label: 'Sidebar', to: '/composant/sidebar/sidebar'},
|
|
{label: 'Drawer', to: '/composant/drawer/drawer'},
|
|
{label: 'Modal', to: '/composant/modal/modal'},
|
|
{label: 'Onglets', to: '/composant/tab/tabList'},
|
|
{label: 'Accordéon', to: '/composant/accordion/accordion'},
|
|
],
|
|
},
|
|
{
|
|
label: 'DONNÉES',
|
|
icon: 'mdi:table',
|
|
items: [
|
|
{label: 'DataTable', to: '/composant/datatable/datatable'},
|
|
],
|
|
},
|
|
{
|
|
label: 'DIVERS',
|
|
icon: 'mdi:dots-horizontal',
|
|
items: [
|
|
{label: 'Champs readonly', to: '/composant/divers/readonly'},
|
|
{label: 'Champs disabled', to: '/composant/divers/disabled'},
|
|
{label: 'Heure', to: '/composant/time/time'},
|
|
{label: 'Sélecteur de site', to: '/composant/site/siteSelector'},
|
|
{label: 'Formulaire client', to: '/composant/form/client'},
|
|
{label: 'Filtres', to: '/composant/filtre/filtres'},
|
|
],
|
|
},
|
|
]
|