@cloud-app-dev/vidc 3.2.18 → 3.2.20
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/es/Api/index.d.ts +12 -0
- package/es/AppContext/Sync.d.ts +7 -0
- package/es/AppContext/index.d.ts +10 -0
- package/es/AppContext/static.d.ts +8 -0
- package/es/Auth/index.d.ts +8 -0
- package/es/AutoExit/index.d.ts +6 -0
- package/es/Box/BetweenBox/index.d.ts +12 -0
- package/es/Box/InfoBox/index.d.ts +12 -0
- package/es/Box/TwoColumnBox/index.d.ts +10 -0
- package/es/Box/deps/content-grid.d.ts +9 -0
- package/es/Box/deps/grid-factory.d.ts +10 -0
- package/es/Box/deps/simple-grid.d.ts +9 -0
- package/es/Box/index.d.ts +14 -0
- package/es/CheckGroupFixed/demo.d.ts +2 -0
- package/es/CheckGroupFixed/index.d.ts +17 -0
- package/es/Config/index.d.ts +4 -0
- package/es/Config/utils.d.ts +4 -0
- package/es/ConfigContext/index.d.ts +22 -0
- package/es/CustomRenderSelect/index.d.ts +12 -0
- package/es/DisableMark/index.d.ts +9 -0
- package/es/DomMove/demo.d.ts +1 -0
- package/es/DomMove/index.d.ts +16 -0
- package/es/DomMove/utils.d.ts +8 -0
- package/es/Drag/DragAndDropItem.d.ts +4 -0
- package/es/Drag/DropItem.d.ts +4 -0
- package/es/Drag/index.d.ts +7 -9
- package/es/Drawer/Footer.d.ts +4 -0
- package/es/Drawer/demo.d.ts +3 -0
- package/es/Drawer/index.d.ts +38 -0
- package/es/DynamicGridList/Demo.d.ts +2 -0
- package/es/DynamicGridList/index.d.ts +27 -0
- package/es/DynamicList/demo.d.ts +1 -0
- package/es/DynamicList/index.d.ts +30 -0
- package/es/DynamicList/utils.d.ts +4 -0
- package/es/ErrorFallback/index.d.ts +8 -0
- package/es/FrontendPlayer/index.d.ts +2 -0
- package/es/FullScreen/index.d.ts +21 -0
- package/es/GridList/Demo.d.ts +2 -0
- package/es/GridList/data.d.ts +16 -0
- package/es/GridList/hook.d.ts +13 -0
- package/es/GridList/index.d.ts +15 -0
- package/es/GridList/utils.d.ts +9 -0
- package/es/HightLevel/index.d.ts +9 -0
- package/es/IconFont/index.d.ts +12 -0
- package/es/ImageView/index.d.ts +17 -0
- package/es/Input/demo.d.ts +2 -0
- package/es/Input/index.d.ts +18 -0
- package/es/InstanceHistory/index.d.ts +3 -0
- package/es/LabelValue/index.d.ts +23 -0
- package/es/List/demo.d.ts +2 -0
- package/es/List/index.d.ts +41 -0
- package/es/ListWithSizeAnimate/demo.d.ts +1 -0
- package/es/ListWithSizeAnimate/index.d.ts +14 -0
- package/es/LoaderApp/index.d.ts +31 -0
- package/es/LoaderApp/loader.d.ts +19 -0
- package/es/LoaderApp/sandbox.back.d.ts +18 -0
- package/es/LoaderApp/sandbox.d.ts +12 -0
- package/es/LoaderApp/utils.d.ts +19 -0
- package/es/LoaderScript/index.d.ts +26 -0
- package/es/LoaderScript/utils.d.ts +14 -0
- package/es/Map/BasicMap/AMapInstance.d.ts +19 -0
- package/es/Map/BasicMap/LeafletInstance.d.ts +18 -0
- package/es/Map/BasicMap/index.d.ts +9 -0
- package/es/Map/ClusterLayer/hook.d.ts +5 -0
- package/es/Map/ClusterLayer/index.d.ts +5 -0
- package/es/Map/Config/index.d.ts +7 -0
- package/es/Map/Config/utils.d.ts +2 -0
- package/es/Map/Context/index.d.ts +11 -0
- package/es/Map/FindPio/index.d.ts +3 -0
- package/es/Map/InfoWindow/MakerLikeWindow.d.ts +3 -0
- package/es/Map/InfoWindow/demo.d.ts +2 -0
- package/es/Map/InfoWindow/index.d.ts +9 -0
- package/es/Map/LevelCenter/DragMarker/index.d.ts +9 -0
- package/es/Map/LevelCenter/demo.d.ts +2 -0
- package/es/Map/LevelCenter/index.d.ts +15 -0
- package/es/Map/LoaderMap/index.d.ts +12 -0
- package/es/Map/MapDrawSelect/demo.d.ts +2 -0
- package/es/Map/MapDrawSelect/index.d.ts +15 -0
- package/es/Map/MouseTool/index.d.ts +10 -0
- package/es/Map/MouseTool/useMouseTools.d.ts +7 -0
- package/es/Map/ResetTools/index.d.ts +9 -0
- package/es/Map/SinglePoint/index.d.ts +27 -0
- package/es/Map/hook/useMapEvent.d.ts +2 -0
- package/es/Map/hook/useMapType.d.ts +4 -0
- package/es/Map/icon.d.ts +2 -0
- package/es/Map/index.d.ts +14 -0
- package/es/Map/useMarker/index.d.ts +10 -0
- package/es/Map/withMap/index.d.ts +2 -0
- package/es/Modal/demo.d.ts +2 -0
- package/es/Modal/index.d.ts +44 -0
- package/es/Picture/component/DefaultRects/RectInfo.d.ts +7 -0
- package/es/Picture/component/DefaultRects/index.d.ts +12 -0
- package/es/Picture/component/DefaultRects/utils.d.ts +2 -0
- package/es/Picture/component/DrawRect/index.d.ts +12 -0
- package/es/Picture/component/RectMenu/index.d.ts +11 -0
- package/es/Picture/component/RectMenu/utils.d.ts +12 -0
- package/es/Picture/component/Tools/index.d.ts +13 -0
- package/es/Picture/component/WheelScale/index.d.ts +6 -0
- package/es/Picture/demo.d.ts +1 -0
- package/es/Picture/dragBound.d.ts +5 -0
- package/es/Picture/index.d.ts +18 -0
- package/es/Picture/loadCaptureRectImage.d.ts +8 -0
- package/es/Picture/useDraw.d.ts +1 -0
- package/es/Picture/utils.d.ts +21 -0
- package/es/Player/api/index.d.ts +68 -0
- package/es/Player/context.d.ts +21 -0
- package/es/Player/contraller_bar/bar.d.ts +8 -0
- package/es/Player/contraller_bar/contraller_event.d.ts +6 -0
- package/es/Player/contraller_bar/index.d.ts +14 -0
- package/es/Player/contraller_bar/left_bar.d.ts +10 -0
- package/es/Player/contraller_bar/right_bar.d.ts +8 -0
- package/es/Player/contraller_bar/time.d.ts +2 -0
- package/es/Player/contraller_bar/useBarStatus.d.ts +2 -0
- package/es/Player/contraller_bar/volume.d.ts +9 -0
- package/es/Player/demo.d.ts +2 -0
- package/es/Player/empty.d.ts +1 -0
- package/es/Player/event/errorEvent.d.ts +14 -0
- package/es/Player/event/eventName.d.ts +18 -0
- package/es/Player/event/index.d.ts +24 -0
- package/es/Player/fps_play.d.ts +10 -0
- package/es/Player/frontend_player.d.ts +7 -0
- package/es/Player/frontend_timeline.d.ts +9 -0
- package/es/Player/iconfont.d.ts +4 -0
- package/es/Player/index.d.ts +2 -0
- package/es/Player/live_heart.d.ts +8 -0
- package/es/Player/message.d.ts +4 -0
- package/es/Player/segment_player.d.ts +8 -0
- package/es/Player/segment_timeline.d.ts +11 -0
- package/es/Player/single_player.d.ts +5 -0
- package/es/Player/timeline.d.ts +4 -0
- package/es/Player/util.d.ts +42 -0
- package/es/PlayerExt/demo.d.ts +2 -0
- package/es/PlayerExt/index.d.ts +47 -0
- package/es/Progress/index.d.ts +10 -8
- package/es/ROI/demo.d.ts +2 -0
- package/es/ROI/index.d.ts +39 -0
- package/es/ROI/utils.d.ts +1 -0
- package/es/ScreenPlayer/Live.d.ts +9 -0
- package/es/ScreenPlayer/LiveTools.d.ts +29 -0
- package/es/ScreenPlayer/PlayerWithExt.d.ts +34 -0
- package/es/ScreenPlayer/RatePick.d.ts +6 -0
- package/es/ScreenPlayer/Record.d.ts +9 -0
- package/es/ScreenPlayer/RecordTools.d.ts +37 -0
- package/es/ScreenPlayer/ScreenSelect.d.ts +6 -0
- package/es/ScreenPlayer/SegmentTimeLine.d.ts +16 -0
- package/es/ScreenPlayer/TimeMode.d.ts +6 -0
- package/es/ScreenPlayer/TimeSelect.d.ts +6 -0
- package/es/ScreenPlayer/demo.d.ts +1 -0
- package/es/ScreenPlayer/demo2.d.ts +1 -0
- package/es/ScreenPlayer/index.d.ts +5 -0
- package/es/ScreenPlayer/useTimeSlider.d.ts +24 -0
- package/es/ScreenPlayer/useVideoFit.d.ts +5 -0
- package/es/ScreenPlayer/utils.d.ts +19 -0
- package/es/SegmentPlayer/index.d.ts +2 -0
- package/es/Service/fetch-adapter.d.ts +12 -0
- package/es/Service/fetch-adapter.js +8 -1
- package/es/Service/http.d.ts +6 -0
- package/es/Service/http.js +1 -0
- package/es/Service/index.d.ts +3 -0
- package/es/Service/interface.d.ts +1 -1
- package/es/Service/middleware.d.ts +5 -0
- package/es/TableLayout/index.d.ts +13 -0
- package/es/ThemeAntd/demo.d.ts +3 -0
- package/es/ThemeAntd/index.d.ts +7 -0
- package/es/Timeout/index.d.ts +31 -0
- package/es/Tree/demo.d.ts +2 -0
- package/es/Tree/index.d.ts +24 -0
- package/es/VList/index.d.ts +17 -12
- package/es/VList/utils.d.ts +14 -0
- package/es/index.d.ts +52 -0
- package/es/useDrawROI/index.d.ts +16 -0
- package/es/useEventEmitterHandle/index.d.ts +2 -0
- package/es/useFullscreen/demo.d.ts +1 -0
- package/es/useFullscreen/index.d.ts +11 -0
- package/es/useHistory/index.d.ts +3 -0
- package/es/useHistory/interface.d.ts +4 -0
- package/es/useInfiniteScroll/index.d.ts +16 -0
- package/es/useRafInterval/index.d.ts +5 -0
- package/es/useSimpleState/index.d.ts +3 -0
- package/es/useVirtualList/index.d.ts +13 -0
- package/es/utils.d.ts +25 -0
- package/package.json +1 -1
- package/tsconfig.json +0 -11
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface ListProps<T> {
|
|
4
|
+
/**
|
|
5
|
+
* @description 列表数据
|
|
6
|
+
* @default []
|
|
7
|
+
*/
|
|
8
|
+
list?: Array<T>;
|
|
9
|
+
/**
|
|
10
|
+
* @description 列表类名
|
|
11
|
+
* @default ''
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @description 列表样式
|
|
16
|
+
* @default -
|
|
17
|
+
*/
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
/**
|
|
20
|
+
* @description 列表自定义渲染
|
|
21
|
+
* @default -
|
|
22
|
+
*/
|
|
23
|
+
renderItem: (item: T, index: number) => JSX.Element;
|
|
24
|
+
rowHeight?: number;
|
|
25
|
+
renderHeaderExt?: () => JSX.Element;
|
|
26
|
+
}
|
|
27
|
+
declare function List<T>(props: ListProps<T>): JSX.Element;
|
|
28
|
+
declare namespace List {
|
|
29
|
+
var defaultProps: {
|
|
30
|
+
className: string;
|
|
31
|
+
list: never[];
|
|
32
|
+
itemKey: string;
|
|
33
|
+
itemNameKey: string;
|
|
34
|
+
renderHeaderExt: () => JSX.Element;
|
|
35
|
+
};
|
|
36
|
+
var VList: any;
|
|
37
|
+
var DynamicList: any;
|
|
38
|
+
var GridList: any;
|
|
39
|
+
var DynamicGridList: any;
|
|
40
|
+
}
|
|
41
|
+
export default List;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function App(): JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IDynamicGridListProps } from '../DynamicGridList';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface IListWithSizeAnimateProps<T> extends IDynamicGridListProps<T> {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
header?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface IListWithSizeAnimateRef {
|
|
9
|
+
open: () => void;
|
|
10
|
+
close: () => void;
|
|
11
|
+
backTop: () => void;
|
|
12
|
+
}
|
|
13
|
+
declare const ListWithSizeAnimate: React.ForwardRefExoticComponent<IListWithSizeAnimateProps<unknown> & React.RefAttributes<IListWithSizeAnimateRef>>;
|
|
14
|
+
export default ListWithSizeAnimate;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AppItemType } from '../Config/interface';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface ILoaderAppProps {
|
|
5
|
+
/**
|
|
6
|
+
* @description 微应用配置信息
|
|
7
|
+
* @default -
|
|
8
|
+
*/
|
|
9
|
+
appConfig: AppItemType;
|
|
10
|
+
/**
|
|
11
|
+
* @description 需要传递微应用的参数
|
|
12
|
+
* @default {}
|
|
13
|
+
*/
|
|
14
|
+
appProps: {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @description 微应用加载容器样式
|
|
19
|
+
* @default
|
|
20
|
+
*/
|
|
21
|
+
style?: React.CSSProperties;
|
|
22
|
+
}
|
|
23
|
+
declare function LoaderApp({ appConfig, appProps, style }: ILoaderAppProps): JSX.Element;
|
|
24
|
+
declare namespace LoaderApp {
|
|
25
|
+
var defaultProps: {
|
|
26
|
+
appConfig: {};
|
|
27
|
+
appProps: {};
|
|
28
|
+
style: {};
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export default LoaderApp;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AppInstance } from './interface';
|
|
2
|
+
interface createScopedCssTextProps {
|
|
3
|
+
styleNode: HTMLStyleElement;
|
|
4
|
+
prefix: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function createScopedCssText({ styleNode, prefix }: createScopedCssTextProps): string;
|
|
7
|
+
interface ILoaderStyleProps {
|
|
8
|
+
cssText: string;
|
|
9
|
+
prefix: string;
|
|
10
|
+
styleNode: HTMLStyleElement;
|
|
11
|
+
}
|
|
12
|
+
export declare function LoaderStyle({ cssText, prefix, styleNode }: ILoaderStyleProps): Promise<void>;
|
|
13
|
+
interface ILoaderModuleProps {
|
|
14
|
+
prefix: string;
|
|
15
|
+
styleNode: HTMLStyleElement;
|
|
16
|
+
html: string;
|
|
17
|
+
}
|
|
18
|
+
export default function LoaderModule({ prefix, styleNode, html }: ILoaderModuleProps): Promise<AppInstance>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare type FakeWindow = Window & Record<PropertyKey, any>;
|
|
2
|
+
declare class Sandbox {
|
|
3
|
+
fakeWindow: FakeWindow;
|
|
4
|
+
proxy: Window;
|
|
5
|
+
updateKeys: Set<unknown>;
|
|
6
|
+
listenerMap: Map<string, EventListenerOrEventListenerObject[]>;
|
|
7
|
+
timeoutList: number[];
|
|
8
|
+
intervalList: number[];
|
|
9
|
+
originKeys: string[];
|
|
10
|
+
showlog: boolean;
|
|
11
|
+
hasDisposed: boolean;
|
|
12
|
+
constructor(showlog?: boolean);
|
|
13
|
+
execScript(scriptText: string): void;
|
|
14
|
+
showWindowKeys(): string[];
|
|
15
|
+
preview(): void;
|
|
16
|
+
dispose(): void;
|
|
17
|
+
}
|
|
18
|
+
export default Sandbox;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface OPTIONS {
|
|
2
|
+
inheritGlobal?: boolean;
|
|
3
|
+
blacklist?: string[];
|
|
4
|
+
docMap?: {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
declare class SandBox {
|
|
9
|
+
private updatedValueSet;
|
|
10
|
+
constructor(context?: Window & typeof globalThis, { blacklist, docMap }?: OPTIONS);
|
|
11
|
+
}
|
|
12
|
+
export default SandBox;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AppItemType } from '../Config/interface';
|
|
2
|
+
export declare const getMicroConfig: (appConfig: AppItemType | undefined, appProps: any, container: HTMLDivElement) => {
|
|
3
|
+
title: string;
|
|
4
|
+
routerPrefix: string;
|
|
5
|
+
container: HTMLDivElement;
|
|
6
|
+
props: any;
|
|
7
|
+
entry: {
|
|
8
|
+
scripts: string[];
|
|
9
|
+
styles: string[];
|
|
10
|
+
html: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare function fetchStyle(style: string): Promise<string>;
|
|
14
|
+
export declare const arrayify: <T>(list: CSSRuleList | any[]) => T[];
|
|
15
|
+
export declare function rewrite(rules: CSSRule[], prefix?: string): string;
|
|
16
|
+
export declare function importHTML(url: string): Promise<{
|
|
17
|
+
cssTexts: string[];
|
|
18
|
+
appInstance: any;
|
|
19
|
+
}>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IOptionsLoader } from './interface';
|
|
3
|
+
export interface ILoaderProps {
|
|
4
|
+
/**
|
|
5
|
+
* @description 脚本加载数据源
|
|
6
|
+
* @default []
|
|
7
|
+
*/
|
|
8
|
+
options: IOptionsLoader[];
|
|
9
|
+
/**
|
|
10
|
+
* @description 加载后初始化组件
|
|
11
|
+
* @default null
|
|
12
|
+
*/
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* @description 加载后初始化组件
|
|
16
|
+
* @default null
|
|
17
|
+
*/
|
|
18
|
+
Spin?: React.ReactNode | null;
|
|
19
|
+
/**
|
|
20
|
+
* @description 加载完成触发事件
|
|
21
|
+
* @default -
|
|
22
|
+
*/
|
|
23
|
+
onLoadEnd?: () => Promise<null>;
|
|
24
|
+
}
|
|
25
|
+
declare function LoaderScripts({ options, children, Spin, onLoadEnd }: ILoaderProps): JSX.Element;
|
|
26
|
+
export default LoaderScripts;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IOptionsLoader } from './interface';
|
|
2
|
+
export declare const loadScript: (url: string) => Promise<unknown>;
|
|
3
|
+
export declare const loaderCss: (href: string) => Promise<unknown>;
|
|
4
|
+
export declare function createAsyncIterable(options: IOptionsLoader[]): {
|
|
5
|
+
[Symbol.asyncIterator](): {
|
|
6
|
+
i: number;
|
|
7
|
+
next(): Promise<{
|
|
8
|
+
value: number;
|
|
9
|
+
done: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare function tryCatch(resolveFn: () => Promise<any>, rejectFn?: (e: unknown) => void): Promise<void>;
|
|
14
|
+
export declare function runAsyncIterable(Iterables: any, runtime?: (conf: any) => void, callback?: () => void): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference path="../AMap.d.ts" />
|
|
2
|
+
import { IMapInstance, IMapOptions } from '../interface';
|
|
3
|
+
declare class AMapInstance implements IMapInstance {
|
|
4
|
+
map: AMap.Map;
|
|
5
|
+
config: IMapOptions;
|
|
6
|
+
mapContainer: HTMLDivElement;
|
|
7
|
+
constructor(ele: HTMLDivElement, config: IMapOptions);
|
|
8
|
+
createMap(): void;
|
|
9
|
+
destoryMap(): void;
|
|
10
|
+
mapReset(): void;
|
|
11
|
+
setZoom(zoom: number): void;
|
|
12
|
+
getZoom(): number;
|
|
13
|
+
setCenter(center: [number, number]): void;
|
|
14
|
+
setZoomAndCenter(zoom: number, center: [number, number]): void;
|
|
15
|
+
on(type: string, fn: (e: any) => void): void;
|
|
16
|
+
off(type: string, fn: (e: any) => void): void;
|
|
17
|
+
setCursor(cursor: string): void;
|
|
18
|
+
}
|
|
19
|
+
export default AMapInstance;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IMapInstance, IMapOptions, Map, LatLng } from '../interface';
|
|
2
|
+
declare class LeafletInstance implements IMapInstance {
|
|
3
|
+
map: Map;
|
|
4
|
+
config: IMapOptions;
|
|
5
|
+
mapContainer: HTMLDivElement;
|
|
6
|
+
constructor(ele: HTMLDivElement, config: IMapOptions);
|
|
7
|
+
createMap(): void;
|
|
8
|
+
destoryMap(): void;
|
|
9
|
+
setZoomAndCenter(zoom: number, center: [number, number] | LatLng): void;
|
|
10
|
+
mapReset(): void;
|
|
11
|
+
setZoom(zoom: number): void;
|
|
12
|
+
setCenter(center: [number, number] | LatLng): void;
|
|
13
|
+
getZoom(): any;
|
|
14
|
+
on(type: string, fn: (event: any) => void): void;
|
|
15
|
+
off(type: string, fn: (event: any) => void): void;
|
|
16
|
+
setCursor(cursor: string): void;
|
|
17
|
+
}
|
|
18
|
+
export default LeafletInstance;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface IWithLoaderMapProps {
|
|
4
|
+
MAP_GLABAL_KEY?: 'L' | 'AMap';
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function WithLoaderMap({ MAP_GLABAL_KEY, children, className }: IWithLoaderMapProps): JSX.Element;
|
|
9
|
+
export default WithLoaderMap;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference path="../AMap.d.ts" />
|
|
2
|
+
import { MapPoint, LClusterInterface } from '../interface';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export declare function useMarkerCluster(onPointClick?: (point: MapPoint) => void): (LClusterInterface & AMap.MarkerCluster) | null;
|
|
5
|
+
export declare function useMarkers(points?: MapPoint[]): any[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IMapInstance } from '../interface';
|
|
3
|
+
export interface IContenxtProps {
|
|
4
|
+
instance: IMapInstance;
|
|
5
|
+
glaobalKey: 'L' | 'AMap';
|
|
6
|
+
}
|
|
7
|
+
export declare const mapContext: React.Context<IContenxtProps>;
|
|
8
|
+
export declare const Provider: React.Provider<IContenxtProps>;
|
|
9
|
+
export declare const Consumer: React.Consumer<IContenxtProps>;
|
|
10
|
+
declare function map(Component: new () => React.Component<any>): React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
|
|
11
|
+
export default map;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference path="../AMap.d.ts" />
|
|
2
|
+
export interface InfoWindowProps {
|
|
3
|
+
children: JSX.Element;
|
|
4
|
+
visible?: boolean;
|
|
5
|
+
center?: [number, number];
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
}
|
|
9
|
+
export default function InfoWindow({ children, visible, center, width, height }: InfoWindowProps): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface IDragMarkerProps {
|
|
2
|
+
center?: [number, number];
|
|
3
|
+
onChange?: (options: {
|
|
4
|
+
center: [number, number];
|
|
5
|
+
}) => void;
|
|
6
|
+
title?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function DragMarker({ center, title, onChange }: IDragMarkerProps): JSX.Element;
|
|
9
|
+
export default DragMarker;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LatLng, MapPoint } from '../interface';
|
|
3
|
+
export interface ILevelCenter {
|
|
4
|
+
center?: [number, number];
|
|
5
|
+
zoom?: number;
|
|
6
|
+
points?: MapPoint[];
|
|
7
|
+
enableClick?: boolean;
|
|
8
|
+
onLevelCenterChange?: (options: {
|
|
9
|
+
center: [number, number] | LatLng;
|
|
10
|
+
zoom: number;
|
|
11
|
+
}) => void;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: any;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ILoaderMapProps {
|
|
3
|
+
children: React.ReactElement;
|
|
4
|
+
MAP_GLABAL_KEY?: 'L' | 'AMap';
|
|
5
|
+
}
|
|
6
|
+
declare function LoaderMap({ children, MAP_GLABAL_KEY, ...props }: ILoaderMapProps): JSX.Element;
|
|
7
|
+
declare namespace LoaderMap {
|
|
8
|
+
var defaultProps: {
|
|
9
|
+
MAP_GLABAL_KEY: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export default LoaderMap;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawType, MapPoint } from '../interface';
|
|
3
|
+
export interface IMapDrawSelectProps {
|
|
4
|
+
center?: [number, number];
|
|
5
|
+
zoom?: number;
|
|
6
|
+
points: MapPoint[];
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
drawUi?: React.ReactNode;
|
|
9
|
+
drawType?: DrawType | 'clear' | 'close';
|
|
10
|
+
selectCenter?: [number, number];
|
|
11
|
+
drawEnd?: (points: MapPoint[]) => void;
|
|
12
|
+
onPointClick?: (point: MapPoint) => void;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: any;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawType, MapPoint } from '../interface';
|
|
3
|
+
interface IMouseTool {
|
|
4
|
+
ui: React.ReactNode;
|
|
5
|
+
drawType?: DrawType | 'clear' | 'close';
|
|
6
|
+
drawEnd?: (points: MapPoint[]) => void;
|
|
7
|
+
points?: MapPoint[];
|
|
8
|
+
}
|
|
9
|
+
declare function MouseTool({ ui, drawType, points, drawEnd }: IMouseTool): JSX.Element;
|
|
10
|
+
export default MouseTool;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import '../../Player/style/iconfont';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface IResetTools {
|
|
4
|
+
onMapReset?: () => void;
|
|
5
|
+
onMapZoom?: (num: number) => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function ResetTools({ onMapReset, onMapZoom, className }: IResetTools): JSX.Element;
|
|
9
|
+
export default ResetTools;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MapPoint } from '../interface';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface ISinglePlayerProps {
|
|
5
|
+
/**
|
|
6
|
+
* 点位经纬度
|
|
7
|
+
*/
|
|
8
|
+
center?: [number, number];
|
|
9
|
+
/**
|
|
10
|
+
* 展示标题
|
|
11
|
+
*/
|
|
12
|
+
title?: string;
|
|
13
|
+
points?: MapPoint[];
|
|
14
|
+
/**
|
|
15
|
+
* 开启点击设置
|
|
16
|
+
*/
|
|
17
|
+
enableClick?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* 中心点变化
|
|
20
|
+
*/
|
|
21
|
+
onCenterChange?: (options: {
|
|
22
|
+
center: [number, number];
|
|
23
|
+
}) => void;
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
declare const _default: any;
|
|
27
|
+
export default _default;
|
package/es/Map/icon.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const LevelCenterCenterSvg = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"28px\" height=\"40px\" viewBox=\"0 0 28 40\" version=\"1.1\"><defs><linearGradient x1=\"6.38826004%\" y1=\"96.2639042%\" x2=\"66.7998206%\" y2=\"14.972142%\" id=\"linearGradient-1\"><stop stop-color=\"#000000\" stop-opacity=\"0.2\" offset=\"0%\"/><stop stop-color=\"#000000\" stop-opacity=\"0\" offset=\"100%\"/></linearGradient></defs><g id=\"Img/Add\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"><path d=\"M22,28 L28,28 L15.2872963,39.7348034 C15.102574,39.9053163 14.8604062,40 14.6090162,40 L14,40 C13.7238576,40 13.5,39.7761424 13.5,39.5 C13.5,39.3918149 13.5350889,39.2865481 13.6,39.2 L22,28 Z\" id=\"Rectangle\" fill=\"url(#linearGradient-1)\"/><path d=\"M11,23 L17,23 L15.103901,39.1168412 C15.0446525,39.6204542 14.6178366,40 14.1107504,40 L13.8892496,40 C13.3821634,40 12.9553475,39.6204542 12.896099,39.1168412 L11,23 Z\" id=\"Rectangle\" fill=\"#FF8800\"/><circle id=\"Oval\" stroke=\"#FF8800\" fill=\"#FFAA00\" cx=\"14\" cy=\"12\" r=\"11.5\"/><circle id=\"Oval\" fill=\"#FF8800\" cx=\"15\" cy=\"13\" r=\"4\"/><circle id=\"Oval\" fill=\"#FFFFFF\" cx=\"14\" cy=\"12\" r=\"4\"/></g></svg>";
|
|
2
|
+
export declare function createMapCenterIcon(): any;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference path="../AMap.d.ts" />
|
|
2
|
+
import { Map } from '../interface';
|
|
3
|
+
export interface IUseMarkerProps {
|
|
4
|
+
map: Map;
|
|
5
|
+
center: [number, number];
|
|
6
|
+
createIcon: (options?: any) => any;
|
|
7
|
+
options?: AMap.MarkerOptions;
|
|
8
|
+
}
|
|
9
|
+
declare function useMarker({ map, center, createIcon, options }: IUseMarkerProps): any;
|
|
10
|
+
export default useMarker;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
import { IModalProps } from './interface';
|
|
4
|
+
declare function Modal({ children, className, style, getContainer, ...props }: IModalProps): JSX.Element;
|
|
5
|
+
declare namespace Modal {
|
|
6
|
+
var defaultProps: {
|
|
7
|
+
className: string;
|
|
8
|
+
getContainer: boolean;
|
|
9
|
+
};
|
|
10
|
+
var info: any;
|
|
11
|
+
var success: any;
|
|
12
|
+
var error: any;
|
|
13
|
+
var warn: any;
|
|
14
|
+
var warning: any;
|
|
15
|
+
var confirm: any;
|
|
16
|
+
var destroyAll: any;
|
|
17
|
+
var useModal: (prefixCls?: string) => {
|
|
18
|
+
open: (options: IUseModalHookState) => void;
|
|
19
|
+
close: () => void;
|
|
20
|
+
};
|
|
21
|
+
var useAntdModal: any;
|
|
22
|
+
var RefModal: React.ForwardRefExoticComponent<IModalProps & React.RefAttributes<IRefModalMethodsProps>>;
|
|
23
|
+
}
|
|
24
|
+
export interface IUseModalHookState {
|
|
25
|
+
content?: React.ReactNode;
|
|
26
|
+
visible?: boolean;
|
|
27
|
+
title?: React.ReactNode;
|
|
28
|
+
onOk?: () => void;
|
|
29
|
+
width?: number | string;
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface IUseModalHookState {
|
|
33
|
+
content?: React.ReactNode;
|
|
34
|
+
visible?: boolean;
|
|
35
|
+
title?: React.ReactNode;
|
|
36
|
+
onOk?: () => void;
|
|
37
|
+
width?: number | string;
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface IRefModalMethodsProps {
|
|
41
|
+
open: (options: IUseModalHookState) => void;
|
|
42
|
+
close: () => void;
|
|
43
|
+
}
|
|
44
|
+
export default Modal;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RectType } from '../../interface';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface IDefaultRectsProps {
|
|
4
|
+
rects: RectType[];
|
|
5
|
+
containerDom: HTMLDivElement;
|
|
6
|
+
onClickRect?: (item: RectType & {
|
|
7
|
+
base64: string;
|
|
8
|
+
}) => void;
|
|
9
|
+
getRectImage: (rect: number[]) => string | null;
|
|
10
|
+
}
|
|
11
|
+
declare function DefaultRects({ rects, containerDom, onClickRect, getRectImage }: IDefaultRectsProps): JSX.Element;
|
|
12
|
+
export default DefaultRects;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MenuRectType } from '../../interface';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface IDrawRectProps {
|
|
4
|
+
rect: number[];
|
|
5
|
+
canRenderMenu?: boolean;
|
|
6
|
+
containerDom: HTMLDivElement;
|
|
7
|
+
onMenuClick?: (options: MenuRectType) => void;
|
|
8
|
+
menus: MenuRectType[];
|
|
9
|
+
getRectImage: (rect: number[]) => string | null;
|
|
10
|
+
}
|
|
11
|
+
declare function DrawRect({ rect, canRenderMenu, containerDom, onMenuClick, menus, getRectImage }: IDrawRectProps): JSX.Element;
|
|
12
|
+
export default DrawRect;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MenuRectType } from '../../../Picture/interface';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface IRectMenuProps {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
menus: MenuRectType[];
|
|
7
|
+
containerDom: HTMLDivElement;
|
|
8
|
+
onMenuClick: (options: MenuRectType) => void;
|
|
9
|
+
}
|
|
10
|
+
declare function RectMenu({ x, y, menus, containerDom, onMenuClick }: IRectMenuProps): JSX.Element;
|
|
11
|
+
export default RectMenu;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface IToolsProps {
|
|
4
|
+
scale: number;
|
|
5
|
+
imgDownload?: () => void;
|
|
6
|
+
setScale: (scale: number) => void;
|
|
7
|
+
setRotate: (rotate: number) => void;
|
|
8
|
+
containerEle: HTMLDivElement;
|
|
9
|
+
resetPicture: (event: React.MouseEvent) => void;
|
|
10
|
+
fullScreenChange: (flag: boolean) => void;
|
|
11
|
+
}
|
|
12
|
+
declare function Tools({ scale, imgDownload, setScale, setRotate, containerEle, resetPicture, fullScreenChange }: IToolsProps): JSX.Element;
|
|
13
|
+
export default Tools;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function App(): JSX.Element;
|