@evergis/react 3.1.1 → 3.1.2

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 (86) hide show
  1. package/dist/components/ErrorBoundary/index.d.ts +12 -0
  2. package/dist/components/ErrorBoundary/styled.d.ts +1 -0
  3. package/dist/components/ErrorBoundary/types.d.ts +7 -0
  4. package/dist/components/Map/Map.d.ts +5 -0
  5. package/dist/components/Map/components/BuildingsLayer/BuildingsLayer.d.ts +3 -0
  6. package/dist/components/Map/components/BuildingsLayer/index.d.ts +2 -0
  7. package/dist/components/Map/components/BuildingsLayer/types.d.ts +4 -0
  8. package/dist/components/Map/components/Layer/Layer.d.ts +3 -0
  9. package/dist/components/Map/components/Layer/RasterLayer.d.ts +3 -0
  10. package/dist/components/Map/components/Layer/VectorLayer.d.ts +3 -0
  11. package/dist/components/Map/components/Layer/constants.d.ts +137 -0
  12. package/dist/components/Map/components/Layer/index.d.ts +2 -0
  13. package/dist/components/Map/components/Layer/types.d.ts +12 -0
  14. package/dist/components/Map/components/Layer/utils/getClientStyleItemPrefixSuffix.d.ts +3 -0
  15. package/dist/components/Map/components/index.d.ts +2 -0
  16. package/dist/components/Map/index.d.ts +3 -0
  17. package/dist/components/Map/styled.d.ts +4 -0
  18. package/dist/components/Map/types.d.ts +10 -0
  19. package/dist/components/MapContext/MapContext.d.ts +2 -0
  20. package/dist/components/MapContext/MapProvider.d.ts +3 -0
  21. package/dist/components/MapContext/index.d.ts +3 -0
  22. package/dist/components/MapContext/types.d.ts +138 -0
  23. package/dist/components/ResizablePanel/ResizablePanel.d.ts +3 -0
  24. package/dist/components/ResizablePanel/index.d.ts +2 -0
  25. package/dist/components/ResizablePanel/styled.d.ts +11 -0
  26. package/dist/components/ResizablePanel/types.d.ts +14 -0
  27. package/dist/components/ServerNotificationsContext/ServerNotificationsContext.d.ts +2 -0
  28. package/dist/components/ServerNotificationsContext/ServerNotificationsProvider.d.ts +3 -0
  29. package/dist/components/ServerNotificationsContext/index.d.ts +3 -0
  30. package/dist/components/ServerNotificationsContext/types.d.ts +12 -0
  31. package/dist/components/index.d.ts +5 -0
  32. package/dist/core/classification/findAttributeInExpression.d.ts +2 -0
  33. package/dist/core/classification/getActualExtrusionHeight.d.ts +2 -0
  34. package/dist/core/classification/index.d.ts +3 -0
  35. package/dist/core/classification/parseClientStyle.d.ts +2 -0
  36. package/dist/core/feature/convertSpToTurfFeature.d.ts +3 -0
  37. package/dist/core/feature/index.d.ts +1 -0
  38. package/dist/core/geometrySelection/drawModeToGeometrySelectionType.d.ts +3 -0
  39. package/dist/core/geometrySelection/getGeometrySelectionTurfFeature.d.ts +3 -0
  40. package/dist/core/geometrySelection/index.d.ts +2 -0
  41. package/dist/core/index.d.ts +4 -0
  42. package/dist/core/types/index.d.ts +2 -0
  43. package/dist/core/types/map.d.ts +5 -0
  44. package/dist/core/types/styling.d.ts +15 -0
  45. package/dist/hooks/index.d.ts +3 -0
  46. package/dist/hooks/map/index.d.ts +22 -0
  47. package/dist/hooks/map/useCurrentSelectedFeature.d.ts +2 -0
  48. package/dist/hooks/map/useEditingFeature.d.ts +1 -0
  49. package/dist/hooks/map/useEwktGeometry.d.ts +1 -0
  50. package/dist/hooks/map/useGeometryEditor.d.ts +2 -0
  51. package/dist/hooks/map/useGeometrySelection.d.ts +2 -0
  52. package/dist/hooks/map/useGeometrySelectionBuffer.d.ts +1 -0
  53. package/dist/hooks/map/useMapContext.d.ts +1 -0
  54. package/dist/hooks/map/useMapDraw/customModes.d.ts +2 -0
  55. package/dist/hooks/map/useMapDraw/customStyles.d.ts +58 -0
  56. package/dist/hooks/map/useMapDraw/index.d.ts +1 -0
  57. package/dist/hooks/map/useRedrawLayer.d.ts +1 -0
  58. package/dist/hooks/map/useSelectFeaturesCount.d.ts +1 -0
  59. package/dist/hooks/map/useSelectFeaturesCurrentIndex.d.ts +1 -0
  60. package/dist/hooks/map/useSelectFeaturesGeometryMasking.d.ts +1 -0
  61. package/dist/hooks/map/useSelectFeaturesInitialized.d.ts +1 -0
  62. package/dist/hooks/map/useSelectFeaturesLayerName.d.ts +1 -0
  63. package/dist/hooks/map/useSelectFeaturesPagination.d.ts +4 -0
  64. package/dist/hooks/map/useSelectFeaturesStatisticsActive.d.ts +1 -0
  65. package/dist/hooks/map/useSelectFeaturesTotalCounts.d.ts +1 -0
  66. package/dist/hooks/map/useSelectedFeatures.d.ts +2 -0
  67. package/dist/hooks/map/useUpdateCurrentFeature.d.ts +2 -0
  68. package/dist/hooks/map/useZoomToFeatures.d.ts +2 -0
  69. package/dist/hooks/map/useZoomToLayer.d.ts +7 -0
  70. package/dist/hooks/map/useZoomToPoint.d.ts +1 -0
  71. package/dist/hooks/serverNotifications/index.d.ts +2 -0
  72. package/dist/hooks/serverNotifications/useServerNotifications.d.ts +2 -0
  73. package/dist/hooks/serverNotifications/useServerNotificationsContext.d.ts +1 -0
  74. package/dist/hooks/useResizer.d.ts +28 -0
  75. package/dist/hooks/useToggle.d.ts +1 -1
  76. package/dist/jest.config.d.ts +11 -0
  77. package/dist/react.cjs.development.js +811 -5
  78. package/dist/react.cjs.development.js.map +1 -1
  79. package/dist/react.cjs.production.min.js +1 -1
  80. package/dist/react.cjs.production.min.js.map +1 -1
  81. package/dist/react.esm.js +781 -6
  82. package/dist/react.esm.js.map +1 -1
  83. package/dist/utils/date.d.ts +2 -2
  84. package/dist/utils/geometryToWkt.d.ts +2 -0
  85. package/dist/utils/index.d.ts +1 -0
  86. package/package.json +30 -23
