@evergis/react 3.1.3 → 3.1.4

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 (78) hide show
  1. package/dist/components/{Map/components/Layer → Layer}/index.d.ts +1 -0
  2. package/dist/components/{Map/components/Layer → Layer}/types.d.ts +1 -1
  3. package/dist/components/{Map/components/Layer → Layer}/utils/getClientStyleItemPrefixSuffix.d.ts +1 -1
  4. package/dist/components/Map/index.d.ts +0 -1
  5. package/dist/components/index.d.ts +1 -3
  6. package/dist/contexts/MapContext/types.d.ts +31 -0
  7. package/dist/contexts/index.d.ts +2 -0
  8. package/dist/core/classification/parseClientStyle.d.ts +1 -1
  9. package/dist/core/feature/convertSpToTurfFeature.d.ts +2 -2
  10. package/dist/core/index.d.ts +0 -3
  11. package/dist/hooks/index.d.ts +2 -1
  12. package/dist/hooks/map/index.d.ts +1 -18
  13. package/dist/hooks/map/useMapContext.d.ts +1 -1
  14. package/dist/hooks/map/useMapDraw/customModes.d.ts +6 -1
  15. package/dist/hooks/map/useZoomToFeatures.d.ts +2 -2
  16. package/dist/hooks/serverNotifications/index.d.ts +0 -1
  17. package/dist/hooks/serverNotifications/useServerNotificationsContext.d.ts +1 -1
  18. package/dist/hooks/useDebouncedCallback.d.ts +1 -0
  19. package/dist/hooks/useWindowResize.d.ts +1 -0
  20. package/dist/index.d.ts +2 -0
  21. package/dist/react.cjs.development.js +517 -1253
  22. package/dist/react.cjs.development.js.map +1 -1
  23. package/dist/react.cjs.production.min.js +1 -1
  24. package/dist/react.cjs.production.min.js.map +1 -1
  25. package/dist/react.esm.js +514 -1246
  26. package/dist/react.esm.js.map +1 -1
  27. package/dist/types/index.d.ts +2 -0
  28. package/dist/utils/debounce.d.ts +1 -0
  29. package/dist/utils/index.d.ts +1 -1
  30. package/package.json +3 -3
  31. package/dist/components/Map/components/BuildingsLayer/BuildingsLayer.d.ts +0 -3
  32. package/dist/components/Map/components/BuildingsLayer/index.d.ts +0 -2
  33. package/dist/components/Map/components/BuildingsLayer/types.d.ts +0 -4
  34. package/dist/components/Map/components/index.d.ts +0 -2
  35. package/dist/components/MapContext/types.d.ts +0 -138
  36. package/dist/components/ResizablePanel/ResizablePanel.d.ts +0 -3
  37. package/dist/components/ResizablePanel/index.d.ts +0 -2
  38. package/dist/components/ResizablePanel/styled.d.ts +0 -11
  39. package/dist/components/ResizablePanel/types.d.ts +0 -14
  40. package/dist/core/attributes/index.d.ts +0 -1
  41. package/dist/core/geometrySelection/drawModeToGeometrySelectionType.d.ts +0 -3
  42. package/dist/core/geometrySelection/getGeometrySelectionTurfFeature.d.ts +0 -3
  43. package/dist/core/geometrySelection/index.d.ts +0 -2
  44. package/dist/core/types/index.d.ts +0 -2
  45. package/dist/core/types/map.d.ts +0 -5
  46. package/dist/hooks/map/useCurrentSelectedFeature.d.ts +0 -2
  47. package/dist/hooks/map/useEditingFeature.d.ts +0 -1
  48. package/dist/hooks/map/useEwktGeometry.d.ts +0 -1
  49. package/dist/hooks/map/useGeometryEditor.d.ts +0 -2
  50. package/dist/hooks/map/useGeometrySelection.d.ts +0 -2
  51. package/dist/hooks/map/useGeometrySelectionBuffer.d.ts +0 -1
  52. package/dist/hooks/map/useSelectFeaturesCount.d.ts +0 -1
  53. package/dist/hooks/map/useSelectFeaturesCurrentIndex.d.ts +0 -1
  54. package/dist/hooks/map/useSelectFeaturesGeometryMasking.d.ts +0 -1
  55. package/dist/hooks/map/useSelectFeaturesInitialized.d.ts +0 -1
  56. package/dist/hooks/map/useSelectFeaturesLayerName.d.ts +0 -1
  57. package/dist/hooks/map/useSelectFeaturesPagination.d.ts +0 -4
  58. package/dist/hooks/map/useSelectFeaturesStatisticsActive.d.ts +0 -1
  59. package/dist/hooks/map/useSelectFeaturesTotalCounts.d.ts +0 -1
  60. package/dist/hooks/map/useSelectedFeatures.d.ts +0 -2
  61. package/dist/hooks/map/useUpdateCurrentFeature.d.ts +0 -2
  62. package/dist/hooks/map/useZoomToLayer.d.ts +0 -7
  63. package/dist/hooks/useResizer.d.ts +0 -28
  64. package/dist/utils/geometryToWkt.d.ts +0 -2
  65. /package/dist/components/{Map/components/Layer → Layer}/Layer.d.ts +0 -0
  66. /package/dist/components/{Map/components/Layer → Layer}/RasterLayer.d.ts +0 -0
  67. /package/dist/components/{Map/components/Layer → Layer}/VectorLayer.d.ts +0 -0
  68. /package/dist/components/{Map/components/Layer → Layer}/constants.d.ts +0 -0
  69. /package/dist/{components → contexts}/MapContext/MapContext.d.ts +0 -0
  70. /package/dist/{components → contexts}/MapContext/MapProvider.d.ts +0 -0
  71. /package/dist/{components → contexts}/MapContext/index.d.ts +0 -0
  72. /package/dist/{components → contexts}/ServerNotificationsContext/ServerNotificationsContext.d.ts +0 -0
  73. /package/dist/{components → contexts}/ServerNotificationsContext/ServerNotificationsProvider.d.ts +0 -0
  74. /package/dist/{hooks/serverNotifications → contexts/ServerNotificationsContext/hooks}/useServerNotifications.d.ts +0 -0
  75. /package/dist/{components → contexts}/ServerNotificationsContext/index.d.ts +0 -0
  76. /package/dist/{components → contexts}/ServerNotificationsContext/types.d.ts +0 -0
  77. /package/dist/{core/attributes/types.d.ts → types/attribute.d.ts} +0 -0
  78. /package/dist/{core/types → types}/styling.d.ts +0 -0
