@wakastellar/ui 0.1.2 → 0.1.4
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/blocks/login/index.d.ts +30 -1
- package/dist/blocks/login/types.d.ts +126 -0
- package/dist/components/DataTable/hooks/useDataTableExport.d.ts +1 -1
- package/dist/index.cjs.js +19 -16
- package/dist/index.es.js +3799 -3682
- package/package.json +5 -2
|
@@ -1,8 +1,37 @@
|
|
|
1
|
+
import { LoginConfig } from './types';
|
|
2
|
+
export type { LoginConfig, LoginColorConfig, LoginThemeConfig, LoginAssetsConfig, LoginSignupOptions } from './types';
|
|
1
3
|
export interface LoginProps {
|
|
4
|
+
/**
|
|
5
|
+
* Configuration JSON complète du composant Login
|
|
6
|
+
*
|
|
7
|
+
* Doit correspondre exactement à la structure LoginConfig avec :
|
|
8
|
+
* - color_json : couleurs personnalisées (primary, secondary, accent)
|
|
9
|
+
* - theme_json : configuration du thème (name, dark_mode)
|
|
10
|
+
* - assets : logos et images selon le thème
|
|
11
|
+
* - waka_powered : afficher le badge "Powered by Waka"
|
|
12
|
+
* - lang_code : code de langue (ex: "fr_FR")
|
|
13
|
+
* - signup_options : options SSO, MFA, allow_login
|
|
14
|
+
* - oem_resolution_rules : règles de résolution OEM (optionnel)
|
|
15
|
+
*/
|
|
16
|
+
config?: LoginConfig;
|
|
17
|
+
/** Callback lors de la soumission du formulaire */
|
|
2
18
|
onSubmit?: (data: LoginFormData) => void;
|
|
19
|
+
/** Callback pour le mot de passe oublié */
|
|
3
20
|
onForgotPassword?: () => void;
|
|
21
|
+
/** Callback pour l'inscription */
|
|
4
22
|
onSignUp?: () => void;
|
|
23
|
+
/** Callbacks pour les connexions SSO */
|
|
24
|
+
onSSOGoogle?: () => void;
|
|
25
|
+
onSSOMicrosoft?: () => void;
|
|
26
|
+
onSSOApple?: () => void;
|
|
27
|
+
onSSOLinkedIn?: () => void;
|
|
28
|
+
onSSOGithub?: () => void;
|
|
29
|
+
onSSOFacebook?: () => void;
|
|
30
|
+
onSSOInstagram?: () => void;
|
|
31
|
+
onSSOFranceConnect?: () => void;
|
|
32
|
+
/** Afficher la connexion sociale (déprécié, utilise config.signup_options) */
|
|
5
33
|
showSocialLogin?: boolean;
|
|
34
|
+
/** Classe CSS personnalisée */
|
|
6
35
|
className?: string;
|
|
7
36
|
}
|
|
8
37
|
export interface LoginFormData {
|
|
@@ -10,4 +39,4 @@ export interface LoginFormData {
|
|
|
10
39
|
password: string;
|
|
11
40
|
rememberMe?: boolean;
|
|
12
41
|
}
|
|
13
|
-
export declare function Login({ onSubmit, onForgotPassword, onSignUp, showSocialLogin, className, }: LoginProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare function Login({ config, onSubmit, onForgotPassword, onSignUp, onSSOGoogle, onSSOMicrosoft, onSSOApple, onSSOLinkedIn, onSSOGithub, onSSOFacebook, onSSOInstagram, onSSOFranceConnect, showSocialLogin, className, }: LoginProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration des couleurs du thème
|
|
3
|
+
*/
|
|
4
|
+
export interface LoginColorConfig {
|
|
5
|
+
/** Couleur principale */
|
|
6
|
+
primary: string;
|
|
7
|
+
/** Couleur secondaire */
|
|
8
|
+
secondary: string;
|
|
9
|
+
/** Couleur d'accent */
|
|
10
|
+
accent: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Configuration du thème
|
|
14
|
+
*/
|
|
15
|
+
export interface LoginThemeConfig {
|
|
16
|
+
/** Nom du thème */
|
|
17
|
+
name: string;
|
|
18
|
+
/** Mode sombre activé */
|
|
19
|
+
dark_mode: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Assets (logos et images)
|
|
23
|
+
*/
|
|
24
|
+
export interface LoginAssetsConfig {
|
|
25
|
+
/** Logo du thème en mode sombre */
|
|
26
|
+
theme_logo_dark?: string;
|
|
27
|
+
/** Logo du thème en mode clair */
|
|
28
|
+
theme_logo_light?: string;
|
|
29
|
+
/** Image du thème en mode clair */
|
|
30
|
+
theme_image_light?: string;
|
|
31
|
+
/** Image du thème en mode sombre */
|
|
32
|
+
theme_image_dark?: string;
|
|
33
|
+
/** Image du sponsor en mode clair */
|
|
34
|
+
sponsor_image_light?: string;
|
|
35
|
+
/** Image du sponsor en mode sombre */
|
|
36
|
+
sponsor_image_dark?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Options d'inscription et de connexion
|
|
40
|
+
*/
|
|
41
|
+
export interface LoginSignupOptions {
|
|
42
|
+
/** Autoriser la connexion classique */
|
|
43
|
+
allow_login: boolean;
|
|
44
|
+
/** Requérir la MFA */
|
|
45
|
+
require_MFA: boolean;
|
|
46
|
+
/** MFA par email */
|
|
47
|
+
MFA_email: boolean;
|
|
48
|
+
/** MFA par WhatsApp */
|
|
49
|
+
MFA_whatsapp: boolean;
|
|
50
|
+
/** MFA par RCS */
|
|
51
|
+
MFA_RCS: boolean;
|
|
52
|
+
/** Autoriser SSO Google */
|
|
53
|
+
allow_sso_google: boolean;
|
|
54
|
+
/** Autoriser SSO Microsoft */
|
|
55
|
+
allow_sso_microsoft: boolean;
|
|
56
|
+
/** Autoriser SSO Apple */
|
|
57
|
+
allow_sso_apple: boolean;
|
|
58
|
+
/** Autoriser SSO LinkedIn */
|
|
59
|
+
allow_sso_linkedIn: boolean;
|
|
60
|
+
/** Autoriser SSO GitHub */
|
|
61
|
+
allow_sso_github: boolean;
|
|
62
|
+
/** Autoriser SSO Facebook */
|
|
63
|
+
allow_sso_facebook: boolean;
|
|
64
|
+
/** Autoriser SSO Instagram */
|
|
65
|
+
allow_sso_instagram: boolean;
|
|
66
|
+
/** Autoriser SSO France Connect */
|
|
67
|
+
allow_sso_france_connect: boolean;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Configuration complète du composant Login
|
|
71
|
+
*
|
|
72
|
+
* Structure JSON attendue :
|
|
73
|
+
* {
|
|
74
|
+
* "color_json": {
|
|
75
|
+
* "primary": "#000000",
|
|
76
|
+
* "secondary": "#FFFFFF",
|
|
77
|
+
* "accent": "#FF9900"
|
|
78
|
+
* },
|
|
79
|
+
* "theme_json": {
|
|
80
|
+
* "name": "Default Theme",
|
|
81
|
+
* "dark_mode": true
|
|
82
|
+
* },
|
|
83
|
+
* "assets": {
|
|
84
|
+
* "theme_logo_dark": "https://...",
|
|
85
|
+
* "theme_logo_light": "https://...",
|
|
86
|
+
* "theme_image_light": "https://...",
|
|
87
|
+
* "theme_image_dark": "https://...",
|
|
88
|
+
* "sponsor_image_light": "https://...",
|
|
89
|
+
* "sponsor_image_dark": "https://..."
|
|
90
|
+
* },
|
|
91
|
+
* "waka_powered": true,
|
|
92
|
+
* "lang_code": "fr_FR",
|
|
93
|
+
* "signup_options": {
|
|
94
|
+
* "allow_login": true,
|
|
95
|
+
* "require_MFA": false,
|
|
96
|
+
* "MFA_email": true,
|
|
97
|
+
* "MFA_whatsapp": false,
|
|
98
|
+
* "MFA_RCS": false,
|
|
99
|
+
* "allow_sso_google": true,
|
|
100
|
+
* "allow_sso_microsoft": true,
|
|
101
|
+
* "allow_sso_apple": false,
|
|
102
|
+
* "allow_sso_linkedIn": false,
|
|
103
|
+
* "allow_sso_github": false,
|
|
104
|
+
* "allow_sso_facebook": false,
|
|
105
|
+
* "allow_sso_instagram": false,
|
|
106
|
+
* "allow_sso_france_connect": false
|
|
107
|
+
* },
|
|
108
|
+
* "oem_resolution_rules": ["..."]
|
|
109
|
+
* }
|
|
110
|
+
*/
|
|
111
|
+
export interface LoginConfig {
|
|
112
|
+
/** Configuration des couleurs du thème */
|
|
113
|
+
color_json: LoginColorConfig;
|
|
114
|
+
/** Configuration du thème (nom et mode dark/light) */
|
|
115
|
+
theme_json: LoginThemeConfig;
|
|
116
|
+
/** Assets (logos et images selon le thème) */
|
|
117
|
+
assets: LoginAssetsConfig;
|
|
118
|
+
/** Afficher le badge "Waka Powered" en bas du formulaire */
|
|
119
|
+
waka_powered: boolean;
|
|
120
|
+
/** Code de langue (ex: "fr_FR", "en_US") - utilisé pour l'i18n */
|
|
121
|
+
lang_code: string;
|
|
122
|
+
/** Options d'inscription et de connexion (SSO, MFA, etc.) */
|
|
123
|
+
signup_options: LoginSignupOptions;
|
|
124
|
+
/** Règles de résolution OEM (optionnel, utilisé pour la documentation/logique métier) */
|
|
125
|
+
oem_resolution_rules?: string[];
|
|
126
|
+
}
|
|
@@ -10,6 +10,6 @@ export declare function useDataTableExport<TData>({ data, columns, exportConfig,
|
|
|
10
10
|
exportData: (format: string, customData?: TData[], customFilename?: string) => Promise<void>;
|
|
11
11
|
exportAll: (format: string) => Promise<void>;
|
|
12
12
|
exportSelected: (format: string, selectedData: TData[]) => Promise<void>;
|
|
13
|
-
supportedFormats: ("
|
|
13
|
+
supportedFormats: ("json" | "csv" | "xlsx" | "pdf" | "xml")[] | readonly ["csv", "xlsx", "json"];
|
|
14
14
|
isExportSupported: (format: string) => boolean;
|
|
15
15
|
};
|