@@ -0,0 +1,12 @@
1
+ import React, { Component } from "react";
2
+ import { ErrorBoundaryProps, ErrorBoundaryState } from "./types";
3
+ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
4
+ state: {
5
+ hasError: boolean;
6
+ };
7
+ static getDerivedStateFromError(): {
8
+ hasError: boolean;
9
+ };
10
+ componentDidCatch(error: Error): void;
11
+ render(): React.JSX.Element;
12
+ }
@@ -0,0 +1 @@
1
+ export declare const ErrorBoundaryContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren, ReactNode } from "react";
2
+ export interface ErrorBoundaryProps extends PropsWithChildren {
3
+ errorContents?: ReactNode;
4
+ }
5
+ export interface ErrorBoundaryState {
6
+ hasError?: boolean;
7
+ }
@@ -0,0 +1,5 @@
1
+ import { FC } from "react";
2
+ import "@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css";
3
+ import { MapProps } from "./types";
4
+ import "mapbox-gl/dist/mapbox-gl.css";
5
+ export declare const Map: FC<MapProps>;
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ import { BuildingsLayerProps } from "./types";
3
+ export declare const BuildingsLayer: FC<BuildingsLayerProps>;
@@ -0,0 +1,2 @@
1
+ export * from "./BuildingsLayer";
2
+ export * from "./types";
@@ -0,0 +1,4 @@
1
+ export interface BuildingsLayerProps {
2
+ beforeId?: string;
3
+ transparent?: boolean;
4
+ }
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ import { LayerProps } from "./types";
3
+ export declare const Layer: FC<LayerProps>;
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ import { LayerProps } from "./types";
3
+ export declare const RasterLayer: FC<Omit<LayerProps, "layerType">>;
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ import { LayerProps } from "./types";
3
+ export declare const VectorLayer: FC<Omit<LayerProps, "layerType">>;
@@ -0,0 +1,137 @@
1
+ export declare const DEFAULT_CIRCLE_PAINT: {
2
+ "circle-radius"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
3
+ "circle-radius-transition"?: import("mapbox-gl").TransitionSpecification;
4
+ "circle-color"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<string>;
5
+ "circle-color-transition"?: import("mapbox-gl").TransitionSpecification;
6
+ "circle-color-use-theme"?: import("mapbox-gl").PropertyValueSpecification<string>;
7
+ "circle-blur"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
8
+ "circle-blur-transition"?: import("mapbox-gl").TransitionSpecification;
9
+ "circle-opacity"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
10
+ "circle-opacity-transition"?: import("mapbox-gl").TransitionSpecification;
11
+ "circle-translate"?: import("mapbox-gl").PropertyValueSpecification<[number, number]>;
12
+ "circle-translate-transition"?: import("mapbox-gl").TransitionSpecification;
13
+ "circle-translate-anchor"?: import("mapbox-gl").PropertyValueSpecification<"map" | "viewport">;
14
+ "circle-pitch-scale"?: import("mapbox-gl").PropertyValueSpecification<"map" | "viewport">;
15
+ "circle-pitch-alignment"?: import("mapbox-gl").PropertyValueSpecification<"map" | "viewport">;
16
+ "circle-stroke-width"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
17
+ "circle-stroke-width-transition"?: import("mapbox-gl").TransitionSpecification;
18
+ "circle-stroke-color"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<string>;
19
+ "circle-stroke-color-transition"?: import("mapbox-gl").TransitionSpecification;
20
+ "circle-stroke-color-use-theme"?: import("mapbox-gl").PropertyValueSpecification<string>;
21
+ "circle-stroke-opacity"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
22
+ "circle-stroke-opacity-transition"?: import("mapbox-gl").TransitionSpecification;
23
+ "circle-emissive-strength"?: import("mapbox-gl").PropertyValueSpecification<number>;
24
+ "circle-emissive-strength-transition"?: import("mapbox-gl").TransitionSpecification;
25
+ };
26
+ export declare const DEFAULT_FILL_PAINT: {
27
+ "fill-antialias"?: import("mapbox-gl").PropertyValueSpecification<boolean>;
28
+ "fill-opacity"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
29
+ "fill-opacity-transition"?: import("mapbox-gl").TransitionSpecification;
30
+ "fill-color"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<string>;
31
+ "fill-color-transition"?: import("mapbox-gl").TransitionSpecification;
32
+ "fill-color-use-theme"?: import("mapbox-gl").PropertyValueSpecification<string>;
33
+ "fill-outline-color"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<string>;
34
+ "fill-outline-color-transition"?: import("mapbox-gl").TransitionSpecification;
35
+ "fill-outline-color-use-theme"?: import("mapbox-gl").PropertyValueSpecification<string>;
36
+ "fill-translate"?: import("mapbox-gl").PropertyValueSpecification<[number, number]>;
37
+ "fill-translate-transition"?: import("mapbox-gl").TransitionSpecification;
38
+ "fill-translate-anchor"?: import("mapbox-gl").PropertyValueSpecification<"map" | "viewport">;
39
+ "fill-pattern"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<string>;
40
+ "fill-pattern-cross-fade"?: import("mapbox-gl").PropertyValueSpecification<number>;
41
+ "fill-emissive-strength"?: import("mapbox-gl").PropertyValueSpecification<number>;
42
+ "fill-emissive-strength-transition"?: import("mapbox-gl").TransitionSpecification;
43
+ "fill-z-offset"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
44
+ "fill-z-offset-transition"?: import("mapbox-gl").TransitionSpecification;
45
+ "fill-bridge-guard-rail-color"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<string>;
46
+ "fill-bridge-guard-rail-color-transition"?: import("mapbox-gl").TransitionSpecification;
47
+ "fill-bridge-guard-rail-color-use-theme"?: import("mapbox-gl").PropertyValueSpecification<string>;
48
+ "fill-tunnel-structure-color"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<string>;
49
+ "fill-tunnel-structure-color-transition"?: import("mapbox-gl").TransitionSpecification;
50
+ "fill-tunnel-structure-color-use-theme"?: import("mapbox-gl").PropertyValueSpecification<string>;
51
+ };
52
+ export declare const DEFAULT_FILL_EXTRUSION_PAINT: {
53
+ "fill-extrusion-opacity"?: import("mapbox-gl").PropertyValueSpecification<number>;
54
+ "fill-extrusion-opacity-transition"?: import("mapbox-gl").TransitionSpecification;
55
+ "fill-extrusion-color"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<string>;
56
+ "fill-extrusion-color-transition"?: import("mapbox-gl").TransitionSpecification;
57
+ "fill-extrusion-color-use-theme"?: import("mapbox-gl").PropertyValueSpecification<string>;
58
+ "fill-extrusion-translate"?: import("mapbox-gl").PropertyValueSpecification<[number, number]>;
59
+ "fill-extrusion-translate-transition"?: import("mapbox-gl").TransitionSpecification;
60
+ "fill-extrusion-translate-anchor"?: import("mapbox-gl").PropertyValueSpecification<"map" | "viewport">;
61
+ "fill-extrusion-pattern"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<string>;
62
+ "fill-extrusion-pattern-cross-fade"?: import("mapbox-gl").PropertyValueSpecification<number>;
63
+ "fill-extrusion-height"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
64
+ "fill-extrusion-height-transition"?: import("mapbox-gl").TransitionSpecification;
65
+ "fill-extrusion-base"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
66
+ "fill-extrusion-base-transition"?: import("mapbox-gl").TransitionSpecification;
67
+ "fill-extrusion-height-alignment"?: "terrain" | "flat";
68
+ "fill-extrusion-base-alignment"?: "terrain" | "flat";
69
+ "fill-extrusion-vertical-gradient"?: import("mapbox-gl").PropertyValueSpecification<boolean>;
70
+ "fill-extrusion-ambient-occlusion-intensity"?: import("mapbox-gl").PropertyValueSpecification<number>;
71
+ "fill-extrusion-ambient-occlusion-intensity-transition"?: import("mapbox-gl").TransitionSpecification;
72
+ "fill-extrusion-ambient-occlusion-radius"?: import("mapbox-gl").PropertyValueSpecification<number>;
73
+ "fill-extrusion-ambient-occlusion-radius-transition"?: import("mapbox-gl").TransitionSpecification;
74
+ "fill-extrusion-ambient-occlusion-wall-radius"?: import("mapbox-gl").PropertyValueSpecification<number>;
75
+ "fill-extrusion-ambient-occlusion-wall-radius-transition"?: import("mapbox-gl").TransitionSpecification;
76
+ "fill-extrusion-ambient-occlusion-ground-radius"?: import("mapbox-gl").PropertyValueSpecification<number>;
77
+ "fill-extrusion-ambient-occlusion-ground-radius-transition"?: import("mapbox-gl").TransitionSpecification;
78
+ "fill-extrusion-ambient-occlusion-ground-attenuation"?: import("mapbox-gl").PropertyValueSpecification<number>;
79
+ "fill-extrusion-ambient-occlusion-ground-attenuation-transition"?: import("mapbox-gl").TransitionSpecification;
80
+ "fill-extrusion-flood-light-color"?: import("mapbox-gl").PropertyValueSpecification<string>;
81
+ "fill-extrusion-flood-light-color-transition"?: import("mapbox-gl").TransitionSpecification;
82
+ "fill-extrusion-flood-light-color-use-theme"?: import("mapbox-gl").PropertyValueSpecification<string>;
83
+ "fill-extrusion-flood-light-intensity"?: import("mapbox-gl").PropertyValueSpecification<number>;
84
+ "fill-extrusion-flood-light-intensity-transition"?: import("mapbox-gl").TransitionSpecification;
85
+ "fill-extrusion-flood-light-wall-radius"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
86
+ "fill-extrusion-flood-light-wall-radius-transition"?: import("mapbox-gl").TransitionSpecification;
87
+ "fill-extrusion-flood-light-ground-radius"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
88
+ "fill-extrusion-flood-light-ground-radius-transition"?: import("mapbox-gl").TransitionSpecification;
89
+ "fill-extrusion-flood-light-ground-attenuation"?: import("mapbox-gl").PropertyValueSpecification<number>;
90
+ "fill-extrusion-flood-light-ground-attenuation-transition"?: import("mapbox-gl").TransitionSpecification;
91
+ "fill-extrusion-vertical-scale"?: import("mapbox-gl").PropertyValueSpecification<number>;
92
+ "fill-extrusion-vertical-scale-transition"?: import("mapbox-gl").TransitionSpecification;
93
+ "fill-extrusion-rounded-roof"?: import("mapbox-gl").PropertyValueSpecification<boolean>;
94
+ "fill-extrusion-cutoff-fade-range"?: import("mapbox-gl").ExpressionSpecification;
95
+ "fill-extrusion-emissive-strength"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
96
+ "fill-extrusion-emissive-strength-transition"?: import("mapbox-gl").TransitionSpecification;
97
+ "fill-extrusion-line-width"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
98
+ "fill-extrusion-line-width-transition"?: import("mapbox-gl").TransitionSpecification;
99
+ "fill-extrusion-cast-shadows"?: boolean;
100
+ };
101
+ export declare const DEFAULT_LINE_PAINT: {
102
+ "line-opacity"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
103
+ "line-opacity-transition"?: import("mapbox-gl").TransitionSpecification;
104
+ "line-color"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<string>;
105
+ "line-color-transition"?: import("mapbox-gl").TransitionSpecification;
106
+ "line-color-use-theme"?: import("mapbox-gl").PropertyValueSpecification<string>;
107
+ "line-translate"?: import("mapbox-gl").PropertyValueSpecification<[number, number]>;
108
+ "line-translate-transition"?: import("mapbox-gl").TransitionSpecification;
109
+ "line-translate-anchor"?: import("mapbox-gl").PropertyValueSpecification<"map" | "viewport">;
110
+ "line-width"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
111
+ "line-width-transition"?: import("mapbox-gl").TransitionSpecification;
112
+ "line-gap-width"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
113
+ "line-gap-width-transition"?: import("mapbox-gl").TransitionSpecification;
114
+ "line-offset"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
115
+ "line-offset-transition"?: import("mapbox-gl").TransitionSpecification;
116
+ "line-blur"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
117
+ "line-blur-transition"?: import("mapbox-gl").TransitionSpecification;
118
+ "line-dasharray"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number[]>;
119
+ "line-pattern"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<string>;
120
+ "line-pattern-cross-fade"?: import("mapbox-gl").PropertyValueSpecification<number>;
121
+ "line-gradient"?: import("mapbox-gl").ExpressionSpecification;
122
+ "line-gradient-use-theme"?: import("mapbox-gl").PropertyValueSpecification<string>;
123
+ "line-trim-offset"?: [number, number];
124
+ "line-trim-fade-range"?: import("mapbox-gl").PropertyValueSpecification<[number, number]>;
125
+ "line-trim-color"?: import("mapbox-gl").PropertyValueSpecification<string>;
126
+ "line-trim-color-transition"?: import("mapbox-gl").TransitionSpecification;
127
+ "line-trim-color-use-theme"?: import("mapbox-gl").PropertyValueSpecification<string>;
128
+ "line-emissive-strength"?: import("mapbox-gl").PropertyValueSpecification<number>;
129
+ "line-emissive-strength-transition"?: import("mapbox-gl").TransitionSpecification;
130
+ "line-border-width"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<number>;
131
+ "line-border-width-transition"?: import("mapbox-gl").TransitionSpecification;
132
+ "line-border-color"?: import("mapbox-gl").DataDrivenPropertyValueSpecification<string>;
133
+ "line-border-color-transition"?: import("mapbox-gl").TransitionSpecification;
134
+ "line-border-color-use-theme"?: import("mapbox-gl").PropertyValueSpecification<string>;
135
+ "line-occlusion-opacity"?: import("mapbox-gl").PropertyValueSpecification<number>;
136
+ "line-occlusion-opacity-transition"?: import("mapbox-gl").TransitionSpecification;
137
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./Layer";
2
+ export * from "./types";
@@ -0,0 +1,12 @@
1
+ import { EffectCallback } from "react";
2
+ import { FeatureLayerServiceInfoDc, QueryLayerServiceInfoDc } from "@evergis/api";
3
+ import { ClientStyle, ClientStyleItem } from "../../../../core";
4
+ export interface LayerProps {
5
+ tileUrl: string;
6
+ layer?: FeatureLayerServiceInfoDc | QueryLayerServiceInfoDc;
7
+ layerType?: string;
8
+ visible?: boolean;
9
+ beforeId?: string;
10
+ getLayerTempStyle?: ((layerName: string, type: ClientStyleItem["type"]) => Pick<ClientStyleItem, "layout" | "paint"> & Pick<ClientStyle, "settings">);
11
+ onMount?: EffectCallback;
12
+ }
@@ -0,0 +1,3 @@
1
+ import { GeometryType } from "@evergis/api";
2
+ import { ClientStyleItem } from "../../../../../core";
3
+ export declare const getClientStyleItemPrefixSuffix: (geometryType: GeometryType, type: ClientStyleItem["type"]) => [string, string];
@@ -0,0 +1,2 @@
1
+ export * from "./BuildingsLayer";
2
+ export * from "./Layer";
@@ -0,0 +1,3 @@
1
+ export * from "./Map";
2
+ export * from "./components";
3
+ export * from "./types";
@@ -0,0 +1,4 @@
1
+ import { CSSProperties } from "react";
2
+ export declare const MapWrapper: import("styled-components").StyledComponent<"div", any, {
3
+ $zIndex?: CSSProperties["zIndex"];
4
+ }, never>;
@@ -0,0 +1,10 @@
1
+ import { CSSProperties, ReactNode } from "react";
2
+ import { MapProps as MapGLProps } from "react-map-gl/mapbox";
3
+ export interface MapProps extends MapGLProps {
4
+ zIndex?: CSSProperties["zIndex"];
5
+ maxPitch?: number;
6
+ lowerSiblings?: ReactNode;
7
+ upperSiblings?: ReactNode;
8
+ drawTriggerDeps?: Array<unknown>;
9
+ onError?: (error: any) => void;
10
+ }
@@ -0,0 +1,2 @@
1
+ import { MapContextProps } from "./types";
2
+ export declare const MapContext: import("react").Context<MapContextProps>;
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ import { MapProviderProps } from "./types";
3
+ export declare const MapProvider: FC<MapProviderProps>;
@@ -0,0 +1,3 @@
1
+ export * from "./MapContext";
2
+ export * from "./MapProvider";
3
+ export * from "./types";
@@ -0,0 +1,138 @@
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
+ }
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ import { ResizablePanelProps } from "./types";
3
+ export declare const ResizablePanel: FC<ResizablePanelProps>;
@@ -0,0 +1,2 @@
1
+ export * from "./ResizablePanel";
2
+ export * from "./types";
@@ -0,0 +1,11 @@
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>;
@@ -0,0 +1,14 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ import { ServerNotificationsContextProps } from "./types";
2
+ export declare const ServerNotificationsContext: import("react").Context<ServerNotificationsContextProps>;
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ import { ServerNotificationsProviderProps } from "./types";
3
+ export declare const ServerNotificationsProvider: FC<ServerNotificationsProviderProps>;
@@ -0,0 +1,3 @@
1
+ export * from "./ServerNotificationsContext";
2
+ export * from "./ServerNotificationsProvider";
3
+ export * from "./types";
@@ -0,0 +1,12 @@
1
+ import { PropsWithChildren } from "react";
2
+ import { HubConnection } from "@microsoft/signalr";
3
+ export interface ServerNotificationsContextProps {
4
+ connection?: HubConnection | null;
5
+ addSubscription?: <T>(payload?: T) => Promise<string | null>;
6
+ updateSubscription?: <T>(id: string | null, payload?: T) => Promise<void>;
7
+ unsubscribeById?: (id: string | null) => void;
8
+ }
9
+ export interface ServerNotificationsProviderProps extends PropsWithChildren {
10
+ url: string;
11
+ initialized?: boolean;
12
+ }
@@ -0,0 +1,5 @@
1
+ export * from "./ErrorBoundary";
2
+ export * from "./Map";
3
+ export * from "./MapContext";
4
+ export * from "./ResizablePanel";
5
+ export * from "./ServerNotificationsContext";
@@ -0,0 +1,2 @@
1
+ import { ExpressionSpecification } from "mapbox-gl";
2
+ export declare const findAttributeInExpression: (expression: ExpressionSpecification) => string[];
@@ -0,0 +1,2 @@
1
+ import { AnyPaint } from "mapbox-gl";
2
+ export declare const getActualExtrusionHeight: (paint: AnyPaint) => any;
@@ -0,0 +1,3 @@
1
+ export * from "./findAttributeInExpression";
2
+ export * from "./getActualExtrusionHeight";
3
+ export * from "./parseClientStyle";
@@ -0,0 +1,2 @@
1
+ import { ClientStyle } from "../types";
2
+ export declare const parseClientStyle: (style?: ClientStyle) => string[];
@@ -0,0 +1,3 @@
1
+ import { Feature } from "geojson";
2
+ import { FeaturedDcExtendedGeometry } from "../../components";
3
+ export declare const convertSpToTurfFeature: (geometry?: FeaturedDcExtendedGeometry) => Feature<any> | undefined;
@@ -0,0 +1 @@
1
+ export * from "./convertSpToTurfFeature";
@@ -0,0 +1,3 @@
1
+ import { DrawMode } from "@mapbox/mapbox-gl-draw";
2
+ import { GeometrySelectionTypes } from "../../components";
3
+ export declare const drawModeToGeometrySelectionType: (mode: DrawMode | string) => GeometrySelectionTypes;
@@ -0,0 +1,3 @@
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>;
@@ -0,0 +1,2 @@
1
+ export * from "./drawModeToGeometrySelectionType";
2
+ export * from "./getGeometrySelectionTurfFeature";
@@ -1 +1,5 @@
1
1
  export * from "./attributes";
