@cnamts/synapse 0.0.11-alpha → 0.0.12-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 +3878 -3189
- package/dist/design-system-v3.umd.cjs +1 -1
- package/dist/src/components/Amelipro/types/languages.d.ts +6 -0
- package/dist/src/components/Amelipro/types/types.d.ts +65 -0
- package/dist/src/components/CookieBanner/CookieBanner.d.ts +1 -1
- package/dist/src/components/Customs/SyInputSelect/SyInputSelect.d.ts +2 -0
- package/dist/src/components/Customs/SyTextField/SyTextField.d.ts +29 -23
- package/dist/src/components/Customs/SyTextField/types.d.ts +1 -0
- package/dist/src/components/DatePicker/DatePicker.d.ts +70 -59
- package/dist/src/components/DatePicker/DateTextInput.d.ts +67 -56
- package/dist/src/components/ErrorPage/ErrorPage.d.ts +1 -1
- package/dist/src/components/FileList/FileList.d.ts +1 -0
- package/dist/src/components/FileList/UploadItem/UploadItem.d.ts +1 -1
- package/dist/src/components/FilterSideBar/FilterSideBar.d.ts +31 -0
- package/dist/src/components/FilterSideBar/locales.d.ts +7 -0
- package/dist/src/components/FilterSideBar/tests/FilterSideBar.spec.d.ts +1 -0
- package/dist/src/components/LangBtn/LangBtn.d.ts +2 -2
- package/dist/src/components/NirField/NirField.d.ts +940 -0
- package/dist/src/components/NotificationBar/NotificationBar.d.ts +1 -1
- package/dist/src/components/PasswordField/PasswordField.d.ts +40 -8
- package/dist/src/components/PeriodField/PeriodField.d.ts +142 -120
- package/dist/src/components/PhoneField/PhoneField.d.ts +11 -2
- package/dist/src/components/RatingPicker/EmotionPicker/EmotionPicker.d.ts +1 -1
- package/dist/src/components/RatingPicker/NumberPicker/NumberPicker.d.ts +1 -1
- package/dist/src/components/RatingPicker/StarsPicker/StarsPicker.d.ts +1 -1
- package/dist/src/components/UploadWorkflow/config.d.ts +29 -0
- package/dist/src/components/UploadWorkflow/locales.d.ts +7 -0
- package/dist/src/components/UploadWorkflow/tests/UploadWorkflow.spec.d.ts +1 -0
- package/dist/src/components/UploadWorkflow/types.d.ts +19 -0
- package/dist/src/components/UploadWorkflow/useFileList.d.ts +10 -0
- package/dist/src/components/UploadWorkflow/useFileUploadJourney.d.ts +9 -0
- package/dist/src/components/index.d.ts +2 -0
- package/dist/src/composables/rules/useFieldValidation.d.ts +1 -0
- package/dist/src/composables/validation/tests/useValidation.spec.d.ts +1 -0
- package/dist/src/composables/validation/useValidation.d.ts +39 -0
- package/dist/src/designTokens/index.d.ts +3 -1
- package/dist/src/vuetifyConfig.d.ts +81 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/assets/_elevations.scss +89 -0
- package/src/assets/_fonts.scss +6 -0
- package/src/assets/_radius.scss +86 -0
- package/src/assets/_spacers.scss +149 -0
- package/src/assets/settings.scss +7 -3
- package/src/assets/tokens.scss +32 -29
- package/src/components/Amelipro/types/languages.d.ts +6 -0
- package/src/components/Amelipro/types/types.d.ts +65 -0
- package/src/components/Customs/SyInputSelect/SyInputSelect.stories.ts +65 -0
- package/src/components/Customs/SyInputSelect/SyInputSelect.vue +13 -3
- package/src/components/Customs/SySelect/SySelect.stories.ts +88 -5
- package/src/components/Customs/SySelect/SySelect.vue +36 -10
- package/src/components/Customs/SySelect/tests/SySelect.spec.ts +135 -2
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +576 -85
- package/src/components/Customs/SyTextField/SyTextField.vue +132 -104
- package/src/components/Customs/SyTextField/tests/SyTextField.spec.ts +190 -38
- package/src/components/Customs/SyTextField/types.d.ts +1 -0
- package/src/components/DatePicker/DatePicker.vue +405 -137
- package/src/components/DatePicker/DateTextInput.vue +15 -0
- package/src/components/DatePicker/tests/DatePicker.spec.ts +8 -15
- package/src/components/FileList/FileList.vue +2 -1
- package/src/components/FileList/UploadItem/UploadItem.vue +10 -0
- package/src/components/FileUpload/FileUpload.stories.ts +84 -0
- package/src/components/FileUpload/FileUpload.vue +1 -0
- package/src/components/FileUpload/tests/FileUpload.spec.ts +4 -4
- package/src/components/FilterInline/FilterInline.mdx +180 -34
- package/src/components/FilterInline/FilterInline.stories.ts +363 -6
- package/src/components/FilterSideBar/FilterSideBar.mdx +237 -0
- package/src/components/FilterSideBar/FilterSideBar.stories.ts +798 -0
- package/src/components/FilterSideBar/FilterSideBar.vue +193 -0
- package/src/components/FilterSideBar/locales.ts +8 -0
- package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +305 -0
- package/src/components/FilterSideBar/tests/__snapshots__/FilterSideBar.spec.ts.snap +39 -0
- package/src/components/HeaderBar/Usages.mdx +1 -1
- package/src/components/NirField/NirField.stories.ts +573 -29
- package/src/components/NirField/NirField.vue +397 -359
- package/src/components/NirField/tests/NirField.spec.ts +88 -52
- package/src/components/NirField/tests//342/200/257dataset/342/200/257.md +12 -0
- package/src/components/NotificationBar/Accessibilite.stories.ts +4 -0
- package/src/components/NotificationBar/NotificationBar.stories.ts +18 -13
- package/src/components/PasswordField/PasswordField.mdx +129 -47
- package/src/components/PasswordField/PasswordField.stories.ts +924 -120
- package/src/components/PasswordField/PasswordField.vue +209 -99
- package/src/components/PasswordField/tests/PasswordField.spec.ts +138 -9
- package/src/components/PeriodField/PeriodField.vue +55 -54
- package/src/components/PhoneField/PhoneField.stories.ts +69 -0
- package/src/components/PhoneField/PhoneField.vue +3 -0
- package/src/components/PhoneField/indicatifs.ts +1 -1
- package/src/components/UploadWorkflow/UploadWorkflow.mdx +75 -0
- package/src/components/UploadWorkflow/UploadWorkflow.stories.ts +943 -0
- package/src/components/UploadWorkflow/UploadWorkflow.vue +230 -0
- package/src/components/UploadWorkflow/config.ts +29 -0
- package/src/components/UploadWorkflow/locales.ts +8 -0
- package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +257 -0
- package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +54 -0
- package/src/components/UploadWorkflow/types.ts +21 -0
- package/src/components/UploadWorkflow/useFileList.ts +84 -0
- package/src/components/UploadWorkflow/useFileUploadJourney.ts +18 -0
- package/src/components/index.ts +2 -0
- package/src/composables/rules/useFieldValidation.ts +5 -2
- package/src/composables/validation/tests/useValidation.spec.ts +154 -0
- package/src/composables/validation/useValidation.ts +165 -0
- package/src/designTokens/index.ts +4 -0
- package/src/stories/Demarrer/Accueil.mdx +1 -1
- package/src/stories/DesignTokens/ThemePA.mdx +4 -30
- package/src/stories/GuideDuDev/UtiliserLesRules.mdx +319 -76
- package/src/stories/GuideDuDev/moduleDeNotification.mdx +1 -1
- package/src/vuetifyConfig.ts +61 -0
- package/src/composables/useFilterable/__snapshots__/useFilterable.spec.ts.snap +0 -3
|
@@ -39,9 +39,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<im
|
|
|
39
39
|
}>> & Readonly<{
|
|
40
40
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
41
41
|
}>, {
|
|
42
|
+
length: number;
|
|
42
43
|
modelValue: number;
|
|
43
44
|
label: string | null;
|
|
44
|
-
length: number;
|
|
45
45
|
readonly: boolean;
|
|
46
46
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLFieldSetElement>, {
|
|
47
47
|
label?(_: {}): any;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const config: {
|
|
2
|
+
readonly fileUpload: {
|
|
3
|
+
readonly class: "mt-6";
|
|
4
|
+
};
|
|
5
|
+
readonly dialog: {
|
|
6
|
+
readonly persistent: true;
|
|
7
|
+
readonly width: "550";
|
|
8
|
+
};
|
|
9
|
+
readonly card: {
|
|
10
|
+
readonly class: "pa-4";
|
|
11
|
+
};
|
|
12
|
+
readonly select: {
|
|
13
|
+
readonly variant: "outlined";
|
|
14
|
+
readonly validateOnBlur: true;
|
|
15
|
+
readonly label: "Nature du fichier";
|
|
16
|
+
};
|
|
17
|
+
readonly layout: {
|
|
18
|
+
readonly wrap: true;
|
|
19
|
+
readonly class: "mt-2";
|
|
20
|
+
};
|
|
21
|
+
readonly cancelBtn: {
|
|
22
|
+
readonly text: true;
|
|
23
|
+
readonly class: "mr-4";
|
|
24
|
+
readonly color: "accent";
|
|
25
|
+
};
|
|
26
|
+
readonly confirmBtn: {
|
|
27
|
+
readonly color: "accent";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FileState } from '../FileList/FileList';
|
|
2
|
+
export type { Item as FileItem } from '../FileList/FileList';
|
|
3
|
+
export type UploadItem = {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
state?: FileState | string;
|
|
7
|
+
optional?: boolean;
|
|
8
|
+
showPreviewBtn?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type SelectedFile = {
|
|
11
|
+
id: string;
|
|
12
|
+
title: string;
|
|
13
|
+
state?: FileState;
|
|
14
|
+
progress?: number;
|
|
15
|
+
optional?: boolean;
|
|
16
|
+
showPreviewBtn?: boolean;
|
|
17
|
+
fileName: string;
|
|
18
|
+
file: File;
|
|
19
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DeepReadonly, Ref } from 'vue';
|
|
2
|
+
import { FileState, Item as FileListItem } from '../FileList/FileList';
|
|
3
|
+
import { SelectedFile, UploadItem } from './types';
|
|
4
|
+
export default function useFileList(selectedFiles: Ref<SelectedFile[]>, uploadList: DeepReadonly<Ref<UploadItem[]>>): {
|
|
5
|
+
addOrReplaceFile: (file: File, fileId: string, state?: FileState) => void;
|
|
6
|
+
replaceFile: (file: File, item: SelectedFile, state?: FileState) => void;
|
|
7
|
+
resetFile: (fileItem: FileListItem | SelectedFile) => void;
|
|
8
|
+
setItemOnError: (fileId: string) => void;
|
|
9
|
+
filledUploadList: import('vue').ComputedRef<FileListItem[]>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { UploadItem } from './types';
|
|
3
|
+
export default function useFileUploadJourney(fileListItems: Ref<UploadItem[]>): {
|
|
4
|
+
selectItems: import('vue').ComputedRef<{
|
|
5
|
+
value: string;
|
|
6
|
+
text: string;
|
|
7
|
+
}[]>;
|
|
8
|
+
selectedItem: Ref<string | undefined, string | undefined>;
|
|
9
|
+
};
|
|
@@ -27,6 +27,7 @@ export { default as FileList } from './FileList/FileList';
|
|
|
27
27
|
export { default as FilePreview } from './FilePreview/FilePreview';
|
|
28
28
|
export { default as FileUpload } from './FileUpload/FileUpload';
|
|
29
29
|
export { default as FilterInline } from './FilterInline/FilterInline';
|
|
30
|
+
export { default as FilterSideBar } from './FilterSideBar/FilterSideBar';
|
|
30
31
|
export { default as FooterBar } from './FooterBar/FooterBar';
|
|
31
32
|
export { default as FranceConnectBtn } from './FranceConnectBtn/FranceConnectBtn';
|
|
32
33
|
export { default as HeaderBar } from './HeaderBar/HeaderBar';
|
|
@@ -60,4 +61,5 @@ export { default as SkipLink } from './SkipLink/SkipLink';
|
|
|
60
61
|
export { default as SocialMediaLinks } from './SocialMediaLinks/SocialMediaLinks';
|
|
61
62
|
export { default as SubHeader } from './SubHeader/SubHeader';
|
|
62
63
|
export { default as SyAlert } from './SyAlert/SyAlert';
|
|
64
|
+
export { default as UploadWorkflow } from './UploadWorkflow/UploadWorkflow';
|
|
63
65
|
export { default as UserMenuBtn } from './UserMenuBtn/UserMenuBtn';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { RuleOptions } from '../rules/useFieldValidation';
|
|
2
|
+
export type ValidationRule = {
|
|
3
|
+
type: string;
|
|
4
|
+
options: RuleOptions;
|
|
5
|
+
};
|
|
6
|
+
export interface ValidationOptions {
|
|
7
|
+
showSuccessMessages?: boolean;
|
|
8
|
+
fieldIdentifier?: string;
|
|
9
|
+
customRules?: ValidationRule[];
|
|
10
|
+
warningRules?: ValidationRule[];
|
|
11
|
+
successRules?: ValidationRule[];
|
|
12
|
+
}
|
|
13
|
+
export interface ValidationState {
|
|
14
|
+
errors: string[];
|
|
15
|
+
warnings: string[];
|
|
16
|
+
successes: string[];
|
|
17
|
+
}
|
|
18
|
+
export interface ValidationResult {
|
|
19
|
+
hasError: boolean;
|
|
20
|
+
hasWarning: boolean;
|
|
21
|
+
hasSuccess: boolean;
|
|
22
|
+
state: ValidationState;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Composable pour gérer la validation des champs de formulaire
|
|
26
|
+
* @param options Options de configuration de la validation
|
|
27
|
+
* @returns Un objet contenant les états et méthodes de validation
|
|
28
|
+
*/
|
|
29
|
+
export declare function useValidation(options?: ValidationOptions): {
|
|
30
|
+
errors: import('vue').Ref<string[], string[]>;
|
|
31
|
+
warnings: import('vue').Ref<string[], string[]>;
|
|
32
|
+
successes: import('vue').Ref<string[], string[]>;
|
|
33
|
+
hasError: import('vue').ComputedRef<boolean>;
|
|
34
|
+
hasWarning: import('vue').ComputedRef<boolean>;
|
|
35
|
+
hasSuccess: import('vue').ComputedRef<boolean>;
|
|
36
|
+
validateField: (value: unknown, rules?: ValidationRule[], warningRules?: ValidationRule[], successRules?: ValidationRule[]) => ValidationResult;
|
|
37
|
+
validateOnSubmit: () => Promise<boolean>;
|
|
38
|
+
clearValidation: () => void;
|
|
39
|
+
};
|
|
@@ -4,6 +4,8 @@ import { cnamColorsTokens } from './tokens/cnam/cnamColors';
|
|
|
4
4
|
import { cnamLightTheme } from './tokens/cnam/cnamLightTheme';
|
|
5
5
|
import { cnamDarkTheme } from './tokens/cnam/cnamDarkTheme';
|
|
6
6
|
import { paColorsTokens } from './tokens/pa/paColors';
|
|
7
|
+
import { paSemanticTokens } from './tokens/pa/paSemantic';
|
|
8
|
+
import { paContextualTokens } from './tokens/pa/paContextual';
|
|
7
9
|
import { paLightTheme } from './tokens/pa/paLightTheme';
|
|
8
10
|
import { paDarkTheme } from './tokens/pa/paDarkTheme';
|
|
9
|
-
export { cnamColorsTokens, cnamSemanticTokens, cnamContextualTokens, cnamLightTheme, cnamDarkTheme, paColorsTokens, paLightTheme, paDarkTheme, };
|
|
11
|
+
export { cnamColorsTokens, cnamSemanticTokens, cnamContextualTokens, cnamLightTheme, cnamDarkTheme, paColorsTokens, paSemanticTokens, paContextualTokens, paLightTheme, paDarkTheme, };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export declare const createVuetifyInstance: () => {
|
|
2
|
+
install: (app: import('vue').App<any>) => void;
|
|
3
|
+
defaults: import('vue').Ref<import('vuetify').DefaultsInstance, import('vuetify').DefaultsInstance>;
|
|
4
|
+
display: import('vuetify').DisplayInstance;
|
|
5
|
+
theme: import('vuetify').ThemeInstance & {
|
|
6
|
+
install: (app: import('vue').App<any>) => void;
|
|
7
|
+
};
|
|
8
|
+
icons: {
|
|
9
|
+
defaultSet: string;
|
|
10
|
+
aliases: Partial<import('vuetify').IconAliases>;
|
|
11
|
+
sets: Record<string, import('vuetify').IconSet>;
|
|
12
|
+
};
|
|
13
|
+
locale: {
|
|
14
|
+
isRtl: import('vue').Ref<boolean, boolean>;
|
|
15
|
+
rtl: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
|
|
16
|
+
rtlClasses: import('vue').Ref<string, string>;
|
|
17
|
+
name: string;
|
|
18
|
+
messages: import('vue').Ref<import('vuetify').LocaleMessages, import('vuetify').LocaleMessages>;
|
|
19
|
+
current: import('vue').Ref<string, string>;
|
|
20
|
+
fallback: import('vue').Ref<string, string>;
|
|
21
|
+
t: (key: string, ...params: unknown[]) => string;
|
|
22
|
+
n: (value: number) => string;
|
|
23
|
+
provide: (props: import('vuetify').LocaleOptions) => import('vuetify').LocaleInstance;
|
|
24
|
+
};
|
|
25
|
+
date: {
|
|
26
|
+
options: {
|
|
27
|
+
adapter: (new (options: {
|
|
28
|
+
locale: any;
|
|
29
|
+
formats?: any;
|
|
30
|
+
}) => import('vuetify').DateInstance) | import('vuetify').DateInstance;
|
|
31
|
+
formats?: Record<string, any> | undefined;
|
|
32
|
+
locale: Record<string, any>;
|
|
33
|
+
};
|
|
34
|
+
instance: {
|
|
35
|
+
locale?: any;
|
|
36
|
+
date: (value?: any) => unknown;
|
|
37
|
+
format: (date: unknown, formatString: string) => string;
|
|
38
|
+
toJsDate: (value: unknown) => Date;
|
|
39
|
+
parseISO: (date: string) => unknown;
|
|
40
|
+
toISO: (date: unknown) => string;
|
|
41
|
+
startOfDay: (date: unknown) => unknown;
|
|
42
|
+
endOfDay: (date: unknown) => unknown;
|
|
43
|
+
startOfWeek: (date: unknown, firstDayOfWeek?: string | number | undefined) => unknown;
|
|
44
|
+
endOfWeek: (date: unknown) => unknown;
|
|
45
|
+
startOfMonth: (date: unknown) => unknown;
|
|
46
|
+
endOfMonth: (date: unknown) => unknown;
|
|
47
|
+
startOfYear: (date: unknown) => unknown;
|
|
48
|
+
endOfYear: (date: unknown) => unknown;
|
|
49
|
+
isAfter: (date: unknown, comparing: unknown) => boolean;
|
|
50
|
+
isAfterDay: (value: unknown, comparing: unknown) => boolean;
|
|
51
|
+
isSameDay: (date: unknown, comparing: unknown) => boolean;
|
|
52
|
+
isSameMonth: (date: unknown, comparing: unknown) => boolean;
|
|
53
|
+
isSameYear: (value: unknown, comparing: unknown) => boolean;
|
|
54
|
+
isBefore: (date: unknown, comparing: unknown) => boolean;
|
|
55
|
+
isEqual: (date: unknown, comparing: unknown) => boolean;
|
|
56
|
+
isValid: (date: any) => boolean;
|
|
57
|
+
isWithinRange: (date: unknown, range: [unknown, unknown]) => boolean;
|
|
58
|
+
addMinutes: (date: unknown, amount: number) => unknown;
|
|
59
|
+
addHours: (date: unknown, amount: number) => unknown;
|
|
60
|
+
addDays: (date: unknown, amount: number) => unknown;
|
|
61
|
+
addWeeks: (date: unknown, amount: number) => unknown;
|
|
62
|
+
addMonths: (date: unknown, amount: number) => unknown;
|
|
63
|
+
getYear: (date: unknown) => number;
|
|
64
|
+
setYear: (date: unknown, year: number) => unknown;
|
|
65
|
+
getDiff: (date: unknown, comparing: unknown, unit?: string | undefined) => number;
|
|
66
|
+
getWeekArray: (date: unknown, firstDayOfWeek?: string | number | undefined) => unknown[][];
|
|
67
|
+
getWeekdays: (firstDayOfWeek?: string | number | undefined) => string[];
|
|
68
|
+
getMonth: (date: unknown) => number;
|
|
69
|
+
setMonth: (date: unknown, month: number) => unknown;
|
|
70
|
+
getDate: (date: unknown) => number;
|
|
71
|
+
setDate: (date: unknown, day: number) => unknown;
|
|
72
|
+
getNextMonth: (date: unknown) => unknown;
|
|
73
|
+
getPreviousMonth: (date: unknown) => unknown;
|
|
74
|
+
getHours: (date: unknown) => number;
|
|
75
|
+
setHours: (date: unknown, hours: number) => unknown;
|
|
76
|
+
getMinutes: (date: unknown) => number;
|
|
77
|
+
setMinutes: (date: unknown, minutes: number) => unknown;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
goTo: import('vuetify').GoToInstance;
|
|
81
|
+
};
|