@atlashub/smartstack-react 1.0.0
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/index.cjs +525 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +1492 -0
- package/dist/index.js +113606 -0
- package/dist/index.js.map +1 -0
- package/dist/smartstack-react.css +1 -0
- package/package.json +95 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1492 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { ElementType } from 'react';
|
|
3
|
+
import { HubConnectionState } from '@microsoft/signalr';
|
|
4
|
+
import { JSX } from 'react/jsx-runtime';
|
|
5
|
+
import { ReactNode } from 'react';
|
|
6
|
+
import * as signalR from '@microsoft/signalr';
|
|
7
|
+
|
|
8
|
+
export declare interface AccentColors {
|
|
9
|
+
bg: string;
|
|
10
|
+
text: string;
|
|
11
|
+
border: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export declare function AdminHeader({ onMenuToggle }: AdminHeaderProps): JSX.Element;
|
|
15
|
+
|
|
16
|
+
declare interface AdminHeaderProps {
|
|
17
|
+
onMenuToggle?: () => void;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export declare function AdminLayout(): JSX.Element;
|
|
21
|
+
|
|
22
|
+
export declare function AdminSidebar({ isOpen, onClose }: AdminSidebarProps): JSX.Element;
|
|
23
|
+
|
|
24
|
+
declare interface AdminSidebarProps {
|
|
25
|
+
isOpen?: boolean;
|
|
26
|
+
onClose?: () => void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export declare const api: {
|
|
30
|
+
get: <T>(url: string, config?: Parameters<typeof apiClient.get>[1]) => Promise<T>;
|
|
31
|
+
post: <T>(url: string, data?: unknown, config?: Parameters<typeof apiClient.post>[2]) => Promise<T>;
|
|
32
|
+
put: <T>(url: string, data?: unknown, config?: Parameters<typeof apiClient.put>[2]) => Promise<T>;
|
|
33
|
+
patch: <T>(url: string, data?: unknown, config?: Parameters<typeof apiClient.patch>[2]) => Promise<T>;
|
|
34
|
+
delete: <T>(url: string, config?: Parameters<typeof apiClient.delete>[1]) => Promise<T>;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export declare const apiClient: AxiosInstance;
|
|
38
|
+
|
|
39
|
+
export declare interface ApiError {
|
|
40
|
+
message: string;
|
|
41
|
+
details?: Record<string, string[]> | string[];
|
|
42
|
+
statusCode?: number;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export declare class AppError extends Error {
|
|
46
|
+
statusCode?: number;
|
|
47
|
+
details?: Record<string, string[]> | string[];
|
|
48
|
+
constructor(message: string, statusCode?: number, details?: Record<string, string[]> | string[]);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
declare interface ApplicationDto {
|
|
52
|
+
id: string;
|
|
53
|
+
code: string;
|
|
54
|
+
label: string;
|
|
55
|
+
icon: string | null;
|
|
56
|
+
route: string | null;
|
|
57
|
+
displayOrder: number;
|
|
58
|
+
modules: ModuleDto[];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export declare function AppSwitcher(): JSX.Element;
|
|
62
|
+
|
|
63
|
+
declare interface AuthContextType {
|
|
64
|
+
user: User | null;
|
|
65
|
+
isAuthenticated: boolean;
|
|
66
|
+
isLoading: boolean;
|
|
67
|
+
availableContexts: NavigationContext[];
|
|
68
|
+
currentContext: string;
|
|
69
|
+
login: (token: string, user: User) => void;
|
|
70
|
+
logout: () => Promise<void>;
|
|
71
|
+
setCurrentContext: (context: string) => void;
|
|
72
|
+
hasPermission: (permission: string) => boolean;
|
|
73
|
+
refreshPermissions: () => Promise<void>;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export declare class AuthenticationError extends Error {
|
|
77
|
+
code?: LoginErrorCode;
|
|
78
|
+
constructor(message?: string, code?: LoginErrorCode);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export declare function AuthLayout(): JSX.Element;
|
|
82
|
+
|
|
83
|
+
export declare function AuthProvider({ children }: {
|
|
84
|
+
children: ReactNode;
|
|
85
|
+
}): JSX.Element;
|
|
86
|
+
|
|
87
|
+
export declare function AvatarMenu(): JSX.Element;
|
|
88
|
+
|
|
89
|
+
export declare interface BackgroundColors {
|
|
90
|
+
app: string;
|
|
91
|
+
primary: string;
|
|
92
|
+
secondary: string;
|
|
93
|
+
tertiary: string;
|
|
94
|
+
card: string;
|
|
95
|
+
hover: string;
|
|
96
|
+
active: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export declare const BORDER_RADIUS_LABELS: Record<BorderRadiusSize, string>;
|
|
100
|
+
|
|
101
|
+
export declare const BORDER_RADIUS_VALUES: Record<BorderRadiusSize, string>;
|
|
102
|
+
|
|
103
|
+
export declare interface BorderColors {
|
|
104
|
+
default: string;
|
|
105
|
+
subtle: string;
|
|
106
|
+
strong: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export declare interface BorderRadiusConfig {
|
|
110
|
+
card: BorderRadiusSize;
|
|
111
|
+
button: BorderRadiusSize;
|
|
112
|
+
badge: BorderRadiusSize;
|
|
113
|
+
input: BorderRadiusSize;
|
|
114
|
+
modal: BorderRadiusSize;
|
|
115
|
+
menuItem: BorderRadiusSize;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export declare type BorderRadiusSize = 'none' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge';
|
|
119
|
+
|
|
120
|
+
export declare function Breadcrumb({ items, className }: BreadcrumbProps): JSX.Element;
|
|
121
|
+
|
|
122
|
+
declare interface BreadcrumbItem {
|
|
123
|
+
label: string;
|
|
124
|
+
href?: string;
|
|
125
|
+
icon?: React.ReactNode;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
declare interface BreadcrumbProps {
|
|
129
|
+
items: BreadcrumbItem[];
|
|
130
|
+
className?: string;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
declare interface BrowserInfoDto {
|
|
134
|
+
name?: string;
|
|
135
|
+
version?: string;
|
|
136
|
+
language?: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export declare function BusinessHeader({ onMenuToggle }: BusinessHeaderProps): JSX.Element;
|
|
140
|
+
|
|
141
|
+
declare interface BusinessHeaderProps {
|
|
142
|
+
onMenuToggle?: () => void;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export declare function BusinessLayout(): JSX.Element;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* PermissionMatrix - Composant de matrice de permissions standardisé SmartStack
|
|
149
|
+
*
|
|
150
|
+
* Fonctionnalités:
|
|
151
|
+
* - Grille rows × columns avec états
|
|
152
|
+
* - Groupes de lignes (collapsibles)
|
|
153
|
+
* - En-têtes de colonnes rotatifs
|
|
154
|
+
* - États: granted, denied, partial, inherited
|
|
155
|
+
* - Click pour toggle
|
|
156
|
+
* - Légende automatique
|
|
157
|
+
*
|
|
158
|
+
* Usage:
|
|
159
|
+
* ```tsx
|
|
160
|
+
* <PermissionMatrix
|
|
161
|
+
* rows={resources}
|
|
162
|
+
* columns={roles}
|
|
163
|
+
* getRowId={(r) => r.id}
|
|
164
|
+
* getRowLabel={(r) => r.name}
|
|
165
|
+
* getRowGroup={(r) => r.category}
|
|
166
|
+
* getColumnId={(c) => c.id}
|
|
167
|
+
* getColumnLabel={(c) => c.name}
|
|
168
|
+
* getCellState={(rowId, colId) => assignments[rowId]?.[colId]}
|
|
169
|
+
* onCellClick={(rowId, colId) => toggleAssignment(rowId, colId)}
|
|
170
|
+
* />
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
declare type CellState = 'granted' | 'denied' | 'partial' | 'inherited' | 'none';
|
|
174
|
+
|
|
175
|
+
declare interface ClientContextDto {
|
|
176
|
+
sourceUrl?: string;
|
|
177
|
+
browser?: BrowserInfoDto;
|
|
178
|
+
os?: OsInfoDto;
|
|
179
|
+
device?: DeviceInfoDto;
|
|
180
|
+
recentErrors?: ErrorInfoDto[];
|
|
181
|
+
screenshotAttachmentId?: string;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export declare interface ClientErrorLog {
|
|
185
|
+
message: string;
|
|
186
|
+
stack?: string;
|
|
187
|
+
url?: string;
|
|
188
|
+
component?: string;
|
|
189
|
+
level?: 'Error' | 'Warning' | 'Critical';
|
|
190
|
+
metadata?: Record<string, unknown>;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export declare interface ClientEventLog {
|
|
194
|
+
event: string;
|
|
195
|
+
category: string;
|
|
196
|
+
data?: Record<string, unknown>;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export declare interface ColorPalette {
|
|
200
|
+
name: string;
|
|
201
|
+
primary: ColorShades;
|
|
202
|
+
accent: ColorShades;
|
|
203
|
+
backgrounds: BackgroundColors;
|
|
204
|
+
text: TextColors;
|
|
205
|
+
border: BorderColors;
|
|
206
|
+
status: StatusColors;
|
|
207
|
+
accentTransparent: AccentColors;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export declare interface ColorShades {
|
|
211
|
+
50: string;
|
|
212
|
+
100: string;
|
|
213
|
+
200: string;
|
|
214
|
+
300: string;
|
|
215
|
+
400: string;
|
|
216
|
+
500: string;
|
|
217
|
+
600: string;
|
|
218
|
+
700: string;
|
|
219
|
+
800: string;
|
|
220
|
+
900: string;
|
|
221
|
+
950: string;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
declare interface ContextMenuDto {
|
|
225
|
+
id: string;
|
|
226
|
+
code: string;
|
|
227
|
+
label: string;
|
|
228
|
+
icon: string | null;
|
|
229
|
+
displayOrder: number;
|
|
230
|
+
applications: ApplicationDto[];
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export declare function DataTable<T>({ data, columns, loading, searchable, searchPlaceholder, pagination, onRowClick, getRowKey, emptyMessage, emptyIcon, headerActions, striped, compact, className, selectable, selectedKeys, onSelectionChange, searchFilter, defaultSortKey, defaultSortDirection, }: DataTableProps<T>): JSX.Element;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* DataTable - Composant de tableau de données standardisé SmartStack
|
|
237
|
+
*
|
|
238
|
+
* Fonctionnalités:
|
|
239
|
+
* - Tri par colonnes
|
|
240
|
+
* - Pagination
|
|
241
|
+
* - Recherche globale
|
|
242
|
+
* - Colonnes personnalisables
|
|
243
|
+
* - États vide/chargement
|
|
244
|
+
* - Sélection de lignes (optionnel)
|
|
245
|
+
*
|
|
246
|
+
* Usage:
|
|
247
|
+
* ```tsx
|
|
248
|
+
* <DataTable
|
|
249
|
+
* data={users}
|
|
250
|
+
* columns={[
|
|
251
|
+
* { key: 'name', label: 'Nom', sortable: true },
|
|
252
|
+
* { key: 'email', label: 'Email', sortable: true },
|
|
253
|
+
* { key: 'role', label: 'Rôle', render: (user) => <Badge>{user.role}</Badge> },
|
|
254
|
+
* ]}
|
|
255
|
+
* pagination={{ pageSize: 10 }}
|
|
256
|
+
* searchable
|
|
257
|
+
* onRowClick={(user) => navigate(`/users/${user.id}`)}
|
|
258
|
+
* />
|
|
259
|
+
* ```
|
|
260
|
+
*/
|
|
261
|
+
declare interface DataTableColumn<T> {
|
|
262
|
+
/** Unique key (matches data field or custom) */
|
|
263
|
+
key: string;
|
|
264
|
+
/** Column header label */
|
|
265
|
+
label: string;
|
|
266
|
+
/** Is column sortable */
|
|
267
|
+
sortable?: boolean;
|
|
268
|
+
/** Custom render function */
|
|
269
|
+
render?: (item: T, index: number) => ReactNode;
|
|
270
|
+
/** Column width (CSS value) */
|
|
271
|
+
width?: string;
|
|
272
|
+
/** Column alignment */
|
|
273
|
+
align?: 'left' | 'center' | 'right';
|
|
274
|
+
/** Hide on mobile */
|
|
275
|
+
hideOnMobile?: boolean;
|
|
276
|
+
/** Sticky column */
|
|
277
|
+
sticky?: 'left' | 'right';
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
declare interface DataTablePagination {
|
|
281
|
+
/** Items per page */
|
|
282
|
+
pageSize: number;
|
|
283
|
+
/** Available page sizes */
|
|
284
|
+
pageSizeOptions?: number[];
|
|
285
|
+
/** Show page size selector */
|
|
286
|
+
showSizeSelector?: boolean;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
declare interface DataTableProps<T> {
|
|
290
|
+
/** Data array */
|
|
291
|
+
data: T[];
|
|
292
|
+
/** Column definitions */
|
|
293
|
+
columns: DataTableColumn<T>[];
|
|
294
|
+
/** Loading state */
|
|
295
|
+
loading?: boolean;
|
|
296
|
+
/** Enable global search */
|
|
297
|
+
searchable?: boolean;
|
|
298
|
+
/** Search placeholder */
|
|
299
|
+
searchPlaceholder?: string;
|
|
300
|
+
/** Pagination config */
|
|
301
|
+
pagination?: DataTablePagination;
|
|
302
|
+
/** Row click handler */
|
|
303
|
+
onRowClick?: (item: T, index: number) => void;
|
|
304
|
+
/** Get unique key for each row */
|
|
305
|
+
getRowKey?: (item: T, index: number) => string;
|
|
306
|
+
/** Empty state message */
|
|
307
|
+
emptyMessage?: string;
|
|
308
|
+
/** Empty state icon */
|
|
309
|
+
emptyIcon?: ReactNode;
|
|
310
|
+
/** Custom header actions */
|
|
311
|
+
headerActions?: ReactNode;
|
|
312
|
+
/** Stripe rows */
|
|
313
|
+
striped?: boolean;
|
|
314
|
+
/** Compact mode */
|
|
315
|
+
compact?: boolean;
|
|
316
|
+
/** Custom className */
|
|
317
|
+
className?: string;
|
|
318
|
+
/** Enable row selection */
|
|
319
|
+
selectable?: boolean;
|
|
320
|
+
/** Selected row keys */
|
|
321
|
+
selectedKeys?: Set<string>;
|
|
322
|
+
/** Selection change handler */
|
|
323
|
+
onSelectionChange?: (keys: Set<string>) => void;
|
|
324
|
+
/** Custom search filter function */
|
|
325
|
+
searchFilter?: (item: T, searchTerm: string) => boolean;
|
|
326
|
+
/** Default sort column */
|
|
327
|
+
defaultSortKey?: string;
|
|
328
|
+
/** Default sort direction */
|
|
329
|
+
defaultSortDirection?: 'asc' | 'desc';
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
declare function DataView_2<T>({ data, viewMode: controlledViewMode, onViewModeChange, renderTable, renderCards, renderKanban, showTableView, showCardsView, showKanbanView, tableLabel, cardsLabel, kanbanLabel, }: DataViewProps<T>): JSX.Element;
|
|
333
|
+
export { DataView_2 as DataView }
|
|
334
|
+
|
|
335
|
+
declare interface DataViewProps<T> {
|
|
336
|
+
data: T[];
|
|
337
|
+
viewMode?: ViewMode;
|
|
338
|
+
onViewModeChange?: (mode: ViewMode) => void;
|
|
339
|
+
renderTable?: (data: T[]) => ReactNode;
|
|
340
|
+
renderCards?: (data: T[]) => ReactNode;
|
|
341
|
+
renderKanban?: (data: T[]) => ReactNode;
|
|
342
|
+
showTableView?: boolean;
|
|
343
|
+
showCardsView?: boolean;
|
|
344
|
+
showKanbanView?: boolean;
|
|
345
|
+
tableLabel?: string;
|
|
346
|
+
cardsLabel?: string;
|
|
347
|
+
kanbanLabel?: string;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
declare interface DeviceInfoDto {
|
|
351
|
+
type?: string;
|
|
352
|
+
screenResolution?: string;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export declare function DocEdgeButton(): JSX.Element | null;
|
|
356
|
+
|
|
357
|
+
export declare function DocPanel(): JSX.Element | null;
|
|
358
|
+
|
|
359
|
+
declare interface DocPanelContextType {
|
|
360
|
+
isOpen: boolean;
|
|
361
|
+
panelSize: number;
|
|
362
|
+
docUrl: string | null;
|
|
363
|
+
openDocPanel: (url?: string) => void;
|
|
364
|
+
closeDocPanel: () => void;
|
|
365
|
+
toggleDocPanel: () => void;
|
|
366
|
+
setPanelSize: (size: number) => void;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export declare function DocPanelProvider({ children }: {
|
|
370
|
+
children: ReactNode;
|
|
371
|
+
}): JSX.Element;
|
|
372
|
+
|
|
373
|
+
export declare function DocsLayout(): JSX.Element;
|
|
374
|
+
|
|
375
|
+
export declare function DocToggleButton({ className, customDocUrl }: DocToggleButtonProps): JSX.Element;
|
|
376
|
+
|
|
377
|
+
declare interface DocToggleButtonProps {
|
|
378
|
+
className?: string;
|
|
379
|
+
customDocUrl?: string;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export declare function EntityCard({ avatar, title, subtitle, description, stats, badge, links, actions, tags, onClick, className, customHeader, customBody, customFooter, }: EntityCardProps): JSX.Element;
|
|
383
|
+
|
|
384
|
+
declare interface EntityCardAction {
|
|
385
|
+
/** Button label */
|
|
386
|
+
label: string;
|
|
387
|
+
/** URL (makes it an <a> tag) */
|
|
388
|
+
href?: string;
|
|
389
|
+
/** Or onClick handler (makes it a <button>) */
|
|
390
|
+
onClick?: () => void;
|
|
391
|
+
/** Button variant */
|
|
392
|
+
variant?: 'primary' | 'secondary' | 'ghost';
|
|
393
|
+
/** Optional icon */
|
|
394
|
+
icon?: ElementType;
|
|
395
|
+
/** Disabled state */
|
|
396
|
+
disabled?: boolean;
|
|
397
|
+
/** Loading state */
|
|
398
|
+
loading?: boolean;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* EntityCard - Composant de card standardisé SmartStack
|
|
403
|
+
*
|
|
404
|
+
* Design de référence: /platform/administration/ai/settings (Provider cards)
|
|
405
|
+
*
|
|
406
|
+
* Caractéristiques:
|
|
407
|
+
* - Header coloré distinct avec avatar carré arrondi
|
|
408
|
+
* - Badge avec tooltip en haut à droite du header
|
|
409
|
+
* - Corps avec description, stats, liens
|
|
410
|
+
* - Boutons d'action en bas (push to bottom avec flex)
|
|
411
|
+
* - Support des couleurs d'accent dynamiques
|
|
412
|
+
*
|
|
413
|
+
* Usage:
|
|
414
|
+
* ```tsx
|
|
415
|
+
* <EntityCard
|
|
416
|
+
* avatar={{ letter: 'O', color: '#10a37f' }}
|
|
417
|
+
* title="OpenAI"
|
|
418
|
+
* subtitle="openai"
|
|
419
|
+
* description="OpenAI GPT models (GPT-4, GPT-4o, GPT-3.5)"
|
|
420
|
+
* stats="15 modèle(s)"
|
|
421
|
+
* badge={{ icon: Shield, tooltip: 'API Admin supportée' }}
|
|
422
|
+
* links={[
|
|
423
|
+
* { icon: ExternalLink, label: 'Site officiel', href: 'https://openai.com' },
|
|
424
|
+
* { icon: BookOpen, label: 'Documentation API', href: 'https://platform.openai.com/docs' },
|
|
425
|
+
* ]}
|
|
426
|
+
* actions={[
|
|
427
|
+
* { label: 'Obtenir une clé API', href: 'https://...', variant: 'primary', icon: Key },
|
|
428
|
+
* { label: 'Obtenir une clé API Admin', href: 'https://...', variant: 'secondary', icon: Shield },
|
|
429
|
+
* ]}
|
|
430
|
+
* />
|
|
431
|
+
* ```
|
|
432
|
+
*/
|
|
433
|
+
declare interface EntityCardAvatar {
|
|
434
|
+
/** Single letter to display */
|
|
435
|
+
letter: string;
|
|
436
|
+
/** Background color (CSS color) */
|
|
437
|
+
color: string;
|
|
438
|
+
/** Optional image URL (replaces letter if provided) */
|
|
439
|
+
imageUrl?: string;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
declare interface EntityCardBadge {
|
|
443
|
+
/** Icon component */
|
|
444
|
+
icon?: ElementType;
|
|
445
|
+
/** Tooltip text */
|
|
446
|
+
tooltip?: string;
|
|
447
|
+
/** Custom color override */
|
|
448
|
+
color?: string;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
declare interface EntityCardLink {
|
|
452
|
+
/** Icon component */
|
|
453
|
+
icon: ElementType;
|
|
454
|
+
/** Link label */
|
|
455
|
+
label: string;
|
|
456
|
+
/** URL (opens in new tab) */
|
|
457
|
+
href?: string;
|
|
458
|
+
/** Or onClick handler */
|
|
459
|
+
onClick?: () => void;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
declare interface EntityCardProps {
|
|
463
|
+
/** Avatar configuration */
|
|
464
|
+
avatar?: EntityCardAvatar;
|
|
465
|
+
/** Card title */
|
|
466
|
+
title: string;
|
|
467
|
+
/** Subtitle/code below title */
|
|
468
|
+
subtitle?: string;
|
|
469
|
+
/** Description text */
|
|
470
|
+
description?: string | ReactNode;
|
|
471
|
+
/** Stats text (e.g., "15 modèle(s)") */
|
|
472
|
+
stats?: string | ReactNode;
|
|
473
|
+
/** Optional badge in header top-right */
|
|
474
|
+
badge?: EntityCardBadge;
|
|
475
|
+
/** Array of link items */
|
|
476
|
+
links?: EntityCardLink[];
|
|
477
|
+
/** Array of action buttons */
|
|
478
|
+
actions?: EntityCardAction[];
|
|
479
|
+
/** Array of tags */
|
|
480
|
+
tags?: EntityCardTag[];
|
|
481
|
+
/** Click handler for entire card */
|
|
482
|
+
onClick?: () => void;
|
|
483
|
+
/** Additional className */
|
|
484
|
+
className?: string;
|
|
485
|
+
/** Custom header content (replaces default header) */
|
|
486
|
+
customHeader?: ReactNode;
|
|
487
|
+
/** Custom body content (replaces default body) */
|
|
488
|
+
customBody?: ReactNode;
|
|
489
|
+
/** Custom footer content (replaces default footer) */
|
|
490
|
+
customFooter?: ReactNode;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
declare interface EntityCardTag {
|
|
494
|
+
/** Tag label */
|
|
495
|
+
label: string;
|
|
496
|
+
/** Tag variant/color */
|
|
497
|
+
variant?: 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
498
|
+
/** Click handler (makes tag interactive) */
|
|
499
|
+
onClick?: () => void;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
declare interface ErrorInfoDto {
|
|
503
|
+
message?: string;
|
|
504
|
+
stack?: string;
|
|
505
|
+
component?: string;
|
|
506
|
+
timestamp?: string;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
declare interface FavoriteApplication {
|
|
510
|
+
id: string;
|
|
511
|
+
code: string;
|
|
512
|
+
label: string;
|
|
513
|
+
icon: string | null;
|
|
514
|
+
route: string | null;
|
|
515
|
+
displayOrder: number;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
declare interface FavoriteModule {
|
|
519
|
+
id: string;
|
|
520
|
+
code: string;
|
|
521
|
+
label: string;
|
|
522
|
+
icon: string;
|
|
523
|
+
route: string;
|
|
524
|
+
applicationId?: string;
|
|
525
|
+
applicationCode: string;
|
|
526
|
+
applicationLabel: string;
|
|
527
|
+
displayOrder?: number;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
declare interface FavoritesContextType {
|
|
531
|
+
favorites: FavoriteModule[];
|
|
532
|
+
loading: boolean;
|
|
533
|
+
error: string | null;
|
|
534
|
+
addFavorite: (module: FavoriteModule) => Promise<boolean>;
|
|
535
|
+
removeFavorite: (moduleId: string) => Promise<boolean>;
|
|
536
|
+
toggleFavorite: (module: FavoriteModule) => Promise<boolean>;
|
|
537
|
+
isFavorite: (moduleId: string) => boolean;
|
|
538
|
+
reorderFavorites: (newOrder: FavoriteModule[]) => Promise<boolean>;
|
|
539
|
+
canAddMore: boolean;
|
|
540
|
+
maxFavorites: number;
|
|
541
|
+
reload: () => Promise<void>;
|
|
542
|
+
expandFavorites: boolean;
|
|
543
|
+
triggerExpand: () => void;
|
|
544
|
+
clearExpand: () => void;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
export declare function FavoritesProvider({ children }: {
|
|
548
|
+
children: ReactNode;
|
|
549
|
+
}): JSX.Element;
|
|
550
|
+
|
|
551
|
+
export declare function Footer(): JSX.Element;
|
|
552
|
+
|
|
553
|
+
export declare class ForbiddenError extends Error {
|
|
554
|
+
constructor(message?: string);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
export declare function GlobalErrorBoundary({ children }: GlobalErrorBoundaryProps): JSX.Element;
|
|
558
|
+
|
|
559
|
+
declare interface GlobalErrorBoundaryProps {
|
|
560
|
+
children: React.ReactNode;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export declare function Header(): JSX.Element;
|
|
564
|
+
|
|
565
|
+
declare interface InheritanceMap {
|
|
566
|
+
[roleId: string]: Map<string, PermissionInheritanceInfo>;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
declare interface InheritanceMap_2 {
|
|
570
|
+
[roleId: string]: Map<string, PermissionInheritanceInfo_2>;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
export declare const ITEM_PALETTE_LABELS: Record<ItemPaletteKey, string>;
|
|
574
|
+
|
|
575
|
+
export declare interface ItemPaletteColors {
|
|
576
|
+
light: string;
|
|
577
|
+
medium: string;
|
|
578
|
+
dark: string;
|
|
579
|
+
border: string;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
export declare type ItemPaletteKey = 'neutral' | 'ocean' | 'forest' | 'sunset' | 'lavender' | 'rose';
|
|
583
|
+
|
|
584
|
+
export declare function KanbanBoard<T>({ columns, items, getItemId, getItemColumn, onMoveItem, renderCard, loading, onAddItem, onCardClick, cardActions, emptyColumnMessage, className, columnMinWidth, disabled, }: KanbanBoardProps<T>): JSX.Element;
|
|
585
|
+
|
|
586
|
+
declare interface KanbanBoardProps<T> {
|
|
587
|
+
/** Column definitions */
|
|
588
|
+
columns: KanbanColumn[];
|
|
589
|
+
/** All items */
|
|
590
|
+
items: T[];
|
|
591
|
+
/** Get unique item ID */
|
|
592
|
+
getItemId: (item: T) => string;
|
|
593
|
+
/** Get item's column ID */
|
|
594
|
+
getItemColumn: (item: T) => string;
|
|
595
|
+
/** Move item to new column */
|
|
596
|
+
onMoveItem: (itemId: string, newColumnId: string, newIndex?: number) => void;
|
|
597
|
+
/** Render card content */
|
|
598
|
+
renderCard: (item: T, index: number) => ReactNode;
|
|
599
|
+
/** Loading state */
|
|
600
|
+
loading?: boolean;
|
|
601
|
+
/** Add item handler */
|
|
602
|
+
onAddItem?: (columnId: string) => void;
|
|
603
|
+
/** Card click handler */
|
|
604
|
+
onCardClick?: (item: T) => void;
|
|
605
|
+
/** Card menu actions */
|
|
606
|
+
cardActions?: (item: T) => {
|
|
607
|
+
label: string;
|
|
608
|
+
onClick: () => void;
|
|
609
|
+
icon?: ReactNode;
|
|
610
|
+
}[];
|
|
611
|
+
/** Empty column message */
|
|
612
|
+
emptyColumnMessage?: string;
|
|
613
|
+
/** Custom className */
|
|
614
|
+
className?: string;
|
|
615
|
+
/** Column min width */
|
|
616
|
+
columnMinWidth?: string;
|
|
617
|
+
/** Disable drag & drop */
|
|
618
|
+
disabled?: boolean;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* KanbanBoard - Composant Kanban drag-and-drop standardisé SmartStack
|
|
623
|
+
*
|
|
624
|
+
* Fonctionnalités:
|
|
625
|
+
* - Colonnes avec compteurs
|
|
626
|
+
* - Drag & drop des cartes (natif HTML5)
|
|
627
|
+
* - Actions sur cartes et colonnes
|
|
628
|
+
* - États vide/chargement
|
|
629
|
+
* - Personnalisation des cartes
|
|
630
|
+
*
|
|
631
|
+
* Usage:
|
|
632
|
+
* ```tsx
|
|
633
|
+
* <KanbanBoard
|
|
634
|
+
* columns={[
|
|
635
|
+
* { id: 'todo', title: 'À faire', color: 'var(--warning-text)' },
|
|
636
|
+
* { id: 'in-progress', title: 'En cours', color: 'var(--info-text)' },
|
|
637
|
+
* { id: 'done', title: 'Terminé', color: 'var(--success-text)' },
|
|
638
|
+
* ]}
|
|
639
|
+
* items={tasks}
|
|
640
|
+
* getItemColumn={(task) => task.status}
|
|
641
|
+
* onMoveItem={(taskId, newColumnId) => updateTask(taskId, { status: newColumnId })}
|
|
642
|
+
* renderCard={(task) => <TaskCard task={task} />}
|
|
643
|
+
* />
|
|
644
|
+
* ```
|
|
645
|
+
*/
|
|
646
|
+
declare interface KanbanColumn {
|
|
647
|
+
/** Unique column ID */
|
|
648
|
+
id: string;
|
|
649
|
+
/** Column title */
|
|
650
|
+
title: string;
|
|
651
|
+
/** Optional color (CSS value) */
|
|
652
|
+
color?: string;
|
|
653
|
+
/** Max items in column (optional limit) */
|
|
654
|
+
maxItems?: number;
|
|
655
|
+
/** Can add items to this column */
|
|
656
|
+
canAddItem?: boolean;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
export declare function LanguageSwitcher(): JSX.Element;
|
|
660
|
+
|
|
661
|
+
declare interface LicenseContextType {
|
|
662
|
+
license: LicenseInfo | null;
|
|
663
|
+
isLoading: boolean;
|
|
664
|
+
error: string | null;
|
|
665
|
+
isFeatureEnabled: (feature: string) => boolean;
|
|
666
|
+
isReadOnlyMode: boolean;
|
|
667
|
+
refreshLicense: () => Promise<void>;
|
|
668
|
+
activateLicense: (key: string) => Promise<{
|
|
669
|
+
success: boolean;
|
|
670
|
+
error?: string;
|
|
671
|
+
}>;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
declare interface LicenseInfo {
|
|
675
|
+
productId: string;
|
|
676
|
+
companyId: string;
|
|
677
|
+
edition: string;
|
|
678
|
+
status: string;
|
|
679
|
+
activatedAt: string | null;
|
|
680
|
+
expiresAt: string;
|
|
681
|
+
daysUntilExpiration: number;
|
|
682
|
+
isValid: boolean;
|
|
683
|
+
isInTrial: boolean;
|
|
684
|
+
trialDaysRemaining: number;
|
|
685
|
+
isReadOnlyMode: boolean;
|
|
686
|
+
enabledFeatures: string[];
|
|
687
|
+
limits: LicenseLimits;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
declare interface LicenseLimits {
|
|
691
|
+
users: number;
|
|
692
|
+
storageGb: number;
|
|
693
|
+
apiCallsPerDay: number;
|
|
694
|
+
custom: Record<string, number>;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
export declare function LicenseProvider({ children }: {
|
|
698
|
+
children: ReactNode;
|
|
699
|
+
}): JSX.Element;
|
|
700
|
+
|
|
701
|
+
export declare type LoginErrorCode = 'INVALID_CREDENTIALS' | 'ACCOUNT_DISABLED' | 'ACCOUNT_LOCKED' | 'EXTERNAL_AUTH_REQUIRED' | 'INVALID_PASSWORD';
|
|
702
|
+
|
|
703
|
+
declare class LogService {
|
|
704
|
+
private queue;
|
|
705
|
+
private recentErrors;
|
|
706
|
+
private isProcessing;
|
|
707
|
+
private batchSize;
|
|
708
|
+
private batchDelay;
|
|
709
|
+
logError(error: Error | string, component?: string, metadata?: Record<string, unknown>): Promise<void>;
|
|
710
|
+
logCritical(error: Error | string, component?: string, metadata?: Record<string, unknown>): Promise<void>;
|
|
711
|
+
getRecentErrors(): Array<ClientErrorLog & {
|
|
712
|
+
timestamp: Date;
|
|
713
|
+
}>;
|
|
714
|
+
clearRecentErrors(): void;
|
|
715
|
+
private storeRecentError;
|
|
716
|
+
logEvent(event: string, category: string, data?: Record<string, unknown>): Promise<void>;
|
|
717
|
+
private processQueue;
|
|
718
|
+
private sendError;
|
|
719
|
+
private sendEvent;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
export declare const logService: LogService;
|
|
723
|
+
|
|
724
|
+
declare interface MatrixFilters {
|
|
725
|
+
selectedRoleIds: string[];
|
|
726
|
+
resourceSearch: string;
|
|
727
|
+
contextFilter: string;
|
|
728
|
+
applicationFilter: string;
|
|
729
|
+
moduleFilter: string;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
declare interface MatrixFilters_2 {
|
|
733
|
+
selectedRoleIds: string[];
|
|
734
|
+
resourceSearch: string;
|
|
735
|
+
contextFilter: string;
|
|
736
|
+
applicationFilter: string;
|
|
737
|
+
moduleFilter: string;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
declare interface MatrixRoleDto {
|
|
741
|
+
id: string;
|
|
742
|
+
name: string;
|
|
743
|
+
shortName: string;
|
|
744
|
+
category: RoleCategory;
|
|
745
|
+
description: string | null;
|
|
746
|
+
isSystem: boolean;
|
|
747
|
+
permissionIds: string[];
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
declare interface MenuDto {
|
|
751
|
+
contexts: ContextMenuDto[];
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
declare interface ModuleDto {
|
|
755
|
+
id: string;
|
|
756
|
+
code: string;
|
|
757
|
+
label: string;
|
|
758
|
+
icon: string | null;
|
|
759
|
+
route: string | null;
|
|
760
|
+
displayOrder: number;
|
|
761
|
+
sections: SectionDto[];
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
export declare function ModuleSidebar({ isOpen, onClose }: ModuleSidebarProps): JSX.Element | null;
|
|
765
|
+
|
|
766
|
+
declare interface ModuleSidebarProps {
|
|
767
|
+
isOpen: boolean;
|
|
768
|
+
onClose: () => void;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
declare interface NavigationContext {
|
|
772
|
+
code: string;
|
|
773
|
+
label: string;
|
|
774
|
+
icon: string;
|
|
775
|
+
route: string;
|
|
776
|
+
color: string;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
declare interface NavigationContextType {
|
|
780
|
+
menu: MenuDto | null;
|
|
781
|
+
favorites: FavoriteApplication[];
|
|
782
|
+
currentContextCode: string | null;
|
|
783
|
+
currentAppCode: string | null;
|
|
784
|
+
currentModuleCode: string | null;
|
|
785
|
+
isLoading: boolean;
|
|
786
|
+
getCurrentContext: () => ContextMenuDto | undefined;
|
|
787
|
+
getCurrentApplication: () => ApplicationDto | undefined;
|
|
788
|
+
getCurrentModule: () => ModuleDto | undefined;
|
|
789
|
+
getApplicationsForContext: (contextCode: string) => ApplicationDto[];
|
|
790
|
+
toggleFavorite: (applicationId: string) => Promise<void>;
|
|
791
|
+
isFavorite: (applicationId: string) => boolean;
|
|
792
|
+
refreshMenu: () => Promise<void>;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
export declare function NavigationProvider({ children }: {
|
|
796
|
+
children: ReactNode;
|
|
797
|
+
}): JSX.Element;
|
|
798
|
+
|
|
799
|
+
export declare class NetworkError extends Error {
|
|
800
|
+
constructor(message?: string);
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
declare interface NotificationDto {
|
|
804
|
+
id: string;
|
|
805
|
+
type: string;
|
|
806
|
+
title: string;
|
|
807
|
+
message: string;
|
|
808
|
+
relatedEntityType: string | null;
|
|
809
|
+
relatedEntityId: string | null;
|
|
810
|
+
actionUrl: string | null;
|
|
811
|
+
isRead: boolean;
|
|
812
|
+
readAt: string | null;
|
|
813
|
+
createdAt: string;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
declare interface OsInfoDto {
|
|
817
|
+
name?: string;
|
|
818
|
+
version?: string;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
export declare function PageHeader({ title, subtitle, icon, actions, }: PageHeaderProps): JSX.Element;
|
|
822
|
+
|
|
823
|
+
declare interface PageHeaderProps {
|
|
824
|
+
title: string;
|
|
825
|
+
subtitle?: string;
|
|
826
|
+
icon?: ReactNode;
|
|
827
|
+
actions?: ReactNode;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
declare interface PermissionInheritanceInfo {
|
|
831
|
+
isDirect: boolean;
|
|
832
|
+
isInherited: boolean;
|
|
833
|
+
inheritedFromPath?: string;
|
|
834
|
+
inheritedFromId?: string;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
declare interface PermissionInheritanceInfo_2 {
|
|
838
|
+
isDirect: boolean;
|
|
839
|
+
isInherited: boolean;
|
|
840
|
+
inheritedFromPath?: string;
|
|
841
|
+
inheritedFromId?: string;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
declare interface PermissionListDto {
|
|
845
|
+
id: string;
|
|
846
|
+
path: string;
|
|
847
|
+
level: string;
|
|
848
|
+
action: string | null;
|
|
849
|
+
isWildcard: boolean;
|
|
850
|
+
description: string | null;
|
|
851
|
+
rolesCount: number;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
export declare function PermissionMatrix<R, C>({ rows, columns, getRowId, getRowLabel, getRowGroup, getRowSubGroup, getRowIcon, isRowLocked, getRowChildCount, getColumnId, getColumnLabel, getColumnShortLabel, isColumnLocked, getColumnColor, getCellState, onCellClick, loading, showLegend, searchable, rowColumnWidth, cellWidth, className, emptyMessage, canEditLocked, }: PermissionMatrixProps<R, C>): JSX.Element;
|
|
855
|
+
|
|
856
|
+
declare interface PermissionMatrixProps<R, C> {
|
|
857
|
+
/** Row data array */
|
|
858
|
+
rows: R[];
|
|
859
|
+
/** Column data array */
|
|
860
|
+
columns: C[];
|
|
861
|
+
/** Get unique row ID */
|
|
862
|
+
getRowId: (row: R) => string;
|
|
863
|
+
/** Get row display label */
|
|
864
|
+
getRowLabel: (row: R) => string;
|
|
865
|
+
/** Get row group (for collapsible sections) */
|
|
866
|
+
getRowGroup?: (row: R) => string | undefined;
|
|
867
|
+
/** Get row sub-group */
|
|
868
|
+
getRowSubGroup?: (row: R) => string | undefined;
|
|
869
|
+
/** Get row icon */
|
|
870
|
+
getRowIcon?: (row: R) => ReactNode;
|
|
871
|
+
/** Is row locked (read-only) */
|
|
872
|
+
isRowLocked?: (row: R) => boolean;
|
|
873
|
+
/** Get row child count (for display) */
|
|
874
|
+
getRowChildCount?: (row: R) => number | undefined;
|
|
875
|
+
/** Get unique column ID */
|
|
876
|
+
getColumnId: (col: C) => string;
|
|
877
|
+
/** Get column display label */
|
|
878
|
+
getColumnLabel: (col: C) => string;
|
|
879
|
+
/** Get column short label (for rotated header) */
|
|
880
|
+
getColumnShortLabel?: (col: C) => string;
|
|
881
|
+
/** Is column locked (read-only) */
|
|
882
|
+
isColumnLocked?: (col: C) => boolean;
|
|
883
|
+
/** Get column color */
|
|
884
|
+
getColumnColor?: (col: C) => string | undefined;
|
|
885
|
+
/** Get cell state */
|
|
886
|
+
getCellState: (rowId: string, colId: string) => CellState;
|
|
887
|
+
/** Cell click handler */
|
|
888
|
+
onCellClick?: (rowId: string, colId: string) => void;
|
|
889
|
+
/** Loading state */
|
|
890
|
+
loading?: boolean;
|
|
891
|
+
/** Show legend */
|
|
892
|
+
showLegend?: boolean;
|
|
893
|
+
/** Show search */
|
|
894
|
+
searchable?: boolean;
|
|
895
|
+
/** Row column width */
|
|
896
|
+
rowColumnWidth?: string;
|
|
897
|
+
/** Cell width */
|
|
898
|
+
cellWidth?: string;
|
|
899
|
+
/** Custom className */
|
|
900
|
+
className?: string;
|
|
901
|
+
/** Empty message */
|
|
902
|
+
emptyMessage?: string;
|
|
903
|
+
/** Can edit locked columns */
|
|
904
|
+
canEditLocked?: boolean;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
export declare function PublicLayout(): JSX.Element;
|
|
908
|
+
|
|
909
|
+
export declare function ResizableMainContent({ children }: ResizableMainContentProps): JSX.Element;
|
|
910
|
+
|
|
911
|
+
declare interface ResizableMainContentProps {
|
|
912
|
+
children: ReactNode;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
declare interface ResourceDto {
|
|
916
|
+
id: string;
|
|
917
|
+
code: string;
|
|
918
|
+
label: string;
|
|
919
|
+
route: string | null;
|
|
920
|
+
displayOrder: number;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
declare interface ResourceNode {
|
|
924
|
+
id: string;
|
|
925
|
+
path: string;
|
|
926
|
+
label: string;
|
|
927
|
+
contextLabel: string;
|
|
928
|
+
applicationLabel: string;
|
|
929
|
+
moduleLabel: string;
|
|
930
|
+
parentModuleLabel?: string;
|
|
931
|
+
parentModuleId?: string;
|
|
932
|
+
parentSectionLabel?: string;
|
|
933
|
+
parentSectionId?: string;
|
|
934
|
+
level: 'module' | 'section' | 'resource';
|
|
935
|
+
permissions: ResourcePermission[];
|
|
936
|
+
totalPermissions: number;
|
|
937
|
+
childSections?: ResourceNode[];
|
|
938
|
+
childResources?: ResourceNode[];
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
declare interface ResourceNode_2 {
|
|
942
|
+
id: string;
|
|
943
|
+
path: string;
|
|
944
|
+
label: string;
|
|
945
|
+
contextLabel: string;
|
|
946
|
+
applicationLabel: string;
|
|
947
|
+
moduleLabel: string;
|
|
948
|
+
parentModuleLabel?: string;
|
|
949
|
+
parentModuleId?: string;
|
|
950
|
+
parentSectionLabel?: string;
|
|
951
|
+
parentSectionId?: string;
|
|
952
|
+
level: 'module' | 'section' | 'resource';
|
|
953
|
+
permissions: ResourcePermission_2[];
|
|
954
|
+
totalPermissions: number;
|
|
955
|
+
childSections?: ResourceNode_2[];
|
|
956
|
+
childResources?: ResourceNode_2[];
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
declare interface ResourcePermission {
|
|
960
|
+
id: string;
|
|
961
|
+
action: string;
|
|
962
|
+
path: string;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
declare interface ResourcePermission_2 {
|
|
966
|
+
id: string;
|
|
967
|
+
action: string;
|
|
968
|
+
path: string;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
declare type RoleCategory = 'Global' | 'Admin' | 'Manager' | 'Contributor' | 'Viewer' | 'Custom';
|
|
972
|
+
|
|
973
|
+
declare interface RoleDto {
|
|
974
|
+
id: string;
|
|
975
|
+
name: string;
|
|
976
|
+
shortName: string;
|
|
977
|
+
category: RoleCategory;
|
|
978
|
+
description: string | null;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
declare interface RolePermissions {
|
|
982
|
+
[roleId: string]: Set<string>;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
declare interface RolePermissions_2 {
|
|
986
|
+
[roleId: string]: Set<string>;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
declare interface SectionDto {
|
|
990
|
+
id: string;
|
|
991
|
+
code: string;
|
|
992
|
+
label: string;
|
|
993
|
+
icon: string | null;
|
|
994
|
+
route: string | null;
|
|
995
|
+
displayOrder: number;
|
|
996
|
+
resources: ResourceDto[];
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
declare interface SessionContextType {
|
|
1000
|
+
isSessionActive: boolean;
|
|
1001
|
+
timeRemainingSeconds: number;
|
|
1002
|
+
isWarning: boolean;
|
|
1003
|
+
refreshSession: () => Promise<boolean>;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
declare interface SessionInfoResponse {
|
|
1007
|
+
sessionId: string;
|
|
1008
|
+
loginAt: string;
|
|
1009
|
+
lastActivityAt: string;
|
|
1010
|
+
timeUntilIdleExpirySeconds: number;
|
|
1011
|
+
timeUntilAbsoluteExpirySeconds: number;
|
|
1012
|
+
isWarningThreshold: boolean;
|
|
1013
|
+
idleTimeoutMinutes: number;
|
|
1014
|
+
absoluteTimeoutHours: number;
|
|
1015
|
+
warningThresholdMinutes: number;
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
export declare function SessionProvider({ children }: {
|
|
1019
|
+
children: ReactNode;
|
|
1020
|
+
}): JSX.Element;
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* Set the base URL for all API calls.
|
|
1024
|
+
* Call this before making any API requests, typically in your app initialization.
|
|
1025
|
+
*/
|
|
1026
|
+
export declare function setApiBaseUrl(url: string): void;
|
|
1027
|
+
|
|
1028
|
+
declare interface SidebarContextType {
|
|
1029
|
+
isCollapsed: boolean;
|
|
1030
|
+
toggleCollapsed: () => void;
|
|
1031
|
+
setCollapsed: (collapsed: boolean) => void;
|
|
1032
|
+
sidebarWidth: number;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
export declare function SidebarProvider({ children }: {
|
|
1036
|
+
children: ReactNode;
|
|
1037
|
+
}): JSX.Element;
|
|
1038
|
+
|
|
1039
|
+
/**
|
|
1040
|
+
* Main wrapper component for SmartStack applications.
|
|
1041
|
+
* Provides all necessary contexts and providers.
|
|
1042
|
+
*
|
|
1043
|
+
* @example
|
|
1044
|
+
* ```tsx
|
|
1045
|
+
* import { SmartStackApp, SmartStackRoutes } from '@smartstack/react';
|
|
1046
|
+
*
|
|
1047
|
+
* function App() {
|
|
1048
|
+
* return (
|
|
1049
|
+
* <SmartStackApp config={{ apiUrl: 'http://localhost:5142' }}>
|
|
1050
|
+
* <SmartStackRoutes />
|
|
1051
|
+
* </SmartStackApp>
|
|
1052
|
+
* );
|
|
1053
|
+
* }
|
|
1054
|
+
* ```
|
|
1055
|
+
*/
|
|
1056
|
+
export declare function SmartStackApp({ config, children }: SmartStackAppProps): JSX.Element;
|
|
1057
|
+
|
|
1058
|
+
declare interface SmartStackAppProps {
|
|
1059
|
+
/** SmartStack configuration */
|
|
1060
|
+
config: SmartStackConfig;
|
|
1061
|
+
/** Child routes/components */
|
|
1062
|
+
children: React.ReactNode;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* Configuration options for SmartStack application
|
|
1067
|
+
*/
|
|
1068
|
+
export declare interface SmartStackConfig {
|
|
1069
|
+
/** Base URL for the API (e.g., 'http://localhost:5142') */
|
|
1070
|
+
apiUrl: string;
|
|
1071
|
+
/** Enable page tracking */
|
|
1072
|
+
enablePageTracking?: boolean;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
/**
|
|
1076
|
+
* All SmartStack routes.
|
|
1077
|
+
* Include this component in your app to get all SmartStack functionality.
|
|
1078
|
+
*
|
|
1079
|
+
* @example
|
|
1080
|
+
* ```tsx
|
|
1081
|
+
* import { SmartStackApp, SmartStackRoutes } from '@smartstack/react';
|
|
1082
|
+
* import { Routes, Route } from 'react-router-dom';
|
|
1083
|
+
*
|
|
1084
|
+
* function App() {
|
|
1085
|
+
* return (
|
|
1086
|
+
* <SmartStackApp config={{ apiUrl: 'http://localhost:5142' }}>
|
|
1087
|
+
* <Routes>
|
|
1088
|
+
* {/* SmartStack routes *\/}
|
|
1089
|
+
* <Route path="/*" element={<SmartStackRoutes />} />
|
|
1090
|
+
* {/* Your custom routes *\/}
|
|
1091
|
+
* <Route path="/my-module" element={<MyCustomPage />} />
|
|
1092
|
+
* </Routes>
|
|
1093
|
+
* </SmartStackApp>
|
|
1094
|
+
* );
|
|
1095
|
+
* }
|
|
1096
|
+
* ```
|
|
1097
|
+
*/
|
|
1098
|
+
export declare function SmartStackRoutes(): JSX.Element;
|
|
1099
|
+
|
|
1100
|
+
export declare interface StatusColor {
|
|
1101
|
+
bg: string;
|
|
1102
|
+
text: string;
|
|
1103
|
+
border: string;
|
|
1104
|
+
dot: string;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
export declare interface StatusColors {
|
|
1108
|
+
success: StatusColor;
|
|
1109
|
+
warning: StatusColor;
|
|
1110
|
+
error: StatusColor;
|
|
1111
|
+
info: StatusColor;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
export declare interface TextColors {
|
|
1115
|
+
primary: string;
|
|
1116
|
+
secondary: string;
|
|
1117
|
+
tertiary: string;
|
|
1118
|
+
muted: string;
|
|
1119
|
+
inverse: string;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
export declare interface ThemeConfig {
|
|
1123
|
+
mode: ThemeMode;
|
|
1124
|
+
borderRadius: BorderRadiusConfig;
|
|
1125
|
+
colors: {
|
|
1126
|
+
light: ColorPalette;
|
|
1127
|
+
dark: ColorPalette;
|
|
1128
|
+
};
|
|
1129
|
+
accentColorKey: string;
|
|
1130
|
+
itemPaletteKey: ItemPaletteKey;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
declare interface ThemeContextType {
|
|
1134
|
+
config: ThemeConfig;
|
|
1135
|
+
mode: ThemeMode;
|
|
1136
|
+
toggleMode: () => void;
|
|
1137
|
+
setMode: (mode: ThemeMode) => void;
|
|
1138
|
+
setBorderRadius: (element: keyof BorderRadiusConfig, size: BorderRadiusSize) => void;
|
|
1139
|
+
setAccentColor: (colorKey: string) => void;
|
|
1140
|
+
setItemPalette: (paletteKey: ItemPaletteKey) => void;
|
|
1141
|
+
applyPreset: (presetConfig: Partial<ThemeConfig>) => void;
|
|
1142
|
+
resetToDefault: () => void;
|
|
1143
|
+
getBorderRadius: (element: keyof BorderRadiusConfig) => string;
|
|
1144
|
+
loadFromServer: () => Promise<void>;
|
|
1145
|
+
isSyncing: boolean;
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
export declare function ThemeCustomizer(): JSX.Element;
|
|
1149
|
+
|
|
1150
|
+
export declare type ThemeMode = 'light' | 'dark';
|
|
1151
|
+
|
|
1152
|
+
export declare interface ThemePreset {
|
|
1153
|
+
id: string;
|
|
1154
|
+
name: string;
|
|
1155
|
+
description: string;
|
|
1156
|
+
icon: string;
|
|
1157
|
+
config: Partial<ThemeConfig>;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
export declare function ThemeProvider({ children }: {
|
|
1161
|
+
children: ReactNode;
|
|
1162
|
+
}): JSX.Element;
|
|
1163
|
+
|
|
1164
|
+
export declare function ThemeSwitcher(): JSX.Element;
|
|
1165
|
+
|
|
1166
|
+
declare interface TicketCommentDto {
|
|
1167
|
+
id: string;
|
|
1168
|
+
ticketId: string;
|
|
1169
|
+
userName: string;
|
|
1170
|
+
content: string;
|
|
1171
|
+
isInternal: boolean;
|
|
1172
|
+
isEdited: boolean;
|
|
1173
|
+
createdAt: string;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
declare interface TicketUpdateDto {
|
|
1177
|
+
ticketId: string;
|
|
1178
|
+
updateType: string;
|
|
1179
|
+
oldValue?: string;
|
|
1180
|
+
newValue?: string;
|
|
1181
|
+
changedByName?: string;
|
|
1182
|
+
changedAt: string;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
export declare function Tooltip({ content, children, position, variant, delay, disabled, className, }: TooltipProps): JSX.Element;
|
|
1186
|
+
|
|
1187
|
+
declare type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
1188
|
+
|
|
1189
|
+
declare interface TooltipProps {
|
|
1190
|
+
content: ReactNode;
|
|
1191
|
+
children: ReactNode;
|
|
1192
|
+
position?: TooltipPosition;
|
|
1193
|
+
variant?: TooltipVariant;
|
|
1194
|
+
delay?: number;
|
|
1195
|
+
disabled?: boolean;
|
|
1196
|
+
className?: string;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
declare type TooltipVariant = 'default' | 'error' | 'warning' | 'success' | 'info';
|
|
1200
|
+
|
|
1201
|
+
export declare function UnderDevelopment({ title, description, icon, showBackButton, backUrl, children }: UnderDevelopmentProps): JSX.Element;
|
|
1202
|
+
|
|
1203
|
+
declare interface UnderDevelopmentProps {
|
|
1204
|
+
/** Title to display, defaults to i18n key */
|
|
1205
|
+
title?: string;
|
|
1206
|
+
/** Description to display, defaults to i18n key */
|
|
1207
|
+
description?: string;
|
|
1208
|
+
/** Icon to display, defaults to Construction */
|
|
1209
|
+
icon?: React.ReactNode;
|
|
1210
|
+
/** Show back button */
|
|
1211
|
+
showBackButton?: boolean;
|
|
1212
|
+
/** Custom back URL */
|
|
1213
|
+
backUrl?: string;
|
|
1214
|
+
/** Additional content to display below the message */
|
|
1215
|
+
children?: React.ReactNode;
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
export declare function UnlockAccountModal({ isOpen, onClose, onConfirm, userName, }: UnlockAccountModalProps): JSX.Element | null;
|
|
1219
|
+
|
|
1220
|
+
declare interface UnlockAccountModalProps {
|
|
1221
|
+
isOpen: boolean;
|
|
1222
|
+
onClose: () => void;
|
|
1223
|
+
onConfirm: (reason: UnlockReason, mustChangePassword: boolean) => void;
|
|
1224
|
+
userName: string;
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
declare const UnlockReason: {
|
|
1228
|
+
readonly PasswordResetMalfunction: 1;
|
|
1229
|
+
readonly FalsePositive: 2;
|
|
1230
|
+
readonly UrgentBusinessNeed: 3;
|
|
1231
|
+
readonly TechnicalSystemError: 4;
|
|
1232
|
+
readonly SupportTicketVerified: 5;
|
|
1233
|
+
};
|
|
1234
|
+
|
|
1235
|
+
declare type UnlockReason = typeof UnlockReason[keyof typeof UnlockReason];
|
|
1236
|
+
|
|
1237
|
+
export declare function useAuth(): AuthContextType;
|
|
1238
|
+
|
|
1239
|
+
/**
|
|
1240
|
+
* Hook to capture client context for ticket creation.
|
|
1241
|
+
* Captures browser info, OS info, device type, and recent errors.
|
|
1242
|
+
*/
|
|
1243
|
+
export declare function useClientContext(): {
|
|
1244
|
+
captureContext: () => ClientContextDto;
|
|
1245
|
+
};
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* Hook to manage collapse/expand state for hierarchical lists.
|
|
1249
|
+
* Used by permission matrix components to track collapsed contexts and applications.
|
|
1250
|
+
*/
|
|
1251
|
+
export declare function useCollapsibleState(): {
|
|
1252
|
+
collapsedContexts: Set<string>;
|
|
1253
|
+
collapsedApps: Set<string>;
|
|
1254
|
+
toggleContext: (context: string) => void;
|
|
1255
|
+
toggleApp: (appKey: string) => void;
|
|
1256
|
+
expandAll: () => void;
|
|
1257
|
+
collapseAll: (contexts: string[], apps: string[]) => void;
|
|
1258
|
+
isContextCollapsed: (context: string) => boolean;
|
|
1259
|
+
isAppCollapsed: (appKey: string) => boolean;
|
|
1260
|
+
};
|
|
1261
|
+
|
|
1262
|
+
export declare function useDocPanel(): DocPanelContextType;
|
|
1263
|
+
|
|
1264
|
+
declare function useFavorites(): FavoritesContextType;
|
|
1265
|
+
export { useFavorites as useFavoriteModules }
|
|
1266
|
+
export { useFavorites }
|
|
1267
|
+
|
|
1268
|
+
export declare function useLicense(): LicenseContextType;
|
|
1269
|
+
|
|
1270
|
+
export declare function useNavigation(): NavigationContextType;
|
|
1271
|
+
|
|
1272
|
+
export declare function usePageTracking(): void;
|
|
1273
|
+
|
|
1274
|
+
export declare function usePermissionMatrix(options?: UsePermissionMatrixOptions): UsePermissionMatrixResult;
|
|
1275
|
+
|
|
1276
|
+
declare interface UsePermissionMatrixOptions {
|
|
1277
|
+
canEditSystemRoles?: boolean;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
declare interface UsePermissionMatrixResult {
|
|
1281
|
+
loading: boolean;
|
|
1282
|
+
error: string | null;
|
|
1283
|
+
saveError: string | null;
|
|
1284
|
+
saving: boolean;
|
|
1285
|
+
saveSuccess: boolean;
|
|
1286
|
+
roles: MatrixRoleDto[];
|
|
1287
|
+
resources: ResourceNode[];
|
|
1288
|
+
permissions: Map<string, PermissionListDto>;
|
|
1289
|
+
assignments: RolePermissions;
|
|
1290
|
+
inheritanceMap: InheritanceMap;
|
|
1291
|
+
filters: MatrixFilters;
|
|
1292
|
+
filteredRoles: MatrixRoleDto[];
|
|
1293
|
+
filteredResources: ResourceNode[];
|
|
1294
|
+
hasChanges: boolean;
|
|
1295
|
+
canEditSystemRoles: boolean;
|
|
1296
|
+
contexts: string[];
|
|
1297
|
+
applications: {
|
|
1298
|
+
context: string;
|
|
1299
|
+
app: string;
|
|
1300
|
+
label: string;
|
|
1301
|
+
}[];
|
|
1302
|
+
modules: {
|
|
1303
|
+
context: string;
|
|
1304
|
+
app: string;
|
|
1305
|
+
module: string;
|
|
1306
|
+
label: string;
|
|
1307
|
+
}[];
|
|
1308
|
+
togglePermission: (roleId: string, permissionId: string) => void;
|
|
1309
|
+
toggleAllForRole: (roleId: string, grant: boolean) => void;
|
|
1310
|
+
toggleAllForResource: (resourceNode: ResourceNode, grant: boolean) => void;
|
|
1311
|
+
updateFilters: (filters: Partial<MatrixFilters>) => void;
|
|
1312
|
+
reloadData: () => Promise<void>;
|
|
1313
|
+
resetChanges: () => void;
|
|
1314
|
+
saveChanges: () => Promise<void>;
|
|
1315
|
+
clearSaveError: () => void;
|
|
1316
|
+
getPermissionInheritance: (roleId: string, permissionId: string) => PermissionInheritanceInfo;
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
export declare function usePermissionSync(): {
|
|
1320
|
+
isConnected: boolean;
|
|
1321
|
+
connectionState: HubConnectionState;
|
|
1322
|
+
isAuthenticated: boolean;
|
|
1323
|
+
};
|
|
1324
|
+
|
|
1325
|
+
declare interface User {
|
|
1326
|
+
id: string;
|
|
1327
|
+
email: string;
|
|
1328
|
+
firstName: string | null;
|
|
1329
|
+
lastName: string | null;
|
|
1330
|
+
roles: string[];
|
|
1331
|
+
permissions: string[];
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
declare interface UserDetailDto {
|
|
1335
|
+
id: string;
|
|
1336
|
+
email: string;
|
|
1337
|
+
firstName: string;
|
|
1338
|
+
lastName: string;
|
|
1339
|
+
fullName: string;
|
|
1340
|
+
isActive: boolean;
|
|
1341
|
+
userType: string;
|
|
1342
|
+
roles: RoleDto[];
|
|
1343
|
+
lastLoginAt: string | null;
|
|
1344
|
+
createdAt: string;
|
|
1345
|
+
updatedAt: string | null;
|
|
1346
|
+
isLocked: boolean;
|
|
1347
|
+
lockoutEnd: string | null;
|
|
1348
|
+
lastUnlockReason: number | null;
|
|
1349
|
+
lockedBy: string | null;
|
|
1350
|
+
lockedAt: string | null;
|
|
1351
|
+
isTemporarilyLocked: boolean;
|
|
1352
|
+
temporaryLockoutEnd: string | null;
|
|
1353
|
+
entraObjectId: string | null;
|
|
1354
|
+
authProvider: string | null;
|
|
1355
|
+
lastEntraSyncAt: string | null;
|
|
1356
|
+
entraUserPurpose: string | null;
|
|
1357
|
+
departmentId: string | null;
|
|
1358
|
+
departmentName: string | null;
|
|
1359
|
+
jobTitleId: string | null;
|
|
1360
|
+
jobTitleName: string | null;
|
|
1361
|
+
companyId: string | null;
|
|
1362
|
+
companyName: string | null;
|
|
1363
|
+
officeId: string | null;
|
|
1364
|
+
officeName: string | null;
|
|
1365
|
+
employeeId: string | null;
|
|
1366
|
+
employeeType: string | null;
|
|
1367
|
+
employeeHireDate: string | null;
|
|
1368
|
+
employeeOrgData: string | null;
|
|
1369
|
+
managerId: string | null;
|
|
1370
|
+
managerName: string | null;
|
|
1371
|
+
sponsors: string | null;
|
|
1372
|
+
phoneNumber: string | null;
|
|
1373
|
+
mobilePhone: string | null;
|
|
1374
|
+
faxNumber: string | null;
|
|
1375
|
+
streetAddress: string | null;
|
|
1376
|
+
city: string | null;
|
|
1377
|
+
state: string | null;
|
|
1378
|
+
postalCode: string | null;
|
|
1379
|
+
country: string | null;
|
|
1380
|
+
otherEmails: string | null;
|
|
1381
|
+
proxyAddresses: string | null;
|
|
1382
|
+
imAddresses: string | null;
|
|
1383
|
+
mailNickname: string | null;
|
|
1384
|
+
emailConfirmed: boolean;
|
|
1385
|
+
hasCompletedOnboarding: boolean;
|
|
1386
|
+
mustChangePassword: boolean;
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
export declare function UserHeader({ onMenuToggle }: UserHeaderProps): JSX.Element;
|
|
1390
|
+
|
|
1391
|
+
declare interface UserHeaderProps {
|
|
1392
|
+
onMenuToggle?: () => void;
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
export declare function UserLayout(): JSX.Element;
|
|
1396
|
+
|
|
1397
|
+
export declare function UserSidebar({ isOpen, onClose }: UserSidebarProps): JSX.Element;
|
|
1398
|
+
|
|
1399
|
+
declare interface UserSidebarProps {
|
|
1400
|
+
isOpen?: boolean;
|
|
1401
|
+
onClose?: () => void;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
export declare function useSession(): SessionContextType;
|
|
1405
|
+
|
|
1406
|
+
export declare function useSessionMonitor(options?: UseSessionMonitorOptions): {
|
|
1407
|
+
isRefreshing: boolean;
|
|
1408
|
+
refreshSession: () => Promise<boolean>;
|
|
1409
|
+
checkSession: () => Promise<void>;
|
|
1410
|
+
isActive: boolean;
|
|
1411
|
+
timeRemainingSeconds: number;
|
|
1412
|
+
isWarning: boolean;
|
|
1413
|
+
sessionInfo: SessionInfoResponse | null;
|
|
1414
|
+
};
|
|
1415
|
+
|
|
1416
|
+
declare interface UseSessionMonitorOptions {
|
|
1417
|
+
checkIntervalMs?: number;
|
|
1418
|
+
onSessionExpired?: () => void;
|
|
1419
|
+
onWarningThreshold?: () => void;
|
|
1420
|
+
enabled?: boolean;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
export declare function useSidebar(): SidebarContextType;
|
|
1424
|
+
|
|
1425
|
+
export declare function useSignalR(options?: UseSignalROptions): {
|
|
1426
|
+
connectionState: signalR.HubConnectionState;
|
|
1427
|
+
isConnected: boolean;
|
|
1428
|
+
connect: () => Promise<void>;
|
|
1429
|
+
disconnect: () => Promise<void>;
|
|
1430
|
+
};
|
|
1431
|
+
|
|
1432
|
+
declare interface UseSignalROptions {
|
|
1433
|
+
onNotification?: (notification: NotificationDto) => void;
|
|
1434
|
+
onUnreadCountUpdate?: (count: number) => void;
|
|
1435
|
+
onPermissionsChanged?: () => void;
|
|
1436
|
+
onConnectionStateChange?: (state: signalR.HubConnectionState) => void;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
export declare function useTheme(): ThemeContextType;
|
|
1440
|
+
|
|
1441
|
+
export declare function useTicketSignalR(options: UseTicketSignalROptions): {
|
|
1442
|
+
connectionState: signalR.HubConnectionState;
|
|
1443
|
+
isConnected: boolean;
|
|
1444
|
+
joinTicket: (id: string) => Promise<void>;
|
|
1445
|
+
leaveTicket: (id: string) => Promise<void>;
|
|
1446
|
+
};
|
|
1447
|
+
|
|
1448
|
+
declare interface UseTicketSignalROptions {
|
|
1449
|
+
ticketId: string | undefined;
|
|
1450
|
+
onCommentAdded?: (comment: TicketCommentDto) => void;
|
|
1451
|
+
onTicketUpdated?: (update: TicketUpdateDto) => void;
|
|
1452
|
+
onConnectionStateChange?: (state: signalR.HubConnectionState) => void;
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
export declare function useUserPermissions(options: UseUserPermissionsOptions): UseUserPermissionsResult;
|
|
1456
|
+
|
|
1457
|
+
declare interface UseUserPermissionsOptions {
|
|
1458
|
+
userId: string;
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
declare interface UseUserPermissionsResult {
|
|
1462
|
+
loading: boolean;
|
|
1463
|
+
error: string | null;
|
|
1464
|
+
user: UserDetailDto | null;
|
|
1465
|
+
userRoles: RoleDto[];
|
|
1466
|
+
resources: ResourceNode_2[];
|
|
1467
|
+
assignments: RolePermissions_2;
|
|
1468
|
+
inheritanceMap: InheritanceMap_2;
|
|
1469
|
+
effectivePermissions: Set<string>;
|
|
1470
|
+
filters: MatrixFilters_2;
|
|
1471
|
+
filteredResources: ResourceNode_2[];
|
|
1472
|
+
contexts: string[];
|
|
1473
|
+
applications: {
|
|
1474
|
+
context: string;
|
|
1475
|
+
app: string;
|
|
1476
|
+
label: string;
|
|
1477
|
+
}[];
|
|
1478
|
+
modules: {
|
|
1479
|
+
context: string;
|
|
1480
|
+
app: string;
|
|
1481
|
+
module: string;
|
|
1482
|
+
label: string;
|
|
1483
|
+
}[];
|
|
1484
|
+
updateFilters: (filters: Partial<MatrixFilters_2>) => void;
|
|
1485
|
+
getPermissionInheritance: (roleId: string, permissionId: string) => PermissionInheritanceInfo_2;
|
|
1486
|
+
getPermissionSources: (permissionId: string) => RoleDto[];
|
|
1487
|
+
reloadData: () => Promise<void>;
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
declare type ViewMode = 'table' | 'cards' | 'kanban';
|
|
1491
|
+
|
|
1492
|
+
export { }
|