@evergis/react 3.1.7 → 3.1.8

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/README.md +2 -0
  2. package/dist/components/Layer/Layer.d.ts +1 -1
  3. package/dist/components/Layer/RasterLayer.d.ts +1 -1
  4. package/dist/components/Layer/VectorLayer.d.ts +1 -1
  5. package/dist/components/Layer/types.d.ts +1 -1
  6. package/dist/components/Map/Map.d.ts +1 -1
  7. package/dist/components/Map/styled.d.ts +1 -1
  8. package/dist/components/Map/types.d.ts +1 -1
  9. package/dist/components/index.d.ts +0 -1
  10. package/dist/contexts/MapContext/MapContext.d.ts +1 -1
  11. package/dist/contexts/MapContext/MapProvider.d.ts +1 -1
  12. package/dist/contexts/MapContext/types.d.ts +1 -1
  13. package/dist/contexts/ServerNotificationsContext/ServerNotificationsContext.d.ts +1 -1
  14. package/dist/contexts/ServerNotificationsContext/ServerNotificationsProvider.d.ts +1 -1
  15. package/dist/contexts/ServerNotificationsContext/types.d.ts +1 -1
  16. package/dist/index.js +71 -7353
  17. package/dist/index.js.map +1 -1
  18. package/dist/react.esm.js +41 -7322
  19. package/dist/react.esm.js.map +1 -1
  20. package/dist/types/attribute.d.ts +1 -1
  21. package/package.json +24 -23
  22. package/dist/assets/index-CTzhzVha.css +0 -90
  23. package/dist/assets/react.esm-CTzhzVha.css +0 -90
  24. package/dist/components/ErrorBoundary/index.d.ts +0 -12
  25. package/dist/components/ErrorBoundary/types.d.ts +0 -7
  26. package/dist/dist/react.esm.d.ts +0 -99
  27. package/dist/src/components/ErrorBoundary/index.d.ts +0 -12
  28. package/dist/src/components/ErrorBoundary/types.d.ts +0 -7
  29. package/dist/src/components/Layer/Layer.d.ts +0 -3
  30. package/dist/src/components/Layer/RasterLayer.d.ts +0 -3
  31. package/dist/src/components/Layer/VectorLayer.d.ts +0 -3
  32. package/dist/src/components/Layer/constants.d.ts +0 -5
  33. package/dist/src/components/Layer/index.d.ts +0 -3
  34. package/dist/src/components/Layer/types.d.ts +0 -12
  35. package/dist/src/components/Layer/utils/getClientStyleItemPrefixSuffix.d.ts +0 -3
  36. package/dist/src/components/Map/Map.d.ts +0 -3
  37. package/dist/src/components/Map/index.d.ts +0 -2
  38. package/dist/src/components/Map/styled.d.ts +0 -4
  39. package/dist/src/components/Map/types.d.ts +0 -8
  40. package/dist/src/components/index.d.ts +0 -3
  41. package/dist/src/contexts/MapContext/MapContext.d.ts +0 -2
  42. package/dist/src/contexts/MapContext/MapProvider.d.ts +0 -3
  43. package/dist/src/contexts/MapContext/index.d.ts +0 -3
  44. package/dist/src/contexts/MapContext/types.d.ts +0 -31
  45. package/dist/src/contexts/ServerNotificationsContext/ServerNotificationsContext.d.ts +0 -2
  46. package/dist/src/contexts/ServerNotificationsContext/ServerNotificationsProvider.d.ts +0 -3
  47. package/dist/src/contexts/ServerNotificationsContext/hooks/useServerNotifications.d.ts +0 -2
  48. package/dist/src/contexts/ServerNotificationsContext/index.d.ts +0 -3
  49. package/dist/src/contexts/ServerNotificationsContext/types.d.ts +0 -12
  50. package/dist/src/contexts/index.d.ts +0 -2
  51. package/dist/src/core/classification/findAttributeInExpression.d.ts +0 -2
  52. package/dist/src/core/classification/getActualExtrusionHeight.d.ts +0 -2
  53. package/dist/src/core/classification/index.d.ts +0 -3
  54. package/dist/src/core/classification/parseClientStyle.d.ts +0 -2
  55. package/dist/src/core/feature/convertSpToTurfFeature.d.ts +0 -3
  56. package/dist/src/core/feature/index.d.ts +0 -1
  57. package/dist/src/core/index.d.ts +0 -2
  58. package/dist/src/hooks/index.d.ts +0 -5
  59. package/dist/src/hooks/map/index.d.ts +0 -5
  60. package/dist/src/hooks/map/useMapContext.d.ts +0 -1
  61. package/dist/src/hooks/map/useMapDraw/customModes.d.ts +0 -7
  62. package/dist/src/hooks/map/useMapDraw/customStyles.d.ts +0 -58
  63. package/dist/src/hooks/map/useMapDraw/index.d.ts +0 -1
  64. package/dist/src/hooks/map/useRedrawLayer.d.ts +0 -1
  65. package/dist/src/hooks/map/useZoomToFeatures.d.ts +0 -2
  66. package/dist/src/hooks/map/useZoomToPoint.d.ts +0 -1
  67. package/dist/src/hooks/serverNotifications/index.d.ts +0 -1
  68. package/dist/src/hooks/serverNotifications/useServerNotificationsContext.d.ts +0 -1
  69. package/dist/src/hooks/useDebouncedCallback.d.ts +0 -1
  70. package/dist/src/hooks/useToggle.d.ts +0 -1
  71. package/dist/src/hooks/useWindowResize.d.ts +0 -1
  72. package/dist/src/index.d.ts +0 -6
  73. package/dist/src/types/attribute.d.ts +0 -20
  74. package/dist/src/types/index.d.ts +0 -2
  75. package/dist/src/types/styling.d.ts +0 -15
  76. package/dist/src/utils/date.d.ts +0 -16
  77. package/dist/src/utils/debounce.d.ts +0 -1
  78. package/dist/src/utils/index.d.ts +0 -4
  79. package/dist/src/utils/isNumeric.d.ts +0 -1
  80. package/dist/src/utils/isObject.d.ts +0 -1