2
+ export * from "./classification";
3
+ export * from "./feature";
4
+ export * from "./geometrySelection";
5
+ export * from "./types";
@@ -0,0 +1,2 @@
1
+ export * from "./map";
2
+ export * from "./styling";
@@ -0,0 +1,5 @@
1
+ import MapboxDraw, { DrawCustomMode } from "@mapbox/mapbox-gl-draw";
2
+ export interface ExtendedMapboxDrawModes extends MapboxDraw.Modes {
3
+ [key: string]: DrawCustomMode;
4
+ static: DrawCustomMode;
5
+ }
@@ -0,0 +1,15 @@
1
+ import { CircleLayer, FillExtrusionLayer, FillLayer, HeatmapLayer, LineLayer, SymbolLayer } from "mapbox-gl";
2
+ export interface ClientStyleFillSettings {
3
+ showBottomSurface?: boolean;
4
+ }
5
+ export interface ClientStyleSettings {
6
+ fill: ClientStyleFillSettings;
7
+ }
8
+ export declare type ClientStyleLayer = CircleLayer | LineLayer | FillLayer | FillExtrusionLayer | SymbolLayer | HeatmapLayer;
9
+ export declare type ClientStyleItem = Omit<ClientStyleLayer, "id" | "source">;
10
+ export interface ClientStyle {
11
+ settings?: ClientStyleSettings;
12
+ items: ClientStyleItem[];
13
+ minzoom?: number;
14
+ maxzoom?: number;
15
+ }
@@ -1 +1,4 @@
1
+ export * from "./map";
2
+ export * from "./serverNotifications";
3
+ export * from "./useResizer";
1
4
  export * from "./useToggle";
