@evergis/react 3.1.5 → 3.1.7

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 (123) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +1 -29
  3. package/dist/assets/index-CTzhzVha.css +90 -0
  4. package/dist/assets/react.esm-CTzhzVha.css +90 -0
  5. package/dist/components/ErrorBoundary/index.d.ts +12 -12
  6. package/dist/components/ErrorBoundary/types.d.ts +7 -7
  7. package/dist/components/Layer/Layer.d.ts +3 -3
  8. package/dist/components/Layer/RasterLayer.d.ts +3 -3
  9. package/dist/components/Layer/VectorLayer.d.ts +3 -3
  10. package/dist/components/Layer/constants.d.ts +5 -137
  11. package/dist/components/Layer/index.d.ts +3 -3
  12. package/dist/components/Layer/types.d.ts +12 -12
  13. package/dist/components/Layer/utils/getClientStyleItemPrefixSuffix.d.ts +3 -3
  14. package/dist/components/Map/Map.d.ts +3 -5
  15. package/dist/components/Map/index.d.ts +2 -2
  16. package/dist/components/Map/styled.d.ts +4 -4
  17. package/dist/components/Map/types.d.ts +8 -9
  18. package/dist/components/index.d.ts +3 -3
  19. package/dist/contexts/MapContext/MapContext.d.ts +2 -2
  20. package/dist/contexts/MapContext/MapProvider.d.ts +3 -3
  21. package/dist/contexts/MapContext/index.d.ts +3 -3
  22. package/dist/contexts/MapContext/types.d.ts +31 -31
  23. package/dist/contexts/ServerNotificationsContext/ServerNotificationsContext.d.ts +2 -2
  24. package/dist/contexts/ServerNotificationsContext/ServerNotificationsProvider.d.ts +3 -3
  25. package/dist/contexts/ServerNotificationsContext/hooks/useServerNotifications.d.ts +2 -2
  26. package/dist/contexts/ServerNotificationsContext/index.d.ts +3 -3
  27. package/dist/contexts/ServerNotificationsContext/types.d.ts +12 -12
  28. package/dist/contexts/index.d.ts +2 -2
  29. package/dist/core/classification/findAttributeInExpression.d.ts +2 -2
  30. package/dist/core/classification/getActualExtrusionHeight.d.ts +2 -2
  31. package/dist/core/classification/index.d.ts +3 -3
  32. package/dist/core/classification/parseClientStyle.d.ts +2 -2
  33. package/dist/core/feature/convertSpToTurfFeature.d.ts +3 -3
  34. package/dist/core/feature/index.d.ts +1 -1
  35. package/dist/core/index.d.ts +2 -2
  36. package/dist/dist/react.esm.d.ts +99 -0
  37. package/dist/hooks/index.d.ts +5 -5
  38. package/dist/hooks/map/index.d.ts +5 -5
  39. package/dist/hooks/map/useMapContext.d.ts +1 -1
  40. package/dist/hooks/map/useMapDraw/customModes.d.ts +7 -7
  41. package/dist/hooks/map/useMapDraw/customStyles.d.ts +58 -58
  42. package/dist/hooks/map/useMapDraw/index.d.ts +1 -1
  43. package/dist/hooks/map/useRedrawLayer.d.ts +1 -1
  44. package/dist/hooks/map/useZoomToFeatures.d.ts +2 -2
  45. package/dist/hooks/map/useZoomToPoint.d.ts +1 -1
  46. package/dist/hooks/serverNotifications/index.d.ts +1 -1
  47. package/dist/hooks/serverNotifications/useServerNotificationsContext.d.ts +1 -1
  48. package/dist/hooks/useDebouncedCallback.d.ts +1 -1
  49. package/dist/hooks/useToggle.d.ts +1 -1
  50. package/dist/hooks/useWindowResize.d.ts +1 -1
  51. package/dist/index.d.ts +6 -6
  52. package/dist/index.js +7963 -5
  53. package/dist/index.js.map +1 -0
  54. package/dist/react.esm.js +7792 -796
  55. package/dist/react.esm.js.map +1 -1
  56. package/dist/src/components/ErrorBoundary/index.d.ts +12 -0
  57. package/dist/src/components/ErrorBoundary/types.d.ts +7 -0
  58. package/dist/src/components/Layer/Layer.d.ts +3 -0
  59. package/dist/src/components/Layer/RasterLayer.d.ts +3 -0
  60. package/dist/src/components/Layer/VectorLayer.d.ts +3 -0
  61. package/dist/src/components/Layer/constants.d.ts +5 -0
  62. package/dist/src/components/Layer/index.d.ts +3 -0
  63. package/dist/src/components/Layer/types.d.ts +12 -0
  64. package/dist/src/components/Layer/utils/getClientStyleItemPrefixSuffix.d.ts +3 -0
  65. package/dist/src/components/Map/Map.d.ts +3 -0
  66. package/dist/src/components/Map/index.d.ts +2 -0
  67. package/dist/src/components/Map/styled.d.ts +4 -0
  68. package/dist/src/components/Map/types.d.ts +8 -0
  69. package/dist/src/components/index.d.ts +3 -0
  70. package/dist/src/contexts/MapContext/MapContext.d.ts +2 -0
  71. package/dist/src/contexts/MapContext/MapProvider.d.ts +3 -0
  72. package/dist/src/contexts/MapContext/index.d.ts +3 -0
  73. package/dist/src/contexts/MapContext/types.d.ts +31 -0
  74. package/dist/src/contexts/ServerNotificationsContext/ServerNotificationsContext.d.ts +2 -0
  75. package/dist/src/contexts/ServerNotificationsContext/ServerNotificationsProvider.d.ts +3 -0
  76. package/dist/src/contexts/ServerNotificationsContext/hooks/useServerNotifications.d.ts +2 -0
  77. package/dist/src/contexts/ServerNotificationsContext/index.d.ts +3 -0
  78. package/dist/src/contexts/ServerNotificationsContext/types.d.ts +12 -0
  79. package/dist/src/contexts/index.d.ts +2 -0
  80. package/dist/src/core/classification/findAttributeInExpression.d.ts +2 -0
  81. package/dist/src/core/classification/getActualExtrusionHeight.d.ts +2 -0
  82. package/dist/src/core/classification/index.d.ts +3 -0
  83. package/dist/src/core/classification/parseClientStyle.d.ts +2 -0
  84. package/dist/src/core/feature/convertSpToTurfFeature.d.ts +3 -0
  85. package/dist/src/core/feature/index.d.ts +1 -0
  86. package/dist/src/core/index.d.ts +2 -0
  87. package/dist/src/hooks/index.d.ts +5 -0
  88. package/dist/src/hooks/map/index.d.ts +5 -0
  89. package/dist/src/hooks/map/useMapContext.d.ts +1 -0
  90. package/dist/src/hooks/map/useMapDraw/customModes.d.ts +7 -0
  91. package/dist/src/hooks/map/useMapDraw/customStyles.d.ts +58 -0
  92. package/dist/src/hooks/map/useMapDraw/index.d.ts +1 -0
  93. package/dist/src/hooks/map/useRedrawLayer.d.ts +1 -0
  94. package/dist/src/hooks/map/useZoomToFeatures.d.ts +2 -0
  95. package/dist/src/hooks/map/useZoomToPoint.d.ts +1 -0
  96. package/dist/src/hooks/serverNotifications/index.d.ts +1 -0
  97. package/dist/src/hooks/serverNotifications/useServerNotificationsContext.d.ts +1 -0
  98. package/dist/src/hooks/useDebouncedCallback.d.ts +1 -0
  99. package/dist/src/hooks/useToggle.d.ts +1 -0
  100. package/dist/src/hooks/useWindowResize.d.ts +1 -0
  101. package/dist/src/index.d.ts +6 -0
  102. package/dist/src/types/attribute.d.ts +20 -0
  103. package/dist/src/types/index.d.ts +2 -0
  104. package/dist/src/types/styling.d.ts +15 -0
  105. package/dist/src/utils/date.d.ts +16 -0
  106. package/dist/src/utils/debounce.d.ts +1 -0
  107. package/dist/src/utils/index.d.ts +4 -0
  108. package/dist/src/utils/isNumeric.d.ts +1 -0
  109. package/dist/src/utils/isObject.d.ts +1 -0
  110. package/dist/types/attribute.d.ts +20 -20
  111. package/dist/types/index.d.ts +2 -2
  112. package/dist/types/styling.d.ts +15 -15
  113. package/dist/utils/date.d.ts +16 -16
  114. package/dist/utils/debounce.d.ts +1 -1
  115. package/dist/utils/index.d.ts +4 -4
  116. package/dist/utils/isNumeric.d.ts +1 -1
  117. package/dist/utils/isObject.d.ts +1 -1
  118. package/package.json +18 -37
  119. package/dist/jest.config.d.ts +0 -11
  120. package/dist/react.cjs.development.js +0 -973
  121. package/dist/react.cjs.development.js.map +0 -1
  122. package/dist/react.cjs.production.min.js +0 -2
  123. package/dist/react.cjs.production.min.js.map +0 -1
