@evergis/react 3.1.1 → 3.1.2

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 (86) hide show
  1. package/dist/components/ErrorBoundary/index.d.ts +12 -0
  2. package/dist/components/ErrorBoundary/styled.d.ts +1 -0
  3. package/dist/components/ErrorBoundary/types.d.ts +7 -0
  4. package/dist/components/Map/Map.d.ts +5 -0
  5. package/dist/components/Map/components/BuildingsLayer/BuildingsLayer.d.ts +3 -0
  6. package/dist/components/Map/components/BuildingsLayer/index.d.ts +2 -0
  7. package/dist/components/Map/components/BuildingsLayer/types.d.ts +4 -0
  8. package/dist/components/Map/components/Layer/Layer.d.ts +3 -0
  9. package/dist/components/Map/components/Layer/RasterLayer.d.ts +3 -0
  10. package/dist/components/Map/components/Layer/VectorLayer.d.ts +3 -0
  11. package/dist/components/Map/components/Layer/constants.d.ts +137 -0
  12. package/dist/components/Map/components/Layer/index.d.ts +2 -0
  13. package/dist/components/Map/components/Layer/types.d.ts +12 -0
  14. package/dist/components/Map/components/Layer/utils/getClientStyleItemPrefixSuffix.d.ts +3 -0
  15. package/dist/components/Map/components/index.d.ts +2 -0
  16. package/dist/components/Map/index.d.ts +3 -0
  17. package/dist/components/Map/styled.d.ts +4 -0
  18. package/dist/components/Map/types.d.ts +10 -0
  19. package/dist/components/MapContext/MapContext.d.ts +2 -0
  20. package/dist/components/MapContext/MapProvider.d.ts +3 -0
  21. package/dist/components/MapContext/index.d.ts +3 -0
  22. package/dist/components/MapContext/types.d.ts +138 -0
  23. package/dist/components/ResizablePanel/ResizablePanel.d.ts +3 -0
  24. package/dist/components/ResizablePanel/index.d.ts +2 -0
  25. package/dist/components/ResizablePanel/styled.d.ts +11 -0
  26. package/dist/components/ResizablePanel/types.d.ts +14 -0
  27. package/dist/components/ServerNotificationsContext/ServerNotificationsContext.d.ts +2 -0
  28. package/dist/components/ServerNotificationsContext/ServerNotificationsProvider.d.ts +3 -0
  29. package/dist/components/ServerNotificationsContext/index.d.ts +3 -0
  30. package/dist/components/ServerNotificationsContext/types.d.ts +12 -0
  31. package/dist/components/index.d.ts +5 -0
  32. package/dist/core/classification/findAttributeInExpression.d.ts +2 -0
  33. package/dist/core/classification/getActualExtrusionHeight.d.ts +2 -0
  34. package/dist/core/classification/index.d.ts +3 -0
  35. package/dist/core/classification/parseClientStyle.d.ts +2 -0
  36. package/dist/core/feature/convertSpToTurfFeature.d.ts +3 -0
  37. package/dist/core/feature/index.d.ts +1 -0
  38. package/dist/core/geometrySelection/drawModeToGeometrySelectionType.d.ts +3 -0
  39. package/dist/core/geometrySelection/getGeometrySelectionTurfFeature.d.ts +3 -0
  40. package/dist/core/geometrySelection/index.d.ts +2 -0
  41. package/dist/core/index.d.ts +4 -0
  42. package/dist/core/types/index.d.ts +2 -0
  43. package/dist/core/types/map.d.ts +5 -0
  44. package/dist/core/types/styling.d.ts +15 -0
  45. package/dist/hooks/index.d.ts +3 -0
  46. package/dist/hooks/map/index.d.ts +22 -0
  47. package/dist/hooks/map/useCurrentSelectedFeature.d.ts +2 -0
  48. package/dist/hooks/map/useEditingFeature.d.ts +1 -0
  49. package/dist/hooks/map/useEwktGeometry.d.ts +1 -0
  50. package/dist/hooks/map/useGeometryEditor.d.ts +2 -0
  51. package/dist/hooks/map/useGeometrySelection.d.ts +2 -0
  52. package/dist/hooks/map/useGeometrySelectionBuffer.d.ts +1 -0
  53. package/dist/hooks/map/useMapContext.d.ts +1 -0
  54. package/dist/hooks/map/useMapDraw/customModes.d.ts +2 -0
  55. package/dist/hooks/map/useMapDraw/customStyles.d.ts +58 -0
  56. package/dist/hooks/map/useMapDraw/index.d.ts +1 -0
  57. package/dist/hooks/map/useRedrawLayer.d.ts +1 -0
  58. package/dist/hooks/map/useSelectFeaturesCount.d.ts +1 -0
  59. package/dist/hooks/map/useSelectFeaturesCurrentIndex.d.ts +1 -0
  60. package/dist/hooks/map/useSelectFeaturesGeometryMasking.d.ts +1 -0
  61. package/dist/hooks/map/useSelectFeaturesInitialized.d.ts +1 -0
  62. package/dist/hooks/map/useSelectFeaturesLayerName.d.ts +1 -0
  63. package/dist/hooks/map/useSelectFeaturesPagination.d.ts +4 -0
  64. package/dist/hooks/map/useSelectFeaturesStatisticsActive.d.ts +1 -0
  65. package/dist/hooks/map/useSelectFeaturesTotalCounts.d.ts +1 -0
  66. package/dist/hooks/map/useSelectedFeatures.d.ts +2 -0
  67. package/dist/hooks/map/useUpdateCurrentFeature.d.ts +2 -0
  68. package/dist/hooks/map/useZoomToFeatures.d.ts +2 -0
  69. package/dist/hooks/map/useZoomToLayer.d.ts +7 -0
  70. package/dist/hooks/map/useZoomToPoint.d.ts +1 -0
  71. package/dist/hooks/serverNotifications/index.d.ts +2 -0
  72. package/dist/hooks/serverNotifications/useServerNotifications.d.ts +2 -0
  73. package/dist/hooks/serverNotifications/useServerNotificationsContext.d.ts +1 -0
  74. package/dist/hooks/useResizer.d.ts +28 -0
  75. package/dist/hooks/useToggle.d.ts +1 -1
  76. package/dist/jest.config.d.ts +11 -0
  77. package/dist/react.cjs.development.js +811 -5
  78. package/dist/react.cjs.development.js.map +1 -1
  79. package/dist/react.cjs.production.min.js +1 -1
  80. package/dist/react.cjs.production.min.js.map +1 -1
  81. package/dist/react.esm.js +781 -6
  82. package/dist/react.esm.js.map +1 -1
  83. package/dist/utils/date.d.ts +2 -2
  84. package/dist/utils/geometryToWkt.d.ts +2 -0
  85. package/dist/utils/index.d.ts +1 -0
  86. package/package.json +30 -23