@@ -1,12 +0,0 @@
1
- import { EffectCallback } from '../../../node_modules/@types/react';
2
- import { FeatureLayerServiceInfoDc, QueryLayerServiceInfoDc } from '@evergis/api';
3
- import { ClientStyle, ClientStyleItem } from '../../types';
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
- }
@@ -1,3 +0,0 @@
1
- import { GeometryType } from '@evergis/api';
2
- import { ClientStyleItem } from '../../../types';
3
- export declare const getClientStyleItemPrefixSuffix: (geometryType: GeometryType, type: ClientStyleItem["type"]) => [string, string];
@@ -1,3 +0,0 @@
1
- import { FC } from '../../../node_modules/@types/react';
2
- import { MapProps } from './types';
3
- export declare const Map: FC<MapProps>;
@@ -1,2 +0,0 @@
1
- export * from './Map';
2
- export * from './types';
@@ -1,4 +0,0 @@
1
- import { CSSProperties } from '../../../node_modules/@types/react';
2
- export declare const MapWrapper: import('styled-components').StyledComponent<"div", any, {
3
- $zIndex?: CSSProperties["zIndex"];
4
- }, never>;
@@ -1,8 +0,0 @@
1
- import { CSSProperties, ReactNode } from '../../../node_modules/@types/react';
2
- import { MapProps as MapGLProps } from 'react-map-gl/mapbox';
3
- export interface MapProps extends MapGLProps {
4
- zIndex?: CSSProperties["zIndex"];
5
- lowerSiblings?: ReactNode;
6
- upperSiblings?: ReactNode;
7
- onError?: (error: any) => void;
8
- }
@@ -1,3 +0,0 @@
1
- export * from './ErrorBoundary';
2
- export * from './Layer';
3
- export * from './Map';
@@ -1,2 +0,0 @@
1
- import { MapContextProps } from './types';
2
- export declare const MapContext: import('../../../node_modules/@types/react').Context<MapContextProps>;
@@ -1,3 +0,0 @@
1
- import { FC } from '../../../node_modules/@types/react';
2
- import { MapProviderProps } from './types';
3
- export declare const MapProvider: FC<MapProviderProps>;
@@ -1,3 +0,0 @@
1
- export * from './MapContext';
2
- export * from './MapProvider';
3
- export * from './types';
@@ -1,31 +0,0 @@
1
- import { Dispatch, MutableRefObject, PropsWithChildren, SetStateAction } from '../../../node_modules/@types/react';
2
- import { Map as MapboxGLMap } from 'mapbox-gl';
3
- import { default as 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
- }
@@ -1,2 +0,0 @@
1
- import { ServerNotificationsContextProps } from './types';
2
- export declare const ServerNotificationsContext: import('../../../node_modules/@types/react').Context<ServerNotificationsContextProps>;
@@ -1,3 +0,0 @@
1
- import { FC } from '../../../node_modules/@types/react';
2
- import { ServerNotificationsProviderProps } from './types';
3
- export declare const ServerNotificationsProvider: FC<ServerNotificationsProviderProps>;
@@ -1,2 +0,0 @@
1
- import { HubConnection } from '@microsoft/signalr';
2
- export declare const useServerNotifications: (url: string, initialized: boolean) => HubConnection | null;
@@ -1,3 +0,0 @@
1
- export * from './ServerNotificationsContext';
2
- export * from './ServerNotificationsProvider';
3
- export * from './types';
@@ -1,12 +0,0 @@
1
- import { PropsWithChildren } from '../../../node_modules/@types/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
- }
@@ -1,2 +0,0 @@
1
- export * from './MapContext';
2
- export * from './ServerNotificationsContext';
@@ -1,2 +0,0 @@
1
- import { ExpressionSpecification } from 'mapbox-gl';
2
- export declare const findAttributeInExpression: (expression: ExpressionSpecification) => string[];
@@ -1,2 +0,0 @@
1
- import { AnyPaint } from 'mapbox-gl';
2
- export declare const getActualExtrusionHeight: (paint: AnyPaint) => any;
@@ -1,3 +0,0 @@
1
- export * from './findAttributeInExpression';
2
- export * from './getActualExtrusionHeight';
3
- export * from './parseClientStyle';
@@ -1,2 +0,0 @@
1
- import { ClientStyle } from '../../types';
2
- export declare const parseClientStyle: (style?: ClientStyle) => string[];
@@ -1,3 +0,0 @@
1
- import { FeatureDc } from '@evergis/api';
2
- import { Feature } from 'geojson';
3
- export declare const convertSpToTurfFeature: (geometry?: FeatureDc["geometry"]) => Feature<any> | undefined;
@@ -1 +0,0 @@
1
- export * from './convertSpToTurfFeature';
@@ -1,2 +0,0 @@
1
- export * from './classification';
2
- export * from './feature';
@@ -1,5 +0,0 @@
1
- export * from './map';
2
- export * from './serverNotifications';
3
- export * from './useDebouncedCallback';
4
- export * from './useToggle';
5
- export * from './useWindowResize';
@@ -1,5 +0,0 @@
1
- export * from './useMapDraw';
2
- export * from './useMapContext';
3
- export * from './useRedrawLayer';
4
- export * from './useZoomToFeatures';
5
- export * from './useZoomToPoint';
@@ -1 +0,0 @@
1
- export declare const useMapContext: () => import('../../contexts').MapContextProps;
@@ -1,7 +0,0 @@
1
- import { default as MapboxDraw, DrawCustomMode } from '@mapbox/mapbox-gl-draw';
2
- interface ExtendedMapboxDrawModes extends MapboxDraw.Modes {
3
- [key: string]: DrawCustomMode;
4
- static: DrawCustomMode;
5
- }
6
- export declare const customModes: ExtendedMapboxDrawModes;
7
- export {};
@@ -1,58 +0,0 @@
1
- export declare const customStyles: ({
2
- id: string;
3
- type: string;
4
- filter: (string | string[])[];
5
- paint: {
6
- "circle-radius": number;
7
- "circle-color": string;
8
- "circle-stroke-color": string;
9
- "circle-stroke-width": number;
10
- "circle-stroke-opacity": number;
11
- "fill-color"?: undefined;
12
- "fill-outline-color"?: undefined;
13
- "fill-opacity"?: undefined;
14
- "line-color"?: undefined;
15
- "line-dasharray"?: undefined;
16
- "line-width"?: undefined;
17
- };
18
- layout?: undefined;
19
- } | {
20
- id: string;
21
- type: string;
22
- filter: (string | string[])[];
23
- paint: {
24
- "fill-color": string;
25
- "fill-outline-color": string;
26
- "fill-opacity": number;
27
- "circle-radius"?: undefined;
28
- "circle-color"?: undefined;
29
- "circle-stroke-color"?: undefined;
30
- "circle-stroke-width"?: undefined;
31
- "circle-stroke-opacity"?: undefined;
32
- "line-color"?: undefined;
33
- "line-dasharray"?: undefined;
34
- "line-width"?: undefined;
35
- };
36
- layout?: undefined;
37
- } | {
38
- id: string;
39
- type: string;
40
- filter: (string | string[])[];
41
- layout: {
42
- "line-cap": string;
43
- "line-join": string;
44
- };
45
- paint: {
46
- "line-color": string;
47
- "line-dasharray": number[];
48
- "line-width": number;
49
- "circle-radius"?: undefined;
50
- "circle-color"?: undefined;
51
- "circle-stroke-color"?: undefined;
52
- "circle-stroke-width"?: undefined;
53
- "circle-stroke-opacity"?: undefined;
54
- "fill-color"?: undefined;
55
- "fill-outline-color"?: undefined;
56
- "fill-opacity"?: undefined;
57
- };
58
- })[];
@@ -1 +0,0 @@
1
- export declare const useMapDraw: (triggerDeps?: Array<unknown>) => void;
@@ -1 +0,0 @@
1
- export declare const useRedrawLayer: () => (layerName: string) => void;
@@ -1,2 +0,0 @@
1
- import { FeatureDc } from '@evergis/api';
2
- export declare const useZoomToFeatures: () => (features?: FeatureDc[], padding?: number) => void;
@@ -1 +0,0 @@
1
- export declare const useZoomToPoint: () => (options: any, callback?: VoidFunction) => void;
@@ -1 +0,0 @@
1
- export * from './useServerNotificationsContext';
@@ -1 +0,0 @@
1
- export declare const useServerNotificationsContext: () => import('../../contexts').ServerNotificationsContextProps;
@@ -1 +0,0 @@
1
- export declare const useDebouncedCallback: <CallbackFn extends () => void>(interval: number) => ((cb: CallbackFn) => void);
@@ -1 +0,0 @@
1
- export declare const useToggle: (initial?: boolean) => [boolean, VoidFunction, (value: boolean) => void];
@@ -1 +0,0 @@
1
- export declare const useWindowResize: (callback?: (...args: any) => any, delay?: number) => void;
@@ -1,6 +0,0 @@
1
- export * from './components';
2
- export * from './contexts';
3
- export * from './core';
4
- export * from './hooks';
5
- export * from './types';
6
- export * from './utils';
@@ -1,20 +0,0 @@
1
- import { ReactNode } from '../../node_modules/@types/react';
2
- import { AttributeDefinitionDc } from '@evergis/api';
3
- export type FeatureAttributeValue = string | number | Date | null;
4
- export type LayerAttribute = {
5
- name?: string;
6
- } & AttributeDefinitionDc;
7
- export type FeatureAttribute = {
8
- value?: FeatureAttributeValue;
9
- render?: ReactNode;
10
- } & LayerAttribute;
11
- export declare const enum AttributeValueType {
12
- String = 0,
13
- Phone = 1,
14
- Url = 2,
15
- Mail = 3
16
- }
17
- export type AttributeValue = {
18
- value: string;
19
- type: AttributeValueType;
20
- };
@@ -1,2 +0,0 @@
1
- export * from './attribute';
2
- export * from './styling';
@@ -1,15 +0,0 @@
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 type ClientStyleLayer = CircleLayer | LineLayer | FillLayer | FillExtrusionLayer | SymbolLayer | HeatmapLayer;
9
- export type ClientStyleItem = Omit<ClientStyleLayer, "id" | "source">;
10
- export interface ClientStyle {
11
- settings?: ClientStyleSettings;
12
- items: ClientStyleItem[];
13
- minzoom?: number;
14
- maxzoom?: number;
15
- }
@@ -1,16 +0,0 @@
1
- export declare const NO_CONTENT_VALUE = "\u2014";
2
- export type DateType = number | Date;
3
- export type RawDateType = string | DateType;
4
- export declare enum DateFormat {
5
- ClientDefaultFormat = "dd.MM.yyyy HH:mm",
6
- DateTime = "dd.MM.yyyy HH:mm:ss",
7
- UTC = "yyyy-MM-dd'T'HH:mm:ss.sssxxx",
8
- AxisTooltip = "d MMMM yyyy"
9
- }
10
- interface FormatDateOptions {
11
- dateFormat?: DateFormat;
12
- defaultValue?: RawDateType;
13
- }
14
- export declare const getDate: (rawDate?: RawDateType | null) => Date | null;
15
- export declare const formatDate: (date?: RawDateType, { dateFormat, defaultValue }?: FormatDateOptions) => string;
16
- export {};
@@ -1 +0,0 @@
1
- export declare const debounce: (callback: any, delay: number) => ((...args: any) => void);
@@ -1,4 +0,0 @@
1
- export * from './date';
2
- export * from './debounce';
3
- export * from './isNumeric';
4
- export * from './isObject';
@@ -1 +0,0 @@
1
- export declare const isNumeric: (number: string | number) => boolean;
@@ -1 +0,0 @@
1
- export declare function isObject<T>(value: T | object): value is object;