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