@@ -1 +1 @@
1
- {"version":3,"file":"react.esm.js","sources":["../src/hooks/useToggle.ts","../src/utils/date.ts","../src/utils/isNumeric.ts","../src/utils/isObject.ts"],"sourcesContent":["import { useCallback, useState } from \"react\";\n\nexport const useToggle = (initial?: boolean): [boolean, VoidFunction, (value: boolean) => void] => {\n const [state, setState] = useState(initial !== undefined ? initial : false);\n\n const toggle = useCallback(() => setState(!state), [state]);\n\n return [state, toggle, setState];\n};\n","import { parseJSON, parseISO, isValid, format, toDate } from \"date-fns\";\n\nexport const NO_CONTENT_VALUE = \"—\";\n\nexport type DateType = number | Date;\nexport type RawDateType = string | DateType;\n\nexport enum DateFormat {\n ClientDefaultFormat = \"dd.MM.yyyy HH:mm\",\n DateTime = \"dd.MM.yyyy HH:mm:ss\",\n UTC = \"yyyy-MM-dd'T'HH:mm:ss.sssxxx\",\n AxisTooltip = \"d MMMM yyyy\",\n}\n\ninterface FormatDateOptions {\n dateFormat?: DateFormat;\n defaultValue?: RawDateType;\n}\n\nconst stringDateParsers: ((date: string) => DateType)[] = [parseJSON, parseISO, rawDate => new Date(rawDate)];\n\nexport const getDate = (rawDate?: RawDateType | null): Date | null => {\n if (!rawDate) return null;\n\n if (typeof rawDate === \"string\") {\n for (const parser of stringDateParsers) {\n const date = parser(rawDate);\n\n if (isValid(date)) {\n return toDate(date);\n }\n }\n\n return null;\n }\n\n const parsedDate = toDate(rawDate);\n\n return isValid(parsedDate) ? parsedDate : null;\n};\n\nexport const formatDate = (\n date?: RawDateType,\n { dateFormat = DateFormat.ClientDefaultFormat, defaultValue = NO_CONTENT_VALUE }: FormatDateOptions = {},\n): string => {\n const dateValue = date ? getDate(date) : null;\n\n if (isValid(dateValue)) {\n return format(dateValue as Date, dateFormat);\n }\n\n return defaultValue.toString();\n};\n","export const isNumeric = (number: string | number): boolean =>\n !isNaN(parseFloat(number as string)) && isFinite(number as number);\n","export function isObject<T>(value: T | object): value is object {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n"],"names":["useToggle","initial","state","setState","useState","undefined","toggle","useCallback","NO_CONTENT_VALUE","DateFormat","stringDateParsers","parseJSON","parseISO","rawDate","Date","getDate","parser","date","isValid","toDate","parsedDate","formatDate","dateFormat","ClientDefaultFormat","defaultValue","dateValue","format","toString","isNumeric","number","isNaN","parseFloat","isFinite","isObject","value","Array","isArray"],"mappings":";;;MAEaA,SAAS,GAAIC,OAAD;AACvB,QAAM,CAACC,KAAD,EAAQC,QAAR,IAAoBC,QAAQ,CA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R,IAAI,GAAGF,OAAO,CAACE,IAAD,CAAV,GAAmB,IAAzC;;AAEA,MAAIC,OAAO,CAACO,SAAD,CAAX,EAAwB;AACtB,WAAOC,MAAM,CAACD,SAAD,EAAoBH,UAApB,CAAb;AACD;;AAED,SAAOE,YAAY,CAACG,QAAb,EAAP;AACD,CAXM;;MCzCMC,SAAS,GAAIC,MAAD,IACvB,CAACC,KAAK,CAACC,UAAU,CAACF,MAAD,CAAX,CAAN,IAAwCG,QAAQ,CAACH,MAAD,CAD3C;;SCASI,SAAYC;AAC1B,SAAO,OAAOA,KAAP,KAAiB,QAAjB,IAA6BA,KAAK,KAAK,IAAvC,IAA+C,CAACC,KAAK,CAACC,OAAN,CAAcF,KAAd,CAAvD;AACD;;;;"}
1
+ {"version":3,"file":"react.esm.js","sources":["../src/core/classification/findAttributeInExpression.ts","../src/core/classification/getActualExtrusionHeight.ts","../src/core/classification/parseClientStyle.ts","../src/core/feature/convertSpToTurfFeature.ts","../src/hooks/map/useMapContext.ts","../src/hooks/map/useCurrentSelectedFeature.ts","../src/components/MapContext/MapContext.ts","../src/components/MapContext/types.ts","../src/hooks/map/useGeometryEditor.ts","../src/hooks/map/useEditingFeature.ts","../src/hooks/map/useGeometrySelection.ts","../src/utils/date.ts","../src/utils/geometryToWkt.ts","../src/utils/isNumeric.ts","../src/utils/isObject.ts","../src/hooks/map/useEwktGeometry.ts","../src/hooks/map/useGeometrySelectionBuffer.ts","../src/hooks/map/useMapDraw/customModes.ts","../src/hooks/map/useMapDraw/customStyles.ts","../src/hooks/map/useMapDraw/index.ts","../src/hooks/map/useRedrawLayer.ts","../src/hooks/map/useSelectedFeatures.ts","../src/hooks/map/useSelectFeaturesCount.ts","../src/hooks/map/useSelectFeaturesCurrentIndex.ts","../src/hooks/map/useSelectFeaturesGeometryMasking.ts","../src/hooks/map/useSelectFeaturesInitialized.ts","../src/hooks/map/useSelectFeaturesLayerName.ts","../src/hooks/map/useSelectFeaturesPagination.ts","../src/hooks/map/useSelectFeaturesStatisticsActive.ts","../src/hooks/map/useSelectFeaturesTotalCounts.ts","../src/hooks/map/useUpdateCurrentFeature.ts","../src/hooks/map/useZoomToFeatures.ts","../src/hooks/map/useZoomToLayer.ts","../src/hooks/map/useZoomToPoint.ts","../src/hooks/serverNotifications/useServerNotifications.ts","../src/components/ServerNotificationsContext/ServerNotificationsContext.ts","../src/hooks/serverNotifications/useServerNotificationsContext.ts","../src/hooks/useResizer.ts","../src/hooks/useToggle.ts","../src/core/geometrySelection/drawModeToGeometrySelectionType.ts","../src/core/geometrySelection/getGeometrySelectionTurfFeature.ts"],"sourcesContent":["import { ExpressionSpecification } from \"mapbox-gl\";\n\nexport const findAttributeInExpression = (expression: ExpressionSpecification): string[] => {\n if (Array.isArray(expression) && expression.length === 2 && expression[0] === \"get\") {\n return [expression[1]];\n }\n\n return expression.reduce((acc: string[], curr) => {\n if (!Array.isArray(curr)) {\n return acc;\n }\n\n if (curr[0] === \"get\") {\n return [...new Set([...acc, curr[1]])];\n }\n\n return [...new Set([...acc, ...findAttributeInExpression(curr as ExpressionSpecification)])];\n }, []);\n};\n","import { AnyPaint } from \"mapbox-gl\";\n\nexport const getActualExtrusionHeight = (paint: AnyPaint) => {\n return Array.isArray(paint?.[\"fill-extrusion-height\"]) && paint?.[\"fill-extrusion-height\"][0] === \"+\"\n ? paint?.[\"fill-extrusion-height\"][1]\n : paint?.[\"fill-extrusion-height\"];\n};\n","import { isEmpty } from \"lodash\";\nimport { ExpressionSpecification } from \"mapbox-gl\";\n\nimport { findAttributeInExpression } from \"./findAttributeInExpression\";\n\nimport { ClientStyle } from \"../types\";\n\nexport const parseClientStyle = (style?: ClientStyle): string[] => {\n if (!style) {\n return [];\n }\n\n return style?.items?.reduce((acc: string[], curr) => {\n if (!curr.paint || isEmpty(curr.paint)) {\n return acc;\n }\n\n return Object.entries(curr.paint)?.reduce((paintAcc: string[], [, value]) => {\n if (!Array.isArray(value)) {\n return paintAcc;\n }\n\n return [...new Set([...paintAcc, ...findAttributeInExpression(value as ExpressionSpecification)])];\n }, []);\n }, []);\n};\n","import { GeometryType } from \"@evergis/api\";\nimport { multiLineString, multiPoint, point, polygon } from \"@turf/turf\";\nimport { Feature } from \"geojson\";\n\nimport { FeaturedDcExtendedGeometry } from \"../../components\";\n\nexport const convertSpToTurfFeature = (geometry?: FeaturedDcExtendedGeometry): Feature<any> | undefined => {\n if (!geometry) {\n return;\n }\n\n switch (geometry.type) {\n case GeometryType.Point:\n return point(geometry.coordinates);\n case GeometryType.Multipoint:\n return multiPoint(geometry.coordinates);\n case GeometryType.Polyline:\n return multiLineString(geometry.coordinates);\n case GeometryType.Polygon:\n case GeometryType.Envelope:\n return polygon(geometry.coordinates);\n default:\n }\n};\n","import { useContext } from \"react\";\n\nimport { MapContext } from \"../../components\";\n\nexport const useMapContext = () => {\n return useContext(MapContext);\n};\n","import { useMemo } from \"react\";\n\nimport { useMapContext } from \"./useMapContext\";\n\nimport { SelectedFeature } from \"../../components/MapContext\";\n\nexport const useCurrentSelectedFeature = (): SelectedFeature => {\n const { selectFeatures } = useMapContext();\n\n return useMemo(() => {\n return selectFeatures.features?.[selectFeatures.layerName]?.find(item => item.id === selectFeatures.currentId);\n }, [selectFeatures]);\n};\n","import { createContext } from \"react\";\n\nimport { MapContextProps } from \"./types\";\n\nexport const MapContext = createContext<MapContextProps>({});\n","import { Dispatch, MutableRefObject, PropsWithChildren, SetStateAction } from \"react\";\nimport { Map as MapboxGLMap } from \"mapbox-gl\";\nimport MapboxDraw from \"@mapbox/mapbox-gl-draw\";\nimport { FeatureDc, LayerDefinitionDc, GeometryType } from \"@evergis/api\";\nimport { Feature } from \"geojson\";\n\nexport enum BaseMapTheme {\n Light = \"light\",\n Dark = \"dark\",\n}\n\nexport interface BaseMapItem {\n name: string;\n source: string;\n preview?: string;\n imgSrc?: string;\n title: string;\n theme?: BaseMapTheme;\n opacity?: number;\n color?: string;\n}\n\nexport enum GeometrySelectionTypes {\n Point = \"select_point\",\n Line = \"select_line\",\n Circle = \"select_circle\",\n Rect = \"select_rect\",\n Polygon = \"select_polygon\",\n Zones = \"zones_selection\",\n Coordinates = \"xy\",\n Route = \"selection_route\",\n}\n\nexport enum GeometrySelectionToolTypes {\n Replace = \"Replace\",\n Unite = \"Unite\",\n Crop = \"Crop\",\n Edit = \"Edit\",\n}\n\nexport type SelectionHistoryFeature = Feature;\n\nexport interface SelectionHistory {\n features: Array<SelectionHistoryFeature[]>;\n zones?: Array<Array<Feature[]>>;\n step: number;\n}\n\nexport enum GeometrySelectionZoneTypes {\n Walking = \"Walking\",\n Car = \"Car\",\n}\n\nexport enum GeometrySelectionRouteTypes {\n Walking = \"Walking\",\n Car = \"Car\",\n}\n\nexport interface GeometrySelectionSettings {\n zoneDuration?: number;\n zoneType?: GeometrySelectionZoneTypes;\n routeType?: GeometrySelectionRouteTypes;\n bufferRadius?: string;\n bufferMultiplier?: string;\n bufferInclude?: boolean;\n selectOutside?: boolean;\n}\n\nexport interface GeometrySelection {\n active?: boolean;\n loading?: boolean;\n type?: GeometrySelectionTypes;\n currentTool?: GeometrySelectionToolTypes;\n history?: SelectionHistory;\n editHistory?: SelectionHistory;\n isBuffer?: boolean;\n settings?: GeometrySelectionSettings;\n}\n\nexport enum GeometryEditorMode {\n Create,\n Edit,\n Transform,\n Expand,\n Unite,\n Subtract,\n}\n\nexport type Coordinates = [number, number];\n\nexport type Positions = Coordinates | Coordinates[] | Coordinates[][];\n\nexport interface GeometryEditor {\n active: boolean;\n geometryType?: GeometryType;\n layerName?: string;\n geometry?: Positions;\n mode?: GeometryEditorMode;\n}\n\nexport interface FeaturedDcExtendedGeometry extends Omit<FeatureDc[\"geometry\"], \"coordinates\"> {\n coordinates?: any;\n}\n\nexport interface FeatureDcExtended extends Omit<FeatureDc, \"geometry\"> {\n geometry: FeaturedDcExtendedGeometry;\n layer: string;\n}\n\nexport interface SelectedFeature extends FeatureDcExtended {\n layerDefinition: LayerDefinitionDc;\n}\n\nexport interface SelectFeatures {\n initialized?: boolean;\n layerName?: string;\n currentId: string | null;\n selectionOffset?: number;\n features: Record<string, SelectedFeature[]>;\n totalCounts: Record<string, number>;\n statisticsActive?: boolean;\n geometryMasking?: boolean;\n}\n\nexport interface MapContextProps {\n map?: MutableRefObject<MapboxGLMap>;\n draw?: MutableRefObject<Omit<MapboxDraw, \"getDefaultPosition\">>;\n loaded?: boolean;\n setLoaded?: Dispatch<SetStateAction<boolean>>;\n basemapItems?: BaseMapItem[];\n basemapName?: string;\n setBasemapName?: Dispatch<SetStateAction<string>>;\n defaultBasemap?: string;\n globeProjection?: boolean;\n setGlobeProjection?: Dispatch<SetStateAction<boolean>>;\n geometrySelection?: GeometrySelection;\n setGeometrySelection?: Dispatch<SetStateAction<GeometrySelection>>;\n resetGeometrySelection?: VoidFunction;\n geometryEditor?: GeometryEditor;\n setGeometryEditor?: Dispatch<SetStateAction<GeometryEditor>>;\n resetGeometryEditor?: VoidFunction;\n selectFeatures?: SelectFeatures;\n setNextFeature?: VoidFunction;\n setPrevFeature?: VoidFunction;\n setSelectedFeatures?: (payload?: SelectFeatures[\"features\"], currentId?: any, offset?: number) => void;\n setSelectedFeaturesTotalCounts?: Dispatch<SetStateAction<SelectFeatures[\"totalCounts\"]>>;\n setSelectFeaturesInitialized?: Dispatch<SetStateAction<boolean>>;\n setSelectFeaturesLayerName?: Dispatch<SetStateAction<string>>;\n setSelectFeaturesStatisticsActive?: Dispatch<SetStateAction<boolean>>;\n setSelectFeaturesGeometryMasking?: Dispatch<SetStateAction<boolean>>;\n updateCurrentFeature?: Dispatch<SetStateAction<Partial<SelectedFeature>>>;\n resetSelectedFeatures?: VoidFunction;\n}\n\nexport interface MapProviderProps extends PropsWithChildren {\n basemapItems: BaseMapItem[];\n defaultBasemap: string;\n}\n","import { useCallback } from \"react\";\n\nimport { useMapContext } from \"./useMapContext\";\n\nimport { GeometryEditor } from \"../../components\";\n\nexport const useGeometryEditor = (): [GeometryEditor, (state: Partial<GeometryEditor>) => void] => {\n const { geometryEditor, setGeometryEditor } = useMapContext();\n\n const update = useCallback(\n (newState: Partial<GeometryEditor>) => {\n setGeometryEditor(prevState => ({\n ...prevState,\n ...newState,\n }));\n },\n [setGeometryEditor],\n );\n\n return [geometryEditor, update];\n};\n","import { useMemo } from \"react\";\n\nimport { GeometryEditorMode } from \"../../components/MapContext\";\n\nimport { useGeometryEditor } from \"./useGeometryEditor\";\nimport { useCurrentSelectedFeature } from \"./useCurrentSelectedFeature\";\n\nexport const useEditingFeature = (): boolean => {\n const [{ layerName, active, mode }] = useGeometryEditor();\n const currentSelectedFeature = useCurrentSelectedFeature();\n\n return useMemo(() => {\n return (\n active &&\n ((mode === GeometryEditorMode.Edit && layerName === currentSelectedFeature?.layer) ||\n mode === GeometryEditorMode.Create)\n );\n }, [active, currentSelectedFeature, layerName, mode]);\n};\n","import { useCallback } from \"react\";\n\nimport { useMapContext } from \"./useMapContext\";\n\nimport { GeometrySelection } from \"../../components\";\n\nexport const useGeometrySelection = (): [GeometrySelection, (state: Partial<GeometrySelection>) => void] => {\n const { geometrySelection, setGeometrySelection } = useMapContext();\n\n const updateGeometrySelection = useCallback(\n (newState: Partial<GeometrySelection>) => {\n setGeometrySelection(prevState => ({\n ...prevState,\n ...newState,\n }));\n },\n [setGeometrySelection],\n );\n\n return [geometrySelection, updateGeometrySelection];\n};\n","import { parseJSON, parseISO, isValid, format, toDate } from \"date-fns\";\n\nexport const NO_CONTENT_VALUE = \"—\";\n\nexport type DateType = number | Date;\nexport type RawDateType = string | DateType;\n\nexport enum DateFormat {\n ClientDefaultFormat = \"dd.MM.yyyy HH:mm\",\n DateTime = \"dd.MM.yyyy HH:mm:ss\",\n UTC = \"yyyy-MM-dd'T'HH:mm:ss.sssxxx\",\n AxisTooltip = \"d MMMM yyyy\",\n}\n\ninterface FormatDateOptions {\n dateFormat?: DateFormat;\n defaultValue?: RawDateType;\n}\n\nconst stringDateParsers: ((date: string) => DateType)[] = [parseJSON, parseISO, rawDate => new Date(rawDate)];\n\nexport const getDate = (rawDate?: RawDateType | null): Date | null => {\n if (!rawDate) return null;\n\n if (typeof rawDate === \"string\") {\n for (const parser of stringDateParsers) {\n const date = parser(rawDate);\n\n if (isValid(date)) {\n return toDate(date);\n }\n }\n\n return null;\n }\n\n const parsedDate = toDate(rawDate);\n\n return isValid(parsedDate) ? parsedDate : null;\n};\n\nexport const formatDate = (\n date?: RawDateType,\n { dateFormat = DateFormat.ClientDefaultFormat, defaultValue = NO_CONTENT_VALUE }: FormatDateOptions = {},\n): string => {\n const dateValue = date ? getDate(date) : null;\n\n if (isValid(dateValue)) {\n return format(dateValue as Date, dateFormat);\n }\n\n return defaultValue.toString();\n};\n","import { stringify } from \"wkt\";\n\nimport { SelectionHistoryFeature } from \"../components\";\n\nexport const geometryToWkt = (features: SelectionHistoryFeature[] = []): string => {\n if (features.length === 0) {\n return \"\";\n }\n\n return stringify(features[0]);\n};\n","export const isNumeric = (number: string | number): boolean =>\n !isNaN(parseFloat(number as string)) && isFinite(number as number);\n","export function isObject<T>(value: T | object): value is object {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n","import { useMemo } from \"react\";\nimport { isEmpty } from \"lodash\";\n\nimport { useGeometrySelection } from \"./useGeometrySelection\";\nimport { geometryToWkt } from \"../../utils\";\n\nimport { GeometrySelectionTypes } from \"../../components\";\n\nexport const useEwktGeometry = () => {\n const [{ history, type }] = useGeometrySelection();\n\n return useMemo(() => {\n if (history.step === -1) {\n return \"\";\n }\n\n return type === GeometrySelectionTypes.Zones\n ? !isEmpty(history.zones[history.step]?.[0])\n ? `SRID=3857;${geometryToWkt(history.zones[history.step]?.[0])}`\n : `SRID=3857;${geometryToWkt(history.features[history.step])}`\n : `SRID=3857;${geometryToWkt(history.features[history.step])}`;\n }, [history.features, history.step, history.zones, type]);\n};\n","import { useMemo } from \"react\";\n\nimport { useGeometrySelection } from \"./useGeometrySelection\";\n\nexport const useGeometrySelectionBuffer = (): string | undefined => {\n const [\n {\n settings: { bufferRadius, bufferMultiplier },\n isBuffer,\n },\n ] = useGeometrySelection();\n\n return useMemo((): string | undefined => {\n if (!isBuffer || !bufferRadius) {\n return undefined;\n }\n\n return Number((+bufferRadius || 0) * +bufferMultiplier).toFixed(2);\n }, [isBuffer, bufferRadius, bufferMultiplier]);\n};\n","import MapboxDraw, { DrawCustomMode } from \"@mapbox/mapbox-gl-draw\";\n\nimport { ExtendedMapboxDrawModes } from \"../../../core\";\n\nexport const customModes = MapboxDraw.modes as ExtendedMapboxDrawModes;\n\nconst StaticMode = {} as DrawCustomMode;\n\nStaticMode.onSetup = function () {\n this.setActionableState(undefined);\n\n return {};\n};\n\nStaticMode.toDisplayFeatures = function (state, geojson, display) {\n display(geojson);\n};\n\ncustomModes.static = StaticMode;\n","export const customStyles = [\n {\n id: \"gl-draw-point\",\n type: \"circle\",\n filter: [\"all\", [\"==\", \"$type\", \"Point\"]],\n paint: {\n \"circle-radius\": 5,\n \"circle-color\": \"#D20C0C\",\n \"circle-stroke-color\": \"#FFFFFF\",\n \"circle-stroke-width\": 3,\n \"circle-stroke-opacity\": 0.3,\n },\n },\n {\n id: \"highlight-inactive-points\",\n type: \"circle\",\n filter: [\"all\", [\"==\", \"$type\", \"Point\"], [\"==\", \"meta\", \"feature\"], [\"==\", \"active\", \"false\"]],\n paint: {\n \"circle-radius\": 5,\n \"circle-color\": \"#D20C0C\",\n \"circle-stroke-color\": \"#FFFFFF\",\n \"circle-stroke-width\": 3,\n \"circle-stroke-opacity\": 0.3,\n },\n },\n {\n id: \"highlight-active-points\",\n type: \"circle\",\n filter: [\"all\", [\"==\", \"$type\", \"Point\"], [\"==\", \"meta\", \"feature\"], [\"==\", \"active\", \"true\"]],\n paint: {\n \"circle-radius\": 3,\n \"circle-color\": \"#fbb03b\",\n \"circle-stroke-color\": \"#FFFFFF\",\n \"circle-stroke-width\": 1,\n \"circle-stroke-opacity\": 0.3,\n },\n },\n {\n id: \"gl-draw-polygon-fill-static\",\n type: \"fill\",\n filter: [\"all\", [\"==\", \"$type\", \"Polygon\"]],\n paint: {\n \"fill-color\": \"#D20C0C\",\n \"fill-outline-color\": \"#D20C0C\",\n \"fill-opacity\": 0.1,\n },\n },\n {\n id: \"gl-draw-line\",\n type: \"line\",\n filter: [\"all\", [\"==\", \"$type\", \"LineString\"]],\n layout: {\n \"line-cap\": \"round\",\n \"line-join\": \"round\",\n },\n paint: {\n \"line-color\": \"#D20C0C\",\n \"line-dasharray\": [0.2, 2],\n \"line-width\": 2,\n },\n },\n {\n id: \"gl-draw-polygon-fill\",\n type: \"fill\",\n filter: [\"all\", [\"==\", \"$type\", \"Polygon\"]],\n paint: {\n \"fill-color\": \"#D20C0C\",\n \"fill-outline-color\": \"#D20C0C\",\n \"fill-opacity\": 0.1,\n },\n },\n {\n id: \"gl-draw-polygon-midpoint\",\n type: \"circle\",\n filter: [\"all\", [\"==\", \"$type\", \"Point\"], [\"==\", \"meta\", \"midpoint\"]],\n paint: {\n \"circle-radius\": 3,\n \"circle-color\": \"#fbb03b\",\n \"circle-stroke-color\": \"#FFFFFF\",\n \"circle-stroke-width\": 1,\n \"circle-stroke-opacity\": 0.3,\n },\n },\n {\n id: \"gl-draw-polygon-stroke-active\",\n type: \"line\",\n filter: [\"all\", [\"==\", \"$type\", \"Polygon\"]],\n layout: {\n \"line-cap\": \"round\",\n \"line-join\": \"round\",\n },\n paint: {\n \"line-color\": \"#D20C0C\",\n \"line-dasharray\": [0.2, 2],\n \"line-width\": 2,\n },\n },\n {\n id: \"gl-draw-polygon-and-line-vertex-active\",\n type: \"circle\",\n filter: [\"all\", [\"==\", \"meta\", \"vertex\"], [\"==\", \"$type\", \"Point\"]],\n paint: {\n \"circle-radius\": 3,\n \"circle-color\": \"#D20C0C\",\n \"circle-stroke-color\": \"#FFFFFF\",\n \"circle-stroke-width\": 3,\n \"circle-stroke-opacity\": 0.3,\n },\n },\n];\n","import { useEffect } from \"react\";\nimport MapboxDraw from \"@mapbox/mapbox-gl-draw\";\n\nimport { customModes } from \"./customModes\";\nimport { customStyles } from \"./customStyles\";\n\nimport { useMapContext } from \"../useMapContext\";\n\nconst draw = new MapboxDraw({\n displayControlsDefault: false,\n styles: customStyles,\n modes: customModes,\n defaultMode: \"draw_point\",\n controls: {\n trash: true,\n },\n});\n\nexport const useMapDraw = (triggerDeps: Array<unknown> = []) => {\n const { map, draw: drawContext, loaded, basemapName } = useMapContext();\n\n useEffect(() => {\n if (!loaded || !map.current) {\n return;\n }\n\n drawContext.current = draw;\n map.current.addControl(drawContext.current);\n }, [loaded]); // eslint-disable-line\n\n useEffect(() => {\n if (map.current && map.current.hasControl(drawContext.current)) {\n map.current.removeControl(drawContext.current);\n map.current.addControl(drawContext.current);\n }\n }, [basemapName, ...triggerDeps]); // eslint-disable-line\n};\n","import { useCallback } from \"react\";\nimport { VectorSourceImpl } from \"mapbox-gl\";\n\nimport { useMapContext } from \"./useMapContext\";\n\nexport const useRedrawLayer = () => {\n const { map } = useMapContext();\n\n return useCallback(\n (layerName: string) => {\n const layerTileSource: VectorSourceImpl = map.current.getSource(layerName);\n\n layerTileSource.setTiles(layerTileSource.tiles);\n },\n [map],\n );\n};\n","import { useCallback } from \"react\";\n\nimport { useMapContext } from \"./useMapContext\";\n\nimport { SelectedFeature } from \"../../components\";\n\nexport const useSelectedFeatures = (): [\n Record<string, SelectedFeature[]>,\n (features: Record<string, SelectedFeature[]>) => void,\n] => {\n const { selectFeatures, setSelectedFeatures } = useMapContext();\n\n const updatSelectedFeatures = useCallback(\n (features: Record<string, SelectedFeature[]>) => {\n setSelectedFeatures(features);\n },\n [setSelectedFeatures],\n );\n\n return [selectFeatures.features ?? ({} as Record<string, SelectedFeature[]>), updatSelectedFeatures];\n};\n","import { useMemo } from \"react\";\n\nimport { useMapContext } from \"./useMapContext\";\n\nexport const useSelectFeaturesCount = (): number => {\n const { selectFeatures } = useMapContext();\n\n return useMemo(() => {\n return selectFeatures.features?.[selectFeatures.layerName]?.length ?? 0;\n }, [selectFeatures]);\n};\n","import { useMemo } from \"react\";\n\nimport { useMapContext } from \"./useMapContext\";\n\nexport const useSelectFeaturesCurrentIndex = (): number => {\n const { selectFeatures } = useMapContext();\n\n return useMemo(() => {\n return selectFeatures.features?.[selectFeatures.layerName]?.length\n ? selectFeatures.features?.[selectFeatures.layerName]?.findIndex(\n feature => feature.id === selectFeatures.currentId,\n )\n : -1;\n }, [selectFeatures]);\n};\n","import { useCallback } from \"react\";\n\nimport { useMapContext } from \"./useMapContext\";\n\nexport const useSelectFeaturesGeometryMasking = (): [boolean, (state: boolean) => void] => {\n const { selectFeatures, setSelectFeaturesGeometryMasking } = useMapContext();\n\n const update = useCallback(\n (state: boolean) => {\n setSelectFeaturesGeometryMasking(state);\n },\n [setSelectFeaturesGeometryMasking],\n );\n\n return [selectFeatures.geometryMasking, update];\n};\n","import { useCallback } from \"react\";\n\nimport { useMapContext } from \"./useMapContext\";\n\nexport const useSelectFeaturesInitialized = (): [boolean, (value: boolean) => void] => {\n const { selectFeatures, setSelectFeaturesInitialized } = useMapContext();\n\n const update = useCallback(\n (state: boolean) => {\n setSelectFeaturesInitialized(state);\n },\n [setSelectFeaturesInitialized],\n );\n\n return [selectFeatures.initialized, update];\n};\n","import { useCallback } from \"react\";\n\nimport { useMapContext } from \"./useMapContext\";\n\nexport const useSelectFeaturesLayerName = (): [string, (name?: string) => void] => {\n const { selectFeatures, setSelectFeaturesLayerName } = useMapContext();\n\n const update = useCallback(\n (name: string) => {\n setSelectFeaturesLayerName(name);\n },\n [setSelectFeaturesLayerName],\n );\n\n return [selectFeatures.layerName, update];\n};\n","import { useCallback } from \"react\";\n\nimport { useMapContext } from \"./useMapContext\";\n\nexport const useSelectFeaturesPagination = () => {\n const { setNextFeature, setPrevFeature } = useMapContext();\n\n const onNext = useCallback(() => {\n setNextFeature();\n }, [setNextFeature]);\n\n const onPrev = useCallback(() => {\n setPrevFeature();\n }, [setPrevFeature]);\n\n return { onNext, onPrev } as const;\n};\n","import { useCallback } from \"react\";\n\nimport { useMapContext } from \"./useMapContext\";\n\nexport const useSelectFeaturesStatisticsActive = (): [boolean, (state: boolean) => void] => {\n const { selectFeatures, setSelectFeaturesStatisticsActive } = useMapContext();\n\n const update = useCallback(\n (state: boolean) => {\n setSelectFeaturesStatisticsActive(state);\n },\n [setSelectFeaturesStatisticsActive],\n );\n\n return [selectFeatures.statisticsActive, update];\n};\n","import { useCallback } from \"react\";\n\nimport { useMapContext } from \"./useMapContext\";\n\nexport const useSelectFeaturesTotalCounts = (): [\n Record<string, number>,\n (totalCounts: Record<string, number>) => void,\n] => {\n const { selectFeatures, setSelectedFeaturesTotalCounts } = useMapContext();\n\n const update = useCallback(\n (totalCounts: Record<string, number>) => {\n setSelectedFeaturesTotalCounts(totalCounts);\n },\n [setSelectedFeaturesTotalCounts],\n );\n\n return [selectFeatures.totalCounts ?? {}, update];\n};\n","import { useCallback } from \"react\";\n\nimport { useMapContext } from \"./useMapContext\";\n\nimport { SelectedFeature } from \"../../components\";\n\nexport const useUpdateCurrentFeature = () => {\n const { updateCurrentFeature } = useMapContext();\n\n return useCallback(\n (values: Partial<SelectedFeature>) => {\n updateCurrentFeature(values);\n },\n [updateCurrentFeature],\n );\n};\n","import { useCallback } from \"react\";\nimport { bbox } from \"@turf/turf\";\n\nimport { useMapContext } from \"./useMapContext\";\nimport { convertSpToTurfFeature } from \"../../core\";\n\nimport { FeatureDcExtended } from \"../../components\";\n\nexport const useZoomToFeatures = () => {\n const { map } = useMapContext();\n\n return useCallback(\n (features?: FeatureDcExtended[], padding?: number) => {\n if (!features) {\n return;\n }\n\n const currentFeatureCenter = bbox({\n type: \"FeatureCollection\",\n features: features.map(feature => convertSpToTurfFeature(feature.geometry)),\n });\n\n map.current.fitBounds(currentFeatureCenter as [number, number, number, number], { padding: padding ?? 150 });\n },\n [map],\n );\n};\n","import { useCallback } from \"react\";\nimport { BulkExtentsDc } from \"@evergis/api\";\n\nimport { useMapContext } from \"./useMapContext\";\n\nconst DEFAULT_PADDING = 50;\n\ninterface ZoomToLayerOptions {\n discardFilters?: boolean;\n padding?: number;\n}\n\nexport const useZoomToLayer = () => {\n const { map } = useMapContext();\n\n return useCallback(\n async (bulkExtent: BulkExtentsDc, options?: ZoomToLayerOptions) => {\n if (!bulkExtent || !bulkExtent.overall) {\n return;\n }\n\n map.current.fitBounds(\n [...bulkExtent.overall.coordinates[0], ...bulkExtent.overall.coordinates[1]] as [\n number,\n number,\n number,\n number,\n ],\n { padding: options?.padding ?? DEFAULT_PADDING },\n );\n },\n [map],\n );\n};\n","import { useCallback } from \"react\";\n\nimport { useMapContext } from \"./useMapContext\";\n\nexport const useZoomToPoint = () => {\n const { map } = useMapContext();\n\n return useCallback(\n (options, callback?: VoidFunction) => {\n if (map.current) {\n if (callback) {\n map.current.once(\"moveend\", () => {\n callback();\n });\n }\n\n map.current.flyTo(options);\n } else {\n callback?.();\n }\n },\n [map],\n );\n};\n","import { useEffect, useRef, useState } from \"react\";\nimport { HubConnection, HubConnectionBuilder, LogLevel } from \"@microsoft/signalr\";\n\nexport const useServerNotifications = (url: string, initialized: boolean): HubConnection | null => {\n const hubConnection = useRef<HubConnection | null>(null);\n const [connection, setConnection] = useState<HubConnection | null>(null);\n\n useEffect(() => {\n if (!initialized) {\n return;\n }\n\n hubConnection.current = new HubConnectionBuilder()\n .withUrl(url, {\n withCredentials: true,\n })\n .configureLogging(LogLevel.Information)\n .build();\n\n hubConnection.current\n .start()\n .then(() => console.info(\"Серверные нотификации подключены\"))\n .catch(err => console.info(\"Ошибка:\", err))\n .finally(() => setConnection(hubConnection.current));\n }, [initialized]); // eslint-disable-line\n\n useEffect(() => {\n if (!connection || connection.state !== \"Connected\") {\n return;\n }\n\n connection\n .invoke(\"SubscribeNotifications\", [])\n .then(() => console.info(\"Подписка `SubscribeNotifications` оформлена\"))\n .catch(err => console.info(\"Ошибка подписки `SubscribeNotifications`:\", err));\n }, [connection]);\n\n return connection;\n};\n","import { createContext } from \"react\";\n\nimport { ServerNotificationsContextProps } from \"./types\";\n\nexport const ServerNotificationsContext = createContext<ServerNotificationsContextProps>({});\n","import { useContext } from \"react\";\n\nimport { ServerNotificationsContext } from \"../../components/ServerNotificationsContext/ServerNotificationsContext\";\n\nexport const useServerNotificationsContext = () => {\n return useContext(ServerNotificationsContext);\n};\n","import { useCallback, useLayoutEffect, useRef } from \"react\";\nimport { isNil } from \"lodash\";\n\nexport enum VerticalPosition {\n Top = \"top\",\n Bottom = \"bottom\",\n}\n\nexport enum HorizontalPosition {\n Left = \"left\",\n Right = \"right\",\n}\n\nexport interface ResizerOptions {\n handleVerticalPosition?: VerticalPosition;\n handleHorizontalPosition?: HorizontalPosition;\n minWidth?: number;\n maxWidth?: number;\n minHeight?: number;\n maxHeight?: number;\n horizontal?: boolean;\n vertical?: boolean;\n useResize?: boolean;\n onResize?: (width: number, height: number) => void;\n onResizeEnd?: (width: number, height: number) => void;\n onResizeStart?: (width: number, height: number) => void;\n}\n\nexport const useResizer = ({\n handleVerticalPosition,\n handleHorizontalPosition,\n minWidth = Number.MIN_SAFE_INTEGER,\n maxWidth = Number.MAX_SAFE_INTEGER,\n horizontal = true,\n minHeight = Number.MIN_SAFE_INTEGER,\n maxHeight = Number.MAX_SAFE_INTEGER,\n vertical = true,\n useResize = false,\n onResize,\n onResizeEnd,\n onResizeStart,\n}: ResizerOptions) => {\n const containerRef = useRef<HTMLDivElement>();\n const verticalHandleRef = useRef<HTMLDivElement>();\n const horizontalHandleRef = useRef<HTMLDivElement>();\n\n const updateSizes = useCallback(\n (width: number, height: number) => {\n let newWidth = width;\n let newHeight = height;\n\n if (horizontal && newWidth < minWidth) {\n newWidth = minWidth;\n }\n\n if (horizontal && newWidth > Math.min(window.innerWidth - horizontalHandleRef.current?.clientWidth, maxWidth)) {\n newWidth = maxWidth;\n }\n\n if (vertical && newHeight < minHeight) {\n newHeight = minHeight;\n }\n\n if (vertical && newHeight > Math.min(window.innerHeight - verticalHandleRef.current?.clientHeight, maxHeight)) {\n newHeight = maxHeight;\n }\n\n if (horizontal) {\n requestAnimationFrame(() => {\n if (!isNil(containerRef.current)) {\n containerRef.current.style.width = `${newWidth}px`;\n }\n });\n }\n\n if (vertical) {\n requestAnimationFrame(() => {\n if (!isNil(containerRef.current)) {\n containerRef.current.style.height = `${newHeight}px`;\n }\n });\n }\n\n onResize?.(newWidth, newHeight);\n },\n [minWidth, maxWidth, minHeight, maxHeight, horizontal, vertical], // eslint-disable-line\n );\n\n const onPointerMove = useCallback(\n (pointerMoveEvent: PointerEvent) => {\n const { x, y } = containerRef.current?.getBoundingClientRect();\n const reverseHorizontal = handleHorizontalPosition === HorizontalPosition.Right;\n const reverseVertical = handleVerticalPosition === VerticalPosition.Bottom;\n\n const newWidth = reverseHorizontal\n ? pointerMoveEvent.pageX - x\n : containerRef.current?.offsetWidth + x - pointerMoveEvent.pageX;\n const newHeight = reverseVertical\n ? pointerMoveEvent.pageY - y\n : containerRef.current?.offsetHeight + y - pointerMoveEvent.pageY;\n\n document.body.style.userSelect = \"none\";\n\n updateSizes(newWidth, newHeight);\n },\n [updateSizes],\n );\n\n const onPointerDown = useCallback(() => {\n const onPointerUp = () => {\n document.body.style.userSelect = \"initial\";\n document.body.removeEventListener(\"pointermove\", onPointerMove);\n\n if (!isNil(containerRef.current)) {\n onResizeEnd?.(containerRef.current.offsetWidth, containerRef.current.offsetHeight);\n }\n };\n\n if (!isNil(containerRef.current)) {\n onResizeStart?.(containerRef.current.offsetWidth, containerRef.current.offsetHeight);\n }\n\n document.body.addEventListener(\"pointermove\", onPointerMove);\n document.body.addEventListener(\"pointerup\", onPointerUp, { once: true });\n }, [onPointerMove]); // eslint-disable-line\n\n useLayoutEffect(() => {\n if (useResize && !isNil(containerRef.current)) {\n updateSizes(containerRef.current.offsetWidth, containerRef.current.offsetHeight);\n }\n }, [updateSizes, useResize]);\n\n return {\n containerRef,\n verticalHandleRef,\n horizontalHandleRef,\n onPointerDown,\n };\n};\n","import { useCallback, useState } from \"react\";\n\nexport const useToggle = (initial?: boolean): [boolean, VoidFunction, (value: boolean) => void] => {\n const [state, setState] = useState(initial !== undefined ? initial : false);\n\n const toggle = useCallback(() => setState(!state), [state]);\n\n return [state, toggle, setState];\n};\n","import { DrawMode } from \"@mapbox/mapbox-gl-draw\";\n\nimport { GeometrySelectionTypes } from \"../../components\";\n\nexport const drawModeToGeometrySelectionType = (mode: DrawMode | string): GeometrySelectionTypes => {\n switch (mode) {\n case \"draw_point\":\n return GeometrySelectionTypes.Point;\n case \"draw_polygon\":\n return GeometrySelectionTypes.Polygon;\n case \"draw_line_string\":\n return GeometrySelectionTypes.Line;\n default:\n return GeometrySelectionTypes.Point;\n }\n};\n","import { toMercator, toWgs84, point, polygon, lineString } from \"@turf/turf\";\nimport { Feature, LineString, Point, Polygon, Position } from \"geojson\";\n\nimport { GeometrySelectionTypes } from \"../../components\";\n\nexport const getGeometrySelectionTurfFeature = (\n coordinates: Position | Position[] | Position[][] | Position[][][],\n selectionType: GeometrySelectionTypes,\n toWgs?: boolean,\n): Feature<Point | LineString | Polygon> => {\n if (toWgs) {\n switch (selectionType) {\n case GeometrySelectionTypes.Point:\n return toWgs84(point(coordinates as Position));\n case GeometrySelectionTypes.Polygon:\n return toWgs84(polygon(coordinates as Position[][]));\n case GeometrySelectionTypes.Line:\n return toWgs84(lineString(coordinates as Position[]));\n default:\n }\n }\n\n switch (selectionType) {\n case GeometrySelectionTypes.Point:\n return toMercator(point(coordinates as Position));\n case GeometrySelectionTypes.Polygon:\n return toMercator(polygon(coordinates as Position[][]));\n case GeometrySelectionTypes.Line:\n return toMercator(lineString(coordinates as Position[]));\n default:\n }\n};\n"],"names":["findAttributeInExpression","expression","Array","isArray","length","reduce","acc","curr","Set","getActualExtrusionHeight","paint","parseClientStyle","style","items","isEmpty","Object","entries","paintAcc","value","convertSpToTurfFeature","geometry","type","GeometryType","Point","point","coordinates","Multipoint","multiPoint","Polyline","multiLineString","Polygon","Envelope","polygon","useMapContext","useContext","MapContext","useCurrentSelectedFeature","selectFeatures","useMemo","features","layerName","find","item","id","currentId","createContext","BaseMapTheme","GeometrySelectionTypes","GeometrySelectionToolTypes","GeometrySelectionZoneTypes","GeometrySelectionRouteTypes","GeometryEditorMode","useGeometryEditor","geometryEditor","setGeometryEditor","update","useCallback","newState","prevState","useEditingFeature","active","mode","currentSelectedFeature","Edit","layer","Create","useGeometrySelection","geometrySelection","setGeometrySelection","updateGeometrySelection","NO_CONTENT_VALUE","DateFormat","stringDateParsers","parseJSON","parseISO","rawDate","Date","getDate","parser","date","isValid","toDate","parsedDate","formatDate","dateFormat","ClientDefaultFormat","defaultValue","dateValue","format","toString","geometryToWkt","stringify","isNumeric","number","isNaN","parseFloat","isFinite","isObject","useEwktGeometry","history","step","Zones","zones","useGeometrySelectionBuffer","settings","bufferRadius","bufferMultiplier","isBuffer","undefined","Number","toFixed","customModes","MapboxDraw","modes","StaticMode","onSetup","setActionableState","toDisplayFeatures","state","geojson","display","static","customStyles","filter","layout","draw","displayControlsDefault","styles","defaultMode","controls","trash","useMapDraw","triggerDeps","map","drawContext","loaded","basemapName","useEffect","current","addControl","hasControl","removeControl","useRedrawLayer","layerTileSource","getSource","setTiles","tiles","useSelectedFeatures","setSelectedFeatures","updatSelectedFeatures","useSelectFeaturesCount","useSelectFeaturesCurrentIndex","findIndex","feature","useSelectFeaturesGeometryMasking","setSelectFeaturesGeometryMasking","geometryMasking","useSelectFeaturesInitialized","setSelectFeaturesInitialized","initialized","useSelectFeaturesLayerName","setSelectFeaturesLayerName","name","useSelectFeaturesPagination","setNextFeature","setPrevFeature","onNext","onPrev","useSelectFeaturesStatisticsActive","setSelectFeaturesStatisticsActive","statisticsActive","useSelectFeaturesTotalCounts","setSelectedFeaturesTotalCounts","totalCounts","useUpdateCurrentFeature","updateCurrentFeature","values","useZoomToFeatures","padding","currentFeatureCenter","bbox","fitBounds","DEFAULT_PADDING","useZoomToLayer","bulkExtent","options","overall","useZoomToPoint","callback","once","flyTo","useServerNotifications","url","hubConnection","useRef","connection","setConnection","useState","HubConnectionBuilder","withUrl","withCredentials","configureLogging","LogLevel","Information","build","start","then","console","info","catch","err","finally","invoke","ServerNotificationsContext","useServerNotificationsContext","VerticalPosition","HorizontalPosition","useResizer","handleVerticalPosition","handleHorizontalPosition","minWidth","MIN_SAFE_INTEGER","maxWidth","MAX_SAFE_INTEGER","horizontal","minHeight","maxHeight","vertical","useResize","onResize","onResizeEnd","onResizeStart","containerRef","verticalHandleRef","horizontalHandleRef","updateSizes","width","height","newWidth","newHeight","Math","min","window","innerWidth","clientWidth","innerHeight","clientHeight","requestAnimationFrame","isNil","onPointerMove","pointerMoveEvent","x","y","getBoundingClientRect","reverseHorizontal","Right","reverseVertical","Bottom","pageX","offsetWidth","pageY","offsetHeight","document","body","userSelect","onPointerDown","onPointerUp","removeEventListener","addEventListener","useLayoutEffect","useToggle","initial","setState","toggle","drawModeToGeometrySelectionType","Line","getGeometrySelectionTurfFeature","selectionType","toWgs","toWgs84","lineString","toMercator"],"mappings":";;;;;;;;;;;;;;MAEaA,yBAAyB,GAAIC,UAAD;AACvC,MAAIC,KAAK,CAACC,OAAN,CAAcF,UAAd,KAA6BA,UAAU,CAACG,MAAX,KAAsB,CAAnD,IAAwDH,UAAU,CAAC,CAAD,CAAV,KAAkB,KAA9E,EAAqF;AACnF,WAAO,CAACA,UAAU,CAAC,CAAD,CAAX,CAAP;AACD;;AAED,SAAOA,UAAU,CAACI,MAAX,CAAkB,CAACC,GAAD,EAAgBC,IAAhB;AACvB,QAAI,CAACL,KAAK,CAACC,OAAN,CAAcI,IAAd,CAAL,EAA0B;AACxB,aAAOD,GAAP;AACD;;AAED,QAAIC,IAAI,CAAC,CAAD,CAAJ,KAAY,KAAhB,EAAuB;AACrB,aAAO,CAAC,GAAG,IAAIC,GAAJ,CAAQ,CAAC,GAAGF,GAAJ,EAASC,IAAI,CAAC,CAAD,CAAb,CAAR,CAAJ,CAAP;AACD;;AAED,WAAO,CAAC,GAAG,IAAIC,GAAJ,CAAQ,CAAC,GAAGF,GAAJ,EAAS,GAAGN,yBAAyB,CAACO,IAAD,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GAAIrN,IAAD;AAC7C,UAAQA,IAAR;AACE,SAAK,YAAL;AACE,aAAOd,sBAAsB,CAACxB,KAA9B;;AACF,SAAK,cAAL;AACE,aAAOwB,sBAAsB,CAACjB,OAA9B;;AACF,SAAK,kBAAL;AACE,aAAOiB,sBAAsB,CAACoO,IAA9B;;AACF;AACE,aAAOpO,sBAAsB,CAACxB,KAA9B;AARJ;AAUD,CAXM;;MCCM6P,+BAA+B,GAAG,CAC7C3P,WAD6C,EAE7C4P,aAF6C,EAG7CC,KAH6C;AAK7C,MAAIA,KAAJ,EAAW;AACT,YAAQD,aAAR;AACE,WAAKtO,sBAAsB,CAACxB,KAA5B;AACE,eAAOgQ,OAAO,CAAC/P,KAAK,CAACC,WAAD,CAAN,CAAd;;AACF,WAAKsB,sBAAsB,CAACjB,OAA5B;AACE,eAAOyP,OAAO,CAACvP,OAAO,CAACP,WAAD,CAAR,CAAd;;AACF,WAAKsB,sBAAsB,CAACoO,IAA5B;AACE,eAAOI,OAAO,CAACC,UAAU,CAAC/P,WAAD,CAAX,CAAd;AANJ;AASD;;AAED,UAAQ4P,aAAR;AACE,SAAKtO,sBAAsB,CAACxB,KAA5B;AACE,aAAOkQ,UAAU,CAACjQ,KAAK,CAACC,WAAD,CAAN,CAAjB;;AACF,SAAKsB,sBAAsB,CAACjB,OAA5B;AACE,aAAO2P,UAAU,CAACzP,OAAO,CAACP,WAAD,CAAR,CAAjB;;AACF,SAAKsB,sBAAsB,CAACoO,IAA5B;AACE,aAAOM,UAAU,CAACD,UAAU,CAAC/P,WAAD,CAAX,CAAjB;AANJ;AASD,CA1BM;;;;"}
@@ -11,6 +11,6 @@ interface FormatDateOptions {
11
11
  dateFormat?: DateFormat;
12
12
  defaultValue?: RawDateType;
13
13
  }
