@cnamts/synapse 0.0.12-alpha → 0.0.13-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.js +4913 -4021
- package/dist/design-system-v3.umd.cjs +1 -1
- package/dist/src/components/Amelipro/types/types.d.ts +30 -57
- package/dist/src/components/Customs/SyTextField/SyTextField.d.ts +2 -0
- package/dist/src/components/DatePicker/DatePicker.d.ts +36 -44
- package/dist/src/components/DatePicker/DateTextInput.d.ts +33 -36
- package/dist/src/components/FilterInline/AccessibiliteItems.d.ts +30 -0
- package/dist/src/components/FilterInline/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/FilterSideBar/AccessibiliteItems.d.ts +29 -0
- package/dist/src/components/FilterSideBar/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/NirField/NirField.d.ts +14 -2
- package/dist/src/components/NotificationBar/NotificationBar.d.ts +5 -5
- package/dist/src/components/PasswordField/PasswordField.d.ts +2 -0
- package/dist/src/components/PeriodField/PeriodField.d.ts +159 -157
- package/dist/src/components/PhoneField/PhoneField.d.ts +22 -1
- package/dist/src/components/UploadWorkflow/AccessibiliteItems.d.ts +29 -0
- package/dist/src/components/UploadWorkflow/constants/ExpertiseLevelEnum.d.ts +4 -0
- package/dist/src/components/Usages/Usages.d.ts +10 -0
- package/dist/src/components/index.d.ts +3 -0
- package/dist/src/composables/date/tests/useDatePickerAccessibility.spec.d.ts +1 -0
- package/dist/src/composables/date/useDateFormat.d.ts +26 -0
- package/dist/src/composables/date/useDateInitialization.d.ts +18 -0
- package/dist/src/composables/date/useDatePickerAccessibility.d.ts +8 -0
- package/dist/src/composables/useFilterable/useFilterable.d.ts +1 -1
- package/dist/src/composables/validation/useValidation.d.ts +1 -0
- package/dist/src/main.d.ts +1 -0
- package/dist/src/utils/formatDate/index.d.ts +3 -0
- package/dist/src/utils/formatDate/tests/formatDate.spec.d.ts +1 -0
- package/dist/src/utils/functions/validation/isDateAfter/index.d.ts +2 -0
- package/dist/src/utils/functions/validation/isDateAfter/tests/isDateAfter.spec.d.ts +1 -0
- package/dist/src/utils/functions/validation/isDateBefore/index.d.ts +2 -0
- package/dist/src/utils/functions/validation/isDateBefore/tests/isDateBefore.spec.d.ts +1 -0
- package/dist/src/utils/functions/validation/isDateInRange/index.d.ts +3 -0
- package/dist/src/utils/functions/validation/isDateInRange/tests/isDateInRange.spec.d.ts +1 -0
- package/dist/src/utils/functions/validation/isDateValid/index.d.ts +9 -0
- package/dist/src/utils/functions/validation/isDateValid/tests/isDateValid.spec.d.ts +1 -0
- package/dist/src/utils/functions/validation/isEmailValid/tests/isEmailValid.spec.d.ts +1 -0
- package/dist/src/utils/functions/validation/isWeekend/index.d.ts +3 -0
- package/dist/src/utils/functions/validation/isWeekend/tests/isWeekend.spec.d.ts +1 -0
- package/dist/src/utils/parseDate/index.d.ts +3 -0
- package/dist/src/utils/parseDate/tests/parseDate.spec.d.ts +1 -0
- package/dist/src/utils/rules/doMatchPattern/index.d.ts +3 -0
- package/dist/src/utils/rules/doMatchPattern/tests/matchPattern.spec.d.ts +1 -0
- package/dist/src/utils/rules/index.d.ts +11 -0
- package/dist/src/utils/rules/isDateValid/index.d.ts +4 -0
- package/dist/src/utils/rules/isDateValid/tests/isDateValid.spec.d.ts +1 -0
- package/dist/src/utils/rules/isExactLength/index.d.ts +3 -0
- package/dist/src/utils/rules/isExactLength/locales.d.ts +2 -0
- package/dist/src/utils/rules/isExactLength/tests/exactLength.spec.d.ts +1 -0
- package/dist/src/utils/rules/isMaxLength/index.d.ts +3 -0
- package/dist/src/utils/rules/isMaxLength/locales.d.ts +2 -0
- package/dist/src/utils/rules/isMaxLength/tests/isMaxLength.spec.d.ts +1 -0
- package/dist/src/utils/rules/isMinLength/index.d.ts +3 -0
- package/dist/src/utils/rules/isMinLength/locales.d.ts +2 -0
- package/dist/src/utils/rules/isMinLength/tests/isMinLength.spec.d.ts +1 -0
- package/dist/src/utils/rules/isNotAfterDate/index.d.ts +3 -0
- package/dist/src/utils/rules/isNotAfterDate/tests/isNotAfterDate.spec.d.ts +1 -0
- package/dist/src/utils/rules/isNotAfterToday/index.d.ts +4 -0
- package/dist/src/utils/rules/isNotAfterToday/locales.d.ts +2 -0
- package/dist/src/utils/rules/isNotAfterToday/tests/isNotAfterToday.spec.d.ts +1 -0
- package/dist/src/utils/rules/isNotBeforeDate/index.d.ts +3 -0
- package/dist/src/utils/rules/isNotBeforeDate/locales.d.ts +2 -0
- package/dist/src/utils/rules/isNotBeforeDate/tests/IsNotBeforeDate.spec.d.ts +1 -0
- package/dist/src/utils/rules/isNotBeforeToday/index.d.ts +4 -0
- package/dist/src/utils/rules/isNotBeforeToday/locales.d.ts +2 -0
- package/dist/src/utils/rules/isNotBeforeToday/tests/notBeforeToday.spec.d.ts +1 -0
- package/dist/src/utils/rules/isRequired/index.d.ts +4 -0
- package/dist/src/utils/rules/isRequired/locales.d.ts +2 -0
- package/dist/src/utils/rules/isRequired/tests/isRequred.spec.d.ts +1 -0
- package/dist/src/utils/rules/isValidEmail/index.d.ts +4 -0
- package/dist/src/utils/rules/isValidEmail/locales.d.ts +2 -0
- package/dist/src/utils/rules/isValidEmail/tests/isValidEmail.spec.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +3 -1
- package/src/assets/_radius.scss +12 -6
- package/src/assets/settings.scss +8 -0
- package/src/components/Amelipro/types/types.ts +40 -0
- package/src/components/ChipList/ChipList.stories.ts +26 -27
- package/src/components/ChipList/ChipList.vue +5 -1
- package/src/components/ChipList/config.ts +1 -0
- package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +2 -2
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.mdx +1 -1
- package/src/components/Customs/SyInputSelect/SyInputSelect.mdx +1 -1
- package/src/components/Customs/SySelect/SySelect.mdx +1 -1
- package/src/components/Customs/SySelect/SySelect.vue +19 -4
- package/src/components/Customs/SyTextField/SyTextField.mdx +2 -2
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +239 -0
- package/src/components/Customs/SyTextField/SyTextField.vue +3 -0
- package/src/components/DatePicker/DatePicker.stories.ts +177 -5
- package/src/components/DatePicker/DatePicker.vue +148 -347
- package/src/components/DatePicker/DateTextInput.vue +91 -251
- package/src/components/DatePicker/tests/DatePicker.spec.ts +118 -48
- package/src/components/DatePicker/tests/DateTextInput.spec.ts +202 -6
- package/src/components/FileList/Accessibilite.stories.ts +1 -1
- package/src/components/FileList/AccessibiliteItems.ts +22 -0
- package/src/components/FileUpload/FileUpload.stories.ts +9 -7
- package/src/components/FilterInline/Accessibilite.mdx +14 -0
- package/src/components/FilterInline/Accessibilite.stories.ts +216 -0
- package/src/components/FilterInline/AccessibiliteItems.ts +132 -0
- package/src/components/FilterInline/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/FilterSideBar/Accessibilite.mdx +14 -0
- package/src/components/FilterSideBar/Accessibilite.stories.ts +216 -0
- package/src/components/FilterSideBar/AccessibiliteItems.ts +153 -0
- package/src/components/FilterSideBar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/NirField/NirField.stories.ts +165 -0
- package/src/components/NirField/NirField.vue +6 -2
- package/src/components/NirField/tests/config.spec.ts +65 -0
- package/src/components/NotificationBar/NotificationBar.mdx +2 -2
- package/src/components/NotificationBar/NotificationBar.stories.ts +59 -11
- package/src/components/NotificationBar/NotificationBar.vue +42 -114
- package/src/components/NotificationBar/tests/NotificationBar.spec.ts +28 -33
- package/src/components/NotificationBar/tests/__snapshots__/NotificationBar.spec.ts.snap +1 -1
- package/src/components/PaginatedTable/PaginatedTable.vue +6 -10
- package/src/components/PaginatedTable/tests/__snapshots__/PaginatedTable.spec.ts.snap +4 -4
- package/src/components/PasswordField/PasswordField.stories.ts +191 -4
- package/src/components/PasswordField/PasswordField.vue +3 -0
- package/src/components/PeriodField/PeriodField.stories.ts +214 -118
- package/src/components/PeriodField/PeriodField.vue +195 -148
- package/src/components/PeriodField/tests/PeriodField.spec.ts +146 -0
- package/src/components/PhoneField/PhoneField.stories.ts +101 -0
- package/src/components/PhoneField/PhoneField.vue +73 -17
- package/src/components/PhoneField/tests/PhoneField.spec.ts +40 -0
- package/src/components/RatingPicker/RatingPicker.stories.ts +7 -7
- package/src/components/SearchListField/SearchListField.stories.ts +1 -1
- package/src/components/UploadWorkflow/Accessibilite.mdx +14 -0
- package/src/components/UploadWorkflow/Accessibilite.stories.ts +216 -0
- package/src/components/UploadWorkflow/AccessibiliteItems.ts +192 -0
- package/src/components/UploadWorkflow/UploadWorkflow.vue +2 -2
- package/src/components/UploadWorkflow/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Usages/tests/Usages.spec.ts +183 -0
- package/src/components/index.ts +3 -0
- package/src/composables/date/tests/useDateFormat.spec.ts +67 -0
- package/src/composables/date/tests/useDateInitialization.spec.ts +89 -0
- package/src/composables/date/tests/useDatePickerAccessibility.spec.ts +102 -0
- package/src/composables/date/useDateFormat.ts +94 -0
- package/src/composables/date/useDateInitialization.ts +92 -0
- package/src/composables/date/useDatePickerAccessibility.ts +78 -0
- package/src/composables/rules/tests/useFieldValidation.spec.ts +385 -4
- package/src/composables/useFilterable/useFilterable.ts +5 -4
- package/src/composables/validation/useValidation.ts +15 -0
- package/src/main.ts +1 -0
- package/src/stories/Accessibilite/Aculturation/AuditDesignSystem.mdx +28 -0
- package/src/stories/Accessibilite/Aculturation/SensibilisationAccessibilite.mdx +2 -2
- package/src/stories/Accessibilite/Audit/RGAA.mdx +6 -6
- package/src/stories/Accessibilite/Introduction.mdx +2 -1
- package/src/stories/Accessibilite/KitDePreAudit/Echantillonnage.mdx +1 -1
- package/src/stories/Accessibilite/KitDePreAudit/Introduction.mdx +1 -1
- package/src/stories/Accessibilite/KitDePreAudit/Outils/Introduction.mdx +8 -11
- package/src/stories/Accessibilite/KitDePreAudit/Outils/LecteursDEcran.mdx +77 -0
- package/src/stories/Accessibilite/KitDePreAudit/Outils/Tanaguru.mdx +9 -3
- package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +2 -2
- package/src/stories/Demarrer/Introduction.stories.ts +3 -3
- package/src/stories/Demarrer/Releases.mdx +8 -0
- package/src/stories/Demarrer/Releases.stories.ts +66 -0
- package/src/stories/DesignTokens/Conteneurs.stories.ts +3 -3
- package/src/stories/GuideDuDev/LesBreackingChanges.mdx +36 -0
- package/src/stories/GuideDuDev/UtiliserLesRules.mdx +2 -2
- package/src/utils/formatDate/index.ts +6 -0
- package/src/utils/formatDate/tests/formatDate.spec.ts +18 -0
- package/src/utils/functions/validation/isDateAfter/index.ts +9 -0
- package/src/utils/functions/validation/isDateAfter/tests/isDateAfter.spec.ts +18 -0
- package/src/utils/functions/validation/isDateBefore/index.ts +9 -0
- package/src/utils/functions/validation/isDateBefore/tests/isDateBefore.spec.ts +23 -0
- package/src/utils/functions/validation/isDateInRange/index.ts +22 -0
- package/src/utils/functions/validation/isDateInRange/tests/isDateInRange.spec.ts +28 -0
- package/src/utils/functions/validation/isDateValid/index.ts +67 -0
- package/src/utils/functions/validation/isDateValid/tests/isDateValid.spec.ts +46 -0
- package/src/utils/functions/validation/isEmailValid/index.ts +9 -0
- package/src/utils/functions/validation/isWeekend/index.ts +10 -0
- package/src/utils/functions/validation/isWeekend/tests/isWeekend.spec.ts +16 -0
- package/src/utils/parseDate/index.ts +29 -0
- package/src/utils/parseDate/tests/parseDate.spec.ts +52 -0
- package/src/utils/rules/Rules.mdx +16 -0
- package/src/utils/rules/doMatchPattern/DoMachPattern.mdx +66 -0
- package/src/utils/rules/doMatchPattern/DoMatchPattern.stories.ts +106 -0
- package/src/utils/rules/doMatchPattern/index.ts +28 -0
- package/src/utils/rules/doMatchPattern/locales.ts +5 -0
- package/src/utils/rules/doMatchPattern/tests/matchPattern.spec.ts +38 -0
- package/src/utils/rules/index.ts +11 -0
- package/src/utils/rules/isDateValid/IsDateValid.mdx +87 -0
- package/src/utils/rules/isDateValid/IsDateValid.stories.ts +113 -0
- package/src/utils/rules/isDateValid/index.ts +32 -0
- package/src/utils/rules/isDateValid/locales.ts +10 -0
- package/src/utils/rules/isDateValid/tests/isDateValid.spec.ts +27 -0
- package/src/utils/rules/isExactLength/IsExactLenght.mdx +68 -0
- package/src/utils/rules/isExactLength/IsExactLength.stories.ts +151 -0
- package/src/utils/rules/{exactLength → isExactLength}/index.ts +2 -4
- package/src/utils/rules/isExactLength/tests/exactLength.spec.ts +48 -0
- package/src/utils/rules/isMaxLength/IsMaxLength.mdx +68 -0
- package/src/utils/rules/isMaxLength/IsMaxLength.stories.ts +152 -0
- package/src/utils/rules/isMaxLength/index.ts +30 -0
- package/src/utils/rules/isMaxLength/locales.ts +6 -0
- package/src/utils/rules/isMaxLength/tests/isMaxLength.spec.ts +42 -0
- package/src/utils/rules/isMinLength/IsMinLength.mdx +68 -0
- package/src/utils/rules/isMinLength/IsMinLength.stories.ts +152 -0
- package/src/utils/rules/isMinLength/index.ts +30 -0
- package/src/utils/rules/isMinLength/locales.ts +6 -0
- package/src/utils/rules/isMinLength/tests/isMinLength.spec.ts +42 -0
- package/src/utils/rules/isNotAfterDate/IsNotAfterDate.mdx +68 -0
- package/src/utils/rules/isNotAfterDate/IsNotAfterDate.stories.ts +109 -0
- package/src/utils/rules/isNotAfterDate/index.ts +25 -0
- package/src/utils/rules/isNotAfterDate/locales.ts +6 -0
- package/src/utils/rules/isNotAfterDate/tests/isNotAfterDate.spec.ts +25 -0
- package/src/utils/rules/isNotAfterToday/IsNotAfterToday.mdx +83 -0
- package/src/utils/rules/isNotAfterToday/IsNotAfterToday.stories.ts +110 -0
- package/src/utils/rules/isNotAfterToday/index.ts +28 -0
- package/src/utils/rules/isNotAfterToday/locales.ts +5 -0
- package/src/utils/rules/isNotAfterToday/tests/isNotAfterToday.spec.ts +30 -0
- package/src/utils/rules/isNotBeforeDate/IsNotBeforeDate.mdx +68 -0
- package/src/utils/rules/isNotBeforeDate/IsNotBeforeDate.stories.ts +114 -0
- package/src/utils/rules/isNotBeforeDate/index.ts +25 -0
- package/src/utils/rules/isNotBeforeDate/locales.ts +6 -0
- package/src/utils/rules/isNotBeforeDate/tests/IsNotBeforeDate.spec.ts +25 -0
- package/src/utils/rules/isNotBeforeToday/IsNotBeforeToday.mdx +83 -0
- package/src/utils/rules/isNotBeforeToday/IsNotBeforeToday.stories.ts +110 -0
- package/src/utils/rules/isNotBeforeToday/index.ts +28 -0
- package/src/utils/rules/isNotBeforeToday/locales.ts +5 -0
- package/src/utils/rules/isNotBeforeToday/tests/notBeforeToday.spec.ts +36 -0
- package/src/utils/rules/isRequired/IsRequired.mdx +81 -0
- package/src/utils/rules/isRequired/IsRequired.stories.ts +101 -0
- package/src/utils/rules/{required → isRequired}/index.ts +3 -3
- package/src/utils/rules/{required/tests/index.spec.ts → isRequired/tests/isRequred.spec.ts} +9 -9
- package/src/utils/rules/isValidEmail/IsValidEmail.mdx +81 -0
- package/src/utils/rules/isValidEmail/IsValidEmail.stories.ts +101 -0
- package/src/utils/rules/{email → isValidEmail}/index.ts +3 -5
- package/src/utils/rules/{email/tests/email.spec.ts → isValidEmail/tests/isValidEmail.spec.ts} +5 -5
- package/dist/src/components/Amelipro/types/languages.d.ts +0 -6
- package/dist/src/utils/rules/email/index.d.ts +0 -4
- package/dist/src/utils/rules/exactLength/index.d.ts +0 -4
- package/dist/src/utils/rules/required/index.d.ts +0 -4
- package/dist/src/utils/rules/required/ruleMessageHelper.d.ts +0 -3
- package/src/components/Amelipro/types/languages.d.ts +0 -6
- package/src/components/Amelipro/types/types.d.ts +0 -65
- package/src/components/Customs/SyTextField/tests/__snapshots__/SyTextField.spec.ts.snap +0 -58
- package/src/utils/functions/isEmailValid/index.ts +0 -8
- package/src/utils/rules/required/ruleMessageHelper.ts +0 -14
- package/src/utils/rules/required/tests/rulesMessageHelper.spec.ts +0 -22
- /package/dist/src/{utils/functions/isEmailValid/tests/isEmailValid.spec.d.ts → components/NirField/tests/config.spec.d.ts} +0 -0
- /package/dist/src/{utils/rules/email/tests/email.spec.d.ts → components/Usages/tests/Usages.spec.d.ts} +0 -0
- /package/dist/src/{utils/rules/required/tests/index.spec.d.ts → composables/date/tests/useDateFormat.spec.d.ts} +0 -0
- /package/dist/src/{utils/rules/required/tests/rulesMessageHelper.spec.d.ts → composables/date/tests/useDateInitialization.spec.d.ts} +0 -0
- /package/dist/src/utils/functions/{isEmailValid → validation/isEmailValid}/index.d.ts +0 -0
- /package/dist/src/utils/rules/{exactLength → doMatchPattern}/locales.d.ts +0 -0
- /package/dist/src/utils/rules/{email → isDateValid}/locales.d.ts +0 -0
- /package/dist/src/utils/rules/{required → isNotAfterDate}/locales.d.ts +0 -0
- /package/src/components/NirField/{tests → examples}//342/200/257dataset/342/200/257.md" +0 -0
- /package/src/utils/functions/{isEmailValid → validation/isEmailValid}/tests/isEmailValid.spec.ts +0 -0
- /package/src/utils/rules/{exactLength → isExactLength}/locales.ts +0 -0
- /package/src/utils/rules/{required → isRequired}/locales.ts +0 -0
- /package/src/utils/rules/{email → isValidEmail}/locales.ts +0 -0
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
customSuccessRules?: ValidationRule[]
|
|
78
78
|
showSuccessMessages?: boolean
|
|
79
79
|
isValidateOnBlur?: boolean
|
|
80
|
+
disableErrorHandling?: boolean
|
|
80
81
|
}>(),
|
|
81
82
|
{
|
|
82
83
|
modelValue: undefined,
|
|
@@ -140,6 +141,7 @@
|
|
|
140
141
|
customSuccessRules: () => [],
|
|
141
142
|
showSuccessMessages: true,
|
|
142
143
|
isValidateOnBlur: true,
|
|
144
|
+
disableErrorHandling: false,
|
|
143
145
|
},
|
|
144
146
|
)
|
|
145
147
|
|
|
@@ -177,6 +179,7 @@
|
|
|
177
179
|
successRules: props.customSuccessRules,
|
|
178
180
|
showSuccessMessages: props.showSuccessMessages,
|
|
179
181
|
fieldIdentifier: props.label,
|
|
182
|
+
disableErrorHandling: props.disableErrorHandling,
|
|
180
183
|
})
|
|
181
184
|
|
|
182
185
|
// Synchronisation des messages externes
|
|
@@ -84,6 +84,10 @@ const meta = {
|
|
|
84
84
|
control: 'object',
|
|
85
85
|
description: 'Règles d\'avertissement',
|
|
86
86
|
},
|
|
87
|
+
disableErrorHandling: {
|
|
88
|
+
control: 'boolean',
|
|
89
|
+
description: 'Désactive la gestion des erreurs par le composant',
|
|
90
|
+
},
|
|
87
91
|
},
|
|
88
92
|
} as Meta<typeof DatePicker>
|
|
89
93
|
|
|
@@ -660,26 +664,31 @@ export const DifferentFormats: Story = {
|
|
|
660
664
|
v-model="value1"
|
|
661
665
|
placeholder="Format DD/MM/YYYY"
|
|
662
666
|
format="DD/MM/YYYY"
|
|
667
|
+
class="py-4"
|
|
663
668
|
/>
|
|
664
669
|
<DatePicker
|
|
665
670
|
v-model="value2"
|
|
666
671
|
placeholder="Format MM/DD/YYYY"
|
|
667
672
|
format="MM/DD/YYYY"
|
|
673
|
+
class="py-4"
|
|
668
674
|
/>
|
|
669
675
|
<DatePicker
|
|
670
676
|
v-model="value3"
|
|
671
677
|
placeholder="Format YYYY-MM-DD"
|
|
672
678
|
format="YYYY-MM-DD"
|
|
679
|
+
class="py-4"
|
|
673
680
|
/>
|
|
674
681
|
<DatePicker
|
|
675
682
|
v-model="value4"
|
|
676
683
|
placeholder="Format DD-MM-YY"
|
|
677
684
|
format="DD-MM-YY"
|
|
685
|
+
class="py-4"
|
|
678
686
|
/>
|
|
679
687
|
<DatePicker
|
|
680
688
|
v-model="value5"
|
|
681
689
|
placeholder="Format DD.MM.YYYY"
|
|
682
690
|
format="DD.MM.YYYY"
|
|
691
|
+
class="py-4"
|
|
683
692
|
/>
|
|
684
693
|
</div>
|
|
685
694
|
`,
|
|
@@ -853,8 +862,8 @@ export const NoCalendarCustomRules: Story = {
|
|
|
853
862
|
<DatePicker
|
|
854
863
|
v-model="date"
|
|
855
864
|
date-format-return="DD/MM/YYYY"
|
|
856
|
-
format="YYYY
|
|
857
|
-
placeholder="YYYY
|
|
865
|
+
format="DD/MM/YYYY"
|
|
866
|
+
placeholder="DD/MM/YYYY"
|
|
858
867
|
required
|
|
859
868
|
no-calendar
|
|
860
869
|
:custom-rules="[{
|
|
@@ -874,9 +883,9 @@ export const NoCalendarCustomRules: Story = {
|
|
|
874
883
|
},
|
|
875
884
|
args: {
|
|
876
885
|
noCalendar: true,
|
|
877
|
-
format: 'YYYY
|
|
886
|
+
format: 'DD/MM/YYYY',
|
|
878
887
|
dateFormatReturn: 'DD/MM/YYYY',
|
|
879
|
-
placeholder: 'YYYY
|
|
888
|
+
placeholder: 'DD/MM/YYYY',
|
|
880
889
|
required: true,
|
|
881
890
|
customRules: [{
|
|
882
891
|
type: 'custom',
|
|
@@ -889,7 +898,7 @@ export const NoCalendarCustomRules: Story = {
|
|
|
889
898
|
}],
|
|
890
899
|
},
|
|
891
900
|
render(args) {
|
|
892
|
-
const date = ref<string | null>('2024
|
|
901
|
+
const date = ref<string | null>('21/12/2024')
|
|
893
902
|
return {
|
|
894
903
|
components: { DatePicker },
|
|
895
904
|
setup() {
|
|
@@ -979,6 +988,79 @@ export const NoCalendarWarningRules: Story = {
|
|
|
979
988
|
},
|
|
980
989
|
}
|
|
981
990
|
|
|
991
|
+
export const WithErrorDisabled: Story = {
|
|
992
|
+
parameters: {
|
|
993
|
+
sourceCode: [
|
|
994
|
+
{
|
|
995
|
+
name: 'Template',
|
|
996
|
+
code: `
|
|
997
|
+
<template>
|
|
998
|
+
<DatePicker
|
|
999
|
+
v-model="date"
|
|
1000
|
+
placeholder="Sélectionner une date"
|
|
1001
|
+
format="DD/MM/YYYY"
|
|
1002
|
+
:required="true"
|
|
1003
|
+
:disableErrorHandling="true"
|
|
1004
|
+
/>
|
|
1005
|
+
</template>
|
|
1006
|
+
`,
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
name: 'Script',
|
|
1010
|
+
code: `
|
|
1011
|
+
<script setup lang="ts">
|
|
1012
|
+
import { ref } from 'vue'
|
|
1013
|
+
import { DatePicker } from '@cnamts/synapse'
|
|
1014
|
+
|
|
1015
|
+
const date = ref('')
|
|
1016
|
+
</script>
|
|
1017
|
+
`,
|
|
1018
|
+
},
|
|
1019
|
+
],
|
|
1020
|
+
},
|
|
1021
|
+
args: {
|
|
1022
|
+
placeholder: 'Date requise sans affichage d\'erreur',
|
|
1023
|
+
format: 'DD/MM/YYYY',
|
|
1024
|
+
isBirthDate: false,
|
|
1025
|
+
showWeekNumber: false,
|
|
1026
|
+
required: true,
|
|
1027
|
+
displayRange: false,
|
|
1028
|
+
displayIcon: true,
|
|
1029
|
+
displayAppendIcon: false,
|
|
1030
|
+
isDisabled: false,
|
|
1031
|
+
noIcon: false,
|
|
1032
|
+
noCalendar: false,
|
|
1033
|
+
disableErrorHandling: true,
|
|
1034
|
+
modelValue: '',
|
|
1035
|
+
},
|
|
1036
|
+
render: (args) => {
|
|
1037
|
+
return {
|
|
1038
|
+
components: { DatePicker: DatePicker },
|
|
1039
|
+
setup() {
|
|
1040
|
+
const value = ref('')
|
|
1041
|
+
return { args, value }
|
|
1042
|
+
},
|
|
1043
|
+
template: `
|
|
1044
|
+
<div class="d-flex flex-column pa-4">
|
|
1045
|
+
<div class="mb-5">
|
|
1046
|
+
<p class="mb-3">Ce champ est requis mais n'affiche pas de message d'erreur grâce à <code>disableErrorHandling</code>:</p>
|
|
1047
|
+
<DatePicker v-bind="args" v-model="value"/>
|
|
1048
|
+
</div>
|
|
1049
|
+
<div>
|
|
1050
|
+
<p class="mb-3">Comparaison avec un champ requis standard:</p>
|
|
1051
|
+
<DatePicker
|
|
1052
|
+
placeholder="Date requise avec erreur"
|
|
1053
|
+
format="DD/MM/YYYY"
|
|
1054
|
+
:required="true"
|
|
1055
|
+
v-model="value"
|
|
1056
|
+
/>
|
|
1057
|
+
</div>
|
|
1058
|
+
</div>
|
|
1059
|
+
`,
|
|
1060
|
+
}
|
|
1061
|
+
},
|
|
1062
|
+
}
|
|
1063
|
+
|
|
982
1064
|
export const NoCalendarWithAppendIcon: Story = {
|
|
983
1065
|
parameters: {
|
|
984
1066
|
sourceCode: [
|
|
@@ -1027,6 +1109,96 @@ export const NoCalendarWithAppendIcon: Story = {
|
|
|
1027
1109
|
},
|
|
1028
1110
|
}
|
|
1029
1111
|
|
|
1112
|
+
export const NoCalendarWithErrorDisabled: Story = {
|
|
1113
|
+
parameters: {
|
|
1114
|
+
sourceCode: [
|
|
1115
|
+
{
|
|
1116
|
+
name: 'Template',
|
|
1117
|
+
code: `
|
|
1118
|
+
<template>
|
|
1119
|
+
<div class="d-flex">
|
|
1120
|
+
<div class="mr-4" style="width: 300px;">
|
|
1121
|
+
<p class="mb-3">Avec <code>disableErrorHandling</code>:</p>
|
|
1122
|
+
<DatePicker
|
|
1123
|
+
v-model="date1"
|
|
1124
|
+
format="DD/MM/YYYY"
|
|
1125
|
+
placeholder="Date requise sans erreur"
|
|
1126
|
+
required
|
|
1127
|
+
no-icon
|
|
1128
|
+
no-calendar
|
|
1129
|
+
:disableErrorHandling="true"
|
|
1130
|
+
/>
|
|
1131
|
+
</div>
|
|
1132
|
+
<div style="width: 300px;">
|
|
1133
|
+
<p class="mb-3">Sans <code>disableErrorHandling</code>:</p>
|
|
1134
|
+
<DatePicker
|
|
1135
|
+
v-model="date2"
|
|
1136
|
+
format="DD/MM/YYYY"
|
|
1137
|
+
placeholder="Date requise avec erreur"
|
|
1138
|
+
required
|
|
1139
|
+
no-icon
|
|
1140
|
+
no-calendar
|
|
1141
|
+
/>
|
|
1142
|
+
</div>
|
|
1143
|
+
</div>
|
|
1144
|
+
</template>
|
|
1145
|
+
`,
|
|
1146
|
+
},
|
|
1147
|
+
],
|
|
1148
|
+
},
|
|
1149
|
+
args: {
|
|
1150
|
+
noCalendar: true,
|
|
1151
|
+
format: 'DD/MM/YYYY',
|
|
1152
|
+
dateFormatReturn: 'YYYY/MM/DD',
|
|
1153
|
+
placeholder: 'Date requise sans erreur',
|
|
1154
|
+
required: true,
|
|
1155
|
+
noIcon: true,
|
|
1156
|
+
disableErrorHandling: true,
|
|
1157
|
+
},
|
|
1158
|
+
render(args) {
|
|
1159
|
+
const date1 = ref<string | null>(null)
|
|
1160
|
+
const date2 = ref<string | null>(null)
|
|
1161
|
+
return {
|
|
1162
|
+
components: { DatePicker },
|
|
1163
|
+
setup() {
|
|
1164
|
+
return { args, date1, date2 }
|
|
1165
|
+
},
|
|
1166
|
+
template: `
|
|
1167
|
+
<div style="padding: 20px;">
|
|
1168
|
+
<h4 class="mb-4">DateTextInput avec désactivation des erreurs</h4>
|
|
1169
|
+
<div class="d-flex mb-4">
|
|
1170
|
+
<div class="mr-4" style="width: 300px;">
|
|
1171
|
+
<p class="mb-3">Avec <code>disableErrorHandling</code>:</p>
|
|
1172
|
+
<DatePicker
|
|
1173
|
+
v-model="date1"
|
|
1174
|
+
v-bind="args"
|
|
1175
|
+
/>
|
|
1176
|
+
<div style="margin-top: 10px; font-family: monospace; color: #666;">
|
|
1177
|
+
Valeur : {{ date1 }}
|
|
1178
|
+
</div>
|
|
1179
|
+
</div>
|
|
1180
|
+
|
|
1181
|
+
<div style="width: 300px;">
|
|
1182
|
+
<p class="mb-3">Sans <code>disableErrorHandling</code>:</p>
|
|
1183
|
+
<DatePicker
|
|
1184
|
+
v-model="date2"
|
|
1185
|
+
format="DD/MM/YYYY"
|
|
1186
|
+
placeholder="Date requise avec erreur"
|
|
1187
|
+
required
|
|
1188
|
+
no-icon
|
|
1189
|
+
no-calendar
|
|
1190
|
+
/>
|
|
1191
|
+
<div style="margin-top: 10px; font-family: monospace; color: #666;">
|
|
1192
|
+
Valeur : {{ date2 }}
|
|
1193
|
+
</div>
|
|
1194
|
+
</div>
|
|
1195
|
+
</div>
|
|
1196
|
+
</div>
|
|
1197
|
+
`,
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1030
1202
|
export const WithFormSubmission: Story = {
|
|
1031
1203
|
parameters: {
|
|
1032
1204
|
sourceCode: [
|