@famgia/omnify-react-sso 2.2.3 → 2.2.5

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.
Files changed (55) hide show
  1. package/dist/ant/index.cjs +3235 -0
  2. package/dist/ant/index.cjs.map +1 -0
  3. package/dist/ant/index.d.cts +685 -0
  4. package/dist/ant/index.d.ts +685 -0
  5. package/dist/ant/index.js +3268 -0
  6. package/dist/ant/index.js.map +1 -0
  7. package/dist/core/index.cjs +2432 -0
  8. package/dist/core/index.cjs.map +1 -0
  9. package/dist/core/index.d.cts +112 -0
  10. package/dist/core/index.d.ts +112 -0
  11. package/dist/core/index.js +2360 -0
  12. package/dist/core/index.js.map +1 -0
  13. package/dist/{testing → core/testing}/index.cjs +1 -1
  14. package/dist/core/testing/index.cjs.map +1 -0
  15. package/dist/{testing → core/testing}/index.d.cts +1 -1
  16. package/dist/{testing → core/testing}/index.d.ts +1 -1
  17. package/dist/{testing → core/testing}/index.js +1 -1
  18. package/dist/core/testing/index.js.map +1 -0
  19. package/dist/index-CHuDTvHg.d.ts +2250 -0
  20. package/dist/index-DVssHZFD.d.cts +2250 -0
  21. package/dist/index.cjs +2464 -784
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +10 -1822
  24. package/dist/index.d.ts +10 -1822
  25. package/dist/index.js +2528 -771
  26. package/dist/index.js.map +1 -1
  27. package/dist/{types-bD5deLxs.d.cts → types-BxClyvTX.d.cts} +2 -3
  28. package/dist/{types-bD5deLxs.d.ts → types-BxClyvTX.d.ts} +2 -3
  29. package/dist/userService-DH9-vPSg.d.cts +269 -0
  30. package/dist/userService-DH9-vPSg.d.ts +269 -0
  31. package/package.json +32 -53
  32. package/dist/@omnify-base/package.json +0 -16
  33. package/dist/@omnify-base/schemas/Branch.ts +0 -131
  34. package/dist/@omnify-base/schemas/BranchCache.ts +0 -131
  35. package/dist/@omnify-base/schemas/OrganizationCache.ts +0 -117
  36. package/dist/@omnify-base/schemas/Permission.ts +0 -114
  37. package/dist/@omnify-base/schemas/Role.ts +0 -128
  38. package/dist/@omnify-base/schemas/RolePermission.ts +0 -97
  39. package/dist/@omnify-base/schemas/Team.ts +0 -110
  40. package/dist/@omnify-base/schemas/TeamCache.ts +0 -110
  41. package/dist/@omnify-base/schemas/TeamPermission.ts +0 -109
  42. package/dist/@omnify-base/schemas/User.ts +0 -135
  43. package/dist/@omnify-base/schemas/UserCache.ts +0 -142
  44. package/dist/@omnify-base/schemas/common.ts +0 -47
  45. package/dist/@omnify-base/schemas/i18n.ts +0 -118
  46. package/dist/schemas/index.cjs +0 -645
  47. package/dist/schemas/index.cjs.map +0 -1
  48. package/dist/schemas/index.d.cts +0 -260
  49. package/dist/schemas/index.d.ts +0 -260
  50. package/dist/schemas/index.js +0 -557
  51. package/dist/schemas/index.js.map +0 -1
  52. package/dist/testing/index.cjs.map +0 -1
  53. package/dist/testing/index.js.map +0 -1
  54. package/scripts/build-schemas.ts +0 -191
  55. package/scripts/postinstall.cjs +0 -43