14
- export declare const getDate: (rawDate?: string | number | Date | null | undefined) => Date | null;
15
- export declare const formatDate: (date?: string | number | Date | undefined, { dateFormat, defaultValue }?: FormatDateOptions) => string;
14
+ export declare const getDate: (rawDate?: RawDateType | null) => Date | null;
15
+ export declare const formatDate: (date?: RawDateType, { dateFormat, defaultValue }?: FormatDateOptions) => string;
16
16
  export {};
@@ -0,0 +1,2 @@
1
+ import { SelectionHistoryFeature } from "../components";
2
+ export declare const geometryToWkt: (features?: SelectionHistoryFeature[]) => string;
@@ -1,3 +1,4 @@
1
1
  export * from "./date";
2
+ export * from "./geometryToWkt";
2
3
  export * from "./isNumeric";
3
4
  export * from "./isObject";
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.1.1",
2
+ "version": "3.1.2",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -7,7 +7,7 @@
7
7
  "dist"
8
8
  ],
9
9
  "engines": {
10
- "node": ">=10"
10
+ "node": ">=20"
11
11
  },
12
12
  "scripts": {
13
13
  "start": "tsdx watch",
@@ -20,10 +20,9 @@
20
20
  "build-storybook": "build-storybook"
21
21
  },
