codevdesign 2.0.12 → 2.0.14
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/composants/csqcChaise/chaiseConteneur.vue +370 -372
- package/composants/csqcDialogue.vue +120 -120
- package/composants/csqcImportCSV.vue +124 -126
- package/composants/csqcRecherche.vue +218 -219
- package/composants/csqcTable/csqcTable.vue +846 -847
- package/composants/csqcTable/csqcTableModaleChoixColonnes.vue +829 -831
- package/composants/csqcTiroir.vue +198 -197
- package/package.json +1 -1
- package/plugins/vuetify.ts +42 -4
|
@@ -1,197 +1,198 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-navigation-drawer
|
|
3
|
-
v-model="visible"
|
|
4
|
-
location="right"
|
|
5
|
-
temporary
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
import {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
if (
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
conteneurScroll
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
conteneurScroll
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
fermer
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<v-navigation-drawer
|
|
3
|
+
v-model="visible"
|
|
4
|
+
location="right"
|
|
5
|
+
temporary
|
|
6
|
+
color="background"
|
|
7
|
+
class="pa-0 elevation-2 csqc-ligneBleue"
|
|
8
|
+
:persistent="persistant"
|
|
9
|
+
:width="grosseurTiroir"
|
|
10
|
+
v-bind="$attrs"
|
|
11
|
+
@keydown.esc="!persistant ? fermeture : ''"
|
|
12
|
+
@click:outside="!persistant ? fermeture : ''"
|
|
13
|
+
>
|
|
14
|
+
<v-card
|
|
15
|
+
color="background"
|
|
16
|
+
class="pa-0 ma-0 pl-8 pt-8"
|
|
17
|
+
>
|
|
18
|
+
<!-- Bouton en haut à droite -->
|
|
19
|
+
<v-btn
|
|
20
|
+
icon="mdi-close"
|
|
21
|
+
variant="plain"
|
|
22
|
+
class="position-absolute iconeHover"
|
|
23
|
+
color="primary"
|
|
24
|
+
style="right: 5px; top: 5px; border-radius: 0px"
|
|
25
|
+
@click="fermeture"
|
|
26
|
+
></v-btn>
|
|
27
|
+
|
|
28
|
+
<v-card-title
|
|
29
|
+
class="pa-0 ma-0 pb-6 text-wrap"
|
|
30
|
+
style="font-size: 24px"
|
|
31
|
+
>
|
|
32
|
+
<slot name="titre"></slot>
|
|
33
|
+
<div text-h5>{{ titre }}</div>
|
|
34
|
+
</v-card-title>
|
|
35
|
+
|
|
36
|
+
<v-card-text class="pa-0 ma-0 pb-6 pr-6">
|
|
37
|
+
<v-container>
|
|
38
|
+
<slot></slot>
|
|
39
|
+
<slot name="content"></slot>
|
|
40
|
+
</v-container>
|
|
41
|
+
</v-card-text>
|
|
42
|
+
<v-card-actions class="my-2 d-flex justify-end pr-6 pb-5">
|
|
43
|
+
<slot name="actions"></slot>
|
|
44
|
+
<bouton-tertiaire-standard
|
|
45
|
+
v-if="btnAnnuler"
|
|
46
|
+
:loading="operationEnCours"
|
|
47
|
+
@click="fermeture"
|
|
48
|
+
>
|
|
49
|
+
{{ props.btnAnnulerTexte ? props.btnAnnulerTexte : $t('csqc.bouton.annuler') }}
|
|
50
|
+
</bouton-tertiaire-standard>
|
|
51
|
+
|
|
52
|
+
<bouton-primaire-standard
|
|
53
|
+
v-if="btnOk"
|
|
54
|
+
class="Gouttiere"
|
|
55
|
+
:loading="operationEnCours"
|
|
56
|
+
:disabled="btnOkDesactiver || operationEnCours"
|
|
57
|
+
@click="okBouton"
|
|
58
|
+
>
|
|
59
|
+
{{ props.btnOkTexte ? props.btnOkTexte : $t('csqc.bouton.ok') }}
|
|
60
|
+
</bouton-primaire-standard>
|
|
61
|
+
</v-card-actions>
|
|
62
|
+
</v-card>
|
|
63
|
+
</v-navigation-drawer>
|
|
64
|
+
<Teleport to="body">
|
|
65
|
+
<v-fab
|
|
66
|
+
v-if="retourEnHaut && afficherBoutonHaut"
|
|
67
|
+
style="bottom: 24px; position: fixed; right: 24px; z-index: 2000"
|
|
68
|
+
elevation="8"
|
|
69
|
+
color="primary"
|
|
70
|
+
icon="mdi-arrow-up"
|
|
71
|
+
@click="allerEnHaut"
|
|
72
|
+
/>
|
|
73
|
+
</Teleport>
|
|
74
|
+
</template>
|
|
75
|
+
<script lang="ts" setup>
|
|
76
|
+
import { ref, computed, watch, nextTick, useAttrs } from 'vue'
|
|
77
|
+
import { useDisplay } from 'vuetify'
|
|
78
|
+
|
|
79
|
+
const visible = ref(false)
|
|
80
|
+
const display = useDisplay()
|
|
81
|
+
const attrs = useAttrs()
|
|
82
|
+
|
|
83
|
+
// Déclaration des props
|
|
84
|
+
const props = defineProps({
|
|
85
|
+
titre: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: '',
|
|
88
|
+
required: false,
|
|
89
|
+
},
|
|
90
|
+
btnAnnuler: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: true,
|
|
93
|
+
required: false,
|
|
94
|
+
},
|
|
95
|
+
btnOk: {
|
|
96
|
+
type: Boolean,
|
|
97
|
+
default: true,
|
|
98
|
+
required: false,
|
|
99
|
+
},
|
|
100
|
+
btnAnnulerTexte: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: '',
|
|
103
|
+
required: false,
|
|
104
|
+
},
|
|
105
|
+
btnOkDesactiver: {
|
|
106
|
+
type: Boolean,
|
|
107
|
+
default: false,
|
|
108
|
+
required: false,
|
|
109
|
+
},
|
|
110
|
+
operationEnCours: { type: Boolean, default: false },
|
|
111
|
+
persistant: { type: Boolean, default: true },
|
|
112
|
+
btnOkTexte: {
|
|
113
|
+
type: String,
|
|
114
|
+
default: '',
|
|
115
|
+
required: false,
|
|
116
|
+
},
|
|
117
|
+
retourEnHaut: {
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default: true,
|
|
120
|
+
},
|
|
121
|
+
})
|
|
122
|
+
|
|
123
|
+
// Déclaration des événements
|
|
124
|
+
const emit = defineEmits(['fermer', 'ok'])
|
|
125
|
+
|
|
126
|
+
// Back to top
|
|
127
|
+
const afficherBoutonHaut = ref(false)
|
|
128
|
+
let conteneurScroll: Element | null = null
|
|
129
|
+
|
|
130
|
+
function onScroll() {
|
|
131
|
+
afficherBoutonHaut.value = (conteneurScroll?.scrollTop ?? 0) > 350
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function allerEnHaut() {
|
|
135
|
+
conteneurScroll?.scrollTo({ top: 0, behavior: 'smooth' })
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
watch(visible, async val => {
|
|
139
|
+
if (!props.retourEnHaut) return
|
|
140
|
+
if (val) {
|
|
141
|
+
await nextTick()
|
|
142
|
+
conteneurScroll = document.querySelector('.v-navigation-drawer--active .v-navigation-drawer__content')
|
|
143
|
+
conteneurScroll?.addEventListener('scroll', onScroll)
|
|
144
|
+
} else {
|
|
145
|
+
conteneurScroll?.removeEventListener('scroll', onScroll)
|
|
146
|
+
conteneurScroll = null
|
|
147
|
+
afficherBoutonHaut.value = false
|
|
148
|
+
}
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
// Méthodes
|
|
152
|
+
const ouvrir = () => {
|
|
153
|
+
visible.value = true
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const fermer = () => {
|
|
157
|
+
visible.value = false
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const fermeture = () => {
|
|
161
|
+
emit('fermer')
|
|
162
|
+
fermer()
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const okBouton = () => {
|
|
166
|
+
emit('ok')
|
|
167
|
+
fermer()
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Calcul des tailles du tiroir en fonction du breakpoint
|
|
171
|
+
const grosseurTiroir = computed(() => {
|
|
172
|
+
if (attrs.width !== undefined && attrs.width !== null) return attrs.width as string | number
|
|
173
|
+
switch (display.name.value) {
|
|
174
|
+
case 'xs':
|
|
175
|
+
return ''
|
|
176
|
+
case 'sm':
|
|
177
|
+
return 0.95 * display.width.value
|
|
178
|
+
case 'md':
|
|
179
|
+
return 0.8 * display.width.value
|
|
180
|
+
case 'lg':
|
|
181
|
+
return 0.7 * display.width.value
|
|
182
|
+
case 'xl':
|
|
183
|
+
return 0.6 * display.width.value
|
|
184
|
+
case 'xxl':
|
|
185
|
+
return 0.5 * display.width.value
|
|
186
|
+
default:
|
|
187
|
+
return ''
|
|
188
|
+
}
|
|
189
|
+
})
|
|
190
|
+
|
|
191
|
+
defineExpose({ ouvrir, fermer })
|
|
192
|
+
</script>
|
|
193
|
+
|
|
194
|
+
<style>
|
|
195
|
+
.csqc-ligneBleue {
|
|
196
|
+
border-left: 30px #095797 solid !important;
|
|
197
|
+
}
|
|
198
|
+
</style>
|
package/package.json
CHANGED
package/plugins/vuetify.ts
CHANGED
|
@@ -16,19 +16,43 @@ export default createVuetify({
|
|
|
16
16
|
BoutonPrimaire: VBtn,
|
|
17
17
|
BoutonSecondaire: VBtn,
|
|
18
18
|
BoutonTertiaire: VBtn,
|
|
19
|
+
BoutonPrimaireStandard: VBtn,
|
|
20
|
+
BoutonSecondaireStandard: VBtn,
|
|
21
|
+
BoutonTertiaireStandard: VBtn,
|
|
19
22
|
},
|
|
20
23
|
defaults: {
|
|
21
|
-
VBtn: {
|
|
22
|
-
style: 'border-radius: 0px;'
|
|
23
|
-
},
|
|
24
24
|
BoutonPrimaire: {
|
|
25
25
|
variant: 'flat',
|
|
26
|
+
color: "primary",
|
|
27
|
+
class: "BoutonCSQCCompact"
|
|
26
28
|
},
|
|
27
29
|
BoutonSecondaire: {
|
|
28
30
|
variant: 'outlined',
|
|
31
|
+
color: "primary",
|
|
32
|
+
class: "BoutonCSQCCompact"
|
|
29
33
|
},
|
|
30
34
|
BoutonTertiaire: {
|
|
31
35
|
variant: 'text',
|
|
36
|
+
color: "primary",
|
|
37
|
+
class: "BoutonCSQCCompact"
|
|
38
|
+
},
|
|
39
|
+
BoutonPrimaireStandard: {
|
|
40
|
+
variant: 'flat',
|
|
41
|
+
color: "primary",
|
|
42
|
+
size: "x-large",
|
|
43
|
+
class: "BoutonCSQC"
|
|
44
|
+
},
|
|
45
|
+
BoutonSecondaireStandard: {
|
|
46
|
+
variant: 'outlined',
|
|
47
|
+
color: "primary",
|
|
48
|
+
size: "x-large",
|
|
49
|
+
class: "BoutonCSQC"
|
|
50
|
+
},
|
|
51
|
+
BoutonTertiaireStandard: {
|
|
52
|
+
variant: 'text',
|
|
53
|
+
color: "primary",
|
|
54
|
+
size: "x-large",
|
|
55
|
+
class: "BoutonCSQC"
|
|
32
56
|
},
|
|
33
57
|
VTextField: {
|
|
34
58
|
variant: 'outlined',
|
|
@@ -73,7 +97,7 @@ export default createVuetify({
|
|
|
73
97
|
bleuPale: '#DAE6F0',
|
|
74
98
|
bleuClair: '#4A98D9',
|
|
75
99
|
bleuMoyen: '#19406C',
|
|
76
|
-
bleuFonce: '#223654',
|
|
100
|
+
bleuFonce: '#223654', // couleur du texte
|
|
77
101
|
rose: '#E58271',
|
|
78
102
|
rosePale: '#FFDBD6',
|
|
79
103
|
rouge: '#CB381F',
|
|
@@ -106,3 +130,17 @@ export default createVuetify({
|
|
|
106
130
|
},
|
|
107
131
|
},
|
|
108
132
|
})
|
|
133
|
+
|
|
134
|
+
// Déclare les alias Vuetify ci-dessus (createVuetify > aliases) pour que Volar reconnaisse
|
|
135
|
+
// les balises dans les templates (coloration, autocomplétion, vérif. des props).
|
|
136
|
+
// Placé ici pour que l'augmentation voyage avec la définition runtime des alias.
|
|
137
|
+
declare module 'vue' {
|
|
138
|
+
export interface GlobalComponents {
|
|
139
|
+
BoutonPrimaire: typeof VBtn
|
|
140
|
+
BoutonSecondaire: typeof VBtn
|
|
141
|
+
BoutonTertiaire: typeof VBtn
|
|
142
|
+
BoutonPrimaireStandard: typeof VBtn
|
|
143
|
+
BoutonSecondaireStandard: typeof VBtn
|
|
144
|
+
BoutonTertiaireStandard: typeof VBtn
|
|
145
|
+
}
|
|
146
|
+
}
|