@cnamts/synapse 0.0.16-alpha → 1.0.0
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/components/Accordion/Accordion.d.ts +39 -0
- package/dist/components/Accordion/config.d.ts +9 -0
- package/dist/components/ChipList/ChipList.d.ts +1 -1
- package/dist/components/CopyBtn/CopyBtn.d.ts +2 -0
- package/dist/components/Customs/SyInputSelect/SyInputSelect.d.ts +12 -0
- package/dist/components/Customs/SySelect/SySelect.d.ts +43 -16
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +17 -17
- package/dist/components/DatePicker/DatePicker.d.ts +34 -34
- package/dist/components/DatePicker/DateTextInput.d.ts +16 -16
- package/dist/components/DiacriticPicker/DiacriticPicker.d.ts +27 -0
- package/dist/components/DiacriticPicker/config.d.ts +14 -0
- package/dist/components/DiacriticPicker/locales.d.ts +6 -0
- package/dist/components/DownloadBtn/DownloadBtn.d.ts +1 -1
- package/dist/components/FooterBar/FooterBar.d.ts +1 -1
- package/dist/components/NirField/NirField.d.ts +34 -32
- package/dist/components/NotificationBar/NotificationBar.d.ts +1 -1
- package/dist/components/PasswordField/PasswordField.d.ts +1 -1
- package/dist/components/PeriodField/PeriodField.d.ts +64 -64
- package/dist/components/PhoneField/PhoneField.d.ts +1 -0
- package/dist/components/PhoneField/tests/types.d.ts +18 -0
- package/dist/components/SyTextArea/SyTextArea.d.ts +900 -0
- package/dist/components/SyTextArea/locales.d.ts +3 -0
- package/dist/components/SyTextArea/trimStartOnUpdate.d.ts +1 -0
- package/dist/components/SyTextArea/useTextActions.d.ts +13 -0
- package/dist/components/SyTextArea/wrapText.d.ts +1 -0
- package/dist/components/TableToolbar/TableToolbar.d.ts +10 -4
- package/dist/components/TableToolbar/config.d.ts +3 -2
- package/dist/components/index.d.ts +3 -0
- package/dist/composables/date/useHolidayDay.d.ts +36 -0
- package/dist/design-system-v3.js +4202 -3529
- package/dist/design-system-v3.umd.cjs +4 -1
- package/dist/designTokens/tokens/pa/paLightTheme.d.ts +1 -32
- package/dist/style.css +1 -1
- package/dist/utils/rules/index.d.ts +1 -0
- package/dist/utils/rules/isHolidayDay/index.d.ts +11 -0
- package/dist/utils/rules/isHolidayDay/locales.d.ts +2 -0
- package/package.json +3 -2
- package/src/assets/settings.scss +12 -0
- package/src/components/Accordion/Accordion.mdx +69 -0
- package/src/components/Accordion/Accordion.stories.ts +262 -0
- package/src/components/Accordion/Accordion.vue +319 -0
- package/src/components/Accordion/config.ts +9 -0
- package/src/components/Accordion/tests/__snapshots__/accordion.spec.ts.snap +155 -0
- package/src/components/Accordion/tests/accordion.spec.ts +492 -0
- package/src/components/CopyBtn/CopyBtn.stories.ts +189 -0
- package/src/components/CopyBtn/CopyBtn.vue +29 -1
- package/src/components/CopyBtn/tests/CopyBtn.spec.ts +102 -0
- package/src/components/Customs/SyInputSelect/SyInputSelect.stories.ts +155 -1
- package/src/components/Customs/SyInputSelect/SyInputSelect.vue +97 -14
- package/src/components/Customs/SyInputSelect/tests/SyInputSelect.spec.ts +386 -106
- package/src/components/Customs/SySelect/SySelect.stories.ts +121 -2
- package/src/components/Customs/SySelect/SySelect.vue +33 -8
- package/src/components/Customs/SySelect/tests/SySelect.spec.ts +290 -1
- package/src/components/Customs/SyTextField/SyTextField.vue +5 -3
- package/src/components/DatePicker/DatePicker.vue +16 -3
- package/src/components/DatePicker/DateTextInput.vue +16 -5
- package/src/components/DatePicker/examples/DatePickerHolidayRule.vue +130 -0
- package/src/components/DiacriticPicker/DiacriticPicker.mdx +104 -0
- package/src/components/DiacriticPicker/DiacriticPicker.stories.ts +447 -0
- package/src/components/DiacriticPicker/DiacriticPicker.vue +262 -0
- package/src/components/DiacriticPicker/config.ts +15 -0
- package/src/components/DiacriticPicker/locales.ts +6 -0
- package/src/components/DiacriticPicker/tests/DiatriticPicker.spec.ts +132 -0
- package/src/components/DialogBox/DialogBox.vue +1 -3
- package/src/components/NirField/NirField.stories.ts +172 -0
- package/src/components/NirField/NirField.vue +15 -7
- package/src/components/NotificationBar/Accessibilite.stories.ts +1 -1
- package/src/components/NotificationBar/NotificationBar.stories.ts +14 -0
- package/src/components/NotificationBar/NotificationBar.vue +26 -3
- package/src/components/NotificationBar/{options.ts → config.ts} +0 -1
- package/src/components/PaginatedTable/PaginatedTable.vue +0 -11
- package/src/components/PasswordField/PasswordField.stories.ts +4 -3
- package/src/components/PasswordField/PasswordField.vue +26 -18
- package/src/components/PasswordField/tests/PasswordField.spec.ts +1 -10
- package/src/components/PhoneField/PhoneField.stories.ts +143 -0
- package/src/components/PhoneField/PhoneField.vue +88 -30
- package/src/components/PhoneField/tests/PhoneField.additional.spec.ts +266 -0
- package/src/components/PhoneField/tests/PhoneField.spec.ts +248 -28
- package/src/components/PhoneField/tests/types.d.ts +19 -0
- package/src/components/SyTextArea/SyTextArea.mdx +17 -0
- package/src/components/SyTextArea/SyTextArea.stories.ts +322 -0
- package/src/components/SyTextArea/SyTextArea.vue +113 -0
- package/src/components/SyTextArea/locales.ts +3 -0
- package/src/components/SyTextArea/tests/SyTextArea.spec.ts +194 -0
- package/src/components/SyTextArea/trimStartOnUpdate.ts +12 -0
- package/src/components/SyTextArea/useTextActions.ts +52 -0
- package/src/components/SyTextArea/wrapText.ts +42 -0
- package/src/components/TableToolbar/TableToolbar.mdx +86 -1
- package/src/components/TableToolbar/TableToolbar.stories.ts +422 -74
- package/src/components/TableToolbar/TableToolbar.vue +25 -8
- package/src/components/TableToolbar/config.ts +3 -2
- package/src/components/TableToolbar/tests/__snapshots__/TableToolbar.spec.ts.snap +35 -12
- package/src/components/index.ts +3 -0
- package/src/composables/date/useHolidayDay.ts +98 -0
- package/src/composables/rules/useFieldValidation.ts +16 -3
- package/src/composables/validation/useValidation.ts +2 -1
- package/src/designTokens/tokens/pa/paLightTheme.ts +10 -41
- package/src/stories/Accessibilite/Introduction.mdx +5 -2
- package/src/stories/DesignTokens/colors.stories.ts +100 -41
- package/src/utils/rules/index.ts +1 -0
- package/src/utils/rules/isHolidayDay/IsHolidayDay.mdx +52 -0
- package/src/utils/rules/isHolidayDay/IsHolidayDay.stories.ts +129 -0
- package/src/utils/rules/isHolidayDay/index.ts +36 -0
- package/src/utils/rules/isHolidayDay/locales.ts +5 -0
- package/src/utils/rules/isHolidayDay/tests/isHolidayDay.spec.ts +35 -0
- /package/dist/components/NotificationBar/{options.d.ts → config.d.ts} +0 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { locales as defaultLocales } from './locales'
|
|
8
8
|
|
|
9
9
|
const props = withDefaults(defineProps<{
|
|
10
|
-
nbTotal
|
|
10
|
+
nbTotal?: number
|
|
11
11
|
nbFiltered?: number
|
|
12
12
|
search?: string
|
|
13
13
|
searchLabel?: string
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
loading?: boolean
|
|
17
17
|
locales?: typeof defaultLocales
|
|
18
18
|
} & CustomizableOptions>(), {
|
|
19
|
+
nbTotal: 0,
|
|
19
20
|
nbFiltered: undefined,
|
|
20
21
|
search: undefined,
|
|
21
22
|
searchLabel: defaultLocales.search,
|
|
@@ -30,6 +31,12 @@
|
|
|
30
31
|
(e: 'add'): void
|
|
31
32
|
}>()
|
|
32
33
|
|
|
34
|
+
defineSlots<{
|
|
35
|
+
searchLeft?: () => undefined
|
|
36
|
+
searchRight?: () => undefined
|
|
37
|
+
filters?: () => undefined
|
|
38
|
+
}>()
|
|
39
|
+
|
|
33
40
|
const options = useCustomizableOptions(config, props)
|
|
34
41
|
const display = useDisplay()
|
|
35
42
|
const theme = useTheme()
|
|
@@ -38,7 +45,6 @@
|
|
|
38
45
|
'sy-form-input--s': display.xs.value,
|
|
39
46
|
'flex-grow-0': display.xs.value,
|
|
40
47
|
'flex-grow-1': !display.xs.value,
|
|
41
|
-
'mr-6': props.showAddButton,
|
|
42
48
|
'loading': props.loading,
|
|
43
49
|
}))
|
|
44
50
|
|
|
@@ -59,12 +65,14 @@
|
|
|
59
65
|
>
|
|
60
66
|
<p
|
|
61
67
|
v-if="nbTotal > 0"
|
|
62
|
-
class="mb-0 font-weight-bold mr-4 my-3"
|
|
68
|
+
class="mb-0 font-weight-bold mr-4 mr-sm-0 my-3"
|
|
63
69
|
data-test-id="nb-rows"
|
|
64
70
|
>
|
|
65
71
|
{{ displayNbRows }}
|
|
66
72
|
</p>
|
|
67
73
|
|
|
74
|
+
<slot name="filters" />
|
|
75
|
+
|
|
68
76
|
<div class="sy-table-toolbar__search">
|
|
69
77
|
<slot name="search-left" />
|
|
70
78
|
<VTextField
|
|
@@ -109,6 +117,16 @@
|
|
|
109
117
|
|
|
110
118
|
.sy-table-toolbar {
|
|
111
119
|
min-height: 56px;
|
|
120
|
+
|
|
121
|
+
:deep(.v-toolbar__content) {
|
|
122
|
+
width: 100%;
|
|
123
|
+
flex-wrap: wrap;
|
|
124
|
+
flex-direction: row !important;
|
|
125
|
+
|
|
126
|
+
@media (width <= 600px) {
|
|
127
|
+
flex-direction: column !important;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
112
130
|
}
|
|
113
131
|
|
|
114
132
|
.loading :deep(.v-field__append-inner) {
|
|
@@ -125,6 +143,10 @@
|
|
|
125
143
|
grid-auto-flow: column;
|
|
126
144
|
margin-left: auto;
|
|
127
145
|
align-items: end;
|
|
146
|
+
|
|
147
|
+
@media (width <= 600px) {
|
|
148
|
+
margin-left: 0;
|
|
149
|
+
}
|
|
128
150
|
}
|
|
129
151
|
|
|
130
152
|
.sy-form-input {
|
|
@@ -134,11 +156,6 @@
|
|
|
134
156
|
.sy-form-input--s {
|
|
135
157
|
z-index: 1; // Display content above the table on mobile
|
|
136
158
|
contain: none; // Allow fixed elements to be displayed properly
|
|
137
|
-
|
|
138
|
-
:deep(.v-toolbar__content) {
|
|
139
|
-
width: 100%;
|
|
140
|
-
flex-wrap: wrap;
|
|
141
|
-
}
|
|
142
159
|
}
|
|
143
160
|
|
|
144
161
|
.sy-table-toolbar.v-theme--dark :deep() {
|
|
@@ -8,14 +8,15 @@ export const config = {
|
|
|
8
8
|
addBtn: {
|
|
9
9
|
variant: 'outlined',
|
|
10
10
|
color: 'primary',
|
|
11
|
-
class: '
|
|
11
|
+
class: 'px-2 px-md-4',
|
|
12
12
|
minWidth: '44px',
|
|
13
|
+
height: '40px',
|
|
13
14
|
},
|
|
14
15
|
addIconLabel: {
|
|
15
16
|
class: 'mr-1',
|
|
16
17
|
},
|
|
17
18
|
textField: {
|
|
18
|
-
variant: '
|
|
19
|
+
variant: 'outlined',
|
|
19
20
|
clearable: true,
|
|
20
21
|
singleLine: true,
|
|
21
22
|
hideDetails: true,
|
|
@@ -27,6 +27,7 @@ exports[`TableToolbar > renders correctly when all the item are displayed 1`] =
|
|
|
27
27
|
font-weight-bold
|
|
28
28
|
mb-0
|
|
29
29
|
mr-4
|
|
30
|
+
mr-sm-0
|
|
30
31
|
my-3
|
|
31
32
|
">
|
|
32
33
|
5/5 lignes
|
|
@@ -36,9 +37,9 @@ exports[`TableToolbar > renders correctly when all the item are displayed 1`] =
|
|
|
36
37
|
flex-grow-1
|
|
37
38
|
sy-form-input
|
|
38
39
|
v-input
|
|
40
|
+
v-input--center-affix
|
|
39
41
|
v-input--density-compact
|
|
40
42
|
v-input--horizontal
|
|
41
|
-
v-input--plain-underlined
|
|
42
43
|
v-locale--is-ltr
|
|
43
44
|
v-text-field
|
|
44
45
|
v-theme--light
|
|
@@ -48,8 +49,9 @@ exports[`TableToolbar > renders correctly when all the item are displayed 1`] =
|
|
|
48
49
|
<div class="
|
|
49
50
|
v-field
|
|
50
51
|
v-field--appended
|
|
52
|
+
v-field--center-affix
|
|
51
53
|
v-field--single-line
|
|
52
|
-
v-field--variant-
|
|
54
|
+
v-field--variant-outlined
|
|
53
55
|
v-locale--is-ltr
|
|
54
56
|
v-theme--light
|
|
55
57
|
">
|
|
@@ -193,7 +195,9 @@ exports[`TableToolbar > renders correctly when all the item are displayed 1`] =
|
|
|
193
195
|
></i>
|
|
194
196
|
</div>
|
|
195
197
|
<div class="v-field__outline">
|
|
198
|
+
<div class="v-field__outline__start"></div>
|
|
196
199
|
<!---->
|
|
200
|
+
<div class="v-field__outline__end"></div>
|
|
197
201
|
<!---->
|
|
198
202
|
</div>
|
|
199
203
|
</div>
|
|
@@ -243,6 +247,7 @@ exports[`TableToolbar > renders correctly when loading 1`] = `
|
|
|
243
247
|
font-weight-bold
|
|
244
248
|
mb-0
|
|
245
249
|
mr-4
|
|
250
|
+
mr-sm-0
|
|
246
251
|
my-3
|
|
247
252
|
">
|
|
248
253
|
1 ligne
|
|
@@ -253,10 +258,10 @@ exports[`TableToolbar > renders correctly when loading 1`] = `
|
|
|
253
258
|
loading
|
|
254
259
|
sy-form-input
|
|
255
260
|
v-input
|
|
261
|
+
v-input--center-affix
|
|
256
262
|
v-input--density-compact
|
|
257
263
|
v-input--disabled
|
|
258
264
|
v-input--horizontal
|
|
259
|
-
v-input--plain-underlined
|
|
260
265
|
v-locale--is-ltr
|
|
261
266
|
v-text-field
|
|
262
267
|
v-theme--light
|
|
@@ -266,9 +271,10 @@ exports[`TableToolbar > renders correctly when loading 1`] = `
|
|
|
266
271
|
<div class="
|
|
267
272
|
v-field
|
|
268
273
|
v-field--appended
|
|
274
|
+
v-field--center-affix
|
|
269
275
|
v-field--disabled
|
|
270
276
|
v-field--single-line
|
|
271
|
-
v-field--variant-
|
|
277
|
+
v-field--variant-outlined
|
|
272
278
|
v-locale--is-ltr
|
|
273
279
|
v-theme--light
|
|
274
280
|
">
|
|
@@ -387,7 +393,9 @@ exports[`TableToolbar > renders correctly when loading 1`] = `
|
|
|
387
393
|
></i>
|
|
388
394
|
</div>
|
|
389
395
|
<div class="v-field__outline">
|
|
396
|
+
<div class="v-field__outline__start"></div>
|
|
390
397
|
<!---->
|
|
398
|
+
<div class="v-field__outline__end"></div>
|
|
391
399
|
<!---->
|
|
392
400
|
</div>
|
|
393
401
|
</div>
|
|
@@ -437,6 +445,7 @@ exports[`TableToolbar > renders correctly when the screen width <= 600px 1`] = `
|
|
|
437
445
|
font-weight-bold
|
|
438
446
|
mb-0
|
|
439
447
|
mr-4
|
|
448
|
+
mr-sm-0
|
|
440
449
|
my-3
|
|
441
450
|
">
|
|
442
451
|
1 ligne
|
|
@@ -446,9 +455,9 @@ exports[`TableToolbar > renders correctly when the screen width <= 600px 1`] = `
|
|
|
446
455
|
flex-grow-1
|
|
447
456
|
sy-form-input
|
|
448
457
|
v-input
|
|
458
|
+
v-input--center-affix
|
|
449
459
|
v-input--density-compact
|
|
450
460
|
v-input--horizontal
|
|
451
|
-
v-input--plain-underlined
|
|
452
461
|
v-locale--is-ltr
|
|
453
462
|
v-text-field
|
|
454
463
|
v-theme--light
|
|
@@ -458,8 +467,9 @@ exports[`TableToolbar > renders correctly when the screen width <= 600px 1`] = `
|
|
|
458
467
|
<div class="
|
|
459
468
|
v-field
|
|
460
469
|
v-field--appended
|
|
470
|
+
v-field--center-affix
|
|
461
471
|
v-field--single-line
|
|
462
|
-
v-field--variant-
|
|
472
|
+
v-field--variant-outlined
|
|
463
473
|
v-locale--is-ltr
|
|
464
474
|
v-theme--light
|
|
465
475
|
">
|
|
@@ -603,7 +613,9 @@ exports[`TableToolbar > renders correctly when the screen width <= 600px 1`] = `
|
|
|
603
613
|
></i>
|
|
604
614
|
</div>
|
|
605
615
|
<div class="v-field__outline">
|
|
616
|
+
<div class="v-field__outline__start"></div>
|
|
606
617
|
<!---->
|
|
618
|
+
<div class="v-field__outline__end"></div>
|
|
607
619
|
<!---->
|
|
608
620
|
</div>
|
|
609
621
|
</div>
|
|
@@ -653,6 +665,7 @@ exports[`TableToolbar > renders correctly with content slot 1`] = `
|
|
|
653
665
|
font-weight-bold
|
|
654
666
|
mb-0
|
|
655
667
|
mr-4
|
|
668
|
+
mr-sm-0
|
|
656
669
|
my-3
|
|
657
670
|
">
|
|
658
671
|
1 ligne
|
|
@@ -662,9 +675,9 @@ exports[`TableToolbar > renders correctly with content slot 1`] = `
|
|
|
662
675
|
flex-grow-1
|
|
663
676
|
sy-form-input
|
|
664
677
|
v-input
|
|
678
|
+
v-input--center-affix
|
|
665
679
|
v-input--density-compact
|
|
666
680
|
v-input--horizontal
|
|
667
|
-
v-input--plain-underlined
|
|
668
681
|
v-locale--is-ltr
|
|
669
682
|
v-text-field
|
|
670
683
|
v-theme--light
|
|
@@ -674,8 +687,9 @@ exports[`TableToolbar > renders correctly with content slot 1`] = `
|
|
|
674
687
|
<div class="
|
|
675
688
|
v-field
|
|
676
689
|
v-field--appended
|
|
690
|
+
v-field--center-affix
|
|
677
691
|
v-field--single-line
|
|
678
|
-
v-field--variant-
|
|
692
|
+
v-field--variant-outlined
|
|
679
693
|
v-locale--is-ltr
|
|
680
694
|
v-theme--light
|
|
681
695
|
">
|
|
@@ -819,7 +833,9 @@ exports[`TableToolbar > renders correctly with content slot 1`] = `
|
|
|
819
833
|
></i>
|
|
820
834
|
</div>
|
|
821
835
|
<div class="v-field__outline">
|
|
836
|
+
<div class="v-field__outline__start"></div>
|
|
822
837
|
<!---->
|
|
838
|
+
<div class="v-field__outline__end"></div>
|
|
823
839
|
<!---->
|
|
824
840
|
</div>
|
|
825
841
|
</div>
|
|
@@ -871,9 +887,9 @@ exports[`TableToolbar > renders correctly with no items 1`] = `
|
|
|
871
887
|
flex-grow-1
|
|
872
888
|
sy-form-input
|
|
873
889
|
v-input
|
|
890
|
+
v-input--center-affix
|
|
874
891
|
v-input--density-compact
|
|
875
892
|
v-input--horizontal
|
|
876
|
-
v-input--plain-underlined
|
|
877
893
|
v-locale--is-ltr
|
|
878
894
|
v-text-field
|
|
879
895
|
v-theme--light
|
|
@@ -883,8 +899,9 @@ exports[`TableToolbar > renders correctly with no items 1`] = `
|
|
|
883
899
|
<div class="
|
|
884
900
|
v-field
|
|
885
901
|
v-field--appended
|
|
902
|
+
v-field--center-affix
|
|
886
903
|
v-field--single-line
|
|
887
|
-
v-field--variant-
|
|
904
|
+
v-field--variant-outlined
|
|
888
905
|
v-locale--is-ltr
|
|
889
906
|
v-theme--light
|
|
890
907
|
">
|
|
@@ -1028,7 +1045,9 @@ exports[`TableToolbar > renders correctly with no items 1`] = `
|
|
|
1028
1045
|
></i>
|
|
1029
1046
|
</div>
|
|
1030
1047
|
<div class="v-field__outline">
|
|
1048
|
+
<div class="v-field__outline__start"></div>
|
|
1031
1049
|
<!---->
|
|
1050
|
+
<div class="v-field__outline__end"></div>
|
|
1032
1051
|
<!---->
|
|
1033
1052
|
</div>
|
|
1034
1053
|
</div>
|
|
@@ -1079,6 +1098,7 @@ exports[`TableToolbar > should render 1`] = `
|
|
|
1079
1098
|
font-weight-bold
|
|
1080
1099
|
mb-0
|
|
1081
1100
|
mr-4
|
|
1101
|
+
mr-sm-0
|
|
1082
1102
|
my-3
|
|
1083
1103
|
">
|
|
1084
1104
|
1/2 lignes
|
|
@@ -1088,9 +1108,9 @@ exports[`TableToolbar > should render 1`] = `
|
|
|
1088
1108
|
flex-grow-1
|
|
1089
1109
|
sy-form-input
|
|
1090
1110
|
v-input
|
|
1111
|
+
v-input--center-affix
|
|
1091
1112
|
v-input--density-compact
|
|
1092
1113
|
v-input--horizontal
|
|
1093
|
-
v-input--plain-underlined
|
|
1094
1114
|
v-locale--is-ltr
|
|
1095
1115
|
v-text-field
|
|
1096
1116
|
v-theme--light
|
|
@@ -1100,8 +1120,9 @@ exports[`TableToolbar > should render 1`] = `
|
|
|
1100
1120
|
<div class="
|
|
1101
1121
|
v-field
|
|
1102
1122
|
v-field--appended
|
|
1123
|
+
v-field--center-affix
|
|
1103
1124
|
v-field--single-line
|
|
1104
|
-
v-field--variant-
|
|
1125
|
+
v-field--variant-outlined
|
|
1105
1126
|
v-locale--is-ltr
|
|
1106
1127
|
v-theme--light
|
|
1107
1128
|
">
|
|
@@ -1245,7 +1266,9 @@ exports[`TableToolbar > should render 1`] = `
|
|
|
1245
1266
|
></i>
|
|
1246
1267
|
</div>
|
|
1247
1268
|
<div class="v-field__outline">
|
|
1269
|
+
<div class="v-field__outline__start"></div>
|
|
1248
1270
|
<!---->
|
|
1271
|
+
<div class="v-field__outline__end"></div>
|
|
1249
1272
|
<!---->
|
|
1250
1273
|
</div>
|
|
1251
1274
|
</div>
|
package/src/components/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ export type { RuleOptions } from '../composables/rules/useFieldValidation'
|
|
|
4
4
|
export { useNotificationService } from '../services/NotificationService'
|
|
5
5
|
export { useValidation } from '../composables/validation/useValidation'
|
|
6
6
|
export { useDateFormat } from '../composables/date/useDateFormatDayjs'
|
|
7
|
+
export { default as Accordion } from './Accordion/Accordion.vue'
|
|
7
8
|
export { default as BackBtn } from './BackBtn/BackBtn.vue'
|
|
8
9
|
export { default as BackToTopBtn } from './BackToTopBtn/BackToTopBtn.vue'
|
|
9
10
|
export { default as ChipList } from './ChipList/ChipList.vue'
|
|
@@ -23,6 +24,7 @@ export { default as DataList } from './DataList/DataList.vue'
|
|
|
23
24
|
export { default as DataListGroup } from './DataListGroup/DataListGroup.vue'
|
|
24
25
|
export { default as DataListItem } from './DataListItem/DataListItem.vue'
|
|
25
26
|
export { default as DialogBox } from './DialogBox/DialogBox.vue'
|
|
27
|
+
export { default as DiacriticPicker } from './DiacriticPicker/DiacriticPicker.vue'
|
|
26
28
|
export { default as DownloadBtn } from './DownloadBtn/DownloadBtn.vue'
|
|
27
29
|
export { default as ErrorPage } from './ErrorPage/ErrorPage.vue'
|
|
28
30
|
export { default as ExternalLinks } from './ExternalLinks/ExternalLinks.vue'
|
|
@@ -66,6 +68,7 @@ export { default as SkipLink } from './SkipLink/SkipLink.vue'
|
|
|
66
68
|
export { default as SocialMediaLinks } from './SocialMediaLinks/SocialMediaLinks.vue'
|
|
67
69
|
export { default as SubHeader } from './SubHeader/SubHeader.vue'
|
|
68
70
|
export { default as SyAlert } from './SyAlert/SyAlert.vue'
|
|
71
|
+
export { default as SyTextArea } from './SyTextArea/SyTextArea.vue'
|
|
69
72
|
export { default as TableToolbar } from './TableToolbar/TableToolbar.vue'
|
|
70
73
|
export { default as UploadWorkflow } from './UploadWorkflow/UploadWorkflow.vue'
|
|
71
74
|
export { default as UserMenuBtn } from './UserMenuBtn/UserMenuBtn.vue'
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composable pour la gestion des jours fériés
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import dayjs from 'dayjs'
|
|
6
|
+
import customParseFormat from 'dayjs/plugin/customParseFormat'
|
|
7
|
+
|
|
8
|
+
// Étendre dayjs avec le plugin customParseFormat
|
|
9
|
+
dayjs.extend(customParseFormat)
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Algorithme de GAUSS pour calculer la date de Pâques
|
|
13
|
+
* @param annee - L'année pour laquelle calculer la date de Pâques
|
|
14
|
+
* @returns Un objet contenant le jour et le mois de Pâques
|
|
15
|
+
*/
|
|
16
|
+
function calculPaquesGregorienne(annee: number): { jour: number, mois: number } {
|
|
17
|
+
const val1 = (19 * (annee % 19) + 24) % 30
|
|
18
|
+
const val2 = (2 * (annee % 4) + 4 * (annee % 7) + 6 * val1 + 5) % 7
|
|
19
|
+
const sum = val1 + val2
|
|
20
|
+
|
|
21
|
+
let jourPaques: number
|
|
22
|
+
let moisPaques: number
|
|
23
|
+
|
|
24
|
+
if (sum <= 9) {
|
|
25
|
+
jourPaques = sum + 22
|
|
26
|
+
moisPaques = 3
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
jourPaques = sum - 9
|
|
30
|
+
moisPaques = 4
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return { jour: jourPaques, mois: moisPaques }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Calcule les jours fériés d'une année donnée
|
|
38
|
+
* @param annee - L'année pour laquelle calculer les jours fériés
|
|
39
|
+
* @param format - Format des jours fériés en retour (défaut : "DD/MM/YYYY")
|
|
40
|
+
* @returns Un Set contenant la liste des jours fériés
|
|
41
|
+
*/
|
|
42
|
+
export function getJoursFeries(annee: number, format = 'DD/MM/YYYY'): Set<string> {
|
|
43
|
+
const { jour: jourPaques, mois: moisPaques } = calculPaquesGregorienne(annee)
|
|
44
|
+
const formatDay = (date: dayjs.Dayjs) => date.format(format)
|
|
45
|
+
|
|
46
|
+
const jours = new Set([
|
|
47
|
+
formatDay(dayjs(`01/01/${annee}`, 'DD/MM/YYYY')), // Jour de l'an
|
|
48
|
+
formatDay(dayjs(new Date(annee, moisPaques - 1, jourPaques + 1))), // Lundi de Pâques
|
|
49
|
+
formatDay(dayjs(`01/05/${annee}`, 'DD/MM/YYYY')), // Fête du travail
|
|
50
|
+
formatDay(dayjs(`08/05/${annee}`, 'DD/MM/YYYY')), // Victoire des alliés
|
|
51
|
+
formatDay(dayjs(new Date(annee, moisPaques - 1, jourPaques + 39))), // Ascension
|
|
52
|
+
formatDay(dayjs(new Date(annee, moisPaques - 1, jourPaques + 50))), // Lundi de Pentecôte
|
|
53
|
+
formatDay(dayjs(`14/07/${annee}`, 'DD/MM/YYYY')), // Fête Nationale
|
|
54
|
+
formatDay(dayjs(`15/08/${annee}`, 'DD/MM/YYYY')), // Assomption
|
|
55
|
+
formatDay(dayjs(`01/11/${annee}`, 'DD/MM/YYYY')), // Toussaint
|
|
56
|
+
formatDay(dayjs(`11/11/${annee}`, 'DD/MM/YYYY')), // Armistice
|
|
57
|
+
formatDay(dayjs(`25/12/${annee}`, 'DD/MM/YYYY')), // Noël
|
|
58
|
+
])
|
|
59
|
+
|
|
60
|
+
return jours
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Vérifie si une date est un jour férié
|
|
65
|
+
* @param date - La date à vérifier (Date ou string)
|
|
66
|
+
* @param format - Format de la date si elle est fournie en string (défaut : "DD/MM/YYYY")
|
|
67
|
+
* @returns true si la date est un jour férié, false sinon
|
|
68
|
+
*/
|
|
69
|
+
export function isHolidayDay(date: Date | string, format = 'DD/MM/YYYY'): boolean {
|
|
70
|
+
// Convertir la date en objet dayjs
|
|
71
|
+
const dateObj = typeof date === 'string'
|
|
72
|
+
? dayjs(date, format)
|
|
73
|
+
: dayjs(date)
|
|
74
|
+
|
|
75
|
+
if (!dateObj.isValid()) {
|
|
76
|
+
return false
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const annee = dateObj.year()
|
|
80
|
+
const joursFeries = getJoursFeries(annee, format)
|
|
81
|
+
|
|
82
|
+
// Vérifier si la date formatée est dans l'ensemble des jours fériés
|
|
83
|
+
return joursFeries.has(dateObj.format(format))
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Hook composable pour la gestion des jours fériés
|
|
88
|
+
* @returns Fonctions pour gérer les jours fériés
|
|
89
|
+
*/
|
|
90
|
+
export function useHolidayDay() {
|
|
91
|
+
return {
|
|
92
|
+
getJoursFeries,
|
|
93
|
+
isHolidayDay,
|
|
94
|
+
calculPaquesGregorienne,
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export default useHolidayDay
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
// Regular expressions
|
|
2
2
|
export const EMAIL_REGEXP = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
|
|
3
3
|
|
|
4
|
+
// Import du composable pour les jours fériés
|
|
5
|
+
import { useHolidayDay } from '@/composables/date/useHolidayDay'
|
|
6
|
+
|
|
4
7
|
export type ValidationResult = {
|
|
5
8
|
success?: string
|
|
6
9
|
error?: string
|
|
@@ -291,14 +294,24 @@ export function useFieldValidation() {
|
|
|
291
294
|
)
|
|
292
295
|
}
|
|
293
296
|
|
|
297
|
+
case 'isHolidayDay': {
|
|
298
|
+
const { isHolidayDay } = useHolidayDay()
|
|
299
|
+
const dateValue = new Date(value)
|
|
300
|
+
|
|
301
|
+
return createValidationResult(
|
|
302
|
+
!isHolidayDay(dateValue),
|
|
303
|
+
options.message || options.warningMessage || `${identifier} n'est pas un jour férié.`,
|
|
304
|
+
)
|
|
305
|
+
}
|
|
306
|
+
|
|
294
307
|
case 'custom': {
|
|
295
308
|
const result = options.validate?.(value)
|
|
296
309
|
if (result === true) {
|
|
297
|
-
return { success: baseMessages.success }
|
|
310
|
+
return { success: options.successMessage || baseMessages.success }
|
|
298
311
|
}
|
|
299
312
|
return options.isWarning
|
|
300
|
-
? { warning: typeof result === 'string' ? result : baseMessages.warning }
|
|
301
|
-
: { error: typeof result === 'string' ? result : baseMessages.error }
|
|
313
|
+
? { warning: typeof result === 'string' ? result : options.warningMessage || baseMessages.warning }
|
|
314
|
+
: { error: typeof result === 'string' ? result : options.message || baseMessages.error }
|
|
302
315
|
}
|
|
303
316
|
|
|
304
317
|
default:
|
|
@@ -94,7 +94,8 @@ export function useValidation(options: ValidationOptions = { showSuccessMessages
|
|
|
94
94
|
})
|
|
95
95
|
|
|
96
96
|
// Si pas d'erreur, ajouter le message de succès ou un message par défaut
|
|
97
|
-
|
|
97
|
+
// Mais seulement si aucun customSuccessRules n'est défini pour éviter la duplication
|
|
98
|
+
if (!hasValidationError && value && options.showSuccessMessages !== false && (!successRules || successRules.length === 0)) {
|
|
98
99
|
const customSuccessMessage = rules.find(rule => rule.options.successMessage)?.options.successMessage
|
|
99
100
|
if (customSuccessMessage) {
|
|
100
101
|
successes.value.push(customSuccessMessage)
|
|
@@ -2,48 +2,17 @@ import { paColorsTokens } from './paColors'
|
|
|
2
2
|
import { paSemanticTokens } from '../pa/paSemantic'
|
|
3
3
|
|
|
4
4
|
export const paLightTheme = {
|
|
5
|
-
primary:
|
|
6
|
-
secondary:
|
|
7
|
-
accent:
|
|
8
|
-
error:
|
|
9
|
-
info:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
blue: '#007bff',
|
|
14
|
-
blueBase: '#007bff',
|
|
15
|
-
indigo: '#6610f2',
|
|
16
|
-
indigoBase: '#6610f2',
|
|
17
|
-
purple: '#6f42c1',
|
|
18
|
-
purpleBase: '#6f42c1',
|
|
19
|
-
pink: '#e83e8c',
|
|
20
|
-
pinkBase: '#e83e8c',
|
|
21
|
-
red: '#dc3545',
|
|
22
|
-
redBase: '#dc3545',
|
|
23
|
-
orange: '#fd7e14',
|
|
24
|
-
orangeBase: '#fd7e14',
|
|
25
|
-
yellow: '#ffc107',
|
|
26
|
-
yellowBase: '#ffc107',
|
|
27
|
-
green: '#28a745',
|
|
28
|
-
greenBase: '#28a745',
|
|
29
|
-
teal: '#20c997',
|
|
30
|
-
tealBase: '#20c997',
|
|
31
|
-
cyan: '#17a2b8',
|
|
32
|
-
cyanBase: '#17a2b8',
|
|
33
|
-
gray: '#8a8b8b',
|
|
34
|
-
grayBase: '#8a8b8b',
|
|
35
|
-
grayDark: '#343434',
|
|
36
|
-
grayDarkBase: '#343434',
|
|
5
|
+
primary: paColorsTokens.blue.base,
|
|
6
|
+
secondary: paColorsTokens.cyan.darken40,
|
|
7
|
+
accent: paColorsTokens.cyan.base,
|
|
8
|
+
error: paColorsTokens.orange.darken20,
|
|
9
|
+
info: paColorsTokens.blue.base,
|
|
10
|
+
avatar: paColorsTokens.cyan.darken20,
|
|
11
|
+
success: paColorsTokens.turquoise.darken60,
|
|
12
|
+
warning: paColorsTokens.yellow.darken60,
|
|
37
13
|
risquePro: paColorsTokens.brick.base,
|
|
38
|
-
light:
|
|
39
|
-
dark:
|
|
40
|
-
default: '#b7cbd6',
|
|
41
|
-
brand: '#4a3f59',
|
|
42
|
-
brandSecondary: '#ac1c81',
|
|
43
|
-
brandMuted: '#b7cbd6',
|
|
44
|
-
brandMutedLite: '#E7F3F9',
|
|
45
|
-
hilitePrimary: '#0062ac',
|
|
46
|
-
hiliteSecondary: '#e6bebf',
|
|
14
|
+
light: paColorsTokens.grey.lighten60,
|
|
15
|
+
dark: paColorsTokens.grey.darken80,
|
|
47
16
|
onBackground: paSemanticTokens.colors.background.surface,
|
|
48
17
|
onSurfaceAlt: paSemanticTokens.colors.background.surfaceAlt,
|
|
49
18
|
onSurface: paSemanticTokens.colors.background.surface,
|
|
@@ -16,8 +16,11 @@ C'est pourquoi et sauf exception motivée, toute nouvelle demande d'audit d'acce
|
|
|
16
16
|
L'objectif ici est d'anticiper les erreurs et diluer l'effort de mise en conformité tout au long du processus de fabrication afin de ne pas attendre le résultat de l'audit pour réécrire le produit.<br/>
|
|
17
17
|
Une fois le produit éligible, l'équipe experte de la Filière Digital réalise un audit et communique à l'équipe-produit un rapport comportant des recommandations. Si le produit utilise le DS CNAM et que des problèmes sont identifiés associés à ce dernier, les évolutions seront portés directement par la Filière Digital, en cas contraire il est demandé à l'équipe-produit de corriger les anomalies et de mettre à jour en autonomie le rapport d'audit pour atteindre la pleine conformité.
|
|
18
18
|
|
|
19
|
-
Conscient que tous les produits ne peuvent pas utiliser dans l’immédiat le Design System thème Cnam ou thème Portail Agent, nous avons conçu le kit de pré-audit pour qu’il puisse fonctionner en autonomie
|
|
20
|
-
|
|
19
|
+
Conscient que tous les produits ne peuvent pas utiliser dans l’immédiat le Design System thème Cnam ou thème Portail Agent, nous avons conçu le kit de pré-audit pour qu’il puisse fonctionner en autonomie.
|
|
20
|
+
|
|
21
|
+
Si vous avez besoin d’un accompagnement sur le sujet, merci de prendre contact avec [valentin.becquet@assurance-maladie.fr](mailto:valentin.becquet@assurance-maladie.fr).
|
|
22
|
+
|
|
23
|
+
Pour toute remontée de problème liée à l’accessibilité, veuillez ouvrir une issue à l’adresse suivante : [Signaler un problème d'accessibilité](https://github.com/assurance-maladie-digital/design-system-v3/issues/new?template=accessibility.md)
|
|
21
24
|
|
|
22
25
|
Vous trouverez dans ce dossier 3 principales rubriques :
|
|
23
26
|
|