@wakastellar/ui 0.1.3 → 0.1.6

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.
@@ -1,7 +1,18 @@
1
1
  import { LoginConfig } from './types';
2
2
  export type { LoginConfig, LoginColorConfig, LoginThemeConfig, LoginAssetsConfig, LoginSignupOptions } from './types';
3
3
  export interface LoginProps {
4
- /** Configuration JSON complète du composant */
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
+ */
5
16
  config?: LoginConfig;
6
17
  /** Callback lors de la soumission du formulaire */
7
18
  onSubmit?: (data: LoginFormData) => void;
@@ -68,20 +68,59 @@ export interface LoginSignupOptions {
68
68
  }
69
69
  /**
70
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
+ * }
71
110
  */
72
111
  export interface LoginConfig {
73
- /** Configuration des couleurs */
112
+ /** Configuration des couleurs du thème */
74
113
  color_json: LoginColorConfig;
75
- /** Configuration du thème */
114
+ /** Configuration du thème (nom et mode dark/light) */
76
115
  theme_json: LoginThemeConfig;
77
- /** Assets (logos et images) */
116
+ /** Assets (logos et images selon le thème) */
78
117
  assets: LoginAssetsConfig;
79
- /** Afficher le badge "Waka Powered" */
118
+ /** Afficher le badge "Waka Powered" en bas du formulaire */
80
119
  waka_powered: boolean;
81
- /** Code de langue (ex: "fr_FR") */
120
+ /** Code de langue (ex: "fr_FR", "en_US") - utilisé pour l'i18n */
82
121
  lang_code: string;
83
- /** Options d'inscription et de connexion */
122
+ /** Options d'inscription et de connexion (SSO, MFA, etc.) */
84
123
  signup_options: LoginSignupOptions;
85
- /** Règles de résolution OEM (optionnel, pour documentation) */
124
+ /** Règles de résolution OEM (optionnel, utilisé pour la documentation/logique métier) */
86
125
  oem_resolution_rules?: string[];
87
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: ("csv" | "xlsx" | "json" | "pdf" | "xml")[] | readonly ["csv", "xlsx", "json"];
13
+ supportedFormats: ("json" | "csv" | "xlsx" | "pdf" | "xml")[] | readonly ["csv", "xlsx", "json"];
14
14
  isExportSupported: (format: string) => boolean;
15
15
  };