@evergis/react 3.1.3 → 3.1.5

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.
Files changed (80) hide show
  1. package/dist/components/{Map/components/Layer → Layer}/RasterLayer.d.ts +1 -1
  2. package/dist/components/{Map/components/Layer → Layer}/VectorLayer.d.ts +1 -1
  3. package/dist/components/{Map/components/Layer → Layer}/index.d.ts +1 -0
  4. package/dist/components/{Map/components/Layer → Layer}/types.d.ts +1 -1
  5. package/dist/components/{Map/components/Layer → Layer}/utils/getClientStyleItemPrefixSuffix.d.ts +1 -1
  6. package/dist/components/Map/index.d.ts +0 -1
  7. package/dist/components/Map/types.d.ts +0 -1
  8. package/dist/components/index.d.ts +1 -3
  9. package/dist/contexts/MapContext/types.d.ts +31 -0
  10. package/dist/contexts/index.d.ts +2 -0
  11. package/dist/core/classification/parseClientStyle.d.ts +1 -1
  12. package/dist/core/feature/convertSpToTurfFeature.d.ts +2 -2
  13. package/dist/core/index.d.ts +0 -3
  14. package/dist/hooks/index.d.ts +2 -1
  15. package/dist/hooks/map/index.d.ts +1 -18
  16. package/dist/hooks/map/useMapContext.d.ts +1 -1
  17. package/dist/hooks/map/useMapDraw/customModes.d.ts +6 -1
  18. package/dist/hooks/map/useZoomToFeatures.d.ts +2 -2
  19. package/dist/hooks/serverNotifications/index.d.ts +0 -1
  20. package/dist/hooks/serverNotifications/useServerNotificationsContext.d.ts +1 -1
  21. package/dist/hooks/useDebouncedCallback.d.ts +1 -0
  22. package/dist/hooks/useWindowResize.d.ts +1 -0
  23. package/dist/index.d.ts +2 -0
  24. package/dist/react.cjs.development.js +510 -1253
  25. package/dist/react.cjs.development.js.map +1 -1
  26. package/dist/react.cjs.production.min.js +1 -1
  27. package/dist/react.cjs.production.min.js.map +1 -1
  28. package/dist/react.esm.js +511 -1250
  29. package/dist/react.esm.js.map +1 -1
  30. package/dist/types/index.d.ts +2 -0
  31. package/dist/utils/debounce.d.ts +1 -0
  32. package/dist/utils/index.d.ts +1 -1
  33. package/package.json +3 -3
  34. package/dist/components/ErrorBoundary/styled.d.ts +0 -1
  35. package/dist/components/Map/components/BuildingsLayer/BuildingsLayer.d.ts +0 -3
  36. package/dist/components/Map/components/BuildingsLayer/index.d.ts +0 -2
  37. package/dist/components/Map/components/BuildingsLayer/types.d.ts +0 -4
  38. package/dist/components/Map/components/index.d.ts +0 -2
  39. package/dist/components/MapContext/types.d.ts +0 -138
  40. package/dist/components/ResizablePanel/ResizablePanel.d.ts +0 -3
  41. package/dist/components/ResizablePanel/index.d.ts +0 -2
  42. package/dist/components/ResizablePanel/styled.d.ts +0 -11
  43. package/dist/components/ResizablePanel/types.d.ts +0 -14
  44. package/dist/core/attributes/index.d.ts +0 -1
  45. package/dist/core/geometrySelection/drawModeToGeometrySelectionType.d.ts +0 -3
  46. package/dist/core/geometrySelection/getGeometrySelectionTurfFeature.d.ts +0 -3
  47. package/dist/core/geometrySelection/index.d.ts +0 -2
  48. package/dist/core/types/index.d.ts +0 -2
  49. package/dist/core/types/map.d.ts +0 -5
  50. package/dist/hooks/map/useCurrentSelectedFeature.d.ts +0 -2
  51. package/dist/hooks/map/useEditingFeature.d.ts +0 -1
  52. package/dist/hooks/map/useEwktGeometry.d.ts +0 -1
  53. package/dist/hooks/map/useGeometryEditor.d.ts +0 -2
  54. package/dist/hooks/map/useGeometrySelection.d.ts +0 -2
  55. package/dist/hooks/map/useGeometrySelectionBuffer.d.ts +0 -1
  56. package/dist/hooks/map/useSelectFeaturesCount.d.ts +0 -1
  57. package/dist/hooks/map/useSelectFeaturesCurrentIndex.d.ts +0 -1
  58. package/dist/hooks/map/useSelectFeaturesGeometryMasking.d.ts +0 -1
  59. package/dist/hooks/map/useSelectFeaturesInitialized.d.ts +0 -1
  60. package/dist/hooks/map/useSelectFeaturesLayerName.d.ts +0 -1
  61. package/dist/hooks/map/useSelectFeaturesPagination.d.ts +0 -4
  62. package/dist/hooks/map/useSelectFeaturesStatisticsActive.d.ts +0 -1
  63. package/dist/hooks/map/useSelectFeaturesTotalCounts.d.ts +0 -1
  64. package/dist/hooks/map/useSelectedFeatures.d.ts +0 -2
  65. package/dist/hooks/map/useUpdateCurrentFeature.d.ts +0 -2
  66. package/dist/hooks/map/useZoomToLayer.d.ts +0 -7
  67. package/dist/hooks/useResizer.d.ts +0 -28
  68. package/dist/utils/geometryToWkt.d.ts +0 -2
  69. /package/dist/components/{Map/components/Layer → Layer}/Layer.d.ts +0 -0
  70. /package/dist/components/{Map/components/Layer → Layer}/constants.d.ts +0 -0
  71. /package/dist/{components → contexts}/MapContext/MapContext.d.ts +0 -0
  72. /package/dist/{components → contexts}/MapContext/MapProvider.d.ts +0 -0
  73. /package/dist/{components → contexts}/MapContext/index.d.ts +0 -0
  74. /package/dist/{components → contexts}/ServerNotificationsContext/ServerNotificationsContext.d.ts +0 -0
  75. /package/dist/{components → contexts}/ServerNotificationsContext/ServerNotificationsProvider.d.ts +0 -0
  76. /package/dist/{hooks/serverNotifications → contexts/ServerNotificationsContext/hooks}/useServerNotifications.d.ts +0 -0
  77. /package/dist/{components → contexts}/ServerNotificationsContext/index.d.ts +0 -0
  78. /package/dist/{components → contexts}/ServerNotificationsContext/types.d.ts +0 -0
  79. /package/dist/{core/attributes/types.d.ts → types/attribute.d.ts} +0 -0
  80. /package/dist/{core/types → types}/styling.d.ts +0 -0
