@evergis/react 2.0.137 → 2.0.139
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/MapLegend/MinimizedLegend.d.ts +3 -0
- package/dist/components/MapLegend/styled.d.ts +6 -4
- package/dist/components/MapLegend/types.d.ts +7 -0
- package/dist/contexts/LegendContext.d.ts +1 -1
- package/dist/core/classification/types.d.ts +1 -1
- package/dist/core/feature/getFeatureSymbol.d.ts +1 -1
- package/dist/core/style/EvergisStyle.d.ts +1 -1
- package/dist/hooks/useLegend/useLegendValueSymbol.d.ts +1 -1
- package/dist/hooks/useLegend/useMapLegend.d.ts +2 -2
- package/dist/react.cjs.development.js +74 -26
- 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 +75 -27
- package/dist/react.esm.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,16 +2,18 @@ export declare const MapLegendControl: import("styled-components").StyledCompone
|
|
|
2
2
|
export declare const MapLegendContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
export declare const MapLegendHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
4
|
export declare const MapLegendValueDescr: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
-
export declare const MapLegendItems: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
5
|
export declare const MapLegendItem: import("styled-components").StyledComponent<"div", any, {
|
|
7
|
-
value?: string | undefined;
|
|
6
|
+
value?: string | number | undefined;
|
|
8
7
|
}, never>;
|
|
9
8
|
export declare const MapLegendOther: import("styled-components").StyledComponent<"div", any, {
|
|
10
|
-
value?: string | undefined;
|
|
9
|
+
value?: string | number | undefined;
|
|
10
|
+
}, never>;
|
|
11
|
+
export declare const MapLegendItems: import("styled-components").StyledComponent<"div", any, {
|
|
12
|
+
overlay?: boolean | undefined;
|
|
11
13
|
}, never>;
|
|
12
14
|
export declare const MapLegendValues: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
13
15
|
export declare const MapLegendValuesRange: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
14
16
|
export declare const MapLegendValuesOther: import("styled-components").StyledComponent<"div", any, {
|
|
15
|
-
value?: string | undefined;
|
|
17
|
+
value?: string | number | undefined;
|
|
16
18
|
}, never>;
|
|
17
19
|
export declare const MapLegendExpandButton: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { LegendProps } from "../Legend";
|
|
2
|
+
import { LegendValueType } from "../../core";
|
|
2
3
|
export declare type MapLegendProps = LegendProps & {
|
|
3
4
|
fromToTitle?: [string, string];
|
|
4
5
|
className?: string;
|
|
5
6
|
};
|
|
7
|
+
export declare type MinimizedLegendProps = {
|
|
8
|
+
title?: string;
|
|
9
|
+
defaultValue: string;
|
|
10
|
+
values: LegendValueType[];
|
|
11
|
+
overlay?: boolean;
|
|
12
|
+
};
|
|
@@ -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> | null;
|
|
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 | null;
|
|
8
8
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ParameterValue, ParameterValueWithSymbol } from '../style';
|
|
2
2
|
import { ClassificationAttribute } from '../attributes';
|
|
3
|
-
export declare type NestedClassificationParameters = 'fill.color' | 'fill.hatchColor' | 'stroke.width' | 'stroke.color';
|
|
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';
|
|
5
5
|
export declare type ClassificationParameter = NestedClassificationParameters | SimpleClassificationParameters;
|
|
6
6
|
export declare type ClassificationParameterExtended = ClassificationParameter | 'width' | 'height';
|
|
@@ -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> | 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 | 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"
|
|
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;
|
|
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;
|
|
@@ -3,4 +3,4 @@ export declare type LegendSymbolPart = {
|
|
|
3
3
|
parameter: ClassificationParameterExtended;
|
|
4
4
|
parameterValue: ParameterValueWithSymbol;
|
|
5
5
|
};
|
|
6
|
-
export declare const useLegendValueSymbol: ({ parameter, parameterValue, }: LegendSymbolPart) => import("@evergis/sgis/es/symbols/point/Point").PointSymbol | import("@evergis/sgis/es/symbols/point/StaticImageSymbol").StaticImageSymbol | import("@evergis/sgis/es/symbols/point/Square").SquareSymbol | import("@evergis/sgis/es/symbols/point/MaskedImage").MaskedImage | import("@evergis/sgis/es/symbols/polygon/Simple").PolygonSymbol | import("@evergis/sgis/es/symbols/polygon/BrushFill").BrushFill | import("@evergis/sgis/es/symbols/polygon/ImageFill").ImageFill | import("@evergis/sgis/es/symbols/PolylineSymbol").PolylineSymbol | import("
|
|
6
|
+
export declare const useLegendValueSymbol: ({ parameter, parameterValue, }: LegendSymbolPart) => import("@evergis/sgis/es/symbols/point/Point").PointSymbol | import("@evergis/sgis/es/symbols/point/StaticImageSymbol").StaticImageSymbol | import("@evergis/sgis/es/symbols/point/Square").SquareSymbol | import("@evergis/sgis/es/symbols/point/MaskedImage").MaskedImage | import("@evergis/sgis/es/symbols/polygon/Simple").PolygonSymbol | import("@evergis/sgis/es/symbols/polygon/BrushFill").BrushFill | import("@evergis/sgis/es/symbols/polygon/ImageFill").ImageFill | import("@evergis/sgis/es/symbols/PolylineSymbol").PolylineSymbol | import("@evergis/sgis/es/symbols/H3Symbol").H3Symbol | null;
|
|
@@ -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
|
|
5
|
-
|
|
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>;
|
|
5
|
+
items: import("../../core").LegendItem[];
|
|
6
6
|
} | null;
|
|
@@ -3451,10 +3451,9 @@ const useMapLegend = (layer, config) => {
|
|
|
3451
3451
|
return null;
|
|
3452
3452
|
}
|
|
3453
3453
|
|
|
3454
|
-
const firstLegend = legend.items[0];
|
|
3455
3454
|
return {
|
|
3456
3455
|
symbol: legend.symbol,
|
|
3457
|
-
|
|
3456
|
+
items: legend.items
|
|
3458
3457
|
};
|
|
3459
3458
|
};
|
|
3460
3459
|
|
|
@@ -4728,7 +4727,7 @@ const LegendContainer = /*#__PURE__*/styled__default.div(_templateObject$2 || (_
|
|
|
4728
4727
|
const LegendSectionContainer = /*#__PURE__*/styled__default.div(_templateObject2$1 || (_templateObject2$1 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
4729
4728
|
const LegendSymbolTitle = /*#__PURE__*/styled__default.p(_templateObject3$1 || (_templateObject3$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n"])));
|
|
4730
4729
|
const LegendValueContainer = /*#__PURE__*/styled__default.div(_templateObject4$1 || (_templateObject4$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n font-size: 0.75rem;\n\n ", " {\n padding-left: 0.5rem;\n }\n"])), LegendSymbolTitle);
|
|
4731
|
-
const LegendSectionHeader = /*#__PURE__*/styled__default.div(_templateObject5$1 || (_templateObject5$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 0.75rem;\n font-weight:
|
|
4730
|
+
const LegendSectionHeader = /*#__PURE__*/styled__default.div(_templateObject5$1 || (_templateObject5$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 1rem;\n"])));
|
|
4732
4731
|
|
|
4733
4732
|
const LegendSection = _ref => {
|
|
4734
4733
|
let {
|
|
@@ -4993,23 +4992,43 @@ const Fullscreen = () => {
|
|
|
4993
4992
|
}));
|
|
4994
4993
|
};
|
|
4995
4994
|
|
|
4996
|
-
var _templateObject$6, _templateObject2$5, _templateObject3$5, _templateObject4$4, _templateObject5$4, _templateObject6$2, _templateObject7$2, _templateObject8$2, _templateObject9$1, _templateObject10$1, _templateObject11$1;
|
|
4995
|
+
var _templateObject$6, _templateObject2$5, _templateObject3$5, _templateObject4$4, _templateObject5$4, _templateObject6$2, _templateObject7$2, _templateObject8$2, _templateObject9$1, _templateObject10$1, _templateObject11$1, _templateObject12$1, _templateObject13$1;
|
|
4997
4996
|
const MapLegendControl = /*#__PURE__*/styled__default(MapControl)(_templateObject$6 || (_templateObject$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: default;\n"])));
|
|
4998
4997
|
const MapLegendContainer = /*#__PURE__*/styled__default.div(_templateObject2$5 || (_templateObject2$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n width: 12.5rem;\n box-sizing: border-box;\n\n canvas {\n height: 1.625rem;\n width: 1.625rem;\n }\n"])));
|
|
4999
4998
|
const MapLegendHeader = /*#__PURE__*/styled__default(LegendSectionHeader)(_templateObject3$5 || (_templateObject3$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-width: 15rem;\n margin-bottom: 0.25rem;\n font-weight: 500;\n"])));
|
|
5000
|
-
const MapLegendValueDescr = /*#__PURE__*/styled__default.div(_templateObject4$4 || (_templateObject4$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 0.25rem;\n font-size: 0.75rem;\n font-weight:
|
|
5001
|
-
const
|
|
5002
|
-
const MapLegendItem = /*#__PURE__*/styled__default.div(_templateObject6$2 || (_templateObject6$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n height: 1rem;\n background-color: ", ";\n border: 1px rgba(48, 69, 79, 0.1) solid;\n"])), _ref => {
|
|
4999
|
+
const MapLegendValueDescr = /*#__PURE__*/styled__default.div(_templateObject4$4 || (_templateObject4$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 0.25rem;\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 1rem;\n"])));
|
|
5000
|
+
const MapLegendItem = /*#__PURE__*/styled__default.div(_templateObject5$4 || (_templateObject5$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n height: 1rem;\n background: ", ";\n border: 1px rgba(48, 69, 79, 0.1) solid;\n margin-right: -1px;\n \n ", "\n"])), _ref => {
|
|
5003
5001
|
let {
|
|
5004
5002
|
value
|
|
5005
5003
|
} = _ref;
|
|
5006
|
-
return value;
|
|
5004
|
+
return typeof value === "number" ? "none" : value;
|
|
5005
|
+
}, _ref2 => {
|
|
5006
|
+
let {
|
|
5007
|
+
value
|
|
5008
|
+
} = _ref2;
|
|
5009
|
+
return !!value && typeof value === "number" && SizeLegendMixin(value);
|
|
5010
|
+
});
|
|
5011
|
+
const MapLegendOther = /*#__PURE__*/styled__default(MapLegendItem)(_templateObject6$2 || (_templateObject6$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: none;\n width: 1rem;\n margin-left: 0.25rem;\n border-radius: 0.125rem;\n"])));
|
|
5012
|
+
const SizeOverlayLegendMixin = /*#__PURE__*/styled.css(_templateObject7$2 || (_templateObject7$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n width: 2rem;\n height: 2rem;\n \n ", ", ", " {\n flex: none;\n position: absolute;\n top: 0;\n left: 50%;\n width: inherit;\n height: inherit;\n margin-left: -1rem;\n \n :after {\n top: 0;\n margin-top: 0;\n }\n }\n"])), MapLegendItem, MapLegendOther);
|
|
5013
|
+
const MapLegendItems = /*#__PURE__*/styled__default.div(_templateObject8$2 || (_templateObject8$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n width: 100%;\n border-radius: 0.125rem;\n\n ", ";\n"])), _ref3 => {
|
|
5014
|
+
let {
|
|
5015
|
+
overlay
|
|
5016
|
+
} = _ref3;
|
|
5017
|
+
return overlay && SizeOverlayLegendMixin;
|
|
5007
5018
|
});
|
|
5008
|
-
|
|
5009
|
-
const
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5019
|
+
|
|
5020
|
+
const SizeLegendMixin = function SizeLegendMixin(value) {
|
|
5021
|
+
if (value === void 0) {
|
|
5022
|
+
value = 0;
|
|
5023
|
+
}
|
|
5024
|
+
|
|
5025
|
+
return styled.css(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteralLoose(["\n position: relative;\n height: 2rem;\n background: none;\n border: none;\n margin-right: 0;\n \n :after {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 50%;\n border: 1px rgba(48, 69, 79, 0.28) solid;\n border-radius: 50%;\n margin: -", "px 0 0 -", "px;\n width: ", "px;\n height: ", "px;\n }\n"])), value / 2, value / 2, value, value);
|
|
5026
|
+
};
|
|
5027
|
+
|
|
5028
|
+
const MapLegendValues = /*#__PURE__*/styled__default.div(_templateObject10$1 || (_templateObject10$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 100%;\n font-size: 0.75rem;\n color: rgba(48, 69, 79, 0.65);\n"])));
|
|
5029
|
+
const MapLegendValuesRange = /*#__PURE__*/styled__default.div(_templateObject11$1 || (_templateObject11$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n"])));
|
|
5030
|
+
const MapLegendValuesOther = /*#__PURE__*/styled__default(MapLegendOther)(_templateObject12$1 || (_templateObject12$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: 0;\n text-align: center;\n overflow: visible;\n"])));
|
|
5031
|
+
const MapLegendExpandButton = /*#__PURE__*/styled__default.div(_templateObject13$1 || (_templateObject13$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n margin: 0.1rem 0 0.5rem;\n font-size: 0.625rem;\n color: #1FB3AA;\n"])));
|
|
5013
5032
|
|
|
5014
5033
|
const getValueFromLegendTitle = (title, minOrMax) => {
|
|
5015
5034
|
var _title$split;
|
|
@@ -5019,11 +5038,33 @@ const getValueFromLegendTitle = (title, minOrMax) => {
|
|
|
5019
5038
|
return minOrMax === "min" ? result == null ? void 0 : result[0] : result == null ? void 0 : result[1];
|
|
5020
5039
|
}
|
|
5021
5040
|
|
|
5022
|
-
return (title == null ? void 0 : (_title$split = title.split(" ")) == null ? void 0 : _title$split
|
|
5041
|
+
return (title == null ? void 0 : (_title$split = title.split(" ")) == null ? void 0 : _title$split.find(ui.isNumeric)) || "";
|
|
5042
|
+
};
|
|
5043
|
+
|
|
5044
|
+
const MinimizedLegend = _ref => {
|
|
5045
|
+
var _currentValues$, _currentValues;
|
|
5046
|
+
|
|
5047
|
+
let {
|
|
5048
|
+
values,
|
|
5049
|
+
title,
|
|
5050
|
+
overlay
|
|
5051
|
+
} = _ref;
|
|
5052
|
+
const currentValues = [...values];
|
|
5053
|
+
const other = currentValues.pop();
|
|
5054
|
+
return React__default.createElement(React__default.Fragment, null, !!title && React__default.createElement(MapLegendValueDescr, null, title), React__default.createElement(MapLegendItems, {
|
|
5055
|
+
overlay: overlay
|
|
5056
|
+
}, currentValues.map(value => React__default.createElement(MapLegendItem, {
|
|
5057
|
+
key: value.title,
|
|
5058
|
+
title: value.title,
|
|
5059
|
+
value: value.parameterValue
|
|
5060
|
+
})), React__default.createElement(MapLegendOther, {
|
|
5061
|
+
title: "\u0414\u0440\u0443\u0433\u043E\u0435",
|
|
5062
|
+
value: other == null ? void 0 : other.parameterValue
|
|
5063
|
+
})), typeof (other == null ? void 0 : other.parameterValue) === "string" && React__default.createElement(MapLegendValues, null, React__default.createElement(MapLegendValuesRange, null, React__default.createElement("div", null, getValueFromLegendTitle((_currentValues$ = currentValues[0]) == null ? void 0 : _currentValues$.title, "max")), React__default.createElement("div", null, getValueFromLegendTitle((_currentValues = currentValues[currentValues.length - 1]) == null ? void 0 : _currentValues.title, "min"))), React__default.createElement(MapLegendValuesOther, null, "-")));
|
|
5023
5064
|
};
|
|
5024
5065
|
|
|
5025
5066
|
const MapLegend = _ref => {
|
|
5026
|
-
var
|
|
5067
|
+
var _items$0$parameter;
|
|
5027
5068
|
|
|
5028
5069
|
let {
|
|
5029
5070
|
layer,
|
|
@@ -5039,22 +5080,29 @@ const MapLegend = _ref => {
|
|
|
5039
5080
|
|
|
5040
5081
|
const {
|
|
5041
5082
|
symbol,
|
|
5042
|
-
|
|
5083
|
+
items
|
|
5043
5084
|
} = legend;
|
|
5085
|
+
const isValidClassify = !((_items$0$parameter = items[0].parameter) != null && _items$0$parameter.includes("labelSymbol"));
|
|
5044
5086
|
return React__default.createElement(LegendProvider, {
|
|
5045
5087
|
symbol: symbol
|
|
5046
5088
|
}, React__default.createElement(MapLegendControl, {
|
|
5047
5089
|
className: className
|
|
5048
|
-
}, React__default.createElement(MapLegendHeader, null, layer == null ? void 0 : layer.alias), React__default.createElement(MapLegendContainer, null, isExpanded ? React__default.createElement(Legend, {
|
|
5049
|
-
layer: layer
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5090
|
+
}, React__default.createElement(MapLegendHeader, null, layer == null ? void 0 : layer.alias), isValidClassify && React__default.createElement(MapLegendContainer, null, isExpanded ? React__default.createElement(Legend, {
|
|
5091
|
+
layer: layer,
|
|
5092
|
+
config: config
|
|
5093
|
+
}) : React__default.createElement(React__default.Fragment, null, items.map(item => {
|
|
5094
|
+
var _symbol$fill, _item$parameter, _symbol$fill2;
|
|
5095
|
+
|
|
5096
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(MinimizedLegend, {
|
|
5097
|
+
values: item.values,
|
|
5098
|
+
defaultValue: (_symbol$fill = symbol.fill) == null ? void 0 : _symbol$fill.color,
|
|
5099
|
+
title: item.title !== (layer == null ? void 0 : layer.alias) ? item.title : ""
|
|
5100
|
+
}), ((_item$parameter = item.parameter) == null ? void 0 : _item$parameter.includes("size")) && React__default.createElement(MinimizedLegend, {
|
|
5101
|
+
values: item.values,
|
|
5102
|
+
defaultValue: (_symbol$fill2 = symbol.fill) == null ? void 0 : _symbol$fill2.color,
|
|
5103
|
+
overlay: true
|
|
5104
|
+
}));
|
|
5105
|
+
})), React__default.createElement(MapLegendExpandButton, {
|
|
5058
5106
|
onClick: toggleExpanded
|
|
5059
5107
|
}, isExpanded ? "Свернуть" : "Развернуть"))));
|
|
5060
5108
|
};
|