@carto/ps-react-maps 1.3.3-alpha.1 → 1.3.3
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.cjs +15 -15
- package/dist/index.js +558 -902
- package/dist/types/index.d.ts +0 -1
- package/dist/types/map-provider/map-provider.context.d.ts +0 -1
- package/dist/types/utils/index.d.ts +0 -1
- package/package.json +2 -9
- package/dist/types/assets/icons/ruler.d.ts +0 -2
- package/dist/types/common-stories/maps/deckgl-maps.component.d.ts +0 -2
- package/dist/types/common-stories/maps/google-maps.component.d.ts +0 -3
- package/dist/types/common-stories/maps/map-container.component.d.ts +0 -4
- package/dist/types/common-stories/maps/map.component.d.ts +0 -2
- package/dist/types/map-measurement-tool/custom-editable-geojson-layer.class.d.ts +0 -10
- package/dist/types/map-measurement-tool/custom-measurement-distance-mode.class.d.ts +0 -6
- package/dist/types/map-measurement-tool/index.d.ts +0 -9
- package/dist/types/map-measurement-tool/map-measurement-tool.component.d.ts +0 -6
- package/dist/types/map-measurement-tool/map-measurement-tool.const.d.ts +0 -29
- package/dist/types/map-measurement-tool/map-measurement-tool.context.d.ts +0 -5
- package/dist/types/map-measurement-tool/map-measurement-tool.hook.d.ts +0 -2
- package/dist/types/map-measurement-tool/map-measurement-tool.layer.d.ts +0 -3
- package/dist/types/map-measurement-tool/map-measurement-tool.provider.d.ts +0 -2
- package/dist/types/map-measurement-tool/map-measurement-tool.reducer.d.ts +0 -13
- package/dist/types/map-measurement-tool/map-measurement-tool.styles.d.ts +0 -28
- package/dist/types/map-measurement-tool/map-measurement-tool.types.d.ts +0 -60
- package/dist/types/map-measurement-tool/map-measurement-tool.util.d.ts +0 -7
- package/dist/types/utils/get-map-type/get-map-type.d.ts +0 -1
- package/dist/types/utils/get-map-type/index.d.ts +0 -2
- package/dist/types/utils/get-map-type/is-gmaps.d.ts +0 -1
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carto/ps-react-maps",
|
|
3
|
-
"version": "1.3.3
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "CARTO's Professional Service React Maps library",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -28,11 +28,7 @@
|
|
|
28
28
|
"storybook:start": "storybook dev --no-open -p 6006",
|
|
29
29
|
"storybook:build": "storybook build"
|
|
30
30
|
},
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"@nebula.gl/edit-modes": "1.0.4",
|
|
33
|
-
"@nebula.gl/layers": "1.0.4",
|
|
34
|
-
"mjolnir.js": "2.7.1"
|
|
35
|
-
},
|
|
31
|
+
"dependencies": {},
|
|
36
32
|
"devDependencies": {
|
|
37
33
|
"@carto/react-basemaps": "2.3.6",
|
|
38
34
|
"@deck.gl/core": "8.9.33",
|
|
@@ -57,9 +53,6 @@
|
|
|
57
53
|
"storybook": "7.6.7"
|
|
58
54
|
},
|
|
59
55
|
"peerDependencies": {
|
|
60
|
-
"mjolnir.js": "2.x",
|
|
61
|
-
"@nebula.gl/edit-modes": "1.x",
|
|
62
|
-
"@nebula.gl/layers": "1.x",
|
|
63
56
|
"react": "17.x || 18.x",
|
|
64
57
|
"react-dom": "17.x || 18.x"
|
|
65
58
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { DeckGLMapsProps } from '@/map-provider/';
|
|
2
|
-
export declare function DeckGLMapsComponent({ basemap, instanceRef, layers, overlayRef, viewState, height, id, initialViewState, style, width, getCursor, getTooltip, onClick, onDrag, onDragEnd, onDragStart, onHover, onResize, onViewStateChange, ...rest }: DeckGLMapsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { GoogleMapsProps } from '@/map-provider';
|
|
2
|
-
export declare function GoogleMapsComponent(props: GoogleMapsProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export declare function GoogleMap({ apiKey, basemap, instanceRef, layers, overlayRef, initialViewState, viewState, controller, height, id, language, mapId, mapOptions, style, version, width, getTooltip, onResize, onViewStateChange, ...rest }: GoogleMapsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { EditableGeoJsonLayer } from '@nebula.gl/layers';
|
|
2
|
-
import { EventManager } from 'mjolnir.js';
|
|
3
|
-
import { CustomEditableLayerProps } from './map-measurement-tool.types';
|
|
4
|
-
export declare class CustomEditableGeojsonLayer extends EditableGeoJsonLayer {
|
|
5
|
-
eventManager: EventManager;
|
|
6
|
-
constructor(props: CustomEditableLayerProps);
|
|
7
|
-
_addEventHandlers(): void;
|
|
8
|
-
_removeEventHandlers(_eventManager?: undefined): void;
|
|
9
|
-
_getEventManager(): EventManager;
|
|
10
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { FeatureCollection, MeasureDistanceMode, ModeProps } from '@nebula.gl/edit-modes';
|
|
2
|
-
import { BasePointerEvent } from '@nebula.gl/edit-modes/dist-types/types';
|
|
3
|
-
export declare class CustomMeasureDistanceMode extends MeasureDistanceMode {
|
|
4
|
-
handleClick(event: BasePointerEvent, props: ModeProps<FeatureCollection>): void;
|
|
5
|
-
handleKeyUp(event: KeyboardEvent, props: ModeProps<FeatureCollection>): void;
|
|
6
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { CustomEditableGeojsonLayer } from './custom-editable-geojson-layer.class';
|
|
2
|
-
export { CustomMeasureDistanceMode } from './custom-measurement-distance-mode.class';
|
|
3
|
-
export * from './map-measurement-tool.const';
|
|
4
|
-
export { MapMeasurementToolsLayer } from './map-measurement-tool.layer';
|
|
5
|
-
export { MapMeasurementTools } from './map-measurement-tool.component';
|
|
6
|
-
export { MapMeasurementToolsProvider } from './map-measurement-tool.provider';
|
|
7
|
-
export { convertKmTo, getTextLayerFormattedDistance, } from './map-measurement-tool.util';
|
|
8
|
-
export { useMapMeasurementTools, useMapMeasurementToolsActions, } from './map-measurement-tool.hook';
|
|
9
|
-
export * from './map-measurement-tool.types';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { MapMeasureToolChildrenProps } from './map-measurement-tool.types';
|
|
3
|
-
export type MapMeasureToolProps = {
|
|
4
|
-
children: React.FC<MapMeasureToolChildrenProps>;
|
|
5
|
-
};
|
|
6
|
-
export declare function MapMeasurementTools({ children }: MapMeasureToolProps): import("react").ReactNode;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { CustomMeasureDistanceMode } from './custom-measurement-distance-mode.class';
|
|
2
|
-
export declare const EVENT_MANAGER_EVENT_TYPES: string[];
|
|
3
|
-
export declare const MAP_MEASURE_LAYER_ID = "mapMeasureLayer";
|
|
4
|
-
export declare const DEFAULT_LAYER_PROPS: {
|
|
5
|
-
mode: typeof CustomMeasureDistanceMode;
|
|
6
|
-
id: string;
|
|
7
|
-
pickable: boolean;
|
|
8
|
-
billboard: boolean;
|
|
9
|
-
editHandlePointRadiusUnits: string;
|
|
10
|
-
editHandlePointStrokeWidth: number;
|
|
11
|
-
editHandlePointRadiusMinPixels: number;
|
|
12
|
-
editHandlePointRadiusMaxPixels: number;
|
|
13
|
-
getEditHandlePointRadius: number;
|
|
14
|
-
_subLayerProps: {
|
|
15
|
-
tooltips: {
|
|
16
|
-
fontFamily: string;
|
|
17
|
-
fontWeight: string;
|
|
18
|
-
getSize: number;
|
|
19
|
-
lineHeight: number;
|
|
20
|
-
getPixelOffset: number[];
|
|
21
|
-
getTextAnchor: string;
|
|
22
|
-
getAlignmentBaseline: string;
|
|
23
|
-
updateTriggers: {};
|
|
24
|
-
};
|
|
25
|
-
guides: {
|
|
26
|
-
getLineWidth: number;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { type MapMeasurementToolsContextInterface } from './map-measurement-tool.types';
|
|
3
|
-
export declare const INITIAL_STATE: MapMeasurementToolsContextInterface;
|
|
4
|
-
export declare const MapMeasurementToolsContext: import("react").Context<import("./map-measurement-tool.types").MapMeasurementToolsState>;
|
|
5
|
-
export declare const MapMeasurementToolsActionsContext: import("react").Context<import("./map-measurement-tool.types").MeasurementToolsActionsState>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { type MapMeasurementToolsLayerProps } from './map-measurement-tool.types';
|
|
2
|
-
import { Layer } from '@deck.gl/core/typed';
|
|
3
|
-
export declare function MapMeasurementToolsLayer({ mapId, defaultProps: { locale, getColumnName }, layerProps, }: MapMeasurementToolsLayerProps): Layer<never> | null;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { MapMeasurementToolsState } from './map-measurement-tool.types';
|
|
2
|
-
export declare enum Actions {
|
|
3
|
-
SetEnable = "SET_ENABLE",
|
|
4
|
-
SetFinished = "SET_FINISHED",
|
|
5
|
-
SetDistance = "SET_DISTANCE",
|
|
6
|
-
SetUnit = "SET_UNIT"
|
|
7
|
-
}
|
|
8
|
-
type Action = {
|
|
9
|
-
type: Actions;
|
|
10
|
-
payload: MapMeasurementToolsState[keyof MapMeasurementToolsState];
|
|
11
|
-
};
|
|
12
|
-
export declare function reducer(state: MapMeasurementToolsState, { type, payload }: Action): MapMeasurementToolsState;
|
|
13
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Theme } from '@mui/material';
|
|
2
|
-
export declare const styles: {
|
|
3
|
-
container: {
|
|
4
|
-
display: "flex";
|
|
5
|
-
alignItems: "center";
|
|
6
|
-
gap: ({ spacing }: Theme) => string;
|
|
7
|
-
};
|
|
8
|
-
chip: {
|
|
9
|
-
color: (theme: Theme) => string;
|
|
10
|
-
boxShadow: ({ shadows }: Theme) => string;
|
|
11
|
-
'& .MuiChip-deleteIcon': {
|
|
12
|
-
color: (theme: Theme) => string;
|
|
13
|
-
'&:hover': {
|
|
14
|
-
color: (theme: Theme) => string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
trigger: {
|
|
19
|
-
background: ({ palette }: Theme) => string;
|
|
20
|
-
'&:hover': {
|
|
21
|
-
background: ({ palette }: Theme) => string;
|
|
22
|
-
};
|
|
23
|
-
'&:disabled': {
|
|
24
|
-
opacity: number;
|
|
25
|
-
cursor: "default";
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import type { EditableGeojsonLayerProps } from '@nebula.gl/layers/dist-types/layers/editable-geojson-layer';
|
|
2
|
-
import type { EventManager } from 'mjolnir.js';
|
|
3
|
-
import type { ReactNode } from 'react';
|
|
4
|
-
import { Tooltip } from '@/map-provider';
|
|
5
|
-
export declare enum MapMeasurementUnit {
|
|
6
|
-
kilometer = "kilometer",
|
|
7
|
-
mile = "mile"
|
|
8
|
-
}
|
|
9
|
-
export declare enum MapMeasurementUnitTurf {
|
|
10
|
-
kilometer = "kilometers",
|
|
11
|
-
mile = "miles"
|
|
12
|
-
}
|
|
13
|
-
export declare const enum EditType {
|
|
14
|
-
AddPosition = "addPosition",
|
|
15
|
-
Finish = "finish"
|
|
16
|
-
}
|
|
17
|
-
export type MapMeasurementToolsProviderProps = {
|
|
18
|
-
children: ReactNode;
|
|
19
|
-
};
|
|
20
|
-
export type MapMeasurementToolsState = {
|
|
21
|
-
enable: boolean;
|
|
22
|
-
finished: boolean;
|
|
23
|
-
distance: number;
|
|
24
|
-
unit: MapMeasurementUnit;
|
|
25
|
-
};
|
|
26
|
-
export type MeasurementToolsActionsState = {
|
|
27
|
-
setEnable: (data: MapMeasurementToolsState['enable']) => void;
|
|
28
|
-
setFinished: (data: MapMeasurementToolsState['finished']) => void;
|
|
29
|
-
setDistance: (data: MapMeasurementToolsState['distance']) => void;
|
|
30
|
-
setUnit: (data: MapMeasurementToolsState['unit']) => void;
|
|
31
|
-
};
|
|
32
|
-
export type MapMeasurementToolsContextInterface = {
|
|
33
|
-
state: MapMeasurementToolsState;
|
|
34
|
-
actions: MeasurementToolsActionsState;
|
|
35
|
-
};
|
|
36
|
-
export interface CustomEditableLayerProps<T = unknown> extends EditableGeojsonLayerProps<T> {
|
|
37
|
-
eventManager: EventManager;
|
|
38
|
-
}
|
|
39
|
-
export type CustomEditableLayerHoverProps = {
|
|
40
|
-
distance: number;
|
|
41
|
-
unit: string;
|
|
42
|
-
locale: string;
|
|
43
|
-
};
|
|
44
|
-
export type MapMeasureToolChildrenProps = {
|
|
45
|
-
enable: boolean;
|
|
46
|
-
unit: MapMeasurementUnit;
|
|
47
|
-
distance: number;
|
|
48
|
-
onToggleButton: () => void;
|
|
49
|
-
};
|
|
50
|
-
export type MapMeasurementToolsLayerHoverProps = (info: Tooltip, args: CustomEditableLayerHoverProps) => void;
|
|
51
|
-
export type MapMeasurementToolsLayerProps = {
|
|
52
|
-
mapId: string;
|
|
53
|
-
defaultProps?: {
|
|
54
|
-
locale?: string;
|
|
55
|
-
getColumnName: string;
|
|
56
|
-
};
|
|
57
|
-
layerProps?: Partial<CustomEditableLayerProps> & {
|
|
58
|
-
onHover?: MapMeasurementToolsLayerHoverProps;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MapMeasurementUnit } from './map-measurement-tool.types';
|
|
2
|
-
export declare function convertKmTo(distance: number, unit: MapMeasurementUnit): number;
|
|
3
|
-
export declare function getTextLayerFormattedDistance({ text, unit, locale, }: {
|
|
4
|
-
text: number;
|
|
5
|
-
unit: MapMeasurementUnit;
|
|
6
|
-
locale: string;
|
|
7
|
-
}): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getMapType(basemap: string): import("@/map-provider").MapsTypes;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isGmaps(basemap: string): boolean;
|