22
22
  "peerDependencies": {
23
- "@evergis/api": ">=1.0.0",
24
- "react": ">=17",
25
- "react-dom": ">=17",
26
- "react-i18next": ">=11"
23
+ "@evergis/api": ">=4.0.0",
24
+ "react": ">=18",
25
+ "react-dom": ">=18"
27
26
  },
28
27
  "husky": {
29
28
  "hooks": {
@@ -43,7 +42,7 @@
43
42
  "@babel/core": "^7.17.5",
44
43
  "@babel/plugin-transform-classes": "^7.16.7",
45
44
  "@babel/preset-env": "^7.16.11",
46
- "@evergis/api": "^4.1.1",
45
+ "@evergis/api": "^4.1.2",
47
46
  "@storybook/addon-actions": "^6.4.18",
48
47
  "@storybook/addon-controls": "^6.4.18",
49
48
  "@storybook/addon-docs": "^6.4.18",
@@ -54,31 +53,39 @@
54
53
  "@storybook/addons": "^6.4.18",
55
54
  "@storybook/react": "^6.4.18",
56
55
  "@storybook/theming": "^6.4.18",
57
- "@types/lodash": "^4.14.182",
58
- "@types/react": "^17.0.36",
59
- "@types/react-dom": "^16.9.8",
60
- "@types/styled-components": "^5.1.3",
61
- "babel-loader": "^8.2.3",
62
- "http-proxy-middleware": "^1.0.5",
63
- "i18next": "^21.6.13",
64
- "i18next-browser-languagedetector": "^6.1.2",
65
- "react": "^17.0.2",
66
- "react-docgen-typescript-loader": "^3.7.2",
67
- "react-dom": "^17.0.2",
68
- "react-i18next": "^11.15.5",
56
+ "@types/lodash": "^4.17.15",
57
+ "@types/mapbox__mapbox-gl-draw": "^1.4.6",
58
+ "@types/mapbox__mapbox-gl-geocoder": "^5.0.0",
59
+ "@types/react": "^18.3.18",
60
+ "@types/react-dom": "^18.3.5",
61
+ "@types/react-map-gl": "^6.1.7",
62
+ "@types/styled-components": "5.1.25",
63
+ "@types/styled-system": "^5.1.23",
64
+ "react": "^18.3.1",
65
+ "react-dom": "^18.3.1",
69
66
  "react-is": "^17.0.2",
67
+ "ts-jest": "^25.3.1",
70
68
  "ts-loader": "^8.0.5"
71
69
  },
72
70
  "resolutions": {
73
- "styled-components": "^5.3.5"
71
+ "styled-components": "5.3.5"
74
72
  },
75
73
  "dependencies": {
76
74
  "@evergis/color": "^1.0.0-alpha.1",
77
- "@evergis/condition": "^2.1.1",
75
+ "@mapbox/mapbox-gl-draw": "^1.5.0",
76
+ "@microsoft/signalr": "^8.0.7",
78
77
  "@svgdotjs/svg.js": "^3.1.2",
78
+ "@turf/turf": "^7.2.0",
79
+ "date-fns": "^4.1.0",
80
+ "find-and": "^1.3.1",
79
81
  "lodash": "^4.17.21",
82
+ "mapbox-gl": "^3.12.0",
83
+ "mapbox-gl-draw": "^0.16.0",
80
84
  "punycode": "^2.1.1",
81
- "styled-components": "^5.3.5"
85
+ "react-map-gl": "^8.0.4",
86
+ "styled-components": "5.3.5",
87
+ "styled-system": "^5.1.5",
88
+ "wkt": "^0.1.1"
82
89
  },
83
- "gitHead": "a09121c280e395b08d0c1f9f98d8db13ae0a2017"
90
+ "gitHead": "43e91a1806ad5db263cccf74daac5fa2065c3815"
84
91
  }