@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.
- package/README.md +2 -0
- package/dist/components/Layer/Layer.d.ts +1 -1
- package/dist/components/Layer/RasterLayer.d.ts +1 -1
- package/dist/components/Layer/VectorLayer.d.ts +1 -1
- package/dist/components/Layer/types.d.ts +1 -1
- package/dist/components/Map/Map.d.ts +1 -1
- package/dist/components/Map/styled.d.ts +1 -1
- package/dist/components/Map/types.d.ts +1 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/contexts/MapContext/MapContext.d.ts +1 -1
- package/dist/contexts/MapContext/MapProvider.d.ts +1 -1
- package/dist/contexts/MapContext/types.d.ts +1 -1
- package/dist/contexts/ServerNotificationsContext/ServerNotificationsContext.d.ts +1 -1
- package/dist/contexts/ServerNotificationsContext/ServerNotificationsProvider.d.ts +1 -1
- package/dist/contexts/ServerNotificationsContext/types.d.ts +1 -1
- package/dist/index.js +71 -7353
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +41 -7322
- package/dist/react.esm.js.map +1 -1
- package/dist/types/attribute.d.ts +1 -1
- package/package.json +24 -23
- package/dist/assets/index-CTzhzVha.css +0 -90
- package/dist/assets/react.esm-CTzhzVha.css +0 -90
- package/dist/components/ErrorBoundary/index.d.ts +0 -12
- package/dist/components/ErrorBoundary/types.d.ts +0 -7
- package/dist/dist/react.esm.d.ts +0 -99
- package/dist/src/components/ErrorBoundary/index.d.ts +0 -12
- package/dist/src/components/ErrorBoundary/types.d.ts +0 -7
- package/dist/src/components/Layer/Layer.d.ts +0 -3
- package/dist/src/components/Layer/RasterLayer.d.ts +0 -3
- package/dist/src/components/Layer/VectorLayer.d.ts +0 -3
- package/dist/src/components/Layer/constants.d.ts +0 -5
- package/dist/src/components/Layer/index.d.ts +0 -3
- package/dist/src/components/Layer/types.d.ts +0 -12
- package/dist/src/components/Layer/utils/getClientStyleItemPrefixSuffix.d.ts +0 -3
- package/dist/src/components/Map/Map.d.ts +0 -3
- package/dist/src/components/Map/index.d.ts +0 -2
- package/dist/src/components/Map/styled.d.ts +0 -4
- package/dist/src/components/Map/types.d.ts +0 -8
- package/dist/src/components/index.d.ts +0 -3
- package/dist/src/contexts/MapContext/MapContext.d.ts +0 -2
- package/dist/src/contexts/MapContext/MapProvider.d.ts +0 -3
- package/dist/src/contexts/MapContext/index.d.ts +0 -3
- package/dist/src/contexts/MapContext/types.d.ts +0 -31
- package/dist/src/contexts/ServerNotificationsContext/ServerNotificationsContext.d.ts +0 -2
- package/dist/src/contexts/ServerNotificationsContext/ServerNotificationsProvider.d.ts +0 -3
- package/dist/src/contexts/ServerNotificationsContext/hooks/useServerNotifications.d.ts +0 -2
- package/dist/src/contexts/ServerNotificationsContext/index.d.ts +0 -3
- package/dist/src/contexts/ServerNotificationsContext/types.d.ts +0 -12
- package/dist/src/contexts/index.d.ts +0 -2
- package/dist/src/core/classification/findAttributeInExpression.d.ts +0 -2
- package/dist/src/core/classification/getActualExtrusionHeight.d.ts +0 -2
- package/dist/src/core/classification/index.d.ts +0 -3
- package/dist/src/core/classification/parseClientStyle.d.ts +0 -2
- package/dist/src/core/feature/convertSpToTurfFeature.d.ts +0 -3
- package/dist/src/core/feature/index.d.ts +0 -1
- package/dist/src/core/index.d.ts +0 -2
- package/dist/src/hooks/index.d.ts +0 -5
- package/dist/src/hooks/map/index.d.ts +0 -5
- package/dist/src/hooks/map/useMapContext.d.ts +0 -1
- package/dist/src/hooks/map/useMapDraw/customModes.d.ts +0 -7
- package/dist/src/hooks/map/useMapDraw/customStyles.d.ts +0 -58
- package/dist/src/hooks/map/useMapDraw/index.d.ts +0 -1
- package/dist/src/hooks/map/useRedrawLayer.d.ts +0 -1
- package/dist/src/hooks/map/useZoomToFeatures.d.ts +0 -2
- package/dist/src/hooks/map/useZoomToPoint.d.ts +0 -1
- package/dist/src/hooks/serverNotifications/index.d.ts +0 -1
- package/dist/src/hooks/serverNotifications/useServerNotificationsContext.d.ts +0 -1
- package/dist/src/hooks/useDebouncedCallback.d.ts +0 -1
- package/dist/src/hooks/useToggle.d.ts +0 -1
- package/dist/src/hooks/useWindowResize.d.ts +0 -1
- package/dist/src/index.d.ts +0 -6
- package/dist/src/types/attribute.d.ts +0 -20
- package/dist/src/types/index.d.ts +0 -2
- package/dist/src/types/styling.d.ts +0 -15
- package/dist/src/utils/date.d.ts +0 -16
- package/dist/src/utils/debounce.d.ts +0 -1
- package/dist/src/utils/index.d.ts +0 -4
- package/dist/src/utils/isNumeric.d.ts +0 -1
- 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,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,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,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 +0,0 @@
|
|
|
1
|
-
export * from './convertSpToTurfFeature';
|
package/dist/src/core/index.d.ts
DELETED
|
@@ -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 +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;
|
package/dist/src/index.d.ts
DELETED
|
@@ -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,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
|
-
}
|
package/dist/src/utils/date.d.ts
DELETED
|
@@ -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 +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;
|