@evergis/react 2.0.166 → 2.0.168
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/dist/components/Legend/Legend.d.ts +5 -3
- package/dist/components/Legend/components/LegendParameterDescription.d.ts +5 -0
- package/dist/components/Legend/components/LegendSection.d.ts +3 -0
- package/dist/components/Legend/components/LegendSymbolRenderer.d.ts +5 -0
- package/dist/components/Legend/components/MaximizedLegend.d.ts +3 -0
- package/dist/components/{MapLegend → Legend/components}/MinimizedLegend.d.ts +1 -1
- package/dist/components/Legend/components/SvgSymbol.d.ts +3 -0
- package/dist/components/Legend/components/SymbolByType.d.ts +9 -0
- package/dist/components/Legend/components/index.d.ts +7 -0
- package/dist/components/Legend/constants.d.ts +32 -0
- package/dist/components/Legend/hooks/useSvgSymbol.d.ts +15 -0
- package/dist/components/Legend/index.d.ts +4 -4
- package/dist/components/Legend/styled.d.ts +36 -5
- package/dist/components/Legend/types.d.ts +78 -9
- package/dist/components/index.d.ts +0 -1
- package/dist/contexts/LegendContext.d.ts +1 -1
- package/dist/core/attributes/format.d.ts +0 -1
- package/dist/core/classification/parameterValue.d.ts +1 -3
- package/dist/core/classification/types.d.ts +2 -1
- package/dist/core/feature/getFeatureSymbol.d.ts +1 -1
- package/dist/core/style/EvergisStyle.d.ts +1 -1
- package/dist/core/style/types/parameterValue.d.ts +2 -2
- package/dist/core/style/types/symbol.d.ts +8 -2
- package/dist/hooks/useLegend/useMapLegend.d.ts +1 -1
- package/dist/hooks/useSymbol.d.ts +0 -1
- package/dist/index.d.ts +8 -2
- package/dist/react.cjs.development.js +1319 -319
- package/dist/react.cjs.development.js.map +1 -1
- package/dist/react.cjs.production.min.js +1 -1
- package/dist/react.cjs.production.min.js.map +1 -1
- package/dist/react.esm.js +1240 -313
- package/dist/react.esm.js.map +1 -1
- package/dist/utils/date.d.ts +16 -0
- package/dist/utils/legend.d.ts +72 -0
- package/dist/utils/svg.d.ts +6 -0
- package/package.json +8 -5
- package/dist/components/Legend/LegendSection.d.ts +0 -10
- package/dist/components/Legend/LegendSymbol.d.ts +0 -8
- package/dist/components/Legend/LegendValue.d.ts +0 -8
- package/dist/components/Legend/getSymbolSize.d.ts +0 -3
- package/dist/components/MapLegend/MapLegend.d.ts +0 -3
- package/dist/components/MapLegend/MapLegendDescription.d.ts +0 -5
- package/dist/components/MapLegend/MapLegendSymbol.d.ts +0 -7
- package/dist/components/MapLegend/index.d.ts +0 -5
- package/dist/components/MapLegend/styled.d.ts +0 -28
- package/dist/components/MapLegend/types.d.ts +0 -23
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
export declare const Legend:
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { FeatureLayerServiceInfoDc } from "@evergis/api";
|
|
3
|
+
export declare const Legend: FC<{
|
|
4
|
+
layerInfo: FeatureLayerServiceInfoDc;
|
|
5
|
+
}>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { GeometryType } from "@evergis/api";
|
|
2
|
+
import { ClassifyParameter, ParameterInfo } from "./types";
|
|
3
|
+
import { ClassificationParameter } from "../../core";
|
|
4
|
+
export declare const DEFAULT_LEGEND_SYMBOL_SIZE = 26;
|
|
5
|
+
export declare const EXTRA_BORDER_SIZE = 4;
|
|
6
|
+
export declare const DEFAULT_SYMBOL_SIZE = 20;
|
|
7
|
+
export declare const DEFAULT_SYMBOL_WITH_BG_SIZE = 24;
|
|
8
|
+
export declare const DEFAULT_SYMBOL_FILL_COLOR = "rgba(0, 163, 245, 1)";
|
|
9
|
+
export declare const DEFAULT_SYMBOL_STROKE_COLOR = "rgb(255, 255, 255)";
|
|
10
|
+
export declare const DEFAULT_SYMBOL_OFFSET: number[];
|
|
11
|
+
export declare const SYMBOL_CLASSIFICATION: Partial<Record<GeometryType, ClassifyParameter[]>>;
|
|
12
|
+
export declare const SYMBOL_LIMITS: {
|
|
13
|
+
SIZE_MIN: number;
|
|
14
|
+
SIZE_MAX: number;
|
|
15
|
+
SIZE_STEP: number;
|
|
16
|
+
GRID_SIZE_MIN: number;
|
|
17
|
+
GRID_SIZE_MAX: number;
|
|
18
|
+
MIN_OBJECTS_COUNT: number;
|
|
19
|
+
MAX_OBJECTS_COUNT: number;
|
|
20
|
+
MIN_CLUSTER_SIZE: number;
|
|
21
|
+
MAX_CLUSTER_SIZE: number;
|
|
22
|
+
STROKE_WIDTH_MIN: number;
|
|
23
|
+
STROKE_WIDTH_MAX: number;
|
|
24
|
+
STROKE_WIDTH_STEP: number;
|
|
25
|
+
ANGLE_MIN: number;
|
|
26
|
+
ANGLE_MAX: number;
|
|
27
|
+
ANGLE_STEP: number;
|
|
28
|
+
PREVIEW_SIZE_MAX: number;
|
|
29
|
+
PREVIEW_SIZE_MAX_WIDTH: number;
|
|
30
|
+
};
|
|
31
|
+
export declare const DEFAULT_PARAMETER_INFO: ParameterInfo;
|
|
32
|
+
export declare const PARAMETER_INFOS: Partial<Record<ClassificationParameter, ParameterInfo>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Color } from "@evergis/color/es/Color";
|
|
3
|
+
import { SvgEditorField, SvgSymbolBg } from "../types";
|
|
4
|
+
import { SvgPointSymbol } from "../../../core";
|
|
5
|
+
export declare const useSvgSymbol: (symbol: SvgPointSymbol, skipOffset?: boolean | undefined) => {
|
|
6
|
+
svgRef: import("react").MutableRefObject<HTMLElement | null>;
|
|
7
|
+
initSvg: () => void;
|
|
8
|
+
getSvgData: () => string;
|
|
9
|
+
manipulateSvg: ({ svg, bg, newSymbol }: {
|
|
10
|
+
svg: string;
|
|
11
|
+
bg?: SvgSymbolBg | undefined;
|
|
12
|
+
newSymbol?: import("../../../core").ClientSymbol<"svgPointSymbol", import("@evergis/api").SvgPointSymbolDc, never> | undefined;
|
|
13
|
+
}) => void;
|
|
14
|
+
getUpdatedSvgSymbol: (field: keyof SvgEditorField, value: Color | number | string) => any;
|
|
15
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './Legend';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export { LegendContainer, LegendSectionContainer, LegendValueContainer, } from './styled';
|
|
2
|
+
export * from './styled';
|
|
3
|
+
export * from './constants';
|
|
4
|
+
export * from './components';
|
|
6
5
|
export * from './types';
|
|
6
|
+
export * from './hooks/useSvgSymbol';
|
|
@@ -1,5 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ClassificationParameterExtended } from "../../core";
|
|
3
|
+
import { MapLegendItemProps } from "./types";
|
|
4
|
+
export declare const ItemText: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
+
export declare const ItemSeparator: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const SymbolContainer: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
7
|
+
export declare const ClassifiedItem: import("styled-components").StyledComponent<"symbol" | "object" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "label" | "legend" | "li" | "link" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noindex" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "slot" | "script" | "section" | "select" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any>, any, {}, any>;
|
|
8
|
+
export declare const SymbolButton: import("styled-components").StyledComponent<"span", any, {
|
|
9
|
+
onClick?: ((event: import("react").MouseEvent<HTMLSpanElement, MouseEvent>) => void) | null | undefined;
|
|
10
|
+
}, never>;
|
|
11
|
+
export declare const MapLegendControl: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
12
|
+
export declare const MapLegendContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
13
|
+
export declare const MapLegendHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
14
|
+
export declare const MapLegendDescriptionContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
15
|
+
export declare const MinimizedLegendContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
16
|
+
export declare const MapLegendSectionContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
|
+
export declare const MapLegendValueDescr: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
18
|
+
export declare const MapLegendItem: import("styled-components").StyledComponent<"div", any, MapLegendItemProps, never>;
|
|
19
|
+
export declare const MapLegendOther: import("styled-components").StyledComponent<"div", any, MapLegendItemProps, never>;
|
|
20
|
+
export declare const SizeMinimizedLegend: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
21
|
+
export declare const SizeMinimizedLegendSymbol: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
22
|
+
export declare const SizeMinimizedLegendLabel: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
23
|
+
export declare const SizeMinimizedLegendDown: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
24
|
+
export declare const SizeMinimizedLegendUp: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
25
|
+
export declare const MapLegendItems: import("styled-components").StyledComponent<"div", any, {
|
|
26
|
+
parameter: ClassificationParameterExtended;
|
|
27
|
+
isSize?: boolean | undefined;
|
|
28
|
+
isStrokeWidth?: boolean | undefined;
|
|
29
|
+
isStrokeColor?: boolean | undefined;
|
|
30
|
+
isSingle?: boolean | undefined;
|
|
31
|
+
}, never>;
|
|
32
|
+
export declare const MapLegendItemsContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
33
|
+
export declare const MapLegendValues: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
34
|
+
export declare const MapLegendValuesRange: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
35
|
+
export declare const MapLegendValuesOther: import("styled-components").StyledComponent<"div", any, MapLegendItemProps, never>;
|
|
36
|
+
export declare const MapLegendExpandButton: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,10 +1,79 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { AttributeType, PointLabelSymbolDc, SvgPointSymbolDc, StyleDc } from "@evergis/api";
|
|
3
|
+
import { MaskedImage } from "@evergis/sgis/es/symbols/point/MaskedImage";
|
|
4
|
+
import { H3Symbol } from "@evergis/sgis/es/symbols/H3Symbol";
|
|
5
|
+
import { ClassificationParameterExtended, LegendValueType, ParameterByAttribute, ParameterValue, StyleSymbolType, SvgPointSymbol } from "../../core";
|
|
6
|
+
import { SGisBrushFill, SGisImageFill, SGisPolygonSymbol, SGisPolylineSymbol } from "../../symbols";
|
|
7
|
+
export declare type ClassifyParameter = "fill.color" | "fill.hatchColor" | "stroke.width" | "stroke.color" | "textBackground.fill.color" | "background.fillColor" | "background.strokeColor" | "background.strokeWidth" | "figure.fillColor" | "fillColor" | "strokeColor" | "strokeWidth" | "fontColor" | "haloColor" | "size" | "symbol" | "angle" | "maskedColor" | "endingSize" | "beginningSize" | "maxObjectCount" | "gridSize" | "selectionObjectsLimit";
|
|
8
|
+
export interface ParameterInfo {
|
|
9
|
+
min: number;
|
|
10
|
+
max: number;
|
|
11
|
+
step: number;
|
|
12
|
+
units: Units | null;
|
|
13
|
+
serialize: (value: number) => number;
|
|
14
|
+
deserialize: (value: number) => number;
|
|
15
|
+
classifyAble: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const enum Units {
|
|
18
|
+
Pixels = "px",
|
|
19
|
+
Count = "pcs",
|
|
20
|
+
Degrees = "\u00B0"
|
|
21
|
+
}
|
|
22
|
+
export declare type LegendSectionProps = {
|
|
23
|
+
symbol: StyleDc["symbol"];
|
|
24
|
+
param: ClassificationParameterExtended;
|
|
25
|
+
params: ClassificationParameterExtended[];
|
|
26
|
+
classified: ParameterByAttribute<ParameterValue>;
|
|
27
|
+
attributeName: string;
|
|
28
|
+
attributeType: AttributeType;
|
|
29
|
+
index: number;
|
|
30
|
+
};
|
|
31
|
+
export declare type LegendSectionItem = {
|
|
32
|
+
attributeType: AttributeType;
|
|
33
|
+
symbol: StyleSymbolType;
|
|
34
|
+
title: string;
|
|
35
|
+
index: number;
|
|
36
|
+
hiddenCondition?: string;
|
|
37
|
+
};
|
|
38
|
+
export declare type MaximizedLegendProps = {
|
|
39
|
+
symbol: StyleDc["symbol"];
|
|
40
|
+
parameter: ClassificationParameterExtended;
|
|
41
|
+
values: LegendSectionItem[];
|
|
42
|
+
attributeType: AttributeType;
|
|
43
|
+
index: number;
|
|
44
|
+
};
|
|
45
|
+
export declare type SvgSymbolProps = {
|
|
46
|
+
svg: string;
|
|
47
|
+
symbol: SvgPointSymbol;
|
|
48
|
+
size?: number;
|
|
49
|
+
title?: string;
|
|
50
|
+
text?: string;
|
|
51
|
+
bg?: SvgSymbolBg;
|
|
52
|
+
skipOffset?: boolean;
|
|
53
|
+
fontSettings?: PointLabelSymbolDc;
|
|
54
|
+
onClick?: (svg: string, symbol: SvgPointSymbol) => void;
|
|
55
|
+
};
|
|
56
|
+
export declare enum SvgSymbolBg {
|
|
57
|
+
Rect = "rect",
|
|
58
|
+
Circle = "circle"
|
|
59
|
+
}
|
|
60
|
+
export declare type SGisSymbol = MaskedImage | SvgPointSymbolDc | SGisPolylineSymbol | SGisPolygonSymbol | SGisImageFill | SGisBrushFill | H3Symbol;
|
|
61
|
+
export declare type SvgEditorField = Pick<SvgPointSymbol, "size" | "offset" | "angle"> & {
|
|
62
|
+
"background.fillColor": string;
|
|
63
|
+
"background.strokeColor": string;
|
|
64
|
+
"background.strokeWidth": string;
|
|
65
|
+
"figure.fillColor": string;
|
|
66
|
+
};
|
|
67
|
+
export declare type MinimizedLegendProps = {
|
|
68
|
+
title?: string | ReactNode;
|
|
69
|
+
defaultValue: string;
|
|
70
|
+
values: LegendValueType[];
|
|
71
|
+
parameter: ClassificationParameterExtended;
|
|
72
|
+
hiddenLegends?: string[];
|
|
73
|
+
attributeType?: AttributeType;
|
|
74
|
+
};
|
|
75
|
+
export declare type MapLegendItemProps = {
|
|
76
|
+
value?: string | number;
|
|
77
|
+
parameter?: ClassificationParameterExtended;
|
|
78
|
+
isHidden?: boolean;
|
|
10
79
|
};
|
|
@@ -4,5 +4,5 @@ declare type LegendProviderProps = {
|
|
|
4
4
|
symbol?: StyleSymbolType;
|
|
5
5
|
};
|
|
6
6
|
export declare const LegendProvider: React.FC<LegendProviderProps>;
|
|
7
|
-
export declare const useLegendContext: () => import("..").ClientSymbol<"circlePointSymbol", import("@evergis/api").CirclePointSymbolDc, never> | import("../core/style/types/symbol").SquareSymbol | import("..").ClientSymbol<"maskedImagePointSymbol", import("@evergis/api").MaskedImagePointSymbolDc, never> | import("..").ClientSymbol<"imagePointSymbol", import("@evergis/api").ImagePointSymbolDc, never> | import("../core/style/types/symbol").PolygonSymbol<import("..").FillBrushType, import("..").StrokeBrushType> | import("..").ClientSymbol<"polylineSymbol", import("@evergis/api").PolylineSymbolDc, never> | import("..").ClientSymbol<"simplePolylineSymbol", import("@evergis/api").SimplePolylineSymbolDc, never> | import("..").ClientSymbol<"polylineLabelSymbol", import("@evergis/api").PolylineLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("..").ClientSymbol<"polygonLabelSymbol", import("@evergis/api").PolygonLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("..").ClientSymbol<"labelPointSymbol", import("@evergis/api").PointLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("..").ClientSymbol<"rasterSymbol", import("@evergis/api").RasterSymbolDc, never> | import("..").ClientSymbol<"compositeSymbol", import("@evergis/api").CompositeSymbolDc, never> | import("@evergis/api").H3GridSymbolDc | import("@evergis/api").ClusterSymbolDc | null;
|
|
7
|
+
export declare const useLegendContext: () => import("..").ClientSymbol<"svgPointSymbol", import("@evergis/api").SvgPointSymbolDc, never> | import("..").ClientSymbol<"circlePointSymbol", import("@evergis/api").CirclePointSymbolDc, never> | import("../core/style/types/symbol").SquareSymbol | import("..").ClientSymbol<"maskedImagePointSymbol", import("@evergis/api").MaskedImagePointSymbolDc, never> | import("..").ClientSymbol<"imagePointSymbol", import("@evergis/api").ImagePointSymbolDc, never> | import("../core/style/types/symbol").PolygonSymbol<import("..").FillBrushType, import("..").StrokeBrushType> | import("..").ClientSymbol<"polylineSymbol", import("@evergis/api").PolylineSymbolDc, never> | import("..").ClientSymbol<"simplePolylineSymbol", import("@evergis/api").SimplePolylineSymbolDc, never> | import("..").ClientSymbol<"polylineLabelSymbol", import("@evergis/api").PolylineLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("..").ClientSymbol<"polygonLabelSymbol", import("@evergis/api").PolygonLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("..").ClientSymbol<"labelPointSymbol", import("@evergis/api").PointLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("..").ClientSymbol<"rasterSymbol", import("@evergis/api").RasterSymbolDc, never> | import("..").ClientSymbol<"compositeSymbol", import("@evergis/api").CompositeSymbolDc, never> | import("@evergis/api").H3GridSymbolDc | import("@evergis/api").ClusterSymbolDc | null;
|
|
8
8
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ClassificationParameterExtended } from './types';
|
|
1
|
+
import { ClassificationParameterExtended, ParameterValueModifier } from './types';
|
|
2
2
|
import { CalculatedAble, CalculatedParameter, ClassifyAble, ParameterByAttribute, ParameterValue, StyleSymbolType, UnidentifiedParameterValue } from '../style';
|
|
3
|
-
declare type ParameterValueModifier = (parameterValue: ClassifyAble<ParameterValue>) => ClassifyAble<ParameterValue> | void;
|
|
4
3
|
export declare const isParameterByAttribute: (value: UnidentifiedParameterValue) => value is ParameterByAttribute<ParameterValue>;
|
|
5
4
|
export declare const isCalculatedParameter: (value: UnidentifiedParameterValue) => value is CalculatedParameter<ParameterValue>;
|
|
6
5
|
export declare const getParameterValue: <Value extends ParameterValue>(value: Value | ParameterByAttribute<Value> | CalculatedParameter<Value>) => Value;
|
|
@@ -8,4 +7,3 @@ export declare const symbolParameterWalker: (valueModifier: ParameterValueModifi
|
|
|
8
7
|
export declare const setDefaultParameterValue: <S extends StyleSymbolType>(symbol: S, parameter: ClassificationParameterExtended | ClassificationParameterExtended[]) => S;
|
|
9
8
|
export declare const setParameterValue: <S extends StyleSymbolType>(symbol: S, path: ClassificationParameterExtended, value: ClassifyAble<ParameterValue>) => S;
|
|
10
9
|
export declare function applyParameterValue(symbol: StyleSymbolType, path: ClassificationParameterExtended, value: ClassifyAble<ParameterValue>): StyleSymbolType;
|
|
11
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ParameterValue, ParameterValueWithSymbol } from '../style';
|
|
1
|
+
import { ClassifyAble, ParameterValue, ParameterValueWithSymbol } from '../style';
|
|
2
2
|
import { ClassificationAttribute } from '../attributes';
|
|
3
3
|
export declare type NestedClassificationParameters = 'fill.color' | 'fill.hatchColor' | 'stroke.width' | 'stroke.color' | 'background.fillColor' | 'background.strokeColor' | 'background.strokeWidth' | 'figure.fillColor';
|
|
4
4
|
export declare type SimpleClassificationParameters = 'fillColor' | 'strokeColor' | 'strokeWidth' | 'size' | 'symbol' | 'angle' | 'maskedColor';
|
|
@@ -37,3 +37,4 @@ export interface ClassificationExtras {
|
|
|
37
37
|
export declare type ExtendedClassification<Type extends ClassificationType = ClassificationType, Value extends ClassificationClass = ClassificationClass> = Classification<Type, Value> & ClassificationExtras;
|
|
38
38
|
export declare function isRangeClass(value: ClassificationClass): value is RangeClass;
|
|
39
39
|
export declare function isUniqueClass(value: ClassificationClass): value is UniqueClass;
|
|
40
|
+
export declare type ParameterValueModifier = (parameterValue: ClassifyAble<ParameterValue>) => ClassifyAble<ParameterValue> | void;
|
|
@@ -3,5 +3,5 @@ import { EvergisStyle, ParameterByAttributeValue, ParameterValueWithSymbol, Styl
|
|
|
3
3
|
export declare const getAttributeNameFromCondition: (condition: string) => string | null;
|
|
4
4
|
export declare const getAttributeNameFromClassified: (values: ParameterByAttributeValue<ParameterValueWithSymbol>[]) => string | null;
|
|
5
5
|
export declare function findChildFeatureStyle(childStyles: Style[], attributes: FeatureAttribute[]): Style | null;
|
|
6
|
-
export declare function findChildFeatureSymbol(childStyles: Style[], attributes: FeatureAttribute[]): import("../style").ClientSymbol<"circlePointSymbol", import("@evergis/api").CirclePointSymbolDc, never> | import("../style").SquareSymbol | import("../style").ClientSymbol<"maskedImagePointSymbol", import("@evergis/api").MaskedImagePointSymbolDc, never> | import("../style").ClientSymbol<"imagePointSymbol", import("@evergis/api").ImagePointSymbolDc, never> | import("../style").PolygonSymbol<import("../style").FillBrushType, import("../style").StrokeBrushType> | import("../style").ClientSymbol<"polylineSymbol", import("@evergis/api").PolylineSymbolDc, never> | import("../style").ClientSymbol<"simplePolylineSymbol", import("@evergis/api").SimplePolylineSymbolDc, never> | import("../style").ClientSymbol<"polylineLabelSymbol", import("@evergis/api").PolylineLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("../style").ClientSymbol<"polygonLabelSymbol", import("@evergis/api").PolygonLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("../style").ClientSymbol<"labelPointSymbol", import("@evergis/api").PointLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("../style").ClientSymbol<"rasterSymbol", import("@evergis/api").RasterSymbolDc, never> | import("@evergis/api").H3GridSymbolDc | import("@evergis/api").ClusterSymbolDc | null;
|
|
6
|
+
export declare function findChildFeatureSymbol(childStyles: Style[], attributes: FeatureAttribute[]): import("../style").ClientSymbol<"svgPointSymbol", import("@evergis/api").SvgPointSymbolDc, never> | import("../style").ClientSymbol<"circlePointSymbol", import("@evergis/api").CirclePointSymbolDc, never> | import("../style").SquareSymbol | import("../style").ClientSymbol<"maskedImagePointSymbol", import("@evergis/api").MaskedImagePointSymbolDc, never> | import("../style").ClientSymbol<"imagePointSymbol", import("@evergis/api").ImagePointSymbolDc, never> | import("../style").PolygonSymbol<import("../style").FillBrushType, import("../style").StrokeBrushType> | import("../style").ClientSymbol<"polylineSymbol", import("@evergis/api").PolylineSymbolDc, never> | import("../style").ClientSymbol<"simplePolylineSymbol", import("@evergis/api").SimplePolylineSymbolDc, never> | import("../style").ClientSymbol<"polylineLabelSymbol", import("@evergis/api").PolylineLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("../style").ClientSymbol<"polygonLabelSymbol", import("@evergis/api").PolygonLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("../style").ClientSymbol<"labelPointSymbol", import("@evergis/api").PointLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("../style").ClientSymbol<"rasterSymbol", import("@evergis/api").RasterSymbolDc, never> | import("@evergis/api").H3GridSymbolDc | import("@evergis/api").ClusterSymbolDc | null;
|
|
7
7
|
export declare function getFeatureSymbol(style: EvergisStyle, attributes: FeatureAttribute[]): StyleSymbolType | null;
|
|
@@ -7,7 +7,7 @@ export declare class EvergisStyle {
|
|
|
7
7
|
constructor(style: StyleDc);
|
|
8
8
|
serialize(): StyleDc;
|
|
9
9
|
hasRasters(): boolean;
|
|
10
|
-
get symbol(): import("./types").ClientSymbol<"rasterSymbol", import("@evergis/api").RasterSymbolDc, never> | import("./types").ClientSymbol<"circlePointSymbol", import("@evergis/api").CirclePointSymbolDc, never> | import("./types").SquareSymbol | import("./types").ClientSymbol<"maskedImagePointSymbol", import("@evergis/api").MaskedImagePointSymbolDc, never> | import("./types").ClientSymbol<"imagePointSymbol", import("@evergis/api").ImagePointSymbolDc, never> | import("./types").PolygonSymbol<import("./types").FillBrushType, import("./types").StrokeBrushType> | import("./types").ClientSymbol<"polylineSymbol", import("@evergis/api").PolylineSymbolDc, never> | import("./types").ClientSymbol<"simplePolylineSymbol", import("@evergis/api").SimplePolylineSymbolDc, never> | import("./types").ClientSymbol<"polylineLabelSymbol", import("@evergis/api").PolylineLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("./types").ClientSymbol<"polygonLabelSymbol", import("@evergis/api").PolygonLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("./types").ClientSymbol<"labelPointSymbol", import("@evergis/api").PointLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("@evergis/api").H3GridSymbolDc | import("@evergis/api").ClusterSymbolDc;
|
|
10
|
+
get symbol(): import("./types").ClientSymbol<"rasterSymbol", import("@evergis/api").RasterSymbolDc, never> | import("./types").ClientSymbol<"svgPointSymbol", import("@evergis/api").SvgPointSymbolDc, never> | import("./types").ClientSymbol<"circlePointSymbol", import("@evergis/api").CirclePointSymbolDc, never> | import("./types").SquareSymbol | import("./types").ClientSymbol<"maskedImagePointSymbol", import("@evergis/api").MaskedImagePointSymbolDc, never> | import("./types").ClientSymbol<"imagePointSymbol", import("@evergis/api").ImagePointSymbolDc, never> | import("./types").PolygonSymbol<import("./types").FillBrushType, import("./types").StrokeBrushType> | import("./types").ClientSymbol<"polylineSymbol", import("@evergis/api").PolylineSymbolDc, never> | import("./types").ClientSymbol<"simplePolylineSymbol", import("@evergis/api").SimplePolylineSymbolDc, never> | import("./types").ClientSymbol<"polylineLabelSymbol", import("@evergis/api").PolylineLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("./types").ClientSymbol<"polygonLabelSymbol", import("@evergis/api").PolygonLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("./types").ClientSymbol<"labelPointSymbol", import("@evergis/api").PointLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("@evergis/api").H3GridSymbolDc | import("@evergis/api").ClusterSymbolDc;
|
|
11
11
|
get raster(): import("./types").ClientSymbol<"rasterSymbol", import("@evergis/api").RasterSymbolDc, never> | null;
|
|
12
12
|
get label(): import("./types").ClientSymbol<"polylineLabelSymbol", import("@evergis/api").PolylineLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("./types").ClientSymbol<"polygonLabelSymbol", import("@evergis/api").PolygonLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | import("./types").ClientSymbol<"labelPointSymbol", import("@evergis/api").PointLabelSymbolDc, "fontColor" | "fontSize" | "haloColor"> | null;
|
|
13
13
|
get children(): Style[] | null;
|
|
@@ -18,9 +18,9 @@ export declare type CalculatedParameter<Value> = {
|
|
|
18
18
|
};
|
|
19
19
|
export declare type ClassifyAble<Value> = Value | ParameterByAttribute<Value>;
|
|
20
20
|
export declare type CalculatedAble<Value> = Value | CalculatedParameter<Value>;
|
|
21
|
-
export declare type ParameterValue = string | number;
|
|
21
|
+
export declare type ParameterValue = string | number | Date;
|
|
22
22
|
export declare type ParameterByAttributeValues = ParameterByAttributeValue<ParameterValue>[];
|
|
23
|
-
export declare type ParameterValueWithSymbol = ParameterValue | StyleSymbolType;
|
|
23
|
+
export declare type ParameterValueWithSymbol = ParameterValue | StyleSymbolType | Date;
|
|
24
24
|
export declare type ClassifiedParameterValue = ClassifyAble<ParameterValueWithSymbol>;
|
|
25
25
|
export declare type UnidentifiedParameterValue = ParameterValueWithSymbol | Partial<ClassifyAble<ParameterValueWithSymbol>> | Partial<CalculatedAble<ParameterValue>>;
|
|
26
26
|
export declare type CalculatedParameterValue = CalculatedAble<ParameterValue>;
|
|
@@ -21,7 +21,7 @@ export declare type CompositeSymbolType = ClientSymbol<'compositeSymbol', Compos
|
|
|
21
21
|
export declare type H3GridSymbol = ClientSymbol<'h3grid', H3GridSymbolDc>;
|
|
22
22
|
export declare type SimpleShapeSymbol = PointSymbol | SquareSymbol;
|
|
23
23
|
export declare type ImageSymbol = MaskedImageSymbol | StaticImageSymbol;
|
|
24
|
-
export declare type PointSymbolType =
|
|
24
|
+
export declare type PointSymbolType = SvgPointSymbol | PointSymbol | SquareSymbol | MaskedImageSymbol | StaticImageSymbol;
|
|
25
25
|
export declare type PolylineSymbols = PolylineSymbol | SimplePolylineSymbol;
|
|
26
26
|
export declare type StyleSymbolType = PointSymbolType | PolygonSymbol | PolylineSymbols | LabelType | RasterSymbol | CompositeSymbolType | H3GridSymbolDc | ClusterSymbolDc;
|
|
27
27
|
export declare type StyleSymbolTypes = StyleSymbolType['type'];
|
|
@@ -62,4 +62,10 @@ export declare const isTwoDimensionalSymbol: (symbol: UnknownSymbol) => symbol i
|
|
|
62
62
|
export declare const isSizableSymbol: (symbol: UnknownSymbol) => symbol is SimpleShapeSymbol;
|
|
63
63
|
export declare const isStrokeStyledSymbol: (symbol: UnknownSymbol) => symbol is StrokeStyledSymbols;
|
|
64
64
|
export declare const isScalablePolylineSymbol: (symbol: PolylineSymbol | SimplePolylineSymbol) => boolean | undefined;
|
|
65
|
-
export declare const isSimpleSymbol: (symbol: UnknownSymbol) => symbol is ClientSymbol<"circlePointSymbol", CirclePointSymbolDc, never> | ClientSymbol<"maskedImagePointSymbol", MaskedImagePointSymbolDc, never> | ClientSymbol<"imagePointSymbol", ImagePointSymbolDc, never> | ClientSymbol<"simplePolylineSymbol", SimplePolylineSymbolDc, never> | ClientSymbol<"polylineSymbol", PolylineSymbolDc, never> | ClientSymbol<"rasterSymbol", RasterSymbolDc, never> | H3GridSymbolDc | SquareSymbol | PolygonSymbol<FillBrushType, StrokeBrushType> | ClusterSymbolDc;
|
|
65
|
+
export declare const isSimpleSymbol: (symbol: UnknownSymbol) => symbol is ClientSymbol<"circlePointSymbol", CirclePointSymbolDc, never> | ClientSymbol<"svgPointSymbol", SvgPointSymbolDc, never> | ClientSymbol<"maskedImagePointSymbol", MaskedImagePointSymbolDc, never> | ClientSymbol<"imagePointSymbol", ImagePointSymbolDc, never> | ClientSymbol<"simplePolylineSymbol", SimplePolylineSymbolDc, never> | ClientSymbol<"polylineSymbol", PolylineSymbolDc, never> | ClientSymbol<"rasterSymbol", RasterSymbolDc, never> | H3GridSymbolDc | SquareSymbol | PolygonSymbol<FillBrushType, StrokeBrushType> | ClusterSymbolDc;
|
|
66
|
+
export declare const isH3GridSymbol: (symbol: {
|
|
67
|
+
type?: string | undefined;
|
|
68
|
+
}) => symbol is H3GridSymbolDc;
|
|
69
|
+
export declare const isSvgPointSymbol: (symbol: {
|
|
70
|
+
type?: string | undefined;
|
|
71
|
+
}) => symbol is ClientSymbol<"svgPointSymbol", SvgPointSymbolDc, never>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FeatureLayerServiceInfoDc } from '@evergis/api';
|
|
2
2
|
import { LegendConfig } from '../../core';
|
|
3
3
|
export declare const useMapLegend: (layer?: FeatureLayerServiceInfoDc | undefined, config?: LegendConfig | undefined) => {
|
|
4
|
-
symbol: import("../../core").Unclassify<import("../../core").ClientSymbol<"circlePointSymbol", import("@evergis/api").CirclePointSymbolDc, never>> | import("../../core").Unclassify<import("../../core").SquareSymbol> | import("../../core").Unclassify<import("../../core").ClientSymbol<"maskedImagePointSymbol", import("@evergis/api").MaskedImagePointSymbolDc, never>> | import("../../core").Unclassify<import("../../core").ClientSymbol<"imagePointSymbol", import("@evergis/api").ImagePointSymbolDc, never>> | import("../../core").Unclassify<import("../../core").PolygonSymbol<import("../../core").FillBrushType, import("../../core").StrokeBrushType>> | import("../../core").Unclassify<import("../../core").ClientSymbol<"polylineSymbol", import("@evergis/api").PolylineSymbolDc, never>> | import("../../core").Unclassify<import("../../core").ClientSymbol<"simplePolylineSymbol", import("@evergis/api").SimplePolylineSymbolDc, never>> | import("../../core").Unclassify<import("../../core").ClientSymbol<"polylineLabelSymbol", import("@evergis/api").PolylineLabelSymbolDc, "fontColor" | "fontSize" | "haloColor">> | import("../../core").Unclassify<import("../../core").ClientSymbol<"polygonLabelSymbol", import("@evergis/api").PolygonLabelSymbolDc, "fontColor" | "fontSize" | "haloColor">> | import("../../core").Unclassify<import("../../core").ClientSymbol<"labelPointSymbol", import("@evergis/api").PointLabelSymbolDc, "fontColor" | "fontSize" | "haloColor">> | import("../../core").Unclassify<import("../../core").ClientSymbol<"rasterSymbol", import("@evergis/api").RasterSymbolDc, never>> | import("../../core").Unclassify<import("@evergis/api").H3GridSymbolDc> | import("../../core").Unclassify<import("@evergis/api").ClusterSymbolDc>;
|
|
4
|
+
symbol: import("../../core").Unclassify<import("../../core").ClientSymbol<"svgPointSymbol", import("@evergis/api").SvgPointSymbolDc, never>> | import("../../core").Unclassify<import("../../core").ClientSymbol<"circlePointSymbol", import("@evergis/api").CirclePointSymbolDc, never>> | import("../../core").Unclassify<import("../../core").SquareSymbol> | import("../../core").Unclassify<import("../../core").ClientSymbol<"maskedImagePointSymbol", import("@evergis/api").MaskedImagePointSymbolDc, never>> | import("../../core").Unclassify<import("../../core").ClientSymbol<"imagePointSymbol", import("@evergis/api").ImagePointSymbolDc, never>> | import("../../core").Unclassify<import("../../core").PolygonSymbol<import("../../core").FillBrushType, import("../../core").StrokeBrushType>> | import("../../core").Unclassify<import("../../core").ClientSymbol<"polylineSymbol", import("@evergis/api").PolylineSymbolDc, never>> | import("../../core").Unclassify<import("../../core").ClientSymbol<"simplePolylineSymbol", import("@evergis/api").SimplePolylineSymbolDc, never>> | import("../../core").Unclassify<import("../../core").ClientSymbol<"polylineLabelSymbol", import("@evergis/api").PolylineLabelSymbolDc, "fontColor" | "fontSize" | "haloColor">> | import("../../core").Unclassify<import("../../core").ClientSymbol<"polygonLabelSymbol", import("@evergis/api").PolygonLabelSymbolDc, "fontColor" | "fontSize" | "haloColor">> | import("../../core").Unclassify<import("../../core").ClientSymbol<"labelPointSymbol", import("@evergis/api").PointLabelSymbolDc, "fontColor" | "fontSize" | "haloColor">> | import("../../core").Unclassify<import("../../core").ClientSymbol<"rasterSymbol", import("@evergis/api").RasterSymbolDc, never>> | import("../../core").Unclassify<import("@evergis/api").H3GridSymbolDc> | import("../../core").Unclassify<import("@evergis/api").ClusterSymbolDc>;
|
|
5
5
|
items: import("../../core").LegendItem[];
|
|
6
6
|
} | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,9 +4,15 @@ export * from './controls';
|
|
|
4
4
|
export * from './core';
|
|
5
5
|
export * from './hooks';
|
|
6
6
|
export * from './symbols';
|
|
7
|
+
export * from './utils/color';
|
|
8
|
+
export * from './utils/date';
|
|
7
9
|
export * from './utils/format';
|
|
10
|
+
export * from './utils/isNumeric';
|
|
11
|
+
export * from './utils/isObject';
|
|
12
|
+
export * from './utils/isParameterType';
|
|
13
|
+
export * from './utils/legend';
|
|
8
14
|
export * from './utils/math';
|
|
9
15
|
export * from './utils/metersToPixels';
|
|
10
16
|
export * from './utils/polygonCircleFromPoint';
|
|
11
|
-
export * from './utils/
|
|
12
|
-
export * from './utils/
|
|
17
|
+
export * from './utils/svg';
|
|
18
|
+
export * from './utils/url';
|