@wakastellar/ui 0.1.4 → 0.1.8
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/index.d.ts +1 -0
- package/dist/components/DataTable/DataTableGroupRow.d.ts +35 -0
- package/dist/components/DataTable/DataTableRow.d.ts +28 -0
- package/dist/components/DataTable/hooks/useDataTableAdvanced.d.ts +5 -5
- package/dist/components/WakaKeycloakLogin/WakaKeycloakLogin.d.ts +3 -0
- package/dist/components/WakaKeycloakLogin/index.d.ts +2 -0
- package/dist/components/WakaKeycloakLogin/types.d.ts +56 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.cjs.js +26 -20
- package/dist/index.d.ts +26 -0
- package/dist/index.es.js +5246 -4974
- package/dist/ui.css +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/logger.d.ts +60 -0
- package/package.json +4 -3
- package/src/styles/datepicker.css +9 -2
- package/src/styles/globals.css +4 -4
package/dist/blocks/index.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ export { Headtab } from './headtab';
|
|
|
3
3
|
export { LanguageSelector as BlockLanguageSelector } from './language-selector';
|
|
4
4
|
export { Layout } from './layout';
|
|
5
5
|
export { Login } from './login';
|
|
6
|
+
export type { LoginConfig, LoginColorConfig, LoginThemeConfig, LoginAssetsConfig, LoginSignupOptions, LoginFormData } from './login';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Row } from '@tanstack/react-table';
|
|
2
|
+
import { EditConfig } from './types';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
interface DataTableGroupRowProps<TData> {
|
|
5
|
+
row: Row<TData>;
|
|
6
|
+
index: number;
|
|
7
|
+
columns: any[];
|
|
8
|
+
onRowClick?: (data: TData) => void;
|
|
9
|
+
onRowDoubleClick?: (data: TData) => void;
|
|
10
|
+
themeDensityClasses: {
|
|
11
|
+
cell: string;
|
|
12
|
+
};
|
|
13
|
+
editState?: {
|
|
14
|
+
editingRowId: string | null;
|
|
15
|
+
hasChanges: boolean;
|
|
16
|
+
};
|
|
17
|
+
editActions?: {
|
|
18
|
+
startEdit: (rowId: string, data: TData) => void;
|
|
19
|
+
saveEdit: () => void;
|
|
20
|
+
cancelEdit: () => void;
|
|
21
|
+
updateField: (field: keyof TData, value: any) => void;
|
|
22
|
+
};
|
|
23
|
+
edit?: EditConfig<TData>;
|
|
24
|
+
rowExpansion?: {
|
|
25
|
+
enabled?: boolean;
|
|
26
|
+
renderExpanded?: (row: TData) => React.ReactNode;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* DataTableGroupRow - Composant pour le rendu d'une ligne groupée du DataTable
|
|
31
|
+
*
|
|
32
|
+
* Gère l'affichage des lignes groupées avec expansion et agrégation
|
|
33
|
+
*/
|
|
34
|
+
export declare function DataTableGroupRow<TData>({ row, index, columns, onRowClick, onRowDoubleClick, themeDensityClasses, editState, editActions, edit, rowExpansion, }: DataTableGroupRowProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Row } from '@tanstack/react-table';
|
|
2
|
+
import { EditConfig } from './types';
|
|
3
|
+
interface DataTableRowProps<TData> {
|
|
4
|
+
row: Row<TData>;
|
|
5
|
+
onRowClick?: (data: TData) => void;
|
|
6
|
+
onRowDoubleClick?: (data: TData) => void;
|
|
7
|
+
themeDensityClasses: {
|
|
8
|
+
cell: string;
|
|
9
|
+
};
|
|
10
|
+
editState?: {
|
|
11
|
+
editingRowId: string | null;
|
|
12
|
+
hasChanges: boolean;
|
|
13
|
+
};
|
|
14
|
+
editActions?: {
|
|
15
|
+
startEdit: (rowId: string, data: TData) => void;
|
|
16
|
+
saveEdit: () => void;
|
|
17
|
+
cancelEdit: () => void;
|
|
18
|
+
updateField: (field: keyof TData, value: any) => void;
|
|
19
|
+
};
|
|
20
|
+
edit?: EditConfig<TData>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* DataTableRow - Composant pour le rendu d'une ligne standard du DataTable
|
|
24
|
+
*
|
|
25
|
+
* Extrait de DataTableAdvanced pour réduire la complexité
|
|
26
|
+
*/
|
|
27
|
+
export declare function DataTableRow<TData>({ row, onRowClick, onRowDoubleClick, themeDensityClasses, editState, editActions, edit, }: DataTableRowProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -4,7 +4,7 @@ import { DataTableProps } from '../types';
|
|
|
4
4
|
* Hook avancé pour gérer toutes les fonctionnalités du DataTable
|
|
5
5
|
*/
|
|
6
6
|
export declare function useDataTableAdvanced<TData>({ data, columns, pagination: paginationConfig, tableId, onSortingChange, onFiltersChange, onSelectionChange, onColumnOrderChange, onExpandedChange, onGroupingChange, grouping, virtualization, sortMode, performance, }: Pick<DataTableProps<TData>, "data" | "columns" | "pagination" | "tableId" | "onSortingChange" | "onFiltersChange" | "onSelectionChange" | "onColumnOrderChange" | "onExpandedChange" | "onGroupingChange" | "grouping" | "virtualization" | "sortMode" | "performance">): {
|
|
7
|
-
table: import('@tanstack/react-table').Table<
|
|
7
|
+
table: import('@tanstack/react-table').Table<any>;
|
|
8
8
|
sorting: SortingState;
|
|
9
9
|
setSorting: import('react').Dispatch<import('react').SetStateAction<SortingState>>;
|
|
10
10
|
columnFilters: ColumnFiltersState;
|
|
@@ -23,13 +23,13 @@ export declare function useDataTableAdvanced<TData>({ data, columns, pagination:
|
|
|
23
23
|
setGlobalFilter: import('react').Dispatch<import('react').SetStateAction<string>>;
|
|
24
24
|
pagination: PaginationState;
|
|
25
25
|
setPagination: import('react').Dispatch<import('react').SetStateAction<PaginationState>>;
|
|
26
|
-
selectedRows:
|
|
26
|
+
selectedRows: any[];
|
|
27
27
|
resetFilters: () => void;
|
|
28
28
|
resetSelection: () => void;
|
|
29
29
|
resetAll: () => void;
|
|
30
|
-
exportData: () =>
|
|
31
|
-
getGroupedData: () =>
|
|
32
|
-
getExpandedData: () =>
|
|
30
|
+
exportData: () => any[];
|
|
31
|
+
getGroupedData: () => any[];
|
|
32
|
+
getExpandedData: () => any[];
|
|
33
33
|
toggleGrouping: (columnId: string) => void;
|
|
34
34
|
clearGrouping: () => void;
|
|
35
35
|
toggleRowExpansion: (rowId: string) => void;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export interface KeycloakRealm {
|
|
2
|
+
name: string;
|
|
3
|
+
displayName?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
url?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface RealmDiscoveryResponse {
|
|
8
|
+
realms: KeycloakRealm[];
|
|
9
|
+
email: string;
|
|
10
|
+
}
|
|
11
|
+
export interface WakaKeycloakLoginProps {
|
|
12
|
+
/**
|
|
13
|
+
* URL de l'endpoint de discovery pour trouver les realms
|
|
14
|
+
* L'email sera ajouté en query parameter: ?email=user@example.com
|
|
15
|
+
*/
|
|
16
|
+
discoveryUrl: string;
|
|
17
|
+
/**
|
|
18
|
+
* Callback appelé quand l'utilisateur sélectionne un realm
|
|
19
|
+
* @param realm - Le realm sélectionné
|
|
20
|
+
* @param email - L'email de l'utilisateur
|
|
21
|
+
*/
|
|
22
|
+
onRealmSelected: (realm: KeycloakRealm, email: string) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Texte du bouton de login
|
|
25
|
+
* @default "Se connecter"
|
|
26
|
+
*/
|
|
27
|
+
loginButtonText?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Placeholder de l'input email
|
|
30
|
+
* @default "Entrez votre email"
|
|
31
|
+
*/
|
|
32
|
+
emailPlaceholder?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Titre de la modale de sélection de realm
|
|
35
|
+
* @default "Sélectionnez votre organisation"
|
|
36
|
+
*/
|
|
37
|
+
modalTitle?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Description de la modale
|
|
40
|
+
* @default "Plusieurs organisations ont été trouvées pour votre email"
|
|
41
|
+
*/
|
|
42
|
+
modalDescription?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Callback appelé en cas d'erreur
|
|
45
|
+
*/
|
|
46
|
+
onError?: (error: Error) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Désactiver le composant
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Classe CSS personnalisée pour le conteneur
|
|
54
|
+
*/
|
|
55
|
+
className?: string;
|
|
56
|
+
}
|