codevdesign 0.0.91 → 0.0.93
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/csqcAide.vue +55 -55
- package/composants/csqcAlerteErreur.vue +87 -86
- package/composants/csqcChaise/chaiseConteneur.vue +362 -362
- package/composants/csqcChaise/chaiseItem.vue +54 -54
- package/composants/{codeBudgetaireGenerique.vue → csqcCodeBudgetaireGenerique.vue} +257 -260
- package/composants/csqcConfirmation.vue +75 -74
- package/composants/{csqcDate/csqcDate.vue → csqcDate.vue} +15 -2
- package/composants/csqcEditeurTexteRiche.vue +319 -318
- package/composants/csqcEntete.vue +163 -163
- package/composants/csqcImportCSV.vue +125 -125
- package/composants/csqcOptionSwitch.vue +120 -124
- package/composants/csqcRechercheUtilisateur.vue +197 -197
- package/composants/csqcSnackbar.vue +88 -98
- package/composants/csqcTiroir.vue +156 -155
- package/composants/gabarit/csqcMenu.vue +281 -281
- package/index.ts +2 -2
- package/modeles/composants/csqcMenuModele.ts +18 -18
- package/package.json +1 -1
|
@@ -1,98 +1,88 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-snackbar
|
|
3
|
-
v-model="snackbar"
|
|
4
|
-
|
|
5
|
-
:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@update:model-value="fermer"
|
|
10
|
-
>
|
|
11
|
-
<template v-if="props.titre || props.message">
|
|
12
|
-
<b style="font-size: 12pt">{{ props.titre }}</b>
|
|
13
|
-
<br v-if="props.titre" />
|
|
14
|
-
<b>{{ props.message }}</b>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<template #actions>
|
|
18
|
-
<!-- on affiche tjrs si c'est -1 car on ne pourra pas fermer le snack -->
|
|
19
|
-
<v-icon
|
|
20
|
-
v-if="props.btnFermer || props.temps === -1"
|
|
21
|
-
color="white"
|
|
22
|
-
style="cursor: pointer"
|
|
23
|
-
@click.stop="fermer"
|
|
24
|
-
>
|
|
25
|
-
mdi-close
|
|
26
|
-
</v-icon>
|
|
27
|
-
</template>
|
|
28
|
-
</v-snackbar>
|
|
29
|
-
</template>
|
|
30
|
-
<script lang="ts" setup>
|
|
31
|
-
import { computed, ref, watch, type PropType } from 'vue'
|
|
32
|
-
|
|
33
|
-
// Définir les props avec les types
|
|
34
|
-
const props = defineProps({
|
|
35
|
-
styleCss: {
|
|
36
|
-
type: String,
|
|
37
|
-
required: false,
|
|
38
|
-
},
|
|
39
|
-
temps: {
|
|
40
|
-
type: Number,
|
|
41
|
-
required: false,
|
|
42
|
-
default: 4000,
|
|
43
|
-
validator(value: number) {
|
|
44
|
-
// Si la valeur est inférieure à -1, on la remplace par -1
|
|
45
|
-
if (value < -1) {
|
|
46
|
-
return false // Laisser échouer la validation pour gérer ça dans une logique personnalisée
|
|
47
|
-
}
|
|
48
|
-
// Validation que la valeur soit comprise entre -1 et Number.MAX_VALUE
|
|
49
|
-
return value <= Number.MAX_VALUE
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
message: {
|
|
53
|
-
type: String,
|
|
54
|
-
required: true,
|
|
55
|
-
},
|
|
56
|
-
titre: {
|
|
57
|
-
type: String,
|
|
58
|
-
required: false,
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
type:
|
|
62
|
-
required: false,
|
|
63
|
-
default:
|
|
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
|
-
return props.temps // Sinon, on retourne la valeur de la prop
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
watch(message, nouveau => {
|
|
94
|
-
if (nouveau != null && nouveau !== '') {
|
|
95
|
-
snackbar.value = true
|
|
96
|
-
}
|
|
97
|
-
})
|
|
98
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<v-snackbar
|
|
3
|
+
v-model="snackbar"
|
|
4
|
+
v-bind="$attrs"
|
|
5
|
+
:timeout="tempsFinal"
|
|
6
|
+
:style="styleCss"
|
|
7
|
+
color="success"
|
|
8
|
+
multi-line
|
|
9
|
+
@update:model-value="fermer"
|
|
10
|
+
>
|
|
11
|
+
<template v-if="props.titre || props.message">
|
|
12
|
+
<b style="font-size: 12pt">{{ props.titre }}</b>
|
|
13
|
+
<br v-if="props.titre" />
|
|
14
|
+
<b>{{ props.message }}</b>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<template #actions>
|
|
18
|
+
<!-- on affiche tjrs si c'est -1 car on ne pourra pas fermer le snack -->
|
|
19
|
+
<v-icon
|
|
20
|
+
v-if="props.btnFermer || props.temps === -1"
|
|
21
|
+
color="white"
|
|
22
|
+
style="cursor: pointer"
|
|
23
|
+
@click.stop="fermer"
|
|
24
|
+
>
|
|
25
|
+
mdi-close
|
|
26
|
+
</v-icon>
|
|
27
|
+
</template>
|
|
28
|
+
</v-snackbar>
|
|
29
|
+
</template>
|
|
30
|
+
<script lang="ts" setup>
|
|
31
|
+
import { computed, ref, watch, type PropType } from 'vue'
|
|
32
|
+
|
|
33
|
+
// Définir les props avec les types
|
|
34
|
+
const props = defineProps({
|
|
35
|
+
styleCss: {
|
|
36
|
+
type: String,
|
|
37
|
+
required: false,
|
|
38
|
+
},
|
|
39
|
+
temps: {
|
|
40
|
+
type: Number,
|
|
41
|
+
required: false,
|
|
42
|
+
default: 4000,
|
|
43
|
+
validator(value: number) {
|
|
44
|
+
// Si la valeur est inférieure à -1, on la remplace par -1
|
|
45
|
+
if (value < -1) {
|
|
46
|
+
return false // Laisser échouer la validation pour gérer ça dans une logique personnalisée
|
|
47
|
+
}
|
|
48
|
+
// Validation que la valeur soit comprise entre -1 et Number.MAX_VALUE
|
|
49
|
+
return value <= Number.MAX_VALUE
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
message: {
|
|
53
|
+
type: String,
|
|
54
|
+
required: true,
|
|
55
|
+
},
|
|
56
|
+
titre: {
|
|
57
|
+
type: String,
|
|
58
|
+
required: false,
|
|
59
|
+
},
|
|
60
|
+
btnFermer: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
required: false,
|
|
63
|
+
default: true,
|
|
64
|
+
},
|
|
65
|
+
})
|
|
66
|
+
const emit = defineEmits(['fermer:snackbar'])
|
|
67
|
+
const fermer = (): void => {
|
|
68
|
+
snackbar.value = false
|
|
69
|
+
emit('fermer:snackbar')
|
|
70
|
+
}
|
|
71
|
+
// Déclarer l'état réactif pour snackbar
|
|
72
|
+
const snackbar = ref(false)
|
|
73
|
+
const message = computed(() => props.message)
|
|
74
|
+
const tempsFinal = computed(() => {
|
|
75
|
+
if (props.temps < -1) {
|
|
76
|
+
return -1 // Si la valeur est inférieure à -1, on la met à -1
|
|
77
|
+
}
|
|
78
|
+
if (props.temps >= 0 && props.temps < 1000) return 1000 // on met 1 seconde minimum sinon one ne la voit pas
|
|
79
|
+
|
|
80
|
+
return props.temps // Sinon, on retourne la valeur de la prop
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
watch(message, nouveau => {
|
|
84
|
+
if (nouveau != null && nouveau !== '') {
|
|
85
|
+
snackbar.value = true
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
</script>
|
|
@@ -1,155 +1,156 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-navigation-drawer
|
|
3
|
-
v-model="visible"
|
|
4
|
-
location="right"
|
|
5
|
-
temporary
|
|
6
|
-
|
|
7
|
-
:width="grosseurTiroir"
|
|
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
|
-
<slot
|
|
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
|
-
import {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
const
|
|
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
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
fermer
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<v-navigation-drawer
|
|
3
|
+
v-model="visible"
|
|
4
|
+
location="right"
|
|
5
|
+
temporary
|
|
6
|
+
v-bind="$attrs"
|
|
7
|
+
:width="grosseurTiroir"
|
|
8
|
+
class="pa-0 elevation-2 csqc-ligneBleue"
|
|
9
|
+
:persistent="persistant"
|
|
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="text"
|
|
18
|
+
class="position-absolute couleurHover"
|
|
19
|
+
style="top: 5px; right: 5px"
|
|
20
|
+
@click="fermeture"
|
|
21
|
+
></v-btn>
|
|
22
|
+
|
|
23
|
+
<v-card-title
|
|
24
|
+
class="pa-0 ma-0 pb-6 text-wrap"
|
|
25
|
+
style="font-size: 24px"
|
|
26
|
+
>
|
|
27
|
+
<slot name="titre"></slot>
|
|
28
|
+
<div text-h5>{{ titre }}</div>
|
|
29
|
+
</v-card-title>
|
|
30
|
+
|
|
31
|
+
<v-card-text class="pa-0 ma-0 pb-6 pr-6">
|
|
32
|
+
<v-container>
|
|
33
|
+
<slot></slot>
|
|
34
|
+
<slot name="content"></slot>
|
|
35
|
+
</v-container>
|
|
36
|
+
</v-card-text>
|
|
37
|
+
<v-card-actions class="my-2 d-flex justify-end pr-6 pb-5">
|
|
38
|
+
<slot name="actions"></slot>
|
|
39
|
+
<v-btn
|
|
40
|
+
v-if="btnAnnuler"
|
|
41
|
+
color="primary"
|
|
42
|
+
variant="text"
|
|
43
|
+
:loading="operationEnCours"
|
|
44
|
+
@click="fermeture"
|
|
45
|
+
>
|
|
46
|
+
{{ props.btnAnnulerTexte ? props.btnAnnulerTexte : $t('csqc.bouton.annuler') }}
|
|
47
|
+
</v-btn>
|
|
48
|
+
|
|
49
|
+
<v-btn
|
|
50
|
+
v-if="btnOk"
|
|
51
|
+
class="Gouttiere"
|
|
52
|
+
color="primary"
|
|
53
|
+
variant="flat"
|
|
54
|
+
:loading="operationEnCours"
|
|
55
|
+
:disabled="btnOkDesactiver || operationEnCours"
|
|
56
|
+
@click="okBouton"
|
|
57
|
+
>
|
|
58
|
+
{{ props.btnOkTexte ? props.btnOkTexte : $t('csqc.bouton.ok') }}
|
|
59
|
+
</v-btn>
|
|
60
|
+
</v-card-actions>
|
|
61
|
+
</v-card>
|
|
62
|
+
</v-navigation-drawer>
|
|
63
|
+
</template>
|
|
64
|
+
<script lang="ts" setup>
|
|
65
|
+
import { ref, computed } from 'vue'
|
|
66
|
+
import { useDisplay } from 'vuetify'
|
|
67
|
+
|
|
68
|
+
const visible = ref(false)
|
|
69
|
+
const display = useDisplay()
|
|
70
|
+
|
|
71
|
+
// Déclaration des props
|
|
72
|
+
const props = defineProps({
|
|
73
|
+
titre: {
|
|
74
|
+
type: String,
|
|
75
|
+
default: '',
|
|
76
|
+
required: false,
|
|
77
|
+
},
|
|
78
|
+
btnAnnuler: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: true,
|
|
81
|
+
required: false,
|
|
82
|
+
},
|
|
83
|
+
btnOk: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: true,
|
|
86
|
+
required: false,
|
|
87
|
+
},
|
|
88
|
+
btnAnnulerTexte: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: '',
|
|
91
|
+
required: false,
|
|
92
|
+
},
|
|
93
|
+
btnOkDesactiver: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
default: false,
|
|
96
|
+
required: false,
|
|
97
|
+
},
|
|
98
|
+
operationEnCours: { type: Boolean, default: false },
|
|
99
|
+
persistant: { type: Boolean, default: true },
|
|
100
|
+
btnOkTexte: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: '',
|
|
103
|
+
required: false,
|
|
104
|
+
},
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
// Déclaration des événements
|
|
108
|
+
const emit = defineEmits(['fermer', 'ok'])
|
|
109
|
+
|
|
110
|
+
// Méthodes
|
|
111
|
+
const ouvrir = () => {
|
|
112
|
+
visible.value = true
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const fermer = () => {
|
|
116
|
+
visible.value = false
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const fermeture = () => {
|
|
120
|
+
emit('fermer')
|
|
121
|
+
fermer()
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const okBouton = () => {
|
|
125
|
+
emit('ok')
|
|
126
|
+
fermer()
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Calcul des tailles du tiroir en fonction du breakpoint
|
|
130
|
+
const grosseurTiroir = computed(() => {
|
|
131
|
+
switch (display.name.value) {
|
|
132
|
+
case 'xs':
|
|
133
|
+
return ''
|
|
134
|
+
case 'sm':
|
|
135
|
+
return 0.95 * display.width.value
|
|
136
|
+
case 'md':
|
|
137
|
+
return 0.8 * display.width.value
|
|
138
|
+
case 'lg':
|
|
139
|
+
return 0.7 * display.width.value
|
|
140
|
+
case 'xl':
|
|
141
|
+
return 0.6 * display.width.value
|
|
142
|
+
case 'xxl':
|
|
143
|
+
return 0.5 * display.width.value
|
|
144
|
+
default:
|
|
145
|
+
return ''
|
|
146
|
+
}
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
defineExpose({ ouvrir, fermer })
|
|
150
|
+
</script>
|
|
151
|
+
|
|
152
|
+
<style>
|
|
153
|
+
.csqc-ligneBleue {
|
|
154
|
+
border-left: 30px #095797 solid !important;
|
|
155
|
+
}
|
|
156
|
+
</style>
|