@@ -0,0 +1,685 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { f as SsoCallbackProps, e as OrganizationSwitcherProps, P as ProtectedRouteProps, d as OrgBranchSelectorModalProps, a as BranchGateProps } from '../types-BxClyvTX.cjs';
3
+ export { b as BranchGateSelection } from '../types-BxClyvTX.cjs';
4
+ import { ReactNode } from 'react';
5
+ import { TableColumnType, TableProps, BreadcrumbProps } from 'antd';
6
+ import { UseQueryResult } from '@tanstack/react-query';
7
+ import { R as Role, j as UserPermissionsBreakdown, b as RoleAssignmentWithPermissions, P as Permission } from '../userService-DH9-vPSg.cjs';
8
+
9
+ /**
10
+ * SSO Callback component
11
+ *
12
+ * Place this component at your callback route (e.g., /sso/callback)
13
+ * It handles the SSO code exchange and redirects after successful login.
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * // pages/sso/callback.tsx or app/sso/callback/page.tsx
18
+ * export default function CallbackPage() {
19
+ * return (
20
+ * <SsoCallback
21
+ * redirectTo="/dashboard"
22
+ * onSuccess={(user, orgs) => console.log('Logged in:', user)}
23
+ * onError={(error) => console.error('Login failed:', error)}
24
+ * />
25
+ * );
26
+ * }
27
+ * ```
28
+ */
29
+ declare function SsoCallback({ onSuccess, onError, redirectTo, loadingComponent, errorComponent, }: SsoCallbackProps): react_jsx_runtime.JSX.Element | null;
30
+
31
+ /**
32
+ * Organization Switcher component using Ant Design
33
+ *
34
+ * A dropdown component for switching between organizations.
35
+ * Only renders if user has access to multiple organizations.
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * // Basic usage
40
+ * <OrganizationSwitcher />
41
+ *
42
+ * // With custom styling
43
+ * <OrganizationSwitcher className="my-switcher" />
44
+ *
45
+ * // With custom render
46
+ * <OrganizationSwitcher
47
+ * renderTrigger={(org, isOpen) => (
48
+ * <Button>{org?.name} {isOpen ? '▲' : '▼'}</Button>
49
+ * )}
50
+ * renderOption={(org, isSelected) => (
51
+ * <div className={isSelected ? 'selected' : ''}>{org.name}</div>
52
+ * )}
53
+ * />
54
+ * ```
55
+ */
56
+ declare function OrganizationSwitcher({ className, renderTrigger, renderOption, onChange, }: OrganizationSwitcherProps): react_jsx_runtime.JSX.Element | null;
57
+
58
+ /**
59
+ * Protected Route component
60
+ *
61
+ * Wraps content that requires authentication and optionally specific roles/permissions.
62
+ *
63
+ * @example
64
+ * ```tsx
65
+ * // Basic protection
66
+ * <ProtectedRoute>
67
+ * <Dashboard />
68
+ * </ProtectedRoute>
69
+ *
70
+ * // With role requirement
71
+ * <ProtectedRoute requiredRole="admin">
72
+ * <AdminPanel />
73
+ * </ProtectedRoute>
74
+ *
75
+ * // With custom fallbacks
76
+ * <ProtectedRoute
77
+ * fallback={<Spinner />}
78
+ * loginFallback={<CustomLoginPage />}
79
+ * onAccessDenied={(reason) => console.log(reason)}
80
+ * >
81
+ * <ProtectedContent />
82
+ * </ProtectedRoute>
83
+ * ```
84
+ */
85
+ declare function ProtectedRoute({ children, fallback, loginFallback, requiredRole, requiredPermission, onAccessDenied, }: ProtectedRouteProps): react_jsx_runtime.JSX.Element;
86
+
87
+ /**
88
+ * Organization and Branch Selector Modal
89
+ *
90
+ * A modal component for selecting organization and branch.
91
+ * - If user has only one organization, it's auto-selected
92
+ * - If user has only one branch, it's auto-selected
93
+ * - Shows selection UI only when there are multiple options
94
+ *
95
+ * @example
96
+ * ```tsx
97
+ * function CreateProjectButton() {
98
+ * const [modalOpen, setModalOpen] = useState(false);
99
+ *
100
+ * const handleConfirm = (orgId: number, branchId: number) => {
101
+ * // Create project with selected org and branch
102
+ * createProject({ organization_id: orgId, branch_id: branchId });
103
+ * setModalOpen(false);
104
+ * };
105
+ *
106
+ * return (
107
+ * <>
108
+ * <Button onClick={() => setModalOpen(true)}>
109
+ * Create Project
110
+ * </Button>
111
+ * <OrgBranchSelectorModal
112
+ * open={modalOpen}
113
+ * onClose={() => setModalOpen(false)}
114
+ * onConfirm={handleConfirm}
115
+ * />
116
+ * </>
117
+ * );
118
+ * }
119
+ * ```
120
+ */
121
+ declare function OrgBranchSelectorModal({ open, onClose, onConfirm, title, requireBranch, loadingComponent, }: OrgBranchSelectorModalProps): react_jsx_runtime.JSX.Element;
122
+
123
+ type StoredSelection = {
124
+ orgId: string;
125
+ orgName: string;
126
+ branchId: string;
127
+ branchName: string;
128
+ branchCode: string;
129
+ };
130
+ /**
131
+ * BranchGate - Ensures user has selected an org/branch before accessing the app.
132
+ *
133
+ * Different from OrgBranchSelectorModal:
134
+ * - OrgBranchSelectorModal: Modal for one-time selection (e.g., creating a project)
135
+ * - BranchGate: Gate that blocks app access until selection is made, persists globally
136
+ *
137
+ * Auto-selection behavior:
138
+ * - If user has only 1 org and 1 branch: auto-selects and allows access
139
+ * - If user has multiple options: shows selection modal first
140
+ * - Stores selection in localStorage for persistence
141
+ *
142
+ * @example
143
+ * ```tsx
144
+ * // In your app layout
145
+ * function DashboardLayout({ children }) {
146
+ * return (
147
+ * <BranchGate
148
+ * onSelectionChange={(selection) => {
149
+ * // Set API headers globally
150
+ * api.defaults.headers['X-Branch-Id'] = selection.branchId;
151
+ * api.defaults.headers['X-Organization-Id'] = selection.orgId;
152
+ * }}
153
+ * >
154
+ * {children}
155
+ * </BranchGate>
156
+ * );
157
+ * }
158
+ * ```
159
+ */
160
+ declare function BranchGate({ children, onSelectionChange, storageKey, loadingComponent, title, description, }: BranchGateProps): react_jsx_runtime.JSX.Element;
161
+ declare function useBranchGate(storageKey?: string): {
162
+ selection: StoredSelection | null;
163
+ selectedOrg: {
164
+ id: string;
165
+ slug: string;
166
+ name: string;
167
+ } | null;
168
+ selectedBranch: {
169
+ id: string;
170
+ name: string;
171
+ code: string;
172
+ } | null;
173
+ clearSelection: () => void;
174
+ };
175
+
176
+ /**
177
+ * Search field configuration
178
+ */
179
+ interface SearchField {
180
+ name: string;
181
+ label: string;
182
+ type: 'input' | 'select' | 'date' | 'dateRange' | 'number';
183
+ placeholder?: string;
184
+ options?: {
185
+ value: string | number;
186
+ label: string;
187
+ }[];
188
+ hidden?: boolean;
189
+ width?: number | string;
190
+ }
191
+ /**
192
+ * Row action configuration
193
+ */
194
+ interface RowAction<T> {
195
+ label: string;
196
+ onClick?: (record: T) => void;
197
+ href?: string;
198
+ danger?: boolean;
199
+ confirm?: boolean | string;
200
+ hidden?: (record: T) => boolean;
201
+ }
202
+ /**
203
+ * Value type for automatic formatting
204
+ */
205
+ type ValueType = 'text' | 'status' | 'tag' | 'date' | 'datetime' | 'number' | 'currency' | 'boolean';
206
+ /**
207
+ * Status configuration for colored dots
208
+ */
209
+ interface StatusConfig {
210
+ [key: string]: {
211
+ color: string;
212
+ text: string;
213
+ };
214
+ }
215
+ /**
216
+ * Extended column type with ProTable features
217
+ */
218
+ interface ProTableColumn<T> extends Omit<TableColumnType<T>, 'render' | 'dataIndex'> {
219
+ dataIndex?: string | string[];
220
+ key?: string;
221
+ title: string;
222
+ sortable?: boolean;
223
+ searchable?: boolean;
224
+ valueType?: ValueType;
225
+ statusConfig?: StatusConfig;
226
+ render?: (value: unknown, record: T, index: number) => ReactNode;
227
+ width?: number | string;
228
+ ellipsis?: boolean;
229
+ hidden?: boolean;
230
+ }
231
+ /**
232
+ * Pagination meta from API
233
+ */
234
+ interface PaginationMeta {
235
+ current_page: number;
236
+ per_page: number;
237
+ total: number;
238
+ last_page: number;
239
+ }
240
+ /**
241
+ * API response shape
242
+ */
243
+ interface ApiResponse<T> {
244
+ data: T[];
245
+ meta?: PaginationMeta;
246
+ }
247
+ /**
248
+ * Query parameters for API
249
+ */
250
+ interface QueryParams {
251
+ page?: number;
252
+ per_page?: number;
253
+ sort?: string;
254
+ order?: 'asc' | 'desc';
255
+ [key: string]: unknown;
256
+ }
257
+ /**
258
+ * i18n texts for ProTable
259
+ */
260
+ interface ProTableTexts {
261
+ search?: string;
262
+ reset?: string;
263
+ expand?: string;
264
+ collapse?: string;
265
+ add?: string;
266
+ refresh?: string;
267
+ columnSettings?: string;
268
+ actions?: string;
269
+ yes?: string;
270
+ no?: string;
271
+ cancel?: string;
272
+ totalItems?: (total: number) => string;
273
+ selectPlaceholder?: string;
274
+ inputPlaceholder?: string;
275
+ startDate?: string;
276
+ endDate?: string;
277
+ }
278
+ /**
279
+ * ProTable props
280
+ */
281
+ interface ProTableProps<T extends object> {
282
+ title: string;
283
+ icon?: ReactNode;
284
+ subTitle?: string;
285
+ searchFields?: SearchField[];
286
+ defaultSearchValues?: Record<string, unknown>;
287
+ columns: ProTableColumn<T>[];
288
+ dataSource?: T[];
289
+ rowKey?: string | ((record: T) => string);
290
+ loading?: boolean;
291
+ queryKey?: unknown[];
292
+ queryFn?: (params: QueryParams) => Promise<ApiResponse<T>>;
293
+ queryResult?: UseQueryResult<ApiResponse<T>>;
294
+ queryEnabled?: boolean;
295
+ onAdd?: () => void;
296
+ addButtonLink?: string;
297
+ addLabel?: string;
298
+ toolbarExtra?: ReactNode;
299
+ showRefresh?: boolean;
300
+ showColumnSettings?: boolean;
301
+ rowActions?: (record: T) => RowAction<T>[];
302
+ pagination?: boolean | TableProps<T>['pagination'];
303
+ defaultPageSize?: number;
304
+ onSearch?: (values: Record<string, unknown>) => void;
305
+ onReset?: () => void;
306
+ onChange?: TableProps<T>['onChange'];
307
+ className?: string;
308
+ style?: React.CSSProperties;
309
+ cardStyle?: React.CSSProperties;
310
+ tableProps?: Omit<TableProps<T>, 'columns' | 'dataSource' | 'loading' | 'pagination' | 'onChange'>;
311
+ texts?: ProTableTexts;
312
+ }
313
+
314
+ /**
315
+ * Default i18n texts (Japanese)
316
+ * Can be overridden via props
317
+ */
318
+ declare const DEFAULT_TEXTS: {
319
+ search: string;
320
+ reset: string;
321
+ expand: string;
322
+ collapse: string;
323
+ add: string;
324
+ refresh: string;
325
+ columnSettings: string;
326
+ actions: string;
327
+ yes: string;
328
+ no: string;
329
+ cancel: string;
330
+ totalItems: (total: number) => string;
331
+ selectPlaceholder: string;
332
+ inputPlaceholder: string;
333
+ startDate: string;
334
+ endDate: string;
335
+ };
336
+ /**
337
+ * ProTable Component
338
+ * A feature-rich table with search, filter, sort, and pagination
339
+ */
340
+ declare function ProTable<T extends object>({ title, icon, subTitle, searchFields, defaultSearchValues, columns, dataSource: externalDataSource, rowKey, loading: externalLoading, queryKey, queryFn, queryResult: externalQueryResult, queryEnabled, onAdd, addButtonLink, addLabel, toolbarExtra, showRefresh, showColumnSettings, rowActions, pagination, defaultPageSize, onSearch, onReset, onChange, className, style, cardStyle, tableProps, texts: customTexts, }: ProTableProps<T>): react_jsx_runtime.JSX.Element;
341
+
342
+ interface PageContainerProps {
343
+ /**
344
+ * Page title
345
+ */
346
+ title?: ReactNode;
347
+ /**
348
+ * Subtitle displayed below the title
349
+ */
350
+ subTitle?: ReactNode;
351
+ /**
352
+ * Icon displayed before the title
353
+ */
354
+ icon?: ReactNode;
355
+ /**
356
+ * Extra content displayed on the right side of the header
357
+ */
358
+ extra?: ReactNode;
359
+ /**
360
+ * Breadcrumb configuration
361
+ * Can be BreadcrumbProps or array of { title: string, href?: string }
362
+ */
363
+ breadcrumb?: BreadcrumbProps | {
364
+ title: ReactNode;
365
+ href?: string;
366
+ }[];
367
+ /**
368
+ * Content of the page
369
+ */
370
+ children?: ReactNode;
371
+ /**
372
+ * Whether to show the header background
373
+ * @default true
374
+ */
375
+ showHeader?: boolean;
376
+ /**
377
+ * Custom className for the container
378
+ */
379
+ className?: string;
380
+ /**
381
+ * Custom style for the container
382
+ */
383
+ style?: React.CSSProperties;
384
+ }
385
+ /**
386
+ * PageContainer - A standard page layout component
387
+ *
388
+ * Provides consistent page structure with:
389
+ * - Breadcrumb navigation
390
+ * - Page title with optional icon and subtitle
391
+ * - Extra actions area (right side)
392
+ * - Content area
393
+ *
394
+ * @example
395
+ * ```tsx
396
+ * <PageContainer
397
+ * title="従業員管理"
398
+ * subTitle="従業員情報の一覧と管理"
399
+ * icon={<UserOutlined />}
400
+ * breadcrumb={[
401
+ * { title: 'リスト' },
402
+ * { title: '従業員管理' },
403
+ * ]}
404
+ * extra={
405
+ * <Button type="primary" icon={<PlusOutlined />}>
406
+ * 新規
407
+ * </Button>
408
+ * }
409
+ * >
410
+ * <Card>...</Card>
411
+ * </PageContainer>
412
+ * ```
413
+ */
414
+ declare function PageContainer({ title, subTitle, icon, extra, breadcrumb, children, showHeader, className, style, }: PageContainerProps): react_jsx_runtime.JSX.Element;
415
+
416
+ declare function LocaleSwitcher(): react_jsx_runtime.JSX.Element;
417
+
418
+ interface OrganizationLike$1 {
419
+ id: string | number;
420
+ name: string;
421
+ slug?: string;
422
+ }
423
+ interface BranchLike$1 {
424
+ id: string | number;
425
+ name: string;
426
+ }
427
+ interface UserRoleAssignModalProps {
428
+ open: boolean;
429
+ userName?: string;
430
+ roles: Role[];
431
+ organizations: OrganizationLike$1[];
432
+ branches?: BranchLike$1[];
433
+ currentOrgId?: string;
434
+ loading?: boolean;
435
+ onAssign: (values: {
436
+ role_id: string;
437
+ scope: 'global' | 'org-wide' | 'branch';
438
+ org_id?: string;
439
+ branch_ids?: string[];
440
+ }) => void | Promise<void>;
441
+ onCancel: () => void;
442
+ translations?: {
443
+ title?: string;
444
+ selectRole?: string;
445
+ scope?: string;
446
+ global?: string;
447
+ orgWide?: string;
448
+ branchSpecific?: string;
449
+ organization?: string;
450
+ selectBranches?: string;
451
+ assign?: string;
452
+ cancel?: string;
453
+ assignRole?: string;
454
+ required?: string;
455
+ };
456
+ }
457
+ declare function UserRoleAssignModal({ open, userName, roles, organizations, branches, currentOrgId, loading, onAssign, onCancel, translations: t, }: UserRoleAssignModalProps): react_jsx_runtime.JSX.Element;
458
+
459
+ interface OrganizationLike {
460
+ id: string | number;
461
+ name: string;
462
+ slug?: string;
463
+ }
464
+ interface BranchLike {
465
+ id: string | number;
466
+ name: string;
467
+ }
468
+ interface UserPermissionsModalProps {
469
+ open: boolean;
470
+ userName?: string;
471
+ permissions?: UserPermissionsBreakdown | null;
472
+ loading?: boolean;
473
+ currentOrg?: OrganizationLike | null;
474
+ currentBranch?: BranchLike | null;
475
+ branches?: BranchLike[];
476
+ onClose: () => void;
477
+ onAddRole?: () => void;
478
+ onAddTeam?: () => void;
479
+ onRemoveRole?: (roleId: string, orgId?: string | null, branchId?: string | null) => void;
480
+ translations?: {
481
+ permissionBreakdown?: string;
482
+ userInfo?: string;
483
+ email?: string;
484
+ primaryOrganization?: string;
485
+ global?: string;
486
+ currentContext?: string;
487
+ roleAssignments?: string;
488
+ noRolesAssigned?: string;
489
+ add?: string;
490
+ permissions?: string;
491
+ teamMemberships?: string;
492
+ noTeamMemberships?: string;
493
+ teamLeader?: string;
494
+ teamsFromConsole?: string;
495
+ aggregatedPermissions?: string;
496
+ noData?: string;
497
+ ungrouped?: string;
498
+ orgWide?: string;
499
+ confirmRemoveRole?: string;
500
+ };
501
+ }
502
+ declare function UserPermissionsModal({ open, userName, permissions, loading, currentOrg, currentBranch, branches, onClose, onAddRole, onAddTeam, onRemoveRole, translations: t, }: UserPermissionsModalProps): react_jsx_runtime.JSX.Element;
503
+
504
+ interface UserDetailCardProps {
505
+ user?: UserPermissionsBreakdown['user'];
506
+ roleAssignments: RoleAssignmentWithPermissions[];
507
+ teamMemberships: UserPermissionsBreakdown['team_memberships'];
508
+ aggregatedPermissions: string[];
509
+ currentOrg?: {
510
+ id: string | number;
511
+ name: string;
512
+ } | null;
513
+ currentBranch?: {
514
+ id: string | number;
515
+ name: string;
516
+ } | null;
517
+ onRefresh?: () => void;
518
+ onAssignRole?: () => void;
519
+ onRemoveRole?: (roleId: string, consoleOrgId?: string | null, consoleBranchId?: string | null) => void;
520
+ onRoleClick?: (roleId: string) => void;
521
+ removeLoading?: boolean;
522
+ translations?: {
523
+ email?: string;
524
+ primaryOrganization?: string;
525
+ currentContext?: string;
526
+ global?: string;
527
+ created?: string;
528
+ lastSignIn?: string;
529
+ roleAssignments?: string;
530
+ roles?: string;
531
+ permissions?: string;
532
+ teams?: string;
533
+ aggregatedPermissions?: string;
534
+ permissionPolicies?: string;
535
+ permissionsDescription?: string;
536
+ searchPermissions?: string;
537
+ allTypes?: string;
538
+ viaRole?: string;
539
+ viaTeam?: string;
540
+ attachedVia?: string;
541
+ filterByType?: string;
542
+ remove?: string;
543
+ addPermissions?: string;
544
+ assignRole?: string;
545
+ noRolesAssigned?: string;
546
+ level?: string;
547
+ actions?: string;
548
+ confirmRemoveRole?: string;
549
+ teamMemberships?: string;
550
+ noTeamMemberships?: string;
551
+ teamLeader?: string;
552
+ noPermissions?: string;
553
+ group?: string;
554
+ };
555
+ }
556
+ declare function UserDetailCard({ user, roleAssignments, teamMemberships, aggregatedPermissions, currentOrg, currentBranch, onRefresh, onAssignRole, onRemoveRole, onRoleClick, removeLoading, translations: t, }: UserDetailCardProps): react_jsx_runtime.JSX.Element;
557
+
558
+ interface RoleCreateModalProps {
559
+ open: boolean;
560
+ organizations: OrganizationLike$1[];
561
+ currentOrgId?: string;
562
+ loading?: boolean;
563
+ onSubmit: (values: {
564
+ name: string;
565
+ slug: string;
566
+ description?: string;
567
+ level: number;
568
+ scope: 'global' | 'org';
569
+ org_id?: string;
570
+ }) => void | Promise<void>;
571
+ onCancel: () => void;
572
+ translations?: {
573
+ title?: string;
574
+ name?: string;
575
+ slug?: string;
576
+ description?: string;
577
+ level?: string;
578
+ scope?: string;
579
+ global?: string;
580
+ orgRole?: string;
581
+ organization?: string;
582
+ create?: string;
583
+ cancel?: string;
584
+ required?: string;
585
+ };
586
+ }
587
+ declare function RoleCreateModal({ open, organizations, currentOrgId, loading, onSubmit, onCancel, translations: t, }: RoleCreateModalProps): react_jsx_runtime.JSX.Element;
588
+
589
+ interface RolesListCardProps {
590
+ roles: Role[];
591
+ loading?: boolean;
592
+ scopeFilter: 'all' | 'global' | 'org';
593
+ onScopeFilterChange: (value: 'all' | 'global' | 'org') => void;
594
+ onCreateClick: () => void;
595
+ onViewClick: (role: Role) => void;
596
+ onDeleteClick: (role: Role) => void;
597
+ translations?: {
598
+ name?: string;
599
+ scope?: string;
600
+ level?: string;
601
+ description?: string;
602
+ actions?: string;
603
+ detail?: string;
604
+ global?: string;
605
+ orgRole?: string;
606
+ all?: string;
607
+ confirmDeleteRole?: string;
608
+ };
609
+ }
610
+ declare function RolesListCard({ roles, loading, scopeFilter, onScopeFilterChange, onCreateClick, onViewClick, onDeleteClick, translations: t, }: RolesListCardProps): react_jsx_runtime.JSX.Element;
611
+
612
+ interface PermissionsListCardProps {
613
+ permissions: Permission[];
614
+ groups: string[];
615
+ loading?: boolean;
616
+ translations?: {
617
+ searchPermissions?: string;
618
+ name?: string;
619
+ slug?: string;
620
+ group?: string;
621
+ noData?: string;
622
+ };
623
+ onGroupLabelRender?: (group: string) => string;
624
+ }
625
+ declare function PermissionsListCard({ permissions, groups, loading, translations: t, onGroupLabelRender, }: PermissionsListCardProps): react_jsx_runtime.JSX.Element;
626
+
627
+ interface TeamData {
628
+ id: string;
629
+ name: string;
630
+ member_count: number;
631
+ permissions: string[];
632
+ }
633
+ interface TeamsListCardProps {
634
+ teams: TeamData[];
635
+ loading?: boolean;
636
+ translations?: {
637
+ name?: string;
638
+ memberCount?: string;
639
+ permissions?: string;
640
+ noTeams?: string;
641
+ teamsFromConsole?: string;
642
+ teamPermissions?: string;
643
+ noData?: string;
644
+ };
645
+ }
646
+ declare function TeamsListCard({ teams, loading, translations: t, }: TeamsListCardProps): react_jsx_runtime.JSX.Element;
647
+
648
+ type ScopeType = 'global' | 'org-wide' | 'branch';
649
+ /**
650
+ * Get icon for scope type
651
+ */
652
+ declare function getScopeIcon(scope: ScopeType | string): ReactNode;
653
+ /**
654
+ * Get color for scope type
655
+ */
656
+ declare function getScopeColor(scope: ScopeType | string): string;
657
+ interface ScopeTagProps {
658
+ scope: ScopeType | string;
659
+ label?: string;
660
+ showIcon?: boolean;
661
+ }
662
+ /**
663
+ * Tag component for displaying scope
664
+ */
665
+ declare function ScopeTag({ scope, label, showIcon }: ScopeTagProps): react_jsx_runtime.JSX.Element;
666
+ interface ScopeLabelProps {
667
+ scope: ScopeType | string;
668
+ label: string;
669
+ }
670
+ /**
671
+ * Label with icon for scope
672
+ */
673
+ declare function ScopeLabel({ scope, label }: ScopeLabelProps): react_jsx_runtime.JSX.Element;
674
+
675
+ type SetDayjsLocale = (locale: string) => void;
676
+ type ThemeVariant = 'dashboard' | 'admin';
677
+ interface AntdThemeProviderProps {
678
+ children: React.ReactNode;
679
+ variant?: ThemeVariant;
680
+ /** Optional function to set dayjs locale */
681
+ setDayjsLocale?: SetDayjsLocale;
682
+ }
683
+ declare function AntdThemeProvider({ children, variant, setDayjsLocale }: AntdThemeProviderProps): react_jsx_runtime.JSX.Element;
684
+
685
+ export { AntdThemeProvider, type AntdThemeProviderProps, type ApiResponse, BranchGate, type BranchLike$1 as BranchLike, LocaleSwitcher, OrgBranchSelectorModal, type OrganizationLike$1 as OrganizationLike, OrganizationSwitcher, DEFAULT_TEXTS as PROTABLE_DEFAULT_TEXTS, PageContainer, type PageContainerProps, type PaginationMeta, PermissionsListCard, type PermissionsListCardProps, ProTable, type ProTableColumn, type ProTableProps, type ProTableTexts, ProtectedRoute, type QueryParams, RoleCreateModal, type RoleCreateModalProps, RolesListCard, type RolesListCardProps, type RowAction, ScopeLabel, type ScopeLabelProps, ScopeTag, type ScopeTagProps, type ScopeType, type SearchField, SsoCallback, type StatusConfig, type TeamData, TeamsListCard, type TeamsListCardProps, UserDetailCard, type UserDetailCardProps, UserPermissionsModal, type UserPermissionsModalProps, UserRoleAssignModal, type UserRoleAssignModalProps, type ValueType, getScopeColor, getScopeIcon, useBranchGate };