@glodon-aiot/react-components 0.0.0-snapshot-20250729081352
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/README.git.md +73 -0
- package/README.lib.md +135 -0
- package/dist/aiot-react-components.js +20191 -0
- package/dist/aiot-react-components.umd.cjs +183 -0
- package/dist/es/Button/index.mjs +48 -0
- package/dist/es/Button/style.less.mjs +4 -0
- package/dist/es/ConfirmableButton/index.mjs +59 -0
- package/dist/es/Drawable/Drawable.mjs +220 -0
- package/dist/es/Drawable/LineElement.mjs +27 -0
- package/dist/es/Drawable/MarkerElement.mjs +39 -0
- package/dist/es/Drawable/PolygonElement.mjs +88 -0
- package/dist/es/Drawable/index.mjs +16 -0
- package/dist/es/Drawable/state.mjs +134 -0
- package/dist/es/ExpandablePannel/index.mjs +94 -0
- package/dist/es/ExpandablePannel/style.less.mjs +4 -0
- package/dist/es/GOSImageMap/DrawableImageMap.mjs +49 -0
- package/dist/es/GOSImageMap/ImageMap.mjs +39 -0
- package/dist/es/IconButton/index.mjs +23 -0
- package/dist/es/IconButton/style.less.mjs +4 -0
- package/dist/es/Iconfont/index.mjs +8 -0
- package/dist/es/ImageMap/index.mjs +297 -0
- package/dist/es/ImageMap/style.less.mjs +4 -0
- package/dist/es/MouseTip/constant.mjs +9 -0
- package/dist/es/MouseTip/index.mjs +54 -0
- package/dist/es/MouseTip/style.less.mjs +4 -0
- package/dist/es/MouseTip/utils.mjs +70 -0
- package/dist/es/PanoramaRecordPlayer/index.mjs +84 -0
- package/dist/es/PassMap/index.mjs +43 -0
- package/dist/es/PassMap/style.less.mjs +4 -0
- package/dist/es/TrackMap/PointTooltip.mjs +86 -0
- package/dist/es/TrackMap/TrackPoint.mjs +57 -0
- package/dist/es/TrackMap/index.mjs +375 -0
- package/dist/es/TrackMap/style.less.mjs +4 -0
- package/dist/es/Zoom/index.mjs +48 -0
- package/dist/es/components/Copy/index.mjs +44 -0
- package/dist/es/components/Copy/style.less.mjs +4 -0
- package/dist/es/components/Markdown/ATag/index.mjs +47 -0
- package/dist/es/components/Markdown/Code/index.mjs +69 -0
- package/dist/es/components/Markdown/Image/index.mjs +59 -0
- package/dist/es/components/Markdown/Video/index.mjs +22 -0
- package/dist/es/components/Markdown/index.mjs +75 -0
- package/dist/es/components/Markdown/style.less.mjs +4 -0
- package/dist/es/index.mjs +34 -0
- package/dist/es/useBimface/index.mjs +148 -0
- package/dist/es/utils/JSAsyncLoader.mjs +7 -0
- package/dist/es/utils/clipboard.mjs +38 -0
- package/dist/es/utils/markdown/index.mjs +29 -0
- package/dist/lib/index.js +2 -0
- package/dist/src/Button/index.d.ts +10 -0
- package/dist/src/ConfirmableButton/index.d.ts +16 -0
- package/dist/src/Drawable/Drawable.d.ts +32 -0
- package/dist/src/Drawable/LineElement.d.ts +8 -0
- package/dist/src/Drawable/MarkerElement.d.ts +10 -0
- package/dist/src/Drawable/MarkersMap.d.ts +7 -0
- package/dist/src/Drawable/PolygonElement.d.ts +10 -0
- package/dist/src/Drawable/index.d.ts +33 -0
- package/dist/src/Drawable/state.d.ts +49 -0
- package/dist/src/ExpandablePannel/index.d.ts +24 -0
- package/dist/src/GOSImageMap/DrawableImageMap.d.ts +8 -0
- package/dist/src/GOSImageMap/ImageMap.d.ts +8 -0
- package/dist/src/GOSImageMap/index.d.ts +2 -0
- package/dist/src/IconButton/index.d.ts +5 -0
- package/dist/src/Iconfont/CloudIconfont.d.ts +2 -0
- package/dist/src/Iconfont/EdgeIconfont.d.ts +2 -0
- package/dist/src/Iconfont/font_3929209_z3fhml098hr.d.ts +0 -0
- package/dist/src/Iconfont/font_edge.d.ts +0 -0
- package/dist/src/Iconfont/index.d.ts +2 -0
- package/dist/src/ImageMap/index.d.ts +40 -0
- package/dist/src/MouseTip/constant.d.ts +6 -0
- package/dist/src/MouseTip/index.d.ts +17 -0
- package/dist/src/MouseTip/types.d.ts +8 -0
- package/dist/src/MouseTip/utils.d.ts +8 -0
- package/dist/src/PanoramaRecordPlayer/index.d.ts +14 -0
- package/dist/src/PassMap/index.d.ts +11 -0
- package/dist/src/TrackMap/PointTooltip.d.ts +9 -0
- package/dist/src/TrackMap/TrackPoint.d.ts +19 -0
- package/dist/src/TrackMap/index.d.ts +82 -0
- package/dist/src/Zoom/index.d.ts +13 -0
- package/dist/src/components/Copy/index.d.ts +5 -0
- package/dist/src/components/Markdown/ATag/index.d.ts +2 -0
- package/dist/src/components/Markdown/Code/index.d.ts +2 -0
- package/dist/src/components/Markdown/Image/index.d.ts +2 -0
- package/dist/src/components/Markdown/Video/index.d.ts +2 -0
- package/dist/src/components/Markdown/index.d.ts +9 -0
- package/dist/src/index.d.ts +17 -0
- package/dist/src/useBimface/example.d.ts +2 -0
- package/dist/src/useBimface/index.d.ts +65 -0
- package/dist/src/utils/JSAsyncLoader.d.ts +2 -0
- package/dist/src/utils/clipboard.d.ts +11 -0
- package/dist/src/utils/markdown/index.d.ts +10 -0
- package/dist/style.css +1 -0
- package/package.json +138 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React, FC, ReactNode } from 'react';
|
|
2
|
+
import { ButtonType } from 'antd/es/button';
|
|
3
|
+
export interface ButtonConfirm {
|
|
4
|
+
text: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ConfirmableButtonProps {
|
|
7
|
+
name: string;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
confirm?: boolean | ButtonConfirm;
|
|
10
|
+
type?: ButtonType;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
className?: string;
|
|
13
|
+
onConfirm?: (e?: React.MouseEvent<HTMLElement, MouseEvent> | undefined) => void;
|
|
14
|
+
}
|
|
15
|
+
declare const ConfirmableButton: FC<ConfirmableButtonProps>;
|
|
16
|
+
export default ConfirmableButton;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Line, Marker, Point, Polygon } from '.';
|
|
3
|
+
export type DrawableState = 'viewOnly' | 'drawingLine' | 'addingMarker' | 'drawingPolygon';
|
|
4
|
+
export interface DrawOptions {
|
|
5
|
+
lineColor?: string;
|
|
6
|
+
areaColor?: string;
|
|
7
|
+
lineWidth?: number | string;
|
|
8
|
+
lineDashArray?: string;
|
|
9
|
+
polygon?: {
|
|
10
|
+
showVertexIndex?: boolean;
|
|
11
|
+
vertexBgColor?: string;
|
|
12
|
+
vertexTextColor?: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface DrawableProps<MARKER extends Marker> {
|
|
16
|
+
drawOptions?: DrawOptions;
|
|
17
|
+
width?: number;
|
|
18
|
+
height?: number;
|
|
19
|
+
state: DrawableState;
|
|
20
|
+
scale: number;
|
|
21
|
+
lines?: Line[];
|
|
22
|
+
polygons?: Polygon[];
|
|
23
|
+
markers?: MARKER[];
|
|
24
|
+
markRenderer?(marker: MARKER): ReactNode;
|
|
25
|
+
onAddLine?(start: Point, end: Point): void;
|
|
26
|
+
onAddMarker?(at: Point): void;
|
|
27
|
+
onAddPolygon?(points: Point[]): void;
|
|
28
|
+
onStateChange?(state: DrawableState): void;
|
|
29
|
+
}
|
|
30
|
+
export interface State {
|
|
31
|
+
}
|
|
32
|
+
export default function Drawable<MARKER extends Marker>(props: DrawableProps<MARKER>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Marker, Point } from '.';
|
|
3
|
+
export interface MarkerElementProps<M extends Marker> {
|
|
4
|
+
marker: M;
|
|
5
|
+
onPointChange?(point: Point): void;
|
|
6
|
+
markRenderer?(marker: Marker): ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface State {
|
|
9
|
+
}
|
|
10
|
+
export default function MarkerElement<M extends Marker>(props: MarkerElementProps<M>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Point, PolygonOptions } from '.';
|
|
2
|
+
export interface PolygonElementProps {
|
|
3
|
+
points: Point[];
|
|
4
|
+
options?: PolygonOptions;
|
|
5
|
+
editing: boolean;
|
|
6
|
+
onClose?(index: number): void;
|
|
7
|
+
}
|
|
8
|
+
export interface State {
|
|
9
|
+
}
|
|
10
|
+
export default function PolygonElement(props: PolygonElementProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { DrawOptions } from './Drawable';
|
|
2
|
+
export { default as default } from './Drawable';
|
|
3
|
+
export type Identifier = string | number;
|
|
4
|
+
export interface Point {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
export interface Marker {
|
|
9
|
+
id: Identifier;
|
|
10
|
+
point: Point;
|
|
11
|
+
}
|
|
12
|
+
export interface Line {
|
|
13
|
+
id: Identifier;
|
|
14
|
+
start: Point;
|
|
15
|
+
end: Point;
|
|
16
|
+
}
|
|
17
|
+
export interface Polygon {
|
|
18
|
+
id: Identifier;
|
|
19
|
+
points: Point[];
|
|
20
|
+
autoClose?: boolean;
|
|
21
|
+
options?: PolygonOptions;
|
|
22
|
+
}
|
|
23
|
+
export interface PolygonOptions {
|
|
24
|
+
hideBorder?: boolean;
|
|
25
|
+
hideBackground?: boolean;
|
|
26
|
+
borderColor?: string;
|
|
27
|
+
backgroundColor?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function calAngle(p1: Point, p2: Point, p3?: Point): number;
|
|
30
|
+
export interface IDrawableContext {
|
|
31
|
+
options: DrawOptions;
|
|
32
|
+
}
|
|
33
|
+
export declare const DrawableContext: import('react').Context<IDrawableContext>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Point } from '.';
|
|
2
|
+
export interface DrawableContext {
|
|
3
|
+
markerPoint?: Point;
|
|
4
|
+
polygonPoints?: Point[];
|
|
5
|
+
lineStart?: Point;
|
|
6
|
+
lineEnd?: Point;
|
|
7
|
+
movingPoint?: Point;
|
|
8
|
+
}
|
|
9
|
+
export type DrawableEvent = {
|
|
10
|
+
type: 'START_ADD_MARKER';
|
|
11
|
+
} | {
|
|
12
|
+
type: 'START_DRAW_LINE';
|
|
13
|
+
} | {
|
|
14
|
+
type: 'START_DRAW_POLYGON';
|
|
15
|
+
} | {
|
|
16
|
+
type: 'ADD_MARKER';
|
|
17
|
+
point: Point;
|
|
18
|
+
} | {
|
|
19
|
+
type: 'ADD_LINE_START';
|
|
20
|
+
point: Point;
|
|
21
|
+
} | {
|
|
22
|
+
type: 'ADD_LINE_END';
|
|
23
|
+
point: Point;
|
|
24
|
+
} | {
|
|
25
|
+
type: 'DRAW_LINE_COMPLETED';
|
|
26
|
+
} | {
|
|
27
|
+
type: 'DRAW_POLYGON';
|
|
28
|
+
start: Point;
|
|
29
|
+
} | {
|
|
30
|
+
type: 'ADD_POLYGON_POINT';
|
|
31
|
+
point: Point;
|
|
32
|
+
} | {
|
|
33
|
+
type: 'DRAW_POLYGON_COMPLETE';
|
|
34
|
+
} | {
|
|
35
|
+
type: 'MOUSE_MOVE';
|
|
36
|
+
point: Point;
|
|
37
|
+
} | {
|
|
38
|
+
type: 'RESET';
|
|
39
|
+
} | {
|
|
40
|
+
type: 'CANCEL';
|
|
41
|
+
};
|
|
42
|
+
type SimpleState<T> = {
|
|
43
|
+
value: T;
|
|
44
|
+
context: DrawableContext;
|
|
45
|
+
};
|
|
46
|
+
type S<T> = SimpleState<T>;
|
|
47
|
+
export type DrawableState = S<'idle'> | S<'addingMarker'> | S<'drawingLine'> | S<'drawingPolygon'> | S<'drawCompleted'> | S<'canceled'>;
|
|
48
|
+
export declare const drawableMachine: import('xstate').StateMachine<DrawableContext, any, DrawableEvent, DrawableState, import('xstate').BaseActionObject, import('xstate').ServiceMap, import('xstate').ResolveTypegenMeta<import('xstate').TypegenDisabled, DrawableEvent, import('xstate').BaseActionObject, import('xstate').ServiceMap>>;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CSSProperties, FC, ReactElement } from 'react';
|
|
2
|
+
export type PannelMode = 'max' | 'normal' | 'min';
|
|
3
|
+
interface ExpandablePannelProps {
|
|
4
|
+
visible?: boolean;
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
className?: string;
|
|
7
|
+
headerClassName?: string;
|
|
8
|
+
mode?: PannelMode;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
icons?: {
|
|
11
|
+
collapseButton: ReactElement;
|
|
12
|
+
expandButton: ReactElement;
|
|
13
|
+
fullscreenButton: ReactElement;
|
|
14
|
+
exitFullscreenButton: ReactElement;
|
|
15
|
+
};
|
|
16
|
+
extraButtons?: ReactElement[];
|
|
17
|
+
header?: ReactElement;
|
|
18
|
+
fullScreenContainer?: HTMLElement;
|
|
19
|
+
onNormalize?: () => void;
|
|
20
|
+
onMinimize?: () => void;
|
|
21
|
+
onMaximize?: () => void;
|
|
22
|
+
}
|
|
23
|
+
declare const ExpandablePannel: FC<ExpandablePannelProps>;
|
|
24
|
+
export { ExpandablePannel };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Marker } from '../Drawable';
|
|
2
|
+
import { DrawableProps } from '../Drawable/Drawable';
|
|
3
|
+
export interface DrawableImageMapProps<MARKER extends Marker> extends DrawableProps<MARKER> {
|
|
4
|
+
url?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface State {
|
|
7
|
+
}
|
|
8
|
+
export default function DrawableImageMap<MARKER extends Marker>(props: DrawableImageMapProps<MARKER>): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface ImageMapProps {
|
|
2
|
+
url: string;
|
|
3
|
+
onScaleChange(scale: number, width: number, height: number): void;
|
|
4
|
+
onLoad?(img: HTMLImageElement): void;
|
|
5
|
+
}
|
|
6
|
+
export interface State {
|
|
7
|
+
}
|
|
8
|
+
export default function ImageMap(props: ImageMapProps): import("react/jsx-runtime").JSX.Element;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { default as React, CSSProperties } from 'react';
|
|
2
|
+
import { ITrackPoint } from '..';
|
|
3
|
+
import { TrackMapActions, Transform } from '../TrackMap';
|
|
4
|
+
interface ImageMapProps {
|
|
5
|
+
url: string;
|
|
6
|
+
points?: ITrackPoint[];
|
|
7
|
+
pointSize?: number;
|
|
8
|
+
direction?: number;
|
|
9
|
+
activePointId?: string;
|
|
10
|
+
lineStyle?: CSSProperties;
|
|
11
|
+
pointStyle?: CSSProperties;
|
|
12
|
+
directionStyle?: CSSProperties;
|
|
13
|
+
transform?: Transform;
|
|
14
|
+
trackEditable?: boolean;
|
|
15
|
+
trackEditing?: boolean;
|
|
16
|
+
keepRatio?: boolean;
|
|
17
|
+
actions?: TrackMapActions;
|
|
18
|
+
onTrackEditingChange?: (editing: boolean) => void;
|
|
19
|
+
onPointClick?: (val: ITrackPoint) => void;
|
|
20
|
+
passes?: any;
|
|
21
|
+
activePassId?: number;
|
|
22
|
+
passStyle?: CSSProperties;
|
|
23
|
+
activePassStyle?: CSSProperties;
|
|
24
|
+
marks?: any;
|
|
25
|
+
draggable?: boolean;
|
|
26
|
+
zoomable?: boolean;
|
|
27
|
+
zoomStep?: number;
|
|
28
|
+
offsetEdge?: number[];
|
|
29
|
+
zoomMax?: number;
|
|
30
|
+
zoomMin?: number;
|
|
31
|
+
onImageLoad?: (img: HTMLImageElement) => void;
|
|
32
|
+
onTransform?: (transform: Transform, pointsEl?: SVGCircleElement[], canvas?: SVGSVGElement) => void;
|
|
33
|
+
onPointsChange?: (points: ITrackPoint[]) => void;
|
|
34
|
+
}
|
|
35
|
+
export interface ImageMapRefProps {
|
|
36
|
+
zoomIn: (zoom?: number) => void;
|
|
37
|
+
zoomOut: (zoom?: number) => void;
|
|
38
|
+
}
|
|
39
|
+
declare const ImageMap: React.ForwardRefExoticComponent<ImageMapProps & React.RefAttributes<ImageMapRefProps>>;
|
|
40
|
+
export { ImageMap };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React, FC, CSSProperties } from 'react';
|
|
2
|
+
import { Placement } from './types';
|
|
3
|
+
interface MouseTipProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
visible?: boolean;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
defaultPosition?: {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
};
|
|
12
|
+
forElement?: HTMLElement | null;
|
|
13
|
+
placement?: Placement;
|
|
14
|
+
curserPosition?: [number, number];
|
|
15
|
+
}
|
|
16
|
+
declare const MouseTip: FC<MouseTipProps>;
|
|
17
|
+
export { MouseTip };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type HorizontalPlacement = 'left' | 'center' | 'right';
|
|
2
|
+
export type VerticalPlacement = 'top' | 'middle' | 'bottom';
|
|
3
|
+
export type SinglePlacemnet = HorizontalPlacement | VerticalPlacement;
|
|
4
|
+
export type Placement = 'left-top' | 'right-top' | 'left-bottom' | 'right-bottom' | 'top' | 'bottom' | 'left' | 'right';
|
|
5
|
+
export interface PlacementParams {
|
|
6
|
+
className: string;
|
|
7
|
+
margin: [number, number];
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HorizontalPlacement, VerticalPlacement } from './types';
|
|
2
|
+
export declare const getOffsetX: (e: any) => any;
|
|
3
|
+
export declare const getOffsetY: (e: any) => any;
|
|
4
|
+
export declare const placementStringToArr: (Placement: any) => [HorizontalPlacement, VerticalPlacement];
|
|
5
|
+
export declare const getPlacementPosition: (placement: [HorizontalPlacement, VerticalPlacement], contentRect?: DOMRect, gap?: [number, number]) => {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CSSProperties, FC } from 'react';
|
|
2
|
+
interface PanoramaRecordPlayerProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
style?: CSSProperties;
|
|
5
|
+
length?: number;
|
|
6
|
+
current?: number;
|
|
7
|
+
speed?: number;
|
|
8
|
+
play?: boolean;
|
|
9
|
+
loop?: boolean;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
onChange: (index: number) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const PanoramaRecordPlayer: FC<PanoramaRecordPlayerProps>;
|
|
14
|
+
export { PanoramaRecordPlayer };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React, CSSProperties } from 'react';
|
|
2
|
+
interface PassMapProps {
|
|
3
|
+
passes?: any;
|
|
4
|
+
style?: CSSProperties;
|
|
5
|
+
scale: number;
|
|
6
|
+
activePassId?: number;
|
|
7
|
+
passStyle?: CSSProperties;
|
|
8
|
+
activePassStyle?: CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
declare const PassMap: React.FC<PassMapProps>;
|
|
11
|
+
export { PassMap };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC, Key } from 'react';
|
|
2
|
+
import { AbstractTooltipProps } from 'antd/es/tooltip';
|
|
3
|
+
import { ITrackPoint } from '.';
|
|
4
|
+
export interface PointTooltipProps extends AbstractTooltipProps {
|
|
5
|
+
point: ITrackPoint;
|
|
6
|
+
key?: Key;
|
|
7
|
+
}
|
|
8
|
+
declare const PointTooltip: FC<PointTooltipProps>;
|
|
9
|
+
export default PointTooltip;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CSSProperties, FC, Key } from 'react';
|
|
2
|
+
import { ITrackPoint } from '.';
|
|
3
|
+
interface TrackPointProps {
|
|
4
|
+
point: ITrackPoint;
|
|
5
|
+
open?: boolean;
|
|
6
|
+
key?: Key;
|
|
7
|
+
id?: Key;
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
r: number;
|
|
11
|
+
style?: CSSProperties & any;
|
|
12
|
+
scale?: number;
|
|
13
|
+
active?: boolean;
|
|
14
|
+
hidden?: boolean;
|
|
15
|
+
onPointClick?: (val: ITrackPoint) => void;
|
|
16
|
+
getTooltipContainer?: (node: HTMLElement) => HTMLElement;
|
|
17
|
+
}
|
|
18
|
+
declare const TrackPoint: FC<TrackPointProps>;
|
|
19
|
+
export default TrackPoint;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { default as React, CSSProperties, ReactElement } from 'react';
|
|
2
|
+
export interface Position {
|
|
3
|
+
id: number | string;
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
}
|
|
7
|
+
export type OrderedPosition = Position & {
|
|
8
|
+
order: number;
|
|
9
|
+
};
|
|
10
|
+
export interface Transform {
|
|
11
|
+
translate?: number[];
|
|
12
|
+
rotate?: number;
|
|
13
|
+
scale?: number[];
|
|
14
|
+
}
|
|
15
|
+
export interface ITrackPoint {
|
|
16
|
+
id: string | number;
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
order: number;
|
|
20
|
+
lineStyle?: CSSProperties & any;
|
|
21
|
+
pointStyle?: CSSProperties & any;
|
|
22
|
+
tooltipStyle?: CSSProperties;
|
|
23
|
+
tooltipOpen?: boolean;
|
|
24
|
+
tooltipRender?: (item: Position) => HTMLElement | string | number;
|
|
25
|
+
}
|
|
26
|
+
export interface TrackEditButtonConfirm {
|
|
27
|
+
text: string;
|
|
28
|
+
}
|
|
29
|
+
export interface TrackEditButton {
|
|
30
|
+
text?: string;
|
|
31
|
+
style?: CSSProperties;
|
|
32
|
+
className?: string;
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
}
|
|
35
|
+
export interface TrackEditConfirmableButton extends TrackEditButton {
|
|
36
|
+
confirm?: boolean | TrackEditButtonConfirm;
|
|
37
|
+
}
|
|
38
|
+
export interface TrackEditButtons {
|
|
39
|
+
editButton?: TrackEditButton & {
|
|
40
|
+
exitTitleText?: string;
|
|
41
|
+
titleText?: string;
|
|
42
|
+
};
|
|
43
|
+
okButton?: TrackEditConfirmableButton;
|
|
44
|
+
cancelButton?: TrackEditConfirmableButton;
|
|
45
|
+
}
|
|
46
|
+
export type TrackMapActions = boolean | TrackEditButtons;
|
|
47
|
+
interface TrackMapProps {
|
|
48
|
+
width: number;
|
|
49
|
+
height: number;
|
|
50
|
+
points: ITrackPoint[];
|
|
51
|
+
scale: number;
|
|
52
|
+
pointSize?: number;
|
|
53
|
+
direction?: number;
|
|
54
|
+
activePointId?: string;
|
|
55
|
+
style?: CSSProperties;
|
|
56
|
+
lineStyle?: CSSProperties & any;
|
|
57
|
+
pointStyle?: CSSProperties & any;
|
|
58
|
+
directionStyle?: CSSProperties;
|
|
59
|
+
marks?: ITrackMapMark[];
|
|
60
|
+
movable?: boolean;
|
|
61
|
+
resizable?: boolean;
|
|
62
|
+
transform?: Transform;
|
|
63
|
+
keepRatio?: boolean;
|
|
64
|
+
actions?: TrackMapActions;
|
|
65
|
+
onPointClick?: (val: ITrackPoint) => void;
|
|
66
|
+
onTransform?: (transform: Transform, pointsEl?: SVGCircleElement[], canvas?: SVGSVGElement) => void;
|
|
67
|
+
onPointsChange?: (points: ITrackPoint[]) => void;
|
|
68
|
+
onCancelResize?: VoidFunction;
|
|
69
|
+
setIsSaved?: (val: boolean) => void;
|
|
70
|
+
isSaved?: boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface Point {
|
|
73
|
+
id: string | number;
|
|
74
|
+
x: number;
|
|
75
|
+
y: number;
|
|
76
|
+
}
|
|
77
|
+
export interface ITrackMapMark extends Point {
|
|
78
|
+
renderData: any;
|
|
79
|
+
render: (renderData: any, markData: Point) => ReactElement;
|
|
80
|
+
}
|
|
81
|
+
declare const TrackMap: React.FC<TrackMapProps>;
|
|
82
|
+
export { TrackMap };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CSSProperties, FC } from 'react';
|
|
2
|
+
interface ZoomProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
style?: CSSProperties;
|
|
5
|
+
value?: number;
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
step?: number;
|
|
9
|
+
onChange: (value: number) => void;
|
|
10
|
+
showText?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const Zoom: FC<ZoomProps>;
|
|
13
|
+
export { Zoom };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { Button } from './Button';
|
|
2
|
+
export { Markdown } from './components/Markdown';
|
|
3
|
+
export { Copy } from './components/Copy';
|
|
4
|
+
export { ExpandablePannel } from './ExpandablePannel';
|
|
5
|
+
export { IconButton } from './IconButton';
|
|
6
|
+
export { Iconfont } from './Iconfont';
|
|
7
|
+
export { ImageMap } from './ImageMap';
|
|
8
|
+
export type { ImageMapRefProps } from './ImageMap';
|
|
9
|
+
export { PanoramaRecordPlayer } from './PanoramaRecordPlayer';
|
|
10
|
+
export { TrackMap } from './TrackMap';
|
|
11
|
+
export type { ITrackPoint, TrackMapActions, TrackEditButtons, TrackEditConfirmableButton, TrackEditButton, } from './TrackMap';
|
|
12
|
+
export { MouseTip } from './MouseTip';
|
|
13
|
+
export { PassMap } from './PassMap';
|
|
14
|
+
export { Zoom } from './Zoom';
|
|
15
|
+
export { useBimface } from './useBimface';
|
|
16
|
+
export * from './GOSImageMap';
|
|
17
|
+
export * from './Drawable';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type LengthUnits = any;
|
|
3
|
+
type OrbitButton = any;
|
|
4
|
+
type BimfaceColor = any;
|
|
5
|
+
interface Viewer3DConfig {
|
|
6
|
+
avatar?: any;
|
|
7
|
+
backgroundColor?: string[];
|
|
8
|
+
domElement?: HTMLElement;
|
|
9
|
+
enableConstraintZoom?: boolean;
|
|
10
|
+
enableCoordinateSystem?: number;
|
|
11
|
+
enableCSMShadow?: boolean;
|
|
12
|
+
enableExplosion?: boolean;
|
|
13
|
+
enableHover?: boolean;
|
|
14
|
+
enableIBLBackground?: boolean;
|
|
15
|
+
enableLogarithmicDepthBuffer?: boolean;
|
|
16
|
+
enableMouseMovePick?: boolean;
|
|
17
|
+
enableOrbit?: boolean;
|
|
18
|
+
enableRealisticMiniMap?: boolean;
|
|
19
|
+
enableReplaceMaterial?: boolean;
|
|
20
|
+
enableShortcutKey?: boolean;
|
|
21
|
+
enableSplitComponent?: boolean;
|
|
22
|
+
enableSSAO?: boolean;
|
|
23
|
+
enableToggleContextMenuDisplay?: boolean;
|
|
24
|
+
enableViewHouse?: boolean;
|
|
25
|
+
enableWireframe?: boolean;
|
|
26
|
+
exposure?: number;
|
|
27
|
+
globalUnit?: LengthUnits;
|
|
28
|
+
loadIBLScene?: object;
|
|
29
|
+
memoryThreshold?: number;
|
|
30
|
+
orbitButton?: OrbitButton;
|
|
31
|
+
renderMode?: string;
|
|
32
|
+
walkRotationSpeed?: number;
|
|
33
|
+
wireframeColor?: BimfaceColor;
|
|
34
|
+
}
|
|
35
|
+
export interface BimfaceFloor {
|
|
36
|
+
archElev: number;
|
|
37
|
+
areas: null;
|
|
38
|
+
elevation: number;
|
|
39
|
+
height: null;
|
|
40
|
+
id: string;
|
|
41
|
+
miniMap: string;
|
|
42
|
+
name: string;
|
|
43
|
+
rooms: null;
|
|
44
|
+
structElev: number;
|
|
45
|
+
}
|
|
46
|
+
export declare function useBimface(config?: Viewer3DConfig): {
|
|
47
|
+
BimfaceViewer: any;
|
|
48
|
+
BimfaceSection: any;
|
|
49
|
+
BimfaceMark: any;
|
|
50
|
+
BimfaceViewerEvents: any;
|
|
51
|
+
viewer: any;
|
|
52
|
+
viewerAdded: boolean;
|
|
53
|
+
sDKLoaded: boolean;
|
|
54
|
+
loadedModelCount: number;
|
|
55
|
+
loadModels: (viewTokens: string[]) => void;
|
|
56
|
+
setContainerDom: React.Dispatch<React.SetStateAction<HTMLDivElement | undefined>>;
|
|
57
|
+
getSnapshot: (type?: "image/png" | "image/jpeg" | "image/webp", quality?: number) => string | undefined;
|
|
58
|
+
setComponentsColorByCatgryId: (categoryColors: any) => void;
|
|
59
|
+
setAllComponentsColor: (colorString: string) => void;
|
|
60
|
+
navigationMapByHeight: (height: number, maxSize: {
|
|
61
|
+
width: number;
|
|
62
|
+
height: number;
|
|
63
|
+
}, cb: (img: HTMLImageElement) => void) => void;
|
|
64
|
+
};
|
|
65
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface CopyToClipboard params
|
|
3
|
+
*/
|
|
4
|
+
interface ICopyToClipboard {
|
|
5
|
+
/** HTML reference identifier ```<div id="foo"></div>``` */
|
|
6
|
+
target?: string;
|
|
7
|
+
/** String value */
|
|
8
|
+
value?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const copyToClipboard: ({ target, value }: ICopyToClipboard) => Promise<boolean>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function replaceLatexDelimiters(input: string): string;
|
|
2
|
+
/**
|
|
3
|
+
* 对输入字符串中的反斜杠进行转义处理。
|
|
4
|
+
* 在 Markdown 解析等场景中,反斜杠有特殊含义,
|
|
5
|
+
* 使用此函数可将反斜杠转义,使其作为普通文本显示。
|
|
6
|
+
* @param text - 待转义的输入字符串。
|
|
7
|
+
* @returns 转义后的字符串,特殊字符前会添加反斜杠。
|
|
8
|
+
*/
|
|
9
|
+
export declare function escapeSlash(text: string): string;
|
|
10
|
+
export declare function checkMediaType(url: string): "image" | "video" | null;
|