@@ -0,0 +1,22 @@
1
+ export * from "./useCurrentSelectedFeature";
2
+ export * from "./useEditingFeature";
3
+ export * from "./useEwktGeometry";
4
+ export * from "./useGeometryEditor";
5
+ export * from "./useGeometrySelection";
6
+ export * from "./useGeometrySelectionBuffer";
7
+ export * from "./useMapContext";
8
+ export * from "./useMapDraw";
9
+ export * from "./useRedrawLayer";
10
+ export * from "./useSelectedFeatures";
11
+ export * from "./useSelectFeaturesCount";
12
+ export * from "./useSelectFeaturesCurrentIndex";
13
+ export * from "./useSelectFeaturesGeometryMasking";
14
+ export * from "./useSelectFeaturesInitialized";
15
+ export * from "./useSelectFeaturesLayerName";
16
+ export * from "./useSelectFeaturesPagination";
17
+ export * from "./useSelectFeaturesStatisticsActive";
18
+ export * from "./useSelectFeaturesTotalCounts";
19
+ export * from "./useUpdateCurrentFeature";
20
+ export * from "./useZoomToFeatures";
21
+ export * from "./useZoomToLayer";
22
+ export * from "./useZoomToPoint";
@@ -0,0 +1,2 @@
1
+ import { SelectedFeature } from "../../components/MapContext";
2
+ export declare const useCurrentSelectedFeature: () => SelectedFeature;
@@ -0,0 +1 @@
1
+ export declare const useEditingFeature: () => boolean;
@@ -0,0 +1 @@
1
+ export declare const useEwktGeometry: () => string;
@@ -0,0 +1,2 @@
1
+ import { GeometryEditor } from "../../components";
2
+ export declare const useGeometryEditor: () => [GeometryEditor, (state: Partial<GeometryEditor>) => void];
@@ -0,0 +1,2 @@
1
+ import { GeometrySelection } from "../../components";
2
+ export declare const useGeometrySelection: () => [GeometrySelection, (state: Partial<GeometrySelection>) => void];
@@ -0,0 +1 @@
1
+ export declare const useGeometrySelectionBuffer: () => string | undefined;
@@ -0,0 +1 @@
1
+ export declare const useMapContext: () => import("../../components").MapContextProps;
@@ -0,0 +1,2 @@
1
+ import { ExtendedMapboxDrawModes } from "../../../core";
2
+ export declare const customModes: ExtendedMapboxDrawModes;