@cyber-harbour/ui 1.0.50 → 1.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +98 -4
- package/dist/index.d.ts +98 -4
- package/dist/index.js +275 -193
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +274 -192
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/Core/Checkbox/Checkbox.tsx +74 -0
- package/src/Core/Checkbox/index.ts +1 -0
- package/src/Core/Label/Label.tsx +122 -0
- package/src/Core/Label/index.ts +1 -0
- package/src/Core/index.ts +2 -0
- package/src/Graph2D/Graph2D.tsx +692 -512
- package/src/Graph2D/types.ts +40 -0
- package/src/Theme/componentFabric.ts +14 -2
- package/src/Theme/themes/dark.ts +18 -0
- package/src/Theme/themes/light.ts +18 -0
- package/src/Theme/types.ts +13 -0
- package/src/Theme/utils.ts +21 -0
package/dist/index.d.mts
CHANGED
|
@@ -25,6 +25,16 @@ type InputState = 'default' | 'focus' | 'error' | 'disabled';
|
|
|
25
25
|
type InputSize = 'empty' | 'small' | 'medium';
|
|
26
26
|
type TagVariant = 'fill' | 'outlined';
|
|
27
27
|
type TagColor = 'default' | 'primary' | 'error' | 'warning' | 'success' | 'disabled' | 'text' | 'orange' | string;
|
|
28
|
+
type LabelSize = 'small' | 'medium';
|
|
29
|
+
type LabelSizeStyle = {
|
|
30
|
+
fontSize: number | string;
|
|
31
|
+
gap: number | string;
|
|
32
|
+
marginBottom: number | string;
|
|
33
|
+
helpText: {
|
|
34
|
+
fontSize: number | string;
|
|
35
|
+
marginTop: number | string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
28
38
|
type Breakpoint = 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
29
39
|
type ButtonElementStyle = {
|
|
30
40
|
background: string;
|
|
@@ -267,6 +277,11 @@ type Theme = {
|
|
|
267
277
|
background: string;
|
|
268
278
|
};
|
|
269
279
|
};
|
|
280
|
+
label: {
|
|
281
|
+
sizes: Record<LabelSize, LabelSizeStyle>;
|
|
282
|
+
color: string;
|
|
283
|
+
helpTextColor: string;
|
|
284
|
+
};
|
|
270
285
|
};
|
|
271
286
|
type ThemeColors = Theme['colors'];
|
|
272
287
|
type ColorCategory = keyof ThemeColors;
|
|
@@ -292,6 +307,14 @@ declare const resolveThemeColor: (theme: DefaultTheme, colorPath: string | undef
|
|
|
292
307
|
*/
|
|
293
308
|
declare const pxToRem: (pxValue: number | string, baseSize?: number) => string;
|
|
294
309
|
declare const remToPx: (remValue: number | string, baseSize?: number) => number;
|
|
310
|
+
/**
|
|
311
|
+
* Converts a prop value to rem units if needed
|
|
312
|
+
*
|
|
313
|
+
* @param value - The pixel value to convert. Can be a number or a string with 'px' suffix
|
|
314
|
+
* @param baseSize - Base font size in pixels. Default is 16px (browser default)
|
|
315
|
+
* @returns The value in rem units as a string (e.g., "1.25rem")
|
|
316
|
+
*/
|
|
317
|
+
declare const propToRem: (value: number | string, baseSize?: number) => string;
|
|
295
318
|
/**
|
|
296
319
|
* Recursively converts all pixel values in an object to rem units
|
|
297
320
|
*
|
|
@@ -344,7 +367,7 @@ declare const lightTheme: DefaultTheme$1;
|
|
|
344
367
|
declare const darkThemePx: Theme;
|
|
345
368
|
declare const darkTheme: DefaultTheme$1;
|
|
346
369
|
|
|
347
|
-
type
|
|
370
|
+
type SpaceProps = {
|
|
348
371
|
m?: string | number;
|
|
349
372
|
mt?: string | number;
|
|
350
373
|
mr?: string | number;
|
|
@@ -360,13 +383,14 @@ type MarginProps = {
|
|
|
360
383
|
px?: string | number;
|
|
361
384
|
py?: string | number;
|
|
362
385
|
};
|
|
363
|
-
type FabricComponent<T = object> = T &
|
|
386
|
+
type FabricComponent<T = object> = T & SpaceProps;
|
|
364
387
|
type GeneratedFabricMarginProperties = 'margin' | 'margin-top' | 'margin-right' | 'margin-bottom' | 'margin-left' | 'margin-inline' | 'margin-block' | 'padding' | 'padding-top' | 'padding-right' | 'padding-bottom' | 'padding-left' | 'padding-inline' | 'padding-block';
|
|
365
388
|
declare const generatePropertySpaceStyle: (theme: DefaultTheme, property: GeneratedFabricMarginProperties, value?: string | number, ignoredOptions?: GeneratedFabricMarginProperties[]) => string;
|
|
366
389
|
type FabricComponentOptions = {
|
|
367
390
|
ignoreStyles?: GeneratedFabricMarginProperties[] | undefined;
|
|
368
391
|
};
|
|
369
|
-
declare const createComponent: <T extends object = {}>(component: React.ComponentType<T>, options?: FabricComponentOptions) => styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<T | (react.PropsWithoutRef<T> & react.RefAttributes<react.Component<T, any, any>>), T & object &
|
|
392
|
+
declare const createComponent: <T extends object = {}>(component: React.ComponentType<T>, options?: FabricComponentOptions) => styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<T | (react.PropsWithoutRef<T> & react.RefAttributes<react.Component<T, any, any>>), T & object & SpaceProps>> & (string & (Omit<react.ComponentClass<T, any>, keyof react.Component<any, {}, any>> | Omit<react.FunctionComponent<T>, keyof react.Component<any, {}, any>>));
|
|
393
|
+
declare const destructSpaceProps: <T extends FabricComponent>(props: T) => SpaceProps;
|
|
370
394
|
|
|
371
395
|
type BaseButtonProps = FabricComponent<{
|
|
372
396
|
children?: any;
|
|
@@ -905,6 +929,27 @@ type AlertProps = FabricComponent<{
|
|
|
905
929
|
}> & Omit<react__default.HTMLAttributes<HTMLDivElement>, 'children'>;
|
|
906
930
|
declare const Alert: ({ title, note, ...props }: AlertProps) => react_jsx_runtime.JSX.Element;
|
|
907
931
|
|
|
932
|
+
type LabelProps = FabricComponent<{
|
|
933
|
+
label?: any;
|
|
934
|
+
helpText?: any;
|
|
935
|
+
errorText?: string;
|
|
936
|
+
size?: LabelSize;
|
|
937
|
+
children: any;
|
|
938
|
+
}> & Omit<react__default.LabelHTMLAttributes<HTMLLabelElement>, 'children'> & (LabelDirection | LabelDirectionRaw);
|
|
939
|
+
type LabelDirectionRaw = {
|
|
940
|
+
direction?: 'row' | 'row-reverse';
|
|
941
|
+
childrenWidth?: number | string;
|
|
942
|
+
};
|
|
943
|
+
type LabelDirection = {
|
|
944
|
+
direction?: Omit<react__default.CSSProperties['flexDirection'], 'row' | 'row-reverse'>;
|
|
945
|
+
};
|
|
946
|
+
declare const Label: ({ label, helpText, children, direction, size, errorText, ...props }: LabelProps) => react_jsx_runtime.JSX.Element;
|
|
947
|
+
|
|
948
|
+
type CheckboxProps = FabricComponent<{
|
|
949
|
+
label?: any;
|
|
950
|
+
}> & Omit<react__default.InputHTMLAttributes<HTMLInputElement>, 'type'>;
|
|
951
|
+
declare const Checkbox: ({ label, className, disabled, ...props }: CheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
952
|
+
|
|
908
953
|
interface PageLayoutProps {
|
|
909
954
|
header?: any;
|
|
910
955
|
sidebar?: any;
|
|
@@ -951,6 +996,53 @@ interface Graph2DRef {
|
|
|
951
996
|
*/
|
|
952
997
|
removeNodes: (nodeIds: (string | number)[]) => void;
|
|
953
998
|
}
|
|
999
|
+
/**
|
|
1000
|
+
* Интерфейс для внутреннего состояния компонента Graph2D
|
|
1001
|
+
*/
|
|
1002
|
+
interface GraphState {
|
|
1003
|
+
/** Трансформация графа (позиционирование и масштаб) */
|
|
1004
|
+
transform: {
|
|
1005
|
+
x: number;
|
|
1006
|
+
y: number;
|
|
1007
|
+
k: number;
|
|
1008
|
+
};
|
|
1009
|
+
/** Флаг режима панорамирования */
|
|
1010
|
+
isPanning: boolean;
|
|
1011
|
+
/** Узел, над которым находится курсор */
|
|
1012
|
+
hoveredNode: NodeObject | null;
|
|
1013
|
+
/** Связь, над которой находится курсор */
|
|
1014
|
+
hoveredLink: LinkObject | null;
|
|
1015
|
+
/** Узел, который в данный момент перетаскивается */
|
|
1016
|
+
draggedNode: NodeObject | null;
|
|
1017
|
+
/** Выбранный узел */
|
|
1018
|
+
selectedNode: NodeObject | null;
|
|
1019
|
+
/** Индекс кнопки, над которой находится курсор */
|
|
1020
|
+
hoveredButtonIndex: number | null;
|
|
1021
|
+
/** Набор узлов, которые должны быть подсвечены */
|
|
1022
|
+
highlightNodes: Set<NodeObject>;
|
|
1023
|
+
/** Набор связей, которые должны быть подсвечены */
|
|
1024
|
+
highlightLinks: Set<any>;
|
|
1025
|
+
/** Последняя позиция курсора */
|
|
1026
|
+
lastMousePos: {
|
|
1027
|
+
x: number;
|
|
1028
|
+
y: number;
|
|
1029
|
+
};
|
|
1030
|
+
/** Флаг необходимости остановки распространения события */
|
|
1031
|
+
mustBeStoppedPropagation: boolean;
|
|
1032
|
+
/** Последний узел, над которым был курсор */
|
|
1033
|
+
lastHoveredNode: NodeObject | null;
|
|
1034
|
+
/** Кэшированная ссылка на последний узел, над которым был курсор (для избежания лишних вычислений) */
|
|
1035
|
+
lastHoveredNodeRef: NodeObject | null;
|
|
1036
|
+
/** Начальная позиция курсора при начале перетаскивания */
|
|
1037
|
+
mouseStartPos: {
|
|
1038
|
+
x: number;
|
|
1039
|
+
y: number;
|
|
1040
|
+
} | null;
|
|
1041
|
+
/** Флаг режима перетаскивания */
|
|
1042
|
+
isDragging: boolean;
|
|
1043
|
+
width: number;
|
|
1044
|
+
height: number;
|
|
1045
|
+
}
|
|
954
1046
|
interface Graph2DProps {
|
|
955
1047
|
graphData: GraphData;
|
|
956
1048
|
loading?: boolean;
|
|
@@ -960,6 +1052,8 @@ interface Graph2DProps {
|
|
|
960
1052
|
onNodeClick?: (node: NodeObject) => void;
|
|
961
1053
|
onBackgroundClick?: () => void;
|
|
962
1054
|
onNodeHover?: (node: NodeObject | null) => void;
|
|
1055
|
+
onLinkHover?: (link: LinkObject | null) => void;
|
|
1056
|
+
onLinkClick?: (link: LinkObject) => void;
|
|
963
1057
|
}
|
|
964
1058
|
interface NodeButton {
|
|
965
1059
|
img: string;
|
|
@@ -998,4 +1092,4 @@ interface FullscreenCardProps {
|
|
|
998
1092
|
}
|
|
999
1093
|
declare const FullscreenCard: ({ isActive, position, top, left, right, bottom, ...props }: FullscreenCardProps) => react_jsx_runtime.JSX.Element;
|
|
1000
1094
|
|
|
1001
|
-
export { type Action, Alert, AlertIcon, ApiIcon, ArrowCircleTopRightIcon, ArrowRightIcon, BallsMenu, Box, type Breakpoint, BugReportIcon, BusIcon, Button, type ButtonColor, type ButtonElementStyle, type ButtonProps, type ButtonSize, type ButtonSizeStyle, type ButtonState, type ButtonVariant, CalendarIcon, CarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseCircleIcon, ClosedLockIcon, type ColorVariant, type ColumnTable, Container, ContextMenu, ContextMenuDelimiter, CrossIcon, DataSetsIcon, DeepSearchIcon, DisabledVisibleIcon, DocsIcon, DownloadIcon, EditUserIcon, EmptyData, type EmptyDataProps, EnableVisibleIcon, EnterArrowLeftIcon, type FabricComponent, FileIcon, FiltersIcon, FlexContainer, FlexItem, FullscreenCard, GlobalStyle, Graph2D, type Graph2DProps, type Graph2DRef, type GraphData, Header, HeaderDelimeter, HeaderSection, HomepageIcon, InfoCircleFilledIcon, InfoCircleIcon, Input, type InputElementProps, type InputElementStyle, type InputProps, type InputSize, type InputSizeStyle, type InputState, type InputVariant, Line, type LinkObject, ListMenu, ListMenuItem, type ListMenuItemAnchorProps, type ListMenuItemBase, type ListMenuItemButtonProps, type ListMenuItemProps, type ListMenuProps, ListMenuSection, type ListMenuSectionProps, MapRadarIcon, MaximizeIcon, MoonIcon, type NestedColorPaths, type NodeButton, type NodeObject, OpenLockIcon, OrganizationIcon, PageLayout, Pagination, type PaginationProps, PasswordFinderIcon, PhonebookIcon, PlaneIcon, PlusIcon, PrintIcon, Profiler2Icon, ProfilerIcon, type RenderCellProps, type RenderHeaderCellProps, RowActionsMenu, SandBoxIcon, SearchIcon, Select, ShipIcon, Sidebar, SidebarContext, SidebarDelimeter, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, StatisticIcon, StyledContainer, SunIcon, Table, Tag, type TagColor, type TagElementStyle, type TagVariant, type TextAreaElementProps, type Theme, type ThemeMode, ThemeProvider, Typography, type TypographyVariant, UnfoldIcon, UpRightArrowCircleIcon, UsersIcon, VectorIcon, WayIcon, convertPaletteToRem, createComponent, darkTheme, darkThemePx, generatePropertySpaceStyle, getBreakpoint, getButtonSizeStyles, getButtonStyles, getInputStyles, getTypographyStyles, hexToRgba, lightTheme, lightThemePx, pxToRem, remToPx, resolveThemeColor, useContextMenuControl };
|
|
1095
|
+
export { type Action, Alert, AlertIcon, ApiIcon, ArrowCircleTopRightIcon, ArrowRightIcon, BallsMenu, Box, type Breakpoint, BugReportIcon, BusIcon, Button, type ButtonColor, type ButtonElementStyle, type ButtonProps, type ButtonSize, type ButtonSizeStyle, type ButtonState, type ButtonVariant, CalendarIcon, CarIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseCircleIcon, ClosedLockIcon, type ColorVariant, type ColumnTable, Container, ContextMenu, ContextMenuDelimiter, CrossIcon, DataSetsIcon, DeepSearchIcon, DisabledVisibleIcon, DocsIcon, DownloadIcon, EditUserIcon, EmptyData, type EmptyDataProps, EnableVisibleIcon, EnterArrowLeftIcon, type FabricComponent, FileIcon, FiltersIcon, FlexContainer, FlexItem, FullscreenCard, GlobalStyle, Graph2D, type Graph2DProps, type Graph2DRef, type GraphData, type GraphState, Header, HeaderDelimeter, HeaderSection, HomepageIcon, InfoCircleFilledIcon, InfoCircleIcon, Input, type InputElementProps, type InputElementStyle, type InputProps, type InputSize, type InputSizeStyle, type InputState, type InputVariant, Label, type LabelSize, type LabelSizeStyle, Line, type LinkObject, ListMenu, ListMenuItem, type ListMenuItemAnchorProps, type ListMenuItemBase, type ListMenuItemButtonProps, type ListMenuItemProps, type ListMenuProps, ListMenuSection, type ListMenuSectionProps, MapRadarIcon, MaximizeIcon, MoonIcon, type NestedColorPaths, type NodeButton, type NodeObject, OpenLockIcon, OrganizationIcon, PageLayout, Pagination, type PaginationProps, PasswordFinderIcon, PhonebookIcon, PlaneIcon, PlusIcon, PrintIcon, Profiler2Icon, ProfilerIcon, type RenderCellProps, type RenderHeaderCellProps, RowActionsMenu, SandBoxIcon, SearchIcon, Select, ShipIcon, Sidebar, SidebarContext, SidebarDelimeter, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, StatisticIcon, StyledContainer, SunIcon, Table, Tag, type TagColor, type TagElementStyle, type TagVariant, type TextAreaElementProps, type Theme, type ThemeMode, ThemeProvider, Typography, type TypographyVariant, UnfoldIcon, UpRightArrowCircleIcon, UsersIcon, VectorIcon, WayIcon, convertPaletteToRem, createComponent, darkTheme, darkThemePx, destructSpaceProps, generatePropertySpaceStyle, getBreakpoint, getButtonSizeStyles, getButtonStyles, getInputStyles, getTypographyStyles, hexToRgba, lightTheme, lightThemePx, propToRem, pxToRem, remToPx, resolveThemeColor, useContextMenuControl };
|
package/dist/index.d.ts
CHANGED
|
@@ -25,6 +25,16 @@ type InputState = 'default' | 'focus' | 'error' | 'disabled';
|
|
|
25
25
|
type InputSize = 'empty' | 'small' | 'medium';
|
|
26
26
|
type TagVariant = 'fill' | 'outlined';
|
|
27
27
|
type TagColor = 'default' | 'primary' | 'error' | 'warning' | 'success' | 'disabled' | 'text' | 'orange' | string;
|
|
28
|
+
type LabelSize = 'small' | 'medium';
|
|
29
|
+
type LabelSizeStyle = {
|
|
30
|
+
fontSize: number | string;
|
|
31
|
+
gap: number | string;
|
|
32
|
+
marginBottom: number | string;
|
|
33
|
+
helpText: {
|
|
34
|
+
fontSize: number | string;
|
|
35
|
+
marginTop: number | string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
28
38
|
type Breakpoint = 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
29
39
|
type ButtonElementStyle = {
|
|
30
40
|
background: string;
|
|
@@ -267,6 +277,11 @@ type Theme = {
|
|
|
267
277
|
background: string;
|
|
268
278
|
};
|
|
269
279
|
};
|
|
280
|
+
label: {
|
|
281
|
+
sizes: Record<LabelSize, LabelSizeStyle>;
|
|
282
|
+
color: string;
|
|
283
|
+
helpTextColor: string;
|
|
284
|
+
};
|
|
270
285
|
};
|
|
271
286
|
type ThemeColors = Theme['colors'];
|
|
272
287
|
type ColorCategory = keyof ThemeColors;
|
|
@@ -292,6 +307,14 @@ declare const resolveThemeColor: (theme: DefaultTheme, colorPath: string | undef
|
|
|
292
307
|
*/
|
|
293
308
|
declare const pxToRem: (pxValue: number | string, baseSize?: number) => string;
|
|
294
309
|
declare const remToPx: (remValue: number | string, baseSize?: number) => number;
|
|
310
|
+
/**
|
|
311
|
+
* Converts a prop value to rem units if needed
|
|
312
|
+
*
|
|
313
|
+
* @param value - The pixel value to convert. Can be a number or a string with 'px' suffix
|
|
314
|
+
* @param baseSize - Base font size in pixels. Default is 16px (browser default)
|
|
315
|
+
* @returns The value in rem units as a string (e.g., "1.25rem")
|
|
316
|
+
*/
|
|
317
|
+
declare const propToRem: (value: number | string, baseSize?: number) => string;
|
|
295
318
|
/**
|
|
296
319
|
* Recursively converts all pixel values in an object to rem units
|
|
297
320
|
*
|
|
@@ -344,7 +367,7 @@ declare const lightTheme: DefaultTheme$1;
|
|
|
344
367
|
declare const darkThemePx: Theme;
|
|
345
368
|
declare const darkTheme: DefaultTheme$1;
|
|
346
369
|
|
|
347
|
-
type
|
|
370
|
+
type SpaceProps = {
|
|
348
371
|
m?: string | number;
|
|
349
372
|
mt?: string | number;
|
|
350
373
|
mr?: string | number;
|
|
@@ -360,13 +383,14 @@ type MarginProps = {
|
|
|
360
383
|
px?: string | number;
|
|
361
384
|
py?: string | number;
|
|
362
385
|
};
|
|
363
|
-
type FabricComponent<T = object> = T &
|
|
386
|
+
type FabricComponent<T = object> = T & SpaceProps;
|
|
364
387
|
type GeneratedFabricMarginProperties = 'margin' | 'margin-top' | 'margin-right' | 'margin-bottom' | 'margin-left' | 'margin-inline' | 'margin-block' | 'padding' | 'padding-top' | 'padding-right' | 'padding-bottom' | 'padding-left' | 'padding-inline' | 'padding-block';
|
|
365
388
|
declare const generatePropertySpaceStyle: (theme: DefaultTheme, property: GeneratedFabricMarginProperties, value?: string | number, ignoredOptions?: GeneratedFabricMarginProperties[]) => string;
|
|
366
389
|
type FabricComponentOptions = {
|
|
367
390
|
ignoreStyles?: GeneratedFabricMarginProperties[] | undefined;
|
|
368
391
|
};
|
|
369
|
-
declare const createComponent: <T extends object = {}>(component: React.ComponentType<T>, options?: FabricComponentOptions) => styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<T | (react.PropsWithoutRef<T> & react.RefAttributes<react.Component<T, any, any>>), T & object &
|
|
392
|
+
declare const createComponent: <T extends object = {}>(component: React.ComponentType<T>, options?: FabricComponentOptions) => styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<T | (react.PropsWithoutRef<T> & react.RefAttributes<react.Component<T, any, any>>), T & object & SpaceProps>> & (string & (Omit<react.ComponentClass<T, any>, keyof react.Component<any, {}, any>> | Omit<react.FunctionComponent<T>, keyof react.Component<any, {}, any>>));
|
|
393
|
+
declare const destructSpaceProps: <T extends FabricComponent>(props: T) => SpaceProps;
|
|
370
394
|
|
|
371
395
|
type BaseButtonProps = FabricComponent<{
|
|
372
396
|
children?: any;
|
|
@@ -905,6 +929,27 @@ type AlertProps = FabricComponent<{
|
|
|
905
929
|
}> & Omit<react__default.HTMLAttributes<HTMLDivElement>, 'children'>;
|
|
906
930
|
declare const Alert: ({ title, note, ...props }: AlertProps) => react_jsx_runtime.JSX.Element;
|
|
907
931
|
|
|
932
|
+
type LabelProps = FabricComponent<{
|
|
933
|
+
label?: any;
|
|
934
|
+
helpText?: any;
|
|
935
|
+
errorText?: string;
|
|
936
|
+
size?: LabelSize;
|
|
937
|
+
children: any;
|
|
938
|
+
}> & Omit<react__default.LabelHTMLAttributes<HTMLLabelElement>, 'children'> & (LabelDirection | LabelDirectionRaw);
|
|
939
|
+
type LabelDirectionRaw = {
|
|
940
|
+
direction?: 'row' | 'row-reverse';
|
|
941
|
+
childrenWidth?: number | string;
|
|
942
|
+
};
|
|
943
|
+
type LabelDirection = {
|
|
944
|
+
direction?: Omit<react__default.CSSProperties['flexDirection'], 'row' | 'row-reverse'>;
|
|
945
|
+
};
|
|
946
|
+
declare const Label: ({ label, helpText, children, direction, size, errorText, ...props }: LabelProps) => react_jsx_runtime.JSX.Element;
|
|
947
|
+
|
|
948
|
+
type CheckboxProps = FabricComponent<{
|
|
949
|
+
label?: any;
|
|
950
|
+
}> & Omit<react__default.InputHTMLAttributes<HTMLInputElement>, 'type'>;
|
|
951
|
+
declare const Checkbox: ({ label, className, disabled, ...props }: CheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
952
|
+
|
|
908
953
|
interface PageLayoutProps {
|
|
909
954
|
header?: any;
|
|
910
955
|
sidebar?: any;
|
|
@@ -951,6 +996,53 @@ interface Graph2DRef {
|
|
|
951
996
|
*/
|
|
952
997
|
removeNodes: (nodeIds: (string | number)[]) => void;
|
|
953
998
|
}
|
|
999
|
+
/**
|
|
1000
|
+
* Интерфейс для внутреннего состояния компонента Graph2D
|
|
1001
|
+
*/
|
|
1002
|
+
interface GraphState {
|
|
1003
|
+
/** Трансформация графа (позиционирование и масштаб) */
|
|
1004
|
+
transform: {
|
|
1005
|
+
x: number;
|
|
1006
|
+
y: number;
|
|
1007
|
+
k: number;
|
|
1008
|
+
};
|
|
1009
|
+
/** Флаг режима панорамирования */
|
|
1010
|
+
isPanning: boolean;
|
|
1011
|
+
/** Узел, над которым находится курсор */
|
|
1012
|
+
hoveredNode: NodeObject | null;
|
|
1013
|
+
/** Связь, над которой находится курсор */
|
|
1014
|
+
hoveredLink: LinkObject | null;
|
|
1015
|
+
/** Узел, который в данный момент перетаскивается */
|
|
1016
|
+
draggedNode: NodeObject | null;
|
|
1017
|
+
/** Выбранный узел */
|
|
1018
|
+
selectedNode: NodeObject | null;
|
|
1019
|
+
/** Индекс кнопки, над которой находится курсор */
|
|
1020
|
+
hoveredButtonIndex: number | null;
|
|
1021
|
+
/** Набор узлов, которые должны быть подсвечены */
|
|
1022
|
+
highlightNodes: Set<NodeObject>;
|
|
1023
|
+
/** Набор связей, которые должны быть подсвечены */
|
|
1024
|
+
highlightLinks: Set<any>;
|
|
1025
|
+
/** Последняя позиция курсора */
|
|
1026
|
+
lastMousePos: {
|
|
1027
|
+
x: number;
|
|
1028
|
+
y: number;
|
|
1029
|
+
};
|
|
1030
|
+
/** Флаг необходимости остановки распространения события */
|
|
1031
|
+
mustBeStoppedPropagation: boolean;
|
|
1032
|
+
/** Последний узел, над которым был курсор */
|
|
1033
|
+
lastHoveredNode: NodeObject | null;
|
|
1034
|
+
/** Кэшированная ссылка на последний узел, над которым был курсор (для избежания лишних вычислений) */
|
|
1035
|
+
lastHoveredNodeRef: NodeObject | null;
|
|
1036
|
+
/** Начальная позиция курсора при начале перетаскивания */
|
|
1037
|
+
mouseStartPos: {
|
|
1038
|
+
x: number;
|
|
1039
|
+
y: number;
|
|
1040
|
+
} | null;
|
|
1041
|
+
/** Флаг режима перетаскивания */
|
|
1042
|
+
isDragging: boolean;
|
|
1043
|
+
width: number;
|
|
1044
|
+
height: number;
|
|
1045
|
+
}
|
|
954
1046
|
interface Graph2DProps {
|
|
955
1047
|
graphData: GraphData;
|
|
956
1048
|
loading?: boolean;
|
|
@@ -960,6 +1052,8 @@ interface Graph2DProps {
|
|
|
960
1052
|
onNodeClick?: (node: NodeObject) => void;
|
|
961
1053
|
onBackgroundClick?: () => void;
|
|
962
1054
|
onNodeHover?: (node: NodeObject | null) => void;
|
|
1055
|
+
onLinkHover?: (link: LinkObject | null) => void;
|
|
1056
|
+
onLinkClick?: (link: LinkObject) => void;
|
|
963
1057
|
}
|
|
964
1058
|
interface NodeButton {
|
|
965
1059
|
img: string;
|
|
@@ -998,4 +1092,4 @@ interface FullscreenCardProps {
|
|
|
998
1092
|
}
|
|
999
1093
|
declare const FullscreenCard: ({ isActive, position, top, left, right, bottom, ...props }: FullscreenCardProps) => react_jsx_runtime.JSX.Element;
|
|
1000
1094
|
|
|
1001
|
-
export { type Action, Alert, AlertIcon, ApiIcon, ArrowCircleTopRightIcon, ArrowRightIcon, BallsMenu, Box, type Breakpoint, BugReportIcon, BusIcon, Button, type ButtonColor, type ButtonElementStyle, type ButtonProps, type ButtonSize, type ButtonSizeStyle, type ButtonState, type ButtonVariant, CalendarIcon, CarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseCircleIcon, ClosedLockIcon, type ColorVariant, type ColumnTable, Container, ContextMenu, ContextMenuDelimiter, CrossIcon, DataSetsIcon, DeepSearchIcon, DisabledVisibleIcon, DocsIcon, DownloadIcon, EditUserIcon, EmptyData, type EmptyDataProps, EnableVisibleIcon, EnterArrowLeftIcon, type FabricComponent, FileIcon, FiltersIcon, FlexContainer, FlexItem, FullscreenCard, GlobalStyle, Graph2D, type Graph2DProps, type Graph2DRef, type GraphData, Header, HeaderDelimeter, HeaderSection, HomepageIcon, InfoCircleFilledIcon, InfoCircleIcon, Input, type InputElementProps, type InputElementStyle, type InputProps, type InputSize, type InputSizeStyle, type InputState, type InputVariant, Line, type LinkObject, ListMenu, ListMenuItem, type ListMenuItemAnchorProps, type ListMenuItemBase, type ListMenuItemButtonProps, type ListMenuItemProps, type ListMenuProps, ListMenuSection, type ListMenuSectionProps, MapRadarIcon, MaximizeIcon, MoonIcon, type NestedColorPaths, type NodeButton, type NodeObject, OpenLockIcon, OrganizationIcon, PageLayout, Pagination, type PaginationProps, PasswordFinderIcon, PhonebookIcon, PlaneIcon, PlusIcon, PrintIcon, Profiler2Icon, ProfilerIcon, type RenderCellProps, type RenderHeaderCellProps, RowActionsMenu, SandBoxIcon, SearchIcon, Select, ShipIcon, Sidebar, SidebarContext, SidebarDelimeter, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, StatisticIcon, StyledContainer, SunIcon, Table, Tag, type TagColor, type TagElementStyle, type TagVariant, type TextAreaElementProps, type Theme, type ThemeMode, ThemeProvider, Typography, type TypographyVariant, UnfoldIcon, UpRightArrowCircleIcon, UsersIcon, VectorIcon, WayIcon, convertPaletteToRem, createComponent, darkTheme, darkThemePx, generatePropertySpaceStyle, getBreakpoint, getButtonSizeStyles, getButtonStyles, getInputStyles, getTypographyStyles, hexToRgba, lightTheme, lightThemePx, pxToRem, remToPx, resolveThemeColor, useContextMenuControl };
|
|
1095
|
+
export { type Action, Alert, AlertIcon, ApiIcon, ArrowCircleTopRightIcon, ArrowRightIcon, BallsMenu, Box, type Breakpoint, BugReportIcon, BusIcon, Button, type ButtonColor, type ButtonElementStyle, type ButtonProps, type ButtonSize, type ButtonSizeStyle, type ButtonState, type ButtonVariant, CalendarIcon, CarIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseCircleIcon, ClosedLockIcon, type ColorVariant, type ColumnTable, Container, ContextMenu, ContextMenuDelimiter, CrossIcon, DataSetsIcon, DeepSearchIcon, DisabledVisibleIcon, DocsIcon, DownloadIcon, EditUserIcon, EmptyData, type EmptyDataProps, EnableVisibleIcon, EnterArrowLeftIcon, type FabricComponent, FileIcon, FiltersIcon, FlexContainer, FlexItem, FullscreenCard, GlobalStyle, Graph2D, type Graph2DProps, type Graph2DRef, type GraphData, type GraphState, Header, HeaderDelimeter, HeaderSection, HomepageIcon, InfoCircleFilledIcon, InfoCircleIcon, Input, type InputElementProps, type InputElementStyle, type InputProps, type InputSize, type InputSizeStyle, type InputState, type InputVariant, Label, type LabelSize, type LabelSizeStyle, Line, type LinkObject, ListMenu, ListMenuItem, type ListMenuItemAnchorProps, type ListMenuItemBase, type ListMenuItemButtonProps, type ListMenuItemProps, type ListMenuProps, ListMenuSection, type ListMenuSectionProps, MapRadarIcon, MaximizeIcon, MoonIcon, type NestedColorPaths, type NodeButton, type NodeObject, OpenLockIcon, OrganizationIcon, PageLayout, Pagination, type PaginationProps, PasswordFinderIcon, PhonebookIcon, PlaneIcon, PlusIcon, PrintIcon, Profiler2Icon, ProfilerIcon, type RenderCellProps, type RenderHeaderCellProps, RowActionsMenu, SandBoxIcon, SearchIcon, Select, ShipIcon, Sidebar, SidebarContext, SidebarDelimeter, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, StatisticIcon, StyledContainer, SunIcon, Table, Tag, type TagColor, type TagElementStyle, type TagVariant, type TextAreaElementProps, type Theme, type ThemeMode, ThemeProvider, Typography, type TypographyVariant, UnfoldIcon, UpRightArrowCircleIcon, UsersIcon, VectorIcon, WayIcon, convertPaletteToRem, createComponent, darkTheme, darkThemePx, destructSpaceProps, generatePropertySpaceStyle, getBreakpoint, getButtonSizeStyles, getButtonStyles, getInputStyles, getTypographyStyles, hexToRgba, lightTheme, lightThemePx, propToRem, pxToRem, remToPx, resolveThemeColor, useContextMenuControl };
|