@cnamts/synapse 0.0.9-alpha → 0.0.10-alpha
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/design-system-v3.d.ts +631 -62
- package/dist/design-system-v3.js +3451 -2650
- package/dist/design-system-v3.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/DatePicker/Accessibilite.mdx +14 -0
- package/src/components/DatePicker/Accessibilite.stories.ts +191 -0
- package/src/components/DatePicker/AccessibiliteItems.ts +233 -0
- package/src/components/DatePicker/DatePicker.mdx +1 -6
- package/src/components/DatePicker/DatePicker.stories.ts +16 -16
- package/src/components/DatePicker/DatePicker.vue +20 -6
- package/src/components/DatePicker/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/FileList/FileList.mdx +103 -0
- package/src/components/FileList/FileList.stories.ts +562 -0
- package/src/components/FileList/FileList.vue +78 -0
- package/src/components/FileList/UploadItem/UploadItem.vue +270 -0
- package/src/components/FileList/UploadItem/locales.ts +9 -0
- package/src/components/FileList/tests/FileList.spec.ts +176 -0
- package/src/components/FilePreview/FilePreview.mdx +82 -0
- package/src/components/FilePreview/FilePreview.stories.ts +242 -0
- package/src/components/FilePreview/FilePreview.vue +68 -0
- package/src/components/FilePreview/config.ts +10 -0
- package/src/components/FilePreview/locales.ts +4 -0
- package/src/components/FilePreview/tests/FilePreview.spec.ts +124 -0
- package/src/components/FilePreview/tests/__snapshots__/FilePreview.spec.ts.snap +11 -0
- package/src/components/PeriodField/PeriodField.mdx +32 -0
- package/src/components/PeriodField/PeriodField.stories.ts +807 -0
- package/src/components/PeriodField/PeriodField.vue +355 -0
- package/src/components/PeriodField/tests/PeriodField.spec.ts +348 -0
- package/src/components/RangeField/Accessibilite.mdx +14 -0
- package/src/components/RangeField/Accessibilite.stories.ts +191 -0
- package/src/components/RangeField/AccessibiliteItems.ts +179 -0
- package/src/components/RangeField/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/RatingPicker/Accessibilite.mdx +14 -0
- package/src/components/RatingPicker/Accessibilite.stories.ts +191 -0
- package/src/components/RatingPicker/AccessibiliteItems.ts +208 -0
- package/src/components/RatingPicker/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/SearchListField/Accessibilite.mdx +14 -0
- package/src/components/SearchListField/Accessibilite.stories.ts +191 -0
- package/src/components/SearchListField/AccessibiliteItems.ts +310 -0
- package/src/components/SearchListField/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/SelectBtnField/Accessibilite.mdx +14 -0
- package/src/components/SelectBtnField/Accessibilite.stories.ts +191 -0
- package/src/components/SelectBtnField/AccessibiliteItems.ts +191 -0
- package/src/components/SelectBtnField/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/SyAlert/SyAlert.vue +11 -9
- package/src/components/TableToolbar/TableToolbar.mdx +130 -0
- package/src/components/TableToolbar/TableToolbar.stories.ts +935 -0
- package/src/components/TableToolbar/TableToolbar.vue +168 -0
- package/src/components/TableToolbar/config.ts +24 -0
- package/src/components/TableToolbar/locales.ts +6 -0
- package/src/components/TableToolbar/tests/TableToolbar.spec.ts +166 -0
- package/src/components/TableToolbar/tests/__snapshots__/TableToolbar.spec.ts.snap +359 -0
- package/src/components/index.ts +3 -0
- package/src/composables/rules/useFieldValidation.ts +17 -15
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`TableToolbar > renders correctly when all the item are displayed 1`] = `
|
|
4
|
+
"<header data-v-91e2c1b3="" class="v-toolbar v-toolbar--flat v-toolbar--density-default v-theme--light v-locale--is-ltr sy-table-toolbar px-4 py-2 d-flex flex-wrap align-center justify-space-between" style="background-color: #FFFFFF; color: #000; caret-color: #000;" minheight="56px">
|
|
5
|
+
<!---->
|
|
6
|
+
<div class="v-toolbar__content">
|
|
7
|
+
<!---->
|
|
8
|
+
<!---->
|
|
9
|
+
<p data-v-91e2c1b3="" class="mb-0 font-weight-bold mr-4 my-3" data-test-id="nb-rows">5/5 lignes</p>
|
|
10
|
+
<div data-v-91e2c1b3="" class="sy-table-toolbar__search">
|
|
11
|
+
<div data-v-91e2c1b3="" class="v-input v-input--horizontal v-input--density-compact v-theme--light v-locale--is-ltr v-text-field v-input--plain-underlined sy-form-input flex-grow-1" data-test-id="search-input">
|
|
12
|
+
<!---->
|
|
13
|
+
<div class="v-input__control">
|
|
14
|
+
<div class="v-field v-field--appended v-field--single-line v-field--variant-underlined v-theme--light v-locale--is-ltr">
|
|
15
|
+
<div class="v-field__overlay"></div>
|
|
16
|
+
<div class="v-field__loader">
|
|
17
|
+
<div class="v-progress-linear v-theme--light v-locale--is-ltr" style="top: 0px; height: 0px; --v-progress-linear-height: 2px;" role="progressbar" aria-hidden="true" aria-valuemin="0" aria-valuemax="100">
|
|
18
|
+
<!---->
|
|
19
|
+
<div class="v-progress-linear__background bg-primary" style="opacity: NaN;"></div>
|
|
20
|
+
<div class="v-progress-linear__buffer bg-primary" style="opacity: NaN; width: 0%;"></div>
|
|
21
|
+
<transition-stub name="fade-transition" appear="false" persisted="false" css="true">
|
|
22
|
+
<div class="v-progress-linear__indeterminate">
|
|
23
|
+
<div class="v-progress-linear__indeterminate long bg-primary"></div>
|
|
24
|
+
<div class="v-progress-linear__indeterminate short bg-primary"></div>
|
|
25
|
+
</div>
|
|
26
|
+
</transition-stub>
|
|
27
|
+
<!---->
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<!---->
|
|
31
|
+
<div class="v-field__field" data-no-activator="">
|
|
32
|
+
<!----><label class="v-label v-field-label" for="input-0">
|
|
33
|
+
<!---->Rechercher
|
|
34
|
+
</label>
|
|
35
|
+
<!----><input size="1" type="text" id="input-0" aria-describedby="input-0-messages" class="v-field__input">
|
|
36
|
+
<!---->
|
|
37
|
+
</div>
|
|
38
|
+
<transition-stub name="expand-x-transition" appear="false" persisted="false" css="true">
|
|
39
|
+
<div class="v-field__clearable" style="display: none;"><i class="mdi-close-circle mdi v-icon notranslate v-theme--light v-icon--size-default v-icon--clickable" role="button" aria-hidden="false" tabindex="0" aria-label="Clear Rechercher"></i></div>
|
|
40
|
+
</transition-stub>
|
|
41
|
+
<div class="v-field__append-inner">
|
|
42
|
+
<!----><i class="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z mdi v-icon notranslate v-theme--light v-icon--size-default" aria-hidden="true"></i>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="v-field__outline">
|
|
45
|
+
<!---->
|
|
46
|
+
<!---->
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
<!---->
|
|
51
|
+
<!---->
|
|
52
|
+
</div>
|
|
53
|
+
<!--v-if-->
|
|
54
|
+
</div>
|
|
55
|
+
<!---->
|
|
56
|
+
</div>
|
|
57
|
+
<transition-stub name="expand-transition" appear="false" persisted="false" css="true">
|
|
58
|
+
<!---->
|
|
59
|
+
</transition-stub>
|
|
60
|
+
</header>"
|
|
61
|
+
`;
|
|
62
|
+
|
|
63
|
+
exports[`TableToolbar > renders correctly when loading 1`] = `
|
|
64
|
+
"<header data-v-91e2c1b3="" class="v-toolbar v-toolbar--flat v-toolbar--density-default v-theme--light v-locale--is-ltr sy-table-toolbar px-4 py-2 d-flex flex-wrap align-center justify-space-between" style="background-color: #FFFFFF; color: #000; caret-color: #000;" minheight="56px">
|
|
65
|
+
<!---->
|
|
66
|
+
<div class="v-toolbar__content">
|
|
67
|
+
<!---->
|
|
68
|
+
<!---->
|
|
69
|
+
<p data-v-91e2c1b3="" class="mb-0 font-weight-bold mr-4 my-3" data-test-id="nb-rows">1 ligne</p>
|
|
70
|
+
<div data-v-91e2c1b3="" class="sy-table-toolbar__search">
|
|
71
|
+
<div data-v-91e2c1b3="" class="v-input v-input--horizontal v-input--density-compact v-theme--light v-locale--is-ltr v-input--disabled v-text-field v-input--plain-underlined sy-form-input flex-grow-1 loading" data-test-id="search-input">
|
|
72
|
+
<!---->
|
|
73
|
+
<div class="v-input__control">
|
|
74
|
+
<div class="v-field v-field--appended v-field--disabled v-field--single-line v-field--variant-underlined v-theme--light v-locale--is-ltr">
|
|
75
|
+
<div class="v-field__overlay"></div>
|
|
76
|
+
<div class="v-field__loader">
|
|
77
|
+
<div class="v-progress-linear v-theme--light v-locale--is-ltr" style="top: 0px; height: 0px; --v-progress-linear-height: 2px;" role="progressbar" aria-hidden="true" aria-valuemin="0" aria-valuemax="100">
|
|
78
|
+
<!---->
|
|
79
|
+
<div class="v-progress-linear__background bg-primary" style="opacity: NaN;"></div>
|
|
80
|
+
<div class="v-progress-linear__buffer bg-primary" style="opacity: NaN; width: 0%;"></div>
|
|
81
|
+
<transition-stub name="fade-transition" appear="false" persisted="false" css="true">
|
|
82
|
+
<div class="v-progress-linear__indeterminate">
|
|
83
|
+
<div class="v-progress-linear__indeterminate long bg-primary"></div>
|
|
84
|
+
<div class="v-progress-linear__indeterminate short bg-primary"></div>
|
|
85
|
+
</div>
|
|
86
|
+
</transition-stub>
|
|
87
|
+
<!---->
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
<!---->
|
|
91
|
+
<div class="v-field__field" data-no-activator="">
|
|
92
|
+
<!----><label class="v-label v-field-label" for="input-0">
|
|
93
|
+
<!---->Rechercher
|
|
94
|
+
</label>
|
|
95
|
+
<!----><input disabled="" size="1" type="text" id="input-0" aria-describedby="input-0-messages" class="v-field__input">
|
|
96
|
+
<!---->
|
|
97
|
+
</div>
|
|
98
|
+
<!---->
|
|
99
|
+
<div class="v-field__append-inner">
|
|
100
|
+
<!----><i class="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z mdi v-icon notranslate v-theme--light v-icon--size-default" aria-hidden="true"></i>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="v-field__outline">
|
|
103
|
+
<!---->
|
|
104
|
+
<!---->
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
<!---->
|
|
109
|
+
<!---->
|
|
110
|
+
</div>
|
|
111
|
+
<!--v-if-->
|
|
112
|
+
</div>
|
|
113
|
+
<!---->
|
|
114
|
+
</div>
|
|
115
|
+
<transition-stub name="expand-transition" appear="false" persisted="false" css="true">
|
|
116
|
+
<!---->
|
|
117
|
+
</transition-stub>
|
|
118
|
+
</header>"
|
|
119
|
+
`;
|
|
120
|
+
|
|
121
|
+
exports[`TableToolbar > renders correctly when the screen width <= 600px 1`] = `
|
|
122
|
+
"<header data-v-91e2c1b3="" class="v-toolbar v-toolbar--flat v-toolbar--density-default v-theme--light v-locale--is-ltr sy-table-toolbar px-4 py-2 d-flex flex-wrap align-center justify-space-between" style="background-color: #FFFFFF; color: #000; caret-color: #000;" minheight="56px">
|
|
123
|
+
<!---->
|
|
124
|
+
<div class="v-toolbar__content">
|
|
125
|
+
<!---->
|
|
126
|
+
<!---->
|
|
127
|
+
<p data-v-91e2c1b3="" class="mb-0 font-weight-bold mr-4 my-3" data-test-id="nb-rows">1 ligne</p>
|
|
128
|
+
<div data-v-91e2c1b3="" class="sy-table-toolbar__search">
|
|
129
|
+
<div data-v-91e2c1b3="" class="v-input v-input--horizontal v-input--density-compact v-theme--light v-locale--is-ltr v-text-field v-input--plain-underlined sy-form-input flex-grow-1" data-test-id="search-input">
|
|
130
|
+
<!---->
|
|
131
|
+
<div class="v-input__control">
|
|
132
|
+
<div class="v-field v-field--appended v-field--single-line v-field--variant-underlined v-theme--light v-locale--is-ltr">
|
|
133
|
+
<div class="v-field__overlay"></div>
|
|
134
|
+
<div class="v-field__loader">
|
|
135
|
+
<div class="v-progress-linear v-theme--light v-locale--is-ltr" style="top: 0px; height: 0px; --v-progress-linear-height: 2px;" role="progressbar" aria-hidden="true" aria-valuemin="0" aria-valuemax="100">
|
|
136
|
+
<!---->
|
|
137
|
+
<div class="v-progress-linear__background bg-primary" style="opacity: NaN;"></div>
|
|
138
|
+
<div class="v-progress-linear__buffer bg-primary" style="opacity: NaN; width: 0%;"></div>
|
|
139
|
+
<transition-stub name="fade-transition" appear="false" persisted="false" css="true">
|
|
140
|
+
<div class="v-progress-linear__indeterminate">
|
|
141
|
+
<div class="v-progress-linear__indeterminate long bg-primary"></div>
|
|
142
|
+
<div class="v-progress-linear__indeterminate short bg-primary"></div>
|
|
143
|
+
</div>
|
|
144
|
+
</transition-stub>
|
|
145
|
+
<!---->
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
<!---->
|
|
149
|
+
<div class="v-field__field" data-no-activator="">
|
|
150
|
+
<!----><label class="v-label v-field-label" for="input-0">
|
|
151
|
+
<!---->Rechercher
|
|
152
|
+
</label>
|
|
153
|
+
<!----><input size="1" type="text" id="input-0" aria-describedby="input-0-messages" class="v-field__input">
|
|
154
|
+
<!---->
|
|
155
|
+
</div>
|
|
156
|
+
<transition-stub name="expand-x-transition" appear="false" persisted="false" css="true">
|
|
157
|
+
<div class="v-field__clearable" style="display: none;"><i class="mdi-close-circle mdi v-icon notranslate v-theme--light v-icon--size-default v-icon--clickable" role="button" aria-hidden="false" tabindex="0" aria-label="Clear Rechercher"></i></div>
|
|
158
|
+
</transition-stub>
|
|
159
|
+
<div class="v-field__append-inner">
|
|
160
|
+
<!----><i class="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z mdi v-icon notranslate v-theme--light v-icon--size-default" aria-hidden="true"></i>
|
|
161
|
+
</div>
|
|
162
|
+
<div class="v-field__outline">
|
|
163
|
+
<!---->
|
|
164
|
+
<!---->
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
<!---->
|
|
169
|
+
<!---->
|
|
170
|
+
</div>
|
|
171
|
+
<!--v-if-->
|
|
172
|
+
</div>
|
|
173
|
+
<!---->
|
|
174
|
+
</div>
|
|
175
|
+
<transition-stub name="expand-transition" appear="false" persisted="false" css="true">
|
|
176
|
+
<!---->
|
|
177
|
+
</transition-stub>
|
|
178
|
+
</header>"
|
|
179
|
+
`;
|
|
180
|
+
|
|
181
|
+
exports[`TableToolbar > renders correctly with content slot 1`] = `
|
|
182
|
+
"<header data-v-91e2c1b3="" class="v-toolbar v-toolbar--flat v-toolbar--density-default v-theme--light v-locale--is-ltr sy-table-toolbar px-4 py-2 d-flex flex-wrap align-center justify-space-between" style="background-color: #FFFFFF; color: #000; caret-color: #000;" minheight="56px">
|
|
183
|
+
<!---->
|
|
184
|
+
<div class="v-toolbar__content">
|
|
185
|
+
<!---->
|
|
186
|
+
<!---->
|
|
187
|
+
<p data-v-91e2c1b3="" class="mb-0 font-weight-bold mr-4 my-3" data-test-id="nb-rows">1 ligne</p>
|
|
188
|
+
<div data-v-91e2c1b3="" class="sy-table-toolbar__search">
|
|
189
|
+
<div data-v-91e2c1b3="" class="v-input v-input--horizontal v-input--density-compact v-theme--light v-locale--is-ltr v-text-field v-input--plain-underlined sy-form-input flex-grow-1" data-test-id="search-input">
|
|
190
|
+
<!---->
|
|
191
|
+
<div class="v-input__control">
|
|
192
|
+
<div class="v-field v-field--appended v-field--single-line v-field--variant-underlined v-theme--light v-locale--is-ltr">
|
|
193
|
+
<div class="v-field__overlay"></div>
|
|
194
|
+
<div class="v-field__loader">
|
|
195
|
+
<div class="v-progress-linear v-theme--light v-locale--is-ltr" style="top: 0px; height: 0px; --v-progress-linear-height: 2px;" role="progressbar" aria-hidden="true" aria-valuemin="0" aria-valuemax="100">
|
|
196
|
+
<!---->
|
|
197
|
+
<div class="v-progress-linear__background bg-primary" style="opacity: NaN;"></div>
|
|
198
|
+
<div class="v-progress-linear__buffer bg-primary" style="opacity: NaN; width: 0%;"></div>
|
|
199
|
+
<transition-stub name="fade-transition" appear="false" persisted="false" css="true">
|
|
200
|
+
<div class="v-progress-linear__indeterminate">
|
|
201
|
+
<div class="v-progress-linear__indeterminate long bg-primary"></div>
|
|
202
|
+
<div class="v-progress-linear__indeterminate short bg-primary"></div>
|
|
203
|
+
</div>
|
|
204
|
+
</transition-stub>
|
|
205
|
+
<!---->
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
<!---->
|
|
209
|
+
<div class="v-field__field" data-no-activator="">
|
|
210
|
+
<!----><label class="v-label v-field-label" for="input-0">
|
|
211
|
+
<!---->Rechercher
|
|
212
|
+
</label>
|
|
213
|
+
<!----><input size="1" type="text" id="input-0" aria-describedby="input-0-messages" class="v-field__input">
|
|
214
|
+
<!---->
|
|
215
|
+
</div>
|
|
216
|
+
<transition-stub name="expand-x-transition" appear="false" persisted="false" css="true">
|
|
217
|
+
<div class="v-field__clearable" style="display: none;"><i class="mdi-close-circle mdi v-icon notranslate v-theme--light v-icon--size-default v-icon--clickable" role="button" aria-hidden="false" tabindex="0" aria-label="Clear Rechercher"></i></div>
|
|
218
|
+
</transition-stub>
|
|
219
|
+
<div class="v-field__append-inner">
|
|
220
|
+
<!----><i class="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z mdi v-icon notranslate v-theme--light v-icon--size-default" aria-hidden="true"></i>
|
|
221
|
+
</div>
|
|
222
|
+
<div class="v-field__outline">
|
|
223
|
+
<!---->
|
|
224
|
+
<!---->
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
<!---->
|
|
229
|
+
<!---->
|
|
230
|
+
</div>
|
|
231
|
+
<!--v-if-->
|
|
232
|
+
</div>
|
|
233
|
+
<!---->
|
|
234
|
+
</div>
|
|
235
|
+
<transition-stub name="expand-transition" appear="false" persisted="false" css="true">
|
|
236
|
+
<!---->
|
|
237
|
+
</transition-stub>
|
|
238
|
+
</header>"
|
|
239
|
+
`;
|
|
240
|
+
|
|
241
|
+
exports[`TableToolbar > renders correctly with no items 1`] = `
|
|
242
|
+
"<header data-v-91e2c1b3="" class="v-toolbar v-toolbar--flat v-toolbar--density-default v-theme--light v-locale--is-ltr sy-table-toolbar px-4 py-2 d-flex flex-wrap align-center justify-space-between" style="background-color: #FFFFFF; color: #000; caret-color: #000;" minheight="56px">
|
|
243
|
+
<!---->
|
|
244
|
+
<div class="v-toolbar__content">
|
|
245
|
+
<!---->
|
|
246
|
+
<!---->
|
|
247
|
+
<!--v-if-->
|
|
248
|
+
<div data-v-91e2c1b3="" class="sy-table-toolbar__search">
|
|
249
|
+
<div data-v-91e2c1b3="" class="v-input v-input--horizontal v-input--density-compact v-theme--light v-locale--is-ltr v-text-field v-input--plain-underlined sy-form-input flex-grow-1" data-test-id="search-input">
|
|
250
|
+
<!---->
|
|
251
|
+
<div class="v-input__control">
|
|
252
|
+
<div class="v-field v-field--appended v-field--single-line v-field--variant-underlined v-theme--light v-locale--is-ltr">
|
|
253
|
+
<div class="v-field__overlay"></div>
|
|
254
|
+
<div class="v-field__loader">
|
|
255
|
+
<div class="v-progress-linear v-theme--light v-locale--is-ltr" style="top: 0px; height: 0px; --v-progress-linear-height: 2px;" role="progressbar" aria-hidden="true" aria-valuemin="0" aria-valuemax="100">
|
|
256
|
+
<!---->
|
|
257
|
+
<div class="v-progress-linear__background bg-primary" style="opacity: NaN;"></div>
|
|
258
|
+
<div class="v-progress-linear__buffer bg-primary" style="opacity: NaN; width: 0%;"></div>
|
|
259
|
+
<transition-stub name="fade-transition" appear="false" persisted="false" css="true">
|
|
260
|
+
<div class="v-progress-linear__indeterminate">
|
|
261
|
+
<div class="v-progress-linear__indeterminate long bg-primary"></div>
|
|
262
|
+
<div class="v-progress-linear__indeterminate short bg-primary"></div>
|
|
263
|
+
</div>
|
|
264
|
+
</transition-stub>
|
|
265
|
+
<!---->
|
|
266
|
+
</div>
|
|
267
|
+
</div>
|
|
268
|
+
<!---->
|
|
269
|
+
<div class="v-field__field" data-no-activator="">
|
|
270
|
+
<!----><label class="v-label v-field-label" for="input-0">
|
|
271
|
+
<!---->Rechercher
|
|
272
|
+
</label>
|
|
273
|
+
<!----><input size="1" type="text" id="input-0" aria-describedby="input-0-messages" class="v-field__input">
|
|
274
|
+
<!---->
|
|
275
|
+
</div>
|
|
276
|
+
<transition-stub name="expand-x-transition" appear="false" persisted="false" css="true">
|
|
277
|
+
<div class="v-field__clearable" style="display: none;"><i class="mdi-close-circle mdi v-icon notranslate v-theme--light v-icon--size-default v-icon--clickable" role="button" aria-hidden="false" tabindex="0" aria-label="Clear Rechercher"></i></div>
|
|
278
|
+
</transition-stub>
|
|
279
|
+
<div class="v-field__append-inner">
|
|
280
|
+
<!----><i class="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z mdi v-icon notranslate v-theme--light v-icon--size-default" aria-hidden="true"></i>
|
|
281
|
+
</div>
|
|
282
|
+
<div class="v-field__outline">
|
|
283
|
+
<!---->
|
|
284
|
+
<!---->
|
|
285
|
+
</div>
|
|
286
|
+
</div>
|
|
287
|
+
</div>
|
|
288
|
+
<!---->
|
|
289
|
+
<!---->
|
|
290
|
+
</div>
|
|
291
|
+
<!--v-if-->
|
|
292
|
+
</div>
|
|
293
|
+
<!---->
|
|
294
|
+
</div>
|
|
295
|
+
<transition-stub name="expand-transition" appear="false" persisted="false" css="true">
|
|
296
|
+
<!---->
|
|
297
|
+
</transition-stub>
|
|
298
|
+
</header>"
|
|
299
|
+
`;
|
|
300
|
+
|
|
301
|
+
exports[`TableToolbar > should render 1`] = `
|
|
302
|
+
"<header data-v-91e2c1b3="" class="v-toolbar v-toolbar--flat v-toolbar--density-default v-theme--light v-locale--is-ltr sy-table-toolbar px-4 py-2 d-flex flex-wrap align-center justify-space-between" style="background-color: #FFFFFF; color: #000; caret-color: #000;" minheight="56px" showaddbtn="true">
|
|
303
|
+
<!---->
|
|
304
|
+
<div class="v-toolbar__content">
|
|
305
|
+
<!---->
|
|
306
|
+
<!---->
|
|
307
|
+
<p data-v-91e2c1b3="" class="mb-0 font-weight-bold mr-4 my-3" data-test-id="nb-rows">1/2 lignes</p>
|
|
308
|
+
<div data-v-91e2c1b3="" class="sy-table-toolbar__search">
|
|
309
|
+
<div data-v-91e2c1b3="" class="v-input v-input--horizontal v-input--density-compact v-theme--light v-locale--is-ltr v-text-field v-input--plain-underlined sy-form-input flex-grow-1" data-test-id="search-input">
|
|
310
|
+
<!---->
|
|
311
|
+
<div class="v-input__control">
|
|
312
|
+
<div class="v-field v-field--appended v-field--single-line v-field--variant-underlined v-theme--light v-locale--is-ltr">
|
|
313
|
+
<div class="v-field__overlay"></div>
|
|
314
|
+
<div class="v-field__loader">
|
|
315
|
+
<div class="v-progress-linear v-theme--light v-locale--is-ltr" style="top: 0px; height: 0px; --v-progress-linear-height: 2px;" role="progressbar" aria-hidden="true" aria-valuemin="0" aria-valuemax="100">
|
|
316
|
+
<!---->
|
|
317
|
+
<div class="v-progress-linear__background bg-primary" style="opacity: NaN;"></div>
|
|
318
|
+
<div class="v-progress-linear__buffer bg-primary" style="opacity: NaN; width: 0%;"></div>
|
|
319
|
+
<transition-stub name="fade-transition" appear="false" persisted="false" css="true">
|
|
320
|
+
<div class="v-progress-linear__indeterminate">
|
|
321
|
+
<div class="v-progress-linear__indeterminate long bg-primary"></div>
|
|
322
|
+
<div class="v-progress-linear__indeterminate short bg-primary"></div>
|
|
323
|
+
</div>
|
|
324
|
+
</transition-stub>
|
|
325
|
+
<!---->
|
|
326
|
+
</div>
|
|
327
|
+
</div>
|
|
328
|
+
<!---->
|
|
329
|
+
<div class="v-field__field" data-no-activator="">
|
|
330
|
+
<!----><label class="v-label v-field-label" for="input-0">
|
|
331
|
+
<!---->Rechercher
|
|
332
|
+
</label>
|
|
333
|
+
<!----><input size="1" type="text" id="input-0" aria-describedby="input-0-messages" class="v-field__input">
|
|
334
|
+
<!---->
|
|
335
|
+
</div>
|
|
336
|
+
<transition-stub name="expand-x-transition" appear="false" persisted="false" css="true">
|
|
337
|
+
<div class="v-field__clearable" style="display: none;"><i class="mdi-close-circle mdi v-icon notranslate v-theme--light v-icon--size-default v-icon--clickable" role="button" aria-hidden="false" tabindex="0" aria-label="Clear Rechercher"></i></div>
|
|
338
|
+
</transition-stub>
|
|
339
|
+
<div class="v-field__append-inner">
|
|
340
|
+
<!----><i class="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z mdi v-icon notranslate v-theme--light v-icon--size-default" aria-hidden="true"></i>
|
|
341
|
+
</div>
|
|
342
|
+
<div class="v-field__outline">
|
|
343
|
+
<!---->
|
|
344
|
+
<!---->
|
|
345
|
+
</div>
|
|
346
|
+
</div>
|
|
347
|
+
</div>
|
|
348
|
+
<!---->
|
|
349
|
+
<!---->
|
|
350
|
+
</div>
|
|
351
|
+
<!--v-if-->
|
|
352
|
+
</div>
|
|
353
|
+
<!---->
|
|
354
|
+
</div>
|
|
355
|
+
<transition-stub name="expand-transition" appear="false" persisted="false" css="true">
|
|
356
|
+
<!---->
|
|
357
|
+
</transition-stub>
|
|
358
|
+
</header>"
|
|
359
|
+
`;
|
package/src/components/index.ts
CHANGED
|
@@ -22,6 +22,8 @@ export { default as DialogBox } from './DialogBox/DialogBox.vue'
|
|
|
22
22
|
export { default as DownloadBtn } from './DownloadBtn/DownloadBtn.vue'
|
|
23
23
|
export { default as ErrorPage } from './ErrorPage/ErrorPage.vue'
|
|
24
24
|
export { default as ExternalLinks } from './ExternalLinks/ExternalLinks.vue'
|
|
25
|
+
export { default as FileList } from './FileList/FileList.vue'
|
|
26
|
+
export { default as FilePreview } from './FilePreview/FilePreview.vue'
|
|
25
27
|
export { default as FileUpload } from './FileUpload/FileUpload.vue'
|
|
26
28
|
export { default as FooterBar } from './FooterBar/FooterBar.vue'
|
|
27
29
|
export { default as FranceConnectBtn } from './FranceConnectBtn/FranceConnectBtn.vue'
|
|
@@ -46,6 +48,7 @@ export { default as NotificationBar } from './NotificationBar/NotificationBar.vu
|
|
|
46
48
|
export * from './NotificationBar/types'
|
|
47
49
|
export { default as PageContainer } from './PageContainer/PageContainer.vue'
|
|
48
50
|
export { default as PasswordField } from './PasswordField/PasswordField.vue'
|
|
51
|
+
export { default as PeriodField } from './PeriodField/PeriodField.vue'
|
|
49
52
|
export { default as PhoneField } from './PhoneField/PhoneField.vue'
|
|
50
53
|
export { default as RangeField } from './RangeField/RangeField.vue'
|
|
51
54
|
export { default as RatingPicker } from './RatingPicker/RatingPicker.vue'
|
|
@@ -60,57 +60,59 @@ export function useFieldValidation() {
|
|
|
60
60
|
switch (type) {
|
|
61
61
|
case 'required':
|
|
62
62
|
return createValidationResult(
|
|
63
|
-
typeof value === 'string' && value.trim() !== ''
|
|
64
|
-
|
|
63
|
+
(typeof value === 'string' && value.trim() !== '')
|
|
64
|
+
|| (value instanceof Date)
|
|
65
|
+
|| (typeof value === 'object' && value !== null),
|
|
66
|
+
options.message || options.warningMessage || `Vous devez renseigner ${identifier}.`,
|
|
65
67
|
)
|
|
66
68
|
|
|
67
69
|
case 'min':
|
|
68
70
|
return createValidationResult(
|
|
69
71
|
typeof value === 'number' && value >= (options.value ?? 0),
|
|
70
|
-
options.message || `La valeur de ${identifier} doit être supérieure ou égale à ${options.value}.`,
|
|
72
|
+
options.message || options.warningMessage || `La valeur de ${identifier} doit être supérieure ou égale à ${options.value}.`,
|
|
71
73
|
)
|
|
72
74
|
|
|
73
75
|
case 'max':
|
|
74
76
|
return createValidationResult(
|
|
75
77
|
typeof value === 'number' && value <= (options.value ?? Infinity),
|
|
76
|
-
options.message || `La valeur de ${identifier} doit être inférieure ou égale à ${options.value}.`,
|
|
78
|
+
options.message || options.warningMessage || `La valeur de ${identifier} doit être inférieure ou égale à ${options.value}.`,
|
|
77
79
|
)
|
|
78
80
|
|
|
79
81
|
case 'minLength':
|
|
80
82
|
return createValidationResult(
|
|
81
83
|
typeof value === 'string' && getValueLength(value, options.ignoreSpace) >= (options.length ?? 0),
|
|
82
|
-
options.message || `${identifier} doit contenir au moins ${options.length} caractères.`,
|
|
84
|
+
options.message || options.warningMessage || `${identifier} doit contenir au moins ${options.length} caractères.`,
|
|
83
85
|
)
|
|
84
86
|
|
|
85
87
|
case 'maxLength':
|
|
86
88
|
return createValidationResult(
|
|
87
89
|
typeof value === 'string' && getValueLength(value, options.ignoreSpace) <= (options.length ?? Infinity),
|
|
88
|
-
options.message || `${identifier} ne doit pas dépasser ${options.length} caractères.`,
|
|
90
|
+
options.message || options.warningMessage || `${identifier} ne doit pas dépasser ${options.length} caractères.`,
|
|
89
91
|
)
|
|
90
92
|
|
|
91
93
|
case 'exactLength':
|
|
92
94
|
return createValidationResult(
|
|
93
95
|
typeof value === 'string' && getValueLength(value, options.ignoreSpace) === (options.length ?? 0),
|
|
94
|
-
options.message || `${identifier} doit contenir exactement ${options.length} caractères.`,
|
|
96
|
+
options.message || options.warningMessage || `${identifier} doit contenir exactement ${options.length} caractères.`,
|
|
95
97
|
)
|
|
96
98
|
|
|
97
99
|
case 'email':
|
|
98
100
|
return createValidationResult(
|
|
99
101
|
typeof value === 'string' && /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value),
|
|
100
|
-
options.message || `${identifier} doit être un email valide.`,
|
|
102
|
+
options.message || options.warningMessage || `${identifier} doit être un email valide.`,
|
|
101
103
|
)
|
|
102
104
|
|
|
103
105
|
case 'matchPattern':
|
|
104
106
|
return createValidationResult(
|
|
105
107
|
typeof value === 'string' && !!options.pattern && options.pattern.test(value),
|
|
106
|
-
options.message || `Le format de ${identifier} est invalide.`,
|
|
108
|
+
options.message || options.warningMessage || `Le format de ${identifier} est invalide.`,
|
|
107
109
|
)
|
|
108
110
|
|
|
109
111
|
case 'notWeekend': {
|
|
110
112
|
const dateValue = new Date(value)
|
|
111
113
|
return createValidationResult(
|
|
112
114
|
!(dateValue.getDay() === 0 || dateValue.getDay() === 6),
|
|
113
|
-
options.message || `${identifier} ne peut pas être un jour de weekend.`,
|
|
115
|
+
options.message || options.warningMessage || `${identifier} ne peut pas être un jour de weekend.`,
|
|
114
116
|
)
|
|
115
117
|
}
|
|
116
118
|
|
|
@@ -118,7 +120,7 @@ export function useFieldValidation() {
|
|
|
118
120
|
const dateValue = new Date(value)
|
|
119
121
|
return createValidationResult(
|
|
120
122
|
dateValue >= new Date(),
|
|
121
|
-
options.message || `${identifier} ne peut pas être antérieur à aujourd'hui.`,
|
|
123
|
+
options.message || options.warningMessage || `${identifier} ne peut pas être antérieur à aujourd'hui.`,
|
|
122
124
|
)
|
|
123
125
|
}
|
|
124
126
|
|
|
@@ -126,7 +128,7 @@ export function useFieldValidation() {
|
|
|
126
128
|
const dateValue = new Date(value)
|
|
127
129
|
return createValidationResult(
|
|
128
130
|
dateValue <= new Date(),
|
|
129
|
-
options.message || `${identifier} ne peut pas être postérieur à aujourd'hui.`,
|
|
131
|
+
options.message || options.warningMessage || `${identifier} ne peut pas être postérieur à aujourd'hui.`,
|
|
130
132
|
)
|
|
131
133
|
}
|
|
132
134
|
|
|
@@ -148,7 +150,7 @@ export function useFieldValidation() {
|
|
|
148
150
|
|
|
149
151
|
return createValidationResult(
|
|
150
152
|
dateValue >= referenceDate,
|
|
151
|
-
options.message || `${identifier} ne peut pas être avant le ${options.date}.`,
|
|
153
|
+
options.message || options.warningMessage || `${identifier} ne peut pas être avant le ${options.date}.`,
|
|
152
154
|
)
|
|
153
155
|
}
|
|
154
156
|
|
|
@@ -170,7 +172,7 @@ export function useFieldValidation() {
|
|
|
170
172
|
|
|
171
173
|
return createValidationResult(
|
|
172
174
|
dateValue <= referenceDate,
|
|
173
|
-
options.message || `${identifier} ne peut pas être après le ${options.date}.`,
|
|
175
|
+
options.message || options.warningMessage || `${identifier} ne peut pas être après le ${options.date}.`,
|
|
174
176
|
)
|
|
175
177
|
}
|
|
176
178
|
|
|
@@ -190,7 +192,7 @@ export function useFieldValidation() {
|
|
|
190
192
|
|
|
191
193
|
return createValidationResult(
|
|
192
194
|
dateValue.getTime() === referenceDate.getTime(),
|
|
193
|
-
options.message || `${identifier} doit être exactement le ${options.date}.`,
|
|
195
|
+
options.message || options.warningMessage || `${identifier} doit être exactement le ${options.date}.`,
|
|
194
196
|
)
|
|
195
197
|
}
|
|
196
198
|
|