@evergis/react 2.0.190 → 2.0.192
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 +2 -2
- package/dist/components/Legend/components/ClusterSymbolPreview.d.ts +7 -0
- package/dist/components/Legend/components/LegendChildren.d.ts +3 -0
- package/dist/components/Legend/components/LegendSection.d.ts +2 -2
- package/dist/components/Legend/components/LegendSymbolRenderer.d.ts +2 -2
- package/dist/components/Legend/components/MaximizedLegend.d.ts +2 -2
- package/dist/components/Legend/components/SvgSymbol.d.ts +2 -2
- package/dist/components/Legend/constants.d.ts +4 -3
- package/dist/components/Legend/styled.d.ts +3 -2
- package/dist/components/Legend/types.d.ts +23 -20
- package/dist/components/Legend/utils/getConditionAttribute.d.ts +2 -0
- package/dist/components/Legend/utils/getLegendText.d.ts +5 -0
- package/dist/components/Legend/utils/isHiddenLegend.d.ts +1 -0
- package/dist/core/classification/getClassifications.d.ts +2 -2
- package/dist/core/classification/parameterValue.d.ts +4 -4
- package/dist/core/classification/types.d.ts +1 -1
- package/dist/core/style/types/parameterValue.d.ts +2 -2
- package/dist/react.cjs.development.js +372 -246
- 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 +369 -247
- package/dist/react.esm.js.map +1 -1
- package/dist/utils/legend.d.ts +15 -13
- package/package.json +2 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FC } from
|
|
2
|
-
import { LegendProps } from
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { LegendProps } from './types';
|
|
3
3
|
export declare const Legend: FC<LegendProps>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FC } from
|
|
2
|
-
import { LegendSectionProps } from
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { LegendSectionProps } from '../types';
|
|
3
3
|
export declare const LegendSection: FC<LegendSectionProps>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FC } from
|
|
2
|
-
import { MaximizedLegendProps } from
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { MaximizedLegendProps } from '../types';
|
|
3
3
|
export declare const MaximizedLegend: FC<MaximizedLegendProps>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FC } from
|
|
2
|
-
import { SvgSymbolProps } from
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { SvgSymbolProps } from '../types';
|
|
3
3
|
export declare const SvgSymbol: FC<SvgSymbolProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { GeometryType } from
|
|
2
|
-
import { ClassifyParameter, ParameterInfo } from
|
|
3
|
-
import { ClassificationParameter, ComparisonOperator } from
|
|
1
|
+
import { GeometryType } from '@evergis/api';
|
|
2
|
+
import { ClassifyParameter, ParameterInfo } from './types';
|
|
3
|
+
import { ClassificationParameter, ComparisonOperator } from '../../core';
|
|
4
4
|
export declare const DEFAULT_LEGEND_SYMBOL_SIZE = 26;
|
|
5
5
|
export declare const EXTRA_BORDER_SIZE = 4;
|
|
6
6
|
export declare const DEFAULT_SYMBOL_SIZE = 20;
|
|
@@ -8,6 +8,7 @@ export declare const DEFAULT_SYMBOL_WITH_BG_SIZE = 24;
|
|
|
8
8
|
export declare const DEFAULT_SYMBOL_FILL_COLOR = "rgba(0, 163, 245, 1)";
|
|
9
9
|
export declare const DEFAULT_SYMBOL_STROKE_COLOR = "rgb(255, 255, 255)";
|
|
10
10
|
export declare const DEFAULT_SYMBOL_OFFSET: number[];
|
|
11
|
+
export declare const DEFAULT_CLUSTER_SVG = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 56 56\" width=\"56px\" height=\"56px\">\n <circle cx=\"28\" cy=\"28\" r=\"22\" fill=\"#00AAFF\" stroke=\"#00AAFF\" stroke-opacity=\"0.28\" stroke-width=\"12\" id=\"symbol-bg\" />\n</svg>\n";
|
|
11
12
|
export declare const SYMBOL_CLASSIFICATION: Partial<Record<GeometryType, ClassifyParameter[]>>;
|
|
12
13
|
export declare const SYMBOL_LIMITS: {
|
|
13
14
|
SIZE_MIN: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ClassificationParameterExtended } from
|
|
3
|
-
import { MapLegendItemProps } from
|
|
2
|
+
import { ClassificationParameterExtended } from '../../core';
|
|
3
|
+
import { MapLegendItemProps } from './types';
|
|
4
4
|
export declare const MapLegendDescription: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
5
|
export declare const ItemText: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
6
|
export declare const ItemSeparator: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -48,3 +48,4 @@ export declare const MapLegendValues: import("styled-components").StyledComponen
|
|
|
48
48
|
export declare const MapLegendValuesRange: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
49
49
|
export declare const MapLegendValuesOther: import("styled-components").StyledComponent<"div", any, MapLegendItemProps, never>;
|
|
50
50
|
export declare const MapLegendExpandButton: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
51
|
+
export declare const ClusterLegendContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ReactNode, RefObject } from
|
|
2
|
-
import { AttributeType, PointLabelSymbolDc, SvgPointSymbolDc, StyleDc, FeatureLayerServiceInfoDc, AttributeFormatDc, FeatureDc } from
|
|
3
|
-
import { MaskedImage } from
|
|
4
|
-
import { H3Symbol } from
|
|
5
|
-
import { Coordinates } from
|
|
6
|
-
import { ClassificationParameterExtended, LayerAttribute, LegendValueType, ParameterByAttribute,
|
|
7
|
-
import { SGisBrushFill, SGisImageFill, SGisPolygonSymbol, SGisPolylineSymbol } from
|
|
8
|
-
export declare type ClassifyParameter =
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
|
+
import { AttributeType, PointLabelSymbolDc, SvgPointSymbolDc, StyleDc, FeatureLayerServiceInfoDc, AttributeFormatDc, FeatureDc } from '@evergis/api';
|
|
3
|
+
import { MaskedImage } from '@evergis/sgis/es/symbols/point/MaskedImage';
|
|
4
|
+
import { H3Symbol } from '@evergis/sgis/es/symbols/H3Symbol';
|
|
5
|
+
import { Coordinates } from '@evergis/sgis/es/baseTypes';
|
|
6
|
+
import { ClassificationParameterExtended, LayerAttribute, LegendValueType, ParameterByAttribute, ParameterValueWithSymbol, StyleSymbolType, SvgPointSymbol } from '../../core';
|
|
7
|
+
import { SGisBrushFill, SGisImageFill, SGisPolygonSymbol, SGisPolylineSymbol } from '../../symbols';
|
|
8
|
+
export declare type ClassifyParameter = 'fill.color' | 'fill.hatchColor' | 'fillColor' | 'stroke.width' | 'stroke.color' | 'strokeWidth' | 'strokeColor' | 'textBackground.fill.color' | 'background.fillColor' | 'background.strokeColor' | 'background.strokeWidth' | 'figure.fillColor' | 'fontColor' | 'haloColor' | 'size' | 'symbol' | 'angle' | 'maskedColor' | 'endingSize' | 'beginningSize' | 'maxObjectCount' | 'gridSize' | 'selectionObjectsLimit' | 'singleObjectSymbol.figure.fillColor' | 'singleObjectSymbol.background.fillColor';
|
|
9
9
|
export interface ParameterInfo {
|
|
10
10
|
min: number;
|
|
11
11
|
max: number;
|
|
@@ -21,7 +21,7 @@ export declare const enum Units {
|
|
|
21
21
|
Degrees = "\u00B0"
|
|
22
22
|
}
|
|
23
23
|
export declare type Positions = Coordinates | Coordinates[] | Coordinates[][];
|
|
24
|
-
export declare type FeaturedDcExtendedGeometry = Omit<FeatureDc[
|
|
24
|
+
export declare type FeaturedDcExtendedGeometry = Omit<FeatureDc['geometry'], 'coordinates'> & {
|
|
25
25
|
coordinates?: Positions;
|
|
26
26
|
};
|
|
27
27
|
export declare type LegendProps = {
|
|
@@ -30,16 +30,19 @@ export declare type LegendProps = {
|
|
|
30
30
|
hiddenLegends?: Record<string, string[]>;
|
|
31
31
|
toggleHiddenLegend?: (layerName: string, hiddenCondition: string) => void;
|
|
32
32
|
};
|
|
33
|
-
export declare type
|
|
33
|
+
export declare type LegendChildrenProps = Pick<LegendProps, 'hiddenLegends' | 'toggleHiddenLegend' | 'formatValue'> & {
|
|
34
|
+
layerInfo: FeatureLayerServiceInfoDc;
|
|
35
|
+
};
|
|
36
|
+
export declare type LegendSectionProps = Pick<LegendProps, 'hiddenLegends' | 'toggleHiddenLegend' | 'formatValue'> & {
|
|
34
37
|
layerName: string;
|
|
35
|
-
symbol: StyleDc[
|
|
38
|
+
symbol: StyleDc['symbol'];
|
|
36
39
|
parameter: ClassificationParameterExtended;
|
|
37
40
|
parameters: ClassificationParameterExtended[];
|
|
38
|
-
classified: ParameterByAttribute<
|
|
39
|
-
attribute: LayerAttribute;
|
|
41
|
+
classified: ParameterByAttribute<ParameterValueWithSymbol>;
|
|
42
|
+
attribute: LayerAttribute | null;
|
|
40
43
|
index: number;
|
|
41
44
|
};
|
|
42
|
-
export declare type LegendSectionItem = Pick<LegendProps,
|
|
45
|
+
export declare type LegendSectionItem = Pick<LegendProps, 'hiddenLegends' | 'toggleHiddenLegend'> & {
|
|
43
46
|
attributeType: AttributeType;
|
|
44
47
|
symbol: StyleSymbolType;
|
|
45
48
|
title: string;
|
|
@@ -50,7 +53,7 @@ export declare type MaximizedLegendProps = {
|
|
|
50
53
|
innerRef?: RefObject<HTMLDivElement> | undefined;
|
|
51
54
|
isShown?: boolean;
|
|
52
55
|
layerName: string;
|
|
53
|
-
symbol: StyleDc[
|
|
56
|
+
symbol: StyleDc['symbol'];
|
|
54
57
|
parameter: ClassificationParameterExtended;
|
|
55
58
|
values: LegendSectionItem[];
|
|
56
59
|
attributeType: AttributeType;
|
|
@@ -74,11 +77,11 @@ export declare enum SvgSymbolBg {
|
|
|
74
77
|
Circle = "circle"
|
|
75
78
|
}
|
|
76
79
|
export declare type SGisSymbol = MaskedImage | SvgPointSymbolDc | SGisPolylineSymbol | SGisPolygonSymbol | SGisImageFill | SGisBrushFill | H3Symbol;
|
|
77
|
-
export declare type SvgEditorField = Pick<SvgPointSymbol,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
export declare type SvgEditorField = Pick<SvgPointSymbol, 'size' | 'offset' | 'angle'> & {
|
|
81
|
+
'background.fillColor': string;
|
|
82
|
+
'background.strokeColor': string;
|
|
83
|
+
'background.strokeWidth': string;
|
|
84
|
+
'figure.fillColor': string;
|
|
82
85
|
};
|
|
83
86
|
export declare type MinimizedLegendProps = {
|
|
84
87
|
innerRef?: RefObject<HTMLDivElement> | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isHiddenLegend: (hiddenCondition: string, hiddenLegends?: string[] | undefined) => boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ClassificationExtras, ClassificationParameterExtended, ExtendedClassification } from './types';
|
|
2
|
-
import { ParameterByAttributeValue,
|
|
3
|
-
export declare const toClassification: (values: (ParameterByAttributeValue<
|
|
2
|
+
import { ParameterByAttributeValue, ParameterValueWithSymbol, Style, StyleSymbolType } from '../style';
|
|
3
|
+
export declare const toClassification: (values: (ParameterByAttributeValue<ParameterValueWithSymbol> | Style)[], parameter: ClassificationParameterExtended, extras?: ClassificationExtras) => ExtendedClassification;
|
|
4
4
|
export declare const getClassifications: (symbol: StyleSymbolType, pathContext?: ClassificationParameterExtended[]) => ExtendedClassification[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ClassificationParameterExtended, ParameterValueModifier } from './types';
|
|
2
|
-
import { CalculatedAble, CalculatedParameter, ClassifyAble, ParameterByAttribute, ParameterValue, StyleSymbolType, UnidentifiedParameterValue } from '../style';
|
|
3
|
-
export declare const isParameterByAttribute: (value: UnidentifiedParameterValue) => value is ParameterByAttribute<
|
|
4
|
-
export declare const isCalculatedParameter: (value: UnidentifiedParameterValue) => value is CalculatedParameter<
|
|
5
|
-
export declare const getParameterValue: <Value extends
|
|
2
|
+
import { CalculatedAble, CalculatedParameter, ClassifyAble, ParameterByAttribute, ParameterValue, ParameterValueWithSymbol, StyleSymbolType, UnidentifiedParameterValue } from '../style';
|
|
3
|
+
export declare const isParameterByAttribute: (value: UnidentifiedParameterValue) => value is ParameterByAttribute<ParameterValueWithSymbol>;
|
|
4
|
+
export declare const isCalculatedParameter: (value: UnidentifiedParameterValue) => value is CalculatedParameter<ParameterValueWithSymbol>;
|
|
5
|
+
export declare const getParameterValue: <Value extends ParameterValueWithSymbol>(value: Value | ParameterByAttribute<Value> | CalculatedParameter<Value>) => Value;
|
|
6
6
|
export declare const symbolParameterWalker: (valueModifier: ParameterValueModifier) => <S extends StyleSymbolType>(symbol: S, parameter: ClassificationParameterExtended | ClassificationParameterExtended[]) => S;
|
|
7
7
|
export declare const setDefaultParameterValue: <S extends StyleSymbolType>(symbol: S, parameter: ClassificationParameterExtended | ClassificationParameterExtended[]) => S;
|
|
8
8
|
export declare const setParameterValue: <S extends StyleSymbolType>(symbol: S, path: ClassificationParameterExtended, value: ClassifyAble<ParameterValue>) => S;
|
|
@@ -32,7 +32,7 @@ export declare type RangeClassification = Classification<ClassificationType.Rang
|
|
|
32
32
|
export declare type UniqueClassification = Classification<ClassificationType.Unique, UniqueClass>;
|
|
33
33
|
export interface ClassificationExtras {
|
|
34
34
|
defaultTitle: string;
|
|
35
|
-
defaultValue:
|
|
35
|
+
defaultValue: ParameterValueWithSymbol;
|
|
36
36
|
}
|
|
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;
|
|
@@ -19,8 +19,8 @@ export declare type CalculatedParameter<Value> = {
|
|
|
19
19
|
export declare type ClassifyAble<Value> = Value | ParameterByAttribute<Value>;
|
|
20
20
|
export declare type CalculatedAble<Value> = Value | CalculatedParameter<Value>;
|
|
21
21
|
export declare type ParameterValue = string | number | number[] | Date;
|
|
22
|
-
export declare type
|
|
23
|
-
export declare type
|
|
22
|
+
export declare type ParameterValueWithSymbol = ParameterValue | StyleSymbolType;
|
|
23
|
+
export declare type ParameterByAttributeValues = ParameterByAttributeValue<ParameterValueWithSymbol>[];
|
|
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>;
|