@evergis/react 2.0.136 → 2.0.138
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/core/classification/types.d.ts +1 -1
- package/dist/core/style/types/symbol.d.ts +2 -1
- package/dist/hooks/useSymbol.d.ts +1 -1
- package/dist/react.cjs.development.js +48 -8
- 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 +48 -8
- package/dist/react.esm.js.map +1 -1
- package/dist/symbols/deserializeSymbol.d.ts +2 -1
- package/dist/symbols/mockFeatures.d.ts +1 -0
- package/package.json +2 -2
package/dist/react.esm.js
CHANGED
|
@@ -2800,7 +2800,7 @@ const h3gridFeature = /*#__PURE__*/new H3Feature([[50, -15], [80, -33], [80, -67
|
|
|
2800
2800
|
const lineLegendFeature = /*#__PURE__*/new Polyline([[0, -50], [100, -50]], {
|
|
2801
2801
|
crs: plain
|
|
2802
2802
|
});
|
|
2803
|
-
const polygonLegendFeature = /*#__PURE__*/new Polygon([[
|
|
2803
|
+
const polygonLegendFeature = /*#__PURE__*/new Polygon([[20, -20], [80, -20], [80, -80], [20, -80]], {
|
|
2804
2804
|
crs: plain
|
|
2805
2805
|
});
|
|
2806
2806
|
const polygonMapLegendFeature = /*#__PURE__*/new Polygon([[50, 0], [100, -25], [100, -75], [50, -100], [0, -75], [0, -25]], {
|
|
@@ -2810,6 +2810,7 @@ const MAP_LEGEND_FEATURES = {
|
|
|
2810
2810
|
polygon: polygonMapLegendFeature
|
|
2811
2811
|
};
|
|
2812
2812
|
const LEGEND_FEATURES = {
|
|
2813
|
+
point: pointFeature,
|
|
2813
2814
|
polyline: lineLegendFeature,
|
|
2814
2815
|
polygon: polygonLegendFeature,
|
|
2815
2816
|
h3grid: h3gridFeature
|
|
@@ -2874,6 +2875,9 @@ function deserializeSymbol(symbol) {
|
|
|
2874
2875
|
case "h3grid":
|
|
2875
2876
|
return deserializeH3Symbol(symbol);
|
|
2876
2877
|
|
|
2878
|
+
case "svgPointSymbol":
|
|
2879
|
+
return deserializeSvgPointSymbol(symbol);
|
|
2880
|
+
|
|
2877
2881
|
case 'circlePointSymbol':
|
|
2878
2882
|
return deserializePointSymbol(symbol);
|
|
2879
2883
|
|
|
@@ -2914,6 +2918,41 @@ function deserializePointSymbol(symbol) {
|
|
|
2914
2918
|
return new PointSymbol(deserializePointSymbolParams(symbol));
|
|
2915
2919
|
}
|
|
2916
2920
|
|
|
2921
|
+
const getOffsetParameterValue = offset => [getParameterValue(offset == null ? void 0 : offset[0]), getParameterValue(offset == null ? void 0 : offset[1])];
|
|
2922
|
+
|
|
2923
|
+
function deserializeSvgPointSymbolParams(_ref) {
|
|
2924
|
+
let {
|
|
2925
|
+
type,
|
|
2926
|
+
data,
|
|
2927
|
+
size,
|
|
2928
|
+
offset,
|
|
2929
|
+
angle,
|
|
2930
|
+
background,
|
|
2931
|
+
figure
|
|
2932
|
+
} = _ref;
|
|
2933
|
+
return _extends({
|
|
2934
|
+
type: getParameterValue(type),
|
|
2935
|
+
data: getParameterValue(data),
|
|
2936
|
+
size: getParameterValue(size),
|
|
2937
|
+
offset: getOffsetParameterValue(offset),
|
|
2938
|
+
angle: getParameterValue(angle)
|
|
2939
|
+
}, background ? {
|
|
2940
|
+
background: _extends({}, background, {
|
|
2941
|
+
fillColor: deserializeColor(getParameterValue(background == null ? void 0 : background.fillColor)),
|
|
2942
|
+
strokeColor: deserializeColor(getParameterValue(background == null ? void 0 : background.strokeColor)),
|
|
2943
|
+
strokeWidth: getParameterValue(background == null ? void 0 : background.strokeWidth)
|
|
2944
|
+
})
|
|
2945
|
+
} : {}, figure ? {
|
|
2946
|
+
figure: _extends({}, figure, {
|
|
2947
|
+
fillColor: deserializeColor(getParameterValue(figure == null ? void 0 : figure.fillColor))
|
|
2948
|
+
})
|
|
2949
|
+
} : {});
|
|
2950
|
+
}
|
|
2951
|
+
|
|
2952
|
+
function deserializeSvgPointSymbol(symbol) {
|
|
2953
|
+
return new PointSymbol(deserializeSvgPointSymbolParams(symbol));
|
|
2954
|
+
}
|
|
2955
|
+
|
|
2917
2956
|
function deserializeSquareSymbol(symbol) {
|
|
2918
2957
|
return new SquareSymbol(_extends({}, deserializePointSymbolParams(symbol), {
|
|
2919
2958
|
// @ts-ignore
|
|
@@ -2971,14 +3010,14 @@ function deserializePolylineSymbol(symbol) {
|
|
|
2971
3010
|
return new SGisPolylineSymbol(symbol);
|
|
2972
3011
|
}
|
|
2973
3012
|
|
|
2974
|
-
function deserializePointSymbolParams(
|
|
3013
|
+
function deserializePointSymbolParams(_ref2) {
|
|
2975
3014
|
let {
|
|
2976
3015
|
size,
|
|
2977
3016
|
offset,
|
|
2978
3017
|
strokeColor,
|
|
2979
3018
|
strokeWidth,
|
|
2980
3019
|
fillColor
|
|
2981
|
-
} =
|
|
3020
|
+
} = _ref2;
|
|
2982
3021
|
return {
|
|
2983
3022
|
size: getParameterValue(size),
|
|
2984
3023
|
offset: deserializeAnchor(offset),
|
|
@@ -3437,7 +3476,7 @@ const useLegendValueSymbol = _ref => {
|
|
|
3437
3476
|
});
|
|
3438
3477
|
};
|
|
3439
3478
|
|
|
3440
|
-
const DEFAULT_SYMBOL_SIZE =
|
|
3479
|
+
const DEFAULT_SYMBOL_SIZE = 26;
|
|
3441
3480
|
function useSymbol(_ref, canvasRef) {
|
|
3442
3481
|
let {
|
|
3443
3482
|
symbol,
|
|
@@ -4686,7 +4725,7 @@ var _templateObject$2, _templateObject2$1, _templateObject3$1, _templateObject4$
|
|
|
4686
4725
|
const LegendContainer = /*#__PURE__*/styled.div(_templateObject$2 || (_templateObject$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n background-color: white;\n"])));
|
|
4687
4726
|
const LegendSectionContainer = /*#__PURE__*/styled.div(_templateObject2$1 || (_templateObject2$1 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
4688
4727
|
const LegendSymbolTitle = /*#__PURE__*/styled.p(_templateObject3$1 || (_templateObject3$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n"])));
|
|
4689
|
-
const LegendValueContainer = /*#__PURE__*/styled.div(_templateObject4$1 || (_templateObject4$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n font-size: 0.75rem;\n
|
|
4728
|
+
const LegendValueContainer = /*#__PURE__*/styled.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);
|
|
4690
4729
|
const LegendSectionHeader = /*#__PURE__*/styled.div(_templateObject5$1 || (_templateObject5$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 0.75rem;\n font-weight: 500;\n"])));
|
|
4691
4730
|
|
|
4692
4731
|
const LegendSection = _ref => {
|
|
@@ -4750,7 +4789,7 @@ const LegendValue = _ref => {
|
|
|
4750
4789
|
})), React.createElement(LegendSymbolTitle, null, value.title));
|
|
4751
4790
|
};
|
|
4752
4791
|
|
|
4753
|
-
const MAX_SIZE$1 =
|
|
4792
|
+
const MAX_SIZE$1 = 26;
|
|
4754
4793
|
|
|
4755
4794
|
const getNumberParam = (parameterValue, param) => {
|
|
4756
4795
|
return typeof parameterValue === 'object' && param in parameterValue && typeof parameterValue[param] === 'number' ? parameterValue[param] : null;
|
|
@@ -4954,7 +4993,7 @@ const Fullscreen = () => {
|
|
|
4954
4993
|
|
|
4955
4994
|
var _templateObject$6, _templateObject2$5, _templateObject3$5, _templateObject4$4, _templateObject5$4, _templateObject6$2, _templateObject7$2, _templateObject8$2, _templateObject9$1, _templateObject10$1, _templateObject11$1;
|
|
4956
4995
|
const MapLegendControl = /*#__PURE__*/styled(MapControl)(_templateObject$6 || (_templateObject$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: default;\n"])));
|
|
4957
|
-
const MapLegendContainer = /*#__PURE__*/styled.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:
|
|
4996
|
+
const MapLegendContainer = /*#__PURE__*/styled.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"])));
|
|
4958
4997
|
const MapLegendHeader = /*#__PURE__*/styled(LegendSectionHeader)(_templateObject3$5 || (_templateObject3$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-width: 15rem;\n margin-bottom: 0.25rem;\n font-weight: 500;\n"])));
|
|
4959
4998
|
const MapLegendValueDescr = /*#__PURE__*/styled.div(_templateObject4$4 || (_templateObject4$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 0.25rem;\n font-size: 0.75rem;\n font-weight: 500;\n"])));
|
|
4960
4999
|
const MapLegendItems = /*#__PURE__*/styled.div(_templateObject5$4 || (_templateObject5$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 100%;\n border-radius: 0.125rem;\n"])));
|
|
@@ -5005,7 +5044,8 @@ const MapLegend = _ref => {
|
|
|
5005
5044
|
}, React.createElement(MapLegendControl, {
|
|
5006
5045
|
className: className
|
|
5007
5046
|
}, React.createElement(MapLegendHeader, null, layer == null ? void 0 : layer.alias), React.createElement(MapLegendContainer, null, isExpanded ? React.createElement(Legend, {
|
|
5008
|
-
layer: layer
|
|
5047
|
+
layer: layer,
|
|
5048
|
+
config: config
|
|
5009
5049
|
}) : React.createElement(React.Fragment, null, item.title !== (layer == null ? void 0 : layer.alias) && React.createElement(MapLegendValueDescr, null, item.title), React.createElement(MapLegendItems, null, item.values.map(value => React.createElement(MapLegendItem, {
|
|
5010
5050
|
key: value.title,
|
|
5011
5051
|
title: value.title,
|