@evergis/react 2.0.172 → 2.0.173
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 -4
- package/dist/components/Legend/constants.d.ts +12 -1
- package/dist/components/Legend/types.d.ts +15 -7
- package/dist/core/legend/FilterCondition.d.ts +11 -0
- package/dist/core/legend/createCondition.d.ts +8 -0
- package/dist/core/legend/types.d.ts +39 -1
- package/dist/core/style/types/symbol.d.ts +8 -1
- package/dist/react.cjs.development.js +550 -186
- 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 +538 -186
- package/dist/react.esm.js.map +1 -1
- package/dist/utils/legend.d.ts +6 -4
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GeometryType } from "@evergis/api";
|
|
2
2
|
import { ClassifyParameter, ParameterInfo } from "./types";
|
|
3
|
-
import { ClassificationParameter } from "../../core";
|
|
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;
|
|
@@ -30,3 +30,14 @@ export declare const SYMBOL_LIMITS: {
|
|
|
30
30
|
};
|
|
31
31
|
export declare const DEFAULT_PARAMETER_INFO: ParameterInfo;
|
|
32
32
|
export declare const PARAMETER_INFOS: Partial<Record<ClassificationParameter, ParameterInfo>>;
|
|
33
|
+
export declare const OPERATOR_CONDITION_REMAP: Record<ComparisonOperator, string>;
|
|
34
|
+
export declare const BASE_OPERATORS: ComparisonOperator[];
|
|
35
|
+
export declare const CONTAINS_OPERATORS: ComparisonOperator[];
|
|
36
|
+
export declare const FILLED_OPERATORS: ComparisonOperator[];
|
|
37
|
+
export declare const STARTS_WITH_OPERATORS: ComparisonOperator[];
|
|
38
|
+
export declare const ENDS_WITH_OPERATORS: ComparisonOperator[];
|
|
39
|
+
export declare const RANGE_OPERATORS: ComparisonOperator[];
|
|
40
|
+
export declare const BETWEEN_OPERATORS: ComparisonOperator[];
|
|
41
|
+
export declare const numberComparisonOperators: ComparisonOperator[];
|
|
42
|
+
export declare const dateComparisonOperators: ComparisonOperator[];
|
|
43
|
+
export declare const textComparisonOperators: ComparisonOperator[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import { AttributeType, PointLabelSymbolDc, SvgPointSymbolDc, StyleDc } from "@evergis/api";
|
|
2
|
+
import { AttributeType, PointLabelSymbolDc, SvgPointSymbolDc, StyleDc, FeatureLayerServiceInfoDc } from "@evergis/api";
|
|
3
3
|
import { MaskedImage } from "@evergis/sgis/es/symbols/point/MaskedImage";
|
|
4
4
|
import { H3Symbol } from "@evergis/sgis/es/symbols/H3Symbol";
|
|
5
5
|
import { ClassificationParameterExtended, LegendValueType, ParameterByAttribute, ParameterValue, StyleSymbolType, SvgPointSymbol } from "../../core";
|
|
@@ -19,16 +19,23 @@ export declare const enum Units {
|
|
|
19
19
|
Count = "pcs",
|
|
20
20
|
Degrees = "\u00B0"
|
|
21
21
|
}
|
|
22
|
-
export declare type
|
|
22
|
+
export declare type LegendProps = {
|
|
23
|
+
layerInfo: FeatureLayerServiceInfoDc;
|
|
24
|
+
hiddenLegends?: Record<string, string[]>;
|
|
25
|
+
toggleHiddenLegend?: (layerName: string, hiddenCondition: string) => void;
|
|
26
|
+
};
|
|
27
|
+
export declare type LegendSectionProps = Pick<LegendProps, "hiddenLegends" | "toggleHiddenLegend"> & {
|
|
28
|
+
layerName: string;
|
|
23
29
|
symbol: StyleDc["symbol"];
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
parameter: ClassificationParameterExtended;
|
|
31
|
+
parameters: ClassificationParameterExtended[];
|
|
26
32
|
classified: ParameterByAttribute<ParameterValue>;
|
|
33
|
+
attributeName: string;
|
|
27
34
|
attributeTitle: string;
|
|
28
35
|
attributeType: AttributeType;
|
|
29
36
|
index: number;
|
|
30
37
|
};
|
|
31
|
-
export declare type LegendSectionItem = {
|
|
38
|
+
export declare type LegendSectionItem = Pick<LegendProps, "hiddenLegends" | "toggleHiddenLegend"> & {
|
|
32
39
|
attributeType: AttributeType;
|
|
33
40
|
symbol: StyleSymbolType;
|
|
34
41
|
title: string;
|
|
@@ -36,11 +43,14 @@ export declare type LegendSectionItem = {
|
|
|
36
43
|
hiddenCondition?: string;
|
|
37
44
|
};
|
|
38
45
|
export declare type MaximizedLegendProps = {
|
|
46
|
+
layerName: string;
|
|
39
47
|
symbol: StyleDc["symbol"];
|
|
40
48
|
parameter: ClassificationParameterExtended;
|
|
41
49
|
values: LegendSectionItem[];
|
|
42
50
|
attributeType: AttributeType;
|
|
43
51
|
index: number;
|
|
52
|
+
hiddenLegends?: string[];
|
|
53
|
+
toggleHiddenLegend?: (layerName: string, hiddenCondition: string) => void;
|
|
44
54
|
};
|
|
45
55
|
export declare type SvgSymbolProps = {
|
|
46
56
|
svg: string;
|
|
@@ -66,11 +76,9 @@ export declare type SvgEditorField = Pick<SvgPointSymbol, "size" | "offset" | "a
|
|
|
66
76
|
};
|
|
67
77
|
export declare type MinimizedLegendProps = {
|
|
68
78
|
title?: string | ReactNode;
|
|
69
|
-
defaultValue: string;
|
|
70
79
|
values: LegendValueType[];
|
|
71
80
|
parameter: ClassificationParameterExtended;
|
|
72
81
|
hiddenLegends?: string[];
|
|
73
|
-
attributeType?: AttributeType;
|
|
74
82
|
};
|
|
75
83
|
export declare type MapLegendItemProps = {
|
|
76
84
|
value?: string | number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FilterConditionOperation, FilterConditionType } from "./index";
|
|
2
|
+
export declare class FilterCondition {
|
|
3
|
+
private condition;
|
|
4
|
+
private readonly conditionInterpreter;
|
|
5
|
+
constructor(condition?: string | null);
|
|
6
|
+
static from(conditions: FilterConditionType[], operation: FilterConditionOperation): FilterCondition;
|
|
7
|
+
get conditions(): FilterConditionType[];
|
|
8
|
+
get conditionOperation(): FilterConditionOperation | null;
|
|
9
|
+
isParsingError(): boolean;
|
|
10
|
+
toString(): string | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Expression } from "@evergis/condition";
|
|
2
|
+
import { AttributeType } from "@evergis/api";
|
|
3
|
+
import { ComparisonOperator, FilterConditionType } from "./types";
|
|
4
|
+
export declare const comparisonOperatorMapReversed: Record<string, ComparisonOperator>;
|
|
5
|
+
export declare const NUMERIC_ATTRIBUTE_TYPES: AttributeType[];
|
|
6
|
+
export declare function formatCondition(condition: FilterConditionType): string;
|
|
7
|
+
export declare function createConditionString(condition: FilterConditionType): string;
|
|
8
|
+
export declare function createCondition({ attribute, operation, value }: Expression): FilterConditionType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { FeatureLayerServiceInfoDc } from '@evergis/api';
|
|
2
|
+
import { AttributeType, FeatureLayerServiceInfoDc } from '@evergis/api';
|
|
3
3
|
import { ClassificationAttribute } from '../attributes';
|
|
4
4
|
import { ClassificationClass, ClassificationParameterExtended } from '../classification';
|
|
5
5
|
import { LayerAttributes } from '../layer';
|
|
@@ -30,3 +30,41 @@ export declare type LegendConfig = {
|
|
|
30
30
|
searchLayer?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
31
31
|
parameters?: ClassificationParameterExtended[];
|
|
32
32
|
};
|
|
33
|
+
export declare enum FilterConditionOperation {
|
|
34
|
+
AND = "&&",
|
|
35
|
+
OR = "||"
|
|
36
|
+
}
|
|
37
|
+
export declare enum ComparisonOperator {
|
|
38
|
+
/** `==` */
|
|
39
|
+
Equals = "Equals",
|
|
40
|
+
/** `!=` */
|
|
41
|
+
NotEquals = "NotEquals",
|
|
42
|
+
/** `>` */
|
|
43
|
+
GreaterThan = "GreaterThan",
|
|
44
|
+
/** `<` */
|
|
45
|
+
LessThan = "LessThan",
|
|
46
|
+
/** `>=` */
|
|
47
|
+
GreaterOrEquals = "GreaterOrEquals",
|
|
48
|
+
/** `<=` */
|
|
49
|
+
LessOrEquals = "LessOrEquals",
|
|
50
|
+
Filled = "Filled",
|
|
51
|
+
Empty = "Empty",
|
|
52
|
+
/** `==` */
|
|
53
|
+
Contains = "Contains",
|
|
54
|
+
/** `!=` */
|
|
55
|
+
NotContains = "NotContains",
|
|
56
|
+
StartsWith = "StartsWith",
|
|
57
|
+
NotStartsWith = "NotStartsWith",
|
|
58
|
+
EndsWith = "EndsWith",
|
|
59
|
+
NotEndsWith = "NotEndsWith",
|
|
60
|
+
Between = "Between",
|
|
61
|
+
Outside = "Outside"
|
|
62
|
+
}
|
|
63
|
+
export interface FilterCondition<Value> {
|
|
64
|
+
id?: string;
|
|
65
|
+
attribute: string | null;
|
|
66
|
+
type?: AttributeType;
|
|
67
|
+
comparisonOperator: ComparisonOperator | null;
|
|
68
|
+
value: Value | string[] | null;
|
|
69
|
+
}
|
|
70
|
+
export declare type FilterConditionType = FilterCondition<string | number>;
|
|
@@ -3,6 +3,7 @@ import { LabelType } from './label';
|
|
|
3
3
|
import { CalculatedAble } from './parameterValue';
|
|
4
4
|
import { ClientSymbol } from './utils';
|
|
5
5
|
import { FillBrushType, StrokeBrushType } from './brush';
|
|
6
|
+
import { ClassificationParameterExtended } from "../../classification";
|
|
6
7
|
export declare type PointSymbol = ClientSymbol<'circlePointSymbol', CirclePointSymbolDc>;
|
|
7
8
|
export declare type SvgPointSymbol = ClientSymbol<'svgPointSymbol', SvgPointSymbolDc>;
|
|
8
9
|
export declare type SquareSymbol = ClientSymbol<'squarePointSymbol', SquarePointSymbolDc> & {
|
|
@@ -17,6 +18,7 @@ export declare type PolygonSymbol<Fill = FillBrushType, Stroke = StrokeBrushType
|
|
|
17
18
|
export declare type SimplePolylineSymbol = ClientSymbol<'simplePolylineSymbol', SimplePolylineSymbolDc>;
|
|
18
19
|
export declare type PolylineSymbol = ClientSymbol<'polylineSymbol', PolylineSymbolDc>;
|
|
19
20
|
export declare type RasterSymbol = ClientSymbol<'rasterSymbol', RasterSymbolDc>;
|
|
21
|
+
export declare type ClusterSymbolType = ClientSymbol<"cluster", ClusterSymbolDc>;
|
|
20
22
|
export declare type CompositeSymbolType = ClientSymbol<'compositeSymbol', CompositeSymbolDc>;
|
|
21
23
|
export declare type H3GridSymbol = ClientSymbol<'h3grid', H3GridSymbolDc>;
|
|
22
24
|
export declare type SimpleShapeSymbol = PointSymbol | SquareSymbol;
|
|
@@ -62,10 +64,15 @@ export declare const isTwoDimensionalSymbol: (symbol: UnknownSymbol) => symbol i
|
|
|
62
64
|
export declare const isSizableSymbol: (symbol: UnknownSymbol) => symbol is SimpleShapeSymbol;
|
|
63
65
|
export declare const isStrokeStyledSymbol: (symbol: UnknownSymbol) => symbol is StrokeStyledSymbols;
|
|
64
66
|
export declare const isScalablePolylineSymbol: (symbol: PolylineSymbol | SimplePolylineSymbol) => boolean | undefined;
|
|
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
|
|
67
|
+
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> | ClusterSymbolDc | H3GridSymbolDc | SquareSymbol | PolygonSymbol<FillBrushType, StrokeBrushType>;
|
|
66
68
|
export declare const isH3GridSymbol: (symbol: {
|
|
67
69
|
type?: string | undefined;
|
|
68
70
|
}) => symbol is H3GridSymbolDc;
|
|
69
71
|
export declare const isSvgPointSymbol: (symbol: {
|
|
70
72
|
type?: string | undefined;
|
|
71
73
|
}) => symbol is ClientSymbol<"svgPointSymbol", SvgPointSymbolDc, never>;
|
|
74
|
+
export declare const isClusterSymbol: (symbol: {
|
|
75
|
+
type?: string | undefined;
|
|
76
|
+
}) => symbol is ClientSymbol<"cluster", ClusterSymbolDc, never>;
|
|
77
|
+
export declare const isClusterFillColor: (symbol: StyleSymbolType, parameter: ClassificationParameterExtended) => boolean;
|
|
78
|
+
export declare const getExtractedSymbol: (symbol: StyleSymbolType, extractCluster?: boolean) => StyleSymbolType;
|