@@ -1,2 +1,3 @@
1
+ export * from "./constants";
1
2
  export * from "./Layer";
2
3
  export * from "./types";
@@ -1,6 +1,6 @@
1
1
  import { EffectCallback } from "react";
2
2
  import { FeatureLayerServiceInfoDc, QueryLayerServiceInfoDc } from "@evergis/api";
3
- import { ClientStyle, ClientStyleItem } from "../../../../core";
3
+ import { ClientStyle, ClientStyleItem } from "../../types";
4
4
  export interface LayerProps {
5
5
  tileUrl: string;
6
6
  layer?: FeatureLayerServiceInfoDc | QueryLayerServiceInfoDc;
@@ -1,3 +1,3 @@
1
1
  import { GeometryType } from "@evergis/api";
2
- import { ClientStyleItem } from "../../../../../core";
2
+ import { ClientStyleItem } from "../../../types";
3
3
  export declare const getClientStyleItemPrefixSuffix: (geometryType: GeometryType, type: ClientStyleItem["type"]) => [string, string];
@@ -1,3 +1,2 @@
1
1
  export * from "./Map";
2
- export * from "./components";
3
2
  export * from "./types";
@@ -1,5 +1,3 @@
1
1
  export * from "./ErrorBoundary";
2
+ export * from "./Layer";
2
3
  export * from "./Map";
3
- export * from "./MapContext";
4
- export * from "./ResizablePanel";
5
- export * from "./ServerNotificationsContext";
@@ -0,0 +1,31 @@
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
+ export declare enum BaseMapTheme {
5
+ Light = "light",
6
+ Dark = "dark"
7
+ }
8
+ export interface BaseMapItem {
9
+ name: string;
10
+ source: string;
11
+ preview?: string;
12
+ imgSrc?: string;
13
+ title: string;
14
+ theme?: BaseMapTheme;
15
+ opacity?: number;
16
+ color?: string;
17
+ }
18
+ export interface MapContextProps {
19
+ map?: MutableRefObject<MapboxGLMap>;
20
+ draw?: MutableRefObject<Omit<MapboxDraw, "getDefaultPosition">>;
21
+ loaded?: boolean;
22
+ setLoaded?: Dispatch<SetStateAction<boolean>>;
23
+ basemapItems?: BaseMapItem[];
24
+ basemapName?: string;
25
+ setBasemapName?: Dispatch<SetStateAction<string>>;
26
+ defaultBasemap?: string;
27
+ }
28
+ export interface MapProviderProps extends PropsWithChildren {
29
+ basemapItems: BaseMapItem[];
30
+ defaultBasemap: string;
31
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./MapContext";
2
+ export * from "./ServerNotificationsContext";
@@ -1,2 +1,2 @@
1
- import { ClientStyle } from "../types";
1
+ import { ClientStyle } from "../../types";
2
2
  export declare const parseClientStyle: (style?: ClientStyle) => string[];
@@ -1,3 +1,3 @@
1
+ import { FeatureDc } from "@evergis/api";
1
2
  import { Feature } from "geojson";
2
- import { FeaturedDcExtendedGeometry } from "../../components";
3
- export declare const convertSpToTurfFeature: (geometry?: FeaturedDcExtendedGeometry) => Feature<any> | undefined;
3
+ export declare const convertSpToTurfFeature: (geometry?: FeatureDc["geometry"]) => Feature<any> | undefined;
@@ -1,5 +1,2 @@
1
- export * from "./attributes";
2
1
  export * from "./classification";
3
2
  export * from "./feature";
4
- export * from "./geometrySelection";
5
- export * from "./types";
@@ -1,4 +1,5 @@
1
1
  export * from "./map";
2
2
  export * from "./serverNotifications";
3
- export * from "./useResizer";
3
+ export * from "./useDebouncedCallback";
4
4
  export * from "./useToggle";
5
+ export * from "./useWindowResize";
@@ -1,22 +1,5 @@
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
1
  export * from "./useMapDraw";
2
+ export * from "./useMapContext";
9
3
  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
4
  export * from "./useZoomToFeatures";
21
- export * from "./useZoomToLayer";
22
5
  export * from "./useZoomToPoint";
@@ -1 +1 @@
1
- export declare const useMapContext: () => import("../../components").MapContextProps;
1
+ export declare const useMapContext: () => import("../../contexts").MapContextProps;
@@ -1,2 +1,7 @@
1
- import { ExtendedMapboxDrawModes } from "../../../core";
1
+ import MapboxDraw, { DrawCustomMode } from "@mapbox/mapbox-gl-draw";
2
+ interface ExtendedMapboxDrawModes extends MapboxDraw.Modes {
3
+ [key: string]: DrawCustomMode;
4
+ static: DrawCustomMode;
5
+ }
2
6
  export declare const customModes: ExtendedMapboxDrawModes;
7
+ export {};
@@ -1,2 +1,2 @@
1
- import { FeatureDcExtended } from "../../components";
2
- export declare const useZoomToFeatures: () => (features?: FeatureDcExtended[], padding?: number) => void;
1
+ import { FeatureDc } from "@evergis/api";
2
+ export declare const useZoomToFeatures: () => (features?: FeatureDc[], padding?: number) => void;
@@ -1,2 +1 @@
1
- export * from "./useServerNotifications";
2
1
  export * from "./useServerNotificationsContext";
@@ -1 +1 @@
1
- export declare const useServerNotificationsContext: () => import("../../components").ServerNotificationsContextProps;
1
+ export declare const useServerNotificationsContext: () => import("../../contexts").ServerNotificationsContextProps;
@@ -0,0 +1 @@
1
+ export declare const useDebouncedCallback: <CallbackFn extends () => void>(interval: number) => (cb: CallbackFn) => void;
@@ -0,0 +1 @@
1
+ export declare const useWindowResize: (callback?: (...args: any) => any, delay?: number) => void;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export * from "./components";
2
+ export * from "./contexts";
2
3
  export * from "./core";
3
4
  export * from "./hooks";
5
+ export * from "./types";
4
6
  export * from "./utils";