PageSourceSearch

https://staging-grandsprojets.netlify.app/modules/ui/toggles-config.js

js staging-grandsprojets.netlify.app collected 2026-10-03 11:27:11 UTC 2,405 bytes, 102 lines download raw bytes

1/**
2 * Configuration centralisée des toggles
3 * Définit tous les boutons de contrôle de l'interface
4 */
5
6export const TOGGLES_CONFIG = {
7  city: {
8    id: 'city-toggle',
9    icon: 'fa-city',
10    label: 'Espace',
11    ariaLabel: 'Changer d\'espace',
12    position: 0,
13    defaultState: false,
14    hasDockPanel: true
15  },
16
17  filters: {
18    id: 'filters-toggle',
19    icon: 'fa-map',
20    label: 'Filtres de carte',
21    ariaLabel: 'Afficher ou masquer les filtres de carte',
22    position: 0,
23    hasCounter: true,
24    counterSelector: '.filter-count',
25    defaultState: false,
26    hasDockPanel: true
27  },
28  
29  mode3d: {
30    id: 'mode3d-toggle',
31    icon: 'fa-cube',
32    iconActive: 'fa-cube',
33    label: 'Mode 3D',
34    ariaLabel: 'Activer ou désactiver le mode 3D (relief et bâtiments)',
35    position: 1,
36    persistent: true,
37    defaultState: false,
38    storageKey: 'mode-3d'
39  },
40
41  basemap: {
42    id: 'basemap-toggle',
43    icon: 'fa-globe',
44    label: 'Fond de carte',
45    ariaLabel: 'Changer le fond de carte',
46    position: 2,
47    defaultState: false,
48    hasDockPanel: true
49  },
50  
51  search: {
52    id: 'search-toggle',
53    icon: 'fa-search',
54    label: 'Rechercher',
55    ariaLabel: 'Rechercher une adresse',
56    position: 3,
57    defaultState: false,
58    hasDockPanel: true
59  },
60  
61  location: {
62    id: 'location-toggle',
63    icon: 'fa-location-arrow',
64    label: 'Ma position',
65    ariaLabel: 'Centrer la carte sur ma position',
66    position: 4,
67    states: ['default', 'active', 'loading', 'error'],
68    defaultState: false
69  },
70  
71  actions: {
72    id: 'actions-toggle',
73    icon: 'fa-ellipsis-v',
74    label: 'Menu',
75    ariaLabel: 'Menu des actions',
76    position: 5,
77    defaultState: false,
78    hasDockPanel: true,
79    mobileOnly: true,
80    // Never trimmed by the overflow algorithm - it IS the overflow entry point
81    overflowExempt: true
82  }
83};
84
85/**
86 * Ordre d'affichage des toggles - SOURCE UNIQUE DE VÉRITÉ
87 * Desktop: de droite à gauche | Mobile: de gauche à droite
88 */
89export const TOGGLE_ORDER = [
90  'city',       // Sélecteur d'espace
91  'filters',    // Filtres de carte
92  'mode3d',     // Mode 3D (relief + bâtiments)
93  'basemap',    // Fond de carte
94  'search',     // Recherche
95  'location',   // Ma position
96  'actions'     // Menu actions (mobile only)
97];
98
99/**
100 * Ordre inversé pour desktop (droite → gauche)
101 */
102export const DESKTOP_ORDER = [...TOGGLE_ORDER].reverse();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.