@evergis/react 2.0.167 → 2.0.169
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/components/index.d.ts +2 -0
- package/dist/components/Legend/types.d.ts +1 -1
- package/dist/react.cjs.development.js +27 -5
- 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 +26 -6
- package/dist/react.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/react.esm.js
CHANGED
|
@@ -5630,7 +5630,7 @@ const MapLegendContainer = /*#__PURE__*/styled.div(_templateObject8$2 || (_templ
|
|
|
5630
5630
|
const MapLegendHeader = /*#__PURE__*/styled.div(_templateObject9$1 || (_templateObject9$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-width: 15rem;\n margin-bottom: 0.25rem;\n font-weight: 500;\n"])));
|
|
5631
5631
|
const MapLegendDescriptionContainer = /*#__PURE__*/styled.div(_templateObject10$1 || (_templateObject10$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 0.5rem;\n font-weight: 400;\n font-size: 0.625rem;\n color: rgba(255, 255, 255, 0.65);\n"])));
|
|
5632
5632
|
const MinimizedLegendContainer = /*#__PURE__*/styled.div(_templateObject11$1 || (_templateObject11$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: calc(100% - 1.5rem);\n padding-right: 1.5rem;\n"])));
|
|
5633
|
-
const MapLegendSectionContainer = /*#__PURE__*/styled.div(_templateObject12$1 || (_templateObject12$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n :not(:last-child) {\n margin-bottom: 1rem;\n }\n"])));
|
|
5633
|
+
const MapLegendSectionContainer = /*#__PURE__*/styled.div(_templateObject12$1 || (_templateObject12$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n \n :not(:last-child) {\n margin-bottom: 1rem;\n }\n"])));
|
|
5634
5634
|
const MapLegendValueDescr = /*#__PURE__*/styled.div(_templateObject13$1 || (_templateObject13$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n min-height: 1rem;\n margin-bottom: 0.25rem;\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 1rem;\n"])));
|
|
5635
5635
|
|
|
5636
5636
|
const SizeLegendItemMixin = function SizeLegendItemMixin(value) {
|
|
@@ -6078,13 +6078,23 @@ const MaximizedLegend = _ref => {
|
|
|
6078
6078
|
return React.createElement(React.Fragment, null, values.map(renderLegend));
|
|
6079
6079
|
};
|
|
6080
6080
|
|
|
6081
|
+
const LegendParameterDescription = _ref => {
|
|
6082
|
+
let {
|
|
6083
|
+
parameter
|
|
6084
|
+
} = _ref;
|
|
6085
|
+
const isSize = isParameterType("size", parameter);
|
|
6086
|
+
const isStrokeWidth = isParameterType(["strokeWidth", "stroke.width"], parameter);
|
|
6087
|
+
const isStrokeColor = isParameterType(["strokeColor", "stroke.color"], parameter);
|
|
6088
|
+
return React.createElement(MapLegendDescriptionContainer, null, isStrokeWidth || isStrokeColor ? isStrokeWidth ? "Толщина обводки" : "Цвет обводки" : isSize ? "Размер знака" : "Цвет символа");
|
|
6089
|
+
};
|
|
6090
|
+
|
|
6081
6091
|
const LegendSection = _ref => {
|
|
6082
6092
|
let {
|
|
6083
6093
|
symbol,
|
|
6084
6094
|
param,
|
|
6085
6095
|
params,
|
|
6086
6096
|
classified,
|
|
6087
|
-
|
|
6097
|
+
attributeTitle,
|
|
6088
6098
|
attributeType,
|
|
6089
6099
|
index
|
|
6090
6100
|
} = _ref;
|
|
@@ -6092,7 +6102,9 @@ const LegendSection = _ref => {
|
|
|
6092
6102
|
t
|
|
6093
6103
|
} = useTranslation("common");
|
|
6094
6104
|
const [isExpanded, toggleExpanded] = useToggle$1();
|
|
6095
|
-
return React.createElement(MapLegendSectionContainer, null, React.createElement(MapLegendHeader, null,
|
|
6105
|
+
return React.createElement(MapLegendSectionContainer, null, React.createElement(MapLegendHeader, null, attributeTitle), React.createElement(LegendParameterDescription, {
|
|
6106
|
+
parameter: param
|
|
6107
|
+
}), isExpanded ? React.createElement(MaximizedLegend, {
|
|
6096
6108
|
key: param,
|
|
6097
6109
|
symbol: symbol,
|
|
6098
6110
|
parameter: param,
|
|
@@ -6116,14 +6128,22 @@ const Legend = _ref => {
|
|
|
6116
6128
|
} = _ref;
|
|
6117
6129
|
const classified = getClassified(layerInfo);
|
|
6118
6130
|
const params = Object.keys(classified);
|
|
6131
|
+
const attributes = getLayerAttributes(layerInfo.layerDefinition);
|
|
6119
6132
|
return React.createElement(MapLegendContainer, null, Object.keys(classified).map((param, index) => {
|
|
6120
|
-
var _classified$param$val, _layerInfo$style;
|
|
6133
|
+
var _classified$param$val, _attributes$find, _layerInfo$style;
|
|
6121
6134
|
|
|
6122
6135
|
const attributeName = getAttributeNameFromCondition((_classified$param$val = classified[param].values[0]) == null ? void 0 : _classified$param$val.condition);
|
|
6136
|
+
const attributeAlias = (_attributes$find = attributes.find(_ref2 => {
|
|
6137
|
+
let {
|
|
6138
|
+
name
|
|
6139
|
+
} = _ref2;
|
|
6140
|
+
return name === attributeName;
|
|
6141
|
+
})) == null ? void 0 : _attributes$find.alias;
|
|
6123
6142
|
return React.createElement(LegendSection, {
|
|
6143
|
+
key: index,
|
|
6124
6144
|
symbol: (_layerInfo$style = layerInfo.style) == null ? void 0 : _layerInfo$style.symbol,
|
|
6125
6145
|
attributeType: getAttributeType(layerInfo, attributeName),
|
|
6126
|
-
|
|
6146
|
+
attributeTitle: attributeAlias || attributeName,
|
|
6127
6147
|
classified: classified[param],
|
|
6128
6148
|
param: param,
|
|
6129
6149
|
params: params,
|
|
@@ -6534,5 +6554,5 @@ const DraggableMarker = _ref => {
|
|
|
6534
6554
|
return React.createElement(Fragment, null);
|
|
6535
6555
|
};
|
|
6536
6556
|
|
|
6537
|
-
export { ArrowLineMiterRender, BaseMeasureToolCreator, BaseMeasureToolEditor, CRS_MAP, CardAttributes, CardHeader, CircleLineMiterRender, ClassificationCondition, ClassificationManager, ClassifiedItem, ClusterLayer, ClusterSymbol, CompoundIcon, DEFAULT_CRS, DEFAULT_ID_ATTRIBUTE_NAME, DEFAULT_LEGEND_SIZES, DEFAULT_LEGEND_STYLES, DEFAULT_LEGEND_SYMBOL_SIZE, DEFAULT_PARAMETER_INFO, DEFAULT_SRID, DEFAULT_SYMBOL_FILL_COLOR, DEFAULT_SYMBOL_OFFSET, DEFAULT_SYMBOL_SIZE, DEFAULT_SYMBOL_STROKE_COLOR, DEFAULT_SYMBOL_WITH_BG_SIZE, DateFormat, DraggableMarker, EXTRA_BORDER_SIZE, EvergisCard, EvergisCardAttribute, AttributeContainer as EvergisCardAttributeContainer, AttributeTitle as EvergisCardAttributeTitle, AttributeValueContainer as EvergisCardAttributeValueContainer, CardControls as EvergisCardCardControls, CardTitle as EvergisCardCardTitle, EvergisCardContainer, CurrentFeatureIndex as EvergisCardCurrentFeatureIndex, FeatureName as EvergisCardFeatureName, LayerName as EvergisCardLayerName, CardPagination as EvergisCardPagination, PaginationDescription as EvergisCardPaginationDescription, SimpleAttribute as EvergisCardSimpleValue, StickyHeader as EvergisCardStickyHeader, ValueLink as EvergisCardValueLink, EvergisDynamicLayer, EvergisFeature, EvergisLayer, EvergisProvider, EvergisSelect, EvergisSelectLayer, EvergisSelectProvider, EvergisStyle, EvergisTileLayer, FeatureLayer, Fullscreen, GEOMETRY_ATTRIBUTE, ItemSeparator, ItemText, LabelSymbol, Legend, LegendProvider, LegendSection, LegendSymbolRenderer, LineMiterKind, LineMiterRender, Map, MapControl, MapControls, MapLegendContainer, MapLegendControl, MapLegendDescriptionContainer, MapLegendExpandButton, MapLegendHeader, MapLegendItem, MapLegendItems, MapLegendItemsContainer, MapLegendOther, MapLegendSectionContainer, MapLegendValueDescr, MapLegendValues, MapLegendValuesOther, MapLegendValuesRange, MapProvider, MaximizedLegend, Measure, MeasureTool, Measurer, MinimizedLegendContainer, NO_CONTENT_VALUE, Noop, PARAMETER_INFOS, PREVIEW_LIMITS, SGisBrushFill, SGisImageFill, SGisPolygonSymbol, SGisPolylineSymbol, SOLID_INTERVALS, SVGPoly, SYMBOL_CLASSIFICATION, SYMBOL_LIMITS, SYMBOL_SIZE_PARAMETERS, ScaleRuler, ScaleRulerBlock, ScaleRulerContainer, Search, SelectedPointSymbol, SelectedPolySymbol, ShadowedPointSymbol, ShadowedPolySymbol, SizeMinimizedLegend, SizeMinimizedLegendDown, SizeMinimizedLegendLabel, SizeMinimizedLegendSymbol, SizeMinimizedLegendUp, SquareLineMiterRender, SrId, StyleSymbol, SvgSymbol, SvgSymbolBg, Symbol, SymbolButton, SymbolByType, SymbolContainer, TextContainer, TileLayer, Tooltip, TooltipComponent, TooltipProvider, Zoom, ZoomLevel, adjustSymbol, applyParameterValue, checkLayerHasLegend, clamp, convertSvgToBase64, copyRings, createCompositeSymbol, createLabelSymbol, createLegendSymbol, createStyleLegend, createSvgGradient, createValueTitle$1 as createValueTitle, defaultOffset, defineStrokeStylePreset, deserializeSymbol, evaluateFeature, extractStyle, extractSymbol, findChildFeatureStyle, findChildFeatureSymbol, formatArea, formatAttributeValue, formatDate, formatLength, formatPolygonMeasure, formatRangeClassValue, formatUniqueClassValue, formatValue, getAttributeFromCondition, getAttributeNameFromClassified, getAttributeNameFromCondition, getAttributeType, getAttributesConfiguration, getChildSymbols, getClassified, getCrs, getDashStylePreset, getDate, getDimensions, getExprFromCondition, getFeatureSymbol, getHexColor, getLayerDefinition, getLegendSymbolRenders, getLegendSymbolSize, getLineDash, getMapLegendSymbolRenders, getMapState, getMaximizedLegendValues, getMinimizedLegendValues, getOffsetParameterValue, getParameterFromSymbol, getParameterValue, getRangeValues$1 as getRangeValues, getScale, getServiceConfiguration, getSignFromConditionPart, getSymbolParameterInfo, getSymbolRenders, getSymbolStrokeWidth, getTitleFromCondition, getValueFromConditionPart, isArrowLineMiter, isCalculatedParameter, isCircleLineMiter, isCompositeSymbol, isDashedBrush, isFilledLineMitter, isH3GridSymbol, isHatchBrush, isImageSymbol, isLabelSymbol, isLayerService, isMaskedImageSymbol, isMiterExist, isNumeric, isObject, isParameterByAttribute, isParameterType, isParameterValueSimple, isParameterValueSymbol, isPatternBrush, isPointLabelSymbol, isPointSymbol, isPolygonHasHatchBrush, isPolygonHasPatternBrush, isPolygonLabelSymbol, isPolygonSymbol, isPolylineLabelSymbol, isPolylineLikePolygon, isPolylineSymbol, isPolylineSymbols, isRangeClass, isRangeCondition, isRasterSymbol, isRequisiteNumbers, isSGisClusterSymbol, isSGisH3Symbol, isSGisImageSymbol, isSGisPointSymbol, isSGisPolygonSymbol, isSGisPolylineSymbol, isScalablePolylineSymbol, isSimpleOffset, isSimplePolylineSymbol, isSimpleSymbol, isSizableSymbol, isSizeClassification, isSolidBrush, isSquareLineMiter, isSquareSymbol, isStaticImageSymbol, isStringAsInn, isStringAsKpp, isStringAsMail, isStringAsOgrn, isStringAsPhone, isStringAsUrl, isStringContainsDate, isStringParameterValue, isStrokeStyledSymbol, isStyle, isSvgPointSymbol, isSymbolWithOffset, isTwoDimensionalSymbol, isUniqueClass, isValidParameter, isValidUrl, mailHref, manipulateSvgSymbol, matchPhone, measureAreaSymbol, measureLengthSymbol, measurePolygonSnapSymbol, metersToPixels, numberWithSpaces, packStyle, phoneHref, polygonCircleFromPoint, printRangeClass, renderSymbolToCanvas, selectedPoint, selectedPolygon, selectedPolyline, serializeSvgPointSymbol, setDefaultParameterValue, setParameterValue, shouldUpdateMapState, solidStrokeStylePreset, strokeStylePresets, symbolParameterWalker, symbolTypeGuard, toIntervals, toLineDash, unClassify, updateMapResolution, updateSymbolParameter, urlHref, useCanvas, useClusterLayer, useCrs, useDebouncedCallback, useDraggableMarker, useEventPoint, useEvergisContext, useEvergisDynamicLayer, useEvergisSelect, useEvergisSelectContext, useEvergisTileLayer, useFeatureLayer, useLayerLegend, useLayerOrder, useLayerVisibility, useLegend, useLegendContext, useLegendValueSymbol, useMapBboxChange, useMapContext, useMapLegend, useMapLevel, useMapPick, useMapResize, useMapState, useMapView, useMapViewActions, useMapWrapper, useMaxMinScale, useMetersToPixels, useMetersToPixelsCb, useMount, useProperty, useScale, useSvgSymbol, useSymbol, useToggle, useTooltip, useTooltipContext, useUpdate, useUpdateMapView };
|
|
6557
|
+
export { ArrowLineMiterRender, BaseMeasureToolCreator, BaseMeasureToolEditor, CRS_MAP, CardAttributes, CardHeader, CircleLineMiterRender, ClassificationCondition, ClassificationManager, ClassifiedItem, ClusterLayer, ClusterSymbol, CompoundIcon, DEFAULT_CRS, DEFAULT_ID_ATTRIBUTE_NAME, DEFAULT_LEGEND_SIZES, DEFAULT_LEGEND_STYLES, DEFAULT_LEGEND_SYMBOL_SIZE, DEFAULT_PARAMETER_INFO, DEFAULT_SRID, DEFAULT_SYMBOL_FILL_COLOR, DEFAULT_SYMBOL_OFFSET, DEFAULT_SYMBOL_SIZE, DEFAULT_SYMBOL_STROKE_COLOR, DEFAULT_SYMBOL_WITH_BG_SIZE, DateFormat, DraggableMarker, EXTRA_BORDER_SIZE, EvergisCard, EvergisCardAttribute, AttributeContainer as EvergisCardAttributeContainer, AttributeTitle as EvergisCardAttributeTitle, AttributeValueContainer as EvergisCardAttributeValueContainer, CardControls as EvergisCardCardControls, CardTitle as EvergisCardCardTitle, EvergisCardContainer, CurrentFeatureIndex as EvergisCardCurrentFeatureIndex, FeatureName as EvergisCardFeatureName, LayerName as EvergisCardLayerName, CardPagination as EvergisCardPagination, PaginationDescription as EvergisCardPaginationDescription, SimpleAttribute as EvergisCardSimpleValue, StickyHeader as EvergisCardStickyHeader, ValueLink as EvergisCardValueLink, EvergisDynamicLayer, EvergisFeature, EvergisLayer, EvergisProvider, EvergisSelect, EvergisSelectLayer, EvergisSelectProvider, EvergisStyle, EvergisTileLayer, FeatureLayer, Fullscreen, GEOMETRY_ATTRIBUTE, ItemSeparator, ItemText, LabelSymbol, Legend, LegendParameterDescription, LegendProvider, LegendSection, LegendSymbolRenderer, LineMiterKind, LineMiterRender, Map, MapControl, MapControls, MapLegendContainer, MapLegendControl, MapLegendDescriptionContainer, MapLegendExpandButton, MapLegendHeader, MapLegendItem, MapLegendItems, MapLegendItemsContainer, MapLegendOther, MapLegendSectionContainer, MapLegendValueDescr, MapLegendValues, MapLegendValuesOther, MapLegendValuesRange, MapProvider, MaximizedLegend, Measure, MeasureTool, Measurer, MinimizedLegend, MinimizedLegendContainer, NO_CONTENT_VALUE, Noop, PARAMETER_INFOS, PREVIEW_LIMITS, SGisBrushFill, SGisImageFill, SGisPolygonSymbol, SGisPolylineSymbol, SOLID_INTERVALS, SVGPoly, SYMBOL_CLASSIFICATION, SYMBOL_LIMITS, SYMBOL_SIZE_PARAMETERS, ScaleRuler, ScaleRulerBlock, ScaleRulerContainer, Search, SelectedPointSymbol, SelectedPolySymbol, ShadowedPointSymbol, ShadowedPolySymbol, SizeMinimizedLegend, SizeMinimizedLegendDown, SizeMinimizedLegendLabel, SizeMinimizedLegendSymbol, SizeMinimizedLegendUp, SquareLineMiterRender, SrId, StyleSymbol, SvgSymbol, SvgSymbolBg, Symbol, SymbolButton, SymbolByType, SymbolContainer, TextContainer, TileLayer, Tooltip, TooltipComponent, TooltipProvider, Zoom, ZoomLevel, adjustSymbol, applyParameterValue, checkLayerHasLegend, clamp, convertSvgToBase64, copyRings, createCompositeSymbol, createLabelSymbol, createLegendSymbol, createStyleLegend, createSvgGradient, createValueTitle$1 as createValueTitle, defaultOffset, defineStrokeStylePreset, deserializeSymbol, evaluateFeature, extractStyle, extractSymbol, findChildFeatureStyle, findChildFeatureSymbol, formatArea, formatAttributeValue, formatDate, formatLength, formatPolygonMeasure, formatRangeClassValue, formatUniqueClassValue, formatValue, getAttributeFromCondition, getAttributeNameFromClassified, getAttributeNameFromCondition, getAttributeType, getAttributesConfiguration, getChildSymbols, getClassified, getCrs, getDashStylePreset, getDate, getDimensions, getExprFromCondition, getFeatureSymbol, getHexColor, getLayerDefinition, getLegendSymbolRenders, getLegendSymbolSize, getLineDash, getMapLegendSymbolRenders, getMapState, getMaximizedLegendValues, getMinimizedLegendValues, getOffsetParameterValue, getParameterFromSymbol, getParameterValue, getRangeValues$1 as getRangeValues, getScale, getServiceConfiguration, getSignFromConditionPart, getSymbolParameterInfo, getSymbolRenders, getSymbolStrokeWidth, getTitleFromCondition, getValueFromConditionPart, isArrowLineMiter, isCalculatedParameter, isCircleLineMiter, isCompositeSymbol, isDashedBrush, isFilledLineMitter, isH3GridSymbol, isHatchBrush, isImageSymbol, isLabelSymbol, isLayerService, isMaskedImageSymbol, isMiterExist, isNumeric, isObject, isParameterByAttribute, isParameterType, isParameterValueSimple, isParameterValueSymbol, isPatternBrush, isPointLabelSymbol, isPointSymbol, isPolygonHasHatchBrush, isPolygonHasPatternBrush, isPolygonLabelSymbol, isPolygonSymbol, isPolylineLabelSymbol, isPolylineLikePolygon, isPolylineSymbol, isPolylineSymbols, isRangeClass, isRangeCondition, isRasterSymbol, isRequisiteNumbers, isSGisClusterSymbol, isSGisH3Symbol, isSGisImageSymbol, isSGisPointSymbol, isSGisPolygonSymbol, isSGisPolylineSymbol, isScalablePolylineSymbol, isSimpleOffset, isSimplePolylineSymbol, isSimpleSymbol, isSizableSymbol, isSizeClassification, isSolidBrush, isSquareLineMiter, isSquareSymbol, isStaticImageSymbol, isStringAsInn, isStringAsKpp, isStringAsMail, isStringAsOgrn, isStringAsPhone, isStringAsUrl, isStringContainsDate, isStringParameterValue, isStrokeStyledSymbol, isStyle, isSvgPointSymbol, isSymbolWithOffset, isTwoDimensionalSymbol, isUniqueClass, isValidParameter, isValidUrl, mailHref, manipulateSvgSymbol, matchPhone, measureAreaSymbol, measureLengthSymbol, measurePolygonSnapSymbol, metersToPixels, numberWithSpaces, packStyle, phoneHref, polygonCircleFromPoint, printRangeClass, renderSymbolToCanvas, selectedPoint, selectedPolygon, selectedPolyline, serializeSvgPointSymbol, setDefaultParameterValue, setParameterValue, shouldUpdateMapState, solidStrokeStylePreset, strokeStylePresets, symbolParameterWalker, symbolTypeGuard, toIntervals, toLineDash, unClassify, updateMapResolution, updateSymbolParameter, urlHref, useCanvas, useClusterLayer, useCrs, useDebouncedCallback, useDraggableMarker, useEventPoint, useEvergisContext, useEvergisDynamicLayer, useEvergisSelect, useEvergisSelectContext, useEvergisTileLayer, useFeatureLayer, useLayerLegend, useLayerOrder, useLayerVisibility, useLegend, useLegendContext, useLegendValueSymbol, useMapBboxChange, useMapContext, useMapLegend, useMapLevel, useMapPick, useMapResize, useMapState, useMapView, useMapViewActions, useMapWrapper, useMaxMinScale, useMetersToPixels, useMetersToPixelsCb, useMount, useProperty, useScale, useSvgSymbol, useSymbol, useToggle, useTooltip, useTooltipContext, useUpdate, useUpdateMapView };
|
|
6538
6558
|
//# sourceMappingURL=react.esm.js.map
|