@@ -0,0 +1,12 @@
1
+ import { Component } from '../../../node_modules/@types/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(): import("react/jsx-runtime").JSX.Element;
12
+ }
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren, ReactNode } from '../../../node_modules/@types/react';
2
+ export interface ErrorBoundaryProps extends PropsWithChildren {
3
+ errorContents?: ReactNode;
4
+ }
5
+ export interface ErrorBoundaryState {
6
+ hasError?: boolean;
7
+ }
@@ -0,0 +1,3 @@
1
+ import { FC } from '../../../node_modules/@types/react';
2
+ import { LayerProps } from './types';
3
+ export declare const Layer: FC<LayerProps>;
@@ -0,0 +1,3 @@
1
+ import { FC } from '../../../node_modules/@types/react';
2
+ import { LayerProps } from './types';
3
+ export declare const RasterLayer: FC<Omit<LayerProps, "layerType" | "onMount" | "getLayerTempStyle">>;
@@ -0,0 +1,3 @@
1
+ import { FC } from '../../../node_modules/@types/react';
2
+ import { LayerProps } from './types';
3
+ export declare const VectorLayer: FC<Omit<LayerProps, "layerType" | "onMount">>;
@@ -0,0 +1,5 @@
1
+ import { CirclePaint, FillPaint, FillExtrusionPaint, LinePaint } from 'mapbox-gl';
2
+ export declare const DEFAULT_CIRCLE_PAINT: CirclePaint;
3
+ export declare const DEFAULT_FILL_PAINT: FillPaint;
4
+ export declare const DEFAULT_FILL_EXTRUSION_PAINT: FillExtrusionPaint;
5
+ export declare const DEFAULT_LINE_PAINT: LinePaint;
@@ -0,0 +1,3 @@
1
+ export * from './constants';
2
+ export * from './Layer';
3
+ export * from './types';
@@ -0,0 +1,12 @@
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
+ }
@@ -0,0 +1,3 @@
1
+ import { GeometryType } from '@evergis/api';
2
+ import { ClientStyleItem } from '../../../types';
3
+ export declare const getClientStyleItemPrefixSuffix: (geometryType: GeometryType, type: ClientStyleItem["type"]) => [string, string];
@@ -0,0 +1,3 @@
1
+ import { FC } from '../../../node_modules/@types/react';
2
+ import { MapProps } from './types';
3
+ export declare const Map: FC<MapProps>;
@@ -0,0 +1,2 @@
1
+ export * from './Map';
2
+ export * from './types';
@@ -0,0 +1,4 @@
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>;
@@ -0,0 +1,8 @@
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
+ }
@@ -0,0 +1,3 @@
1
+ export * from './ErrorBoundary';
2
+ export * from './Layer';
3
+ export * from './Map';
@@ -0,0 +1,2 @@
1
+ import { MapContextProps } from './types';
2
+ export declare const MapContext: import('../../../node_modules/@types/react').Context<MapContextProps>;
@@ -0,0 +1,3 @@
1
+ import { FC } from '../../../node_modules/@types/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,31 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ import { ServerNotificationsContextProps } from './types';
2
+ export declare const ServerNotificationsContext: import('../../../node_modules/@types/react').Context<ServerNotificationsContextProps>;
@@ -0,0 +1,3 @@
1
+ import { FC } from '../../../node_modules/@types/react';
2
+ import { ServerNotificationsProviderProps } from './types';
3
+ export declare const ServerNotificationsProvider: FC<ServerNotificationsProviderProps>;
@@ -0,0 +1,2 @@
1
+ import { HubConnection } from '@microsoft/signalr';
2
+ export declare const useServerNotifications: (url: string, initialized: boolean) => HubConnection | null;
@@ -0,0 +1,3 @@
1
+ export * from './ServerNotificationsContext';
2
+ export * from './ServerNotificationsProvider';
3
+ export * from './types';
@@ -0,0 +1,12 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ export * from './MapContext';
2
+ 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 { FeatureDc } from '@evergis/api';
2
+ import { Feature } from 'geojson';
3
+ export declare const convertSpToTurfFeature: (geometry?: FeatureDc["geometry"]) => Feature<any> | undefined;
@@ -0,0 +1 @@
1
+ export * from './convertSpToTurfFeature';
@@ -0,0 +1,2 @@
1
+ export * from './classification';
2
+ export * from './feature';
@@ -0,0 +1,5 @@
1
+ export * from './map';
2
+ export * from './serverNotifications';
3
+ export * from './useDebouncedCallback';
4
+ export * from './useToggle';
5
+ export * from './useWindowResize';
@@ -0,0 +1,5 @@
1
+ export * from './useMapDraw';
2
+ export * from './useMapContext';
3
+ export * from './useRedrawLayer';
4
+ export * from './useZoomToFeatures';
5
+ export * from './useZoomToPoint';
@@ -0,0 +1 @@
1
+ export declare const useMapContext: () => import('../../contexts').MapContextProps;
@@ -0,0 +1,7 @@
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 {};
@@ -0,0 +1,58 @@
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
+ })[];
@@ -0,0 +1 @@
1
+ export declare const useMapDraw: (triggerDeps?: Array<unknown>) => void;
@@ -0,0 +1 @@
1
+ export declare const useRedrawLayer: () => (layerName: string) => void;
@@ -0,0 +1,2 @@
1
+ import { FeatureDc } from '@evergis/api';
2
+ export declare const useZoomToFeatures: () => (features?: FeatureDc[], padding?: number) => void;
@@ -0,0 +1 @@
1
+ export declare const useZoomToPoint: () => (options: any, callback?: VoidFunction) => void;
@@ -0,0 +1 @@
1
+ export * from './useServerNotificationsContext';
@@ -0,0 +1 @@
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 useToggle: (initial?: boolean) => [boolean, VoidFunction, (value: boolean) => void];
@@ -0,0 +1 @@
1
+ export declare const useWindowResize: (callback?: (...args: any) => any, delay?: number) => void;
@@ -0,0 +1,6 @@
1
+ export * from './components';
2
+ export * from './contexts';
3
+ export * from './core';
4
+ export * from './hooks';
5
+ export * from './types';
6
+ export * from './utils';
@@ -0,0 +1,20 @@
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
+ };
@@ -0,0 +1,2 @@
1
+ export * from './attribute';
2
+ export * from './styling';
@@ -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 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
+ }
@@ -0,0 +1,16 @@
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 {};
@@ -0,0 +1 @@
1
+ export declare const debounce: (callback: any, delay: number) => ((...args: any) => void);
@@ -0,0 +1,4 @@
1
+ export * from './date';
2
+ export * from './debounce';
3
+ export * from './isNumeric';
4
+ export * from './isObject';
@@ -0,0 +1 @@
1
+ export declare const isNumeric: (number: string | number) => boolean;
@@ -0,0 +1 @@
1
+ export declare function isObject<T>(value: T | object): value is object;
@@ -1,20 +1,20 @@
1
- import { ReactNode } from "react";
2
- import { AttributeDefinitionDc } from "@evergis/api";
3
- export declare type FeatureAttributeValue = string | number | Date | null;
4
- export declare type LayerAttribute = {
5
- name?: string;
6
- } & AttributeDefinitionDc;
7
- export declare 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 declare type AttributeValue = {
18
- value: string;
19
- type: AttributeValueType;
20
- };
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 +1,2 @@
1
- export * from "./attribute";
2
- export * from "./styling";
1
+ export * from './attribute';
2
+ export * from './styling';
@@ -1,15 +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
+ 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 +1,16 @@
1
- export declare const NO_CONTENT_VALUE = "\u2014";
2
- export declare type DateType = number | Date;
3
- export declare 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
+ 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 +1 @@
1
- export declare const debounce: (callback: any, delay: number) => (...args: any[]) => void;
1
+ export declare const debounce: (callback: any, delay: number) => ((...args: any) => void);
@@ -1,4 +1,4 @@
1
- export * from "./date";
2
- export * from "./debounce";
3
- export * from "./isNumeric";
4
- export * from "./isObject";
1
+ export * from './date';
2
+ export * from './debounce';
3
+ export * from './isNumeric';
4
+ export * from './isObject';
@@ -1 +1 @@
1
- export declare const isNumeric: (number: string | number) => boolean;
1
+ export declare const isNumeric: (number: string | number) => boolean;
@@ -1 +1 @@
1
- export declare function isObject<T>(value: T | object): value is object;
1
+ export declare function isObject<T>(value: T | object): value is object;