@evergis/react 2.0.166 → 2.0.167

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.
Files changed (46) hide show
  1. package/dist/components/Legend/Legend.d.ts +5 -3
  2. package/dist/components/Legend/components/LegendParameterDescription.d.ts +5 -0
  3. package/dist/components/Legend/components/LegendSection.d.ts +3 -0
  4. package/dist/components/Legend/components/LegendSymbolRenderer.d.ts +5 -0
  5. package/dist/components/Legend/components/MaximizedLegend.d.ts +3 -0
  6. package/dist/components/{MapLegend → Legend/components}/MinimizedLegend.d.ts +1 -1
  7. package/dist/components/Legend/components/SvgSymbol.d.ts +3 -0
  8. package/dist/components/Legend/components/SymbolByType.d.ts +9 -0
  9. package/dist/components/Legend/components/index.d.ts +5 -0
  10. package/dist/components/Legend/constants.d.ts +32 -0
  11. package/dist/components/Legend/hooks/useSvgSymbol.d.ts +15 -0
  12. package/dist/components/Legend/index.d.ts +4 -4
  13. package/dist/components/Legend/styled.d.ts +36 -5
  14. package/dist/components/Legend/types.d.ts +78 -9
  15. package/dist/components/index.d.ts +0 -1
  16. package/dist/contexts/LegendContext.d.ts +1 -1
  17. package/dist/core/attributes/format.d.ts +0 -1
  18. package/dist/core/classification/parameterValue.d.ts +1 -3
  19. package/dist/core/classification/types.d.ts +2 -1
  20. package/dist/core/feature/getFeatureSymbol.d.ts +1 -1
  21. package/dist/core/style/EvergisStyle.d.ts +1 -1
  22. package/dist/core/style/types/parameterValue.d.ts +2 -2
  23. package/dist/core/style/types/symbol.d.ts +8 -2
  24. package/dist/hooks/useLegend/useMapLegend.d.ts +1 -1
  25. package/dist/hooks/useSymbol.d.ts +0 -1
  26. package/dist/index.d.ts +8 -2
  27. package/dist/react.cjs.development.js +1307 -320
  28. package/dist/react.cjs.development.js.map +1 -1
  29. package/dist/react.cjs.production.min.js +1 -1
  30. package/dist/react.cjs.production.min.js.map +1 -1
  31. package/dist/react.esm.js +1229 -313
  32. package/dist/react.esm.js.map +1 -1
  33. package/dist/utils/date.d.ts +16 -0
  34. package/dist/utils/legend.d.ts +72 -0
  35. package/dist/utils/svg.d.ts +6 -0
  36. package/package.json +8 -5
  37. package/dist/components/Legend/LegendSection.d.ts +0 -10
  38. package/dist/components/Legend/LegendSymbol.d.ts +0 -8
  39. package/dist/components/Legend/LegendValue.d.ts +0 -8
  40. package/dist/components/Legend/getSymbolSize.d.ts +0 -3
  41. package/dist/components/MapLegend/MapLegend.d.ts +0 -3
  42. package/dist/components/MapLegend/MapLegendDescription.d.ts +0 -5
  43. package/dist/components/MapLegend/MapLegendSymbol.d.ts +0 -7
  44. package/dist/components/MapLegend/index.d.ts +0 -5
  45. package/dist/components/MapLegend/styled.d.ts +0 -28
  46. package/dist/components/MapLegend/types.d.ts +0 -23
package/dist/react.esm.js CHANGED
@@ -1,11 +1,12 @@
1
- import React, { useState, useCallback, useMemo, useContext, createContext, useEffect, useRef, useReducer, Fragment } from 'react';
1
+ import React, { useState, useCallback, useMemo, useContext, createContext, useEffect, useRef, useReducer, memo, Fragment } from 'react';
2
2
  import { Bbox } from '@evergis/sgis/es/Bbox';
3
3
  import { getMouseOffset, listenDomEvent } from '@evergis/sgis/es/utils/domEvent';
4
4
  import { Api, AttributeType, unique, GeometryType, EvergisDynamicLayer as EvergisDynamicLayer$1, EvergisTileLayer as EvergisTileLayer$1, isEvergisDynamicLayer } from '@evergis/api';
5
5
  import { Map as Map$1, BboxChangeEvent, BboxChangeEndEvent } from '@evergis/sgis/es/Map';
6
6
  import { DomPainter, MapResize } from '@evergis/sgis/es/painters/DomPainter/DomPainter';
7
7
  import { FeatureLayer as FeatureLayer$1 } from '@evergis/sgis/es/layers/FeatureLayer';
8
- import { Icon, IconButton, EverCloudStatisticsIcon, EverCloudZoomtoIcon, EverCloudCloseIcon, EverCloudPlayPrevIcon, EverCloudPlayNextIcon, EverCloudSearchIcon } from '@evergis/icons';
8
+ import { Icon, IconButton, EverCloudStatisticsIcon, EverCloudZoomtoIcon, EverCloudCloseIcon, EverCloudPlayPrevIcon, EverCloudPlayNextIcon } from '@evergis/icons';
9
+ import { isValid, toDate, format, parseJSON, parseISO } from 'date-fns';
9
10
  import { ConditionInterpreter, TokenType, ConditionEvaluator } from '@evergis/condition';
10
11
  import { MultiPoint } from '@evergis/sgis/es/features/MultiPoint';
11
12
  import { Polyline } from '@evergis/sgis/es/features/Polyline';
@@ -24,6 +25,7 @@ import { PolylineControl } from '@evergis/sgis/es/controls/PolylineControl';
24
25
  import { LabelFeature } from '@evergis/sgis/es/features/Label';
25
26
  import { DrawingFinishEvent } from '@evergis/sgis/es/controls/Control';
26
27
  import { PolyEditor } from '@evergis/sgis/es/controls/PolyEditor';
28
+ import get from 'lodash-es/get';
27
29
  import ReactDOM from 'react-dom';
28
30
  import { DynamicPointSymbol, Symbol as Symbol$1 } from '@evergis/sgis/es/symbols/Symbol';
29
31
  import { Poly } from '@evergis/sgis/es/features/Poly';
@@ -45,6 +47,10 @@ import { debounce } from '@evergis/sgis/es/utils/utils';
45
47
  import styled, { css } from 'styled-components';
46
48
  import punycode from 'punycode';
47
49
  import { TileLayer as TileLayer$1 } from '@evergis/sgis/es/layers/TileLayer';
50
+ import { useTranslation } from 'react-i18next';
51
+ import { Description, Flex, transition, useToggle as useToggle$1 } from '@evergis/ui';
52
+ import { SVG } from '@svgdotjs/svg.js';
53
+ import { Color as Color$1 } from '@evergis/color/es/Color';
48
54
 
