@serhii.olishevskyi/docs 1.2.28 → 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 +191 -1
- package/dist/index.d.ts +191 -1
- package/dist/index.js +7736 -3122
- package/dist/index.mjs +4652 -21
- package/package.json +1 -1
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
1
27
|
// src/UI/components/data.display/UserPopoverComponent.tsx
|
|
2
28
|
import { useEffect as useEffect10, useState as useState14 } from "react";
|
|
3
29
|
import {
|
|
@@ -2752,6 +2778,8 @@ var UserPopoverComponent = ({
|
|
|
2752
2778
|
var UserPopoverComponent_default = UserPopoverComponent;
|
|
2753
2779
|
|
|
2754
2780
|
export {
|
|
2781
|
+
__commonJS,
|
|
2782
|
+
__toESM,
|
|
2755
2783
|
initI18n,
|
|
2756
2784
|
getDeviceId,
|
|
2757
2785
|
fetchCompanySessions,
|
package/dist/index.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ import * as React$1 from 'react';
|
|
|
2
2
|
import React__default, { ReactNode, PropsWithChildren } from 'react';
|
|
3
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';
|
|
@@ -853,6 +854,195 @@ type TablePaginationComponentProps = {
|
|
|
853
854
|
};
|
|
854
855
|
declare const TablePaginationComponent: ({ overrideNamespace, rowsPerPageOptions, count, rowsPerPage, page, onPageChange, onRowsPerPageChange, }: TablePaginationComponentProps) => React__default.JSX.Element;
|
|
855
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
|
+
|
|
856
1046
|
interface UserSessionItem {
|
|
857
1047
|
id: string;
|
|
858
1048
|
user_id: string;
|
|
@@ -913,4 +1103,4 @@ declare const Utils: {
|
|
|
913
1103
|
};
|
|
914
1104
|
};
|
|
915
1105
|
|
|
916
|
-
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, DateTimePickerComponent, type DateTimePickerComponentProps, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as React$1 from 'react';
|
|
|
2
2
|
import React__default, { ReactNode, PropsWithChildren } from 'react';
|
|
3
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';
|
|
@@ -853,6 +854,195 @@ type TablePaginationComponentProps = {
|
|
|
853
854
|
};
|
|
854
855
|
declare const TablePaginationComponent: ({ overrideNamespace, rowsPerPageOptions, count, rowsPerPage, page, onPageChange, onRowsPerPageChange, }: TablePaginationComponentProps) => React__default.JSX.Element;
|
|
855
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
|
+
|
|
856
1046
|
interface UserSessionItem {
|
|
857
1047
|
id: string;
|
|
858
1048
|
user_id: string;
|
|
@@ -913,4 +1103,4 @@ declare const Utils: {
|
|
|
913
1103
|
};
|
|
914
1104
|
};
|
|
915
1105
|
|
|
916
|
-
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, DateTimePickerComponent, type DateTimePickerComponentProps, 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 };
|