@cnamts/synapse 1.1.0 → 1.1.1
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/{AutocompleteFilter-DXd4szWO.js → AutocompleteFilter-CGF33skz.js} +1 -1
- package/dist/{DateFilter-BD59Kgwf.js → DateFilter-D7-MsKtx.js} +1 -1
- package/dist/{NumberFilter-BSMZE7uw.js → NumberFilter-bjQPPfsj.js} +1 -1
- package/dist/{PeriodFilter-keUdSSk0.js → PeriodFilter-B3wJpK8-.js} +1 -1
- package/dist/{SelectFilter-Dhvvwazl.js → SelectFilter-BN6DbKAV.js} +1 -1
- package/dist/{TextFilter-CU8FpXz0.js → TextFilter-BffP0J2f.js} +1 -1
- package/dist/{apLightTheme2026-DbS7BPUf.js → apLightTheme2026-C4ygwMHC.js} +11 -11
- package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +6 -6
- package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +6 -6
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +6 -6
- package/dist/components/Captcha/Captcha.d.ts +27 -16
- package/dist/components/Captcha/CaptchaForm.d.ts +29 -3
- package/dist/components/Captcha/types.d.ts +14 -0
- package/dist/components/Captcha/useCaptchaValidation.d.ts +37 -0
- package/dist/components/Customs/Selects/SelectBtnField/SelectBtnField.d.ts +33 -13
- package/dist/components/Customs/Selects/SelectBtnField/composables/useSelectBtnFieldValidation.d.ts +23 -0
- package/dist/components/Customs/Selects/SyAutocomplete/composables/useSyAutocompleteValidation.d.ts +2 -2
- package/dist/components/Customs/Selects/SySelect/composables/useSySelectValidation.d.ts +2 -2
- package/dist/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.d.ts +17 -48
- package/dist/components/Customs/SyCheckBoxGroup/composables/useSyCheckBoxGroupValidation.d.ts +29 -0
- package/dist/components/Customs/SyCheckBoxGroup/types.d.ts +46 -0
- package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +16 -51
- package/dist/components/Customs/SyCheckbox/composables/useSyCheckboxValidation.d.ts +27 -0
- package/dist/components/Customs/SyCheckbox/types.d.ts +49 -0
- package/dist/components/Customs/SyTextField/FieldState.d.ts +5 -0
- package/dist/components/Customs/SyTextField/useSyTextFieldValidation.d.ts +3 -3
- package/dist/components/DialogBox/DialogBox.d.ts +2 -0
- package/dist/components/DialogBox/locales.d.ts +1 -0
- package/dist/components/FilterSideBar/FilterSideBar.d.ts +4 -0
- package/dist/components/LunarCalendar/LunarCalendar.d.ts +43 -14
- package/dist/components/LunarCalendar/types.d.ts +35 -0
- package/dist/components/LunarCalendar/useLunarCalendarValidation.d.ts +11 -12
- package/dist/components/MonthPicker/MonthPicker.d.ts +72 -1747
- package/dist/components/MonthPicker/MonthPickerText/MonthPickerInput.d.ts +21 -1733
- package/dist/components/MonthPicker/MonthPickerText/useTextField.d.ts +5 -0
- package/dist/components/MonthPicker/locales.d.ts +1 -0
- package/dist/components/MonthPicker/types.d.ts +11 -0
- package/dist/components/MonthPicker/useMonthPickerValidation.d.ts +37 -24
- package/dist/components/NirField/NirField.d.ts +6 -4
- package/dist/components/NirField/useNirValidation.d.ts +7 -5
- package/dist/components/PageContainer/PageContainer.d.ts +8 -0
- package/dist/components/PasswordField/PasswordField.d.ts +2 -2
- package/dist/components/PasswordField/usePasswordFieldValidation.d.ts +2 -2
- package/dist/components/PhoneField/PhoneField.d.ts +960 -1938
- package/dist/components/PhoneField/indicatifs.d.ts +715 -8
- package/dist/components/PhoneField/locales.d.ts +7 -0
- package/dist/components/PhoneField/types.d.ts +29 -0
- package/dist/components/PhoneField/usePhoneFieldValidation.d.ts +45 -0
- package/dist/components/PhoneField/usePhoneIndicatifs.d.ts +947 -0
- package/dist/components/SyTextArea/composables/useSyTextAreaValidation.d.ts +2 -2
- package/dist/composables/unifyValidation/documentationValidationProps.d.ts +1 -1
- package/dist/composables/unifyValidation/useValidation.d.ts +4 -5
- package/dist/design-system-v3.js +2 -2
- package/dist/designTokens/tokens/amelipro/apLightTheme.d.ts +10 -10
- package/dist/designTokens/tokens/baseTokens.d.ts +18 -18
- package/dist/designTokens/tokens/cnam/cnamLightTheme.d.ts +10 -10
- package/dist/designTokens/tokens/pa/paLightTheme.d.ts +10 -10
- package/dist/designTokens/tokens/semanticTokens.d.ts +14 -14
- package/dist/{main-D8ryUoS5.js → main-C4wAktOs.js} +13718 -12991
- package/dist/synapse.css +1 -1
- package/dist/vuetifyConfig.js +1 -1
- package/package.json +7 -7
- package/src/assets/compat/_legacy-tokens.scss +91 -0
- package/src/assets/overrides/_utilities.scss +23 -0
- package/src/components/Accordion/Accordion.stories.ts +121 -1
- package/src/components/BackBtn/BackBtn.mdx +1 -1
- package/src/components/BackToTopBtn/BackToTopBtn.mdx +0 -1
- package/src/components/Captcha/Captcha.stories.ts +134 -31
- package/src/components/Captcha/Captcha.vue +95 -28
- package/src/components/Captcha/CaptchaForm.vue +51 -22
- package/src/components/Captcha/tests/Captcha.focus.spec.ts +214 -0
- package/src/components/Captcha/tests/Captcha.spec.ts +233 -24
- package/src/components/Captcha/tests/CaptchaForm.spec.ts +82 -0
- package/src/components/Captcha/tests/__snapshots__/Captcha.spec.ts.snap +16 -42
- package/src/components/Captcha/types.ts +15 -0
- package/src/components/Captcha/useCaptchaValidation.ts +87 -0
- package/src/components/Captcha/validation/validation.stories.ts +1194 -0
- package/src/components/ChipList/ChipList.mdx +0 -1
- package/src/components/CollapsibleList/CollapsibleList.mdx +0 -1
- package/src/components/CookieBanner/CookieBanner.mdx +0 -1
- package/src/components/CopyBtn/CopyBtn.mdx +0 -1
- package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.stories.ts +123 -439
- package/src/components/Customs/Selects/SelectBtnField/SelectBtnField.vue +147 -41
- package/src/components/Customs/Selects/SelectBtnField/Validation/Validation.stories.ts +600 -0
- package/src/components/Customs/Selects/SelectBtnField/composables/useSelectBtnFieldValidation.ts +87 -0
- package/src/components/Customs/Selects/SelectBtnField/tests/SelectBtnField.spec.ts +402 -33
- package/src/components/Customs/Selects/SelectBtnField/tests/__snapshots__/SelectBtnField.spec.ts.snap +52 -38
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.stories.ts +342 -162
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.vue +77 -129
- package/src/components/Customs/SyCheckBoxGroup/Validation/Validation.stories.ts +1008 -0
- package/src/components/Customs/SyCheckBoxGroup/composables/useSyCheckBoxGroupValidation.ts +107 -0
- package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.spec.ts +180 -7
- package/src/components/Customs/SyCheckBoxGroup/types.ts +49 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.stories.ts +41 -161
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +71 -148
- package/src/components/Customs/SyCheckbox/Validation/Validation.stories.ts +654 -0
- package/src/components/Customs/SyCheckbox/composables/useSyCheckboxValidation.ts +105 -0
- package/src/components/Customs/SyCheckbox/tests/SyCheckbox.spec.ts +106 -0
- package/src/components/Customs/SyCheckbox/tests/useSyCheckboxValidation.spec.ts +98 -0
- package/src/components/Customs/SyCheckbox/types.ts +51 -0
- package/src/components/Customs/SyTextField/FieldState.vue +50 -0
- package/src/components/Customs/SyTextField/SyTextField.vue +12 -9
- package/src/components/Customs/SyTextField/useSyTextFieldValidation.ts +2 -11
- package/src/components/DataList/DataList.mdx +0 -1
- package/src/components/DataListGroup/DataListGroup.mdx +0 -1
- package/src/components/DiacriticPicker/DiacriticPicker.mdx +0 -1
- package/src/components/DialogBox/DialogBox.mdx +0 -1
- package/src/components/DialogBox/DialogBox.stories.ts +399 -4
- package/src/components/DialogBox/DialogBox.vue +20 -0
- package/src/components/DialogBox/locales.ts +1 -0
- package/src/components/DialogBox/tests/DialogBox.spec.ts +73 -0
- package/src/components/DialogBox/tests/DialogBox.visual.cy.ts +24 -0
- package/src/components/ErrorPage/ErrorPage.mdx +1 -1
- package/src/components/ExternalLinks/ExternalLinks.mdx +0 -1
- package/src/components/FileList/FileList.mdx +0 -1
- package/src/components/FilterInline/FilterInline.mdx +0 -1
- package/src/components/FilterSideBar/FilterSideBar.mdx +8 -1
- package/src/components/FilterSideBar/FilterSideBar.stories.ts +133 -1
- package/src/components/FilterSideBar/FilterSideBar.vue +19 -2
- package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +55 -0
- package/src/components/FooterBar/FooterBar.mdx +0 -1
- package/src/components/FranceConnectBtn/FranceConnectBtn.mdx +0 -1
- package/src/components/HeaderBar/HeaderBar.mdx +0 -1
- package/src/components/HeaderLoading/HeaderLoading.mdx +0 -1
- package/src/components/LangBtn/LangBtn.mdx +0 -1
- package/src/components/Logo/Logo.mdx +1 -1
- package/src/components/LunarCalendar/LunarCalendar.mdx +6 -9
- package/src/components/LunarCalendar/LunarCalendar.stories.ts +243 -46
- package/src/components/LunarCalendar/LunarCalendar.vue +61 -26
- package/src/components/LunarCalendar/Validation/Validation.stories.ts +717 -0
- package/src/components/LunarCalendar/tests/LunarCalendar.a11y.spec.ts +1 -1
- package/src/components/LunarCalendar/tests/LunarCalendar.spec.ts +197 -6
- package/src/components/LunarCalendar/tests/useLunarCalendarValidation.spec.ts +287 -0
- package/src/components/LunarCalendar/types.ts +39 -0
- package/src/components/LunarCalendar/useLunarCalendarValidation.ts +115 -39
- package/src/components/MonthPicker/MonthPicker.stories.ts +38 -281
- package/src/components/MonthPicker/MonthPicker.vue +66 -17
- package/src/components/MonthPicker/MonthPickerText/MonthPickerInput.vue +44 -20
- package/src/components/MonthPicker/MonthPickerText/useTextField.ts +5 -0
- package/src/components/MonthPicker/Validation/Validation.stories.ts +1117 -0
- package/src/components/MonthPicker/locales.ts +1 -0
- package/src/components/MonthPicker/tests/MonthPicker.spec.ts +353 -2
- package/src/components/MonthPicker/tests/__snapshots__/MonthPicker.spec.ts.snap +12 -8
- package/src/components/MonthPicker/types.ts +16 -0
- package/src/components/MonthPicker/useMonthPickerValidation.ts +64 -27
- package/src/components/NirField/NirField.mdx +120 -66
- package/src/components/NirField/NirField.stories.ts +216 -0
- package/src/components/NirField/useNirValidation.ts +16 -17
- package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +263 -245
- package/src/components/NotificationBar/NotificationBar.mdx +0 -1
- package/src/components/PageContainer/PageContainer.mdx +0 -1
- package/src/components/PageContainer/PageContainer.stories.ts +170 -2
- package/src/components/PageContainer/PageContainer.vue +63 -8
- package/src/components/PageContainer/tests/__snapshots__/PageContainer.spec.ts.snap +19 -11
- package/src/components/PaginatedTable/PaginatedTable.mdx +0 -1
- package/src/components/PeriodField/PeriodField.mdx +0 -1
- package/src/components/PhoneField/PhoneField.mdx +2 -3
- package/src/components/PhoneField/PhoneField.stories.ts +227 -410
- package/src/components/PhoneField/PhoneField.vue +204 -438
- package/src/components/PhoneField/indicatifs.ts +1 -1
- package/src/components/PhoneField/locales.ts +7 -0
- package/src/components/PhoneField/tests/PhoneField.a11y.spec.ts +0 -1
- package/src/components/PhoneField/tests/PhoneField.spec.ts +517 -220
- package/src/components/PhoneField/types.ts +30 -0
- package/src/components/PhoneField/usePhoneFieldValidation.ts +119 -0
- package/src/components/PhoneField/usePhoneIndicatifs.ts +89 -0
- package/src/components/PhoneField/validation/validation.stories.ts +717 -0
- package/src/components/RangeField/RangeField.mdx +0 -1
- package/src/components/RatingPicker/RatingPicker.mdx +0 -1
- package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +0 -1
- package/src/components/StatusPage/StatusPage.vue +1 -0
- package/src/components/StatusPage/tests/__snapshots__/StatusPage.spec.ts.snap +248 -230
- package/src/components/SubHeader/SubHeader.mdx +5 -6
- package/src/components/Tables/common/tests/SyTableFilter.spec.ts +11 -12
- package/src/components/UploadWorkflow/UploadWorkflow.mdx +0 -1
- package/src/components/UserMenuBtn/UserMenuBtn.mdx +0 -1
- package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +177 -0
- package/src/composables/unifyValidation/documentationValidationProps.ts +1 -1
- package/src/composables/unifyValidation/tests/useValidation.spec.ts +13 -1
- package/src/composables/unifyValidation/useValidation.ts +37 -33
- package/src/composantsVuetify/VCard/VCard.mdx +4 -0
- package/src/composantsVuetify/VCard/v-card.stories.ts +93 -1
- package/src/composantsVuetify/VCarousel/VCarousel.mdx +74 -0
- package/src/composantsVuetify/VCarousel/v-carousel.stories.ts +531 -0
- package/src/composantsVuetify/VNavigationDrawer/VNavgationDrawer.mdx +53 -0
- package/src/composantsVuetify/VNavigationDrawer/v-navigation-drawer.stories.ts +310 -0
- package/src/composantsVuetify/VSlideGroup/VSlideGroup.mdx +105 -0
- package/src/composantsVuetify/VSlideGroup/v-slide-group.stories.ts +463 -0
- package/src/designTokens/tokens/baseColors.ts +1 -1
- package/src/designTokens/tokens/baseTokens.ts +18 -18
- package/src/stories/Components/Components.stories.ts +34 -1
- package/src/stories/Demarrer/Releases.stories.ts +16 -2
- package/src/stories/DesignTokens/Arrondis.mdx +1 -1
- package/src/stories/DesignTokens/Correspondances.mdx +219 -0
- package/src/stories/DesignTokens/UtiliserLesTokens.mdx +235 -0
- package/src/stories/DesignTokens/colors.stories.ts +569 -569
- package/src/stories/GuideDuDev/Amelipro.stories.ts +335 -267
- package/dist/components/LunarCalendar/useLunarCalendarRules.d.ts +0 -5
- package/dist/components/PhoneField/tests/types.d.ts +0 -18
- package/src/components/LunarCalendar/tests/useLunarCalendarRules.spec.ts +0 -184
- package/src/components/LunarCalendar/useLunarCalendarRules.ts +0 -96
- package/src/components/PhoneField/tests/types.d.ts +0 -19
|
@@ -4,13 +4,39 @@ interface Props {
|
|
|
4
4
|
modelValue?: string | null;
|
|
5
5
|
state?: string | null;
|
|
6
6
|
loading?: boolean;
|
|
7
|
-
errors: string[] | undefined;
|
|
8
|
-
success: boolean;
|
|
9
7
|
locales: typeof defaultLocales;
|
|
8
|
+
success?: boolean;
|
|
9
|
+
errorMessages?: string[];
|
|
10
|
+
warningMessages?: string[];
|
|
11
|
+
successMessages?: string[];
|
|
12
|
+
hasError?: boolean;
|
|
13
|
+
hasWarning?: boolean;
|
|
14
|
+
hasSuccess?: boolean;
|
|
15
|
+
showSuccessMessages?: boolean;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
maxErrors?: number;
|
|
18
|
+
isClearable?: boolean;
|
|
10
19
|
}
|
|
11
20
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
21
|
+
blur: (...args: any[]) => void;
|
|
22
|
+
focus: (...args: any[]) => void;
|
|
12
23
|
"update:modelValue": (...args: any[]) => void;
|
|
13
24
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
25
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
26
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
14
27
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
15
|
-
}>, {
|
|
28
|
+
}>, {
|
|
29
|
+
loading: boolean;
|
|
30
|
+
state: string | null;
|
|
31
|
+
modelValue: string | null;
|
|
32
|
+
required: boolean;
|
|
33
|
+
showSuccessMessages: boolean;
|
|
34
|
+
errorMessages: string[];
|
|
35
|
+
maxErrors: number;
|
|
36
|
+
hasError: boolean;
|
|
37
|
+
hasWarning: boolean;
|
|
38
|
+
hasSuccess: boolean;
|
|
39
|
+
successMessages: string[];
|
|
40
|
+
warningMessages: string[];
|
|
41
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
42
|
export default _default;
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
+
import { FieldValidationProps } from '../../composables/unifyValidation/useValidation';
|
|
2
|
+
import { locales as defaultLocales } from './locales';
|
|
1
3
|
export type CaptchaType = 'image' | 'audio' | 'choice';
|
|
2
4
|
export type StateType = 'idle' | 'pending' | 'resolved' | 'rejected';
|
|
5
|
+
export type CaptchaProps = FieldValidationProps & {
|
|
6
|
+
modelValue?: string | undefined;
|
|
7
|
+
urlCreate: string;
|
|
8
|
+
urlGetImage: string;
|
|
9
|
+
urlGetAudio: string;
|
|
10
|
+
type?: CaptchaType;
|
|
11
|
+
tagTitle?: string;
|
|
12
|
+
helpDesk?: string | false;
|
|
13
|
+
isClearable?: boolean;
|
|
14
|
+
locale?: string;
|
|
15
|
+
locales?: typeof defaultLocales;
|
|
16
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { VuetifyValidationRule } from '../../composables/unifyValidation/useValidation';
|
|
3
|
+
import { ValidationRule as SyValidationRule } from '../../composables/validation/useValidation';
|
|
4
|
+
import { locales as defaultLocales } from './locales';
|
|
5
|
+
export declare function useCaptchaValidation(params: {
|
|
6
|
+
modelValue: Ref<string | null>;
|
|
7
|
+
readonly: Ref<boolean>;
|
|
8
|
+
disabled: Ref<boolean>;
|
|
9
|
+
required: Ref<boolean>;
|
|
10
|
+
isValidateOnBlur: Ref<boolean>;
|
|
11
|
+
showSuccessMessages: Ref<boolean>;
|
|
12
|
+
disableErrorHandling: Ref<boolean>;
|
|
13
|
+
useVuetifyValidation: Ref<boolean>;
|
|
14
|
+
label: Ref<string>;
|
|
15
|
+
rules: Ref<VuetifyValidationRule[] | undefined>;
|
|
16
|
+
customRules: Ref<SyValidationRule[] | undefined>;
|
|
17
|
+
customWarningRules: Ref<SyValidationRule[] | undefined>;
|
|
18
|
+
customSuccessRules: Ref<SyValidationRule[] | undefined>;
|
|
19
|
+
errorMessages: Ref<string[] | undefined | null>;
|
|
20
|
+
warningMessages: Ref<string[] | undefined | null>;
|
|
21
|
+
successMessages: Ref<string[] | undefined | null>;
|
|
22
|
+
hasErrorProp: Ref<boolean>;
|
|
23
|
+
hasWarningProp: Ref<boolean>;
|
|
24
|
+
hasSuccessProp: Ref<boolean>;
|
|
25
|
+
maxErrors: Ref<number | undefined>;
|
|
26
|
+
focused: Ref<boolean>;
|
|
27
|
+
locales: Ref<typeof defaultLocales>;
|
|
28
|
+
}): {
|
|
29
|
+
validate: () => Promise<boolean>;
|
|
30
|
+
clearValidation: () => void;
|
|
31
|
+
errors: import('vue').ComputedRef<string[]>;
|
|
32
|
+
warnings: import('vue').ComputedRef<string[]>;
|
|
33
|
+
successes: import('vue').ComputedRef<string[]>;
|
|
34
|
+
hasError: import('vue').ComputedRef<boolean>;
|
|
35
|
+
hasWarning: import('vue').ComputedRef<boolean>;
|
|
36
|
+
hasSuccess: import('vue').ComputedRef<boolean>;
|
|
37
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FieldValidationProps } from '../../../../composables/unifyValidation/useValidation';
|
|
1
2
|
import { SelectBtnItem, SelectBtnValue } from './types';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
modelValue?: SelectBtnValue;
|
|
@@ -6,30 +7,49 @@ type __VLS_Props = {
|
|
|
6
7
|
ariaLabelledby?: string | undefined;
|
|
7
8
|
multiple?: boolean;
|
|
8
9
|
inline?: boolean;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
helpText?: string;
|
|
11
|
+
hideDetails?: boolean;
|
|
12
|
+
} & FieldValidationProps;
|
|
13
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
14
|
+
validateOnSubmit: () => Promise<boolean>;
|
|
15
|
+
validate: () => Promise<boolean>;
|
|
16
|
+
clearValidation: () => void;
|
|
17
|
+
errors: import('vue').ComputedRef<string[]>;
|
|
18
|
+
warnings: import('vue').ComputedRef<string[]>;
|
|
19
|
+
successes: import('vue').ComputedRef<string[]>;
|
|
20
|
+
hasError: import('vue').ComputedRef<boolean>;
|
|
21
|
+
hasWarning: import('vue').ComputedRef<boolean>;
|
|
22
|
+
hasSuccess: import('vue').ComputedRef<boolean>;
|
|
23
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
15
24
|
"update:modelValue": (value: SelectBtnValue) => any;
|
|
16
|
-
"update:error": (value: boolean) => any;
|
|
17
|
-
"update:error-messages": (value: string[] | undefined) => any;
|
|
18
25
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
26
|
"onUpdate:modelValue"?: ((value: SelectBtnValue) => any) | undefined;
|
|
20
|
-
"onUpdate:error"?: ((value: boolean) => any) | undefined;
|
|
21
|
-
"onUpdate:error-messages"?: ((value: string[] | undefined) => any) | undefined;
|
|
22
27
|
}>, {
|
|
23
28
|
label: string;
|
|
29
|
+
disabled: boolean;
|
|
24
30
|
readonly: boolean;
|
|
25
|
-
error: boolean;
|
|
26
31
|
items: SelectBtnItem[];
|
|
27
32
|
modelValue: SelectBtnValue;
|
|
28
33
|
multiple: boolean;
|
|
34
|
+
required: boolean;
|
|
29
35
|
ariaLabelledby: string;
|
|
30
36
|
inline: boolean;
|
|
31
|
-
|
|
32
|
-
|
|
37
|
+
showSuccessMessages: boolean;
|
|
38
|
+
disableErrorHandling: boolean;
|
|
39
|
+
errorMessages: string[] | null;
|
|
40
|
+
maxErrors: number;
|
|
41
|
+
hasError: boolean;
|
|
42
|
+
hasWarning: boolean;
|
|
43
|
+
hasSuccess: boolean;
|
|
44
|
+
useVuetifyValidation: boolean;
|
|
45
|
+
customRules: import('../../../../composables/unifyValidation/useValidation').ValidationRule[];
|
|
46
|
+
customWarningRules: import('../../../../composables/unifyValidation/useValidation').ValidationRule[];
|
|
47
|
+
customSuccessRules: import('../../../../composables/unifyValidation/useValidation').ValidationRule[];
|
|
48
|
+
helpText: string;
|
|
49
|
+
hideDetails: boolean;
|
|
50
|
+
isValidateOnBlur: boolean;
|
|
51
|
+
successMessages: string[] | null;
|
|
52
|
+
warningMessages: string[] | null;
|
|
33
53
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
34
54
|
listRef: HTMLUListElement;
|
|
35
55
|
optionsRef: HTMLLIElement[];
|
package/dist/components/Customs/Selects/SelectBtnField/composables/useSelectBtnFieldValidation.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FieldValidationProps } from '../../../../../composables/unifyValidation/useValidation';
|
|
2
|
+
/**
|
|
3
|
+
* Composable de validation dédié au composant SelectBtnField.
|
|
4
|
+
* - règle `required` par défaut avec message personnalisé,
|
|
5
|
+
* - support des customRules / customWarningRules / customSuccessRules,
|
|
6
|
+
* - messages externes (errorMessages / warningMessages / successMessages),
|
|
7
|
+
* - validation immédiate à la sélection (isValidateOnBlur à `false` par défaut, comme un groupe de boutons),
|
|
8
|
+
* - intégration automatique au SyForm via le useValidatable interne à useValidation.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useSelectBtnFieldValidation(props: FieldValidationProps & {
|
|
11
|
+
modelValue?: unknown;
|
|
12
|
+
}): {
|
|
13
|
+
focused: import('vue').Ref<boolean, boolean>;
|
|
14
|
+
validate: () => Promise<boolean>;
|
|
15
|
+
clearValidation: () => void;
|
|
16
|
+
errors: import('vue').ComputedRef<string[]>;
|
|
17
|
+
warnings: import('vue').ComputedRef<string[]>;
|
|
18
|
+
successes: import('vue').ComputedRef<string[]>;
|
|
19
|
+
hasError: import('vue').ComputedRef<boolean>;
|
|
20
|
+
hasWarning: import('vue').ComputedRef<boolean>;
|
|
21
|
+
hasSuccess: import('vue').ComputedRef<boolean>;
|
|
22
|
+
validationIcon: import('vue').ComputedRef<string | null>;
|
|
23
|
+
};
|
package/dist/components/Customs/Selects/SyAutocomplete/composables/useSyAutocompleteValidation.d.ts
CHANGED
|
@@ -11,8 +11,8 @@ export declare function useSyAutocompleteValidation(props: FieldValidationProps)
|
|
|
11
11
|
displayErrors: import('vue').ComputedRef<string[]>;
|
|
12
12
|
displayWarnings: import('vue').ComputedRef<string[]>;
|
|
13
13
|
displaySuccesses: import('vue').ComputedRef<string[]>;
|
|
14
|
-
displayHasError: import('vue').ComputedRef<boolean
|
|
15
|
-
displayHasWarning: import('vue').ComputedRef<boolean
|
|
14
|
+
displayHasError: import('vue').ComputedRef<boolean>;
|
|
15
|
+
displayHasWarning: import('vue').ComputedRef<boolean>;
|
|
16
16
|
displayHasSuccess: import('vue').ComputedRef<boolean>;
|
|
17
17
|
validationIcon: import('vue').ComputedRef<string | null>;
|
|
18
18
|
};
|
|
@@ -8,8 +8,8 @@ export declare function useSySelectValidation(props: FieldValidationProps & {
|
|
|
8
8
|
errors: import('vue').ComputedRef<string[]>;
|
|
9
9
|
warnings: import('vue').ComputedRef<string[]>;
|
|
10
10
|
successes: import('vue').ComputedRef<string[]>;
|
|
11
|
-
hasError: import('vue').ComputedRef<boolean
|
|
12
|
-
hasWarning: import('vue').ComputedRef<boolean
|
|
11
|
+
hasError: import('vue').ComputedRef<boolean>;
|
|
12
|
+
hasWarning: import('vue').ComputedRef<boolean>;
|
|
13
13
|
hasSuccess: import('vue').ComputedRef<boolean>;
|
|
14
14
|
validationIcon: import('vue').ComputedRef<string | null>;
|
|
15
15
|
};
|
|
@@ -1,51 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
type __VLS_Props = {
|
|
4
|
-
ariaLabel?: string;
|
|
5
|
-
ariaLabelledby?: string;
|
|
6
|
-
color?: string;
|
|
7
|
-
customRules?: ValidationRule[];
|
|
8
|
-
customSuccessRules?: ValidationRule[];
|
|
9
|
-
customWarningRules?: ValidationRule[];
|
|
10
|
-
density?: 'default' | 'comfortable' | 'compact';
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
disableErrorHandling?: boolean;
|
|
13
|
-
displayAsterisk?: boolean;
|
|
14
|
-
errorMessages?: string[] | null;
|
|
15
|
-
hideDetails?: boolean | 'auto';
|
|
16
|
-
id?: string;
|
|
17
|
-
isValidateOnBlur?: boolean;
|
|
18
|
-
label?: string;
|
|
19
|
-
modelValue?: (string | number) | (string | number)[] | null;
|
|
20
|
-
multiple?: boolean;
|
|
21
|
-
name?: string;
|
|
22
|
-
options?: Option[];
|
|
23
|
-
readonly?: boolean;
|
|
24
|
-
required?: boolean;
|
|
25
|
-
showSuccessMessages?: boolean;
|
|
26
|
-
successMessages?: string[] | null;
|
|
27
|
-
title?: string;
|
|
28
|
-
warningMessages?: string[] | null;
|
|
29
|
-
};
|
|
30
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
31
|
-
validation: {
|
|
32
|
-
errors: import('vue').Ref<string[], string[]>;
|
|
33
|
-
warnings: import('vue').Ref<string[], string[]>;
|
|
34
|
-
successes: import('vue').Ref<string[], string[]>;
|
|
35
|
-
displaySuccesses: import('vue').ComputedRef<string[]>;
|
|
36
|
-
hasError: import('vue').ComputedRef<boolean>;
|
|
37
|
-
hasWarning: import('vue').ComputedRef<boolean>;
|
|
38
|
-
hasSuccess: import('vue').ComputedRef<boolean>;
|
|
39
|
-
validateField: (value: unknown, rules?: ValidationRule[], warningRules?: ValidationRule[], successRules?: ValidationRule[]) => import('../../../composables/validation/useValidation').ValidationResult | Promise<import('../../../composables/validation/useValidation').ValidationResult>;
|
|
40
|
-
validateOnSubmit: () => boolean;
|
|
41
|
-
clearValidation: () => void;
|
|
42
|
-
};
|
|
1
|
+
import { SyCheckBoxGroupProps } from './types';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<SyCheckBoxGroupProps, {
|
|
43
3
|
validateOnSubmit: () => Promise<boolean>;
|
|
44
|
-
|
|
4
|
+
clearValidation: () => void;
|
|
5
|
+
reset: () => void;
|
|
6
|
+
defaultRules: import('vue').ComputedRef<import('../../../composables/unifyValidation/useValidation').ValidationRule[]>;
|
|
7
|
+
checkErrorOnBlur: () => Promise<boolean>;
|
|
45
8
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
46
9
|
change: (...args: any[]) => void;
|
|
47
10
|
"update:modelValue": (...args: any[]) => void;
|
|
48
|
-
}, string, import('vue').PublicProps, Readonly<
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<SyCheckBoxGroupProps> & Readonly<{
|
|
49
12
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
50
13
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
51
14
|
}>, {
|
|
@@ -58,7 +21,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
58
21
|
readonly: boolean;
|
|
59
22
|
id: string;
|
|
60
23
|
name: string;
|
|
61
|
-
options: Option[];
|
|
24
|
+
options: import('./types').Option[];
|
|
62
25
|
modelValue: (string | number) | (string | number)[] | null;
|
|
63
26
|
multiple: boolean;
|
|
64
27
|
required: boolean;
|
|
@@ -66,10 +29,16 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
66
29
|
showSuccessMessages: boolean;
|
|
67
30
|
disableErrorHandling: boolean;
|
|
68
31
|
errorMessages: string[] | null;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
32
|
+
maxErrors: number;
|
|
33
|
+
hasError: boolean;
|
|
34
|
+
hasWarning: boolean;
|
|
35
|
+
hasSuccess: boolean;
|
|
36
|
+
useVuetifyValidation: boolean;
|
|
37
|
+
customRules: import('../../../composables/unifyValidation/useValidation').ValidationRule[];
|
|
38
|
+
customWarningRules: import('../../../composables/unifyValidation/useValidation').ValidationRule[];
|
|
39
|
+
customSuccessRules: import('../../../composables/unifyValidation/useValidation').ValidationRule[];
|
|
72
40
|
displayAsterisk: boolean;
|
|
41
|
+
helpText: string;
|
|
73
42
|
hideDetails: boolean | "auto";
|
|
74
43
|
isValidateOnBlur: boolean;
|
|
75
44
|
successMessages: string[] | null;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { ValidationRule } from '../../../../composables/unifyValidation/useValidation';
|
|
3
|
+
import { SyCheckBoxGroupValidationProps } from '../types';
|
|
4
|
+
export interface UseSyCheckBoxGroupValidationReturn {
|
|
5
|
+
validate: () => Promise<boolean>;
|
|
6
|
+
validateOnSubmit: () => Promise<boolean>;
|
|
7
|
+
clearValidation: () => void;
|
|
8
|
+
errors: Ref<string[]>;
|
|
9
|
+
warnings: Ref<string[]>;
|
|
10
|
+
successes: Ref<string[]>;
|
|
11
|
+
hasError: ComputedRef<boolean | undefined>;
|
|
12
|
+
hasWarning: ComputedRef<boolean | undefined>;
|
|
13
|
+
hasSuccess: ComputedRef<boolean | undefined>;
|
|
14
|
+
defaultRules: ComputedRef<ValidationRule[]>;
|
|
15
|
+
focused: Ref<boolean>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Composable pour gérer la validation du composant SyCheckBoxGroup
|
|
19
|
+
*
|
|
20
|
+
* Ce composable encapsule toute la logique de validation spécifique aux groupes de checkboxes :
|
|
21
|
+
* - Validation required avec message personnalisé (supporte les modes single et multiple)
|
|
22
|
+
* - Support des customRules, customWarningRules, customSuccessRules
|
|
23
|
+
* - Désactivation automatique des messages de succès en mode Vuetify
|
|
24
|
+
* - Intégration avec useValidation du design system
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* const { validate, errors, hasError, defaultRules } = useSyCheckBoxGroupValidation(props, model)
|
|
28
|
+
*/
|
|
29
|
+
export declare function useSyCheckBoxGroupValidation(props: SyCheckBoxGroupValidationProps, model: Ref<(string | number) | (string | number)[] | null>, focused?: Ref<boolean>): UseSyCheckBoxGroupValidationReturn;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FieldValidationProps, ValidationRule, VuetifyValidationRule } from '../../../composables/unifyValidation/useValidation';
|
|
1
2
|
export type Option = {
|
|
2
3
|
label: string;
|
|
3
4
|
value: string | number;
|
|
@@ -8,3 +9,48 @@ export type Option = {
|
|
|
8
9
|
ariaLabel?: string;
|
|
9
10
|
title?: string;
|
|
10
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Props du composant SyCheckBoxGroup
|
|
14
|
+
*/
|
|
15
|
+
export interface SyCheckBoxGroupProps extends FieldValidationProps {
|
|
16
|
+
ariaLabel?: string;
|
|
17
|
+
ariaLabelledby?: string;
|
|
18
|
+
color?: string;
|
|
19
|
+
density?: 'default' | 'comfortable' | 'compact';
|
|
20
|
+
displayAsterisk?: boolean;
|
|
21
|
+
helpText?: string;
|
|
22
|
+
hideDetails?: boolean | 'auto';
|
|
23
|
+
id?: string;
|
|
24
|
+
label?: string;
|
|
25
|
+
modelValue?: (string | number) | (string | number)[] | null;
|
|
26
|
+
multiple?: boolean;
|
|
27
|
+
name?: string;
|
|
28
|
+
options?: Option[];
|
|
29
|
+
title?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Props de validation étendant FieldValidationProps du système unifié
|
|
33
|
+
*/
|
|
34
|
+
export interface SyCheckBoxGroupValidationProps extends FieldValidationProps {
|
|
35
|
+
modelValue?: (string | number) | (string | number)[] | null;
|
|
36
|
+
multiple?: boolean;
|
|
37
|
+
required?: boolean;
|
|
38
|
+
readonly?: boolean;
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
customRules?: ValidationRule[];
|
|
41
|
+
customWarningRules?: ValidationRule[];
|
|
42
|
+
customSuccessRules?: ValidationRule[];
|
|
43
|
+
isValidateOnBlur?: boolean;
|
|
44
|
+
showSuccessMessages?: boolean;
|
|
45
|
+
useVuetifyValidation?: boolean;
|
|
46
|
+
rules?: VuetifyValidationRule[];
|
|
47
|
+
errorMessages?: string[] | null;
|
|
48
|
+
warningMessages?: string[] | null;
|
|
49
|
+
successMessages?: string[] | null;
|
|
50
|
+
hasError?: boolean;
|
|
51
|
+
hasWarning?: boolean;
|
|
52
|
+
hasSuccess?: boolean;
|
|
53
|
+
maxErrors?: number;
|
|
54
|
+
disableErrorHandling?: boolean;
|
|
55
|
+
fieldIdentifier?: string;
|
|
56
|
+
}
|
|
@@ -1,36 +1,5 @@
|
|
|
1
|
-
import { nextTick } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
type __VLS_Props = {
|
|
4
|
-
modelValue?: boolean | null;
|
|
5
|
-
indeterminate?: boolean;
|
|
6
|
-
label?: string;
|
|
7
|
-
ariaLabel?: string;
|
|
8
|
-
ariaLabelledby?: string;
|
|
9
|
-
title?: string;
|
|
10
|
-
color?: string;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
readonly?: boolean;
|
|
13
|
-
required?: boolean;
|
|
14
|
-
hideDetails?: boolean | 'auto';
|
|
15
|
-
density?: 'default' | 'comfortable' | 'compact';
|
|
16
|
-
errorMessages?: string[] | null;
|
|
17
|
-
warningMessages?: string[] | null;
|
|
18
|
-
successMessages?: string[] | null;
|
|
19
|
-
customRules?: ValidationRule[];
|
|
20
|
-
customWarningRules?: ValidationRule[];
|
|
21
|
-
customSuccessRules?: ValidationRule[];
|
|
22
|
-
showSuccessMessages?: boolean;
|
|
23
|
-
isValidateOnBlur?: boolean;
|
|
24
|
-
disableErrorHandling?: boolean;
|
|
25
|
-
id?: string;
|
|
26
|
-
name?: string;
|
|
27
|
-
value?: unknown;
|
|
28
|
-
trueValue?: unknown;
|
|
29
|
-
falseValue?: unknown;
|
|
30
|
-
controlsIds?: string[];
|
|
31
|
-
displayAsterisk?: boolean;
|
|
32
|
-
decorative?: boolean;
|
|
33
|
-
};
|
|
1
|
+
import { nextTick, Ref } from 'vue';
|
|
2
|
+
import { SyCheckboxProps } from './types';
|
|
34
3
|
declare function __VLS_template(): {
|
|
35
4
|
attrs: Partial<{}>;
|
|
36
5
|
slots: {
|
|
@@ -634,27 +603,17 @@ declare function __VLS_template(): {
|
|
|
634
603
|
rootEl: HTMLDivElement;
|
|
635
604
|
};
|
|
636
605
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
637
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
638
|
-
validation: {
|
|
639
|
-
errors: import('vue').Ref<string[], string[]>;
|
|
640
|
-
warnings: import('vue').Ref<string[], string[]>;
|
|
641
|
-
successes: import('vue').Ref<string[], string[]>;
|
|
642
|
-
displaySuccesses: import('vue').ComputedRef<string[]>;
|
|
643
|
-
hasError: import('vue').ComputedRef<boolean>;
|
|
644
|
-
hasWarning: import('vue').ComputedRef<boolean>;
|
|
645
|
-
hasSuccess: import('vue').ComputedRef<boolean>;
|
|
646
|
-
validateField: (value: unknown, rules?: ValidationRule[], warningRules?: ValidationRule[], successRules?: ValidationRule[]) => import('../../../composables/validation/useValidation').ValidationResult | Promise<import('../../../composables/validation/useValidation').ValidationResult>;
|
|
647
|
-
validateOnSubmit: () => boolean;
|
|
648
|
-
clearValidation: () => void;
|
|
649
|
-
};
|
|
606
|
+
declare const __VLS_component: import('vue').DefineComponent<SyCheckboxProps, {
|
|
650
607
|
validateOnSubmit: () => Promise<boolean>;
|
|
651
|
-
|
|
608
|
+
clearValidation: () => void;
|
|
609
|
+
reset: () => void;
|
|
610
|
+
checkErrorOnBlur: () => Promise<boolean>;
|
|
652
611
|
toggleMixed: () => void;
|
|
653
612
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
654
613
|
change: (...args: any[]) => void;
|
|
655
614
|
"update:modelValue": (...args: any[]) => void;
|
|
656
615
|
"update:indeterminate": (...args: any[]) => void;
|
|
657
|
-
}, string, import('vue').PublicProps, Readonly<
|
|
616
|
+
}, string, import('vue').PublicProps, Readonly<SyCheckboxProps> & Readonly<{
|
|
658
617
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
659
618
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
660
619
|
"onUpdate:indeterminate"?: ((...args: any[]) => any) | undefined;
|
|
@@ -677,10 +636,16 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
677
636
|
showSuccessMessages: boolean;
|
|
678
637
|
disableErrorHandling: boolean;
|
|
679
638
|
errorMessages: string[] | null;
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
639
|
+
maxErrors: number;
|
|
640
|
+
hasError: boolean;
|
|
641
|
+
hasWarning: boolean;
|
|
642
|
+
hasSuccess: boolean;
|
|
643
|
+
useVuetifyValidation: boolean;
|
|
644
|
+
customRules: import('../../../composables/unifyValidation/useValidation').ValidationRule[];
|
|
645
|
+
customWarningRules: import('../../../composables/unifyValidation/useValidation').ValidationRule[];
|
|
646
|
+
customSuccessRules: import('../../../composables/unifyValidation/useValidation').ValidationRule[];
|
|
683
647
|
displayAsterisk: boolean;
|
|
648
|
+
helpText: string;
|
|
684
649
|
hideDetails: boolean | "auto";
|
|
685
650
|
isValidateOnBlur: boolean;
|
|
686
651
|
successMessages: string[] | null;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { ValidationRule } from '../../../../composables/unifyValidation/useValidation';
|
|
3
|
+
import { SyCheckboxValidationProps } from '../types';
|
|
4
|
+
export interface UseSyCheckboxValidationReturn {
|
|
5
|
+
validate: () => Promise<boolean>;
|
|
6
|
+
validateOnSubmit: () => Promise<boolean>;
|
|
7
|
+
clearValidation: () => void;
|
|
8
|
+
errors: Ref<string[]>;
|
|
9
|
+
warnings: Ref<string[]>;
|
|
10
|
+
successes: Ref<string[]>;
|
|
11
|
+
hasError: ComputedRef<boolean | undefined>;
|
|
12
|
+
hasWarning: ComputedRef<boolean | undefined>;
|
|
13
|
+
hasSuccess: ComputedRef<boolean | undefined>;
|
|
14
|
+
defaultRules: ComputedRef<ValidationRule[]>;
|
|
15
|
+
focused: Ref<boolean>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Composable de validation du composant SyCheckbox
|
|
19
|
+
*
|
|
20
|
+
* Version simplifiée du système unifié : pour une case à cocher, « required » signifie
|
|
21
|
+
* que la case doit être cochée (`value === true`). On utilise donc une règle `custom`
|
|
22
|
+
* plutôt que la règle `required` générique, qui considère `false` comme une valeur valide.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* const { validate, errors, hasError } = useSyCheckboxValidation(props, model, focused)
|
|
26
|
+
*/
|
|
27
|
+
export declare function useSyCheckboxValidation(props: SyCheckboxValidationProps, model: Ref<boolean | null>, focused?: Ref<boolean>): UseSyCheckboxValidationReturn;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { FieldValidationProps, ValidationRule, VuetifyValidationRule } from '../../../composables/unifyValidation/useValidation';
|
|
2
|
+
/**
|
|
3
|
+
* Props du composant SyCheckbox
|
|
4
|
+
*/
|
|
5
|
+
export interface SyCheckboxProps extends FieldValidationProps {
|
|
6
|
+
modelValue?: boolean | null;
|
|
7
|
+
indeterminate?: boolean;
|
|
8
|
+
label?: string;
|
|
9
|
+
helpText?: string;
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
ariaLabelledby?: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
color?: string;
|
|
14
|
+
hideDetails?: boolean | 'auto';
|
|
15
|
+
density?: 'default' | 'comfortable' | 'compact';
|
|
16
|
+
id?: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
value?: unknown;
|
|
19
|
+
trueValue?: unknown;
|
|
20
|
+
falseValue?: unknown;
|
|
21
|
+
controlsIds?: string[];
|
|
22
|
+
displayAsterisk?: boolean;
|
|
23
|
+
decorative?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Props de validation passées au composable dédié
|
|
27
|
+
*/
|
|
28
|
+
export interface SyCheckboxValidationProps extends FieldValidationProps {
|
|
29
|
+
modelValue?: boolean | null;
|
|
30
|
+
required?: boolean;
|
|
31
|
+
readonly?: boolean;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
label?: string;
|
|
34
|
+
customRules?: ValidationRule[];
|
|
35
|
+
customWarningRules?: ValidationRule[];
|
|
36
|
+
customSuccessRules?: ValidationRule[];
|
|
37
|
+
isValidateOnBlur?: boolean;
|
|
38
|
+
showSuccessMessages?: boolean;
|
|
39
|
+
useVuetifyValidation?: boolean;
|
|
40
|
+
rules?: VuetifyValidationRule[];
|
|
41
|
+
errorMessages?: string[] | null;
|
|
42
|
+
warningMessages?: string[] | null;
|
|
43
|
+
successMessages?: string[] | null;
|
|
44
|
+
hasError?: boolean;
|
|
45
|
+
hasWarning?: boolean;
|
|
46
|
+
hasSuccess?: boolean;
|
|
47
|
+
maxErrors?: number;
|
|
48
|
+
disableErrorHandling?: boolean;
|
|
49
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
state?: 'default' | 'error' | 'success' | 'warning';
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
export default _default;
|
|
@@ -26,13 +26,13 @@ export declare function useSyTextFieldValidation(params: {
|
|
|
26
26
|
errors: import('vue').ComputedRef<string[]>;
|
|
27
27
|
warnings: import('vue').ComputedRef<string[]>;
|
|
28
28
|
successes: import('vue').ComputedRef<string[]>;
|
|
29
|
-
hasError: import('vue').ComputedRef<boolean
|
|
30
|
-
hasWarning: import('vue').ComputedRef<boolean
|
|
29
|
+
hasError: import('vue').ComputedRef<boolean>;
|
|
30
|
+
hasWarning: import('vue').ComputedRef<boolean>;
|
|
31
31
|
hasSuccess: import('vue').ComputedRef<boolean>;
|
|
32
32
|
iconColor: import('vue').ComputedRef<"success" | "warning" | "error" | "rgba(0, 0, 0, 1)">;
|
|
33
33
|
clearButtonColorClass: import('vue').ComputedRef<string>;
|
|
34
|
-
validationIcon: import('vue').ComputedRef<string | null>;
|
|
35
34
|
hasMessages: import('vue').ComputedRef<boolean>;
|
|
35
|
+
state: import('vue').ComputedRef<"default" | "success" | "warning" | "error">;
|
|
36
36
|
validate: () => Promise<boolean>;
|
|
37
37
|
clearValidation: () => void;
|
|
38
38
|
};
|
|
@@ -9,6 +9,7 @@ type __VLS_Props = {
|
|
|
9
9
|
autofocusValidateBtn?: boolean;
|
|
10
10
|
draggable?: boolean;
|
|
11
11
|
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
12
|
+
scrollable?: boolean;
|
|
12
13
|
} & CustomizableOptions;
|
|
13
14
|
type __VLS_PublicProps = {
|
|
14
15
|
modelValue?: boolean;
|
|
@@ -504,6 +505,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
504
505
|
width: string;
|
|
505
506
|
headingLevel: 1 | 2 | 3 | 4 | 5 | 6;
|
|
506
507
|
persistent: boolean;
|
|
508
|
+
scrollable: boolean;
|
|
507
509
|
cancelBtnText: string;
|
|
508
510
|
confirmBtnText: string;
|
|
509
511
|
hideActions: boolean;
|
|
@@ -5,6 +5,8 @@ type __VLS_Props = {
|
|
|
5
5
|
modale?: boolean;
|
|
6
6
|
locales?: typeof defaultLocales;
|
|
7
7
|
zIndex?: number;
|
|
8
|
+
title?: string;
|
|
9
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
8
10
|
};
|
|
9
11
|
declare function __VLS_template(): {
|
|
10
12
|
attrs: Partial<{}>;
|
|
@@ -439,6 +441,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
439
441
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
440
442
|
"onUpdate:modelValue"?: ((value: FilterProp) => any) | undefined;
|
|
441
443
|
}>, {
|
|
444
|
+
title: string;
|
|
445
|
+
headingLevel: 1 | 2 | 3 | 4 | 5 | 6;
|
|
442
446
|
locales: typeof defaultLocales;
|
|
443
447
|
modelValue: FilterProp;
|
|
444
448
|
zIndex: number;
|