49
55
  function _classCallCheck(instance, Constructor) {
50
56
  if (!(instance instanceof Constructor)) {
@@ -443,6 +449,49 @@ const useEvergisCard = features => {
443
449
  };
444
450
  };
445
451
 
452
+ const NO_CONTENT_VALUE = '—';
453
+ var DateFormat;
454
+
455
+ (function (DateFormat) {
456
+ DateFormat["ClientDefaultFormat"] = "dd.MM.yyyy HH:mm";
457
+ DateFormat["DateTime"] = "dd.MM.yyyy HH:mm:ss";
458
+ DateFormat["UTC"] = "yyyy-MM-dd'T'HH:mm:ss.sssxxx";
459
+ DateFormat["AxisTooltip"] = "d MMMM yyyy";
460
+ })(DateFormat || (DateFormat = {}));
461
+
462
+ const stringDateParsers = [parseJSON, parseISO, rawDate => new Date(rawDate)];
463
+ const getDate = rawDate => {
464
+ if (!rawDate) return null;
465
+
466
+ if (typeof rawDate === "string") {
467
+ for (const parser of stringDateParsers) {
468
+ const date = parser(rawDate);
469
+
470
+ if (isValid(date)) {
471
+ return toDate(date);
472
+ }
473
+ }
474
+
475
+ return null;
476
+ }
477
+
478
+ const parsedDate = toDate(rawDate);
479
+ return isValid(parsedDate) ? parsedDate : null;
480
+ };
481
+ const formatDate = function formatDate(date, _temp) {
482
+ let {
483
+ dateFormat = DateFormat.ClientDefaultFormat,
484
+ defaultValue = NO_CONTENT_VALUE
485
+ } = _temp === void 0 ? {} : _temp;
486
+ const dateValue = date ? getDate(date) : null;
487
+
488
+ if (isValid(dateValue)) {
489
+ return format(dateValue, dateFormat);
490
+ }
491
+
492
+ return "" + defaultValue;
493
+ };
494
+
446
495
  function numberWithSpaces(x, fractionDigits, delim) {
447
496
  if (fractionDigits === void 0) {
448
497
  fractionDigits = 2;
@@ -509,8 +558,6 @@ const mailHref = mail => "mailto:" + mail;
509
558
  const phoneHref = mail => "tel:" + mail;
510
559
  const urlHref = url => isValidUrl(url) ? url : "//" + url;
511
560
 
512
- const NO_CONTENT_VALUE = '—';
513
-
514
561
  const stringAttribute = value => ({
515
562
  type: 0
516
563
  /* String */
@@ -741,8 +788,8 @@ function isObject(value) {
741
788
  return typeof value === 'object' && value !== null && !Array.isArray(value);
742
789
  }
743
790
 
744
- const isParameterByAttribute = value => Boolean(isObject(value) && value.type && value.type === 'byAttribute');
745
- const isCalculatedParameter = value => Boolean(isObject(value) && value.type && value.type === 'calculated');
791
+ const isParameterByAttribute = value => Boolean(isObject(value) && (value == null ? void 0 : value.type) === 'byAttribute');
792
+ const isCalculatedParameter = value => Boolean(isObject(value) && (value == null ? void 0 : value.type) === 'calculated');
746
793
  const getParameterValue = value => {
747
794
  if (isParameterByAttribute(value) || isCalculatedParameter(value)) {
748
795
  return value.defaultValue;
@@ -800,6 +847,8 @@ const isSizableSymbol = symbol => Boolean(symbol && 'size' in symbol);
800
847
  const isStrokeStyledSymbol = symbol => Boolean(symbol && (isPolygonSymbol(symbol) || isPolylineSymbols(symbol)));
801
848
  const isScalablePolylineSymbol = symbol => symbol.beginning !== null && symbol.ending !== null || symbol.stroke && symbol.stroke.type !== 'solid';
802
849
  const isSimpleSymbol = symbol => Boolean(symbol && !isLabelSymbol(symbol) && !isCompositeSymbol(symbol) && !isRasterSymbol(symbol));
850
+ const isH3GridSymbol = /*#__PURE__*/symbolTypeGuard("h3grid");
851
+ const isSvgPointSymbol = /*#__PURE__*/symbolTypeGuard("svgPointSymbol");
803
852
 
804
853
  const isHatchBrush = /*#__PURE__*/symbolTypeGuard('hatch');
805
854
  const isPatternBrush = /*#__PURE__*/symbolTypeGuard('pattern');
@@ -1913,6 +1962,536 @@ let BaseMeasureToolEditor = /*#__PURE__*/function (_PolyEditor) {
1913
1962
  return BaseMeasureToolEditor;
1914
1963
  }(PolyEditor);
1915
1964
 
1965
+ const isNumeric = number => !isNaN(parseFloat(number)) && isFinite(number);
1966
+
1967
+ const isParameterType = (types, parameter) => {
1968
+ var _parameter$toLowerCas;
1969
+
1970
+ return (typeof types === "string" ? parameter == null ? void 0 : (_parameter$toLowerCas = parameter.toLowerCase()) == null ? void 0 : _parameter$toLowerCas.includes(types.toLowerCase()) : types.some(type => {
1971
+ var _parameter$toLowerCas2;
1972
+
1973
+ return parameter == null ? void 0 : (_parameter$toLowerCas2 = parameter.toLowerCase()) == null ? void 0 : _parameter$toLowerCas2.includes(type.toLowerCase());
1974
+ })) || false;
1975
+ };
1976
+
1977
+ const isLayerService = value => isObject(value) && "name" in value;
1978
+ const getAttributeFromCondition = condition => {
1979
+ const parts = condition.split(" ");
1980
+ return parts[0].startsWith("(") ? parts[0].slice(1) : parts[0];
1981
+ };
1982
+ const getExprFromCondition = (condition, partIndex) => {
1983
+ var _expr;
1984
+
1985
+ let expr;
1986
+
1987
+ if (partIndex) {
1988
+ const parts = condition.split(" && ").map(part => part.slice(1, -1));
1989
+ expr = parts[partIndex - 1];
1990
+ } else {
1991
+ expr = condition;
1992
+ }
1993
+
1994
+ return (_expr = expr) == null ? void 0 : _expr.split(" ");
1995
+ };
1996
+ const getSignFromConditionPart = (condition, partIndex) => {
1997
+ var _getExprFromCondition;
1998
+
1999
+ return (_getExprFromCondition = getExprFromCondition(condition, partIndex)) == null ? void 0 : _getExprFromCondition[1];
2000
+ };
2001
+ const getValueFromConditionPart = (condition, partIndex) => {
2002
+ var _getExprFromCondition2;
2003
+
2004
+ return (_getExprFromCondition2 = getExprFromCondition(condition, partIndex)) == null ? void 0 : _getExprFromCondition2[2];
2005
+ };
2006
+ const isRangeCondition = condition => condition.includes("(");
2007
+ const getSymbolParameterInfo = parameter => {
2008
+ return PARAMETER_INFOS[parameter] || DEFAULT_PARAMETER_INFO;
2009
+ };
2010
+ const formatValue = (value, type, calculatedParameter) => {
2011
+ var _ref;
2012
+
2013
+ if (type === AttributeType.DateTime) {
2014
+ return formatDate(value, {
2015
+ dateFormat: DateFormat.DateTime
2016
+ });
2017
+ }
2018
+
2019
+ const {
2020
+ serialize
2021
+ } = getSymbolParameterInfo(calculatedParameter);
2022
+ return (_ref = value && typeof value === "number" ? serialize(value) : value) == null ? void 0 : _ref.toString();
2023
+ };
2024
+ const formatUniqueClassValue = value => {
2025
+ const {
2026
+ attribute,
2027
+ uniqueValue
2028
+ } = value;
2029
+ return attribute ? formatValue(uniqueValue, attribute.type) : uniqueValue;
2030
+ };
2031
+ const getRangeValues$1 = (_ref2, isDouble, isDate, index) => {
2032
+ let {
2033
+ from,
2034
+ to
2035
+ } = _ref2;
2036
+ return {
2037
+ from: from !== null && index !== 0 ? isDate ? from : isDouble ? +from : +from + 1 : from,
2038
+ to
2039
+ };
2040
+ };
2041
+ const formatRangeClassValue = (value, index) => {
2042
+ var _value$attribute, _value$attribute2;
2043
+
2044
+ const isDouble = ((_value$attribute = value.attribute) == null ? void 0 : _value$attribute.type) === "Double";
2045
+ const isDate = ((_value$attribute2 = value.attribute) == null ? void 0 : _value$attribute2.type) === "DateTime";
2046
+ const {
2047
+ from,
2048
+ to
2049
+ } = getRangeValues$1(value, isDouble, isDate, index);
2050
+ const formattedFrom = isDate && from ? formatDate(from) : from;
2051
+ const formattedTo = isDate && to ? formatDate(to) : to;
2052
+
2053
+ if (from === null) {
2054
+ return "" + formattedTo + (!isDate ? " и менее" : "");
2055
+ }
2056
+
2057
+ if (to === null) {
2058
+ return "" + (!isDate ? "более " : "") + formattedFrom;
2059
+ }
2060
+
2061
+ return from === to ? "" + formattedFrom : formattedFrom + " - " + formattedTo;
2062
+ };
2063
+ const checkLayerHasLegend = layerInfo => {
2064
+ var _SYMBOL_CLASSIFICATIO;
2065
+
2066
+ return ((_SYMBOL_CLASSIFICATIO = SYMBOL_CLASSIFICATION[layerInfo.geometryType]) == null ? void 0 : _SYMBOL_CLASSIFICATIO.some(param => {
2067
+ var _layerInfo$style;
2068
+
2069
+ const paramValue = get((_layerInfo$style = layerInfo.style) == null ? void 0 : _layerInfo$style.symbol, param);
2070
+ return (paramValue == null ? void 0 : paramValue.type) === "byAttribute";
2071
+ })) || false;
2072
+ };
2073
+ const getTitleFromCondition = condition => {
2074
+ var _parts$;
2075
+
2076
+ const parts = condition.split(" == ");
2077
+ return (_parts$ = parts[1]) == null ? void 0 : _parts$.slice(1, -1);
2078
+ };
2079
+
2080
+ function createValueTitle(paramValue, attributeType, index) {
2081
+ if (paramValue.title) return paramValue.title;
2082
+ const value = {
2083
+ parameterValue: getParameterValue(paramValue.value),
2084
+ attribute: {
2085
+ type: attributeType
2086
+ }
2087
+ };
2088
+ const sign = getSignFromConditionPart(paramValue.condition, 1);
2089
+ const isFirstFrom = sign.includes(">");
2090
+ value.from = isFirstFrom ? getValueFromConditionPart(paramValue.condition, 1) : null;
2091
+ value.to = paramValue.condition.includes(" && ") && isFirstFrom ? getValueFromConditionPart(paramValue.condition, 2) : !isFirstFrom ? getValueFromConditionPart(paramValue.condition, 1) : null;
2092
+ if (isRangeClass(value)) return formatRangeClassValue(value, index);
2093
+ if (isUniqueClass(value)) return formatUniqueClassValue(value);
2094
+ return "";
2095
+ } // Основывается на http://cf.everpoint.ru/pages/viewpage.action?pageId=45024217 ->
2096
+ // пункт "Настраиваемые значения параметров символики в системе"
2097
+ // Для добавления подготовленных значений размеров символов нужно использовать константу PREPARED_SYMBOL_SIZES
2098
+
2099
+
2100
+ const DEFAULT_LEGEND_STYLES = {
2101
+ [0
2102
+ /* Point */
2103
+ ]: {
2104
+ fillColor: "#00000047",
2105
+ strokeWidth: 1,
2106
+ strokeColor: "#0000001f"
2107
+ },
2108
+ [1
2109
+ /* ImagePoint */
2110
+ ]: {
2111
+ maskedColor: "#00000047"
2112
+ },
2113
+ [2
2114
+ /* Line */
2115
+ ]: {
2116
+ stroke: {
2117
+ width: 2,
2118
+ color: "#00000047"
2119
+ }
2120
+ },
2121
+ [3
2122
+ /* Polygon */
2123
+ ]: {
2124
+ fill: {
2125
+ color: "#00000000",
2126
+ hatchColor: "#00000000"
2127
+ },
2128
+ stroke: {
2129
+ width: 1,
2130
+ color: "#0000001f"
2131
+ }
2132
+ }
2133
+ };
2134
+ const SYMBOL_SIZE_PARAMETERS = ["size", "width", "height"]; // Основывается на http://cf.everpoint.ru/pages/viewpage.action?pageId=45024217 -> пункт "Библиотека символов"
2135
+
2136
+ const DEFAULT_LEGEND_SIZES = {
2137
+ circlePointSymbol: 8,
2138
+ squarePointSymbol: 12,
2139
+ imagePointSymbol: 24,
2140
+ maskedImagePointSymbol: 24,
2141
+ svgPointSymbol: 24
2142
+ };
2143
+
2144
+ const getNonClassifiedParamValue = (baseSymbol, parameter, classificationsParams, type) => {
2145
+ if (classificationsParams.includes(parameter)) {
2146
+ const defaultParameterValue = getParameterFromSymbol(DEFAULT_LEGEND_STYLES[type], parameter);
2147
+
2148
+ if (defaultParameterValue) {
2149
+ return defaultParameterValue;
2150
+ }
2151
+
2152
+ if (SYMBOL_SIZE_PARAMETERS.includes(parameter) && DEFAULT_LEGEND_SIZES[baseSymbol.type]) {
2153
+ return DEFAULT_LEGEND_SIZES[baseSymbol.type];
2154
+ }
2155
+ }
2156
+
2157
+ return getParameterValue(getParameterFromSymbol(baseSymbol, parameter));
2158
+ };
2159
+
2160
+ const updateSymbolParameter = (symbol, path, value) => symbolParameterWalker(() => value)(symbol, path);
2161
+
2162
+ const createPointSymbol = (baseSymbol, parameter, classificationsParams, parameterValue) => {
2163
+ return updateSymbolParameter(_extends({}, baseSymbol, {
2164
+ fillColor: getNonClassifiedParamValue(baseSymbol, "fillColor", classificationsParams, 0
2165
+ /* Point */
2166
+ ),
2167
+ strokeColor: getNonClassifiedParamValue(baseSymbol, "strokeColor", classificationsParams, 0
2168
+ /* Point */
2169
+ ),
2170
+ strokeWidth: getNonClassifiedParamValue(baseSymbol, "strokeWidth", classificationsParams, 0
2171
+ /* Point */
2172
+ ),
2173
+ size: getNonClassifiedParamValue(baseSymbol, "size", classificationsParams, 0
2174
+ /* Point */
2175
+ ),
2176
+ offset: [0, 0]
2177
+ }), parameter, parameterValue);
2178
+ };
2179
+
2180
+ function getDimensions(symbol, size) {
2181
+ const height = getParameterValue(symbol.height);
2182
+ const width = getParameterValue(symbol.width);
2183
+
2184
+ if (width === height) {
2185
+ return {
2186
+ width: size,
2187
+ height: size
2188
+ };
2189
+ }
2190
+
2191
+ const ratio = height / width;
2192
+
2193
+ if (width < height) {
2194
+ return {
2195
+ width: size,
2196
+ height: height + (size - width) * ratio
2197
+ };
2198
+ }
2199
+
2200
+ return {
2201
+ width: width + (size - height) * ratio,
2202
+ height: size
2203
+ };
2204
+ }
2205
+
2206
+ const createImagePointSymbol = (baseSymbol, parameter, classificationsParams, parameterValue) => {
2207
+ let symbol = _extends({}, baseSymbol);
2208
+
2209
+ if (isMaskedImageSymbol(symbol)) {
2210
+ symbol.maskedColor = getNonClassifiedParamValue(baseSymbol, "maskedColor", classificationsParams, 1
2211
+ /* ImagePoint */
2212
+ );
2213
+ }
2214
+
2215
+ if (parameter === "height" || parameter === "width") {
2216
+ const {
2217
+ height,
2218
+ width
2219
+ } = getDimensions(baseSymbol, parameterValue);
2220
+ symbol.height = height;
2221
+ symbol.width = width;
2222
+ } else {
2223
+ symbol.width = getNonClassifiedParamValue(baseSymbol, "width", classificationsParams, 1
2224
+ /* ImagePoint */
2225
+ );
2226
+ symbol.height = symbol.width;
2227
+ symbol = updateSymbolParameter(symbol, parameter, parameterValue);
2228
+ }
2229
+
2230
+ symbol.offset = [getParameterValue(symbol.height) / 2, getParameterValue(symbol.width) / 2];
2231
+ return symbol;
2232
+ };
2233
+
2234
+ const createLineSymbol = (baseSymbol, parameter, classificationsParams, parameterValue) => {
2235
+ return updateSymbolParameter(_extends({}, baseSymbol, {
2236
+ type: "polylineSymbol",
2237
+ stroke: {
2238
+ color: getNonClassifiedParamValue(baseSymbol, "stroke.color", classificationsParams, 2
2239
+ /* Line */
2240
+ ),
2241
+ width: getNonClassifiedParamValue(baseSymbol, "stroke.width", classificationsParams, 2
2242
+ /* Line */
2243
+ )
2244
+ }
2245
+ }), parameter, parameterValue);
2246
+ };
2247
+
2248
+ const createPolygonSymbol = (baseSymbol, parameter, classificationsParams, parameterValue) => {
2249
+ return updateSymbolParameter(_extends({}, baseSymbol, {
2250
+ fill: {
2251
+ color: getNonClassifiedParamValue(baseSymbol, "fill.color", classificationsParams, 3
2252
+ /* Polygon */
2253
+ ),
2254
+ hatchColor: getNonClassifiedParamValue(baseSymbol, "fill.hatchColor", classificationsParams, 3
2255
+ /* Polygon */
2256
+ )
2257
+ },
2258
+ stroke: {
2259
+ color: getNonClassifiedParamValue(baseSymbol, "stroke.color", classificationsParams, 3
2260
+ /* Polygon */
2261
+ ),
2262
+ width: getNonClassifiedParamValue(baseSymbol, "stroke.width", classificationsParams, 3
2263
+ /* Polygon */
2264
+ )
2265
+ }
2266
+ }), parameter, parameterValue);
2267
+ };
2268
+
2269
+ const createH3Symbol = (baseSymbol, parameter, classificationsParams, parameterValue) => {
2270
+ return updateSymbolParameter(_extends({}, baseSymbol, {
2271
+ fill: {
2272
+ color: getNonClassifiedParamValue(baseSymbol, "fill.color", classificationsParams, 3
2273
+ /* Polygon */
2274
+ )
2275
+ },
2276
+ stroke: {
2277
+ color: getNonClassifiedParamValue(baseSymbol, "stroke.color", classificationsParams, 3
2278
+ /* Polygon */
2279
+ ),
2280
+ width: getNonClassifiedParamValue(baseSymbol, "stroke.width", classificationsParams, 3
2281
+ /* Polygon */
2282
+ )
2283
+ }
2284
+ }), parameter, parameterValue);
2285
+ };
2286
+
2287
+ const createLegendSymbol = (parameterValue, parameter, classificationsParams, baseSymbol) => {
2288
+ if (isParameterValueSymbol(parameterValue)) {
2289
+ return parameterValue;
2290
+ }
2291
+ /* if (isClusterSymbol(baseSymbol)) {
2292
+ return createClusterSymbol(baseSymbol, parameter, classificationsParams, parameterValue);
2293
+ }*/
2294
+
2295
+
2296
+ if (isSizableSymbol(baseSymbol)) {
2297
+ return createPointSymbol(baseSymbol, parameter, classificationsParams, parameterValue);
2298
+ }
2299
+
2300
+ if (isTwoDimensionalSymbol(baseSymbol)) {
2301
+ return createImagePointSymbol(baseSymbol, parameter, classificationsParams, parameterValue);
2302
+ }
2303
+
2304
+ if (isPolylineSymbols(baseSymbol)) {
2305
+ return createLineSymbol(baseSymbol, parameter, classificationsParams, parameterValue);
2306
+ }
2307
+
2308
+ if (isPolygonSymbol(baseSymbol)) {
2309
+ return createPolygonSymbol(baseSymbol, parameter, classificationsParams, parameterValue);
2310
+ }
2311
+
2312
+ if (isH3GridSymbol(baseSymbol)) {
2313
+ return createH3Symbol(baseSymbol, parameter, classificationsParams, parameterValue);
2314
+ }
2315
+
2316
+ return null;
2317
+ };
2318
+ const getMinimizedLegendValues = (attributeType, param, index) => {
2319
+ return param.values.map(paramValue => {
2320
+ const parameterValue = getParameterValue(paramValue.value);
2321
+ const result = {
2322
+ parameterValue,
2323
+ attribute: {
2324
+ type: attributeType
2325
+ }
2326
+ };
2327
+
2328
+ if (isRangeCondition(paramValue.condition)) {
2329
+ const from = getValueFromConditionPart(paramValue.condition, 1);
2330
+ const to = getValueFromConditionPart(paramValue.condition, 2);
2331
+ result.from = from ? isNumeric(from) ? +from : formatDate(from) : null;
2332
+ result.to = to ? isNumeric(to) ? +to : formatDate(to) : null;
2333
+ result.title = createValueTitle(paramValue, attributeType, index);
2334
+ return result;
2335
+ }
2336
+
2337
+ result.uniqueValue = formatValue(paramValue.value);
2338
+ result.title = getTitleFromCondition(paramValue.condition);
2339
+ return result;
2340
+ });
2341
+ };
2342
+ const getMaximizedLegendValues = (attributeType, param, params, classified, symbol, sectionIndex, otherTitle) => {
2343
+ const other = {
2344
+ title: otherTitle,
2345
+ symbol: createLegendSymbol(classified.defaultValue, param, params, symbol)
2346
+ };
2347
+ const items = classified.values.map((paramValue, index) => {
2348
+ const result = {
2349
+ symbol: createLegendSymbol(classified.values[index].value, param, params, symbol)
2350
+ };
2351
+
2352
+ if (isRangeCondition(paramValue.condition)) {
2353
+ result.title = createValueTitle(paramValue, attributeType, sectionIndex);
2354
+ return result;
2355
+ }
2356
+
2357
+ result.title = getTitleFromCondition(paramValue.condition);
2358
+ return result;
2359
+ });
2360
+ return [...items, other];
2361
+ };
2362
+ const getClassified = layerInfo => {
2363
+ const classifyParams = SYMBOL_CLASSIFICATION[layerInfo.geometryType];
2364
+ return classifyParams == null ? void 0 : classifyParams.reduce((result, classified) => {
2365
+ var _layerInfo$style2;
2366
+
2367
+ const param = get((_layerInfo$style2 = layerInfo.style) == null ? void 0 : _layerInfo$style2.symbol, classified);
2368
+ return (param == null ? void 0 : param.type) === "byAttribute" ? _extends({}, result, {
2369
+ [classified]: param
2370
+ }) : result;
2371
+ }, {});
2372
+ };
2373
+ const getSymbolStrokeWidth = symbol => {
2374
+ var _symbol$background;
2375
+
2376
+ return isSvgPointSymbol(symbol) ? (_symbol$background = symbol.background) == null ? void 0 : _symbol$background.strokeWidth : symbol.strokeWidth;
2377
+ };
2378
+ const getParameterFromSymbol = (symbol, parameter) => {
2379
+ let parameterFromSymbol = {};
2380
+ symbolParameterWalker(parameterValue => {
2381
+ parameterFromSymbol = parameterValue;
2382
+ })(symbol, parameter);
2383
+ return parameterFromSymbol;
2384
+ };
2385
+ const getLegendSymbolSize = symbol => {
2386
+ let size = 0;
2387
+
2388
+ if (isSvgPointSymbol(symbol)) {
2389
+ size = getParameterValue(symbol.size);
2390
+ }
2391
+
2392
+ if (isH3GridSymbol(symbol)) {
2393
+ size = getParameterValue(symbol.cellSize);
2394
+ }
2395
+
2396
+ if (isTwoDimensionalSymbol(symbol)) {
2397
+ size = Math.max(getParameterValue(symbol.width), getParameterValue(symbol.height));
2398
+ }
2399
+
2400
+ if (isSizableSymbol(symbol)) {
2401
+ const strokeWidth = getSymbolStrokeWidth(symbol);
2402
+ size = getParameterValue(symbol.size) + (strokeWidth ? getParameterValue(strokeWidth) + EXTRA_BORDER_SIZE : 0);
2403
+ }
2404
+
2405
+ if (isPolylineSymbols(symbol)) {
2406
+ size = getParameterValue(getParameterFromSymbol(symbol, "stroke.width"));
2407
+ }
2408
+
2409
+ return Math.max(DEFAULT_LEGEND_SYMBOL_SIZE, size);
2410
+ };
2411
+ const serializeSvgPointSymbol = symbol => {
2412
+ var _symbol$figure, _symbol$background2, _symbol$background3, _symbol$background4, _symbol$background5;
2413
+
2414
+ if (!symbol) return null;
2415
+ const figureFillColor = ((_symbol$figure = symbol.figure) == null ? void 0 : _symbol$figure.fillColor) || null;
2416
+ const bgFillColor = ((_symbol$background2 = symbol.background) == null ? void 0 : _symbol$background2.fillColor) || null;
2417
+ return _extends({
2418
+ type: "svgPointSymbol",
2419
+ size: symbol.size,
2420
+ offset: symbol.offset,
2421
+ angle: symbol.angle
2422
+ }, bgFillColor ? {
2423
+ background: {
2424
+ id: "symbol-bg",
2425
+ fillColor: bgFillColor,
2426
+ strokeColor: ((_symbol$background3 = symbol.background) == null ? void 0 : _symbol$background3.strokeColor) || null,
2427
+ strokeWidth: ((_symbol$background4 = symbol.background) == null ? void 0 : _symbol$background4.strokeWidth) || null,
2428
+ type: ((_symbol$background5 = symbol.background) == null ? void 0 : _symbol$background5.type) || SvgSymbolBg.Circle
2429
+ }
2430
+ } : {}, figureFillColor ? {
2431
+ figure: {
2432
+ id: "symbol-figure",
2433
+ fillColor: figureFillColor
2434
+ }
2435
+ } : {});
2436
+ };
2437
+ const SIZE_PARAMETERS = ["size", "height", "strokeWidth", "stroke.width"];
2438
+ const isSizeClassification = parameter => SIZE_PARAMETERS.includes(parameter);
2439
+ const getServiceConfiguration = layer => {
2440
+ const emptyServiceConfiguration = {
2441
+ name: ""
2442
+ };
2443
+ if (!isLayerService(layer) || !("configuration" in layer)) return emptyServiceConfiguration;
2444
+ return _extends({}, emptyServiceConfiguration, layer.configuration || {});
2445
+ };
2446
+ /** default attribute name which use for geometry info */
2447
+
2448
+ const GEOMETRY_ATTRIBUTE = "geometry";
2449
+ /** default attribute name which contains unique id info */
2450
+
2451
+ const DEFAULT_ID_ATTRIBUTE_NAME = "gid";
2452
+ const getAttributesConfiguration = layer => {
2453
+ const serviceConfiguration = getServiceConfiguration(layer);
2454
+ const emptyAttributesConfiguration = {
2455
+ geometryAttribute: GEOMETRY_ATTRIBUTE,
2456
+ idAttribute: DEFAULT_ID_ATTRIBUTE_NAME,
2457
+ tableName: ""
2458
+ };
2459
+
2460
+ if (!serviceConfiguration || !("attributesConfiguration" in serviceConfiguration)) {
2461
+ return emptyAttributesConfiguration;
2462
+ }
2463
+
2464
+ return _extends({}, emptyAttributesConfiguration, serviceConfiguration.attributesConfiguration || {});
2465
+ };
2466
+ const getLayerDefinition = layer => {
2467
+ const {
2468
+ geometryAttribute,
2469
+ idAttribute
2470
+ } = getAttributesConfiguration(layer);
2471
+ const emptyLayerDefinition = {
2472
+ attributes: {},
2473
+ geometryAttribute: geometryAttribute,
2474
+ idAttribute,
2475
+ geometryType: GeometryType.Unknown,
2476
+ titleAttribute: ""
2477
+ };
2478
+
2479
+ if (!isLayerService(layer) || !("layerDefinition" in layer)) {
2480
+ return emptyLayerDefinition;
2481
+ }
2482
+
2483
+ return _extends({}, emptyLayerDefinition, layer.layerDefinition || {}, {
2484
+ attributes: layer.layerDefinition.attributes || emptyLayerDefinition.attributes
2485
+ });
2486
+ };
2487
+ function getAttributeType(layer, attributeName) {
2488
+ const {
2489
+ attributes
2490
+ } = getLayerDefinition(layer);
2491
+ const attribute = attributes[attributeName];
2492
+ return attribute ? attribute.type : AttributeType.Unknown;
2493
+ }
2494
+
1916
2495
  const metersToPixels = (meters, _ref) => {
1917
2496
  let {
1918
2497
  painter,
@@ -1943,16 +2522,166 @@ const polygonCircleFromPoint = (center, diameter) => {
1943
2522
  return [coordinates];
1944
2523
  };
1945
2524
 
1946
- const isNumeric = number => !isNaN(parseFloat(number)) && isFinite(number);
2525
+ const DEFAULT_LEGEND_SYMBOL_SIZE = 26;
2526
+ const EXTRA_BORDER_SIZE = 4;
2527
+ const DEFAULT_SYMBOL_SIZE = 20;
2528
+ const DEFAULT_SYMBOL_WITH_BG_SIZE = 24;
2529
+ const DEFAULT_SYMBOL_FILL_COLOR = "rgba(0, 163, 245, 1)";
2530
+ const DEFAULT_SYMBOL_STROKE_COLOR = "rgb(255, 255, 255)";
2531
+ const DEFAULT_SYMBOL_OFFSET = [0, 0];
2532
+ const SYMBOL_CLASSIFICATION = {
2533
+ [GeometryType.Polygon]: ["fill.color", "stroke.color", "stroke.width"],
2534
+ [GeometryType.Polyline]: ["stroke.color", "stroke.width"],
2535
+ [GeometryType.Point]: ["angle", "background.fillColor", "background.strokeColor", "background.strokeWidth", "figure.fillColor", "size"]
2536
+ };
2537
+ const SYMBOL_LIMITS = {
2538
+ SIZE_MIN: 1,
2539
+ SIZE_MAX: 64,
2540
+ SIZE_STEP: 1,
2541
+ GRID_SIZE_MIN: 0.1,
2542
+ GRID_SIZE_MAX: 120,
2543
+ MIN_OBJECTS_COUNT: 2,
2544
+ MAX_OBJECTS_COUNT: 10000,
2545
+ MIN_CLUSTER_SIZE: 16,
2546
+ MAX_CLUSTER_SIZE: 120,
2547
+ STROKE_WIDTH_MIN: 0,
2548
+ STROKE_WIDTH_MAX: 32,
2549
+ STROKE_WIDTH_STEP: 0.25,
2550
+ ANGLE_MIN: -360,
2551
+ ANGLE_MAX: 360,
2552
+ ANGLE_STEP: 1,
2553
+ PREVIEW_SIZE_MAX: 32,
2554
+ PREVIEW_SIZE_MAX_WIDTH: 26
2555
+ };
2556
+ const DEFAULT_PARAMETER_INFO = {
2557
+ classifyAble: true,
2558
+ min: SYMBOL_LIMITS.STROKE_WIDTH_MIN,
2559
+ max: SYMBOL_LIMITS.STROKE_WIDTH_MAX,
2560
+ step: SYMBOL_LIMITS.STROKE_WIDTH_STEP,
2561
+ units: "px"
2562
+ /* Pixels */
2563
+ ,
2564
+ serialize: value => value,
2565
+ deserialize: value => value
2566
+ };
2567
+ const PARAMETER_INFOS = {
2568
+ size: /*#__PURE__*/_extends({}, DEFAULT_PARAMETER_INFO, {
2569
+ min: SYMBOL_LIMITS.SIZE_MIN,
2570
+ max: SYMBOL_LIMITS.SIZE_MAX,
2571
+ step: SYMBOL_LIMITS.SIZE_STEP,
2572
+ units: "px"
2573
+ /* Pixels */
2574
+
2575
+ })
2576
+ };
1947
2577
 
1948
- const isParameterType = (types, parameter) => {
1949
- var _parameter$toLowerCas;
2578
+ var SvgSymbolBg;
1950
2579
 
1951
- return (typeof types === "string" ? parameter == null ? void 0 : (_parameter$toLowerCas = parameter.toLowerCase()) == null ? void 0 : _parameter$toLowerCas.includes(types.toLowerCase()) : types.some(type => {
1952
- var _parameter$toLowerCas2;
2580
+ (function (SvgSymbolBg) {
2581
+ SvgSymbolBg["Rect"] = "rect";
2582
+ SvgSymbolBg["Circle"] = "circle";
2583
+ })(SvgSymbolBg || (SvgSymbolBg = {}));
1953
2584
 
1954
- return parameter == null ? void 0 : (_parameter$toLowerCas2 = parameter.toLowerCase()) == null ? void 0 : _parameter$toLowerCas2.includes(type.toLowerCase());
1955
- })) || false;
2585
+ const convertSvgToBase64 = svg => "data:image/svg+xml;base64," + window.btoa(svg);
2586
+ const createSvgGradient = (svg, values) => svg.gradient("linear", add => {
2587
+ values == null ? void 0 : values.forEach((_ref, index) => {
2588
+ let {
2589
+ value
2590
+ } = _ref;
2591
+ add.stop(index / ((values == null ? void 0 : values.length) - 1), value);
2592
+ });
2593
+ }).from(0, 0).to(1, 1); // eslint-disable-next-line max-lines-per-function
2594
+
2595
+ const manipulateSvgSymbol = (SVGContainer, symbol, svg, bg) => {
2596
+ var _$exec2;
2597
+
2598
+ if (!symbol) return SVGContainer;
2599
+ const symbolData = svg || symbol.data;
2600
+ if (!symbolData) return SVGContainer;
2601
+ SVGContainer.clear();
2602
+ const {
2603
+ size,
2604
+ angle,
2605
+ background,
2606
+ figure
2607
+ } = symbol;
2608
+ const isUploadedFile = !bg && !symbolData.includes("symbol-bg") && !symbolData.includes("symbol-figure");
2609
+ const innerSvg = symbolData.replace(/<\?xml[^?]*\?>|<svg[^>]*>|<\/svg>/g, "");
2610
+
2611
+ if (isUploadedFile) {
2612
+ var _$exec;
2613
+
2614
+ SVGContainer.svg(innerSvg);
2615
+ const uploadedViewBox = (_$exec = /viewBox="([^"]+)"/g.exec(symbolData)) == null ? void 0 : _$exec[1];
2616
+
2617
+ if (uploadedViewBox != null && uploadedViewBox[1]) {
2618
+ SVGContainer.viewbox(uploadedViewBox);
2619
+ }
2620
+
2621
+ SVGContainer.size(size);
2622
+ } else {
2623
+ const hasBg = bg || (innerSvg == null ? void 0 : innerSvg.includes("symbol-bg"));
2624
+ let defaultSize = hasBg ? DEFAULT_SYMBOL_WITH_BG_SIZE : DEFAULT_SYMBOL_SIZE;
2625
+ const currentSize = size || defaultSize;
2626
+ let viewBox = [0, 0, defaultSize, defaultSize];
2627
+ const strokeWidth = getParameterValue(background == null ? void 0 : background.strokeWidth) || (typeof (background == null ? void 0 : background.strokeColor) === "object" ? 1 : 0);
2628
+
2629
+ if (strokeWidth) {
2630
+ defaultSize += strokeWidth;
2631
+ viewBox = [-strokeWidth / 2, -strokeWidth / 2, defaultSize, defaultSize];
2632
+ }
2633
+
2634
+ if (hasBg) {
2635
+ SVGContainer.size(currentSize + "px", currentSize + "px").viewbox(viewBox.join(" "));
2636
+ const currentBg = bg || (background == null ? void 0 : background.type);
2637
+
2638
+ if (currentBg) {
2639
+ const strokeColor = getParameterValue(background == null ? void 0 : background.strokeColor);
2640
+ const fillColor = getParameterValue(background == null ? void 0 : background.fillColor);
2641
+ SVGContainer.svg(currentBg === SvgSymbolBg.Circle ? "<circle\n id=\"symbol-bg\"\n cx=\"" + DEFAULT_SYMBOL_WITH_BG_SIZE / 2 + "\"\n cy=\"" + DEFAULT_SYMBOL_WITH_BG_SIZE / 2 + "\"\n r=\"" + DEFAULT_SYMBOL_WITH_BG_SIZE / 2 + "\"\n fill=\"" + (fillColor || DEFAULT_SYMBOL_FILL_COLOR) + "\"\n stroke=\"" + (strokeColor || DEFAULT_SYMBOL_STROKE_COLOR) + "\"\n stroke-width=\"" + strokeWidth + "\"\n />" : "<rect\n id=\"symbol-bg\"\n width=\"" + DEFAULT_SYMBOL_WITH_BG_SIZE + "\"\n height=\"" + DEFAULT_SYMBOL_WITH_BG_SIZE + "\"\n rx=\"4\"\n fill=\"" + (fillColor || DEFAULT_SYMBOL_FILL_COLOR) + "\"\n stroke=\"" + (strokeColor || DEFAULT_SYMBOL_STROKE_COLOR) + "\"\n stroke-width=\"" + strokeWidth + "\"\n />");
2642
+ SVGContainer.svg(innerSvg);
2643
+ SVGContainer.find("#symbol-bg:not(:first-child)").each(item => item.remove());
2644
+ SVGContainer.find(":not(#symbol-bg)").each(item => item.center(DEFAULT_SYMBOL_WITH_BG_SIZE / 2, DEFAULT_SYMBOL_WITH_BG_SIZE / 2).fill("white")); // eslint-disable-next-line max-depth
2645
+
2646
+ if (isParameterByAttribute(background == null ? void 0 : background.fillColor)) {
2647
+ var _background$fillColor, _SVGContainer$find$;
2648
+
2649
+ const gradient = createSvgGradient(SVGContainer, background == null ? void 0 : (_background$fillColor = background.fillColor) == null ? void 0 : _background$fillColor.values);
2650
+ (_SVGContainer$find$ = SVGContainer.find("#symbol-bg")[0]) == null ? void 0 : _SVGContainer$find$.fill(gradient);
2651
+ }
2652
+ } else {
2653
+ SVGContainer.svg(innerSvg);
2654
+ }
2655
+ } else {
2656
+ const fillColor = getParameterValue(figure == null ? void 0 : figure.fillColor);
2657
+ SVGContainer.size(currentSize + "px", currentSize + "px").viewbox(viewBox.join(" "));
2658
+ SVGContainer.svg(innerSvg);
2659
+ SVGContainer.find("#symbol-figure").each(item => {
2660
+ item.center(DEFAULT_SYMBOL_SIZE / 2, DEFAULT_SYMBOL_SIZE / 2).fill(fillColor || DEFAULT_SYMBOL_FILL_COLOR);
2661
+ });
2662
+ }
2663
+ }
2664
+
2665
+ const rootTransform = (_$exec2 = /<svg[^>]*transform="([^"]+)"/g.exec(symbolData)) == null ? void 0 : _$exec2[1];
2666
+
2667
+ if (rootTransform) {
2668
+ const transformParts = rootTransform.slice(0, -1).split("(");
2669
+ SVGContainer.transform({
2670
+ [transformParts[0]]: transformParts[1].split(",")
2671
+ });
2672
+ }
2673
+
2674
+ const rotatedAngle = SVGContainer.transform("rotate");
2675
+
2676
+ if (rotatedAngle) {
2677
+ SVGContainer.rotate(-rotatedAngle, 0, 0);
2678
+ }
2679
+
2680
+ if (angle !== undefined) {
2681
+ SVGContainer.rotate(angle * (180 / Math.PI), 0, 0);
2682
+ }
2683
+
2684
+ return SVGContainer;
1956
2685
  };
1957
2686
 
1958
2687
  let CircleLineMiterRender = /*#__PURE__*/function (_LineMiterRender) {
@@ -3379,7 +4108,7 @@ function createStyleLegend(style, config) {
3379
4108
  };
3380
4109
  }
3381
4110
 
3382
- function createValueTitle(value, index) {
4111
+ function createValueTitle$1(value, index) {
3383
4112
  if (value.title) return value.title;
3384
4113
  if (isRangeClass(value)) return printRangeClass(value, index);
3385
4114
  if (isUniqueClass(value)) return value.uniqueValue;
@@ -3448,7 +4177,7 @@ const useLegend = (style, config) => useMemo(() => {
3448
4177
  }, [style, config]);
3449
4178
 
3450
4179
  const DEFAULT_LEGEND_CONFIG = {
3451
- renderTitle: createValueTitle
4180
+ renderTitle: createValueTitle$1
3452
4181
  };
3453
4182
  const useLayerLegend = (layer, config) => {
3454
4183
  const {
@@ -3497,11 +4226,11 @@ const useLegendValueSymbol = _ref => {
3497
4226
  });
3498
4227
  };
3499
4228
 
3500
- const DEFAULT_SYMBOL_SIZE = 26;
4229
+ const DEFAULT_SYMBOL_SIZE$1 = 26;
3501
4230
  function useSymbol(_ref, canvasRef) {
3502
4231
  let {
3503
4232
  symbol,
3504
- size = DEFAULT_SYMBOL_SIZE,
4233
+ size = DEFAULT_SYMBOL_SIZE$1,
3505
4234
  render = getSymbolRenders,
3506
4235
  maxWidth
3507
4236
  } = _ref;
@@ -4770,189 +5499,14 @@ const EvergisSelect = _ref => {
4770
5499
  };
4771
5500
 
4772
5501
  var _templateObject$2, _templateObject2$2, _templateObject3$1, _templateObject4$1, _templateObject5$1;
4773
- const LegendContainer = /*#__PURE__*/styled.div(_templateObject$2 || (_templateObject$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n background-color: white;\n"])));
4774
- const LegendSectionContainer = /*#__PURE__*/styled.div(_templateObject2$2 || (_templateObject2$2 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
4775
- 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"])));
4776
- 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);
4777
- const LegendSectionHeader = /*#__PURE__*/styled.div(_templateObject5$1 || (_templateObject5$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 1rem;\n"])));
4778
5502
 
4779
- const LegendSection = _ref => {
4780
- let {
4781
- item,
4782
- renderLegendTitle,
4783
- hideTitle,
4784
- children
4785
- } = _ref;
4786
- return React.createElement(LegendSectionContainer, null, !hideTitle && React.createElement(LegendSectionHeader, null, renderLegendTitle ? renderLegendTitle(item) : item.title), item.values.map(children));
4787
- };
5503
+ const topLeft = distance => css(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteralLoose(["\n top: ", ";\n left: ", ";\n"])), distance, distance);
4788
5504
 
4789
- var _templateObject$3, _templateObject2$3;
4790
- const InputContainer = /*#__PURE__*/styled.div(_templateObject$3 || (_templateObject$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n border-radius: 0.125rem;\n box-sizing: border-box;\n border: 0.0625rem solid rgba(48, 69, 79, 0.12);\n margin-bottom: 0.5rem;\n \n i {\n color: rgba(48, 69, 79, 0.54);\n padding: 0.25rem;\n\n &:hover {\n cursor: pointer;\n color: rgba(48, 69, 79, 0.87);\n }\n }\n"])));
4791
- const InputField = /*#__PURE__*/styled.input(_templateObject2$3 || (_templateObject2$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n border: none;\n outline: none;\n font-size: 1rem;\n line-height: 1.1875rem;\n padding: 0 0.5rem;\n background-color: transparent;\n color: rgba(48, 69, 79, 0.87);\n"])));
5505
+ const topRight = distance => css(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteralLoose(["\n top: ", ";\n right: ", ";\n"])), distance, distance);
4792
5506
 
4793
- const SearchInput = _ref => {
4794
- let {
4795
- onChange
4796
- } = _ref;
4797
- return React.createElement(InputContainer, null, React.createElement(EverCloudSearchIcon, null), React.createElement(InputField, {
4798
- onChange: onChange
4799
- }));
4800
- };
4801
-
4802
- const LegendSymbol = _ref => {
4803
- let {
4804
- parameter,
4805
- parameterValue,
4806
- children
4807
- } = _ref;
4808
- const symbol = useLegendValueSymbol({
4809
- parameterValue,
4810
- parameter
4811
- });
4812
-
4813
- if (!symbol) {
4814
- return null;
4815
- }
4816
-
4817
- return React.createElement(React.Fragment, null, children(symbol));
4818
- };
4819
-
4820
- const LegendValue = _ref => {
4821
- let {
4822
- value,
4823
- parameter,
4824
- maxSize
4825
- } = _ref;
4826
- return React.createElement(LegendValueContainer, null, React.createElement(LegendSymbol, {
4827
- parameter: parameter,
4828
- parameterValue: value.parameterValue
4829
- }, symbol => React.createElement(Symbol, {
4830
- render: getLegendSymbolRenders,
4831
- symbol: symbol,
4832
- size: maxSize
4833
- })), React.createElement(LegendSymbolTitle, null, value.title));
4834
- };
4835
-
4836
- const MAX_SIZE$1 = 26;
4837
-
4838
- const getNumberParam = (parameterValue, param) => {
4839
- return typeof parameterValue === 'object' && param in parameterValue && typeof parameterValue[param] === 'number' ? parameterValue[param] : null;
4840
- };
4841
-
4842
- const getSymbolSize = _ref => {
4843
- let {
4844
- parameterValue,
4845
- maxSize
4846
- } = _ref;
4847
- const size = getNumberParam(parameterValue, 'size');
4848
- const strokeWidth = getNumberParam(parameterValue, 'strokeWidth');
4849
- const width = getNumberParam(parameterValue, 'width');
4850
- const height = getNumberParam(parameterValue, 'height');
4851
-
4852
- if (width && height) {
4853
- return Math.max(width, height);
4854
- } else if (width) {
4855
- return width;
4856
- } else if (height) {
4857
- return height;
4858
- } else if (size) {
4859
- return size + (strokeWidth || 0);
4860
- } else if (typeof maxSize === 'number') {
4861
- return maxSize;
4862
- } else {
4863
- return MAX_SIZE$1;
4864
- }
4865
- };
4866
-
4867
- const Legend = _ref => {
4868
- let {
4869
- layer,
4870
- children,
4871
- className,
4872
- config,
4873
- maxSize
4874
- } = _ref;
4875
- const legend = useLayerLegend(layer, config);
4876
- const {
4877
- renderCustomLegend,
4878
- searchLayer,
4879
- searchable
4880
- } = config || {};
4881
- const {
4882
- symbol
4883
- } = legend || {};
4884
-
4885
- if (!legend && !renderCustomLegend) {
4886
- return null;
4887
- }
4888
-
4889
- return React.createElement(LegendProvider, {
4890
- symbol: symbol
4891
- }, React.createElement(LegendContainer, {
4892
- className: className
4893
- }, searchable && searchLayer && React.createElement(SearchInput, {
4894
- onChange: searchLayer
4895
- }), renderCustomLegend && layer ? renderCustomLegend(layer) : children ? legend && children(legend) : legend && legend.items.map((legendItem, index) => React.createElement(LegendSection, {
4896
- key: legendItem.attribute + "-" + legendItem.parameter,
4897
- item: legendItem,
4898
- hideTitle: (layer == null ? void 0 : layer.alias) === legendItem.title,
4899
- renderLegendTitle: config && config.renderLegendTitle
4900
- }, legendValue => React.createElement(LegendValue, {
4901
- key: legendValue.title + "-" + index,
4902
- value: legendValue,
4903
- parameter: legendItem.parameter,
4904
- maxSize: getSymbolSize({
4905
- parameterValue: legendValue.parameterValue,
4906
- maxSize
4907
- })
4908
- })))));
4909
- };
4910
-
4911
- const Map = _ref => {
4912
- let {
4913
- className,
4914
- position,
4915
- resolution,
4916
- minScale,
4917
- maxScale,
4918
- children,
4919
- onBboxChange,
4920
- style
4921
- } = _ref;
4922
- const wrapperRef = useMapWrapper();
4923
- const {
4924
- map
4925
- } = useMapContext();
4926
- const handleBboxChange = useCallback(state => {
4927
- if (onBboxChange && shouldUpdateMapState(map, {
4928
- position,
4929
- resolution
4930
- })) {
4931
- onBboxChange(state);
4932
- }
4933
- }, [map, onBboxChange, position, resolution]);
4934
- useUpdateMapView({
4935
- position,
4936
- resolution
4937
- });
4938
- useMaxMinScale(minScale, maxScale, position, resolution);
4939
- useMapBboxChange(handleBboxChange);
4940
- return React.createElement("div", {
4941
- className: className,
4942
- ref: wrapperRef,
4943
- style: style
4944
- }, children);
4945
- };
4946
-
4947
- var _templateObject$4, _templateObject2$4, _templateObject3$2, _templateObject4$2, _templateObject5$2;
4948
-
4949
- const topLeft = distance => css(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteralLoose(["\n top: ", ";\n left: ", ";\n"])), distance, distance);
4950
-
4951
- const topRight = distance => css(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteralLoose(["\n top: ", ";\n right: ", ";\n"])), distance, distance);
4952
-
4953
- const bottomLeft = distance => css(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteralLoose(["\n bottom: ", ";\n left: ", ";\n"])), distance, distance);
5507
+ const bottomLeft = distance => css(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteralLoose(["\n bottom: ", ";\n left: ", ";\n"])), distance, distance);
4954
5508
 
4955
- const bottomRight = distance => css(_templateObject4$2 || (_templateObject4$2 = _taggedTemplateLiteralLoose(["\n bottom: ", ";\n right: ", ";\n"])), distance, distance);
5509
+ const bottomRight = distance => css(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteralLoose(["\n bottom: ", ";\n right: ", ";\n"])), distance, distance);
4956
5510
 
4957
5511
  const placementMixin = function placementMixin(placement, distance) {
4958
5512
  if (placement === void 0) {
@@ -4963,19 +5517,19 @@ const placementMixin = function placementMixin(placement, distance) {
4963
5517
  distance = '1rem';
4964
5518
  }
4965
5519
 
4966
- return css(_templateObject5$2 || (_templateObject5$2 = _taggedTemplateLiteralLoose(["\n ", "\n ", "\n ", "\n ", "\n"])), placement === 'top-left' && topLeft(distance), placement === 'top-right' && topRight(distance), placement === 'bottom-left' && bottomLeft(distance), placement === 'bottom-right' && bottomRight(distance));
5520
+ return css(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteralLoose(["\n ", "\n ", "\n ", "\n ", "\n"])), placement === 'top-left' && topLeft(distance), placement === 'top-right' && topRight(distance), placement === 'bottom-left' && bottomLeft(distance), placement === 'bottom-right' && bottomRight(distance));
4967
5521
  };
4968
5522
 
4969
- var _templateObject$5, _templateObject2$5, _templateObject3$3, _templateObject4$3, _templateObject5$3, _templateObject6$1, _templateObject7$1, _templateObject8$1;
4970
- const mapControlBtnMixin = /*#__PURE__*/css(_templateObject$5 || (_templateObject$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 2rem;\n height: 2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n color: #fff;\n"])));
4971
- const ZoomInBtn = /*#__PURE__*/styled(Icon)(_templateObject2$5 || (_templateObject2$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // ZoomInBtn.defaultProps = { kind: "plus" };
5523
+ var _templateObject$3, _templateObject2$3, _templateObject3$2, _templateObject4$2, _templateObject5$2, _templateObject6$1, _templateObject7$1, _templateObject8$1;
5524
+ const mapControlBtnMixin = /*#__PURE__*/css(_templateObject$3 || (_templateObject$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 2rem;\n height: 2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n color: #fff;\n"])));
5525
+ const ZoomInBtn = /*#__PURE__*/styled(Icon)(_templateObject2$3 || (_templateObject2$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // ZoomInBtn.defaultProps = { kind: "plus" };
4972
5526
 
4973
- const ZoomOutBtn = /*#__PURE__*/styled(Icon)(_templateObject3$3 || (_templateObject3$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // ZoomOutBtn.defaultProps = { kind: "minus" };
5527
+ const ZoomOutBtn = /*#__PURE__*/styled(Icon)(_templateObject3$2 || (_templateObject3$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // ZoomOutBtn.defaultProps = { kind: "minus" };
4974
5528
 
4975
- const SearchBtn = /*#__PURE__*/styled(Icon)(_templateObject4$3 || (_templateObject4$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // SearchBtn.defaultProps = { kind: "search" };
5529
+ const SearchBtn = /*#__PURE__*/styled(Icon)(_templateObject4$2 || (_templateObject4$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // SearchBtn.defaultProps = { kind: "search" };
4976
5530
  // TODO not exists in fonts
4977
5531
 
4978
- const FullscreenBtn = /*#__PURE__*/styled(Icon)(_templateObject5$3 || (_templateObject5$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // FullscreenBtn.defaultProps = { kind: "maximize" };
5532
+ const FullscreenBtn = /*#__PURE__*/styled(Icon)(_templateObject5$2 || (_templateObject5$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // FullscreenBtn.defaultProps = { kind: "maximize" };
4979
5533
 
4980
5534
  const MeasureBtn = /*#__PURE__*/styled(Icon)(_templateObject6$1 || (_templateObject6$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // MeasureBtn.defaultProps = { kind: "measure_length" };
4981
5535
 
@@ -5025,21 +5579,66 @@ const Fullscreen = () => {
5025
5579
  }));
5026
5580
  };
5027
5581
 
5028
- var _templateObject$6, _templateObject2$6, _templateObject3$4, _templateObject4$4, _templateObject5$4, _templateObject6$2, _templateObject7$2, _templateObject8$2, _templateObject9$1, _templateObject10$1, _templateObject11$1, _templateObject12$1, _templateObject13$1, _templateObject14$1, _templateObject15$1, _templateObject16$1, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27;
5029
- const MapLegendControl = /*#__PURE__*/styled(MapControl)(_templateObject$6 || (_templateObject$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: default;\n"])));
5030
- const MapLegendContainer = /*#__PURE__*/styled.div(_templateObject2$6 || (_templateObject2$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n width: 100%;\n padding-bottom: 1rem;\n box-sizing: border-box;\n\n canvas {\n height: 1.625rem;\n width: 1.625rem;\n }\n"])));
5031
- const MapLegendHeader = /*#__PURE__*/styled(LegendSectionHeader)(_templateObject3$4 || (_templateObject3$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-width: 15rem;\n margin-bottom: 0.25rem;\n font-weight: 500;\n"])));
5032
- const MapLegendDescriptionContainer = /*#__PURE__*/styled.div(_templateObject4$4 || (_templateObject4$4 = /*#__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"])));
5033
- const MinimizedLegendContainer = /*#__PURE__*/styled.div(_templateObject5$4 || (_templateObject5$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: calc(100% - 1.5rem);\n padding-right: 1.5rem;\n"])));
5034
- const MapLegendSectionContainer = /*#__PURE__*/styled.div(_templateObject6$2 || (_templateObject6$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n :not(:last-child) {\n margin-bottom: 1rem;\n }\n"])));
5035
- const MapLegendValueDescr = /*#__PURE__*/styled.div(_templateObject7$2 || (_templateObject7$2 = /*#__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"])));
5582
+ var _templateObject$4, _templateObject2$4, _templateObject3$3, _templateObject4$3, _templateObject5$3, _templateObject6$2, _templateObject7$2, _templateObject8$2, _templateObject9$1, _templateObject10$1, _templateObject11$1, _templateObject12$1, _templateObject13$1, _templateObject14$1, _templateObject15$1, _templateObject16$1, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33;
5583
+ const ItemText = /*#__PURE__*/styled.div(_templateObject$4 || (_templateObject$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-width: calc(100% - 2rem);\n font: ", ";\n\n ", " {\n margin: 0;\n }\n"])), _ref => {
5584
+ let {
5585
+ theme: {
5586
+ fonts
5587
+ }
5588
+ } = _ref;
5589
+ return fonts.description;
5590
+ }, Description);
5591
+ const ItemSeparator = /*#__PURE__*/styled.div(_templateObject2$4 || (_templateObject2$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n :after {\n content: \"-\";\n margin: 0 0.5rem;\n font-size: 0.75rem;\n }\n"])));
5592
+ const SymbolContainer = /*#__PURE__*/styled("span")(_templateObject3$3 || (_templateObject3$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n min-width: 16px;\n margin-right: 0.5rem;\n"])));
5593
+ const ClassifiedItem = /*#__PURE__*/styled(Flex)(_templateObject4$3 || (_templateObject4$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n align-items: center;\n /* cursor: ", ";\n pointer-events: ", ";*/\n\n :not(:last-of-type) {\n margin-bottom: 0.25rem;\n }\n\n ", ", ", " {\n transition: opacity ", ";\n }\n\n ", " {\n opacity: ", ";\n }\n\n ", " {\n opacity: ", ";\n }\n\n /* :hover {\n ", ", ", " {\n opacity: 1;\n }\n }*/\n"])), _ref2 => {
5594
+ let {
5595
+ isClusterFillColor
5596
+ } = _ref2;
5597
+ return isClusterFillColor ? "default" : "pointer";
5598
+ }, _ref3 => {
5599
+ let {
5600
+ isClusterFillColor
5601
+ } = _ref3;
5602
+ return isClusterFillColor ? "none" : "auto";
5603
+ }, ItemText, SymbolContainer, transition.hover, ItemText, _ref4 => {
5604
+ let {
5605
+ isHidden
5606
+ } = _ref4;
5607
+ return isHidden ? 0.28 : 0.65;
5608
+ }, SymbolContainer, _ref5 => {
5609
+ let {
5610
+ isHidden
5611
+ } = _ref5;
5612
+ return isHidden ? 0.28 : 1;
5613
+ }, ItemText, SymbolContainer);
5614
+ const SymbolButtonWithClick = /*#__PURE__*/css(_templateObject5$3 || (_templateObject5$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 3.875rem;\n height: 3.875rem;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n"])), _ref6 => {
5615
+ let {
5616
+ theme: {
5617
+ palette
5618
+ }
5619
+ } = _ref6;
5620
+ return palette.elementDeep;
5621
+ });
5622
+ const SymbolButton = /*#__PURE__*/styled.span(_templateObject6$2 || (_templateObject6$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background-color ", ";\n ", ";\n\n svg {\n max-width: 4rem;\n max-height: 4rem;\n }\n"])), transition.hover, _ref7 => {
5623
+ let {
5624
+ onClick
5625
+ } = _ref7;
5626
+ return !!onClick && SymbolButtonWithClick;
5627
+ });
5628
+ const MapLegendControl = /*#__PURE__*/styled(MapControl)(_templateObject7$2 || (_templateObject7$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: default;\n"])));
5629
+ const MapLegendContainer = /*#__PURE__*/styled.div(_templateObject8$2 || (_templateObject8$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n width: 100%;\n padding-bottom: 1rem;\n box-sizing: border-box;\n\n canvas {\n height: 1.625rem;\n width: 1.625rem;\n }\n"])));
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
+ 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
+ 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"])));
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"])));
5036
5635
 
5037
5636
  const SizeLegendItemMixin = function SizeLegendItemMixin(value) {
5038
5637
  if (value === void 0) {
5039
5638
  value = 0;
5040
5639
  }
5041
5640
 
5042
- return css(_templateObject8$2 || (_templateObject8$2 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n left: 50%;\n flex: none;\n height: inherit;\n width: inherit;\n margin: 0 auto;\n background: none;\n border: none;\n\n :after {\n content: \"\";\n display: flex;\n border: 1px rgba(48, 69, 79, 0.28) solid;\n border-radius: 50%;\n margin: 0 0 0 -", "px;\n width: ", "px;\n height: ", "px;\n }\n"])), value / 2, value, value);
5641
+ return css(_templateObject14$1 || (_templateObject14$1 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n left: 50%;\n flex: none;\n height: inherit;\n width: inherit;\n margin: 0 auto;\n background: none;\n border: none;\n\n :after {\n content: \"\";\n display: flex;\n border: 1px rgba(48, 69, 79, 0.28) solid;\n border-radius: 50%;\n margin: 0 0 0 -", "px;\n width: ", "px;\n height: ", "px;\n }\n"])), value / 2, value, value);
5043
5642
  };
5044
5643
 
5045
5644
  const StrokeWidthLegendItemMixin = function StrokeWidthLegendItemMixin(value) {
@@ -5047,133 +5646,79 @@ const StrokeWidthLegendItemMixin = function StrokeWidthLegendItemMixin(value) {
5047
5646
  value = 0;
5048
5647
  }
5049
5648
 
5050
- return css(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteralLoose(["\n position: relative;\n background: none;\n border: none;\n display: flex;\n align-items: center;\n flex: none;\n width: calc(100% - 2rem);\n height: ", "px;\n margin: 0 0 0.25rem 0;\n padding-left: 2rem;\n font-size: 0.75rem;\n \n :first-child, :last-child {\n height: auto;\n }\n \n :after {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 0;\n width: 1.5rem;\n height: ", "px;\n margin-top: -", "px;\n background: rgb(224, 224, 224);\n }\n"])), value, value, Math.round(value / 2));
5649
+ return css(_templateObject15$1 || (_templateObject15$1 = _taggedTemplateLiteralLoose(["\n position: relative;\n background: none;\n border: none;\n display: flex;\n align-items: center;\n flex: none;\n width: calc(100% - 2rem);\n height: ", "px;\n margin: 0 0 0.25rem 0;\n padding-left: 2rem;\n font-size: 0.75rem;\n \n :first-child, :last-child {\n height: auto;\n }\n \n :after {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 0;\n width: 1.5rem;\n height: ", "px;\n margin-top: -", "px;\n background: rgb(224, 224, 224);\n }\n"])), value, value, Math.round(value / 2));
5051
5650
  };
5052
5651
 
5053
- const StrokeColorLegendItemMixin = /*#__PURE__*/css(_templateObject10$1 || (_templateObject10$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-right: 0.5rem;\n width: 1.5rem;\n"])));
5054
- const MapLegendItem = /*#__PURE__*/styled.div(_templateObject11$1 || (_templateObject11$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n height: ", "rem;\n background: ", ";\n border: 1px rgba(48, 69, 79, 0.1) solid;\n margin-right: -1px;\n color: rgba(48, 69, 79, 0.65);\n opacity: ", ";\n\n ", "\n\n ", "\n"])), _ref => {
5652
+ const StrokeColorLegendItemMixin = /*#__PURE__*/css(_templateObject16$1 || (_templateObject16$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-right: 0.5rem;\n width: 1.5rem;\n"])));
5653
+ const MapLegendItem = /*#__PURE__*/styled.div(_templateObject17 || (_templateObject17 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n height: ", "rem;\n background: ", ";\n border: 1px rgba(48, 69, 79, 0.1) solid;\n margin-right: -1px;\n color: rgba(48, 69, 79, 0.65);\n opacity: ", ";\n\n ", "\n\n ", "\n"])), _ref8 => {
5055
5654
  let {
5056
5655
  parameter
5057
- } = _ref;
5656
+ } = _ref8;
5058
5657
  return isParameterType(["strokeColor", "stroke.color"], parameter) ? 0.25 : 1;
5059
- }, _ref2 => {
5658
+ }, _ref9 => {
5060
5659
  let {
5061
5660
  value
5062
- } = _ref2;
5661
+ } = _ref9;
5063
5662
  return typeof value === "number" ? "none" : value;
5064
- }, _ref3 => {
5663
+ }, _ref10 => {
5065
5664
  let {
5066
5665
  isHidden
5067
- } = _ref3;
5666
+ } = _ref10;
5068
5667
  return isHidden ? 0.28 : 1;
5069
- }, _ref4 => {
5668
+ }, _ref11 => {
5070
5669
  let {
5071
5670
  value,
5072
5671
  parameter
5073
- } = _ref4;
5672
+ } = _ref11;
5074
5673
  return isParameterType("size", parameter) && SizeLegendItemMixin(value);
5075
- }, _ref5 => {
5674
+ }, _ref12 => {
5076
5675
  let {
5077
5676
  value,
5078
5677
  parameter
5079
- } = _ref5;
5678
+ } = _ref12;
5080
5679
  return isParameterType(["strokeWidth", "stroke.width"], parameter) && StrokeWidthLegendItemMixin(value);
5081
5680
  });
5082
- const MapLegendOther = /*#__PURE__*/styled(MapLegendItem)(_templateObject12$1 || (_templateObject12$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n flex: none;\n position: relative;\n width: 1rem;\n margin-left: 0.25rem;\n border-radius: 0.125rem;\n"])));
5083
- const SizeLegendItemsMixin = /*#__PURE__*/css(_templateObject13$1 || (_templateObject13$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n width: 2rem;\n height: 2rem;\n margin: 0 auto;\n\n ", " {\n width: auto;\n margin-left: 0;\n }\n"])), MapLegendOther);
5084
- const StrokeWidthLegendItemsMixin = /*#__PURE__*/css(_templateObject14$1 || (_templateObject14$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n flex-direction: column;\n width: auto;\n\n ", " {\n width: calc(100% - 2rem);\n margin-left: 0;\n }\n"])), MapLegendOther);
5085
- const SizeMinimizedLegend = /*#__PURE__*/styled.div(_templateObject15$1 || (_templateObject15$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n margin: 0.5rem 0 0.25rem;\n"])));
5086
- const SizeMinimizedLegendSymbol = /*#__PURE__*/styled.div(_templateObject16$1 || (_templateObject16$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 4rem;\n margin-right: 0.75rem;\n"])));
5087
- const SizeMinimizedLegendLabel = /*#__PURE__*/styled.div(_templateObject17 || (_templateObject17 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 0.75rem;\n"])));
5088
- const SizeMinimizedLegendDown = /*#__PURE__*/styled.div(_templateObject18 || (_templateObject18 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: rgba(48, 69, 79, 0.65);\n"])));
5089
- const SizeMinimizedLegendUp = /*#__PURE__*/styled(SizeMinimizedLegendDown)(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
5090
- const SingleSizeLegendItemsMixin = /*#__PURE__*/css(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 4rem;\n margin-right: 0.75rem;\n\n ", ":after {\n margin: 0 auto;\n }\n"])), MapLegendItem);
5091
- const SingleLegendItemsMixin = /*#__PURE__*/css(_templateObject21 || (_templateObject21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n justify-content: center;\n width: 2rem;\n height: auto;\n margin: 0;\n ", "\n \n ", " {\n position: relative;\n top: 0;\n left: 0;\n display: flex;\n align-content: center;\n justify-content: center;\n margin: 0;\n height: auto;\n width: auto;\n\n ", "\n }\n"])), _ref6 => {
5681
+ const MapLegendOther = /*#__PURE__*/styled(MapLegendItem)(_templateObject18 || (_templateObject18 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n flex: none;\n position: relative;\n width: 1rem;\n margin-left: 0.25rem;\n border-radius: 0.125rem;\n"])));
5682
+ const SizeLegendItemsMixin = /*#__PURE__*/css(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n width: 2rem;\n height: 2rem;\n margin: 0 auto;\n\n ", " {\n width: auto;\n margin-left: 0;\n }\n"])), MapLegendOther);
5683
+ const StrokeWidthLegendItemsMixin = /*#__PURE__*/css(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n flex-direction: column;\n width: auto;\n\n ", " {\n width: calc(100% - 2rem);\n margin-left: 0;\n }\n"])), MapLegendOther);
5684
+ const SizeMinimizedLegend = /*#__PURE__*/styled.div(_templateObject21 || (_templateObject21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n margin: 0.5rem 0 0.25rem;\n"])));
5685
+ const SizeMinimizedLegendSymbol = /*#__PURE__*/styled.div(_templateObject22 || (_templateObject22 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 4rem;\n margin-right: 0.75rem;\n"])));
5686
+ const SizeMinimizedLegendLabel = /*#__PURE__*/styled.div(_templateObject23 || (_templateObject23 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 0.75rem;\n"])));
5687
+ const SizeMinimizedLegendDown = /*#__PURE__*/styled.div(_templateObject24 || (_templateObject24 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: rgba(48, 69, 79, 0.65);\n"])));
5688
+ const SizeMinimizedLegendUp = /*#__PURE__*/styled(SizeMinimizedLegendDown)(_templateObject25 || (_templateObject25 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
5689
+ const SingleSizeLegendItemsMixin = /*#__PURE__*/css(_templateObject26 || (_templateObject26 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 4rem;\n margin-right: 0.75rem;\n\n ", ":after {\n margin: 0 auto;\n }\n"])), MapLegendItem);
5690
+ const SingleLegendItemsMixin = /*#__PURE__*/css(_templateObject27 || (_templateObject27 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n justify-content: center;\n width: 2rem;\n height: auto;\n margin: 0;\n ", "\n \n ", " {\n position: relative;\n top: 0;\n left: 0;\n display: flex;\n align-content: center;\n justify-content: center;\n margin: 0;\n height: auto;\n width: auto;\n\n ", "\n }\n"])), _ref13 => {
5092
5691
  let {
5093
5692
  isSize
5094
- } = _ref6;
5693
+ } = _ref13;
5095
5694
  return isSize && SingleSizeLegendItemsMixin;
5096
- }, MapLegendItem, _ref7 => {
5695
+ }, MapLegendItem, _ref14 => {
5097
5696
  let {
5098
5697
  parameter
5099
- } = _ref7;
5698
+ } = _ref14;
5100
5699
  return isParameterType(["strokeColor", "stroke.color"], parameter) && StrokeColorLegendItemMixin;
5101
5700
  });
5102
- const MapLegendItems = /*#__PURE__*/styled.div(_templateObject22 || (_templateObject22 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n width: 100%;\n border-radius: 0.125rem;\n\n ", ";\n ", ";\n ", ";\n"])), _ref8 => {
5701
+ const MapLegendItems = /*#__PURE__*/styled.div(_templateObject28 || (_templateObject28 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n width: 100%;\n border-radius: 0.125rem;\n\n ", ";\n ", ";\n ", ";\n"])), _ref15 => {
5103
5702
  let {
5104
5703
  isSize
5105
- } = _ref8;
5704
+ } = _ref15;
5106
5705
  return isSize && SizeLegendItemsMixin;
5107
- }, _ref9 => {
5706
+ }, _ref16 => {
5108
5707
  let {
5109
5708
  isStrokeWidth
5110
- } = _ref9;
5709
+ } = _ref16;
5111
5710
  return isStrokeWidth && StrokeWidthLegendItemsMixin;
5112
- }, _ref10 => {
5711
+ }, _ref17 => {
5113
5712
  let {
5114
5713
  isSingle
5115
- } = _ref10;
5714
+ } = _ref17;
5116
5715
  return isSingle && SingleLegendItemsMixin;
5117
5716
  });
5118
- const MapLegendItemsContainer = /*#__PURE__*/styled.div(_templateObject23 || (_templateObject23 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 100%;\n \n ", " {\n :first-child {\n border-top-left-radius: 0.125rem;\n border-bottom-left-radius: 0.125rem;\n }\n\n :last-child {\n border-top-right-radius: 0.125rem;\n border-bottom-right-radius: 0.125rem;\n }\n }\n"])), MapLegendItem);
5119
- const MapLegendValues = /*#__PURE__*/styled.div(_templateObject24 || (_templateObject24 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 100%;\n margin-top: 0.5rem;\n font-size: 0.75rem;\n color: rgba(48, 69, 79, 0.65);\n"])));
5120
- const MapLegendValuesRange = /*#__PURE__*/styled.div(_templateObject25 || (_templateObject25 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n width: calc(100% - 1.25rem);\n \n div {\n flex: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n\n :first-child {\n margin-right: 0.5rem;\n }\n\n :last-child {\n margin-left: 0.5rem;\n text-align: right;\n }\n }\n"])));
5121
- const MapLegendValuesOther = /*#__PURE__*/styled(MapLegendOther)(_templateObject26 || (_templateObject26 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n justify-content: center;\n border: 0;\n overflow: visible;\n"])));
5122
- const MapLegendExpandButton = /*#__PURE__*/styled.div(_templateObject27 || (_templateObject27 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n margin-top: 0.1rem;\n font-size: 0.625rem;\n color: #1FB3AA;\n"])));
5123
-
5124
- const MapLegend = _ref => {
5125
- let {
5126
- layer,
5127
- config,
5128
- className,
5129
- hideTitle
5130
- } = _ref;
5131
- const legend = useMapLegend(layer, config);
5132
-
5133
- if (!legend) {
5134
- return null;
5135
- }
5136
-
5137
- const {
5138
- symbol,
5139
- items
5140
- } = legend;
5141
- return React.createElement(LegendProvider, {
5142
- symbol: symbol
5143
- }, React.createElement(MapLegendControl, {
5144
- className: className
5145
- }, !hideTitle && React.createElement(MapLegendHeader, null, layer == null ? void 0 : layer.alias), !!items.length && React.createElement(MapLegendContainer, null, React.createElement(Legend, {
5146
- layer: layer,
5147
- config: config
5148
- }))));
5149
- };
5150
-
5151
- const MAX_SIZE$2 = 100;
5152
- const MapLegendSymbol = _ref => {
5153
- let {
5154
- value,
5155
- parameter
5156
- } = _ref;
5157
- return React.createElement(LegendSymbol, {
5158
- key: value.title,
5159
- parameter: parameter,
5160
- parameterValue: value.parameterValue
5161
- }, symbol => React.createElement(Symbol, {
5162
- render: getMapLegendSymbolRenders,
5163
- symbol: symbol,
5164
- size: MAX_SIZE$2
5165
- }));
5166
- };
5167
-
5168
- const MapLegendDescription = _ref => {
5169
- let {
5170
- parameter
5171
- } = _ref;
5172
- const isSize = isParameterType("size", parameter);
5173
- const isStrokeWidth = isParameterType(["strokeWidth", "stroke.width"], parameter);
5174
- const isStrokeColor = isParameterType(["strokeColor", "stroke.color"], parameter);
5175
- return React.createElement(MapLegendDescriptionContainer, null, isStrokeWidth || isStrokeColor ? isStrokeWidth ? "Толщина обводки" : "Цвет обводки" : isSize ? "Размер знака" : "Цвет символа");
5176
- };
5717
+ const MapLegendItemsContainer = /*#__PURE__*/styled.div(_templateObject29 || (_templateObject29 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 100%;\n \n ", " {\n :first-child {\n border-top-left-radius: 0.125rem;\n border-bottom-left-radius: 0.125rem;\n }\n\n :last-child {\n border-top-right-radius: 0.125rem;\n border-bottom-right-radius: 0.125rem;\n }\n }\n"])), MapLegendItem);
5718
+ const MapLegendValues = /*#__PURE__*/styled.div(_templateObject30 || (_templateObject30 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 100%;\n margin-top: 0.5rem;\n font-size: 0.75rem;\n color: rgba(48, 69, 79, 0.65);\n"])));
5719
+ const MapLegendValuesRange = /*#__PURE__*/styled.div(_templateObject31 || (_templateObject31 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n width: calc(100% - 1.25rem);\n \n div {\n flex: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n\n :first-child {\n margin-right: 0.5rem;\n }\n\n :last-child {\n margin-left: 0.5rem;\n text-align: right;\n }\n }\n"])));
5720
+ const MapLegendValuesOther = /*#__PURE__*/styled(MapLegendOther)(_templateObject32 || (_templateObject32 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n justify-content: center;\n border: 0;\n overflow: visible;\n"])));
5721
+ const MapLegendExpandButton = /*#__PURE__*/styled.div(_templateObject33 || (_templateObject33 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n margin-top: 0.1rem;\n font-size: 0.625rem;\n color: #1FB3AA;\n"])));
5177
5722
 
5178
5723
  const getValueFromLegendTitle = (title, minOrMax) => {
5179
5724
  if (title.includes(" - ")) {
@@ -5252,6 +5797,377 @@ const MinimizedLegend = _ref => {
5252
5797
  })), typeof (other == null ? void 0 : other.parameterValue) === "string" && (titleMax || titleMin) && React.createElement(MapLegendValues, null, React.createElement(MapLegendValuesRange, null, React.createElement("div", null, titleMax), React.createElement("div", null, titleMin)), React.createElement(MapLegendValuesOther, null, "-")));
5253
5798
  };
5254
5799
 
5800
+ const useSvgSymbol = (symbol, skipOffset) => {
5801
+ const SVGWrapperRefElement = useRef(null);
5802
+ const SVGContainer = useMemo(() => SVG(), []);
5803
+ const initSvg = useCallback(() => {
5804
+ SVGContainer.addTo(SVGWrapperRefElement.current);
5805
+ }, [SVGContainer]);
5806
+ const getSvgData = useCallback(() => SVGContainer.svg(), [SVGContainer]);
5807
+ const manipulateSvg = useCallback(_ref => {
5808
+ let {
5809
+ svg,
5810
+ bg,
5811
+ newSymbol
5812
+ } = _ref;
5813
+ manipulateSvgSymbol(SVGContainer, newSymbol || symbol, svg, bg);
5814
+ }, [SVGContainer, symbol]);
5815
+ const getUpdatedSvgSymbol = useCallback((field, value) => {
5816
+ var _newSymbol$background;
5817
+
5818
+ const {
5819
+ data,
5820
+ offset
5821
+ } = symbol;
5822
+ const newValue = value instanceof Color$1 ? value.toString("rgba") : value;
5823
+ const newSymbol = JSON.parse(JSON.stringify(_extends({}, symbol, {
5824
+ offset: skipOffset ? DEFAULT_SYMBOL_OFFSET : isSizeClassification(field) ? getOffsetParameterValue(offset) : offset
5825
+ })));
5826
+
5827
+ if (field.indexOf(".") !== -1) {
5828
+ var _newSymbol$parts$;
5829
+
5830
+ const parts = field.split(".");
5831
+
5832
+ if ((_newSymbol$parts$ = newSymbol[parts[0]]) != null && _newSymbol$parts$[parts[1]]) {
5833
+ newSymbol[parts[0]][parts[1]] = newValue;
5834
+ } else {
5835
+ newSymbol[parts[0]] = _extends({}, newSymbol[parts[0]], {
5836
+ [parts[1]]: newValue
5837
+ }, parts[0] === "background" ? {
5838
+ type: newSymbol.background.type,
5839
+ id: "symbol-bg"
5840
+ } : parts[0] === "figure" ? {
5841
+ id: "symbol-figure"
5842
+ } : {});
5843
+ }
5844
+ } else {
5845
+ newSymbol[field] = newValue;
5846
+ }
5847
+
5848
+ manipulateSvg({
5849
+ svg: data,
5850
+ newSymbol,
5851
+ bg: (_newSymbol$background = newSymbol.background) == null ? void 0 : _newSymbol$background.type
5852
+ });
5853
+ return _extends({}, newSymbol, {
5854
+ data: SVGContainer.svg()
5855
+ });
5856
+ }, [SVGContainer, manipulateSvg, skipOffset, symbol]);
5857
+ return {
5858
+ svgRef: SVGWrapperRefElement,
5859
+ initSvg,
5860
+ getSvgData,
5861
+ manipulateSvg,
5862
+ getUpdatedSvgSymbol
5863
+ };
5864
+ };
5865
+
5866
+ var _templateObject$5, _templateObject2$5;
5867
+ const SvgSymbolContainer = /*#__PURE__*/styled.div(_templateObject$5 || (_templateObject$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n"])));
5868
+ const SvgSymbolLabel = /*#__PURE__*/styled.div(_templateObject2$5 || (_templateObject2$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n color: #fff;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n"])), _ref => {
5869
+ let {
5870
+ fontSettings
5871
+ } = _ref;
5872
+ return !!(fontSettings != null && fontSettings.fontFamily) && "font-family: " + fontSettings.fontFamily;
5873
+ }, _ref2 => {
5874
+ let {
5875
+ fontSettings
5876
+ } = _ref2;
5877
+ return !!(fontSettings != null && fontSettings.fontWeight) && "font-weight: " + fontSettings.fontWeight;
5878
+ }, _ref3 => {
5879
+ let {
5880
+ fontSettings
5881
+ } = _ref3;
5882
+ return !!(fontSettings != null && fontSettings.fontStyle) && "font-style: " + fontSettings.fontStyle;
5883
+ }, _ref4 => {
5884
+ let {
5885
+ fontSettings
5886
+ } = _ref4;
5887
+ return !!(fontSettings != null && fontSettings.fontColor) && "color: " + fontSettings.fontColor;
5888
+ }, _ref5 => {
5889
+ let {
5890
+ fontSettings
5891
+ } = _ref5;
5892
+ return !!(fontSettings != null && fontSettings.fontSize) && "font-size: " + (typeof fontSettings.fontSize === "string" ? fontSettings.fontSize : fontSettings.fontSize + "px");
5893
+ }, _ref6 => {
5894
+ let {
5895
+ fontSettings
5896
+ } = _ref6;
5897
+ return !!(fontSettings != null && fontSettings.haloColor) && !!(fontSettings != null && fontSettings.haloWidth) && "-webkit-text-stroke: " + fontSettings.haloWidth + "px " + fontSettings.haloColor + ";";
5898
+ });
5899
+ const SvgSymbol = /*#__PURE__*/memo(_ref7 => {
5900
+ let {
5901
+ svg,
5902
+ bg,
5903
+ symbol,
5904
+ title,
5905
+ skipOffset,
5906
+ text,
5907
+ fontSettings,
5908
+ onClick
5909
+ } = _ref7;
5910
+ const {
5911
+ svgRef,
5912
+ initSvg,
5913
+ getSvgData,
5914
+ manipulateSvg
5915
+ } = useSvgSymbol(symbol, skipOffset);
5916
+ const onSelectSymbol = useCallback(() => {
5917
+ onClick == null ? void 0 : onClick(getSvgData(), _extends({}, symbol, bg ? {
5918
+ background: _extends({}, symbol.background, {
5919
+ type: bg
5920
+ })
5921
+ } : {}));
5922
+ }, [bg, getSvgData, onClick, symbol]);
5923
+ const renderSymbol = useMemo(() => React.createElement(SymbolButton, {
5924
+ ref: svgRef,
5925
+ title: title,
5926
+ onClick: onClick ? onSelectSymbol : undefined
5927
+ }), [svgRef, title, onClick, onSelectSymbol]);
5928
+ useEffect(() => {
5929
+ initSvg();
5930
+ }, [initSvg]);
5931
+ useEffect(() => {
5932
+ manipulateSvg({
5933
+ svg,
5934
+ bg,
5935
+ newSymbol: symbol
5936
+ });
5937
+ }, [svg, symbol, bg, manipulateSvg]);
5938
+ return text ? React.createElement(SvgSymbolContainer, null, renderSymbol, React.createElement(SvgSymbolLabel, {
5939
+ fontSettings: fontSettings
5940
+ }, text), !!(fontSettings != null && fontSettings.haloColor) && !!(fontSettings != null && fontSettings.haloWidth) && React.createElement(SvgSymbolLabel, {
5941
+ fontSettings: _extends({}, fontSettings, {
5942
+ haloColor: undefined,
5943
+ haloWidth: undefined
5944
+ })
5945
+ }, text)) : renderSymbol;
5946
+ });
5947
+
5948
+ const SymbolByType = _ref => {
5949
+ let {
5950
+ type,
5951
+ symbol,
5952
+ size,
5953
+ svg,
5954
+ skipOffset
5955
+ } = _ref;
5956
+ const defaultSymbol = useMemo(() => React.createElement(Symbol, {
5957
+ symbol: symbol,
5958
+ size: size
5959
+ }), [symbol, size]);
5960
+
5961
+ switch (type) {
5962
+ case "svgPointSymbol":
5963
+ return svg ? React.createElement(SvgSymbol, {
5964
+ svg: svg,
5965
+ size: size,
5966
+ skipOffset: skipOffset,
5967
+ symbol: serializeSvgPointSymbol(symbol)
5968
+ }) : defaultSymbol;
5969
+
5970
+ default:
5971
+ return defaultSymbol;
5972
+ }
5973
+ };
5974
+
5975
+ const LegendSymbolRenderer = /*#__PURE__*/memo(_ref => {
5976
+ let {
5977
+ symbol
5978
+ } = _ref;
5979
+
5980
+ /* return isClusterSymbol(symbol) ? (
5981
+ <ClusterLegendContainer>
5982
+ <ClusterSymbolPreview symbol={symbol as ClusterSymbolDc} />
5983
+ </ClusterLegendContainer>
5984
+ ) : (
5985
+ <SymbolByType
5986
+ symbol={deserializeSymbol(symbol)}
5987
+ size={getLegendSymbolSize(symbol) || DEFAULT_LEGEND_SYMBOL_SIZE}
5988
+ type={symbol.type}
5989
+ svg={(symbol as SvgPointSymbol).data}
5990
+ skipOffset
5991
+ />
5992
+ );*/
5993
+ return React.createElement(SymbolByType, {
5994
+ symbol: deserializeSymbol(symbol),
5995
+ size: getLegendSymbolSize(symbol) || DEFAULT_LEGEND_SYMBOL_SIZE,
5996
+ type: symbol.type,
5997
+ svg: symbol.data,
5998
+ skipOffset: true
5999
+ });
6000
+ });
6001
+
6002
+ const MaximizedLegend = _ref => {
6003
+ let {
6004
+ symbol: sectionSymbol,
6005
+ parameter,
6006
+ values,
6007
+ index: sectionIndex,
6008
+ attributeType
6009
+ } = _ref;
6010
+ const {
6011
+ t
6012
+ } = useTranslation("common");
6013
+ const isDate = attributeType === "DateTime";
6014
+ const isSize = isParameterType("size", parameter);
6015
+ const isStrokeWidth = isParameterType(["strokeWidth", "stroke.width"], parameter);
6016
+ const isStrokeColor = isParameterType(["strokeColor", "stroke.color"], parameter);
6017
+ const parameterValue = useMemo(() => get(sectionSymbol, parameter), [sectionSymbol, parameter]);
6018
+ const renderColumn = useCallback((column, index) => {
6019
+ const dateTime = column.split(" ");
6020
+ return React.createElement(Fragment, {
6021
+ key: index
6022
+ }, React.createElement(ItemText, {
6023
+ title: column
6024
+ }, dateTime[0], React.createElement(Description, null, dateTime[1])), index === 0 && React.createElement(ItemSeparator, null));
6025
+ }, []);
6026
+ const renderItemText = useCallback((title, index) => {
6027
+ if (!title) {
6028
+ return React.createElement(ItemText, null, t("classification.other"));
6029
+ }
6030
+
6031
+ const columns = title == null ? void 0 : title.split(" - ");
6032
+ const isSingleColumn = (columns == null ? void 0 : columns.length) === 1;
6033
+
6034
+ if (!isDate || index && isSingleColumn) {
6035
+ return React.createElement(ItemText, {
6036
+ title: title
6037
+ }, title);
6038
+ }
6039
+
6040
+ if (!index && isSingleColumn) {
6041
+ return React.createElement(React.Fragment, null, React.createElement(ItemText, {
6042
+ title: "\u221E"
6043
+ }, "\u221E"), React.createElement(ItemSeparator, null), renderColumn(title));
6044
+ }
6045
+
6046
+ return React.createElement(React.Fragment, null, columns.map(renderColumn));
6047
+ }, [isDate, renderColumn, t]);
6048
+ const renderLegend = useCallback((_ref2, index) => {
6049
+ var _parameterValue$value;
6050
+
6051
+ let {
6052
+ symbol,
6053
+ title
6054
+ /* , hiddenCondition*/
6055
+
6056
+ } = _ref2;
6057
+ if (!symbol) return null; // const isClusterFillColor = checkIsClusterFillColor(symbol, parameter);
6058
+
6059
+ return React.createElement(ClassifiedItem, {
6060
+ key: sectionIndex + title + index
6061
+ }, isSize || isStrokeWidth || isStrokeColor ? React.createElement(MapLegendItems, {
6062
+ parameter: parameter,
6063
+ isSize: isSize,
6064
+ isStrokeWidth: isStrokeWidth,
6065
+ isStrokeColor: isStrokeColor,
6066
+ isSingle: true
6067
+ }, React.createElement(MapLegendItem, {
6068
+ key: "" + title + index,
6069
+ title: title,
6070
+ value: (parameterValue == null ? void 0 : (_parameterValue$value = parameterValue.values[index]) == null ? void 0 : _parameterValue$value.value) || (parameterValue == null ? void 0 : parameterValue.defaultValue),
6071
+ parameter: parameter
6072
+ })) : React.createElement(SymbolContainer, null, React.createElement(LegendSymbolRenderer, {
6073
+ symbol: symbol
6074
+ /* isClusterFillColor ? symbol : getExtractedSymbol(symbol, true)*/
6075
+
6076
+ })), renderItemText(title, index));
6077
+ }, [isSize, isStrokeColor, isStrokeWidth, parameter, parameterValue == null ? void 0 : parameterValue.defaultValue, parameterValue == null ? void 0 : parameterValue.values, renderItemText, sectionIndex]);
6078
+ return React.createElement(React.Fragment, null, values.map(renderLegend));
6079
+ };
6080
+
6081
+ const LegendSection = _ref => {
6082
+ let {
6083
+ symbol,
6084
+ param,
6085
+ params,
6086
+ classified,
6087
+ attributeName,
6088
+ attributeType,
6089
+ index
6090
+ } = _ref;
6091
+ const {
6092
+ t
6093
+ } = useTranslation("common");
6094
+ const [isExpanded, toggleExpanded] = useToggle$1();
6095
+ return React.createElement(MapLegendSectionContainer, null, React.createElement(MapLegendHeader, null, attributeName), isExpanded ? React.createElement(MaximizedLegend, {
6096
+ key: param,
6097
+ symbol: symbol,
6098
+ parameter: param,
6099
+ attributeType: attributeType,
6100
+ index: index,
6101
+ values: getMaximizedLegendValues(attributeType, param, params, classified, symbol, index, t("classification.other"))
6102
+ }) : React.createElement(MinimizedLegend, {
6103
+ key: param,
6104
+ values: getMinimizedLegendValues(attributeType, classified, index),
6105
+ defaultValue: classified.defaultValue,
6106
+ parameter: param,
6107
+ attributeType: attributeType
6108
+ }), React.createElement(MapLegendExpandButton, {
6109
+ onClick: toggleExpanded
6110
+ }, t(isExpanded ? "toggleMenu" : "Развернуть")));
6111
+ };
6112
+
6113
+ const Legend = _ref => {
6114
+ let {
6115
+ layerInfo
6116
+ } = _ref;
6117
+ const classified = getClassified(layerInfo);
6118
+ const params = Object.keys(classified);
6119
+ return React.createElement(MapLegendContainer, null, Object.keys(classified).map((param, index) => {
6120
+ var _classified$param$val, _layerInfo$style;
6121
+
6122
+ const attributeName = getAttributeNameFromCondition((_classified$param$val = classified[param].values[0]) == null ? void 0 : _classified$param$val.condition);
6123
+ return React.createElement(LegendSection, {
6124
+ symbol: (_layerInfo$style = layerInfo.style) == null ? void 0 : _layerInfo$style.symbol,
6125
+ attributeType: getAttributeType(layerInfo, attributeName),
6126
+ attributeName: attributeName,
6127
+ classified: classified[param],
6128
+ param: param,
6129
+ params: params,
6130
+ index: index
6131
+ });
6132
+ }));
6133
+ };
6134
+
6135
+ const Map = _ref => {
6136
+ let {
6137
+ className,
6138
+ position,
6139
+ resolution,
6140
+ minScale,
6141
+ maxScale,
6142
+ children,
6143
+ onBboxChange,
6144
+ style
6145
+ } = _ref;
6146
+ const wrapperRef = useMapWrapper();
6147
+ const {
6148
+ map
6149
+ } = useMapContext();
6150
+ const handleBboxChange = useCallback(state => {
6151
+ if (onBboxChange && shouldUpdateMapState(map, {
6152
+ position,
6153
+ resolution
6154
+ })) {
6155
+ onBboxChange(state);
6156
+ }
6157
+ }, [map, onBboxChange, position, resolution]);
6158
+ useUpdateMapView({
6159
+ position,
6160
+ resolution
6161
+ });
6162
+ useMaxMinScale(minScale, maxScale, position, resolution);
6163
+ useMapBboxChange(handleBboxChange);
6164
+ return React.createElement("div", {
6165
+ className: className,
6166
+ ref: wrapperRef,
6167
+ style: style
6168
+ }, children);
6169
+ };
6170
+
5255
6171
  let MeasureTool = /*#__PURE__*/function (_React$Component) {
5256
6172
  _inherits(MeasureTool, _React$Component);
5257
6173
 
@@ -5456,15 +6372,15 @@ const Measurer = _ref => {
5456
6372
  }, props)) : null;
5457
6373
  };
5458
6374
 
5459
- var _templateObject$7, _templateObject2$7, _templateObject3$5;
5460
- const ScaleRulerContainer = /*#__PURE__*/styled.div(_templateObject$7 || (_templateObject$7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 2rem;\n cursor: default;\n display: flex;\n align-items: flex-end;\n padding: 0 0.5rem 0.5rem;\n box-sizing: border-box;\n"])));
5461
- const ScaleRulerBlock = /*#__PURE__*/styled.div(_templateObject2$7 || (_templateObject2$7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-end;\n justify-content: center;\n width: ", ";\n height: 0.25rem;\n border: 0.0625rem solid white;\n border-top: 0;\n"])), _ref => {
6375
+ var _templateObject$6, _templateObject2$6, _templateObject3$4;
6376
+ const ScaleRulerContainer = /*#__PURE__*/styled.div(_templateObject$6 || (_templateObject$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 2rem;\n cursor: default;\n display: flex;\n align-items: flex-end;\n padding: 0 0.5rem 0.5rem;\n box-sizing: border-box;\n"])));
6377
+ const ScaleRulerBlock = /*#__PURE__*/styled.div(_templateObject2$6 || (_templateObject2$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-end;\n justify-content: center;\n width: ", ";\n height: 0.25rem;\n border: 0.0625rem solid white;\n border-top: 0;\n"])), _ref => {
5462
6378
  let {
5463
6379
  width
5464
6380
  } = _ref;
5465
6381
  return width + "px";
5466
6382
  });
5467
- const TextContainer = /*#__PURE__*/styled.div(_templateObject3$5 || (_templateObject3$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 2rem;\n display: flex;\n justify-content: center;\n align-items: ", ";\n width: ", ";\n color: #fff;\n font-size: 1rem;\n cursor: default;\n padding: 0 0.5rem;\n"])), _ref2 => {
6383
+ const TextContainer = /*#__PURE__*/styled.div(_templateObject3$4 || (_templateObject3$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 2rem;\n display: flex;\n justify-content: center;\n align-items: ", ";\n width: ", ";\n color: #fff;\n font-size: 1rem;\n cursor: default;\n padding: 0 0.5rem;\n"])), _ref2 => {
5468
6384
  let {
5469
6385
  alignEnd
5470
6386
  } = _ref2;
@@ -5517,17 +6433,17 @@ const ZoomLevel = () => {
5517
6433
  }, level || 0);
5518
6434
  };
5519
6435
 
5520
- var _templateObject$8, _templateObject2$8, _templateObject3$6, _templateObject4$5, _templateObject5$5, _templateObject6$3, _templateObject7$3, _templateObject8$3, _templateObject9$2, _templateObject10$2, _templateObject11$2;
6436
+ var _templateObject$7, _templateObject2$7, _templateObject3$5, _templateObject4$4, _templateObject5$4, _templateObject6$3, _templateObject7$3, _templateObject8$3, _templateObject9$2, _templateObject10$2, _templateObject11$2;
5521
6437
 
5522
- const cornerBottom = cornerSize => css(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteralLoose(["\n &:before {\n left: 50%;\n transform: translate(-50%, 100%);\n bottom: 0;\n border-left: ", " solid transparent;\n border-right: ", " solid transparent;\n border-top: ", " solid rgba(28, 33, 48, 0.8);\n }\n"])), cornerSize, cornerSize, cornerSize);
6438
+ const cornerBottom = cornerSize => css(_templateObject$7 || (_templateObject$7 = _taggedTemplateLiteralLoose(["\n &:before {\n left: 50%;\n transform: translate(-50%, 100%);\n bottom: 0;\n border-left: ", " solid transparent;\n border-right: ", " solid transparent;\n border-top: ", " solid rgba(28, 33, 48, 0.8);\n }\n"])), cornerSize, cornerSize, cornerSize);
5523
6439
 
5524
- const cornerLeft = cornerSize => css(_templateObject2$8 || (_templateObject2$8 = _taggedTemplateLiteralLoose(["\n &:before {\n transform: translate(-100%, -50%);\n left: 0;\n top: 50%;\n border-top: ", " solid transparent;\n border-right: ", " solid rgba(28, 33, 48, 0.8);\n border-bottom: ", " solid transparent;\n }\n"])), cornerSize, cornerSize, cornerSize);
6440
+ const cornerLeft = cornerSize => css(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteralLoose(["\n &:before {\n transform: translate(-100%, -50%);\n left: 0;\n top: 50%;\n border-top: ", " solid transparent;\n border-right: ", " solid rgba(28, 33, 48, 0.8);\n border-bottom: ", " solid transparent;\n }\n"])), cornerSize, cornerSize, cornerSize);
5525
6441
 
5526
- const cornerRight = cornerSize => css(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteralLoose(["\n &:before {\n transform: translate(100%, -50%);\n right: 0;\n top: 50%;\n border-top: ", " solid transparent;\n border-left: ", " solid rgba(28, 33, 48, 0.8);\n border-bottom: ", " solid transparent;\n }\n"])), cornerSize, cornerSize, cornerSize);
6442
+ const cornerRight = cornerSize => css(_templateObject3$5 || (_templateObject3$5 = _taggedTemplateLiteralLoose(["\n &:before {\n transform: translate(100%, -50%);\n right: 0;\n top: 50%;\n border-top: ", " solid transparent;\n border-left: ", " solid rgba(28, 33, 48, 0.8);\n border-bottom: ", " solid transparent;\n }\n"])), cornerSize, cornerSize, cornerSize);
5527
6443
 
5528
- const cornerTop = cornerSize => css(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteralLoose(["\n &:before {\n transform: translate(-50%, -100%);\n left: 50%;\n top: 0;\n border-left: ", " solid transparent;\n border-right: ", " solid transparent;\n border-bottom: ", " solid rgba(28, 33, 48, 0.8);\n }\n"])), cornerSize, cornerSize, cornerSize);
6444
+ const cornerTop = cornerSize => css(_templateObject4$4 || (_templateObject4$4 = _taggedTemplateLiteralLoose(["\n &:before {\n transform: translate(-50%, -100%);\n left: 50%;\n top: 0;\n border-left: ", " solid transparent;\n border-right: ", " solid transparent;\n border-bottom: ", " solid rgba(28, 33, 48, 0.8);\n }\n"])), cornerSize, cornerSize, cornerSize);
5529
6445
 
5530
- const top = (distance, cornerSize) => css(_templateObject5$5 || (_templateObject5$5 = _taggedTemplateLiteralLoose(["\n transform: translate(-50%, 0);\n left: -50%;\n bottom: ", ";\n ", "\n"])), distance, cornerSize && cornerBottom(cornerSize));
6446
+ const top = (distance, cornerSize) => css(_templateObject5$4 || (_templateObject5$4 = _taggedTemplateLiteralLoose(["\n transform: translate(-50%, 0);\n left: -50%;\n bottom: ", ";\n ", "\n"])), distance, cornerSize && cornerBottom(cornerSize));
5531
6447
 
5532
6448
  const right = (distance, cornerSize) => css(_templateObject6$3 || (_templateObject6$3 = _taggedTemplateLiteralLoose(["\n transform: translate(0, -50%);\n top: -50%;\n left: ", ";\n ", "\n"])), distance, cornerSize && cornerLeft(cornerSize));
5533
6449
 
@@ -5618,5 +6534,5 @@ const DraggableMarker = _ref => {
5618
6534
  return React.createElement(Fragment, null);
5619
6535
  };
5620
6536
 
5621
- export { ArrowLineMiterRender, BaseMeasureToolCreator, BaseMeasureToolEditor, CRS_MAP, CardAttributes, CardHeader, CircleLineMiterRender, ClassificationCondition, ClassificationManager, ClusterLayer, ClusterSymbol, CompoundIcon, DEFAULT_CRS, DEFAULT_SRID, DEFAULT_SYMBOL_SIZE, DraggableMarker, 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, LabelSymbol, Legend, LegendContainer, LegendProvider, LegendSection, LegendSectionContainer, LegendSymbol, LegendValue, LegendValueContainer, LineMiterKind, LineMiterRender, Map, MapControl, MapControls, MapLegend, MapLegendContainer, MapLegendDescription, MapLegendDescriptionContainer, MapLegendExpandButton, MapLegendHeader, MapLegendItem, MapLegendItems, MapLegendOther, MapLegendSectionContainer, MapLegendSymbol, MapLegendValueDescr, MapLegendValues, MapProvider, Measure, MeasureTool, Measurer, MinimizedLegend, NO_CONTENT_VALUE, Noop, PREVIEW_LIMITS, SGisBrushFill, SGisImageFill, SGisPolygonSymbol, SGisPolylineSymbol, SOLID_INTERVALS, SVGPoly, ScaleRuler, ScaleRulerBlock, ScaleRulerContainer, Search, SelectedPointSymbol, SelectedPolySymbol, ShadowedPointSymbol, ShadowedPolySymbol, SizeMinimizedLegendDown, SizeMinimizedLegendUp, SquareLineMiterRender, SrId, StyleSymbol, Symbol, TextContainer, TileLayer, Tooltip, TooltipComponent, TooltipProvider, Zoom, ZoomLevel, adjustSymbol, applyParameterValue, clamp, copyRings, createCompositeSymbol, createLabelSymbol, createStyleLegend, createValueTitle, defaultOffset, defineStrokeStylePreset, deserializeSymbol, evaluateFeature, extractStyle, extractSymbol, findChildFeatureStyle, findChildFeatureSymbol, formatArea, formatAttributeValue, formatLength, formatPolygonMeasure, getAttributeNameFromClassified, getAttributeNameFromCondition, getChildSymbols, getCrs, getDashStylePreset, getFeatureSymbol, getLegendSymbolRenders, getLineDash, getMapLegendSymbolRenders, getMapState, getOffsetParameterValue, getParameterValue, getScale, getSymbolRenders, isArrowLineMiter, isCalculatedParameter, isCircleLineMiter, isCompositeSymbol, isDashedBrush, isFilledLineMitter, isHatchBrush, isImageSymbol, isLabelSymbol, isMaskedImageSymbol, isMiterExist, isNumeric, isParameterByAttribute, isParameterType, isParameterValueSimple, isParameterValueSymbol, isPatternBrush, isPointLabelSymbol, isPointSymbol, isPolygonHasHatchBrush, isPolygonHasPatternBrush, isPolygonLabelSymbol, isPolygonSymbol, isPolylineLabelSymbol, isPolylineLikePolygon, isPolylineSymbol, isPolylineSymbols, isRangeClass, isRasterSymbol, isSGisClusterSymbol, isSGisH3Symbol, isSGisImageSymbol, isSGisPointSymbol, isSGisPolygonSymbol, isSGisPolylineSymbol, isScalablePolylineSymbol, isSimpleOffset, isSimplePolylineSymbol, isSimpleSymbol, isSizableSymbol, isSolidBrush, isSquareLineMiter, isSquareSymbol, isStaticImageSymbol, isStringParameterValue, isStrokeStyledSymbol, isStyle, isSymbolWithOffset, isTwoDimensionalSymbol, isUniqueClass, isValidParameter, measureAreaSymbol, measureLengthSymbol, measurePolygonSnapSymbol, metersToPixels, numberWithSpaces, packStyle, polygonCircleFromPoint, printRangeClass, renderSymbolToCanvas, selectedPoint, selectedPolygon, selectedPolyline, setDefaultParameterValue, setParameterValue, shouldUpdateMapState, solidStrokeStylePreset, strokeStylePresets, symbolParameterWalker, symbolTypeGuard, toIntervals, toLineDash, unClassify, updateMapResolution, 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, useSymbol, useToggle, useTooltip, useTooltipContext, useUpdate, useUpdateMapView };
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 };
5622
6538
  //# sourceMappingURL=react.esm.js.map