1 | import * as React from 'react';
|
2 | import { Props as FeatureProps } from './feature';
|
3 | import { LayerCommonProps, Props as LayerProps } from './layer';
|
4 | import { Map } from 'mapbox-gl';
|
5 | export interface EnhancedLayerProps {
|
6 | id?: string;
|
7 | map: Map;
|
8 | }
|
9 | export declare type OwnProps = EnhancedLayerProps & LayerCommonProps;
|
10 | export declare function layerMouseTouchEvents(WrappedComponent: React.ComponentClass<LayerProps>): {
|
11 | new (props: Readonly<OwnProps>): {
|
12 | hover: number[];
|
13 | draggedChildren: React.ReactElement<FeatureProps, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>[] | undefined;
|
14 | id: string;
|
15 | getChildren: () => React.ReactElement<FeatureProps, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>[];
|
16 | getChildFromId: (children: React.ReactElement<FeatureProps, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>[], id: number) => React.ReactElement<FeatureProps, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
|
17 | areFeaturesDraggable: (children: React.ReactElement<FeatureProps, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>[], featureIds?: number[]) => boolean;
|
18 | onClick: (evt: any) => void;
|
19 | onMouseEnter: (evt: any) => void;
|
20 | onMouseLeave: (evt: any) => void;
|
21 | onMouseDown: () => void;
|
22 | onTouchStart: (evt: any) => void;
|
23 | onFeatureDown: (startEvent: string) => void;
|
24 | onFeatureDragStart: (evt: any) => void;
|
25 | onFeatureDrag: (evt: any) => void;
|
26 | onFeatureDragEnd: (evt: any) => void;
|
27 | componentDidMount(): void;
|
28 | componentWillUnmount(): void;
|
29 | render(): JSX.Element;
|
30 | context: any;
|
31 | setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<OwnProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
32 | forceUpdate(callback?: (() => void) | undefined): void;
|
33 | readonly props: Readonly<OwnProps> & Readonly<{
|
34 | children?: React.ReactNode;
|
35 | }>;
|
36 | state: Readonly<{}>;
|
37 | refs: {
|
38 | [key: string]: React.ReactInstance;
|
39 | };
|
40 | };
|
41 | new (props: OwnProps, context?: any): {
|
42 | hover: number[];
|
43 | draggedChildren: React.ReactElement<FeatureProps, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>[] | undefined;
|
44 | id: string;
|
45 | getChildren: () => React.ReactElement<FeatureProps, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>[];
|
46 | getChildFromId: (children: React.ReactElement<FeatureProps, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>[], id: number) => React.ReactElement<FeatureProps, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
|
47 | areFeaturesDraggable: (children: React.ReactElement<FeatureProps, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>[], featureIds?: number[]) => boolean;
|
48 | onClick: (evt: any) => void;
|
49 | onMouseEnter: (evt: any) => void;
|
50 | onMouseLeave: (evt: any) => void;
|
51 | onMouseDown: () => void;
|
52 | onTouchStart: (evt: any) => void;
|
53 | onFeatureDown: (startEvent: string) => void;
|
54 | onFeatureDragStart: (evt: any) => void;
|
55 | onFeatureDrag: (evt: any) => void;
|
56 | onFeatureDragEnd: (evt: any) => void;
|
57 | componentDidMount(): void;
|
58 | componentWillUnmount(): void;
|
59 | render(): JSX.Element;
|
60 | context: any;
|
61 | setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<OwnProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
62 | forceUpdate(callback?: (() => void) | undefined): void;
|
63 | readonly props: Readonly<OwnProps> & Readonly<{
|
64 | children?: React.ReactNode;
|
65 | }>;
|
66 | state: Readonly<{}>;
|
67 | refs: {
|
68 | [key: string]: React.ReactInstance;
|
69 | };
|
70 | };
|
71 | contextType?: React.Context<any> | undefined;
|
72 | };
|
73 | export default layerMouseTouchEvents;
|
74 |
|
\ | No newline at end of file |