@cnamts/synapse 1.0.20 → 1.0.21
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/dist/{DateFilter-XURUmpMl.js → DateFilter-uN8OURoP.js} +1 -1
- package/dist/{NumberFilter-BZc0O8wV.js → NumberFilter-sm1dQNQi.js} +1 -1
- package/dist/{PeriodFilter-ZNdXcl3p.js → PeriodFilter-Cklsxnh9.js} +1 -1
- package/dist/{SelectFilter-DshYU5OK.js → SelectFilter-CWefj27Z.js} +1 -1
- package/dist/{TextFilter-D_c5dRPl.js → TextFilter-Ddyj885L.js} +1 -1
- package/dist/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.d.ts +160 -0
- package/dist/components/Customs/SyCheckBoxGroup/locales.d.ts +3 -0
- package/dist/components/Customs/SyCheckBoxGroup/types.d.ts +10 -0
- package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +1545 -2
- package/dist/components/Customs/SyRadioGroup/SyRadioGroup.d.ts +1495 -2
- package/dist/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.d.ts +60 -0
- package/dist/components/ErrorPage/ErrorPage.d.ts +1 -12
- package/dist/components/ErrorPage/locales.d.ts +18 -3
- package/dist/components/FileUpload/FileUpload.d.ts +2 -0
- package/dist/components/MaintenancePage/locales.d.ts +18 -2
- package/dist/components/NotFoundPage/locales.d.ts +20 -4
- package/dist/components/StatusPage/StatusPage.d.ts +39 -0
- package/dist/components/UploadWorkflow/UploadWorkflow.d.ts +13 -3
- package/dist/components/index.d.ts +3 -0
- package/dist/design-system-v3.js +126 -123
- package/dist/design-system-v3.umd.cjs +163 -163
- package/dist/{main-CuI6xaPq.js → main-CWniLr0s.js} +15191 -14668
- package/dist/style.css +1 -1
- package/dist/utils/theme/index.d.ts +6 -0
- package/package.json +7 -4
- package/src/components/ContextualMenu/ContextualMenu.stories.ts +0 -3
- package/src/components/ContextualMenu/accessibilite/Accessibility.mdx +67 -11
- package/src/components/CookieBanner/CookieBanner.stories.ts +11 -20
- package/src/components/CookieBanner/CookieBanner.vue +20 -5
- package/src/components/CookieBanner/accessibilite/Accessibility.mdx +67 -11
- package/src/components/CookieBanner/tests/CookieBanner.spec.ts +48 -4
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.mdx +32 -0
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.stories.ts +856 -0
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.vue +334 -0
- package/src/components/Customs/SyCheckBoxGroup/accessibilite/Accessibility.mdx +243 -0
- package/src/components/Customs/SyCheckBoxGroup/locales.ts +3 -0
- package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.a11y.spec.ts +30 -0
- package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.spec.ts +152 -0
- package/src/components/Customs/SyCheckBoxGroup/types.ts +10 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +16 -27
- package/src/components/Customs/SyCheckbox/accessibilite/Accessibility.mdx +1 -1
- package/src/components/Customs/SyForm/SyForm.a11y.spec.ts +1 -1
- package/src/components/Customs/SyRadioGroup/SyRadioGroup.vue +16 -43
- package/src/components/DatePicker/CalendarMode/DatePicker.vue +35 -11
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +43 -2
- package/src/components/DatePicker/DateTextInput/DateTextInput.vue +48 -21
- package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +98 -0
- package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.mdx +83 -0
- package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.stories.ts +502 -0
- package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.vue +428 -0
- package/src/components/DeclarationAccessibilityPage/accessibilite/Accessibility.mdx +75 -0
- package/src/components/DeclarationAccessibilityPage/tests/DeclarationAccessibilityPage.a11y.spec.ts +53 -0
- package/src/components/DeclarationAccessibilityPage/tests/DeclarationAccessibilityPage.spec.ts +59 -0
- package/src/components/DiacriticPicker/DiacriticPicker.vue +20 -1
- package/src/components/ErrorPage/ErrorPage.mdx +6 -16
- package/src/components/ErrorPage/ErrorPage.stories.ts +16 -87
- package/src/components/ErrorPage/ErrorPage.vue +38 -125
- package/src/components/ErrorPage/accessibilite/Accessibility.mdx +68 -6
- package/src/components/ErrorPage/assets/error-ap.svg +1774 -0
- package/src/components/ErrorPage/locales.ts +21 -3
- package/src/components/ErrorPage/tests/ErrorPage.a11y.spec.ts +5 -13
- package/src/components/ErrorPage/tests/ErrorPage.spec.ts +2 -41
- package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +8 -266
- package/src/components/FileUpload/FileUpload.vue +5 -0
- package/src/components/FooterBar/FooterBar.stories.ts +18 -14
- package/src/components/FooterBar/defaultSocialMediaLinks.ts +6 -4
- package/src/components/MaintenancePage/MaintenancePage.mdx +1 -1
- package/src/components/MaintenancePage/MaintenancePage.vue +15 -7
- package/src/components/MaintenancePage/accessibilite/Accessibility.mdx +61 -6
- package/src/components/MaintenancePage/assets/maintenance-ap.svg +1718 -0
- package/src/components/MaintenancePage/locales.ts +24 -3
- package/src/components/MaintenancePage/tests/MaintenancePage.a11y.spec.ts +75 -3
- package/src/components/MaintenancePage/tests/MaintenancePage.spec.ts +42 -2
- package/src/components/MaintenancePage/tests/__snapshots__/MaintenancePage.spec.ts.snap +3 -2
- package/src/components/NotFoundPage/NotFoundPage.mdx +1 -1
- package/src/components/NotFoundPage/NotFoundPage.stories.ts +3 -3
- package/src/components/NotFoundPage/NotFoundPage.vue +16 -11
- package/src/components/NotFoundPage/accessibilite/Accessibility.mdx +78 -6
- package/src/components/NotFoundPage/assets/not-found-ap.svg +2061 -0
- package/src/components/NotFoundPage/locales.ts +24 -4
- package/src/components/NotFoundPage/tests/NotFoundPage.a11y.spec.ts +168 -4
- package/src/components/NotFoundPage/tests/NotFoundPage.spec.ts +100 -12
- package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +2 -2
- package/src/components/NotificationBar/NotificationBar.mdx +2 -2
- package/src/components/NotificationBar/accessibilite/Accessibility.mdx +68 -8
- package/src/components/PageContainer/tests/PageContainer.a11y.spec.ts +14 -7
- package/src/components/PhoneField/PhoneField.stories.ts +46 -38
- package/src/components/SocialMediaLinks/DefaultSocialMediaLinks.ts +6 -4
- package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +7 -5
- package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +17 -13
- package/src/components/SocialMediaLinks/SocialMediaLinks.vue +9 -1
- package/src/components/SocialMediaLinks/accessibilite/Accessibility.mdx +63 -11
- package/src/components/SocialMediaLinks/tests/DefaultSocialMediaLinks.spec.ts +5 -5
- package/src/components/SocialMediaLinks/tests/SocialMediaLinks.a11y.spec.ts +59 -0
- package/src/components/SocialMediaLinks/tests/SocialMediaLinks.spec.ts +9 -7
- package/src/components/StatusPage/StatusPage.mdx +22 -0
- package/src/components/StatusPage/StatusPage.stories.ts +193 -0
- package/src/components/StatusPage/StatusPage.vue +145 -0
- package/src/components/StatusPage/accessibilite/Accessibility.mdx +81 -0
- package/src/components/StatusPage/tests/StatusPage.a11y.spec.ts +29 -0
- package/src/components/StatusPage/tests/StatusPage.spec.ts +50 -0
- package/src/components/StatusPage/tests/__snapshots__/StatusPage.spec.ts.snap +270 -0
- package/src/components/TableToolbar/TableToolbar.stories.ts +6 -6
- package/src/components/TableToolbar/TableToolbar.vue +1 -1
- package/src/components/TableToolbar/tests/__snapshots__/TableToolbar.spec.ts.snap +0 -5
- package/src/components/UploadWorkflow/UploadWorkflow.mdx +11 -1
- package/src/components/UploadWorkflow/UploadWorkflow.stories.ts +107 -3
- package/src/components/UploadWorkflow/UploadWorkflow.vue +35 -24
- package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +48 -0
- package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +9 -5
- package/src/components/UploadWorkflow/useFileList.ts +7 -0
- package/src/components/index.ts +3 -0
- package/src/composables/rules/tests/useFieldValidation.spec.ts +39 -3
- package/src/composables/rules/useFieldValidation.ts +24 -9
- package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +7 -0
- package/src/utils/theme/index.ts +19 -0
- package/src/utils/theme/tests/useThemeLocales.spec.ts +245 -0
- package/dist/components/MaintenancePage/index.d.ts +0 -2
- package/src/components/Customs/SyPagination/tests/SyPagination.a11y.spec.ts +0 -27
- package/src/components/Customs/SyTabs/tests/SyTabs.a11y.spec.ts +0 -51
- package/src/components/DataListItem/tests/DataListItem.a11y.spec.ts +0 -31
- package/src/components/DatePicker/CalendarMode/tests/DatePicker.a11y.spec.ts +0 -27
- package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.a11y.spec.ts +0 -26
- package/src/components/DatePicker/DateTextInput/tests/DateTextInput.a11y.spec.ts +0 -27
- package/src/components/DownloadBtn/tests/DownloadBtn.a11y.spec.ts +0 -26
- package/src/components/ExternalLinks/tests/ExternalLinks.a11y.spec.ts +0 -39
- package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.a11y.spec.ts +0 -45
- package/src/components/HeaderToolbar/tests/HeaderToolbar.a11y.spec.ts +0 -25
- package/src/components/LunarCalendar/tests/LunarCalendar.a11y.spec.ts +0 -31
- package/src/components/MaintenancePage/index.ts +0 -3
- package/src/components/PageContainer/Accessibilite/AccessibilityGuide.mdx +0 -0
- package/src/components/PaginatedTable/tests/PaginatedTable.a11y.spec.ts +0 -43
- package/src/components/PhoneField/tests/PhoneField.a11y.spec.ts +0 -34
- /package/src/components/NotFoundPage/assets/{not-found.svg → not-found-cnam.svg} +0 -0
- /package/src/components/PageContainer/{Accessibilite → accessibilite}/Accessibility.mdx +0 -0
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`StatusPage > renders correctly 1`] = `
|
|
4
|
+
<div class="
|
|
5
|
+
d-flex
|
|
6
|
+
justify-center
|
|
7
|
+
px-14
|
|
8
|
+
py-10
|
|
9
|
+
vd-page-container
|
|
10
|
+
">
|
|
11
|
+
<div
|
|
12
|
+
class="
|
|
13
|
+
bg-transparent
|
|
14
|
+
v-sheet
|
|
15
|
+
v-theme--light
|
|
16
|
+
"
|
|
17
|
+
style="width: 800px;"
|
|
18
|
+
>
|
|
19
|
+
<div class="
|
|
20
|
+
elevation-0
|
|
21
|
+
pa-6
|
|
22
|
+
pa-sm-16
|
|
23
|
+
v-card
|
|
24
|
+
v-card--density-default
|
|
25
|
+
v-card--variant-elevated
|
|
26
|
+
v-theme--light
|
|
27
|
+
">
|
|
28
|
+
<!---->
|
|
29
|
+
<div class="v-card__loader">
|
|
30
|
+
<div
|
|
31
|
+
aria-hidden="true"
|
|
32
|
+
aria-valuemax="100"
|
|
33
|
+
aria-valuemin="0"
|
|
34
|
+
class="
|
|
35
|
+
v-locale--is-ltr
|
|
36
|
+
v-progress-linear
|
|
37
|
+
v-theme--light
|
|
38
|
+
"
|
|
39
|
+
role="progressbar"
|
|
40
|
+
style="
|
|
41
|
+
top: 0px;
|
|
42
|
+
height: 0px;
|
|
43
|
+
--v-progress-linear-height: 2px;
|
|
44
|
+
"
|
|
45
|
+
>
|
|
46
|
+
<!---->
|
|
47
|
+
<div
|
|
48
|
+
class="v-progress-linear__background"
|
|
49
|
+
style="opacity: NaN;"
|
|
50
|
+
></div>
|
|
51
|
+
<div
|
|
52
|
+
class="v-progress-linear__buffer"
|
|
53
|
+
style="
|
|
54
|
+
opacity: NaN;
|
|
55
|
+
width: 0%;
|
|
56
|
+
"
|
|
57
|
+
></div>
|
|
58
|
+
<transition-stub
|
|
59
|
+
appear="false"
|
|
60
|
+
css="true"
|
|
61
|
+
name="fade-transition"
|
|
62
|
+
persisted="false"
|
|
63
|
+
>
|
|
64
|
+
<div class="v-progress-linear__indeterminate">
|
|
65
|
+
<div class="
|
|
66
|
+
long
|
|
67
|
+
v-progress-linear__indeterminate
|
|
68
|
+
"></div>
|
|
69
|
+
<div class="
|
|
70
|
+
short
|
|
71
|
+
v-progress-linear__indeterminate
|
|
72
|
+
"></div>
|
|
73
|
+
</div>
|
|
74
|
+
</transition-stub>
|
|
75
|
+
<!---->
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
<!---->
|
|
79
|
+
<!---->
|
|
80
|
+
<div class="
|
|
81
|
+
max-width-none
|
|
82
|
+
v-row
|
|
83
|
+
">
|
|
84
|
+
<div class="
|
|
85
|
+
align-sm-start
|
|
86
|
+
d-flex
|
|
87
|
+
flex-column
|
|
88
|
+
justify-center
|
|
89
|
+
order-last
|
|
90
|
+
order-sm-first
|
|
91
|
+
text-center
|
|
92
|
+
text-sm-left
|
|
93
|
+
v-col-12
|
|
94
|
+
v-col-sm-12
|
|
95
|
+
">
|
|
96
|
+
<!-- v-if -->
|
|
97
|
+
<h1 class="
|
|
98
|
+
font-weight-bold
|
|
99
|
+
mb-2
|
|
100
|
+
mb-4
|
|
101
|
+
text-h5
|
|
102
|
+
">
|
|
103
|
+
Something went wrong
|
|
104
|
+
</h1>
|
|
105
|
+
<p>
|
|
106
|
+
<span>
|
|
107
|
+
Error message
|
|
108
|
+
</span>
|
|
109
|
+
</p>
|
|
110
|
+
<!-- v-if -->
|
|
111
|
+
</div>
|
|
112
|
+
<!-- v-if -->
|
|
113
|
+
</div>
|
|
114
|
+
<!---->
|
|
115
|
+
<!---->
|
|
116
|
+
<span class="v-card__underlay"></span>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
`;
|
|
121
|
+
|
|
122
|
+
exports[`StatusPage > renders correctly with undefined route 1`] = `
|
|
123
|
+
<div class="
|
|
124
|
+
d-flex
|
|
125
|
+
justify-center
|
|
126
|
+
px-14
|
|
127
|
+
py-10
|
|
128
|
+
vd-page-container
|
|
129
|
+
">
|
|
130
|
+
<div
|
|
131
|
+
class="
|
|
132
|
+
bg-transparent
|
|
133
|
+
v-sheet
|
|
134
|
+
v-theme--light
|
|
135
|
+
"
|
|
136
|
+
style="width: 800px;"
|
|
137
|
+
>
|
|
138
|
+
<div class="
|
|
139
|
+
elevation-0
|
|
140
|
+
pa-6
|
|
141
|
+
pa-sm-16
|
|
142
|
+
v-card
|
|
143
|
+
v-card--density-default
|
|
144
|
+
v-card--variant-elevated
|
|
145
|
+
v-theme--light
|
|
146
|
+
">
|
|
147
|
+
<!---->
|
|
148
|
+
<div class="v-card__loader">
|
|
149
|
+
<div
|
|
150
|
+
aria-hidden="true"
|
|
151
|
+
aria-valuemax="100"
|
|
152
|
+
aria-valuemin="0"
|
|
153
|
+
class="
|
|
154
|
+
v-locale--is-ltr
|
|
155
|
+
v-progress-linear
|
|
156
|
+
v-theme--light
|
|
157
|
+
"
|
|
158
|
+
role="progressbar"
|
|
159
|
+
style="
|
|
160
|
+
top: 0px;
|
|
161
|
+
height: 0px;
|
|
162
|
+
--v-progress-linear-height: 2px;
|
|
163
|
+
"
|
|
164
|
+
>
|
|
165
|
+
<!---->
|
|
166
|
+
<div
|
|
167
|
+
class="v-progress-linear__background"
|
|
168
|
+
style="opacity: NaN;"
|
|
169
|
+
></div>
|
|
170
|
+
<div
|
|
171
|
+
class="v-progress-linear__buffer"
|
|
172
|
+
style="
|
|
173
|
+
opacity: NaN;
|
|
174
|
+
width: 0%;
|
|
175
|
+
"
|
|
176
|
+
></div>
|
|
177
|
+
<transition-stub
|
|
178
|
+
appear="false"
|
|
179
|
+
css="true"
|
|
180
|
+
name="fade-transition"
|
|
181
|
+
persisted="false"
|
|
182
|
+
>
|
|
183
|
+
<div class="v-progress-linear__indeterminate">
|
|
184
|
+
<div class="
|
|
185
|
+
long
|
|
186
|
+
v-progress-linear__indeterminate
|
|
187
|
+
"></div>
|
|
188
|
+
<div class="
|
|
189
|
+
short
|
|
190
|
+
v-progress-linear__indeterminate
|
|
191
|
+
"></div>
|
|
192
|
+
</div>
|
|
193
|
+
</transition-stub>
|
|
194
|
+
<!---->
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
<!---->
|
|
198
|
+
<!---->
|
|
199
|
+
<div class="
|
|
200
|
+
max-width-none
|
|
201
|
+
v-row
|
|
202
|
+
">
|
|
203
|
+
<div class="
|
|
204
|
+
align-sm-start
|
|
205
|
+
d-flex
|
|
206
|
+
flex-column
|
|
207
|
+
justify-center
|
|
208
|
+
order-last
|
|
209
|
+
order-sm-first
|
|
210
|
+
text-center
|
|
211
|
+
text-sm-left
|
|
212
|
+
v-col-12
|
|
213
|
+
v-col-sm-12
|
|
214
|
+
">
|
|
215
|
+
<div class="
|
|
216
|
+
mb-4
|
|
217
|
+
sy-code
|
|
218
|
+
text-primary
|
|
219
|
+
">
|
|
220
|
+
<span class="d-sr-only">
|
|
221
|
+
Code d'erreur :
|
|
222
|
+
</span>
|
|
223
|
+
501
|
|
224
|
+
</div>
|
|
225
|
+
<h1 class="
|
|
226
|
+
font-weight-bold
|
|
227
|
+
mb-2
|
|
228
|
+
mb-4
|
|
229
|
+
text-h5
|
|
230
|
+
">
|
|
231
|
+
Error
|
|
232
|
+
</h1>
|
|
233
|
+
<p>
|
|
234
|
+
<span>
|
|
235
|
+
Error message
|
|
236
|
+
</span>
|
|
237
|
+
</p>
|
|
238
|
+
<a
|
|
239
|
+
class="
|
|
240
|
+
bg-primary
|
|
241
|
+
mt-6
|
|
242
|
+
v-btn
|
|
243
|
+
v-btn--density-default
|
|
244
|
+
v-btn--elevated
|
|
245
|
+
v-btn--size-default
|
|
246
|
+
v-btn--variant-elevated
|
|
247
|
+
v-theme--light
|
|
248
|
+
"
|
|
249
|
+
href="https://google.com"
|
|
250
|
+
><span class="v-btn__overlay"></span><span class="v-btn__underlay"></span>
|
|
251
|
+
|
|
252
|
+
<!----><span
|
|
253
|
+
class="v-btn__content"
|
|
254
|
+
data-no-activator=""
|
|
255
|
+
>Go to...</span>
|
|
256
|
+
|
|
257
|
+
<!---->
|
|
258
|
+
|
|
259
|
+
<!---->
|
|
260
|
+
</a>
|
|
261
|
+
</div>
|
|
262
|
+
<!-- v-if -->
|
|
263
|
+
</div>
|
|
264
|
+
<!---->
|
|
265
|
+
<!---->
|
|
266
|
+
<span class="v-card__underlay"></span>
|
|
267
|
+
</div>
|
|
268
|
+
</div>
|
|
269
|
+
</div>
|
|
270
|
+
`;
|
|
@@ -878,7 +878,7 @@ export const SlotFilters: Story = {
|
|
|
878
878
|
},
|
|
879
879
|
]
|
|
880
880
|
|
|
881
|
-
const search = ref(
|
|
881
|
+
const search = ref(undefined)
|
|
882
882
|
|
|
883
883
|
const filterItems = ref<{ text: string, value: string }[]>([])
|
|
884
884
|
|
|
@@ -902,16 +902,16 @@ export const SlotFilters: Story = {
|
|
|
902
902
|
<template #top>
|
|
903
903
|
<TableToolbar
|
|
904
904
|
v-bind="args"
|
|
905
|
-
v-model:search="
|
|
905
|
+
v-model:search="search"
|
|
906
906
|
>
|
|
907
907
|
<template #filters>
|
|
908
|
-
<div class="py-1">
|
|
908
|
+
<div class="px-4 py-4 py-sm-1">
|
|
909
909
|
<SySelect
|
|
910
910
|
v-model="search"
|
|
911
911
|
:items="filterItems"
|
|
912
912
|
label="Nom"
|
|
913
913
|
density="compact"
|
|
914
|
-
width="
|
|
914
|
+
width="150"
|
|
915
915
|
hide-messages
|
|
916
916
|
clearable
|
|
917
917
|
/>
|
|
@@ -942,13 +942,13 @@ export const SlotFilters: Story = {
|
|
|
942
942
|
:nb-total="items.length"
|
|
943
943
|
>
|
|
944
944
|
<template #filters>
|
|
945
|
-
<div class="py-4">
|
|
945
|
+
<div class="px-4 py-4 py-sm-1">
|
|
946
946
|
<SySelect
|
|
947
947
|
v-model="search"
|
|
948
948
|
:items="filterItems"
|
|
949
949
|
label="Nom"
|
|
950
950
|
density="compact"
|
|
951
|
-
width="
|
|
951
|
+
width="150"
|
|
952
952
|
hide-messages
|
|
953
953
|
clearable
|
|
954
954
|
/>
|
|
@@ -32,7 +32,6 @@ exports[`TableToolbar > renders correctly when all the item are displayed 1`] =
|
|
|
32
32
|
mb-0
|
|
33
33
|
mr-4
|
|
34
34
|
mr-sm-0
|
|
35
|
-
my-3
|
|
36
35
|
">
|
|
37
36
|
5/5 lignes
|
|
38
37
|
</p>
|
|
@@ -254,7 +253,6 @@ exports[`TableToolbar > renders correctly when loading 1`] = `
|
|
|
254
253
|
mb-0
|
|
255
254
|
mr-4
|
|
256
255
|
mr-sm-0
|
|
257
|
-
my-3
|
|
258
256
|
">
|
|
259
257
|
1 ligne
|
|
260
258
|
</p>
|
|
@@ -454,7 +452,6 @@ exports[`TableToolbar > renders correctly when the screen width <= 600px 1`] = `
|
|
|
454
452
|
mb-0
|
|
455
453
|
mr-4
|
|
456
454
|
mr-sm-0
|
|
457
|
-
my-3
|
|
458
455
|
">
|
|
459
456
|
1 ligne
|
|
460
457
|
</p>
|
|
@@ -676,7 +673,6 @@ exports[`TableToolbar > renders correctly with content slot 1`] = `
|
|
|
676
673
|
mb-0
|
|
677
674
|
mr-4
|
|
678
675
|
mr-sm-0
|
|
679
|
-
my-3
|
|
680
676
|
">
|
|
681
677
|
1 ligne
|
|
682
678
|
</p>
|
|
@@ -1113,7 +1109,6 @@ exports[`TableToolbar > should render 1`] = `
|
|
|
1113
1109
|
mb-0
|
|
1114
1110
|
mr-4
|
|
1115
1111
|
mr-sm-0
|
|
1116
|
-
my-3
|
|
1117
1112
|
">
|
|
1118
1113
|
1/2 lignes
|
|
1119
1114
|
</p>
|
|
@@ -17,7 +17,7 @@ import * as UploadWorkflowStories from './UploadWorkflow.stories';
|
|
|
17
17
|
|
|
18
18
|
## Événements
|
|
19
19
|
|
|
20
|
-
Vous pouvez réagir lorsque la liste des fichiers est mise à jour en utilisant l’événement `update:modelValue`,
|
|
20
|
+
Vous pouvez réagir lorsque la liste des fichiers est mise à jour en utilisant l’événement `update:modelValue`, réagir aux erreurs de validation en utilisant l’événement `error`, et intercepter l’ouverture d’une prévisualisation en utilisant l’événement `preview` (avec le `FileItem` associé).
|
|
21
21
|
|
|
22
22
|
<Canvas of={UploadWorkflowStories.Events} />
|
|
23
23
|
|
|
@@ -39,6 +39,16 @@ Vous pouvez permettre à l’utilisateur de prévisualiser le fichier qu’il vi
|
|
|
39
39
|
|
|
40
40
|
<Canvas of={UploadWorkflowStories.WithPreviewStep} />
|
|
41
41
|
|
|
42
|
+
## Texte d'information
|
|
43
|
+
|
|
44
|
+
Vous pouvez personnaliser le texte affiché dans la zone d’information du composant enfant `FileUpload` en utilisant la prop `info-text`.
|
|
45
|
+
|
|
46
|
+
<Canvas of={UploadWorkflowStories.WithInfoText} />
|
|
47
|
+
|
|
48
|
+
## Niveau de titre
|
|
49
|
+
|
|
50
|
+
Vous pouvez configurer le niveau du titre affiché par défaut en utilisant la prop `heading-level` (rendu via `role="heading"` et `aria-level`).
|
|
51
|
+
|
|
42
52
|
## Exemple d'utilisation
|
|
43
53
|
|
|
44
54
|
<Source
|
|
@@ -8,7 +8,7 @@ const meta: Meta<typeof UploadWorkflow> = {
|
|
|
8
8
|
title: 'Composants/Formulaires/UploadWorkflow',
|
|
9
9
|
component: UploadWorkflow,
|
|
10
10
|
parameters: {
|
|
11
|
-
controls: { exclude: ['update:modelValue', 'error'] },
|
|
11
|
+
controls: { exclude: ['update:modelValue', 'error', 'preview'] },
|
|
12
12
|
},
|
|
13
13
|
argTypes: {
|
|
14
14
|
'modelValue': {
|
|
@@ -75,6 +75,36 @@ const meta: Meta<typeof UploadWorkflow> = {
|
|
|
75
75
|
},
|
|
76
76
|
},
|
|
77
77
|
},
|
|
78
|
+
'headingLevel': {
|
|
79
|
+
description: 'Niveau du titre affiché (utilise role="heading" et aria-level).',
|
|
80
|
+
control: {
|
|
81
|
+
type: 'number',
|
|
82
|
+
min: 1,
|
|
83
|
+
max: 6,
|
|
84
|
+
},
|
|
85
|
+
table: {
|
|
86
|
+
category: 'props',
|
|
87
|
+
type: {
|
|
88
|
+
summary: 'number',
|
|
89
|
+
},
|
|
90
|
+
defaultValue: {
|
|
91
|
+
summary: '4',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
'infoText': {
|
|
96
|
+
description: 'Personnalise le texte affiché dans la zone d’information du composant enfant FileUpload (slot info-text).',
|
|
97
|
+
control: 'text',
|
|
98
|
+
table: {
|
|
99
|
+
category: 'props',
|
|
100
|
+
type: {
|
|
101
|
+
summary: 'string',
|
|
102
|
+
},
|
|
103
|
+
defaultValue: {
|
|
104
|
+
summary: '\'\'',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
78
108
|
'vuetifyOptions': {
|
|
79
109
|
description: 'Les options pour les composants enfants.',
|
|
80
110
|
control: 'object',
|
|
@@ -186,6 +216,15 @@ const meta: Meta<typeof UploadWorkflow> = {
|
|
|
186
216
|
},
|
|
187
217
|
},
|
|
188
218
|
},
|
|
219
|
+
'onPreview': {
|
|
220
|
+
description: 'Événement émis lors de l\'ouverture d\'une prévisualisation.',
|
|
221
|
+
table: {
|
|
222
|
+
category: 'events',
|
|
223
|
+
type: {
|
|
224
|
+
summary: 'FileItem',
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
},
|
|
189
228
|
'onUpdate:modelValue': {
|
|
190
229
|
description: 'Événement émis lorsqu\'un fichier est ajouté ou supprimé.',
|
|
191
230
|
table: {
|
|
@@ -267,6 +306,7 @@ export const Default: Story = {
|
|
|
267
306
|
],
|
|
268
307
|
'onUpdate:modelValue': fn(),
|
|
269
308
|
'onError': fn(),
|
|
309
|
+
'onPreview': fn(),
|
|
270
310
|
},
|
|
271
311
|
parameters: {
|
|
272
312
|
sourceCode: [
|
|
@@ -380,6 +420,7 @@ export const WithPreviewStep: Story = {
|
|
|
380
420
|
],
|
|
381
421
|
'onUpdate:modelValue': fn(),
|
|
382
422
|
'onError': fn(),
|
|
423
|
+
'onPreview': fn(),
|
|
383
424
|
'showFilePreview': true,
|
|
384
425
|
},
|
|
385
426
|
parameters: {
|
|
@@ -391,6 +432,7 @@ export const WithPreviewStep: Story = {
|
|
|
391
432
|
v-model="files"
|
|
392
433
|
:upload-list="uploadList"
|
|
393
434
|
:showFilePreview="true"
|
|
435
|
+
@preview="onPreview"
|
|
394
436
|
/>
|
|
395
437
|
</template>`,
|
|
396
438
|
|
|
@@ -412,6 +454,57 @@ export const WithPreviewStep: Story = {
|
|
|
412
454
|
title: 'Facture de soin',
|
|
413
455
|
},
|
|
414
456
|
]
|
|
457
|
+
|
|
458
|
+
function onPreview(fileItem: unknown) {
|
|
459
|
+
console.log('preview', fileItem)
|
|
460
|
+
}
|
|
461
|
+
</script>`,
|
|
462
|
+
},
|
|
463
|
+
],
|
|
464
|
+
},
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
export const WithInfoText: Story = {
|
|
468
|
+
args: {
|
|
469
|
+
'modelValue': [],
|
|
470
|
+
'uploadList': [
|
|
471
|
+
{
|
|
472
|
+
id: '1',
|
|
473
|
+
title: 'Carte d\'identité',
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
id: '2',
|
|
477
|
+
title: 'Facture de soin',
|
|
478
|
+
},
|
|
479
|
+
],
|
|
480
|
+
'infoText': 'Vous pouvez déposer vos fichiers ici. Formats acceptés : PDF, JPG, PNG.',
|
|
481
|
+
'onUpdate:modelValue': fn(),
|
|
482
|
+
'onError': fn(),
|
|
483
|
+
'onPreview': fn(),
|
|
484
|
+
},
|
|
485
|
+
parameters: {
|
|
486
|
+
sourceCode: [
|
|
487
|
+
{
|
|
488
|
+
name: 'Template',
|
|
489
|
+
code: `<template>
|
|
490
|
+
<UploadWorkflow
|
|
491
|
+
v-model="files"
|
|
492
|
+
:upload-list="uploadList"
|
|
493
|
+
info-text="Vous pouvez déposer vos fichiers ici. Formats acceptés : PDF, JPG, PNG."
|
|
494
|
+
/>
|
|
495
|
+
</template>`,
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
name: 'Script',
|
|
499
|
+
code: `<script setup lang="ts">
|
|
500
|
+
import { ref } from 'vue'
|
|
501
|
+
import { UploadWorkflow } from '@cnamts/synapse'
|
|
502
|
+
|
|
503
|
+
const files = ref([])
|
|
504
|
+
const uploadList = [
|
|
505
|
+
{ id: '1', title: 'Carte d\\'identité' },
|
|
506
|
+
{ id: '2', title: 'Facture de soin' },
|
|
507
|
+
]
|
|
415
508
|
</script>`,
|
|
416
509
|
},
|
|
417
510
|
],
|
|
@@ -468,14 +561,17 @@ export const Events: Story = {
|
|
|
468
561
|
{
|
|
469
562
|
id: 'ID',
|
|
470
563
|
title: 'Carte d\'identité',
|
|
564
|
+
showPreviewBtn: true,
|
|
471
565
|
},
|
|
472
566
|
{
|
|
473
567
|
id: 'Bill',
|
|
474
568
|
title: 'Facture de soin',
|
|
569
|
+
showPreviewBtn: true,
|
|
475
570
|
},
|
|
476
571
|
],
|
|
477
572
|
'onUpdate:modelValue': fn(),
|
|
478
573
|
'onError': fn(),
|
|
574
|
+
'onPreview': fn(),
|
|
479
575
|
},
|
|
480
576
|
render: (args) => {
|
|
481
577
|
return {
|
|
@@ -517,6 +613,7 @@ export const Events: Story = {
|
|
|
517
613
|
:upload-list="args.uploadList"
|
|
518
614
|
:vuetify-options="options"
|
|
519
615
|
@error="[showError, args.onError]"
|
|
616
|
+
@preview="args.onPreview"
|
|
520
617
|
@update:modelValue="[valueUpdated, args['onUpdate:modelValue']]"
|
|
521
618
|
/>
|
|
522
619
|
<VSnackbar
|
|
@@ -549,6 +646,7 @@ export const Events: Story = {
|
|
|
549
646
|
:upload-list="uploadList"
|
|
550
647
|
vuetify-options="options"
|
|
551
648
|
@onError="showError"
|
|
649
|
+
@onPreview="onPreview"
|
|
552
650
|
@onUpdate:modelValue="valueUpdated"
|
|
553
651
|
/>
|
|
554
652
|
</template>`,
|
|
@@ -564,10 +662,12 @@ export const Events: Story = {
|
|
|
564
662
|
{
|
|
565
663
|
id: 'ID',
|
|
566
664
|
title: 'Carte d'identité',
|
|
665
|
+
showPreviewBtn: true,
|
|
567
666
|
},
|
|
568
667
|
{
|
|
569
668
|
id: 'Bill',
|
|
570
669
|
title: 'Facture de soin',
|
|
670
|
+
showPreviewBtn: true,
|
|
571
671
|
},
|
|
572
672
|
]
|
|
573
673
|
|
|
@@ -581,13 +681,13 @@ export const Events: Story = {
|
|
|
581
681
|
}
|
|
582
682
|
}
|
|
583
683
|
|
|
584
|
-
function showError
|
|
684
|
+
function showError(errors: string[]) {
|
|
585
685
|
snackbarText.value = errors.join(', ')
|
|
586
686
|
snackbarColor.value = 'error';
|
|
587
687
|
snackbar.value = true
|
|
588
688
|
}
|
|
589
689
|
|
|
590
|
-
function valueUpdated
|
|
690
|
+
function valueUpdated(items: { fileName: string, file: File }[]) {
|
|
591
691
|
if(items.length === 0) {
|
|
592
692
|
return
|
|
593
693
|
}
|
|
@@ -595,6 +695,10 @@ export const Events: Story = {
|
|
|
595
695
|
snackbarColor.value = 'success';
|
|
596
696
|
snackbar.value = true
|
|
597
697
|
}
|
|
698
|
+
|
|
699
|
+
function onPreview(fileItem: unknown) {
|
|
700
|
+
console.log('preview', fileItem)
|
|
701
|
+
}
|
|
598
702
|
</script>`,
|
|
599
703
|
},
|
|
600
704
|
],
|