@@ -1,138 +0,0 @@
1
- import { Dispatch, MutableRefObject, PropsWithChildren, SetStateAction } from "react";
2
- import { Map as MapboxGLMap } from "mapbox-gl";
3
- import MapboxDraw from "@mapbox/mapbox-gl-draw";
4
- import { FeatureDc, LayerDefinitionDc, GeometryType } from "@evergis/api";
5
- import { Feature } from "geojson";
6
- export declare enum BaseMapTheme {
7
- Light = "light",
8
- Dark = "dark"
9
- }
10
- export interface BaseMapItem {
11
- name: string;
12
- source: string;
13
- preview?: string;
14
- imgSrc?: string;
15
- title: string;
16
- theme?: BaseMapTheme;
17
- opacity?: number;
18
- color?: string;
19
- }
20
- export declare enum GeometrySelectionTypes {
21
- Point = "select_point",
22
- Line = "select_line",
23
- Circle = "select_circle",
24
- Rect = "select_rect",
25
- Polygon = "select_polygon",
26
- Zones = "zones_selection",
27
- Coordinates = "xy",
28
- Route = "selection_route"
29
- }
30
- export declare enum GeometrySelectionToolTypes {
31
- Replace = "Replace",
32
- Unite = "Unite",
33
- Crop = "Crop",
34
- Edit = "Edit"
35
- }
36
- export declare type SelectionHistoryFeature = Feature;
37
- export interface SelectionHistory {
38
- features: Array<SelectionHistoryFeature[]>;
39
- zones?: Array<Array<Feature[]>>;
40
- step: number;
41
- }
42
- export declare enum GeometrySelectionZoneTypes {
43
- Walking = "Walking",
44
- Car = "Car"
45
- }
46
- export declare enum GeometrySelectionRouteTypes {
47
- Walking = "Walking",
48
- Car = "Car"
49
- }
50
- export interface GeometrySelectionSettings {
51
- zoneDuration?: number;
52
- zoneType?: GeometrySelectionZoneTypes;
53
- routeType?: GeometrySelectionRouteTypes;
54
- bufferRadius?: string;
55
- bufferMultiplier?: string;
56
- bufferInclude?: boolean;
57
- selectOutside?: boolean;
58
- }
59
- export interface GeometrySelection {
60
- active?: boolean;
61
- loading?: boolean;
62
- type?: GeometrySelectionTypes;
63
- currentTool?: GeometrySelectionToolTypes;
64
- history?: SelectionHistory;
65
- editHistory?: SelectionHistory;
66
- isBuffer?: boolean;
67
- settings?: GeometrySelectionSettings;
68
- }
69
- export declare enum GeometryEditorMode {
70
- Create = 0,
71
- Edit = 1,
72
- Transform = 2,
73
- Expand = 3,
74
- Unite = 4,
75
- Subtract = 5
76
- }
77
- export declare type Coordinates = [number, number];
78
- export declare type Positions = Coordinates | Coordinates[] | Coordinates[][];
79
- export interface GeometryEditor {
80
- active: boolean;
81
- geometryType?: GeometryType;
82
- layerName?: string;
83
- geometry?: Positions;
84
- mode?: GeometryEditorMode;
85
- }
86
- export interface FeaturedDcExtendedGeometry extends Omit<FeatureDc["geometry"], "coordinates"> {
87
- coordinates?: any;
88
- }
89
- export interface FeatureDcExtended extends Omit<FeatureDc, "geometry"> {
90
- geometry: FeaturedDcExtendedGeometry;
91
- layer: string;
92
- }
93
- export interface SelectedFeature extends FeatureDcExtended {
94
- layerDefinition: LayerDefinitionDc;
95
- }
96
- export interface SelectFeatures {
97
- initialized?: boolean;
98
- layerName?: string;
99
- currentId: string | null;
100
- selectionOffset?: number;
101
- features: Record<string, SelectedFeature[]>;
102
- totalCounts: Record<string, number>;
103
- statisticsActive?: boolean;
104
- geometryMasking?: boolean;
105
- }
106
- export interface MapContextProps {
107
- map?: MutableRefObject<MapboxGLMap>;
108
- draw?: MutableRefObject<Omit<MapboxDraw, "getDefaultPosition">>;
109
- loaded?: boolean;
110
- setLoaded?: Dispatch<SetStateAction<boolean>>;
111
- basemapItems?: BaseMapItem[];
112
- basemapName?: string;
113
- setBasemapName?: Dispatch<SetStateAction<string>>;
114
- defaultBasemap?: string;
115
- globeProjection?: boolean;
116
- setGlobeProjection?: Dispatch<SetStateAction<boolean>>;
117
- geometrySelection?: GeometrySelection;
118
- setGeometrySelection?: Dispatch<SetStateAction<GeometrySelection>>;
119
- resetGeometrySelection?: VoidFunction;
120
- geometryEditor?: GeometryEditor;
121
- setGeometryEditor?: Dispatch<SetStateAction<GeometryEditor>>;
122
- resetGeometryEditor?: VoidFunction;
123
- selectFeatures?: SelectFeatures;
124
- setNextFeature?: VoidFunction;
125
- setPrevFeature?: VoidFunction;
126
- setSelectedFeatures?: (payload?: SelectFeatures["features"], currentId?: any, offset?: number) => void;
127
- setSelectedFeaturesTotalCounts?: Dispatch<SetStateAction<SelectFeatures["totalCounts"]>>;
128
- setSelectFeaturesInitialized?: Dispatch<SetStateAction<boolean>>;
129
- setSelectFeaturesLayerName?: Dispatch<SetStateAction<string>>;
130
- setSelectFeaturesStatisticsActive?: Dispatch<SetStateAction<boolean>>;
131
- setSelectFeaturesGeometryMasking?: Dispatch<SetStateAction<boolean>>;
132
- updateCurrentFeature?: Dispatch<SetStateAction<Partial<SelectedFeature>>>;
133
- resetSelectedFeatures?: VoidFunction;
134
- }
135
- export interface MapProviderProps extends PropsWithChildren {
136
- basemapItems: BaseMapItem[];
137
- defaultBasemap: string;
138
- }
@@ -1,3 +0,0 @@
1
- import { FC } from "react";
2
- import { ResizablePanelProps } from "./types";
3
- export declare const ResizablePanel: FC<ResizablePanelProps>;
@@ -1,2 +0,0 @@
1
- export * from "./ResizablePanel";
2
- export * from "./types";
@@ -1,11 +0,0 @@
1
- import { ResizerOptions } from "../../hooks";
2
- import { HandlePosition } from "./types";
3
- export declare const ResizablePanelContainer: import("styled-components").StyledComponent<"div", any, ResizerOptions & {
4
- width?: string;
5
- height?: string;
6
- }, never>;
7
- export declare const getHandlePositionProps: (position: HandlePosition, palette: any) => import("styled-components").FlattenSimpleInterpolation;
8
- export declare const PanelDragHandle: import("styled-components").StyledComponent<"div", any, {
9
- disabled?: boolean;
10
- position: HandlePosition;
11
- }, never>;
@@ -1,14 +0,0 @@
1
- import { FC, ReactNode } from "react";
2
- import { HorizontalPosition, ResizerOptions, VerticalPosition } from "../../hooks";
3
- export declare type HandlePosition = VerticalPosition | HorizontalPosition;
4
- export interface ResizablePanelProps extends ResizerOptions {
5
- className?: string;
6
- handleClassName?: string;
7
- width?: string;
8
- height?: string;
9
- disabled?: boolean;
10
- handleVerticalPosition?: VerticalPosition;
11
- handleHorizontalPosition?: HorizontalPosition;
12
- Handle?: FC;
13
- children?: ReactNode;
14
- }
@@ -1 +0,0 @@
1
- export * from "./types";
@@ -1,3 +0,0 @@
1
- import { DrawMode } from "@mapbox/mapbox-gl-draw";
2
- import { GeometrySelectionTypes } from "../../components";
3
- export declare const drawModeToGeometrySelectionType: (mode: DrawMode | string) => GeometrySelectionTypes;
@@ -1,3 +0,0 @@
1
- import { Feature, LineString, Point, Polygon, Position } from "geojson";
2
- import { GeometrySelectionTypes } from "../../components";
3
- export declare const getGeometrySelectionTurfFeature: (coordinates: Position | Position[] | Position[][] | Position[][][], selectionType: GeometrySelectionTypes, toWgs?: boolean) => Feature<Point | LineString | Polygon>;
@@ -1,2 +0,0 @@
1
- export * from "./drawModeToGeometrySelectionType";
2
- export * from "./getGeometrySelectionTurfFeature";
@@ -1,2 +0,0 @@
1
- export * from "./map";
2
- export * from "./styling";
@@ -1,5 +0,0 @@
1
- import MapboxDraw, { DrawCustomMode } from "@mapbox/mapbox-gl-draw";
2
- export interface ExtendedMapboxDrawModes extends MapboxDraw.Modes {
3
- [key: string]: DrawCustomMode;
4
- static: DrawCustomMode;
5
- }
@@ -1,2 +0,0 @@
1
- import { SelectedFeature } from "../../components/MapContext";
2
- export declare const useCurrentSelectedFeature: () => SelectedFeature;
@@ -1 +0,0 @@
1
- export declare const useEditingFeature: () => boolean;
@@ -1 +0,0 @@
1
- export declare const useEwktGeometry: () => string;
@@ -1,2 +0,0 @@
1
- import { GeometryEditor } from "../../components";
2
- export declare const useGeometryEditor: () => [GeometryEditor, (state: Partial<GeometryEditor>) => void];
@@ -1,2 +0,0 @@
1
- import { GeometrySelection } from "../../components";
2
- export declare const useGeometrySelection: () => [GeometrySelection, (state: Partial<GeometrySelection>) => void];
@@ -1 +0,0 @@
1
- export declare const useGeometrySelectionBuffer: () => string | undefined;
@@ -1 +0,0 @@
1
- export declare const useSelectFeaturesCount: () => number;
@@ -1 +0,0 @@
1
- export declare const useSelectFeaturesCurrentIndex: () => number;
@@ -1 +0,0 @@
1
- export declare const useSelectFeaturesGeometryMasking: () => [boolean, (state: boolean) => void];
@@ -1 +0,0 @@
1
- export declare const useSelectFeaturesInitialized: () => [boolean, (value: boolean) => void];
@@ -1 +0,0 @@
1
- export declare const useSelectFeaturesLayerName: () => [string, (name?: string) => void];
@@ -1,4 +0,0 @@
1
- export declare const useSelectFeaturesPagination: () => {
2
- readonly onNext: () => void;
3
- readonly onPrev: () => void;
4
- };
@@ -1 +0,0 @@
1
- export declare const useSelectFeaturesStatisticsActive: () => [boolean, (state: boolean) => void];
@@ -1 +0,0 @@
1
- export declare const useSelectFeaturesTotalCounts: () => [Record<string, number>, (totalCounts: Record<string, number>) => void];
@@ -1,2 +0,0 @@
1
- import { SelectedFeature } from "../../components";
2
- export declare const useSelectedFeatures: () => [Record<string, SelectedFeature[]>, (features: Record<string, SelectedFeature[]>) => void];
@@ -1,2 +0,0 @@
1
- import { SelectedFeature } from "../../components";
2
- export declare const useUpdateCurrentFeature: () => (values: Partial<SelectedFeature>) => void;
@@ -1,7 +0,0 @@
1
- import { BulkExtentsDc } from "@evergis/api";
2
- interface ZoomToLayerOptions {
3
- discardFilters?: boolean;
4
- padding?: number;
5
- }
6
- export declare const useZoomToLayer: () => (bulkExtent: BulkExtentsDc, options?: ZoomToLayerOptions) => Promise<void>;
7
- export {};
@@ -1,28 +0,0 @@
1
- export declare enum VerticalPosition {
2
- Top = "top",
3
- Bottom = "bottom"
4
- }
5
- export declare enum HorizontalPosition {
6
- Left = "left",
7
- Right = "right"
8
- }
9
- export interface ResizerOptions {
10
- handleVerticalPosition?: VerticalPosition;
11
- handleHorizontalPosition?: HorizontalPosition;
12
- minWidth?: number;
13
- maxWidth?: number;
14
- minHeight?: number;
15
- maxHeight?: number;
16
- horizontal?: boolean;
17
- vertical?: boolean;
18
- useResize?: boolean;
19
- onResize?: (width: number, height: number) => void;
20
- onResizeEnd?: (width: number, height: number) => void;
21
- onResizeStart?: (width: number, height: number) => void;
22
- }
23
- export declare const useResizer: ({ handleVerticalPosition, handleHorizontalPosition, minWidth, maxWidth, horizontal, minHeight, maxHeight, vertical, useResize, onResize, onResizeEnd, onResizeStart, }: ResizerOptions) => {
24
- containerRef: import("react").MutableRefObject<HTMLDivElement>;
25
- verticalHandleRef: import("react").MutableRefObject<HTMLDivElement>;
26
- horizontalHandleRef: import("react").MutableRefObject<HTMLDivElement>;
27
- onPointerDown: () => void;
28
- };
@@ -1,2 +0,0 @@
1
- import { SelectionHistoryFeature } from "../components";
2
- export declare const geometryToWkt: (features?: SelectionHistoryFeature[]) => string;
File without changes