@serhii.olishevskyi/docs 1.2.27 → 1.2.29
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/{UserPopoverComponent-VFSZ5ZO2.mjs → UserPopoverComponent-VYJOTERW.mjs} +1 -1
- package/dist/{chunk-VFNVP7VE.mjs → chunk-GAPN2BVY.mjs} +28 -0
- package/dist/index.d.mts +598 -378
- package/dist/index.d.ts +598 -378
- package/dist/index.js +7896 -2571
- package/dist/index.mjs +6272 -910
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ReactNode, PropsWithChildren } from 'react';
|
|
3
|
-
import { TextFieldProps, SelectProps, SelectChangeEvent, FormControlLabelProps, CheckboxProps, SwitchProps, ButtonProps, IconButtonProps, TooltipProps, SxProps,
|
|
3
|
+
import { TextFieldProps, SelectProps, SelectChangeEvent, FormControlLabelProps, CheckboxProps, SwitchProps, Theme, ButtonProps, IconButtonProps, TooltipProps, SxProps, TypographyProps, TablePaginationProps } from '@mui/material';
|
|
4
4
|
import { SystemProps } from '@mui/system';
|
|
5
|
+
import { GridOverlayProps, GridSortModel, GridRowSelectionModel, GridApiPremium, GridColDef } from '@mui/x-data-grid-premium';
|
|
5
6
|
import * as _supabase_supabase_js from '@supabase/supabase-js';
|
|
6
7
|
import { SupabaseClient, User, Session } from '@supabase/supabase-js';
|
|
7
8
|
import * as i18next from 'i18next';
|
|
@@ -162,85 +163,96 @@ interface UrlComponentProps {
|
|
|
162
163
|
}
|
|
163
164
|
declare function UrlComponent({ overrideNamespace, label, value, onChange, disabled, readOnly, required, error, helperText, description, fullWidth, openInNewTab, showLock, lockTooltip, sx, }: UrlComponentProps): React__default.JSX.Element;
|
|
164
165
|
|
|
165
|
-
type
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
166
|
+
type AIProviderType = 'gemini' | 'openai';
|
|
167
|
+
interface AIServiceConfig {
|
|
168
|
+
apiKey?: string;
|
|
169
|
+
modelName?: string;
|
|
170
|
+
}
|
|
171
|
+
interface AIConfig {
|
|
172
|
+
provider?: AIProviderType;
|
|
173
|
+
gemini?: AIServiceConfig;
|
|
174
|
+
openai?: AIServiceConfig;
|
|
175
|
+
}
|
|
176
|
+
interface AIGenerateOptions {
|
|
177
|
+
prompt: string;
|
|
178
|
+
systemInstruction?: string;
|
|
179
|
+
jsonMode?: boolean;
|
|
180
|
+
temperature?: number;
|
|
181
|
+
provider?: AIProviderType;
|
|
182
|
+
modelName?: string;
|
|
183
|
+
}
|
|
184
|
+
interface AIContextType {
|
|
185
|
+
activeProvider: AIProviderType;
|
|
186
|
+
config: AIConfig;
|
|
187
|
+
generate: <T = string>(options: AIGenerateOptions) => Promise<T | null>;
|
|
188
|
+
/** Метод для перезагрузки настроек из базы данных */
|
|
189
|
+
reloadConfig: () => Promise<void>;
|
|
190
|
+
}
|
|
191
|
+
interface AIProviderProps {
|
|
192
|
+
children: React__default.ReactNode;
|
|
193
|
+
config?: AIConfig;
|
|
194
|
+
}
|
|
195
|
+
declare const AIProvider: React__default.FC<AIProviderProps>;
|
|
196
|
+
declare const useAI: () => AIContextType;
|
|
181
197
|
|
|
182
|
-
|
|
198
|
+
type DialogSeverity = 'error' | 'warning' | 'info' | 'success';
|
|
199
|
+
type ConfirmResult = 'yes' | 'no' | 'cancel';
|
|
200
|
+
interface ConfirmOptions {
|
|
183
201
|
overrideNamespace?: string;
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
resetDelay?: number;
|
|
194
|
-
/** Callback, що викликається після успішного копіювання */
|
|
195
|
-
onCopySuccess?: (text: string) => void;
|
|
202
|
+
title?: ReactNode;
|
|
203
|
+
message: ReactNode;
|
|
204
|
+
type?: DialogSeverity;
|
|
205
|
+
showNoButton?: boolean;
|
|
206
|
+
showCancelButton?: boolean;
|
|
207
|
+
confirmText?: ReactNode;
|
|
208
|
+
noText?: ReactNode;
|
|
209
|
+
cancelText?: ReactNode;
|
|
210
|
+
confirmColor?: 'primary' | 'secondary' | 'error' | 'warning' | 'info' | 'success';
|
|
196
211
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
interface RefreshButtonComponentProps {
|
|
212
|
+
interface ConfirmationProviderProps {
|
|
200
213
|
overrideNamespace?: string;
|
|
201
|
-
|
|
202
|
-
color?: "success" | "error" | "info" | "warning";
|
|
203
|
-
onClick?: (event: React__default.MouseEvent<HTMLButtonElement>) => void | Promise<void>;
|
|
204
|
-
disabled?: boolean;
|
|
205
|
-
fullWidth?: boolean;
|
|
206
|
-
loading?: boolean;
|
|
207
|
-
tooltip?: ReactNode;
|
|
208
|
-
mobileViewOnly?: boolean;
|
|
209
|
-
disableMobileView?: boolean;
|
|
210
|
-
hideTooltipOnMobile?: boolean;
|
|
211
|
-
hideTooltipOnDesktop?: boolean;
|
|
214
|
+
children: ReactNode;
|
|
212
215
|
}
|
|
213
|
-
declare const
|
|
216
|
+
declare const ConfirmationProvider: React__default.FC<ConfirmationProviderProps>;
|
|
217
|
+
declare const useConfirmation: () => ((options: ConfirmOptions) => Promise<ConfirmResult>);
|
|
214
218
|
|
|
215
|
-
interface
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
children: React__default.ReactElement;
|
|
219
|
+
interface TranslateProviderProps {
|
|
220
|
+
namespace: string;
|
|
221
|
+
children: React__default.ReactNode;
|
|
219
222
|
}
|
|
220
|
-
declare const
|
|
223
|
+
declare const TranslateProvider: React__default.FC<TranslateProviderProps>;
|
|
224
|
+
declare const useTranslationNamespace: (overrideNamespace?: string) => string;
|
|
221
225
|
|
|
222
|
-
interface
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
displayName?: string | null;
|
|
226
|
-
employeePost?: string | null;
|
|
227
|
-
size?: number;
|
|
228
|
-
disableBorder?: boolean;
|
|
229
|
-
disableShadow?: boolean;
|
|
230
|
-
disablePopover?: boolean;
|
|
231
|
-
disableTooltip?: boolean;
|
|
232
|
-
sx?: SxProps<Theme>;
|
|
226
|
+
interface SupabaseConfig {
|
|
227
|
+
url: string;
|
|
228
|
+
anonKey: string;
|
|
233
229
|
}
|
|
234
|
-
|
|
230
|
+
interface SupabaseProviderProps {
|
|
231
|
+
children: React__default.ReactNode;
|
|
232
|
+
/** Вы можете передать готовый клиент Supabase... */
|
|
233
|
+
client?: SupabaseClient;
|
|
234
|
+
/** ...или передать конфиг (url и anonKey), и библиотека создаст клиент сама */
|
|
235
|
+
config?: SupabaseConfig;
|
|
236
|
+
}
|
|
237
|
+
declare const SupabaseProvider: React__default.FC<SupabaseProviderProps>;
|
|
238
|
+
/** Хук для доступа к Supabase из любого компонента */
|
|
239
|
+
declare const useSupabase: () => SupabaseClient;
|
|
235
240
|
|
|
236
|
-
interface
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
anchorEl: HTMLElement | null;
|
|
240
|
-
open: boolean;
|
|
241
|
-
onClose: () => void;
|
|
241
|
+
interface AppSettingsMap {
|
|
242
|
+
max_group_members: number;
|
|
243
|
+
[key: string]: any;
|
|
242
244
|
}
|
|
243
|
-
|
|
245
|
+
interface AppSettingsContextType {
|
|
246
|
+
settings: AppSettingsMap;
|
|
247
|
+
loading: boolean;
|
|
248
|
+
error: string | null;
|
|
249
|
+
getSetting: <T = any>(key: string, defaultValue: T) => T;
|
|
250
|
+
refetchSettings: () => Promise<void>;
|
|
251
|
+
}
|
|
252
|
+
declare const AppSettingsProvider: React__default.FC<{
|
|
253
|
+
children: React__default.ReactNode;
|
|
254
|
+
}>;
|
|
255
|
+
declare const useAppSettings: () => AppSettingsContextType;
|
|
244
256
|
|
|
245
257
|
interface UserProfile {
|
|
246
258
|
id: string;
|
|
@@ -367,324 +379,67 @@ interface FullCompanyMemberItem {
|
|
|
367
379
|
created_at: string;
|
|
368
380
|
}
|
|
369
381
|
|
|
370
|
-
interface
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
locked_reason: string;
|
|
384
|
-
};
|
|
382
|
+
interface AuthContextType {
|
|
383
|
+
user: User | null;
|
|
384
|
+
profile: UserProfile | null;
|
|
385
|
+
membership: Membership | null;
|
|
386
|
+
userRole: MembershipRole | null;
|
|
387
|
+
activeCompanyId: string | null;
|
|
388
|
+
session: Session | null;
|
|
389
|
+
isAuthenticated: boolean;
|
|
390
|
+
loading: boolean;
|
|
391
|
+
signOut: () => Promise<void>;
|
|
392
|
+
updateProfile: (newProfileData: Partial<UserProfile>) => void;
|
|
393
|
+
refreshProfile: () => Promise<void>;
|
|
394
|
+
setActiveCompany: (companyId: string) => Promise<void>;
|
|
385
395
|
}
|
|
386
|
-
declare const
|
|
396
|
+
declare const AuthProvider: React__default.FC<{
|
|
397
|
+
children: React__default.ReactNode;
|
|
398
|
+
}>;
|
|
399
|
+
declare const useAuth: () => AuthContextType;
|
|
387
400
|
|
|
388
|
-
interface
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
401
|
+
interface UserSettingsContextType {
|
|
402
|
+
settings: UserSettings;
|
|
403
|
+
loading: boolean;
|
|
404
|
+
error: string | null;
|
|
405
|
+
activeChatUserId: string | null;
|
|
406
|
+
toggleSidebar: (open?: boolean | React__default.SyntheticEvent) => Promise<void>;
|
|
407
|
+
toggleChat: (open?: boolean | React__default.SyntheticEvent) => Promise<void>;
|
|
408
|
+
openChatWithUser: (targetUserId: string) => Promise<void>;
|
|
409
|
+
setLanguage: (language: string) => Promise<void>;
|
|
410
|
+
setThemeMode: (mode: string) => Promise<void>;
|
|
411
|
+
refreshSettings: () => Promise<void>;
|
|
394
412
|
}
|
|
395
|
-
declare const
|
|
413
|
+
declare const UserSettingsProvider: React__default.FC<{
|
|
414
|
+
children: React__default.ReactNode;
|
|
415
|
+
}>;
|
|
416
|
+
declare const useUserSettings: () => UserSettingsContextType;
|
|
396
417
|
|
|
397
|
-
interface
|
|
418
|
+
interface TranslateTextProps {
|
|
398
419
|
overrideNamespace?: string;
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
label?: React__default.ReactNode;
|
|
420
|
+
children: string;
|
|
421
|
+
values?: Record<string, any>;
|
|
402
422
|
}
|
|
403
|
-
declare const
|
|
423
|
+
declare const TranslateText: React__default.FC<TranslateTextProps>;
|
|
404
424
|
|
|
405
|
-
interface
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
isRetrying?: boolean;
|
|
425
|
+
interface TranslationContextType {
|
|
426
|
+
isTranslationMode: boolean;
|
|
427
|
+
setIsTranslationMode: (val: boolean) => void;
|
|
428
|
+
canEdit: boolean;
|
|
429
|
+
isLoadingPermissions: boolean;
|
|
430
|
+
updateTranslation: (key: string, namespace: string, newValue: string) => Promise<void>;
|
|
412
431
|
}
|
|
413
|
-
declare const
|
|
414
|
-
|
|
415
|
-
interface TruncatedTypographyComponentProps extends TypographyProps {
|
|
416
|
-
/** Текст или содержимое */
|
|
432
|
+
declare const TranslationEditProvider: React__default.FC<{
|
|
417
433
|
children: React__default.ReactNode;
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
/** Пропсы для передачи в MUI Tooltip (например, placement, arrow и т.д.) */
|
|
421
|
-
tooltipProps?: Omit<TooltipProps, 'title' | 'children'>;
|
|
422
|
-
/** Принудительно показывать Tooltip всегда, даже если текст не обрезался */
|
|
423
|
-
alwaysShowTooltip?: boolean;
|
|
424
|
-
}
|
|
425
|
-
declare const TruncatedTypographyComponent: React__default.FC<TruncatedTypographyComponentProps>;
|
|
434
|
+
}>;
|
|
435
|
+
declare const useTranslationEdit: () => TranslationContextType;
|
|
426
436
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
color?: 'inherit' | 'primary' | 'secondary' | 'error' | 'warning' | 'info' | 'success';
|
|
434
|
-
disabled?: boolean;
|
|
435
|
-
divider?: boolean;
|
|
436
|
-
}
|
|
437
|
-
interface PrimaryActionProps {
|
|
438
|
-
label: string;
|
|
439
|
-
onClick: () => void;
|
|
440
|
-
icon?: React__default.ReactNode;
|
|
441
|
-
variant?: 'contained' | 'outlined' | 'text';
|
|
442
|
-
color?: 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning';
|
|
443
|
-
disabled?: boolean;
|
|
444
|
-
}
|
|
445
|
-
interface RefreshActionProps {
|
|
446
|
-
onClick: () => void;
|
|
447
|
-
disabled?: boolean;
|
|
448
|
-
}
|
|
449
|
-
interface PageHeaderProps {
|
|
450
|
-
overrideNamespace?: string;
|
|
451
|
-
icon?: React__default.ReactNode;
|
|
452
|
-
title: string;
|
|
453
|
-
subtitle?: string;
|
|
454
|
-
tag?: React__default.ReactNode;
|
|
455
|
-
titleTruncateMode?: TextTruncateMode;
|
|
456
|
-
subtitleTruncateMode?: TextTruncateMode;
|
|
457
|
-
customFragment?: React__default.JSX.Element;
|
|
458
|
-
primaryAction?: PrimaryActionProps;
|
|
459
|
-
secondaryActions?: HeaderActionItem[];
|
|
460
|
-
refreshAction?: RefreshActionProps;
|
|
461
|
-
mobileBreakpoint?: 'xs' | 'sm' | 'md';
|
|
462
|
-
forceMobileView?: boolean;
|
|
463
|
-
sx?: SxProps<Theme>;
|
|
464
|
-
}
|
|
465
|
-
type PageComponentProps = {
|
|
466
|
-
header?: PageHeaderProps;
|
|
467
|
-
};
|
|
468
|
-
declare const PageComponent: React__default.FC<PropsWithChildren<PageComponentProps>>;
|
|
469
|
-
|
|
470
|
-
type FilterWidth = '25%' | '33%' | '50%' | '66%' | '75%' | '100%';
|
|
471
|
-
interface FilterSectionProps extends PropsWithChildren {
|
|
472
|
-
/** Ширина самой секции на десктопе (по умолчанию '100%') */
|
|
473
|
-
width?: FilterWidth;
|
|
474
|
-
/** Ширина самой секции на мобильном (по умолчанию '100%') */
|
|
475
|
-
mobileWidth?: FilterWidth;
|
|
476
|
-
/** Ширина каждого элемента ВНУТРИ секции на десктопе (по умолчанию '50%') */
|
|
477
|
-
itemWidth?: FilterWidth;
|
|
478
|
-
/** Ширина каждого элемента ВНУТРИ секции на мобильном (по умолчанию '100%') */
|
|
479
|
-
itemMobileWidth?: FilterWidth;
|
|
480
|
-
}
|
|
481
|
-
interface FilterContainerComponentProps extends PropsWithChildren {
|
|
482
|
-
sections?: ReactNode[];
|
|
483
|
-
sx?: SxProps<Theme>;
|
|
484
|
-
}
|
|
485
|
-
declare const FilterContainerComponent: React__default.FC<FilterContainerComponentProps>;
|
|
486
|
-
|
|
487
|
-
interface PageLink {
|
|
488
|
-
text: ReactNode;
|
|
489
|
-
href?: string;
|
|
490
|
-
external?: boolean;
|
|
491
|
-
onClick?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
|
|
492
|
-
hidden?: boolean;
|
|
493
|
-
}
|
|
494
|
-
interface PageLinkComponentProps {
|
|
495
|
-
overrideNamespace?: string;
|
|
496
|
-
title: ReactNode;
|
|
497
|
-
subheader?: ReactNode;
|
|
498
|
-
description: ReactNode;
|
|
499
|
-
icon?: React__default.ReactElement;
|
|
500
|
-
links: PageLink[];
|
|
501
|
-
actionButtonText?: ReactNode;
|
|
502
|
-
bgcolor?: SystemProps<Theme>['bgcolor'];
|
|
503
|
-
onActionButtonClick?: () => void;
|
|
504
|
-
}
|
|
505
|
-
declare const PageLinkComponent: React__default.FC<PageLinkComponentProps>;
|
|
506
|
-
|
|
507
|
-
type CollapsedContainerComponentProps = {
|
|
508
|
-
overrideNamespace?: string;
|
|
509
|
-
title: ReactNode;
|
|
510
|
-
subtitle?: ReactNode;
|
|
511
|
-
icon?: ReactNode;
|
|
512
|
-
expanded?: boolean;
|
|
513
|
-
uncollapsedContent?: ReactNode;
|
|
514
|
-
disableShadow?: boolean;
|
|
515
|
-
onExpanded?: (expanded: boolean) => void;
|
|
516
|
-
};
|
|
517
|
-
declare const CollapsedContainerComponent: (props: PropsWithChildren<CollapsedContainerComponentProps>) => React$1.JSX.Element;
|
|
518
|
-
|
|
519
|
-
declare const LanguageSelector: React__default.FC;
|
|
520
|
-
declare const PublicLanguageSelector: React__default.FC;
|
|
521
|
-
|
|
522
|
-
type TablePaginationComponentProps = {
|
|
523
|
-
overrideNamespace?: string;
|
|
524
|
-
rowsPerPageOptions?: readonly (number | {
|
|
525
|
-
value: number;
|
|
526
|
-
label: string;
|
|
527
|
-
})[] | undefined;
|
|
528
|
-
count: number;
|
|
529
|
-
rowsPerPage: number;
|
|
530
|
-
page: number;
|
|
531
|
-
onPageChange: TablePaginationProps['onPageChange'];
|
|
532
|
-
onRowsPerPageChange?: TablePaginationProps['onRowsPerPageChange'];
|
|
533
|
-
};
|
|
534
|
-
declare const TablePaginationComponent: ({ overrideNamespace, rowsPerPageOptions, count, rowsPerPage, page, onPageChange, onRowsPerPageChange, }: TablePaginationComponentProps) => React__default.JSX.Element;
|
|
535
|
-
|
|
536
|
-
type AIProviderType = 'gemini' | 'openai';
|
|
537
|
-
interface AIServiceConfig {
|
|
538
|
-
apiKey?: string;
|
|
539
|
-
modelName?: string;
|
|
540
|
-
}
|
|
541
|
-
interface AIConfig {
|
|
542
|
-
provider?: AIProviderType;
|
|
543
|
-
gemini?: AIServiceConfig;
|
|
544
|
-
openai?: AIServiceConfig;
|
|
545
|
-
}
|
|
546
|
-
interface AIGenerateOptions {
|
|
547
|
-
prompt: string;
|
|
548
|
-
systemInstruction?: string;
|
|
549
|
-
jsonMode?: boolean;
|
|
550
|
-
temperature?: number;
|
|
551
|
-
provider?: AIProviderType;
|
|
552
|
-
modelName?: string;
|
|
553
|
-
}
|
|
554
|
-
interface AIContextType {
|
|
555
|
-
activeProvider: AIProviderType;
|
|
556
|
-
config: AIConfig;
|
|
557
|
-
generate: <T = string>(options: AIGenerateOptions) => Promise<T | null>;
|
|
558
|
-
/** Метод для перезагрузки настроек из базы данных */
|
|
559
|
-
reloadConfig: () => Promise<void>;
|
|
560
|
-
}
|
|
561
|
-
interface AIProviderProps {
|
|
562
|
-
children: React__default.ReactNode;
|
|
563
|
-
config?: AIConfig;
|
|
564
|
-
}
|
|
565
|
-
declare const AIProvider: React__default.FC<AIProviderProps>;
|
|
566
|
-
declare const useAI: () => AIContextType;
|
|
567
|
-
|
|
568
|
-
type DialogSeverity = 'error' | 'warning' | 'info' | 'success';
|
|
569
|
-
type ConfirmResult = 'yes' | 'no' | 'cancel';
|
|
570
|
-
interface ConfirmOptions {
|
|
571
|
-
overrideNamespace?: string;
|
|
572
|
-
title?: ReactNode;
|
|
573
|
-
message: ReactNode;
|
|
574
|
-
type?: DialogSeverity;
|
|
575
|
-
showNoButton?: boolean;
|
|
576
|
-
showCancelButton?: boolean;
|
|
577
|
-
confirmText?: ReactNode;
|
|
578
|
-
noText?: ReactNode;
|
|
579
|
-
cancelText?: ReactNode;
|
|
580
|
-
confirmColor?: 'primary' | 'secondary' | 'error' | 'warning' | 'info' | 'success';
|
|
581
|
-
}
|
|
582
|
-
interface ConfirmationProviderProps {
|
|
583
|
-
overrideNamespace?: string;
|
|
584
|
-
children: ReactNode;
|
|
585
|
-
}
|
|
586
|
-
declare const ConfirmationProvider: React__default.FC<ConfirmationProviderProps>;
|
|
587
|
-
declare const useConfirmation: () => ((options: ConfirmOptions) => Promise<ConfirmResult>);
|
|
588
|
-
|
|
589
|
-
interface TranslateProviderProps {
|
|
590
|
-
namespace: string;
|
|
591
|
-
children: React__default.ReactNode;
|
|
592
|
-
}
|
|
593
|
-
declare const TranslateProvider: React__default.FC<TranslateProviderProps>;
|
|
594
|
-
declare const useTranslationNamespace: (overrideNamespace?: string) => string;
|
|
595
|
-
|
|
596
|
-
interface SupabaseConfig {
|
|
597
|
-
url: string;
|
|
598
|
-
anonKey: string;
|
|
599
|
-
}
|
|
600
|
-
interface SupabaseProviderProps {
|
|
601
|
-
children: React__default.ReactNode;
|
|
602
|
-
/** Вы можете передать готовый клиент Supabase... */
|
|
603
|
-
client?: SupabaseClient;
|
|
604
|
-
/** ...или передать конфиг (url и anonKey), и библиотека создаст клиент сама */
|
|
605
|
-
config?: SupabaseConfig;
|
|
606
|
-
}
|
|
607
|
-
declare const SupabaseProvider: React__default.FC<SupabaseProviderProps>;
|
|
608
|
-
/** Хук для доступа к Supabase из любого компонента */
|
|
609
|
-
declare const useSupabase: () => SupabaseClient;
|
|
610
|
-
|
|
611
|
-
interface AppSettingsMap {
|
|
612
|
-
max_group_members: number;
|
|
613
|
-
[key: string]: any;
|
|
614
|
-
}
|
|
615
|
-
interface AppSettingsContextType {
|
|
616
|
-
settings: AppSettingsMap;
|
|
617
|
-
loading: boolean;
|
|
618
|
-
error: string | null;
|
|
619
|
-
getSetting: <T = any>(key: string, defaultValue: T) => T;
|
|
620
|
-
refetchSettings: () => Promise<void>;
|
|
621
|
-
}
|
|
622
|
-
declare const AppSettingsProvider: React__default.FC<{
|
|
623
|
-
children: React__default.ReactNode;
|
|
624
|
-
}>;
|
|
625
|
-
declare const useAppSettings: () => AppSettingsContextType;
|
|
626
|
-
|
|
627
|
-
interface AuthContextType {
|
|
628
|
-
user: User | null;
|
|
629
|
-
profile: UserProfile | null;
|
|
630
|
-
membership: Membership | null;
|
|
631
|
-
userRole: MembershipRole | null;
|
|
632
|
-
activeCompanyId: string | null;
|
|
633
|
-
session: Session | null;
|
|
634
|
-
isAuthenticated: boolean;
|
|
635
|
-
loading: boolean;
|
|
636
|
-
signOut: () => Promise<void>;
|
|
637
|
-
updateProfile: (newProfileData: Partial<UserProfile>) => void;
|
|
638
|
-
refreshProfile: () => Promise<void>;
|
|
639
|
-
setActiveCompany: (companyId: string) => Promise<void>;
|
|
640
|
-
}
|
|
641
|
-
declare const AuthProvider: React__default.FC<{
|
|
642
|
-
children: React__default.ReactNode;
|
|
643
|
-
}>;
|
|
644
|
-
declare const useAuth: () => AuthContextType;
|
|
645
|
-
|
|
646
|
-
interface UserSettingsContextType {
|
|
647
|
-
settings: UserSettings;
|
|
648
|
-
loading: boolean;
|
|
649
|
-
error: string | null;
|
|
650
|
-
activeChatUserId: string | null;
|
|
651
|
-
toggleSidebar: (open?: boolean | React__default.SyntheticEvent) => Promise<void>;
|
|
652
|
-
toggleChat: (open?: boolean | React__default.SyntheticEvent) => Promise<void>;
|
|
653
|
-
openChatWithUser: (targetUserId: string) => Promise<void>;
|
|
654
|
-
setLanguage: (language: string) => Promise<void>;
|
|
655
|
-
setThemeMode: (mode: string) => Promise<void>;
|
|
656
|
-
refreshSettings: () => Promise<void>;
|
|
657
|
-
}
|
|
658
|
-
declare const UserSettingsProvider: React__default.FC<{
|
|
659
|
-
children: React__default.ReactNode;
|
|
660
|
-
}>;
|
|
661
|
-
declare const useUserSettings: () => UserSettingsContextType;
|
|
662
|
-
|
|
663
|
-
interface TranslateTextProps {
|
|
664
|
-
overrideNamespace?: string;
|
|
665
|
-
children: string;
|
|
666
|
-
values?: Record<string, any>;
|
|
667
|
-
}
|
|
668
|
-
declare const TranslateText: React__default.FC<TranslateTextProps>;
|
|
669
|
-
|
|
670
|
-
interface TranslationContextType {
|
|
671
|
-
isTranslationMode: boolean;
|
|
672
|
-
setIsTranslationMode: (val: boolean) => void;
|
|
673
|
-
canEdit: boolean;
|
|
674
|
-
isLoadingPermissions: boolean;
|
|
675
|
-
updateTranslation: (key: string, namespace: string, newValue: string) => Promise<void>;
|
|
676
|
-
}
|
|
677
|
-
declare const TranslationEditProvider: React__default.FC<{
|
|
678
|
-
children: React__default.ReactNode;
|
|
679
|
-
}>;
|
|
680
|
-
declare const useTranslationEdit: () => TranslationContextType;
|
|
681
|
-
|
|
682
|
-
interface Language {
|
|
683
|
-
code: string;
|
|
684
|
-
name: string;
|
|
685
|
-
svg_flag: string | null;
|
|
686
|
-
enabled: boolean;
|
|
687
|
-
created_at?: string;
|
|
437
|
+
interface Language {
|
|
438
|
+
code: string;
|
|
439
|
+
name: string;
|
|
440
|
+
svg_flag: string | null;
|
|
441
|
+
enabled: boolean;
|
|
442
|
+
created_at?: string;
|
|
688
443
|
}
|
|
689
444
|
interface LocalizationContextType {
|
|
690
445
|
currentLang: string;
|
|
@@ -823,6 +578,471 @@ declare const Providers: {
|
|
|
823
578
|
readonly AIProvider: React$1.FC<AIProviderProps>;
|
|
824
579
|
};
|
|
825
580
|
|
|
581
|
+
type DateTimePickerMode = 'date' | 'datetime' | 'time';
|
|
582
|
+
type DateTimePickerComponentProps = Omit<TextFieldProps, 'onChange' | 'value'> & {
|
|
583
|
+
overrideNamespace?: string;
|
|
584
|
+
/** Selected date value as Date object, ISO string, or null */
|
|
585
|
+
value?: Date | string | null;
|
|
586
|
+
/** Primary mode: 'date', 'datetime', or 'time' */
|
|
587
|
+
mode?: DateTimePickerMode;
|
|
588
|
+
/** Active language code e.g. 'uk', 'de', 'en', 'es', 'fr', 'it', 'pl' */
|
|
589
|
+
languageCode?: string;
|
|
590
|
+
/** Full list of languages available from your localization provider */
|
|
591
|
+
languagesList?: Language[];
|
|
592
|
+
/** Callback fired when date value changes */
|
|
593
|
+
onDateChange?: (data: {
|
|
594
|
+
date: Date | null;
|
|
595
|
+
formatted: string;
|
|
596
|
+
iso: string;
|
|
597
|
+
mode: DateTimePickerMode;
|
|
598
|
+
}) => void;
|
|
599
|
+
/** Fallback event handler */
|
|
600
|
+
onChange?: (e: React__default.ChangeEvent<HTMLInputElement>) => void;
|
|
601
|
+
copyTooltip?: string;
|
|
602
|
+
copiedTooltip?: string;
|
|
603
|
+
clearTooltip?: string;
|
|
604
|
+
lockTooltip?: string;
|
|
605
|
+
showLock?: boolean;
|
|
606
|
+
hideCopyButton?: boolean;
|
|
607
|
+
hideClearButton?: boolean;
|
|
608
|
+
};
|
|
609
|
+
declare const DateTimePickerComponent: React__default.FC<DateTimePickerComponentProps>;
|
|
610
|
+
|
|
611
|
+
type ButtonComponentProps = Omit<ButtonProps, 'children'> & {
|
|
612
|
+
/**
|
|
613
|
+
* Метка кнопки. Если передана строка, она автоматически
|
|
614
|
+
* оборачивается в <TranslateText> для локализации.
|
|
615
|
+
*/
|
|
616
|
+
label?: ReactNode;
|
|
617
|
+
/**
|
|
618
|
+
* Кастомный неймспейс для перевода (если нужен)
|
|
619
|
+
*/
|
|
620
|
+
overrideNamespace?: string;
|
|
621
|
+
/**
|
|
622
|
+
* Дочерние элементы (используются, если не передан label)
|
|
623
|
+
*/
|
|
624
|
+
children?: ReactNode;
|
|
625
|
+
};
|
|
626
|
+
declare const ButtonComponent: React$1.ForwardRefExoticComponent<Omit<ButtonComponentProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
627
|
+
|
|
628
|
+
interface CopyClipboardButtonComponentProps extends Omit<IconButtonProps, 'onClick'> {
|
|
629
|
+
overrideNamespace?: string;
|
|
630
|
+
/** Текст, який буде скопійовано в буфер обміну */
|
|
631
|
+
textToCopy: string;
|
|
632
|
+
/** Підказка для тултипу за замовчуванням (коли текст ще не скопійовано) */
|
|
633
|
+
copyTooltipText?: string;
|
|
634
|
+
/** Підказка для тултипу після успішного копіювання */
|
|
635
|
+
copiedTooltipText?: string;
|
|
636
|
+
/** Простір імен для локалізації i18n / TranslateText */
|
|
637
|
+
namespace?: string;
|
|
638
|
+
/** Час у мс, протягом якого відображається галочка успішного копіювання ( за замовчуванням 2000мс ) */
|
|
639
|
+
resetDelay?: number;
|
|
640
|
+
/** Callback, що викликається після успішного копіювання */
|
|
641
|
+
onCopySuccess?: (text: string) => void;
|
|
642
|
+
}
|
|
643
|
+
declare const CopyClipboardButtonComponent: React__default.FC<CopyClipboardButtonComponentProps>;
|
|
644
|
+
|
|
645
|
+
interface RefreshButtonComponentProps {
|
|
646
|
+
overrideNamespace?: string;
|
|
647
|
+
size?: 'small' | 'medium' | 'large';
|
|
648
|
+
color?: "success" | "error" | "info" | "warning";
|
|
649
|
+
onClick?: (event: React__default.MouseEvent<HTMLButtonElement>) => void | Promise<void>;
|
|
650
|
+
disabled?: boolean;
|
|
651
|
+
fullWidth?: boolean;
|
|
652
|
+
loading?: boolean;
|
|
653
|
+
tooltip?: ReactNode;
|
|
654
|
+
mobileViewOnly?: boolean;
|
|
655
|
+
disableMobileView?: boolean;
|
|
656
|
+
hideTooltipOnMobile?: boolean;
|
|
657
|
+
hideTooltipOnDesktop?: boolean;
|
|
658
|
+
}
|
|
659
|
+
declare const RefreshButtonComponent: React__default.FC<RefreshButtonComponentProps>;
|
|
660
|
+
|
|
661
|
+
interface TranslatableTooltipComponentProps extends Omit<TooltipProps, 'children'> {
|
|
662
|
+
overrideNamespace?: string;
|
|
663
|
+
disableSpan?: boolean;
|
|
664
|
+
children: React__default.ReactElement;
|
|
665
|
+
}
|
|
666
|
+
declare const TranslatableTooltipComponent: React__default.FC<TranslatableTooltipComponentProps>;
|
|
667
|
+
|
|
668
|
+
interface UserAvatarComponentProps {
|
|
669
|
+
userId?: string | null;
|
|
670
|
+
avatarUrl?: string | null;
|
|
671
|
+
displayName?: string | null;
|
|
672
|
+
employeePost?: string | null;
|
|
673
|
+
size?: number;
|
|
674
|
+
disableBorder?: boolean;
|
|
675
|
+
disableShadow?: boolean;
|
|
676
|
+
disablePopover?: boolean;
|
|
677
|
+
disableTooltip?: boolean;
|
|
678
|
+
sx?: SxProps<Theme>;
|
|
679
|
+
}
|
|
680
|
+
declare const UserAvatarComponent: React__default.FC<UserAvatarComponentProps>;
|
|
681
|
+
|
|
682
|
+
interface UserPopoverComponentProps {
|
|
683
|
+
overrideNamespace?: string;
|
|
684
|
+
userId: string;
|
|
685
|
+
anchorEl: HTMLElement | null;
|
|
686
|
+
open: boolean;
|
|
687
|
+
onClose: () => void;
|
|
688
|
+
}
|
|
689
|
+
declare const UserPopoverComponent: React__default.FC<UserPopoverComponentProps>;
|
|
690
|
+
|
|
691
|
+
interface UserRoleChipComponentProps {
|
|
692
|
+
overrideNamespace?: string;
|
|
693
|
+
role: MembershipRole;
|
|
694
|
+
}
|
|
695
|
+
declare const UserRoleChipComponent: React__default.FC<UserRoleChipComponentProps>;
|
|
696
|
+
|
|
697
|
+
interface UserStatusChipComponentProps {
|
|
698
|
+
overrideNamespace?: string;
|
|
699
|
+
state: {
|
|
700
|
+
profile_archived: boolean;
|
|
701
|
+
profile_locked: boolean;
|
|
702
|
+
excluded: boolean;
|
|
703
|
+
locked: boolean;
|
|
704
|
+
locked_reason: string;
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
declare const UserStatusChipComponent: React__default.FC<UserStatusChipComponentProps>;
|
|
708
|
+
|
|
709
|
+
interface MyAvatarComponentProps {
|
|
710
|
+
size?: number;
|
|
711
|
+
disableBorder?: boolean;
|
|
712
|
+
disableShadow?: boolean;
|
|
713
|
+
disablePopover?: boolean;
|
|
714
|
+
sx?: SxProps<Theme>;
|
|
715
|
+
}
|
|
716
|
+
declare const MyAvatarComponent: React__default.FC<MyAvatarComponentProps>;
|
|
717
|
+
|
|
718
|
+
interface ExpandableNoteComponentProps extends Omit<TypographyProps, 'children'> {
|
|
719
|
+
overrideNamespace?: string;
|
|
720
|
+
text?: string;
|
|
721
|
+
maxLength?: number;
|
|
722
|
+
label?: React__default.ReactNode;
|
|
723
|
+
}
|
|
724
|
+
declare const ExpandableNoteComponent: React__default.FC<ExpandableNoteComponentProps>;
|
|
725
|
+
|
|
726
|
+
interface ErrorAlertComponentProps {
|
|
727
|
+
overrideNamespace?: string;
|
|
728
|
+
title?: ReactNode;
|
|
729
|
+
message: ReactNode;
|
|
730
|
+
onRetry?: () => void;
|
|
731
|
+
retryText?: ReactNode;
|
|
732
|
+
isRetrying?: boolean;
|
|
733
|
+
}
|
|
734
|
+
declare const ErrorAlertComponent: React__default.FC<ErrorAlertComponentProps>;
|
|
735
|
+
|
|
736
|
+
interface TruncatedTypographyComponentProps extends TypographyProps {
|
|
737
|
+
/** Текст или содержимое */
|
|
738
|
+
children: React__default.ReactNode;
|
|
739
|
+
/** Максимальное количество строк. Если не указано или равно 1, обрезает в одну строку. */
|
|
740
|
+
lines?: number;
|
|
741
|
+
/** Пропсы для передачи в MUI Tooltip (например, placement, arrow и т.д.) */
|
|
742
|
+
tooltipProps?: Omit<TooltipProps, 'title' | 'children'>;
|
|
743
|
+
/** Принудительно показывать Tooltip всегда, даже если текст не обрезался */
|
|
744
|
+
alwaysShowTooltip?: boolean;
|
|
745
|
+
}
|
|
746
|
+
declare const TruncatedTypographyComponent: React__default.FC<TruncatedTypographyComponentProps>;
|
|
747
|
+
|
|
748
|
+
type TextTruncateMode = 'truncate' | 'clamp-2' | 'wrap';
|
|
749
|
+
interface HeaderActionItem {
|
|
750
|
+
id: string;
|
|
751
|
+
label: string;
|
|
752
|
+
icon?: React__default.ReactNode;
|
|
753
|
+
onClick: () => void;
|
|
754
|
+
color?: 'inherit' | 'primary' | 'secondary' | 'error' | 'warning' | 'info' | 'success';
|
|
755
|
+
disabled?: boolean;
|
|
756
|
+
divider?: boolean;
|
|
757
|
+
}
|
|
758
|
+
interface PrimaryActionProps {
|
|
759
|
+
label: string;
|
|
760
|
+
onClick: () => void;
|
|
761
|
+
icon?: React__default.ReactNode;
|
|
762
|
+
variant?: 'contained' | 'outlined' | 'text';
|
|
763
|
+
color?: 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning';
|
|
764
|
+
disabled?: boolean;
|
|
765
|
+
}
|
|
766
|
+
interface RefreshActionProps {
|
|
767
|
+
onClick: () => void;
|
|
768
|
+
disabled?: boolean;
|
|
769
|
+
}
|
|
770
|
+
interface PageHeaderProps {
|
|
771
|
+
overrideNamespace?: string;
|
|
772
|
+
icon?: React__default.ReactNode;
|
|
773
|
+
title: string;
|
|
774
|
+
subtitle?: string;
|
|
775
|
+
tag?: React__default.ReactNode;
|
|
776
|
+
titleTruncateMode?: TextTruncateMode;
|
|
777
|
+
subtitleTruncateMode?: TextTruncateMode;
|
|
778
|
+
customFragment?: React__default.JSX.Element;
|
|
779
|
+
primaryAction?: PrimaryActionProps;
|
|
780
|
+
secondaryActions?: HeaderActionItem[];
|
|
781
|
+
refreshAction?: RefreshActionProps;
|
|
782
|
+
mobileBreakpoint?: 'xs' | 'sm' | 'md';
|
|
783
|
+
forceMobileView?: boolean;
|
|
784
|
+
sx?: SxProps<Theme>;
|
|
785
|
+
}
|
|
786
|
+
type PageComponentProps = {
|
|
787
|
+
header?: PageHeaderProps;
|
|
788
|
+
};
|
|
789
|
+
declare const PageComponent: React__default.FC<PropsWithChildren<PageComponentProps>>;
|
|
790
|
+
|
|
791
|
+
type FilterWidth = '25%' | '33%' | '50%' | '66%' | '75%' | '100%';
|
|
792
|
+
interface FilterSectionProps extends PropsWithChildren {
|
|
793
|
+
/** Ширина самой секции на десктопе (по умолчанию '100%') */
|
|
794
|
+
width?: FilterWidth;
|
|
795
|
+
/** Ширина самой секции на мобильном (по умолчанию '100%') */
|
|
796
|
+
mobileWidth?: FilterWidth;
|
|
797
|
+
/** Ширина каждого элемента ВНУТРИ секции на десктопе (по умолчанию '50%') */
|
|
798
|
+
itemWidth?: FilterWidth;
|
|
799
|
+
/** Ширина каждого элемента ВНУТРИ секции на мобильном (по умолчанию '100%') */
|
|
800
|
+
itemMobileWidth?: FilterWidth;
|
|
801
|
+
}
|
|
802
|
+
interface FilterContainerComponentProps extends PropsWithChildren {
|
|
803
|
+
sections?: ReactNode[];
|
|
804
|
+
sx?: SxProps<Theme>;
|
|
805
|
+
}
|
|
806
|
+
declare const FilterContainerComponent: React__default.FC<FilterContainerComponentProps>;
|
|
807
|
+
|
|
808
|
+
interface PageLink {
|
|
809
|
+
text: ReactNode;
|
|
810
|
+
href?: string;
|
|
811
|
+
external?: boolean;
|
|
812
|
+
onClick?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
|
|
813
|
+
hidden?: boolean;
|
|
814
|
+
}
|
|
815
|
+
interface PageLinkComponentProps {
|
|
816
|
+
overrideNamespace?: string;
|
|
817
|
+
title: ReactNode;
|
|
818
|
+
subheader?: ReactNode;
|
|
819
|
+
description: ReactNode;
|
|
820
|
+
icon?: React__default.ReactElement;
|
|
821
|
+
links: PageLink[];
|
|
822
|
+
actionButtonText?: ReactNode;
|
|
823
|
+
bgcolor?: SystemProps<Theme>['bgcolor'];
|
|
824
|
+
onActionButtonClick?: () => void;
|
|
825
|
+
}
|
|
826
|
+
declare const PageLinkComponent: React__default.FC<PageLinkComponentProps>;
|
|
827
|
+
|
|
828
|
+
type CollapsedContainerComponentProps = {
|
|
829
|
+
overrideNamespace?: string;
|
|
830
|
+
title: ReactNode;
|
|
831
|
+
subtitle?: ReactNode;
|
|
832
|
+
icon?: ReactNode;
|
|
833
|
+
expanded?: boolean;
|
|
834
|
+
uncollapsedContent?: ReactNode;
|
|
835
|
+
disableShadow?: boolean;
|
|
836
|
+
onExpanded?: (expanded: boolean) => void;
|
|
837
|
+
};
|
|
838
|
+
declare const CollapsedContainerComponent: (props: PropsWithChildren<CollapsedContainerComponentProps>) => React$1.JSX.Element;
|
|
839
|
+
|
|
840
|
+
declare const LanguageSelector: React__default.FC;
|
|
841
|
+
declare const PublicLanguageSelector: React__default.FC;
|
|
842
|
+
|
|
843
|
+
type TablePaginationComponentProps = {
|
|
844
|
+
overrideNamespace?: string;
|
|
845
|
+
rowsPerPageOptions?: readonly (number | {
|
|
846
|
+
value: number;
|
|
847
|
+
label: string;
|
|
848
|
+
})[] | undefined;
|
|
849
|
+
count: number;
|
|
850
|
+
rowsPerPage: number;
|
|
851
|
+
page: number;
|
|
852
|
+
onPageChange: TablePaginationProps['onPageChange'];
|
|
853
|
+
onRowsPerPageChange?: TablePaginationProps['onRowsPerPageChange'];
|
|
854
|
+
};
|
|
855
|
+
declare const TablePaginationComponent: ({ overrideNamespace, rowsPerPageOptions, count, rowsPerPage, page, onPageChange, onRowsPerPageChange, }: TablePaginationComponentProps) => React__default.JSX.Element;
|
|
856
|
+
|
|
857
|
+
interface ActionMenuItem<T> {
|
|
858
|
+
label: ReactNode;
|
|
859
|
+
icon?: ReactNode;
|
|
860
|
+
onClick: (row: T) => void;
|
|
861
|
+
disabled?: boolean;
|
|
862
|
+
hidden?: boolean;
|
|
863
|
+
color?: 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
864
|
+
divider?: boolean;
|
|
865
|
+
}
|
|
866
|
+
interface BatchActionMenuItem<T> {
|
|
867
|
+
label: ReactNode;
|
|
868
|
+
icon?: ReactNode;
|
|
869
|
+
onClick: (rows: T[]) => void;
|
|
870
|
+
disabled?: boolean;
|
|
871
|
+
hidden?: boolean;
|
|
872
|
+
color?: 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
873
|
+
divider?: boolean;
|
|
874
|
+
}
|
|
875
|
+
interface TableColumn<T> {
|
|
876
|
+
field: string;
|
|
877
|
+
headerName?: ReactNode;
|
|
878
|
+
exportHeaderName?: string;
|
|
879
|
+
width?: number;
|
|
880
|
+
flex?: number;
|
|
881
|
+
sortable?: boolean;
|
|
882
|
+
filterable?: boolean;
|
|
883
|
+
resizable?: boolean;
|
|
884
|
+
disableReorder?: boolean;
|
|
885
|
+
hideable?: boolean;
|
|
886
|
+
exportable?: boolean;
|
|
887
|
+
pinned?: 'left' | 'right';
|
|
888
|
+
align?: 'left' | 'center' | 'right';
|
|
889
|
+
headerAlign?: 'left' | 'center' | 'right';
|
|
890
|
+
defaultHidden?: boolean;
|
|
891
|
+
renderField?: (row: T, value: any) => ReactNode;
|
|
892
|
+
renderHeader?: () => ReactNode;
|
|
893
|
+
/** Функция для извлечения значения из глубоких объектов для сортировки и фильтрации */
|
|
894
|
+
valueGetter?: (value: any, row: T) => any;
|
|
895
|
+
/** Кастомная функция сравнения (для клиентской сортировки) */
|
|
896
|
+
sortComparator?: (v1: any, v2: any) => number;
|
|
897
|
+
}
|
|
898
|
+
interface FetchTableParams {
|
|
899
|
+
page: number;
|
|
900
|
+
pageSize: number;
|
|
901
|
+
sortModel: GridSortModel;
|
|
902
|
+
}
|
|
903
|
+
interface FetchtTableResponse<T> {
|
|
904
|
+
data: T[];
|
|
905
|
+
totalRows: number;
|
|
906
|
+
}
|
|
907
|
+
interface TableComponentExcelOptions {
|
|
908
|
+
disableExport: boolean;
|
|
909
|
+
allColumns: boolean;
|
|
910
|
+
includeHeaders: boolean;
|
|
911
|
+
fileName?: string;
|
|
912
|
+
}
|
|
913
|
+
interface TableComponentOptions {
|
|
914
|
+
noRowsText?: string;
|
|
915
|
+
hideToolbar?: boolean;
|
|
916
|
+
disableManageColumns?: boolean;
|
|
917
|
+
disableExcelExport?: boolean;
|
|
918
|
+
hideExcelExportButton?: boolean;
|
|
919
|
+
disableSorting?: boolean;
|
|
920
|
+
disableSelecting?: boolean;
|
|
921
|
+
hideRefreshButton?: boolean;
|
|
922
|
+
hideSelectAllButton?: boolean;
|
|
923
|
+
hideClearSelectionButton?: boolean;
|
|
924
|
+
hideManageColumnsButton?: boolean;
|
|
925
|
+
hideSortDialog?: boolean;
|
|
926
|
+
checkboxSelection?: boolean;
|
|
927
|
+
excelOptions?: TableComponentExcelOptions;
|
|
928
|
+
}
|
|
929
|
+
interface TableComponentProps<T extends {
|
|
930
|
+
id: string;
|
|
931
|
+
}> {
|
|
932
|
+
id: string;
|
|
933
|
+
/** Кастомное описание колонок */
|
|
934
|
+
namespace: string;
|
|
935
|
+
options?: TableComponentOptions;
|
|
936
|
+
columns: TableColumn<T>[];
|
|
937
|
+
/** Функция выполнения запроса к серверу */
|
|
938
|
+
fetchData: (params: FetchTableParams) => Promise<FetchtTableResponse<T>>;
|
|
939
|
+
getRowId?: (row: T) => string | number;
|
|
940
|
+
/** Настройки пагинации по умолчанию */
|
|
941
|
+
initialPageSize?: number;
|
|
942
|
+
pageSizeOptions?: number[];
|
|
943
|
+
/** Сортировка по умолчанию */
|
|
944
|
+
defaultSortModel?: GridSortModel;
|
|
945
|
+
/** Действия для отдельной строки (закрепленная справа колонка) */
|
|
946
|
+
rowActions?: ActionMenuItem<T>[] | ((row: T) => ActionMenuItem<T>[]);
|
|
947
|
+
/** Включение мультивыбора (чекбоксы) */
|
|
948
|
+
checkboxSelection?: boolean;
|
|
949
|
+
/** Панель групповых действий для выбранных строк */
|
|
950
|
+
renderBatchActions?: (selectedIds: GridRowSelectionModel, selectedRows: T[]) => ReactNode;
|
|
951
|
+
/** Рендер карточки для мобильных устройств (< sm) */
|
|
952
|
+
renderMobileCard?: (row: T) => ReactNode;
|
|
953
|
+
/** Колбэк кнопки "Обновить" */
|
|
954
|
+
onRefresh?: () => void;
|
|
955
|
+
/** Высота таблицы или sx стили */
|
|
956
|
+
height?: number | string;
|
|
957
|
+
rowHeight?: number;
|
|
958
|
+
dialogs?: React.ReactNode;
|
|
959
|
+
onLoadingChange?: (loading: boolean) => void;
|
|
960
|
+
onAllSelected?: (status: boolean) => void;
|
|
961
|
+
onSelectingChange?: ((ids: string[]) => void) | undefined;
|
|
962
|
+
filters?: FilterSectionConfig[];
|
|
963
|
+
/** Уникальная версия схемы или дата обновления справочника (при изменении сбрасывает/пересчитывает новые колонки) */
|
|
964
|
+
schemaVersion: number | string;
|
|
965
|
+
/** Отключить сохранение настроек на сервере/в хранилище при необходимости */
|
|
966
|
+
disableSaveSettings?: boolean;
|
|
967
|
+
}
|
|
968
|
+
interface CustomNoRowsOverlayProps extends GridOverlayProps {
|
|
969
|
+
namespace?: string;
|
|
970
|
+
noRowsText?: string;
|
|
971
|
+
}
|
|
972
|
+
type FilterType = 'search' | 'select' | 'custom';
|
|
973
|
+
interface TableFilterOption {
|
|
974
|
+
label: React.ReactNode;
|
|
975
|
+
value: string;
|
|
976
|
+
}
|
|
977
|
+
interface TableFilterItemConfig {
|
|
978
|
+
id: string;
|
|
979
|
+
type: FilterType;
|
|
980
|
+
placeholderKey?: string;
|
|
981
|
+
label?: React.ReactNode;
|
|
982
|
+
value: any;
|
|
983
|
+
onChange: (value: any) => void;
|
|
984
|
+
options?: TableFilterOption[];
|
|
985
|
+
renderCustom?: () => React.ReactNode;
|
|
986
|
+
}
|
|
987
|
+
interface FilterSectionConfig {
|
|
988
|
+
width?: FilterWidth;
|
|
989
|
+
itemWidth?: FilterWidth;
|
|
990
|
+
items: TableFilterItemConfig[];
|
|
991
|
+
}
|
|
992
|
+
interface SavedTableSettings {
|
|
993
|
+
version?: number | string;
|
|
994
|
+
columnVisibility?: Record<string, boolean>;
|
|
995
|
+
columnAlignments?: Record<string, 'left' | 'center' | 'right'>;
|
|
996
|
+
columnOrder?: string[];
|
|
997
|
+
sortModel?: GridSortModel;
|
|
998
|
+
pageSize?: number;
|
|
999
|
+
columnWidths?: Record<string, number>;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
declare module '@mui/x-data-grid-premium' {
|
|
1003
|
+
interface ToolbarPropsOverrides {
|
|
1004
|
+
apiRef: React__default.RefObject<GridApiPremium | null>;
|
|
1005
|
+
options?: TableComponentOptions;
|
|
1006
|
+
columns: GridColDef[];
|
|
1007
|
+
columnVisibilityModel: Record<string, boolean>;
|
|
1008
|
+
defaultSortModel: GridSortModel;
|
|
1009
|
+
sortModel: GridSortModel;
|
|
1010
|
+
setSortModel: React__default.Dispatch<React__default.SetStateAction<GridSortModel>>;
|
|
1011
|
+
excelOptions?: {
|
|
1012
|
+
disableToolbarButton?: boolean;
|
|
1013
|
+
fileName?: string;
|
|
1014
|
+
allColumns?: boolean;
|
|
1015
|
+
includeHeaders?: boolean;
|
|
1016
|
+
};
|
|
1017
|
+
handleRefresh: () => void;
|
|
1018
|
+
isLoading: boolean;
|
|
1019
|
+
handleSelectAll: () => void;
|
|
1020
|
+
handleClearSelection: () => void;
|
|
1021
|
+
rows: any[];
|
|
1022
|
+
onRefresh?: () => void;
|
|
1023
|
+
selectedRows?: any[];
|
|
1024
|
+
renderBatchActions?: (selectedRows: any[]) => React__default.ReactNode;
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
interface TableComponentRef {
|
|
1028
|
+
refresh: () => void;
|
|
1029
|
+
handleSelectAll: () => void;
|
|
1030
|
+
handleClearSelection: () => void;
|
|
1031
|
+
resetToDefaultSettings: () => void;
|
|
1032
|
+
selectedIds: string[];
|
|
1033
|
+
exportToExcel: (options?: {
|
|
1034
|
+
fileName?: string;
|
|
1035
|
+
allColumns?: boolean;
|
|
1036
|
+
includeHeaders?: boolean;
|
|
1037
|
+
}) => void;
|
|
1038
|
+
loading: boolean;
|
|
1039
|
+
}
|
|
1040
|
+
declare const TableComponent: <T extends {
|
|
1041
|
+
id: string;
|
|
1042
|
+
}>(props: TableComponentProps<T> & {
|
|
1043
|
+
ref?: React__default.Ref<TableComponentRef>;
|
|
1044
|
+
}) => React__default.ReactElement;
|
|
1045
|
+
|
|
826
1046
|
interface UserSessionItem {
|
|
827
1047
|
id: string;
|
|
828
1048
|
user_id: string;
|
|
@@ -883,4 +1103,4 @@ declare const Utils: {
|
|
|
883
1103
|
};
|
|
884
1104
|
};
|
|
885
1105
|
|
|
886
|
-
export { type AIConfig, type AIGenerateOptions, AIProvider, type AIProviderProps, type AIProviderType, AppSettingsProvider, AuthProvider, BreadcrumbProvider, ButtonComponent, type ButtonComponentProps, CheckboxComponent, type CheckboxComponentProps, CollapsedContainerComponent, type CollapsedContainerComponentProps, type CompanyMember, type ConfirmOptions, type ConfirmResult, ConfirmationProvider, type ConfirmationProviderProps, CopyClipboardButtonComponent, type CopyClipboardButtonComponentProps, type DialogSeverity, type DisplayState, EmailInputComponent, type EmailInputComponentProps, ErrorAlertComponent, type ErrorAlertComponentProps, ExpandableNoteComponent, type ExpandableNoteComponentProps, FilterContainerComponent, type FilterContainerComponentProps, type FilterSectionProps, type FilterWidth, type FullCompanyMemberItem, type HeaderActionItem, Hooks, type Language, LocalizationProvider, type Membership, type MembershipRole, MyAvatarComponent, type MyAvatarComponentProps, NumberInputComponent, type NumberInputComponentProps, PageComponent, type PageComponentProps, type PageHeaderProps, type PageLink, PageLinkComponent, type PageLinkComponentProps, type PrimaryActionProps, LanguageSelector as ProtectedLanguageSelector, Providers, PublicLanguageSelector, type RefreshActionProps, RefreshButtonComponent, type RefreshButtonComponentProps, type SaveCompanyUserPayload, SearchComponent, type SearchComponentProps, SelectComponent, type SelectComponentProps, type SelectOption, Services, type SupabaseConfig, SupabaseProvider, type SupabaseProviderProps, SwitchComponent, type SwitchComponentProps, TablePaginationComponent, type TablePaginationComponentProps, TextFieldComponent, type TextFieldComponentProps, type TextTruncateMode, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, ToastProvider, type ToastType, TranslatableTooltipComponent, type TranslatableTooltipComponentProps, TranslateProvider, TranslateText, TranslationEditProvider, TruncatedTypographyComponent, type TruncatedTypographyComponentProps, type TypographyConfig, UrlComponent, type UrlComponentProps, UserAvatarComponent, type UserAvatarComponentProps, type UserGroupedSessions, UserPopoverComponent, type UserPopoverComponentProps, type UserProfile, UserRoleChipComponent, type UserRoleChipComponentProps, type UserSessionItem, type UserSettings, UserSettingsProvider, UserStatusChipComponent, type UserStatusChipComponentProps, type UserStatusType, Utils, defaultUserSettings, initI18n, useAI, useAppSettings, useAppTheme, useAuth, useBreadcrumb, useConfirmation, useLocalization, useSupabase, useToast, useTranslationEdit, useTranslationNamespace, useUserSettings };
|
|
1106
|
+
export { type AIConfig, type AIGenerateOptions, AIProvider, type AIProviderProps, type AIProviderType, type ActionMenuItem, AppSettingsProvider, AuthProvider, type BatchActionMenuItem, BreadcrumbProvider, ButtonComponent, type ButtonComponentProps, CheckboxComponent, type CheckboxComponentProps, CollapsedContainerComponent, type CollapsedContainerComponentProps, type CompanyMember, type ConfirmOptions, type ConfirmResult, ConfirmationProvider, type ConfirmationProviderProps, CopyClipboardButtonComponent, type CopyClipboardButtonComponentProps, type CustomNoRowsOverlayProps, DateTimePickerComponent, type DateTimePickerComponentProps, type DialogSeverity, type DisplayState, EmailInputComponent, type EmailInputComponentProps, ErrorAlertComponent, type ErrorAlertComponentProps, ExpandableNoteComponent, type ExpandableNoteComponentProps, type FetchTableParams, type FetchtTableResponse, FilterContainerComponent, type FilterContainerComponentProps, type FilterSectionProps, type FilterWidth, type FullCompanyMemberItem, type HeaderActionItem, Hooks, type Language, LocalizationProvider, type Membership, type MembershipRole, MyAvatarComponent, type MyAvatarComponentProps, NumberInputComponent, type NumberInputComponentProps, PageComponent, type PageComponentProps, type PageHeaderProps, type PageLink, PageLinkComponent, type PageLinkComponentProps, type PrimaryActionProps, LanguageSelector as ProtectedLanguageSelector, Providers, PublicLanguageSelector, type RefreshActionProps, RefreshButtonComponent, type RefreshButtonComponentProps, type SaveCompanyUserPayload, type SavedTableSettings, SearchComponent, type SearchComponentProps, SelectComponent, type SelectComponentProps, type SelectOption, Services, type SupabaseConfig, SupabaseProvider, type SupabaseProviderProps, SwitchComponent, type SwitchComponentProps, type TableColumn, TableComponent, type TableComponentExcelOptions, type TableComponentOptions, type TableComponentProps, type TableComponentRef, type TableFilterItemConfig, type TableFilterOption, TablePaginationComponent, type TablePaginationComponentProps, TextFieldComponent, type TextFieldComponentProps, type TextTruncateMode, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, ToastProvider, type ToastType, TranslatableTooltipComponent, type TranslatableTooltipComponentProps, TranslateProvider, TranslateText, TranslationEditProvider, TruncatedTypographyComponent, type TruncatedTypographyComponentProps, type TypographyConfig, UrlComponent, type UrlComponentProps, UserAvatarComponent, type UserAvatarComponentProps, type UserGroupedSessions, UserPopoverComponent, type UserPopoverComponentProps, type UserProfile, UserRoleChipComponent, type UserRoleChipComponentProps, type UserSessionItem, type UserSettings, UserSettingsProvider, UserStatusChipComponent, type UserStatusChipComponentProps, type UserStatusType, Utils, defaultUserSettings, initI18n, useAI, useAppSettings, useAppTheme, useAuth, useBreadcrumb, useConfirmation, useLocalization, useSupabase, useToast, useTranslationEdit, useTranslationNamespace, useUserSettings };
|